{"version":3,"sources":["../node_modules/xlsx/xlsx.mjs"],"names":["XLSX","current_codepage","current_ansi","VALID_ANSI","CS2CP","set_ansi","cp","indexOf","set_cp","reset_cp","char_codes","data","o","i","len","length","charCodeAt","utf16beread","String","fromCharCode","join","$cptable","debom","c1","c2","utf16leread","slice","_getchar","x","_getansi","Base64_map","Base64_encode","input","c3","e1","e2","e3","e4","isNaN","charAt","Base64_decode","replace","has_buf","Buffer","process","versions","node","Buffer_from","nbfs","from","e","buf","enc","bind","new_raw_buf","alloc","Uint8Array","Array","new_unsafe_buf","allocUnsafe","s2a","s","split","map","a2s","isArray","c","ab2a","ArrayBuffer","Error","bconcat","bufs","concat","isBuffer","maxlen","set","apply","call","chr0","chr1","_strrev","pad0","v","d","t","fill","pad_","rpad_","p2_32","Math","pow","pad0r","round","pad0r1","pad0r2","SSF_isgeneral","days","months","table_fmt","SSF_default_map","SSF_default_str","SSF_frac","D","mixed","sgn","B","P_2","P_1","P","Q_2","Q_1","Q","A","floor","q","SSF_parse_date_code","opts","b2","date","time","dow","dout","out","T","u","y","m","H","M","S","abs","date1904","Date","setDate","getDate","getFullYear","getMonth","getDay","SSF_fix_hijri","SSFbasedate","SSFdnthresh","getTime","SSFbase1904","datenum_local","epoch","getTimezoneOffset","SSF_strip_decimal","SSF_general_num","V","log","LOG10E","toPrecision","w","toFixed","toExponential","SSF_small_exp","substr","SSF_large_exp","SSF_normalize_exp","toUpperCase","SSF_general","toString","SSF_format","SSF_write_date","type","fmt","val","ss0","ss","tt","outl","commaify","j","pct1","write_num_exp","idx","match","period","ee","fakee","$$","$1","$2","$3","frac1","dec1","closeparen","phone","hashq","str","cc","rnd","dd","dec","_frac","write_num_flt","ffmt","write_num","write_num_cm","sfmt","mul","write_num_pct","r","ri","ff","aval","sign","den","parseInt","rr","base","myn","myd","write_num_f1","carry","oa","min","max","lres","rres","flr","write_num_exp2","write_num_int","write_num_cm2","write_num_pct2","write_num_f2","lastIndexOf","SSF_abstime","fmt_is_date","cfregex2","chkcond","thresh","parseFloat","choose_fmt","f","in_str","SSF_split_fmt","l","lat","m1","m2","dateNF","table","flen","dt","lst","hr","toLowerCase","ssm","bt","jj","nstr","myv","ostr","vv","decpt","lasti","retval","eval_fmt","SSF_load","undefined","make_ssf","SSFImplicit","dateNFregex","CRC32","version","T0","n","Int32Array","signed_crc_table","TT","subarray","slice_by_16_tables","T1","T2","T3","T4","T5","T6","T7","T8","T9","Ta","Tb","Tc","Td","Te","Tf","bstr","seed","C","L","CFB","fs","exports","dirname","p","filename","write_dos_date","hms","getHours","getMinutes","getSeconds","write_shift","ymd","parse_extra_field","blob","prep_blob","flags","read_shift","sz","tgt","mtime","atime","ctime","mt","get_fs","parse","file","options","parse_zip","root","di","row","test","mboundary","boundary","FileIndex","FullPaths","init_cfb","start_di","fcnt","line","parse_mime","parse_mad","mver","nmfs","difat_sec_cnt","dir_start","minifat_start","difat_start","ssz","fat_addrs","mv","chk","HEADER_SIGNATURE","check_get_mver","header","shift","check_shifts","dir_cnt","sectors","nsectors","ceil","sectorify","sleuth_fat","sector_list","sl","chkd","buf_chain","modulus","k","seen","push","addr","__readInt32LE","nodes","__toBuffer","make_sector_list","name","ENDOFCHAIN","Paths","files","mini","minifat_store","pl","sector","namelen","__utf16le","color","R","clsid","state","start","size","ct","read_date","storage","get_sector_list","content","get_mfat_entry","read_directory","FI","FP","dad","build_full_paths","raw","entry","payload","MSSZ","new_buf","cnt","offset","__readUInt32LE","cfb","CLSID","nm","find","rebuild_cfb","seed_cfb","gc","_file","pop","now","fullPaths","Object","create","HEADER_CLSID","sort","Z","namecmp","elt","_write","_opts","fileType","fp","fi","ca","cstr","dispcnt","csl","qp","get_content_type","write_quoted_printable","write_base64_76","write_mad","cdirs","method","compression","start_cd","crcs","sz_cd","namebuf","outbuf","_deflateRawSync","write_zip","mini_size","fat_size","mfat_cnt","fat_base","fat_cnt","difat_cnt","HEADER_SIG","chainit","consts","DIFSECT","FATSECT","_nm","copy","_zlib","MAXREGSECT","FREESECT","HEADER_MINOR_VERSION","MAXREGSID","NOSTREAM","EntryTypes","deflateRawSync","_deflate","CLEN_ORDER","LEN_LN","DST_LN","bit_swap_8","use_typed_arrays","bitswap8","bit_swap_n","b","rev","read_bits_2","bl","h","read_bits_3","read_bits_5","read_bits_7","read_bits_n","write_bits_3","write_bits_1","write_bits_8","write_bits_16","realloc","a","zero_fill_array","build_tree","clens","cmap","MAX","ccode","bl_count","Uint16Array","ctree","cleni","fix_lmap","fix_dmap","dlens","_deflateRaw","DST_LN_RE","LEN_LN_RE","boff","write_stored","addrs","hash","mlen","len_eb","dst_eb","write_huff_fixed","off","dyn_lmap","dyn_dmap","dyn_cmap","dyn_len_1","dyn_len_2","dyn","_HLIT","_HDIST","_HCLEN","read_bits_4","next_code","hcodes","h1","h2","_inflate","usz","woff","OL","max_len_1","max_len_2","bits","code","dst","inflate","warn_or_throw","wrn","msg","console","error","csz","efsz","fcsz","EF","parse_local_file","meth","setMilliseconds","setFullYear","setMonth","setHours","setMinutes","setSeconds","parse_dos_date","_csz","_usz","ef","InflRaw","InflateRaw","_processChunk","_finishFlushFlag","bytesRead","_inflateRawSync","cfb_add","unsafe","ContentTypeMap","ctype","ext","text","encoded","si","end","tmp","fdata","fname","cte","trim","oi","parse_quoted_printable","fpath","utils","cfb_gc","path","UCFullPaths","UCPaths","UCPath","read","readFileSync","read_file","write","writeFileSync","writeFile","cfb_new","cfb_del","splice","cfb_mov","old_name","new_name","ReadShift","CheckField","use_zlib","zlib","message","_inflateRaw","_fs","keys","ks","o2","prototype","hasOwnProperty","evert","obj","K","basedate","datenum","refdate","dnthresh","refoffset","numdate","setTime","parse_isodur","sec","good_pd_date_1","good_pd_date","good_pd","parseDate","fixdate","cc2str","arr","debomit","utf8write","TextDecoder","decode","dup","JSON","stringify","fuzzynum","Number","isFinite","NaN","wt","lower_months","fuzzydate","getYear","lower","split_regex","safe_split_regex","re","def","getdatastr","asNodeBuffer","asBinary","_data","getContent","getdatabin","safegetzipfile","zip","g","getzipfile","getzipdata","safe","getzipstr","getzipbin","zipentries","zip_add_file","res","widx","ridx","utf8decode","zip_read","resolve_path","result","target","step","XML_HEADER","attregexg","tagregex1","tagregex","nsregex","nsregex2","parsexmltag","tag","skip_root","skip_LC","z","eq","quot","strip_ns","encodings","rencoding","unescapexml","encregex","coderegex","decregex","htmlcharegex","escapehtml","xlml_fixstr","entregex","entrepl","parsexmlbool","value","utf8reada","orig","utf8readb","ww","utf8readc","utf8corpus","utf8read","matchtag","mtcache","RegExp","htmldecode","entities","vtregex","vt_cache","vtvregex","vtmregex","parseVector","matches","baseType","WTF","forEach","wtregex","wxt_helper","writextag","xlml_normalize","xlmlregex","XMLNS","XMLNS_main","___toBuffer","___utf16le","__readUInt16LE","___hexlify","__hexlify","___utf8","__readUInt8","__utf8","___lpstr","__lpstr","___cpstr","__cpstr","___lpwstr","__lpwstr","___lpp4","__lpp4","___8lpp4","__8lpp4","___double","Infinity","read_double_le","__double","is_buf","cpdoit","readUInt32LE","readDoubleLE","__readInt16LE","__readInt32BE","oI","oR","loc","oo","this","lens","__writeUInt16LE","WriteShift","cppayload","encode","__writeUInt32LE","bs","av","LN2","write_double_le","__writeInt32LE","hexstr","fld","pos","parsenoop","recordhopper","cb","tmpbyte","cntbyte","RT","XLSBRecordEnum","buf_array","blksz","newblk","curbuf","endbuf","next","_bufs","shift_cell_xls","cell","cRel","rRel","biff","shift_range_xls","range","encode_cell_xls","encode_cell","fix_row","encode_range_xls","encode_row","encode_col","decode_row","rowstr","decode_col","colstr","col","decode_cell","decode_range","encode_range","cs","ce","safe_decode_range","safe_format_cell","XF","numFmtId","format_cell","BErr","sheet_to_workbook","sheet","sheets","SheetNames","Sheets","sheet_add_aoa","_ws","dense","ws","_R","_C","origin","_origin","_range","__R","__C","nullError","sheetStubs","cellDates","cell_ref","aoa_to_sheet","parse_XLWideString","cchCharacters","parse_StrRun","ich","ifnt","parse_RichStr","rgsStrRun","dwSizeStrRun","parse_BrtCommentText","parse_XLSBCell","iStyleRef","parse_XLSBShortCell","parse_XLSBCodeName","parse_XLNullableWideString","parse_XLNameWideString","parse_RelID","parse_RkNumber","fX100","fInt","RK","parse_RfX","parse_UncheckedRfX","parse_Xnum","parse_ClipboardFormatOrString","VT_STRING","VT_CUSTOM","DocSummaryPIDDSI","SummaryPIDSI","CountryEnum","XLSFillPattern","rgbify","XLSIcv","RBErr","ct2type","RELS","WB","SHEET","HLINK","VML","XPATH","XMISS","XLINK","CXML","CXMLP","CMNT","CORE_PROPS","EXT_PROPS","CUST_PROPS","SST","STY","THEME","CHART","CHARTEX","CS","WS","DS","MS","IMG","DRAW","XLMETA","TCMNT","PEOPLE","VBA","get_rels_path","parse_rels","currentFilePath","rels","rel","Type","Target","Id","TargetMode","canonictarget","CORE_PROPS_REGEX","parse_core_props","cur","load_props_pairs","HP","TOP","props","hp","parts","Worksheets","NamedRanges","DefinedNames","Chartsheets","ChartNames","custregex","evert_XLMLDPM","XLMLDocPropsMap","Title","Subject","Author","Keywords","Comments","LastAuthor","RevNumber","Application","LastPrinted","CreatedDate","ModifiedDate","Category","Manager","Company","AppVersion","ContentStatus","Identifier","Language","xlml_set_prop","Props","parse_FILETIME","dwLowDateTime","dwHighDateTime","toISOString","parse_lpstr","pad","parse_lpwstr","parse_VtStringBase","stringType","parse_VtString","parse_VtHeadingPair","headingString","parse_TypedPropertyValue","parse_dictionary","CodePage","dict","pid","parse_BLOB","bytes","ret","Size","parse_ClipboardData","parse_VtUnalignedString","cElements","parse_VtVecHeadingPairValue","parse_VtVecLpwstrValue","parse_VtVecUnalignedLpstrValue","parse_PropertySet","PIDSI","start_addr","NumProps","Dictionary","DictObj","PropID","Offset","PropH","fail","piddsi","oldpos","parsebool","parse_PropertySetStream","NumSets","FMTID0","FMTID1","Offset0","Offset1","SystemIdentifier","PSet1","PSet0","rval","FMTID","parsenoop2","parseuint16","parseuint16a","parslurp","parse_ShortXLUnicodeString","cch","encoding","parse_XLUnicodeRichExtendedString","cbExtRst","fExtSt","fRichSt","width","cRun","parse_XLUnicodeStringNoCch","parse_XLUnicodeString","parse_XLUnicodeString2","parse_HyperlinkMoniker","extra","url","parse_URLMoniker","cAnti","preamble","ansiPath","parse_FileMoniker","parse_HyperlinkString","parse_LongRGBA","parse_LongRGB","parse_XLSCell","ixfe","parse_XTI","parse_RkRec","parse_Ref8U","rwFirst","rwLast","parse_RefU","parse_Ref","parse_FtCmo","ot","id","parse_FtSkip","FtTab","cf","fSharedNote","parse_BOF","BIFFVer","parse_DefaultRowHeight","miyRw","Unsynced","DyZero","ExAsc","ExDsc","parse_BIFF2Format","parse_Dimensions","parse_BoolErr","parse_Bes","parse_XLHeaderFooter","parse_ExternName","body","fBuiltIn","fWantAdvise","fWantPict","fOle","fOleLink","fIcon","sbcch","udfName","parse_AddinUdf","Name","XLSLblBuiltIn","parse_Lbl","chKey","cce","itab","npflen","rgce","rgcb","parse_Rgce","parse_RgbExtra","parse_NameParsedFormula","parse_ExternSheet","parse_BIFF5ExternSheet","parse_Array","ref","parse_ArrayParsedFormula","parse_BIFF5OT","cchName","parse_ColInfo","cellStyles","colFirst","colLast","coldx","level","parse_Blank","parse_Scl","parse_String","DBF_SUPPORTED_VERSIONS","DBF","dbf_codepage_map","dbf_reverse_map","dbf_to_sheet","ft","memo","vfp","l7","nrow","fpos","rlen","current_cp","codepage","fields","field","hend","sheetRows","dbf_to_aoa","wch","_RLEN","to_workbook","to_sheet","from_sheet","ba","aoa","sheet_to_json","headers","cols","hcnt","coltypes","colwidths","coldecimals","guess","_guess","hf","_f","hb","rout","_n","_s","SYLK","sylk_escapes","AA","BA","CA","DA","HA","JA","AE","BE","CE","HE","AI","BI","CI","HI","AO","BO","CO","DO","HO","AU","BU","CU","HU","Aa","Ba","Ca","Da","Ha","Ja","Ae","Be","Ce","He","Ai","Bi","Ci","Hi","Ao","Bo","Co","Do","Ho","Au","Bu","Cu","Hu","KC","Kc","DN","Dn","Hy","sylk_char_regex","sylk_char_fn","_","decode_sylk_char","newcc","sylk_to_aoa_str","records","rj","formats","next_cell_format","sht","rowinfo","colinfo","cw","Mval","rstr","record","C_seen_K","C_seen_X","C_seen_S","C_seen_E","formula","rc_to_a1","shrbase","shift_formula_str","F_seen","hidden","process_col","hpt","hpx","pt2px","sylk_to_sheet","aoasht","sylk_to_aoa","write_ws_cell_sylk","F","a1_to_rc","RS","rec","wpx","width2px","px2char","rows","px2pt","write_ws_rows_sylk","coord","DIF","dif_to_aoa_str","metadata","dif_to_sheet","dif_to_aoa","push_field","topic","push_value","ETH","eth_to_sheet","eth_to_aoa","sep","meta","sheet_to_eth_data","PRN","set_text_arr","guess_seps","guess_sep_weights","guess_sep","instr","dsv_to_sheet_str","FS","sepcc","startcc","_re","dateNF_regex","finish_cell","Y","datestr","timestr","dateNF_fix","cellText","cellNF","outer","prn_to_sheet_str","lines","prn_to_aoa_str","prn_to_sheet","firstbyte","WK_","lotushopper","Enum","WK1Enum","lotus_to_workbook_buf","next_n","sidx","snames","realnames","refguess","vers","qpro","tmpcell","WK3Enum","osheets","rnames","parse_cell","parse_LABEL","write_LABEL","write_INTEGER","write_NUMBER","wk1_parse_rc","FuncTab","BinOpTab","parse_cell_3","write_LABEL_16","wsidx","parse_NUMBER_17","v1","v2","write_NUMBER_17","log2","parse_NUMBER_27","parse_SHEETNAMECS","write_XFORMAT_SHEETNAME","argc","argL","argR","args","wk1_fmla_to_csf","sheet_to_wk1","write_biff_rec","write_BOF_WK1","write_RANGE","max_R","book_to_wk3","wb","wscnt","write_BOF_WK3","parse_rs","tregex","rpregex","parse_r","rpr","font","pass","shadow","outline","strike","uval","rgb","family","valign","parse_rpr","rregex","rend","rs","filter","rs_to_html","nlregex","r_to_html","terms","intro","outro","style","align","parse_rpr2","sitregex","sirregex","sirphregex","parse_si","html","cellHTML","sstr0","sstr1","sstr2","_JS2ANSI","parse_CRYPTOVersion","Major","Minor","parse_DataSpaceMapEntry","comps","parse_Primary","hdr","U","W","parse_TransformInfoHeader","ename","cmode","parse_EncryptionHeader","Flags","AlgID","valid","AlgIDHash","KeySize","ProviderType","CSPName","parse_EncryptionVerifier","Salt","Verifier","VerifierHash","parse_EncInfoStd","parse_EncInfoExt","parse_EncInfoAgl","KeyData","xml","encryptedHmacKey","encryptedHmacValue","encs","uri","crypto_CreatePasswordVerifier_Method1","Password","PasswordArray","PasswordDecoded","crypto_CreateXorArray_Method1","PadArray","InitialCode","XorMatrix","XorRor","byte1","byte2","Byte","password","Temp","PasswordLastChar","PadIndex","XorKey","CurrentElement","Char","CreateXorKey_Method1","Index","ObfuscationArray","crypto_MakeXorDecryptor","XorArrayIndex","XorArray","Data","O","Value","crypto_DecryptData_Method1","parse_FilePassHeader","Info","EncryptionVersionInfo","EncryptedVerifier","EncryptedVerifierHash","parse_RC4Header","EncryptionHeader","EncryptionVerifier","parse_RC4CryptoHeader","RTF","rtf_to_sheet","rtf_to_sheet_str","rowtf","rtfre","last_index","exec","lastIndex","rgb2Hex","rgb_tint","hex","tint","hsl","G","H6","L2","rgb2HSL","hex2RGB","X","h6","hsl2RGB","MDW","px","char2width","chr","cycle_width","collw","find_mdw_colw","delta","_MDW","coll","customWidth","pt","XLMLPatternTypeMap","cellXF_uint","cellXF_bool","parse_sty_xml","numFmtRegex","cellXfRegex","fillsRegex","fontsRegex","bordersRegex","themes","styles","NumberFmt","formatCode","parse_numFmts","Fonts","bold","italic","underline","condense","extend","vertAlign","scheme","auto","indexed","index","icv","theme","themeElements","clrScheme","parse_fonts","Fills","patternType","bgColor","fgColor","parse_fills","Borders","border","diagonalUp","diagonalDown","parse_borders","xf","CellXf","alignment","vertical","horizontal","textRotation","indent","wrapText","parse_cellXfs","parse_BrtFill","parse_BrtBorder","XLSXThemeClrScheme","parse_clrScheme","lastClr","parse_fontScheme","parse_fmtScheme","clrsregex","fntsregex","fmtsregex","themeltregex","parse_theme_xml","write_theme","parse_themeElements","Themes","themeXLSX","parse_FullColorExt","xclrType","nTintShade","xclrValue","parse_IcvXF","parse_ColorTheme","parse_ExtProp","extType","parse_XFExtGradient","sheet_insert_comments","comments","threaded","people","comment","author","parse_BrtCommentAuthor","rcregex","rcbase","rcfunc","fstr","crefregex","$0","$4","$5","shift_formula_xlsx","_xlfn","parseread1","parse_ColRelU","parse_RgceArea","parse_RgceArea_BIFF2","parse_RgceLoc","parse_RgceLoc_BIFF2","parse_RgceElfLoc","fQuoted","parse_PtgAttrBaxcel","bitSemi","parse_PtgAttrSpaceType","parse_SerAr","parse_PtgExtraMem","count","parse_PtgExtraArray","parse_PtgElfLoc","parse_PtgElfNoop","parse_PtgElfLel","PtgListRT","PtgTypes","iftab","FtabArgc","Ftab","cparams","tab","parsetab","Cetab","nameindex","rl","parse_RgceLocRel_BIFF2","cl","parse_RgceLocRel","area","parse_RgceAreaRel","ixti","parse_PtgNameX_BIFF5","PtgDupes","Ptg18","coltype","rt","Ptg19","bitIf","bitGoto","ptgs","stringify_array","PtgBinOp","PtgAdd","PtgConcat","PtgDiv","PtgEq","PtgGe","PtgGt","PtgLe","PtgLt","PtgMul","PtgNe","PtgPower","PtgSub","get_ixti_raw","supbooks","XTI","SID","get_ixti","ixtiraw","sname","formula_quote_sheet_name","stringify_formula","stack","nameidx","last_sp","sp","fflen","func","lbl","names","xlfn","externbook","bookidx","ixtidata","lp","rp","sharedf","parsedf","fnd","arrayf","_left","parse_SharedParsedFormula","parse_Formula","parse_FormulaValue","cbf","parse_XLSCellParsedFormula","shared","parse_XLSBParsedFormula","parse_XLSBArrayParsedFormula","parse_XLSBCellParsedFormula","parse_XLSBNameParsedFormula","parse_XLSBSharedParsedFormula","ods_to_csf_formula","ods_to_csf_3D","strs","_ssfopts","default_margins","margins","mode","defs","left","right","top","bottom","footer","safe_format","fmtid","fillid","raw_rgb","mergecregex","sheetdataregex","hlinkregex","dimregex","colregex","afregex","marginregex","sheetprregex","sheetprregex2","svsregex","parse_ws_xml","data1","data2","mtch","sheetPr","parse_ws_xml_sheetpr","parse_ws_xml_sheetpr2","parse_ws_xml_dim","svs","Views","sviewregex","zoomScale","zoom","rightToLeft","RTL","parse_ws_xml_sheetviews","columns","seencol","coli","colm","colM","outlineLevel","parse_ws_xml_cols","parse_ws_xml_data","afilter","parse_ws_xml_autofilter","merges","_merge","hlink","location","Rel","tooltip","Tooltip","rng","parse_ws_xml_hlinks","margin","parse_ws_xml_margins","tmpref","codeName","CodeName","cellregex","rowregex","isregex","refregex","match_v","match_f","sdata","sstr","ftag","cells","cref","tagr","tagc","do_format","rowobj","rowrite","marr","marrlen","xlen","rstarti","outa","ht","rslice","cellFormula","___f","_tag","fillId","cm","xlmeta","Cell","_r","parse_BrtWsDim","parse_BrtShortReal","parse_BrtMergeCell","BrtMarginKeys","parse_chart","csheet","nc","cache","num","nf","parse_Cache","WBPropsDef","WBViewDef","SheetDef","CalcPrDef","push_defaults_array","defaults","push_defaults","parse_wb_defaults","WBProps","CalcPr","WBView","badchars","check_ws_name","_good","wbnsregex","parse_BrtFRTArchID$","ArchID","parse_wb","xmlns","Names","Sheet","Ref","Ptg","parse_wb_bin","dname","dnstart","Hidden","Comment","localSheetId","parse_wb_xml","parse_ws","ai","af","vm","RR","aii","_d","relId","rfx","above","parse_ws_bin","parse_cs","parse_cs_bin","parse_cs_xml","parse_sty","parse_sty_bin","parse_sst","Count","Unique","parse_sst_bin","sst","uniqueCount","parse_sst_xml","parse_cmnt","authors","iauthor","parse_comments_bin","commentList","authtag","cmnttag","authorId","guid","textMatch","parse_comments_xml","parse_cc","parse_cc_bin","parse_cc_xml","parse_xlink","parse_xlink_bin","parse_xlmeta","Types","metatype","parse_xlmeta_bin","lastmeta","offsets","parse_xlmeta_xml","XLMLFormatMap","attregexg2","attregex2","xlml_parsexmltag","words","xlml_parsexmltagobj","xlml_set_custprop","Custprops","key","oval","safe_format_xlml","format","xlml_format","process_style_xlml","stag","Interior","I","Pattern","ID","parse_xlml_data","csty","sid","StyleID","interiors","Parent","UTC","Formula","ArrayRange","xlml_clean_comment","parse_xlml_xml","Rn","opening","ishtml","_o","html_to_sheet","book_append_sheet","html_to_workbook","sheetnames","cursheet","sheetname","dtag","didx","fidx","pidx","cstys","Workbook","wsprops","raw_Rn3","HRef","HRefScreenTip","MergeAcross","MergeDown","cma","cmd","AutoFitHeight","Height","Format","ssfidx","Width","_col","Span","_NamedRange","_DefinedName","RefersTo","AutoFilter","Range","parse_fods","Margin","pagemargins","Top","Left","Right","Bottom","bookSheets","bookProps","SSF","parse_xlml","fix_read_opts","parse_compobj","AnsiUserType","AnsiClipboardFormat","parse_ClipboardFormatOrAnsiString","Reserved1","UnicodeClipboardFormat","parse_ClipboardFormatOrUnicodeString","Reserved2","CONTINUE_RT","slurp","RecordType","insitu","nextrt","XLSRecordEnum","ll","safe_format_xf","make_cell","parse_workbook","lastcell","cmnt","rngC","rngR","temp_val","country","Directory","last_formula","cur_sheet","Preamble","last_cell","XFs","palette","get_rgb","addcell","file_depth","xfd","icvFore","icvBack","process_cell_style","afi","rrtabid","lastuser","winlocked","wtf","objects","last_lbl","last_RT","BIFF2Fmt","BIFF2FmtTable","FilterDatabases","seen_codepage","Date1904","WriteProtect","cpval","CalcRefMode","FullCalc","fDialog","fBelow","fRight","ExternCount","tmpri","biffguess","fakebs8","hs","rknum","rkrec","_fr","_fc","_fe","_arraystart","isst","_j","_ixfe","b4idx","b2idx","cmo","lastobj","TxO","ImData","noteobj","xfe","Strings","Encryption","Metadata","Country","PSCLSID","parse_xlscfb","CompObj","WorkbookP","bookVBA","vbaraw","newcfb","newpath","make_vba_xls","DSI","DocSummary","SI","Summary","HeadingPairs","TitlesOfParts","parse_xls_props","bookFiles","grbit","fBold","fItalic","fUnderline","fStrikeout","fOutline","fShadow","fCondense","fExtend","parse_FontFlags","bCharSet","charset","xColorType","nTS","bR","bG","bB","parse_BrtColor","ixfeParent","ifmt","defaultThemeVersion","strName","autoCompressPictures","backupFile","checkCompatibility","filterPrivacy","hidePivotFieldList","promptedSolutions","publishItems","refreshAllConnections","saveExternalLinkValues","showBorderUnselectedTables","showInkAnnotation","showObjects","showPivotChartFilter","updateLinks","iTabID","strRelID","fAlwaysCalc","display","idObj","stAuthor","parse_NoteSh","verificationBytes","verifier","parse_XORObfuscation","dyHeight","fl","Pos","Dim","CurTab","FirstTab","Selected","TabRatio","UserName","fts","parse_BIFF5Obj","parse_FtArray","ccv","rw","rkrecs","lastcol","ixfes","fStyle","alc","fWrap","alcV","fJustLast","trot","cIndent","fShrinkToFit","iReadOrder","fAtrNum","fAtrFnt","fAtrAlc","fAtrBdr","fAtrPat","fAtrProt","dgLeft","dgRight","dgTop","dgBottom","icvLeft","icvRight","grbitDiag","icvTop","icvBottom","icvDiag","dgDiag","fsxButton","parse_CellStyleXF","cmcs","ucnt","extsst","dsst","ctab","virtPath","rgst","texts","accel","parse_ControlInfo","cchText","sVer","displayName","targetFrameName","moniker","oleMoniker","fileTime","Loc","parse_Hyperlink","xnum","cUse","wzTooltip","cxfs","crc","cexts","cchComment","themeXML","parse_frtHeader","env","lcb","mtch2","hd","midx","colspan","rowspan","_t","make_html_row","editable","HTML_BEGIN","HTML_END","make_html_preamble","sheet_to_html","sheet_add_dom","or_R","or_C","getElementsByTagName","is_dom_element_hidden","elts","children","hasAttribute","getAttribute","innerHTML","Aelts","Aelti","parse_dom_table","element","get_computed_style","ownerDocument","defaultView","getComputedStyle","get_get_computed_style_function","getPropertyValue","parse_text_p","fixed","number_formats_ods","day","month","year","hours","minutes","seconds","era","quarter","parse_content_xml","sheetag","rowtag","NFtag","NF","ctag","textp","textpidx","textR","row_ol","number_format_map","mrange","rowpeat","colpeat","atag","_Ref","creator","creatoridx","isstub","intable","rptR","rpt","nrange","ptp","href","parse_ods","FEtag","parse_manifest","u8_to_dataview","array","DataView","buffer","byteOffset","byteLength","u8str","u8","u8concat","u8a","reduce","acc","popcnt","parse_varint49","ptr","varint","varint_to_i32","i32","parse_shallow","mappa","parse_iwa_file","_a","messages","mi","merge","parse_snappy_chunk","chunks","decompress_iwa_file","parse_new_storage","rsst","dv","getUint32","data_offset","d128","ieee","exp","mantissa","readDecimal128LE","getFloat64","parse_cell_storage","parse_old_storage","parse_TSP_Reference","parse_TST_TableDataList","pb","entries","le","rtp","rtpref","mtype","tswpsa","parse_TST_Tile","_b","_c","_e","_g","_h","_i","_k","_l","_m","used_storage_u8","used_storage","wide_offsets","used_storage_offsets","getUint16","parse_TST_TileRowInfo","nrows","parse_TST_TableInfoArchive","tableref","store","tile","tl","_tile","parse_TST_TableModelArchive","parse_TN_DocumentArchive","root2","parse_TN_SheetArchive","parse_numbers_iwa","indices","packets","packet","docroot","iwam","fix_opts_func","safe_parse_sheet","relsPath","sheetRels","stype","dfile","drelsp","draw","parse_drawing","chartp","crelsp","parse_ds","tcomments","tidx","personId","parse_tcmnt_xml","strip_front_slash","_zip","binname","dir","workbooks","charts","dialogs","macros","threadedcomments","links","coreprops","extprops","custprops","calcchains","vba","drawings","TODO","ctext","Extension","ContentType","PartName","calcchain","parse_ct","xlsb","parse_theme","link","propdata","parse_ext_props","toks","warn","parse_cust_props","deps","bookDeps","wbsheets","wbext","wbrelsi","wbrelsfile","wbrels","displayname","parse_people_xml","safe_parse_wbrels","nmode","wsloop","snjseen","snj","Deps","Styles","bin","parse_xlsxcfb","parse_DataSpaceVersionInfo","dsm","parse_DataSpaceMap","seds","parse_DataSpaceDefinition","einfo","parse_EncryptionInfo","decrypt_agile","decrypt_std76","read_plaintext","main","read_prn","readSync","Deno","$","File","Folder","infile","open","close","read_binary","bstrify","ab","vu","foo","read_cfb","OLD_WTF","read_wb_ID","read_zip","read_utf16","read_plaintext_raw","make_json_row","defval","isempty","defineProperty","enumerable","__rowNum__","rawNumbers","outi","counter","header_cnt","skipHidden","blankrows","qreg","make_csv_row","txt","forceQuotes","sheet_to_csv","endregex","strip","sheet_to_txt","sheet_add_json","js","skipHeader","JS","ws_get_cell_stub","RC","book_new","roll","cell_set_hyperlink","split_cell","json_to_sheet","table_to_sheet","table_to_book","sheet_to_formulae","cmds","sheet_to_row_object_array","sheet_get_cell","book_set_sheet_visibility","sh","vis","wb_sheet_idx","cell_set_number_format","c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,IAAe,KACf,IAAe,KACf,IAAe,KACf,IAAe,KACf,IAAe,KACf,IAAe,KACf,IAAe,KACf,IAAe,KACf,IAAe,KACf,IAAe,KACf,IAAe,KACf,IAAe,KACf,IAAe,KACf,IAAe,KACf,IAAe,KACf,IAAe,KACf,IAAe,KACf,IAAe,KACf,IAAe,KACf,MAAe,MAInBC,GAAiB,CACpB,KACA,QACA,aACA,WACA,YACA,iBACA,eACA,WACA,SACA,WACA,cACA,kBACA,gBACA,YACA,UACA,YACA,eACA,UACA,YAGD,SAASC,GAAOlP,GAA6D,OAAOA,EAAIxjB,KAAI,SAASnC,GAAK,MAAO,CAAEA,GAAG,GAAI,IAAKA,GAAG,EAAG,IAAM,IAAFA,MAIzI,IA4FI80B,GAAsB9O,GA5FE6O,GAAO,CAElC,EACA,SACA,SACA,MACA,IACA,SACA,SACA,MAGA,EACA,SACA,SACA,MACA,IACA,SACA,SACA,MAEA,QACA,MACA,IACA,QACA,QACA,MACA,SACA,QACA,SACA,SACA,SACA,SACA,QACA,SACA,MACA,SAEA,IACA,SACA,SACA,MACA,QACA,QACA,MACA,IACA,MACA,SACA,SACA,SACA,SACA,SACA,SACA,SAEA,QACA,QACA,SACA,SACA,SACA,SACA,QACA,QACA,MACA,QACA,MACA,QACA,SACA,SACA,QACA,QAGA,SACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,KAKGpD,GAAO,CACH,EAAa,SACb,EAAa,UACb,GAAa,UACb,GAAa,QACb,GAAa,SACb,GAAa,QACb,GAAa,OACb,GAAa,gBACb,IAAa,SAGjBsD,GAAQ,CACX,SAAiB,EACjB,UAAiB,EACjB,UAAiB,GACjB,QAAiB,GACjB,SAAiB,GACjB,QAAiB,GACjB,OAAiB,GACjB,gBAAiB,GACjB,QAAiB,KAOdC,GAAgC,CAEnC,6EAA8E,YAC9E,uDAAwD,YACxD,0DAA2D,YAC3D,uDAAwD,YACxD,gFAAiF,YAG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ACL,IAAK,gBACL,IAAK,UACL,IAAK,aACL,IAAK,aACL,IAAK,gBACL,IAAK,YACL,IAAK,aACL,IAAK,UACL,IAAK,OACL,IAAK,cACL,IAAK,UACL,IAAK,YACL,IAAK,iBACL,IAAK,cACL,IAAK,oBACL,IAAK,gBACL,IAAK,eACL,IAAK,iBACL,IAAK,kBACL,IAAK,cACL,IAAK,qBACL,IAAK,SACL,IAAK,cACL,IAAK,WACL,IAAK,WACL,IAAK,eACL,IAAK,eACL,IAAK,iBACL,IAAK,eACL,IAAK,kBACL,IAAK,qBACL,IAAK,aACL,IAAK,YACL,IAAK,YACL,IAAK,gBACL,IAAK,cACL,IAAK,eACL,IAAK,kBACL,IAAK,oBACL,IAAK,kBACL,IAAK,iBACL,IAAK,UACL,IAAK,YACL,IAAK,YACL,IAAK,aACL,IAAK,cACL,IAAK,UACL,IAAK,SACL,IAAK,cACL,IAAK,UACL,IAAK,oBACL,IAAK,kBACL,IAAK,QACL,IAAK,aACL,IAAK,YACL,IAAK,cACL,IAAK,mBACL,IAAK,oBACL,IAAK,cACL,IAAK,cACL,IAAK,mBACL,IAAK,eACL,IAAK,aACL,IAAK,eACL,IAAK,gBACL,IAAK,aACL,IAAK,cACL,IAAK,cACL,IAAK,iBACL,IAAK,YACL,IAAK,cACL,IAAK,eACL,IAAK,aACL,IAAK,aACL,IAAK,gBACL,IAAK,eACL,IAAK,kBACL,IAAK,gBACL,IAAK,qBACL,IAAK,WACL,IAAK,OACL,IAAK,gBACL,IAAK,kBACL,IAAK,aACL,IAAK,aACL,IAAK,eACL,IAAK,iBACL,IAAK,cACL,IAAK,iBACL,IAAK,qBACL,IAAK,YACL,IAAK,oBACL,IAAK,WACL,IAAK,cACL,IAAK,iBACL,IAAK,WACL,IAAK,eACL,IAAK,gBACL,IAAK,gBACL,IAAK,mBACL,IAAK,iBACL,IAAK,eACL,IAAK,cACL,IAAK,YACL,IAAK,kBACL,IAAK,oBACL,IAAK,iBACL,IAAK,YACL,IAAK,aACL,IAAK,oBACL,IAAK,aACL,IAAK,eACL,IAAK,iBACL,IAAK,kBACL,IAAK,eACL,IAAK,gBACL,IAAK,gBACL,IAAK,qBACL,IAAK,mBACL,IAAK,qBACL,IAAK,yBACL,IAAK,cACL,IAAK,aACL,IAAK,mBACL,IAAK,sBACL,IAAK,eACL,IAAK,eACL,IAAK,gBACL,IAAK,cACL,IAAK,kBACL,IAAK,cACL,IAAK,gBACL,IAAK,kBACL,IAAK,2BACL,IAAK,eACL,IAAK,iBACL,IAAK,aACL,IAAK,iBACL,IAAK,YACL,IAAK,mBACL,IAAK,cACL,IAAK,wBACL,IAAK,kBACL,IAAK,qBACL,IAAK,kBACL,IAAK,kBACL,IAAK,kBACL,IAAK,qBACL,IAAK,aACL,IAAK,iBACL,IAAK,eACL,IAAK,mBACL,IAAK,aACL,IAAK,eACL,IAAK,kBACL,IAAK,gBACL,IAAK,gBACL,IAAK,kBACL,IAAK,kBACL,IAAK,gBACL,IAAK,iBACL,IAAK,uBACL,IAAK,0BACL,IAAK,iBACL,IAAK,eACL,IAAK,YACL,IAAK,cACL,IAAK,aACL,IAAK,iBACL,IAAK,kBACL,IAAK,kBACL,IAAK,gBACL,IAAK,kBACL,IAAK,gBACL,IAAK,gBACL,IAAK,qBACL,IAAK,cACL,IAAK,mBACL,IAAK,uBACL,IAAK,mBACL,IAAK,kBACL,IAAK,mBACL,IAAK,cACL,IAAK,iBACL,IAAK,kBACL,IAAK,eACL,IAAK,eACL,IAAK,oBACL,IAAK,sBACL,IAAK,sBACL,IAAK,mBACL,IAAK,qBACL,IAAK,qBACL,IAAK,gBACL,IAAK,aACL,IAAK,YACL,IAAK,cACL,IAAK,mBACL,IAAK,gBACL,IAAK,wBACL,IAAK,qBACL,IAAK,SACL,IAAK,kBACL,IAAK,gBACL,IAAK,kBACL,IAAK,gBACL,IAAK,gBACL,IAAK,mBACL,IAAK,mBACL,IAAK,oBACL,IAAK,eACL,IAAK,oBACL,IAAK,uBACL,IAAK,cACL,IAAK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AAK,QACL,IAAK,UACL,IAAK,WACL,IAAK,QACL,IAAK,QACL,IAAK,OACL,IAAK,OACL,IAAK,SACL,IAAK,aACL,IAAK,MACL,IAAK,QACL,IAAK,QACL,IAAK,OACL,IAAK,WACL,IAAK,UACL,IAAK,OACL,IAAK,UACL,IAAK,YACL,IAAK,UACL,IAAK,OACL,IAAK,UACL,IAAK,UACL,IAAK,OACL,IAAK,WACL,IAAK,gBACL,IAAK,aACL,IAAK,eACL,IAAK,WACL,IAAK,YACL,IAAK,WACL,IAAK,OACL,IAAK,SACL,IAAK,OACL,IAAK,UACL,IAAK,QACL,IAAK,QACL,IAAK,YACL,IAAK,UACL,IAAK,aACL,IAAK,aACL,IAAK,WACL,IAAK,QACL,IAAK,UACL,IAAK,WACL,IAAK,QACL,IAAK,SACL,IAAK,OACL,IAAK,OACL,IAAK,UACL,IAAK,YACL,IAAK,MACL,IAAK,OACL,IAAK,OACL,IAAK,UACL,IAAK,UACL,IAAK,QACL,IAAK,MACL,IAAK,OACL,IAAK,UACL,IAAK,SACL,IAAK,WACL,IAAK,SACL,IAAK,aACL,IAAK,OACL,IAAK,OACL,IAAK,OACL,IAAK,QACL,IAAK,QACL,IAAK,QACL,IAAK,OACL,IAAK,gBACL,IAAK,WACL,IAAK,aACL,IAAK,cACL,IAAK,gBACL,IAAK,kBACL,IAAK,gBACL,IAAK,WACL,IAAK,OACL,IAAK,QACL,IAAK,aACL,IAAK,KACL,IAAK,QACL,IAAK,SACL,IAAK,YACL,IAAK,cACL,IAAK,iBACL,IAAK,OACL,IAAK,gBACL,IAAK,WACL,IAAK,cACL,IAAK,WACL,IAAK,iBACL,IAAK,aACL,IAAK,YACL,IAAK,eACL,IAAK,eACL,IAAK,cACL,IAAK,aACL,IAAK,cACL,IAAK,eACL,IAAK,SACL,IAAK,WACL,IAAK,UACL,IAAK,UACL,IAAK,YACL,IAAK,UACL,IAAK,SACL,IAAK,SACL,IAAK,aACL,IAAK,YACL,IAAK,OACL,IAAK,YACL,IAAK,QACL,IAAK,OACL,IAAK,SACL,IAAK,YACL,IAAK,QACL,IAAK,YACL,IAAK,WACL,IAAK,UACL,IAAK,cACL,IAAK,cACL,IAAK,SACL,IAAK,eACL,IAAK,WACL,IAAK,YACL,IAAK,UACL,IAAK,WACL,IAAK,cACL,IAAK,MACL,IAAK,SACL,IAAK,UACL,IAAK,QACL,IAAK,UACL,IAAK,UACL,IAAK,WACL,IAAK,WACL,IAAK,UACL,IAAK,SACL,IAAK,QACL,IAAK,WACL,IAAK,QACL,IAAK,YACL,IAAK,UACL,IAAK,MACL,IAAK,QACL,IAAK,QACL,IAAK,QACL,IAAK,OACL,IAAK,QACL,IAAK,UACL,IAAK,UACL,IAAK,QACL,IAAK,OACL,IAAK,OACL,IAAK,QACL,IAAK,QACL,IAAK,QACL,IAAK,WACL,IAAK,aACL,IAAK,cACL,IAAK,OACL,IAAK,WACL,IAAK,OACL,IAAK,gBACL,IAAK,YACL,IAAK,cACL,IAAK,QACL,IAAK,iBACL,IAAK,kBACL,IAAK,kBACL,IAAK,iBACL,IAAK,UACL,IAAK,UACL,IAAK,WACL,IAAK,QACL,IAAK,UACL,IAAK,aACL,IAAK,eACL,IAAK,oBACL,IAAK,QACL,IAAK,UACL,IAAK,aACL,IAAK,eACL,IAAK,QACL,IAAK,cACL,IAAK,cACL,IAAK,WACL,IAAK,eACL,IAAK,YACL,IAAK,WACL,IAAK,WACL,IAAK,OACL,IAAK,OACL,IAAK,UACL,IAAK,QACL,IAAK,SACL,IAAK,OACL,IAAK,WACL,IAAK,gBACL,IAAK,YACL,IAAK,kBACL,IAAK,eACL,IAAK,gBACL,IAAK,mBACL,IAAK,cACL,IAAK,gBACL,IAAK,cACL,IAAK,WACL,IAAK,MACL,IAAK,YACL,IAAK,aACL,IAAK,qBACL,IAAK,mBACL,IAAK,UACL,IAAK,UACL,IAAK,UACL,IAAK,UACL,IAAK,UACL,IAAK,UACL,IAAK,UACL,IAAK,UACL,IAAK,UACL,IAAK,UACL,IAA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AAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL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S -- http://sheetjs.com */\n/* vim: set ts=2: */\n/*exported XLSX */\n/*global process:false, Buffer:false, ArrayBuffer:false, DataView:false, Deno:false */\nvar XLSX = {};\nXLSX.version = '0.18.5';\nvar current_codepage = 1200, current_ansi = 1252;\n\nvar VALID_ANSI = [ 874, 932, 936, 949, 950, 1250, 1251, 1252, 1253, 1254, 1255, 1256, 1257, 1258, 10000 ];\n/* ECMA-376 Part I 18.4.1 charset to codepage mapping */\nvar CS2CP = ({\n\t/*::[*/0/*::]*/: 1252, /* ANSI */\n\t/*::[*/1/*::]*/: 65001, /* DEFAULT */\n\t/*::[*/2/*::]*/: 65001, /* SYMBOL */\n\t/*::[*/77/*::]*/: 10000, /* MAC */\n\t/*::[*/128/*::]*/: 932, /* SHIFTJIS */\n\t/*::[*/129/*::]*/: 949, /* HANGUL */\n\t/*::[*/130/*::]*/: 1361, /* JOHAB */\n\t/*::[*/134/*::]*/: 936, /* GB2312 */\n\t/*::[*/136/*::]*/: 950, /* CHINESEBIG5 */\n\t/*::[*/161/*::]*/: 1253, /* GREEK */\n\t/*::[*/162/*::]*/: 1254, /* TURKISH */\n\t/*::[*/163/*::]*/: 1258, /* VIETNAMESE */\n\t/*::[*/177/*::]*/: 1255, /* HEBREW */\n\t/*::[*/178/*::]*/: 1256, /* ARABIC */\n\t/*::[*/186/*::]*/: 1257, /* BALTIC */\n\t/*::[*/204/*::]*/: 1251, /* RUSSIAN */\n\t/*::[*/222/*::]*/: 874, /* THAI */\n\t/*::[*/238/*::]*/: 1250, /* EASTEUROPE */\n\t/*::[*/255/*::]*/: 1252, /* OEM */\n\t/*::[*/69/*::]*/: 6969 /* MISC */\n}/*:any*/);\n\nvar set_ansi = function(cp/*:number*/) { if(VALID_ANSI.indexOf(cp) == -1) return; current_ansi = CS2CP[0] = cp; };\nfunction reset_ansi() { set_ansi(1252); }\n\nvar set_cp = function(cp/*:number*/) { current_codepage = cp; set_ansi(cp); };\nfunction reset_cp() { set_cp(1200); reset_ansi(); }\n\nfunction char_codes(data/*:string*/)/*:Array*/ { var o/*:Array*/ = []; for(var i = 0, len = data.length; i < len; ++i) o[i] = data.charCodeAt(i); return o; }\n\nfunction utf16leread(data/*:string*/)/*:string*/ {\n\tvar o/*:Array*/ = [];\n\tfor(var i = 0; i < (data.length>>1); ++i) o[i] = String.fromCharCode(data.charCodeAt(2*i) + (data.charCodeAt(2*i+1)<<8));\n\treturn o.join(\"\");\n}\nfunction utf16beread(data/*:string*/)/*:string*/ {\n\tvar o/*:Array*/ = [];\n\tfor(var i = 0; i < (data.length>>1); ++i) o[i] = String.fromCharCode(data.charCodeAt(2*i+1) + (data.charCodeAt(2*i)<<8));\n\treturn o.join(\"\");\n}\n\nvar debom = function(data/*:string*/)/*:string*/ {\n\tvar c1 = data.charCodeAt(0), c2 = data.charCodeAt(1);\n\tif(c1 == 0xFF && c2 == 0xFE) return utf16leread(data.slice(2));\n\tif(c1 == 0xFE && c2 == 0xFF) return utf16beread(data.slice(2));\n\tif(c1 == 0xFEFF) return data.slice(1);\n\treturn data;\n};\n\nvar _getchar = function _gc1(x/*:number*/)/*:string*/ { return String.fromCharCode(x); };\nvar _getansi = function _ga1(x/*:number*/)/*:string*/ { return String.fromCharCode(x); };\n\nvar $cptable;\nfunction set_cptable(cptable) {\n\t$cptable = cptable;\n\tset_cp = function(cp/*:number*/) { current_codepage = cp; set_ansi(cp); };\n\tdebom = function(data/*:string*/) {\n\t\tif(data.charCodeAt(0) === 0xFF && data.charCodeAt(1) === 0xFE) { return $cptable.utils.decode(1200, char_codes(data.slice(2))); }\n\t\treturn data;\n\t};\n\t_getchar = function _gc2(x/*:number*/)/*:string*/ {\n\t\tif(current_codepage === 1200) return String.fromCharCode(x);\n\t\treturn $cptable.utils.decode(current_codepage, [x&255,x>>8])[0];\n\t};\n\t_getansi = function _ga2(x/*:number*/)/*:string*/ {\n\t\treturn $cptable.utils.decode(current_ansi, [x])[0];\n\t};\n\tcpdoit();\n}\nexport { set_cptable };\nvar DENSE = null;\nvar DIF_XL = true;\nvar Base64_map = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";\nfunction Base64_encode(input) {\n var o = \"\";\n var c1 = 0, c2 = 0, c3 = 0, e1 = 0, e2 = 0, e3 = 0, e4 = 0;\n for (var i = 0; i < input.length; ) {\n c1 = input.charCodeAt(i++);\n e1 = c1 >> 2;\n c2 = input.charCodeAt(i++);\n e2 = (c1 & 3) << 4 | c2 >> 4;\n c3 = input.charCodeAt(i++);\n e3 = (c2 & 15) << 2 | c3 >> 6;\n e4 = c3 & 63;\n if (isNaN(c2)) {\n e3 = e4 = 64;\n } else if (isNaN(c3)) {\n e4 = 64;\n }\n o += Base64_map.charAt(e1) + Base64_map.charAt(e2) + Base64_map.charAt(e3) + Base64_map.charAt(e4);\n }\n return o;\n}\nfunction Base64_decode(input) {\n var o = \"\";\n var c1 = 0, c2 = 0, c3 = 0, e1 = 0, e2 = 0, e3 = 0, e4 = 0;\n input = input.replace(/[^\\w\\+\\/\\=]/g, \"\");\n for (var i = 0; i < input.length; ) {\n e1 = Base64_map.indexOf(input.charAt(i++));\n e2 = Base64_map.indexOf(input.charAt(i++));\n c1 = e1 << 2 | e2 >> 4;\n o += String.fromCharCode(c1);\n e3 = Base64_map.indexOf(input.charAt(i++));\n c2 = (e2 & 15) << 4 | e3 >> 2;\n if (e3 !== 64) {\n o += String.fromCharCode(c2);\n }\n e4 = Base64_map.indexOf(input.charAt(i++));\n c3 = (e3 & 3) << 6 | e4;\n if (e4 !== 64) {\n o += String.fromCharCode(c3);\n }\n }\n return o;\n}\nvar has_buf = /*#__PURE__*/(function() { return typeof Buffer !== 'undefined' && typeof process !== 'undefined' && typeof process.versions !== 'undefined' && !!process.versions.node; })();\n\nvar Buffer_from = /*#__PURE__*/(function() {\n\tif(typeof Buffer !== 'undefined') {\n\t\tvar nbfs = !Buffer.from;\n\t\tif(!nbfs) try { Buffer.from(\"foo\", \"utf8\"); } catch(e) { nbfs = true; }\n\t\treturn nbfs ? function(buf, enc) { return (enc) ? new Buffer(buf, enc) : new Buffer(buf); } : Buffer.from.bind(Buffer);\n\t}\n\treturn function() {};\n})();\n\n\nfunction new_raw_buf(len/*:number*/) {\n\t/* jshint -W056 */\n\tif(has_buf) return Buffer.alloc ? Buffer.alloc(len) : new Buffer(len);\n\treturn typeof Uint8Array != \"undefined\" ? new Uint8Array(len) : new Array(len);\n\t/* jshint +W056 */\n}\n\nfunction new_unsafe_buf(len/*:number*/) {\n\t/* jshint -W056 */\n\tif(has_buf) return Buffer.allocUnsafe ? Buffer.allocUnsafe(len) : new Buffer(len);\n\treturn typeof Uint8Array != \"undefined\" ? new Uint8Array(len) : new Array(len);\n\t/* jshint +W056 */\n}\n\nvar s2a = function s2a(s/*:string*/)/*:any*/ {\n\tif(has_buf) return Buffer_from(s, \"binary\");\n\treturn s.split(\"\").map(function(x/*:string*/)/*:number*/{ return x.charCodeAt(0) & 0xff; });\n};\n\nfunction s2ab(s/*:string*/)/*:any*/ {\n\tif(typeof ArrayBuffer === 'undefined') return s2a(s);\n\tvar buf = new ArrayBuffer(s.length), view = new Uint8Array(buf);\n\tfor (var i=0; i!=s.length; ++i) view[i] = s.charCodeAt(i) & 0xFF;\n\treturn buf;\n}\n\nfunction a2s(data/*:any*/)/*:string*/ {\n\tif(Array.isArray(data)) return data.map(function(c) { return String.fromCharCode(c); }).join(\"\");\n\tvar o/*:Array*/ = []; for(var i = 0; i < data.length; ++i) o[i] = String.fromCharCode(data[i]); return o.join(\"\");\n}\n\nfunction a2u(data/*:Array*/)/*:Uint8Array*/ {\n\tif(typeof Uint8Array === 'undefined') throw new Error(\"Unsupported\");\n\treturn new Uint8Array(data);\n}\n\nfunction ab2a(data/*:ArrayBuffer|Uint8Array*/)/*:Array*/ {\n\tif(typeof ArrayBuffer == 'undefined') throw new Error(\"Unsupported\");\n\tif(data instanceof ArrayBuffer) return ab2a(new Uint8Array(data));\n\t/*:: if(data instanceof ArrayBuffer) throw new Error(\"unreachable\"); */\n\tvar o = new Array(data.length);\n\tfor(var i = 0; i < data.length; ++i) o[i] = data[i];\n\treturn o;\n}\n\nvar bconcat = has_buf ? function(bufs) { return Buffer.concat(bufs.map(function(buf) { return Buffer.isBuffer(buf) ? buf : Buffer_from(buf); })); } : function(bufs) {\n\tif(typeof Uint8Array !== \"undefined\") {\n\t\tvar i = 0, maxlen = 0;\n\t\tfor(i = 0; i < bufs.length; ++i) maxlen += bufs[i].length;\n\t\tvar o = new Uint8Array(maxlen);\n\t\tvar len = 0;\n\t\tfor(i = 0, maxlen = 0; i < bufs.length; maxlen += len, ++i) {\n\t\t\tlen = bufs[i].length;\n\t\t\tif(bufs[i] instanceof Uint8Array) o.set(bufs[i], maxlen);\n\t\t\telse if(typeof bufs[i] == \"string\") { throw \"wtf\"; }\n\t\t\telse o.set(new Uint8Array(bufs[i]), maxlen);\n\t\t}\n\t\treturn o;\n\t}\n\treturn [].concat.apply([], bufs.map(function(buf) { return Array.isArray(buf) ? buf : [].slice.call(buf); }));\n};\n\nfunction utf8decode(content/*:string*/) {\n\tvar out = [], widx = 0, L = content.length + 250;\n\tvar o = new_raw_buf(content.length + 255);\n\tfor(var ridx = 0; ridx < content.length; ++ridx) {\n\t\tvar c = content.charCodeAt(ridx);\n\t\tif(c < 0x80) o[widx++] = c;\n\t\telse if(c < 0x800) {\n\t\t\to[widx++] = (192|((c>>6)&31));\n\t\t\to[widx++] = (128|(c&63));\n\t\t} else if(c >= 0xD800 && c < 0xE000) {\n\t\t\tc = (c&1023)+64;\n\t\t\tvar d = content.charCodeAt(++ridx)&1023;\n\t\t\to[widx++] = (240|((c>>8)&7));\n\t\t\to[widx++] = (128|((c>>2)&63));\n\t\t\to[widx++] = (128|((d>>6)&15)|((c&3)<<4));\n\t\t\to[widx++] = (128|(d&63));\n\t\t} else {\n\t\t\to[widx++] = (224|((c>>12)&15));\n\t\t\to[widx++] = (128|((c>>6)&63));\n\t\t\to[widx++] = (128|(c&63));\n\t\t}\n\t\tif(widx > L) {\n\t\t\tout.push(o.slice(0, widx));\n\t\t\twidx = 0;\n\t\t\to = new_raw_buf(65535);\n\t\t\tL = 65530;\n\t\t}\n\t}\n\tout.push(o.slice(0, widx));\n\treturn bconcat(out);\n}\n\nvar chr0 = /\\u0000/g, chr1 = /[\\u0001-\\u0006]/g;\n/*::\ndeclare type Block = any;\ndeclare type BufArray = {\n\tnewblk(sz:number):Block;\n\tnext(sz:number):Block;\n\tend():any;\n\tpush(buf:Block):void;\n};\n\ntype RecordHopperCB = {(d:any, Rn:string, RT:number):?boolean;};\n\ntype EvertType = {[string]:string};\ntype EvertNumType = {[string]:number};\ntype EvertArrType = {[string]:Array};\n\ntype StringConv = {(string):string};\n\n*/\n/* ssf.js (C) 2013-present SheetJS -- http://sheetjs.com */\n/*jshint -W041 */\nfunction _strrev(x/*:string*/)/*:string*/ { var o = \"\", i = x.length-1; while(i>=0) o += x.charAt(i--); return o; }\nfunction pad0(v/*:any*/,d/*:number*/)/*:string*/{var t=\"\"+v; return t.length>=d?t:fill('0',d-t.length)+t;}\nfunction pad_(v/*:any*/,d/*:number*/)/*:string*/{var t=\"\"+v;return t.length>=d?t:fill(' ',d-t.length)+t;}\nfunction rpad_(v/*:any*/,d/*:number*/)/*:string*/{var t=\"\"+v; return t.length>=d?t:t+fill(' ',d-t.length);}\nfunction pad0r1(v/*:any*/,d/*:number*/)/*:string*/{var t=\"\"+Math.round(v); return t.length>=d?t:fill('0',d-t.length)+t;}\nfunction pad0r2(v/*:any*/,d/*:number*/)/*:string*/{var t=\"\"+v; return t.length>=d?t:fill('0',d-t.length)+t;}\nvar p2_32 = /*#__PURE__*/Math.pow(2,32);\nfunction pad0r(v/*:any*/,d/*:number*/)/*:string*/{if(v>p2_32||v<-p2_32) return pad0r1(v,d); var i = Math.round(v); return pad0r2(i,d); }\n/* yes, in 2022 this is still faster than string compare */\nfunction SSF_isgeneral(s/*:string*/, i/*:?number*/)/*:boolean*/ { i = i || 0; return s.length >= 7 + i && (s.charCodeAt(i)|32) === 103 && (s.charCodeAt(i+1)|32) === 101 && (s.charCodeAt(i+2)|32) === 110 && (s.charCodeAt(i+3)|32) === 101 && (s.charCodeAt(i+4)|32) === 114 && (s.charCodeAt(i+5)|32) === 97 && (s.charCodeAt(i+6)|32) === 108; }\nvar days/*:Array >*/ = [\n\t['Sun', 'Sunday'],\n\t['Mon', 'Monday'],\n\t['Tue', 'Tuesday'],\n\t['Wed', 'Wednesday'],\n\t['Thu', 'Thursday'],\n\t['Fri', 'Friday'],\n\t['Sat', 'Saturday']\n];\nvar months/*:Array >*/ = [\n\t['J', 'Jan', 'January'],\n\t['F', 'Feb', 'February'],\n\t['M', 'Mar', 'March'],\n\t['A', 'Apr', 'April'],\n\t['M', 'May', 'May'],\n\t['J', 'Jun', 'June'],\n\t['J', 'Jul', 'July'],\n\t['A', 'Aug', 'August'],\n\t['S', 'Sep', 'September'],\n\t['O', 'Oct', 'October'],\n\t['N', 'Nov', 'November'],\n\t['D', 'Dec', 'December']\n];\nfunction SSF_init_table(t/*:any*/) {\n\tif(!t) t = {};\n\tt[0]= 'General';\n\tt[1]= '0';\n\tt[2]= '0.00';\n\tt[3]= '#,##0';\n\tt[4]= '#,##0.00';\n\tt[9]= '0%';\n\tt[10]= '0.00%';\n\tt[11]= '0.00E+00';\n\tt[12]= '# ?/?';\n\tt[13]= '# ??/??';\n\tt[14]= 'm/d/yy';\n\tt[15]= 'd-mmm-yy';\n\tt[16]= 'd-mmm';\n\tt[17]= 'mmm-yy';\n\tt[18]= 'h:mm AM/PM';\n\tt[19]= 'h:mm:ss AM/PM';\n\tt[20]= 'h:mm';\n\tt[21]= 'h:mm:ss';\n\tt[22]= 'm/d/yy h:mm';\n\tt[37]= '#,##0 ;(#,##0)';\n\tt[38]= '#,##0 ;[Red](#,##0)';\n\tt[39]= '#,##0.00;(#,##0.00)';\n\tt[40]= '#,##0.00;[Red](#,##0.00)';\n\tt[45]= 'mm:ss';\n\tt[46]= '[h]:mm:ss';\n\tt[47]= 'mmss.0';\n\tt[48]= '##0.0E+0';\n\tt[49]= '@';\n\tt[56]= '\"上午/下午 \"hh\"時\"mm\"分\"ss\"秒 \"';\n\treturn t;\n}\n/* repeated to satiate webpack */\nvar table_fmt = {\n\t0: 'General',\n\t1: '0',\n\t2: '0.00',\n\t3: '#,##0',\n\t4: '#,##0.00',\n\t9: '0%',\n\t10: '0.00%',\n\t11: '0.00E+00',\n\t12: '# ?/?',\n\t13: '# ??/??',\n\t14: 'm/d/yy',\n\t15: 'd-mmm-yy',\n\t16: 'd-mmm',\n\t17: 'mmm-yy',\n\t18: 'h:mm AM/PM',\n\t19: 'h:mm:ss AM/PM',\n\t20: 'h:mm',\n\t21: 'h:mm:ss',\n\t22: 'm/d/yy h:mm',\n\t37: '#,##0 ;(#,##0)',\n\t38: '#,##0 ;[Red](#,##0)',\n\t39: '#,##0.00;(#,##0.00)',\n\t40: '#,##0.00;[Red](#,##0.00)',\n\t45: 'mm:ss',\n\t46: '[h]:mm:ss',\n\t47: 'mmss.0',\n\t48: '##0.0E+0',\n\t49: '@',\n\t56: '\"上午/下午 \"hh\"時\"mm\"分\"ss\"秒 \"'\n};\n\n/* Defaults determined by systematically testing in Excel 2019 */\n\n/* These formats appear to default to other formats in the table */\nvar SSF_default_map = {\n\t5: 37, 6: 38, 7: 39, 8: 40, // 5 -> 37 ... 8 -> 40\n\n\t23: 0, 24: 0, 25: 0, 26: 0, // 23 -> 0 ... 26 -> 0\n\n\t27: 14, 28: 14, 29: 14, 30: 14, 31: 14, // 27 -> 14 ... 31 -> 14\n\n\t50: 14, 51: 14, 52: 14, 53: 14, 54: 14, // 50 -> 14 ... 58 -> 14\n\t55: 14, 56: 14, 57: 14, 58: 14,\n\t59: 1, 60: 2, 61: 3, 62: 4, // 59 -> 1 ... 62 -> 4\n\n\t67: 9, 68: 10, // 67 -> 9 ... 68 -> 10\n\t69: 12, 70: 13, 71: 14, // 69 -> 12 ... 71 -> 14\n\t72: 14, 73: 15, 74: 16, 75: 17, // 72 -> 14 ... 75 -> 17\n\t76: 20, 77: 21, 78: 22, // 76 -> 20 ... 78 -> 22\n\t79: 45, 80: 46, 81: 47, // 79 -> 45 ... 81 -> 47\n\t82: 0 // 82 -> 0 ... 65536 -> 0 (omitted)\n};\n\n\n/* These formats technically refer to Accounting formats with no equivalent */\nvar SSF_default_str = {\n\t// 5 -- Currency, 0 decimal, black negative\n\t5: '\"$\"#,##0_);\\\\(\"$\"#,##0\\\\)',\n\t63: '\"$\"#,##0_);\\\\(\"$\"#,##0\\\\)',\n\n\t// 6 -- Currency, 0 decimal, red negative\n\t6: '\"$\"#,##0_);[Red]\\\\(\"$\"#,##0\\\\)',\n\t64: '\"$\"#,##0_);[Red]\\\\(\"$\"#,##0\\\\)',\n\n\t// 7 -- Currency, 2 decimal, black negative\n\t7: '\"$\"#,##0.00_);\\\\(\"$\"#,##0.00\\\\)',\n\t65: '\"$\"#,##0.00_);\\\\(\"$\"#,##0.00\\\\)',\n\n\t// 8 -- Currency, 2 decimal, red negative\n\t8: '\"$\"#,##0.00_);[Red]\\\\(\"$\"#,##0.00\\\\)',\n\t66: '\"$\"#,##0.00_);[Red]\\\\(\"$\"#,##0.00\\\\)',\n\n\t// 41 -- Accounting, 0 decimal, No Symbol\n\t41: '_(* #,##0_);_(* \\\\(#,##0\\\\);_(* \"-\"_);_(@_)',\n\n\t// 42 -- Accounting, 0 decimal, $ Symbol\n\t42: '_(\"$\"* #,##0_);_(\"$\"* \\\\(#,##0\\\\);_(\"$\"* \"-\"_);_(@_)',\n\n\t// 43 -- Accounting, 2 decimal, No Symbol\n\t43: '_(* #,##0.00_);_(* \\\\(#,##0.00\\\\);_(* \"-\"??_);_(@_)',\n\n\t// 44 -- Accounting, 2 decimal, $ Symbol\n\t44: '_(\"$\"* #,##0.00_);_(\"$\"* \\\\(#,##0.00\\\\);_(\"$\"* \"-\"??_);_(@_)'\n};\n\nfunction SSF_frac(x/*:number*/, D/*:number*/, mixed/*:?boolean*/)/*:Array*/ {\n\tvar sgn = x < 0 ? -1 : 1;\n\tvar B = x * sgn;\n\tvar P_2 = 0, P_1 = 1, P = 0;\n\tvar Q_2 = 1, Q_1 = 0, Q = 0;\n\tvar A = Math.floor(B);\n\twhile(Q_1 < D) {\n\t\tA = Math.floor(B);\n\t\tP = A * P_1 + P_2;\n\t\tQ = A * Q_1 + Q_2;\n\t\tif((B - A) < 0.00000005) break;\n\t\tB = 1 / (B - A);\n\t\tP_2 = P_1; P_1 = P;\n\t\tQ_2 = Q_1; Q_1 = Q;\n\t}\n\tif(Q > D) { if(Q_1 > D) { Q = Q_2; P = P_2; } else { Q = Q_1; P = P_1; } }\n\tif(!mixed) return [0, sgn * P, Q];\n\tvar q = Math.floor(sgn * P/Q);\n\treturn [q, sgn*P - q*Q, Q];\n}\nfunction SSF_parse_date_code(v/*:number*/,opts/*:?any*/,b2/*:?boolean*/) {\n\tif(v > 2958465 || v < 0) return null;\n\tvar date = (v|0), time = Math.floor(86400 * (v - date)), dow=0;\n\tvar dout=[];\n\tvar out={D:date, T:time, u:86400*(v-date)-time,y:0,m:0,d:0,H:0,M:0,S:0,q:0};\n\tif(Math.abs(out.u) < 1e-6) out.u = 0;\n\tif(opts && opts.date1904) date += 1462;\n\tif(out.u > 0.9999) {\n\t\tout.u = 0;\n\t\tif(++time == 86400) { out.T = time = 0; ++date; ++out.D; }\n\t}\n\tif(date === 60) {dout = b2 ? [1317,10,29] : [1900,2,29]; dow=3;}\n\telse if(date === 0) {dout = b2 ? [1317,8,29] : [1900,1,0]; dow=6;}\n\telse {\n\t\tif(date > 60) --date;\n\t\t/* 1 = Jan 1 1900 in Gregorian */\n\t\tvar d = new Date(1900, 0, 1);\n\t\td.setDate(d.getDate() + date - 1);\n\t\tdout = [d.getFullYear(), d.getMonth()+1,d.getDate()];\n\t\tdow = d.getDay();\n\t\tif(date < 60) dow = (dow + 6) % 7;\n\t\tif(b2) dow = SSF_fix_hijri(d, dout);\n\t}\n\tout.y = dout[0]; out.m = dout[1]; out.d = dout[2];\n\tout.S = time % 60; time = Math.floor(time / 60);\n\tout.M = time % 60; time = Math.floor(time / 60);\n\tout.H = time;\n\tout.q = dow;\n\treturn out;\n}\nvar SSFbasedate = /*#__PURE__*/new Date(1899, 11, 31, 0, 0, 0);\nvar SSFdnthresh = /*#__PURE__*/SSFbasedate.getTime();\nvar SSFbase1904 = /*#__PURE__*/new Date(1900, 2, 1, 0, 0, 0);\nfunction datenum_local(v/*:Date*/, date1904/*:?boolean*/)/*:number*/ {\n\tvar epoch = /*#__PURE__*/v.getTime();\n\tif(date1904) epoch -= 1461*24*60*60*1000;\n\telse if(v >= SSFbase1904) epoch += 24*60*60*1000;\n\treturn (epoch - (SSFdnthresh + (/*#__PURE__*/v.getTimezoneOffset() - /*#__PURE__*/SSFbasedate.getTimezoneOffset()) * 60000)) / (24 * 60 * 60 * 1000);\n}\n/* ECMA-376 18.8.30 numFmt*/\n/* Note: `toPrecision` uses standard form when prec > E and E >= -6 */\n/* exponent >= -9 and <= 9 */\nfunction SSF_strip_decimal(o/*:string*/)/*:string*/ {\n\treturn (o.indexOf(\".\") == -1) ? o : o.replace(/(?:\\.0*|(\\.\\d*[1-9])0+)$/, \"$1\");\n}\n\n/* General Exponential always shows 2 digits exp and trims the mantissa */\nfunction SSF_normalize_exp(o/*:string*/)/*:string*/ {\n\tif(o.indexOf(\"E\") == -1) return o;\n\treturn o.replace(/(?:\\.0*|(\\.\\d*[1-9])0+)[Ee]/,\"$1E\").replace(/(E[+-])(\\d)$/,\"$10$2\");\n}\n\n/* exponent >= -9 and <= 9 */\nfunction SSF_small_exp(v/*:number*/)/*:string*/ {\n\tvar w = (v<0?12:11);\n\tvar o = SSF_strip_decimal(v.toFixed(12)); if(o.length <= w) return o;\n\to = v.toPrecision(10); if(o.length <= w) return o;\n\treturn v.toExponential(5);\n}\n\n/* exponent >= 11 or <= -10 likely exponential */\nfunction SSF_large_exp(v/*:number*/)/*:string*/ {\n\tvar o = SSF_strip_decimal(v.toFixed(11));\n\treturn (o.length > (v<0?12:11) || o === \"0\" || o === \"-0\") ? v.toPrecision(6) : o;\n}\n\nfunction SSF_general_num(v/*:number*/)/*:string*/ {\n\tvar V = Math.floor(Math.log(Math.abs(v))*Math.LOG10E), o;\n\n\tif(V >= -4 && V <= -1) o = v.toPrecision(10+V);\n\telse if(Math.abs(V) <= 9) o = SSF_small_exp(v);\n\telse if(V === 10) o = v.toFixed(10).substr(0,12);\n\telse o = SSF_large_exp(v);\n\n\treturn SSF_strip_decimal(SSF_normalize_exp(o.toUpperCase()));\n}\n\n\n/*\n\t\"General\" rules:\n\t- text is passed through (\"@\")\n\t- booleans are rendered as TRUE/FALSE\n\t- \"up to 11 characters\" displayed for numbers\n\t- Default date format (code 14) used for Dates\n\n\tThe longest 32-bit integer text is \"-2147483648\", exactly 11 chars\n\tTODO: technically the display depends on the width of the cell\n*/\nfunction SSF_general(v/*:any*/, opts/*:any*/) {\n\tswitch(typeof v) {\n\t\tcase 'string': return v;\n\t\tcase 'boolean': return v ? \"TRUE\" : \"FALSE\";\n\t\tcase 'number': return (v|0) === v ? v.toString(10) : SSF_general_num(v);\n\t\tcase 'undefined': return \"\";\n\t\tcase 'object':\n\t\t\tif(v == null) return \"\";\n\t\t\tif(v instanceof Date) return SSF_format(14, datenum_local(v, opts && opts.date1904), opts);\n\t}\n\tthrow new Error(\"unsupported value in General format: \" + v);\n}\n\nfunction SSF_fix_hijri(date/*:Date*/, o/*:[number, number, number]*/) {\n /* TODO: properly adjust y/m/d and */\n o[0] -= 581;\n var dow = date.getDay();\n if(date < 60) dow = (dow + 6) % 7;\n return dow;\n}\n//var THAI_DIGITS = \"\\u0E50\\u0E51\\u0E52\\u0E53\\u0E54\\u0E55\\u0E56\\u0E57\\u0E58\\u0E59\".split(\"\");\nfunction SSF_write_date(type/*:number*/, fmt/*:string*/, val, ss0/*:?number*/)/*:string*/ {\n\tvar o=\"\", ss=0, tt=0, y = val.y, out, outl = 0;\n\tswitch(type) {\n\t\tcase 98: /* 'b' buddhist year */\n\t\t\ty = val.y + 543;\n\t\t\t/* falls through */\n\t\tcase 121: /* 'y' year */\n\t\tswitch(fmt.length) {\n\t\t\tcase 1: case 2: out = y % 100; outl = 2; break;\n\t\t\tdefault: out = y % 10000; outl = 4; break;\n\t\t} break;\n\t\tcase 109: /* 'm' month */\n\t\tswitch(fmt.length) {\n\t\t\tcase 1: case 2: out = val.m; outl = fmt.length; break;\n\t\t\tcase 3: return months[val.m-1][1];\n\t\t\tcase 5: return months[val.m-1][0];\n\t\t\tdefault: return months[val.m-1][2];\n\t\t} break;\n\t\tcase 100: /* 'd' day */\n\t\tswitch(fmt.length) {\n\t\t\tcase 1: case 2: out = val.d; outl = fmt.length; break;\n\t\t\tcase 3: return days[val.q][0];\n\t\t\tdefault: return days[val.q][1];\n\t\t} break;\n\t\tcase 104: /* 'h' 12-hour */\n\t\tswitch(fmt.length) {\n\t\t\tcase 1: case 2: out = 1+(val.H+11)%12; outl = fmt.length; break;\n\t\t\tdefault: throw 'bad hour format: ' + fmt;\n\t\t} break;\n\t\tcase 72: /* 'H' 24-hour */\n\t\tswitch(fmt.length) {\n\t\t\tcase 1: case 2: out = val.H; outl = fmt.length; break;\n\t\t\tdefault: throw 'bad hour format: ' + fmt;\n\t\t} break;\n\t\tcase 77: /* 'M' minutes */\n\t\tswitch(fmt.length) {\n\t\t\tcase 1: case 2: out = val.M; outl = fmt.length; break;\n\t\t\tdefault: throw 'bad minute format: ' + fmt;\n\t\t} break;\n\t\tcase 115: /* 's' seconds */\n\t\t\tif(fmt != 's' && fmt != 'ss' && fmt != '.0' && fmt != '.00' && fmt != '.000') throw 'bad second format: ' + fmt;\n\t\t\tif(val.u === 0 && (fmt == \"s\" || fmt == \"ss\")) return pad0(val.S, fmt.length);\n\t\t\t/*::if(!ss0) ss0 = 0; */\n\t\t\tif(ss0 >= 2) tt = ss0 === 3 ? 1000 : 100;\n\t\t\telse tt = ss0 === 1 ? 10 : 1;\n\t\t\tss = Math.round((tt)*(val.S + val.u));\n\t\t\tif(ss >= 60*tt) ss = 0;\n\t\t\tif(fmt === 's') return ss === 0 ? \"0\" : \"\"+ss/tt;\n\t\t\to = pad0(ss,2 + ss0);\n\t\t\tif(fmt === 'ss') return o.substr(0,2);\n\t\t\treturn \".\" + o.substr(2,fmt.length-1);\n\t\tcase 90: /* 'Z' absolute time */\n\t\tswitch(fmt) {\n\t\t\tcase '[h]': case '[hh]': out = val.D*24+val.H; break;\n\t\t\tcase '[m]': case '[mm]': out = (val.D*24+val.H)*60+val.M; break;\n\t\t\tcase '[s]': case '[ss]': out = ((val.D*24+val.H)*60+val.M)*60+Math.round(val.S+val.u); break;\n\t\t\tdefault: throw 'bad abstime format: ' + fmt;\n\t\t} outl = fmt.length === 3 ? 1 : 2; break;\n\t\tcase 101: /* 'e' era */\n\t\t\tout = y; outl = 1; break;\n\t}\n\tvar outstr = outl > 0 ? pad0(out, outl) : \"\";\n\treturn outstr;\n}\n\n\n/*jshint -W086 */\n/*jshint +W086 */\nfunction commaify(s/*:string*/)/*:string*/ {\n\tvar w = 3;\n\tif(s.length <= w) return s;\n\tvar j = (s.length % w), o = s.substr(0,j);\n\tfor(; j!=s.length; j+=w) o+=(o.length > 0 ? \",\" : \"\") + s.substr(j,w);\n\treturn o;\n}\nvar pct1 = /%/g;\nfunction write_num_pct(type/*:string*/, fmt/*:string*/, val/*:number*/)/*:string*/{\n\tvar sfmt = fmt.replace(pct1,\"\"), mul = fmt.length - sfmt.length;\n\treturn write_num(type, sfmt, val * Math.pow(10,2*mul)) + fill(\"%\",mul);\n}\n\nfunction write_num_cm(type/*:string*/, fmt/*:string*/, val/*:number*/)/*:string*/{\n\tvar idx = fmt.length - 1;\n\twhile(fmt.charCodeAt(idx-1) === 44) --idx;\n\treturn write_num(type, fmt.substr(0,idx), val / Math.pow(10,3*(fmt.length-idx)));\n}\n\nfunction write_num_exp(fmt/*:string*/, val/*:number*/)/*:string*/{\n\tvar o/*:string*/;\n\tvar idx = fmt.indexOf(\"E\") - fmt.indexOf(\".\") - 1;\n\tif(fmt.match(/^#+0.0E\\+0$/)) {\n\t\tif(val == 0) return \"0.0E+0\";\n\t\telse if(val < 0) return \"-\" + write_num_exp(fmt, -val);\n\t\tvar period = fmt.indexOf(\".\"); if(period === -1) period=fmt.indexOf('E');\n\t\tvar ee = Math.floor(Math.log(val)*Math.LOG10E)%period;\n\t\tif(ee < 0) ee += period;\n\t\to = (val/Math.pow(10,ee)).toPrecision(idx+1+(period+ee)%period);\n\t\tif(o.indexOf(\"e\") === -1) {\n\t\t\tvar fakee = Math.floor(Math.log(val)*Math.LOG10E);\n\t\t\tif(o.indexOf(\".\") === -1) o = o.charAt(0) + \".\" + o.substr(1) + \"E+\" + (fakee - o.length+ee);\n\t\t\telse o += \"E+\" + (fakee - ee);\n\t\t\twhile(o.substr(0,2) === \"0.\") {\n\t\t\t\to = o.charAt(0) + o.substr(2,period) + \".\" + o.substr(2+period);\n\t\t\t\to = o.replace(/^0+([1-9])/,\"$1\").replace(/^0+\\./,\"0.\");\n\t\t\t}\n\t\t\to = o.replace(/\\+-/,\"-\");\n\t\t}\n\t\to = o.replace(/^([+-]?)(\\d*)\\.(\\d*)[Ee]/,function($$,$1,$2,$3) { return $1 + $2 + $3.substr(0,(period+ee)%period) + \".\" + $3.substr(ee) + \"E\"; });\n\t} else o = val.toExponential(idx);\n\tif(fmt.match(/E\\+00$/) && o.match(/e[+-]\\d$/)) o = o.substr(0,o.length-1) + \"0\" + o.charAt(o.length-1);\n\tif(fmt.match(/E\\-/) && o.match(/e\\+/)) o = o.replace(/e\\+/,\"e\");\n\treturn o.replace(\"e\",\"E\");\n}\nvar frac1 = /# (\\?+)( ?)\\/( ?)(\\d+)/;\nfunction write_num_f1(r/*:Array*/, aval/*:number*/, sign/*:string*/)/*:string*/ {\n\tvar den = parseInt(r[4],10), rr = Math.round(aval * den), base = Math.floor(rr/den);\n\tvar myn = (rr - base*den), myd = den;\n\treturn sign + (base === 0 ? \"\" : \"\"+base) + \" \" + (myn === 0 ? fill(\" \", r[1].length + 1 + r[4].length) : pad_(myn,r[1].length) + r[2] + \"/\" + r[3] + pad0(myd,r[4].length));\n}\nfunction write_num_f2(r/*:Array*/, aval/*:number*/, sign/*:string*/)/*:string*/ {\n\treturn sign + (aval === 0 ? \"\" : \"\"+aval) + fill(\" \", r[1].length + 2 + r[4].length);\n}\nvar dec1 = /^#*0*\\.([0#]+)/;\nvar closeparen = /\\).*[0#]/;\nvar phone = /\\(###\\) ###\\\\?-####/;\nfunction hashq(str/*:string*/)/*:string*/ {\n\tvar o = \"\", cc;\n\tfor(var i = 0; i != str.length; ++i) switch((cc=str.charCodeAt(i))) {\n\t\tcase 35: break;\n\t\tcase 63: o+= \" \"; break;\n\t\tcase 48: o+= \"0\"; break;\n\t\tdefault: o+= String.fromCharCode(cc);\n\t}\n\treturn o;\n}\nfunction rnd(val/*:number*/, d/*:number*/)/*:string*/ { var dd = Math.pow(10,d); return \"\"+(Math.round(val * dd)/dd); }\nfunction dec(val/*:number*/, d/*:number*/)/*:number*/ {\n\tvar _frac = val - Math.floor(val), dd = Math.pow(10,d);\n\tif (d < ('' + Math.round(_frac * dd)).length) return 0;\n\treturn Math.round(_frac * dd);\n}\nfunction carry(val/*:number*/, d/*:number*/)/*:number*/ {\n\tif (d < ('' + Math.round((val-Math.floor(val))*Math.pow(10,d))).length) {\n\t\treturn 1;\n\t}\n\treturn 0;\n}\nfunction flr(val/*:number*/)/*:string*/ {\n\tif(val < 2147483647 && val > -2147483648) return \"\"+(val >= 0 ? (val|0) : (val-1|0));\n\treturn \"\"+Math.floor(val);\n}\nfunction write_num_flt(type/*:string*/, fmt/*:string*/, val/*:number*/)/*:string*/ {\n\tif(type.charCodeAt(0) === 40 && !fmt.match(closeparen)) {\n\t\tvar ffmt = fmt.replace(/\\( */,\"\").replace(/ \\)/,\"\").replace(/\\)/,\"\");\n\t\tif(val >= 0) return write_num_flt('n', ffmt, val);\n\t\treturn '(' + write_num_flt('n', ffmt, -val) + ')';\n\t}\n\tif(fmt.charCodeAt(fmt.length - 1) === 44) return write_num_cm(type, fmt, val);\n\tif(fmt.indexOf('%') !== -1) return write_num_pct(type, fmt, val);\n\tif(fmt.indexOf('E') !== -1) return write_num_exp(fmt, val);\n\tif(fmt.charCodeAt(0) === 36) return \"$\"+write_num_flt(type,fmt.substr(fmt.charAt(1)==' '?2:1),val);\n\tvar o;\n\tvar r/*:?Array*/, ri, ff, aval = Math.abs(val), sign = val < 0 ? \"-\" : \"\";\n\tif(fmt.match(/^00+$/)) return sign + pad0r(aval,fmt.length);\n\tif(fmt.match(/^[#?]+$/)) {\n\t\to = pad0r(val,0); if(o === \"0\") o = \"\";\n\t\treturn o.length > fmt.length ? o : hashq(fmt.substr(0,fmt.length-o.length)) + o;\n\t}\n\tif((r = fmt.match(frac1))) return write_num_f1(r, aval, sign);\n\tif(fmt.match(/^#+0+$/)) return sign + pad0r(aval,fmt.length - fmt.indexOf(\"0\"));\n\tif((r = fmt.match(dec1))) {\n\t\to = rnd(val, r[1].length).replace(/^([^\\.]+)$/,\"$1.\"+hashq(r[1])).replace(/\\.$/,\".\"+hashq(r[1])).replace(/\\.(\\d*)$/,function($$, $1) { return \".\" + $1 + fill(\"0\", hashq(/*::(*/r/*::||[\"\"])*/[1]).length-$1.length); });\n\t\treturn fmt.indexOf(\"0.\") !== -1 ? o : o.replace(/^0\\./,\".\");\n\t}\n\tfmt = fmt.replace(/^#+([0.])/, \"$1\");\n\tif((r = fmt.match(/^(0*)\\.(#*)$/))) {\n\t\treturn sign + rnd(aval, r[2].length).replace(/\\.(\\d*[1-9])0*$/,\".$1\").replace(/^(-?\\d*)$/,\"$1.\").replace(/^0\\./,r[1].length?\"0.\":\".\");\n\t}\n\tif((r = fmt.match(/^#{1,3},##0(\\.?)$/))) return sign + commaify(pad0r(aval,0));\n\tif((r = fmt.match(/^#,##0\\.([#0]*0)$/))) {\n\t\treturn val < 0 ? \"-\" + write_num_flt(type, fmt, -val) : commaify(\"\"+(Math.floor(val) + carry(val, r[1].length))) + \".\" + pad0(dec(val, r[1].length),r[1].length);\n\t}\n\tif((r = fmt.match(/^#,#*,#0/))) return write_num_flt(type,fmt.replace(/^#,#*,/,\"\"),val);\n\tif((r = fmt.match(/^([0#]+)(\\\\?-([0#]+))+$/))) {\n\t\to = _strrev(write_num_flt(type, fmt.replace(/[\\\\-]/g,\"\"), val));\n\t\tri = 0;\n\t\treturn _strrev(_strrev(fmt.replace(/\\\\/g,\"\")).replace(/[0#]/g,function(x){return ri= 0) return write_num_int('n', ffmt, val);\n\t\treturn '(' + write_num_int('n', ffmt, -val) + ')';\n\t}\n\tif(fmt.charCodeAt(fmt.length - 1) === 44) return write_num_cm2(type, fmt, val);\n\tif(fmt.indexOf('%') !== -1) return write_num_pct2(type, fmt, val);\n\tif(fmt.indexOf('E') !== -1) return write_num_exp2(fmt, val);\n\tif(fmt.charCodeAt(0) === 36) return \"$\"+write_num_int(type,fmt.substr(fmt.charAt(1)==' '?2:1),val);\n\tvar o;\n\tvar r/*:?Array*/, ri, ff, aval = Math.abs(val), sign = val < 0 ? \"-\" : \"\";\n\tif(fmt.match(/^00+$/)) return sign + pad0(aval,fmt.length);\n\tif(fmt.match(/^[#?]+$/)) {\n\t\to = (\"\"+val); if(val === 0) o = \"\";\n\t\treturn o.length > fmt.length ? o : hashq(fmt.substr(0,fmt.length-o.length)) + o;\n\t}\n\tif((r = fmt.match(frac1))) return write_num_f2(r, aval, sign);\n\tif(fmt.match(/^#+0+$/)) return sign + pad0(aval,fmt.length - fmt.indexOf(\"0\"));\n\tif((r = fmt.match(dec1))) {\n\t\t/*:: if(!Array.isArray(r)) throw new Error(\"unreachable\"); */\n\t\to = (\"\"+val).replace(/^([^\\.]+)$/,\"$1.\"+hashq(r[1])).replace(/\\.$/,\".\"+hashq(r[1]));\n\t\to = o.replace(/\\.(\\d*)$/,function($$, $1) {\n\t\t/*:: if(!Array.isArray(r)) throw new Error(\"unreachable\"); */\n\t\t\treturn \".\" + $1 + fill(\"0\", hashq(r[1]).length-$1.length); });\n\t\treturn fmt.indexOf(\"0.\") !== -1 ? o : o.replace(/^0\\./,\".\");\n\t}\n\tfmt = fmt.replace(/^#+([0.])/, \"$1\");\n\tif((r = fmt.match(/^(0*)\\.(#*)$/))) {\n\t\treturn sign + (\"\"+aval).replace(/\\.(\\d*[1-9])0*$/,\".$1\").replace(/^(-?\\d*)$/,\"$1.\").replace(/^0\\./,r[1].length?\"0.\":\".\");\n\t}\n\tif((r = fmt.match(/^#{1,3},##0(\\.?)$/))) return sign + commaify((\"\"+aval));\n\tif((r = fmt.match(/^#,##0\\.([#0]*0)$/))) {\n\t\treturn val < 0 ? \"-\" + write_num_int(type, fmt, -val) : commaify((\"\"+val)) + \".\" + fill('0',r[1].length);\n\t}\n\tif((r = fmt.match(/^#,#*,#0/))) return write_num_int(type,fmt.replace(/^#,#*,/,\"\"),val);\n\tif((r = fmt.match(/^([0#]+)(\\\\?-([0#]+))+$/))) {\n\t\to = _strrev(write_num_int(type, fmt.replace(/[\\\\-]/g,\"\"), val));\n\t\tri = 0;\n\t\treturn _strrev(_strrev(fmt.replace(/\\\\/g,\"\")).replace(/[0#]/g,function(x){return ri*/ {\n\tvar out/*:Array*/ = [];\n\tvar in_str = false/*, cc*/;\n\tfor(var i = 0, j = 0; i < fmt.length; ++i) switch((/*cc=*/fmt.charCodeAt(i))) {\n\t\tcase 34: /* '\"' */\n\t\t\tin_str = !in_str; break;\n\t\tcase 95: case 42: case 92: /* '_' '*' '\\\\' */\n\t\t\t++i; break;\n\t\tcase 59: /* ';' */\n\t\t\tout[out.length] = fmt.substr(j,i-j);\n\t\t\tj = i+1;\n\t}\n\tout[out.length] = fmt.substr(j);\n\tif(in_str === true) throw new Error(\"Format |\" + fmt + \"| unterminated string \");\n\treturn out;\n}\n\nvar SSF_abstime = /\\[[HhMmSs\\u0E0A\\u0E19\\u0E17]*\\]/;\nfunction fmt_is_date(fmt/*:string*/)/*:boolean*/ {\n\tvar i = 0, /*cc = 0,*/ c = \"\", o = \"\";\n\twhile(i < fmt.length) {\n\t\tswitch((c = fmt.charAt(i))) {\n\t\t\tcase 'G': if(SSF_isgeneral(fmt, i)) i+= 6; i++; break;\n\t\t\tcase '\"': for(;(/*cc=*/fmt.charCodeAt(++i)) !== 34 && i < fmt.length;){/*empty*/} ++i; break;\n\t\t\tcase '\\\\': i+=2; break;\n\t\t\tcase '_': i+=2; break;\n\t\t\tcase '@': ++i; break;\n\t\t\tcase 'B': case 'b':\n\t\t\t\tif(fmt.charAt(i+1) === \"1\" || fmt.charAt(i+1) === \"2\") return true;\n\t\t\t\t/* falls through */\n\t\t\tcase 'M': case 'D': case 'Y': case 'H': case 'S': case 'E':\n\t\t\t\t/* falls through */\n\t\t\tcase 'm': case 'd': case 'y': case 'h': case 's': case 'e': case 'g': return true;\n\t\t\tcase 'A': case 'a': case '上':\n\t\t\t\tif(fmt.substr(i, 3).toUpperCase() === \"A/P\") return true;\n\t\t\t\tif(fmt.substr(i, 5).toUpperCase() === \"AM/PM\") return true;\n\t\t\t\tif(fmt.substr(i, 5).toUpperCase() === \"上午/下午\") return true;\n\t\t\t\t++i; break;\n\t\t\tcase '[':\n\t\t\t\to = c;\n\t\t\t\twhile(fmt.charAt(i++) !== ']' && i < fmt.length) o += fmt.charAt(i);\n\t\t\t\tif(o.match(SSF_abstime)) return true;\n\t\t\t\tbreak;\n\t\t\tcase '.':\n\t\t\t\t/* falls through */\n\t\t\tcase '0': case '#':\n\t\t\t\twhile(i < fmt.length && (\"0#?.,E+-%\".indexOf(c=fmt.charAt(++i)) > -1 || (c=='\\\\' && fmt.charAt(i+1) == \"-\" && \"0#\".indexOf(fmt.charAt(i+2))>-1))){/* empty */}\n\t\t\t\tbreak;\n\t\t\tcase '?': while(fmt.charAt(++i) === c){/* empty */} break;\n\t\t\tcase '*': ++i; if(fmt.charAt(i) == ' ' || fmt.charAt(i) == '*') ++i; break;\n\t\t\tcase '(': case ')': ++i; break;\n\t\t\tcase '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9':\n\t\t\t\twhile(i < fmt.length && \"0123456789\".indexOf(fmt.charAt(++i)) > -1){/* empty */} break;\n\t\t\tcase ' ': ++i; break;\n\t\t\tdefault: ++i; break;\n\t\t}\n\t}\n\treturn false;\n}\n\nfunction eval_fmt(fmt/*:string*/, v/*:any*/, opts/*:any*/, flen/*:number*/) {\n\tvar out = [], o = \"\", i = 0, c = \"\", lst='t', dt, j, cc;\n\tvar hr='H';\n\t/* Tokenize */\n\twhile(i < fmt.length) {\n\t\tswitch((c = fmt.charAt(i))) {\n\t\t\tcase 'G': /* General */\n\t\t\t\tif(!SSF_isgeneral(fmt, i)) throw new Error('unrecognized character ' + c + ' in ' +fmt);\n\t\t\t\tout[out.length] = {t:'G', v:'General'}; i+=7; break;\n\t\t\tcase '\"': /* Literal text */\n\t\t\t\tfor(o=\"\";(cc=fmt.charCodeAt(++i)) !== 34 && i < fmt.length;) o += String.fromCharCode(cc);\n\t\t\t\tout[out.length] = {t:'t', v:o}; ++i; break;\n\t\t\tcase '\\\\': var w = fmt.charAt(++i), t = (w === \"(\" || w === \")\") ? w : 't';\n\t\t\t\tout[out.length] = {t:t, v:w}; ++i; break;\n\t\t\tcase '_': out[out.length] = {t:'t', v:\" \"}; i+=2; break;\n\t\t\tcase '@': /* Text Placeholder */\n\t\t\t\tout[out.length] = {t:'T', v:v}; ++i; break;\n\t\t\tcase 'B': case 'b':\n\t\t\t\tif(fmt.charAt(i+1) === \"1\" || fmt.charAt(i+1) === \"2\") {\n\t\t\t\t\tif(dt==null) { dt=SSF_parse_date_code(v, opts, fmt.charAt(i+1) === \"2\"); if(dt==null) return \"\"; }\n\t\t\t\t\tout[out.length] = {t:'X', v:fmt.substr(i,2)}; lst = c; i+=2; break;\n\t\t\t\t}\n\t\t\t\t/* falls through */\n\t\t\tcase 'M': case 'D': case 'Y': case 'H': case 'S': case 'E':\n\t\t\t\tc = c.toLowerCase();\n\t\t\t\t/* falls through */\n\t\t\tcase 'm': case 'd': case 'y': case 'h': case 's': case 'e': case 'g':\n\t\t\t\tif(v < 0) return \"\";\n\t\t\t\tif(dt==null) { dt=SSF_parse_date_code(v, opts); if(dt==null) return \"\"; }\n\t\t\t\to = c; while(++i < fmt.length && fmt.charAt(i).toLowerCase() === c) o+=c;\n\t\t\t\tif(c === 'm' && lst.toLowerCase() === 'h') c = 'M';\n\t\t\t\tif(c === 'h') c = hr;\n\t\t\t\tout[out.length] = {t:c, v:o}; lst = c; break;\n\t\t\tcase 'A': case 'a': case '上':\n\t\t\t\tvar q={t:c, v:c};\n\t\t\t\tif(dt==null) dt=SSF_parse_date_code(v, opts);\n\t\t\t\tif(fmt.substr(i, 3).toUpperCase() === \"A/P\") { if(dt!=null) q.v = dt.H >= 12 ? \"P\" : \"A\"; q.t = 'T'; hr='h';i+=3;}\n\t\t\t\telse if(fmt.substr(i,5).toUpperCase() === \"AM/PM\") { if(dt!=null) q.v = dt.H >= 12 ? \"PM\" : \"AM\"; q.t = 'T'; i+=5; hr='h'; }\n\t\t\t\telse if(fmt.substr(i,5).toUpperCase() === \"上午/下午\") { if(dt!=null) q.v = dt.H >= 12 ? \"下午\" : \"上午\"; q.t = 'T'; i+=5; hr='h'; }\n\t\t\t\telse { q.t = \"t\"; ++i; }\n\t\t\t\tif(dt==null && q.t === 'T') return \"\";\n\t\t\t\tout[out.length] = q; lst = c; break;\n\t\t\tcase '[':\n\t\t\t\to = c;\n\t\t\t\twhile(fmt.charAt(i++) !== ']' && i < fmt.length) o += fmt.charAt(i);\n\t\t\t\tif(o.slice(-1) !== ']') throw 'unterminated \"[\" block: |' + o + '|';\n\t\t\t\tif(o.match(SSF_abstime)) {\n\t\t\t\t\tif(dt==null) { dt=SSF_parse_date_code(v, opts); if(dt==null) return \"\"; }\n\t\t\t\t\tout[out.length] = {t:'Z', v:o.toLowerCase()};\n\t\t\t\t\tlst = o.charAt(1);\n\t\t\t\t} else if(o.indexOf(\"$\") > -1) {\n\t\t\t\t\to = (o.match(/\\$([^-\\[\\]]*)/)||[])[1]||\"$\";\n\t\t\t\t\tif(!fmt_is_date(fmt)) out[out.length] = {t:'t',v:o};\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t/* Numbers */\n\t\t\tcase '.':\n\t\t\t\tif(dt != null) {\n\t\t\t\t\to = c; while(++i < fmt.length && (c=fmt.charAt(i)) === \"0\") o += c;\n\t\t\t\t\tout[out.length] = {t:'s', v:o}; break;\n\t\t\t\t}\n\t\t\t\t/* falls through */\n\t\t\tcase '0': case '#':\n\t\t\t\to = c; while(++i < fmt.length && \"0#?.,E+-%\".indexOf(c=fmt.charAt(i)) > -1) o += c;\n\t\t\t\tout[out.length] = {t:'n', v:o}; break;\n\t\t\tcase '?':\n\t\t\t\to = c; while(fmt.charAt(++i) === c) o+=c;\n\t\t\t\tout[out.length] = {t:c, v:o}; lst = c; break;\n\t\t\tcase '*': ++i; if(fmt.charAt(i) == ' ' || fmt.charAt(i) == '*') ++i; break; // **\n\t\t\tcase '(': case ')': out[out.length] = {t:(flen===1?'t':c), v:c}; ++i; break;\n\t\t\tcase '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9':\n\t\t\t\to = c; while(i < fmt.length && \"0123456789\".indexOf(fmt.charAt(++i)) > -1) o+=fmt.charAt(i);\n\t\t\t\tout[out.length] = {t:'D', v:o}; break;\n\t\t\tcase ' ': out[out.length] = {t:c, v:c}; ++i; break;\n\t\t\tcase '$': out[out.length] = {t:'t', v:'$'}; ++i; break;\n\t\t\tdefault:\n\t\t\t\tif(\",$-+/():!^&'~{}<>=€acfijklopqrtuvwxzP\".indexOf(c) === -1) throw new Error('unrecognized character ' + c + ' in ' + fmt);\n\t\t\t\tout[out.length] = {t:'t', v:c}; ++i; break;\n\t\t}\n\t}\n\n\t/* Scan for date/time parts */\n\tvar bt = 0, ss0 = 0, ssm;\n\tfor(i=out.length-1, lst='t'; i >= 0; --i) {\n\t\tswitch(out[i].t) {\n\t\t\tcase 'h': case 'H': out[i].t = hr; lst='h'; if(bt < 1) bt = 1; break;\n\t\t\tcase 's':\n\t\t\t\tif((ssm=out[i].v.match(/\\.0+$/))) ss0=Math.max(ss0,ssm[0].length-1);\n\t\t\t\tif(bt < 3) bt = 3;\n\t\t\t/* falls through */\n\t\t\tcase 'd': case 'y': case 'M': case 'e': lst=out[i].t; break;\n\t\t\tcase 'm': if(lst === 's') { out[i].t = 'M'; if(bt < 2) bt = 2; } break;\n\t\t\tcase 'X': /*if(out[i].v === \"B2\");*/\n\t\t\t\tbreak;\n\t\t\tcase 'Z':\n\t\t\t\tif(bt < 1 && out[i].v.match(/[Hh]/)) bt = 1;\n\t\t\t\tif(bt < 2 && out[i].v.match(/[Mm]/)) bt = 2;\n\t\t\t\tif(bt < 3 && out[i].v.match(/[Ss]/)) bt = 3;\n\t\t}\n\t}\n\t/* time rounding depends on presence of minute / second / usec fields */\n\tswitch(bt) {\n\t\tcase 0: break;\n\t\tcase 1:\n\t\t\t/*::if(!dt) break;*/\n\t\t\tif(dt.u >= 0.5) { dt.u = 0; ++dt.S; }\n\t\t\tif(dt.S >= 60) { dt.S = 0; ++dt.M; }\n\t\t\tif(dt.M >= 60) { dt.M = 0; ++dt.H; }\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\t/*::if(!dt) break;*/\n\t\t\tif(dt.u >= 0.5) { dt.u = 0; ++dt.S; }\n\t\t\tif(dt.S >= 60) { dt.S = 0; ++dt.M; }\n\t\t\tbreak;\n\t}\n\n\t/* replace fields */\n\tvar nstr = \"\", jj;\n\tfor(i=0; i < out.length; ++i) {\n\t\tswitch(out[i].t) {\n\t\t\tcase 't': case 'T': case ' ': case 'D': break;\n\t\t\tcase 'X': out[i].v = \"\"; out[i].t = \";\"; break;\n\t\t\tcase 'd': case 'm': case 'y': case 'h': case 'H': case 'M': case 's': case 'e': case 'b': case 'Z':\n\t\t\t\t/*::if(!dt) throw \"unreachable\"; */\n\t\t\t\tout[i].v = SSF_write_date(out[i].t.charCodeAt(0), out[i].v, dt, ss0);\n\t\t\t\tout[i].t = 't'; break;\n\t\t\tcase 'n': case '?':\n\t\t\t\tjj = i+1;\n\t\t\t\twhile(out[jj] != null && (\n\t\t\t\t\t(c=out[jj].t) === \"?\" || c === \"D\" ||\n\t\t\t\t\t((c === \" \" || c === \"t\") && out[jj+1] != null && (out[jj+1].t === '?' || out[jj+1].t === \"t\" && out[jj+1].v === '/')) ||\n\t\t\t\t\t(out[i].t === '(' && (c === ' ' || c === 'n' || c === ')')) ||\n\t\t\t\t\t(c === 't' && (out[jj].v === '/' || out[jj].v === ' ' && out[jj+1] != null && out[jj+1].t == '?'))\n\t\t\t\t)) {\n\t\t\t\t\tout[i].v += out[jj].v;\n\t\t\t\t\tout[jj] = {v:\"\", t:\";\"}; ++jj;\n\t\t\t\t}\n\t\t\t\tnstr += out[i].v;\n\t\t\t\ti = jj-1; break;\n\t\t\tcase 'G': out[i].t = 't'; out[i].v = SSF_general(v,opts); break;\n\t\t}\n\t}\n\tvar vv = \"\", myv, ostr;\n\tif(nstr.length > 0) {\n\t\tif(nstr.charCodeAt(0) == 40) /* '(' */ {\n\t\t\tmyv = (v<0&&nstr.charCodeAt(0) === 45 ? -v : v);\n\t\t\tostr = write_num('n', nstr, myv);\n\t\t} else {\n\t\t\tmyv = (v<0 && flen > 1 ? -v : v);\n\t\t\tostr = write_num('n', nstr, myv);\n\t\t\tif(myv < 0 && out[0] && out[0].t == 't') {\n\t\t\t\tostr = ostr.substr(1);\n\t\t\t\tout[0].v = \"-\" + out[0].v;\n\t\t\t}\n\t\t}\n\t\tjj=ostr.length-1;\n\t\tvar decpt = out.length;\n\t\tfor(i=0; i < out.length; ++i) if(out[i] != null && out[i].t != 't' && out[i].v.indexOf(\".\") > -1) { decpt = i; break; }\n\t\tvar lasti=out.length;\n\t\tif(decpt === out.length && ostr.indexOf(\"E\") === -1) {\n\t\t\tfor(i=out.length-1; i>= 0;--i) {\n\t\t\t\tif(out[i] == null || 'n?'.indexOf(out[i].t) === -1) continue;\n\t\t\t\tif(jj>=out[i].v.length-1) { jj -= out[i].v.length; out[i].v = ostr.substr(jj+1, out[i].v.length); }\n\t\t\t\telse if(jj < 0) out[i].v = \"\";\n\t\t\t\telse { out[i].v = ostr.substr(0, jj+1); jj = -1; }\n\t\t\t\tout[i].t = 't';\n\t\t\t\tlasti = i;\n\t\t\t}\n\t\t\tif(jj>=0 && lasti= 0; --i) {\n\t\t\t\tif(out[i] == null || 'n?'.indexOf(out[i].t) === -1) continue;\n\t\t\t\tj=out[i].v.indexOf(\".\")>-1&&i===decpt?out[i].v.indexOf(\".\")-1:out[i].v.length-1;\n\t\t\t\tvv = out[i].v.substr(j+1);\n\t\t\t\tfor(; j>=0; --j) {\n\t\t\t\t\tif(jj>=0 && (out[i].v.charAt(j) === \"0\" || out[i].v.charAt(j) === \"#\")) vv = ostr.charAt(jj--) + vv;\n\t\t\t\t}\n\t\t\t\tout[i].v = vv;\n\t\t\t\tout[i].t = 't';\n\t\t\t\tlasti = i;\n\t\t\t}\n\t\t\tif(jj>=0 && lasti-1&&i===decpt?out[i].v.indexOf(\".\")+1:0;\n\t\t\t\tvv = out[i].v.substr(0,j);\n\t\t\t\tfor(; j-1) {\n\t\tmyv = (flen >1 && v < 0 && i>0 && out[i-1].v === \"-\" ? -v:v);\n\t\tout[i].v = write_num(out[i].t, out[i].v, myv);\n\t\tout[i].t = 't';\n\t}\n\tvar retval = \"\";\n\tfor(i=0; i !== out.length; ++i) if(out[i] != null) retval += out[i].v;\n\treturn retval;\n}\n\nvar cfregex2 = /\\[(=|>[=]?|<[>=]?)(-?\\d+(?:\\.\\d*)?)\\]/;\nfunction chkcond(v, rr) {\n\tif(rr == null) return false;\n\tvar thresh = parseFloat(rr[2]);\n\tswitch(rr[1]) {\n\t\tcase \"=\": if(v == thresh) return true; break;\n\t\tcase \">\": if(v > thresh) return true; break;\n\t\tcase \"<\": if(v < thresh) return true; break;\n\t\tcase \"<>\": if(v != thresh) return true; break;\n\t\tcase \">=\": if(v >= thresh) return true; break;\n\t\tcase \"<=\": if(v <= thresh) return true; break;\n\t}\n\treturn false;\n}\nfunction choose_fmt(f/*:string*/, v/*:any*/) {\n\tvar fmt = SSF_split_fmt(f);\n\tvar l = fmt.length, lat = fmt[l-1].indexOf(\"@\");\n\tif(l<4 && lat>-1) --l;\n\tif(fmt.length > 4) throw new Error(\"cannot find right format for |\" + fmt.join(\"|\") + \"|\");\n\tif(typeof v !== \"number\") return [4, fmt.length === 4 || lat>-1?fmt[fmt.length-1]:\"@\"];\n\tswitch(fmt.length) {\n\t\tcase 1: fmt = lat>-1 ? [\"General\", \"General\", \"General\", fmt[0]] : [fmt[0], fmt[0], fmt[0], \"@\"]; break;\n\t\tcase 2: fmt = lat>-1 ? [fmt[0], fmt[0], fmt[0], fmt[1]] : [fmt[0], fmt[1], fmt[0], \"@\"]; break;\n\t\tcase 3: fmt = lat>-1 ? [fmt[0], fmt[1], fmt[0], fmt[2]] : [fmt[0], fmt[1], fmt[2], \"@\"]; break;\n\t\tcase 4: break;\n\t}\n\tvar ff = v > 0 ? fmt[0] : v < 0 ? fmt[1] : fmt[2];\n\tif(fmt[0].indexOf(\"[\") === -1 && fmt[1].indexOf(\"[\") === -1) return [l, ff];\n\tif(fmt[0].match(/\\[[=<>]/) != null || fmt[1].match(/\\[[=<>]/) != null) {\n\t\tvar m1 = fmt[0].match(cfregex2);\n\t\tvar m2 = fmt[1].match(cfregex2);\n\t\treturn chkcond(v, m1) ? [l, fmt[0]] : chkcond(v, m2) ? [l, fmt[1]] : [l, fmt[m1 != null && m2 != null ? 2 : 1]];\n\t}\n\treturn [l, ff];\n}\nfunction SSF_format(fmt/*:string|number*/,v/*:any*/,o/*:?any*/) {\n\tif(o == null) o = {};\n\tvar sfmt = \"\";\n\tswitch(typeof fmt) {\n\t\tcase \"string\":\n\t\t\tif(fmt == \"m/d/yy\" && o.dateNF) sfmt = o.dateNF;\n\t\t\telse sfmt = fmt;\n\t\t\tbreak;\n\t\tcase \"number\":\n\t\t\tif(fmt == 14 && o.dateNF) sfmt = o.dateNF;\n\t\t\telse sfmt = (o.table != null ? (o.table/*:any*/) : table_fmt)[fmt];\n\t\t\tif(sfmt == null) sfmt = (o.table && o.table[SSF_default_map[fmt]]) || table_fmt[SSF_default_map[fmt]];\n\t\t\tif(sfmt == null) sfmt = SSF_default_str[fmt] || \"General\";\n\t\t\tbreak;\n\t}\n\tif(SSF_isgeneral(sfmt,0)) return SSF_general(v, o);\n\tif(v instanceof Date) v = datenum_local(v, o.date1904);\n\tvar f = choose_fmt(sfmt, v);\n\tif(SSF_isgeneral(f[1])) return SSF_general(v, o);\n\tif(v === true) v = \"TRUE\"; else if(v === false) v = \"FALSE\";\n\telse if(v === \"\" || v == null) return \"\";\n\treturn eval_fmt(f[1], v, o, f[0]);\n}\nfunction SSF_load(fmt/*:string*/, idx/*:?number*/)/*:number*/ {\n\tif(typeof idx != 'number') {\n\t\tidx = +idx || -1;\n/*::if(typeof idx != 'number') return 0x188; */\n\t\tfor(var i = 0; i < 0x0188; ++i) {\n/*::if(typeof idx != 'number') return 0x188; */\n\t\t\tif(table_fmt[i] == undefined) { if(idx < 0) idx = i; continue; }\n\t\t\tif(table_fmt[i] == fmt) { idx = i; break; }\n\t\t}\n/*::if(typeof idx != 'number') return 0x188; */\n\t\tif(idx < 0) idx = 0x187;\n\t}\n/*::if(typeof idx != 'number') return 0x188; */\n\ttable_fmt[idx] = fmt;\n\treturn idx;\n}\nfunction SSF_load_table(tbl/*:SSFTable*/)/*:void*/ {\n\tfor(var i=0; i!=0x0188; ++i)\n\t\tif(tbl[i] !== undefined) SSF_load(tbl[i], i);\n}\n\nfunction make_ssf() {\n\ttable_fmt = SSF_init_table();\n}\n\nvar SSF = {\n\tformat: SSF_format,\n\tload: SSF_load,\n\t_table: table_fmt,\n\tload_table: SSF_load_table,\n\tparse_date_code: SSF_parse_date_code,\n\tis_date: fmt_is_date,\n\tget_table: function get_table() { return SSF._table = table_fmt; }\n};\n\nvar SSFImplicit/*{[number]:string}*/ = ({\n\t\"5\": '\"$\"#,##0_);\\\\(\"$\"#,##0\\\\)',\n\t\"6\": '\"$\"#,##0_);[Red]\\\\(\"$\"#,##0\\\\)',\n\t\"7\": '\"$\"#,##0.00_);\\\\(\"$\"#,##0.00\\\\)',\n\t\"8\": '\"$\"#,##0.00_);[Red]\\\\(\"$\"#,##0.00\\\\)',\n\t\"23\": 'General', \"24\": 'General', \"25\": 'General', \"26\": 'General',\n\t\"27\": 'm/d/yy', \"28\": 'm/d/yy', \"29\": 'm/d/yy', \"30\": 'm/d/yy', \"31\": 'm/d/yy',\n\t\"32\": 'h:mm:ss', \"33\": 'h:mm:ss', \"34\": 'h:mm:ss', \"35\": 'h:mm:ss',\n\t\"36\": 'm/d/yy',\n\t\"41\": '_(* #,##0_);_(* \\(#,##0\\);_(* \"-\"_);_(@_)',\n\t\"42\": '_(\"$\"* #,##0_);_(\"$\"* \\(#,##0\\);_(\"$\"* \"-\"_);_(@_)',\n\t\"43\": '_(* #,##0.00_);_(* \\(#,##0.00\\);_(* \"-\"??_);_(@_)',\n\t\"44\": '_(\"$\"* #,##0.00_);_(\"$\"* \\(#,##0.00\\);_(\"$\"* \"-\"??_);_(@_)',\n\t\"50\": 'm/d/yy', \"51\": 'm/d/yy', \"52\": 'm/d/yy', \"53\": 'm/d/yy', \"54\": 'm/d/yy',\n\t\"55\": 'm/d/yy', \"56\": 'm/d/yy', \"57\": 'm/d/yy', \"58\": 'm/d/yy',\n\t\"59\": '0',\n\t\"60\": '0.00',\n\t\"61\": '#,##0',\n\t\"62\": '#,##0.00',\n\t\"63\": '\"$\"#,##0_);\\\\(\"$\"#,##0\\\\)',\n\t\"64\": '\"$\"#,##0_);[Red]\\\\(\"$\"#,##0\\\\)',\n\t\"65\": '\"$\"#,##0.00_);\\\\(\"$\"#,##0.00\\\\)',\n\t\"66\": '\"$\"#,##0.00_);[Red]\\\\(\"$\"#,##0.00\\\\)',\n\t\"67\": '0%',\n\t\"68\": '0.00%',\n\t\"69\": '# ?/?',\n\t\"70\": '# ??/??',\n\t\"71\": 'm/d/yy',\n\t\"72\": 'm/d/yy',\n\t\"73\": 'd-mmm-yy',\n\t\"74\": 'd-mmm',\n\t\"75\": 'mmm-yy',\n\t\"76\": 'h:mm',\n\t\"77\": 'h:mm:ss',\n\t\"78\": 'm/d/yy h:mm',\n\t\"79\": 'mm:ss',\n\t\"80\": '[h]:mm:ss',\n\t\"81\": 'mmss.0'\n}/*:any*/);\n\n/* dateNF parse TODO: move to SSF */\nvar dateNFregex = /[dD]+|[mM]+|[yYeE]+|[Hh]+|[Ss]+/g;\nfunction dateNF_regex(dateNF/*:string|number*/)/*:RegExp*/ {\n\tvar fmt = typeof dateNF == \"number\" ? table_fmt[dateNF] : dateNF;\n\tfmt = fmt.replace(dateNFregex, \"(\\\\d+)\");\n\treturn new RegExp(\"^\" + fmt + \"$\");\n}\nfunction dateNF_fix(str/*:string*/, dateNF/*:string*/, match/*:Array*/)/*:string*/ {\n\tvar Y = -1, m = -1, d = -1, H = -1, M = -1, S = -1;\n\t(dateNF.match(dateNFregex)||[]).forEach(function(n, i) {\n\t\tvar v = parseInt(match[i+1], 10);\n\t\tswitch(n.toLowerCase().charAt(0)) {\n\t\t\tcase 'y': Y = v; break; case 'd': d = v; break;\n\t\t\tcase 'h': H = v; break; case 's': S = v; break;\n\t\t\tcase 'm': if(H >= 0) M = v; else m = v; break;\n\t\t}\n\t});\n\tif(S >= 0 && M == -1 && m >= 0) { M = m; m = -1; }\n\tvar datestr = ((\"\" + (Y>=0?Y: new Date().getFullYear())).slice(-4) + \"-\" + (\"00\" + (m>=1?m:1)).slice(-2) + \"-\" + (\"00\" + (d>=1?d:1)).slice(-2));\n\tif(datestr.length == 7) datestr = \"0\" + datestr;\n\tif(datestr.length == 8) datestr = \"20\" + datestr;\n\tvar timestr = ((\"00\" + (H>=0?H:0)).slice(-2) + \":\" + (\"00\" + (M>=0?M:0)).slice(-2) + \":\" + (\"00\" + (S>=0?S:0)).slice(-2));\n\tif(H == -1 && M == -1 && S == -1) return datestr;\n\tif(Y == -1 && m == -1 && d == -1) return timestr;\n\treturn datestr + \"T\" + timestr;\n}\n\n/*::\ndeclare var ReadShift:any;\ndeclare var CheckField:any;\ndeclare var prep_blob:any;\ndeclare var __readUInt32LE:any;\ndeclare var __readInt32LE:any;\ndeclare var __toBuffer:any;\ndeclare var __utf16le:any;\ndeclare var bconcat:any;\ndeclare var s2a:any;\ndeclare var chr0:any;\ndeclare var chr1:any;\ndeclare var has_buf:boolean;\ndeclare var new_buf:any;\ndeclare var new_raw_buf:any;\ndeclare var new_unsafe_buf:any;\ndeclare var Buffer_from:any;\n*/\n/* cfb.js (C) 2013-present SheetJS -- http://sheetjs.com */\n/* vim: set ts=2: */\n/*jshint eqnull:true */\n/*exported CFB */\n/*global Uint8Array:false, Uint16Array:false */\n\n/*::\ntype SectorEntry = {\n\tname?:string;\n\tnodes?:Array;\n\tdata:RawBytes;\n};\ntype SectorList = {\n\t[k:string|number]:SectorEntry;\n\tname:?string;\n\tfat_addrs:Array;\n\tssz:number;\n}\ntype CFBFiles = {[n:string]:CFBEntry};\n*/\n/* crc32.js (C) 2014-present SheetJS -- http://sheetjs.com */\n/* vim: set ts=2: */\n/*exported CRC32 */\nvar CRC32 = /*#__PURE__*/(function() {\nvar CRC32 = {};\nCRC32.version = '1.2.0';\n/* see perf/crc32table.js */\n/*global Int32Array */\nfunction signed_crc_table()/*:any*/ {\n\tvar c = 0, table/*:Array*/ = new Array(256);\n\n\tfor(var n =0; n != 256; ++n){\n\t\tc = n;\n\t\tc = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));\n\t\tc = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));\n\t\tc = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));\n\t\tc = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));\n\t\tc = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));\n\t\tc = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));\n\t\tc = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));\n\t\tc = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));\n\t\ttable[n] = c;\n\t}\n\n\treturn typeof Int32Array !== 'undefined' ? new Int32Array(table) : table;\n}\n\nvar T0 = signed_crc_table();\nfunction slice_by_16_tables(T) {\n\tvar c = 0, v = 0, n = 0, table/*:Array*/ = typeof Int32Array !== 'undefined' ? new Int32Array(4096) : new Array(4096) ;\n\n\tfor(n = 0; n != 256; ++n) table[n] = T[n];\n\tfor(n = 0; n != 256; ++n) {\n\t\tv = T[n];\n\t\tfor(c = 256 + n; c < 4096; c += 256) v = table[c] = (v >>> 8) ^ T[v & 0xFF];\n\t}\n\tvar out = [];\n\tfor(n = 1; n != 16; ++n) out[n - 1] = typeof Int32Array !== 'undefined' ? table.subarray(n * 256, n * 256 + 256) : table.slice(n * 256, n * 256 + 256);\n\treturn out;\n}\nvar TT = slice_by_16_tables(T0);\nvar T1 = TT[0], T2 = TT[1], T3 = TT[2], T4 = TT[3], T5 = TT[4];\nvar T6 = TT[5], T7 = TT[6], T8 = TT[7], T9 = TT[8], Ta = TT[9];\nvar Tb = TT[10], Tc = TT[11], Td = TT[12], Te = TT[13], Tf = TT[14];\nfunction crc32_bstr(bstr/*:string*/, seed/*:number*/)/*:number*/ {\n\tvar C = seed/*:: ? 0 : 0 */ ^ -1;\n\tfor(var i = 0, L = bstr.length; i < L;) C = (C>>>8) ^ T0[(C^bstr.charCodeAt(i++))&0xFF];\n\treturn ~C;\n}\n\nfunction crc32_buf(B/*:Uint8Array|Array*/, seed/*:number*/)/*:number*/ {\n\tvar C = seed/*:: ? 0 : 0 */ ^ -1, L = B.length - 15, i = 0;\n\tfor(; i < L;) C =\n\t\tTf[B[i++] ^ (C & 255)] ^\n\t\tTe[B[i++] ^ ((C >> 8) & 255)] ^\n\t\tTd[B[i++] ^ ((C >> 16) & 255)] ^\n\t\tTc[B[i++] ^ (C >>> 24)] ^\n\t\tTb[B[i++]] ^ Ta[B[i++]] ^ T9[B[i++]] ^ T8[B[i++]] ^\n\t\tT7[B[i++]] ^ T6[B[i++]] ^ T5[B[i++]] ^ T4[B[i++]] ^\n\t\tT3[B[i++]] ^ T2[B[i++]] ^ T1[B[i++]] ^ T0[B[i++]];\n\tL += 15;\n\twhile(i < L) C = (C>>>8) ^ T0[(C^B[i++])&0xFF];\n\treturn ~C;\n}\n\nfunction crc32_str(str/*:string*/, seed/*:number*/)/*:number*/ {\n\tvar C = seed ^ -1;\n\tfor(var i = 0, L = str.length, c = 0, d = 0; i < L;) {\n\t\tc = str.charCodeAt(i++);\n\t\tif(c < 0x80) {\n\t\t\tC = (C>>>8) ^ T0[(C^c)&0xFF];\n\t\t} else if(c < 0x800) {\n\t\t\tC = (C>>>8) ^ T0[(C ^ (192|((c>>6)&31)))&0xFF];\n\t\t\tC = (C>>>8) ^ T0[(C ^ (128|(c&63)))&0xFF];\n\t\t} else if(c >= 0xD800 && c < 0xE000) {\n\t\t\tc = (c&1023)+64; d = str.charCodeAt(i++)&1023;\n\t\t\tC = (C>>>8) ^ T0[(C ^ (240|((c>>8)&7)))&0xFF];\n\t\t\tC = (C>>>8) ^ T0[(C ^ (128|((c>>2)&63)))&0xFF];\n\t\t\tC = (C>>>8) ^ T0[(C ^ (128|((d>>6)&15)|((c&3)<<4)))&0xFF];\n\t\t\tC = (C>>>8) ^ T0[(C ^ (128|(d&63)))&0xFF];\n\t\t} else {\n\t\t\tC = (C>>>8) ^ T0[(C ^ (224|((c>>12)&15)))&0xFF];\n\t\t\tC = (C>>>8) ^ T0[(C ^ (128|((c>>6)&63)))&0xFF];\n\t\t\tC = (C>>>8) ^ T0[(C ^ (128|(c&63)))&0xFF];\n\t\t}\n\t}\n\treturn ~C;\n}\nCRC32.table = T0;\nCRC32.bstr = crc32_bstr;\nCRC32.buf = crc32_buf;\nCRC32.str = crc32_str;\nreturn CRC32;\n})();\n/* [MS-CFB] v20171201 */\nvar CFB = /*#__PURE__*/(function _CFB(){\nvar exports = {};\nexports.version = '1.2.1';\n/* [MS-CFB] 2.6.4 */\nfunction namecmp(l/*:string*/, r/*:string*/)/*:number*/ {\n\tvar L = l.split(\"/\"), R = r.split(\"/\");\n\tfor(var i = 0, c = 0, Z = Math.min(L.length, R.length); i < Z; ++i) {\n\t\tif((c = L[i].length - R[i].length)) return c;\n\t\tif(L[i] != R[i]) return L[i] < R[i] ? -1 : 1;\n\t}\n\treturn L.length - R.length;\n}\nfunction dirname(p/*:string*/)/*:string*/ {\n\tif(p.charAt(p.length - 1) == \"/\") return (p.slice(0,-1).indexOf(\"/\") === -1) ? p : dirname(p.slice(0, -1));\n\tvar c = p.lastIndexOf(\"/\");\n\treturn (c === -1) ? p : p.slice(0, c+1);\n}\n\nfunction filename(p/*:string*/)/*:string*/ {\n\tif(p.charAt(p.length - 1) == \"/\") return filename(p.slice(0, -1));\n\tvar c = p.lastIndexOf(\"/\");\n\treturn (c === -1) ? p : p.slice(c+1);\n}\n/* -------------------------------------------------------------------------- */\n/* DOS Date format:\n high|YYYYYYYm.mmmddddd.HHHHHMMM.MMMSSSSS|low\n add 1980 to stored year\n stored second should be doubled\n*/\n\n/* write JS date to buf as a DOS date */\nfunction write_dos_date(buf/*:CFBlob*/, date/*:Date|string*/) {\n\tif(typeof date === \"string\") date = new Date(date);\n\tvar hms/*:number*/ = date.getHours();\n\thms = hms << 6 | date.getMinutes();\n\thms = hms << 5 | (date.getSeconds()>>>1);\n\tbuf.write_shift(2, hms);\n\tvar ymd/*:number*/ = (date.getFullYear() - 1980);\n\tymd = ymd << 4 | (date.getMonth()+1);\n\tymd = ymd << 5 | date.getDate();\n\tbuf.write_shift(2, ymd);\n}\n\n/* read four bytes from buf and interpret as a DOS date */\nfunction parse_dos_date(buf/*:CFBlob*/)/*:Date*/ {\n\tvar hms = buf.read_shift(2) & 0xFFFF;\n\tvar ymd = buf.read_shift(2) & 0xFFFF;\n\tvar val = new Date();\n\tvar d = ymd & 0x1F; ymd >>>= 5;\n\tvar m = ymd & 0x0F; ymd >>>= 4;\n\tval.setMilliseconds(0);\n\tval.setFullYear(ymd + 1980);\n\tval.setMonth(m-1);\n\tval.setDate(d);\n\tvar S = hms & 0x1F; hms >>>= 5;\n\tvar M = hms & 0x3F; hms >>>= 6;\n\tval.setHours(hms);\n\tval.setMinutes(M);\n\tval.setSeconds(S<<1);\n\treturn val;\n}\nfunction parse_extra_field(blob/*:CFBlob*/)/*:any*/ {\n\tprep_blob(blob, 0);\n\tvar o = /*::(*/{}/*:: :any)*/;\n\tvar flags = 0;\n\twhile(blob.l <= blob.length - 4) {\n\t\tvar type = blob.read_shift(2);\n\t\tvar sz = blob.read_shift(2), tgt = blob.l + sz;\n\t\tvar p = {};\n\t\tswitch(type) {\n\t\t\t/* UNIX-style Timestamps */\n\t\t\tcase 0x5455: {\n\t\t\t\tflags = blob.read_shift(1);\n\t\t\t\tif(flags & 1) p.mtime = blob.read_shift(4);\n\t\t\t\t/* for some reason, CD flag corresponds to LFH */\n\t\t\t\tif(sz > 5) {\n\t\t\t\t\tif(flags & 2) p.atime = blob.read_shift(4);\n\t\t\t\t\tif(flags & 4) p.ctime = blob.read_shift(4);\n\t\t\t\t}\n\t\t\t\tif(p.mtime) p.mt = new Date(p.mtime*1000);\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\tblob.l = tgt;\n\t\to[type] = p;\n\t}\n\treturn o;\n}\nvar fs/*:: = require('fs'); */;\nfunction get_fs() { return fs || (fs = {}); }\nfunction parse(file/*:RawBytes*/, options/*:CFBReadOpts*/)/*:CFBContainer*/ {\nif(file[0] == 0x50 && file[1] == 0x4b) return parse_zip(file, options);\nif((file[0] | 0x20) == 0x6d && (file[1]|0x20) == 0x69) return parse_mad(file, options);\nif(file.length < 512) throw new Error(\"CFB file size \" + file.length + \" < 512\");\nvar mver = 3;\nvar ssz = 512;\nvar nmfs = 0; // number of mini FAT sectors\nvar difat_sec_cnt = 0;\nvar dir_start = 0;\nvar minifat_start = 0;\nvar difat_start = 0;\n\nvar fat_addrs/*:Array*/ = []; // locations of FAT sectors\n\n/* [MS-CFB] 2.2 Compound File Header */\nvar blob/*:CFBlob*/ = /*::(*/file.slice(0,512)/*:: :any)*/;\nprep_blob(blob, 0);\n\n/* major version */\nvar mv = check_get_mver(blob);\nmver = mv[0];\nswitch(mver) {\n\tcase 3: ssz = 512; break; case 4: ssz = 4096; break;\n\tcase 0: if(mv[1] == 0) return parse_zip(file, options);\n\t/* falls through */\n\tdefault: throw new Error(\"Major Version: Expected 3 or 4 saw \" + mver);\n}\n\n/* reprocess header */\nif(ssz !== 512) { blob = /*::(*/file.slice(0,ssz)/*:: :any)*/; prep_blob(blob, 28 /* blob.l */); }\n/* Save header for final object */\nvar header/*:RawBytes*/ = file.slice(0,ssz);\n\ncheck_shifts(blob, mver);\n\n// Number of Directory Sectors\nvar dir_cnt/*:number*/ = blob.read_shift(4, 'i');\nif(mver === 3 && dir_cnt !== 0) throw new Error('# Directory Sectors: Expected 0 saw ' + dir_cnt);\n\n// Number of FAT Sectors\nblob.l += 4;\n\n// First Directory Sector Location\ndir_start = blob.read_shift(4, 'i');\n\n// Transaction Signature\nblob.l += 4;\n\n// Mini Stream Cutoff Size\nblob.chk('00100000', 'Mini Stream Cutoff Size: ');\n\n// First Mini FAT Sector Location\nminifat_start = blob.read_shift(4, 'i');\n\n// Number of Mini FAT Sectors\nnmfs = blob.read_shift(4, 'i');\n\n// First DIFAT sector location\ndifat_start = blob.read_shift(4, 'i');\n\n// Number of DIFAT Sectors\ndifat_sec_cnt = blob.read_shift(4, 'i');\n\n// Grab FAT Sector Locations\nfor(var q = -1, j = 0; j < 109; ++j) { /* 109 = (512 - blob.l)>>>2; */\n\tq = blob.read_shift(4, 'i');\n\tif(q<0) break;\n\tfat_addrs[j] = q;\n}\n\n/** Break the file up into sectors */\nvar sectors/*:Array*/ = sectorify(file, ssz);\n\nsleuth_fat(difat_start, difat_sec_cnt, sectors, ssz, fat_addrs);\n\n/** Chains */\nvar sector_list/*:SectorList*/ = make_sector_list(sectors, dir_start, fat_addrs, ssz);\n\nsector_list[dir_start].name = \"!Directory\";\nif(nmfs > 0 && minifat_start !== ENDOFCHAIN) sector_list[minifat_start].name = \"!MiniFAT\";\nsector_list[fat_addrs[0]].name = \"!FAT\";\nsector_list.fat_addrs = fat_addrs;\nsector_list.ssz = ssz;\n\n/* [MS-CFB] 2.6.1 Compound File Directory Entry */\nvar files/*:CFBFiles*/ = {}, Paths/*:Array*/ = [], FileIndex/*:CFBFileIndex*/ = [], FullPaths/*:Array*/ = [];\nread_directory(dir_start, sector_list, sectors, Paths, nmfs, files, FileIndex, minifat_start);\n\nbuild_full_paths(FileIndex, FullPaths, Paths);\nPaths.shift();\n\nvar o = {\n\tFileIndex: FileIndex,\n\tFullPaths: FullPaths\n};\n\n// $FlowIgnore\nif(options && options.raw) o.raw = {header: header, sectors: sectors};\nreturn o;\n} // parse\n\n/* [MS-CFB] 2.2 Compound File Header -- read up to major version */\nfunction check_get_mver(blob/*:CFBlob*/)/*:[number, number]*/ {\n\tif(blob[blob.l] == 0x50 && blob[blob.l + 1] == 0x4b) return [0, 0];\n\t// header signature 8\n\tblob.chk(HEADER_SIGNATURE, 'Header Signature: ');\n\n\t// clsid 16\n\t//blob.chk(HEADER_CLSID, 'CLSID: ');\n\tblob.l += 16;\n\n\t// minor version 2\n\tvar mver/*:number*/ = blob.read_shift(2, 'u');\n\n\treturn [blob.read_shift(2,'u'), mver];\n}\nfunction check_shifts(blob/*:CFBlob*/, mver/*:number*/)/*:void*/ {\n\tvar shift = 0x09;\n\n\t// Byte Order\n\t//blob.chk('feff', 'Byte Order: '); // note: some writers put 0xffff\n\tblob.l += 2;\n\n\t// Sector Shift\n\tswitch((shift = blob.read_shift(2))) {\n\t\tcase 0x09: if(mver != 3) throw new Error('Sector Shift: Expected 9 saw ' + shift); break;\n\t\tcase 0x0c: if(mver != 4) throw new Error('Sector Shift: Expected 12 saw ' + shift); break;\n\t\tdefault: throw new Error('Sector Shift: Expected 9 or 12 saw ' + shift);\n\t}\n\n\t// Mini Sector Shift\n\tblob.chk('0600', 'Mini Sector Shift: ');\n\n\t// Reserved\n\tblob.chk('000000000000', 'Reserved: ');\n}\n\n/** Break the file up into sectors */\nfunction sectorify(file/*:RawBytes*/, ssz/*:number*/)/*:Array*/ {\n\tvar nsectors = Math.ceil(file.length/ssz)-1;\n\tvar sectors/*:Array*/ = [];\n\tfor(var i=1; i < nsectors; ++i) sectors[i-1] = file.slice(i*ssz,(i+1)*ssz);\n\tsectors[nsectors-1] = file.slice(nsectors*ssz);\n\treturn sectors;\n}\n\n/* [MS-CFB] 2.6.4 Red-Black Tree */\nfunction build_full_paths(FI/*:CFBFileIndex*/, FP/*:Array*/, Paths/*:Array*/)/*:void*/ {\n\tvar i = 0, L = 0, R = 0, C = 0, j = 0, pl = Paths.length;\n\tvar dad/*:Array*/ = [], q/*:Array*/ = [];\n\n\tfor(; i < pl; ++i) { dad[i]=q[i]=i; FP[i]=Paths[i]; }\n\n\tfor(; j < q.length; ++j) {\n\t\ti = q[j];\n\t\tL = FI[i].L; R = FI[i].R; C = FI[i].C;\n\t\tif(dad[i] === i) {\n\t\t\tif(L !== -1 /*NOSTREAM*/ && dad[L] !== L) dad[i] = dad[L];\n\t\t\tif(R !== -1 && dad[R] !== R) dad[i] = dad[R];\n\t\t}\n\t\tif(C !== -1 /*NOSTREAM*/) dad[C] = i;\n\t\tif(L !== -1 && i != dad[i]) { dad[L] = dad[i]; if(q.lastIndexOf(L) < j) q.push(L); }\n\t\tif(R !== -1 && i != dad[i]) { dad[R] = dad[i]; if(q.lastIndexOf(R) < j) q.push(R); }\n\t}\n\tfor(i=1; i < pl; ++i) if(dad[i] === i) {\n\t\tif(R !== -1 /*NOSTREAM*/ && dad[R] !== R) dad[i] = dad[R];\n\t\telse if(L !== -1 && dad[L] !== L) dad[i] = dad[L];\n\t}\n\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type === 0 /* unknown */) continue;\n\t\tj = i;\n\t\tif(j != dad[j]) do {\n\t\t\tj = dad[j];\n\t\t\tFP[i] = FP[j] + \"/\" + FP[i];\n\t\t} while (j !== 0 && -1 !== dad[j] && j != dad[j]);\n\t\tdad[i] = -1;\n\t}\n\n\tFP[0] += \"/\";\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type !== 2 /* stream */) FP[i] += \"/\";\n\t}\n}\n\nfunction get_mfat_entry(entry/*:CFBEntry*/, payload/*:RawBytes*/, mini/*:?RawBytes*/)/*:CFBlob*/ {\n\tvar start = entry.start, size = entry.size;\n\t//return (payload.slice(start*MSSZ, start*MSSZ + size)/*:any*/);\n\tvar o = [];\n\tvar idx = start;\n\twhile(mini && size > 0 && idx >= 0) {\n\t\to.push(payload.slice(idx * MSSZ, idx * MSSZ + MSSZ));\n\t\tsize -= MSSZ;\n\t\tidx = __readInt32LE(mini, idx * 4);\n\t}\n\tif(o.length === 0) return (new_buf(0)/*:any*/);\n\treturn (bconcat(o).slice(0, entry.size)/*:any*/);\n}\n\n/** Chase down the rest of the DIFAT chain to build a comprehensive list\n DIFAT chains by storing the next sector number as the last 32 bits */\nfunction sleuth_fat(idx/*:number*/, cnt/*:number*/, sectors/*:Array*/, ssz/*:number*/, fat_addrs)/*:void*/ {\n\tvar q/*:number*/ = ENDOFCHAIN;\n\tif(idx === ENDOFCHAIN) {\n\t\tif(cnt !== 0) throw new Error(\"DIFAT chain shorter than expected\");\n\t} else if(idx !== -1 /*FREESECT*/) {\n\t\tvar sector = sectors[idx], m = (ssz>>>2)-1;\n\t\tif(!sector) return;\n\t\tfor(var i = 0; i < m; ++i) {\n\t\t\tif((q = __readInt32LE(sector,i*4)) === ENDOFCHAIN) break;\n\t\t\tfat_addrs.push(q);\n\t\t}\n\t\tsleuth_fat(__readInt32LE(sector,ssz-4),cnt - 1, sectors, ssz, fat_addrs);\n\t}\n}\n\n/** Follow the linked list of sectors for a given starting point */\nfunction get_sector_list(sectors/*:Array*/, start/*:number*/, fat_addrs/*:Array*/, ssz/*:number*/, chkd/*:?Array*/)/*:SectorEntry*/ {\n\tvar buf/*:Array*/ = [], buf_chain/*:Array*/ = [];\n\tif(!chkd) chkd = [];\n\tvar modulus = ssz - 1, j = 0, jj = 0;\n\tfor(j=start; j>=0;) {\n\t\tchkd[j] = true;\n\t\tbuf[buf.length] = j;\n\t\tbuf_chain.push(sectors[j]);\n\t\tvar addr = fat_addrs[Math.floor(j*4/ssz)];\n\t\tjj = ((j*4) & modulus);\n\t\tif(ssz < 4 + jj) throw new Error(\"FAT boundary crossed: \" + j + \" 4 \"+ssz);\n\t\tif(!sectors[addr]) break;\n\t\tj = __readInt32LE(sectors[addr], jj);\n\t}\n\treturn {nodes: buf, data:__toBuffer([buf_chain])};\n}\n\n/** Chase down the sector linked lists */\nfunction make_sector_list(sectors/*:Array*/, dir_start/*:number*/, fat_addrs/*:Array*/, ssz/*:number*/)/*:SectorList*/ {\n\tvar sl = sectors.length, sector_list/*:SectorList*/ = ([]/*:any*/);\n\tvar chkd/*:Array*/ = [], buf/*:Array*/ = [], buf_chain/*:Array*/ = [];\n\tvar modulus = ssz - 1, i=0, j=0, k=0, jj=0;\n\tfor(i=0; i < sl; ++i) {\n\t\tbuf = ([]/*:Array*/);\n\t\tk = (i + dir_start); if(k >= sl) k-=sl;\n\t\tif(chkd[k]) continue;\n\t\tbuf_chain = [];\n\t\tvar seen = [];\n\t\tfor(j=k; j>=0;) {\n\t\t\tseen[j] = true;\n\t\t\tchkd[j] = true;\n\t\t\tbuf[buf.length] = j;\n\t\t\tbuf_chain.push(sectors[j]);\n\t\t\tvar addr/*:number*/ = fat_addrs[Math.floor(j*4/ssz)];\n\t\t\tjj = ((j*4) & modulus);\n\t\t\tif(ssz < 4 + jj) throw new Error(\"FAT boundary crossed: \" + j + \" 4 \"+ssz);\n\t\t\tif(!sectors[addr]) break;\n\t\t\tj = __readInt32LE(sectors[addr], jj);\n\t\t\tif(seen[j]) break;\n\t\t}\n\t\tsector_list[k] = ({nodes: buf, data:__toBuffer([buf_chain])}/*:SectorEntry*/);\n\t}\n\treturn sector_list;\n}\n\n/* [MS-CFB] 2.6.1 Compound File Directory Entry */\nfunction read_directory(dir_start/*:number*/, sector_list/*:SectorList*/, sectors/*:Array*/, Paths/*:Array*/, nmfs, files, FileIndex, mini) {\n\tvar minifat_store = 0, pl = (Paths.length?2:0);\n\tvar sector = sector_list[dir_start].data;\n\tvar i = 0, namelen = 0, name;\n\tfor(; i < sector.length; i+= 128) {\n\t\tvar blob/*:CFBlob*/ = /*::(*/sector.slice(i, i+128)/*:: :any)*/;\n\t\tprep_blob(blob, 64);\n\t\tnamelen = blob.read_shift(2);\n\t\tname = __utf16le(blob,0,namelen-pl);\n\t\tPaths.push(name);\n\t\tvar o/*:CFBEntry*/ = ({\n\t\t\tname: name,\n\t\t\ttype: blob.read_shift(1),\n\t\t\tcolor: blob.read_shift(1),\n\t\t\tL: blob.read_shift(4, 'i'),\n\t\t\tR: blob.read_shift(4, 'i'),\n\t\t\tC: blob.read_shift(4, 'i'),\n\t\t\tclsid: blob.read_shift(16),\n\t\t\tstate: blob.read_shift(4, 'i'),\n\t\t\tstart: 0,\n\t\t\tsize: 0\n\t\t});\n\t\tvar ctime/*:number*/ = blob.read_shift(2) + blob.read_shift(2) + blob.read_shift(2) + blob.read_shift(2);\n\t\tif(ctime !== 0) o.ct = read_date(blob, blob.l-8);\n\t\tvar mtime/*:number*/ = blob.read_shift(2) + blob.read_shift(2) + blob.read_shift(2) + blob.read_shift(2);\n\t\tif(mtime !== 0) o.mt = read_date(blob, blob.l-8);\n\t\to.start = blob.read_shift(4, 'i');\n\t\to.size = blob.read_shift(4, 'i');\n\t\tif(o.size < 0 && o.start < 0) { o.size = o.type = 0; o.start = ENDOFCHAIN; o.name = \"\"; }\n\t\tif(o.type === 5) { /* root */\n\t\t\tminifat_store = o.start;\n\t\t\tif(nmfs > 0 && minifat_store !== ENDOFCHAIN) sector_list[minifat_store].name = \"!StreamData\";\n\t\t\t/*minifat_size = o.size;*/\n\t\t} else if(o.size >= 4096 /* MSCSZ */) {\n\t\t\to.storage = 'fat';\n\t\t\tif(sector_list[o.start] === undefined) sector_list[o.start] = get_sector_list(sectors, o.start, sector_list.fat_addrs, sector_list.ssz);\n\t\t\tsector_list[o.start].name = o.name;\n\t\t\to.content = (sector_list[o.start].data.slice(0,o.size)/*:any*/);\n\t\t} else {\n\t\t\to.storage = 'minifat';\n\t\t\tif(o.size < 0) o.size = 0;\n\t\t\telse if(minifat_store !== ENDOFCHAIN && o.start !== ENDOFCHAIN && sector_list[minifat_store]) {\n\t\t\t\to.content = get_mfat_entry(o, sector_list[minifat_store].data, (sector_list[mini]||{}).data);\n\t\t\t}\n\t\t}\n\t\tif(o.content) prep_blob(o.content, 0);\n\t\tfiles[name] = o;\n\t\tFileIndex.push(o);\n\t}\n}\n\nfunction read_date(blob/*:RawBytes|CFBlob*/, offset/*:number*/)/*:Date*/ {\n\treturn new Date(( ( (__readUInt32LE(blob,offset+4)/1e7)*Math.pow(2,32)+__readUInt32LE(blob,offset)/1e7 ) - 11644473600)*1000);\n}\n\nfunction read_file(filename/*:string*/, options/*:CFBReadOpts*/) {\n\tget_fs();\n\treturn parse(fs.readFileSync(filename), options);\n}\n\nfunction read(blob/*:RawBytes|string*/, options/*:CFBReadOpts*/) {\n\tvar type = options && options.type;\n\tif(!type) {\n\t\tif(has_buf && Buffer.isBuffer(blob)) type = \"buffer\";\n\t}\n\tswitch(type || \"base64\") {\n\t\tcase \"file\": /*:: if(typeof blob !== 'string') throw \"Must pass a filename when type='file'\"; */return read_file(blob, options);\n\t\tcase \"base64\": /*:: if(typeof blob !== 'string') throw \"Must pass a base64-encoded binary string when type='file'\"; */return parse(s2a(Base64_decode(blob)), options);\n\t\tcase \"binary\": /*:: if(typeof blob !== 'string') throw \"Must pass a binary string when type='file'\"; */return parse(s2a(blob), options);\n\t}\n\treturn parse(/*::typeof blob == 'string' ? new Buffer(blob, 'utf-8') : */blob, options);\n}\n\nfunction init_cfb(cfb/*:CFBContainer*/, opts/*:?any*/)/*:void*/ {\n\tvar o = opts || {}, root = o.root || \"Root Entry\";\n\tif(!cfb.FullPaths) cfb.FullPaths = [];\n\tif(!cfb.FileIndex) cfb.FileIndex = [];\n\tif(cfb.FullPaths.length !== cfb.FileIndex.length) throw new Error(\"inconsistent CFB structure\");\n\tif(cfb.FullPaths.length === 0) {\n\t\tcfb.FullPaths[0] = root + \"/\";\n\t\tcfb.FileIndex[0] = ({ name: root, type: 5 }/*:any*/);\n\t}\n\tif(o.CLSID) cfb.FileIndex[0].clsid = o.CLSID;\n\tseed_cfb(cfb);\n}\nfunction seed_cfb(cfb/*:CFBContainer*/)/*:void*/ {\n\tvar nm = \"\\u0001Sh33tJ5\";\n\tif(CFB.find(cfb, \"/\" + nm)) return;\n\tvar p = new_buf(4); p[0] = 55; p[1] = p[3] = 50; p[2] = 54;\n\tcfb.FileIndex.push(({ name: nm, type: 2, content:p, size:4, L:69, R:69, C:69 }/*:any*/));\n\tcfb.FullPaths.push(cfb.FullPaths[0] + nm);\n\trebuild_cfb(cfb);\n}\nfunction rebuild_cfb(cfb/*:CFBContainer*/, f/*:?boolean*/)/*:void*/ {\n\tinit_cfb(cfb);\n\tvar gc = false, s = false;\n\tfor(var i = cfb.FullPaths.length - 1; i >= 0; --i) {\n\t\tvar _file = cfb.FileIndex[i];\n\t\tswitch(_file.type) {\n\t\t\tcase 0:\n\t\t\t\tif(s) gc = true;\n\t\t\t\telse { cfb.FileIndex.pop(); cfb.FullPaths.pop(); }\n\t\t\t\tbreak;\n\t\t\tcase 1: case 2: case 5:\n\t\t\t\ts = true;\n\t\t\t\tif(isNaN(_file.R * _file.L * _file.C)) gc = true;\n\t\t\t\tif(_file.R > -1 && _file.L > -1 && _file.R == _file.L) gc = true;\n\t\t\t\tbreak;\n\t\t\tdefault: gc = true; break;\n\t\t}\n\t}\n\tif(!gc && !f) return;\n\n\tvar now = new Date(1987, 1, 19), j = 0;\n\t// Track which names exist\n\tvar fullPaths = Object.create ? Object.create(null) : {};\n\tvar data/*:Array<[string, CFBEntry]>*/ = [];\n\tfor(i = 0; i < cfb.FullPaths.length; ++i) {\n\t\tfullPaths[cfb.FullPaths[i]] = true;\n\t\tif(cfb.FileIndex[i].type === 0) continue;\n\t\tdata.push([cfb.FullPaths[i], cfb.FileIndex[i]]);\n\t}\n\tfor(i = 0; i < data.length; ++i) {\n\t\tvar dad = dirname(data[i][0]);\n\t\ts = fullPaths[dad];\n\t\tif(!s) {\n\t\t\tdata.push([dad, ({\n\t\t\t\tname: filename(dad).replace(\"/\",\"\"),\n\t\t\t\ttype: 1,\n\t\t\t\tclsid: HEADER_CLSID,\n\t\t\t\tct: now, mt: now,\n\t\t\t\tcontent: null\n\t\t\t}/*:any*/)]);\n\t\t\t// Add name to set\n\t\t\tfullPaths[dad] = true;\n\t\t}\n\t}\n\n\tdata.sort(function(x,y) { return namecmp(x[0], y[0]); });\n\tcfb.FullPaths = []; cfb.FileIndex = [];\n\tfor(i = 0; i < data.length; ++i) { cfb.FullPaths[i] = data[i][0]; cfb.FileIndex[i] = data[i][1]; }\n\tfor(i = 0; i < data.length; ++i) {\n\t\tvar elt = cfb.FileIndex[i];\n\t\tvar nm = cfb.FullPaths[i];\n\n\t\telt.name = filename(nm).replace(\"/\",\"\");\n\t\telt.L = elt.R = elt.C = -(elt.color = 1);\n\t\telt.size = elt.content ? elt.content.length : 0;\n\t\telt.start = 0;\n\t\telt.clsid = (elt.clsid || HEADER_CLSID);\n\t\tif(i === 0) {\n\t\t\telt.C = data.length > 1 ? 1 : -1;\n\t\t\telt.size = 0;\n\t\t\telt.type = 5;\n\t\t} else if(nm.slice(-1) == \"/\") {\n\t\t\tfor(j=i+1;j < data.length; ++j) if(dirname(cfb.FullPaths[j])==nm) break;\n\t\t\telt.C = j >= data.length ? -1 : j;\n\t\t\tfor(j=i+1;j < data.length; ++j) if(dirname(cfb.FullPaths[j])==dirname(nm)) break;\n\t\t\telt.R = j >= data.length ? -1 : j;\n\t\t\telt.type = 1;\n\t\t} else {\n\t\t\tif(dirname(cfb.FullPaths[i+1]||\"\") == dirname(nm)) elt.R = i + 1;\n\t\t\telt.type = 2;\n\t\t}\n\t}\n\n}\n\nfunction _write(cfb/*:CFBContainer*/, options/*:CFBWriteOpts*/)/*:RawBytes|string*/ {\n\tvar _opts = options || {};\n\t/* MAD is order-sensitive, skip rebuild and sort */\n\tif(_opts.fileType == 'mad') return write_mad(cfb, _opts);\n\trebuild_cfb(cfb);\n\tswitch(_opts.fileType) {\n\t\tcase 'zip': return write_zip(cfb, _opts);\n\t\t//case 'mad': return write_mad(cfb, _opts);\n\t}\n\tvar L = (function(cfb/*:CFBContainer*/)/*:Array*/{\n\t\tvar mini_size = 0, fat_size = 0;\n\t\tfor(var i = 0; i < cfb.FileIndex.length; ++i) {\n\t\t\tvar file = cfb.FileIndex[i];\n\t\t\tif(!file.content) continue;\n\t\t\t/*:: if(file.content == null) throw new Error(\"unreachable\"); */\n\t\t\tvar flen = file.content.length;\n\t\t\tif(flen > 0){\n\t\t\t\tif(flen < 0x1000) mini_size += (flen + 0x3F) >> 6;\n\t\t\t\telse fat_size += (flen + 0x01FF) >> 9;\n\t\t\t}\n\t\t}\n\t\tvar dir_cnt = (cfb.FullPaths.length +3) >> 2;\n\t\tvar mini_cnt = (mini_size + 7) >> 3;\n\t\tvar mfat_cnt = (mini_size + 0x7F) >> 7;\n\t\tvar fat_base = mini_cnt + fat_size + dir_cnt + mfat_cnt;\n\t\tvar fat_cnt = (fat_base + 0x7F) >> 7;\n\t\tvar difat_cnt = fat_cnt <= 109 ? 0 : Math.ceil((fat_cnt-109)/0x7F);\n\t\twhile(((fat_base + fat_cnt + difat_cnt + 0x7F) >> 7) > fat_cnt) difat_cnt = ++fat_cnt <= 109 ? 0 : Math.ceil((fat_cnt-109)/0x7F);\n\t\tvar L = [1, difat_cnt, fat_cnt, mfat_cnt, dir_cnt, fat_size, mini_size, 0];\n\t\tcfb.FileIndex[0].size = mini_size << 6;\n\t\tL[7] = (cfb.FileIndex[0].start=L[0]+L[1]+L[2]+L[3]+L[4]+L[5])+((L[6]+7) >> 3);\n\t\treturn L;\n\t})(cfb);\n\tvar o = new_buf(L[7] << 9);\n\tvar i = 0, T = 0;\n\t{\n\t\tfor(i = 0; i < 8; ++i) o.write_shift(1, HEADER_SIG[i]);\n\t\tfor(i = 0; i < 8; ++i) o.write_shift(2, 0);\n\t\to.write_shift(2, 0x003E);\n\t\to.write_shift(2, 0x0003);\n\t\to.write_shift(2, 0xFFFE);\n\t\to.write_shift(2, 0x0009);\n\t\to.write_shift(2, 0x0006);\n\t\tfor(i = 0; i < 3; ++i) o.write_shift(2, 0);\n\t\to.write_shift(4, 0);\n\t\to.write_shift(4, L[2]);\n\t\to.write_shift(4, L[0] + L[1] + L[2] + L[3] - 1);\n\t\to.write_shift(4, 0);\n\t\to.write_shift(4, 1<<12);\n\t\to.write_shift(4, L[3] ? L[0] + L[1] + L[2] - 1: ENDOFCHAIN);\n\t\to.write_shift(4, L[3]);\n\t\to.write_shift(-4, L[1] ? L[0] - 1: ENDOFCHAIN);\n\t\to.write_shift(4, L[1]);\n\t\tfor(i = 0; i < 109; ++i) o.write_shift(-4, i < L[2] ? L[1] + i : -1);\n\t}\n\tif(L[1]) {\n\t\tfor(T = 0; T < L[1]; ++T) {\n\t\t\tfor(; i < 236 + T * 127; ++i) o.write_shift(-4, i < L[2] ? L[1] + i : -1);\n\t\t\to.write_shift(-4, T === L[1] - 1 ? ENDOFCHAIN : T + 1);\n\t\t}\n\t}\n\tvar chainit = function(w/*:number*/)/*:void*/ {\n\t\tfor(T += w; i> 9);\n\t}\n\tchainit((L[6] + 7) >> 3);\n\twhile(o.l & 0x1FF) o.write_shift(-4, consts.ENDOFCHAIN);\n\tT = i = 0;\n\tfor(j = 0; j < cfb.FileIndex.length; ++j) {\n\t\tfile = cfb.FileIndex[j];\n\t\tif(!file.content) continue;\n\t\t/*:: if(file.content == null) throw new Error(\"unreachable\"); */\n\t\tflen = file.content.length;\n\t\tif(!flen || flen >= 0x1000) continue;\n\t\tfile.start = T;\n\t\tchainit((flen + 0x3F) >> 6);\n\t}\n\twhile(o.l & 0x1FF) o.write_shift(-4, consts.ENDOFCHAIN);\n\tfor(i = 0; i < L[4]<<2; ++i) {\n\t\tvar nm = cfb.FullPaths[i];\n\t\tif(!nm || nm.length === 0) {\n\t\t\tfor(j = 0; j < 17; ++j) o.write_shift(4, 0);\n\t\t\tfor(j = 0; j < 3; ++j) o.write_shift(4, -1);\n\t\t\tfor(j = 0; j < 12; ++j) o.write_shift(4, 0);\n\t\t\tcontinue;\n\t\t}\n\t\tfile = cfb.FileIndex[i];\n\t\tif(i === 0) file.start = file.size ? file.start - 1 : ENDOFCHAIN;\n\t\tvar _nm/*:string*/ = (i === 0 && _opts.root) || file.name;\n\t\tflen = 2*(_nm.length+1);\n\t\to.write_shift(64, _nm, \"utf16le\");\n\t\to.write_shift(2, flen);\n\t\to.write_shift(1, file.type);\n\t\to.write_shift(1, file.color);\n\t\to.write_shift(-4, file.L);\n\t\to.write_shift(-4, file.R);\n\t\to.write_shift(-4, file.C);\n\t\tif(!file.clsid) for(j = 0; j < 4; ++j) o.write_shift(4, 0);\n\t\telse o.write_shift(16, file.clsid, \"hex\");\n\t\to.write_shift(4, file.state || 0);\n\t\to.write_shift(4, 0); o.write_shift(4, 0);\n\t\to.write_shift(4, 0); o.write_shift(4, 0);\n\t\to.write_shift(4, file.start);\n\t\to.write_shift(4, file.size); o.write_shift(4, 0);\n\t}\n\tfor(i = 1; i < cfb.FileIndex.length; ++i) {\n\t\tfile = cfb.FileIndex[i];\n\t\t/*:: if(!file.content) throw new Error(\"unreachable\"); */\n\t\tif(file.size >= 0x1000) {\n\t\t\to.l = (file.start+1) << 9;\n\t\t\tif (has_buf && Buffer.isBuffer(file.content)) {\n\t\t\t\tfile.content.copy(o, o.l, 0, file.size);\n\t\t\t\t// o is a 0-filled Buffer so just set next offset\n\t\t\t\to.l += (file.size + 511) & -512;\n\t\t\t} else {\n\t\t\t\tfor(j = 0; j < file.size; ++j) o.write_shift(1, file.content[j]);\n\t\t\t\tfor(; j & 0x1FF; ++j) o.write_shift(1, 0);\n\t\t\t}\n\t\t}\n\t}\n\tfor(i = 1; i < cfb.FileIndex.length; ++i) {\n\t\tfile = cfb.FileIndex[i];\n\t\t/*:: if(!file.content) throw new Error(\"unreachable\"); */\n\t\tif(file.size > 0 && file.size < 0x1000) {\n\t\t\tif (has_buf && Buffer.isBuffer(file.content)) {\n\t\t\t\tfile.content.copy(o, o.l, 0, file.size);\n\t\t\t\t// o is a 0-filled Buffer so just set next offset\n\t\t\t\to.l += (file.size + 63) & -64;\n\t\t\t} else {\n\t\t\t\tfor(j = 0; j < file.size; ++j) o.write_shift(1, file.content[j]);\n\t\t\t\tfor(; j & 0x3F; ++j) o.write_shift(1, 0);\n\t\t\t}\n\t\t}\n\t}\n\tif (has_buf) {\n\t\to.l = o.length;\n\t} else {\n\t\t// When using Buffer, already 0-filled\n\t\twhile(o.l < o.length) o.write_shift(1, 0);\n\t}\n\treturn o;\n}\n/* [MS-CFB] 2.6.4 (Unicode 3.0.1 case conversion) */\nfunction find(cfb/*:CFBContainer*/, path/*:string*/)/*:?CFBEntry*/ {\n\tvar UCFullPaths/*:Array*/ = cfb.FullPaths.map(function(x) { return x.toUpperCase(); });\n\tvar UCPaths/*:Array*/ = UCFullPaths.map(function(x) { var y = x.split(\"/\"); return y[y.length - (x.slice(-1) == \"/\" ? 2 : 1)]; });\n\tvar k/*:boolean*/ = false;\n\tif(path.charCodeAt(0) === 47 /* \"/\" */) { k = true; path = UCFullPaths[0].slice(0, -1) + path; }\n\telse k = path.indexOf(\"/\") !== -1;\n\tvar UCPath/*:string*/ = path.toUpperCase();\n\tvar w/*:number*/ = k === true ? UCFullPaths.indexOf(UCPath) : UCPaths.indexOf(UCPath);\n\tif(w !== -1) return cfb.FileIndex[w];\n\n\tvar m = !UCPath.match(chr1);\n\tUCPath = UCPath.replace(chr0,'');\n\tif(m) UCPath = UCPath.replace(chr1,'!');\n\tfor(w = 0; w < UCFullPaths.length; ++w) {\n\t\tif((m ? UCFullPaths[w].replace(chr1,'!') : UCFullPaths[w]).replace(chr0,'') == UCPath) return cfb.FileIndex[w];\n\t\tif((m ? UCPaths[w].replace(chr1,'!') : UCPaths[w]).replace(chr0,'') == UCPath) return cfb.FileIndex[w];\n\t}\n\treturn null;\n}\n/** CFB Constants */\nvar MSSZ = 64; /* Mini Sector Size = 1<<6 */\n//var MSCSZ = 4096; /* Mini Stream Cutoff Size */\n/* 2.1 Compound File Sector Numbers and Types */\nvar ENDOFCHAIN = -2;\n/* 2.2 Compound File Header */\nvar HEADER_SIGNATURE = 'd0cf11e0a1b11ae1';\nvar HEADER_SIG = [0xD0, 0xCF, 0x11, 0xE0, 0xA1, 0xB1, 0x1A, 0xE1];\nvar HEADER_CLSID = '00000000000000000000000000000000';\nvar consts = {\n\t/* 2.1 Compund File Sector Numbers and Types */\n\tMAXREGSECT: -6,\n\tDIFSECT: -4,\n\tFATSECT: -3,\n\tENDOFCHAIN: ENDOFCHAIN,\n\tFREESECT: -1,\n\t/* 2.2 Compound File Header */\n\tHEADER_SIGNATURE: HEADER_SIGNATURE,\n\tHEADER_MINOR_VERSION: '3e00',\n\tMAXREGSID: -6,\n\tNOSTREAM: -1,\n\tHEADER_CLSID: HEADER_CLSID,\n\t/* 2.6.1 Compound File Directory Entry */\n\tEntryTypes: ['unknown','storage','stream','lockbytes','property','root']\n};\n\nfunction write_file(cfb/*:CFBContainer*/, filename/*:string*/, options/*:CFBWriteOpts*/)/*:void*/ {\n\tget_fs();\n\tvar o = _write(cfb, options);\n\t/*:: if(typeof Buffer == 'undefined' || !Buffer.isBuffer(o) || !(o instanceof Buffer)) throw new Error(\"unreachable\"); */\n\tfs.writeFileSync(filename, o);\n}\n\nfunction a2s(o/*:RawBytes*/)/*:string*/ {\n\tvar out = new Array(o.length);\n\tfor(var i = 0; i < o.length; ++i) out[i] = String.fromCharCode(o[i]);\n\treturn out.join(\"\");\n}\n\nfunction write(cfb/*:CFBContainer*/, options/*:CFBWriteOpts*/)/*:RawBytes|string*/ {\n\tvar o = _write(cfb, options);\n\tswitch(options && options.type || \"buffer\") {\n\t\tcase \"file\": get_fs(); fs.writeFileSync(options.filename, (o/*:any*/)); return o;\n\t\tcase \"binary\": return typeof o == \"string\" ? o : a2s(o);\n\t\tcase \"base64\": return Base64_encode(typeof o == \"string\" ? o : a2s(o));\n\t\tcase \"buffer\": if(has_buf) return Buffer.isBuffer(o) ? o : Buffer_from(o);\n\t\t\t/* falls through */\n\t\tcase \"array\": return typeof o == \"string\" ? s2a(o) : o;\n\t}\n\treturn o;\n}\n/* node < 8.1 zlib does not expose bytesRead, so default to pure JS */\nvar _zlib;\nfunction use_zlib(zlib) { try {\n\tvar InflateRaw = zlib.InflateRaw;\n\tvar InflRaw = new InflateRaw();\n\tInflRaw._processChunk(new Uint8Array([3, 0]), InflRaw._finishFlushFlag);\n\tif(InflRaw.bytesRead) _zlib = zlib;\n\telse throw new Error(\"zlib does not expose bytesRead\");\n} catch(e) {console.error(\"cannot use native zlib: \" + (e.message || e)); } }\n\nfunction _inflateRawSync(payload, usz) {\n\tif(!_zlib) return _inflate(payload, usz);\n\tvar InflateRaw = _zlib.InflateRaw;\n\tvar InflRaw = new InflateRaw();\n\tvar out = InflRaw._processChunk(payload.slice(payload.l), InflRaw._finishFlushFlag);\n\tpayload.l += InflRaw.bytesRead;\n\treturn out;\n}\n\nfunction _deflateRawSync(payload) {\n\treturn _zlib ? _zlib.deflateRawSync(payload) : _deflate(payload);\n}\nvar CLEN_ORDER = [ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ];\n\n/* LEN_ID = [ 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285 ]; */\nvar LEN_LN = [ 3, 4, 5, 6, 7, 8, 9, 10, 11, 13 , 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258 ];\n\n/* DST_ID = [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29 ]; */\nvar DST_LN = [ 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577 ];\n\nfunction bit_swap_8(n) { var t = (((((n<<1)|(n<<11)) & 0x22110) | (((n<<5)|(n<<15)) & 0x88440))); return ((t>>16) | (t>>8) |t)&0xFF; }\n\nvar use_typed_arrays = typeof Uint8Array !== 'undefined';\n\nvar bitswap8 = use_typed_arrays ? new Uint8Array(1<<8) : [];\nfor(var q = 0; q < (1<<8); ++q) bitswap8[q] = bit_swap_8(q);\n\nfunction bit_swap_n(n, b) {\n\tvar rev = bitswap8[n & 0xFF];\n\tif(b <= 8) return rev >>> (8-b);\n\trev = (rev << 8) | bitswap8[(n>>8)&0xFF];\n\tif(b <= 16) return rev >>> (16-b);\n\trev = (rev << 8) | bitswap8[(n>>16)&0xFF];\n\treturn rev >>> (24-b);\n}\n\n/* helpers for unaligned bit reads */\nfunction read_bits_2(buf, bl) { var w = (bl&7), h = (bl>>>3); return ((buf[h]|(w <= 6 ? 0 : buf[h+1]<<8))>>>w)& 0x03; }\nfunction read_bits_3(buf, bl) { var w = (bl&7), h = (bl>>>3); return ((buf[h]|(w <= 5 ? 0 : buf[h+1]<<8))>>>w)& 0x07; }\nfunction read_bits_4(buf, bl) { var w = (bl&7), h = (bl>>>3); return ((buf[h]|(w <= 4 ? 0 : buf[h+1]<<8))>>>w)& 0x0F; }\nfunction read_bits_5(buf, bl) { var w = (bl&7), h = (bl>>>3); return ((buf[h]|(w <= 3 ? 0 : buf[h+1]<<8))>>>w)& 0x1F; }\nfunction read_bits_7(buf, bl) { var w = (bl&7), h = (bl>>>3); return ((buf[h]|(w <= 1 ? 0 : buf[h+1]<<8))>>>w)& 0x7F; }\n\n/* works up to n = 3 * 8 + 1 = 25 */\nfunction read_bits_n(buf, bl, n) {\n\tvar w = (bl&7), h = (bl>>>3), f = ((1<>> w;\n\tif(n < 8 - w) return v & f;\n\tv |= buf[h+1]<<(8-w);\n\tif(n < 16 - w) return v & f;\n\tv |= buf[h+2]<<(16-w);\n\tif(n < 24 - w) return v & f;\n\tv |= buf[h+3]<<(24-w);\n\treturn v & f;\n}\n\n/* helpers for unaligned bit writes */\nfunction write_bits_3(buf, bl, v) { var w = bl & 7, h = bl >>> 3;\n\tif(w <= 5) buf[h] |= (v & 7) << w;\n\telse {\n\t\tbuf[h] |= (v << w) & 0xFF;\n\t\tbuf[h+1] = (v&7) >> (8-w);\n\t}\n\treturn bl + 3;\n}\n\nfunction write_bits_1(buf, bl, v) {\n\tvar w = bl & 7, h = bl >>> 3;\n\tv = (v&1) << w;\n\tbuf[h] |= v;\n\treturn bl + 1;\n}\nfunction write_bits_8(buf, bl, v) {\n\tvar w = bl & 7, h = bl >>> 3;\n\tv <<= w;\n\tbuf[h] |= v & 0xFF; v >>>= 8;\n\tbuf[h+1] = v;\n\treturn bl + 8;\n}\nfunction write_bits_16(buf, bl, v) {\n\tvar w = bl & 7, h = bl >>> 3;\n\tv <<= w;\n\tbuf[h] |= v & 0xFF; v >>>= 8;\n\tbuf[h+1] = v & 0xFF;\n\tbuf[h+2] = v >>> 8;\n\treturn bl + 16;\n}\n\n/* until ArrayBuffer#realloc is a thing, fake a realloc */\nfunction realloc(b, sz/*:number*/) {\n\tvar L = b.length, M = 2*L > sz ? 2*L : sz + 5, i = 0;\n\tif(L >= sz) return b;\n\tif(has_buf) {\n\t\tvar o = new_unsafe_buf(M);\n\t\t// $FlowIgnore\n\t\tif(b.copy) b.copy(o);\n\t\telse for(; i < b.length; ++i) o[i] = b[i];\n\t\treturn o;\n\t} else if(use_typed_arrays) {\n\t\tvar a = new Uint8Array(M);\n\t\tif(a.set) a.set(b);\n\t\telse for(; i < L; ++i) a[i] = b[i];\n\t\treturn a;\n\t}\n\tb.length = M;\n\treturn b;\n}\n\n/* zero-filled arrays for older browsers */\nfunction zero_fill_array(n) {\n\tvar o = new Array(n);\n\tfor(var i = 0; i < n; ++i) o[i] = 0;\n\treturn o;\n}\n\n/* build tree (used for literals and lengths) */\nfunction build_tree(clens, cmap, MAX/*:number*/)/*:number*/ {\n\tvar maxlen = 1, w = 0, i = 0, j = 0, ccode = 0, L = clens.length;\n\n\tvar bl_count = use_typed_arrays ? new Uint16Array(32) : zero_fill_array(32);\n\tfor(i = 0; i < 32; ++i) bl_count[i] = 0;\n\n\tfor(i = L; i < MAX; ++i) clens[i] = 0;\n\tL = clens.length;\n\n\tvar ctree = use_typed_arrays ? new Uint16Array(L) : zero_fill_array(L); // []\n\n\t/* build code tree */\n\tfor(i = 0; i < L; ++i) {\n\t\tbl_count[(w = clens[i])]++;\n\t\tif(maxlen < w) maxlen = w;\n\t\tctree[i] = 0;\n\t}\n\tbl_count[0] = 0;\n\tfor(i = 1; i <= maxlen; ++i) bl_count[i+16] = (ccode = (ccode + bl_count[i-1])<<1);\n\tfor(i = 0; i < L; ++i) {\n\t\tccode = clens[i];\n\t\tif(ccode != 0) ctree[i] = bl_count[ccode+16]++;\n\t}\n\n\t/* cmap[maxlen + 4 bits] = (off&15) + (lit<<4) reverse mapping */\n\tvar cleni = 0;\n\tfor(i = 0; i < L; ++i) {\n\t\tcleni = clens[i];\n\t\tif(cleni != 0) {\n\t\t\tccode = bit_swap_n(ctree[i], maxlen)>>(maxlen-cleni);\n\t\t\tfor(j = (1<<(maxlen + 4 - cleni)) - 1; j>=0; --j)\n\t\t\t\tcmap[ccode|(j<*/ = [];\n\tvar i = 0;\n\tfor(;i<32; i++) dlens.push(5);\n\tbuild_tree(dlens, fix_dmap, 32);\n\n\tvar clens/*:Array*/ = [];\n\ti = 0;\n\tfor(; i<=143; i++) clens.push(8);\n\tfor(; i<=255; i++) clens.push(9);\n\tfor(; i<=279; i++) clens.push(7);\n\tfor(; i<=287; i++) clens.push(8);\n\tbuild_tree(clens, fix_lmap, 288);\n})();var _deflateRaw = /*#__PURE__*/(function _deflateRawIIFE() {\n\tvar DST_LN_RE = use_typed_arrays ? new Uint8Array(0x8000) : [];\n\tvar j = 0, k = 0;\n\tfor(; j < DST_LN.length - 1; ++j) {\n\t\tfor(; k < DST_LN[j+1]; ++k) DST_LN_RE[k] = j;\n\t}\n\tfor(;k < 32768; ++k) DST_LN_RE[k] = 29;\n\n\tvar LEN_LN_RE = use_typed_arrays ? new Uint8Array(0x103) : [];\n\tfor(j = 0, k = 0; j < LEN_LN.length - 1; ++j) {\n\t\tfor(; k < LEN_LN[j+1]; ++k) LEN_LN_RE[k] = j;\n\t}\n\n\tfunction write_stored(data, out) {\n\t\tvar boff = 0;\n\t\twhile(boff < data.length) {\n\t\t\tvar L = Math.min(0xFFFF, data.length - boff);\n\t\t\tvar h = boff + L == data.length;\n\t\t\tout.write_shift(1, +h);\n\t\t\tout.write_shift(2, L);\n\t\t\tout.write_shift(2, (~L) & 0xFFFF);\n\t\t\twhile(L-- > 0) out[out.l++] = data[boff++];\n\t\t}\n\t\treturn out.l;\n\t}\n\n\t/* Fixed Huffman */\n\tfunction write_huff_fixed(data, out) {\n\t\tvar bl = 0;\n\t\tvar boff = 0;\n\t\tvar addrs = use_typed_arrays ? new Uint16Array(0x8000) : [];\n\t\twhile(boff < data.length) {\n\t\t\tvar L = /* data.length - boff; */ Math.min(0xFFFF, data.length - boff);\n\n\t\t\t/* write a stored block for short data */\n\t\t\tif(L < 10) {\n\t\t\t\tbl = write_bits_3(out, bl, +!!(boff + L == data.length)); // jshint ignore:line\n\t\t\t\tif(bl & 7) bl += 8 - (bl & 7);\n\t\t\t\tout.l = (bl / 8) | 0;\n\t\t\t\tout.write_shift(2, L);\n\t\t\t\tout.write_shift(2, (~L) & 0xFFFF);\n\t\t\t\twhile(L-- > 0) out[out.l++] = data[boff++];\n\t\t\t\tbl = out.l * 8;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tbl = write_bits_3(out, bl, +!!(boff + L == data.length) + 2); // jshint ignore:line\n\t\t\tvar hash = 0;\n\t\t\twhile(L-- > 0) {\n\t\t\t\tvar d = data[boff];\n\t\t\t\thash = ((hash << 5) ^ d) & 0x7FFF;\n\n\t\t\t\tvar match = -1, mlen = 0;\n\n\t\t\t\tif((match = addrs[hash])) {\n\t\t\t\t\tmatch |= boff & ~0x7FFF;\n\t\t\t\t\tif(match > boff) match -= 0x8000;\n\t\t\t\t\tif(match < boff) while(data[match + mlen] == data[boff + mlen] && mlen < 250) ++mlen;\n\t\t\t\t}\n\n\t\t\t\tif(mlen > 2) {\n\t\t\t\t\t/* Copy Token */\n\t\t\t\t\td = LEN_LN_RE[mlen];\n\t\t\t\t\tif(d <= 22) bl = write_bits_8(out, bl, bitswap8[d+1]>>1) - 1;\n\t\t\t\t\telse {\n\t\t\t\t\t\twrite_bits_8(out, bl, 3);\n\t\t\t\t\t\tbl += 5;\n\t\t\t\t\t\twrite_bits_8(out, bl, bitswap8[d-23]>>5);\n\t\t\t\t\t\tbl += 3;\n\t\t\t\t\t}\n\t\t\t\t\tvar len_eb = (d < 8) ? 0 : ((d - 4)>>2);\n\t\t\t\t\tif(len_eb > 0) {\n\t\t\t\t\t\twrite_bits_16(out, bl, mlen - LEN_LN[d]);\n\t\t\t\t\t\tbl += len_eb;\n\t\t\t\t\t}\n\n\t\t\t\t\td = DST_LN_RE[boff - match];\n\t\t\t\t\tbl = write_bits_8(out, bl, bitswap8[d]>>3);\n\t\t\t\t\tbl -= 3;\n\n\t\t\t\t\tvar dst_eb = d < 4 ? 0 : (d-2)>>1;\n\t\t\t\t\tif(dst_eb > 0) {\n\t\t\t\t\t\twrite_bits_16(out, bl, boff - match - DST_LN[d]);\n\t\t\t\t\t\tbl += dst_eb;\n\t\t\t\t\t}\n\t\t\t\t\tfor(var q = 0; q < mlen; ++q) {\n\t\t\t\t\t\taddrs[hash] = boff & 0x7FFF;\n\t\t\t\t\t\thash = ((hash << 5) ^ data[boff]) & 0x7FFF;\n\t\t\t\t\t\t++boff;\n\t\t\t\t\t}\n\t\t\t\t\tL-= mlen - 1;\n\t\t\t\t} else {\n\t\t\t\t\t/* Literal Token */\n\t\t\t\t\tif(d <= 143) d = d + 48;\n\t\t\t\t\telse bl = write_bits_1(out, bl, 1);\n\t\t\t\t\tbl = write_bits_8(out, bl, bitswap8[d]);\n\t\t\t\t\taddrs[hash] = boff & 0x7FFF;\n\t\t\t\t\t++boff;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tbl = write_bits_8(out, bl, 0) - 1;\n\t\t}\n\t\tout.l = ((bl + 7)/8)|0;\n\t\treturn out.l;\n\t}\n\treturn function _deflateRaw(data, out) {\n\t\tif(data.length < 8) return write_stored(data, out);\n\t\treturn write_huff_fixed(data, out);\n\t};\n})();\n\nfunction _deflate(data) {\n\tvar buf = new_buf(50+Math.floor(data.length*1.1));\n\tvar off = _deflateRaw(data, buf);\n\treturn buf.slice(0, off);\n}\n/* modified inflate function also moves original read head */\n\nvar dyn_lmap = use_typed_arrays ? new Uint16Array(32768) : zero_fill_array(32768);\nvar dyn_dmap = use_typed_arrays ? new Uint16Array(32768) : zero_fill_array(32768);\nvar dyn_cmap = use_typed_arrays ? new Uint16Array(128) : zero_fill_array(128);\nvar dyn_len_1 = 1, dyn_len_2 = 1;\n\n/* 5.5.3 Expanding Huffman Codes */\nfunction dyn(data, boff/*:number*/) {\n\t/* nomenclature from RFC1951 refers to bit values; these are offset by the implicit constant */\n\tvar _HLIT = read_bits_5(data, boff) + 257; boff += 5;\n\tvar _HDIST = read_bits_5(data, boff) + 1; boff += 5;\n\tvar _HCLEN = read_bits_4(data, boff) + 4; boff += 4;\n\tvar w = 0;\n\n\t/* grab and store code lengths */\n\tvar clens = use_typed_arrays ? new Uint8Array(19) : zero_fill_array(19);\n\tvar ctree = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ];\n\tvar maxlen = 1;\n\tvar bl_count = use_typed_arrays ? new Uint8Array(8) : zero_fill_array(8);\n\tvar next_code = use_typed_arrays ? new Uint8Array(8) : zero_fill_array(8);\n\tvar L = clens.length; /* 19 */\n\tfor(var i = 0; i < _HCLEN; ++i) {\n\t\tclens[CLEN_ORDER[i]] = w = read_bits_3(data, boff);\n\t\tif(maxlen < w) maxlen = w;\n\t\tbl_count[w]++;\n\t\tboff += 3;\n\t}\n\n\t/* build code tree */\n\tvar ccode = 0;\n\tbl_count[0] = 0;\n\tfor(i = 1; i <= maxlen; ++i) next_code[i] = ccode = (ccode + bl_count[i-1])<<1;\n\tfor(i = 0; i < L; ++i) if((ccode = clens[i]) != 0) ctree[i] = next_code[ccode]++;\n\t/* cmap[7 bits from stream] = (off&7) + (lit<<3) */\n\tvar cleni = 0;\n\tfor(i = 0; i < L; ++i) {\n\t\tcleni = clens[i];\n\t\tif(cleni != 0) {\n\t\t\tccode = bitswap8[ctree[i]]>>(8-cleni);\n\t\t\tfor(var j = (1<<(7-cleni))-1; j>=0; --j) dyn_cmap[ccode|(j<*/ = [];\n\tmaxlen = 1;\n\tfor(; hcodes.length < _HLIT + _HDIST;) {\n\t\tccode = dyn_cmap[read_bits_7(data, boff)];\n\t\tboff += ccode & 7;\n\t\tswitch((ccode >>>= 3)) {\n\t\t\tcase 16:\n\t\t\t\tw = 3 + read_bits_2(data, boff); boff += 2;\n\t\t\t\tccode = hcodes[hcodes.length - 1];\n\t\t\t\twhile(w-- > 0) hcodes.push(ccode);\n\t\t\t\tbreak;\n\t\t\tcase 17:\n\t\t\t\tw = 3 + read_bits_3(data, boff); boff += 3;\n\t\t\t\twhile(w-- > 0) hcodes.push(0);\n\t\t\t\tbreak;\n\t\t\tcase 18:\n\t\t\t\tw = 11 + read_bits_7(data, boff); boff += 7;\n\t\t\t\twhile(w -- > 0) hcodes.push(0);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\thcodes.push(ccode);\n\t\t\t\tif(maxlen < ccode) maxlen = ccode;\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\t/* build literal / length trees */\n\tvar h1 = hcodes.slice(0, _HLIT), h2 = hcodes.slice(_HLIT);\n\tfor(i = _HLIT; i < 286; ++i) h1[i] = 0;\n\tfor(i = _HDIST; i < 30; ++i) h2[i] = 0;\n\tdyn_len_1 = build_tree(h1, dyn_lmap, 286);\n\tdyn_len_2 = build_tree(h2, dyn_dmap, 30);\n\treturn boff;\n}\n\n/* return [ data, bytesRead ] */\nfunction inflate(data, usz/*:number*/) {\n\t/* shortcircuit for empty buffer [0x03, 0x00] */\n\tif(data[0] == 3 && !(data[1] & 0x3)) { return [new_raw_buf(usz), 2]; }\n\n\t/* bit offset */\n\tvar boff = 0;\n\n\t/* header includes final bit and type bits */\n\tvar header = 0;\n\n\tvar outbuf = new_unsafe_buf(usz ? usz : (1<<18));\n\tvar woff = 0;\n\tvar OL = outbuf.length>>>0;\n\tvar max_len_1 = 0, max_len_2 = 0;\n\n\twhile((header&1) == 0) {\n\t\theader = read_bits_3(data, boff); boff += 3;\n\t\tif((header >>> 1) == 0) {\n\t\t\t/* Stored block */\n\t\t\tif(boff & 7) boff += 8 - (boff&7);\n\t\t\t/* 2 bytes sz, 2 bytes bit inverse */\n\t\t\tvar sz = data[boff>>>3] | data[(boff>>>3)+1]<<8;\n\t\t\tboff += 32;\n\t\t\t/* push sz bytes */\n\t\t\tif(sz > 0) {\n\t\t\t\tif(!usz && OL < woff + sz) { outbuf = realloc(outbuf, woff + sz); OL = outbuf.length; }\n\t\t\t\twhile(sz-- > 0) { outbuf[woff++] = data[boff>>>3]; boff += 8; }\n\t\t\t}\n\t\t\tcontinue;\n\t\t} else if((header >> 1) == 1) {\n\t\t\t/* Fixed Huffman */\n\t\t\tmax_len_1 = 9; max_len_2 = 5;\n\t\t} else {\n\t\t\t/* Dynamic Huffman */\n\t\t\tboff = dyn(data, boff);\n\t\t\tmax_len_1 = dyn_len_1; max_len_2 = dyn_len_2;\n\t\t}\n\t\tfor(;;) { // while(true) is apparently out of vogue in modern JS circles\n\t\t\tif(!usz && (OL < woff + 32767)) { outbuf = realloc(outbuf, woff + 32767); OL = outbuf.length; }\n\t\t\t/* ingest code and move read head */\n\t\t\tvar bits = read_bits_n(data, boff, max_len_1);\n\t\t\tvar code = (header>>>1) == 1 ? fix_lmap[bits] : dyn_lmap[bits];\n\t\t\tboff += code & 15; code >>>= 4;\n\t\t\t/* 0-255 are literals, 256 is end of block token, 257+ are copy tokens */\n\t\t\tif(((code>>>8)&0xFF) === 0) outbuf[woff++] = code;\n\t\t\telse if(code == 256) break;\n\t\t\telse {\n\t\t\t\tcode -= 257;\n\t\t\t\tvar len_eb = (code < 8) ? 0 : ((code-4)>>2); if(len_eb > 5) len_eb = 0;\n\t\t\t\tvar tgt = woff + LEN_LN[code];\n\t\t\t\t/* length extra bits */\n\t\t\t\tif(len_eb > 0) {\n\t\t\t\t\ttgt += read_bits_n(data, boff, len_eb);\n\t\t\t\t\tboff += len_eb;\n\t\t\t\t}\n\n\t\t\t\t/* dist code */\n\t\t\t\tbits = read_bits_n(data, boff, max_len_2);\n\t\t\t\tcode = (header>>>1) == 1 ? fix_dmap[bits] : dyn_dmap[bits];\n\t\t\t\tboff += code & 15; code >>>= 4;\n\t\t\t\tvar dst_eb = (code < 4 ? 0 : (code-2)>>1);\n\t\t\t\tvar dst = DST_LN[code];\n\t\t\t\t/* dist extra bits */\n\t\t\t\tif(dst_eb > 0) {\n\t\t\t\t\tdst += read_bits_n(data, boff, dst_eb);\n\t\t\t\t\tboff += dst_eb;\n\t\t\t\t}\n\n\t\t\t\t/* in the common case, manual byte copy is faster than TA set / Buffer copy */\n\t\t\t\tif(!usz && OL < tgt) { outbuf = realloc(outbuf, tgt + 100); OL = outbuf.length; }\n\t\t\t\twhile(woff < tgt) { outbuf[woff] = outbuf[woff - dst]; ++woff; }\n\t\t\t}\n\t\t}\n\t}\n\tif(usz) return [outbuf, (boff+7)>>>3];\n\treturn [outbuf.slice(0, woff), (boff+7)>>>3];\n}\n\nfunction _inflate(payload, usz) {\n\tvar data = payload.slice(payload.l||0);\n\tvar out = inflate(data, usz);\n\tpayload.l += out[1];\n\treturn out[0];\n}\n\nfunction warn_or_throw(wrn, msg) {\n\tif(wrn) { if(typeof console !== 'undefined') console.error(msg); }\n\telse throw new Error(msg);\n}\n\nfunction parse_zip(file/*:RawBytes*/, options/*:CFBReadOpts*/)/*:CFBContainer*/ {\n\tvar blob/*:CFBlob*/ = /*::(*/file/*:: :any)*/;\n\tprep_blob(blob, 0);\n\n\tvar FileIndex/*:CFBFileIndex*/ = [], FullPaths/*:Array*/ = [];\n\tvar o = {\n\t\tFileIndex: FileIndex,\n\t\tFullPaths: FullPaths\n\t};\n\tinit_cfb(o, { root: options.root });\n\n\t/* find end of central directory, start just after signature */\n\tvar i = blob.length - 4;\n\twhile((blob[i] != 0x50 || blob[i+1] != 0x4b || blob[i+2] != 0x05 || blob[i+3] != 0x06) && i >= 0) --i;\n\tblob.l = i + 4;\n\n\t/* parse end of central directory */\n\tblob.l += 4;\n\tvar fcnt = blob.read_shift(2);\n\tblob.l += 6;\n\tvar start_cd = blob.read_shift(4);\n\n\t/* parse central directory */\n\tblob.l = start_cd;\n\n\tfor(i = 0; i < fcnt; ++i) {\n\t\t/* trust local file header instead of CD entry */\n\t\tblob.l += 20;\n\t\tvar csz = blob.read_shift(4);\n\t\tvar usz = blob.read_shift(4);\n\t\tvar namelen = blob.read_shift(2);\n\t\tvar efsz = blob.read_shift(2);\n\t\tvar fcsz = blob.read_shift(2);\n\t\tblob.l += 8;\n\t\tvar offset = blob.read_shift(4);\n\t\tvar EF = parse_extra_field(/*::(*/blob.slice(blob.l+namelen, blob.l+namelen+efsz)/*:: :any)*/);\n\t\tblob.l += namelen + efsz + fcsz;\n\n\t\tvar L = blob.l;\n\t\tblob.l = offset + 4;\n\t\tparse_local_file(blob, csz, usz, o, EF);\n\t\tblob.l = L;\n\t}\n\treturn o;\n}\n\n\n/* head starts just after local file header signature */\nfunction parse_local_file(blob/*:CFBlob*/, csz/*:number*/, usz/*:number*/, o/*:CFBContainer*/, EF) {\n\t/* [local file header] */\n\tblob.l += 2;\n\tvar flags = blob.read_shift(2);\n\tvar meth = blob.read_shift(2);\n\tvar date = parse_dos_date(blob);\n\n\tif(flags & 0x2041) throw new Error(\"Unsupported ZIP encryption\");\n\tvar crc32 = blob.read_shift(4);\n\tvar _csz = blob.read_shift(4);\n\tvar _usz = blob.read_shift(4);\n\n\tvar namelen = blob.read_shift(2);\n\tvar efsz = blob.read_shift(2);\n\n\t// TODO: flags & (1<<11) // UTF8\n\tvar name = \"\"; for(var i = 0; i < namelen; ++i) name += String.fromCharCode(blob[blob.l++]);\n\tif(efsz) {\n\t\tvar ef = parse_extra_field(/*::(*/blob.slice(blob.l, blob.l + efsz)/*:: :any)*/);\n\t\tif((ef[0x5455]||{}).mt) date = ef[0x5455].mt;\n\t\tif(((EF||{})[0x5455]||{}).mt) date = EF[0x5455].mt;\n\t}\n\tblob.l += efsz;\n\n\t/* [encryption header] */\n\n\t/* [file data] */\n\tvar data = blob.slice(blob.l, blob.l + _csz);\n\tswitch(meth) {\n\t\tcase 8: data = _inflateRawSync(blob, _usz); break;\n\t\tcase 0: break; // TODO: scan for magic number\n\t\tdefault: throw new Error(\"Unsupported ZIP Compression method \" + meth);\n\t}\n\n\t/* [data descriptor] */\n\tvar wrn = false;\n\tif(flags & 8) {\n\t\tcrc32 = blob.read_shift(4);\n\t\tif(crc32 == 0x08074b50) { crc32 = blob.read_shift(4); wrn = true; }\n\t\t_csz = blob.read_shift(4);\n\t\t_usz = blob.read_shift(4);\n\t}\n\n\tif(_csz != csz) warn_or_throw(wrn, \"Bad compressed size: \" + csz + \" != \" + _csz);\n\tif(_usz != usz) warn_or_throw(wrn, \"Bad uncompressed size: \" + usz + \" != \" + _usz);\n\t//var _crc32 = CRC32.buf(data, 0);\n\t//if((crc32>>0) != (_crc32>>0)) warn_or_throw(wrn, \"Bad CRC32 checksum: \" + crc32 + \" != \" + _crc32);\n\tcfb_add(o, name, data, {unsafe: true, mt: date});\n}\nfunction write_zip(cfb/*:CFBContainer*/, options/*:CFBWriteOpts*/)/*:RawBytes*/ {\n\tvar _opts = options || {};\n\tvar out = [], cdirs = [];\n\tvar o/*:CFBlob*/ = new_buf(1);\n\tvar method = (_opts.compression ? 8 : 0), flags = 0;\n\tvar desc = false;\n\tif(desc) flags |= 8;\n\tvar i = 0, j = 0;\n\n\tvar start_cd = 0, fcnt = 0;\n\tvar root = cfb.FullPaths[0], fp = root, fi = cfb.FileIndex[0];\n\tvar crcs = [];\n\tvar sz_cd = 0;\n\n\tfor(i = 1; i < cfb.FullPaths.length; ++i) {\n\t\tfp = cfb.FullPaths[i].slice(root.length); fi = cfb.FileIndex[i];\n\t\tif(!fi.size || !fi.content || fp == \"\\u0001Sh33tJ5\") continue;\n\t\tvar start = start_cd;\n\n\t\t/* TODO: CP437 filename */\n\t\tvar namebuf = new_buf(fp.length);\n\t\tfor(j = 0; j < fp.length; ++j) namebuf.write_shift(1, fp.charCodeAt(j) & 0x7F);\n\t\tnamebuf = namebuf.slice(0, namebuf.l);\n\t\tcrcs[fcnt] = CRC32.buf(/*::((*/fi.content/*::||[]):any)*/, 0);\n\n\t\tvar outbuf = fi.content/*::||[]*/;\n\t\tif(method == 8) outbuf = _deflateRawSync(outbuf);\n\n\t\t/* local file header */\n\t\to = new_buf(30);\n\t\to.write_shift(4, 0x04034b50);\n\t\to.write_shift(2, 20);\n\t\to.write_shift(2, flags);\n\t\to.write_shift(2, method);\n\t\t/* TODO: last mod file time/date */\n\t\tif(fi.mt) write_dos_date(o, fi.mt);\n\t\telse o.write_shift(4, 0);\n\t\to.write_shift(-4, (flags & 8) ? 0 : crcs[fcnt]);\n\t\to.write_shift(4, (flags & 8) ? 0 : outbuf.length);\n\t\to.write_shift(4, (flags & 8) ? 0 : /*::(*/fi.content/*::||[])*/.length);\n\t\to.write_shift(2, namebuf.length);\n\t\to.write_shift(2, 0);\n\n\t\tstart_cd += o.length;\n\t\tout.push(o);\n\t\tstart_cd += namebuf.length;\n\t\tout.push(namebuf);\n\n\t\t/* TODO: extra fields? */\n\n\t\t/* TODO: encryption header ? */\n\n\t\tstart_cd += outbuf.length;\n\t\tout.push(outbuf);\n\n\t\t/* data descriptor */\n\t\tif(flags & 8) {\n\t\t\to = new_buf(12);\n\t\t\to.write_shift(-4, crcs[fcnt]);\n\t\t\to.write_shift(4, outbuf.length);\n\t\t\to.write_shift(4, /*::(*/fi.content/*::||[])*/.length);\n\t\t\tstart_cd += o.l;\n\t\t\tout.push(o);\n\t\t}\n\n\t\t/* central directory */\n\t\to = new_buf(46);\n\t\to.write_shift(4, 0x02014b50);\n\t\to.write_shift(2, 0);\n\t\to.write_shift(2, 20);\n\t\to.write_shift(2, flags);\n\t\to.write_shift(2, method);\n\t\to.write_shift(4, 0); /* TODO: last mod file time/date */\n\t\to.write_shift(-4, crcs[fcnt]);\n\n\t\to.write_shift(4, outbuf.length);\n\t\to.write_shift(4, /*::(*/fi.content/*::||[])*/.length);\n\t\to.write_shift(2, namebuf.length);\n\t\to.write_shift(2, 0);\n\t\to.write_shift(2, 0);\n\t\to.write_shift(2, 0);\n\t\to.write_shift(2, 0);\n\t\to.write_shift(4, 0);\n\t\to.write_shift(4, start);\n\n\t\tsz_cd += o.l;\n\t\tcdirs.push(o);\n\t\tsz_cd += namebuf.length;\n\t\tcdirs.push(namebuf);\n\t\t++fcnt;\n\t}\n\n\t/* end of central directory */\n\to = new_buf(22);\n\to.write_shift(4, 0x06054b50);\n\to.write_shift(2, 0);\n\to.write_shift(2, 0);\n\to.write_shift(2, fcnt);\n\to.write_shift(2, fcnt);\n\to.write_shift(4, sz_cd);\n\to.write_shift(4, start_cd);\n\to.write_shift(2, 0);\n\n\treturn bconcat(([bconcat((out/*:any*/)), bconcat(cdirs), o]/*:any*/));\n}\nvar ContentTypeMap = ({\n\t\"htm\": \"text/html\",\n\t\"xml\": \"text/xml\",\n\n\t\"gif\": \"image/gif\",\n\t\"jpg\": \"image/jpeg\",\n\t\"png\": \"image/png\",\n\n\t\"mso\": \"application/x-mso\",\n\t\"thmx\": \"application/vnd.ms-officetheme\",\n\t\"sh33tj5\": \"application/octet-stream\"\n}/*:any*/);\n\nfunction get_content_type(fi/*:CFBEntry*/, fp/*:string*/)/*:string*/ {\n\tif(fi.ctype) return fi.ctype;\n\n\tvar ext = fi.name || \"\", m = ext.match(/\\.([^\\.]+)$/);\n\tif(m && ContentTypeMap[m[1]]) return ContentTypeMap[m[1]];\n\n\tif(fp) {\n\t\tm = (ext = fp).match(/[\\.\\\\]([^\\.\\\\])+$/);\n\t\tif(m && ContentTypeMap[m[1]]) return ContentTypeMap[m[1]];\n\t}\n\n\treturn \"application/octet-stream\";\n}\n\n/* 76 character chunks TODO: intertwine encoding */\nfunction write_base64_76(bstr/*:string*/)/*:string*/ {\n\tvar data = Base64_encode(bstr);\n\tvar o = [];\n\tfor(var i = 0; i < data.length; i+= 76) o.push(data.slice(i, i+76));\n\treturn o.join(\"\\r\\n\") + \"\\r\\n\";\n}\n\n/*\nRules for QP:\n\t- escape =## applies for all non-display characters and literal \"=\"\n\t- space or tab at end of line must be encoded\n\t- \\r\\n newlines can be preserved, but bare \\r and \\n must be escaped\n\t- lines must not exceed 76 characters, use soft breaks =\\r\\n\n\nTODO: Some files from word appear to write line extensions with bare equals:\n\n```\n*/ = [], split = encoded.split(\"\\r\\n\");\n\tfor(var si = 0; si < split.length; ++si) {\n\t\tvar str = split[si];\n\t\tif(str.length == 0) { o.push(\"\"); continue; }\n\t\tfor(var i = 0; i < str.length;) {\n\t\t\tvar end = 76;\n\t\t\tvar tmp = str.slice(i, i + end);\n\t\t\tif(tmp.charAt(end - 1) == \"=\") end --;\n\t\t\telse if(tmp.charAt(end - 2) == \"=\") end -= 2;\n\t\t\telse if(tmp.charAt(end - 3) == \"=\") end -= 3;\n\t\t\ttmp = str.slice(i, i + end);\n\t\t\ti += end;\n\t\t\tif(i < str.length) tmp += \"=\";\n\t\t\to.push(tmp);\n\t\t}\n\t}\n\n\treturn o.join(\"\\r\\n\");\n}\nfunction parse_quoted_printable(data/*:Array*/)/*:RawBytes*/ {\n\tvar o = [];\n\n\t/* unify long lines */\n\tfor(var di = 0; di < data.length; ++di) {\n\t\tvar line = data[di];\n\t\twhile(di <= data.length && line.charAt(line.length - 1) == \"=\") line = line.slice(0, line.length - 1) + data[++di];\n\t\to.push(line);\n\t}\n\n\t/* decode */\n\tfor(var oi = 0; oi < o.length; ++oi) o[oi] = o[oi].replace(/[=][0-9A-Fa-f]{2}/g, function($$) { return String.fromCharCode(parseInt($$.slice(1), 16)); });\n\treturn s2a(o.join(\"\\r\\n\"));\n}\n\n\nfunction parse_mime(cfb/*:CFBContainer*/, data/*:Array*/, root/*:string*/)/*:void*/ {\n\tvar fname = \"\", cte = \"\", ctype = \"\", fdata;\n\tvar di = 0;\n\tfor(;di < 10; ++di) {\n\t\tvar line = data[di];\n\t\tif(!line || line.match(/^\\s*$/)) break;\n\t\tvar m = line.match(/^(.*?):\\s*([^\\s].*)$/);\n\t\tif(m) switch(m[1].toLowerCase()) {\n\t\t\tcase \"content-location\": fname = m[2].trim(); break;\n\t\t\tcase \"content-type\": ctype = m[2].trim(); break;\n\t\t\tcase \"content-transfer-encoding\": cte = m[2].trim(); break;\n\t\t}\n\t}\n\t++di;\n\tswitch(cte.toLowerCase()) {\n\t\tcase 'base64': fdata = s2a(Base64_decode(data.slice(di).join(\"\"))); break;\n\t\tcase 'quoted-printable': fdata = parse_quoted_printable(data.slice(di)); break;\n\t\tdefault: throw new Error(\"Unsupported Content-Transfer-Encoding \" + cte);\n\t}\n\tvar file = cfb_add(cfb, fname.slice(root.length), fdata, {unsafe: true});\n\tif(ctype) file.ctype = ctype;\n}\n\nfunction parse_mad(file/*:RawBytes*/, options/*:CFBReadOpts*/)/*:CFBContainer*/ {\n\tif(a2s(file.slice(0,13)).toLowerCase() != \"mime-version:\") throw new Error(\"Unsupported MAD header\");\n\tvar root = (options && options.root || \"\");\n\t// $FlowIgnore\n\tvar data = (has_buf && Buffer.isBuffer(file) ? file.toString(\"binary\") : a2s(file)).split(\"\\r\\n\");\n\tvar di = 0, row = \"\";\n\n\t/* if root is not specified, scan for the common prefix */\n\tfor(di = 0; di < data.length; ++di) {\n\t\trow = data[di];\n\t\tif(!/^Content-Location:/i.test(row)) continue;\n\t\trow = row.slice(row.indexOf(\"file\"));\n\t\tif(!root) root = row.slice(0, row.lastIndexOf(\"/\") + 1);\n\t\tif(row.slice(0, root.length) == root) continue;\n\t\twhile(root.length > 0) {\n\t\t\troot = root.slice(0, root.length - 1);\n\t\t\troot = root.slice(0, root.lastIndexOf(\"/\") + 1);\n\t\t\tif(row.slice(0,root.length) == root) break;\n\t\t}\n\t}\n\n\tvar mboundary = (data[1] || \"\").match(/boundary=\"(.*?)\"/);\n\tif(!mboundary) throw new Error(\"MAD cannot find boundary\");\n\tvar boundary = \"--\" + (mboundary[1] || \"\");\n\n\tvar FileIndex/*:CFBFileIndex*/ = [], FullPaths/*:Array*/ = [];\n\tvar o = {\n\t\tFileIndex: FileIndex,\n\t\tFullPaths: FullPaths\n\t};\n\tinit_cfb(o);\n\tvar start_di, fcnt = 0;\n\tfor(di = 0; di < data.length; ++di) {\n\t\tvar line = data[di];\n\t\tif(line !== boundary && line !== boundary + \"--\") continue;\n\t\tif(fcnt++) parse_mime(o, data.slice(start_di, di), root);\n\t\tstart_di = di;\n\t}\n\treturn o;\n}\n\nfunction write_mad(cfb/*:CFBContainer*/, options/*:CFBWriteOpts*/)/*:string*/ {\n\tvar opts = options || {};\n\tvar boundary = opts.boundary || \"SheetJS\";\n\tboundary = '------=' + boundary;\n\n\tvar out = [\n\t\t'MIME-Version: 1.0',\n\t\t'Content-Type: multipart/related; boundary=\"' + boundary.slice(2) + '\"',\n\t\t'',\n\t\t'',\n\t\t''\n\t];\n\n\tvar root = cfb.FullPaths[0], fp = root, fi = cfb.FileIndex[0];\n\tfor(var i = 1; i < cfb.FullPaths.length; ++i) {\n\t\tfp = cfb.FullPaths[i].slice(root.length);\n\t\tfi = cfb.FileIndex[i];\n\t\tif(!fi.size || !fi.content || fp == \"\\u0001Sh33tJ5\") continue;\n\n\t\t/* Normalize filename */\n\t\tfp = fp.replace(/[\\x00-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7E-\\xFF]/g, function(c) {\n\t\t\treturn \"_x\" + c.charCodeAt(0).toString(16) + \"_\";\n\t\t}).replace(/[\\u0080-\\uFFFF]/g, function(u) {\n\t\t\treturn \"_u\" + u.charCodeAt(0).toString(16) + \"_\";\n\t\t});\n\n\t\t/* Extract content as binary string */\n\t\tvar ca = fi.content;\n\t\t// $FlowIgnore\n\t\tvar cstr = has_buf && Buffer.isBuffer(ca) ? ca.toString(\"binary\") : a2s(ca);\n\n\t\t/* 4/5 of first 1024 chars ascii -> quoted printable, else base64 */\n\t\tvar dispcnt = 0, L = Math.min(1024, cstr.length), cc = 0;\n\t\tfor(var csl = 0; csl <= L; ++csl) if((cc=cstr.charCodeAt(csl)) >= 0x20 && cc < 0x80) ++dispcnt;\n\t\tvar qp = dispcnt >= L * 4 / 5;\n\n\t\tout.push(boundary);\n\t\tout.push('Content-Location: ' + (opts.root || 'file:///C:/SheetJS/') + fp);\n\t\tout.push('Content-Transfer-Encoding: ' + (qp ? 'quoted-printable' : 'base64'));\n\t\tout.push('Content-Type: ' + get_content_type(fi, fp));\n\t\tout.push('');\n\n\t\tout.push(qp ? write_quoted_printable(cstr) : write_base64_76(cstr));\n\t}\n\tout.push(boundary + '--\\r\\n');\n\treturn out.join(\"\\r\\n\");\n}\nfunction cfb_new(opts/*:?any*/)/*:CFBContainer*/ {\n\tvar o/*:CFBContainer*/ = ({}/*:any*/);\n\tinit_cfb(o, opts);\n\treturn o;\n}\n\nfunction cfb_add(cfb/*:CFBContainer*/, name/*:string*/, content/*:?RawBytes*/, opts/*:?any*/)/*:CFBEntry*/ {\n\tvar unsafe = opts && opts.unsafe;\n\tif(!unsafe) init_cfb(cfb);\n\tvar file = !unsafe && CFB.find(cfb, name);\n\tif(!file) {\n\t\tvar fpath/*:string*/ = cfb.FullPaths[0];\n\t\tif(name.slice(0, fpath.length) == fpath) fpath = name;\n\t\telse {\n\t\t\tif(fpath.slice(-1) != \"/\") fpath += \"/\";\n\t\t\tfpath = (fpath + name).replace(\"//\",\"/\");\n\t\t}\n\t\tfile = ({name: filename(name), type: 2}/*:any*/);\n\t\tcfb.FileIndex.push(file);\n\t\tcfb.FullPaths.push(fpath);\n\t\tif(!unsafe) CFB.utils.cfb_gc(cfb);\n\t}\n\t/*:: if(!file) throw new Error(\"unreachable\"); */\n\tfile.content = (content/*:any*/);\n\tfile.size = content ? content.length : 0;\n\tif(opts) {\n\t\tif(opts.CLSID) file.clsid = opts.CLSID;\n\t\tif(opts.mt) file.mt = opts.mt;\n\t\tif(opts.ct) file.ct = opts.ct;\n\t}\n\treturn file;\n}\n\nfunction cfb_del(cfb/*:CFBContainer*/, name/*:string*/)/*:boolean*/ {\n\tinit_cfb(cfb);\n\tvar file = CFB.find(cfb, name);\n\tif(file) for(var j = 0; j < cfb.FileIndex.length; ++j) if(cfb.FileIndex[j] == file) {\n\t\tcfb.FileIndex.splice(j, 1);\n\t\tcfb.FullPaths.splice(j, 1);\n\t\treturn true;\n\t}\n\treturn false;\n}\n\nfunction cfb_mov(cfb/*:CFBContainer*/, old_name/*:string*/, new_name/*:string*/)/*:boolean*/ {\n\tinit_cfb(cfb);\n\tvar file = CFB.find(cfb, old_name);\n\tif(file) for(var j = 0; j < cfb.FileIndex.length; ++j) if(cfb.FileIndex[j] == file) {\n\t\tcfb.FileIndex[j].name = filename(new_name);\n\t\tcfb.FullPaths[j] = new_name;\n\t\treturn true;\n\t}\n\treturn false;\n}\n\nfunction cfb_gc(cfb/*:CFBContainer*/)/*:void*/ { rebuild_cfb(cfb, true); }\n\nexports.find = find;\nexports.read = read;\nexports.parse = parse;\nexports.write = write;\nexports.writeFile = write_file;\nexports.utils = {\n\tcfb_new: cfb_new,\n\tcfb_add: cfb_add,\n\tcfb_del: cfb_del,\n\tcfb_mov: cfb_mov,\n\tcfb_gc: cfb_gc,\n\tReadShift: ReadShift,\n\tCheckField: CheckField,\n\tprep_blob: prep_blob,\n\tbconcat: bconcat,\n\tuse_zlib: use_zlib,\n\t_deflateRaw: _deflate,\n\t_inflateRaw: _inflate,\n\tconsts: consts\n};\n\nreturn exports;\n})();\n\nlet _fs = void 0;\nfunction set_fs(fs) { _fs = fs; }\nexport { set_fs };\n\n/* normalize data for blob ctor */\nfunction blobify(data) {\n\tif(typeof data === \"string\") return s2ab(data);\n\tif(Array.isArray(data)) return a2u(data);\n\treturn data;\n}\n/* write or download file */\nfunction write_dl(fname/*:string*/, payload/*:any*/, enc/*:?string*/) {\n\t/*global IE_SaveFile, Blob, navigator, saveAs, document, File, chrome */\n\tif(typeof _fs !== 'undefined' && _fs.writeFileSync) return enc ? _fs.writeFileSync(fname, payload, enc) : _fs.writeFileSync(fname, payload);\n\tif(typeof Deno !== 'undefined') {\n\t\t/* in this spot, it's safe to assume typed arrays and TextEncoder/TextDecoder exist */\n\t\tif(enc && typeof payload == \"string\") switch(enc) {\n\t\t\tcase \"utf8\": payload = new TextEncoder(enc).encode(payload); break;\n\t\t\tcase \"binary\": payload = s2ab(payload); break;\n\t\t\t/* TODO: binary equivalent */\n\t\t\tdefault: throw new Error(\"Unsupported encoding \" + enc);\n\t\t}\n\t\treturn Deno.writeFileSync(fname, payload);\n\t}\n\tvar data = (enc == \"utf8\") ? utf8write(payload) : payload;\n\t/*:: declare var IE_SaveFile: any; */\n\tif(typeof IE_SaveFile !== 'undefined') return IE_SaveFile(data, fname);\n\tif(typeof Blob !== 'undefined') {\n\t\tvar blob = new Blob([blobify(data)], {type:\"application/octet-stream\"});\n\t\t/*:: declare var navigator: any; */\n\t\tif(typeof navigator !== 'undefined' && navigator.msSaveBlob) return navigator.msSaveBlob(blob, fname);\n\t\t/*:: declare var saveAs: any; */\n\t\tif(typeof saveAs !== 'undefined') return saveAs(blob, fname);\n\t\tif(typeof URL !== 'undefined' && typeof document !== 'undefined' && document.createElement && URL.createObjectURL) {\n\t\t\tvar url = URL.createObjectURL(blob);\n\t\t\t/*:: declare var chrome: any; */\n\t\t\tif(typeof chrome === 'object' && typeof (chrome.downloads||{}).download == \"function\") {\n\t\t\t\tif(URL.revokeObjectURL && typeof setTimeout !== 'undefined') setTimeout(function() { URL.revokeObjectURL(url); }, 60000);\n\t\t\t\treturn chrome.downloads.download({ url: url, filename: fname, saveAs: true});\n\t\t\t}\n\t\t\tvar a = document.createElement(\"a\");\n\t\t\tif(a.download != null) {\n\t\t\t\t/*:: if(document.body == null) throw new Error(\"unreachable\"); */\n\t\t\t\ta.download = fname; a.href = url; document.body.appendChild(a); a.click();\n\t\t\t\t/*:: if(document.body == null) throw new Error(\"unreachable\"); */ document.body.removeChild(a);\n\t\t\t\tif(URL.revokeObjectURL && typeof setTimeout !== 'undefined') setTimeout(function() { URL.revokeObjectURL(url); }, 60000);\n\t\t\t\treturn url;\n\t\t\t}\n\t\t}\n\t}\n\t// $FlowIgnore\n\tif(typeof $ !== 'undefined' && typeof File !== 'undefined' && typeof Folder !== 'undefined') try { // extendscript\n\t\t// $FlowIgnore\n\t\tvar out = File(fname); out.open(\"w\"); out.encoding = \"binary\";\n\t\tif(Array.isArray(payload)) payload = a2s(payload);\n\t\tout.write(payload); out.close(); return payload;\n\t} catch(e) { if(!e.message || !e.message.match(/onstruct/)) throw e; }\n\tthrow new Error(\"cannot save file \" + fname);\n}\n\n/* read binary data from file */\nfunction read_binary(path/*:string*/) {\n\tif(typeof _fs !== 'undefined') return _fs.readFileSync(path);\n\tif(typeof Deno !== 'undefined') return Deno.readFileSync(path);\n\t// $FlowIgnore\n\tif(typeof $ !== 'undefined' && typeof File !== 'undefined' && typeof Folder !== 'undefined') try { // extendscript\n\t\t// $FlowIgnore\n\t\tvar infile = File(path); infile.open(\"r\"); infile.encoding = \"binary\";\n\t\tvar data = infile.read(); infile.close();\n\t\treturn data;\n\t} catch(e) { if(!e.message || !e.message.match(/onstruct/)) throw e; }\n\tthrow new Error(\"Cannot access file \" + path);\n}\nfunction keys(o/*:any*/)/*:Array*/ {\n\tvar ks = Object.keys(o), o2 = [];\n\tfor(var i = 0; i < ks.length; ++i) if(Object.prototype.hasOwnProperty.call(o, ks[i])) o2.push(ks[i]);\n\treturn o2;\n}\n\nfunction evert_key(obj/*:any*/, key/*:string*/)/*:EvertType*/ {\n\tvar o = ([]/*:any*/), K = keys(obj);\n\tfor(var i = 0; i !== K.length; ++i) if(o[obj[K[i]][key]] == null) o[obj[K[i]][key]] = K[i];\n\treturn o;\n}\n\nfunction evert(obj/*:any*/)/*:EvertType*/ {\n\tvar o = ([]/*:any*/), K = keys(obj);\n\tfor(var i = 0; i !== K.length; ++i) o[obj[K[i]]] = K[i];\n\treturn o;\n}\n\nfunction evert_num(obj/*:any*/)/*:EvertNumType*/ {\n\tvar o = ([]/*:any*/), K = keys(obj);\n\tfor(var i = 0; i !== K.length; ++i) o[obj[K[i]]] = parseInt(K[i],10);\n\treturn o;\n}\n\nfunction evert_arr(obj/*:any*/)/*:EvertArrType*/ {\n\tvar o/*:EvertArrType*/ = ([]/*:any*/), K = keys(obj);\n\tfor(var i = 0; i !== K.length; ++i) {\n\t\tif(o[obj[K[i]]] == null) o[obj[K[i]]] = [];\n\t\to[obj[K[i]]].push(K[i]);\n\t}\n\treturn o;\n}\n\nvar basedate = /*#__PURE__*/new Date(1899, 11, 30, 0, 0, 0); // 2209161600000\nfunction datenum(v/*:Date*/, date1904/*:?boolean*/)/*:number*/ {\n\tvar epoch = /*#__PURE__*/v.getTime();\n\tif(date1904) epoch -= 1462*24*60*60*1000;\n\tvar dnthresh = /*#__PURE__*/basedate.getTime() + (/*#__PURE__*/v.getTimezoneOffset() - /*#__PURE__*/basedate.getTimezoneOffset()) * 60000;\n\treturn (epoch - dnthresh) / (24 * 60 * 60 * 1000);\n}\nvar refdate = /*#__PURE__*/new Date();\nvar dnthresh = /*#__PURE__*/basedate.getTime() + (/*#__PURE__*/refdate.getTimezoneOffset() - /*#__PURE__*/basedate.getTimezoneOffset()) * 60000;\nvar refoffset = /*#__PURE__*/refdate.getTimezoneOffset();\nfunction numdate(v/*:number*/)/*:Date*/ {\n\tvar out = new Date();\n\tout.setTime(v * 24 * 60 * 60 * 1000 + dnthresh);\n\tif (out.getTimezoneOffset() !== refoffset) {\n\t\tout.setTime(out.getTime() + (out.getTimezoneOffset() - refoffset) * 60000);\n\t}\n\treturn out;\n}\n\n/* ISO 8601 Duration */\nfunction parse_isodur(s) {\n\tvar sec = 0, mt = 0, time = false;\n\tvar m = s.match(/P([0-9\\.]+Y)?([0-9\\.]+M)?([0-9\\.]+D)?T([0-9\\.]+H)?([0-9\\.]+M)?([0-9\\.]+S)?/);\n\tif(!m) throw new Error(\"|\" + s + \"| is not an ISO8601 Duration\");\n\tfor(var i = 1; i != m.length; ++i) {\n\t\tif(!m[i]) continue;\n\t\tmt = 1;\n\t\tif(i > 3) time = true;\n\t\tswitch(m[i].slice(m[i].length-1)) {\n\t\t\tcase 'Y':\n\t\t\t\tthrow new Error(\"Unsupported ISO Duration Field: \" + m[i].slice(m[i].length-1));\n\t\t\tcase 'D': mt *= 24;\n\t\t\t\t/* falls through */\n\t\t\tcase 'H': mt *= 60;\n\t\t\t\t/* falls through */\n\t\t\tcase 'M':\n\t\t\t\tif(!time) throw new Error(\"Unsupported ISO Duration Field: M\");\n\t\t\t\telse mt *= 60;\n\t\t\t\t/* falls through */\n\t\t\tcase 'S': break;\n\t\t}\n\t\tsec += mt * parseInt(m[i], 10);\n\t}\n\treturn sec;\n}\n\nvar good_pd_date_1 = /*#__PURE__*/new Date('2017-02-19T19:06:09.000Z');\nvar good_pd_date = /*#__PURE__*/isNaN(/*#__PURE__*/good_pd_date_1.getFullYear()) ? /*#__PURE__*/new Date('2/19/17') : good_pd_date_1;\nvar good_pd = /*#__PURE__*/good_pd_date.getFullYear() == 2017;\n/* parses a date as a local date */\nfunction parseDate(str/*:string|Date*/, fixdate/*:?number*/)/*:Date*/ {\n\tvar d = new Date(str);\n\tif(good_pd) {\n\t\t/*:: if(fixdate == null) fixdate = 0; */\n\t\tif(fixdate > 0) d.setTime(d.getTime() + d.getTimezoneOffset() * 60 * 1000);\n\t\telse if(fixdate < 0) d.setTime(d.getTime() - d.getTimezoneOffset() * 60 * 1000);\n\t\treturn d;\n\t}\n\tif(str instanceof Date) return str;\n\tif(good_pd_date.getFullYear() == 1917 && !isNaN(d.getFullYear())) {\n\t\tvar s = d.getFullYear();\n\t\tif(str.indexOf(\"\" + s) > -1) return d;\n\t\td.setFullYear(d.getFullYear() + 100); return d;\n\t}\n\tvar n = str.match(/\\d+/g)||[\"2017\",\"2\",\"19\",\"0\",\"0\",\"0\"];\n\tvar out = new Date(+n[0], +n[1] - 1, +n[2], (+n[3]||0), (+n[4]||0), (+n[5]||0));\n\tif(str.indexOf(\"Z\") > -1) out = new Date(out.getTime() - out.getTimezoneOffset() * 60 * 1000);\n\treturn out;\n}\n\nfunction cc2str(arr/*:Array*/, debomit)/*:string*/ {\n\tif(has_buf && Buffer.isBuffer(arr)) {\n\t\tif(debomit) {\n\t\t\tif(arr[0] == 0xFF && arr[1] == 0xFE) return utf8write(arr.slice(2).toString(\"utf16le\"));\n\t\t\tif(arr[1] == 0xFE && arr[2] == 0xFF) return utf8write(utf16beread(arr.slice(2).toString(\"binary\")));\n\t\t}\n\t\treturn arr.toString(\"binary\");\n\t}\n\n\tif(typeof TextDecoder !== \"undefined\") try {\n\t\tif(debomit) {\n\t\t\tif(arr[0] == 0xFF && arr[1] == 0xFE) return utf8write(new TextDecoder(\"utf-16le\").decode(arr.slice(2)));\n\t\t\tif(arr[0] == 0xFE && arr[1] == 0xFF) return utf8write(new TextDecoder(\"utf-16be\").decode(arr.slice(2)));\n\t\t}\n\t\tvar rev = {\n\t\t\t\"\\u20ac\": \"\\x80\", \"\\u201a\": \"\\x82\", \"\\u0192\": \"\\x83\", \"\\u201e\": \"\\x84\",\n\t\t\t\"\\u2026\": \"\\x85\", \"\\u2020\": \"\\x86\", \"\\u2021\": \"\\x87\", \"\\u02c6\": \"\\x88\",\n\t\t\t\"\\u2030\": \"\\x89\", \"\\u0160\": \"\\x8a\", \"\\u2039\": \"\\x8b\", \"\\u0152\": \"\\x8c\",\n\t\t\t\"\\u017d\": \"\\x8e\", \"\\u2018\": \"\\x91\", \"\\u2019\": \"\\x92\", \"\\u201c\": \"\\x93\",\n\t\t\t\"\\u201d\": \"\\x94\", \"\\u2022\": \"\\x95\", \"\\u2013\": \"\\x96\", \"\\u2014\": \"\\x97\",\n\t\t\t\"\\u02dc\": \"\\x98\", \"\\u2122\": \"\\x99\", \"\\u0161\": \"\\x9a\", \"\\u203a\": \"\\x9b\",\n\t\t\t\"\\u0153\": \"\\x9c\", \"\\u017e\": \"\\x9e\", \"\\u0178\": \"\\x9f\"\n\t\t};\n\t\tif(Array.isArray(arr)) arr = new Uint8Array(arr);\n\t\treturn new TextDecoder(\"latin1\").decode(arr).replace(/[€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ]/g, function(c) { return rev[c] || c; });\n\t} catch(e) {}\n\n\tvar o = [];\n\tfor(var i = 0; i != arr.length; ++i) o.push(String.fromCharCode(arr[i]));\n\treturn o.join(\"\");\n}\n\nfunction dup(o/*:any*/)/*:any*/ {\n\tif(typeof JSON != 'undefined' && !Array.isArray(o)) return JSON.parse(JSON.stringify(o));\n\tif(typeof o != 'object' || o == null) return o;\n\tif(o instanceof Date) return new Date(o.getTime());\n\tvar out = {};\n\tfor(var k in o) if(Object.prototype.hasOwnProperty.call(o, k)) out[k] = dup(o[k]);\n\treturn out;\n}\n\nfunction fill(c/*:string*/,l/*:number*/)/*:string*/ { var o = \"\"; while(o.length < l) o+=c; return o; }\n\n/* TODO: stress test */\nfunction fuzzynum(s/*:string*/)/*:number*/ {\n\tvar v/*:number*/ = Number(s);\n\tif(!isNaN(v)) return isFinite(v) ? v : NaN;\n\tif(!/\\d/.test(s)) return v;\n\tvar wt = 1;\n\tvar ss = s.replace(/([\\d]),([\\d])/g,\"$1$2\").replace(/[$]/g,\"\").replace(/[%]/g, function() { wt *= 100; return \"\";});\n\tif(!isNaN(v = Number(ss))) return v / wt;\n\tss = ss.replace(/[(](.*)[)]/,function($$, $1) { wt = -wt; return $1;});\n\tif(!isNaN(v = Number(ss))) return v / wt;\n\treturn v;\n}\nvar lower_months = ['january', 'february', 'march', 'april', 'may', 'june', 'july', 'august', 'september', 'october', 'november', 'december'];\nfunction fuzzydate(s/*:string*/)/*:Date*/ {\n\tvar o = new Date(s), n = new Date(NaN);\n\tvar y = o.getYear(), m = o.getMonth(), d = o.getDate();\n\tif(isNaN(d)) return n;\n\tvar lower = s.toLowerCase();\n\tif(lower.match(/jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec/)) {\n\t\tlower = lower.replace(/[^a-z]/g,\"\").replace(/([^a-z]|^)[ap]m?([^a-z]|$)/,\"\");\n\t\tif(lower.length > 3 && lower_months.indexOf(lower) == -1) return n;\n\t} else if(lower.match(/[a-z]/)) return n;\n\tif(y < 0 || y > 8099) return n;\n\tif((m > 0 || d > 1) && y != 101) return o;\n\tif(s.match(/[^-0-9:,\\/\\\\]/)) return n;\n\treturn o;\n}\n\nvar split_regex = /*#__PURE__*/(function() {\n\tvar safe_split_regex = \"abacaba\".split(/(:?b)/i).length == 5;\n\treturn function split_regex(str/*:string*/, re, def/*:string*/)/*:Array*/ {\n\t\tif(safe_split_regex || typeof re == \"string\") return str.split(re);\n\t\tvar p = str.split(re), o = [p[0]];\n\t\tfor(var i = 1; i < p.length; ++i) { o.push(def); o.push(p[i]); }\n\t\treturn o;\n\t};\n})();\nfunction getdatastr(data)/*:?string*/ {\n\tif(!data) return null;\n\tif(data.content && data.type) return cc2str(data.content, true);\n\tif(data.data) return debom(data.data);\n\tif(data.asNodeBuffer && has_buf) return debom(data.asNodeBuffer().toString('binary'));\n\tif(data.asBinary) return debom(data.asBinary());\n\tif(data._data && data._data.getContent) return debom(cc2str(Array.prototype.slice.call(data._data.getContent(),0)));\n\treturn null;\n}\n\nfunction getdatabin(data) {\n\tif(!data) return null;\n\tif(data.data) return char_codes(data.data);\n\tif(data.asNodeBuffer && has_buf) return data.asNodeBuffer();\n\tif(data._data && data._data.getContent) {\n\t\tvar o = data._data.getContent();\n\t\tif(typeof o == \"string\") return char_codes(o);\n\t\treturn Array.prototype.slice.call(o);\n\t}\n\tif(data.content && data.type) return data.content;\n\treturn null;\n}\n\nfunction getdata(data) { return (data && data.name.slice(-4) === \".bin\") ? getdatabin(data) : getdatastr(data); }\n\n/* Part 2 Section 10.1.2 \"Mapping Content Types\" Names are case-insensitive */\n/* OASIS does not comment on filename case sensitivity */\nfunction safegetzipfile(zip, file/*:string*/) {\n\tvar k = zip.FullPaths || keys(zip.files);\n\tvar f = file.toLowerCase().replace(/[\\/]/g, '\\\\'), g = f.replace(/\\\\/g,'\\/');\n\tfor(var i=0; i\\/]+)\\s*=\\s*((?:\")([^\"]*)(?:\")|(?:')([^']*)(?:')|([^'\">\\s]+))/g;\nvar tagregex1=/<[\\/\\?]?[a-zA-Z0-9:_-]+(?:\\s+[^\"\\s?>\\/]+\\s*=\\s*(?:\"[^\"]*\"|'[^']*'|[^'\">\\s=]+))*\\s*[\\/\\?]?>/mg, tagregex2 = /<[^>]*>/g;\nvar tagregex = /*#__PURE__*/XML_HEADER.match(tagregex1) ? tagregex1 : tagregex2;\nvar nsregex=/<\\w*:/, nsregex2 = /<(\\/?)\\w+:/;\nfunction parsexmltag(tag/*:string*/, skip_root/*:?boolean*/, skip_LC/*:?boolean*/)/*:any*/ {\n\tvar z = ({}/*:any*/);\n\tvar eq = 0, c = 0;\n\tfor(; eq !== tag.length; ++eq) if((c = tag.charCodeAt(eq)) === 32 || c === 10 || c === 13) break;\n\tif(!skip_root) z[0] = tag.slice(0, eq);\n\tif(eq === tag.length) return z;\n\tvar m = tag.match(attregexg), j=0, v=\"\", i=0, q=\"\", cc=\"\", quot = 1;\n\tif(m) for(i = 0; i != m.length; ++i) {\n\t\tcc = m[i];\n\t\tfor(c=0; c != cc.length; ++c) if(cc.charCodeAt(c) === 61) break;\n\t\tq = cc.slice(0,c).trim();\n\t\twhile(cc.charCodeAt(c+1) == 32) ++c;\n\t\tquot = ((eq=cc.charCodeAt(c+1)) == 34 || eq == 39) ? 1 : 0;\n\t\tv = cc.slice(c+1+quot, cc.length-quot);\n\t\tfor(j=0;j!=q.length;++j) if(q.charCodeAt(j) === 58) break;\n\t\tif(j===q.length) {\n\t\t\tif(q.indexOf(\"_\") > 0) q = q.slice(0, q.indexOf(\"_\")); // from ods\n\t\t\tz[q] = v;\n\t\t\tif(!skip_LC) z[q.toLowerCase()] = v;\n\t\t}\n\t\telse {\n\t\t\tvar k = (j===5 && q.slice(0,5)===\"xmlns\"?\"xmlns\":\"\")+q.slice(j+1);\n\t\t\tif(z[k] && q.slice(j-3,j) == \"ext\") continue; // from ods\n\t\t\tz[k] = v;\n\t\t\tif(!skip_LC) z[k.toLowerCase()] = v;\n\t\t}\n\t}\n\treturn z;\n}\nfunction strip_ns(x/*:string*/)/*:string*/ { return x.replace(nsregex2, \"<$1\"); }\n\nvar encodings = {\n\t'"': '\"',\n\t''': \"'\",\n\t'>': '>',\n\t'<': '<',\n\t'&': '&'\n};\nvar rencoding = /*#__PURE__*/evert(encodings);\n//var rencstr = \"&<>'\\\"\".split(\"\");\n\n// TODO: CP remap (need to read file version to determine OS)\nvar unescapexml/*:StringConv*/ = /*#__PURE__*/(function() {\n\t/* 22.4.2.4 bstr (Basic String) */\n\tvar encregex = /&(?:quot|apos|gt|lt|amp|#x?([\\da-fA-F]+));/ig, coderegex = /_x([\\da-fA-F]{4})_/ig;\n\treturn function unescapexml(text/*:string*/)/*:string*/ {\n\t\tvar s = text + '', i = s.indexOf(\"-1?16:10))||$$; }).replace(coderegex,function(m,c) {return String.fromCharCode(parseInt(c,16));});\n\t\tvar j = s.indexOf(\"]]>\");\n\t\treturn unescapexml(s.slice(0, i)) + s.slice(i+9,j) + unescapexml(s.slice(j+3));\n\t};\n})();\n\nvar decregex=/[&<>'\"]/g, charegex = /[\\u0000-\\u0008\\u000b-\\u001f]/g;\nfunction escapexml(text/*:string*/)/*:string*/{\n\tvar s = text + '';\n\treturn s.replace(decregex, function(y) { return rencoding[y]; }).replace(charegex,function(s) { return \"_x\" + (\"000\"+s.charCodeAt(0).toString(16)).slice(-4) + \"_\";});\n}\nfunction escapexmltag(text/*:string*/)/*:string*/{ return escapexml(text).replace(/ /g,\"_x0020_\"); }\n\nvar htmlcharegex = /[\\u0000-\\u001f]/g;\nfunction escapehtml(text/*:string*/)/*:string*/{\n\tvar s = text + '';\n\treturn s.replace(decregex, function(y) { return rencoding[y]; }).replace(/\\n/g, \"
\").replace(htmlcharegex,function(s) { return \"&#x\" + (\"000\"+s.charCodeAt(0).toString(16)).slice(-4) + \";\"; });\n}\n\nfunction escapexlml(text/*:string*/)/*:string*/{\n\tvar s = text + '';\n\treturn s.replace(decregex, function(y) { return rencoding[y]; }).replace(htmlcharegex,function(s) { return \"&#x\" + (s.charCodeAt(0).toString(16)).toUpperCase() + \";\"; });\n}\n\n/* TODO: handle codepages */\nvar xlml_fixstr/*:StringConv*/ = /*#__PURE__*/(function() {\n\tvar entregex = /&#(\\d+);/g;\n\tfunction entrepl($$/*:string*/,$1/*:string*/)/*:string*/ { return String.fromCharCode(parseInt($1,10)); }\n\treturn function xlml_fixstr(str/*:string*/)/*:string*/ { return str.replace(entregex,entrepl); };\n})();\nfunction xlml_unfixstr(str/*:string*/)/*:string*/ { return str.replace(/(\\r\\n|[\\r\\n])/g,\"\\ \"); }\n\nfunction parsexmlbool(value/*:any*/)/*:boolean*/ {\n\tswitch(value) {\n\t\tcase 1: case true: case '1': case 'true': case 'TRUE': return true;\n\t\t/* case '0': case 'false': case 'FALSE':*/\n\t\tdefault: return false;\n\t}\n}\n\nfunction utf8reada(orig/*:string*/)/*:string*/ {\n\tvar out = \"\", i = 0, c = 0, d = 0, e = 0, f = 0, w = 0;\n\twhile (i < orig.length) {\n\t\tc = orig.charCodeAt(i++);\n\t\tif (c < 128) { out += String.fromCharCode(c); continue; }\n\t\td = orig.charCodeAt(i++);\n\t\tif (c>191 && c<224) { f = ((c & 31) << 6); f |= (d & 63); out += String.fromCharCode(f); continue; }\n\t\te = orig.charCodeAt(i++);\n\t\tif (c < 240) { out += String.fromCharCode(((c & 15) << 12) | ((d & 63) << 6) | (e & 63)); continue; }\n\t\tf = orig.charCodeAt(i++);\n\t\tw = (((c & 7) << 18) | ((d & 63) << 12) | ((e & 63) << 6) | (f & 63))-65536;\n\t\tout += String.fromCharCode(0xD800 + ((w>>>10)&1023));\n\t\tout += String.fromCharCode(0xDC00 + (w&1023));\n\t}\n\treturn out;\n}\n\nfunction utf8readb(data) {\n\tvar out = new_raw_buf(2*data.length), w, i, j = 1, k = 0, ww=0, c;\n\tfor(i = 0; i < data.length; i+=j) {\n\t\tj = 1;\n\t\tif((c=data.charCodeAt(i)) < 128) w = c;\n\t\telse if(c < 224) { w = (c&31)*64+(data.charCodeAt(i+1)&63); j=2; }\n\t\telse if(c < 240) { w=(c&15)*4096+(data.charCodeAt(i+1)&63)*64+(data.charCodeAt(i+2)&63); j=3; }\n\t\telse { j = 4;\n\t\t\tw = (c & 7)*262144+(data.charCodeAt(i+1)&63)*4096+(data.charCodeAt(i+2)&63)*64+(data.charCodeAt(i+3)&63);\n\t\t\tw -= 65536; ww = 0xD800 + ((w>>>10)&1023); w = 0xDC00 + (w&1023);\n\t\t}\n\t\tif(ww !== 0) { out[k++] = ww&255; out[k++] = ww>>>8; ww = 0; }\n\t\tout[k++] = w%256; out[k++] = w>>>8;\n\t}\n\treturn out.slice(0,k).toString('ucs2');\n}\n\nfunction utf8readc(data) { return Buffer_from(data, 'binary').toString('utf8'); }\n\nvar utf8corpus = \"foo bar baz\\u00e2\\u0098\\u0083\\u00f0\\u009f\\u008d\\u00a3\";\nvar utf8read = has_buf && (/*#__PURE__*/utf8readc(utf8corpus) == /*#__PURE__*/utf8reada(utf8corpus) && utf8readc || /*#__PURE__*/utf8readb(utf8corpus) == /*#__PURE__*/utf8reada(utf8corpus) && utf8readb) || utf8reada;\n\nvar utf8write/*:StringConv*/ = has_buf ? function(data) { return Buffer_from(data, 'utf8').toString(\"binary\"); } : function(orig/*:string*/)/*:string*/ {\n\tvar out/*:Array*/ = [], i = 0, c = 0, d = 0;\n\twhile(i < orig.length) {\n\t\tc = orig.charCodeAt(i++);\n\t\tswitch(true) {\n\t\t\tcase c < 128: out.push(String.fromCharCode(c)); break;\n\t\t\tcase c < 2048:\n\t\t\t\tout.push(String.fromCharCode(192 + (c >> 6)));\n\t\t\t\tout.push(String.fromCharCode(128 + (c & 63)));\n\t\t\t\tbreak;\n\t\t\tcase c >= 55296 && c < 57344:\n\t\t\t\tc -= 55296; d = orig.charCodeAt(i++) - 56320 + (c<<10);\n\t\t\t\tout.push(String.fromCharCode(240 + ((d >>18) & 7)));\n\t\t\t\tout.push(String.fromCharCode(144 + ((d >>12) & 63)));\n\t\t\t\tout.push(String.fromCharCode(128 + ((d >> 6) & 63)));\n\t\t\t\tout.push(String.fromCharCode(128 + (d & 63)));\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tout.push(String.fromCharCode(224 + (c >> 12)));\n\t\t\t\tout.push(String.fromCharCode(128 + ((c >> 6) & 63)));\n\t\t\t\tout.push(String.fromCharCode(128 + (c & 63)));\n\t\t}\n\t}\n\treturn out.join(\"\");\n};\n\n// matches ... extracts content\nvar matchtag = /*#__PURE__*/(function() {\n\tvar mtcache/*:{[k:string]:RegExp}*/ = ({}/*:any*/);\n\treturn function matchtag(f/*:string*/,g/*:?string*/)/*:RegExp*/ {\n\t\tvar t = f+\"|\"+(g||\"\");\n\t\tif(mtcache[t]) return mtcache[t];\n\t\treturn (mtcache[t] = new RegExp('<(?:\\\\w+:)?'+f+'(?: xml:space=\"preserve\")?(?:[^>]*)>([\\\\s\\\\S]*?)',((g||\"\")/*:any*/)));\n\t};\n})();\n\nvar htmldecode/*:{(s:string):string}*/ = /*#__PURE__*/(function() {\n\tvar entities/*:Array<[RegExp, string]>*/ = [\n\t\t['nbsp', ' '], ['middot', '·'],\n\t\t['quot', '\"'], ['apos', \"'\"], ['gt', '>'], ['lt', '<'], ['amp', '&']\n\t].map(function(x/*:[string, string]*/) { return [new RegExp('&' + x[0] + ';', \"ig\"), x[1]]; });\n\treturn function htmldecode(str/*:string*/)/*:string*/ {\n\t\tvar o = str\n\t\t\t\t// Remove new lines and spaces from start of content\n\t\t\t\t.replace(/^[\\t\\n\\r ]+/, \"\")\n\t\t\t\t// Remove new lines and spaces from end of content\n\t\t\t\t.replace(/[\\t\\n\\r ]+$/,\"\")\n\t\t\t\t// Added line which removes any white space characters after and before html tags\n\t\t\t\t.replace(/>\\s+/g,\">\").replace(/\\s+ tags with new lines\n\t\t\t\t.replace(/<\\s*[bB][rR]\\s*\\/?>/g,\"\\n\")\n\t\t\t\t// Strip HTML elements\n\t\t\t\t.replace(/<[^>]*>/g,\"\");\n\t\tfor(var i = 0; i < entities.length; ++i) o = o.replace(entities[i][0], entities[i][1]);\n\t\treturn o;\n\t};\n})();\n\nvar vtregex = /*#__PURE__*/(function(){ var vt_cache = {};\n\treturn function vt_regex(bt) {\n\t\tif(vt_cache[bt] !== undefined) return vt_cache[bt];\n\t\treturn (vt_cache[bt] = new RegExp(\"<(?:vt:)?\" + bt + \">([\\\\s\\\\S]*?)\", 'g') );\n};})();\nvar vtvregex = /<\\/?(?:vt:)?variant>/g, vtmregex = /<(?:vt:)([^>]*)>([\\s\\S]*)*/ {\n\tvar h = parsexmltag(data);\n\n\tvar matches/*:Array*/ = data.match(vtregex(h.baseType))||[];\n\tvar res/*:Array*/ = [];\n\tif(matches.length != h.size) {\n\t\tif(opts.WTF) throw new Error(\"unexpected vector length \" + matches.length + \" != \" + h.size);\n\t\treturn res;\n\t}\n\tmatches.forEach(function(x/*:string*/) {\n\t\tvar v = x.replace(vtvregex,\"\").match(vtmregex);\n\t\tif(v) res.push({v:utf8read(v[2]), t:v[1]});\n\t});\n\treturn res;\n}\n\nvar wtregex = /(^\\s|\\s$|\\n)/;\nfunction writetag(f/*:string*/,g/*:string*/)/*:string*/ { return '<' + f + (g.match(wtregex)?' xml:space=\"preserve\"' : \"\") + '>' + g + ''; }\n\nfunction wxt_helper(h)/*:string*/ { return keys(h).map(function(k) { return \" \" + k + '=\"' + h[k] + '\"';}).join(\"\"); }\nfunction writextag(f/*:string*/,g/*:?string*/,h) { return '<' + f + ((h != null) ? wxt_helper(h) : \"\") + ((g != null) ? (g.match(wtregex)?' xml:space=\"preserve\"' : \"\") + '>' + g + '';}\n\nfunction write_w3cdtf(d/*:Date*/, t/*:?boolean*/)/*:string*/ { try { return d.toISOString().replace(/\\.\\d*/,\"\"); } catch(e) { if(t) throw e; } return \"\"; }\n\nfunction write_vt(s, xlsx/*:?boolean*/)/*:string*/ {\n\tswitch(typeof s) {\n\t\tcase 'string':\n\t\t\tvar o = writextag('vt:lpwstr', escapexml(s));\n\t\t\tif(xlsx) o = o.replace(/"/g, \"_x0022_\");\n\t\t\treturn o;\n\t\tcase 'number': return writextag((s|0)==s?'vt:i4':'vt:r8', escapexml(String(s)));\n\t\tcase 'boolean': return writextag('vt:bool',s?'true':'false');\n\t}\n\tif(s instanceof Date) return writextag('vt:filetime', write_w3cdtf(s));\n\tthrow new Error(\"Unable to serialize \" + s);\n}\n\nfunction xlml_normalize(d)/*:string*/ {\n\tif(has_buf &&/*::typeof Buffer !== \"undefined\" && d != null && d instanceof Buffer &&*/ Buffer.isBuffer(d)) return d.toString('utf8');\n\tif(typeof d === 'string') return d;\n\t/* duktape */\n\tif(typeof Uint8Array !== 'undefined' && d instanceof Uint8Array) return utf8read(a2s(ab2a(d)));\n\tthrow new Error(\"Bad input format: expected Buffer or string\");\n}\n/* UOS uses CJK in tags */\nvar xlmlregex = /<(\\/?)([^\\s?>:\\/]+)(?:[\\s?:\\/][^>]*)?>/mg;\n//var xlmlregex = /<(\\/?)([a-z0-9]*:|)(\\w+)[^>]*>/mg;\n\nvar XMLNS = ({\n\tCORE_PROPS: 'http://schemas.openxmlformats.org/package/2006/metadata/core-properties',\n\tCUST_PROPS: \"http://schemas.openxmlformats.org/officeDocument/2006/custom-properties\",\n\tEXT_PROPS: \"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties\",\n\tCT: 'http://schemas.openxmlformats.org/package/2006/content-types',\n\tRELS: 'http://schemas.openxmlformats.org/package/2006/relationships',\n\tTCMNT: 'http://schemas.microsoft.com/office/spreadsheetml/2018/threadedcomments',\n\t'dc': 'http://purl.org/dc/elements/1.1/',\n\t'dcterms': 'http://purl.org/dc/terms/',\n\t'dcmitype': 'http://purl.org/dc/dcmitype/',\n\t'mx': 'http://schemas.microsoft.com/office/mac/excel/2008/main',\n\t'r': 'http://schemas.openxmlformats.org/officeDocument/2006/relationships',\n\t'sjs': 'http://schemas.openxmlformats.org/package/2006/sheetjs/core-properties',\n\t'vt': 'http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes',\n\t'xsi': 'http://www.w3.org/2001/XMLSchema-instance',\n\t'xsd': 'http://www.w3.org/2001/XMLSchema'\n}/*:any*/);\n\nvar XMLNS_main = [\n\t'http://schemas.openxmlformats.org/spreadsheetml/2006/main',\n\t'http://purl.oclc.org/ooxml/spreadsheetml/main',\n\t'http://schemas.microsoft.com/office/excel/2006/main',\n\t'http://schemas.microsoft.com/office/excel/2006/2'\n];\n\nvar XLMLNS = ({\n\t'o': 'urn:schemas-microsoft-com:office:office',\n\t'x': 'urn:schemas-microsoft-com:office:excel',\n\t'ss': 'urn:schemas-microsoft-com:office:spreadsheet',\n\t'dt': 'uuid:C2F41010-65B3-11d1-A29F-00AA00C14882',\n\t'mv': 'http://macVmlSchemaUri',\n\t'v': 'urn:schemas-microsoft-com:vml',\n\t'html': 'http://www.w3.org/TR/REC-html40'\n}/*:any*/);\nfunction read_double_le(b/*:RawBytes|CFBlob*/, idx/*:number*/)/*:number*/ {\n\tvar s = 1 - 2 * (b[idx + 7] >>> 7);\n\tvar e = ((b[idx + 7] & 0x7f) << 4) + ((b[idx + 6] >>> 4) & 0x0f);\n\tvar m = (b[idx+6]&0x0f);\n\tfor(var i = 5; i >= 0; --i) m = m * 256 + b[idx + i];\n\tif(e == 0x7ff) return m == 0 ? (s * Infinity) : NaN;\n\tif(e == 0) e = -1022;\n\telse { e -= 1023; m += Math.pow(2,52); }\n\treturn s * Math.pow(2, e - 52) * m;\n}\n\nfunction write_double_le(b/*:RawBytes|CFBlob*/, v/*:number*/, idx/*:number*/) {\n\tvar bs = ((((v < 0) || (1/v == -Infinity)) ? 1 : 0) << 7), e = 0, m = 0;\n\tvar av = bs ? (-v) : v;\n\tif(!isFinite(av)) { e = 0x7ff; m = isNaN(v) ? 0x6969 : 0; }\n\telse if(av == 0) e = m = 0;\n\telse {\n\t\te = Math.floor(Math.log(av) / Math.LN2);\n\t\tm = av * Math.pow(2, 52 - e);\n\t\tif((e <= -1023) && (!isFinite(m) || (m < Math.pow(2,52)))) { e = -1022; }\n\t\telse { m -= Math.pow(2,52); e+=1023; }\n\t}\n\tfor(var i = 0; i <= 5; ++i, m/=256) b[idx + i] = m & 0xff;\n\tb[idx + 6] = ((e & 0x0f) << 4) | (m & 0xf);\n\tb[idx + 7] = (e >> 4) | bs;\n}\n\nvar ___toBuffer = function(bufs/*:Array >*/)/*:RawBytes*/ { var x=[],w=10240; for(var i=0;i 0 && Buffer.isBuffer(bufs[0][0])) ? Buffer.concat(bufs[0].map(function(x) { return Buffer.isBuffer(x) ? x : Buffer_from(x); })) : ___toBuffer(bufs);} : ___toBuffer;\n\nvar ___utf16le = function(b/*:RawBytes|CFBlob*/,s/*:number*/,e/*:number*/)/*:string*/ { var ss/*:Array*/=[]; for(var i=s; i*/=[]; for(var i=s; i 0 ? __utf8(b, i+4,i+4+len-1) : \"\";};\nvar __lpstr = ___lpstr;\n\nvar ___cpstr = function(b/*:RawBytes|CFBlob*/,i/*:number*/) { var len = __readUInt32LE(b,i); return len > 0 ? __utf8(b, i+4,i+4+len-1) : \"\";};\nvar __cpstr = ___cpstr;\n\nvar ___lpwstr = function(b/*:RawBytes|CFBlob*/,i/*:number*/) { var len = 2*__readUInt32LE(b,i); return len > 0 ? __utf8(b, i+4,i+4+len-1) : \"\";};\nvar __lpwstr = ___lpwstr;\n\nvar ___lpp4 = function lpp4_(b/*:RawBytes|CFBlob*/,i/*:number*/) { var len = __readUInt32LE(b,i); return len > 0 ? __utf16le(b, i+4,i+4+len) : \"\";};\nvar __lpp4 = ___lpp4;\n\nvar ___8lpp4 = function(b/*:RawBytes|CFBlob*/,i/*:number*/) { var len = __readUInt32LE(b,i); return len > 0 ? __utf8(b, i+4,i+4+len) : \"\";};\nvar __8lpp4 = ___8lpp4;\n\nvar ___double = function(b/*:RawBytes|CFBlob*/, idx/*:number*/) { return read_double_le(b, idx);};\nvar __double = ___double;\n\nvar is_buf = function is_buf_a(a) { return Array.isArray(a) || (typeof Uint8Array !== \"undefined\" && a instanceof Uint8Array); };\n\nif(has_buf/*:: && typeof Buffer !== 'undefined'*/) {\n\t__lpstr = function lpstr_b(b/*:RawBytes|CFBlob*/, i/*:number*/) { if(!Buffer.isBuffer(b)/*:: || !(b instanceof Buffer)*/) return ___lpstr(b, i); var len = b.readUInt32LE(i); return len > 0 ? b.toString('utf8',i+4,i+4+len-1) : \"\";};\n\t__cpstr = function cpstr_b(b/*:RawBytes|CFBlob*/, i/*:number*/) { if(!Buffer.isBuffer(b)/*:: || !(b instanceof Buffer)*/) return ___cpstr(b, i); var len = b.readUInt32LE(i); return len > 0 ? b.toString('utf8',i+4,i+4+len-1) : \"\";};\n\t__lpwstr = function lpwstr_b(b/*:RawBytes|CFBlob*/, i/*:number*/) { if(!Buffer.isBuffer(b)/*:: || !(b instanceof Buffer)*/) return ___lpwstr(b, i); var len = 2*b.readUInt32LE(i); return b.toString('utf16le',i+4,i+4+len-1);};\n\t__lpp4 = function lpp4_b(b/*:RawBytes|CFBlob*/, i/*:number*/) { if(!Buffer.isBuffer(b)/*:: || !(b instanceof Buffer)*/) return ___lpp4(b, i); var len = b.readUInt32LE(i); return b.toString('utf16le',i+4,i+4+len);};\n\t__8lpp4 = function lpp4_8b(b/*:RawBytes|CFBlob*/, i/*:number*/) { if(!Buffer.isBuffer(b)/*:: || !(b instanceof Buffer)*/) return ___8lpp4(b, i); var len = b.readUInt32LE(i); return b.toString('utf8',i+4,i+4+len);};\n\t__double = function double_(b/*:RawBytes|CFBlob*/, i/*:number*/) { if(Buffer.isBuffer(b)/*::&& b instanceof Buffer*/) return b.readDoubleLE(i); return ___double(b,i); };\n\tis_buf = function is_buf_b(a) { return Buffer.isBuffer(a) || Array.isArray(a) || (typeof Uint8Array !== \"undefined\" && a instanceof Uint8Array); };\n}\n\n/* from js-xls */\nfunction cpdoit() {\n\t__utf16le = function(b/*:RawBytes|CFBlob*/,s/*:number*/,e/*:number*/) { return $cptable.utils.decode(1200, b.slice(s,e)).replace(chr0, ''); };\n\t__utf8 = function(b/*:RawBytes|CFBlob*/,s/*:number*/,e/*:number*/) { return $cptable.utils.decode(65001, b.slice(s,e)); };\n\t__lpstr = function(b/*:RawBytes|CFBlob*/,i/*:number*/) { var len = __readUInt32LE(b,i); return len > 0 ? $cptable.utils.decode(current_ansi, b.slice(i+4, i+4+len-1)) : \"\";};\n\t__cpstr = function(b/*:RawBytes|CFBlob*/,i/*:number*/) { var len = __readUInt32LE(b,i); return len > 0 ? $cptable.utils.decode(current_codepage, b.slice(i+4, i+4+len-1)) : \"\";};\n\t__lpwstr = function(b/*:RawBytes|CFBlob*/,i/*:number*/) { var len = 2*__readUInt32LE(b,i); return len > 0 ? $cptable.utils.decode(1200, b.slice(i+4,i+4+len-1)) : \"\";};\n\t__lpp4 = function(b/*:RawBytes|CFBlob*/,i/*:number*/) { var len = __readUInt32LE(b,i); return len > 0 ? $cptable.utils.decode(1200, b.slice(i+4,i+4+len)) : \"\";};\n\t__8lpp4 = function(b/*:RawBytes|CFBlob*/,i/*:number*/) { var len = __readUInt32LE(b,i); return len > 0 ? $cptable.utils.decode(65001, b.slice(i+4,i+4+len)) : \"\";};\n}\nif(typeof $cptable !== 'undefined') cpdoit();\n\nvar __readUInt8 = function(b/*:RawBytes|CFBlob*/, idx/*:number*/)/*:number*/ { return b[idx]; };\nvar __readUInt16LE = function(b/*:RawBytes|CFBlob*/, idx/*:number*/)/*:number*/ { return (b[idx+1]*(1<<8))+b[idx]; };\nvar __readInt16LE = function(b/*:RawBytes|CFBlob*/, idx/*:number*/)/*:number*/ { var u = (b[idx+1]*(1<<8))+b[idx]; return (u < 0x8000) ? u : ((0xffff - u + 1) * -1); };\nvar __readUInt32LE = function(b/*:RawBytes|CFBlob*/, idx/*:number*/)/*:number*/ { return b[idx+3]*(1<<24)+(b[idx+2]<<16)+(b[idx+1]<<8)+b[idx]; };\nvar __readInt32LE = function(b/*:RawBytes|CFBlob*/, idx/*:number*/)/*:number*/ { return (b[idx+3]<<24)|(b[idx+2]<<16)|(b[idx+1]<<8)|b[idx]; };\nvar __readInt32BE = function(b/*:RawBytes|CFBlob*/, idx/*:number*/)/*:number*/ { return (b[idx]<<24)|(b[idx+1]<<16)|(b[idx+2]<<8)|b[idx+3]; };\n\nfunction ReadShift(size/*:number*/, t/*:?string*/)/*:number|string*/ {\n\tvar o=\"\", oI/*:: :number = 0*/, oR, oo=[], w, vv, i, loc;\n\tswitch(t) {\n\t\tcase 'dbcs':\n\t\t\tloc = this.l;\n\t\t\tif(has_buf && Buffer.isBuffer(this)) o = this.slice(this.l, this.l+2*size).toString(\"utf16le\");\n\t\t\telse for(i = 0; i < size; ++i) { o+=String.fromCharCode(__readUInt16LE(this, loc)); loc+=2; }\n\t\t\tsize *= 2;\n\t\t\tbreak;\n\n\t\tcase 'utf8': o = __utf8(this, this.l, this.l + size); break;\n\t\tcase 'utf16le': size *= 2; o = __utf16le(this, this.l, this.l + size); break;\n\n\t\tcase 'wstr':\n\t\t\tif(typeof $cptable !== 'undefined') o = $cptable.utils.decode(current_codepage, this.slice(this.l, this.l+2*size));\n\t\t\telse return ReadShift.call(this, size, 'dbcs');\n\t\t\tsize = 2 * size; break;\n\n\t\t/* [MS-OLEDS] 2.1.4 LengthPrefixedAnsiString */\n\t\tcase 'lpstr-ansi': o = __lpstr(this, this.l); size = 4 + __readUInt32LE(this, this.l); break;\n\t\tcase 'lpstr-cp': o = __cpstr(this, this.l); size = 4 + __readUInt32LE(this, this.l); break;\n\t\t/* [MS-OLEDS] 2.1.5 LengthPrefixedUnicodeString */\n\t\tcase 'lpwstr': o = __lpwstr(this, this.l); size = 4 + 2 * __readUInt32LE(this, this.l); break;\n\t\t/* [MS-OFFCRYPTO] 2.1.2 Length-Prefixed Padded Unicode String (UNICODE-LP-P4) */\n\t\tcase 'lpp4': size = 4 + __readUInt32LE(this, this.l); o = __lpp4(this, this.l); if(size & 0x02) size += 2; break;\n\t\t/* [MS-OFFCRYPTO] 2.1.3 Length-Prefixed UTF-8 String (UTF-8-LP-P4) */\n\t\tcase '8lpp4': size = 4 + __readUInt32LE(this, this.l); o = __8lpp4(this, this.l); if(size & 0x03) size += 4 - (size & 0x03); break;\n\n\t\tcase 'cstr': size = 0; o = \"\";\n\t\t\twhile((w=__readUInt8(this, this.l + size++))!==0) oo.push(_getchar(w));\n\t\t\to = oo.join(\"\"); break;\n\t\tcase '_wstr': size = 0; o = \"\";\n\t\t\twhile((w=__readUInt16LE(this,this.l +size))!==0){oo.push(_getchar(w));size+=2;}\n\t\t\tsize+=2; o = oo.join(\"\"); break;\n\n\t\t/* sbcs and dbcs support continue records in the SST way TODO codepages */\n\t\tcase 'dbcs-cont': o = \"\"; loc = this.l;\n\t\t\tfor(i = 0; i < size; ++i) {\n\t\t\t\tif(this.lens && this.lens.indexOf(loc) !== -1) {\n\t\t\t\t\tw = __readUInt8(this, loc);\n\t\t\t\t\tthis.l = loc + 1;\n\t\t\t\t\tvv = ReadShift.call(this, size-i, w ? 'dbcs-cont' : 'sbcs-cont');\n\t\t\t\t\treturn oo.join(\"\") + vv;\n\t\t\t\t}\n\t\t\t\too.push(_getchar(__readUInt16LE(this, loc)));\n\t\t\t\tloc+=2;\n\t\t\t} o = oo.join(\"\"); size *= 2; break;\n\n\t\tcase 'cpstr':\n\t\t\tif(typeof $cptable !== 'undefined') {\n\t\t\t\to = $cptable.utils.decode(current_codepage, this.slice(this.l, this.l + size));\n\t\t\t\tbreak;\n\t\t\t}\n\t\t/* falls through */\n\t\tcase 'sbcs-cont': o = \"\"; loc = this.l;\n\t\t\tfor(i = 0; i != size; ++i) {\n\t\t\t\tif(this.lens && this.lens.indexOf(loc) !== -1) {\n\t\t\t\t\tw = __readUInt8(this, loc);\n\t\t\t\t\tthis.l = loc + 1;\n\t\t\t\t\tvv = ReadShift.call(this, size-i, w ? 'dbcs-cont' : 'sbcs-cont');\n\t\t\t\t\treturn oo.join(\"\") + vv;\n\t\t\t\t}\n\t\t\t\too.push(_getchar(__readUInt8(this, loc)));\n\t\t\t\tloc+=1;\n\t\t\t} o = oo.join(\"\"); break;\n\n\t\tdefault:\n\tswitch(size) {\n\t\tcase 1: oI = __readUInt8(this, this.l); this.l++; return oI;\n\t\tcase 2: oI = (t === 'i' ? __readInt16LE : __readUInt16LE)(this, this.l); this.l += 2; return oI;\n\t\tcase 4: case -4:\n\t\t\tif(t === 'i' || ((this[this.l+3] & 0x80)===0)) { oI = ((size > 0) ? __readInt32LE : __readInt32BE)(this, this.l); this.l += 4; return oI; }\n\t\t\telse { oR = __readUInt32LE(this, this.l); this.l += 4; } return oR;\n\t\tcase 8: case -8:\n\t\t\tif(t === 'f') {\n\t\t\t\tif(size == 8) oR = __double(this, this.l);\n\t\t\t\telse oR = __double([this[this.l+7],this[this.l+6],this[this.l+5],this[this.l+4],this[this.l+3],this[this.l+2],this[this.l+1],this[this.l+0]], 0);\n\t\t\t\tthis.l += 8; return oR;\n\t\t\t} else size = 8;\n\t\t/* falls through */\n\t\tcase 16: o = __hexlify(this, this.l, size); break;\n\t}}\n\tthis.l+=size; return o;\n}\n\nvar __writeUInt32LE = function(b/*:RawBytes|CFBlob*/, val/*:number*/, idx/*:number*/)/*:void*/ { b[idx] = (val & 0xFF); b[idx+1] = ((val >>> 8) & 0xFF); b[idx+2] = ((val >>> 16) & 0xFF); b[idx+3] = ((val >>> 24) & 0xFF); };\nvar __writeInt32LE = function(b/*:RawBytes|CFBlob*/, val/*:number*/, idx/*:number*/)/*:void*/ { b[idx] = (val & 0xFF); b[idx+1] = ((val >> 8) & 0xFF); b[idx+2] = ((val >> 16) & 0xFF); b[idx+3] = ((val >> 24) & 0xFF); };\nvar __writeUInt16LE = function(b/*:RawBytes|CFBlob*/, val/*:number*/, idx/*:number*/)/*:void*/ { b[idx] = (val & 0xFF); b[idx+1] = ((val >>> 8) & 0xFF); };\n\nfunction WriteShift(t/*:number*/, val/*:string|number*/, f/*:?string*/)/*:any*/ {\n\tvar size = 0, i = 0;\n\tif(f === 'dbcs') {\n\t\t/*:: if(typeof val !== 'string') throw new Error(\"unreachable\"); */\n\t\tfor(i = 0; i != val.length; ++i) __writeUInt16LE(this, val.charCodeAt(i), this.l + 2 * i);\n\t\tsize = 2 * val.length;\n\t} else if(f === 'sbcs') {\n\t\tif(typeof $cptable !== 'undefined' && current_ansi == 874) {\n\t\t\t/* TODO: use tables directly, don't encode */\n\t\t\t/*:: if(typeof val !== \"string\") throw new Error(\"unreachable\"); */\n\t\t\tfor(i = 0; i != val.length; ++i) {\n\t\t\t\tvar cppayload = $cptable.utils.encode(current_ansi, val.charAt(i));\n\t\t\t\tthis[this.l + i] = cppayload[0];\n\t\t\t}\n\t\t} else {\n\t\t\t/*:: if(typeof val !== 'string') throw new Error(\"unreachable\"); */\n\t\t\tval = val.replace(/[^\\x00-\\x7F]/g, \"_\");\n\t\t\t/*:: if(typeof val !== 'string') throw new Error(\"unreachable\"); */\n\t\t\tfor(i = 0; i != val.length; ++i) this[this.l + i] = (val.charCodeAt(i) & 0xFF);\n\t\t}\n\t\tsize = val.length;\n\t} else if(f === 'hex') {\n\t\tfor(; i < t; ++i) {\n\t\t\t/*:: if(typeof val !== \"string\") throw new Error(\"unreachable\"); */\n\t\t\tthis[this.l++] = (parseInt(val.slice(2*i, 2*i+2), 16)||0);\n\t\t} return this;\n\t} else if(f === 'utf16le') {\n\t\t\t/*:: if(typeof val !== \"string\") throw new Error(\"unreachable\"); */\n\t\t\tvar end/*:number*/ = Math.min(this.l + t, this.length);\n\t\t\tfor(i = 0; i < Math.min(val.length, t); ++i) {\n\t\t\t\tvar cc = val.charCodeAt(i);\n\t\t\t\tthis[this.l++] = (cc & 0xff);\n\t\t\t\tthis[this.l++] = (cc >> 8);\n\t\t\t}\n\t\t\twhile(this.l < end) this[this.l++] = 0;\n\t\t\treturn this;\n\t} else /*:: if(typeof val === 'number') */ switch(t) {\n\t\tcase 1: size = 1; this[this.l] = val&0xFF; break;\n\t\tcase 2: size = 2; this[this.l] = val&0xFF; val >>>= 8; this[this.l+1] = val&0xFF; break;\n\t\tcase 3: size = 3; this[this.l] = val&0xFF; val >>>= 8; this[this.l+1] = val&0xFF; val >>>= 8; this[this.l+2] = val&0xFF; break;\n\t\tcase 4: size = 4; __writeUInt32LE(this, val, this.l); break;\n\t\tcase 8: size = 8; if(f === 'f') { write_double_le(this, val, this.l); break; }\n\t\t/* falls through */\n\t\tcase 16: break;\n\t\tcase -4: size = 4; __writeInt32LE(this, val, this.l); break;\n\t}\n\tthis.l += size; return this;\n}\n\nfunction CheckField(hexstr/*:string*/, fld/*:string*/)/*:void*/ {\n\tvar m = __hexlify(this,this.l,hexstr.length>>1);\n\tif(m !== hexstr) throw new Error(fld + 'Expected ' + hexstr + ' saw ' + m);\n\tthis.l += hexstr.length>>1;\n}\n\nfunction prep_blob(blob, pos/*:number*/)/*:void*/ {\n\tblob.l = pos;\n\tblob.read_shift = /*::(*/ReadShift/*:: :any)*/;\n\tblob.chk = CheckField;\n\tblob.write_shift = WriteShift;\n}\n\nfunction parsenoop(blob, length/*:: :number, opts?:any */) { blob.l += length; }\n\nfunction new_buf(sz/*:number*/)/*:Block*/ {\n\tvar o = new_raw_buf(sz);\n\tprep_blob(o, 0);\n\treturn o;\n}\n\n/* [MS-XLSB] 2.1.4 Record */\nfunction recordhopper(data, cb/*:RecordHopperCB*/, opts/*:?any*/) {\n\tif(!data) return;\n\tvar tmpbyte, cntbyte, length;\n\tprep_blob(data, data.l || 0);\n\tvar L = data.length, RT = 0, tgt = 0;\n\twhile(data.l < L) {\n\t\tRT = data.read_shift(1);\n\t\tif(RT & 0x80) RT = (RT & 0x7F) + ((data.read_shift(1) & 0x7F)<<7);\n\t\tvar R = XLSBRecordEnum[RT] || XLSBRecordEnum[0xFFFF];\n\t\ttmpbyte = data.read_shift(1);\n\t\tlength = tmpbyte & 0x7F;\n\t\tfor(cntbyte = 1; cntbyte <4 && (tmpbyte & 0x80); ++cntbyte) length += ((tmpbyte = data.read_shift(1)) & 0x7F)<<(7*cntbyte);\n\t\ttgt = data.l + length;\n\t\tvar d = R.f && R.f(data, length, opts);\n\t\tdata.l = tgt;\n\t\tif(cb(d, R, RT)) return;\n\t}\n}\n\n/* control buffer usage for fixed-length buffers */\nfunction buf_array()/*:BufArray*/ {\n\tvar bufs/*:Array*/ = [], blksz = has_buf ? 256 : 2048;\n\tvar newblk = function ba_newblk(sz/*:number*/)/*:Block*/ {\n\t\tvar o/*:Block*/ = (new_buf(sz)/*:any*/);\n\t\tprep_blob(o, 0);\n\t\treturn o;\n\t};\n\n\tvar curbuf/*:Block*/ = newblk(blksz);\n\n\tvar endbuf = function ba_endbuf() {\n\t\tif(!curbuf) return;\n\t\tif(curbuf.length > curbuf.l) { curbuf = curbuf.slice(0, curbuf.l); curbuf.l = curbuf.length; }\n\t\tif(curbuf.length > 0) bufs.push(curbuf);\n\t\tcurbuf = null;\n\t};\n\n\tvar next = function ba_next(sz/*:number*/)/*:Block*/ {\n\t\tif(curbuf && (sz < (curbuf.length - curbuf.l))) return curbuf;\n\t\tendbuf();\n\t\treturn (curbuf = newblk(Math.max(sz+1, blksz)));\n\t};\n\n\tvar end = function ba_end() {\n\t\tendbuf();\n\t\treturn bconcat(bufs);\n\t};\n\n\tvar push = function ba_push(buf) { endbuf(); curbuf = buf; if(curbuf.l == null) curbuf.l = curbuf.length; next(blksz); };\n\n\treturn ({ next:next, push:push, end:end, _bufs:bufs }/*:any*/);\n}\n\nfunction write_record(ba/*:BufArray*/, type/*:number*/, payload, length/*:?number*/) {\n\tvar t/*:number*/ = +type, l;\n\tif(isNaN(t)) return; // TODO: throw something here?\n\tif(!length) length = XLSBRecordEnum[t].p || (payload||[]).length || 0;\n\tl = 1 + (t >= 0x80 ? 1 : 0) + 1/* + length*/;\n\tif(length >= 0x80) ++l; if(length >= 0x4000) ++l; if(length >= 0x200000) ++l;\n\tvar o = ba.next(l);\n\tif(t <= 0x7F) o.write_shift(1, t);\n\telse {\n\t\to.write_shift(1, (t & 0x7F) + 0x80);\n\t\to.write_shift(1, (t >> 7));\n\t}\n\tfor(var i = 0; i != 4; ++i) {\n\t\tif(length >= 0x80) { o.write_shift(1, (length & 0x7F)+0x80); length >>= 7; }\n\t\telse { o.write_shift(1, length); break; }\n\t}\n\tif(/*:: length != null &&*/length > 0 && is_buf(payload)) ba.push(payload);\n}\n/* XLS ranges enforced */\nfunction shift_cell_xls(cell/*:CellAddress*/, tgt/*:any*/, opts/*:?any*/)/*:CellAddress*/ {\n\tvar out = dup(cell);\n\tif(tgt.s) {\n\t\tif(out.cRel) out.c += tgt.s.c;\n\t\tif(out.rRel) out.r += tgt.s.r;\n\t} else {\n\t\tif(out.cRel) out.c += tgt.c;\n\t\tif(out.rRel) out.r += tgt.r;\n\t}\n\tif(!opts || opts.biff < 12) {\n\t\twhile(out.c >= 0x100) out.c -= 0x100;\n\t\twhile(out.r >= 0x10000) out.r -= 0x10000;\n\t}\n\treturn out;\n}\n\nfunction shift_range_xls(cell, range, opts) {\n\tvar out = dup(cell);\n\tout.s = shift_cell_xls(out.s, range.s, opts);\n\tout.e = shift_cell_xls(out.e, range.s, opts);\n\treturn out;\n}\n\nfunction encode_cell_xls(c/*:CellAddress*/, biff/*:number*/)/*:string*/ {\n\tif(c.cRel && c.c < 0) { c = dup(c); while(c.c < 0) c.c += (biff > 8) ? 0x4000 : 0x100; }\n\tif(c.rRel && c.r < 0) { c = dup(c); while(c.r < 0) c.r += (biff > 8) ? 0x100000 : ((biff > 5) ? 0x10000 : 0x4000); }\n\tvar s = encode_cell(c);\n\tif(!c.cRel && c.cRel != null) s = fix_col(s);\n\tif(!c.rRel && c.rRel != null) s = fix_row(s);\n\treturn s;\n}\n\nfunction encode_range_xls(r, opts)/*:string*/ {\n\tif(r.s.r == 0 && !r.s.rRel) {\n\t\tif(r.e.r == (opts.biff >= 12 ? 0xFFFFF : (opts.biff >= 8 ? 0x10000 : 0x4000)) && !r.e.rRel) {\n\t\t\treturn (r.s.cRel ? \"\" : \"$\") + encode_col(r.s.c) + \":\" + (r.e.cRel ? \"\" : \"$\") + encode_col(r.e.c);\n\t\t}\n\t}\n\tif(r.s.c == 0 && !r.s.cRel) {\n\t\tif(r.e.c == (opts.biff >= 12 ? 0x3FFF : 0xFF) && !r.e.cRel) {\n\t\t\treturn (r.s.rRel ? \"\" : \"$\") + encode_row(r.s.r) + \":\" + (r.e.rRel ? \"\" : \"$\") + encode_row(r.e.r);\n\t\t}\n\t}\n\treturn encode_cell_xls(r.s, opts.biff) + \":\" + encode_cell_xls(r.e, opts.biff);\n}\nfunction decode_row(rowstr/*:string*/)/*:number*/ { return parseInt(unfix_row(rowstr),10) - 1; }\nfunction encode_row(row/*:number*/)/*:string*/ { return \"\" + (row + 1); }\nfunction fix_row(cstr/*:string*/)/*:string*/ { return cstr.replace(/([A-Z]|^)(\\d+)$/,\"$1$$$2\"); }\nfunction unfix_row(cstr/*:string*/)/*:string*/ { return cstr.replace(/\\$(\\d+)$/,\"$1\"); }\n\nfunction decode_col(colstr/*:string*/)/*:number*/ { var c = unfix_col(colstr), d = 0, i = 0; for(; i !== c.length; ++i) d = 26*d + c.charCodeAt(i) - 64; return d - 1; }\nfunction encode_col(col/*:number*/)/*:string*/ { if(col < 0) throw new Error(\"invalid column \" + col); var s=\"\"; for(++col; col; col=Math.floor((col-1)/26)) s = String.fromCharCode(((col-1)%26) + 65) + s; return s; }\nfunction fix_col(cstr/*:string*/)/*:string*/ { return cstr.replace(/^([A-Z])/,\"$$$1\"); }\nfunction unfix_col(cstr/*:string*/)/*:string*/ { return cstr.replace(/^\\$([A-Z])/,\"$1\"); }\n\nfunction split_cell(cstr/*:string*/)/*:Array*/ { return cstr.replace(/(\\$?[A-Z]*)(\\$?\\d*)/,\"$1,$2\").split(\",\"); }\n//function decode_cell(cstr/*:string*/)/*:CellAddress*/ { var splt = split_cell(cstr); return { c:decode_col(splt[0]), r:decode_row(splt[1]) }; }\nfunction decode_cell(cstr/*:string*/)/*:CellAddress*/ {\n\tvar R = 0, C = 0;\n\tfor(var i = 0; i < cstr.length; ++i) {\n\t\tvar cc = cstr.charCodeAt(i);\n\t\tif(cc >= 48 && cc <= 57) R = 10 * R + (cc - 48);\n\t\telse if(cc >= 65 && cc <= 90) C = 26 * C + (cc - 64);\n\t}\n\treturn { c: C - 1, r:R - 1 };\n}\n//function encode_cell(cell/*:CellAddress*/)/*:string*/ { return encode_col(cell.c) + encode_row(cell.r); }\nfunction encode_cell(cell/*:CellAddress*/)/*:string*/ {\n\tvar col = cell.c + 1;\n\tvar s=\"\";\n\tfor(; col; col=((col-1)/26)|0) s = String.fromCharCode(((col-1)%26) + 65) + s;\n\treturn s + (cell.r + 1);\n}\nfunction decode_range(range/*:string*/)/*:Range*/ {\n\tvar idx = range.indexOf(\":\");\n\tif(idx == -1) return { s: decode_cell(range), e: decode_cell(range) };\n\treturn { s: decode_cell(range.slice(0, idx)), e: decode_cell(range.slice(idx + 1)) };\n}\n/*# if only one arg, it is assumed to be a Range. If 2 args, both are cell addresses */\nfunction encode_range(cs/*:CellAddrSpec|Range*/,ce/*:?CellAddrSpec*/)/*:string*/ {\n\tif(typeof ce === 'undefined' || typeof ce === 'number') {\n/*:: if(!(cs instanceof Range)) throw \"unreachable\"; */\n\t\treturn encode_range(cs.s, cs.e);\n\t}\n/*:: if((cs instanceof Range)) throw \"unreachable\"; */\n\tif(typeof cs !== 'string') cs = encode_cell((cs/*:any*/));\n\tif(typeof ce !== 'string') ce = encode_cell((ce/*:any*/));\n/*:: if(typeof cs !== 'string') throw \"unreachable\"; */\n/*:: if(typeof ce !== 'string') throw \"unreachable\"; */\n\treturn cs == ce ? cs : cs + \":\" + ce;\n}\n\nfunction safe_decode_range(range/*:string*/)/*:Range*/ {\n\tvar o = {s:{c:0,r:0},e:{c:0,r:0}};\n\tvar idx = 0, i = 0, cc = 0;\n\tvar len = range.length;\n\tfor(idx = 0; i < len; ++i) {\n\t\tif((cc=range.charCodeAt(i)-64) < 1 || cc > 26) break;\n\t\tidx = 26*idx + cc;\n\t}\n\to.s.c = --idx;\n\n\tfor(idx = 0; i < len; ++i) {\n\t\tif((cc=range.charCodeAt(i)-48) < 0 || cc > 9) break;\n\t\tidx = 10*idx + cc;\n\t}\n\to.s.r = --idx;\n\n\tif(i === len || cc != 10) { o.e.c=o.s.c; o.e.r=o.s.r; return o; }\n\t++i;\n\n\tfor(idx = 0; i != len; ++i) {\n\t\tif((cc=range.charCodeAt(i)-64) < 1 || cc > 26) break;\n\t\tidx = 26*idx + cc;\n\t}\n\to.e.c = --idx;\n\n\tfor(idx = 0; i != len; ++i) {\n\t\tif((cc=range.charCodeAt(i)-48) < 0 || cc > 9) break;\n\t\tidx = 10*idx + cc;\n\t}\n\to.e.r = --idx;\n\treturn o;\n}\n\nfunction safe_format_cell(cell/*:Cell*/, v/*:any*/) {\n\tvar q = (cell.t == 'd' && v instanceof Date);\n\tif(cell.z != null) try { return (cell.w = SSF_format(cell.z, q ? datenum(v) : v)); } catch(e) { }\n\ttry { return (cell.w = SSF_format((cell.XF||{}).numFmtId||(q ? 14 : 0), q ? datenum(v) : v)); } catch(e) { return ''+v; }\n}\n\nfunction format_cell(cell/*:Cell*/, v/*:any*/, o/*:any*/) {\n\tif(cell == null || cell.t == null || cell.t == 'z') return \"\";\n\tif(cell.w !== undefined) return cell.w;\n\tif(cell.t == 'd' && !cell.z && o && o.dateNF) cell.z = o.dateNF;\n\tif(cell.t == \"e\") return BErr[cell.v] || cell.v;\n\tif(v == undefined) return safe_format_cell(cell, cell.v);\n\treturn safe_format_cell(cell, v);\n}\n\nfunction sheet_to_workbook(sheet/*:Worksheet*/, opts)/*:Workbook*/ {\n\tvar n = opts && opts.sheet ? opts.sheet : \"Sheet1\";\n\tvar sheets = {}; sheets[n] = sheet;\n\treturn { SheetNames: [n], Sheets: sheets };\n}\n\nfunction sheet_add_aoa(_ws/*:?Worksheet*/, data/*:AOA*/, opts/*:?any*/)/*:Worksheet*/ {\n\tvar o = opts || {};\n\tvar dense = _ws ? Array.isArray(_ws) : o.dense;\n\tif(DENSE != null && dense == null) dense = DENSE;\n\tvar ws/*:Worksheet*/ = _ws || (dense ? ([]/*:any*/) : ({}/*:any*/));\n\tvar _R = 0, _C = 0;\n\tif(ws && o.origin != null) {\n\t\tif(typeof o.origin == 'number') _R = o.origin;\n\t\telse {\n\t\t\tvar _origin/*:CellAddress*/ = typeof o.origin == \"string\" ? decode_cell(o.origin) : o.origin;\n\t\t\t_R = _origin.r; _C = _origin.c;\n\t\t}\n\t\tif(!ws[\"!ref\"]) ws[\"!ref\"] = \"A1:A1\";\n\t}\n\tvar range/*:Range*/ = ({s: {c:10000000, r:10000000}, e: {c:0, r:0}}/*:any*/);\n\tif(ws['!ref']) {\n\t\tvar _range = safe_decode_range(ws['!ref']);\n\t\trange.s.c = _range.s.c;\n\t\trange.s.r = _range.s.r;\n\t\trange.e.c = Math.max(range.e.c, _range.e.c);\n\t\trange.e.r = Math.max(range.e.r, _range.e.r);\n\t\tif(_R == -1) range.e.r = _R = _range.e.r + 1;\n\t}\n\tfor(var R = 0; R != data.length; ++R) {\n\t\tif(!data[R]) continue;\n\t\tif(!Array.isArray(data[R])) throw new Error(\"aoa_to_sheet expects an array of arrays\");\n\t\tfor(var C = 0; C != data[R].length; ++C) {\n\t\t\tif(typeof data[R][C] === 'undefined') continue;\n\t\t\tvar cell/*:Cell*/ = ({v: data[R][C] }/*:any*/);\n\t\t\tvar __R = _R + R, __C = _C + C;\n\t\t\tif(range.s.r > __R) range.s.r = __R;\n\t\t\tif(range.s.c > __C) range.s.c = __C;\n\t\t\tif(range.e.r < __R) range.e.r = __R;\n\t\t\tif(range.e.c < __C) range.e.c = __C;\n\t\t\tif(data[R][C] && typeof data[R][C] === 'object' && !Array.isArray(data[R][C]) && !(data[R][C] instanceof Date)) cell = data[R][C];\n\t\t\telse {\n\t\t\t\tif(Array.isArray(cell.v)) { cell.f = data[R][C][1]; cell.v = cell.v[0]; }\n\t\t\t\tif(cell.v === null) {\n\t\t\t\t\tif(cell.f) cell.t = 'n';\n\t\t\t\t\telse if(o.nullError) { cell.t = 'e'; cell.v = 0; }\n\t\t\t\t\telse if(!o.sheetStubs) continue;\n\t\t\t\t\telse cell.t = 'z';\n\t\t\t\t}\n\t\t\t\telse if(typeof cell.v === 'number') cell.t = 'n';\n\t\t\t\telse if(typeof cell.v === 'boolean') cell.t = 'b';\n\t\t\t\telse if(cell.v instanceof Date) {\n\t\t\t\t\tcell.z = o.dateNF || table_fmt[14];\n\t\t\t\t\tif(o.cellDates) { cell.t = 'd'; cell.w = SSF_format(cell.z, datenum(cell.v)); }\n\t\t\t\t\telse { cell.t = 'n'; cell.v = datenum(cell.v); cell.w = SSF_format(cell.z, cell.v); }\n\t\t\t\t}\n\t\t\t\telse cell.t = 's';\n\t\t\t}\n\t\t\tif(dense) {\n\t\t\t\tif(!ws[__R]) ws[__R] = [];\n\t\t\t\tif(ws[__R][__C] && ws[__R][__C].z) cell.z = ws[__R][__C].z;\n\t\t\t\tws[__R][__C] = cell;\n\t\t\t} else {\n\t\t\t\tvar cell_ref = encode_cell(({c:__C,r:__R}/*:any*/));\n\t\t\t\tif(ws[cell_ref] && ws[cell_ref].z) cell.z = ws[cell_ref].z;\n\t\t\t\tws[cell_ref] = cell;\n\t\t\t}\n\t\t}\n\t}\n\tif(range.s.c < 10000000) ws['!ref'] = encode_range(range);\n\treturn ws;\n}\nfunction aoa_to_sheet(data/*:AOA*/, opts/*:?any*/)/*:Worksheet*/ { return sheet_add_aoa(null, data, opts); }\n\nfunction parse_Int32LE(data) {\n\treturn data.read_shift(4, 'i');\n}\nfunction write_UInt32LE(x/*:number*/, o) {\n\tif (!o) o = new_buf(4);\n\to.write_shift(4, x);\n\treturn o;\n}\n\n/* [MS-XLSB] 2.5.168 */\nfunction parse_XLWideString(data/*::, length*/)/*:string*/ {\n\tvar cchCharacters = data.read_shift(4);\n\treturn cchCharacters === 0 ? \"\" : data.read_shift(cchCharacters, 'dbcs');\n}\nfunction write_XLWideString(data/*:string*/, o) {\n\tvar _null = false; if (o == null) { _null = true; o = new_buf(4 + 2 * data.length); }\n\to.write_shift(4, data.length);\n\tif (data.length > 0) o.write_shift(0, data, 'dbcs');\n\treturn _null ? o.slice(0, o.l) : o;\n}\n\n/* [MS-XLSB] 2.5.91 */\n//function parse_LPWideString(data/*::, length*/)/*:string*/ {\n//\tvar cchCharacters = data.read_shift(2);\n//\treturn cchCharacters === 0 ? \"\" : data.read_shift(cchCharacters, \"utf16le\");\n//}\n\n/* [MS-XLSB] 2.5.143 */\nfunction parse_StrRun(data) {\n\treturn { ich: data.read_shift(2), ifnt: data.read_shift(2) };\n}\nfunction write_StrRun(run, o) {\n\tif (!o) o = new_buf(4);\n\to.write_shift(2, run.ich || 0);\n\to.write_shift(2, run.ifnt || 0);\n\treturn o;\n}\n\n/* [MS-XLSB] 2.5.121 */\nfunction parse_RichStr(data, length/*:number*/)/*:XLString*/ {\n\tvar start = data.l;\n\tvar flags = data.read_shift(1);\n\tvar str = parse_XLWideString(data);\n\tvar rgsStrRun = [];\n\tvar z = ({ t: str, h: str }/*:any*/);\n\tif ((flags & 1) !== 0) { /* fRichStr */\n\t\t/* TODO: formatted string */\n\t\tvar dwSizeStrRun = data.read_shift(4);\n\t\tfor (var i = 0; i != dwSizeStrRun; ++i) rgsStrRun.push(parse_StrRun(data));\n\t\tz.r = rgsStrRun;\n\t}\n\telse z.r = [{ ich: 0, ifnt: 0 }];\n\t//if((flags & 2) !== 0) { /* fExtStr */\n\t//\t/* TODO: phonetic string */\n\t//}\n\tdata.l = start + length;\n\treturn z;\n}\nfunction write_RichStr(str/*:XLString*/, o/*:?Block*/)/*:Block*/ {\n\t/* TODO: formatted string */\n\tvar _null = false; if (o == null) { _null = true; o = new_buf(15 + 4 * str.t.length); }\n\to.write_shift(1, 0);\n\twrite_XLWideString(str.t, o);\n\treturn _null ? o.slice(0, o.l) : o;\n}\n/* [MS-XLSB] 2.4.328 BrtCommentText (RichStr w/1 run) */\nvar parse_BrtCommentText = parse_RichStr;\nfunction write_BrtCommentText(str/*:XLString*/, o/*:?Block*/)/*:Block*/ {\n\t/* TODO: formatted string */\n\tvar _null = false; if (o == null) { _null = true; o = new_buf(23 + 4 * str.t.length); }\n\to.write_shift(1, 1);\n\twrite_XLWideString(str.t, o);\n\to.write_shift(4, 1);\n\twrite_StrRun({ ich: 0, ifnt: 0 }, o);\n\treturn _null ? o.slice(0, o.l) : o;\n}\n\n/* [MS-XLSB] 2.5.9 */\nfunction parse_XLSBCell(data)/*:any*/ {\n\tvar col = data.read_shift(4);\n\tvar iStyleRef = data.read_shift(2);\n\tiStyleRef += data.read_shift(1) << 16;\n\tdata.l++; //var fPhShow = data.read_shift(1);\n\treturn { c: col, iStyleRef: iStyleRef };\n}\nfunction write_XLSBCell(cell/*:any*/, o/*:?Block*/) {\n\tif (o == null) o = new_buf(8);\n\to.write_shift(-4, cell.c);\n\to.write_shift(3, cell.iStyleRef || cell.s);\n\to.write_shift(1, 0); /* fPhShow */\n\treturn o;\n}\n\n/* Short XLSB Cell does not include column */\nfunction parse_XLSBShortCell(data)/*:any*/ {\n\tvar iStyleRef = data.read_shift(2);\n\tiStyleRef += data.read_shift(1) <<16;\n\tdata.l++; //var fPhShow = data.read_shift(1);\n\treturn { c:-1, iStyleRef: iStyleRef };\n}\nfunction write_XLSBShortCell(cell/*:any*/, o/*:?Block*/) {\n\tif(o == null) o = new_buf(4);\n\to.write_shift(3, cell.iStyleRef || cell.s);\n\to.write_shift(1, 0); /* fPhShow */\n\treturn o;\n}\n\n/* [MS-XLSB] 2.5.21 */\nvar parse_XLSBCodeName = parse_XLWideString;\nvar write_XLSBCodeName = write_XLWideString;\n\n/* [MS-XLSB] 2.5.166 */\nfunction parse_XLNullableWideString(data/*::, length*/)/*:string*/ {\n\tvar cchCharacters = data.read_shift(4);\n\treturn cchCharacters === 0 || cchCharacters === 0xFFFFFFFF ? \"\" : data.read_shift(cchCharacters, 'dbcs');\n}\nfunction write_XLNullableWideString(data/*:string*/, o) {\n\tvar _null = false; if (o == null) { _null = true; o = new_buf(127); }\n\to.write_shift(4, data.length > 0 ? data.length : 0xFFFFFFFF);\n\tif (data.length > 0) o.write_shift(0, data, 'dbcs');\n\treturn _null ? o.slice(0, o.l) : o;\n}\n\n/* [MS-XLSB] 2.5.165 */\nvar parse_XLNameWideString = parse_XLWideString;\n//var write_XLNameWideString = write_XLWideString;\n\n/* [MS-XLSB] 2.5.114 */\nvar parse_RelID = parse_XLNullableWideString;\nvar write_RelID = write_XLNullableWideString;\n\n\n/* [MS-XLS] 2.5.217 ; [MS-XLSB] 2.5.122 */\nfunction parse_RkNumber(data)/*:number*/ {\n\tvar b = data.slice(data.l, data.l + 4);\n\tvar fX100 = (b[0] & 1), fInt = (b[0] & 2);\n\tdata.l += 4;\n\tvar RK = fInt === 0 ? __double([0, 0, 0, 0, (b[0] & 0xFC), b[1], b[2], b[3]], 0) : __readInt32LE(b, 0) >> 2;\n\treturn fX100 ? (RK / 100) : RK;\n}\nfunction write_RkNumber(data/*:number*/, o) {\n\tif (o == null) o = new_buf(4);\n\tvar fX100 = 0, fInt = 0, d100 = data * 100;\n\tif ((data == (data | 0)) && (data >= -(1 << 29)) && (data < (1 << 29))) { fInt = 1; }\n\telse if ((d100 == (d100 | 0)) && (d100 >= -(1 << 29)) && (d100 < (1 << 29))) { fInt = 1; fX100 = 1; }\n\tif (fInt) o.write_shift(-4, ((fX100 ? d100 : data) << 2) + (fX100 + 2));\n\telse throw new Error(\"unsupported RkNumber \" + data); // TODO\n}\n\n\n/* [MS-XLSB] 2.5.117 RfX */\nfunction parse_RfX(data /*::, length*/)/*:Range*/ {\n\tvar cell/*:Range*/ = ({ s: {}, e: {} }/*:any*/);\n\tcell.s.r = data.read_shift(4);\n\tcell.e.r = data.read_shift(4);\n\tcell.s.c = data.read_shift(4);\n\tcell.e.c = data.read_shift(4);\n\treturn cell;\n}\nfunction write_RfX(r/*:Range*/, o) {\n\tif (!o) o = new_buf(16);\n\to.write_shift(4, r.s.r);\n\to.write_shift(4, r.e.r);\n\to.write_shift(4, r.s.c);\n\to.write_shift(4, r.e.c);\n\treturn o;\n}\n\n/* [MS-XLSB] 2.5.153 UncheckedRfX */\nvar parse_UncheckedRfX = parse_RfX;\nvar write_UncheckedRfX = write_RfX;\n\n/* [MS-XLSB] 2.5.155 UncheckedSqRfX */\n//function parse_UncheckedSqRfX(data) {\n//\tvar cnt = data.read_shift(4);\n//\tvar out = [];\n//\tfor(var i = 0; i < cnt; ++i) {\n//\t\tvar rng = parse_UncheckedRfX(data);\n//\t\tout.push(encode_range(rng));\n//\t}\n//\treturn out.join(\",\");\n//}\n//function write_UncheckedSqRfX(sqrfx/*:string*/) {\n//\tvar parts = sqrfx.split(/\\s*,\\s*/);\n//\tvar o = new_buf(4); o.write_shift(4, parts.length);\n//\tvar out = [o];\n//\tparts.forEach(function(rng) {\n//\t\tout.push(write_UncheckedRfX(safe_decode_range(rng)));\n//\t});\n//\treturn bconcat(out);\n//}\n\n/* [MS-XLS] 2.5.342 ; [MS-XLSB] 2.5.171 */\n/* TODO: error checking, NaN and Infinity values are not valid Xnum */\nfunction parse_Xnum(data/*::, length*/) {\n\tif(data.length - data.l < 8) throw \"XLS Xnum Buffer underflow\";\n\treturn data.read_shift(8, 'f');\n}\nfunction write_Xnum(data, o) { return (o || new_buf(8)).write_shift(8, data, 'f'); }\n\n/* [MS-XLSB] 2.4.324 BrtColor */\nfunction parse_BrtColor(data/*::, length*/) {\n\tvar out = {};\n\tvar d = data.read_shift(1);\n\n\t//var fValidRGB = d & 1;\n\tvar xColorType = d >>> 1;\n\n\tvar index = data.read_shift(1);\n\tvar nTS = data.read_shift(2, 'i');\n\tvar bR = data.read_shift(1);\n\tvar bG = data.read_shift(1);\n\tvar bB = data.read_shift(1);\n\tdata.l++; //var bAlpha = data.read_shift(1);\n\n\tswitch (xColorType) {\n\t\tcase 0: out.auto = 1; break;\n\t\tcase 1:\n\t\t\tout.index = index;\n\t\t\tvar icv = XLSIcv[index];\n\t\t\t/* automatic pseudo index 81 */\n\t\t\tif (icv) out.rgb = rgb2Hex(icv);\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\t/* if(!fValidRGB) throw new Error(\"invalid\"); */\n\t\t\tout.rgb = rgb2Hex([bR, bG, bB]);\n\t\t\tbreak;\n\t\tcase 3: out.theme = index; break;\n\t}\n\tif (nTS != 0) out.tint = nTS > 0 ? nTS / 32767 : nTS / 32768;\n\n\treturn out;\n}\nfunction write_BrtColor(color, o) {\n\tif (!o) o = new_buf(8);\n\tif (!color || color.auto) { o.write_shift(4, 0); o.write_shift(4, 0); return o; }\n\tif (color.index != null) {\n\t\to.write_shift(1, 0x02);\n\t\to.write_shift(1, color.index);\n\t} else if (color.theme != null) {\n\t\to.write_shift(1, 0x06);\n\t\to.write_shift(1, color.theme);\n\t} else {\n\t\to.write_shift(1, 0x05);\n\t\to.write_shift(1, 0);\n\t}\n\tvar nTS = color.tint || 0;\n\tif (nTS > 0) nTS *= 32767;\n\telse if (nTS < 0) nTS *= 32768;\n\to.write_shift(2, nTS);\n\tif (!color.rgb || color.theme != null) {\n\t\to.write_shift(2, 0);\n\t\to.write_shift(1, 0);\n\t\to.write_shift(1, 0);\n\t} else {\n\t\tvar rgb = (color.rgb || 'FFFFFF');\n\t\tif (typeof rgb == 'number') rgb = (\"000000\" + rgb.toString(16)).slice(-6);\n\t\to.write_shift(1, parseInt(rgb.slice(0, 2), 16));\n\t\to.write_shift(1, parseInt(rgb.slice(2, 4), 16));\n\t\to.write_shift(1, parseInt(rgb.slice(4, 6), 16));\n\t\to.write_shift(1, 0xFF);\n\t}\n\treturn o;\n}\n\n/* [MS-XLSB] 2.5.52 */\nfunction parse_FontFlags(data/*::, length, opts*/) {\n\tvar d = data.read_shift(1);\n\tdata.l++;\n\tvar out = {\n\t\tfBold: d & 0x01,\n\t\tfItalic: d & 0x02,\n\t\tfUnderline: d & 0x04,\n\t\tfStrikeout: d & 0x08,\n\t\tfOutline: d & 0x10,\n\t\tfShadow: d & 0x20,\n\t\tfCondense: d & 0x40,\n\t\tfExtend: d & 0x80\n\t};\n\treturn out;\n}\nfunction write_FontFlags(font, o) {\n\tif (!o) o = new_buf(2);\n\tvar grbit =\n\t\t(font.italic ? 0x02 : 0) |\n\t\t(font.strike ? 0x08 : 0) |\n\t\t(font.outline ? 0x10 : 0) |\n\t\t(font.shadow ? 0x20 : 0) |\n\t\t(font.condense ? 0x40 : 0) |\n\t\t(font.extend ? 0x80 : 0);\n\to.write_shift(1, grbit);\n\to.write_shift(1, 0);\n\treturn o;\n}\n\n/* [MS-OLEDS] 2.3.1 and 2.3.2 */\nfunction parse_ClipboardFormatOrString(o, w/*:number*/)/*:string*/ {\n\t// $FlowIgnore\n\tvar ClipFmt = { 2: \"BITMAP\", 3: \"METAFILEPICT\", 8: \"DIB\", 14: \"ENHMETAFILE\" };\n\tvar m/*:number*/ = o.read_shift(4);\n\tswitch (m) {\n\t\tcase 0x00000000: return \"\";\n\t\tcase 0xffffffff: case 0xfffffffe: return ClipFmt[o.read_shift(4)] || \"\";\n\t}\n\tif (m > 0x190) throw new Error(\"Unsupported Clipboard: \" + m.toString(16));\n\to.l -= 4;\n\treturn o.read_shift(0, w == 1 ? \"lpstr\" : \"lpwstr\");\n}\nfunction parse_ClipboardFormatOrAnsiString(o) { return parse_ClipboardFormatOrString(o, 1); }\nfunction parse_ClipboardFormatOrUnicodeString(o) { return parse_ClipboardFormatOrString(o, 2); }\n\n/* [MS-OLEPS] 2.2 PropertyType */\n// Note: some tree shakers cannot handle VT_VECTOR | $CONST, hence extra vars\n//var VT_EMPTY = 0x0000;\n//var VT_NULL = 0x0001;\nvar VT_I2 = 0x0002;\nvar VT_I4 = 0x0003;\n//var VT_R4 = 0x0004;\n//var VT_R8 = 0x0005;\n//var VT_CY = 0x0006;\n//var VT_DATE = 0x0007;\n//var VT_BSTR = 0x0008;\n//var VT_ERROR = 0x000A;\nvar VT_BOOL = 0x000B;\nvar VT_VARIANT = 0x000C;\n//var VT_DECIMAL = 0x000E;\n//var VT_I1 = 0x0010;\n//var VT_UI1 = 0x0011;\n//var VT_UI2 = 0x0012;\nvar VT_UI4 = 0x0013;\n//var VT_I8 = 0x0014;\n//var VT_UI8 = 0x0015;\n//var VT_INT = 0x0016;\n//var VT_UINT = 0x0017;\nvar VT_LPSTR = 0x001E;\n//var VT_LPWSTR = 0x001F;\nvar VT_FILETIME = 0x0040;\nvar VT_BLOB = 0x0041;\n//var VT_STREAM = 0x0042;\n//var VT_STORAGE = 0x0043;\n//var VT_STREAMED_Object = 0x0044;\n//var VT_STORED_Object = 0x0045;\n//var VT_BLOB_Object = 0x0046;\nvar VT_CF = 0x0047;\n//var VT_CLSID = 0x0048;\n//var VT_VERSIONED_STREAM = 0x0049;\nvar VT_VECTOR = 0x1000;\nvar VT_VECTOR_VARIANT = 0x100C;\nvar VT_VECTOR_LPSTR = 0x101E;\n//var VT_ARRAY = 0x2000;\n\nvar VT_STRING = 0x0050; // 2.3.3.1.11 VtString\nvar VT_USTR = 0x0051; // 2.3.3.1.12 VtUnalignedString\nvar VT_CUSTOM = [VT_STRING, VT_USTR];\n\n/* [MS-OSHARED] 2.3.3.2.2.1 Document Summary Information PIDDSI */\nvar DocSummaryPIDDSI = {\n\t/*::[*/0x01/*::]*/: { n: 'CodePage', t: VT_I2 },\n\t/*::[*/0x02/*::]*/: { n: 'Category', t: VT_STRING },\n\t/*::[*/0x03/*::]*/: { n: 'PresentationFormat', t: VT_STRING },\n\t/*::[*/0x04/*::]*/: { n: 'ByteCount', t: VT_I4 },\n\t/*::[*/0x05/*::]*/: { n: 'LineCount', t: VT_I4 },\n\t/*::[*/0x06/*::]*/: { n: 'ParagraphCount', t: VT_I4 },\n\t/*::[*/0x07/*::]*/: { n: 'SlideCount', t: VT_I4 },\n\t/*::[*/0x08/*::]*/: { n: 'NoteCount', t: VT_I4 },\n\t/*::[*/0x09/*::]*/: { n: 'HiddenCount', t: VT_I4 },\n\t/*::[*/0x0a/*::]*/: { n: 'MultimediaClipCount', t: VT_I4 },\n\t/*::[*/0x0b/*::]*/: { n: 'ScaleCrop', t: VT_BOOL },\n\t/*::[*/0x0c/*::]*/: { n: 'HeadingPairs', t: VT_VECTOR_VARIANT /* VT_VECTOR | VT_VARIANT */ },\n\t/*::[*/0x0d/*::]*/: { n: 'TitlesOfParts', t: VT_VECTOR_LPSTR /* VT_VECTOR | VT_LPSTR */ },\n\t/*::[*/0x0e/*::]*/: { n: 'Manager', t: VT_STRING },\n\t/*::[*/0x0f/*::]*/: { n: 'Company', t: VT_STRING },\n\t/*::[*/0x10/*::]*/: { n: 'LinksUpToDate', t: VT_BOOL },\n\t/*::[*/0x11/*::]*/: { n: 'CharacterCount', t: VT_I4 },\n\t/*::[*/0x13/*::]*/: { n: 'SharedDoc', t: VT_BOOL },\n\t/*::[*/0x16/*::]*/: { n: 'HyperlinksChanged', t: VT_BOOL },\n\t/*::[*/0x17/*::]*/: { n: 'AppVersion', t: VT_I4, p: 'version' },\n\t/*::[*/0x18/*::]*/: { n: 'DigSig', t: VT_BLOB },\n\t/*::[*/0x1A/*::]*/: { n: 'ContentType', t: VT_STRING },\n\t/*::[*/0x1B/*::]*/: { n: 'ContentStatus', t: VT_STRING },\n\t/*::[*/0x1C/*::]*/: { n: 'Language', t: VT_STRING },\n\t/*::[*/0x1D/*::]*/: { n: 'Version', t: VT_STRING },\n\t/*::[*/0xFF/*::]*/: {},\n\t/* [MS-OLEPS] 2.18 */\n\t/*::[*/0x80000000/*::]*/: { n: 'Locale', t: VT_UI4 },\n\t/*::[*/0x80000003/*::]*/: { n: 'Behavior', t: VT_UI4 },\n\t/*::[*/0x72627262/*::]*/: {}\n};\n\n/* [MS-OSHARED] 2.3.3.2.1.1 Summary Information Property Set PIDSI */\nvar SummaryPIDSI = {\n\t/*::[*/0x01/*::]*/: { n: 'CodePage', t: VT_I2 },\n\t/*::[*/0x02/*::]*/: { n: 'Title', t: VT_STRING },\n\t/*::[*/0x03/*::]*/: { n: 'Subject', t: VT_STRING },\n\t/*::[*/0x04/*::]*/: { n: 'Author', t: VT_STRING },\n\t/*::[*/0x05/*::]*/: { n: 'Keywords', t: VT_STRING },\n\t/*::[*/0x06/*::]*/: { n: 'Comments', t: VT_STRING },\n\t/*::[*/0x07/*::]*/: { n: 'Template', t: VT_STRING },\n\t/*::[*/0x08/*::]*/: { n: 'LastAuthor', t: VT_STRING },\n\t/*::[*/0x09/*::]*/: { n: 'RevNumber', t: VT_STRING },\n\t/*::[*/0x0A/*::]*/: { n: 'EditTime', t: VT_FILETIME },\n\t/*::[*/0x0B/*::]*/: { n: 'LastPrinted', t: VT_FILETIME },\n\t/*::[*/0x0C/*::]*/: { n: 'CreatedDate', t: VT_FILETIME },\n\t/*::[*/0x0D/*::]*/: { n: 'ModifiedDate', t: VT_FILETIME },\n\t/*::[*/0x0E/*::]*/: { n: 'PageCount', t: VT_I4 },\n\t/*::[*/0x0F/*::]*/: { n: 'WordCount', t: VT_I4 },\n\t/*::[*/0x10/*::]*/: { n: 'CharCount', t: VT_I4 },\n\t/*::[*/0x11/*::]*/: { n: 'Thumbnail', t: VT_CF },\n\t/*::[*/0x12/*::]*/: { n: 'Application', t: VT_STRING },\n\t/*::[*/0x13/*::]*/: { n: 'DocSecurity', t: VT_I4 },\n\t/*::[*/0xFF/*::]*/: {},\n\t/* [MS-OLEPS] 2.18 */\n\t/*::[*/0x80000000/*::]*/: { n: 'Locale', t: VT_UI4 },\n\t/*::[*/0x80000003/*::]*/: { n: 'Behavior', t: VT_UI4 },\n\t/*::[*/0x72627262/*::]*/: {}\n};\n\n/* [MS-XLS] 2.4.63 Country/Region codes */\nvar CountryEnum = {\n\t/*::[*/0x0001/*::]*/: \"US\", // United States\n\t/*::[*/0x0002/*::]*/: \"CA\", // Canada\n\t/*::[*/0x0003/*::]*/: \"\", // Latin America (except Brazil)\n\t/*::[*/0x0007/*::]*/: \"RU\", // Russia\n\t/*::[*/0x0014/*::]*/: \"EG\", // Egypt\n\t/*::[*/0x001E/*::]*/: \"GR\", // Greece\n\t/*::[*/0x001F/*::]*/: \"NL\", // Netherlands\n\t/*::[*/0x0020/*::]*/: \"BE\", // Belgium\n\t/*::[*/0x0021/*::]*/: \"FR\", // France\n\t/*::[*/0x0022/*::]*/: \"ES\", // Spain\n\t/*::[*/0x0024/*::]*/: \"HU\", // Hungary\n\t/*::[*/0x0027/*::]*/: \"IT\", // Italy\n\t/*::[*/0x0029/*::]*/: \"CH\", // Switzerland\n\t/*::[*/0x002B/*::]*/: \"AT\", // Austria\n\t/*::[*/0x002C/*::]*/: \"GB\", // United Kingdom\n\t/*::[*/0x002D/*::]*/: \"DK\", // Denmark\n\t/*::[*/0x002E/*::]*/: \"SE\", // Sweden\n\t/*::[*/0x002F/*::]*/: \"NO\", // Norway\n\t/*::[*/0x0030/*::]*/: \"PL\", // Poland\n\t/*::[*/0x0031/*::]*/: \"DE\", // Germany\n\t/*::[*/0x0034/*::]*/: \"MX\", // Mexico\n\t/*::[*/0x0037/*::]*/: \"BR\", // Brazil\n\t/*::[*/0x003d/*::]*/: \"AU\", // Australia\n\t/*::[*/0x0040/*::]*/: \"NZ\", // New Zealand\n\t/*::[*/0x0042/*::]*/: \"TH\", // Thailand\n\t/*::[*/0x0051/*::]*/: \"JP\", // Japan\n\t/*::[*/0x0052/*::]*/: \"KR\", // Korea\n\t/*::[*/0x0054/*::]*/: \"VN\", // Viet Nam\n\t/*::[*/0x0056/*::]*/: \"CN\", // China\n\t/*::[*/0x005A/*::]*/: \"TR\", // Turkey\n\t/*::[*/0x0069/*::]*/: \"JS\", // Ramastan\n\t/*::[*/0x00D5/*::]*/: \"DZ\", // Algeria\n\t/*::[*/0x00D8/*::]*/: \"MA\", // Morocco\n\t/*::[*/0x00DA/*::]*/: \"LY\", // Libya\n\t/*::[*/0x015F/*::]*/: \"PT\", // Portugal\n\t/*::[*/0x0162/*::]*/: \"IS\", // Iceland\n\t/*::[*/0x0166/*::]*/: \"FI\", // Finland\n\t/*::[*/0x01A4/*::]*/: \"CZ\", // Czech Republic\n\t/*::[*/0x0376/*::]*/: \"TW\", // Taiwan\n\t/*::[*/0x03C1/*::]*/: \"LB\", // Lebanon\n\t/*::[*/0x03C2/*::]*/: \"JO\", // Jordan\n\t/*::[*/0x03C3/*::]*/: \"SY\", // Syria\n\t/*::[*/0x03C4/*::]*/: \"IQ\", // Iraq\n\t/*::[*/0x03C5/*::]*/: \"KW\", // Kuwait\n\t/*::[*/0x03C6/*::]*/: \"SA\", // Saudi Arabia\n\t/*::[*/0x03CB/*::]*/: \"AE\", // United Arab Emirates\n\t/*::[*/0x03CC/*::]*/: \"IL\", // Israel\n\t/*::[*/0x03CE/*::]*/: \"QA\", // Qatar\n\t/*::[*/0x03D5/*::]*/: \"IR\", // Iran\n\t/*::[*/0xFFFF/*::]*/: \"US\" // United States\n};\n\n/* [MS-XLS] 2.5.127 */\nvar XLSFillPattern = [\n\tnull,\n\t'solid',\n\t'mediumGray',\n\t'darkGray',\n\t'lightGray',\n\t'darkHorizontal',\n\t'darkVertical',\n\t'darkDown',\n\t'darkUp',\n\t'darkGrid',\n\t'darkTrellis',\n\t'lightHorizontal',\n\t'lightVertical',\n\t'lightDown',\n\t'lightUp',\n\t'lightGrid',\n\t'lightTrellis',\n\t'gray125',\n\t'gray0625'\n];\n\nfunction rgbify(arr/*:Array*/)/*:Array<[number, number, number]>*/ { return arr.map(function(x) { return [(x>>16)&255,(x>>8)&255,x&255]; }); }\n\n/* [MS-XLS] 2.5.161 */\n/* [MS-XLSB] 2.5.75 Icv */\nvar _XLSIcv = /*#__PURE__*/ rgbify([\n\t/* Color Constants */\n\t0x000000,\n\t0xFFFFFF,\n\t0xFF0000,\n\t0x00FF00,\n\t0x0000FF,\n\t0xFFFF00,\n\t0xFF00FF,\n\t0x00FFFF,\n\n\t/* Overridable Defaults */\n\t0x000000,\n\t0xFFFFFF,\n\t0xFF0000,\n\t0x00FF00,\n\t0x0000FF,\n\t0xFFFF00,\n\t0xFF00FF,\n\t0x00FFFF,\n\n\t0x800000,\n\t0x008000,\n\t0x000080,\n\t0x808000,\n\t0x800080,\n\t0x008080,\n\t0xC0C0C0,\n\t0x808080,\n\t0x9999FF,\n\t0x993366,\n\t0xFFFFCC,\n\t0xCCFFFF,\n\t0x660066,\n\t0xFF8080,\n\t0x0066CC,\n\t0xCCCCFF,\n\n\t0x000080,\n\t0xFF00FF,\n\t0xFFFF00,\n\t0x00FFFF,\n\t0x800080,\n\t0x800000,\n\t0x008080,\n\t0x0000FF,\n\t0x00CCFF,\n\t0xCCFFFF,\n\t0xCCFFCC,\n\t0xFFFF99,\n\t0x99CCFF,\n\t0xFF99CC,\n\t0xCC99FF,\n\t0xFFCC99,\n\n\t0x3366FF,\n\t0x33CCCC,\n\t0x99CC00,\n\t0xFFCC00,\n\t0xFF9900,\n\t0xFF6600,\n\t0x666699,\n\t0x969696,\n\t0x003366,\n\t0x339966,\n\t0x003300,\n\t0x333300,\n\t0x993300,\n\t0x993366,\n\t0x333399,\n\t0x333333,\n\n\t/* Other entries to appease BIFF8/12 */\n\t0xFFFFFF, /* 0x40 icvForeground ?? */\n\t0x000000, /* 0x41 icvBackground ?? */\n\t0x000000, /* 0x42 icvFrame ?? */\n\t0x000000, /* 0x43 icv3D ?? */\n\t0x000000, /* 0x44 icv3DText ?? */\n\t0x000000, /* 0x45 icv3DHilite ?? */\n\t0x000000, /* 0x46 icv3DShadow ?? */\n\t0x000000, /* 0x47 icvHilite ?? */\n\t0x000000, /* 0x48 icvCtlText ?? */\n\t0x000000, /* 0x49 icvCtlScrl ?? */\n\t0x000000, /* 0x4A icvCtlInv ?? */\n\t0x000000, /* 0x4B icvCtlBody ?? */\n\t0x000000, /* 0x4C icvCtlFrame ?? */\n\t0x000000, /* 0x4D icvCtlFore ?? */\n\t0x000000, /* 0x4E icvCtlBack ?? */\n\t0x000000, /* 0x4F icvCtlNeutral */\n\t0x000000, /* 0x50 icvInfoBk ?? */\n\t0x000000 /* 0x51 icvInfoText ?? */\n]);\nvar XLSIcv = /*#__PURE__*/dup(_XLSIcv);\n\n/* [MS-XLSB] 2.5.97.2 */\nvar BErr = {\n\t/*::[*/0x00/*::]*/: \"#NULL!\",\n\t/*::[*/0x07/*::]*/: \"#DIV/0!\",\n\t/*::[*/0x0F/*::]*/: \"#VALUE!\",\n\t/*::[*/0x17/*::]*/: \"#REF!\",\n\t/*::[*/0x1D/*::]*/: \"#NAME?\",\n\t/*::[*/0x24/*::]*/: \"#NUM!\",\n\t/*::[*/0x2A/*::]*/: \"#N/A\",\n\t/*::[*/0x2B/*::]*/: \"#GETTING_DATA\",\n\t/*::[*/0xFF/*::]*/: \"#WTF?\"\n};\n//var RBErr = evert_num(BErr);\nvar RBErr = {\n\t\"#NULL!\": 0x00,\n\t\"#DIV/0!\": 0x07,\n\t\"#VALUE!\": 0x0F,\n\t\"#REF!\": 0x17,\n\t\"#NAME?\": 0x1D,\n\t\"#NUM!\": 0x24,\n\t\"#N/A\": 0x2A,\n\t\"#GETTING_DATA\": 0x2B,\n\t\"#WTF?\": 0xFF\n};\n\n/* Parts enumerated in OPC spec, MS-XLSB and MS-XLSX */\n/* 12.3 Part Summary */\n/* 14.2 Part Summary */\n/* [MS-XLSX] 2.1 Part Enumerations ; [MS-XLSB] 2.1.7 Part Enumeration */\nvar ct2type/*{[string]:string}*/ = ({\n\t/* Workbook */\n\t\"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml\": \"workbooks\",\n\t\"application/vnd.ms-excel.sheet.macroEnabled.main+xml\": \"workbooks\",\n\t\"application/vnd.ms-excel.sheet.binary.macroEnabled.main\": \"workbooks\",\n\t\"application/vnd.ms-excel.addin.macroEnabled.main+xml\": \"workbooks\",\n\t\"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml\": \"workbooks\",\n\n\t/* Worksheet */\n\t\"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml\": \"sheets\",\n\t\"application/vnd.ms-excel.worksheet\": \"sheets\",\n\t\"application/vnd.ms-excel.binIndexWs\": \"TODO\", /* Binary Index */\n\n\t/* Chartsheet */\n\t\"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml\": \"charts\",\n\t\"application/vnd.ms-excel.chartsheet\": \"charts\",\n\n\t/* Macrosheet */\n\t\"application/vnd.ms-excel.macrosheet+xml\": \"macros\",\n\t\"application/vnd.ms-excel.macrosheet\": \"macros\",\n\t\"application/vnd.ms-excel.intlmacrosheet\": \"TODO\",\n\t\"application/vnd.ms-excel.binIndexMs\": \"TODO\", /* Binary Index */\n\n\t/* Dialogsheet */\n\t\"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml\": \"dialogs\",\n\t\"application/vnd.ms-excel.dialogsheet\": \"dialogs\",\n\n\t/* Shared Strings */\n\t\"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml\": \"strs\",\n\t\"application/vnd.ms-excel.sharedStrings\": \"strs\",\n\n\t/* Styles */\n\t\"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml\": \"styles\",\n\t\"application/vnd.ms-excel.styles\": \"styles\",\n\n\t/* File Properties */\n\t\"application/vnd.openxmlformats-package.core-properties+xml\": \"coreprops\",\n\t\"application/vnd.openxmlformats-officedocument.custom-properties+xml\": \"custprops\",\n\t\"application/vnd.openxmlformats-officedocument.extended-properties+xml\": \"extprops\",\n\n\t/* Custom Data Properties */\n\t\"application/vnd.openxmlformats-officedocument.customXmlProperties+xml\": \"TODO\",\n\t\"application/vnd.openxmlformats-officedocument.spreadsheetml.customProperty\": \"TODO\",\n\n\t/* Comments */\n\t\"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml\": \"comments\",\n\t\"application/vnd.ms-excel.comments\": \"comments\",\n\t\"application/vnd.ms-excel.threadedcomments+xml\": \"threadedcomments\",\n\t\"application/vnd.ms-excel.person+xml\": \"people\",\n\n\t/* Metadata (Stock/Geography and Dynamic Array) */\n\t\"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml\": \"metadata\",\n\t\"application/vnd.ms-excel.sheetMetadata\": \"metadata\",\n\n\t/* PivotTable */\n\t\"application/vnd.ms-excel.pivotTable\": \"TODO\",\n\t\"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotTable+xml\": \"TODO\",\n\n\t/* Chart Objects */\n\t\"application/vnd.openxmlformats-officedocument.drawingml.chart+xml\": \"TODO\",\n\n\t/* Chart Colors */\n\t\"application/vnd.ms-office.chartcolorstyle+xml\": \"TODO\",\n\n\t/* Chart Style */\n\t\"application/vnd.ms-office.chartstyle+xml\": \"TODO\",\n\n\t/* Chart Advanced */\n\t\"application/vnd.ms-office.chartex+xml\": \"TODO\",\n\n\t/* Calculation Chain */\n\t\"application/vnd.ms-excel.calcChain\": \"calcchains\",\n\t\"application/vnd.openxmlformats-officedocument.spreadsheetml.calcChain+xml\": \"calcchains\",\n\n\t/* Printer Settings */\n\t\"application/vnd.openxmlformats-officedocument.spreadsheetml.printerSettings\": \"TODO\",\n\n\t/* ActiveX */\n\t\"application/vnd.ms-office.activeX\": \"TODO\",\n\t\"application/vnd.ms-office.activeX+xml\": \"TODO\",\n\n\t/* Custom Toolbars */\n\t\"application/vnd.ms-excel.attachedToolbars\": \"TODO\",\n\n\t/* External Data Connections */\n\t\"application/vnd.ms-excel.connections\": \"TODO\",\n\t\"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml\": \"TODO\",\n\n\t/* External Links */\n\t\"application/vnd.ms-excel.externalLink\": \"links\",\n\t\"application/vnd.openxmlformats-officedocument.spreadsheetml.externalLink+xml\": \"links\",\n\n\t/* PivotCache */\n\t\"application/vnd.ms-excel.pivotCacheDefinition\": \"TODO\",\n\t\"application/vnd.ms-excel.pivotCacheRecords\": \"TODO\",\n\t\"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheDefinition+xml\": \"TODO\",\n\t\"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheRecords+xml\": \"TODO\",\n\n\t/* Query Table */\n\t\"application/vnd.ms-excel.queryTable\": \"TODO\",\n\t\"application/vnd.openxmlformats-officedocument.spreadsheetml.queryTable+xml\": \"TODO\",\n\n\t/* Shared Workbook */\n\t\"application/vnd.ms-excel.userNames\": \"TODO\",\n\t\"application/vnd.ms-excel.revisionHeaders\": \"TODO\",\n\t\"application/vnd.ms-excel.revisionLog\": \"TODO\",\n\t\"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionHeaders+xml\": \"TODO\",\n\t\"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionLog+xml\": \"TODO\",\n\t\"application/vnd.openxmlformats-officedocument.spreadsheetml.userNames+xml\": \"TODO\",\n\n\t/* Single Cell Table */\n\t\"application/vnd.ms-excel.tableSingleCells\": \"TODO\",\n\t\"application/vnd.openxmlformats-officedocument.spreadsheetml.tableSingleCells+xml\": \"TODO\",\n\n\t/* Slicer */\n\t\"application/vnd.ms-excel.slicer\": \"TODO\",\n\t\"application/vnd.ms-excel.slicerCache\": \"TODO\",\n\t\"application/vnd.ms-excel.slicer+xml\": \"TODO\",\n\t\"application/vnd.ms-excel.slicerCache+xml\": \"TODO\",\n\n\t/* Sort Map */\n\t\"application/vnd.ms-excel.wsSortMap\": \"TODO\",\n\n\t/* Table */\n\t\"application/vnd.ms-excel.table\": \"TODO\",\n\t\"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml\": \"TODO\",\n\n\t/* Themes */\n\t\"application/vnd.openxmlformats-officedocument.theme+xml\": \"themes\",\n\n\t/* Theme Override */\n\t\"application/vnd.openxmlformats-officedocument.themeOverride+xml\": \"TODO\",\n\n\t/* Timeline */\n\t\"application/vnd.ms-excel.Timeline+xml\": \"TODO\", /* verify */\n\t\"application/vnd.ms-excel.TimelineCache+xml\": \"TODO\", /* verify */\n\n\t/* VBA */\n\t\"application/vnd.ms-office.vbaProject\": \"vba\",\n\t\"application/vnd.ms-office.vbaProjectSignature\": \"TODO\",\n\n\t/* Volatile Dependencies */\n\t\"application/vnd.ms-office.volatileDependencies\": \"TODO\",\n\t\"application/vnd.openxmlformats-officedocument.spreadsheetml.volatileDependencies+xml\": \"TODO\",\n\n\t/* Control Properties */\n\t\"application/vnd.ms-excel.controlproperties+xml\": \"TODO\",\n\n\t/* Data Model */\n\t\"application/vnd.openxmlformats-officedocument.model+data\": \"TODO\",\n\n\t/* Survey */\n\t\"application/vnd.ms-excel.Survey+xml\": \"TODO\",\n\n\t/* Drawing */\n\t\"application/vnd.openxmlformats-officedocument.drawing+xml\": \"drawings\",\n\t\"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml\": \"TODO\",\n\t\"application/vnd.openxmlformats-officedocument.drawingml.diagramColors+xml\": \"TODO\",\n\t\"application/vnd.openxmlformats-officedocument.drawingml.diagramData+xml\": \"TODO\",\n\t\"application/vnd.openxmlformats-officedocument.drawingml.diagramLayout+xml\": \"TODO\",\n\t\"application/vnd.openxmlformats-officedocument.drawingml.diagramStyle+xml\": \"TODO\",\n\n\t/* VML */\n\t\"application/vnd.openxmlformats-officedocument.vmlDrawing\": \"TODO\",\n\n\t\"application/vnd.openxmlformats-package.relationships+xml\": \"rels\",\n\t\"application/vnd.openxmlformats-officedocument.oleObject\": \"TODO\",\n\n\t/* Image */\n\t\"image/png\": \"TODO\",\n\n\t\"sheet\": \"js\"\n}/*:any*/);\n\nvar CT_LIST = {\n\t\tworkbooks: {\n\t\t\txlsx: \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml\",\n\t\t\txlsm: \"application/vnd.ms-excel.sheet.macroEnabled.main+xml\",\n\t\t\txlsb: \"application/vnd.ms-excel.sheet.binary.macroEnabled.main\",\n\t\t\txlam: \"application/vnd.ms-excel.addin.macroEnabled.main+xml\",\n\t\t\txltx: \"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml\"\n\t\t},\n\t\tstrs: { /* Shared Strings */\n\t\t\txlsx: \"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml\",\n\t\t\txlsb: \"application/vnd.ms-excel.sharedStrings\"\n\t\t},\n\t\tcomments: { /* Comments */\n\t\t\txlsx: \"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml\",\n\t\t\txlsb: \"application/vnd.ms-excel.comments\"\n\t\t},\n\t\tsheets: { /* Worksheet */\n\t\t\txlsx: \"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml\",\n\t\t\txlsb: \"application/vnd.ms-excel.worksheet\"\n\t\t},\n\t\tcharts: { /* Chartsheet */\n\t\t\txlsx: \"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml\",\n\t\t\txlsb: \"application/vnd.ms-excel.chartsheet\"\n\t\t},\n\t\tdialogs: { /* Dialogsheet */\n\t\t\txlsx: \"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml\",\n\t\t\txlsb: \"application/vnd.ms-excel.dialogsheet\"\n\t\t},\n\t\tmacros: { /* Macrosheet (Excel 4.0 Macros) */\n\t\t\txlsx: \"application/vnd.ms-excel.macrosheet+xml\",\n\t\t\txlsb: \"application/vnd.ms-excel.macrosheet\"\n\t\t},\n\t\tmetadata: { /* Metadata (Stock/Geography and Dynamic Array) */\n\t\t\txlsx: \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml\",\n\t\t\txlsb: \"application/vnd.ms-excel.sheetMetadata\"\n\t\t},\n\t\tstyles: { /* Styles */\n\t\t\txlsx: \"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml\",\n\t\t\txlsb: \"application/vnd.ms-excel.styles\"\n\t\t}\n};\n\nfunction new_ct()/*:any*/ {\n\treturn ({\n\t\tworkbooks:[], sheets:[], charts:[], dialogs:[], macros:[],\n\t\trels:[], strs:[], comments:[], threadedcomments:[], links:[],\n\t\tcoreprops:[], extprops:[], custprops:[], themes:[], styles:[],\n\t\tcalcchains:[], vba: [], drawings: [], metadata: [], people:[],\n\t\tTODO:[], xmlns: \"\" }/*:any*/);\n}\n\nfunction parse_ct(data/*:?string*/) {\n\tvar ct = new_ct();\n\tif(!data || !data.match) return ct;\n\tvar ctext = {};\n\t(data.match(tagregex)||[]).forEach(function(x) {\n\t\tvar y = parsexmltag(x);\n\t\tswitch(y[0].replace(nsregex,\"<\")) {\n\t\t\tcase ' 0 ? ct.calcchains[0] : \"\";\n\tct.sst = ct.strs.length > 0 ? ct.strs[0] : \"\";\n\tct.style = ct.styles.length > 0 ? ct.styles[0] : \"\";\n\tct.defaults = ctext;\n\tdelete ct.calcchains;\n\treturn ct;\n}\n\nfunction write_ct(ct, opts)/*:string*/ {\n\tvar type2ct/*{[string]:Array}*/ = evert_arr(ct2type);\n\n\tvar o/*:Array*/ = [], v;\n\to[o.length] = (XML_HEADER);\n\to[o.length] = writextag('Types', null, {\n\t\t'xmlns': XMLNS.CT,\n\t\t'xmlns:xsd': XMLNS.xsd,\n\t\t'xmlns:xsi': XMLNS.xsi\n\t});\n\n\to = o.concat([\n\t\t['xml', 'application/xml'],\n\t\t['bin', 'application/vnd.ms-excel.sheet.binary.macroEnabled.main'],\n\t\t['vml', 'application/vnd.openxmlformats-officedocument.vmlDrawing'],\n\t\t['data', 'application/vnd.openxmlformats-officedocument.model+data'],\n\t\t/* from test files */\n\t\t['bmp', 'image/bmp'],\n\t\t['png', 'image/png'],\n\t\t['gif', 'image/gif'],\n\t\t['emf', 'image/x-emf'],\n\t\t['wmf', 'image/x-wmf'],\n\t\t['jpg', 'image/jpeg'], ['jpeg', 'image/jpeg'],\n\t\t['tif', 'image/tiff'], ['tiff', 'image/tiff'],\n\t\t['pdf', 'application/pdf'],\n\t\t['rels', 'application/vnd.openxmlformats-package.relationships+xml']\n\t].map(function(x) {\n\t\treturn writextag('Default', null, {'Extension':x[0], 'ContentType': x[1]});\n\t}));\n\n\t/* only write first instance */\n\tvar f1 = function(w) {\n\t\tif(ct[w] && ct[w].length > 0) {\n\t\t\tv = ct[w][0];\n\t\t\to[o.length] = (writextag('Override', null, {\n\t\t\t\t'PartName': (v[0] == '/' ? \"\":\"/\") + v,\n\t\t\t\t'ContentType': CT_LIST[w][opts.bookType] || CT_LIST[w]['xlsx']\n\t\t\t}));\n\t\t}\n\t};\n\n\t/* book type-specific */\n\tvar f2 = function(w) {\n\t\t(ct[w]||[]).forEach(function(v) {\n\t\t\to[o.length] = (writextag('Override', null, {\n\t\t\t\t'PartName': (v[0] == '/' ? \"\":\"/\") + v,\n\t\t\t\t'ContentType': CT_LIST[w][opts.bookType] || CT_LIST[w]['xlsx']\n\t\t\t}));\n\t\t});\n\t};\n\n\t/* standard type */\n\tvar f3 = function(t) {\n\t\t(ct[t]||[]).forEach(function(v) {\n\t\t\to[o.length] = (writextag('Override', null, {\n\t\t\t\t'PartName': (v[0] == '/' ? \"\":\"/\") + v,\n\t\t\t\t'ContentType': type2ct[t][0]\n\t\t\t}));\n\t\t});\n\t};\n\n\tf1('workbooks');\n\tf2('sheets');\n\tf2('charts');\n\tf3('themes');\n\t['strs', 'styles'].forEach(f1);\n\t['coreprops', 'extprops', 'custprops'].forEach(f3);\n\tf3('vba');\n\tf3('comments');\n\tf3('threadedcomments');\n\tf3('drawings');\n\tf2('metadata');\n\tf3('people');\n\tif(o.length>2){ o[o.length] = (''); o[1]=o[1].replace(\"/>\",\">\"); }\n\treturn o.join(\"\");\n}\n/* 9.3 Relationships */\nvar RELS = ({\n\tWB: \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument\",\n\tSHEET: \"http://sheetjs.openxmlformats.org/officeDocument/2006/relationships/officeDocument\",\n\tHLINK: \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink\",\n\tVML: \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing\",\n\tXPATH: \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLinkPath\",\n\tXMISS: \"http://schemas.microsoft.com/office/2006/relationships/xlExternalLinkPath/xlPathMissing\",\n\tXLINK: \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLink\",\n\tCXML: \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml\",\n\tCXMLP: \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps\",\n\tCMNT: \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments\",\n\tCORE_PROPS: \"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties\",\n\tEXT_PROPS: 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties',\n\tCUST_PROPS: 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties',\n\tSST: \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings\",\n\tSTY: \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles\",\n\tTHEME: \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme\",\n\tCHART: \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart\",\n\tCHARTEX: \"http://schemas.microsoft.com/office/2014/relationships/chartEx\",\n\tCS: \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/chartsheet\",\n\tWS: [\n\t\t\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet\",\n\t\t\"http://purl.oclc.org/ooxml/officeDocument/relationships/worksheet\"\n\t],\n\tDS: \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/dialogsheet\",\n\tMS: \"http://schemas.microsoft.com/office/2006/relationships/xlMacrosheet\",\n\tIMG: \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image\",\n\tDRAW: \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing\",\n\tXLMETA: \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sheetMetadata\",\n\tTCMNT: \"http://schemas.microsoft.com/office/2017/10/relationships/threadedComment\",\n\tPEOPLE: \"http://schemas.microsoft.com/office/2017/10/relationships/person\",\n\tVBA: \"http://schemas.microsoft.com/office/2006/relationships/vbaProject\"\n}/*:any*/);\n\n\n/* 9.3.3 Representing Relationships */\nfunction get_rels_path(file/*:string*/)/*:string*/ {\n\tvar n = file.lastIndexOf(\"/\");\n\treturn file.slice(0,n+1) + '_rels/' + file.slice(n+1) + \".rels\";\n}\n\nfunction parse_rels(data/*:?string*/, currentFilePath/*:string*/) {\n\tvar rels = {\"!id\":{}};\n\tif (!data) return rels;\n\tif (currentFilePath.charAt(0) !== '/') {\n\t\tcurrentFilePath = '/'+currentFilePath;\n\t}\n\tvar hash = {};\n\n\t(data.match(tagregex)||[]).forEach(function(x) {\n\t\tvar y = parsexmltag(x);\n\t\t/* 9.3.2.2 OPC_Relationships */\n\t\tif (y[0] === '2){ o[o.length] = (''); o[1]=o[1].replace(\"/>\",\">\"); }\n\treturn o.join(\"\");\n}\n\nfunction add_rels(rels, rId/*:number*/, f, type, relobj, targetmode/*:?string*/)/*:number*/ {\n\tif(!relobj) relobj = {};\n\tif(!rels['!id']) rels['!id'] = {};\n\tif(!rels['!idx']) rels['!idx'] = 1;\n\tif(rId < 0) for(rId = rels['!idx']; rels['!id']['rId' + rId]; ++rId){/* empty */}\n\trels['!idx'] = rId + 1;\n\trelobj.Id = 'rId' + rId;\n\trelobj.Type = type;\n\trelobj.Target = f;\n\tif(targetmode) relobj.TargetMode = targetmode;\n\telse if([RELS.HLINK, RELS.XPATH, RELS.XMISS].indexOf(relobj.Type) > -1) relobj.TargetMode = \"External\";\n\tif(rels['!id'][relobj.Id]) throw new Error(\"Cannot rewrite rId \" + rId);\n\trels['!id'][relobj.Id] = relobj;\n\trels[('/' + relobj.Target).replace(\"//\",\"/\")] = relobj;\n\treturn rId;\n}\n/* Open Document Format for Office Applications (OpenDocument) Version 1.2 */\n/* Part 3 Section 4 Manifest File */\nvar CT_ODS = \"application/vnd.oasis.opendocument.spreadsheet\";\nfunction parse_manifest(d, opts) {\n\tvar str = xlml_normalize(d);\n\tvar Rn;\n\tvar FEtag;\n\twhile((Rn = xlmlregex.exec(str))) switch(Rn[3]) {\n\t\tcase 'manifest': break; // 4.2 \n\t\tcase 'file-entry': // 4.3 \n\t\t\tFEtag = parsexmltag(Rn[0], false);\n\t\t\tif(FEtag.path == '/' && FEtag.type !== CT_ODS) throw new Error(\"This OpenDocument is not a spreadsheet\");\n\t\t\tbreak;\n\t\tcase 'encryption-data': // 4.4 \n\t\tcase 'algorithm': // 4.5 \n\t\tcase 'start-key-generation': // 4.6 \n\t\tcase 'key-derivation': // 4.7 \n\t\t\tthrow new Error(\"Unsupported ODS Encryption\");\n\t\tdefault: if(opts && opts.WTF) throw Rn;\n\t}\n}\n\nfunction write_manifest(manifest/*:Array >*/)/*:string*/ {\n\tvar o = [XML_HEADER];\n\to.push('\\n');\n\to.push(' \\n');\n\tfor(var i = 0; i < manifest.length; ++i) o.push(' \\n');\n\to.push('');\n\treturn o.join(\"\");\n}\n\n/* Part 3 Section 6 Metadata Manifest File */\nfunction write_rdf_type(file/*:string*/, res/*:string*/, tag/*:?string*/) {\n\treturn [\n\t\t' \\n',\n\t\t' \\n',\n\t\t' \\n'\n\t].join(\"\");\n}\nfunction write_rdf_has(base/*:string*/, file/*:string*/) {\n\treturn [\n\t\t' \\n',\n\t\t' \\n',\n\t\t' \\n'\n\t].join(\"\");\n}\nfunction write_rdf(rdf) {\n\tvar o = [XML_HEADER];\n\to.push('\\n');\n\tfor(var i = 0; i != rdf.length; ++i) {\n\t\to.push(write_rdf_type(rdf[i][0], rdf[i][1]));\n\t\to.push(write_rdf_has(\"\",rdf[i][0]));\n\t}\n\to.push(write_rdf_type(\"\",\"Document\", \"pkg\"));\n\to.push('');\n\treturn o.join(\"\");\n}\n/* TODO: pull properties */\nfunction write_meta_ods(/*:: wb: Workbook, opts: any*/)/*:string*/ {\n\treturn 'Sheet' + 'JS ' + XLSX.version + '';\n}\n\n/* ECMA-376 Part II 11.1 Core Properties Part */\n/* [MS-OSHARED] 2.3.3.2.[1-2].1 (PIDSI/PIDDSI) */\nvar CORE_PROPS/*:Array >*/ = [\n\t[\"cp:category\", \"Category\"],\n\t[\"cp:contentStatus\", \"ContentStatus\"],\n\t[\"cp:keywords\", \"Keywords\"],\n\t[\"cp:lastModifiedBy\", \"LastAuthor\"],\n\t[\"cp:lastPrinted\", \"LastPrinted\"],\n\t[\"cp:revision\", \"RevNumber\"],\n\t[\"cp:version\", \"Version\"],\n\t[\"dc:creator\", \"Author\"],\n\t[\"dc:description\", \"Comments\"],\n\t[\"dc:identifier\", \"Identifier\"],\n\t[\"dc:language\", \"Language\"],\n\t[\"dc:subject\", \"Subject\"],\n\t[\"dc:title\", \"Title\"],\n\t[\"dcterms:created\", \"CreatedDate\", 'date'],\n\t[\"dcterms:modified\", \"ModifiedDate\", 'date']\n];\n\nvar CORE_PROPS_REGEX/*:Array*/ = /*#__PURE__*/(function() {\n\tvar r = new Array(CORE_PROPS.length);\n\tfor(var i = 0; i < CORE_PROPS.length; ++i) {\n\t\tvar f = CORE_PROPS[i];\n\t\tvar g = \"(?:\"+ f[0].slice(0,f[0].indexOf(\":\")) +\":)\"+ f[0].slice(f[0].indexOf(\":\")+1);\n\t\tr[i] = new RegExp(\"<\" + g + \"[^>]*>([\\\\s\\\\S]*?)<\\/\" + g + \">\");\n\t}\n\treturn r;\n})();\n\nfunction parse_core_props(data) {\n\tvar p = {};\n\tdata = utf8read(data);\n\n\tfor(var i = 0; i < CORE_PROPS.length; ++i) {\n\t\tvar f = CORE_PROPS[i], cur = data.match(CORE_PROPS_REGEX[i]);\n\t\tif(cur != null && cur.length > 0) p[f[1]] = unescapexml(cur[1]);\n\t\tif(f[2] === 'date' && p[f[1]]) p[f[1]] = parseDate(p[f[1]]);\n\t}\n\n\treturn p;\n}\n\nfunction cp_doit(f, g, h, o, p) {\n\tif(p[f] != null || g == null || g === \"\") return;\n\tp[f] = g;\n\tg = escapexml(g);\n\to[o.length] = (h ? writextag(f,g,h) : writetag(f,g));\n}\n\nfunction write_core_props(cp, _opts) {\n\tvar opts = _opts || {};\n\tvar o = [XML_HEADER, writextag('cp:coreProperties', null, {\n\t\t//'xmlns': XMLNS.CORE_PROPS,\n\t\t'xmlns:cp': XMLNS.CORE_PROPS,\n\t\t'xmlns:dc': XMLNS.dc,\n\t\t'xmlns:dcterms': XMLNS.dcterms,\n\t\t'xmlns:dcmitype': XMLNS.dcmitype,\n\t\t'xmlns:xsi': XMLNS.xsi\n\t})], p = {};\n\tif(!cp && !opts.Props) return o.join(\"\");\n\n\tif(cp) {\n\t\tif(cp.CreatedDate != null) cp_doit(\"dcterms:created\", typeof cp.CreatedDate === \"string\" ? cp.CreatedDate : write_w3cdtf(cp.CreatedDate, opts.WTF), {\"xsi:type\":\"dcterms:W3CDTF\"}, o, p);\n\t\tif(cp.ModifiedDate != null) cp_doit(\"dcterms:modified\", typeof cp.ModifiedDate === \"string\" ? cp.ModifiedDate : write_w3cdtf(cp.ModifiedDate, opts.WTF), {\"xsi:type\":\"dcterms:W3CDTF\"}, o, p);\n\t}\n\n\tfor(var i = 0; i != CORE_PROPS.length; ++i) {\n\t\tvar f = CORE_PROPS[i];\n\t\tvar v = opts.Props && opts.Props[f[1]] != null ? opts.Props[f[1]] : cp ? cp[f[1]] : null;\n\t\tif(v === true) v = \"1\";\n\t\telse if(v === false) v = \"0\";\n\t\telse if(typeof v == \"number\") v = String(v);\n\t\tif(v != null) cp_doit(f[0], v, null, o, p);\n\t}\n\tif(o.length>2){ o[o.length] = (''); o[1]=o[1].replace(\"/>\",\">\"); }\n\treturn o.join(\"\");\n}\n/* 15.2.12.3 Extended File Properties Part */\n/* [MS-OSHARED] 2.3.3.2.[1-2].1 (PIDSI/PIDDSI) */\nvar EXT_PROPS/*:Array >*/ = [\n\t[\"Application\", \"Application\", \"string\"],\n\t[\"AppVersion\", \"AppVersion\", \"string\"],\n\t[\"Company\", \"Company\", \"string\"],\n\t[\"DocSecurity\", \"DocSecurity\", \"string\"],\n\t[\"Manager\", \"Manager\", \"string\"],\n\t[\"HyperlinksChanged\", \"HyperlinksChanged\", \"bool\"],\n\t[\"SharedDoc\", \"SharedDoc\", \"bool\"],\n\t[\"LinksUpToDate\", \"LinksUpToDate\", \"bool\"],\n\t[\"ScaleCrop\", \"ScaleCrop\", \"bool\"],\n\t[\"HeadingPairs\", \"HeadingPairs\", \"raw\"],\n\t[\"TitlesOfParts\", \"TitlesOfParts\", \"raw\"]\n];\n\nvar PseudoPropsPairs = [\n\t\"Worksheets\", \"SheetNames\",\n\t\"NamedRanges\", \"DefinedNames\",\n\t\"Chartsheets\", \"ChartNames\"\n];\nfunction load_props_pairs(HP/*:string|Array>*/, TOP, props, opts) {\n\tvar v = [];\n\tif(typeof HP == \"string\") v = parseVector(HP, opts);\n\telse for(var j = 0; j < HP.length; ++j) v = v.concat(HP[j].map(function(hp) { return {v:hp}; }));\n\tvar parts = (typeof TOP == \"string\") ? parseVector(TOP, opts).map(function (x) { return x.v; }) : TOP;\n\tvar idx = 0, len = 0;\n\tif(parts.length > 0) for(var i = 0; i !== v.length; i += 2) {\n\t\tlen = +(v[i+1].v);\n\t\tswitch(v[i].v) {\n\t\t\tcase \"Worksheets\":\n\t\t\tcase \"工作表\":\n\t\t\tcase \"Листы\":\n\t\t\tcase \"أوراق العمل\":\n\t\t\tcase \"ワークシート\":\n\t\t\tcase \"גליונות עבודה\":\n\t\t\tcase \"Arbeitsblätter\":\n\t\t\tcase \"Çalışma Sayfaları\":\n\t\t\tcase \"Feuilles de calcul\":\n\t\t\tcase \"Fogli di lavoro\":\n\t\t\tcase \"Folhas de cálculo\":\n\t\t\tcase \"Planilhas\":\n\t\t\tcase \"Regneark\":\n\t\t\tcase \"Hojas de cálculo\":\n\t\t\tcase \"Werkbladen\":\n\t\t\t\tprops.Worksheets = len;\n\t\t\t\tprops.SheetNames = parts.slice(idx, idx + len);\n\t\t\t\tbreak;\n\n\t\t\tcase \"Named Ranges\":\n\t\t\tcase \"Rangos con nombre\":\n\t\t\tcase \"名前付き一覧\":\n\t\t\tcase \"Benannte Bereiche\":\n\t\t\tcase \"Navngivne områder\":\n\t\t\t\tprops.NamedRanges = len;\n\t\t\t\tprops.DefinedNames = parts.slice(idx, idx + len);\n\t\t\t\tbreak;\n\n\t\t\tcase \"Charts\":\n\t\t\tcase \"Diagramme\":\n\t\t\t\tprops.Chartsheets = len;\n\t\t\t\tprops.ChartNames = parts.slice(idx, idx + len);\n\t\t\t\tbreak;\n\t\t}\n\t\tidx += len;\n\t}\n}\n\nfunction parse_ext_props(data, p, opts) {\n\tvar q = {}; if(!p) p = {};\n\tdata = utf8read(data);\n\n\tEXT_PROPS.forEach(function(f) {\n\t\tvar xml = (data.match(matchtag(f[0]))||[])[1];\n\t\tswitch(f[2]) {\n\t\t\tcase \"string\": if(xml) p[f[1]] = unescapexml(xml); break;\n\t\t\tcase \"bool\": p[f[1]] = xml === \"true\"; break;\n\t\t\tcase \"raw\":\n\t\t\t\tvar cur = data.match(new RegExp(\"<\" + f[0] + \"[^>]*>([\\\\s\\\\S]*?)<\\/\" + f[0] + \">\"));\n\t\t\t\tif(cur && cur.length > 0) q[f[1]] = cur[1];\n\t\t\t\tbreak;\n\t\t}\n\t});\n\n\tif(q.HeadingPairs && q.TitlesOfParts) load_props_pairs(q.HeadingPairs, q.TitlesOfParts, p, opts);\n\n\treturn p;\n}\n\nfunction write_ext_props(cp/*::, opts*/)/*:string*/ {\n\tvar o/*:Array*/ = [], W = writextag;\n\tif(!cp) cp = {};\n\tcp.Application = \"SheetJS\";\n\to[o.length] = (XML_HEADER);\n\to[o.length] = (writextag('Properties', null, {\n\t\t'xmlns': XMLNS.EXT_PROPS,\n\t\t'xmlns:vt': XMLNS.vt\n\t}));\n\n\tEXT_PROPS.forEach(function(f) {\n\t\tif(cp[f[1]] === undefined) return;\n\t\tvar v;\n\t\tswitch(f[2]) {\n\t\t\tcase 'string': v = escapexml(String(cp[f[1]])); break;\n\t\t\tcase 'bool': v = cp[f[1]] ? 'true' : 'false'; break;\n\t\t}\n\t\tif(v !== undefined) o[o.length] = (W(f[0], v));\n\t});\n\n\t/* TODO: HeadingPairs, TitlesOfParts */\n\to[o.length] = (W('HeadingPairs', W('vt:vector', W('vt:variant', 'Worksheets')+W('vt:variant', W('vt:i4', String(cp.Worksheets))), {size:2, baseType:\"variant\"})));\n\to[o.length] = (W('TitlesOfParts', W('vt:vector', cp.SheetNames.map(function(s) { return \"\" + escapexml(s) + \"\"; }).join(\"\"), {size: cp.Worksheets, baseType:\"lpstr\"})));\n\tif(o.length>2){ o[o.length] = (''); o[1]=o[1].replace(\"/>\",\">\"); }\n\treturn o.join(\"\");\n}\n/* 15.2.12.2 Custom File Properties Part */\nvar custregex = /<[^>]+>[^<]*/g;\nfunction parse_cust_props(data/*:string*/, opts) {\n\tvar p = {}, name = \"\";\n\tvar m = data.match(custregex);\n\tif(m) for(var i = 0; i != m.length; ++i) {\n\t\tvar x = m[i], y = parsexmltag(x);\n\t\tswitch(y[0]) {\n\t\t\tcase '': name = null; break;\n\t\t\tdefault: if (x.indexOf('');\n\t\t\t\tvar type = toks[0].slice(4), text = toks[1];\n\t\t\t\t/* 22.4.2.32 (CT_Variant). Omit the binary types from 22.4 (Variant Types) */\n\t\t\t\tswitch(type) {\n\t\t\t\t\tcase 'lpstr': case 'bstr': case 'lpwstr':\n\t\t\t\t\t\tp[name] = unescapexml(text);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'bool':\n\t\t\t\t\t\tp[name] = parsexmlbool(text);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'i1': case 'i2': case 'i4': case 'i8': case 'int': case 'uint':\n\t\t\t\t\t\tp[name] = parseInt(text, 10);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'r4': case 'r8': case 'decimal':\n\t\t\t\t\t\tp[name] = parseFloat(text);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'filetime': case 'date':\n\t\t\t\t\t\tp[name] = parseDate(text);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'cy': case 'error':\n\t\t\t\t\t\tp[name] = unescapexml(text);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tif(type.slice(-1) == '/') break;\n\t\t\t\t\t\tif(opts.WTF && typeof console !== 'undefined') console.warn('Unexpected', x, type, toks);\n\t\t\t\t}\n\t\t\t} else if(x.slice(0,2) === \"2){ o[o.length] = ''; o[1]=o[1].replace(\"/>\",\">\"); }\n\treturn o.join(\"\");\n}\n/* Common Name -> XLML Name */\nvar XLMLDocPropsMap = {\n\tTitle: 'Title',\n\tSubject: 'Subject',\n\tAuthor: 'Author',\n\tKeywords: 'Keywords',\n\tComments: 'Description',\n\tLastAuthor: 'LastAuthor',\n\tRevNumber: 'Revision',\n\tApplication: 'AppName',\n\t/* TotalTime: 'TotalTime', */\n\tLastPrinted: 'LastPrinted',\n\tCreatedDate: 'Created',\n\tModifiedDate: 'LastSaved',\n\t/* Pages */\n\t/* Words */\n\t/* Characters */\n\tCategory: 'Category',\n\t/* PresentationFormat */\n\tManager: 'Manager',\n\tCompany: 'Company',\n\t/* Guid */\n\t/* HyperlinkBase */\n\t/* Bytes */\n\t/* Lines */\n\t/* Paragraphs */\n\t/* CharactersWithSpaces */\n\tAppVersion: 'Version',\n\n\tContentStatus: 'ContentStatus', /* NOTE: missing from schema */\n\tIdentifier: 'Identifier', /* NOTE: missing from schema */\n\tLanguage: 'Language' /* NOTE: missing from schema */\n};\nvar evert_XLMLDPM;\n\nfunction xlml_set_prop(Props, tag/*:string*/, val) {\n\tif(!evert_XLMLDPM) evert_XLMLDPM = evert(XLMLDocPropsMap);\n\ttag = evert_XLMLDPM[tag] || tag;\n\tProps[tag] = val;\n}\n\nfunction xlml_write_docprops(Props, opts) {\n\tvar o/*:Array*/ = [];\n\tkeys(XLMLDocPropsMap).map(function(m) {\n\t\tfor(var i = 0; i < CORE_PROPS.length; ++i) if(CORE_PROPS[i][1] == m) return CORE_PROPS[i];\n\t\tfor(i = 0; i < EXT_PROPS.length; ++i) if(EXT_PROPS[i][1] == m) return EXT_PROPS[i];\n\t\tthrow m;\n\t}).forEach(function(p) {\n\t\tif(Props[p[1]] == null) return;\n\t\tvar m = opts && opts.Props && opts.Props[p[1]] != null ? opts.Props[p[1]] : Props[p[1]];\n\t\tswitch(p[2]) {\n\t\t\tcase 'date': m = new Date(m).toISOString().replace(/\\.\\d*Z/,\"Z\"); break;\n\t\t}\n\t\tif(typeof m == 'number') m = String(m);\n\t\telse if(m === true || m === false) { m = m ? \"1\" : \"0\"; }\n\t\telse if(m instanceof Date) m = new Date(m).toISOString().replace(/\\.\\d*Z/,\"\");\n\t\to.push(writetag(XLMLDocPropsMap[p[1]] || p[1], m));\n\t});\n\treturn writextag('DocumentProperties', o.join(\"\"), {xmlns:XLMLNS.o });\n}\nfunction xlml_write_custprops(Props, Custprops/*::, opts*/) {\n\tvar BLACKLIST = [\"Worksheets\",\"SheetNames\"];\n\tvar T = 'CustomDocumentProperties';\n\tvar o/*:Array*/ = [];\n\tif(Props) keys(Props).forEach(function(k) {\n\t\t/*:: if(!Props) return; */\n\t\tif(!Object.prototype.hasOwnProperty.call(Props, k)) return;\n\t\tfor(var i = 0; i < CORE_PROPS.length; ++i) if(k == CORE_PROPS[i][1]) return;\n\t\tfor(i = 0; i < EXT_PROPS.length; ++i) if(k == EXT_PROPS[i][1]) return;\n\t\tfor(i = 0; i < BLACKLIST.length; ++i) if(k == BLACKLIST[i]) return;\n\n\t\tvar m = Props[k];\n\t\tvar t = \"string\";\n\t\tif(typeof m == 'number') { t = \"float\"; m = String(m); }\n\t\telse if(m === true || m === false) { t = \"boolean\"; m = m ? \"1\" : \"0\"; }\n\t\telse m = String(m);\n\t\to.push(writextag(escapexmltag(k), m, {\"dt:dt\":t}));\n\t});\n\tif(Custprops) keys(Custprops).forEach(function(k) {\n\t\t/*:: if(!Custprops) return; */\n\t\tif(!Object.prototype.hasOwnProperty.call(Custprops, k)) return;\n\t\tif(Props && Object.prototype.hasOwnProperty.call(Props, k)) return;\n\t\tvar m = Custprops[k];\n\t\tvar t = \"string\";\n\t\tif(typeof m == 'number') { t = \"float\"; m = String(m); }\n\t\telse if(m === true || m === false) { t = \"boolean\"; m = m ? \"1\" : \"0\"; }\n\t\telse if(m instanceof Date) { t = \"dateTime.tz\"; m = m.toISOString(); }\n\t\telse m = String(m);\n\t\to.push(writextag(escapexmltag(k), m, {\"dt:dt\":t}));\n\t});\n\treturn '<' + T + ' xmlns=\"' + XLMLNS.o + '\">' + o.join(\"\") + '';\n}\n/* [MS-DTYP] 2.3.3 FILETIME */\n/* [MS-OLEDS] 2.1.3 FILETIME (Packet Version) */\n/* [MS-OLEPS] 2.8 FILETIME (Packet Version) */\nfunction parse_FILETIME(blob) {\n\tvar dwLowDateTime = blob.read_shift(4), dwHighDateTime = blob.read_shift(4);\n\treturn new Date(((dwHighDateTime/1e7*Math.pow(2,32) + dwLowDateTime/1e7) - 11644473600)*1000).toISOString().replace(/\\.000/,\"\");\n}\nfunction write_FILETIME(time/*:string|Date*/) {\n\tvar date = (typeof time == \"string\") ? new Date(Date.parse(time)) : time;\n\tvar t = date.getTime() / 1000 + 11644473600;\n\tvar l = t % Math.pow(2,32), h = (t - l) / Math.pow(2,32);\n\tl *= 1e7; h *= 1e7;\n\tvar w = (l / Math.pow(2,32)) | 0;\n\tif(w > 0) { l = l % Math.pow(2,32); h += w; }\n\tvar o = new_buf(8); o.write_shift(4, l); o.write_shift(4, h); return o;\n}\n\n/* [MS-OSHARED] 2.3.3.1.4 Lpstr */\nfunction parse_lpstr(blob, type, pad/*:?number*/) {\n\tvar start = blob.l;\n\tvar str = blob.read_shift(0, 'lpstr-cp');\n\tif(pad) while((blob.l - start) & 3) ++blob.l;\n\treturn str;\n}\n\n/* [MS-OSHARED] 2.3.3.1.6 Lpwstr */\nfunction parse_lpwstr(blob, type, pad) {\n\tvar str = blob.read_shift(0, 'lpwstr');\n\tif(pad) blob.l += (4 - ((str.length+1) & 3)) & 3;\n\treturn str;\n}\n\n\n/* [MS-OSHARED] 2.3.3.1.11 VtString */\n/* [MS-OSHARED] 2.3.3.1.12 VtUnalignedString */\nfunction parse_VtStringBase(blob, stringType, pad) {\n\tif(stringType === 0x1F /*VT_LPWSTR*/) return parse_lpwstr(blob);\n\treturn parse_lpstr(blob, stringType, pad);\n}\n\nfunction parse_VtString(blob, t/*:number*/, pad/*:?boolean*/) { return parse_VtStringBase(blob, t, pad === false ? 0: 4); }\nfunction parse_VtUnalignedString(blob, t/*:number*/) { if(!t) throw new Error(\"VtUnalignedString must have positive length\"); return parse_VtStringBase(blob, t, 0); }\n\n/* [MS-OSHARED] 2.3.3.1.7 VtVecLpwstrValue */\nfunction parse_VtVecLpwstrValue(blob)/*:Array*/ {\n\tvar length = blob.read_shift(4);\n\tvar ret/*:Array*/ = [];\n\tfor(var i = 0; i != length; ++i) {\n\t\tvar start = blob.l;\n\t\tret[i] = blob.read_shift(0, 'lpwstr').replace(chr0,'');\n\t\tif((blob.l - start) & 0x02) blob.l += 2;\n\t}\n\treturn ret;\n}\n\n/* [MS-OSHARED] 2.3.3.1.9 VtVecUnalignedLpstrValue */\nfunction parse_VtVecUnalignedLpstrValue(blob)/*:Array*/ {\n\tvar length = blob.read_shift(4);\n\tvar ret/*:Array*/ = [];\n\tfor(var i = 0; i != length; ++i) ret[i] = blob.read_shift(0, 'lpstr-cp').replace(chr0,'');\n\treturn ret;\n}\n\n\n/* [MS-OSHARED] 2.3.3.1.13 VtHeadingPair */\nfunction parse_VtHeadingPair(blob) {\n\tvar start = blob.l;\n\tvar headingString = parse_TypedPropertyValue(blob, VT_USTR);\n\tif(blob[blob.l] == 0x00 && blob[blob.l+1] == 0x00 && ((blob.l - start) & 0x02)) blob.l += 2;\n\tvar headerParts = parse_TypedPropertyValue(blob, VT_I4);\n\treturn [headingString, headerParts];\n}\n\n/* [MS-OSHARED] 2.3.3.1.14 VtVecHeadingPairValue */\nfunction parse_VtVecHeadingPairValue(blob) {\n\tvar cElements = blob.read_shift(4);\n\tvar out = [];\n\tfor(var i = 0; i < cElements / 2; ++i) out.push(parse_VtHeadingPair(blob));\n\treturn out;\n}\n\n/* [MS-OLEPS] 2.18.1 Dictionary (uses 2.17, 2.16) */\nfunction parse_dictionary(blob,CodePage) {\n\tvar cnt = blob.read_shift(4);\n\tvar dict/*:{[number]:string}*/ = ({}/*:any*/);\n\tfor(var j = 0; j != cnt; ++j) {\n\t\tvar pid = blob.read_shift(4);\n\t\tvar len = blob.read_shift(4);\n\t\tdict[pid] = blob.read_shift(len, (CodePage === 0x4B0 ?'utf16le':'utf8')).replace(chr0,'').replace(chr1,'!');\n\t\tif(CodePage === 0x4B0 && (len % 2)) blob.l += 2;\n\t}\n\tif(blob.l & 3) blob.l = (blob.l>>2+1)<<2;\n\treturn dict;\n}\n\n/* [MS-OLEPS] 2.9 BLOB */\nfunction parse_BLOB(blob) {\n\tvar size = blob.read_shift(4);\n\tvar bytes = blob.slice(blob.l,blob.l+size);\n\tblob.l += size;\n\tif((size & 3) > 0) blob.l += (4 - (size & 3)) & 3;\n\treturn bytes;\n}\n\n/* [MS-OLEPS] 2.11 ClipboardData */\nfunction parse_ClipboardData(blob) {\n\t// TODO\n\tvar o = {};\n\to.Size = blob.read_shift(4);\n\t//o.Format = blob.read_shift(4);\n\tblob.l += o.Size + 3 - (o.Size - 1) % 4;\n\treturn o;\n}\n\n/* [MS-OLEPS] 2.15 TypedPropertyValue */\nfunction parse_TypedPropertyValue(blob, type/*:number*/, _opts)/*:any*/ {\n\tvar t = blob.read_shift(2), ret, opts = _opts||{};\n\tblob.l += 2;\n\tif(type !== VT_VARIANT)\n\tif(t !== type && VT_CUSTOM.indexOf(type)===-1 && !((type & 0xFFFE) == 0x101E && (t & 0xFFFE) == 0x101E)) throw new Error('Expected type ' + type + ' saw ' + t);\n\tswitch(type === VT_VARIANT ? t : type) {\n\t\tcase 0x02 /*VT_I2*/: ret = blob.read_shift(2, 'i'); if(!opts.raw) blob.l += 2; return ret;\n\t\tcase 0x03 /*VT_I4*/: ret = blob.read_shift(4, 'i'); return ret;\n\t\tcase 0x0B /*VT_BOOL*/: return blob.read_shift(4) !== 0x0;\n\t\tcase 0x13 /*VT_UI4*/: ret = blob.read_shift(4); return ret;\n\t\tcase 0x1E /*VT_LPSTR*/: return parse_lpstr(blob, t, 4).replace(chr0,'');\n\t\tcase 0x1F /*VT_LPWSTR*/: return parse_lpwstr(blob);\n\t\tcase 0x40 /*VT_FILETIME*/: return parse_FILETIME(blob);\n\t\tcase 0x41 /*VT_BLOB*/: return parse_BLOB(blob);\n\t\tcase 0x47 /*VT_CF*/: return parse_ClipboardData(blob);\n\t\tcase 0x50 /*VT_STRING*/: return parse_VtString(blob, t, !opts.raw).replace(chr0,'');\n\t\tcase 0x51 /*VT_USTR*/: return parse_VtUnalignedString(blob, t/*, 4*/).replace(chr0,'');\n\t\tcase 0x100C /*VT_VECTOR|VT_VARIANT*/: return parse_VtVecHeadingPairValue(blob);\n\t\tcase 0x101E /*VT_VECTOR|VT_LPSTR*/:\n\t\tcase 0x101F /*VT_VECTOR|VT_LPWSTR*/:\n\t\t\treturn t == 0x101F ? parse_VtVecLpwstrValue(blob) : parse_VtVecUnalignedLpstrValue(blob);\n\t\tdefault: throw new Error(\"TypedPropertyValue unrecognized type \" + type + \" \" + t);\n\t}\n}\nfunction write_TypedPropertyValue(type/*:number*/, value) {\n\tvar o = new_buf(4), p = new_buf(4);\n\to.write_shift(4, type == 0x50 ? 0x1F : type);\n\tswitch(type) {\n\t\tcase 0x03 /*VT_I4*/: p.write_shift(-4, value); break;\n\t\tcase 0x05 /*VT_I4*/: p = new_buf(8); p.write_shift(8, value, 'f'); break;\n\t\tcase 0x0B /*VT_BOOL*/: p.write_shift(4, value ? 0x01 : 0x00); break;\n\t\tcase 0x40 /*VT_FILETIME*/: /*:: if(typeof value !== \"string\" && !(value instanceof Date)) throw \"unreachable\"; */ p = write_FILETIME(value); break;\n\t\tcase 0x1F /*VT_LPWSTR*/:\n\t\tcase 0x50 /*VT_STRING*/:\n\t\t\t/*:: if(typeof value !== \"string\") throw \"unreachable\"; */\n\t\t\tp = new_buf(4 + 2 * (value.length + 1) + (value.length % 2 ? 0 : 2));\n\t\t\tp.write_shift(4, value.length + 1);\n\t\t\tp.write_shift(0, value, \"dbcs\");\n\t\t\twhile(p.l != p.length) p.write_shift(1, 0);\n\t\t\tbreak;\n\t\tdefault: throw new Error(\"TypedPropertyValue unrecognized type \" + type + \" \" + value);\n\t}\n\treturn bconcat([o, p]);\n}\n\n/* [MS-OLEPS] 2.20 PropertySet */\nfunction parse_PropertySet(blob, PIDSI) {\n\tvar start_addr = blob.l;\n\tvar size = blob.read_shift(4);\n\tvar NumProps = blob.read_shift(4);\n\tvar Props = [], i = 0;\n\tvar CodePage = 0;\n\tvar Dictionary = -1, DictObj/*:{[number]:string}*/ = ({}/*:any*/);\n\tfor(i = 0; i != NumProps; ++i) {\n\t\tvar PropID = blob.read_shift(4);\n\t\tvar Offset = blob.read_shift(4);\n\t\tProps[i] = [PropID, Offset + start_addr];\n\t}\n\tProps.sort(function(x,y) { return x[1] - y[1]; });\n\tvar PropH = {};\n\tfor(i = 0; i != NumProps; ++i) {\n\t\tif(blob.l !== Props[i][1]) {\n\t\t\tvar fail = true;\n\t\t\tif(i>0 && PIDSI) switch(PIDSI[Props[i-1][0]].t) {\n\t\t\t\tcase 0x02 /*VT_I2*/: if(blob.l+2 === Props[i][1]) { blob.l+=2; fail = false; } break;\n\t\t\t\tcase 0x50 /*VT_STRING*/: if(blob.l <= Props[i][1]) { blob.l=Props[i][1]; fail = false; } break;\n\t\t\t\tcase 0x100C /*VT_VECTOR|VT_VARIANT*/: if(blob.l <= Props[i][1]) { blob.l=Props[i][1]; fail = false; } break;\n\t\t\t}\n\t\t\tif((!PIDSI||i==0) && blob.l <= Props[i][1]) { fail=false; blob.l = Props[i][1]; }\n\t\t\tif(fail) throw new Error(\"Read Error: Expected address \" + Props[i][1] + ' at ' + blob.l + ' :' + i);\n\t\t}\n\t\tif(PIDSI) {\n\t\t\tvar piddsi = PIDSI[Props[i][0]];\n\t\t\tPropH[piddsi.n] = parse_TypedPropertyValue(blob, piddsi.t, {raw:true});\n\t\t\tif(piddsi.p === 'version') PropH[piddsi.n] = String(PropH[piddsi.n] >> 16) + \".\" + (\"0000\" + String(PropH[piddsi.n] & 0xFFFF)).slice(-4);\n\t\t\tif(piddsi.n == \"CodePage\") switch(PropH[piddsi.n]) {\n\t\t\t\tcase 0: PropH[piddsi.n] = 1252;\n\t\t\t\t\t/* falls through */\n\t\t\t\tcase 874:\n\t\t\t\tcase 932:\n\t\t\t\tcase 936:\n\t\t\t\tcase 949:\n\t\t\t\tcase 950:\n\t\t\t\tcase 1250:\n\t\t\t\tcase 1251:\n\t\t\t\tcase 1253:\n\t\t\t\tcase 1254:\n\t\t\t\tcase 1255:\n\t\t\t\tcase 1256:\n\t\t\t\tcase 1257:\n\t\t\t\tcase 1258:\n\t\t\t\tcase 10000:\n\t\t\t\tcase 1200:\n\t\t\t\tcase 1201:\n\t\t\t\tcase 1252:\n\t\t\t\tcase 65000: case -536:\n\t\t\t\tcase 65001: case -535:\n\t\t\t\t\tset_cp(CodePage = (PropH[piddsi.n]>>>0) & 0xFFFF); break;\n\t\t\t\tdefault: throw new Error(\"Unsupported CodePage: \" + PropH[piddsi.n]);\n\t\t\t}\n\t\t} else {\n\t\t\tif(Props[i][0] === 0x1) {\n\t\t\t\tCodePage = PropH.CodePage = (parse_TypedPropertyValue(blob, VT_I2)/*:number*/);\n\t\t\t\tset_cp(CodePage);\n\t\t\t\tif(Dictionary !== -1) {\n\t\t\t\t\tvar oldpos = blob.l;\n\t\t\t\t\tblob.l = Props[Dictionary][1];\n\t\t\t\t\tDictObj = parse_dictionary(blob,CodePage);\n\t\t\t\t\tblob.l = oldpos;\n\t\t\t\t}\n\t\t\t} else if(Props[i][0] === 0) {\n\t\t\t\tif(CodePage === 0) { Dictionary = i; blob.l = Props[i+1][1]; continue; }\n\t\t\t\tDictObj = parse_dictionary(blob,CodePage);\n\t\t\t} else {\n\t\t\t\tvar name = DictObj[Props[i][0]];\n\t\t\t\tvar val;\n\t\t\t\t/* [MS-OSHARED] 2.3.3.2.3.1.2 + PROPVARIANT */\n\t\t\t\tswitch(blob[blob.l]) {\n\t\t\t\t\tcase 0x41 /*VT_BLOB*/: blob.l += 4; val = parse_BLOB(blob); break;\n\t\t\t\t\tcase 0x1E /*VT_LPSTR*/: blob.l += 4; val = parse_VtString(blob, blob[blob.l-4]).replace(/\\u0000+$/,\"\"); break;\n\t\t\t\t\tcase 0x1F /*VT_LPWSTR*/: blob.l += 4; val = parse_VtString(blob, blob[blob.l-4]).replace(/\\u0000+$/,\"\"); break;\n\t\t\t\t\tcase 0x03 /*VT_I4*/: blob.l += 4; val = blob.read_shift(4, 'i'); break;\n\t\t\t\t\tcase 0x13 /*VT_UI4*/: blob.l += 4; val = blob.read_shift(4); break;\n\t\t\t\t\tcase 0x05 /*VT_R8*/: blob.l += 4; val = blob.read_shift(8, 'f'); break;\n\t\t\t\t\tcase 0x0B /*VT_BOOL*/: blob.l += 4; val = parsebool(blob, 4); break;\n\t\t\t\t\tcase 0x40 /*VT_FILETIME*/: blob.l += 4; val = parseDate(parse_FILETIME(blob)); break;\n\t\t\t\t\tdefault: throw new Error(\"unparsed value: \" + blob[blob.l]);\n\t\t\t\t}\n\t\t\t\tPropH[name] = val;\n\t\t\t}\n\t\t}\n\t}\n\tblob.l = start_addr + size; /* step ahead to skip padding */\n\treturn PropH;\n}\nvar XLSPSSkip = [ \"CodePage\", \"Thumbnail\", \"_PID_LINKBASE\", \"_PID_HLINKS\", \"SystemIdentifier\", \"FMTID\" ]; //.concat(PseudoPropsPairs);\nfunction guess_property_type(val/*:any*/)/*:number*/ {\n\tswitch(typeof val) {\n\t\tcase \"boolean\": return 0x0B;\n\t\tcase \"number\": return ((val|0)==val) ? 0x03 : 0x05;\n\t\tcase \"string\": return 0x1F;\n\t\tcase \"object\": if(val instanceof Date) return 0x40; break;\n\t}\n\treturn -1;\n}\nfunction write_PropertySet(entries, RE, PIDSI) {\n\tvar hdr = new_buf(8), piao = [], prop = [];\n\tvar sz = 8, i = 0;\n\n\tvar pr = new_buf(8), pio = new_buf(8);\n\tpr.write_shift(4, 0x0002);\n\tpr.write_shift(4, 0x04B0);\n\tpio.write_shift(4, 0x0001);\n\tprop.push(pr); piao.push(pio);\n\tsz += 8 + pr.length;\n\n\tif(!RE) {\n\t\tpio = new_buf(8);\n\t\tpio.write_shift(4, 0);\n\t\tpiao.unshift(pio);\n\n\t\tvar bufs = [new_buf(4)];\n\t\tbufs[0].write_shift(4, entries.length);\n\t\tfor(i = 0; i < entries.length; ++i) {\n\t\t\tvar value = entries[i][0];\n\t\t\tpr = new_buf(4 + 4 + 2 * (value.length + 1) + (value.length % 2 ? 0 : 2));\n\t\t\tpr.write_shift(4, i+2);\n\t\t\tpr.write_shift(4, value.length + 1);\n\t\t\tpr.write_shift(0, value, \"dbcs\");\n\t\t\twhile(pr.l != pr.length) pr.write_shift(1, 0);\n\t\t\tbufs.push(pr);\n\t\t}\n\t\tpr = bconcat(bufs);\n\t\tprop.unshift(pr);\n\t\tsz += 8 + pr.length;\n\t}\n\n\tfor(i = 0; i < entries.length; ++i) {\n\t\tif(RE && !RE[entries[i][0]]) continue;\n\t\tif(XLSPSSkip.indexOf(entries[i][0]) > -1 || PseudoPropsPairs.indexOf(entries[i][0]) > -1) continue;\n\t\tif(entries[i][1] == null) continue;\n\n\t\tvar val = entries[i][1], idx = 0;\n\t\tif(RE) {\n\t\t\tidx = +RE[entries[i][0]];\n\t\t\tvar pinfo = (PIDSI/*:: || {}*/)[idx]/*:: || {} */;\n\t\t\tif(pinfo.p == \"version\" && typeof val == \"string\") {\n\t\t\t\t/*:: if(typeof val !== \"string\") throw \"unreachable\"; */\n\t\t\t\tvar arr = val.split(\".\");\n\t\t\t\tval = ((+arr[0])<<16) + ((+arr[1])||0);\n\t\t\t}\n\t\t\tpr = write_TypedPropertyValue(pinfo.t, val);\n\t\t} else {\n\t\t\tvar T = guess_property_type(val);\n\t\t\tif(T == -1) { T = 0x1F; val = String(val); }\n\t\t\tpr = write_TypedPropertyValue(T, val);\n\t\t}\n\t\tprop.push(pr);\n\n\t\tpio = new_buf(8);\n\t\tpio.write_shift(4, !RE ? 2+i : idx);\n\t\tpiao.push(pio);\n\n\t\tsz += 8 + pr.length;\n\t}\n\n\tvar w = 8 * (prop.length + 1);\n\tfor(i = 0; i < prop.length; ++i) { piao[i].write_shift(4, w); w += prop[i].length; }\n\thdr.write_shift(4, sz);\n\thdr.write_shift(4, prop.length);\n\treturn bconcat([hdr].concat(piao).concat(prop));\n}\n\n/* [MS-OLEPS] 2.21 PropertySetStream */\nfunction parse_PropertySetStream(file, PIDSI, clsid) {\n\tvar blob = file.content;\n\tif(!blob) return ({}/*:any*/);\n\tprep_blob(blob, 0);\n\n\tvar NumSets, FMTID0, FMTID1, Offset0, Offset1 = 0;\n\tblob.chk('feff', 'Byte Order: ');\n\n\t/*var vers = */blob.read_shift(2); // TODO: check version\n\tvar SystemIdentifier = blob.read_shift(4);\n\tvar CLSID = blob.read_shift(16);\n\tif(CLSID !== CFB.utils.consts.HEADER_CLSID && CLSID !== clsid) throw new Error(\"Bad PropertySet CLSID \" + CLSID);\n\tNumSets = blob.read_shift(4);\n\tif(NumSets !== 1 && NumSets !== 2) throw new Error(\"Unrecognized #Sets: \" + NumSets);\n\tFMTID0 = blob.read_shift(16); Offset0 = blob.read_shift(4);\n\n\tif(NumSets === 1 && Offset0 !== blob.l) throw new Error(\"Length mismatch: \" + Offset0 + \" !== \" + blob.l);\n\telse if(NumSets === 2) { FMTID1 = blob.read_shift(16); Offset1 = blob.read_shift(4); }\n\tvar PSet0 = parse_PropertySet(blob, PIDSI);\n\n\tvar rval = ({ SystemIdentifier: SystemIdentifier }/*:any*/);\n\tfor(var y in PSet0) rval[y] = PSet0[y];\n\t//rval.blob = blob;\n\trval.FMTID = FMTID0;\n\t//rval.PSet0 = PSet0;\n\tif(NumSets === 1) return rval;\n\tif(Offset1 - blob.l == 2) blob.l += 2;\n\tif(blob.l !== Offset1) throw new Error(\"Length mismatch 2: \" + blob.l + \" !== \" + Offset1);\n\tvar PSet1;\n\ttry { PSet1 = parse_PropertySet(blob, null); } catch(e) {/* empty */}\n\tfor(y in PSet1) rval[y] = PSet1[y];\n\trval.FMTID = [FMTID0, FMTID1]; // TODO: verify FMTID0/1\n\treturn rval;\n}\nfunction write_PropertySetStream(entries, clsid, RE, PIDSI/*:{[key:string|number]:any}*/, entries2/*:?any*/, clsid2/*:?any*/) {\n\tvar hdr = new_buf(entries2 ? 68 : 48);\n\tvar bufs = [hdr];\n\thdr.write_shift(2, 0xFFFE);\n\thdr.write_shift(2, 0x0000); /* TODO: type 1 props */\n\thdr.write_shift(4, 0x32363237);\n\thdr.write_shift(16, CFB.utils.consts.HEADER_CLSID, \"hex\");\n\thdr.write_shift(4, (entries2 ? 2 : 1));\n\thdr.write_shift(16, clsid, \"hex\");\n\thdr.write_shift(4, (entries2 ? 68 : 48));\n\tvar ps0 = write_PropertySet(entries, RE, PIDSI);\n\tbufs.push(ps0);\n\n\tif(entries2) {\n\t\tvar ps1 = write_PropertySet(entries2, null, null);\n\t\thdr.write_shift(16, clsid2, \"hex\");\n\t\thdr.write_shift(4, 68 + ps0.length);\n\t\tbufs.push(ps1);\n\t}\n\treturn bconcat(bufs);\n}\n\nfunction parsenoop2(blob, length) { blob.read_shift(length); return null; }\nfunction writezeroes(n, o) { if(!o) o=new_buf(n); for(var j=0; j= 12 ? 2 : 1);\n\tvar encoding = 'sbcs-cont';\n\tvar cp = current_codepage;\n\tif(opts && opts.biff >= 8) current_codepage = 1200;\n\tif(!opts || opts.biff == 8 ) {\n\t\tvar fHighByte = blob.read_shift(1);\n\t\tif(fHighByte) { encoding = 'dbcs-cont'; }\n\t} else if(opts.biff == 12) {\n\t\tencoding = 'wstr';\n\t}\n\tif(opts.biff >= 2 && opts.biff <= 5) encoding = 'cpstr';\n\tvar o = cch ? blob.read_shift(cch, encoding) : \"\";\n\tcurrent_codepage = cp;\n\treturn o;\n}\n\n/* 2.5.293 XLUnicodeRichExtendedString */\nfunction parse_XLUnicodeRichExtendedString(blob) {\n\tvar cp = current_codepage;\n\tcurrent_codepage = 1200;\n\tvar cch = blob.read_shift(2), flags = blob.read_shift(1);\n\tvar /*fHighByte = flags & 0x1,*/ fExtSt = flags & 0x4, fRichSt = flags & 0x8;\n\tvar width = 1 + (flags & 0x1); // 0x0 -> utf8, 0x1 -> dbcs\n\tvar cRun = 0, cbExtRst;\n\tvar z = {};\n\tif(fRichSt) cRun = blob.read_shift(2);\n\tif(fExtSt) cbExtRst = blob.read_shift(4);\n\tvar encoding = width == 2 ? 'dbcs-cont' : 'sbcs-cont';\n\tvar msg = cch === 0 ? \"\" : blob.read_shift(cch, encoding);\n\tif(fRichSt) blob.l += 4 * cRun; //TODO: parse this\n\tif(fExtSt) blob.l += cbExtRst; //TODO: parse this\n\tz.t = msg;\n\tif(!fRichSt) { z.raw = \"\" + z.t + \"\"; z.r = z.t; }\n\tcurrent_codepage = cp;\n\treturn z;\n}\nfunction write_XLUnicodeRichExtendedString(xlstr/*:: :XLString, opts*/) {\n\tvar str = (xlstr.t||\"\"), nfmts = 1;\n\n\tvar hdr = new_buf(3 + (nfmts > 1 ? 2 : 0));\n\thdr.write_shift(2, str.length);\n\thdr.write_shift(1, (nfmts > 1 ? 0x08 : 0x00) | 0x01);\n\tif(nfmts > 1) hdr.write_shift(2, nfmts);\n\n\tvar otext = new_buf(2 * str.length);\n\totext.write_shift(2 * str.length, str, 'utf16le');\n\n\tvar out = [hdr, otext];\n\n\treturn bconcat(out);\n}\n\n/* 2.5.296 XLUnicodeStringNoCch */\nfunction parse_XLUnicodeStringNoCch(blob, cch, opts) {\n\tvar retval;\n\tif(opts) {\n\t\tif(opts.biff >= 2 && opts.biff <= 5) return blob.read_shift(cch, 'cpstr');\n\t\tif(opts.biff >= 12) return blob.read_shift(cch, 'dbcs-cont');\n\t}\n\tvar fHighByte = blob.read_shift(1);\n\tif(fHighByte===0) { retval = blob.read_shift(cch, 'sbcs-cont'); }\n\telse { retval = blob.read_shift(cch, 'dbcs-cont'); }\n\treturn retval;\n}\n\n/* 2.5.294 XLUnicodeString */\nfunction parse_XLUnicodeString(blob, length, opts) {\n\tvar cch = blob.read_shift(opts && opts.biff == 2 ? 1 : 2);\n\tif(cch === 0) { blob.l++; return \"\"; }\n\treturn parse_XLUnicodeStringNoCch(blob, cch, opts);\n}\n/* BIFF5 override */\nfunction parse_XLUnicodeString2(blob, length, opts) {\n\tif(opts.biff > 5) return parse_XLUnicodeString(blob, length, opts);\n\tvar cch = blob.read_shift(1);\n\tif(cch === 0) { blob.l++; return \"\"; }\n\treturn blob.read_shift(cch, (opts.biff <= 4 || !blob.lens ) ? 'cpstr' : 'sbcs-cont');\n}\n/* TODO: BIFF5 and lower, codepage awareness */\nfunction write_XLUnicodeString(str, opts, o) {\n\tif(!o) o = new_buf(3 + 2 * str.length);\n\to.write_shift(2, str.length);\n\to.write_shift(1, 1);\n\to.write_shift(31, str, 'utf16le');\n\treturn o;\n}\n\n/* [MS-XLS] 2.5.61 ControlInfo */\nfunction parse_ControlInfo(blob/*::, length, opts*/) {\n\tvar flags = blob.read_shift(1);\n\tblob.l++;\n\tvar accel = blob.read_shift(2);\n\tblob.l += 2;\n\treturn [flags, accel];\n}\n\n/* [MS-OSHARED] 2.3.7.6 URLMoniker TODO: flags */\nfunction parse_URLMoniker(blob/*::, length, opts*/) {\n\tvar len = blob.read_shift(4), start = blob.l;\n\tvar extra = false;\n\tif(len > 24) {\n\t\t/* look ahead */\n\t\tblob.l += len - 24;\n\t\tif(blob.read_shift(16) === \"795881f43b1d7f48af2c825dc4852763\") extra = true;\n\t\tblob.l = start;\n\t}\n\tvar url = blob.read_shift((extra?len-24:len)>>1, 'utf16le').replace(chr0,\"\");\n\tif(extra) blob.l += 24;\n\treturn url;\n}\n\n/* [MS-OSHARED] 2.3.7.8 FileMoniker TODO: all fields */\nfunction parse_FileMoniker(blob/*::, length*/) {\n\tvar cAnti = blob.read_shift(2);\n\tvar preamble = \"\"; while(cAnti-- > 0) preamble += \"../\";\n\tvar ansiPath = blob.read_shift(0, 'lpstr-ansi');\n\tblob.l += 2; //var endServer = blob.read_shift(2);\n\tif(blob.read_shift(2) != 0xDEAD) throw new Error(\"Bad FileMoniker\");\n\tvar sz = blob.read_shift(4);\n\tif(sz === 0) return preamble + ansiPath.replace(/\\\\/g,\"/\");\n\tvar bytes = blob.read_shift(4);\n\tif(blob.read_shift(2) != 3) throw new Error(\"Bad FileMoniker\");\n\tvar unicodePath = blob.read_shift(bytes>>1, 'utf16le').replace(chr0,\"\");\n\treturn preamble + unicodePath;\n}\n\n/* [MS-OSHARED] 2.3.7.2 HyperlinkMoniker TODO: all the monikers */\nfunction parse_HyperlinkMoniker(blob, length) {\n\tvar clsid = blob.read_shift(16); length -= 16;\n\tswitch(clsid) {\n\t\tcase \"e0c9ea79f9bace118c8200aa004ba90b\": return parse_URLMoniker(blob, length);\n\t\tcase \"0303000000000000c000000000000046\": return parse_FileMoniker(blob, length);\n\t\tdefault: throw new Error(\"Unsupported Moniker \" + clsid);\n\t}\n}\n\n/* [MS-OSHARED] 2.3.7.9 HyperlinkString */\nfunction parse_HyperlinkString(blob/*::, length*/) {\n\tvar len = blob.read_shift(4);\n\tvar o = len > 0 ? blob.read_shift(len, 'utf16le').replace(chr0, \"\") : \"\";\n\treturn o;\n}\nfunction write_HyperlinkString(str/*:string*/, o) {\n\tif(!o) o = new_buf(6 + str.length * 2);\n\to.write_shift(4, 1 + str.length);\n\tfor(var i = 0; i < str.length; ++i) o.write_shift(2, str.charCodeAt(i));\n\to.write_shift(2, 0);\n\treturn o;\n}\n\n/* [MS-OSHARED] 2.3.7.1 Hyperlink Object */\nfunction parse_Hyperlink(blob, length)/*:Hyperlink*/ {\n\tvar end = blob.l + length;\n\tvar sVer = blob.read_shift(4);\n\tif(sVer !== 2) throw new Error(\"Unrecognized streamVersion: \" + sVer);\n\tvar flags = blob.read_shift(2);\n\tblob.l += 2;\n\tvar displayName, targetFrameName, moniker, oleMoniker, Loc=\"\", guid, fileTime;\n\tif(flags & 0x0010) displayName = parse_HyperlinkString(blob, end - blob.l);\n\tif(flags & 0x0080) targetFrameName = parse_HyperlinkString(blob, end - blob.l);\n\tif((flags & 0x0101) === 0x0101) moniker = parse_HyperlinkString(blob, end - blob.l);\n\tif((flags & 0x0101) === 0x0001) oleMoniker = parse_HyperlinkMoniker(blob, end - blob.l);\n\tif(flags & 0x0008) Loc = parse_HyperlinkString(blob, end - blob.l);\n\tif(flags & 0x0020) guid = blob.read_shift(16);\n\tif(flags & 0x0040) fileTime = parse_FILETIME(blob/*, 8*/);\n\tblob.l = end;\n\tvar target = targetFrameName||moniker||oleMoniker||\"\";\n\tif(target && Loc) target+=\"#\"+Loc;\n\tif(!target) target = \"#\" + Loc;\n\tif((flags & 0x0002) && target.charAt(0) == \"/\" && target.charAt(1) != \"/\") target = \"file://\" + target;\n\tvar out = ({Target:target}/*:any*/);\n\tif(guid) out.guid = guid;\n\tif(fileTime) out.time = fileTime;\n\tif(displayName) out.Tooltip = displayName;\n\treturn out;\n}\nfunction write_Hyperlink(hl) {\n\tvar out = new_buf(512), i = 0;\n\tvar Target = hl.Target;\n\tif(Target.slice(0,7) == \"file://\") Target = Target.slice(7);\n\tvar hashidx = Target.indexOf(\"#\");\n\tvar F = hashidx > -1 ? 0x1f : 0x17;\n\tswitch(Target.charAt(0)) { case \"#\": F=0x1c; break; case \".\": F&=~2; break; }\n\tout.write_shift(4,2); out.write_shift(4, F);\n\tvar data = [8,6815827,6619237,4849780,83]; for(i = 0; i < data.length; ++i) out.write_shift(4, data[i]);\n\tif(F == 0x1C) {\n\t\tTarget = Target.slice(1);\n\t\twrite_HyperlinkString(Target, out);\n\t} else if(F & 0x02) {\n\t\tdata = \"e0 c9 ea 79 f9 ba ce 11 8c 82 00 aa 00 4b a9 0b\".split(\" \");\n\t\tfor(i = 0; i < data.length; ++i) out.write_shift(1, parseInt(data[i], 16));\n\t\tvar Pretarget = hashidx > -1 ? Target.slice(0, hashidx) : Target;\n\t\tout.write_shift(4, 2*(Pretarget.length + 1));\n\t\tfor(i = 0; i < Pretarget.length; ++i) out.write_shift(2, Pretarget.charCodeAt(i));\n\t\tout.write_shift(2, 0);\n\t\tif(F & 0x08) write_HyperlinkString(hashidx > -1 ? Target.slice(hashidx+1): \"\", out);\n\t} else {\n\t\tdata = \"03 03 00 00 00 00 00 00 c0 00 00 00 00 00 00 46\".split(\" \");\n\t\tfor(i = 0; i < data.length; ++i) out.write_shift(1, parseInt(data[i], 16));\n\t\tvar P = 0;\n\t\twhile(Target.slice(P*3,P*3+3)==\"../\"||Target.slice(P*3,P*3+3)==\"..\\\\\") ++P;\n\t\tout.write_shift(2, P);\n\t\tout.write_shift(4, Target.length - 3 * P + 1);\n\t\tfor(i = 0; i < Target.length - 3 * P; ++i) out.write_shift(1, Target.charCodeAt(i + 3 * P) & 0xFF);\n\t\tout.write_shift(1, 0);\n\t\tout.write_shift(2, 0xFFFF);\n\t\tout.write_shift(2, 0xDEAD);\n\t\tfor(i = 0; i < 6; ++i) out.write_shift(4, 0);\n\t}\n\treturn out.slice(0, out.l);\n}\n\n/* 2.5.178 LongRGBA */\nfunction parse_LongRGBA(blob/*::, length*/) { var r = blob.read_shift(1), g = blob.read_shift(1), b = blob.read_shift(1), a = blob.read_shift(1); return [r,g,b,a]; }\n\n/* 2.5.177 LongRGB */\nfunction parse_LongRGB(blob, length) { var x = parse_LongRGBA(blob, length); x[3] = 0; return x; }\n\n\n/* [MS-XLS] 2.5.19 */\nfunction parse_XLSCell(blob/*::, length*/)/*:Cell*/ {\n\tvar rw = blob.read_shift(2); // 0-indexed\n\tvar col = blob.read_shift(2);\n\tvar ixfe = blob.read_shift(2);\n\treturn ({r:rw, c:col, ixfe:ixfe}/*:any*/);\n}\nfunction write_XLSCell(R/*:number*/, C/*:number*/, ixfe/*:?number*/, o) {\n\tif(!o) o = new_buf(6);\n\to.write_shift(2, R);\n\to.write_shift(2, C);\n\to.write_shift(2, ixfe||0);\n\treturn o;\n}\n\n/* [MS-XLS] 2.5.134 */\nfunction parse_frtHeader(blob) {\n\tvar rt = blob.read_shift(2);\n\tvar flags = blob.read_shift(2); // TODO: parse these flags\n\tblob.l += 8;\n\treturn {type: rt, flags: flags};\n}\n\n\n\nfunction parse_OptXLUnicodeString(blob, length, opts) { return length === 0 ? \"\" : parse_XLUnicodeString2(blob, length, opts); }\n\n/* [MS-XLS] 2.5.344 */\nfunction parse_XTI(blob, length, opts) {\n\tvar w = opts.biff > 8 ? 4 : 2;\n\tvar iSupBook = blob.read_shift(w), itabFirst = blob.read_shift(w,'i'), itabLast = blob.read_shift(w,'i');\n\treturn [iSupBook, itabFirst, itabLast];\n}\n\n/* [MS-XLS] 2.5.218 */\nfunction parse_RkRec(blob) {\n\tvar ixfe = blob.read_shift(2);\n\tvar RK = parse_RkNumber(blob);\n\treturn [ixfe, RK];\n}\n\n/* [MS-XLS] 2.5.1 */\nfunction parse_AddinUdf(blob, length, opts) {\n\tblob.l += 4; length -= 4;\n\tvar l = blob.l + length;\n\tvar udfName = parse_ShortXLUnicodeString(blob, length, opts);\n\tvar cb = blob.read_shift(2);\n\tl -= blob.l;\n\tif(cb !== l) throw new Error(\"Malformed AddinUdf: padding = \" + l + \" != \" + cb);\n\tblob.l += cb;\n\treturn udfName;\n}\n\n/* [MS-XLS] 2.5.209 TODO: Check sizes */\nfunction parse_Ref8U(blob/*::, length*/) {\n\tvar rwFirst = blob.read_shift(2);\n\tvar rwLast = blob.read_shift(2);\n\tvar colFirst = blob.read_shift(2);\n\tvar colLast = blob.read_shift(2);\n\treturn {s:{c:colFirst, r:rwFirst}, e:{c:colLast,r:rwLast}};\n}\nfunction write_Ref8U(r/*:Range*/, o) {\n\tif(!o) o = new_buf(8);\n\to.write_shift(2, r.s.r);\n\to.write_shift(2, r.e.r);\n\to.write_shift(2, r.s.c);\n\to.write_shift(2, r.e.c);\n\treturn o;\n}\n\n/* [MS-XLS] 2.5.211 */\nfunction parse_RefU(blob/*::, length*/) {\n\tvar rwFirst = blob.read_shift(2);\n\tvar rwLast = blob.read_shift(2);\n\tvar colFirst = blob.read_shift(1);\n\tvar colLast = blob.read_shift(1);\n\treturn {s:{c:colFirst, r:rwFirst}, e:{c:colLast,r:rwLast}};\n}\n\n/* [MS-XLS] 2.5.207 */\nvar parse_Ref = parse_RefU;\n\n/* [MS-XLS] 2.5.143 */\nfunction parse_FtCmo(blob/*::, length*/) {\n\tblob.l += 4;\n\tvar ot = blob.read_shift(2);\n\tvar id = blob.read_shift(2);\n\tvar flags = blob.read_shift(2);\n\tblob.l+=12;\n\treturn [id, ot, flags];\n}\n\n/* [MS-XLS] 2.5.149 */\nfunction parse_FtNts(blob) {\n\tvar out = {};\n\tblob.l += 4;\n\tblob.l += 16; // GUID TODO\n\tout.fSharedNote = blob.read_shift(2);\n\tblob.l += 4;\n\treturn out;\n}\n\n/* [MS-XLS] 2.5.142 */\nfunction parse_FtCf(blob) {\n\tvar out = {};\n\tblob.l += 4;\n\tblob.cf = blob.read_shift(2);\n\treturn out;\n}\n\n/* [MS-XLS] 2.5.140 - 2.5.154 and friends */\nfunction parse_FtSkip(blob) { blob.l += 2; blob.l += blob.read_shift(2); }\nvar FtTab = {\n\t/*::[*/0x00/*::]*/: parse_FtSkip, /* FtEnd */\n\t/*::[*/0x04/*::]*/: parse_FtSkip, /* FtMacro */\n\t/*::[*/0x05/*::]*/: parse_FtSkip, /* FtButton */\n\t/*::[*/0x06/*::]*/: parse_FtSkip, /* FtGmo */\n\t/*::[*/0x07/*::]*/: parse_FtCf, /* FtCf */\n\t/*::[*/0x08/*::]*/: parse_FtSkip, /* FtPioGrbit */\n\t/*::[*/0x09/*::]*/: parse_FtSkip, /* FtPictFmla */\n\t/*::[*/0x0A/*::]*/: parse_FtSkip, /* FtCbls */\n\t/*::[*/0x0B/*::]*/: parse_FtSkip, /* FtRbo */\n\t/*::[*/0x0C/*::]*/: parse_FtSkip, /* FtSbs */\n\t/*::[*/0x0D/*::]*/: parse_FtNts, /* FtNts */\n\t/*::[*/0x0E/*::]*/: parse_FtSkip, /* FtSbsFmla */\n\t/*::[*/0x0F/*::]*/: parse_FtSkip, /* FtGboData */\n\t/*::[*/0x10/*::]*/: parse_FtSkip, /* FtEdoData */\n\t/*::[*/0x11/*::]*/: parse_FtSkip, /* FtRboData */\n\t/*::[*/0x12/*::]*/: parse_FtSkip, /* FtCblsData */\n\t/*::[*/0x13/*::]*/: parse_FtSkip, /* FtLbsData */\n\t/*::[*/0x14/*::]*/: parse_FtSkip, /* FtCblsFmla */\n\t/*::[*/0x15/*::]*/: parse_FtCmo\n};\nfunction parse_FtArray(blob, length/*::, ot*/) {\n\tvar tgt = blob.l + length;\n\tvar fts = [];\n\twhile(blob.l < tgt) {\n\t\tvar ft = blob.read_shift(2);\n\t\tblob.l-=2;\n\t\ttry {\n\t\t\tfts.push(FtTab[ft](blob, tgt - blob.l));\n\t\t} catch(e) { blob.l = tgt; return fts; }\n\t}\n\tif(blob.l != tgt) blob.l = tgt; //throw new Error(\"bad Object Ft-sequence\");\n\treturn fts;\n}\n\n/* --- 2.4 Records --- */\n\n/* [MS-XLS] 2.4.21 */\nfunction parse_BOF(blob, length) {\n\tvar o = {BIFFVer:0, dt:0};\n\to.BIFFVer = blob.read_shift(2); length -= 2;\n\tif(length >= 2) { o.dt = blob.read_shift(2); blob.l -= 2; }\n\tswitch(o.BIFFVer) {\n\t\tcase 0x0600: /* BIFF8 */\n\t\tcase 0x0500: /* BIFF5 */\n\t\tcase 0x0400: /* BIFF4 */\n\t\tcase 0x0300: /* BIFF3 */\n\t\tcase 0x0200: /* BIFF2 */\n\t\tcase 0x0002: case 0x0007: /* BIFF2 */\n\t\t\tbreak;\n\t\tdefault: if(length > 6) throw new Error(\"Unexpected BIFF Ver \" + o.BIFFVer);\n\t}\n\n\tblob.read_shift(length);\n\treturn o;\n}\nfunction write_BOF(wb/*:Workbook*/, t/*:number*/, o) {\n\tvar h = 0x0600, w = 16;\n\tswitch(o.bookType) {\n\t\tcase 'biff8': break;\n\t\tcase 'biff5': h = 0x0500; w = 8; break;\n\t\tcase 'biff4': h = 0x0004; w = 6; break;\n\t\tcase 'biff3': h = 0x0003; w = 6; break;\n\t\tcase 'biff2': h = 0x0002; w = 4; break;\n\t\tcase 'xla': break;\n\t\tdefault: throw new Error(\"unsupported BIFF version\");\n\t}\n\tvar out = new_buf(w);\n\tout.write_shift(2, h);\n\tout.write_shift(2, t);\n\tif(w > 4) out.write_shift(2, 0x7262);\n\tif(w > 6) out.write_shift(2, 0x07CD);\n\tif(w > 8) {\n\t\tout.write_shift(2, 0xC009);\n\t\tout.write_shift(2, 0x0001);\n\t\tout.write_shift(2, 0x0706);\n\t\tout.write_shift(2, 0x0000);\n\t}\n\treturn out;\n}\n\n\n/* [MS-XLS] 2.4.146 */\nfunction parse_InterfaceHdr(blob, length) {\n\tif(length === 0) return 0x04b0;\n\tif((blob.read_shift(2))!==0x04b0){/* empty */}\n\treturn 0x04b0;\n}\n\n\n/* [MS-XLS] 2.4.349 */\nfunction parse_WriteAccess(blob, length, opts) {\n\tif(opts.enc) { blob.l += length; return \"\"; }\n\tvar l = blob.l;\n\t// TODO: make sure XLUnicodeString doesnt overrun\n\tvar UserName = parse_XLUnicodeString2(blob, 0, opts);\n\tblob.read_shift(length + l - blob.l);\n\treturn UserName;\n}\nfunction write_WriteAccess(s/*:string*/, opts) {\n\tvar b8 = !opts || opts.biff == 8;\n\tvar o = new_buf(b8 ? 112 : 54);\n\to.write_shift(opts.biff == 8 ? 2 : 1, 7);\n\tif(b8) o.write_shift(1, 0);\n\to.write_shift(4, 0x33336853);\n\to.write_shift(4, (0x00534A74 | (b8 ? 0 : 0x20000000)));\n\twhile(o.l < o.length) o.write_shift(1, (b8 ? 0 : 32));\n\treturn o;\n}\n\n/* [MS-XLS] 2.4.351 */\nfunction parse_WsBool(blob, length, opts) {\n\tvar flags = opts && opts.biff == 8 || length == 2 ? blob.read_shift(2) : (blob.l += length, 0);\n\treturn { fDialog: flags & 0x10, fBelow: flags & 0x40, fRight: flags & 0x80 };\n}\n\n/* [MS-XLS] 2.4.28 */\nfunction parse_BoundSheet8(blob, length, opts) {\n\tvar pos = blob.read_shift(4);\n\tvar hidden = blob.read_shift(1) & 0x03;\n\tvar dt = blob.read_shift(1);\n\tswitch(dt) {\n\t\tcase 0: dt = 'Worksheet'; break;\n\t\tcase 1: dt = 'Macrosheet'; break;\n\t\tcase 2: dt = 'Chartsheet'; break;\n\t\tcase 6: dt = 'VBAModule'; break;\n\t}\n\tvar name = parse_ShortXLUnicodeString(blob, 0, opts);\n\tif(name.length === 0) name = \"Sheet1\";\n\treturn { pos:pos, hs:hidden, dt:dt, name:name };\n}\nfunction write_BoundSheet8(data, opts) {\n\tvar w = (!opts || opts.biff >= 8 ? 2 : 1);\n\tvar o = new_buf(8 + w * data.name.length);\n\to.write_shift(4, data.pos);\n\to.write_shift(1, data.hs || 0);\n\to.write_shift(1, data.dt);\n\to.write_shift(1, data.name.length);\n\tif(opts.biff >= 8) o.write_shift(1, 1);\n\to.write_shift(w * data.name.length, data.name, opts.biff < 8 ? 'sbcs' : 'utf16le');\n\tvar out = o.slice(0, o.l);\n\tout.l = o.l; return out;\n}\n\n/* [MS-XLS] 2.4.265 TODO */\nfunction parse_SST(blob, length)/*:SST*/ {\n\tvar end = blob.l + length;\n\tvar cnt = blob.read_shift(4);\n\tvar ucnt = blob.read_shift(4);\n\tvar strs/*:SST*/ = ([]/*:any*/);\n\tfor(var i = 0; i != ucnt && blob.l < end; ++i) {\n\t\tstrs.push(parse_XLUnicodeRichExtendedString(blob));\n\t}\n\tstrs.Count = cnt; strs.Unique = ucnt;\n\treturn strs;\n}\nfunction write_SST(sst, opts) {\n\tvar header = new_buf(8);\n\theader.write_shift(4, sst.Count);\n\theader.write_shift(4, sst.Unique);\n\tvar strs = [];\n\tfor(var j = 0; j < sst.length; ++j) strs[j] = write_XLUnicodeRichExtendedString(sst[j], opts);\n\tvar o = bconcat([header].concat(strs));\n\t/*::(*/o/*:: :any)*/.parts = [header.length].concat(strs.map(function(str) { return str.length; }));\n\treturn o;\n}\n\n/* [MS-XLS] 2.4.107 */\nfunction parse_ExtSST(blob, length) {\n\tvar extsst = {};\n\textsst.dsst = blob.read_shift(2);\n\tblob.l += length-2;\n\treturn extsst;\n}\n\n\n/* [MS-XLS] 2.4.221 TODO: check BIFF2-4 */\nfunction parse_Row(blob) {\n\tvar z = ({}/*:any*/);\n\tz.r = blob.read_shift(2);\n\tz.c = blob.read_shift(2);\n\tz.cnt = blob.read_shift(2) - z.c;\n\tvar miyRw = blob.read_shift(2);\n\tblob.l += 4; // reserved(2), unused(2)\n\tvar flags = blob.read_shift(1); // various flags\n\tblob.l += 3; // reserved(8), ixfe(12), flags(4)\n\tif(flags & 0x07) z.level = flags & 0x07;\n\t// collapsed: flags & 0x10\n\tif(flags & 0x20) z.hidden = true;\n\tif(flags & 0x40) z.hpt = miyRw / 20;\n\treturn z;\n}\n\n\n/* [MS-XLS] 2.4.125 */\nfunction parse_ForceFullCalculation(blob) {\n\tvar header = parse_frtHeader(blob);\n\tif(header.type != 0x08A3) throw new Error(\"Invalid Future Record \" + header.type);\n\tvar fullcalc = blob.read_shift(4);\n\treturn fullcalc !== 0x0;\n}\n\n\n\n\n\n/* [MS-XLS] 2.4.215 rt */\nfunction parse_RecalcId(blob) {\n\tblob.read_shift(2);\n\treturn blob.read_shift(4);\n}\n\n/* [MS-XLS] 2.4.87 */\nfunction parse_DefaultRowHeight(blob, length, opts) {\n\tvar f = 0;\n\tif(!(opts && opts.biff == 2)) {\n\t\tf = blob.read_shift(2);\n\t}\n\tvar miyRw = blob.read_shift(2);\n\tif((opts && opts.biff == 2)) {\n\t\tf = 1 - (miyRw >> 15); miyRw &= 0x7fff;\n\t}\n\tvar fl = {Unsynced:f&1,DyZero:(f&2)>>1,ExAsc:(f&4)>>2,ExDsc:(f&8)>>3};\n\treturn [fl, miyRw];\n}\n\n/* [MS-XLS] 2.4.345 TODO */\nfunction parse_Window1(blob) {\n\tvar xWn = blob.read_shift(2), yWn = blob.read_shift(2), dxWn = blob.read_shift(2), dyWn = blob.read_shift(2);\n\tvar flags = blob.read_shift(2), iTabCur = blob.read_shift(2), iTabFirst = blob.read_shift(2);\n\tvar ctabSel = blob.read_shift(2), wTabRatio = blob.read_shift(2);\n\treturn { Pos: [xWn, yWn], Dim: [dxWn, dyWn], Flags: flags, CurTab: iTabCur,\n\t\tFirstTab: iTabFirst, Selected: ctabSel, TabRatio: wTabRatio };\n}\nfunction write_Window1(/*::opts*/) {\n\tvar o = new_buf(18);\n\to.write_shift(2, 0);\n\to.write_shift(2, 0);\n\to.write_shift(2, 0x7260);\n\to.write_shift(2, 0x44c0);\n\to.write_shift(2, 0x38);\n\to.write_shift(2, 0);\n\to.write_shift(2, 0);\n\to.write_shift(2, 1);\n\to.write_shift(2, 0x01f4);\n\treturn o;\n}\n/* [MS-XLS] 2.4.346 TODO */\nfunction parse_Window2(blob, length, opts) {\n\tif(opts && opts.biff >= 2 && opts.biff < 5) return {};\n\tvar f = blob.read_shift(2);\n\treturn { RTL: f & 0x40 };\n}\nfunction write_Window2(view) {\n\tvar o = new_buf(18), f = 0x6b6;\n\tif(view && view.RTL) f |= 0x40;\n\to.write_shift(2, f);\n\to.write_shift(4, 0);\n\to.write_shift(4, 64);\n\to.write_shift(4, 0);\n\to.write_shift(4, 0);\n\treturn o;\n}\n\n/* [MS-XLS] 2.4.189 TODO */\nfunction parse_Pane(/*blob, length, opts*/) {\n}\n\n/* [MS-XLS] 2.4.122 TODO */\nfunction parse_Font(blob, length, opts) {\n\tvar o/*:any*/ = {\n\t\tdyHeight: blob.read_shift(2),\n\t\tfl: blob.read_shift(2)\n\t};\n\tswitch((opts && opts.biff) || 8) {\n\t\tcase 2: break;\n\t\tcase 3: case 4: blob.l += 2; break;\n\t\tdefault: blob.l += 10; break;\n\t}\n\to.name = parse_ShortXLUnicodeString(blob, 0, opts);\n\treturn o;\n}\nfunction write_Font(data, opts) {\n\tvar name = data.name || \"Arial\";\n\tvar b5 = (opts && (opts.biff == 5)), w = (b5 ? (15 + name.length) : (16 + 2 * name.length));\n\tvar o = new_buf(w);\n\to.write_shift(2, (data.sz || 12) * 20);\n\to.write_shift(4, 0);\n\to.write_shift(2, 400);\n\to.write_shift(4, 0);\n\to.write_shift(2, 0);\n\to.write_shift(1, name.length);\n\tif(!b5) o.write_shift(1, 1);\n\to.write_shift((b5 ? 1 : 2) * name.length, name, (b5 ? \"sbcs\" : \"utf16le\"));\n\treturn o;\n}\n\n/* [MS-XLS] 2.4.149 */\nfunction parse_LabelSst(blob) {\n\tvar cell = parse_XLSCell(blob);\n\tcell.isst = blob.read_shift(4);\n\treturn cell;\n}\nfunction write_LabelSst(R/*:number*/, C/*:number*/, v/*:number*/, os/*:number*/ /*::, opts*/) {\n\tvar o = new_buf(10);\n\twrite_XLSCell(R, C, os, o);\n\to.write_shift(4, v);\n\treturn o;\n}\n\n/* [MS-XLS] 2.4.148 */\nfunction parse_Label(blob, length, opts) {\n\tif(opts.biffguess && opts.biff == 2) opts.biff = 5;\n\tvar target = blob.l + length;\n\tvar cell = parse_XLSCell(blob, 6);\n\tif(opts.biff == 2) blob.l++;\n\tvar str = parse_XLUnicodeString(blob, target - blob.l, opts);\n\tcell.val = str;\n\treturn cell;\n}\nfunction write_Label(R/*:number*/, C/*:number*/, v/*:string*/, os/*:number*/, opts) {\n\tvar b8 = !opts || opts.biff == 8;\n\tvar o = new_buf(6 + 2 + (+b8) + (1 + b8) * v.length);\n\twrite_XLSCell(R, C, os, o);\n\to.write_shift(2, v.length);\n\tif(b8) o.write_shift(1, 1);\n\to.write_shift((1 + b8) * v.length, v, b8 ? 'utf16le' : 'sbcs');\n\treturn o;\n}\n\n\n/* [MS-XLS] 2.4.126 Number Formats */\nfunction parse_Format(blob, length, opts) {\n\tvar numFmtId = blob.read_shift(2);\n\tvar fmtstr = parse_XLUnicodeString2(blob, 0, opts);\n\treturn [numFmtId, fmtstr];\n}\nfunction write_Format(i/*:number*/, f/*:string*/, opts, o) {\n\tvar b5 = (opts && (opts.biff == 5));\n\tif(!o) o = new_buf(b5 ? (3 + f.length) : (5 + 2 * f.length));\n\to.write_shift(2, i);\n\to.write_shift((b5 ? 1 : 2), f.length);\n\tif(!b5) o.write_shift(1, 1);\n\to.write_shift((b5 ? 1 : 2) * f.length, f, (b5 ? 'sbcs' : 'utf16le'));\n\tvar out = (o.length > o.l) ? o.slice(0, o.l) : o;\n\tif(out.l == null) out.l = out.length;\n\treturn out;\n}\nvar parse_BIFF2Format = parse_XLUnicodeString2;\n\n/* [MS-XLS] 2.4.90 */\nfunction parse_Dimensions(blob, length, opts) {\n\tvar end = blob.l + length;\n\tvar w = opts.biff == 8 || !opts.biff ? 4 : 2;\n\tvar r = blob.read_shift(w), R = blob.read_shift(w);\n\tvar c = blob.read_shift(2), C = blob.read_shift(2);\n\tblob.l = end;\n\treturn {s: {r:r, c:c}, e: {r:R, c:C}};\n}\nfunction write_Dimensions(range, opts) {\n\tvar w = opts.biff == 8 || !opts.biff ? 4 : 2;\n\tvar o = new_buf(2*w + 6);\n\to.write_shift(w, range.s.r);\n\to.write_shift(w, range.e.r + 1);\n\to.write_shift(2, range.s.c);\n\to.write_shift(2, range.e.c + 1);\n\to.write_shift(2, 0);\n\treturn o;\n}\n\n/* [MS-XLS] 2.4.220 */\nfunction parse_RK(blob) {\n\tvar rw = blob.read_shift(2), col = blob.read_shift(2);\n\tvar rkrec = parse_RkRec(blob);\n\treturn {r:rw, c:col, ixfe:rkrec[0], rknum:rkrec[1]};\n}\n\n/* [MS-XLS] 2.4.175 */\nfunction parse_MulRk(blob, length) {\n\tvar target = blob.l + length - 2;\n\tvar rw = blob.read_shift(2), col = blob.read_shift(2);\n\tvar rkrecs = [];\n\twhile(blob.l < target) rkrecs.push(parse_RkRec(blob));\n\tif(blob.l !== target) throw new Error(\"MulRK read error\");\n\tvar lastcol = blob.read_shift(2);\n\tif(rkrecs.length != lastcol - col + 1) throw new Error(\"MulRK length mismatch\");\n\treturn {r:rw, c:col, C:lastcol, rkrec:rkrecs};\n}\n/* [MS-XLS] 2.4.174 */\nfunction parse_MulBlank(blob, length) {\n\tvar target = blob.l + length - 2;\n\tvar rw = blob.read_shift(2), col = blob.read_shift(2);\n\tvar ixfes = [];\n\twhile(blob.l < target) ixfes.push(blob.read_shift(2));\n\tif(blob.l !== target) throw new Error(\"MulBlank read error\");\n\tvar lastcol = blob.read_shift(2);\n\tif(ixfes.length != lastcol - col + 1) throw new Error(\"MulBlank length mismatch\");\n\treturn {r:rw, c:col, C:lastcol, ixfe:ixfes};\n}\n\n/* [MS-XLS] 2.5.20 2.5.249 TODO: interpret values here */\nfunction parse_CellStyleXF(blob, length, style, opts) {\n\tvar o = {};\n\tvar a = blob.read_shift(4), b = blob.read_shift(4);\n\tvar c = blob.read_shift(4), d = blob.read_shift(2);\n\to.patternType = XLSFillPattern[c >> 26];\n\n\tif(!opts.cellStyles) return o;\n\to.alc = a & 0x07;\n\to.fWrap = (a >> 3) & 0x01;\n\to.alcV = (a >> 4) & 0x07;\n\to.fJustLast = (a >> 7) & 0x01;\n\to.trot = (a >> 8) & 0xFF;\n\to.cIndent = (a >> 16) & 0x0F;\n\to.fShrinkToFit = (a >> 20) & 0x01;\n\to.iReadOrder = (a >> 22) & 0x02;\n\to.fAtrNum = (a >> 26) & 0x01;\n\to.fAtrFnt = (a >> 27) & 0x01;\n\to.fAtrAlc = (a >> 28) & 0x01;\n\to.fAtrBdr = (a >> 29) & 0x01;\n\to.fAtrPat = (a >> 30) & 0x01;\n\to.fAtrProt = (a >> 31) & 0x01;\n\n\to.dgLeft = b & 0x0F;\n\to.dgRight = (b >> 4) & 0x0F;\n\to.dgTop = (b >> 8) & 0x0F;\n\to.dgBottom = (b >> 12) & 0x0F;\n\to.icvLeft = (b >> 16) & 0x7F;\n\to.icvRight = (b >> 23) & 0x7F;\n\to.grbitDiag = (b >> 30) & 0x03;\n\n\to.icvTop = c & 0x7F;\n\to.icvBottom = (c >> 7) & 0x7F;\n\to.icvDiag = (c >> 14) & 0x7F;\n\to.dgDiag = (c >> 21) & 0x0F;\n\n\to.icvFore = d & 0x7F;\n\to.icvBack = (d >> 7) & 0x7F;\n\to.fsxButton = (d >> 14) & 0x01;\n\treturn o;\n}\n//function parse_CellXF(blob, length, opts) {return parse_CellStyleXF(blob,length,0, opts);}\n//function parse_StyleXF(blob, length, opts) {return parse_CellStyleXF(blob,length,1, opts);}\n\n/* [MS-XLS] 2.4.353 TODO: actually do this right */\nfunction parse_XF(blob, length, opts) {\n\tvar o = {};\n\to.ifnt = blob.read_shift(2); o.numFmtId = blob.read_shift(2); o.flags = blob.read_shift(2);\n\to.fStyle = (o.flags >> 2) & 0x01;\n\tlength -= 6;\n\to.data = parse_CellStyleXF(blob, length, o.fStyle, opts);\n\treturn o;\n}\nfunction write_XF(data, ixfeP, opts, o) {\n\tvar b5 = (opts && (opts.biff == 5));\n\tif(!o) o = new_buf(b5 ? 16 : 20);\n\to.write_shift(2, 0);\n\tif(data.style) {\n\t\to.write_shift(2, (data.numFmtId||0));\n\t\to.write_shift(2, 0xFFF4);\n\t} else {\n\t\to.write_shift(2, (data.numFmtId||0));\n\t\to.write_shift(2, (ixfeP<<4));\n\t}\n\tvar f = 0;\n\tif(data.numFmtId > 0 && b5) f |= 0x0400;\n\to.write_shift(4, f);\n\to.write_shift(4, 0);\n\tif(!b5) o.write_shift(4, 0);\n\to.write_shift(2, 0);\n\treturn o;\n}\n\n/* [MS-XLS] 2.4.134 */\nfunction parse_Guts(blob) {\n\tblob.l += 4;\n\tvar out = [blob.read_shift(2), blob.read_shift(2)];\n\tif(out[0] !== 0) out[0]--;\n\tif(out[1] !== 0) out[1]--;\n\tif(out[0] > 7 || out[1] > 7) throw new Error(\"Bad Gutters: \" + out.join(\"|\"));\n\treturn out;\n}\nfunction write_Guts(guts/*:Array*/) {\n\tvar o = new_buf(8);\n\to.write_shift(4, 0);\n\to.write_shift(2, guts[0] ? guts[0] + 1 : 0);\n\to.write_shift(2, guts[1] ? guts[1] + 1 : 0);\n\treturn o;\n}\n\n/* [MS-XLS] 2.4.24 */\nfunction parse_BoolErr(blob, length, opts) {\n\tvar cell = parse_XLSCell(blob, 6);\n\tif(opts.biff == 2 || length == 9) ++blob.l;\n\tvar val = parse_Bes(blob, 2);\n\tcell.val = val;\n\tcell.t = (val === true || val === false) ? 'b' : 'e';\n\treturn cell;\n}\nfunction write_BoolErr(R/*:number*/, C/*:number*/, v, os/*:number*/, opts, t/*:string*/) {\n\tvar o = new_buf(8);\n\twrite_XLSCell(R, C, os, o);\n\twrite_Bes(v, t, o);\n\treturn o;\n}\n\n/* [MS-XLS] 2.4.180 Number */\nfunction parse_Number(blob, length, opts) {\n\tif(opts.biffguess && opts.biff == 2) opts.biff = 5;\n\tvar cell = parse_XLSCell(blob, 6);\n\tvar xnum = parse_Xnum(blob, 8);\n\tcell.val = xnum;\n\treturn cell;\n}\nfunction write_Number(R/*:number*/, C/*:number*/, v, os/*:: :number, opts*/) {\n\tvar o = new_buf(14);\n\twrite_XLSCell(R, C, os, o);\n\twrite_Xnum(v, o);\n\treturn o;\n}\n\nvar parse_XLHeaderFooter = parse_OptXLUnicodeString; // TODO: parse 2.4.136\n\n/* [MS-XLS] 2.4.271 */\nfunction parse_SupBook(blob, length, opts) {\n\tvar end = blob.l + length;\n\tvar ctab = blob.read_shift(2);\n\tvar cch = blob.read_shift(2);\n\topts.sbcch = cch;\n\tif(cch == 0x0401 || cch == 0x3A01) return [cch, ctab];\n\tif(cch < 0x01 || cch >0xff) throw new Error(\"Unexpected SupBook type: \"+cch);\n\tvar virtPath = parse_XLUnicodeStringNoCch(blob, cch);\n\t/* TODO: 2.5.277 Virtual Path */\n\tvar rgst = [];\n\twhile(end > blob.l) rgst.push(parse_XLUnicodeString(blob));\n\treturn [cch, ctab, virtPath, rgst];\n}\n\n/* [MS-XLS] 2.4.105 TODO */\nfunction parse_ExternName(blob, length, opts) {\n\tvar flags = blob.read_shift(2);\n\tvar body;\n\tvar o = ({\n\t\tfBuiltIn: flags & 0x01,\n\t\tfWantAdvise: (flags >>> 1) & 0x01,\n\t\tfWantPict: (flags >>> 2) & 0x01,\n\t\tfOle: (flags >>> 3) & 0x01,\n\t\tfOleLink: (flags >>> 4) & 0x01,\n\t\tcf: (flags >>> 5) & 0x3FF,\n\t\tfIcon: flags >>> 15 & 0x01\n\t}/*:any*/);\n\tif(opts.sbcch === 0x3A01) body = parse_AddinUdf(blob, length-2, opts);\n\t//else throw new Error(\"unsupported SupBook cch: \" + opts.sbcch);\n\to.body = body || blob.read_shift(length-2);\n\tif(typeof body === \"string\") o.Name = body;\n\treturn o;\n}\n\n/* [MS-XLS] 2.4.150 TODO */\nvar XLSLblBuiltIn = [\n\t\"_xlnm.Consolidate_Area\",\n\t\"_xlnm.Auto_Open\",\n\t\"_xlnm.Auto_Close\",\n\t\"_xlnm.Extract\",\n\t\"_xlnm.Database\",\n\t\"_xlnm.Criteria\",\n\t\"_xlnm.Print_Area\",\n\t\"_xlnm.Print_Titles\",\n\t\"_xlnm.Recorder\",\n\t\"_xlnm.Data_Form\",\n\t\"_xlnm.Auto_Activate\",\n\t\"_xlnm.Auto_Deactivate\",\n\t\"_xlnm.Sheet_Title\",\n\t\"_xlnm._FilterDatabase\"\n];\nfunction parse_Lbl(blob, length, opts) {\n\tvar target = blob.l + length;\n\tvar flags = blob.read_shift(2);\n\tvar chKey = blob.read_shift(1);\n\tvar cch = blob.read_shift(1);\n\tvar cce = blob.read_shift(opts && opts.biff == 2 ? 1 : 2);\n\tvar itab = 0;\n\tif(!opts || opts.biff >= 5) {\n\t\tif(opts.biff != 5) blob.l += 2;\n\t\titab = blob.read_shift(2);\n\t\tif(opts.biff == 5) blob.l += 2;\n\t\tblob.l += 4;\n\t}\n\tvar name = parse_XLUnicodeStringNoCch(blob, cch, opts);\n\tif(flags & 0x20) name = XLSLblBuiltIn[name.charCodeAt(0)];\n\tvar npflen = target - blob.l; if(opts && opts.biff == 2) --npflen;\n\t/*jshint -W018 */\n\tvar rgce = (target == blob.l || cce === 0 || !(npflen > 0)) ? [] : parse_NameParsedFormula(blob, npflen, opts, cce);\n\t/*jshint +W018 */\n\treturn {\n\t\tchKey: chKey,\n\t\tName: name,\n\t\titab: itab,\n\t\trgce: rgce\n\t};\n}\n\n/* [MS-XLS] 2.4.106 TODO: verify filename encoding */\nfunction parse_ExternSheet(blob, length, opts) {\n\tif(opts.biff < 8) return parse_BIFF5ExternSheet(blob, length, opts);\n\tvar o = [], target = blob.l + length, len = blob.read_shift(opts.biff > 8 ? 4 : 2);\n\twhile(len-- !== 0) o.push(parse_XTI(blob, opts.biff > 8 ? 12 : 6, opts));\n\t\t// [iSupBook, itabFirst, itabLast];\n\tif(blob.l != target) throw new Error(\"Bad ExternSheet: \" + blob.l + \" != \" + target);\n\treturn o;\n}\nfunction parse_BIFF5ExternSheet(blob, length, opts) {\n\tif(blob[blob.l + 1] == 0x03) blob[blob.l]++;\n\tvar o = parse_ShortXLUnicodeString(blob, length, opts);\n\treturn o.charCodeAt(0) == 0x03 ? o.slice(1) : o;\n}\n\n/* [MS-XLS] 2.4.176 TODO: check older biff */\nfunction parse_NameCmt(blob, length, opts) {\n\tif(opts.biff < 8) { blob.l += length; return; }\n\tvar cchName = blob.read_shift(2);\n\tvar cchComment = blob.read_shift(2);\n\tvar name = parse_XLUnicodeStringNoCch(blob, cchName, opts);\n\tvar comment = parse_XLUnicodeStringNoCch(blob, cchComment, opts);\n\treturn [name, comment];\n}\n\n/* [MS-XLS] 2.4.260 */\nfunction parse_ShrFmla(blob, length, opts) {\n\tvar ref = parse_RefU(blob, 6);\n\tblob.l++;\n\tvar cUse = blob.read_shift(1);\n\tlength -= 8;\n\treturn [parse_SharedParsedFormula(blob, length, opts), cUse, ref];\n}\n\n/* [MS-XLS] 2.4.4 TODO */\nfunction parse_Array(blob, length, opts) {\n\tvar ref = parse_Ref(blob, 6);\n\t/* TODO: fAlwaysCalc */\n\tswitch(opts.biff) {\n\t\tcase 2: blob.l ++; length -= 7; break;\n\t\tcase 3: case 4: blob.l += 2; length -= 8; break;\n\t\tdefault: blob.l += 6; length -= 12;\n\t}\n\treturn [ref, parse_ArrayParsedFormula(blob, length, opts, ref)];\n}\n\n/* [MS-XLS] 2.4.173 */\nfunction parse_MTRSettings(blob) {\n\tvar fMTREnabled = blob.read_shift(4) !== 0x00;\n\tvar fUserSetThreadCount = blob.read_shift(4) !== 0x00;\n\tvar cUserThreadCount = blob.read_shift(4);\n\treturn [fMTREnabled, fUserSetThreadCount, cUserThreadCount];\n}\n\n/* [MS-XLS] 2.5.186 TODO: BIFF5 */\nfunction parse_NoteSh(blob, length, opts) {\n\tif(opts.biff < 8) return;\n\tvar row = blob.read_shift(2), col = blob.read_shift(2);\n\tvar flags = blob.read_shift(2), idObj = blob.read_shift(2);\n\tvar stAuthor = parse_XLUnicodeString2(blob, 0, opts);\n\tif(opts.biff < 8) blob.read_shift(1);\n\treturn [{r:row,c:col}, stAuthor, idObj, flags];\n}\n\n/* [MS-XLS] 2.4.179 */\nfunction parse_Note(blob, length, opts) {\n\t/* TODO: Support revisions */\n\treturn parse_NoteSh(blob, length, opts);\n}\n\n/* [MS-XLS] 2.4.168 */\nfunction parse_MergeCells(blob, length)/*:Array*/ {\n\tvar merges/*:Array*/ = [];\n\tvar cmcs = blob.read_shift(2);\n\twhile (cmcs--) merges.push(parse_Ref8U(blob,length));\n\treturn merges;\n}\nfunction write_MergeCells(merges/*:Array*/) {\n\tvar o = new_buf(2 + merges.length * 8);\n\to.write_shift(2, merges.length);\n\tfor(var i = 0; i < merges.length; ++i) write_Ref8U(merges[i], o);\n\treturn o;\n}\n\n/* [MS-XLS] 2.4.181 TODO: parse all the things! */\nfunction parse_Obj(blob, length, opts) {\n\tif(opts && opts.biff < 8) return parse_BIFF5Obj(blob, length, opts);\n\tvar cmo = parse_FtCmo(blob, 22); // id, ot, flags\n\tvar fts = parse_FtArray(blob, length-22, cmo[1]);\n\treturn { cmo: cmo, ft:fts };\n}\n/* from older spec */\nvar parse_BIFF5OT = {\n0x08: function(blob, length) {\n\tvar tgt = blob.l + length;\n\tblob.l += 10; // todo\n\tvar cf = blob.read_shift(2);\n\tblob.l += 4;\n\tblob.l += 2; //var cbPictFmla = blob.read_shift(2);\n\tblob.l += 2;\n\tblob.l += 2; //var grbit = blob.read_shift(2);\n\tblob.l += 4;\n\tvar cchName = blob.read_shift(1);\n\tblob.l += cchName; // TODO: stName\n\tblob.l = tgt; // TODO: fmla\n\treturn { fmt:cf };\n}\n};\n\nfunction parse_BIFF5Obj(blob, length, opts) {\n\tblob.l += 4; //var cnt = blob.read_shift(4);\n\tvar ot = blob.read_shift(2);\n\tvar id = blob.read_shift(2);\n\tvar grbit = blob.read_shift(2);\n\tblob.l += 2; //var colL = blob.read_shift(2);\n\tblob.l += 2; //var dxL = blob.read_shift(2);\n\tblob.l += 2; //var rwT = blob.read_shift(2);\n\tblob.l += 2; //var dyT = blob.read_shift(2);\n\tblob.l += 2; //var colR = blob.read_shift(2);\n\tblob.l += 2; //var dxR = blob.read_shift(2);\n\tblob.l += 2; //var rwB = blob.read_shift(2);\n\tblob.l += 2; //var dyB = blob.read_shift(2);\n\tblob.l += 2; //var cbMacro = blob.read_shift(2);\n\tblob.l += 6;\n\tlength -= 36;\n\tvar fts = [];\n\tfts.push((parse_BIFF5OT[ot]||parsenoop)(blob, length, opts));\n\treturn { cmo: [id, ot, grbit], ft:fts };\n}\n\n/* [MS-XLS] 2.4.329 TODO: parse properly */\nfunction parse_TxO(blob, length, opts) {\n\tvar s = blob.l;\n\tvar texts = \"\";\ntry {\n\tblob.l += 4;\n\tvar ot = (opts.lastobj||{cmo:[0,0]}).cmo[1];\n\tvar controlInfo; // eslint-disable-line no-unused-vars\n\tif([0,5,7,11,12,14].indexOf(ot) == -1) blob.l += 6;\n\telse controlInfo = parse_ControlInfo(blob, 6, opts); // eslint-disable-line no-unused-vars\n\tvar cchText = blob.read_shift(2);\n\t/*var cbRuns = */blob.read_shift(2);\n\t/*var ifntEmpty = */parseuint16(blob, 2);\n\tvar len = blob.read_shift(2);\n\tblob.l += len;\n\t//var fmla = parse_ObjFmla(blob, s + length - blob.l);\n\n\tfor(var i = 1; i < blob.lens.length-1; ++i) {\n\t\tif(blob.l-s != blob.lens[i]) throw new Error(\"TxO: bad continue record\");\n\t\tvar hdr = blob[blob.l];\n\t\tvar t = parse_XLUnicodeStringNoCch(blob, blob.lens[i+1]-blob.lens[i]-1);\n\t\ttexts += t;\n\t\tif(texts.length >= (hdr ? cchText : 2*cchText)) break;\n\t}\n\tif(texts.length !== cchText && texts.length !== cchText*2) {\n\t\tthrow new Error(\"cchText: \" + cchText + \" != \" + texts.length);\n\t}\n\n\tblob.l = s + length;\n\t/* [MS-XLS] 2.5.272 TxORuns */\n//\tvar rgTxoRuns = [];\n//\tfor(var j = 0; j != cbRuns/8-1; ++j) blob.l += 8;\n//\tvar cchText2 = blob.read_shift(2);\n//\tif(cchText2 !== cchText) throw new Error(\"TxOLastRun mismatch: \" + cchText2 + \" \" + cchText);\n//\tblob.l += 6;\n//\tif(s + length != blob.l) throw new Error(\"TxO \" + (s + length) + \", at \" + blob.l);\n\treturn { t: texts };\n} catch(e) { blob.l = s + length; return { t: texts }; }\n}\n\n/* [MS-XLS] 2.4.140 */\nfunction parse_HLink(blob, length) {\n\tvar ref = parse_Ref8U(blob, 8);\n\tblob.l += 16; /* CLSID */\n\tvar hlink = parse_Hyperlink(blob, length-24);\n\treturn [ref, hlink];\n}\nfunction write_HLink(hl) {\n\tvar O = new_buf(24);\n\tvar ref = decode_cell(hl[0]);\n\tO.write_shift(2, ref.r); O.write_shift(2, ref.r);\n\tO.write_shift(2, ref.c); O.write_shift(2, ref.c);\n\tvar clsid = \"d0 c9 ea 79 f9 ba ce 11 8c 82 00 aa 00 4b a9 0b\".split(\" \");\n\tfor(var i = 0; i < 16; ++i) O.write_shift(1, parseInt(clsid[i], 16));\n\treturn bconcat([O, write_Hyperlink(hl[1])]);\n}\n\n\n/* [MS-XLS] 2.4.141 */\nfunction parse_HLinkTooltip(blob, length) {\n\tblob.read_shift(2);\n\tvar ref = parse_Ref8U(blob, 8);\n\tvar wzTooltip = blob.read_shift((length-10)/2, 'dbcs-cont');\n\twzTooltip = wzTooltip.replace(chr0,\"\");\n\treturn [ref, wzTooltip];\n}\nfunction write_HLinkTooltip(hl) {\n\tvar TT = hl[1].Tooltip;\n\tvar O = new_buf(10 + 2 * (TT.length + 1));\n\tO.write_shift(2, 0x0800);\n\tvar ref = decode_cell(hl[0]);\n\tO.write_shift(2, ref.r); O.write_shift(2, ref.r);\n\tO.write_shift(2, ref.c); O.write_shift(2, ref.c);\n\tfor(var i = 0; i < TT.length; ++i) O.write_shift(2, TT.charCodeAt(i));\n\tO.write_shift(2, 0);\n\treturn O;\n}\n\n/* [MS-XLS] 2.4.63 */\nfunction parse_Country(blob)/*:[string|number, string|number]*/ {\n\tvar o = [0,0], d;\n\td = blob.read_shift(2); o[0] = CountryEnum[d] || d;\n\td = blob.read_shift(2); o[1] = CountryEnum[d] || d;\n\treturn o;\n}\nfunction write_Country(o) {\n\tif(!o) o = new_buf(4);\n\to.write_shift(2, 0x01);\n\to.write_shift(2, 0x01);\n\treturn o;\n}\n\n/* [MS-XLS] 2.4.50 ClrtClient */\nfunction parse_ClrtClient(blob) {\n\tvar ccv = blob.read_shift(2);\n\tvar o = [];\n\twhile(ccv-->0) o.push(parse_LongRGB(blob, 8));\n\treturn o;\n}\n\n/* [MS-XLS] 2.4.188 */\nfunction parse_Palette(blob) {\n\tvar ccv = blob.read_shift(2);\n\tvar o = [];\n\twhile(ccv-->0) o.push(parse_LongRGB(blob, 8));\n\treturn o;\n}\n\n/* [MS-XLS] 2.4.354 */\nfunction parse_XFCRC(blob) {\n\tblob.l += 2;\n\tvar o = {cxfs:0, crc:0};\n\to.cxfs = blob.read_shift(2);\n\to.crc = blob.read_shift(4);\n\treturn o;\n}\n\n/* [MS-XLS] 2.4.53 TODO: parse flags */\n/* [MS-XLSB] 2.4.323 TODO: parse flags */\nfunction parse_ColInfo(blob, length, opts) {\n\tif(!opts.cellStyles) return parsenoop(blob, length);\n\tvar w = opts && opts.biff >= 12 ? 4 : 2;\n\tvar colFirst = blob.read_shift(w);\n\tvar colLast = blob.read_shift(w);\n\tvar coldx = blob.read_shift(w);\n\tvar ixfe = blob.read_shift(w);\n\tvar flags = blob.read_shift(2);\n\tif(w == 2) blob.l += 2;\n\tvar o = ({s:colFirst, e:colLast, w:coldx, ixfe:ixfe, flags:flags}/*:any*/);\n\tif(opts.biff >= 5 || !opts.biff) o.level = (flags >> 8) & 0x7;\n\treturn o;\n}\nfunction write_ColInfo(col, idx) {\n\tvar o = new_buf(12);\n\to.write_shift(2, idx);\n\to.write_shift(2, idx);\n\to.write_shift(2, col.width * 256);\n\to.write_shift(2, 0);\n\tvar f = 0;\n\tif(col.hidden) f |= 1;\n\to.write_shift(1, f);\n\tf = col.level || 0;\n\to.write_shift(1, f);\n\to.write_shift(2, 0);\n\treturn o;\n}\n\n/* [MS-XLS] 2.4.257 */\nfunction parse_Setup(blob, length) {\n\tvar o = {};\n\tif(length < 32) return o;\n\tblob.l += 16;\n\to.header = parse_Xnum(blob, 8);\n\to.footer = parse_Xnum(blob, 8);\n\tblob.l += 2;\n\treturn o;\n}\n\n/* [MS-XLS] 2.4.261 */\nfunction parse_ShtProps(blob, length, opts) {\n\tvar def = {area:false};\n\tif(opts.biff != 5) { blob.l += length; return def; }\n\tvar d = blob.read_shift(1); blob.l += 3;\n\tif((d & 0x10)) def.area = true;\n\treturn def;\n}\n\n/* [MS-XLS] 2.4.241 */\nfunction write_RRTabId(n/*:number*/) {\n\tvar out = new_buf(2 * n);\n\tfor(var i = 0; i < n; ++i) out.write_shift(2, i+1);\n\treturn out;\n}\n\nvar parse_Blank = parse_XLSCell; /* [MS-XLS] 2.4.20 Just the cell */\nvar parse_Scl = parseuint16a; /* [MS-XLS] 2.4.247 num, den */\nvar parse_String = parse_XLUnicodeString; /* [MS-XLS] 2.4.268 */\n\n/* --- Specific to versions before BIFF8 --- */\nfunction parse_ImData(blob) {\n\tvar cf = blob.read_shift(2);\n\tvar env = blob.read_shift(2);\n\tvar lcb = blob.read_shift(4);\n\tvar o = {fmt:cf, env:env, len:lcb, data:blob.slice(blob.l,blob.l+lcb)};\n\tblob.l += lcb;\n\treturn o;\n}\n\n/* BIFF2_??? where ??? is the name from [XLS] */\nfunction parse_BIFF2STR(blob, length, opts) {\n\tif(opts.biffguess && opts.biff == 5) opts.biff = 2;\n\tvar cell = parse_XLSCell(blob, 6);\n\t++blob.l;\n\tvar str = parse_XLUnicodeString2(blob, length-7, opts);\n\tcell.t = 'str';\n\tcell.val = str;\n\treturn cell;\n}\n\nfunction parse_BIFF2NUM(blob/*::, length*/) {\n\tvar cell = parse_XLSCell(blob, 6);\n\t++blob.l;\n\tvar num = parse_Xnum(blob, 8);\n\tcell.t = 'n';\n\tcell.val = num;\n\treturn cell;\n}\nfunction write_BIFF2NUM(r/*:number*/, c/*:number*/, val/*:number*/) {\n\tvar out = new_buf(15);\n\twrite_BIFF2Cell(out, r, c);\n\tout.write_shift(8, val, 'f');\n\treturn out;\n}\n\nfunction parse_BIFF2INT(blob) {\n\tvar cell = parse_XLSCell(blob, 6);\n\t++blob.l;\n\tvar num = blob.read_shift(2);\n\tcell.t = 'n';\n\tcell.val = num;\n\treturn cell;\n}\nfunction write_BIFF2INT(r/*:number*/, c/*:number*/, val/*:number*/) {\n\tvar out = new_buf(9);\n\twrite_BIFF2Cell(out, r, c);\n\tout.write_shift(2, val);\n\treturn out;\n}\n\nfunction parse_BIFF2STRING(blob) {\n\tvar cch = blob.read_shift(1);\n\tif(cch === 0) { blob.l++; return \"\"; }\n\treturn blob.read_shift(cch, 'sbcs-cont');\n}\n\n/* TODO: convert to BIFF8 font struct */\nfunction parse_BIFF2FONTXTRA(blob, length) {\n\tblob.l += 6; // unknown\n\tblob.l += 2; // font weight \"bls\"\n\tblob.l += 1; // charset\n\tblob.l += 3; // unknown\n\tblob.l += 1; // font family\n\tblob.l += length - 13;\n}\n\n/* TODO: parse rich text runs */\nfunction parse_RString(blob, length, opts) {\n\tvar end = blob.l + length;\n\tvar cell = parse_XLSCell(blob, 6);\n\tvar cch = blob.read_shift(2);\n\tvar str = parse_XLUnicodeStringNoCch(blob, cch, opts);\n\tblob.l = end;\n\tcell.t = 'str';\n\tcell.val = str;\n\treturn cell;\n}\n/* from js-harb (C) 2014-present SheetJS */\nvar DBF_SUPPORTED_VERSIONS = [0x02, 0x03, 0x30, 0x31, 0x83, 0x8B, 0x8C, 0xF5];\nvar DBF = /*#__PURE__*/(function() {\nvar dbf_codepage_map = {\n\t/* Code Pages Supported by Visual FoxPro */\n\t/*::[*/0x01/*::]*/: 437, /*::[*/0x02/*::]*/: 850,\n\t/*::[*/0x03/*::]*/: 1252, /*::[*/0x04/*::]*/: 10000,\n\t/*::[*/0x64/*::]*/: 852, /*::[*/0x65/*::]*/: 866,\n\t/*::[*/0x66/*::]*/: 865, /*::[*/0x67/*::]*/: 861,\n\t/*::[*/0x68/*::]*/: 895, /*::[*/0x69/*::]*/: 620,\n\t/*::[*/0x6A/*::]*/: 737, /*::[*/0x6B/*::]*/: 857,\n\t/*::[*/0x78/*::]*/: 950, /*::[*/0x79/*::]*/: 949,\n\t/*::[*/0x7A/*::]*/: 936, /*::[*/0x7B/*::]*/: 932,\n\t/*::[*/0x7C/*::]*/: 874, /*::[*/0x7D/*::]*/: 1255,\n\t/*::[*/0x7E/*::]*/: 1256, /*::[*/0x96/*::]*/: 10007,\n\t/*::[*/0x97/*::]*/: 10029, /*::[*/0x98/*::]*/: 10006,\n\t/*::[*/0xC8/*::]*/: 1250, /*::[*/0xC9/*::]*/: 1251,\n\t/*::[*/0xCA/*::]*/: 1254, /*::[*/0xCB/*::]*/: 1253,\n\n\t/* shapefile DBF extension */\n\t/*::[*/0x00/*::]*/: 20127, /*::[*/0x08/*::]*/: 865,\n\t/*::[*/0x09/*::]*/: 437, /*::[*/0x0A/*::]*/: 850,\n\t/*::[*/0x0B/*::]*/: 437, /*::[*/0x0D/*::]*/: 437,\n\t/*::[*/0x0E/*::]*/: 850, /*::[*/0x0F/*::]*/: 437,\n\t/*::[*/0x10/*::]*/: 850, /*::[*/0x11/*::]*/: 437,\n\t/*::[*/0x12/*::]*/: 850, /*::[*/0x13/*::]*/: 932,\n\t/*::[*/0x14/*::]*/: 850, /*::[*/0x15/*::]*/: 437,\n\t/*::[*/0x16/*::]*/: 850, /*::[*/0x17/*::]*/: 865,\n\t/*::[*/0x18/*::]*/: 437, /*::[*/0x19/*::]*/: 437,\n\t/*::[*/0x1A/*::]*/: 850, /*::[*/0x1B/*::]*/: 437,\n\t/*::[*/0x1C/*::]*/: 863, /*::[*/0x1D/*::]*/: 850,\n\t/*::[*/0x1F/*::]*/: 852, /*::[*/0x22/*::]*/: 852,\n\t/*::[*/0x23/*::]*/: 852, /*::[*/0x24/*::]*/: 860,\n\t/*::[*/0x25/*::]*/: 850, /*::[*/0x26/*::]*/: 866,\n\t/*::[*/0x37/*::]*/: 850, /*::[*/0x40/*::]*/: 852,\n\t/*::[*/0x4D/*::]*/: 936, /*::[*/0x4E/*::]*/: 949,\n\t/*::[*/0x4F/*::]*/: 950, /*::[*/0x50/*::]*/: 874,\n\t/*::[*/0x57/*::]*/: 1252, /*::[*/0x58/*::]*/: 1252,\n\t/*::[*/0x59/*::]*/: 1252, /*::[*/0x6C/*::]*/: 863,\n\t/*::[*/0x86/*::]*/: 737, /*::[*/0x87/*::]*/: 852,\n\t/*::[*/0x88/*::]*/: 857, /*::[*/0xCC/*::]*/: 1257,\n\n\t/*::[*/0xFF/*::]*/: 16969\n};\nvar dbf_reverse_map = evert({\n\t/*::[*/0x01/*::]*/: 437, /*::[*/0x02/*::]*/: 850,\n\t/*::[*/0x03/*::]*/: 1252, /*::[*/0x04/*::]*/: 10000,\n\t/*::[*/0x64/*::]*/: 852, /*::[*/0x65/*::]*/: 866,\n\t/*::[*/0x66/*::]*/: 865, /*::[*/0x67/*::]*/: 861,\n\t/*::[*/0x68/*::]*/: 895, /*::[*/0x69/*::]*/: 620,\n\t/*::[*/0x6A/*::]*/: 737, /*::[*/0x6B/*::]*/: 857,\n\t/*::[*/0x78/*::]*/: 950, /*::[*/0x79/*::]*/: 949,\n\t/*::[*/0x7A/*::]*/: 936, /*::[*/0x7B/*::]*/: 932,\n\t/*::[*/0x7C/*::]*/: 874, /*::[*/0x7D/*::]*/: 1255,\n\t/*::[*/0x7E/*::]*/: 1256, /*::[*/0x96/*::]*/: 10007,\n\t/*::[*/0x97/*::]*/: 10029, /*::[*/0x98/*::]*/: 10006,\n\t/*::[*/0xC8/*::]*/: 1250, /*::[*/0xC9/*::]*/: 1251,\n\t/*::[*/0xCA/*::]*/: 1254, /*::[*/0xCB/*::]*/: 1253,\n\t/*::[*/0x00/*::]*/: 20127\n});\n/* TODO: find an actual specification */\nfunction dbf_to_aoa(buf, opts)/*:AOA*/ {\n\tvar out/*:AOA*/ = [];\n\tvar d/*:Block*/ = (new_raw_buf(1)/*:any*/);\n\tswitch(opts.type) {\n\t\tcase 'base64': d = s2a(Base64_decode(buf)); break;\n\t\tcase 'binary': d = s2a(buf); break;\n\t\tcase 'buffer':\n\t\tcase 'array': d = buf; break;\n\t}\n\tprep_blob(d, 0);\n\n\t/* header */\n\tvar ft = d.read_shift(1);\n\tvar memo = !!(ft & 0x88);\n\tvar vfp = false, l7 = false;\n\tswitch(ft) {\n\t\tcase 0x02: break; // dBASE II\n\t\tcase 0x03: break; // dBASE III\n\t\tcase 0x30: vfp = true; memo = true; break; // VFP\n\t\tcase 0x31: vfp = true; memo = true; break; // VFP with autoincrement\n\t\t// 0x43 dBASE IV SQL table files\n\t\t// 0x63 dBASE IV SQL system files\n\t\tcase 0x83: break; // dBASE III with memo\n\t\tcase 0x8B: break; // dBASE IV with memo\n\t\tcase 0x8C: l7 = true; break; // dBASE Level 7 with memo\n\t\t// case 0xCB dBASE IV SQL table files with memo\n\t\tcase 0xF5: break; // FoxPro 2.x with memo\n\t\t// case 0xFB FoxBASE\n\t\tdefault: throw new Error(\"DBF Unsupported Version: \" + ft.toString(16));\n\t}\n\n\tvar nrow = 0, fpos = 0x0209;\n\tif(ft == 0x02) nrow = d.read_shift(2);\n\td.l += 3; // dBASE II stores DDMMYY date, others use YYMMDD\n\tif(ft != 0x02) nrow = d.read_shift(4);\n\tif(nrow > 1048576) nrow = 1e6;\n\n\tif(ft != 0x02) fpos = d.read_shift(2); // header length\n\tvar rlen = d.read_shift(2); // record length\n\n\tvar /*flags = 0,*/ current_cp = opts.codepage || 1252;\n\tif(ft != 0x02) { // 20 reserved bytes\n\t\td.l+=16;\n\t\t/*flags = */d.read_shift(1);\n\t\t//if(memo && ((flags & 0x02) === 0)) throw new Error(\"DBF Flags \" + flags.toString(16) + \" ft \" + ft.toString(16));\n\n\t\t/* codepage present in FoxPro and dBASE Level 7 */\n\t\tif(d[d.l] !== 0) current_cp = dbf_codepage_map[d[d.l]];\n\t\td.l+=1;\n\n\t\td.l+=2;\n\t}\n\tif(l7) d.l += 36; // Level 7: 32 byte \"Language driver name\", 4 byte reserved\n\n/*:: type DBFField = { name:string; len:number; type:string; } */\n\tvar fields/*:Array*/ = [], field/*:DBFField*/ = ({}/*:any*/);\n\tvar hend = Math.min(d.length, (ft == 0x02 ? 0x209 : (fpos - 10 - (vfp ? 264 : 0))));\n\tvar ww = l7 ? 32 : 11;\n\twhile(d.l < hend && d[d.l] != 0x0d) {\n\t\tfield = ({}/*:any*/);\n\t\tfield.name = $cptable.utils.decode(current_cp, d.slice(d.l, d.l+ww)).replace(/[\\u0000\\r\\n].*$/g,\"\");\n\t\td.l += ww;\n\t\tfield.type = String.fromCharCode(d.read_shift(1));\n\t\tif(ft != 0x02 && !l7) field.offset = d.read_shift(4);\n\t\tfield.len = d.read_shift(1);\n\t\tif(ft == 0x02) field.offset = d.read_shift(2);\n\t\tfield.dec = d.read_shift(1);\n\t\tif(field.name.length) fields.push(field);\n\t\tif(ft != 0x02) d.l += l7 ? 13 : 14;\n\t\tswitch(field.type) {\n\t\t\tcase 'B': // Double (VFP) / Binary (dBASE L7)\n\t\t\t\tif((!vfp || field.len != 8) && opts.WTF) console.log('Skipping ' + field.name + ':' + field.type);\n\t\t\t\tbreak;\n\t\t\tcase 'G': // General (FoxPro and dBASE L7)\n\t\t\tcase 'P': // Picture (FoxPro and dBASE L7)\n\t\t\t\tif(opts.WTF) console.log('Skipping ' + field.name + ':' + field.type);\n\t\t\t\tbreak;\n\t\t\tcase '+': // Autoincrement (dBASE L7 only)\n\t\t\tcase '0': // _NullFlags (VFP only)\n\t\t\tcase '@': // Timestamp (dBASE L7 only)\n\t\t\tcase 'C': // Character (dBASE II)\n\t\t\tcase 'D': // Date (dBASE III)\n\t\t\tcase 'F': // Float (dBASE IV)\n\t\t\tcase 'I': // Long (VFP and dBASE L7)\n\t\t\tcase 'L': // Logical (dBASE II)\n\t\t\tcase 'M': // Memo (dBASE III)\n\t\t\tcase 'N': // Number (dBASE II)\n\t\t\tcase 'O': // Double (dBASE L7 only)\n\t\t\tcase 'T': // Datetime (VFP only)\n\t\t\tcase 'Y': // Currency (VFP only)\n\t\t\t\tbreak;\n\t\t\tdefault: throw new Error('Unknown Field Type: ' + field.type);\n\t\t}\n\t}\n\n\tif(d[d.l] !== 0x0D) d.l = fpos-1;\n\tif(d.read_shift(1) !== 0x0D) throw new Error(\"DBF Terminator not found \" + d.l + \" \" + d[d.l]);\n\td.l = fpos;\n\n\t/* data */\n\tvar R = 0, C = 0;\n\tout[0] = [];\n\tfor(C = 0; C != fields.length; ++C) out[0][C] = fields[C].name;\n\twhile(nrow-- > 0) {\n\t\tif(d[d.l] === 0x2A) {\n\t\t\t// TODO: record marked as deleted -- create a hidden row?\n\t\t\td.l+=rlen;\n\t\t\tcontinue;\n\t\t}\n\t\t++d.l;\n\t\tout[++R] = []; C = 0;\n\t\tfor(C = 0; C != fields.length; ++C) {\n\t\t\tvar dd = d.slice(d.l, d.l+fields[C].len); d.l+=fields[C].len;\n\t\t\tprep_blob(dd, 0);\n\t\t\tvar s = $cptable.utils.decode(current_cp, dd);\n\t\t\tswitch(fields[C].type) {\n\t\t\t\tcase 'C':\n\t\t\t\t\t// NOTE: it is conventional to write ' / / ' for empty dates\n\t\t\t\t\tif(s.trim().length) out[R][C] = s.replace(/\\s+$/,\"\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'D':\n\t\t\t\t\tif(s.length === 8) out[R][C] = new Date(+s.slice(0,4), +s.slice(4,6)-1, +s.slice(6,8));\n\t\t\t\t\telse out[R][C] = s;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'F': out[R][C] = parseFloat(s.trim()); break;\n\t\t\t\tcase '+': case 'I': out[R][C] = l7 ? dd.read_shift(-4, 'i') ^ 0x80000000 : dd.read_shift(4, 'i'); break;\n\t\t\t\tcase 'L': switch(s.trim().toUpperCase()) {\n\t\t\t\t\tcase 'Y': case 'T': out[R][C] = true; break;\n\t\t\t\t\tcase 'N': case 'F': out[R][C] = false; break;\n\t\t\t\t\tcase '': case '?': break;\n\t\t\t\t\tdefault: throw new Error(\"DBF Unrecognized L:|\" + s + \"|\");\n\t\t\t\t\t} break;\n\t\t\t\tcase 'M': /* TODO: handle memo files */\n\t\t\t\t\tif(!memo) throw new Error(\"DBF Unexpected MEMO for type \" + ft.toString(16));\n\t\t\t\t\tout[R][C] = \"##MEMO##\" + (l7 ? parseInt(s.trim(), 10): dd.read_shift(4));\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'N':\n\t\t\t\t\ts = s.replace(/\\u0000/g,\"\").trim();\n\t\t\t\t\t// NOTE: dBASE II interprets \" . \" as 0\n\t\t\t\t\tif(s && s != \".\") out[R][C] = +s || 0; break;\n\t\t\t\tcase '@':\n\t\t\t\t\t// NOTE: dBASE specs appear to be incorrect\n\t\t\t\t\tout[R][C] = new Date(dd.read_shift(-8, 'f') - 0x388317533400);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'T': out[R][C] = new Date((dd.read_shift(4) - 0x253D8C) * 0x5265C00 + dd.read_shift(4)); break;\n\t\t\t\tcase 'Y': out[R][C] = dd.read_shift(4,'i')/1e4 + (dd.read_shift(4, 'i')/1e4)*Math.pow(2,32); break;\n\t\t\t\tcase 'O': out[R][C] = -dd.read_shift(-8, 'f'); break;\n\t\t\t\tcase 'B': if(vfp && fields[C].len == 8) { out[R][C] = dd.read_shift(8,'f'); break; }\n\t\t\t\t\t/* falls through */\n\t\t\t\tcase 'G': case 'P': dd.l += fields[C].len; break;\n\t\t\t\tcase '0':\n\t\t\t\t\tif(fields[C].name === '_NullFlags') break;\n\t\t\t\t\t/* falls through */\n\t\t\t\tdefault: throw new Error(\"DBF Unsupported data type \" + fields[C].type);\n\t\t\t}\n\t\t}\n\t}\n\tif(ft != 0x02) if(d.l < d.length && d[d.l++] != 0x1A) throw new Error(\"DBF EOF Marker missing \" + (d.l-1) + \" of \" + d.length + \" \" + d[d.l-1].toString(16));\n\tif(opts && opts.sheetRows) out = out.slice(0, opts.sheetRows);\n\topts.DBF = fields;\n\treturn out;\n}\n\nfunction dbf_to_sheet(buf, opts)/*:Worksheet*/ {\n\tvar o = opts || {};\n\tif(!o.dateNF) o.dateNF = \"yyyymmdd\";\n\tvar ws = aoa_to_sheet(dbf_to_aoa(buf, o), o);\n\tws[\"!cols\"] = o.DBF.map(function(field) { return {\n\t\twch: field.len,\n\t\tDBF: field\n\t};});\n\tdelete o.DBF;\n\treturn ws;\n}\n\nfunction dbf_to_workbook(buf, opts)/*:Workbook*/ {\n\ttry { return sheet_to_workbook(dbf_to_sheet(buf, opts), opts); }\n\tcatch(e) { if(opts && opts.WTF) throw e; }\n\treturn ({SheetNames:[],Sheets:{}});\n}\n\nvar _RLEN = { 'B': 8, 'C': 250, 'L': 1, 'D': 8, '?': 0, '': 0 };\nfunction sheet_to_dbf(ws/*:Worksheet*/, opts/*:WriteOpts*/) {\n\tvar o = opts || {};\n\tif(+o.codepage >= 0) set_cp(+o.codepage);\n\tif(o.type == \"string\") throw new Error(\"Cannot write DBF to JS string\");\n\tvar ba = buf_array();\n\tvar aoa/*:AOA*/ = sheet_to_json(ws, {header:1, raw:true, cellDates:true});\n\tvar headers = aoa[0], data = aoa.slice(1), cols = ws[\"!cols\"] || [];\n\tvar i = 0, j = 0, hcnt = 0, rlen = 1;\n\tfor(i = 0; i < headers.length; ++i) {\n\t\tif(((cols[i]||{}).DBF||{}).name) { headers[i] = cols[i].DBF.name; ++hcnt; continue; }\n\t\tif(headers[i] == null) continue;\n\t\t++hcnt;\n\t\tif(typeof headers[i] === 'number') headers[i] = headers[i].toString(10);\n\t\tif(typeof headers[i] !== 'string') throw new Error(\"DBF Invalid column name \" + headers[i] + \" |\" + (typeof headers[i]) + \"|\");\n\t\tif(headers.indexOf(headers[i]) !== i) for(j=0; j<1024;++j)\n\t\t\tif(headers.indexOf(headers[i] + \"_\" + j) == -1) { headers[i] += \"_\" + j; break; }\n\t}\n\tvar range = safe_decode_range(ws['!ref']);\n\tvar coltypes/*:Array*/ = [];\n\tvar colwidths/*:Array*/ = [];\n\tvar coldecimals/*:Array*/ = [];\n\tfor(i = 0; i <= range.e.c - range.s.c; ++i) {\n\t\tvar guess = '', _guess = '', maxlen = 0;\n\t\tvar col/*:Array*/ = [];\n\t\tfor(j=0; j < data.length; ++j) {\n\t\t\tif(data[j][i] != null) col.push(data[j][i]);\n\t\t}\n\t\tif(col.length == 0 || headers[i] == null) { coltypes[i] = '?'; continue; }\n\t\tfor(j = 0; j < col.length; ++j) {\n\t\t\tswitch(typeof col[j]) {\n\t\t\t\t/* TODO: check if L2 compat is desired */\n\t\t\t\tcase 'number': _guess = 'B'; break;\n\t\t\t\tcase 'string': _guess = 'C'; break;\n\t\t\t\tcase 'boolean': _guess = 'L'; break;\n\t\t\t\tcase 'object': _guess = col[j] instanceof Date ? 'D' : 'C'; break;\n\t\t\t\tdefault: _guess = 'C';\n\t\t\t}\n\t\t\tmaxlen = Math.max(maxlen, String(col[j]).length);\n\t\t\tguess = guess && guess != _guess ? 'C' : _guess;\n\t\t\t//if(guess == 'C') break;\n\t\t}\n\t\tif(maxlen > 250) maxlen = 250;\n\t\t_guess = ((cols[i]||{}).DBF||{}).type;\n\t\t/* TODO: more fine grained control over DBF type resolution */\n\t\tif(_guess == 'C') {\n\t\t\tif(cols[i].DBF.len > maxlen) maxlen = cols[i].DBF.len;\n\t\t}\n\t\tif(guess == 'B' && _guess == 'N') {\n\t\t\tguess = 'N';\n\t\t\tcoldecimals[i] = cols[i].DBF.dec;\n\t\t\tmaxlen = cols[i].DBF.len;\n\t\t}\n\t\tcolwidths[i] = guess == 'C' || _guess == 'N' ? maxlen : (_RLEN[guess] || 0);\n\t\trlen += colwidths[i];\n\t\tcoltypes[i] = guess;\n\t}\n\n\tvar h = ba.next(32);\n\th.write_shift(4, 0x13021130);\n\th.write_shift(4, data.length);\n\th.write_shift(2, 296 + 32 * hcnt);\n\th.write_shift(2, rlen);\n\tfor(i=0; i < 4; ++i) h.write_shift(4, 0);\n\th.write_shift(4, 0x00000000 | ((+dbf_reverse_map[/*::String(*/current_ansi/*::)*/] || 0x03)<<8));\n\n\tfor(i = 0, j = 0; i < headers.length; ++i) {\n\t\tif(headers[i] == null) continue;\n\t\tvar hf = ba.next(32);\n\t\tvar _f = (headers[i].slice(-10) + \"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\").slice(0, 11);\n\t\thf.write_shift(1, _f, \"sbcs\");\n\t\thf.write_shift(1, coltypes[i] == '?' ? 'C' : coltypes[i], \"sbcs\");\n\t\thf.write_shift(4, j);\n\t\thf.write_shift(1, colwidths[i] || _RLEN[coltypes[i]] || 0);\n\t\thf.write_shift(1, coldecimals[i] || 0);\n\t\thf.write_shift(1, 0x02);\n\t\thf.write_shift(4, 0);\n\t\thf.write_shift(1, 0);\n\t\thf.write_shift(4, 0);\n\t\thf.write_shift(4, 0);\n\t\tj += (colwidths[i] || _RLEN[coltypes[i]] || 0);\n\t}\n\n\tvar hb = ba.next(264);\n\thb.write_shift(4, 0x0000000D);\n\tfor(i=0; i < 65;++i) hb.write_shift(4, 0x00000000);\n\tfor(i=0; i < data.length; ++i) {\n\t\tvar rout = ba.next(rlen);\n\t\trout.write_shift(1, 0);\n\t\tfor(j=0; j\":190, \"?\":191, \"{\":223\n\t}/*:any*/);\n\tvar sylk_char_regex = new RegExp(\"\\u001BN(\" + keys(sylk_escapes).join(\"|\").replace(/\\|\\|\\|/, \"|\\\\||\").replace(/([?()+])/g,\"\\\\$1\") + \"|\\\\|)\", \"gm\");\n\tvar sylk_char_fn = function(_, $1){ var o = sylk_escapes[$1]; return typeof o == \"number\" ? _getansi(o) : o; };\n\tvar decode_sylk_char = function($$, $1, $2) { var newcc = (($1.charCodeAt(0) - 0x20)<<4) | ($2.charCodeAt(0) - 0x30); return newcc == 59 ? $$ : _getansi(newcc); };\n\tsylk_escapes[\"|\"] = 254;\n\t/* TODO: find an actual specification */\n\tfunction sylk_to_aoa(d/*:RawData*/, opts)/*:[AOA, Worksheet]*/ {\n\t\tswitch(opts.type) {\n\t\t\tcase 'base64': return sylk_to_aoa_str(Base64_decode(d), opts);\n\t\t\tcase 'binary': return sylk_to_aoa_str(d, opts);\n\t\t\tcase 'buffer': return sylk_to_aoa_str(has_buf && Buffer.isBuffer(d) ? d.toString('binary') : a2s(d), opts);\n\t\t\tcase 'array': return sylk_to_aoa_str(cc2str(d), opts);\n\t\t}\n\t\tthrow new Error(\"Unrecognized type \" + opts.type);\n\t}\n\tfunction sylk_to_aoa_str(str/*:string*/, opts)/*:[AOA, Worksheet]*/ {\n\t\tvar records = str.split(/[\\n\\r]+/), R = -1, C = -1, ri = 0, rj = 0, arr/*:AOA*/ = [];\n\t\tvar formats/*:Array*/ = [];\n\t\tvar next_cell_format/*:string|null*/ = null;\n\t\tvar sht = {}, rowinfo/*:Array*/ = [], colinfo/*:Array*/ = [], cw/*:Array*/ = [];\n\t\tvar Mval = 0, j;\n\t\tif(+opts.codepage >= 0) set_cp(+opts.codepage);\n\t\tfor (; ri !== records.length; ++ri) {\n\t\t\tMval = 0;\n\t\t\tvar rstr=records[ri].trim().replace(/\\x1B([\\x20-\\x2F])([\\x30-\\x3F])/g, decode_sylk_char).replace(sylk_char_regex, sylk_char_fn);\n\t\t\tvar record=rstr.replace(/;;/g, \"\\u0000\").split(\";\").map(function(x) { return x.replace(/\\u0000/g, \";\"); });\n\t\t\tvar RT=record[0], val;\n\t\t\tif(rstr.length > 0) switch(RT) {\n\t\t\tcase 'ID': break; /* header */\n\t\t\tcase 'E': break; /* EOF */\n\t\t\tcase 'B': break; /* dimensions */\n\t\t\tcase 'O': break; /* options? */\n\t\t\tcase 'W': break; /* window? */\n\t\t\tcase 'P':\n\t\t\t\tif(record[1].charAt(0) == 'P')\n\t\t\t\t\tformats.push(rstr.slice(3).replace(/;;/g, \";\"));\n\t\t\t\tbreak;\n\t\t\tcase 'C':\n\t\t\tvar C_seen_K = false, C_seen_X = false, C_seen_S = false, C_seen_E = false, _R = -1, _C = -1;\n\t\t\tfor(rj=1; rj -1 && arr[_R][_C];\n\t\t\t\tif(!shrbase || !shrbase[1]) throw new Error(\"SYLK shared formula cannot find base\");\n\t\t\t\tarr[R][C][1] = shift_formula_str(shrbase[1], {r: R - _R, c: C - _C});\n\t\t\t}\n\t\t\tbreak;\n\t\t\tcase 'F':\n\t\t\tvar F_seen = 0;\n\t\t\tfor(rj=1; rj 0) { rowinfo[R].hpt = Mval; rowinfo[R].hpx = pt2px(Mval); }\n\t\t\t\t\telse if(Mval === 0) rowinfo[R].hidden = true;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault: if(opts && opts.WTF) throw new Error(\"SYLK bad record \" + rstr);\n\t\t\t}\n\t\t\tif(F_seen < 1) next_cell_format = null; break;\n\t\t\tdefault: if(opts && opts.WTF) throw new Error(\"SYLK bad record \" + rstr);\n\t\t\t}\n\t\t}\n\t\tif(rowinfo.length > 0) sht['!rows'] = rowinfo;\n\t\tif(colinfo.length > 0) sht['!cols'] = colinfo;\n\t\tif(opts && opts.sheetRows) arr = arr.slice(0, opts.sheetRows);\n\t\treturn [arr, sht];\n\t}\n\n\tfunction sylk_to_sheet(d/*:RawData*/, opts)/*:Worksheet*/ {\n\t\tvar aoasht = sylk_to_aoa(d, opts);\n\t\tvar aoa = aoasht[0], ws = aoasht[1];\n\t\tvar o = aoa_to_sheet(aoa, opts);\n\t\tkeys(ws).forEach(function(k) { o[k] = ws[k]; });\n\t\treturn o;\n\t}\n\n\tfunction sylk_to_workbook(d/*:RawData*/, opts)/*:Workbook*/ { return sheet_to_workbook(sylk_to_sheet(d, opts), opts); }\n\n\tfunction write_ws_cell_sylk(cell/*:Cell*/, ws/*:Worksheet*/, R/*:number*/, C/*:number*//*::, opts*/)/*:string*/ {\n\t\tvar o = \"C;Y\" + (R+1) + \";X\" + (C+1) + \";K\";\n\t\tswitch(cell.t) {\n\t\t\tcase 'n':\n\t\t\t\to += (cell.v||0);\n\t\t\t\tif(cell.f && !cell.F) o += \";E\" + a1_to_rc(cell.f, {r:R, c:C}); break;\n\t\t\tcase 'b': o += cell.v ? \"TRUE\" : \"FALSE\"; break;\n\t\t\tcase 'e': o += cell.w || cell.v; break;\n\t\t\tcase 'd': o += '\"' + (cell.w || cell.v) + '\"'; break;\n\t\t\tcase 's': o += '\"' + cell.v.replace(/\"/g,\"\").replace(/;/g, \";;\") + '\"'; break;\n\t\t}\n\t\treturn o;\n\t}\n\n\tfunction write_ws_cols_sylk(out, cols) {\n\t\tcols.forEach(function(col, i) {\n\t\t\tvar rec = \"F;W\" + (i+1) + \" \" + (i+1) + \" \";\n\t\t\tif(col.hidden) rec += \"0\";\n\t\t\telse {\n\t\t\t\tif(typeof col.width == 'number' && !col.wpx) col.wpx = width2px(col.width);\n\t\t\t\tif(typeof col.wpx == 'number' && !col.wch) col.wch = px2char(col.wpx);\n\t\t\t\tif(typeof col.wch == 'number') rec += Math.round(col.wch);\n\t\t\t}\n\t\t\tif(rec.charAt(rec.length - 1) != \" \") out.push(rec);\n\t\t});\n\t}\n\n\tfunction write_ws_rows_sylk(out/*:Array*/, rows/*:Array*/) {\n\t\trows.forEach(function(row, i) {\n\t\t\tvar rec = \"F;\";\n\t\t\tif(row.hidden) rec += \"M0;\";\n\t\t\telse if(row.hpt) rec += \"M\" + 20 * row.hpt + \";\";\n\t\t\telse if(row.hpx) rec += \"M\" + 20 * px2pt(row.hpx) + \";\";\n\t\t\tif(rec.length > 2) out.push(rec + \"R\" + (i+1));\n\t\t});\n\t}\n\n\tfunction sheet_to_sylk(ws/*:Worksheet*/, opts/*:?any*/)/*:string*/ {\n\t\tvar preamble/*:Array*/ = [\"ID;PWXL;N;E\"], o/*:Array*/ = [];\n\t\tvar r = safe_decode_range(ws['!ref']), cell/*:Cell*/;\n\t\tvar dense = Array.isArray(ws);\n\t\tvar RS = \"\\r\\n\";\n\n\t\tpreamble.push(\"P;PGeneral\");\n\t\tpreamble.push(\"F;P0;DG0G8;M255\");\n\t\tif(ws['!cols']) write_ws_cols_sylk(preamble, ws['!cols']);\n\t\tif(ws['!rows']) write_ws_rows_sylk(preamble, ws['!rows']);\n\n\t\tpreamble.push(\"B;Y\" + (r.e.r - r.s.r + 1) + \";X\" + (r.e.c - r.s.c + 1) + \";D\" + [r.s.c,r.s.r,r.e.c,r.e.r].join(\" \"));\n\t\tfor(var R = r.s.r; R <= r.e.r; ++R) {\n\t\t\tfor(var C = r.s.c; C <= r.e.c; ++C) {\n\t\t\t\tvar coord = encode_cell({r:R,c:C});\n\t\t\t\tcell = dense ? (ws[R]||[])[C]: ws[coord];\n\t\t\t\tif(!cell || (cell.v == null && (!cell.f || cell.F))) continue;\n\t\t\t\to.push(write_ws_cell_sylk(cell, ws, R, C, opts));\n\t\t\t}\n\t\t}\n\t\treturn preamble.join(RS) + RS + o.join(RS) + RS + \"E\" + RS;\n\t}\n\n\treturn {\n\t\tto_workbook: sylk_to_workbook,\n\t\tto_sheet: sylk_to_sheet,\n\t\tfrom_sheet: sheet_to_sylk\n\t};\n})();\n\nvar DIF = /*#__PURE__*/(function() {\n\tfunction dif_to_aoa(d/*:RawData*/, opts)/*:AOA*/ {\n\t\tswitch(opts.type) {\n\t\t\tcase 'base64': return dif_to_aoa_str(Base64_decode(d), opts);\n\t\t\tcase 'binary': return dif_to_aoa_str(d, opts);\n\t\t\tcase 'buffer': return dif_to_aoa_str(has_buf && Buffer.isBuffer(d) ? d.toString('binary') : a2s(d), opts);\n\t\t\tcase 'array': return dif_to_aoa_str(cc2str(d), opts);\n\t\t}\n\t\tthrow new Error(\"Unrecognized type \" + opts.type);\n\t}\n\tfunction dif_to_aoa_str(str/*:string*/, opts)/*:AOA*/ {\n\t\tvar records = str.split('\\n'), R = -1, C = -1, ri = 0, arr/*:AOA*/ = [];\n\t\tfor (; ri !== records.length; ++ri) {\n\t\t\tif (records[ri].trim() === 'BOT') { arr[++R] = []; C = 0; continue; }\n\t\t\tif (R < 0) continue;\n\t\t\tvar metadata = records[ri].trim().split(\",\");\n\t\t\tvar type = metadata[0], value = metadata[1];\n\t\t\t++ri;\n\t\t\tvar data = records[ri] || \"\";\n\t\t\twhile(((data.match(/[\"]/g)||[]).length & 1) && ri < records.length - 1) data += \"\\n\" + records[++ri];\n\t\t\tdata = data.trim();\n\t\t\tswitch (+type) {\n\t\t\t\tcase -1:\n\t\t\t\t\tif (data === 'BOT') { arr[++R] = []; C = 0; continue; }\n\t\t\t\t\telse if (data !== 'EOD') throw new Error(\"Unrecognized DIF special command \" + data);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 0:\n\t\t\t\t\tif(data === 'TRUE') arr[R][C] = true;\n\t\t\t\t\telse if(data === 'FALSE') arr[R][C] = false;\n\t\t\t\t\telse if(!isNaN(fuzzynum(value))) arr[R][C] = fuzzynum(value);\n\t\t\t\t\telse if(!isNaN(fuzzydate(value).getDate())) arr[R][C] = parseDate(value);\n\t\t\t\t\telse arr[R][C] = value;\n\t\t\t\t\t++C; break;\n\t\t\t\tcase 1:\n\t\t\t\t\tdata = data.slice(1,data.length-1);\n\t\t\t\t\tdata = data.replace(/\"\"/g, '\"');\n\t\t\t\t\tif(DIF_XL && data && data.match(/^=\".*\"$/)) data = data.slice(2, -1);\n\t\t\t\t\tarr[R][C++] = data !== '' ? data : null;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (data === 'EOD') break;\n\t\t}\n\t\tif(opts && opts.sheetRows) arr = arr.slice(0, opts.sheetRows);\n\t\treturn arr;\n\t}\n\n\tfunction dif_to_sheet(str/*:string*/, opts)/*:Worksheet*/ { return aoa_to_sheet(dif_to_aoa(str, opts), opts); }\n\tfunction dif_to_workbook(str/*:string*/, opts)/*:Workbook*/ { return sheet_to_workbook(dif_to_sheet(str, opts), opts); }\n\n\tvar sheet_to_dif = /*#__PURE__*/(function() {\n\t\tvar push_field = function pf(o/*:Array*/, topic/*:string*/, v/*:number*/, n/*:number*/, s/*:string*/) {\n\t\t\to.push(topic);\n\t\t\to.push(v + \",\" + n);\n\t\t\to.push('\"' + s.replace(/\"/g,'\"\"') + '\"');\n\t\t};\n\t\tvar push_value = function po(o/*:Array*/, type/*:number*/, v/*:any*/, s/*:string*/) {\n\t\t\to.push(type + \",\" + v);\n\t\t\to.push(type == 1 ? '\"' + s.replace(/\"/g,'\"\"') + '\"' : s);\n\t\t};\n\t\treturn function sheet_to_dif(ws/*:Worksheet*//*::, opts:?any*/)/*:string*/ {\n\t\t\tvar o/*:Array*/ = [];\n\t\t\tvar r = safe_decode_range(ws['!ref']), cell/*:Cell*/;\n\t\t\tvar dense = Array.isArray(ws);\n\t\t\tpush_field(o, \"TABLE\", 0, 1, \"sheetjs\");\n\t\t\tpush_field(o, \"VECTORS\", 0, r.e.r - r.s.r + 1,\"\");\n\t\t\tpush_field(o, \"TUPLES\", 0, r.e.c - r.s.c + 1,\"\");\n\t\t\tpush_field(o, \"DATA\", 0, 0,\"\");\n\t\t\tfor(var R = r.s.r; R <= r.e.r; ++R) {\n\t\t\t\tpush_value(o, -1, 0, \"BOT\");\n\t\t\t\tfor(var C = r.s.c; C <= r.e.c; ++C) {\n\t\t\t\t\tvar coord = encode_cell({r:R,c:C});\n\t\t\t\t\tcell = dense ? (ws[R]||[])[C] : ws[coord];\n\t\t\t\t\tif(!cell) { push_value(o, 1, 0, \"\"); continue;}\n\t\t\t\t\tswitch(cell.t) {\n\t\t\t\t\t\tcase 'n':\n\t\t\t\t\t\t\tvar val = DIF_XL ? cell.w : cell.v;\n\t\t\t\t\t\t\tif(!val && cell.v != null) val = cell.v;\n\t\t\t\t\t\t\tif(val == null) {\n\t\t\t\t\t\t\t\tif(DIF_XL && cell.f && !cell.F) push_value(o, 1, 0, \"=\" + cell.f);\n\t\t\t\t\t\t\t\telse push_value(o, 1, 0, \"\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse push_value(o, 0, val, \"V\");\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'b':\n\t\t\t\t\t\t\tpush_value(o, 0, cell.v ? 1 : 0, cell.v ? \"TRUE\" : \"FALSE\");\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 's':\n\t\t\t\t\t\t\tpush_value(o, 1, 0, (!DIF_XL || isNaN(cell.v)) ? cell.v : '=\"' + cell.v + '\"');\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'd':\n\t\t\t\t\t\t\tif(!cell.w) cell.w = SSF_format(cell.z || table_fmt[14], datenum(parseDate(cell.v)));\n\t\t\t\t\t\t\tif(DIF_XL) push_value(o, 0, cell.w, \"V\");\n\t\t\t\t\t\t\telse push_value(o, 1, 0, cell.w);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault: push_value(o, 1, 0, \"\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tpush_value(o, -1, 0, \"EOD\");\n\t\t\tvar RS = \"\\r\\n\";\n\t\t\tvar oo = o.join(RS);\n\t\t\t//while((oo.length & 0x7F) != 0) oo += \"\\0\";\n\t\t\treturn oo;\n\t\t};\n\t})();\n\treturn {\n\t\tto_workbook: dif_to_workbook,\n\t\tto_sheet: dif_to_sheet,\n\t\tfrom_sheet: sheet_to_dif\n\t};\n})();\n\nvar ETH = /*#__PURE__*/(function() {\n\tfunction decode(s/*:string*/)/*:string*/ { return s.replace(/\\\\b/g,\"\\\\\").replace(/\\\\c/g,\":\").replace(/\\\\n/g,\"\\n\"); }\n\tfunction encode(s/*:string*/)/*:string*/ { return s.replace(/\\\\/g, \"\\\\b\").replace(/:/g, \"\\\\c\").replace(/\\n/g,\"\\\\n\"); }\n\n\tfunction eth_to_aoa(str/*:string*/, opts)/*:AOA*/ {\n\t\tvar records = str.split('\\n'), R = -1, C = -1, ri = 0, arr/*:AOA*/ = [];\n\t\tfor (; ri !== records.length; ++ri) {\n\t\t\tvar record = records[ri].trim().split(\":\");\n\t\t\tif(record[0] !== 'cell') continue;\n\t\t\tvar addr = decode_cell(record[1]);\n\t\t\tif(arr.length <= addr.r) for(R = arr.length; R <= addr.r; ++R) if(!arr[R]) arr[R] = [];\n\t\t\tR = addr.r; C = addr.c;\n\t\t\tswitch(record[2]) {\n\t\t\t\tcase 't': arr[R][C] = decode(record[3]); break;\n\t\t\t\tcase 'v': arr[R][C] = +record[3]; break;\n\t\t\t\tcase 'vtf': var _f = record[record.length - 1];\n\t\t\t\t\t/* falls through */\n\t\t\t\tcase 'vtc':\n\t\t\t\t\tswitch(record[3]) {\n\t\t\t\t\t\tcase 'nl': arr[R][C] = +record[4] ? true : false; break;\n\t\t\t\t\t\tdefault: arr[R][C] = +record[4]; break;\n\t\t\t\t\t}\n\t\t\t\t\tif(record[2] == 'vtf') arr[R][C] = [arr[R][C], _f];\n\t\t\t}\n\t\t}\n\t\tif(opts && opts.sheetRows) arr = arr.slice(0, opts.sheetRows);\n\t\treturn arr;\n\t}\n\n\tfunction eth_to_sheet(d/*:string*/, opts)/*:Worksheet*/ { return aoa_to_sheet(eth_to_aoa(d, opts), opts); }\n\tfunction eth_to_workbook(d/*:string*/, opts)/*:Workbook*/ { return sheet_to_workbook(eth_to_sheet(d, opts), opts); }\n\n\tvar header = [\n\t\t\"socialcalc:version:1.5\",\n\t\t\"MIME-Version: 1.0\",\n\t\t\"Content-Type: multipart/mixed; boundary=SocialCalcSpreadsheetControlSave\"\n\t].join(\"\\n\");\n\n\tvar sep = [\n\t\t\"--SocialCalcSpreadsheetControlSave\",\n\t\t\"Content-type: text/plain; charset=UTF-8\"\n\t].join(\"\\n\") + \"\\n\";\n\n\t/* TODO: the other parts */\n\tvar meta = [\n\t\t\"# SocialCalc Spreadsheet Control Save\",\n\t\t\"part:sheet\"\n\t].join(\"\\n\");\n\n\tvar end = \"--SocialCalcSpreadsheetControlSave--\";\n\n\tfunction sheet_to_eth_data(ws/*:Worksheet*/)/*:string*/ {\n\t\tif(!ws || !ws['!ref']) return \"\";\n\t\tvar o/*:Array*/ = [], oo/*:Array*/ = [], cell, coord = \"\";\n\t\tvar r = decode_range(ws['!ref']);\n\t\tvar dense = Array.isArray(ws);\n\t\tfor(var R = r.s.r; R <= r.e.r; ++R) {\n\t\t\tfor(var C = r.s.c; C <= r.e.c; ++C) {\n\t\t\t\tcoord = encode_cell({r:R,c:C});\n\t\t\t\tcell = dense ? (ws[R]||[])[C] : ws[coord];\n\t\t\t\tif(!cell || cell.v == null || cell.t === 'z') continue;\n\t\t\t\too = [\"cell\", coord, 't'];\n\t\t\t\tswitch(cell.t) {\n\t\t\t\t\tcase 's': case 'str': oo.push(encode(cell.v)); break;\n\t\t\t\t\tcase 'n':\n\t\t\t\t\t\tif(!cell.f) { oo[2]='v'; oo[3]=cell.v; }\n\t\t\t\t\t\telse { oo[2]='vtf'; oo[3]='n'; oo[4]=cell.v; oo[5]=encode(cell.f); }\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'b':\n\t\t\t\t\t\too[2] = 'vt'+(cell.f?'f':'c'); oo[3]='nl'; oo[4]=cell.v?\"1\":\"0\";\n\t\t\t\t\t\too[5] = encode(cell.f||(cell.v?'TRUE':'FALSE'));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'd':\n\t\t\t\t\t\tvar t = datenum(parseDate(cell.v));\n\t\t\t\t\t\too[2] = 'vtc'; oo[3] = 'nd'; oo[4] = \"\"+t;\n\t\t\t\t\t\too[5] = cell.w || SSF_format(cell.z || table_fmt[14], t);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'e': continue;\n\t\t\t\t}\n\t\t\t\to.push(oo.join(\":\"));\n\t\t\t}\n\t\t}\n\t\to.push(\"sheet:c:\" + (r.e.c-r.s.c+1) + \":r:\" + (r.e.r-r.s.r+1) + \":tvf:1\");\n\t\to.push(\"valueformat:1:text-wiki\");\n\t\t//o.push(\"copiedfrom:\" + ws['!ref']); // clipboard only\n\t\treturn o.join(\"\\n\");\n\t}\n\n\tfunction sheet_to_eth(ws/*:Worksheet*//*::, opts:?any*/)/*:string*/ {\n\t\treturn [header, sep, meta, sep, sheet_to_eth_data(ws), end].join(\"\\n\");\n\t\t// return [\"version:1.5\", sheet_to_eth_data(ws)].join(\"\\n\"); // clipboard form\n\t}\n\n\treturn {\n\t\tto_workbook: eth_to_workbook,\n\t\tto_sheet: eth_to_sheet,\n\t\tfrom_sheet: sheet_to_eth\n\t};\n})();\n\nvar PRN = /*#__PURE__*/(function() {\n\tfunction set_text_arr(data/*:string*/, arr/*:AOA*/, R/*:number*/, C/*:number*/, o/*:any*/) {\n\t\tif(o.raw) arr[R][C] = data;\n\t\telse if(data === \"\"){/* empty */}\n\t\telse if(data === 'TRUE') arr[R][C] = true;\n\t\telse if(data === 'FALSE') arr[R][C] = false;\n\t\telse if(!isNaN(fuzzynum(data))) arr[R][C] = fuzzynum(data);\n\t\telse if(!isNaN(fuzzydate(data).getDate())) arr[R][C] = parseDate(data);\n\t\telse arr[R][C] = data;\n\t}\n\n\tfunction prn_to_aoa_str(f/*:string*/, opts)/*:AOA*/ {\n\t\tvar o = opts || {};\n\t\tvar arr/*:AOA*/ = ([]/*:any*/);\n\t\tif(!f || f.length === 0) return arr;\n\t\tvar lines = f.split(/[\\r\\n]/);\n\t\tvar L = lines.length - 1;\n\t\twhile(L >= 0 && lines[L].length === 0) --L;\n\t\tvar start = 10, idx = 0;\n\t\tvar R = 0;\n\t\tfor(; R <= L; ++R) {\n\t\t\tidx = lines[R].indexOf(\" \");\n\t\t\tif(idx == -1) idx = lines[R].length; else idx++;\n\t\t\tstart = Math.max(start, idx);\n\t\t}\n\t\tfor(R = 0; R <= L; ++R) {\n\t\t\tarr[R] = [];\n\t\t\t/* TODO: confirm that widths are always 10 */\n\t\t\tvar C = 0;\n\t\t\tset_text_arr(lines[R].slice(0, start).trim(), arr, R, C, o);\n\t\t\tfor(C = 1; C <= (lines[R].length - start)/10 + 1; ++C)\n\t\t\t\tset_text_arr(lines[R].slice(start+(C-1)*10,start+C*10).trim(),arr,R,C,o);\n\t\t}\n\t\tif(o.sheetRows) arr = arr.slice(0, o.sheetRows);\n\t\treturn arr;\n\t}\n\n\t// List of accepted CSV separators\n\tvar guess_seps = {\n\t\t/*::[*/0x2C/*::]*/: ',',\n\t\t/*::[*/0x09/*::]*/: \"\\t\",\n\t\t/*::[*/0x3B/*::]*/: ';',\n\t\t/*::[*/0x7C/*::]*/: '|'\n\t};\n\n\t// CSV separator weights to be used in case of equal numbers\n\tvar guess_sep_weights = {\n\t\t/*::[*/0x2C/*::]*/: 3,\n\t\t/*::[*/0x09/*::]*/: 2,\n\t\t/*::[*/0x3B/*::]*/: 1,\n\t\t/*::[*/0x7C/*::]*/: 0\n\t};\n\n\tfunction guess_sep(str) {\n\t\tvar cnt = {}, instr = false, end = 0, cc = 0;\n\t\tfor(;end < str.length;++end) {\n\t\t\tif((cc=str.charCodeAt(end)) == 0x22) instr = !instr;\n\t\t\telse if(!instr && cc in guess_seps) cnt[cc] = (cnt[cc]||0)+1;\n\t\t}\n\n\t\tcc = [];\n\t\tfor(end in cnt) if ( Object.prototype.hasOwnProperty.call(cnt, end) ) {\n\t\t\tcc.push([ cnt[end], end ]);\n\t\t}\n\n\t\tif ( !cc.length ) {\n\t\t\tcnt = guess_sep_weights;\n\t\t\tfor(end in cnt) if ( Object.prototype.hasOwnProperty.call(cnt, end) ) {\n\t\t\t\tcc.push([ cnt[end], end ]);\n\t\t\t}\n\t\t}\n\n\t\tcc.sort(function(a, b) { return a[0] - b[0] || guess_sep_weights[a[1]] - guess_sep_weights[b[1]]; });\n\n\t\treturn guess_seps[cc.pop()[1]] || 0x2C;\n\t}\n\n\tfunction dsv_to_sheet_str(str/*:string*/, opts)/*:Worksheet*/ {\n\t\tvar o = opts || {};\n\t\tvar sep = \"\";\n\t\tif(DENSE != null && o.dense == null) o.dense = DENSE;\n\t\tvar ws/*:Worksheet*/ = o.dense ? ([]/*:any*/) : ({}/*:any*/);\n\t\tvar range/*:Range*/ = ({s: {c:0, r:0}, e: {c:0, r:0}}/*:any*/);\n\n\t\tif(str.slice(0,4) == \"sep=\") {\n\t\t\t// If the line ends in \\r\\n\n\t\t\tif(str.charCodeAt(5) == 13 && str.charCodeAt(6) == 10 ) {\n\t\t\t\tsep = str.charAt(4); str = str.slice(7);\n\t\t\t}\n\t\t\t// If line ends in \\r OR \\n\n\t\t\telse if(str.charCodeAt(5) == 13 || str.charCodeAt(5) == 10 ) {\n\t\t\t\tsep = str.charAt(4); str = str.slice(6);\n\t\t\t}\n\t\t\telse sep = guess_sep(str.slice(0,1024));\n\t\t}\n\t\telse if(o && o.FS) sep = o.FS;\n\t\telse sep = guess_sep(str.slice(0,1024));\n\t\tvar R = 0, C = 0, v = 0;\n\t\tvar start = 0, end = 0, sepcc = sep.charCodeAt(0), instr = false, cc=0, startcc=str.charCodeAt(0);\n\t\tstr = str.replace(/\\r\\n/mg, \"\\n\");\n\t\tvar _re/*:?RegExp*/ = o.dateNF != null ? dateNF_regex(o.dateNF) : null;\n\t\tfunction finish_cell() {\n\t\t\tvar s = str.slice(start, end);\n\t\t\tvar cell = ({}/*:any*/);\n\t\t\tif(s.charAt(0) == '\"' && s.charAt(s.length - 1) == '\"') s = s.slice(1,-1).replace(/\"\"/g,'\"');\n\t\t\tif(s.length === 0) cell.t = 'z';\n\t\t\telse if(o.raw) { cell.t = 's'; cell.v = s; }\n\t\t\telse if(s.trim().length === 0) { cell.t = 's'; cell.v = s; }\n\t\t\telse if(s.charCodeAt(0) == 0x3D) {\n\t\t\t\tif(s.charCodeAt(1) == 0x22 && s.charCodeAt(s.length - 1) == 0x22) { cell.t = 's'; cell.v = s.slice(2,-1).replace(/\"\"/g,'\"'); }\n\t\t\t\telse if(fuzzyfmla(s)) { cell.t = 'n'; cell.f = s.slice(1); }\n\t\t\t\telse { cell.t = 's'; cell.v = s; } }\n\t\t\telse if(s == \"TRUE\") { cell.t = 'b'; cell.v = true; }\n\t\t\telse if(s == \"FALSE\") { cell.t = 'b'; cell.v = false; }\n\t\t\telse if(!isNaN(v = fuzzynum(s))) { cell.t = 'n'; if(o.cellText !== false) cell.w = s; cell.v = v; }\n\t\t\telse if(!isNaN(fuzzydate(s).getDate()) || _re && s.match(_re)) {\n\t\t\t\tcell.z = o.dateNF || table_fmt[14];\n\t\t\t\tvar k = 0;\n\t\t\t\tif(_re && s.match(_re)){ s=dateNF_fix(s, o.dateNF, (s.match(_re)||[])); k=1; }\n\t\t\t\tif(o.cellDates) { cell.t = 'd'; cell.v = parseDate(s, k); }\n\t\t\t\telse { cell.t = 'n'; cell.v = datenum(parseDate(s, k)); }\n\t\t\t\tif(o.cellText !== false) cell.w = SSF_format(cell.z, cell.v instanceof Date ? datenum(cell.v):cell.v);\n\t\t\t\tif(!o.cellNF) delete cell.z;\n\t\t\t} else {\n\t\t\t\tcell.t = 's';\n\t\t\t\tcell.v = s;\n\t\t\t}\n\t\t\tif(cell.t == 'z'){}\n\t\t\telse if(o.dense) { if(!ws[R]) ws[R] = []; ws[R][C] = cell; }\n\t\t\telse ws[encode_cell({c:C,r:R})] = cell;\n\t\t\tstart = end+1; startcc = str.charCodeAt(start);\n\t\t\tif(range.e.c < C) range.e.c = C;\n\t\t\tif(range.e.r < R) range.e.r = R;\n\t\t\tif(cc == sepcc) ++C; else { C = 0; ++R; if(o.sheetRows && o.sheetRows <= R) return true; }\n\t\t}\n\t\touter: for(;end < str.length;++end) switch((cc=str.charCodeAt(end))) {\n\t\t\tcase 0x22: if(startcc === 0x22) instr = !instr; break;\n\t\t\tcase sepcc: case 0x0a: case 0x0d: if(!instr && finish_cell()) break outer; break;\n\t\t\tdefault: break;\n\t\t}\n\t\tif(end - start > 0) finish_cell();\n\n\t\tws['!ref'] = encode_range(range);\n\t\treturn ws;\n\t}\n\n\tfunction prn_to_sheet_str(str/*:string*/, opts)/*:Worksheet*/ {\n\t\tif(!(opts && opts.PRN)) return dsv_to_sheet_str(str, opts);\n\t\tif(opts.FS) return dsv_to_sheet_str(str, opts);\n\t\tif(str.slice(0,4) == \"sep=\") return dsv_to_sheet_str(str, opts);\n\t\tif(str.indexOf(\"\\t\") >= 0 || str.indexOf(\",\") >= 0 || str.indexOf(\";\") >= 0) return dsv_to_sheet_str(str, opts);\n\t\treturn aoa_to_sheet(prn_to_aoa_str(str, opts), opts);\n\t}\n\n\tfunction prn_to_sheet(d/*:RawData*/, opts)/*:Worksheet*/ {\n\t\tvar str = \"\", bytes = opts.type == 'string' ? [0,0,0,0] : firstbyte(d, opts);\n\t\tswitch(opts.type) {\n\t\t\tcase 'base64': str = Base64_decode(d); break;\n\t\t\tcase 'binary': str = d; break;\n\t\t\tcase 'buffer':\n\t\t\t\tif(opts.codepage == 65001) str = d.toString('utf8'); // TODO: test if buf\n\t\t\t\telse if(opts.codepage && typeof $cptable !== 'undefined') str = $cptable.utils.decode(opts.codepage, d);\n\t\t\t\telse str = has_buf && Buffer.isBuffer(d) ? d.toString('binary') : a2s(d);\n\t\t\t\tbreak;\n\t\t\tcase 'array': str = cc2str(d); break;\n\t\t\tcase 'string': str = d; break;\n\t\t\tdefault: throw new Error(\"Unrecognized type \" + opts.type);\n\t\t}\n\t\tif(bytes[0] == 0xEF && bytes[1] == 0xBB && bytes[2] == 0xBF) str = utf8read(str.slice(3));\n\t\telse if(opts.type != 'string' && opts.type != 'buffer' && opts.codepage == 65001) str = utf8read(str);\n\t\telse if((opts.type == 'binary') && typeof $cptable !== 'undefined' && opts.codepage) str = $cptable.utils.decode(opts.codepage, $cptable.utils.encode(28591,str));\n\t\tif(str.slice(0,19) == \"socialcalc:version:\") return ETH.to_sheet(opts.type == 'string' ? str : utf8read(str), opts);\n\t\treturn prn_to_sheet_str(str, opts);\n\t}\n\n\tfunction prn_to_workbook(d/*:RawData*/, opts)/*:Workbook*/ { return sheet_to_workbook(prn_to_sheet(d, opts), opts); }\n\n\tfunction sheet_to_prn(ws/*:Worksheet*//*::, opts:?any*/)/*:string*/ {\n\t\tvar o/*:Array*/ = [];\n\t\tvar r = safe_decode_range(ws['!ref']), cell/*:Cell*/;\n\t\tvar dense = Array.isArray(ws);\n\t\tfor(var R = r.s.r; R <= r.e.r; ++R) {\n\t\t\tvar oo/*:Array*/ = [];\n\t\t\tfor(var C = r.s.c; C <= r.e.c; ++C) {\n\t\t\t\tvar coord = encode_cell({r:R,c:C});\n\t\t\t\tcell = dense ? (ws[R]||[])[C] : ws[coord];\n\t\t\t\tif(!cell || cell.v == null) { oo.push(\" \"); continue; }\n\t\t\t\tvar w = (cell.w || (format_cell(cell), cell.w) || \"\").slice(0,10);\n\t\t\t\twhile(w.length < 10) w += \" \";\n\t\t\t\too.push(w + (C === 0 ? \" \" : \"\"));\n\t\t\t}\n\t\t\to.push(oo.join(\"\"));\n\t\t}\n\t\treturn o.join(\"\\n\");\n\t}\n\n\treturn {\n\t\tto_workbook: prn_to_workbook,\n\t\tto_sheet: prn_to_sheet,\n\t\tfrom_sheet: sheet_to_prn\n\t};\n})();\n\n/* Excel defaults to SYLK but warns if data is not valid */\nfunction read_wb_ID(d, opts) {\n\tvar o = opts || {}, OLD_WTF = !!o.WTF; o.WTF = true;\n\ttry {\n\t\tvar out = SYLK.to_workbook(d, o);\n\t\to.WTF = OLD_WTF;\n\t\treturn out;\n\t} catch(e) {\n\t\to.WTF = OLD_WTF;\n\t\tif(!e.message.match(/SYLK bad record ID/) && OLD_WTF) throw e;\n\t\treturn PRN.to_workbook(d, opts);\n\t}\n}\n\nvar WK_ = /*#__PURE__*/(function() {\n\tfunction lotushopper(data, cb/*:RecordHopperCB*/, opts/*:any*/) {\n\t\tif(!data) return;\n\t\tprep_blob(data, data.l || 0);\n\t\tvar Enum = opts.Enum || WK1Enum;\n\t\twhile(data.l < data.length) {\n\t\t\tvar RT = data.read_shift(2);\n\t\t\tvar R = Enum[RT] || Enum[0xFFFF];\n\t\t\tvar length = data.read_shift(2);\n\t\t\tvar tgt = data.l + length;\n\t\t\tvar d = R.f && R.f(data, length, opts);\n\t\t\tdata.l = tgt;\n\t\t\tif(cb(d, R, RT)) return;\n\t\t}\n\t}\n\n\tfunction lotus_to_workbook(d/*:RawData*/, opts) {\n\t\tswitch(opts.type) {\n\t\t\tcase 'base64': return lotus_to_workbook_buf(s2a(Base64_decode(d)), opts);\n\t\t\tcase 'binary': return lotus_to_workbook_buf(s2a(d), opts);\n\t\t\tcase 'buffer':\n\t\t\tcase 'array': return lotus_to_workbook_buf(d, opts);\n\t\t}\n\t\tthrow \"Unsupported type \" + opts.type;\n\t}\n\n\tfunction lotus_to_workbook_buf(d, opts)/*:Workbook*/ {\n\t\tif(!d) return d;\n\t\tvar o = opts || {};\n\t\tif(DENSE != null && o.dense == null) o.dense = DENSE;\n\t\tvar s/*:Worksheet*/ = ((o.dense ? [] : {})/*:any*/), n = \"Sheet1\", next_n = \"\", sidx = 0;\n\t\tvar sheets = {}, snames = [], realnames = [];\n\n\t\tvar refguess = {s: {r:0, c:0}, e: {r:0, c:0} };\n\t\tvar sheetRows = o.sheetRows || 0;\n\n\t\tif(d[2] == 0x00) {\n\t\t\tif(d[3] == 0x08 || d[3] == 0x09) {\n\t\t\t\tif(d.length >= 16 && d[14] == 0x05 && d[15] === 0x6c) throw new Error(\"Unsupported Works 3 for Mac file\");\n\t\t\t}\n\t\t}\n\n\t\tif(d[2] == 0x02) {\n\t\t\to.Enum = WK1Enum;\n\t\t\tlotushopper(d, function(val, R, RT) { switch(RT) {\n\t\t\t\tcase 0x00: /* BOF */\n\t\t\t\t\to.vers = val;\n\t\t\t\t\tif(val >= 0x1000) o.qpro = true;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 0x06: refguess = val; break; /* RANGE */\n\t\t\t\tcase 0xCC: if(val) next_n = val; break; /* SHEETNAMECS */\n\t\t\t\tcase 0xDE: next_n = val; break; /* SHEETNAMELP */\n\t\t\t\tcase 0x0F: /* LABEL */\n\t\t\t\tcase 0x33: /* STRING */\n\t\t\t\t\tif(!o.qpro) val[1].v = val[1].v.slice(1);\n\t\t\t\t\t/* falls through */\n\t\t\t\tcase 0x0D: /* INTEGER */\n\t\t\t\tcase 0x0E: /* NUMBER */\n\t\t\t\tcase 0x10: /* FORMULA */\n\t\t\t\t\t/* TODO: actual translation of the format code */\n\t\t\t\t\tif(RT == 0x0E && (val[2] & 0x70) == 0x70 && (val[2] & 0x0F) > 1 && (val[2] & 0x0F) < 15) {\n\t\t\t\t\t\tval[1].z = o.dateNF || table_fmt[14];\n\t\t\t\t\t\tif(o.cellDates) { val[1].t = 'd'; val[1].v = numdate(val[1].v); }\n\t\t\t\t\t}\n\n\t\t\t\t\tif(o.qpro) {\n\t\t\t\t\t\tif(val[3] > sidx) {\n\t\t\t\t\t\t\ts[\"!ref\"] = encode_range(refguess);\n\t\t\t\t\t\t\tsheets[n] = s;\n\t\t\t\t\t\t\tsnames.push(n);\n\t\t\t\t\t\t\ts = (o.dense ? [] : {});\n\t\t\t\t\t\t\trefguess = {s: {r:0, c:0}, e: {r:0, c:0} };\n\t\t\t\t\t\t\tsidx = val[3]; n = next_n || \"Sheet\" + (sidx + 1); next_n = \"\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tvar tmpcell = o.dense ? (s[val[0].r]||[])[val[0].c] : s[encode_cell(val[0])];\n\t\t\t\t\tif(tmpcell) {\n\t\t\t\t\t\ttmpcell.t = val[1].t; tmpcell.v = val[1].v;\n\t\t\t\t\t\tif(val[1].z != null) tmpcell.z = val[1].z;\n\t\t\t\t\t\tif(val[1].f != null) tmpcell.f = val[1].f;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif(o.dense) {\n\t\t\t\t\t\tif(!s[val[0].r]) s[val[0].r] = [];\n\t\t\t\t\t\ts[val[0].r][val[0].c] = val[1];\n\t\t\t\t\t} else s[encode_cell(val[0])] = val[1];\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t}}, o);\n\t\t} else if(d[2] == 0x1A || d[2] == 0x0E) {\n\t\t\to.Enum = WK3Enum;\n\t\t\tif(d[2] == 0x0E) { o.qpro = true; d.l = 0; }\n\t\t\tlotushopper(d, function(val, R, RT) { switch(RT) {\n\t\t\t\tcase 0xCC: n = val; break; /* SHEETNAMECS */\n\t\t\t\tcase 0x16: /* LABEL16 */\n\t\t\t\t\tval[1].v = val[1].v.slice(1);\n\t\t\t\t\t/* falls through */\n\t\t\t\tcase 0x17: /* NUMBER17 */\n\t\t\t\tcase 0x18: /* NUMBER18 */\n\t\t\t\tcase 0x19: /* FORMULA19 */\n\t\t\t\tcase 0x25: /* NUMBER25 */\n\t\t\t\tcase 0x27: /* NUMBER27 */\n\t\t\t\tcase 0x28: /* FORMULA28 */\n\t\t\t\t\tif(val[3] > sidx) {\n\t\t\t\t\t\ts[\"!ref\"] = encode_range(refguess);\n\t\t\t\t\t\tsheets[n] = s;\n\t\t\t\t\t\tsnames.push(n);\n\t\t\t\t\t\ts = (o.dense ? [] : {});\n\t\t\t\t\t\trefguess = {s: {r:0, c:0}, e: {r:0, c:0} };\n\t\t\t\t\t\tsidx = val[3]; n = \"Sheet\" + (sidx + 1);\n\t\t\t\t\t}\n\t\t\t\t\tif(sheetRows > 0 && val[0].r >= sheetRows) break;\n\t\t\t\t\tif(o.dense) {\n\t\t\t\t\t\tif(!s[val[0].r]) s[val[0].r] = [];\n\t\t\t\t\t\ts[val[0].r][val[0].c] = val[1];\n\t\t\t\t\t} else s[encode_cell(val[0])] = val[1];\n\t\t\t\t\tif(refguess.e.c < val[0].c) refguess.e.c = val[0].c;\n\t\t\t\t\tif(refguess.e.r < val[0].r) refguess.e.r = val[0].r;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 0x1B: /* XFORMAT */\n\t\t\t\t\tif(val[0x36b0]) realnames[val[0x36b0][0]] = val[0x36b0][1];\n\t\t\t\t\tbreak;\n\t\t\t\tcase 0x0601: /* SHEETINFOQP */\n\t\t\t\t\trealnames[val[0]] = val[1]; if(val[0] == sidx) n = val[1]; break;\n\t\t\t\tdefault: break;\n\t\t\t}}, o);\n\t\t} else throw new Error(\"Unrecognized LOTUS BOF \" + d[2]);\n\t\ts[\"!ref\"] = encode_range(refguess);\n\t\tsheets[next_n || n] = s;\n\t\tsnames.push(next_n || n);\n\t\tif(!realnames.length) return { SheetNames: snames, Sheets: sheets };\n\t\tvar osheets = {}, rnames = [];\n\t\t/* TODO: verify no collisions */\n\t\tfor(var i = 0; i < realnames.length; ++i) if(sheets[snames[i]]) {\n\t\t\trnames.push(realnames[i] || snames[i]);\n\t\t\tosheets[realnames[i]] = sheets[realnames[i]] || sheets[snames[i]];\n\t\t} else {\n\t\t\trnames.push(realnames[i]);\n\t\t\tosheets[realnames[i]] = ({ \"!ref\": \"A1\" });\n\t\t}\n\t\treturn { SheetNames: rnames, Sheets: osheets };\n\t}\n\n\tfunction sheet_to_wk1(ws/*:Worksheet*/, opts/*:WriteOpts*/) {\n\t\tvar o = opts || {};\n\t\tif(+o.codepage >= 0) set_cp(+o.codepage);\n\t\tif(o.type == \"string\") throw new Error(\"Cannot write WK1 to JS string\");\n\t\tvar ba = buf_array();\n\t\tvar range = safe_decode_range(ws[\"!ref\"]);\n\t\tvar dense = Array.isArray(ws);\n\t\tvar cols = [];\n\n\t\twrite_biff_rec(ba, 0x00, write_BOF_WK1(0x0406));\n\t\twrite_biff_rec(ba, 0x06, write_RANGE(range));\n\t\tvar max_R = Math.min(range.e.r, 8191);\n\t\tfor(var R = range.s.r; R <= max_R; ++R) {\n\t\t\tvar rr = encode_row(R);\n\t\t\tfor(var C = range.s.c; C <= range.e.c; ++C) {\n\t\t\t\tif(R === range.s.r) cols[C] = encode_col(C);\n\t\t\t\tvar ref = cols[C] + rr;\n\t\t\t\tvar cell = dense ? (ws[R]||[])[C] : ws[ref];\n\t\t\t\tif(!cell || cell.t == \"z\") continue;\n\t\t\t\t/* TODO: formula records */\n\t\t\t\tif(cell.t == \"n\") {\n\t\t\t\t\tif((cell.v|0)==cell.v && cell.v >= -32768 && cell.v <= 32767) write_biff_rec(ba, 0x0d, write_INTEGER(R, C, cell.v));\n\t\t\t\t\telse write_biff_rec(ba, 0x0e, write_NUMBER(R, C, cell.v));\n\t\t\t\t} else {\n\t\t\t\t\tvar str = format_cell(cell);\n\t\t\t\t\twrite_biff_rec(ba, 0x0F, write_LABEL(R, C, str.slice(0, 239)));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\twrite_biff_rec(ba, 0x01);\n\t\treturn ba.end();\n\t}\n\n\tfunction book_to_wk3(wb/*:Workbook*/, opts/*:WriteOpts*/) {\n\t\tvar o = opts || {};\n\t\tif(+o.codepage >= 0) set_cp(+o.codepage);\n\t\tif(o.type == \"string\") throw new Error(\"Cannot write WK3 to JS string\");\n\t\tvar ba = buf_array();\n\n\t\twrite_biff_rec(ba, 0x00, write_BOF_WK3(wb));\n\n\t\tfor(var i = 0, cnt = 0; i < wb.SheetNames.length; ++i) if((wb.Sheets[wb.SheetNames[i]] || {})[\"!ref\"]) write_biff_rec(ba, 0x1b, write_XFORMAT_SHEETNAME(wb.SheetNames[i], cnt++));\n\n\t\tvar wsidx = 0;\n\t\tfor(i = 0; i < wb.SheetNames.length; ++i) {\n\t\t\tvar ws = wb.Sheets[wb.SheetNames[i]];\n\t\t\tif(!ws || !ws[\"!ref\"]) continue;\n\t\t\tvar range = safe_decode_range(ws[\"!ref\"]);\n\t\t\tvar dense = Array.isArray(ws);\n\t\t\tvar cols = [];\n\t\t\tvar max_R = Math.min(range.e.r, 8191);\n\t\t\tfor(var R = range.s.r; R <= max_R; ++R) {\n\t\t\t\tvar rr = encode_row(R);\n\t\t\t\tfor(var C = range.s.c; C <= range.e.c; ++C) {\n\t\t\t\t\tif(R === range.s.r) cols[C] = encode_col(C);\n\t\t\t\t\tvar ref = cols[C] + rr;\n\t\t\t\t\tvar cell = dense ? (ws[R]||[])[C] : ws[ref];\n\t\t\t\t\tif(!cell || cell.t == \"z\") continue;\n\t\t\t\t\t/* TODO: FORMULA19 NUMBER18 records */\n\t\t\t\t\tif(cell.t == \"n\") {\n\t\t\t\t\t\twrite_biff_rec(ba, 0x17, write_NUMBER_17(R, C, wsidx, cell.v));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvar str = format_cell(cell);\n\t\t\t\t\t\t/* TODO: max len? */\n\t\t\t\t\t\twrite_biff_rec(ba, 0x16, write_LABEL_16(R, C, wsidx, str.slice(0, 239)));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t++wsidx;\n\t\t}\n\n\t\twrite_biff_rec(ba, 0x01);\n\t\treturn ba.end();\n\t}\n\n\n\tfunction write_BOF_WK1(v/*:number*/) {\n\t\tvar out = new_buf(2);\n\t\tout.write_shift(2, v);\n\t\treturn out;\n\t}\n\n\tfunction write_BOF_WK3(wb/*:Workbook*/) {\n\t\tvar out = new_buf(26);\n\t\tout.write_shift(2, 0x1000);\n\t\tout.write_shift(2, 0x0004);\n\t\tout.write_shift(4, 0x0000);\n\t\tvar rows = 0, cols = 0, wscnt = 0;\n\t\tfor(var i = 0; i < wb.SheetNames.length; ++i) {\n\t\t\tvar name = wb.SheetNames[i];\n\t\t\tvar ws = wb.Sheets[name];\n\t\t\tif(!ws || !ws[\"!ref\"]) continue;\n\t\t\t++wscnt;\n\t\t\tvar range = decode_range(ws[\"!ref\"]);\n\t\t\tif(rows < range.e.r) rows = range.e.r;\n\t\t\tif(cols < range.e.c) cols = range.e.c;\n\t\t}\n\t\tif(rows > 8191) rows = 8191;\n\t\tout.write_shift(2, rows);\n\t\tout.write_shift(1, wscnt);\n\t\tout.write_shift(1, cols);\n\t\tout.write_shift(2, 0x00);\n\t\tout.write_shift(2, 0x00);\n\t\tout.write_shift(1, 0x01);\n\t\tout.write_shift(1, 0x02);\n\t\tout.write_shift(4, 0);\n\t\tout.write_shift(4, 0);\n\t\treturn out;\n\t}\n\n\tfunction parse_RANGE(blob, length, opts) {\n\t\tvar o = {s:{c:0,r:0},e:{c:0,r:0}};\n\t\tif(length == 8 && opts.qpro) {\n\t\t\to.s.c = blob.read_shift(1);\n\t\t\tblob.l++;\n\t\t\to.s.r = blob.read_shift(2);\n\t\t\to.e.c = blob.read_shift(1);\n\t\t\tblob.l++;\n\t\t\to.e.r = blob.read_shift(2);\n\t\t\treturn o;\n\t\t}\n\t\to.s.c = blob.read_shift(2);\n\t\to.s.r = blob.read_shift(2);\n\t\tif(length == 12 && opts.qpro) blob.l += 2;\n\t\to.e.c = blob.read_shift(2);\n\t\to.e.r = blob.read_shift(2);\n\t\tif(length == 12 && opts.qpro) blob.l += 2;\n\t\tif(o.s.c == 0xFFFF) o.s.c = o.e.c = o.s.r = o.e.r = 0;\n\t\treturn o;\n\t}\n\tfunction write_RANGE(range) {\n\t\tvar out = new_buf(8);\n\t\tout.write_shift(2, range.s.c);\n\t\tout.write_shift(2, range.s.r);\n\t\tout.write_shift(2, range.e.c);\n\t\tout.write_shift(2, range.e.r);\n\t\treturn out;\n\t}\n\n\tfunction parse_cell(blob, length, opts) {\n\t\tvar o = [{c:0,r:0}, {t:'n',v:0}, 0, 0];\n\t\tif(opts.qpro && opts.vers != 0x5120) {\n\t\t\to[0].c = blob.read_shift(1);\n\t\t\to[3] = blob.read_shift(1);\n\t\t\to[0].r = blob.read_shift(2);\n\t\t\tblob.l+=2;\n\t\t} else {\n\t\t\to[2] = blob.read_shift(1);\n\t\t\to[0].c = blob.read_shift(2); o[0].r = blob.read_shift(2);\n\t\t}\n\t\treturn o;\n\t}\n\n\tfunction parse_LABEL(blob, length, opts) {\n\t\tvar tgt = blob.l + length;\n\t\tvar o = parse_cell(blob, length, opts);\n\t\to[1].t = 's';\n\t\tif(opts.vers == 0x5120) {\n\t\t\tblob.l++;\n\t\t\tvar len = blob.read_shift(1);\n\t\t\to[1].v = blob.read_shift(len, 'utf8');\n\t\t\treturn o;\n\t\t}\n\t\tif(opts.qpro) blob.l++;\n\t\to[1].v = blob.read_shift(tgt - blob.l, 'cstr');\n\t\treturn o;\n\t}\n\tfunction write_LABEL(R, C, s) {\n\t\t/* TODO: encoding */\n\t\tvar o = new_buf(7 + s.length);\n\t\to.write_shift(1, 0xFF);\n\t\to.write_shift(2, C);\n\t\to.write_shift(2, R);\n\t\to.write_shift(1, 0x27); // ??\n\t\tfor(var i = 0; i < o.length; ++i) {\n\t\t\tvar cc = s.charCodeAt(i);\n\t\t\to.write_shift(1, cc >= 0x80 ? 0x5F : cc);\n\t\t}\n\t\to.write_shift(1, 0);\n\t\treturn o;\n\t}\n\n\tfunction parse_INTEGER(blob, length, opts) {\n\t\tvar o = parse_cell(blob, length, opts);\n\t\to[1].v = blob.read_shift(2, 'i');\n\t\treturn o;\n\t}\n\tfunction write_INTEGER(R, C, v) {\n\t\tvar o = new_buf(7);\n\t\to.write_shift(1, 0xFF);\n\t\to.write_shift(2, C);\n\t\to.write_shift(2, R);\n\t\to.write_shift(2, v, 'i');\n\t\treturn o;\n\t}\n\n\tfunction parse_NUMBER(blob, length, opts) {\n\t\tvar o = parse_cell(blob, length, opts);\n\t\to[1].v = blob.read_shift(8, 'f');\n\t\treturn o;\n\t}\n\tfunction write_NUMBER(R, C, v) {\n\t\tvar o = new_buf(13);\n\t\to.write_shift(1, 0xFF);\n\t\to.write_shift(2, C);\n\t\to.write_shift(2, R);\n\t\to.write_shift(8, v, 'f');\n\t\treturn o;\n\t}\n\n\tfunction parse_FORMULA(blob, length, opts) {\n\t\tvar tgt = blob.l + length;\n\t\tvar o = parse_cell(blob, length, opts);\n\t\t/* TODO: formula */\n\t\to[1].v = blob.read_shift(8, 'f');\n\t\tif(opts.qpro) blob.l = tgt;\n\t\telse {\n\t\t\tvar flen = blob.read_shift(2);\n\t\t\twk1_fmla_to_csf(blob.slice(blob.l, blob.l + flen), o);\n\t\t\tblob.l += flen;\n\t\t}\n\t\treturn o;\n\t}\n\n\tfunction wk1_parse_rc(B, V, col) {\n\t\tvar rel = V & 0x8000;\n\t\tV &= ~0x8000;\n\t\tV = (rel ? B : 0) + ((V >= 0x2000) ? V - 0x4000 : V);\n\t\treturn (rel ? \"\" : \"$\") + (col ? encode_col(V) : encode_row(V));\n\t}\n\t/* var oprec = [\n\t\t8, 8, 8, 8, 8, 8, 8, 8, 6, 4, 4, 5, 5, 7, 3, 3,\n\t\t3, 3, 3, 3, 1, 1, 2, 6, 8, 8, 8, 8, 8, 8, 8, 8\n\t]; */\n\t/* TODO: flesh out */\n\tvar FuncTab = {\n\t\t0x33: [\"FALSE\", 0],\n\t\t0x34: [\"TRUE\", 0],\n\t\t0x46: [\"LEN\", 1],\n\t\t0x50: [\"SUM\", 69],\n\t\t0x51: [\"AVERAGEA\", 69],\n\t\t0x52: [\"COUNTA\", 69],\n\t\t0x53: [\"MINA\", 69],\n\t\t0x54: [\"MAXA\", 69],\n\t\t0x6F: [\"T\", 1]\n\t};\n\tvar BinOpTab = [\n\t\t \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", // eslint-disable-line no-mixed-spaces-and-tabs\n\t\t \"\", \"+\", \"-\", \"*\", \"/\", \"^\", \"=\", \"<>\", // eslint-disable-line no-mixed-spaces-and-tabs\n\t\t\"<=\", \">=\", \"<\", \">\", \"\", \"\", \"\", \"\", // eslint-disable-line no-mixed-spaces-and-tabs\n\t\t \"&\", \"\", \"\", \"\", \"\", \"\", \"\", \"\" // eslint-disable-line no-mixed-spaces-and-tabs\n\t];\n\n\tfunction wk1_fmla_to_csf(blob, o) {\n\t\tprep_blob(blob, 0);\n\t\tvar out = [], argc = 0, R = \"\", C = \"\", argL = \"\", argR = \"\";\n\t\twhile(blob.l < blob.length) {\n\t\t\tvar cc = blob[blob.l++];\n\t\t\tswitch(cc) {\n\t\t\t\tcase 0x00: out.push(blob.read_shift(8, 'f')); break;\n\t\t\t\tcase 0x01: {\n\t\t\t\t\tC = wk1_parse_rc(o[0].c, blob.read_shift(2), true);\n\t\t\t\t\tR = wk1_parse_rc(o[0].r, blob.read_shift(2), false);\n\t\t\t\t\tout.push(C + R);\n\t\t\t\t} break;\n\t\t\t\tcase 0x02: {\n\t\t\t\t\tvar c = wk1_parse_rc(o[0].c, blob.read_shift(2), true);\n\t\t\t\t\tvar r = wk1_parse_rc(o[0].r, blob.read_shift(2), false);\n\t\t\t\t\tC = wk1_parse_rc(o[0].c, blob.read_shift(2), true);\n\t\t\t\t\tR = wk1_parse_rc(o[0].r, blob.read_shift(2), false);\n\t\t\t\t\tout.push(c + r + \":\" + C + R);\n\t\t\t\t} break;\n\t\t\t\tcase 0x03:\n\t\t\t\t\tif(blob.l < blob.length) { console.error(\"WK1 premature formula end\"); return; }\n\t\t\t\t\tbreak;\n\t\t\t\tcase 0x04: out.push(\"(\" + out.pop() + \")\"); break;\n\t\t\t\tcase 0x05: out.push(blob.read_shift(2)); break;\n\t\t\t\tcase 0x06: {\n\t\t\t\t\t/* TODO: text encoding */\n\t\t\t\t\tvar Z = \"\"; while((cc = blob[blob.l++])) Z += String.fromCharCode(cc);\n\t\t\t\t\tout.push('\"' + Z.replace(/\"/g, '\"\"') + '\"');\n\t\t\t\t} break;\n\n\t\t\t\tcase 0x08: out.push(\"-\" + out.pop()); break;\n\t\t\t\tcase 0x17: out.push(\"+\" + out.pop()); break;\n\t\t\t\tcase 0x16: out.push(\"NOT(\" + out.pop() + \")\"); break;\n\n\t\t\t\tcase 0x14: case 0x15: {\n\t\t\t\t\targR = out.pop(); argL = out.pop();\n\t\t\t\t\tout.push([\"AND\", \"OR\"][cc - 0x14] + \"(\" + argL + \",\" + argR + \")\");\n\t\t\t\t} break;\n\n\t\t\t\tdefault:\n\t\t\t\t\tif(cc < 0x20 && BinOpTab[cc]) {\n\t\t\t\t\t\targR = out.pop(); argL = out.pop();\n\t\t\t\t\t\tout.push(argL + BinOpTab[cc] + argR);\n\t\t\t\t\t} else if(FuncTab[cc]) {\n\t\t\t\t\t\targc = FuncTab[cc][1];\n\t\t\t\t\t\tif(argc == 69) argc = blob[blob.l++];\n\t\t\t\t\t\tif(argc > out.length) { console.error(\"WK1 bad formula parse 0x\" + cc.toString(16) + \":|\" + out.join(\"|\") + \"|\"); return; }\n\t\t\t\t\t\tvar args = out.slice(-argc);\n\t\t\t\t\t\tout.length -= argc;\n\t\t\t\t\t\tout.push(FuncTab[cc][0] + \"(\" + args.join(\",\") + \")\");\n\t\t\t\t\t}\n\t\t\t\t\telse if(cc <= 0x07) return console.error(\"WK1 invalid opcode \" + cc.toString(16));\n\t\t\t\t\telse if(cc <= 0x18) return console.error(\"WK1 unsupported op \" + cc.toString(16));\n\t\t\t\t\telse if(cc <= 0x1E) return console.error(\"WK1 invalid opcode \" + cc.toString(16));\n\t\t\t\t\telse if(cc <= 0x73) return console.error(\"WK1 unsupported function opcode \" + cc.toString(16));\n\t\t\t\t\t// possible future functions ??\n\t\t\t\t\telse return console.error(\"WK1 unrecognized opcode \" + cc.toString(16));\n\t\t\t}\n\t\t}\n\t\tif(out.length == 1) o[1].f = \"\" + out[0];\n\t\telse console.error(\"WK1 bad formula parse |\" + out.join(\"|\") + \"|\");\n\t}\n\n\n\tfunction parse_cell_3(blob/*::, length*/) {\n\t\tvar o = [{c:0,r:0}, {t:'n',v:0}, 0];\n\t\to[0].r = blob.read_shift(2); o[3] = blob[blob.l++]; o[0].c = blob[blob.l++];\n\t\treturn o;\n\t}\n\n\tfunction parse_LABEL_16(blob, length) {\n\t\tvar o = parse_cell_3(blob, length);\n\t\to[1].t = 's';\n\t\to[1].v = blob.read_shift(length - 4, 'cstr');\n\t\treturn o;\n\t}\n\tfunction write_LABEL_16(R, C, wsidx, s) {\n\t\t/* TODO: encoding */\n\t\tvar o = new_buf(6 + s.length);\n\t\to.write_shift(2, R);\n\t\to.write_shift(1, wsidx);\n\t\to.write_shift(1, C);\n\t\to.write_shift(1, 0x27);\n\t\tfor(var i = 0; i < s.length; ++i) {\n\t\t\tvar cc = s.charCodeAt(i);\n\t\t\to.write_shift(1, cc >= 0x80 ? 0x5F : cc);\n\t\t}\n\t\to.write_shift(1, 0);\n\t\treturn o;\n\t}\n\n\tfunction parse_NUMBER_18(blob, length) {\n\t\tvar o = parse_cell_3(blob, length);\n\t\to[1].v = blob.read_shift(2);\n\t\tvar v = o[1].v >> 1;\n\t\tif(o[1].v & 0x1) {\n\t\t\tswitch(v & 0x07) {\n\t\t\t\tcase 0: v = (v >> 3) * 5000; break;\n\t\t\t\tcase 1: v = (v >> 3) * 500; break;\n\t\t\t\tcase 2: v = (v >> 3) / 20; break;\n\t\t\t\tcase 3: v = (v >> 3) / 200; break;\n\t\t\t\tcase 4: v = (v >> 3) / 2000; break;\n\t\t\t\tcase 5: v = (v >> 3) / 20000; break;\n\t\t\t\tcase 6: v = (v >> 3) / 16; break;\n\t\t\t\tcase 7: v = (v >> 3) / 64; break;\n\t\t\t}\n\t\t}\n\t\to[1].v = v;\n\t\treturn o;\n\t}\n\n\tfunction parse_NUMBER_17(blob, length) {\n\t\tvar o = parse_cell_3(blob, length);\n\t\tvar v1 = blob.read_shift(4);\n\t\tvar v2 = blob.read_shift(4);\n\t\tvar e = blob.read_shift(2);\n\t\tif(e == 0xFFFF) {\n\t\t\tif(v1 === 0 && v2 === 0xC0000000) { o[1].t = \"e\"; o[1].v = 0x0F; } // ERR -> #VALUE!\n\t\t\telse if(v1 === 0 && v2 === 0xD0000000) { o[1].t = \"e\"; o[1].v = 0x2A; } // NA -> #N/A\n\t\t\telse o[1].v = 0;\n\t\t\treturn o;\n\t\t}\n\t\tvar s = e & 0x8000; e = (e&0x7FFF) - 16446;\n\t\to[1].v = (1 - s*2) * (v2 * Math.pow(2, e+32) + v1 * Math.pow(2, e));\n\t\treturn o;\n\t}\n\tfunction write_NUMBER_17(R, C, wsidx, v) {\n\t\tvar o = new_buf(14);\n\t\to.write_shift(2, R);\n\t\to.write_shift(1, wsidx);\n\t\to.write_shift(1, C);\n\t\tif(v == 0) {\n\t\t\to.write_shift(4, 0);\n\t\t\to.write_shift(4, 0);\n\t\t\to.write_shift(2, 0xFFFF);\n\t\t\treturn o;\n\t\t}\n\t\tvar s = 0, e = 0, v1 = 0, v2 = 0;\n\t\tif(v < 0) { s = 1; v = -v; }\n\t\te = Math.log2(v) | 0;\n\t\tv /= Math.pow(2, e-31);\n\t\tv2 = (v)>>>0;\n\t\tif((v2&0x80000000) == 0) { v/=2; ++e; v2 = v >>> 0; }\n\t\tv -= v2;\n\t\tv2 |= 0x80000000;\n\t\tv2 >>>= 0;\n\t\tv *= Math.pow(2, 32);\n\t\tv1 = v>>>0;\n\t\to.write_shift(4, v1);\n\t\to.write_shift(4, v2);\n\t\te += 0x3FFF + (s ? 0x8000 : 0);\n\t\to.write_shift(2, e);\n\t\treturn o;\n\t}\n\n\tfunction parse_FORMULA_19(blob, length) {\n\t\tvar o = parse_NUMBER_17(blob, 14);\n\t\tblob.l += length - 14; /* TODO: WK3 formula */\n\t\treturn o;\n\t}\n\n\tfunction parse_NUMBER_25(blob, length) {\n\t\tvar o = parse_cell_3(blob, length);\n\t\tvar v1 = blob.read_shift(4);\n\t\to[1].v = v1 >> 6;\n\t\treturn o;\n\t}\n\n\tfunction parse_NUMBER_27(blob, length) {\n\t\tvar o = parse_cell_3(blob, length);\n\t\tvar v1 = blob.read_shift(8,'f');\n\t\to[1].v = v1;\n\t\treturn o;\n\t}\n\n\tfunction parse_FORMULA_28(blob, length) {\n\t\tvar o = parse_NUMBER_27(blob, 14);\n\t\tblob.l += length - 10; /* TODO: formula */\n\t\treturn o;\n\t}\n\n\tfunction parse_SHEETNAMECS(blob, length) {\n\t\treturn blob[blob.l + length - 1] == 0 ? blob.read_shift(length, 'cstr') : \"\";\n\t}\n\n\tfunction parse_SHEETNAMELP(blob, length) {\n\t\tvar len = blob[blob.l++];\n\t\tif(len > length - 1) len = length - 1;\n\t\tvar o = \"\"; while(o.length < len) o += String.fromCharCode(blob[blob.l++]);\n\t\treturn o;\n\t}\n\n\tfunction parse_SHEETINFOQP(blob, length, opts) {\n\t\tif(!opts.qpro || length < 21) return;\n\t\tvar id = blob.read_shift(1);\n\t\tblob.l += 17;\n\t\tblob.l += 1; //var len = blob.read_shift(1);\n\t\tblob.l += 2;\n\t\tvar nm = blob.read_shift(length - 21, 'cstr');\n\t\treturn [id, nm];\n\t}\n\n\tfunction parse_XFORMAT(blob, length) {\n\t\tvar o = {}, tgt = blob.l + length;\n\t\twhile(blob.l < tgt) {\n\t\t\tvar dt = blob.read_shift(2);\n\t\t\tif(dt == 0x36b0) {\n\t\t\t\to[dt] = [0, \"\"];\n\t\t\t\to[dt][0] = blob.read_shift(2);\n\t\t\t\twhile(blob[blob.l]) { o[dt][1] += String.fromCharCode(blob[blob.l]); blob.l++; } blob.l++;\n\t\t\t}\n\t\t\t// TODO: 0x3a99 ??\n\t\t}\n\t\treturn o;\n\t}\n\tfunction write_XFORMAT_SHEETNAME(name, wsidx) {\n\t\tvar out = new_buf(5 + name.length);\n\t\tout.write_shift(2, 0x36b0);\n\t\tout.write_shift(2, wsidx);\n\t\tfor(var i = 0; i < name.length; ++i) {\n\t\t\tvar cc = name.charCodeAt(i);\n\t\t\tout[out.l++] = cc > 0x7F ? 0x5F : cc;\n\t\t}\n\t\tout[out.l++] = 0;\n\t\treturn out;\n\t}\n\n\tvar WK1Enum = {\n\t\t/*::[*/0x0000/*::]*/: { n:\"BOF\", f:parseuint16 },\n\t\t/*::[*/0x0001/*::]*/: { n:\"EOF\" },\n\t\t/*::[*/0x0002/*::]*/: { n:\"CALCMODE\" },\n\t\t/*::[*/0x0003/*::]*/: { n:\"CALCORDER\" },\n\t\t/*::[*/0x0004/*::]*/: { n:\"SPLIT\" },\n\t\t/*::[*/0x0005/*::]*/: { n:\"SYNC\" },\n\t\t/*::[*/0x0006/*::]*/: { n:\"RANGE\", f:parse_RANGE },\n\t\t/*::[*/0x0007/*::]*/: { n:\"WINDOW1\" },\n\t\t/*::[*/0x0008/*::]*/: { n:\"COLW1\" },\n\t\t/*::[*/0x0009/*::]*/: { n:\"WINTWO\" },\n\t\t/*::[*/0x000A/*::]*/: { n:\"COLW2\" },\n\t\t/*::[*/0x000B/*::]*/: { n:\"NAME\" },\n\t\t/*::[*/0x000C/*::]*/: { n:\"BLANK\" },\n\t\t/*::[*/0x000D/*::]*/: { n:\"INTEGER\", f:parse_INTEGER },\n\t\t/*::[*/0x000E/*::]*/: { n:\"NUMBER\", f:parse_NUMBER },\n\t\t/*::[*/0x000F/*::]*/: { n:\"LABEL\", f:parse_LABEL },\n\t\t/*::[*/0x0010/*::]*/: { n:\"FORMULA\", f:parse_FORMULA },\n\t\t/*::[*/0x0018/*::]*/: { n:\"TABLE\" },\n\t\t/*::[*/0x0019/*::]*/: { n:\"ORANGE\" },\n\t\t/*::[*/0x001A/*::]*/: { n:\"PRANGE\" },\n\t\t/*::[*/0x001B/*::]*/: { n:\"SRANGE\" },\n\t\t/*::[*/0x001C/*::]*/: { n:\"FRANGE\" },\n\t\t/*::[*/0x001D/*::]*/: { n:\"KRANGE1\" },\n\t\t/*::[*/0x0020/*::]*/: { n:\"HRANGE\" },\n\t\t/*::[*/0x0023/*::]*/: { n:\"KRANGE2\" },\n\t\t/*::[*/0x0024/*::]*/: { n:\"PROTEC\" },\n\t\t/*::[*/0x0025/*::]*/: { n:\"FOOTER\" },\n\t\t/*::[*/0x0026/*::]*/: { n:\"HEADER\" },\n\t\t/*::[*/0x0027/*::]*/: { n:\"SETUP\" },\n\t\t/*::[*/0x0028/*::]*/: { n:\"MARGINS\" },\n\t\t/*::[*/0x0029/*::]*/: { n:\"LABELFMT\" },\n\t\t/*::[*/0x002A/*::]*/: { n:\"TITLES\" },\n\t\t/*::[*/0x002B/*::]*/: { n:\"SHEETJS\" },\n\t\t/*::[*/0x002D/*::]*/: { n:\"GRAPH\" },\n\t\t/*::[*/0x002E/*::]*/: { n:\"NGRAPH\" },\n\t\t/*::[*/0x002F/*::]*/: { n:\"CALCCOUNT\" },\n\t\t/*::[*/0x0030/*::]*/: { n:\"UNFORMATTED\" },\n\t\t/*::[*/0x0031/*::]*/: { n:\"CURSORW12\" },\n\t\t/*::[*/0x0032/*::]*/: { n:\"WINDOW\" },\n\t\t/*::[*/0x0033/*::]*/: { n:\"STRING\", f:parse_LABEL },\n\t\t/*::[*/0x0037/*::]*/: { n:\"PASSWORD\" },\n\t\t/*::[*/0x0038/*::]*/: { n:\"LOCKED\" },\n\t\t/*::[*/0x003C/*::]*/: { n:\"QUERY\" },\n\t\t/*::[*/0x003D/*::]*/: { n:\"QUERYNAME\" },\n\t\t/*::[*/0x003E/*::]*/: { n:\"PRINT\" },\n\t\t/*::[*/0x003F/*::]*/: { n:\"PRINTNAME\" },\n\t\t/*::[*/0x0040/*::]*/: { n:\"GRAPH2\" },\n\t\t/*::[*/0x0041/*::]*/: { n:\"GRAPHNAME\" },\n\t\t/*::[*/0x0042/*::]*/: { n:\"ZOOM\" },\n\t\t/*::[*/0x0043/*::]*/: { n:\"SYMSPLIT\" },\n\t\t/*::[*/0x0044/*::]*/: { n:\"NSROWS\" },\n\t\t/*::[*/0x0045/*::]*/: { n:\"NSCOLS\" },\n\t\t/*::[*/0x0046/*::]*/: { n:\"RULER\" },\n\t\t/*::[*/0x0047/*::]*/: { n:\"NNAME\" },\n\t\t/*::[*/0x0048/*::]*/: { n:\"ACOMM\" },\n\t\t/*::[*/0x0049/*::]*/: { n:\"AMACRO\" },\n\t\t/*::[*/0x004A/*::]*/: { n:\"PARSE\" },\n\t\t/*::[*/0x0066/*::]*/: { n:\"PRANGES??\" },\n\t\t/*::[*/0x0067/*::]*/: { n:\"RRANGES??\" },\n\t\t/*::[*/0x0068/*::]*/: { n:\"FNAME??\" },\n\t\t/*::[*/0x0069/*::]*/: { n:\"MRANGES??\" },\n\t\t/*::[*/0x00CC/*::]*/: { n:\"SHEETNAMECS\", f:parse_SHEETNAMECS },\n\t\t/*::[*/0x00DE/*::]*/: { n:\"SHEETNAMELP\", f:parse_SHEETNAMELP },\n\t\t/*::[*/0xFFFF/*::]*/: { n:\"\" }\n\t};\n\n\tvar WK3Enum = {\n\t\t/*::[*/0x0000/*::]*/: { n:\"BOF\" },\n\t\t/*::[*/0x0001/*::]*/: { n:\"EOF\" },\n\t\t/*::[*/0x0002/*::]*/: { n:\"PASSWORD\" },\n\t\t/*::[*/0x0003/*::]*/: { n:\"CALCSET\" },\n\t\t/*::[*/0x0004/*::]*/: { n:\"WINDOWSET\" },\n\t\t/*::[*/0x0005/*::]*/: { n:\"SHEETCELLPTR\" },\n\t\t/*::[*/0x0006/*::]*/: { n:\"SHEETLAYOUT\" },\n\t\t/*::[*/0x0007/*::]*/: { n:\"COLUMNWIDTH\" },\n\t\t/*::[*/0x0008/*::]*/: { n:\"HIDDENCOLUMN\" },\n\t\t/*::[*/0x0009/*::]*/: { n:\"USERRANGE\" },\n\t\t/*::[*/0x000A/*::]*/: { n:\"SYSTEMRANGE\" },\n\t\t/*::[*/0x000B/*::]*/: { n:\"ZEROFORCE\" },\n\t\t/*::[*/0x000C/*::]*/: { n:\"SORTKEYDIR\" },\n\t\t/*::[*/0x000D/*::]*/: { n:\"FILESEAL\" },\n\t\t/*::[*/0x000E/*::]*/: { n:\"DATAFILLNUMS\" },\n\t\t/*::[*/0x000F/*::]*/: { n:\"PRINTMAIN\" },\n\t\t/*::[*/0x0010/*::]*/: { n:\"PRINTSTRING\" },\n\t\t/*::[*/0x0011/*::]*/: { n:\"GRAPHMAIN\" },\n\t\t/*::[*/0x0012/*::]*/: { n:\"GRAPHSTRING\" },\n\t\t/*::[*/0x0013/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0014/*::]*/: { n:\"ERRCELL\" },\n\t\t/*::[*/0x0015/*::]*/: { n:\"NACELL\" },\n\t\t/*::[*/0x0016/*::]*/: { n:\"LABEL16\", f:parse_LABEL_16},\n\t\t/*::[*/0x0017/*::]*/: { n:\"NUMBER17\", f:parse_NUMBER_17 },\n\t\t/*::[*/0x0018/*::]*/: { n:\"NUMBER18\", f:parse_NUMBER_18 },\n\t\t/*::[*/0x0019/*::]*/: { n:\"FORMULA19\", f:parse_FORMULA_19},\n\t\t/*::[*/0x001A/*::]*/: { n:\"FORMULA1A\" },\n\t\t/*::[*/0x001B/*::]*/: { n:\"XFORMAT\", f:parse_XFORMAT },\n\t\t/*::[*/0x001C/*::]*/: { n:\"DTLABELMISC\" },\n\t\t/*::[*/0x001D/*::]*/: { n:\"DTLABELCELL\" },\n\t\t/*::[*/0x001E/*::]*/: { n:\"GRAPHWINDOW\" },\n\t\t/*::[*/0x001F/*::]*/: { n:\"CPA\" },\n\t\t/*::[*/0x0020/*::]*/: { n:\"LPLAUTO\" },\n\t\t/*::[*/0x0021/*::]*/: { n:\"QUERY\" },\n\t\t/*::[*/0x0022/*::]*/: { n:\"HIDDENSHEET\" },\n\t\t/*::[*/0x0023/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0025/*::]*/: { n:\"NUMBER25\", f:parse_NUMBER_25 },\n\t\t/*::[*/0x0026/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0027/*::]*/: { n:\"NUMBER27\", f:parse_NUMBER_27 },\n\t\t/*::[*/0x0028/*::]*/: { n:\"FORMULA28\", f:parse_FORMULA_28 },\n\t\t/*::[*/0x008E/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0093/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0096/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0097/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0098/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0099/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x009A/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x009B/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x009C/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x00A3/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x00AE/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x00AF/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x00B0/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x00B1/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x00B8/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x00B9/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x00BA/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x00BB/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x00BC/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x00C3/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x00C9/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x00CC/*::]*/: { n:\"SHEETNAMECS\", f:parse_SHEETNAMECS },\n\t\t/*::[*/0x00CD/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x00CE/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x00CF/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x00D0/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0100/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0103/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0104/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0105/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0106/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0107/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0109/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x010A/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x010B/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x010C/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x010E/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x010F/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0180/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0185/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0186/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0189/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x018C/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0200/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0202/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0201/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0204/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0205/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0280/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0281/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0282/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0283/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0284/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0285/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0286/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0287/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0288/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0292/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0293/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0294/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0295/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0296/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0299/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x029A/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0300/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0304/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0601/*::]*/: { n:\"SHEETINFOQP\", f:parse_SHEETINFOQP },\n\t\t/*::[*/0x0640/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0642/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0701/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0702/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0703/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0704/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0780/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0800/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0801/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0804/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0A80/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x2AF6/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x3231/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x6E49/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x6F44/*::]*/: { n:\"??\" },\n\t\t/*::[*/0xFFFF/*::]*/: { n:\"\" }\n\t};\n\treturn {\n\t\tsheet_to_wk1: sheet_to_wk1,\n\t\tbook_to_wk3: book_to_wk3,\n\t\tto_workbook: lotus_to_workbook\n\t};\n})();\n/* 18.4.7 rPr CT_RPrElt */\nfunction parse_rpr(rpr) {\n\tvar font = {}, m = rpr.match(tagregex), i = 0;\n\tvar pass = false;\n\tif(m) for(;i!=m.length; ++i) {\n\t\tvar y = parsexmltag(m[i]);\n\t\tswitch(y[0].replace(/\\w*:/g,\"\")) {\n\t\t\t/* 18.8.12 condense CT_BooleanProperty */\n\t\t\t/* ** not required . */\n\t\t\tcase '':\n\t\t\tcase '': font.shadow = 1; break;\n\t\t\tcase '': break;\n\n\t\t\t/* 18.4.1 charset CT_IntProperty TODO */\n\t\t\tcase '':\n\t\t\tcase '': font.outline = 1; break;\n\t\t\tcase '': break;\n\n\t\t\t/* 18.4.5 rFont CT_FontName */\n\t\t\tcase '':\n\t\t\tcase '': font.strike = 1; break;\n\t\t\tcase '': break;\n\n\t\t\t/* 18.4.13 u CT_UnderlineProperty */\n\t\t\tcase '':\n\t\t\tcase '': font.u = 1; break;\n\t\t\tcase '': break;\n\n\t\t\t/* 18.8.2 b */\n\t\t\tcase '':\n\t\t\tcase '': font.b = 1; break;\n\t\t\tcase '': break;\n\n\t\t\t/* 18.8.26 i */\n\t\t\tcase '':\n\t\t\tcase '': font.i = 1; break;\n\t\t\tcase '': break;\n\n\t\t\t/* 18.3.1.15 color CT_Color TODO: tint, theme, auto, indexed */\n\t\t\tcase '': case '': case '': break;\n\n\t\t\t/* 18.8.18 family ST_FontFamily */\n\t\t\tcase '': case '': case '': break;\n\n\t\t\t/* 18.4.14 vertAlign CT_VerticalAlignFontProperty TODO */\n\t\t\tcase '': case '': case '': break;\n\n\t\t\t/* 18.8.35 scheme CT_FontScheme TODO */\n\t\t\tcase '': case '': case '': break;\n\n\t\t\t/* 18.2.10 extLst CT_ExtensionList ? */\n\t\t\tcase '': case '': break;\n\t\t\tcase '': pass = false; break;\n\t\t\tdefault:\n\t\t\t\tif(y[0].charCodeAt(1) !== 47 && !pass) throw new Error('Unrecognized rich format ' + y[0]);\n\t\t}\n\t}\n\treturn font;\n}\n\nvar parse_rs = /*#__PURE__*/(function() {\n\tvar tregex = matchtag(\"t\"), rpregex = matchtag(\"rPr\");\n\t/* 18.4.4 r CT_RElt */\n\tfunction parse_r(r) {\n\t\t/* 18.4.12 t ST_Xstring */\n\t\tvar t = r.match(tregex)/*, cp = 65001*/;\n\t\tif(!t) return {t:\"s\", v:\"\"};\n\n\t\tvar o/*:Cell*/ = ({t:'s', v:unescapexml(t[1])}/*:any*/);\n\t\tvar rpr = r.match(rpregex);\n\t\tif(rpr) o.s = parse_rpr(rpr[1]);\n\t\treturn o;\n\t}\n\tvar rregex = /<(?:\\w+:)?r>/g, rend = /<\\/(?:\\w+:)?r>/;\n\treturn function parse_rs(rs) {\n\t\treturn rs.replace(rregex,\"\").split(rend).map(parse_r).filter(function(r) { return r.v; });\n\t};\n})();\n\n\n/* Parse a list of tags */\nvar rs_to_html = /*#__PURE__*/(function parse_rs_factory() {\n\tvar nlregex = /(\\r\\n|\\n)/g;\n\tfunction parse_rpr2(font, intro, outro) {\n\t\tvar style/*:Array*/ = [];\n\n\t\tif(font.u) style.push(\"text-decoration: underline;\");\n\t\tif(font.uval) style.push(\"text-underline-style:\" + font.uval + \";\");\n\t\tif(font.sz) style.push(\"font-size:\" + font.sz + \"pt;\");\n\t\tif(font.outline) style.push(\"text-effect: outline;\");\n\t\tif(font.shadow) style.push(\"text-shadow: auto;\");\n\t\tintro.push('');\n\n\t\tif(font.b) { intro.push(\"\"); outro.push(\"\"); }\n\t\tif(font.i) { intro.push(\"\"); outro.push(\"\"); }\n\t\tif(font.strike) { intro.push(\"\"); outro.push(\"\"); }\n\n\t\tvar align = font.valign || \"\";\n\t\tif(align == \"superscript\" || align == \"super\") align = \"sup\";\n\t\telse if(align == \"subscript\") align = \"sub\";\n\t\tif(align != \"\") { intro.push(\"<\" + align + \">\"); outro.push(\"\"); }\n\n\t\toutro.push(\"\");\n\t\treturn font;\n\t}\n\n\t/* 18.4.4 r CT_RElt */\n\tfunction r_to_html(r) {\n\t\tvar terms/*:[Array, string, Array]*/ = [[],r.v,[]];\n\t\tif(!r.v) return \"\";\n\n\t\tif(r.s) parse_rpr2(r.s, terms[0], terms[2]);\n\n\t\treturn terms[0].join(\"\") + terms[1].replace(nlregex,'
') + terms[2].join(\"\");\n\t}\n\n\treturn function parse_rs(rs) {\n\t\treturn rs.map(r_to_html).join(\"\");\n\t};\n})();\n\n/* 18.4.8 si CT_Rst */\nvar sitregex = /<(?:\\w+:)?t[^>]*>([^<]*)<\\/(?:\\w+:)?t>/g, sirregex = /<(?:\\w+:)?r>/;\nvar sirphregex = /<(?:\\w+:)?rPh.*?>([\\s\\S]*?)<\\/(?:\\w+:)?rPh>/g;\nfunction parse_si(x, opts) {\n\tvar html = opts ? opts.cellHTML : true;\n\tvar z = {};\n\tif(!x) return { t: \"\" };\n\t//var y;\n\t/* 18.4.12 t ST_Xstring (Plaintext String) */\n\t// TODO: is whitespace actually valid here?\n\tif(x.match(/^\\s*<(?:\\w+:)?t[^>]*>/)) {\n\t\tz.t = unescapexml(utf8read(x.slice(x.indexOf(\">\")+1).split(/<\\/(?:\\w+:)?t>/)[0]||\"\"));\n\t\tz.r = utf8read(x);\n\t\tif(html) z.h = escapehtml(z.t);\n\t}\n\t/* 18.4.4 r CT_RElt (Rich Text Run) */\n\telse if((/*y = */x.match(sirregex))) {\n\t\tz.r = utf8read(x);\n\t\tz.t = unescapexml(utf8read((x.replace(sirphregex, '').match(sitregex)||[]).join(\"\").replace(tagregex,\"\")));\n\t\tif(html) z.h = rs_to_html(parse_rs(z.r));\n\t}\n\t/* 18.4.3 phoneticPr CT_PhoneticPr (TODO: needed for Asian support) */\n\t/* 18.4.6 rPh CT_PhoneticRun (TODO: needed for Asian support) */\n\treturn z;\n}\n\n/* 18.4 Shared String Table */\nvar sstr0 = /<(?:\\w+:)?sst([^>]*)>([\\s\\S]*)<\\/(?:\\w+:)?sst>/;\nvar sstr1 = /<(?:\\w+:)?(?:si|sstItem)>/g;\nvar sstr2 = /<\\/(?:\\w+:)?(?:si|sstItem)>/;\nfunction parse_sst_xml(data/*:string*/, opts)/*:SST*/ {\n\tvar s/*:SST*/ = ([]/*:any*/), ss = \"\";\n\tif(!data) return s;\n\t/* 18.4.9 sst CT_Sst */\n\tvar sst = data.match(sstr0);\n\tif(sst) {\n\t\tss = sst[2].replace(sstr1,\"\").split(sstr2);\n\t\tfor(var i = 0; i != ss.length; ++i) {\n\t\t\tvar o = parse_si(ss[i].trim(), opts);\n\t\t\tif(o != null) s[s.length] = o;\n\t\t}\n\t\tsst = parsexmltag(sst[1]); s.Count = sst.count; s.Unique = sst.uniqueCount;\n\t}\n\treturn s;\n}\n\nvar straywsregex = /^\\s|\\s$|[\\t\\n\\r]/;\nfunction write_sst_xml(sst/*:SST*/, opts)/*:string*/ {\n\tif(!opts.bookSST) return \"\";\n\tvar o = [XML_HEADER];\n\to[o.length] = (writextag('sst', null, {\n\t\txmlns: XMLNS_main[0],\n\t\tcount: sst.Count,\n\t\tuniqueCount: sst.Unique\n\t}));\n\tfor(var i = 0; i != sst.length; ++i) { if(sst[i] == null) continue;\n\t\tvar s/*:XLString*/ = sst[i];\n\t\tvar sitag = \"\";\n\t\tif(s.r) sitag += s.r;\n\t\telse {\n\t\t\tsitag += \"\" + escapexml(s.t) + \"\";\n\t\t}\n\t\tsitag += \"\";\n\t\to[o.length] = (sitag);\n\t}\n\tif(o.length>2){ o[o.length] = (''); o[1]=o[1].replace(\"/>\",\">\"); }\n\treturn o.join(\"\");\n}\n/* [MS-XLSB] 2.4.221 BrtBeginSst */\nfunction parse_BrtBeginSst(data) {\n\treturn [data.read_shift(4), data.read_shift(4)];\n}\n\n/* [MS-XLSB] 2.1.7.45 Shared Strings */\nfunction parse_sst_bin(data, opts)/*:SST*/ {\n\tvar s/*:SST*/ = ([]/*:any*/);\n\tvar pass = false;\n\trecordhopper(data, function hopper_sst(val, R, RT) {\n\t\tswitch(RT) {\n\t\t\tcase 0x009F: /* BrtBeginSst */\n\t\t\t\ts.Count = val[0]; s.Unique = val[1]; break;\n\t\t\tcase 0x0013: /* BrtSSTItem */\n\t\t\t\ts.push(val); break;\n\t\t\tcase 0x00A0: /* BrtEndSst */\n\t\t\t\treturn true;\n\n\t\t\tcase 0x0023: /* BrtFRTBegin */\n\t\t\t\tpass = true; break;\n\t\t\tcase 0x0024: /* BrtFRTEnd */\n\t\t\t\tpass = false; break;\n\n\t\t\tdefault:\n\t\t\t\tif(R.T){}\n\t\t\t\tif(!pass || opts.WTF) throw new Error(\"Unexpected record 0x\" + RT.toString(16));\n\t\t}\n\t});\n\treturn s;\n}\n\nfunction write_BrtBeginSst(sst, o) {\n\tif(!o) o = new_buf(8);\n\to.write_shift(4, sst.Count);\n\to.write_shift(4, sst.Unique);\n\treturn o;\n}\n\nvar write_BrtSSTItem = write_RichStr;\n\nfunction write_sst_bin(sst/*::, opts*/) {\n\tvar ba = buf_array();\n\twrite_record(ba, 0x009F /* BrtBeginSst */, write_BrtBeginSst(sst));\n\tfor(var i = 0; i < sst.length; ++i) write_record(ba, 0x0013 /* BrtSSTItem */, write_BrtSSTItem(sst[i]));\n\t/* FRTSST */\n\twrite_record(ba, 0x00A0 /* BrtEndSst */);\n\treturn ba.end();\n}\nfunction _JS2ANSI(str/*:string*/)/*:Array*/ {\n\tif(typeof $cptable !== 'undefined') return $cptable.utils.encode(current_ansi, str);\n\tvar o/*:Array*/ = [], oo = str.split(\"\");\n\tfor(var i = 0; i < oo.length; ++i) o[i] = oo[i].charCodeAt(0);\n\treturn o;\n}\n\n/* [MS-OFFCRYPTO] 2.1.4 Version */\nfunction parse_CRYPTOVersion(blob, length/*:?number*/) {\n\tvar o/*:any*/ = {};\n\to.Major = blob.read_shift(2);\n\to.Minor = blob.read_shift(2);\n\t/*:: if(length == null) return o; */\n\tif(length >= 4) blob.l += length - 4;\n\treturn o;\n}\n\n/* [MS-OFFCRYPTO] 2.1.5 DataSpaceVersionInfo */\nfunction parse_DataSpaceVersionInfo(blob) {\n\tvar o = {};\n\to.id = blob.read_shift(0, 'lpp4');\n\to.R = parse_CRYPTOVersion(blob, 4);\n\to.U = parse_CRYPTOVersion(blob, 4);\n\to.W = parse_CRYPTOVersion(blob, 4);\n\treturn o;\n}\n\n/* [MS-OFFCRYPTO] 2.1.6.1 DataSpaceMapEntry Structure */\nfunction parse_DataSpaceMapEntry(blob) {\n\tvar len = blob.read_shift(4);\n\tvar end = blob.l + len - 4;\n\tvar o = {};\n\tvar cnt = blob.read_shift(4);\n\tvar comps/*:Array<{t:number, v:string}>*/ = [];\n\t/* [MS-OFFCRYPTO] 2.1.6.2 DataSpaceReferenceComponent Structure */\n\twhile(cnt-- > 0) comps.push({ t: blob.read_shift(4), v: blob.read_shift(0, 'lpp4') });\n\to.name = blob.read_shift(0, 'lpp4');\n\to.comps = comps;\n\tif(blob.l != end) throw new Error(\"Bad DataSpaceMapEntry: \" + blob.l + \" != \" + end);\n\treturn o;\n}\n\n/* [MS-OFFCRYPTO] 2.1.6 DataSpaceMap */\nfunction parse_DataSpaceMap(blob) {\n\tvar o = [];\n\tblob.l += 4; // must be 0x8\n\tvar cnt = blob.read_shift(4);\n\twhile(cnt-- > 0) o.push(parse_DataSpaceMapEntry(blob));\n\treturn o;\n}\n\n/* [MS-OFFCRYPTO] 2.1.7 DataSpaceDefinition */\nfunction parse_DataSpaceDefinition(blob)/*:Array*/ {\n\tvar o/*:Array*/ = [];\n\tblob.l += 4; // must be 0x8\n\tvar cnt = blob.read_shift(4);\n\twhile(cnt-- > 0) o.push(blob.read_shift(0, 'lpp4'));\n\treturn o;\n}\n\n/* [MS-OFFCRYPTO] 2.1.8 DataSpaceDefinition */\nfunction parse_TransformInfoHeader(blob) {\n\tvar o = {};\n\t/*var len = */blob.read_shift(4);\n\tblob.l += 4; // must be 0x1\n\to.id = blob.read_shift(0, 'lpp4');\n\to.name = blob.read_shift(0, 'lpp4');\n\to.R = parse_CRYPTOVersion(blob, 4);\n\to.U = parse_CRYPTOVersion(blob, 4);\n\to.W = parse_CRYPTOVersion(blob, 4);\n\treturn o;\n}\n\nfunction parse_Primary(blob) {\n\t/* [MS-OFFCRYPTO] 2.2.6 IRMDSTransformInfo */\n\tvar hdr = parse_TransformInfoHeader(blob);\n\t/* [MS-OFFCRYPTO] 2.1.9 EncryptionTransformInfo */\n\thdr.ename = blob.read_shift(0, '8lpp4');\n\thdr.blksz = blob.read_shift(4);\n\thdr.cmode = blob.read_shift(4);\n\tif(blob.read_shift(4) != 0x04) throw new Error(\"Bad !Primary record\");\n\treturn hdr;\n}\n\n/* [MS-OFFCRYPTO] 2.3.2 Encryption Header */\nfunction parse_EncryptionHeader(blob, length/*:number*/) {\n\tvar tgt = blob.l + length;\n\tvar o = {};\n\to.Flags = (blob.read_shift(4) & 0x3F);\n\tblob.l += 4;\n\to.AlgID = blob.read_shift(4);\n\tvar valid = false;\n\tswitch(o.AlgID) {\n\t\tcase 0x660E: case 0x660F: case 0x6610: valid = (o.Flags == 0x24); break;\n\t\tcase 0x6801: valid = (o.Flags == 0x04); break;\n\t\tcase 0: valid = (o.Flags == 0x10 || o.Flags == 0x04 || o.Flags == 0x24); break;\n\t\tdefault: throw 'Unrecognized encryption algorithm: ' + o.AlgID;\n\t}\n\tif(!valid) throw new Error(\"Encryption Flags/AlgID mismatch\");\n\to.AlgIDHash = blob.read_shift(4);\n\to.KeySize = blob.read_shift(4);\n\to.ProviderType = blob.read_shift(4);\n\tblob.l += 8;\n\to.CSPName = blob.read_shift((tgt-blob.l)>>1, 'utf16le');\n\tblob.l = tgt;\n\treturn o;\n}\n\n/* [MS-OFFCRYPTO] 2.3.3 Encryption Verifier */\nfunction parse_EncryptionVerifier(blob, length/*:number*/) {\n\tvar o = {}, tgt = blob.l + length;\n\tblob.l += 4; // SaltSize must be 0x10\n\to.Salt = blob.slice(blob.l, blob.l+16); blob.l += 16;\n\to.Verifier = blob.slice(blob.l, blob.l+16); blob.l += 16;\n\t/*var sz = */blob.read_shift(4);\n\to.VerifierHash = blob.slice(blob.l, tgt); blob.l = tgt;\n\treturn o;\n}\n\n/* [MS-OFFCRYPTO] 2.3.4.* EncryptionInfo Stream */\nfunction parse_EncryptionInfo(blob) {\n\tvar vers = parse_CRYPTOVersion(blob);\n\tswitch(vers.Minor) {\n\t\tcase 0x02: return [vers.Minor, parse_EncInfoStd(blob, vers)];\n\t\tcase 0x03: return [vers.Minor, parse_EncInfoExt(blob, vers)];\n\t\tcase 0x04: return [vers.Minor, parse_EncInfoAgl(blob, vers)];\n\t}\n\tthrow new Error(\"ECMA-376 Encrypted file unrecognized Version: \" + vers.Minor);\n}\n\n/* [MS-OFFCRYPTO] 2.3.4.5 EncryptionInfo Stream (Standard Encryption) */\nfunction parse_EncInfoStd(blob/*::, vers*/) {\n\tvar flags = blob.read_shift(4);\n\tif((flags & 0x3F) != 0x24) throw new Error(\"EncryptionInfo mismatch\");\n\tvar sz = blob.read_shift(4);\n\t//var tgt = blob.l + sz;\n\tvar hdr = parse_EncryptionHeader(blob, sz);\n\tvar verifier = parse_EncryptionVerifier(blob, blob.length - blob.l);\n\treturn { t:\"Std\", h:hdr, v:verifier };\n}\n/* [MS-OFFCRYPTO] 2.3.4.6 EncryptionInfo Stream (Extensible Encryption) */\nfunction parse_EncInfoExt(/*::blob, vers*/) { throw new Error(\"File is password-protected: ECMA-376 Extensible\"); }\n/* [MS-OFFCRYPTO] 2.3.4.10 EncryptionInfo Stream (Agile Encryption) */\nfunction parse_EncInfoAgl(blob/*::, vers*/) {\n\tvar KeyData = [\"saltSize\",\"blockSize\",\"keyBits\",\"hashSize\",\"cipherAlgorithm\",\"cipherChaining\",\"hashAlgorithm\",\"saltValue\"];\n\tblob.l+=4;\n\tvar xml = blob.read_shift(blob.length - blob.l, 'utf8');\n\tvar o = {};\n\txml.replace(tagregex, function xml_agile(x) {\n\t\tvar y/*:any*/ = parsexmltag(x);\n\t\tswitch(strip_ns(y[0])) {\n\t\t\tcase '': break;\n\t\t\tcase '': case '': break;\n\n\t\t\tcase '': break;\n\t\t\tcase ' 4 || vers.Major < 2) throw new Error('unrecognized major version code: ' + vers.Major);\n\to.Flags = blob.read_shift(4); length -= 4;\n\tvar sz = blob.read_shift(4); length -= 4;\n\to.EncryptionHeader = parse_EncryptionHeader(blob, sz); length -= sz;\n\to.EncryptionVerifier = parse_EncryptionVerifier(blob, length);\n\treturn o;\n}\n/* [MS-OFFCRYPTO] 2.3.6.1 RC4 Encryption Header */\nfunction parse_RC4Header(blob/*::, length*/) {\n\tvar o = {};\n\tvar vers = o.EncryptionVersionInfo = parse_CRYPTOVersion(blob, 4);\n\tif(vers.Major != 1 || vers.Minor != 1) throw 'unrecognized version code ' + vers.Major + ' : ' + vers.Minor;\n\to.Salt = blob.read_shift(16);\n\to.EncryptedVerifier = blob.read_shift(16);\n\to.EncryptedVerifierHash = blob.read_shift(16);\n\treturn o;\n}\n\n/* [MS-OFFCRYPTO] 2.3.7.1 Binary Document Password Verifier Derivation */\nfunction crypto_CreatePasswordVerifier_Method1(Password/*:string*/) {\n\tvar Verifier = 0x0000, PasswordArray;\n\tvar PasswordDecoded = _JS2ANSI(Password);\n\tvar len = PasswordDecoded.length + 1, i, PasswordByte;\n\tvar Intermediate1, Intermediate2, Intermediate3;\n\tPasswordArray = new_raw_buf(len);\n\tPasswordArray[0] = PasswordDecoded.length;\n\tfor(i = 1; i != len; ++i) PasswordArray[i] = PasswordDecoded[i-1];\n\tfor(i = len-1; i >= 0; --i) {\n\t\tPasswordByte = PasswordArray[i];\n\t\tIntermediate1 = ((Verifier & 0x4000) === 0x0000) ? 0 : 1;\n\t\tIntermediate2 = (Verifier << 1) & 0x7FFF;\n\t\tIntermediate3 = Intermediate1 | Intermediate2;\n\t\tVerifier = Intermediate3 ^ PasswordByte;\n\t}\n\treturn Verifier ^ 0xCE4B;\n}\n\n/* [MS-OFFCRYPTO] 2.3.7.2 Binary Document XOR Array Initialization */\nvar crypto_CreateXorArray_Method1 = /*#__PURE__*/(function() {\n\tvar PadArray = [0xBB, 0xFF, 0xFF, 0xBA, 0xFF, 0xFF, 0xB9, 0x80, 0x00, 0xBE, 0x0F, 0x00, 0xBF, 0x0F, 0x00];\n\tvar InitialCode = [0xE1F0, 0x1D0F, 0xCC9C, 0x84C0, 0x110C, 0x0E10, 0xF1CE, 0x313E, 0x1872, 0xE139, 0xD40F, 0x84F9, 0x280C, 0xA96A, 0x4EC3];\n\tvar XorMatrix = [0xAEFC, 0x4DD9, 0x9BB2, 0x2745, 0x4E8A, 0x9D14, 0x2A09, 0x7B61, 0xF6C2, 0xFDA5, 0xEB6B, 0xC6F7, 0x9DCF, 0x2BBF, 0x4563, 0x8AC6, 0x05AD, 0x0B5A, 0x16B4, 0x2D68, 0x5AD0, 0x0375, 0x06EA, 0x0DD4, 0x1BA8, 0x3750, 0x6EA0, 0xDD40, 0xD849, 0xA0B3, 0x5147, 0xA28E, 0x553D, 0xAA7A, 0x44D5, 0x6F45, 0xDE8A, 0xAD35, 0x4A4B, 0x9496, 0x390D, 0x721A, 0xEB23, 0xC667, 0x9CEF, 0x29FF, 0x53FE, 0xA7FC, 0x5FD9, 0x47D3, 0x8FA6, 0x0F6D, 0x1EDA, 0x3DB4, 0x7B68, 0xF6D0, 0xB861, 0x60E3, 0xC1C6, 0x93AD, 0x377B, 0x6EF6, 0xDDEC, 0x45A0, 0x8B40, 0x06A1, 0x0D42, 0x1A84, 0x3508, 0x6A10, 0xAA51, 0x4483, 0x8906, 0x022D, 0x045A, 0x08B4, 0x1168, 0x76B4, 0xED68, 0xCAF1, 0x85C3, 0x1BA7, 0x374E, 0x6E9C, 0x3730, 0x6E60, 0xDCC0, 0xA9A1, 0x4363, 0x86C6, 0x1DAD, 0x3331, 0x6662, 0xCCC4, 0x89A9, 0x0373, 0x06E6, 0x0DCC, 0x1021, 0x2042, 0x4084, 0x8108, 0x1231, 0x2462, 0x48C4];\n\tvar Ror = function(Byte) { return ((Byte/2) | (Byte*128)) & 0xFF; };\n\tvar XorRor = function(byte1, byte2) { return Ror(byte1 ^ byte2); };\n\tvar CreateXorKey_Method1 = function(Password) {\n\t\tvar XorKey = InitialCode[Password.length - 1];\n\t\tvar CurrentElement = 0x68;\n\t\tfor(var i = Password.length-1; i >= 0; --i) {\n\t\t\tvar Char = Password[i];\n\t\t\tfor(var j = 0; j != 7; ++j) {\n\t\t\t\tif(Char & 0x40) XorKey ^= XorMatrix[CurrentElement];\n\t\t\t\tChar *= 2; --CurrentElement;\n\t\t\t}\n\t\t}\n\t\treturn XorKey;\n\t};\n\treturn function(password/*:string*/) {\n\t\tvar Password = _JS2ANSI(password);\n\t\tvar XorKey = CreateXorKey_Method1(Password);\n\t\tvar Index = Password.length;\n\t\tvar ObfuscationArray = new_raw_buf(16);\n\t\tfor(var i = 0; i != 16; ++i) ObfuscationArray[i] = 0x00;\n\t\tvar Temp, PasswordLastChar, PadIndex;\n\t\tif((Index & 1) === 1) {\n\t\t\tTemp = XorKey >> 8;\n\t\t\tObfuscationArray[Index] = XorRor(PadArray[0], Temp);\n\t\t\t--Index;\n\t\t\tTemp = XorKey & 0xFF;\n\t\t\tPasswordLastChar = Password[Password.length - 1];\n\t\t\tObfuscationArray[Index] = XorRor(PasswordLastChar, Temp);\n\t\t}\n\t\twhile(Index > 0) {\n\t\t\t--Index;\n\t\t\tTemp = XorKey >> 8;\n\t\t\tObfuscationArray[Index] = XorRor(Password[Index], Temp);\n\t\t\t--Index;\n\t\t\tTemp = XorKey & 0xFF;\n\t\t\tObfuscationArray[Index] = XorRor(Password[Index], Temp);\n\t\t}\n\t\tIndex = 15;\n\t\tPadIndex = 15 - Password.length;\n\t\twhile(PadIndex > 0) {\n\t\t\tTemp = XorKey >> 8;\n\t\t\tObfuscationArray[Index] = XorRor(PadArray[PadIndex], Temp);\n\t\t\t--Index;\n\t\t\t--PadIndex;\n\t\t\tTemp = XorKey & 0xFF;\n\t\t\tObfuscationArray[Index] = XorRor(Password[Index], Temp);\n\t\t\t--Index;\n\t\t\t--PadIndex;\n\t\t}\n\t\treturn ObfuscationArray;\n\t};\n})();\n\n/* [MS-OFFCRYPTO] 2.3.7.3 Binary Document XOR Data Transformation Method 1 */\nvar crypto_DecryptData_Method1 = function(password/*:string*/, Data, XorArrayIndex, XorArray, O) {\n\t/* If XorArray is set, use it; if O is not set, make changes in-place */\n\tif(!O) O = Data;\n\tif(!XorArray) XorArray = crypto_CreateXorArray_Method1(password);\n\tvar Index, Value;\n\tfor(Index = 0; Index != Data.length; ++Index) {\n\t\tValue = Data[Index];\n\t\tValue ^= XorArray[XorArrayIndex];\n\t\tValue = ((Value>>5) | (Value<<3)) & 0xFF;\n\t\tO[Index] = Value;\n\t\t++XorArrayIndex;\n\t}\n\treturn [O, XorArrayIndex, XorArray];\n};\n\nvar crypto_MakeXorDecryptor = function(password/*:string*/) {\n\tvar XorArrayIndex = 0, XorArray = crypto_CreateXorArray_Method1(password);\n\treturn function(Data) {\n\t\tvar O = crypto_DecryptData_Method1(\"\", Data, XorArrayIndex, XorArray);\n\t\tXorArrayIndex = O[1];\n\t\treturn O[0];\n\t};\n};\n\n/* 2.5.343 */\nfunction parse_XORObfuscation(blob, length, opts, out) {\n\tvar o = ({ key: parseuint16(blob), verificationBytes: parseuint16(blob) }/*:any*/);\n\tif(opts.password) o.verifier = crypto_CreatePasswordVerifier_Method1(opts.password);\n\tout.valid = o.verificationBytes === o.verifier;\n\tif(out.valid) out.insitu = crypto_MakeXorDecryptor(opts.password);\n\treturn o;\n}\n\n/* 2.4.117 */\nfunction parse_FilePassHeader(blob, length/*:number*/, oo) {\n\tvar o = oo || {}; o.Info = blob.read_shift(2); blob.l -= 2;\n\tif(o.Info === 1) o.Data = parse_RC4Header(blob, length);\n\telse o.Data = parse_RC4CryptoHeader(blob, length);\n\treturn o;\n}\nfunction parse_FilePass(blob, length/*:number*/, opts) {\n\tvar o = ({ Type: opts.biff >= 8 ? blob.read_shift(2) : 0 }/*:any*/); /* wEncryptionType */\n\tif(o.Type) parse_FilePassHeader(blob, length-2, o);\n\telse parse_XORObfuscation(blob, opts.biff >= 8 ? length : length - 2, opts, o);\n\treturn o;\n}\n\n\nvar RTF = /*#__PURE__*/(function() {\n\tfunction rtf_to_sheet(d/*:RawData*/, opts)/*:Worksheet*/ {\n\t\tswitch(opts.type) {\n\t\t\tcase 'base64': return rtf_to_sheet_str(Base64_decode(d), opts);\n\t\t\tcase 'binary': return rtf_to_sheet_str(d, opts);\n\t\t\tcase 'buffer': return rtf_to_sheet_str(has_buf && Buffer.isBuffer(d) ? d.toString('binary') : a2s(d), opts);\n\t\t\tcase 'array': return rtf_to_sheet_str(cc2str(d), opts);\n\t\t}\n\t\tthrow new Error(\"Unrecognized type \" + opts.type);\n\t}\n\n\t/* TODO: this is a stub */\n\tfunction rtf_to_sheet_str(str/*:string*/, opts)/*:Worksheet*/ {\n\t\tvar o = opts || {};\n\t\tvar ws/*:Worksheet*/ = o.dense ? ([]/*:any*/) : ({}/*:any*/);\n\n\t\tvar rows = str.match(/\\\\trowd.*?\\\\row\\b/g);\n\t\tif(!rows.length) throw new Error(\"RTF missing table\");\n\t\tvar range/*:Range*/ = ({s: {c:0, r:0}, e: {c:0, r:rows.length - 1}}/*:any*/);\n\t\trows.forEach(function(rowtf, R) {\n\t\t\tif(Array.isArray(ws)) ws[R] = [];\n\t\t\tvar rtfre = /\\\\\\w+\\b/g;\n\t\t\tvar last_index = 0;\n\t\t\tvar res;\n\t\t\tvar C = -1;\n\t\t\twhile((res = rtfre.exec(rowtf))) {\n\t\t\t\tswitch(res[0]) {\n\t\t\t\t\tcase \"\\\\cell\":\n\t\t\t\t\t\tvar data = rowtf.slice(last_index, rtfre.lastIndex - res[0].length);\n\t\t\t\t\t\tif(data[0] == \" \") data = data.slice(1);\n\t\t\t\t\t\t++C;\n\t\t\t\t\t\tif(data.length) {\n\t\t\t\t\t\t\t// TODO: value parsing, including codepage adjustments\n\t\t\t\t\t\t\tvar cell = {v: data, t:\"s\"};\n\t\t\t\t\t\t\tif(Array.isArray(ws)) ws[R][C] = cell;\n\t\t\t\t\t\t\telse ws[encode_cell({r:R, c:C})] = cell;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tlast_index = rtfre.lastIndex;\n\t\t\t}\n\t\t\tif(C > range.e.c) range.e.c = C;\n\t\t});\n\t\tws['!ref'] = encode_range(range);\n\t\treturn ws;\n\t}\n\n\tfunction rtf_to_workbook(d/*:RawData*/, opts)/*:Workbook*/ { return sheet_to_workbook(rtf_to_sheet(d, opts), opts); }\n\n\t/* TODO: this is a stub */\n\tfunction sheet_to_rtf(ws/*:Worksheet*//*::, opts*/)/*:string*/ {\n\t\tvar o = [\"{\\\\rtf1\\\\ansi\"];\n\t\tvar r = safe_decode_range(ws['!ref']), cell/*:Cell*/;\n\t\tvar dense = Array.isArray(ws);\n\t\tfor(var R = r.s.r; R <= r.e.r; ++R) {\n\t\t\to.push(\"\\\\trowd\\\\trautofit1\");\n\t\t\tfor(var C = r.s.c; C <= r.e.c; ++C) o.push(\"\\\\cellx\" + (C+1));\n\t\t\to.push(\"\\\\pard\\\\intbl\");\n\t\t\tfor(C = r.s.c; C <= r.e.c; ++C) {\n\t\t\t\tvar coord = encode_cell({r:R,c:C});\n\t\t\t\tcell = dense ? (ws[R]||[])[C]: ws[coord];\n\t\t\t\tif(!cell || cell.v == null && (!cell.f || cell.F)) continue;\n\t\t\t\to.push(\" \" + (cell.w || (format_cell(cell), cell.w)));\n\t\t\t\to.push(\"\\\\cell\");\n\t\t\t}\n\t\t\to.push(\"\\\\pard\\\\intbl\\\\row\");\n\t\t}\n\t\treturn o.join(\"\") + \"}\";\n\t}\n\n\treturn {\n\t\tto_workbook: rtf_to_workbook,\n\t\tto_sheet: rtf_to_sheet,\n\t\tfrom_sheet: sheet_to_rtf\n\t};\n})();\nfunction hex2RGB(h) {\n\tvar o = h.slice(h[0]===\"#\"?1:0).slice(0,6);\n\treturn [parseInt(o.slice(0,2),16),parseInt(o.slice(2,4),16),parseInt(o.slice(4,6),16)];\n}\nfunction rgb2Hex(rgb) {\n\tfor(var i=0,o=1; i!=3; ++i) o = o*256 + (rgb[i]>255?255:rgb[i]<0?0:rgb[i]);\n\treturn o.toString(16).toUpperCase().slice(1);\n}\n\nfunction rgb2HSL(rgb) {\n\tvar R = rgb[0]/255, G = rgb[1]/255, B=rgb[2]/255;\n\tvar M = Math.max(R, G, B), m = Math.min(R, G, B), C = M - m;\n\tif(C === 0) return [0, 0, R];\n\n\tvar H6 = 0, S = 0, L2 = (M + m);\n\tS = C / (L2 > 1 ? 2 - L2 : L2);\n\tswitch(M){\n\t\tcase R: H6 = ((G - B) / C + 6)%6; break;\n\t\tcase G: H6 = ((B - R) / C + 2); break;\n\t\tcase B: H6 = ((R - G) / C + 4); break;\n\t}\n\treturn [H6 / 6, S, L2 / 2];\n}\n\nfunction hsl2RGB(hsl){\n\tvar H = hsl[0], S = hsl[1], L = hsl[2];\n\tvar C = S * 2 * (L < 0.5 ? L : 1 - L), m = L - C/2;\n\tvar rgb = [m,m,m], h6 = 6*H;\n\n\tvar X;\n\tif(S !== 0) switch(h6|0) {\n\t\tcase 0: case 6: X = C * h6; rgb[0] += C; rgb[1] += X; break;\n\t\tcase 1: X = C * (2 - h6); rgb[0] += X; rgb[1] += C; break;\n\t\tcase 2: X = C * (h6 - 2); rgb[1] += C; rgb[2] += X; break;\n\t\tcase 3: X = C * (4 - h6); rgb[1] += X; rgb[2] += C; break;\n\t\tcase 4: X = C * (h6 - 4); rgb[2] += C; rgb[0] += X; break;\n\t\tcase 5: X = C * (6 - h6); rgb[2] += X; rgb[0] += C; break;\n\t}\n\tfor(var i = 0; i != 3; ++i) rgb[i] = Math.round(rgb[i]*255);\n\treturn rgb;\n}\n\n/* 18.8.3 bgColor tint algorithm */\nfunction rgb_tint(hex, tint) {\n\tif(tint === 0) return hex;\n\tvar hsl = rgb2HSL(hex2RGB(hex));\n\tif (tint < 0) hsl[2] = hsl[2] * (1 + tint);\n\telse hsl[2] = 1 - (1 - hsl[2]) * (1 - tint);\n\treturn rgb2Hex(hsl2RGB(hsl));\n}\n\n/* 18.3.1.13 width calculations */\n/* [MS-OI29500] 2.1.595 Column Width & Formatting */\nvar DEF_MDW = 6, MAX_MDW = 15, MIN_MDW = 1, MDW = DEF_MDW;\nfunction width2px(width) { return Math.floor(( width + (Math.round(128/MDW))/256 )* MDW ); }\nfunction px2char(px) { return (Math.floor((px - 5)/MDW * 100 + 0.5))/100; }\nfunction char2width(chr) { return (Math.round((chr * MDW + 5)/MDW*256))/256; }\n//function px2char_(px) { return (((px - 5)/MDW * 100 + 0.5))/100; }\n//function char2width_(chr) { return (((chr * MDW + 5)/MDW*256))/256; }\nfunction cycle_width(collw) { return char2width(px2char(width2px(collw))); }\n/* XLSX/XLSB/XLS specify width in units of MDW */\nfunction find_mdw_colw(collw) {\n\tvar delta = Math.abs(collw - cycle_width(collw)), _MDW = MDW;\n\tif(delta > 0.005) for(MDW=MIN_MDW; MDW 0.5) guess--;\n\t\tif(Math.abs(guess) < delta) { delta = Math.abs(guess); _MDW = MDW; }\n\t}\n\tMDW = _MDW;\n}*/\n\nfunction process_col(coll/*:ColInfo*/) {\n\tif(coll.width) {\n\t\tcoll.wpx = width2px(coll.width);\n\t\tcoll.wch = px2char(coll.wpx);\n\t\tcoll.MDW = MDW;\n\t} else if(coll.wpx) {\n\t\tcoll.wch = px2char(coll.wpx);\n\t\tcoll.width = char2width(coll.wch);\n\t\tcoll.MDW = MDW;\n\t} else if(typeof coll.wch == 'number') {\n\t\tcoll.width = char2width(coll.wch);\n\t\tcoll.wpx = width2px(coll.width);\n\t\tcoll.MDW = MDW;\n\t}\n\tif(coll.customWidth) delete coll.customWidth;\n}\n\nvar DEF_PPI = 96, PPI = DEF_PPI;\nfunction px2pt(px) { return px * 96 / PPI; }\nfunction pt2px(pt) { return pt * PPI / 96; }\n\n/* [MS-EXSPXML3] 2.4.54 ST_enmPattern */\nvar XLMLPatternTypeMap = {\n\t\"None\": \"none\",\n\t\"Solid\": \"solid\",\n\t\"Gray50\": \"mediumGray\",\n\t\"Gray75\": \"darkGray\",\n\t\"Gray25\": \"lightGray\",\n\t\"HorzStripe\": \"darkHorizontal\",\n\t\"VertStripe\": \"darkVertical\",\n\t\"ReverseDiagStripe\": \"darkDown\",\n\t\"DiagStripe\": \"darkUp\",\n\t\"DiagCross\": \"darkGrid\",\n\t\"ThickDiagCross\": \"darkTrellis\",\n\t\"ThinHorzStripe\": \"lightHorizontal\",\n\t\"ThinVertStripe\": \"lightVertical\",\n\t\"ThinReverseDiagStripe\": \"lightDown\",\n\t\"ThinHorzCross\": \"lightGrid\"\n};\n\n/* 18.8.5 borders CT_Borders */\nfunction parse_borders(t, styles, themes, opts) {\n\tstyles.Borders = [];\n\tvar border = {};\n\tvar pass = false;\n\t(t[0].match(tagregex)||[]).forEach(function(x) {\n\t\tvar y = parsexmltag(x);\n\t\tswitch(strip_ns(y[0])) {\n\t\t\tcase '': case '': break;\n\n\t\t\t/* 18.8.4 border CT_Border */\n\t\t\tcase '': case '':\n\t\t\t\tborder = /*::(*/{}/*:: :any)*/;\n\t\t\t\tif(y.diagonalUp) border.diagonalUp = parsexmlbool(y.diagonalUp);\n\t\t\t\tif(y.diagonalDown) border.diagonalDown = parsexmlbool(y.diagonalDown);\n\t\t\t\tstyles.Borders.push(border);\n\t\t\t\tbreak;\n\t\t\tcase '': break;\n\n\t\t\t/* note: not in spec, appears to be CT_BorderPr */\n\t\t\tcase '': break;\n\t\t\tcase '': break;\n\t\t\tcase '': break;\n\n\t\t\t/* note: not in spec, appears to be CT_BorderPr */\n\t\t\tcase '': break;\n\t\t\tcase '': break;\n\t\t\tcase '': break;\n\n\t\t\t/* 18.8.43 top CT_BorderPr */\n\t\t\tcase '': break;\n\t\t\tcase '': break;\n\t\t\tcase '': break;\n\n\t\t\t/* 18.8.6 bottom CT_BorderPr */\n\t\t\tcase '': break;\n\t\t\tcase '': break;\n\t\t\tcase '': break;\n\n\t\t\t/* 18.8.13 diagonal CT_BorderPr */\n\t\t\tcase '': case '': break;\n\t\t\tcase '': break;\n\n\t\t\t/* 18.8.25 horizontal CT_BorderPr */\n\t\t\tcase '': case '': break;\n\t\t\tcase '': break;\n\n\t\t\t/* 18.8.44 vertical CT_BorderPr */\n\t\t\tcase '': case '': break;\n\t\t\tcase '': break;\n\n\t\t\t/* 18.8.37 start CT_BorderPr */\n\t\t\tcase '': case '': break;\n\t\t\tcase '': break;\n\n\t\t\t/* 18.8.16 end CT_BorderPr */\n\t\t\tcase '': case '': break;\n\t\t\tcase '': break;\n\n\t\t\t/* 18.8.? color CT_Color */\n\t\t\tcase '':\n\t\t\t\tbreak;\n\t\t\tcase '': case '': break;\n\n\t\t\t/* 18.2.10 extLst CT_ExtensionList ? */\n\t\t\tcase '': case '': break;\n\t\t\tcase '': pass = false; break;\n\t\t\tdefault: if(opts && opts.WTF) {\n\t\t\t\tif(!pass) throw new Error('unrecognized ' + y[0] + ' in borders');\n\t\t\t}\n\t\t}\n\t});\n}\n\n/* 18.8.21 fills CT_Fills */\nfunction parse_fills(t, styles, themes, opts) {\n\tstyles.Fills = [];\n\tvar fill = {};\n\tvar pass = false;\n\t(t[0].match(tagregex)||[]).forEach(function(x) {\n\t\tvar y = parsexmltag(x);\n\t\tswitch(strip_ns(y[0])) {\n\t\t\tcase '': case '': break;\n\n\t\t\t/* 18.8.20 fill CT_Fill */\n\t\t\tcase '': case '':\n\t\t\t\tfill = {}; styles.Fills.push(fill); break;\n\t\t\tcase '': break;\n\n\t\t\t/* 18.8.24 gradientFill CT_GradientFill */\n\t\t\tcase '': break;\n\t\t\tcase '': styles.Fills.push(fill); fill = {}; break;\n\n\t\t\t/* 18.8.32 patternFill CT_PatternFill */\n\t\t\tcase '':\n\t\t\t\tif(y.patternType) fill.patternType = y.patternType;\n\t\t\t\tbreak;\n\t\t\tcase '': case '': break;\n\n\t\t\t/* 18.8.3 bgColor CT_Color */\n\t\t\tcase '': case '': break;\n\n\t\t\t/* 18.8.19 fgColor CT_Color */\n\t\t\tcase '': case '': break;\n\n\t\t\t/* 18.8.38 stop CT_GradientStop */\n\t\t\tcase '': break;\n\t\t\tcase '': break;\n\n\t\t\t/* 18.8.? color CT_Color */\n\t\t\tcase '': break;\n\t\t\tcase '': break;\n\n\t\t\t/* 18.2.10 extLst CT_ExtensionList ? */\n\t\t\tcase '': case '': break;\n\t\t\tcase '': pass = false; break;\n\t\t\tdefault: if(opts && opts.WTF) {\n\t\t\t\tif(!pass) throw new Error('unrecognized ' + y[0] + ' in fills');\n\t\t\t}\n\t\t}\n\t});\n}\n\n/* 18.8.23 fonts CT_Fonts */\nfunction parse_fonts(t, styles, themes, opts) {\n\tstyles.Fonts = [];\n\tvar font = {};\n\tvar pass = false;\n\t(t[0].match(tagregex)||[]).forEach(function(x) {\n\t\tvar y = parsexmltag(x);\n\t\tswitch(strip_ns(y[0])) {\n\t\t\tcase '': case '': break;\n\n\t\t\t/* 18.8.22 font CT_Font */\n\t\t\tcase '': break;\n\t\t\tcase '': case '':\n\t\t\t\tstyles.Fonts.push(font);\n\t\t\t\tfont = {};\n\t\t\t\tbreak;\n\n\t\t\t/* 18.8.29 name CT_FontName */\n\t\t\tcase '': case '': break;\n\n\t\t\t/* 18.8.2 b CT_BooleanProperty */\n\t\t\tcase '': font.bold = 1; break;\n\n\t\t\t/* 18.8.26 i CT_BooleanProperty */\n\t\t\tcase '': font.italic = 1; break;\n\n\t\t\t/* 18.4.13 u CT_UnderlineProperty */\n\t\t\tcase '': font.underline = 1; break;\n\n\t\t\t/* 18.4.10 strike CT_BooleanProperty */\n\t\t\tcase '': font.strike = 1; break;\n\n\t\t\t/* 18.4.2 outline CT_BooleanProperty */\n\t\t\tcase '': font.outline = 1; break;\n\n\t\t\t/* 18.8.36 shadow CT_BooleanProperty */\n\t\t\tcase '': font.shadow = 1; break;\n\n\t\t\t/* 18.8.12 condense CT_BooleanProperty */\n\t\t\tcase '': font.condense = 1; break;\n\n\t\t\t/* 18.8.17 extend CT_BooleanProperty */\n\t\t\tcase '': font.extend = 1; break;\n\n\t\t\t/* 18.4.11 sz CT_FontSize */\n\t\t\tcase '': case '': break;\n\n\t\t\t/* 18.4.14 vertAlign CT_VerticalAlignFontProperty */\n\t\t\tcase '': case '': break;\n\n\t\t\t/* 18.8.18 family CT_FontFamily */\n\t\t\tcase '': case '': break;\n\n\t\t\t/* 18.8.35 scheme CT_FontScheme */\n\t\t\tcase '': case '': break;\n\n\t\t\t/* 18.4.1 charset CT_IntProperty */\n\t\t\tcase '': case '': break;\n\n\t\t\t/* note: sometimes mc:AlternateContent appears bare */\n\t\t\tcase '': pass = false; break;\n\n\t\t\t/* 18.2.10 extLst CT_ExtensionList ? */\n\t\t\tcase '': case '': break;\n\t\t\tcase '': pass = false; break;\n\t\t\tdefault: if(opts && opts.WTF) {\n\t\t\t\tif(!pass) throw new Error('unrecognized ' + y[0] + ' in fonts');\n\t\t\t}\n\t\t}\n\t});\n}\n\n/* 18.8.31 numFmts CT_NumFmts */\nfunction parse_numFmts(t, styles, opts) {\n\tstyles.NumberFmt = [];\n\tvar k/*Array*/ = (keys(table_fmt)/*:any*/);\n\tfor(var i=0; i < k.length; ++i) styles.NumberFmt[k[i]] = table_fmt[k[i]];\n\tvar m = t[0].match(tagregex);\n\tif(!m) return;\n\tfor(i=0; i < m.length; ++i) {\n\t\tvar y = parsexmltag(m[i]);\n\t\tswitch(strip_ns(y[0])) {\n\t\t\tcase '': case '': case '': break;\n\t\t\tcase '0) {\n\t\t\t\t\tif(j > 0x188) {\n\t\t\t\t\t\tfor(j = 0x188; j > 0x3c; --j) if(styles.NumberFmt[j] == null) break;\n\t\t\t\t\t\tstyles.NumberFmt[j] = f;\n\t\t\t\t\t}\n\t\t\t\t\tSSF_load(f,j);\n\t\t\t\t}\n\t\t\t} break;\n\t\t\tcase '': break;\n\t\t\tdefault: if(opts.WTF) throw new Error('unrecognized ' + y[0] + ' in numFmts');\n\t\t}\n\t}\n}\n\nfunction write_numFmts(NF/*:{[n:number|string]:string}*//*::, opts*/) {\n\tvar o = [\"\"];\n\t[[5,8],[23,26],[41,44],[/*63*/50,/*66],[164,*/392]].forEach(function(r) {\n\t\tfor(var i = r[0]; i <= r[1]; ++i) if(NF[i] != null) o[o.length] = (writextag('numFmt',null,{numFmtId:i,formatCode:escapexml(NF[i])}));\n\t});\n\tif(o.length === 1) return \"\";\n\to[o.length] = (\"\");\n\to[0] = writextag('numFmts', null, { count:o.length-2 }).replace(\"/>\", \">\");\n\treturn o.join(\"\");\n}\n\n/* 18.8.10 cellXfs CT_CellXfs */\nvar cellXF_uint = [ \"numFmtId\", \"fillId\", \"fontId\", \"borderId\", \"xfId\" ];\nvar cellXF_bool = [ \"applyAlignment\", \"applyBorder\", \"applyFill\", \"applyFont\", \"applyNumberFormat\", \"applyProtection\", \"pivotButton\", \"quotePrefix\" ];\nfunction parse_cellXfs(t, styles, opts) {\n\tstyles.CellXf = [];\n\tvar xf;\n\tvar pass = false;\n\t(t[0].match(tagregex)||[]).forEach(function(x) {\n\t\tvar y = parsexmltag(x), i = 0;\n\t\tswitch(strip_ns(y[0])) {\n\t\t\tcase '': case '': case '': break;\n\n\t\t\t/* 18.8.45 xf CT_Xf */\n\t\t\tcase '':\n\t\t\t\txf = y;\n\t\t\t\tdelete xf[0];\n\t\t\t\tfor(i = 0; i < cellXF_uint.length; ++i) if(xf[cellXF_uint[i]])\n\t\t\t\t\txf[cellXF_uint[i]] = parseInt(xf[cellXF_uint[i]], 10);\n\t\t\t\tfor(i = 0; i < cellXF_bool.length; ++i) if(xf[cellXF_bool[i]])\n\t\t\t\t\txf[cellXF_bool[i]] = parsexmlbool(xf[cellXF_bool[i]]);\n\t\t\t\tif(styles.NumberFmt && xf.numFmtId > 0x188) {\n\t\t\t\t\tfor(i = 0x188; i > 0x3c; --i) if(styles.NumberFmt[xf.numFmtId] == styles.NumberFmt[i]) { xf.numFmtId = i; break; }\n\t\t\t\t}\n\t\t\t\tstyles.CellXf.push(xf); break;\n\t\t\tcase '': break;\n\n\t\t\t/* 18.8.1 alignment CT_CellAlignment */\n\t\t\tcase '':\n\t\t\t\tvar alignment = {};\n\t\t\t\tif(y.vertical) alignment.vertical = y.vertical;\n\t\t\t\tif(y.horizontal) alignment.horizontal = y.horizontal;\n\t\t\t\tif(y.textRotation != null) alignment.textRotation = y.textRotation;\n\t\t\t\tif(y.indent) alignment.indent = y.indent;\n\t\t\t\tif(y.wrapText) alignment.wrapText = parsexmlbool(y.wrapText);\n\t\t\t\txf.alignment = alignment;\n\t\t\t\tbreak;\n\t\t\tcase '': break;\n\n\t\t\t/* 18.8.33 protection CT_CellProtection */\n\t\t\tcase '': case '': break;\n\n\t\t\t/* note: sometimes mc:AlternateContent appears bare */\n\t\t\tcase '': pass = false; break;\n\n\t\t\t/* 18.2.10 extLst CT_ExtensionList ? */\n\t\t\tcase '': case '': break;\n\t\t\tcase '': pass = false; break;\n\t\t\tdefault: if(opts && opts.WTF) {\n\t\t\t\tif(!pass) throw new Error('unrecognized ' + y[0] + ' in cellXfs');\n\t\t\t}\n\t\t}\n\t});\n}\n\nfunction write_cellXfs(cellXfs)/*:string*/ {\n\tvar o/*:Array*/ = [];\n\to[o.length] = (writextag('cellXfs',null));\n\tcellXfs.forEach(function(c) {\n\t\to[o.length] = (writextag('xf', null, c));\n\t});\n\to[o.length] = (\"\");\n\tif(o.length === 2) return \"\";\n\to[0] = writextag('cellXfs',null, {count:o.length-2}).replace(\"/>\",\">\");\n\treturn o.join(\"\");\n}\n\n/* 18.8 Styles CT_Stylesheet*/\nvar parse_sty_xml= /*#__PURE__*/(function make_pstyx() {\nvar numFmtRegex = /<(?:\\w+:)?numFmts([^>]*)>[\\S\\s]*?<\\/(?:\\w+:)?numFmts>/;\nvar cellXfRegex = /<(?:\\w+:)?cellXfs([^>]*)>[\\S\\s]*?<\\/(?:\\w+:)?cellXfs>/;\nvar fillsRegex = /<(?:\\w+:)?fills([^>]*)>[\\S\\s]*?<\\/(?:\\w+:)?fills>/;\nvar fontsRegex = /<(?:\\w+:)?fonts([^>]*)>[\\S\\s]*?<\\/(?:\\w+:)?fonts>/;\nvar bordersRegex = /<(?:\\w+:)?borders([^>]*)>[\\S\\s]*?<\\/(?:\\w+:)?borders>/;\n\nreturn function parse_sty_xml(data, themes, opts) {\n\tvar styles = {};\n\tif(!data) return styles;\n\tdata = data.replace(//mg,\"\").replace(//gm,\"\");\n\t/* 18.8.39 styleSheet CT_Stylesheet */\n\tvar t;\n\n\t/* 18.8.31 numFmts CT_NumFmts ? */\n\tif((t=data.match(numFmtRegex))) parse_numFmts(t, styles, opts);\n\n\t/* 18.8.23 fonts CT_Fonts ? */\n\tif((t=data.match(fontsRegex))) parse_fonts(t, styles, themes, opts);\n\n\t/* 18.8.21 fills CT_Fills ? */\n\tif((t=data.match(fillsRegex))) parse_fills(t, styles, themes, opts);\n\n\t/* 18.8.5 borders CT_Borders ? */\n\tif((t=data.match(bordersRegex))) parse_borders(t, styles, themes, opts);\n\n\t/* 18.8.9 cellStyleXfs CT_CellStyleXfs ? */\n\t/* 18.8.8 cellStyles CT_CellStyles ? */\n\n\t/* 18.8.10 cellXfs CT_CellXfs ? */\n\tif((t=data.match(cellXfRegex))) parse_cellXfs(t, styles, opts);\n\n\t/* 18.8.15 dxfs CT_Dxfs ? */\n\t/* 18.8.42 tableStyles CT_TableStyles ? */\n\t/* 18.8.11 colors CT_Colors ? */\n\t/* 18.2.10 extLst CT_ExtensionList ? */\n\n\treturn styles;\n};\n})();\n\nfunction write_sty_xml(wb/*:Workbook*/, opts)/*:string*/ {\n\tvar o = [XML_HEADER, writextag('styleSheet', null, {\n\t\t'xmlns': XMLNS_main[0],\n\t\t'xmlns:vt': XMLNS.vt\n\t})], w;\n\tif(wb.SSF && (w = write_numFmts(wb.SSF)) != null) o[o.length] = w;\n\to[o.length] = ('');\n\to[o.length] = ('');\n\to[o.length] = ('');\n\to[o.length] = ('');\n\tif((w = write_cellXfs(opts.cellXfs))) o[o.length] = (w);\n\to[o.length] = ('');\n\to[o.length] = ('');\n\to[o.length] = ('');\n\n\tif(o.length>2){ o[o.length] = (''); o[1]=o[1].replace(\"/>\",\">\"); }\n\treturn o.join(\"\");\n}\n/* [MS-XLSB] 2.4.657 BrtFmt */\nfunction parse_BrtFmt(data, length/*:number*/) {\n\tvar numFmtId = data.read_shift(2);\n\tvar stFmtCode = parse_XLWideString(data,length-2);\n\treturn [numFmtId, stFmtCode];\n}\nfunction write_BrtFmt(i/*:number*/, f/*:string*/, o) {\n\tif(!o) o = new_buf(6 + 4 * f.length);\n\to.write_shift(2, i);\n\twrite_XLWideString(f, o);\n\tvar out = (o.length > o.l) ? o.slice(0, o.l) : o;\n\tif(o.l == null) o.l = o.length;\n\treturn out;\n}\n\n/* [MS-XLSB] 2.4.659 BrtFont TODO */\nfunction parse_BrtFont(data, length/*:number*/, opts) {\n\tvar out = ({}/*:any*/);\n\n\tout.sz = data.read_shift(2) / 20;\n\n\tvar grbit = parse_FontFlags(data, 2, opts);\n\tif(grbit.fItalic) out.italic = 1;\n\tif(grbit.fCondense) out.condense = 1;\n\tif(grbit.fExtend) out.extend = 1;\n\tif(grbit.fShadow) out.shadow = 1;\n\tif(grbit.fOutline) out.outline = 1;\n\tif(grbit.fStrikeout) out.strike = 1;\n\n\tvar bls = data.read_shift(2);\n\tif(bls === 0x02BC) out.bold = 1;\n\n\tswitch(data.read_shift(2)) {\n\t\t/* case 0: out.vertAlign = \"baseline\"; break; */\n\t\tcase 1: out.vertAlign = \"superscript\"; break;\n\t\tcase 2: out.vertAlign = \"subscript\"; break;\n\t}\n\n\tvar underline = data.read_shift(1);\n\tif(underline != 0) out.underline = underline;\n\n\tvar family = data.read_shift(1);\n\tif(family > 0) out.family = family;\n\n\tvar bCharSet = data.read_shift(1);\n\tif(bCharSet > 0) out.charset = bCharSet;\n\n\tdata.l++;\n\tout.color = parse_BrtColor(data, 8);\n\n\tswitch(data.read_shift(1)) {\n\t\t/* case 0: out.scheme = \"none\": break; */\n\t\tcase 1: out.scheme = \"major\"; break;\n\t\tcase 2: out.scheme = \"minor\"; break;\n\t}\n\n\tout.name = parse_XLWideString(data, length - 21);\n\n\treturn out;\n}\nfunction write_BrtFont(font/*:any*/, o) {\n\tif(!o) o = new_buf(25+4*32);\n\to.write_shift(2, font.sz * 20);\n\twrite_FontFlags(font, o);\n\to.write_shift(2, font.bold ? 0x02BC : 0x0190);\n\tvar sss = 0;\n\tif(font.vertAlign == \"superscript\") sss = 1;\n\telse if(font.vertAlign == \"subscript\") sss = 2;\n\to.write_shift(2, sss);\n\to.write_shift(1, font.underline || 0);\n\to.write_shift(1, font.family || 0);\n\to.write_shift(1, font.charset || 0);\n\to.write_shift(1, 0);\n\twrite_BrtColor(font.color, o);\n\tvar scheme = 0;\n\tif(font.scheme == \"major\") scheme = 1;\n\tif(font.scheme == \"minor\") scheme = 2;\n\to.write_shift(1, scheme);\n\twrite_XLWideString(font.name, o);\n\treturn o.length > o.l ? o.slice(0, o.l) : o;\n}\n\n/* [MS-XLSB] 2.4.650 BrtFill */\nvar XLSBFillPTNames = [\n\t\"none\",\n\t\"solid\",\n\t\"mediumGray\",\n\t\"darkGray\",\n\t\"lightGray\",\n\t\"darkHorizontal\",\n\t\"darkVertical\",\n\t\"darkDown\",\n\t\"darkUp\",\n\t\"darkGrid\",\n\t\"darkTrellis\",\n\t\"lightHorizontal\",\n\t\"lightVertical\",\n\t\"lightDown\",\n\t\"lightUp\",\n\t\"lightGrid\",\n\t\"lightTrellis\",\n\t\"gray125\",\n\t\"gray0625\"\n];\nvar rev_XLSBFillPTNames/*:EvertNumType*/;\n/* TODO: gradient fill representation */\nvar parse_BrtFill = parsenoop;\nfunction write_BrtFill(fill, o) {\n\tif(!o) o = new_buf(4*3 + 8*7 + 16*1);\n\tif(!rev_XLSBFillPTNames) rev_XLSBFillPTNames = (evert(XLSBFillPTNames)/*:any*/);\n\tvar fls/*:number*/ = rev_XLSBFillPTNames[fill.patternType];\n\tif(fls == null) fls = 0x28;\n\to.write_shift(4, fls);\n\tvar j = 0;\n\tif(fls != 0x28) {\n\t\t/* TODO: custom FG Color */\n\t\twrite_BrtColor({auto:1}, o);\n\t\t/* TODO: custom BG Color */\n\t\twrite_BrtColor({auto:1}, o);\n\n\t\tfor(; j < 12; ++j) o.write_shift(4, 0);\n\t} else {\n\t\tfor(; j < 4; ++j) o.write_shift(4, 0);\n\n\t\tfor(; j < 12; ++j) o.write_shift(4, 0); /* TODO */\n\t\t/* iGradientType */\n\t\t/* xnumDegree */\n\t\t/* xnumFillToLeft */\n\t\t/* xnumFillToRight */\n\t\t/* xnumFillToTop */\n\t\t/* xnumFillToBottom */\n\t\t/* cNumStop */\n\t\t/* xfillGradientStop */\n\t}\n\treturn o.length > o.l ? o.slice(0, o.l) : o;\n}\n\n/* [MS-XLSB] 2.4.824 BrtXF */\nfunction parse_BrtXF(data, length/*:number*/) {\n\tvar tgt = data.l + length;\n\tvar ixfeParent = data.read_shift(2);\n\tvar ifmt = data.read_shift(2);\n\tdata.l = tgt;\n\treturn {ixfe:ixfeParent, numFmtId:ifmt };\n}\nfunction write_BrtXF(data, ixfeP, o) {\n\tif(!o) o = new_buf(16);\n\to.write_shift(2, ixfeP||0);\n\to.write_shift(2, data.numFmtId||0);\n\to.write_shift(2, 0); /* iFont */\n\to.write_shift(2, 0); /* iFill */\n\to.write_shift(2, 0); /* ixBorder */\n\to.write_shift(1, 0); /* trot */\n\to.write_shift(1, 0); /* indent */\n\tvar flow = 0;\n\to.write_shift(1, flow); /* flags */\n\to.write_shift(1, 0); /* flags */\n\to.write_shift(1, 0); /* xfGrbitAtr */\n\to.write_shift(1, 0);\n\treturn o;\n}\n\n/* [MS-XLSB] 2.5.4 Blxf TODO */\nfunction write_Blxf(data, o) {\n\tif(!o) o = new_buf(10);\n\to.write_shift(1, 0); /* dg */\n\to.write_shift(1, 0);\n\to.write_shift(4, 0); /* color */\n\to.write_shift(4, 0); /* color */\n\treturn o;\n}\n/* [MS-XLSB] 2.4.302 BrtBorder TODO */\nvar parse_BrtBorder = parsenoop;\nfunction write_BrtBorder(border, o) {\n\tif(!o) o = new_buf(51);\n\to.write_shift(1, 0); /* diagonal */\n\twrite_Blxf(null, o); /* top */\n\twrite_Blxf(null, o); /* bottom */\n\twrite_Blxf(null, o); /* left */\n\twrite_Blxf(null, o); /* right */\n\twrite_Blxf(null, o); /* diag */\n\treturn o.length > o.l ? o.slice(0, o.l) : o;\n}\n\n/* [MS-XLSB] 2.4.763 BrtStyle TODO */\nfunction write_BrtStyle(style, o) {\n\tif(!o) o = new_buf(12+4*10);\n\to.write_shift(4, style.xfId);\n\to.write_shift(2, 1);\n\to.write_shift(1, +style.builtinId);\n\to.write_shift(1, 0); /* iLevel */\n\twrite_XLNullableWideString(style.name || \"\", o);\n\treturn o.length > o.l ? o.slice(0, o.l) : o;\n}\n\n/* [MS-XLSB] 2.4.272 BrtBeginTableStyles */\nfunction write_BrtBeginTableStyles(cnt, defTableStyle, defPivotStyle) {\n\tvar o = new_buf(4+256*2*4);\n\to.write_shift(4, cnt);\n\twrite_XLNullableWideString(defTableStyle, o);\n\twrite_XLNullableWideString(defPivotStyle, o);\n\treturn o.length > o.l ? o.slice(0, o.l) : o;\n}\n\n/* [MS-XLSB] 2.1.7.50 Styles */\nfunction parse_sty_bin(data, themes, opts) {\n\tvar styles = {};\n\tstyles.NumberFmt = ([]/*:any*/);\n\tfor(var y in table_fmt) styles.NumberFmt[y] = table_fmt[y];\n\n\tstyles.CellXf = [];\n\tstyles.Fonts = [];\n\tvar state/*:Array*/ = [];\n\tvar pass = false;\n\trecordhopper(data, function hopper_sty(val, R, RT) {\n\t\tswitch(RT) {\n\t\t\tcase 0x002C: /* BrtFmt */\n\t\t\t\tstyles.NumberFmt[val[0]] = val[1]; SSF_load(val[1], val[0]);\n\t\t\t\tbreak;\n\t\t\tcase 0x002B: /* BrtFont */\n\t\t\t\tstyles.Fonts.push(val);\n\t\t\t\tif(val.color.theme != null && themes && themes.themeElements && themes.themeElements.clrScheme) {\n\t\t\t\t\tval.color.rgb = rgb_tint(themes.themeElements.clrScheme[val.color.theme].rgb, val.color.tint || 0);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 0x0401: /* BrtKnownFonts */ break;\n\t\t\tcase 0x002D: /* BrtFill */\n\t\t\t\tbreak;\n\t\t\tcase 0x002E: /* BrtBorder */\n\t\t\t\tbreak;\n\t\t\tcase 0x002F: /* BrtXF */\n\t\t\t\tif(state[state.length - 1] == 0x0269 /* BrtBeginCellXFs */) {\n\t\t\t\t\tstyles.CellXf.push(val);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 0x0030: /* BrtStyle */\n\t\t\tcase 0x01FB: /* BrtDXF */\n\t\t\tcase 0x023C: /* BrtMRUColor */\n\t\t\tcase 0x01DB: /* BrtIndexedColor */\n\t\t\t\tbreak;\n\n\t\t\tcase 0x0493: /* BrtDXF14 */\n\t\t\tcase 0x0836: /* BrtDXF15 */\n\t\t\tcase 0x046A: /* BrtSlicerStyleElement */\n\t\t\tcase 0x0200: /* BrtTableStyleElement */\n\t\t\tcase 0x082F: /* BrtTimelineStyleElement */\n\t\t\tcase 0x0C00: /* BrtUid */\n\t\t\t\tbreak;\n\n\t\t\tcase 0x0023: /* BrtFRTBegin */\n\t\t\t\tpass = true; break;\n\t\t\tcase 0x0024: /* BrtFRTEnd */\n\t\t\t\tpass = false; break;\n\t\t\tcase 0x0025: /* BrtACBegin */\n\t\t\t\tstate.push(RT); pass = true; break;\n\t\t\tcase 0x0026: /* BrtACEnd */\n\t\t\t\tstate.pop(); pass = false; break;\n\n\t\t\tdefault:\n\t\t\t\tif(R.T > 0) state.push(RT);\n\t\t\t\telse if(R.T < 0) state.pop();\n\t\t\t\telse if(!pass || (opts.WTF && state[state.length-1] != 0x0025 /* BrtACBegin */)) throw new Error(\"Unexpected record 0x\" + RT.toString(16));\n\t\t}\n\t});\n\treturn styles;\n}\n\nfunction write_FMTS_bin(ba, NF/*:?SSFTable*/) {\n\tif(!NF) return;\n\tvar cnt = 0;\n\t[[5,8],[23,26],[41,44],[/*63*/50,/*66],[164,*/392]].forEach(function(r) {\n\t\t/*:: if(!NF) return; */\n\t\tfor(var i = r[0]; i <= r[1]; ++i) if(NF[i] != null) ++cnt;\n\t});\n\n\tif(cnt == 0) return;\n\twrite_record(ba, 0x0267 /* BrtBeginFmts */, write_UInt32LE(cnt));\n\t[[5,8],[23,26],[41,44],[/*63*/50,/*66],[164,*/392]].forEach(function(r) {\n\t\t/*:: if(!NF) return; */\n\t\tfor(var i = r[0]; i <= r[1]; ++i) if(NF[i] != null) write_record(ba, 0x002C /* BrtFmt */, write_BrtFmt(i, NF[i]));\n\t});\n\twrite_record(ba, 0x0268 /* BrtEndFmts */);\n}\n\nfunction write_FONTS_bin(ba/*::, data*/) {\n\tvar cnt = 1;\n\n\tif(cnt == 0) return;\n\twrite_record(ba, 0x0263 /* BrtBeginFonts */, write_UInt32LE(cnt));\n\twrite_record(ba, 0x002B /* BrtFont */, write_BrtFont({\n\t\tsz:12,\n\t\tcolor: {theme:1},\n\t\tname: \"Calibri\",\n\t\tfamily: 2,\n\t\tscheme: \"minor\"\n\t}));\n\t/* 1*65491BrtFont [ACFONTS] */\n\twrite_record(ba, 0x0264 /* BrtEndFonts */);\n}\n\nfunction write_FILLS_bin(ba/*::, data*/) {\n\tvar cnt = 2;\n\n\tif(cnt == 0) return;\n\twrite_record(ba, 0x025B /* BrtBeginFills */, write_UInt32LE(cnt));\n\twrite_record(ba, 0x002D /* BrtFill */, write_BrtFill({patternType:\"none\"}));\n\twrite_record(ba, 0x002D /* BrtFill */, write_BrtFill({patternType:\"gray125\"}));\n\t/* 1*65431BrtFill */\n\twrite_record(ba, 0x025C /* BrtEndFills */);\n}\n\nfunction write_BORDERS_bin(ba/*::, data*/) {\n\tvar cnt = 1;\n\n\tif(cnt == 0) return;\n\twrite_record(ba, 0x0265 /* BrtBeginBorders */, write_UInt32LE(cnt));\n\twrite_record(ba, 0x002E /* BrtBorder */, write_BrtBorder({}));\n\t/* 1*65430BrtBorder */\n\twrite_record(ba, 0x0266 /* BrtEndBorders */);\n}\n\nfunction write_CELLSTYLEXFS_bin(ba/*::, data*/) {\n\tvar cnt = 1;\n\twrite_record(ba, 0x0272 /* BrtBeginCellStyleXFs */, write_UInt32LE(cnt));\n\twrite_record(ba, 0x002F /* BrtXF */, write_BrtXF({\n\t\tnumFmtId: 0,\n\t\tfontId: 0,\n\t\tfillId: 0,\n\t\tborderId: 0\n\t}, 0xFFFF));\n\t/* 1*65430(BrtXF *FRT) */\n\twrite_record(ba, 0x0273 /* BrtEndCellStyleXFs */);\n}\n\nfunction write_CELLXFS_bin(ba, data) {\n\twrite_record(ba, 0x0269 /* BrtBeginCellXFs */, write_UInt32LE(data.length));\n\tdata.forEach(function(c) { write_record(ba, 0x002F /* BrtXF */, write_BrtXF(c,0)); });\n\t/* 1*65430(BrtXF *FRT) */\n\twrite_record(ba, 0x026A /* BrtEndCellXFs */);\n}\n\nfunction write_STYLES_bin(ba/*::, data*/) {\n\tvar cnt = 1;\n\n\twrite_record(ba, 0x026B /* BrtBeginStyles */, write_UInt32LE(cnt));\n\twrite_record(ba, 0x0030 /* BrtStyle */, write_BrtStyle({\n\t\txfId:0,\n\t\tbuiltinId:0,\n\t\tname:\"Normal\"\n\t}));\n\t/* 1*65430(BrtStyle *FRT) */\n\twrite_record(ba, 0x026C /* BrtEndStyles */);\n}\n\nfunction write_DXFS_bin(ba/*::, data*/) {\n\tvar cnt = 0;\n\n\twrite_record(ba, 0x01F9 /* BrtBeginDXFs */, write_UInt32LE(cnt));\n\t/* *2147483647(BrtDXF *FRT) */\n\twrite_record(ba, 0x01FA /* BrtEndDXFs */);\n}\n\nfunction write_TABLESTYLES_bin(ba/*::, data*/) {\n\tvar cnt = 0;\n\n\twrite_record(ba, 0x01FC /* BrtBeginTableStyles */, write_BrtBeginTableStyles(cnt, \"TableStyleMedium9\", \"PivotStyleMedium4\"));\n\t/* *TABLESTYLE */\n\twrite_record(ba, 0x01FD /* BrtEndTableStyles */);\n}\n\nfunction write_COLORPALETTE_bin(/*::ba, data*/) {\n\treturn;\n\t/* BrtBeginColorPalette [INDEXEDCOLORS] [MRUCOLORS] BrtEndColorPalette */\n}\n\n/* [MS-XLSB] 2.1.7.50 Styles */\nfunction write_sty_bin(wb, opts) {\n\tvar ba = buf_array();\n\twrite_record(ba, 0x0116 /* BrtBeginStyleSheet */);\n\twrite_FMTS_bin(ba, wb.SSF);\n\twrite_FONTS_bin(ba, wb);\n\twrite_FILLS_bin(ba, wb);\n\twrite_BORDERS_bin(ba, wb);\n\twrite_CELLSTYLEXFS_bin(ba, wb);\n\twrite_CELLXFS_bin(ba, opts.cellXfs);\n\twrite_STYLES_bin(ba, wb);\n\twrite_DXFS_bin(ba, wb);\n\twrite_TABLESTYLES_bin(ba, wb);\n\twrite_COLORPALETTE_bin(ba, wb);\n\t/* FRTSTYLESHEET*/\n\twrite_record(ba, 0x0117 /* BrtEndStyleSheet */);\n\treturn ba.end();\n}\n/* Even though theme layout is dk1 lt1 dk2 lt2, true order is lt1 dk1 lt2 dk2 */\nvar XLSXThemeClrScheme = [\n\t'', '', '', '',\n\t'', '', '',\n\t'', '', '',\n\t'', ''\n];\n/* 20.1.6.2 clrScheme CT_ColorScheme */\nfunction parse_clrScheme(t, themes, opts) {\n\tthemes.themeElements.clrScheme = [];\n\tvar color = {};\n\t(t[0].match(tagregex)||[]).forEach(function(x) {\n\t\tvar y = parsexmltag(x);\n\t\tswitch(y[0]) {\n\t\t\t/* 20.1.6.2 clrScheme (Color Scheme) CT_ColorScheme */\n\t\t\tcase '': break;\n\n\t\t\t/* 20.1.2.3.32 srgbClr CT_SRgbColor */\n\t\t\tcase '': case '':\n\t\t\tcase '': case '':\n\t\t\tcase '': case '':\n\t\t\tcase '': case '':\n\t\t\tcase '': case '':\n\t\t\tcase '': case '':\n\t\t\tcase '': case '':\n\t\t\tcase '': case '':\n\t\t\tcase '': case '':\n\t\t\tcase '': case '':\n\t\t\tcase '': case '':\n\t\t\tcase '': case '':\n\t\t\t\tif (y[0].charAt(1) === '/') {\n\t\t\t\t\tthemes.themeElements.clrScheme[XLSXThemeClrScheme.indexOf(y[0])] = color;\n\t\t\t\t\tcolor = {};\n\t\t\t\t} else {\n\t\t\t\t\tcolor.name = y[0].slice(3, y[0].length - 1);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tdefault: if(opts && opts.WTF) throw new Error('Unrecognized ' + y[0] + ' in clrScheme');\n\t\t}\n\t});\n}\n\n/* 20.1.4.1.18 fontScheme CT_FontScheme */\nfunction parse_fontScheme(/*::t, themes, opts*/) { }\n\n/* 20.1.4.1.15 fmtScheme CT_StyleMatrix */\nfunction parse_fmtScheme(/*::t, themes, opts*/) { }\n\nvar clrsregex = /]*)>[\\s\\S]*<\\/a:clrScheme>/;\nvar fntsregex = /]*)>[\\s\\S]*<\\/a:fontScheme>/;\nvar fmtsregex = /]*)>[\\s\\S]*<\\/a:fmtScheme>/;\n\n/* 20.1.6.10 themeElements CT_BaseStyles */\nfunction parse_themeElements(data, themes, opts) {\n\tthemes.themeElements = {};\n\n\tvar t;\n\n\t[\n\t\t/* clrScheme CT_ColorScheme */\n\t\t['clrScheme', clrsregex, parse_clrScheme],\n\t\t/* fontScheme CT_FontScheme */\n\t\t['fontScheme', fntsregex, parse_fontScheme],\n\t\t/* fmtScheme CT_StyleMatrix */\n\t\t['fmtScheme', fmtsregex, parse_fmtScheme]\n\t].forEach(function(m) {\n\t\tif(!(t=data.match(m[1]))) throw new Error(m[0] + ' not found in themeElements');\n\t\tm[2](t, themes, opts);\n\t});\n}\n\nvar themeltregex = /]*)>[\\s\\S]*<\\/a:themeElements>/;\n\n/* 14.2.7 Theme Part */\nfunction parse_theme_xml(data/*:string*/, opts) {\n\t/* 20.1.6.9 theme CT_OfficeStyleSheet */\n\tif(!data || data.length === 0) data = write_theme();\n\n\tvar t;\n\tvar themes = {};\n\n\t/* themeElements CT_BaseStyles */\n\tif(!(t=data.match(themeltregex))) throw new Error('themeElements not found in theme');\n\tparse_themeElements(t[0], themes, opts);\n\tthemes.raw = data;\n\treturn themes;\n}\n\nfunction write_theme(Themes, opts)/*:string*/ {\n\tif(opts && opts.themeXLSX) return opts.themeXLSX;\n\tif(Themes && typeof Themes.raw == \"string\") return Themes.raw;\n\tvar o = [XML_HEADER];\n\to[o.length] = '';\n\to[o.length] = '';\n\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\treturn o.join(\"\");\n}\n/* [MS-XLS] 2.4.326 TODO: payload is a zip file */\nfunction parse_Theme(blob, length, opts) {\n\tvar end = blob.l + length;\n\tvar dwThemeVersion = blob.read_shift(4);\n\tif(dwThemeVersion === 124226) return;\n\tif(!opts.cellStyles) { blob.l = end; return; }\n\tvar data = blob.slice(blob.l);\n\tblob.l = end;\n\tvar zip; try { zip = zip_read(data, {type: \"array\"}); } catch(e) { return; }\n\tvar themeXML = getzipstr(zip, \"theme/theme/theme1.xml\", true);\n\tif(!themeXML) return;\n\treturn parse_theme_xml(themeXML, opts);\n}\n\n/* 2.5.49 */\nfunction parse_ColorTheme(blob/*::, length*/) { return blob.read_shift(4); }\n\n/* 2.5.155 */\nfunction parse_FullColorExt(blob/*::, length*/) {\n\tvar o = {};\n\to.xclrType = blob.read_shift(2);\n\to.nTintShade = blob.read_shift(2);\n\tswitch(o.xclrType) {\n\t\tcase 0: blob.l += 4; break;\n\t\tcase 1: o.xclrValue = parse_IcvXF(blob, 4); break;\n\t\tcase 2: o.xclrValue = parse_LongRGBA(blob, 4); break;\n\t\tcase 3: o.xclrValue = parse_ColorTheme(blob, 4); break;\n\t\tcase 4: blob.l += 4; break;\n\t}\n\tblob.l += 8;\n\treturn o;\n}\n\n/* 2.5.164 TODO: read 7 bits*/\nfunction parse_IcvXF(blob, length) {\n\treturn parsenoop(blob, length);\n}\n\n/* 2.5.280 */\nfunction parse_XFExtGradient(blob, length) {\n\treturn parsenoop(blob, length);\n}\n\n/* [MS-XLS] 2.5.108 */\nfunction parse_ExtProp(blob/*::, length*/)/*:Array*/ {\n\tvar extType = blob.read_shift(2);\n\tvar cb = blob.read_shift(2) - 4;\n\tvar o = [extType];\n\tswitch(extType) {\n\t\tcase 0x04: case 0x05: case 0x07: case 0x08:\n\t\tcase 0x09: case 0x0A: case 0x0B: case 0x0D:\n\t\t\to[1] = parse_FullColorExt(blob, cb); break;\n\t\tcase 0x06: o[1] = parse_XFExtGradient(blob, cb); break;\n\t\tcase 0x0E: case 0x0F: o[1] = blob.read_shift(cb === 1 ? 1 : 2); break;\n\t\tdefault: throw new Error(\"Unrecognized ExtProp type: \" + extType + \" \" + cb);\n\t}\n\treturn o;\n}\n\n/* 2.4.355 */\nfunction parse_XFExt(blob, length) {\n\tvar end = blob.l + length;\n\tblob.l += 2;\n\tvar ixfe = blob.read_shift(2);\n\tblob.l += 2;\n\tvar cexts = blob.read_shift(2);\n\tvar ext/*:AOA*/ = [];\n\twhile(cexts-- > 0) ext.push(parse_ExtProp(blob, end-blob.l));\n\treturn {ixfe:ixfe, ext:ext};\n}\n\n/* xf is an XF, see parse_XFExt for xfext */\nfunction update_xfext(xf, xfext) {\n\txfext.forEach(function(xfe) {\n\t\tswitch(xfe[0]) { /* 2.5.108 extPropData */\n\t\t\tcase 0x04: break; /* foreground color */\n\t\t\tcase 0x05: break; /* background color */\n\t\t\tcase 0x06: break; /* gradient fill */\n\t\t\tcase 0x07: break; /* top cell border color */\n\t\t\tcase 0x08: break; /* bottom cell border color */\n\t\t\tcase 0x09: break; /* left cell border color */\n\t\t\tcase 0x0a: break; /* right cell border color */\n\t\t\tcase 0x0b: break; /* diagonal cell border color */\n\t\t\tcase 0x0d: /* text color */\n\t\t\t\tbreak;\n\t\t\tcase 0x0e: break; /* font scheme */\n\t\t\tcase 0x0f: break; /* indentation level */\n\t\t}\n\t});\n}\n\nfunction parse_BrtMdtinfo(data, length) {\n return {\n flags: data.read_shift(4),\n version: data.read_shift(4),\n name: parse_XLWideString(data, length - 8)\n };\n}\nfunction write_BrtMdtinfo(data) {\n var o = new_buf(12 + 2 * data.name.length);\n o.write_shift(4, data.flags);\n o.write_shift(4, data.version);\n write_XLWideString(data.name, o);\n return o.slice(0, o.l);\n}\nfunction parse_BrtMdb(data) {\n var out = [];\n var cnt = data.read_shift(4);\n while (cnt-- > 0)\n out.push([data.read_shift(4), data.read_shift(4)]);\n return out;\n}\nfunction write_BrtMdb(mdb) {\n var o = new_buf(4 + 8 * mdb.length);\n o.write_shift(4, mdb.length);\n for (var i = 0; i < mdb.length; ++i) {\n o.write_shift(4, mdb[i][0]);\n o.write_shift(4, mdb[i][1]);\n }\n return o;\n}\nfunction write_BrtBeginEsfmd(cnt, name) {\n var o = new_buf(8 + 2 * name.length);\n o.write_shift(4, cnt);\n write_XLWideString(name, o);\n return o.slice(0, o.l);\n}\nfunction parse_BrtBeginEsmdb(data) {\n data.l += 4;\n return data.read_shift(4) != 0;\n}\nfunction write_BrtBeginEsmdb(cnt, cm) {\n var o = new_buf(8);\n o.write_shift(4, cnt);\n o.write_shift(4, cm ? 1 : 0);\n return o;\n}\nfunction parse_xlmeta_bin(data, name, _opts) {\n var out = { Types: [], Cell: [], Value: [] };\n var opts = _opts || {};\n var state = [];\n var pass = false;\n var metatype = 2;\n recordhopper(data, function(val, R, RT) {\n switch (RT) {\n case 335:\n out.Types.push({ name: val.name });\n break;\n case 51:\n val.forEach(function(r) {\n if (metatype == 1)\n out.Cell.push({ type: out.Types[r[0] - 1].name, index: r[1] });\n else if (metatype == 0)\n out.Value.push({ type: out.Types[r[0] - 1].name, index: r[1] });\n });\n break;\n case 337:\n metatype = val ? 1 : 0;\n break;\n case 338:\n metatype = 2;\n break;\n case 35:\n state.push(RT);\n pass = true;\n break;\n case 36:\n state.pop();\n pass = false;\n break;\n default:\n if (R.T) {\n } else if (!pass || opts.WTF && state[state.length - 1] != 35)\n throw new Error(\"Unexpected record 0x\" + RT.toString(16));\n }\n });\n return out;\n}\nfunction write_xlmeta_bin() {\n var ba = buf_array();\n write_record(ba, 332);\n write_record(ba, 334, write_UInt32LE(1));\n write_record(ba, 335, write_BrtMdtinfo({\n name: \"XLDAPR\",\n version: 12e4,\n flags: 3496657072\n }));\n write_record(ba, 336);\n write_record(ba, 339, write_BrtBeginEsfmd(1, \"XLDAPR\"));\n write_record(ba, 52);\n write_record(ba, 35, write_UInt32LE(514));\n write_record(ba, 4096, write_UInt32LE(0));\n write_record(ba, 4097, writeuint16(1));\n write_record(ba, 36);\n write_record(ba, 53);\n write_record(ba, 340);\n write_record(ba, 337, write_BrtBeginEsmdb(1, true));\n write_record(ba, 51, write_BrtMdb([[1, 0]]));\n write_record(ba, 338);\n write_record(ba, 333);\n return ba.end();\n}\nfunction parse_xlmeta_xml(data, name, opts) {\n var out = { Types: [], Cell: [], Value: [] };\n if (!data)\n return out;\n var pass = false;\n var metatype = 2;\n var lastmeta;\n data.replace(tagregex, function(x) {\n var y = parsexmltag(x);\n switch (strip_ns(y[0])) {\n case \"\":\n break;\n case \"\":\n break;\n case \"\":\n break;\n case \"\":\n break;\n case \"\":\n break;\n case \"\":\n break;\n case \"\":\n break;\n case \"\":\n metatype = 2;\n break;\n case \"\":\n metatype = 2;\n break;\n case \"\":\n case \"\":\n case \"\":\n break;\n case \"\":\n pass = false;\n break;\n case \"\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n');\n return o.join(\"\");\n}\n/* 18.6 Calculation Chain */\nfunction parse_cc_xml(data/*::, name, opts*/)/*:Array*/ {\n\tvar d = [];\n\tif(!data) return d;\n\tvar i = 1;\n\t(data.match(tagregex)||[]).forEach(function(x) {\n\t\tvar y = parsexmltag(x);\n\t\tswitch(y[0]) {\n\t\t\tcase '': case '': break;\n\t\t\t/* 18.6.1 c CT_CalcCell 1 */\n\t\t\tcase ']*r:id=\"([^\"]*)\"/)||[\"\",\"\"])[1];\n\n\treturn rels['!id'][id].Target;\n}\n\n/* L.5.5.2 SpreadsheetML Comments + VML Schema */\nvar _shapeid = 1024;\nfunction write_comments_vml(rId/*:number*/, comments) {\n\tvar csize = [21600, 21600];\n\t/* L.5.2.1.2 Path Attribute */\n\tvar bbox = [\"m0,0l0\",csize[1],csize[0],csize[1],csize[0],\"0xe\"].join(\",\");\n\tvar o = [\n\t\twritextag(\"xml\", null, { 'xmlns:v': XLMLNS.v, 'xmlns:o': XLMLNS.o, 'xmlns:x': XLMLNS.x, 'xmlns:mv': XLMLNS.mv }).replace(/\\/>/,\">\"),\n\t\twritextag(\"o:shapelayout\", writextag(\"o:idmap\", null, {'v:ext':\"edit\", 'data':rId}), {'v:ext':\"edit\"}),\n\t\twritextag(\"v:shapetype\", [\n\t\t\twritextag(\"v:stroke\", null, {joinstyle:\"miter\"}),\n\t\t\twritextag(\"v:path\", null, {gradientshapeok:\"t\", 'o:connecttype':\"rect\"})\n\t\t].join(\"\"), {id:\"_x0000_t202\", 'o:spt':202, coordsize:csize.join(\",\"),path:bbox})\n\t];\n\twhile(_shapeid < rId * 1000) _shapeid += 1000;\n\n\tcomments.forEach(function(x) {\n\tvar c = decode_cell(x[0]);\n\tvar fillopts = /*::(*/{'color2':\"#BEFF82\", 'type':\"gradient\"}/*:: :any)*/;\n\tif(fillopts.type == \"gradient\") fillopts.angle = \"-180\";\n\tvar fillparm = fillopts.type == \"gradient\" ? writextag(\"o:fill\", null, {type:\"gradientUnscaled\", 'v:ext':\"view\"}) : null;\n\tvar fillxml = writextag('v:fill', fillparm, fillopts);\n\n\tvar shadata = ({on:\"t\", 'obscured':\"t\"}/*:any*/);\n\t++_shapeid;\n\n\to = o.concat([\n\t'',\n\t\tfillxml,\n\t\twritextag(\"v:shadow\", null, shadata),\n\t\twritextag(\"v:path\", null, {'o:connecttype':\"none\"}),\n\t\t'
',\n\t\t'',\n\t\t\t'',\n\t\t\t'',\n\t\t\t/* Part 4 19.4.2.3 Anchor (Anchor) */\n\t\t\twritetag('x:Anchor', [c.c+1, 0, c.r+1, 0, c.c+3, 20, c.r+5, 20].join(\",\")),\n\t\t\twritetag('x:AutoFill', \"False\"),\n\t\t\twritetag('x:Row', String(c.r)),\n\t\t\twritetag('x:Column', String(c.c)),\n\t\t\tx[1].hidden ? '' : '',\n\t\t'',\n\t''\n\t]); });\n\to.push('');\n\treturn o.join(\"\");\n}\nfunction sheet_insert_comments(sheet, comments/*:Array*/, threaded/*:boolean*/, people/*:?Array*/) {\n\tvar dense = Array.isArray(sheet);\n\tvar cell/*:Cell*/;\n\tcomments.forEach(function(comment) {\n\t\tvar r = decode_cell(comment.ref);\n\t\tif(dense) {\n\t\t\tif(!sheet[r.r]) sheet[r.r] = [];\n\t\t\tcell = sheet[r.r][r.c];\n\t\t} else cell = sheet[comment.ref];\n\t\tif (!cell) {\n\t\t\tcell = ({t:\"z\"}/*:any*/);\n\t\t\tif(dense) sheet[r.r][r.c] = cell;\n\t\t\telse sheet[comment.ref] = cell;\n\t\t\tvar range = safe_decode_range(sheet[\"!ref\"]||\"BDWGO1000001:A1\");\n\t\t\tif(range.s.r > r.r) range.s.r = r.r;\n\t\t\tif(range.e.r < r.r) range.e.r = r.r;\n\t\t\tif(range.s.c > r.c) range.s.c = r.c;\n\t\t\tif(range.e.c < r.c) range.e.c = r.c;\n\t\t\tvar encoded = encode_range(range);\n\t\t\tif (encoded !== sheet[\"!ref\"]) sheet[\"!ref\"] = encoded;\n\t\t}\n\n\t\tif (!cell.c) cell.c = [];\n\t\tvar o/*:Comment*/ = ({a: comment.author, t: comment.t, r: comment.r, T: threaded});\n\t\tif(comment.h) o.h = comment.h;\n\n\t\t/* threaded comments always override */\n\t\tfor(var i = cell.c.length - 1; i >= 0; --i) {\n\t\t\tif(!threaded && cell.c[i].T) return;\n\t\t\tif(threaded && !cell.c[i].T) cell.c.splice(i, 1);\n\t\t}\n\t\tif(threaded && people) for(i = 0; i < people.length; ++i) {\n\t\t\tif(o.a == people[i].id) { o.a = people[i].name || o.a; break; }\n\t\t}\n\t\tcell.c.push(o);\n\t});\n}\n\n/* 18.7 Comments */\nfunction parse_comments_xml(data/*:string*/, opts)/*:Array*/ {\n\t/* 18.7.6 CT_Comments */\n\tif(data.match(/<(?:\\w+:)?comments *\\/>/)) return [];\n\tvar authors/*:Array*/ = [];\n\tvar commentList/*:Array*/ = [];\n\tvar authtag = data.match(/<(?:\\w+:)?authors>([\\s\\S]*)<\\/(?:\\w+:)?authors>/);\n\tif(authtag && authtag[1]) authtag[1].split(/<\\/\\w*:?author>/).forEach(function(x) {\n\t\tif(x === \"\" || x.trim() === \"\") return;\n\t\tvar a = x.match(/<(?:\\w+:)?author[^>]*>(.*)/);\n\t\tif(a) authors.push(a[1]);\n\t});\n\tvar cmnttag = data.match(/<(?:\\w+:)?commentList>([\\s\\S]*)<\\/(?:\\w+:)?commentList>/);\n\tif(cmnttag && cmnttag[1]) cmnttag[1].split(/<\\/\\w*:?comment>/).forEach(function(x) {\n\t\tif(x === \"\" || x.trim() === \"\") return;\n\t\tvar cm = x.match(/<(?:\\w+:)?comment[^>]*>/);\n\t\tif(!cm) return;\n\t\tvar y = parsexmltag(cm[0]);\n\t\tvar comment/*:RawComment*/ = ({ author: y.authorId && authors[y.authorId] || \"sheetjsghost\", ref: y.ref, guid: y.guid }/*:any*/);\n\t\tvar cell = decode_cell(y.ref);\n\t\tif(opts.sheetRows && opts.sheetRows <= cell.r) return;\n\t\tvar textMatch = x.match(/<(?:\\w+:)?text>([\\s\\S]*)<\\/(?:\\w+:)?text>/);\n\t\tvar rt = !!textMatch && !!textMatch[1] && parse_si(textMatch[1]) || {r:\"\",t:\"\",h:\"\"};\n\t\tcomment.r = rt.r;\n\t\tif(rt.r == \"\") rt.t = rt.h = \"\";\n\t\tcomment.t = (rt.t||\"\").replace(/\\r\\n/g,\"\\n\").replace(/\\r/g,\"\\n\");\n\t\tif(opts.cellHTML) comment.h = rt.h;\n\t\tcommentList.push(comment);\n\t});\n\treturn commentList;\n}\n\nfunction write_comments_xml(data/*::, opts*/) {\n\tvar o = [XML_HEADER, writextag('comments', null, { 'xmlns': XMLNS_main[0] })];\n\n\tvar iauthor/*:Array*/ = [];\n\to.push(\"\");\n\tdata.forEach(function(x) { x[1].forEach(function(w) { var a = escapexml(w.a);\n\t\tif(iauthor.indexOf(a) == -1) {\n\t\t\tiauthor.push(a);\n\t\t\to.push(\"\" + a + \"\");\n\t\t}\n\t\tif(w.T && w.ID && iauthor.indexOf(\"tc=\" + w.ID) == -1) {\n\t\t\tiauthor.push(\"tc=\" + w.ID);\n\t\t\to.push(\"\" + \"tc=\" + w.ID + \"\");\n\t\t}\n\t}); });\n\tif(iauthor.length == 0) { iauthor.push(\"SheetJ5\"); o.push(\"SheetJ5\"); }\n\to.push(\"\");\n\to.push(\"\");\n\tdata.forEach(function(d) {\n\t\t/* 18.7.3 CT_Comment */\n\t\tvar lastauthor = 0, ts = [];\n\t\tif(d[1][0] && d[1][0].T && d[1][0].ID) lastauthor = iauthor.indexOf(\"tc=\" + d[1][0].ID);\n\t\telse d[1].forEach(function(c) {\n\t\t\tif(c.a) lastauthor = iauthor.indexOf(escapexml(c.a));\n\t\t\tts.push(c.t||\"\");\n\t\t});\n\t\to.push('');\n\t\tif(ts.length <= 1) o.push(writetag(\"t\", escapexml(ts[0]||\"\")));\n\t\telse {\n\t\t\t/* based on Threaded Comments -> Comments projection */\n\t\t\tvar t = \"Comment:\\n \" + (ts[0]) + \"\\n\";\n\t\t\tfor(var i = 1; i < ts.length; ++i) t += \"Reply:\\n \" + ts[i] + \"\\n\";\n\t\t\to.push(writetag(\"t\", escapexml(t)));\n\t\t}\n\t\to.push('');\n\t});\n\to.push(\"\");\n\tif(o.length>2) { o[o.length] = (''); o[1]=o[1].replace(\"/>\",\">\"); }\n\treturn o.join(\"\");\n}\n\n/* [MS-XLSX] 2.1.17 */\nfunction parse_tcmnt_xml(data/*:string*/, opts)/*:Array*/ {\n\tvar out = [];\n\tvar pass = false, comment = {}, tidx = 0;\n\tdata.replace(tagregex, function xml_tcmnt(x, idx) {\n\t\tvar y/*:any*/ = parsexmltag(x);\n\t\tswitch(strip_ns(y[0])) {\n\t\t\tcase '': break;\n\n\t\t\t/* 2.6.205 threadedComment CT_ThreadedComment */\n\t\t\tcase '': if(comment.t != null) out.push(comment); break;\n\n\t\t\tcase '': case '': comment.t = data.slice(tidx, idx).replace(/\\r\\n/g, \"\\n\").replace(/\\r/g, \"\\n\"); break;\n\n\t\t\t/* 2.6.206 mentions CT_ThreadedCommentMentions TODO */\n\t\t\tcase '': pass = true; break;\n\t\t\tcase '': pass = false; break;\n\n\t\t\t/* 2.6.202 mention CT_Mention TODO */\n\n\t\t\t/* 18.2.10 extLst CT_ExtensionList ? */\n\t\t\tcase '': case '
': case '': break;\n\t\t\t/* 18.2.7 ext CT_Extension + */\n\t\t\tcase '': pass=false; break;\n\n\t\t\tdefault: if(!pass && opts.WTF) throw new Error('unrecognized ' + y[0] + ' in threaded comments');\n\t\t}\n\t\treturn x;\n\t});\n\treturn out;\n}\n\nfunction write_tcmnt_xml(comments, people, opts) {\n\tvar o = [XML_HEADER, writextag('ThreadedComments', null, { 'xmlns': XMLNS.TCMNT }).replace(/[\\/]>/, \">\")];\n\tcomments.forEach(function(carr) {\n\t\tvar rootid = \"\";\n\t\t(carr[1] || []).forEach(function(c, idx) {\n\t\t\tif(!c.T) { delete c.ID; return; }\n\t\t\tif(c.a && people.indexOf(c.a) == -1) people.push(c.a);\n\t\t\tvar tcopts = {\n\t\t\t\tref: carr[0],\n\t\t\t\tid: \"{54EE7951-7262-4200-6969-\" + (\"000000000000\" + opts.tcid++).slice(-12) + \"}\"\n\t\t\t};\n\t\t\tif(idx == 0) rootid = tcopts.id;\n\t\t\telse tcopts.parentId = rootid;\n\t\t\tc.ID = tcopts.id;\n\t\t\tif(c.a) tcopts.personId = \"{54EE7950-7262-4200-6969-\" + (\"000000000000\" + people.indexOf(c.a)).slice(-12) + \"}\";\n\t\t\to.push(writextag('threadedComment', writetag('text', c.t||\"\"), tcopts));\n\t\t});\n\t});\n\to.push('');\n\treturn o.join(\"\");\n}\n\n/* [MS-XLSX] 2.1.18 */\nfunction parse_people_xml(data/*:string*/, opts) {\n\tvar out = [];\n\tvar pass = false;\n\tdata.replace(tagregex, function xml_tcmnt(x) {\n\t\tvar y/*:any*/ = parsexmltag(x);\n\t\tswitch(strip_ns(y[0])) {\n\t\t\tcase '': break;\n\n\t\t\t/* 2.6.203 person CT_Person TODO: providers */\n\t\t\tcase '': break;\n\n\t\t\t/* 18.2.10 extLst CT_ExtensionList ? */\n\t\t\tcase '': case '': case '': break;\n\t\t\t/* 18.2.7 ext CT_Extension + */\n\t\t\tcase '': pass=false; break;\n\n\t\t\tdefault: if(!pass && opts.WTF) throw new Error('unrecognized ' + y[0] + ' in threaded comments');\n\t\t}\n\t\treturn x;\n\t});\n\treturn out;\n}\nfunction write_people_xml(people/*, opts*/) {\n\tvar o = [XML_HEADER, writextag('personList', null, {\n\t\t'xmlns': XMLNS.TCMNT,\n\t\t'xmlns:x': XMLNS_main[0]\n\t}).replace(/[\\/]>/, \">\")];\n\tpeople.forEach(function(person, idx) {\n\t\to.push(writextag('person', null, {\n\t\t\tdisplayName: person,\n\t\t\tid: \"{54EE7950-7262-4200-6969-\" + (\"000000000000\" + idx).slice(-12) + \"}\",\n\t\t\tuserId: person,\n\t\t\tproviderId: \"None\"\n\t\t}));\n\t});\n\to.push(\"\");\n\treturn o.join(\"\");\n}\n/* [MS-XLSB] 2.4.28 BrtBeginComment */\nfunction parse_BrtBeginComment(data) {\n\tvar out = {};\n\tout.iauthor = data.read_shift(4);\n\tvar rfx = parse_UncheckedRfX(data, 16);\n\tout.rfx = rfx.s;\n\tout.ref = encode_cell(rfx.s);\n\tdata.l += 16; /*var guid = parse_GUID(data); */\n\treturn out;\n}\nfunction write_BrtBeginComment(data, o) {\n\tif(o == null) o = new_buf(36);\n\to.write_shift(4, data[1].iauthor);\n\twrite_UncheckedRfX((data[0]/*:any*/), o);\n\to.write_shift(4, 0);\n\to.write_shift(4, 0);\n\to.write_shift(4, 0);\n\to.write_shift(4, 0);\n\treturn o;\n}\n\n/* [MS-XLSB] 2.4.327 BrtCommentAuthor */\nvar parse_BrtCommentAuthor = parse_XLWideString;\nfunction write_BrtCommentAuthor(data) { return write_XLWideString(data.slice(0, 54)); }\n\n/* [MS-XLSB] 2.1.7.8 Comments */\nfunction parse_comments_bin(data, opts)/*:Array*/ {\n\tvar out/*:Array*/ = [];\n\tvar authors/*:Array*/ = [];\n\tvar c = {};\n\tvar pass = false;\n\trecordhopper(data, function hopper_cmnt(val, R, RT) {\n\t\tswitch(RT) {\n\t\t\tcase 0x0278: /* 'BrtCommentAuthor' */\n\t\t\t\tauthors.push(val); break;\n\t\t\tcase 0x027B: /* 'BrtBeginComment' */\n\t\t\t\tc = val; break;\n\t\t\tcase 0x027D: /* 'BrtCommentText' */\n\t\t\t\tc.t = val.t; c.h = val.h; c.r = val.r; break;\n\t\t\tcase 0x027C: /* 'BrtEndComment' */\n\t\t\t\tc.author = authors[c.iauthor];\n\t\t\t\tdelete (c/*:any*/).iauthor;\n\t\t\t\tif(opts.sheetRows && c.rfx && opts.sheetRows <= c.rfx.r) break;\n\t\t\t\tif(!c.t) c.t = \"\";\n\t\t\t\tdelete c.rfx; out.push(c); break;\n\n\t\t\tcase 0x0C00: /* 'BrtUid' */\n\t\t\t\tbreak;\n\n\t\t\tcase 0x0023: /* 'BrtFRTBegin' */\n\t\t\t\tpass = true; break;\n\t\t\tcase 0x0024: /* 'BrtFRTEnd' */\n\t\t\t\tpass = false; break;\n\t\t\tcase 0x0025: /* 'BrtACBegin' */ break;\n\t\t\tcase 0x0026: /* 'BrtACEnd' */ break;\n\n\n\t\t\tdefault:\n\t\t\t\tif(R.T){/* empty */}\n\t\t\t\telse if(!pass || opts.WTF) throw new Error(\"Unexpected record 0x\" + RT.toString(16));\n\t\t}\n\t});\n\treturn out;\n}\n\nfunction write_comments_bin(data/*::, opts*/) {\n\tvar ba = buf_array();\n\tvar iauthor/*:Array*/ = [];\n\twrite_record(ba, 0x0274 /* BrtBeginComments */);\n\n\twrite_record(ba, 0x0276 /* BrtBeginCommentAuthors */);\n\tdata.forEach(function(comment) {\n\t\tcomment[1].forEach(function(c) {\n\t\t\tif(iauthor.indexOf(c.a) > -1) return;\n\t\t\tiauthor.push(c.a.slice(0,54));\n\t\t\twrite_record(ba, 0x0278 /* BrtCommentAuthor */, write_BrtCommentAuthor(c.a));\n\t\t});\n\t});\n\twrite_record(ba, 0x0277 /* BrtEndCommentAuthors */);\n\n\twrite_record(ba, 0x0279 /* BrtBeginCommentList */);\n\tdata.forEach(function(comment) {\n\t\tcomment[1].forEach(function(c) {\n\t\t\tc.iauthor = iauthor.indexOf(c.a);\n\t\t\tvar range = {s:decode_cell(comment[0]),e:decode_cell(comment[0])};\n\t\t\twrite_record(ba, 0x027B /* BrtBeginComment */, write_BrtBeginComment([range, c]));\n\t\t\tif(c.t && c.t.length > 0) write_record(ba, 0x027D /* BrtCommentText */, write_BrtCommentText(c));\n\t\t\twrite_record(ba, 0x027C /* BrtEndComment */);\n\t\t\tdelete c.iauthor;\n\t\t});\n\t});\n\twrite_record(ba, 0x027A /* BrtEndCommentList */);\n\n\twrite_record(ba, 0x0275 /* BrtEndComments */);\n\treturn ba.end();\n}\nvar CT_VBA = \"application/vnd.ms-office.vbaProject\";\nfunction make_vba_xls(cfb) {\n var newcfb = CFB.utils.cfb_new({ root: \"R\" });\n cfb.FullPaths.forEach(function(p, i) {\n if (p.slice(-1) === \"/\" || !p.match(/_VBA_PROJECT_CUR/))\n return;\n var newpath = p.replace(/^[^\\/]*/, \"R\").replace(/\\/_VBA_PROJECT_CUR\\u0000*/, \"\");\n CFB.utils.cfb_add(newcfb, newpath, cfb.FileIndex[i].content);\n });\n return CFB.write(newcfb);\n}\nfunction fill_vba_xls(cfb, vba) {\n vba.FullPaths.forEach(function(p, i) {\n if (i == 0)\n return;\n var newpath = p.replace(/[^\\/]*[\\/]/, \"/_VBA_PROJECT_CUR/\");\n if (newpath.slice(-1) !== \"/\")\n CFB.utils.cfb_add(cfb, newpath, vba.FileIndex[i].content);\n });\n}\nvar VBAFMTS = [\"xlsb\", \"xlsm\", \"xlam\", \"biff8\", \"xla\"];\n/* macro and dialog sheet stubs */\nfunction parse_ds_bin(/*::data:any, opts, idx:number, rels, wb, themes, styles*/)/*:Worksheet*/ { return {'!type':'dialog'}; }\nfunction parse_ds_xml(/*::data:any, opts, idx:number, rels, wb, themes, styles*/)/*:Worksheet*/ { return {'!type':'dialog'}; }\nfunction parse_ms_bin(/*::data:any, opts, idx:number, rels, wb, themes, styles*/)/*:Worksheet*/ { return {'!type':'macro'}; }\nfunction parse_ms_xml(/*::data:any, opts, idx:number, rels, wb, themes, styles*/)/*:Worksheet*/ { return {'!type':'macro'}; }\n/* TODO: it will be useful to parse the function str */\nvar rc_to_a1 = /*#__PURE__*/(function(){\n\tvar rcregex = /(^|[^A-Za-z_])R(\\[?-?\\d+\\]|[1-9]\\d*|)C(\\[?-?\\d+\\]|[1-9]\\d*|)(?![A-Za-z0-9_])/g;\n\tvar rcbase/*:Cell*/ = ({r:0,c:0}/*:any*/);\n\tfunction rcfunc($$,$1,$2,$3) {\n\t\tvar cRel = false, rRel = false;\n\n\t\tif($2.length == 0) rRel = true;\n\t\telse if($2.charAt(0) == \"[\") { rRel = true; $2 = $2.slice(1, -1); }\n\n\t\tif($3.length == 0) cRel = true;\n\t\telse if($3.charAt(0) == \"[\") { cRel = true; $3 = $3.slice(1, -1); }\n\n\t\tvar R = $2.length>0?parseInt($2,10)|0:0, C = $3.length>0?parseInt($3,10)|0:0;\n\n\t\tif(cRel) C += rcbase.c; else --C;\n\t\tif(rRel) R += rcbase.r; else --R;\n\t\treturn $1 + (cRel ? \"\" : \"$\") + encode_col(C) + (rRel ? \"\" : \"$\") + encode_row(R);\n\t}\n\treturn function rc_to_a1(fstr/*:string*/, base/*:Cell*/)/*:string*/ {\n\t\trcbase = base;\n\t\treturn fstr.replace(rcregex, rcfunc);\n\t};\n})();\n\nvar crefregex = /(^|[^._A-Z0-9])([$]?)([A-Z]{1,2}|[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D])([$]?)(10[0-3]\\d{4}|104[0-7]\\d{3}|1048[0-4]\\d{2}|10485[0-6]\\d|104857[0-6]|[1-9]\\d{0,5})(?![_.\\(A-Za-z0-9])/g;\nvar a1_to_rc = /*#__PURE__*/(function(){\n\treturn function a1_to_rc(fstr/*:string*/, base/*:CellAddress*/) {\n\t\treturn fstr.replace(crefregex, function($0, $1, $2, $3, $4, $5) {\n\t\t\tvar c = decode_col($3) - ($2 ? 0 : base.c);\n\t\t\tvar r = decode_row($5) - ($4 ? 0 : base.r);\n\t\t\tvar R = (r == 0 ? \"\" : !$4 ? \"[\" + r + \"]\" : (r+1));\n\t\t\tvar C = (c == 0 ? \"\" : !$2 ? \"[\" + c + \"]\" : (c+1));\n\t\t\treturn $1 + \"R\" + R + \"C\" + C;\n\t\t});\n\t};\n})();\n\n/* no defined name can collide with a valid cell address A1:XFD1048576 ... except LOG10! */\nfunction shift_formula_str(f/*:string*/, delta/*:Cell*/)/*:string*/ {\n\treturn f.replace(crefregex, function($0, $1, $2, $3, $4, $5) {\n\t\treturn $1+($2==\"$\" ? $2+$3 : encode_col(decode_col($3)+delta.c))+($4==\"$\" ? $4+$5 : encode_row(decode_row($5) + delta.r));\n\t});\n}\n\nfunction shift_formula_xlsx(f/*:string*/, range/*:string*/, cell/*:string*/)/*:string*/ {\n\tvar r = decode_range(range), s = r.s, c = decode_cell(cell);\n\tvar delta = {r:c.r - s.r, c:c.c - s.c};\n\treturn shift_formula_str(f, delta);\n}\n\n/* TODO: parse formula */\nfunction fuzzyfmla(f/*:string*/)/*:boolean*/ {\n\tif(f.length == 1) return false;\n\treturn true;\n}\n\nfunction _xlfn(f/*:string*/)/*:string*/ {\n\treturn f.replace(/_xlfn\\./g,\"\");\n}\nfunction parseread1(blob) { blob.l+=1; return; }\n\n/* [MS-XLS] 2.5.51 */\nfunction parse_ColRelU(blob, length) {\n\tvar c = blob.read_shift(length == 1 ? 1 : 2);\n\treturn [c & 0x3FFF, (c >> 14) & 1, (c >> 15) & 1];\n}\n\n/* [MS-XLS] 2.5.198.105 ; [MS-XLSB] 2.5.97.89 */\nfunction parse_RgceArea(blob, length, opts) {\n\tvar w = 2;\n\tif(opts) {\n\t\tif(opts.biff >= 2 && opts.biff <= 5) return parse_RgceArea_BIFF2(blob, length, opts);\n\t\telse if(opts.biff == 12) w = 4;\n\t}\n\tvar r=blob.read_shift(w), R=blob.read_shift(w);\n\tvar c=parse_ColRelU(blob, 2);\n\tvar C=parse_ColRelU(blob, 2);\n\treturn { s:{r:r, c:c[0], cRel:c[1], rRel:c[2]}, e:{r:R, c:C[0], cRel:C[1], rRel:C[2]} };\n}\n/* BIFF 2-5 encodes flags in the row field */\nfunction parse_RgceArea_BIFF2(blob/*::, length, opts*/) {\n\tvar r=parse_ColRelU(blob, 2), R=parse_ColRelU(blob, 2);\n\tvar c=blob.read_shift(1);\n\tvar C=blob.read_shift(1);\n\treturn { s:{r:r[0], c:c, cRel:r[1], rRel:r[2]}, e:{r:R[0], c:C, cRel:R[1], rRel:R[2]} };\n}\n\n/* [MS-XLS] 2.5.198.105 ; [MS-XLSB] 2.5.97.90 */\nfunction parse_RgceAreaRel(blob, length, opts) {\n\tif(opts.biff < 8) return parse_RgceArea_BIFF2(blob, length, opts);\n\tvar r=blob.read_shift(opts.biff == 12 ? 4 : 2), R=blob.read_shift(opts.biff == 12 ? 4 : 2);\n\tvar c=parse_ColRelU(blob, 2);\n\tvar C=parse_ColRelU(blob, 2);\n\treturn { s:{r:r, c:c[0], cRel:c[1], rRel:c[2]}, e:{r:R, c:C[0], cRel:C[1], rRel:C[2]} };\n}\n\n/* [MS-XLS] 2.5.198.109 ; [MS-XLSB] 2.5.97.91 */\nfunction parse_RgceLoc(blob, length, opts) {\n\tif(opts && opts.biff >= 2 && opts.biff <= 5) return parse_RgceLoc_BIFF2(blob, length, opts);\n\tvar r = blob.read_shift(opts && opts.biff == 12 ? 4 : 2);\n\tvar c = parse_ColRelU(blob, 2);\n\treturn {r:r, c:c[0], cRel:c[1], rRel:c[2]};\n}\nfunction parse_RgceLoc_BIFF2(blob/*::, length, opts*/) {\n\tvar r = parse_ColRelU(blob, 2);\n\tvar c = blob.read_shift(1);\n\treturn {r:r[0], c:c, cRel:r[1], rRel:r[2]};\n}\n\n/* [MS-XLS] 2.5.198.107, 2.5.47 */\nfunction parse_RgceElfLoc(blob/*::, length, opts*/) {\n\tvar r = blob.read_shift(2);\n\tvar c = blob.read_shift(2);\n\treturn {r:r, c:c & 0xFF, fQuoted:!!(c & 0x4000), cRel:c>>15, rRel:c>>15 };\n}\n\n/* [MS-XLS] 2.5.198.111 ; [MS-XLSB] 2.5.97.92 TODO */\nfunction parse_RgceLocRel(blob, length, opts) {\n\tvar biff = opts && opts.biff ? opts.biff : 8;\n\tif(biff >= 2 && biff <= 5) return parse_RgceLocRel_BIFF2(blob, length, opts);\n\tvar r = blob.read_shift(biff >= 12 ? 4 : 2);\n\tvar cl = blob.read_shift(2);\n\tvar cRel = (cl & 0x4000) >> 14, rRel = (cl & 0x8000) >> 15;\n\tcl &= 0x3FFF;\n\tif(rRel == 1) while(r > 0x7FFFF) r -= 0x100000;\n\tif(cRel == 1) while(cl > 0x1FFF) cl = cl - 0x4000;\n\treturn {r:r,c:cl,cRel:cRel,rRel:rRel};\n}\nfunction parse_RgceLocRel_BIFF2(blob/*::, length:number, opts*/) {\n\tvar rl = blob.read_shift(2);\n\tvar c = blob.read_shift(1);\n\tvar rRel = (rl & 0x8000) >> 15, cRel = (rl & 0x4000) >> 14;\n\trl &= 0x3FFF;\n\tif(rRel == 1 && rl >= 0x2000) rl = rl - 0x4000;\n\tif(cRel == 1 && c >= 0x80) c = c - 0x100;\n\treturn {r:rl,c:c,cRel:cRel,rRel:rRel};\n}\n\n/* [MS-XLS] 2.5.198.27 ; [MS-XLSB] 2.5.97.18 */\nfunction parse_PtgArea(blob, length, opts) {\n\tvar type = (blob[blob.l++] & 0x60) >> 5;\n\tvar area = parse_RgceArea(blob, opts.biff >= 2 && opts.biff <= 5 ? 6 : 8, opts);\n\treturn [type, area];\n}\n\n/* [MS-XLS] 2.5.198.28 ; [MS-XLSB] 2.5.97.19 */\nfunction parse_PtgArea3d(blob, length, opts) {\n\tvar type = (blob[blob.l++] & 0x60) >> 5;\n\tvar ixti = blob.read_shift(2, 'i');\n\tvar w = 8;\n\tif(opts) switch(opts.biff) {\n\t\tcase 5: blob.l += 12; w = 6; break;\n\t\tcase 12: w = 12; break;\n\t}\n\tvar area = parse_RgceArea(blob, w, opts);\n\treturn [type, ixti, area];\n}\n\n/* [MS-XLS] 2.5.198.29 ; [MS-XLSB] 2.5.97.20 */\nfunction parse_PtgAreaErr(blob, length, opts) {\n\tvar type = (blob[blob.l++] & 0x60) >> 5;\n\tblob.l += opts && (opts.biff > 8) ? 12 : (opts.biff < 8 ? 6 : 8);\n\treturn [type];\n}\n/* [MS-XLS] 2.5.198.30 ; [MS-XLSB] 2.5.97.21 */\nfunction parse_PtgAreaErr3d(blob, length, opts) {\n\tvar type = (blob[blob.l++] & 0x60) >> 5;\n\tvar ixti = blob.read_shift(2);\n\tvar w = 8;\n\tif(opts) switch(opts.biff) {\n\t\tcase 5: blob.l += 12; w = 6; break;\n\t\tcase 12: w = 12; break;\n\t}\n\tblob.l += w;\n\treturn [type, ixti];\n}\n\n/* [MS-XLS] 2.5.198.31 ; [MS-XLSB] 2.5.97.22 */\nfunction parse_PtgAreaN(blob, length, opts) {\n\tvar type = (blob[blob.l++] & 0x60) >> 5;\n\tvar area = parse_RgceAreaRel(blob, length - 1, opts);\n\treturn [type, area];\n}\n\n/* [MS-XLS] 2.5.198.32 ; [MS-XLSB] 2.5.97.23 */\nfunction parse_PtgArray(blob, length, opts) {\n\tvar type = (blob[blob.l++] & 0x60) >> 5;\n\tblob.l += opts.biff == 2 ? 6 : opts.biff == 12 ? 14 : 7;\n\treturn [type];\n}\n\n/* [MS-XLS] 2.5.198.33 ; [MS-XLSB] 2.5.97.24 */\nfunction parse_PtgAttrBaxcel(blob) {\n\tvar bitSemi = blob[blob.l+1] & 0x01; /* 1 = volatile */\n\tvar bitBaxcel = 1;\n\tblob.l += 4;\n\treturn [bitSemi, bitBaxcel];\n}\n\n/* [MS-XLS] 2.5.198.34 ; [MS-XLSB] 2.5.97.25 */\nfunction parse_PtgAttrChoose(blob, length, opts)/*:Array*/ {\n\tblob.l +=2;\n\tvar offset = blob.read_shift(opts && opts.biff == 2 ? 1 : 2);\n\tvar o/*:Array*/ = [];\n\t/* offset is 1 less than the number of elements */\n\tfor(var i = 0; i <= offset; ++i) o.push(blob.read_shift(opts && opts.biff == 2 ? 1 : 2));\n\treturn o;\n}\n\n/* [MS-XLS] 2.5.198.35 ; [MS-XLSB] 2.5.97.26 */\nfunction parse_PtgAttrGoto(blob, length, opts) {\n\tvar bitGoto = (blob[blob.l+1] & 0xFF) ? 1 : 0;\n\tblob.l += 2;\n\treturn [bitGoto, blob.read_shift(opts && opts.biff == 2 ? 1 : 2)];\n}\n\n/* [MS-XLS] 2.5.198.36 ; [MS-XLSB] 2.5.97.27 */\nfunction parse_PtgAttrIf(blob, length, opts) {\n\tvar bitIf = (blob[blob.l+1] & 0xFF) ? 1 : 0;\n\tblob.l += 2;\n\treturn [bitIf, blob.read_shift(opts && opts.biff == 2 ? 1 : 2)];\n}\n\n/* [MS-XLSB] 2.5.97.28 */\nfunction parse_PtgAttrIfError(blob) {\n\tvar bitIf = (blob[blob.l+1] & 0xFF) ? 1 : 0;\n\tblob.l += 2;\n\treturn [bitIf, blob.read_shift(2)];\n}\n\n/* [MS-XLS] 2.5.198.37 ; [MS-XLSB] 2.5.97.29 */\nfunction parse_PtgAttrSemi(blob, length, opts) {\n\tvar bitSemi = (blob[blob.l+1] & 0xFF) ? 1 : 0;\n\tblob.l += opts && opts.biff == 2 ? 3 : 4;\n\treturn [bitSemi];\n}\n\n/* [MS-XLS] 2.5.198.40 ; [MS-XLSB] 2.5.97.32 */\nfunction parse_PtgAttrSpaceType(blob/*::, length*/) {\n\tvar type = blob.read_shift(1), cch = blob.read_shift(1);\n\treturn [type, cch];\n}\n\n/* [MS-XLS] 2.5.198.38 ; [MS-XLSB] 2.5.97.30 */\nfunction parse_PtgAttrSpace(blob) {\n\tblob.read_shift(2);\n\treturn parse_PtgAttrSpaceType(blob, 2);\n}\n\n/* [MS-XLS] 2.5.198.39 ; [MS-XLSB] 2.5.97.31 */\nfunction parse_PtgAttrSpaceSemi(blob) {\n\tblob.read_shift(2);\n\treturn parse_PtgAttrSpaceType(blob, 2);\n}\n\n/* [MS-XLS] 2.5.198.84 ; [MS-XLSB] 2.5.97.68 TODO */\nfunction parse_PtgRef(blob, length, opts) {\n\t//var ptg = blob[blob.l] & 0x1F;\n\tvar type = (blob[blob.l] & 0x60)>>5;\n\tblob.l += 1;\n\tvar loc = parse_RgceLoc(blob, 0, opts);\n\treturn [type, loc];\n}\n\n/* [MS-XLS] 2.5.198.88 ; [MS-XLSB] 2.5.97.72 TODO */\nfunction parse_PtgRefN(blob, length, opts) {\n\tvar type = (blob[blob.l] & 0x60)>>5;\n\tblob.l += 1;\n\tvar loc = parse_RgceLocRel(blob, 0, opts);\n\treturn [type, loc];\n}\n\n/* [MS-XLS] 2.5.198.85 ; [MS-XLSB] 2.5.97.69 TODO */\nfunction parse_PtgRef3d(blob, length, opts) {\n\tvar type = (blob[blob.l] & 0x60)>>5;\n\tblob.l += 1;\n\tvar ixti = blob.read_shift(2); // XtiIndex\n\tif(opts && opts.biff == 5) blob.l += 12;\n\tvar loc = parse_RgceLoc(blob, 0, opts); // TODO: or RgceLocRel\n\treturn [type, ixti, loc];\n}\n\n\n/* [MS-XLS] 2.5.198.62 ; [MS-XLSB] 2.5.97.45 TODO */\nfunction parse_PtgFunc(blob, length, opts) {\n\t//var ptg = blob[blob.l] & 0x1F;\n\tvar type = (blob[blob.l] & 0x60)>>5;\n\tblob.l += 1;\n\tvar iftab = blob.read_shift(opts && opts.biff <= 3 ? 1 : 2);\n\treturn [FtabArgc[iftab], Ftab[iftab], type];\n}\n/* [MS-XLS] 2.5.198.63 ; [MS-XLSB] 2.5.97.46 TODO */\nfunction parse_PtgFuncVar(blob, length, opts) {\n\tvar type = blob[blob.l++];\n\tvar cparams = blob.read_shift(1), tab = opts && opts.biff <= 3 ? [(type == 0x58 ? -1 : 0), blob.read_shift(1)]: parsetab(blob);\n\treturn [cparams, (tab[0] === 0 ? Ftab : Cetab)[tab[1]]];\n}\n\nfunction parsetab(blob) {\n\treturn [blob[blob.l+1]>>7, blob.read_shift(2) & 0x7FFF];\n}\n\n/* [MS-XLS] 2.5.198.41 ; [MS-XLSB] 2.5.97.33 */\nfunction parse_PtgAttrSum(blob, length, opts) {\n\tblob.l += opts && opts.biff == 2 ? 3 : 4; return;\n}\n\n/* [MS-XLS] 2.5.198.58 ; [MS-XLSB] 2.5.97.40 */\nfunction parse_PtgExp(blob, length, opts) {\n\tblob.l++;\n\tif(opts && opts.biff == 12) return [blob.read_shift(4, 'i'), 0];\n\tvar row = blob.read_shift(2);\n\tvar col = blob.read_shift(opts && opts.biff == 2 ? 1 : 2);\n\treturn [row, col];\n}\n\n/* [MS-XLS] 2.5.198.57 ; [MS-XLSB] 2.5.97.39 */\nfunction parse_PtgErr(blob) { blob.l++; return BErr[blob.read_shift(1)]; }\n\n/* [MS-XLS] 2.5.198.66 ; [MS-XLSB] 2.5.97.49 */\nfunction parse_PtgInt(blob) { blob.l++; return blob.read_shift(2); }\n\n/* [MS-XLS] 2.5.198.42 ; [MS-XLSB] 2.5.97.34 */\nfunction parse_PtgBool(blob) { blob.l++; return blob.read_shift(1)!==0;}\n\n/* [MS-XLS] 2.5.198.79 ; [MS-XLSB] 2.5.97.63 */\nfunction parse_PtgNum(blob) { blob.l++; return parse_Xnum(blob, 8); }\n\n/* [MS-XLS] 2.5.198.89 ; [MS-XLSB] 2.5.97.74 */\nfunction parse_PtgStr(blob, length, opts) { blob.l++; return parse_ShortXLUnicodeString(blob, length-1, opts); }\n\n/* [MS-XLS] 2.5.192.112 + 2.5.192.11{3,4,5,6,7} */\n/* [MS-XLSB] 2.5.97.93 + 2.5.97.9{4,5,6,7} */\nfunction parse_SerAr(blob, biff/*:number*/) {\n\tvar val = [blob.read_shift(1)];\n\tif(biff == 12) switch(val[0]) {\n\t\tcase 0x02: val[0] = 0x04; break; /* SerBool */\n\t\tcase 0x04: val[0] = 0x10; break; /* SerErr */\n\t\tcase 0x00: val[0] = 0x01; break; /* SerNum */\n\t\tcase 0x01: val[0] = 0x02; break; /* SerStr */\n\t}\n\tswitch(val[0]) {\n\t\tcase 0x04: /* SerBool -- boolean */\n\t\t\tval[1] = parsebool(blob, 1) ? 'TRUE' : 'FALSE';\n\t\t\tif(biff != 12) blob.l += 7; break;\n\t\tcase 0x25: /* appears to be an alias */\n\t\tcase 0x10: /* SerErr -- error */\n\t\t\tval[1] = BErr[blob[blob.l]];\n\t\t\tblob.l += ((biff == 12) ? 4 : 8); break;\n\t\tcase 0x00: /* SerNil -- honestly, I'm not sure how to reproduce this */\n\t\t\tblob.l += 8; break;\n\t\tcase 0x01: /* SerNum -- Xnum */\n\t\t\tval[1] = parse_Xnum(blob, 8); break;\n\t\tcase 0x02: /* SerStr -- XLUnicodeString (<256 chars) */\n\t\t\tval[1] = parse_XLUnicodeString2(blob, 0, {biff:biff > 0 && biff < 8 ? 2 : biff}); break;\n\t\tdefault: throw new Error(\"Bad SerAr: \" + val[0]); /* Unreachable */\n\t}\n\treturn val;\n}\n\n/* [MS-XLS] 2.5.198.61 ; [MS-XLSB] 2.5.97.44 */\nfunction parse_PtgExtraMem(blob, cce, opts) {\n\tvar count = blob.read_shift((opts.biff == 12) ? 4 : 2);\n\tvar out/*:Array*/ = [];\n\tfor(var i = 0; i != count; ++i) out.push(((opts.biff == 12) ? parse_UncheckedRfX : parse_Ref8U)(blob, 8));\n\treturn out;\n}\n\n/* [MS-XLS] 2.5.198.59 ; [MS-XLSB] 2.5.97.41 */\nfunction parse_PtgExtraArray(blob, length, opts) {\n\tvar rows = 0, cols = 0;\n\tif(opts.biff == 12) {\n\t\trows = blob.read_shift(4); // DRw\n\t\tcols = blob.read_shift(4); // DCol\n\t} else {\n\t\tcols = 1 + blob.read_shift(1); //DColByteU\n\t\trows = 1 + blob.read_shift(2); //DRw\n\t}\n\tif(opts.biff >= 2 && opts.biff < 8) { --rows; if(--cols == 0) cols = 0x100; }\n\t// $FlowIgnore\n\tfor(var i = 0, o/*:Array>*/ = []; i != rows && (o[i] = []); ++i)\n\t\tfor(var j = 0; j != cols; ++j) o[i][j] = parse_SerAr(blob, opts.biff);\n\treturn o;\n}\n\n/* [MS-XLS] 2.5.198.76 ; [MS-XLSB] 2.5.97.60 */\nfunction parse_PtgName(blob, length, opts) {\n\tvar type = (blob.read_shift(1) >>> 5) & 0x03;\n\tvar w = (!opts || (opts.biff >= 8)) ? 4 : 2;\n\tvar nameindex = blob.read_shift(w);\n\tswitch(opts.biff) {\n\t\tcase 2: blob.l += 5; break;\n\t\tcase 3: case 4: blob.l += 8; break;\n\t\tcase 5: blob.l += 12; break;\n\t}\n\treturn [type, 0, nameindex];\n}\n\n/* [MS-XLS] 2.5.198.77 ; [MS-XLSB] 2.5.97.61 */\nfunction parse_PtgNameX(blob, length, opts) {\n\tif(opts.biff == 5) return parse_PtgNameX_BIFF5(blob, length, opts);\n\tvar type = (blob.read_shift(1) >>> 5) & 0x03;\n\tvar ixti = blob.read_shift(2); // XtiIndex\n\tvar nameindex = blob.read_shift(4);\n\treturn [type, ixti, nameindex];\n}\nfunction parse_PtgNameX_BIFF5(blob/*::, length, opts*/) {\n\tvar type = (blob.read_shift(1) >>> 5) & 0x03;\n\tvar ixti = blob.read_shift(2, 'i'); // XtiIndex\n\tblob.l += 8;\n\tvar nameindex = blob.read_shift(2);\n\tblob.l += 12;\n\treturn [type, ixti, nameindex];\n}\n\n/* [MS-XLS] 2.5.198.70 ; [MS-XLSB] 2.5.97.54 */\nfunction parse_PtgMemArea(blob, length, opts) {\n\tvar type = (blob.read_shift(1) >>> 5) & 0x03;\n\tblob.l += (opts && opts.biff == 2 ? 3 : 4);\n\tvar cce = blob.read_shift(opts && opts.biff == 2 ? 1 : 2);\n\treturn [type, cce];\n}\n\n/* [MS-XLS] 2.5.198.72 ; [MS-XLSB] 2.5.97.56 */\nfunction parse_PtgMemFunc(blob, length, opts) {\n\tvar type = (blob.read_shift(1) >>> 5) & 0x03;\n\tvar cce = blob.read_shift(opts && opts.biff == 2 ? 1 : 2);\n\treturn [type, cce];\n}\n\n\n/* [MS-XLS] 2.5.198.86 ; [MS-XLSB] 2.5.97.69 */\nfunction parse_PtgRefErr(blob, length, opts) {\n\tvar type = (blob.read_shift(1) >>> 5) & 0x03;\n\tblob.l += 4;\n\tif(opts.biff < 8) blob.l--;\n\tif(opts.biff == 12) blob.l += 2;\n\treturn [type];\n}\n\n/* [MS-XLS] 2.5.198.87 ; [MS-XLSB] 2.5.97.71 */\nfunction parse_PtgRefErr3d(blob, length, opts) {\n\tvar type = (blob[blob.l++] & 0x60) >> 5;\n\tvar ixti = blob.read_shift(2);\n\tvar w = 4;\n\tif(opts) switch(opts.biff) {\n\t\tcase 5: w = 15; break;\n\t\tcase 12: w = 6; break;\n\t}\n\tblob.l += w;\n\treturn [type, ixti];\n}\n\n/* [MS-XLS] 2.5.198.71 ; [MS-XLSB] 2.5.97.55 */\nvar parse_PtgMemErr = parsenoop;\n/* [MS-XLS] 2.5.198.73 ; [MS-XLSB] 2.5.97.57 */\nvar parse_PtgMemNoMem = parsenoop;\n/* [MS-XLS] 2.5.198.92 */\nvar parse_PtgTbl = parsenoop;\n\nfunction parse_PtgElfLoc(blob, length, opts) {\n\tblob.l += 2;\n\treturn [parse_RgceElfLoc(blob, 4, opts)];\n}\nfunction parse_PtgElfNoop(blob/*::, length, opts*/) {\n\tblob.l += 6;\n\treturn [];\n}\n/* [MS-XLS] 2.5.198.46 */\nvar parse_PtgElfCol = parse_PtgElfLoc;\n/* [MS-XLS] 2.5.198.47 */\nvar parse_PtgElfColS = parse_PtgElfNoop;\n/* [MS-XLS] 2.5.198.48 */\nvar parse_PtgElfColSV = parse_PtgElfNoop;\n/* [MS-XLS] 2.5.198.49 */\nvar parse_PtgElfColV = parse_PtgElfLoc;\n/* [MS-XLS] 2.5.198.50 */\nfunction parse_PtgElfLel(blob/*::, length, opts*/) {\n\tblob.l += 2;\n\treturn [parseuint16(blob), blob.read_shift(2) & 0x01];\n}\n/* [MS-XLS] 2.5.198.51 */\nvar parse_PtgElfRadical = parse_PtgElfLoc;\n/* [MS-XLS] 2.5.198.52 */\nvar parse_PtgElfRadicalLel = parse_PtgElfLel;\n/* [MS-XLS] 2.5.198.53 */\nvar parse_PtgElfRadicalS = parse_PtgElfNoop;\n/* [MS-XLS] 2.5.198.54 */\nvar parse_PtgElfRw = parse_PtgElfLoc;\n/* [MS-XLS] 2.5.198.55 */\nvar parse_PtgElfRwV = parse_PtgElfLoc;\n\n/* [MS-XLSB] 2.5.97.52 TODO */\nvar PtgListRT = [\n\t\"Data\",\n\t\"All\",\n\t\"Headers\",\n\t\"??\",\n\t\"?Data2\",\n\t\"??\",\n\t\"?DataHeaders\",\n\t\"??\",\n\t\"Totals\",\n\t\"??\",\n\t\"??\",\n\t\"??\",\n\t\"?DataTotals\",\n\t\"??\",\n\t\"??\",\n\t\"??\",\n\t\"?Current\"\n];\nfunction parse_PtgList(blob/*::, length, opts*/) {\n\tblob.l += 2;\n\tvar ixti = blob.read_shift(2);\n\tvar flags = blob.read_shift(2);\n\tvar idx = blob.read_shift(4);\n\tvar c = blob.read_shift(2);\n\tvar C = blob.read_shift(2);\n\tvar rt = PtgListRT[(flags >> 2) & 0x1F];\n\treturn {ixti: ixti, coltype:(flags&0x3), rt:rt, idx:idx, c:c, C:C};\n}\n/* [MS-XLS] 2.5.198.91 ; [MS-XLSB] 2.5.97.76 */\nfunction parse_PtgSxName(blob/*::, length, opts*/) {\n\tblob.l += 2;\n\treturn [blob.read_shift(4)];\n}\n\n/* [XLS] old spec */\nfunction parse_PtgSheet(blob, length, opts) {\n\tblob.l += 5;\n\tblob.l += 2;\n\tblob.l += (opts.biff == 2 ? 1 : 4);\n\treturn [\"PTGSHEET\"];\n}\nfunction parse_PtgEndSheet(blob, length, opts) {\n\tblob.l += (opts.biff == 2 ? 4 : 5);\n\treturn [\"PTGENDSHEET\"];\n}\nfunction parse_PtgMemAreaN(blob/*::, length, opts*/) {\n\tvar type = (blob.read_shift(1) >>> 5) & 0x03;\n\tvar cce = blob.read_shift(2);\n\treturn [type, cce];\n}\nfunction parse_PtgMemNoMemN(blob/*::, length, opts*/) {\n\tvar type = (blob.read_shift(1) >>> 5) & 0x03;\n\tvar cce = blob.read_shift(2);\n\treturn [type, cce];\n}\nfunction parse_PtgAttrNoop(blob/*::, length, opts*/) {\n\tblob.l += 4;\n\treturn [0, 0];\n}\n\n/* [MS-XLS] 2.5.198.25 ; [MS-XLSB] 2.5.97.16 */\nvar PtgTypes = {\n\t/*::[*/0x01/*::]*/: { n:'PtgExp', f:parse_PtgExp },\n\t/*::[*/0x02/*::]*/: { n:'PtgTbl', f:parse_PtgTbl },\n\t/*::[*/0x03/*::]*/: { n:'PtgAdd', f:parseread1 },\n\t/*::[*/0x04/*::]*/: { n:'PtgSub', f:parseread1 },\n\t/*::[*/0x05/*::]*/: { n:'PtgMul', f:parseread1 },\n\t/*::[*/0x06/*::]*/: { n:'PtgDiv', f:parseread1 },\n\t/*::[*/0x07/*::]*/: { n:'PtgPower', f:parseread1 },\n\t/*::[*/0x08/*::]*/: { n:'PtgConcat', f:parseread1 },\n\t/*::[*/0x09/*::]*/: { n:'PtgLt', f:parseread1 },\n\t/*::[*/0x0A/*::]*/: { n:'PtgLe', f:parseread1 },\n\t/*::[*/0x0B/*::]*/: { n:'PtgEq', f:parseread1 },\n\t/*::[*/0x0C/*::]*/: { n:'PtgGe', f:parseread1 },\n\t/*::[*/0x0D/*::]*/: { n:'PtgGt', f:parseread1 },\n\t/*::[*/0x0E/*::]*/: { n:'PtgNe', f:parseread1 },\n\t/*::[*/0x0F/*::]*/: { n:'PtgIsect', f:parseread1 },\n\t/*::[*/0x10/*::]*/: { n:'PtgUnion', f:parseread1 },\n\t/*::[*/0x11/*::]*/: { n:'PtgRange', f:parseread1 },\n\t/*::[*/0x12/*::]*/: { n:'PtgUplus', f:parseread1 },\n\t/*::[*/0x13/*::]*/: { n:'PtgUminus', f:parseread1 },\n\t/*::[*/0x14/*::]*/: { n:'PtgPercent', f:parseread1 },\n\t/*::[*/0x15/*::]*/: { n:'PtgParen', f:parseread1 },\n\t/*::[*/0x16/*::]*/: { n:'PtgMissArg', f:parseread1 },\n\t/*::[*/0x17/*::]*/: { n:'PtgStr', f:parse_PtgStr },\n\t/*::[*/0x1A/*::]*/: { n:'PtgSheet', f:parse_PtgSheet },\n\t/*::[*/0x1B/*::]*/: { n:'PtgEndSheet', f:parse_PtgEndSheet },\n\t/*::[*/0x1C/*::]*/: { n:'PtgErr', f:parse_PtgErr },\n\t/*::[*/0x1D/*::]*/: { n:'PtgBool', f:parse_PtgBool },\n\t/*::[*/0x1E/*::]*/: { n:'PtgInt', f:parse_PtgInt },\n\t/*::[*/0x1F/*::]*/: { n:'PtgNum', f:parse_PtgNum },\n\t/*::[*/0x20/*::]*/: { n:'PtgArray', f:parse_PtgArray },\n\t/*::[*/0x21/*::]*/: { n:'PtgFunc', f:parse_PtgFunc },\n\t/*::[*/0x22/*::]*/: { n:'PtgFuncVar', f:parse_PtgFuncVar },\n\t/*::[*/0x23/*::]*/: { n:'PtgName', f:parse_PtgName },\n\t/*::[*/0x24/*::]*/: { n:'PtgRef', f:parse_PtgRef },\n\t/*::[*/0x25/*::]*/: { n:'PtgArea', f:parse_PtgArea },\n\t/*::[*/0x26/*::]*/: { n:'PtgMemArea', f:parse_PtgMemArea },\n\t/*::[*/0x27/*::]*/: { n:'PtgMemErr', f:parse_PtgMemErr },\n\t/*::[*/0x28/*::]*/: { n:'PtgMemNoMem', f:parse_PtgMemNoMem },\n\t/*::[*/0x29/*::]*/: { n:'PtgMemFunc', f:parse_PtgMemFunc },\n\t/*::[*/0x2A/*::]*/: { n:'PtgRefErr', f:parse_PtgRefErr },\n\t/*::[*/0x2B/*::]*/: { n:'PtgAreaErr', f:parse_PtgAreaErr },\n\t/*::[*/0x2C/*::]*/: { n:'PtgRefN', f:parse_PtgRefN },\n\t/*::[*/0x2D/*::]*/: { n:'PtgAreaN', f:parse_PtgAreaN },\n\t/*::[*/0x2E/*::]*/: { n:'PtgMemAreaN', f:parse_PtgMemAreaN },\n\t/*::[*/0x2F/*::]*/: { n:'PtgMemNoMemN', f:parse_PtgMemNoMemN },\n\t/*::[*/0x39/*::]*/: { n:'PtgNameX', f:parse_PtgNameX },\n\t/*::[*/0x3A/*::]*/: { n:'PtgRef3d', f:parse_PtgRef3d },\n\t/*::[*/0x3B/*::]*/: { n:'PtgArea3d', f:parse_PtgArea3d },\n\t/*::[*/0x3C/*::]*/: { n:'PtgRefErr3d', f:parse_PtgRefErr3d },\n\t/*::[*/0x3D/*::]*/: { n:'PtgAreaErr3d', f:parse_PtgAreaErr3d },\n\t/*::[*/0xFF/*::]*/: {}\n};\n/* These are duplicated in the PtgTypes table */\nvar PtgDupes = {\n\t/*::[*/0x40/*::]*/: 0x20, /*::[*/0x60/*::]*/: 0x20,\n\t/*::[*/0x41/*::]*/: 0x21, /*::[*/0x61/*::]*/: 0x21,\n\t/*::[*/0x42/*::]*/: 0x22, /*::[*/0x62/*::]*/: 0x22,\n\t/*::[*/0x43/*::]*/: 0x23, /*::[*/0x63/*::]*/: 0x23,\n\t/*::[*/0x44/*::]*/: 0x24, /*::[*/0x64/*::]*/: 0x24,\n\t/*::[*/0x45/*::]*/: 0x25, /*::[*/0x65/*::]*/: 0x25,\n\t/*::[*/0x46/*::]*/: 0x26, /*::[*/0x66/*::]*/: 0x26,\n\t/*::[*/0x47/*::]*/: 0x27, /*::[*/0x67/*::]*/: 0x27,\n\t/*::[*/0x48/*::]*/: 0x28, /*::[*/0x68/*::]*/: 0x28,\n\t/*::[*/0x49/*::]*/: 0x29, /*::[*/0x69/*::]*/: 0x29,\n\t/*::[*/0x4A/*::]*/: 0x2A, /*::[*/0x6A/*::]*/: 0x2A,\n\t/*::[*/0x4B/*::]*/: 0x2B, /*::[*/0x6B/*::]*/: 0x2B,\n\t/*::[*/0x4C/*::]*/: 0x2C, /*::[*/0x6C/*::]*/: 0x2C,\n\t/*::[*/0x4D/*::]*/: 0x2D, /*::[*/0x6D/*::]*/: 0x2D,\n\t/*::[*/0x4E/*::]*/: 0x2E, /*::[*/0x6E/*::]*/: 0x2E,\n\t/*::[*/0x4F/*::]*/: 0x2F, /*::[*/0x6F/*::]*/: 0x2F,\n\t/*::[*/0x58/*::]*/: 0x22, /*::[*/0x78/*::]*/: 0x22,\n\t/*::[*/0x59/*::]*/: 0x39, /*::[*/0x79/*::]*/: 0x39,\n\t/*::[*/0x5A/*::]*/: 0x3A, /*::[*/0x7A/*::]*/: 0x3A,\n\t/*::[*/0x5B/*::]*/: 0x3B, /*::[*/0x7B/*::]*/: 0x3B,\n\t/*::[*/0x5C/*::]*/: 0x3C, /*::[*/0x7C/*::]*/: 0x3C,\n\t/*::[*/0x5D/*::]*/: 0x3D, /*::[*/0x7D/*::]*/: 0x3D\n};\n\nvar Ptg18 = {\n\t/*::[*/0x01/*::]*/: { n:'PtgElfLel', f:parse_PtgElfLel },\n\t/*::[*/0x02/*::]*/: { n:'PtgElfRw', f:parse_PtgElfRw },\n\t/*::[*/0x03/*::]*/: { n:'PtgElfCol', f:parse_PtgElfCol },\n\t/*::[*/0x06/*::]*/: { n:'PtgElfRwV', f:parse_PtgElfRwV },\n\t/*::[*/0x07/*::]*/: { n:'PtgElfColV', f:parse_PtgElfColV },\n\t/*::[*/0x0A/*::]*/: { n:'PtgElfRadical', f:parse_PtgElfRadical },\n\t/*::[*/0x0B/*::]*/: { n:'PtgElfRadicalS', f:parse_PtgElfRadicalS },\n\t/*::[*/0x0D/*::]*/: { n:'PtgElfColS', f:parse_PtgElfColS },\n\t/*::[*/0x0F/*::]*/: { n:'PtgElfColSV', f:parse_PtgElfColSV },\n\t/*::[*/0x10/*::]*/: { n:'PtgElfRadicalLel', f:parse_PtgElfRadicalLel },\n\t/*::[*/0x19/*::]*/: { n:'PtgList', f:parse_PtgList },\n\t/*::[*/0x1D/*::]*/: { n:'PtgSxName', f:parse_PtgSxName },\n\t/*::[*/0xFF/*::]*/: {}\n};\nvar Ptg19 = {\n\t/*::[*/0x00/*::]*/: { n:'PtgAttrNoop', f:parse_PtgAttrNoop },\n\t/*::[*/0x01/*::]*/: { n:'PtgAttrSemi', f:parse_PtgAttrSemi },\n\t/*::[*/0x02/*::]*/: { n:'PtgAttrIf', f:parse_PtgAttrIf },\n\t/*::[*/0x04/*::]*/: { n:'PtgAttrChoose', f:parse_PtgAttrChoose },\n\t/*::[*/0x08/*::]*/: { n:'PtgAttrGoto', f:parse_PtgAttrGoto },\n\t/*::[*/0x10/*::]*/: { n:'PtgAttrSum', f:parse_PtgAttrSum },\n\t/*::[*/0x20/*::]*/: { n:'PtgAttrBaxcel', f:parse_PtgAttrBaxcel },\n\t/*::[*/0x21/*::]*/: { n:'PtgAttrBaxcel', f:parse_PtgAttrBaxcel },\n\t/*::[*/0x40/*::]*/: { n:'PtgAttrSpace', f:parse_PtgAttrSpace },\n\t/*::[*/0x41/*::]*/: { n:'PtgAttrSpaceSemi', f:parse_PtgAttrSpaceSemi },\n\t/*::[*/0x80/*::]*/: { n:'PtgAttrIfError', f:parse_PtgAttrIfError },\n\t/*::[*/0xFF/*::]*/: {}\n};\n\n/* [MS-XLS] 2.5.198.103 ; [MS-XLSB] 2.5.97.87 */\nfunction parse_RgbExtra(blob, length, rgce, opts) {\n\tif(opts.biff < 8) return parsenoop(blob, length);\n\tvar target = blob.l + length;\n\tvar o = [];\n\tfor(var i = 0; i !== rgce.length; ++i) {\n\t\tswitch(rgce[i][0]) {\n\t\t\tcase 'PtgArray': /* PtgArray -> PtgExtraArray */\n\t\t\t\trgce[i][1] = parse_PtgExtraArray(blob, 0, opts);\n\t\t\t\to.push(rgce[i][1]);\n\t\t\t\tbreak;\n\t\t\tcase 'PtgMemArea': /* PtgMemArea -> PtgExtraMem */\n\t\t\t\trgce[i][2] = parse_PtgExtraMem(blob, rgce[i][1], opts);\n\t\t\t\to.push(rgce[i][2]);\n\t\t\t\tbreak;\n\t\t\tcase 'PtgExp': /* PtgExp -> PtgExtraCol */\n\t\t\t\tif(opts && opts.biff == 12) {\n\t\t\t\t\trgce[i][1][1] = blob.read_shift(4);\n\t\t\t\t\to.push(rgce[i][1]);\n\t\t\t\t} break;\n\t\t\tcase 'PtgList': /* TODO: PtgList -> PtgExtraList */\n\t\t\tcase 'PtgElfRadicalS': /* TODO: PtgElfRadicalS -> PtgExtraElf */\n\t\t\tcase 'PtgElfColS': /* TODO: PtgElfColS -> PtgExtraElf */\n\t\t\tcase 'PtgElfColSV': /* TODO: PtgElfColSV -> PtgExtraElf */\n\t\t\t\tthrow \"Unsupported \" + rgce[i][0];\n\t\t\tdefault: break;\n\t\t}\n\t}\n\tlength = target - blob.l;\n\t/* note: this is technically an error but Excel disregards */\n\t//if(target !== blob.l && blob.l !== target - length) throw new Error(target + \" != \" + blob.l);\n\tif(length !== 0) o.push(parsenoop(blob, length));\n\treturn o;\n}\n\n/* [MS-XLS] 2.5.198.104 ; [MS-XLSB] 2.5.97.88 */\nfunction parse_Rgce(blob, length, opts) {\n\tvar target = blob.l + length;\n\tvar R, id, ptgs = [];\n\twhile(target != blob.l) {\n\t\tlength = target - blob.l;\n\t\tid = blob[blob.l];\n\t\tR = PtgTypes[id] || PtgTypes[PtgDupes[id]];\n\t\tif(id === 0x18 || id === 0x19) R = (id === 0x18 ? Ptg18 : Ptg19)[blob[blob.l + 1]];\n\t\tif(!R || !R.f) { /*ptgs.push*/(parsenoop(blob, length)); }\n\t\telse { ptgs.push([R.n, R.f(blob, length, opts)]); }\n\t}\n\treturn ptgs;\n}\n\nfunction stringify_array(f/*:Array>*/)/*:string*/ {\n\tvar o/*:Array*/ = [];\n\tfor(var i = 0; i < f.length; ++i) {\n\t\tvar x = f[i], r/*:Array*/ = [];\n\t\tfor(var j = 0; j < x.length; ++j) {\n\t\t\tvar y = x[j];\n\t\t\tif(y) switch(y[0]) {\n\t\t\t\t// TODO: handle embedded quotes\n\t\t\t\tcase 0x02:\n\t\t\t\t\t/*:: if(typeof y[1] != 'string') throw \"unreachable\"; */\n\t\t\t\t\tr.push('\"' + y[1].replace(/\"/g,'\"\"') + '\"'); break;\n\t\t\t\tdefault: r.push(y[1]);\n\t\t\t} else r.push(\"\");\n\t\t}\n\t\to.push(r.join(\",\"));\n\t}\n\treturn o.join(\";\");\n}\n\n/* [MS-XLS] 2.2.2 ; [MS-XLSB] 2.2.2 TODO */\nvar PtgBinOp = {\n\tPtgAdd: \"+\",\n\tPtgConcat: \"&\",\n\tPtgDiv: \"/\",\n\tPtgEq: \"=\",\n\tPtgGe: \">=\",\n\tPtgGt: \">\",\n\tPtgLe: \"<=\",\n\tPtgLt: \"<\",\n\tPtgMul: \"*\",\n\tPtgNe: \"<>\",\n\tPtgPower: \"^\",\n\tPtgSub: \"-\"\n};\n\n// List of invalid characters needs to be tested further\nfunction formula_quote_sheet_name(sname/*:string*/, opts)/*:string*/ {\n\tif(!sname && !(opts && opts.biff <= 5 && opts.biff >= 2)) throw new Error(\"empty sheet name\");\n\tif (/[^\\w\\u4E00-\\u9FFF\\u3040-\\u30FF]/.test(sname)) return \"'\" + sname + \"'\";\n\treturn sname;\n}\nfunction get_ixti_raw(supbooks, ixti/*:number*/, opts)/*:string*/ {\n\tif(!supbooks) return \"SH33TJSERR0\";\n\tif(opts.biff > 8 && (!supbooks.XTI || !supbooks.XTI[ixti])) return supbooks.SheetNames[ixti];\n\tif(!supbooks.XTI) return \"SH33TJSERR6\";\n\tvar XTI = supbooks.XTI[ixti];\n\tif(opts.biff < 8) {\n\t\tif(ixti > 10000) ixti-= 65536;\n\t\tif(ixti < 0) ixti = -ixti;\n\t\treturn ixti == 0 ? \"\" : supbooks.XTI[ixti - 1];\n\t}\n\tif(!XTI) return \"SH33TJSERR1\";\n\tvar o = \"\";\n\tif(opts.biff > 8) switch(supbooks[XTI[0]][0]) {\n\t\tcase 0x0165: /* 'BrtSupSelf' */\n\t\t\to = XTI[1] == -1 ? \"#REF\" : supbooks.SheetNames[XTI[1]];\n\t\t\treturn XTI[1] == XTI[2] ? o : o + \":\" + supbooks.SheetNames[XTI[2]];\n\t\tcase 0x0166: /* 'BrtSupSame' */\n\t\t\tif(opts.SID != null) return supbooks.SheetNames[opts.SID];\n\t\t\treturn \"SH33TJSSAME\" + supbooks[XTI[0]][0];\n\t\tcase 0x0163: /* 'BrtSupBookSrc' */\n\t\t\t/* falls through */\n\t\tdefault: return \"SH33TJSSRC\" + supbooks[XTI[0]][0];\n\t}\n\tswitch(supbooks[XTI[0]][0][0]) {\n\t\tcase 0x0401:\n\t\t\to = XTI[1] == -1 ? \"#REF\" : (supbooks.SheetNames[XTI[1]] || \"SH33TJSERR3\");\n\t\t\treturn XTI[1] == XTI[2] ? o : o + \":\" + supbooks.SheetNames[XTI[2]];\n\t\tcase 0x3A01: return supbooks[XTI[0]].slice(1).map(function(name) { return name.Name; }).join(\";;\"); //return \"SH33TJSERR8\";\n\t\tdefault:\n\t\t\tif(!supbooks[XTI[0]][0][3]) return \"SH33TJSERR2\";\n\t\t\to = XTI[1] == -1 ? \"#REF\" : (supbooks[XTI[0]][0][3][XTI[1]] || \"SH33TJSERR4\");\n\t\t\treturn XTI[1] == XTI[2] ? o : o + \":\" + supbooks[XTI[0]][0][3][XTI[2]];\n\t}\n}\nfunction get_ixti(supbooks, ixti/*:number*/, opts)/*:string*/ {\n\tvar ixtiraw = get_ixti_raw(supbooks, ixti, opts);\n\treturn ixtiraw == \"#REF\" ? ixtiraw : formula_quote_sheet_name(ixtiraw, opts);\n}\nfunction stringify_formula(formula/*Array*/, range, cell/*:any*/, supbooks, opts)/*:string*/ {\n\tvar biff = (opts && opts.biff) || 8;\n\tvar _range = /*range != null ? range :*/ {s:{c:0, r:0},e:{c:0, r:0}};\n\tvar stack/*:Array*/ = [], e1, e2, /*::type,*/ c/*:CellAddress*/, ixti=0, nameidx=0, r, sname=\"\";\n\tif(!formula[0] || !formula[0][0]) return \"\";\n\tvar last_sp = -1, sp = \"\";\n\tfor(var ff = 0, fflen = formula[0].length; ff < fflen; ++ff) {\n\t\tvar f = formula[0][ff];\n\t\tswitch(f[0]) {\n\t\t\tcase 'PtgUminus': /* [MS-XLS] 2.5.198.93 */\n\t\t\t\tstack.push(\"-\" + stack.pop()); break;\n\t\t\tcase 'PtgUplus': /* [MS-XLS] 2.5.198.95 */\n\t\t\t\tstack.push(\"+\" + stack.pop()); break;\n\t\t\tcase 'PtgPercent': /* [MS-XLS] 2.5.198.81 */\n\t\t\t\tstack.push(stack.pop() + \"%\"); break;\n\n\t\t\tcase 'PtgAdd': /* [MS-XLS] 2.5.198.26 */\n\t\t\tcase 'PtgConcat': /* [MS-XLS] 2.5.198.43 */\n\t\t\tcase 'PtgDiv': /* [MS-XLS] 2.5.198.45 */\n\t\t\tcase 'PtgEq': /* [MS-XLS] 2.5.198.56 */\n\t\t\tcase 'PtgGe': /* [MS-XLS] 2.5.198.64 */\n\t\t\tcase 'PtgGt': /* [MS-XLS] 2.5.198.65 */\n\t\t\tcase 'PtgLe': /* [MS-XLS] 2.5.198.68 */\n\t\t\tcase 'PtgLt': /* [MS-XLS] 2.5.198.69 */\n\t\t\tcase 'PtgMul': /* [MS-XLS] 2.5.198.75 */\n\t\t\tcase 'PtgNe': /* [MS-XLS] 2.5.198.78 */\n\t\t\tcase 'PtgPower': /* [MS-XLS] 2.5.198.82 */\n\t\t\tcase 'PtgSub': /* [MS-XLS] 2.5.198.90 */\n\t\t\t\te1 = stack.pop(); e2 = stack.pop();\n\t\t\t\tif(last_sp >= 0) {\n\t\t\t\t\tswitch(formula[0][last_sp][1][0]) {\n\t\t\t\t\t\tcase 0:\n\t\t\t\t\t\t\t// $FlowIgnore\n\t\t\t\t\t\t\tsp = fill(\" \", formula[0][last_sp][1][1]); break;\n\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\t// $FlowIgnore\n\t\t\t\t\t\t\tsp = fill(\"\\r\", formula[0][last_sp][1][1]); break;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tsp = \"\";\n\t\t\t\t\t\t\t// $FlowIgnore\n\t\t\t\t\t\t\tif(opts.WTF) throw new Error(\"Unexpected PtgAttrSpaceType \" + formula[0][last_sp][1][0]);\n\t\t\t\t\t}\n\t\t\t\t\te2 = e2 + sp;\n\t\t\t\t\tlast_sp = -1;\n\t\t\t\t}\n\t\t\t\tstack.push(e2+PtgBinOp[f[0]]+e1);\n\t\t\t\tbreak;\n\n\t\t\tcase 'PtgIsect': /* [MS-XLS] 2.5.198.67 */\n\t\t\t\te1 = stack.pop(); e2 = stack.pop();\n\t\t\t\tstack.push(e2+\" \"+e1);\n\t\t\t\tbreak;\n\t\t\tcase 'PtgUnion': /* [MS-XLS] 2.5.198.94 */\n\t\t\t\te1 = stack.pop(); e2 = stack.pop();\n\t\t\t\tstack.push(e2+\",\"+e1);\n\t\t\t\tbreak;\n\t\t\tcase 'PtgRange': /* [MS-XLS] 2.5.198.83 */\n\t\t\t\te1 = stack.pop(); e2 = stack.pop();\n\t\t\t\tstack.push(e2+\":\"+e1);\n\t\t\t\tbreak;\n\n\t\t\tcase 'PtgAttrChoose': /* [MS-XLS] 2.5.198.34 */\n\t\t\t\tbreak;\n\t\t\tcase 'PtgAttrGoto': /* [MS-XLS] 2.5.198.35 */\n\t\t\t\tbreak;\n\t\t\tcase 'PtgAttrIf': /* [MS-XLS] 2.5.198.36 */\n\t\t\t\tbreak;\n\t\t\tcase 'PtgAttrIfError': /* [MS-XLSB] 2.5.97.28 */\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'PtgRef': /* [MS-XLS] 2.5.198.84 */\n\t\t\t\t/*::type = f[1][0]; */c = shift_cell_xls((f[1][1]/*:any*/), _range, opts);\n\t\t\t\tstack.push(encode_cell_xls(c, biff));\n\t\t\t\tbreak;\n\t\t\tcase 'PtgRefN': /* [MS-XLS] 2.5.198.88 */\n\t\t\t\t/*::type = f[1][0]; */c = cell ? shift_cell_xls((f[1][1]/*:any*/), cell, opts) : (f[1][1]/*:any*/);\n\t\t\t\tstack.push(encode_cell_xls(c, biff));\n\t\t\t\tbreak;\n\t\t\tcase 'PtgRef3d': /* [MS-XLS] 2.5.198.85 */\n\t\t\t\t/*::type = f[1][0]; */ixti = /*::Number(*/f[1][1]/*::)*/; c = shift_cell_xls((f[1][2]/*:any*/), _range, opts);\n\t\t\t\tsname = get_ixti(supbooks, ixti, opts);\n\t\t\t\tvar w = sname; /* IE9 fails on defined names */ // eslint-disable-line no-unused-vars\n\t\t\t\tstack.push(sname + \"!\" + encode_cell_xls(c, biff));\n\t\t\t\tbreak;\n\n\t\t\tcase 'PtgFunc': /* [MS-XLS] 2.5.198.62 */\n\t\t\tcase 'PtgFuncVar': /* [MS-XLS] 2.5.198.63 */\n\t\t\t\t/* f[1] = [argc, func, type] */\n\t\t\t\tvar argc/*:number*/ = (f[1][0]/*:any*/), func/*:string*/ = (f[1][1]/*:any*/);\n\t\t\t\tif(!argc) argc = 0;\n\t\t\t\targc &= 0x7F;\n\t\t\t\tvar args = argc == 0 ? [] : stack.slice(-argc);\n\t\t\t\tstack.length -= argc;\n\t\t\t\tif(func === 'User') func = args.shift();\n\t\t\t\tstack.push(func + \"(\" + args.join(\",\") + \")\");\n\t\t\t\tbreak;\n\n\t\t\tcase 'PtgBool': /* [MS-XLS] 2.5.198.42 */\n\t\t\t\tstack.push(f[1] ? \"TRUE\" : \"FALSE\"); break;\n\t\t\tcase 'PtgInt': /* [MS-XLS] 2.5.198.66 */\n\t\t\t\tstack.push(/*::String(*/f[1]/*::)*/); break;\n\t\t\tcase 'PtgNum': /* [MS-XLS] 2.5.198.79 TODO: precision? */\n\t\t\t\tstack.push(String(f[1])); break;\n\t\t\tcase 'PtgStr': /* [MS-XLS] 2.5.198.89 */\n\t\t\t\t// $FlowIgnore\n\t\t\t\tstack.push('\"' + f[1].replace(/\"/g, '\"\"') + '\"'); break;\n\t\t\tcase 'PtgErr': /* [MS-XLS] 2.5.198.57 */\n\t\t\t\tstack.push(/*::String(*/f[1]/*::)*/); break;\n\t\t\tcase 'PtgAreaN': /* [MS-XLS] 2.5.198.31 TODO */\n\t\t\t\t/*::type = f[1][0]; */r = shift_range_xls(f[1][1], cell ? {s:cell} : _range, opts);\n\t\t\t\tstack.push(encode_range_xls((r/*:any*/), opts));\n\t\t\t\tbreak;\n\t\t\tcase 'PtgArea': /* [MS-XLS] 2.5.198.27 TODO: fixed points */\n\t\t\t\t/*::type = f[1][0]; */r = shift_range_xls(f[1][1], _range, opts);\n\t\t\t\tstack.push(encode_range_xls((r/*:any*/), opts));\n\t\t\t\tbreak;\n\t\t\tcase 'PtgArea3d': /* [MS-XLS] 2.5.198.28 TODO */\n\t\t\t\t/*::type = f[1][0]; */ixti = /*::Number(*/f[1][1]/*::)*/; r = f[1][2];\n\t\t\t\tsname = get_ixti(supbooks, ixti, opts);\n\t\t\t\tstack.push(sname + \"!\" + encode_range_xls((r/*:any*/), opts));\n\t\t\t\tbreak;\n\t\t\tcase 'PtgAttrSum': /* [MS-XLS] 2.5.198.41 */\n\t\t\t\tstack.push(\"SUM(\" + stack.pop() + \")\");\n\t\t\t\tbreak;\n\n\t\t\tcase 'PtgAttrBaxcel': /* [MS-XLS] 2.5.198.33 */\n\t\t\tcase 'PtgAttrSemi': /* [MS-XLS] 2.5.198.37 */\n\t\t\t\tbreak;\n\n\t\t\tcase 'PtgName': /* [MS-XLS] 2.5.198.76 ; [MS-XLSB] 2.5.97.60 TODO: revisions */\n\t\t\t\t/* f[1] = type, 0, nameindex */\n\t\t\t\tnameidx = (f[1][2]/*:any*/);\n\t\t\t\tvar lbl = (supbooks.names||[])[nameidx-1] || (supbooks[0]||[])[nameidx];\n\t\t\t\tvar name = lbl ? lbl.Name : \"SH33TJSNAME\" + String(nameidx);\n\t\t\t\t/* [MS-XLSB] 2.5.97.10 Ftab -- last verified 20220204 */\n\t\t\t\tif(name && name.slice(0,6) == \"_xlfn.\" && !opts.xlfn) name = name.slice(6);\n\t\t\t\tstack.push(name);\n\t\t\t\tbreak;\n\n\t\t\tcase 'PtgNameX': /* [MS-XLS] 2.5.198.77 ; [MS-XLSB] 2.5.97.61 TODO: revisions */\n\t\t\t\t/* f[1] = type, ixti, nameindex */\n\t\t\t\tvar bookidx/*:number*/ = (f[1][1]/*:any*/); nameidx = (f[1][2]/*:any*/); var externbook;\n\t\t\t\t/* TODO: Properly handle missing values -- this should be using get_ixti_raw primarily */\n\t\t\t\tif(opts.biff <= 5) {\n\t\t\t\t\tif(bookidx < 0) bookidx = -bookidx;\n\t\t\t\t\tif(supbooks[bookidx]) externbook = supbooks[bookidx][nameidx];\n\t\t\t\t} else {\n\t\t\t\t\tvar o = \"\";\n\t\t\t\t\tif(((supbooks[bookidx]||[])[0]||[])[0] == 0x3A01){/* empty */}\n\t\t\t\t\telse if(((supbooks[bookidx]||[])[0]||[])[0] == 0x0401){\n\t\t\t\t\t\tif(supbooks[bookidx][nameidx] && supbooks[bookidx][nameidx].itab > 0) {\n\t\t\t\t\t\t\to = supbooks.SheetNames[supbooks[bookidx][nameidx].itab-1] + \"!\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse o = supbooks.SheetNames[nameidx-1]+ \"!\";\n\t\t\t\t\tif(supbooks[bookidx] && supbooks[bookidx][nameidx]) o += supbooks[bookidx][nameidx].Name;\n\t\t\t\t\telse if(supbooks[0] && supbooks[0][nameidx]) o += supbooks[0][nameidx].Name;\n\t\t\t\t\telse {\n\t\t\t\t\t\tvar ixtidata = (get_ixti_raw(supbooks, bookidx, opts)||\"\").split(\";;\");\n\t\t\t\t\t\tif(ixtidata[nameidx - 1]) o = ixtidata[nameidx - 1]; // TODO: confirm this is correct\n\t\t\t\t\t\telse o += \"SH33TJSERRX\";\n\t\t\t\t\t}\n\t\t\t\t\tstack.push(o);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif(!externbook) externbook = {Name: \"SH33TJSERRY\"};\n\t\t\t\tstack.push(externbook.Name);\n\t\t\t\tbreak;\n\n\t\t\tcase 'PtgParen': /* [MS-XLS] 2.5.198.80 */\n\t\t\t\tvar lp = '(', rp = ')';\n\t\t\t\tif(last_sp >= 0) {\n\t\t\t\t\tsp = \"\";\n\t\t\t\t\tswitch(formula[0][last_sp][1][0]) {\n\t\t\t\t\t\t// $FlowIgnore\n\t\t\t\t\t\tcase 2: lp = fill(\" \", formula[0][last_sp][1][1]) + lp; break;\n\t\t\t\t\t\t// $FlowIgnore\n\t\t\t\t\t\tcase 3: lp = fill(\"\\r\", formula[0][last_sp][1][1]) + lp; break;\n\t\t\t\t\t\t// $FlowIgnore\n\t\t\t\t\t\tcase 4: rp = fill(\" \", formula[0][last_sp][1][1]) + rp; break;\n\t\t\t\t\t\t// $FlowIgnore\n\t\t\t\t\t\tcase 5: rp = fill(\"\\r\", formula[0][last_sp][1][1]) + rp; break;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t// $FlowIgnore\n\t\t\t\t\t\t\tif(opts.WTF) throw new Error(\"Unexpected PtgAttrSpaceType \" + formula[0][last_sp][1][0]);\n\t\t\t\t\t}\n\t\t\t\t\tlast_sp = -1;\n\t\t\t\t}\n\t\t\t\tstack.push(lp + stack.pop() + rp); break;\n\n\t\t\tcase 'PtgRefErr': /* [MS-XLS] 2.5.198.86 */\n\t\t\t\tstack.push('#REF!'); break;\n\n\t\t\tcase 'PtgRefErr3d': /* [MS-XLS] 2.5.198.87 */\n\t\t\t\tstack.push('#REF!'); break;\n\n\t\t\tcase 'PtgExp': /* [MS-XLS] 2.5.198.58 TODO */\n\t\t\t\tc = {c:(f[1][1]/*:any*/),r:(f[1][0]/*:any*/)};\n\t\t\t\tvar q = ({c: cell.c, r:cell.r}/*:any*/);\n\t\t\t\tif(supbooks.sharedf[encode_cell(c)]) {\n\t\t\t\t\tvar parsedf = (supbooks.sharedf[encode_cell(c)]);\n\t\t\t\t\tstack.push(stringify_formula(parsedf, _range, q, supbooks, opts));\n\t\t\t\t} else {\n\t\t\t\t\tvar fnd = false;\n\t\t\t\t\tfor(e1=0;e1!=supbooks.arrayf.length; ++e1) {\n\t\t\t\t\t\t/* TODO: should be something like range_has */\n\t\t\t\t\t\te2 = supbooks.arrayf[e1];\n\t\t\t\t\t\tif(c.c < e2[0].s.c || c.c > e2[0].e.c) continue;\n\t\t\t\t\t\tif(c.r < e2[0].s.r || c.r > e2[0].e.r) continue;\n\t\t\t\t\t\tstack.push(stringify_formula(e2[1], _range, q, supbooks, opts));\n\t\t\t\t\t\tfnd = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif(!fnd) stack.push(/*::String(*/f[1]/*::)*/);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 'PtgArray': /* [MS-XLS] 2.5.198.32 TODO */\n\t\t\t\tstack.push(\"{\" + stringify_array(/*::(*/f[1]/*:: :any)*/) + \"}\");\n\t\t\t\tbreak;\n\n\t\t\tcase 'PtgMemArea': /* [MS-XLS] 2.5.198.70 TODO: confirm this is a non-display */\n\t\t\t\t//stack.push(\"(\" + f[2].map(encode_range).join(\",\") + \")\");\n\t\t\t\tbreak;\n\n\t\t\tcase 'PtgAttrSpace': /* [MS-XLS] 2.5.198.38 */\n\t\t\tcase 'PtgAttrSpaceSemi': /* [MS-XLS] 2.5.198.39 */\n\t\t\t\tlast_sp = ff;\n\t\t\t\tbreak;\n\n\t\t\tcase 'PtgTbl': /* [MS-XLS] 2.5.198.92 TODO */\n\t\t\t\tbreak;\n\n\t\t\tcase 'PtgMemErr': /* [MS-XLS] 2.5.198.71 */\n\t\t\t\tbreak;\n\n\t\t\tcase 'PtgMissArg': /* [MS-XLS] 2.5.198.74 */\n\t\t\t\tstack.push(\"\");\n\t\t\t\tbreak;\n\n\t\t\tcase 'PtgAreaErr': /* [MS-XLS] 2.5.198.29 */\n\t\t\t\tstack.push(\"#REF!\"); break;\n\n\t\t\tcase 'PtgAreaErr3d': /* [MS-XLS] 2.5.198.30 */\n\t\t\t\tstack.push(\"#REF!\"); break;\n\n\t\t\tcase 'PtgList': /* [MS-XLSB] 2.5.97.52 */\n\t\t\t\t// $FlowIgnore\n\t\t\t\tstack.push(\"Table\" + f[1].idx + \"[#\" + f[1].rt + \"]\");\n\t\t\t\tbreak;\n\n\t\t\tcase 'PtgMemAreaN':\n\t\t\tcase 'PtgMemNoMemN':\n\t\t\tcase 'PtgAttrNoop':\n\t\t\tcase 'PtgSheet':\n\t\t\tcase 'PtgEndSheet':\n\t\t\t\tbreak;\n\n\t\t\tcase 'PtgMemFunc': /* [MS-XLS] 2.5.198.72 TODO */\n\t\t\t\tbreak;\n\t\t\tcase 'PtgMemNoMem': /* [MS-XLS] 2.5.198.73 TODO */\n\t\t\t\tbreak;\n\n\t\t\tcase 'PtgElfCol': /* [MS-XLS] 2.5.198.46 */\n\t\t\tcase 'PtgElfColS': /* [MS-XLS] 2.5.198.47 */\n\t\t\tcase 'PtgElfColSV': /* [MS-XLS] 2.5.198.48 */\n\t\t\tcase 'PtgElfColV': /* [MS-XLS] 2.5.198.49 */\n\t\t\tcase 'PtgElfLel': /* [MS-XLS] 2.5.198.50 */\n\t\t\tcase 'PtgElfRadical': /* [MS-XLS] 2.5.198.51 */\n\t\t\tcase 'PtgElfRadicalLel': /* [MS-XLS] 2.5.198.52 */\n\t\t\tcase 'PtgElfRadicalS': /* [MS-XLS] 2.5.198.53 */\n\t\t\tcase 'PtgElfRw': /* [MS-XLS] 2.5.198.54 */\n\t\t\tcase 'PtgElfRwV': /* [MS-XLS] 2.5.198.55 */\n\t\t\t\tthrow new Error(\"Unsupported ELFs\");\n\n\t\t\tcase 'PtgSxName': /* [MS-XLS] 2.5.198.91 TODO -- find a test case */\n\t\t\t\tthrow new Error('Unrecognized Formula Token: ' + String(f));\n\t\t\tdefault: throw new Error('Unrecognized Formula Token: ' + String(f));\n\t\t}\n\t\tvar PtgNonDisp = ['PtgAttrSpace', 'PtgAttrSpaceSemi', 'PtgAttrGoto'];\n\t\tif(opts.biff != 3) if(last_sp >= 0 && PtgNonDisp.indexOf(formula[0][ff][0]) == -1) {\n\t\t\tf = formula[0][last_sp];\n\t\t\tvar _left = true;\n\t\t\tswitch(f[1][0]) {\n\t\t\t\t/* note: some bad XLSB files omit the PtgParen */\n\t\t\t\tcase 4: _left = false;\n\t\t\t\t/* falls through */\n\t\t\t\tcase 0:\n\t\t\t\t\t// $FlowIgnore\n\t\t\t\t\tsp = fill(\" \", f[1][1]); break;\n\t\t\t\tcase 5: _left = false;\n\t\t\t\t/* falls through */\n\t\t\t\tcase 1:\n\t\t\t\t\t// $FlowIgnore\n\t\t\t\t\tsp = fill(\"\\r\", f[1][1]); break;\n\t\t\t\tdefault:\n\t\t\t\t\tsp = \"\";\n\t\t\t\t\t// $FlowIgnore\n\t\t\t\t\tif(opts.WTF) throw new Error(\"Unexpected PtgAttrSpaceType \" + f[1][0]);\n\t\t\t}\n\t\t\tstack.push((_left ? sp : \"\") + stack.pop() + (_left ? \"\" : sp));\n\t\t\tlast_sp = -1;\n\t\t}\n\t}\n\tif(stack.length > 1 && opts.WTF) throw new Error(\"bad formula stack\");\n\treturn stack[0];\n}\n\n/* [MS-XLS] 2.5.198.1 TODO */\nfunction parse_ArrayParsedFormula(blob, length, opts/*::, ref*/) {\n\tvar target = blob.l + length, len = opts.biff == 2 ? 1 : 2;\n\tvar rgcb, cce = blob.read_shift(len); // length of rgce\n\tif(cce == 0xFFFF) return [[],parsenoop(blob, length-2)];\n\tvar rgce = parse_Rgce(blob, cce, opts);\n\tif(length !== cce + len) rgcb = parse_RgbExtra(blob, length - cce - len, rgce, opts);\n\tblob.l = target;\n\treturn [rgce, rgcb];\n}\n\n/* [MS-XLS] 2.5.198.3 TODO */\nfunction parse_XLSCellParsedFormula(blob, length, opts) {\n\tvar target = blob.l + length, len = opts.biff == 2 ? 1 : 2;\n\tvar rgcb, cce = blob.read_shift(len); // length of rgce\n\tif(cce == 0xFFFF) return [[],parsenoop(blob, length-2)];\n\tvar rgce = parse_Rgce(blob, cce, opts);\n\tif(length !== cce + len) rgcb = parse_RgbExtra(blob, length - cce - len, rgce, opts);\n\tblob.l = target;\n\treturn [rgce, rgcb];\n}\n\n/* [MS-XLS] 2.5.198.21 */\nfunction parse_NameParsedFormula(blob, length, opts, cce) {\n\tvar target = blob.l + length;\n\tvar rgce = parse_Rgce(blob, cce, opts);\n\tvar rgcb;\n\tif(target !== blob.l) rgcb = parse_RgbExtra(blob, target - blob.l, rgce, opts);\n\treturn [rgce, rgcb];\n}\n\n/* [MS-XLS] 2.5.198.118 TODO */\nfunction parse_SharedParsedFormula(blob, length, opts) {\n\tvar target = blob.l + length;\n\tvar rgcb, cce = blob.read_shift(2); // length of rgce\n\tvar rgce = parse_Rgce(blob, cce, opts);\n\tif(cce == 0xFFFF) return [[],parsenoop(blob, length-2)];\n\tif(length !== cce + 2) rgcb = parse_RgbExtra(blob, target - cce - 2, rgce, opts);\n\treturn [rgce, rgcb];\n}\n\n/* [MS-XLS] 2.5.133 TODO: how to emit empty strings? */\nfunction parse_FormulaValue(blob/*::, length*/) {\n\tvar b;\n\tif(__readUInt16LE(blob,blob.l + 6) !== 0xFFFF) return [parse_Xnum(blob),'n'];\n\tswitch(blob[blob.l]) {\n\t\tcase 0x00: blob.l += 8; return [\"String\", 's'];\n\t\tcase 0x01: b = blob[blob.l+2] === 0x1; blob.l += 8; return [b,'b'];\n\t\tcase 0x02: b = blob[blob.l+2]; blob.l += 8; return [b,'e'];\n\t\tcase 0x03: blob.l += 8; return [\"\",'s'];\n\t}\n\treturn [];\n}\nfunction write_FormulaValue(value) {\n\tif(value == null) {\n\t\t// Blank String Value\n\t\tvar o = new_buf(8);\n\t\to.write_shift(1, 0x03);\n\t\to.write_shift(1, 0);\n\t\to.write_shift(2, 0);\n\t\to.write_shift(2, 0);\n\t\to.write_shift(2, 0xFFFF);\n\t\treturn o;\n\t} else if(typeof value == \"number\") return write_Xnum(value);\n\treturn write_Xnum(0);\n}\n\n/* [MS-XLS] 2.4.127 TODO */\nfunction parse_Formula(blob, length, opts) {\n\tvar end = blob.l + length;\n\tvar cell = parse_XLSCell(blob, 6);\n\tif(opts.biff == 2) ++blob.l;\n\tvar val = parse_FormulaValue(blob,8);\n\tvar flags = blob.read_shift(1);\n\tif(opts.biff != 2) {\n\t\tblob.read_shift(1);\n\t\tif(opts.biff >= 5) {\n\t\t\t/*var chn = */blob.read_shift(4);\n\t\t}\n\t}\n\tvar cbf = parse_XLSCellParsedFormula(blob, end - blob.l, opts);\n\treturn {cell:cell, val:val[0], formula:cbf, shared: (flags >> 3) & 1, tt:val[1]};\n}\nfunction write_Formula(cell/*:Cell*/, R/*:number*/, C/*:number*/, opts, os/*:number*/) {\n\t// Cell\n\tvar o1 = write_XLSCell(R, C, os);\n\n\t// FormulaValue\n\tvar o2 = write_FormulaValue(cell.v);\n\n\t// flags + cache\n\tvar o3 = new_buf(6);\n\tvar flags = 0x01 | 0x20;\n\to3.write_shift(2, flags);\n\to3.write_shift(4, 0);\n\n\t// CellParsedFormula\n\tvar bf = new_buf(cell.bf.length);\n\tfor(var i = 0; i < cell.bf.length; ++i) bf[i] = cell.bf[i];\n\n\tvar out = bconcat([o1, o2, o3, bf]);\n\treturn out;\n}\n\n\n/* XLSB Parsed Formula records have the same shape */\nfunction parse_XLSBParsedFormula(data, length, opts) {\n\tvar cce = data.read_shift(4);\n\tvar rgce = parse_Rgce(data, cce, opts);\n\tvar cb = data.read_shift(4);\n\tvar rgcb = cb > 0 ? parse_RgbExtra(data, cb, rgce, opts) : null;\n\treturn [rgce, rgcb];\n}\n\n/* [MS-XLSB] 2.5.97.1 ArrayParsedFormula */\nvar parse_XLSBArrayParsedFormula = parse_XLSBParsedFormula;\n/* [MS-XLSB] 2.5.97.4 CellParsedFormula */\nvar parse_XLSBCellParsedFormula = parse_XLSBParsedFormula;\n/* [MS-XLSB] 2.5.97.8 DVParsedFormula */\n//var parse_XLSBDVParsedFormula = parse_XLSBParsedFormula;\n/* [MS-XLSB] 2.5.97.9 FRTParsedFormula */\n//var parse_XLSBFRTParsedFormula = parse_XLSBParsedFormula2;\n/* [MS-XLSB] 2.5.97.12 NameParsedFormula */\nvar parse_XLSBNameParsedFormula = parse_XLSBParsedFormula;\n/* [MS-XLSB] 2.5.97.98 SharedParsedFormula */\nvar parse_XLSBSharedParsedFormula = parse_XLSBParsedFormula;\nvar Cetab = {\n 0: \"BEEP\",\n 1: \"OPEN\",\n 2: \"OPEN.LINKS\",\n 3: \"CLOSE.ALL\",\n 4: \"SAVE\",\n 5: \"SAVE.AS\",\n 6: \"FILE.DELETE\",\n 7: \"PAGE.SETUP\",\n 8: \"PRINT\",\n 9: \"PRINTER.SETUP\",\n 10: \"QUIT\",\n 11: \"NEW.WINDOW\",\n 12: \"ARRANGE.ALL\",\n 13: \"WINDOW.SIZE\",\n 14: \"WINDOW.MOVE\",\n 15: \"FULL\",\n 16: \"CLOSE\",\n 17: \"RUN\",\n 22: \"SET.PRINT.AREA\",\n 23: \"SET.PRINT.TITLES\",\n 24: \"SET.PAGE.BREAK\",\n 25: \"REMOVE.PAGE.BREAK\",\n 26: \"FONT\",\n 27: \"DISPLAY\",\n 28: \"PROTECT.DOCUMENT\",\n 29: \"PRECISION\",\n 30: \"A1.R1C1\",\n 31: \"CALCULATE.NOW\",\n 32: \"CALCULATION\",\n 34: \"DATA.FIND\",\n 35: \"EXTRACT\",\n 36: \"DATA.DELETE\",\n 37: \"SET.DATABASE\",\n 38: \"SET.CRITERIA\",\n 39: \"SORT\",\n 40: \"DATA.SERIES\",\n 41: \"TABLE\",\n 42: \"FORMAT.NUMBER\",\n 43: \"ALIGNMENT\",\n 44: \"STYLE\",\n 45: \"BORDER\",\n 46: \"CELL.PROTECTION\",\n 47: \"COLUMN.WIDTH\",\n 48: \"UNDO\",\n 49: \"CUT\",\n 50: \"COPY\",\n 51: \"PASTE\",\n 52: \"CLEAR\",\n 53: \"PASTE.SPECIAL\",\n 54: \"EDIT.DELETE\",\n 55: \"INSERT\",\n 56: \"FILL.RIGHT\",\n 57: \"FILL.DOWN\",\n 61: \"DEFINE.NAME\",\n 62: \"CREATE.NAMES\",\n 63: \"FORMULA.GOTO\",\n 64: \"FORMULA.FIND\",\n 65: \"SELECT.LAST.CELL\",\n 66: \"SHOW.ACTIVE.CELL\",\n 67: \"GALLERY.AREA\",\n 68: \"GALLERY.BAR\",\n 69: \"GALLERY.COLUMN\",\n 70: \"GALLERY.LINE\",\n 71: \"GALLERY.PIE\",\n 72: \"GALLERY.SCATTER\",\n 73: \"COMBINATION\",\n 74: \"PREFERRED\",\n 75: \"ADD.OVERLAY\",\n 76: \"GRIDLINES\",\n 77: \"SET.PREFERRED\",\n 78: \"AXES\",\n 79: \"LEGEND\",\n 80: \"ATTACH.TEXT\",\n 81: \"ADD.ARROW\",\n 82: \"SELECT.CHART\",\n 83: \"SELECT.PLOT.AREA\",\n 84: \"PATTERNS\",\n 85: \"MAIN.CHART\",\n 86: \"OVERLAY\",\n 87: \"SCALE\",\n 88: \"FORMAT.LEGEND\",\n 89: \"FORMAT.TEXT\",\n 90: \"EDIT.REPEAT\",\n 91: \"PARSE\",\n 92: \"JUSTIFY\",\n 93: \"HIDE\",\n 94: \"UNHIDE\",\n 95: \"WORKSPACE\",\n 96: \"FORMULA\",\n 97: \"FORMULA.FILL\",\n 98: \"FORMULA.ARRAY\",\n 99: \"DATA.FIND.NEXT\",\n 100: \"DATA.FIND.PREV\",\n 101: \"FORMULA.FIND.NEXT\",\n 102: \"FORMULA.FIND.PREV\",\n 103: \"ACTIVATE\",\n 104: \"ACTIVATE.NEXT\",\n 105: \"ACTIVATE.PREV\",\n 106: \"UNLOCKED.NEXT\",\n 107: \"UNLOCKED.PREV\",\n 108: \"COPY.PICTURE\",\n 109: \"SELECT\",\n 110: \"DELETE.NAME\",\n 111: \"DELETE.FORMAT\",\n 112: \"VLINE\",\n 113: \"HLINE\",\n 114: \"VPAGE\",\n 115: \"HPAGE\",\n 116: \"VSCROLL\",\n 117: \"HSCROLL\",\n 118: \"ALERT\",\n 119: \"NEW\",\n 120: \"CANCEL.COPY\",\n 121: \"SHOW.CLIPBOARD\",\n 122: \"MESSAGE\",\n 124: \"PASTE.LINK\",\n 125: \"APP.ACTIVATE\",\n 126: \"DELETE.ARROW\",\n 127: \"ROW.HEIGHT\",\n 128: \"FORMAT.MOVE\",\n 129: \"FORMAT.SIZE\",\n 130: \"FORMULA.REPLACE\",\n 131: \"SEND.KEYS\",\n 132: \"SELECT.SPECIAL\",\n 133: \"APPLY.NAMES\",\n 134: \"REPLACE.FONT\",\n 135: \"FREEZE.PANES\",\n 136: \"SHOW.INFO\",\n 137: \"SPLIT\",\n 138: \"ON.WINDOW\",\n 139: \"ON.DATA\",\n 140: \"DISABLE.INPUT\",\n 142: \"OUTLINE\",\n 143: \"LIST.NAMES\",\n 144: \"FILE.CLOSE\",\n 145: \"SAVE.WORKBOOK\",\n 146: \"DATA.FORM\",\n 147: \"COPY.CHART\",\n 148: \"ON.TIME\",\n 149: \"WAIT\",\n 150: \"FORMAT.FONT\",\n 151: \"FILL.UP\",\n 152: \"FILL.LEFT\",\n 153: \"DELETE.OVERLAY\",\n 155: \"SHORT.MENUS\",\n 159: \"SET.UPDATE.STATUS\",\n 161: \"COLOR.PALETTE\",\n 162: \"DELETE.STYLE\",\n 163: \"WINDOW.RESTORE\",\n 164: \"WINDOW.MAXIMIZE\",\n 166: \"CHANGE.LINK\",\n 167: \"CALCULATE.DOCUMENT\",\n 168: \"ON.KEY\",\n 169: \"APP.RESTORE\",\n 170: \"APP.MOVE\",\n 171: \"APP.SIZE\",\n 172: \"APP.MINIMIZE\",\n 173: \"APP.MAXIMIZE\",\n 174: \"BRING.TO.FRONT\",\n 175: \"SEND.TO.BACK\",\n 185: \"MAIN.CHART.TYPE\",\n 186: \"OVERLAY.CHART.TYPE\",\n 187: \"SELECT.END\",\n 188: \"OPEN.MAIL\",\n 189: \"SEND.MAIL\",\n 190: \"STANDARD.FONT\",\n 191: \"CONSOLIDATE\",\n 192: \"SORT.SPECIAL\",\n 193: \"GALLERY.3D.AREA\",\n 194: \"GALLERY.3D.COLUMN\",\n 195: \"GALLERY.3D.LINE\",\n 196: \"GALLERY.3D.PIE\",\n 197: \"VIEW.3D\",\n 198: \"GOAL.SEEK\",\n 199: \"WORKGROUP\",\n 200: \"FILL.GROUP\",\n 201: \"UPDATE.LINK\",\n 202: \"PROMOTE\",\n 203: \"DEMOTE\",\n 204: \"SHOW.DETAIL\",\n 206: \"UNGROUP\",\n 207: \"OBJECT.PROPERTIES\",\n 208: \"SAVE.NEW.OBJECT\",\n 209: \"SHARE\",\n 210: \"SHARE.NAME\",\n 211: \"DUPLICATE\",\n 212: \"APPLY.STYLE\",\n 213: \"ASSIGN.TO.OBJECT\",\n 214: \"OBJECT.PROTECTION\",\n 215: \"HIDE.OBJECT\",\n 216: \"SET.EXTRACT\",\n 217: \"CREATE.PUBLISHER\",\n 218: \"SUBSCRIBE.TO\",\n 219: \"ATTRIBUTES\",\n 220: \"SHOW.TOOLBAR\",\n 222: \"PRINT.PREVIEW\",\n 223: \"EDIT.COLOR\",\n 224: \"SHOW.LEVELS\",\n 225: \"FORMAT.MAIN\",\n 226: \"FORMAT.OVERLAY\",\n 227: \"ON.RECALC\",\n 228: \"EDIT.SERIES\",\n 229: \"DEFINE.STYLE\",\n 240: \"LINE.PRINT\",\n 243: \"ENTER.DATA\",\n 249: \"GALLERY.RADAR\",\n 250: \"MERGE.STYLES\",\n 251: \"EDITION.OPTIONS\",\n 252: \"PASTE.PICTURE\",\n 253: \"PASTE.PICTURE.LINK\",\n 254: \"SPELLING\",\n 256: \"ZOOM\",\n 259: \"INSERT.OBJECT\",\n 260: \"WINDOW.MINIMIZE\",\n 265: \"SOUND.NOTE\",\n 266: \"SOUND.PLAY\",\n 267: \"FORMAT.SHAPE\",\n 268: \"EXTEND.POLYGON\",\n 269: \"FORMAT.AUTO\",\n 272: \"GALLERY.3D.BAR\",\n 273: \"GALLERY.3D.SURFACE\",\n 274: \"FILL.AUTO\",\n 276: \"CUSTOMIZE.TOOLBAR\",\n 277: \"ADD.TOOL\",\n 278: \"EDIT.OBJECT\",\n 279: \"ON.DOUBLECLICK\",\n 280: \"ON.ENTRY\",\n 281: \"WORKBOOK.ADD\",\n 282: \"WORKBOOK.MOVE\",\n 283: \"WORKBOOK.COPY\",\n 284: \"WORKBOOK.OPTIONS\",\n 285: \"SAVE.WORKSPACE\",\n 288: \"CHART.WIZARD\",\n 289: \"DELETE.TOOL\",\n 290: \"MOVE.TOOL\",\n 291: \"WORKBOOK.SELECT\",\n 292: \"WORKBOOK.ACTIVATE\",\n 293: \"ASSIGN.TO.TOOL\",\n 295: \"COPY.TOOL\",\n 296: \"RESET.TOOL\",\n 297: \"CONSTRAIN.NUMERIC\",\n 298: \"PASTE.TOOL\",\n 302: \"WORKBOOK.NEW\",\n 305: \"SCENARIO.CELLS\",\n 306: \"SCENARIO.DELETE\",\n 307: \"SCENARIO.ADD\",\n 308: \"SCENARIO.EDIT\",\n 309: \"SCENARIO.SHOW\",\n 310: \"SCENARIO.SHOW.NEXT\",\n 311: \"SCENARIO.SUMMARY\",\n 312: \"PIVOT.TABLE.WIZARD\",\n 313: \"PIVOT.FIELD.PROPERTIES\",\n 314: \"PIVOT.FIELD\",\n 315: \"PIVOT.ITEM\",\n 316: \"PIVOT.ADD.FIELDS\",\n 318: \"OPTIONS.CALCULATION\",\n 319: \"OPTIONS.EDIT\",\n 320: \"OPTIONS.VIEW\",\n 321: \"ADDIN.MANAGER\",\n 322: \"MENU.EDITOR\",\n 323: \"ATTACH.TOOLBARS\",\n 324: \"VBAActivate\",\n 325: \"OPTIONS.CHART\",\n 328: \"VBA.INSERT.FILE\",\n 330: \"VBA.PROCEDURE.DEFINITION\",\n 336: \"ROUTING.SLIP\",\n 338: \"ROUTE.DOCUMENT\",\n 339: \"MAIL.LOGON\",\n 342: \"INSERT.PICTURE\",\n 343: \"EDIT.TOOL\",\n 344: \"GALLERY.DOUGHNUT\",\n 350: \"CHART.TREND\",\n 352: \"PIVOT.ITEM.PROPERTIES\",\n 354: \"WORKBOOK.INSERT\",\n 355: \"OPTIONS.TRANSITION\",\n 356: \"OPTIONS.GENERAL\",\n 370: \"FILTER.ADVANCED\",\n 373: \"MAIL.ADD.MAILER\",\n 374: \"MAIL.DELETE.MAILER\",\n 375: \"MAIL.REPLY\",\n 376: \"MAIL.REPLY.ALL\",\n 377: \"MAIL.FORWARD\",\n 378: \"MAIL.NEXT.LETTER\",\n 379: \"DATA.LABEL\",\n 380: \"INSERT.TITLE\",\n 381: \"FONT.PROPERTIES\",\n 382: \"MACRO.OPTIONS\",\n 383: \"WORKBOOK.HIDE\",\n 384: \"WORKBOOK.UNHIDE\",\n 385: \"WORKBOOK.DELETE\",\n 386: \"WORKBOOK.NAME\",\n 388: \"GALLERY.CUSTOM\",\n 390: \"ADD.CHART.AUTOFORMAT\",\n 391: \"DELETE.CHART.AUTOFORMAT\",\n 392: \"CHART.ADD.DATA\",\n 393: \"AUTO.OUTLINE\",\n 394: \"TAB.ORDER\",\n 395: \"SHOW.DIALOG\",\n 396: \"SELECT.ALL\",\n 397: \"UNGROUP.SHEETS\",\n 398: \"SUBTOTAL.CREATE\",\n 399: \"SUBTOTAL.REMOVE\",\n 400: \"RENAME.OBJECT\",\n 412: \"WORKBOOK.SCROLL\",\n 413: \"WORKBOOK.NEXT\",\n 414: \"WORKBOOK.PREV\",\n 415: \"WORKBOOK.TAB.SPLIT\",\n 416: \"FULL.SCREEN\",\n 417: \"WORKBOOK.PROTECT\",\n 420: \"SCROLLBAR.PROPERTIES\",\n 421: \"PIVOT.SHOW.PAGES\",\n 422: \"TEXT.TO.COLUMNS\",\n 423: \"FORMAT.CHARTTYPE\",\n 424: \"LINK.FORMAT\",\n 425: \"TRACER.DISPLAY\",\n 430: \"TRACER.NAVIGATE\",\n 431: \"TRACER.CLEAR\",\n 432: \"TRACER.ERROR\",\n 433: \"PIVOT.FIELD.GROUP\",\n 434: \"PIVOT.FIELD.UNGROUP\",\n 435: \"CHECKBOX.PROPERTIES\",\n 436: \"LABEL.PROPERTIES\",\n 437: \"LISTBOX.PROPERTIES\",\n 438: \"EDITBOX.PROPERTIES\",\n 439: \"PIVOT.REFRESH\",\n 440: \"LINK.COMBO\",\n 441: \"OPEN.TEXT\",\n 442: \"HIDE.DIALOG\",\n 443: \"SET.DIALOG.FOCUS\",\n 444: \"ENABLE.OBJECT\",\n 445: \"PUSHBUTTON.PROPERTIES\",\n 446: \"SET.DIALOG.DEFAULT\",\n 447: \"FILTER\",\n 448: \"FILTER.SHOW.ALL\",\n 449: \"CLEAR.OUTLINE\",\n 450: \"FUNCTION.WIZARD\",\n 451: \"ADD.LIST.ITEM\",\n 452: \"SET.LIST.ITEM\",\n 453: \"REMOVE.LIST.ITEM\",\n 454: \"SELECT.LIST.ITEM\",\n 455: \"SET.CONTROL.VALUE\",\n 456: \"SAVE.COPY.AS\",\n 458: \"OPTIONS.LISTS.ADD\",\n 459: \"OPTIONS.LISTS.DELETE\",\n 460: \"SERIES.AXES\",\n 461: \"SERIES.X\",\n 462: \"SERIES.Y\",\n 463: \"ERRORBAR.X\",\n 464: \"ERRORBAR.Y\",\n 465: \"FORMAT.CHART\",\n 466: \"SERIES.ORDER\",\n 467: \"MAIL.LOGOFF\",\n 468: \"CLEAR.ROUTING.SLIP\",\n 469: \"APP.ACTIVATE.MICROSOFT\",\n 470: \"MAIL.EDIT.MAILER\",\n 471: \"ON.SHEET\",\n 472: \"STANDARD.WIDTH\",\n 473: \"SCENARIO.MERGE\",\n 474: \"SUMMARY.INFO\",\n 475: \"FIND.FILE\",\n 476: \"ACTIVE.CELL.FONT\",\n 477: \"ENABLE.TIPWIZARD\",\n 478: \"VBA.MAKE.ADDIN\",\n 480: \"INSERTDATATABLE\",\n 481: \"WORKGROUP.OPTIONS\",\n 482: \"MAIL.SEND.MAILER\",\n 485: \"AUTOCORRECT\",\n 489: \"POST.DOCUMENT\",\n 491: \"PICKLIST\",\n 493: \"VIEW.SHOW\",\n 494: \"VIEW.DEFINE\",\n 495: \"VIEW.DELETE\",\n 509: \"SHEET.BACKGROUND\",\n 510: \"INSERT.MAP.OBJECT\",\n 511: \"OPTIONS.MENONO\",\n 517: \"MSOCHECKS\",\n 518: \"NORMAL\",\n 519: \"LAYOUT\",\n 520: \"RM.PRINT.AREA\",\n 521: \"CLEAR.PRINT.AREA\",\n 522: \"ADD.PRINT.AREA\",\n 523: \"MOVE.BRK\",\n 545: \"HIDECURR.NOTE\",\n 546: \"HIDEALL.NOTES\",\n 547: \"DELETE.NOTE\",\n 548: \"TRAVERSE.NOTES\",\n 549: \"ACTIVATE.NOTES\",\n 620: \"PROTECT.REVISIONS\",\n 621: \"UNPROTECT.REVISIONS\",\n 647: \"OPTIONS.ME\",\n 653: \"WEB.PUBLISH\",\n 667: \"NEWWEBQUERY\",\n 673: \"PIVOT.TABLE.CHART\",\n 753: \"OPTIONS.SAVE\",\n 755: \"OPTIONS.SPELL\",\n 808: \"HIDEALL.INKANNOTS\"\n};\nvar Ftab = {\n 0: \"COUNT\",\n 1: \"IF\",\n 2: \"ISNA\",\n 3: \"ISERROR\",\n 4: \"SUM\",\n 5: \"AVERAGE\",\n 6: \"MIN\",\n 7: \"MAX\",\n 8: \"ROW\",\n 9: \"COLUMN\",\n 10: \"NA\",\n 11: \"NPV\",\n 12: \"STDEV\",\n 13: \"DOLLAR\",\n 14: \"FIXED\",\n 15: \"SIN\",\n 16: \"COS\",\n 17: \"TAN\",\n 18: \"ATAN\",\n 19: \"PI\",\n 20: \"SQRT\",\n 21: \"EXP\",\n 22: \"LN\",\n 23: \"LOG10\",\n 24: \"ABS\",\n 25: \"INT\",\n 26: \"SIGN\",\n 27: \"ROUND\",\n 28: \"LOOKUP\",\n 29: \"INDEX\",\n 30: \"REPT\",\n 31: \"MID\",\n 32: \"LEN\",\n 33: \"VALUE\",\n 34: \"TRUE\",\n 35: \"FALSE\",\n 36: \"AND\",\n 37: \"OR\",\n 38: \"NOT\",\n 39: \"MOD\",\n 40: \"DCOUNT\",\n 41: \"DSUM\",\n 42: \"DAVERAGE\",\n 43: \"DMIN\",\n 44: \"DMAX\",\n 45: \"DSTDEV\",\n 46: \"VAR\",\n 47: \"DVAR\",\n 48: \"TEXT\",\n 49: \"LINEST\",\n 50: \"TREND\",\n 51: \"LOGEST\",\n 52: \"GROWTH\",\n 53: \"GOTO\",\n 54: \"HALT\",\n 55: \"RETURN\",\n 56: \"PV\",\n 57: \"FV\",\n 58: \"NPER\",\n 59: \"PMT\",\n 60: \"RATE\",\n 61: \"MIRR\",\n 62: \"IRR\",\n 63: \"RAND\",\n 64: \"MATCH\",\n 65: \"DATE\",\n 66: \"TIME\",\n 67: \"DAY\",\n 68: \"MONTH\",\n 69: \"YEAR\",\n 70: \"WEEKDAY\",\n 71: \"HOUR\",\n 72: \"MINUTE\",\n 73: \"SECOND\",\n 74: \"NOW\",\n 75: \"AREAS\",\n 76: \"ROWS\",\n 77: \"COLUMNS\",\n 78: \"OFFSET\",\n 79: \"ABSREF\",\n 80: \"RELREF\",\n 81: \"ARGUMENT\",\n 82: \"SEARCH\",\n 83: \"TRANSPOSE\",\n 84: \"ERROR\",\n 85: \"STEP\",\n 86: \"TYPE\",\n 87: \"ECHO\",\n 88: \"SET.NAME\",\n 89: \"CALLER\",\n 90: \"DEREF\",\n 91: \"WINDOWS\",\n 92: \"SERIES\",\n 93: \"DOCUMENTS\",\n 94: \"ACTIVE.CELL\",\n 95: \"SELECTION\",\n 96: \"RESULT\",\n 97: \"ATAN2\",\n 98: \"ASIN\",\n 99: \"ACOS\",\n 100: \"CHOOSE\",\n 101: \"HLOOKUP\",\n 102: \"VLOOKUP\",\n 103: \"LINKS\",\n 104: \"INPUT\",\n 105: \"ISREF\",\n 106: \"GET.FORMULA\",\n 107: \"GET.NAME\",\n 108: \"SET.VALUE\",\n 109: \"LOG\",\n 110: \"EXEC\",\n 111: \"CHAR\",\n 112: \"LOWER\",\n 113: \"UPPER\",\n 114: \"PROPER\",\n 115: \"LEFT\",\n 116: \"RIGHT\",\n 117: \"EXACT\",\n 118: \"TRIM\",\n 119: \"REPLACE\",\n 120: \"SUBSTITUTE\",\n 121: \"CODE\",\n 122: \"NAMES\",\n 123: \"DIRECTORY\",\n 124: \"FIND\",\n 125: \"CELL\",\n 126: \"ISERR\",\n 127: \"ISTEXT\",\n 128: \"ISNUMBER\",\n 129: \"ISBLANK\",\n 130: \"T\",\n 131: \"N\",\n 132: \"FOPEN\",\n 133: \"FCLOSE\",\n 134: \"FSIZE\",\n 135: \"FREADLN\",\n 136: \"FREAD\",\n 137: \"FWRITELN\",\n 138: \"FWRITE\",\n 139: \"FPOS\",\n 140: \"DATEVALUE\",\n 141: \"TIMEVALUE\",\n 142: \"SLN\",\n 143: \"SYD\",\n 144: \"DDB\",\n 145: \"GET.DEF\",\n 146: \"REFTEXT\",\n 147: \"TEXTREF\",\n 148: \"INDIRECT\",\n 149: \"REGISTER\",\n 150: \"CALL\",\n 151: \"ADD.BAR\",\n 152: \"ADD.MENU\",\n 153: \"ADD.COMMAND\",\n 154: \"ENABLE.COMMAND\",\n 155: \"CHECK.COMMAND\",\n 156: \"RENAME.COMMAND\",\n 157: \"SHOW.BAR\",\n 158: \"DELETE.MENU\",\n 159: \"DELETE.COMMAND\",\n 160: \"GET.CHART.ITEM\",\n 161: \"DIALOG.BOX\",\n 162: \"CLEAN\",\n 163: \"MDETERM\",\n 164: \"MINVERSE\",\n 165: \"MMULT\",\n 166: \"FILES\",\n 167: \"IPMT\",\n 168: \"PPMT\",\n 169: \"COUNTA\",\n 170: \"CANCEL.KEY\",\n 171: \"FOR\",\n 172: \"WHILE\",\n 173: \"BREAK\",\n 174: \"NEXT\",\n 175: \"INITIATE\",\n 176: \"REQUEST\",\n 177: \"POKE\",\n 178: \"EXECUTE\",\n 179: \"TERMINATE\",\n 180: \"RESTART\",\n 181: \"HELP\",\n 182: \"GET.BAR\",\n 183: \"PRODUCT\",\n 184: \"FACT\",\n 185: \"GET.CELL\",\n 186: \"GET.WORKSPACE\",\n 187: \"GET.WINDOW\",\n 188: \"GET.DOCUMENT\",\n 189: \"DPRODUCT\",\n 190: \"ISNONTEXT\",\n 191: \"GET.NOTE\",\n 192: \"NOTE\",\n 193: \"STDEVP\",\n 194: \"VARP\",\n 195: \"DSTDEVP\",\n 196: \"DVARP\",\n 197: \"TRUNC\",\n 198: \"ISLOGICAL\",\n 199: \"DCOUNTA\",\n 200: \"DELETE.BAR\",\n 201: \"UNREGISTER\",\n 204: \"USDOLLAR\",\n 205: \"FINDB\",\n 206: \"SEARCHB\",\n 207: \"REPLACEB\",\n 208: \"LEFTB\",\n 209: \"RIGHTB\",\n 210: \"MIDB\",\n 211: \"LENB\",\n 212: \"ROUNDUP\",\n 213: \"ROUNDDOWN\",\n 214: \"ASC\",\n 215: \"DBCS\",\n 216: \"RANK\",\n 219: \"ADDRESS\",\n 220: \"DAYS360\",\n 221: \"TODAY\",\n 222: \"VDB\",\n 223: \"ELSE\",\n 224: \"ELSE.IF\",\n 225: \"END.IF\",\n 226: \"FOR.CELL\",\n 227: \"MEDIAN\",\n 228: \"SUMPRODUCT\",\n 229: \"SINH\",\n 230: \"COSH\",\n 231: \"TANH\",\n 232: \"ASINH\",\n 233: \"ACOSH\",\n 234: \"ATANH\",\n 235: \"DGET\",\n 236: \"CREATE.OBJECT\",\n 237: \"VOLATILE\",\n 238: \"LAST.ERROR\",\n 239: \"CUSTOM.UNDO\",\n 240: \"CUSTOM.REPEAT\",\n 241: \"FORMULA.CONVERT\",\n 242: \"GET.LINK.INFO\",\n 243: \"TEXT.BOX\",\n 244: \"INFO\",\n 245: \"GROUP\",\n 246: \"GET.OBJECT\",\n 247: \"DB\",\n 248: \"PAUSE\",\n 251: \"RESUME\",\n 252: \"FREQUENCY\",\n 253: \"ADD.TOOLBAR\",\n 254: \"DELETE.TOOLBAR\",\n 255: \"User\",\n 256: \"RESET.TOOLBAR\",\n 257: \"EVALUATE\",\n 258: \"GET.TOOLBAR\",\n 259: \"GET.TOOL\",\n 260: \"SPELLING.CHECK\",\n 261: \"ERROR.TYPE\",\n 262: \"APP.TITLE\",\n 263: \"WINDOW.TITLE\",\n 264: \"SAVE.TOOLBAR\",\n 265: \"ENABLE.TOOL\",\n 266: \"PRESS.TOOL\",\n 267: \"REGISTER.ID\",\n 268: \"GET.WORKBOOK\",\n 269: \"AVEDEV\",\n 270: \"BETADIST\",\n 271: \"GAMMALN\",\n 272: \"BETAINV\",\n 273: \"BINOMDIST\",\n 274: \"CHIDIST\",\n 275: \"CHIINV\",\n 276: \"COMBIN\",\n 277: \"CONFIDENCE\",\n 278: \"CRITBINOM\",\n 279: \"EVEN\",\n 280: \"EXPONDIST\",\n 281: \"FDIST\",\n 282: \"FINV\",\n 283: \"FISHER\",\n 284: \"FISHERINV\",\n 285: \"FLOOR\",\n 286: \"GAMMADIST\",\n 287: \"GAMMAINV\",\n 288: \"CEILING\",\n 289: \"HYPGEOMDIST\",\n 290: \"LOGNORMDIST\",\n 291: \"LOGINV\",\n 292: \"NEGBINOMDIST\",\n 293: \"NORMDIST\",\n 294: \"NORMSDIST\",\n 295: \"NORMINV\",\n 296: \"NORMSINV\",\n 297: \"STANDARDIZE\",\n 298: \"ODD\",\n 299: \"PERMUT\",\n 300: \"POISSON\",\n 301: \"TDIST\",\n 302: \"WEIBULL\",\n 303: \"SUMXMY2\",\n 304: \"SUMX2MY2\",\n 305: \"SUMX2PY2\",\n 306: \"CHITEST\",\n 307: \"CORREL\",\n 308: \"COVAR\",\n 309: \"FORECAST\",\n 310: \"FTEST\",\n 311: \"INTERCEPT\",\n 312: \"PEARSON\",\n 313: \"RSQ\",\n 314: \"STEYX\",\n 315: \"SLOPE\",\n 316: \"TTEST\",\n 317: \"PROB\",\n 318: \"DEVSQ\",\n 319: \"GEOMEAN\",\n 320: \"HARMEAN\",\n 321: \"SUMSQ\",\n 322: \"KURT\",\n 323: \"SKEW\",\n 324: \"ZTEST\",\n 325: \"LARGE\",\n 326: \"SMALL\",\n 327: \"QUARTILE\",\n 328: \"PERCENTILE\",\n 329: \"PERCENTRANK\",\n 330: \"MODE\",\n 331: \"TRIMMEAN\",\n 332: \"TINV\",\n 334: \"MOVIE.COMMAND\",\n 335: \"GET.MOVIE\",\n 336: \"CONCATENATE\",\n 337: \"POWER\",\n 338: \"PIVOT.ADD.DATA\",\n 339: \"GET.PIVOT.TABLE\",\n 340: \"GET.PIVOT.FIELD\",\n 341: \"GET.PIVOT.ITEM\",\n 342: \"RADIANS\",\n 343: \"DEGREES\",\n 344: \"SUBTOTAL\",\n 345: \"SUMIF\",\n 346: \"COUNTIF\",\n 347: \"COUNTBLANK\",\n 348: \"SCENARIO.GET\",\n 349: \"OPTIONS.LISTS.GET\",\n 350: \"ISPMT\",\n 351: \"DATEDIF\",\n 352: \"DATESTRING\",\n 353: \"NUMBERSTRING\",\n 354: \"ROMAN\",\n 355: \"OPEN.DIALOG\",\n 356: \"SAVE.DIALOG\",\n 357: \"VIEW.GET\",\n 358: \"GETPIVOTDATA\",\n 359: \"HYPERLINK\",\n 360: \"PHONETIC\",\n 361: \"AVERAGEA\",\n 362: \"MAXA\",\n 363: \"MINA\",\n 364: \"STDEVPA\",\n 365: \"VARPA\",\n 366: \"STDEVA\",\n 367: \"VARA\",\n 368: \"BAHTTEXT\",\n 369: \"THAIDAYOFWEEK\",\n 370: \"THAIDIGIT\",\n 371: \"THAIMONTHOFYEAR\",\n 372: \"THAINUMSOUND\",\n 373: \"THAINUMSTRING\",\n 374: \"THAISTRINGLENGTH\",\n 375: \"ISTHAIDIGIT\",\n 376: \"ROUNDBAHTDOWN\",\n 377: \"ROUNDBAHTUP\",\n 378: \"THAIYEAR\",\n 379: \"RTD\",\n 380: \"CUBEVALUE\",\n 381: \"CUBEMEMBER\",\n 382: \"CUBEMEMBERPROPERTY\",\n 383: \"CUBERANKEDMEMBER\",\n 384: \"HEX2BIN\",\n 385: \"HEX2DEC\",\n 386: \"HEX2OCT\",\n 387: \"DEC2BIN\",\n 388: \"DEC2HEX\",\n 389: \"DEC2OCT\",\n 390: \"OCT2BIN\",\n 391: \"OCT2HEX\",\n 392: \"OCT2DEC\",\n 393: \"BIN2DEC\",\n 394: \"BIN2OCT\",\n 395: \"BIN2HEX\",\n 396: \"IMSUB\",\n 397: \"IMDIV\",\n 398: \"IMPOWER\",\n 399: \"IMABS\",\n 400: \"IMSQRT\",\n 401: \"IMLN\",\n 402: \"IMLOG2\",\n 403: \"IMLOG10\",\n 404: \"IMSIN\",\n 405: \"IMCOS\",\n 406: \"IMEXP\",\n 407: \"IMARGUMENT\",\n 408: \"IMCONJUGATE\",\n 409: \"IMAGINARY\",\n 410: \"IMREAL\",\n 411: \"COMPLEX\",\n 412: \"IMSUM\",\n 413: \"IMPRODUCT\",\n 414: \"SERIESSUM\",\n 415: \"FACTDOUBLE\",\n 416: \"SQRTPI\",\n 417: \"QUOTIENT\",\n 418: \"DELTA\",\n 419: \"GESTEP\",\n 420: \"ISEVEN\",\n 421: \"ISODD\",\n 422: \"MROUND\",\n 423: \"ERF\",\n 424: \"ERFC\",\n 425: \"BESSELJ\",\n 426: \"BESSELK\",\n 427: \"BESSELY\",\n 428: \"BESSELI\",\n 429: \"XIRR\",\n 430: \"XNPV\",\n 431: \"PRICEMAT\",\n 432: \"YIELDMAT\",\n 433: \"INTRATE\",\n 434: \"RECEIVED\",\n 435: \"DISC\",\n 436: \"PRICEDISC\",\n 437: \"YIELDDISC\",\n 438: \"TBILLEQ\",\n 439: \"TBILLPRICE\",\n 440: \"TBILLYIELD\",\n 441: \"PRICE\",\n 442: \"YIELD\",\n 443: \"DOLLARDE\",\n 444: \"DOLLARFR\",\n 445: \"NOMINAL\",\n 446: \"EFFECT\",\n 447: \"CUMPRINC\",\n 448: \"CUMIPMT\",\n 449: \"EDATE\",\n 450: \"EOMONTH\",\n 451: \"YEARFRAC\",\n 452: \"COUPDAYBS\",\n 453: \"COUPDAYS\",\n 454: \"COUPDAYSNC\",\n 455: \"COUPNCD\",\n 456: \"COUPNUM\",\n 457: \"COUPPCD\",\n 458: \"DURATION\",\n 459: \"MDURATION\",\n 460: \"ODDLPRICE\",\n 461: \"ODDLYIELD\",\n 462: \"ODDFPRICE\",\n 463: \"ODDFYIELD\",\n 464: \"RANDBETWEEN\",\n 465: \"WEEKNUM\",\n 466: \"AMORDEGRC\",\n 467: \"AMORLINC\",\n 468: \"CONVERT\",\n 724: \"SHEETJS\",\n 469: \"ACCRINT\",\n 470: \"ACCRINTM\",\n 471: \"WORKDAY\",\n 472: \"NETWORKDAYS\",\n 473: \"GCD\",\n 474: \"MULTINOMIAL\",\n 475: \"LCM\",\n 476: \"FVSCHEDULE\",\n 477: \"CUBEKPIMEMBER\",\n 478: \"CUBESET\",\n 479: \"CUBESETCOUNT\",\n 480: \"IFERROR\",\n 481: \"COUNTIFS\",\n 482: \"SUMIFS\",\n 483: \"AVERAGEIF\",\n 484: \"AVERAGEIFS\"\n};\nvar FtabArgc = {\n 2: 1,\n 3: 1,\n 10: 0,\n 15: 1,\n 16: 1,\n 17: 1,\n 18: 1,\n 19: 0,\n 20: 1,\n 21: 1,\n 22: 1,\n 23: 1,\n 24: 1,\n 25: 1,\n 26: 1,\n 27: 2,\n 30: 2,\n 31: 3,\n 32: 1,\n 33: 1,\n 34: 0,\n 35: 0,\n 38: 1,\n 39: 2,\n 40: 3,\n 41: 3,\n 42: 3,\n 43: 3,\n 44: 3,\n 45: 3,\n 47: 3,\n 48: 2,\n 53: 1,\n 61: 3,\n 63: 0,\n 65: 3,\n 66: 3,\n 67: 1,\n 68: 1,\n 69: 1,\n 70: 1,\n 71: 1,\n 72: 1,\n 73: 1,\n 74: 0,\n 75: 1,\n 76: 1,\n 77: 1,\n 79: 2,\n 80: 2,\n 83: 1,\n 85: 0,\n 86: 1,\n 89: 0,\n 90: 1,\n 94: 0,\n 95: 0,\n 97: 2,\n 98: 1,\n 99: 1,\n 101: 3,\n 102: 3,\n 105: 1,\n 106: 1,\n 108: 2,\n 111: 1,\n 112: 1,\n 113: 1,\n 114: 1,\n 117: 2,\n 118: 1,\n 119: 4,\n 121: 1,\n 126: 1,\n 127: 1,\n 128: 1,\n 129: 1,\n 130: 1,\n 131: 1,\n 133: 1,\n 134: 1,\n 135: 1,\n 136: 2,\n 137: 2,\n 138: 2,\n 140: 1,\n 141: 1,\n 142: 3,\n 143: 4,\n 144: 4,\n 161: 1,\n 162: 1,\n 163: 1,\n 164: 1,\n 165: 2,\n 172: 1,\n 175: 2,\n 176: 2,\n 177: 3,\n 178: 2,\n 179: 1,\n 184: 1,\n 186: 1,\n 189: 3,\n 190: 1,\n 195: 3,\n 196: 3,\n 197: 1,\n 198: 1,\n 199: 3,\n 201: 1,\n 207: 4,\n 210: 3,\n 211: 1,\n 212: 2,\n 213: 2,\n 214: 1,\n 215: 1,\n 225: 0,\n 229: 1,\n 230: 1,\n 231: 1,\n 232: 1,\n 233: 1,\n 234: 1,\n 235: 3,\n 244: 1,\n 247: 4,\n 252: 2,\n 257: 1,\n 261: 1,\n 271: 1,\n 273: 4,\n 274: 2,\n 275: 2,\n 276: 2,\n 277: 3,\n 278: 3,\n 279: 1,\n 280: 3,\n 281: 3,\n 282: 3,\n 283: 1,\n 284: 1,\n 285: 2,\n 286: 4,\n 287: 3,\n 288: 2,\n 289: 4,\n 290: 3,\n 291: 3,\n 292: 3,\n 293: 4,\n 294: 1,\n 295: 3,\n 296: 1,\n 297: 3,\n 298: 1,\n 299: 2,\n 300: 3,\n 301: 3,\n 302: 4,\n 303: 2,\n 304: 2,\n 305: 2,\n 306: 2,\n 307: 2,\n 308: 2,\n 309: 3,\n 310: 2,\n 311: 2,\n 312: 2,\n 313: 2,\n 314: 2,\n 315: 2,\n 316: 4,\n 325: 2,\n 326: 2,\n 327: 2,\n 328: 2,\n 331: 2,\n 332: 2,\n 337: 2,\n 342: 1,\n 343: 1,\n 346: 2,\n 347: 1,\n 350: 4,\n 351: 3,\n 352: 1,\n 353: 2,\n 360: 1,\n 368: 1,\n 369: 1,\n 370: 1,\n 371: 1,\n 372: 1,\n 373: 1,\n 374: 1,\n 375: 1,\n 376: 1,\n 377: 1,\n 378: 1,\n 382: 3,\n 385: 1,\n 392: 1,\n 393: 1,\n 396: 2,\n 397: 2,\n 398: 2,\n 399: 1,\n 400: 1,\n 401: 1,\n 402: 1,\n 403: 1,\n 404: 1,\n 405: 1,\n 406: 1,\n 407: 1,\n 408: 1,\n 409: 1,\n 410: 1,\n 414: 4,\n 415: 1,\n 416: 1,\n 417: 2,\n 420: 1,\n 421: 1,\n 422: 2,\n 424: 1,\n 425: 2,\n 426: 2,\n 427: 2,\n 428: 2,\n 430: 3,\n 438: 3,\n 439: 3,\n 440: 3,\n 443: 2,\n 444: 2,\n 445: 2,\n 446: 2,\n 447: 6,\n 448: 6,\n 449: 2,\n 450: 2,\n 464: 2,\n 468: 3,\n 476: 2,\n 479: 1,\n 480: 2,\n 65535: 0\n};\n/* Part 3 TODO: actually parse formulae */\nfunction ods_to_csf_formula(f/*:string*/)/*:string*/ {\n\tif(f.slice(0,3) == \"of:\") f = f.slice(3);\n\t/* 5.2 Basic Expressions */\n\tif(f.charCodeAt(0) == 61) {\n\t\tf = f.slice(1);\n\t\tif(f.charCodeAt(0) == 61) f = f.slice(1);\n\t}\n\tf = f.replace(/COM\\.MICROSOFT\\./g, \"\");\n\t/* Part 3 Section 5.8 References */\n\tf = f.replace(/\\[((?:\\.[A-Z]+[0-9]+)(?::\\.[A-Z]+[0-9]+)?)\\]/g, function($$, $1) { return $1.replace(/\\./g,\"\"); });\n\t/* TODO: something other than this */\n\tf = f.replace(/\\[.(#[A-Z]*[?!])\\]/g, \"$1\");\n\treturn f.replace(/[;~]/g,\",\").replace(/\\|/g,\";\");\n}\n\nfunction csf_to_ods_formula(f/*:string*/)/*:string*/ {\n\tvar o = \"of:=\" + f.replace(crefregex, \"$1[.$2$3$4$5]\").replace(/\\]:\\[/g,\":\");\n\t/* TODO: something other than this */\n\treturn o.replace(/;/g, \"|\").replace(/,/g,\";\");\n}\n\nfunction ods_to_csf_3D(r/*:string*/)/*:[string, string]*/ {\n\tvar a = r.split(\":\");\n\tvar s = a[0].split(\".\")[0];\n\treturn [s, a[0].split(\".\")[1] + (a.length > 1 ? (\":\" + (a[1].split(\".\")[1] || a[1].split(\".\")[0])) : \"\")];\n}\n\nfunction csf_to_ods_3D(r/*:string*/)/*:string*/ {\n\treturn r.replace(/\\./,\"!\");\n}\n\nvar strs = {}; // shared strings\nvar _ssfopts = {}; // spreadsheet formatting options\n\n\n/*global Map */\nvar browser_has_Map = typeof Map !== 'undefined';\n\nfunction get_sst_id(sst/*:SST*/, str/*:string*/, rev)/*:number*/ {\n\tvar i = 0, len = sst.length;\n\tif(rev) {\n\t\tif(browser_has_Map ? rev.has(str) : Object.prototype.hasOwnProperty.call(rev, str)) {\n\t\t\tvar revarr = browser_has_Map ? rev.get(str) : rev[str];\n\t\t\tfor(; i < revarr.length; ++i) {\n\t\t\t\tif(sst[revarr[i]].t === str) { sst.Count ++; return revarr[i]; }\n\t\t\t}\n\t\t}\n\t} else for(; i < len; ++i) {\n\t\tif(sst[i].t === str) { sst.Count ++; return i; }\n\t}\n\tsst[len] = ({t:str}/*:any*/); sst.Count ++; sst.Unique ++;\n\tif(rev) {\n\t\tif(browser_has_Map) {\n\t\t\tif(!rev.has(str)) rev.set(str, []);\n\t\t\trev.get(str).push(len);\n\t\t} else {\n\t\t\tif(!Object.prototype.hasOwnProperty.call(rev, str)) rev[str] = [];\n\t\t\trev[str].push(len);\n\t\t}\n\t}\n\treturn len;\n}\n\nfunction col_obj_w(C/*:number*/, col) {\n\tvar p = ({min:C+1,max:C+1}/*:any*/);\n\t/* wch (chars), wpx (pixels) */\n\tvar wch = -1;\n\tif(col.MDW) MDW = col.MDW;\n\tif(col.width != null) p.customWidth = 1;\n\telse if(col.wpx != null) wch = px2char(col.wpx);\n\telse if(col.wch != null) wch = col.wch;\n\tif(wch > -1) { p.width = char2width(wch); p.customWidth = 1; }\n\telse if(col.width != null) p.width = col.width;\n\tif(col.hidden) p.hidden = true;\n\tif(col.level != null) { p.outlineLevel = p.level = col.level; }\n\treturn p;\n}\n\nfunction default_margins(margins/*:Margins*/, mode/*:?string*/) {\n\tif(!margins) return;\n\tvar defs = [0.7, 0.7, 0.75, 0.75, 0.3, 0.3];\n\tif(mode == 'xlml') defs = [1, 1, 1, 1, 0.5, 0.5];\n\tif(margins.left == null) margins.left = defs[0];\n\tif(margins.right == null) margins.right = defs[1];\n\tif(margins.top == null) margins.top = defs[2];\n\tif(margins.bottom == null) margins.bottom = defs[3];\n\tif(margins.header == null) margins.header = defs[4];\n\tif(margins.footer == null) margins.footer = defs[5];\n}\n\nfunction get_cell_style(styles/*:Array*/, cell/*:Cell*/, opts) {\n\tvar z = opts.revssf[cell.z != null ? cell.z : \"General\"];\n\tvar i = 0x3c, len = styles.length;\n\tif(z == null && opts.ssf) {\n\t\tfor(; i < 0x188; ++i) if(opts.ssf[i] == null) {\n\t\t\tSSF_load(cell.z, i);\n\t\t\t// $FlowIgnore\n\t\t\topts.ssf[i] = cell.z;\n\t\t\topts.revssf[cell.z] = z = i;\n\t\t\tbreak;\n\t\t}\n\t}\n\tfor(i = 0; i != len; ++i) if(styles[i].numFmtId === z) return i;\n\tstyles[len] = {\n\t\tnumFmtId:z,\n\t\tfontId:0,\n\t\tfillId:0,\n\t\tborderId:0,\n\t\txfId:0,\n\t\tapplyNumberFormat:1\n\t};\n\treturn len;\n}\n\nfunction safe_format(p/*:Cell*/, fmtid/*:number*/, fillid/*:?number*/, opts, themes, styles) {\n\ttry {\n\t\tif(opts.cellNF) p.z = table_fmt[fmtid];\n\t} catch(e) { if(opts.WTF) throw e; }\n\tif(p.t === 'z' && !opts.cellStyles) return;\n\tif(p.t === 'd' && typeof p.v === 'string') p.v = parseDate(p.v);\n\tif((!opts || opts.cellText !== false) && p.t !== 'z') try {\n\t\tif(table_fmt[fmtid] == null) SSF_load(SSFImplicit[fmtid] || \"General\", fmtid);\n\t\tif(p.t === 'e') p.w = p.w || BErr[p.v];\n\t\telse if(fmtid === 0) {\n\t\t\tif(p.t === 'n') {\n\t\t\t\tif((p.v|0) === p.v) p.w = p.v.toString(10);\n\t\t\t\telse p.w = SSF_general_num(p.v);\n\t\t\t}\n\t\t\telse if(p.t === 'd') {\n\t\t\t\tvar dd = datenum(p.v);\n\t\t\t\tif((dd|0) === dd) p.w = dd.toString(10);\n\t\t\t\telse p.w = SSF_general_num(dd);\n\t\t\t}\n\t\t\telse if(p.v === undefined) return \"\";\n\t\t\telse p.w = SSF_general(p.v,_ssfopts);\n\t\t}\n\t\telse if(p.t === 'd') p.w = SSF_format(fmtid,datenum(p.v),_ssfopts);\n\t\telse p.w = SSF_format(fmtid,p.v,_ssfopts);\n\t} catch(e) { if(opts.WTF) throw e; }\n\tif(!opts.cellStyles) return;\n\tif(fillid != null) try {\n\t\tp.s = styles.Fills[fillid];\n\t\tif (p.s.fgColor && p.s.fgColor.theme && !p.s.fgColor.rgb) {\n\t\t\tp.s.fgColor.rgb = rgb_tint(themes.themeElements.clrScheme[p.s.fgColor.theme].rgb, p.s.fgColor.tint || 0);\n\t\t\tif(opts.WTF) p.s.fgColor.raw_rgb = themes.themeElements.clrScheme[p.s.fgColor.theme].rgb;\n\t\t}\n\t\tif (p.s.bgColor && p.s.bgColor.theme) {\n\t\t\tp.s.bgColor.rgb = rgb_tint(themes.themeElements.clrScheme[p.s.bgColor.theme].rgb, p.s.bgColor.tint || 0);\n\t\t\tif(opts.WTF) p.s.bgColor.raw_rgb = themes.themeElements.clrScheme[p.s.bgColor.theme].rgb;\n\t\t}\n\t} catch(e) { if(opts.WTF && styles.Fills) throw e; }\n}\n\nfunction check_ws(ws/*:Worksheet*/, sname/*:string*/, i/*:number*/) {\n\tif(ws && ws['!ref']) {\n\t\tvar range = safe_decode_range(ws['!ref']);\n\t\tif(range.e.c < range.s.c || range.e.r < range.s.r) throw new Error(\"Bad range (\" + i + \"): \" + ws['!ref']);\n\t}\n}\nfunction parse_ws_xml_dim(ws/*:Worksheet*/, s/*:string*/) {\n\tvar d = safe_decode_range(s);\n\tif(d.s.r<=d.e.r && d.s.c<=d.e.c && d.s.r>=0 && d.s.c>=0) ws[\"!ref\"] = encode_range(d);\n}\nvar mergecregex = /<(?:\\w:)?mergeCell ref=\"[A-Z0-9:]+\"\\s*[\\/]?>/g;\nvar sheetdataregex = /<(?:\\w+:)?sheetData[^>]*>([\\s\\S]*)<\\/(?:\\w+:)?sheetData>/;\nvar hlinkregex = /<(?:\\w:)?hyperlink [^>]*>/mg;\nvar dimregex = /\"(\\w*:\\w*)\"/;\nvar colregex = /<(?:\\w:)?col\\b[^>]*[\\/]?>/g;\nvar afregex = /<(?:\\w:)?autoFilter[^>]*([\\/]|>([\\s\\S]*)<\\/(?:\\w:)?autoFilter)>/g;\nvar marginregex= /<(?:\\w:)?pageMargins[^>]*\\/>/g;\nvar sheetprregex = /<(?:\\w:)?sheetPr\\b(?:[^>a-z][^>]*)?\\/>/;\nvar sheetprregex2= /<(?:\\w:)?sheetPr[^>]*(?:[\\/]|>([\\s\\S]*)<\\/(?:\\w:)?sheetPr)>/;\nvar svsregex = /<(?:\\w:)?sheetViews[^>]*(?:[\\/]|>([\\s\\S]*)<\\/(?:\\w:)?sheetViews)>/;\n\n/* 18.3 Worksheets */\nfunction parse_ws_xml(data/*:?string*/, opts, idx/*:number*/, rels, wb/*:WBWBProps*/, themes, styles)/*:Worksheet*/ {\n\tif(!data) return data;\n\tif(!rels) rels = {'!id':{}};\n\tif(DENSE != null && opts.dense == null) opts.dense = DENSE;\n\n\t/* 18.3.1.99 worksheet CT_Worksheet */\n\tvar s = opts.dense ? ([]/*:any*/) : ({}/*:any*/);\n\tvar refguess/*:Range*/ = ({s: {r:2000000, c:2000000}, e: {r:0, c:0} }/*:any*/);\n\n\tvar data1 = \"\", data2 = \"\";\n\tvar mtch/*:?any*/ = data.match(sheetdataregex);\n\tif(mtch) {\n\t\tdata1 = data.slice(0, mtch.index);\n\t\tdata2 = data.slice(mtch.index + mtch[0].length);\n\t} else data1 = data2 = data;\n\n\t/* 18.3.1.82 sheetPr CT_SheetPr */\n\tvar sheetPr = data1.match(sheetprregex);\n\tif(sheetPr) parse_ws_xml_sheetpr(sheetPr[0], s, wb, idx);\n\telse if((sheetPr = data1.match(sheetprregex2))) parse_ws_xml_sheetpr2(sheetPr[0], sheetPr[1]||\"\", s, wb, idx, styles, themes);\n\n\t/* 18.3.1.35 dimension CT_SheetDimension */\n\tvar ridx = (data1.match(/<(?:\\w*:)?dimension/)||{index:-1}).index;\n\tif(ridx > 0) {\n\t\tvar ref = data1.slice(ridx,ridx+50).match(dimregex);\n\t\tif(ref) parse_ws_xml_dim(s, ref[1]);\n\t}\n\n\t/* 18.3.1.88 sheetViews CT_SheetViews */\n\tvar svs = data1.match(svsregex);\n\tif(svs && svs[1]) parse_ws_xml_sheetviews(svs[1], wb);\n\n\t/* 18.3.1.17 cols CT_Cols */\n\tvar columns/*:Array*/ = [];\n\tif(opts.cellStyles) {\n\t\t/* 18.3.1.13 col CT_Col */\n\t\tvar cols = data1.match(colregex);\n\t\tif(cols) parse_ws_xml_cols(columns, cols);\n\t}\n\n\t/* 18.3.1.80 sheetData CT_SheetData ? */\n\tif(mtch) parse_ws_xml_data(mtch[1], s, opts, refguess, themes, styles);\n\n\t/* 18.3.1.2 autoFilter CT_AutoFilter */\n\tvar afilter = data2.match(afregex);\n\tif(afilter) s['!autofilter'] = parse_ws_xml_autofilter(afilter[0]);\n\n\t/* 18.3.1.55 mergeCells CT_MergeCells */\n\tvar merges/*:Array*/ = [];\n\tvar _merge = data2.match(mergecregex);\n\tif(_merge) for(ridx = 0; ridx != _merge.length; ++ridx)\n\t\tmerges[ridx] = safe_decode_range(_merge[ridx].slice(_merge[ridx].indexOf(\"\\\"\")+1));\n\n\t/* 18.3.1.48 hyperlinks CT_Hyperlinks */\n\tvar hlink = data2.match(hlinkregex);\n\tif(hlink) parse_ws_xml_hlinks(s, hlink, rels);\n\n\t/* 18.3.1.62 pageMargins CT_PageMargins */\n\tvar margins = data2.match(marginregex);\n\tif(margins) s['!margins'] = parse_ws_xml_margins(parsexmltag(margins[0]));\n\n\tif(!s[\"!ref\"] && refguess.e.c >= refguess.s.c && refguess.e.r >= refguess.s.r) s[\"!ref\"] = encode_range(refguess);\n\tif(opts.sheetRows > 0 && s[\"!ref\"]) {\n\t\tvar tmpref = safe_decode_range(s[\"!ref\"]);\n\t\tif(opts.sheetRows <= +tmpref.e.r) {\n\t\t\ttmpref.e.r = opts.sheetRows - 1;\n\t\t\tif(tmpref.e.r > refguess.e.r) tmpref.e.r = refguess.e.r;\n\t\t\tif(tmpref.e.r < tmpref.s.r) tmpref.s.r = tmpref.e.r;\n\t\t\tif(tmpref.e.c > refguess.e.c) tmpref.e.c = refguess.e.c;\n\t\t\tif(tmpref.e.c < tmpref.s.c) tmpref.s.c = tmpref.e.c;\n\t\t\ts[\"!fullref\"] = s[\"!ref\"];\n\t\t\ts[\"!ref\"] = encode_range(tmpref);\n\t\t}\n\t}\n\tif(columns.length > 0) s[\"!cols\"] = columns;\n\tif(merges.length > 0) s[\"!merges\"] = merges;\n\treturn s;\n}\n\nfunction write_ws_xml_merges(merges/*:Array*/)/*:string*/ {\n\tif(merges.length === 0) return \"\";\n\tvar o = '';\n\tfor(var i = 0; i != merges.length; ++i) o += '';\n\treturn o + '';\n}\n\n/* 18.3.1.82-3 sheetPr CT_ChartsheetPr / CT_SheetPr */\nfunction parse_ws_xml_sheetpr(sheetPr/*:string*/, s, wb/*:WBWBProps*/, idx/*:number*/) {\n\tvar data = parsexmltag(sheetPr);\n\tif(!wb.Sheets[idx]) wb.Sheets[idx] = {};\n\tif(data.codeName) wb.Sheets[idx].CodeName = unescapexml(utf8read(data.codeName));\n}\nfunction parse_ws_xml_sheetpr2(sheetPr/*:string*/, body/*:string*/, s, wb/*:WBWBProps*/, idx/*:number*/) {\n\tparse_ws_xml_sheetpr(sheetPr.slice(0, sheetPr.indexOf(\">\")), s, wb, idx);\n}\nfunction write_ws_xml_sheetpr(ws, wb, idx, opts, o) {\n\tvar needed = false;\n\tvar props = {}, payload = null;\n\tif(opts.bookType !== 'xlsx' && wb.vbaraw) {\n\t\tvar cname = wb.SheetNames[idx];\n\t\ttry { if(wb.Workbook) cname = wb.Workbook.Sheets[idx].CodeName || cname; } catch(e) {}\n\t\tneeded = true;\n\t\tprops.codeName = utf8write(escapexml(cname));\n\t}\n\n\tif(ws && ws[\"!outline\"]) {\n\t\tvar outlineprops = {summaryBelow:1, summaryRight:1};\n\t\tif(ws[\"!outline\"].above) outlineprops.summaryBelow = 0;\n\t\tif(ws[\"!outline\"].left) outlineprops.summaryRight = 0;\n\t\tpayload = (payload||\"\") + writextag('outlinePr', null, outlineprops);\n\t}\n\n\tif(!needed && !payload) return;\n\to[o.length] = (writextag('sheetPr', payload, props));\n}\n\n/* 18.3.1.85 sheetProtection CT_SheetProtection */\nvar sheetprot_deffalse = [\"objects\", \"scenarios\", \"selectLockedCells\", \"selectUnlockedCells\"];\nvar sheetprot_deftrue = [\n\t\"formatColumns\", \"formatRows\", \"formatCells\",\n\t\"insertColumns\", \"insertRows\", \"insertHyperlinks\",\n\t\"deleteColumns\", \"deleteRows\",\n\t\"sort\", \"autoFilter\", \"pivotTables\"\n];\nfunction write_ws_xml_protection(sp)/*:string*/ {\n\t// algorithmName, hashValue, saltValue, spinCount\n\tvar o = ({sheet:1}/*:any*/);\n\tsheetprot_deffalse.forEach(function(n) { if(sp[n] != null && sp[n]) o[n] = \"1\"; });\n\tsheetprot_deftrue.forEach(function(n) { if(sp[n] != null && !sp[n]) o[n] = \"0\"; });\n\t/* TODO: algorithm */\n\tif(sp.password) o.password = crypto_CreatePasswordVerifier_Method1(sp.password).toString(16).toUpperCase();\n\treturn writextag('sheetProtection', null, o);\n}\n\nfunction parse_ws_xml_hlinks(s, data/*:Array*/, rels) {\n\tvar dense = Array.isArray(s);\n\tfor(var i = 0; i != data.length; ++i) {\n\t\tvar val = parsexmltag(utf8read(data[i]), true);\n\t\tif(!val.ref) return;\n\t\tvar rel = ((rels || {})['!id']||[])[val.id];\n\t\tif(rel) {\n\t\t\tval.Target = rel.Target;\n\t\t\tif(val.location) val.Target += \"#\"+unescapexml(val.location);\n\t\t} else {\n\t\t\tval.Target = \"#\" + unescapexml(val.location);\n\t\t\trel = {Target: val.Target, TargetMode: 'Internal'};\n\t\t}\n\t\tval.Rel = rel;\n\t\tif(val.tooltip) { val.Tooltip = val.tooltip; delete val.tooltip; }\n\t\tvar rng = safe_decode_range(val.ref);\n\t\tfor(var R=rng.s.r;R<=rng.e.r;++R) for(var C=rng.s.c;C<=rng.e.c;++C) {\n\t\t\tvar addr = encode_cell({c:C,r:R});\n\t\t\tif(dense) {\n\t\t\t\tif(!s[R]) s[R] = [];\n\t\t\t\tif(!s[R][C]) s[R][C] = {t:\"z\",v:undefined};\n\t\t\t\ts[R][C].l = val;\n\t\t\t} else {\n\t\t\t\tif(!s[addr]) s[addr] = {t:\"z\",v:undefined};\n\t\t\t\ts[addr].l = val;\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction parse_ws_xml_margins(margin) {\n\tvar o = {};\n\t[\"left\", \"right\", \"top\", \"bottom\", \"header\", \"footer\"].forEach(function(k) {\n\t\tif(margin[k]) o[k] = parseFloat(margin[k]);\n\t});\n\treturn o;\n}\nfunction write_ws_xml_margins(margin)/*:string*/ {\n\tdefault_margins(margin);\n\treturn writextag('pageMargins', null, margin);\n}\n\nfunction parse_ws_xml_cols(columns, cols) {\n\tvar seencol = false;\n\tfor(var coli = 0; coli != cols.length; ++coli) {\n\t\tvar coll = parsexmltag(cols[coli], true);\n\t\tif(coll.hidden) coll.hidden = parsexmlbool(coll.hidden);\n\t\tvar colm=parseInt(coll.min, 10)-1, colM=parseInt(coll.max,10)-1;\n\t\tif(coll.outlineLevel) coll.level = (+coll.outlineLevel || 0);\n\t\tdelete coll.min; delete coll.max; coll.width = +coll.width;\n\t\tif(!seencol && coll.width) { seencol = true; find_mdw_colw(coll.width); }\n\t\tprocess_col(coll);\n\t\twhile(colm <= colM) columns[colm++] = dup(coll);\n\t}\n}\nfunction write_ws_xml_cols(ws, cols)/*:string*/ {\n\tvar o = [\"\"], col;\n\tfor(var i = 0; i != cols.length; ++i) {\n\t\tif(!(col = cols[i])) continue;\n\t\to[o.length] = (writextag('col', null, col_obj_w(i, col)));\n\t}\n\to[o.length] = \"\";\n\treturn o.join(\"\");\n}\n\nfunction parse_ws_xml_autofilter(data/*:string*/) {\n\tvar o = { ref: (data.match(/ref=\"([^\"]*)\"/)||[])[1]};\n\treturn o;\n}\nfunction write_ws_xml_autofilter(data, ws, wb, idx)/*:string*/ {\n\tvar ref = typeof data.ref == \"string\" ? data.ref : encode_range(data.ref);\n\tif(!wb.Workbook) wb.Workbook = ({Sheets:[]}/*:any*/);\n\tif(!wb.Workbook.Names) wb.Workbook.Names = [];\n\tvar names/*: Array */ = wb.Workbook.Names;\n\tvar range = decode_range(ref);\n\tif(range.s.r == range.e.r) { range.e.r = decode_range(ws[\"!ref\"]).e.r; ref = encode_range(range); }\n\tfor(var i = 0; i < names.length; ++i) {\n\t\tvar name = names[i];\n\t\tif(name.Name != '_xlnm._FilterDatabase') continue;\n\t\tif(name.Sheet != idx) continue;\n\t\tname.Ref = \"'\" + wb.SheetNames[idx] + \"'!\" + ref; break;\n\t}\n\tif(i == names.length) names.push({ Name: '_xlnm._FilterDatabase', Sheet: idx, Ref: \"'\" + wb.SheetNames[idx] + \"'!\" + ref });\n\treturn writextag(\"autoFilter\", null, {ref:ref});\n}\n\n/* 18.3.1.88 sheetViews CT_SheetViews */\n/* 18.3.1.87 sheetView CT_SheetView */\nvar sviewregex = /<(?:\\w:)?sheetView(?:[^>a-z][^>]*)?\\/?>/;\nfunction parse_ws_xml_sheetviews(data, wb/*:WBWBProps*/) {\n\tif(!wb.Views) wb.Views = [{}];\n\t(data.match(sviewregex)||[]).forEach(function(r/*:string*/, i/*:number*/) {\n\t\tvar tag = parsexmltag(r);\n\t\t// $FlowIgnore\n\t\tif(!wb.Views[i]) wb.Views[i] = {};\n\t\t// $FlowIgnore\n\t\tif(+tag.zoomScale) wb.Views[i].zoom = +tag.zoomScale;\n\t\t// $FlowIgnore\n\t\tif(parsexmlbool(tag.rightToLeft)) wb.Views[i].RTL = true;\n\t});\n}\nfunction write_ws_xml_sheetviews(ws, opts, idx, wb)/*:string*/ {\n\tvar sview = ({workbookViewId:\"0\"}/*:any*/);\n\t// $FlowIgnore\n\tif((((wb||{}).Workbook||{}).Views||[])[0]) sview.rightToLeft = wb.Workbook.Views[0].RTL ? \"1\" : \"0\";\n\treturn writextag(\"sheetViews\", writextag(\"sheetView\", null, sview), {});\n}\n\nfunction write_ws_xml_cell(cell/*:Cell*/, ref, ws, opts/*::, idx, wb*/)/*:string*/ {\n\tif(cell.c) ws['!comments'].push([ref, cell.c]);\n\tif(cell.v === undefined && typeof cell.f !== \"string\" || cell.t === 'z' && !cell.f) return \"\";\n\tvar vv = \"\";\n\tvar oldt = cell.t, oldv = cell.v;\n\tif(cell.t !== \"z\") switch(cell.t) {\n\t\tcase 'b': vv = cell.v ? \"1\" : \"0\"; break;\n\t\tcase 'n': vv = ''+cell.v; break;\n\t\tcase 'e': vv = BErr[cell.v]; break;\n\t\tcase 'd':\n\t\t\tif(opts && opts.cellDates) vv = parseDate(cell.v, -1).toISOString();\n\t\t\telse {\n\t\t\t\tcell = dup(cell);\n\t\t\t\tcell.t = 'n';\n\t\t\t\tvv = ''+(cell.v = datenum(parseDate(cell.v)));\n\t\t\t}\n\t\t\tif(typeof cell.z === 'undefined') cell.z = table_fmt[14];\n\t\t\tbreak;\n\t\tdefault: vv = cell.v; break;\n\t}\n\tvar v = writetag('v', escapexml(vv)), o = ({r:ref}/*:any*/);\n\t/* TODO: cell style */\n\tvar os = get_cell_style(opts.cellXfs, cell, opts);\n\tif(os !== 0) o.s = os;\n\tswitch(cell.t) {\n\t\tcase 'n': break;\n\t\tcase 'd': o.t = \"d\"; break;\n\t\tcase 'b': o.t = \"b\"; break;\n\t\tcase 'e': o.t = \"e\"; break;\n\t\tcase 'z': break;\n\t\tdefault: if(cell.v == null) { delete cell.t; break; }\n\t\t\tif(cell.v.length > 32767) throw new Error(\"Text length must not exceed 32767 characters\");\n\t\t\tif(opts && opts.bookSST) {\n\t\t\t\tv = writetag('v', ''+get_sst_id(opts.Strings, cell.v, opts.revStrings));\n\t\t\t\to.t = \"s\"; break;\n\t\t\t}\n\t\t\to.t = \"str\"; break;\n\t}\n\tif(cell.t != oldt) { cell.t = oldt; cell.v = oldv; }\n\tif(typeof cell.f == \"string\" && cell.f) {\n\t\tvar ff = cell.F && cell.F.slice(0, ref.length) == ref ? {t:\"array\", ref:cell.F} : null;\n\t\tv = writextag('f', escapexml(cell.f), ff) + (cell.v != null ? v : \"\");\n\t}\n\tif(cell.l) ws['!links'].push([ref, cell.l]);\n\tif(cell.D) o.cm = 1;\n\treturn writextag('c', v, o);\n}\n\nvar parse_ws_xml_data = /*#__PURE__*/(function() {\n\tvar cellregex = /<(?:\\w+:)?c[ \\/>]/, rowregex = /<\\/(?:\\w+:)?row>/;\n\tvar rregex = /r=[\"']([^\"']*)[\"']/, isregex = /<(?:\\w+:)?is>([\\S\\s]*?)<\\/(?:\\w+:)?is>/;\n\tvar refregex = /ref=[\"']([^\"']*)[\"']/;\n\tvar match_v = matchtag(\"v\"), match_f = matchtag(\"f\");\n\nreturn function parse_ws_xml_data(sdata/*:string*/, s, opts, guess/*:Range*/, themes, styles) {\n\tvar ri = 0, x = \"\", cells/*:Array*/ = [], cref/*:?Array*/ = [], idx=0, i=0, cc=0, d=\"\", p/*:any*/;\n\tvar tag, tagr = 0, tagc = 0;\n\tvar sstr, ftag;\n\tvar fmtid = 0, fillid = 0;\n\tvar do_format = Array.isArray(styles.CellXf), cf;\n\tvar arrayf/*:Array<[Range, string]>*/ = [];\n\tvar sharedf = [];\n\tvar dense = Array.isArray(s);\n\tvar rows/*:Array*/ = [], rowobj = {}, rowrite = false;\n\tvar sheetStubs = !!opts.sheetStubs;\n\tfor(var marr = sdata.split(rowregex), mt = 0, marrlen = marr.length; mt != marrlen; ++mt) {\n\t\tx = marr[mt].trim();\n\t\tvar xlen = x.length;\n\t\tif(xlen === 0) continue;\n\n\t\t/* 18.3.1.73 row CT_Row */\n\t\tvar rstarti = 0;\n\t\touta: for(ri = 0; ri < xlen; ++ri) switch(/*x.charCodeAt(ri)*/x[ri]) {\n\t\t\tcase \">\" /*62*/:\n\t\t\t\tif(/*x.charCodeAt(ri-1) != 47*/x[ri-1] != \"/\") { ++ri; break outa; }\n\t\t\t\tif(opts && opts.cellStyles) {\n\t\t\t\t\t// TODO: avoid duplication\n\t\t\t\t\ttag = parsexmltag(x.slice(rstarti,ri), true);\n\t\t\t\t\ttagr = tag.r != null ? parseInt(tag.r, 10) : tagr+1; tagc = -1;\n\t\t\t\t\tif(opts.sheetRows && opts.sheetRows < tagr) continue;\n\t\t\t\t\trowobj = {}; rowrite = false;\n\t\t\t\t\tif(tag.ht) { rowrite = true; rowobj.hpt = parseFloat(tag.ht); rowobj.hpx = pt2px(rowobj.hpt); }\n\t\t\t\t\tif(tag.hidden == \"1\") { rowrite = true; rowobj.hidden = true; }\n\t\t\t\t\tif(tag.outlineLevel != null) { rowrite = true; rowobj.level = +tag.outlineLevel; }\n\t\t\t\t\tif(rowrite) rows[tagr-1] = rowobj;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"<\" /*60*/: rstarti = ri; break;\n\t\t}\n\t\tif(rstarti >= ri) break;\n\t\ttag = parsexmltag(x.slice(rstarti,ri), true);\n\t\ttagr = tag.r != null ? parseInt(tag.r, 10) : tagr+1; tagc = -1;\n\t\tif(opts.sheetRows && opts.sheetRows < tagr) continue;\n\t\tif(guess.s.r > tagr - 1) guess.s.r = tagr - 1;\n\t\tif(guess.e.r < tagr - 1) guess.e.r = tagr - 1;\n\n\t\tif(opts && opts.cellStyles) {\n\t\t\trowobj = {}; rowrite = false;\n\t\t\tif(tag.ht) { rowrite = true; rowobj.hpt = parseFloat(tag.ht); rowobj.hpx = pt2px(rowobj.hpt); }\n\t\t\tif(tag.hidden == \"1\") { rowrite = true; rowobj.hidden = true; }\n\t\t\tif(tag.outlineLevel != null) { rowrite = true; rowobj.level = +tag.outlineLevel; }\n\t\t\tif(rowrite) rows[tagr-1] = rowobj;\n\t\t}\n\n\t\t/* 18.3.1.4 c CT_Cell */\n\t\tcells = x.slice(ri).split(cellregex);\n\t\tfor(var rslice = 0; rslice != cells.length; ++rslice) if(cells[rslice].trim().charAt(0) != \"<\") break;\n\t\tcells = cells.slice(rslice);\n\t\tfor(ri = 0; ri != cells.length; ++ri) {\n\t\t\tx = cells[ri].trim();\n\t\t\tif(x.length === 0) continue;\n\t\t\tcref = x.match(rregex); idx = ri; i=0; cc=0;\n\t\t\tx = \"\":\"\") + x;\n\t\t\tif(cref != null && cref.length === 2) {\n\t\t\t\tidx = 0; d=cref[1];\n\t\t\t\tfor(i=0; i != d.length; ++i) {\n\t\t\t\t\tif((cc=d.charCodeAt(i)-64) < 1 || cc > 26) break;\n\t\t\t\t\tidx = 26*idx + cc;\n\t\t\t\t}\n\t\t\t\t--idx;\n\t\t\t\ttagc = idx;\n\t\t\t} else ++tagc;\n\t\t\tfor(i = 0; i != x.length; ++i) if(x.charCodeAt(i) === 62) break; ++i;\n\t\t\ttag = parsexmltag(x.slice(0,i), true);\n\t\t\tif(!tag.r) tag.r = encode_cell({r:tagr-1, c:tagc});\n\t\t\td = x.slice(i);\n\t\t\tp = ({t:\"\"}/*:any*/);\n\n\t\t\tif((cref=d.match(match_v))!= null && /*::cref != null && */cref[1] !== '') p.v=unescapexml(cref[1]);\n\t\t\tif(opts.cellFormula) {\n\t\t\t\tif((cref=d.match(match_f))!= null && /*::cref != null && */cref[1] !== '') {\n\t\t\t\t\t/* TODO: match against XLSXFutureFunctions */\n\t\t\t\t\tp.f=unescapexml(utf8read(cref[1])).replace(/\\r\\n/g, \"\\n\");\n\t\t\t\t\tif(!opts.xlfn) p.f = _xlfn(p.f);\n\t\t\t\t\tif(/*::cref != null && cref[0] != null && */cref[0].indexOf('t=\"array\"') > -1) {\n\t\t\t\t\t\tp.F = (d.match(refregex)||[])[1];\n\t\t\t\t\t\tif(p.F.indexOf(\":\") > -1) arrayf.push([safe_decode_range(p.F), p.F]);\n\t\t\t\t\t} else if(/*::cref != null && cref[0] != null && */cref[0].indexOf('t=\"shared\"') > -1) {\n\t\t\t\t\t\t// TODO: parse formula\n\t\t\t\t\t\tftag = parsexmltag(cref[0]);\n\t\t\t\t\t\tvar ___f = unescapexml(utf8read(cref[1]));\n\t\t\t\t\t\tif(!opts.xlfn) ___f = _xlfn(___f);\n\t\t\t\t\t\tsharedf[parseInt(ftag.si, 10)] = [ftag, ___f, tag.r];\n\t\t\t\t\t}\n\t\t\t\t} else if((cref=d.match(/]*\\/>/))) {\n\t\t\t\t\tftag = parsexmltag(cref[0]);\n\t\t\t\t\tif(sharedf[ftag.si]) p.f = shift_formula_xlsx(sharedf[ftag.si][1], sharedf[ftag.si][2]/*[0].ref*/, tag.r);\n\t\t\t\t}\n\t\t\t\t/* TODO: factor out contains logic */\n\t\t\t\tvar _tag = decode_cell(tag.r);\n\t\t\t\tfor(i = 0; i < arrayf.length; ++i)\n\t\t\t\t\tif(_tag.r >= arrayf[i][0].s.r && _tag.r <= arrayf[i][0].e.r)\n\t\t\t\t\t\tif(_tag.c >= arrayf[i][0].s.c && _tag.c <= arrayf[i][0].e.c)\n\t\t\t\t\t\t\tp.F = arrayf[i][1];\n\t\t\t}\n\n\t\t\tif(tag.t == null && p.v === undefined) {\n\t\t\t\tif(p.f || p.F) {\n\t\t\t\t\tp.v = 0; p.t = \"n\";\n\t\t\t\t} else if(!sheetStubs) continue;\n\t\t\t\telse p.t = \"z\";\n\t\t\t}\n\t\t\telse p.t = tag.t || \"n\";\n\t\t\tif(guess.s.c > tagc) guess.s.c = tagc;\n\t\t\tif(guess.e.c < tagc) guess.e.c = tagc;\n\t\t\t/* 18.18.11 t ST_CellType */\n\t\t\tswitch(p.t) {\n\t\t\t\tcase 'n':\n\t\t\t\t\tif(p.v == \"\" || p.v == null) {\n\t\t\t\t\t\tif(!sheetStubs) continue;\n\t\t\t\t\t\tp.t = 'z';\n\t\t\t\t\t} else p.v = parseFloat(p.v);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 's':\n\t\t\t\t\tif(typeof p.v == 'undefined') {\n\t\t\t\t\t\tif(!sheetStubs) continue;\n\t\t\t\t\t\tp.t = 'z';\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsstr = strs[parseInt(p.v, 10)];\n\t\t\t\t\t\tp.v = sstr.t;\n\t\t\t\t\t\tp.r = sstr.r;\n\t\t\t\t\t\tif(opts.cellHTML) p.h = sstr.h;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'str':\n\t\t\t\t\tp.t = \"s\";\n\t\t\t\t\tp.v = (p.v!=null) ? utf8read(p.v) : '';\n\t\t\t\t\tif(opts.cellHTML) p.h = escapehtml(p.v);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'inlineStr':\n\t\t\t\t\tcref = d.match(isregex);\n\t\t\t\t\tp.t = 's';\n\t\t\t\t\tif(cref != null && (sstr = parse_si(cref[1]))) {\n\t\t\t\t\t\tp.v = sstr.t;\n\t\t\t\t\t\tif(opts.cellHTML) p.h = sstr.h;\n\t\t\t\t\t} else p.v = \"\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'b': p.v = parsexmlbool(p.v); break;\n\t\t\t\tcase 'd':\n\t\t\t\t\tif(opts.cellDates) p.v = parseDate(p.v, 1);\n\t\t\t\t\telse { p.v = datenum(parseDate(p.v, 1)); p.t = 'n'; }\n\t\t\t\t\tbreak;\n\t\t\t\t/* error string in .w, number in .v */\n\t\t\t\tcase 'e':\n\t\t\t\t\tif(!opts || opts.cellText !== false) p.w = p.v;\n\t\t\t\t\tp.v = RBErr[p.v]; break;\n\t\t\t}\n\t\t\t/* formatting */\n\t\t\tfmtid = fillid = 0;\n\t\t\tcf = null;\n\t\t\tif(do_format && tag.s !== undefined) {\n\t\t\t\tcf = styles.CellXf[tag.s];\n\t\t\t\tif(cf != null) {\n\t\t\t\t\tif(cf.numFmtId != null) fmtid = cf.numFmtId;\n\t\t\t\t\tif(opts.cellStyles) {\n\t\t\t\t\t\tif(cf.fillId != null) fillid = cf.fillId;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tsafe_format(p, fmtid, fillid, opts, themes, styles);\n\t\t\tif(opts.cellDates && do_format && p.t == 'n' && fmt_is_date(table_fmt[fmtid])) { p.t = 'd'; p.v = numdate(p.v); }\n\t\t\tif(tag.cm && opts.xlmeta) {\n\t\t\t\tvar cm = (opts.xlmeta.Cell||[])[+tag.cm-1];\n\t\t\t\tif(cm && cm.type == 'XLDAPR') p.D = true;\n\t\t\t}\n\t\t\tif(dense) {\n\t\t\t\tvar _r = decode_cell(tag.r);\n\t\t\t\tif(!s[_r.r]) s[_r.r] = [];\n\t\t\t\ts[_r.r][_r.c] = p;\n\t\t\t} else s[tag.r] = p;\n\t\t}\n\t}\n\tif(rows.length > 0) s['!rows'] = rows;\n}; })();\n\nfunction write_ws_xml_data(ws/*:Worksheet*/, opts, idx/*:number*/, wb/*:Workbook*//*::, rels*/)/*:string*/ {\n\tvar o/*:Array*/ = [], r/*:Array*/ = [], range = safe_decode_range(ws['!ref']), cell=\"\", ref, rr = \"\", cols/*:Array*/ = [], R=0, C=0, rows = ws['!rows'];\n\tvar dense = Array.isArray(ws);\n\tvar params = ({r:rr}/*:any*/), row/*:RowInfo*/, height = -1;\n\tfor(C = range.s.c; C <= range.e.c; ++C) cols[C] = encode_col(C);\n\tfor(R = range.s.r; R <= range.e.r; ++R) {\n\t\tr = [];\n\t\trr = encode_row(R);\n\t\tfor(C = range.s.c; C <= range.e.c; ++C) {\n\t\t\tref = cols[C] + rr;\n\t\t\tvar _cell = dense ? (ws[R]||[])[C]: ws[ref];\n\t\t\tif(_cell === undefined) continue;\n\t\t\tif((cell = write_ws_xml_cell(_cell, ref, ws, opts, idx, wb)) != null) r.push(cell);\n\t\t}\n\t\tif(r.length > 0 || (rows && rows[R])) {\n\t\t\tparams = ({r:rr}/*:any*/);\n\t\t\tif(rows && rows[R]) {\n\t\t\t\trow = rows[R];\n\t\t\t\tif(row.hidden) params.hidden = 1;\n\t\t\t\theight = -1;\n\t\t\t\tif(row.hpx) height = px2pt(row.hpx);\n\t\t\t\telse if(row.hpt) height = row.hpt;\n\t\t\t\tif(height > -1) { params.ht = height; params.customHeight = 1; }\n\t\t\t\tif(row.level) { params.outlineLevel = row.level; }\n\t\t\t}\n\t\t\to[o.length] = (writextag('row', r.join(\"\"), params));\n\t\t}\n\t}\n\tif(rows) for(; R < rows.length; ++R) {\n\t\tif(rows && rows[R]) {\n\t\t\tparams = ({r:R+1}/*:any*/);\n\t\t\trow = rows[R];\n\t\t\tif(row.hidden) params.hidden = 1;\n\t\t\theight = -1;\n\t\t\tif (row.hpx) height = px2pt(row.hpx);\n\t\t\telse if (row.hpt) height = row.hpt;\n\t\t\tif (height > -1) { params.ht = height; params.customHeight = 1; }\n\t\t\tif (row.level) { params.outlineLevel = row.level; }\n\t\t\to[o.length] = (writextag('row', \"\", params));\n\t\t}\n\t}\n\treturn o.join(\"\");\n}\n\nfunction write_ws_xml(idx/*:number*/, opts, wb/*:Workbook*/, rels)/*:string*/ {\n\tvar o = [XML_HEADER, writextag('worksheet', null, {\n\t\t'xmlns': XMLNS_main[0],\n\t\t'xmlns:r': XMLNS.r\n\t})];\n\tvar s = wb.SheetNames[idx], sidx = 0, rdata = \"\";\n\tvar ws = wb.Sheets[s];\n\tif(ws == null) ws = {};\n\tvar ref = ws['!ref'] || 'A1';\n\tvar range = safe_decode_range(ref);\n\tif(range.e.c > 0x3FFF || range.e.r > 0xFFFFF) {\n\t\tif(opts.WTF) throw new Error(\"Range \" + ref + \" exceeds format limit A1:XFD1048576\");\n\t\trange.e.c = Math.min(range.e.c, 0x3FFF);\n\t\trange.e.r = Math.min(range.e.c, 0xFFFFF);\n\t\tref = encode_range(range);\n\t}\n\tif(!rels) rels = {};\n\tws['!comments'] = [];\n\tvar _drawing = [];\n\n\twrite_ws_xml_sheetpr(ws, wb, idx, opts, o);\n\n\to[o.length] = (writextag('dimension', null, {'ref': ref}));\n\n\to[o.length] = write_ws_xml_sheetviews(ws, opts, idx, wb);\n\n\t/* TODO: store in WB, process styles */\n\tif(opts.sheetFormat) o[o.length] = (writextag('sheetFormatPr', null, {\n\t\tdefaultRowHeight:opts.sheetFormat.defaultRowHeight||'16',\n\t\tbaseColWidth:opts.sheetFormat.baseColWidth||'10',\n\t\toutlineLevelRow:opts.sheetFormat.outlineLevelRow||'7'\n\t}));\n\n\tif(ws['!cols'] != null && ws['!cols'].length > 0) o[o.length] = (write_ws_xml_cols(ws, ws['!cols']));\n\n\to[sidx = o.length] = '';\n\tws['!links'] = [];\n\tif(ws['!ref'] != null) {\n\t\trdata = write_ws_xml_data(ws, opts, idx, wb, rels);\n\t\tif(rdata.length > 0) o[o.length] = (rdata);\n\t}\n\tif(o.length>sidx+1) { o[o.length] = (''); o[sidx]=o[sidx].replace(\"/>\",\">\"); }\n\n\t/* sheetCalcPr */\n\n\tif(ws['!protect']) o[o.length] = write_ws_xml_protection(ws['!protect']);\n\n\t/* protectedRanges */\n\t/* scenarios */\n\n\tif(ws['!autofilter'] != null) o[o.length] = write_ws_xml_autofilter(ws['!autofilter'], ws, wb, idx);\n\n\t/* sortState */\n\t/* dataConsolidate */\n\t/* customSheetViews */\n\n\tif(ws['!merges'] != null && ws['!merges'].length > 0) o[o.length] = (write_ws_xml_merges(ws['!merges']));\n\n\t/* phoneticPr */\n\t/* conditionalFormatting */\n\t/* dataValidations */\n\n\tvar relc = -1, rel, rId = -1;\n\tif(/*::(*/ws['!links']/*::||[])*/.length > 0) {\n\t\to[o.length] = \"\";\n\t\t/*::(*/ws['!links']/*::||[])*/.forEach(function(l) {\n\t\t\tif(!l[1].Target) return;\n\t\t\trel = ({\"ref\":l[0]}/*:any*/);\n\t\t\tif(l[1].Target.charAt(0) != \"#\") {\n\t\t\t\trId = add_rels(rels, -1, escapexml(l[1].Target).replace(/#.*$/, \"\"), RELS.HLINK);\n\t\t\t\trel[\"r:id\"] = \"rId\"+rId;\n\t\t\t}\n\t\t\tif((relc = l[1].Target.indexOf(\"#\")) > -1) rel.location = escapexml(l[1].Target.slice(relc+1));\n\t\t\tif(l[1].Tooltip) rel.tooltip = escapexml(l[1].Tooltip);\n\t\t\to[o.length] = writextag(\"hyperlink\",null,rel);\n\t\t});\n\t\to[o.length] = \"\";\n\t}\n\tdelete ws['!links'];\n\n\t/* printOptions */\n\n\tif(ws['!margins'] != null) o[o.length] = write_ws_xml_margins(ws['!margins']);\n\n\t/* pageSetup */\n\t/* headerFooter */\n\t/* rowBreaks */\n\t/* colBreaks */\n\t/* customProperties */\n\t/* cellWatches */\n\n\tif(!opts || opts.ignoreEC || (opts.ignoreEC == (void 0))) o[o.length] = writetag(\"ignoredErrors\", writextag(\"ignoredError\", null, {numberStoredAsText:1, sqref:ref}));\n\n\t/* smartTags */\n\n\tif(_drawing.length > 0) {\n\t\trId = add_rels(rels, -1, \"../drawings/drawing\" + (idx+1) + \".xml\", RELS.DRAW);\n\t\to[o.length] = writextag(\"drawing\", null, {\"r:id\":\"rId\" + rId});\n\t\tws['!drawing'] = _drawing;\n\t}\n\n\tif(ws['!comments'].length > 0) {\n\t\trId = add_rels(rels, -1, \"../drawings/vmlDrawing\" + (idx+1) + \".vml\", RELS.VML);\n\t\to[o.length] = writextag(\"legacyDrawing\", null, {\"r:id\":\"rId\" + rId});\n\t\tws['!legacy'] = rId;\n\t}\n\n\t/* legacyDrawingHF */\n\t/* picture */\n\t/* oleObjects */\n\t/* controls */\n\t/* webPublishItems */\n\t/* tableParts */\n\t/* extLst */\n\n\tif(o.length>1) { o[o.length] = (''); o[1]=o[1].replace(\"/>\",\">\"); }\n\treturn o.join(\"\");\n}\n\n/* [MS-XLSB] 2.4.726 BrtRowHdr */\nfunction parse_BrtRowHdr(data, length) {\n\tvar z = ({}/*:any*/);\n\tvar tgt = data.l + length;\n\tz.r = data.read_shift(4);\n\tdata.l += 4; // TODO: ixfe\n\tvar miyRw = data.read_shift(2);\n\tdata.l += 1; // TODO: top/bot padding\n\tvar flags = data.read_shift(1);\n\tdata.l = tgt;\n\tif(flags & 0x07) z.level = flags & 0x07;\n\tif(flags & 0x10) z.hidden = true;\n\tif(flags & 0x20) z.hpt = miyRw / 20;\n\treturn z;\n}\nfunction write_BrtRowHdr(R/*:number*/, range, ws) {\n\tvar o = new_buf(17+8*16);\n\tvar row = (ws['!rows']||[])[R]||{};\n\to.write_shift(4, R);\n\n\to.write_shift(4, 0); /* TODO: ixfe */\n\n\tvar miyRw = 0x0140;\n\tif(row.hpx) miyRw = px2pt(row.hpx) * 20;\n\telse if(row.hpt) miyRw = row.hpt * 20;\n\to.write_shift(2, miyRw);\n\n\to.write_shift(1, 0); /* top/bot padding */\n\n\tvar flags = 0x0;\n\tif(row.level) flags |= row.level;\n\tif(row.hidden) flags |= 0x10;\n\tif(row.hpx || row.hpt) flags |= 0x20;\n\to.write_shift(1, flags);\n\n\to.write_shift(1, 0); /* phonetic guide */\n\n\t/* [MS-XLSB] 2.5.8 BrtColSpan explains the mechanism */\n\tvar ncolspan = 0, lcs = o.l;\n\to.l += 4;\n\n\tvar caddr = {r:R, c:0};\n\tfor(var i = 0; i < 16; ++i) {\n\t\tif((range.s.c > ((i+1) << 10)) || (range.e.c < (i << 10))) continue;\n\t\tvar first = -1, last = -1;\n\t\tfor(var j = (i<<10); j < ((i+1)<<10); ++j) {\n\t\t\tcaddr.c = j;\n\t\t\tvar cell = Array.isArray(ws) ? (ws[caddr.r]||[])[caddr.c] : ws[encode_cell(caddr)];\n\t\t\tif(cell) { if(first < 0) first = j; last = j; }\n\t\t}\n\t\tif(first < 0) continue;\n\t\t++ncolspan;\n\t\to.write_shift(4, first);\n\t\to.write_shift(4, last);\n\t}\n\n\tvar l = o.l;\n\to.l = lcs;\n\to.write_shift(4, ncolspan);\n\to.l = l;\n\n\treturn o.length > o.l ? o.slice(0, o.l) : o;\n}\nfunction write_row_header(ba, ws, range, R) {\n\tvar o = write_BrtRowHdr(R, range, ws);\n\tif((o.length > 17) || (ws['!rows']||[])[R]) write_record(ba, 0x0000 /* BrtRowHdr */, o);\n}\n\n/* [MS-XLSB] 2.4.820 BrtWsDim */\nvar parse_BrtWsDim = parse_UncheckedRfX;\nvar write_BrtWsDim = write_UncheckedRfX;\n\n/* [MS-XLSB] 2.4.821 BrtWsFmtInfo */\nfunction parse_BrtWsFmtInfo(/*::data, length*/) {\n}\n//function write_BrtWsFmtInfo(ws, o) { }\n\n/* [MS-XLSB] 2.4.823 BrtWsProp */\nfunction parse_BrtWsProp(data, length) {\n\tvar z = {};\n\tvar f = data[data.l]; ++data.l;\n\tz.above = !(f & 0x40);\n\tz.left = !(f & 0x80);\n\t/* TODO: pull flags */\n\tdata.l += 18;\n\tz.name = parse_XLSBCodeName(data, length - 19);\n\treturn z;\n}\nfunction write_BrtWsProp(str, outl, o) {\n\tif(o == null) o = new_buf(84+4*str.length);\n\tvar f = 0xC0;\n\tif(outl) {\n\t\tif(outl.above) f &= ~0x40;\n\t\tif(outl.left) f &= ~0x80;\n\t}\n\to.write_shift(1, f);\n\tfor(var i = 1; i < 3; ++i) o.write_shift(1,0);\n\twrite_BrtColor({auto:1}, o);\n\to.write_shift(-4,-1);\n\to.write_shift(-4,-1);\n\twrite_XLSBCodeName(str, o);\n\treturn o.slice(0, o.l);\n}\n\n/* [MS-XLSB] 2.4.306 BrtCellBlank */\nfunction parse_BrtCellBlank(data) {\n\tvar cell = parse_XLSBCell(data);\n\treturn [cell];\n}\nfunction write_BrtCellBlank(cell, ncell, o) {\n\tif(o == null) o = new_buf(8);\n\treturn write_XLSBCell(ncell, o);\n}\nfunction parse_BrtShortBlank(data) {\n\tvar cell = parse_XLSBShortCell(data);\n\treturn [cell];\n}\nfunction write_BrtShortBlank(cell, ncell, o) {\n\tif(o == null) o = new_buf(4);\n\treturn write_XLSBShortCell(ncell, o);\n}\n\n/* [MS-XLSB] 2.4.307 BrtCellBool */\nfunction parse_BrtCellBool(data) {\n\tvar cell = parse_XLSBCell(data);\n\tvar fBool = data.read_shift(1);\n\treturn [cell, fBool, 'b'];\n}\nfunction write_BrtCellBool(cell, ncell, o) {\n\tif(o == null) o = new_buf(9);\n\twrite_XLSBCell(ncell, o);\n\to.write_shift(1, cell.v ? 1 : 0);\n\treturn o;\n}\nfunction parse_BrtShortBool(data) {\n\tvar cell = parse_XLSBShortCell(data);\n\tvar fBool = data.read_shift(1);\n\treturn [cell, fBool, 'b'];\n}\nfunction write_BrtShortBool(cell, ncell, o) {\n\tif(o == null) o = new_buf(5);\n\twrite_XLSBShortCell(ncell, o);\n\to.write_shift(1, cell.v ? 1 : 0);\n\treturn o;\n}\n\n/* [MS-XLSB] 2.4.308 BrtCellError */\nfunction parse_BrtCellError(data) {\n\tvar cell = parse_XLSBCell(data);\n\tvar bError = data.read_shift(1);\n\treturn [cell, bError, 'e'];\n}\nfunction write_BrtCellError(cell, ncell, o) {\n\tif(o == null) o = new_buf(9);\n\twrite_XLSBCell(ncell, o);\n\to.write_shift(1, cell.v);\n\treturn o;\n}\nfunction parse_BrtShortError(data) {\n\tvar cell = parse_XLSBShortCell(data);\n\tvar bError = data.read_shift(1);\n\treturn [cell, bError, 'e'];\n}\nfunction write_BrtShortError(cell, ncell, o) {\n\tif(o == null) o = new_buf(8);\n\twrite_XLSBShortCell(ncell, o);\n\to.write_shift(1, cell.v);\n\to.write_shift(2, 0);\n\to.write_shift(1, 0);\n\treturn o;\n}\n\n\n/* [MS-XLSB] 2.4.311 BrtCellIsst */\nfunction parse_BrtCellIsst(data) {\n\tvar cell = parse_XLSBCell(data);\n\tvar isst = data.read_shift(4);\n\treturn [cell, isst, 's'];\n}\nfunction write_BrtCellIsst(cell, ncell, o) {\n\tif(o == null) o = new_buf(12);\n\twrite_XLSBCell(ncell, o);\n\to.write_shift(4, ncell.v);\n\treturn o;\n}\nfunction parse_BrtShortIsst(data) {\n\tvar cell = parse_XLSBShortCell(data);\n\tvar isst = data.read_shift(4);\n\treturn [cell, isst, 's'];\n}\nfunction write_BrtShortIsst(cell, ncell, o) {\n\tif(o == null) o = new_buf(8);\n\twrite_XLSBShortCell(ncell, o);\n\to.write_shift(4, ncell.v);\n\treturn o;\n}\n\n/* [MS-XLSB] 2.4.313 BrtCellReal */\nfunction parse_BrtCellReal(data) {\n\tvar cell = parse_XLSBCell(data);\n\tvar value = parse_Xnum(data);\n\treturn [cell, value, 'n'];\n}\nfunction write_BrtCellReal(cell, ncell, o) {\n\tif(o == null) o = new_buf(16);\n\twrite_XLSBCell(ncell, o);\n\twrite_Xnum(cell.v, o);\n\treturn o;\n}\nfunction parse_BrtShortReal(data) {\n\tvar cell = parse_XLSBShortCell(data);\n\tvar value = parse_Xnum(data);\n\treturn [cell, value, 'n'];\n}\nfunction write_BrtShortReal(cell, ncell, o) {\n\tif(o == null) o = new_buf(12);\n\twrite_XLSBShortCell(ncell, o);\n\twrite_Xnum(cell.v, o);\n\treturn o;\n}\n\n/* [MS-XLSB] 2.4.314 BrtCellRk */\nfunction parse_BrtCellRk(data) {\n\tvar cell = parse_XLSBCell(data);\n\tvar value = parse_RkNumber(data);\n\treturn [cell, value, 'n'];\n}\nfunction write_BrtCellRk(cell, ncell, o) {\n\tif(o == null) o = new_buf(12);\n\twrite_XLSBCell(ncell, o);\n\twrite_RkNumber(cell.v, o);\n\treturn o;\n}\nfunction parse_BrtShortRk(data) {\n\tvar cell = parse_XLSBShortCell(data);\n\tvar value = parse_RkNumber(data);\n\treturn [cell, value, 'n'];\n}\nfunction write_BrtShortRk(cell, ncell, o) {\n\tif(o == null) o = new_buf(8);\n\twrite_XLSBShortCell(ncell, o);\n\twrite_RkNumber(cell.v, o);\n\treturn o;\n}\n\n/* [MS-XLSB] 2.4.323 BrtCellRString */\nfunction parse_BrtCellRString(data) {\n\tvar cell = parse_XLSBCell(data);\n\tvar value = parse_RichStr(data);\n\treturn [cell, value, 'is'];\n}\n\n/* [MS-XLSB] 2.4.317 BrtCellSt */\nfunction parse_BrtCellSt(data) {\n\tvar cell = parse_XLSBCell(data);\n\tvar value = parse_XLWideString(data);\n\treturn [cell, value, 'str'];\n}\nfunction write_BrtCellSt(cell, ncell, o) {\n\tif(o == null) o = new_buf(12 + 4 * cell.v.length);\n\twrite_XLSBCell(ncell, o);\n\twrite_XLWideString(cell.v, o);\n\treturn o.length > o.l ? o.slice(0, o.l) : o;\n}\nfunction parse_BrtShortSt(data) {\n\tvar cell = parse_XLSBShortCell(data);\n\tvar value = parse_XLWideString(data);\n\treturn [cell, value, 'str'];\n}\nfunction write_BrtShortSt(cell, ncell, o) {\n\tif(o == null) o = new_buf(8 + 4 * cell.v.length);\n\twrite_XLSBShortCell(ncell, o);\n\twrite_XLWideString(cell.v, o);\n\treturn o.length > o.l ? o.slice(0, o.l) : o;\n}\n\n/* [MS-XLSB] 2.4.653 BrtFmlaBool */\nfunction parse_BrtFmlaBool(data, length, opts) {\n\tvar end = data.l + length;\n\tvar cell = parse_XLSBCell(data);\n\tcell.r = opts['!row'];\n\tvar value = data.read_shift(1);\n\tvar o = [cell, value, 'b'];\n\tif(opts.cellFormula) {\n\t\tdata.l += 2;\n\t\tvar formula = parse_XLSBCellParsedFormula(data, end - data.l, opts);\n\t\to[3] = stringify_formula(formula, null/*range*/, cell, opts.supbooks, opts);/* TODO */\n\t}\n\telse data.l = end;\n\treturn o;\n}\n\n/* [MS-XLSB] 2.4.654 BrtFmlaError */\nfunction parse_BrtFmlaError(data, length, opts) {\n\tvar end = data.l + length;\n\tvar cell = parse_XLSBCell(data);\n\tcell.r = opts['!row'];\n\tvar value = data.read_shift(1);\n\tvar o = [cell, value, 'e'];\n\tif(opts.cellFormula) {\n\t\tdata.l += 2;\n\t\tvar formula = parse_XLSBCellParsedFormula(data, end - data.l, opts);\n\t\to[3] = stringify_formula(formula, null/*range*/, cell, opts.supbooks, opts);/* TODO */\n\t}\n\telse data.l = end;\n\treturn o;\n}\n\n/* [MS-XLSB] 2.4.655 BrtFmlaNum */\nfunction parse_BrtFmlaNum(data, length, opts) {\n\tvar end = data.l + length;\n\tvar cell = parse_XLSBCell(data);\n\tcell.r = opts['!row'];\n\tvar value = parse_Xnum(data);\n\tvar o = [cell, value, 'n'];\n\tif(opts.cellFormula) {\n\t\tdata.l += 2;\n\t\tvar formula = parse_XLSBCellParsedFormula(data, end - data.l, opts);\n\t\to[3] = stringify_formula(formula, null/*range*/, cell, opts.supbooks, opts);/* TODO */\n\t}\n\telse data.l = end;\n\treturn o;\n}\n\n/* [MS-XLSB] 2.4.656 BrtFmlaString */\nfunction parse_BrtFmlaString(data, length, opts) {\n\tvar end = data.l + length;\n\tvar cell = parse_XLSBCell(data);\n\tcell.r = opts['!row'];\n\tvar value = parse_XLWideString(data);\n\tvar o = [cell, value, 'str'];\n\tif(opts.cellFormula) {\n\t\tdata.l += 2;\n\t\tvar formula = parse_XLSBCellParsedFormula(data, end - data.l, opts);\n\t\to[3] = stringify_formula(formula, null/*range*/, cell, opts.supbooks, opts);/* TODO */\n\t}\n\telse data.l = end;\n\treturn o;\n}\n\n/* [MS-XLSB] 2.4.682 BrtMergeCell */\nvar parse_BrtMergeCell = parse_UncheckedRfX;\nvar write_BrtMergeCell = write_UncheckedRfX;\n/* [MS-XLSB] 2.4.107 BrtBeginMergeCells */\nfunction write_BrtBeginMergeCells(cnt, o) {\n\tif(o == null) o = new_buf(4);\n\to.write_shift(4, cnt);\n\treturn o;\n}\n\n/* [MS-XLSB] 2.4.662 BrtHLink */\nfunction parse_BrtHLink(data, length/*::, opts*/) {\n\tvar end = data.l + length;\n\tvar rfx = parse_UncheckedRfX(data, 16);\n\tvar relId = parse_XLNullableWideString(data);\n\tvar loc = parse_XLWideString(data);\n\tvar tooltip = parse_XLWideString(data);\n\tvar display = parse_XLWideString(data);\n\tdata.l = end;\n\tvar o = ({rfx:rfx, relId:relId, loc:loc, display:display}/*:any*/);\n\tif(tooltip) o.Tooltip = tooltip;\n\treturn o;\n}\nfunction write_BrtHLink(l, rId) {\n\tvar o = new_buf(50+4*(l[1].Target.length + (l[1].Tooltip || \"\").length));\n\twrite_UncheckedRfX({s:decode_cell(l[0]), e:decode_cell(l[0])}, o);\n\twrite_RelID(\"rId\" + rId, o);\n\tvar locidx = l[1].Target.indexOf(\"#\");\n\tvar loc = locidx == -1 ? \"\" : l[1].Target.slice(locidx+1);\n\twrite_XLWideString(loc || \"\", o);\n\twrite_XLWideString(l[1].Tooltip || \"\", o);\n\twrite_XLWideString(\"\", o);\n\treturn o.slice(0, o.l);\n}\n\n/* [MS-XLSB] 2.4.692 BrtPane */\nfunction parse_BrtPane(/*data, length, opts*/) {\n}\n\n/* [MS-XLSB] 2.4.6 BrtArrFmla */\nfunction parse_BrtArrFmla(data, length, opts) {\n\tvar end = data.l + length;\n\tvar rfx = parse_RfX(data, 16);\n\tvar fAlwaysCalc = data.read_shift(1);\n\tvar o = [rfx]; o[2] = fAlwaysCalc;\n\tif(opts.cellFormula) {\n\t\tvar formula = parse_XLSBArrayParsedFormula(data, end - data.l, opts);\n\t\to[1] = formula;\n\t} else data.l = end;\n\treturn o;\n}\n\n/* [MS-XLSB] 2.4.750 BrtShrFmla */\nfunction parse_BrtShrFmla(data, length, opts) {\n\tvar end = data.l + length;\n\tvar rfx = parse_UncheckedRfX(data, 16);\n\tvar o = [rfx];\n\tif(opts.cellFormula) {\n\t\tvar formula = parse_XLSBSharedParsedFormula(data, end - data.l, opts);\n\t\to[1] = formula;\n\t\tdata.l = end;\n\t} else data.l = end;\n\treturn o;\n}\n\n/* [MS-XLSB] 2.4.323 BrtColInfo */\n/* TODO: once XLS ColInfo is set, combine the functions */\nfunction write_BrtColInfo(C/*:number*/, col, o) {\n\tif(o == null) o = new_buf(18);\n\tvar p = col_obj_w(C, col);\n\to.write_shift(-4, C);\n\to.write_shift(-4, C);\n\to.write_shift(4, (p.width || 10) * 256);\n\to.write_shift(4, 0/*ixfe*/); // style\n\tvar flags = 0;\n\tif(col.hidden) flags |= 0x01;\n\tif(typeof p.width == 'number') flags |= 0x02;\n\tif(col.level) flags |= (col.level << 8);\n\to.write_shift(2, flags); // bit flag\n\treturn o;\n}\n\n/* [MS-XLSB] 2.4.678 BrtMargins */\nvar BrtMarginKeys = [\"left\",\"right\",\"top\",\"bottom\",\"header\",\"footer\"];\nfunction parse_BrtMargins(data/*::, length, opts*/)/*:Margins*/ {\n\tvar margins = ({}/*:any*/);\n\tBrtMarginKeys.forEach(function(k) { margins[k] = parse_Xnum(data, 8); });\n\treturn margins;\n}\nfunction write_BrtMargins(margins/*:Margins*/, o) {\n\tif(o == null) o = new_buf(6*8);\n\tdefault_margins(margins);\n\tBrtMarginKeys.forEach(function(k) { write_Xnum((margins/*:any*/)[k], o); });\n\treturn o;\n}\n\n/* [MS-XLSB] 2.4.299 BrtBeginWsView */\nfunction parse_BrtBeginWsView(data/*::, length, opts*/) {\n\tvar f = data.read_shift(2);\n\tdata.l += 28;\n\treturn { RTL: f & 0x20 };\n}\nfunction write_BrtBeginWsView(ws, Workbook, o) {\n\tif(o == null) o = new_buf(30);\n\tvar f = 0x39c;\n\tif((((Workbook||{}).Views||[])[0]||{}).RTL) f |= 0x20;\n\to.write_shift(2, f); // bit flag\n\to.write_shift(4, 0);\n\to.write_shift(4, 0); // view first row\n\to.write_shift(4, 0); // view first col\n\to.write_shift(1, 0); // gridline color ICV\n\to.write_shift(1, 0);\n\to.write_shift(2, 0);\n\to.write_shift(2, 100); // zoom scale\n\to.write_shift(2, 0);\n\to.write_shift(2, 0);\n\to.write_shift(2, 0);\n\to.write_shift(4, 0); // workbook view id\n\treturn o;\n}\n\n/* [MS-XLSB] 2.4.309 BrtCellIgnoreEC */\nfunction write_BrtCellIgnoreEC(ref) {\n\tvar o = new_buf(24);\n\to.write_shift(4, 4);\n\to.write_shift(4, 1);\n\twrite_UncheckedRfX(ref, o);\n\treturn o;\n}\n\n/* [MS-XLSB] 2.4.748 BrtSheetProtection */\nfunction write_BrtSheetProtection(sp, o) {\n\tif(o == null) o = new_buf(16*4+2);\n\to.write_shift(2, sp.password ? crypto_CreatePasswordVerifier_Method1(sp.password) : 0);\n\to.write_shift(4, 1); // this record should not be written if no protection\n\t[\n\t\t[\"objects\", false], // fObjects\n\t\t[\"scenarios\", false], // fScenarios\n\t\t[\"formatCells\", true], // fFormatCells\n\t\t[\"formatColumns\", true], // fFormatColumns\n\t\t[\"formatRows\", true], // fFormatRows\n\t\t[\"insertColumns\", true], // fInsertColumns\n\t\t[\"insertRows\", true], // fInsertRows\n\t\t[\"insertHyperlinks\", true], // fInsertHyperlinks\n\t\t[\"deleteColumns\", true], // fDeleteColumns\n\t\t[\"deleteRows\", true], // fDeleteRows\n\t\t[\"selectLockedCells\", false], // fSelLockedCells\n\t\t[\"sort\", true], // fSort\n\t\t[\"autoFilter\", true], // fAutoFilter\n\t\t[\"pivotTables\", true], // fPivotTables\n\t\t[\"selectUnlockedCells\", false] // fSelUnlockedCells\n\t].forEach(function(n) {\n\t\t/*:: if(o == null) throw \"unreachable\"; */\n\t\tif(n[1]) o.write_shift(4, sp[n[0]] != null && !sp[n[0]] ? 1 : 0);\n\t\telse o.write_shift(4, sp[n[0]] != null && sp[n[0]] ? 0 : 1);\n\t});\n\treturn o;\n}\n\nfunction parse_BrtDVal(/*data, length, opts*/) {\n}\nfunction parse_BrtDVal14(/*data, length, opts*/) {\n}\n/* [MS-XLSB] 2.1.7.61 Worksheet */\nfunction parse_ws_bin(data, _opts, idx, rels, wb/*:WBWBProps*/, themes, styles)/*:Worksheet*/ {\n\tif(!data) return data;\n\tvar opts = _opts || {};\n\tif(!rels) rels = {'!id':{}};\n\tif(DENSE != null && opts.dense == null) opts.dense = DENSE;\n\tvar s/*:Worksheet*/ = (opts.dense ? [] : {});\n\n\tvar ref;\n\tvar refguess = {s: {r:2000000, c:2000000}, e: {r:0, c:0} };\n\n\tvar state/*:Array*/ = [];\n\tvar pass = false, end = false;\n\tvar row, p, cf, R, C, addr, sstr, rr, cell/*:Cell*/;\n\tvar merges/*:Array*/ = [];\n\topts.biff = 12;\n\topts['!row'] = 0;\n\n\tvar ai = 0, af = false;\n\n\tvar arrayf/*:Array<[Range, string]>*/ = [];\n\tvar sharedf = {};\n\tvar supbooks = opts.supbooks || /*::(*/wb/*:: :any)*/.supbooks || ([[]]/*:any*/);\n\tsupbooks.sharedf = sharedf;\n\tsupbooks.arrayf = arrayf;\n\tsupbooks.SheetNames = wb.SheetNames || wb.Sheets.map(function(x) { return x.name; });\n\tif(!opts.supbooks) {\n\t\topts.supbooks = supbooks;\n\t\tif(wb.Names) for(var i = 0; i < wb.Names.length; ++i) supbooks[0][i+1] = wb.Names[i];\n\t}\n\n\tvar colinfo/*:Array*/ = [], rowinfo/*:Array*/ = [];\n\tvar seencol = false;\n\n\tXLSBRecordEnum[0x0010] = { n:\"BrtShortReal\", f:parse_BrtShortReal };\n\n\tvar cm, vm;\n\n\trecordhopper(data, function ws_parse(val, RR, RT) {\n\t\tif(end) return;\n\t\tswitch(RT) {\n\t\t\tcase 0x0094: /* 'BrtWsDim' */\n\t\t\t\tref = val; break;\n\t\t\tcase 0x0000: /* 'BrtRowHdr' */\n\t\t\t\trow = val;\n\t\t\t\tif(opts.sheetRows && opts.sheetRows <= row.r) end=true;\n\t\t\t\trr = encode_row(R = row.r);\n\t\t\t\topts['!row'] = row.r;\n\t\t\t\tif(val.hidden || val.hpt || val.level != null) {\n\t\t\t\t\tif(val.hpt) val.hpx = pt2px(val.hpt);\n\t\t\t\t\trowinfo[val.r] = val;\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 0x0002: /* 'BrtCellRk' */\n\t\t\tcase 0x0003: /* 'BrtCellError' */\n\t\t\tcase 0x0004: /* 'BrtCellBool' */\n\t\t\tcase 0x0005: /* 'BrtCellReal' */\n\t\t\tcase 0x0006: /* 'BrtCellSt' */\n\t\t\tcase 0x0007: /* 'BrtCellIsst' */\n\t\t\tcase 0x0008: /* 'BrtFmlaString' */\n\t\t\tcase 0x0009: /* 'BrtFmlaNum' */\n\t\t\tcase 0x000A: /* 'BrtFmlaBool' */\n\t\t\tcase 0x000B: /* 'BrtFmlaError' */\n\t\t\tcase 0x000D: /* 'BrtShortRk' */\n\t\t\tcase 0x000E: /* 'BrtShortError' */\n\t\t\tcase 0x000F: /* 'BrtShortBool' */\n\t\t\tcase 0x0010: /* 'BrtShortReal' */\n\t\t\tcase 0x0011: /* 'BrtShortSt' */\n\t\t\tcase 0x0012: /* 'BrtShortIsst' */\n\t\t\tcase 0x003E: /* 'BrtCellRString' */\n\t\t\t\tp = ({t:val[2]}/*:any*/);\n\t\t\t\tswitch(val[2]) {\n\t\t\t\t\tcase 'n': p.v = val[1]; break;\n\t\t\t\t\tcase 's': sstr = strs[val[1]]; p.v = sstr.t; p.r = sstr.r; break;\n\t\t\t\t\tcase 'b': p.v = val[1] ? true : false; break;\n\t\t\t\t\tcase 'e': p.v = val[1]; if(opts.cellText !== false) p.w = BErr[p.v]; break;\n\t\t\t\t\tcase 'str': p.t = 's'; p.v = val[1]; break;\n\t\t\t\t\tcase 'is': p.t = 's'; p.v = val[1].t; break;\n\t\t\t\t}\n\t\t\t\tif((cf = styles.CellXf[val[0].iStyleRef])) safe_format(p,cf.numFmtId,null,opts, themes, styles);\n\t\t\t\tC = val[0].c == -1 ? C + 1 : val[0].c;\n\t\t\t\tif(opts.dense) { if(!s[R]) s[R] = []; s[R][C] = p; }\n\t\t\t\telse s[encode_col(C) + rr] = p;\n\t\t\t\tif(opts.cellFormula) {\n\t\t\t\t\taf = false;\n\t\t\t\t\tfor(ai = 0; ai < arrayf.length; ++ai) {\n\t\t\t\t\t\tvar aii = arrayf[ai];\n\t\t\t\t\t\tif(row.r >= aii[0].s.r && row.r <= aii[0].e.r)\n\t\t\t\t\t\t\tif(C >= aii[0].s.c && C <= aii[0].e.c) {\n\t\t\t\t\t\t\t\tp.F = encode_range(aii[0]); af = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(!af && val.length > 3) p.f = val[3];\n\t\t\t\t}\n\n\t\t\t\tif(refguess.s.r > row.r) refguess.s.r = row.r;\n\t\t\t\tif(refguess.s.c > C) refguess.s.c = C;\n\t\t\t\tif(refguess.e.r < row.r) refguess.e.r = row.r;\n\t\t\t\tif(refguess.e.c < C) refguess.e.c = C;\n\t\t\t\tif(opts.cellDates && cf && p.t == 'n' && fmt_is_date(table_fmt[cf.numFmtId])) {\n\t\t\t\t\tvar _d = SSF_parse_date_code(p.v); if(_d) { p.t = 'd'; p.v = new Date(_d.y, _d.m-1,_d.d,_d.H,_d.M,_d.S,_d.u); }\n\t\t\t\t}\n\t\t\t\tif(cm) {\n\t\t\t\t\tif(cm.type == 'XLDAPR') p.D = true;\n\t\t\t\t\tcm = void 0;\n\t\t\t\t}\n\t\t\t\tif(vm) vm = void 0;\n\t\t\t\tbreak;\n\n\t\t\tcase 0x0001: /* 'BrtCellBlank' */\n\t\t\tcase 0x000C: /* 'BrtShortBlank' */\n\t\t\t\tif(!opts.sheetStubs || pass) break;\n\t\t\t\tp = ({t:'z',v:void 0}/*:any*/);\n\t\t\t\tC = val[0].c == -1 ? C + 1 : val[0].c;\n\t\t\t\tif(opts.dense) { if(!s[R]) s[R] = []; s[R][C] = p; }\n\t\t\t\telse s[encode_col(C) + rr] = p;\n\t\t\t\tif(refguess.s.r > row.r) refguess.s.r = row.r;\n\t\t\t\tif(refguess.s.c > C) refguess.s.c = C;\n\t\t\t\tif(refguess.e.r < row.r) refguess.e.r = row.r;\n\t\t\t\tif(refguess.e.c < C) refguess.e.c = C;\n\t\t\t\tif(cm) {\n\t\t\t\t\tif(cm.type == 'XLDAPR') p.D = true;\n\t\t\t\t\tcm = void 0;\n\t\t\t\t}\n\t\t\t\tif(vm) vm = void 0;\n\t\t\t\tbreak;\n\n\t\t\tcase 0x00B0: /* 'BrtMergeCell' */\n\t\t\t\tmerges.push(val); break;\n\n\t\t\tcase 0x0031: { /* 'BrtCellMeta' */\n\t\t\t\tcm = ((opts.xlmeta||{}).Cell||[])[val-1];\n\t\t\t} break;\n\n\t\t\tcase 0x01EE: /* 'BrtHLink' */\n\t\t\t\tvar rel = rels['!id'][val.relId];\n\t\t\t\tif(rel) {\n\t\t\t\t\tval.Target = rel.Target;\n\t\t\t\t\tif(val.loc) val.Target += \"#\"+val.loc;\n\t\t\t\t\tval.Rel = rel;\n\t\t\t\t} else if(val.relId == '') {\n\t\t\t\t\tval.Target = \"#\" + val.loc;\n\t\t\t\t}\n\t\t\t\tfor(R=val.rfx.s.r;R<=val.rfx.e.r;++R) for(C=val.rfx.s.c;C<=val.rfx.e.c;++C) {\n\t\t\t\t\tif(opts.dense) {\n\t\t\t\t\t\tif(!s[R]) s[R] = [];\n\t\t\t\t\t\tif(!s[R][C]) s[R][C] = {t:'z',v:undefined};\n\t\t\t\t\t\ts[R][C].l = val;\n\t\t\t\t\t} else {\n\t\t\t\t\t\taddr = encode_cell({c:C,r:R});\n\t\t\t\t\t\tif(!s[addr]) s[addr] = {t:'z',v:undefined};\n\t\t\t\t\t\ts[addr].l = val;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 0x01AA: /* 'BrtArrFmla' */\n\t\t\t\tif(!opts.cellFormula) break;\n\t\t\t\tarrayf.push(val);\n\t\t\t\tcell = ((opts.dense ? s[R][C] : s[encode_col(C) + rr])/*:any*/);\n\t\t\t\tcell.f = stringify_formula(val[1], refguess, {r:row.r, c:C}, supbooks, opts);\n\t\t\t\tcell.F = encode_range(val[0]);\n\t\t\t\tbreak;\n\t\t\tcase 0x01AB: /* 'BrtShrFmla' */\n\t\t\t\tif(!opts.cellFormula) break;\n\t\t\t\tsharedf[encode_cell(val[0].s)] = val[1];\n\t\t\t\tcell = (opts.dense ? s[R][C] : s[encode_col(C) + rr]);\n\t\t\t\tcell.f = stringify_formula(val[1], refguess, {r:row.r, c:C}, supbooks, opts);\n\t\t\t\tbreak;\n\n\t\t\t/* identical to 'ColInfo' in XLS */\n\t\t\tcase 0x003C: /* 'BrtColInfo' */\n\t\t\t\tif(!opts.cellStyles) break;\n\t\t\t\twhile(val.e >= val.s) {\n\t\t\t\t\tcolinfo[val.e--] = { width: val.w/256, hidden: !!(val.flags & 0x01), level: val.level };\n\t\t\t\t\tif(!seencol) { seencol = true; find_mdw_colw(val.w/256); }\n\t\t\t\t\tprocess_col(colinfo[val.e+1]);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 0x00A1: /* 'BrtBeginAFilter' */\n\t\t\t\ts['!autofilter'] = { ref:encode_range(val) };\n\t\t\t\tbreak;\n\n\t\t\tcase 0x01DC: /* 'BrtMargins' */\n\t\t\t\ts['!margins'] = val;\n\t\t\t\tbreak;\n\n\t\t\tcase 0x0093: /* 'BrtWsProp' */\n\t\t\t\tif(!wb.Sheets[idx]) wb.Sheets[idx] = {};\n\t\t\t\tif(val.name) wb.Sheets[idx].CodeName = val.name;\n\t\t\t\tif(val.above || val.left) s['!outline'] = { above: val.above, left: val.left };\n\t\t\t\tbreak;\n\n\t\t\tcase 0x0089: /* 'BrtBeginWsView' */\n\t\t\t\tif(!wb.Views) wb.Views = [{}];\n\t\t\t\tif(!wb.Views[0]) wb.Views[0] = {};\n\t\t\t\tif(val.RTL) wb.Views[0].RTL = true;\n\t\t\t\tbreak;\n\n\t\t\tcase 0x01E5: /* 'BrtWsFmtInfo' */\n\t\t\t\tbreak;\n\n\t\t\tcase 0x0040: /* 'BrtDVal' */\n\t\t\tcase 0x041D: /* 'BrtDVal14' */\n\t\t\t\tbreak;\n\n\t\t\tcase 0x0097: /* 'BrtPane' */\n\t\t\t\tbreak;\n\t\t\tcase 0x0098: /* 'BrtSel' */\n\t\t\tcase 0x00AF: /* 'BrtAFilterDateGroupItem' */\n\t\t\tcase 0x0284: /* 'BrtActiveX' */\n\t\t\tcase 0x0271: /* 'BrtBigName' */\n\t\t\tcase 0x0232: /* 'BrtBkHim' */\n\t\t\tcase 0x018C: /* 'BrtBrk' */\n\t\t\tcase 0x0458: /* 'BrtCFIcon' */\n\t\t\tcase 0x047A: /* 'BrtCFRuleExt' */\n\t\t\tcase 0x01D7: /* 'BrtCFVO' */\n\t\t\tcase 0x041A: /* 'BrtCFVO14' */\n\t\t\tcase 0x0289: /* 'BrtCellIgnoreEC' */\n\t\t\tcase 0x0451: /* 'BrtCellIgnoreEC14' */\n\t\t\tcase 0x024D: /* 'BrtCellSmartTagProperty' */\n\t\t\tcase 0x025F: /* 'BrtCellWatch' */\n\t\t\tcase 0x0234: /* 'BrtColor' */\n\t\t\tcase 0x041F: /* 'BrtColor14' */\n\t\t\tcase 0x00A8: /* 'BrtColorFilter' */\n\t\t\tcase 0x00AE: /* 'BrtCustomFilter' */\n\t\t\tcase 0x049C: /* 'BrtCustomFilter14' */\n\t\t\tcase 0x01F3: /* 'BrtDRef' */\n\t\t\tcase 0x01FB: /* 'BrtDXF' */\n\t\t\tcase 0x0226: /* 'BrtDrawing' */\n\t\t\tcase 0x00AB: /* 'BrtDynamicFilter' */\n\t\t\tcase 0x00A7: /* 'BrtFilter' */\n\t\t\tcase 0x0499: /* 'BrtFilter14' */\n\t\t\tcase 0x00A9: /* 'BrtIconFilter' */\n\t\t\tcase 0x049D: /* 'BrtIconFilter14' */\n\t\t\tcase 0x0227: /* 'BrtLegacyDrawing' */\n\t\t\tcase 0x0228: /* 'BrtLegacyDrawingHF' */\n\t\t\tcase 0x0295: /* 'BrtListPart' */\n\t\t\tcase 0x027F: /* 'BrtOleObject' */\n\t\t\tcase 0x01DE: /* 'BrtPageSetup' */\n\t\t\tcase 0x0219: /* 'BrtPhoneticInfo' */\n\t\t\tcase 0x01DD: /* 'BrtPrintOptions' */\n\t\t\tcase 0x0218: /* 'BrtRangeProtection' */\n\t\t\tcase 0x044F: /* 'BrtRangeProtection14' */\n\t\t\tcase 0x02A8: /* 'BrtRangeProtectionIso' */\n\t\t\tcase 0x0450: /* 'BrtRangeProtectionIso14' */\n\t\t\tcase 0x0400: /* 'BrtRwDescent' */\n\t\t\tcase 0x0297: /* 'BrtSheetCalcProp' */\n\t\t\tcase 0x0217: /* 'BrtSheetProtection' */\n\t\t\tcase 0x02A6: /* 'BrtSheetProtectionIso' */\n\t\t\tcase 0x01F8: /* 'BrtSlc' */\n\t\t\tcase 0x0413: /* 'BrtSparkline' */\n\t\t\tcase 0x01AC: /* 'BrtTable' */\n\t\t\tcase 0x00AA: /* 'BrtTop10Filter' */\n\t\t\tcase 0x0C00: /* 'BrtUid' */\n\t\t\tcase 0x0032: /* 'BrtValueMeta' */\n\t\t\tcase 0x0816: /* 'BrtWebExtension' */\n\t\t\tcase 0x0415: /* 'BrtWsFmtInfoEx14' */\n\t\t\t\tbreak;\n\n\t\t\tcase 0x0023: /* 'BrtFRTBegin' */\n\t\t\t\tpass = true; break;\n\t\t\tcase 0x0024: /* 'BrtFRTEnd' */\n\t\t\t\tpass = false; break;\n\t\t\tcase 0x0025: /* 'BrtACBegin' */\n\t\t\t\tstate.push(RT); pass = true; break;\n\t\t\tcase 0x0026: /* 'BrtACEnd' */\n\t\t\t\tstate.pop(); pass = false; break;\n\n\t\t\tdefault:\n\t\t\t\tif(RR.T){/* empty */}\n\t\t\t\telse if(!pass || opts.WTF) throw new Error(\"Unexpected record 0x\" + RT.toString(16));\n\t\t}\n\t}, opts);\n\n\tdelete opts.supbooks;\n\tdelete opts['!row'];\n\n\tif(!s[\"!ref\"] && (refguess.s.r < 2000000 || ref && (ref.e.r > 0 || ref.e.c > 0 || ref.s.r > 0 || ref.s.c > 0))) s[\"!ref\"] = encode_range(ref || refguess);\n\tif(opts.sheetRows && s[\"!ref\"]) {\n\t\tvar tmpref = safe_decode_range(s[\"!ref\"]);\n\t\tif(opts.sheetRows <= +tmpref.e.r) {\n\t\t\ttmpref.e.r = opts.sheetRows - 1;\n\t\t\tif(tmpref.e.r > refguess.e.r) tmpref.e.r = refguess.e.r;\n\t\t\tif(tmpref.e.r < tmpref.s.r) tmpref.s.r = tmpref.e.r;\n\t\t\tif(tmpref.e.c > refguess.e.c) tmpref.e.c = refguess.e.c;\n\t\t\tif(tmpref.e.c < tmpref.s.c) tmpref.s.c = tmpref.e.c;\n\t\t\ts[\"!fullref\"] = s[\"!ref\"];\n\t\t\ts[\"!ref\"] = encode_range(tmpref);\n\t\t}\n\t}\n\tif(merges.length > 0) s[\"!merges\"] = merges;\n\tif(colinfo.length > 0) s[\"!cols\"] = colinfo;\n\tif(rowinfo.length > 0) s[\"!rows\"] = rowinfo;\n\treturn s;\n}\n\n/* TODO: something useful -- this is a stub */\nfunction write_ws_bin_cell(ba/*:BufArray*/, cell/*:Cell*/, R/*:number*/, C/*:number*/, opts, ws/*:Worksheet*/, last_seen/*:boolean*/)/*:boolean*/ {\n\tif(cell.v === undefined) return false;\n\tvar vv = \"\";\n\tswitch(cell.t) {\n\t\tcase 'b': vv = cell.v ? \"1\" : \"0\"; break;\n\t\tcase 'd': // no BrtCellDate :(\n\t\t\tcell = dup(cell);\n\t\t\tcell.z = cell.z || table_fmt[14];\n\t\t\tcell.v = datenum(parseDate(cell.v)); cell.t = 'n';\n\t\t\tbreak;\n\t\t/* falls through */\n\t\tcase 'n': case 'e': vv = ''+cell.v; break;\n\t\tdefault: vv = cell.v; break;\n\t}\n\tvar o/*:any*/ = ({r:R, c:C}/*:any*/);\n\t/* TODO: cell style */\n\to.s = get_cell_style(opts.cellXfs, cell, opts);\n\tif(cell.l) ws['!links'].push([encode_cell(o), cell.l]);\n\tif(cell.c) ws['!comments'].push([encode_cell(o), cell.c]);\n\tswitch(cell.t) {\n\t\tcase 's': case 'str':\n\t\t\tif(opts.bookSST) {\n\t\t\t\tvv = get_sst_id(opts.Strings, (cell.v/*:any*/), opts.revStrings);\n\t\t\t\to.t = \"s\"; o.v = vv;\n\t\t\t\tif(last_seen) write_record(ba, 0x0012 /* BrtShortIsst */, write_BrtShortIsst(cell, o));\n\t\t\t\telse write_record(ba, 0x0007 /* BrtCellIsst */, write_BrtCellIsst(cell, o));\n\t\t\t} else {\n\t\t\t\to.t = \"str\";\n\t\t\t\tif(last_seen) write_record(ba, 0x0011 /* BrtShortSt */, write_BrtShortSt(cell, o));\n\t\t\t\telse write_record(ba, 0x0006 /* BrtCellSt */, write_BrtCellSt(cell, o));\n\t\t\t}\n\t\t\treturn true;\n\t\tcase 'n':\n\t\t\t/* TODO: determine threshold for Real vs RK */\n\t\t\tif(cell.v == (cell.v | 0) && cell.v > -1000 && cell.v < 1000) {\n\t\t\t\tif(last_seen) write_record(ba, 0x000D /* BrtShortRk */, write_BrtShortRk(cell, o));\n\t\t\t\telse write_record(ba, 0x0002 /* BrtCellRk */, write_BrtCellRk(cell, o));\n\t\t\t} else {\n\t\t\t\tif(last_seen) write_record(ba, 0x0010 /* BrtShortReal */, write_BrtShortReal(cell, o));\n\t\t\t\telse write_record(ba, 0x0005 /* BrtCellReal */, write_BrtCellReal(cell, o));\n\t\t\t} return true;\n\t\tcase 'b':\n\t\t\to.t = \"b\";\n\t\t\tif(last_seen) write_record(ba, 0x000F /* BrtShortBool */, write_BrtShortBool(cell, o));\n\t\t\telse write_record(ba, 0x0004 /* BrtCellBool */, write_BrtCellBool(cell, o));\n\t\t\treturn true;\n\t\tcase 'e':\n\t\t\to.t = \"e\";\n\t\t\tif(last_seen) write_record(ba, 0x000E /* BrtShortError */, write_BrtShortError(cell, o));\n\t\t\telse write_record(ba, 0x0003 /* BrtCellError */, write_BrtCellError(cell, o));\n\t\t\treturn true;\n\t}\n\tif(last_seen) write_record(ba, 0x000C /* BrtShortBlank */, write_BrtShortBlank(cell, o));\n\telse write_record(ba, 0x0001 /* BrtCellBlank */, write_BrtCellBlank(cell, o));\n\treturn true;\n}\n\nfunction write_CELLTABLE(ba, ws/*:Worksheet*/, idx/*:number*/, opts/*::, wb:Workbook*/) {\n\tvar range = safe_decode_range(ws['!ref'] || \"A1\"), ref, rr = \"\", cols/*:Array*/ = [];\n\twrite_record(ba, 0x0091 /* BrtBeginSheetData */);\n\tvar dense = Array.isArray(ws);\n\tvar cap = range.e.r;\n\tif(ws['!rows']) cap = Math.max(range.e.r, ws['!rows'].length - 1);\n\tfor(var R = range.s.r; R <= cap; ++R) {\n\t\trr = encode_row(R);\n\t\t/* [ACCELLTABLE] */\n\t\t/* BrtRowHdr */\n\t\twrite_row_header(ba, ws, range, R);\n\t\tvar last_seen = false;\n\t\tif(R <= range.e.r) for(var C = range.s.c; C <= range.e.c; ++C) {\n\t\t\t/* *16384CELL */\n\t\t\tif(R === range.s.r) cols[C] = encode_col(C);\n\t\t\tref = cols[C] + rr;\n\t\t\tvar cell = dense ? (ws[R]||[])[C] : ws[ref];\n\t\t\tif(!cell) { last_seen = false; continue; }\n\t\t\t/* write cell */\n\t\t\tlast_seen = write_ws_bin_cell(ba, cell, R, C, opts, ws, last_seen);\n\t\t}\n\t}\n\twrite_record(ba, 0x0092 /* BrtEndSheetData */);\n}\n\nfunction write_MERGECELLS(ba, ws/*:Worksheet*/) {\n\tif(!ws || !ws['!merges']) return;\n\twrite_record(ba, 0x00B1 /* BrtBeginMergeCells */, write_BrtBeginMergeCells(ws['!merges'].length));\n\tws['!merges'].forEach(function(m) { write_record(ba, 0x00B0 /* BrtMergeCell */, write_BrtMergeCell(m)); });\n\twrite_record(ba, 0x00B2 /* BrtEndMergeCells */);\n}\n\nfunction write_COLINFOS(ba, ws/*:Worksheet*//*::, idx:number, opts, wb:Workbook*/) {\n\tif(!ws || !ws['!cols']) return;\n\twrite_record(ba, 0x0186 /* BrtBeginColInfos */);\n\tws['!cols'].forEach(function(m, i) { if(m) write_record(ba, 0x003C /* 'BrtColInfo' */, write_BrtColInfo(i, m)); });\n\twrite_record(ba, 0x0187 /* BrtEndColInfos */);\n}\n\nfunction write_IGNOREECS(ba, ws/*:Worksheet*/) {\n\tif(!ws || !ws['!ref']) return;\n\twrite_record(ba, 0x0288 /* BrtBeginCellIgnoreECs */);\n\twrite_record(ba, 0x0289 /* BrtCellIgnoreEC */, write_BrtCellIgnoreEC(safe_decode_range(ws['!ref'])));\n\twrite_record(ba, 0x028A /* BrtEndCellIgnoreECs */);\n}\n\nfunction write_HLINKS(ba, ws/*:Worksheet*/, rels) {\n\t/* *BrtHLink */\n\tws['!links'].forEach(function(l) {\n\t\tif(!l[1].Target) return;\n\t\tvar rId = add_rels(rels, -1, l[1].Target.replace(/#.*$/, \"\"), RELS.HLINK);\n\t\twrite_record(ba, 0x01EE /* BrtHLink */, write_BrtHLink(l, rId));\n\t});\n\tdelete ws['!links'];\n}\nfunction write_LEGACYDRAWING(ba, ws/*:Worksheet*/, idx/*:number*/, rels) {\n\t/* [BrtLegacyDrawing] */\n\tif(ws['!comments'].length > 0) {\n\t\tvar rId = add_rels(rels, -1, \"../drawings/vmlDrawing\" + (idx+1) + \".vml\", RELS.VML);\n\t\twrite_record(ba, 0x0227 /* BrtLegacyDrawing */, write_RelID(\"rId\" + rId));\n\t\tws['!legacy'] = rId;\n\t}\n}\n\nfunction write_AUTOFILTER(ba, ws, wb, idx) {\n\tif(!ws['!autofilter']) return;\n\tvar data = ws['!autofilter'];\n\tvar ref = typeof data.ref === \"string\" ? data.ref : encode_range(data.ref);\n\n\t/* Update FilterDatabase defined name for the worksheet */\n\tif(!wb.Workbook) wb.Workbook = ({Sheets:[]}/*:any*/);\n\tif(!wb.Workbook.Names) wb.Workbook.Names = [];\n\tvar names/*: Array */ = wb.Workbook.Names;\n\tvar range = decode_range(ref);\n\tif(range.s.r == range.e.r) { range.e.r = decode_range(ws[\"!ref\"]).e.r; ref = encode_range(range); }\n\tfor(var i = 0; i < names.length; ++i) {\n\t\tvar name = names[i];\n\t\tif(name.Name != '_xlnm._FilterDatabase') continue;\n\t\tif(name.Sheet != idx) continue;\n\t\tname.Ref = \"'\" + wb.SheetNames[idx] + \"'!\" + ref; break;\n\t}\n\tif(i == names.length) names.push({ Name: '_xlnm._FilterDatabase', Sheet: idx, Ref: \"'\" + wb.SheetNames[idx] + \"'!\" + ref });\n\n\twrite_record(ba, 0x00A1 /* BrtBeginAFilter */, write_UncheckedRfX(safe_decode_range(ref)));\n\t/* *FILTERCOLUMN */\n\t/* [SORTSTATE] */\n\t/* BrtEndAFilter */\n\twrite_record(ba, 0x00A2 /* BrtEndAFilter */);\n}\n\nfunction write_WSVIEWS2(ba, ws, Workbook) {\n\twrite_record(ba, 0x0085 /* BrtBeginWsViews */);\n\t{ /* 1*WSVIEW2 */\n\t\t/* [ACUID] */\n\t\twrite_record(ba, 0x0089 /* BrtBeginWsView */, write_BrtBeginWsView(ws, Workbook));\n\t\t/* [BrtPane] */\n\t\t/* *4BrtSel */\n\t\t/* *4SXSELECT */\n\t\t/* *FRT */\n\t\twrite_record(ba, 0x008A /* BrtEndWsView */);\n\t}\n\t/* *FRT */\n\twrite_record(ba, 0x0086 /* BrtEndWsViews */);\n}\n\nfunction write_WSFMTINFO(/*::ba, ws*/) {\n\t/* [ACWSFMTINFO] */\n\t// write_record(ba, 0x01E5 /* BrtWsFmtInfo */, write_BrtWsFmtInfo(ws));\n}\n\nfunction write_SHEETPROTECT(ba, ws) {\n\tif(!ws['!protect']) return;\n\t/* [BrtSheetProtectionIso] */\n\twrite_record(ba, 0x0217 /* BrtSheetProtection */, write_BrtSheetProtection(ws['!protect']));\n}\n\nfunction write_ws_bin(idx/*:number*/, opts, wb/*:Workbook*/, rels) {\n\tvar ba = buf_array();\n\tvar s = wb.SheetNames[idx], ws = wb.Sheets[s] || {};\n\tvar c/*:string*/ = s; try { if(wb && wb.Workbook) c = wb.Workbook.Sheets[idx].CodeName || c; } catch(e) {}\n\tvar r = safe_decode_range(ws['!ref'] || \"A1\");\n\tif(r.e.c > 0x3FFF || r.e.r > 0xFFFFF) {\n\t\tif(opts.WTF) throw new Error(\"Range \" + (ws['!ref'] || \"A1\") + \" exceeds format limit A1:XFD1048576\");\n\t\tr.e.c = Math.min(r.e.c, 0x3FFF);\n\t\tr.e.r = Math.min(r.e.c, 0xFFFFF);\n\t}\n\tws['!links'] = [];\n\t/* passed back to write_zip and removed there */\n\tws['!comments'] = [];\n\twrite_record(ba, 0x0081 /* BrtBeginSheet */);\n\tif(wb.vbaraw || ws['!outline']) write_record(ba, 0x0093 /* BrtWsProp */, write_BrtWsProp(c, ws['!outline']));\n\twrite_record(ba, 0x0094 /* BrtWsDim */, write_BrtWsDim(r));\n\twrite_WSVIEWS2(ba, ws, wb.Workbook);\n\twrite_WSFMTINFO(ba, ws);\n\twrite_COLINFOS(ba, ws, idx, opts, wb);\n\twrite_CELLTABLE(ba, ws, idx, opts, wb);\n\t/* [BrtSheetCalcProp] */\n\twrite_SHEETPROTECT(ba, ws);\n\t/* *([BrtRangeProtectionIso] BrtRangeProtection) */\n\t/* [SCENMAN] */\n\twrite_AUTOFILTER(ba, ws, wb, idx);\n\t/* [SORTSTATE] */\n\t/* [DCON] */\n\t/* [USERSHVIEWS] */\n\twrite_MERGECELLS(ba, ws);\n\t/* [BrtPhoneticInfo] */\n\t/* *CONDITIONALFORMATTING */\n\t/* [DVALS] */\n\twrite_HLINKS(ba, ws, rels);\n\t/* [BrtPrintOptions] */\n\tif(ws['!margins']) write_record(ba, 0x01DC /* BrtMargins */, write_BrtMargins(ws['!margins']));\n\t/* [BrtPageSetup] */\n\t/* [HEADERFOOTER] */\n\t/* [RWBRK] */\n\t/* [COLBRK] */\n\t/* *BrtBigName */\n\t/* [CELLWATCHES] */\n\tif(!opts || opts.ignoreEC || (opts.ignoreEC == (void 0))) write_IGNOREECS(ba, ws);\n\t/* [SMARTTAGS] */\n\t/* [BrtDrawing] */\n\twrite_LEGACYDRAWING(ba, ws, idx, rels);\n\t/* [BrtLegacyDrawingHF] */\n\t/* [BrtBkHim] */\n\t/* [OLEOBJECTS] */\n\t/* [ACTIVEXCONTROLS] */\n\t/* [WEBPUBITEMS] */\n\t/* [LISTPARTS] */\n\t/* FRTWORKSHEET */\n\twrite_record(ba, 0x0082 /* BrtEndSheet */);\n\treturn ba.end();\n}\nfunction parse_Cache(data/*:string*/)/*:[Array, string, ?string]*/ {\n\tvar col/*:Array*/ = [];\n\tvar num = data.match(/^/);\n\tvar f;\n\n\t/* 21.2.2.150 pt CT_NumVal */\n\t(data.match(/(.*?)<\\/c:pt>/mg)||[]).forEach(function(pt) {\n\t\tvar q = pt.match(/(.*)<\\/c:v><\\/c:pt>/);\n\t\tif(!q) return;\n\t\tcol[+q[1]] = num ? +q[2] : q[2];\n\t});\n\n\t/* 21.2.2.71 formatCode CT_Xstring */\n\tvar nf = unescapexml((data.match(/([\\s\\S]*?)<\\/c:formatCode>/) || [\"\",\"General\"])[1]);\n\n\t(data.match(/(.*?)<\\/c:f>/mg)||[]).forEach(function(F) { f = F.replace(/<.*?>/g,\"\"); });\n\n\treturn [col, nf, f];\n}\n\n/* 21.2 DrawingML - Charts */\nfunction parse_chart(data/*:?string*/, name/*:string*/, opts, rels, wb, csheet) {\n\tvar cs/*:Worksheet*/ = ((csheet || {\"!type\":\"chart\"})/*:any*/);\n\tif(!data) return csheet;\n\t/* 21.2.2.27 chart CT_Chart */\n\n\tvar C = 0, R = 0, col = \"A\";\n\tvar refguess = {s: {r:2000000, c:2000000}, e: {r:0, c:0} };\n\n\t/* 21.2.2.120 numCache CT_NumData */\n\t(data.match(/[\\s\\S]*?<\\/c:numCache>/gm)||[]).forEach(function(nc) {\n\t\tvar cache = parse_Cache(nc);\n\t\trefguess.s.r = refguess.s.c = 0;\n\t\trefguess.e.c = C;\n\t\tcol = encode_col(C);\n\t\tcache[0].forEach(function(n,i) {\n\t\t\tcs[col + encode_row(i)] = {t:'n', v:n, z:cache[1] };\n\t\t\tR = i;\n\t\t});\n\t\tif(refguess.e.r < R) refguess.e.r = R;\n\t\t++C;\n\t});\n\tif(C > 0) cs[\"!ref\"] = encode_range(refguess);\n\treturn cs;\n}\n/* 18.3 Worksheets also covers Chartsheets */\nfunction parse_cs_xml(data/*:?string*/, opts, idx/*:number*/, rels, wb/*::, themes, styles*/)/*:Worksheet*/ {\n\tif(!data) return data;\n\t/* 18.3.1.12 chartsheet CT_ChartSheet */\n\tif(!rels) rels = {'!id':{}};\n\tvar s = ({'!type':\"chart\", '!drawel':null, '!rel':\"\"}/*:any*/);\n\tvar m;\n\n\t/* 18.3.1.83 sheetPr CT_ChartsheetPr */\n\tvar sheetPr = data.match(sheetprregex);\n\tif(sheetPr) parse_ws_xml_sheetpr(sheetPr[0], s, wb, idx);\n\n\t/* 18.3.1.36 drawing CT_Drawing */\n\tif((m = data.match(/drawing r:id=\"(.*?)\"/))) s['!rel'] = m[1];\n\n\tif(rels['!id'][s['!rel']]) s['!drawel'] = rels['!id'][s['!rel']];\n\treturn s;\n}\nfunction write_cs_xml(idx/*:number*/, opts, wb/*:Workbook*/, rels)/*:string*/ {\n\tvar o = [XML_HEADER, writextag('chartsheet', null, {\n\t\t'xmlns': XMLNS_main[0],\n\t\t'xmlns:r': XMLNS.r\n\t})];\n\to[o.length] = writextag(\"drawing\", null, {\"r:id\": \"rId1\"});\n\tadd_rels(rels, -1, \"../drawings/drawing\" + (idx+1) + \".xml\", RELS.DRAW);\n\tif(o.length>2) { o[o.length] = (''); o[1]=o[1].replace(\"/>\",\">\"); }\n\treturn o.join(\"\");\n}\n\n/* [MS-XLSB] 2.4.331 BrtCsProp */\nfunction parse_BrtCsProp(data, length/*:number*/) {\n\tdata.l += 10;\n\tvar name = parse_XLWideString(data, length - 10);\n\treturn { name: name };\n}\n\n/* [MS-XLSB] 2.1.7.7 Chart Sheet */\nfunction parse_cs_bin(data, opts, idx/*:number*/, rels, wb/*::, themes, styles*/)/*:Worksheet*/ {\n\tif(!data) return data;\n\tif(!rels) rels = {'!id':{}};\n\tvar s = {'!type':\"chart\", '!drawel':null, '!rel':\"\"};\n\tvar state/*:Array*/ = [];\n\tvar pass = false;\n\trecordhopper(data, function cs_parse(val, R, RT) {\n\t\tswitch(RT) {\n\n\t\t\tcase 0x0226: /* 'BrtDrawing' */\n\t\t\t\ts['!rel'] = val; break;\n\n\t\t\tcase 0x028B: /* 'BrtCsProp' */\n\t\t\t\tif(!wb.Sheets[idx]) wb.Sheets[idx] = {};\n\t\t\t\tif(val.name) wb.Sheets[idx].CodeName = val.name;\n\t\t\t\tbreak;\n\n\t\t\tcase 0x0232: /* 'BrtBkHim' */\n\t\t\tcase 0x028C: /* 'BrtCsPageSetup' */\n\t\t\tcase 0x029D: /* 'BrtCsProtection' */\n\t\t\tcase 0x02A7: /* 'BrtCsProtectionIso' */\n\t\t\tcase 0x0227: /* 'BrtLegacyDrawing' */\n\t\t\tcase 0x0228: /* 'BrtLegacyDrawingHF' */\n\t\t\tcase 0x01DC: /* 'BrtMargins' */\n\t\t\tcase 0x0C00: /* 'BrtUid' */\n\t\t\t\tbreak;\n\n\t\t\tcase 0x0023: /* 'BrtFRTBegin' */\n\t\t\t\tpass = true; break;\n\t\t\tcase 0x0024: /* 'BrtFRTEnd' */\n\t\t\t\tpass = false; break;\n\t\t\tcase 0x0025: /* 'BrtACBegin' */\n\t\t\t\tstate.push(RT); break;\n\t\t\tcase 0x0026: /* 'BrtACEnd' */\n\t\t\t\tstate.pop(); break;\n\n\t\t\tdefault:\n\t\t\t\tif(R.T > 0) state.push(RT);\n\t\t\t\telse if(R.T < 0) state.pop();\n\t\t\t\telse if(!pass || opts.WTF) throw new Error(\"Unexpected record 0x\" + RT.toString(16));\n\t\t}\n\t}, opts);\n\n\tif(rels['!id'][s['!rel']]) s['!drawel'] = rels['!id'][s['!rel']];\n\treturn s;\n}\nfunction write_cs_bin(/*::idx:number, opts, wb:Workbook, rels*/) {\n\tvar ba = buf_array();\n\twrite_record(ba, 0x0081 /* BrtBeginSheet */);\n\t/* [BrtCsProp] */\n\t/* CSVIEWS */\n\t/* [[BrtCsProtectionIso] BrtCsProtection] */\n\t/* [USERCSVIEWS] */\n\t/* [BrtMargins] */\n\t/* [BrtCsPageSetup] */\n\t/* [HEADERFOOTER] */\n\t/* BrtDrawing */\n\t/* [BrtLegacyDrawing] */\n\t/* [BrtLegacyDrawingHF] */\n\t/* [BrtBkHim] */\n\t/* [WEBPUBITEMS] */\n\t/* FRTCHARTSHEET */\n\twrite_record(ba, 0x0082 /* BrtEndSheet */);\n\treturn ba.end();\n}\n/* 18.2.28 (CT_WorkbookProtection) Defaults */\nvar WBPropsDef = [\n\t['allowRefreshQuery', false, \"bool\"],\n\t['autoCompressPictures', true, \"bool\"],\n\t['backupFile', false, \"bool\"],\n\t['checkCompatibility', false, \"bool\"],\n\t['CodeName', ''],\n\t['date1904', false, \"bool\"],\n\t['defaultThemeVersion', 0, \"int\"],\n\t['filterPrivacy', false, \"bool\"],\n\t['hidePivotFieldList', false, \"bool\"],\n\t['promptedSolutions', false, \"bool\"],\n\t['publishItems', false, \"bool\"],\n\t['refreshAllConnections', false, \"bool\"],\n\t['saveExternalLinkValues', true, \"bool\"],\n\t['showBorderUnselectedTables', true, \"bool\"],\n\t['showInkAnnotation', true, \"bool\"],\n\t['showObjects', 'all'],\n\t['showPivotChartFilter', false, \"bool\"],\n\t['updateLinks', 'userSet']\n];\n\n/* 18.2.30 (CT_BookView) Defaults */\nvar WBViewDef = [\n\t['activeTab', 0, \"int\"],\n\t['autoFilterDateGrouping', true, \"bool\"],\n\t['firstSheet', 0, \"int\"],\n\t['minimized', false, \"bool\"],\n\t['showHorizontalScroll', true, \"bool\"],\n\t['showSheetTabs', true, \"bool\"],\n\t['showVerticalScroll', true, \"bool\"],\n\t['tabRatio', 600, \"int\"],\n\t['visibility', 'visible']\n\t//window{Height,Width}, {x,y}Window\n];\n\n/* 18.2.19 (CT_Sheet) Defaults */\nvar SheetDef = [\n\t//['state', 'visible']\n];\n\n/* 18.2.2 (CT_CalcPr) Defaults */\nvar CalcPrDef = [\n\t['calcCompleted', 'true'],\n\t['calcMode', 'auto'],\n\t['calcOnSave', 'true'],\n\t['concurrentCalc', 'true'],\n\t['fullCalcOnLoad', 'false'],\n\t['fullPrecision', 'true'],\n\t['iterate', 'false'],\n\t['iterateCount', '100'],\n\t['iterateDelta', '0.001'],\n\t['refMode', 'A1']\n];\n\n/* 18.2.3 (CT_CustomWorkbookView) Defaults */\n/*var CustomWBViewDef = [\n\t['autoUpdate', 'false'],\n\t['changesSavedWin', 'false'],\n\t['includeHiddenRowCol', 'true'],\n\t['includePrintSettings', 'true'],\n\t['maximized', 'false'],\n\t['minimized', 'false'],\n\t['onlySync', 'false'],\n\t['personalView', 'false'],\n\t['showComments', 'commIndicator'],\n\t['showFormulaBar', 'true'],\n\t['showHorizontalScroll', 'true'],\n\t['showObjects', 'all'],\n\t['showSheetTabs', 'true'],\n\t['showStatusbar', 'true'],\n\t['showVerticalScroll', 'true'],\n\t['tabRatio', '600'],\n\t['xWindow', '0'],\n\t['yWindow', '0']\n];*/\n\nfunction push_defaults_array(target, defaults) {\n\tfor(var j = 0; j != target.length; ++j) { var w = target[j];\n\t\tfor(var i=0; i != defaults.length; ++i) { var z = defaults[i];\n\t\t\tif(w[z[0]] == null) w[z[0]] = z[1];\n\t\t\telse switch(z[2]) {\n\t\t\tcase \"bool\": if(typeof w[z[0]] == \"string\") w[z[0]] = parsexmlbool(w[z[0]]); break;\n\t\t\tcase \"int\": if(typeof w[z[0]] == \"string\") w[z[0]] = parseInt(w[z[0]], 10); break;\n\t\t\t}\n\t\t}\n\t}\n}\nfunction push_defaults(target, defaults) {\n\tfor(var i = 0; i != defaults.length; ++i) { var z = defaults[i];\n\t\tif(target[z[0]] == null) target[z[0]] = z[1];\n\t\telse switch(z[2]) {\n\t\t\tcase \"bool\": if(typeof target[z[0]] == \"string\") target[z[0]] = parsexmlbool(target[z[0]]); break;\n\t\t\tcase \"int\": if(typeof target[z[0]] == \"string\") target[z[0]] = parseInt(target[z[0]], 10); break;\n\t\t}\n\t}\n}\n\nfunction parse_wb_defaults(wb) {\n\tpush_defaults(wb.WBProps, WBPropsDef);\n\tpush_defaults(wb.CalcPr, CalcPrDef);\n\n\tpush_defaults_array(wb.WBView, WBViewDef);\n\tpush_defaults_array(wb.Sheets, SheetDef);\n\n\t_ssfopts.date1904 = parsexmlbool(wb.WBProps.date1904);\n}\n\nfunction safe1904(wb/*:Workbook*/)/*:string*/ {\n\t/* TODO: store date1904 somewhere else */\n\tif(!wb.Workbook) return \"false\";\n\tif(!wb.Workbook.WBProps) return \"false\";\n\treturn parsexmlbool(wb.Workbook.WBProps.date1904) ? \"true\" : \"false\";\n}\n\nvar badchars = /*#__PURE__*/\"][*?\\/\\\\\".split(\"\");\nfunction check_ws_name(n/*:string*/, safe/*:?boolean*/)/*:boolean*/ {\n\tif(n.length > 31) { if(safe) return false; throw new Error(\"Sheet names cannot exceed 31 chars\"); }\n\tvar _good = true;\n\tbadchars.forEach(function(c) {\n\t\tif(n.indexOf(c) == -1) return;\n\t\tif(!safe) throw new Error(\"Sheet name cannot contain : \\\\ / ? * [ ]\");\n\t\t_good = false;\n\t});\n\treturn _good;\n}\nfunction check_wb_names(N, S, codes) {\n\tN.forEach(function(n,i) {\n\t\tcheck_ws_name(n);\n\t\tfor(var j = 0; j < i; ++j) if(n == N[j]) throw new Error(\"Duplicate Sheet Name: \" + n);\n\t\tif(codes) {\n\t\t\tvar cn = (S && S[i] && S[i].CodeName) || n;\n\t\t\tif(cn.charCodeAt(0) == 95 && cn.length > 22) throw new Error(\"Bad Code Name: Worksheet\" + cn);\n\t\t}\n\t});\n}\nfunction check_wb(wb) {\n\tif(!wb || !wb.SheetNames || !wb.Sheets) throw new Error(\"Invalid Workbook\");\n\tif(!wb.SheetNames.length) throw new Error(\"Workbook is empty\");\n\tvar Sheets = (wb.Workbook && wb.Workbook.Sheets) || [];\n\tcheck_wb_names(wb.SheetNames, Sheets, !!wb.vbaraw);\n\tfor(var i = 0; i < wb.SheetNames.length; ++i) check_ws(wb.Sheets[wb.SheetNames[i]], wb.SheetNames[i], i);\n\t/* TODO: validate workbook */\n}\n/* 18.2 Workbook */\nvar wbnsregex = /<\\w+:workbook/;\nfunction parse_wb_xml(data, opts)/*:WorkbookFile*/ {\n\tif(!data) throw new Error(\"Could not find file\");\n\tvar wb = /*::(*/{ AppVersion:{}, WBProps:{}, WBView:[], Sheets:[], CalcPr:{}, Names:[], xmlns: \"\" }/*::)*/;\n\tvar pass = false, xmlns = \"xmlns\";\n\tvar dname = {}, dnstart = 0;\n\tdata.replace(tagregex, function xml_wb(x, idx) {\n\t\tvar y/*:any*/ = parsexmltag(x);\n\t\tswitch(strip_ns(y[0])) {\n\t\t\tcase '': break;\n\n\t\t\t/* 18.2.13 fileVersion CT_FileVersion ? */\n\t\t\tcase '': case '': break;\n\n\t\t\t/* 18.2.12 fileSharing CT_FileSharing ? */\n\t\t\tcase '': break;\n\n\t\t\t/* 18.2.28 workbookPr CT_WorkbookPr ? */\n\t\t\tcase '':\n\t\t\t\tWBPropsDef.forEach(function(w) {\n\t\t\t\t\tif(y[w[0]] == null) return;\n\t\t\t\t\tswitch(w[2]) {\n\t\t\t\t\t\tcase \"bool\": wb.WBProps[w[0]] = parsexmlbool(y[w[0]]); break;\n\t\t\t\t\t\tcase \"int\": wb.WBProps[w[0]] = parseInt(y[w[0]], 10); break;\n\t\t\t\t\t\tdefault: wb.WBProps[w[0]] = y[w[0]];\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tif(y.codeName) wb.WBProps.CodeName = utf8read(y.codeName);\n\t\t\t\tbreak;\n\t\t\tcase '': break;\n\n\t\t\t/* 18.2.29 workbookProtection CT_WorkbookProtection ? */\n\t\t\tcase '': break;\n\n\t\t\t/* 18.2.1 bookViews CT_BookViews ? */\n\t\t\tcase '': case '': break;\n\t\t\t/* 18.2.30 workbookView CT_BookView + */\n\t\t\tcase '': delete y[0]; wb.WBView.push(y); break;\n\t\t\tcase '': break;\n\n\t\t\t/* 18.2.20 sheets CT_Sheets 1 */\n\t\t\tcase '': case '': break; // aggregate sheet\n\t\t\t/* 18.2.19 sheet CT_Sheet + */\n\t\t\tcase '': break;\n\n\t\t\t/* 18.2.15 functionGroups CT_FunctionGroups ? */\n\t\t\tcase '': break;\n\t\t\t/* 18.2.14 functionGroup CT_FunctionGroup + */\n\t\t\tcase '': case '': break;\n\t\t\t/* 18.2.8 externalReference CT_ExternalReference + */\n\t\t\tcase '': break;\n\t\t\tcase '': case '': pass=false; break;\n\t\t\t/* 18.2.5 definedName CT_DefinedName + */\n\t\t\tcase '': {\n\t\t\t\tdname.Ref = unescapexml(utf8read(data.slice(dnstart, idx)));\n\t\t\t\twb.Names.push(dname);\n\t\t\t} break;\n\t\t\tcase '': break;\n\n\t\t\t/* 18.2.2 calcPr CT_CalcPr ? */\n\t\t\tcase '': delete y[0]; wb.CalcPr = y; break;\n\t\t\tcase '': break;\n\n\t\t\t/* 18.2.16 oleSize CT_OleSize ? (ref required) */\n\t\t\tcase '': case '': case '': break;\n\n\t\t\t/* 18.2.18 pivotCaches CT_PivotCaches ? */\n\t\t\tcase '': case '': case '': break;\n\n\t\t\t/* 18.2.23 smartTagTypes CT_SmartTagTypes ? */\n\t\t\tcase '': case '': break;\n\t\t\t/* 18.2.22 smartTagType CT_SmartTagType ? */\n\t\t\tcase '': break;\n\n\t\t\t/* 18.2.11 fileRecoveryPr CT_FileRecoveryPr ? */\n\t\t\tcase '': break;\n\n\t\t\t/* 18.2.26 webPublishObjects CT_WebPublishObjects ? */\n\t\t\tcase '': case '': break;\n\t\t\t/* 18.2.25 webPublishObject CT_WebPublishObject ? */\n\t\t\tcase '': case '': case '': break;\n\t\t\t/* 18.2.7 ext CT_Extension + */\n\t\t\tcase '': pass=false; break;\n\n\t\t\t/* Others */\n\t\t\tcase '': pass=true; break;\n\t\t\tcase '': pass=false; break;\n\n\t\t\t/* TODO */\n\t\t\tcase ' 0);\n\n\t/* fileVersion */\n\t/* fileSharing */\n\n\tvar workbookPr/*:any*/ = ({codeName:\"ThisWorkbook\"}/*:any*/);\n\tif(wb.Workbook && wb.Workbook.WBProps) {\n\t\tWBPropsDef.forEach(function(x) {\n\t\t\t/*:: if(!wb.Workbook || !wb.Workbook.WBProps) throw \"unreachable\"; */\n\t\t\tif((wb.Workbook.WBProps[x[0]]/*:any*/) == null) return;\n\t\t\tif((wb.Workbook.WBProps[x[0]]/*:any*/) == x[1]) return;\n\t\t\tworkbookPr[x[0]] = (wb.Workbook.WBProps[x[0]]/*:any*/);\n\t\t});\n\t\t/*:: if(!wb.Workbook || !wb.Workbook.WBProps) throw \"unreachable\"; */\n\t\tif(wb.Workbook.WBProps.CodeName) { workbookPr.codeName = wb.Workbook.WBProps.CodeName; delete workbookPr.CodeName; }\n\t}\n\to[o.length] = (writextag('workbookPr', null, workbookPr));\n\n\t/* workbookProtection */\n\n\tvar sheets = wb.Workbook && wb.Workbook.Sheets || [];\n\tvar i = 0;\n\n\t/* bookViews only written if first worksheet is hidden */\n\tif(sheets && sheets[0] && !!sheets[0].Hidden) {\n\t\to[o.length] = \"\";\n\t\tfor(i = 0; i != wb.SheetNames.length; ++i) {\n\t\t\tif(!sheets[i]) break;\n\t\t\tif(!sheets[i].Hidden) break;\n\t\t}\n\t\tif(i == wb.SheetNames.length) i = 0;\n\t\to[o.length] = '';\n\t\to[o.length] = \"\";\n\t}\n\n\to[o.length] = \"\";\n\tfor(i = 0; i != wb.SheetNames.length; ++i) {\n\t\tvar sht = ({name:escapexml(wb.SheetNames[i].slice(0,31))}/*:any*/);\n\t\tsht.sheetId = \"\"+(i+1);\n\t\tsht[\"r:id\"] = \"rId\"+(i+1);\n\t\tif(sheets[i]) switch(sheets[i].Hidden) {\n\t\t\tcase 1: sht.state = \"hidden\"; break;\n\t\t\tcase 2: sht.state = \"veryHidden\"; break;\n\t\t}\n\t\to[o.length] = (writextag('sheet',null,sht));\n\t}\n\to[o.length] = \"\";\n\n\t/* functionGroups */\n\t/* externalReferences */\n\n\tif(write_names) {\n\t\to[o.length] = \"\";\n\t\tif(wb.Workbook && wb.Workbook.Names) wb.Workbook.Names.forEach(function(n) {\n\t\t\tvar d/*:any*/ = {name:n.Name};\n\t\t\tif(n.Comment) d.comment = n.Comment;\n\t\t\tif(n.Sheet != null) d.localSheetId = \"\"+n.Sheet;\n\t\t\tif(n.Hidden) d.hidden = \"1\";\n\t\t\tif(!n.Ref) return;\n\t\t\to[o.length] = writextag('definedName', escapexml(n.Ref), d);\n\t\t});\n\t\to[o.length] = \"\";\n\t}\n\n\t/* calcPr */\n\t/* oleSize */\n\t/* customWorkbookViews */\n\t/* pivotCaches */\n\t/* smartTagPr */\n\t/* smartTagTypes */\n\t/* webPublishing */\n\t/* fileRecoveryPr */\n\t/* webPublishObjects */\n\t/* extLst */\n\n\tif(o.length>2){ o[o.length] = ''; o[1]=o[1].replace(\"/>\",\">\"); }\n\treturn o.join(\"\");\n}\n/* [MS-XLSB] 2.4.304 BrtBundleSh */\nfunction parse_BrtBundleSh(data, length/*:number*/) {\n\tvar z = {};\n\tz.Hidden = data.read_shift(4); //hsState ST_SheetState\n\tz.iTabID = data.read_shift(4);\n\tz.strRelID = parse_RelID(data,length-8);\n\tz.name = parse_XLWideString(data);\n\treturn z;\n}\nfunction write_BrtBundleSh(data, o) {\n\tif(!o) o = new_buf(127);\n\to.write_shift(4, data.Hidden);\n\to.write_shift(4, data.iTabID);\n\twrite_RelID(data.strRelID, o);\n\twrite_XLWideString(data.name.slice(0,31), o);\n\treturn o.length > o.l ? o.slice(0, o.l) : o;\n}\n\n/* [MS-XLSB] 2.4.815 BrtWbProp */\nfunction parse_BrtWbProp(data, length)/*:WBProps*/ {\n\tvar o/*:WBProps*/ = ({}/*:any*/);\n\tvar flags = data.read_shift(4);\n\to.defaultThemeVersion = data.read_shift(4);\n\tvar strName = (length > 8) ? parse_XLWideString(data) : \"\";\n\tif(strName.length > 0) o.CodeName = strName;\n\to.autoCompressPictures = !!(flags & 0x10000);\n\to.backupFile = !!(flags & 0x40);\n\to.checkCompatibility = !!(flags & 0x1000);\n\to.date1904 = !!(flags & 0x01);\n\to.filterPrivacy = !!(flags & 0x08);\n\to.hidePivotFieldList = !!(flags & 0x400);\n\to.promptedSolutions = !!(flags & 0x10);\n\to.publishItems = !!(flags & 0x800);\n\to.refreshAllConnections = !!(flags & 0x40000);\n\to.saveExternalLinkValues = !!(flags & 0x80);\n\to.showBorderUnselectedTables = !!(flags & 0x04);\n\to.showInkAnnotation = !!(flags & 0x20);\n\to.showObjects = [\"all\", \"placeholders\", \"none\"][(flags >> 13) & 0x03];\n\to.showPivotChartFilter = !!(flags & 0x8000);\n\to.updateLinks = [\"userSet\", \"never\", \"always\"][(flags >> 8) & 0x03];\n\treturn o;\n}\nfunction write_BrtWbProp(data/*:?WBProps*/, o) {\n\tif(!o) o = new_buf(72);\n\tvar flags = 0;\n\tif(data) {\n\t\t/* TODO: mirror parse_BrtWbProp fields */\n\t\tif(data.filterPrivacy) flags |= 0x08;\n\t}\n\to.write_shift(4, flags);\n\to.write_shift(4, 0);\n\twrite_XLSBCodeName(data && data.CodeName || \"ThisWorkbook\", o);\n\treturn o.slice(0, o.l);\n}\n\nfunction parse_BrtFRTArchID$(data, length) {\n\tvar o = {};\n\tdata.read_shift(4);\n\to.ArchID = data.read_shift(4);\n\tdata.l += length - 8;\n\treturn o;\n}\n\n/* [MS-XLSB] 2.4.687 BrtName */\nfunction parse_BrtName(data, length, opts) {\n\tvar end = data.l + length;\n\tdata.l += 4; //var flags = data.read_shift(4);\n\tdata.l += 1; //var chKey = data.read_shift(1);\n\tvar itab = data.read_shift(4);\n\tvar name = parse_XLNameWideString(data);\n\tvar formula = parse_XLSBNameParsedFormula(data, 0, opts);\n\tvar comment = parse_XLNullableWideString(data);\n\t//if(0 /* fProc */) {\n\t\t// unusedstring1: XLNullableWideString\n\t\t// description: XLNullableWideString\n\t\t// helpTopic: XLNullableWideString\n\t\t// unusedstring2: XLNullableWideString\n\t//}\n\tdata.l = end;\n\tvar out = ({Name:name, Ptg:formula}/*:any*/);\n\tif(itab < 0xFFFFFFF) out.Sheet = itab;\n\tif(comment) out.Comment = comment;\n\treturn out;\n}\n\n/* [MS-XLSB] 2.1.7.61 Workbook */\nfunction parse_wb_bin(data, opts)/*:WorkbookFile*/ {\n\tvar wb = { AppVersion:{}, WBProps:{}, WBView:[], Sheets:[], CalcPr:{}, xmlns: \"\" };\n\tvar state/*:Array*/ = [];\n\tvar pass = false;\n\n\tif(!opts) opts = {};\n\topts.biff = 12;\n\n\tvar Names = [];\n\tvar supbooks = ([[]]/*:any*/);\n\tsupbooks.SheetNames = [];\n\tsupbooks.XTI = [];\n\n\tXLSBRecordEnum[0x0010] = { n:\"BrtFRTArchID$\", f:parse_BrtFRTArchID$ };\n\n\trecordhopper(data, function hopper_wb(val, R, RT) {\n\t\tswitch(RT) {\n\t\t\tcase 0x009C: /* 'BrtBundleSh' */\n\t\t\t\tsupbooks.SheetNames.push(val.name);\n\t\t\t\twb.Sheets.push(val); break;\n\n\t\t\tcase 0x0099: /* 'BrtWbProp' */\n\t\t\t\twb.WBProps = val; break;\n\n\t\t\tcase 0x0027: /* 'BrtName' */\n\t\t\t\tif(val.Sheet != null) opts.SID = val.Sheet;\n\t\t\t\tval.Ref = stringify_formula(val.Ptg, null, null, supbooks, opts);\n\t\t\t\tdelete opts.SID;\n\t\t\t\tdelete val.Ptg;\n\t\t\t\tNames.push(val);\n\t\t\t\tbreak;\n\t\t\tcase 0x040C: /* 'BrtNameExt' */ break;\n\n\t\t\tcase 0x0165: /* 'BrtSupSelf' */\n\t\t\tcase 0x0166: /* 'BrtSupSame' */\n\t\t\tcase 0x0163: /* 'BrtSupBookSrc' */\n\t\t\tcase 0x029B: /* 'BrtSupAddin' */\n\t\t\t\tif(!supbooks[0].length) supbooks[0] = [RT, val];\n\t\t\t\telse supbooks.push([RT, val]);\n\t\t\t\tsupbooks[supbooks.length - 1].XTI = [];\n\t\t\t\tbreak;\n\t\t\tcase 0x016A: /* 'BrtExternSheet' */\n\t\t\t\tif(supbooks.length === 0) { supbooks[0] = []; supbooks[0].XTI = []; }\n\t\t\t\tsupbooks[supbooks.length - 1].XTI = supbooks[supbooks.length - 1].XTI.concat(val);\n\t\t\t\tsupbooks.XTI = supbooks.XTI.concat(val);\n\t\t\t\tbreak;\n\t\t\tcase 0x0169: /* 'BrtPlaceholderName' */\n\t\t\t\tbreak;\n\n\t\t\tcase 0x0817: /* 'BrtAbsPath15' */\n\t\t\tcase 0x009E: /* 'BrtBookView' */\n\t\t\tcase 0x008F: /* 'BrtBeginBundleShs' */\n\t\t\tcase 0x0298: /* 'BrtBeginFnGroup' */\n\t\t\tcase 0x0161: /* 'BrtBeginExternals' */\n\t\t\t\tbreak;\n\n\t\t\t/* case 'BrtModelTimeGroupingCalcCol' */\n\t\t\tcase 0x0C00: /* 'BrtUid' */\n\t\t\tcase 0x0C01: /* 'BrtRevisionPtr' */\n\t\t\tcase 0x0216: /* 'BrtBookProtection' */\n\t\t\tcase 0x02A5: /* 'BrtBookProtectionIso' */\n\t\t\tcase 0x009D: /* 'BrtCalcProp' */\n\t\t\tcase 0x0262: /* 'BrtCrashRecErr' */\n\t\t\tcase 0x0802: /* 'BrtDecoupledPivotCacheID' */\n\t\t\tcase 0x009B: /* 'BrtFileRecover' */\n\t\t\tcase 0x0224: /* 'BrtFileSharing' */\n\t\t\tcase 0x02A4: /* 'BrtFileSharingIso' */\n\t\t\tcase 0x0080: /* 'BrtFileVersion' */\n\t\t\tcase 0x0299: /* 'BrtFnGroup' */\n\t\t\tcase 0x0850: /* 'BrtModelRelationship' */\n\t\t\tcase 0x084D: /* 'BrtModelTable' */\n\t\t\tcase 0x0225: /* 'BrtOleSize' */\n\t\t\tcase 0x0805: /* 'BrtPivotTableRef' */\n\t\t\tcase 0x0254: /* 'BrtSmartTagType' */\n\t\t\tcase 0x081C: /* 'BrtTableSlicerCacheID' */\n\t\t\tcase 0x081B: /* 'BrtTableSlicerCacheIDs' */\n\t\t\tcase 0x0822: /* 'BrtTimelineCachePivotCacheID' */\n\t\t\tcase 0x018D: /* 'BrtUserBookView' */\n\t\t\tcase 0x009A: /* 'BrtWbFactoid' */\n\t\t\tcase 0x045D: /* 'BrtWbProp14' */\n\t\t\tcase 0x0229: /* 'BrtWebOpt' */\n\t\t\tcase 0x082B: /* 'BrtWorkBookPr15' */\n\t\t\t\tbreak;\n\n\t\t\tcase 0x0023: /* 'BrtFRTBegin' */\n\t\t\t\tstate.push(RT); pass = true; break;\n\t\t\tcase 0x0024: /* 'BrtFRTEnd' */\n\t\t\t\tstate.pop(); pass = false; break;\n\t\t\tcase 0x0025: /* 'BrtACBegin' */\n\t\t\t\tstate.push(RT); pass = true; break;\n\t\t\tcase 0x0026: /* 'BrtACEnd' */\n\t\t\t\tstate.pop(); pass = false; break;\n\n\t\t\tcase 0x0010: /* 'BrtFRTArchID$' */ break;\n\n\t\t\tdefault:\n\t\t\t\tif(R.T){/* empty */}\n\t\t\t\telse if(!pass || (opts.WTF && state[state.length-1] != 0x0025 /* BrtACBegin */ && state[state.length-1] != 0x0023 /* BrtFRTBegin */)) throw new Error(\"Unexpected record 0x\" + RT.toString(16));\n\t\t}\n\t}, opts);\n\n\tparse_wb_defaults(wb);\n\n\t// $FlowIgnore\n\twb.Names = Names;\n\n\t(wb/*:any*/).supbooks = supbooks;\n\treturn wb;\n}\n\nfunction write_BUNDLESHS(ba, wb/*::, opts*/) {\n\twrite_record(ba, 0x008F /* BrtBeginBundleShs */);\n\tfor(var idx = 0; idx != wb.SheetNames.length; ++idx) {\n\t\tvar viz = wb.Workbook && wb.Workbook.Sheets && wb.Workbook.Sheets[idx] && wb.Workbook.Sheets[idx].Hidden || 0;\n\t\tvar d = { Hidden: viz, iTabID: idx+1, strRelID: 'rId' + (idx+1), name: wb.SheetNames[idx] };\n\t\twrite_record(ba, 0x009C /* BrtBundleSh */, write_BrtBundleSh(d));\n\t}\n\twrite_record(ba, 0x0090 /* BrtEndBundleShs */);\n}\n\n/* [MS-XLSB] 2.4.649 BrtFileVersion */\nfunction write_BrtFileVersion(data, o) {\n\tif(!o) o = new_buf(127);\n\tfor(var i = 0; i != 4; ++i) o.write_shift(4, 0);\n\twrite_XLWideString(\"SheetJS\", o);\n\twrite_XLWideString(XLSX.version, o);\n\twrite_XLWideString(XLSX.version, o);\n\twrite_XLWideString(\"7262\", o);\n\treturn o.length > o.l ? o.slice(0, o.l) : o;\n}\n\n/* [MS-XLSB] 2.4.301 BrtBookView */\nfunction write_BrtBookView(idx, o) {\n\tif(!o) o = new_buf(29);\n\to.write_shift(-4, 0);\n\to.write_shift(-4, 460);\n\to.write_shift(4, 28800);\n\to.write_shift(4, 17600);\n\to.write_shift(4, 500);\n\to.write_shift(4, idx);\n\to.write_shift(4, idx);\n\tvar flags = 0x78;\n\to.write_shift(1, flags);\n\treturn o.length > o.l ? o.slice(0, o.l) : o;\n}\n\nfunction write_BOOKVIEWS(ba, wb/*::, opts*/) {\n\t/* required if hidden tab appears before visible tab */\n\tif(!wb.Workbook || !wb.Workbook.Sheets) return;\n\tvar sheets = wb.Workbook.Sheets;\n\tvar i = 0, vistab = -1, hidden = -1;\n\tfor(; i < sheets.length; ++i) {\n\t\tif(!sheets[i] || !sheets[i].Hidden && vistab == -1) vistab = i;\n\t\telse if(sheets[i].Hidden == 1 && hidden == -1) hidden = i;\n\t}\n\tif(hidden > vistab) return;\n\twrite_record(ba, 0x0087 /* BrtBeginBookViews */);\n\twrite_record(ba, 0x009E /* BrtBookView */, write_BrtBookView(vistab));\n\t/* 1*(BrtBookView *FRT) */\n\twrite_record(ba, 0x0088 /* BrtEndBookViews */);\n}\n\n/* [MS-XLSB] 2.4.305 BrtCalcProp */\n/*function write_BrtCalcProp(data, o) {\n\tif(!o) o = new_buf(26);\n\to.write_shift(4,0); // force recalc\n\to.write_shift(4,1);\n\to.write_shift(4,0);\n\twrite_Xnum(0, o);\n\to.write_shift(-4, 1023);\n\to.write_shift(1, 0x33);\n\to.write_shift(1, 0x00);\n\treturn o;\n}*/\n\n/* [MS-XLSB] 2.4.646 BrtFileRecover */\n/*function write_BrtFileRecover(data, o) {\n\tif(!o) o = new_buf(1);\n\to.write_shift(1,0);\n\treturn o;\n}*/\n\n/* [MS-XLSB] 2.1.7.61 Workbook */\nfunction write_wb_bin(wb, opts) {\n\tvar ba = buf_array();\n\twrite_record(ba, 0x0083 /* BrtBeginBook */);\n\twrite_record(ba, 0x0080 /* BrtFileVersion */, write_BrtFileVersion());\n\t/* [[BrtFileSharingIso] BrtFileSharing] */\n\twrite_record(ba, 0x0099 /* BrtWbProp */, write_BrtWbProp(wb.Workbook && wb.Workbook.WBProps || null));\n\t/* [ACABSPATH] */\n\t/* [[BrtBookProtectionIso] BrtBookProtection] */\n\twrite_BOOKVIEWS(ba, wb, opts);\n\twrite_BUNDLESHS(ba, wb, opts);\n\t/* [FNGROUP] */\n\t/* [EXTERNALS] */\n\t/* *BrtName */\n\t/* write_record(ba, 0x009D BrtCalcProp, write_BrtCalcProp()); */\n\t/* [BrtOleSize] */\n\t/* *(BrtUserBookView *FRT) */\n\t/* [PIVOTCACHEIDS] */\n\t/* [BrtWbFactoid] */\n\t/* [SMARTTAGTYPES] */\n\t/* [BrtWebOpt] */\n\t/* write_record(ba, 0x009B BrtFileRecover, write_BrtFileRecover()); */\n\t/* [WEBPUBITEMS] */\n\t/* [CRERRS] */\n\t/* FRTWORKBOOK */\n\twrite_record(ba, 0x0084 /* BrtEndBook */);\n\n\treturn ba.end();\n}\nfunction parse_wb(data, name/*:string*/, opts)/*:WorkbookFile*/ {\n\tif(name.slice(-4)===\".bin\") return parse_wb_bin((data/*:any*/), opts);\n\treturn parse_wb_xml((data/*:any*/), opts);\n}\n\nfunction parse_ws(data, name/*:string*/, idx/*:number*/, opts, rels, wb, themes, styles)/*:Worksheet*/ {\n\tif(name.slice(-4)===\".bin\") return parse_ws_bin((data/*:any*/), opts, idx, rels, wb, themes, styles);\n\treturn parse_ws_xml((data/*:any*/), opts, idx, rels, wb, themes, styles);\n}\n\nfunction parse_cs(data, name/*:string*/, idx/*:number*/, opts, rels, wb, themes, styles)/*:Worksheet*/ {\n\tif(name.slice(-4)===\".bin\") return parse_cs_bin((data/*:any*/), opts, idx, rels, wb, themes, styles);\n\treturn parse_cs_xml((data/*:any*/), opts, idx, rels, wb, themes, styles);\n}\n\nfunction parse_ms(data, name/*:string*/, idx/*:number*/, opts, rels, wb, themes, styles)/*:Worksheet*/ {\n\tif(name.slice(-4)===\".bin\") return parse_ms_bin((data/*:any*/), opts, idx, rels, wb, themes, styles);\n\treturn parse_ms_xml((data/*:any*/), opts, idx, rels, wb, themes, styles);\n}\n\nfunction parse_ds(data, name/*:string*/, idx/*:number*/, opts, rels, wb, themes, styles)/*:Worksheet*/ {\n\tif(name.slice(-4)===\".bin\") return parse_ds_bin((data/*:any*/), opts, idx, rels, wb, themes, styles);\n\treturn parse_ds_xml((data/*:any*/), opts, idx, rels, wb, themes, styles);\n}\n\nfunction parse_sty(data, name/*:string*/, themes, opts) {\n\tif(name.slice(-4)===\".bin\") return parse_sty_bin((data/*:any*/), themes, opts);\n\treturn parse_sty_xml((data/*:any*/), themes, opts);\n}\n\nfunction parse_theme(data/*:string*/, name/*:string*/, opts) {\n\treturn parse_theme_xml(data, opts);\n}\n\nfunction parse_sst(data, name/*:string*/, opts)/*:SST*/ {\n\tif(name.slice(-4)===\".bin\") return parse_sst_bin((data/*:any*/), opts);\n\treturn parse_sst_xml((data/*:any*/), opts);\n}\n\nfunction parse_cmnt(data, name/*:string*/, opts)/*:Array*/ {\n\tif(name.slice(-4)===\".bin\") return parse_comments_bin((data/*:any*/), opts);\n\treturn parse_comments_xml((data/*:any*/), opts);\n}\n\nfunction parse_cc(data, name/*:string*/, opts) {\n\tif(name.slice(-4)===\".bin\") return parse_cc_bin((data/*:any*/), name, opts);\n\treturn parse_cc_xml((data/*:any*/), name, opts);\n}\n\nfunction parse_xlink(data, rel, name/*:string*/, opts) {\n\tif(name.slice(-4)===\".bin\") return parse_xlink_bin((data/*:any*/), rel, name, opts);\n\treturn parse_xlink_xml((data/*:any*/), rel, name, opts);\n}\n\nfunction parse_xlmeta(data, name/*:string*/, opts) {\n\tif(name.slice(-4)===\".bin\") return parse_xlmeta_bin((data/*:any*/), name, opts);\n\treturn parse_xlmeta_xml((data/*:any*/), name, opts);\n}\n\nfunction write_wb(wb, name/*:string*/, opts) {\n\treturn (name.slice(-4)===\".bin\" ? write_wb_bin : write_wb_xml)(wb, opts);\n}\n\nfunction write_ws(data/*:number*/, name/*:string*/, opts, wb/*:Workbook*/, rels) {\n\treturn (name.slice(-4)===\".bin\" ? write_ws_bin : write_ws_xml)(data, opts, wb, rels);\n}\n\n// eslint-disable-next-line no-unused-vars\nfunction write_cs(data/*:number*/, name/*:string*/, opts, wb/*:Workbook*/, rels) {\n\treturn (name.slice(-4)===\".bin\" ? write_cs_bin : write_cs_xml)(data, opts, wb, rels);\n}\n\nfunction write_sty(data, name/*:string*/, opts) {\n\treturn (name.slice(-4)===\".bin\" ? write_sty_bin : write_sty_xml)(data, opts);\n}\n\nfunction write_sst(data/*:SST*/, name/*:string*/, opts) {\n\treturn (name.slice(-4)===\".bin\" ? write_sst_bin : write_sst_xml)(data, opts);\n}\n\nfunction write_cmnt(data/*:Array*/, name/*:string*/, opts) {\n\treturn (name.slice(-4)===\".bin\" ? write_comments_bin : write_comments_xml)(data, opts);\n}\n/*\nfunction write_cc(data, name:string, opts) {\n\treturn (name.slice(-4)===\".bin\" ? write_cc_bin : write_cc_xml)(data, opts);\n}\n*/\n\nfunction write_xlmeta(name/*:string*/) {\n\treturn (name.slice(-4)===\".bin\" ? write_xlmeta_bin : write_xlmeta_xml)();\n}\nvar attregexg2=/([\\w:]+)=((?:\")([^\"]*)(?:\")|(?:')([^']*)(?:'))/g;\nvar attregex2=/([\\w:]+)=((?:\")(?:[^\"]*)(?:\")|(?:')(?:[^']*)(?:'))/;\nfunction xlml_parsexmltag(tag/*:string*/, skip_root/*:?boolean*/) {\n\tvar words = tag.split(/\\s+/);\n\tvar z/*:any*/ = ([]/*:any*/); if(!skip_root) z[0] = words[0];\n\tif(words.length === 1) return z;\n\tvar m = tag.match(attregexg2), y, j, w, i;\n\tif(m) for(i = 0; i != m.length; ++i) {\n\t\ty = m[i].match(attregex2);\n/*:: if(!y || !y[2]) continue; */\n\t\tif((j=y[1].indexOf(\":\")) === -1) z[y[1]] = y[2].slice(1,y[2].length-1);\n\t\telse {\n\t\t\tif(y[1].slice(0,6) === \"xmlns:\") w = \"xmlns\"+y[1].slice(6);\n\t\t\telse w = y[1].slice(j+1);\n\t\t\tz[w] = y[2].slice(1,y[2].length-1);\n\t\t}\n\t}\n\treturn z;\n}\nfunction xlml_parsexmltagobj(tag/*:string*/) {\n\tvar words = tag.split(/\\s+/);\n\tvar z = {};\n\tif(words.length === 1) return z;\n\tvar m = tag.match(attregexg2), y, j, w, i;\n\tif(m) for(i = 0; i != m.length; ++i) {\n\t\ty = m[i].match(attregex2);\n/*:: if(!y || !y[2]) continue; */\n\t\tif((j=y[1].indexOf(\":\")) === -1) z[y[1]] = y[2].slice(1,y[2].length-1);\n\t\telse {\n\t\t\tif(y[1].slice(0,6) === \"xmlns:\") w = \"xmlns\"+y[1].slice(6);\n\t\t\telse w = y[1].slice(j+1);\n\t\t\tz[w] = y[2].slice(1,y[2].length-1);\n\t\t}\n\t}\n\treturn z;\n}\n\n// ----\n\n/* map from xlml named formats to SSF TODO: localize */\nvar XLMLFormatMap/*: {[string]:string}*/;\n\nfunction xlml_format(format, value)/*:string*/ {\n\tvar fmt = XLMLFormatMap[format] || unescapexml(format);\n\tif(fmt === \"General\") return SSF_general(value);\n\treturn SSF_format(fmt, value);\n}\n\nfunction xlml_set_custprop(Custprops, key, cp, val/*:string*/) {\n\tvar oval/*:any*/ = val;\n\tswitch((cp[0].match(/dt:dt=\"([\\w.]+)\"/)||[\"\",\"\"])[1]) {\n\t\tcase \"boolean\": oval = parsexmlbool(val); break;\n\t\tcase \"i2\": case \"int\": oval = parseInt(val, 10); break;\n\t\tcase \"r4\": case \"float\": oval = parseFloat(val); break;\n\t\tcase \"date\": case \"dateTime.tz\": oval = parseDate(val); break;\n\t\tcase \"i8\": case \"string\": case \"fixed\": case \"uuid\": case \"bin.base64\": break;\n\t\tdefault: throw new Error(\"bad custprop:\" + cp[0]);\n\t}\n\tCustprops[unescapexml(key)] = oval;\n}\n\nfunction safe_format_xlml(cell/*:Cell*/, nf, o) {\n\tif(cell.t === 'z') return;\n\tif(!o || o.cellText !== false) try {\n\t\tif(cell.t === 'e') { cell.w = cell.w || BErr[cell.v]; }\n\t\telse if(nf === \"General\") {\n\t\t\tif(cell.t === 'n') {\n\t\t\t\tif((cell.v|0) === cell.v) cell.w = cell.v.toString(10);\n\t\t\t\telse cell.w = SSF_general_num(cell.v);\n\t\t\t}\n\t\t\telse cell.w = SSF_general(cell.v);\n\t\t}\n\t\telse cell.w = xlml_format(nf||\"General\", cell.v);\n\t} catch(e) { if(o.WTF) throw e; }\n\ttry {\n\t\tvar z = XLMLFormatMap[nf]||nf||\"General\";\n\t\tif(o.cellNF) cell.z = z;\n\t\tif(o.cellDates && cell.t == 'n' && fmt_is_date(z)) {\n\t\t\tvar _d = SSF_parse_date_code(cell.v); if(_d) { cell.t = 'd'; cell.v = new Date(_d.y, _d.m-1,_d.d,_d.H,_d.M,_d.S,_d.u); }\n\t\t}\n\t} catch(e) { if(o.WTF) throw e; }\n}\n\nfunction process_style_xlml(styles, stag, opts) {\n\tif(opts.cellStyles) {\n\t\tif(stag.Interior) {\n\t\t\tvar I = stag.Interior;\n\t\t\tif(I.Pattern) I.patternType = XLMLPatternTypeMap[I.Pattern] || I.Pattern;\n\t\t}\n\t}\n\tstyles[stag.ID] = stag;\n}\n\n/* TODO: there must exist some form of OSP-blessed spec */\nfunction parse_xlml_data(xml, ss, data, cell/*:any*/, base, styles, csty, row, arrayf, o) {\n\tvar nf = \"General\", sid = cell.StyleID, S = {}; o = o || {};\n\tvar interiors = [];\n\tvar i = 0;\n\tif(sid === undefined && row) sid = row.StyleID;\n\tif(sid === undefined && csty) sid = csty.StyleID;\n\twhile(styles[sid] !== undefined) {\n\t\tif(styles[sid].nf) nf = styles[sid].nf;\n\t\tif(styles[sid].Interior) interiors.push(styles[sid].Interior);\n\t\tif(!styles[sid].Parent) break;\n\t\tsid = styles[sid].Parent;\n\t}\n\tswitch(data.Type) {\n\t\tcase 'Boolean':\n\t\t\tcell.t = 'b';\n\t\t\tcell.v = parsexmlbool(xml);\n\t\t\tbreak;\n\t\tcase 'String':\n\t\t\tcell.t = 's'; cell.r = xlml_fixstr(unescapexml(xml));\n\t\t\tcell.v = (xml.indexOf(\"<\") > -1 ? unescapexml(ss||xml).replace(/<.*?>/g, \"\") : cell.r); // todo: BR etc\n\t\t\tbreak;\n\t\tcase 'DateTime':\n\t\t\tif(xml.slice(-1) != \"Z\") xml += \"Z\";\n\t\t\tcell.v = (parseDate(xml) - new Date(Date.UTC(1899, 11, 30))) / (24 * 60 * 60 * 1000);\n\t\t\tif(cell.v !== cell.v) cell.v = unescapexml(xml);\n\t\t\telse if(cell.v<60) cell.v = cell.v -1;\n\t\t\tif(!nf || nf == \"General\") nf = \"yyyy-mm-dd\";\n\t\t\t/* falls through */\n\t\tcase 'Number':\n\t\t\tif(cell.v === undefined) cell.v=+xml;\n\t\t\tif(!cell.t) cell.t = 'n';\n\t\t\tbreak;\n\t\tcase 'Error': cell.t = 'e'; cell.v = RBErr[xml]; if(o.cellText !== false) cell.w = xml; break;\n\t\tdefault:\n\t\t\tif(xml == \"\" && ss == \"\") { cell.t = 'z'; }\n\t\t\telse { cell.t = 's'; cell.v = xlml_fixstr(ss||xml); }\n\t\t\tbreak;\n\t}\n\tsafe_format_xlml(cell, nf, o);\n\tif(o.cellFormula !== false) {\n\t\tif(cell.Formula) {\n\t\t\tvar fstr = unescapexml(cell.Formula);\n\t\t\t/* strictly speaking, the leading = is required but some writers omit */\n\t\t\tif(fstr.charCodeAt(0) == 61 /* = */) fstr = fstr.slice(1);\n\t\t\tcell.f = rc_to_a1(fstr, base);\n\t\t\tdelete cell.Formula;\n\t\t\tif(cell.ArrayRange == \"RC\") cell.F = rc_to_a1(\"RC:RC\", base);\n\t\t\telse if(cell.ArrayRange) {\n\t\t\t\tcell.F = rc_to_a1(cell.ArrayRange, base);\n\t\t\t\tarrayf.push([safe_decode_range(cell.F), cell.F]);\n\t\t\t}\n\t\t} else {\n\t\t\tfor(i = 0; i < arrayf.length; ++i)\n\t\t\t\tif(base.r >= arrayf[i][0].s.r && base.r <= arrayf[i][0].e.r)\n\t\t\t\t\tif(base.c >= arrayf[i][0].s.c && base.c <= arrayf[i][0].e.c)\n\t\t\t\t\t\tcell.F = arrayf[i][1];\n\t\t}\n\t}\n\tif(o.cellStyles) {\n\t\tinteriors.forEach(function(x) {\n\t\t\tif(!S.patternType && x.patternType) S.patternType = x.patternType;\n\t\t});\n\t\tcell.s = S;\n\t}\n\tif(cell.StyleID !== undefined) cell.ixfe = cell.StyleID;\n}\n\nfunction xlml_clean_comment(comment/*:any*/) {\n\tcomment.t = comment.v || \"\";\n\tcomment.t = comment.t.replace(/\\r\\n/g,\"\\n\").replace(/\\r/g,\"\\n\");\n\tcomment.v = comment.w = comment.ixfe = undefined;\n}\n\n/* TODO: Everything */\nfunction parse_xlml_xml(d, _opts)/*:Workbook*/ {\n\tvar opts = _opts || {};\n\tmake_ssf();\n\tvar str = debom(xlml_normalize(d));\n\tif(opts.type == 'binary' || opts.type == 'array' || opts.type == 'base64') {\n\t\tif(typeof $cptable !== 'undefined') str = $cptable.utils.decode(65001, char_codes(str));\n\t\telse str = utf8read(str);\n\t}\n\tvar opening = str.slice(0, 1024).toLowerCase(), ishtml = false;\n\topening = opening.replace(/\".*?\"/g, \"\");\n\tif((opening.indexOf(\">\") & 1023) > Math.min((opening.indexOf(\",\") & 1023), (opening.indexOf(\";\")&1023))) { var _o = dup(opts); _o.type = \"string\"; return PRN.to_workbook(str, _o); }\n\tif(opening.indexOf(\"= 0) ishtml = true; });\n\tif(ishtml) return html_to_workbook(str, opts);\n\n\tXLMLFormatMap = ({\n\t\t\"General Number\": \"General\",\n\t\t\"General Date\": table_fmt[22],\n\t\t\"Long Date\": \"dddd, mmmm dd, yyyy\",\n\t\t\"Medium Date\": table_fmt[15],\n\t\t\"Short Date\": table_fmt[14],\n\t\t\"Long Time\": table_fmt[19],\n\t\t\"Medium Time\": table_fmt[18],\n\t\t\"Short Time\": table_fmt[20],\n\t\t\"Currency\": '\"$\"#,##0.00_);[Red]\\\\(\"$\"#,##0.00\\\\)',\n\t\t\"Fixed\": table_fmt[2],\n\t\t\"Standard\": table_fmt[4],\n\t\t\"Percent\": table_fmt[10],\n\t\t\"Scientific\": table_fmt[11],\n\t\t\"Yes/No\": '\"Yes\";\"Yes\";\"No\";@',\n\t\t\"True/False\": '\"True\";\"True\";\"False\";@',\n\t\t\"On/Off\": '\"Yes\";\"Yes\";\"No\";@'\n\t}/*:any*/);\n\n\n\tvar Rn;\n\tvar state = [], tmp;\n\tif(DENSE != null && opts.dense == null) opts.dense = DENSE;\n\tvar sheets = {}, sheetnames/*:Array*/ = [], cursheet/*:Worksheet*/ = (opts.dense ? [] : {}), sheetname = \"\";\n\tvar cell = ({}/*:any*/), row = {};// eslint-disable-line no-unused-vars\n\tvar dtag = xlml_parsexmltag(''), didx = 0;\n\tvar c = 0, r = 0;\n\tvar refguess/*:Range*/ = {s: {r:2000000, c:2000000}, e: {r:0, c:0} };\n\tvar styles = {}, stag = {};\n\tvar ss = \"\", fidx = 0;\n\tvar merges/*:Array*/ = [];\n\tvar Props = {}, Custprops = {}, pidx = 0, cp = [];\n\tvar comments/*:Array*/ = [], comment/*:Comment*/ = ({}/*:any*/);\n\tvar cstys = [], csty, seencol = false;\n\tvar arrayf/*:Array<[Range, string]>*/ = [];\n\tvar rowinfo/*:Array*/ = [], rowobj = {}, cc = 0, rr = 0;\n\tvar Workbook/*:WBWBProps*/ = ({ Sheets:[], WBProps:{date1904:false} }/*:any*/), wsprops = {};\n\txlmlregex.lastIndex = 0;\n\tstr = str.replace(//mg,\"\");\n\tvar raw_Rn3 = \"\";\n\twhile((Rn = xlmlregex.exec(str))) switch((Rn[3] = (raw_Rn3 = Rn[3]).toLowerCase())) {\n\t\tcase 'data' /*case 'Data'*/:\n\t\t\tif(raw_Rn3 == \"data\") {\n\t\t\t\tif(Rn[1]==='/'){if((tmp=state.pop())[0]!==Rn[3]) throw new Error(\"Bad state: \"+tmp.join(\"|\"));}\n\t\t\t\telse if(Rn[0].charAt(Rn[0].length-2) !== '/') state.push([Rn[3], true]);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif(state[state.length-1][1]) break;\n\t\t\tif(Rn[1]==='/') parse_xlml_data(str.slice(didx, Rn.index), ss, dtag, state[state.length-1][0]==/*\"Comment\"*/\"comment\"?comment:cell, {c:c,r:r}, styles, cstys[c], row, arrayf, opts);\n\t\t\telse { ss = \"\"; dtag = xlml_parsexmltag(Rn[0]); didx = Rn.index + Rn[0].length; }\n\t\t\tbreak;\n\t\tcase 'cell' /*case 'Cell'*/:\n\t\t\tif(Rn[1]==='/'){\n\t\t\t\tif(comments.length > 0) cell.c = comments;\n\t\t\t\tif((!opts.sheetRows || opts.sheetRows > r) && cell.v !== undefined) {\n\t\t\t\t\tif(opts.dense) {\n\t\t\t\t\t\tif(!cursheet[r]) cursheet[r] = [];\n\t\t\t\t\t\tcursheet[r][c] = cell;\n\t\t\t\t\t} else cursheet[encode_col(c) + encode_row(r)] = cell;\n\t\t\t\t}\n\t\t\t\tif(cell.HRef) {\n\t\t\t\t\tcell.l = ({Target:unescapexml(cell.HRef)}/*:any*/);\n\t\t\t\t\tif(cell.HRefScreenTip) cell.l.Tooltip = cell.HRefScreenTip;\n\t\t\t\t\tdelete cell.HRef; delete cell.HRefScreenTip;\n\t\t\t\t}\n\t\t\t\tif(cell.MergeAcross || cell.MergeDown) {\n\t\t\t\t\tcc = c + (parseInt(cell.MergeAcross,10)|0);\n\t\t\t\t\trr = r + (parseInt(cell.MergeDown,10)|0);\n\t\t\t\t\tmerges.push({s:{c:c,r:r},e:{c:cc,r:rr}});\n\t\t\t\t}\n\t\t\t\tif(!opts.sheetStubs) { if(cell.MergeAcross) c = cc + 1; else ++c; }\n\t\t\t\telse if(cell.MergeAcross || cell.MergeDown) {\n\t\t\t\t\t/*:: if(!cc) cc = 0; if(!rr) rr = 0; */\n\t\t\t\t\tfor(var cma = c; cma <= cc; ++cma) {\n\t\t\t\t\t\tfor(var cmd = r; cmd <= rr; ++cmd) {\n\t\t\t\t\t\t\tif(cma > c || cmd > r) {\n\t\t\t\t\t\t\t\tif(opts.dense) {\n\t\t\t\t\t\t\t\t\tif(!cursheet[cmd]) cursheet[cmd] = [];\n\t\t\t\t\t\t\t\t\tcursheet[cmd][cma] = {t:'z'};\n\t\t\t\t\t\t\t\t} else cursheet[encode_col(cma) + encode_row(cmd)] = {t:'z'};\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tc = cc + 1;\n\t\t\t\t}\n\t\t\t\telse ++c;\n\t\t\t} else {\n\t\t\t\tcell = xlml_parsexmltagobj(Rn[0]);\n\t\t\t\tif(cell.Index) c = +cell.Index - 1;\n\t\t\t\tif(c < refguess.s.c) refguess.s.c = c;\n\t\t\t\tif(c > refguess.e.c) refguess.e.c = c;\n\t\t\t\tif(Rn[0].slice(-2) === \"/>\") ++c;\n\t\t\t\tcomments = [];\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 'row' /*case 'Row'*/:\n\t\t\tif(Rn[1]==='/' || Rn[0].slice(-2) === \"/>\") {\n\t\t\t\tif(r < refguess.s.r) refguess.s.r = r;\n\t\t\t\tif(r > refguess.e.r) refguess.e.r = r;\n\t\t\t\tif(Rn[0].slice(-2) === \"/>\") {\n\t\t\t\t\trow = xlml_parsexmltag(Rn[0]);\n\t\t\t\t\tif(row.Index) r = +row.Index - 1;\n\t\t\t\t}\n\t\t\t\tc = 0; ++r;\n\t\t\t} else {\n\t\t\t\trow = xlml_parsexmltag(Rn[0]);\n\t\t\t\tif(row.Index) r = +row.Index - 1;\n\t\t\t\trowobj = {};\n\t\t\t\tif(row.AutoFitHeight == \"0\" || row.Height) {\n\t\t\t\t\trowobj.hpx = parseInt(row.Height, 10); rowobj.hpt = px2pt(rowobj.hpx);\n\t\t\t\t\trowinfo[r] = rowobj;\n\t\t\t\t}\n\t\t\t\tif(row.Hidden == \"1\") { rowobj.hidden = true; rowinfo[r] = rowobj; }\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 'worksheet' /*case 'Worksheet'*/: /* TODO: read range from FullRows/FullColumns */\n\t\t\tif(Rn[1]==='/'){\n\t\t\t\tif((tmp=state.pop())[0]!==Rn[3]) throw new Error(\"Bad state: \"+tmp.join(\"|\"));\n\t\t\t\tsheetnames.push(sheetname);\n\t\t\t\tif(refguess.s.r <= refguess.e.r && refguess.s.c <= refguess.e.c) {\n\t\t\t\t\tcursheet[\"!ref\"] = encode_range(refguess);\n\t\t\t\t\tif(opts.sheetRows && opts.sheetRows <= refguess.e.r) {\n\t\t\t\t\t\tcursheet[\"!fullref\"] = cursheet[\"!ref\"];\n\t\t\t\t\t\trefguess.e.r = opts.sheetRows - 1;\n\t\t\t\t\t\tcursheet[\"!ref\"] = encode_range(refguess);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(merges.length) cursheet[\"!merges\"] = merges;\n\t\t\t\tif(cstys.length > 0) cursheet[\"!cols\"] = cstys;\n\t\t\t\tif(rowinfo.length > 0) cursheet[\"!rows\"] = rowinfo;\n\t\t\t\tsheets[sheetname] = cursheet;\n\t\t\t} else {\n\t\t\t\trefguess = {s: {r:2000000, c:2000000}, e: {r:0, c:0} };\n\t\t\t\tr = c = 0;\n\t\t\t\tstate.push([Rn[3], false]);\n\t\t\t\ttmp = xlml_parsexmltag(Rn[0]);\n\t\t\t\tsheetname = unescapexml(tmp.Name);\n\t\t\t\tcursheet = (opts.dense ? [] : {});\n\t\t\t\tmerges = [];\n\t\t\t\tarrayf = [];\n\t\t\t\trowinfo = [];\n\t\t\t\twsprops = {name:sheetname, Hidden:0};\n\t\t\t\tWorkbook.Sheets.push(wsprops);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 'table' /*case 'Table'*/:\n\t\t\tif(Rn[1]==='/'){if((tmp=state.pop())[0]!==Rn[3]) throw new Error(\"Bad state: \"+tmp.join(\"|\"));}\n\t\t\telse if(Rn[0].slice(-2) == \"/>\") break;\n\t\t\telse {\n\t\t\t\tstate.push([Rn[3], false]);\n\t\t\t\tcstys = []; seencol = false;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase 'style' /*case 'Style'*/:\n\t\t\tif(Rn[1]==='/') process_style_xlml(styles, stag, opts);\n\t\t\telse stag = xlml_parsexmltag(Rn[0]);\n\t\t\tbreak;\n\n\t\tcase 'numberformat' /*case 'NumberFormat'*/:\n\t\t\tstag.nf = unescapexml(xlml_parsexmltag(Rn[0]).Format || \"General\");\n\t\t\tif(XLMLFormatMap[stag.nf]) stag.nf = XLMLFormatMap[stag.nf];\n\t\t\tfor(var ssfidx = 0; ssfidx != 0x188; ++ssfidx) if(table_fmt[ssfidx] == stag.nf) break;\n\t\t\tif(ssfidx == 0x188) for(ssfidx = 0x39; ssfidx != 0x188; ++ssfidx) if(table_fmt[ssfidx] == null) { SSF_load(stag.nf, ssfidx); break; }\n\t\t\tbreak;\n\n\t\tcase 'column' /*case 'Column'*/:\n\t\t\tif(state[state.length-1][0] !== /*'Table'*/'table') break;\n\t\t\tcsty = xlml_parsexmltag(Rn[0]);\n\t\t\tif(csty.Hidden) { csty.hidden = true; delete csty.Hidden; }\n\t\t\tif(csty.Width) csty.wpx = parseInt(csty.Width, 10);\n\t\t\tif(!seencol && csty.wpx > 10) {\n\t\t\t\tseencol = true; MDW = DEF_MDW; //find_mdw_wpx(csty.wpx);\n\t\t\t\tfor(var _col = 0; _col < cstys.length; ++_col) if(cstys[_col]) process_col(cstys[_col]);\n\t\t\t}\n\t\t\tif(seencol) process_col(csty);\n\t\t\tcstys[(csty.Index-1||cstys.length)] = csty;\n\t\t\tfor(var i = 0; i < +csty.Span; ++i) cstys[cstys.length] = dup(csty);\n\t\t\tbreak;\n\n\t\tcase 'namedrange' /*case 'NamedRange'*/:\n\t\t\tif(Rn[1]==='/') break;\n\t\t\tif(!Workbook.Names) Workbook.Names = [];\n\t\t\tvar _NamedRange = parsexmltag(Rn[0]);\n\t\t\tvar _DefinedName/*:DefinedName*/ = ({\n\t\t\t\tName: _NamedRange.Name,\n\t\t\t\tRef: rc_to_a1(_NamedRange.RefersTo.slice(1), {r:0, c:0})\n\t\t\t}/*:any*/);\n\t\t\tif(Workbook.Sheets.length>0) _DefinedName.Sheet=Workbook.Sheets.length-1;\n\t\t\t/*:: if(Workbook.Names) */Workbook.Names.push(_DefinedName);\n\t\t\tbreak;\n\n\t\tcase 'namedcell' /*case 'NamedCell'*/: break;\n\t\tcase 'b' /*case 'B'*/: break;\n\t\tcase 'i' /*case 'I'*/: break;\n\t\tcase 'u' /*case 'U'*/: break;\n\t\tcase 's' /*case 'S'*/: break;\n\t\tcase 'em' /*case 'EM'*/: break;\n\t\tcase 'h2' /*case 'H2'*/: break;\n\t\tcase 'h3' /*case 'H3'*/: break;\n\t\tcase 'sub' /*case 'Sub'*/: break;\n\t\tcase 'sup' /*case 'Sup'*/: break;\n\t\tcase 'span' /*case 'Span'*/: break;\n\t\tcase 'alignment' /*case 'Alignment'*/:\n\t\t\tbreak;\n\t\tcase 'borders' /*case 'Borders'*/: break;\n\t\tcase 'border' /*case 'Border'*/: break;\n\t\tcase 'font' /*case 'Font'*/:\n\t\t\tif(Rn[0].slice(-2) === \"/>\") break;\n\t\t\telse if(Rn[1]===\"/\") ss += str.slice(fidx, Rn.index);\n\t\t\telse fidx = Rn.index + Rn[0].length;\n\t\t\tbreak;\n\t\tcase 'interior' /*case 'Interior'*/:\n\t\t\tif(!opts.cellStyles) break;\n\t\t\tstag.Interior = xlml_parsexmltag(Rn[0]);\n\t\t\tbreak;\n\t\tcase 'protection' /*case 'Protection'*/: break;\n\n\t\tcase 'author' /*case 'Author'*/:\n\t\tcase 'title' /*case 'Title'*/:\n\t\tcase 'description' /*case 'Description'*/:\n\t\tcase 'created' /*case 'Created'*/:\n\t\tcase 'keywords' /*case 'Keywords'*/:\n\t\tcase 'subject' /*case 'Subject'*/:\n\t\tcase 'category' /*case 'Category'*/:\n\t\tcase 'company' /*case 'Company'*/:\n\t\tcase 'lastauthor' /*case 'LastAuthor'*/:\n\t\tcase 'lastsaved' /*case 'LastSaved'*/:\n\t\tcase 'lastprinted' /*case 'LastPrinted'*/:\n\t\tcase 'version' /*case 'Version'*/:\n\t\tcase 'revision' /*case 'Revision'*/:\n\t\tcase 'totaltime' /*case 'TotalTime'*/:\n\t\tcase 'hyperlinkbase' /*case 'HyperlinkBase'*/:\n\t\tcase 'manager' /*case 'Manager'*/:\n\t\tcase 'contentstatus' /*case 'ContentStatus'*/:\n\t\tcase 'identifier' /*case 'Identifier'*/:\n\t\tcase 'language' /*case 'Language'*/:\n\t\tcase 'appname' /*case 'AppName'*/:\n\t\t\tif(Rn[0].slice(-2) === \"/>\") break;\n\t\t\telse if(Rn[1]===\"/\") xlml_set_prop(Props, raw_Rn3, str.slice(pidx, Rn.index));\n\t\t\telse pidx = Rn.index + Rn[0].length;\n\t\t\tbreak;\n\t\tcase 'paragraphs' /*case 'Paragraphs'*/: break;\n\n\t\tcase 'styles' /*case 'Styles'*/:\n\t\tcase 'workbook' /*case 'Workbook'*/:\n\t\t\tif(Rn[1]==='/'){if((tmp=state.pop())[0]!==Rn[3]) throw new Error(\"Bad state: \"+tmp.join(\"|\"));}\n\t\t\telse state.push([Rn[3], false]);\n\t\t\tbreak;\n\n\t\tcase 'comment' /*case 'Comment'*/:\n\t\t\tif(Rn[1]==='/'){\n\t\t\t\tif((tmp=state.pop())[0]!==Rn[3]) throw new Error(\"Bad state: \"+tmp.join(\"|\"));\n\t\t\t\txlml_clean_comment(comment);\n\t\t\t\tcomments.push(comment);\n\t\t\t} else {\n\t\t\t\tstate.push([Rn[3], false]);\n\t\t\t\ttmp = xlml_parsexmltag(Rn[0]);\n\t\t\t\tcomment = ({a:tmp.Author}/*:any*/);\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase 'autofilter' /*case 'AutoFilter'*/:\n\t\t\tif(Rn[1]==='/'){if((tmp=state.pop())[0]!==Rn[3]) throw new Error(\"Bad state: \"+tmp.join(\"|\"));}\n\t\t\telse if(Rn[0].charAt(Rn[0].length-2) !== '/') {\n\t\t\t\tvar AutoFilter = xlml_parsexmltag(Rn[0]);\n\t\t\t\tcursheet['!autofilter'] = { ref:rc_to_a1(AutoFilter.Range).replace(/\\$/g,\"\") };\n\t\t\t\tstate.push([Rn[3], true]);\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase 'name' /*case 'Name'*/: break;\n\n\t\tcase 'datavalidation' /*case 'DataValidation'*/:\n\t\t\tif(Rn[1]==='/'){\n\t\t\t\tif((tmp=state.pop())[0]!==Rn[3]) throw new Error(\"Bad state: \"+tmp.join(\"|\"));\n\t\t\t} else {\n\t\t\t\tif(Rn[0].charAt(Rn[0].length-2) !== '/') state.push([Rn[3], true]);\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase 'pixelsperinch' /*case 'PixelsPerInch'*/:\n\t\t\tbreak;\n\t\tcase 'componentoptions' /*case 'ComponentOptions'*/:\n\t\tcase 'documentproperties' /*case 'DocumentProperties'*/:\n\t\tcase 'customdocumentproperties' /*case 'CustomDocumentProperties'*/:\n\t\tcase 'officedocumentsettings' /*case 'OfficeDocumentSettings'*/:\n\t\tcase 'pivottable' /*case 'PivotTable'*/:\n\t\tcase 'pivotcache' /*case 'PivotCache'*/:\n\t\tcase 'names' /*case 'Names'*/:\n\t\tcase 'mapinfo' /*case 'MapInfo'*/:\n\t\tcase 'pagebreaks' /*case 'PageBreaks'*/:\n\t\tcase 'querytable' /*case 'QueryTable'*/:\n\t\tcase 'sorting' /*case 'Sorting'*/:\n\t\tcase 'schema' /*case 'Schema'*/: //case 'data' /*case 'data'*/:\n\t\tcase 'conditionalformatting' /*case 'ConditionalFormatting'*/:\n\t\tcase 'smarttagtype' /*case 'SmartTagType'*/:\n\t\tcase 'smarttags' /*case 'SmartTags'*/:\n\t\tcase 'excelworkbook' /*case 'ExcelWorkbook'*/:\n\t\tcase 'workbookoptions' /*case 'WorkbookOptions'*/:\n\t\tcase 'worksheetoptions' /*case 'WorksheetOptions'*/:\n\t\t\tif(Rn[1]==='/'){if((tmp=state.pop())[0]!==Rn[3]) throw new Error(\"Bad state: \"+tmp.join(\"|\"));}\n\t\t\telse if(Rn[0].charAt(Rn[0].length-2) !== '/') state.push([Rn[3], true]);\n\t\t\tbreak;\n\n\t\tcase 'null' /*case 'Null'*/: break;\n\n\t\tdefault:\n\t\t\t/* FODS file root is */\n\t\t\tif(state.length == 0 && Rn[3] == \"document\") return parse_fods(str, opts);\n\t\t\t/* UOS file root is */\n\t\t\tif(state.length == 0 && Rn[3] == \"uof\"/*\"UOF\"*/) return parse_fods(str, opts);\n\n\t\t\tvar seen = true;\n\t\t\tswitch(state[state.length-1][0]) {\n\t\t\t\t/* OfficeDocumentSettings */\n\t\t\t\tcase 'officedocumentsettings' /*case 'OfficeDocumentSettings'*/: switch(Rn[3]) {\n\t\t\t\t\tcase 'allowpng' /*case 'AllowPNG'*/: break;\n\t\t\t\t\tcase 'removepersonalinformation' /*case 'RemovePersonalInformation'*/: break;\n\t\t\t\t\tcase 'downloadcomponents' /*case 'DownloadComponents'*/: break;\n\t\t\t\t\tcase 'locationofcomponents' /*case 'LocationOfComponents'*/: break;\n\t\t\t\t\tcase 'colors' /*case 'Colors'*/: break;\n\t\t\t\t\tcase 'color' /*case 'Color'*/: break;\n\t\t\t\t\tcase 'index' /*case 'Index'*/: break;\n\t\t\t\t\tcase 'rgb' /*case 'RGB'*/: break;\n\t\t\t\t\tcase 'targetscreensize' /*case 'TargetScreenSize'*/: break;\n\t\t\t\t\tcase 'readonlyrecommended' /*case 'ReadOnlyRecommended'*/: break;\n\t\t\t\t\tdefault: seen = false;\n\t\t\t\t} break;\n\n\t\t\t\t/* ComponentOptions */\n\t\t\t\tcase 'componentoptions' /*case 'ComponentOptions'*/: switch(Rn[3]) {\n\t\t\t\t\tcase 'toolbar' /*case 'Toolbar'*/: break;\n\t\t\t\t\tcase 'hideofficelogo' /*case 'HideOfficeLogo'*/: break;\n\t\t\t\t\tcase 'spreadsheetautofit' /*case 'SpreadsheetAutoFit'*/: break;\n\t\t\t\t\tcase 'label' /*case 'Label'*/: break;\n\t\t\t\t\tcase 'caption' /*case 'Caption'*/: break;\n\t\t\t\t\tcase 'maxheight' /*case 'MaxHeight'*/: break;\n\t\t\t\t\tcase 'maxwidth' /*case 'MaxWidth'*/: break;\n\t\t\t\t\tcase 'nextsheetnumber' /*case 'NextSheetNumber'*/: break;\n\t\t\t\t\tdefault: seen = false;\n\t\t\t\t} break;\n\n\t\t\t\t/* ExcelWorkbook */\n\t\t\t\tcase 'excelworkbook' /*case 'ExcelWorkbook'*/: switch(Rn[3]) {\n\t\t\t\t\tcase 'date1904' /*case 'Date1904'*/:\n\t\t\t\t\t\t/*:: if(!Workbook.WBProps) Workbook.WBProps = {}; */\n\t\t\t\t\t\tWorkbook.WBProps.date1904 = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'windowheight' /*case 'WindowHeight'*/: break;\n\t\t\t\t\tcase 'windowwidth' /*case 'WindowWidth'*/: break;\n\t\t\t\t\tcase 'windowtopx' /*case 'WindowTopX'*/: break;\n\t\t\t\t\tcase 'windowtopy' /*case 'WindowTopY'*/: break;\n\t\t\t\t\tcase 'tabratio' /*case 'TabRatio'*/: break;\n\t\t\t\t\tcase 'protectstructure' /*case 'ProtectStructure'*/: break;\n\t\t\t\t\tcase 'protectwindow' /*case 'ProtectWindow'*/: break;\n\t\t\t\t\tcase 'protectwindows' /*case 'ProtectWindows'*/: break;\n\t\t\t\t\tcase 'activesheet' /*case 'ActiveSheet'*/: break;\n\t\t\t\t\tcase 'displayinknotes' /*case 'DisplayInkNotes'*/: break;\n\t\t\t\t\tcase 'firstvisiblesheet' /*case 'FirstVisibleSheet'*/: break;\n\t\t\t\t\tcase 'supbook' /*case 'SupBook'*/: break;\n\t\t\t\t\tcase 'sheetname' /*case 'SheetName'*/: break;\n\t\t\t\t\tcase 'sheetindex' /*case 'SheetIndex'*/: break;\n\t\t\t\t\tcase 'sheetindexfirst' /*case 'SheetIndexFirst'*/: break;\n\t\t\t\t\tcase 'sheetindexlast' /*case 'SheetIndexLast'*/: break;\n\t\t\t\t\tcase 'dll' /*case 'Dll'*/: break;\n\t\t\t\t\tcase 'acceptlabelsinformulas' /*case 'AcceptLabelsInFormulas'*/: break;\n\t\t\t\t\tcase 'donotsavelinkvalues' /*case 'DoNotSaveLinkValues'*/: break;\n\t\t\t\t\tcase 'iteration' /*case 'Iteration'*/: break;\n\t\t\t\t\tcase 'maxiterations' /*case 'MaxIterations'*/: break;\n\t\t\t\t\tcase 'maxchange' /*case 'MaxChange'*/: break;\n\t\t\t\t\tcase 'path' /*case 'Path'*/: break;\n\t\t\t\t\tcase 'xct' /*case 'Xct'*/: break;\n\t\t\t\t\tcase 'count' /*case 'Count'*/: break;\n\t\t\t\t\tcase 'selectedsheets' /*case 'SelectedSheets'*/: break;\n\t\t\t\t\tcase 'calculation' /*case 'Calculation'*/: break;\n\t\t\t\t\tcase 'uncalced' /*case 'Uncalced'*/: break;\n\t\t\t\t\tcase 'startupprompt' /*case 'StartupPrompt'*/: break;\n\t\t\t\t\tcase 'crn' /*case 'Crn'*/: break;\n\t\t\t\t\tcase 'externname' /*case 'ExternName'*/: break;\n\t\t\t\t\tcase 'formula' /*case 'Formula'*/: break;\n\t\t\t\t\tcase 'colfirst' /*case 'ColFirst'*/: break;\n\t\t\t\t\tcase 'collast' /*case 'ColLast'*/: break;\n\t\t\t\t\tcase 'wantadvise' /*case 'WantAdvise'*/: break;\n\t\t\t\t\tcase 'boolean' /*case 'Boolean'*/: break;\n\t\t\t\t\tcase 'error' /*case 'Error'*/: break;\n\t\t\t\t\tcase 'text' /*case 'Text'*/: break;\n\t\t\t\t\tcase 'ole' /*case 'OLE'*/: break;\n\t\t\t\t\tcase 'noautorecover' /*case 'NoAutoRecover'*/: break;\n\t\t\t\t\tcase 'publishobjects' /*case 'PublishObjects'*/: break;\n\t\t\t\t\tcase 'donotcalculatebeforesave' /*case 'DoNotCalculateBeforeSave'*/: break;\n\t\t\t\t\tcase 'number' /*case 'Number'*/: break;\n\t\t\t\t\tcase 'refmoder1c1' /*case 'RefModeR1C1'*/: break;\n\t\t\t\t\tcase 'embedsavesmarttags' /*case 'EmbedSaveSmartTags'*/: break;\n\t\t\t\t\tdefault: seen = false;\n\t\t\t\t} break;\n\n\t\t\t\t/* WorkbookOptions */\n\t\t\t\tcase 'workbookoptions' /*case 'WorkbookOptions'*/: switch(Rn[3]) {\n\t\t\t\t\tcase 'owcversion' /*case 'OWCVersion'*/: break;\n\t\t\t\t\tcase 'height' /*case 'Height'*/: break;\n\t\t\t\t\tcase 'width' /*case 'Width'*/: break;\n\t\t\t\t\tdefault: seen = false;\n\t\t\t\t} break;\n\n\t\t\t\t/* WorksheetOptions */\n\t\t\t\tcase 'worksheetoptions' /*case 'WorksheetOptions'*/: switch(Rn[3]) {\n\t\t\t\t\tcase 'visible' /*case 'Visible'*/:\n\t\t\t\t\t\tif(Rn[0].slice(-2) === \"/>\"){/* empty */}\n\t\t\t\t\t\telse if(Rn[1]===\"/\") switch(str.slice(pidx, Rn.index)) {\n\t\t\t\t\t\t\tcase \"SheetHidden\": wsprops.Hidden = 1; break;\n\t\t\t\t\t\t\tcase \"SheetVeryHidden\": wsprops.Hidden = 2; break;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse pidx = Rn.index + Rn[0].length;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'header' /*case 'Header'*/:\n\t\t\t\t\t\tif(!cursheet['!margins']) default_margins(cursheet['!margins']={}, 'xlml');\n\t\t\t\t\t\tif(!isNaN(+parsexmltag(Rn[0]).Margin)) cursheet['!margins'].header = +parsexmltag(Rn[0]).Margin;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'footer' /*case 'Footer'*/:\n\t\t\t\t\t\tif(!cursheet['!margins']) default_margins(cursheet['!margins']={}, 'xlml');\n\t\t\t\t\t\tif(!isNaN(+parsexmltag(Rn[0]).Margin)) cursheet['!margins'].footer = +parsexmltag(Rn[0]).Margin;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'pagemargins' /*case 'PageMargins'*/:\n\t\t\t\t\t\tvar pagemargins = parsexmltag(Rn[0]);\n\t\t\t\t\t\tif(!cursheet['!margins']) default_margins(cursheet['!margins']={},'xlml');\n\t\t\t\t\t\tif(!isNaN(+pagemargins.Top)) cursheet['!margins'].top = +pagemargins.Top;\n\t\t\t\t\t\tif(!isNaN(+pagemargins.Left)) cursheet['!margins'].left = +pagemargins.Left;\n\t\t\t\t\t\tif(!isNaN(+pagemargins.Right)) cursheet['!margins'].right = +pagemargins.Right;\n\t\t\t\t\t\tif(!isNaN(+pagemargins.Bottom)) cursheet['!margins'].bottom = +pagemargins.Bottom;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'displayrighttoleft' /*case 'DisplayRightToLeft'*/:\n\t\t\t\t\t\tif(!Workbook.Views) Workbook.Views = [];\n\t\t\t\t\t\tif(!Workbook.Views[0]) Workbook.Views[0] = {};\n\t\t\t\t\t\tWorkbook.Views[0].RTL = true;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'freezepanes' /*case 'FreezePanes'*/: break;\n\t\t\t\t\tcase 'frozennosplit' /*case 'FrozenNoSplit'*/: break;\n\n\t\t\t\t\tcase 'splithorizontal' /*case 'SplitHorizontal'*/:\n\t\t\t\t\tcase 'splitvertical' /*case 'SplitVertical'*/:\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'donotdisplaygridlines' /*case 'DoNotDisplayGridlines'*/:\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'activerow' /*case 'ActiveRow'*/: break;\n\t\t\t\t\tcase 'activecol' /*case 'ActiveCol'*/: break;\n\t\t\t\t\tcase 'toprowbottompane' /*case 'TopRowBottomPane'*/: break;\n\t\t\t\t\tcase 'leftcolumnrightpane' /*case 'LeftColumnRightPane'*/: break;\n\n\t\t\t\t\tcase 'unsynced' /*case 'Unsynced'*/: break;\n\t\t\t\t\tcase 'print' /*case 'Print'*/: break;\n\t\t\t\t\tcase 'printerrors' /*case 'PrintErrors'*/: break;\n\t\t\t\t\tcase 'panes' /*case 'Panes'*/: break;\n\t\t\t\t\tcase 'scale' /*case 'Scale'*/: break;\n\t\t\t\t\tcase 'pane' /*case 'Pane'*/: break;\n\t\t\t\t\tcase 'number' /*case 'Number'*/: break;\n\t\t\t\t\tcase 'layout' /*case 'Layout'*/: break;\n\t\t\t\t\tcase 'pagesetup' /*case 'PageSetup'*/: break;\n\t\t\t\t\tcase 'selected' /*case 'Selected'*/: break;\n\t\t\t\t\tcase 'protectobjects' /*case 'ProtectObjects'*/: break;\n\t\t\t\t\tcase 'enableselection' /*case 'EnableSelection'*/: break;\n\t\t\t\t\tcase 'protectscenarios' /*case 'ProtectScenarios'*/: break;\n\t\t\t\t\tcase 'validprinterinfo' /*case 'ValidPrinterInfo'*/: break;\n\t\t\t\t\tcase 'horizontalresolution' /*case 'HorizontalResolution'*/: break;\n\t\t\t\t\tcase 'verticalresolution' /*case 'VerticalResolution'*/: break;\n\t\t\t\t\tcase 'numberofcopies' /*case 'NumberofCopies'*/: break;\n\t\t\t\t\tcase 'activepane' /*case 'ActivePane'*/: break;\n\t\t\t\t\tcase 'toprowvisible' /*case 'TopRowVisible'*/: break;\n\t\t\t\t\tcase 'leftcolumnvisible' /*case 'LeftColumnVisible'*/: break;\n\t\t\t\t\tcase 'fittopage' /*case 'FitToPage'*/: break;\n\t\t\t\t\tcase 'rangeselection' /*case 'RangeSelection'*/: break;\n\t\t\t\t\tcase 'papersizeindex' /*case 'PaperSizeIndex'*/: break;\n\t\t\t\t\tcase 'pagelayoutzoom' /*case 'PageLayoutZoom'*/: break;\n\t\t\t\t\tcase 'pagebreakzoom' /*case 'PageBreakZoom'*/: break;\n\t\t\t\t\tcase 'filteron' /*case 'FilterOn'*/: break;\n\t\t\t\t\tcase 'fitwidth' /*case 'FitWidth'*/: break;\n\t\t\t\t\tcase 'fitheight' /*case 'FitHeight'*/: break;\n\t\t\t\t\tcase 'commentslayout' /*case 'CommentsLayout'*/: break;\n\t\t\t\t\tcase 'zoom' /*case 'Zoom'*/: break;\n\t\t\t\t\tcase 'lefttoright' /*case 'LeftToRight'*/: break;\n\t\t\t\t\tcase 'gridlines' /*case 'Gridlines'*/: break;\n\t\t\t\t\tcase 'allowsort' /*case 'AllowSort'*/: break;\n\t\t\t\t\tcase 'allowfilter' /*case 'AllowFilter'*/: break;\n\t\t\t\t\tcase 'allowinsertrows' /*case 'AllowInsertRows'*/: break;\n\t\t\t\t\tcase 'allowdeleterows' /*case 'AllowDeleteRows'*/: break;\n\t\t\t\t\tcase 'allowinsertcols' /*case 'AllowInsertCols'*/: break;\n\t\t\t\t\tcase 'allowdeletecols' /*case 'AllowDeleteCols'*/: break;\n\t\t\t\t\tcase 'allowinserthyperlinks' /*case 'AllowInsertHyperlinks'*/: break;\n\t\t\t\t\tcase 'allowformatcells' /*case 'AllowFormatCells'*/: break;\n\t\t\t\t\tcase 'allowsizecols' /*case 'AllowSizeCols'*/: break;\n\t\t\t\t\tcase 'allowsizerows' /*case 'AllowSizeRows'*/: break;\n\t\t\t\t\tcase 'nosummaryrowsbelowdetail' /*case 'NoSummaryRowsBelowDetail'*/:\n\t\t\t\t\t\tif(!cursheet[\"!outline\"]) cursheet[\"!outline\"] = {};\n\t\t\t\t\t\tcursheet[\"!outline\"].above = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'tabcolorindex' /*case 'TabColorIndex'*/: break;\n\t\t\t\t\tcase 'donotdisplayheadings' /*case 'DoNotDisplayHeadings'*/: break;\n\t\t\t\t\tcase 'showpagelayoutzoom' /*case 'ShowPageLayoutZoom'*/: break;\n\t\t\t\t\tcase 'nosummarycolumnsrightdetail' /*case 'NoSummaryColumnsRightDetail'*/:\n\t\t\t\t\t\tif(!cursheet[\"!outline\"]) cursheet[\"!outline\"] = {};\n\t\t\t\t\t\tcursheet[\"!outline\"].left = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'blackandwhite' /*case 'BlackAndWhite'*/: break;\n\t\t\t\t\tcase 'donotdisplayzeros' /*case 'DoNotDisplayZeros'*/: break;\n\t\t\t\t\tcase 'displaypagebreak' /*case 'DisplayPageBreak'*/: break;\n\t\t\t\t\tcase 'rowcolheadings' /*case 'RowColHeadings'*/: break;\n\t\t\t\t\tcase 'donotdisplayoutline' /*case 'DoNotDisplayOutline'*/: break;\n\t\t\t\t\tcase 'noorientation' /*case 'NoOrientation'*/: break;\n\t\t\t\t\tcase 'allowusepivottables' /*case 'AllowUsePivotTables'*/: break;\n\t\t\t\t\tcase 'zeroheight' /*case 'ZeroHeight'*/: break;\n\t\t\t\t\tcase 'viewablerange' /*case 'ViewableRange'*/: break;\n\t\t\t\t\tcase 'selection' /*case 'Selection'*/: break;\n\t\t\t\t\tcase 'protectcontents' /*case 'ProtectContents'*/: break;\n\t\t\t\t\tdefault: seen = false;\n\t\t\t\t} break;\n\n\t\t\t\t/* PivotTable */\n\t\t\t\tcase 'pivottable' /*case 'PivotTable'*/: case 'pivotcache' /*case 'PivotCache'*/: switch(Rn[3]) {\n\t\t\t\t\tcase 'immediateitemsondrop' /*case 'ImmediateItemsOnDrop'*/: break;\n\t\t\t\t\tcase 'showpagemultipleitemlabel' /*case 'ShowPageMultipleItemLabel'*/: break;\n\t\t\t\t\tcase 'compactrowindent' /*case 'CompactRowIndent'*/: break;\n\t\t\t\t\tcase 'location' /*case 'Location'*/: break;\n\t\t\t\t\tcase 'pivotfield' /*case 'PivotField'*/: break;\n\t\t\t\t\tcase 'orientation' /*case 'Orientation'*/: break;\n\t\t\t\t\tcase 'layoutform' /*case 'LayoutForm'*/: break;\n\t\t\t\t\tcase 'layoutsubtotallocation' /*case 'LayoutSubtotalLocation'*/: break;\n\t\t\t\t\tcase 'layoutcompactrow' /*case 'LayoutCompactRow'*/: break;\n\t\t\t\t\tcase 'position' /*case 'Position'*/: break;\n\t\t\t\t\tcase 'pivotitem' /*case 'PivotItem'*/: break;\n\t\t\t\t\tcase 'datatype' /*case 'DataType'*/: break;\n\t\t\t\t\tcase 'datafield' /*case 'DataField'*/: break;\n\t\t\t\t\tcase 'sourcename' /*case 'SourceName'*/: break;\n\t\t\t\t\tcase 'parentfield' /*case 'ParentField'*/: break;\n\t\t\t\t\tcase 'ptlineitems' /*case 'PTLineItems'*/: break;\n\t\t\t\t\tcase 'ptlineitem' /*case 'PTLineItem'*/: break;\n\t\t\t\t\tcase 'countofsameitems' /*case 'CountOfSameItems'*/: break;\n\t\t\t\t\tcase 'item' /*case 'Item'*/: break;\n\t\t\t\t\tcase 'itemtype' /*case 'ItemType'*/: break;\n\t\t\t\t\tcase 'ptsource' /*case 'PTSource'*/: break;\n\t\t\t\t\tcase 'cacheindex' /*case 'CacheIndex'*/: break;\n\t\t\t\t\tcase 'consolidationreference' /*case 'ConsolidationReference'*/: break;\n\t\t\t\t\tcase 'filename' /*case 'FileName'*/: break;\n\t\t\t\t\tcase 'reference' /*case 'Reference'*/: break;\n\t\t\t\t\tcase 'nocolumngrand' /*case 'NoColumnGrand'*/: break;\n\t\t\t\t\tcase 'norowgrand' /*case 'NoRowGrand'*/: break;\n\t\t\t\t\tcase 'blanklineafteritems' /*case 'BlankLineAfterItems'*/: break;\n\t\t\t\t\tcase 'hidden' /*case 'Hidden'*/: break;\n\t\t\t\t\tcase 'subtotal' /*case 'Subtotal'*/: break;\n\t\t\t\t\tcase 'basefield' /*case 'BaseField'*/: break;\n\t\t\t\t\tcase 'mapchilditems' /*case 'MapChildItems'*/: break;\n\t\t\t\t\tcase 'function' /*case 'Function'*/: break;\n\t\t\t\t\tcase 'refreshonfileopen' /*case 'RefreshOnFileOpen'*/: break;\n\t\t\t\t\tcase 'printsettitles' /*case 'PrintSetTitles'*/: break;\n\t\t\t\t\tcase 'mergelabels' /*case 'MergeLabels'*/: break;\n\t\t\t\t\tcase 'defaultversion' /*case 'DefaultVersion'*/: break;\n\t\t\t\t\tcase 'refreshname' /*case 'RefreshName'*/: break;\n\t\t\t\t\tcase 'refreshdate' /*case 'RefreshDate'*/: break;\n\t\t\t\t\tcase 'refreshdatecopy' /*case 'RefreshDateCopy'*/: break;\n\t\t\t\t\tcase 'versionlastrefresh' /*case 'VersionLastRefresh'*/: break;\n\t\t\t\t\tcase 'versionlastupdate' /*case 'VersionLastUpdate'*/: break;\n\t\t\t\t\tcase 'versionupdateablemin' /*case 'VersionUpdateableMin'*/: break;\n\t\t\t\t\tcase 'versionrefreshablemin' /*case 'VersionRefreshableMin'*/: break;\n\t\t\t\t\tcase 'calculation' /*case 'Calculation'*/: break;\n\t\t\t\t\tdefault: seen = false;\n\t\t\t\t} break;\n\n\t\t\t\t/* PageBreaks */\n\t\t\t\tcase 'pagebreaks' /*case 'PageBreaks'*/: switch(Rn[3]) {\n\t\t\t\t\tcase 'colbreaks' /*case 'ColBreaks'*/: break;\n\t\t\t\t\tcase 'colbreak' /*case 'ColBreak'*/: break;\n\t\t\t\t\tcase 'rowbreaks' /*case 'RowBreaks'*/: break;\n\t\t\t\t\tcase 'rowbreak' /*case 'RowBreak'*/: break;\n\t\t\t\t\tcase 'colstart' /*case 'ColStart'*/: break;\n\t\t\t\t\tcase 'colend' /*case 'ColEnd'*/: break;\n\t\t\t\t\tcase 'rowend' /*case 'RowEnd'*/: break;\n\t\t\t\t\tdefault: seen = false;\n\t\t\t\t} break;\n\n\t\t\t\t/* AutoFilter */\n\t\t\t\tcase 'autofilter' /*case 'AutoFilter'*/: switch(Rn[3]) {\n\t\t\t\t\tcase 'autofiltercolumn' /*case 'AutoFilterColumn'*/: break;\n\t\t\t\t\tcase 'autofiltercondition' /*case 'AutoFilterCondition'*/: break;\n\t\t\t\t\tcase 'autofilterand' /*case 'AutoFilterAnd'*/: break;\n\t\t\t\t\tcase 'autofilteror' /*case 'AutoFilterOr'*/: break;\n\t\t\t\t\tdefault: seen = false;\n\t\t\t\t} break;\n\n\t\t\t\t/* QueryTable */\n\t\t\t\tcase 'querytable' /*case 'QueryTable'*/: switch(Rn[3]) {\n\t\t\t\t\tcase 'id' /*case 'Id'*/: break;\n\t\t\t\t\tcase 'autoformatfont' /*case 'AutoFormatFont'*/: break;\n\t\t\t\t\tcase 'autoformatpattern' /*case 'AutoFormatPattern'*/: break;\n\t\t\t\t\tcase 'querysource' /*case 'QuerySource'*/: break;\n\t\t\t\t\tcase 'querytype' /*case 'QueryType'*/: break;\n\t\t\t\t\tcase 'enableredirections' /*case 'EnableRedirections'*/: break;\n\t\t\t\t\tcase 'refreshedinxl9' /*case 'RefreshedInXl9'*/: break;\n\t\t\t\t\tcase 'urlstring' /*case 'URLString'*/: break;\n\t\t\t\t\tcase 'htmltables' /*case 'HTMLTables'*/: break;\n\t\t\t\t\tcase 'connection' /*case 'Connection'*/: break;\n\t\t\t\t\tcase 'commandtext' /*case 'CommandText'*/: break;\n\t\t\t\t\tcase 'refreshinfo' /*case 'RefreshInfo'*/: break;\n\t\t\t\t\tcase 'notitles' /*case 'NoTitles'*/: break;\n\t\t\t\t\tcase 'nextid' /*case 'NextId'*/: break;\n\t\t\t\t\tcase 'columninfo' /*case 'ColumnInfo'*/: break;\n\t\t\t\t\tcase 'overwritecells' /*case 'OverwriteCells'*/: break;\n\t\t\t\t\tcase 'donotpromptforfile' /*case 'DoNotPromptForFile'*/: break;\n\t\t\t\t\tcase 'textwizardsettings' /*case 'TextWizardSettings'*/: break;\n\t\t\t\t\tcase 'source' /*case 'Source'*/: break;\n\t\t\t\t\tcase 'number' /*case 'Number'*/: break;\n\t\t\t\t\tcase 'decimal' /*case 'Decimal'*/: break;\n\t\t\t\t\tcase 'thousandseparator' /*case 'ThousandSeparator'*/: break;\n\t\t\t\t\tcase 'trailingminusnumbers' /*case 'TrailingMinusNumbers'*/: break;\n\t\t\t\t\tcase 'formatsettings' /*case 'FormatSettings'*/: break;\n\t\t\t\t\tcase 'fieldtype' /*case 'FieldType'*/: break;\n\t\t\t\t\tcase 'delimiters' /*case 'Delimiters'*/: break;\n\t\t\t\t\tcase 'tab' /*case 'Tab'*/: break;\n\t\t\t\t\tcase 'comma' /*case 'Comma'*/: break;\n\t\t\t\t\tcase 'autoformatname' /*case 'AutoFormatName'*/: break;\n\t\t\t\t\tcase 'versionlastedit' /*case 'VersionLastEdit'*/: break;\n\t\t\t\t\tcase 'versionlastrefresh' /*case 'VersionLastRefresh'*/: break;\n\t\t\t\t\tdefault: seen = false;\n\t\t\t\t} break;\n\n\t\t\t\tcase 'datavalidation' /*case 'DataValidation'*/:\n\t\t\t\tswitch(Rn[3]) {\n\t\t\t\t\tcase 'range' /*case 'Range'*/: break;\n\n\t\t\t\t\tcase 'type' /*case 'Type'*/: break;\n\t\t\t\t\tcase 'min' /*case 'Min'*/: break;\n\t\t\t\t\tcase 'max' /*case 'Max'*/: break;\n\t\t\t\t\tcase 'sort' /*case 'Sort'*/: break;\n\t\t\t\t\tcase 'descending' /*case 'Descending'*/: break;\n\t\t\t\t\tcase 'order' /*case 'Order'*/: break;\n\t\t\t\t\tcase 'casesensitive' /*case 'CaseSensitive'*/: break;\n\t\t\t\t\tcase 'value' /*case 'Value'*/: break;\n\t\t\t\t\tcase 'errorstyle' /*case 'ErrorStyle'*/: break;\n\t\t\t\t\tcase 'errormessage' /*case 'ErrorMessage'*/: break;\n\t\t\t\t\tcase 'errortitle' /*case 'ErrorTitle'*/: break;\n\t\t\t\t\tcase 'inputmessage' /*case 'InputMessage'*/: break;\n\t\t\t\t\tcase 'inputtitle' /*case 'InputTitle'*/: break;\n\t\t\t\t\tcase 'combohide' /*case 'ComboHide'*/: break;\n\t\t\t\t\tcase 'inputhide' /*case 'InputHide'*/: break;\n\t\t\t\t\tcase 'condition' /*case 'Condition'*/: break;\n\t\t\t\t\tcase 'qualifier' /*case 'Qualifier'*/: break;\n\t\t\t\t\tcase 'useblank' /*case 'UseBlank'*/: break;\n\t\t\t\t\tcase 'value1' /*case 'Value1'*/: break;\n\t\t\t\t\tcase 'value2' /*case 'Value2'*/: break;\n\t\t\t\t\tcase 'format' /*case 'Format'*/: break;\n\n\t\t\t\t\tcase 'cellrangelist' /*case 'CellRangeList'*/: break;\n\t\t\t\t\tdefault: seen = false;\n\t\t\t\t} break;\n\n\t\t\t\tcase 'sorting' /*case 'Sorting'*/:\n\t\t\t\tcase 'conditionalformatting' /*case 'ConditionalFormatting'*/:\n\t\t\t\tswitch(Rn[3]) {\n\t\t\t\t\tcase 'range' /*case 'Range'*/: break;\n\t\t\t\t\tcase 'type' /*case 'Type'*/: break;\n\t\t\t\t\tcase 'min' /*case 'Min'*/: break;\n\t\t\t\t\tcase 'max' /*case 'Max'*/: break;\n\t\t\t\t\tcase 'sort' /*case 'Sort'*/: break;\n\t\t\t\t\tcase 'descending' /*case 'Descending'*/: break;\n\t\t\t\t\tcase 'order' /*case 'Order'*/: break;\n\t\t\t\t\tcase 'casesensitive' /*case 'CaseSensitive'*/: break;\n\t\t\t\t\tcase 'value' /*case 'Value'*/: break;\n\t\t\t\t\tcase 'errorstyle' /*case 'ErrorStyle'*/: break;\n\t\t\t\t\tcase 'errormessage' /*case 'ErrorMessage'*/: break;\n\t\t\t\t\tcase 'errortitle' /*case 'ErrorTitle'*/: break;\n\t\t\t\t\tcase 'cellrangelist' /*case 'CellRangeList'*/: break;\n\t\t\t\t\tcase 'inputmessage' /*case 'InputMessage'*/: break;\n\t\t\t\t\tcase 'inputtitle' /*case 'InputTitle'*/: break;\n\t\t\t\t\tcase 'combohide' /*case 'ComboHide'*/: break;\n\t\t\t\t\tcase 'inputhide' /*case 'InputHide'*/: break;\n\t\t\t\t\tcase 'condition' /*case 'Condition'*/: break;\n\t\t\t\t\tcase 'qualifier' /*case 'Qualifier'*/: break;\n\t\t\t\t\tcase 'useblank' /*case 'UseBlank'*/: break;\n\t\t\t\t\tcase 'value1' /*case 'Value1'*/: break;\n\t\t\t\t\tcase 'value2' /*case 'Value2'*/: break;\n\t\t\t\t\tcase 'format' /*case 'Format'*/: break;\n\t\t\t\t\tdefault: seen = false;\n\t\t\t\t} break;\n\n\t\t\t\t/* MapInfo (schema) */\n\t\t\t\tcase 'mapinfo' /*case 'MapInfo'*/: case 'schema' /*case 'Schema'*/: case 'data' /*case 'data'*/: switch(Rn[3]) {\n\t\t\t\t\tcase 'map' /*case 'Map'*/: break;\n\t\t\t\t\tcase 'entry' /*case 'Entry'*/: break;\n\t\t\t\t\tcase 'range' /*case 'Range'*/: break;\n\t\t\t\t\tcase 'xpath' /*case 'XPath'*/: break;\n\t\t\t\t\tcase 'field' /*case 'Field'*/: break;\n\t\t\t\t\tcase 'xsdtype' /*case 'XSDType'*/: break;\n\t\t\t\t\tcase 'filteron' /*case 'FilterOn'*/: break;\n\t\t\t\t\tcase 'aggregate' /*case 'Aggregate'*/: break;\n\t\t\t\t\tcase 'elementtype' /*case 'ElementType'*/: break;\n\t\t\t\t\tcase 'attributetype' /*case 'AttributeType'*/: break;\n\t\t\t\t/* These are from xsd (XML Schema Definition) */\n\t\t\t\t\tcase 'schema' /*case 'schema'*/:\n\t\t\t\t\tcase 'element' /*case 'element'*/:\n\t\t\t\t\tcase 'complextype' /*case 'complexType'*/:\n\t\t\t\t\tcase 'datatype' /*case 'datatype'*/:\n\t\t\t\t\tcase 'all' /*case 'all'*/:\n\t\t\t\t\tcase 'attribute' /*case 'attribute'*/:\n\t\t\t\t\tcase 'extends' /*case 'extends'*/: break;\n\n\t\t\t\t\tcase 'row' /*case 'row'*/: break;\n\t\t\t\t\tdefault: seen = false;\n\t\t\t\t} break;\n\n\t\t\t\t/* SmartTags (can be anything) */\n\t\t\t\tcase 'smarttags' /*case 'SmartTags'*/: break;\n\n\t\t\t\tdefault: seen = false; break;\n\t\t\t}\n\t\t\tif(seen) break;\n\t\t\t/* CustomDocumentProperties */\n\t\t\tif(Rn[3].match(/!\\[CDATA/)) break;\n\t\t\tif(!state[state.length-1][1]) throw 'Unrecognized tag: ' + Rn[3] + \"|\" + state.join(\"|\");\n\t\t\tif(state[state.length-1][0]===/*'CustomDocumentProperties'*/'customdocumentproperties') {\n\t\t\t\tif(Rn[0].slice(-2) === \"/>\") break;\n\t\t\t\telse if(Rn[1]===\"/\") xlml_set_custprop(Custprops, raw_Rn3, cp, str.slice(pidx, Rn.index));\n\t\t\t\telse { cp = Rn; pidx = Rn.index + Rn[0].length; }\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif(opts.WTF) throw 'Unrecognized tag: ' + Rn[3] + \"|\" + state.join(\"|\");\n\t}\n\tvar out = ({}/*:any*/);\n\tif(!opts.bookSheets && !opts.bookProps) out.Sheets = sheets;\n\tout.SheetNames = sheetnames;\n\tout.Workbook = Workbook;\n\tout.SSF = dup(table_fmt);\n\tout.Props = Props;\n\tout.Custprops = Custprops;\n\treturn out;\n}\n\nfunction parse_xlml(data/*:RawBytes|string*/, opts)/*:Workbook*/ {\n\tfix_read_opts(opts=opts||{});\n\tswitch(opts.type||\"base64\") {\n\t\tcase \"base64\": return parse_xlml_xml(Base64_decode(data), opts);\n\t\tcase \"binary\": case \"buffer\": case \"file\": return parse_xlml_xml(data, opts);\n\t\tcase \"array\": return parse_xlml_xml(a2s(data), opts);\n\t}\n\t/*:: throw new Error(\"unsupported type \" + opts.type); */\n}\n\n/* TODO */\nfunction write_props_xlml(wb/*:Workbook*/, opts)/*:string*/ {\n\tvar o/*:Array*/ = [];\n\t/* DocumentProperties */\n\tif(wb.Props) o.push(xlml_write_docprops(wb.Props, opts));\n\t/* CustomDocumentProperties */\n\tif(wb.Custprops) o.push(xlml_write_custprops(wb.Props, wb.Custprops, opts));\n\treturn o.join(\"\");\n}\n/* TODO */\nfunction write_wb_xlml(/*::wb, opts*/)/*:string*/ {\n\t/* OfficeDocumentSettings */\n\t/* ExcelWorkbook */\n\treturn \"\";\n}\n/* TODO */\nfunction write_sty_xlml(wb, opts)/*:string*/ {\n\t/* Styles */\n\tvar styles/*:Array*/ = [''];\n\topts.cellXfs.forEach(function(xf, id) {\n\t\tvar payload/*:Array*/ = [];\n\t\tpayload.push(writextag('NumberFormat', null, {\"ss:Format\": escapexml(table_fmt[xf.numFmtId])}));\n\n\t\tvar o = /*::(*/{\"ss:ID\": \"s\" + (21+id)}/*:: :any)*/;\n\t\tstyles.push(writextag('Style', payload.join(\"\"), o));\n\t});\n\treturn writextag(\"Styles\", styles.join(\"\"));\n}\nfunction write_name_xlml(n) { return writextag(\"NamedRange\", null, {\"ss:Name\": n.Name, \"ss:RefersTo\":\"=\" + a1_to_rc(n.Ref, {r:0,c:0})}); }\nfunction write_names_xlml(wb/*::, opts*/)/*:string*/ {\n\tif(!((wb||{}).Workbook||{}).Names) return \"\";\n\t/*:: if(!wb || !wb.Workbook || !wb.Workbook.Names) throw new Error(\"unreachable\"); */\n\tvar names/*:Array*/ = wb.Workbook.Names;\n\tvar out/*:Array*/ = [];\n\tfor(var i = 0; i < names.length; ++i) {\n\t\tvar n = names[i];\n\t\tif(n.Sheet != null) continue;\n\t\tif(n.Name.match(/^_xlfn\\./)) continue;\n\t\tout.push(write_name_xlml(n));\n\t}\n\treturn writextag(\"Names\", out.join(\"\"));\n}\nfunction write_ws_xlml_names(ws/*:Worksheet*/, opts, idx/*:number*/, wb/*:Workbook*/)/*:string*/ {\n\tif(!ws) return \"\";\n\tif(!((wb||{}).Workbook||{}).Names) return \"\";\n\t/*:: if(!wb || !wb.Workbook || !wb.Workbook.Names) throw new Error(\"unreachable\"); */\n\tvar names/*:Array*/ = wb.Workbook.Names;\n\tvar out/*:Array*/ = [];\n\tfor(var i = 0; i < names.length; ++i) {\n\t\tvar n = names[i];\n\t\tif(n.Sheet != idx) continue;\n\t\t/*switch(n.Name) {\n\t\t\tcase \"_\": continue;\n\t\t}*/\n\t\tif(n.Name.match(/^_xlfn\\./)) continue;\n\t\tout.push(write_name_xlml(n));\n\t}\n\treturn out.join(\"\");\n}\n/* WorksheetOptions */\nfunction write_ws_xlml_wsopts(ws/*:Worksheet*/, opts, idx/*:number*/, wb/*:Workbook*/)/*:string*/ {\n\tif(!ws) return \"\";\n\tvar o/*:Array*/ = [];\n\t/* NOTE: spec technically allows any order, but stick with implied order */\n\n\t/* FitToPage */\n\t/* DoNotDisplayColHeaders */\n\t/* DoNotDisplayRowHeaders */\n\t/* ViewableRange */\n\t/* Selection */\n\t/* GridlineColor */\n\t/* Name */\n\t/* ExcelWorksheetType */\n\t/* IntlMacro */\n\t/* Unsynced */\n\t/* Selected */\n\t/* CodeName */\n\n\tif(ws['!margins']) {\n\t\to.push(\"\");\n\t\tif(ws['!margins'].header) o.push(writextag(\"Header\", null, {'x:Margin':ws['!margins'].header}));\n\t\tif(ws['!margins'].footer) o.push(writextag(\"Footer\", null, {'x:Margin':ws['!margins'].footer}));\n\t\to.push(writextag(\"PageMargins\", null, {\n\t\t\t'x:Bottom': ws['!margins'].bottom || \"0.75\",\n\t\t\t'x:Left': ws['!margins'].left || \"0.7\",\n\t\t\t'x:Right': ws['!margins'].right || \"0.7\",\n\t\t\t'x:Top': ws['!margins'].top || \"0.75\"\n\t\t}));\n\t\to.push(\"\");\n\t}\n\n\t/* PageSetup */\n\t/* DisplayPageBreak */\n\t/* TransitionExpressionEvaluation */\n\t/* TransitionFormulaEntry */\n\t/* Print */\n\t/* Zoom */\n\t/* PageLayoutZoom */\n\t/* PageBreakZoom */\n\t/* ShowPageBreakZoom */\n\t/* DefaultRowHeight */\n\t/* DefaultColumnWidth */\n\t/* StandardWidth */\n\n\tif(wb && wb.Workbook && wb.Workbook.Sheets && wb.Workbook.Sheets[idx]) {\n\t\t/* Visible */\n\t\tif(wb.Workbook.Sheets[idx].Hidden) o.push(writextag(\"Visible\", (wb.Workbook.Sheets[idx].Hidden == 1 ? \"SheetHidden\" : \"SheetVeryHidden\"), {}));\n\t\telse {\n\t\t\t/* Selected */\n\t\t\tfor(var i = 0; i < idx; ++i) if(wb.Workbook.Sheets[i] && !wb.Workbook.Sheets[i].Hidden) break;\n\t\t\tif(i == idx) o.push(\"\");\n\t\t}\n\t}\n\n\t/* LeftColumnVisible */\n\n\tif(((((wb||{}).Workbook||{}).Views||[])[0]||{}).RTL) o.push(\"\");\n\n\t/* GridlineColorIndex */\n\t/* DisplayFormulas */\n\t/* DoNotDisplayGridlines */\n\t/* DoNotDisplayHeadings */\n\t/* DoNotDisplayOutline */\n\t/* ApplyAutomaticOutlineStyles */\n\t/* NoSummaryRowsBelowDetail */\n\t/* NoSummaryColumnsRightDetail */\n\t/* DoNotDisplayZeros */\n\t/* ActiveRow */\n\t/* ActiveColumn */\n\t/* FilterOn */\n\t/* RangeSelection */\n\t/* TopRowVisible */\n\t/* TopRowBottomPane */\n\t/* LeftColumnRightPane */\n\t/* ActivePane */\n\t/* SplitHorizontal */\n\t/* SplitVertical */\n\t/* FreezePanes */\n\t/* FrozenNoSplit */\n\t/* TabColorIndex */\n\t/* Panes */\n\n\t/* NOTE: Password not supported in XLML Format */\n\tif(ws['!protect']) {\n\t\to.push(writetag(\"ProtectContents\", \"True\"));\n\t\tif(ws['!protect'].objects) o.push(writetag(\"ProtectObjects\", \"True\"));\n\t\tif(ws['!protect'].scenarios) o.push(writetag(\"ProtectScenarios\", \"True\"));\n\t\tif(ws['!protect'].selectLockedCells != null && !ws['!protect'].selectLockedCells) o.push(writetag(\"EnableSelection\", \"NoSelection\"));\n\t\telse if(ws['!protect'].selectUnlockedCells != null && !ws['!protect'].selectUnlockedCells) o.push(writetag(\"EnableSelection\", \"UnlockedCells\"));\n\t[\n\t\t[ \"formatCells\", \"AllowFormatCells\" ],\n\t\t[ \"formatColumns\", \"AllowSizeCols\" ],\n\t\t[ \"formatRows\", \"AllowSizeRows\" ],\n\t\t[ \"insertColumns\", \"AllowInsertCols\" ],\n\t\t[ \"insertRows\", \"AllowInsertRows\" ],\n\t\t[ \"insertHyperlinks\", \"AllowInsertHyperlinks\" ],\n\t\t[ \"deleteColumns\", \"AllowDeleteCols\" ],\n\t\t[ \"deleteRows\", \"AllowDeleteRows\" ],\n\t\t[ \"sort\", \"AllowSort\" ],\n\t\t[ \"autoFilter\", \"AllowFilter\" ],\n\t\t[ \"pivotTables\", \"AllowUsePivotTables\" ]\n\t].forEach(function(x) { if(ws['!protect'][x[0]]) o.push(\"<\"+x[1]+\"/>\"); });\n\t}\n\n\tif(o.length == 0) return \"\";\n\treturn writextag(\"WorksheetOptions\", o.join(\"\"), {xmlns:XLMLNS.x});\n}\nfunction write_ws_xlml_comment(comments/*:Array*/)/*:string*/ {\n\treturn comments.map(function(c) {\n\t\t// TODO: formatted text\n\t\tvar t = xlml_unfixstr(c.t||\"\");\n\t\tvar d =writextag(\"ss:Data\", t, {\"xmlns\":\"http://www.w3.org/TR/REC-html40\"});\n\t\treturn writextag(\"Comment\", d, {\"ss:Author\":c.a});\n\t}).join(\"\");\n}\nfunction write_ws_xlml_cell(cell, ref/*:string*/, ws, opts, idx/*:number*/, wb, addr)/*:string*/{\n\tif(!cell || (cell.v == undefined && cell.f == undefined)) return \"\";\n\n\tvar attr = {};\n\tif(cell.f) attr[\"ss:Formula\"] = \"=\" + escapexml(a1_to_rc(cell.f, addr));\n\tif(cell.F && cell.F.slice(0, ref.length) == ref) {\n\t\tvar end = decode_cell(cell.F.slice(ref.length + 1));\n\t\tattr[\"ss:ArrayRange\"] = \"RC:R\" + (end.r == addr.r ? \"\" : \"[\" + (end.r - addr.r) + \"]\") + \"C\" + (end.c == addr.c ? \"\" : \"[\" + (end.c - addr.c) + \"]\");\n\t}\n\n\tif(cell.l && cell.l.Target) {\n\t\tattr[\"ss:HRef\"] = escapexml(cell.l.Target);\n\t\tif(cell.l.Tooltip) attr[\"x:HRefScreenTip\"] = escapexml(cell.l.Tooltip);\n\t}\n\n\tif(ws['!merges']) {\n\t\tvar marr = ws['!merges'];\n\t\tfor(var mi = 0; mi != marr.length; ++mi) {\n\t\t\tif(marr[mi].s.c != addr.c || marr[mi].s.r != addr.r) continue;\n\t\t\tif(marr[mi].e.c > marr[mi].s.c) attr['ss:MergeAcross'] = marr[mi].e.c - marr[mi].s.c;\n\t\t\tif(marr[mi].e.r > marr[mi].s.r) attr['ss:MergeDown'] = marr[mi].e.r - marr[mi].s.r;\n\t\t}\n\t}\n\n\tvar t = \"\", p = \"\";\n\tswitch(cell.t) {\n\t\tcase 'z': if(!opts.sheetStubs) return \"\"; break;\n\t\tcase 'n': t = 'Number'; p = String(cell.v); break;\n\t\tcase 'b': t = 'Boolean'; p = (cell.v ? \"1\" : \"0\"); break;\n\t\tcase 'e': t = 'Error'; p = BErr[cell.v]; break;\n\t\tcase 'd': t = 'DateTime'; p = new Date(cell.v).toISOString(); if(cell.z == null) cell.z = cell.z || table_fmt[14]; break;\n\t\tcase 's': t = 'String'; p = escapexlml(cell.v||\"\"); break;\n\t}\n\t/* TODO: cell style */\n\tvar os = get_cell_style(opts.cellXfs, cell, opts);\n\tattr[\"ss:StyleID\"] = \"s\" + (21+os);\n\tattr[\"ss:Index\"] = addr.c + 1;\n\tvar _v = (cell.v != null ? p : \"\");\n\tvar m = cell.t == 'z' ? \"\" : ('' + _v + '');\n\n\tif((cell.c||[]).length > 0) m += write_ws_xlml_comment(cell.c);\n\n\treturn writextag(\"Cell\", m, attr);\n}\nfunction write_ws_xlml_row(R/*:number*/, row)/*:string*/ {\n\tvar o = '';\n}\n/* TODO */\nfunction write_ws_xlml_table(ws/*:Worksheet*/, opts, idx/*:number*/, wb/*:Workbook*/)/*:string*/ {\n\tif(!ws['!ref']) return \"\";\n\tvar range/*:Range*/ = safe_decode_range(ws['!ref']);\n\tvar marr/*:Array*/ = ws['!merges'] || [], mi = 0;\n\tvar o/*:Array*/ = [];\n\tif(ws['!cols']) ws['!cols'].forEach(function(n, i) {\n\t\tprocess_col(n);\n\t\tvar w = !!n.width;\n\t\tvar p = col_obj_w(i, n);\n\t\tvar k/*:any*/ = {\"ss:Index\":i+1};\n\t\tif(w) k['ss:Width'] = width2px(p.width);\n\t\tif(n.hidden) k['ss:Hidden']=\"1\";\n\t\to.push(writextag(\"Column\",null,k));\n\t});\n\tvar dense = Array.isArray(ws);\n\tfor(var R = range.s.r; R <= range.e.r; ++R) {\n\t\tvar row = [write_ws_xlml_row(R, (ws['!rows']||[])[R])];\n\t\tfor(var C = range.s.c; C <= range.e.c; ++C) {\n\t\t\tvar skip = false;\n\t\t\tfor(mi = 0; mi != marr.length; ++mi) {\n\t\t\t\tif(marr[mi].s.c > C) continue;\n\t\t\t\tif(marr[mi].s.r > R) continue;\n\t\t\t\tif(marr[mi].e.c < C) continue;\n\t\t\t\tif(marr[mi].e.r < R) continue;\n\t\t\t\tif(marr[mi].s.c != C || marr[mi].s.r != R) skip = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif(skip) continue;\n\t\t\tvar addr = {r:R,c:C};\n\t\t\tvar ref = encode_cell(addr), cell = dense ? (ws[R]||[])[C] : ws[ref];\n\t\t\trow.push(write_ws_xlml_cell(cell, ref, ws, opts, idx, wb, addr));\n\t\t}\n\t\trow.push(\"\");\n\t\tif(row.length > 2) o.push(row.join(\"\"));\n\t}\n\treturn o.join(\"\");\n}\nfunction write_ws_xlml(idx/*:number*/, opts, wb/*:Workbook*/)/*:string*/ {\n\tvar o/*:Array*/ = [];\n\tvar s = wb.SheetNames[idx];\n\tvar ws = wb.Sheets[s];\n\n\tvar t/*:string*/ = ws ? write_ws_xlml_names(ws, opts, idx, wb) : \"\";\n\tif(t.length > 0) o.push(\"\" + t + \"\");\n\n\t/* Table */\n\tt = ws ? write_ws_xlml_table(ws, opts, idx, wb) : \"\";\n\tif(t.length > 0) o.push(\"
\" + t + \"
\");\n\n\t/* WorksheetOptions */\n\to.push(write_ws_xlml_wsopts(ws, opts, idx, wb));\n\n\treturn o.join(\"\");\n}\nfunction write_xlml(wb, opts)/*:string*/ {\n\tif(!opts) opts = {};\n\tif(!wb.SSF) wb.SSF = dup(table_fmt);\n\tif(wb.SSF) {\n\t\tmake_ssf(); SSF_load_table(wb.SSF);\n\t\t// $FlowIgnore\n\t\topts.revssf = evert_num(wb.SSF); opts.revssf[wb.SSF[65535]] = 0;\n\t\topts.ssf = wb.SSF;\n\t\topts.cellXfs = [];\n\t\tget_cell_style(opts.cellXfs, {}, {revssf:{\"General\":0}});\n\t}\n\tvar d/*:Array*/ = [];\n\td.push(write_props_xlml(wb, opts));\n\td.push(write_wb_xlml(wb, opts));\n\td.push(\"\");\n\td.push(\"\");\n\tfor(var i = 0; i < wb.SheetNames.length; ++i)\n\t\td.push(writextag(\"Worksheet\", write_ws_xlml(i, opts, wb), {\"ss:Name\":escapexml(wb.SheetNames[i])}));\n\td[2] = write_sty_xlml(wb, opts);\n\td[3] = write_names_xlml(wb, opts);\n\treturn XML_HEADER + writextag(\"Workbook\", d.join(\"\"), {\n\t\t'xmlns': XLMLNS.ss,\n\t\t'xmlns:o': XLMLNS.o,\n\t\t'xmlns:x': XLMLNS.x,\n\t\t'xmlns:ss': XLMLNS.ss,\n\t\t'xmlns:dt': XLMLNS.dt,\n\t\t'xmlns:html': XLMLNS.html\n\t});\n}\n/* [MS-OLEDS] 2.3.8 CompObjStream */\nfunction parse_compobj(obj/*:CFBEntry*/) {\n\tvar v = {};\n\tvar o = obj.content;\n\t/*:: if(o == null) return; */\n\n\t/* [MS-OLEDS] 2.3.7 CompObjHeader -- All fields MUST be ignored */\n\to.l = 28;\n\n\tv.AnsiUserType = o.read_shift(0, \"lpstr-ansi\");\n\tv.AnsiClipboardFormat = parse_ClipboardFormatOrAnsiString(o);\n\n\tif(o.length - o.l <= 4) return v;\n\n\tvar m/*:number*/ = o.read_shift(4);\n\tif(m == 0 || m > 40) return v;\n\to.l-=4; v.Reserved1 = o.read_shift(0, \"lpstr-ansi\");\n\n\tif(o.length - o.l <= 4) return v;\n\tm = o.read_shift(4);\n\tif(m !== 0x71b239f4) return v;\n\tv.UnicodeClipboardFormat = parse_ClipboardFormatOrUnicodeString(o);\n\n\tm = o.read_shift(4);\n\tif(m == 0 || m > 40) return v;\n\to.l-=4; v.Reserved2 = o.read_shift(0, \"lpwstr\");\n}\n\n/*\n\tContinue logic for:\n\t- 2.4.58 Continue 0x003c\n\t- 2.4.59 ContinueBigName 0x043c\n\t- 2.4.60 ContinueFrt 0x0812\n\t- 2.4.61 ContinueFrt11 0x0875\n\t- 2.4.62 ContinueFrt12 0x087f\n*/\nvar CONTINUE_RT = [ 0x003c, 0x043c, 0x0812, 0x0875, 0x087f ];\nfunction slurp(RecordType, R, blob, length/*:number*/, opts)/*:any*/ {\n\tvar l = length;\n\tvar bufs = [];\n\tvar d = blob.slice(blob.l,blob.l+l);\n\tif(opts && opts.enc && opts.enc.insitu && d.length > 0) switch(RecordType) {\n\tcase 0x0009: case 0x0209: case 0x0409: case 0x0809/* BOF */: case 0x002f /* FilePass */: case 0x0195 /* FileLock */: case 0x00e1 /* InterfaceHdr */: case 0x0196 /* RRDInfo */: case 0x0138 /* RRDHead */: case 0x0194 /* UsrExcl */: case 0x000a /* EOF */:\n\t\tbreak;\n\tcase 0x0085 /* BoundSheet8 */:\n\t\tbreak;\n\tdefault:\n\t\topts.enc.insitu(d);\n\t}\n\tbufs.push(d);\n\tblob.l += l;\n\tvar nextrt = __readUInt16LE(blob,blob.l), next = XLSRecordEnum[nextrt];\n\tvar start = 0;\n\twhile(next != null && CONTINUE_RT.indexOf(nextrt) > -1) {\n\t\tl = __readUInt16LE(blob,blob.l+2);\n\t\tstart = blob.l + 4;\n\t\tif(nextrt == 0x0812 /* ContinueFrt */) start += 4;\n\t\telse if(nextrt == 0x0875 || nextrt == 0x087f) {\n\t\t\tstart += 12;\n\t\t}\n\t\td = blob.slice(start,blob.l+4+l);\n\t\tbufs.push(d);\n\t\tblob.l += 4+l;\n\t\tnext = (XLSRecordEnum[nextrt = __readUInt16LE(blob, blob.l)]);\n\t}\n\tvar b = (bconcat(bufs)/*:any*/);\n\tprep_blob(b, 0);\n\tvar ll = 0; b.lens = [];\n\tfor(var j = 0; j < bufs.length; ++j) { b.lens.push(ll); ll += bufs[j].length; }\n\tif(b.length < length) throw \"XLS Record 0x\" + RecordType.toString(16) + \" Truncated: \" + b.length + \" < \" + length;\n\treturn R.f(b, b.length, opts);\n}\n\nfunction safe_format_xf(p/*:any*/, opts/*:ParseOpts*/, date1904/*:?boolean*/) {\n\tif(p.t === 'z') return;\n\tif(!p.XF) return;\n\tvar fmtid = 0;\n\ttry {\n\t\tfmtid = p.z || p.XF.numFmtId || 0;\n\t\tif(opts.cellNF) p.z = table_fmt[fmtid];\n\t} catch(e) { if(opts.WTF) throw e; }\n\tif(!opts || opts.cellText !== false) try {\n\t\tif(p.t === 'e') { p.w = p.w || BErr[p.v]; }\n\t\telse if(fmtid === 0 || fmtid == \"General\") {\n\t\t\tif(p.t === 'n') {\n\t\t\t\tif((p.v|0) === p.v) p.w = p.v.toString(10);\n\t\t\t\telse p.w = SSF_general_num(p.v);\n\t\t\t}\n\t\t\telse p.w = SSF_general(p.v);\n\t\t}\n\t\telse p.w = SSF_format(fmtid,p.v, {date1904:!!date1904, dateNF: opts && opts.dateNF});\n\t} catch(e) { if(opts.WTF) throw e; }\n\tif(opts.cellDates && fmtid && p.t == 'n' && fmt_is_date(table_fmt[fmtid] || String(fmtid))) {\n\t\tvar _d = SSF_parse_date_code(p.v); if(_d) { p.t = 'd'; p.v = new Date(_d.y, _d.m-1,_d.d,_d.H,_d.M,_d.S,_d.u); }\n\t}\n}\n\nfunction make_cell(val, ixfe, t)/*:Cell*/ {\n\treturn ({v:val, ixfe:ixfe, t:t}/*:any*/);\n}\n\n// 2.3.2\nfunction parse_workbook(blob, options/*:ParseOpts*/)/*:Workbook*/ {\n\tvar wb = ({opts:{}}/*:any*/);\n\tvar Sheets = {};\n\tif(DENSE != null && options.dense == null) options.dense = DENSE;\n\tvar out/*:Worksheet*/ = ((options.dense ? [] : {})/*:any*/);\n\tvar Directory = {};\n\tvar range/*:Range*/ = ({}/*:any*/);\n\tvar last_formula = null;\n\tvar sst/*:SST*/ = ([]/*:any*/);\n\tvar cur_sheet = \"\";\n\tvar Preamble = {};\n\tvar lastcell, last_cell = \"\", cc/*:Cell*/, cmnt, rngC, rngR;\n\tvar sharedf = {};\n\tvar arrayf/*:Array<[Range, string]>*/ = [];\n\tvar temp_val/*:Cell*/;\n\tvar country;\n\tvar XFs = []; /* XF records */\n\tvar palette/*:Array<[number, number, number]>*/ = [];\n\tvar Workbook/*:WBWBProps*/ = ({ Sheets:[], WBProps:{date1904:false}, Views:[{}] }/*:any*/), wsprops = {};\n\tvar get_rgb = function getrgb(icv/*:number*/)/*:[number, number, number]*/ {\n\t\tif(icv < 8) return XLSIcv[icv];\n\t\tif(icv < 64) return palette[icv-8] || XLSIcv[icv];\n\t\treturn XLSIcv[icv];\n\t};\n\tvar process_cell_style = function pcs(cell, line/*:any*/, options) {\n\t\tvar xfd = line.XF.data;\n\t\tif(!xfd || !xfd.patternType || !options || !options.cellStyles) return;\n\t\tline.s = ({}/*:any*/);\n\t\tline.s.patternType = xfd.patternType;\n\t\tvar t;\n\t\tif((t = rgb2Hex(get_rgb(xfd.icvFore)))) { line.s.fgColor = {rgb:t}; }\n\t\tif((t = rgb2Hex(get_rgb(xfd.icvBack)))) { line.s.bgColor = {rgb:t}; }\n\t};\n\tvar addcell = function addcell(cell/*:any*/, line/*:any*/, options/*:any*/) {\n\t\tif(file_depth > 1) return;\n\t\tif(options.sheetRows && cell.r >= options.sheetRows) return;\n\t\tif(options.cellStyles && line.XF && line.XF.data) process_cell_style(cell, line, options);\n\t\tdelete line.ixfe; delete line.XF;\n\t\tlastcell = cell;\n\t\tlast_cell = encode_cell(cell);\n\t\tif(!range || !range.s || !range.e) range = {s:{r:0,c:0},e:{r:0,c:0}};\n\t\tif(cell.r < range.s.r) range.s.r = cell.r;\n\t\tif(cell.c < range.s.c) range.s.c = cell.c;\n\t\tif(cell.r + 1 > range.e.r) range.e.r = cell.r + 1;\n\t\tif(cell.c + 1 > range.e.c) range.e.c = cell.c + 1;\n\t\tif(options.cellFormula && line.f) {\n\t\t\tfor(var afi = 0; afi < arrayf.length; ++afi) {\n\t\t\t\tif(arrayf[afi][0].s.c > cell.c || arrayf[afi][0].s.r > cell.r) continue;\n\t\t\t\tif(arrayf[afi][0].e.c < cell.c || arrayf[afi][0].e.r < cell.r) continue;\n\t\t\t\tline.F = encode_range(arrayf[afi][0]);\n\t\t\t\tif(arrayf[afi][0].s.c != cell.c || arrayf[afi][0].s.r != cell.r) delete line.f;\n\t\t\t\tif(line.f) line.f = \"\" + stringify_formula(arrayf[afi][1], range, cell, supbooks, opts);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t{\n\t\t\tif(options.dense) {\n\t\t\t\tif(!out[cell.r]) out[cell.r] = [];\n\t\t\t\tout[cell.r][cell.c] = line;\n\t\t\t} else out[last_cell] = line;\n\t\t}\n\t};\n\tvar opts = ({\n\t\tenc: false, // encrypted\n\t\tsbcch: 0, // cch in the preceding SupBook\n\t\tsnames: [], // sheetnames\n\t\tsharedf: sharedf, // shared formulae by address\n\t\tarrayf: arrayf, // array formulae array\n\t\trrtabid: [], // RRTabId\n\t\tlastuser: \"\", // Last User from WriteAccess\n\t\tbiff: 8, // BIFF version\n\t\tcodepage: 0, // CP from CodePage record\n\t\twinlocked: 0, // fLockWn from WinProtect\n\t\tcellStyles: !!options && !!options.cellStyles,\n\t\tWTF: !!options && !!options.wtf\n\t}/*:any*/);\n\tif(options.password) opts.password = options.password;\n\tvar themes;\n\tvar merges/*:Array*/ = [];\n\tvar objects = [];\n\tvar colinfo/*:Array*/ = [], rowinfo/*:Array*/ = [];\n\tvar seencol = false;\n\tvar supbooks = ([]/*:any*/); // 1-indexed, will hold extern names\n\tsupbooks.SheetNames = opts.snames;\n\tsupbooks.sharedf = opts.sharedf;\n\tsupbooks.arrayf = opts.arrayf;\n\tsupbooks.names = [];\n\tsupbooks.XTI = [];\n\tvar last_RT = 0;\n\tvar file_depth = 0; /* TODO: make a real stack */\n\tvar BIFF2Fmt = 0, BIFF2FmtTable/*:Array*/ = [];\n\tvar FilterDatabases = []; /* TODO: sort out supbooks and process elsewhere */\n\tvar last_lbl/*:?DefinedName*/;\n\n\t/* explicit override for some broken writers */\n\topts.codepage = 1200;\n\tset_cp(1200);\n\tvar seen_codepage = false;\n\twhile(blob.l < blob.length - 1) {\n\t\tvar s = blob.l;\n\t\tvar RecordType = blob.read_shift(2);\n\t\tif(RecordType === 0 && last_RT === 0x000a /* EOF */) break;\n\t\tvar length = (blob.l === blob.length ? 0 : blob.read_shift(2));\n\t\tvar R = XLSRecordEnum[RecordType];\n\t\t//console.log(RecordType.toString(16), RecordType, R, blob.l, length, blob.length);\n\t\t//if(!R) console.log(blob.slice(blob.l, blob.l + length));\n\t\tif(R && R.f) {\n\t\t\tif(options.bookSheets) {\n\t\t\t\tif(last_RT === 0x0085 /* BoundSheet8 */ && RecordType !== 0x0085 /* R.n !== 'BoundSheet8' */) break;\n\t\t\t}\n\t\t\tlast_RT = RecordType;\n\t\t\tif(R.r === 2 || R.r == 12) {\n\t\t\t\tvar rt = blob.read_shift(2); length -= 2;\n\t\t\t\tif(!opts.enc && rt !== RecordType && (((rt&0xFF)<<8)|(rt>>8)) !== RecordType) throw new Error(\"rt mismatch: \" + rt + \"!=\" + RecordType);\n\t\t\t\tif(R.r == 12){\n\t\t\t\t\tblob.l += 10; length -= 10;\n\t\t\t\t} // skip FRT\n\t\t\t}\n\t\t\t//console.error(R,blob.l,length,blob.length);\n\t\t\tvar val/*:any*/ = ({}/*:any*/);\n\t\t\tif(RecordType === 0x000a /* EOF */) val = /*::(*/R.f(blob, length, opts)/*:: :any)*/;\n\t\t\telse val = /*::(*/slurp(RecordType, R, blob, length, opts)/*:: :any)*/;\n\t\t\t/*:: val = (val:any); */\n\t\t\tif(file_depth == 0 && [0x0009, 0x0209, 0x0409, 0x0809].indexOf(last_RT) === -1 /* 'BOF' */) continue;\n\t\t\tswitch(RecordType) {\n\t\t\t\tcase 0x0022 /* Date1904 */:\n\t\t\t\t\t/*:: if(!Workbook.WBProps) Workbook.WBProps = {}; */\n\t\t\t\t\twb.opts.Date1904 = Workbook.WBProps.date1904 = val; break;\n\t\t\t\tcase 0x0086 /* WriteProtect */: wb.opts.WriteProtect = true; break;\n\t\t\t\tcase 0x002f /* FilePass */:\n\t\t\t\t\tif(!opts.enc) blob.l = 0;\n\t\t\t\t\topts.enc = val;\n\t\t\t\t\tif(!options.password) throw new Error(\"File is password-protected\");\n\t\t\t\t\tif(val.valid == null) throw new Error(\"Encryption scheme unsupported\");\n\t\t\t\t\tif(!val.valid) throw new Error(\"Password is incorrect\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase 0x005c /* WriteAccess */: opts.lastuser = val; break;\n\t\t\t\tcase 0x0042 /* CodePage */:\n\t\t\t\t\tvar cpval = Number(val);\n\t\t\t\t\t/* overrides based on test cases */\n\t\t\t\t\tswitch(cpval) {\n\t\t\t\t\t\tcase 0x5212: cpval = 1200; break;\n\t\t\t\t\t\tcase 0x8000: cpval = 10000; break;\n\t\t\t\t\t\tcase 0x8001: cpval = 1252; break;\n\t\t\t\t\t}\n\t\t\t\t\tset_cp(opts.codepage = cpval);\n\t\t\t\t\tseen_codepage = true;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 0x013d /* RRTabId */: opts.rrtabid = val; break;\n\t\t\t\tcase 0x0019 /* WinProtect */: opts.winlocked = val; break;\n\t\t\t\tcase 0x01b7 /* RefreshAll */: wb.opts[\"RefreshAll\"] = val; break;\n\t\t\t\tcase 0x000c /* CalcCount */: wb.opts[\"CalcCount\"] = val; break;\n\t\t\t\tcase 0x0010 /* CalcDelta */: wb.opts[\"CalcDelta\"] = val; break;\n\t\t\t\tcase 0x0011 /* CalcIter */: wb.opts[\"CalcIter\"] = val; break;\n\t\t\t\tcase 0x000d /* CalcMode */: wb.opts[\"CalcMode\"] = val; break;\n\t\t\t\tcase 0x000e /* CalcPrecision */: wb.opts[\"CalcPrecision\"] = val; break;\n\t\t\t\tcase 0x005f /* CalcSaveRecalc */: wb.opts[\"CalcSaveRecalc\"] = val; break;\n\t\t\t\tcase 0x000f /* CalcRefMode */: opts.CalcRefMode = val; break; // TODO: implement R1C1\n\t\t\t\tcase 0x08a3 /* ForceFullCalculation */: wb.opts.FullCalc = val; break;\n\t\t\t\tcase 0x0081 /* WsBool */:\n\t\t\t\t\tif(val.fDialog) out[\"!type\"] = \"dialog\";\n\t\t\t\t\tif(!val.fBelow) (out[\"!outline\"] || (out[\"!outline\"] = {})).above = true;\n\t\t\t\t\tif(!val.fRight) (out[\"!outline\"] || (out[\"!outline\"] = {})).left = true;\n\t\t\t\t\tbreak; // TODO\n\t\t\t\tcase 0x00e0 /* XF */:\n\t\t\t\t\tXFs.push(val); break;\n\t\t\t\tcase 0x01ae /* SupBook */:\n\t\t\t\t\tsupbooks.push([val]);\n\t\t\t\t\tsupbooks[supbooks.length-1].XTI = [];\n\t\t\t\t\tbreak;\n\t\t\t\tcase 0x0023: case 0x0223 /* ExternName */:\n\t\t\t\t\tsupbooks[supbooks.length-1].push(val);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 0x0018: case 0x0218 /* Lbl */:\n\t\t\t\t\tlast_lbl = ({\n\t\t\t\t\t\tName: val.Name,\n\t\t\t\t\t\tRef: stringify_formula(val.rgce,range,null,supbooks,opts)\n\t\t\t\t\t}/*:DefinedName*/);\n\t\t\t\t\tif(val.itab > 0) last_lbl.Sheet = val.itab - 1;\n\t\t\t\t\tsupbooks.names.push(last_lbl);\n\t\t\t\t\tif(!supbooks[0]) { supbooks[0] = []; supbooks[0].XTI = []; }\n\t\t\t\t\tsupbooks[supbooks.length-1].push(val);\n\t\t\t\t\tif(val.Name == \"_xlnm._FilterDatabase\" && val.itab > 0)\n\t\t\t\t\t\tif(val.rgce && val.rgce[0] && val.rgce[0][0] && val.rgce[0][0][0] == 'PtgArea3d')\n\t\t\t\t\t\t\tFilterDatabases[val.itab - 1] = { ref: encode_range(val.rgce[0][0][1][2]) };\n\t\t\t\t\tbreak;\n\t\t\t\tcase 0x0016 /* ExternCount */: opts.ExternCount = val; break;\n\t\t\t\tcase 0x0017 /* ExternSheet */:\n\t\t\t\t\tif(supbooks.length == 0) { supbooks[0] = []; supbooks[0].XTI = []; }\n\t\t\t\t\tsupbooks[supbooks.length - 1].XTI = supbooks[supbooks.length - 1].XTI.concat(val); supbooks.XTI = supbooks.XTI.concat(val); break;\n\t\t\t\tcase 0x0894 /* NameCmt */:\n\t\t\t\t\t/* TODO: search for correct name */\n\t\t\t\t\tif(opts.biff < 8) break;\n\t\t\t\t\tif(last_lbl != null) last_lbl.Comment = val[1];\n\t\t\t\t\tbreak;\n\t\t\t\tcase 0x0012 /* Protect */: out[\"!protect\"] = val; break; /* for sheet or book */\n\t\t\t\tcase 0x0013 /* Password */: if(val !== 0 && opts.WTF) console.error(\"Password verifier: \" + val); break;\n\t\t\t\tcase 0x0085 /* BoundSheet8 */: {\n\t\t\t\t\tDirectory[val.pos] = val;\n\t\t\t\t\topts.snames.push(val.name);\n\t\t\t\t} break;\n\t\t\t\tcase 0x000a /* EOF */: {\n\t\t\t\t\tif(--file_depth) break;\n\t\t\t\t\tif(range.e) {\n\t\t\t\t\t\tif(range.e.r > 0 && range.e.c > 0) {\n\t\t\t\t\t\t\trange.e.r--; range.e.c--;\n\t\t\t\t\t\t\tout[\"!ref\"] = encode_range(range);\n\t\t\t\t\t\t\tif(options.sheetRows && options.sheetRows <= range.e.r) {\n\t\t\t\t\t\t\t\tvar tmpri = range.e.r;\n\t\t\t\t\t\t\t\trange.e.r = options.sheetRows - 1;\n\t\t\t\t\t\t\t\tout[\"!fullref\"] = out[\"!ref\"];\n\t\t\t\t\t\t\t\tout[\"!ref\"] = encode_range(range);\n\t\t\t\t\t\t\t\trange.e.r = tmpri;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\trange.e.r++; range.e.c++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(merges.length > 0) out[\"!merges\"] = merges;\n\t\t\t\t\t\tif(objects.length > 0) out[\"!objects\"] = objects;\n\t\t\t\t\t\tif(colinfo.length > 0) out[\"!cols\"] = colinfo;\n\t\t\t\t\t\tif(rowinfo.length > 0) out[\"!rows\"] = rowinfo;\n\t\t\t\t\t\tWorkbook.Sheets.push(wsprops);\n\t\t\t\t\t}\n\t\t\t\t\tif(cur_sheet === \"\") Preamble = out; else Sheets[cur_sheet] = out;\n\t\t\t\t\tout = ((options.dense ? [] : {})/*:any*/);\n\t\t\t\t} break;\n\t\t\t\tcase 0x0009: case 0x0209: case 0x0409: case 0x0809 /* BOF */: {\n\t\t\t\t\tif(opts.biff === 8) opts.biff = {\n\t\t\t\t\t\t/*::[*/0x0009/*::]*/:2,\n\t\t\t\t\t\t/*::[*/0x0209/*::]*/:3,\n\t\t\t\t\t\t/*::[*/0x0409/*::]*/:4\n\t\t\t\t\t}[RecordType] || {\n\t\t\t\t\t\t/*::[*/0x0200/*::]*/:2,\n\t\t\t\t\t\t/*::[*/0x0300/*::]*/:3,\n\t\t\t\t\t\t/*::[*/0x0400/*::]*/:4,\n\t\t\t\t\t\t/*::[*/0x0500/*::]*/:5,\n\t\t\t\t\t\t/*::[*/0x0600/*::]*/:8,\n\t\t\t\t\t\t/*::[*/0x0002/*::]*/:2,\n\t\t\t\t\t\t/*::[*/0x0007/*::]*/:2\n\t\t\t\t\t}[val.BIFFVer] || 8;\n\t\t\t\t\topts.biffguess = val.BIFFVer == 0;\n\t\t\t\t\tif(val.BIFFVer == 0 && val.dt == 0x1000) { opts.biff = 5; seen_codepage = true; set_cp(opts.codepage = 28591); }\n\t\t\t\t\tif(opts.biff == 8 && val.BIFFVer == 0 && val.dt == 16) opts.biff = 2;\n\t\t\t\t\tif(file_depth++) break;\n\t\t\t\t\tout = ((options.dense ? [] : {})/*:any*/);\n\n\t\t\t\t\tif(opts.biff < 8 && !seen_codepage) { seen_codepage = true; set_cp(opts.codepage = options.codepage || 1252); }\n\n\t\t\t\t\tif(opts.biff < 5 || val.BIFFVer == 0 && val.dt == 0x1000) {\n\t\t\t\t\t\tif(cur_sheet === \"\") cur_sheet = \"Sheet1\";\n\t\t\t\t\t\trange = {s:{r:0,c:0},e:{r:0,c:0}};\n\t\t\t\t\t\t/* fake BoundSheet8 */\n\t\t\t\t\t\tvar fakebs8 = {pos: blob.l - length, name:cur_sheet};\n\t\t\t\t\t\tDirectory[fakebs8.pos] = fakebs8;\n\t\t\t\t\t\topts.snames.push(cur_sheet);\n\t\t\t\t\t}\n\t\t\t\t\telse cur_sheet = (Directory[s] || {name:\"\"}).name;\n\t\t\t\t\tif(val.dt == 0x20) out[\"!type\"] = \"chart\";\n\t\t\t\t\tif(val.dt == 0x40) out[\"!type\"] = \"macro\";\n\t\t\t\t\tmerges = [];\n\t\t\t\t\tobjects = [];\n\t\t\t\t\topts.arrayf = arrayf = [];\n\t\t\t\t\tcolinfo = []; rowinfo = [];\n\t\t\t\t\tseencol = false;\n\t\t\t\t\twsprops = {Hidden:(Directory[s]||{hs:0}).hs, name:cur_sheet };\n\t\t\t\t} break;\n\t\t\t\tcase 0x0203 /* Number */: case 0x0003 /* BIFF2NUM */: case 0x0002 /* BIFF2INT */: {\n\t\t\t\t\tif(out[\"!type\"] == \"chart\") if(options.dense ? (out[val.r]||[])[val.c]: out[encode_cell({c:val.c, r:val.r})]) ++val.c;\n\t\t\t\t\ttemp_val = ({ixfe: val.ixfe, XF: XFs[val.ixfe]||{}, v:val.val, t:'n'}/*:any*/);\n\t\t\t\t\tif(BIFF2Fmt > 0) temp_val.z = BIFF2FmtTable[(temp_val.ixfe>>8) & 0x3F];\n\t\t\t\t\tsafe_format_xf(temp_val, options, wb.opts.Date1904);\n\t\t\t\t\taddcell({c:val.c, r:val.r}, temp_val, options);\n\t\t\t\t} break;\n\t\t\t\tcase 0x0005: case 0x0205 /* BoolErr */: {\n\t\t\t\t\ttemp_val = ({ixfe: val.ixfe, XF: XFs[val.ixfe], v:val.val, t:val.t}/*:any*/);\n\t\t\t\t\tif(BIFF2Fmt > 0) temp_val.z = BIFF2FmtTable[(temp_val.ixfe>>8) & 0x3F];\n\t\t\t\t\tsafe_format_xf(temp_val, options, wb.opts.Date1904);\n\t\t\t\t\taddcell({c:val.c, r:val.r}, temp_val, options);\n\t\t\t\t} break;\n\t\t\t\tcase 0x027e /* RK */: {\n\t\t\t\t\ttemp_val = ({ixfe: val.ixfe, XF: XFs[val.ixfe], v:val.rknum, t:'n'}/*:any*/);\n\t\t\t\t\tif(BIFF2Fmt > 0) temp_val.z = BIFF2FmtTable[(temp_val.ixfe>>8) & 0x3F];\n\t\t\t\t\tsafe_format_xf(temp_val, options, wb.opts.Date1904);\n\t\t\t\t\taddcell({c:val.c, r:val.r}, temp_val, options);\n\t\t\t\t} break;\n\t\t\t\tcase 0x00bd /* MulRk */: {\n\t\t\t\t\tfor(var j = val.c; j <= val.C; ++j) {\n\t\t\t\t\t\tvar ixfe = val.rkrec[j-val.c][0];\n\t\t\t\t\t\ttemp_val= ({ixfe:ixfe, XF:XFs[ixfe], v:val.rkrec[j-val.c][1], t:'n'}/*:any*/);\n\t\t\t\t\t\tif(BIFF2Fmt > 0) temp_val.z = BIFF2FmtTable[(temp_val.ixfe>>8) & 0x3F];\n\t\t\t\t\t\tsafe_format_xf(temp_val, options, wb.opts.Date1904);\n\t\t\t\t\t\taddcell({c:j, r:val.r}, temp_val, options);\n\t\t\t\t\t}\n\t\t\t\t} break;\n\t\t\t\tcase 0x0006: case 0x0206: case 0x0406 /* Formula */: {\n\t\t\t\t\tif(val.val == 'String') { last_formula = val; break; }\n\t\t\t\t\ttemp_val = make_cell(val.val, val.cell.ixfe, val.tt);\n\t\t\t\t\ttemp_val.XF = XFs[temp_val.ixfe];\n\t\t\t\t\tif(options.cellFormula) {\n\t\t\t\t\t\tvar _f = val.formula;\n\t\t\t\t\t\tif(_f && _f[0] && _f[0][0] && _f[0][0][0] == 'PtgExp') {\n\t\t\t\t\t\t\tvar _fr = _f[0][0][1][0], _fc = _f[0][0][1][1];\n\t\t\t\t\t\t\tvar _fe = encode_cell({r:_fr, c:_fc});\n\t\t\t\t\t\t\tif(sharedf[_fe]) temp_val.f = \"\"+stringify_formula(val.formula,range,val.cell,supbooks, opts);\n\t\t\t\t\t\t\telse temp_val.F = ((options.dense ? (out[_fr]||[])[_fc]: out[_fe]) || {}).F;\n\t\t\t\t\t\t} else temp_val.f = \"\"+stringify_formula(val.formula,range,val.cell,supbooks, opts);\n\t\t\t\t\t}\n\t\t\t\t\tif(BIFF2Fmt > 0) temp_val.z = BIFF2FmtTable[(temp_val.ixfe>>8) & 0x3F];\n\t\t\t\t\tsafe_format_xf(temp_val, options, wb.opts.Date1904);\n\t\t\t\t\taddcell(val.cell, temp_val, options);\n\t\t\t\t\tlast_formula = val;\n\t\t\t\t} break;\n\t\t\t\tcase 0x0007: case 0x0207 /* String */: {\n\t\t\t\t\tif(last_formula) { /* technically always true */\n\t\t\t\t\t\tlast_formula.val = val;\n\t\t\t\t\t\ttemp_val = make_cell(val, last_formula.cell.ixfe, 's');\n\t\t\t\t\t\ttemp_val.XF = XFs[temp_val.ixfe];\n\t\t\t\t\t\tif(options.cellFormula) {\n\t\t\t\t\t\t\ttemp_val.f = \"\"+stringify_formula(last_formula.formula, range, last_formula.cell, supbooks, opts);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(BIFF2Fmt > 0) temp_val.z = BIFF2FmtTable[(temp_val.ixfe>>8) & 0x3F];\n\t\t\t\t\t\tsafe_format_xf(temp_val, options, wb.opts.Date1904);\n\t\t\t\t\t\taddcell(last_formula.cell, temp_val, options);\n\t\t\t\t\t\tlast_formula = null;\n\t\t\t\t\t} else throw new Error(\"String record expects Formula\");\n\t\t\t\t} break;\n\t\t\t\tcase 0x0021: case 0x0221 /* Array */: {\n\t\t\t\t\tarrayf.push(val);\n\t\t\t\t\tvar _arraystart = encode_cell(val[0].s);\n\t\t\t\t\tcc = options.dense ? (out[val[0].s.r]||[])[val[0].s.c] : out[_arraystart];\n\t\t\t\t\tif(options.cellFormula && cc) {\n\t\t\t\t\t\tif(!last_formula) break; /* technically unreachable */\n\t\t\t\t\t\tif(!_arraystart || !cc) break;\n\t\t\t\t\t\tcc.f = \"\"+stringify_formula(val[1], range, val[0], supbooks, opts);\n\t\t\t\t\t\tcc.F = encode_range(val[0]);\n\t\t\t\t\t}\n\t\t\t\t} break;\n\t\t\t\tcase 0x04bc /* ShrFmla */: {\n\t\t\t\t\tif(!options.cellFormula) break;\n\t\t\t\t\tif(last_cell) {\n\t\t\t\t\t\t/* TODO: capture range */\n\t\t\t\t\t\tif(!last_formula) break; /* technically unreachable */\n\t\t\t\t\t\tsharedf[encode_cell(last_formula.cell)]= val[0];\n\t\t\t\t\t\tcc = options.dense ? (out[last_formula.cell.r]||[])[last_formula.cell.c] : out[encode_cell(last_formula.cell)];\n\t\t\t\t\t\t(cc||{}).f = \"\"+stringify_formula(val[0], range, lastcell, supbooks, opts);\n\t\t\t\t\t}\n\t\t\t\t} break;\n\t\t\t\tcase 0x00fd /* LabelSst */:\n\t\t\t\t\ttemp_val=make_cell(sst[val.isst].t, val.ixfe, 's');\n\t\t\t\t\tif(sst[val.isst].h) temp_val.h = sst[val.isst].h;\n\t\t\t\t\ttemp_val.XF = XFs[temp_val.ixfe];\n\t\t\t\t\tif(BIFF2Fmt > 0) temp_val.z = BIFF2FmtTable[(temp_val.ixfe>>8) & 0x3F];\n\t\t\t\t\tsafe_format_xf(temp_val, options, wb.opts.Date1904);\n\t\t\t\t\taddcell({c:val.c, r:val.r}, temp_val, options);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 0x0201 /* Blank */: if(options.sheetStubs) {\n\t\t\t\t\ttemp_val = ({ixfe: val.ixfe, XF: XFs[val.ixfe], t:'z'}/*:any*/);\n\t\t\t\t\tif(BIFF2Fmt > 0) temp_val.z = BIFF2FmtTable[(temp_val.ixfe>>8) & 0x3F];\n\t\t\t\t\tsafe_format_xf(temp_val, options, wb.opts.Date1904);\n\t\t\t\t\taddcell({c:val.c, r:val.r}, temp_val, options);\n\t\t\t\t} break;\n\t\t\t\tcase 0x00be /* MulBlank */: if(options.sheetStubs) {\n\t\t\t\t\tfor(var _j = val.c; _j <= val.C; ++_j) {\n\t\t\t\t\t\tvar _ixfe = val.ixfe[_j-val.c];\n\t\t\t\t\t\ttemp_val= ({ixfe:_ixfe, XF:XFs[_ixfe], t:'z'}/*:any*/);\n\t\t\t\t\t\tif(BIFF2Fmt > 0) temp_val.z = BIFF2FmtTable[(temp_val.ixfe>>8) & 0x3F];\n\t\t\t\t\t\tsafe_format_xf(temp_val, options, wb.opts.Date1904);\n\t\t\t\t\t\taddcell({c:_j, r:val.r}, temp_val, options);\n\t\t\t\t\t}\n\t\t\t\t} break;\n\t\t\t\tcase 0x00d6 /* RString */:\n\t\t\t\tcase 0x0204 /* Label */: case 0x0004 /* BIFF2STR */:\n\t\t\t\t\ttemp_val=make_cell(val.val, val.ixfe, 's');\n\t\t\t\t\ttemp_val.XF = XFs[temp_val.ixfe];\n\t\t\t\t\tif(BIFF2Fmt > 0) temp_val.z = BIFF2FmtTable[(temp_val.ixfe>>8) & 0x3F];\n\t\t\t\t\tsafe_format_xf(temp_val, options, wb.opts.Date1904);\n\t\t\t\t\taddcell({c:val.c, r:val.r}, temp_val, options);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 0x0000: case 0x0200 /* Dimensions */: {\n\t\t\t\t\tif(file_depth === 1) range = val; /* TODO: stack */\n\t\t\t\t} break;\n\t\t\t\tcase 0x00fc /* SST */: {\n\t\t\t\t\tsst = val;\n\t\t\t\t} break;\n\t\t\t\tcase 0x041e /* Format */: { /* val = [id, fmt] */\n\t\t\t\t\tif(opts.biff == 4) {\n\t\t\t\t\t\tBIFF2FmtTable[BIFF2Fmt++] = val[1];\n\t\t\t\t\t\tfor(var b4idx = 0; b4idx < BIFF2Fmt + 163; ++b4idx) if(table_fmt[b4idx] == val[1]) break;\n\t\t\t\t\t\tif(b4idx >= 163) SSF_load(val[1], BIFF2Fmt + 163);\n\t\t\t\t\t}\n\t\t\t\t\telse SSF_load(val[1], val[0]);\n\t\t\t\t} break;\n\t\t\t\tcase 0x001e /* BIFF2FORMAT */: {\n\t\t\t\t\tBIFF2FmtTable[BIFF2Fmt++] = val;\n\t\t\t\t\tfor(var b2idx = 0; b2idx < BIFF2Fmt + 163; ++b2idx) if(table_fmt[b2idx] == val) break;\n\t\t\t\t\tif(b2idx >= 163) SSF_load(val, BIFF2Fmt + 163);\n\t\t\t\t} break;\n\n\t\t\t\tcase 0x00e5 /* MergeCells */: merges = merges.concat(val); break;\n\n\t\t\t\tcase 0x005d /* Obj */: objects[val.cmo[0]] = opts.lastobj = val; break;\n\t\t\t\tcase 0x01b6 /* TxO */: opts.lastobj.TxO = val; break;\n\t\t\t\tcase 0x007f /* ImData */: opts.lastobj.ImData = val; break;\n\n\t\t\t\tcase 0x01b8 /* HLink */: {\n\t\t\t\t\tfor(rngR = val[0].s.r; rngR <= val[0].e.r; ++rngR)\n\t\t\t\t\t\tfor(rngC = val[0].s.c; rngC <= val[0].e.c; ++rngC) {\n\t\t\t\t\t\t\tcc = options.dense ? (out[rngR]||[])[rngC] : out[encode_cell({c:rngC,r:rngR})];\n\t\t\t\t\t\t\tif(cc) cc.l = val[1];\n\t\t\t\t\t\t}\n\t\t\t\t} break;\n\t\t\t\tcase 0x0800 /* HLinkTooltip */: {\n\t\t\t\t\tfor(rngR = val[0].s.r; rngR <= val[0].e.r; ++rngR)\n\t\t\t\t\t\tfor(rngC = val[0].s.c; rngC <= val[0].e.c; ++rngC) {\n\t\t\t\t\t\t\tcc = options.dense ? (out[rngR]||[])[rngC] : out[encode_cell({c:rngC,r:rngR})];\n\t\t\t\t\t\t\tif(cc && cc.l) cc.l.Tooltip = val[1];\n\t\t\t\t\t\t\t}\n\t\t\t\t} break;\n\t\t\t\tcase 0x001c /* Note */: {\n\t\t\t\t\tif(opts.biff <= 5 && opts.biff >= 2) break; /* TODO: BIFF5 */\n\t\t\t\t\tcc = options.dense ? (out[val[0].r]||[])[val[0].c] : out[encode_cell(val[0])];\n\t\t\t\t\tvar noteobj = objects[val[2]];\n\t\t\t\t\tif(!cc) {\n\t\t\t\t\t\tif(options.dense) {\n\t\t\t\t\t\t\tif(!out[val[0].r]) out[val[0].r] = [];\n\t\t\t\t\t\t\tcc = out[val[0].r][val[0].c] = ({t:\"z\"}/*:any*/);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcc = out[encode_cell(val[0])] = ({t:\"z\"}/*:any*/);\n\t\t\t\t\t\t}\n\t\t\t\t\t\trange.e.r = Math.max(range.e.r, val[0].r);\n\t\t\t\t\t\trange.s.r = Math.min(range.s.r, val[0].r);\n\t\t\t\t\t\trange.e.c = Math.max(range.e.c, val[0].c);\n\t\t\t\t\t\trange.s.c = Math.min(range.s.c, val[0].c);\n\t\t\t\t\t}\n\t\t\t\t\tif(!cc.c) cc.c = [];\n\t\t\t\t\tcmnt = {a:val[1],t:noteobj.TxO.t};\n\t\t\t\t\tcc.c.push(cmnt);\n\t\t\t\t} break;\n\t\t\t\tcase 0x087d /* XFExt */: update_xfext(XFs[val.ixfe], val.ext); break;\n\t\t\t\tcase 0x007d /* ColInfo */: {\n\t\t\t\t\tif(!opts.cellStyles) break;\n\t\t\t\t\twhile(val.e >= val.s) {\n\t\t\t\t\t\tcolinfo[val.e--] = { width: val.w/256, level: (val.level || 0), hidden: !!(val.flags & 1) };\n\t\t\t\t\t\tif(!seencol) { seencol = true; find_mdw_colw(val.w/256); }\n\t\t\t\t\t\tprocess_col(colinfo[val.e+1]);\n\t\t\t\t\t}\n\t\t\t\t} break;\n\t\t\t\tcase 0x0208 /* Row */: {\n\t\t\t\t\tvar rowobj = {};\n\t\t\t\t\tif(val.level != null) { rowinfo[val.r] = rowobj; rowobj.level = val.level; }\n\t\t\t\t\tif(val.hidden) { rowinfo[val.r] = rowobj; rowobj.hidden = true; }\n\t\t\t\t\tif(val.hpt) {\n\t\t\t\t\t\trowinfo[val.r] = rowobj;\n\t\t\t\t\t\trowobj.hpt = val.hpt; rowobj.hpx = pt2px(val.hpt);\n\t\t\t\t\t}\n\t\t\t\t} break;\n\t\t\t\tcase 0x0026 /* LeftMargin */:\n\t\t\t\tcase 0x0027 /* RightMargin */:\n\t\t\t\tcase 0x0028 /* TopMargin */:\n\t\t\t\tcase 0x0029 /* BottomMargin */:\n\t\t\t\t\tif(!out['!margins']) default_margins(out['!margins'] = {});\n\t\t\t\t\tout['!margins'][({0x26: \"left\", 0x27:\"right\", 0x28:\"top\", 0x29:\"bottom\"})[RecordType]] = val;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 0x00a1 /* Setup */: // TODO\n\t\t\t\t\tif(!out['!margins']) default_margins(out['!margins'] = {});\n\t\t\t\t\tout['!margins'].header = val.header;\n\t\t\t\t\tout['!margins'].footer = val.footer;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 0x023e /* Window2 */: // TODO\n\t\t\t\t\t// $FlowIgnore\n\t\t\t\t\tif(val.RTL) Workbook.Views[0].RTL = true;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 0x0092 /* Palette */: palette = val; break;\n\t\t\t\tcase 0x0896 /* Theme */: themes = val; break;\n\t\t\t\tcase 0x008c /* Country */: country = val; break;\n\t\t\t\tcase 0x01ba /* CodeName */: {\n\t\t\t\t\t/*:: if(!Workbook.WBProps) Workbook.WBProps = {}; */\n\t\t\t\t\tif(!cur_sheet) Workbook.WBProps.CodeName = val || \"ThisWorkbook\";\n\t\t\t\t\telse wsprops.CodeName = val || wsprops.name;\n\t\t\t\t} break;\n\t\t\t}\n\t\t} else {\n\t\t\tif(!R) console.error(\"Missing Info for XLS Record 0x\" + RecordType.toString(16));\n\t\t\tblob.l += length;\n\t\t}\n\t}\n\twb.SheetNames=keys(Directory).sort(function(a,b) { return Number(a) - Number(b); }).map(function(x){return Directory[x].name;});\n\tif(!options.bookSheets) wb.Sheets=Sheets;\n\tif(!wb.SheetNames.length && Preamble[\"!ref\"]) {\n\t\twb.SheetNames.push(\"Sheet1\");\n\t\t/*jshint -W069 */\n\t\tif(wb.Sheets) wb.Sheets[\"Sheet1\"] = Preamble;\n\t\t/*jshint +W069 */\n\t} else wb.Preamble=Preamble;\n\tif(wb.Sheets) FilterDatabases.forEach(function(r,i) { wb.Sheets[wb.SheetNames[i]]['!autofilter'] = r; });\n\twb.Strings = sst;\n\twb.SSF = dup(table_fmt);\n\tif(opts.enc) wb.Encryption = opts.enc;\n\tif(themes) wb.Themes = themes;\n\twb.Metadata = {};\n\tif(country !== undefined) wb.Metadata.Country = country;\n\tif(supbooks.names.length > 0) Workbook.Names = supbooks.names;\n\twb.Workbook = Workbook;\n\treturn wb;\n}\n\n/* TODO: split props*/\nvar PSCLSID = {\n\tSI: \"e0859ff2f94f6810ab9108002b27b3d9\",\n\tDSI: \"02d5cdd59c2e1b10939708002b2cf9ae\",\n\tUDI: \"05d5cdd59c2e1b10939708002b2cf9ae\"\n};\nfunction parse_xls_props(cfb/*:CFBContainer*/, props, o) {\n\t/* [MS-OSHARED] 2.3.3.2.2 Document Summary Information Property Set */\n\tvar DSI = CFB.find(cfb, '/!DocumentSummaryInformation');\n\tif(DSI && DSI.size > 0) try {\n\t\tvar DocSummary = parse_PropertySetStream(DSI, DocSummaryPIDDSI, PSCLSID.DSI);\n\t\tfor(var d in DocSummary) props[d] = DocSummary[d];\n\t} catch(e) {if(o.WTF) throw e;/* empty */}\n\n\t/* [MS-OSHARED] 2.3.3.2.1 Summary Information Property Set*/\n\tvar SI = CFB.find(cfb, '/!SummaryInformation');\n\tif(SI && SI.size > 0) try {\n\t\tvar Summary = parse_PropertySetStream(SI, SummaryPIDSI, PSCLSID.SI);\n\t\tfor(var s in Summary) if(props[s] == null) props[s] = Summary[s];\n\t} catch(e) {if(o.WTF) throw e;/* empty */}\n\n\tif(props.HeadingPairs && props.TitlesOfParts) {\n\t\tload_props_pairs(props.HeadingPairs, props.TitlesOfParts, props, o);\n\t\tdelete props.HeadingPairs; delete props.TitlesOfParts;\n\t}\n}\nfunction write_xls_props(wb/*:Workbook*/, cfb/*:CFBContainer*/) {\n\tvar DSEntries = [], SEntries = [], CEntries = [];\n\tvar i = 0, Keys;\n\tvar DocSummaryRE/*:{[key:string]:string}*/ = evert_key(DocSummaryPIDDSI, \"n\");\n\tvar SummaryRE/*:{[key:string]:string}*/ = evert_key(SummaryPIDSI, \"n\");\n\tif(wb.Props) {\n\t\tKeys = keys(wb.Props);\n\t\t// $FlowIgnore\n\t\tfor(i = 0; i < Keys.length; ++i) (Object.prototype.hasOwnProperty.call(DocSummaryRE, Keys[i]) ? DSEntries : Object.prototype.hasOwnProperty.call(SummaryRE, Keys[i]) ? SEntries : CEntries).push([Keys[i], wb.Props[Keys[i]]]);\n\t}\n\tif(wb.Custprops) {\n\t\tKeys = keys(wb.Custprops);\n\t\t// $FlowIgnore\n\t\tfor(i = 0; i < Keys.length; ++i) if(!Object.prototype.hasOwnProperty.call((wb.Props||{}), Keys[i])) (Object.prototype.hasOwnProperty.call(DocSummaryRE, Keys[i]) ? DSEntries : Object.prototype.hasOwnProperty.call(SummaryRE, Keys[i]) ? SEntries : CEntries).push([Keys[i], wb.Custprops[Keys[i]]]);\n\t}\n\tvar CEntries2 = [];\n\tfor(i = 0; i < CEntries.length; ++i) {\n\t\tif(XLSPSSkip.indexOf(CEntries[i][0]) > -1 || PseudoPropsPairs.indexOf(CEntries[i][0]) > -1) continue;\n\t\tif(CEntries[i][1] == null) continue;\n\t\tCEntries2.push(CEntries[i]);\n\t}\n\tif(SEntries.length) CFB.utils.cfb_add(cfb, \"/\\u0005SummaryInformation\", write_PropertySetStream(SEntries, PSCLSID.SI, SummaryRE, SummaryPIDSI));\n\tif(DSEntries.length || CEntries2.length) CFB.utils.cfb_add(cfb, \"/\\u0005DocumentSummaryInformation\", write_PropertySetStream(DSEntries, PSCLSID.DSI, DocSummaryRE, DocSummaryPIDDSI, CEntries2.length ? CEntries2 : null, PSCLSID.UDI));\n}\n\nfunction parse_xlscfb(cfb/*:any*/, options/*:?ParseOpts*/)/*:Workbook*/ {\nif(!options) options = {};\nfix_read_opts(options);\nreset_cp();\nif(options.codepage) set_ansi(options.codepage);\nvar CompObj/*:?CFBEntry*/, WB/*:?any*/;\nif(cfb.FullPaths) {\n\tif(CFB.find(cfb, '/encryption')) throw new Error(\"File is password-protected\");\n\tCompObj = CFB.find(cfb, '!CompObj');\n\tWB = CFB.find(cfb, '/Workbook') || CFB.find(cfb, '/Book');\n} else {\n\tswitch(options.type) {\n\t\tcase 'base64': cfb = s2a(Base64_decode(cfb)); break;\n\t\tcase 'binary': cfb = s2a(cfb); break;\n\t\tcase 'buffer': break;\n\t\tcase 'array': if(!Array.isArray(cfb)) cfb = Array.prototype.slice.call(cfb); break;\n\t}\n\tprep_blob(cfb, 0);\n\tWB = ({content: cfb}/*:any*/);\n}\nvar /*::CompObjP, */WorkbookP/*:: :Workbook = XLSX.utils.book_new(); */;\n\nvar _data/*:?any*/;\nif(CompObj) /*::CompObjP = */parse_compobj(CompObj);\nif(options.bookProps && !options.bookSheets) WorkbookP = ({}/*:any*/);\nelse/*:: if(cfb instanceof CFBContainer) */ {\n\tvar T = has_buf ? 'buffer' : 'array';\n\tif(WB && WB.content) WorkbookP = parse_workbook(WB.content, options);\n\t/* Quattro Pro 7-8 */\n\telse if((_data=CFB.find(cfb, 'PerfectOffice_MAIN')) && _data.content) WorkbookP = WK_.to_workbook(_data.content, (options.type = T, options));\n\t/* Quattro Pro 9 */\n\telse if((_data=CFB.find(cfb, 'NativeContent_MAIN')) && _data.content) WorkbookP = WK_.to_workbook(_data.content, (options.type = T, options));\n\t/* Works 4 for Mac */\n\telse if((_data=CFB.find(cfb, 'MN0')) && _data.content) throw new Error(\"Unsupported Works 4 for Mac file\");\n\telse throw new Error(\"Cannot find Workbook stream\");\n\tif(options.bookVBA && cfb.FullPaths && CFB.find(cfb, '/_VBA_PROJECT_CUR/VBA/dir')) WorkbookP.vbaraw = make_vba_xls(cfb);\n}\n\nvar props = {};\nif(cfb.FullPaths) parse_xls_props(/*::((*/cfb/*:: :any):CFBContainer)*/, props, options);\n\nWorkbookP.Props = WorkbookP.Custprops = props; /* TODO: split up properties */\nif(options.bookFiles) WorkbookP.cfb = cfb;\n/*WorkbookP.CompObjP = CompObjP; // TODO: storage? */\nreturn WorkbookP;\n}\n\n\nfunction write_xlscfb(wb/*:Workbook*/, opts/*:WriteOpts*/)/*:CFBContainer*/ {\n\tvar o = opts || {};\n\tvar cfb = CFB.utils.cfb_new({root:\"R\"});\n\tvar wbpath = \"/Workbook\";\n\tswitch(o.bookType || \"xls\") {\n\t\tcase \"xls\": o.bookType = \"biff8\";\n\t\t/* falls through */\n\t\tcase \"xla\": if(!o.bookType) o.bookType = \"xla\";\n\t\t/* falls through */\n\t\tcase \"biff8\": wbpath = \"/Workbook\"; o.biff = 8; break;\n\t\tcase \"biff5\": wbpath = \"/Book\"; o.biff = 5; break;\n\t\tdefault: throw new Error(\"invalid type \" + o.bookType + \" for XLS CFB\");\n\t}\n\tCFB.utils.cfb_add(cfb, wbpath, write_biff_buf(wb, o));\n\tif(o.biff == 8 && (wb.Props || wb.Custprops)) write_xls_props(wb, cfb);\n\t// TODO: SI, DSI, CO\n\tif(o.biff == 8 && wb.vbaraw) fill_vba_xls(cfb, CFB.read(wb.vbaraw, {type: typeof wb.vbaraw == \"string\" ? \"binary\" : \"buffer\"}));\n\treturn cfb;\n}\n/* [MS-XLSB] 2.3 Record Enumeration */\nvar XLSBRecordEnum = {\n\t/*::[*/0x0000/*::]*/: { /* n:\"BrtRowHdr\", */ f:parse_BrtRowHdr },\n\t/*::[*/0x0001/*::]*/: { /* n:\"BrtCellBlank\", */ f:parse_BrtCellBlank },\n\t/*::[*/0x0002/*::]*/: { /* n:\"BrtCellRk\", */ f:parse_BrtCellRk },\n\t/*::[*/0x0003/*::]*/: { /* n:\"BrtCellError\", */ f:parse_BrtCellError },\n\t/*::[*/0x0004/*::]*/: { /* n:\"BrtCellBool\", */ f:parse_BrtCellBool },\n\t/*::[*/0x0005/*::]*/: { /* n:\"BrtCellReal\", */ f:parse_BrtCellReal },\n\t/*::[*/0x0006/*::]*/: { /* n:\"BrtCellSt\", */ f:parse_BrtCellSt },\n\t/*::[*/0x0007/*::]*/: { /* n:\"BrtCellIsst\", */ f:parse_BrtCellIsst },\n\t/*::[*/0x0008/*::]*/: { /* n:\"BrtFmlaString\", */ f:parse_BrtFmlaString },\n\t/*::[*/0x0009/*::]*/: { /* n:\"BrtFmlaNum\", */ f:parse_BrtFmlaNum },\n\t/*::[*/0x000A/*::]*/: { /* n:\"BrtFmlaBool\", */ f:parse_BrtFmlaBool },\n\t/*::[*/0x000B/*::]*/: { /* n:\"BrtFmlaError\", */ f:parse_BrtFmlaError },\n\t/*::[*/0x000C/*::]*/: { /* n:\"BrtShortBlank\", */ f:parse_BrtShortBlank },\n\t/*::[*/0x000D/*::]*/: { /* n:\"BrtShortRk\", */ f:parse_BrtShortRk },\n\t/*::[*/0x000E/*::]*/: { /* n:\"BrtShortError\", */ f:parse_BrtShortError },\n\t/*::[*/0x000F/*::]*/: { /* n:\"BrtShortBool\", */ f:parse_BrtShortBool },\n\t/*::[*/0x0010/*::]*/: { /* n:\"BrtShortReal\", */ f:parse_BrtShortReal },\n\t/*::[*/0x0011/*::]*/: { /* n:\"BrtShortSt\", */ f:parse_BrtShortSt },\n\t/*::[*/0x0012/*::]*/: { /* n:\"BrtShortIsst\", */ f:parse_BrtShortIsst },\n\t/*::[*/0x0013/*::]*/: { /* n:\"BrtSSTItem\", */ f:parse_RichStr },\n\t/*::[*/0x0014/*::]*/: { /* n:\"BrtPCDIMissing\" */ },\n\t/*::[*/0x0015/*::]*/: { /* n:\"BrtPCDINumber\" */ },\n\t/*::[*/0x0016/*::]*/: { /* n:\"BrtPCDIBoolean\" */ },\n\t/*::[*/0x0017/*::]*/: { /* n:\"BrtPCDIError\" */ },\n\t/*::[*/0x0018/*::]*/: { /* n:\"BrtPCDIString\" */ },\n\t/*::[*/0x0019/*::]*/: { /* n:\"BrtPCDIDatetime\" */ },\n\t/*::[*/0x001A/*::]*/: { /* n:\"BrtPCDIIndex\" */ },\n\t/*::[*/0x001B/*::]*/: { /* n:\"BrtPCDIAMissing\" */ },\n\t/*::[*/0x001C/*::]*/: { /* n:\"BrtPCDIANumber\" */ },\n\t/*::[*/0x001D/*::]*/: { /* n:\"BrtPCDIABoolean\" */ },\n\t/*::[*/0x001E/*::]*/: { /* n:\"BrtPCDIAError\" */ },\n\t/*::[*/0x001F/*::]*/: { /* n:\"BrtPCDIAString\" */ },\n\t/*::[*/0x0020/*::]*/: { /* n:\"BrtPCDIADatetime\" */ },\n\t/*::[*/0x0021/*::]*/: { /* n:\"BrtPCRRecord\" */ },\n\t/*::[*/0x0022/*::]*/: { /* n:\"BrtPCRRecordDt\" */ },\n\t/*::[*/0x0023/*::]*/: { /* n:\"BrtFRTBegin\", */ T:1 },\n\t/*::[*/0x0024/*::]*/: { /* n:\"BrtFRTEnd\", */ T:-1 },\n\t/*::[*/0x0025/*::]*/: { /* n:\"BrtACBegin\", */ T:1 },\n\t/*::[*/0x0026/*::]*/: { /* n:\"BrtACEnd\", */ T:-1 },\n\t/*::[*/0x0027/*::]*/: { /* n:\"BrtName\", */ f:parse_BrtName },\n\t/*::[*/0x0028/*::]*/: { /* n:\"BrtIndexRowBlock\" */ },\n\t/*::[*/0x002A/*::]*/: { /* n:\"BrtIndexBlock\" */ },\n\t/*::[*/0x002B/*::]*/: { /* n:\"BrtFont\", */ f:parse_BrtFont },\n\t/*::[*/0x002C/*::]*/: { /* n:\"BrtFmt\", */ f:parse_BrtFmt },\n\t/*::[*/0x002D/*::]*/: { /* n:\"BrtFill\", */ f:parse_BrtFill },\n\t/*::[*/0x002E/*::]*/: { /* n:\"BrtBorder\", */ f:parse_BrtBorder },\n\t/*::[*/0x002F/*::]*/: { /* n:\"BrtXF\", */ f:parse_BrtXF },\n\t/*::[*/0x0030/*::]*/: { /* n:\"BrtStyle\" */ },\n\t/*::[*/0x0031/*::]*/: { /* n:\"BrtCellMeta\", */ f:parse_Int32LE },\n\t/*::[*/0x0032/*::]*/: { /* n:\"BrtValueMeta\" */ },\n\t/*::[*/0x0033/*::]*/: { /* n:\"BrtMdb\" */ f:parse_BrtMdb },\n\t/*::[*/0x0034/*::]*/: { /* n:\"BrtBeginFmd\", */ T:1 },\n\t/*::[*/0x0035/*::]*/: { /* n:\"BrtEndFmd\", */ T:-1 },\n\t/*::[*/0x0036/*::]*/: { /* n:\"BrtBeginMdx\", */ T:1 },\n\t/*::[*/0x0037/*::]*/: { /* n:\"BrtEndMdx\", */ T:-1 },\n\t/*::[*/0x0038/*::]*/: { /* n:\"BrtBeginMdxTuple\", */ T:1 },\n\t/*::[*/0x0039/*::]*/: { /* n:\"BrtEndMdxTuple\", */ T:-1 },\n\t/*::[*/0x003A/*::]*/: { /* n:\"BrtMdxMbrIstr\" */ },\n\t/*::[*/0x003B/*::]*/: { /* n:\"BrtStr\" */ },\n\t/*::[*/0x003C/*::]*/: { /* n:\"BrtColInfo\", */ f:parse_ColInfo },\n\t/*::[*/0x003E/*::]*/: { /* n:\"BrtCellRString\", */ f:parse_BrtCellRString },\n\t/*::[*/0x003F/*::]*/: { /* n:\"BrtCalcChainItem$\", */ f:parse_BrtCalcChainItem$ },\n\t/*::[*/0x0040/*::]*/: { /* n:\"BrtDVal\", */ f:parse_BrtDVal },\n\t/*::[*/0x0041/*::]*/: { /* n:\"BrtSxvcellNum\" */ },\n\t/*::[*/0x0042/*::]*/: { /* n:\"BrtSxvcellStr\" */ },\n\t/*::[*/0x0043/*::]*/: { /* n:\"BrtSxvcellBool\" */ },\n\t/*::[*/0x0044/*::]*/: { /* n:\"BrtSxvcellErr\" */ },\n\t/*::[*/0x0045/*::]*/: { /* n:\"BrtSxvcellDate\" */ },\n\t/*::[*/0x0046/*::]*/: { /* n:\"BrtSxvcellNil\" */ },\n\t/*::[*/0x0080/*::]*/: { /* n:\"BrtFileVersion\" */ },\n\t/*::[*/0x0081/*::]*/: { /* n:\"BrtBeginSheet\", */ T:1 },\n\t/*::[*/0x0082/*::]*/: { /* n:\"BrtEndSheet\", */ T:-1 },\n\t/*::[*/0x0083/*::]*/: { /* n:\"BrtBeginBook\", */ T:1, f:parsenoop, p:0 },\n\t/*::[*/0x0084/*::]*/: { /* n:\"BrtEndBook\", */ T:-1 },\n\t/*::[*/0x0085/*::]*/: { /* n:\"BrtBeginWsViews\", */ T:1 },\n\t/*::[*/0x0086/*::]*/: { /* n:\"BrtEndWsViews\", */ T:-1 },\n\t/*::[*/0x0087/*::]*/: { /* n:\"BrtBeginBookViews\", */ T:1 },\n\t/*::[*/0x0088/*::]*/: { /* n:\"BrtEndBookViews\", */ T:-1 },\n\t/*::[*/0x0089/*::]*/: { /* n:\"BrtBeginWsView\", */ T:1, f:parse_BrtBeginWsView },\n\t/*::[*/0x008A/*::]*/: { /* n:\"BrtEndWsView\", */ T:-1 },\n\t/*::[*/0x008B/*::]*/: { /* n:\"BrtBeginCsViews\", */ T:1 },\n\t/*::[*/0x008C/*::]*/: { /* n:\"BrtEndCsViews\", */ T:-1 },\n\t/*::[*/0x008D/*::]*/: { /* n:\"BrtBeginCsView\", */ T:1 },\n\t/*::[*/0x008E/*::]*/: { /* n:\"BrtEndCsView\", */ T:-1 },\n\t/*::[*/0x008F/*::]*/: { /* n:\"BrtBeginBundleShs\", */ T:1 },\n\t/*::[*/0x0090/*::]*/: { /* n:\"BrtEndBundleShs\", */ T:-1 },\n\t/*::[*/0x0091/*::]*/: { /* n:\"BrtBeginSheetData\", */ T:1 },\n\t/*::[*/0x0092/*::]*/: { /* n:\"BrtEndSheetData\", */ T:-1 },\n\t/*::[*/0x0093/*::]*/: { /* n:\"BrtWsProp\", */ f:parse_BrtWsProp },\n\t/*::[*/0x0094/*::]*/: { /* n:\"BrtWsDim\", */ f:parse_BrtWsDim, p:16 },\n\t/*::[*/0x0097/*::]*/: { /* n:\"BrtPane\", */ f:parse_BrtPane },\n\t/*::[*/0x0098/*::]*/: { /* n:\"BrtSel\" */ },\n\t/*::[*/0x0099/*::]*/: { /* n:\"BrtWbProp\", */ f:parse_BrtWbProp },\n\t/*::[*/0x009A/*::]*/: { /* n:\"BrtWbFactoid\" */ },\n\t/*::[*/0x009B/*::]*/: { /* n:\"BrtFileRecover\" */ },\n\t/*::[*/0x009C/*::]*/: { /* n:\"BrtBundleSh\", */ f:parse_BrtBundleSh },\n\t/*::[*/0x009D/*::]*/: { /* n:\"BrtCalcProp\" */ },\n\t/*::[*/0x009E/*::]*/: { /* n:\"BrtBookView\" */ },\n\t/*::[*/0x009F/*::]*/: { /* n:\"BrtBeginSst\", */ T:1, f:parse_BrtBeginSst },\n\t/*::[*/0x00A0/*::]*/: { /* n:\"BrtEndSst\", */ T:-1 },\n\t/*::[*/0x00A1/*::]*/: { /* n:\"BrtBeginAFilter\", */ T:1, f:parse_UncheckedRfX },\n\t/*::[*/0x00A2/*::]*/: { /* n:\"BrtEndAFilter\", */ T:-1 },\n\t/*::[*/0x00A3/*::]*/: { /* n:\"BrtBeginFilterColumn\", */ T:1 },\n\t/*::[*/0x00A4/*::]*/: { /* n:\"BrtEndFilterColumn\", */ T:-1 },\n\t/*::[*/0x00A5/*::]*/: { /* n:\"BrtBeginFilters\", */ T:1 },\n\t/*::[*/0x00A6/*::]*/: { /* n:\"BrtEndFilters\", */ T:-1 },\n\t/*::[*/0x00A7/*::]*/: { /* n:\"BrtFilter\" */ },\n\t/*::[*/0x00A8/*::]*/: { /* n:\"BrtColorFilter\" */ },\n\t/*::[*/0x00A9/*::]*/: { /* n:\"BrtIconFilter\" */ },\n\t/*::[*/0x00AA/*::]*/: { /* n:\"BrtTop10Filter\" */ },\n\t/*::[*/0x00AB/*::]*/: { /* n:\"BrtDynamicFilter\" */ },\n\t/*::[*/0x00AC/*::]*/: { /* n:\"BrtBeginCustomFilters\", */ T:1 },\n\t/*::[*/0x00AD/*::]*/: { /* n:\"BrtEndCustomFilters\", */ T:-1 },\n\t/*::[*/0x00AE/*::]*/: { /* n:\"BrtCustomFilter\" */ },\n\t/*::[*/0x00AF/*::]*/: { /* n:\"BrtAFilterDateGroupItem\" */ },\n\t/*::[*/0x00B0/*::]*/: { /* n:\"BrtMergeCell\", */ f:parse_BrtMergeCell },\n\t/*::[*/0x00B1/*::]*/: { /* n:\"BrtBeginMergeCells\", */ T:1 },\n\t/*::[*/0x00B2/*::]*/: { /* n:\"BrtEndMergeCells\", */ T:-1 },\n\t/*::[*/0x00B3/*::]*/: { /* n:\"BrtBeginPivotCacheDef\", */ T:1 },\n\t/*::[*/0x00B4/*::]*/: { /* n:\"BrtEndPivotCacheDef\", */ T:-1 },\n\t/*::[*/0x00B5/*::]*/: { /* n:\"BrtBeginPCDFields\", */ T:1 },\n\t/*::[*/0x00B6/*::]*/: { /* n:\"BrtEndPCDFields\", */ T:-1 },\n\t/*::[*/0x00B7/*::]*/: { /* n:\"BrtBeginPCDField\", */ T:1 },\n\t/*::[*/0x00B8/*::]*/: { /* n:\"BrtEndPCDField\", */ T:-1 },\n\t/*::[*/0x00B9/*::]*/: { /* n:\"BrtBeginPCDSource\", */ T:1 },\n\t/*::[*/0x00BA/*::]*/: { /* n:\"BrtEndPCDSource\", */ T:-1 },\n\t/*::[*/0x00BB/*::]*/: { /* n:\"BrtBeginPCDSRange\", */ T:1 },\n\t/*::[*/0x00BC/*::]*/: { /* n:\"BrtEndPCDSRange\", */ T:-1 },\n\t/*::[*/0x00BD/*::]*/: { /* n:\"BrtBeginPCDFAtbl\", */ T:1 },\n\t/*::[*/0x00BE/*::]*/: { /* n:\"BrtEndPCDFAtbl\", */ T:-1 },\n\t/*::[*/0x00BF/*::]*/: { /* n:\"BrtBeginPCDIRun\", */ T:1 },\n\t/*::[*/0x00C0/*::]*/: { /* n:\"BrtEndPCDIRun\", */ T:-1 },\n\t/*::[*/0x00C1/*::]*/: { /* n:\"BrtBeginPivotCacheRecords\", */ T:1 },\n\t/*::[*/0x00C2/*::]*/: { /* n:\"BrtEndPivotCacheRecords\", */ T:-1 },\n\t/*::[*/0x00C3/*::]*/: { /* n:\"BrtBeginPCDHierarchies\", */ T:1 },\n\t/*::[*/0x00C4/*::]*/: { /* n:\"BrtEndPCDHierarchies\", */ T:-1 },\n\t/*::[*/0x00C5/*::]*/: { /* n:\"BrtBeginPCDHierarchy\", */ T:1 },\n\t/*::[*/0x00C6/*::]*/: { /* n:\"BrtEndPCDHierarchy\", */ T:-1 },\n\t/*::[*/0x00C7/*::]*/: { /* n:\"BrtBeginPCDHFieldsUsage\", */ T:1 },\n\t/*::[*/0x00C8/*::]*/: { /* n:\"BrtEndPCDHFieldsUsage\", */ T:-1 },\n\t/*::[*/0x00C9/*::]*/: { /* n:\"BrtBeginExtConnection\", */ T:1 },\n\t/*::[*/0x00CA/*::]*/: { /* n:\"BrtEndExtConnection\", */ T:-1 },\n\t/*::[*/0x00CB/*::]*/: { /* n:\"BrtBeginECDbProps\", */ T:1 },\n\t/*::[*/0x00CC/*::]*/: { /* n:\"BrtEndECDbProps\", */ T:-1 },\n\t/*::[*/0x00CD/*::]*/: { /* n:\"BrtBeginECOlapProps\", */ T:1 },\n\t/*::[*/0x00CE/*::]*/: { /* n:\"BrtEndECOlapProps\", */ T:-1 },\n\t/*::[*/0x00CF/*::]*/: { /* n:\"BrtBeginPCDSConsol\", */ T:1 },\n\t/*::[*/0x00D0/*::]*/: { /* n:\"BrtEndPCDSConsol\", */ T:-1 },\n\t/*::[*/0x00D1/*::]*/: { /* n:\"BrtBeginPCDSCPages\", */ T:1 },\n\t/*::[*/0x00D2/*::]*/: { /* n:\"BrtEndPCDSCPages\", */ T:-1 },\n\t/*::[*/0x00D3/*::]*/: { /* n:\"BrtBeginPCDSCPage\", */ T:1 },\n\t/*::[*/0x00D4/*::]*/: { /* n:\"BrtEndPCDSCPage\", */ T:-1 },\n\t/*::[*/0x00D5/*::]*/: { /* n:\"BrtBeginPCDSCPItem\", */ T:1 },\n\t/*::[*/0x00D6/*::]*/: { /* n:\"BrtEndPCDSCPItem\", */ T:-1 },\n\t/*::[*/0x00D7/*::]*/: { /* n:\"BrtBeginPCDSCSets\", */ T:1 },\n\t/*::[*/0x00D8/*::]*/: { /* n:\"BrtEndPCDSCSets\", */ T:-1 },\n\t/*::[*/0x00D9/*::]*/: { /* n:\"BrtBeginPCDSCSet\", */ T:1 },\n\t/*::[*/0x00DA/*::]*/: { /* n:\"BrtEndPCDSCSet\", */ T:-1 },\n\t/*::[*/0x00DB/*::]*/: { /* n:\"BrtBeginPCDFGroup\", */ T:1 },\n\t/*::[*/0x00DC/*::]*/: { /* n:\"BrtEndPCDFGroup\", */ T:-1 },\n\t/*::[*/0x00DD/*::]*/: { /* n:\"BrtBeginPCDFGItems\", */ T:1 },\n\t/*::[*/0x00DE/*::]*/: { /* n:\"BrtEndPCDFGItems\", */ T:-1 },\n\t/*::[*/0x00DF/*::]*/: { /* n:\"BrtBeginPCDFGRange\", */ T:1 },\n\t/*::[*/0x00E0/*::]*/: { /* n:\"BrtEndPCDFGRange\", */ T:-1 },\n\t/*::[*/0x00E1/*::]*/: { /* n:\"BrtBeginPCDFGDiscrete\", */ T:1 },\n\t/*::[*/0x00E2/*::]*/: { /* n:\"BrtEndPCDFGDiscrete\", */ T:-1 },\n\t/*::[*/0x00E3/*::]*/: { /* n:\"BrtBeginPCDSDTupleCache\", */ T:1 },\n\t/*::[*/0x00E4/*::]*/: { /* n:\"BrtEndPCDSDTupleCache\", */ T:-1 },\n\t/*::[*/0x00E5/*::]*/: { /* n:\"BrtBeginPCDSDTCEntries\", */ T:1 },\n\t/*::[*/0x00E6/*::]*/: { /* n:\"BrtEndPCDSDTCEntries\", */ T:-1 },\n\t/*::[*/0x00E7/*::]*/: { /* n:\"BrtBeginPCDSDTCEMembers\", */ T:1 },\n\t/*::[*/0x00E8/*::]*/: { /* n:\"BrtEndPCDSDTCEMembers\", */ T:-1 },\n\t/*::[*/0x00E9/*::]*/: { /* n:\"BrtBeginPCDSDTCEMember\", */ T:1 },\n\t/*::[*/0x00EA/*::]*/: { /* n:\"BrtEndPCDSDTCEMember\", */ T:-1 },\n\t/*::[*/0x00EB/*::]*/: { /* n:\"BrtBeginPCDSDTCQueries\", */ T:1 },\n\t/*::[*/0x00EC/*::]*/: { /* n:\"BrtEndPCDSDTCQueries\", */ T:-1 },\n\t/*::[*/0x00ED/*::]*/: { /* n:\"BrtBeginPCDSDTCQuery\", */ T:1 },\n\t/*::[*/0x00EE/*::]*/: { /* n:\"BrtEndPCDSDTCQuery\", */ T:-1 },\n\t/*::[*/0x00EF/*::]*/: { /* n:\"BrtBeginPCDSDTCSets\", */ T:1 },\n\t/*::[*/0x00F0/*::]*/: { /* n:\"BrtEndPCDSDTCSets\", */ T:-1 },\n\t/*::[*/0x00F1/*::]*/: { /* n:\"BrtBeginPCDSDTCSet\", */ T:1 },\n\t/*::[*/0x00F2/*::]*/: { /* n:\"BrtEndPCDSDTCSet\", */ T:-1 },\n\t/*::[*/0x00F3/*::]*/: { /* n:\"BrtBeginPCDCalcItems\", */ T:1 },\n\t/*::[*/0x00F4/*::]*/: { /* n:\"BrtEndPCDCalcItems\", */ T:-1 },\n\t/*::[*/0x00F5/*::]*/: { /* n:\"BrtBeginPCDCalcItem\", */ T:1 },\n\t/*::[*/0x00F6/*::]*/: { /* n:\"BrtEndPCDCalcItem\", */ T:-1 },\n\t/*::[*/0x00F7/*::]*/: { /* n:\"BrtBeginPRule\", */ T:1 },\n\t/*::[*/0x00F8/*::]*/: { /* n:\"BrtEndPRule\", */ T:-1 },\n\t/*::[*/0x00F9/*::]*/: { /* n:\"BrtBeginPRFilters\", */ T:1 },\n\t/*::[*/0x00FA/*::]*/: { /* n:\"BrtEndPRFilters\", */ T:-1 },\n\t/*::[*/0x00FB/*::]*/: { /* n:\"BrtBeginPRFilter\", */ T:1 },\n\t/*::[*/0x00FC/*::]*/: { /* n:\"BrtEndPRFilter\", */ T:-1 },\n\t/*::[*/0x00FD/*::]*/: { /* n:\"BrtBeginPNames\", */ T:1 },\n\t/*::[*/0x00FE/*::]*/: { /* n:\"BrtEndPNames\", */ T:-1 },\n\t/*::[*/0x00FF/*::]*/: { /* n:\"BrtBeginPName\", */ T:1 },\n\t/*::[*/0x0100/*::]*/: { /* n:\"BrtEndPName\", */ T:-1 },\n\t/*::[*/0x0101/*::]*/: { /* n:\"BrtBeginPNPairs\", */ T:1 },\n\t/*::[*/0x0102/*::]*/: { /* n:\"BrtEndPNPairs\", */ T:-1 },\n\t/*::[*/0x0103/*::]*/: { /* n:\"BrtBeginPNPair\", */ T:1 },\n\t/*::[*/0x0104/*::]*/: { /* n:\"BrtEndPNPair\", */ T:-1 },\n\t/*::[*/0x0105/*::]*/: { /* n:\"BrtBeginECWebProps\", */ T:1 },\n\t/*::[*/0x0106/*::]*/: { /* n:\"BrtEndECWebProps\", */ T:-1 },\n\t/*::[*/0x0107/*::]*/: { /* n:\"BrtBeginEcWpTables\", */ T:1 },\n\t/*::[*/0x0108/*::]*/: { /* n:\"BrtEndECWPTables\", */ T:-1 },\n\t/*::[*/0x0109/*::]*/: { /* n:\"BrtBeginECParams\", */ T:1 },\n\t/*::[*/0x010A/*::]*/: { /* n:\"BrtEndECParams\", */ T:-1 },\n\t/*::[*/0x010B/*::]*/: { /* n:\"BrtBeginECParam\", */ T:1 },\n\t/*::[*/0x010C/*::]*/: { /* n:\"BrtEndECParam\", */ T:-1 },\n\t/*::[*/0x010D/*::]*/: { /* n:\"BrtBeginPCDKPIs\", */ T:1 },\n\t/*::[*/0x010E/*::]*/: { /* n:\"BrtEndPCDKPIs\", */ T:-1 },\n\t/*::[*/0x010F/*::]*/: { /* n:\"BrtBeginPCDKPI\", */ T:1 },\n\t/*::[*/0x0110/*::]*/: { /* n:\"BrtEndPCDKPI\", */ T:-1 },\n\t/*::[*/0x0111/*::]*/: { /* n:\"BrtBeginDims\", */ T:1 },\n\t/*::[*/0x0112/*::]*/: { /* n:\"BrtEndDims\", */ T:-1 },\n\t/*::[*/0x0113/*::]*/: { /* n:\"BrtBeginDim\", */ T:1 },\n\t/*::[*/0x0114/*::]*/: { /* n:\"BrtEndDim\", */ T:-1 },\n\t/*::[*/0x0115/*::]*/: { /* n:\"BrtIndexPartEnd\" */ },\n\t/*::[*/0x0116/*::]*/: { /* n:\"BrtBeginStyleSheet\", */ T:1 },\n\t/*::[*/0x0117/*::]*/: { /* n:\"BrtEndStyleSheet\", */ T:-1 },\n\t/*::[*/0x0118/*::]*/: { /* n:\"BrtBeginSXView\", */ T:1 },\n\t/*::[*/0x0119/*::]*/: { /* n:\"BrtEndSXVI\", */ T:-1 },\n\t/*::[*/0x011A/*::]*/: { /* n:\"BrtBeginSXVI\", */ T:1 },\n\t/*::[*/0x011B/*::]*/: { /* n:\"BrtBeginSXVIs\", */ T:1 },\n\t/*::[*/0x011C/*::]*/: { /* n:\"BrtEndSXVIs\", */ T:-1 },\n\t/*::[*/0x011D/*::]*/: { /* n:\"BrtBeginSXVD\", */ T:1 },\n\t/*::[*/0x011E/*::]*/: { /* n:\"BrtEndSXVD\", */ T:-1 },\n\t/*::[*/0x011F/*::]*/: { /* n:\"BrtBeginSXVDs\", */ T:1 },\n\t/*::[*/0x0120/*::]*/: { /* n:\"BrtEndSXVDs\", */ T:-1 },\n\t/*::[*/0x0121/*::]*/: { /* n:\"BrtBeginSXPI\", */ T:1 },\n\t/*::[*/0x0122/*::]*/: { /* n:\"BrtEndSXPI\", */ T:-1 },\n\t/*::[*/0x0123/*::]*/: { /* n:\"BrtBeginSXPIs\", */ T:1 },\n\t/*::[*/0x0124/*::]*/: { /* n:\"BrtEndSXPIs\", */ T:-1 },\n\t/*::[*/0x0125/*::]*/: { /* n:\"BrtBeginSXDI\", */ T:1 },\n\t/*::[*/0x0126/*::]*/: { /* n:\"BrtEndSXDI\", */ T:-1 },\n\t/*::[*/0x0127/*::]*/: { /* n:\"BrtBeginSXDIs\", */ T:1 },\n\t/*::[*/0x0128/*::]*/: { /* n:\"BrtEndSXDIs\", */ T:-1 },\n\t/*::[*/0x0129/*::]*/: { /* n:\"BrtBeginSXLI\", */ T:1 },\n\t/*::[*/0x012A/*::]*/: { /* n:\"BrtEndSXLI\", */ T:-1 },\n\t/*::[*/0x012B/*::]*/: { /* n:\"BrtBeginSXLIRws\", */ T:1 },\n\t/*::[*/0x012C/*::]*/: { /* n:\"BrtEndSXLIRws\", */ T:-1 },\n\t/*::[*/0x012D/*::]*/: { /* n:\"BrtBeginSXLICols\", */ T:1 },\n\t/*::[*/0x012E/*::]*/: { /* n:\"BrtEndSXLICols\", */ T:-1 },\n\t/*::[*/0x012F/*::]*/: { /* n:\"BrtBeginSXFormat\", */ T:1 },\n\t/*::[*/0x0130/*::]*/: { /* n:\"BrtEndSXFormat\", */ T:-1 },\n\t/*::[*/0x0131/*::]*/: { /* n:\"BrtBeginSXFormats\", */ T:1 },\n\t/*::[*/0x0132/*::]*/: { /* n:\"BrtEndSxFormats\", */ T:-1 },\n\t/*::[*/0x0133/*::]*/: { /* n:\"BrtBeginSxSelect\", */ T:1 },\n\t/*::[*/0x0134/*::]*/: { /* n:\"BrtEndSxSelect\", */ T:-1 },\n\t/*::[*/0x0135/*::]*/: { /* n:\"BrtBeginISXVDRws\", */ T:1 },\n\t/*::[*/0x0136/*::]*/: { /* n:\"BrtEndISXVDRws\", */ T:-1 },\n\t/*::[*/0x0137/*::]*/: { /* n:\"BrtBeginISXVDCols\", */ T:1 },\n\t/*::[*/0x0138/*::]*/: { /* n:\"BrtEndISXVDCols\", */ T:-1 },\n\t/*::[*/0x0139/*::]*/: { /* n:\"BrtEndSXLocation\", */ T:-1 },\n\t/*::[*/0x013A/*::]*/: { /* n:\"BrtBeginSXLocation\", */ T:1 },\n\t/*::[*/0x013B/*::]*/: { /* n:\"BrtEndSXView\", */ T:-1 },\n\t/*::[*/0x013C/*::]*/: { /* n:\"BrtBeginSXTHs\", */ T:1 },\n\t/*::[*/0x013D/*::]*/: { /* n:\"BrtEndSXTHs\", */ T:-1 },\n\t/*::[*/0x013E/*::]*/: { /* n:\"BrtBeginSXTH\", */ T:1 },\n\t/*::[*/0x013F/*::]*/: { /* n:\"BrtEndSXTH\", */ T:-1 },\n\t/*::[*/0x0140/*::]*/: { /* n:\"BrtBeginISXTHRws\", */ T:1 },\n\t/*::[*/0x0141/*::]*/: { /* n:\"BrtEndISXTHRws\", */ T:-1 },\n\t/*::[*/0x0142/*::]*/: { /* n:\"BrtBeginISXTHCols\", */ T:1 },\n\t/*::[*/0x0143/*::]*/: { /* n:\"BrtEndISXTHCols\", */ T:-1 },\n\t/*::[*/0x0144/*::]*/: { /* n:\"BrtBeginSXTDMPS\", */ T:1 },\n\t/*::[*/0x0145/*::]*/: { /* n:\"BrtEndSXTDMPs\", */ T:-1 },\n\t/*::[*/0x0146/*::]*/: { /* n:\"BrtBeginSXTDMP\", */ T:1 },\n\t/*::[*/0x0147/*::]*/: { /* n:\"BrtEndSXTDMP\", */ T:-1 },\n\t/*::[*/0x0148/*::]*/: { /* n:\"BrtBeginSXTHItems\", */ T:1 },\n\t/*::[*/0x0149/*::]*/: { /* n:\"BrtEndSXTHItems\", */ T:-1 },\n\t/*::[*/0x014A/*::]*/: { /* n:\"BrtBeginSXTHItem\", */ T:1 },\n\t/*::[*/0x014B/*::]*/: { /* n:\"BrtEndSXTHItem\", */ T:-1 },\n\t/*::[*/0x014C/*::]*/: { /* n:\"BrtBeginMetadata\", */ T:1 },\n\t/*::[*/0x014D/*::]*/: { /* n:\"BrtEndMetadata\", */ T:-1 },\n\t/*::[*/0x014E/*::]*/: { /* n:\"BrtBeginEsmdtinfo\", */ T:1 },\n\t/*::[*/0x014F/*::]*/: { /* n:\"BrtMdtinfo\", */ f:parse_BrtMdtinfo },\n\t/*::[*/0x0150/*::]*/: { /* n:\"BrtEndEsmdtinfo\", */ T:-1 },\n\t/*::[*/0x0151/*::]*/: { /* n:\"BrtBeginEsmdb\", */ f:parse_BrtBeginEsmdb, T:1 },\n\t/*::[*/0x0152/*::]*/: { /* n:\"BrtEndEsmdb\", */ T:-1 },\n\t/*::[*/0x0153/*::]*/: { /* n:\"BrtBeginEsfmd\", */ T:1 },\n\t/*::[*/0x0154/*::]*/: { /* n:\"BrtEndEsfmd\", */ T:-1 },\n\t/*::[*/0x0155/*::]*/: { /* n:\"BrtBeginSingleCells\", */ T:1 },\n\t/*::[*/0x0156/*::]*/: { /* n:\"BrtEndSingleCells\", */ T:-1 },\n\t/*::[*/0x0157/*::]*/: { /* n:\"BrtBeginList\", */ T:1 },\n\t/*::[*/0x0158/*::]*/: { /* n:\"BrtEndList\", */ T:-1 },\n\t/*::[*/0x0159/*::]*/: { /* n:\"BrtBeginListCols\", */ T:1 },\n\t/*::[*/0x015A/*::]*/: { /* n:\"BrtEndListCols\", */ T:-1 },\n\t/*::[*/0x015B/*::]*/: { /* n:\"BrtBeginListCol\", */ T:1 },\n\t/*::[*/0x015C/*::]*/: { /* n:\"BrtEndListCol\", */ T:-1 },\n\t/*::[*/0x015D/*::]*/: { /* n:\"BrtBeginListXmlCPr\", */ T:1 },\n\t/*::[*/0x015E/*::]*/: { /* n:\"BrtEndListXmlCPr\", */ T:-1 },\n\t/*::[*/0x015F/*::]*/: { /* n:\"BrtListCCFmla\" */ },\n\t/*::[*/0x0160/*::]*/: { /* n:\"BrtListTrFmla\" */ },\n\t/*::[*/0x0161/*::]*/: { /* n:\"BrtBeginExternals\", */ T:1 },\n\t/*::[*/0x0162/*::]*/: { /* n:\"BrtEndExternals\", */ T:-1 },\n\t/*::[*/0x0163/*::]*/: { /* n:\"BrtSupBookSrc\", */ f:parse_RelID},\n\t/*::[*/0x0165/*::]*/: { /* n:\"BrtSupSelf\" */ },\n\t/*::[*/0x0166/*::]*/: { /* n:\"BrtSupSame\" */ },\n\t/*::[*/0x0167/*::]*/: { /* n:\"BrtSupTabs\" */ },\n\t/*::[*/0x0168/*::]*/: { /* n:\"BrtBeginSupBook\", */ T:1 },\n\t/*::[*/0x0169/*::]*/: { /* n:\"BrtPlaceholderName\" */ },\n\t/*::[*/0x016A/*::]*/: { /* n:\"BrtExternSheet\", */ f:parse_ExternSheet },\n\t/*::[*/0x016B/*::]*/: { /* n:\"BrtExternTableStart\" */ },\n\t/*::[*/0x016C/*::]*/: { /* n:\"BrtExternTableEnd\" */ },\n\t/*::[*/0x016E/*::]*/: { /* n:\"BrtExternRowHdr\" */ },\n\t/*::[*/0x016F/*::]*/: { /* n:\"BrtExternCellBlank\" */ },\n\t/*::[*/0x0170/*::]*/: { /* n:\"BrtExternCellReal\" */ },\n\t/*::[*/0x0171/*::]*/: { /* n:\"BrtExternCellBool\" */ },\n\t/*::[*/0x0172/*::]*/: { /* n:\"BrtExternCellError\" */ },\n\t/*::[*/0x0173/*::]*/: { /* n:\"BrtExternCellString\" */ },\n\t/*::[*/0x0174/*::]*/: { /* n:\"BrtBeginEsmdx\", */ T:1 },\n\t/*::[*/0x0175/*::]*/: { /* n:\"BrtEndEsmdx\", */ T:-1 },\n\t/*::[*/0x0176/*::]*/: { /* n:\"BrtBeginMdxSet\", */ T:1 },\n\t/*::[*/0x0177/*::]*/: { /* n:\"BrtEndMdxSet\", */ T:-1 },\n\t/*::[*/0x0178/*::]*/: { /* n:\"BrtBeginMdxMbrProp\", */ T:1 },\n\t/*::[*/0x0179/*::]*/: { /* n:\"BrtEndMdxMbrProp\", */ T:-1 },\n\t/*::[*/0x017A/*::]*/: { /* n:\"BrtBeginMdxKPI\", */ T:1 },\n\t/*::[*/0x017B/*::]*/: { /* n:\"BrtEndMdxKPI\", */ T:-1 },\n\t/*::[*/0x017C/*::]*/: { /* n:\"BrtBeginEsstr\", */ T:1 },\n\t/*::[*/0x017D/*::]*/: { /* n:\"BrtEndEsstr\", */ T:-1 },\n\t/*::[*/0x017E/*::]*/: { /* n:\"BrtBeginPRFItem\", */ T:1 },\n\t/*::[*/0x017F/*::]*/: { /* n:\"BrtEndPRFItem\", */ T:-1 },\n\t/*::[*/0x0180/*::]*/: { /* n:\"BrtBeginPivotCacheIDs\", */ T:1 },\n\t/*::[*/0x0181/*::]*/: { /* n:\"BrtEndPivotCacheIDs\", */ T:-1 },\n\t/*::[*/0x0182/*::]*/: { /* n:\"BrtBeginPivotCacheID\", */ T:1 },\n\t/*::[*/0x0183/*::]*/: { /* n:\"BrtEndPivotCacheID\", */ T:-1 },\n\t/*::[*/0x0184/*::]*/: { /* n:\"BrtBeginISXVIs\", */ T:1 },\n\t/*::[*/0x0185/*::]*/: { /* n:\"BrtEndISXVIs\", */ T:-1 },\n\t/*::[*/0x0186/*::]*/: { /* n:\"BrtBeginColInfos\", */ T:1 },\n\t/*::[*/0x0187/*::]*/: { /* n:\"BrtEndColInfos\", */ T:-1 },\n\t/*::[*/0x0188/*::]*/: { /* n:\"BrtBeginRwBrk\", */ T:1 },\n\t/*::[*/0x0189/*::]*/: { /* n:\"BrtEndRwBrk\", */ T:-1 },\n\t/*::[*/0x018A/*::]*/: { /* n:\"BrtBeginColBrk\", */ T:1 },\n\t/*::[*/0x018B/*::]*/: { /* n:\"BrtEndColBrk\", */ T:-1 },\n\t/*::[*/0x018C/*::]*/: { /* n:\"BrtBrk\" */ },\n\t/*::[*/0x018D/*::]*/: { /* n:\"BrtUserBookView\" */ },\n\t/*::[*/0x018E/*::]*/: { /* n:\"BrtInfo\" */ },\n\t/*::[*/0x018F/*::]*/: { /* n:\"BrtCUsr\" */ },\n\t/*::[*/0x0190/*::]*/: { /* n:\"BrtUsr\" */ },\n\t/*::[*/0x0191/*::]*/: { /* n:\"BrtBeginUsers\", */ T:1 },\n\t/*::[*/0x0193/*::]*/: { /* n:\"BrtEOF\" */ },\n\t/*::[*/0x0194/*::]*/: { /* n:\"BrtUCR\" */ },\n\t/*::[*/0x0195/*::]*/: { /* n:\"BrtRRInsDel\" */ },\n\t/*::[*/0x0196/*::]*/: { /* n:\"BrtRREndInsDel\" */ },\n\t/*::[*/0x0197/*::]*/: { /* n:\"BrtRRMove\" */ },\n\t/*::[*/0x0198/*::]*/: { /* n:\"BrtRREndMove\" */ },\n\t/*::[*/0x0199/*::]*/: { /* n:\"BrtRRChgCell\" */ },\n\t/*::[*/0x019A/*::]*/: { /* n:\"BrtRREndChgCell\" */ },\n\t/*::[*/0x019B/*::]*/: { /* n:\"BrtRRHeader\" */ },\n\t/*::[*/0x019C/*::]*/: { /* n:\"BrtRRUserView\" */ },\n\t/*::[*/0x019D/*::]*/: { /* n:\"BrtRRRenSheet\" */ },\n\t/*::[*/0x019E/*::]*/: { /* n:\"BrtRRInsertSh\" */ },\n\t/*::[*/0x019F/*::]*/: { /* n:\"BrtRRDefName\" */ },\n\t/*::[*/0x01A0/*::]*/: { /* n:\"BrtRRNote\" */ },\n\t/*::[*/0x01A1/*::]*/: { /* n:\"BrtRRConflict\" */ },\n\t/*::[*/0x01A2/*::]*/: { /* n:\"BrtRRTQSIF\" */ },\n\t/*::[*/0x01A3/*::]*/: { /* n:\"BrtRRFormat\" */ },\n\t/*::[*/0x01A4/*::]*/: { /* n:\"BrtRREndFormat\" */ },\n\t/*::[*/0x01A5/*::]*/: { /* n:\"BrtRRAutoFmt\" */ },\n\t/*::[*/0x01A6/*::]*/: { /* n:\"BrtBeginUserShViews\", */ T:1 },\n\t/*::[*/0x01A7/*::]*/: { /* n:\"BrtBeginUserShView\", */ T:1 },\n\t/*::[*/0x01A8/*::]*/: { /* n:\"BrtEndUserShView\", */ T:-1 },\n\t/*::[*/0x01A9/*::]*/: { /* n:\"BrtEndUserShViews\", */ T:-1 },\n\t/*::[*/0x01AA/*::]*/: { /* n:\"BrtArrFmla\", */ f:parse_BrtArrFmla },\n\t/*::[*/0x01AB/*::]*/: { /* n:\"BrtShrFmla\", */ f:parse_BrtShrFmla },\n\t/*::[*/0x01AC/*::]*/: { /* n:\"BrtTable\" */ },\n\t/*::[*/0x01AD/*::]*/: { /* n:\"BrtBeginExtConnections\", */ T:1 },\n\t/*::[*/0x01AE/*::]*/: { /* n:\"BrtEndExtConnections\", */ T:-1 },\n\t/*::[*/0x01AF/*::]*/: { /* n:\"BrtBeginPCDCalcMems\", */ T:1 },\n\t/*::[*/0x01B0/*::]*/: { /* n:\"BrtEndPCDCalcMems\", */ T:-1 },\n\t/*::[*/0x01B1/*::]*/: { /* n:\"BrtBeginPCDCalcMem\", */ T:1 },\n\t/*::[*/0x01B2/*::]*/: { /* n:\"BrtEndPCDCalcMem\", */ T:-1 },\n\t/*::[*/0x01B3/*::]*/: { /* n:\"BrtBeginPCDHGLevels\", */ T:1 },\n\t/*::[*/0x01B4/*::]*/: { /* n:\"BrtEndPCDHGLevels\", */ T:-1 },\n\t/*::[*/0x01B5/*::]*/: { /* n:\"BrtBeginPCDHGLevel\", */ T:1 },\n\t/*::[*/0x01B6/*::]*/: { /* n:\"BrtEndPCDHGLevel\", */ T:-1 },\n\t/*::[*/0x01B7/*::]*/: { /* n:\"BrtBeginPCDHGLGroups\", */ T:1 },\n\t/*::[*/0x01B8/*::]*/: { /* n:\"BrtEndPCDHGLGroups\", */ T:-1 },\n\t/*::[*/0x01B9/*::]*/: { /* n:\"BrtBeginPCDHGLGroup\", */ T:1 },\n\t/*::[*/0x01BA/*::]*/: { /* n:\"BrtEndPCDHGLGroup\", */ T:-1 },\n\t/*::[*/0x01BB/*::]*/: { /* n:\"BrtBeginPCDHGLGMembers\", */ T:1 },\n\t/*::[*/0x01BC/*::]*/: { /* n:\"BrtEndPCDHGLGMembers\", */ T:-1 },\n\t/*::[*/0x01BD/*::]*/: { /* n:\"BrtBeginPCDHGLGMember\", */ T:1 },\n\t/*::[*/0x01BE/*::]*/: { /* n:\"BrtEndPCDHGLGMember\", */ T:-1 },\n\t/*::[*/0x01BF/*::]*/: { /* n:\"BrtBeginQSI\", */ T:1 },\n\t/*::[*/0x01C0/*::]*/: { /* n:\"BrtEndQSI\", */ T:-1 },\n\t/*::[*/0x01C1/*::]*/: { /* n:\"BrtBeginQSIR\", */ T:1 },\n\t/*::[*/0x01C2/*::]*/: { /* n:\"BrtEndQSIR\", */ T:-1 },\n\t/*::[*/0x01C3/*::]*/: { /* n:\"BrtBeginDeletedNames\", */ T:1 },\n\t/*::[*/0x01C4/*::]*/: { /* n:\"BrtEndDeletedNames\", */ T:-1 },\n\t/*::[*/0x01C5/*::]*/: { /* n:\"BrtBeginDeletedName\", */ T:1 },\n\t/*::[*/0x01C6/*::]*/: { /* n:\"BrtEndDeletedName\", */ T:-1 },\n\t/*::[*/0x01C7/*::]*/: { /* n:\"BrtBeginQSIFs\", */ T:1 },\n\t/*::[*/0x01C8/*::]*/: { /* n:\"BrtEndQSIFs\", */ T:-1 },\n\t/*::[*/0x01C9/*::]*/: { /* n:\"BrtBeginQSIF\", */ T:1 },\n\t/*::[*/0x01CA/*::]*/: { /* n:\"BrtEndQSIF\", */ T:-1 },\n\t/*::[*/0x01CB/*::]*/: { /* n:\"BrtBeginAutoSortScope\", */ T:1 },\n\t/*::[*/0x01CC/*::]*/: { /* n:\"BrtEndAutoSortScope\", */ T:-1 },\n\t/*::[*/0x01CD/*::]*/: { /* n:\"BrtBeginConditionalFormatting\", */ T:1 },\n\t/*::[*/0x01CE/*::]*/: { /* n:\"BrtEndConditionalFormatting\", */ T:-1 },\n\t/*::[*/0x01CF/*::]*/: { /* n:\"BrtBeginCFRule\", */ T:1 },\n\t/*::[*/0x01D0/*::]*/: { /* n:\"BrtEndCFRule\", */ T:-1 },\n\t/*::[*/0x01D1/*::]*/: { /* n:\"BrtBeginIconSet\", */ T:1 },\n\t/*::[*/0x01D2/*::]*/: { /* n:\"BrtEndIconSet\", */ T:-1 },\n\t/*::[*/0x01D3/*::]*/: { /* n:\"BrtBeginDatabar\", */ T:1 },\n\t/*::[*/0x01D4/*::]*/: { /* n:\"BrtEndDatabar\", */ T:-1 },\n\t/*::[*/0x01D5/*::]*/: { /* n:\"BrtBeginColorScale\", */ T:1 },\n\t/*::[*/0x01D6/*::]*/: { /* n:\"BrtEndColorScale\", */ T:-1 },\n\t/*::[*/0x01D7/*::]*/: { /* n:\"BrtCFVO\" */ },\n\t/*::[*/0x01D8/*::]*/: { /* n:\"BrtExternValueMeta\" */ },\n\t/*::[*/0x01D9/*::]*/: { /* n:\"BrtBeginColorPalette\", */ T:1 },\n\t/*::[*/0x01DA/*::]*/: { /* n:\"BrtEndColorPalette\", */ T:-1 },\n\t/*::[*/0x01DB/*::]*/: { /* n:\"BrtIndexedColor\" */ },\n\t/*::[*/0x01DC/*::]*/: { /* n:\"BrtMargins\", */ f:parse_BrtMargins },\n\t/*::[*/0x01DD/*::]*/: { /* n:\"BrtPrintOptions\" */ },\n\t/*::[*/0x01DE/*::]*/: { /* n:\"BrtPageSetup\" */ },\n\t/*::[*/0x01DF/*::]*/: { /* n:\"BrtBeginHeaderFooter\", */ T:1 },\n\t/*::[*/0x01E0/*::]*/: { /* n:\"BrtEndHeaderFooter\", */ T:-1 },\n\t/*::[*/0x01E1/*::]*/: { /* n:\"BrtBeginSXCrtFormat\", */ T:1 },\n\t/*::[*/0x01E2/*::]*/: { /* n:\"BrtEndSXCrtFormat\", */ T:-1 },\n\t/*::[*/0x01E3/*::]*/: { /* n:\"BrtBeginSXCrtFormats\", */ T:1 },\n\t/*::[*/0x01E4/*::]*/: { /* n:\"BrtEndSXCrtFormats\", */ T:-1 },\n\t/*::[*/0x01E5/*::]*/: { /* n:\"BrtWsFmtInfo\", */ f:parse_BrtWsFmtInfo },\n\t/*::[*/0x01E6/*::]*/: { /* n:\"BrtBeginMgs\", */ T:1 },\n\t/*::[*/0x01E7/*::]*/: { /* n:\"BrtEndMGs\", */ T:-1 },\n\t/*::[*/0x01E8/*::]*/: { /* n:\"BrtBeginMGMaps\", */ T:1 },\n\t/*::[*/0x01E9/*::]*/: { /* n:\"BrtEndMGMaps\", */ T:-1 },\n\t/*::[*/0x01EA/*::]*/: { /* n:\"BrtBeginMG\", */ T:1 },\n\t/*::[*/0x01EB/*::]*/: { /* n:\"BrtEndMG\", */ T:-1 },\n\t/*::[*/0x01EC/*::]*/: { /* n:\"BrtBeginMap\", */ T:1 },\n\t/*::[*/0x01ED/*::]*/: { /* n:\"BrtEndMap\", */ T:-1 },\n\t/*::[*/0x01EE/*::]*/: { /* n:\"BrtHLink\", */ f:parse_BrtHLink },\n\t/*::[*/0x01EF/*::]*/: { /* n:\"BrtBeginDCon\", */ T:1 },\n\t/*::[*/0x01F0/*::]*/: { /* n:\"BrtEndDCon\", */ T:-1 },\n\t/*::[*/0x01F1/*::]*/: { /* n:\"BrtBeginDRefs\", */ T:1 },\n\t/*::[*/0x01F2/*::]*/: { /* n:\"BrtEndDRefs\", */ T:-1 },\n\t/*::[*/0x01F3/*::]*/: { /* n:\"BrtDRef\" */ },\n\t/*::[*/0x01F4/*::]*/: { /* n:\"BrtBeginScenMan\", */ T:1 },\n\t/*::[*/0x01F5/*::]*/: { /* n:\"BrtEndScenMan\", */ T:-1 },\n\t/*::[*/0x01F6/*::]*/: { /* n:\"BrtBeginSct\", */ T:1 },\n\t/*::[*/0x01F7/*::]*/: { /* n:\"BrtEndSct\", */ T:-1 },\n\t/*::[*/0x01F8/*::]*/: { /* n:\"BrtSlc\" */ },\n\t/*::[*/0x01F9/*::]*/: { /* n:\"BrtBeginDXFs\", */ T:1 },\n\t/*::[*/0x01FA/*::]*/: { /* n:\"BrtEndDXFs\", */ T:-1 },\n\t/*::[*/0x01FB/*::]*/: { /* n:\"BrtDXF\" */ },\n\t/*::[*/0x01FC/*::]*/: { /* n:\"BrtBeginTableStyles\", */ T:1 },\n\t/*::[*/0x01FD/*::]*/: { /* n:\"BrtEndTableStyles\", */ T:-1 },\n\t/*::[*/0x01FE/*::]*/: { /* n:\"BrtBeginTableStyle\", */ T:1 },\n\t/*::[*/0x01FF/*::]*/: { /* n:\"BrtEndTableStyle\", */ T:-1 },\n\t/*::[*/0x0200/*::]*/: { /* n:\"BrtTableStyleElement\" */ },\n\t/*::[*/0x0201/*::]*/: { /* n:\"BrtTableStyleClient\" */ },\n\t/*::[*/0x0202/*::]*/: { /* n:\"BrtBeginVolDeps\", */ T:1 },\n\t/*::[*/0x0203/*::]*/: { /* n:\"BrtEndVolDeps\", */ T:-1 },\n\t/*::[*/0x0204/*::]*/: { /* n:\"BrtBeginVolType\", */ T:1 },\n\t/*::[*/0x0205/*::]*/: { /* n:\"BrtEndVolType\", */ T:-1 },\n\t/*::[*/0x0206/*::]*/: { /* n:\"BrtBeginVolMain\", */ T:1 },\n\t/*::[*/0x0207/*::]*/: { /* n:\"BrtEndVolMain\", */ T:-1 },\n\t/*::[*/0x0208/*::]*/: { /* n:\"BrtBeginVolTopic\", */ T:1 },\n\t/*::[*/0x0209/*::]*/: { /* n:\"BrtEndVolTopic\", */ T:-1 },\n\t/*::[*/0x020A/*::]*/: { /* n:\"BrtVolSubtopic\" */ },\n\t/*::[*/0x020B/*::]*/: { /* n:\"BrtVolRef\" */ },\n\t/*::[*/0x020C/*::]*/: { /* n:\"BrtVolNum\" */ },\n\t/*::[*/0x020D/*::]*/: { /* n:\"BrtVolErr\" */ },\n\t/*::[*/0x020E/*::]*/: { /* n:\"BrtVolStr\" */ },\n\t/*::[*/0x020F/*::]*/: { /* n:\"BrtVolBool\" */ },\n\t/*::[*/0x0210/*::]*/: { /* n:\"BrtBeginCalcChain$\", */ T:1 },\n\t/*::[*/0x0211/*::]*/: { /* n:\"BrtEndCalcChain$\", */ T:-1 },\n\t/*::[*/0x0212/*::]*/: { /* n:\"BrtBeginSortState\", */ T:1 },\n\t/*::[*/0x0213/*::]*/: { /* n:\"BrtEndSortState\", */ T:-1 },\n\t/*::[*/0x0214/*::]*/: { /* n:\"BrtBeginSortCond\", */ T:1 },\n\t/*::[*/0x0215/*::]*/: { /* n:\"BrtEndSortCond\", */ T:-1 },\n\t/*::[*/0x0216/*::]*/: { /* n:\"BrtBookProtection\" */ },\n\t/*::[*/0x0217/*::]*/: { /* n:\"BrtSheetProtection\" */ },\n\t/*::[*/0x0218/*::]*/: { /* n:\"BrtRangeProtection\" */ },\n\t/*::[*/0x0219/*::]*/: { /* n:\"BrtPhoneticInfo\" */ },\n\t/*::[*/0x021A/*::]*/: { /* n:\"BrtBeginECTxtWiz\", */ T:1 },\n\t/*::[*/0x021B/*::]*/: { /* n:\"BrtEndECTxtWiz\", */ T:-1 },\n\t/*::[*/0x021C/*::]*/: { /* n:\"BrtBeginECTWFldInfoLst\", */ T:1 },\n\t/*::[*/0x021D/*::]*/: { /* n:\"BrtEndECTWFldInfoLst\", */ T:-1 },\n\t/*::[*/0x021E/*::]*/: { /* n:\"BrtBeginECTwFldInfo\", */ T:1 },\n\t/*::[*/0x0224/*::]*/: { /* n:\"BrtFileSharing\" */ },\n\t/*::[*/0x0225/*::]*/: { /* n:\"BrtOleSize\" */ },\n\t/*::[*/0x0226/*::]*/: { /* n:\"BrtDrawing\", */ f:parse_RelID },\n\t/*::[*/0x0227/*::]*/: { /* n:\"BrtLegacyDrawing\" */ },\n\t/*::[*/0x0228/*::]*/: { /* n:\"BrtLegacyDrawingHF\" */ },\n\t/*::[*/0x0229/*::]*/: { /* n:\"BrtWebOpt\" */ },\n\t/*::[*/0x022A/*::]*/: { /* n:\"BrtBeginWebPubItems\", */ T:1 },\n\t/*::[*/0x022B/*::]*/: { /* n:\"BrtEndWebPubItems\", */ T:-1 },\n\t/*::[*/0x022C/*::]*/: { /* n:\"BrtBeginWebPubItem\", */ T:1 },\n\t/*::[*/0x022D/*::]*/: { /* n:\"BrtEndWebPubItem\", */ T:-1 },\n\t/*::[*/0x022E/*::]*/: { /* n:\"BrtBeginSXCondFmt\", */ T:1 },\n\t/*::[*/0x022F/*::]*/: { /* n:\"BrtEndSXCondFmt\", */ T:-1 },\n\t/*::[*/0x0230/*::]*/: { /* n:\"BrtBeginSXCondFmts\", */ T:1 },\n\t/*::[*/0x0231/*::]*/: { /* n:\"BrtEndSXCondFmts\", */ T:-1 },\n\t/*::[*/0x0232/*::]*/: { /* n:\"BrtBkHim\" */ },\n\t/*::[*/0x0234/*::]*/: { /* n:\"BrtColor\" */ },\n\t/*::[*/0x0235/*::]*/: { /* n:\"BrtBeginIndexedColors\", */ T:1 },\n\t/*::[*/0x0236/*::]*/: { /* n:\"BrtEndIndexedColors\", */ T:-1 },\n\t/*::[*/0x0239/*::]*/: { /* n:\"BrtBeginMRUColors\", */ T:1 },\n\t/*::[*/0x023A/*::]*/: { /* n:\"BrtEndMRUColors\", */ T:-1 },\n\t/*::[*/0x023C/*::]*/: { /* n:\"BrtMRUColor\" */ },\n\t/*::[*/0x023D/*::]*/: { /* n:\"BrtBeginDVals\", */ T:1 },\n\t/*::[*/0x023E/*::]*/: { /* n:\"BrtEndDVals\", */ T:-1 },\n\t/*::[*/0x0241/*::]*/: { /* n:\"BrtSupNameStart\" */ },\n\t/*::[*/0x0242/*::]*/: { /* n:\"BrtSupNameValueStart\" */ },\n\t/*::[*/0x0243/*::]*/: { /* n:\"BrtSupNameValueEnd\" */ },\n\t/*::[*/0x0244/*::]*/: { /* n:\"BrtSupNameNum\" */ },\n\t/*::[*/0x0245/*::]*/: { /* n:\"BrtSupNameErr\" */ },\n\t/*::[*/0x0246/*::]*/: { /* n:\"BrtSupNameSt\" */ },\n\t/*::[*/0x0247/*::]*/: { /* n:\"BrtSupNameNil\" */ },\n\t/*::[*/0x0248/*::]*/: { /* n:\"BrtSupNameBool\" */ },\n\t/*::[*/0x0249/*::]*/: { /* n:\"BrtSupNameFmla\" */ },\n\t/*::[*/0x024A/*::]*/: { /* n:\"BrtSupNameBits\" */ },\n\t/*::[*/0x024B/*::]*/: { /* n:\"BrtSupNameEnd\" */ },\n\t/*::[*/0x024C/*::]*/: { /* n:\"BrtEndSupBook\", */ T:-1 },\n\t/*::[*/0x024D/*::]*/: { /* n:\"BrtCellSmartTagProperty\" */ },\n\t/*::[*/0x024E/*::]*/: { /* n:\"BrtBeginCellSmartTag\", */ T:1 },\n\t/*::[*/0x024F/*::]*/: { /* n:\"BrtEndCellSmartTag\", */ T:-1 },\n\t/*::[*/0x0250/*::]*/: { /* n:\"BrtBeginCellSmartTags\", */ T:1 },\n\t/*::[*/0x0251/*::]*/: { /* n:\"BrtEndCellSmartTags\", */ T:-1 },\n\t/*::[*/0x0252/*::]*/: { /* n:\"BrtBeginSmartTags\", */ T:1 },\n\t/*::[*/0x0253/*::]*/: { /* n:\"BrtEndSmartTags\", */ T:-1 },\n\t/*::[*/0x0254/*::]*/: { /* n:\"BrtSmartTagType\" */ },\n\t/*::[*/0x0255/*::]*/: { /* n:\"BrtBeginSmartTagTypes\", */ T:1 },\n\t/*::[*/0x0256/*::]*/: { /* n:\"BrtEndSmartTagTypes\", */ T:-1 },\n\t/*::[*/0x0257/*::]*/: { /* n:\"BrtBeginSXFilters\", */ T:1 },\n\t/*::[*/0x0258/*::]*/: { /* n:\"BrtEndSXFilters\", */ T:-1 },\n\t/*::[*/0x0259/*::]*/: { /* n:\"BrtBeginSXFILTER\", */ T:1 },\n\t/*::[*/0x025A/*::]*/: { /* n:\"BrtEndSXFilter\", */ T:-1 },\n\t/*::[*/0x025B/*::]*/: { /* n:\"BrtBeginFills\", */ T:1 },\n\t/*::[*/0x025C/*::]*/: { /* n:\"BrtEndFills\", */ T:-1 },\n\t/*::[*/0x025D/*::]*/: { /* n:\"BrtBeginCellWatches\", */ T:1 },\n\t/*::[*/0x025E/*::]*/: { /* n:\"BrtEndCellWatches\", */ T:-1 },\n\t/*::[*/0x025F/*::]*/: { /* n:\"BrtCellWatch\" */ },\n\t/*::[*/0x0260/*::]*/: { /* n:\"BrtBeginCRErrs\", */ T:1 },\n\t/*::[*/0x0261/*::]*/: { /* n:\"BrtEndCRErrs\", */ T:-1 },\n\t/*::[*/0x0262/*::]*/: { /* n:\"BrtCrashRecErr\" */ },\n\t/*::[*/0x0263/*::]*/: { /* n:\"BrtBeginFonts\", */ T:1 },\n\t/*::[*/0x0264/*::]*/: { /* n:\"BrtEndFonts\", */ T:-1 },\n\t/*::[*/0x0265/*::]*/: { /* n:\"BrtBeginBorders\", */ T:1 },\n\t/*::[*/0x0266/*::]*/: { /* n:\"BrtEndBorders\", */ T:-1 },\n\t/*::[*/0x0267/*::]*/: { /* n:\"BrtBeginFmts\", */ T:1 },\n\t/*::[*/0x0268/*::]*/: { /* n:\"BrtEndFmts\", */ T:-1 },\n\t/*::[*/0x0269/*::]*/: { /* n:\"BrtBeginCellXFs\", */ T:1 },\n\t/*::[*/0x026A/*::]*/: { /* n:\"BrtEndCellXFs\", */ T:-1 },\n\t/*::[*/0x026B/*::]*/: { /* n:\"BrtBeginStyles\", */ T:1 },\n\t/*::[*/0x026C/*::]*/: { /* n:\"BrtEndStyles\", */ T:-1 },\n\t/*::[*/0x0271/*::]*/: { /* n:\"BrtBigName\" */ },\n\t/*::[*/0x0272/*::]*/: { /* n:\"BrtBeginCellStyleXFs\", */ T:1 },\n\t/*::[*/0x0273/*::]*/: { /* n:\"BrtEndCellStyleXFs\", */ T:-1 },\n\t/*::[*/0x0274/*::]*/: { /* n:\"BrtBeginComments\", */ T:1 },\n\t/*::[*/0x0275/*::]*/: { /* n:\"BrtEndComments\", */ T:-1 },\n\t/*::[*/0x0276/*::]*/: { /* n:\"BrtBeginCommentAuthors\", */ T:1 },\n\t/*::[*/0x0277/*::]*/: { /* n:\"BrtEndCommentAuthors\", */ T:-1 },\n\t/*::[*/0x0278/*::]*/: { /* n:\"BrtCommentAuthor\", */ f:parse_BrtCommentAuthor },\n\t/*::[*/0x0279/*::]*/: { /* n:\"BrtBeginCommentList\", */ T:1 },\n\t/*::[*/0x027A/*::]*/: { /* n:\"BrtEndCommentList\", */ T:-1 },\n\t/*::[*/0x027B/*::]*/: { /* n:\"BrtBeginComment\", */ T:1, f:parse_BrtBeginComment},\n\t/*::[*/0x027C/*::]*/: { /* n:\"BrtEndComment\", */ T:-1 },\n\t/*::[*/0x027D/*::]*/: { /* n:\"BrtCommentText\", */ f:parse_BrtCommentText },\n\t/*::[*/0x027E/*::]*/: { /* n:\"BrtBeginOleObjects\", */ T:1 },\n\t/*::[*/0x027F/*::]*/: { /* n:\"BrtOleObject\" */ },\n\t/*::[*/0x0280/*::]*/: { /* n:\"BrtEndOleObjects\", */ T:-1 },\n\t/*::[*/0x0281/*::]*/: { /* n:\"BrtBeginSxrules\", */ T:1 },\n\t/*::[*/0x0282/*::]*/: { /* n:\"BrtEndSxRules\", */ T:-1 },\n\t/*::[*/0x0283/*::]*/: { /* n:\"BrtBeginActiveXControls\", */ T:1 },\n\t/*::[*/0x0284/*::]*/: { /* n:\"BrtActiveX\" */ },\n\t/*::[*/0x0285/*::]*/: { /* n:\"BrtEndActiveXControls\", */ T:-1 },\n\t/*::[*/0x0286/*::]*/: { /* n:\"BrtBeginPCDSDTCEMembersSortBy\", */ T:1 },\n\t/*::[*/0x0288/*::]*/: { /* n:\"BrtBeginCellIgnoreECs\", */ T:1 },\n\t/*::[*/0x0289/*::]*/: { /* n:\"BrtCellIgnoreEC\" */ },\n\t/*::[*/0x028A/*::]*/: { /* n:\"BrtEndCellIgnoreECs\", */ T:-1 },\n\t/*::[*/0x028B/*::]*/: { /* n:\"BrtCsProp\", */ f:parse_BrtCsProp },\n\t/*::[*/0x028C/*::]*/: { /* n:\"BrtCsPageSetup\" */ },\n\t/*::[*/0x028D/*::]*/: { /* n:\"BrtBeginUserCsViews\", */ T:1 },\n\t/*::[*/0x028E/*::]*/: { /* n:\"BrtEndUserCsViews\", */ T:-1 },\n\t/*::[*/0x028F/*::]*/: { /* n:\"BrtBeginUserCsView\", */ T:1 },\n\t/*::[*/0x0290/*::]*/: { /* n:\"BrtEndUserCsView\", */ T:-1 },\n\t/*::[*/0x0291/*::]*/: { /* n:\"BrtBeginPcdSFCIEntries\", */ T:1 },\n\t/*::[*/0x0292/*::]*/: { /* n:\"BrtEndPCDSFCIEntries\", */ T:-1 },\n\t/*::[*/0x0293/*::]*/: { /* n:\"BrtPCDSFCIEntry\" */ },\n\t/*::[*/0x0294/*::]*/: { /* n:\"BrtBeginListParts\", */ T:1 },\n\t/*::[*/0x0295/*::]*/: { /* n:\"BrtListPart\" */ },\n\t/*::[*/0x0296/*::]*/: { /* n:\"BrtEndListParts\", */ T:-1 },\n\t/*::[*/0x0297/*::]*/: { /* n:\"BrtSheetCalcProp\" */ },\n\t/*::[*/0x0298/*::]*/: { /* n:\"BrtBeginFnGroup\", */ T:1 },\n\t/*::[*/0x0299/*::]*/: { /* n:\"BrtFnGroup\" */ },\n\t/*::[*/0x029A/*::]*/: { /* n:\"BrtEndFnGroup\", */ T:-1 },\n\t/*::[*/0x029B/*::]*/: { /* n:\"BrtSupAddin\" */ },\n\t/*::[*/0x029C/*::]*/: { /* n:\"BrtSXTDMPOrder\" */ },\n\t/*::[*/0x029D/*::]*/: { /* n:\"BrtCsProtection\" */ },\n\t/*::[*/0x029F/*::]*/: { /* n:\"BrtBeginWsSortMap\", */ T:1 },\n\t/*::[*/0x02A0/*::]*/: { /* n:\"BrtEndWsSortMap\", */ T:-1 },\n\t/*::[*/0x02A1/*::]*/: { /* n:\"BrtBeginRRSort\", */ T:1 },\n\t/*::[*/0x02A2/*::]*/: { /* n:\"BrtEndRRSort\", */ T:-1 },\n\t/*::[*/0x02A3/*::]*/: { /* n:\"BrtRRSortItem\" */ },\n\t/*::[*/0x02A4/*::]*/: { /* n:\"BrtFileSharingIso\" */ },\n\t/*::[*/0x02A5/*::]*/: { /* n:\"BrtBookProtectionIso\" */ },\n\t/*::[*/0x02A6/*::]*/: { /* n:\"BrtSheetProtectionIso\" */ },\n\t/*::[*/0x02A7/*::]*/: { /* n:\"BrtCsProtectionIso\" */ },\n\t/*::[*/0x02A8/*::]*/: { /* n:\"BrtRangeProtectionIso\" */ },\n\t/*::[*/0x02A9/*::]*/: { /* n:\"BrtDValList\" */ },\n\t/*::[*/0x0400/*::]*/: { /* n:\"BrtRwDescent\" */ },\n\t/*::[*/0x0401/*::]*/: { /* n:\"BrtKnownFonts\" */ },\n\t/*::[*/0x0402/*::]*/: { /* n:\"BrtBeginSXTupleSet\", */ T:1 },\n\t/*::[*/0x0403/*::]*/: { /* n:\"BrtEndSXTupleSet\", */ T:-1 },\n\t/*::[*/0x0404/*::]*/: { /* n:\"BrtBeginSXTupleSetHeader\", */ T:1 },\n\t/*::[*/0x0405/*::]*/: { /* n:\"BrtEndSXTupleSetHeader\", */ T:-1 },\n\t/*::[*/0x0406/*::]*/: { /* n:\"BrtSXTupleSetHeaderItem\" */ },\n\t/*::[*/0x0407/*::]*/: { /* n:\"BrtBeginSXTupleSetData\", */ T:1 },\n\t/*::[*/0x0408/*::]*/: { /* n:\"BrtEndSXTupleSetData\", */ T:-1 },\n\t/*::[*/0x0409/*::]*/: { /* n:\"BrtBeginSXTupleSetRow\", */ T:1 },\n\t/*::[*/0x040A/*::]*/: { /* n:\"BrtEndSXTupleSetRow\", */ T:-1 },\n\t/*::[*/0x040B/*::]*/: { /* n:\"BrtSXTupleSetRowItem\" */ },\n\t/*::[*/0x040C/*::]*/: { /* n:\"BrtNameExt\" */ },\n\t/*::[*/0x040D/*::]*/: { /* n:\"BrtPCDH14\" */ },\n\t/*::[*/0x040E/*::]*/: { /* n:\"BrtBeginPCDCalcMem14\", */ T:1 },\n\t/*::[*/0x040F/*::]*/: { /* n:\"BrtEndPCDCalcMem14\", */ T:-1 },\n\t/*::[*/0x0410/*::]*/: { /* n:\"BrtSXTH14\" */ },\n\t/*::[*/0x0411/*::]*/: { /* n:\"BrtBeginSparklineGroup\", */ T:1 },\n\t/*::[*/0x0412/*::]*/: { /* n:\"BrtEndSparklineGroup\", */ T:-1 },\n\t/*::[*/0x0413/*::]*/: { /* n:\"BrtSparkline\" */ },\n\t/*::[*/0x0414/*::]*/: { /* n:\"BrtSXDI14\" */ },\n\t/*::[*/0x0415/*::]*/: { /* n:\"BrtWsFmtInfoEx14\" */ },\n\t/*::[*/0x0416/*::]*/: { /* n:\"BrtBeginConditionalFormatting14\", */ T:1 },\n\t/*::[*/0x0417/*::]*/: { /* n:\"BrtEndConditionalFormatting14\", */ T:-1 },\n\t/*::[*/0x0418/*::]*/: { /* n:\"BrtBeginCFRule14\", */ T:1 },\n\t/*::[*/0x0419/*::]*/: { /* n:\"BrtEndCFRule14\", */ T:-1 },\n\t/*::[*/0x041A/*::]*/: { /* n:\"BrtCFVO14\" */ },\n\t/*::[*/0x041B/*::]*/: { /* n:\"BrtBeginDatabar14\", */ T:1 },\n\t/*::[*/0x041C/*::]*/: { /* n:\"BrtBeginIconSet14\", */ T:1 },\n\t/*::[*/0x041D/*::]*/: { /* n:\"BrtDVal14\", */ f: parse_BrtDVal14 },\n\t/*::[*/0x041E/*::]*/: { /* n:\"BrtBeginDVals14\", */ T:1 },\n\t/*::[*/0x041F/*::]*/: { /* n:\"BrtColor14\" */ },\n\t/*::[*/0x0420/*::]*/: { /* n:\"BrtBeginSparklines\", */ T:1 },\n\t/*::[*/0x0421/*::]*/: { /* n:\"BrtEndSparklines\", */ T:-1 },\n\t/*::[*/0x0422/*::]*/: { /* n:\"BrtBeginSparklineGroups\", */ T:1 },\n\t/*::[*/0x0423/*::]*/: { /* n:\"BrtEndSparklineGroups\", */ T:-1 },\n\t/*::[*/0x0425/*::]*/: { /* n:\"BrtSXVD14\" */ },\n\t/*::[*/0x0426/*::]*/: { /* n:\"BrtBeginSXView14\", */ T:1 },\n\t/*::[*/0x0427/*::]*/: { /* n:\"BrtEndSXView14\", */ T:-1 },\n\t/*::[*/0x0428/*::]*/: { /* n:\"BrtBeginSXView16\", */ T:1 },\n\t/*::[*/0x0429/*::]*/: { /* n:\"BrtEndSXView16\", */ T:-1 },\n\t/*::[*/0x042A/*::]*/: { /* n:\"BrtBeginPCD14\", */ T:1 },\n\t/*::[*/0x042B/*::]*/: { /* n:\"BrtEndPCD14\", */ T:-1 },\n\t/*::[*/0x042C/*::]*/: { /* n:\"BrtBeginExtConn14\", */ T:1 },\n\t/*::[*/0x042D/*::]*/: { /* n:\"BrtEndExtConn14\", */ T:-1 },\n\t/*::[*/0x042E/*::]*/: { /* n:\"BrtBeginSlicerCacheIDs\", */ T:1 },\n\t/*::[*/0x042F/*::]*/: { /* n:\"BrtEndSlicerCacheIDs\", */ T:-1 },\n\t/*::[*/0x0430/*::]*/: { /* n:\"BrtBeginSlicerCacheID\", */ T:1 },\n\t/*::[*/0x0431/*::]*/: { /* n:\"BrtEndSlicerCacheID\", */ T:-1 },\n\t/*::[*/0x0433/*::]*/: { /* n:\"BrtBeginSlicerCache\", */ T:1 },\n\t/*::[*/0x0434/*::]*/: { /* n:\"BrtEndSlicerCache\", */ T:-1 },\n\t/*::[*/0x0435/*::]*/: { /* n:\"BrtBeginSlicerCacheDef\", */ T:1 },\n\t/*::[*/0x0436/*::]*/: { /* n:\"BrtEndSlicerCacheDef\", */ T:-1 },\n\t/*::[*/0x0437/*::]*/: { /* n:\"BrtBeginSlicersEx\", */ T:1 },\n\t/*::[*/0x0438/*::]*/: { /* n:\"BrtEndSlicersEx\", */ T:-1 },\n\t/*::[*/0x0439/*::]*/: { /* n:\"BrtBeginSlicerEx\", */ T:1 },\n\t/*::[*/0x043A/*::]*/: { /* n:\"BrtEndSlicerEx\", */ T:-1 },\n\t/*::[*/0x043B/*::]*/: { /* n:\"BrtBeginSlicer\", */ T:1 },\n\t/*::[*/0x043C/*::]*/: { /* n:\"BrtEndSlicer\", */ T:-1 },\n\t/*::[*/0x043D/*::]*/: { /* n:\"BrtSlicerCachePivotTables\" */ },\n\t/*::[*/0x043E/*::]*/: { /* n:\"BrtBeginSlicerCacheOlapImpl\", */ T:1 },\n\t/*::[*/0x043F/*::]*/: { /* n:\"BrtEndSlicerCacheOlapImpl\", */ T:-1 },\n\t/*::[*/0x0440/*::]*/: { /* n:\"BrtBeginSlicerCacheLevelsData\", */ T:1 },\n\t/*::[*/0x0441/*::]*/: { /* n:\"BrtEndSlicerCacheLevelsData\", */ T:-1 },\n\t/*::[*/0x0442/*::]*/: { /* n:\"BrtBeginSlicerCacheLevelData\", */ T:1 },\n\t/*::[*/0x0443/*::]*/: { /* n:\"BrtEndSlicerCacheLevelData\", */ T:-1 },\n\t/*::[*/0x0444/*::]*/: { /* n:\"BrtBeginSlicerCacheSiRanges\", */ T:1 },\n\t/*::[*/0x0445/*::]*/: { /* n:\"BrtEndSlicerCacheSiRanges\", */ T:-1 },\n\t/*::[*/0x0446/*::]*/: { /* n:\"BrtBeginSlicerCacheSiRange\", */ T:1 },\n\t/*::[*/0x0447/*::]*/: { /* n:\"BrtEndSlicerCacheSiRange\", */ T:-1 },\n\t/*::[*/0x0448/*::]*/: { /* n:\"BrtSlicerCacheOlapItem\" */ },\n\t/*::[*/0x0449/*::]*/: { /* n:\"BrtBeginSlicerCacheSelections\", */ T:1 },\n\t/*::[*/0x044A/*::]*/: { /* n:\"BrtSlicerCacheSelection\" */ },\n\t/*::[*/0x044B/*::]*/: { /* n:\"BrtEndSlicerCacheSelections\", */ T:-1 },\n\t/*::[*/0x044C/*::]*/: { /* n:\"BrtBeginSlicerCacheNative\", */ T:1 },\n\t/*::[*/0x044D/*::]*/: { /* n:\"BrtEndSlicerCacheNative\", */ T:-1 },\n\t/*::[*/0x044E/*::]*/: { /* n:\"BrtSlicerCacheNativeItem\" */ },\n\t/*::[*/0x044F/*::]*/: { /* n:\"BrtRangeProtection14\" */ },\n\t/*::[*/0x0450/*::]*/: { /* n:\"BrtRangeProtectionIso14\" */ },\n\t/*::[*/0x0451/*::]*/: { /* n:\"BrtCellIgnoreEC14\" */ },\n\t/*::[*/0x0457/*::]*/: { /* n:\"BrtList14\" */ },\n\t/*::[*/0x0458/*::]*/: { /* n:\"BrtCFIcon\" */ },\n\t/*::[*/0x0459/*::]*/: { /* n:\"BrtBeginSlicerCachesPivotCacheIDs\", */ T:1 },\n\t/*::[*/0x045A/*::]*/: { /* n:\"BrtEndSlicerCachesPivotCacheIDs\", */ T:-1 },\n\t/*::[*/0x045B/*::]*/: { /* n:\"BrtBeginSlicers\", */ T:1 },\n\t/*::[*/0x045C/*::]*/: { /* n:\"BrtEndSlicers\", */ T:-1 },\n\t/*::[*/0x045D/*::]*/: { /* n:\"BrtWbProp14\" */ },\n\t/*::[*/0x045E/*::]*/: { /* n:\"BrtBeginSXEdit\", */ T:1 },\n\t/*::[*/0x045F/*::]*/: { /* n:\"BrtEndSXEdit\", */ T:-1 },\n\t/*::[*/0x0460/*::]*/: { /* n:\"BrtBeginSXEdits\", */ T:1 },\n\t/*::[*/0x0461/*::]*/: { /* n:\"BrtEndSXEdits\", */ T:-1 },\n\t/*::[*/0x0462/*::]*/: { /* n:\"BrtBeginSXChange\", */ T:1 },\n\t/*::[*/0x0463/*::]*/: { /* n:\"BrtEndSXChange\", */ T:-1 },\n\t/*::[*/0x0464/*::]*/: { /* n:\"BrtBeginSXChanges\", */ T:1 },\n\t/*::[*/0x0465/*::]*/: { /* n:\"BrtEndSXChanges\", */ T:-1 },\n\t/*::[*/0x0466/*::]*/: { /* n:\"BrtSXTupleItems\" */ },\n\t/*::[*/0x0468/*::]*/: { /* n:\"BrtBeginSlicerStyle\", */ T:1 },\n\t/*::[*/0x0469/*::]*/: { /* n:\"BrtEndSlicerStyle\", */ T:-1 },\n\t/*::[*/0x046A/*::]*/: { /* n:\"BrtSlicerStyleElement\" */ },\n\t/*::[*/0x046B/*::]*/: { /* n:\"BrtBeginStyleSheetExt14\", */ T:1 },\n\t/*::[*/0x046C/*::]*/: { /* n:\"BrtEndStyleSheetExt14\", */ T:-1 },\n\t/*::[*/0x046D/*::]*/: { /* n:\"BrtBeginSlicerCachesPivotCacheID\", */ T:1 },\n\t/*::[*/0x046E/*::]*/: { /* n:\"BrtEndSlicerCachesPivotCacheID\", */ T:-1 },\n\t/*::[*/0x046F/*::]*/: { /* n:\"BrtBeginConditionalFormattings\", */ T:1 },\n\t/*::[*/0x0470/*::]*/: { /* n:\"BrtEndConditionalFormattings\", */ T:-1 },\n\t/*::[*/0x0471/*::]*/: { /* n:\"BrtBeginPCDCalcMemExt\", */ T:1 },\n\t/*::[*/0x0472/*::]*/: { /* n:\"BrtEndPCDCalcMemExt\", */ T:-1 },\n\t/*::[*/0x0473/*::]*/: { /* n:\"BrtBeginPCDCalcMemsExt\", */ T:1 },\n\t/*::[*/0x0474/*::]*/: { /* n:\"BrtEndPCDCalcMemsExt\", */ T:-1 },\n\t/*::[*/0x0475/*::]*/: { /* n:\"BrtPCDField14\" */ },\n\t/*::[*/0x0476/*::]*/: { /* n:\"BrtBeginSlicerStyles\", */ T:1 },\n\t/*::[*/0x0477/*::]*/: { /* n:\"BrtEndSlicerStyles\", */ T:-1 },\n\t/*::[*/0x0478/*::]*/: { /* n:\"BrtBeginSlicerStyleElements\", */ T:1 },\n\t/*::[*/0x0479/*::]*/: { /* n:\"BrtEndSlicerStyleElements\", */ T:-1 },\n\t/*::[*/0x047A/*::]*/: { /* n:\"BrtCFRuleExt\" */ },\n\t/*::[*/0x047B/*::]*/: { /* n:\"BrtBeginSXCondFmt14\", */ T:1 },\n\t/*::[*/0x047C/*::]*/: { /* n:\"BrtEndSXCondFmt14\", */ T:-1 },\n\t/*::[*/0x047D/*::]*/: { /* n:\"BrtBeginSXCondFmts14\", */ T:1 },\n\t/*::[*/0x047E/*::]*/: { /* n:\"BrtEndSXCondFmts14\", */ T:-1 },\n\t/*::[*/0x0480/*::]*/: { /* n:\"BrtBeginSortCond14\", */ T:1 },\n\t/*::[*/0x0481/*::]*/: { /* n:\"BrtEndSortCond14\", */ T:-1 },\n\t/*::[*/0x0482/*::]*/: { /* n:\"BrtEndDVals14\", */ T:-1 },\n\t/*::[*/0x0483/*::]*/: { /* n:\"BrtEndIconSet14\", */ T:-1 },\n\t/*::[*/0x0484/*::]*/: { /* n:\"BrtEndDatabar14\", */ T:-1 },\n\t/*::[*/0x0485/*::]*/: { /* n:\"BrtBeginColorScale14\", */ T:1 },\n\t/*::[*/0x0486/*::]*/: { /* n:\"BrtEndColorScale14\", */ T:-1 },\n\t/*::[*/0x0487/*::]*/: { /* n:\"BrtBeginSxrules14\", */ T:1 },\n\t/*::[*/0x0488/*::]*/: { /* n:\"BrtEndSxrules14\", */ T:-1 },\n\t/*::[*/0x0489/*::]*/: { /* n:\"BrtBeginPRule14\", */ T:1 },\n\t/*::[*/0x048A/*::]*/: { /* n:\"BrtEndPRule14\", */ T:-1 },\n\t/*::[*/0x048B/*::]*/: { /* n:\"BrtBeginPRFilters14\", */ T:1 },\n\t/*::[*/0x048C/*::]*/: { /* n:\"BrtEndPRFilters14\", */ T:-1 },\n\t/*::[*/0x048D/*::]*/: { /* n:\"BrtBeginPRFilter14\", */ T:1 },\n\t/*::[*/0x048E/*::]*/: { /* n:\"BrtEndPRFilter14\", */ T:-1 },\n\t/*::[*/0x048F/*::]*/: { /* n:\"BrtBeginPRFItem14\", */ T:1 },\n\t/*::[*/0x0490/*::]*/: { /* n:\"BrtEndPRFItem14\", */ T:-1 },\n\t/*::[*/0x0491/*::]*/: { /* n:\"BrtBeginCellIgnoreECs14\", */ T:1 },\n\t/*::[*/0x0492/*::]*/: { /* n:\"BrtEndCellIgnoreECs14\", */ T:-1 },\n\t/*::[*/0x0493/*::]*/: { /* n:\"BrtDxf14\" */ },\n\t/*::[*/0x0494/*::]*/: { /* n:\"BrtBeginDxF14s\", */ T:1 },\n\t/*::[*/0x0495/*::]*/: { /* n:\"BrtEndDxf14s\", */ T:-1 },\n\t/*::[*/0x0499/*::]*/: { /* n:\"BrtFilter14\" */ },\n\t/*::[*/0x049A/*::]*/: { /* n:\"BrtBeginCustomFilters14\", */ T:1 },\n\t/*::[*/0x049C/*::]*/: { /* n:\"BrtCustomFilter14\" */ },\n\t/*::[*/0x049D/*::]*/: { /* n:\"BrtIconFilter14\" */ },\n\t/*::[*/0x049E/*::]*/: { /* n:\"BrtPivotCacheConnectionName\" */ },\n\t/*::[*/0x0800/*::]*/: { /* n:\"BrtBeginDecoupledPivotCacheIDs\", */ T:1 },\n\t/*::[*/0x0801/*::]*/: { /* n:\"BrtEndDecoupledPivotCacheIDs\", */ T:-1 },\n\t/*::[*/0x0802/*::]*/: { /* n:\"BrtDecoupledPivotCacheID\" */ },\n\t/*::[*/0x0803/*::]*/: { /* n:\"BrtBeginPivotTableRefs\", */ T:1 },\n\t/*::[*/0x0804/*::]*/: { /* n:\"BrtEndPivotTableRefs\", */ T:-1 },\n\t/*::[*/0x0805/*::]*/: { /* n:\"BrtPivotTableRef\" */ },\n\t/*::[*/0x0806/*::]*/: { /* n:\"BrtSlicerCacheBookPivotTables\" */ },\n\t/*::[*/0x0807/*::]*/: { /* n:\"BrtBeginSxvcells\", */ T:1 },\n\t/*::[*/0x0808/*::]*/: { /* n:\"BrtEndSxvcells\", */ T:-1 },\n\t/*::[*/0x0809/*::]*/: { /* n:\"BrtBeginSxRow\", */ T:1 },\n\t/*::[*/0x080A/*::]*/: { /* n:\"BrtEndSxRow\", */ T:-1 },\n\t/*::[*/0x080C/*::]*/: { /* n:\"BrtPcdCalcMem15\" */ },\n\t/*::[*/0x0813/*::]*/: { /* n:\"BrtQsi15\" */ },\n\t/*::[*/0x0814/*::]*/: { /* n:\"BrtBeginWebExtensions\", */ T:1 },\n\t/*::[*/0x0815/*::]*/: { /* n:\"BrtEndWebExtensions\", */ T:-1 },\n\t/*::[*/0x0816/*::]*/: { /* n:\"BrtWebExtension\" */ },\n\t/*::[*/0x0817/*::]*/: { /* n:\"BrtAbsPath15\" */ },\n\t/*::[*/0x0818/*::]*/: { /* n:\"BrtBeginPivotTableUISettings\", */ T:1 },\n\t/*::[*/0x0819/*::]*/: { /* n:\"BrtEndPivotTableUISettings\", */ T:-1 },\n\t/*::[*/0x081B/*::]*/: { /* n:\"BrtTableSlicerCacheIDs\" */ },\n\t/*::[*/0x081C/*::]*/: { /* n:\"BrtTableSlicerCacheID\" */ },\n\t/*::[*/0x081D/*::]*/: { /* n:\"BrtBeginTableSlicerCache\", */ T:1 },\n\t/*::[*/0x081E/*::]*/: { /* n:\"BrtEndTableSlicerCache\", */ T:-1 },\n\t/*::[*/0x081F/*::]*/: { /* n:\"BrtSxFilter15\" */ },\n\t/*::[*/0x0820/*::]*/: { /* n:\"BrtBeginTimelineCachePivotCacheIDs\", */ T:1 },\n\t/*::[*/0x0821/*::]*/: { /* n:\"BrtEndTimelineCachePivotCacheIDs\", */ T:-1 },\n\t/*::[*/0x0822/*::]*/: { /* n:\"BrtTimelineCachePivotCacheID\" */ },\n\t/*::[*/0x0823/*::]*/: { /* n:\"BrtBeginTimelineCacheIDs\", */ T:1 },\n\t/*::[*/0x0824/*::]*/: { /* n:\"BrtEndTimelineCacheIDs\", */ T:-1 },\n\t/*::[*/0x0825/*::]*/: { /* n:\"BrtBeginTimelineCacheID\", */ T:1 },\n\t/*::[*/0x0826/*::]*/: { /* n:\"BrtEndTimelineCacheID\", */ T:-1 },\n\t/*::[*/0x0827/*::]*/: { /* n:\"BrtBeginTimelinesEx\", */ T:1 },\n\t/*::[*/0x0828/*::]*/: { /* n:\"BrtEndTimelinesEx\", */ T:-1 },\n\t/*::[*/0x0829/*::]*/: { /* n:\"BrtBeginTimelineEx\", */ T:1 },\n\t/*::[*/0x082A/*::]*/: { /* n:\"BrtEndTimelineEx\", */ T:-1 },\n\t/*::[*/0x082B/*::]*/: { /* n:\"BrtWorkBookPr15\" */ },\n\t/*::[*/0x082C/*::]*/: { /* n:\"BrtPCDH15\" */ },\n\t/*::[*/0x082D/*::]*/: { /* n:\"BrtBeginTimelineStyle\", */ T:1 },\n\t/*::[*/0x082E/*::]*/: { /* n:\"BrtEndTimelineStyle\", */ T:-1 },\n\t/*::[*/0x082F/*::]*/: { /* n:\"BrtTimelineStyleElement\" */ },\n\t/*::[*/0x0830/*::]*/: { /* n:\"BrtBeginTimelineStylesheetExt15\", */ T:1 },\n\t/*::[*/0x0831/*::]*/: { /* n:\"BrtEndTimelineStylesheetExt15\", */ T:-1 },\n\t/*::[*/0x0832/*::]*/: { /* n:\"BrtBeginTimelineStyles\", */ T:1 },\n\t/*::[*/0x0833/*::]*/: { /* n:\"BrtEndTimelineStyles\", */ T:-1 },\n\t/*::[*/0x0834/*::]*/: { /* n:\"BrtBeginTimelineStyleElements\", */ T:1 },\n\t/*::[*/0x0835/*::]*/: { /* n:\"BrtEndTimelineStyleElements\", */ T:-1 },\n\t/*::[*/0x0836/*::]*/: { /* n:\"BrtDxf15\" */ },\n\t/*::[*/0x0837/*::]*/: { /* n:\"BrtBeginDxfs15\", */ T:1 },\n\t/*::[*/0x0838/*::]*/: { /* n:\"BrtEndDxfs15\", */ T:-1 },\n\t/*::[*/0x0839/*::]*/: { /* n:\"BrtSlicerCacheHideItemsWithNoData\" */ },\n\t/*::[*/0x083A/*::]*/: { /* n:\"BrtBeginItemUniqueNames\", */ T:1 },\n\t/*::[*/0x083B/*::]*/: { /* n:\"BrtEndItemUniqueNames\", */ T:-1 },\n\t/*::[*/0x083C/*::]*/: { /* n:\"BrtItemUniqueName\" */ },\n\t/*::[*/0x083D/*::]*/: { /* n:\"BrtBeginExtConn15\", */ T:1 },\n\t/*::[*/0x083E/*::]*/: { /* n:\"BrtEndExtConn15\", */ T:-1 },\n\t/*::[*/0x083F/*::]*/: { /* n:\"BrtBeginOledbPr15\", */ T:1 },\n\t/*::[*/0x0840/*::]*/: { /* n:\"BrtEndOledbPr15\", */ T:-1 },\n\t/*::[*/0x0841/*::]*/: { /* n:\"BrtBeginDataFeedPr15\", */ T:1 },\n\t/*::[*/0x0842/*::]*/: { /* n:\"BrtEndDataFeedPr15\", */ T:-1 },\n\t/*::[*/0x0843/*::]*/: { /* n:\"BrtTextPr15\" */ },\n\t/*::[*/0x0844/*::]*/: { /* n:\"BrtRangePr15\" */ },\n\t/*::[*/0x0845/*::]*/: { /* n:\"BrtDbCommand15\" */ },\n\t/*::[*/0x0846/*::]*/: { /* n:\"BrtBeginDbTables15\", */ T:1 },\n\t/*::[*/0x0847/*::]*/: { /* n:\"BrtEndDbTables15\", */ T:-1 },\n\t/*::[*/0x0848/*::]*/: { /* n:\"BrtDbTable15\" */ },\n\t/*::[*/0x0849/*::]*/: { /* n:\"BrtBeginDataModel\", */ T:1 },\n\t/*::[*/0x084A/*::]*/: { /* n:\"BrtEndDataModel\", */ T:-1 },\n\t/*::[*/0x084B/*::]*/: { /* n:\"BrtBeginModelTables\", */ T:1 },\n\t/*::[*/0x084C/*::]*/: { /* n:\"BrtEndModelTables\", */ T:-1 },\n\t/*::[*/0x084D/*::]*/: { /* n:\"BrtModelTable\" */ },\n\t/*::[*/0x084E/*::]*/: { /* n:\"BrtBeginModelRelationships\", */ T:1 },\n\t/*::[*/0x084F/*::]*/: { /* n:\"BrtEndModelRelationships\", */ T:-1 },\n\t/*::[*/0x0850/*::]*/: { /* n:\"BrtModelRelationship\" */ },\n\t/*::[*/0x0851/*::]*/: { /* n:\"BrtBeginECTxtWiz15\", */ T:1 },\n\t/*::[*/0x0852/*::]*/: { /* n:\"BrtEndECTxtWiz15\", */ T:-1 },\n\t/*::[*/0x0853/*::]*/: { /* n:\"BrtBeginECTWFldInfoLst15\", */ T:1 },\n\t/*::[*/0x0854/*::]*/: { /* n:\"BrtEndECTWFldInfoLst15\", */ T:-1 },\n\t/*::[*/0x0855/*::]*/: { /* n:\"BrtBeginECTWFldInfo15\", */ T:1 },\n\t/*::[*/0x0856/*::]*/: { /* n:\"BrtFieldListActiveItem\" */ },\n\t/*::[*/0x0857/*::]*/: { /* n:\"BrtPivotCacheIdVersion\" */ },\n\t/*::[*/0x0858/*::]*/: { /* n:\"BrtSXDI15\" */ },\n\t/*::[*/0x0859/*::]*/: { /* n:\"BrtBeginModelTimeGroupings\", */ T:1 },\n\t/*::[*/0x085A/*::]*/: { /* n:\"BrtEndModelTimeGroupings\", */ T:-1 },\n\t/*::[*/0x085B/*::]*/: { /* n:\"BrtBeginModelTimeGrouping\", */ T:1 },\n\t/*::[*/0x085C/*::]*/: { /* n:\"BrtEndModelTimeGrouping\", */ T:-1 },\n\t/*::[*/0x085D/*::]*/: { /* n:\"BrtModelTimeGroupingCalcCol\" */ },\n\t/*::[*/0x0C00/*::]*/: { /* n:\"BrtUid\" */ },\n\t/*::[*/0x0C01/*::]*/: { /* n:\"BrtRevisionPtr\" */ },\n\t/*::[*/0x1000/*::]*/: { /* n:\"BrtBeginDynamicArrayPr\", */ T:1 },\n\t/*::[*/0x1001/*::]*/: { /* n:\"BrtEndDynamicArrayPr\", */ T:-1 },\n\t/*::[*/0x138A/*::]*/: { /* n:\"BrtBeginRichValueBlock\", */ T:1 },\n\t/*::[*/0x138B/*::]*/: { /* n:\"BrtEndRichValueBlock\", */ T:-1 },\n\t/*::[*/0x13D9/*::]*/: { /* n:\"BrtBeginRichFilters\", */ T:1 },\n\t/*::[*/0x13DA/*::]*/: { /* n:\"BrtEndRichFilters\", */ T:-1 },\n\t/*::[*/0x13DB/*::]*/: { /* n:\"BrtRichFilter\" */ },\n\t/*::[*/0x13DC/*::]*/: { /* n:\"BrtBeginRichFilterColumn\", */ T:1 },\n\t/*::[*/0x13DD/*::]*/: { /* n:\"BrtEndRichFilterColumn\", */ T:-1 },\n\t/*::[*/0x13DE/*::]*/: { /* n:\"BrtBeginCustomRichFilters\", */ T:1 },\n\t/*::[*/0x13DF/*::]*/: { /* n:\"BrtEndCustomRichFilters\", */ T:-1 },\n\t/*::[*/0x13E0/*::]*/: { /* n:\"BrtCustomRichFilter\" */ },\n\t/*::[*/0x13E1/*::]*/: { /* n:\"BrtTop10RichFilter\" */ },\n\t/*::[*/0x13E2/*::]*/: { /* n:\"BrtDynamicRichFilter\" */ },\n\t/*::[*/0x13E4/*::]*/: { /* n:\"BrtBeginRichSortCondition\", */ T:1 },\n\t/*::[*/0x13E5/*::]*/: { /* n:\"BrtEndRichSortCondition\", */ T:-1 },\n\t/*::[*/0x13E6/*::]*/: { /* n:\"BrtRichFilterDateGroupItem\" */ },\n\t/*::[*/0x13E7/*::]*/: { /* n:\"BrtBeginCalcFeatures\", */ T:1 },\n\t/*::[*/0x13E8/*::]*/: { /* n:\"BrtEndCalcFeatures\", */ T:-1 },\n\t/*::[*/0x13E9/*::]*/: { /* n:\"BrtCalcFeature\" */ },\n\t/*::[*/0x13EB/*::]*/: { /* n:\"BrtExternalLinksPr\" */ },\n\t/*::[*/0xFFFF/*::]*/: { n:\"\" }\n};\n\n/* [MS-XLS] 2.3 Record Enumeration (and other sources) */\nvar XLSRecordEnum = {\n\t/* [MS-XLS] 2.3 Record Enumeration 2021-08-17 */\n\t/*::[*/0x0006/*::]*/: { /* n:\"Formula\", */ f:parse_Formula },\n\t/*::[*/0x000a/*::]*/: { /* n:\"EOF\", */ f:parsenoop2 },\n\t/*::[*/0x000c/*::]*/: { /* n:\"CalcCount\", */ f:parseuint16 }, //\n\t/*::[*/0x000d/*::]*/: { /* n:\"CalcMode\", */ f:parseuint16 }, //\n\t/*::[*/0x000e/*::]*/: { /* n:\"CalcPrecision\", */ f:parsebool }, //\n\t/*::[*/0x000f/*::]*/: { /* n:\"CalcRefMode\", */ f:parsebool }, //\n\t/*::[*/0x0010/*::]*/: { /* n:\"CalcDelta\", */ f:parse_Xnum }, //\n\t/*::[*/0x0011/*::]*/: { /* n:\"CalcIter\", */ f:parsebool }, //\n\t/*::[*/0x0012/*::]*/: { /* n:\"Protect\", */ f:parsebool },\n\t/*::[*/0x0013/*::]*/: { /* n:\"Password\", */ f:parseuint16 },\n\t/*::[*/0x0014/*::]*/: { /* n:\"Header\", */ f:parse_XLHeaderFooter },\n\t/*::[*/0x0015/*::]*/: { /* n:\"Footer\", */ f:parse_XLHeaderFooter },\n\t/*::[*/0x0017/*::]*/: { /* n:\"ExternSheet\", */ f:parse_ExternSheet },\n\t/*::[*/0x0018/*::]*/: { /* n:\"Lbl\", */ f:parse_Lbl },\n\t/*::[*/0x0019/*::]*/: { /* n:\"WinProtect\", */ f:parsebool },\n\t/*::[*/0x001a/*::]*/: { /* n:\"VerticalPageBreaks\", */ },\n\t/*::[*/0x001b/*::]*/: { /* n:\"HorizontalPageBreaks\", */ },\n\t/*::[*/0x001c/*::]*/: { /* n:\"Note\", */ f:parse_Note },\n\t/*::[*/0x001d/*::]*/: { /* n:\"Selection\", */ },\n\t/*::[*/0x0022/*::]*/: { /* n:\"Date1904\", */ f:parsebool },\n\t/*::[*/0x0023/*::]*/: { /* n:\"ExternName\", */ f:parse_ExternName },\n\t/*::[*/0x0026/*::]*/: { /* n:\"LeftMargin\", */ f:parse_Xnum }, // *\n\t/*::[*/0x0027/*::]*/: { /* n:\"RightMargin\", */ f:parse_Xnum }, // *\n\t/*::[*/0x0028/*::]*/: { /* n:\"TopMargin\", */ f:parse_Xnum }, // *\n\t/*::[*/0x0029/*::]*/: { /* n:\"BottomMargin\", */ f:parse_Xnum }, // *\n\t/*::[*/0x002a/*::]*/: { /* n:\"PrintRowCol\", */ f:parsebool },\n\t/*::[*/0x002b/*::]*/: { /* n:\"PrintGrid\", */ f:parsebool },\n\t/*::[*/0x002f/*::]*/: { /* n:\"FilePass\", */ f:parse_FilePass },\n\t/*::[*/0x0031/*::]*/: { /* n:\"Font\", */ f:parse_Font },\n\t/*::[*/0x0033/*::]*/: { /* n:\"PrintSize\", */ f:parseuint16 },\n\t/*::[*/0x003c/*::]*/: { /* n:\"Continue\", */ },\n\t/*::[*/0x003d/*::]*/: { /* n:\"Window1\", */ f:parse_Window1 },\n\t/*::[*/0x0040/*::]*/: { /* n:\"Backup\", */ f:parsebool },\n\t/*::[*/0x0041/*::]*/: { /* n:\"Pane\", */ f:parse_Pane },\n\t/*::[*/0x0042/*::]*/: { /* n:\"CodePage\", */ f:parseuint16 },\n\t/*::[*/0x004d/*::]*/: { /* n:\"Pls\", */ },\n\t/*::[*/0x0050/*::]*/: { /* n:\"DCon\", */ },\n\t/*::[*/0x0051/*::]*/: { /* n:\"DConRef\", */ },\n\t/*::[*/0x0052/*::]*/: { /* n:\"DConName\", */ },\n\t/*::[*/0x0055/*::]*/: { /* n:\"DefColWidth\", */ f:parseuint16 },\n\t/*::[*/0x0059/*::]*/: { /* n:\"XCT\", */ },\n\t/*::[*/0x005a/*::]*/: { /* n:\"CRN\", */ },\n\t/*::[*/0x005b/*::]*/: { /* n:\"FileSharing\", */ },\n\t/*::[*/0x005c/*::]*/: { /* n:\"WriteAccess\", */ f:parse_WriteAccess },\n\t/*::[*/0x005d/*::]*/: { /* n:\"Obj\", */ f:parse_Obj },\n\t/*::[*/0x005e/*::]*/: { /* n:\"Uncalced\", */ },\n\t/*::[*/0x005f/*::]*/: { /* n:\"CalcSaveRecalc\", */ f:parsebool }, //\n\t/*::[*/0x0060/*::]*/: { /* n:\"Template\", */ },\n\t/*::[*/0x0061/*::]*/: { /* n:\"Intl\", */ },\n\t/*::[*/0x0063/*::]*/: { /* n:\"ObjProtect\", */ f:parsebool },\n\t/*::[*/0x007d/*::]*/: { /* n:\"ColInfo\", */ f:parse_ColInfo },\n\t/*::[*/0x0080/*::]*/: { /* n:\"Guts\", */ f:parse_Guts },\n\t/*::[*/0x0081/*::]*/: { /* n:\"WsBool\", */ f:parse_WsBool },\n\t/*::[*/0x0082/*::]*/: { /* n:\"GridSet\", */ f:parseuint16 },\n\t/*::[*/0x0083/*::]*/: { /* n:\"HCenter\", */ f:parsebool },\n\t/*::[*/0x0084/*::]*/: { /* n:\"VCenter\", */ f:parsebool },\n\t/*::[*/0x0085/*::]*/: { /* n:\"BoundSheet8\", */ f:parse_BoundSheet8 },\n\t/*::[*/0x0086/*::]*/: { /* n:\"WriteProtect\", */ },\n\t/*::[*/0x008c/*::]*/: { /* n:\"Country\", */ f:parse_Country },\n\t/*::[*/0x008d/*::]*/: { /* n:\"HideObj\", */ f:parseuint16 },\n\t/*::[*/0x0090/*::]*/: { /* n:\"Sort\", */ },\n\t/*::[*/0x0092/*::]*/: { /* n:\"Palette\", */ f:parse_Palette },\n\t/*::[*/0x0097/*::]*/: { /* n:\"Sync\", */ },\n\t/*::[*/0x0098/*::]*/: { /* n:\"LPr\", */ },\n\t/*::[*/0x0099/*::]*/: { /* n:\"DxGCol\", */ },\n\t/*::[*/0x009a/*::]*/: { /* n:\"FnGroupName\", */ },\n\t/*::[*/0x009b/*::]*/: { /* n:\"FilterMode\", */ },\n\t/*::[*/0x009c/*::]*/: { /* n:\"BuiltInFnGroupCount\", */ f:parseuint16 },\n\t/*::[*/0x009d/*::]*/: { /* n:\"AutoFilterInfo\", */ },\n\t/*::[*/0x009e/*::]*/: { /* n:\"AutoFilter\", */ },\n\t/*::[*/0x00a0/*::]*/: { /* n:\"Scl\", */ f:parse_Scl },\n\t/*::[*/0x00a1/*::]*/: { /* n:\"Setup\", */ f:parse_Setup },\n\t/*::[*/0x00ae/*::]*/: { /* n:\"ScenMan\", */ },\n\t/*::[*/0x00af/*::]*/: { /* n:\"SCENARIO\", */ },\n\t/*::[*/0x00b0/*::]*/: { /* n:\"SxView\", */ },\n\t/*::[*/0x00b1/*::]*/: { /* n:\"Sxvd\", */ },\n\t/*::[*/0x00b2/*::]*/: { /* n:\"SXVI\", */ },\n\t/*::[*/0x00b4/*::]*/: { /* n:\"SxIvd\", */ },\n\t/*::[*/0x00b5/*::]*/: { /* n:\"SXLI\", */ },\n\t/*::[*/0x00b6/*::]*/: { /* n:\"SXPI\", */ },\n\t/*::[*/0x00b8/*::]*/: { /* n:\"DocRoute\", */ },\n\t/*::[*/0x00b9/*::]*/: { /* n:\"RecipName\", */ },\n\t/*::[*/0x00bd/*::]*/: { /* n:\"MulRk\", */ f:parse_MulRk },\n\t/*::[*/0x00be/*::]*/: { /* n:\"MulBlank\", */ f:parse_MulBlank },\n\t/*::[*/0x00c1/*::]*/: { /* n:\"Mms\", */ f:parsenoop2 },\n\t/*::[*/0x00c5/*::]*/: { /* n:\"SXDI\", */ },\n\t/*::[*/0x00c6/*::]*/: { /* n:\"SXDB\", */ },\n\t/*::[*/0x00c7/*::]*/: { /* n:\"SXFDB\", */ },\n\t/*::[*/0x00c8/*::]*/: { /* n:\"SXDBB\", */ },\n\t/*::[*/0x00c9/*::]*/: { /* n:\"SXNum\", */ },\n\t/*::[*/0x00ca/*::]*/: { /* n:\"SxBool\", */ f:parsebool },\n\t/*::[*/0x00cb/*::]*/: { /* n:\"SxErr\", */ },\n\t/*::[*/0x00cc/*::]*/: { /* n:\"SXInt\", */ },\n\t/*::[*/0x00cd/*::]*/: { /* n:\"SXString\", */ },\n\t/*::[*/0x00ce/*::]*/: { /* n:\"SXDtr\", */ },\n\t/*::[*/0x00cf/*::]*/: { /* n:\"SxNil\", */ },\n\t/*::[*/0x00d0/*::]*/: { /* n:\"SXTbl\", */ },\n\t/*::[*/0x00d1/*::]*/: { /* n:\"SXTBRGIITM\", */ },\n\t/*::[*/0x00d2/*::]*/: { /* n:\"SxTbpg\", */ },\n\t/*::[*/0x00d3/*::]*/: { /* n:\"ObProj\", */ },\n\t/*::[*/0x00d5/*::]*/: { /* n:\"SXStreamID\", */ },\n\t/*::[*/0x00d7/*::]*/: { /* n:\"DBCell\", */ },\n\t/*::[*/0x00d8/*::]*/: { /* n:\"SXRng\", */ },\n\t/*::[*/0x00d9/*::]*/: { /* n:\"SxIsxoper\", */ },\n\t/*::[*/0x00da/*::]*/: { /* n:\"BookBool\", */ f:parseuint16 },\n\t/*::[*/0x00dc/*::]*/: { /* n:\"DbOrParamQry\", */ },\n\t/*::[*/0x00dd/*::]*/: { /* n:\"ScenarioProtect\", */ f:parsebool },\n\t/*::[*/0x00de/*::]*/: { /* n:\"OleObjectSize\", */ },\n\t/*::[*/0x00e0/*::]*/: { /* n:\"XF\", */ f:parse_XF },\n\t/*::[*/0x00e1/*::]*/: { /* n:\"InterfaceHdr\", */ f:parse_InterfaceHdr },\n\t/*::[*/0x00e2/*::]*/: { /* n:\"InterfaceEnd\", */ f:parsenoop2 },\n\t/*::[*/0x00e3/*::]*/: { /* n:\"SXVS\", */ },\n\t/*::[*/0x00e5/*::]*/: { /* n:\"MergeCells\", */ f:parse_MergeCells },\n\t/*::[*/0x00e9/*::]*/: { /* n:\"BkHim\", */ },\n\t/*::[*/0x00eb/*::]*/: { /* n:\"MsoDrawingGroup\", */ },\n\t/*::[*/0x00ec/*::]*/: { /* n:\"MsoDrawing\", */ },\n\t/*::[*/0x00ed/*::]*/: { /* n:\"MsoDrawingSelection\", */ },\n\t/*::[*/0x00ef/*::]*/: { /* n:\"PhoneticInfo\", */ },\n\t/*::[*/0x00f0/*::]*/: { /* n:\"SxRule\", */ },\n\t/*::[*/0x00f1/*::]*/: { /* n:\"SXEx\", */ },\n\t/*::[*/0x00f2/*::]*/: { /* n:\"SxFilt\", */ },\n\t/*::[*/0x00f4/*::]*/: { /* n:\"SxDXF\", */ },\n\t/*::[*/0x00f5/*::]*/: { /* n:\"SxItm\", */ },\n\t/*::[*/0x00f6/*::]*/: { /* n:\"SxName\", */ },\n\t/*::[*/0x00f7/*::]*/: { /* n:\"SxSelect\", */ },\n\t/*::[*/0x00f8/*::]*/: { /* n:\"SXPair\", */ },\n\t/*::[*/0x00f9/*::]*/: { /* n:\"SxFmla\", */ },\n\t/*::[*/0x00fb/*::]*/: { /* n:\"SxFormat\", */ },\n\t/*::[*/0x00fc/*::]*/: { /* n:\"SST\", */ f:parse_SST },\n\t/*::[*/0x00fd/*::]*/: { /* n:\"LabelSst\", */ f:parse_LabelSst },\n\t/*::[*/0x00ff/*::]*/: { /* n:\"ExtSST\", */ f:parse_ExtSST },\n\t/*::[*/0x0100/*::]*/: { /* n:\"SXVDEx\", */ },\n\t/*::[*/0x0103/*::]*/: { /* n:\"SXFormula\", */ },\n\t/*::[*/0x0122/*::]*/: { /* n:\"SXDBEx\", */ },\n\t/*::[*/0x0137/*::]*/: { /* n:\"RRDInsDel\", */ },\n\t/*::[*/0x0138/*::]*/: { /* n:\"RRDHead\", */ },\n\t/*::[*/0x013b/*::]*/: { /* n:\"RRDChgCell\", */ },\n\t/*::[*/0x013d/*::]*/: { /* n:\"RRTabId\", */ f:parseuint16a },\n\t/*::[*/0x013e/*::]*/: { /* n:\"RRDRenSheet\", */ },\n\t/*::[*/0x013f/*::]*/: { /* n:\"RRSort\", */ },\n\t/*::[*/0x0140/*::]*/: { /* n:\"RRDMove\", */ },\n\t/*::[*/0x014a/*::]*/: { /* n:\"RRFormat\", */ },\n\t/*::[*/0x014b/*::]*/: { /* n:\"RRAutoFmt\", */ },\n\t/*::[*/0x014d/*::]*/: { /* n:\"RRInsertSh\", */ },\n\t/*::[*/0x014e/*::]*/: { /* n:\"RRDMoveBegin\", */ },\n\t/*::[*/0x014f/*::]*/: { /* n:\"RRDMoveEnd\", */ },\n\t/*::[*/0x0150/*::]*/: { /* n:\"RRDInsDelBegin\", */ },\n\t/*::[*/0x0151/*::]*/: { /* n:\"RRDInsDelEnd\", */ },\n\t/*::[*/0x0152/*::]*/: { /* n:\"RRDConflict\", */ },\n\t/*::[*/0x0153/*::]*/: { /* n:\"RRDDefName\", */ },\n\t/*::[*/0x0154/*::]*/: { /* n:\"RRDRstEtxp\", */ },\n\t/*::[*/0x015f/*::]*/: { /* n:\"LRng\", */ },\n\t/*::[*/0x0160/*::]*/: { /* n:\"UsesELFs\", */ f:parsebool },\n\t/*::[*/0x0161/*::]*/: { /* n:\"DSF\", */ f:parsenoop2 },\n\t/*::[*/0x0191/*::]*/: { /* n:\"CUsr\", */ },\n\t/*::[*/0x0192/*::]*/: { /* n:\"CbUsr\", */ },\n\t/*::[*/0x0193/*::]*/: { /* n:\"UsrInfo\", */ },\n\t/*::[*/0x0194/*::]*/: { /* n:\"UsrExcl\", */ },\n\t/*::[*/0x0195/*::]*/: { /* n:\"FileLock\", */ },\n\t/*::[*/0x0196/*::]*/: { /* n:\"RRDInfo\", */ },\n\t/*::[*/0x0197/*::]*/: { /* n:\"BCUsrs\", */ },\n\t/*::[*/0x0198/*::]*/: { /* n:\"UsrChk\", */ },\n\t/*::[*/0x01a9/*::]*/: { /* n:\"UserBView\", */ },\n\t/*::[*/0x01aa/*::]*/: { /* n:\"UserSViewBegin\", */ },\n\t/*::[*/0x01ab/*::]*/: { /* n:\"UserSViewEnd\", */ },\n\t/*::[*/0x01ac/*::]*/: { /* n:\"RRDUserView\", */ },\n\t/*::[*/0x01ad/*::]*/: { /* n:\"Qsi\", */ },\n\t/*::[*/0x01ae/*::]*/: { /* n:\"SupBook\", */ f:parse_SupBook },\n\t/*::[*/0x01af/*::]*/: { /* n:\"Prot4Rev\", */ f:parsebool },\n\t/*::[*/0x01b0/*::]*/: { /* n:\"CondFmt\", */ },\n\t/*::[*/0x01b1/*::]*/: { /* n:\"CF\", */ },\n\t/*::[*/0x01b2/*::]*/: { /* n:\"DVal\", */ },\n\t/*::[*/0x01b5/*::]*/: { /* n:\"DConBin\", */ },\n\t/*::[*/0x01b6/*::]*/: { /* n:\"TxO\", */ f:parse_TxO },\n\t/*::[*/0x01b7/*::]*/: { /* n:\"RefreshAll\", */ f:parsebool }, //\n\t/*::[*/0x01b8/*::]*/: { /* n:\"HLink\", */ f:parse_HLink },\n\t/*::[*/0x01b9/*::]*/: { /* n:\"Lel\", */ },\n\t/*::[*/0x01ba/*::]*/: { /* n:\"CodeName\", */ f:parse_XLUnicodeString },\n\t/*::[*/0x01bb/*::]*/: { /* n:\"SXFDBType\", */ },\n\t/*::[*/0x01bc/*::]*/: { /* n:\"Prot4RevPass\", */ f:parseuint16 },\n\t/*::[*/0x01bd/*::]*/: { /* n:\"ObNoMacros\", */ },\n\t/*::[*/0x01be/*::]*/: { /* n:\"Dv\", */ },\n\t/*::[*/0x01c0/*::]*/: { /* n:\"Excel9File\", */ f:parsenoop2 },\n\t/*::[*/0x01c1/*::]*/: { /* n:\"RecalcId\", */ f:parse_RecalcId, r:2},\n\t/*::[*/0x01c2/*::]*/: { /* n:\"EntExU2\", */ f:parsenoop2 },\n\t/*::[*/0x0200/*::]*/: { /* n:\"Dimensions\", */ f:parse_Dimensions },\n\t/*::[*/0x0201/*::]*/: { /* n:\"Blank\", */ f:parse_Blank },\n\t/*::[*/0x0203/*::]*/: { /* n:\"Number\", */ f:parse_Number },\n\t/*::[*/0x0204/*::]*/: { /* n:\"Label\", */ f:parse_Label },\n\t/*::[*/0x0205/*::]*/: { /* n:\"BoolErr\", */ f:parse_BoolErr },\n\t/*::[*/0x0207/*::]*/: { /* n:\"String\", */ f:parse_String },\n\t/*::[*/0x0208/*::]*/: { /* n:\"Row\", */ f:parse_Row },\n\t/*::[*/0x020b/*::]*/: { /* n:\"Index\", */ },\n\t/*::[*/0x0221/*::]*/: { /* n:\"Array\", */ f:parse_Array },\n\t/*::[*/0x0225/*::]*/: { /* n:\"DefaultRowHeight\", */ f:parse_DefaultRowHeight },\n\t/*::[*/0x0236/*::]*/: { /* n:\"Table\", */ },\n\t/*::[*/0x023e/*::]*/: { /* n:\"Window2\", */ f:parse_Window2 },\n\t/*::[*/0x027e/*::]*/: { /* n:\"RK\", */ f:parse_RK },\n\t/*::[*/0x0293/*::]*/: { /* n:\"Style\", */ },\n\t/*::[*/0x0418/*::]*/: { /* n:\"BigName\", */ },\n\t/*::[*/0x041e/*::]*/: { /* n:\"Format\", */ f:parse_Format },\n\t/*::[*/0x043c/*::]*/: { /* n:\"ContinueBigName\", */ },\n\t/*::[*/0x04bc/*::]*/: { /* n:\"ShrFmla\", */ f:parse_ShrFmla },\n\t/*::[*/0x0800/*::]*/: { /* n:\"HLinkTooltip\", */ f:parse_HLinkTooltip },\n\t/*::[*/0x0801/*::]*/: { /* n:\"WebPub\", */ },\n\t/*::[*/0x0802/*::]*/: { /* n:\"QsiSXTag\", */ },\n\t/*::[*/0x0803/*::]*/: { /* n:\"DBQueryExt\", */ },\n\t/*::[*/0x0804/*::]*/: { /* n:\"ExtString\", */ },\n\t/*::[*/0x0805/*::]*/: { /* n:\"TxtQry\", */ },\n\t/*::[*/0x0806/*::]*/: { /* n:\"Qsir\", */ },\n\t/*::[*/0x0807/*::]*/: { /* n:\"Qsif\", */ },\n\t/*::[*/0x0808/*::]*/: { /* n:\"RRDTQSIF\", */ },\n\t/*::[*/0x0809/*::]*/: { /* n:\"BOF\", */ f:parse_BOF },\n\t/*::[*/0x080a/*::]*/: { /* n:\"OleDbConn\", */ },\n\t/*::[*/0x080b/*::]*/: { /* n:\"WOpt\", */ },\n\t/*::[*/0x080c/*::]*/: { /* n:\"SXViewEx\", */ },\n\t/*::[*/0x080d/*::]*/: { /* n:\"SXTH\", */ },\n\t/*::[*/0x080e/*::]*/: { /* n:\"SXPIEx\", */ },\n\t/*::[*/0x080f/*::]*/: { /* n:\"SXVDTEx\", */ },\n\t/*::[*/0x0810/*::]*/: { /* n:\"SXViewEx9\", */ },\n\t/*::[*/0x0812/*::]*/: { /* n:\"ContinueFrt\", */ },\n\t/*::[*/0x0813/*::]*/: { /* n:\"RealTimeData\", */ },\n\t/*::[*/0x0850/*::]*/: { /* n:\"ChartFrtInfo\", */ },\n\t/*::[*/0x0851/*::]*/: { /* n:\"FrtWrapper\", */ },\n\t/*::[*/0x0852/*::]*/: { /* n:\"StartBlock\", */ },\n\t/*::[*/0x0853/*::]*/: { /* n:\"EndBlock\", */ },\n\t/*::[*/0x0854/*::]*/: { /* n:\"StartObject\", */ },\n\t/*::[*/0x0855/*::]*/: { /* n:\"EndObject\", */ },\n\t/*::[*/0x0856/*::]*/: { /* n:\"CatLab\", */ },\n\t/*::[*/0x0857/*::]*/: { /* n:\"YMult\", */ },\n\t/*::[*/0x0858/*::]*/: { /* n:\"SXViewLink\", */ },\n\t/*::[*/0x0859/*::]*/: { /* n:\"PivotChartBits\", */ },\n\t/*::[*/0x085a/*::]*/: { /* n:\"FrtFontList\", */ },\n\t/*::[*/0x0862/*::]*/: { /* n:\"SheetExt\", */ },\n\t/*::[*/0x0863/*::]*/: { /* n:\"BookExt\", */ r:12},\n\t/*::[*/0x0864/*::]*/: { /* n:\"SXAddl\", */ },\n\t/*::[*/0x0865/*::]*/: { /* n:\"CrErr\", */ },\n\t/*::[*/0x0866/*::]*/: { /* n:\"HFPicture\", */ },\n\t/*::[*/0x0867/*::]*/: { /* n:\"FeatHdr\", */ f:parsenoop2 },\n\t/*::[*/0x0868/*::]*/: { /* n:\"Feat\", */ },\n\t/*::[*/0x086a/*::]*/: { /* n:\"DataLabExt\", */ },\n\t/*::[*/0x086b/*::]*/: { /* n:\"DataLabExtContents\", */ },\n\t/*::[*/0x086c/*::]*/: { /* n:\"CellWatch\", */ },\n\t/*::[*/0x0871/*::]*/: { /* n:\"FeatHdr11\", */ },\n\t/*::[*/0x0872/*::]*/: { /* n:\"Feature11\", */ },\n\t/*::[*/0x0874/*::]*/: { /* n:\"DropDownObjIds\", */ },\n\t/*::[*/0x0875/*::]*/: { /* n:\"ContinueFrt11\", */ },\n\t/*::[*/0x0876/*::]*/: { /* n:\"DConn\", */ },\n\t/*::[*/0x0877/*::]*/: { /* n:\"List12\", */ },\n\t/*::[*/0x0878/*::]*/: { /* n:\"Feature12\", */ },\n\t/*::[*/0x0879/*::]*/: { /* n:\"CondFmt12\", */ },\n\t/*::[*/0x087a/*::]*/: { /* n:\"CF12\", */ },\n\t/*::[*/0x087b/*::]*/: { /* n:\"CFEx\", */ },\n\t/*::[*/0x087c/*::]*/: { /* n:\"XFCRC\", */ f:parse_XFCRC, r:12 },\n\t/*::[*/0x087d/*::]*/: { /* n:\"XFExt\", */ f:parse_XFExt, r:12 },\n\t/*::[*/0x087e/*::]*/: { /* n:\"AutoFilter12\", */ },\n\t/*::[*/0x087f/*::]*/: { /* n:\"ContinueFrt12\", */ },\n\t/*::[*/0x0884/*::]*/: { /* n:\"MDTInfo\", */ },\n\t/*::[*/0x0885/*::]*/: { /* n:\"MDXStr\", */ },\n\t/*::[*/0x0886/*::]*/: { /* n:\"MDXTuple\", */ },\n\t/*::[*/0x0887/*::]*/: { /* n:\"MDXSet\", */ },\n\t/*::[*/0x0888/*::]*/: { /* n:\"MDXProp\", */ },\n\t/*::[*/0x0889/*::]*/: { /* n:\"MDXKPI\", */ },\n\t/*::[*/0x088a/*::]*/: { /* n:\"MDB\", */ },\n\t/*::[*/0x088b/*::]*/: { /* n:\"PLV\", */ },\n\t/*::[*/0x088c/*::]*/: { /* n:\"Compat12\", */ f:parsebool, r:12 },\n\t/*::[*/0x088d/*::]*/: { /* n:\"DXF\", */ },\n\t/*::[*/0x088e/*::]*/: { /* n:\"TableStyles\", */ r:12 },\n\t/*::[*/0x088f/*::]*/: { /* n:\"TableStyle\", */ },\n\t/*::[*/0x0890/*::]*/: { /* n:\"TableStyleElement\", */ },\n\t/*::[*/0x0892/*::]*/: { /* n:\"StyleExt\", */ },\n\t/*::[*/0x0893/*::]*/: { /* n:\"NamePublish\", */ },\n\t/*::[*/0x0894/*::]*/: { /* n:\"NameCmt\", */ f:parse_NameCmt, r:12 },\n\t/*::[*/0x0895/*::]*/: { /* n:\"SortData\", */ },\n\t/*::[*/0x0896/*::]*/: { /* n:\"Theme\", */ f:parse_Theme, r:12 },\n\t/*::[*/0x0897/*::]*/: { /* n:\"GUIDTypeLib\", */ },\n\t/*::[*/0x0898/*::]*/: { /* n:\"FnGrp12\", */ },\n\t/*::[*/0x0899/*::]*/: { /* n:\"NameFnGrp12\", */ },\n\t/*::[*/0x089a/*::]*/: { /* n:\"MTRSettings\", */ f:parse_MTRSettings, r:12 },\n\t/*::[*/0x089b/*::]*/: { /* n:\"CompressPictures\", */ f:parsenoop2 },\n\t/*::[*/0x089c/*::]*/: { /* n:\"HeaderFooter\", */ },\n\t/*::[*/0x089d/*::]*/: { /* n:\"CrtLayout12\", */ },\n\t/*::[*/0x089e/*::]*/: { /* n:\"CrtMlFrt\", */ },\n\t/*::[*/0x089f/*::]*/: { /* n:\"CrtMlFrtContinue\", */ },\n\t/*::[*/0x08a3/*::]*/: { /* n:\"ForceFullCalculation\", */ f:parse_ForceFullCalculation },\n\t/*::[*/0x08a4/*::]*/: { /* n:\"ShapePropsStream\", */ },\n\t/*::[*/0x08a5/*::]*/: { /* n:\"TextPropsStream\", */ },\n\t/*::[*/0x08a6/*::]*/: { /* n:\"RichTextStream\", */ },\n\t/*::[*/0x08a7/*::]*/: { /* n:\"CrtLayout12A\", */ },\n\t/*::[*/0x1001/*::]*/: { /* n:\"Units\", */ },\n\t/*::[*/0x1002/*::]*/: { /* n:\"Chart\", */ },\n\t/*::[*/0x1003/*::]*/: { /* n:\"Series\", */ },\n\t/*::[*/0x1006/*::]*/: { /* n:\"DataFormat\", */ },\n\t/*::[*/0x1007/*::]*/: { /* n:\"LineFormat\", */ },\n\t/*::[*/0x1009/*::]*/: { /* n:\"MarkerFormat\", */ },\n\t/*::[*/0x100a/*::]*/: { /* n:\"AreaFormat\", */ },\n\t/*::[*/0x100b/*::]*/: { /* n:\"PieFormat\", */ },\n\t/*::[*/0x100c/*::]*/: { /* n:\"AttachedLabel\", */ },\n\t/*::[*/0x100d/*::]*/: { /* n:\"SeriesText\", */ },\n\t/*::[*/0x1014/*::]*/: { /* n:\"ChartFormat\", */ },\n\t/*::[*/0x1015/*::]*/: { /* n:\"Legend\", */ },\n\t/*::[*/0x1016/*::]*/: { /* n:\"SeriesList\", */ },\n\t/*::[*/0x1017/*::]*/: { /* n:\"Bar\", */ },\n\t/*::[*/0x1018/*::]*/: { /* n:\"Line\", */ },\n\t/*::[*/0x1019/*::]*/: { /* n:\"Pie\", */ },\n\t/*::[*/0x101a/*::]*/: { /* n:\"Area\", */ },\n\t/*::[*/0x101b/*::]*/: { /* n:\"Scatter\", */ },\n\t/*::[*/0x101c/*::]*/: { /* n:\"CrtLine\", */ },\n\t/*::[*/0x101d/*::]*/: { /* n:\"Axis\", */ },\n\t/*::[*/0x101e/*::]*/: { /* n:\"Tick\", */ },\n\t/*::[*/0x101f/*::]*/: { /* n:\"ValueRange\", */ },\n\t/*::[*/0x1020/*::]*/: { /* n:\"CatSerRange\", */ },\n\t/*::[*/0x1021/*::]*/: { /* n:\"AxisLine\", */ },\n\t/*::[*/0x1022/*::]*/: { /* n:\"CrtLink\", */ },\n\t/*::[*/0x1024/*::]*/: { /* n:\"DefaultText\", */ },\n\t/*::[*/0x1025/*::]*/: { /* n:\"Text\", */ },\n\t/*::[*/0x1026/*::]*/: { /* n:\"FontX\", */ f:parseuint16 },\n\t/*::[*/0x1027/*::]*/: { /* n:\"ObjectLink\", */ },\n\t/*::[*/0x1032/*::]*/: { /* n:\"Frame\", */ },\n\t/*::[*/0x1033/*::]*/: { /* n:\"Begin\", */ },\n\t/*::[*/0x1034/*::]*/: { /* n:\"End\", */ },\n\t/*::[*/0x1035/*::]*/: { /* n:\"PlotArea\", */ },\n\t/*::[*/0x103a/*::]*/: { /* n:\"Chart3d\", */ },\n\t/*::[*/0x103c/*::]*/: { /* n:\"PicF\", */ },\n\t/*::[*/0x103d/*::]*/: { /* n:\"DropBar\", */ },\n\t/*::[*/0x103e/*::]*/: { /* n:\"Radar\", */ },\n\t/*::[*/0x103f/*::]*/: { /* n:\"Surf\", */ },\n\t/*::[*/0x1040/*::]*/: { /* n:\"RadarArea\", */ },\n\t/*::[*/0x1041/*::]*/: { /* n:\"AxisParent\", */ },\n\t/*::[*/0x1043/*::]*/: { /* n:\"LegendException\", */ },\n\t/*::[*/0x1044/*::]*/: { /* n:\"ShtProps\", */ f:parse_ShtProps },\n\t/*::[*/0x1045/*::]*/: { /* n:\"SerToCrt\", */ },\n\t/*::[*/0x1046/*::]*/: { /* n:\"AxesUsed\", */ },\n\t/*::[*/0x1048/*::]*/: { /* n:\"SBaseRef\", */ },\n\t/*::[*/0x104a/*::]*/: { /* n:\"SerParent\", */ },\n\t/*::[*/0x104b/*::]*/: { /* n:\"SerAuxTrend\", */ },\n\t/*::[*/0x104e/*::]*/: { /* n:\"IFmtRecord\", */ },\n\t/*::[*/0x104f/*::]*/: { /* n:\"Pos\", */ },\n\t/*::[*/0x1050/*::]*/: { /* n:\"AlRuns\", */ },\n\t/*::[*/0x1051/*::]*/: { /* n:\"BRAI\", */ },\n\t/*::[*/0x105b/*::]*/: { /* n:\"SerAuxErrBar\", */ },\n\t/*::[*/0x105c/*::]*/: { /* n:\"ClrtClient\", */ f:parse_ClrtClient },\n\t/*::[*/0x105d/*::]*/: { /* n:\"SerFmt\", */ },\n\t/*::[*/0x105f/*::]*/: { /* n:\"Chart3DBarShape\", */ },\n\t/*::[*/0x1060/*::]*/: { /* n:\"Fbi\", */ },\n\t/*::[*/0x1061/*::]*/: { /* n:\"BopPop\", */ },\n\t/*::[*/0x1062/*::]*/: { /* n:\"AxcExt\", */ },\n\t/*::[*/0x1063/*::]*/: { /* n:\"Dat\", */ },\n\t/*::[*/0x1064/*::]*/: { /* n:\"PlotGrowth\", */ },\n\t/*::[*/0x1065/*::]*/: { /* n:\"SIIndex\", */ },\n\t/*::[*/0x1066/*::]*/: { /* n:\"GelFrame\", */ },\n\t/*::[*/0x1067/*::]*/: { /* n:\"BopPopCustom\", */ },\n\t/*::[*/0x1068/*::]*/: { /* n:\"Fbi2\", */ },\n\n\t/*::[*/0x0000/*::]*/: { /* n:\"Dimensions\", */ f:parse_Dimensions },\n\t/*::[*/0x0001/*::]*/: { /* n:\"BIFF2BLANK\", */ },\n\t/*::[*/0x0002/*::]*/: { /* n:\"BIFF2INT\", */ f:parse_BIFF2INT },\n\t/*::[*/0x0003/*::]*/: { /* n:\"BIFF2NUM\", */ f:parse_BIFF2NUM },\n\t/*::[*/0x0004/*::]*/: { /* n:\"BIFF2STR\", */ f:parse_BIFF2STR },\n\t/*::[*/0x0005/*::]*/: { /* n:\"BoolErr\", */ f:parse_BoolErr },\n\t/*::[*/0x0007/*::]*/: { /* n:\"String\", */ f:parse_BIFF2STRING },\n\t/*::[*/0x0008/*::]*/: { /* n:\"BIFF2ROW\", */ },\n\t/*::[*/0x0009/*::]*/: { /* n:\"BOF\", */ f:parse_BOF },\n\t/*::[*/0x000b/*::]*/: { /* n:\"Index\", */ },\n\t/*::[*/0x0016/*::]*/: { /* n:\"ExternCount\", */ f:parseuint16 },\n\t/*::[*/0x001e/*::]*/: { /* n:\"BIFF2FORMAT\", */ f:parse_BIFF2Format },\n\t/*::[*/0x001f/*::]*/: { /* n:\"BIFF2FMTCNT\", */ }, /* 16-bit cnt of BIFF2FORMAT records */\n\t/*::[*/0x0020/*::]*/: { /* n:\"BIFF2COLINFO\", */ },\n\t/*::[*/0x0021/*::]*/: { /* n:\"Array\", */ f:parse_Array },\n\t/*::[*/0x0024/*::]*/: { /* n:\"COLWIDTH\", */ },\n\t/*::[*/0x0025/*::]*/: { /* n:\"DefaultRowHeight\", */ f:parse_DefaultRowHeight },\n\t// 0x2c ??\n\t// 0x2d ??\n\t// 0x2e ??\n\t// 0x30 FONTCOUNT: number of fonts\n\t/*::[*/0x0032/*::]*/: { /* n:\"BIFF2FONTXTRA\", */ f:parse_BIFF2FONTXTRA },\n\t// 0x35: INFOOPTS\n\t// 0x36: TABLE (BIFF2 only)\n\t// 0x37: TABLE2 (BIFF2 only)\n\t// 0x38: WNDESK\n\t// 0x39 ??\n\t// 0x3a: BEGINPREF\n\t// 0x3b: ENDPREF\n\t/*::[*/0x003e/*::]*/: { /* n:\"BIFF2WINDOW2\", */ },\n\t// 0x3f ??\n\t// 0x46: SHOWSCROLL\n\t// 0x47: SHOWFORMULA\n\t// 0x48: STATUSBAR\n\t// 0x49: SHORTMENUS\n\t// 0x4A:\n\t// 0x4B:\n\t// 0x4C:\n\t// 0x4E:\n\t// 0x4F:\n\t// 0x58: TOOLBAR (BIFF3)\n\n\t/* - - - */\n\t/*::[*/0x0034/*::]*/: { /* n:\"DDEObjName\", */ },\n\t/*::[*/0x0043/*::]*/: { /* n:\"BIFF2XF\", */ },\n\t/*::[*/0x0044/*::]*/: { /* n:\"BIFF2XFINDEX\", */ f:parseuint16 },\n\t/*::[*/0x0045/*::]*/: { /* n:\"BIFF2FONTCLR\", */ },\n\t/*::[*/0x0056/*::]*/: { /* n:\"BIFF4FMTCNT\", */ }, /* 16-bit cnt, similar to BIFF2 */\n\t/*::[*/0x007e/*::]*/: { /* n:\"RK\", */ }, /* Not necessarily same as 0x027e */\n\t/*::[*/0x007f/*::]*/: { /* n:\"ImData\", */ f:parse_ImData },\n\t/*::[*/0x0087/*::]*/: { /* n:\"Addin\", */ },\n\t/*::[*/0x0088/*::]*/: { /* n:\"Edg\", */ },\n\t/*::[*/0x0089/*::]*/: { /* n:\"Pub\", */ },\n\t// 0x8A\n\t// 0x8B LH: alternate menu key flag (BIFF3/4)\n\t// 0x8E\n\t// 0x8F\n\t/*::[*/0x0091/*::]*/: { /* n:\"Sub\", */ },\n\t// 0x93 STYLE\n\t/*::[*/0x0094/*::]*/: { /* n:\"LHRecord\", */ },\n\t/*::[*/0x0095/*::]*/: { /* n:\"LHNGraph\", */ },\n\t/*::[*/0x0096/*::]*/: { /* n:\"Sound\", */ },\n\t// 0xA2 FNPROTO: function prototypes (BIFF4)\n\t// 0xA3\n\t// 0xA8\n\t/*::[*/0x00a9/*::]*/: { /* n:\"CoordList\", */ },\n\t/*::[*/0x00ab/*::]*/: { /* n:\"GCW\", */ },\n\t/*::[*/0x00bc/*::]*/: { /* n:\"ShrFmla\", */ }, /* Not necessarily same as 0x04bc */\n\t/*::[*/0x00bf/*::]*/: { /* n:\"ToolbarHdr\", */ },\n\t/*::[*/0x00c0/*::]*/: { /* n:\"ToolbarEnd\", */ },\n\t/*::[*/0x00c2/*::]*/: { /* n:\"AddMenu\", */ },\n\t/*::[*/0x00c3/*::]*/: { /* n:\"DelMenu\", */ },\n\t/*::[*/0x00d6/*::]*/: { /* n:\"RString\", */ f:parse_RString },\n\t/*::[*/0x00df/*::]*/: { /* n:\"UDDesc\", */ },\n\t/*::[*/0x00ea/*::]*/: { /* n:\"TabIdConf\", */ },\n\t/*::[*/0x0162/*::]*/: { /* n:\"XL5Modify\", */ },\n\t/*::[*/0x01a5/*::]*/: { /* n:\"FileSharing2\", */ },\n\t/*::[*/0x0206/*::]*/: { /* n:\"Formula\", */ f:parse_Formula },\n\t/*::[*/0x0209/*::]*/: { /* n:\"BOF\", */ f:parse_BOF },\n\t/*::[*/0x0218/*::]*/: { /* n:\"Lbl\", */ f:parse_Lbl },\n\t/*::[*/0x0223/*::]*/: { /* n:\"ExternName\", */ f:parse_ExternName },\n\t/*::[*/0x0231/*::]*/: { /* n:\"Font\", */ },\n\t/*::[*/0x0243/*::]*/: { /* n:\"BIFF3XF\", */ },\n\t/*::[*/0x0406/*::]*/: { /* n:\"Formula\", */ f:parse_Formula },\n\t/*::[*/0x0409/*::]*/: { /* n:\"BOF\", */ f:parse_BOF },\n\t/*::[*/0x0443/*::]*/: { /* n:\"BIFF4XF\", */ },\n\t/*::[*/0x086d/*::]*/: { /* n:\"FeatInfo\", */ },\n\t/*::[*/0x0873/*::]*/: { /* n:\"FeatInfo11\", */ },\n\t/*::[*/0x0881/*::]*/: { /* n:\"SXAddl12\", */ },\n\t/*::[*/0x08c0/*::]*/: { /* n:\"AutoWebPub\", */ },\n\t/*::[*/0x08c1/*::]*/: { /* n:\"ListObj\", */ },\n\t/*::[*/0x08c2/*::]*/: { /* n:\"ListField\", */ },\n\t/*::[*/0x08c3/*::]*/: { /* n:\"ListDV\", */ },\n\t/*::[*/0x08c4/*::]*/: { /* n:\"ListCondFmt\", */ },\n\t/*::[*/0x08c5/*::]*/: { /* n:\"ListCF\", */ },\n\t/*::[*/0x08c6/*::]*/: { /* n:\"FMQry\", */ },\n\t/*::[*/0x08c7/*::]*/: { /* n:\"FMSQry\", */ },\n\t/*::[*/0x08c8/*::]*/: { /* n:\"PLV\", */ },\n\t/*::[*/0x08c9/*::]*/: { /* n:\"LnExt\", */ },\n\t/*::[*/0x08ca/*::]*/: { /* n:\"MkrExt\", */ },\n\t/*::[*/0x08cb/*::]*/: { /* n:\"CrtCoopt\", */ },\n\t/*::[*/0x08d6/*::]*/: { /* n:\"FRTArchId$\", */ r:12 },\n\n\t/*::[*/0x7262/*::]*/: {}\n};\n\nfunction write_biff_rec(ba/*:BufArray*/, type/*:number*/, payload, length/*:?number*/)/*:void*/ {\n\tvar t/*:number*/ = type;\n\tif(isNaN(t)) return;\n\tvar len = length || (payload||[]).length || 0;\n\tvar o = ba.next(4);\n\to.write_shift(2, t);\n\to.write_shift(2, len);\n\tif(/*:: len != null &&*/len > 0 && is_buf(payload)) ba.push(payload);\n}\n\nfunction write_biff_continue(ba/*:BufArray*/, type/*:number*/, payload, length/*:?number*/)/*:void*/ {\n\tvar len = length || (payload||[]).length || 0;\n\tif(len <= 8224) return write_biff_rec(ba, type, payload, len);\n\tvar t = type;\n\tif(isNaN(t)) return;\n\tvar parts = payload.parts || [], sidx = 0;\n\tvar i = 0, w = 0;\n\twhile(w + (parts[sidx] || 8224) <= 8224) { w+= (parts[sidx] || 8224); sidx++; }\n\tvar o = ba.next(4);\n\to.write_shift(2, t);\n\to.write_shift(2, w);\n\tba.push(payload.slice(i, i + w));\n\ti += w;\n\twhile(i < len) {\n\t\to = ba.next(4);\n\t\to.write_shift(2, 0x3c); // TODO: figure out correct continue type\n\t\tw = 0;\n\t\twhile(w + (parts[sidx] || 8224) <= 8224) { w+= (parts[sidx] || 8224); sidx++; }\n\t\to.write_shift(2, w);\n\t\tba.push(payload.slice(i, i+w)); i+= w;\n\t}\n}\n\nfunction write_BIFF2Cell(out, r/*:number*/, c/*:number*/) {\n\tif(!out) out = new_buf(7);\n\tout.write_shift(2, r);\n\tout.write_shift(2, c);\n\tout.write_shift(2, 0);\n\tout.write_shift(1, 0);\n\treturn out;\n}\n\nfunction write_BIFF2BERR(r/*:number*/, c/*:number*/, val, t/*:?string*/) {\n\tvar out = new_buf(9);\n\twrite_BIFF2Cell(out, r, c);\n\twrite_Bes(val, t || 'b', out);\n\treturn out;\n}\n\n/* TODO: codepage, large strings */\nfunction write_BIFF2LABEL(r/*:number*/, c/*:number*/, val) {\n\tvar out = new_buf(8 + 2*val.length);\n\twrite_BIFF2Cell(out, r, c);\n\tout.write_shift(1, val.length);\n\tout.write_shift(val.length, val, 'sbcs');\n\treturn out.l < out.length ? out.slice(0, out.l) : out;\n}\n\nfunction write_ws_biff2_cell(ba/*:BufArray*/, cell/*:Cell*/, R/*:number*/, C/*:number*//*::, opts*/) {\n\tif(cell.v != null) switch(cell.t) {\n\t\tcase 'd': case 'n':\n\t\t\tvar v = cell.t == 'd' ? datenum(parseDate(cell.v)) : cell.v;\n\t\t\tif((v == (v|0)) && (v >= 0) && (v < 65536))\n\t\t\t\twrite_biff_rec(ba, 0x0002, write_BIFF2INT(R, C, v));\n\t\t\telse\n\t\t\t\twrite_biff_rec(ba, 0x0003, write_BIFF2NUM(R,C, v));\n\t\t\treturn;\n\t\tcase 'b': case 'e': write_biff_rec(ba, 0x0005, write_BIFF2BERR(R, C, cell.v, cell.t)); return;\n\t\t/* TODO: codepage, sst */\n\t\tcase 's': case 'str':\n\t\t\twrite_biff_rec(ba, 0x0004, write_BIFF2LABEL(R, C, (cell.v||\"\").slice(0,255)));\n\t\t\treturn;\n\t}\n\twrite_biff_rec(ba, 0x0001, write_BIFF2Cell(null, R, C));\n}\n\nfunction write_ws_biff2(ba/*:BufArray*/, ws/*:Worksheet*/, idx/*:number*/, opts/*::, wb:Workbook*/) {\n\tvar dense = Array.isArray(ws);\n\tvar range = safe_decode_range(ws['!ref'] || \"A1\"), ref/*:string*/, rr = \"\", cols/*:Array*/ = [];\n\tif(range.e.c > 0xFF || range.e.r > 0x3FFF) {\n\t\tif(opts.WTF) throw new Error(\"Range \" + (ws['!ref'] || \"A1\") + \" exceeds format limit A1:IV16384\");\n\t\trange.e.c = Math.min(range.e.c, 0xFF);\n\t\trange.e.r = Math.min(range.e.c, 0x3FFF);\n\t\tref = encode_range(range);\n\t}\n\tfor(var R = range.s.r; R <= range.e.r; ++R) {\n\t\trr = encode_row(R);\n\t\tfor(var C = range.s.c; C <= range.e.c; ++C) {\n\t\t\tif(R === range.s.r) cols[C] = encode_col(C);\n\t\t\tref = cols[C] + rr;\n\t\t\tvar cell = dense ? (ws[R]||[])[C] : ws[ref];\n\t\t\tif(!cell) continue;\n\t\t\t/* write cell */\n\t\t\twrite_ws_biff2_cell(ba, cell, R, C, opts);\n\t\t}\n\t}\n}\n\n/* Based on test files */\nfunction write_biff2_buf(wb/*:Workbook*/, opts/*:WriteOpts*/) {\n\tvar o = opts || {};\n\tif(DENSE != null && o.dense == null) o.dense = DENSE;\n\tvar ba = buf_array();\n\tvar idx = 0;\n\tfor(var i=0;i*/ = [];\n\tvar range = safe_decode_range(ws['!ref'] || \"A1\");\n\tvar MAX_ROWS = b8 ? 65536 : 16384;\n\tif(range.e.c > 0xFF || range.e.r >= MAX_ROWS) {\n\t\tif(opts.WTF) throw new Error(\"Range \" + (ws['!ref'] || \"A1\") + \" exceeds format limit A1:IV16384\");\n\t\trange.e.c = Math.min(range.e.c, 0xFF);\n\t\trange.e.r = Math.min(range.e.c, MAX_ROWS-1);\n\t}\n\n\twrite_biff_rec(ba, 0x0809, write_BOF(wb, 0x10, opts));\n\t/* [Uncalced] Index */\n\twrite_biff_rec(ba, 0x000d /* CalcMode */, writeuint16(1));\n\twrite_biff_rec(ba, 0x000c /* CalcCount */, writeuint16(100));\n\twrite_biff_rec(ba, 0x000f /* CalcRefMode */, writebool(true));\n\twrite_biff_rec(ba, 0x0011 /* CalcIter */, writebool(false));\n\twrite_biff_rec(ba, 0x0010 /* CalcDelta */, write_Xnum(0.001));\n\twrite_biff_rec(ba, 0x005f /* CalcSaveRecalc */, writebool(true));\n\twrite_biff_rec(ba, 0x002a /* PrintRowCol */, writebool(false));\n\twrite_biff_rec(ba, 0x002b /* PrintGrid */, writebool(false));\n\twrite_biff_rec(ba, 0x0082 /* GridSet */, writeuint16(1));\n\twrite_biff_rec(ba, 0x0080 /* Guts */, write_Guts([0,0]));\n\t/* DefaultRowHeight WsBool [Sync] [LPr] [HorizontalPageBreaks] [VerticalPageBreaks] */\n\t/* Header (string) */\n\t/* Footer (string) */\n\twrite_biff_rec(ba, 0x0083 /* HCenter */, writebool(false));\n\twrite_biff_rec(ba, 0x0084 /* VCenter */, writebool(false));\n\t/* ... */\n\tif(b8) write_ws_cols_biff8(ba, ws[\"!cols\"]);\n\t/* ... */\n\twrite_biff_rec(ba, 0x200, write_Dimensions(range, opts));\n\t/* ... */\n\n\tif(b8) ws['!links'] = [];\n\tfor(var R = range.s.r; R <= range.e.r; ++R) {\n\t\trr = encode_row(R);\n\t\tfor(var C = range.s.c; C <= range.e.c; ++C) {\n\t\t\tif(R === range.s.r) cols[C] = encode_col(C);\n\t\t\tref = cols[C] + rr;\n\t\t\tvar cell = dense ? (ws[R]||[])[C] : ws[ref];\n\t\t\tif(!cell) continue;\n\t\t\t/* write cell */\n\t\t\twrite_ws_biff8_cell(ba, cell, R, C, opts);\n\t\t\tif(b8 && cell.l) ws['!links'].push([ref, cell.l]);\n\t\t}\n\t}\n\tvar cname/*:string*/ = _sheet.CodeName || _sheet.name || s;\n\t/* ... */\n\tif(b8) write_biff_rec(ba, 0x023e /* Window2 */, write_Window2((_WB.Views||[])[0]));\n\t/* ... */\n\tif(b8 && (ws['!merges']||[]).length) write_biff_rec(ba, 0x00e5 /* MergeCells */, write_MergeCells(ws['!merges']));\n\t/* [LRng] *QUERYTABLE [PHONETICINFO] CONDFMTS */\n\tif(b8) write_ws_biff8_hlinks(ba, ws);\n\t/* [DVAL] */\n\twrite_biff_rec(ba, 0x01ba /* CodeName */, write_XLUnicodeString(cname, opts));\n\t/* *WebPub *CellWatch [SheetExt] */\n\tif(b8) write_FEAT(ba, ws);\n\t/* *FEAT11 *RECORD12 */\n\twrite_biff_rec(ba, 0x000a /* EOF */);\n\treturn ba.end();\n}\n\n/* [MS-XLS] 2.1.7.20.3 */\nfunction write_biff8_global(wb/*:Workbook*/, bufs, opts/*:WriteOpts*/) {\n\tvar A = buf_array();\n\tvar _WB/*:WBWBProps*/ = ((wb||{}).Workbook||{}/*:any*/);\n\tvar _sheets/*:Array*/ = (_WB.Sheets||[]);\n\tvar _wb/*:WBProps*/ = /*::((*/_WB.WBProps||{/*::CodeName:\"ThisWorkbook\"*/}/*:: ):any)*/;\n\tvar b8 = opts.biff == 8, b5 = opts.biff == 5;\n\twrite_biff_rec(A, 0x0809, write_BOF(wb, 0x05, opts));\n\tif(opts.bookType == \"xla\") write_biff_rec(A, 0x0087 /* Addin */);\n\twrite_biff_rec(A, 0x00e1 /* InterfaceHdr */, b8 ? writeuint16(0x04b0) : null);\n\twrite_biff_rec(A, 0x00c1 /* Mms */, writezeroes(2));\n\tif(b5) write_biff_rec(A, 0x00bf /* ToolbarHdr */);\n\tif(b5) write_biff_rec(A, 0x00c0 /* ToolbarEnd */);\n\twrite_biff_rec(A, 0x00e2 /* InterfaceEnd */);\n\twrite_biff_rec(A, 0x005c /* WriteAccess */, write_WriteAccess(\"SheetJS\", opts));\n\t/* [FileSharing] */\n\twrite_biff_rec(A, 0x0042 /* CodePage */, writeuint16(b8 ? 0x04b0 : 0x04E4));\n\t/* *2047 Lel */\n\tif(b8) write_biff_rec(A, 0x0161 /* DSF */, writeuint16(0));\n\tif(b8) write_biff_rec(A, 0x01c0 /* Excel9File */);\n\twrite_biff_rec(A, 0x013d /* RRTabId */, write_RRTabId(wb.SheetNames.length));\n\tif(b8 && wb.vbaraw) write_biff_rec(A, 0x00d3 /* ObProj */);\n\t/* [ObNoMacros] */\n\tif(b8 && wb.vbaraw) {\n\t\tvar cname/*:string*/ = _wb.CodeName || \"ThisWorkbook\";\n\t\twrite_biff_rec(A, 0x01ba /* CodeName */, write_XLUnicodeString(cname, opts));\n\t}\n\twrite_biff_rec(A, 0x009c /* BuiltInFnGroupCount */, writeuint16(0x11));\n\t/* *FnGroupName *FnGrp12 */\n\t/* *Lbl */\n\t/* [OleObjectSize] */\n\twrite_biff_rec(A, 0x0019 /* WinProtect */, writebool(false));\n\twrite_biff_rec(A, 0x0012 /* Protect */, writebool(false));\n\twrite_biff_rec(A, 0x0013 /* Password */, writeuint16(0));\n\tif(b8) write_biff_rec(A, 0x01af /* Prot4Rev */, writebool(false));\n\tif(b8) write_biff_rec(A, 0x01bc /* Prot4RevPass */, writeuint16(0));\n\twrite_biff_rec(A, 0x003d /* Window1 */, write_Window1(opts));\n\twrite_biff_rec(A, 0x0040 /* Backup */, writebool(false));\n\twrite_biff_rec(A, 0x008d /* HideObj */, writeuint16(0));\n\twrite_biff_rec(A, 0x0022 /* Date1904 */, writebool(safe1904(wb)==\"true\"));\n\twrite_biff_rec(A, 0x000e /* CalcPrecision */, writebool(true));\n\tif(b8) write_biff_rec(A, 0x01b7 /* RefreshAll */, writebool(false));\n\twrite_biff_rec(A, 0x00DA /* BookBool */, writeuint16(0));\n\t/* ... */\n\twrite_FONTS_biff8(A, wb, opts);\n\twrite_FMTS_biff8(A, wb.SSF, opts);\n\twrite_CELLXFS_biff8(A, opts);\n\t/* ... */\n\tif(b8) write_biff_rec(A, 0x0160 /* UsesELFs */, writebool(false));\n\tvar a = A.end();\n\n\tvar C = buf_array();\n\t/* METADATA [MTRSettings] [ForceFullCalculation] */\n\tif(b8) write_biff_rec(C, 0x008C, write_Country());\n\t/* *SUPBOOK *LBL *RTD [RecalcId] *HFPicture *MSODRAWINGGROUP */\n\n\t/* BIFF8: [SST *Continue] ExtSST */\n\tif(b8 && opts.Strings) write_biff_continue(C, 0x00FC, write_SST(opts.Strings, opts));\n\n\t/* *WebPub [WOpt] [CrErr] [BookExt] *FeatHdr *DConn [THEME] [CompressPictures] [Compat12] [GUIDTypeLib] */\n\twrite_biff_rec(C, 0x000A /* EOF */);\n\tvar c = C.end();\n\n\tvar B = buf_array();\n\tvar blen = 0, j = 0;\n\tfor(j = 0; j < wb.SheetNames.length; ++j) blen += (b8 ? 12 : 11) + (b8 ? 2 : 1) * wb.SheetNames[j].length;\n\tvar start = a.length + blen + c.length;\n\tfor(j = 0; j < wb.SheetNames.length; ++j) {\n\t\tvar _sheet/*:WBWSProp*/ = _sheets[j] || ({}/*:any*/);\n\t\twrite_biff_rec(B, 0x0085 /* BoundSheet8 */, write_BoundSheet8({pos:start, hs:_sheet.Hidden||0, dt:0, name:wb.SheetNames[j]}, opts));\n\t\tstart += bufs[j].length;\n\t}\n\t/* 1*BoundSheet8 */\n\tvar b = B.end();\n\tif(blen != b.length) throw new Error(\"BS8 \" + blen + \" != \" + b.length);\n\n\tvar out = [];\n\tif(a.length) out.push(a);\n\tif(b.length) out.push(b);\n\tif(c.length) out.push(c);\n\treturn bconcat(out);\n}\n\n/* [MS-XLS] 2.1.7.20 Workbook Stream */\nfunction write_biff8_buf(wb/*:Workbook*/, opts/*:WriteOpts*/) {\n\tvar o = opts || {};\n\tvar bufs = [];\n\n\tif(wb && !wb.SSF) {\n\t\twb.SSF = dup(table_fmt);\n\t}\n\tif(wb && wb.SSF) {\n\t\tmake_ssf(); SSF_load_table(wb.SSF);\n\t\t// $FlowIgnore\n\t\to.revssf = evert_num(wb.SSF); o.revssf[wb.SSF[65535]] = 0;\n\t\to.ssf = wb.SSF;\n\t}\n\n\to.Strings = /*::((*/[]/*:: :any):SST)*/; o.Strings.Count = 0; o.Strings.Unique = 0;\n\tfix_write_opts(o);\n\n\to.cellXfs = [];\n\tget_cell_style(o.cellXfs, {}, {revssf:{\"General\":0}});\n\n\tif(!wb.Props) wb.Props = {};\n\n\tfor(var i = 0; i < wb.SheetNames.length; ++i) bufs[bufs.length] = write_ws_biff8(i, o, wb);\n\tbufs.unshift(write_biff8_global(wb, bufs, o));\n\treturn bconcat(bufs);\n}\n\nfunction write_biff_buf(wb/*:Workbook*/, opts/*:WriteOpts*/) {\n\tfor(var i = 0; i <= wb.SheetNames.length; ++i) {\n\t\tvar ws = wb.Sheets[wb.SheetNames[i]];\n\t\tif(!ws || !ws[\"!ref\"]) continue;\n\t\tvar range = decode_range(ws[\"!ref\"]);\n\t\tif(range.e.c > 255) { // note: 255 is IV\n\t\tif(typeof console != \"undefined\" && console.error) console.error(\"Worksheet '\" + wb.SheetNames[i] + \"' extends beyond column IV (255). Data may be lost.\");\n\t\t}\n\t}\n\n\tvar o = opts || {};\n\tswitch(o.biff || 2) {\n\t\tcase 8: case 5: return write_biff8_buf(wb, opts);\n\t\tcase 4: case 3: case 2: return write_biff2_buf(wb, opts);\n\t}\n\tthrow new Error(\"invalid type \" + o.bookType + \" for BIFF\");\n}\n/* note: browser DOM element cannot see mso- style attrs, must parse */\nfunction html_to_sheet(str/*:string*/, _opts)/*:Workbook*/ {\n\tvar opts = _opts || {};\n\tif(DENSE != null && opts.dense == null) opts.dense = DENSE;\n\tvar ws/*:Worksheet*/ = opts.dense ? ([]/*:any*/) : ({}/*:any*/);\n\tstr = str.replace(//g, \"\");\n\tvar mtch/*:any*/ = str.match(/\");\n\tvar mtch2/*:any*/ = str.match(/<\\/table/i);\n\tvar i/*:number*/ = mtch.index, j/*:number*/ = mtch2 && mtch2.index || str.length;\n\tvar rows = split_regex(str.slice(i, j), /(:?]*>)/i, \"\");\n\tvar R = -1, C = 0, RS = 0, CS = 0;\n\tvar range/*:Range*/ = {s:{r:10000000, c:10000000},e:{r:0,c:0}};\n\tvar merges/*:Array*/ = [];\n\tfor(i = 0; i < rows.length; ++i) {\n\t\tvar row = rows[i].trim();\n\t\tvar hd = row.slice(0,3).toLowerCase();\n\t\tif(hd == \"/i);\n\t\tfor(j = 0; j < cells.length; ++j) {\n\t\t\tvar cell = cells[j].trim();\n\t\t\tif(!cell.match(/\")) > -1) m = m.slice(cc+1);\n\t\t\tfor(var midx = 0; midx < merges.length; ++midx) {\n\t\t\t\tvar _merge/*:Range*/ = merges[midx];\n\t\t\t\tif(_merge.s.c == C && _merge.s.r < R && R <= _merge.e.r) { C = _merge.e.c + 1; midx = -1; }\n\t\t\t}\n\t\t\tvar tag = parsexmltag(cell.slice(0, cell.indexOf(\">\")));\n\t\t\tCS = tag.colspan ? +tag.colspan : 1;\n\t\t\tif((RS = +tag.rowspan)>1 || CS>1) merges.push({s:{r:R,c:C},e:{r:R + (RS||1) - 1, c:C + CS - 1}});\n\t\t\tvar _t/*:string*/ = tag.t || tag[\"data-t\"] || \"\";\n\t\t\t/* TODO: generate stub cells */\n\t\t\tif(!m.length) { C += CS; continue; }\n\t\t\tm = htmldecode(m);\n\t\t\tif(range.s.r > R) range.s.r = R; if(range.e.r < R) range.e.r = R;\n\t\t\tif(range.s.c > C) range.s.c = C; if(range.e.c < C) range.e.c = C;\n\t\t\tif(!m.length) { C += CS; continue; }\n\t\t\tvar o/*:Cell*/ = {t:'s', v:m};\n\t\t\tif(opts.raw || !m.trim().length || _t == 's'){}\n\t\t\telse if(m === 'TRUE') o = {t:'b', v:true};\n\t\t\telse if(m === 'FALSE') o = {t:'b', v:false};\n\t\t\telse if(!isNaN(fuzzynum(m))) o = {t:'n', v:fuzzynum(m)};\n\t\t\telse if(!isNaN(fuzzydate(m).getDate())) {\n\t\t\t\to = ({t:'d', v:parseDate(m)}/*:any*/);\n\t\t\t\tif(!opts.cellDates) o = ({t:'n', v:datenum(o.v)}/*:any*/);\n\t\t\t\to.z = opts.dateNF || table_fmt[14];\n\t\t\t}\n\t\t\tif(opts.dense) { if(!ws[R]) ws[R] = []; ws[R][C] = o; }\n\t\t\telse ws[encode_cell({r:R, c:C})] = o;\n\t\t\tC += CS;\n\t\t}\n\t}\n\tws['!ref'] = encode_range(range);\n\tif(merges.length) ws[\"!merges\"] = merges;\n\treturn ws;\n}\nfunction make_html_row(ws/*:Worksheet*/, r/*:Range*/, R/*:number*/, o/*:Sheet2HTMLOpts*/)/*:string*/ {\n\tvar M/*:Array*/ = (ws['!merges'] ||[]);\n\tvar oo/*:Array*/ = [];\n\tfor(var C = r.s.c; C <= r.e.c; ++C) {\n\t\tvar RS = 0, CS = 0;\n\t\tfor(var j = 0; j < M.length; ++j) {\n\t\t\tif(M[j].s.r > R || M[j].s.c > C) continue;\n\t\t\tif(M[j].e.r < R || M[j].e.c < C) continue;\n\t\t\tif(M[j].s.r < R || M[j].s.c < C) { RS = -1; break; }\n\t\t\tRS = M[j].e.r - M[j].s.r + 1; CS = M[j].e.c - M[j].s.c + 1; break;\n\t\t}\n\t\tif(RS < 0) continue;\n\t\tvar coord = encode_cell({r:R,c:C});\n\t\tvar cell = o.dense ? (ws[R]||[])[C] : ws[coord];\n\t\t/* TODO: html entities */\n\t\tvar w = (cell && cell.v != null) && (cell.h || escapehtml(cell.w || (format_cell(cell), cell.w) || \"\")) || \"\";\n\t\tvar sp = ({}/*:any*/);\n\t\tif(RS > 1) sp.rowspan = RS;\n\t\tif(CS > 1) sp.colspan = CS;\n\t\tif(o.editable) w = '' + w + '';\n\t\telse if(cell) {\n\t\t\tsp[\"data-t\"] = cell && cell.t || 'z';\n\t\t\tif(cell.v != null) sp[\"data-v\"] = cell.v;\n\t\t\tif(cell.z != null) sp[\"data-z\"] = cell.z;\n\t\t\tif(cell.l && (cell.l.Target || \"#\").charAt(0) != \"#\") w = '' + w + '';\n\t\t}\n\t\tsp.id = (o.id || \"sjs\") + \"-\" + coord;\n\t\too.push(writextag('td', w, sp));\n\t}\n\tvar preamble = \"\";\n\treturn preamble + oo.join(\"\") + \"\";\n}\n\nvar HTML_BEGIN = 'SheetJS Table Export';\nvar HTML_END = '';\n\nfunction html_to_workbook(str/*:string*/, opts)/*:Workbook*/ {\n\tvar mtch = str.match(/[\\s\\S]*?<\\/table>/gi);\n\tif(!mtch || mtch.length == 0) throw new Error(\"Invalid HTML: could not find
\");\n\tif(mtch.length == 1) return sheet_to_workbook(html_to_sheet(mtch[0], opts), opts);\n\tvar wb = book_new();\n\tmtch.forEach(function(s, idx) { book_append_sheet(wb, html_to_sheet(s, opts), \"Sheet\" + (idx+1)); });\n\treturn wb;\n}\n\nfunction make_html_preamble(ws/*:Worksheet*/, R/*:Range*/, o/*:Sheet2HTMLOpts*/)/*:string*/ {\n\tvar out/*:Array*/ = [];\n\treturn out.join(\"\") + '';\n}\n\nfunction sheet_to_html(ws/*:Worksheet*/, opts/*:?Sheet2HTMLOpts*//*, wb:?Workbook*/)/*:string*/ {\n\tvar o = opts || {};\n\tvar header = o.header != null ? o.header : HTML_BEGIN;\n\tvar footer = o.footer != null ? o.footer : HTML_END;\n\tvar out/*:Array*/ = [header];\n\tvar r = decode_range(ws['!ref']);\n\to.dense = Array.isArray(ws);\n\tout.push(make_html_preamble(ws, r, o));\n\tfor(var R = r.s.r; R <= r.e.r; ++R) out.push(make_html_row(ws, r, R, o));\n\tout.push(\"
\" + footer);\n\treturn out.join(\"\");\n}\n\nfunction sheet_add_dom(ws/*:Worksheet*/, table/*:HTMLElement*/, _opts/*:?any*/)/*:Worksheet*/ {\n\tvar opts = _opts || {};\n\tif(DENSE != null) opts.dense = DENSE;\n\tvar or_R = 0, or_C = 0;\n\tif(opts.origin != null) {\n\t\tif(typeof opts.origin == 'number') or_R = opts.origin;\n\t\telse {\n\t\t\tvar _origin/*:CellAddress*/ = typeof opts.origin == \"string\" ? decode_cell(opts.origin) : opts.origin;\n\t\t\tor_R = _origin.r; or_C = _origin.c;\n\t\t}\n\t}\n\n\tvar rows/*:HTMLCollection*/ = table.getElementsByTagName('tr');\n\tvar sheetRows = Math.min(opts.sheetRows||10000000, rows.length);\n\tvar range/*:Range*/ = {s:{r:0,c:0},e:{r:or_R,c:or_C}};\n\tif(ws[\"!ref\"]) {\n\t\tvar _range/*:Range*/ = decode_range(ws[\"!ref\"]);\n\t\trange.s.r = Math.min(range.s.r, _range.s.r);\n\t\trange.s.c = Math.min(range.s.c, _range.s.c);\n\t\trange.e.r = Math.max(range.e.r, _range.e.r);\n\t\trange.e.c = Math.max(range.e.c, _range.e.c);\n\t\tif(or_R == -1) range.e.r = or_R = _range.e.r + 1;\n\t}\n\tvar merges/*:Array*/ = [], midx = 0;\n\tvar rowinfo/*:Array*/ = ws[\"!rows\"] || (ws[\"!rows\"] = []);\n\tvar _R = 0, R = 0, _C = 0, C = 0, RS = 0, CS = 0;\n\tif(!ws[\"!cols\"]) ws['!cols'] = [];\n\tfor(; _R < rows.length && R < sheetRows; ++_R) {\n\t\tvar row/*:HTMLTableRowElement*/ = rows[_R];\n\t\tif (is_dom_element_hidden(row)) {\n\t\t\tif (opts.display) continue;\n\t\t\trowinfo[R] = {hidden: true};\n\t\t}\n\t\tvar elts/*:HTMLCollection*/ = (row.children/*:any*/);\n\t\tfor(_C = C = 0; _C < elts.length; ++_C) {\n\t\t\tvar elt/*:HTMLTableCellElement*/ = elts[_C];\n\t\t\tif (opts.display && is_dom_element_hidden(elt)) continue;\n\t\t\tvar v/*:?string*/ = elt.hasAttribute('data-v') ? elt.getAttribute('data-v') : elt.hasAttribute('v') ? elt.getAttribute('v') : htmldecode(elt.innerHTML);\n\t\t\tvar z/*:?string*/ = elt.getAttribute('data-z') || elt.getAttribute('z');\n\t\t\tfor(midx = 0; midx < merges.length; ++midx) {\n\t\t\t\tvar m/*:Range*/ = merges[midx];\n\t\t\t\tif(m.s.c == C + or_C && m.s.r < R + or_R && R + or_R <= m.e.r) { C = m.e.c+1 - or_C; midx = -1; }\n\t\t\t}\n\t\t\t/* TODO: figure out how to extract nonstandard mso- style */\n\t\t\tCS = +elt.getAttribute(\"colspan\") || 1;\n\t\t\tif( ((RS = (+elt.getAttribute(\"rowspan\") || 1)))>1 || CS>1) merges.push({s:{r:R + or_R,c:C + or_C},e:{r:R + or_R + (RS||1) - 1, c:C + or_C + (CS||1) - 1}});\n\t\t\tvar o/*:Cell*/ = {t:'s', v:v};\n\t\t\tvar _t/*:string*/ = elt.getAttribute(\"data-t\") || elt.getAttribute(\"t\") || \"\";\n\t\t\tif(v != null) {\n\t\t\t\tif(v.length == 0) o.t = _t || 'z';\n\t\t\t\telse if(opts.raw || v.trim().length == 0 || _t == \"s\"){}\n\t\t\t\telse if(v === 'TRUE') o = {t:'b', v:true};\n\t\t\t\telse if(v === 'FALSE') o = {t:'b', v:false};\n\t\t\t\telse if(!isNaN(fuzzynum(v))) o = {t:'n', v:fuzzynum(v)};\n\t\t\t\telse if(!isNaN(fuzzydate(v).getDate())) {\n\t\t\t\t\to = ({t:'d', v:parseDate(v)}/*:any*/);\n\t\t\t\t\tif(!opts.cellDates) o = ({t:'n', v:datenum(o.v)}/*:any*/);\n\t\t\t\t\to.z = opts.dateNF || table_fmt[14];\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(o.z === undefined && z != null) o.z = z;\n\t\t\t/* The first link is used. Links are assumed to be fully specified.\n\t\t\t * TODO: The right way to process relative links is to make a new */\n\t\t\tvar l = \"\", Aelts = elt.getElementsByTagName(\"A\");\n\t\t\tif(Aelts && Aelts.length) for(var Aelti = 0; Aelti < Aelts.length; ++Aelti)\tif(Aelts[Aelti].hasAttribute(\"href\")) {\n\t\t\t\tl = Aelts[Aelti].getAttribute(\"href\"); if(l.charAt(0) != \"#\") break;\n\t\t\t}\n\t\t\tif(l && l.charAt(0) != \"#\") o.l = ({ Target: l });\n\t\t\tif(opts.dense) { if(!ws[R + or_R]) ws[R + or_R] = []; ws[R + or_R][C + or_C] = o; }\n\t\t\telse ws[encode_cell({c:C + or_C, r:R + or_R})] = o;\n\t\t\tif(range.e.c < C + or_C) range.e.c = C + or_C;\n\t\t\tC += CS;\n\t\t}\n\t\t++R;\n\t}\n\tif(merges.length) ws['!merges'] = (ws[\"!merges\"] || []).concat(merges);\n\trange.e.r = Math.max(range.e.r, R - 1 + or_R);\n\tws['!ref'] = encode_range(range);\n\tif(R >= sheetRows) ws['!fullref'] = encode_range((range.e.r = rows.length-_R+R-1 + or_R,range)); // We can count the real number of rows to parse but we don't to improve the performance\n\treturn ws;\n}\n\nfunction parse_dom_table(table/*:HTMLElement*/, _opts/*:?any*/)/*:Worksheet*/ {\n\tvar opts = _opts || {};\n\tvar ws/*:Worksheet*/ = opts.dense ? ([]/*:any*/) : ({}/*:any*/);\n\treturn sheet_add_dom(ws, table, _opts);\n}\n\nfunction table_to_book(table/*:HTMLElement*/, opts/*:?any*/)/*:Workbook*/ {\n\treturn sheet_to_workbook(parse_dom_table(table, opts), opts);\n}\n\nfunction is_dom_element_hidden(element/*:HTMLElement*/)/*:boolean*/ {\n\tvar display/*:string*/ = '';\n\tvar get_computed_style/*:?function*/ = get_get_computed_style_function(element);\n\tif(get_computed_style) display = get_computed_style(element).getPropertyValue('display');\n\tif(!display) display = element.style && element.style.display;\n\treturn display === 'none';\n}\n\n/* global getComputedStyle */\nfunction get_get_computed_style_function(element/*:HTMLElement*/)/*:?function*/ {\n\t// The proper getComputedStyle implementation is the one defined in the element window\n\tif(element.ownerDocument.defaultView && typeof element.ownerDocument.defaultView.getComputedStyle === 'function') return element.ownerDocument.defaultView.getComputedStyle;\n\t// If it is not available, try to get one from the global namespace\n\tif(typeof getComputedStyle === 'function') return getComputedStyle;\n\treturn null;\n}\n/* OpenDocument */\nfunction parse_text_p(text/*:string*//*::, tag*/)/*:Array*/ {\n\t/* 6.1.2 White Space Characters */\n\tvar fixed = text\n\t\t.replace(/[\\t\\r\\n]/g, \" \").trim().replace(/ +/g, \" \")\n\t\t.replace(//g,\" \")\n\t\t.replace(//g, function($$,$1) { return Array(parseInt($1,10)+1).join(\" \"); })\n\t\t.replace(/]*\\/>/g,\"\\t\")\n\t\t.replace(//g,\"\\n\");\n\tvar v = unescapexml(fixed.replace(/<[^>]*>/g,\"\"));\n\n\treturn [v];\n}\n\nvar number_formats_ods = {\n\t/* ods name: [short ssf fmt, long ssf fmt] */\n\tday: [\"d\", \"dd\"],\n\tmonth: [\"m\", \"mm\"],\n\tyear: [\"y\", \"yy\"],\n\thours: [\"h\", \"hh\"],\n\tminutes: [\"m\", \"mm\"],\n\tseconds: [\"s\", \"ss\"],\n\t\"am-pm\": [\"A/P\", \"AM/PM\"],\n\t\"day-of-week\": [\"ddd\", \"dddd\"],\n\tera: [\"e\", \"ee\"],\n\t/* there is no native representation of LO \"Q\" format */\n\tquarter: [\"\\\\Qm\", \"m\\\\\\\"th quarter\\\"\"]\n};\n\n\nfunction parse_content_xml(d/*:string*/, _opts)/*:Workbook*/ {\n\t\tvar opts = _opts || {};\n\t\tif(DENSE != null && opts.dense == null) opts.dense = DENSE;\n\t\tvar str = xlml_normalize(d);\n\t\tvar state/*:Array*/ = [], tmp;\n\t\tvar tag/*:: = {}*/;\n\t\tvar NFtag = {name:\"\"}, NF = \"\", pidx = 0;\n\t\tvar sheetag/*:: = {name:\"\", '名称':\"\"}*/;\n\t\tvar rowtag/*:: = {'行号':\"\"}*/;\n\t\tvar Sheets = {}, SheetNames/*:Array*/ = [];\n\t\tvar ws = opts.dense ? ([]/*:any*/) : ({}/*:any*/);\n\t\tvar Rn, q/*:: :any = ({t:\"\", v:null, z:null, w:\"\",c:[],}:any)*/;\n\t\tvar ctag = ({value:\"\"}/*:any*/);\n\t\tvar textp = \"\", textpidx = 0, textptag/*:: = {}*/;\n\t\tvar textR = [];\n\t\tvar R = -1, C = -1, range = {s: {r:1000000,c:10000000}, e: {r:0, c:0}};\n\t\tvar row_ol = 0;\n\t\tvar number_format_map = {};\n\t\tvar merges/*:Array*/ = [], mrange = {}, mR = 0, mC = 0;\n\t\tvar rowinfo/*:Array*/ = [], rowpeat = 1, colpeat = 1;\n\t\tvar arrayf/*:Array<[Range, string]>*/ = [];\n\t\tvar WB = {Names:[]};\n\t\tvar atag = ({}/*:any*/);\n\t\tvar _Ref/*:[string, string]*/ = [\"\", \"\"];\n\t\tvar comments/*:Array*/ = [], comment/*:Comment*/ = ({}/*:any*/);\n\t\tvar creator = \"\", creatoridx = 0;\n\t\tvar isstub = false, intable = false;\n\t\tvar i = 0;\n\t\txlmlregex.lastIndex = 0;\n\t\tstr = str.replace(//mg,\"\").replace(//gm,\"\");\n\t\twhile((Rn = xlmlregex.exec(str))) switch((Rn[3]=Rn[3].replace(/_.*$/,\"\"))) {\n\n\t\t\tcase 'table': case '工作表': // 9.1.2 \n\t\t\t\tif(Rn[1]==='/') {\n\t\t\t\t\tif(range.e.c >= range.s.c && range.e.r >= range.s.r) ws['!ref'] = encode_range(range);\n\t\t\t\t\telse ws['!ref'] = \"A1:A1\";\n\t\t\t\t\tif(opts.sheetRows > 0 && opts.sheetRows <= range.e.r) {\n\t\t\t\t\t\tws['!fullref'] = ws['!ref'];\n\t\t\t\t\t\trange.e.r = opts.sheetRows - 1;\n\t\t\t\t\t\tws['!ref'] = encode_range(range);\n\t\t\t\t\t}\n\t\t\t\t\tif(merges.length) ws['!merges'] = merges;\n\t\t\t\t\tif(rowinfo.length) ws[\"!rows\"] = rowinfo;\n\t\t\t\t\tsheetag.name = sheetag['名称'] || sheetag.name;\n\t\t\t\t\tif(typeof JSON !== 'undefined') JSON.stringify(sheetag);\n\t\t\t\t\tSheetNames.push(sheetag.name);\n\t\t\t\t\tSheets[sheetag.name] = ws;\n\t\t\t\t\tintable = false;\n\t\t\t\t}\n\t\t\t\telse if(Rn[0].charAt(Rn[0].length-2) !== '/') {\n\t\t\t\t\tsheetag = parsexmltag(Rn[0], false);\n\t\t\t\t\tR = C = -1;\n\t\t\t\t\trange.s.r = range.s.c = 10000000; range.e.r = range.e.c = 0;\n\t\t\t\t\tws = opts.dense ? ([]/*:any*/) : ({}/*:any*/); merges = [];\n\t\t\t\t\trowinfo = [];\n\t\t\t\t\tintable = true;\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 'table-row-group': // 9.1.9 \n\t\t\t\tif(Rn[1] === \"/\") --row_ol; else ++row_ol;\n\t\t\t\tbreak;\n\t\t\tcase 'table-row': case '行': // 9.1.3 \n\t\t\t\tif(Rn[1] === '/') { R+=rowpeat; rowpeat = 1; break; }\n\t\t\t\trowtag = parsexmltag(Rn[0], false);\n\t\t\t\tif(rowtag['行号']) R = rowtag['行号'] - 1; else if(R == -1) R = 0;\n\t\t\t\trowpeat = +rowtag['number-rows-repeated'] || 1;\n\t\t\t\t/* TODO: remove magic */\n\t\t\t\tif(rowpeat < 10) for(i = 0; i < rowpeat; ++i) if(row_ol > 0) rowinfo[R + i] = {level: row_ol};\n\t\t\t\tC = -1; break;\n\t\t\tcase 'covered-table-cell': // 9.1.5 \n\t\t\t\tif(Rn[1] !== '/') ++C;\n\t\t\t\tif(opts.sheetStubs) {\n\t\t\t\t\tif(opts.dense) { if(!ws[R]) ws[R] = []; ws[R][C] = {t:'z'}; }\n\t\t\t\t\telse ws[encode_cell({r:R,c:C})] = {t:'z'};\n\t\t\t\t}\n\t\t\t\ttextp = \"\"; textR = [];\n\t\t\t\tbreak; /* stub */\n\t\t\tcase 'table-cell': case '数据':\n\t\t\t\tif(Rn[0].charAt(Rn[0].length-2) === '/') {\n\t\t\t\t\t++C;\n\t\t\t\t\tctag = parsexmltag(Rn[0], false);\n\t\t\t\t\tcolpeat = parseInt(ctag['number-columns-repeated']||\"1\", 10);\n\t\t\t\t\tq = ({t:'z', v:null/*:: , z:null, w:\"\",c:[]*/}/*:any*/);\n\t\t\t\t\tif(ctag.formula && opts.cellFormula != false) q.f = ods_to_csf_formula(unescapexml(ctag.formula));\n\t\t\t\t\tif((ctag['数据类型'] || ctag['value-type']) == \"string\") {\n\t\t\t\t\t\tq.t = \"s\"; q.v = unescapexml(ctag['string-value'] || \"\");\n\t\t\t\t\t\tif(opts.dense) {\n\t\t\t\t\t\t\tif(!ws[R]) ws[R] = [];\n\t\t\t\t\t\t\tws[R][C] = q;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tws[encode_cell({r:R,c:C})] = q;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tC+= colpeat-1;\n\t\t\t\t} else if(Rn[1]!=='/') {\n\t\t\t\t\t++C;\n\t\t\t\t\ttextp = \"\"; textpidx = 0; textR = [];\n\t\t\t\t\tcolpeat = 1;\n\t\t\t\t\tvar rptR = rowpeat ? R + rowpeat - 1 : R;\n\t\t\t\t\tif(C > range.e.c) range.e.c = C;\n\t\t\t\t\tif(C < range.s.c) range.s.c = C;\n\t\t\t\t\tif(R < range.s.r) range.s.r = R;\n\t\t\t\t\tif(rptR > range.e.r) range.e.r = rptR;\n\t\t\t\t\tctag = parsexmltag(Rn[0], false);\n\t\t\t\t\tcomments = []; comment = ({}/*:any*/);\n\t\t\t\t\tq = ({t:ctag['数据类型'] || ctag['value-type'], v:null/*:: , z:null, w:\"\",c:[]*/}/*:any*/);\n\t\t\t\t\tif(opts.cellFormula) {\n\t\t\t\t\t\tif(ctag.formula) ctag.formula = unescapexml(ctag.formula);\n\t\t\t\t\t\tif(ctag['number-matrix-columns-spanned'] && ctag['number-matrix-rows-spanned']) {\n\t\t\t\t\t\t\tmR = parseInt(ctag['number-matrix-rows-spanned'],10) || 0;\n\t\t\t\t\t\t\tmC = parseInt(ctag['number-matrix-columns-spanned'],10) || 0;\n\t\t\t\t\t\t\tmrange = {s: {r:R,c:C}, e:{r:R + mR-1,c:C + mC-1}};\n\t\t\t\t\t\t\tq.F = encode_range(mrange);\n\t\t\t\t\t\t\tarrayf.push([mrange, q.F]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(ctag.formula) q.f = ods_to_csf_formula(ctag.formula);\n\t\t\t\t\t\telse for(i = 0; i < arrayf.length; ++i)\n\t\t\t\t\t\t\tif(R >= arrayf[i][0].s.r && R <= arrayf[i][0].e.r)\n\t\t\t\t\t\t\t\tif(C >= arrayf[i][0].s.c && C <= arrayf[i][0].e.c)\n\t\t\t\t\t\t\t\t\tq.F = arrayf[i][1];\n\t\t\t\t\t}\n\t\t\t\t\tif(ctag['number-columns-spanned'] || ctag['number-rows-spanned']) {\n\t\t\t\t\t\tmR = parseInt(ctag['number-rows-spanned'],10) || 0;\n\t\t\t\t\t\tmC = parseInt(ctag['number-columns-spanned'],10) || 0;\n\t\t\t\t\t\tmrange = {s: {r:R,c:C}, e:{r:R + mR-1,c:C + mC-1}};\n\t\t\t\t\t\tmerges.push(mrange);\n\t\t\t\t\t}\n\n\t\t\t\t\t/* 19.675.2 table:number-columns-repeated */\n\t\t\t\t\tif(ctag['number-columns-repeated']) colpeat = parseInt(ctag['number-columns-repeated'], 10);\n\n\t\t\t\t\t/* 19.385 office:value-type */\n\t\t\t\t\tswitch(q.t) {\n\t\t\t\t\t\tcase 'boolean': q.t = 'b'; q.v = parsexmlbool(ctag['boolean-value']); break;\n\t\t\t\t\t\tcase 'float': q.t = 'n'; q.v = parseFloat(ctag.value); break;\n\t\t\t\t\t\tcase 'percentage': q.t = 'n'; q.v = parseFloat(ctag.value); break;\n\t\t\t\t\t\tcase 'currency': q.t = 'n'; q.v = parseFloat(ctag.value); break;\n\t\t\t\t\t\tcase 'date': q.t = 'd'; q.v = parseDate(ctag['date-value']);\n\t\t\t\t\t\t\tif(!opts.cellDates) { q.t = 'n'; q.v = datenum(q.v); }\n\t\t\t\t\t\t\tq.z = 'm/d/yy'; break;\n\t\t\t\t\t\tcase 'time': q.t = 'n'; q.v = parse_isodur(ctag['time-value'])/86400;\n\t\t\t\t\t\t\tif(opts.cellDates) { q.t = 'd'; q.v = numdate(q.v); }\n\t\t\t\t\t\t\tq.z = 'HH:MM:SS'; break;\n\t\t\t\t\t\tcase 'number': q.t = 'n'; q.v = parseFloat(ctag['数据数值']); break;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tif(q.t === 'string' || q.t === 'text' || !q.t) {\n\t\t\t\t\t\t\t\tq.t = 's';\n\t\t\t\t\t\t\t\tif(ctag['string-value'] != null) { textp = unescapexml(ctag['string-value']); textR = []; }\n\t\t\t\t\t\t\t} else throw new Error('Unsupported value type ' + q.t);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tisstub = false;\n\t\t\t\t\tif(q.t === 's') {\n\t\t\t\t\t\tq.v = textp || '';\n\t\t\t\t\t\tif(textR.length) q.R = textR;\n\t\t\t\t\t\tisstub = textpidx == 0;\n\t\t\t\t\t}\n\t\t\t\t\tif(atag.Target) q.l = atag;\n\t\t\t\t\tif(comments.length > 0) { q.c = comments; comments = []; }\n\t\t\t\t\tif(textp && opts.cellText !== false) q.w = textp;\n\t\t\t\t\tif(isstub) { q.t = \"z\"; delete q.v; }\n\t\t\t\t\tif(!isstub || opts.sheetStubs) {\n\t\t\t\t\t\tif(!(opts.sheetRows && opts.sheetRows <= R)) {\n\t\t\t\t\t\t\tfor(var rpt = 0; rpt < rowpeat; ++rpt) {\n\t\t\t\t\t\t\t\tcolpeat = parseInt(ctag['number-columns-repeated']||\"1\", 10);\n\t\t\t\t\t\t\t\tif(opts.dense) {\n\t\t\t\t\t\t\t\t\tif(!ws[R + rpt]) ws[R + rpt] = [];\n\t\t\t\t\t\t\t\t\tws[R + rpt][C] = rpt == 0 ? q : dup(q);\n\t\t\t\t\t\t\t\t\twhile(--colpeat > 0) ws[R + rpt][C + colpeat] = dup(q);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tws[encode_cell({r:R + rpt,c:C})] = q;\n\t\t\t\t\t\t\t\t\twhile(--colpeat > 0) ws[encode_cell({r:R + rpt,c:C + colpeat})] = dup(q);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(range.e.c <= C) range.e.c = C;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcolpeat = parseInt(ctag['number-columns-repeated']||\"1\", 10);\n\t\t\t\t\tC += colpeat-1; colpeat = 0;\n\t\t\t\t\tq = {/*:: t:\"\", v:null, z:null, w:\"\",c:[]*/};\n\t\t\t\t\ttextp = \"\"; textR = [];\n\t\t\t\t}\n\t\t\t\tatag = ({}/*:any*/);\n\t\t\t\tbreak; // 9.1.4 \n\n\t\t\t/* pure state */\n\t\t\tcase 'document': // TODO: is the root for FODS\n\t\t\tcase 'document-content': case '电子表格文档': // 3.1.3.2 \n\t\t\tcase 'spreadsheet': case '主体': // 3.7 \n\t\t\tcase 'scripts': // 3.12 \n\t\t\tcase 'styles': // TODO \n\t\t\tcase 'font-face-decls': // 3.14 \n\t\t\tcase 'master-styles': // 3.15.4 -- relevant for FODS\n\t\t\t\tif(Rn[1]==='/'){if((tmp=state.pop())[0]!==Rn[3]) throw \"Bad state: \"+tmp;}\n\t\t\t\telse if(Rn[0].charAt(Rn[0].length-2) !== '/') state.push([Rn[3], true]);\n\t\t\t\tbreak;\n\n\t\t\tcase 'annotation': // 14.1 \n\t\t\t\tif(Rn[1]==='/'){\n\t\t\t\t\tif((tmp=state.pop())[0]!==Rn[3]) throw \"Bad state: \"+tmp;\n\t\t\t\t\tcomment.t = textp;\n\t\t\t\t\tif(textR.length) /*::(*/comment/*:: :any)*/.R = textR;\n\t\t\t\t\tcomment.a = creator;\n\t\t\t\t\tcomments.push(comment);\n\t\t\t\t}\n\t\t\t\telse if(Rn[0].charAt(Rn[0].length-2) !== '/') {state.push([Rn[3], false]);}\n\t\t\t\tcreator = \"\"; creatoridx = 0;\n\t\t\t\ttextp = \"\"; textpidx = 0; textR = [];\n\t\t\t\tbreak;\n\n\t\t\tcase 'creator': // 4.3.2.7 \n\t\t\t\tif(Rn[1]==='/') { creator = str.slice(creatoridx,Rn.index); }\n\t\t\t\telse creatoridx = Rn.index + Rn[0].length;\n\t\t\t\tbreak;\n\n\t\t\t/* ignore state */\n\t\t\tcase 'meta': case '元数据': // TODO: FODS/UOF\n\t\t\tcase 'settings': // TODO: \n\t\t\tcase 'config-item-set': // TODO: \n\t\t\tcase 'config-item-map-indexed': // TODO: \n\t\t\tcase 'config-item-map-entry': // TODO: \n\t\t\tcase 'config-item-map-named': // TODO: \n\t\t\tcase 'shapes': // 9.2.8 \n\t\t\tcase 'frame': // 10.4.2 \n\t\t\tcase 'text-box': // 10.4.3 \n\t\t\tcase 'image': // 10.4.4 \n\t\t\tcase 'data-pilot-tables': // 9.6.2 \n\t\t\tcase 'list-style': // 16.30 \n\t\t\tcase 'form': // 13.13 \n\t\t\tcase 'dde-links': // 9.8 \n\t\t\tcase 'event-listeners': // TODO\n\t\t\tcase 'chart': // TODO\n\t\t\t\tif(Rn[1]==='/'){if((tmp=state.pop())[0]!==Rn[3]) throw \"Bad state: \"+tmp;}\n\t\t\t\telse if(Rn[0].charAt(Rn[0].length-2) !== '/') state.push([Rn[3], false]);\n\t\t\t\ttextp = \"\"; textpidx = 0; textR = [];\n\t\t\t\tbreak;\n\n\t\t\tcase 'scientific-number': // TODO: \n\t\t\t\tbreak;\n\t\t\tcase 'currency-symbol': // TODO: \n\t\t\t\tbreak;\n\t\t\tcase 'currency-style': // TODO: \n\t\t\t\tbreak;\n\t\t\tcase 'number-style': // 16.27.2 \n\t\t\tcase 'percentage-style': // 16.27.9 \n\t\t\tcase 'date-style': // 16.27.10 \n\t\t\tcase 'time-style': // 16.27.18 \n\t\t\t\tif(Rn[1]==='/'){\n\t\t\t\t\tnumber_format_map[NFtag.name] = NF;\n\t\t\t\t\tif((tmp=state.pop())[0]!==Rn[3]) throw \"Bad state: \"+tmp;\n\t\t\t\t} else if(Rn[0].charAt(Rn[0].length-2) !== '/') {\n\t\t\t\t\tNF = \"\";\n\t\t\t\t\tNFtag = parsexmltag(Rn[0], false);\n\t\t\t\t\tstate.push([Rn[3], true]);\n\t\t\t\t} break;\n\n\t\t\tcase 'script': break; // 3.13 \n\t\t\tcase 'libraries': break; // TODO: \n\t\t\tcase 'automatic-styles': break; // 3.15.3 \n\n\t\t\tcase 'default-style': // TODO: \n\t\t\tcase 'page-layout': break; // TODO: \n\t\t\tcase 'style': // 16.2 \n\t\t\t\tbreak;\n\t\t\tcase 'map': break; // 16.3 \n\t\t\tcase 'font-face': break; // 16.21 \n\n\t\t\tcase 'paragraph-properties': break; // 17.6 \n\t\t\tcase 'table-properties': break; // 17.15 \n\t\t\tcase 'table-column-properties': break; // 17.16 \n\t\t\tcase 'table-row-properties': break; // 17.17 \n\t\t\tcase 'table-cell-properties': break; // 17.18 \n\n\t\t\tcase 'number': // 16.27.3 \n\t\t\t\tswitch(state[state.length-1][0]) {\n\t\t\t\t\tcase 'time-style':\n\t\t\t\t\tcase 'date-style':\n\t\t\t\t\t\ttag = parsexmltag(Rn[0], false);\n\t\t\t\t\t\tNF += number_formats_ods[Rn[3]][tag.style==='long'?1:0]; break;\n\t\t\t\t} break;\n\n\t\t\tcase 'fraction': break; // TODO 16.27.6 \n\n\t\t\tcase 'day': // 16.27.11 \n\t\t\tcase 'month': // 16.27.12 \n\t\t\tcase 'year': // 16.27.13 \n\t\t\tcase 'era': // 16.27.14 \n\t\t\tcase 'day-of-week': // 16.27.15 \n\t\t\tcase 'week-of-year': // 16.27.16 \n\t\t\tcase 'quarter': // 16.27.17 \n\t\t\tcase 'hours': // 16.27.19 \n\t\t\tcase 'minutes': // 16.27.20 \n\t\t\tcase 'seconds': // 16.27.21 \n\t\t\tcase 'am-pm': // 16.27.22 \n\t\t\t\tswitch(state[state.length-1][0]) {\n\t\t\t\t\tcase 'time-style':\n\t\t\t\t\tcase 'date-style':\n\t\t\t\t\t\ttag = parsexmltag(Rn[0], false);\n\t\t\t\t\t\tNF += number_formats_ods[Rn[3]][tag.style==='long'?1:0]; break;\n\t\t\t\t} break;\n\n\t\t\tcase 'boolean-style': break; // 16.27.23 \n\t\t\tcase 'boolean': break; // 16.27.24 \n\t\t\tcase 'text-style': break; // 16.27.25 \n\t\t\tcase 'text': // 16.27.26 \n\t\t\t\tif(Rn[0].slice(-2) === \"/>\") break;\n\t\t\t\telse if(Rn[1]===\"/\") switch(state[state.length-1][0]) {\n\t\t\t\t\tcase 'number-style':\n\t\t\t\t\tcase 'date-style':\n\t\t\t\t\tcase 'time-style':\n\t\t\t\t\t\tNF += str.slice(pidx, Rn.index);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse pidx = Rn.index + Rn[0].length;\n\t\t\t\tbreak;\n\n\t\t\tcase 'named-range': // 9.4.12 \n\t\t\t\ttag = parsexmltag(Rn[0], false);\n\t\t\t\t_Ref = ods_to_csf_3D(tag['cell-range-address']);\n\t\t\t\tvar nrange = ({Name:tag.name, Ref:_Ref[0] + '!' + _Ref[1]}/*:any*/);\n\t\t\t\tif(intable) nrange.Sheet = SheetNames.length;\n\t\t\t\tWB.Names.push(nrange);\n\t\t\t\tbreak;\n\n\t\t\tcase 'text-content': break; // 16.27.27 \n\t\t\tcase 'text-properties': break; // 16.27.27 \n\t\t\tcase 'embedded-text': break; // 16.27.4 \n\n\t\t\tcase 'body': case '电子表格': break; // 3.3 16.9.6 19.726.3\n\n\t\t\tcase 'forms': break; // 12.25.2 13.2\n\t\t\tcase 'table-column': break; // 9.1.6 \n\t\t\tcase 'table-header-rows': break; // 9.1.7 \n\t\t\tcase 'table-rows': break; // 9.1.12 \n\t\t\t/* TODO: outline levels */\n\t\t\tcase 'table-column-group': break; // 9.1.10 \n\t\t\tcase 'table-header-columns': break; // 9.1.11 \n\t\t\tcase 'table-columns': break; // 9.1.12 \n\n\t\t\tcase 'null-date': break; // 9.4.2 TODO: date1904\n\n\t\t\tcase 'graphic-properties': break; // 17.21 \n\t\t\tcase 'calculation-settings': break; // 9.4.1 \n\t\t\tcase 'named-expressions': break; // 9.4.11 \n\t\t\tcase 'label-range': break; // 9.4.9 \n\t\t\tcase 'label-ranges': break; // 9.4.10 \n\t\t\tcase 'named-expression': break; // 9.4.13 \n\t\t\tcase 'sort': break; // 9.4.19 \n\t\t\tcase 'sort-by': break; // 9.4.20 \n\t\t\tcase 'sort-groups': break; // 9.4.22 \n\n\t\t\tcase 'tab': break; // 6.1.4 \n\t\t\tcase 'line-break': break; // 6.1.5 \n\t\t\tcase 'span': break; // 6.1.7 \n\t\t\tcase 'p': case '文本串': // 5.1.3 \n\t\t\t\tif(['master-styles'].indexOf(state[state.length-1][0]) > -1) break;\n\t\t\t\tif(Rn[1]==='/' && (!ctag || !ctag['string-value'])) {\n\t\t\t\t\tvar ptp = parse_text_p(str.slice(textpidx,Rn.index), textptag);\n\t\t\t\t\ttextp = (textp.length > 0 ? textp + \"\\n\" : \"\") + ptp[0];\n\t\t\t\t} else { textptag = parsexmltag(Rn[0], false); textpidx = Rn.index + Rn[0].length; }\n\t\t\t\tbreak; // \n\t\t\tcase 's': break; // \n\n\t\t\tcase 'database-range': // 9.4.15 \n\t\t\t\tif(Rn[1]==='/') break;\n\t\t\t\ttry {\n\t\t\t\t\t_Ref = ods_to_csf_3D(parsexmltag(Rn[0])['target-range-address']);\n\t\t\t\t\tSheets[_Ref[0]]['!autofilter'] = { ref:_Ref[1] };\n\t\t\t\t} catch(e) {/* empty */}\n\t\t\t\tbreak;\n\n\t\t\tcase 'date': break; // <*:date>\n\n\t\t\tcase 'object': break; // 10.4.6.2 \n\t\t\tcase 'title': case '标题': break; // <*:title> OR \n\t\t\tcase 'desc': break; // <*:desc>\n\t\t\tcase 'binary-data': break; // 10.4.5 TODO: b64 blob\n\n\t\t\t/* 9.2 Advanced Tables */\n\t\t\tcase 'table-source': break; // 9.2.6\n\t\t\tcase 'scenario': break; // 9.2.6\n\n\t\t\tcase 'iteration': break; // 9.4.3 \n\t\t\tcase 'content-validations': break; // 9.4.4 \n\t\t\tcase 'filter': break; // 9.5.2 \n\t\t\tcase 'filter-and': break; // 9.5.3 \n\t\t\tcase 'filter-or': break; // 9.5.4 \n\t\t\tcase 'filter-condition': break; // 9.5.5 \n\n\t\t\tcase 'list-level-style-bullet': break; // 16.31 \n\t\t\tcase 'page-count': break; // TODO \n\t\t\tcase 'time': break; // TODO \n\n\t\t\t/* 9.3 Advanced Table Cells */\n\t\t\tcase 'cell-range-source': break; // 9.3.1 \n\t\t\tcase 'property': break; // 13.8 \n\n\t\t\tcase 'a': // 6.1.8 hyperlink\n\t\t\t\tif(Rn[1]!== '/') {\n\t\t\t\t\tatag = parsexmltag(Rn[0], false);\n\t\t\t\t\tif(!atag.href) break;\n\t\t\t\t\tatag.Target = unescapexml(atag.href); delete atag.href;\n\t\t\t\t\tif(atag.Target.charAt(0) == \"#\" && atag.Target.indexOf(\".\") > -1) {\n\t\t\t\t\t\t_Ref = ods_to_csf_3D(atag.Target.slice(1));\n\t\t\t\t\t\tatag.Target = \"#\" + _Ref[0] + \"!\" + _Ref[1];\n\t\t\t\t\t} else if(atag.Target.match(/^\\.\\.[\\\\\\/]/)) atag.Target = atag.Target.slice(3);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\t/* non-standard */\n\t\t\tcase 'table-protection': break;\n\t\t\tcase 'data-pilot-grand-total': break; // ',\n\t\t\t'',\n\t\t\t\t'',\n\t\t\t\t'',\n\t\t\t\t'',\n\t\t\t\t'',\n\t\t\t'',\n\t\t''\n\t].join(\"\");\n\n\tvar payload = '' + master_styles + '';\n\n\treturn function wso(/*::wb, opts*/) {\n\t\treturn XML_HEADER + payload;\n\t};\n})();\nvar write_content_ods/*:{(wb:any, opts:any):string}*/ = /* @__PURE__ */(function() {\n\t/* 6.1.2 White Space Characters */\n\tvar write_text_p = function(text/*:string*/)/*:string*/ {\n\t\treturn escapexml(text)\n\t\t\t.replace(/ +/g, function($$){return '';})\n\t\t\t.replace(/\\t/g, \"\")\n\t\t\t.replace(/\\n/g, \"\")\n\t\t\t.replace(/^ /, \"\").replace(/ $/, \"\");\n\t};\n\n\tvar null_cell_xml = ' \\n';\n\tvar covered_cell_xml = ' \\n';\n\tvar write_ws = function(ws, wb/*:Workbook*/, i/*:number*//*::, opts*/)/*:string*/ {\n\t\t/* Section 9 Tables */\n\t\tvar o/*:Array*/ = [];\n\t\to.push(' \\n');\n\t\tvar R=0,C=0, range = decode_range(ws['!ref']||\"A1\");\n\t\tvar marr/*:Array*/ = ws['!merges'] || [], mi = 0;\n\t\tvar dense = Array.isArray(ws);\n\t\tif(ws[\"!cols\"]) {\n\t\t\tfor(C = 0; C <= range.e.c; ++C) o.push(' \\n');\n\t\t}\n\t\tvar H = \"\", ROWS = ws[\"!rows\"]||[];\n\t\tfor(R = 0; R < range.s.r; ++R) {\n\t\t\tH = ROWS[R] ? ' table:style-name=\"ro' + ROWS[R].ods + '\"' : \"\";\n\t\t\to.push(' \\n');\n\t\t}\n\t\tfor(; R <= range.e.r; ++R) {\n\t\t\tH = ROWS[R] ? ' table:style-name=\"ro' + ROWS[R].ods + '\"' : \"\";\n\t\t\to.push(' \\n');\n\t\t\tfor(C=0; C < range.s.c; ++C) o.push(null_cell_xml);\n\t\t\tfor(; C <= range.e.c; ++C) {\n\t\t\t\tvar skip = false, ct = {}, textp = \"\";\n\t\t\t\tfor(mi = 0; mi != marr.length; ++mi) {\n\t\t\t\t\tif(marr[mi].s.c > C) continue;\n\t\t\t\t\tif(marr[mi].s.r > R) continue;\n\t\t\t\t\tif(marr[mi].e.c < C) continue;\n\t\t\t\t\tif(marr[mi].e.r < R) continue;\n\t\t\t\t\tif(marr[mi].s.c != C || marr[mi].s.r != R) skip = true;\n\t\t\t\t\tct['table:number-columns-spanned'] = (marr[mi].e.c - marr[mi].s.c + 1);\n\t\t\t\t\tct['table:number-rows-spanned'] = (marr[mi].e.r - marr[mi].s.r + 1);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif(skip) { o.push(covered_cell_xml); continue; }\n\t\t\t\tvar ref = encode_cell({r:R, c:C}), cell = dense ? (ws[R]||[])[C]: ws[ref];\n\t\t\t\tif(cell && cell.f) {\n\t\t\t\t\tct['table:formula'] = escapexml(csf_to_ods_formula(cell.f));\n\t\t\t\t\tif(cell.F) {\n\t\t\t\t\t\tif(cell.F.slice(0, ref.length) == ref) {\n\t\t\t\t\t\t\tvar _Fref = decode_range(cell.F);\n\t\t\t\t\t\t\tct['table:number-matrix-columns-spanned'] = (_Fref.e.c - _Fref.s.c + 1);\n\t\t\t\t\t\t\tct['table:number-matrix-rows-spanned'] = (_Fref.e.r - _Fref.s.r + 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(!cell) { o.push(null_cell_xml); continue; }\n\t\t\t\tswitch(cell.t) {\n\t\t\t\t\tcase 'b':\n\t\t\t\t\t\ttextp = (cell.v ? 'TRUE' : 'FALSE');\n\t\t\t\t\t\tct['office:value-type'] = \"boolean\";\n\t\t\t\t\t\tct['office:boolean-value'] = (cell.v ? 'true' : 'false');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'n':\n\t\t\t\t\t\ttextp = (cell.w||String(cell.v||0));\n\t\t\t\t\t\tct['office:value-type'] = \"float\";\n\t\t\t\t\t\tct['office:value'] = (cell.v||0);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 's': case 'str':\n\t\t\t\t\t\ttextp = cell.v == null ? \"\" : cell.v;\n\t\t\t\t\t\tct['office:value-type'] = \"string\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'd':\n\t\t\t\t\t\ttextp = (cell.w||(parseDate(cell.v).toISOString()));\n\t\t\t\t\t\tct['office:value-type'] = \"date\";\n\t\t\t\t\t\tct['office:date-value'] = (parseDate(cell.v).toISOString());\n\t\t\t\t\t\tct['table:style-name'] = \"ce1\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t//case 'e':\n\t\t\t\t\tdefault: o.push(null_cell_xml); continue;\n\t\t\t\t}\n\t\t\t\tvar text_p = write_text_p(textp);\n\t\t\t\tif(cell.l && cell.l.Target) {\n\t\t\t\t\tvar _tgt = cell.l.Target;\n\t\t\t\t\t_tgt = _tgt.charAt(0) == \"#\" ? \"#\" + csf_to_ods_3D(_tgt.slice(1)) : _tgt;\n\t\t\t\t\t// TODO: choose correct parent path format based on link delimiters\n\t\t\t\t\tif(_tgt.charAt(0) != \"#\" && !_tgt.match(/^\\w+:/)) _tgt = '../' + _tgt;\n\t\t\t\t\ttext_p = writextag('text:a', text_p, {'xlink:href': _tgt.replace(/&/g, \"&\")});\n\t\t\t\t}\n\t\t\t\to.push(' ' + writextag('table:table-cell', writextag('text:p', text_p, {}), ct) + '\\n');\n\t\t\t}\n\t\t\to.push(' \\n');\n\t\t}\n\t\to.push(' \\n');\n\t\treturn o.join(\"\");\n\t};\n\n\tvar write_automatic_styles_ods = function(o/*:Array*/, wb) {\n\t\to.push(' \\n');\n\n\t\to.push(' \\n');\n\t\to.push(' \\n');\n\t\to.push(' /\\n');\n\t\to.push(' \\n');\n\t\to.push(' /\\n');\n\t\to.push(' \\n');\n\t\to.push(' \\n');\n\n\t\t/* column styles */\n\t\tvar cidx = 0;\n\t\twb.SheetNames.map(function(n) { return wb.Sheets[n]; }).forEach(function(ws) {\n\t\t\tif(!ws) return;\n\t\t\tif(ws[\"!cols\"]) {\n\t\t\t\tfor(var C = 0; C < ws[\"!cols\"].length; ++C) if(ws[\"!cols\"][C]) {\n\t\t\t\t\tvar colobj = ws[\"!cols\"][C];\n\t\t\t\t\tif(colobj.width == null && colobj.wpx == null && colobj.wch == null) continue;\n\t\t\t\t\tprocess_col(colobj);\n\t\t\t\t\tcolobj.ods = cidx;\n\t\t\t\t\tvar w = ws[\"!cols\"][C].wpx + \"px\";\n\t\t\t\t\to.push(' \\n');\n\t\t\t\t\to.push(' \\n');\n\t\t\t\t\to.push(' \\n');\n\t\t\t\t\t++cidx;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t/* row styles */\n\t\tvar ridx = 0;\n\t\twb.SheetNames.map(function(n) { return wb.Sheets[n]; }).forEach(function(ws) {\n\t\t\tif(!ws) return;\n\t\t\tif(ws[\"!rows\"]) {\n\t\t\t\tfor(var R = 0; R < ws[\"!rows\"].length; ++R) if(ws[\"!rows\"][R]) {\n\t\t\t\t\tws[\"!rows\"][R].ods = ridx;\n\t\t\t\t\tvar h = ws[\"!rows\"][R].hpx + \"px\";\n\t\t\t\t\to.push(' \\n');\n\t\t\t\t\to.push(' \\n');\n\t\t\t\t\to.push(' \\n');\n\t\t\t\t\t++ridx;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t/* table */\n\t\to.push(' \\n');\n\t\to.push(' \\n');\n\t\to.push(' \\n');\n\n\t\t/* table cells, text */\n\t\to.push(' \\n');\n\n\t\t/* page-layout */\n\n\t\to.push(' \\n');\n\t};\n\n\treturn function wcx(wb, opts) {\n\t\tvar o = [XML_HEADER];\n\t\t/* 3.1.3.2 */\n\t\tvar attr = wxt_helper({\n\t\t\t'xmlns:office': \"urn:oasis:names:tc:opendocument:xmlns:office:1.0\",\n\t\t\t'xmlns:table': \"urn:oasis:names:tc:opendocument:xmlns:table:1.0\",\n\t\t\t'xmlns:style': \"urn:oasis:names:tc:opendocument:xmlns:style:1.0\",\n\t\t\t'xmlns:text': \"urn:oasis:names:tc:opendocument:xmlns:text:1.0\",\n\t\t\t'xmlns:draw': \"urn:oasis:names:tc:opendocument:xmlns:drawing:1.0\",\n\t\t\t'xmlns:fo': \"urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0\",\n\t\t\t'xmlns:xlink': \"http://www.w3.org/1999/xlink\",\n\t\t\t'xmlns:dc': \"http://purl.org/dc/elements/1.1/\",\n\t\t\t'xmlns:meta': \"urn:oasis:names:tc:opendocument:xmlns:meta:1.0\",\n\t\t\t'xmlns:number': \"urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0\",\n\t\t\t'xmlns:presentation': \"urn:oasis:names:tc:opendocument:xmlns:presentation:1.0\",\n\t\t\t'xmlns:svg': \"urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0\",\n\t\t\t'xmlns:chart': \"urn:oasis:names:tc:opendocument:xmlns:chart:1.0\",\n\t\t\t'xmlns:dr3d': \"urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0\",\n\t\t\t'xmlns:math': \"http://www.w3.org/1998/Math/MathML\",\n\t\t\t'xmlns:form': \"urn:oasis:names:tc:opendocument:xmlns:form:1.0\",\n\t\t\t'xmlns:script': \"urn:oasis:names:tc:opendocument:xmlns:script:1.0\",\n\t\t\t'xmlns:ooo': \"http://openoffice.org/2004/office\",\n\t\t\t'xmlns:ooow': \"http://openoffice.org/2004/writer\",\n\t\t\t'xmlns:oooc': \"http://openoffice.org/2004/calc\",\n\t\t\t'xmlns:dom': \"http://www.w3.org/2001/xml-events\",\n\t\t\t'xmlns:xforms': \"http://www.w3.org/2002/xforms\",\n\t\t\t'xmlns:xsd': \"http://www.w3.org/2001/XMLSchema\",\n\t\t\t'xmlns:xsi': \"http://www.w3.org/2001/XMLSchema-instance\",\n\t\t\t'xmlns:sheet': \"urn:oasis:names:tc:opendocument:sh33tjs:1.0\",\n\t\t\t'xmlns:rpt': \"http://openoffice.org/2005/report\",\n\t\t\t'xmlns:of': \"urn:oasis:names:tc:opendocument:xmlns:of:1.2\",\n\t\t\t'xmlns:xhtml': \"http://www.w3.org/1999/xhtml\",\n\t\t\t'xmlns:grddl': \"http://www.w3.org/2003/g/data-view#\",\n\t\t\t'xmlns:tableooo': \"http://openoffice.org/2009/table\",\n\t\t\t'xmlns:drawooo': \"http://openoffice.org/2010/draw\",\n\t\t\t'xmlns:calcext': \"urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0\",\n\t\t\t'xmlns:loext': \"urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0\",\n\t\t\t'xmlns:field': \"urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0\",\n\t\t\t'xmlns:formx': \"urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0\",\n\t\t\t'xmlns:css3t': \"http://www.w3.org/TR/css3-text/\",\n\t\t\t'office:version': \"1.2\"\n\t\t});\n\n\t\tvar fods = wxt_helper({\n\t\t\t'xmlns:config': \"urn:oasis:names:tc:opendocument:xmlns:config:1.0\",\n\t\t\t'office:mimetype': \"application/vnd.oasis.opendocument.spreadsheet\"\n\t\t});\n\n\t\tif(opts.bookType == \"fods\") {\n\t\t\to.push('\\n');\n\t\t\to.push(write_meta_ods().replace(/office:document-meta/g, \"office:meta\"));\n\t\t\t// TODO: settings (equiv of settings.xml for ODS)\n\t\t} else o.push('\\n');\n\t\t// o.push(' \\n');\n\t\twrite_automatic_styles_ods(o, wb);\n\t\to.push(' \\n');\n\t\to.push(' \\n');\n\t\tfor(var i = 0; i != wb.SheetNames.length; ++i) o.push(write_ws(wb.Sheets[wb.SheetNames[i]], wb, i, opts));\n\t\to.push(' \\n');\n\t\to.push(' \\n');\n\t\tif(opts.bookType == \"fods\") o.push('');\n\t\telse o.push('');\n\t\treturn o.join(\"\");\n\t};\n})();\n\nfunction write_ods(wb/*:any*/, opts/*:any*/) {\n\tif(opts.bookType == \"fods\") return write_content_ods(wb, opts);\n\n\tvar zip = zip_new();\n\tvar f = \"\";\n\n\tvar manifest/*:Array >*/ = [];\n\tvar rdf/*:Array<[string, string]>*/ = [];\n\n\t/* Part 3 Section 3.3 MIME Media Type */\n\tf = \"mimetype\";\n\tzip_add_file(zip, f, \"application/vnd.oasis.opendocument.spreadsheet\");\n\n\t/* Part 1 Section 2.2 Documents */\n\tf = \"content.xml\";\n\tzip_add_file(zip, f, write_content_ods(wb, opts));\n\tmanifest.push([f, \"text/xml\"]);\n\trdf.push([f, \"ContentFile\"]);\n\n\t/* TODO: these are hard-coded styles to satiate excel */\n\tf = \"styles.xml\";\n\tzip_add_file(zip, f, write_styles_ods(wb, opts));\n\tmanifest.push([f, \"text/xml\"]);\n\trdf.push([f, \"StylesFile\"]);\n\n\t/* TODO: this is hard-coded to satiate excel */\n\tf = \"meta.xml\";\n\tzip_add_file(zip, f, XML_HEADER + write_meta_ods(/*::wb, opts*/));\n\tmanifest.push([f, \"text/xml\"]);\n\trdf.push([f, \"MetadataFile\"]);\n\n\t/* Part 3 Section 6 Metadata Manifest File */\n\tf = \"manifest.rdf\";\n\tzip_add_file(zip, f, write_rdf(rdf/*, opts*/));\n\tmanifest.push([f, \"application/rdf+xml\"]);\n\n\t/* Part 3 Section 4 Manifest File */\n\tf = \"META-INF/manifest.xml\";\n\tzip_add_file(zip, f, write_manifest(manifest/*, opts*/));\n\n\treturn zip;\n}\n\n/*! sheetjs (C) 2013-present SheetJS -- http://sheetjs.com */\nfunction u8_to_dataview(array) {\n return new DataView(array.buffer, array.byteOffset, array.byteLength);\n}\nfunction u8str(u8) {\n return typeof TextDecoder != \"undefined\" ? new TextDecoder().decode(u8) : utf8read(a2s(u8));\n}\nfunction stru8(str) {\n return typeof TextEncoder != \"undefined\" ? new TextEncoder().encode(str) : s2a(utf8write(str));\n}\nfunction u8contains(body, search) {\n outer:\n for (var L = 0; L <= body.length - search.length; ++L) {\n for (var j = 0; j < search.length; ++j)\n if (body[L + j] != search[j])\n continue outer;\n return true;\n }\n return false;\n}\nfunction u8concat(u8a) {\n var len = u8a.reduce(function(acc, x) {\n return acc + x.length;\n }, 0);\n var out = new Uint8Array(len);\n var off = 0;\n u8a.forEach(function(u8) {\n out.set(u8, off);\n off += u8.length;\n });\n return out;\n}\nfunction popcnt(x) {\n x -= x >> 1 & 1431655765;\n x = (x & 858993459) + (x >> 2 & 858993459);\n return (x + (x >> 4) & 252645135) * 16843009 >>> 24;\n}\nfunction readDecimal128LE(buf, offset) {\n var exp = (buf[offset + 15] & 127) << 7 | buf[offset + 14] >> 1;\n var mantissa = buf[offset + 14] & 1;\n for (var j = offset + 13; j >= offset; --j)\n mantissa = mantissa * 256 + buf[j];\n return (buf[offset + 15] & 128 ? -mantissa : mantissa) * Math.pow(10, exp - 6176);\n}\nfunction writeDecimal128LE(buf, offset, value) {\n var exp = Math.floor(value == 0 ? 0 : Math.LOG10E * Math.log(Math.abs(value))) + 6176 - 20;\n var mantissa = value / Math.pow(10, exp - 6176);\n buf[offset + 15] |= exp >> 7;\n buf[offset + 14] |= (exp & 127) << 1;\n for (var i = 0; mantissa >= 1; ++i, mantissa /= 256)\n buf[offset + i] = mantissa & 255;\n buf[offset + 15] |= value >= 0 ? 0 : 128;\n}\nfunction parse_varint49(buf, ptr) {\n var l = ptr ? ptr[0] : 0;\n var usz = buf[l] & 127;\n varint:\n if (buf[l++] >= 128) {\n usz |= (buf[l] & 127) << 7;\n if (buf[l++] < 128)\n break varint;\n usz |= (buf[l] & 127) << 14;\n if (buf[l++] < 128)\n break varint;\n usz |= (buf[l] & 127) << 21;\n if (buf[l++] < 128)\n break varint;\n usz += (buf[l] & 127) * Math.pow(2, 28);\n ++l;\n if (buf[l++] < 128)\n break varint;\n usz += (buf[l] & 127) * Math.pow(2, 35);\n ++l;\n if (buf[l++] < 128)\n break varint;\n usz += (buf[l] & 127) * Math.pow(2, 42);\n ++l;\n if (buf[l++] < 128)\n break varint;\n }\n if (ptr)\n ptr[0] = l;\n return usz;\n}\nfunction write_varint49(v) {\n var usz = new Uint8Array(7);\n usz[0] = v & 127;\n var L = 1;\n sz:\n if (v > 127) {\n usz[L - 1] |= 128;\n usz[L] = v >> 7 & 127;\n ++L;\n if (v <= 16383)\n break sz;\n usz[L - 1] |= 128;\n usz[L] = v >> 14 & 127;\n ++L;\n if (v <= 2097151)\n break sz;\n usz[L - 1] |= 128;\n usz[L] = v >> 21 & 127;\n ++L;\n if (v <= 268435455)\n break sz;\n usz[L - 1] |= 128;\n usz[L] = v / 256 >>> 21 & 127;\n ++L;\n if (v <= 34359738367)\n break sz;\n usz[L - 1] |= 128;\n usz[L] = v / 65536 >>> 21 & 127;\n ++L;\n if (v <= 4398046511103)\n break sz;\n usz[L - 1] |= 128;\n usz[L] = v / 16777216 >>> 21 & 127;\n ++L;\n }\n return usz.slice(0, L);\n}\nfunction varint_to_i32(buf) {\n var l = 0, i32 = buf[l] & 127;\n varint:\n if (buf[l++] >= 128) {\n i32 |= (buf[l] & 127) << 7;\n if (buf[l++] < 128)\n break varint;\n i32 |= (buf[l] & 127) << 14;\n if (buf[l++] < 128)\n break varint;\n i32 |= (buf[l] & 127) << 21;\n if (buf[l++] < 128)\n break varint;\n i32 |= (buf[l] & 127) << 28;\n }\n return i32;\n}\nfunction parse_shallow(buf) {\n var out = [], ptr = [0];\n while (ptr[0] < buf.length) {\n var off = ptr[0];\n var num = parse_varint49(buf, ptr);\n var type = num & 7;\n num = Math.floor(num / 8);\n var len = 0;\n var res;\n if (num == 0)\n break;\n switch (type) {\n case 0:\n {\n var l = ptr[0];\n while (buf[ptr[0]++] >= 128)\n ;\n res = buf.slice(l, ptr[0]);\n }\n break;\n case 5:\n len = 4;\n res = buf.slice(ptr[0], ptr[0] + len);\n ptr[0] += len;\n break;\n case 1:\n len = 8;\n res = buf.slice(ptr[0], ptr[0] + len);\n ptr[0] += len;\n break;\n case 2:\n len = parse_varint49(buf, ptr);\n res = buf.slice(ptr[0], ptr[0] + len);\n ptr[0] += len;\n break;\n case 3:\n case 4:\n default:\n throw new Error(\"PB Type \".concat(type, \" for Field \").concat(num, \" at offset \").concat(off));\n }\n var v = { data: res, type: type };\n if (out[num] == null)\n out[num] = [v];\n else\n out[num].push(v);\n }\n return out;\n}\nfunction write_shallow(proto) {\n var out = [];\n proto.forEach(function(field, idx) {\n field.forEach(function(item) {\n if (!item.data)\n return;\n out.push(write_varint49(idx * 8 + item.type));\n if (item.type == 2)\n out.push(write_varint49(item.data.length));\n out.push(item.data);\n });\n });\n return u8concat(out);\n}\nfunction mappa(data, cb) {\n return (data == null ? void 0 : data.map(function(d) {\n return cb(d.data);\n })) || [];\n}\nfunction parse_iwa_file(buf) {\n var _a;\n var out = [], ptr = [0];\n while (ptr[0] < buf.length) {\n var len = parse_varint49(buf, ptr);\n var ai = parse_shallow(buf.slice(ptr[0], ptr[0] + len));\n ptr[0] += len;\n var res = {\n id: varint_to_i32(ai[1][0].data),\n messages: []\n };\n ai[2].forEach(function(b) {\n var mi = parse_shallow(b.data);\n var fl = varint_to_i32(mi[3][0].data);\n res.messages.push({\n meta: mi,\n data: buf.slice(ptr[0], ptr[0] + fl)\n });\n ptr[0] += fl;\n });\n if ((_a = ai[3]) == null ? void 0 : _a[0])\n res.merge = varint_to_i32(ai[3][0].data) >>> 0 > 0;\n out.push(res);\n }\n return out;\n}\nfunction write_iwa_file(ias) {\n var bufs = [];\n ias.forEach(function(ia) {\n var ai = [];\n ai[1] = [{ data: write_varint49(ia.id), type: 0 }];\n ai[2] = [];\n if (ia.merge != null)\n ai[3] = [{ data: write_varint49(+!!ia.merge), type: 0 }];\n var midata = [];\n ia.messages.forEach(function(mi) {\n midata.push(mi.data);\n mi.meta[3] = [{ type: 0, data: write_varint49(mi.data.length) }];\n ai[2].push({ data: write_shallow(mi.meta), type: 2 });\n });\n var aipayload = write_shallow(ai);\n bufs.push(write_varint49(aipayload.length));\n bufs.push(aipayload);\n midata.forEach(function(mid) {\n return bufs.push(mid);\n });\n });\n return u8concat(bufs);\n}\nfunction parse_snappy_chunk(type, buf) {\n if (type != 0)\n throw new Error(\"Unexpected Snappy chunk type \".concat(type));\n var ptr = [0];\n var usz = parse_varint49(buf, ptr);\n var chunks = [];\n while (ptr[0] < buf.length) {\n var tag = buf[ptr[0]] & 3;\n if (tag == 0) {\n var len = buf[ptr[0]++] >> 2;\n if (len < 60)\n ++len;\n else {\n var c = len - 59;\n len = buf[ptr[0]];\n if (c > 1)\n len |= buf[ptr[0] + 1] << 8;\n if (c > 2)\n len |= buf[ptr[0] + 2] << 16;\n if (c > 3)\n len |= buf[ptr[0] + 3] << 24;\n len >>>= 0;\n len++;\n ptr[0] += c;\n }\n chunks.push(buf.slice(ptr[0], ptr[0] + len));\n ptr[0] += len;\n continue;\n } else {\n var offset = 0, length = 0;\n if (tag == 1) {\n length = (buf[ptr[0]] >> 2 & 7) + 4;\n offset = (buf[ptr[0]++] & 224) << 3;\n offset |= buf[ptr[0]++];\n } else {\n length = (buf[ptr[0]++] >> 2) + 1;\n if (tag == 2) {\n offset = buf[ptr[0]] | buf[ptr[0] + 1] << 8;\n ptr[0] += 2;\n } else {\n offset = (buf[ptr[0]] | buf[ptr[0] + 1] << 8 | buf[ptr[0] + 2] << 16 | buf[ptr[0] + 3] << 24) >>> 0;\n ptr[0] += 4;\n }\n }\n chunks = [u8concat(chunks)];\n if (offset == 0)\n throw new Error(\"Invalid offset 0\");\n if (offset > chunks[0].length)\n throw new Error(\"Invalid offset beyond length\");\n if (length >= offset) {\n chunks.push(chunks[0].slice(-offset));\n length -= offset;\n while (length >= chunks[chunks.length - 1].length) {\n chunks.push(chunks[chunks.length - 1]);\n length -= chunks[chunks.length - 1].length;\n }\n }\n chunks.push(chunks[0].slice(-offset, -offset + length));\n }\n }\n var o = u8concat(chunks);\n if (o.length != usz)\n throw new Error(\"Unexpected length: \".concat(o.length, \" != \").concat(usz));\n return o;\n}\nfunction decompress_iwa_file(buf) {\n var out = [];\n var l = 0;\n while (l < buf.length) {\n var t = buf[l++];\n var len = buf[l] | buf[l + 1] << 8 | buf[l + 2] << 16;\n l += 3;\n out.push(parse_snappy_chunk(t, buf.slice(l, l + len)));\n l += len;\n }\n if (l !== buf.length)\n throw new Error(\"data is not a valid framed stream!\");\n return u8concat(out);\n}\nfunction compress_iwa_file(buf) {\n var out = [];\n var l = 0;\n while (l < buf.length) {\n var c = Math.min(buf.length - l, 268435455);\n var frame = new Uint8Array(4);\n out.push(frame);\n var usz = write_varint49(c);\n var L = usz.length;\n out.push(usz);\n if (c <= 60) {\n L++;\n out.push(new Uint8Array([c - 1 << 2]));\n } else if (c <= 256) {\n L += 2;\n out.push(new Uint8Array([240, c - 1 & 255]));\n } else if (c <= 65536) {\n L += 3;\n out.push(new Uint8Array([244, c - 1 & 255, c - 1 >> 8 & 255]));\n } else if (c <= 16777216) {\n L += 4;\n out.push(new Uint8Array([248, c - 1 & 255, c - 1 >> 8 & 255, c - 1 >> 16 & 255]));\n } else if (c <= 4294967296) {\n L += 5;\n out.push(new Uint8Array([252, c - 1 & 255, c - 1 >> 8 & 255, c - 1 >> 16 & 255, c - 1 >>> 24 & 255]));\n }\n out.push(buf.slice(l, l + c));\n L += c;\n frame[0] = 0;\n frame[1] = L & 255;\n frame[2] = L >> 8 & 255;\n frame[3] = L >> 16 & 255;\n l += c;\n }\n return u8concat(out);\n}\nfunction parse_old_storage(buf, sst, rsst, v) {\n var dv = u8_to_dataview(buf);\n var flags = dv.getUint32(4, true);\n var data_offset = (v > 1 ? 12 : 8) + popcnt(flags & (v > 1 ? 3470 : 398)) * 4;\n var ridx = -1, sidx = -1, ieee = NaN, dt = new Date(2001, 0, 1);\n if (flags & 512) {\n ridx = dv.getUint32(data_offset, true);\n data_offset += 4;\n }\n data_offset += popcnt(flags & (v > 1 ? 12288 : 4096)) * 4;\n if (flags & 16) {\n sidx = dv.getUint32(data_offset, true);\n data_offset += 4;\n }\n if (flags & 32) {\n ieee = dv.getFloat64(data_offset, true);\n data_offset += 8;\n }\n if (flags & 64) {\n dt.setTime(dt.getTime() + dv.getFloat64(data_offset, true) * 1e3);\n data_offset += 8;\n }\n var ret;\n switch (buf[2]) {\n case 0:\n break;\n case 2:\n ret = { t: \"n\", v: ieee };\n break;\n case 3:\n ret = { t: \"s\", v: sst[sidx] };\n break;\n case 5:\n ret = { t: \"d\", v: dt };\n break;\n case 6:\n ret = { t: \"b\", v: ieee > 0 };\n break;\n case 7:\n ret = { t: \"n\", v: ieee / 86400 };\n break;\n case 8:\n ret = { t: \"e\", v: 0 };\n break;\n case 9:\n {\n if (ridx > -1)\n ret = { t: \"s\", v: rsst[ridx] };\n else if (sidx > -1)\n ret = { t: \"s\", v: sst[sidx] };\n else if (!isNaN(ieee))\n ret = { t: \"n\", v: ieee };\n else\n throw new Error(\"Unsupported cell type \".concat(buf.slice(0, 4)));\n }\n break;\n default:\n throw new Error(\"Unsupported cell type \".concat(buf.slice(0, 4)));\n }\n return ret;\n}\nfunction parse_new_storage(buf, sst, rsst) {\n var dv = u8_to_dataview(buf);\n var flags = dv.getUint32(8, true);\n var data_offset = 12;\n var ridx = -1, sidx = -1, d128 = NaN, ieee = NaN, dt = new Date(2001, 0, 1);\n if (flags & 1) {\n d128 = readDecimal128LE(buf, data_offset);\n data_offset += 16;\n }\n if (flags & 2) {\n ieee = dv.getFloat64(data_offset, true);\n data_offset += 8;\n }\n if (flags & 4) {\n dt.setTime(dt.getTime() + dv.getFloat64(data_offset, true) * 1e3);\n data_offset += 8;\n }\n if (flags & 8) {\n sidx = dv.getUint32(data_offset, true);\n data_offset += 4;\n }\n if (flags & 16) {\n ridx = dv.getUint32(data_offset, true);\n data_offset += 4;\n }\n var ret;\n switch (buf[1]) {\n case 0:\n break;\n case 2:\n ret = { t: \"n\", v: d128 };\n break;\n case 3:\n ret = { t: \"s\", v: sst[sidx] };\n break;\n case 5:\n ret = { t: \"d\", v: dt };\n break;\n case 6:\n ret = { t: \"b\", v: ieee > 0 };\n break;\n case 7:\n ret = { t: \"n\", v: ieee / 86400 };\n break;\n case 8:\n ret = { t: \"e\", v: 0 };\n break;\n case 9:\n {\n if (ridx > -1)\n ret = { t: \"s\", v: rsst[ridx] };\n else\n throw new Error(\"Unsupported cell type \".concat(buf[1], \" : \").concat(flags & 31, \" : \").concat(buf.slice(0, 4)));\n }\n break;\n case 10:\n ret = { t: \"n\", v: d128 };\n break;\n default:\n throw new Error(\"Unsupported cell type \".concat(buf[1], \" : \").concat(flags & 31, \" : \").concat(buf.slice(0, 4)));\n }\n return ret;\n}\nfunction write_new_storage(cell, sst) {\n var out = new Uint8Array(32), dv = u8_to_dataview(out), l = 12, flags = 0;\n out[0] = 5;\n switch (cell.t) {\n case \"n\":\n out[1] = 2;\n writeDecimal128LE(out, l, cell.v);\n flags |= 1;\n l += 16;\n break;\n case \"b\":\n out[1] = 6;\n dv.setFloat64(l, cell.v ? 1 : 0, true);\n flags |= 2;\n l += 8;\n break;\n case \"s\":\n if (sst.indexOf(cell.v) == -1)\n throw new Error(\"Value \".concat(cell.v, \" missing from SST!\"));\n out[1] = 3;\n dv.setUint32(l, sst.indexOf(cell.v), true);\n flags |= 8;\n l += 4;\n break;\n default:\n throw \"unsupported cell type \" + cell.t;\n }\n dv.setUint32(8, flags, true);\n return out.slice(0, l);\n}\nfunction write_old_storage(cell, sst) {\n var out = new Uint8Array(32), dv = u8_to_dataview(out), l = 12, flags = 0;\n out[0] = 3;\n switch (cell.t) {\n case \"n\":\n out[2] = 2;\n dv.setFloat64(l, cell.v, true);\n flags |= 32;\n l += 8;\n break;\n case \"b\":\n out[2] = 6;\n dv.setFloat64(l, cell.v ? 1 : 0, true);\n flags |= 32;\n l += 8;\n break;\n case \"s\":\n if (sst.indexOf(cell.v) == -1)\n throw new Error(\"Value \".concat(cell.v, \" missing from SST!\"));\n out[2] = 3;\n dv.setUint32(l, sst.indexOf(cell.v), true);\n flags |= 16;\n l += 4;\n break;\n default:\n throw \"unsupported cell type \" + cell.t;\n }\n dv.setUint32(4, flags, true);\n return out.slice(0, l);\n}\nfunction parse_cell_storage(buf, sst, rsst) {\n switch (buf[0]) {\n case 0:\n case 1:\n case 2:\n case 3:\n return parse_old_storage(buf, sst, rsst, buf[0]);\n case 5:\n return parse_new_storage(buf, sst, rsst);\n default:\n throw new Error(\"Unsupported payload version \".concat(buf[0]));\n }\n}\nfunction parse_TSP_Reference(buf) {\n var pb = parse_shallow(buf);\n return parse_varint49(pb[1][0].data);\n}\nfunction write_TSP_Reference(idx) {\n var out = [];\n out[1] = [{ type: 0, data: write_varint49(idx) }];\n return write_shallow(out);\n}\nfunction parse_TST_TableDataList(M, root) {\n var pb = parse_shallow(root.data);\n var type = varint_to_i32(pb[1][0].data);\n var entries = pb[3];\n var data = [];\n (entries || []).forEach(function(entry) {\n var le = parse_shallow(entry.data);\n var key = varint_to_i32(le[1][0].data) >>> 0;\n switch (type) {\n case 1:\n data[key] = u8str(le[3][0].data);\n break;\n case 8:\n {\n var rt = M[parse_TSP_Reference(le[9][0].data)][0];\n var rtp = parse_shallow(rt.data);\n var rtpref = M[parse_TSP_Reference(rtp[1][0].data)][0];\n var mtype = varint_to_i32(rtpref.meta[1][0].data);\n if (mtype != 2001)\n throw new Error(\"2000 unexpected reference to \".concat(mtype));\n var tswpsa = parse_shallow(rtpref.data);\n data[key] = tswpsa[3].map(function(x) {\n return u8str(x.data);\n }).join(\"\");\n }\n break;\n }\n });\n return data;\n}\nfunction parse_TST_TileRowInfo(u8, type) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;\n var pb = parse_shallow(u8);\n var R = varint_to_i32(pb[1][0].data) >>> 0;\n var cnt = varint_to_i32(pb[2][0].data) >>> 0;\n var wide_offsets = ((_b = (_a = pb[8]) == null ? void 0 : _a[0]) == null ? void 0 : _b.data) && varint_to_i32(pb[8][0].data) > 0 || false;\n var used_storage_u8, used_storage;\n if (((_d = (_c = pb[7]) == null ? void 0 : _c[0]) == null ? void 0 : _d.data) && type != 0) {\n used_storage_u8 = (_f = (_e = pb[7]) == null ? void 0 : _e[0]) == null ? void 0 : _f.data;\n used_storage = (_h = (_g = pb[6]) == null ? void 0 : _g[0]) == null ? void 0 : _h.data;\n } else if (((_j = (_i = pb[4]) == null ? void 0 : _i[0]) == null ? void 0 : _j.data) && type != 1) {\n used_storage_u8 = (_l = (_k = pb[4]) == null ? void 0 : _k[0]) == null ? void 0 : _l.data;\n used_storage = (_n = (_m = pb[3]) == null ? void 0 : _m[0]) == null ? void 0 : _n.data;\n } else\n throw \"NUMBERS Tile missing \".concat(type, \" cell storage\");\n var width = wide_offsets ? 4 : 1;\n var used_storage_offsets = u8_to_dataview(used_storage_u8);\n var offsets = [];\n for (var C = 0; C < used_storage_u8.length / 2; ++C) {\n var off = used_storage_offsets.getUint16(C * 2, true);\n if (off < 65535)\n offsets.push([C, off]);\n }\n if (offsets.length != cnt)\n throw \"Expected \".concat(cnt, \" cells, found \").concat(offsets.length);\n var cells = [];\n for (C = 0; C < offsets.length - 1; ++C)\n cells[offsets[C][0]] = used_storage.subarray(offsets[C][1] * width, offsets[C + 1][1] * width);\n if (offsets.length >= 1)\n cells[offsets[offsets.length - 1][0]] = used_storage.subarray(offsets[offsets.length - 1][1] * width);\n return { R: R, cells: cells };\n}\nfunction parse_TST_Tile(M, root) {\n var _a;\n var pb = parse_shallow(root.data);\n var storage = ((_a = pb == null ? void 0 : pb[7]) == null ? void 0 : _a[0]) ? varint_to_i32(pb[7][0].data) >>> 0 > 0 ? 1 : 0 : -1;\n var ri = mappa(pb[5], function(u8) {\n return parse_TST_TileRowInfo(u8, storage);\n });\n return {\n nrows: varint_to_i32(pb[4][0].data) >>> 0,\n data: ri.reduce(function(acc, x) {\n if (!acc[x.R])\n acc[x.R] = [];\n x.cells.forEach(function(cell, C) {\n if (acc[x.R][C])\n throw new Error(\"Duplicate cell r=\".concat(x.R, \" c=\").concat(C));\n acc[x.R][C] = cell;\n });\n return acc;\n }, [])\n };\n}\nfunction parse_TST_TableModelArchive(M, root, ws) {\n var _a;\n var pb = parse_shallow(root.data);\n var range = { s: { r: 0, c: 0 }, e: { r: 0, c: 0 } };\n range.e.r = (varint_to_i32(pb[6][0].data) >>> 0) - 1;\n if (range.e.r < 0)\n throw new Error(\"Invalid row varint \".concat(pb[6][0].data));\n range.e.c = (varint_to_i32(pb[7][0].data) >>> 0) - 1;\n if (range.e.c < 0)\n throw new Error(\"Invalid col varint \".concat(pb[7][0].data));\n ws[\"!ref\"] = encode_range(range);\n var store = parse_shallow(pb[4][0].data);\n var sst = parse_TST_TableDataList(M, M[parse_TSP_Reference(store[4][0].data)][0]);\n var rsst = ((_a = store[17]) == null ? void 0 : _a[0]) ? parse_TST_TableDataList(M, M[parse_TSP_Reference(store[17][0].data)][0]) : [];\n var tile = parse_shallow(store[3][0].data);\n var _R = 0;\n tile[1].forEach(function(t) {\n var tl = parse_shallow(t.data);\n var ref = M[parse_TSP_Reference(tl[2][0].data)][0];\n var mtype = varint_to_i32(ref.meta[1][0].data);\n if (mtype != 6002)\n throw new Error(\"6001 unexpected reference to \".concat(mtype));\n var _tile = parse_TST_Tile(M, ref);\n _tile.data.forEach(function(row, R) {\n row.forEach(function(buf, C) {\n var addr = encode_cell({ r: _R + R, c: C });\n var res = parse_cell_storage(buf, sst, rsst);\n if (res)\n ws[addr] = res;\n });\n });\n _R += _tile.nrows;\n });\n}\nfunction parse_TST_TableInfoArchive(M, root) {\n var pb = parse_shallow(root.data);\n var out = { \"!ref\": \"A1\" };\n var tableref = M[parse_TSP_Reference(pb[2][0].data)];\n var mtype = varint_to_i32(tableref[0].meta[1][0].data);\n if (mtype != 6001)\n throw new Error(\"6000 unexpected reference to \".concat(mtype));\n parse_TST_TableModelArchive(M, tableref[0], out);\n return out;\n}\nfunction parse_TN_SheetArchive(M, root) {\n var _a;\n var pb = parse_shallow(root.data);\n var out = {\n name: ((_a = pb[1]) == null ? void 0 : _a[0]) ? u8str(pb[1][0].data) : \"\",\n sheets: []\n };\n var shapeoffs = mappa(pb[2], parse_TSP_Reference);\n shapeoffs.forEach(function(off) {\n M[off].forEach(function(m) {\n var mtype = varint_to_i32(m.meta[1][0].data);\n if (mtype == 6e3)\n out.sheets.push(parse_TST_TableInfoArchive(M, m));\n });\n });\n return out;\n}\nfunction parse_TN_DocumentArchive(M, root) {\n var out = book_new();\n var pb = parse_shallow(root.data);\n var sheetoffs = mappa(pb[1], parse_TSP_Reference);\n sheetoffs.forEach(function(off) {\n M[off].forEach(function(m) {\n var mtype = varint_to_i32(m.meta[1][0].data);\n if (mtype == 2) {\n var root2 = parse_TN_SheetArchive(M, m);\n root2.sheets.forEach(function(sheet, idx) {\n book_append_sheet(out, sheet, idx == 0 ? root2.name : root2.name + \"_\" + idx, true);\n });\n }\n });\n });\n if (out.SheetNames.length == 0)\n throw new Error(\"Empty NUMBERS file\");\n return out;\n}\nfunction parse_numbers_iwa(cfb) {\n var _a, _b, _c, _d;\n var M = {}, indices = [];\n cfb.FullPaths.forEach(function(p) {\n if (p.match(/\\.iwpv2/))\n throw new Error(\"Unsupported password protection\");\n });\n cfb.FileIndex.forEach(function(s) {\n if (!s.name.match(/\\.iwa$/))\n return;\n var o;\n try {\n o = decompress_iwa_file(s.content);\n } catch (e) {\n return console.log(\"?? \" + s.content.length + \" \" + (e.message || e));\n }\n var packets;\n try {\n packets = parse_iwa_file(o);\n } catch (e) {\n return console.log(\"## \" + (e.message || e));\n }\n packets.forEach(function(packet) {\n M[packet.id] = packet.messages;\n indices.push(packet.id);\n });\n });\n if (!indices.length)\n throw new Error(\"File has no messages\");\n var docroot = ((_d = (_c = (_b = (_a = M == null ? void 0 : M[1]) == null ? void 0 : _a[0]) == null ? void 0 : _b.meta) == null ? void 0 : _c[1]) == null ? void 0 : _d[0].data) && varint_to_i32(M[1][0].meta[1][0].data) == 1 && M[1][0];\n if (!docroot)\n indices.forEach(function(idx) {\n M[idx].forEach(function(iwam) {\n var mtype = varint_to_i32(iwam.meta[1][0].data) >>> 0;\n if (mtype == 1) {\n if (!docroot)\n docroot = iwam;\n else\n throw new Error(\"Document has multiple roots\");\n }\n });\n });\n if (!docroot)\n throw new Error(\"Cannot find Document root\");\n return parse_TN_DocumentArchive(M, docroot);\n}\nfunction write_tile_row(tri, data, SST) {\n var _a, _b, _c, _d;\n if (!((_a = tri[6]) == null ? void 0 : _a[0]) || !((_b = tri[7]) == null ? void 0 : _b[0]))\n throw \"Mutation only works on post-BNC storages!\";\n var wide_offsets = ((_d = (_c = tri[8]) == null ? void 0 : _c[0]) == null ? void 0 : _d.data) && varint_to_i32(tri[8][0].data) > 0 || false;\n if (wide_offsets)\n throw \"Math only works with normal offsets\";\n var cnt = 0;\n var dv = u8_to_dataview(tri[7][0].data), last_offset = 0, cell_storage = [];\n var _dv = u8_to_dataview(tri[4][0].data), _last_offset = 0, _cell_storage = [];\n for (var C = 0; C < data.length; ++C) {\n if (data[C] == null) {\n dv.setUint16(C * 2, 65535, true);\n _dv.setUint16(C * 2, 65535);\n continue;\n }\n dv.setUint16(C * 2, last_offset, true);\n _dv.setUint16(C * 2, _last_offset, true);\n var celload, _celload;\n switch (typeof data[C]) {\n case \"string\":\n celload = write_new_storage({ t: \"s\", v: data[C] }, SST);\n _celload = write_old_storage({ t: \"s\", v: data[C] }, SST);\n break;\n case \"number\":\n celload = write_new_storage({ t: \"n\", v: data[C] }, SST);\n _celload = write_old_storage({ t: \"n\", v: data[C] }, SST);\n break;\n case \"boolean\":\n celload = write_new_storage({ t: \"b\", v: data[C] }, SST);\n _celload = write_old_storage({ t: \"b\", v: data[C] }, SST);\n break;\n default:\n throw new Error(\"Unsupported value \" + data[C]);\n }\n cell_storage.push(celload);\n last_offset += celload.length;\n _cell_storage.push(_celload);\n _last_offset += _celload.length;\n ++cnt;\n }\n tri[2][0].data = write_varint49(cnt);\n for (; C < tri[7][0].data.length / 2; ++C) {\n dv.setUint16(C * 2, 65535, true);\n _dv.setUint16(C * 2, 65535, true);\n }\n tri[6][0].data = u8concat(cell_storage);\n tri[3][0].data = u8concat(_cell_storage);\n return cnt;\n}\nfunction write_numbers_iwa(wb, opts) {\n if (!opts || !opts.numbers)\n throw new Error(\"Must pass a `numbers` option -- check the README\");\n var ws = wb.Sheets[wb.SheetNames[0]];\n if (wb.SheetNames.length > 1)\n console.error(\"The Numbers writer currently writes only the first table\");\n var range = decode_range(ws[\"!ref\"]);\n range.s.r = range.s.c = 0;\n var trunc = false;\n if (range.e.c > 9) {\n trunc = true;\n range.e.c = 9;\n }\n if (range.e.r > 49) {\n trunc = true;\n range.e.r = 49;\n }\n if (trunc)\n console.error(\"The Numbers writer is currently limited to \".concat(encode_range(range)));\n var data = sheet_to_json(ws, { range: range, header: 1 });\n var SST = [\"~Sh33tJ5~\"];\n data.forEach(function(row) {\n return row.forEach(function(cell) {\n if (typeof cell == \"string\")\n SST.push(cell);\n });\n });\n var dependents = {};\n var indices = [];\n var cfb = CFB.read(opts.numbers, { type: \"base64\" });\n cfb.FileIndex.map(function(fi, idx) {\n return [fi, cfb.FullPaths[idx]];\n }).forEach(function(row) {\n var fi = row[0], fp = row[1];\n if (fi.type != 2)\n return;\n if (!fi.name.match(/\\.iwa/))\n return;\n var old_content = fi.content;\n var raw1 = decompress_iwa_file(old_content);\n var x2 = parse_iwa_file(raw1);\n x2.forEach(function(packet2) {\n indices.push(packet2.id);\n dependents[packet2.id] = { deps: [], location: fp, type: varint_to_i32(packet2.messages[0].meta[1][0].data) };\n });\n });\n indices.sort(function(x2, y2) {\n return x2 - y2;\n });\n var indices_varint = indices.filter(function(x2) {\n return x2 > 1;\n }).map(function(x2) {\n return [x2, write_varint49(x2)];\n });\n cfb.FileIndex.map(function(fi, idx) {\n return [fi, cfb.FullPaths[idx]];\n }).forEach(function(row) {\n var fi = row[0], fp = row[1];\n if (!fi.name.match(/\\.iwa/))\n return;\n var x2 = parse_iwa_file(decompress_iwa_file(fi.content));\n x2.forEach(function(ia) {\n ia.messages.forEach(function(m) {\n indices_varint.forEach(function(ivi) {\n if (ia.messages.some(function(mess) {\n return varint_to_i32(mess.meta[1][0].data) != 11006 && u8contains(mess.data, ivi[1]);\n })) {\n dependents[ivi[0]].deps.push(ia.id);\n }\n });\n });\n });\n });\n function get_unique_msgid() {\n for (var i = 927262; i < 2e6; ++i)\n if (!dependents[i])\n return i;\n throw new Error(\"Too many messages\");\n }\n var entry = CFB.find(cfb, dependents[1].location);\n var x = parse_iwa_file(decompress_iwa_file(entry.content));\n var docroot;\n for (var xi = 0; xi < x.length; ++xi) {\n var packet = x[xi];\n if (packet.id == 1)\n docroot = packet;\n }\n var sheetrootref = parse_TSP_Reference(parse_shallow(docroot.messages[0].data)[1][0].data);\n entry = CFB.find(cfb, dependents[sheetrootref].location);\n x = parse_iwa_file(decompress_iwa_file(entry.content));\n for (xi = 0; xi < x.length; ++xi) {\n packet = x[xi];\n if (packet.id == sheetrootref)\n docroot = packet;\n }\n sheetrootref = parse_TSP_Reference(parse_shallow(docroot.messages[0].data)[2][0].data);\n entry = CFB.find(cfb, dependents[sheetrootref].location);\n x = parse_iwa_file(decompress_iwa_file(entry.content));\n for (xi = 0; xi < x.length; ++xi) {\n packet = x[xi];\n if (packet.id == sheetrootref)\n docroot = packet;\n }\n sheetrootref = parse_TSP_Reference(parse_shallow(docroot.messages[0].data)[2][0].data);\n entry = CFB.find(cfb, dependents[sheetrootref].location);\n x = parse_iwa_file(decompress_iwa_file(entry.content));\n for (xi = 0; xi < x.length; ++xi) {\n packet = x[xi];\n if (packet.id == sheetrootref)\n docroot = packet;\n }\n var pb = parse_shallow(docroot.messages[0].data);\n {\n pb[6][0].data = write_varint49(range.e.r + 1);\n pb[7][0].data = write_varint49(range.e.c + 1);\n var cruidsref = parse_TSP_Reference(pb[46][0].data);\n var oldbucket = CFB.find(cfb, dependents[cruidsref].location);\n var _x = parse_iwa_file(decompress_iwa_file(oldbucket.content));\n {\n for (var j = 0; j < _x.length; ++j) {\n if (_x[j].id == cruidsref)\n break;\n }\n if (_x[j].id != cruidsref)\n throw \"Bad ColumnRowUIDMapArchive\";\n var cruids = parse_shallow(_x[j].messages[0].data);\n cruids[1] = [];\n cruids[2] = [], cruids[3] = [];\n for (var C = 0; C <= range.e.c; ++C) {\n var uuid = [];\n uuid[1] = uuid[2] = [{ type: 0, data: write_varint49(C + 420690) }];\n cruids[1].push({ type: 2, data: write_shallow(uuid) });\n cruids[2].push({ type: 0, data: write_varint49(C) });\n cruids[3].push({ type: 0, data: write_varint49(C) });\n }\n cruids[4] = [];\n cruids[5] = [], cruids[6] = [];\n for (var R = 0; R <= range.e.r; ++R) {\n uuid = [];\n uuid[1] = uuid[2] = [{ type: 0, data: write_varint49(R + 726270) }];\n cruids[4].push({ type: 2, data: write_shallow(uuid) });\n cruids[5].push({ type: 0, data: write_varint49(R) });\n cruids[6].push({ type: 0, data: write_varint49(R) });\n }\n _x[j].messages[0].data = write_shallow(cruids);\n }\n oldbucket.content = compress_iwa_file(write_iwa_file(_x));\n oldbucket.size = oldbucket.content.length;\n delete pb[46];\n var store = parse_shallow(pb[4][0].data);\n {\n store[7][0].data = write_varint49(range.e.r + 1);\n var row_headers = parse_shallow(store[1][0].data);\n var row_header_ref = parse_TSP_Reference(row_headers[2][0].data);\n oldbucket = CFB.find(cfb, dependents[row_header_ref].location);\n _x = parse_iwa_file(decompress_iwa_file(oldbucket.content));\n {\n if (_x[0].id != row_header_ref)\n throw \"Bad HeaderStorageBucket\";\n var base_bucket = parse_shallow(_x[0].messages[0].data);\n for (R = 0; R < data.length; ++R) {\n var _bucket = parse_shallow(base_bucket[2][0].data);\n _bucket[1][0].data = write_varint49(R);\n _bucket[4][0].data = write_varint49(data[R].length);\n base_bucket[2][R] = { type: base_bucket[2][0].type, data: write_shallow(_bucket) };\n }\n _x[0].messages[0].data = write_shallow(base_bucket);\n }\n oldbucket.content = compress_iwa_file(write_iwa_file(_x));\n oldbucket.size = oldbucket.content.length;\n var col_header_ref = parse_TSP_Reference(store[2][0].data);\n oldbucket = CFB.find(cfb, dependents[col_header_ref].location);\n _x = parse_iwa_file(decompress_iwa_file(oldbucket.content));\n {\n if (_x[0].id != col_header_ref)\n throw \"Bad HeaderStorageBucket\";\n base_bucket = parse_shallow(_x[0].messages[0].data);\n for (C = 0; C <= range.e.c; ++C) {\n _bucket = parse_shallow(base_bucket[2][0].data);\n _bucket[1][0].data = write_varint49(C);\n _bucket[4][0].data = write_varint49(range.e.r + 1);\n base_bucket[2][C] = { type: base_bucket[2][0].type, data: write_shallow(_bucket) };\n }\n _x[0].messages[0].data = write_shallow(base_bucket);\n }\n oldbucket.content = compress_iwa_file(write_iwa_file(_x));\n oldbucket.size = oldbucket.content.length;\n var sstref = parse_TSP_Reference(store[4][0].data);\n (function() {\n var sentry = CFB.find(cfb, dependents[sstref].location);\n var sx = parse_iwa_file(decompress_iwa_file(sentry.content));\n var sstroot;\n for (var sxi = 0; sxi < sx.length; ++sxi) {\n var packet2 = sx[sxi];\n if (packet2.id == sstref)\n sstroot = packet2;\n }\n var sstdata = parse_shallow(sstroot.messages[0].data);\n {\n sstdata[3] = [];\n var newsst = [];\n SST.forEach(function(str, i) {\n newsst[1] = [{ type: 0, data: write_varint49(i) }];\n newsst[2] = [{ type: 0, data: write_varint49(1) }];\n newsst[3] = [{ type: 2, data: stru8(str) }];\n sstdata[3].push({ type: 2, data: write_shallow(newsst) });\n });\n }\n sstroot.messages[0].data = write_shallow(sstdata);\n var sy = write_iwa_file(sx);\n var raw32 = compress_iwa_file(sy);\n sentry.content = raw32;\n sentry.size = sentry.content.length;\n })();\n var tile = parse_shallow(store[3][0].data);\n {\n var t = tile[1][0];\n delete tile[2];\n var tl = parse_shallow(t.data);\n {\n var tileref = parse_TSP_Reference(tl[2][0].data);\n (function() {\n var tentry = CFB.find(cfb, dependents[tileref].location);\n var tx = parse_iwa_file(decompress_iwa_file(tentry.content));\n var tileroot;\n for (var sxi = 0; sxi < tx.length; ++sxi) {\n var packet2 = tx[sxi];\n if (packet2.id == tileref)\n tileroot = packet2;\n }\n var tiledata = parse_shallow(tileroot.messages[0].data);\n {\n delete tiledata[6];\n delete tile[7];\n var rowload = new Uint8Array(tiledata[5][0].data);\n tiledata[5] = [];\n var cnt = 0;\n for (var R2 = 0; R2 <= range.e.r; ++R2) {\n var tilerow = parse_shallow(rowload);\n cnt += write_tile_row(tilerow, data[R2], SST);\n tilerow[1][0].data = write_varint49(R2);\n tiledata[5].push({ data: write_shallow(tilerow), type: 2 });\n }\n tiledata[1] = [{ type: 0, data: write_varint49(range.e.c + 1) }];\n tiledata[2] = [{ type: 0, data: write_varint49(range.e.r + 1) }];\n tiledata[3] = [{ type: 0, data: write_varint49(cnt) }];\n tiledata[4] = [{ type: 0, data: write_varint49(range.e.r + 1) }];\n }\n tileroot.messages[0].data = write_shallow(tiledata);\n var ty = write_iwa_file(tx);\n var raw32 = compress_iwa_file(ty);\n tentry.content = raw32;\n tentry.size = tentry.content.length;\n })();\n }\n t.data = write_shallow(tl);\n }\n store[3][0].data = write_shallow(tile);\n }\n pb[4][0].data = write_shallow(store);\n }\n docroot.messages[0].data = write_shallow(pb);\n var y = write_iwa_file(x);\n var raw3 = compress_iwa_file(y);\n entry.content = raw3;\n entry.size = entry.content.length;\n return cfb;\n}\nfunction fix_opts_func(defaults/*:Array >*/)/*:{(o:any):void}*/ {\n\treturn function fix_opts(opts) {\n\t\tfor(var i = 0; i != defaults.length; ++i) {\n\t\t\tvar d = defaults[i];\n\t\t\tif(opts[d[0]] === undefined) opts[d[0]] = d[1];\n\t\t\tif(d[2] === 'n') opts[d[0]] = Number(opts[d[0]]);\n\t\t}\n\t};\n}\n\nfunction fix_read_opts(opts) {\nfix_opts_func([\n\t['cellNF', false], /* emit cell number format string as .z */\n\t['cellHTML', true], /* emit html string as .h */\n\t['cellFormula', true], /* emit formulae as .f */\n\t['cellStyles', false], /* emits style/theme as .s */\n\t['cellText', true], /* emit formatted text as .w */\n\t['cellDates', false], /* emit date cells with type `d` */\n\n\t['sheetStubs', false], /* emit empty cells */\n\t['sheetRows', 0, 'n'], /* read n rows (0 = read all rows) */\n\n\t['bookDeps', false], /* parse calculation chains */\n\t['bookSheets', false], /* only try to get sheet names (no Sheets) */\n\t['bookProps', false], /* only try to get properties (no Sheets) */\n\t['bookFiles', false], /* include raw file structure (keys, files, cfb) */\n\t['bookVBA', false], /* include vba raw data (vbaraw) */\n\n\t['password',''], /* password */\n\t['WTF', false] /* WTF mode (throws errors) */\n])(opts);\n}\n\nfunction fix_write_opts(opts) {\nfix_opts_func([\n\t['cellDates', false], /* write date cells with type `d` */\n\n\t['bookSST', false], /* Generate Shared String Table */\n\n\t['bookType', 'xlsx'], /* Type of workbook (xlsx/m/b) */\n\n\t['compression', false], /* Use file compression */\n\n\t['WTF', false] /* WTF mode (throws errors) */\n])(opts);\n}\nfunction get_sheet_type(n/*:string*/)/*:string*/ {\n\tif(RELS.WS.indexOf(n) > -1) return \"sheet\";\n\tif(RELS.CS && n == RELS.CS) return \"chart\";\n\tif(RELS.DS && n == RELS.DS) return \"dialog\";\n\tif(RELS.MS && n == RELS.MS) return \"macro\";\n\treturn (n && n.length) ? n : \"sheet\";\n}\nfunction safe_parse_wbrels(wbrels, sheets) {\n\tif(!wbrels) return 0;\n\ttry {\n\t\twbrels = sheets.map(function pwbr(w) { if(!w.id) w.id = w.strRelID; return [w.name, wbrels['!id'][w.id].Target, get_sheet_type(wbrels['!id'][w.id].Type)]; });\n\t} catch(e) { return null; }\n\treturn !wbrels || wbrels.length === 0 ? null : wbrels;\n}\n\nfunction safe_parse_sheet(zip, path/*:string*/, relsPath/*:string*/, sheet, idx/*:number*/, sheetRels, sheets, stype/*:string*/, opts, wb, themes, styles) {\n\ttry {\n\t\tsheetRels[sheet]=parse_rels(getzipstr(zip, relsPath, true), path);\n\t\tvar data = getzipdata(zip, path);\n\t\tvar _ws;\n\t\tswitch(stype) {\n\t\t\tcase 'sheet': _ws = parse_ws(data, path, idx, opts, sheetRels[sheet], wb, themes, styles); break;\n\t\t\tcase 'chart': _ws = parse_cs(data, path, idx, opts, sheetRels[sheet], wb, themes, styles);\n\t\t\t\tif(!_ws || !_ws['!drawel']) break;\n\t\t\t\tvar dfile = resolve_path(_ws['!drawel'].Target, path);\n\t\t\t\tvar drelsp = get_rels_path(dfile);\n\t\t\t\tvar draw = parse_drawing(getzipstr(zip, dfile, true), parse_rels(getzipstr(zip, drelsp, true), dfile));\n\t\t\t\tvar chartp = resolve_path(draw, dfile);\n\t\t\t\tvar crelsp = get_rels_path(chartp);\n\t\t\t\t_ws = parse_chart(getzipstr(zip, chartp, true), chartp, opts, parse_rels(getzipstr(zip, crelsp, true), chartp), wb, _ws);\n\t\t\t\tbreak;\n\t\t\tcase 'macro': _ws = parse_ms(data, path, idx, opts, sheetRels[sheet], wb, themes, styles); break;\n\t\t\tcase 'dialog': _ws = parse_ds(data, path, idx, opts, sheetRels[sheet], wb, themes, styles); break;\n\t\t\tdefault: throw new Error(\"Unrecognized sheet type \" + stype);\n\t\t}\n\t\tsheets[sheet] = _ws;\n\n\t\t/* scan rels for comments and threaded comments */\n\t\tvar tcomments = [];\n\t\tif(sheetRels && sheetRels[sheet]) keys(sheetRels[sheet]).forEach(function(n) {\n\t\t\tvar dfile = \"\";\n\t\t\tif(sheetRels[sheet][n].Type == RELS.CMNT) {\n\t\t\t\tdfile = resolve_path(sheetRels[sheet][n].Target, path);\n\t\t\t\tvar comments = parse_cmnt(getzipdata(zip, dfile, true), dfile, opts);\n\t\t\t\tif(!comments || !comments.length) return;\n\t\t\t\tsheet_insert_comments(_ws, comments, false);\n\t\t\t}\n\t\t\tif(sheetRels[sheet][n].Type == RELS.TCMNT) {\n\t\t\t\tdfile = resolve_path(sheetRels[sheet][n].Target, path);\n\t\t\t\ttcomments = tcomments.concat(parse_tcmnt_xml(getzipdata(zip, dfile, true), opts));\n\t\t\t}\n\t\t});\n\t\tif(tcomments && tcomments.length) sheet_insert_comments(_ws, tcomments, true, opts.people || []);\n\t} catch(e) { if(opts.WTF) throw e; }\n}\n\nfunction strip_front_slash(x/*:string*/)/*:string*/ { return x.charAt(0) == '/' ? x.slice(1) : x; }\n\nfunction parse_zip(zip/*:ZIP*/, opts/*:?ParseOpts*/)/*:Workbook*/ {\n\tmake_ssf();\n\topts = opts || {};\n\tfix_read_opts(opts);\n\n\t/* OpenDocument Part 3 Section 2.2.1 OpenDocument Package */\n\tif(safegetzipfile(zip, 'META-INF/manifest.xml')) return parse_ods(zip, opts);\n\t/* UOC */\n\tif(safegetzipfile(zip, 'objectdata.xml')) return parse_ods(zip, opts);\n\t/* Numbers */\n\tif(safegetzipfile(zip, 'Index/Document.iwa')) {\n\t\tif(typeof Uint8Array == \"undefined\") throw new Error('NUMBERS file parsing requires Uint8Array support');\n\t\tif(typeof parse_numbers_iwa != \"undefined\") {\n\t\t\tif(zip.FileIndex) return parse_numbers_iwa(zip);\n\t\t\tvar _zip = CFB.utils.cfb_new();\n\t\t\tzipentries(zip).forEach(function(e) { zip_add_file(_zip, e, getzipbin(zip, e)); });\n\t\t\treturn parse_numbers_iwa(_zip);\n\t\t}\n\t\tthrow new Error('Unsupported NUMBERS file');\n\t}\n\tif(!safegetzipfile(zip, '[Content_Types].xml')) {\n\t\tif(safegetzipfile(zip, 'index.xml.gz')) throw new Error('Unsupported NUMBERS 08 file');\n\t\tif(safegetzipfile(zip, 'index.xml')) throw new Error('Unsupported NUMBERS 09 file');\n\t\tthrow new Error('Unsupported ZIP file');\n\t}\n\n\tvar entries = zipentries(zip);\n\tvar dir = parse_ct((getzipstr(zip, '[Content_Types].xml')/*:?any*/));\n\tvar xlsb = false;\n\tvar sheets, binname;\n\tif(dir.workbooks.length === 0) {\n\t\tbinname = \"xl/workbook.xml\";\n\t\tif(getzipdata(zip,binname, true)) dir.workbooks.push(binname);\n\t}\n\tif(dir.workbooks.length === 0) {\n\t\tbinname = \"xl/workbook.bin\";\n\t\tif(!getzipdata(zip,binname,true)) throw new Error(\"Could not find workbook\");\n\t\tdir.workbooks.push(binname);\n\t\txlsb = true;\n\t}\n\tif(dir.workbooks[0].slice(-3) == \"bin\") xlsb = true;\n\n\tvar themes = ({}/*:any*/);\n\tvar styles = ({}/*:any*/);\n\tif(!opts.bookSheets && !opts.bookProps) {\n\t\tstrs = [];\n\t\tif(dir.sst) try { strs=parse_sst(getzipdata(zip, strip_front_slash(dir.sst)), dir.sst, opts); } catch(e) { if(opts.WTF) throw e; }\n\n\t\tif(opts.cellStyles && dir.themes.length) themes = parse_theme(getzipstr(zip, dir.themes[0].replace(/^\\//,''), true)||\"\",dir.themes[0], opts);\n\n\t\tif(dir.style) styles = parse_sty(getzipdata(zip, strip_front_slash(dir.style)), dir.style, themes, opts);\n\t}\n\n\t/*var externbooks = */dir.links.map(function(link) {\n\t\ttry {\n\t\t\tvar rels = parse_rels(getzipstr(zip, get_rels_path(strip_front_slash(link))), link);\n\t\t\treturn parse_xlink(getzipdata(zip, strip_front_slash(link)), rels, link, opts);\n\t\t} catch(e) {}\n\t});\n\n\tvar wb = parse_wb(getzipdata(zip, strip_front_slash(dir.workbooks[0])), dir.workbooks[0], opts);\n\n\tvar props = {}, propdata = \"\";\n\n\tif(dir.coreprops.length) {\n\t\tpropdata = getzipdata(zip, strip_front_slash(dir.coreprops[0]), true);\n\t\tif(propdata) props = parse_core_props(propdata);\n\t\tif(dir.extprops.length !== 0) {\n\t\t\tpropdata = getzipdata(zip, strip_front_slash(dir.extprops[0]), true);\n\t\t\tif(propdata) parse_ext_props(propdata, props, opts);\n\t\t}\n\t}\n\n\tvar custprops = {};\n\tif(!opts.bookSheets || opts.bookProps) {\n\t\tif (dir.custprops.length !== 0) {\n\t\t\tpropdata = getzipstr(zip, strip_front_slash(dir.custprops[0]), true);\n\t\t\tif(propdata) custprops = parse_cust_props(propdata, opts);\n\t\t}\n\t}\n\n\tvar out = ({}/*:any*/);\n\tif(opts.bookSheets || opts.bookProps) {\n\t\tif(wb.Sheets) sheets = wb.Sheets.map(function pluck(x){ return x.name; });\n\t\telse if(props.Worksheets && props.SheetNames.length > 0) sheets=props.SheetNames;\n\t\tif(opts.bookProps) { out.Props = props; out.Custprops = custprops; }\n\t\tif(opts.bookSheets && typeof sheets !== 'undefined') out.SheetNames = sheets;\n\t\tif(opts.bookSheets ? out.SheetNames : opts.bookProps) return out;\n\t}\n\tsheets = {};\n\n\tvar deps = {};\n\tif(opts.bookDeps && dir.calcchain) deps=parse_cc(getzipdata(zip, strip_front_slash(dir.calcchain)),dir.calcchain,opts);\n\n\tvar i=0;\n\tvar sheetRels = ({}/*:any*/);\n\tvar path, relsPath;\n\n\t{\n\t\tvar wbsheets = wb.Sheets;\n\t\tprops.Worksheets = wbsheets.length;\n\t\tprops.SheetNames = [];\n\t\tfor(var j = 0; j != wbsheets.length; ++j) {\n\t\t\tprops.SheetNames[j] = wbsheets[j].name;\n\t\t}\n\t}\n\n\tvar wbext = xlsb ? \"bin\" : \"xml\";\n\tvar wbrelsi = dir.workbooks[0].lastIndexOf(\"/\");\n\tvar wbrelsfile = (dir.workbooks[0].slice(0, wbrelsi+1) + \"_rels/\" + dir.workbooks[0].slice(wbrelsi+1) + \".rels\").replace(/^\\//,\"\");\n\tif(!safegetzipfile(zip, wbrelsfile)) wbrelsfile = 'xl/_rels/workbook.' + wbext + '.rels';\n\tvar wbrels = parse_rels(getzipstr(zip, wbrelsfile, true), wbrelsfile.replace(/_rels.*/, \"s5s\"));\n\n\tif((dir.metadata || []).length >= 1) {\n\t\t/* TODO: MDX and other types of metadata */\n\t\topts.xlmeta = parse_xlmeta(getzipdata(zip, strip_front_slash(dir.metadata[0])),dir.metadata[0],opts);\n\t}\n\n\tif((dir.people || []).length >= 1) {\n\t\topts.people = parse_people_xml(getzipdata(zip, strip_front_slash(dir.people[0])),opts);\n\t}\n\n\tif(wbrels) wbrels = safe_parse_wbrels(wbrels, wb.Sheets);\n\n\t/* Numbers iOS hack */\n\tvar nmode = (getzipdata(zip,\"xl/worksheets/sheet.xml\",true))?1:0;\n\twsloop: for(i = 0; i != props.Worksheets; ++i) {\n\t\tvar stype = \"sheet\";\n\t\tif(wbrels && wbrels[i]) {\n\t\t\tpath = 'xl/' + (wbrels[i][1]).replace(/[\\/]?xl\\//, \"\");\n\t\t\tif(!safegetzipfile(zip, path)) path = wbrels[i][1];\n\t\t\tif(!safegetzipfile(zip, path)) path = wbrelsfile.replace(/_rels\\/.*$/,\"\") + wbrels[i][1];\n\t\t\tstype = wbrels[i][2];\n\t\t} else {\n\t\t\tpath = 'xl/worksheets/sheet'+(i+1-nmode)+\".\" + wbext;\n\t\t\tpath = path.replace(/sheet0\\./,\"sheet.\");\n\t\t}\n\t\trelsPath = path.replace(/^(.*)(\\/)([^\\/]*)$/, \"$1/_rels/$3.rels\");\n\t\tif(opts && opts.sheets != null) switch(typeof opts.sheets) {\n\t\t\tcase \"number\": if(i != opts.sheets) continue wsloop; break;\n\t\t\tcase \"string\": if(props.SheetNames[i].toLowerCase() != opts.sheets.toLowerCase()) continue wsloop; break;\n\t\t\tdefault: if(Array.isArray && Array.isArray(opts.sheets)) {\n\t\t\t\tvar snjseen = false;\n\t\t\t\tfor(var snj = 0; snj != opts.sheets.length; ++snj) {\n\t\t\t\t\tif(typeof opts.sheets[snj] == \"number\" && opts.sheets[snj] == i) snjseen=1;\n\t\t\t\t\tif(typeof opts.sheets[snj] == \"string\" && opts.sheets[snj].toLowerCase() == props.SheetNames[i].toLowerCase()) snjseen = 1;\n\t\t\t\t}\n\t\t\t\tif(!snjseen) continue wsloop;\n\t\t\t}\n\t\t}\n\t\tsafe_parse_sheet(zip, path, relsPath, props.SheetNames[i], i, sheetRels, sheets, stype, opts, wb, themes, styles);\n\t}\n\n\tout = ({\n\t\tDirectory: dir,\n\t\tWorkbook: wb,\n\t\tProps: props,\n\t\tCustprops: custprops,\n\t\tDeps: deps,\n\t\tSheets: sheets,\n\t\tSheetNames: props.SheetNames,\n\t\tStrings: strs,\n\t\tStyles: styles,\n\t\tThemes: themes,\n\t\tSSF: dup(table_fmt)\n\t}/*:any*/);\n\tif(opts && opts.bookFiles) {\n\t\tif(zip.files) {\n\t\t\tout.keys = entries;\n\t\t\tout.files = zip.files;\n\t\t} else {\n\t\t\tout.keys = [];\n\t\t\tout.files = {};\n\t\t\tzip.FullPaths.forEach(function(p, idx) {\n\t\t\t\tp = p.replace(/^Root Entry[\\/]/, \"\");\n\t\t\t\tout.keys.push(p);\n\t\t\t\tout.files[p] = zip.FileIndex[idx];\n\t\t\t});\n\t\t}\n\t}\n\tif(opts && opts.bookVBA) {\n\t\tif(dir.vba.length > 0) out.vbaraw = getzipdata(zip,strip_front_slash(dir.vba[0]),true);\n\t\telse if(dir.defaults && dir.defaults.bin === CT_VBA) out.vbaraw = getzipdata(zip, 'xl/vbaProject.bin',true);\n\t}\n\treturn out;\n}\n\n/* [MS-OFFCRYPTO] 2.1.1 */\nfunction parse_xlsxcfb(cfb, _opts/*:?ParseOpts*/)/*:Workbook*/ {\n\tvar opts = _opts || {};\n\tvar f = 'Workbook', data = CFB.find(cfb, f);\n\ttry {\n\tf = '/!DataSpaces/Version';\n\tdata = CFB.find(cfb, f); if(!data || !data.content) throw new Error(\"ECMA-376 Encrypted file missing \" + f);\n\t/*var version = */parse_DataSpaceVersionInfo(data.content);\n\n\t/* 2.3.4.1 */\n\tf = '/!DataSpaces/DataSpaceMap';\n\tdata = CFB.find(cfb, f); if(!data || !data.content) throw new Error(\"ECMA-376 Encrypted file missing \" + f);\n\tvar dsm = parse_DataSpaceMap(data.content);\n\tif(dsm.length !== 1 || dsm[0].comps.length !== 1 || dsm[0].comps[0].t !== 0 || dsm[0].name !== \"StrongEncryptionDataSpace\" || dsm[0].comps[0].v !== \"EncryptedPackage\")\n\t\tthrow new Error(\"ECMA-376 Encrypted file bad \" + f);\n\n\t/* 2.3.4.2 */\n\tf = '/!DataSpaces/DataSpaceInfo/StrongEncryptionDataSpace';\n\tdata = CFB.find(cfb, f); if(!data || !data.content) throw new Error(\"ECMA-376 Encrypted file missing \" + f);\n\tvar seds = parse_DataSpaceDefinition(data.content);\n\tif(seds.length != 1 || seds[0] != \"StrongEncryptionTransform\")\n\t\tthrow new Error(\"ECMA-376 Encrypted file bad \" + f);\n\n\t/* 2.3.4.3 */\n\tf = '/!DataSpaces/TransformInfo/StrongEncryptionTransform/!Primary';\n\tdata = CFB.find(cfb, f); if(!data || !data.content) throw new Error(\"ECMA-376 Encrypted file missing \" + f);\n\t/*var hdr = */parse_Primary(data.content);\n\t} catch(e) {}\n\n\tf = '/EncryptionInfo';\n\tdata = CFB.find(cfb, f); if(!data || !data.content) throw new Error(\"ECMA-376 Encrypted file missing \" + f);\n\tvar einfo = parse_EncryptionInfo(data.content);\n\n\t/* 2.3.4.4 */\n\tf = '/EncryptedPackage';\n\tdata = CFB.find(cfb, f); if(!data || !data.content) throw new Error(\"ECMA-376 Encrypted file missing \" + f);\n\n/*global decrypt_agile */\n/*:: declare var decrypt_agile:any; */\n\tif(einfo[0] == 0x04 && typeof decrypt_agile !== 'undefined') return decrypt_agile(einfo[1], data.content, opts.password || \"\", opts);\n/*global decrypt_std76 */\n/*:: declare var decrypt_std76:any; */\n\tif(einfo[0] == 0x02 && typeof decrypt_std76 !== 'undefined') return decrypt_std76(einfo[1], data.content, opts.password || \"\", opts);\n\tthrow new Error(\"File is password-protected\");\n}\n\nfunction write_zip(wb/*:Workbook*/, opts/*:WriteOpts*/)/*:ZIP*/ {\n\tif(opts.bookType == \"ods\") return write_ods(wb, opts);\n\tif(opts.bookType == \"numbers\") return write_numbers_iwa(wb, opts);\n\tif(opts.bookType == \"xlsb\") return write_zip_xlsxb(wb, opts);\n\treturn write_zip_xlsx(wb, opts);\n}\n\n/* XLSX and XLSB writing are very similar. Originally they were unified in one\n export function. This is horrible for tree shaking in the common case (most\n applications need to export files in one format) so this function supports\n both formats while write_zip_xlsx only handles XLSX */\nfunction write_zip_xlsxb(wb/*:Workbook*/, opts/*:WriteOpts*/)/*:ZIP*/ {\n\t_shapeid = 1024;\n\tif(wb && !wb.SSF) {\n\t\twb.SSF = dup(table_fmt);\n\t}\n\tif(wb && wb.SSF) {\n\t\tmake_ssf(); SSF_load_table(wb.SSF);\n\t\t// $FlowIgnore\n\t\topts.revssf = evert_num(wb.SSF); opts.revssf[wb.SSF[65535]] = 0;\n\t\topts.ssf = wb.SSF;\n\t}\n\topts.rels = {}; opts.wbrels = {};\n\topts.Strings = /*::((*/[]/*:: :any):SST)*/; opts.Strings.Count = 0; opts.Strings.Unique = 0;\n\tif(browser_has_Map) opts.revStrings = new Map();\n\telse { opts.revStrings = {}; opts.revStrings.foo = []; delete opts.revStrings.foo; }\n\tvar wbext = opts.bookType == \"xlsb\" ? \"bin\" : \"xml\";\n\tvar vbafmt = VBAFMTS.indexOf(opts.bookType) > -1;\n\tvar ct = new_ct();\n\tfix_write_opts(opts = opts || {});\n\tvar zip = zip_new();\n\tvar f = \"\", rId = 0;\n\n\topts.cellXfs = [];\n\tget_cell_style(opts.cellXfs, {}, {revssf:{\"General\":0}});\n\n\tif(!wb.Props) wb.Props = {};\n\n\tf = \"docProps/core.xml\";\n\tzip_add_file(zip, f, write_core_props(wb.Props, opts));\n\tct.coreprops.push(f);\n\tadd_rels(opts.rels, 2, f, RELS.CORE_PROPS);\n\n\t/*::if(!wb.Props) throw \"unreachable\"; */\n\tf = \"docProps/app.xml\";\n\tif(wb.Props && wb.Props.SheetNames){/* empty */}\n\telse if(!wb.Workbook || !wb.Workbook.Sheets) wb.Props.SheetNames = wb.SheetNames;\n\telse {\n\t\tvar _sn = [];\n\t\tfor(var _i = 0; _i < wb.SheetNames.length; ++_i)\n\t\t\tif((wb.Workbook.Sheets[_i]||{}).Hidden != 2) _sn.push(wb.SheetNames[_i]);\n\t\twb.Props.SheetNames = _sn;\n\t}\n\twb.Props.Worksheets = wb.Props.SheetNames.length;\n\tzip_add_file(zip, f, write_ext_props(wb.Props, opts));\n\tct.extprops.push(f);\n\tadd_rels(opts.rels, 3, f, RELS.EXT_PROPS);\n\n\tif(wb.Custprops !== wb.Props && keys(wb.Custprops||{}).length > 0) {\n\t\tf = \"docProps/custom.xml\";\n\t\tzip_add_file(zip, f, write_cust_props(wb.Custprops, opts));\n\t\tct.custprops.push(f);\n\t\tadd_rels(opts.rels, 4, f, RELS.CUST_PROPS);\n\t}\n\n\tfor(rId=1;rId <= wb.SheetNames.length; ++rId) {\n\t\tvar wsrels = {'!id':{}};\n\t\tvar ws = wb.Sheets[wb.SheetNames[rId-1]];\n\t\tvar _type = (ws || {})[\"!type\"] || \"sheet\";\n\t\tswitch(_type) {\n\t\tcase \"chart\":\n\t\t\t/* falls through */\n\t\tdefault:\n\t\t\tf = \"xl/worksheets/sheet\" + rId + \".\" + wbext;\n\t\t\tzip_add_file(zip, f, write_ws(rId-1, f, opts, wb, wsrels));\n\t\t\tct.sheets.push(f);\n\t\t\tadd_rels(opts.wbrels, -1, \"worksheets/sheet\" + rId + \".\" + wbext, RELS.WS[0]);\n\t\t}\n\n\t\tif(ws) {\n\t\t\tvar comments = ws['!comments'];\n\t\t\tvar need_vml = false;\n\t\t\tvar cf = \"\";\n\t\t\tif(comments && comments.length > 0) {\n\t\t\t\tcf = \"xl/comments\" + rId + \".\" + wbext;\n\t\t\t\tzip_add_file(zip, cf, write_cmnt(comments, cf, opts));\n\t\t\t\tct.comments.push(cf);\n\t\t\t\tadd_rels(wsrels, -1, \"../comments\" + rId + \".\" + wbext, RELS.CMNT);\n\t\t\t\tneed_vml = true;\n\t\t\t}\n\t\t\tif(ws['!legacy']) {\n\t\t\t\tif(need_vml) zip_add_file(zip, \"xl/drawings/vmlDrawing\" + (rId) + \".vml\", write_comments_vml(rId, ws['!comments']));\n\t\t\t}\n\t\t\tdelete ws['!comments'];\n\t\t\tdelete ws['!legacy'];\n\t\t}\n\n\t\tif(wsrels['!id'].rId1) zip_add_file(zip, get_rels_path(f), write_rels(wsrels));\n\t}\n\n\tif(opts.Strings != null && opts.Strings.length > 0) {\n\t\tf = \"xl/sharedStrings.\" + wbext;\n\t\tzip_add_file(zip, f, write_sst(opts.Strings, f, opts));\n\t\tct.strs.push(f);\n\t\tadd_rels(opts.wbrels, -1, \"sharedStrings.\" + wbext, RELS.SST);\n\t}\n\n\tf = \"xl/workbook.\" + wbext;\n\tzip_add_file(zip, f, write_wb(wb, f, opts));\n\tct.workbooks.push(f);\n\tadd_rels(opts.rels, 1, f, RELS.WB);\n\n\t/* TODO: something more intelligent with themes */\n\n\tf = \"xl/theme/theme1.xml\";\n\tzip_add_file(zip, f, write_theme(wb.Themes, opts));\n\tct.themes.push(f);\n\tadd_rels(opts.wbrels, -1, \"theme/theme1.xml\", RELS.THEME);\n\n\t/* TODO: something more intelligent with styles */\n\n\tf = \"xl/styles.\" + wbext;\n\tzip_add_file(zip, f, write_sty(wb, f, opts));\n\tct.styles.push(f);\n\tadd_rels(opts.wbrels, -1, \"styles.\" + wbext, RELS.STY);\n\n\tif(wb.vbaraw && vbafmt) {\n\t\tf = \"xl/vbaProject.bin\";\n\t\tzip_add_file(zip, f, wb.vbaraw);\n\t\tct.vba.push(f);\n\t\tadd_rels(opts.wbrels, -1, \"vbaProject.bin\", RELS.VBA);\n\t}\n\n\tf = \"xl/metadata.\" + wbext;\n\tzip_add_file(zip, f, write_xlmeta(f));\n\tct.metadata.push(f);\n\tadd_rels(opts.wbrels, -1, \"metadata.\" + wbext, RELS.XLMETA);\n\n\tzip_add_file(zip, \"[Content_Types].xml\", write_ct(ct, opts));\n\tzip_add_file(zip, '_rels/.rels', write_rels(opts.rels));\n\tzip_add_file(zip, 'xl/_rels/workbook.' + wbext + '.rels', write_rels(opts.wbrels));\n\n\tdelete opts.revssf; delete opts.ssf;\n\treturn zip;\n}\n\nfunction write_zip_xlsx(wb/*:Workbook*/, opts/*:WriteOpts*/)/*:ZIP*/ {\n\t_shapeid = 1024;\n\tif(wb && !wb.SSF) {\n\t\twb.SSF = dup(table_fmt);\n\t}\n\tif(wb && wb.SSF) {\n\t\tmake_ssf(); SSF_load_table(wb.SSF);\n\t\t// $FlowIgnore\n\t\topts.revssf = evert_num(wb.SSF); opts.revssf[wb.SSF[65535]] = 0;\n\t\topts.ssf = wb.SSF;\n\t}\n\topts.rels = {}; opts.wbrels = {};\n\topts.Strings = /*::((*/[]/*:: :any):SST)*/; opts.Strings.Count = 0; opts.Strings.Unique = 0;\n\tif(browser_has_Map) opts.revStrings = new Map();\n\telse { opts.revStrings = {}; opts.revStrings.foo = []; delete opts.revStrings.foo; }\n\tvar wbext = \"xml\";\n\tvar vbafmt = VBAFMTS.indexOf(opts.bookType) > -1;\n\tvar ct = new_ct();\n\tfix_write_opts(opts = opts || {});\n\tvar zip = zip_new();\n\tvar f = \"\", rId = 0;\n\n\topts.cellXfs = [];\n\tget_cell_style(opts.cellXfs, {}, {revssf:{\"General\":0}});\n\n\tif(!wb.Props) wb.Props = {};\n\n\tf = \"docProps/core.xml\";\n\tzip_add_file(zip, f, write_core_props(wb.Props, opts));\n\tct.coreprops.push(f);\n\tadd_rels(opts.rels, 2, f, RELS.CORE_PROPS);\n\n\t/*::if(!wb.Props) throw \"unreachable\"; */\n\tf = \"docProps/app.xml\";\n\tif(wb.Props && wb.Props.SheetNames){/* empty */}\n\telse if(!wb.Workbook || !wb.Workbook.Sheets) wb.Props.SheetNames = wb.SheetNames;\n\telse {\n\t\tvar _sn = [];\n\t\tfor(var _i = 0; _i < wb.SheetNames.length; ++_i)\n\t\t\tif((wb.Workbook.Sheets[_i]||{}).Hidden != 2) _sn.push(wb.SheetNames[_i]);\n\t\twb.Props.SheetNames = _sn;\n\t}\n\twb.Props.Worksheets = wb.Props.SheetNames.length;\n\tzip_add_file(zip, f, write_ext_props(wb.Props, opts));\n\tct.extprops.push(f);\n\tadd_rels(opts.rels, 3, f, RELS.EXT_PROPS);\n\n\tif(wb.Custprops !== wb.Props && keys(wb.Custprops||{}).length > 0) {\n\t\tf = \"docProps/custom.xml\";\n\t\tzip_add_file(zip, f, write_cust_props(wb.Custprops, opts));\n\t\tct.custprops.push(f);\n\t\tadd_rels(opts.rels, 4, f, RELS.CUST_PROPS);\n\t}\n\n\tvar people = [\"SheetJ5\"];\n\topts.tcid = 0;\n\n\tfor(rId=1;rId <= wb.SheetNames.length; ++rId) {\n\t\tvar wsrels = {'!id':{}};\n\t\tvar ws = wb.Sheets[wb.SheetNames[rId-1]];\n\t\tvar _type = (ws || {})[\"!type\"] || \"sheet\";\n\t\tswitch(_type) {\n\t\tcase \"chart\":\n\t\t\t/* falls through */\n\t\tdefault:\n\t\t\tf = \"xl/worksheets/sheet\" + rId + \".\" + wbext;\n\t\t\tzip_add_file(zip, f, write_ws_xml(rId-1, opts, wb, wsrels));\n\t\t\tct.sheets.push(f);\n\t\t\tadd_rels(opts.wbrels, -1, \"worksheets/sheet\" + rId + \".\" + wbext, RELS.WS[0]);\n\t\t}\n\n\t\tif(ws) {\n\t\t\tvar comments = ws['!comments'];\n\t\t\tvar need_vml = false;\n\t\t\tvar cf = \"\";\n\t\t\tif(comments && comments.length > 0) {\n\t\t\t\tvar needtc = false;\n\t\t\t\tcomments.forEach(function(carr) {\n\t\t\t\t\tcarr[1].forEach(function(c) { if(c.T == true) needtc = true; });\n\t\t\t\t});\n\t\t\t\tif(needtc) {\n\t\t\t\t\tcf = \"xl/threadedComments/threadedComment\" + rId + \".\" + wbext;\n\t\t\t\t\tzip_add_file(zip, cf, write_tcmnt_xml(comments, people, opts));\n\t\t\t\t\tct.threadedcomments.push(cf);\n\t\t\t\t\tadd_rels(wsrels, -1, \"../threadedComments/threadedComment\" + rId + \".\" + wbext, RELS.TCMNT);\n\t\t\t\t}\n\n\t\t\t\tcf = \"xl/comments\" + rId + \".\" + wbext;\n\t\t\t\tzip_add_file(zip, cf, write_comments_xml(comments, opts));\n\t\t\t\tct.comments.push(cf);\n\t\t\t\tadd_rels(wsrels, -1, \"../comments\" + rId + \".\" + wbext, RELS.CMNT);\n\t\t\t\tneed_vml = true;\n\t\t\t}\n\t\t\tif(ws['!legacy']) {\n\t\t\t\tif(need_vml) zip_add_file(zip, \"xl/drawings/vmlDrawing\" + (rId) + \".vml\", write_comments_vml(rId, ws['!comments']));\n\t\t\t}\n\t\t\tdelete ws['!comments'];\n\t\t\tdelete ws['!legacy'];\n\t\t}\n\n\t\tif(wsrels['!id'].rId1) zip_add_file(zip, get_rels_path(f), write_rels(wsrels));\n\t}\n\n\tif(opts.Strings != null && opts.Strings.length > 0) {\n\t\tf = \"xl/sharedStrings.\" + wbext;\n\t\tzip_add_file(zip, f, write_sst_xml(opts.Strings, opts));\n\t\tct.strs.push(f);\n\t\tadd_rels(opts.wbrels, -1, \"sharedStrings.\" + wbext, RELS.SST);\n\t}\n\n\tf = \"xl/workbook.\" + wbext;\n\tzip_add_file(zip, f, write_wb_xml(wb, opts));\n\tct.workbooks.push(f);\n\tadd_rels(opts.rels, 1, f, RELS.WB);\n\n\t/* TODO: something more intelligent with themes */\n\n\tf = \"xl/theme/theme1.xml\";\n\tzip_add_file(zip, f, write_theme(wb.Themes, opts));\n\tct.themes.push(f);\n\tadd_rels(opts.wbrels, -1, \"theme/theme1.xml\", RELS.THEME);\n\n\t/* TODO: something more intelligent with styles */\n\n\tf = \"xl/styles.\" + wbext;\n\tzip_add_file(zip, f, write_sty_xml(wb, opts));\n\tct.styles.push(f);\n\tadd_rels(opts.wbrels, -1, \"styles.\" + wbext, RELS.STY);\n\n\tif(wb.vbaraw && vbafmt) {\n\t\tf = \"xl/vbaProject.bin\";\n\t\tzip_add_file(zip, f, wb.vbaraw);\n\t\tct.vba.push(f);\n\t\tadd_rels(opts.wbrels, -1, \"vbaProject.bin\", RELS.VBA);\n\t}\n\n\tf = \"xl/metadata.\" + wbext;\n\tzip_add_file(zip, f, write_xlmeta_xml());\n\tct.metadata.push(f);\n\tadd_rels(opts.wbrels, -1, \"metadata.\" + wbext, RELS.XLMETA);\n\n\tif(people.length > 1) {\n\t\tf = \"xl/persons/person.xml\";\n\t\tzip_add_file(zip, f, write_people_xml(people, opts));\n\t\tct.people.push(f);\n\t\tadd_rels(opts.wbrels, -1, \"persons/person.xml\", RELS.PEOPLE);\n\t}\n\n\tzip_add_file(zip, \"[Content_Types].xml\", write_ct(ct, opts));\n\tzip_add_file(zip, '_rels/.rels', write_rels(opts.rels));\n\tzip_add_file(zip, 'xl/_rels/workbook.' + wbext + '.rels', write_rels(opts.wbrels));\n\n\tdelete opts.revssf; delete opts.ssf;\n\treturn zip;\n}\n\nfunction firstbyte(f/*:RawData*/,o/*:?TypeOpts*/)/*:Array*/ {\n\tvar x = \"\";\n\tswitch((o||{}).type || \"base64\") {\n\t\tcase 'buffer': return [f[0], f[1], f[2], f[3], f[4], f[5], f[6], f[7]];\n\t\tcase 'base64': x = Base64_decode(f.slice(0,12)); break;\n\t\tcase 'binary': x = f; break;\n\t\tcase 'array': return [f[0], f[1], f[2], f[3], f[4], f[5], f[6], f[7]];\n\t\tdefault: throw new Error(\"Unrecognized type \" + (o && o.type || \"undefined\"));\n\t}\n\treturn [x.charCodeAt(0), x.charCodeAt(1), x.charCodeAt(2), x.charCodeAt(3), x.charCodeAt(4), x.charCodeAt(5), x.charCodeAt(6), x.charCodeAt(7)];\n}\n\nfunction read_cfb(cfb/*:CFBContainer*/, opts/*:?ParseOpts*/)/*:Workbook*/ {\n\tif(CFB.find(cfb, \"EncryptedPackage\")) return parse_xlsxcfb(cfb, opts);\n\treturn parse_xlscfb(cfb, opts);\n}\n\nfunction read_zip(data/*:RawData*/, opts/*:?ParseOpts*/)/*:Workbook*/ {\n\tvar zip, d = data;\n\tvar o = opts||{};\n\tif(!o.type) o.type = (has_buf && Buffer.isBuffer(data)) ? \"buffer\" : \"base64\";\n\tzip = zip_read(d, o);\n\treturn parse_zip(zip, o);\n}\n\nfunction read_plaintext(data/*:string*/, o/*:ParseOpts*/)/*:Workbook*/ {\n\tvar i = 0;\n\tmain: while(i < data.length) switch(data.charCodeAt(i)) {\n\t\tcase 0x0A: case 0x0D: case 0x20: ++i; break;\n\t\tcase 0x3C: return parse_xlml(data.slice(i),o);\n\t\tdefault: break main;\n\t}\n\treturn PRN.to_workbook(data, o);\n}\n\nfunction read_plaintext_raw(data/*:RawData*/, o/*:ParseOpts*/)/*:Workbook*/ {\n\tvar str = \"\", bytes = firstbyte(data, o);\n\tswitch(o.type) {\n\t\tcase 'base64': str = Base64_decode(data); break;\n\t\tcase 'binary': str = data; break;\n\t\tcase 'buffer': str = data.toString('binary'); break;\n\t\tcase 'array': str = cc2str(data); break;\n\t\tdefault: throw new Error(\"Unrecognized type \" + o.type);\n\t}\n\tif(bytes[0] == 0xEF && bytes[1] == 0xBB && bytes[2] == 0xBF) str = utf8read(str);\n\to.type = \"binary\";\n\treturn read_plaintext(str, o);\n}\n\nfunction read_utf16(data/*:RawData*/, o/*:ParseOpts*/)/*:Workbook*/ {\n\tvar d = data;\n\tif(o.type == 'base64') d = Base64_decode(d);\n\td = $cptable.utils.decode(1200, d.slice(2), 'str');\n\to.type = \"binary\";\n\treturn read_plaintext(d, o);\n}\n\nfunction bstrify(data/*:string*/)/*:string*/ {\n\treturn !data.match(/[^\\x00-\\x7F]/) ? data : utf8write(data);\n}\n\nfunction read_prn(data, d, o, str) {\n\tif(str) { o.type = \"string\"; return PRN.to_workbook(data, o); }\n\treturn PRN.to_workbook(d, o);\n}\n\nfunction readSync(data/*:RawData*/, opts/*:?ParseOpts*/)/*:Workbook*/ {\n\treset_cp();\n\tvar o = opts||{};\n\tif(typeof ArrayBuffer !== 'undefined' && data instanceof ArrayBuffer) return readSync(new Uint8Array(data), (o = dup(o), o.type = \"array\", o));\n\tif(typeof Uint8Array !== 'undefined' && data instanceof Uint8Array && !o.type) o.type = typeof Deno !== \"undefined\" ? \"buffer\" : \"array\";\n\tvar d = data, n = [0,0,0,0], str = false;\n\tif(o.cellStyles) { o.cellNF = true; o.sheetStubs = true; }\n\t_ssfopts = {};\n\tif(o.dateNF) _ssfopts.dateNF = o.dateNF;\n\tif(!o.type) o.type = (has_buf && Buffer.isBuffer(data)) ? \"buffer\" : \"base64\";\n\tif(o.type == \"file\") { o.type = has_buf ? \"buffer\" : \"binary\"; d = read_binary(data); if(typeof Uint8Array !== 'undefined' && !has_buf) o.type = \"array\"; }\n\tif(o.type == \"string\") { str = true; o.type = \"binary\"; o.codepage = 65001; d = bstrify(data); }\n\tif(o.type == 'array' && typeof Uint8Array !== 'undefined' && data instanceof Uint8Array && typeof ArrayBuffer !== 'undefined') {\n\t\t// $FlowIgnore\n\t\tvar ab=new ArrayBuffer(3), vu=new Uint8Array(ab); vu.foo=\"bar\";\n\t\t// $FlowIgnore\n\t\tif(!vu.foo) {o=dup(o); o.type='array'; return readSync(ab2a(d), o);}\n\t}\n\tswitch((n = firstbyte(d, o))[0]) {\n\t\tcase 0xD0: if(n[1] === 0xCF && n[2] === 0x11 && n[3] === 0xE0 && n[4] === 0xA1 && n[5] === 0xB1 && n[6] === 0x1A && n[7] === 0xE1) return read_cfb(CFB.read(d, o), o); break;\n\t\tcase 0x09: if(n[1] <= 0x08) return parse_xlscfb(d, o); break;\n\t\tcase 0x3C: return parse_xlml(d, o);\n\t\tcase 0x49:\n\t\t\tif(n[1] === 0x49 && n[2] === 0x2a && n[3] === 0x00) throw new Error(\"TIFF Image File is not a spreadsheet\");\n\t\t\tif(n[1] === 0x44) return read_wb_ID(d, o);\n\t\t\tbreak;\n\t\tcase 0x54: if(n[1] === 0x41 && n[2] === 0x42 && n[3] === 0x4C) return DIF.to_workbook(d, o); break;\n\t\tcase 0x50: return (n[1] === 0x4B && n[2] < 0x09 && n[3] < 0x09) ? read_zip(d, o) : read_prn(data, d, o, str);\n\t\tcase 0xEF: return n[3] === 0x3C ? parse_xlml(d, o) : read_prn(data, d, o, str);\n\t\tcase 0xFF:\n\t\t\tif(n[1] === 0xFE) { return read_utf16(d, o); }\n\t\t\telse if(n[1] === 0x00 && n[2] === 0x02 && n[3] === 0x00) return WK_.to_workbook(d, o);\n\t\t\tbreak;\n\t\tcase 0x00:\n\t\t\tif(n[1] === 0x00) {\n\t\t\t\tif(n[2] >= 0x02 && n[3] === 0x00) return WK_.to_workbook(d, o);\n\t\t\t\tif(n[2] === 0x00 && (n[3] === 0x08 || n[3] === 0x09)) return WK_.to_workbook(d, o);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 0x03: case 0x83: case 0x8B: case 0x8C: return DBF.to_workbook(d, o);\n\t\tcase 0x7B: if(n[1] === 0x5C && n[2] === 0x72 && n[3] === 0x74) return RTF.to_workbook(d, o); break;\n\t\tcase 0x0A: case 0x0D: case 0x20: return read_plaintext_raw(d, o);\n\t\tcase 0x89: if(n[1] === 0x50 && n[2] === 0x4E && n[3] === 0x47) throw new Error(\"PNG Image File is not a spreadsheet\"); break;\n\t}\n\tif(DBF_SUPPORTED_VERSIONS.indexOf(n[0]) > -1 && n[2] <= 12 && n[3] <= 31) return DBF.to_workbook(d, o);\n\treturn read_prn(data, d, o, str);\n}\n\nfunction readFileSync(filename/*:string*/, opts/*:?ParseOpts*/)/*:Workbook*/ {\n\tvar o = opts||{}; o.type = 'file';\n\treturn readSync(filename, o);\n}\nfunction write_cfb_ctr(cfb/*:CFBContainer*/, o/*:WriteOpts*/)/*:any*/ {\n\tswitch(o.type) {\n\t\tcase \"base64\": case \"binary\": break;\n\t\tcase \"buffer\": case \"array\": o.type = \"\"; break;\n\t\tcase \"file\": return write_dl(o.file, CFB.write(cfb, {type:has_buf ? 'buffer' : \"\"}));\n\t\tcase \"string\": throw new Error(\"'string' output type invalid for '\" + o.bookType + \"' files\");\n\t\tdefault: throw new Error(\"Unrecognized type \" + o.type);\n\t}\n\treturn CFB.write(cfb, o);\n}\n\n/*:: declare var encrypt_agile:any; */\nfunction write_zip_type(wb/*:Workbook*/, opts/*:?WriteOpts*/)/*:any*/ {\n\tvar o = dup(opts||{});\n\tvar z = write_zip(wb, o);\n\treturn write_zip_denouement(z, o);\n}\nfunction write_zip_typeXLSX(wb/*:Workbook*/, opts/*:?WriteOpts*/)/*:any*/ {\n\tvar o = dup(opts||{});\n\tvar z = write_zip_xlsx(wb, o);\n\treturn write_zip_denouement(z, o);\n}\nfunction write_zip_denouement(z/*:any*/, o/*:?WriteOpts*/)/*:any*/ {\n\tvar oopts = {};\n\tvar ftype = has_buf ? \"nodebuffer\" : (typeof Uint8Array !== \"undefined\" ? \"array\" : \"string\");\n\tif(o.compression) oopts.compression = 'DEFLATE';\n\tif(o.password) oopts.type = ftype;\n\telse switch(o.type) {\n\t\tcase \"base64\": oopts.type = \"base64\"; break;\n\t\tcase \"binary\": oopts.type = \"string\"; break;\n\t\tcase \"string\": throw new Error(\"'string' output type invalid for '\" + o.bookType + \"' files\");\n\t\tcase \"buffer\":\n\t\tcase \"file\": oopts.type = ftype; break;\n\t\tdefault: throw new Error(\"Unrecognized type \" + o.type);\n\t}\n\tvar out = z.FullPaths ? CFB.write(z, {fileType:\"zip\", type: /*::(*/{\"nodebuffer\": \"buffer\", \"string\": \"binary\"}/*:: :any)*/[oopts.type] || oopts.type, compression: !!o.compression}) : z.generate(oopts);\n\tif(typeof Deno !== \"undefined\") {\n\t\tif(typeof out == \"string\") {\n\t\t\tif(o.type == \"binary\" || o.type == \"base64\") return out;\n\t\t\tout = new Uint8Array(s2ab(out));\n\t\t}\n\t}\n/*jshint -W083 */\n\tif(o.password && typeof encrypt_agile !== 'undefined') return write_cfb_ctr(encrypt_agile(out, o.password), o); // eslint-disable-line no-undef\n/*jshint +W083 */\n\tif(o.type === \"file\") return write_dl(o.file, out);\n\treturn o.type == \"string\" ? utf8read(/*::(*/out/*:: :any)*/) : out;\n}\n\nfunction write_cfb_type(wb/*:Workbook*/, opts/*:?WriteOpts*/)/*:any*/ {\n\tvar o = opts||{};\n\tvar cfb/*:CFBContainer*/ = write_xlscfb(wb, o);\n\treturn write_cfb_ctr(cfb, o);\n}\n\nfunction write_string_type(out/*:string*/, opts/*:WriteOpts*/, bom/*:?string*/)/*:any*/ {\n\tif(!bom) bom = \"\";\n\tvar o = bom + out;\n\tswitch(opts.type) {\n\t\tcase \"base64\": return Base64_encode(utf8write(o));\n\t\tcase \"binary\": return utf8write(o);\n\t\tcase \"string\": return out;\n\t\tcase \"file\": return write_dl(opts.file, o, 'utf8');\n\t\tcase \"buffer\": {\n\t\t\tif(has_buf) return Buffer_from(o, 'utf8');\n\t\t\telse if(typeof TextEncoder !== \"undefined\") return new TextEncoder().encode(o);\n\t\t\telse return write_string_type(o, {type:'binary'}).split(\"\").map(function(c) { return c.charCodeAt(0); });\n\t\t}\n\t}\n\tthrow new Error(\"Unrecognized type \" + opts.type);\n}\n\nfunction write_stxt_type(out/*:string*/, opts/*:WriteOpts*/)/*:any*/ {\n\tswitch(opts.type) {\n\t\tcase \"base64\": return Base64_encode(out);\n\t\tcase \"binary\": return out;\n\t\tcase \"string\": return out; /* override in sheet_to_txt */\n\t\tcase \"file\": return write_dl(opts.file, out, 'binary');\n\t\tcase \"buffer\": {\n\t\t\tif(has_buf) return Buffer_from(out, 'binary');\n\t\t\telse return out.split(\"\").map(function(c) { return c.charCodeAt(0); });\n\t\t}\n\t}\n\tthrow new Error(\"Unrecognized type \" + opts.type);\n}\n\n/* TODO: test consistency */\nfunction write_binary_type(out, opts/*:WriteOpts*/)/*:any*/ {\n\tswitch(opts.type) {\n\t\tcase \"string\":\n\t\tcase \"base64\":\n\t\tcase \"binary\":\n\t\t\tvar bstr = \"\";\n\t\t\t// $FlowIgnore\n\t\t\tfor(var i = 0; i < out.length; ++i) bstr += String.fromCharCode(out[i]);\n\t\t\treturn opts.type == 'base64' ? Base64_encode(bstr) : opts.type == 'string' ? utf8read(bstr) : bstr;\n\t\tcase \"file\": return write_dl(opts.file, out);\n\t\tcase \"buffer\": return out;\n\t\tdefault: throw new Error(\"Unrecognized type \" + opts.type);\n\t}\n}\n\nfunction writeSyncXLSX(wb/*:Workbook*/, opts/*:?WriteOpts*/) {\n\treset_cp();\n\tcheck_wb(wb);\n\tvar o = dup(opts||{});\n\tif(o.cellStyles) { o.cellNF = true; o.sheetStubs = true; }\n\tif(o.type == \"array\") { o.type = \"binary\"; var out/*:string*/ = (writeSyncXLSX(wb, o)/*:any*/); o.type = \"array\"; return s2ab(out); }\n\treturn write_zip_typeXLSX(wb, o);\n}\n\nfunction writeSync(wb/*:Workbook*/, opts/*:?WriteOpts*/) {\n\treset_cp();\n\tcheck_wb(wb);\n\tvar o = dup(opts||{});\n\tif(o.cellStyles) { o.cellNF = true; o.sheetStubs = true; }\n\tif(o.type == \"array\") { o.type = \"binary\"; var out/*:string*/ = (writeSync(wb, o)/*:any*/); o.type = \"array\"; return s2ab(out); }\n\tvar idx = 0;\n\tif(o.sheet) {\n\t\tif(typeof o.sheet == \"number\") idx = o.sheet;\n\t\telse idx = wb.SheetNames.indexOf(o.sheet);\n\t\tif(!wb.SheetNames[idx]) throw new Error(\"Sheet not found: \" + o.sheet + \" : \" + (typeof o.sheet));\n\t}\n\tswitch(o.bookType || 'xlsb') {\n\t\tcase 'xml':\n\t\tcase 'xlml': return write_string_type(write_xlml(wb, o), o);\n\t\tcase 'slk':\n\t\tcase 'sylk': return write_string_type(SYLK.from_sheet(wb.Sheets[wb.SheetNames[idx]], o), o);\n\t\tcase 'htm':\n\t\tcase 'html': return write_string_type(sheet_to_html(wb.Sheets[wb.SheetNames[idx]], o), o);\n\t\tcase 'txt': return write_stxt_type(sheet_to_txt(wb.Sheets[wb.SheetNames[idx]], o), o);\n\t\tcase 'csv': return write_string_type(sheet_to_csv(wb.Sheets[wb.SheetNames[idx]], o), o, \"\\ufeff\");\n\t\tcase 'dif': return write_string_type(DIF.from_sheet(wb.Sheets[wb.SheetNames[idx]], o), o);\n\t\tcase 'dbf': return write_binary_type(DBF.from_sheet(wb.Sheets[wb.SheetNames[idx]], o), o);\n\t\tcase 'prn': return write_string_type(PRN.from_sheet(wb.Sheets[wb.SheetNames[idx]], o), o);\n\t\tcase 'rtf': return write_string_type(RTF.from_sheet(wb.Sheets[wb.SheetNames[idx]], o), o);\n\t\tcase 'eth': return write_string_type(ETH.from_sheet(wb.Sheets[wb.SheetNames[idx]], o), o);\n\t\tcase 'fods': return write_string_type(write_ods(wb, o), o);\n\t\tcase 'wk1': return write_binary_type(WK_.sheet_to_wk1(wb.Sheets[wb.SheetNames[idx]], o), o);\n\t\tcase 'wk3': return write_binary_type(WK_.book_to_wk3(wb, o), o);\n\t\tcase 'biff2': if(!o.biff) o.biff = 2; /* falls through */\n\t\tcase 'biff3': if(!o.biff) o.biff = 3; /* falls through */\n\t\tcase 'biff4': if(!o.biff) o.biff = 4; return write_binary_type(write_biff_buf(wb, o), o);\n\t\tcase 'biff5': if(!o.biff) o.biff = 5; /* falls through */\n\t\tcase 'biff8':\n\t\tcase 'xla':\n\t\tcase 'xls': if(!o.biff) o.biff = 8; return write_cfb_type(wb, o);\n\t\tcase 'xlsx':\n\t\tcase 'xlsm':\n\t\tcase 'xlam':\n\t\tcase 'xlsb':\n\t\tcase 'numbers':\n\t\tcase 'ods': return write_zip_type(wb, o);\n\t\tdefault: throw new Error (\"Unrecognized bookType |\" + o.bookType + \"|\");\n\t}\n}\n\nfunction resolve_book_type(o/*:WriteFileOpts*/) {\n\tif(o.bookType) return;\n\tvar _BT = {\n\t\t\"xls\": \"biff8\",\n\t\t\"htm\": \"html\",\n\t\t\"slk\": \"sylk\",\n\t\t\"socialcalc\": \"eth\",\n\t\t\"Sh33tJS\": \"WTF\"\n\t};\n\tvar ext = o.file.slice(o.file.lastIndexOf(\".\")).toLowerCase();\n\tif(ext.match(/^\\.[a-z]+$/)) o.bookType = ext.slice(1);\n\to.bookType = _BT[o.bookType] || o.bookType;\n}\n\nfunction writeFileSync(wb/*:Workbook*/, filename/*:string*/, opts/*:?WriteFileOpts*/) {\n\tvar o = opts||{}; o.type = 'file';\n\to.file = filename;\n\tresolve_book_type(o);\n\treturn writeSync(wb, o);\n}\n\nfunction writeFileSyncXLSX(wb/*:Workbook*/, filename/*:string*/, opts/*:?WriteFileOpts*/) {\n\tvar o = opts||{}; o.type = 'file';\n\to.file = filename;\n\tresolve_book_type(o);\n\treturn writeSyncXLSX(wb, o);\n}\n\n\nfunction writeFileAsync(filename/*:string*/, wb/*:Workbook*/, opts/*:?WriteFileOpts*/, cb/*:?(e?:ErrnoError)=>void*/) {\n\tvar o = opts||{}; o.type = 'file';\n\to.file = filename;\n\tresolve_book_type(o);\n\to.type = 'buffer';\n\tvar _cb = cb; if(!(_cb instanceof Function)) _cb = (opts/*:any*/);\n\treturn _fs.writeFile(filename, writeSync(wb, o), _cb);\n}\n/*::\ntype MJRObject = {\n\trow: any;\n\tisempty: boolean;\n};\n*/\nfunction make_json_row(sheet/*:Worksheet*/, r/*:Range*/, R/*:number*/, cols/*:Array*/, header/*:number*/, hdr/*:Array*/, dense/*:boolean*/, o/*:Sheet2JSONOpts*/)/*:MJRObject*/ {\n\tvar rr = encode_row(R);\n\tvar defval = o.defval, raw = o.raw || !Object.prototype.hasOwnProperty.call(o, \"raw\");\n\tvar isempty = true;\n\tvar row/*:any*/ = (header === 1) ? [] : {};\n\tif(header !== 1) {\n\t\tif(Object.defineProperty) try { Object.defineProperty(row, '__rowNum__', {value:R, enumerable:false}); } catch(e) { row.__rowNum__ = R; }\n\t\telse row.__rowNum__ = R;\n\t}\n\tif(!dense || sheet[R]) for (var C = r.s.c; C <= r.e.c; ++C) {\n\t\tvar val = dense ? sheet[R][C] : sheet[cols[C] + rr];\n\t\tif(val === undefined || val.t === undefined) {\n\t\t\tif(defval === undefined) continue;\n\t\t\tif(hdr[C] != null) { row[hdr[C]] = defval; }\n\t\t\tcontinue;\n\t\t}\n\t\tvar v = val.v;\n\t\tswitch(val.t){\n\t\t\tcase 'z': if(v == null) break; continue;\n\t\t\tcase 'e': v = (v == 0 ? null : void 0); break;\n\t\t\tcase 's': case 'd': case 'b': case 'n': break;\n\t\t\tdefault: throw new Error('unrecognized type ' + val.t);\n\t\t}\n\t\tif(hdr[C] != null) {\n\t\t\tif(v == null) {\n\t\t\t\tif(val.t == \"e\" && v === null) row[hdr[C]] = null;\n\t\t\t\telse if(defval !== undefined) row[hdr[C]] = defval;\n\t\t\t\telse if(raw && v === null) row[hdr[C]] = null;\n\t\t\t\telse continue;\n\t\t\t} else {\n\t\t\t\trow[hdr[C]] = raw && (val.t !== \"n\" || (val.t === \"n\" && o.rawNumbers !== false)) ? v : format_cell(val,v,o);\n\t\t\t}\n\t\t\tif(v != null) isempty = false;\n\t\t}\n\t}\n\treturn { row: row, isempty: isempty };\n}\n\n\nfunction sheet_to_json(sheet/*:Worksheet*/, opts/*:?Sheet2JSONOpts*/) {\n\tif(sheet == null || sheet[\"!ref\"] == null) return [];\n\tvar val = {t:'n',v:0}, header = 0, offset = 1, hdr/*:Array*/ = [], v=0, vv=\"\";\n\tvar r = {s:{r:0,c:0},e:{r:0,c:0}};\n\tvar o = opts || {};\n\tvar range = o.range != null ? o.range : sheet[\"!ref\"];\n\tif(o.header === 1) header = 1;\n\telse if(o.header === \"A\") header = 2;\n\telse if(Array.isArray(o.header)) header = 3;\n\telse if(o.header == null) header = 0;\n\tswitch(typeof range) {\n\t\tcase 'string': r = safe_decode_range(range); break;\n\t\tcase 'number': r = safe_decode_range(sheet[\"!ref\"]); r.s.r = range; break;\n\t\tdefault: r = range;\n\t}\n\tif(header > 0) offset = 0;\n\tvar rr = encode_row(r.s.r);\n\tvar cols/*:Array*/ = [];\n\tvar out/*:Array*/ = [];\n\tvar outi = 0, counter = 0;\n\tvar dense = Array.isArray(sheet);\n\tvar R = r.s.r, C = 0;\n\tvar header_cnt = {};\n\tif(dense && !sheet[R]) sheet[R] = [];\n\tvar colinfo/*:Array*/ = o.skipHidden && sheet[\"!cols\"] || [];\n\tvar rowinfo/*:Array*/ = o.skipHidden && sheet[\"!rows\"] || [];\n\tfor(C = r.s.c; C <= r.e.c; ++C) {\n\t\tif(((colinfo[C]||{}).hidden)) continue;\n\t\tcols[C] = encode_col(C);\n\t\tval = dense ? sheet[R][C] : sheet[cols[C] + rr];\n\t\tswitch(header) {\n\t\t\tcase 1: hdr[C] = C - r.s.c; break;\n\t\t\tcase 2: hdr[C] = cols[C]; break;\n\t\t\tcase 3: hdr[C] = o.header[C - r.s.c]; break;\n\t\t\tdefault:\n\t\t\t\tif(val == null) val = {w: \"__EMPTY\", t: \"s\"};\n\t\t\t\tvv = v = format_cell(val, null, o);\n\t\t\t\tcounter = header_cnt[v] || 0;\n\t\t\t\tif(!counter) header_cnt[v] = 1;\n\t\t\t\telse {\n\t\t\t\t\tdo { vv = v + \"_\" + (counter++); } while(header_cnt[vv]); header_cnt[v] = counter;\n\t\t\t\t\theader_cnt[vv] = 1;\n\t\t\t\t}\n\t\t\t\thdr[C] = vv;\n\t\t}\n\t}\n\tfor (R = r.s.r + offset; R <= r.e.r; ++R) {\n\t\tif ((rowinfo[R]||{}).hidden) continue;\n\t\tvar row = make_json_row(sheet, r, R, cols, header, hdr, dense, o);\n\t\tif((row.isempty === false) || (header === 1 ? o.blankrows !== false : !!o.blankrows)) out[outi++] = row.row;\n\t}\n\tout.length = outi;\n\treturn out;\n}\n\nvar qreg = /\"/g;\nfunction make_csv_row(sheet/*:Worksheet*/, r/*:Range*/, R/*:number*/, cols/*:Array*/, fs/*:number*/, rs/*:number*/, FS/*:string*/, o/*:Sheet2CSVOpts*/)/*:?string*/ {\n\tvar isempty = true;\n\tvar row/*:Array*/ = [], txt = \"\", rr = encode_row(R);\n\tfor(var C = r.s.c; C <= r.e.c; ++C) {\n\t\tif (!cols[C]) continue;\n\t\tvar val = o.dense ? (sheet[R]||[])[C]: sheet[cols[C] + rr];\n\t\tif(val == null) txt = \"\";\n\t\telse if(val.v != null) {\n\t\t\tisempty = false;\n\t\t\ttxt = ''+(o.rawNumbers && val.t == \"n\" ? val.v : format_cell(val, null, o));\n\t\t\tfor(var i = 0, cc = 0; i !== txt.length; ++i) if((cc = txt.charCodeAt(i)) === fs || cc === rs || cc === 34 || o.forceQuotes) {txt = \"\\\"\" + txt.replace(qreg, '\"\"') + \"\\\"\"; break; }\n\t\t\tif(txt == \"ID\") txt = '\"ID\"';\n\t\t} else if(val.f != null && !val.F) {\n\t\t\tisempty = false;\n\t\t\ttxt = '=' + val.f; if(txt.indexOf(\",\") >= 0) txt = '\"' + txt.replace(qreg, '\"\"') + '\"';\n\t\t} else txt = \"\";\n\t\t/* NOTE: Excel CSV does not support array formulae */\n\t\trow.push(txt);\n\t}\n\tif(o.blankrows === false && isempty) return null;\n\treturn row.join(FS);\n}\n\nfunction sheet_to_csv(sheet/*:Worksheet*/, opts/*:?Sheet2CSVOpts*/)/*:string*/ {\n\tvar out/*:Array*/ = [];\n\tvar o = opts == null ? {} : opts;\n\tif(sheet == null || sheet[\"!ref\"] == null) return \"\";\n\tvar r = safe_decode_range(sheet[\"!ref\"]);\n\tvar FS = o.FS !== undefined ? o.FS : \",\", fs = FS.charCodeAt(0);\n\tvar RS = o.RS !== undefined ? o.RS : \"\\n\", rs = RS.charCodeAt(0);\n\tvar endregex = new RegExp((FS==\"|\" ? \"\\\\|\" : FS)+\"+$\");\n\tvar row = \"\", cols/*:Array*/ = [];\n\to.dense = Array.isArray(sheet);\n\tvar colinfo/*:Array*/ = o.skipHidden && sheet[\"!cols\"] || [];\n\tvar rowinfo/*:Array*/ = o.skipHidden && sheet[\"!rows\"] || [];\n\tfor(var C = r.s.c; C <= r.e.c; ++C) if (!((colinfo[C]||{}).hidden)) cols[C] = encode_col(C);\n\tvar w = 0;\n\tfor(var R = r.s.r; R <= r.e.r; ++R) {\n\t\tif ((rowinfo[R]||{}).hidden) continue;\n\t\trow = make_csv_row(sheet, r, R, cols, fs, rs, FS, o);\n\t\tif(row == null) { continue; }\n\t\tif(o.strip) row = row.replace(endregex,\"\");\n\t\tif(row || (o.blankrows !== false)) out.push((w++ ? RS : \"\") + row);\n\t}\n\tdelete o.dense;\n\treturn out.join(\"\");\n}\n\nfunction sheet_to_txt(sheet/*:Worksheet*/, opts/*:?Sheet2CSVOpts*/) {\n\tif(!opts) opts = {}; opts.FS = \"\\t\"; opts.RS = \"\\n\";\n\tvar s = sheet_to_csv(sheet, opts);\n\tif(typeof $cptable == 'undefined' || opts.type == 'string') return s;\n\tvar o = $cptable.utils.encode(1200, s, 'str');\n\treturn String.fromCharCode(255) + String.fromCharCode(254) + o;\n}\n\nfunction sheet_to_formulae(sheet/*:Worksheet*/)/*:Array*/ {\n\tvar y = \"\", x, val=\"\";\n\tif(sheet == null || sheet[\"!ref\"] == null) return [];\n\tvar r = safe_decode_range(sheet['!ref']), rr = \"\", cols/*:Array*/ = [], C;\n\tvar cmds/*:Array*/ = [];\n\tvar dense = Array.isArray(sheet);\n\tfor(C = r.s.c; C <= r.e.c; ++C) cols[C] = encode_col(C);\n\tfor(var R = r.s.r; R <= r.e.r; ++R) {\n\t\trr = encode_row(R);\n\t\tfor(C = r.s.c; C <= r.e.c; ++C) {\n\t\t\ty = cols[C] + rr;\n\t\t\tx = dense ? (sheet[R]||[])[C] : sheet[y];\n\t\t\tval = \"\";\n\t\t\tif(x === undefined) continue;\n\t\t\telse if(x.F != null) {\n\t\t\t\ty = x.F;\n\t\t\t\tif(!x.f) continue;\n\t\t\t\tval = x.f;\n\t\t\t\tif(y.indexOf(\":\") == -1) y = y + \":\" + y;\n\t\t\t}\n\t\t\tif(x.f != null) val = x.f;\n\t\t\telse if(x.t == 'z') continue;\n\t\t\telse if(x.t == 'n' && x.v != null) val = \"\" + x.v;\n\t\t\telse if(x.t == 'b') val = x.v ? \"TRUE\" : \"FALSE\";\n\t\t\telse if(x.w !== undefined) val = \"'\" + x.w;\n\t\t\telse if(x.v === undefined) continue;\n\t\t\telse if(x.t == 's') val = \"'\" + x.v;\n\t\t\telse val = \"\"+x.v;\n\t\t\tcmds[cmds.length] = y + \"=\" + val;\n\t\t}\n\t}\n\treturn cmds;\n}\n\nfunction sheet_add_json(_ws/*:?Worksheet*/, js/*:Array*/, opts)/*:Worksheet*/ {\n\tvar o = opts || {};\n\tvar offset = +!o.skipHeader;\n\tvar ws/*:Worksheet*/ = _ws || ({}/*:any*/);\n\tvar _R = 0, _C = 0;\n\tif(ws && o.origin != null) {\n\t\tif(typeof o.origin == 'number') _R = o.origin;\n\t\telse {\n\t\t\tvar _origin/*:CellAddress*/ = typeof o.origin == \"string\" ? decode_cell(o.origin) : o.origin;\n\t\t\t_R = _origin.r; _C = _origin.c;\n\t\t}\n\t}\n\tvar cell/*:Cell*/;\n\tvar range/*:Range*/ = ({s: {c:0, r:0}, e: {c:_C, r:_R + js.length - 1 + offset}}/*:any*/);\n\tif(ws['!ref']) {\n\t\tvar _range = safe_decode_range(ws['!ref']);\n\t\trange.e.c = Math.max(range.e.c, _range.e.c);\n\t\trange.e.r = Math.max(range.e.r, _range.e.r);\n\t\tif(_R == -1) { _R = _range.e.r + 1; range.e.r = _R + js.length - 1 + offset; }\n\t} else {\n\t\tif(_R == -1) { _R = 0; range.e.r = js.length - 1 + offset; }\n\t}\n\tvar hdr/*:Array*/ = o.header || [], C = 0;\n\n\tjs.forEach(function (JS, R/*:number*/) {\n\t\tkeys(JS).forEach(function(k) {\n\t\t\tif((C=hdr.indexOf(k)) == -1) hdr[C=hdr.length] = k;\n\t\t\tvar v = JS[k];\n\t\t\tvar t = 'z';\n\t\t\tvar z = \"\";\n\t\t\tvar ref = encode_cell({c:_C + C,r:_R + R + offset});\n\t\t\tcell = ws_get_cell_stub(ws, ref);\n\t\t\tif(v && typeof v === 'object' && !(v instanceof Date)){\n\t\t\t\tws[ref] = v;\n\t\t\t} else {\n\t\t\t\tif(typeof v == 'number') t = 'n';\n\t\t\t\telse if(typeof v == 'boolean') t = 'b';\n\t\t\t\telse if(typeof v == 'string') t = 's';\n\t\t\t\telse if(v instanceof Date) {\n\t\t\t\t\tt = 'd';\n\t\t\t\t\tif(!o.cellDates) { t = 'n'; v = datenum(v); }\n\t\t\t\t\tz = (o.dateNF || table_fmt[14]);\n\t\t\t\t}\n\t\t\t\telse if(v === null && o.nullError) { t = 'e'; v = 0; }\n\t\t\t\tif(!cell) ws[ref] = cell = ({t:t, v:v}/*:any*/);\n\t\t\t\telse {\n\t\t\t\t\tcell.t = t; cell.v = v;\n\t\t\t\t\tdelete cell.w; delete cell.R;\n\t\t\t\t\tif(z) cell.z = z;\n\t\t\t\t}\n\t\t\t\tif(z) cell.z = z;\n\t\t\t}\n\t\t});\n\t});\n\trange.e.c = Math.max(range.e.c, _C + hdr.length - 1);\n\tvar __R = encode_row(_R);\n\tif(offset) for(C = 0; C < hdr.length; ++C) ws[encode_col(C + _C) + __R] = {t:'s', v:hdr[C]};\n\tws['!ref'] = encode_range(range);\n\treturn ws;\n}\nfunction json_to_sheet(js/*:Array*/, opts)/*:Worksheet*/ { return sheet_add_json(null, js, opts); }\n\n/* get cell, creating a stub if necessary */\nfunction ws_get_cell_stub(ws/*:Worksheet*/, R, C/*:?number*/)/*:Cell*/ {\n\t/* A1 cell address */\n\tif(typeof R == \"string\") {\n\t\t/* dense */\n\t\tif(Array.isArray(ws)) {\n\t\t\tvar RC = decode_cell(R);\n\t\t\tif(!ws[RC.r]) ws[RC.r] = [];\n\t\t\treturn ws[RC.r][RC.c] || (ws[RC.r][RC.c] = {t:'z'});\n\t\t}\n\t\treturn ws[R] || (ws[R] = {t:'z'});\n\t}\n\t/* cell address object */\n\tif(typeof R != \"number\") return ws_get_cell_stub(ws, encode_cell(R));\n\t/* R and C are 0-based indices */\n\treturn ws_get_cell_stub(ws, encode_cell({r:R,c:C||0}));\n}\n\n/* find sheet index for given name / validate index */\nfunction wb_sheet_idx(wb/*:Workbook*/, sh/*:number|string*/) {\n\tif(typeof sh == \"number\") {\n\t\tif(sh >= 0 && wb.SheetNames.length > sh) return sh;\n\t\tthrow new Error(\"Cannot find sheet # \" + sh);\n\t} else if(typeof sh == \"string\") {\n\t\tvar idx = wb.SheetNames.indexOf(sh);\n\t\tif(idx > -1) return idx;\n\t\tthrow new Error(\"Cannot find sheet name |\" + sh + \"|\");\n\t} else throw new Error(\"Cannot find sheet |\" + sh + \"|\");\n}\n\n/* simple blank workbook object */\nfunction book_new()/*:Workbook*/ {\n\treturn { SheetNames: [], Sheets: {} };\n}\n\n/* add a worksheet to the end of a given workbook */\nfunction book_append_sheet(wb/*:Workbook*/, ws/*:Worksheet*/, name/*:?string*/, roll/*:?boolean*/)/*:string*/ {\n\tvar i = 1;\n\tif(!name) for(; i <= 0xFFFF; ++i, name = undefined) if(wb.SheetNames.indexOf(name = \"Sheet\" + i) == -1) break;\n\tif(!name || wb.SheetNames.length >= 0xFFFF) throw new Error(\"Too many worksheets\");\n\tif(roll && wb.SheetNames.indexOf(name) >= 0) {\n\t\tvar m = name.match(/(^.*?)(\\d+)$/);\n\t\ti = m && +m[2] || 0;\n\t\tvar root = m && m[1] || name;\n\t\tfor(++i; i <= 0xFFFF; ++i) if(wb.SheetNames.indexOf(name = root + i) == -1) break;\n\t}\n\tcheck_ws_name(name);\n\tif(wb.SheetNames.indexOf(name) >= 0) throw new Error(\"Worksheet with name |\" + name + \"| already exists!\");\n\n\twb.SheetNames.push(name);\n\twb.Sheets[name] = ws;\n\treturn name;\n}\n\n/* set sheet visibility (visible/hidden/very hidden) */\nfunction book_set_sheet_visibility(wb/*:Workbook*/, sh/*:number|string*/, vis/*:number*/) {\n\tif(!wb.Workbook) wb.Workbook = {};\n\tif(!wb.Workbook.Sheets) wb.Workbook.Sheets = [];\n\n\tvar idx = wb_sheet_idx(wb, sh);\n\t// $FlowIgnore\n\tif(!wb.Workbook.Sheets[idx]) wb.Workbook.Sheets[idx] = {};\n\n\tswitch(vis) {\n\t\tcase 0: case 1: case 2: break;\n\t\tdefault: throw new Error(\"Bad sheet visibility setting \" + vis);\n\t}\n\t// $FlowIgnore\n\twb.Workbook.Sheets[idx].Hidden = vis;\n}\n\n/* set number format */\nfunction cell_set_number_format(cell/*:Cell*/, fmt/*:string|number*/) {\n\tcell.z = fmt;\n\treturn cell;\n}\n\n/* set cell hyperlink */\nfunction cell_set_hyperlink(cell/*:Cell*/, target/*:string*/, tooltip/*:?string*/) {\n\tif(!target) {\n\t\tdelete cell.l;\n\t} else {\n\t\tcell.l = ({ Target: target }/*:Hyperlink*/);\n\t\tif(tooltip) cell.l.Tooltip = tooltip;\n\t}\n\treturn cell;\n}\nfunction cell_set_internal_link(cell/*:Cell*/, range/*:string*/, tooltip/*:?string*/) { return cell_set_hyperlink(cell, \"#\" + range, tooltip); }\n\n/* add to cell comments */\nfunction cell_add_comment(cell/*:Cell*/, text/*:string*/, author/*:?string*/) {\n\tif(!cell.c) cell.c = [];\n\tcell.c.push({t:text, a:author||\"SheetJS\"});\n}\n\n/* set array formula and flush related cells */\nfunction sheet_set_array_formula(ws/*:Worksheet*/, range, formula/*:string*/, dynamic/*:boolean*/) {\n\tvar rng = typeof range != \"string\" ? range : safe_decode_range(range);\n\tvar rngstr = typeof range == \"string\" ? range : encode_range(range);\n\tfor(var R = rng.s.r; R <= rng.e.r; ++R) for(var C = rng.s.c; C <= rng.e.c; ++C) {\n\t\tvar cell = ws_get_cell_stub(ws, R, C);\n\t\tcell.t = 'n';\n\t\tcell.F = rngstr;\n\t\tdelete cell.v;\n\t\tif(R == rng.s.r && C == rng.s.c) {\n\t\t\tcell.f = formula;\n\t\t\tif(dynamic) cell.D = true;\n\t\t}\n\t}\n\treturn ws;\n}\n\nvar utils/*:any*/ = {\n\tencode_col: encode_col,\n\tencode_row: encode_row,\n\tencode_cell: encode_cell,\n\tencode_range: encode_range,\n\tdecode_col: decode_col,\n\tdecode_row: decode_row,\n\tsplit_cell: split_cell,\n\tdecode_cell: decode_cell,\n\tdecode_range: decode_range,\n\tformat_cell: format_cell,\n\tsheet_add_aoa: sheet_add_aoa,\n\tsheet_add_json: sheet_add_json,\n\tsheet_add_dom: sheet_add_dom,\n\taoa_to_sheet: aoa_to_sheet,\n\tjson_to_sheet: json_to_sheet,\n\ttable_to_sheet: parse_dom_table,\n\ttable_to_book: table_to_book,\n\tsheet_to_csv: sheet_to_csv,\n\tsheet_to_txt: sheet_to_txt,\n\tsheet_to_json: sheet_to_json,\n\tsheet_to_html: sheet_to_html,\n\tsheet_to_formulae: sheet_to_formulae,\n\tsheet_to_row_object_array: sheet_to_json,\n\tsheet_get_cell: ws_get_cell_stub,\n\tbook_new: book_new,\n\tbook_append_sheet: book_append_sheet,\n\tbook_set_sheet_visibility: book_set_sheet_visibility,\n\tcell_set_number_format: cell_set_number_format,\n\tcell_set_hyperlink: cell_set_hyperlink,\n\tcell_set_internal_link: cell_set_internal_link,\n\tcell_add_comment: cell_add_comment,\n\tsheet_set_array_formula: sheet_set_array_formula,\n\tconsts: {\n\t\tSHEET_VISIBLE: 0,\n\t\tSHEET_HIDDEN: 1,\n\t\tSHEET_VERY_HIDDEN: 2\n\t}\n};\n\nvar _Readable;\nfunction set_readable(R) { _Readable = R; }\n\nfunction write_csv_stream(sheet/*:Worksheet*/, opts/*:?Sheet2CSVOpts*/) {\n\tvar stream = _Readable();\n\tvar o = opts == null ? {} : opts;\n\tif(sheet == null || sheet[\"!ref\"] == null) { stream.push(null); return stream; }\n\tvar r = safe_decode_range(sheet[\"!ref\"]);\n\tvar FS = o.FS !== undefined ? o.FS : \",\", fs = FS.charCodeAt(0);\n\tvar RS = o.RS !== undefined ? o.RS : \"\\n\", rs = RS.charCodeAt(0);\n\tvar endregex = new RegExp((FS==\"|\" ? \"\\\\|\" : FS)+\"+$\");\n\tvar row/*:?string*/ = \"\", cols/*:Array*/ = [];\n\to.dense = Array.isArray(sheet);\n\tvar colinfo/*:Array*/ = o.skipHidden && sheet[\"!cols\"] || [];\n\tvar rowinfo/*:Array*/ = o.skipHidden && sheet[\"!rows\"] || [];\n\tfor(var C = r.s.c; C <= r.e.c; ++C) if (!((colinfo[C]||{}).hidden)) cols[C] = encode_col(C);\n\tvar R = r.s.r;\n\tvar BOM = false, w = 0;\n\tstream._read = function() {\n\t\tif(!BOM) { BOM = true; return stream.push(\"\\uFEFF\"); }\n\t\twhile(R <= r.e.r) {\n\t\t\t++R;\n\t\t\tif ((rowinfo[R-1]||{}).hidden) continue;\n\t\t\trow = make_csv_row(sheet, r, R-1, cols, fs, rs, FS, o);\n\t\t\tif(row != null) {\n\t\t\t\tif(o.strip) row = row.replace(endregex,\"\");\n\t\t\t\tif(row || (o.blankrows !== false)) return stream.push((w++ ? RS : \"\") + row);\n\t\t\t}\n\t\t}\n\t\treturn stream.push(null);\n\t};\n\treturn stream;\n}\n\nfunction write_html_stream(ws/*:Worksheet*/, opts/*:?Sheet2HTMLOpts*/) {\n\tvar stream = _Readable();\n\n\tvar o = opts || {};\n\tvar header = o.header != null ? o.header : HTML_BEGIN;\n\tvar footer = o.footer != null ? o.footer : HTML_END;\n\tstream.push(header);\n\tvar r = decode_range(ws['!ref']);\n\to.dense = Array.isArray(ws);\n\tstream.push(make_html_preamble(ws, r, o));\n\tvar R = r.s.r;\n\tvar end = false;\n\tstream._read = function() {\n\t\tif(R > r.e.r) {\n\t\t\tif(!end) { end = true; stream.push(\"\" + footer); }\n\t\t\treturn stream.push(null);\n\t\t}\n\t\twhile(R <= r.e.r) {\n\t\t\tstream.push(make_html_row(ws, r, R, o));\n\t\t\t++R;\n\t\t\tbreak;\n\t\t}\n\t};\n\treturn stream;\n}\n\nfunction write_json_stream(sheet/*:Worksheet*/, opts/*:?Sheet2CSVOpts*/) {\n\tvar stream = _Readable({objectMode:true});\n\n\tif(sheet == null || sheet[\"!ref\"] == null) { stream.push(null); return stream; }\n\tvar val = {t:'n',v:0}, header = 0, offset = 1, hdr/*:Array*/ = [], v=0, vv=\"\";\n\tvar r = {s:{r:0,c:0},e:{r:0,c:0}};\n\tvar o = opts || {};\n\tvar range = o.range != null ? o.range : sheet[\"!ref\"];\n\tif(o.header === 1) header = 1;\n\telse if(o.header === \"A\") header = 2;\n\telse if(Array.isArray(o.header)) header = 3;\n\tswitch(typeof range) {\n\t\tcase 'string': r = safe_decode_range(range); break;\n\t\tcase 'number': r = safe_decode_range(sheet[\"!ref\"]); r.s.r = range; break;\n\t\tdefault: r = range;\n\t}\n\tif(header > 0) offset = 0;\n\tvar rr = encode_row(r.s.r);\n\tvar cols/*:Array*/ = [];\n\tvar counter = 0;\n\tvar dense = Array.isArray(sheet);\n\tvar R = r.s.r, C = 0;\n\tvar header_cnt = {};\n\tif(dense && !sheet[R]) sheet[R] = [];\n\tvar colinfo/*:Array*/ = o.skipHidden && sheet[\"!cols\"] || [];\n\tvar rowinfo/*:Array*/ = o.skipHidden && sheet[\"!rows\"] || [];\n\tfor(C = r.s.c; C <= r.e.c; ++C) {\n\t\tif(((colinfo[C]||{}).hidden)) continue;\n\t\tcols[C] = encode_col(C);\n\t\tval = dense ? sheet[R][C] : sheet[cols[C] + rr];\n\t\tswitch(header) {\n\t\t\tcase 1: hdr[C] = C - r.s.c; break;\n\t\t\tcase 2: hdr[C] = cols[C]; break;\n\t\t\tcase 3: hdr[C] = o.header[C - r.s.c]; break;\n\t\t\tdefault:\n\t\t\t\tif(val == null) val = {w: \"__EMPTY\", t: \"s\"};\n\t\t\t\tvv = v = format_cell(val, null, o);\n\t\t\t\tcounter = header_cnt[v] || 0;\n\t\t\t\tif(!counter) header_cnt[v] = 1;\n\t\t\t\telse {\n\t\t\t\t\tdo { vv = v + \"_\" + (counter++); } while(header_cnt[vv]); header_cnt[v] = counter;\n\t\t\t\t\theader_cnt[vv] = 1;\n\t\t\t\t}\n\t\t\t\thdr[C] = vv;\n\t\t}\n\t}\n\tR = r.s.r + offset;\n\tstream._read = function() {\n\t\twhile(R <= r.e.r) {\n\t\t\tif ((rowinfo[R-1]||{}).hidden) continue;\n\t\t\tvar row = make_json_row(sheet, r, R, cols, header, hdr, dense, o);\n\t\t\t++R;\n\t\t\tif((row.isempty === false) || (header === 1 ? o.blankrows !== false : !!o.blankrows)) {\n\t\t\t\tstream.push(row.row);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\treturn stream.push(null);\n\t};\n\treturn stream;\n}\n\nvar __stream = {\n\tto_json: write_json_stream,\n\tto_html: write_html_stream,\n\tto_csv: write_csv_stream,\n set_readable: set_readable\n};\nexport const version = XLSX.version;\nexport {\n\tparse_xlscfb,\n\tparse_zip,\n\treadSync as read,\n\treadFileSync as readFile,\n\treadFileSync,\n\twriteSync as write,\n\twriteFileSync as writeFile,\n\twriteFileSync,\n\twriteFileAsync,\n\twriteSyncXLSX as writeXLSX,\n\twriteFileSyncXLSX as writeFileXLSX,\n\tutils,\n\t__stream as stream,\n\tSSF,\n\tCFB\n};\n"],"sourceRoot":""}