import{g as Wt,c as Qe,a as Ft}from"./index-416837cb.js";function $t(Tt,Lt){for(var d=0;dI[T]})}}}return Object.freeze(Object.defineProperty(Tt,Symbol.toStringTag,{value:"Module"}))}var Vt={exports:{}};/*! ExcelJS 21-08-2021 */(function(Tt,Lt){(function(d){Tt.exports=d()})(function(){return function d(I,T,b){function m(p,c){if(!T[p]){if(!I[p]){var l=typeof Ft=="function"&&Ft;if(!c&&l)return l(p,!0);if(v)return v(p,!0);var s=new Error("Cannot find module '"+p+"'");throw s.code="MODULE_NOT_FOUND",s}var i=T[p]={exports:{}};I[p][0].call(i.exports,function(e){return m(I[p][1][e]||e)},i,i.exports,d,I,T,b)}return T[p].exports}for(var v=typeof Ft=="function"&&Ft,h=0;h2&&arguments[2]!==void 0?arguments[2]:0;if(b(this,p),e)if(typeof e=="string"){var r=v.decodeAddress(e);this.nativeCol=r.col+t,this.nativeColOff=0,this.nativeRow=r.row+t,this.nativeRowOff=0}else e.nativeCol!==void 0?(this.nativeCol=e.nativeCol||0,this.nativeColOff=e.nativeColOff||0,this.nativeRow=e.nativeRow||0,this.nativeRowOff=e.nativeRowOff||0):e.col!==void 0?(this.col=e.col+t,this.row=e.row+t):(this.nativeCol=0,this.nativeColOff=0,this.nativeRow=0,this.nativeRowOff=0);else this.nativeCol=0,this.nativeColOff=0,this.nativeRow=0,this.nativeRowOff=0;this.worksheet=i}var c,l,s;return c=p,s=[{key:"asInstance",value:function(i){return i instanceof p||i==null?i:new p(i)}}],(l=[{key:"col",get:function(){return this.nativeCol+Math.min(this.colWidth-1,this.nativeColOff)/this.colWidth},set:function(i){this.nativeCol=Math.floor(i),this.nativeColOff=Math.floor((i-this.nativeCol)*this.colWidth)}},{key:"row",get:function(){return this.nativeRow+Math.min(this.rowHeight-1,this.nativeRowOff)/this.rowHeight},set:function(i){this.nativeRow=Math.floor(i),this.nativeRowOff=Math.floor((i-this.nativeRow)*this.rowHeight)}},{key:"colWidth",get:function(){return this.worksheet&&this.worksheet.getColumn(this.nativeCol+1)&&this.worksheet.getColumn(this.nativeCol+1).isCustomWidth?Math.floor(1e4*this.worksheet.getColumn(this.nativeCol+1).width):64e4}},{key:"rowHeight",get:function(){return this.worksheet&&this.worksheet.getRow(this.nativeRow+1)&&this.worksheet.getRow(this.nativeRow+1).height?Math.floor(1e4*this.worksheet.getRow(this.nativeRow+1).height):18e4}},{key:"model",get:function(){return{nativeCol:this.nativeCol,nativeColOff:this.nativeColOff,nativeRow:this.nativeRow,nativeRowOff:this.nativeRowOff}},set:function(i){this.nativeCol=i.nativeCol,this.nativeColOff=i.nativeColOff,this.nativeRow=i.nativeRow,this.nativeRowOff=i.nativeRowOff}}])&&m(c.prototype,l),s&&m(c,s),p}();I.exports=h},{"../utils/col-cache":19}],3:[function(d,I,T){function b(O,P){if(!(O instanceof P))throw new TypeError("Cannot call a class as a function")}function m(O,P){for(var _=0;_0||this.type===O.Types.Merge}},{key:"master",get:function(){return this.type===O.Types.Merge?this._value.master:this}},{key:"isHyperlink",get:function(){return this._value.type===O.Types.Hyperlink}},{key:"hyperlink",get:function(){return this._value.hyperlink}},{key:"value",get:function(){return this._value.value},set:function(P){this.type!==O.Types.Merge?(this._value.release(),this._value=M.create(M.getType(P),this,P)):this._value.master.value=P}},{key:"note",get:function(){return this._comment&&this._comment.note},set:function(P){this._comment=new s(P)}},{key:"text",get:function(){return this._value.toString()}},{key:"html",get:function(){return p.escapeHtml(this.text)}},{key:"formula",get:function(){return this._value.formula}},{key:"result",get:function(){return this._value.result}},{key:"formulaType",get:function(){return this._value.formulaType}},{key:"fullAddress",get:function(){return{sheetName:this._row.worksheet.name,address:this.address,row:this.row,col:this.col}}},{key:"name",get:function(){return this.names[0]},set:function(P){this.names=[P]}},{key:"names",get:function(){return this.workbook.definedNames.getNamesEx(this.fullAddress)},set:function(P){var _=this,S=this.workbook.definedNames;S.removeAllNames(this.fullAddress),P.forEach(function(g){S.addEx(_.fullAddress,g)})}},{key:"_dataValidations",get:function(){return this.worksheet.dataValidations}},{key:"dataValidation",get:function(){return this._dataValidations.find(this.address)},set:function(P){this._dataValidations.add(this.address,P)}},{key:"model",get:function(){var P=this._value.model;return P.style=this.style,this._comment&&(P.comment=this._comment.model),P},set:function(P){if(this._value.release(),this._value=M.create(P.type,this),this._value.model=P,P.comment)switch(P.comment.type){case"note":this._comment=s.fromModel(P.comment)}P.style?this.style=P.style:this.style={}}}]),O}();i.Types=c.ValueType;var e=function(){function O(P){b(this,O),this.model={address:P.address,type:i.Types.Null}}return v(O,[{key:"toCsvString",value:function(){return""}},{key:"release",value:function(){}},{key:"toString",value:function(){return""}},{key:"value",get:function(){return null},set:function(P){}},{key:"type",get:function(){return i.Types.Null}},{key:"effectiveType",get:function(){return i.Types.Null}},{key:"address",get:function(){return this.model.address},set:function(P){this.model.address=P}}]),O}(),t=function(){function O(P,_){b(this,O),this.model={address:P.address,type:i.Types.Number,value:_}}return v(O,[{key:"toCsvString",value:function(){return this.model.value.toString()}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.value.toString()}},{key:"value",get:function(){return this.model.value},set:function(P){this.model.value=P}},{key:"type",get:function(){return i.Types.Number}},{key:"effectiveType",get:function(){return i.Types.Number}},{key:"address",get:function(){return this.model.address},set:function(P){this.model.address=P}}]),O}(),r=function(){function O(P,_){b(this,O),this.model={address:P.address,type:i.Types.String,value:_}}return v(O,[{key:"toCsvString",value:function(){return'"'.concat(this.model.value.replace(/"/g,'""'),'"')}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.value}},{key:"value",get:function(){return this.model.value},set:function(P){this.model.value=P}},{key:"type",get:function(){return i.Types.String}},{key:"effectiveType",get:function(){return i.Types.String}},{key:"address",get:function(){return this.model.address},set:function(P){this.model.address=P}}]),O}(),o=function(){function O(P,_){b(this,O),this.model={address:P.address,type:i.Types.String,value:_}}return v(O,[{key:"toString",value:function(){return this.model.value.richText.map(function(P){return P.text}).join("")}},{key:"toCsvString",value:function(){return'"'.concat(this.text.replace(/"/g,'""'),'"')}},{key:"release",value:function(){}},{key:"value",get:function(){return this.model.value},set:function(P){this.model.value=P}},{key:"type",get:function(){return i.Types.RichText}},{key:"effectiveType",get:function(){return i.Types.RichText}},{key:"address",get:function(){return this.model.address},set:function(P){this.model.address=P}}]),O}(),n=function(){function O(P,_){b(this,O),this.model={address:P.address,type:i.Types.Date,value:_}}return v(O,[{key:"toCsvString",value:function(){return this.model.value.toISOString()}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.value.toString()}},{key:"value",get:function(){return this.model.value},set:function(P){this.model.value=P}},{key:"type",get:function(){return i.Types.Date}},{key:"effectiveType",get:function(){return i.Types.Date}},{key:"address",get:function(){return this.model.address},set:function(P){this.model.address=P}}]),O}(),a=function(){function O(P,_){b(this,O),this.model={address:P.address,type:i.Types.Hyperlink,text:_?_.text:void 0,hyperlink:_?_.hyperlink:void 0},_&&_.tooltip&&(this.model.tooltip=_.tooltip)}return v(O,[{key:"toCsvString",value:function(){return this.model.hyperlink}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.text}},{key:"value",get:function(){var P={text:this.model.text,hyperlink:this.model.hyperlink};return this.model.tooltip&&(P.tooltip=this.model.tooltip),P},set:function(P){this.model={text:P.text,hyperlink:P.hyperlink},P.tooltip&&(this.model.tooltip=P.tooltip)}},{key:"text",get:function(){return this.model.text},set:function(P){this.model.text=P}},{key:"hyperlink",get:function(){return this.model.hyperlink},set:function(P){this.model.hyperlink=P}},{key:"type",get:function(){return i.Types.Hyperlink}},{key:"effectiveType",get:function(){return i.Types.Hyperlink}},{key:"address",get:function(){return this.model.address},set:function(P){this.model.address=P}}]),O}(),u=function(){function O(P,_){b(this,O),this.model={address:P.address,type:i.Types.Merge,master:_?_.address:void 0},this._master=_,_&&_.addMergeRef()}return v(O,[{key:"isMergedTo",value:function(P){return P===this._master}},{key:"toCsvString",value:function(){return""}},{key:"release",value:function(){this._master.releaseMergeRef()}},{key:"toString",value:function(){return this.value.toString()}},{key:"value",get:function(){return this._master.value},set:function(P){P instanceof i?(this._master&&this._master.releaseMergeRef(),P.addMergeRef(),this._master=P):this._master.value=P}},{key:"master",get:function(){return this._master}},{key:"type",get:function(){return i.Types.Merge}},{key:"effectiveType",get:function(){return this._master.effectiveType}},{key:"address",get:function(){return this.model.address},set:function(P){this.model.address=P}}]),O}(),f=function(){function O(P,_){b(this,O),this.cell=P,this.model={address:P.address,type:i.Types.Formula,shareType:_?_.shareType:void 0,ref:_?_.ref:void 0,formula:_?_.formula:void 0,sharedFormula:_?_.sharedFormula:void 0,result:_?_.result:void 0}}return v(O,[{key:"_copyModel",value:function(P){var _={},S=function(g){var j=P[g];j&&(_[g]=j)};return S("formula"),S("result"),S("ref"),S("shareType"),S("sharedFormula"),_}},{key:"validate",value:function(P){switch(M.getType(P)){case i.Types.Null:case i.Types.String:case i.Types.Number:case i.Types.Date:break;case i.Types.Hyperlink:case i.Types.Formula:default:throw new Error("Cannot process that type of result value")}}},{key:"_getTranslatedFormula",value:function(){if(!this._translatedFormula&&this.model.sharedFormula){var P=this.cell.worksheet.findCell(this.model.sharedFormula);this._translatedFormula=P&&l(P.formula,P.address,this.model.address)}return this._translatedFormula}},{key:"toCsvString",value:function(){return"".concat(this.model.result||"")}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.result?this.model.result.toString():""}},{key:"value",get:function(){return this._copyModel(this.model)},set:function(P){this.model=this._copyModel(P)}},{key:"dependencies",get:function(){return{ranges:this.formula.match(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}:[A-Z]{1,3}\d{1,4}/g),cells:this.formula.replace(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}:[A-Z]{1,3}\d{1,4}/g,"").match(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}/g)}}},{key:"formula",get:function(){return this.model.formula||this._getTranslatedFormula()},set:function(P){this.model.formula=P}},{key:"formulaType",get:function(){return this.model.formula?c.FormulaType.Master:this.model.sharedFormula?c.FormulaType.Shared:c.FormulaType.None}},{key:"result",get:function(){return this.model.result},set:function(P){this.model.result=P}},{key:"type",get:function(){return i.Types.Formula}},{key:"effectiveType",get:function(){var P=this.model.result;return P==null?c.ValueType.Null:P instanceof String||typeof P=="string"?c.ValueType.String:typeof P=="number"?c.ValueType.Number:P instanceof Date?c.ValueType.Date:P.text&&P.hyperlink?c.ValueType.Hyperlink:P.formula?c.ValueType.Formula:c.ValueType.Null}},{key:"address",get:function(){return this.model.address},set:function(P){this.model.address=P}}]),O}(),y=function(){function O(P,_){b(this,O),this.model={address:P.address,type:i.Types.SharedString,value:_}}return v(O,[{key:"toCsvString",value:function(){return this.model.value.toString()}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.value.toString()}},{key:"value",get:function(){return this.model.value},set:function(P){this.model.value=P}},{key:"type",get:function(){return i.Types.SharedString}},{key:"effectiveType",get:function(){return i.Types.SharedString}},{key:"address",get:function(){return this.model.address},set:function(P){this.model.address=P}}]),O}(),w=function(){function O(P,_){b(this,O),this.model={address:P.address,type:i.Types.Boolean,value:_}}return v(O,[{key:"toCsvString",value:function(){return this.model.value?1:0}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.value.toString()}},{key:"value",get:function(){return this.model.value},set:function(P){this.model.value=P}},{key:"type",get:function(){return i.Types.Boolean}},{key:"effectiveType",get:function(){return i.Types.Boolean}},{key:"address",get:function(){return this.model.address},set:function(P){this.model.address=P}}]),O}(),R=function(){function O(P,_){b(this,O),this.model={address:P.address,type:i.Types.Error,value:_}}return v(O,[{key:"toCsvString",value:function(){return this.toString()}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.value.error.toString()}},{key:"value",get:function(){return this.model.value},set:function(P){this.model.value=P}},{key:"type",get:function(){return i.Types.Error}},{key:"effectiveType",get:function(){return i.Types.Error}},{key:"address",get:function(){return this.model.address},set:function(P){this.model.address=P}}]),O}(),E=function(){function O(P,_){b(this,O),this.model={address:P.address,type:i.Types.String,value:JSON.stringify(_),rawValue:_}}return v(O,[{key:"toCsvString",value:function(){return this.model.value}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.value}},{key:"value",get:function(){return this.model.rawValue},set:function(P){this.model.rawValue=P,this.model.value=JSON.stringify(P)}},{key:"type",get:function(){return i.Types.String}},{key:"effectiveType",get:function(){return i.Types.String}},{key:"address",get:function(){return this.model.address},set:function(P){this.model.address=P}}]),O}(),M={getType:function(O){return O==null?i.Types.Null:O instanceof String||typeof O=="string"?i.Types.String:typeof O=="number"?i.Types.Number:typeof O=="boolean"?i.Types.Boolean:O instanceof Date?i.Types.Date:O.text&&O.hyperlink?i.Types.Hyperlink:O.formula||O.sharedFormula?i.Types.Formula:O.richText?i.Types.RichText:O.sharedString?i.Types.SharedString:O.error?i.Types.Error:i.Types.JSON},types:[{t:i.Types.Null,f:e},{t:i.Types.Number,f:t},{t:i.Types.String,f:r},{t:i.Types.Date,f:n},{t:i.Types.Hyperlink,f:a},{t:i.Types.Formula,f},{t:i.Types.Merge,f:u},{t:i.Types.JSON,f:E},{t:i.Types.SharedString,f:y},{t:i.Types.RichText,f:o},{t:i.Types.Boolean,f:w},{t:i.Types.Error,f:R}].reduce(function(O,P){return O[P.t]=P.f,O},[]),create:function(O,P,_){var S=this.types[O];if(!S)throw new Error("Could not create Value of type ".concat(O));return new S(P,_)}};I.exports=i},{"../utils/col-cache":19,"../utils/shared-formula":22,"../utils/under-dash":25,"./enums":7,"./note":9}],4:[function(d,I,T){function b(c,l){for(var s=0;s=this._worksheet.properties.outlineLevelCol)}},{key:"isDefault",get:function(){if(this.isCustomWidth||this.hidden||this.outlineLevel)return!1;var e=this.style;return!e||!(e.font||e.numFmt||e.alignment||e.border||e.fill||e.protection)}},{key:"headerCount",get:function(){return this.headers.length}},{key:"values",get:function(){var e=[];return this.eachCell(function(t,r){t&&t.type!==v.ValueType.Null&&(e[r]=t.value)}),e},set:function(e){var t=this;if(e){var r=this.number,o=0;e.hasOwnProperty("0")&&(o=1),e.forEach(function(n,a){t._worksheet.getCell(a+o,r).value=n})}}},{key:"numFmt",get:function(){return this.style.numFmt},set:function(e){this._applyStyle("numFmt",e)}},{key:"font",get:function(){return this.style.font},set:function(e){this._applyStyle("font",e)}},{key:"alignment",get:function(){return this.style.alignment},set:function(e){this._applyStyle("alignment",e)}},{key:"protection",get:function(){return this.style.protection},set:function(e){this._applyStyle("protection",e)}},{key:"border",get:function(){return this.style.border},set:function(e){this._applyStyle("border",e)}},{key:"fill",get:function(){return this.style.fill},set:function(e){this._applyStyle("fill",e)}}])&&b(l.prototype,s),i&&b(l,i),c}();I.exports=p},{"../utils/col-cache":19,"../utils/under-dash":25,"./enums":7}],5:[function(d,I,T){function b(v,h){for(var p=0;pthis.bottom)&&(this.bottom=e),(!this.model.right||t>this.right)&&(this.right=t)}},{key:"expandRow",value:function(s){if(s){var i=s.dimensions,e=s.number;i&&this.expand(e,i.min,e,i.max)}}},{key:"expandToAddress",value:function(s){var i=v.decodeEx(s);this.expand(i.row,i.col,i.row,i.col)}},{key:"toString",value:function(){return this.range}},{key:"intersects",value:function(s){return!(s.sheetName&&this.sheetName&&s.sheetName!==this.sheetName||s.bottomthis.bottom||s.rightthis.right)}},{key:"contains",value:function(s){var i=v.decodeEx(s);return this.containsEx(i)}},{key:"containsEx",value:function(s){return(!s.sheetName||!this.sheetName||s.sheetName===this.sheetName)&&s.row>=this.top&&s.row<=this.bottom&&s.col>=this.left&&s.col<=this.right}},{key:"forEachAddress",value:function(s){for(var i=this.left;i<=this.right;i++)for(var e=this.top;e<=this.bottom;e++)s(v.encodeAddress(e,i),e,i)}},{key:"top",get:function(){return this.model.top||1},set:function(s){this.model.top=s}},{key:"left",get:function(){return this.model.left||1},set:function(s){this.model.left=s}},{key:"bottom",get:function(){return this.model.bottom||1},set:function(s){this.model.bottom=s}},{key:"right",get:function(){return this.model.right||1},set:function(s){this.model.right=s}},{key:"sheetName",get:function(){return this.model.sheetName},set:function(s){this.model.sheetName=s}},{key:"_serialisedSheetName",get:function(){var s=this.model.sheetName;return s?/^[a-zA-Z0-9]*$/.test(s)?"".concat(s,"!"):"'".concat(s,"'!"):""}},{key:"tl",get:function(){return v.n2l(this.left)+this.top}},{key:"$t$l",get:function(){return"$".concat(v.n2l(this.left),"$").concat(this.top)}},{key:"br",get:function(){return v.n2l(this.right)+this.bottom}},{key:"$b$r",get:function(){return"$".concat(v.n2l(this.right),"$").concat(this.bottom)}},{key:"range",get:function(){return"".concat(this._serialisedSheetName+this.tl,":").concat(this.br)}},{key:"$range",get:function(){return"".concat(this._serialisedSheetName+this.$t$l,":").concat(this.$b$r)}},{key:"shortRange",get:function(){return this.count>1?this.range:this._serialisedSheetName+this.tl}},{key:"$shortRange",get:function(){return this.count>1?this.$range:this._serialisedSheetName+this.$t$l}},{key:"count",get:function(){return(1+this.bottom-this.top)*(1+this.right-this.left)}}])&&m(c.prototype,l),p}();I.exports=h},{"../utils/col-cache":19}],11:[function(d,I,T){function b(l,s){for(var i=0;i2?o-2:0),a=2;a0)for(u=R;u>=r;u--)(f=this._cells[u-1])?((y=this.getCell(u+w)).value=f.value,y.style=f.style,y._comment=f._comment):this._cells[u+w-1]=void 0;for(u=0;ur.col)&&(e=r.col),t0?{min:e,max:t}:null}},{key:"numFmt",get:function(){return this.style.numFmt},set:function(e){this._applyStyle("numFmt",e)}},{key:"font",get:function(){return this.style.font},set:function(e){this._applyStyle("font",e)}},{key:"alignment",get:function(){return this.style.alignment},set:function(e){this._applyStyle("alignment",e)}},{key:"protection",get:function(){return this.style.protection},set:function(e){this._applyStyle("protection",e)}},{key:"border",get:function(){return this.style.border},set:function(e){this._applyStyle("border",e)}},{key:"fill",get:function(){return this.style.fill},set:function(e){this._applyStyle("fill",e)}},{key:"hidden",get:function(){return!!this._hidden},set:function(e){this._hidden=e}},{key:"outlineLevel",get:function(){return this._outlineLevel||0},set:function(e){this._outlineLevel=e}},{key:"collapsed",get:function(){return!!(this._outlineLevel&&this._outlineLevel>=this._worksheet.properties.outlineLevelRow)}},{key:"model",get:function(){var e=[],t=0,r=0;return this._cells.forEach(function(o){if(o){var n=o.model;n&&((!t||t>o.col)&&(t=o.col),r0,"Table must be on valid row"),t(n>0,"Table must be on valid col");var a=this.width,u=this.filterHeight,f=this.tableHeight;i.autoFilterRef=h.encode(o,n,o+u-1,n+a-1),i.tableRef=h.encode(o,n,o+f-1,n+a-1),i.columns.forEach(function(y,w){t(y.name,"Column ".concat(w," must have a name")),w===0?e(y,"totalsRowLabel","Total"):(e(y,"totalsRowFunction","none"),y.totalsRowFormula=s.getFormula(y))})}},{key:"store",value:function(){var s=this,i=function(y,w){w&&Object.keys(w).forEach(function(R){y[R]=w[R]})},e=this.worksheet,t=this.table,r=t.tl,o=r.row,n=r.col,a=0;if(t.headerRow){var u=e.getRow(o+a++);t.columns.forEach(function(y,w){var R=y.style,E=y.name,M=u.getCell(n+w);M.value=E,i(M,R)})}if(t.rows.forEach(function(y){var w=e.getRow(o+a++);y.forEach(function(R,E){var M=w.getCell(n+E);M.value=R,i(M,t.columns[E].style)})}),t.totalsRow){var f=e.getRow(o+a++);t.columns.forEach(function(y,w){var R=f.getCell(n+w);if(w===0)R.value=y.totalsRowLabel;else{var E=s.getFormula(y);R.value=E?{formula:y.totalsRowFormula,result:y.totalsRowResult}:null}i(R,y.style)})}}},{key:"load",value:function(s){var i=this,e=this.table,t=e.tl,r=t.row,o=t.col,n=0;if(e.headerRow){var a=s.getRow(r+n++);e.columns.forEach(function(f,y){a.getCell(o+y).value=f.name})}if(e.rows.forEach(function(f){var y=s.getRow(r+n++);f.forEach(function(w,R){y.getCell(o+R).value=w})}),e.totalsRow){var u=s.getRow(r+n++);e.columns.forEach(function(f,y){var w=u.getCell(o+y);y===0?w.value=f.totalsRowLabel:i.getFormula(f)&&(w.value={formula:f.totalsRowFormula,result:f.totalsRowResult})})}}},{key:"cacheState",value:function(){this._cache||(this._cache={ref:this.ref,width:this.width,tableHeight:this.tableHeight})}},{key:"commit",value:function(){if(this._cache){this.validate();var s=h.decodeAddress(this._cache.ref);if(this.ref!==this._cache.ref)for(var i=0;i1&&arguments[1]!==void 0?arguments[1]:1;this.cacheState(),this.table.rows.splice(s,i)}},{key:"getColumn",value:function(s){var i=this.table.columns[s];return new p(this,i,s)}},{key:"addColumn",value:function(s,i,e){this.cacheState(),e===void 0?(this.table.columns.push(s),this.table.rows.forEach(function(t,r){t.push(i[r])})):(this.table.columns.splice(e,0,s),this.table.rows.forEach(function(t,r){t.splice(e,0,i[r])}))}},{key:"removeColumns",value:function(s){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;this.cacheState(),this.table.columns.splice(s,i),this.table.rows.forEach(function(e){e.splice(s,i)})}},{key:"_assign",value:function(s,i,e){this.cacheState(),s[i]=e}},{key:"width",get:function(){return this.table.columns.length}},{key:"height",get:function(){return this.table.rows.length}},{key:"filterHeight",get:function(){return this.height+(this.table.headerRow?1:0)}},{key:"tableHeight",get:function(){return this.filterHeight+(this.table.totalsRow?1:0)}},{key:"model",get:function(){return this.table},set:function(s){this.table=s}},{key:"ref",get:function(){return this.table.ref},set:function(s){this._assign(this.table,"ref",s)}},{key:"name",get:function(){return this.table.name},set:function(s){this.table.name=s}},{key:"displayName",get:function(){return this.table.displyName||this.table.name}},{key:"displayNamename",set:function(s){this.table.displayName=s}},{key:"headerRow",get:function(){return this.table.headerRow},set:function(s){this._assign(this.table,"headerRow",s)}},{key:"totalsRow",get:function(){return this.table.totalsRow},set:function(s){this._assign(this.table,"totalsRow",s)}},{key:"theme",get:function(){return this.table.style.name},set:function(s){this.table.style.name=s}},{key:"showFirstColumn",get:function(){return this.table.style.showFirstColumn},set:function(s){this.table.style.showFirstColumn=s}},{key:"showLastColumn",get:function(){return this.table.style.showLastColumn},set:function(s){this.table.style.showLastColumn=s}},{key:"showRowStripes",get:function(){return this.table.style.showRowStripes},set:function(s){this.table.style.showRowStripes=s}},{key:"showColumnStripes",get:function(){return this.table.style.showColumnStripes},set:function(s){this.table.style.showColumnStripes=s}}]),l}();I.exports=c},{"../utils/col-cache":19}],13:[function(d,I,T){function b(l,s){for(var i=0;i31&&console.warn("Worksheet name ".concat(e," exceeds 31 chars. This will be truncated")),/[*?:/\\[\]]/.test(e))throw new Error("Worksheet name ".concat(e," cannot include any of the following characters: * ? : \\ / [ ]"));if(/(^')|('$)/.test(e))throw new Error("The first or last character of worksheet name cannot be a single quotation mark: ".concat(e));if(e=(e||"sheet".concat(r)).substring(0,31),this._worksheets.find(function(u){return u&&u.name.toLowerCase()===e.toLowerCase()}))throw new Error("Worksheet name already exists: ".concat(e));t&&(typeof t=="string"?(console.trace('tabColor argument is now deprecated. Please use workbook.addWorksheet(name, {properties: { tabColor: { argb: "rbg value" } }'),t={properties:{tabColor:{argb:t}}}):(t.argb||t.theme||t.indexed)&&(console.trace("tabColor argument is now deprecated. Please use workbook.addWorksheet(name, {properties: { tabColor: { ... } }"),t={properties:{tabColor:t}}));var o=this._worksheets.reduce(function(u,f){return(f&&f.orderNo)>u?f.orderNo:u},0),n=Object.assign({},t,{id:r,name:e,orderNo:o+1,workbook:this}),a=new m(n);return this._worksheets[r]=a,a}},{key:"removeWorksheetEx",value:function(e){delete this._worksheets[e.id]}},{key:"removeWorksheet",value:function(e){var t=this.getWorksheet(e);t&&t.destroy()}},{key:"getWorksheet",value:function(e){return e===void 0?this._worksheets.find(Boolean):typeof e=="number"?this._worksheets[e]:typeof e=="string"?this._worksheets.find(function(t){return t&&t.name===e}):void 0}},{key:"eachSheet",value:function(e){this.worksheets.forEach(function(t){e(t,t.id)})}},{key:"clearThemes",value:function(){this._themes=void 0}},{key:"addImage",value:function(e){var t=this.media.length;return this.media.push(Object.assign({},e,{type:"image"})),t}},{key:"getImage",value:function(e){return this.media[e]}},{key:"xlsx",get:function(){return this._xlsx||(this._xlsx=new h(this)),this._xlsx}},{key:"csv",get:function(){return this._csv||(this._csv=new p(this)),this._csv}},{key:"nextId",get:function(){for(var e=1;ey.length)&&(w=y.length);for(var R=0,E=new Array(w);Rthis._columns.length)for(var O=this._columns.length+1;O<=E;)this._columns.push(new t(this,O++));return this._columns[E-1]}},{key:"spliceColumns",value:function(E,M){for(var O=this,P=this._rows,_=P.length,S=arguments.length,g=new Array(S>2?S-2:0),j=2;j0)for(var k=function(V){var q=[E,M];g.forEach(function(L){q.push(L[V]||null)});var $=O.getRow(V+1);$.splice.apply($,q)},x=0;x<_;x++)k(x);else this._rows.forEach(function(V){V&&V.splice(E,M)});var C=g.length-M,D=E+M,F=this._columns.length;if(C<0)for(var B=E+g.length;B<=F;B++)this.getColumn(B).defn=this.getColumn(B-C).defn;else if(C>0)for(var U=F;U>=D;U--)this.getColumn(U+C).defn=this.getColumn(U).defn;for(var H=E;H1&&arguments[1]!==void 0?arguments[1]:"n",O=this._nextRow,P=this.getRow(O);return P.values=E,this._setStyleOption(O,M[0]==="i"?M:"n"),P}},{key:"addRows",value:function(E){var M=this,O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"n",P=[];return E.forEach(function(_){P.push(M.addRow(_,O))}),P}},{key:"insertRow",value:function(E,M){var O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"n";return this.spliceRows(E,0,M),this._setStyleOption(E,O),this.getRow(E)}},{key:"insertRows",value:function(E,M){var O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"n";if(this.spliceRows.apply(this,[E,0].concat(h(M))),O!=="n")for(var P=0;P1&&arguments[1]!==void 0?arguments[1]:"n";M[0]==="o"&&this.findRow(E+1)!==void 0?this._copyStyle(E+1,E,M[1]==="+"):M[0]==="i"&&this.findRow(E-1)!==void 0&&this._copyStyle(E-1,E,M[1]==="+")}},{key:"_copyStyle",value:function(E,M){var O=arguments.length>2&&arguments[2]!==void 0&&arguments[2],P=this.getRow(E),_=this.getRow(M);_.style=Object.freeze(m({},P.style)),P.eachCell({includeEmpty:O},function(S,g){_.getCell(g).style=Object.freeze(m({},S.style))}),_.height=P.height}},{key:"duplicateRow",value:function(E,M){var O=this,P=arguments.length>2&&arguments[2]!==void 0&&arguments[2],_=this._rows[E-1],S=new Array(M).fill(_.values);this.spliceRows.apply(this,[E+1,P?0:M].concat(h(S)));for(var g=function(k){var x=O._rows[E+k];x.style=_.style,x.height=_.height,_.eachCell({includeEmpty:!0},function(C,D){x.getCell(D).style=C.style})},j=0;j2?_-2:0),g=2;g<_;g++)S[g-2]=arguments[g];var j,k,x=S.length,C=x-M,D=this._rows.length;if(C<0)for(j=P;j<=D;j++)(k=this._rows[j-1])?function(){var B=O.getRow(j+C);B.values=k.values,B.style=k.style,B.height=k.height,k.eachCell({includeEmpty:!0},function(U,H){B.getCell(H).style=U.style}),O._rows[j-1]=void 0}():this._rows[j+C-1]=void 0;else if(C>0)for(j=D;j>=P;j--)(k=this._rows[j-1])?function(){var B=O.getRow(j+C);B.values=k.values,B.style=k.style,B.height=k.height,k.eachCell({includeEmpty:!0},function(U,H){if(B.getCell(H).style=U.style,U._value.constructor.name==="MergeValue"){var V=O.getRow(U._row._number+x).getCell(H),q=U._value._master,$=O.getRow(q._row._number+x).getCell(q._column._number);V.merge($)}})}():this._rows[j+C-1]=void 0;for(j=0;jE.top||_>E.left)&&this.getCell(P,_).merge(O,M);this._merges[O.address]=E}},{key:"_unMergeMaster",value:function(E){var M=this._merges[E.address];if(M){for(var O=M.top;O<=M.bottom;O++)for(var P=M.left;P<=M.right;P++)this.getCell(O,P).unmerge();delete this._merges[E.address]}}},{key:"unMergeCells",value:function(){for(var E=arguments.length,M=new Array(E),O=0;O3&&arguments[3]!==void 0?arguments[3]:"shared",S=s.decode(E),g=S.top,j=S.left,k=S.bottom,x=S.right,C=x-j+1,D=s.encodeAddress(g,j),F=_==="shared";P=typeof O=="function"?O:Array.isArray(O)?Array.isArray(O[0])?function(V,q){return O[V-g][q-j]}:function(V,q){return O[(V-g)*C+(q-j)]}:function(){};for(var B=!0,U=g;U<=k;U++)for(var H=j;H<=x;H++)B?(this.getCell(U,H).value={shareType:_,formula:M,ref:E,result:P(U,H)},B=!1):this.getCell(U,H).value=F?{sharedFormula:D,result:P(U,H)}:P(U,H)}},{key:"addImage",value:function(E,M){var O={type:"image",imageId:E,range:M};this._media.push(new o(this,O))}},{key:"getImages",value:function(){return this._media.filter(function(E){return E.type==="image"})}},{key:"addBackgroundImage",value:function(E){var M={type:"background",imageId:E};this._media.push(new o(this,M))}},{key:"getBackgroundImageId",value:function(){var E=this._media.find(function(M){return M.type==="background"});return E&&E.imageId}},{key:"protect",value:function(E,M){var O=this;return new Promise(function(P){O.sheetProtection={sheet:!0},M&&"spinCount"in M&&(M.spinCount=Number.isFinite(M.spinCount)?Math.round(Math.max(0,M.spinCount)):1e5),E&&(O.sheetProtection.algorithmName="SHA-512",O.sheetProtection.saltValue=u.randomBytes(16).toString("base64"),O.sheetProtection.spinCount=M&&"spinCount"in M?M.spinCount:1e5,O.sheetProtection.hashValue=u.convertPasswordToHash(E,"SHA512",O.sheetProtection.saltValue,O.sheetProtection.spinCount)),M&&(O.sheetProtection=Object.assign(O.sheetProtection,M),!E&&"spinCount"in M&&delete O.sheetProtection.spinCount),P()})}},{key:"unprotect",value:function(){this.sheetProtection=null}},{key:"addTable",value:function(E){var M=new n(this,E);return this.tables[E.name]=M,M}},{key:"getTable",value:function(E){return this.tables[E]}},{key:"removeTable",value:function(E){delete this.tables[E]}},{key:"getTables",value:function(){return Object.values(this.tables)}},{key:"addConditionalFormatting",value:function(E){this.conditionalFormattings.push(E)}},{key:"removeConditionalFormatting",value:function(E){typeof E=="number"?this.conditionalFormattings.splice(E,1):this.conditionalFormattings=E instanceof Function?this.conditionalFormattings.filter(E):[]}},{key:"_parseRows",value:function(E){var M=this;this._rows=[],E.rows.forEach(function(O){var P=new e(M,O.number);M._rows[P.number-1]=P,P.model=O})}},{key:"_parseMergeCells",value:function(E){var M=this;l.each(E.mergeCells,function(O){M.mergeCellsWithoutStyle(O)})}},{key:"workbook",get:function(){return this._workbook}},{key:"dimensions",get:function(){var E=new i;return this._rows.forEach(function(M){if(M){var O=M.dimensions;O&&E.expand(M.number,O.min,M.number,O.max)}}),E}},{key:"columns",get:function(){return this._columns},set:function(E){var M=this;this._headerRowCount=E.reduce(function(_,S){var g=(S.header?1:S.headers&&S.headers.length)||0;return Math.max(_,g)},0);var O=1,P=this._columns=[];E.forEach(function(_){var S=new t(M,O++,!1);P.push(S),S.defn=_})}},{key:"lastColumn",get:function(){return this.getColumn(this.columnCount)}},{key:"columnCount",get:function(){var E=0;return this.eachRow(function(M){E=Math.max(E,M.cellCount)}),E}},{key:"actualColumnCount",get:function(){var E=[],M=0;return this.eachRow(function(O){O.eachCell(function(P){var _=P.col;E[_]||(E[_]=!0,M++)})}),M}},{key:"_lastRowNumber",get:function(){for(var E=this._rows,M=E.length;M>0&&E[M-1]===void 0;)M--;return M}},{key:"_nextRow",get:function(){return this._lastRowNumber+1}},{key:"lastRow",get:function(){if(this._rows.length)return this._rows[this._rows.length-1]}},{key:"rowCount",get:function(){return this._lastRowNumber}},{key:"actualRowCount",get:function(){var E=0;return this.eachRow(function(){E++}),E}},{key:"hasMerges",get:function(){return l.some(this._merges,Boolean)}},{key:"tabColor",get:function(){return console.trace("worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor"),this.properties.tabColor},set:function(E){console.trace("worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor"),this.properties.tabColor=E}},{key:"model",get:function(){var E={id:this.id,name:this.name,dataValidations:this.dataValidations.model,properties:this.properties,state:this.state,pageSetup:this.pageSetup,headerFooter:this.headerFooter,rowBreaks:this.rowBreaks,views:this.views,autoFilter:this.autoFilter,media:this._media.map(function(P){return P.model}),sheetProtection:this.sheetProtection,tables:Object.values(this.tables).map(function(P){return P.model}),conditionalFormattings:this.conditionalFormattings};E.cols=t.toModel(this.columns);var M=E.rows=[],O=E.dimensions=new i;return this._rows.forEach(function(P){var _=P&&P.model;_&&(O.expand(_.number,_.min,_.number,_.max),M.push(_))}),E.merges=[],l.each(this._merges,function(P){E.merges.push(P.range)}),E},set:function(E){var M=this;this.name=E.name,this._columns=t.fromModel(this,E.cols),this._parseRows(E),this._parseMergeCells(E),this.dataValidations=new a(E.dataValidations),this.properties=E.properties,this.pageSetup=E.pageSetup,this.headerFooter=E.headerFooter,this.views=E.views,this.autoFilter=E.autoFilter,this._media=E.media.map(function(O){return new o(M,O)}),this.sheetProtection=E.sheetProtection,this.tables=E.tables.reduce(function(O,P){var _=new n;return _.model=P,O[P.name]=_,O},{}),this.conditionalFormattings=E.conditionalFormattings}}])&&c(w.prototype,R),y}();I.exports=f},{"../utils/col-cache":19,"../utils/encryptor":20,"../utils/under-dash":25,"./column":4,"./data-validations":5,"./enums":7,"./image":8,"./range":10,"./row":11,"./table":12}],15:[function(d,I,T){d("core-js/modules/es.promise"),d("core-js/modules/es.object.assign"),d("core-js/modules/es.object.keys"),d("core-js/modules/es.object.values"),d("core-js/modules/es.symbol"),d("core-js/modules/es.symbol.async-iterator"),d("core-js/modules/es.array.iterator"),d("core-js/modules/es.array.includes"),d("core-js/modules/es.array.find-index"),d("core-js/modules/es.array.find"),d("core-js/modules/es.string.from-code-point"),d("core-js/modules/es.string.includes"),d("core-js/modules/es.number.is-nan"),d("regenerator-runtime/runtime");var b={Workbook:d("./doc/workbook")},m=d("./doc/enums");Object.keys(m).forEach(function(v){b[v]=m[v]}),I.exports=b},{"./doc/enums":7,"./doc/workbook":13,"core-js/modules/es.array.find":316,"core-js/modules/es.array.find-index":315,"core-js/modules/es.array.includes":317,"core-js/modules/es.array.iterator":318,"core-js/modules/es.number.is-nan":319,"core-js/modules/es.object.assign":320,"core-js/modules/es.object.keys":321,"core-js/modules/es.object.values":322,"core-js/modules/es.promise":323,"core-js/modules/es.string.from-code-point":324,"core-js/modules/es.string.includes":325,"core-js/modules/es.symbol":327,"core-js/modules/es.symbol.async-iterator":326,"regenerator-runtime/runtime":492}],16:[function(d,I,T){var b=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");T.bufferToString=function(m){return typeof m=="string"?m:b?b.decode(m):m.toString()}},{}],17:[function(d,I,T){var b=typeof TextEncoder>"u"?null:new TextEncoder("utf-8"),m=d("buffer").Buffer;T.stringToBuffer=function(v){return typeof v!="string"?v:b?m.from(b.encode(v).buffer):m.from(v)}},{buffer:216}],18:[function(d,I,T){function b(p,c){for(var l=0;l"u"||!(Symbol.iterator in Object(i)))){var t=[],r=!0,o=!1,n=void 0;try{for(var a,u=i[Symbol.iterator]();!(r=(a=u.next()).done)&&(t.push(a.value),!e||t.length!==e);r=!0);}catch(f){o=!0,n=f}finally{try{r||u.return==null||u.return()}finally{if(o)throw n}}return t}}(l,s)||function(i,e){if(i){if(typeof i=="string")return m(i,e);var t=Object.prototype.toString.call(i).slice(8,-1);if(t==="Object"&&i.constructor&&(t=i.constructor.name),t==="Map"||t==="Set")return Array.from(i);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return m(i,e)}}(l,s)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function m(l,s){(s==null||s>l.length)&&(s=l.length);for(var i=0,e=new Array(s);i=4)throw new Error("Out of bounds. Excel supports columns from 1 to 16384");if(this._l2nFill<1&&l>=1){for(;o<=26;)s=this._dictionary[o-1],this._n2l[o]=s,this._l2n[s]=o,o++;this._l2nFill=1}if(this._l2nFill<2&&l>=2){for(o=27;o<=702;)e=(i=o-27)%26,t=Math.floor(i/26),s=this._dictionary[t]+this._dictionary[e],this._n2l[o]=s,this._l2n[s]=o,o++;this._l2nFill=2}if(this._l2nFill<3&&l>=3){for(o=703;o<=16384;)e=(i=o-703)%26,t=Math.floor(i/26)%26,r=Math.floor(i/676),s=this._dictionary[r]+this._dictionary[t]+this._dictionary[e],this._n2l[o]=s,this._l2n[s]=o,o++;this._l2nFill=3}},l2n:function(l){if(this._l2n[l]||this._fill(l.length),!this._l2n[l])throw new Error("Out of bounds. Invalid column letter: ".concat(l));return this._l2n[l]},n2l:function(l){if(l<1||l>16384)throw new Error("".concat(l," is out of bounds. Excel supports columns from 1 to 16384"));return this._n2l[l]||this._fill(this._level(l)),this._n2l[l]},_hash:{},validateAddress:function(l){if(!p.test(l))throw new Error("Invalid Address: ".concat(l));return!0},decodeAddress:function(l){var s=l.length<5&&this._hash[l];if(s)return s;for(var i,e=!1,t="",r=0,o=!1,n="",a=0,u=0;u=65&&i<=90)e=!0,t+=l[u],r=26*r+i-64;else if(i>=48&&i<=57)o=!0,n+=l[u],a=10*a+i-48;else if(o&&e&&i!==36)break;if(e){if(r>16384)throw new Error("Out of bounds. Invalid column letter: ".concat(t))}else r=void 0;o||(a=void 0);var f={address:l=t+n,col:r,row:a,$col$row:"$".concat(t,"$").concat(n)};return r<=100&&a<=100&&(this._hash[l]=f,this._hash[f.$col$row]=f),f},getAddress:function(l,s){if(s){var i=this.n2l(s)+l;return this.decodeAddress(i)}return this.decodeAddress(l)},decode:function(l){var s=l.split(":");if(s.length===2){var i=this.decodeAddress(s[0]),e=this.decodeAddress(s[1]),t={top:Math.min(i.row,e.row),left:Math.min(i.col,e.col),bottom:Math.max(i.row,e.row),right:Math.max(i.col,e.col)};return t.tl=this.n2l(t.left)+t.top,t.br=this.n2l(t.right)+t.bottom,t.dimensions="".concat(t.tl,":").concat(t.br),t}return this.decodeAddress(l)},decodeEx:function(l){var s=l.match(/(?:(?:(?:'((?:[^']|'')*)')|([^'^ !]*))!)?(.*)/),i=s[1]||s[2],e=s[3],t=e.split(":");if(t.length>1){var r=this.decodeAddress(t[0]),o=this.decodeAddress(t[1]),n=Math.min(r.row,o.row),a=Math.min(r.col,o.col),u=Math.max(r.row,o.row),f=Math.max(r.col,o.col);return r=this.n2l(a)+n,o=this.n2l(f)+u,{top:n,left:a,bottom:u,right:f,sheetName:i,tl:{address:r,col:a,row:n,$col$row:"$".concat(this.n2l(a),"$").concat(n),sheetName:i},br:{address:o,col:f,row:u,$col$row:"$".concat(this.n2l(f),"$").concat(u),sheetName:i},dimensions:"".concat(r,":").concat(o)}}if(e.startsWith("#"))return i?{sheetName:i,error:e}:{error:e};var y=this.decodeAddress(e);return i?function(w){for(var R=1;R=e&&a<=r&&u>=t&&u<=o}};I.exports=c},{}],20:[function(d,I,T){(function(b){var m=d("crypto"),v={hash:function(h){for(var p=m.createHash(h),c=arguments.length,l=new Array(c>1?c-1:0),s=1;s3||u.length===3&&u>"XFD")return i;var w=b.l2n(u),R=parseInt(y,10);return a||(w+=s.col-l.col),f||(R+=s.row-l.row),(e||"")+(a||"")+b.n2l(w)+(f||"")+R}return i})}}},{"./col-cache":19}],23:[function(d,I,T){(function(b,m){function v(u,f,y,w,R,E,M){try{var O=u[E](M),P=O.value}catch(_){return void y(_)}O.done?f(P):Promise.resolve(P).then(w,R)}function h(u){return function(){var f=this,y=arguments;return new Promise(function(w,R){var E=u.apply(f,y);function M(P){v(E,w,R,M,O,"next",P)}function O(P){v(E,w,R,M,O,"throw",P)}M(void 0)})}}function p(u,f){if(!(u instanceof f))throw new TypeError("Cannot call a class as a function")}function c(u,f){for(var y=0;y=this.length?(y=this.toBuffer(),this.iRead=this.iWrite,y):(y=m.alloc(f),this.buffer.copy(y,0,this.iRead,f),this.iRead+=f,y)}},{key:"write",value:function(f,y,w){var R=Math.min(w,this.size-this.iWrite);return f.copy(this.buffer,this.iWrite,y,y+R),this.iWrite+=R,R}},{key:"length",get:function(){return this.iWrite-this.iRead}},{key:"eod",get:function(){return this.iRead===this.iWrite}},{key:"full",get:function(){return this.iWrite===this.size}}]),u}(),a=function(u){u=u||{},this.bufSize=u.bufSize||1048576,this.buffers=[],this.batch=u.batch||!1,this.corked=!1,this.inPos=0,this.outPos=0,this.pipes=[],this.paused=!1,this.encoding=null};i.inherits(a,s.Duplex,{toBuffer:function(){switch(this.buffers.length){case 0:return null;case 1:return this.buffers[0].toBuffer();default:return m.concat(this.buffers.map(function(u){return u.toBuffer()}))}},_getWritableBuffer:function(){if(this.buffers.length){var u=this.buffers[this.buffers.length-1];if(!u.full)return u}var f=new n(this.bufSize);return this.buffers.push(f),f},_pipe:function(u){var f=this;return h(regeneratorRuntime.mark(function y(){var w;return regeneratorRuntime.wrap(function(R){for(;;)switch(R.prev=R.next){case 0:return w=function(E){return new Promise(function(M){E.write(u.toBuffer(),function(){M()})})},R.next=3,Promise.all(f.pipes.map(w));case 3:case"end":return R.stop()}},y)}))()},_writeToBuffers:function(u){for(var f=0,y=u.length;f1;)w._pipe(w.buffers.shift());M.next=29;break;case 21:if(w.corked){M.next=27;break}return M.next=24,w._pipe(E);case 24:y(),M.next=29;break;case 27:w._writeToBuffers(E),b.nextTick(y);case 29:M.next=34;break;case 31:w.paused||w.emit("data",E.toBuffer()),w._writeToBuffers(E),w.emit("readable");case 34:return M.abrupt("return",!0);case 35:case"end":return M.stop()}},R)}))()},cork:function(){this.corked=!0},_flush:function(){if(this.pipes.length)for(;this.buffers.length;)this._pipe(this.buffers.shift())},uncork:function(){this.corked=!1,this._flush()},end:function(u,f,y){var w=this,R=function(E){E?y(E):(w._flush(),w.pipes.forEach(function(M){M.end()}),w.emit("finish"))};u?this.write(u,f,R):R()},read:function(u){var f;if(u){for(f=[];u&&this.buffers.length&&!this.buffers[0].eod;){var y=this.buffers[0],w=y.read(u);u-=w.length,f.push(w),y.eod&&y.full&&this.buffers.shift()}return m.concat(f)}return f=this.buffers.map(function(R){return R.toBuffer()}).filter(Boolean),this.buffers=[],m.concat(f)},setEncoding:function(u){this.encoding=u},pause:function(){this.paused=!0},resume:function(){this.paused=!1},isPaused:function(){return!!this.paused},pipe:function(u){this.pipes.push(u),!this.paused&&this.buffers.length&&this.end()},unpipe:function(u){this.pipes=this.pipes.filter(function(f){return f!==u})},unshift:function(){throw new Error("Not Implemented")},wrap:function(){throw new Error("Not Implemented")}}),I.exports=a}).call(this,d("_process"),d("buffer").Buffer)},{"./string-buf":24,"./utils":26,_process:467,buffer:216,"readable-stream":491}],24:[function(d,I,T){(function(b){function m(h,p){for(var c=0;c=this._buf.length-4;)this._grow(this._inPos+l.length),s=this._inPos+this._buf.write(l,this._inPos,this._encoding);this._inPos=s}},{key:"addStringBuf",value:function(l){l.length&&(this._buffer=void 0,this.length+l.length>this.capacity&&this._grow(this.length+l.length),l._buf.copy(this._buf,this._inPos,0,l.length),this._inPos+=l.length)}},{key:"length",get:function(){return this._inPos}},{key:"capacity",get:function(){return this._buf.length}},{key:"buffer",get:function(){return this._buf}}])&&m(p.prototype,c),h}();I.exports=v}).call(this,d("buffer").Buffer)},{buffer:216}],25:[function(d,I,T){function b(p){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c})(p)}var m=Object.prototype.toString,v=/["&<>]/,h={each:function(p,c){p&&(Array.isArray(p)?p.forEach(c):Object.keys(p).forEach(function(l){c(p[l],l)}))},some:function(p,c){return!!p&&(Array.isArray(p)?p.some(c):Object.keys(p).some(function(l){return c(p[l],l)}))},every:function(p,c){return!p||(Array.isArray(p)?p.every(c):Object.keys(p).every(function(l){return c(p[l],l)}))},map:function(p,c){return p?Array.isArray(p)?p.map(c):Object.keys(p).map(function(l){return c(p[l],l)}):[]},keyBy:function(p,c){return p.reduce(function(l,s){return l[s[c]]=s,l},{})},isEqual:function(p,c){var l=b(p),s=b(c),i=Array.isArray(p),e=Array.isArray(c);if(l!==s)return!1;switch(b(p)){case"object":return i||e?!(!i||!e)&&p.length===c.length&&p.every(function(t,r){var o=c[r];return h.isEqual(t,o)}):h.every(p,function(t,r){var o=c[r];return h.isEqual(t,o)});default:return p===c}},escapeHtml:function(p){var c=v.exec(p);if(!c)return p;for(var l="",s="",i=0,e=c.index;e":s=">";break;default:continue}i!==e&&(l+=p.substring(i,e)),i=e+1,l+=s}return i!==e?l+p.substring(i,e):l},strcmp:function(p,c){return pc?1:0},isUndefined:function(p){return m.call(p)==="[object Undefined]"},isObject:function(p){return m.call(p)==="[object Object]"},deepMerge:function(){var p,c,l,s=arguments[0]||{},i=arguments.length;function e(r,o){p=s[o],l=Array.isArray(r),h.isObject(r)||l?(l?(l=!1,c=p&&Array.isArray(p)?p:[]):c=p&&h.isObject(p)?p:{},s[o]=h.deepMerge(c,r)):h.isUndefined(r)||(s[o]=r)}for(var t=0;t&'"\x7F\x00-\x08\x0B-\x0C\x0E-\x1F]/,p={nop:function(){},promiseImmediate:function(c){return new Promise(function(l){b.setImmediate?m(function(){l(c)}):setTimeout(function(){l(c)},1)})},inherits:function(c,l,s,i){c.super_=l,i||(i=s,s=null),s&&Object.keys(s).forEach(function(t){Object.defineProperty(c,t,Object.getOwnPropertyDescriptor(s,t))});var e={constructor:{value:c,enumerable:!1,writable:!1,configurable:!0}};i&&Object.keys(i).forEach(function(t){e[t]=Object.getOwnPropertyDescriptor(i,t)}),c.prototype=Object.create(l.prototype,e)},dateToExcel:function(c,l){return 25569+c.getTime()/864e5-(l?1462:0)},excelToDate:function(c,l){var s=Math.round(24*(c-25569+(l?1462:0))*3600*1e3);return new Date(s)},parsePath:function(c){var l=c.lastIndexOf("/");return{path:c.substring(0,l),name:c.substring(l+1)}},getRelsPath:function(c){var l=p.parsePath(c);return"".concat(l.path,"/_rels/").concat(l.name,".rels")},xmlEncode:function(c){var l=h.exec(c);if(!l)return c;for(var s="",i="",e=0,t=l.index;t=11&&r!==13)){i="";break}continue}e!==t&&(s+=c.substring(e,t)),e=t+1,i&&(s+=i)}return e!==t?s+c.substring(e,t):s},xmlDecode:function(c){return c.replace(/&([a-z]*);/g,function(l){switch(l){case"<":return"<";case">":return">";case"&":return"&";case"'":return"'";case""":return'"';default:return l}})},validInt:function(c){var l=parseInt(c,10);return Number.isNaN(l)?0:l},isDateFmt:function(c){return!!c&&(c=(c=c.replace(/\[[^\]]*]/g,"")).replace(/"[^"]*"/g,"")).match(/[ymdhMsb]+/)!==null},fs:{exists:function(c){return new Promise(function(l){v.access(c,v.constants.F_OK,function(s){l(!s)})})}},toIsoDateString:function(c){return c.toIsoString().subsstr(0,10)}};I.exports=p}).call(this,typeof Qe<"u"?Qe:typeof self<"u"?self:typeof window<"u"?window:{},d("timers").setImmediate)},{fs:215,timers:521}],27:[function(d,I,T){function b(l,s){for(var i=0;i `)}},{key:"openNode",value:function(e,t){var r=this.tos,o=this._xml;r&&this.open&&o.push(">"),this._stack.push(e),o.push("<"),o.push(e),p(o,t),this.leaf=!0,this.open=!0}},{key:"addAttribute",value:function(e,t){if(!this.open)throw new Error("Cannot write attributes to node if it is not open");t!==void 0&&h(this._xml,e,t)}},{key:"addAttributes",value:function(e){if(!this.open)throw new Error("Cannot write attributes to node if it is not open");p(this._xml,e)}},{key:"writeText",value:function(e){var t=this._xml;this.open&&(t.push(">"),this.open=!1),this.leaf=!1,t.push(v.xmlEncode(e.toString()))}},{key:"writeXml",value:function(e){this.open&&(this._xml.push(">"),this.open=!1),this.leaf=!1,this._xml.push(e)}},{key:"closeNode",value:function(){var e=this._stack.pop(),t=this._xml;this.leaf?t.push("/>"):(t.push("")),this.open=!1,this.leaf=!1}},{key:"leafNode",value:function(e,t,r){this.openNode(e,t),r!==void 0&&this.writeText(r),this.closeNode()}},{key:"closeAll",value:function(){for(;this._stack.length;)this.closeNode()}},{key:"addRollback",value:function(){return this._rollbacks.push({xml:this._xml.length,stack:this._stack.length,leaf:this.leaf,open:this.open}),this.cursor}},{key:"commit",value:function(){this._rollbacks.pop()}},{key:"rollback",value:function(){var e=this._rollbacks.pop();this._xml.length>e.xml&&this._xml.splice(e.xml,this._xml.length-e.xml),this._stack.length>e.stack&&this._stack.splice(e.stack,this._stack.length-e.stack),this.leaf=e.leaf,this.open=e.open}},{key:"tos",get:function(){return this._stack.length?this._stack[this._stack.length-1]:void 0}},{key:"cursor",get:function(){return this._xml.length}},{key:"xml",get:function(){return this.closeAll(),this._xml.join("")}}])&&b(s.prototype,i),l}();c.StdDocAttributes={version:"1.0",encoding:"UTF-8",standalone:"yes"},I.exports=c},{"./under-dash":25,"./utils":26}],28:[function(d,I,T){(function(b){function m(n){return(m=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a})(n)}function v(n,a,u,f,y,w,R){try{var E=n[w](R),M=E.value}catch(O){return void u(O)}E.done?a(M):Promise.resolve(M).then(f,y)}function h(n,a){for(var u=0;u"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var u,f=s(n);if(a){var y=s(this).constructor;u=Reflect.construct(f,arguments,y)}else u=f.apply(this,arguments);return l(this,u)}}function l(n,a){return!a||m(a)!=="object"&&typeof a!="function"?function(u){if(u===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return u}(n):a}function s(n){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(a){return a.__proto__||Object.getPrototypeOf(a)})(n)}var i=d("events"),e=d("jszip"),t=d("./stream-buf"),r=d("./browser-buffer-encode").stringToBuffer,o=function(n){(function(E,M){if(typeof M!="function"&&M!==null)throw new TypeError("Super expression must either be null or a function");E.prototype=Object.create(M&&M.prototype,{constructor:{value:E,writable:!0,configurable:!0}}),M&&p(E,M)})(R,n);var a,u,f,y,w=c(R);function R(E){var M;return function(O,P){if(!(O instanceof P))throw new TypeError("Cannot call a class as a function")}(this,R),(M=w.call(this)).options=Object.assign({type:"nodebuffer",compression:"DEFLATE"},E),M.zip=new e,M.stream=new t,M}return a=R,(u=[{key:"append",value:function(E,M){M.hasOwnProperty("base64")&&M.base64?this.zip.file(M.name,E,{base64:!0}):(b.browser&&typeof E=="string"&&(E=r(E)),this.zip.file(M.name,E))}},{key:"finalize",value:(f=regeneratorRuntime.mark(function E(){var M;return regeneratorRuntime.wrap(function(O){for(;;)switch(O.prev=O.next){case 0:return O.next=2,this.zip.generateAsync(this.options);case 2:M=O.sent,this.stream.end(M),this.emit("finish");case 5:case"end":return O.stop()}},E,this)}),y=function(){var E=this,M=arguments;return new Promise(function(O,P){var _=f.apply(E,M);function S(j){v(_,O,P,S,g,"next",j)}function g(j){v(_,O,P,S,g,"throw",j)}S(void 0)})},function(){return y.apply(this,arguments)})},{key:"read",value:function(E){return this.stream.read(E)}},{key:"setEncoding",value:function(E){return this.stream.setEncoding(E)}},{key:"pause",value:function(){return this.stream.pause()}},{key:"resume",value:function(){return this.stream.resume()}},{key:"isPaused",value:function(){return this.stream.isPaused()}},{key:"pipe",value:function(E,M){return this.stream.pipe(E,M)}},{key:"unpipe",value:function(E){return this.stream.unpipe(E)}},{key:"unshift",value:function(E){return this.stream.unshift(E)}},{key:"wrap",value:function(E){return this.stream.wrap(E)}}])&&h(a.prototype,u),R}(i.EventEmitter);I.exports={ZipWriter:o}}).call(this,d("_process"))},{"./browser-buffer-encode":17,"./stream-buf":23,_process:467,events:367,jszip:399}],29:[function(d,I,T){I.exports={0:{f:"General"},1:{f:"0"},2:{f:"0.00"},3:{f:"#,##0"},4:{f:"#,##0.00"},9:{f:"0%"},10:{f:"0.00%"},11:{f:"0.00E+00"},12:{f:"# ?/?"},13:{f:"# ??/??"},14:{f:"mm-dd-yy"},15:{f:"d-mmm-yy"},16:{f:"d-mmm"},17:{f:"mmm-yy"},18:{f:"h:mm AM/PM"},19:{f:"h:mm:ss AM/PM"},20:{f:"h:mm"},21:{f:"h:mm:ss"},22:{f:'m/d/yy "h":mm'},27:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"年"m"月"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"年" mm"月" dd"日"'},28:{"zh-tw":'[$-404]e"年"m"月"d"日"',"zh-cn":'m"月"d"日"',"ja-jp":'[$-411]ggge"年"m"月"d"日"',"ko-kr":"mm-dd"},29:{"zh-tw":'[$-404]e"年"m"月"d"日"',"zh-cn":'m"月"d"日"',"ja-jp":'[$-411]ggge"年"m"月"d"日"',"ko-kr":"mm-dd"},30:{"zh-tw":"m/d/yy ","zh-cn":"m-d-yy","ja-jp":"m/d/yy","ko-kr":"mm-dd-yy"},31:{"zh-tw":'yyyy"年"m"月"d"日"',"zh-cn":'yyyy"年"m"月"d"日"',"ja-jp":'yyyy"年"m"月"d"日"',"ko-kr":'yyyy"년" mm"월" dd"일"'},32:{"zh-tw":'hh"時"mm"分"',"zh-cn":'h"时"mm"分"',"ja-jp":'h"時"mm"分"',"ko-kr":'h"시" mm"분"'},33:{"zh-tw":'hh"時"mm"分"ss"秒"',"zh-cn":'h"时"mm"分"ss"秒"',"ja-jp":'h"時"mm"分"ss"秒"',"ko-kr":'h"시" mm"분" ss"초"'},34:{"zh-tw":'上午/下午 hh"時"mm"分"',"zh-cn":'上午/下午 h"时"mm"分"',"ja-jp":'yyyy"年"m"月"',"ko-kr":"yyyy-mm-dd"},35:{"zh-tw":'上午/下午 hh"時"mm"分"ss"秒"',"zh-cn":'上午/下午 h"时"mm"分"ss"秒"',"ja-jp":'m"月"d"日"',"ko-kr":"yyyy-mm-dd"},36:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"年"m"月"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"年" mm"月" dd"日"'},37:{f:"#,##0 ;(#,##0)"},38:{f:"#,##0 ;[Red](#,##0)"},39:{f:"#,##0.00 ;(#,##0.00)"},40:{f:"#,##0.00 ;[Red](#,##0.00)"},45:{f:"mm:ss"},46:{f:"[h]:mm:ss"},47:{f:"mmss.0"},48:{f:"##0.0E+0"},49:{f:"@"},50:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"年"m"月"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"年" mm"月" dd"日"'},51:{"zh-tw":'[$-404]e"年"m"月"d"日"',"zh-cn":'m"月"d"日"',"ja-jp":'[$-411]ggge"年"m"月"d"日"',"ko-kr":"mm-dd"},52:{"zh-tw":'上午/下午 hh"時"mm"分"',"zh-cn":'yyyy"年"m"月"',"ja-jp":'yyyy"年"m"月"',"ko-kr":"yyyy-mm-dd"},53:{"zh-tw":'上午/下午 hh"時"mm"分"ss"秒"',"zh-cn":'m"月"d"日"',"ja-jp":'m"月"d"日"',"ko-kr":"yyyy-mm-dd"},54:{"zh-tw":'[$-404]e"年"m"月"d"日"',"zh-cn":'m"月"d"日"',"ja-jp":'[$-411]ggge"年"m"月"d"日"',"ko-kr":"mm-dd"},55:{"zh-tw":'上午/下午 hh"時"mm"分"',"zh-cn":'上午/下午 h"时"mm"分"',"ja-jp":'yyyy"年"m"月"',"ko-kr":"yyyy-mm-dd"},56:{"zh-tw":'上午/下午 hh"時"mm"分"ss"秒"',"zh-cn":'上午/下午 h"时"mm"分"ss"秒"',"ja-jp":'m"月"d"日"',"ko-kr":"yyyy-mm-dd"},57:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"年"m"月"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"年" mm"月" dd"日"'},58:{"zh-tw":'[$-404]e"年"m"月"d"日"',"zh-cn":'m"月"d"日"',"ja-jp":'[$-411]ggge"年"m"月"d"日"',"ko-kr":"mm-dd"},59:{"th-th":"t0"},60:{"th-th":"t0.00"},61:{"th-th":"t#,##0"},62:{"th-th":"t#,##0.00"},67:{"th-th":"t0%"},68:{"th-th":"t0.00%"},69:{"th-th":"t# ?/?"},70:{"th-th":"t# ??/??"},81:{"th-th":"d/m/bb"}}},{}],30:[function(d,I,T){I.exports={OfficeDocument:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",Worksheet:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet",CalcChain:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/calcChain",SharedStrings:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings",Styles:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",Theme:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",Hyperlink:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",Image:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",CoreProperties:"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",ExtenderProperties:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",Comments:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments",VmlDrawing:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing",Table:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/table"}},{}],31:[function(d,I,T){function b(e,t){var r;if(typeof Symbol>"u"||e[Symbol.iterator]==null){if(Array.isArray(e)||(r=function(y,w){if(y){if(typeof y=="string")return m(y,w);var R=Object.prototype.toString.call(y).slice(8,-1);if(R==="Object"&&y.constructor&&(R=y.constructor.name),R==="Map"||R==="Set")return Array.from(y);if(R==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(R))return m(y,w)}}(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var o=0,n=function(){};return{s:n,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(y){throw y},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,u=!0,f=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var y=r.next();return u=y.done,y},e:function(y){f=!0,a=y},f:function(){try{u||r.return==null||r.return()}finally{if(f)throw a}}}}function m(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r2&&arguments[2]!==void 0&&arguments[2];if(u===void 0){if(y)return f}else if(y||u!==f)return u.toString()}},{key:"toStringAttribute",value:function(u,f){var y=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return e.toAttribute(u,f,y)}},{key:"toStringValue",value:function(u,f){return u===void 0?f:u}},{key:"toBoolAttribute",value:function(u,f){var y=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(u===void 0){if(y)return f}else if(y||u!==f)return u?"1":"0"}},{key:"toBoolValue",value:function(u,f){return u===void 0?f:u==="1"}},{key:"toIntAttribute",value:function(u,f){var y=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return e.toAttribute(u,f,y)}},{key:"toIntValue",value:function(u,f){return u===void 0?f:parseInt(u,10)}},{key:"toFloatAttribute",value:function(u,f){var y=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return e.toAttribute(u,f,y)}},{key:"toFloatValue",value:function(u,f){return u===void 0?f:parseFloat(u)}}],r&&p(t.prototype,r),o&&p(t,o),e}();I.exports=i},{"../../utils/parse-sax":21,"../../utils/xml-stream":27}],32:[function(d,I,T){function b(o){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(o)}function m(o,n){if(!(o instanceof n))throw new TypeError("Cannot call a class as a function")}function v(o,n){for(var a=0;a"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var a,u=l(o);if(n){var f=l(this).constructor;a=Reflect.construct(u,arguments,f)}else a=u.apply(this,arguments);return c(this,a)}}function c(o,n){return!n||b(n)!=="object"&&typeof n!="function"?function(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}(o):n}function l(o){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)})(o)}var s=d("../base-xform"),i=d("../../../utils/col-cache"),e=function(o){(function(y,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function");y.prototype=Object.create(w&&w.prototype,{constructor:{value:y,writable:!0,configurable:!0}}),w&&h(y,w)})(f,o);var n,a,u=p(f);function f(){return m(this,f),u.apply(this,arguments)}return n=f,(a=[{key:"render",value:function(y,w){y.openNode("definedName",{name:w.name,localSheetId:w.localSheetId}),y.writeText(w.ranges.join(",")),y.closeNode()}},{key:"parseOpen",value:function(y){switch(y.name){case"definedName":return this._parsedName=y.attributes.name,this._parsedLocalSheetId=y.attributes.localSheetId,this._parsedText=[],!0;default:return!1}}},{key:"parseText",value:function(y){this._parsedText.push(y)}},{key:"parseClose",value:function(){return this.model={name:this._parsedName,ranges:r(this._parsedText.join(""))},this._parsedLocalSheetId!==void 0&&(this.model.localSheetId=parseInt(this._parsedLocalSheetId,10)),!1}}])&&v(n.prototype,a),f}(s);function t(o){try{return i.decodeEx(o),!0}catch{return!1}}function r(o){var n=[],a=!1,u="";return o.split(",").forEach(function(f){if(f){var y=(f.match(/'/g)||[]).length;if(y){var w=y%2==0;!a&&w&&t(f)?n.push(f):a&&!w?(a=!1,t(u+f)&&n.push(u+f),u=""):(a=!0,u+="".concat(f,","))}else a?u+="".concat(f,","):t(f)&&n.push(f)}}),n}I.exports=e},{"../../../utils/col-cache":19,"../base-xform":31}],33:[function(d,I,T){function b(e){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var r,o=l(e);if(t){var n=l(this).constructor;r=Reflect.construct(o,arguments,n)}else r=o.apply(this,arguments);return c(this,r)}}function c(e,t){return!t||b(t)!=="object"&&typeof t!="function"?function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(e):t}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(e)}var s=d("../../../utils/utils"),i=function(e){(function(a,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(u&&u.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),u&&h(a,u)})(n,e);var t,r,o=p(n);function n(){return m(this,n),o.apply(this,arguments)}return t=n,(r=[{key:"render",value:function(a,u){a.leafNode("sheet",{sheetId:u.id,name:u.name,state:u.state,"r:id":u.rId})}},{key:"parseOpen",value:function(a){return a.name==="sheet"&&(this.model={name:s.xmlDecode(a.attributes.name),id:parseInt(a.attributes.sheetId,10),state:a.attributes.state,rId:a.attributes["r:id"]},!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}}])&&v(t.prototype,r),n}(d("../base-xform"));I.exports=i},{"../../../utils/utils":26,"../base-xform":31}],34:[function(d,I,T){function b(i){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(i)}function m(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function v(i,e){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var t,r=l(i);if(e){var o=l(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return c(this,t)}}function c(i,e){return!e||b(e)!=="object"&&typeof e!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(i):e}function l(i){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(i)}var s=function(i){(function(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(a&&a.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),a&&h(n,a)})(o,i);var e,t,r=p(o);function o(){return m(this,o),r.apply(this,arguments)}return e=o,(t=[{key:"render",value:function(n,a){n.leafNode("calcPr",{calcId:171027,fullCalcOnLoad:a.fullCalcOnLoad?1:void 0})}},{key:"parseOpen",value:function(n){return n.name==="calcPr"&&(this.model={},!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}}])&&v(e.prototype,t),o}(d("../base-xform"));I.exports=s},{"../base-xform":31}],35:[function(d,I,T){function b(i){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(i)}function m(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function v(i,e){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var t,r=l(i);if(e){var o=l(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return c(this,t)}}function c(i,e){return!e||b(e)!=="object"&&typeof e!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(i):e}function l(i){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(i)}var s=function(i){(function(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(a&&a.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),a&&h(n,a)})(o,i);var e,t,r=p(o);function o(){return m(this,o),r.apply(this,arguments)}return e=o,(t=[{key:"render",value:function(n,a){n.leafNode("workbookPr",{date1904:a.date1904?1:void 0,defaultThemeVersion:164011,filterPrivacy:1})}},{key:"parseOpen",value:function(n){return n.name==="workbookPr"&&(this.model={date1904:n.attributes.date1904==="1"},!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}}])&&v(e.prototype,t),o}(d("../base-xform"));I.exports=s},{"../base-xform":31}],36:[function(d,I,T){function b(i){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(i)}function m(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function v(i,e){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var t,r=l(i);if(e){var o=l(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return c(this,t)}}function c(i,e){return!e||b(e)!=="object"&&typeof e!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(i):e}function l(i){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(i)}var s=function(i){(function(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(a&&a.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),a&&h(n,a)})(o,i);var e,t,r=p(o);function o(){return m(this,o),r.apply(this,arguments)}return e=o,(t=[{key:"render",value:function(n,a){var u={xWindow:a.x||0,yWindow:a.y||0,windowWidth:a.width||12e3,windowHeight:a.height||24e3,firstSheet:a.firstSheet,activeTab:a.activeTab};a.visibility&&a.visibility!=="visible"&&(u.visibility=a.visibility),n.leafNode("workbookView",u)}},{key:"parseOpen",value:function(n){if(n.name==="workbookView"){var a=this.model={},u=function(E,M,O){var P=M!==void 0?a[E]=parseInt(M,10):O;P!==void 0&&(a[E]=P)};return u("x",n.attributes.xWindow,0),u("y",n.attributes.yWindow,0),u("width",n.attributes.windowWidth,25e3),u("height",n.attributes.windowHeight,1e4),f="visibility",y=n.attributes.visibility,w="visible",(R=y!==void 0?a[f]=y:w)!==void 0&&(a[f]=R),u("activeTab",n.attributes.activeTab,void 0),u("firstSheet",n.attributes.firstSheet,void 0),!0}var f,y,w,R;return!1}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}}])&&v(e.prototype,t),o}(d("../base-xform"));I.exports=s},{"../base-xform":31}],37:[function(d,I,T){function b(w){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(R){return typeof R}:function(R){return R&&typeof Symbol=="function"&&R.constructor===Symbol&&R!==Symbol.prototype?"symbol":typeof R})(w)}function m(w,R){for(var E=0;E"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var E,M=c(w);if(R){var O=c(this).constructor;E=Reflect.construct(M,arguments,O)}else E=M.apply(this,arguments);return p(this,E)}}function p(w,R){return!R||b(R)!=="object"&&typeof R!="function"?function(E){if(E===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E}(w):R}function c(w){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(R){return R.__proto__||Object.getPrototypeOf(R)})(w)}var l=d("../../../utils/under-dash"),s=d("../../../utils/col-cache"),i=d("../../../utils/xml-stream"),e=d("../base-xform"),t=d("../static-xform"),r=d("../list-xform"),o=d("./defined-name-xform"),n=d("./sheet-xform"),a=d("./workbook-view-xform"),u=d("./workbook-properties-xform"),f=d("./workbook-calc-properties-xform"),y=function(w){(function(P,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");P.prototype=Object.create(_&&_.prototype,{constructor:{value:P,writable:!0,configurable:!0}}),_&&v(P,_)})(O,w);var R,E,M=h(O);function O(){var P;return function(_,S){if(!(_ instanceof S))throw new TypeError("Cannot call a class as a function")}(this,O),(P=M.call(this)).map={fileVersion:O.STATIC_XFORMS.fileVersion,workbookPr:new u,bookViews:new r({tag:"bookViews",count:!1,childXform:new a}),sheets:new r({tag:"sheets",count:!1,childXform:new n}),definedNames:new r({tag:"definedNames",count:!1,childXform:new o}),calcPr:new f},P}return R=O,(E=[{key:"prepare",value:function(P){P.sheets=P.worksheets;var _=[],S=0;P.sheets.forEach(function(g){if(g.pageSetup&&g.pageSetup.printArea&&g.pageSetup.printArea.split("&&").forEach(function(D){var F=D.split(":"),B={name:"_xlnm.Print_Area",ranges:["'".concat(g.name,"'!$").concat(F[0],":$").concat(F[1])],localSheetId:S};_.push(B)}),g.pageSetup&&(g.pageSetup.printTitlesRow||g.pageSetup.printTitlesColumn)){var j=[];if(g.pageSetup.printTitlesColumn){var k=g.pageSetup.printTitlesColumn.split(":");j.push("'".concat(g.name,"'!$").concat(k[0],":$").concat(k[1]))}if(g.pageSetup.printTitlesRow){var x=g.pageSetup.printTitlesRow.split(":");j.push("'".concat(g.name,"'!$").concat(x[0],":$").concat(x[1]))}var C={name:"_xlnm.Print_Titles",ranges:j,localSheetId:S};_.push(C)}S++}),_.length&&(P.definedNames=P.definedNames.concat(_)),(P.media||[]).forEach(function(g,j){g.name=g.type+(j+1)})}},{key:"render",value:function(P,_){P.openXml(i.StdDocAttributes),P.openNode("workbook",O.WORKBOOK_ATTRIBUTES),this.map.fileVersion.render(P),this.map.workbookPr.render(P,_.properties),this.map.bookViews.render(P,_.views),this.map.sheets.render(P,_.sheets),this.map.definedNames.render(P,_.definedNames),this.map.calcPr.render(P,_.calcProperties),P.closeNode()}},{key:"parseOpen",value:function(P){if(this.parser)return this.parser.parseOpen(P),!0;switch(P.name){case"workbook":return!0;default:return this.parser=this.map[P.name],this.parser&&this.parser.parseOpen(P),!0}}},{key:"parseText",value:function(P){this.parser&&this.parser.parseText(P)}},{key:"parseClose",value:function(P){if(this.parser)return this.parser.parseClose(P)||(this.parser=void 0),!0;switch(P){case"workbook":return this.model={sheets:this.map.sheets.model,properties:this.map.workbookPr.model||{},views:this.map.bookViews.model,calcProperties:{}},this.map.definedNames.model&&(this.model.definedNames=this.map.definedNames.model),!1;default:return!0}}},{key:"reconcile",value:function(P){var _,S=(P.workbookRels||[]).reduce(function(x,C){return x[C.Id]=C,x},{}),g=[],j=0;(P.sheets||[]).forEach(function(x){var C=S[x.rId];C&&(_=P.worksheetHash["xl/".concat(C.Target.replace(/^(\s|\/xl\/)+/,""))])&&(_.name=x.name,_.id=x.id,_.state=x.state,g[j++]=_)});var k=[];l.each(P.definedNames,function(x){if(x.name==="_xlnm.Print_Area"){if(_=g[x.localSheetId]){_.pageSetup||(_.pageSetup={});var C=s.decodeEx(x.ranges[0]);_.pageSetup.printArea=_.pageSetup.printArea?"".concat(_.pageSetup.printArea,"&&").concat(C.dimensions):C.dimensions}}else if(x.name==="_xlnm.Print_Titles"){if(_=g[x.localSheetId]){_.pageSetup||(_.pageSetup={});var D=x.ranges.join(","),F=/\$/g,B=D.match(/\$\d+:\$\d+/);if(B&&B.length){var U=B[0];_.pageSetup.printTitlesRow=U.replace(F,"")}var H=D.match(/\$[A-Z]+:\$[A-Z]+/);if(H&&H.length){var V=H[0];_.pageSetup.printTitlesColumn=V.replace(F,"")}}}else k.push(x)}),P.definedNames=k,P.media.forEach(function(x,C){x.index=C})}}])&&m(R.prototype,E),O}(e);y.WORKBOOK_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"x15","xmlns:x15":"http://schemas.microsoft.com/office/spreadsheetml/2010/11/main"},y.STATIC_XFORMS={fileVersion:new t({tag:"fileVersion",$:{appName:"xl",lastEdited:5,lowestEdited:5,rupBuild:9303}})},I.exports=y},{"../../../utils/col-cache":19,"../../../utils/under-dash":25,"../../../utils/xml-stream":27,"../base-xform":31,"../list-xform":70,"../static-xform":119,"./defined-name-xform":32,"./sheet-xform":33,"./workbook-calc-properties-xform":34,"./workbook-properties-xform":35,"./workbook-view-xform":36}],38:[function(d,I,T){function b(l,s){var i=Object.keys(l);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(l);s&&(e=e.filter(function(t){return Object.getOwnPropertyDescriptor(l,t).enumerable})),i.push.apply(i,e)}return i}function m(l,s,i){return s in l?Object.defineProperty(l,s,{value:i,enumerable:!0,configurable:!0,writable:!0}):l[s]=i,l}var v=d("../strings/rich-text-xform"),h=d("../../../utils/utils"),p=d("../base-xform"),c=I.exports=function(l){this.model=l};h.inherits(c,p,{get tag(){return"r"},get richTextXform(){return this._richTextXform||(this._richTextXform=new v),this._richTextXform},render:function(l,s){var i=this;s=s||this.model,l.openNode("comment",{ref:s.ref,authorId:0}),l.openNode("text"),s&&s.note&&s.note.texts&&s.note.texts.forEach(function(e){i.richTextXform.render(l,e)}),l.closeNode(),l.closeNode()},parseOpen:function(l){if(this.parser)return this.parser.parseOpen(l),!0;switch(l.name){case"comment":return this.model=function(s){for(var i=1;i"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var e,t=c(s);if(i){var r=c(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return p(this,e)}}function p(s,i){return!i||b(i)!=="object"&&typeof i!="function"?function(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(s):i}function c(s){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(i){return i.__proto__||Object.getPrototypeOf(i)})(s)}var l=function(s){(function(o,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(n&&n.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),n&&v(o,n)})(r,s);var i,e,t=h(r);function r(o){var n;return function(a,u){if(!(a instanceof u))throw new TypeError("Cannot call a class as a function")}(this,r),(n=t.call(this))._model=o,n}return i=r,(e=[{key:"render",value:function(o,n,a){(n===a[2]||this.tag==="x:SizeWithCells"&&n===a[1])&&o.leafNode(this.tag)}},{key:"parseOpen",value:function(o){switch(o.name){case this.tag:return this.model={},this.model[this.tag]=!0,!0;default:return!1}}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return this._model&&this._model.tag}}])&&m(i.prototype,e),r}(d("../../base-xform"));I.exports=l},{"../../base-xform":31}],41:[function(d,I,T){function b(s){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i})(s)}function m(s,i){for(var e=0;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var e,t=c(s);if(i){var r=c(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return p(this,e)}}function p(s,i){return!i||b(i)!=="object"&&typeof i!="function"?function(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(s):i}function c(s){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(i){return i.__proto__||Object.getPrototypeOf(i)})(s)}var l=function(s){(function(o,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(n&&n.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),n&&v(o,n)})(r,s);var i,e,t=h(r);function r(o){var n;return function(a,u){if(!(a instanceof u))throw new TypeError("Cannot call a class as a function")}(this,r),(n=t.call(this))._model=o,n}return i=r,(e=[{key:"render",value:function(o,n){o.leafNode(this.tag,null,n)}},{key:"parseOpen",value:function(o){switch(o.name){case this.tag:return this.text="",!0;default:return!1}}},{key:"parseText",value:function(o){this.text=o}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return this._model&&this._model.tag}}])&&m(i.prototype,e),r}(d("../../base-xform"));I.exports=l},{"../../base-xform":31}],42:[function(d,I,T){function b(i){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(i)}function m(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function v(i,e){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var t,r=l(i);if(e){var o=l(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return c(this,t)}}function c(i,e){return!e||b(e)!=="object"&&typeof e!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(i):e}function l(i){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(i)}var s=function(i){(function(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(a&&a.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),a&&h(n,a)})(o,i);var e,t,r=p(o);function o(){return m(this,o),r.apply(this,arguments)}return e=o,(t=[{key:"getAnchorRect",value:function(n){var a=Math.floor(n.left),u=Math.floor(68*(n.left-a)),f=Math.floor(n.top),y=Math.floor(18*(n.top-f)),w=Math.floor(n.right),R=Math.floor(68*(n.right-w)),E=Math.floor(n.bottom);return[a,u,f,y,w,R,E,Math.floor(18*(n.bottom-E))]}},{key:"getDefaultRect",value:function(n){var a=n.col,u=Math.max(n.row-2,0);return[a,6,u,14,a+2,2,u+4,16]}},{key:"render",value:function(n,a){var u=a.anchor?this.getAnchorRect(a.anchor):this.getDefaultRect(a.refAddress);n.leafNode("x:Anchor",null,u.join(", "))}},{key:"parseOpen",value:function(n){switch(n.name){case this.tag:return this.text="",!0;default:return!1}}},{key:"parseText",value:function(n){this.text=n}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"x:Anchor"}}])&&v(e.prototype,t),o}(d("../base-xform"));I.exports=s},{"../base-xform":31}],43:[function(d,I,T){function b(o){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(o)}function m(o,n){for(var a=0;a"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var a,u=c(o);if(n){var f=c(this).constructor;a=Reflect.construct(u,arguments,f)}else a=u.apply(this,arguments);return p(this,a)}}function p(o,n){return!n||b(n)!=="object"&&typeof n!="function"?function(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}(o):n}function c(o){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)})(o)}var l=d("../base-xform"),s=d("./vml-anchor-xform"),i=d("./style/vml-protection-xform"),e=d("./style/vml-position-xform"),t=["twoCells","oneCells","absolute"],r=function(o){(function(y,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function");y.prototype=Object.create(w&&w.prototype,{constructor:{value:y,writable:!0,configurable:!0}}),w&&v(y,w)})(f,o);var n,a,u=h(f);function f(){var y;return function(w,R){if(!(w instanceof R))throw new TypeError("Cannot call a class as a function")}(this,f),(y=u.call(this)).map={"x:Anchor":new s,"x:Locked":new i({tag:"x:Locked"}),"x:LockText":new i({tag:"x:LockText"}),"x:SizeWithCells":new e({tag:"x:SizeWithCells"}),"x:MoveWithCells":new e({tag:"x:MoveWithCells"})},y}return n=f,(a=[{key:"render",value:function(y,w){var R=w.note,E=R.protection,M=R.editAs;y.openNode(this.tag,{ObjectType:"Note"}),this.map["x:MoveWithCells"].render(y,M,t),this.map["x:SizeWithCells"].render(y,M,t),this.map["x:Anchor"].render(y,w),this.map["x:Locked"].render(y,E.locked),y.leafNode("x:AutoFill",null,"False"),this.map["x:LockText"].render(y,E.lockText),y.leafNode("x:Row",null,w.refAddress.row-1),y.leafNode("x:Column",null,w.refAddress.col-1),y.closeNode()}},{key:"parseOpen",value:function(y){switch(y.name){case this.tag:this.reset(),this.model={anchor:[],protection:{},editAs:""};break;default:this.parser=this.map[y.name],this.parser&&this.parser.parseOpen(y)}return!0}},{key:"parseText",value:function(y){this.parser&&this.parser.parseText(y)}},{key:"parseClose",value:function(y){if(this.parser)return this.parser.parseClose(y)||(this.parser=void 0),!0;switch(y){case this.tag:return this.normalizeModel(),!1;default:return!0}}},{key:"normalizeModel",value:function(){var y=Object.assign({},this.map["x:MoveWithCells"].model,this.map["x:SizeWithCells"].model),w=Object.keys(y).length;this.model.editAs=t[w],this.model.anchor=this.map["x:Anchor"].text,this.model.protection.locked=this.map["x:Locked"].text,this.model.protection.lockText=this.map["x:LockText"].text}},{key:"tag",get:function(){return"x:ClientData"}}])&&m(n.prototype,a),f}(l);I.exports=r},{"../base-xform":31,"./style/vml-position-xform":40,"./style/vml-protection-xform":41,"./vml-anchor-xform":42}],44:[function(d,I,T){function b(t){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(t)}function m(t,r){for(var o=0;o"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var o,n=c(t);if(r){var a=c(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return p(this,o)}}function p(t,r){return!r||b(r)!=="object"&&typeof r!="function"?function(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}(t):r}function c(t){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)})(t)}var l=d("../../../utils/xml-stream"),s=d("../base-xform"),i=d("./vml-shape-xform"),e=function(t){(function(u,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(f&&f.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),f&&v(u,f)})(a,t);var r,o,n=h(a);function a(){var u;return function(f,y){if(!(f instanceof y))throw new TypeError("Cannot call a class as a function")}(this,a),(u=n.call(this)).map={"v:shape":new i},u}return r=a,(o=[{key:"render",value:function(u,f){var y=this;u.openXml(l.StdDocAttributes),u.openNode(this.tag,a.DRAWING_ATTRIBUTES),u.openNode("o:shapelayout",{"v:ext":"edit"}),u.leafNode("o:idmap",{"v:ext":"edit",data:1}),u.closeNode(),u.openNode("v:shapetype",{id:"_x0000_t202",coordsize:"21600,21600","o:spt":202,path:"m,l,21600r21600,l21600,xe"}),u.leafNode("v:stroke",{joinstyle:"miter"}),u.leafNode("v:path",{gradientshapeok:"t","o:connecttype":"rect"}),u.closeNode(),f.comments.forEach(function(w,R){y.map["v:shape"].render(u,w,R)}),u.closeNode()}},{key:"parseOpen",value:function(u){if(this.parser)return this.parser.parseOpen(u),!0;switch(u.name){case this.tag:this.reset(),this.model={comments:[]};break;default:this.parser=this.map[u.name],this.parser&&this.parser.parseOpen(u)}return!0}},{key:"parseText",value:function(u){this.parser&&this.parser.parseText(u)}},{key:"parseClose",value:function(u){if(this.parser)return this.parser.parseClose(u)||(this.model.comments.push(this.parser.model),this.parser=void 0),!0;switch(u){case this.tag:return!1;default:return!0}}},{key:"reconcile",value:function(u,f){var y=this;u.anchors.forEach(function(w){w.br?y.map["xdr:twoCellAnchor"].reconcile(w,f):y.map["xdr:oneCellAnchor"].reconcile(w,f)})}},{key:"tag",get:function(){return"xml"}}])&&m(r.prototype,o),a}(s);e.DRAWING_ATTRIBUTES={"xmlns:v":"urn:schemas-microsoft-com:vml","xmlns:o":"urn:schemas-microsoft-com:office:office","xmlns:x":"urn:schemas-microsoft-com:office:excel"},I.exports=e},{"../../../utils/xml-stream":27,"../base-xform":31,"./vml-shape-xform":45}],45:[function(d,I,T){function b(t){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(t)}function m(t,r){for(var o=0;o"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var o,n=c(t);if(r){var a=c(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return p(this,o)}}function p(t,r){return!r||b(r)!=="object"&&typeof r!="function"?function(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}(t):r}function c(t){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)})(t)}var l=d("../base-xform"),s=d("./vml-textbox-xform"),i=d("./vml-client-data-xform"),e=function(t){(function(u,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(f&&f.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),f&&v(u,f)})(a,t);var r,o,n=h(a);function a(){var u;return function(f,y){if(!(f instanceof y))throw new TypeError("Cannot call a class as a function")}(this,a),(u=n.call(this)).map={"v:textbox":new s,"x:ClientData":new i},u}return r=a,(o=[{key:"render",value:function(u,f,y){u.openNode("v:shape",a.V_SHAPE_ATTRIBUTES(f,y)),u.leafNode("v:fill",{color2:"infoBackground [80]"}),u.leafNode("v:shadow",{color:"none [81]",obscured:"t"}),u.leafNode("v:path",{"o:connecttype":"none"}),this.map["v:textbox"].render(u,f),this.map["x:ClientData"].render(u,f),u.closeNode()}},{key:"parseOpen",value:function(u){if(this.parser)return this.parser.parseOpen(u),!0;switch(u.name){case this.tag:this.reset(),this.model={margins:{insetmode:u.attributes["o:insetmode"]},anchor:"",editAs:"",protection:{}};break;default:this.parser=this.map[u.name],this.parser&&this.parser.parseOpen(u)}return!0}},{key:"parseText",value:function(u){this.parser&&this.parser.parseText(u)}},{key:"parseClose",value:function(u){if(this.parser)return this.parser.parseClose(u)||(this.parser=void 0),!0;switch(u){case this.tag:return this.model.margins.inset=this.map["v:textbox"].model&&this.map["v:textbox"].model.inset,this.model.protection=this.map["x:ClientData"].model&&this.map["x:ClientData"].model.protection,this.model.anchor=this.map["x:ClientData"].model&&this.map["x:ClientData"].model.anchor,this.model.editAs=this.map["x:ClientData"].model&&this.map["x:ClientData"].model.editAs,!1;default:return!0}}},{key:"tag",get:function(){return"v:shape"}}])&&m(r.prototype,o),a}(l);e.V_SHAPE_ATTRIBUTES=function(t,r){return{id:"_x0000_s".concat(1025+r),type:"#_x0000_t202",style:"position:absolute; margin-left:105.3pt;margin-top:10.5pt;width:97.8pt;height:59.1pt;z-index:1;visibility:hidden",fillcolor:"infoBackground [80]",strokecolor:"none [81]","o:insetmode":t.note.margins&&t.note.margins.insetmode}},I.exports=e},{"../base-xform":31,"./vml-client-data-xform":43,"./vml-textbox-xform":46}],46:[function(d,I,T){function b(i){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(i)}function m(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function v(i,e){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var t,r=l(i);if(e){var o=l(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return c(this,t)}}function c(i,e){return!e||b(e)!=="object"&&typeof e!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(i):e}function l(i){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(i)}var s=function(i){(function(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(a&&a.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),a&&h(n,a)})(o,i);var e,t,r=p(o);function o(){return m(this,o),r.apply(this,arguments)}return e=o,(t=[{key:"conversionUnit",value:function(n,a,u){return"".concat(parseFloat(n)*a.toFixed(2)).concat(u)}},{key:"reverseConversionUnit",value:function(n){var a=this;return(n||"").split(",").map(function(u){return Number(parseFloat(a.conversionUnit(parseFloat(u),.1,"")).toFixed(2))})}},{key:"render",value:function(n,a){var u=this,f={style:"mso-direction-alt:auto"};if(a&&a.note){var y=(a.note&&a.note.margins).inset;Array.isArray(y)&&(y=y.map(function(w){return u.conversionUnit(w,10,"mm")}).join(",")),y&&(f.inset=y)}n.openNode("v:textbox",f),n.leafNode("div",{style:"text-align:left"}),n.closeNode()}},{key:"parseOpen",value:function(n){switch(n.name){case this.tag:return this.model={inset:this.reverseConversionUnit(n.attributes.inset)},!0;default:return!0}}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(n){switch(n){case this.tag:return!1;default:return!0}}},{key:"tag",get:function(){return"v:textbox"}}])&&v(e.prototype,t),o}(d("../base-xform"));I.exports=s},{"../base-xform":31}],47:[function(d,I,T){function b(i){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(i)}function m(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function v(i,e){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var t,r=l(i);if(e){var o=l(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return c(this,t)}}function c(i,e){return!e||b(e)!=="object"&&typeof e!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(i):e}function l(i){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(i)}var s=function(i){(function(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(a&&a.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),a&&h(n,a)})(o,i);var e,t,r=p(o);function o(){return m(this,o),r.apply(this,arguments)}return e=o,(t=[{key:"createNewModel",value:function(n){return{}}},{key:"parseOpen",value:function(n){return this.parser=this.parser||this.map[n.name],this.parser?(this.parser.parseOpen(n),!0):n.name===this.tag&&(this.model=this.createNewModel(n),!0)}},{key:"parseText",value:function(n){this.parser&&this.parser.parseText(n)}},{key:"onParserClose",value:function(n,a){this.model[n]=a.model}},{key:"parseClose",value:function(n){return this.parser?(this.parser.parseClose(n)||(this.onParserClose(n,this.parser),this.parser=void 0),!0):n!==this.tag}}])&&v(e.prototype,t),o}(d("./base-xform"));I.exports=s},{"./base-xform":31}],48:[function(d,I,T){function b(i){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(i)}function m(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function v(i,e){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var t,r=l(i);if(e){var o=l(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return c(this,t)}}function c(i,e){return!e||b(e)!=="object"&&typeof e!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(i):e}function l(i){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(i)}var s=function(i){(function(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(a&&a.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),a&&h(n,a)})(o,i);var e,t,r=p(o);function o(){return m(this,o),r.apply(this,arguments)}return e=o,(t=[{key:"render",value:function(n,a){n.openNode("HeadingPairs"),n.openNode("vt:vector",{size:2,baseType:"variant"}),n.openNode("vt:variant"),n.leafNode("vt:lpstr",void 0,"Worksheets"),n.closeNode(),n.openNode("vt:variant"),n.leafNode("vt:i4",void 0,a.length),n.closeNode(),n.closeNode(),n.closeNode()}},{key:"parseOpen",value:function(n){return n.name==="HeadingPairs"}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(n){return n!=="HeadingPairs"}}])&&v(e.prototype,t),o}(d("../base-xform"));I.exports=s},{"../base-xform":31}],49:[function(d,I,T){function b(i){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(i)}function m(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function v(i,e){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var t,r=l(i);if(e){var o=l(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return c(this,t)}}function c(i,e){return!e||b(e)!=="object"&&typeof e!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(i):e}function l(i){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(i)}var s=function(i){(function(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(a&&a.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),a&&h(n,a)})(o,i);var e,t,r=p(o);function o(){return m(this,o),r.apply(this,arguments)}return e=o,(t=[{key:"render",value:function(n,a){n.openNode("TitlesOfParts"),n.openNode("vt:vector",{size:a.length,baseType:"lpstr"}),a.forEach(function(u){n.leafNode("vt:lpstr",void 0,u.name)}),n.closeNode(),n.closeNode()}},{key:"parseOpen",value:function(n){return n.name==="TitlesOfParts"}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(n){return n!=="TitlesOfParts"}}])&&v(e.prototype,t),o}(d("../base-xform"));I.exports=s},{"../base-xform":31}],50:[function(d,I,T){function b(o){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(o)}function m(o,n){for(var a=0;a"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var a,u=c(o);if(n){var f=c(this).constructor;a=Reflect.construct(u,arguments,f)}else a=u.apply(this,arguments);return p(this,a)}}function p(o,n){return!n||b(n)!=="object"&&typeof n!="function"?function(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}(o):n}function c(o){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)})(o)}var l=d("../../../utils/xml-stream"),s=d("../base-xform"),i=d("../simple/string-xform"),e=d("./app-heading-pairs-xform"),t=d("./app-titles-of-parts-xform"),r=function(o){(function(y,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function");y.prototype=Object.create(w&&w.prototype,{constructor:{value:y,writable:!0,configurable:!0}}),w&&v(y,w)})(f,o);var n,a,u=h(f);function f(){var y;return function(w,R){if(!(w instanceof R))throw new TypeError("Cannot call a class as a function")}(this,f),(y=u.call(this)).map={Company:new i({tag:"Company"}),Manager:new i({tag:"Manager"}),HeadingPairs:new e,TitleOfParts:new t},y}return n=f,(a=[{key:"render",value:function(y,w){y.openXml(l.StdDocAttributes),y.openNode("Properties",f.PROPERTY_ATTRIBUTES),y.leafNode("Application",void 0,"Microsoft Excel"),y.leafNode("DocSecurity",void 0,"0"),y.leafNode("ScaleCrop",void 0,"false"),this.map.HeadingPairs.render(y,w.worksheets),this.map.TitleOfParts.render(y,w.worksheets),this.map.Company.render(y,w.company||""),this.map.Manager.render(y,w.manager),y.leafNode("LinksUpToDate",void 0,"false"),y.leafNode("SharedDoc",void 0,"false"),y.leafNode("HyperlinksChanged",void 0,"false"),y.leafNode("AppVersion",void 0,"16.0300"),y.closeNode()}},{key:"parseOpen",value:function(y){if(this.parser)return this.parser.parseOpen(y),!0;switch(y.name){case"Properties":return!0;default:return this.parser=this.map[y.name],!!this.parser&&(this.parser.parseOpen(y),!0)}}},{key:"parseText",value:function(y){this.parser&&this.parser.parseText(y)}},{key:"parseClose",value:function(y){if(this.parser)return this.parser.parseClose(y)||(this.parser=void 0),!0;switch(y){case"Properties":return this.model={worksheets:this.map.TitleOfParts.model,company:this.map.Company.model,manager:this.map.Manager.model},!1;default:return!0}}}])&&m(n.prototype,a),f}(s);r.DateFormat=function(o){return o.toISOString().replace(/[.]\d{3,6}/,"")},r.DateAttrs={"xsi:type":"dcterms:W3CDTF"},r.PROPERTY_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties","xmlns:vt":"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"},I.exports=r},{"../../../utils/xml-stream":27,"../base-xform":31,"../simple/string-xform":118,"./app-heading-pairs-xform":48,"./app-titles-of-parts-xform":49}],51:[function(d,I,T){function b(e){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var r,o=l(e);if(t){var n=l(this).constructor;r=Reflect.construct(o,arguments,n)}else r=o.apply(this,arguments);return c(this,r)}}function c(e,t){return!t||b(t)!=="object"&&typeof t!="function"?function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(e):t}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(e)}var s=d("../../../utils/xml-stream"),i=function(e){(function(a,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(u&&u.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),u&&h(a,u)})(n,e);var t,r,o=p(n);function n(){return m(this,n),o.apply(this,arguments)}return t=n,(r=[{key:"render",value:function(a,u){a.openXml(s.StdDocAttributes),a.openNode("Types",n.PROPERTY_ATTRIBUTES);var f={};(u.media||[]).forEach(function(y){if(y.type==="image"){var w=y.extension;f[w]||(f[w]=!0,a.leafNode("Default",{Extension:w,ContentType:"image/".concat(w)}))}}),a.leafNode("Default",{Extension:"rels",ContentType:"application/vnd.openxmlformats-package.relationships+xml"}),a.leafNode("Default",{Extension:"xml",ContentType:"application/xml"}),a.leafNode("Override",{PartName:"/xl/workbook.xml",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"}),u.worksheets.forEach(function(y){var w="/xl/worksheets/sheet".concat(y.id,".xml");a.leafNode("Override",{PartName:w,ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"})}),a.leafNode("Override",{PartName:"/xl/theme/theme1.xml",ContentType:"application/vnd.openxmlformats-officedocument.theme+xml"}),a.leafNode("Override",{PartName:"/xl/styles.xml",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"}),u.sharedStrings&&u.sharedStrings.count&&a.leafNode("Override",{PartName:"/xl/sharedStrings.xml",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml"}),u.tables&&u.tables.forEach(function(y){a.leafNode("Override",{PartName:"/xl/tables/".concat(y.target),ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml"})}),u.drawings&&u.drawings.forEach(function(y){a.leafNode("Override",{PartName:"/xl/drawings/".concat(y.name,".xml"),ContentType:"application/vnd.openxmlformats-officedocument.drawing+xml"})}),u.commentRefs&&(a.leafNode("Default",{Extension:"vml",ContentType:"application/vnd.openxmlformats-officedocument.vmlDrawing"}),u.commentRefs.forEach(function(y){var w=y.commentName;a.leafNode("Override",{PartName:"/xl/".concat(w,".xml"),ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml"})})),a.leafNode("Override",{PartName:"/docProps/core.xml",ContentType:"application/vnd.openxmlformats-package.core-properties+xml"}),a.leafNode("Override",{PartName:"/docProps/app.xml",ContentType:"application/vnd.openxmlformats-officedocument.extended-properties+xml"}),a.closeNode()}},{key:"parseOpen",value:function(){return!1}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}}])&&v(t.prototype,r),n}(d("../base-xform"));i.PROPERTY_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/package/2006/content-types"},I.exports=i},{"../../../utils/xml-stream":27,"../base-xform":31}],52:[function(d,I,T){function b(o){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(o)}function m(o,n){for(var a=0;a"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var a,u=c(o);if(n){var f=c(this).constructor;a=Reflect.construct(u,arguments,f)}else a=u.apply(this,arguments);return p(this,a)}}function p(o,n){return!n||b(n)!=="object"&&typeof n!="function"?function(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}(o):n}function c(o){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)})(o)}var l=d("../../../utils/xml-stream"),s=d("../base-xform"),i=d("../simple/date-xform"),e=d("../simple/string-xform"),t=d("../simple/integer-xform"),r=function(o){(function(y,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function");y.prototype=Object.create(w&&w.prototype,{constructor:{value:y,writable:!0,configurable:!0}}),w&&v(y,w)})(f,o);var n,a,u=h(f);function f(){var y;return function(w,R){if(!(w instanceof R))throw new TypeError("Cannot call a class as a function")}(this,f),(y=u.call(this)).map={"dc:creator":new e({tag:"dc:creator"}),"dc:title":new e({tag:"dc:title"}),"dc:subject":new e({tag:"dc:subject"}),"dc:description":new e({tag:"dc:description"}),"dc:identifier":new e({tag:"dc:identifier"}),"dc:language":new e({tag:"dc:language"}),"cp:keywords":new e({tag:"cp:keywords"}),"cp:category":new e({tag:"cp:category"}),"cp:lastModifiedBy":new e({tag:"cp:lastModifiedBy"}),"cp:lastPrinted":new i({tag:"cp:lastPrinted",format:f.DateFormat}),"cp:revision":new t({tag:"cp:revision"}),"cp:version":new e({tag:"cp:version"}),"cp:contentStatus":new e({tag:"cp:contentStatus"}),"cp:contentType":new e({tag:"cp:contentType"}),"dcterms:created":new i({tag:"dcterms:created",attrs:f.DateAttrs,format:f.DateFormat}),"dcterms:modified":new i({tag:"dcterms:modified",attrs:f.DateAttrs,format:f.DateFormat})},y}return n=f,(a=[{key:"render",value:function(y,w){y.openXml(l.StdDocAttributes),y.openNode("cp:coreProperties",f.CORE_PROPERTY_ATTRIBUTES),this.map["dc:creator"].render(y,w.creator),this.map["dc:title"].render(y,w.title),this.map["dc:subject"].render(y,w.subject),this.map["dc:description"].render(y,w.description),this.map["dc:identifier"].render(y,w.identifier),this.map["dc:language"].render(y,w.language),this.map["cp:keywords"].render(y,w.keywords),this.map["cp:category"].render(y,w.category),this.map["cp:lastModifiedBy"].render(y,w.lastModifiedBy),this.map["cp:lastPrinted"].render(y,w.lastPrinted),this.map["cp:revision"].render(y,w.revision),this.map["cp:version"].render(y,w.version),this.map["cp:contentStatus"].render(y,w.contentStatus),this.map["cp:contentType"].render(y,w.contentType),this.map["dcterms:created"].render(y,w.created),this.map["dcterms:modified"].render(y,w.modified),y.closeNode()}},{key:"parseOpen",value:function(y){if(this.parser)return this.parser.parseOpen(y),!0;switch(y.name){case"cp:coreProperties":case"coreProperties":return!0;default:if(this.parser=this.map[y.name],this.parser)return this.parser.parseOpen(y),!0;throw new Error("Unexpected xml node in parseOpen: ".concat(JSON.stringify(y)))}}},{key:"parseText",value:function(y){this.parser&&this.parser.parseText(y)}},{key:"parseClose",value:function(y){if(this.parser)return this.parser.parseClose(y)||(this.parser=void 0),!0;switch(y){case"cp:coreProperties":case"coreProperties":return this.model={creator:this.map["dc:creator"].model,title:this.map["dc:title"].model,subject:this.map["dc:subject"].model,description:this.map["dc:description"].model,identifier:this.map["dc:identifier"].model,language:this.map["dc:language"].model,keywords:this.map["cp:keywords"].model,category:this.map["cp:category"].model,lastModifiedBy:this.map["cp:lastModifiedBy"].model,lastPrinted:this.map["cp:lastPrinted"].model,revision:this.map["cp:revision"].model,contentStatus:this.map["cp:contentStatus"].model,contentType:this.map["cp:contentType"].model,created:this.map["dcterms:created"].model,modified:this.map["dcterms:modified"].model},!1;default:throw new Error("Unexpected xml node in parseClose: ".concat(y))}}}])&&m(n.prototype,a),f}(s);r.DateFormat=function(o){return o.toISOString().replace(/[.]\d{3}/,"")},r.DateAttrs={"xsi:type":"dcterms:W3CDTF"},r.CORE_PROPERTY_ATTRIBUTES={"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"},I.exports=r},{"../../../utils/xml-stream":27,"../base-xform":31,"../simple/date-xform":116,"../simple/integer-xform":117,"../simple/string-xform":118}],53:[function(d,I,T){function b(i){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(i)}function m(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function v(i,e){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var t,r=l(i);if(e){var o=l(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return c(this,t)}}function c(i,e){return!e||b(e)!=="object"&&typeof e!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(i):e}function l(i){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(i)}var s=function(i){(function(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(a&&a.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),a&&h(n,a)})(o,i);var e,t,r=p(o);function o(){return m(this,o),r.apply(this,arguments)}return e=o,(t=[{key:"render",value:function(n,a){n.leafNode("Relationship",a)}},{key:"parseOpen",value:function(n){switch(n.name){case"Relationship":return this.model=n.attributes,!0;default:return!1}}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}}])&&v(e.prototype,t),o}(d("../base-xform"));I.exports=s},{"../base-xform":31}],54:[function(d,I,T){function b(t){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(t)}function m(t,r){for(var o=0;o"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var o,n=c(t);if(r){var a=c(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return p(this,o)}}function p(t,r){return!r||b(r)!=="object"&&typeof r!="function"?function(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}(t):r}function c(t){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)})(t)}var l=d("../../../utils/xml-stream"),s=d("../base-xform"),i=d("./relationship-xform"),e=function(t){(function(u,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(f&&f.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),f&&v(u,f)})(a,t);var r,o,n=h(a);function a(){var u;return function(f,y){if(!(f instanceof y))throw new TypeError("Cannot call a class as a function")}(this,a),(u=n.call(this)).map={Relationship:new i},u}return r=a,(o=[{key:"render",value:function(u,f){var y=this;f=f||this._values,u.openXml(l.StdDocAttributes),u.openNode("Relationships",a.RELATIONSHIPS_ATTRIBUTES),f.forEach(function(w){y.map.Relationship.render(u,w)}),u.closeNode()}},{key:"parseOpen",value:function(u){if(this.parser)return this.parser.parseOpen(u),!0;switch(u.name){case"Relationships":return this.model=[],!0;default:if(this.parser=this.map[u.name],this.parser)return this.parser.parseOpen(u),!0;throw new Error("Unexpected xml node in parseOpen: ".concat(JSON.stringify(u)))}}},{key:"parseText",value:function(u){this.parser&&this.parser.parseText(u)}},{key:"parseClose",value:function(u){if(this.parser)return this.parser.parseClose(u)||(this.model.push(this.parser.model),this.parser=void 0),!0;switch(u){case"Relationships":return!1;default:throw new Error("Unexpected xml node in parseClose: ".concat(u))}}}])&&m(r.prototype,o),a}(s);e.RELATIONSHIPS_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/package/2006/relationships"},I.exports=e},{"../../../utils/xml-stream":27,"../base-xform":31,"./relationship-xform":53}],55:[function(d,I,T){function b(i){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(i)}function m(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function v(i,e){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var t,r=l(i);if(e){var o=l(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return c(this,t)}}function c(i,e){return!e||b(e)!=="object"&&typeof e!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(i):e}function l(i){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(i)}var s=function(i){(function(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(a&&a.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),a&&h(n,a)})(o,i);var e,t,r=p(o);function o(){return m(this,o),r.apply(this,arguments)}return e=o,(t=[{key:"parseOpen",value:function(n){if(this.parser)return this.parser.parseOpen(n),!0;switch(n.name){case this.tag:this.reset(),this.model={range:{editAs:n.attributes.editAs||"oneCell"}};break;default:this.parser=this.map[n.name],this.parser&&this.parser.parseOpen(n)}return!0}},{key:"parseText",value:function(n){this.parser&&this.parser.parseText(n)}},{key:"reconcilePicture",value:function(n,a){if(n&&n.rId){var u=a.rels[n.rId].Target.match(/.*\/media\/(.+[.][a-zA-Z]{3,4})/);if(u){var f=u[1],y=a.mediaIndex[f];return a.media[y]}}}}])&&v(e.prototype,t),o}(d("../base-xform"));I.exports=s},{"../base-xform":31}],56:[function(d,I,T){function b(e){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function m(e,t){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var r,o=c(e);if(t){var n=c(this).constructor;r=Reflect.construct(o,arguments,n)}else r=o.apply(this,arguments);return p(this,r)}}function p(e,t){return!t||b(t)!=="object"&&typeof t!="function"?function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(e):t}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(e)}var l=d("../base-xform"),s=d("./blip-xform"),i=function(e){(function(a,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(u&&u.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),u&&v(a,u)})(n,e);var t,r,o=h(n);function n(){var a;return function(u,f){if(!(u instanceof f))throw new TypeError("Cannot call a class as a function")}(this,n),(a=o.call(this)).map={"a:blip":new s},a}return t=n,(r=[{key:"render",value:function(a,u){a.openNode(this.tag),this.map["a:blip"].render(a,u),a.openNode("a:stretch"),a.leafNode("a:fillRect"),a.closeNode(),a.closeNode()}},{key:"parseOpen",value:function(a){if(this.parser)return this.parser.parseOpen(a),!0;switch(a.name){case this.tag:this.reset();break;default:this.parser=this.map[a.name],this.parser&&this.parser.parseOpen(a)}return!0}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(a){if(this.parser)return this.parser.parseClose(a)||(this.parser=void 0),!0;switch(a){case this.tag:return this.model=this.map["a:blip"].model,!1;default:return!0}}},{key:"tag",get:function(){return"xdr:blipFill"}}])&&m(t.prototype,r),n}(l);I.exports=i},{"../base-xform":31,"./blip-xform":57}],57:[function(d,I,T){function b(i){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(i)}function m(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function v(i,e){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var t,r=l(i);if(e){var o=l(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return c(this,t)}}function c(i,e){return!e||b(e)!=="object"&&typeof e!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(i):e}function l(i){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(i)}var s=function(i){(function(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(a&&a.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),a&&h(n,a)})(o,i);var e,t,r=p(o);function o(){return m(this,o),r.apply(this,arguments)}return e=o,(t=[{key:"render",value:function(n,a){n.leafNode(this.tag,{"xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","r:embed":a.rId,cstate:"print"})}},{key:"parseOpen",value:function(n){switch(n.name){case this.tag:return this.model={rId:n.attributes["r:embed"]},!0;default:return!0}}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(n){switch(n){case this.tag:return!1;default:return!0}}},{key:"tag",get:function(){return"a:blip"}}])&&v(e.prototype,t),o}(d("../base-xform"));I.exports=s},{"../base-xform":31}],58:[function(d,I,T){function b(i){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(i)}function m(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function v(i,e){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var t,r=l(i);if(e){var o=l(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return c(this,t)}}function c(i,e){return!e||b(e)!=="object"&&typeof e!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(i):e}function l(i){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(i)}var s=function(i){(function(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(a&&a.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),a&&h(n,a)})(o,i);var e,t,r=p(o);function o(){return m(this,o),r.apply(this,arguments)}return e=o,(t=[{key:"render",value:function(n){n.openNode(this.tag),n.leafNode("a:picLocks",{noChangeAspect:"1"}),n.closeNode()}},{key:"parseOpen",value:function(n){switch(n.name){case this.tag:default:return!0}}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(n){switch(n){case this.tag:return!1;default:return!0}}},{key:"tag",get:function(){return"xdr:cNvPicPr"}}])&&v(e.prototype,t),o}(d("../base-xform"));I.exports=s},{"../base-xform":31}],59:[function(d,I,T){function b(t){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(t)}function m(t,r){for(var o=0;o"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var o,n=c(t);if(r){var a=c(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return p(this,o)}}function p(t,r){return!r||b(r)!=="object"&&typeof r!="function"?function(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}(t):r}function c(t){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)})(t)}var l=d("../base-xform"),s=d("./hlink-click-xform"),i=d("./ext-lst-xform"),e=function(t){(function(u,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(f&&f.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),f&&v(u,f)})(a,t);var r,o,n=h(a);function a(){var u;return function(f,y){if(!(f instanceof y))throw new TypeError("Cannot call a class as a function")}(this,a),(u=n.call(this)).map={"a:hlinkClick":new s,"a:extLst":new i},u}return r=a,(o=[{key:"render",value:function(u,f){u.openNode(this.tag,{id:f.index,name:"Picture ".concat(f.index)}),this.map["a:hlinkClick"].render(u,f),this.map["a:extLst"].render(u,f),u.closeNode()}},{key:"parseOpen",value:function(u){if(this.parser)return this.parser.parseOpen(u),!0;switch(u.name){case this.tag:this.reset();break;default:this.parser=this.map[u.name],this.parser&&this.parser.parseOpen(u)}return!0}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(u){if(this.parser)return this.parser.parseClose(u)||(this.parser=void 0),!0;switch(u){case this.tag:return this.model=this.map["a:hlinkClick"].model,!1;default:return!0}}},{key:"tag",get:function(){return"xdr:cNvPr"}}])&&m(r.prototype,o),a}(l);I.exports=e},{"../base-xform":31,"./ext-lst-xform":62,"./hlink-click-xform":64}],60:[function(d,I,T){function b(e){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function m(e,t){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var r,o=c(e);if(t){var n=c(this).constructor;r=Reflect.construct(o,arguments,n)}else r=o.apply(this,arguments);return p(this,r)}}function p(e,t){return!t||b(t)!=="object"&&typeof t!="function"?function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(e):t}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(e)}var l=d("../base-xform"),s=d("../simple/integer-xform"),i=function(e){(function(a,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(u&&u.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),u&&v(a,u)})(n,e);var t,r,o=h(n);function n(a){var u;return function(f,y){if(!(f instanceof y))throw new TypeError("Cannot call a class as a function")}(this,n),(u=o.call(this)).tag=a.tag,u.map={"xdr:col":new s({tag:"xdr:col",zero:!0}),"xdr:colOff":new s({tag:"xdr:colOff",zero:!0}),"xdr:row":new s({tag:"xdr:row",zero:!0}),"xdr:rowOff":new s({tag:"xdr:rowOff",zero:!0})},u}return t=n,(r=[{key:"render",value:function(a,u){a.openNode(this.tag),this.map["xdr:col"].render(a,u.nativeCol),this.map["xdr:colOff"].render(a,u.nativeColOff),this.map["xdr:row"].render(a,u.nativeRow),this.map["xdr:rowOff"].render(a,u.nativeRowOff),a.closeNode()}},{key:"parseOpen",value:function(a){if(this.parser)return this.parser.parseOpen(a),!0;switch(a.name){case this.tag:this.reset();break;default:this.parser=this.map[a.name],this.parser&&this.parser.parseOpen(a)}return!0}},{key:"parseText",value:function(a){this.parser&&this.parser.parseText(a)}},{key:"parseClose",value:function(a){if(this.parser)return this.parser.parseClose(a)||(this.parser=void 0),!0;switch(a){case this.tag:return this.model={nativeCol:this.map["xdr:col"].model,nativeColOff:this.map["xdr:colOff"].model,nativeRow:this.map["xdr:row"].model,nativeRowOff:this.map["xdr:rowOff"].model},!1;default:return!0}}}])&&m(t.prototype,r),n}(l);I.exports=i},{"../base-xform":31,"../simple/integer-xform":117}],61:[function(d,I,T){function b(o){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(o)}function m(o,n){for(var a=0;a"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var a,u=c(o);if(n){var f=c(this).constructor;a=Reflect.construct(u,arguments,f)}else a=u.apply(this,arguments);return p(this,a)}}function p(o,n){return!n||b(n)!=="object"&&typeof n!="function"?function(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}(o):n}function c(o){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)})(o)}var l=d("../../../utils/col-cache"),s=d("../../../utils/xml-stream"),i=d("../base-xform"),e=d("./two-cell-anchor-xform"),t=d("./one-cell-anchor-xform"),r=function(o){(function(y,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function");y.prototype=Object.create(w&&w.prototype,{constructor:{value:y,writable:!0,configurable:!0}}),w&&v(y,w)})(f,o);var n,a,u=h(f);function f(){var y;return function(w,R){if(!(w instanceof R))throw new TypeError("Cannot call a class as a function")}(this,f),(y=u.call(this)).map={"xdr:twoCellAnchor":new e,"xdr:oneCellAnchor":new t},y}return n=f,(a=[{key:"prepare",value:function(y){var w=this;y.anchors.forEach(function(R,E){R.anchorType=function(M){return(typeof M.range=="string"?l.decode(M.range):M.range).br?"xdr:twoCellAnchor":"xdr:oneCellAnchor"}(R),w.map[R.anchorType].prepare(R,{index:E})})}},{key:"render",value:function(y,w){var R=this;y.openXml(s.StdDocAttributes),y.openNode(this.tag,f.DRAWING_ATTRIBUTES),w.anchors.forEach(function(E){R.map[E.anchorType].render(y,E)}),y.closeNode()}},{key:"parseOpen",value:function(y){if(this.parser)return this.parser.parseOpen(y),!0;switch(y.name){case this.tag:this.reset(),this.model={anchors:[]};break;default:this.parser=this.map[y.name],this.parser&&this.parser.parseOpen(y)}return!0}},{key:"parseText",value:function(y){this.parser&&this.parser.parseText(y)}},{key:"parseClose",value:function(y){if(this.parser)return this.parser.parseClose(y)||(this.model.anchors.push(this.parser.model),this.parser=void 0),!0;switch(y){case this.tag:return!1;default:return!0}}},{key:"reconcile",value:function(y,w){var R=this;y.anchors.forEach(function(E){E.br?R.map["xdr:twoCellAnchor"].reconcile(E,w):R.map["xdr:oneCellAnchor"].reconcile(E,w)})}},{key:"tag",get:function(){return"xdr:wsDr"}}])&&m(n.prototype,a),f}(i);r.DRAWING_ATTRIBUTES={"xmlns:xdr":"http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing","xmlns:a":"http://schemas.openxmlformats.org/drawingml/2006/main"},I.exports=r},{"../../../utils/col-cache":19,"../../../utils/xml-stream":27,"../base-xform":31,"./one-cell-anchor-xform":66,"./two-cell-anchor-xform":69}],62:[function(d,I,T){function b(i){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(i)}function m(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function v(i,e){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var t,r=l(i);if(e){var o=l(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return c(this,t)}}function c(i,e){return!e||b(e)!=="object"&&typeof e!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(i):e}function l(i){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(i)}var s=function(i){(function(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(a&&a.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),a&&h(n,a)})(o,i);var e,t,r=p(o);function o(){return m(this,o),r.apply(this,arguments)}return e=o,(t=[{key:"render",value:function(n){n.openNode(this.tag),n.openNode("a:ext",{uri:"{FF2B5EF4-FFF2-40B4-BE49-F238E27FC236}"}),n.leafNode("a16:creationId",{"xmlns:a16":"http://schemas.microsoft.com/office/drawing/2014/main",id:"{00000000-0008-0000-0000-000002000000}"}),n.closeNode(),n.closeNode()}},{key:"parseOpen",value:function(n){switch(n.name){case this.tag:default:return!0}}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(n){switch(n){case this.tag:return!1;default:return!0}}},{key:"tag",get:function(){return"a:extLst"}}])&&v(e.prototype,t),o}(d("../base-xform"));I.exports=s},{"../base-xform":31}],63:[function(d,I,T){function b(i){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(i)}function m(i,e){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var t,r=c(i);if(e){var o=c(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return p(this,t)}}function p(i,e){return!e||b(e)!=="object"&&typeof e!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(i):e}function c(i){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(i)}var l=d("../base-xform"),s=function(i){(function(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(a&&a.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),a&&v(n,a)})(o,i);var e,t,r=h(o);function o(n){var a;return function(u,f){if(!(u instanceof f))throw new TypeError("Cannot call a class as a function")}(this,o),(a=r.call(this)).tag=n.tag,a.map={},a}return e=o,(t=[{key:"render",value:function(n,a){n.openNode(this.tag);var u=Math.floor(9525*a.width),f=Math.floor(9525*a.height);n.addAttribute("cx",u),n.addAttribute("cy",f),n.closeNode()}},{key:"parseOpen",value:function(n){return n.name===this.tag&&(this.model={width:parseInt(n.attributes.cx||"0",10)/9525,height:parseInt(n.attributes.cy||"0",10)/9525},!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}}])&&m(e.prototype,t),o}(l);I.exports=s},{"../base-xform":31}],64:[function(d,I,T){function b(i){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(i)}function m(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function v(i,e){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var t,r=l(i);if(e){var o=l(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return c(this,t)}}function c(i,e){return!e||b(e)!=="object"&&typeof e!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(i):e}function l(i){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(i)}var s=function(i){(function(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(a&&a.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),a&&h(n,a)})(o,i);var e,t,r=p(o);function o(){return m(this,o),r.apply(this,arguments)}return e=o,(t=[{key:"render",value:function(n,a){a.hyperlinks&&a.hyperlinks.rId&&n.leafNode(this.tag,{"xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","r:id":a.hyperlinks.rId,tooltip:a.hyperlinks.tooltip})}},{key:"parseOpen",value:function(n){switch(n.name){case this.tag:return this.model={hyperlinks:{rId:n.attributes["r:id"],tooltip:n.attributes.tooltip}},!0;default:return!0}}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"a:hlinkClick"}}])&&v(e.prototype,t),o}(d("../base-xform"));I.exports=s},{"../base-xform":31}],65:[function(d,I,T){function b(t){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(t)}function m(t,r){for(var o=0;o"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var o,n=c(t);if(r){var a=c(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return p(this,o)}}function p(t,r){return!r||b(r)!=="object"&&typeof r!="function"?function(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}(t):r}function c(t){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)})(t)}var l=d("../base-xform"),s=d("./c-nv-pr-xform"),i=d("./c-nv-pic-pr-xform"),e=function(t){(function(u,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(f&&f.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),f&&v(u,f)})(a,t);var r,o,n=h(a);function a(){var u;return function(f,y){if(!(f instanceof y))throw new TypeError("Cannot call a class as a function")}(this,a),(u=n.call(this)).map={"xdr:cNvPr":new s,"xdr:cNvPicPr":new i},u}return r=a,(o=[{key:"render",value:function(u,f){u.openNode(this.tag),this.map["xdr:cNvPr"].render(u,f),this.map["xdr:cNvPicPr"].render(u,f),u.closeNode()}},{key:"parseOpen",value:function(u){if(this.parser)return this.parser.parseOpen(u),!0;switch(u.name){case this.tag:this.reset();break;default:this.parser=this.map[u.name],this.parser&&this.parser.parseOpen(u)}return!0}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(u){if(this.parser)return this.parser.parseClose(u)||(this.parser=void 0),!0;switch(u){case this.tag:return this.model=this.map["xdr:cNvPr"].model,!1;default:return!0}}},{key:"tag",get:function(){return"xdr:nvPicPr"}}])&&m(r.prototype,o),a}(l);I.exports=e},{"../base-xform":31,"./c-nv-pic-pr-xform":58,"./c-nv-pr-xform":59}],66:[function(d,I,T){function b(o){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(o)}function m(o,n){for(var a=0;a"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var a,u=c(o);if(n){var f=c(this).constructor;a=Reflect.construct(u,arguments,f)}else a=u.apply(this,arguments);return p(this,a)}}function p(o,n){return!n||b(n)!=="object"&&typeof n!="function"?function(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}(o):n}function c(o){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)})(o)}var l=d("./base-cell-anchor-xform"),s=d("../static-xform"),i=d("./cell-position-xform"),e=d("./ext-xform"),t=d("./pic-xform"),r=function(o){(function(y,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function");y.prototype=Object.create(w&&w.prototype,{constructor:{value:y,writable:!0,configurable:!0}}),w&&v(y,w)})(f,o);var n,a,u=h(f);function f(){var y;return function(w,R){if(!(w instanceof R))throw new TypeError("Cannot call a class as a function")}(this,f),(y=u.call(this)).map={"xdr:from":new i({tag:"xdr:from"}),"xdr:ext":new e({tag:"xdr:ext"}),"xdr:pic":new t,"xdr:clientData":new s({tag:"xdr:clientData"})},y}return n=f,(a=[{key:"prepare",value:function(y,w){this.map["xdr:pic"].prepare(y.picture,w)}},{key:"render",value:function(y,w){y.openNode(this.tag,{editAs:w.range.editAs||"oneCell"}),this.map["xdr:from"].render(y,w.range.tl),this.map["xdr:ext"].render(y,w.range.ext),this.map["xdr:pic"].render(y,w.picture),this.map["xdr:clientData"].render(y,{}),y.closeNode()}},{key:"parseClose",value:function(y){if(this.parser)return this.parser.parseClose(y)||(this.parser=void 0),!0;switch(y){case this.tag:return this.model.range.tl=this.map["xdr:from"].model,this.model.range.ext=this.map["xdr:ext"].model,this.model.picture=this.map["xdr:pic"].model,!1;default:return!0}}},{key:"reconcile",value:function(y,w){y.medium=this.reconcilePicture(y.picture,w)}},{key:"tag",get:function(){return"xdr:oneCellAnchor"}}])&&m(n.prototype,a),f}(l);I.exports=r},{"../static-xform":119,"./base-cell-anchor-xform":55,"./cell-position-xform":60,"./ext-xform":63,"./pic-xform":67}],67:[function(d,I,T){function b(o){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(o)}function m(o,n){for(var a=0;a"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var a,u=c(o);if(n){var f=c(this).constructor;a=Reflect.construct(u,arguments,f)}else a=u.apply(this,arguments);return p(this,a)}}function p(o,n){return!n||b(n)!=="object"&&typeof n!="function"?function(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}(o):n}function c(o){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)})(o)}var l=d("../base-xform"),s=d("../static-xform"),i=d("./blip-fill-xform"),e=d("./nv-pic-pr-xform"),t=d("./sp-pr"),r=function(o){(function(y,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function");y.prototype=Object.create(w&&w.prototype,{constructor:{value:y,writable:!0,configurable:!0}}),w&&v(y,w)})(f,o);var n,a,u=h(f);function f(){var y;return function(w,R){if(!(w instanceof R))throw new TypeError("Cannot call a class as a function")}(this,f),(y=u.call(this)).map={"xdr:nvPicPr":new e,"xdr:blipFill":new i,"xdr:spPr":new s(t)},y}return n=f,(a=[{key:"prepare",value:function(y,w){y.index=w.index+1}},{key:"render",value:function(y,w){y.openNode(this.tag),this.map["xdr:nvPicPr"].render(y,w),this.map["xdr:blipFill"].render(y,w),this.map["xdr:spPr"].render(y,w),y.closeNode()}},{key:"parseOpen",value:function(y){if(this.parser)return this.parser.parseOpen(y),!0;switch(y.name){case this.tag:this.reset();break;default:this.parser=this.map[y.name],this.parser&&this.parser.parseOpen(y)}return!0}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(y){if(this.parser)return this.parser.parseClose(y)||(this.mergeModel(this.parser.model),this.parser=void 0),!0;switch(y){case this.tag:return!1;default:return!0}}},{key:"tag",get:function(){return"xdr:pic"}}])&&m(n.prototype,a),f}(l);I.exports=r},{"../base-xform":31,"../static-xform":119,"./blip-fill-xform":56,"./nv-pic-pr-xform":65,"./sp-pr":68}],68:[function(d,I,T){I.exports={tag:"xdr:spPr",c:[{tag:"a:xfrm",c:[{tag:"a:off",$:{x:"0",y:"0"}},{tag:"a:ext",$:{cx:"0",cy:"0"}}]},{tag:"a:prstGeom",$:{prst:"rect"},c:[{tag:"a:avLst"}]}]}},{}],69:[function(d,I,T){function b(r){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o})(r)}function m(r,o){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var n,a=c(r);if(o){var u=c(this).constructor;n=Reflect.construct(a,arguments,u)}else n=a.apply(this,arguments);return p(this,n)}}function p(r,o){return!o||b(o)!=="object"&&typeof o!="function"?function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(r):o}function c(r){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(r)}var l=d("./base-cell-anchor-xform"),s=d("../static-xform"),i=d("./cell-position-xform"),e=d("./pic-xform"),t=function(r){(function(f,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function");f.prototype=Object.create(y&&y.prototype,{constructor:{value:f,writable:!0,configurable:!0}}),y&&v(f,y)})(u,r);var o,n,a=h(u);function u(){var f;return function(y,w){if(!(y instanceof w))throw new TypeError("Cannot call a class as a function")}(this,u),(f=a.call(this)).map={"xdr:from":new i({tag:"xdr:from"}),"xdr:to":new i({tag:"xdr:to"}),"xdr:pic":new e,"xdr:clientData":new s({tag:"xdr:clientData"})},f}return o=u,(n=[{key:"prepare",value:function(f,y){this.map["xdr:pic"].prepare(f.picture,y)}},{key:"render",value:function(f,y){f.openNode(this.tag,{editAs:y.range.editAs||"oneCell"}),this.map["xdr:from"].render(f,y.range.tl),this.map["xdr:to"].render(f,y.range.br),this.map["xdr:pic"].render(f,y.picture),this.map["xdr:clientData"].render(f,{}),f.closeNode()}},{key:"parseClose",value:function(f){if(this.parser)return this.parser.parseClose(f)||(this.parser=void 0),!0;switch(f){case this.tag:return this.model.range.tl=this.map["xdr:from"].model,this.model.range.br=this.map["xdr:to"].model,this.model.picture=this.map["xdr:pic"].model,!1;default:return!0}}},{key:"reconcile",value:function(f,y){f.medium=this.reconcilePicture(f.picture,y)}},{key:"tag",get:function(){return"xdr:twoCellAnchor"}}])&&m(o.prototype,n),u}(l);I.exports=t},{"../static-xform":119,"./base-cell-anchor-xform":55,"./cell-position-xform":60,"./pic-xform":67}],70:[function(d,I,T){function b(s){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i})(s)}function m(s,i){for(var e=0;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var e,t=c(s);if(i){var r=c(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return p(this,e)}}function p(s,i){return!i||b(i)!=="object"&&typeof i!="function"?function(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(s):i}function c(s){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(i){return i.__proto__||Object.getPrototypeOf(i)})(s)}var l=function(s){(function(o,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(n&&n.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),n&&v(o,n)})(r,s);var i,e,t=h(r);function r(o){var n;return function(a,u){if(!(a instanceof u))throw new TypeError("Cannot call a class as a function")}(this,r),(n=t.call(this)).tag=o.tag,n.always=!!o.always,n.count=o.count,n.empty=o.empty,n.$count=o.$count||"count",n.$=o.$,n.childXform=o.childXform,n.maxItems=o.maxItems,n}return i=r,(e=[{key:"prepare",value:function(o,n){var a=this.childXform;o&&o.forEach(function(u,f){n.index=f,a.prepare(u,n)})}},{key:"render",value:function(o,n){if(this.always||n&&n.length){o.openNode(this.tag,this.$),this.count&&o.addAttribute(this.$count,n&&n.length||0);var a=this.childXform;(n||[]).forEach(function(u,f){a.render(o,u,f)}),o.closeNode()}else this.empty&&o.leafNode(this.tag)}},{key:"parseOpen",value:function(o){if(this.parser)return this.parser.parseOpen(o),!0;switch(o.name){case this.tag:return this.model=[],!0;default:return!!this.childXform.parseOpen(o)&&(this.parser=this.childXform,!0)}}},{key:"parseText",value:function(o){this.parser&&this.parser.parseText(o)}},{key:"parseClose",value:function(o){if(this.parser){if(!this.parser.parseClose(o)&&(this.model.push(this.parser.model),this.parser=void 0,this.maxItems&&this.model.length>this.maxItems))throw new Error("Max ".concat(this.childXform.tag," count (").concat(this.maxItems,") exceeded"));return!0}return!1}},{key:"reconcile",value:function(o,n){if(o){var a=this.childXform;o.forEach(function(u){a.reconcile(u,n)})}}}])&&m(i.prototype,e),r}(d("./base-xform"));I.exports=l},{"./base-xform":31}],71:[function(d,I,T){function b(e){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var r,o=l(e);if(t){var n=l(this).constructor;r=Reflect.construct(o,arguments,n)}else r=o.apply(this,arguments);return c(this,r)}}function c(e,t){return!t||b(t)!=="object"&&typeof t!="function"?function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(e):t}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(e)}var s=d("../../../utils/col-cache"),i=function(e){(function(a,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(u&&u.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),u&&h(a,u)})(n,e);var t,r,o=p(n);function n(){return m(this,n),o.apply(this,arguments)}return t=n,(r=[{key:"render",value:function(a,u){if(u)if(typeof u=="string")a.leafNode("autoFilter",{ref:u});else{var f=function(R){return typeof R=="string"?R:s.getAddress(R.row,R.column).address},y=f(u.from),w=f(u.to);y&&w&&a.leafNode("autoFilter",{ref:"".concat(y,":").concat(w)})}}},{key:"parseOpen",value:function(a){a.name==="autoFilter"&&(this.model=a.attributes.ref)}},{key:"tag",get:function(){return"autoFilter"}}])&&v(t.prototype,r),n}(d("../base-xform"));I.exports=i},{"../../../utils/col-cache":19,"../base-xform":31}],72:[function(d,I,T){function b(f){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y})(f)}function m(f,y){var w=Object.keys(f);if(Object.getOwnPropertySymbols){var R=Object.getOwnPropertySymbols(f);y&&(R=R.filter(function(E){return Object.getOwnPropertyDescriptor(f,E).enumerable})),w.push.apply(w,R)}return w}function v(f){for(var y=1;y"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var w,R=i(f);if(y){var E=i(this).constructor;w=Reflect.construct(R,arguments,E)}else w=R.apply(this,arguments);return s(this,w)}}function s(f,y){return!y||b(y)!=="object"&&typeof y!="function"?function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(f):y}function i(f){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(y){return y.__proto__||Object.getPrototypeOf(y)})(f)}var e=d("../../../utils/utils"),t=d("../base-xform"),r=d("../../../doc/range"),o=d("../../../doc/enums"),n=d("../strings/rich-text-xform");function a(f){if(f==null)return o.ValueType.Null;if(f instanceof String||typeof f=="string")return o.ValueType.String;if(typeof f=="number")return o.ValueType.Number;if(typeof f=="boolean")return o.ValueType.Boolean;if(f instanceof Date)return o.ValueType.Date;if(f.text&&f.hyperlink)return o.ValueType.Hyperlink;if(f.formula)return o.ValueType.Formula;if(f.error)return o.ValueType.Error;throw new Error("I could not understand type of value")}var u=function(f){(function(M,O){if(typeof O!="function"&&O!==null)throw new TypeError("Super expression must either be null or a function");M.prototype=Object.create(O&&O.prototype,{constructor:{value:M,writable:!0,configurable:!0}}),O&&c(M,O)})(E,f);var y,w,R=l(E);function E(){var M;return function(O,P){if(!(O instanceof P))throw new TypeError("Cannot call a class as a function")}(this,E),(M=R.call(this)).richTextXForm=new n,M}return y=E,(w=[{key:"prepare",value:function(M,O){var P=O.styles.addStyleModel(M.style||{},function(S){switch(S.type){case o.ValueType.Formula:return a(S.result);default:return S.type}}(M));switch(P&&(M.styleId=P),M.comment&&O.comments.push(v(v({},M.comment),{},{ref:M.address})),M.type){case o.ValueType.String:case o.ValueType.RichText:O.sharedStrings&&(M.ssId=O.sharedStrings.add(M.value));break;case o.ValueType.Date:O.date1904&&(M.date1904=!0);break;case o.ValueType.Hyperlink:O.sharedStrings&&M.text!==void 0&&M.text!==null&&(M.ssId=O.sharedStrings.add(M.text)),O.hyperlinks.push({address:M.address,target:M.hyperlink,tooltip:M.tooltip});break;case o.ValueType.Merge:O.merges.add(M);break;case o.ValueType.Formula:if(O.date1904&&(M.date1904=!0),M.shareType==="shared"&&(M.si=O.siFormulae++),M.formula)O.formulae[M.address]=M;else if(M.sharedFormula){var _=O.formulae[M.sharedFormula];if(!_)throw new Error("Shared Formula master must exist above and or left of clone for cell ".concat(M.address));_.si===void 0?(_.shareType="shared",_.si=O.siFormulae++,_.range=new r(_.address,M.address)):_.range&&_.range.expandToAddress(M.address),M.si=_.si}}}},{key:"renderFormula",value:function(M,O){var P=null;switch(O.shareType){case"shared":P={t:"shared",ref:O.ref||O.range.range,si:O.si};break;case"array":P={t:"array",ref:O.ref};break;default:O.si!==void 0&&(P={t:"shared",si:O.si})}switch(a(O.result)){case o.ValueType.Null:M.leafNode("f",P,O.formula);break;case o.ValueType.String:M.addAttribute("t","str"),M.leafNode("f",P,O.formula),M.leafNode("v",null,O.result);break;case o.ValueType.Number:M.leafNode("f",P,O.formula),M.leafNode("v",null,O.result);break;case o.ValueType.Boolean:M.addAttribute("t","b"),M.leafNode("f",P,O.formula),M.leafNode("v",null,O.result?1:0);break;case o.ValueType.Error:M.addAttribute("t","e"),M.leafNode("f",P,O.formula),M.leafNode("v",null,O.result.error);break;case o.ValueType.Date:M.leafNode("f",P,O.formula),M.leafNode("v",null,e.dateToExcel(O.result,O.date1904));break;default:throw new Error("I could not understand type of value")}}},{key:"render",value:function(M,O){var P=this;if(O.type!==o.ValueType.Null||O.styleId){switch(M.openNode("c"),M.addAttribute("r",O.address),O.styleId&&M.addAttribute("s",O.styleId),O.type){case o.ValueType.Null:break;case o.ValueType.Number:M.leafNode("v",null,O.value);break;case o.ValueType.Boolean:M.addAttribute("t","b"),M.leafNode("v",null,O.value?"1":"0");break;case o.ValueType.Error:M.addAttribute("t","e"),M.leafNode("v",null,O.value.error);break;case o.ValueType.String:case o.ValueType.RichText:O.ssId!==void 0?(M.addAttribute("t","s"),M.leafNode("v",null,O.ssId)):O.value&&O.value.richText?(M.addAttribute("t","inlineStr"),M.openNode("is"),O.value.richText.forEach(function(_){P.richTextXForm.render(M,_)}),M.closeNode("is")):(M.addAttribute("t","str"),M.leafNode("v",null,O.value));break;case o.ValueType.Date:M.leafNode("v",null,e.dateToExcel(O.value,O.date1904));break;case o.ValueType.Hyperlink:O.ssId!==void 0?(M.addAttribute("t","s"),M.leafNode("v",null,O.ssId)):(M.addAttribute("t","str"),M.leafNode("v",null,O.text));break;case o.ValueType.Formula:this.renderFormula(M,O);break;case o.ValueType.Merge:}M.closeNode()}}},{key:"parseOpen",value:function(M){if(this.parser)return this.parser.parseOpen(M),!0;switch(M.name){case"c":return this.model={address:M.attributes.r},this.t=M.attributes.t,M.attributes.s&&(this.model.styleId=parseInt(M.attributes.s,10)),!0;case"f":return this.currentNode="f",this.model.si=M.attributes.si,this.model.shareType=M.attributes.t,this.model.ref=M.attributes.ref,!0;case"v":return this.currentNode="v",!0;case"t":return this.currentNode="t",!0;case"r":return this.parser=this.richTextXForm,this.parser.parseOpen(M),!0;default:return!1}}},{key:"parseText",value:function(M){if(this.parser)this.parser.parseText(M);else switch(this.currentNode){case"f":this.model.formula=this.model.formula?this.model.formula+M:M;break;case"v":case"t":this.model.value&&this.model.value.richText?this.model.value.richText.text=this.model.value.richText.text?this.model.value.richText.text+M:M:this.model.value=this.model.value?this.model.value+M:M}}},{key:"parseClose",value:function(M){switch(M){case"c":var O=this.model;if(O.formula||O.shareType)O.type=o.ValueType.Formula,O.value&&(this.t==="str"?O.result=e.xmlDecode(O.value):this.t==="b"?O.result=parseInt(O.value,10)!==0:this.t==="e"?O.result={error:O.value}:O.result=parseFloat(O.value),O.value=void 0);else if(O.value!==void 0)switch(this.t){case"s":O.type=o.ValueType.String,O.value=parseInt(O.value,10);break;case"str":O.type=o.ValueType.String,O.value=e.xmlDecode(O.value);break;case"inlineStr":O.type=o.ValueType.String;break;case"b":O.type=o.ValueType.Boolean,O.value=parseInt(O.value,10)!==0;break;case"e":O.type=o.ValueType.Error,O.value={error:O.value};break;default:O.type=o.ValueType.Number,O.value=parseFloat(O.value)}else O.styleId?O.type=o.ValueType.Null:O.type=o.ValueType.Merge;return!1;case"f":case"v":case"is":return this.currentNode=void 0,!0;case"t":return this.parser?(this.parser.parseClose(M),!0):(this.currentNode=void 0,!0);case"r":return this.model.value=this.model.value||{},this.model.value.richText=this.model.value.richText||[],this.model.value.richText.push(this.parser.model),this.parser=void 0,this.currentNode=void 0,!0;default:return!!this.parser&&(this.parser.parseClose(M),!0)}}},{key:"reconcile",value:function(M,O){var P=M.styleId&&O.styles&&O.styles.getStyleModel(M.styleId);switch(P&&(M.style=P),M.styleId!==void 0&&(M.styleId=void 0),M.type){case o.ValueType.String:typeof M.value=="number"&&O.sharedStrings&&(M.value=O.sharedStrings.getString(M.value)),M.value.richText&&(M.type=o.ValueType.RichText);break;case o.ValueType.Number:P&&e.isDateFmt(P.numFmt)&&(M.type=o.ValueType.Date,M.value=e.excelToDate(M.value,O.date1904));break;case o.ValueType.Formula:M.result!==void 0&&P&&e.isDateFmt(P.numFmt)&&(M.result=e.excelToDate(M.result,O.date1904)),M.shareType==="shared"&&(M.ref?O.formulae[M.si]=M.address:(M.sharedFormula=O.formulae[M.si],delete M.shareType),delete M.si)}var _=O.hyperlinkMap[M.address];_&&(M.type===o.ValueType.Formula?(M.text=M.result,M.result=void 0):(M.text=M.value,M.value=void 0),M.type=o.ValueType.Hyperlink,M.hyperlink=_);var S=O.commentsMap&&O.commentsMap[M.address];S&&(M.comment=S)}},{key:"tag",get:function(){return"c"}}])&&p(y.prototype,w),E}(t);I.exports=u},{"../../../doc/enums":7,"../../../doc/range":10,"../../../utils/utils":26,"../base-xform":31,"../strings/rich-text-xform":121}],73:[function(d,I,T){function b(e){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var r,o=l(e);if(t){var n=l(this).constructor;r=Reflect.construct(o,arguments,n)}else r=o.apply(this,arguments);return c(this,r)}}function c(e,t){return!t||b(t)!=="object"&&typeof t!="function"?function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(e):t}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(e)}var s=d("../../base-xform"),i=function(e){(function(a,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(u&&u.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),u&&h(a,u)})(n,e);var t,r,o=p(n);function n(){return m(this,n),o.apply(this,arguments)}return t=n,(r=[{key:"render",value:function(a,u){a.leafNode(this.tag,{iconSet:u.iconSet,iconId:u.iconId})}},{key:"parseOpen",value:function(a){var u=a.attributes;this.model={iconSet:u.iconSet,iconId:s.toIntValue(u.iconId)}}},{key:"parseClose",value:function(a){return a!==this.tag}},{key:"tag",get:function(){return"x14:cfIcon"}}])&&v(t.prototype,r),n}(s);I.exports=i},{"../../base-xform":31}],74:[function(d,I,T){function b(n){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a})(n)}function m(n,a){for(var u=0;u"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var u,f=c(n);if(a){var y=c(this).constructor;u=Reflect.construct(f,arguments,y)}else u=f.apply(this,arguments);return p(this,u)}}function p(n,a){return!a||b(a)!=="object"&&typeof a!="function"?function(u){if(u===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return u}(n):a}function c(n){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(a){return a.__proto__||Object.getPrototypeOf(a)})(n)}var l=d("uuid").v4,s=d("../../base-xform"),i=d("../../composite-xform"),e=d("./databar-ext-xform"),t=d("./icon-set-ext-xform"),r={"3Triangles":!0,"3Stars":!0,"5Boxes":!0},o=function(n){(function(R,E){if(typeof E!="function"&&E!==null)throw new TypeError("Super expression must either be null or a function");R.prototype=Object.create(E&&E.prototype,{constructor:{value:R,writable:!0,configurable:!0}}),E&&v(R,E)})(w,n);var a,u,f,y=h(w);function w(){var R;return function(E,M){if(!(E instanceof M))throw new TypeError("Cannot call a class as a function")}(this,w),(R=y.call(this)).map={"x14:dataBar":R.databarXform=new e,"x14:iconSet":R.iconSetXform=new t},R}return a=w,f=[{key:"isExt",value:function(R){return R.type==="dataBar"?e.isExt(R):!(R.type!=="iconSet"||!R.custom&&!r[R.iconSet])}}],(u=[{key:"prepare",value:function(R){w.isExt(R)&&(R.x14Id="{".concat(l(),"}").toUpperCase())}},{key:"render",value:function(R,E){if(w.isExt(E))switch(E.type){case"dataBar":this.renderDataBar(R,E);break;case"iconSet":this.renderIconSet(R,E)}}},{key:"renderDataBar",value:function(R,E){R.openNode(this.tag,{type:"dataBar",id:E.x14Id}),this.databarXform.render(R,E),R.closeNode()}},{key:"renderIconSet",value:function(R,E){R.openNode(this.tag,{type:"iconSet",priority:E.priority,id:E.x14Id||"{".concat(l(),"}")}),this.iconSetXform.render(R,E),R.closeNode()}},{key:"createNewModel",value:function(R){var E=R.attributes;return{type:E.type,x14Id:E.id,priority:s.toIntValue(E.priority)}}},{key:"onParserClose",value:function(R,E){Object.assign(this.model,E.model)}},{key:"tag",get:function(){return"x14:cfRule"}}])&&m(a.prototype,u),f&&m(a,f),w}(i);I.exports=o},{"../../base-xform":31,"../../composite-xform":47,"./databar-ext-xform":78,"./icon-set-ext-xform":80,uuid:526}],75:[function(d,I,T){function b(e){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function m(e,t){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var r,o=c(e);if(t){var n=c(this).constructor;r=Reflect.construct(o,arguments,n)}else r=o.apply(this,arguments);return p(this,r)}}function p(e,t){return!t||b(t)!=="object"&&typeof t!="function"?function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(e):t}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(e)}var l=d("../../composite-xform"),s=d("./f-ext-xform"),i=function(e){(function(a,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(u&&u.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),u&&v(a,u)})(n,e);var t,r,o=h(n);function n(){var a;return function(u,f){if(!(u instanceof f))throw new TypeError("Cannot call a class as a function")}(this,n),(a=o.call(this)).map={"xm:f":a.fExtXform=new s},a}return t=n,(r=[{key:"render",value:function(a,u){a.openNode(this.tag,{type:u.type}),u.value!==void 0&&this.fExtXform.render(a,u.value),a.closeNode()}},{key:"createNewModel",value:function(a){return{type:a.attributes.type}}},{key:"onParserClose",value:function(a,u){switch(a){case"xm:f":this.model.value=u.model?parseFloat(u.model):0}}},{key:"tag",get:function(){return"x14:cfvo"}}])&&m(t.prototype,r),n}(l);I.exports=i},{"../../composite-xform":47,"./f-ext-xform":79}],76:[function(d,I,T){function b(t){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(t)}function m(t,r){for(var o=0;o"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var o,n=c(t);if(r){var a=c(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return p(this,o)}}function p(t,r){return!r||b(r)!=="object"&&typeof r!="function"?function(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}(t):r}function c(t){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)})(t)}var l=d("../../composite-xform"),s=d("./sqref-ext-xform"),i=d("./cf-rule-ext-xform"),e=function(t){(function(u,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(f&&f.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),f&&v(u,f)})(a,t);var r,o,n=h(a);function a(){var u;return function(f,y){if(!(f instanceof y))throw new TypeError("Cannot call a class as a function")}(this,a),(u=n.call(this)).map={"xm:sqref":u.sqRef=new s,"x14:cfRule":u.cfRule=new i},u}return r=a,(o=[{key:"prepare",value:function(u,f){var y=this;u.rules.forEach(function(w){y.cfRule.prepare(w,f)})}},{key:"render",value:function(u,f){var y=this;f.rules.some(i.isExt)&&(u.openNode(this.tag,{"xmlns:xm":"http://schemas.microsoft.com/office/excel/2006/main"}),f.rules.filter(i.isExt).forEach(function(w){return y.cfRule.render(u,w)}),this.sqRef.render(u,f.ref),u.closeNode())}},{key:"createNewModel",value:function(){return{rules:[]}}},{key:"onParserClose",value:function(u,f){switch(u){case"xm:sqref":this.model.ref=f.model;break;case"x14:cfRule":this.model.rules.push(f.model)}}},{key:"tag",get:function(){return"x14:conditionalFormatting"}}])&&m(r.prototype,o),a}(l);I.exports=e},{"../../composite-xform":47,"./cf-rule-ext-xform":74,"./sqref-ext-xform":81}],77:[function(d,I,T){function b(t){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(t)}function m(t,r){for(var o=0;o"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var o,n=c(t);if(r){var a=c(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return p(this,o)}}function p(t,r){return!r||b(r)!=="object"&&typeof r!="function"?function(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}(t):r}function c(t){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)})(t)}var l=d("../../composite-xform"),s=d("./cf-rule-ext-xform"),i=d("./conditional-formatting-ext-xform"),e=function(t){(function(u,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(f&&f.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),f&&v(u,f)})(a,t);var r,o,n=h(a);function a(){var u;return function(f,y){if(!(f instanceof y))throw new TypeError("Cannot call a class as a function")}(this,a),(u=n.call(this)).map={"x14:conditionalFormatting":u.cfXform=new i},u}return r=a,(o=[{key:"hasContent",value:function(u){return u.hasExtContent===void 0&&(u.hasExtContent=u.some(function(f){return f.rules.some(s.isExt)})),u.hasExtContent}},{key:"prepare",value:function(u,f){var y=this;u.forEach(function(w){y.cfXform.prepare(w,f)})}},{key:"render",value:function(u,f){var y=this;this.hasContent(f)&&(u.openNode(this.tag),f.forEach(function(w){return y.cfXform.render(u,w)}),u.closeNode())}},{key:"createNewModel",value:function(){return[]}},{key:"onParserClose",value:function(u,f){this.model.push(f.model)}},{key:"tag",get:function(){return"x14:conditionalFormattings"}}])&&m(r.prototype,o),a}(l);I.exports=e},{"../../composite-xform":47,"./cf-rule-ext-xform":74,"./conditional-formatting-ext-xform":76}],78:[function(d,I,T){function b(n){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a})(n)}function m(n,a){return function(u){if(Array.isArray(u))return u}(n)||function(u,f){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(u)))){var y=[],w=!0,R=!1,E=void 0;try{for(var M,O=u[Symbol.iterator]();!(w=(M=O.next()).done)&&(y.push(M.value),!f||y.length!==f);w=!0);}catch(P){R=!0,E=P}finally{try{w||O.return==null||O.return()}finally{if(R)throw E}}return y}}(n,a)||function(u,f){if(u){if(typeof u=="string")return v(u,f);var y=Object.prototype.toString.call(u).slice(8,-1);if(y==="Object"&&u.constructor&&(y=u.constructor.name),y==="Map"||y==="Set")return Array.from(u);if(y==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(y))return v(u,f)}}(n,a)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function v(n,a){(a==null||a>n.length)&&(a=n.length);for(var u=0,f=new Array(a);u"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var u,f=s(n);if(a){var y=s(this).constructor;u=Reflect.construct(f,arguments,y)}else u=f.apply(this,arguments);return l(this,u)}}function l(n,a){return!a||b(a)!=="object"&&typeof a!="function"?function(u){if(u===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return u}(n):a}function s(n){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(a){return a.__proto__||Object.getPrototypeOf(a)})(n)}var i=d("../../base-xform"),e=d("../../composite-xform"),t=d("../../style/color-xform"),r=d("./cfvo-ext-xform"),o=function(n){(function(R,E){if(typeof E!="function"&&E!==null)throw new TypeError("Super expression must either be null or a function");R.prototype=Object.create(E&&E.prototype,{constructor:{value:R,writable:!0,configurable:!0}}),E&&p(R,E)})(w,n);var a,u,f,y=c(w);function w(){var R;return function(E,M){if(!(E instanceof M))throw new TypeError("Cannot call a class as a function")}(this,w),(R=y.call(this)).map={"x14:cfvo":R.cfvoXform=new r,"x14:borderColor":R.borderColorXform=new t("x14:borderColor"),"x14:negativeBorderColor":R.negativeBorderColorXform=new t("x14:negativeBorderColor"),"x14:negativeFillColor":R.negativeFillColorXform=new t("x14:negativeFillColor"),"x14:axisColor":R.axisColorXform=new t("x14:axisColor")},R}return a=w,f=[{key:"isExt",value:function(R){return!R.gradient}}],(u=[{key:"render",value:function(R,E){var M=this;R.openNode(this.tag,{minLength:i.toIntAttribute(E.minLength,0,!0),maxLength:i.toIntAttribute(E.maxLength,100,!0),border:i.toBoolAttribute(E.border,!1),gradient:i.toBoolAttribute(E.gradient,!0),negativeBarColorSameAsPositive:i.toBoolAttribute(E.negativeBarColorSameAsPositive,!0),negativeBarBorderColorSameAsPositive:i.toBoolAttribute(E.negativeBarBorderColorSameAsPositive,!0),axisPosition:i.toAttribute(E.axisPosition,"auto"),direction:i.toAttribute(E.direction,"leftToRight")}),E.cfvo.forEach(function(O){M.cfvoXform.render(R,O)}),this.borderColorXform.render(R,E.borderColor),this.negativeBorderColorXform.render(R,E.negativeBorderColor),this.negativeFillColorXform.render(R,E.negativeFillColor),this.axisColorXform.render(R,E.axisColor),R.closeNode()}},{key:"createNewModel",value:function(R){var E=R.attributes;return{cfvo:[],minLength:i.toIntValue(E.minLength,0),maxLength:i.toIntValue(E.maxLength,100),border:i.toBoolValue(E.border,!1),gradient:i.toBoolValue(E.gradient,!0),negativeBarColorSameAsPositive:i.toBoolValue(E.negativeBarColorSameAsPositive,!0),negativeBarBorderColorSameAsPositive:i.toBoolValue(E.negativeBarBorderColorSameAsPositive,!0),axisPosition:i.toStringValue(E.axisPosition,"auto"),direction:i.toStringValue(E.direction,"leftToRight")}}},{key:"onParserClose",value:function(R,E){var M=m(R.split(":"),2)[1];switch(M){case"cfvo":this.model.cfvo.push(E.model);break;default:this.model[M]=E.model}}},{key:"tag",get:function(){return"x14:dataBar"}}])&&h(a.prototype,u),f&&h(a,f),w}(e);I.exports=o},{"../../base-xform":31,"../../composite-xform":47,"../../style/color-xform":127,"./cfvo-ext-xform":75}],79:[function(d,I,T){function b(i){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(i)}function m(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function v(i,e){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var t,r=l(i);if(e){var o=l(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return c(this,t)}}function c(i,e){return!e||b(e)!=="object"&&typeof e!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(i):e}function l(i){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(i)}var s=function(i){(function(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(a&&a.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),a&&h(n,a)})(o,i);var e,t,r=p(o);function o(){return m(this,o),r.apply(this,arguments)}return e=o,(t=[{key:"render",value:function(n,a){n.leafNode(this.tag,null,a)}},{key:"parseOpen",value:function(){this.model=""}},{key:"parseText",value:function(n){this.model+=n}},{key:"parseClose",value:function(n){return n!==this.tag}},{key:"tag",get:function(){return"xm:f"}}])&&v(e.prototype,t),o}(d("../../base-xform"));I.exports=s},{"../../base-xform":31}],80:[function(d,I,T){function b(n){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a})(n)}function m(n,a){return function(u){if(Array.isArray(u))return u}(n)||function(u,f){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(u)))){var y=[],w=!0,R=!1,E=void 0;try{for(var M,O=u[Symbol.iterator]();!(w=(M=O.next()).done)&&(y.push(M.value),!f||y.length!==f);w=!0);}catch(P){R=!0,E=P}finally{try{w||O.return==null||O.return()}finally{if(R)throw E}}return y}}(n,a)||function(u,f){if(u){if(typeof u=="string")return v(u,f);var y=Object.prototype.toString.call(u).slice(8,-1);if(y==="Object"&&u.constructor&&(y=u.constructor.name),y==="Map"||y==="Set")return Array.from(u);if(y==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(y))return v(u,f)}}(n,a)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function v(n,a){(a==null||a>n.length)&&(a=n.length);for(var u=0,f=new Array(a);u"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var u,f=s(n);if(a){var y=s(this).constructor;u=Reflect.construct(f,arguments,y)}else u=f.apply(this,arguments);return l(this,u)}}function l(n,a){return!a||b(a)!=="object"&&typeof a!="function"?function(u){if(u===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return u}(n):a}function s(n){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(a){return a.__proto__||Object.getPrototypeOf(a)})(n)}var i=d("../../base-xform"),e=d("../../composite-xform"),t=d("./cfvo-ext-xform"),r=d("./cf-icon-ext-xform"),o=function(n){(function(w,R){if(typeof R!="function"&&R!==null)throw new TypeError("Super expression must either be null or a function");w.prototype=Object.create(R&&R.prototype,{constructor:{value:w,writable:!0,configurable:!0}}),R&&p(w,R)})(y,n);var a,u,f=c(y);function y(){var w;return function(R,E){if(!(R instanceof E))throw new TypeError("Cannot call a class as a function")}(this,y),(w=f.call(this)).map={"x14:cfvo":w.cfvoXform=new t,"x14:cfIcon":w.cfIconXform=new r},w}return a=y,(u=[{key:"render",value:function(w,R){var E=this;w.openNode(this.tag,{iconSet:i.toStringAttribute(R.iconSet),reverse:i.toBoolAttribute(R.reverse,!1),showValue:i.toBoolAttribute(R.showValue,!0),custom:i.toBoolAttribute(R.icons,!1)}),R.cfvo.forEach(function(M){E.cfvoXform.render(w,M)}),R.icons&&R.icons.forEach(function(M,O){M.iconId=O,E.cfIconXform.render(w,M)}),w.closeNode()}},{key:"createNewModel",value:function(w){var R=w.attributes;return{cfvo:[],iconSet:i.toStringValue(R.iconSet,"3TrafficLights"),reverse:i.toBoolValue(R.reverse,!1),showValue:i.toBoolValue(R.showValue,!0)}}},{key:"onParserClose",value:function(w,R){var E=m(w.split(":"),2)[1];switch(E){case"cfvo":this.model.cfvo.push(R.model);break;case"cfIcon":this.model.icons||(this.model.icons=[]),this.model.icons.push(R.model);break;default:this.model[E]=R.model}}},{key:"tag",get:function(){return"x14:iconSet"}}])&&h(a.prototype,u),y}(e);I.exports=o},{"../../base-xform":31,"../../composite-xform":47,"./cf-icon-ext-xform":73,"./cfvo-ext-xform":75}],81:[function(d,I,T){function b(i){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(i)}function m(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function v(i,e){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var t,r=l(i);if(e){var o=l(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return c(this,t)}}function c(i,e){return!e||b(e)!=="object"&&typeof e!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(i):e}function l(i){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(i)}var s=function(i){(function(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(a&&a.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),a&&h(n,a)})(o,i);var e,t,r=p(o);function o(){return m(this,o),r.apply(this,arguments)}return e=o,(t=[{key:"render",value:function(n,a){n.leafNode(this.tag,null,a)}},{key:"parseOpen",value:function(){this.model=""}},{key:"parseText",value:function(n){this.model+=n}},{key:"parseClose",value:function(n){return n!==this.tag}},{key:"tag",get:function(){return"xm:sqref"}}])&&v(e.prototype,t),o}(d("../../base-xform"));I.exports=s},{"../../base-xform":31}],82:[function(d,I,T){function b(R){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(E){return typeof E}:function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E})(R)}function m(R,E){var M=Object.keys(R);if(Object.getOwnPropertySymbols){var O=Object.getOwnPropertySymbols(R);E&&(O=O.filter(function(P){return Object.getOwnPropertyDescriptor(R,P).enumerable})),M.push.apply(M,O)}return M}function v(R){for(var E=1;E"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var M,O=i(R);if(E){var P=i(this).constructor;M=Reflect.construct(O,arguments,P)}else M=O.apply(this,arguments);return s(this,M)}}function s(R,E){return!E||b(E)!=="object"&&typeof E!="function"?function(M){if(M===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return M}(R):E}function i(R){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(E){return E.__proto__||Object.getPrototypeOf(E)})(R)}var e=d("../../base-xform"),t=d("../../composite-xform"),r=d("../../../../doc/range"),o=d("./databar-xform"),n=d("./ext-lst-ref-xform"),a=d("./formula-xform"),u=d("./color-scale-xform"),f=d("./icon-set-xform"),y={"3Triangles":!0,"3Stars":!0,"5Boxes":!0},w=function(R){(function(S,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function");S.prototype=Object.create(g&&g.prototype,{constructor:{value:S,writable:!0,configurable:!0}}),g&&c(S,g)})(_,R);var E,M,O,P=l(_);function _(){var S;return function(g,j){if(!(g instanceof j))throw new TypeError("Cannot call a class as a function")}(this,_),(S=P.call(this)).map={dataBar:S.databarXform=new o,extLst:S.extLstRefXform=new n,formula:S.formulaXform=new a,colorScale:S.colorScaleXform=new u,iconSet:S.iconSetXform=new f},S}return E=_,O=[{key:"isPrimitive",value:function(S){return S.type!=="iconSet"||!S.custom&&!y[S.iconSet]}}],(M=[{key:"render",value:function(S,g){switch(g.type){case"expression":this.renderExpression(S,g);break;case"cellIs":this.renderCellIs(S,g);break;case"top10":this.renderTop10(S,g);break;case"aboveAverage":this.renderAboveAverage(S,g);break;case"dataBar":this.renderDataBar(S,g);break;case"colorScale":this.renderColorScale(S,g);break;case"iconSet":this.renderIconSet(S,g);break;case"containsText":this.renderText(S,g);break;case"timePeriod":this.renderTimePeriod(S,g)}}},{key:"renderExpression",value:function(S,g){S.openNode(this.tag,{type:"expression",dxfId:g.dxfId,priority:g.priority}),this.formulaXform.render(S,g.formulae[0]),S.closeNode()}},{key:"renderCellIs",value:function(S,g){var j=this;S.openNode(this.tag,{type:"cellIs",dxfId:g.dxfId,priority:g.priority,operator:g.operator}),g.formulae.forEach(function(k){j.formulaXform.render(S,k)}),S.closeNode()}},{key:"renderTop10",value:function(S,g){S.leafNode(this.tag,{type:"top10",dxfId:g.dxfId,priority:g.priority,percent:e.toBoolAttribute(g.percent,!1),bottom:e.toBoolAttribute(g.bottom,!1),rank:e.toIntValue(g.rank,10,!0)})}},{key:"renderAboveAverage",value:function(S,g){S.leafNode(this.tag,{type:"aboveAverage",dxfId:g.dxfId,priority:g.priority,aboveAverage:e.toBoolAttribute(g.aboveAverage,!0)})}},{key:"renderDataBar",value:function(S,g){S.openNode(this.tag,{type:"dataBar",priority:g.priority}),this.databarXform.render(S,g),this.extLstRefXform.render(S,g),S.closeNode()}},{key:"renderColorScale",value:function(S,g){S.openNode(this.tag,{type:"colorScale",priority:g.priority}),this.colorScaleXform.render(S,g),S.closeNode()}},{key:"renderIconSet",value:function(S,g){_.isPrimitive(g)&&(S.openNode(this.tag,{type:"iconSet",priority:g.priority}),this.iconSetXform.render(S,g),S.closeNode())}},{key:"renderText",value:function(S,g){S.openNode(this.tag,{type:g.operator,dxfId:g.dxfId,priority:g.priority,operator:e.toStringAttribute(g.operator,"containsText")});var j=function(k){if(k.formulae&&k.formulae[0])return k.formulae[0];var x=new r(k.ref).tl;switch(k.operator){case"containsText":return'NOT(ISERROR(SEARCH("'.concat(k.text,'",').concat(x,")))");case"containsBlanks":return"LEN(TRIM(".concat(x,"))=0");case"notContainsBlanks":return"LEN(TRIM(".concat(x,"))>0");case"containsErrors":return"ISERROR(".concat(x,")");case"notContainsErrors":return"NOT(ISERROR(".concat(x,"))");default:return}}(g);j&&this.formulaXform.render(S,j),S.closeNode()}},{key:"renderTimePeriod",value:function(S,g){S.openNode(this.tag,{type:"timePeriod",dxfId:g.dxfId,priority:g.priority,timePeriod:g.timePeriod});var j=function(k){if(k.formulae&&k.formulae[0])return k.formulae[0];var x=new r(k.ref).tl;switch(k.timePeriod){case"thisWeek":return"AND(TODAY()-ROUNDDOWN(".concat(x,",0)<=WEEKDAY(TODAY())-1,ROUNDDOWN(").concat(x,",0)-TODAY()<=7-WEEKDAY(TODAY()))");case"lastWeek":return"AND(TODAY()-ROUNDDOWN(".concat(x,",0)>=(WEEKDAY(TODAY())),TODAY()-ROUNDDOWN(").concat(x,",0)<(WEEKDAY(TODAY())+7))");case"nextWeek":return"AND(ROUNDDOWN(".concat(x,",0)-TODAY()>(7-WEEKDAY(TODAY())),ROUNDDOWN(").concat(x,",0)-TODAY()<(15-WEEKDAY(TODAY())))");case"yesterday":return"FLOOR(".concat(x,",1)=TODAY()-1");case"today":return"FLOOR(".concat(x,",1)=TODAY()");case"tomorrow":return"FLOOR(".concat(x,",1)=TODAY()+1");case"last7Days":return"AND(TODAY()-FLOOR(".concat(x,",1)<=6,FLOOR(").concat(x,",1)<=TODAY())");case"lastMonth":return"AND(MONTH(".concat(x,")=MONTH(EDATE(TODAY(),0-1)),YEAR(").concat(x,")=YEAR(EDATE(TODAY(),0-1)))");case"thisMonth":return"AND(MONTH(".concat(x,")=MONTH(TODAY()),YEAR(").concat(x,")=YEAR(TODAY()))");case"nextMonth":return"AND(MONTH(".concat(x,")=MONTH(EDATE(TODAY(),0+1)),YEAR(").concat(x,")=YEAR(EDATE(TODAY(),0+1)))");default:return}}(g);j&&this.formulaXform.render(S,j),S.closeNode()}},{key:"createNewModel",value:function(S){var g=S.attributes;return v(v({},function(j){var k=j.type,x=j.operator;switch(k){case"containsText":case"containsBlanks":case"notContainsBlanks":case"containsErrors":case"notContainsErrors":return{type:"containsText",operator:k};default:return{type:k,operator:x}}}(g)),{},{dxfId:e.toIntValue(g.dxfId),priority:e.toIntValue(g.priority),timePeriod:g.timePeriod,percent:e.toBoolValue(g.percent),bottom:e.toBoolValue(g.bottom),rank:e.toIntValue(g.rank),aboveAverage:e.toBoolValue(g.aboveAverage)})}},{key:"onParserClose",value:function(S,g){switch(S){case"dataBar":case"extLst":case"colorScale":case"iconSet":Object.assign(this.model,g.model);break;case"formula":this.model.formulae=this.model.formulae||[],this.model.formulae.push(g.model)}}},{key:"tag",get:function(){return"cfRule"}}])&&p(E.prototype,M),O&&p(E,O),_}(t);I.exports=w},{"../../../../doc/range":10,"../../base-xform":31,"../../composite-xform":47,"./color-scale-xform":84,"./databar-xform":87,"./ext-lst-ref-xform":88,"./formula-xform":89,"./icon-set-xform":90}],83:[function(d,I,T){function b(e){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var r,o=l(e);if(t){var n=l(this).constructor;r=Reflect.construct(o,arguments,n)}else r=o.apply(this,arguments);return c(this,r)}}function c(e,t){return!t||b(t)!=="object"&&typeof t!="function"?function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(e):t}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(e)}var s=d("../../base-xform"),i=function(e){(function(a,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(u&&u.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),u&&h(a,u)})(n,e);var t,r,o=p(n);function n(){return m(this,n),o.apply(this,arguments)}return t=n,(r=[{key:"render",value:function(a,u){a.leafNode(this.tag,{type:u.type,val:u.value})}},{key:"parseOpen",value:function(a){this.model={type:a.attributes.type,value:s.toFloatValue(a.attributes.val)}}},{key:"parseClose",value:function(a){return a!==this.tag}},{key:"tag",get:function(){return"cfvo"}}])&&v(t.prototype,r),n}(s);I.exports=i},{"../../base-xform":31}],84:[function(d,I,T){function b(t){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(t)}function m(t,r){for(var o=0;o"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var o,n=c(t);if(r){var a=c(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return p(this,o)}}function p(t,r){return!r||b(r)!=="object"&&typeof r!="function"?function(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}(t):r}function c(t){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)})(t)}var l=d("../../composite-xform"),s=d("../../style/color-xform"),i=d("./cfvo-xform"),e=function(t){(function(u,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(f&&f.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),f&&v(u,f)})(a,t);var r,o,n=h(a);function a(){var u;return function(f,y){if(!(f instanceof y))throw new TypeError("Cannot call a class as a function")}(this,a),(u=n.call(this)).map={cfvo:u.cfvoXform=new i,color:u.colorXform=new s},u}return r=a,(o=[{key:"render",value:function(u,f){var y=this;u.openNode(this.tag),f.cfvo.forEach(function(w){y.cfvoXform.render(u,w)}),f.color.forEach(function(w){y.colorXform.render(u,w)}),u.closeNode()}},{key:"createNewModel",value:function(u){return{cfvo:[],color:[]}}},{key:"onParserClose",value:function(u,f){this.model[u].push(f.model)}},{key:"tag",get:function(){return"colorScale"}}])&&m(r.prototype,o),a}(l);I.exports=e},{"../../composite-xform":47,"../../style/color-xform":127,"./cfvo-xform":83}],85:[function(d,I,T){function b(e){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function m(e,t){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var r,o=c(e);if(t){var n=c(this).constructor;r=Reflect.construct(o,arguments,n)}else r=o.apply(this,arguments);return p(this,r)}}function p(e,t){return!t||b(t)!=="object"&&typeof t!="function"?function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(e):t}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(e)}var l=d("../../composite-xform"),s=d("./cf-rule-xform"),i=function(e){(function(a,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(u&&u.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),u&&v(a,u)})(n,e);var t,r,o=h(n);function n(){var a;return function(u,f){if(!(u instanceof f))throw new TypeError("Cannot call a class as a function")}(this,n),(a=o.call(this)).map={cfRule:new s},a}return t=n,(r=[{key:"render",value:function(a,u){var f=this;u.rules.some(s.isPrimitive)&&(a.openNode(this.tag,{sqref:u.ref}),u.rules.forEach(function(y){s.isPrimitive(y)&&(y.ref=u.ref,f.map.cfRule.render(a,y))}),a.closeNode())}},{key:"createNewModel",value:function(a){return{ref:a.attributes.sqref,rules:[]}}},{key:"onParserClose",value:function(a,u){this.model.rules.push(u.model)}},{key:"tag",get:function(){return"conditionalFormatting"}}])&&m(t.prototype,r),n}(l);I.exports=i},{"../../composite-xform":47,"./cf-rule-xform":82}],86:[function(d,I,T){function b(r){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o})(r)}function m(r){return function(o){if(Array.isArray(o))return v(o)}(r)||function(o){if(typeof Symbol<"u"&&Symbol.iterator in Object(o))return Array.from(o)}(r)||function(o,n){if(o){if(typeof o=="string")return v(o,n);var a=Object.prototype.toString.call(o).slice(8,-1);if(a==="Object"&&o.constructor&&(a=o.constructor.name),a==="Map"||a==="Set")return Array.from(o);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return v(o,n)}}(r)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function v(r,o){(o==null||o>r.length)&&(o=r.length);for(var n=0,a=new Array(o);n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var n,a=s(r);if(o){var u=s(this).constructor;n=Reflect.construct(a,arguments,u)}else n=a.apply(this,arguments);return l(this,n)}}function l(r,o){return!o||b(o)!=="object"&&typeof o!="function"?function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(r):o}function s(r){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(r)}var i=d("../../base-xform"),e=d("./conditional-formatting-xform"),t=function(r){(function(f,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function");f.prototype=Object.create(y&&y.prototype,{constructor:{value:f,writable:!0,configurable:!0}}),y&&p(f,y)})(u,r);var o,n,a=c(u);function u(){var f;return function(y,w){if(!(y instanceof w))throw new TypeError("Cannot call a class as a function")}(this,u),(f=a.call(this)).cfXform=new e,f}return o=u,(n=[{key:"reset",value:function(){this.model=[]}},{key:"prepare",value:function(f,y){var w=f.reduce(function(R,E){return Math.max.apply(Math,[R].concat(m(E.rules.map(function(M){return M.priority||0}))))},1);f.forEach(function(R){R.rules.forEach(function(E){E.priority||(E.priority=w++),E.style&&(E.dxfId=y.styles.addDxfStyle(E.style))})})}},{key:"render",value:function(f,y){var w=this;y.forEach(function(R){w.cfXform.render(f,R)})}},{key:"parseOpen",value:function(f){if(this.parser)return this.parser.parseOpen(f),!0;switch(f.name){case"conditionalFormatting":return this.parser=this.cfXform,this.parser.parseOpen(f),!0;default:return!1}}},{key:"parseText",value:function(f){this.parser&&this.parser.parseText(f)}},{key:"parseClose",value:function(f){return!(!this.parser||!this.parser.parseClose(f)&&(this.model.push(this.parser.model),this.parser=void 0,1))}},{key:"reconcile",value:function(f,y){f.forEach(function(w){w.rules.forEach(function(R){R.dxfId!==void 0&&(R.style=y.styles.getDxfStyle(R.dxfId),delete R.dxfId)})})}},{key:"tag",get:function(){return"conditionalFormatting"}}])&&h(o.prototype,n),u}(i);I.exports=t},{"../../base-xform":31,"./conditional-formatting-xform":85}],87:[function(d,I,T){function b(t){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(t)}function m(t,r){for(var o=0;o"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var o,n=c(t);if(r){var a=c(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return p(this,o)}}function p(t,r){return!r||b(r)!=="object"&&typeof r!="function"?function(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}(t):r}function c(t){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)})(t)}var l=d("../../composite-xform"),s=d("../../style/color-xform"),i=d("./cfvo-xform"),e=function(t){(function(u,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(f&&f.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),f&&v(u,f)})(a,t);var r,o,n=h(a);function a(){var u;return function(f,y){if(!(f instanceof y))throw new TypeError("Cannot call a class as a function")}(this,a),(u=n.call(this)).map={cfvo:u.cfvoXform=new i,color:u.colorXform=new s},u}return r=a,(o=[{key:"render",value:function(u,f){var y=this;u.openNode(this.tag),f.cfvo.forEach(function(w){y.cfvoXform.render(u,w)}),this.colorXform.render(u,f.color),u.closeNode()}},{key:"createNewModel",value:function(){return{cfvo:[]}}},{key:"onParserClose",value:function(u,f){switch(u){case"cfvo":this.model.cfvo.push(f.model);break;case"color":this.model.color=f.model}}},{key:"tag",get:function(){return"dataBar"}}])&&m(r.prototype,o),a}(l);I.exports=e},{"../../composite-xform":47,"../../style/color-xform":127,"./cfvo-xform":83}],88:[function(d,I,T){function b(a){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u})(a)}function m(a,u){if(!(a instanceof u))throw new TypeError("Cannot call a class as a function")}function v(a,u){for(var f=0;f"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var f,y=i(a);if(u){var w=i(this).constructor;f=Reflect.construct(y,arguments,w)}else f=y.apply(this,arguments);return s(this,f)}}function s(a,u){return!u||b(u)!=="object"&&typeof u!="function"?function(f){if(f===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f}(a):u}function i(a){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(u){return u.__proto__||Object.getPrototypeOf(u)})(a)}var e=d("../../base-xform"),t=d("../../composite-xform"),r=function(a){p(f,a);var u=l(f);function f(){return m(this,f),u.apply(this,arguments)}return h(f,[{key:"render",value:function(y,w){y.leafNode(this.tag,null,w)}},{key:"parseOpen",value:function(){this.model=""}},{key:"parseText",value:function(y){this.model+=y}},{key:"parseClose",value:function(y){return y!==this.tag}},{key:"tag",get:function(){return"x14:id"}}]),f}(e),o=function(a){p(f,a);var u=l(f);function f(){var y;return m(this,f),(y=u.call(this)).map={"x14:id":y.idXform=new r},y}return h(f,[{key:"render",value:function(y,w){y.openNode(this.tag,{uri:"{B025F937-C7B1-47D3-B67F-A62EFF666E3E}","xmlns:x14":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"}),this.idXform.render(y,w.x14Id),y.closeNode()}},{key:"createNewModel",value:function(){return{}}},{key:"onParserClose",value:function(y,w){this.model.x14Id=w.model}},{key:"tag",get:function(){return"ext"}}]),f}(t),n=function(a){p(f,a);var u=l(f);function f(){var y;return m(this,f),(y=u.call(this)).map={ext:new o},y}return h(f,[{key:"render",value:function(y,w){y.openNode(this.tag),this.map.ext.render(y,w),y.closeNode()}},{key:"createNewModel",value:function(){return{}}},{key:"onParserClose",value:function(y,w){Object.assign(this.model,w.model)}},{key:"tag",get:function(){return"extLst"}}]),f}(t);I.exports=n},{"../../base-xform":31,"../../composite-xform":47}],89:[function(d,I,T){function b(i){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(i)}function m(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function v(i,e){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var t,r=l(i);if(e){var o=l(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return c(this,t)}}function c(i,e){return!e||b(e)!=="object"&&typeof e!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(i):e}function l(i){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(i)}var s=function(i){(function(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(a&&a.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),a&&h(n,a)})(o,i);var e,t,r=p(o);function o(){return m(this,o),r.apply(this,arguments)}return e=o,(t=[{key:"render",value:function(n,a){n.leafNode(this.tag,null,a)}},{key:"parseOpen",value:function(){this.model=""}},{key:"parseText",value:function(n){this.model+=n}},{key:"parseClose",value:function(n){return n!==this.tag}},{key:"tag",get:function(){return"formula"}}])&&v(e.prototype,t),o}(d("../../base-xform"));I.exports=s},{"../../base-xform":31}],90:[function(d,I,T){function b(t){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(t)}function m(t,r){for(var o=0;o"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var o,n=c(t);if(r){var a=c(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return p(this,o)}}function p(t,r){return!r||b(r)!=="object"&&typeof r!="function"?function(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}(t):r}function c(t){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)})(t)}var l=d("../../base-xform"),s=d("../../composite-xform"),i=d("./cfvo-xform"),e=function(t){(function(u,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(f&&f.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),f&&v(u,f)})(a,t);var r,o,n=h(a);function a(){var u;return function(f,y){if(!(f instanceof y))throw new TypeError("Cannot call a class as a function")}(this,a),(u=n.call(this)).map={cfvo:u.cfvoXform=new i},u}return r=a,(o=[{key:"render",value:function(u,f){var y=this;u.openNode(this.tag,{iconSet:l.toStringAttribute(f.iconSet,"3TrafficLights"),reverse:l.toBoolAttribute(f.reverse,!1),showValue:l.toBoolAttribute(f.showValue,!0)}),f.cfvo.forEach(function(w){y.cfvoXform.render(u,w)}),u.closeNode()}},{key:"createNewModel",value:function(u){var f=u.attributes;return{iconSet:l.toStringValue(f.iconSet,"3TrafficLights"),reverse:l.toBoolValue(f.reverse),showValue:l.toBoolValue(f.showValue),cfvo:[]}}},{key:"onParserClose",value:function(u,f){this.model[u].push(f.model)}},{key:"tag",get:function(){return"iconSet"}}])&&m(r.prototype,o),a}(s);I.exports=e},{"../../base-xform":31,"../../composite-xform":47,"./cfvo-xform":83}],91:[function(d,I,T){function b(i){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(i)}function m(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function v(i,e){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var t,r=l(i);if(e){var o=l(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return c(this,t)}}function c(i,e){return!e||b(e)!=="object"&&typeof e!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(i):e}function l(i){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(i)}var s=function(i){(function(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(a&&a.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),a&&h(n,a)})(o,i);var e,t,r=p(o);function o(){return m(this,o),r.apply(this,arguments)}return e=o,(t=[{key:"prepare",value:function(n,a){var u=a.styles.addStyleModel(n.style||{});u&&(n.styleId=u)}},{key:"render",value:function(n,a){n.openNode("col"),n.addAttribute("min",a.min),n.addAttribute("max",a.max),a.width&&n.addAttribute("width",a.width),a.styleId&&n.addAttribute("style",a.styleId),a.hidden&&n.addAttribute("hidden","1"),a.bestFit&&n.addAttribute("bestFit","1"),a.outlineLevel&&n.addAttribute("outlineLevel",a.outlineLevel),a.collapsed&&n.addAttribute("collapsed","1"),n.addAttribute("customWidth","1"),n.closeNode()}},{key:"parseOpen",value:function(n){if(n.name==="col"){var a=this.model={min:parseInt(n.attributes.min||"0",10),max:parseInt(n.attributes.max||"0",10),width:n.attributes.width===void 0?void 0:parseFloat(n.attributes.width||"0")};return n.attributes.style&&(a.styleId=parseInt(n.attributes.style,10)),n.attributes.hidden!==!0&&n.attributes.hidden!=="true"&&n.attributes.hidden!==1&&n.attributes.hidden!=="1"||(a.hidden=!0),n.attributes.bestFit&&(a.bestFit=!0),n.attributes.outlineLevel&&(a.outlineLevel=parseInt(n.attributes.outlineLevel,10)),n.attributes.collapsed&&(a.collapsed=!0),!0}return!1}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"reconcile",value:function(n,a){n.styleId&&(n.style=a.styles.getStyleModel(n.styleId))}},{key:"tag",get:function(){return"col"}}])&&v(e.prototype,t),o}(d("../base-xform"));I.exports=s},{"../base-xform":31}],92:[function(d,I,T){function b(w){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(R){return typeof R}:function(R){return R&&typeof Symbol=="function"&&R.constructor===Symbol&&R!==Symbol.prototype?"symbol":typeof R})(w)}function m(w,R){if(!(w instanceof R))throw new TypeError("Cannot call a class as a function")}function v(w,R){for(var E=0;E"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var E,M=l(w);if(R){var O=l(this).constructor;E=Reflect.construct(M,arguments,O)}else E=M.apply(this,arguments);return c(this,E)}}function c(w,R){return!R||b(R)!=="object"&&typeof R!="function"?function(E){if(E===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E}(w):R}function l(w){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(R){return R.__proto__||Object.getPrototypeOf(R)})(w)}function s(w,R){var E=Object.keys(w);if(Object.getOwnPropertySymbols){var M=Object.getOwnPropertySymbols(w);R&&(M=M.filter(function(O){return Object.getOwnPropertyDescriptor(w,O).enumerable})),E.push.apply(E,M)}return E}function i(w){for(var R=1;R1||U>1){var q=D.row+(F-1),$=D.col+(U-1);return i(i({},C.dataValidation),{},{sqref:"".concat(C.address,":").concat(o.encodeAddress(q,$))})}return i(i({},C.dataValidation),{},{sqref:C.address})}return null}).filter(Boolean)}(_);S.length&&(P.openNode("dataValidations",{count:S.length}),S.forEach(function(g){P.openNode("dataValidation"),g.type!=="any"&&(P.addAttribute("type",g.type),g.operator&&g.type!=="list"&&g.operator!=="between"&&P.addAttribute("operator",g.operator),g.allowBlank&&P.addAttribute("allowBlank","1")),g.showInputMessage&&P.addAttribute("showInputMessage","1"),g.promptTitle&&P.addAttribute("promptTitle",g.promptTitle),g.prompt&&P.addAttribute("prompt",g.prompt),g.showErrorMessage&&P.addAttribute("showErrorMessage","1"),g.errorStyle&&P.addAttribute("errorStyle",g.errorStyle),g.errorTitle&&P.addAttribute("errorTitle",g.errorTitle),g.error&&P.addAttribute("error",g.error),P.addAttribute("sqref",g.sqref),(g.formulae||[]).forEach(function(j,k){P.openNode("formula".concat(k+1)),g.type==="date"?P.writeText(r.dateToExcel(new Date(j))):P.writeText(j),P.closeNode()}),P.closeNode()}),P.closeNode())}},{key:"parseOpen",value:function(P){switch(P.name){case"dataValidations":return this.model={},!0;case"dataValidation":this._address=P.attributes.sqref;var _={type:P.attributes.type||"any",formulae:[]};switch(P.attributes.type&&f(_,P.attributes,"allowBlank"),f(_,P.attributes,"showInputMessage"),f(_,P.attributes,"showErrorMessage"),_.type){case"any":case"list":case"custom":break;default:u(_,P.attributes,"operator","between")}return u(_,P.attributes,"promptTitle"),u(_,P.attributes,"prompt"),u(_,P.attributes,"errorStyle"),u(_,P.attributes,"errorTitle"),u(_,P.attributes,"error"),this._dataValidation=_,!0;case"formula1":case"formula2":return this._formula=[],!0;default:return!1}}},{key:"parseText",value:function(P){this._formula&&this._formula.push(P)}},{key:"parseClose",value:function(P){var _=this;switch(P){case"dataValidations":return!1;case"dataValidation":return this._dataValidation.formulae&&this._dataValidation.formulae.length||(delete this._dataValidation.formulae,delete this._dataValidation.operator),(this._address.split(/\s+/g)||[]).forEach(function(g){g.includes(":")?new a(g).forEachAddress(function(j){_.model[j]=_._dataValidation}):_.model[g]=_._dataValidation}),!0;case"formula1":case"formula2":var S=this._formula.join("");switch(this._dataValidation.type){case"whole":case"textLength":S=parseInt(S,10);break;case"decimal":S=parseFloat(S);break;case"date":S=r.excelToDate(parseFloat(S))}return this._dataValidation.formulae.push(S),this._formula=void 0,!0;default:return!0}}},{key:"tag",get:function(){return"dataValidations"}}])&&v(R.prototype,E),O}(n);I.exports=y},{"../../../doc/range":10,"../../../utils/col-cache":19,"../../../utils/under-dash":25,"../../../utils/utils":26,"../base-xform":31}],93:[function(d,I,T){function b(i){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(i)}function m(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function v(i,e){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var t,r=l(i);if(e){var o=l(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return c(this,t)}}function c(i,e){return!e||b(e)!=="object"&&typeof e!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(i):e}function l(i){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(i)}var s=function(i){(function(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(a&&a.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),a&&h(n,a)})(o,i);var e,t,r=p(o);function o(){return m(this,o),r.apply(this,arguments)}return e=o,(t=[{key:"render",value:function(n,a){a&&n.leafNode("dimension",{ref:a})}},{key:"parseOpen",value:function(n){return n.name==="dimension"&&(this.model=n.attributes.ref,!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"dimension"}}])&&v(e.prototype,t),o}(d("../base-xform"));I.exports=s},{"../base-xform":31}],94:[function(d,I,T){function b(i){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(i)}function m(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function v(i,e){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var t,r=l(i);if(e){var o=l(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return c(this,t)}}function c(i,e){return!e||b(e)!=="object"&&typeof e!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(i):e}function l(i){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(i)}var s=function(i){(function(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(a&&a.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),a&&h(n,a)})(o,i);var e,t,r=p(o);function o(){return m(this,o),r.apply(this,arguments)}return e=o,(t=[{key:"render",value:function(n,a){a&&n.leafNode(this.tag,{"r:id":a.rId})}},{key:"parseOpen",value:function(n){switch(n.name){case this.tag:return this.model={rId:n.attributes["r:id"]},!0;default:return!1}}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"drawing"}}])&&v(e.prototype,t),o}(d("../base-xform"));I.exports=s},{"../base-xform":31}],95:[function(d,I,T){function b(n){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a})(n)}function m(n,a){if(!(n instanceof a))throw new TypeError("Cannot call a class as a function")}function v(n,a){for(var u=0;u"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var u,f=i(n);if(a){var y=i(this).constructor;u=Reflect.construct(f,arguments,y)}else u=f.apply(this,arguments);return s(this,u)}}function s(n,a){return!a||b(a)!=="object"&&typeof a!="function"?function(u){if(u===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return u}(n):a}function i(n){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(a){return a.__proto__||Object.getPrototypeOf(a)})(n)}var e=d("../composite-xform"),t=d("./cf-ext/conditional-formattings-ext-xform"),r=function(n){p(u,n);var a=l(u);function u(){var f;return m(this,u),(f=a.call(this)).map={"x14:conditionalFormattings":f.conditionalFormattings=new t},f}return h(u,[{key:"hasContent",value:function(f){return this.conditionalFormattings.hasContent(f.conditionalFormattings)}},{key:"prepare",value:function(f,y){this.conditionalFormattings.prepare(f.conditionalFormattings,y)}},{key:"render",value:function(f,y){f.openNode("ext",{uri:"{78C0D931-6437-407d-A8EE-F0AAD7539E65}","xmlns:x14":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"}),this.conditionalFormattings.render(f,y.conditionalFormattings),f.closeNode()}},{key:"createNewModel",value:function(){return{}}},{key:"onParserClose",value:function(f,y){this.model[f]=y.model}},{key:"tag",get:function(){return"ext"}}]),u}(e),o=function(n){p(u,n);var a=l(u);function u(){var f;return m(this,u),(f=a.call(this)).map={ext:f.ext=new r},f}return h(u,[{key:"prepare",value:function(f,y){this.ext.prepare(f,y)}},{key:"hasContent",value:function(f){return this.ext.hasContent(f)}},{key:"render",value:function(f,y){this.hasContent(y)&&(f.openNode("extLst"),this.ext.render(f,y),f.closeNode())}},{key:"createNewModel",value:function(){return{}}},{key:"onParserClose",value:function(f,y){Object.assign(this.model,y.model)}},{key:"tag",get:function(){return"extLst"}}]),u}(e);I.exports=o},{"../composite-xform":47,"./cf-ext/conditional-formattings-ext-xform":77}],96:[function(d,I,T){function b(i){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(i)}function m(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function v(i,e){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var t,r=l(i);if(e){var o=l(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return c(this,t)}}function c(i,e){return!e||b(e)!=="object"&&typeof e!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(i):e}function l(i){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(i)}var s=function(i){(function(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(a&&a.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),a&&h(n,a)})(o,i);var e,t,r=p(o);function o(){return m(this,o),r.apply(this,arguments)}return e=o,(t=[{key:"render",value:function(n,a){if(a){n.addRollback();var u=!1;n.openNode("headerFooter"),a.differentFirst&&(n.addAttribute("differentFirst","1"),u=!0),a.differentOddEven&&(n.addAttribute("differentOddEven","1"),u=!0),a.oddHeader&&typeof a.oddHeader=="string"&&(n.leafNode("oddHeader",null,a.oddHeader),u=!0),a.oddFooter&&typeof a.oddFooter=="string"&&(n.leafNode("oddFooter",null,a.oddFooter),u=!0),a.evenHeader&&typeof a.evenHeader=="string"&&(n.leafNode("evenHeader",null,a.evenHeader),u=!0),a.evenFooter&&typeof a.evenFooter=="string"&&(n.leafNode("evenFooter",null,a.evenFooter),u=!0),a.firstHeader&&typeof a.firstHeader=="string"&&(n.leafNode("firstHeader",null,a.firstHeader),u=!0),a.firstFooter&&typeof a.firstFooter=="string"&&(n.leafNode("firstFooter",null,a.firstFooter),u=!0),u?(n.closeNode(),n.commit()):n.rollback()}}},{key:"parseOpen",value:function(n){switch(n.name){case"headerFooter":return this.model={},n.attributes.differentFirst&&(this.model.differentFirst=parseInt(n.attributes.differentFirst,0)===1),n.attributes.differentOddEven&&(this.model.differentOddEven=parseInt(n.attributes.differentOddEven,0)===1),!0;case"oddHeader":return this.currentNode="oddHeader",!0;case"oddFooter":return this.currentNode="oddFooter",!0;case"evenHeader":return this.currentNode="evenHeader",!0;case"evenFooter":return this.currentNode="evenFooter",!0;case"firstHeader":return this.currentNode="firstHeader",!0;case"firstFooter":return this.currentNode="firstFooter",!0;default:return!1}}},{key:"parseText",value:function(n){switch(this.currentNode){case"oddHeader":this.model.oddHeader=n;break;case"oddFooter":this.model.oddFooter=n;break;case"evenHeader":this.model.evenHeader=n;break;case"evenFooter":this.model.evenFooter=n;break;case"firstHeader":this.model.firstHeader=n;break;case"firstFooter":this.model.firstFooter=n}}},{key:"parseClose",value:function(){switch(this.currentNode){case"oddHeader":case"oddFooter":case"evenHeader":case"evenFooter":case"firstHeader":case"firstFooter":return this.currentNode=void 0,!0;default:return!1}}},{key:"tag",get:function(){return"headerFooter"}}])&&v(e.prototype,t),o}(d("../base-xform"));I.exports=s},{"../base-xform":31}],97:[function(d,I,T){function b(i){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(i)}function m(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function v(i,e){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var t,r=l(i);if(e){var o=l(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return c(this,t)}}function c(i,e){return!e||b(e)!=="object"&&typeof e!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(i):e}function l(i){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(i)}var s=function(i){(function(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(a&&a.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),a&&h(n,a)})(o,i);var e,t,r=p(o);function o(){return m(this,o),r.apply(this,arguments)}return e=o,(t=[{key:"render",value:function(n,a){n.leafNode("hyperlink",{ref:a.address,"r:id":a.rId,tooltip:a.tooltip})}},{key:"parseOpen",value:function(n){return n.name==="hyperlink"&&(this.model={address:n.attributes.ref,rId:n.attributes["r:id"],tooltip:n.attributes.tooltip},!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"hyperlink"}}])&&v(e.prototype,t),o}(d("../base-xform"));I.exports=s},{"../base-xform":31}],98:[function(d,I,T){function b(i){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(i)}function m(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function v(i,e){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var t,r=l(i);if(e){var o=l(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return c(this,t)}}function c(i,e){return!e||b(e)!=="object"&&typeof e!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(i):e}function l(i){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(i)}var s=function(i){(function(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(a&&a.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),a&&h(n,a)})(o,i);var e,t,r=p(o);function o(){return m(this,o),r.apply(this,arguments)}return e=o,(t=[{key:"render",value:function(n,a){n.leafNode("mergeCell",{ref:a})}},{key:"parseOpen",value:function(n){return n.name==="mergeCell"&&(this.model=n.attributes.ref,!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"mergeCell"}}])&&v(e.prototype,t),o}(d("../base-xform"));I.exports=s},{"../base-xform":31}],99:[function(d,I,T){function b(l,s){for(var i=0;i"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var o,n=l(t);if(r){var a=l(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return c(this,o)}}function c(t,r){return!r||b(r)!=="object"&&typeof r!="function"?function(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}(t):r}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)})(t)}var s=d("../base-xform"),i=function(t){return t!==void 0},e=function(t){(function(u,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(f&&f.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),f&&h(u,f)})(a,t);var r,o,n=p(a);function a(){return m(this,a),n.apply(this,arguments)}return r=a,(o=[{key:"render",value:function(u,f){return!(!f||!i(f.summaryBelow)&&!i(f.summaryRight)||(u.leafNode(this.tag,{summaryBelow:i(f.summaryBelow)?Number(f.summaryBelow):void 0,summaryRight:i(f.summaryRight)?Number(f.summaryRight):void 0}),0))}},{key:"parseOpen",value:function(u){return u.name===this.tag&&(this.model={summaryBelow:i(u.attributes.summaryBelow)?!!Number(u.attributes.summaryBelow):void 0,summaryRight:i(u.attributes.summaryRight)?!!Number(u.attributes.summaryRight):void 0},!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"outlinePr"}}])&&v(r.prototype,o),a}(s);I.exports=e},{"../base-xform":31}],101:[function(d,I,T){function b(i){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(i)}function m(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function v(i,e){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var t,r=l(i);if(e){var o=l(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return c(this,t)}}function c(i,e){return!e||b(e)!=="object"&&typeof e!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(i):e}function l(i){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(i)}var s=function(i){(function(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(a&&a.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),a&&h(n,a)})(o,i);var e,t,r=p(o);function o(){return m(this,o),r.apply(this,arguments)}return e=o,(t=[{key:"render",value:function(n,a){n.leafNode("brk",a)}},{key:"parseOpen",value:function(n){return n.name==="brk"&&(this.model=n.attributes.ref,!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"brk"}}])&&v(e.prototype,t),o}(d("../base-xform"));I.exports=s},{"../base-xform":31}],102:[function(d,I,T){function b(e){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var r,o=l(e);if(t){var n=l(this).constructor;r=Reflect.construct(o,arguments,n)}else r=o.apply(this,arguments);return c(this,r)}}function c(e,t){return!t||b(t)!=="object"&&typeof t!="function"?function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(e):t}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(e)}var s=d("../../../utils/under-dash"),i=function(e){(function(a,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(u&&u.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),u&&h(a,u)})(n,e);var t,r,o=p(n);function n(){return m(this,n),o.apply(this,arguments)}return t=n,(r=[{key:"render",value:function(a,u){if(u){var f={left:u.left,right:u.right,top:u.top,bottom:u.bottom,header:u.header,footer:u.footer};s.some(f,function(y){return y!==void 0})&&a.leafNode(this.tag,f)}}},{key:"parseOpen",value:function(a){switch(a.name){case this.tag:return this.model={left:parseFloat(a.attributes.left||.7),right:parseFloat(a.attributes.right||.7),top:parseFloat(a.attributes.top||.75),bottom:parseFloat(a.attributes.bottom||.75),header:parseFloat(a.attributes.header||.3),footer:parseFloat(a.attributes.footer||.3)},!0;default:return!1}}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"pageMargins"}}])&&v(t.prototype,r),n}(d("../base-xform"));I.exports=i},{"../../../utils/under-dash":25,"../base-xform":31}],103:[function(d,I,T){function b(i){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(i)}function m(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function v(i,e){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var t,r=l(i);if(e){var o=l(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return c(this,t)}}function c(i,e){return!e||b(e)!=="object"&&typeof e!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(i):e}function l(i){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(i)}var s=function(i){(function(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(a&&a.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),a&&h(n,a)})(o,i);var e,t,r=p(o);function o(){return m(this,o),r.apply(this,arguments)}return e=o,(t=[{key:"render",value:function(n,a){return!(!a||!a.fitToPage||(n.leafNode(this.tag,{fitToPage:a.fitToPage?"1":void 0}),0))}},{key:"parseOpen",value:function(n){return n.name===this.tag&&(this.model={fitToPage:n.attributes.fitToPage==="1"},!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"pageSetUpPr"}}])&&v(e.prototype,t),o}(d("../base-xform"));I.exports=s},{"../base-xform":31}],104:[function(d,I,T){function b(n){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a})(n)}function m(n,a){if(!(n instanceof a))throw new TypeError("Cannot call a class as a function")}function v(n,a){for(var u=0;u"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var u,f=l(n);if(a){var y=l(this).constructor;u=Reflect.construct(f,arguments,y)}else u=f.apply(this,arguments);return c(this,u)}}function c(n,a){return!a||b(a)!=="object"&&typeof a!="function"?function(u){if(u===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return u}(n):a}function l(n){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(a){return a.__proto__||Object.getPrototypeOf(a)})(n)}var s=d("../../../utils/under-dash");function i(n){return n?"1":void 0}function e(n){switch(n){case"overThenDown":return n;default:return}}function t(n){switch(n){case"atEnd":case"asDisplyed":return n;default:return}}function r(n){switch(n){case"dash":case"blank":case"NA":return n;default:return}}var o=function(n){(function(w,R){if(typeof R!="function"&&R!==null)throw new TypeError("Super expression must either be null or a function");w.prototype=Object.create(R&&R.prototype,{constructor:{value:w,writable:!0,configurable:!0}}),R&&h(w,R)})(y,n);var a,u,f=p(y);function y(){return m(this,y),f.apply(this,arguments)}return a=y,(u=[{key:"render",value:function(w,R){if(R){var E={paperSize:R.paperSize,orientation:R.orientation,horizontalDpi:R.horizontalDpi,verticalDpi:R.verticalDpi,pageOrder:e(R.pageOrder),blackAndWhite:i(R.blackAndWhite),draft:i(R.draft),cellComments:t(R.cellComments),errors:r(R.errors),scale:R.scale,fitToWidth:R.fitToWidth,fitToHeight:R.fitToHeight,firstPageNumber:R.firstPageNumber,useFirstPageNumber:i(R.firstPageNumber),usePrinterDefaults:i(R.usePrinterDefaults),copies:R.copies};s.some(E,function(M){return M!==void 0})&&w.leafNode(this.tag,E)}}},{key:"parseOpen",value:function(w){switch(w.name){case this.tag:return this.model={paperSize:(R=w.attributes.paperSize,R!==void 0?parseInt(R,10):void 0),orientation:w.attributes.orientation||"portrait",horizontalDpi:parseInt(w.attributes.horizontalDpi||"4294967295",10),verticalDpi:parseInt(w.attributes.verticalDpi||"4294967295",10),pageOrder:w.attributes.pageOrder||"downThenOver",blackAndWhite:w.attributes.blackAndWhite==="1",draft:w.attributes.draft==="1",cellComments:w.attributes.cellComments||"None",errors:w.attributes.errors||"displayed",scale:parseInt(w.attributes.scale||"100",10),fitToWidth:parseInt(w.attributes.fitToWidth||"1",10),fitToHeight:parseInt(w.attributes.fitToHeight||"1",10),firstPageNumber:parseInt(w.attributes.firstPageNumber||"1",10),useFirstPageNumber:w.attributes.useFirstPageNumber==="1",usePrinterDefaults:w.attributes.usePrinterDefaults==="1",copies:parseInt(w.attributes.copies||"1",10)},!0;default:return!1}var R}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"pageSetup"}}])&&v(a.prototype,u),y}(d("../base-xform"));I.exports=o},{"../../../utils/under-dash":25,"../base-xform":31}],105:[function(d,I,T){function b(i){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(i)}function m(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function v(i,e){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var t,r=l(i);if(e){var o=l(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return c(this,t)}}function c(i,e){return!e||b(e)!=="object"&&typeof e!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(i):e}function l(i){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(i)}var s=function(i){(function(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(a&&a.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),a&&h(n,a)})(o,i);var e,t,r=p(o);function o(){return m(this,o),r.apply(this,arguments)}return e=o,(t=[{key:"render",value:function(n,a){a&&n.leafNode(this.tag,{"r:id":a.rId})}},{key:"parseOpen",value:function(n){switch(n.name){case this.tag:return this.model={rId:n.attributes["r:id"]},!0;default:return!1}}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"picture"}}])&&v(e.prototype,t),o}(d("../base-xform"));I.exports=s},{"../base-xform":31}],106:[function(d,I,T){function b(t){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(t)}function m(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function v(t,r){for(var o=0;o"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var o,n=l(t);if(r){var a=l(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return c(this,o)}}function c(t,r){return!r||b(r)!=="object"&&typeof r!="function"?function(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}(t):r}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)})(t)}var s=d("../../../utils/under-dash");function i(t){return t?"1":void 0}var e=function(t){(function(u,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(f&&f.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),f&&h(u,f)})(a,t);var r,o,n=p(a);function a(){return m(this,a),n.apply(this,arguments)}return r=a,(o=[{key:"render",value:function(u,f){if(f){var y={headings:i(f.showRowColHeaders),gridLines:i(f.showGridLines),horizontalCentered:i(f.horizontalCentered),verticalCentered:i(f.verticalCentered)};s.some(y,function(w){return w!==void 0})&&u.leafNode(this.tag,y)}}},{key:"parseOpen",value:function(u){switch(u.name){case this.tag:return this.model={showRowColHeaders:u.attributes.headings==="1",showGridLines:u.attributes.gridLines==="1",horizontalCentered:u.attributes.horizontalCentered==="1",verticalCentered:u.attributes.verticalCentered==="1"},!0;default:return!1}}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"printOptions"}}])&&v(r.prototype,o),a}(d("../base-xform"));I.exports=e},{"../../../utils/under-dash":25,"../base-xform":31}],107:[function(d,I,T){function b(i){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(i)}function m(i,e){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var t,r=c(i);if(e){var o=c(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return p(this,t)}}function p(i,e){return!e||b(e)!=="object"&&typeof e!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(i):e}function c(i){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(i)}var l=d("./page-breaks-xform"),s=function(i){(function(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(a&&a.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),a&&v(n,a)})(o,i);var e,t,r=h(o);function o(){(function(a,u){if(!(a instanceof u))throw new TypeError("Cannot call a class as a function")})(this,o);var n={tag:"rowBreaks",count:!0,childXform:new l};return r.call(this,n)}return e=o,(t=[{key:"render",value:function(n,a){if(a&&a.length){n.openNode(this.tag,this.$),this.count&&(n.addAttribute(this.$count,a.length),n.addAttribute("manualBreakCount",a.length));var u=this.childXform;a.forEach(function(f){u.render(n,f)}),n.closeNode()}else this.empty&&n.leafNode(this.tag)}}])&&m(e.prototype,t),o}(d("../list-xform"));I.exports=s},{"../list-xform":70,"./page-breaks-xform":101}],108:[function(d,I,T){function b(e){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function m(e,t){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var r,o=c(e);if(t){var n=c(this).constructor;r=Reflect.construct(o,arguments,n)}else r=o.apply(this,arguments);return p(this,r)}}function p(e,t){return!t||b(t)!=="object"&&typeof t!="function"?function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(e):t}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(e)}var l=d("../base-xform"),s=d("./cell-xform"),i=function(e){(function(a,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(u&&u.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),u&&v(a,u)})(n,e);var t,r,o=h(n);function n(a){var u;return function(f,y){if(!(f instanceof y))throw new TypeError("Cannot call a class as a function")}(this,n),(u=o.call(this)).maxItems=a&&a.maxItems,u.map={c:new s},u}return t=n,(r=[{key:"prepare",value:function(a,u){var f=u.styles.addStyleModel(a.style);f&&(a.styleId=f);var y=this.map.c;a.cells.forEach(function(w){y.prepare(w,u)})}},{key:"render",value:function(a,u,f){a.openNode("row"),a.addAttribute("r",u.number),u.height&&(a.addAttribute("ht",u.height),a.addAttribute("customHeight","1")),u.hidden&&a.addAttribute("hidden","1"),u.min>0&&u.max>0&&u.min<=u.max&&a.addAttribute("spans","".concat(u.min,":").concat(u.max)),u.styleId&&(a.addAttribute("s",u.styleId),a.addAttribute("customFormat","1")),a.addAttribute("x14ac:dyDescent","0.25"),u.outlineLevel&&a.addAttribute("outlineLevel",u.outlineLevel),u.collapsed&&a.addAttribute("collapsed","1");var y=this.map.c;u.cells.forEach(function(w){y.render(a,w,f)}),a.closeNode()}},{key:"parseOpen",value:function(a){if(this.parser)return this.parser.parseOpen(a),!0;if(a.name==="row"){this.numRowsSeen+=1;var u=a.attributes.spans?a.attributes.spans.split(":").map(function(y){return parseInt(y,10)}):[void 0,void 0],f=this.model={number:parseInt(a.attributes.r,10),min:u[0],max:u[1],cells:[]};return a.attributes.s&&(f.styleId=parseInt(a.attributes.s,10)),a.attributes.hidden!==!0&&a.attributes.hidden!=="true"&&a.attributes.hidden!==1&&a.attributes.hidden!=="1"||(f.hidden=!0),a.attributes.bestFit&&(f.bestFit=!0),a.attributes.ht&&(f.height=parseFloat(a.attributes.ht)),a.attributes.outlineLevel&&(f.outlineLevel=parseInt(a.attributes.outlineLevel,10)),a.attributes.collapsed&&(f.collapsed=!0),!0}return this.parser=this.map[a.name],!!this.parser&&(this.parser.parseOpen(a),!0)}},{key:"parseText",value:function(a){this.parser&&this.parser.parseText(a)}},{key:"parseClose",value:function(a){if(this.parser){if(!this.parser.parseClose(a)){if(this.model.cells.push(this.parser.model),this.maxItems&&this.model.cells.length>this.maxItems)throw new Error("Max column count (".concat(this.maxItems,") exceeded"));this.parser=void 0}return!0}return!1}},{key:"reconcile",value:function(a,u){a.style=a.styleId?u.styles.getStyleModel(a.styleId):{},a.styleId!==void 0&&(a.styleId=void 0);var f=this.map.c;a.cells.forEach(function(y){f.reconcile(y,u)})}},{key:"tag",get:function(){return"row"}}])&&m(t.prototype,r),n}(l);I.exports=i},{"../base-xform":31,"./cell-xform":72}],109:[function(d,I,T){function b(e){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var r,o=l(e);if(t){var n=l(this).constructor;r=Reflect.construct(o,arguments,n)}else r=o.apply(this,arguments);return c(this,r)}}function c(e,t){return!t||b(t)!=="object"&&typeof t!="function"?function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(e):t}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(e)}var s=d("../../../utils/under-dash"),i=function(e){(function(a,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(u&&u.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),u&&h(a,u)})(n,e);var t,r,o=p(n);function n(){return m(this,n),o.apply(this,arguments)}return t=n,(r=[{key:"render",value:function(a,u){if(u){var f={defaultRowHeight:u.defaultRowHeight,outlineLevelRow:u.outlineLevelRow,outlineLevelCol:u.outlineLevelCol,"x14ac:dyDescent":u.dyDescent};u.defaultColWidth&&(f.defaultColWidth=u.defaultColWidth),u.defaultRowHeight&&u.defaultRowHeight===15||(f.customHeight="1"),s.some(f,function(y){return y!==void 0})&&a.leafNode("sheetFormatPr",f)}}},{key:"parseOpen",value:function(a){return a.name==="sheetFormatPr"&&(this.model={defaultRowHeight:parseFloat(a.attributes.defaultRowHeight||"0"),dyDescent:parseFloat(a.attributes["x14ac:dyDescent"]||"0"),outlineLevelRow:parseInt(a.attributes.outlineLevelRow||"0",10),outlineLevelCol:parseInt(a.attributes.outlineLevelCol||"0",10)},a.attributes.defaultColWidth&&(this.model.defaultColWidth=parseFloat(a.attributes.defaultColWidth)),!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"sheetFormatPr"}}])&&v(t.prototype,r),n}(d("../base-xform"));I.exports=i},{"../../../utils/under-dash":25,"../base-xform":31}],110:[function(d,I,T){function b(r){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o})(r)}function m(r,o){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var n,a=c(r);if(o){var u=c(this).constructor;n=Reflect.construct(a,arguments,u)}else n=a.apply(this,arguments);return p(this,n)}}function p(r,o){return!o||b(o)!=="object"&&typeof o!="function"?function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(r):o}function c(r){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(r)}var l=d("../base-xform"),s=d("../style/color-xform"),i=d("./page-setup-properties-xform"),e=d("./outline-properties-xform"),t=function(r){(function(f,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function");f.prototype=Object.create(y&&y.prototype,{constructor:{value:f,writable:!0,configurable:!0}}),y&&v(f,y)})(u,r);var o,n,a=h(u);function u(){var f;return function(y,w){if(!(y instanceof w))throw new TypeError("Cannot call a class as a function")}(this,u),(f=a.call(this)).map={tabColor:new s("tabColor"),pageSetUpPr:new i,outlinePr:new e},f}return o=u,(n=[{key:"render",value:function(f,y){if(y){f.addRollback(),f.openNode("sheetPr");var w=!1;w=this.map.tabColor.render(f,y.tabColor)||w,w=this.map.pageSetUpPr.render(f,y.pageSetup)||w,(w=this.map.outlinePr.render(f,y.outlineProperties)||w)?(f.closeNode(),f.commit()):f.rollback()}}},{key:"parseOpen",value:function(f){return this.parser?(this.parser.parseOpen(f),!0):f.name===this.tag?(this.reset(),!0):!!this.map[f.name]&&(this.parser=this.map[f.name],this.parser.parseOpen(f),!0)}},{key:"parseText",value:function(f){return!!this.parser&&(this.parser.parseText(f),!0)}},{key:"parseClose",value:function(f){return this.parser?(this.parser.parseClose(f)||(this.parser=void 0),!0):(this.map.tabColor.model||this.map.pageSetUpPr.model||this.map.outlinePr.model?(this.model={},this.map.tabColor.model&&(this.model.tabColor=this.map.tabColor.model),this.map.pageSetUpPr.model&&(this.model.pageSetup=this.map.pageSetUpPr.model),this.map.outlinePr.model&&(this.model.outlineProperties=this.map.outlinePr.model)):this.model=null,!1)}},{key:"tag",get:function(){return"sheetPr"}}])&&m(o.prototype,n),u}(l);I.exports=t},{"../base-xform":31,"../style/color-xform":127,"./outline-properties-xform":100,"./page-setup-properties-xform":103}],111:[function(d,I,T){function b(r){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o})(r)}function m(r,o){if(!(r instanceof o))throw new TypeError("Cannot call a class as a function")}function v(r,o){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var n,a=l(r);if(o){var u=l(this).constructor;n=Reflect.construct(a,arguments,u)}else n=a.apply(this,arguments);return c(this,n)}}function c(r,o){return!o||b(o)!=="object"&&typeof o!="function"?function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(r):o}function l(r){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(r)}var s=d("../../../utils/under-dash");function i(r,o){return r?o:void 0}function e(r,o){return r===o||void 0}var t=function(r){(function(f,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function");f.prototype=Object.create(y&&y.prototype,{constructor:{value:f,writable:!0,configurable:!0}}),y&&h(f,y)})(u,r);var o,n,a=p(u);function u(){return m(this,u),a.apply(this,arguments)}return o=u,(n=[{key:"render",value:function(f,y){if(y){var w={sheet:i(y.sheet,"1"),selectLockedCells:y.selectLockedCells===!1?"1":void 0,selectUnlockedCells:y.selectUnlockedCells===!1?"1":void 0,formatCells:i(y.formatCells,"0"),formatColumns:i(y.formatColumns,"0"),formatRows:i(y.formatRows,"0"),insertColumns:i(y.insertColumns,"0"),insertRows:i(y.insertRows,"0"),insertHyperlinks:i(y.insertHyperlinks,"0"),deleteColumns:i(y.deleteColumns,"0"),deleteRows:i(y.deleteRows,"0"),sort:i(y.sort,"0"),autoFilter:i(y.autoFilter,"0"),pivotTables:i(y.pivotTables,"0")};y.sheet&&(w.algorithmName=y.algorithmName,w.hashValue=y.hashValue,w.saltValue=y.saltValue,w.spinCount=y.spinCount,w.objects=i(y.objects===!1,"1"),w.scenarios=i(y.scenarios===!1,"1")),s.some(w,function(R){return R!==void 0})&&f.leafNode(this.tag,w)}}},{key:"parseOpen",value:function(f){switch(f.name){case this.tag:return this.model={sheet:e(f.attributes.sheet,"1"),objects:f.attributes.objects!=="1"&&void 0,scenarios:f.attributes.scenarios!=="1"&&void 0,selectLockedCells:f.attributes.selectLockedCells!=="1"&&void 0,selectUnlockedCells:f.attributes.selectUnlockedCells!=="1"&&void 0,formatCells:e(f.attributes.formatCells,"0"),formatColumns:e(f.attributes.formatColumns,"0"),formatRows:e(f.attributes.formatRows,"0"),insertColumns:e(f.attributes.insertColumns,"0"),insertRows:e(f.attributes.insertRows,"0"),insertHyperlinks:e(f.attributes.insertHyperlinks,"0"),deleteColumns:e(f.attributes.deleteColumns,"0"),deleteRows:e(f.attributes.deleteRows,"0"),sort:e(f.attributes.sort,"0"),autoFilter:e(f.attributes.autoFilter,"0"),pivotTables:e(f.attributes.pivotTables,"0")},f.attributes.algorithmName&&(this.model.algorithmName=f.attributes.algorithmName,this.model.hashValue=f.attributes.hashValue,this.model.saltValue=f.attributes.saltValue,this.model.spinCount=parseInt(f.attributes.spinCount,10)),!0;default:return!1}}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"sheetProtection"}}])&&v(o.prototype,n),u}(d("../base-xform"));I.exports=t},{"../../../utils/under-dash":25,"../base-xform":31}],112:[function(d,I,T){function b(r){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o})(r)}function m(r,o){if(!(r instanceof o))throw new TypeError("Cannot call a class as a function")}function v(r,o){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var n,a=l(r);if(o){var u=l(this).constructor;n=Reflect.construct(a,arguments,u)}else n=a.apply(this,arguments);return c(this,n)}}function c(r,o){return!o||b(o)!=="object"&&typeof o!="function"?function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(r):o}function l(r){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(r)}var s=d("../../../utils/col-cache"),i=d("../base-xform"),e={frozen:"frozen",frozenSplit:"frozen",split:"split"},t=function(r){(function(f,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function");f.prototype=Object.create(y&&y.prototype,{constructor:{value:f,writable:!0,configurable:!0}}),y&&h(f,y)})(u,r);var o,n,a=p(u);function u(){return m(this,u),a.apply(this,arguments)}return o=u,(n=[{key:"prepare",value:function(f){switch(f.state){case"frozen":case"split":break;default:f.state="normal"}}},{key:"render",value:function(f,y){f.openNode("sheetView",{workbookViewId:y.workbookViewId||0});var w,R,E,M,O=function(P,_,S){S&&f.addAttribute(P,_)};switch(O("rightToLeft","1",y.rightToLeft===!0),O("tabSelected","1",y.tabSelected),O("showRuler","0",y.showRuler===!1),O("showRowColHeaders","0",y.showRowColHeaders===!1),O("showGridLines","0",y.showGridLines===!1),O("zoomScale",y.zoomScale,y.zoomScale),O("zoomScaleNormal",y.zoomScaleNormal,y.zoomScaleNormal),O("view",y.style,y.style),y.state){case"frozen":R=y.xSplit||0,E=y.ySplit||0,w=y.topLeftCell||s.getAddress(E+1,R+1).address,M=(y.xSplit&&y.ySplit?"bottomRight":y.xSplit&&"topRight")||"bottomLeft",f.leafNode("pane",{xSplit:y.xSplit||void 0,ySplit:y.ySplit||void 0,topLeftCell:w,activePane:M,state:"frozen"}),f.leafNode("selection",{pane:M,activeCell:y.activeCell,sqref:y.activeCell});break;case"split":y.activePane==="topLeft"&&(y.activePane=void 0),f.leafNode("pane",{xSplit:y.xSplit||void 0,ySplit:y.ySplit||void 0,topLeftCell:y.topLeftCell,activePane:y.activePane}),f.leafNode("selection",{pane:y.activePane,activeCell:y.activeCell,sqref:y.activeCell});break;case"normal":y.activeCell&&f.leafNode("selection",{activeCell:y.activeCell,sqref:y.activeCell})}f.closeNode()}},{key:"parseOpen",value:function(f){switch(f.name){case"sheetView":return this.sheetView={workbookViewId:parseInt(f.attributes.workbookViewId,10),rightToLeft:f.attributes.rightToLeft==="1",tabSelected:f.attributes.tabSelected==="1",showRuler:f.attributes.showRuler!=="0",showRowColHeaders:f.attributes.showRowColHeaders!=="0",showGridLines:f.attributes.showGridLines!=="0",zoomScale:parseInt(f.attributes.zoomScale||"100",10),zoomScaleNormal:parseInt(f.attributes.zoomScaleNormal||"100",10),style:f.attributes.view},this.pane=void 0,this.selections={},!0;case"pane":return this.pane={xSplit:parseInt(f.attributes.xSplit||"0",10),ySplit:parseInt(f.attributes.ySplit||"0",10),topLeftCell:f.attributes.topLeftCell,activePane:f.attributes.activePane||"topLeft",state:f.attributes.state},!0;case"selection":var y=f.attributes.pane||"topLeft";return this.selections[y]={pane:y,activeCell:f.attributes.activeCell},!0;default:return!1}}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(f){var y,w;switch(f){case"sheetView":return this.sheetView&&this.pane?(y=this.model={workbookViewId:this.sheetView.workbookViewId,rightToLeft:this.sheetView.rightToLeft,state:e[this.pane.state]||"split",xSplit:this.pane.xSplit,ySplit:this.pane.ySplit,topLeftCell:this.pane.topLeftCell,showRuler:this.sheetView.showRuler,showRowColHeaders:this.sheetView.showRowColHeaders,showGridLines:this.sheetView.showGridLines,zoomScale:this.sheetView.zoomScale,zoomScaleNormal:this.sheetView.zoomScaleNormal},this.model.state==="split"&&(y.activePane=this.pane.activePane),(w=this.selections[this.pane.activePane])&&w.activeCell&&(y.activeCell=w.activeCell),this.sheetView.style&&(y.style=this.sheetView.style)):(y=this.model={workbookViewId:this.sheetView.workbookViewId,rightToLeft:this.sheetView.rightToLeft,state:"normal",showRuler:this.sheetView.showRuler,showRowColHeaders:this.sheetView.showRowColHeaders,showGridLines:this.sheetView.showGridLines,zoomScale:this.sheetView.zoomScale,zoomScaleNormal:this.sheetView.zoomScaleNormal},(w=this.selections.topLeft)&&w.activeCell&&(y.activeCell=w.activeCell),this.sheetView.style&&(y.style=this.sheetView.style)),!1;default:return!0}}},{key:"reconcile",value:function(){}},{key:"tag",get:function(){return"sheetView"}}])&&v(o.prototype,n),u}(i);I.exports=t},{"../../../utils/col-cache":19,"../base-xform":31}],113:[function(d,I,T){function b(i){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(i)}function m(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function v(i,e){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var t,r=l(i);if(e){var o=l(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return c(this,t)}}function c(i,e){return!e||b(e)!=="object"&&typeof e!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(i):e}function l(i){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(i)}var s=function(i){(function(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(a&&a.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),a&&h(n,a)})(o,i);var e,t,r=p(o);function o(){return m(this,o),r.apply(this,arguments)}return e=o,(t=[{key:"render",value:function(n,a){a&&n.leafNode(this.tag,{"r:id":a.rId})}},{key:"parseOpen",value:function(n){switch(n.name){case this.tag:return this.model={rId:n.attributes["r:id"]},!0;default:return!1}}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"tablePart"}}])&&v(e.prototype,t),o}(d("../base-xform"));I.exports=s},{"../base-xform":31}],114:[function(d,I,T){function b(V){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(q){return typeof q}:function(q){return q&&typeof Symbol=="function"&&q.constructor===Symbol&&q!==Symbol.prototype?"symbol":typeof q})(V)}function m(V,q){for(var $=0;$"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var $,L=c(V);if(q){var A=c(this).constructor;$=Reflect.construct(L,arguments,A)}else $=L.apply(this,arguments);return p(this,$)}}function p(V,q){return!q||b(q)!=="object"&&typeof q!="function"?function($){if($===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return $}(V):q}function c(V){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(q){return q.__proto__||Object.getPrototypeOf(q)})(V)}var l=d("../../../utils/under-dash"),s=d("../../../utils/col-cache"),i=d("../../../utils/xml-stream"),e=d("../../rel-type"),t=d("./merges"),r=d("../base-xform"),o=d("../list-xform"),n=d("./row-xform"),a=d("./col-xform"),u=d("./dimension-xform"),f=d("./hyperlink-xform"),y=d("./merge-cell-xform"),w=d("./data-validations-xform"),R=d("./sheet-properties-xform"),E=d("./sheet-format-properties-xform"),M=d("./sheet-view-xform"),O=d("./sheet-protection-xform"),P=d("./page-margins-xform"),_=d("./page-setup-xform"),S=d("./print-options-xform"),g=d("./auto-filter-xform"),j=d("./picture-xform"),k=d("./drawing-xform"),x=d("./table-part-xform"),C=d("./row-breaks-xform"),D=d("./header-footer-xform"),F=d("./cf/conditional-formattings-xform"),B=d("./ext-lst-xform"),U=function(V,q){if(!q||!q.length)return V;if(!V||!V.length)return q;var $={},L={};return V.forEach(function(A){$[A.ref]=A,A.rules.forEach(function(N){var z=N.x14Id;z&&(L[z]=N)})}),q.forEach(function(A){A.rules.forEach(function(N){var z=L[N.x14Id];z?function(W,X){Object.keys(X).forEach(function(K){var ie=W[K],Q=X[K];ie===void 0&&Q!==void 0&&(W[K]=Q)})}(z,N):$[A.ref]?$[A.ref].rules.push(N):V.push({ref:A.ref,rules:[N]})})}),V},H=function(V){(function(N,z){if(typeof z!="function"&&z!==null)throw new TypeError("Super expression must either be null or a function");N.prototype=Object.create(z&&z.prototype,{constructor:{value:N,writable:!0,configurable:!0}}),z&&v(N,z)})(A,V);var q,$,L=h(A);function A(N){var z;(function(ie,Q){if(!(ie instanceof Q))throw new TypeError("Cannot call a class as a function")})(this,A),z=L.call(this);var W=N||{},X=W.maxRows,K=W.maxCols;return z.map={sheetPr:new R,dimension:new u,sheetViews:new o({tag:"sheetViews",count:!1,childXform:new M}),sheetFormatPr:new E,cols:new o({tag:"cols",count:!1,childXform:new a}),sheetData:new o({tag:"sheetData",count:!1,empty:!0,childXform:new n({maxItems:K}),maxItems:X}),autoFilter:new g,mergeCells:new o({tag:"mergeCells",count:!0,childXform:new y}),rowBreaks:new C,hyperlinks:new o({tag:"hyperlinks",count:!1,childXform:new f}),pageMargins:new P,dataValidations:new w,pageSetup:new _,headerFooter:new D,printOptions:new S,picture:new j,drawing:new k,sheetProtection:new O,tableParts:new o({tag:"tableParts",count:!0,childXform:new x}),conditionalFormatting:new F,extLst:new B},z}return q=A,($=[{key:"prepare",value:function(N,z){var W=this;z.merges=new t,N.hyperlinks=z.hyperlinks=[],N.comments=z.comments=[],z.formulae={},z.siFormulae=0,this.map.cols.prepare(N.cols,z),this.map.sheetData.prepare(N.rows,z),this.map.conditionalFormatting.prepare(N.conditionalFormattings,z),N.mergeCells=z.merges.mergeCells;var X=N.rels=[];function K(ce){return"rId".concat(ce.length+1)}if(N.hyperlinks.forEach(function(ce){var Ee=K(X);ce.rId=Ee,X.push({Id:Ee,Type:e.Hyperlink,Target:ce.target,TargetMode:"External"})}),N.comments.length>0){var ie={Id:K(X),Type:e.Comments,Target:"../comments".concat(N.id,".xml")};X.push(ie);var Q={Id:K(X),Type:e.VmlDrawing,Target:"../drawings/vmlDrawing".concat(N.id,".vml")};X.push(Q),N.comments.forEach(function(ce){ce.refAddress=s.decodeAddress(ce.ref)}),z.commentRefs.push({commentName:"comments".concat(N.id),vmlDrawing:"vmlDrawing".concat(N.id)})}var ue,de=[];N.media.forEach(function(ce){if(ce.type==="background"){var Ee=K(X);ue=z.media[ce.imageId],X.push({Id:Ee,Type:e.Image,Target:"../media/".concat(ue.name,".").concat(ue.extension)}),N.background={rId:Ee},N.image=z.media[ce.imageId]}else if(ce.type==="image"){var _e=N.drawing;ue=z.media[ce.imageId],_e||(_e=N.drawing={rId:K(X),name:"drawing".concat(++z.drawingsCount),anchors:[],rels:[]},z.drawings.push(_e),X.push({Id:_e.rId,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",Target:"../drawings/".concat(_e.name,".xml")}));var ve=W.preImageId===ce.imageId?de[ce.imageId]:de[_e.rels.length];ve||(ve=K(_e.rels),de[_e.rels.length]=ve,_e.rels.push({Id:ve,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",Target:"../media/".concat(ue.name,".").concat(ue.extension)}));var ke={picture:{rId:ve},range:ce.range};if(ce.hyperlinks&&ce.hyperlinks.hyperlink){var Re=K(_e.rels);de[_e.rels.length]=Re,ke.picture.hyperlinks={tooltip:ce.hyperlinks.tooltip,rId:Re},_e.rels.push({Id:Re,Type:e.Hyperlink,Target:ce.hyperlinks.hyperlink,TargetMode:"External"})}W.preImageId=ce.imageId,_e.anchors.push(ke)}}),N.tables.forEach(function(ce){var Ee=K(X);ce.rId=Ee,X.push({Id:Ee,Type:e.Table,Target:"../tables/".concat(ce.target)}),ce.columns.forEach(function(_e){var ve=_e.style;ve&&(_e.dxfId=z.styles.addDxfStyle(ve))})}),this.map.extLst.prepare(N,z)}},{key:"render",value:function(N,z){N.openXml(i.StdDocAttributes),N.openNode("worksheet",A.WORKSHEET_ATTRIBUTES);var W=z.properties?{defaultRowHeight:z.properties.defaultRowHeight,dyDescent:z.properties.dyDescent,outlineLevelCol:z.properties.outlineLevelCol,outlineLevelRow:z.properties.outlineLevelRow}:void 0;z.properties&&z.properties.defaultColWidth&&(W.defaultColWidth=z.properties.defaultColWidth);var X={outlineProperties:z.properties&&z.properties.outlineProperties,tabColor:z.properties&&z.properties.tabColor,pageSetup:z.pageSetup&&z.pageSetup.fitToPage?{fitToPage:z.pageSetup.fitToPage}:void 0},K=z.pageSetup&&z.pageSetup.margins,ie={showRowColHeaders:z.pageSetup&&z.pageSetup.showRowColHeaders,showGridLines:z.pageSetup&&z.pageSetup.showGridLines,horizontalCentered:z.pageSetup&&z.pageSetup.horizontalCentered,verticalCentered:z.pageSetup&&z.pageSetup.verticalCentered},Q=z.sheetProtection;this.map.sheetPr.render(N,X),this.map.dimension.render(N,z.dimensions),this.map.sheetViews.render(N,z.views),this.map.sheetFormatPr.render(N,W),this.map.cols.render(N,z.cols),this.map.sheetData.render(N,z.rows),this.map.sheetProtection.render(N,Q),this.map.autoFilter.render(N,z.autoFilter),this.map.mergeCells.render(N,z.mergeCells),this.map.conditionalFormatting.render(N,z.conditionalFormattings),this.map.dataValidations.render(N,z.dataValidations),this.map.hyperlinks.render(N,z.hyperlinks),this.map.printOptions.render(N,ie),this.map.pageMargins.render(N,K),this.map.pageSetup.render(N,z.pageSetup),this.map.headerFooter.render(N,z.headerFooter),this.map.rowBreaks.render(N,z.rowBreaks),this.map.drawing.render(N,z.drawing),this.map.picture.render(N,z.background),this.map.tableParts.render(N,z.tables),this.map.extLst.render(N,z),z.rels&&z.rels.forEach(function(ue){ue.Type===e.VmlDrawing&&N.leafNode("legacyDrawing",{"r:id":ue.Id})}),N.closeNode()}},{key:"parseOpen",value:function(N){return this.parser?(this.parser.parseOpen(N),!0):N.name==="worksheet"?(l.each(this.map,function(z){z.reset()}),!0):(this.parser=this.map[N.name],this.parser&&this.parser.parseOpen(N),!0)}},{key:"parseText",value:function(N){this.parser&&this.parser.parseText(N)}},{key:"parseClose",value:function(N){if(this.parser)return this.parser.parseClose(N)||(this.parser=void 0),!0;switch(N){case"worksheet":var z=this.map.sheetFormatPr.model||{};this.map.sheetPr.model&&this.map.sheetPr.model.tabColor&&(z.tabColor=this.map.sheetPr.model.tabColor),this.map.sheetPr.model&&this.map.sheetPr.model.outlineProperties&&(z.outlineProperties=this.map.sheetPr.model.outlineProperties);var W={fitToPage:this.map.sheetPr.model&&this.map.sheetPr.model.pageSetup&&this.map.sheetPr.model.pageSetup.fitToPage||!1,margins:this.map.pageMargins.model},X=Object.assign(W,this.map.pageSetup.model,this.map.printOptions.model),K=U(this.map.conditionalFormatting.model,this.map.extLst.model&&this.map.extLst.model["x14:conditionalFormattings"]);return this.model={dimensions:this.map.dimension.model,cols:this.map.cols.model,rows:this.map.sheetData.model,mergeCells:this.map.mergeCells.model,hyperlinks:this.map.hyperlinks.model,dataValidations:this.map.dataValidations.model,properties:z,views:this.map.sheetViews.model,pageSetup:X,headerFooter:this.map.headerFooter.model,background:this.map.picture.model,drawing:this.map.drawing.model,tables:this.map.tableParts.model,conditionalFormattings:K},this.map.autoFilter.model&&(this.model.autoFilter=this.map.autoFilter.model),this.map.sheetProtection.model&&(this.model.sheetProtection=this.map.sheetProtection.model),!1;default:return!0}}},{key:"reconcile",value:function(N,z){var W=(N.relationships||[]).reduce(function(de,ce){if(de[ce.Id]=ce,ce.Type===e.Comments&&(N.comments=z.comments[ce.Target].comments),ce.Type===e.VmlDrawing&&N.comments&&N.comments.length){var Ee=z.vmlDrawings[ce.Target].comments;N.comments.forEach(function(_e,ve){_e.note=Object.assign({},_e.note,Ee[ve])})}return de},{});if(z.commentsMap=(N.comments||[]).reduce(function(de,ce){return ce.ref&&(de[ce.ref]=ce),de},{}),z.hyperlinkMap=(N.hyperlinks||[]).reduce(function(de,ce){return ce.rId&&(de[ce.address]=W[ce.rId].Target),de},{}),z.formulae={},N.rows=N.rows&&N.rows.filter(Boolean)||[],N.rows.forEach(function(de){de.cells=de.cells&&de.cells.filter(Boolean)||[]}),this.map.cols.reconcile(N.cols,z),this.map.sheetData.reconcile(N.rows,z),this.map.conditionalFormatting.reconcile(N.conditionalFormattings,z),N.media=[],N.drawing){var X=W[N.drawing.rId].Target.match(/\/drawings\/([a-zA-Z0-9]+)[.][a-zA-Z]{3,4}$/);if(X){var K=X[1];z.drawings[K].anchors.forEach(function(de){if(de.medium){var ce={type:"image",imageId:de.medium.index,range:de.range,hyperlinks:de.picture.hyperlinks};N.media.push(ce)}})}}var ie=N.background&&W[N.background.rId];if(ie){var Q=ie.Target.split("/media/")[1],ue=z.mediaIndex&&z.mediaIndex[Q];ue!==void 0&&N.media.push({type:"background",imageId:ue})}N.tables=(N.tables||[]).map(function(de){var ce=W[de.rId];return z.tables[ce.Target]}),delete N.relationships,delete N.hyperlinks,delete N.comments}}])&&m(q.prototype,$),A}(r);H.WORKSHEET_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","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"},I.exports=H},{"../../../utils/col-cache":19,"../../../utils/under-dash":25,"../../../utils/xml-stream":27,"../../rel-type":30,"../base-xform":31,"../list-xform":70,"./auto-filter-xform":71,"./cf/conditional-formattings-xform":86,"./col-xform":91,"./data-validations-xform":92,"./dimension-xform":93,"./drawing-xform":94,"./ext-lst-xform":95,"./header-footer-xform":96,"./hyperlink-xform":97,"./merge-cell-xform":98,"./merges":99,"./page-margins-xform":102,"./page-setup-xform":104,"./picture-xform":105,"./print-options-xform":106,"./row-breaks-xform":107,"./row-xform":108,"./sheet-format-properties-xform":109,"./sheet-properties-xform":110,"./sheet-protection-xform":111,"./sheet-view-xform":112,"./table-part-xform":113}],115:[function(d,I,T){function b(s){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i})(s)}function m(s,i){for(var e=0;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var e,t=c(s);if(i){var r=c(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return p(this,e)}}function p(s,i){return!i||b(i)!=="object"&&typeof i!="function"?function(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(s):i}function c(s){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(i){return i.__proto__||Object.getPrototypeOf(i)})(s)}var l=function(s){(function(o,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(n&&n.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),n&&v(o,n)})(r,s);var i,e,t=h(r);function r(o){var n;return function(a,u){if(!(a instanceof u))throw new TypeError("Cannot call a class as a function")}(this,r),(n=t.call(this)).tag=o.tag,n.attr=o.attr,n}return i=r,(e=[{key:"render",value:function(o,n){n&&(o.openNode(this.tag),o.closeNode())}},{key:"parseOpen",value:function(o){o.name===this.tag&&(this.model=!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}}])&&m(i.prototype,e),r}(d("../base-xform"));I.exports=l},{"../base-xform":31}],116:[function(d,I,T){function b(s){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i})(s)}function m(s,i){for(var e=0;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var e,t=c(s);if(i){var r=c(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return p(this,e)}}function p(s,i){return!i||b(i)!=="object"&&typeof i!="function"?function(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(s):i}function c(s){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(i){return i.__proto__||Object.getPrototypeOf(i)})(s)}var l=function(s){(function(o,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(n&&n.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),n&&v(o,n)})(r,s);var i,e,t=h(r);function r(o){var n;return function(a,u){if(!(a instanceof u))throw new TypeError("Cannot call a class as a function")}(this,r),(n=t.call(this)).tag=o.tag,n.attr=o.attr,n.attrs=o.attrs,n._format=o.format||function(a){try{return Number.isNaN(a.getTime())?"":a.toISOString()}catch{return""}},n._parse=o.parse||function(a){return new Date(a)},n}return i=r,(e=[{key:"render",value:function(o,n){n&&(o.openNode(this.tag),this.attrs&&o.addAttributes(this.attrs),this.attr?o.addAttribute(this.attr,this._format(n)):o.writeText(this._format(n)),o.closeNode())}},{key:"parseOpen",value:function(o){o.name===this.tag&&(this.attr?this.model=this._parse(o.attributes[this.attr]):this.text=[])}},{key:"parseText",value:function(o){this.attr||this.text.push(o)}},{key:"parseClose",value:function(){return this.attr||(this.model=this._parse(this.text.join(""))),!1}}])&&m(i.prototype,e),r}(d("../base-xform"));I.exports=l},{"../base-xform":31}],117:[function(d,I,T){function b(s){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i})(s)}function m(s,i){for(var e=0;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var e,t=c(s);if(i){var r=c(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return p(this,e)}}function p(s,i){return!i||b(i)!=="object"&&typeof i!="function"?function(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(s):i}function c(s){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(i){return i.__proto__||Object.getPrototypeOf(i)})(s)}var l=function(s){(function(o,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(n&&n.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),n&&v(o,n)})(r,s);var i,e,t=h(r);function r(o){var n;return function(a,u){if(!(a instanceof u))throw new TypeError("Cannot call a class as a function")}(this,r),(n=t.call(this)).tag=o.tag,n.attr=o.attr,n.attrs=o.attrs,n.zero=o.zero,n}return i=r,(e=[{key:"render",value:function(o,n){(n||this.zero)&&(o.openNode(this.tag),this.attrs&&o.addAttributes(this.attrs),this.attr?o.addAttribute(this.attr,n):o.writeText(n),o.closeNode())}},{key:"parseOpen",value:function(o){return o.name===this.tag&&(this.attr?this.model=parseInt(o.attributes[this.attr],10):this.text=[],!0)}},{key:"parseText",value:function(o){this.attr||this.text.push(o)}},{key:"parseClose",value:function(){return this.attr||(this.model=parseInt(this.text.join("")||0,10)),!1}}])&&m(i.prototype,e),r}(d("../base-xform"));I.exports=l},{"../base-xform":31}],118:[function(d,I,T){function b(s){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i})(s)}function m(s,i){for(var e=0;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var e,t=c(s);if(i){var r=c(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return p(this,e)}}function p(s,i){return!i||b(i)!=="object"&&typeof i!="function"?function(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(s):i}function c(s){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(i){return i.__proto__||Object.getPrototypeOf(i)})(s)}var l=function(s){(function(o,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(n&&n.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),n&&v(o,n)})(r,s);var i,e,t=h(r);function r(o){var n;return function(a,u){if(!(a instanceof u))throw new TypeError("Cannot call a class as a function")}(this,r),(n=t.call(this)).tag=o.tag,n.attr=o.attr,n.attrs=o.attrs,n}return i=r,(e=[{key:"render",value:function(o,n){n!==void 0&&(o.openNode(this.tag),this.attrs&&o.addAttributes(this.attrs),this.attr?o.addAttribute(this.attr,n):o.writeText(n),o.closeNode())}},{key:"parseOpen",value:function(o){o.name===this.tag&&(this.attr?this.model=o.attributes[this.attr]:this.text=[])}},{key:"parseText",value:function(o){this.attr||this.text.push(o)}},{key:"parseClose",value:function(){return this.attr||(this.model=this.text.join("")),!1}}])&&m(i.prototype,e),r}(d("../base-xform"));I.exports=l},{"../base-xform":31}],119:[function(d,I,T){function b(e){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function m(e,t){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var r,o=c(e);if(t){var n=c(this).constructor;r=Reflect.construct(o,arguments,n)}else r=o.apply(this,arguments);return p(this,r)}}function p(e,t){return!t||b(t)!=="object"&&typeof t!="function"?function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(e):t}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(e)}var l=d("./base-xform"),s=d("../../utils/xml-stream"),i=function(e){(function(a,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(u&&u.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),u&&v(a,u)})(n,e);var t,r,o=h(n);function n(a){var u;return function(f,y){if(!(f instanceof y))throw new TypeError("Cannot call a class as a function")}(this,n),(u=o.call(this))._model=a,u}return t=n,(r=[{key:"render",value:function(a){if(!this._xml){var u=new s;(function f(y,w){y.openNode(w.tag,w.$),w.c&&w.c.forEach(function(R){f(y,R)}),w.t&&y.writeText(w.t),y.closeNode()})(u,this._model),this._xml=u.xml}a.writeXml(this._xml)}},{key:"parseOpen",value:function(){return!0}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(a){switch(a){case this._model.tag:return!1;default:return!0}}}])&&m(t.prototype,r),n}(l);I.exports=i},{"../../utils/xml-stream":27,"./base-xform":31}],120:[function(d,I,T){function b(e){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function m(e,t){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var r,o=c(e);if(t){var n=c(this).constructor;r=Reflect.construct(o,arguments,n)}else r=o.apply(this,arguments);return p(this,r)}}function p(e,t){return!t||b(t)!=="object"&&typeof t!="function"?function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(e):t}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(e)}var l=d("./text-xform"),s=d("./rich-text-xform"),i=function(e){(function(a,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(u&&u.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),u&&v(a,u)})(n,e);var t,r,o=h(n);function n(){var a;return function(u,f){if(!(u instanceof f))throw new TypeError("Cannot call a class as a function")}(this,n),(a=o.call(this)).map={r:new s,t:new l},a}return t=n,(r=[{key:"render",value:function(a,u){if(a.openNode(this.tag,{sb:u.sb||0,eb:u.eb||0}),u&&u.hasOwnProperty("richText")&&u.richText){var f=this.map.r;u.richText.forEach(function(y){f.render(a,y)})}else u&&this.map.t.render(a,u.text);a.closeNode()}},{key:"parseOpen",value:function(a){var u=a.name;return this.parser?(this.parser.parseOpen(a),!0):u===this.tag?(this.model={sb:parseInt(a.attributes.sb,10),eb:parseInt(a.attributes.eb,10)},!0):(this.parser=this.map[u],!!this.parser&&(this.parser.parseOpen(a),!0))}},{key:"parseText",value:function(a){this.parser&&this.parser.parseText(a)}},{key:"parseClose",value:function(a){if(this.parser){if(!this.parser.parseClose(a)){switch(a){case"r":var u=this.model.richText;u||(u=this.model.richText=[]),u.push(this.parser.model);break;case"t":this.model.text=this.parser.model}this.parser=void 0}return!0}switch(a){case this.tag:return!1;default:return!0}}},{key:"tag",get:function(){return"rPh"}}])&&m(t.prototype,r),n}(d("../base-xform"));I.exports=i},{"../base-xform":31,"./rich-text-xform":121,"./text-xform":124}],121:[function(d,I,T){function b(e){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function m(e,t){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var r,o=c(e);if(t){var n=c(this).constructor;r=Reflect.construct(o,arguments,n)}else r=o.apply(this,arguments);return p(this,r)}}function p(e,t){return!t||b(t)!=="object"&&typeof t!="function"?function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(e):t}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(e)}var l=d("./text-xform"),s=d("../style/font-xform"),i=function(e){(function(a,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(u&&u.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),u&&v(a,u)})(n,e);var t,r,o=h(n);function n(a){var u;return function(f,y){if(!(f instanceof y))throw new TypeError("Cannot call a class as a function")}(this,n),(u=o.call(this)).model=a,u}return t=n,(r=[{key:"render",value:function(a,u){u=u||this.model,a.openNode("r"),u.font&&this.fontXform.render(a,u.font),this.textXform.render(a,u.text),a.closeNode()}},{key:"parseOpen",value:function(a){if(this.parser)return this.parser.parseOpen(a),!0;switch(a.name){case"r":return this.model={},!0;case"t":return this.parser=this.textXform,this.parser.parseOpen(a),!0;case"rPr":return this.parser=this.fontXform,this.parser.parseOpen(a),!0;default:return!1}}},{key:"parseText",value:function(a){this.parser&&this.parser.parseText(a)}},{key:"parseClose",value:function(a){switch(a){case"r":return!1;case"t":return this.model.text=this.parser.model,this.parser=void 0,!0;case"rPr":return this.model.font=this.parser.model,this.parser=void 0,!0;default:return this.parser&&this.parser.parseClose(a),!0}}},{key:"tag",get:function(){return"r"}},{key:"textXform",get:function(){return this._textXform||(this._textXform=new l)}},{key:"fontXform",get:function(){return this._fontXform||(this._fontXform=new s(n.FONT_OPTIONS))}}])&&m(t.prototype,r),n}(d("../base-xform"));i.FONT_OPTIONS={tagName:"rPr",fontNameTag:"rFont"},I.exports=i},{"../base-xform":31,"../style/font-xform":130,"./text-xform":124}],122:[function(d,I,T){function b(t){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(t)}function m(t,r){for(var o=0;o"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var o,n=c(t);if(r){var a=c(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return p(this,o)}}function p(t,r){return!r||b(r)!=="object"&&typeof r!="function"?function(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}(t):r}function c(t){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)})(t)}var l=d("./text-xform"),s=d("./rich-text-xform"),i=d("./phonetic-text-xform"),e=function(t){(function(u,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(f&&f.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),f&&v(u,f)})(a,t);var r,o,n=h(a);function a(u){var f;return function(y,w){if(!(y instanceof w))throw new TypeError("Cannot call a class as a function")}(this,a),(f=n.call(this)).model=u,f.map={r:new s,t:new l,rPh:new i},f}return r=a,(o=[{key:"render",value:function(u,f){var y=this;u.openNode(this.tag),f&&f.hasOwnProperty("richText")&&f.richText?f.richText.length?f.richText.forEach(function(w){y.map.r.render(u,w)}):this.map.t.render(u,""):f!=null&&this.map.t.render(u,f),u.closeNode()}},{key:"parseOpen",value:function(u){var f=u.name;return this.parser?(this.parser.parseOpen(u),!0):f===this.tag?(this.model={},!0):(this.parser=this.map[f],!!this.parser&&(this.parser.parseOpen(u),!0))}},{key:"parseText",value:function(u){this.parser&&this.parser.parseText(u)}},{key:"parseClose",value:function(u){if(this.parser){if(!this.parser.parseClose(u)){switch(u){case"r":var f=this.model.richText;f||(f=this.model.richText=[]),f.push(this.parser.model);break;case"t":this.model=this.parser.model}this.parser=void 0}return!0}switch(u){case this.tag:return!1;default:return!0}}},{key:"tag",get:function(){return"si"}}])&&m(r.prototype,o),a}(d("../base-xform"));I.exports=e},{"../base-xform":31,"./phonetic-text-xform":120,"./rich-text-xform":121,"./text-xform":124}],123:[function(d,I,T){function b(t){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(t)}function m(t,r){for(var o=0;o"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var o,n=c(t);if(r){var a=c(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return p(this,o)}}function p(t,r){return!r||b(r)!=="object"&&typeof r!="function"?function(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}(t):r}function c(t){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)})(t)}var l=d("../../../utils/xml-stream"),s=d("../base-xform"),i=d("./shared-string-xform"),e=function(t){(function(u,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(f&&f.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),f&&v(u,f)})(a,t);var r,o,n=h(a);function a(u){var f;return function(y,w){if(!(y instanceof w))throw new TypeError("Cannot call a class as a function")}(this,a),(f=n.call(this)).model=u||{values:[],count:0},f.hash=Object.create(null),f.rich=Object.create(null),f}return r=a,(o=[{key:"getString",value:function(u){return this.model.values[u]}},{key:"add",value:function(u){return u.richText?this.addRichText(u):this.addText(u)}},{key:"addText",value:function(u){var f=this.hash[u];return f===void 0&&(f=this.hash[u]=this.model.values.length,this.model.values.push(u)),this.model.count++,f}},{key:"addRichText",value:function(u){var f=this.sharedStringXform.toXml(u),y=this.rich[f];return y===void 0&&(y=this.rich[f]=this.model.values.length,this.model.values.push(u)),this.model.count++,y}},{key:"render",value:function(u,f){f=f||this._values,u.openXml(l.StdDocAttributes),u.openNode("sst",{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main",count:f.count,uniqueCount:f.values.length});var y=this.sharedStringXform;f.values.forEach(function(w){y.render(u,w)}),u.closeNode()}},{key:"parseOpen",value:function(u){if(this.parser)return this.parser.parseOpen(u),!0;switch(u.name){case"sst":return!0;case"si":return this.parser=this.sharedStringXform,this.parser.parseOpen(u),!0;default:throw new Error("Unexpected xml node in parseOpen: ".concat(JSON.stringify(u)))}}},{key:"parseText",value:function(u){this.parser&&this.parser.parseText(u)}},{key:"parseClose",value:function(u){if(this.parser)return this.parser.parseClose(u)||(this.model.values.push(this.parser.model),this.model.count++,this.parser=void 0),!0;switch(u){case"sst":return!1;default:throw new Error("Unexpected xml node in parseClose: ".concat(u))}}},{key:"sharedStringXform",get:function(){return this._sharedStringXform||(this._sharedStringXform=new i)}},{key:"values",get:function(){return this.model.values}},{key:"uniqueCount",get:function(){return this.model.values.length}},{key:"count",get:function(){return this.model.count}}])&&m(r.prototype,o),a}(s);I.exports=e},{"../../../utils/xml-stream":27,"../base-xform":31,"./shared-string-xform":122}],124:[function(d,I,T){function b(i){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(i)}function m(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function v(i,e){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var t,r=l(i);if(e){var o=l(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return c(this,t)}}function c(i,e){return!e||b(e)!=="object"&&typeof e!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(i):e}function l(i){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(i)}var s=function(i){(function(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(a&&a.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),a&&h(n,a)})(o,i);var e,t,r=p(o);function o(){return m(this,o),r.apply(this,arguments)}return e=o,(t=[{key:"render",value:function(n,a){n.openNode("t"),/^\s|\n|\s$/.test(a)&&n.addAttribute("xml:space","preserve"),n.writeText(a),n.closeNode()}},{key:"parseOpen",value:function(n){switch(n.name){case"t":return this._text=[],!0;default:return!1}}},{key:"parseText",value:function(n){this._text.push(n)}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"t"}},{key:"model",get:function(){return this._text.join("").replace(/_x([0-9A-F]{4})_/g,function(n,a){return String.fromCharCode(parseInt(a,16))})}}])&&v(e.prototype,t),o}(d("../base-xform"));I.exports=s},{"../base-xform":31}],125:[function(d,I,T){function b(a){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u})(a)}function m(a,u){if(!(a instanceof u))throw new TypeError("Cannot call a class as a function")}function v(a,u){for(var f=0;f"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var f,y=l(a);if(u){var w=l(this).constructor;f=Reflect.construct(y,arguments,w)}else f=y.apply(this,arguments);return c(this,f)}}function c(a,u){return!u||b(u)!=="object"&&typeof u!="function"?function(f){if(f===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f}(a):u}function l(a){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(u){return u.__proto__||Object.getPrototypeOf(u)})(a)}var s=d("../../../doc/enums"),i=d("../../../utils/utils"),e=d("../base-xform"),t={horizontalValues:["left","center","right","fill","centerContinuous","distributed","justify"].reduce(function(a,u){return a[u]=!0,a},{}),horizontal:function(a){return this.horizontalValues[a]?a:void 0},verticalValues:["top","middle","bottom","distributed","justify"].reduce(function(a,u){return a[u]=!0,a},{}),vertical:function(a){return a==="middle"?"center":this.verticalValues[a]?a:void 0},wrapText:function(a){return!!a||void 0},shrinkToFit:function(a){return!!a||void 0},textRotation:function(a){switch(a){case"vertical":return a;default:return(a=i.validInt(a))>=-90&&a<=90?a:void 0}},indent:function(a){return a=i.validInt(a),Math.max(0,a)},readingOrder:function(a){switch(a){case"ltr":return s.ReadingOrder.LeftToRight;case"rtl":return s.ReadingOrder.RightToLeft;default:return}}},r=function(a){if(a=t.textRotation(a)){if(a==="vertical")return 255;var u=Math.round(a);if(u>=0&&u<=90)return u;if(u<0&&u>=-90)return 90-u}},o=function(a){var u=i.validInt(a);if(u!==void 0){if(u===255)return"vertical";if(u>=0&&u<=90)return u;if(u>90&&u<=180)return 90-u}},n=function(a){(function(R,E){if(typeof E!="function"&&E!==null)throw new TypeError("Super expression must either be null or a function");R.prototype=Object.create(E&&E.prototype,{constructor:{value:R,writable:!0,configurable:!0}}),E&&h(R,E)})(w,a);var u,f,y=p(w);function w(){return m(this,w),y.apply(this,arguments)}return u=w,(f=[{key:"render",value:function(R,E){R.addRollback(),R.openNode("alignment");var M=!1;function O(P,_){_&&(R.addAttribute(P,_),M=!0)}O("horizontal",t.horizontal(E.horizontal)),O("vertical",t.vertical(E.vertical)),O("wrapText",!!t.wrapText(E.wrapText)&&"1"),O("shrinkToFit",!!t.shrinkToFit(E.shrinkToFit)&&"1"),O("indent",t.indent(E.indent)),O("textRotation",r(E.textRotation)),O("readingOrder",t.readingOrder(E.readingOrder)),R.closeNode(),M?R.commit():R.rollback()}},{key:"parseOpen",value:function(R){var E={},M=!1;function O(P,_,S){P&&(E[_]=S,M=!0)}O(R.attributes.horizontal,"horizontal",R.attributes.horizontal),O(R.attributes.vertical,"vertical",R.attributes.vertical==="center"?"middle":R.attributes.vertical),O(R.attributes.wrapText,"wrapText",!!R.attributes.wrapText),O(R.attributes.shrinkToFit,"shrinkToFit",!!R.attributes.shrinkToFit),O(R.attributes.indent,"indent",parseInt(R.attributes.indent,10)),O(R.attributes.textRotation,"textRotation",o(R.attributes.textRotation)),O(R.attributes.readingOrder,"readingOrder",R.attributes.readingOrder==="2"?"rtl":"ltr"),this.model=M?E:null}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"alignment"}}])&&v(u.prototype,f),w}(e);I.exports=n},{"../../../doc/enums":7,"../../../utils/utils":26,"../base-xform":31}],126:[function(d,I,T){function b(f,y){var w=Object.keys(f);if(Object.getOwnPropertySymbols){var R=Object.getOwnPropertySymbols(f);y&&(R=R.filter(function(E){return Object.getOwnPropertyDescriptor(f,E).enumerable})),w.push.apply(w,R)}return w}function m(f){for(var y=1;y"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var w,R=r(f);if(y){var E=r(this).constructor;w=Reflect.construct(R,arguments,E)}else w=R.apply(this,arguments);return t(this,w)}}function t(f,y){return!y||h(y)!=="object"&&typeof y!="function"?function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(f):y}function r(f){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(y){return y.__proto__||Object.getPrototypeOf(y)})(f)}var o=d("../base-xform"),n=d("./color-xform"),a=function(f){s(w,f);var y=e(w);function w(R){var E;return p(this,w),(E=y.call(this)).name=R,E.map={color:new n},E}return l(w,[{key:"render",value:function(R,E,M){var O=E&&E.color||M||this.defaultColor;R.openNode(this.name),E&&E.style&&(R.addAttribute("style",E.style),O&&this.map.color.render(R,O)),R.closeNode()}},{key:"parseOpen",value:function(R){if(this.parser)return this.parser.parseOpen(R),!0;switch(R.name){case this.name:var E=R.attributes.style;return this.model=E?{style:E}:void 0,!0;case"color":return this.parser=this.map.color,this.parser.parseOpen(R),!0;default:return!1}}},{key:"parseText",value:function(R){this.parser&&this.parser.parseText(R)}},{key:"parseClose",value:function(R){return this.parser?(this.parser.parseClose(R)||(this.parser=void 0),!0):(R===this.name&&this.map.color.model&&(this.model||(this.model={}),this.model.color=this.map.color.model),!1)}},{key:"validStyle",value:function(R){return w.validStyleValues[R]}},{key:"tag",get:function(){return this.name}}]),w}(o);a.validStyleValues=["thin","dotted","dashDot","hair","dashDotDot","slantDashDot","mediumDashed","mediumDashDotDot","mediumDashDot","medium","double","thick"].reduce(function(f,y){return f[y]=!0,f},{});var u=function(f){s(w,f);var y=e(w);function w(){var R;return p(this,w),(R=y.call(this)).map={top:new a("top"),left:new a("left"),bottom:new a("bottom"),right:new a("right"),diagonal:new a("diagonal")},R}return l(w,[{key:"render",value:function(R,E){var M=E.color;function O(P,_){P&&!P.color&&E.color&&(P=m(m({},P),{},{color:E.color})),_.render(R,P,M)}R.openNode("border"),E.diagonal&&E.diagonal.style&&(E.diagonal.up&&R.addAttribute("diagonalUp","1"),E.diagonal.down&&R.addAttribute("diagonalDown","1")),O(E.left,this.map.left),O(E.right,this.map.right),O(E.top,this.map.top),O(E.bottom,this.map.bottom),O(E.diagonal,this.map.diagonal),R.closeNode()}},{key:"parseOpen",value:function(R){if(this.parser)return this.parser.parseOpen(R),!0;switch(R.name){case"border":return this.reset(),this.diagonalUp=!!R.attributes.diagonalUp,this.diagonalDown=!!R.attributes.diagonalDown,!0;default:return this.parser=this.map[R.name],!!this.parser&&(this.parser.parseOpen(R),!0)}}},{key:"parseText",value:function(R){this.parser&&this.parser.parseText(R)}},{key:"parseClose",value:function(R){if(this.parser)return this.parser.parseClose(R)||(this.parser=void 0),!0;if(R==="border"){var E=this.model={},M=function(O,P,_){P&&(_&&Object.assign(P,_),E[O]=P)};M("left",this.map.left.model),M("right",this.map.right.model),M("top",this.map.top.model),M("bottom",this.map.bottom.model),M("diagonal",this.map.diagonal.model,{up:this.diagonalUp,down:this.diagonalDown})}return!1}}]),w}(o);I.exports=u},{"../base-xform":31,"./color-xform":127}],127:[function(d,I,T){function b(s){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i})(s)}function m(s,i){for(var e=0;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var e,t=c(s);if(i){var r=c(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return p(this,e)}}function p(s,i){return!i||b(i)!=="object"&&typeof i!="function"?function(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(s):i}function c(s){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(i){return i.__proto__||Object.getPrototypeOf(i)})(s)}var l=function(s){(function(o,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(n&&n.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),n&&v(o,n)})(r,s);var i,e,t=h(r);function r(o){var n;return function(a,u){if(!(a instanceof u))throw new TypeError("Cannot call a class as a function")}(this,r),(n=t.call(this)).name=o||"color",n}return i=r,(e=[{key:"render",value:function(o,n){return!!n&&(o.openNode(this.name),n.argb?o.addAttribute("rgb",n.argb):n.theme!==void 0?(o.addAttribute("theme",n.theme),n.tint!==void 0&&o.addAttribute("tint",n.tint)):n.indexed!==void 0?o.addAttribute("indexed",n.indexed):o.addAttribute("auto","1"),o.closeNode(),!0)}},{key:"parseOpen",value:function(o){return o.name===this.name&&(o.attributes.rgb?this.model={argb:o.attributes.rgb}:o.attributes.theme?(this.model={theme:parseInt(o.attributes.theme,10)},o.attributes.tint&&(this.model.tint=parseFloat(o.attributes.tint))):o.attributes.indexed?this.model={indexed:parseInt(o.attributes.indexed,10)}:this.model=void 0,!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return this.name}}])&&m(i.prototype,e),r}(d("../base-xform"));I.exports=l},{"../base-xform":31}],128:[function(d,I,T){function b(a){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u})(a)}function m(a,u){for(var f=0;f"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var f,y=c(a);if(u){var w=c(this).constructor;f=Reflect.construct(y,arguments,w)}else f=y.apply(this,arguments);return p(this,f)}}function p(a,u){return!u||b(u)!=="object"&&typeof u!="function"?function(f){if(f===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f}(a):u}function c(a){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(u){return u.__proto__||Object.getPrototypeOf(u)})(a)}var l=d("../base-xform"),s=d("./alignment-xform"),i=d("./border-xform"),e=d("./fill-xform"),t=d("./font-xform"),r=d("./numfmt-xform"),o=d("./protection-xform"),n=function(a){(function(R,E){if(typeof E!="function"&&E!==null)throw new TypeError("Super expression must either be null or a function");R.prototype=Object.create(E&&E.prototype,{constructor:{value:R,writable:!0,configurable:!0}}),E&&v(R,E)})(w,a);var u,f,y=h(w);function w(){var R;return function(E,M){if(!(E instanceof M))throw new TypeError("Cannot call a class as a function")}(this,w),(R=y.call(this)).map={alignment:new s,border:new i,fill:new e,font:new t,numFmt:new r,protection:new o},R}return u=w,(f=[{key:"render",value:function(R,E){R.openNode(this.tag),E.font&&this.map.font.render(R,E.font),E.numFmt&&this.map.numFmt.render(R,E.numFmt),E.fill&&this.map.fill.render(R,E.fill),E.alignment&&this.map.alignment.render(R,E.alignment),E.border&&this.map.border.render(R,E.border),E.protection&&this.map.protection.render(R,E.protection),R.closeNode()}},{key:"parseOpen",value:function(R){if(this.parser)return this.parser.parseOpen(R),!0;switch(R.name){case this.tag:return this.reset(),!0;default:return this.parser=this.map[R.name],this.parser&&this.parser.parseOpen(R),!0}}},{key:"parseText",value:function(R){this.parser&&this.parser.parseText(R)}},{key:"parseClose",value:function(R){return this.parser?(this.parser.parseClose(R)||(this.parser=void 0),!0):R!==this.tag||(this.model={alignment:this.map.alignment.model,border:this.map.border.model,fill:this.map.fill.model,font:this.map.font.model,numFmt:this.map.numFmt.model,protection:this.map.protection.model},!1)}},{key:"tag",get:function(){return"dxf"}}])&&m(u.prototype,f),w}(l);I.exports=n},{"../base-xform":31,"./alignment-xform":125,"./border-xform":126,"./fill-xform":129,"./font-xform":130,"./numfmt-xform":131,"./protection-xform":132}],129:[function(d,I,T){function b(u){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(f){return typeof f}:function(f){return f&&typeof Symbol=="function"&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":typeof f})(u)}function m(u,f){if(!(u instanceof f))throw new TypeError("Cannot call a class as a function")}function v(u,f){for(var y=0;y"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var y,w=i(u);if(f){var R=i(this).constructor;y=Reflect.construct(w,arguments,R)}else y=w.apply(this,arguments);return s(this,y)}}function s(u,f){return!f||b(f)!=="object"&&typeof f!="function"?function(y){if(y===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y}(u):f}function i(u){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(f){return f.__proto__||Object.getPrototypeOf(f)})(u)}var e=d("../base-xform"),t=d("./color-xform"),r=function(u){p(y,u);var f=l(y);function y(){var w;return m(this,y),(w=f.call(this)).map={color:new t},w}return h(y,[{key:"render",value:function(w,R){w.openNode("stop"),w.addAttribute("position",R.position),this.map.color.render(w,R.color),w.closeNode()}},{key:"parseOpen",value:function(w){if(this.parser)return this.parser.parseOpen(w),!0;switch(w.name){case"stop":return this.model={position:parseFloat(w.attributes.position)},!0;case"color":return this.parser=this.map.color,this.parser.parseOpen(w),!0;default:return!1}}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(w){return!!this.parser&&(this.parser.parseClose(w)||(this.model.color=this.parser.model,this.parser=void 0),!0)}},{key:"tag",get:function(){return"stop"}}]),y}(e),o=function(u){p(y,u);var f=l(y);function y(){var w;return m(this,y),(w=f.call(this)).map={fgColor:new t("fgColor"),bgColor:new t("bgColor")},w}return h(y,[{key:"render",value:function(w,R){w.openNode("patternFill"),w.addAttribute("patternType",R.pattern),R.fgColor&&this.map.fgColor.render(w,R.fgColor),R.bgColor&&this.map.bgColor.render(w,R.bgColor),w.closeNode()}},{key:"parseOpen",value:function(w){if(this.parser)return this.parser.parseOpen(w),!0;switch(w.name){case"patternFill":return this.model={type:"pattern",pattern:w.attributes.patternType},!0;default:return this.parser=this.map[w.name],!!this.parser&&(this.parser.parseOpen(w),!0)}}},{key:"parseText",value:function(w){this.parser&&this.parser.parseText(w)}},{key:"parseClose",value:function(w){return!!this.parser&&(this.parser.parseClose(w)||(this.parser.model&&(this.model[w]=this.parser.model),this.parser=void 0),!0)}},{key:"name",get:function(){return"pattern"}},{key:"tag",get:function(){return"patternFill"}}]),y}(e),n=function(u){p(y,u);var f=l(y);function y(){var w;return m(this,y),(w=f.call(this)).map={stop:new r},w}return h(y,[{key:"render",value:function(w,R){switch(w.openNode("gradientFill"),R.gradient){case"angle":w.addAttribute("degree",R.degree);break;case"path":w.addAttribute("type","path"),R.center.left&&(w.addAttribute("left",R.center.left),R.center.right===void 0&&w.addAttribute("right",R.center.left)),R.center.right&&w.addAttribute("right",R.center.right),R.center.top&&(w.addAttribute("top",R.center.top),R.center.bottom===void 0&&w.addAttribute("bottom",R.center.top)),R.center.bottom&&w.addAttribute("bottom",R.center.bottom)}var E=this.map.stop;R.stops.forEach(function(M){E.render(w,M)}),w.closeNode()}},{key:"parseOpen",value:function(w){if(this.parser)return this.parser.parseOpen(w),!0;switch(w.name){case"gradientFill":var R=this.model={stops:[]};return w.attributes.degree?(R.gradient="angle",R.degree=parseInt(w.attributes.degree,10)):w.attributes.type==="path"&&(R.gradient="path",R.center={left:w.attributes.left?parseFloat(w.attributes.left):0,top:w.attributes.top?parseFloat(w.attributes.top):0},w.attributes.right!==w.attributes.left&&(R.center.right=w.attributes.right?parseFloat(w.attributes.right):0),w.attributes.bottom!==w.attributes.top&&(R.center.bottom=w.attributes.bottom?parseFloat(w.attributes.bottom):0)),!0;case"stop":return this.parser=this.map.stop,this.parser.parseOpen(w),!0;default:return!1}}},{key:"parseText",value:function(w){this.parser&&this.parser.parseText(w)}},{key:"parseClose",value:function(w){return!!this.parser&&(this.parser.parseClose(w)||(this.model.stops.push(this.parser.model),this.parser=void 0),!0)}},{key:"name",get:function(){return"gradient"}},{key:"tag",get:function(){return"gradientFill"}}]),y}(e),a=function(u){p(y,u);var f=l(y);function y(){var w;return m(this,y),(w=f.call(this)).map={patternFill:new o,gradientFill:new n},w}return h(y,[{key:"render",value:function(w,R){switch(w.addRollback(),w.openNode("fill"),R.type){case"pattern":this.map.patternFill.render(w,R);break;case"gradient":this.map.gradientFill.render(w,R);break;default:return void w.rollback()}w.closeNode(),w.commit()}},{key:"parseOpen",value:function(w){if(this.parser)return this.parser.parseOpen(w),!0;switch(w.name){case"fill":return this.model={},!0;default:return this.parser=this.map[w.name],!!this.parser&&(this.parser.parseOpen(w),!0)}}},{key:"parseText",value:function(w){this.parser&&this.parser.parseText(w)}},{key:"parseClose",value:function(w){return!!this.parser&&(this.parser.parseClose(w)||(this.model=this.parser.model,this.model.type=this.parser.name,this.parser=void 0),!0)}},{key:"validStyle",value:function(w){return y.validPatternValues[w]}},{key:"tag",get:function(){return"fill"}}]),y}(e);a.validPatternValues=["none","solid","darkVertical","darkGray","mediumGray","lightGray","gray125","gray0625","darkHorizontal","darkVertical","darkDown","darkUp","darkGrid","darkTrellis","lightHorizontal","lightVertical","lightDown","lightUp","lightGrid","lightTrellis","lightGrid"].reduce(function(u,f){return u[f]=!0,u},{}),a.StopXform=r,a.PatternFillXform=o,a.GradientFillXform=n,I.exports=a},{"../base-xform":31,"./color-xform":127}],130:[function(d,I,T){function b(n){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a})(n)}function m(n,a){for(var u=0;u"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var u,f=c(n);if(a){var y=c(this).constructor;u=Reflect.construct(f,arguments,y)}else u=f.apply(this,arguments);return p(this,u)}}function p(n,a){return!a||b(a)!=="object"&&typeof a!="function"?function(u){if(u===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return u}(n):a}function c(n){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(a){return a.__proto__||Object.getPrototypeOf(a)})(n)}var l=d("./color-xform"),s=d("../simple/boolean-xform"),i=d("../simple/integer-xform"),e=d("../simple/string-xform"),t=d("./underline-xform"),r=d("../../../utils/under-dash"),o=function(n){(function(w,R){if(typeof R!="function"&&R!==null)throw new TypeError("Super expression must either be null or a function");w.prototype=Object.create(R&&R.prototype,{constructor:{value:w,writable:!0,configurable:!0}}),R&&v(w,R)})(y,n);var a,u,f=h(y);function y(w){var R;return function(E,M){if(!(E instanceof M))throw new TypeError("Cannot call a class as a function")}(this,y),(R=f.call(this)).options=w||y.OPTIONS,R.map={b:{prop:"bold",xform:new s({tag:"b",attr:"val"})},i:{prop:"italic",xform:new s({tag:"i",attr:"val"})},u:{prop:"underline",xform:new t},charset:{prop:"charset",xform:new i({tag:"charset",attr:"val"})},color:{prop:"color",xform:new l},condense:{prop:"condense",xform:new s({tag:"condense",attr:"val"})},extend:{prop:"extend",xform:new s({tag:"extend",attr:"val"})},family:{prop:"family",xform:new i({tag:"family",attr:"val"})},outline:{prop:"outline",xform:new s({tag:"outline",attr:"val"})},vertAlign:{prop:"vertAlign",xform:new e({tag:"vertAlign",attr:"val"})},scheme:{prop:"scheme",xform:new e({tag:"scheme",attr:"val"})},shadow:{prop:"shadow",xform:new s({tag:"shadow",attr:"val"})},strike:{prop:"strike",xform:new s({tag:"strike",attr:"val"})},sz:{prop:"size",xform:new i({tag:"sz",attr:"val"})}},R.map[R.options.fontNameTag]={prop:"name",xform:new e({tag:R.options.fontNameTag,attr:"val"})},R}return a=y,(u=[{key:"render",value:function(w,R){var E=this.map;w.openNode(this.options.tagName),r.each(this.map,function(M,O){E[O].xform.render(w,R[M.prop])}),w.closeNode()}},{key:"parseOpen",value:function(w){if(this.parser)return this.parser.parseOpen(w),!0;if(this.map[w.name])return this.parser=this.map[w.name].xform,this.parser.parseOpen(w);switch(w.name){case this.options.tagName:return this.model={},!0;default:return!1}}},{key:"parseText",value:function(w){this.parser&&this.parser.parseText(w)}},{key:"parseClose",value:function(w){if(this.parser&&!this.parser.parseClose(w)){var R=this.map[w];return this.parser.model&&(this.model[R.prop]=this.parser.model),this.parser=void 0,!0}switch(w){case this.options.tagName:return!1;default:return!0}}},{key:"tag",get:function(){return this.options.tagName}}])&&m(a.prototype,u),y}(d("../base-xform"));o.OPTIONS={tagName:"font",fontNameTag:"name"},I.exports=o},{"../../../utils/under-dash":25,"../base-xform":31,"../simple/boolean-xform":115,"../simple/integer-xform":117,"../simple/string-xform":118,"./color-xform":127,"./underline-xform":135}],131:[function(d,I,T){function b(o){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(o)}function m(o,n){for(var a=0;a"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var a,u=c(o);if(n){var f=c(this).constructor;a=Reflect.construct(u,arguments,f)}else a=u.apply(this,arguments);return p(this,a)}}function p(o,n){return!n||b(n)!=="object"&&typeof n!="function"?function(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}(o):n}function c(o){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)})(o)}var l=d("../../../utils/under-dash"),s=d("../../defaultnumformats"),i=d("../base-xform"),e,t=(e={},l.each(s,function(o,n){o.f&&(e[o.f]=parseInt(n,10))}),e),r=function(o){(function(y,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function");y.prototype=Object.create(w&&w.prototype,{constructor:{value:y,writable:!0,configurable:!0}}),w&&v(y,w)})(f,o);var n,a,u=h(f);function f(y,w){var R;return function(E,M){if(!(E instanceof M))throw new TypeError("Cannot call a class as a function")}(this,f),(R=u.call(this)).id=y,R.formatCode=w,R}return n=f,(a=[{key:"render",value:function(y,w){y.leafNode("numFmt",{numFmtId:w.id,formatCode:w.formatCode})}},{key:"parseOpen",value:function(y){switch(y.name){case"numFmt":return this.model={id:parseInt(y.attributes.numFmtId,10),formatCode:y.attributes.formatCode.replace(/[\\](.)/g,"$1")},!0;default:return!1}}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"numFmt"}}])&&m(n.prototype,a),f}(i);r.getDefaultFmtId=function(o){return t[o]},r.getDefaultFmtCode=function(o){return s[o]&&s[o].f},I.exports=r},{"../../../utils/under-dash":25,"../../defaultnumformats":29,"../base-xform":31}],132:[function(d,I,T){function b(t){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(t)}function m(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function v(t,r){for(var o=0;o"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var o,n=l(t);if(r){var a=l(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return c(this,o)}}function c(t,r){return!r||b(r)!=="object"&&typeof r!="function"?function(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}(t):r}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)})(t)}var s=d("../base-xform"),i=function(t,r){return t===void 0?r:t},e=function(t){(function(u,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(f&&f.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),f&&h(u,f)})(a,t);var r,o,n=p(a);function a(){return m(this,a),n.apply(this,arguments)}return r=a,(o=[{key:"render",value:function(u,f){u.addRollback(),u.openNode("protection");var y=!1;function w(R,E){E!==void 0&&(u.addAttribute(R,E),y=!0)}w("locked",i(f.locked,!0)?void 0:"0"),w("hidden",i(f.hidden,!1)?"1":void 0),u.closeNode(),y?u.commit():u.rollback()}},{key:"parseOpen",value:function(u){var f={locked:u.attributes.locked!=="0",hidden:u.attributes.hidden==="1"},y=!f.locked||f.hidden;this.model=y?f:null}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"protection"}}])&&v(r.prototype,o),a}(s);I.exports=e},{"../base-xform":31}],133:[function(d,I,T){function b(t){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(t)}function m(t,r){for(var o=0;o"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var o,n=c(t);if(r){var a=c(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return p(this,o)}}function p(t,r){return!r||b(r)!=="object"&&typeof r!="function"?function(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}(t):r}function c(t){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)})(t)}var l=d("../base-xform"),s=d("./alignment-xform"),i=d("./protection-xform"),e=function(t){(function(u,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(f&&f.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),f&&v(u,f)})(a,t);var r,o,n=h(a);function a(u){var f;return function(y,w){if(!(y instanceof w))throw new TypeError("Cannot call a class as a function")}(this,a),(f=n.call(this)).xfId=!(!u||!u.xfId),f.map={alignment:new s,protection:new i},f}return r=a,(o=[{key:"render",value:function(u,f){u.openNode("xf",{numFmtId:f.numFmtId||0,fontId:f.fontId||0,fillId:f.fillId||0,borderId:f.borderId||0}),this.xfId&&u.addAttribute("xfId",f.xfId||0),f.numFmtId&&u.addAttribute("applyNumberFormat","1"),f.fontId&&u.addAttribute("applyFont","1"),f.fillId&&u.addAttribute("applyFill","1"),f.borderId&&u.addAttribute("applyBorder","1"),f.alignment&&u.addAttribute("applyAlignment","1"),f.protection&&u.addAttribute("applyProtection","1"),f.alignment&&this.map.alignment.render(u,f.alignment),f.protection&&this.map.protection.render(u,f.protection),u.closeNode()}},{key:"parseOpen",value:function(u){if(this.parser)return this.parser.parseOpen(u),!0;switch(u.name){case"xf":return this.model={numFmtId:parseInt(u.attributes.numFmtId,10),fontId:parseInt(u.attributes.fontId,10),fillId:parseInt(u.attributes.fillId,10),borderId:parseInt(u.attributes.borderId,10)},this.xfId&&(this.model.xfId=parseInt(u.attributes.xfId,10)),!0;case"alignment":return this.parser=this.map.alignment,this.parser.parseOpen(u),!0;case"protection":return this.parser=this.map.protection,this.parser.parseOpen(u),!0;default:return!1}}},{key:"parseText",value:function(u){this.parser&&this.parser.parseText(u)}},{key:"parseClose",value:function(u){return this.parser?(this.parser.parseClose(u)||(this.map.protection===this.parser?this.model.protection=this.parser.model:this.model.alignment=this.parser.model,this.parser=void 0),!0):u!=="xf"}},{key:"tag",get:function(){return"xf"}}])&&m(r.prototype,o),a}(l);I.exports=e},{"../base-xform":31,"./alignment-xform":125,"./protection-xform":132}],134:[function(d,I,T){function b(O){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(P){return typeof P}:function(P){return P&&typeof Symbol=="function"&&P.constructor===Symbol&&P!==Symbol.prototype?"symbol":typeof P})(O)}function m(O,P){if(!(O instanceof P))throw new TypeError("Cannot call a class as a function")}function v(O,P){for(var _=0;_"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var _,S=i(O);if(P){var g=i(this).constructor;_=Reflect.construct(S,arguments,g)}else _=S.apply(this,arguments);return s(this,_)}}function s(O,P){return!P||b(P)!=="object"&&typeof P!="function"?function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(O):P}function i(O){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(P){return P.__proto__||Object.getPrototypeOf(P)})(O)}var e=d("../../../doc/enums"),t=d("../../../utils/xml-stream"),r=d("../base-xform"),o=d("../static-xform"),n=d("../list-xform"),a=d("./font-xform"),u=d("./fill-xform"),f=d("./border-xform"),y=d("./numfmt-xform"),w=d("./style-xform"),R=d("./dxf-xform"),E=function(O){p(_,O);var P=l(_);function _(S){var g;return m(this,_),(g=P.call(this)).map={numFmts:new n({tag:"numFmts",count:!0,childXform:new y}),fonts:new n({tag:"fonts",count:!0,childXform:new a,$:{"x14ac:knownFonts":1}}),fills:new n({tag:"fills",count:!0,childXform:new u}),borders:new n({tag:"borders",count:!0,childXform:new f}),cellStyleXfs:new n({tag:"cellStyleXfs",count:!0,childXform:new w}),cellXfs:new n({tag:"cellXfs",count:!0,childXform:new w({xfId:!0})}),dxfs:new n({tag:"dxfs",always:!0,count:!0,childXform:new R}),numFmt:new y,font:new a,fill:new u,border:new f,style:new w({xfId:!0}),cellStyles:_.STATIC_XFORMS.cellStyles,tableStyles:_.STATIC_XFORMS.tableStyles,extLst:_.STATIC_XFORMS.extLst},S&&g.init(),g}return h(_,[{key:"initIndex",value:function(){this.index={style:{},numFmt:{},numFmtNextId:164,font:{},border:{},fill:{}}}},{key:"init",value:function(){this.model={styles:[],numFmts:[],fonts:[],borders:[],fills:[],dxfs:[]},this.initIndex(),this._addBorder({}),this._addStyle({numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}),this._addFill({type:"pattern",pattern:"none"}),this._addFill({type:"pattern",pattern:"gray125"}),this.weakMap=new WeakMap}},{key:"render",value:function(S,g){g=g||this.model,S.openXml(t.StdDocAttributes),S.openNode("styleSheet",_.STYLESHEET_ATTRIBUTES),this.index?(g.numFmts&&g.numFmts.length&&(S.openNode("numFmts",{count:g.numFmts.length}),g.numFmts.forEach(function(j){S.writeXml(j)}),S.closeNode()),g.fonts.length||this._addFont({size:11,color:{theme:1},name:"Calibri",family:2,scheme:"minor"}),S.openNode("fonts",{count:g.fonts.length,"x14ac:knownFonts":1}),g.fonts.forEach(function(j){S.writeXml(j)}),S.closeNode(),S.openNode("fills",{count:g.fills.length}),g.fills.forEach(function(j){S.writeXml(j)}),S.closeNode(),S.openNode("borders",{count:g.borders.length}),g.borders.forEach(function(j){S.writeXml(j)}),S.closeNode(),this.map.cellStyleXfs.render(S,[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}]),S.openNode("cellXfs",{count:g.styles.length}),g.styles.forEach(function(j){S.writeXml(j)}),S.closeNode()):(this.map.numFmts.render(S,g.numFmts),this.map.fonts.render(S,g.fonts),this.map.fills.render(S,g.fills),this.map.borders.render(S,g.borders),this.map.cellStyleXfs.render(S,[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}]),this.map.cellXfs.render(S,g.styles)),_.STATIC_XFORMS.cellStyles.render(S),this.map.dxfs.render(S,g.dxfs),_.STATIC_XFORMS.tableStyles.render(S),_.STATIC_XFORMS.extLst.render(S),S.closeNode()}},{key:"parseOpen",value:function(S){if(this.parser)return this.parser.parseOpen(S),!0;switch(S.name){case"styleSheet":return this.initIndex(),!0;default:return this.parser=this.map[S.name],this.parser&&this.parser.parseOpen(S),!0}}},{key:"parseText",value:function(S){this.parser&&this.parser.parseText(S)}},{key:"parseClose",value:function(S){var g=this;if(this.parser)return this.parser.parseClose(S)||(this.parser=void 0),!0;switch(S){case"styleSheet":this.model={};var j=function(x,C){C.model&&C.model.length&&(g.model[x]=C.model)};if(j("numFmts",this.map.numFmts),j("fonts",this.map.fonts),j("fills",this.map.fills),j("borders",this.map.borders),j("styles",this.map.cellXfs),j("dxfs",this.map.dxfs),this.index={model:[],numFmt:[]},this.model.numFmts){var k=this.index.numFmt;this.model.numFmts.forEach(function(x){k[x.id]=x.formatCode})}return!1;default:return!0}}},{key:"addStyleModel",value:function(S,g){if(!S)return 0;if(this.model.fonts.length||this._addFont({size:11,color:{theme:1},name:"Calibri",family:2,scheme:"minor"}),this.weakMap&&this.weakMap.has(S))return this.weakMap.get(S);var j={};if(g=g||e.ValueType.Number,S.numFmt)j.numFmtId=this._addNumFmtStr(S.numFmt);else switch(g){case e.ValueType.Number:j.numFmtId=this._addNumFmtStr("General");break;case e.ValueType.Date:j.numFmtId=this._addNumFmtStr("mm-dd-yy")}S.font&&(j.fontId=this._addFont(S.font)),S.border&&(j.borderId=this._addBorder(S.border)),S.fill&&(j.fillId=this._addFill(S.fill)),S.alignment&&(j.alignment=S.alignment),S.protection&&(j.protection=S.protection);var k=this._addStyle(j);return this.weakMap&&this.weakMap.set(S,k),k}},{key:"getStyleModel",value:function(S){var g=this.model.styles[S];if(!g)return null;var j=this.index.model[S];if(j)return j;if(j=this.index.model[S]={},g.numFmtId){var k=this.index.numFmt[g.numFmtId]||y.getDefaultFmtCode(g.numFmtId);k&&(j.numFmt=k)}function x(C,D,F){if(F||F===0){var B=D[F];B&&(j[C]=B)}}return x("font",this.model.fonts,g.fontId),x("border",this.model.borders,g.borderId),x("fill",this.model.fills,g.fillId),g.alignment&&(j.alignment=g.alignment),g.protection&&(j.protection=g.protection),j}},{key:"addDxfStyle",value:function(S){return this.model.dxfs.push(S),this.model.dxfs.length-1}},{key:"getDxfStyle",value:function(S){return this.model.dxfs[S]}},{key:"_addStyle",value:function(S){var g=this.map.style.toXml(S),j=this.index.style[g];return j===void 0&&(j=this.index.style[g]=this.model.styles.length,this.model.styles.push(g)),j}},{key:"_addNumFmtStr",value:function(S){var g=y.getDefaultFmtId(S);if(g!==void 0||(g=this.index.numFmt[S])!==void 0)return g;g=this.index.numFmt[S]=164+this.model.numFmts.length;var j=this.map.numFmt.toXml({id:g,formatCode:S});return this.model.numFmts.push(j),g}},{key:"_addFont",value:function(S){var g=this.map.font.toXml(S),j=this.index.font[g];return j===void 0&&(j=this.index.font[g]=this.model.fonts.length,this.model.fonts.push(g)),j}},{key:"_addBorder",value:function(S){var g=this.map.border.toXml(S),j=this.index.border[g];return j===void 0&&(j=this.index.border[g]=this.model.borders.length,this.model.borders.push(g)),j}},{key:"_addFill",value:function(S){var g=this.map.fill.toXml(S),j=this.index.fill[g];return j===void 0&&(j=this.index.fill[g]=this.model.fills.length,this.model.fills.push(g)),j}}]),_}(r);E.STYLESHEET_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"x14ac x16r2","xmlns:x14ac":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac","xmlns:x16r2":"http://schemas.microsoft.com/office/spreadsheetml/2015/02/main"},E.STATIC_XFORMS={cellStyles:new o({tag:"cellStyles",$:{count:1},c:[{tag:"cellStyle",$:{name:"Normal",xfId:0,builtinId:0}}]}),dxfs:new o({tag:"dxfs",$:{count:0}}),tableStyles:new o({tag:"tableStyles",$:{count:0,defaultTableStyle:"TableStyleMedium2",defaultPivotStyle:"PivotStyleLight16"}}),extLst:new o({tag:"extLst",c:[{tag:"ext",$:{uri:"{EB79DEF2-80B8-43e5-95BD-54CBDDF9020C}","xmlns:x14":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"},c:[{tag:"x14:slicerStyles",$:{defaultSlicerStyle:"SlicerStyleLight1"}}]},{tag:"ext",$:{uri:"{9260A510-F301-46a8-8635-F512D64BE5F5}","xmlns:x15":"http://schemas.microsoft.com/office/spreadsheetml/2010/11/main"},c:[{tag:"x15:timelineStyles",$:{defaultTimelineStyle:"TimeSlicerStyleLight1"}}]}]})};var M=function(O){p(_,O);var P=l(_);function _(){var S;return m(this,_),(S=P.call(this)).model={styles:[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}],numFmts:[],fonts:[{size:11,color:{theme:1},name:"Calibri",family:2,scheme:"minor"}],borders:[{}],fills:[{type:"pattern",pattern:"none"},{type:"pattern",pattern:"gray125"}]},S}return h(_,[{key:"parseStream",value:function(S){return S.autodrain(),Promise.resolve()}},{key:"addStyleModel",value:function(S,g){switch(g){case e.ValueType.Date:return this.dateStyleId;default:return 0}}},{key:"getStyleModel",value:function(){return{}}},{key:"dateStyleId",get:function(){if(!this._dateStyleId){var S={numFmtId:y.getDefaultFmtId("mm-dd-yy")};this._dateStyleId=this.model.styles.length,this.model.styles.push(S)}return this._dateStyleId}}]),_}(E);E.Mock=M,I.exports=E},{"../../../doc/enums":7,"../../../utils/xml-stream":27,"../base-xform":31,"../list-xform":70,"../static-xform":119,"./border-xform":126,"./dxf-xform":128,"./fill-xform":129,"./font-xform":130,"./numfmt-xform":131,"./style-xform":133}],135:[function(d,I,T){function b(s){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i})(s)}function m(s,i){for(var e=0;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var e,t=c(s);if(i){var r=c(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return p(this,e)}}function p(s,i){return!i||b(i)!=="object"&&typeof i!="function"?function(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(s):i}function c(s){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(i){return i.__proto__||Object.getPrototypeOf(i)})(s)}var l=function(s){(function(o,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(n&&n.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),n&&v(o,n)})(r,s);var i,e,t=h(r);function r(o){var n;return function(a,u){if(!(a instanceof u))throw new TypeError("Cannot call a class as a function")}(this,r),(n=t.call(this)).model=o,n}return i=r,(e=[{key:"render",value:function(o,n){if((n=n||this.model)===!0)o.leafNode("u");else{var a=r.Attributes[n];a&&o.leafNode("u",a)}}},{key:"parseOpen",value:function(o){o.name==="u"&&(this.model=o.attributes.val||!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"u"}}])&&m(i.prototype,e),r}(d("../base-xform"));l.Attributes={single:{},double:{val:"double"},singleAccounting:{val:"singleAccounting"},doubleAccounting:{val:"doubleAccounting"}},I.exports=l},{"../base-xform":31}],136:[function(d,I,T){function b(e){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function m(e,t){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var r,o=c(e);if(t){var n=c(this).constructor;r=Reflect.construct(o,arguments,n)}else r=o.apply(this,arguments);return p(this,r)}}function p(e,t){return!t||b(t)!=="object"&&typeof t!="function"?function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(e):t}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(e)}var l=d("../base-xform"),s=d("./filter-column-xform"),i=function(e){(function(a,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(u&&u.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),u&&v(a,u)})(n,e);var t,r,o=h(n);function n(){var a;return function(u,f){if(!(u instanceof f))throw new TypeError("Cannot call a class as a function")}(this,n),(a=o.call(this)).map={filterColumn:new s},a}return t=n,(r=[{key:"prepare",value:function(a){var u=this;a.columns.forEach(function(f,y){u.map.filterColumn.prepare(f,{index:y})})}},{key:"render",value:function(a,u){var f=this;return a.openNode(this.tag,{ref:u.autoFilterRef}),u.columns.forEach(function(y){f.map.filterColumn.render(a,y)}),a.closeNode(),!0}},{key:"parseOpen",value:function(a){if(this.parser)return this.parser.parseOpen(a),!0;switch(a.name){case this.tag:return this.model={autoFilterRef:a.attributes.ref,columns:[]},!0;default:if(this.parser=this.map[a.name],this.parser)return this.parseOpen(a),!0;throw new Error("Unexpected xml node in parseOpen: ".concat(JSON.stringify(a)))}}},{key:"parseText",value:function(a){this.parser&&this.parser.parseText(a)}},{key:"parseClose",value:function(a){if(this.parser)return this.parser.parseClose(a)||(this.model.columns.push(this.parser.model),this.parser=void 0),!0;switch(a){case this.tag:return!1;default:throw new Error("Unexpected xml node in parseClose: ".concat(a))}}},{key:"tag",get:function(){return"autoFilter"}}])&&m(t.prototype,r),n}(l);I.exports=i},{"../base-xform":31,"./filter-column-xform":137}],137:[function(d,I,T){function b(i){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(i)}function m(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function v(i,e){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var t,r=l(i);if(e){var o=l(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return c(this,t)}}function c(i,e){return!e||b(e)!=="object"&&typeof e!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(i):e}function l(i){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(i)}var s=function(i){(function(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(a&&a.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),a&&h(n,a)})(o,i);var e,t,r=p(o);function o(){return m(this,o),r.apply(this,arguments)}return e=o,(t=[{key:"prepare",value:function(n,a){n.colId=a.index.toString()}},{key:"render",value:function(n,a){return n.leafNode(this.tag,{colId:a.colId,hiddenButton:a.filterButton?"0":"1"}),!0}},{key:"parseOpen",value:function(n){if(n.name===this.tag){var a=n.attributes;return this.model={filterButton:a.hiddenButton==="0"},!0}return!1}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"filterColumn"}}])&&v(e.prototype,t),o}(d("../base-xform"));I.exports=s},{"../base-xform":31}],138:[function(d,I,T){function b(i){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(i)}function m(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function v(i,e){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var t,r=l(i);if(e){var o=l(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return c(this,t)}}function c(i,e){return!e||b(e)!=="object"&&typeof e!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(i):e}function l(i){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(i)}var s=function(i){(function(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(a&&a.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),a&&h(n,a)})(o,i);var e,t,r=p(o);function o(){return m(this,o),r.apply(this,arguments)}return e=o,(t=[{key:"prepare",value:function(n,a){n.id=a.index+1}},{key:"render",value:function(n,a){return n.leafNode(this.tag,{id:a.id.toString(),name:a.name,totalsRowLabel:a.totalsRowLabel,totalsRowFunction:a.totalsRowFunction,dxfId:a.dxfId}),!0}},{key:"parseOpen",value:function(n){if(n.name===this.tag){var a=n.attributes;return this.model={name:a.name,totalsRowLabel:a.totalsRowLabel,totalsRowFunction:a.totalsRowFunction,dxfId:a.dxfId},!0}return!1}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"tableColumn"}}])&&v(e.prototype,t),o}(d("../base-xform"));I.exports=s},{"../base-xform":31}],139:[function(d,I,T){function b(i){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(i)}function m(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function v(i,e){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var t,r=l(i);if(e){var o=l(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return c(this,t)}}function c(i,e){return!e||b(e)!=="object"&&typeof e!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(i):e}function l(i){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(i)}var s=function(i){(function(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(a&&a.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),a&&h(n,a)})(o,i);var e,t,r=p(o);function o(){return m(this,o),r.apply(this,arguments)}return e=o,(t=[{key:"render",value:function(n,a){return n.leafNode(this.tag,{name:a.theme?a.theme:void 0,showFirstColumn:a.showFirstColumn?"1":"0",showLastColumn:a.showLastColumn?"1":"0",showRowStripes:a.showRowStripes?"1":"0",showColumnStripes:a.showColumnStripes?"1":"0"}),!0}},{key:"parseOpen",value:function(n){if(n.name===this.tag){var a=n.attributes;return this.model={theme:a.name?a.name:null,showFirstColumn:a.showFirstColumn==="1",showLastColumn:a.showLastColumn==="1",showRowStripes:a.showRowStripes==="1",showColumnStripes:a.showColumnStripes==="1"},!0}return!1}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"tableStyleInfo"}}])&&v(e.prototype,t),o}(d("../base-xform"));I.exports=s},{"../base-xform":31}],140:[function(d,I,T){function b(f){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y})(f)}function m(f,y){var w=Object.keys(f);if(Object.getOwnPropertySymbols){var R=Object.getOwnPropertySymbols(f);y&&(R=R.filter(function(E){return Object.getOwnPropertyDescriptor(f,E).enumerable})),w.push.apply(w,R)}return w}function v(f){for(var y=1;y"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var w,R=i(f);if(y){var E=i(this).constructor;w=Reflect.construct(R,arguments,E)}else w=R.apply(this,arguments);return s(this,w)}}function s(f,y){return!y||b(y)!=="object"&&typeof y!="function"?function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(f):y}function i(f){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(y){return y.__proto__||Object.getPrototypeOf(y)})(f)}var e=d("../../../utils/xml-stream"),t=d("../base-xform"),r=d("../list-xform"),o=d("./auto-filter-xform"),n=d("./table-column-xform"),a=d("./table-style-info-xform"),u=function(f){(function(M,O){if(typeof O!="function"&&O!==null)throw new TypeError("Super expression must either be null or a function");M.prototype=Object.create(O&&O.prototype,{constructor:{value:M,writable:!0,configurable:!0}}),O&&c(M,O)})(E,f);var y,w,R=l(E);function E(){var M;return function(O,P){if(!(O instanceof P))throw new TypeError("Cannot call a class as a function")}(this,E),(M=R.call(this)).map={autoFilter:new o,tableColumns:new r({tag:"tableColumns",count:!0,empty:!0,childXform:new n}),tableStyleInfo:new a},M}return y=E,(w=[{key:"prepare",value:function(M,O){this.map.autoFilter.prepare(M),this.map.tableColumns.prepare(M.columns,O)}},{key:"render",value:function(M,O){M.openXml(e.StdDocAttributes),M.openNode(this.tag,v(v({},E.TABLE_ATTRIBUTES),{},{id:O.id,name:O.name,displayName:O.displayName||O.name,ref:O.tableRef,totalsRowCount:O.totalsRow?"1":void 0,totalsRowShown:O.totalsRow?void 0:"1",headerRowCount:O.headerRow?"1":"0"})),this.map.autoFilter.render(M,O),this.map.tableColumns.render(M,O.columns),this.map.tableStyleInfo.render(M,O.style),M.closeNode()}},{key:"parseOpen",value:function(M){if(this.parser)return this.parser.parseOpen(M),!0;var O=M.name,P=M.attributes;switch(O){case this.tag:this.reset(),this.model={name:P.name,displayName:P.displayName||P.name,tableRef:P.ref,totalsRow:P.totalsRowCount==="1",headerRow:P.headerRowCount==="1"};break;default:this.parser=this.map[M.name],this.parser&&this.parser.parseOpen(M)}return!0}},{key:"parseText",value:function(M){this.parser&&this.parser.parseText(M)}},{key:"parseClose",value:function(M){var O=this;if(this.parser)return this.parser.parseClose(M)||(this.parser=void 0),!0;switch(M){case this.tag:return this.model.columns=this.map.tableColumns.model,this.map.autoFilter.model&&(this.model.autoFilterRef=this.map.autoFilter.model.autoFilterRef,this.map.autoFilter.model.columns.forEach(function(P,_){O.model.columns[_].filterButton=P.filterButton})),this.model.style=this.map.tableStyleInfo.model,!1;default:return!0}}},{key:"reconcile",value:function(M,O){M.columns.forEach(function(P){P.dxfId!==void 0&&(P.style=O.styles.getDxfStyle(P.dxfId))})}},{key:"tag",get:function(){return"table"}}])&&p(y.prototype,w),E}(t);u.TABLE_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"xr xr3","xmlns:xr":"http://schemas.microsoft.com/office/spreadsheetml/2014/revision","xmlns:xr3":"http://schemas.microsoft.com/office/spreadsheetml/2016/revision3"},I.exports=u},{"../../../utils/xml-stream":27,"../base-xform":31,"../list-xform":70,"./auto-filter-xform":136,"./table-column-xform":138,"./table-style-info-xform":139}],141:[function(d,I,T){(function(b,m){function v(x,C,D,F,B,U,H){try{var V=x[U](H),q=V.value}catch($){return void D($)}V.done?C(q):Promise.resolve(q).then(F,B)}function h(x){return function(){var C=this,D=arguments;return new Promise(function(F,B){var U=x.apply(C,D);function H(q){v(U,F,B,H,V,"next",q)}function V(q){v(U,F,B,H,V,"throw",q)}H(void 0)})}}function p(x,C){for(var D=0;D=1)){he.next=6;break}return ae=oe.substr(ne+1),re=oe.substr(0,ne),he.next=6,new Promise(function(le,pe){var Se=new t;Se.on("finish",function(){J.mediaIndex[oe]=J.media.length,J.mediaIndex[re]=J.media.length;var ge={type:"image",name:re,extension:ae,buffer:Se.toBuffer()};J.media.push(ge),le()}),ee.on("error",function(ge){pe(ge)}),ee.pipe(Se)});case 6:case"end":return he.stop()}},Z)})),function(Z,ee,J){return Ee.apply(this,arguments)})},{key:"_processDrawingEntry",value:(ce=h(regeneratorRuntime.mark(function Z(ee,J,oe){var ne,ae;return regeneratorRuntime.wrap(function(re){for(;;)switch(re.prev=re.next){case 0:return ne=new O,re.next=3,ne.parseStream(ee);case 3:ae=re.sent,J.drawings[oe]=ae;case 5:case"end":return re.stop()}},Z)})),function(Z,ee,J){return ce.apply(this,arguments)})},{key:"_processDrawingRelsEntry",value:(de=h(regeneratorRuntime.mark(function Z(ee,J,oe){var ne,ae;return regeneratorRuntime.wrap(function(re){for(;;)switch(re.prev=re.next){case 0:return ne=new y,re.next=3,ne.parseStream(ee);case 3:ae=re.sent,J.drawingRels[oe]=ae;case 5:case"end":return re.stop()}},Z)})),function(Z,ee,J){return de.apply(this,arguments)})},{key:"_processVmlDrawingEntry",value:(ue=h(regeneratorRuntime.mark(function Z(ee,J,oe){var ne,ae;return regeneratorRuntime.wrap(function(re){for(;;)switch(re.prev=re.next){case 0:return ne=new S,re.next=3,ne.parseStream(ee);case 3:ae=re.sent,J.vmlDrawings["../drawings/".concat(oe,".vml")]=ae;case 5:case"end":return re.stop()}},Z)})),function(Z,ee,J){return ue.apply(this,arguments)})},{key:"_processThemeEntry",value:(Q=h(regeneratorRuntime.mark(function Z(ee,J,oe){return regeneratorRuntime.wrap(function(ne){for(;;)switch(ne.prev=ne.next){case 0:return ne.next=2,new Promise(function(ae,re){var he=new t;ee.on("error",re),he.on("error",re),he.on("finish",function(){J.themes[oe]=he.read().toString(),ae()}),ee.pipe(he)});case 2:case"end":return ne.stop()}},Z)})),function(Z,ee,J){return Q.apply(this,arguments)})},{key:"createInputStream",value:function(){throw new Error("`XLSX#createInputStream` is deprecated. You should use `XLSX#read` instead. This method will be removed in version 5.0. Please follow upgrade instruction: https://github.com/exceljs/exceljs/blob/master/UPGRADE-4.0.md")}},{key:"read",value:(ie=h(regeneratorRuntime.mark(function Z(ee,J){var oe,ne,ae,re,he,le,pe,Se;return regeneratorRuntime.wrap(function(ge){for(;;)switch(ge.prev=ge.next){case 0:!ee[Symbol.asyncIterator]&&ee.pipe&&(ee=ee.pipe(new i)),oe=[],ne=!0,ae=!1,ge.prev=4,he=c(ee);case 6:return ge.next=8,he.next();case 8:return le=ge.sent,ne=le.done,ge.next=12,le.value;case 12:if(pe=ge.sent,ne){ge.next=19;break}Se=pe,oe.push(Se);case 16:ne=!0,ge.next=6;break;case 19:ge.next=25;break;case 21:ge.prev=21,ge.t0=ge.catch(4),ae=!0,re=ge.t0;case 25:if(ge.prev=25,ge.prev=26,ne||he.return==null){ge.next=30;break}return ge.next=30,he.return();case 30:if(ge.prev=30,!ae){ge.next=33;break}throw re;case 33:return ge.finish(30);case 34:return ge.finish(25);case 35:return ge.abrupt("return",this.load(m.concat(oe),J));case 36:case"end":return ge.stop()}},Z,this,[[4,21,25,35],[26,,30,34]])})),function(Z,ee){return ie.apply(this,arguments)})},{key:"load",value:(K=h(regeneratorRuntime.mark(function Z(ee,J){var oe,ne,ae,re,he,le,pe,Se,ge,De,Ae,Be,Ze,rt,Ie,ze;return regeneratorRuntime.wrap(function(me){for(;;)switch(me.prev=me.next){case 0:return oe=J&&J.base64?m.from(ee.toString(),"base64"):ee,ne={worksheets:[],worksheetHash:{},worksheetRels:[],themes:{},media:[],mediaIndex:{},drawings:{},drawingRels:{},comments:{},tables:{},vmlDrawings:{}},me.next=4,s.loadAsync(oe);case 4:ae=me.sent,re=0,he=Object.values(ae.files);case 6:if(!(re0&&(pe=new o,ae.render(pe,le),ee.append(pe.xml,{name:"xl/comments".concat(le.id,".xml")}),pe=new o,re.render(pe,le),ee.append(pe.xml,{name:"xl/drawings/vmlDrawing".concat(le.id,".vml")}))});case 5:case"end":return he.stop()}},Z)})),function(Z,ee){return U.apply(this,arguments)})},{key:"_finalize",value:function(Z){var ee=this;return new Promise(function(J,oe){Z.on("finish",function(){J(ee)}),Z.on("error",oe),Z.finalize()})}},{key:"prepareModel",value:function(Z,ee){Z.creator=Z.creator||"ExcelJS",Z.lastModifiedBy=Z.lastModifiedBy||"ExcelJS",Z.created=Z.created||new Date,Z.modified=Z.modified||new Date,Z.useSharedStrings=ee.useSharedStrings===void 0||ee.useSharedStrings,Z.useStyles=ee.useStyles===void 0||ee.useStyles,Z.sharedStrings=new f,Z.styles=Z.useStyles?new a(!0):new a.Mock;var J=new E,oe=new M;J.prepare(Z);var ne={sharedStrings:Z.sharedStrings,styles:Z.styles,date1904:Z.properties.date1904,drawingsCount:0,media:Z.media};ne.drawings=Z.drawings=[],ne.commentRefs=Z.commentRefs=[];var ae=0;Z.tables=[],Z.worksheets.forEach(function(re){re.tables.forEach(function(he){ae++,he.target="table".concat(ae,".xml"),he.id=ae,Z.tables.push(he)}),oe.prepare(re,ne)})}},{key:"write",value:(B=h(regeneratorRuntime.mark(function Z(ee,J){var oe,ne;return regeneratorRuntime.wrap(function(ae){for(;;)switch(ae.prev=ae.next){case 0:return J=J||{},oe=this.workbook.model,(ne=new e.ZipWriter(J.zip)).pipe(ee),this.prepareModel(oe,J),ae.next=7,this.addContentTypes(ne,oe);case 7:return ae.next=9,this.addOfficeRels(ne,oe);case 9:return ae.next=11,this.addWorkbookRels(ne,oe);case 11:return ae.next=13,this.addWorksheets(ne,oe);case 13:return ae.next=15,this.addSharedStrings(ne,oe);case 15:return ae.next=17,this.addDrawings(ne,oe);case 17:return ae.next=19,this.addTables(ne,oe);case 19:return ae.next=21,Promise.all([this.addThemes(ne,oe),this.addStyles(ne,oe)]);case 21:return ae.next=23,this.addMedia(ne,oe);case 23:return ae.next=25,Promise.all([this.addApp(ne,oe),this.addCore(ne,oe)]);case 25:return ae.next=27,this.addWorkbook(ne,oe);case 27:return ae.abrupt("return",this._finalize(ne));case 28:case"end":return ae.stop()}},Z,this)})),function(Z,ee){return B.apply(this,arguments)})},{key:"writeFile",value:function(Z,ee){var J=this,oe=l.createWriteStream(Z);return new Promise(function(ne,ae){oe.on("finish",function(){ne()}),oe.on("error",function(re){ae(re)}),J.write(oe,ee).then(function(){oe.end()})})}},{key:"writeBuffer",value:(F=h(regeneratorRuntime.mark(function Z(ee){var J;return regeneratorRuntime.wrap(function(oe){for(;;)switch(oe.prev=oe.next){case 0:return J=new t,oe.next=3,this.write(J,ee);case 3:return oe.abrupt("return",J.read());case 4:case"end":return oe.stop()}},Z,this)})),function(Z){return F.apply(this,arguments)})}])&&p(C.prototype,D),x}();k.RelType=d("./rel-type"),I.exports=k}).call(this,d("_process"),d("buffer").Buffer)},{"../utils/browser-buffer-decode":16,"../utils/stream-buf":23,"../utils/utils":26,"../utils/xml-stream":27,"../utils/zip-stream":28,"./rel-type":30,"./xform/book/workbook-xform":37,"./xform/comment/comments-xform":39,"./xform/comment/vml-notes-xform":44,"./xform/core/app-xform":50,"./xform/core/content-types-xform":51,"./xform/core/core-xform":52,"./xform/core/relationships-xform":54,"./xform/drawing/drawing-xform":61,"./xform/sheet/worksheet-xform":114,"./xform/strings/shared-strings-xform":123,"./xform/style/styles-xform":134,"./xform/table/table-xform":140,"./xml/theme1.js":142,_process:467,buffer:216,fs:215,jszip:399,"readable-stream":491}],142:[function(d,I,T){I.exports=` `},{}],143:[function(d,I,T){(function(b){function m(t){return(m=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(t)}function v(t,r){for(var o=0;o"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var o,n=l(t);if(r){var a=l(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return c(this,o)}}function c(t,r){return!r||m(r)!=="object"&&typeof r!="function"?function(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}(t):r}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)})(t)}Object.defineProperty(T,"__esModule",{value:!0}),T.CsvFormatterStream=void 0;var s=d("stream"),i=d("./formatter"),e=function(t){(function(u,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(f&&f.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),f&&h(u,f)})(a,t);var r,o,n=p(a);function a(u){var f;return function(y,w){if(!(y instanceof w))throw new TypeError("Cannot call a class as a function")}(this,a),(f=n.call(this,{writableObjectMode:u.objectMode})).hasWrittenBOM=!1,f.formatterOptions=u,f.rowFormatter=new i.RowFormatter(u),f.hasWrittenBOM=!u.writeBOM,f}return r=a,(o=[{key:"transform",value:function(u){return this.rowFormatter.rowTransform=u,this}},{key:"_transform",value:function(u,f,y){var w=this,R=!1;try{this.hasWrittenBOM||(this.push(this.formatterOptions.BOM),this.hasWrittenBOM=!0),this.rowFormatter.format(u,function(E,M){return E?(R=!0,y(E)):(M&&M.forEach(function(O){w.push(b.from(O,"utf8"))}),R=!0,y())})}catch(E){if(R)throw E;y(E)}}},{key:"_flush",value:function(u){var f=this;this.rowFormatter.finish(function(y,w){return y?u(y):(w&&w.forEach(function(R){f.push(b.from(R,"utf8"))}),u())})}}])&&v(r.prototype,o),a}(s.Transform);T.CsvFormatterStream=e}).call(this,d("buffer").Buffer)},{"./formatter":147,buffer:216,stream:506}],144:[function(d,I,T){function b(m,v){if(!(m instanceof v))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(T,"__esModule",{value:!0}),T.FormatterOptions=void 0,T.FormatterOptions=function m(){var v,h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};b(this,m),this.objectMode=!0,this.delimiter=",",this.rowDelimiter=` `,this.quote='"',this.escape=this.quote,this.quoteColumns=!1,this.quoteHeaders=this.quoteColumns,this.headers=null,this.includeEndRowDelimiter=!1,this.writeBOM=!1,this.BOM="\uFEFF",this.alwaysWriteHeaders=!1,Object.assign(this,h||{}),(h==null?void 0:h.quoteHeaders)===void 0&&(this.quoteHeaders=this.quoteColumns),(h==null?void 0:h.quote)===!0?this.quote='"':(h==null?void 0:h.quote)===!1&&(this.quote=""),typeof(h==null?void 0:h.escape)!="string"&&(this.escape=this.quote),this.shouldWriteHeaders=!!this.headers&&((v=h.writeHeaders)===null||v===void 0||v),this.headers=Array.isArray(this.headers)?this.headers:null,this.escapedQuote="".concat(this.escape).concat(this.quote)}},{}],145:[function(d,I,T){function b(l,s){for(var i=0;i1&&arguments[1]!==void 0?arguments[1]:{},a=[],u=new l.Writable({write:function(f,y,w){a.push(f),w()}});return new Promise(function(f,y){u.on("error",y).on("finish",function(){return f(b.concat(a))}),T.write(o,n).pipe(u)})},T.writeToString=function(o,n){return T.writeToBuffer(o,n).then(function(a){return a.toString()})},T.writeToPath=function(o,n,a){var u=s.createWriteStream(o,{encoding:"utf8"});return T.write(n,a).pipe(u)}}).call(this,d("buffer").Buffer)},{"./CsvFormatterStream":143,"./FormatterOptions":144,"./types":149,buffer:216,fs:215,stream:506,util:525}],149:[function(d,I,T){Object.defineProperty(T,"__esModule",{value:!0}),T.isSyncTransform=void 0,T.isSyncTransform=function(b){return b.length===1}},{}],150:[function(d,I,T){(function(b){function m(n){return(m=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a})(n)}function v(n,a){for(var u=0;u"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var u,f=s(n);if(a){var y=s(this).constructor;u=Reflect.construct(f,arguments,y)}else u=f.apply(this,arguments);return l(this,u)}}function l(n,a){return!a||m(a)!=="object"&&typeof a!="function"?function(u){if(u===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return u}(n):a}function s(n){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(a){return a.__proto__||Object.getPrototypeOf(a)})(n)}Object.defineProperty(T,"__esModule",{value:!0}),T.CsvParserStream=void 0;var i=d("string_decoder"),e=d("stream"),t=d("./transforms"),r=d("./parser"),o=function(n){(function(w,R){if(typeof R!="function"&&R!==null)throw new TypeError("Super expression must either be null or a function");w.prototype=Object.create(R&&R.prototype,{constructor:{value:w,writable:!0,configurable:!0}}),R&&p(w,R)})(y,n);var a,u,f=c(y);function y(w){var R;return function(E,M){if(!(E instanceof M))throw new TypeError("Cannot call a class as a function")}(this,y),(R=f.call(this,{objectMode:w.objectMode})).lines="",R.rowCount=0,R.parsedRowCount=0,R.parsedLineCount=0,R.endEmitted=!1,R.headersEmitted=!1,R.parserOptions=w,R.parser=new r.Parser(w),R.headerTransformer=new t.HeaderTransformer(w),R.decoder=new i.StringDecoder(w.encoding),R.rowTransformerValidator=new t.RowTransformerValidator,R}return a=y,(u=[{key:"transform",value:function(w){return this.rowTransformerValidator.rowTransform=w,this}},{key:"validate",value:function(w){return this.rowTransformerValidator.rowValidator=w,this}},{key:"emit",value:function(w){var R;if(w==="end")return this.endEmitted||(this.endEmitted=!0,h(s(y.prototype),"emit",this).call(this,"end",this.rowCount)),!1;for(var E=arguments.length,M=new Array(E>1?E-1:0),O=1;O=M||E.hasHitRowLimit)return R();if(E.parsedLineCount+=1,E.shouldSkipLine)return _();var S=w[P];E.rowCount+=1,E.parsedRowCount+=1;var g=E.rowCount;return E.transformRow(S,function(j,k){if(j)return E.rowCount-=1,_(j);if(!k)return _(new Error("expected transform result"));if(k.isValid){if(k.row)return E.pushRow(k.row,_)}else E.emit("data-invalid",k.row,g,k.reason);return _()})})(0)}},{key:"transformRow",value:function(w,R){var E=this;try{this.headerTransformer.transform(w,function(M,O){return M?R(M):O?O.isValid?O.row?E.shouldEmitRows?E.rowTransformerValidator.transformAndValidate(O.row,R):E.skipRow(R):(E.rowCount-=1,E.parsedRowCount-=1,R(null,{row:null,isValid:!0})):E.shouldEmitRows?R(null,{isValid:!1,row:w}):E.skipRow(R):R(new Error("Expected result from header transform"))})}catch(M){R(M)}}},{key:"checkAndEmitHeaders",value:function(){!this.headersEmitted&&this.headerTransformer.headers&&(this.headersEmitted=!0,this.emit("headers",this.headerTransformer.headers))}},{key:"skipRow",value:function(w){return this.rowCount-=1,w(null,{row:null,isValid:!0})}},{key:"pushRow",value:function(w,R){try{this.parserOptions.objectMode?this.push(w):this.push(JSON.stringify(w)),R()}catch(E){R(E)}}},{key:"hasHitRowLimit",get:function(){return this.parserOptions.limitRows&&this.rowCount>=this.parserOptions.maxRows}},{key:"shouldEmitRows",get:function(){return this.parsedRowCount>this.parserOptions.skipRows}},{key:"shouldSkipLine",get:function(){return this.parsedLineCount<=this.parserOptions.skipLines}}])&&v(a.prototype,u),y}(e.Transform);T.CsvParserStream=o}).call(this,d("timers").setImmediate)},{"./parser":162,"./transforms":165,stream:506,string_decoder:520,timers:521}],151:[function(d,I,T){var b=function(h){return h&&h.__esModule?h:{default:h}};Object.defineProperty(T,"__esModule",{value:!0}),T.ParserOptions=void 0;var m=b(d("lodash.escaperegexp")),v=b(d("lodash.isnil"));T.ParserOptions=function h(p){var c;if(function(l,s){if(!(l instanceof s))throw new TypeError("Cannot call a class as a function")}(this,h),this.objectMode=!0,this.delimiter=",",this.ignoreEmpty=!1,this.quote='"',this.escape=null,this.escapeChar=this.quote,this.comment=null,this.supportsComments=!1,this.ltrim=!1,this.rtrim=!1,this.trim=!1,this.headers=null,this.renameHeaders=!1,this.strictColumnHandling=!1,this.discardUnmappedColumns=!1,this.carriageReturn="\r",this.encoding="utf8",this.limitRows=!1,this.maxRows=0,this.skipLines=0,this.skipRows=0,Object.assign(this,p||{}),this.delimiter.length>1)throw new Error("delimiter option must be one character long");this.escapedDelimiter=m.default(this.delimiter),this.escapeChar=(c=this.escape)!==null&&c!==void 0?c:this.quote,this.supportsComments=!v.default(this.comment),this.NEXT_TOKEN_REGEXP=new RegExp("([^\\s]|\\r\\n|\\n|\\r|".concat(this.escapedDelimiter,")")),this.maxRows>0&&(this.limitRows=!0)}},{"lodash.escaperegexp":426,"lodash.isnil":431}],152:[function(d,I,T){var b=Object.create?function(t,r,o,n){n===void 0&&(n=o),Object.defineProperty(t,n,{enumerable:!0,get:function(){return r[o]}})}:function(t,r,o,n){n===void 0&&(n=o),t[n]=r[o]},m=Object.create?function(t,r){Object.defineProperty(t,"default",{enumerable:!0,value:r})}:function(t,r){t.default=r},v=function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var o in t)o!=="default"&&Object.hasOwnProperty.call(t,o)&&b(r,t,o);return m(r,t),r},h=function(t,r){for(var o in t)o==="default"||r.hasOwnProperty(o)||b(r,t,o)};Object.defineProperty(T,"__esModule",{value:!0}),T.parseString=T.parseFile=T.parseStream=T.parse=void 0;var p=v(d("fs")),c=d("stream"),l=d("./ParserOptions"),s=d("./CsvParserStream");h(d("./types"),T);var i=d("./CsvParserStream");Object.defineProperty(T,"CsvParserStream",{enumerable:!0,get:function(){return i.CsvParserStream}});var e=d("./ParserOptions");Object.defineProperty(T,"ParserOptions",{enumerable:!0,get:function(){return e.ParserOptions}}),T.parse=function(t){return new s.CsvParserStream(new l.ParserOptions(t))},T.parseStream=function(t,r){return t.pipe(new s.CsvParserStream(new l.ParserOptions(r)))},T.parseFile=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return p.createReadStream(t).pipe(new s.CsvParserStream(new l.ParserOptions(r)))},T.parseString=function(t,r){var o=new c.Readable;return o.push(t),o.push(null),o.pipe(new s.CsvParserStream(new l.ParserOptions(r)))}},{"./CsvParserStream":150,"./ParserOptions":151,"./types":166,fs:215,stream:506}],153:[function(d,I,T){function b(l,s){for(var i=0;ithis.cursor}},{key:"nextNonSpaceToken",get:function(){var s=this.lineFromCursor,i=this.parserOptions.NEXT_TOKEN_REGEXP;if(s.search(i)===-1)return null;var e=i.exec(s);if(e==null)return null;var t=e[1],r=this.cursor+(e.index||0);return new m.Token({token:t,startCursor:r,endCursor:r+t.length-1})}},{key:"nextCharacterToken",get:function(){var s=this.cursor;return this.lineLength<=s?null:new m.Token({token:this.line[s],startCursor:s,endCursor:s})}},{key:"lineFromCursor",get:function(){return this.line.substr(this.cursor)}}])&&b(c.prototype,l),p}();T.Scanner=h},{"./Token":156}],156:[function(d,I,T){function b(v,h){for(var p=0;pthis.headersLength){if(!r.strictColumnHandling)throw new Error("Unexpected Error: column header mismatch expected: ".concat(this.headersLength," columns got: ").concat(t.length));return{row:t,isValid:!1,reason:"Column header mismatch expected: ".concat(this.headersLength," columns got: ").concat(t.length)}}return r.strictColumnHandling&&t.length1});throw new Error("Duplicate headers found ".concat(JSON.stringify(a)))}this.headers=t,this.receivedHeaders=!0,this.headersLength=((r=this.headers)===null||r===void 0?void 0:r.length)||0}}])&&b(i.prototype,e),s}();T.HeaderTransformer=l},{"lodash.groupby":427,"lodash.isfunction":430,"lodash.isundefined":432,"lodash.uniq":433}],164:[function(d,I,T){function b(c,l){for(var s=0;s>6],n=(32&r)==0;if((31&r)==31){var a=r;for(r=0;(128&a)==128;){if(a=e.readUInt8(t),e.isError(a))return a;r<<=7,r|=127&a}}else r&=31;return{cls:o,primitive:n,tag:r,tagStr:p.tag[r]}}function i(e,t,r){var o=e.readUInt8(r);if(e.isError(o))return o;if(!t&&o===128)return null;if(!(128&o))return o;var n=127&o;if(n>4)return e.error("length octect is too long");o=0;for(var a=0;a=31?M.error("Multi-octet tag encoding unsupported"):(R||(O|=32),O|=h.tagClassByName[E||"universal"]<<6)}(s,i,e,this.reporter);if(t.length<128){var o=m.alloc(2);return o[0]=r,o[1]=t.length,this._createEncoderBuffer([o,t])}for(var n=1,a=t.length;a>=256;a>>=8)n++;var u=m.alloc(2+n);u[0]=r,u[1]=128|n;for(var f=1+n,y=t.length;y>0;f--,y>>=8)u[f]=255&y;return this._createEncoderBuffer([u,t])},c.prototype._encodeStr=function(s,i){if(i==="bitstr")return this._createEncoderBuffer([0|s.unused,s.data]);if(i==="bmpstr"){for(var e=m.alloc(2*s.length),t=0;t=40)return this.reporter.error("Second objid identifier OOB");s.splice(0,2,40*s[0]+s[1])}for(var o=0,n=0;n=128;a>>=7)o++}for(var u=m.alloc(o),f=u.length-1,y=s.length-1;y>=0;y--){var w=s[y];for(u[f--]=127&w;(w>>=7)>0;)u[f--]=128|127&w}return this._createEncoderBuffer(u)},c.prototype._encodeTime=function(s,i){var e,t=new Date(s);return i==="gentime"?e=[l(t.getUTCFullYear()),l(t.getUTCMonth()+1),l(t.getUTCDate()),l(t.getUTCHours()),l(t.getUTCMinutes()),l(t.getUTCSeconds()),"Z"].join(""):i==="utctime"?e=[l(t.getUTCFullYear()%100),l(t.getUTCMonth()+1),l(t.getUTCDate()),l(t.getUTCHours()),l(t.getUTCMinutes()),l(t.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+i+" time is not supported yet"),this._encodeStr(e,"octstr")},c.prototype._encodeNull=function(){return this._createEncoderBuffer("")},c.prototype._encodeInt=function(s,i){if(typeof s=="string"){if(!i)return this.reporter.error("String int or enum given, but no values map");if(!i.hasOwnProperty(s))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(s));s=i[s]}if(typeof s!="number"&&!m.isBuffer(s)){var e=s.toArray();!s.sign&&128&e[0]&&e.unshift(0),s=m.from(e)}if(m.isBuffer(s)){var t=s.length;s.length===0&&t++;var r=m.alloc(t);return s.copy(r),s.length===0&&(r[0]=0),this._createEncoderBuffer(r)}if(s<128)return this._createEncoderBuffer(s);if(s<256)return this._createEncoderBuffer([0,s]);for(var o=1,n=s;n>=256;n>>=8)o++;for(var a=new Array(o),u=a.length-1;u>=0;u--)a[u]=255&s,s>>=8;return 128&a[0]&&a.unshift(0),this._createEncoderBuffer(m.from(a))},c.prototype._encodeBool=function(s){return this._createEncoderBuffer(s?255:0)},c.prototype._use=function(s,i){return typeof s=="function"&&(s=s(i)),s._getEncoder("der").tree},c.prototype._skipDefault=function(s,i,e){var t,r=this._baseState;if(r.default===null)return!1;var o=s.join();if(r.defaultBuffer===void 0&&(r.defaultBuffer=this._encodeValue(r.default,i,e).join()),o.length!==r.defaultBuffer.length)return!1;for(t=0;t=49&&C<=54?C-49+10:C>=17&&C<=22?C-17+10:15&C}return j}function i(_,S,g,j){for(var k=0,x=Math.min(_.length,g),C=S;C=49?D-49+10:D>=17?D-17+10:D}return k}c.isBN=function(_){return _ instanceof c||_!==null&&b(_)==="object"&&_.constructor.wordSize===c.wordSize&&Array.isArray(_.words)},c.max=function(_,S){return _.cmp(S)>0?_:S},c.min=function(_,S){return _.cmp(S)<0?_:S},c.prototype._init=function(_,S,g){if(typeof _=="number")return this._initNumber(_,S,g);if(b(_)==="object")return this._initArray(_,S,g);S==="hex"&&(S=16),h(S===(0|S)&&S>=2&&S<=36);var j=0;(_=_.toString().replace(/\s+/g,""))[0]==="-"&&j++,S===16?this._parseHex(_,j):this._parseBase(_,S,j),_[0]==="-"&&(this.negative=1),this.strip(),g==="le"&&this._initArray(this.toArray(),S,g)},c.prototype._initNumber=function(_,S,g){_<0&&(this.negative=1,_=-_),_<67108864?(this.words=[67108863&_],this.length=1):_<4503599627370496?(this.words=[67108863&_,_/67108864&67108863],this.length=2):(h(_<9007199254740992),this.words=[67108863&_,_/67108864&67108863,1],this.length=3),g==="le"&&this._initArray(this.toArray(),S,g)},c.prototype._initArray=function(_,S,g){if(h(typeof _.length=="number"),_.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(_.length/3),this.words=new Array(this.length);for(var j=0;j=0;j-=3)x=_[j]|_[j-1]<<8|_[j-2]<<16,this.words[k]|=x<>>26-C&67108863,(C+=24)>=26&&(C-=26,k++);else if(g==="le")for(j=0,k=0;j<_.length;j+=3)x=_[j]|_[j+1]<<8|_[j+2]<<16,this.words[k]|=x<>>26-C&67108863,(C+=24)>=26&&(C-=26,k++);return this.strip()},c.prototype._parseHex=function(_,S){this.length=Math.ceil((_.length-S)/6),this.words=new Array(this.length);for(var g=0;g=S;g-=6)k=s(_,g,g+6),this.words[j]|=k<>>26-x&4194303,(x+=24)>=26&&(x-=26,j++);g+6!==S&&(k=s(_,S,g+6),this.words[j]|=k<>>26-x&4194303),this.strip()},c.prototype._parseBase=function(_,S,g){this.words=[0],this.length=1;for(var j=0,k=1;k<=67108863;k*=S)j++;j--,k=k/S|0;for(var x=_.length-g,C=x%j,D=Math.min(x,x-C)+g,F=0,B=g;B1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},c.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},c.prototype.inspect=function(){return(this.red?""};var e=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],t=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],r=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function o(_,S,g){g.negative=S.negative^_.negative;var j=_.length+S.length|0;g.length=j,j=j-1|0;var k=0|_.words[0],x=0|S.words[0],C=k*x,D=67108863&C,F=C/67108864|0;g.words[0]=D;for(var B=1;B>>26,H=67108863&F,V=Math.min(B,S.length-1),q=Math.max(0,B-_.length+1);q<=V;q++){var $=B-q|0;U+=(C=(k=0|_.words[$])*(x=0|S.words[q])+H)/67108864|0,H=67108863&C}g.words[B]=0|H,F=0|U}return F!==0?g.words[B]=0|F:g.length--,g.strip()}c.prototype.toString=function(_,S){var g;if(S=0|S||1,(_=_||10)===16||_==="hex"){g="";for(var j=0,k=0,x=0;x>>24-j&16777215)!==0||x!==this.length-1?e[6-D.length]+D+g:D+g,(j+=2)>=26&&(j-=26,x--)}for(k!==0&&(g=k.toString(16)+g);g.length%S!=0;)g="0"+g;return this.negative!==0&&(g="-"+g),g}if(_===(0|_)&&_>=2&&_<=36){var F=t[_],B=r[_];g="";var U=this.clone();for(U.negative=0;!U.isZero();){var H=U.modn(B).toString(_);g=(U=U.idivn(B)).isZero()?H+g:e[F-H.length]+H+g}for(this.isZero()&&(g="0"+g);g.length%S!=0;)g="0"+g;return this.negative!==0&&(g="-"+g),g}h(!1,"Base should be between 2 and 36")},c.prototype.toNumber=function(){var _=this.words[0];return this.length===2?_+=67108864*this.words[1]:this.length===3&&this.words[2]===1?_+=4503599627370496+67108864*this.words[1]:this.length>2&&h(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-_:_},c.prototype.toJSON=function(){return this.toString(16)},c.prototype.toBuffer=function(_,S){return h(l!==void 0),this.toArrayLike(l,_,S)},c.prototype.toArray=function(_,S){return this.toArrayLike(Array,_,S)},c.prototype.toArrayLike=function(_,S,g){var j=this.byteLength(),k=g||Math.max(1,j);h(j<=k,"byte array longer than desired length"),h(k>0,"Requested array length <= 0"),this.strip();var x,C,D=S==="le",F=new _(k),B=this.clone();if(D){for(C=0;!B.isZero();C++)x=B.andln(255),B.iushrn(8),F[C]=x;for(;C=4096&&(g+=13,S>>>=13),S>=64&&(g+=7,S>>>=7),S>=8&&(g+=4,S>>>=4),S>=2&&(g+=2,S>>>=2),g+S},c.prototype._zeroBits=function(_){if(_===0)return 26;var S=_,g=0;return!(8191&S)&&(g+=13,S>>>=13),!(127&S)&&(g+=7,S>>>=7),!(15&S)&&(g+=4,S>>>=4),!(3&S)&&(g+=2,S>>>=2),!(1&S)&&g++,g},c.prototype.bitLength=function(){var _=this.words[this.length-1],S=this._countBits(_);return 26*(this.length-1)+S},c.prototype.zeroBits=function(){if(this.isZero())return 0;for(var _=0,S=0;S_.length?this.clone().ior(_):_.clone().ior(this)},c.prototype.uor=function(_){return this.length>_.length?this.clone().iuor(_):_.clone().iuor(this)},c.prototype.iuand=function(_){var S;S=this.length>_.length?_:this;for(var g=0;g_.length?this.clone().iand(_):_.clone().iand(this)},c.prototype.uand=function(_){return this.length>_.length?this.clone().iuand(_):_.clone().iuand(this)},c.prototype.iuxor=function(_){var S,g;this.length>_.length?(S=this,g=_):(S=_,g=this);for(var j=0;j_.length?this.clone().ixor(_):_.clone().ixor(this)},c.prototype.uxor=function(_){return this.length>_.length?this.clone().iuxor(_):_.clone().iuxor(this)},c.prototype.inotn=function(_){h(typeof _=="number"&&_>=0);var S=0|Math.ceil(_/26),g=_%26;this._expand(S),g>0&&S--;for(var j=0;j0&&(this.words[j]=~this.words[j]&67108863>>26-g),this.strip()},c.prototype.notn=function(_){return this.clone().inotn(_)},c.prototype.setn=function(_,S){h(typeof _=="number"&&_>=0);var g=_/26|0,j=_%26;return this._expand(g+1),this.words[g]=S?this.words[g]|1<_.length?(g=this,j=_):(g=_,j=this);for(var k=0,x=0;x>>26;for(;k!==0&&x>>26;if(this.length=g.length,k!==0)this.words[this.length]=k,this.length++;else if(g!==this)for(;x_.length?this.clone().iadd(_):_.clone().iadd(this)},c.prototype.isub=function(_){if(_.negative!==0){_.negative=0;var S=this.iadd(_);return _.negative=1,S._normSign()}if(this.negative!==0)return this.negative=0,this.iadd(_),this.negative=1,this._normSign();var g,j,k=this.cmp(_);if(k===0)return this.negative=0,this.length=1,this.words[0]=0,this;k>0?(g=this,j=_):(g=_,j=this);for(var x=0,C=0;C>26,this.words[C]=67108863&S;for(;x!==0&&C>26,this.words[C]=67108863&S;if(x===0&&C>>13,q=0|C[1],$=8191&q,L=q>>>13,A=0|C[2],N=8191&A,z=A>>>13,W=0|C[3],X=8191&W,K=W>>>13,ie=0|C[4],Q=8191&ie,ue=ie>>>13,de=0|C[5],ce=8191&de,Ee=de>>>13,_e=0|C[6],ve=8191&_e,ke=_e>>>13,Re=0|C[7],fe=8191&Re,Z=Re>>>13,ee=0|C[8],J=8191&ee,oe=ee>>>13,ne=0|C[9],ae=8191&ne,re=ne>>>13,he=0|D[0],le=8191&he,pe=he>>>13,Se=0|D[1],ge=8191&Se,De=Se>>>13,Ae=0|D[2],Be=8191&Ae,Ze=Ae>>>13,rt=0|D[3],Ie=8191&rt,ze=rt>>>13,me=0|D[4],Fe=8191&me,Ge=me>>>13,Ye=0|D[5],He=8191&Ye,tt=Ye>>>13,et=0|D[6],Ve=8191&et,ot=et>>>13,G=0|D[7],te=8191&G,be=G>>>13,je=0|D[8],Te=8191&je,Pe=je>>>13,Le=0|D[9],Ce=8191&Le,Ke=Le>>>13;g.negative=_.negative^S.negative,g.length=19;var qe=(B+(j=Math.imul(H,le))|0)+((8191&(k=(k=Math.imul(H,pe))+Math.imul(V,le)|0))<<13)|0;B=((x=Math.imul(V,pe))+(k>>>13)|0)+(qe>>>26)|0,qe&=67108863,j=Math.imul($,le),k=(k=Math.imul($,pe))+Math.imul(L,le)|0,x=Math.imul(L,pe);var Ue=(B+(j=j+Math.imul(H,ge)|0)|0)+((8191&(k=(k=k+Math.imul(H,De)|0)+Math.imul(V,ge)|0))<<13)|0;B=((x=x+Math.imul(V,De)|0)+(k>>>13)|0)+(Ue>>>26)|0,Ue&=67108863,j=Math.imul(N,le),k=(k=Math.imul(N,pe))+Math.imul(z,le)|0,x=Math.imul(z,pe),j=j+Math.imul($,ge)|0,k=(k=k+Math.imul($,De)|0)+Math.imul(L,ge)|0,x=x+Math.imul(L,De)|0;var ft=(B+(j=j+Math.imul(H,Be)|0)|0)+((8191&(k=(k=k+Math.imul(H,Ze)|0)+Math.imul(V,Be)|0))<<13)|0;B=((x=x+Math.imul(V,Ze)|0)+(k>>>13)|0)+(ft>>>26)|0,ft&=67108863,j=Math.imul(X,le),k=(k=Math.imul(X,pe))+Math.imul(K,le)|0,x=Math.imul(K,pe),j=j+Math.imul(N,ge)|0,k=(k=k+Math.imul(N,De)|0)+Math.imul(z,ge)|0,x=x+Math.imul(z,De)|0,j=j+Math.imul($,Be)|0,k=(k=k+Math.imul($,Ze)|0)+Math.imul(L,Be)|0,x=x+Math.imul(L,Ze)|0;var lt=(B+(j=j+Math.imul(H,Ie)|0)|0)+((8191&(k=(k=k+Math.imul(H,ze)|0)+Math.imul(V,Ie)|0))<<13)|0;B=((x=x+Math.imul(V,ze)|0)+(k>>>13)|0)+(lt>>>26)|0,lt&=67108863,j=Math.imul(Q,le),k=(k=Math.imul(Q,pe))+Math.imul(ue,le)|0,x=Math.imul(ue,pe),j=j+Math.imul(X,ge)|0,k=(k=k+Math.imul(X,De)|0)+Math.imul(K,ge)|0,x=x+Math.imul(K,De)|0,j=j+Math.imul(N,Be)|0,k=(k=k+Math.imul(N,Ze)|0)+Math.imul(z,Be)|0,x=x+Math.imul(z,Ze)|0,j=j+Math.imul($,Ie)|0,k=(k=k+Math.imul($,ze)|0)+Math.imul(L,Ie)|0,x=x+Math.imul(L,ze)|0;var at=(B+(j=j+Math.imul(H,Fe)|0)|0)+((8191&(k=(k=k+Math.imul(H,Ge)|0)+Math.imul(V,Fe)|0))<<13)|0;B=((x=x+Math.imul(V,Ge)|0)+(k>>>13)|0)+(at>>>26)|0,at&=67108863,j=Math.imul(ce,le),k=(k=Math.imul(ce,pe))+Math.imul(Ee,le)|0,x=Math.imul(Ee,pe),j=j+Math.imul(Q,ge)|0,k=(k=k+Math.imul(Q,De)|0)+Math.imul(ue,ge)|0,x=x+Math.imul(ue,De)|0,j=j+Math.imul(X,Be)|0,k=(k=k+Math.imul(X,Ze)|0)+Math.imul(K,Be)|0,x=x+Math.imul(K,Ze)|0,j=j+Math.imul(N,Ie)|0,k=(k=k+Math.imul(N,ze)|0)+Math.imul(z,Ie)|0,x=x+Math.imul(z,ze)|0,j=j+Math.imul($,Fe)|0,k=(k=k+Math.imul($,Ge)|0)+Math.imul(L,Fe)|0,x=x+Math.imul(L,Ge)|0;var dt=(B+(j=j+Math.imul(H,He)|0)|0)+((8191&(k=(k=k+Math.imul(H,tt)|0)+Math.imul(V,He)|0))<<13)|0;B=((x=x+Math.imul(V,tt)|0)+(k>>>13)|0)+(dt>>>26)|0,dt&=67108863,j=Math.imul(ve,le),k=(k=Math.imul(ve,pe))+Math.imul(ke,le)|0,x=Math.imul(ke,pe),j=j+Math.imul(ce,ge)|0,k=(k=k+Math.imul(ce,De)|0)+Math.imul(Ee,ge)|0,x=x+Math.imul(Ee,De)|0,j=j+Math.imul(Q,Be)|0,k=(k=k+Math.imul(Q,Ze)|0)+Math.imul(ue,Be)|0,x=x+Math.imul(ue,Ze)|0,j=j+Math.imul(X,Ie)|0,k=(k=k+Math.imul(X,ze)|0)+Math.imul(K,Ie)|0,x=x+Math.imul(K,ze)|0,j=j+Math.imul(N,Fe)|0,k=(k=k+Math.imul(N,Ge)|0)+Math.imul(z,Fe)|0,x=x+Math.imul(z,Ge)|0,j=j+Math.imul($,He)|0,k=(k=k+Math.imul($,tt)|0)+Math.imul(L,He)|0,x=x+Math.imul(L,tt)|0;var pt=(B+(j=j+Math.imul(H,Ve)|0)|0)+((8191&(k=(k=k+Math.imul(H,ot)|0)+Math.imul(V,Ve)|0))<<13)|0;B=((x=x+Math.imul(V,ot)|0)+(k>>>13)|0)+(pt>>>26)|0,pt&=67108863,j=Math.imul(fe,le),k=(k=Math.imul(fe,pe))+Math.imul(Z,le)|0,x=Math.imul(Z,pe),j=j+Math.imul(ve,ge)|0,k=(k=k+Math.imul(ve,De)|0)+Math.imul(ke,ge)|0,x=x+Math.imul(ke,De)|0,j=j+Math.imul(ce,Be)|0,k=(k=k+Math.imul(ce,Ze)|0)+Math.imul(Ee,Be)|0,x=x+Math.imul(Ee,Ze)|0,j=j+Math.imul(Q,Ie)|0,k=(k=k+Math.imul(Q,ze)|0)+Math.imul(ue,Ie)|0,x=x+Math.imul(ue,ze)|0,j=j+Math.imul(X,Fe)|0,k=(k=k+Math.imul(X,Ge)|0)+Math.imul(K,Fe)|0,x=x+Math.imul(K,Ge)|0,j=j+Math.imul(N,He)|0,k=(k=k+Math.imul(N,tt)|0)+Math.imul(z,He)|0,x=x+Math.imul(z,tt)|0,j=j+Math.imul($,Ve)|0,k=(k=k+Math.imul($,ot)|0)+Math.imul(L,Ve)|0,x=x+Math.imul(L,ot)|0;var yt=(B+(j=j+Math.imul(H,te)|0)|0)+((8191&(k=(k=k+Math.imul(H,be)|0)+Math.imul(V,te)|0))<<13)|0;B=((x=x+Math.imul(V,be)|0)+(k>>>13)|0)+(yt>>>26)|0,yt&=67108863,j=Math.imul(J,le),k=(k=Math.imul(J,pe))+Math.imul(oe,le)|0,x=Math.imul(oe,pe),j=j+Math.imul(fe,ge)|0,k=(k=k+Math.imul(fe,De)|0)+Math.imul(Z,ge)|0,x=x+Math.imul(Z,De)|0,j=j+Math.imul(ve,Be)|0,k=(k=k+Math.imul(ve,Ze)|0)+Math.imul(ke,Be)|0,x=x+Math.imul(ke,Ze)|0,j=j+Math.imul(ce,Ie)|0,k=(k=k+Math.imul(ce,ze)|0)+Math.imul(Ee,Ie)|0,x=x+Math.imul(Ee,ze)|0,j=j+Math.imul(Q,Fe)|0,k=(k=k+Math.imul(Q,Ge)|0)+Math.imul(ue,Fe)|0,x=x+Math.imul(ue,Ge)|0,j=j+Math.imul(X,He)|0,k=(k=k+Math.imul(X,tt)|0)+Math.imul(K,He)|0,x=x+Math.imul(K,tt)|0,j=j+Math.imul(N,Ve)|0,k=(k=k+Math.imul(N,ot)|0)+Math.imul(z,Ve)|0,x=x+Math.imul(z,ot)|0,j=j+Math.imul($,te)|0,k=(k=k+Math.imul($,be)|0)+Math.imul(L,te)|0,x=x+Math.imul(L,be)|0;var Y=(B+(j=j+Math.imul(H,Te)|0)|0)+((8191&(k=(k=k+Math.imul(H,Pe)|0)+Math.imul(V,Te)|0))<<13)|0;B=((x=x+Math.imul(V,Pe)|0)+(k>>>13)|0)+(Y>>>26)|0,Y&=67108863,j=Math.imul(ae,le),k=(k=Math.imul(ae,pe))+Math.imul(re,le)|0,x=Math.imul(re,pe),j=j+Math.imul(J,ge)|0,k=(k=k+Math.imul(J,De)|0)+Math.imul(oe,ge)|0,x=x+Math.imul(oe,De)|0,j=j+Math.imul(fe,Be)|0,k=(k=k+Math.imul(fe,Ze)|0)+Math.imul(Z,Be)|0,x=x+Math.imul(Z,Ze)|0,j=j+Math.imul(ve,Ie)|0,k=(k=k+Math.imul(ve,ze)|0)+Math.imul(ke,Ie)|0,x=x+Math.imul(ke,ze)|0,j=j+Math.imul(ce,Fe)|0,k=(k=k+Math.imul(ce,Ge)|0)+Math.imul(Ee,Fe)|0,x=x+Math.imul(Ee,Ge)|0,j=j+Math.imul(Q,He)|0,k=(k=k+Math.imul(Q,tt)|0)+Math.imul(ue,He)|0,x=x+Math.imul(ue,tt)|0,j=j+Math.imul(X,Ve)|0,k=(k=k+Math.imul(X,ot)|0)+Math.imul(K,Ve)|0,x=x+Math.imul(K,ot)|0,j=j+Math.imul(N,te)|0,k=(k=k+Math.imul(N,be)|0)+Math.imul(z,te)|0,x=x+Math.imul(z,be)|0,j=j+Math.imul($,Te)|0,k=(k=k+Math.imul($,Pe)|0)+Math.imul(L,Te)|0,x=x+Math.imul(L,Pe)|0;var se=(B+(j=j+Math.imul(H,Ce)|0)|0)+((8191&(k=(k=k+Math.imul(H,Ke)|0)+Math.imul(V,Ce)|0))<<13)|0;B=((x=x+Math.imul(V,Ke)|0)+(k>>>13)|0)+(se>>>26)|0,se&=67108863,j=Math.imul(ae,ge),k=(k=Math.imul(ae,De))+Math.imul(re,ge)|0,x=Math.imul(re,De),j=j+Math.imul(J,Be)|0,k=(k=k+Math.imul(J,Ze)|0)+Math.imul(oe,Be)|0,x=x+Math.imul(oe,Ze)|0,j=j+Math.imul(fe,Ie)|0,k=(k=k+Math.imul(fe,ze)|0)+Math.imul(Z,Ie)|0,x=x+Math.imul(Z,ze)|0,j=j+Math.imul(ve,Fe)|0,k=(k=k+Math.imul(ve,Ge)|0)+Math.imul(ke,Fe)|0,x=x+Math.imul(ke,Ge)|0,j=j+Math.imul(ce,He)|0,k=(k=k+Math.imul(ce,tt)|0)+Math.imul(Ee,He)|0,x=x+Math.imul(Ee,tt)|0,j=j+Math.imul(Q,Ve)|0,k=(k=k+Math.imul(Q,ot)|0)+Math.imul(ue,Ve)|0,x=x+Math.imul(ue,ot)|0,j=j+Math.imul(X,te)|0,k=(k=k+Math.imul(X,be)|0)+Math.imul(K,te)|0,x=x+Math.imul(K,be)|0,j=j+Math.imul(N,Te)|0,k=(k=k+Math.imul(N,Pe)|0)+Math.imul(z,Te)|0,x=x+Math.imul(z,Pe)|0;var ye=(B+(j=j+Math.imul($,Ce)|0)|0)+((8191&(k=(k=k+Math.imul($,Ke)|0)+Math.imul(L,Ce)|0))<<13)|0;B=((x=x+Math.imul(L,Ke)|0)+(k>>>13)|0)+(ye>>>26)|0,ye&=67108863,j=Math.imul(ae,Be),k=(k=Math.imul(ae,Ze))+Math.imul(re,Be)|0,x=Math.imul(re,Ze),j=j+Math.imul(J,Ie)|0,k=(k=k+Math.imul(J,ze)|0)+Math.imul(oe,Ie)|0,x=x+Math.imul(oe,ze)|0,j=j+Math.imul(fe,Fe)|0,k=(k=k+Math.imul(fe,Ge)|0)+Math.imul(Z,Fe)|0,x=x+Math.imul(Z,Ge)|0,j=j+Math.imul(ve,He)|0,k=(k=k+Math.imul(ve,tt)|0)+Math.imul(ke,He)|0,x=x+Math.imul(ke,tt)|0,j=j+Math.imul(ce,Ve)|0,k=(k=k+Math.imul(ce,ot)|0)+Math.imul(Ee,Ve)|0,x=x+Math.imul(Ee,ot)|0,j=j+Math.imul(Q,te)|0,k=(k=k+Math.imul(Q,be)|0)+Math.imul(ue,te)|0,x=x+Math.imul(ue,be)|0,j=j+Math.imul(X,Te)|0,k=(k=k+Math.imul(X,Pe)|0)+Math.imul(K,Te)|0,x=x+Math.imul(K,Pe)|0;var we=(B+(j=j+Math.imul(N,Ce)|0)|0)+((8191&(k=(k=k+Math.imul(N,Ke)|0)+Math.imul(z,Ce)|0))<<13)|0;B=((x=x+Math.imul(z,Ke)|0)+(k>>>13)|0)+(we>>>26)|0,we&=67108863,j=Math.imul(ae,Ie),k=(k=Math.imul(ae,ze))+Math.imul(re,Ie)|0,x=Math.imul(re,ze),j=j+Math.imul(J,Fe)|0,k=(k=k+Math.imul(J,Ge)|0)+Math.imul(oe,Fe)|0,x=x+Math.imul(oe,Ge)|0,j=j+Math.imul(fe,He)|0,k=(k=k+Math.imul(fe,tt)|0)+Math.imul(Z,He)|0,x=x+Math.imul(Z,tt)|0,j=j+Math.imul(ve,Ve)|0,k=(k=k+Math.imul(ve,ot)|0)+Math.imul(ke,Ve)|0,x=x+Math.imul(ke,ot)|0,j=j+Math.imul(ce,te)|0,k=(k=k+Math.imul(ce,be)|0)+Math.imul(Ee,te)|0,x=x+Math.imul(Ee,be)|0,j=j+Math.imul(Q,Te)|0,k=(k=k+Math.imul(Q,Pe)|0)+Math.imul(ue,Te)|0,x=x+Math.imul(ue,Pe)|0;var Me=(B+(j=j+Math.imul(X,Ce)|0)|0)+((8191&(k=(k=k+Math.imul(X,Ke)|0)+Math.imul(K,Ce)|0))<<13)|0;B=((x=x+Math.imul(K,Ke)|0)+(k>>>13)|0)+(Me>>>26)|0,Me&=67108863,j=Math.imul(ae,Fe),k=(k=Math.imul(ae,Ge))+Math.imul(re,Fe)|0,x=Math.imul(re,Ge),j=j+Math.imul(J,He)|0,k=(k=k+Math.imul(J,tt)|0)+Math.imul(oe,He)|0,x=x+Math.imul(oe,tt)|0,j=j+Math.imul(fe,Ve)|0,k=(k=k+Math.imul(fe,ot)|0)+Math.imul(Z,Ve)|0,x=x+Math.imul(Z,ot)|0,j=j+Math.imul(ve,te)|0,k=(k=k+Math.imul(ve,be)|0)+Math.imul(ke,te)|0,x=x+Math.imul(ke,be)|0,j=j+Math.imul(ce,Te)|0,k=(k=k+Math.imul(ce,Pe)|0)+Math.imul(Ee,Te)|0,x=x+Math.imul(Ee,Pe)|0;var xe=(B+(j=j+Math.imul(Q,Ce)|0)|0)+((8191&(k=(k=k+Math.imul(Q,Ke)|0)+Math.imul(ue,Ce)|0))<<13)|0;B=((x=x+Math.imul(ue,Ke)|0)+(k>>>13)|0)+(xe>>>26)|0,xe&=67108863,j=Math.imul(ae,He),k=(k=Math.imul(ae,tt))+Math.imul(re,He)|0,x=Math.imul(re,tt),j=j+Math.imul(J,Ve)|0,k=(k=k+Math.imul(J,ot)|0)+Math.imul(oe,Ve)|0,x=x+Math.imul(oe,ot)|0,j=j+Math.imul(fe,te)|0,k=(k=k+Math.imul(fe,be)|0)+Math.imul(Z,te)|0,x=x+Math.imul(Z,be)|0,j=j+Math.imul(ve,Te)|0,k=(k=k+Math.imul(ve,Pe)|0)+Math.imul(ke,Te)|0,x=x+Math.imul(ke,Pe)|0;var Oe=(B+(j=j+Math.imul(ce,Ce)|0)|0)+((8191&(k=(k=k+Math.imul(ce,Ke)|0)+Math.imul(Ee,Ce)|0))<<13)|0;B=((x=x+Math.imul(Ee,Ke)|0)+(k>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,j=Math.imul(ae,Ve),k=(k=Math.imul(ae,ot))+Math.imul(re,Ve)|0,x=Math.imul(re,ot),j=j+Math.imul(J,te)|0,k=(k=k+Math.imul(J,be)|0)+Math.imul(oe,te)|0,x=x+Math.imul(oe,be)|0,j=j+Math.imul(fe,Te)|0,k=(k=k+Math.imul(fe,Pe)|0)+Math.imul(Z,Te)|0,x=x+Math.imul(Z,Pe)|0;var Xe=(B+(j=j+Math.imul(ve,Ce)|0)|0)+((8191&(k=(k=k+Math.imul(ve,Ke)|0)+Math.imul(ke,Ce)|0))<<13)|0;B=((x=x+Math.imul(ke,Ke)|0)+(k>>>13)|0)+(Xe>>>26)|0,Xe&=67108863,j=Math.imul(ae,te),k=(k=Math.imul(ae,be))+Math.imul(re,te)|0,x=Math.imul(re,be),j=j+Math.imul(J,Te)|0,k=(k=k+Math.imul(J,Pe)|0)+Math.imul(oe,Te)|0,x=x+Math.imul(oe,Pe)|0;var $e=(B+(j=j+Math.imul(fe,Ce)|0)|0)+((8191&(k=(k=k+Math.imul(fe,Ke)|0)+Math.imul(Z,Ce)|0))<<13)|0;B=((x=x+Math.imul(Z,Ke)|0)+(k>>>13)|0)+($e>>>26)|0,$e&=67108863,j=Math.imul(ae,Te),k=(k=Math.imul(ae,Pe))+Math.imul(re,Te)|0,x=Math.imul(re,Pe);var We=(B+(j=j+Math.imul(J,Ce)|0)|0)+((8191&(k=(k=k+Math.imul(J,Ke)|0)+Math.imul(oe,Ce)|0))<<13)|0;B=((x=x+Math.imul(oe,Ke)|0)+(k>>>13)|0)+(We>>>26)|0,We&=67108863;var Ne=(B+(j=Math.imul(ae,Ce))|0)+((8191&(k=(k=Math.imul(ae,Ke))+Math.imul(re,Ce)|0))<<13)|0;return B=((x=Math.imul(re,Ke))+(k>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,F[0]=qe,F[1]=Ue,F[2]=ft,F[3]=lt,F[4]=at,F[5]=dt,F[6]=pt,F[7]=yt,F[8]=Y,F[9]=se,F[10]=ye,F[11]=we,F[12]=Me,F[13]=xe,F[14]=Oe,F[15]=Xe,F[16]=$e,F[17]=We,F[18]=Ne,B!==0&&(F[19]=B,g.length++),g};function a(_,S,g){return new u().mulp(_,S,g)}function u(_,S){this.x=_,this.y=S}Math.imul||(n=o),c.prototype.mulTo=function(_,S){var g=this.length+_.length;return this.length===10&&_.length===10?n(this,_,S):g<63?o(this,_,S):g<1024?function(j,k,x){x.negative=k.negative^j.negative,x.length=j.length+k.length;for(var C=0,D=0,F=0;F>>26)|0)>>>26,B&=67108863}x.words[F]=U,C=B,B=D}return C!==0?x.words[F]=C:x.length--,x.strip()}(this,_,S):a(this,_,S)},u.prototype.makeRBT=function(_){for(var S=new Array(_),g=c.prototype._countBits(_)-1,j=0;j<_;j++)S[j]=this.revBin(j,g,_);return S},u.prototype.revBin=function(_,S,g){if(_===0||_===g-1)return _;for(var j=0,k=0;k>=1;return j},u.prototype.permute=function(_,S,g,j,k,x){for(var C=0;C>>=1)k++;return 1<>>=13,g[2*x+1]=8191&k,k>>>=13;for(x=2*S;x>=26,S+=j/67108864|0,S+=k>>>26,this.words[g]=67108863&k}return S!==0&&(this.words[g]=S,this.length++),this},c.prototype.muln=function(_){return this.clone().imuln(_)},c.prototype.sqr=function(){return this.mul(this)},c.prototype.isqr=function(){return this.imul(this.clone())},c.prototype.pow=function(_){var S=function(x){for(var C=new Array(x.bitLength()),D=0;D>>B}return C}(_);if(S.length===0)return new c(1);for(var g=this,j=0;j=0);var S,g=_%26,j=(_-g)/26,k=67108863>>>26-g<<26-g;if(g!==0){var x=0;for(S=0;S>>26-g}x&&(this.words[S]=x,this.length++)}if(j!==0){for(S=this.length-1;S>=0;S--)this.words[S+j]=this.words[S];for(S=0;S=0),j=S?(S-S%26)/26:0;var k=_%26,x=Math.min((_-k)/26,this.length),C=67108863^67108863>>>k<x)for(this.length-=x,F=0;F=0&&(B!==0||F>=j);F--){var U=0|this.words[F];this.words[F]=B<<26-k|U>>>k,B=U&C}return D&&B!==0&&(D.words[D.length++]=B),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},c.prototype.ishrn=function(_,S,g){return h(this.negative===0),this.iushrn(_,S,g)},c.prototype.shln=function(_){return this.clone().ishln(_)},c.prototype.ushln=function(_){return this.clone().iushln(_)},c.prototype.shrn=function(_){return this.clone().ishrn(_)},c.prototype.ushrn=function(_){return this.clone().iushrn(_)},c.prototype.testn=function(_){h(typeof _=="number"&&_>=0);var S=_%26,g=(_-S)/26,j=1<=0);var S=_%26,g=(_-S)/26;if(h(this.negative===0,"imaskn works only with positive numbers"),this.length<=g)return this;if(S!==0&&g++,this.length=Math.min(g,this.length),S!==0){var j=67108863^67108863>>>S<=67108864;S++)this.words[S]-=67108864,S===this.length-1?this.words[S+1]=1:this.words[S+1]++;return this.length=Math.max(this.length,S+1),this},c.prototype.isubn=function(_){if(h(typeof _=="number"),h(_<67108864),_<0)return this.iaddn(-_);if(this.negative!==0)return this.negative=0,this.iaddn(_),this.negative=1,this;if(this.words[0]-=_,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var S=0;S>26)-(D/67108864|0),this.words[j+g]=67108863&k}for(;j>26,this.words[j+g]=67108863&k;if(C===0)return this.strip();for(h(C===-1),C=0,j=0;j>26,this.words[j]=67108863&k;return this.negative=1,this.strip()},c.prototype._wordDiv=function(_,S){var g=(this.length,_.length),j=this.clone(),k=_,x=0|k.words[k.length-1];(g=26-this._countBits(x))!==0&&(k=k.ushln(g),j.iushln(g),x=0|k.words[k.length-1]);var C,D=j.length-k.length;if(S!=="mod"){(C=new c(null)).length=D+1,C.words=new Array(C.length);for(var F=0;F=0;U--){var H=67108864*(0|j.words[k.length+U])+(0|j.words[k.length+U-1]);for(H=Math.min(H/x|0,67108863),j._ishlnsubmul(k,H,U);j.negative!==0;)H--,j.negative=0,j._ishlnsubmul(k,1,U),j.isZero()||(j.negative^=1);C&&(C.words[U]=H)}return C&&C.strip(),j.strip(),S!=="div"&&g!==0&&j.iushrn(g),{div:C||null,mod:j}},c.prototype.divmod=function(_,S,g){return h(!_.isZero()),this.isZero()?{div:new c(0),mod:new c(0)}:this.negative!==0&&_.negative===0?(x=this.neg().divmod(_,S),S!=="mod"&&(j=x.div.neg()),S!=="div"&&(k=x.mod.neg(),g&&k.negative!==0&&k.iadd(_)),{div:j,mod:k}):this.negative===0&&_.negative!==0?(x=this.divmod(_.neg(),S),S!=="mod"&&(j=x.div.neg()),{div:j,mod:x.mod}):this.negative&_.negative?(x=this.neg().divmod(_.neg(),S),S!=="div"&&(k=x.mod.neg(),g&&k.negative!==0&&k.isub(_)),{div:x.div,mod:k}):_.length>this.length||this.cmp(_)<0?{div:new c(0),mod:this}:_.length===1?S==="div"?{div:this.divn(_.words[0]),mod:null}:S==="mod"?{div:null,mod:new c(this.modn(_.words[0]))}:{div:this.divn(_.words[0]),mod:new c(this.modn(_.words[0]))}:this._wordDiv(_,S);var j,k,x},c.prototype.div=function(_){return this.divmod(_,"div",!1).div},c.prototype.mod=function(_){return this.divmod(_,"mod",!1).mod},c.prototype.umod=function(_){return this.divmod(_,"mod",!0).mod},c.prototype.divRound=function(_){var S=this.divmod(_);if(S.mod.isZero())return S.div;var g=S.div.negative!==0?S.mod.isub(_):S.mod,j=_.ushrn(1),k=_.andln(1),x=g.cmp(j);return x<0||k===1&&x===0?S.div:S.div.negative!==0?S.div.isubn(1):S.div.iaddn(1)},c.prototype.modn=function(_){h(_<=67108863);for(var S=(1<<26)%_,g=0,j=this.length-1;j>=0;j--)g=(S*g+(0|this.words[j]))%_;return g},c.prototype.idivn=function(_){h(_<=67108863);for(var S=0,g=this.length-1;g>=0;g--){var j=(0|this.words[g])+67108864*S;this.words[g]=j/_|0,S=j%_}return this.strip()},c.prototype.divn=function(_){return this.clone().idivn(_)},c.prototype.egcd=function(_){h(_.negative===0),h(!_.isZero());var S=this,g=_.clone();S=S.negative!==0?S.umod(_):S.clone();for(var j=new c(1),k=new c(0),x=new c(0),C=new c(1),D=0;S.isEven()&&g.isEven();)S.iushrn(1),g.iushrn(1),++D;for(var F=g.clone(),B=S.clone();!S.isZero();){for(var U=0,H=1;!(S.words[0]&H)&&U<26;++U,H<<=1);if(U>0)for(S.iushrn(U);U-- >0;)(j.isOdd()||k.isOdd())&&(j.iadd(F),k.isub(B)),j.iushrn(1),k.iushrn(1);for(var V=0,q=1;!(g.words[0]&q)&&V<26;++V,q<<=1);if(V>0)for(g.iushrn(V);V-- >0;)(x.isOdd()||C.isOdd())&&(x.iadd(F),C.isub(B)),x.iushrn(1),C.iushrn(1);S.cmp(g)>=0?(S.isub(g),j.isub(x),k.isub(C)):(g.isub(S),x.isub(j),C.isub(k))}return{a:x,b:C,gcd:g.iushln(D)}},c.prototype._invmp=function(_){h(_.negative===0),h(!_.isZero());var S=this,g=_.clone();S=S.negative!==0?S.umod(_):S.clone();for(var j,k=new c(1),x=new c(0),C=g.clone();S.cmpn(1)>0&&g.cmpn(1)>0;){for(var D=0,F=1;!(S.words[0]&F)&&D<26;++D,F<<=1);if(D>0)for(S.iushrn(D);D-- >0;)k.isOdd()&&k.iadd(C),k.iushrn(1);for(var B=0,U=1;!(g.words[0]&U)&&B<26;++B,U<<=1);if(B>0)for(g.iushrn(B);B-- >0;)x.isOdd()&&x.iadd(C),x.iushrn(1);S.cmp(g)>=0?(S.isub(g),k.isub(x)):(g.isub(S),x.isub(k))}return(j=S.cmpn(1)===0?k:x).cmpn(0)<0&&j.iadd(_),j},c.prototype.gcd=function(_){if(this.isZero())return _.abs();if(_.isZero())return this.abs();var S=this.clone(),g=_.clone();S.negative=0,g.negative=0;for(var j=0;S.isEven()&&g.isEven();j++)S.iushrn(1),g.iushrn(1);for(;;){for(;S.isEven();)S.iushrn(1);for(;g.isEven();)g.iushrn(1);var k=S.cmp(g);if(k<0){var x=S;S=g,g=x}else if(k===0||g.cmpn(1)===0)break;S.isub(g)}return g.iushln(j)},c.prototype.invm=function(_){return this.egcd(_).a.umod(_)},c.prototype.isEven=function(){return(1&this.words[0])==0},c.prototype.isOdd=function(){return(1&this.words[0])==1},c.prototype.andln=function(_){return this.words[0]&_},c.prototype.bincn=function(_){h(typeof _=="number");var S=_%26,g=(_-S)/26,j=1<>>26,C&=67108863,this.words[x]=C}return k!==0&&(this.words[x]=k,this.length++),this},c.prototype.isZero=function(){return this.length===1&&this.words[0]===0},c.prototype.cmpn=function(_){var S,g=_<0;if(this.negative!==0&&!g)return-1;if(this.negative===0&&g)return 1;if(this.strip(),this.length>1)S=1;else{g&&(_=-_),h(_<=67108863,"Number is too big");var j=0|this.words[0];S=j===_?0:j<_?-1:1}return this.negative!==0?0|-S:S},c.prototype.cmp=function(_){if(this.negative!==0&&_.negative===0)return-1;if(this.negative===0&&_.negative!==0)return 1;var S=this.ucmp(_);return this.negative!==0?0|-S:S},c.prototype.ucmp=function(_){if(this.length>_.length)return 1;if(this.length<_.length)return-1;for(var S=0,g=this.length-1;g>=0;g--){var j=0|this.words[g],k=0|_.words[g];if(j!==k){jk&&(S=1);break}}return S},c.prototype.gtn=function(_){return this.cmpn(_)===1},c.prototype.gt=function(_){return this.cmp(_)===1},c.prototype.gten=function(_){return this.cmpn(_)>=0},c.prototype.gte=function(_){return this.cmp(_)>=0},c.prototype.ltn=function(_){return this.cmpn(_)===-1},c.prototype.lt=function(_){return this.cmp(_)===-1},c.prototype.lten=function(_){return this.cmpn(_)<=0},c.prototype.lte=function(_){return this.cmp(_)<=0},c.prototype.eqn=function(_){return this.cmpn(_)===0},c.prototype.eq=function(_){return this.cmp(_)===0},c.red=function(_){return new O(_)},c.prototype.toRed=function(_){return h(!this.red,"Already a number in reduction context"),h(this.negative===0,"red works only with positives"),_.convertTo(this)._forceRed(_)},c.prototype.fromRed=function(){return h(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},c.prototype._forceRed=function(_){return this.red=_,this},c.prototype.forceRed=function(_){return h(!this.red,"Already a number in reduction context"),this._forceRed(_)},c.prototype.redAdd=function(_){return h(this.red,"redAdd works only with red numbers"),this.red.add(this,_)},c.prototype.redIAdd=function(_){return h(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,_)},c.prototype.redSub=function(_){return h(this.red,"redSub works only with red numbers"),this.red.sub(this,_)},c.prototype.redISub=function(_){return h(this.red,"redISub works only with red numbers"),this.red.isub(this,_)},c.prototype.redShl=function(_){return h(this.red,"redShl works only with red numbers"),this.red.shl(this,_)},c.prototype.redMul=function(_){return h(this.red,"redMul works only with red numbers"),this.red._verify2(this,_),this.red.mul(this,_)},c.prototype.redIMul=function(_){return h(this.red,"redMul works only with red numbers"),this.red._verify2(this,_),this.red.imul(this,_)},c.prototype.redSqr=function(){return h(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},c.prototype.redISqr=function(){return h(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},c.prototype.redSqrt=function(){return h(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},c.prototype.redInvm=function(){return h(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},c.prototype.redNeg=function(){return h(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},c.prototype.redPow=function(_){return h(this.red&&!_.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,_)};var f={k256:null,p224:null,p192:null,p25519:null};function y(_,S){this.name=_,this.p=new c(S,16),this.n=this.p.bitLength(),this.k=new c(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function w(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function R(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function E(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function O(_){if(typeof _=="string"){var S=c._prime(_);this.m=S.p,this.prime=S}else h(_.gtn(1),"modulus must be greater than 1"),this.m=_,this.prime=null}function P(_){O.call(this,_),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new c(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var _=new c(null);return _.words=new Array(Math.ceil(this.n/13)),_},y.prototype.ireduce=function(_){var S,g=_;do this.split(g,this.tmp),S=(g=(g=this.imulK(g)).iadd(this.tmp)).bitLength();while(S>this.n);var j=S0?g.isub(this.p):g.strip!==void 0?g.strip():g._strip(),g},y.prototype.split=function(_,S){_.iushrn(this.n,0,S)},y.prototype.imulK=function(_){return _.imul(this.k)},p(w,y),w.prototype.split=function(_,S){for(var g=Math.min(_.length,9),j=0;j>>22,k=x}k>>>=22,_.words[j-10]=k,k===0&&_.length>10?_.length-=10:_.length-=9},w.prototype.imulK=function(_){_.words[_.length]=0,_.words[_.length+1]=0,_.length+=2;for(var S=0,g=0;g<_.length;g++){var j=0|_.words[g];S+=977*j,_.words[g]=67108863&S,S=64*j+(S/67108864|0)}return _.words[_.length-1]===0&&(_.length--,_.words[_.length-1]===0&&_.length--),_},p(R,y),p(E,y),p(M,y),M.prototype.imulK=function(_){for(var S=0,g=0;g<_.length;g++){var j=19*(0|_.words[g])+S,k=67108863&j;j>>>=26,_.words[g]=k,S=j}return S!==0&&(_.words[_.length++]=S),_},c._prime=function(_){if(f[_])return f[_];var S;if(_==="k256")S=new w;else if(_==="p224")S=new R;else if(_==="p192")S=new E;else{if(_!=="p25519")throw new Error("Unknown prime "+_);S=new M}return f[_]=S,S},O.prototype._verify1=function(_){h(_.negative===0,"red works only with positives"),h(_.red,"red works only with red numbers")},O.prototype._verify2=function(_,S){h((_.negative|S.negative)==0,"red works only with positives"),h(_.red&&_.red===S.red,"red works only with red numbers")},O.prototype.imod=function(_){return this.prime?this.prime.ireduce(_)._forceRed(this):_.umod(this.m)._forceRed(this)},O.prototype.neg=function(_){return _.isZero()?_.clone():this.m.sub(_)._forceRed(this)},O.prototype.add=function(_,S){this._verify2(_,S);var g=_.add(S);return g.cmp(this.m)>=0&&g.isub(this.m),g._forceRed(this)},O.prototype.iadd=function(_,S){this._verify2(_,S);var g=_.iadd(S);return g.cmp(this.m)>=0&&g.isub(this.m),g},O.prototype.sub=function(_,S){this._verify2(_,S);var g=_.sub(S);return g.cmpn(0)<0&&g.iadd(this.m),g._forceRed(this)},O.prototype.isub=function(_,S){this._verify2(_,S);var g=_.isub(S);return g.cmpn(0)<0&&g.iadd(this.m),g},O.prototype.shl=function(_,S){return this._verify1(_),this.imod(_.ushln(S))},O.prototype.imul=function(_,S){return this._verify2(_,S),this.imod(_.imul(S))},O.prototype.mul=function(_,S){return this._verify2(_,S),this.imod(_.mul(S))},O.prototype.isqr=function(_){return this.imul(_,_.clone())},O.prototype.sqr=function(_){return this.mul(_,_)},O.prototype.sqrt=function(_){if(_.isZero())return _.clone();var S=this.m.andln(3);if(h(S%2==1),S===3){var g=this.m.add(new c(1)).iushrn(2);return this.pow(_,g)}for(var j=this.m.subn(1),k=0;!j.isZero()&&j.andln(1)===0;)k++,j.iushrn(1);h(!j.isZero());var x=new c(1).toRed(this),C=x.redNeg(),D=this.m.subn(1).iushrn(1),F=this.m.bitLength();for(F=new c(2*F*F).toRed(this);this.pow(F,D).cmp(C)!==0;)F.redIAdd(C);for(var B=this.pow(F,j),U=this.pow(_,j.addn(1).iushrn(1)),H=this.pow(_,j),V=k;H.cmp(x)!==0;){for(var q=H,$=0;q.cmp(x)!==0;$++)q=q.redSqr();h($=0;j--){for(var F=S.words[j],B=D-1;B>=0;B--){var U=F>>B&1;k!==g[0]&&(k=this.sqr(k)),U!==0||x!==0?(x<<=1,x|=U,(++C===4||j===0&&B===0)&&(k=this.mul(k,g[x]),C=0,x=0)):C=0}D=26}return k},O.prototype.convertTo=function(_){var S=_.umod(this.m);return S===_?S.clone():S},O.prototype.convertFrom=function(_){var S=_.clone();return S.red=null,S},c.mont=function(_){return new P(_)},p(P,O),P.prototype.convertTo=function(_){return this.imod(_.ushln(this.shift))},P.prototype.convertFrom=function(_){var S=this.imod(_.mul(this.rinv));return S.red=null,S},P.prototype.imul=function(_,S){if(_.isZero()||S.isZero())return _.words[0]=0,_.length=1,_;var g=_.imul(S),j=g.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),k=g.isub(j).iushrn(this.shift),x=k;return k.cmp(this.m)>=0?x=k.isub(this.m):k.cmpn(0)<0&&(x=k.iadd(this.m)),x._forceRed(this)},P.prototype.mul=function(_,S){if(_.isZero()||S.isZero())return new c(0)._forceRed(this);var g=_.mul(S),j=g.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),k=g.isub(j).iushrn(this.shift),x=k;return k.cmp(this.m)>=0?x=k.isub(this.m):k.cmpn(0)<0&&(x=k.iadd(this.m)),x._forceRed(this)},P.prototype.invm=function(_){return this.imod(_._invmp(this.m).mul(this.r2))._forceRed(this)}})(I===void 0||I)},{buffer:185}],182:[function(d,I,T){T.byteLength=function(i){var e=l(i),t=e[0],r=e[1];return 3*(t+r)/4-r},T.toByteArray=function(i){var e,t,r=l(i),o=r[0],n=r[1],a=new v(function(y,w,R){return 3*(w+R)/4-R}(0,o,n)),u=0,f=n>0?o-4:o;for(t=0;t>16&255,a[u++]=e>>8&255,a[u++]=255&e;return n===2&&(e=m[i.charCodeAt(t)]<<2|m[i.charCodeAt(t+1)]>>4,a[u++]=255&e),n===1&&(e=m[i.charCodeAt(t)]<<10|m[i.charCodeAt(t+1)]<<4|m[i.charCodeAt(t+2)]>>2,a[u++]=e>>8&255,a[u++]=255&e),a},T.fromByteArray=function(i){for(var e,t=i.length,r=t%3,o=[],n=0,a=t-r;na?a:n+16383));return r===1?(e=i[t-1],o.push(b[e>>2]+b[e<<4&63]+"==")):r===2&&(e=(i[t-2]<<8)+i[t-1],o.push(b[e>>10]+b[e>>4&63]+b[e<<2&63]+"=")),o.join("")};for(var b=[],m=[],v=typeof Uint8Array<"u"?Uint8Array:Array,h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",p=0,c=h.length;p0)throw new Error("Invalid string. Length must be a multiple of 4");var t=i.indexOf("=");return t===-1&&(t=e),[t,t===e?0:4-t%4]}function s(i,e,t){for(var r,o,n=[],a=e;a>18&63]+b[o>>12&63]+b[o>>6&63]+b[63&o]);return n.join("")}m["-".charCodeAt(0)]=62,m["_".charCodeAt(0)]=63},{}],183:[function(d,I,T){function b(m){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(v){return typeof v}:function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v})(m)}(function(m,v){function h(g,j){if(!g)throw new Error(j||"Assertion failed")}function p(g,j){g.super_=j;var k=function(){};k.prototype=j.prototype,g.prototype=new k,g.prototype.constructor=g}function c(g,j,k){if(c.isBN(g))return g;this.negative=0,this.words=null,this.length=0,this.red=null,g!==null&&(j!=="le"&&j!=="be"||(k=j,j=10),this._init(g||0,j||10,k||"be"))}var l;b(m)==="object"?m.exports=c:(void 0).BN=c,c.BN=c,c.wordSize=26;try{l=d("buffer").Buffer}catch{}function s(g,j,k){for(var x=0,C=Math.min(g.length,k),D=0,F=j;F=49&&U<=54?U-49+10:U>=17&&U<=22?U-17+10:U,D|=B}return h(!(240&D),"Invalid character in "+g),x}function i(g,j,k,x){for(var C=0,D=0,F=Math.min(g.length,k),B=j;B=49?U-49+10:U>=17?U-17+10:U,h(U>=0&&D0?g:j},c.min=function(g,j){return g.cmp(j)<0?g:j},c.prototype._init=function(g,j,k){if(typeof g=="number")return this._initNumber(g,j,k);if(b(g)==="object")return this._initArray(g,j,k);j==="hex"&&(j=16),h(j===(0|j)&&j>=2&&j<=36);var x=0;(g=g.toString().replace(/\s+/g,""))[0]==="-"&&x++,j===16?this._parseHex(g,x):this._parseBase(g,j,x),g[0]==="-"&&(this.negative=1),this._strip(),k==="le"&&this._initArray(this.toArray(),j,k)},c.prototype._initNumber=function(g,j,k){g<0&&(this.negative=1,g=-g),g<67108864?(this.words=[67108863&g],this.length=1):g<4503599627370496?(this.words=[67108863&g,g/67108864&67108863],this.length=2):(h(g<9007199254740992),this.words=[67108863&g,g/67108864&67108863,1],this.length=3),k==="le"&&this._initArray(this.toArray(),j,k)},c.prototype._initArray=function(g,j,k){if(h(typeof g.length=="number"),g.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(g.length/3),this.words=new Array(this.length);for(var x=0;x=0;x-=3)D=g[x]|g[x-1]<<8|g[x-2]<<16,this.words[C]|=D<>>26-F&67108863,(F+=24)>=26&&(F-=26,C++);else if(k==="le")for(x=0,C=0;x>>26-F&67108863,(F+=24)>=26&&(F-=26,C++);return this._strip()},c.prototype._parseHex=function(g,j){this.length=Math.ceil((g.length-j)/6),this.words=new Array(this.length);for(var k=0;k=j;k-=6)C=s(g,k,k+6),this.words[x]|=C<>>26-D&4194303,(D+=24)>=26&&(D-=26,x++);k+6!==j&&(C=s(g,j,k+6),this.words[x]|=C<>>26-D&4194303),this._strip()},c.prototype._parseBase=function(g,j,k){this.words=[0],this.length=1;for(var x=0,C=1;C<=67108863;C*=j)x++;x--,C=C/j|0;for(var D=g.length-k,F=D%x,B=Math.min(D,D-F)+k,U=0,H=k;H1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},c.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{c.prototype[Symbol.for("nodejs.util.inspect.custom")]=t}catch{c.prototype.inspect=t}else c.prototype.inspect=t;function t(){return(this.red?""}var r=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],o=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],n=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];c.prototype.toString=function(g,j){var k;if(j=0|j||1,(g=g||10)===16||g==="hex"){k="";for(var x=0,C=0,D=0;D>>24-x&16777215)!==0||D!==this.length-1?r[6-B.length]+B+k:B+k,(x+=2)>=26&&(x-=26,D--)}for(C!==0&&(k=C.toString(16)+k);k.length%j!=0;)k="0"+k;return this.negative!==0&&(k="-"+k),k}if(g===(0|g)&&g>=2&&g<=36){var U=o[g],H=n[g];k="";var V=this.clone();for(V.negative=0;!V.isZero();){var q=V.modrn(H).toString(g);k=(V=V.idivn(H)).isZero()?q+k:r[U-q.length]+q+k}for(this.isZero()&&(k="0"+k);k.length%j!=0;)k="0"+k;return this.negative!==0&&(k="-"+k),k}h(!1,"Base should be between 2 and 36")},c.prototype.toNumber=function(){var g=this.words[0];return this.length===2?g+=67108864*this.words[1]:this.length===3&&this.words[2]===1?g+=4503599627370496+67108864*this.words[1]:this.length>2&&h(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-g:g},c.prototype.toJSON=function(){return this.toString(16,2)},l&&(c.prototype.toBuffer=function(g,j){return this.toArrayLike(l,g,j)}),c.prototype.toArray=function(g,j){return this.toArrayLike(Array,g,j)};function a(g,j,k){k.negative=j.negative^g.negative;var x=g.length+j.length|0;k.length=x,x=x-1|0;var C=0|g.words[0],D=0|j.words[0],F=C*D,B=67108863&F,U=F/67108864|0;k.words[0]=B;for(var H=1;H>>26,q=67108863&U,$=Math.min(H,j.length-1),L=Math.max(0,H-g.length+1);L<=$;L++){var A=H-L|0;V+=(F=(C=0|g.words[A])*(D=0|j.words[L])+q)/67108864|0,q=67108863&F}k.words[H]=0|q,U=0|V}return U!==0?k.words[H]=0|U:k.length--,k._strip()}c.prototype.toArrayLike=function(g,j,k){this._strip();var x=this.byteLength(),C=k||Math.max(1,x);h(x<=C,"byte array longer than desired length"),h(C>0,"Requested array length <= 0");var D=function(F,B){return F.allocUnsafe?F.allocUnsafe(B):new F(B)}(g,C);return this["_toArrayLike"+(j==="le"?"LE":"BE")](D,x),D},c.prototype._toArrayLikeLE=function(g,j){for(var k=0,x=0,C=0,D=0;C>8&255),k>16&255),D===6?(k>24&255),x=0,D=0):(x=F>>>24,D+=2)}if(k=0&&(g[k--]=F>>8&255),k>=0&&(g[k--]=F>>16&255),D===6?(k>=0&&(g[k--]=F>>24&255),x=0,D=0):(x=F>>>24,D+=2)}if(k>=0)for(g[k--]=x;k>=0;)g[k--]=0},Math.clz32?c.prototype._countBits=function(g){return 32-Math.clz32(g)}:c.prototype._countBits=function(g){var j=g,k=0;return j>=4096&&(k+=13,j>>>=13),j>=64&&(k+=7,j>>>=7),j>=8&&(k+=4,j>>>=4),j>=2&&(k+=2,j>>>=2),k+j},c.prototype._zeroBits=function(g){if(g===0)return 26;var j=g,k=0;return!(8191&j)&&(k+=13,j>>>=13),!(127&j)&&(k+=7,j>>>=7),!(15&j)&&(k+=4,j>>>=4),!(3&j)&&(k+=2,j>>>=2),!(1&j)&&k++,k},c.prototype.bitLength=function(){var g=this.words[this.length-1],j=this._countBits(g);return 26*(this.length-1)+j},c.prototype.zeroBits=function(){if(this.isZero())return 0;for(var g=0,j=0;jg.length?this.clone().ior(g):g.clone().ior(this)},c.prototype.uor=function(g){return this.length>g.length?this.clone().iuor(g):g.clone().iuor(this)},c.prototype.iuand=function(g){var j;j=this.length>g.length?g:this;for(var k=0;kg.length?this.clone().iand(g):g.clone().iand(this)},c.prototype.uand=function(g){return this.length>g.length?this.clone().iuand(g):g.clone().iuand(this)},c.prototype.iuxor=function(g){var j,k;this.length>g.length?(j=this,k=g):(j=g,k=this);for(var x=0;xg.length?this.clone().ixor(g):g.clone().ixor(this)},c.prototype.uxor=function(g){return this.length>g.length?this.clone().iuxor(g):g.clone().iuxor(this)},c.prototype.inotn=function(g){h(typeof g=="number"&&g>=0);var j=0|Math.ceil(g/26),k=g%26;this._expand(j),k>0&&j--;for(var x=0;x0&&(this.words[x]=~this.words[x]&67108863>>26-k),this._strip()},c.prototype.notn=function(g){return this.clone().inotn(g)},c.prototype.setn=function(g,j){h(typeof g=="number"&&g>=0);var k=g/26|0,x=g%26;return this._expand(k+1),this.words[k]=j?this.words[k]|1<g.length?(k=this,x=g):(k=g,x=this);for(var C=0,D=0;D>>26;for(;C!==0&&D>>26;if(this.length=k.length,C!==0)this.words[this.length]=C,this.length++;else if(k!==this)for(;Dg.length?this.clone().iadd(g):g.clone().iadd(this)},c.prototype.isub=function(g){if(g.negative!==0){g.negative=0;var j=this.iadd(g);return g.negative=1,j._normSign()}if(this.negative!==0)return this.negative=0,this.iadd(g),this.negative=1,this._normSign();var k,x,C=this.cmp(g);if(C===0)return this.negative=0,this.length=1,this.words[0]=0,this;C>0?(k=this,x=g):(k=g,x=this);for(var D=0,F=0;F>26,this.words[F]=67108863&j;for(;D!==0&&F>26,this.words[F]=67108863&j;if(D===0&&F>>13,L=0|F[1],A=8191&L,N=L>>>13,z=0|F[2],W=8191&z,X=z>>>13,K=0|F[3],ie=8191&K,Q=K>>>13,ue=0|F[4],de=8191&ue,ce=ue>>>13,Ee=0|F[5],_e=8191&Ee,ve=Ee>>>13,ke=0|F[6],Re=8191&ke,fe=ke>>>13,Z=0|F[7],ee=8191&Z,J=Z>>>13,oe=0|F[8],ne=8191&oe,ae=oe>>>13,re=0|F[9],he=8191&re,le=re>>>13,pe=0|B[0],Se=8191&pe,ge=pe>>>13,De=0|B[1],Ae=8191&De,Be=De>>>13,Ze=0|B[2],rt=8191&Ze,Ie=Ze>>>13,ze=0|B[3],me=8191&ze,Fe=ze>>>13,Ge=0|B[4],Ye=8191&Ge,He=Ge>>>13,tt=0|B[5],et=8191&tt,Ve=tt>>>13,ot=0|B[6],G=8191&ot,te=ot>>>13,be=0|B[7],je=8191&be,Te=be>>>13,Pe=0|B[8],Le=8191&Pe,Ce=Pe>>>13,Ke=0|B[9],qe=8191&Ke,Ue=Ke>>>13;k.negative=g.negative^j.negative,k.length=19;var ft=(H+(x=Math.imul(q,Se))|0)+((8191&(C=(C=Math.imul(q,ge))+Math.imul($,Se)|0))<<13)|0;H=((D=Math.imul($,ge))+(C>>>13)|0)+(ft>>>26)|0,ft&=67108863,x=Math.imul(A,Se),C=(C=Math.imul(A,ge))+Math.imul(N,Se)|0,D=Math.imul(N,ge);var lt=(H+(x=x+Math.imul(q,Ae)|0)|0)+((8191&(C=(C=C+Math.imul(q,Be)|0)+Math.imul($,Ae)|0))<<13)|0;H=((D=D+Math.imul($,Be)|0)+(C>>>13)|0)+(lt>>>26)|0,lt&=67108863,x=Math.imul(W,Se),C=(C=Math.imul(W,ge))+Math.imul(X,Se)|0,D=Math.imul(X,ge),x=x+Math.imul(A,Ae)|0,C=(C=C+Math.imul(A,Be)|0)+Math.imul(N,Ae)|0,D=D+Math.imul(N,Be)|0;var at=(H+(x=x+Math.imul(q,rt)|0)|0)+((8191&(C=(C=C+Math.imul(q,Ie)|0)+Math.imul($,rt)|0))<<13)|0;H=((D=D+Math.imul($,Ie)|0)+(C>>>13)|0)+(at>>>26)|0,at&=67108863,x=Math.imul(ie,Se),C=(C=Math.imul(ie,ge))+Math.imul(Q,Se)|0,D=Math.imul(Q,ge),x=x+Math.imul(W,Ae)|0,C=(C=C+Math.imul(W,Be)|0)+Math.imul(X,Ae)|0,D=D+Math.imul(X,Be)|0,x=x+Math.imul(A,rt)|0,C=(C=C+Math.imul(A,Ie)|0)+Math.imul(N,rt)|0,D=D+Math.imul(N,Ie)|0;var dt=(H+(x=x+Math.imul(q,me)|0)|0)+((8191&(C=(C=C+Math.imul(q,Fe)|0)+Math.imul($,me)|0))<<13)|0;H=((D=D+Math.imul($,Fe)|0)+(C>>>13)|0)+(dt>>>26)|0,dt&=67108863,x=Math.imul(de,Se),C=(C=Math.imul(de,ge))+Math.imul(ce,Se)|0,D=Math.imul(ce,ge),x=x+Math.imul(ie,Ae)|0,C=(C=C+Math.imul(ie,Be)|0)+Math.imul(Q,Ae)|0,D=D+Math.imul(Q,Be)|0,x=x+Math.imul(W,rt)|0,C=(C=C+Math.imul(W,Ie)|0)+Math.imul(X,rt)|0,D=D+Math.imul(X,Ie)|0,x=x+Math.imul(A,me)|0,C=(C=C+Math.imul(A,Fe)|0)+Math.imul(N,me)|0,D=D+Math.imul(N,Fe)|0;var pt=(H+(x=x+Math.imul(q,Ye)|0)|0)+((8191&(C=(C=C+Math.imul(q,He)|0)+Math.imul($,Ye)|0))<<13)|0;H=((D=D+Math.imul($,He)|0)+(C>>>13)|0)+(pt>>>26)|0,pt&=67108863,x=Math.imul(_e,Se),C=(C=Math.imul(_e,ge))+Math.imul(ve,Se)|0,D=Math.imul(ve,ge),x=x+Math.imul(de,Ae)|0,C=(C=C+Math.imul(de,Be)|0)+Math.imul(ce,Ae)|0,D=D+Math.imul(ce,Be)|0,x=x+Math.imul(ie,rt)|0,C=(C=C+Math.imul(ie,Ie)|0)+Math.imul(Q,rt)|0,D=D+Math.imul(Q,Ie)|0,x=x+Math.imul(W,me)|0,C=(C=C+Math.imul(W,Fe)|0)+Math.imul(X,me)|0,D=D+Math.imul(X,Fe)|0,x=x+Math.imul(A,Ye)|0,C=(C=C+Math.imul(A,He)|0)+Math.imul(N,Ye)|0,D=D+Math.imul(N,He)|0;var yt=(H+(x=x+Math.imul(q,et)|0)|0)+((8191&(C=(C=C+Math.imul(q,Ve)|0)+Math.imul($,et)|0))<<13)|0;H=((D=D+Math.imul($,Ve)|0)+(C>>>13)|0)+(yt>>>26)|0,yt&=67108863,x=Math.imul(Re,Se),C=(C=Math.imul(Re,ge))+Math.imul(fe,Se)|0,D=Math.imul(fe,ge),x=x+Math.imul(_e,Ae)|0,C=(C=C+Math.imul(_e,Be)|0)+Math.imul(ve,Ae)|0,D=D+Math.imul(ve,Be)|0,x=x+Math.imul(de,rt)|0,C=(C=C+Math.imul(de,Ie)|0)+Math.imul(ce,rt)|0,D=D+Math.imul(ce,Ie)|0,x=x+Math.imul(ie,me)|0,C=(C=C+Math.imul(ie,Fe)|0)+Math.imul(Q,me)|0,D=D+Math.imul(Q,Fe)|0,x=x+Math.imul(W,Ye)|0,C=(C=C+Math.imul(W,He)|0)+Math.imul(X,Ye)|0,D=D+Math.imul(X,He)|0,x=x+Math.imul(A,et)|0,C=(C=C+Math.imul(A,Ve)|0)+Math.imul(N,et)|0,D=D+Math.imul(N,Ve)|0;var Y=(H+(x=x+Math.imul(q,G)|0)|0)+((8191&(C=(C=C+Math.imul(q,te)|0)+Math.imul($,G)|0))<<13)|0;H=((D=D+Math.imul($,te)|0)+(C>>>13)|0)+(Y>>>26)|0,Y&=67108863,x=Math.imul(ee,Se),C=(C=Math.imul(ee,ge))+Math.imul(J,Se)|0,D=Math.imul(J,ge),x=x+Math.imul(Re,Ae)|0,C=(C=C+Math.imul(Re,Be)|0)+Math.imul(fe,Ae)|0,D=D+Math.imul(fe,Be)|0,x=x+Math.imul(_e,rt)|0,C=(C=C+Math.imul(_e,Ie)|0)+Math.imul(ve,rt)|0,D=D+Math.imul(ve,Ie)|0,x=x+Math.imul(de,me)|0,C=(C=C+Math.imul(de,Fe)|0)+Math.imul(ce,me)|0,D=D+Math.imul(ce,Fe)|0,x=x+Math.imul(ie,Ye)|0,C=(C=C+Math.imul(ie,He)|0)+Math.imul(Q,Ye)|0,D=D+Math.imul(Q,He)|0,x=x+Math.imul(W,et)|0,C=(C=C+Math.imul(W,Ve)|0)+Math.imul(X,et)|0,D=D+Math.imul(X,Ve)|0,x=x+Math.imul(A,G)|0,C=(C=C+Math.imul(A,te)|0)+Math.imul(N,G)|0,D=D+Math.imul(N,te)|0;var se=(H+(x=x+Math.imul(q,je)|0)|0)+((8191&(C=(C=C+Math.imul(q,Te)|0)+Math.imul($,je)|0))<<13)|0;H=((D=D+Math.imul($,Te)|0)+(C>>>13)|0)+(se>>>26)|0,se&=67108863,x=Math.imul(ne,Se),C=(C=Math.imul(ne,ge))+Math.imul(ae,Se)|0,D=Math.imul(ae,ge),x=x+Math.imul(ee,Ae)|0,C=(C=C+Math.imul(ee,Be)|0)+Math.imul(J,Ae)|0,D=D+Math.imul(J,Be)|0,x=x+Math.imul(Re,rt)|0,C=(C=C+Math.imul(Re,Ie)|0)+Math.imul(fe,rt)|0,D=D+Math.imul(fe,Ie)|0,x=x+Math.imul(_e,me)|0,C=(C=C+Math.imul(_e,Fe)|0)+Math.imul(ve,me)|0,D=D+Math.imul(ve,Fe)|0,x=x+Math.imul(de,Ye)|0,C=(C=C+Math.imul(de,He)|0)+Math.imul(ce,Ye)|0,D=D+Math.imul(ce,He)|0,x=x+Math.imul(ie,et)|0,C=(C=C+Math.imul(ie,Ve)|0)+Math.imul(Q,et)|0,D=D+Math.imul(Q,Ve)|0,x=x+Math.imul(W,G)|0,C=(C=C+Math.imul(W,te)|0)+Math.imul(X,G)|0,D=D+Math.imul(X,te)|0,x=x+Math.imul(A,je)|0,C=(C=C+Math.imul(A,Te)|0)+Math.imul(N,je)|0,D=D+Math.imul(N,Te)|0;var ye=(H+(x=x+Math.imul(q,Le)|0)|0)+((8191&(C=(C=C+Math.imul(q,Ce)|0)+Math.imul($,Le)|0))<<13)|0;H=((D=D+Math.imul($,Ce)|0)+(C>>>13)|0)+(ye>>>26)|0,ye&=67108863,x=Math.imul(he,Se),C=(C=Math.imul(he,ge))+Math.imul(le,Se)|0,D=Math.imul(le,ge),x=x+Math.imul(ne,Ae)|0,C=(C=C+Math.imul(ne,Be)|0)+Math.imul(ae,Ae)|0,D=D+Math.imul(ae,Be)|0,x=x+Math.imul(ee,rt)|0,C=(C=C+Math.imul(ee,Ie)|0)+Math.imul(J,rt)|0,D=D+Math.imul(J,Ie)|0,x=x+Math.imul(Re,me)|0,C=(C=C+Math.imul(Re,Fe)|0)+Math.imul(fe,me)|0,D=D+Math.imul(fe,Fe)|0,x=x+Math.imul(_e,Ye)|0,C=(C=C+Math.imul(_e,He)|0)+Math.imul(ve,Ye)|0,D=D+Math.imul(ve,He)|0,x=x+Math.imul(de,et)|0,C=(C=C+Math.imul(de,Ve)|0)+Math.imul(ce,et)|0,D=D+Math.imul(ce,Ve)|0,x=x+Math.imul(ie,G)|0,C=(C=C+Math.imul(ie,te)|0)+Math.imul(Q,G)|0,D=D+Math.imul(Q,te)|0,x=x+Math.imul(W,je)|0,C=(C=C+Math.imul(W,Te)|0)+Math.imul(X,je)|0,D=D+Math.imul(X,Te)|0,x=x+Math.imul(A,Le)|0,C=(C=C+Math.imul(A,Ce)|0)+Math.imul(N,Le)|0,D=D+Math.imul(N,Ce)|0;var we=(H+(x=x+Math.imul(q,qe)|0)|0)+((8191&(C=(C=C+Math.imul(q,Ue)|0)+Math.imul($,qe)|0))<<13)|0;H=((D=D+Math.imul($,Ue)|0)+(C>>>13)|0)+(we>>>26)|0,we&=67108863,x=Math.imul(he,Ae),C=(C=Math.imul(he,Be))+Math.imul(le,Ae)|0,D=Math.imul(le,Be),x=x+Math.imul(ne,rt)|0,C=(C=C+Math.imul(ne,Ie)|0)+Math.imul(ae,rt)|0,D=D+Math.imul(ae,Ie)|0,x=x+Math.imul(ee,me)|0,C=(C=C+Math.imul(ee,Fe)|0)+Math.imul(J,me)|0,D=D+Math.imul(J,Fe)|0,x=x+Math.imul(Re,Ye)|0,C=(C=C+Math.imul(Re,He)|0)+Math.imul(fe,Ye)|0,D=D+Math.imul(fe,He)|0,x=x+Math.imul(_e,et)|0,C=(C=C+Math.imul(_e,Ve)|0)+Math.imul(ve,et)|0,D=D+Math.imul(ve,Ve)|0,x=x+Math.imul(de,G)|0,C=(C=C+Math.imul(de,te)|0)+Math.imul(ce,G)|0,D=D+Math.imul(ce,te)|0,x=x+Math.imul(ie,je)|0,C=(C=C+Math.imul(ie,Te)|0)+Math.imul(Q,je)|0,D=D+Math.imul(Q,Te)|0,x=x+Math.imul(W,Le)|0,C=(C=C+Math.imul(W,Ce)|0)+Math.imul(X,Le)|0,D=D+Math.imul(X,Ce)|0;var Me=(H+(x=x+Math.imul(A,qe)|0)|0)+((8191&(C=(C=C+Math.imul(A,Ue)|0)+Math.imul(N,qe)|0))<<13)|0;H=((D=D+Math.imul(N,Ue)|0)+(C>>>13)|0)+(Me>>>26)|0,Me&=67108863,x=Math.imul(he,rt),C=(C=Math.imul(he,Ie))+Math.imul(le,rt)|0,D=Math.imul(le,Ie),x=x+Math.imul(ne,me)|0,C=(C=C+Math.imul(ne,Fe)|0)+Math.imul(ae,me)|0,D=D+Math.imul(ae,Fe)|0,x=x+Math.imul(ee,Ye)|0,C=(C=C+Math.imul(ee,He)|0)+Math.imul(J,Ye)|0,D=D+Math.imul(J,He)|0,x=x+Math.imul(Re,et)|0,C=(C=C+Math.imul(Re,Ve)|0)+Math.imul(fe,et)|0,D=D+Math.imul(fe,Ve)|0,x=x+Math.imul(_e,G)|0,C=(C=C+Math.imul(_e,te)|0)+Math.imul(ve,G)|0,D=D+Math.imul(ve,te)|0,x=x+Math.imul(de,je)|0,C=(C=C+Math.imul(de,Te)|0)+Math.imul(ce,je)|0,D=D+Math.imul(ce,Te)|0,x=x+Math.imul(ie,Le)|0,C=(C=C+Math.imul(ie,Ce)|0)+Math.imul(Q,Le)|0,D=D+Math.imul(Q,Ce)|0;var xe=(H+(x=x+Math.imul(W,qe)|0)|0)+((8191&(C=(C=C+Math.imul(W,Ue)|0)+Math.imul(X,qe)|0))<<13)|0;H=((D=D+Math.imul(X,Ue)|0)+(C>>>13)|0)+(xe>>>26)|0,xe&=67108863,x=Math.imul(he,me),C=(C=Math.imul(he,Fe))+Math.imul(le,me)|0,D=Math.imul(le,Fe),x=x+Math.imul(ne,Ye)|0,C=(C=C+Math.imul(ne,He)|0)+Math.imul(ae,Ye)|0,D=D+Math.imul(ae,He)|0,x=x+Math.imul(ee,et)|0,C=(C=C+Math.imul(ee,Ve)|0)+Math.imul(J,et)|0,D=D+Math.imul(J,Ve)|0,x=x+Math.imul(Re,G)|0,C=(C=C+Math.imul(Re,te)|0)+Math.imul(fe,G)|0,D=D+Math.imul(fe,te)|0,x=x+Math.imul(_e,je)|0,C=(C=C+Math.imul(_e,Te)|0)+Math.imul(ve,je)|0,D=D+Math.imul(ve,Te)|0,x=x+Math.imul(de,Le)|0,C=(C=C+Math.imul(de,Ce)|0)+Math.imul(ce,Le)|0,D=D+Math.imul(ce,Ce)|0;var Oe=(H+(x=x+Math.imul(ie,qe)|0)|0)+((8191&(C=(C=C+Math.imul(ie,Ue)|0)+Math.imul(Q,qe)|0))<<13)|0;H=((D=D+Math.imul(Q,Ue)|0)+(C>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,x=Math.imul(he,Ye),C=(C=Math.imul(he,He))+Math.imul(le,Ye)|0,D=Math.imul(le,He),x=x+Math.imul(ne,et)|0,C=(C=C+Math.imul(ne,Ve)|0)+Math.imul(ae,et)|0,D=D+Math.imul(ae,Ve)|0,x=x+Math.imul(ee,G)|0,C=(C=C+Math.imul(ee,te)|0)+Math.imul(J,G)|0,D=D+Math.imul(J,te)|0,x=x+Math.imul(Re,je)|0,C=(C=C+Math.imul(Re,Te)|0)+Math.imul(fe,je)|0,D=D+Math.imul(fe,Te)|0,x=x+Math.imul(_e,Le)|0,C=(C=C+Math.imul(_e,Ce)|0)+Math.imul(ve,Le)|0,D=D+Math.imul(ve,Ce)|0;var Xe=(H+(x=x+Math.imul(de,qe)|0)|0)+((8191&(C=(C=C+Math.imul(de,Ue)|0)+Math.imul(ce,qe)|0))<<13)|0;H=((D=D+Math.imul(ce,Ue)|0)+(C>>>13)|0)+(Xe>>>26)|0,Xe&=67108863,x=Math.imul(he,et),C=(C=Math.imul(he,Ve))+Math.imul(le,et)|0,D=Math.imul(le,Ve),x=x+Math.imul(ne,G)|0,C=(C=C+Math.imul(ne,te)|0)+Math.imul(ae,G)|0,D=D+Math.imul(ae,te)|0,x=x+Math.imul(ee,je)|0,C=(C=C+Math.imul(ee,Te)|0)+Math.imul(J,je)|0,D=D+Math.imul(J,Te)|0,x=x+Math.imul(Re,Le)|0,C=(C=C+Math.imul(Re,Ce)|0)+Math.imul(fe,Le)|0,D=D+Math.imul(fe,Ce)|0;var $e=(H+(x=x+Math.imul(_e,qe)|0)|0)+((8191&(C=(C=C+Math.imul(_e,Ue)|0)+Math.imul(ve,qe)|0))<<13)|0;H=((D=D+Math.imul(ve,Ue)|0)+(C>>>13)|0)+($e>>>26)|0,$e&=67108863,x=Math.imul(he,G),C=(C=Math.imul(he,te))+Math.imul(le,G)|0,D=Math.imul(le,te),x=x+Math.imul(ne,je)|0,C=(C=C+Math.imul(ne,Te)|0)+Math.imul(ae,je)|0,D=D+Math.imul(ae,Te)|0,x=x+Math.imul(ee,Le)|0,C=(C=C+Math.imul(ee,Ce)|0)+Math.imul(J,Le)|0,D=D+Math.imul(J,Ce)|0;var We=(H+(x=x+Math.imul(Re,qe)|0)|0)+((8191&(C=(C=C+Math.imul(Re,Ue)|0)+Math.imul(fe,qe)|0))<<13)|0;H=((D=D+Math.imul(fe,Ue)|0)+(C>>>13)|0)+(We>>>26)|0,We&=67108863,x=Math.imul(he,je),C=(C=Math.imul(he,Te))+Math.imul(le,je)|0,D=Math.imul(le,Te),x=x+Math.imul(ne,Le)|0,C=(C=C+Math.imul(ne,Ce)|0)+Math.imul(ae,Le)|0,D=D+Math.imul(ae,Ce)|0;var Ne=(H+(x=x+Math.imul(ee,qe)|0)|0)+((8191&(C=(C=C+Math.imul(ee,Ue)|0)+Math.imul(J,qe)|0))<<13)|0;H=((D=D+Math.imul(J,Ue)|0)+(C>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,x=Math.imul(he,Le),C=(C=Math.imul(he,Ce))+Math.imul(le,Le)|0,D=Math.imul(le,Ce);var st=(H+(x=x+Math.imul(ne,qe)|0)|0)+((8191&(C=(C=C+Math.imul(ne,Ue)|0)+Math.imul(ae,qe)|0))<<13)|0;H=((D=D+Math.imul(ae,Ue)|0)+(C>>>13)|0)+(st>>>26)|0,st&=67108863;var ut=(H+(x=Math.imul(he,qe))|0)+((8191&(C=(C=Math.imul(he,Ue))+Math.imul(le,qe)|0))<<13)|0;return H=((D=Math.imul(le,Ue))+(C>>>13)|0)+(ut>>>26)|0,ut&=67108863,U[0]=ft,U[1]=lt,U[2]=at,U[3]=dt,U[4]=pt,U[5]=yt,U[6]=Y,U[7]=se,U[8]=ye,U[9]=we,U[10]=Me,U[11]=xe,U[12]=Oe,U[13]=Xe,U[14]=$e,U[15]=We,U[16]=Ne,U[17]=st,U[18]=ut,H!==0&&(U[19]=H,k.length++),k};function f(g,j,k){k.negative=j.negative^g.negative,k.length=g.length+j.length;for(var x=0,C=0,D=0;D>>26)|0)>>>26,F&=67108863}k.words[D]=B,x=F,F=C}return x!==0?k.words[D]=x:k.length--,k._strip()}function y(g,j,k){return f(g,j,k)}Math.imul||(u=a),c.prototype.mulTo=function(g,j){var k=this.length+g.length;return this.length===10&&g.length===10?u(this,g,j):k<63?a(this,g,j):k<1024?f(this,g,j):y(this,g,j)},c.prototype.mul=function(g){var j=new c(null);return j.words=new Array(this.length+g.length),this.mulTo(g,j)},c.prototype.mulf=function(g){var j=new c(null);return j.words=new Array(this.length+g.length),y(this,g,j)},c.prototype.imul=function(g){return this.clone().mulTo(g,this)},c.prototype.imuln=function(g){var j=g<0;j&&(g=-g),h(typeof g=="number"),h(g<67108864);for(var k=0,x=0;x>=26,k+=C/67108864|0,k+=D>>>26,this.words[x]=67108863&D}return k!==0&&(this.words[x]=k,this.length++),j?this.ineg():this},c.prototype.muln=function(g){return this.clone().imuln(g)},c.prototype.sqr=function(){return this.mul(this)},c.prototype.isqr=function(){return this.imul(this.clone())},c.prototype.pow=function(g){var j=function(D){for(var F=new Array(D.bitLength()),B=0;B>>H&1}return F}(g);if(j.length===0)return new c(1);for(var k=this,x=0;x=0);var j,k=g%26,x=(g-k)/26,C=67108863>>>26-k<<26-k;if(k!==0){var D=0;for(j=0;j>>26-k}D&&(this.words[j]=D,this.length++)}if(x!==0){for(j=this.length-1;j>=0;j--)this.words[j+x]=this.words[j];for(j=0;j=0),x=j?(j-j%26)/26:0;var C=g%26,D=Math.min((g-C)/26,this.length),F=67108863^67108863>>>C<D)for(this.length-=D,U=0;U=0&&(H!==0||U>=x);U--){var V=0|this.words[U];this.words[U]=H<<26-C|V>>>C,H=V&F}return B&&H!==0&&(B.words[B.length++]=H),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},c.prototype.ishrn=function(g,j,k){return h(this.negative===0),this.iushrn(g,j,k)},c.prototype.shln=function(g){return this.clone().ishln(g)},c.prototype.ushln=function(g){return this.clone().iushln(g)},c.prototype.shrn=function(g){return this.clone().ishrn(g)},c.prototype.ushrn=function(g){return this.clone().iushrn(g)},c.prototype.testn=function(g){h(typeof g=="number"&&g>=0);var j=g%26,k=(g-j)/26,x=1<=0);var j=g%26,k=(g-j)/26;if(h(this.negative===0,"imaskn works only with positive numbers"),this.length<=k)return this;if(j!==0&&k++,this.length=Math.min(k,this.length),j!==0){var x=67108863^67108863>>>j<=67108864;j++)this.words[j]-=67108864,j===this.length-1?this.words[j+1]=1:this.words[j+1]++;return this.length=Math.max(this.length,j+1),this},c.prototype.isubn=function(g){if(h(typeof g=="number"),h(g<67108864),g<0)return this.iaddn(-g);if(this.negative!==0)return this.negative=0,this.iaddn(g),this.negative=1,this;if(this.words[0]-=g,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var j=0;j>26)-(B/67108864|0),this.words[x+k]=67108863&C}for(;x>26,this.words[x+k]=67108863&C;if(F===0)return this._strip();for(h(F===-1),F=0,x=0;x>26,this.words[x]=67108863&C;return this.negative=1,this._strip()},c.prototype._wordDiv=function(g,j){var k=(this.length,g.length),x=this.clone(),C=g,D=0|C.words[C.length-1];(k=26-this._countBits(D))!==0&&(C=C.ushln(k),x.iushln(k),D=0|C.words[C.length-1]);var F,B=x.length-C.length;if(j!=="mod"){(F=new c(null)).length=B+1,F.words=new Array(F.length);for(var U=0;U=0;V--){var q=67108864*(0|x.words[C.length+V])+(0|x.words[C.length+V-1]);for(q=Math.min(q/D|0,67108863),x._ishlnsubmul(C,q,V);x.negative!==0;)q--,x.negative=0,x._ishlnsubmul(C,1,V),x.isZero()||(x.negative^=1);F&&(F.words[V]=q)}return F&&F._strip(),x._strip(),j!=="div"&&k!==0&&x.iushrn(k),{div:F||null,mod:x}},c.prototype.divmod=function(g,j,k){return h(!g.isZero()),this.isZero()?{div:new c(0),mod:new c(0)}:this.negative!==0&&g.negative===0?(D=this.neg().divmod(g,j),j!=="mod"&&(x=D.div.neg()),j!=="div"&&(C=D.mod.neg(),k&&C.negative!==0&&C.iadd(g)),{div:x,mod:C}):this.negative===0&&g.negative!==0?(D=this.divmod(g.neg(),j),j!=="mod"&&(x=D.div.neg()),{div:x,mod:D.mod}):this.negative&g.negative?(D=this.neg().divmod(g.neg(),j),j!=="div"&&(C=D.mod.neg(),k&&C.negative!==0&&C.isub(g)),{div:D.div,mod:C}):g.length>this.length||this.cmp(g)<0?{div:new c(0),mod:this}:g.length===1?j==="div"?{div:this.divn(g.words[0]),mod:null}:j==="mod"?{div:null,mod:new c(this.modrn(g.words[0]))}:{div:this.divn(g.words[0]),mod:new c(this.modrn(g.words[0]))}:this._wordDiv(g,j);var x,C,D},c.prototype.div=function(g){return this.divmod(g,"div",!1).div},c.prototype.mod=function(g){return this.divmod(g,"mod",!1).mod},c.prototype.umod=function(g){return this.divmod(g,"mod",!0).mod},c.prototype.divRound=function(g){var j=this.divmod(g);if(j.mod.isZero())return j.div;var k=j.div.negative!==0?j.mod.isub(g):j.mod,x=g.ushrn(1),C=g.andln(1),D=k.cmp(x);return D<0||C===1&&D===0?j.div:j.div.negative!==0?j.div.isubn(1):j.div.iaddn(1)},c.prototype.modrn=function(g){var j=g<0;j&&(g=-g),h(g<=67108863);for(var k=(1<<26)%g,x=0,C=this.length-1;C>=0;C--)x=(k*x+(0|this.words[C]))%g;return j?-x:x},c.prototype.modn=function(g){return this.modrn(g)},c.prototype.idivn=function(g){var j=g<0;j&&(g=-g),h(g<=67108863);for(var k=0,x=this.length-1;x>=0;x--){var C=(0|this.words[x])+67108864*k;this.words[x]=C/g|0,k=C%g}return this._strip(),j?this.ineg():this},c.prototype.divn=function(g){return this.clone().idivn(g)},c.prototype.egcd=function(g){h(g.negative===0),h(!g.isZero());var j=this,k=g.clone();j=j.negative!==0?j.umod(g):j.clone();for(var x=new c(1),C=new c(0),D=new c(0),F=new c(1),B=0;j.isEven()&&k.isEven();)j.iushrn(1),k.iushrn(1),++B;for(var U=k.clone(),H=j.clone();!j.isZero();){for(var V=0,q=1;!(j.words[0]&q)&&V<26;++V,q<<=1);if(V>0)for(j.iushrn(V);V-- >0;)(x.isOdd()||C.isOdd())&&(x.iadd(U),C.isub(H)),x.iushrn(1),C.iushrn(1);for(var $=0,L=1;!(k.words[0]&L)&&$<26;++$,L<<=1);if($>0)for(k.iushrn($);$-- >0;)(D.isOdd()||F.isOdd())&&(D.iadd(U),F.isub(H)),D.iushrn(1),F.iushrn(1);j.cmp(k)>=0?(j.isub(k),x.isub(D),C.isub(F)):(k.isub(j),D.isub(x),F.isub(C))}return{a:D,b:F,gcd:k.iushln(B)}},c.prototype._invmp=function(g){h(g.negative===0),h(!g.isZero());var j=this,k=g.clone();j=j.negative!==0?j.umod(g):j.clone();for(var x,C=new c(1),D=new c(0),F=k.clone();j.cmpn(1)>0&&k.cmpn(1)>0;){for(var B=0,U=1;!(j.words[0]&U)&&B<26;++B,U<<=1);if(B>0)for(j.iushrn(B);B-- >0;)C.isOdd()&&C.iadd(F),C.iushrn(1);for(var H=0,V=1;!(k.words[0]&V)&&H<26;++H,V<<=1);if(H>0)for(k.iushrn(H);H-- >0;)D.isOdd()&&D.iadd(F),D.iushrn(1);j.cmp(k)>=0?(j.isub(k),C.isub(D)):(k.isub(j),D.isub(C))}return(x=j.cmpn(1)===0?C:D).cmpn(0)<0&&x.iadd(g),x},c.prototype.gcd=function(g){if(this.isZero())return g.abs();if(g.isZero())return this.abs();var j=this.clone(),k=g.clone();j.negative=0,k.negative=0;for(var x=0;j.isEven()&&k.isEven();x++)j.iushrn(1),k.iushrn(1);for(;;){for(;j.isEven();)j.iushrn(1);for(;k.isEven();)k.iushrn(1);var C=j.cmp(k);if(C<0){var D=j;j=k,k=D}else if(C===0||k.cmpn(1)===0)break;j.isub(k)}return k.iushln(x)},c.prototype.invm=function(g){return this.egcd(g).a.umod(g)},c.prototype.isEven=function(){return(1&this.words[0])==0},c.prototype.isOdd=function(){return(1&this.words[0])==1},c.prototype.andln=function(g){return this.words[0]&g},c.prototype.bincn=function(g){h(typeof g=="number");var j=g%26,k=(g-j)/26,x=1<>>26,F&=67108863,this.words[D]=F}return C!==0&&(this.words[D]=C,this.length++),this},c.prototype.isZero=function(){return this.length===1&&this.words[0]===0},c.prototype.cmpn=function(g){var j,k=g<0;if(this.negative!==0&&!k)return-1;if(this.negative===0&&k)return 1;if(this._strip(),this.length>1)j=1;else{k&&(g=-g),h(g<=67108863,"Number is too big");var x=0|this.words[0];j=x===g?0:xg.length)return 1;if(this.length=0;k--){var x=0|this.words[k],C=0|g.words[k];if(x!==C){xC&&(j=1);break}}return j},c.prototype.gtn=function(g){return this.cmpn(g)===1},c.prototype.gt=function(g){return this.cmp(g)===1},c.prototype.gten=function(g){return this.cmpn(g)>=0},c.prototype.gte=function(g){return this.cmp(g)>=0},c.prototype.ltn=function(g){return this.cmpn(g)===-1},c.prototype.lt=function(g){return this.cmp(g)===-1},c.prototype.lten=function(g){return this.cmpn(g)<=0},c.prototype.lte=function(g){return this.cmp(g)<=0},c.prototype.eqn=function(g){return this.cmpn(g)===0},c.prototype.eq=function(g){return this.cmp(g)===0},c.red=function(g){return new _(g)},c.prototype.toRed=function(g){return h(!this.red,"Already a number in reduction context"),h(this.negative===0,"red works only with positives"),g.convertTo(this)._forceRed(g)},c.prototype.fromRed=function(){return h(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},c.prototype._forceRed=function(g){return this.red=g,this},c.prototype.forceRed=function(g){return h(!this.red,"Already a number in reduction context"),this._forceRed(g)},c.prototype.redAdd=function(g){return h(this.red,"redAdd works only with red numbers"),this.red.add(this,g)},c.prototype.redIAdd=function(g){return h(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,g)},c.prototype.redSub=function(g){return h(this.red,"redSub works only with red numbers"),this.red.sub(this,g)},c.prototype.redISub=function(g){return h(this.red,"redISub works only with red numbers"),this.red.isub(this,g)},c.prototype.redShl=function(g){return h(this.red,"redShl works only with red numbers"),this.red.shl(this,g)},c.prototype.redMul=function(g){return h(this.red,"redMul works only with red numbers"),this.red._verify2(this,g),this.red.mul(this,g)},c.prototype.redIMul=function(g){return h(this.red,"redMul works only with red numbers"),this.red._verify2(this,g),this.red.imul(this,g)},c.prototype.redSqr=function(){return h(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},c.prototype.redISqr=function(){return h(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},c.prototype.redSqrt=function(){return h(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},c.prototype.redInvm=function(){return h(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},c.prototype.redNeg=function(){return h(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},c.prototype.redPow=function(g){return h(this.red&&!g.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,g)};var w={k256:null,p224:null,p192:null,p25519:null};function R(g,j){this.name=g,this.p=new c(j,16),this.n=this.p.bitLength(),this.k=new c(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function E(){R.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function M(){R.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function O(){R.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function P(){R.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(g){if(typeof g=="string"){var j=c._prime(g);this.m=j.p,this.prime=j}else h(g.gtn(1),"modulus must be greater than 1"),this.m=g,this.prime=null}function S(g){_.call(this,g),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new c(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}R.prototype._tmp=function(){var g=new c(null);return g.words=new Array(Math.ceil(this.n/13)),g},R.prototype.ireduce=function(g){var j,k=g;do this.split(k,this.tmp),j=(k=(k=this.imulK(k)).iadd(this.tmp)).bitLength();while(j>this.n);var x=j0?k.isub(this.p):k.strip!==void 0?k.strip():k._strip(),k},R.prototype.split=function(g,j){g.iushrn(this.n,0,j)},R.prototype.imulK=function(g){return g.imul(this.k)},p(E,R),E.prototype.split=function(g,j){for(var k=Math.min(g.length,9),x=0;x>>22,C=D}C>>>=22,g.words[x-10]=C,C===0&&g.length>10?g.length-=10:g.length-=9},E.prototype.imulK=function(g){g.words[g.length]=0,g.words[g.length+1]=0,g.length+=2;for(var j=0,k=0;k>>=26,g.words[k]=C,j=x}return j!==0&&(g.words[g.length++]=j),g},c._prime=function(g){if(w[g])return w[g];var j;if(g==="k256")j=new E;else if(g==="p224")j=new M;else if(g==="p192")j=new O;else{if(g!=="p25519")throw new Error("Unknown prime "+g);j=new P}return w[g]=j,j},_.prototype._verify1=function(g){h(g.negative===0,"red works only with positives"),h(g.red,"red works only with red numbers")},_.prototype._verify2=function(g,j){h((g.negative|j.negative)==0,"red works only with positives"),h(g.red&&g.red===j.red,"red works only with red numbers")},_.prototype.imod=function(g){return this.prime?this.prime.ireduce(g)._forceRed(this):(e(g,g.umod(this.m)._forceRed(this)),g)},_.prototype.neg=function(g){return g.isZero()?g.clone():this.m.sub(g)._forceRed(this)},_.prototype.add=function(g,j){this._verify2(g,j);var k=g.add(j);return k.cmp(this.m)>=0&&k.isub(this.m),k._forceRed(this)},_.prototype.iadd=function(g,j){this._verify2(g,j);var k=g.iadd(j);return k.cmp(this.m)>=0&&k.isub(this.m),k},_.prototype.sub=function(g,j){this._verify2(g,j);var k=g.sub(j);return k.cmpn(0)<0&&k.iadd(this.m),k._forceRed(this)},_.prototype.isub=function(g,j){this._verify2(g,j);var k=g.isub(j);return k.cmpn(0)<0&&k.iadd(this.m),k},_.prototype.shl=function(g,j){return this._verify1(g),this.imod(g.ushln(j))},_.prototype.imul=function(g,j){return this._verify2(g,j),this.imod(g.imul(j))},_.prototype.mul=function(g,j){return this._verify2(g,j),this.imod(g.mul(j))},_.prototype.isqr=function(g){return this.imul(g,g.clone())},_.prototype.sqr=function(g){return this.mul(g,g)},_.prototype.sqrt=function(g){if(g.isZero())return g.clone();var j=this.m.andln(3);if(h(j%2==1),j===3){var k=this.m.add(new c(1)).iushrn(2);return this.pow(g,k)}for(var x=this.m.subn(1),C=0;!x.isZero()&&x.andln(1)===0;)C++,x.iushrn(1);h(!x.isZero());var D=new c(1).toRed(this),F=D.redNeg(),B=this.m.subn(1).iushrn(1),U=this.m.bitLength();for(U=new c(2*U*U).toRed(this);this.pow(U,B).cmp(F)!==0;)U.redIAdd(F);for(var H=this.pow(U,x),V=this.pow(g,x.addn(1).iushrn(1)),q=this.pow(g,x),$=C;q.cmp(D)!==0;){for(var L=q,A=0;L.cmp(D)!==0;A++)L=L.redSqr();h(A<$);var N=this.pow(H,new c(1).iushln($-A-1));V=V.redMul(N),H=N.redSqr(),q=q.redMul(H),$=A}return V},_.prototype.invm=function(g){var j=g._invmp(this.m);return j.negative!==0?(j.negative=0,this.imod(j).redNeg()):this.imod(j)},_.prototype.pow=function(g,j){if(j.isZero())return new c(1).toRed(this);if(j.cmpn(1)===0)return g.clone();var k=new Array(16);k[0]=new c(1).toRed(this),k[1]=g;for(var x=2;x=0;x--){for(var U=j.words[x],H=B-1;H>=0;H--){var V=U>>H&1;C!==k[0]&&(C=this.sqr(C)),V!==0||D!==0?(D<<=1,D|=V,(++F===4||x===0&&H===0)&&(C=this.mul(C,k[D]),F=0,D=0)):F=0}B=26}return C},_.prototype.convertTo=function(g){var j=g.umod(this.m);return j===g?j.clone():j},_.prototype.convertFrom=function(g){var j=g.clone();return j.red=null,j},c.mont=function(g){return new S(g)},p(S,_),S.prototype.convertTo=function(g){return this.imod(g.ushln(this.shift))},S.prototype.convertFrom=function(g){var j=this.imod(g.mul(this.rinv));return j.red=null,j},S.prototype.imul=function(g,j){if(g.isZero()||j.isZero())return g.words[0]=0,g.length=1,g;var k=g.imul(j),x=k.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),C=k.isub(x).iushrn(this.shift),D=C;return C.cmp(this.m)>=0?D=C.isub(this.m):C.cmpn(0)<0&&(D=C.iadd(this.m)),D._forceRed(this)},S.prototype.mul=function(g,j){if(g.isZero()||j.isZero())return new c(0)._forceRed(this);var k=g.mul(j),x=k.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),C=k.isub(x).iushrn(this.shift),D=C;return C.cmp(this.m)>=0?D=C.isub(this.m):C.cmpn(0)<0&&(D=C.iadd(this.m)),D._forceRed(this)},S.prototype.invm=function(g){return this.imod(g._invmp(this.m).mul(this.r2))._forceRed(this)}})(I===void 0||I)},{buffer:185}],184:[function(d,I,T){function b(p){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c})(p)}var m;function v(p){this.rand=p}if(I.exports=function(p){return m||(m=new v(null)),m.generate(p)},I.exports.Rand=v,v.prototype.generate=function(p){return this._rand(p)},v.prototype._rand=function(p){if(this.rand.getBytes)return this.rand.getBytes(p);for(var c=new Uint8Array(p),l=0;l"u"?"undefined":b(self))==="object")self.crypto&&self.crypto.getRandomValues?v.prototype._rand=function(p){var c=new Uint8Array(p);return self.crypto.getRandomValues(c),c}:self.msCrypto&&self.msCrypto.getRandomValues?v.prototype._rand=function(p){var c=new Uint8Array(p);return self.msCrypto.getRandomValues(c),c}:(typeof window>"u"?"undefined":b(window))==="object"&&(v.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var h=d("crypto");if(typeof h.randomBytes!="function")throw new Error("Not supported");v.prototype._rand=function(p){return h.randomBytes(p)}}catch{}},{crypto:185}],185:[function(d,I,T){},{}],186:[function(d,I,T){var b=d("safe-buffer").Buffer;function m(s){b.isBuffer(s)||(s=b.from(s));for(var i=s.length/4|0,e=new Array(i),t=0;t>>24]^y[M>>>16&255]^w[O>>>8&255]^R[255&P]^i[_++],n=f[M>>>24]^y[O>>>16&255]^w[P>>>8&255]^R[255&E]^i[_++],a=f[O>>>24]^y[P>>>16&255]^w[E>>>8&255]^R[255&M]^i[_++],u=f[P>>>24]^y[E>>>16&255]^w[M>>>8&255]^R[255&O]^i[_++],E=o,M=n,O=a,P=u;return o=(t[E>>>24]<<24|t[M>>>16&255]<<16|t[O>>>8&255]<<8|t[255&P])^i[_++],n=(t[M>>>24]<<24|t[O>>>16&255]<<16|t[P>>>8&255]<<8|t[255&E])^i[_++],a=(t[O>>>24]<<24|t[P>>>16&255]<<16|t[E>>>8&255]<<8|t[255&M])^i[_++],u=(t[P>>>24]<<24|t[E>>>16&255]<<16|t[M>>>8&255]<<8|t[255&O])^i[_++],[o>>>=0,n>>>=0,a>>>=0,u>>>=0]}var p=[0,1,2,4,8,16,32,64,128,27,54],c=function(){for(var s=new Array(256),i=0;i<256;i++)s[i]=i<128?i<<1:i<<1^283;for(var e=[],t=[],r=[[],[],[],[]],o=[[],[],[],[]],n=0,a=0,u=0;u<256;++u){var f=a^a<<1^a<<2^a<<3^a<<4;f=f>>>8^255&f^99,e[n]=f,t[f]=n;var y=s[n],w=s[y],R=s[w],E=257*s[f]^16843008*f;r[0][n]=E<<24|E>>>8,r[1][n]=E<<16|E>>>16,r[2][n]=E<<8|E>>>24,r[3][n]=E,E=16843009*R^65537*w^257*y^16843008*n,o[0][f]=E<<24|E>>>8,o[1][f]=E<<16|E>>>16,o[2][f]=E<<8|E>>>24,o[3][f]=E,n===0?n=a=1:(n=y^s[s[s[R^y]]],a^=s[s[a]])}return{SBOX:e,INV_SBOX:t,SUB_MIX:r,INV_SUB_MIX:o}}();function l(s){this._key=m(s),this._reset()}l.blockSize=16,l.keySize=32,l.prototype.blockSize=l.blockSize,l.prototype.keySize=l.keySize,l.prototype._reset=function(){for(var s=this._key,i=s.length,e=i+6,t=4*(e+1),r=[],o=0;o>>24,n=c.SBOX[n>>>24]<<24|c.SBOX[n>>>16&255]<<16|c.SBOX[n>>>8&255]<<8|c.SBOX[255&n],n^=p[o/i|0]<<24):i>6&&o%i==4&&(n=c.SBOX[n>>>24]<<24|c.SBOX[n>>>16&255]<<16|c.SBOX[n>>>8&255]<<8|c.SBOX[255&n]),r[o]=r[o-i]^n}for(var a=[],u=0;u>>24]]^c.INV_SUB_MIX[1][c.SBOX[y>>>16&255]]^c.INV_SUB_MIX[2][c.SBOX[y>>>8&255]]^c.INV_SUB_MIX[3][c.SBOX[255&y]]}this._nRounds=e,this._keySchedule=r,this._invKeySchedule=a},l.prototype.encryptBlockRaw=function(s){return h(s=m(s),this._keySchedule,c.SUB_MIX,c.SBOX,this._nRounds)},l.prototype.encryptBlock=function(s){var i=this.encryptBlockRaw(s),e=b.allocUnsafe(16);return e.writeUInt32BE(i[0],0),e.writeUInt32BE(i[1],4),e.writeUInt32BE(i[2],8),e.writeUInt32BE(i[3],12),e},l.prototype.decryptBlock=function(s){var i=(s=m(s))[1];s[1]=s[3],s[3]=i;var e=h(s,this._invKeySchedule,c.INV_SUB_MIX,c.INV_SBOX,this._nRounds),t=b.allocUnsafe(16);return t.writeUInt32BE(e[0],0),t.writeUInt32BE(e[3],4),t.writeUInt32BE(e[2],8),t.writeUInt32BE(e[1],12),t},l.prototype.scrub=function(){v(this._keySchedule),v(this._invKeySchedule),v(this._key)},I.exports.AES=l},{"safe-buffer":494}],187:[function(d,I,T){var b=d("./aes"),m=d("safe-buffer").Buffer,v=d("cipher-base"),h=d("inherits"),p=d("./ghash"),c=d("buffer-xor"),l=d("./incr32");function s(i,e,t,r){v.call(this);var o=m.alloc(4,0);this._cipher=new b.AES(e);var n=this._cipher.encryptBlock(o);this._ghash=new p(n),t=function(a,u,f){if(u.length===12)return a._finID=m.concat([u,m.from([0,0,0,1])]),m.concat([u,m.from([0,0,0,2])]);var y=new p(f),w=u.length,R=w%16;y.update(u),R&&(R=16-R,y.update(m.alloc(R,0))),y.update(m.alloc(8,0));var E=8*w,M=m.alloc(8);M.writeUIntBE(E,0,8),y.update(M),a._finID=y.state;var O=m.from(a._finID);return l(O),O}(this,t,n),this._prev=m.from(t),this._cache=m.allocUnsafe(0),this._secCache=m.allocUnsafe(0),this._decrypt=r,this._alen=0,this._len=0,this._mode=i,this._authTag=null,this._called=!1}h(s,v),s.prototype._update=function(i){if(!this._called&&this._alen){var e=16-this._alen%16;e<16&&(e=m.alloc(e,0),this._ghash.update(e))}this._called=!0;var t=this._mode.encrypt(this,i);return this._decrypt?this._ghash.update(i):this._ghash.update(t),this._len+=i.length,t},s.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var i=c(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(e,t){var r=0;e.length!==t.length&&r++;for(var o=Math.min(e.length,t.length),n=0;n16)throw new Error("unable to decrypt data");for(var n=-1;++n16)return r=this.cache.slice(0,16),this.cache=this.cache.slice(16),r}else if(this.cache.length>=16)return r=this.cache.slice(0,16),this.cache=this.cache.slice(16),r;return null},i.prototype.flush=function(){if(this.cache.length)return this.cache},T.createDecipher=function(t,r){var o=v[t.toLowerCase()];if(!o)throw new TypeError("invalid suite type");var n=l(r,!1,o.key,o.iv);return e(t,n.key,n.iv)},T.createDecipheriv=e},{"./aes":186,"./authCipher":187,"./modes":199,"./streamCipher":202,"cipher-base":218,evp_bytestokey:368,inherits:387,"safe-buffer":494}],190:[function(d,I,T){var b=d("./modes"),m=d("./authCipher"),v=d("safe-buffer").Buffer,h=d("./streamCipher"),p=d("cipher-base"),c=d("./aes"),l=d("evp_bytestokey");function s(r,o,n){p.call(this),this._cache=new e,this._cipher=new c.AES(o),this._prev=v.from(n),this._mode=r,this._autopadding=!0}d("inherits")(s,p),s.prototype._update=function(r){var o,n;this._cache.add(r);for(var a=[];o=this._cache.get();)n=this._mode.encrypt(this,o),a.push(n);return v.concat(a)};var i=v.alloc(16,16);function e(){this.cache=v.allocUnsafe(0)}function t(r,o,n){var a=b[r.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if(typeof o=="string"&&(o=v.from(o)),o.length!==a.key/8)throw new TypeError("invalid key length "+o.length);if(typeof n=="string"&&(n=v.from(n)),a.mode!=="GCM"&&n.length!==a.iv)throw new TypeError("invalid iv length "+n.length);return a.type==="stream"?new h(a.module,o,n):a.type==="auth"?new m(a.module,o,n):new s(a.module,o,n)}s.prototype._final=function(){var r=this._cache.flush();if(this._autopadding)return r=this._mode.encrypt(this,r),this._cipher.scrub(),r;if(!r.equals(i))throw this._cipher.scrub(),new Error("data not multiple of block length")},s.prototype.setAutoPadding=function(r){return this._autopadding=!!r,this},e.prototype.add=function(r){this.cache=v.concat([this.cache,r])},e.prototype.get=function(){if(this.cache.length>15){var r=this.cache.slice(0,16);return this.cache=this.cache.slice(16),r}return null},e.prototype.flush=function(){for(var r=16-this.cache.length,o=v.allocUnsafe(r),n=-1;++n>>0,0),c.writeUInt32BE(p[1]>>>0,4),c.writeUInt32BE(p[2]>>>0,8),c.writeUInt32BE(p[3]>>>0,12),c}function h(p){this.h=p,this.state=b.alloc(16,0),this.cache=b.allocUnsafe(0)}h.prototype.ghash=function(p){for(var c=-1;++c0;c--)s[c]=s[c]>>>1|(1&s[c-1])<<31;s[0]=s[0]>>>1,l&&(s[0]=s[0]^225<<24)}this.state=v(i)},h.prototype.update=function(p){var c;for(this.cache=b.concat([this.cache,p]);this.cache.length>=16;)c=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(c)},h.prototype.final=function(p,c){return this.cache.length&&this.ghash(b.concat([this.cache,m],16)),this.ghash(v([0,p,0,c])),this.state},I.exports=h},{"safe-buffer":494}],192:[function(d,I,T){I.exports=function(b){for(var m,v=b.length;v--;){if((m=b.readUInt8(v))!==255){m++,b.writeUInt8(m,v);break}b.writeUInt8(0,v)}}},{}],193:[function(d,I,T){var b=d("buffer-xor");T.encrypt=function(m,v){var h=b(v,m._prev);return m._prev=m._cipher.encryptBlock(h),m._prev},T.decrypt=function(m,v){var h=m._prev;m._prev=v;var p=m._cipher.decryptBlock(v);return b(p,h)}},{"buffer-xor":217}],194:[function(d,I,T){var b=d("safe-buffer").Buffer,m=d("buffer-xor");function v(h,p,c){var l=p.length,s=m(p,h._cache);return h._cache=h._cache.slice(l),h._prev=b.concat([h._prev,c?p:s]),s}T.encrypt=function(h,p,c){for(var l,s=b.allocUnsafe(0);p.length;){if(h._cache.length===0&&(h._cache=h._cipher.encryptBlock(h._prev),h._prev=b.allocUnsafe(0)),!(h._cache.length<=p.length)){s=b.concat([s,v(h,p,c)]);break}l=h._cache.length,s=b.concat([s,v(h,p.slice(0,l),c)]),p=p.slice(l)}return s}},{"buffer-xor":217,"safe-buffer":494}],195:[function(d,I,T){var b=d("safe-buffer").Buffer;function m(h,p,c){for(var l,s,i=-1,e=0;++i<8;)l=p&1<<7-i?128:0,e+=(128&(s=h._cipher.encryptBlock(h._prev)[0]^l))>>i%8,h._prev=v(h._prev,c?l:s);return e}function v(h,p){var c=h.length,l=-1,s=b.allocUnsafe(h.length);for(h=b.concat([h,b.from([p])]);++l>7;return s}T.encrypt=function(h,p,c){for(var l=p.length,s=b.allocUnsafe(l),i=-1;++i=0||!s.umod(c.prime1)||!s.umod(c.prime2);)s=new m(v(l));return s}I.exports=h,h.getr=p}).call(this,d("buffer").Buffer)},{"bn.js":207,buffer:216,randombytes:475}],207:[function(d,I,T){arguments[4][181][0].apply(T,arguments)},{buffer:185,dup:181}],208:[function(d,I,T){I.exports=d("./browser/algorithms.json")},{"./browser/algorithms.json":209}],209:[function(d,I,T){I.exports={sha224WithRSAEncryption:{sign:"rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},"RSA-SHA224":{sign:"ecdsa/rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},sha256WithRSAEncryption:{sign:"rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},"RSA-SHA256":{sign:"ecdsa/rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},sha384WithRSAEncryption:{sign:"rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},"RSA-SHA384":{sign:"ecdsa/rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},sha512WithRSAEncryption:{sign:"rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA512":{sign:"ecdsa/rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA1":{sign:"rsa",hash:"sha1",id:"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{sign:"ecdsa",hash:"sha1",id:""},sha256:{sign:"ecdsa",hash:"sha256",id:""},sha224:{sign:"ecdsa",hash:"sha224",id:""},sha384:{sign:"ecdsa",hash:"sha384",id:""},sha512:{sign:"ecdsa",hash:"sha512",id:""},"DSA-SHA":{sign:"dsa",hash:"sha1",id:""},"DSA-SHA1":{sign:"dsa",hash:"sha1",id:""},DSA:{sign:"dsa",hash:"sha1",id:""},"DSA-WITH-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-WITH-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-WITH-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-WITH-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-RIPEMD160":{sign:"dsa",hash:"rmd160",id:""},ripemd160WithRSA:{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},"RSA-RIPEMD160":{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},md5WithRSAEncryption:{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"},"RSA-MD5":{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"}}},{}],210:[function(d,I,T){I.exports={"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}},{}],211:[function(d,I,T){var b=d("safe-buffer").Buffer,m=d("create-hash"),v=d("readable-stream"),h=d("inherits"),p=d("./sign"),c=d("./verify"),l=d("./algorithms.json");function s(r){v.Writable.call(this);var o=l[r];if(!o)throw new Error("Unknown message digest");this._hashType=o.hash,this._hash=m(o.hash),this._tag=o.id,this._signType=o.sign}function i(r){v.Writable.call(this);var o=l[r];if(!o)throw new Error("Unknown message digest");this._hash=m(o.hash),this._tag=o.id,this._signType=o.sign}function e(r){return new s(r)}function t(r){return new i(r)}Object.keys(l).forEach(function(r){l[r].id=b.from(l[r].id,"hex"),l[r.toLowerCase()]=l[r]}),h(s,v.Writable),s.prototype._write=function(r,o,n){this._hash.update(r),n()},s.prototype.update=function(r,o){return typeof r=="string"&&(r=b.from(r,o)),this._hash.update(r),this},s.prototype.sign=function(r,o){this.end();var n=this._hash.digest(),a=p(n,r,this._hashType,this._signType,this._tag);return o?a.toString(o):a},h(i,v.Writable),i.prototype._write=function(r,o,n){this._hash.update(r),n()},i.prototype.update=function(r,o){return typeof r=="string"&&(r=b.from(r,o)),this._hash.update(r),this},i.prototype.verify=function(r,o,n){typeof o=="string"&&(o=b.from(o,n)),this.end();var a=this._hash.digest();return c(o,a,r,this._signType,this._tag)},I.exports={Sign:e,Verify:t,createSign:e,createVerify:t}},{"./algorithms.json":209,"./sign":212,"./verify":213,"create-hash":331,inherits:387,"readable-stream":491,"safe-buffer":214}],212:[function(d,I,T){var b=d("safe-buffer").Buffer,m=d("create-hmac"),v=d("browserify-rsa"),h=d("elliptic").ec,p=d("bn.js"),c=d("parse-asn1"),l=d("./curves.json");function s(r,o,n,a){if((r=b.from(r.toArray())).length0&&n.ishrn(a),n}function e(r,o,n){var a,u;do{for(a=b.alloc(0);8*a.length=s)throw new Error("invalid sig")}I.exports=function(l,s,i,e,t){var r=h(i);if(r.type==="ec"){if(e!=="ecdsa"&&e!=="ecdsa/rsa")throw new Error("wrong public key type");return function(w,R,E){var M=p[E.data.algorithm.curve.join(".")];if(!M)throw new Error("unknown curve "+E.data.algorithm.curve.join("."));var O=new v(M),P=E.data.subjectPrivateKey.data;return O.verify(R,w,P)}(l,s,r)}if(r.type==="dsa"){if(e!=="dsa")throw new Error("wrong public key type");return function(w,R,E){var M=E.data.p,O=E.data.q,P=E.data.g,_=E.data.pub_key,S=h.signature.decode(w,"der"),g=S.s,j=S.r;c(g,O),c(j,O);var k=m.mont(M),x=g.invm(O);return P.toRed(k).redPow(new m(R).mul(x).mod(O)).fromRed().mul(_.toRed(k).redPow(j.mul(x).mod(O)).fromRed()).mod(M).mod(O).cmp(j)===0}(l,s,r)}if(e!=="rsa"&&e!=="ecdsa/rsa")throw new Error("wrong public key type");s=b.concat([t,s]);for(var o=r.modulus.byteLength(),n=[1],a=0;s.length+n.length+2 */var b=d("buffer"),m=b.Buffer;function v(p,c){for(var l in p)c[l]=p[l]}function h(p,c,l){return m(p,c,l)}m.from&&m.alloc&&m.allocUnsafe&&m.allocUnsafeSlow?I.exports=b:(v(b,T),T.Buffer=h),h.prototype=Object.create(m.prototype),v(m,h),h.from=function(p,c,l){if(typeof p=="number")throw new TypeError("Argument must not be a number");return m(p,c,l)},h.alloc=function(p,c,l){if(typeof p!="number")throw new TypeError("Argument must be a number");var s=m(p);return c!==void 0?typeof l=="string"?s.fill(c,l):s.fill(c):s.fill(0),s},h.allocUnsafe=function(p){if(typeof p!="number")throw new TypeError("Argument must be a number");return m(p)},h.allocUnsafeSlow=function(p){if(typeof p!="number")throw new TypeError("Argument must be a number");return b.SlowBuffer(p)}},{buffer:216}],215:[function(d,I,T){arguments[4][185][0].apply(T,arguments)},{dup:185}],216:[function(d,I,T){(function(c){function m(A){return(m=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(N){return typeof N}:function(N){return N&&typeof Symbol=="function"&&N.constructor===Symbol&&N!==Symbol.prototype?"symbol":typeof N})(A)}var v=d("base64-js"),h=d("ieee754");T.Buffer=c,T.SlowBuffer=function(A){return+A!=A&&(A=0),c.alloc(+A)},T.INSPECT_MAX_BYTES=50;function p(A){if(A>2147483647)throw new RangeError('The value "'+A+'" is invalid for option "size"');var N=new Uint8Array(A);return N.__proto__=c.prototype,N}function c(A,N,z){if(typeof A=="number"){if(typeof N=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return i(A)}return l(A,N,z)}function l(A,N,z){if(typeof A=="string")return function(K,ie){if(typeof ie=="string"&&ie!==""||(ie="utf8"),!c.isEncoding(ie))throw new TypeError("Unknown encoding: "+ie);var Q=0|r(K,ie),ue=p(Q),de=ue.write(K,ie);return de!==Q&&(ue=ue.slice(0,de)),ue}(A,N);if(ArrayBuffer.isView(A))return e(A);if(A==null)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+m(A));if($(A,ArrayBuffer)||A&&$(A.buffer,ArrayBuffer))return function(K,ie,Q){if(ie<0||K.byteLength=2147483647)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+2147483647 .toString(16)+" bytes");return 0|A}function r(A,N){if(c.isBuffer(A))return A.length;if(ArrayBuffer.isView(A)||$(A,ArrayBuffer))return A.byteLength;if(typeof A!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+m(A));var z=A.length,W=arguments.length>2&&arguments[2]===!0;if(!W&&z===0)return 0;for(var X=!1;;)switch(N){case"ascii":case"latin1":case"binary":return z;case"utf8":case"utf-8":return H(A).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*z;case"hex":return z>>>1;case"base64":return V(A).length;default:if(X)return W?-1:H(A).length;N=(""+N).toLowerCase(),X=!0}}function o(A,N,z){var W=!1;if((N===void 0||N<0)&&(N=0),N>this.length||((z===void 0||z>this.length)&&(z=this.length),z<=0)||(z>>>=0)<=(N>>>=0))return"";for(A||(A="utf8");;)switch(A){case"hex":return g(this,N,z);case"utf8":case"utf-8":return P(this,N,z);case"ascii":return _(this,N,z);case"latin1":case"binary":return S(this,N,z);case"base64":return O(this,N,z);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,N,z);default:if(W)throw new TypeError("Unknown encoding: "+A);A=(A+"").toLowerCase(),W=!0}}function n(A,N,z){var W=A[N];A[N]=A[z],A[z]=W}function a(A,N,z,W,X){if(A.length===0)return-1;if(typeof z=="string"?(W=z,z=0):z>2147483647?z=2147483647:z<-2147483648&&(z=-2147483648),L(z=+z)&&(z=X?0:A.length-1),z<0&&(z=A.length+z),z>=A.length){if(X)return-1;z=A.length-1}else if(z<0){if(!X)return-1;z=0}if(typeof N=="string"&&(N=c.from(N,W)),c.isBuffer(N))return N.length===0?-1:u(A,N,z,W,X);if(typeof N=="number")return N&=255,typeof Uint8Array.prototype.indexOf=="function"?X?Uint8Array.prototype.indexOf.call(A,N,z):Uint8Array.prototype.lastIndexOf.call(A,N,z):u(A,[N],z,W,X);throw new TypeError("val must be string, number or Buffer")}function u(A,N,z,W,X){var K,ie=1,Q=A.length,ue=N.length;if(W!==void 0&&((W=String(W).toLowerCase())==="ucs2"||W==="ucs-2"||W==="utf16le"||W==="utf-16le")){if(A.length<2||N.length<2)return-1;ie=2,Q/=2,ue/=2,z/=2}function de(ve,ke){return ie===1?ve[ke]:ve.readUInt16BE(ke*ie)}if(X){var ce=-1;for(K=z;KQ&&(z=Q-ue),K=z;K>=0;K--){for(var Ee=!0,_e=0;_eX&&(W=X):W=X;var K=N.length;W>K/2&&(W=K/2);for(var ie=0;ie>8,ue=ie%256,de.push(ue),de.push(Q);return de}(N,A.length-z),A,z,W)}function O(A,N,z){return N===0&&z===A.length?v.fromByteArray(A):v.fromByteArray(A.slice(N,z))}function P(A,N,z){z=Math.min(A.length,z);for(var W=[],X=N;X239?4:de>223?3:de>191?2:1;if(X+Ee<=z)switch(Ee){case 1:de<128&&(ce=de);break;case 2:(192&(K=A[X+1]))==128&&(ue=(31&de)<<6|63&K)>127&&(ce=ue);break;case 3:K=A[X+1],ie=A[X+2],(192&K)==128&&(192&ie)==128&&(ue=(15&de)<<12|(63&K)<<6|63&ie)>2047&&(ue<55296||ue>57343)&&(ce=ue);break;case 4:K=A[X+1],ie=A[X+2],Q=A[X+3],(192&K)==128&&(192&ie)==128&&(192&Q)==128&&(ue=(15&de)<<18|(63&K)<<12|(63&ie)<<6|63&Q)>65535&&ue<1114112&&(ce=ue)}ce===null?(ce=65533,Ee=1):ce>65535&&(ce-=65536,W.push(ce>>>10&1023|55296),ce=56320|1023&ce),W.push(ce),X+=Ee}return function(_e){var ve=_e.length;if(ve<=4096)return String.fromCharCode.apply(String,_e);for(var ke="",Re=0;Re"u"||typeof console.error!="function"||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}}),typeof Symbol<"u"&&Symbol.species!=null&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),c.poolSize=8192,c.from=function(A,N,z){return l(A,N,z)},c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array,c.alloc=function(A,N,z){return function(W,X,K){return s(W),W<=0?p(W):X!==void 0?typeof K=="string"?p(W).fill(X,K):p(W).fill(X):p(W)}(A,N,z)},c.allocUnsafe=function(A){return i(A)},c.allocUnsafeSlow=function(A){return i(A)},c.isBuffer=function(A){return A!=null&&A._isBuffer===!0&&A!==c.prototype},c.compare=function(A,N){if($(A,Uint8Array)&&(A=c.from(A,A.offset,A.byteLength)),$(N,Uint8Array)&&(N=c.from(N,N.offset,N.byteLength)),!c.isBuffer(A)||!c.isBuffer(N))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(A===N)return 0;for(var z=A.length,W=N.length,X=0,K=Math.min(z,W);XN&&(A+=" ... "),""},c.prototype.compare=function(A,N,z,W,X){if($(A,Uint8Array)&&(A=c.from(A,A.offset,A.byteLength)),!c.isBuffer(A))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+m(A));if(N===void 0&&(N=0),z===void 0&&(z=A?A.length:0),W===void 0&&(W=0),X===void 0&&(X=this.length),N<0||z>A.length||W<0||X>this.length)throw new RangeError("out of range index");if(W>=X&&N>=z)return 0;if(W>=X)return-1;if(N>=z)return 1;if(this===A)return 0;for(var K=(X>>>=0)-(W>>>=0),ie=(z>>>=0)-(N>>>=0),Q=Math.min(K,ie),ue=this.slice(W,X),de=A.slice(N,z),ce=0;ce>>=0,isFinite(z)?(z>>>=0,W===void 0&&(W="utf8")):(W=z,z=void 0)}var X=this.length-N;if((z===void 0||z>X)&&(z=X),A.length>0&&(z<0||N<0)||N>this.length)throw new RangeError("Attempt to write outside buffer bounds");W||(W="utf8");for(var K=!1;;)switch(W){case"hex":return f(this,A,N,z);case"utf8":case"utf-8":return y(this,A,N,z);case"ascii":return w(this,A,N,z);case"latin1":case"binary":return R(this,A,N,z);case"base64":return E(this,A,N,z);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,A,N,z);default:if(K)throw new TypeError("Unknown encoding: "+W);W=(""+W).toLowerCase(),K=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function _(A,N,z){var W="";z=Math.min(A.length,z);for(var X=N;XW)&&(z=W);for(var X="",K=N;Kz)throw new RangeError("Trying to access beyond buffer length")}function x(A,N,z,W,X,K){if(!c.isBuffer(A))throw new TypeError('"buffer" argument must be a Buffer instance');if(N>X||NA.length)throw new RangeError("Index out of range")}function C(A,N,z,W,X,K){if(z+W>A.length)throw new RangeError("Index out of range");if(z<0)throw new RangeError("Index out of range")}function D(A,N,z,W,X){return N=+N,z>>>=0,X||C(A,0,z,4),h.write(A,N,z,W,23,4),z+4}function F(A,N,z,W,X){return N=+N,z>>>=0,X||C(A,0,z,8),h.write(A,N,z,W,52,8),z+8}c.prototype.slice=function(A,N){var z=this.length;(A=~~A)<0?(A+=z)<0&&(A=0):A>z&&(A=z),(N=N===void 0?z:~~N)<0?(N+=z)<0&&(N=0):N>z&&(N=z),N>>=0,N>>>=0,z||k(A,N,this.length);for(var W=this[A],X=1,K=0;++K>>=0,N>>>=0,z||k(A,N,this.length);for(var W=this[A+--N],X=1;N>0&&(X*=256);)W+=this[A+--N]*X;return W},c.prototype.readUInt8=function(A,N){return A>>>=0,N||k(A,1,this.length),this[A]},c.prototype.readUInt16LE=function(A,N){return A>>>=0,N||k(A,2,this.length),this[A]|this[A+1]<<8},c.prototype.readUInt16BE=function(A,N){return A>>>=0,N||k(A,2,this.length),this[A]<<8|this[A+1]},c.prototype.readUInt32LE=function(A,N){return A>>>=0,N||k(A,4,this.length),(this[A]|this[A+1]<<8|this[A+2]<<16)+16777216*this[A+3]},c.prototype.readUInt32BE=function(A,N){return A>>>=0,N||k(A,4,this.length),16777216*this[A]+(this[A+1]<<16|this[A+2]<<8|this[A+3])},c.prototype.readIntLE=function(A,N,z){A>>>=0,N>>>=0,z||k(A,N,this.length);for(var W=this[A],X=1,K=0;++K=(X*=128)&&(W-=Math.pow(2,8*N)),W},c.prototype.readIntBE=function(A,N,z){A>>>=0,N>>>=0,z||k(A,N,this.length);for(var W=N,X=1,K=this[A+--W];W>0&&(X*=256);)K+=this[A+--W]*X;return K>=(X*=128)&&(K-=Math.pow(2,8*N)),K},c.prototype.readInt8=function(A,N){return A>>>=0,N||k(A,1,this.length),128&this[A]?-1*(255-this[A]+1):this[A]},c.prototype.readInt16LE=function(A,N){A>>>=0,N||k(A,2,this.length);var z=this[A]|this[A+1]<<8;return 32768&z?4294901760|z:z},c.prototype.readInt16BE=function(A,N){A>>>=0,N||k(A,2,this.length);var z=this[A+1]|this[A]<<8;return 32768&z?4294901760|z:z},c.prototype.readInt32LE=function(A,N){return A>>>=0,N||k(A,4,this.length),this[A]|this[A+1]<<8|this[A+2]<<16|this[A+3]<<24},c.prototype.readInt32BE=function(A,N){return A>>>=0,N||k(A,4,this.length),this[A]<<24|this[A+1]<<16|this[A+2]<<8|this[A+3]},c.prototype.readFloatLE=function(A,N){return A>>>=0,N||k(A,4,this.length),h.read(this,A,!0,23,4)},c.prototype.readFloatBE=function(A,N){return A>>>=0,N||k(A,4,this.length),h.read(this,A,!1,23,4)},c.prototype.readDoubleLE=function(A,N){return A>>>=0,N||k(A,8,this.length),h.read(this,A,!0,52,8)},c.prototype.readDoubleBE=function(A,N){return A>>>=0,N||k(A,8,this.length),h.read(this,A,!1,52,8)},c.prototype.writeUIntLE=function(A,N,z,W){A=+A,N>>>=0,z>>>=0,W||x(this,A,N,z,Math.pow(2,8*z)-1,0);var X=1,K=0;for(this[N]=255&A;++K>>=0,z>>>=0,W||x(this,A,N,z,Math.pow(2,8*z)-1,0);var X=z-1,K=1;for(this[N+X]=255&A;--X>=0&&(K*=256);)this[N+X]=A/K&255;return N+z},c.prototype.writeUInt8=function(A,N,z){return A=+A,N>>>=0,z||x(this,A,N,1,255,0),this[N]=255&A,N+1},c.prototype.writeUInt16LE=function(A,N,z){return A=+A,N>>>=0,z||x(this,A,N,2,65535,0),this[N]=255&A,this[N+1]=A>>>8,N+2},c.prototype.writeUInt16BE=function(A,N,z){return A=+A,N>>>=0,z||x(this,A,N,2,65535,0),this[N]=A>>>8,this[N+1]=255&A,N+2},c.prototype.writeUInt32LE=function(A,N,z){return A=+A,N>>>=0,z||x(this,A,N,4,4294967295,0),this[N+3]=A>>>24,this[N+2]=A>>>16,this[N+1]=A>>>8,this[N]=255&A,N+4},c.prototype.writeUInt32BE=function(A,N,z){return A=+A,N>>>=0,z||x(this,A,N,4,4294967295,0),this[N]=A>>>24,this[N+1]=A>>>16,this[N+2]=A>>>8,this[N+3]=255&A,N+4},c.prototype.writeIntLE=function(A,N,z,W){if(A=+A,N>>>=0,!W){var X=Math.pow(2,8*z-1);x(this,A,N,z,X-1,-X)}var K=0,ie=1,Q=0;for(this[N]=255&A;++K>0)-Q&255;return N+z},c.prototype.writeIntBE=function(A,N,z,W){if(A=+A,N>>>=0,!W){var X=Math.pow(2,8*z-1);x(this,A,N,z,X-1,-X)}var K=z-1,ie=1,Q=0;for(this[N+K]=255&A;--K>=0&&(ie*=256);)A<0&&Q===0&&this[N+K+1]!==0&&(Q=1),this[N+K]=(A/ie>>0)-Q&255;return N+z},c.prototype.writeInt8=function(A,N,z){return A=+A,N>>>=0,z||x(this,A,N,1,127,-128),A<0&&(A=255+A+1),this[N]=255&A,N+1},c.prototype.writeInt16LE=function(A,N,z){return A=+A,N>>>=0,z||x(this,A,N,2,32767,-32768),this[N]=255&A,this[N+1]=A>>>8,N+2},c.prototype.writeInt16BE=function(A,N,z){return A=+A,N>>>=0,z||x(this,A,N,2,32767,-32768),this[N]=A>>>8,this[N+1]=255&A,N+2},c.prototype.writeInt32LE=function(A,N,z){return A=+A,N>>>=0,z||x(this,A,N,4,2147483647,-2147483648),this[N]=255&A,this[N+1]=A>>>8,this[N+2]=A>>>16,this[N+3]=A>>>24,N+4},c.prototype.writeInt32BE=function(A,N,z){return A=+A,N>>>=0,z||x(this,A,N,4,2147483647,-2147483648),A<0&&(A=4294967295+A+1),this[N]=A>>>24,this[N+1]=A>>>16,this[N+2]=A>>>8,this[N+3]=255&A,N+4},c.prototype.writeFloatLE=function(A,N,z){return D(this,A,N,!0,z)},c.prototype.writeFloatBE=function(A,N,z){return D(this,A,N,!1,z)},c.prototype.writeDoubleLE=function(A,N,z){return F(this,A,N,!0,z)},c.prototype.writeDoubleBE=function(A,N,z){return F(this,A,N,!1,z)},c.prototype.copy=function(A,N,z,W){if(!c.isBuffer(A))throw new TypeError("argument should be a Buffer");if(z||(z=0),W||W===0||(W=this.length),N>=A.length&&(N=A.length),N||(N=0),W>0&&W=this.length)throw new RangeError("Index out of range");if(W<0)throw new RangeError("sourceEnd out of bounds");W>this.length&&(W=this.length),A.length-N=0;--K)A[K+N]=this[K+z];else Uint8Array.prototype.set.call(A,this.subarray(z,W),N);return X},c.prototype.fill=function(A,N,z,W){if(typeof A=="string"){if(typeof N=="string"?(W=N,N=0,z=this.length):typeof z=="string"&&(W=z,z=this.length),W!==void 0&&typeof W!="string")throw new TypeError("encoding must be a string");if(typeof W=="string"&&!c.isEncoding(W))throw new TypeError("Unknown encoding: "+W);if(A.length===1){var X=A.charCodeAt(0);(W==="utf8"&&X<128||W==="latin1")&&(A=X)}}else typeof A=="number"&&(A&=255);if(N<0||this.length>>=0,z=z===void 0?this.length:z>>>0,A||(A=0),typeof A=="number")for(K=N;K55295&&z<57344){if(!X){if(z>56319){(N-=3)>-1&&K.push(239,191,189);continue}if(ie+1===W){(N-=3)>-1&&K.push(239,191,189);continue}X=z;continue}if(z<56320){(N-=3)>-1&&K.push(239,191,189),X=z;continue}z=65536+(X-55296<<10|z-56320)}else X&&(N-=3)>-1&&K.push(239,191,189);if(X=null,z<128){if((N-=1)<0)break;K.push(z)}else if(z<2048){if((N-=2)<0)break;K.push(z>>6|192,63&z|128)}else if(z<65536){if((N-=3)<0)break;K.push(z>>12|224,z>>6&63|128,63&z|128)}else{if(!(z<1114112))throw new Error("Invalid code point");if((N-=4)<0)break;K.push(z>>18|240,z>>12&63|128,z>>6&63|128,63&z|128)}}return K}function V(A){return v.toByteArray(function(N){if((N=(N=N.split("=")[0]).trim().replace(B,"")).length<2)return"";for(;N.length%4!=0;)N+="=";return N}(A))}function q(A,N,z,W){for(var X=0;X=N.length||X>=A.length);++X)N[X+z]=A[X];return X}function $(A,N){return A instanceof N||A!=null&&A.constructor!=null&&A.constructor.name!=null&&A.constructor.name===N.name}function L(A){return A!=A}}).call(this,d("buffer").Buffer)},{"base64-js":182,buffer:216,ieee754:385}],217:[function(d,I,T){(function(b){I.exports=function(m,v){for(var h=Math.min(m.length,v.length),p=new b(h),c=0;cr;)if((i=e[r++])!=i)return!0}else for(;t>r;r++)if((p||r in e)&&e[r]===l)return p||r||0;return!p&&-1}};I.exports={includes:h(!0),indexOf:h(!1)}},{"../internals/to-absolute-index":304,"../internals/to-indexed-object":305,"../internals/to-length":307}],225:[function(d,I,T){var b=d("../internals/function-bind-context"),m=d("../internals/indexed-object"),v=d("../internals/to-object"),h=d("../internals/to-length"),p=d("../internals/array-species-create"),c=[].push,l=function(s){var i=s==1,e=s==2,t=s==3,r=s==4,o=s==6,n=s==5||o;return function(a,u,f,y){for(var w,R,E=v(a),M=m(E),O=b(u,f,3),P=h(M.length),_=0,S=y||p,g=i?S(a,P):e?S(a,0):void 0;P>_;_++)if((n||_ in M)&&(R=O(w=M[_],_,E),s)){if(i)g[_]=R;else if(R)switch(s){case 3:return!0;case 5:return w;case 6:return _;case 2:c.call(g,w)}else if(r)return!1}return o?-1:t||r?r:g}};I.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6)}},{"../internals/array-species-create":227,"../internals/function-bind-context":248,"../internals/indexed-object":257,"../internals/to-length":307,"../internals/to-object":308}],226:[function(d,I,T){var b=d("../internals/descriptors"),m=d("../internals/fails"),v=d("../internals/has"),h=Object.defineProperty,p={},c=function(l){throw l};I.exports=function(l,s){if(v(p,l))return p[l];s||(s={});var i=[][l],e=!!v(s,"ACCESSORS")&&s.ACCESSORS,t=v(s,0)?s[0]:c,r=v(s,1)?s[1]:void 0;return p[l]=!!i&&!m(function(){if(e&&!b)return!0;var o={length:-1};e?h(o,1,{enumerable:!0,get:c}):o[1]=1,i.call(o,t,r)})}},{"../internals/descriptors":240,"../internals/fails":247,"../internals/has":252}],227:[function(d,I,T){var b=d("../internals/is-object"),m=d("../internals/is-array"),v=d("../internals/well-known-symbol")("species");I.exports=function(h,p){var c;return m(h)&&(typeof(c=h.constructor)!="function"||c!==Array&&!m(c.prototype)?b(c)&&(c=c[v])===null&&(c=void 0):c=void 0),new(c===void 0?Array:c)(p===0?0:p)}},{"../internals/is-array":261,"../internals/is-object":263,"../internals/well-known-symbol":314}],228:[function(d,I,T){var b=d("../internals/an-object");I.exports=function(m,v,h,p){try{return p?v(b(h)[0],h[1]):v(h)}catch(l){var c=m.return;throw c!==void 0&&b(c.call(m)),l}}},{"../internals/an-object":223}],229:[function(d,I,T){var b=d("../internals/well-known-symbol")("iterator"),m=!1;try{var v=0,h={next:function(){return{done:!!v++}},return:function(){m=!0}};h[b]=function(){return this},Array.from(h,function(){throw 2})}catch{}I.exports=function(p,c){if(!c&&!m)return!1;var l=!1;try{var s={};s[b]=function(){return{next:function(){return{done:l=!0}}}},p(s)}catch{}return l}},{"../internals/well-known-symbol":314}],230:[function(d,I,T){var b={}.toString;I.exports=function(m){return b.call(m).slice(8,-1)}},{}],231:[function(d,I,T){var b=d("../internals/to-string-tag-support"),m=d("../internals/classof-raw"),v=d("../internals/well-known-symbol")("toStringTag"),h=m(function(){return arguments}())=="Arguments";I.exports=b?m:function(p){var c,l,s;return p===void 0?"Undefined":p===null?"Null":typeof(l=function(i,e){try{return i[e]}catch{}}(c=Object(p),v))=="string"?l:h?m(c):(s=m(c))=="Object"&&typeof c.callee=="function"?"Arguments":s}},{"../internals/classof-raw":230,"../internals/to-string-tag-support":310,"../internals/well-known-symbol":314}],232:[function(d,I,T){var b=d("../internals/has"),m=d("../internals/own-keys"),v=d("../internals/object-get-own-property-descriptor"),h=d("../internals/object-define-property");I.exports=function(p,c){for(var l=m(c),s=h.f,i=v.f,e=0;e=74)&&(b=h.match(/Chrome\/(\d+)/))&&(m=b[1]),I.exports=m&&+m},{"../internals/engine-user-agent":243,"../internals/global":251}],245:[function(d,I,T){I.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},{}],246:[function(d,I,T){var b=d("../internals/global"),m=d("../internals/object-get-own-property-descriptor").f,v=d("../internals/create-non-enumerable-property"),h=d("../internals/redefine"),p=d("../internals/set-global"),c=d("../internals/copy-constructor-properties"),l=d("../internals/is-forced");I.exports=function(s,i){var e,t,r,o,n,a=s.target,u=s.global,f=s.stat;if(e=u?b:f?b[a]||p(a,{}):(b[a]||{}).prototype)for(t in i){if(o=i[t],r=s.noTargetGet?(n=m(e,t))&&n.value:e[t],!l(u?t:a+(f?".":"#")+t,s.forced)&&r!==void 0){if(typeof o==typeof r)continue;c(o,r)}(s.sham||r&&r.sham)&&v(o,"sham",!0),h(e,t,o,s)}}},{"../internals/copy-constructor-properties":232,"../internals/create-non-enumerable-property":236,"../internals/global":251,"../internals/is-forced":262,"../internals/object-get-own-property-descriptor":279,"../internals/redefine":294,"../internals/set-global":296}],247:[function(d,I,T){I.exports=function(b){try{return!!b()}catch{return!0}}},{}],248:[function(d,I,T){var b=d("../internals/a-function");I.exports=function(m,v,h){if(b(m),v===void 0)return m;switch(h){case 0:return function(){return m.call(v)};case 1:return function(p){return m.call(v,p)};case 2:return function(p,c){return m.call(v,p,c)};case 3:return function(p,c,l){return m.call(v,p,c,l)}}return function(){return m.apply(v,arguments)}}},{"../internals/a-function":219}],249:[function(d,I,T){var b=d("../internals/path"),m=d("../internals/global"),v=function(h){return typeof h=="function"?h:void 0};I.exports=function(h,p){return arguments.length<2?v(b[h])||v(m[h]):b[h]&&b[h][p]||m[h]&&m[h][p]}},{"../internals/global":251,"../internals/path":290}],250:[function(d,I,T){var b=d("../internals/classof"),m=d("../internals/iterators"),v=d("../internals/well-known-symbol")("iterator");I.exports=function(h){if(h!=null)return h[v]||h["@@iterator"]||m[b(h)]}},{"../internals/classof":231,"../internals/iterators":268,"../internals/well-known-symbol":314}],251:[function(d,I,T){(function(b){var m=function(v){return v&&v.Math==Math&&v};I.exports=m(typeof globalThis=="object"&&globalThis)||m(typeof window=="object"&&window)||m(typeof self=="object"&&self)||m(typeof b=="object"&&b)||Function("return this")()}).call(this,typeof Qe<"u"?Qe:typeof self<"u"?self:typeof window<"u"?window:{})},{}],252:[function(d,I,T){var b={}.hasOwnProperty;I.exports=function(m,v){return b.call(m,v)}},{}],253:[function(d,I,T){I.exports={}},{}],254:[function(d,I,T){var b=d("../internals/global");I.exports=function(m,v){var h=b.console;h&&h.error&&(arguments.length===1?h.error(m):h.error(m,v))}},{"../internals/global":251}],255:[function(d,I,T){var b=d("../internals/get-built-in");I.exports=b("document","documentElement")},{"../internals/get-built-in":249}],256:[function(d,I,T){var b=d("../internals/descriptors"),m=d("../internals/fails"),v=d("../internals/document-create-element");I.exports=!b&&!m(function(){return Object.defineProperty(v("div"),"a",{get:function(){return 7}}).a!=7})},{"../internals/descriptors":240,"../internals/document-create-element":241,"../internals/fails":247}],257:[function(d,I,T){var b=d("../internals/fails"),m=d("../internals/classof-raw"),v="".split;I.exports=b(function(){return!Object("z").propertyIsEnumerable(0)})?function(h){return m(h)=="String"?v.call(h,""):Object(h)}:Object},{"../internals/classof-raw":230,"../internals/fails":247}],258:[function(d,I,T){var b=d("../internals/shared-store"),m=Function.toString;typeof b.inspectSource!="function"&&(b.inspectSource=function(v){return m.call(v)}),I.exports=b.inspectSource},{"../internals/shared-store":300}],259:[function(d,I,T){var b,m,v,h=d("../internals/native-weak-map"),p=d("../internals/global"),c=d("../internals/is-object"),l=d("../internals/create-non-enumerable-property"),s=d("../internals/has"),i=d("../internals/shared-key"),e=d("../internals/hidden-keys"),t=p.WeakMap;if(h){var r=new t,o=r.get,n=r.has,a=r.set;b=function(f,y){return a.call(r,f,y),y},m=function(f){return o.call(r,f)||{}},v=function(f){return n.call(r,f)}}else{var u=i("state");e[u]=!0,b=function(f,y){return l(f,u,y),y},m=function(f){return s(f,u)?f[u]:{}},v=function(f){return s(f,u)}}I.exports={set:b,get:m,has:v,enforce:function(f){return v(f)?m(f):b(f,{})},getterFor:function(f){return function(y){var w;if(!c(y)||(w=m(y)).type!==f)throw TypeError("Incompatible receiver, "+f+" required");return w}}}},{"../internals/create-non-enumerable-property":236,"../internals/global":251,"../internals/has":252,"../internals/hidden-keys":253,"../internals/is-object":263,"../internals/native-weak-map":272,"../internals/shared-key":299}],260:[function(d,I,T){var b=d("../internals/well-known-symbol"),m=d("../internals/iterators"),v=b("iterator"),h=Array.prototype;I.exports=function(p){return p!==void 0&&(m.Array===p||h[v]===p)}},{"../internals/iterators":268,"../internals/well-known-symbol":314}],261:[function(d,I,T){var b=d("../internals/classof-raw");I.exports=Array.isArray||function(m){return b(m)=="Array"}},{"../internals/classof-raw":230}],262:[function(d,I,T){var b=d("../internals/fails"),m=/#|\.prototype\./,v=function(s,i){var e=p[h(s)];return e==l||e!=c&&(typeof i=="function"?b(i):!!i)},h=v.normalize=function(s){return String(s).replace(m,".").toLowerCase()},p=v.data={},c=v.NATIVE="N",l=v.POLYFILL="P";I.exports=v},{"../internals/fails":247}],263:[function(d,I,T){I.exports=function(b){return typeof b=="object"?b!==null:typeof b=="function"}},{}],264:[function(d,I,T){I.exports=!1},{}],265:[function(d,I,T){var b=d("../internals/is-object"),m=d("../internals/classof-raw"),v=d("../internals/well-known-symbol")("match");I.exports=function(h){var p;return b(h)&&((p=h[v])!==void 0?!!p:m(h)=="RegExp")}},{"../internals/classof-raw":230,"../internals/is-object":263,"../internals/well-known-symbol":314}],266:[function(d,I,T){var b=d("../internals/an-object"),m=d("../internals/is-array-iterator-method"),v=d("../internals/to-length"),h=d("../internals/function-bind-context"),p=d("../internals/get-iterator-method"),c=d("../internals/call-with-safe-iteration-closing"),l=function(s,i){this.stopped=s,this.result=i};(I.exports=function(s,i,e,t,r){var o,n,a,u,f,y,w,R=h(i,e,t?2:1);if(r)o=s;else{if(typeof(n=p(s))!="function")throw TypeError("Target is not iterable");if(m(n)){for(a=0,u=v(s.length);u>a;a++)if((f=t?R(b(w=s[a])[0],w[1]):R(s[a]))&&f instanceof l)return f;return new l(!1)}o=n.call(s)}for(y=o.next;!(w=y.call(o)).done;)if(typeof(f=c(o,R,w.value,t))=="object"&&f&&f instanceof l)return f;return new l(!1)}).stop=function(s){return new l(!0,s)}},{"../internals/an-object":223,"../internals/call-with-safe-iteration-closing":228,"../internals/function-bind-context":248,"../internals/get-iterator-method":250,"../internals/is-array-iterator-method":260,"../internals/to-length":307}],267:[function(d,I,T){var b,m,v,h=d("../internals/object-get-prototype-of"),p=d("../internals/create-non-enumerable-property"),c=d("../internals/has"),l=d("../internals/well-known-symbol"),s=d("../internals/is-pure"),i=l("iterator"),e=!1;[].keys&&("next"in(v=[].keys())?(m=h(h(v)))!==Object.prototype&&(b=m):e=!0),b==null&&(b={}),s||c(b,i)||p(b,i,function(){return this}),I.exports={IteratorPrototype:b,BUGGY_SAFARI_ITERATORS:e}},{"../internals/create-non-enumerable-property":236,"../internals/has":252,"../internals/is-pure":264,"../internals/object-get-prototype-of":283,"../internals/well-known-symbol":314}],268:[function(d,I,T){arguments[4][253][0].apply(T,arguments)},{dup:253}],269:[function(d,I,T){var b,m,v,h,p,c,l,s,i=d("../internals/global"),e=d("../internals/object-get-own-property-descriptor").f,t=d("../internals/classof-raw"),r=d("../internals/task").set,o=d("../internals/engine-is-ios"),n=i.MutationObserver||i.WebKitMutationObserver,a=i.process,u=i.Promise,f=t(a)=="process",y=e(i,"queueMicrotask"),w=y&&y.value;w||(b=function(){var R,E;for(f&&(R=a.domain)&&R.exit();m;){E=m.fn,m=m.next;try{E()}catch(M){throw m?h():v=void 0,M}}v=void 0,R&&R.enter()},f?h=function(){a.nextTick(b)}:n&&!o?(p=!0,c=document.createTextNode(""),new n(b).observe(c,{characterData:!0}),h=function(){c.data=p=!p}):u&&u.resolve?(l=u.resolve(void 0),s=l.then,h=function(){s.call(l,b)}):h=function(){r.call(i,b)}),I.exports=w||function(R){var E={fn:R,next:void 0};v&&(v.next=E),m||(m=E,h()),v=E}},{"../internals/classof-raw":230,"../internals/engine-is-ios":242,"../internals/global":251,"../internals/object-get-own-property-descriptor":279,"../internals/task":303}],270:[function(d,I,T){var b=d("../internals/global");I.exports=b.Promise},{"../internals/global":251}],271:[function(d,I,T){var b=d("../internals/fails");I.exports=!!Object.getOwnPropertySymbols&&!b(function(){return!String(Symbol())})},{"../internals/fails":247}],272:[function(d,I,T){var b=d("../internals/global"),m=d("../internals/inspect-source"),v=b.WeakMap;I.exports=typeof v=="function"&&/native code/.test(m(v))},{"../internals/global":251,"../internals/inspect-source":258}],273:[function(d,I,T){var b=d("../internals/a-function"),m=function(v){var h,p;this.promise=new v(function(c,l){if(h!==void 0||p!==void 0)throw TypeError("Bad Promise constructor");h=c,p=l}),this.resolve=b(h),this.reject=b(p)};I.exports.f=function(v){return new m(v)}},{"../internals/a-function":219}],274:[function(d,I,T){var b=d("../internals/is-regexp");I.exports=function(m){if(b(m))throw TypeError("The method doesn't accept regular expressions");return m}},{"../internals/is-regexp":265}],275:[function(d,I,T){var b=d("../internals/descriptors"),m=d("../internals/fails"),v=d("../internals/object-keys"),h=d("../internals/object-get-own-property-symbols"),p=d("../internals/object-property-is-enumerable"),c=d("../internals/to-object"),l=d("../internals/indexed-object"),s=Object.assign,i=Object.defineProperty;I.exports=!s||m(function(){if(b&&s({b:1},s(i({},"a",{enumerable:!0,get:function(){i(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var e={},t={},r=Symbol();return e[r]=7,"abcdefghijklmnopqrst".split("").forEach(function(o){t[o]=o}),s({},e)[r]!=7||v(s({},t)).join("")!="abcdefghijklmnopqrst"})?function(e,t){for(var r=c(e),o=arguments.length,n=1,a=h.f,u=p.f;o>n;)for(var f,y=l(arguments[n++]),w=a?v(y).concat(a(y)):v(y),R=w.length,E=0;R>E;)f=w[E++],b&&!u.call(y,f)||(r[f]=y[f]);return r}:s},{"../internals/descriptors":240,"../internals/fails":247,"../internals/indexed-object":257,"../internals/object-get-own-property-symbols":282,"../internals/object-keys":285,"../internals/object-property-is-enumerable":286,"../internals/to-object":308}],276:[function(d,I,T){var b,m=d("../internals/an-object"),v=d("../internals/object-define-properties"),h=d("../internals/enum-bug-keys"),p=d("../internals/hidden-keys"),c=d("../internals/html"),l=d("../internals/document-create-element"),s=d("../internals/shared-key"),i=s("IE_PROTO"),e=function(){},t=function(o){return"