{"version":3,"sources":["webpack:///./src/views/cotizador/escolar/tools/Input.vue?98d0","webpack:///src/views/cotizador/escolar/tools/Input.vue","webpack:///./src/views/cotizador/escolar/tools/Input.vue?35da","webpack:///./src/views/cotizador/escolar/tools/Input.vue","webpack:///./src/views/cotizador/escolar/Carga_listado_asegurados.vue?3fdd","webpack:///./node_modules/xlsx/xlsx.mjs","webpack:///src/views/cotizador/escolar/Carga_listado_asegurados.vue","webpack:///./src/views/cotizador/escolar/Carga_listado_asegurados.vue?75ca","webpack:///./src/views/cotizador/escolar/Carga_listado_asegurados.vue","webpack:///./src/views/cotizador/escolar/Carga_listado_asegurados.vue?f01e","webpack:///./src/views/cotizador/escolar/tools/Select.vue?c6f0","webpack:///src/views/cotizador/escolar/tools/Select.vue","webpack:///./src/views/cotizador/escolar/tools/Select.vue?f5bc","webpack:///./src/views/cotizador/escolar/tools/Select.vue"],"names":["render","_vm","this","_h","$createElement","_c","_self","class","divClass","labelClass","attrs","forLabel","_v","_s","label","inputClass","type","idInput","placeholder","required","disabled","domProps","value","staticRenderFns","props","String","Boolean","component","staticClass","_m","staticStyle","on","descargar","_l","archivo","i","key","name","$event","listArchivo","splice","uploadFile","cargaDocumento","backCotizaciones","sheet","sheet_name","file_name","excelToDownload","ref","modal","inicial","$set","scopedSlots","_u","fn","proxy","error","titulo","msj","XLSX","current_codepage","current_ansi","VALID_ANSI","CS2CP","0","1","2","77","128","129","130","134","136","161","162","163","177","178","186","204","222","238","255","69","set_ansi","cp","indexOf","reset_ansi","set_cp","reset_cp","utf16beread","data","o","length","fromCharCode","charCodeAt","join","$cptable","_getchar","x","_getansi","DENSE","DIF_XL","Base64_map","Base64_encode","input","c1","c2","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","len","alloc","Uint8Array","Array","new_unsafe_buf","allocUnsafe","s2a","s","split","map","s2ab","ArrayBuffer","view","a2s","isArray","c","a2u","Error","bconcat","bufs","concat","isBuffer","maxlen","set","apply","slice","call","utf8decode","content","out","widx","L","ridx","d","push","chr0","chr1","_strrev","pad0","v","t","fill","pad_","rpad_","pad0r1","Math","round","pad0r2","p2_32","pow","pad0r","SSF_isgeneral","days","months","SSF_init_table","table_fmt","3","4","9","10","11","12","13","14","15","16","17","18","19","20","21","22","37","38","39","40","45","46","47","48","49","56","SSF_default_map","5","6","7","8","23","24","25","26","27","28","29","30","31","50","51","52","53","54","55","57","58","59","60","61","62","67","68","70","71","72","73","74","75","76","78","79","80","81","82","SSF_default_str","63","64","65","66","41","42","43","44","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","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_normalize_exp","SSF_small_exp","w","toFixed","toPrecision","toExponential","SSF_large_exp","SSF_general_num","V","log","LOG10E","substr","toUpperCase","SSF_general","toString","SSF_format","SSF_write_date","fmt","val","ss0","ss","tt","outl","outstr","commaify","j","pct1","write_num_pct","sfmt","mul","write_num","write_num_cm","idx","write_num_exp","match","period","ee","fakee","$$","$1","$2","$3","frac1","write_num_f1","r","aval","sign","den","parseInt","rr","base","myn","myd","write_num_f2","dec1","closeparen","phone","hashq","str","cc","rnd","dd","dec","_frac","carry","flr","write_num_flt","ffmt","ri","ff","oa","min","max","lres","rres","write_num_cm2","write_num_pct2","write_num_exp2","write_num_int","lastIndexOf","SSF_split_fmt","in_str","SSF_abstime","fmt_is_date","eval_fmt","flen","dt","lst","hr","toLowerCase","ssm","bt","jj","nstr","myv","ostr","vv","decpt","lasti","retval","cfregex2","chkcond","thresh","parseFloat","choose_fmt","f","l","lat","m1","m2","dateNF","table","SSF_load","undefined","SSF_load_table","tbl","make_ssf","dateNFregex","dateNF_regex","RegExp","dateNF_fix","Y","forEach","n","datestr","timestr","CRC32","signed_crc_table","Int32Array","version","T0","slice_by_16_tables","subarray","TT","T1","T2","T3","T4","T5","T6","T7","T8","T9","Ta","Tb","Tc","Td","Te","Tf","crc32_bstr","bstr","seed","C","crc32_buf","crc32_str","CFB","fs","exports","namecmp","R","Z","dirname","p","filename","write_dos_date","hms","getHours","getMinutes","getSeconds","write_shift","ymd","parse_dos_date","read_shift","setMilliseconds","setFullYear","setMonth","setHours","setMinutes","setSeconds","parse_extra_field","blob","prep_blob","flags","sz","tgt","mtime","atime","ctime","mt","get_fs","parse","file","options","parse_zip","parse_mad","mver","ssz","nmfs","difat_sec_cnt","dir_start","minifat_start","difat_start","fat_addrs","mv","check_get_mver","header","check_shifts","dir_cnt","chk","sectors","sectorify","sleuth_fat","sector_list","make_sector_list","ENDOFCHAIN","files","Paths","FileIndex","FullPaths","read_directory","build_full_paths","shift","raw","HEADER_SIGNATURE","nsectors","ceil","FI","FP","pl","dad","get_mfat_entry","entry","payload","mini","start","size","MSSZ","__readInt32LE","new_buf","cnt","sector","get_sector_list","chkd","buf_chain","modulus","addr","nodes","__toBuffer","sl","k","seen","minifat_store","namelen","__utf16le","color","clsid","state","ct","read_date","storage","offset","__readUInt32LE","read_file","readFileSync","read","init_cfb","cfb","root","CLSID","seed_cfb","nm","find","rebuild_cfb","gc","_file","pop","now","fullPaths","Object","create","HEADER_CLSID","sort","elt","_write","_opts","fileType","write_mad","write_zip","mini_size","fat_size","mini_cnt","mfat_cnt","fat_base","fat_cnt","difat_cnt","HEADER_SIG","chainit","consts","DIFSECT","FATSECT","_nm","copy","path","UCFullPaths","UCPaths","UCPath","_zlib","MAXREGSECT","FREESECT","HEADER_MINOR_VERSION","MAXREGSID","NOSTREAM","EntryTypes","write_file","writeFileSync","write","use_zlib","zlib","InflateRaw","InflRaw","_processChunk","_finishFlushFlag","bytesRead","console","message","_inflateRawSync","usz","_inflate","_deflateRawSync","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_4","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","write_stored","boff","write_huff_fixed","addrs","hash","mlen","len_eb","dst_eb","off","dyn_lmap","dyn_dmap","dyn_cmap","dyn_len_1","dyn_len_2","dyn","_HLIT","_HDIST","_HCLEN","next_code","hcodes","h1","h2","inflate","outbuf","woff","OL","max_len_1","max_len_2","bits","code","dst","warn_or_throw","wrn","msg","fcnt","start_cd","csz","efsz","fcsz","EF","parse_local_file","meth","crc32","_csz","_usz","ef","cfb_add","unsafe","cdirs","method","compression","desc","fp","fi","crcs","sz_cd","namebuf","ContentTypeMap","get_content_type","ctype","ext","write_base64_76","write_quoted_printable","text","encoded","si","end","tmp","parse_quoted_printable","di","line","oi","parse_mime","fdata","fname","cte","trim","row","test","mboundary","boundary","start_di","ca","cstr","dispcnt","csl","qp","cfb_new","fpath","utils","cfb_gc","cfb_del","cfb_mov","old_name","new_name","writeFile","ReadShift","CheckField","_inflateRaw","_fs","blobify","write_dl","Deno","TextEncoder","encode","utf8write","IE_SaveFile","Blob","navigator","msSaveBlob","saveAs","URL","document","createElement","createObjectURL","url","chrome","downloads","download","revokeObjectURL","setTimeout","href","body","appendChild","click","removeChild","$","File","Folder","open","encoding","close","keys","ks","o2","prototype","hasOwnProperty","evert_key","obj","K","evert","evert_num","evert_arr","basedate","datenum","dnthresh","refdate","refoffset","numdate","setTime","good_pd_date_1","good_pd_date","good_pd","parseDate","fixdate","cc2str","arr","debomit","TextDecoder","decode","dup","JSON","stringify","fuzzynum","Number","isFinite","NaN","wt","lower_months","fuzzydate","getYear","lower","zip_add_file","zip","res","zip_new","XML_HEADER","encodings","rencoding","decregex","charegex","escapexml","escapexmltag","htmlcharegex","escapehtml","escapexlml","xlml_unfixstr","parsexmlbool","utf8reada","orig","utf8readb","ww","utf8readc","utf8corpus","utf8read","htmldecode","entities","wtregex","writetag","g","wxt_helper","writextag","write_w3cdtf","toISOString","write_vt","xlsx","XMLNS","CORE_PROPS","CUST_PROPS","EXT_PROPS","CT","RELS","TCMNT","XMLNS_main","XLMLNS","read_double_le","Infinity","write_double_le","bs","av","LN2","___toBuffer","___utf16le","__readUInt16LE","___hexlify","__hexlify","___utf8","__readUInt8","__utf8","___lpstr","__lpstr","___cpstr","__cpstr","___lpwstr","__lpwstr","___lpp4","__lpp4","___8lpp4","__8lpp4","___double","__double","is_buf","cpdoit","readUInt32LE","readDoubleLE","__readInt16LE","__readInt32BE","oI","oR","loc","oo","lens","__writeUInt32LE","__writeInt32LE","__writeUInt16LE","WriteShift","cppayload","hexstr","fld","pos","parsenoop","buf_array","blksz","newblk","curbuf","endbuf","next","_bufs","write_record","ba","XLSBRecordEnum","shift_cell_xls","cell","cRel","rRel","biff","shift_range_xls","range","encode_cell_xls","encode_cell","fix_col","fix_row","encode_range_xls","encode_row","encode_col","decode_row","rowstr","unfix_row","decode_col","colstr","unfix_col","col","split_cell","decode_cell","decode_range","encode_range","cs","ce","safe_decode_range","safe_format_cell","z","XF","numFmtId","format_cell","BErr","sheet_to_workbook","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_Int32LE","write_UInt32LE","parse_XLWideString","cchCharacters","write_XLWideString","_null","parse_StrRun","ich","ifnt","write_StrRun","run","parse_RichStr","rgsStrRun","dwSizeStrRun","write_RichStr","parse_BrtCommentText","write_BrtCommentText","parse_XLSBCell","iStyleRef","write_XLSBCell","parse_XLSBShortCell","write_XLSBShortCell","parse_XLSBCodeName","write_XLSBCodeName","parse_XLNullableWideString","write_XLNullableWideString","parse_XLNameWideString","parse_RelID","write_RelID","parse_RkNumber","fX100","fInt","RK","write_RkNumber","d100","parse_RfX","write_RfX","parse_UncheckedRfX","write_UncheckedRfX","parse_Xnum","write_Xnum","parse_BrtColor","xColorType","index","nTS","bR","bG","bB","auto","icv","XLSIcv","rgb","rgb2Hex","theme","tint","write_BrtColor","parse_FontFlags","fBold","fItalic","fUnderline","fStrikeout","fOutline","fShadow","fCondense","fExtend","write_FontFlags","font","grbit","italic","strike","outline","shadow","condense","extend","VT_I2","VT_I4","VT_BOOL","VT_UI4","VT_FILETIME","VT_BLOB","VT_CF","VT_VECTOR_VARIANT","VT_VECTOR_LPSTR","VT_STRING","DocSummaryPIDDSI","SummaryPIDSI","rgbify","_XLSIcv","ct2type","CT_LIST","workbooks","xlsm","xlsb","xlam","xltx","strs","comments","charts","dialogs","macros","metadata","styles","new_ct","rels","threadedcomments","links","coreprops","extprops","custprops","themes","calcchains","vba","drawings","people","TODO","xmlns","write_ct","type2ct","xsd","xsi","f1","bookType","f2","f3","WB","SHEET","HLINK","VML","XPATH","XMISS","XLINK","CXML","CXMLP","CMNT","SST","STY","THEME","CHART","CHARTEX","CS","WS","DS","MS","IMG","DRAW","XLMETA","PEOPLE","VBA","get_rels_path","write_rels","rid","add_rels","rId","relobj","targetmode","Id","Type","Target","TargetMode","write_manifest","manifest","write_rdf_type","tag","write_rdf_has","write_rdf","rdf","write_meta_ods","cp_doit","write_core_props","dc","dcterms","dcmitype","Props","CreatedDate","WTF","ModifiedDate","PseudoPropsPairs","write_ext_props","W","Application","vt","Worksheets","baseType","write_cust_props","pid","XLMLDocPropsMap","Title","Subject","Author","Keywords","Comments","LastAuthor","RevNumber","LastPrinted","Category","Manager","Company","AppVersion","ContentStatus","Identifier","Language","xlml_write_docprops","xlml_write_custprops","Custprops","BLACKLIST","write_FILETIME","write_TypedPropertyValue","XLSPSSkip","guess_property_type","write_PropertySet","entries","RE","PIDSI","hdr","piao","prop","pr","pio","unshift","pinfo","write_PropertySetStream","entries2","clsid2","ps0","ps1","writezeroes","parsebool","writebool","parseuint16","writeuint16","write_Bes","parse_ShortXLUnicodeString","cch","fHighByte","write_XLUnicodeRichExtendedString","xlstr","nfmts","otext","parse_XLUnicodeStringNoCch","parse_XLUnicodeString","parse_XLUnicodeString2","write_XLUnicodeString","write_HyperlinkString","write_Hyperlink","hl","hashidx","F","Pretarget","write_XLSCell","ixfe","parse_XTI","iSupBook","itabFirst","itabLast","parse_Ref8U","rwFirst","rwLast","colFirst","colLast","write_Ref8U","write_BOF","wb","write_WriteAccess","b8","write_BoundSheet8","hs","write_SST","sst","Count","Unique","parts","write_Window1","write_Window2","RTL","write_Font","b5","write_LabelSst","os","write_Label","write_Format","write_Dimensions","write_XF","ixfeP","style","write_Guts","guts","write_BoolErr","write_Number","parse_ExternSheet","parse_BIFF5ExternSheet","target","write_MergeCells","merges","write_HLink","O","write_HLinkTooltip","Tooltip","write_Country","parse_ColInfo","cellStyles","coldx","level","write_ColInfo","width","hidden","write_RRTabId","write_BIFF2NUM","write_BIFF2Cell","write_BIFF2INT","DBF","dbf_codepage_map","dbf_reverse_map","dbf_to_aoa","ft","memo","vfp","l7","nrow","fpos","rlen","current_cp","codepage","fields","field","hend","sheetRows","dbf_to_sheet","wch","dbf_to_workbook","_RLEN","sheet_to_dbf","aoa","sheet_to_json","headers","cols","hcnt","coltypes","colwidths","coldecimals","guess","_guess","hf","_f","hb","rout","_n","to_workbook","to_sheet","from_sheet","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","sylk_to_aoa_str","records","rj","formats","next_cell_format","sht","rowinfo","colinfo","cw","Mval","rstr","record","RT","C_seen_K","C_seen_X","C_seen_S","C_seen_E","formula","rc_to_a1","shrbase","shift_formula_str","F_seen","process_col","hpt","hpx","pt2px","sylk_to_sheet","aoasht","sylk_to_workbook","write_ws_cell_sylk","a1_to_rc","write_ws_cols_sylk","rec","wpx","width2px","px2char","write_ws_rows_sylk","rows","px2pt","sheet_to_sylk","preamble","RS","coord","DIF","dif_to_aoa","dif_to_aoa_str","dif_to_sheet","dif_to_workbook","sheet_to_dif","push_field","topic","push_value","ETH","eth_to_aoa","eth_to_sheet","eth_to_workbook","sep","meta","sheet_to_eth_data","sheet_to_eth","PRN","set_text_arr","prn_to_aoa_str","lines","guess_seps","guess_sep_weights","guess_sep","instr","dsv_to_sheet_str","FS","sepcc","startcc","_re","finish_cell","fuzzyfmla","cellText","cellNF","outer","prn_to_sheet_str","prn_to_sheet","bytes","firstbyte","prn_to_workbook","sheet_to_prn","WK_","lotushopper","cb","Enum","WK1Enum","lotus_to_workbook","lotus_to_workbook_buf","next_n","sidx","snames","realnames","refguess","vers","qpro","tmpcell","WK3Enum","osheets","rnames","sheet_to_wk1","write_biff_rec","write_BOF_WK1","write_RANGE","max_R","write_INTEGER","write_NUMBER","write_LABEL","book_to_wk3","write_BOF_WK3","write_XFORMAT_SHEETNAME","wsidx","write_NUMBER_17","write_LABEL_16","wscnt","parse_RANGE","parse_cell","parse_LABEL","parse_INTEGER","parse_NUMBER","parse_FORMULA","wk1_fmla_to_csf","wk1_parse_rc","rel","FuncTab","BinOpTab","argc","argL","argR","args","parse_cell_3","parse_LABEL_16","parse_NUMBER_18","parse_NUMBER_17","v1","v2","log2","parse_FORMULA_19","parse_NUMBER_25","parse_NUMBER_27","parse_FORMULA_28","parse_SHEETNAMECS","parse_SHEETNAMELP","parse_SHEETINFOQP","id","parse_XFORMAT","straywsregex","write_sst_xml","bookSST","count","uniqueCount","sitag","parse_BrtBeginSst","write_BrtBeginSst","write_BrtSSTItem","write_sst_bin","_JS2ANSI","crypto_CreatePasswordVerifier_Method1","Password","PasswordArray","PasswordByte","Intermediate1","Intermediate2","Intermediate3","Verifier","PasswordDecoded","RTF","rtf_to_sheet","rtf_to_sheet_str","rowtf","rtfre","last_index","exec","lastIndex","rtf_to_workbook","sheet_to_rtf","DEF_MDW","MDW","px","char2width","chr","coll","customWidth","DEF_PPI","PPI","pt","write_numFmts","NF","formatCode","write_cellXfs","cellXfs","write_sty_xml","SSF","parse_BrtFmt","stFmtCode","write_BrtFmt","parse_BrtFont","bls","bold","vertAlign","underline","family","bCharSet","charset","scheme","write_BrtFont","sss","rev_XLSBFillPTNames","XLSBFillPTNames","parse_BrtFill","write_BrtFill","fls","patternType","parse_BrtXF","ixfeParent","ifmt","write_BrtXF","flow","write_Blxf","parse_BrtBorder","write_BrtBorder","border","write_BrtStyle","xfId","builtinId","write_BrtBeginTableStyles","defTableStyle","defPivotStyle","write_FMTS_bin","write_FONTS_bin","write_FILLS_bin","write_BORDERS_bin","write_CELLSTYLEXFS_bin","fontId","fillId","borderId","write_CELLXFS_bin","write_STYLES_bin","write_DXFS_bin","write_TABLESTYLES_bin","write_COLORPALETTE_bin","write_sty_bin","write_theme","Themes","themeXLSX","parse_BrtMdtinfo","write_BrtMdtinfo","parse_BrtMdb","write_BrtMdb","mdb","write_BrtBeginEsfmd","parse_BrtBeginEsmdb","write_BrtBeginEsmdb","cm","write_xlmeta_bin","write_xlmeta_xml","parse_BrtCalcChainItem$","_shapeid","write_comments_vml","csize","bbox","joinstyle","gradientshapeok","coordsize","fillopts","angle","fillparm","fillxml","shadata","fillcolor","strokecolor","write_comments_xml","iauthor","ID","lastauthor","ts","write_tcmnt_xml","carr","rootid","tcopts","tcid","parentId","personId","write_people_xml","person","displayName","userId","providerId","parse_BrtBeginComment","rfx","write_BrtBeginComment","parse_BrtCommentAuthor","write_BrtCommentAuthor","write_comments_bin","comment","fill_vba_xls","newpath","VBAFMTS","rcregex","rcbase","rcfunc","fstr","crefregex","$0","$4","$5","delta","parseread1","parse_ColRelU","parse_RgceArea","parse_RgceArea_BIFF2","parse_RgceAreaRel","parse_RgceLoc","parse_RgceLoc_BIFF2","parse_RgceElfLoc","fQuoted","parse_RgceLocRel","parse_RgceLocRel_BIFF2","cl","rl","parse_PtgArea","area","parse_PtgArea3d","ixti","parse_PtgAreaErr","parse_PtgAreaErr3d","parse_PtgAreaN","parse_PtgArray","parse_PtgAttrBaxcel","bitSemi","bitBaxcel","parse_PtgAttrChoose","parse_PtgAttrGoto","bitGoto","parse_PtgAttrIf","bitIf","parse_PtgAttrIfError","parse_PtgAttrSemi","parse_PtgAttrSpaceType","parse_PtgAttrSpace","parse_PtgAttrSpaceSemi","parse_PtgRef","parse_PtgRefN","parse_PtgRef3d","parse_PtgFunc","iftab","FtabArgc","Ftab","parse_PtgFuncVar","cparams","tab","parsetab","Cetab","parse_PtgAttrSum","parse_PtgExp","parse_PtgErr","parse_PtgInt","parse_PtgBool","parse_PtgNum","parse_PtgStr","parse_SerAr","parse_PtgExtraMem","cce","parse_PtgExtraArray","parse_PtgName","nameindex","parse_PtgNameX","parse_PtgNameX_BIFF5","parse_PtgMemArea","parse_PtgMemFunc","parse_PtgRefErr","parse_PtgRefErr3d","parse_PtgMemErr","parse_PtgMemNoMem","parse_PtgTbl","parse_PtgElfLoc","parse_PtgElfNoop","parse_PtgElfCol","parse_PtgElfColS","parse_PtgElfColSV","parse_PtgElfColV","parse_PtgElfLel","parse_PtgElfRadical","parse_PtgElfRadicalLel","parse_PtgElfRadicalS","parse_PtgElfRw","parse_PtgElfRwV","PtgListRT","parse_PtgList","rt","coltype","parse_PtgSxName","parse_PtgSheet","parse_PtgEndSheet","parse_PtgMemAreaN","parse_PtgMemNoMemN","parse_PtgAttrNoop","PtgTypes","PtgDupes","Ptg18","Ptg19","parse_RgbExtra","rgce","parse_Rgce","ptgs","stringify_array","PtgBinOp","PtgAdd","PtgConcat","PtgDiv","PtgEq","PtgGe","PtgGt","PtgLe","PtgLt","PtgMul","PtgNe","PtgPower","PtgSub","formula_quote_sheet_name","sname","get_ixti_raw","supbooks","XTI","SID","Name","get_ixti","ixtiraw","stringify_formula","stack","nameidx","last_sp","sp","fflen","func","lbl","names","xlfn","externbook","bookidx","itab","ixtidata","lp","rp","sharedf","parsedf","fnd","arrayf","PtgNonDisp","_left","write_FormulaValue","write_Formula","o1","o3","bf","parse_XLSBParsedFormula","rgcb","parse_XLSBArrayParsedFormula","parse_XLSBCellParsedFormula","parse_XLSBNameParsedFormula","parse_XLSBSharedParsedFormula","32","34","35","36","83","84","85","86","87","88","89","90","91","92","93","94","95","96","97","98","99","100","101","102","103","104","105","106","107","108","109","110","111","112","113","114","115","116","117","118","119","120","121","122","124","125","126","127","131","132","133","135","137","138","139","140","142","143","144","145","146","147","148","149","150","151","152","153","155","159","164","166","167","168","169","170","171","172","173","174","175","185","187","188","189","190","191","192","193","194","195","196","197","198","199","200","201","202","203","206","207","208","209","210","211","212","213","214","215","216","217","218","219","220","223","224","225","226","227","228","229","240","243","249","250","251","252","253","254","256","259","260","265","266","267","268","269","272","273","274","276","277","278","279","280","281","282","283","284","285","288","289","290","291","292","293","295","296","297","298","302","305","306","307","308","309","310","311","312","313","314","315","316","318","319","320","321","322","323","324","325","328","330","336","338","339","342","343","344","350","352","354","355","356","370","373","374","375","376","377","378","379","380","381","382","383","384","385","386","388","390","391","392","393","394","395","396","397","398","399","400","412","413","414","415","416","417","420","421","422","423","424","425","430","431","432","433","434","435","436","437","438","439","440","441","442","443","444","445","446","447","448","449","450","451","452","453","454","455","456","458","459","460","461","462","463","464","465","466","467","468","469","470","471","472","473","474","475","476","477","478","480","481","482","485","489","491","493","494","495","509","510","511","517","518","519","520","521","522","523","545","546","547","548","549","620","621","647","653","667","673","753","755","808","33","123","141","154","156","157","158","160","165","176","179","180","181","182","183","184","205","221","230","231","232","233","234","235","236","237","239","241","242","244","245","246","247","248","257","258","261","262","263","264","270","271","275","286","287","294","299","300","301","303","304","317","326","327","329","331","332","334","335","337","340","341","345","346","347","348","349","351","353","357","358","359","360","361","362","363","364","365","366","367","368","369","371","372","387","389","401","402","403","404","405","406","407","408","409","410","411","418","419","426","427","428","429","457","724","479","483","484","65535","csf_to_ods_formula","csf_to_ods_3D","browser_has_Map","Map","get_sst_id","has","revarr","get","col_obj_w","outlineLevel","default_margins","margins","mode","defs","left","right","top","bottom","footer","get_cell_style","revssf","ssf","applyNumberFormat","check_ws","write_ws_xml_merges","write_ws_xml_sheetpr","needed","vbaraw","cname","Workbook","CodeName","codeName","outlineprops","summaryBelow","summaryRight","above","sheetprot_deffalse","sheetprot_deftrue","write_ws_xml_protection","password","write_ws_xml_margins","margin","write_ws_xml_cols","write_ws_xml_autofilter","Names","Sheet","Ref","write_ws_xml_sheetviews","sview","workbookViewId","Views","rightToLeft","write_ws_xml_cell","oldt","oldv","Strings","revStrings","write_ws_xml_data","params","height","_cell","ht","customHeight","write_ws_xml","rdata","_drawing","sheetFormat","defaultRowHeight","baseColWidth","outlineLevelRow","relc","location","tooltip","ignoreEC","numberStoredAsText","sqref","parse_BrtRowHdr","miyRw","write_BrtRowHdr","ncolspan","lcs","caddr","first","last","write_row_header","parse_BrtWsDim","write_BrtWsDim","parse_BrtWsFmtInfo","parse_BrtWsProp","write_BrtWsProp","parse_BrtCellBlank","write_BrtCellBlank","ncell","parse_BrtShortBlank","write_BrtShortBlank","parse_BrtCellBool","fBool","write_BrtCellBool","parse_BrtShortBool","write_BrtShortBool","parse_BrtCellError","bError","write_BrtCellError","parse_BrtShortError","write_BrtShortError","parse_BrtCellIsst","isst","write_BrtCellIsst","parse_BrtShortIsst","write_BrtShortIsst","parse_BrtCellReal","write_BrtCellReal","parse_BrtShortReal","write_BrtShortReal","parse_BrtCellRk","write_BrtCellRk","parse_BrtShortRk","write_BrtShortRk","parse_BrtCellRString","parse_BrtCellSt","write_BrtCellSt","parse_BrtShortSt","write_BrtShortSt","parse_BrtFmlaBool","cellFormula","parse_BrtFmlaError","parse_BrtFmlaNum","parse_BrtFmlaString","parse_BrtMergeCell","write_BrtMergeCell","write_BrtBeginMergeCells","parse_BrtHLink","relId","display","write_BrtHLink","locidx","parse_BrtPane","parse_BrtArrFmla","fAlwaysCalc","parse_BrtShrFmla","write_BrtColInfo","BrtMarginKeys","parse_BrtMargins","write_BrtMargins","parse_BrtBeginWsView","write_BrtBeginWsView","write_BrtCellIgnoreEC","write_BrtSheetProtection","parse_BrtDVal","parse_BrtDVal14","write_ws_bin_cell","last_seen","write_CELLTABLE","cap","write_MERGECELLS","write_COLINFOS","write_IGNOREECS","write_HLINKS","write_LEGACYDRAWING","write_AUTOFILTER","write_WSVIEWS2","write_WSFMTINFO","write_SHEETPROTECT","write_ws_bin","parse_BrtCsProp","WBPropsDef","safe1904","WBProps","badchars","check_ws_name","safe","_good","check_wb_names","N","codes","cn","check_wb","write_wb_xml","write_names","workbookPr","Hidden","sheetId","Comment","localSheetId","parse_BrtBundleSh","iTabID","strRelID","write_BrtBundleSh","parse_BrtWbProp","defaultThemeVersion","strName","autoCompressPictures","backupFile","checkCompatibility","filterPrivacy","hidePivotFieldList","promptedSolutions","publishItems","refreshAllConnections","saveExternalLinkValues","showBorderUnselectedTables","showInkAnnotation","showObjects","showPivotChartFilter","updateLinks","write_BrtWbProp","parse_BrtName","Ptg","write_BUNDLESHS","viz","write_BrtFileVersion","write_BrtBookView","write_BOOKVIEWS","vistab","write_wb_bin","write_wb","write_ws","write_sty","write_sst","write_cmnt","write_xlmeta","write_props_xlml","write_wb_xlml","write_sty_xlml","xf","write_name_xlml","write_names_xlml","write_ws_xlml_names","write_ws_xlml_wsopts","objects","scenarios","selectLockedCells","selectUnlockedCells","write_ws_xlml_comment","write_ws_xlml_cell","attr","marr","mi","write_ws_xlml_row","write_ws_xlml_table","skip","write_ws_xlml","write_xlml","html","PSCLSID","SI","DSI","UDI","write_xls_props","Keys","DSEntries","SEntries","CEntries","DocSummaryRE","SummaryRE","CEntries2","write_xlscfb","wbpath","write_biff_buf","write_biff_continue","write_BIFF2BERR","write_BIFF2LABEL","write_ws_biff2_cell","write_ws_biff2","write_biff2_buf","write_FONTS_biff8","write_FMTS_biff8","write_FEAT","write_CELLXFS_biff8","write_ws_biff8_hlinks","HL","write_ws_cols_biff8","write_ws_biff8_cell","write_ws_biff8","_WB","_sheet","MAX_ROWS","write_biff8_global","_sheets","_wb","blen","write_biff8_buf","fix_write_opts","make_html_row","rowspan","colspan","editable","HTML_BEGIN","HTML_END","make_html_preamble","sheet_to_html","sheet_add_dom","or_R","or_C","getElementsByTagName","midx","is_dom_element_hidden","elts","hasAttribute","getAttribute","innerHTML","_t","Aelts","Aelti","parse_dom_table","table_to_book","element","get_computed_style","get_get_computed_style_function","getPropertyValue","ownerDocument","defaultView","getComputedStyle","write_styles_ods","master_styles","write_content_ods","write_text_p","null_cell_xml","covered_cell_xml","ods","ROWS","textp","_Fref","text_p","_tgt","write_automatic_styles_ods","cidx","colobj","fods","write_ods","u8_to_dataview","array","DataView","buffer","byteOffset","byteLength","stru8","u8contains","search","u8concat","u8a","reduce","acc","u8","writeDecimal128LE","exp","mantissa","parse_varint49","ptr","varint","write_varint49","varint_to_i32","i32","parse_shallow","num","write_shallow","proto","item","parse_iwa_file","_a","ai","messages","fl","merge","write_iwa_file","ias","ia","midata","aipayload","mid","parse_snappy_chunk","chunks","decompress_iwa_file","compress_iwa_file","frame","write_new_storage","dv","setFloat64","setUint32","write_old_storage","parse_TSP_Reference","pb","write_tile_row","tri","_b","_d","wide_offsets","last_offset","cell_storage","_dv","_last_offset","_cell_storage","celload","_celload","setUint16","write_numbers_iwa","numbers","trunc","dependents","indices","old_content","raw1","x2","packet2","deps","y2","indices_varint","filter","ivi","some","mess","docroot","xi","packet","sheetrootref","cruidsref","oldbucket","_x","cruids","uuid","store","row_headers","row_header_ref","base_bucket","_bucket","col_header_ref","sstref","sstroot","sentry","sx","sxi","sstdata","newsst","sy","raw32","tile","tl","tileref","tileroot","tentry","tx","tiledata","rowload","R2","tilerow","ty","raw3","fix_opts_func","defaults","write_zip_xlsxb","write_zip_xlsx","wbrels","foo","wbext","vbafmt","_sn","_i","wsrels","_type","need_vml","cf","rId1","needtc","write_cfb_ctr","write_zip_type","write_zip_denouement","oopts","ftype","generate","encrypt_agile","write_cfb_type","write_string_type","bom","write_stxt_type","write_binary_type","writeSync","sheet_to_txt","sheet_to_csv","resolve_book_type","_BT","make_json_row","defval","isempty","defineProperty","enumerable","__rowNum__","rawNumbers","outi","counter","header_cnt","skipHidden","blankrows","qreg","make_csv_row","rs","txt","forceQuotes","endregex","strip","sheet_to_formulae","cmds","sheet_add_json","js","skipHeader","JS","ws_get_cell_stub","json_to_sheet","RC","wb_sheet_idx","sh","book_new","book_append_sheet","roll","book_set_sheet_visibility","vis","cell_set_number_format","cell_set_hyperlink","cell_set_internal_link","cell_add_comment","author","sheet_set_array_formula","dynamic","rng","rngstr","table_to_sheet","sheet_to_row_object_array","sheet_get_cell","SHEET_VISIBLE","SHEET_HIDDEN","SHEET_VERY_HIDDEN","components","Input","Select","dowloadeExcel","Archivo","routeCot","routeVersion","idCarga","methods","cargarLayout","$router","event","modalError","convertBase64","mounted","$route","query","cot","carga","selectClass","idSelect","valueDefault","optionDefault","items","_e","nameSelect","valueModel"],"mappings":"kHAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACE,MAAMN,EAAIO,UAAU,CAACH,EAAG,QAAQ,CAACE,MAAMN,EAAIQ,WAAWC,MAAM,CAAC,IAAMT,EAAIU,WAAW,CAACV,EAAIW,GAAGX,EAAIY,GAAGZ,EAAIa,UAAUT,EAAG,QAAQ,CAACE,MAAMN,EAAIc,WAAWL,MAAM,CAAC,KAAOT,EAAIe,KAAK,GAAKf,EAAIgB,QAAQ,YAAchB,EAAIiB,YAAY,SAAWjB,EAAIkB,SAAS,SAAWlB,EAAImB,UAAUC,SAAS,CAAC,MAAQpB,EAAIqB,YACnYC,EAAkB,GCctB,GACEC,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AG+kF,EAAKtkF,UAAUrB,EAAIgyF,SAAQ,MAC9kB1wF,EAAkB,GCctB,GACEC,MAAO,CACLhB,SAAUiB,OACVd,SAAUc,OACVhB,WAAYgB,OACZX,MAAOW,OACPywF,WAAYzwF,OACZowF,SAAUpwF,OACVmwF,YAAanwF,OACbN,SAAUO,QACVN,SAAUM,QACVywF,WAAY1wF,OACZqwF,aAAcrwF,OACdswF,cAAetwF,OACfuwF,MAAO3pF,QC7BkX,I,YCOzX1G,EAAY,eACd,EACA3B,EACAuB,GACA,EACA,KACA,KACA,MAIa,OAAAI,E","file":"js/chunk-38f330b6.c9884fc6.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{class:_vm.divClass},[_c('label',{class:_vm.labelClass,attrs:{\"for\":_vm.forLabel}},[_vm._v(_vm._s(_vm.label))]),_c('input',{class:_vm.inputClass,attrs:{\"type\":_vm.type,\"id\":_vm.idInput,\"placeholder\":_vm.placeholder,\"required\":_vm.required,\"disabled\":_vm.disabled},domProps:{\"value\":_vm.value}})])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n\r\n","import mod from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Input.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Input.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Input.vue?vue&type=template&id=7cecfbee&\"\nimport script from \"./Input.vue?vue&type=script&lang=js&\"\nexport * from \"./Input.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col-md-12\"},[_c('div',{staticClass:\"card p-5\"},[_c('div',{staticClass:\"row\"},[_vm._m(0),_c('div',{staticClass:\"col-md-2\"},[_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col-sm-2 col-md-6\"},[_c('button',{staticClass:\"btn btn-outline-link\",staticStyle:{\"border-radius\":\"80px\",\"height\":\"76px\",\"border-color\":\"rgb(197, 194, 194)\"},attrs:{\"type\":\"button\"},on:{\"click\":_vm.descargar}},[_c('img',{staticClass:\"mr-2\",staticStyle:{\"height\":\"40px\"},attrs:{\"src\":\"img/cotizador_APE/Descargar LAyout.png\",\"alt\":\"\"}})])]),_vm._m(1)])])]),_vm._m(2),_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col-md-6\"},[_c('table',{staticClass:\"table table-borderless\"},[_c('tbody',_vm._l((_vm.listArchivo),function(archivo,i){return _c('tr',{key:i},[_c('td',[_vm._v(_vm._s(archivo.name))]),_c('td',[_c('button',{staticClass:\"btn btn-link\",attrs:{\"type\":\"button\"},on:{\"click\":function($event){return _vm.listArchivo.splice(i,1)}}},[_c('i',{staticClass:\"fas fa-trash-alt float-left\"})])])])}),0)])])]),_c('div',{staticClass:\"row\"},[_vm._m(3),_c('div',{staticClass:\"col-md-6\"},[_c('button',{staticClass:\"btn btn-info float-right ml-2 col-md-4 mb-1\",staticStyle:{\"border-radius\":\"15px\"},attrs:{\"type\":\"button\"},on:{\"click\":_vm.uploadFile}},[_vm._v(\" Cargar layout \")]),_c('span',{staticClass:\"btn btn-primary btn-file float-right col-md-4\",staticStyle:{\"border-radius\":\"15px\"}},[_vm._v(\" Seleccionar archivo \"),_c('input',{attrs:{\"type\":\"file\",\"accept\":\".xlsx\"},on:{\"change\":function($event){return _vm.cargaDocumento($event)}}})]),_c('button',{staticClass:\"btn btn-outline-primary float-right mr-2 col-md-3 mb-1\",staticStyle:{\"border-radius\":\"15px\"},attrs:{\"type\":\"button\"},on:{\"click\":_vm.backCotizaciones}},[_vm._v(\" Regresar \")])])])])])]),_c('download-excel',{staticClass:\"d-none\",attrs:{\"worksheet\":_vm.sheet.sheet_name,\"name\":_vm.sheet.file_name,\"data\":_vm.excelToDownload,\"type\":\"xlsx\"}},[_c('span',{attrs:{\"id\":\"excelDownload\"}},[_vm._v(\"Archivo listo\")])]),_c('div',[_c('CModal',{ref:\"my-modal\",attrs:{\"show\":_vm.modal.inicial,\"close-on-backdrop\":false},on:{\"update:show\":function($event){return _vm.$set(_vm.modal, \"inicial\", $event)}},scopedSlots:_vm._u([{key:\"header-wrapper\",fn:function(){return [_c('div',{staticClass:\"text-center\"},[_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col-10\"}),_c('div',{staticClass:\"col-1 mt-2\"},[_c('button',{staticClass:\"btn-close ml-4\",attrs:{\"type\":\"button\",\"aria-label\":\"Close\"},on:{\"click\":function($event){_vm.modal.inicial = false}}})])])])]},proxy:true},{key:\"footer-wrapper\",fn:function(){return [_c('span')]},proxy:true}])},[_c('div',{staticClass:\"card-body text-center\"},[_c('h3',{staticClass:\"text-center mb-4\",staticStyle:{\"color\":\"rgb(112, 107, 107)\",\"font-weight\":\"bold\"}},[_vm._v(\"¡Bienvenido!\")]),_c('p',{staticClass:\"mb-4\"},[_vm._v(\" En caso de realizar la carga y/o listado de tus Asegurados por primera vez, deberás descargar el Layout. \")]),_c('p',[_vm._v(\" O si ya cuentas con el archivo puedes cerrar este aviso e iniciar con el proceso. \")]),_c('button',{staticClass:\"btn btn-info border col-7 mt-3\",on:{\"click\":_vm.descargar}},[_vm._v(\"Descargar layout\")])])])],1),_c('div',[_c('CModal',{ref:\"my-modal\",attrs:{\"show\":_vm.modal.error,\"close-on-backdrop\":false},on:{\"update:show\":function($event){return _vm.$set(_vm.modal, \"error\", $event)}},scopedSlots:_vm._u([{key:\"header-wrapper\",fn:function(){return [_c('div',{staticClass:\"text-center\"},[_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col-10\"}),_c('div',{staticClass:\"col-1 mt-2\"},[_c('button',{staticClass:\"btn-close ml-4\",attrs:{\"type\":\"button\",\"aria-label\":\"Close\"},on:{\"click\":function($event){_vm.modal.error = false}}})])])])]},proxy:true},{key:\"footer-wrapper\",fn:function(){return [_c('span')]},proxy:true}])},[_c('div',{staticClass:\"card-body text-center\"},[_c('img',{staticStyle:{\"height\":\"80px\"},attrs:{\"src\":\"img/cotizador_APE/Tache.png\",\"alt\":\"\"}}),_c('h3',{staticClass:\"text-center mb-4 mt-3\",staticStyle:{\"color\":\"rgb(112, 107, 107)\",\"font-weight\":\"bold\"}},[_vm._v(_vm._s(_vm.titulo))]),_c('h5',{staticClass:\"mb-4\"},[_vm._v(\" \"+_vm._s(_vm.msj)+\" \")])])])],1)],1)}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"col-md-10\"},[_c('h3',{staticClass:\"title\"},[_vm._v(\"Carga y listado de Asegurados\")]),_c('p',{staticClass:\"mt-3\",staticStyle:{\"color\":\"red\"}},[_c('b',[_vm._v(\"Importante:\")]),_vm._v(\" Antes de realizar la carga, verifica que tu archivo venga todo en mayúsculas, sin acentos ni caracteres especiales\")])])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"col-sm-3 col-md-6 mt-4\"},[_c('p',{staticStyle:{\"font-size\":\"10px\"}},[_vm._v(\"DESCARGAR\"),_c('br'),_vm._v(\"LAYOUT\")])])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col-md-12\"},[_c('hr')])])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"col-md-6\"},[_c('p',[_vm._v(\"Da clic en el botón para cargar el listado con la información de tus asegurados.\")])])}]\n\nexport { render, staticRenderFns }","/*! xlsx.js (C) 2013-present SheetJS -- 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","\r\n\r\n\r\n\r\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Carga_listado_asegurados.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Carga_listado_asegurados.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Carga_listado_asegurados.vue?vue&type=template&id=37663d4c&\"\nimport script from \"./Carga_listado_asegurados.vue?vue&type=script&lang=js&\"\nexport * from \"./Carga_listado_asegurados.vue?vue&type=script&lang=js&\"\nimport style0 from \"./Carga_listado_asegurados.vue?vue&type=style&index=0&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","import mod from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Carga_listado_asegurados.vue?vue&type=style&index=0&lang=css&\"; export default mod; export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Carga_listado_asegurados.vue?vue&type=style&index=0&lang=css&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{class:_vm.divClass},[_c('label',{class:_vm.labelClass,attrs:{\"for\":_vm.forLabel}},[_vm._v(_vm._s(_vm.label))]),_c('select',{class:_vm.selectClass,attrs:{\"id\":_vm.idSelect,\"disabled\":_vm.disabled,\"required\":_vm.required}},[_c('option',{attrs:{\"disabled\":\"\"},domProps:{\"value\":_vm.valueDefault}},[_vm._v(_vm._s(_vm.optionDefault))]),_vm._l((_vm.items),function(item,i){return (_vm.items.length > 0)?_c('option',{key:i,domProps:{\"value\":item.name}},[_vm._v(_vm._s(item.value))]):_vm._e()})],2)])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n\r\n","import mod from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Select.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Select.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Select.vue?vue&type=template&id=54da5c55&\"\nimport script from \"./Select.vue?vue&type=script&lang=js&\"\nexport * from \"./Select.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""}