pako.min.js 81 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439
  1. /*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */ ! function(t, e) {
  2. "object" == typeof exports && "undefined" != typeof module ? e(exports) : "function" == typeof define && define.amd ? define(["exports"], e) : e((t = "undefined" != typeof globalThis ? globalThis : t || self).pako = {})
  3. }(this, (function(t) {
  4. "use strict";
  5. function e(t) {
  6. let e = t.length;
  7. for (; --e >= 0;) t[e] = 0
  8. }
  9. const a = 256,
  10. i = 286,
  11. n = 30,
  12. s = 15,
  13. r = new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0]),
  14. o = new Uint8Array([0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13]),
  15. l = new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7]),
  16. h = new Uint8Array([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]),
  17. d = new Array(576);
  18. e(d);
  19. const _ = new Array(60);
  20. e(_);
  21. const f = new Array(512);
  22. e(f);
  23. const c = new Array(256);
  24. e(c);
  25. const u = new Array(29);
  26. e(u);
  27. const w = new Array(n);
  28. function m(t, e, a, i, n) {
  29. this.static_tree = t, this.extra_bits = e, this.extra_base = a, this.elems = i, this.max_length = n, this.has_stree = t && t.length
  30. }
  31. let b, g, p;
  32. function k(t, e) {
  33. this.dyn_tree = t, this.max_code = 0, this.stat_desc = e
  34. }
  35. e(w);
  36. const v = t => t < 256 ? f[t] : f[256 + (t >>> 7)],
  37. y = (t, e) => {
  38. t.pending_buf[t.pending++] = 255 & e, t.pending_buf[t.pending++] = e >>> 8 & 255
  39. },
  40. x = (t, e, a) => {
  41. t.bi_valid > 16 - a ? (t.bi_buf |= e << t.bi_valid & 65535, y(t, t.bi_buf), t.bi_buf = e >> 16 - t.bi_valid, t.bi_valid += a - 16) : (t.bi_buf |= e << t.bi_valid & 65535, t.bi_valid += a)
  42. },
  43. z = (t, e, a) => {
  44. x(t, a[2 * e], a[2 * e + 1])
  45. },
  46. A = (t, e) => {
  47. let a = 0;
  48. do {
  49. a |= 1 & t, t >>>= 1, a <<= 1
  50. } while (--e > 0);
  51. return a >>> 1
  52. },
  53. E = (t, e, a) => {
  54. const i = new Array(16);
  55. let n, r, o = 0;
  56. for (n = 1; n <= s; n++) o = o + a[n - 1] << 1, i[n] = o;
  57. for (r = 0; r <= e; r++) {
  58. let e = t[2 * r + 1];
  59. 0 !== e && (t[2 * r] = A(i[e]++, e))
  60. }
  61. },
  62. R = t => {
  63. let e;
  64. for (e = 0; e < i; e++) t.dyn_ltree[2 * e] = 0;
  65. for (e = 0; e < n; e++) t.dyn_dtree[2 * e] = 0;
  66. for (e = 0; e < 19; e++) t.bl_tree[2 * e] = 0;
  67. t.dyn_ltree[512] = 1, t.opt_len = t.static_len = 0, t.sym_next = t.matches = 0
  68. },
  69. Z = t => {
  70. t.bi_valid > 8 ? y(t, t.bi_buf) : t.bi_valid > 0 && (t.pending_buf[t.pending++] = t.bi_buf), t.bi_buf = 0, t.bi_valid = 0
  71. },
  72. U = (t, e, a, i) => {
  73. const n = 2 * e,
  74. s = 2 * a;
  75. return t[n] < t[s] || t[n] === t[s] && i[e] <= i[a]
  76. },
  77. S = (t, e, a) => {
  78. const i = t.heap[a];
  79. let n = a << 1;
  80. for (; n <= t.heap_len && (n < t.heap_len && U(e, t.heap[n + 1], t.heap[n], t.depth) && n++, !U(e, i, t.heap[n], t.depth));) t.heap[a] = t.heap[n], a = n, n <<= 1;
  81. t.heap[a] = i
  82. },
  83. D = (t, e, i) => {
  84. let n, s, l, h, d = 0;
  85. if (0 !== t.sym_next)
  86. do {
  87. n = 255 & t.pending_buf[t.sym_buf + d++], n += (255 & t.pending_buf[t.sym_buf + d++]) << 8, s = t.pending_buf[t.sym_buf + d++], 0 === n ? z(t, s, e) : (l = c[s], z(t, l + a + 1, e), h = r[l], 0 !== h && (s -= u[l], x(t, s, h)), n--, l = v(n), z(t, l, i), h = o[l], 0 !== h && (n -= w[l], x(t, n, h)))
  88. } while (d < t.sym_next);
  89. z(t, 256, e)
  90. },
  91. T = (t, e) => {
  92. const a = e.dyn_tree,
  93. i = e.stat_desc.static_tree,
  94. n = e.stat_desc.has_stree,
  95. r = e.stat_desc.elems;
  96. let o, l, h, d = -1;
  97. for (t.heap_len = 0, t.heap_max = 573, o = 0; o < r; o++) 0 !== a[2 * o] ? (t.heap[++t.heap_len] = d = o, t.depth[o] = 0) : a[2 * o + 1] = 0;
  98. for (; t.heap_len < 2;) h = t.heap[++t.heap_len] = d < 2 ? ++d : 0, a[2 * h] = 1, t.depth[h] = 0, t.opt_len--, n && (t.static_len -= i[2 * h + 1]);
  99. for (e.max_code = d, o = t.heap_len >> 1; o >= 1; o--) S(t, a, o);
  100. h = r;
  101. do {
  102. o = t.heap[1], t.heap[1] = t.heap[t.heap_len--], S(t, a, 1), l = t.heap[1], t.heap[--t.heap_max] = o, t.heap[--t.heap_max] = l, a[2 * h] = a[2 * o] + a[2 * l], t.depth[h] = (t.depth[o] >= t.depth[l] ? t.depth[o] : t.depth[l]) + 1, a[2 * o + 1] = a[2 * l + 1] = h, t.heap[1] = h++, S(t, a, 1)
  103. } while (t.heap_len >= 2);
  104. t.heap[--t.heap_max] = t.heap[1], ((t, e) => {
  105. const a = e.dyn_tree,
  106. i = e.max_code,
  107. n = e.stat_desc.static_tree,
  108. r = e.stat_desc.has_stree,
  109. o = e.stat_desc.extra_bits,
  110. l = e.stat_desc.extra_base,
  111. h = e.stat_desc.max_length;
  112. let d, _, f, c, u, w, m = 0;
  113. for (c = 0; c <= s; c++) t.bl_count[c] = 0;
  114. for (a[2 * t.heap[t.heap_max] + 1] = 0, d = t.heap_max + 1; d < 573; d++) _ = t.heap[d], c = a[2 * a[2 * _ + 1] + 1] + 1, c > h && (c = h, m++), a[2 * _ + 1] = c, _ > i || (t.bl_count[c]++, u = 0, _ >= l && (u = o[_ - l]), w = a[2 * _], t.opt_len += w * (c + u), r && (t.static_len += w * (n[2 * _ + 1] + u)));
  115. if (0 !== m) {
  116. do {
  117. for (c = h - 1; 0 === t.bl_count[c];) c--;
  118. t.bl_count[c]--, t.bl_count[c + 1] += 2, t.bl_count[h]--, m -= 2
  119. } while (m > 0);
  120. for (c = h; 0 !== c; c--)
  121. for (_ = t.bl_count[c]; 0 !== _;) f = t.heap[--d], f > i || (a[2 * f + 1] !== c && (t.opt_len += (c - a[2 * f + 1]) * a[2 * f], a[2 * f + 1] = c), _--)
  122. }
  123. })(t, e), E(a, d, t.bl_count)
  124. },
  125. O = (t, e, a) => {
  126. let i, n, s = -1,
  127. r = e[1],
  128. o = 0,
  129. l = 7,
  130. h = 4;
  131. for (0 === r && (l = 138, h = 3), e[2 * (a + 1) + 1] = 65535, i = 0; i <= a; i++) n = r, r = e[2 * (i + 1) + 1], ++o < l && n === r || (o < h ? t.bl_tree[2 * n] += o : 0 !== n ? (n !== s && t.bl_tree[2 * n]++, t.bl_tree[32]++) : o <= 10 ? t.bl_tree[34]++ : t.bl_tree[36]++, o = 0, s = n, 0 === r ? (l = 138, h = 3) : n === r ? (l = 6, h = 3) : (l = 7, h = 4))
  132. },
  133. I = (t, e, a) => {
  134. let i, n, s = -1,
  135. r = e[1],
  136. o = 0,
  137. l = 7,
  138. h = 4;
  139. for (0 === r && (l = 138, h = 3), i = 0; i <= a; i++)
  140. if (n = r, r = e[2 * (i + 1) + 1], !(++o < l && n === r)) {
  141. if (o < h)
  142. do {
  143. z(t, n, t.bl_tree)
  144. } while (0 != --o);
  145. else 0 !== n ? (n !== s && (z(t, n, t.bl_tree), o--), z(t, 16, t.bl_tree), x(t, o - 3, 2)) : o <= 10 ? (z(t, 17, t.bl_tree), x(t, o - 3, 3)) : (z(t, 18, t.bl_tree), x(t, o - 11, 7));
  146. o = 0, s = n, 0 === r ? (l = 138, h = 3) : n === r ? (l = 6, h = 3) : (l = 7, h = 4)
  147. }
  148. };
  149. let F = !1;
  150. const L = (t, e, a, i) => {
  151. x(t, 0 + (i ? 1 : 0), 3), Z(t), y(t, a), y(t, ~a), a && t.pending_buf.set(t.window.subarray(e, e + a), t.pending), t.pending += a
  152. };
  153. var N = (t, e, i, n) => {
  154. let s, r, o = 0;
  155. t.level > 0 ? (2 === t.strm.data_type && (t.strm.data_type = (t => {
  156. let e, i = 4093624447;
  157. for (e = 0; e <= 31; e++, i >>>= 1)
  158. if (1 & i && 0 !== t.dyn_ltree[2 * e]) return 0;
  159. if (0 !== t.dyn_ltree[18] || 0 !== t.dyn_ltree[20] || 0 !== t.dyn_ltree[26]) return 1;
  160. for (e = 32; e < a; e++)
  161. if (0 !== t.dyn_ltree[2 * e]) return 1;
  162. return 0
  163. })(t)), T(t, t.l_desc), T(t, t.d_desc), o = (t => {
  164. let e;
  165. for (O(t, t.dyn_ltree, t.l_desc.max_code), O(t, t.dyn_dtree, t.d_desc.max_code), T(t, t.bl_desc), e = 18; e >= 3 && 0 === t.bl_tree[2 * h[e] + 1]; e--);
  166. return t.opt_len += 3 * (e + 1) + 5 + 5 + 4, e
  167. })(t), s = t.opt_len + 3 + 7 >>> 3, r = t.static_len + 3 + 7 >>> 3, r <= s && (s = r)) : s = r = i + 5, i + 4 <= s && -1 !== e ? L(t, e, i, n) : 4 === t.strategy || r === s ? (x(t, 2 + (n ? 1 : 0), 3), D(t, d, _)) : (x(t, 4 + (n ? 1 : 0), 3), ((t, e, a, i) => {
  168. let n;
  169. for (x(t, e - 257, 5), x(t, a - 1, 5), x(t, i - 4, 4), n = 0; n < i; n++) x(t, t.bl_tree[2 * h[n] + 1], 3);
  170. I(t, t.dyn_ltree, e - 1), I(t, t.dyn_dtree, a - 1)
  171. })(t, t.l_desc.max_code + 1, t.d_desc.max_code + 1, o + 1), D(t, t.dyn_ltree, t.dyn_dtree)), R(t), n && Z(t)
  172. },
  173. B = {
  174. _tr_init: t => {
  175. F || ((() => {
  176. let t, e, a, h, k;
  177. const v = new Array(16);
  178. for (a = 0, h = 0; h < 28; h++)
  179. for (u[h] = a, t = 0; t < 1 << r[h]; t++) c[a++] = h;
  180. for (c[a - 1] = h, k = 0, h = 0; h < 16; h++)
  181. for (w[h] = k, t = 0; t < 1 << o[h]; t++) f[k++] = h;
  182. for (k >>= 7; h < n; h++)
  183. for (w[h] = k << 7, t = 0; t < 1 << o[h] - 7; t++) f[256 + k++] = h;
  184. for (e = 0; e <= s; e++) v[e] = 0;
  185. for (t = 0; t <= 143;) d[2 * t + 1] = 8, t++, v[8]++;
  186. for (; t <= 255;) d[2 * t + 1] = 9, t++, v[9]++;
  187. for (; t <= 279;) d[2 * t + 1] = 7, t++, v[7]++;
  188. for (; t <= 287;) d[2 * t + 1] = 8, t++, v[8]++;
  189. for (E(d, 287, v), t = 0; t < n; t++) _[2 * t + 1] = 5, _[2 * t] = A(t, 5);
  190. b = new m(d, r, 257, i, s), g = new m(_, o, 0, n, s), p = new m(new Array(0), l, 0, 19, 7)
  191. })(), F = !0), t.l_desc = new k(t.dyn_ltree, b), t.d_desc = new k(t.dyn_dtree, g), t.bl_desc = new k(t.bl_tree, p), t.bi_buf = 0, t.bi_valid = 0, R(t)
  192. },
  193. _tr_stored_block: L,
  194. _tr_flush_block: N,
  195. _tr_tally: (t, e, i) => (t.pending_buf[t.sym_buf + t.sym_next++] = e, t.pending_buf[t.sym_buf + t.sym_next++] = e >> 8, t.pending_buf[t.sym_buf + t.sym_next++] = i, 0 === e ? t.dyn_ltree[2 * i]++ : (t.matches++, e--, t.dyn_ltree[2 * (c[i] + a + 1)]++, t.dyn_dtree[2 * v(e)]++), t.sym_next === t.sym_end),
  196. _tr_align: t => {
  197. x(t, 2, 3), z(t, 256, d), (t => {
  198. 16 === t.bi_valid ? (y(t, t.bi_buf), t.bi_buf = 0, t.bi_valid = 0) : t.bi_valid >= 8 && (t.pending_buf[t.pending++] = 255 & t.bi_buf, t.bi_buf >>= 8, t.bi_valid -= 8)
  199. })(t)
  200. }
  201. };
  202. var C = (t, e, a, i) => {
  203. let n = 65535 & t | 0,
  204. s = t >>> 16 & 65535 | 0,
  205. r = 0;
  206. for (; 0 !== a;) {
  207. r = a > 2e3 ? 2e3 : a, a -= r;
  208. do {
  209. n = n + e[i++] | 0, s = s + n | 0
  210. } while (--r);
  211. n %= 65521, s %= 65521
  212. }
  213. return n | s << 16 | 0
  214. };
  215. const M = new Uint32Array((() => {
  216. let t, e = [];
  217. for (var a = 0; a < 256; a++) {
  218. t = a;
  219. for (var i = 0; i < 8; i++) t = 1 & t ? 3988292384 ^ t >>> 1 : t >>> 1;
  220. e[a] = t
  221. }
  222. return e
  223. })());
  224. var H = (t, e, a, i) => {
  225. const n = M,
  226. s = i + a;
  227. t ^= -1;
  228. for (let a = i; a < s; a++) t = t >>> 8 ^ n[255 & (t ^ e[a])];
  229. return -1 ^ t
  230. },
  231. j = {
  232. 2: "need dictionary",
  233. 1: "stream end",
  234. 0: "",
  235. "-1": "file error",
  236. "-2": "stream error",
  237. "-3": "data error",
  238. "-4": "insufficient memory",
  239. "-5": "buffer error",
  240. "-6": "incompatible version"
  241. },
  242. K = {
  243. Z_NO_FLUSH: 0,
  244. Z_PARTIAL_FLUSH: 1,
  245. Z_SYNC_FLUSH: 2,
  246. Z_FULL_FLUSH: 3,
  247. Z_FINISH: 4,
  248. Z_BLOCK: 5,
  249. Z_TREES: 6,
  250. Z_OK: 0,
  251. Z_STREAM_END: 1,
  252. Z_NEED_DICT: 2,
  253. Z_ERRNO: -1,
  254. Z_STREAM_ERROR: -2,
  255. Z_DATA_ERROR: -3,
  256. Z_MEM_ERROR: -4,
  257. Z_BUF_ERROR: -5,
  258. Z_NO_COMPRESSION: 0,
  259. Z_BEST_SPEED: 1,
  260. Z_BEST_COMPRESSION: 9,
  261. Z_DEFAULT_COMPRESSION: -1,
  262. Z_FILTERED: 1,
  263. Z_HUFFMAN_ONLY: 2,
  264. Z_RLE: 3,
  265. Z_FIXED: 4,
  266. Z_DEFAULT_STRATEGY: 0,
  267. Z_BINARY: 0,
  268. Z_TEXT: 1,
  269. Z_UNKNOWN: 2,
  270. Z_DEFLATED: 8
  271. };
  272. const {
  273. _tr_init: P,
  274. _tr_stored_block: Y,
  275. _tr_flush_block: G,
  276. _tr_tally: X,
  277. _tr_align: W
  278. } = B, {
  279. Z_NO_FLUSH: q,
  280. Z_PARTIAL_FLUSH: J,
  281. Z_FULL_FLUSH: Q,
  282. Z_FINISH: V,
  283. Z_BLOCK: $,
  284. Z_OK: tt,
  285. Z_STREAM_END: et,
  286. Z_STREAM_ERROR: at,
  287. Z_DATA_ERROR: it,
  288. Z_BUF_ERROR: nt,
  289. Z_DEFAULT_COMPRESSION: st,
  290. Z_FILTERED: rt,
  291. Z_HUFFMAN_ONLY: ot,
  292. Z_RLE: lt,
  293. Z_FIXED: ht,
  294. Z_DEFAULT_STRATEGY: dt,
  295. Z_UNKNOWN: _t,
  296. Z_DEFLATED: ft
  297. } = K, ct = 258, ut = 262, wt = 42, mt = 113, bt = 666, gt = (t, e) => (t.msg = j[e], e), pt = t => 2 * t - (t > 4 ? 9 : 0), kt = t => {
  298. let e = t.length;
  299. for (; --e >= 0;) t[e] = 0
  300. }, vt = t => {
  301. let e, a, i, n = t.w_size;
  302. e = t.hash_size, i = e;
  303. do {
  304. a = t.head[--i], t.head[i] = a >= n ? a - n : 0
  305. } while (--e);
  306. e = n, i = e;
  307. do {
  308. a = t.prev[--i], t.prev[i] = a >= n ? a - n : 0
  309. } while (--e)
  310. };
  311. let yt = (t, e, a) => (e << t.hash_shift ^ a) & t.hash_mask;
  312. const xt = t => {
  313. const e = t.state;
  314. let a = e.pending;
  315. a > t.avail_out && (a = t.avail_out), 0 !== a && (t.output.set(e.pending_buf.subarray(e.pending_out, e.pending_out + a), t.next_out), t.next_out += a, e.pending_out += a, t.total_out += a, t.avail_out -= a, e.pending -= a, 0 === e.pending && (e.pending_out = 0))
  316. },
  317. zt = (t, e) => {
  318. G(t, t.block_start >= 0 ? t.block_start : -1, t.strstart - t.block_start, e), t.block_start = t.strstart, xt(t.strm)
  319. },
  320. At = (t, e) => {
  321. t.pending_buf[t.pending++] = e
  322. },
  323. Et = (t, e) => {
  324. t.pending_buf[t.pending++] = e >>> 8 & 255, t.pending_buf[t.pending++] = 255 & e
  325. },
  326. Rt = (t, e, a, i) => {
  327. let n = t.avail_in;
  328. return n > i && (n = i), 0 === n ? 0 : (t.avail_in -= n, e.set(t.input.subarray(t.next_in, t.next_in + n), a), 1 === t.state.wrap ? t.adler = C(t.adler, e, n, a) : 2 === t.state.wrap && (t.adler = H(t.adler, e, n, a)), t.next_in += n, t.total_in += n, n)
  329. },
  330. Zt = (t, e) => {
  331. let a, i, n = t.max_chain_length,
  332. s = t.strstart,
  333. r = t.prev_length,
  334. o = t.nice_match;
  335. const l = t.strstart > t.w_size - ut ? t.strstart - (t.w_size - ut) : 0,
  336. h = t.window,
  337. d = t.w_mask,
  338. _ = t.prev,
  339. f = t.strstart + ct;
  340. let c = h[s + r - 1],
  341. u = h[s + r];
  342. t.prev_length >= t.good_match && (n >>= 2), o > t.lookahead && (o = t.lookahead);
  343. do {
  344. if (a = e, h[a + r] === u && h[a + r - 1] === c && h[a] === h[s] && h[++a] === h[s + 1]) {
  345. s += 2, a++;
  346. do {} while (h[++s] === h[++a] && h[++s] === h[++a] && h[++s] === h[++a] && h[++s] === h[++a] && h[++s] === h[++a] && h[++s] === h[++a] && h[++s] === h[++a] && h[++s] === h[++a] && s < f);
  347. if (i = ct - (f - s), s = f - ct, i > r) {
  348. if (t.match_start = e, r = i, i >= o) break;
  349. c = h[s + r - 1], u = h[s + r]
  350. }
  351. }
  352. } while ((e = _[e & d]) > l && 0 != --n);
  353. return r <= t.lookahead ? r : t.lookahead
  354. },
  355. Ut = t => {
  356. const e = t.w_size;
  357. let a, i, n;
  358. do {
  359. if (i = t.window_size - t.lookahead - t.strstart, t.strstart >= e + (e - ut) && (t.window.set(t.window.subarray(e, e + e - i), 0), t.match_start -= e, t.strstart -= e, t.block_start -= e, t.insert > t.strstart && (t.insert = t.strstart), vt(t), i += e), 0 === t.strm.avail_in) break;
  360. if (a = Rt(t.strm, t.window, t.strstart + t.lookahead, i), t.lookahead += a, t.lookahead + t.insert >= 3)
  361. for (n = t.strstart - t.insert, t.ins_h = t.window[n], t.ins_h = yt(t, t.ins_h, t.window[n + 1]); t.insert && (t.ins_h = yt(t, t.ins_h, t.window[n + 3 - 1]), t.prev[n & t.w_mask] = t.head[t.ins_h], t.head[t.ins_h] = n, n++, t.insert--, !(t.lookahead + t.insert < 3)););
  362. } while (t.lookahead < ut && 0 !== t.strm.avail_in)
  363. },
  364. St = (t, e) => {
  365. let a, i, n, s = t.pending_buf_size - 5 > t.w_size ? t.w_size : t.pending_buf_size - 5,
  366. r = 0,
  367. o = t.strm.avail_in;
  368. do {
  369. if (a = 65535, n = t.bi_valid + 42 >> 3, t.strm.avail_out < n) break;
  370. if (n = t.strm.avail_out - n, i = t.strstart - t.block_start, a > i + t.strm.avail_in && (a = i + t.strm.avail_in), a > n && (a = n), a < s && (0 === a && e !== V || e === q || a !== i + t.strm.avail_in)) break;
  371. r = e === V && a === i + t.strm.avail_in ? 1 : 0, Y(t, 0, 0, r), t.pending_buf[t.pending - 4] = a, t.pending_buf[t.pending - 3] = a >> 8, t.pending_buf[t.pending - 2] = ~a, t.pending_buf[t.pending - 1] = ~a >> 8, xt(t.strm), i && (i > a && (i = a), t.strm.output.set(t.window.subarray(t.block_start, t.block_start + i), t.strm.next_out), t.strm.next_out += i, t.strm.avail_out -= i, t.strm.total_out += i, t.block_start += i, a -= i), a && (Rt(t.strm, t.strm.output, t.strm.next_out, a), t.strm.next_out += a, t.strm.avail_out -= a, t.strm.total_out += a)
  372. } while (0 === r);
  373. return o -= t.strm.avail_in, o && (o >= t.w_size ? (t.matches = 2, t.window.set(t.strm.input.subarray(t.strm.next_in - t.w_size, t.strm.next_in), 0), t.strstart = t.w_size, t.insert = t.strstart) : (t.window_size - t.strstart <= o && (t.strstart -= t.w_size, t.window.set(t.window.subarray(t.w_size, t.w_size + t.strstart), 0), t.matches < 2 && t.matches++, t.insert > t.strstart && (t.insert = t.strstart)), t.window.set(t.strm.input.subarray(t.strm.next_in - o, t.strm.next_in), t.strstart), t.strstart += o, t.insert += o > t.w_size - t.insert ? t.w_size - t.insert : o), t.block_start = t.strstart), t.high_water < t.strstart && (t.high_water = t.strstart), r ? 4 : e !== q && e !== V && 0 === t.strm.avail_in && t.strstart === t.block_start ? 2 : (n = t.window_size - t.strstart, t.strm.avail_in > n && t.block_start >= t.w_size && (t.block_start -= t.w_size, t.strstart -= t.w_size, t.window.set(t.window.subarray(t.w_size, t.w_size + t.strstart), 0), t.matches < 2 && t.matches++, n += t.w_size, t.insert > t.strstart && (t.insert = t.strstart)), n > t.strm.avail_in && (n = t.strm.avail_in), n && (Rt(t.strm, t.window, t.strstart, n), t.strstart += n, t.insert += n > t.w_size - t.insert ? t.w_size - t.insert : n), t.high_water < t.strstart && (t.high_water = t.strstart), n = t.bi_valid + 42 >> 3, n = t.pending_buf_size - n > 65535 ? 65535 : t.pending_buf_size - n, s = n > t.w_size ? t.w_size : n, i = t.strstart - t.block_start, (i >= s || (i || e === V) && e !== q && 0 === t.strm.avail_in && i <= n) && (a = i > n ? n : i, r = e === V && 0 === t.strm.avail_in && a === i ? 1 : 0, Y(t, t.block_start, a, r), t.block_start += a, xt(t.strm)), r ? 3 : 1)
  374. },
  375. Dt = (t, e) => {
  376. let a, i;
  377. for (;;) {
  378. if (t.lookahead < ut) {
  379. if (Ut(t), t.lookahead < ut && e === q) return 1;
  380. if (0 === t.lookahead) break
  381. }
  382. if (a = 0, t.lookahead >= 3 && (t.ins_h = yt(t, t.ins_h, t.window[t.strstart + 3 - 1]), a = t.prev[t.strstart & t.w_mask] = t.head[t.ins_h], t.head[t.ins_h] = t.strstart), 0 !== a && t.strstart - a <= t.w_size - ut && (t.match_length = Zt(t, a)), t.match_length >= 3)
  383. if (i = X(t, t.strstart - t.match_start, t.match_length - 3), t.lookahead -= t.match_length, t.match_length <= t.max_lazy_match && t.lookahead >= 3) {
  384. t.match_length--;
  385. do {
  386. t.strstart++, t.ins_h = yt(t, t.ins_h, t.window[t.strstart + 3 - 1]), a = t.prev[t.strstart & t.w_mask] = t.head[t.ins_h], t.head[t.ins_h] = t.strstart
  387. } while (0 != --t.match_length);
  388. t.strstart++
  389. } else t.strstart += t.match_length, t.match_length = 0, t.ins_h = t.window[t.strstart], t.ins_h = yt(t, t.ins_h, t.window[t.strstart + 1]);
  390. else i = X(t, 0, t.window[t.strstart]), t.lookahead--, t.strstart++;
  391. if (i && (zt(t, !1), 0 === t.strm.avail_out)) return 1
  392. }
  393. return t.insert = t.strstart < 2 ? t.strstart : 2, e === V ? (zt(t, !0), 0 === t.strm.avail_out ? 3 : 4) : t.sym_next && (zt(t, !1), 0 === t.strm.avail_out) ? 1 : 2
  394. },
  395. Tt = (t, e) => {
  396. let a, i, n;
  397. for (;;) {
  398. if (t.lookahead < ut) {
  399. if (Ut(t), t.lookahead < ut && e === q) return 1;
  400. if (0 === t.lookahead) break
  401. }
  402. if (a = 0, t.lookahead >= 3 && (t.ins_h = yt(t, t.ins_h, t.window[t.strstart + 3 - 1]), a = t.prev[t.strstart & t.w_mask] = t.head[t.ins_h], t.head[t.ins_h] = t.strstart), t.prev_length = t.match_length, t.prev_match = t.match_start, t.match_length = 2, 0 !== a && t.prev_length < t.max_lazy_match && t.strstart - a <= t.w_size - ut && (t.match_length = Zt(t, a), t.match_length <= 5 && (t.strategy === rt || 3 === t.match_length && t.strstart - t.match_start > 4096) && (t.match_length = 2)), t.prev_length >= 3 && t.match_length <= t.prev_length) {
  403. n = t.strstart + t.lookahead - 3, i = X(t, t.strstart - 1 - t.prev_match, t.prev_length - 3), t.lookahead -= t.prev_length - 1, t.prev_length -= 2;
  404. do {
  405. ++t.strstart <= n && (t.ins_h = yt(t, t.ins_h, t.window[t.strstart + 3 - 1]), a = t.prev[t.strstart & t.w_mask] = t.head[t.ins_h], t.head[t.ins_h] = t.strstart)
  406. } while (0 != --t.prev_length);
  407. if (t.match_available = 0, t.match_length = 2, t.strstart++, i && (zt(t, !1), 0 === t.strm.avail_out)) return 1
  408. } else if (t.match_available) {
  409. if (i = X(t, 0, t.window[t.strstart - 1]), i && zt(t, !1), t.strstart++, t.lookahead--, 0 === t.strm.avail_out) return 1
  410. } else t.match_available = 1, t.strstart++, t.lookahead--
  411. }
  412. return t.match_available && (i = X(t, 0, t.window[t.strstart - 1]), t.match_available = 0), t.insert = t.strstart < 2 ? t.strstart : 2, e === V ? (zt(t, !0), 0 === t.strm.avail_out ? 3 : 4) : t.sym_next && (zt(t, !1), 0 === t.strm.avail_out) ? 1 : 2
  413. };
  414. function Ot(t, e, a, i, n) {
  415. this.good_length = t, this.max_lazy = e, this.nice_length = a, this.max_chain = i, this.func = n
  416. }
  417. const It = [new Ot(0, 0, 0, 0, St), new Ot(4, 4, 8, 4, Dt), new Ot(4, 5, 16, 8, Dt), new Ot(4, 6, 32, 32, Dt), new Ot(4, 4, 16, 16, Tt), new Ot(8, 16, 32, 32, Tt), new Ot(8, 16, 128, 128, Tt), new Ot(8, 32, 128, 256, Tt), new Ot(32, 128, 258, 1024, Tt), new Ot(32, 258, 258, 4096, Tt)];
  418. function Ft() {
  419. this.strm = null, this.status = 0, this.pending_buf = null, this.pending_buf_size = 0, this.pending_out = 0, this.pending = 0, this.wrap = 0, this.gzhead = null, this.gzindex = 0, this.method = ft, this.last_flush = -1, this.w_size = 0, this.w_bits = 0, this.w_mask = 0, this.window = null, this.window_size = 0, this.prev = null, this.head = null, this.ins_h = 0, this.hash_size = 0, this.hash_bits = 0, this.hash_mask = 0, this.hash_shift = 0, this.block_start = 0, this.match_length = 0, this.prev_match = 0, this.match_available = 0, this.strstart = 0, this.match_start = 0, this.lookahead = 0, this.prev_length = 0, this.max_chain_length = 0, this.max_lazy_match = 0, this.level = 0, this.strategy = 0, this.good_match = 0, this.nice_match = 0, this.dyn_ltree = new Uint16Array(1146), this.dyn_dtree = new Uint16Array(122), this.bl_tree = new Uint16Array(78), kt(this.dyn_ltree), kt(this.dyn_dtree), kt(this.bl_tree), this.l_desc = null, this.d_desc = null, this.bl_desc = null, this.bl_count = new Uint16Array(16), this.heap = new Uint16Array(573), kt(this.heap), this.heap_len = 0, this.heap_max = 0, this.depth = new Uint16Array(573), kt(this.depth), this.sym_buf = 0, this.lit_bufsize = 0, this.sym_next = 0, this.sym_end = 0, this.opt_len = 0, this.static_len = 0, this.matches = 0, this.insert = 0, this.bi_buf = 0, this.bi_valid = 0
  420. }
  421. const Lt = t => {
  422. if (!t) return 1;
  423. const e = t.state;
  424. return !e || e.strm !== t || e.status !== wt && 57 !== e.status && 69 !== e.status && 73 !== e.status && 91 !== e.status && 103 !== e.status && e.status !== mt && e.status !== bt ? 1 : 0
  425. },
  426. Nt = t => {
  427. if (Lt(t)) return gt(t, at);
  428. t.total_in = t.total_out = 0, t.data_type = _t;
  429. const e = t.state;
  430. return e.pending = 0, e.pending_out = 0, e.wrap < 0 && (e.wrap = -e.wrap), e.status = 2 === e.wrap ? 57 : e.wrap ? wt : mt, t.adler = 2 === e.wrap ? 0 : 1, e.last_flush = -2, P(e), tt
  431. },
  432. Bt = t => {
  433. const e = Nt(t);
  434. var a;
  435. return e === tt && ((a = t.state).window_size = 2 * a.w_size, kt(a.head), a.max_lazy_match = It[a.level].max_lazy, a.good_match = It[a.level].good_length, a.nice_match = It[a.level].nice_length, a.max_chain_length = It[a.level].max_chain, a.strstart = 0, a.block_start = 0, a.lookahead = 0, a.insert = 0, a.match_length = a.prev_length = 2, a.match_available = 0, a.ins_h = 0), e
  436. },
  437. Ct = (t, e, a, i, n, s) => {
  438. if (!t) return at;
  439. let r = 1;
  440. if (e === st && (e = 6), i < 0 ? (r = 0, i = -i) : i > 15 && (r = 2, i -= 16), n < 1 || n > 9 || a !== ft || i < 8 || i > 15 || e < 0 || e > 9 || s < 0 || s > ht || 8 === i && 1 !== r) return gt(t, at);
  441. 8 === i && (i = 9);
  442. const o = new Ft;
  443. return t.state = o, o.strm = t, o.status = wt, o.wrap = r, o.gzhead = null, o.w_bits = i, o.w_size = 1 << o.w_bits, o.w_mask = o.w_size - 1, o.hash_bits = n + 7, o.hash_size = 1 << o.hash_bits, o.hash_mask = o.hash_size - 1, o.hash_shift = ~~((o.hash_bits + 3 - 1) / 3), o.window = new Uint8Array(2 * o.w_size), o.head = new Uint16Array(o.hash_size), o.prev = new Uint16Array(o.w_size), o.lit_bufsize = 1 << n + 6, o.pending_buf_size = 4 * o.lit_bufsize, o.pending_buf = new Uint8Array(o.pending_buf_size), o.sym_buf = o.lit_bufsize, o.sym_end = 3 * (o.lit_bufsize - 1), o.level = e, o.strategy = s, o.method = a, Bt(t)
  444. };
  445. var Mt = {
  446. deflateInit: (t, e) => Ct(t, e, ft, 15, 8, dt),
  447. deflateInit2: Ct,
  448. deflateReset: Bt,
  449. deflateResetKeep: Nt,
  450. deflateSetHeader: (t, e) => Lt(t) || 2 !== t.state.wrap ? at : (t.state.gzhead = e, tt),
  451. deflate: (t, e) => {
  452. if (Lt(t) || e > $ || e < 0) return t ? gt(t, at) : at;
  453. const a = t.state;
  454. if (!t.output || 0 !== t.avail_in && !t.input || a.status === bt && e !== V) return gt(t, 0 === t.avail_out ? nt : at);
  455. const i = a.last_flush;
  456. if (a.last_flush = e, 0 !== a.pending) {
  457. if (xt(t), 0 === t.avail_out) return a.last_flush = -1, tt
  458. } else if (0 === t.avail_in && pt(e) <= pt(i) && e !== V) return gt(t, nt);
  459. if (a.status === bt && 0 !== t.avail_in) return gt(t, nt);
  460. if (a.status === wt && 0 === a.wrap && (a.status = mt), a.status === wt) {
  461. let e = ft + (a.w_bits - 8 << 4) << 8,
  462. i = -1;
  463. if (i = a.strategy >= ot || a.level < 2 ? 0 : a.level < 6 ? 1 : 6 === a.level ? 2 : 3, e |= i << 6, 0 !== a.strstart && (e |= 32), e += 31 - e % 31, Et(a, e), 0 !== a.strstart && (Et(a, t.adler >>> 16), Et(a, 65535 & t.adler)), t.adler = 1, a.status = mt, xt(t), 0 !== a.pending) return a.last_flush = -1, tt
  464. }
  465. if (57 === a.status)
  466. if (t.adler = 0, At(a, 31), At(a, 139), At(a, 8), a.gzhead) At(a, (a.gzhead.text ? 1 : 0) + (a.gzhead.hcrc ? 2 : 0) + (a.gzhead.extra ? 4 : 0) + (a.gzhead.name ? 8 : 0) + (a.gzhead.comment ? 16 : 0)), At(a, 255 & a.gzhead.time), At(a, a.gzhead.time >> 8 & 255), At(a, a.gzhead.time >> 16 & 255), At(a, a.gzhead.time >> 24 & 255), At(a, 9 === a.level ? 2 : a.strategy >= ot || a.level < 2 ? 4 : 0), At(a, 255 & a.gzhead.os), a.gzhead.extra && a.gzhead.extra.length && (At(a, 255 & a.gzhead.extra.length), At(a, a.gzhead.extra.length >> 8 & 255)), a.gzhead.hcrc && (t.adler = H(t.adler, a.pending_buf, a.pending, 0)), a.gzindex = 0, a.status = 69;
  467. else if (At(a, 0), At(a, 0), At(a, 0), At(a, 0), At(a, 0), At(a, 9 === a.level ? 2 : a.strategy >= ot || a.level < 2 ? 4 : 0), At(a, 3), a.status = mt, xt(t), 0 !== a.pending) return a.last_flush = -1, tt;
  468. if (69 === a.status) {
  469. if (a.gzhead.extra) {
  470. let e = a.pending,
  471. i = (65535 & a.gzhead.extra.length) - a.gzindex;
  472. for (; a.pending + i > a.pending_buf_size;) {
  473. let n = a.pending_buf_size - a.pending;
  474. if (a.pending_buf.set(a.gzhead.extra.subarray(a.gzindex, a.gzindex + n), a.pending), a.pending = a.pending_buf_size, a.gzhead.hcrc && a.pending > e && (t.adler = H(t.adler, a.pending_buf, a.pending - e, e)), a.gzindex += n, xt(t), 0 !== a.pending) return a.last_flush = -1, tt;
  475. e = 0, i -= n
  476. }
  477. let n = new Uint8Array(a.gzhead.extra);
  478. a.pending_buf.set(n.subarray(a.gzindex, a.gzindex + i), a.pending), a.pending += i, a.gzhead.hcrc && a.pending > e && (t.adler = H(t.adler, a.pending_buf, a.pending - e, e)), a.gzindex = 0
  479. }
  480. a.status = 73
  481. }
  482. if (73 === a.status) {
  483. if (a.gzhead.name) {
  484. let e, i = a.pending;
  485. do {
  486. if (a.pending === a.pending_buf_size) {
  487. if (a.gzhead.hcrc && a.pending > i && (t.adler = H(t.adler, a.pending_buf, a.pending - i, i)), xt(t), 0 !== a.pending) return a.last_flush = -1, tt;
  488. i = 0
  489. }
  490. e = a.gzindex < a.gzhead.name.length ? 255 & a.gzhead.name.charCodeAt(a.gzindex++) : 0, At(a, e)
  491. } while (0 !== e);
  492. a.gzhead.hcrc && a.pending > i && (t.adler = H(t.adler, a.pending_buf, a.pending - i, i)), a.gzindex = 0
  493. }
  494. a.status = 91
  495. }
  496. if (91 === a.status) {
  497. if (a.gzhead.comment) {
  498. let e, i = a.pending;
  499. do {
  500. if (a.pending === a.pending_buf_size) {
  501. if (a.gzhead.hcrc && a.pending > i && (t.adler = H(t.adler, a.pending_buf, a.pending - i, i)), xt(t), 0 !== a.pending) return a.last_flush = -1, tt;
  502. i = 0
  503. }
  504. e = a.gzindex < a.gzhead.comment.length ? 255 & a.gzhead.comment.charCodeAt(a.gzindex++) : 0, At(a, e)
  505. } while (0 !== e);
  506. a.gzhead.hcrc && a.pending > i && (t.adler = H(t.adler, a.pending_buf, a.pending - i, i))
  507. }
  508. a.status = 103
  509. }
  510. if (103 === a.status) {
  511. if (a.gzhead.hcrc) {
  512. if (a.pending + 2 > a.pending_buf_size && (xt(t), 0 !== a.pending)) return a.last_flush = -1, tt;
  513. At(a, 255 & t.adler), At(a, t.adler >> 8 & 255), t.adler = 0
  514. }
  515. if (a.status = mt, xt(t), 0 !== a.pending) return a.last_flush = -1, tt
  516. }
  517. if (0 !== t.avail_in || 0 !== a.lookahead || e !== q && a.status !== bt) {
  518. let i = 0 === a.level ? St(a, e) : a.strategy === ot ? ((t, e) => {
  519. let a;
  520. for (;;) {
  521. if (0 === t.lookahead && (Ut(t), 0 === t.lookahead)) {
  522. if (e === q) return 1;
  523. break
  524. }
  525. if (t.match_length = 0, a = X(t, 0, t.window[t.strstart]), t.lookahead--, t.strstart++, a && (zt(t, !1), 0 === t.strm.avail_out)) return 1
  526. }
  527. return t.insert = 0, e === V ? (zt(t, !0), 0 === t.strm.avail_out ? 3 : 4) : t.sym_next && (zt(t, !1), 0 === t.strm.avail_out) ? 1 : 2
  528. })(a, e) : a.strategy === lt ? ((t, e) => {
  529. let a, i, n, s;
  530. const r = t.window;
  531. for (;;) {
  532. if (t.lookahead <= ct) {
  533. if (Ut(t), t.lookahead <= ct && e === q) return 1;
  534. if (0 === t.lookahead) break
  535. }
  536. if (t.match_length = 0, t.lookahead >= 3 && t.strstart > 0 && (n = t.strstart - 1, i = r[n], i === r[++n] && i === r[++n] && i === r[++n])) {
  537. s = t.strstart + ct;
  538. do {} while (i === r[++n] && i === r[++n] && i === r[++n] && i === r[++n] && i === r[++n] && i === r[++n] && i === r[++n] && i === r[++n] && n < s);
  539. t.match_length = ct - (s - n), t.match_length > t.lookahead && (t.match_length = t.lookahead)
  540. }
  541. if (t.match_length >= 3 ? (a = X(t, 1, t.match_length - 3), t.lookahead -= t.match_length, t.strstart += t.match_length, t.match_length = 0) : (a = X(t, 0, t.window[t.strstart]), t.lookahead--, t.strstart++), a && (zt(t, !1), 0 === t.strm.avail_out)) return 1
  542. }
  543. return t.insert = 0, e === V ? (zt(t, !0), 0 === t.strm.avail_out ? 3 : 4) : t.sym_next && (zt(t, !1), 0 === t.strm.avail_out) ? 1 : 2
  544. })(a, e) : It[a.level].func(a, e);
  545. if (3 !== i && 4 !== i || (a.status = bt), 1 === i || 3 === i) return 0 === t.avail_out && (a.last_flush = -1), tt;
  546. if (2 === i && (e === J ? W(a) : e !== $ && (Y(a, 0, 0, !1), e === Q && (kt(a.head), 0 === a.lookahead && (a.strstart = 0, a.block_start = 0, a.insert = 0))), xt(t), 0 === t.avail_out)) return a.last_flush = -1, tt
  547. }
  548. return e !== V ? tt : a.wrap <= 0 ? et : (2 === a.wrap ? (At(a, 255 & t.adler), At(a, t.adler >> 8 & 255), At(a, t.adler >> 16 & 255), At(a, t.adler >> 24 & 255), At(a, 255 & t.total_in), At(a, t.total_in >> 8 & 255), At(a, t.total_in >> 16 & 255), At(a, t.total_in >> 24 & 255)) : (Et(a, t.adler >>> 16), Et(a, 65535 & t.adler)), xt(t), a.wrap > 0 && (a.wrap = -a.wrap), 0 !== a.pending ? tt : et)
  549. },
  550. deflateEnd: t => {
  551. if (Lt(t)) return at;
  552. const e = t.state.status;
  553. return t.state = null, e === mt ? gt(t, it) : tt
  554. },
  555. deflateSetDictionary: (t, e) => {
  556. let a = e.length;
  557. if (Lt(t)) return at;
  558. const i = t.state,
  559. n = i.wrap;
  560. if (2 === n || 1 === n && i.status !== wt || i.lookahead) return at;
  561. if (1 === n && (t.adler = C(t.adler, e, a, 0)), i.wrap = 0, a >= i.w_size) {
  562. 0 === n && (kt(i.head), i.strstart = 0, i.block_start = 0, i.insert = 0);
  563. let t = new Uint8Array(i.w_size);
  564. t.set(e.subarray(a - i.w_size, a), 0), e = t, a = i.w_size
  565. }
  566. const s = t.avail_in,
  567. r = t.next_in,
  568. o = t.input;
  569. for (t.avail_in = a, t.next_in = 0, t.input = e, Ut(i); i.lookahead >= 3;) {
  570. let t = i.strstart,
  571. e = i.lookahead - 2;
  572. do {
  573. i.ins_h = yt(i, i.ins_h, i.window[t + 3 - 1]), i.prev[t & i.w_mask] = i.head[i.ins_h], i.head[i.ins_h] = t, t++
  574. } while (--e);
  575. i.strstart = t, i.lookahead = 2, Ut(i)
  576. }
  577. return i.strstart += i.lookahead, i.block_start = i.strstart, i.insert = i.lookahead, i.lookahead = 0, i.match_length = i.prev_length = 2, i.match_available = 0, t.next_in = r, t.input = o, t.avail_in = s, i.wrap = n, tt
  578. },
  579. deflateInfo: "pako deflate (from Nodeca project)"
  580. };
  581. const Ht = (t, e) => Object.prototype.hasOwnProperty.call(t, e);
  582. var jt = function(t) {
  583. const e = Array.prototype.slice.call(arguments, 1);
  584. for (; e.length;) {
  585. const a = e.shift();
  586. if (a) {
  587. if ("object" != typeof a) throw new TypeError(a + "must be non-object");
  588. for (const e in a) Ht(a, e) && (t[e] = a[e])
  589. }
  590. }
  591. return t
  592. },
  593. Kt = t => {
  594. let e = 0;
  595. for (let a = 0, i = t.length; a < i; a++) e += t[a].length;
  596. const a = new Uint8Array(e);
  597. for (let e = 0, i = 0, n = t.length; e < n; e++) {
  598. let n = t[e];
  599. a.set(n, i), i += n.length
  600. }
  601. return a
  602. };
  603. let Pt = !0;
  604. try {
  605. String.fromCharCode.apply(null, new Uint8Array(1))
  606. } catch (t) {
  607. Pt = !1
  608. }
  609. const Yt = new Uint8Array(256);
  610. for (let t = 0; t < 256; t++) Yt[t] = t >= 252 ? 6 : t >= 248 ? 5 : t >= 240 ? 4 : t >= 224 ? 3 : t >= 192 ? 2 : 1;
  611. Yt[254] = Yt[254] = 1;
  612. var Gt = t => {
  613. if ("function" == typeof TextEncoder && TextEncoder.prototype.encode) return (new TextEncoder).encode(t);
  614. let e, a, i, n, s, r = t.length,
  615. o = 0;
  616. for (n = 0; n < r; n++) a = t.charCodeAt(n), 55296 == (64512 & a) && n + 1 < r && (i = t.charCodeAt(n + 1), 56320 == (64512 & i) && (a = 65536 + (a - 55296 << 10) + (i - 56320), n++)), o += a < 128 ? 1 : a < 2048 ? 2 : a < 65536 ? 3 : 4;
  617. for (e = new Uint8Array(o), s = 0, n = 0; s < o; n++) a = t.charCodeAt(n), 55296 == (64512 & a) && n + 1 < r && (i = t.charCodeAt(n + 1), 56320 == (64512 & i) && (a = 65536 + (a - 55296 << 10) + (i - 56320), n++)), a < 128 ? e[s++] = a : a < 2048 ? (e[s++] = 192 | a >>> 6, e[s++] = 128 | 63 & a) : a < 65536 ? (e[s++] = 224 | a >>> 12, e[s++] = 128 | a >>> 6 & 63, e[s++] = 128 | 63 & a) : (e[s++] = 240 | a >>> 18, e[s++] = 128 | a >>> 12 & 63, e[s++] = 128 | a >>> 6 & 63, e[s++] = 128 | 63 & a);
  618. return e
  619. },
  620. Xt = (t, e) => {
  621. const a = e || t.length;
  622. if ("function" == typeof TextDecoder && TextDecoder.prototype.decode) return (new TextDecoder).decode(t.subarray(0, e));
  623. let i, n;
  624. const s = new Array(2 * a);
  625. for (n = 0, i = 0; i < a;) {
  626. let e = t[i++];
  627. if (e < 128) {
  628. s[n++] = e;
  629. continue
  630. }
  631. let r = Yt[e];
  632. if (r > 4) s[n++] = 65533, i += r - 1;
  633. else {
  634. for (e &= 2 === r ? 31 : 3 === r ? 15 : 7; r > 1 && i < a;) e = e << 6 | 63 & t[i++], r--;
  635. r > 1 ? s[n++] = 65533 : e < 65536 ? s[n++] = e : (e -= 65536, s[n++] = 55296 | e >> 10 & 1023, s[n++] = 56320 | 1023 & e)
  636. }
  637. }
  638. return ((t, e) => {
  639. if (e < 65534 && t.subarray && Pt) return String.fromCharCode.apply(null, t.length === e ? t : t.subarray(0, e));
  640. let a = "";
  641. for (let i = 0; i < e; i++) a += String.fromCharCode(t[i]);
  642. return a
  643. })(s, n)
  644. },
  645. Wt = (t, e) => {
  646. (e = e || t.length) > t.length && (e = t.length);
  647. let a = e - 1;
  648. for (; a >= 0 && 128 == (192 & t[a]);) a--;
  649. return a < 0 || 0 === a ? e : a + Yt[t[a]] > e ? a : e
  650. };
  651. var qt = function() {
  652. this.input = null, this.next_in = 0, this.avail_in = 0, this.total_in = 0, this.output = null, this.next_out = 0, this.avail_out = 0, this.total_out = 0, this.msg = "", this.state = null, this.data_type = 2, this.adler = 0
  653. };
  654. const Jt = Object.prototype.toString,
  655. {
  656. Z_NO_FLUSH: Qt,
  657. Z_SYNC_FLUSH: Vt,
  658. Z_FULL_FLUSH: $t,
  659. Z_FINISH: te,
  660. Z_OK: ee,
  661. Z_STREAM_END: ae,
  662. Z_DEFAULT_COMPRESSION: ie,
  663. Z_DEFAULT_STRATEGY: ne,
  664. Z_DEFLATED: se
  665. } = K;
  666. function re(t) {
  667. this.options = jt({
  668. level: ie,
  669. method: se,
  670. chunkSize: 16384,
  671. windowBits: 15,
  672. memLevel: 8,
  673. strategy: ne
  674. }, t || {});
  675. let e = this.options;
  676. e.raw && e.windowBits > 0 ? e.windowBits = -e.windowBits : e.gzip && e.windowBits > 0 && e.windowBits < 16 && (e.windowBits += 16), this.err = 0, this.msg = "", this.ended = !1, this.chunks = [], this.strm = new qt, this.strm.avail_out = 0;
  677. let a = Mt.deflateInit2(this.strm, e.level, e.method, e.windowBits, e.memLevel, e.strategy);
  678. if (a !== ee) throw new Error(j[a]);
  679. if (e.header && Mt.deflateSetHeader(this.strm, e.header), e.dictionary) {
  680. let t;
  681. if (t = "string" == typeof e.dictionary ? Gt(e.dictionary) : "[object ArrayBuffer]" === Jt.call(e.dictionary) ? new Uint8Array(e.dictionary) : e.dictionary, a = Mt.deflateSetDictionary(this.strm, t), a !== ee) throw new Error(j[a]);
  682. this._dict_set = !0
  683. }
  684. }
  685. function oe(t, e) {
  686. const a = new re(e);
  687. if (a.push(t, !0), a.err) throw a.msg || j[a.err];
  688. return a.result
  689. }
  690. re.prototype.push = function(t, e) {
  691. const a = this.strm,
  692. i = this.options.chunkSize;
  693. let n, s;
  694. if (this.ended) return !1;
  695. for (s = e === ~~e ? e : !0 === e ? te : Qt, "string" == typeof t ? a.input = Gt(t) : "[object ArrayBuffer]" === Jt.call(t) ? a.input = new Uint8Array(t) : a.input = t, a.next_in = 0, a.avail_in = a.input.length;;)
  696. if (0 === a.avail_out && (a.output = new Uint8Array(i), a.next_out = 0, a.avail_out = i), (s === Vt || s === $t) && a.avail_out <= 6) this.onData(a.output.subarray(0, a.next_out)), a.avail_out = 0;
  697. else {
  698. if (n = Mt.deflate(a, s), n === ae) return a.next_out > 0 && this.onData(a.output.subarray(0, a.next_out)), n = Mt.deflateEnd(this.strm), this.onEnd(n), this.ended = !0, n === ee;
  699. if (0 !== a.avail_out) {
  700. if (s > 0 && a.next_out > 0) this.onData(a.output.subarray(0, a.next_out)), a.avail_out = 0;
  701. else if (0 === a.avail_in) break
  702. } else this.onData(a.output)
  703. } return !0
  704. }, re.prototype.onData = function(t) {
  705. this.chunks.push(t)
  706. }, re.prototype.onEnd = function(t) {
  707. t === ee && (this.result = Kt(this.chunks)), this.chunks = [], this.err = t, this.msg = this.strm.msg
  708. };
  709. var le = {
  710. Deflate: re,
  711. deflate: oe,
  712. deflateRaw: function(t, e) {
  713. return (e = e || {}).raw = !0, oe(t, e)
  714. },
  715. gzip: function(t, e) {
  716. return (e = e || {}).gzip = !0, oe(t, e)
  717. },
  718. constants: K
  719. };
  720. const he = 16209;
  721. var de = function(t, e) {
  722. let a, i, n, s, r, o, l, h, d, _, f, c, u, w, m, b, g, p, k, v, y, x, z, A;
  723. const E = t.state;
  724. a = t.next_in, z = t.input, i = a + (t.avail_in - 5), n = t.next_out, A = t.output, s = n - (e - t.avail_out), r = n + (t.avail_out - 257), o = E.dmax, l = E.wsize, h = E.whave, d = E.wnext, _ = E.window, f = E.hold, c = E.bits, u = E.lencode, w = E.distcode, m = (1 << E.lenbits) - 1, b = (1 << E.distbits) - 1;
  725. t: do {
  726. c < 15 && (f += z[a++] << c, c += 8, f += z[a++] << c, c += 8), g = u[f & m];
  727. e: for (;;) {
  728. if (p = g >>> 24, f >>>= p, c -= p, p = g >>> 16 & 255, 0 === p) A[n++] = 65535 & g;
  729. else {
  730. if (!(16 & p)) {
  731. if (0 == (64 & p)) {
  732. g = u[(65535 & g) + (f & (1 << p) - 1)];
  733. continue e
  734. }
  735. if (32 & p) {
  736. E.mode = 16191;
  737. break t
  738. }
  739. t.msg = "invalid literal/length code", E.mode = he;
  740. break t
  741. }
  742. k = 65535 & g, p &= 15, p && (c < p && (f += z[a++] << c, c += 8), k += f & (1 << p) - 1, f >>>= p, c -= p), c < 15 && (f += z[a++] << c, c += 8, f += z[a++] << c, c += 8), g = w[f & b];
  743. a: for (;;) {
  744. if (p = g >>> 24, f >>>= p, c -= p, p = g >>> 16 & 255, !(16 & p)) {
  745. if (0 == (64 & p)) {
  746. g = w[(65535 & g) + (f & (1 << p) - 1)];
  747. continue a
  748. }
  749. t.msg = "invalid distance code", E.mode = he;
  750. break t
  751. }
  752. if (v = 65535 & g, p &= 15, c < p && (f += z[a++] << c, c += 8, c < p && (f += z[a++] << c, c += 8)), v += f & (1 << p) - 1, v > o) {
  753. t.msg = "invalid distance too far back", E.mode = he;
  754. break t
  755. }
  756. if (f >>>= p, c -= p, p = n - s, v > p) {
  757. if (p = v - p, p > h && E.sane) {
  758. t.msg = "invalid distance too far back", E.mode = he;
  759. break t
  760. }
  761. if (y = 0, x = _, 0 === d) {
  762. if (y += l - p, p < k) {
  763. k -= p;
  764. do {
  765. A[n++] = _[y++]
  766. } while (--p);
  767. y = n - v, x = A
  768. }
  769. } else if (d < p) {
  770. if (y += l + d - p, p -= d, p < k) {
  771. k -= p;
  772. do {
  773. A[n++] = _[y++]
  774. } while (--p);
  775. if (y = 0, d < k) {
  776. p = d, k -= p;
  777. do {
  778. A[n++] = _[y++]
  779. } while (--p);
  780. y = n - v, x = A
  781. }
  782. }
  783. } else if (y += d - p, p < k) {
  784. k -= p;
  785. do {
  786. A[n++] = _[y++]
  787. } while (--p);
  788. y = n - v, x = A
  789. }
  790. for (; k > 2;) A[n++] = x[y++], A[n++] = x[y++], A[n++] = x[y++], k -= 3;
  791. k && (A[n++] = x[y++], k > 1 && (A[n++] = x[y++]))
  792. } else {
  793. y = n - v;
  794. do {
  795. A[n++] = A[y++], A[n++] = A[y++], A[n++] = A[y++], k -= 3
  796. } while (k > 2);
  797. k && (A[n++] = A[y++], k > 1 && (A[n++] = A[y++]))
  798. }
  799. break
  800. }
  801. }
  802. break
  803. }
  804. } while (a < i && n < r);
  805. k = c >> 3, a -= k, c -= k << 3, f &= (1 << c) - 1, t.next_in = a, t.next_out = n, t.avail_in = a < i ? i - a + 5 : 5 - (a - i), t.avail_out = n < r ? r - n + 257 : 257 - (n - r), E.hold = f, E.bits = c
  806. };
  807. const _e = 15,
  808. fe = new Uint16Array([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, 0, 0]),
  809. ce = new Uint8Array([16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78]),
  810. ue = new Uint16Array([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, 0, 0]),
  811. we = new Uint8Array([16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 64, 64]);
  812. var me = (t, e, a, i, n, s, r, o) => {
  813. const l = o.bits;
  814. let h, d, _, f, c, u, w = 0,
  815. m = 0,
  816. b = 0,
  817. g = 0,
  818. p = 0,
  819. k = 0,
  820. v = 0,
  821. y = 0,
  822. x = 0,
  823. z = 0,
  824. A = null;
  825. const E = new Uint16Array(16),
  826. R = new Uint16Array(16);
  827. let Z, U, S, D = null;
  828. for (w = 0; w <= _e; w++) E[w] = 0;
  829. for (m = 0; m < i; m++) E[e[a + m]]++;
  830. for (p = l, g = _e; g >= 1 && 0 === E[g]; g--);
  831. if (p > g && (p = g), 0 === g) return n[s++] = 20971520, n[s++] = 20971520, o.bits = 1, 0;
  832. for (b = 1; b < g && 0 === E[b]; b++);
  833. for (p < b && (p = b), y = 1, w = 1; w <= _e; w++)
  834. if (y <<= 1, y -= E[w], y < 0) return -1;
  835. if (y > 0 && (0 === t || 1 !== g)) return -1;
  836. for (R[1] = 0, w = 1; w < _e; w++) R[w + 1] = R[w] + E[w];
  837. for (m = 0; m < i; m++) 0 !== e[a + m] && (r[R[e[a + m]]++] = m);
  838. if (0 === t ? (A = D = r, u = 20) : 1 === t ? (A = fe, D = ce, u = 257) : (A = ue, D = we, u = 0), z = 0, m = 0, w = b, c = s, k = p, v = 0, _ = -1, x = 1 << p, f = x - 1, 1 === t && x > 852 || 2 === t && x > 592) return 1;
  839. for (;;) {
  840. Z = w - v, r[m] + 1 < u ? (U = 0, S = r[m]) : r[m] >= u ? (U = D[r[m] - u], S = A[r[m] - u]) : (U = 96, S = 0), h = 1 << w - v, d = 1 << k, b = d;
  841. do {
  842. d -= h, n[c + (z >> v) + d] = Z << 24 | U << 16 | S | 0
  843. } while (0 !== d);
  844. for (h = 1 << w - 1; z & h;) h >>= 1;
  845. if (0 !== h ? (z &= h - 1, z += h) : z = 0, m++, 0 == --E[w]) {
  846. if (w === g) break;
  847. w = e[a + r[m]]
  848. }
  849. if (w > p && (z & f) !== _) {
  850. for (0 === v && (v = p), c += b, k = w - v, y = 1 << k; k + v < g && (y -= E[k + v], !(y <= 0));) k++, y <<= 1;
  851. if (x += 1 << k, 1 === t && x > 852 || 2 === t && x > 592) return 1;
  852. _ = z & f, n[_] = p << 24 | k << 16 | c - s | 0
  853. }
  854. }
  855. return 0 !== z && (n[c + z] = w - v << 24 | 64 << 16 | 0), o.bits = p, 0
  856. };
  857. const {
  858. Z_FINISH: be,
  859. Z_BLOCK: ge,
  860. Z_TREES: pe,
  861. Z_OK: ke,
  862. Z_STREAM_END: ve,
  863. Z_NEED_DICT: ye,
  864. Z_STREAM_ERROR: xe,
  865. Z_DATA_ERROR: ze,
  866. Z_MEM_ERROR: Ae,
  867. Z_BUF_ERROR: Ee,
  868. Z_DEFLATED: Re
  869. } = K, Ze = 16180, Ue = 16190, Se = 16191, De = 16192, Te = 16194, Oe = 16199, Ie = 16200, Fe = 16206, Le = 16209, Ne = t => (t >>> 24 & 255) + (t >>> 8 & 65280) + ((65280 & t) << 8) + ((255 & t) << 24);
  870. function Be() {
  871. this.strm = null, this.mode = 0, this.last = !1, this.wrap = 0, this.havedict = !1, this.flags = 0, this.dmax = 0, this.check = 0, this.total = 0, this.head = null, this.wbits = 0, this.wsize = 0, this.whave = 0, this.wnext = 0, this.window = null, this.hold = 0, this.bits = 0, this.length = 0, this.offset = 0, this.extra = 0, this.lencode = null, this.distcode = null, this.lenbits = 0, this.distbits = 0, this.ncode = 0, this.nlen = 0, this.ndist = 0, this.have = 0, this.next = null, this.lens = new Uint16Array(320), this.work = new Uint16Array(288), this.lendyn = null, this.distdyn = null, this.sane = 0, this.back = 0, this.was = 0
  872. }
  873. const Ce = t => {
  874. if (!t) return 1;
  875. const e = t.state;
  876. return !e || e.strm !== t || e.mode < Ze || e.mode > 16211 ? 1 : 0
  877. },
  878. Me = t => {
  879. if (Ce(t)) return xe;
  880. const e = t.state;
  881. return t.total_in = t.total_out = e.total = 0, t.msg = "", e.wrap && (t.adler = 1 & e.wrap), e.mode = Ze, e.last = 0, e.havedict = 0, e.flags = -1, e.dmax = 32768, e.head = null, e.hold = 0, e.bits = 0, e.lencode = e.lendyn = new Int32Array(852), e.distcode = e.distdyn = new Int32Array(592), e.sane = 1, e.back = -1, ke
  882. },
  883. He = t => {
  884. if (Ce(t)) return xe;
  885. const e = t.state;
  886. return e.wsize = 0, e.whave = 0, e.wnext = 0, Me(t)
  887. },
  888. je = (t, e) => {
  889. let a;
  890. if (Ce(t)) return xe;
  891. const i = t.state;
  892. return e < 0 ? (a = 0, e = -e) : (a = 5 + (e >> 4), e < 48 && (e &= 15)), e && (e < 8 || e > 15) ? xe : (null !== i.window && i.wbits !== e && (i.window = null), i.wrap = a, i.wbits = e, He(t))
  893. },
  894. Ke = (t, e) => {
  895. if (!t) return xe;
  896. const a = new Be;
  897. t.state = a, a.strm = t, a.window = null, a.mode = Ze;
  898. const i = je(t, e);
  899. return i !== ke && (t.state = null), i
  900. };
  901. let Pe, Ye, Ge = !0;
  902. const Xe = t => {
  903. if (Ge) {
  904. Pe = new Int32Array(512), Ye = new Int32Array(32);
  905. let e = 0;
  906. for (; e < 144;) t.lens[e++] = 8;
  907. for (; e < 256;) t.lens[e++] = 9;
  908. for (; e < 280;) t.lens[e++] = 7;
  909. for (; e < 288;) t.lens[e++] = 8;
  910. for (me(1, t.lens, 0, 288, Pe, 0, t.work, {
  911. bits: 9
  912. }), e = 0; e < 32;) t.lens[e++] = 5;
  913. me(2, t.lens, 0, 32, Ye, 0, t.work, {
  914. bits: 5
  915. }), Ge = !1
  916. }
  917. t.lencode = Pe, t.lenbits = 9, t.distcode = Ye, t.distbits = 5
  918. },
  919. We = (t, e, a, i) => {
  920. let n;
  921. const s = t.state;
  922. return null === s.window && (s.wsize = 1 << s.wbits, s.wnext = 0, s.whave = 0, s.window = new Uint8Array(s.wsize)), i >= s.wsize ? (s.window.set(e.subarray(a - s.wsize, a), 0), s.wnext = 0, s.whave = s.wsize) : (n = s.wsize - s.wnext, n > i && (n = i), s.window.set(e.subarray(a - i, a - i + n), s.wnext), (i -= n) ? (s.window.set(e.subarray(a - i, a), 0), s.wnext = i, s.whave = s.wsize) : (s.wnext += n, s.wnext === s.wsize && (s.wnext = 0), s.whave < s.wsize && (s.whave += n))), 0
  923. };
  924. var qe = {
  925. inflateReset: He,
  926. inflateReset2: je,
  927. inflateResetKeep: Me,
  928. inflateInit: t => Ke(t, 15),
  929. inflateInit2: Ke,
  930. inflate: (t, e) => {
  931. let a, i, n, s, r, o, l, h, d, _, f, c, u, w, m, b, g, p, k, v, y, x, z = 0;
  932. const A = new Uint8Array(4);
  933. let E, R;
  934. const Z = new Uint8Array([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]);
  935. if (Ce(t) || !t.output || !t.input && 0 !== t.avail_in) return xe;
  936. a = t.state, a.mode === Se && (a.mode = De), r = t.next_out, n = t.output, l = t.avail_out, s = t.next_in, i = t.input, o = t.avail_in, h = a.hold, d = a.bits, _ = o, f = l, x = ke;
  937. t: for (;;) switch (a.mode) {
  938. case Ze:
  939. if (0 === a.wrap) {
  940. a.mode = De;
  941. break
  942. }
  943. for (; d < 16;) {
  944. if (0 === o) break t;
  945. o--, h += i[s++] << d, d += 8
  946. }
  947. if (2 & a.wrap && 35615 === h) {
  948. 0 === a.wbits && (a.wbits = 15), a.check = 0, A[0] = 255 & h, A[1] = h >>> 8 & 255, a.check = H(a.check, A, 2, 0), h = 0, d = 0, a.mode = 16181;
  949. break
  950. }
  951. if (a.head && (a.head.done = !1), !(1 & a.wrap) || (((255 & h) << 8) + (h >> 8)) % 31) {
  952. t.msg = "incorrect header check", a.mode = Le;
  953. break
  954. }
  955. if ((15 & h) !== Re) {
  956. t.msg = "unknown compression method", a.mode = Le;
  957. break
  958. }
  959. if (h >>>= 4, d -= 4, y = 8 + (15 & h), 0 === a.wbits && (a.wbits = y), y > 15 || y > a.wbits) {
  960. t.msg = "invalid window size", a.mode = Le;
  961. break
  962. }
  963. a.dmax = 1 << a.wbits, a.flags = 0, t.adler = a.check = 1, a.mode = 512 & h ? 16189 : Se, h = 0, d = 0;
  964. break;
  965. case 16181:
  966. for (; d < 16;) {
  967. if (0 === o) break t;
  968. o--, h += i[s++] << d, d += 8
  969. }
  970. if (a.flags = h, (255 & a.flags) !== Re) {
  971. t.msg = "unknown compression method", a.mode = Le;
  972. break
  973. }
  974. if (57344 & a.flags) {
  975. t.msg = "unknown header flags set", a.mode = Le;
  976. break
  977. }
  978. a.head && (a.head.text = h >> 8 & 1), 512 & a.flags && 4 & a.wrap && (A[0] = 255 & h, A[1] = h >>> 8 & 255, a.check = H(a.check, A, 2, 0)), h = 0, d = 0, a.mode = 16182;
  979. case 16182:
  980. for (; d < 32;) {
  981. if (0 === o) break t;
  982. o--, h += i[s++] << d, d += 8
  983. }
  984. a.head && (a.head.time = h), 512 & a.flags && 4 & a.wrap && (A[0] = 255 & h, A[1] = h >>> 8 & 255, A[2] = h >>> 16 & 255, A[3] = h >>> 24 & 255, a.check = H(a.check, A, 4, 0)), h = 0, d = 0, a.mode = 16183;
  985. case 16183:
  986. for (; d < 16;) {
  987. if (0 === o) break t;
  988. o--, h += i[s++] << d, d += 8
  989. }
  990. a.head && (a.head.xflags = 255 & h, a.head.os = h >> 8), 512 & a.flags && 4 & a.wrap && (A[0] = 255 & h, A[1] = h >>> 8 & 255, a.check = H(a.check, A, 2, 0)), h = 0, d = 0, a.mode = 16184;
  991. case 16184:
  992. if (1024 & a.flags) {
  993. for (; d < 16;) {
  994. if (0 === o) break t;
  995. o--, h += i[s++] << d, d += 8
  996. }
  997. a.length = h, a.head && (a.head.extra_len = h), 512 & a.flags && 4 & a.wrap && (A[0] = 255 & h, A[1] = h >>> 8 & 255, a.check = H(a.check, A, 2, 0)), h = 0, d = 0
  998. } else a.head && (a.head.extra = null);
  999. a.mode = 16185;
  1000. case 16185:
  1001. if (1024 & a.flags && (c = a.length, c > o && (c = o), c && (a.head && (y = a.head.extra_len - a.length, a.head.extra || (a.head.extra = new Uint8Array(a.head.extra_len)), a.head.extra.set(i.subarray(s, s + c), y)), 512 & a.flags && 4 & a.wrap && (a.check = H(a.check, i, c, s)), o -= c, s += c, a.length -= c), a.length)) break t;
  1002. a.length = 0, a.mode = 16186;
  1003. case 16186:
  1004. if (2048 & a.flags) {
  1005. if (0 === o) break t;
  1006. c = 0;
  1007. do {
  1008. y = i[s + c++], a.head && y && a.length < 65536 && (a.head.name += String.fromCharCode(y))
  1009. } while (y && c < o);
  1010. if (512 & a.flags && 4 & a.wrap && (a.check = H(a.check, i, c, s)), o -= c, s += c, y) break t
  1011. } else a.head && (a.head.name = null);
  1012. a.length = 0, a.mode = 16187;
  1013. case 16187:
  1014. if (4096 & a.flags) {
  1015. if (0 === o) break t;
  1016. c = 0;
  1017. do {
  1018. y = i[s + c++], a.head && y && a.length < 65536 && (a.head.comment += String.fromCharCode(y))
  1019. } while (y && c < o);
  1020. if (512 & a.flags && 4 & a.wrap && (a.check = H(a.check, i, c, s)), o -= c, s += c, y) break t
  1021. } else a.head && (a.head.comment = null);
  1022. a.mode = 16188;
  1023. case 16188:
  1024. if (512 & a.flags) {
  1025. for (; d < 16;) {
  1026. if (0 === o) break t;
  1027. o--, h += i[s++] << d, d += 8
  1028. }
  1029. if (4 & a.wrap && h !== (65535 & a.check)) {
  1030. t.msg = "header crc mismatch", a.mode = Le;
  1031. break
  1032. }
  1033. h = 0, d = 0
  1034. }
  1035. a.head && (a.head.hcrc = a.flags >> 9 & 1, a.head.done = !0), t.adler = a.check = 0, a.mode = Se;
  1036. break;
  1037. case 16189:
  1038. for (; d < 32;) {
  1039. if (0 === o) break t;
  1040. o--, h += i[s++] << d, d += 8
  1041. }
  1042. t.adler = a.check = Ne(h), h = 0, d = 0, a.mode = Ue;
  1043. case Ue:
  1044. if (0 === a.havedict) return t.next_out = r, t.avail_out = l, t.next_in = s, t.avail_in = o, a.hold = h, a.bits = d, ye;
  1045. t.adler = a.check = 1, a.mode = Se;
  1046. case Se:
  1047. if (e === ge || e === pe) break t;
  1048. case De:
  1049. if (a.last) {
  1050. h >>>= 7 & d, d -= 7 & d, a.mode = Fe;
  1051. break
  1052. }
  1053. for (; d < 3;) {
  1054. if (0 === o) break t;
  1055. o--, h += i[s++] << d, d += 8
  1056. }
  1057. switch (a.last = 1 & h, h >>>= 1, d -= 1, 3 & h) {
  1058. case 0:
  1059. a.mode = 16193;
  1060. break;
  1061. case 1:
  1062. if (Xe(a), a.mode = Oe, e === pe) {
  1063. h >>>= 2, d -= 2;
  1064. break t
  1065. }
  1066. break;
  1067. case 2:
  1068. a.mode = 16196;
  1069. break;
  1070. case 3:
  1071. t.msg = "invalid block type", a.mode = Le
  1072. }
  1073. h >>>= 2, d -= 2;
  1074. break;
  1075. case 16193:
  1076. for (h >>>= 7 & d, d -= 7 & d; d < 32;) {
  1077. if (0 === o) break t;
  1078. o--, h += i[s++] << d, d += 8
  1079. }
  1080. if ((65535 & h) != (h >>> 16 ^ 65535)) {
  1081. t.msg = "invalid stored block lengths", a.mode = Le;
  1082. break
  1083. }
  1084. if (a.length = 65535 & h, h = 0, d = 0, a.mode = Te, e === pe) break t;
  1085. case Te:
  1086. a.mode = 16195;
  1087. case 16195:
  1088. if (c = a.length, c) {
  1089. if (c > o && (c = o), c > l && (c = l), 0 === c) break t;
  1090. n.set(i.subarray(s, s + c), r), o -= c, s += c, l -= c, r += c, a.length -= c;
  1091. break
  1092. }
  1093. a.mode = Se;
  1094. break;
  1095. case 16196:
  1096. for (; d < 14;) {
  1097. if (0 === o) break t;
  1098. o--, h += i[s++] << d, d += 8
  1099. }
  1100. if (a.nlen = 257 + (31 & h), h >>>= 5, d -= 5, a.ndist = 1 + (31 & h), h >>>= 5, d -= 5, a.ncode = 4 + (15 & h), h >>>= 4, d -= 4, a.nlen > 286 || a.ndist > 30) {
  1101. t.msg = "too many length or distance symbols", a.mode = Le;
  1102. break
  1103. }
  1104. a.have = 0, a.mode = 16197;
  1105. case 16197:
  1106. for (; a.have < a.ncode;) {
  1107. for (; d < 3;) {
  1108. if (0 === o) break t;
  1109. o--, h += i[s++] << d, d += 8
  1110. }
  1111. a.lens[Z[a.have++]] = 7 & h, h >>>= 3, d -= 3
  1112. }
  1113. for (; a.have < 19;) a.lens[Z[a.have++]] = 0;
  1114. if (a.lencode = a.lendyn, a.lenbits = 7, E = {
  1115. bits: a.lenbits
  1116. }, x = me(0, a.lens, 0, 19, a.lencode, 0, a.work, E), a.lenbits = E.bits, x) {
  1117. t.msg = "invalid code lengths set", a.mode = Le;
  1118. break
  1119. }
  1120. a.have = 0, a.mode = 16198;
  1121. case 16198:
  1122. for (; a.have < a.nlen + a.ndist;) {
  1123. for (; z = a.lencode[h & (1 << a.lenbits) - 1], m = z >>> 24, b = z >>> 16 & 255, g = 65535 & z, !(m <= d);) {
  1124. if (0 === o) break t;
  1125. o--, h += i[s++] << d, d += 8
  1126. }
  1127. if (g < 16) h >>>= m, d -= m, a.lens[a.have++] = g;
  1128. else {
  1129. if (16 === g) {
  1130. for (R = m + 2; d < R;) {
  1131. if (0 === o) break t;
  1132. o--, h += i[s++] << d, d += 8
  1133. }
  1134. if (h >>>= m, d -= m, 0 === a.have) {
  1135. t.msg = "invalid bit length repeat", a.mode = Le;
  1136. break
  1137. }
  1138. y = a.lens[a.have - 1], c = 3 + (3 & h), h >>>= 2, d -= 2
  1139. } else if (17 === g) {
  1140. for (R = m + 3; d < R;) {
  1141. if (0 === o) break t;
  1142. o--, h += i[s++] << d, d += 8
  1143. }
  1144. h >>>= m, d -= m, y = 0, c = 3 + (7 & h), h >>>= 3, d -= 3
  1145. } else {
  1146. for (R = m + 7; d < R;) {
  1147. if (0 === o) break t;
  1148. o--, h += i[s++] << d, d += 8
  1149. }
  1150. h >>>= m, d -= m, y = 0, c = 11 + (127 & h), h >>>= 7, d -= 7
  1151. }
  1152. if (a.have + c > a.nlen + a.ndist) {
  1153. t.msg = "invalid bit length repeat", a.mode = Le;
  1154. break
  1155. }
  1156. for (; c--;) a.lens[a.have++] = y
  1157. }
  1158. }
  1159. if (a.mode === Le) break;
  1160. if (0 === a.lens[256]) {
  1161. t.msg = "invalid code -- missing end-of-block", a.mode = Le;
  1162. break
  1163. }
  1164. if (a.lenbits = 9, E = {
  1165. bits: a.lenbits
  1166. }, x = me(1, a.lens, 0, a.nlen, a.lencode, 0, a.work, E), a.lenbits = E.bits, x) {
  1167. t.msg = "invalid literal/lengths set", a.mode = Le;
  1168. break
  1169. }
  1170. if (a.distbits = 6, a.distcode = a.distdyn, E = {
  1171. bits: a.distbits
  1172. }, x = me(2, a.lens, a.nlen, a.ndist, a.distcode, 0, a.work, E), a.distbits = E.bits, x) {
  1173. t.msg = "invalid distances set", a.mode = Le;
  1174. break
  1175. }
  1176. if (a.mode = Oe, e === pe) break t;
  1177. case Oe:
  1178. a.mode = Ie;
  1179. case Ie:
  1180. if (o >= 6 && l >= 258) {
  1181. t.next_out = r, t.avail_out = l, t.next_in = s, t.avail_in = o, a.hold = h, a.bits = d, de(t, f), r = t.next_out, n = t.output, l = t.avail_out, s = t.next_in, i = t.input, o = t.avail_in, h = a.hold, d = a.bits, a.mode === Se && (a.back = -1);
  1182. break
  1183. }
  1184. for (a.back = 0; z = a.lencode[h & (1 << a.lenbits) - 1], m = z >>> 24, b = z >>> 16 & 255, g = 65535 & z, !(m <= d);) {
  1185. if (0 === o) break t;
  1186. o--, h += i[s++] << d, d += 8
  1187. }
  1188. if (b && 0 == (240 & b)) {
  1189. for (p = m, k = b, v = g; z = a.lencode[v + ((h & (1 << p + k) - 1) >> p)], m = z >>> 24, b = z >>> 16 & 255, g = 65535 & z, !(p + m <= d);) {
  1190. if (0 === o) break t;
  1191. o--, h += i[s++] << d, d += 8
  1192. }
  1193. h >>>= p, d -= p, a.back += p
  1194. }
  1195. if (h >>>= m, d -= m, a.back += m, a.length = g, 0 === b) {
  1196. a.mode = 16205;
  1197. break
  1198. }
  1199. if (32 & b) {
  1200. a.back = -1, a.mode = Se;
  1201. break
  1202. }
  1203. if (64 & b) {
  1204. t.msg = "invalid literal/length code", a.mode = Le;
  1205. break
  1206. }
  1207. a.extra = 15 & b, a.mode = 16201;
  1208. case 16201:
  1209. if (a.extra) {
  1210. for (R = a.extra; d < R;) {
  1211. if (0 === o) break t;
  1212. o--, h += i[s++] << d, d += 8
  1213. }
  1214. a.length += h & (1 << a.extra) - 1, h >>>= a.extra, d -= a.extra, a.back += a.extra
  1215. }
  1216. a.was = a.length, a.mode = 16202;
  1217. case 16202:
  1218. for (; z = a.distcode[h & (1 << a.distbits) - 1], m = z >>> 24, b = z >>> 16 & 255, g = 65535 & z, !(m <= d);) {
  1219. if (0 === o) break t;
  1220. o--, h += i[s++] << d, d += 8
  1221. }
  1222. if (0 == (240 & b)) {
  1223. for (p = m, k = b, v = g; z = a.distcode[v + ((h & (1 << p + k) - 1) >> p)], m = z >>> 24, b = z >>> 16 & 255, g = 65535 & z, !(p + m <= d);) {
  1224. if (0 === o) break t;
  1225. o--, h += i[s++] << d, d += 8
  1226. }
  1227. h >>>= p, d -= p, a.back += p
  1228. }
  1229. if (h >>>= m, d -= m, a.back += m, 64 & b) {
  1230. t.msg = "invalid distance code", a.mode = Le;
  1231. break
  1232. }
  1233. a.offset = g, a.extra = 15 & b, a.mode = 16203;
  1234. case 16203:
  1235. if (a.extra) {
  1236. for (R = a.extra; d < R;) {
  1237. if (0 === o) break t;
  1238. o--, h += i[s++] << d, d += 8
  1239. }
  1240. a.offset += h & (1 << a.extra) - 1, h >>>= a.extra, d -= a.extra, a.back += a.extra
  1241. }
  1242. if (a.offset > a.dmax) {
  1243. t.msg = "invalid distance too far back", a.mode = Le;
  1244. break
  1245. }
  1246. a.mode = 16204;
  1247. case 16204:
  1248. if (0 === l) break t;
  1249. if (c = f - l, a.offset > c) {
  1250. if (c = a.offset - c, c > a.whave && a.sane) {
  1251. t.msg = "invalid distance too far back", a.mode = Le;
  1252. break
  1253. }
  1254. c > a.wnext ? (c -= a.wnext, u = a.wsize - c) : u = a.wnext - c, c > a.length && (c = a.length), w = a.window
  1255. } else w = n, u = r - a.offset, c = a.length;
  1256. c > l && (c = l), l -= c, a.length -= c;
  1257. do {
  1258. n[r++] = w[u++]
  1259. } while (--c);
  1260. 0 === a.length && (a.mode = Ie);
  1261. break;
  1262. case 16205:
  1263. if (0 === l) break t;
  1264. n[r++] = a.length, l--, a.mode = Ie;
  1265. break;
  1266. case Fe:
  1267. if (a.wrap) {
  1268. for (; d < 32;) {
  1269. if (0 === o) break t;
  1270. o--, h |= i[s++] << d, d += 8
  1271. }
  1272. if (f -= l, t.total_out += f, a.total += f, 4 & a.wrap && f && (t.adler = a.check = a.flags ? H(a.check, n, f, r - f) : C(a.check, n, f, r - f)), f = l, 4 & a.wrap && (a.flags ? h : Ne(h)) !== a.check) {
  1273. t.msg = "incorrect data check", a.mode = Le;
  1274. break
  1275. }
  1276. h = 0, d = 0
  1277. }
  1278. a.mode = 16207;
  1279. case 16207:
  1280. if (a.wrap && a.flags) {
  1281. for (; d < 32;) {
  1282. if (0 === o) break t;
  1283. o--, h += i[s++] << d, d += 8
  1284. }
  1285. if (4 & a.wrap && h !== (4294967295 & a.total)) {
  1286. t.msg = "incorrect length check", a.mode = Le;
  1287. break
  1288. }
  1289. h = 0, d = 0
  1290. }
  1291. a.mode = 16208;
  1292. case 16208:
  1293. x = ve;
  1294. break t;
  1295. case Le:
  1296. x = ze;
  1297. break t;
  1298. case 16210:
  1299. return Ae;
  1300. default:
  1301. return xe
  1302. }
  1303. return t.next_out = r, t.avail_out = l, t.next_in = s, t.avail_in = o, a.hold = h, a.bits = d, (a.wsize || f !== t.avail_out && a.mode < Le && (a.mode < Fe || e !== be)) && We(t, t.output, t.next_out, f - t.avail_out), _ -= t.avail_in, f -= t.avail_out, t.total_in += _, t.total_out += f, a.total += f, 4 & a.wrap && f && (t.adler = a.check = a.flags ? H(a.check, n, f, t.next_out - f) : C(a.check, n, f, t.next_out - f)), t.data_type = a.bits + (a.last ? 64 : 0) + (a.mode === Se ? 128 : 0) + (a.mode === Oe || a.mode === Te ? 256 : 0), (0 === _ && 0 === f || e === be) && x === ke && (x = Ee), x
  1304. },
  1305. inflateEnd: t => {
  1306. if (Ce(t)) return xe;
  1307. let e = t.state;
  1308. return e.window && (e.window = null), t.state = null, ke
  1309. },
  1310. inflateGetHeader: (t, e) => {
  1311. if (Ce(t)) return xe;
  1312. const a = t.state;
  1313. return 0 == (2 & a.wrap) ? xe : (a.head = e, e.done = !1, ke)
  1314. },
  1315. inflateSetDictionary: (t, e) => {
  1316. const a = e.length;
  1317. let i, n, s;
  1318. return Ce(t) ? xe : (i = t.state, 0 !== i.wrap && i.mode !== Ue ? xe : i.mode === Ue && (n = 1, n = C(n, e, a, 0), n !== i.check) ? ze : (s = We(t, e, a, a), s ? (i.mode = 16210, Ae) : (i.havedict = 1, ke)))
  1319. },
  1320. inflateInfo: "pako inflate (from Nodeca project)"
  1321. };
  1322. var Je = function() {
  1323. this.text = 0, this.time = 0, this.xflags = 0, this.os = 0, this.extra = null, this.extra_len = 0, this.name = "", this.comment = "", this.hcrc = 0, this.done = !1
  1324. };
  1325. const Qe = Object.prototype.toString,
  1326. {
  1327. Z_NO_FLUSH: Ve,
  1328. Z_FINISH: $e,
  1329. Z_OK: ta,
  1330. Z_STREAM_END: ea,
  1331. Z_NEED_DICT: aa,
  1332. Z_STREAM_ERROR: ia,
  1333. Z_DATA_ERROR: na,
  1334. Z_MEM_ERROR: sa
  1335. } = K;
  1336. function ra(t) {
  1337. this.options = jt({
  1338. chunkSize: 65536,
  1339. windowBits: 15,
  1340. to: ""
  1341. }, t || {});
  1342. const e = this.options;
  1343. e.raw && e.windowBits >= 0 && e.windowBits < 16 && (e.windowBits = -e.windowBits, 0 === e.windowBits && (e.windowBits = -15)), !(e.windowBits >= 0 && e.windowBits < 16) || t && t.windowBits || (e.windowBits += 32), e.windowBits > 15 && e.windowBits < 48 && 0 == (15 & e.windowBits) && (e.windowBits |= 15), this.err = 0, this.msg = "", this.ended = !1, this.chunks = [], this.strm = new qt, this.strm.avail_out = 0;
  1344. let a = qe.inflateInit2(this.strm, e.windowBits);
  1345. if (a !== ta) throw new Error(j[a]);
  1346. if (this.header = new Je, qe.inflateGetHeader(this.strm, this.header), e.dictionary && ("string" == typeof e.dictionary ? e.dictionary = Gt(e.dictionary) : "[object ArrayBuffer]" === Qe.call(e.dictionary) && (e.dictionary = new Uint8Array(e.dictionary)), e.raw && (a = qe.inflateSetDictionary(this.strm, e.dictionary), a !== ta))) throw new Error(j[a])
  1347. }
  1348. function oa(t, e) {
  1349. const a = new ra(e);
  1350. if (a.push(t), a.err) throw a.msg || j[a.err];
  1351. return a.result
  1352. }
  1353. ra.prototype.push = function(t, e) {
  1354. const a = this.strm,
  1355. i = this.options.chunkSize,
  1356. n = this.options.dictionary;
  1357. let s, r, o;
  1358. if (this.ended) return !1;
  1359. for (r = e === ~~e ? e : !0 === e ? $e : Ve, "[object ArrayBuffer]" === Qe.call(t) ? a.input = new Uint8Array(t) : a.input = t, a.next_in = 0, a.avail_in = a.input.length;;) {
  1360. for (0 === a.avail_out && (a.output = new Uint8Array(i), a.next_out = 0, a.avail_out = i), s = qe.inflate(a, r), s === aa && n && (s = qe.inflateSetDictionary(a, n), s === ta ? s = qe.inflate(a, r) : s === na && (s = aa)); a.avail_in > 0 && s === ea && a.state.wrap > 0 && 0 !== t[a.next_in];) qe.inflateReset(a), s = qe.inflate(a, r);
  1361. switch (s) {
  1362. case ia:
  1363. case na:
  1364. case aa:
  1365. case sa:
  1366. return this.onEnd(s), this.ended = !0, !1
  1367. }
  1368. if (o = a.avail_out, a.next_out && (0 === a.avail_out || s === ea))
  1369. if ("string" === this.options.to) {
  1370. let t = Wt(a.output, a.next_out),
  1371. e = a.next_out - t,
  1372. n = Xt(a.output, t);
  1373. a.next_out = e, a.avail_out = i - e, e && a.output.set(a.output.subarray(t, t + e), 0), this.onData(n)
  1374. } else this.onData(a.output.length === a.next_out ? a.output : a.output.subarray(0, a.next_out));
  1375. if (s !== ta || 0 !== o) {
  1376. if (s === ea) return s = qe.inflateEnd(this.strm), this.onEnd(s), this.ended = !0, !0;
  1377. if (0 === a.avail_in) break
  1378. }
  1379. }
  1380. return !0
  1381. }, ra.prototype.onData = function(t) {
  1382. this.chunks.push(t)
  1383. }, ra.prototype.onEnd = function(t) {
  1384. t === ta && ("string" === this.options.to ? this.result = this.chunks.join("") : this.result = Kt(this.chunks)), this.chunks = [], this.err = t, this.msg = this.strm.msg
  1385. };
  1386. var la = {
  1387. Inflate: ra,
  1388. inflate: oa,
  1389. inflateRaw: function(t, e) {
  1390. return (e = e || {}).raw = !0, oa(t, e)
  1391. },
  1392. ungzip: oa,
  1393. constants: K
  1394. };
  1395. const {
  1396. Deflate: ha,
  1397. deflate: da,
  1398. deflateRaw: _a,
  1399. gzip: fa
  1400. } = le, {
  1401. Inflate: ca,
  1402. inflate: ua,
  1403. inflateRaw: wa,
  1404. ungzip: ma
  1405. } = la;
  1406. var ba = ha,
  1407. ga = da,
  1408. pa = _a,
  1409. ka = fa,
  1410. va = ca,
  1411. ya = ua,
  1412. xa = wa,
  1413. za = ma,
  1414. Aa = K,
  1415. Ea = {
  1416. Deflate: ba,
  1417. deflate: ga,
  1418. deflateRaw: pa,
  1419. gzip: ka,
  1420. Inflate: va,
  1421. inflate: ya,
  1422. inflateRaw: xa,
  1423. ungzip: za,
  1424. constants: Aa
  1425. };
  1426. t.Deflate = ba, t.Inflate = va, t.constants = Aa, t.default = Ea, t.deflate = ga, t.deflateRaw = pa, t.gzip = ka, t.inflate = ya, t.inflateRaw = xa, t.ungzip = za, Object.defineProperty(t, "__esModule", {
  1427. value: !0
  1428. })
  1429. }));