@datapos/datapos-tool-csv-parse 0.0.36 → 0.0.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -30,28 +30,28 @@ function Qe(t) {
30
30
  o.push(Xt(t, f, f + s > l ? l : f + s));
31
31
  return n === 1 ? (e = t[r - 1], i += P[e >> 2], i += P[e << 4 & 63], i += "==") : n === 2 && (e = (t[r - 2] << 8) + t[r - 1], i += P[e >> 10], i += P[e >> 4 & 63], i += P[e << 2 & 63], i += "="), o.push(i), o.join("");
32
32
  }
33
- function be(t, e, r, n, i) {
34
- var o, s, f = i * 8 - n - 1, l = (1 << f) - 1, u = l >> 1, h = -7, c = r ? i - 1 : 0, w = r ? -1 : 1, p = t[e + c];
35
- for (c += w, o = p & (1 << -h) - 1, p >>= -h, h += f; h > 0; o = o * 256 + t[e + c], c += w, h -= 8)
33
+ function ve(t, e, r, n, i) {
34
+ var o, s, f = i * 8 - n - 1, l = (1 << f) - 1, u = l >> 1, h = -7, c = r ? i - 1 : 0, m = r ? -1 : 1, w = t[e + c];
35
+ for (c += m, o = w & (1 << -h) - 1, w >>= -h, h += f; h > 0; o = o * 256 + t[e + c], c += m, h -= 8)
36
36
  ;
37
- for (s = o & (1 << -h) - 1, o >>= -h, h += n; h > 0; s = s * 256 + t[e + c], c += w, h -= 8)
37
+ for (s = o & (1 << -h) - 1, o >>= -h, h += n; h > 0; s = s * 256 + t[e + c], c += m, h -= 8)
38
38
  ;
39
39
  if (o === 0)
40
40
  o = 1 - u;
41
41
  else {
42
42
  if (o === l)
43
- return s ? NaN : (p ? -1 : 1) * (1 / 0);
43
+ return s ? NaN : (w ? -1 : 1) * (1 / 0);
44
44
  s = s + Math.pow(2, n), o = o - u;
45
45
  }
46
- return (p ? -1 : 1) * s * Math.pow(2, o - n);
46
+ return (w ? -1 : 1) * s * Math.pow(2, o - n);
47
47
  }
48
48
  function ht(t, e, r, n, i, o) {
49
- var s, f, l, u = o * 8 - i - 1, h = (1 << u) - 1, c = h >> 1, w = i === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, p = n ? 0 : o - 1, I = n ? 1 : -1, m = e < 0 || e === 0 && 1 / e < 0 ? 1 : 0;
50
- for (e = Math.abs(e), isNaN(e) || e === 1 / 0 ? (f = isNaN(e) ? 1 : 0, s = h) : (s = Math.floor(Math.log(e) / Math.LN2), e * (l = Math.pow(2, -s)) < 1 && (s--, l *= 2), s + c >= 1 ? e += w / l : e += w * Math.pow(2, 1 - c), e * l >= 2 && (s++, l /= 2), s + c >= h ? (f = 0, s = h) : s + c >= 1 ? (f = (e * l - 1) * Math.pow(2, i), s = s + c) : (f = e * Math.pow(2, c - 1) * Math.pow(2, i), s = 0)); i >= 8; t[r + p] = f & 255, p += I, f /= 256, i -= 8)
49
+ var s, f, l, u = o * 8 - i - 1, h = (1 << u) - 1, c = h >> 1, m = i === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, w = n ? 0 : o - 1, O = n ? 1 : -1, E = e < 0 || e === 0 && 1 / e < 0 ? 1 : 0;
50
+ for (e = Math.abs(e), isNaN(e) || e === 1 / 0 ? (f = isNaN(e) ? 1 : 0, s = h) : (s = Math.floor(Math.log(e) / Math.LN2), e * (l = Math.pow(2, -s)) < 1 && (s--, l *= 2), s + c >= 1 ? e += m / l : e += m * Math.pow(2, 1 - c), e * l >= 2 && (s++, l /= 2), s + c >= h ? (f = 0, s = h) : s + c >= 1 ? (f = (e * l - 1) * Math.pow(2, i), s = s + c) : (f = e * Math.pow(2, c - 1) * Math.pow(2, i), s = 0)); i >= 8; t[r + w] = f & 255, w += O, f /= 256, i -= 8)
51
51
  ;
52
- for (s = s << i | f, u += i; u > 0; t[r + p] = s & 255, p += I, s /= 256, u -= 8)
52
+ for (s = s << i | f, u += i; u > 0; t[r + w] = s & 255, w += O, s /= 256, u -= 8)
53
53
  ;
54
- t[r + p - I] |= m * 128;
54
+ t[r + w - O] |= E * 128;
55
55
  }
56
56
  var Kt = {}.toString, ct = Array.isArray || function(t) {
57
57
  return Kt.call(t) == "[object Array]";
@@ -155,7 +155,7 @@ function qe(t) {
155
155
  throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + _e().toString(16) + " bytes");
156
156
  return t | 0;
157
157
  }
158
- a.isBuffer = L;
158
+ a.isBuffer = N;
159
159
  function $(t) {
160
160
  return !!(t != null && t._isBuffer);
161
161
  }
@@ -348,8 +348,8 @@ function Ge(t, e, r, n, i) {
348
348
  return -1;
349
349
  o = 2, s /= 2, f /= 2, r /= 2;
350
350
  }
351
- function l(p, I) {
352
- return o === 1 ? p[I] : p.readUInt16BE(I * o);
351
+ function l(w, O) {
352
+ return o === 1 ? w[O] : w.readUInt16BE(O * o);
353
353
  }
354
354
  var u;
355
355
  if (i) {
@@ -361,8 +361,8 @@ function Ge(t, e, r, n, i) {
361
361
  h !== -1 && (u -= u - h), h = -1;
362
362
  } else
363
363
  for (r + f > s && (r = s - f), u = r; u >= 0; u--) {
364
- for (var c = !0, w = 0; w < f; w++)
365
- if (l(t, u + w) !== l(e, w)) {
364
+ for (var c = !0, m = 0; m < f; m++)
365
+ if (l(t, u + m) !== l(e, m)) {
366
366
  c = !1;
367
367
  break;
368
368
  }
@@ -397,7 +397,7 @@ function fr(t, e, r, n) {
397
397
  return xe(we(e, t.length - r), t, r, n);
398
398
  }
399
399
  function _t(t, e, r, n) {
400
- return xe(vr(e), t, r, n);
400
+ return xe(br(e), t, r, n);
401
401
  }
402
402
  function ar(t, e, r, n) {
403
403
  return _t(t, e, r, n);
@@ -510,7 +510,7 @@ function gr(t, e, r) {
510
510
  var n = t.length;
511
511
  (!e || e < 0) && (e = 0), (!r || r < 0 || r > n) && (r = n);
512
512
  for (var i = "", o = e; o < r; ++o)
513
- i += br(t[o]);
513
+ i += vr(t[o]);
514
514
  return i;
515
515
  }
516
516
  function mr(t, e, r) {
@@ -532,81 +532,81 @@ a.prototype.slice = function(e, r) {
532
532
  }
533
533
  return i;
534
534
  };
535
- function C(t, e, r) {
535
+ function A(t, e, r) {
536
536
  if (t % 1 !== 0 || t < 0) throw new RangeError("offset is not uint");
537
537
  if (t + e > r) throw new RangeError("Trying to access beyond buffer length");
538
538
  }
539
539
  a.prototype.readUIntLE = function(e, r, n) {
540
- e = e | 0, r = r | 0, n || C(e, r, this.length);
540
+ e = e | 0, r = r | 0, n || A(e, r, this.length);
541
541
  for (var i = this[e], o = 1, s = 0; ++s < r && (o *= 256); )
542
542
  i += this[e + s] * o;
543
543
  return i;
544
544
  };
545
545
  a.prototype.readUIntBE = function(e, r, n) {
546
- e = e | 0, r = r | 0, n || C(e, r, this.length);
546
+ e = e | 0, r = r | 0, n || A(e, r, this.length);
547
547
  for (var i = this[e + --r], o = 1; r > 0 && (o *= 256); )
548
548
  i += this[e + --r] * o;
549
549
  return i;
550
550
  };
551
551
  a.prototype.readUInt8 = function(e, r) {
552
- return r || C(e, 1, this.length), this[e];
552
+ return r || A(e, 1, this.length), this[e];
553
553
  };
554
554
  a.prototype.readUInt16LE = function(e, r) {
555
- return r || C(e, 2, this.length), this[e] | this[e + 1] << 8;
555
+ return r || A(e, 2, this.length), this[e] | this[e + 1] << 8;
556
556
  };
557
557
  a.prototype.readUInt16BE = function(e, r) {
558
- return r || C(e, 2, this.length), this[e] << 8 | this[e + 1];
558
+ return r || A(e, 2, this.length), this[e] << 8 | this[e + 1];
559
559
  };
560
560
  a.prototype.readUInt32LE = function(e, r) {
561
- return r || C(e, 4, this.length), (this[e] | this[e + 1] << 8 | this[e + 2] << 16) + this[e + 3] * 16777216;
561
+ return r || A(e, 4, this.length), (this[e] | this[e + 1] << 8 | this[e + 2] << 16) + this[e + 3] * 16777216;
562
562
  };
563
563
  a.prototype.readUInt32BE = function(e, r) {
564
- return r || C(e, 4, this.length), this[e] * 16777216 + (this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3]);
564
+ return r || A(e, 4, this.length), this[e] * 16777216 + (this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3]);
565
565
  };
566
566
  a.prototype.readIntLE = function(e, r, n) {
567
- e = e | 0, r = r | 0, n || C(e, r, this.length);
567
+ e = e | 0, r = r | 0, n || A(e, r, this.length);
568
568
  for (var i = this[e], o = 1, s = 0; ++s < r && (o *= 256); )
569
569
  i += this[e + s] * o;
570
570
  return o *= 128, i >= o && (i -= Math.pow(2, 8 * r)), i;
571
571
  };
572
572
  a.prototype.readIntBE = function(e, r, n) {
573
- e = e | 0, r = r | 0, n || C(e, r, this.length);
573
+ e = e | 0, r = r | 0, n || A(e, r, this.length);
574
574
  for (var i = r, o = 1, s = this[e + --i]; i > 0 && (o *= 256); )
575
575
  s += this[e + --i] * o;
576
576
  return o *= 128, s >= o && (s -= Math.pow(2, 8 * r)), s;
577
577
  };
578
578
  a.prototype.readInt8 = function(e, r) {
579
- return r || C(e, 1, this.length), this[e] & 128 ? (255 - this[e] + 1) * -1 : this[e];
579
+ return r || A(e, 1, this.length), this[e] & 128 ? (255 - this[e] + 1) * -1 : this[e];
580
580
  };
581
581
  a.prototype.readInt16LE = function(e, r) {
582
- r || C(e, 2, this.length);
582
+ r || A(e, 2, this.length);
583
583
  var n = this[e] | this[e + 1] << 8;
584
584
  return n & 32768 ? n | 4294901760 : n;
585
585
  };
586
586
  a.prototype.readInt16BE = function(e, r) {
587
- r || C(e, 2, this.length);
587
+ r || A(e, 2, this.length);
588
588
  var n = this[e + 1] | this[e] << 8;
589
589
  return n & 32768 ? n | 4294901760 : n;
590
590
  };
591
591
  a.prototype.readInt32LE = function(e, r) {
592
- return r || C(e, 4, this.length), this[e] | this[e + 1] << 8 | this[e + 2] << 16 | this[e + 3] << 24;
592
+ return r || A(e, 4, this.length), this[e] | this[e + 1] << 8 | this[e + 2] << 16 | this[e + 3] << 24;
593
593
  };
594
594
  a.prototype.readInt32BE = function(e, r) {
595
- return r || C(e, 4, this.length), this[e] << 24 | this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3];
595
+ return r || A(e, 4, this.length), this[e] << 24 | this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3];
596
596
  };
597
597
  a.prototype.readFloatLE = function(e, r) {
598
- return r || C(e, 4, this.length), be(this, e, !0, 23, 4);
598
+ return r || A(e, 4, this.length), ve(this, e, !0, 23, 4);
599
599
  };
600
600
  a.prototype.readFloatBE = function(e, r) {
601
- return r || C(e, 4, this.length), be(this, e, !1, 23, 4);
601
+ return r || A(e, 4, this.length), ve(this, e, !1, 23, 4);
602
602
  };
603
603
  a.prototype.readDoubleLE = function(e, r) {
604
- return r || C(e, 8, this.length), be(this, e, !0, 52, 8);
604
+ return r || A(e, 8, this.length), ve(this, e, !0, 52, 8);
605
605
  };
606
606
  a.prototype.readDoubleBE = function(e, r) {
607
- return r || C(e, 8, this.length), be(this, e, !1, 52, 8);
607
+ return r || A(e, 8, this.length), ve(this, e, !1, 52, 8);
608
608
  };
609
- function N(t, e, r, n, i, o) {
609
+ function D(t, e, r, n, i, o) {
610
610
  if (!$(t)) throw new TypeError('"buffer" argument must be a Buffer instance');
611
611
  if (e > i || e < o) throw new RangeError('"value" argument is out of bounds');
612
612
  if (r + n > t.length) throw new RangeError("Index out of range");
@@ -614,7 +614,7 @@ function N(t, e, r, n, i, o) {
614
614
  a.prototype.writeUIntLE = function(e, r, n, i) {
615
615
  if (e = +e, r = r | 0, n = n | 0, !i) {
616
616
  var o = Math.pow(2, 8 * n) - 1;
617
- N(this, e, r, n, o, 0);
617
+ D(this, e, r, n, o, 0);
618
618
  }
619
619
  var s = 1, f = 0;
620
620
  for (this[r] = e & 255; ++f < n && (s *= 256); )
@@ -624,7 +624,7 @@ a.prototype.writeUIntLE = function(e, r, n, i) {
624
624
  a.prototype.writeUIntBE = function(e, r, n, i) {
625
625
  if (e = +e, r = r | 0, n = n | 0, !i) {
626
626
  var o = Math.pow(2, 8 * n) - 1;
627
- N(this, e, r, n, o, 0);
627
+ D(this, e, r, n, o, 0);
628
628
  }
629
629
  var s = n - 1, f = 1;
630
630
  for (this[r + s] = e & 255; --s >= 0 && (f *= 256); )
@@ -632,18 +632,18 @@ a.prototype.writeUIntBE = function(e, r, n, i) {
632
632
  return r + n;
633
633
  };
634
634
  a.prototype.writeUInt8 = function(e, r, n) {
635
- return e = +e, r = r | 0, n || N(this, e, r, 1, 255, 0), a.TYPED_ARRAY_SUPPORT || (e = Math.floor(e)), this[r] = e & 255, r + 1;
635
+ return e = +e, r = r | 0, n || D(this, e, r, 1, 255, 0), a.TYPED_ARRAY_SUPPORT || (e = Math.floor(e)), this[r] = e & 255, r + 1;
636
636
  };
637
- function ve(t, e, r, n) {
637
+ function be(t, e, r, n) {
638
638
  e < 0 && (e = 65535 + e + 1);
639
639
  for (var i = 0, o = Math.min(t.length - r, 2); i < o; ++i)
640
640
  t[r + i] = (e & 255 << 8 * (n ? i : 1 - i)) >>> (n ? i : 1 - i) * 8;
641
641
  }
642
642
  a.prototype.writeUInt16LE = function(e, r, n) {
643
- return e = +e, r = r | 0, n || N(this, e, r, 2, 65535, 0), a.TYPED_ARRAY_SUPPORT ? (this[r] = e & 255, this[r + 1] = e >>> 8) : ve(this, e, r, !0), r + 2;
643
+ return e = +e, r = r | 0, n || D(this, e, r, 2, 65535, 0), a.TYPED_ARRAY_SUPPORT ? (this[r] = e & 255, this[r + 1] = e >>> 8) : be(this, e, r, !0), r + 2;
644
644
  };
645
645
  a.prototype.writeUInt16BE = function(e, r, n) {
646
- return e = +e, r = r | 0, n || N(this, e, r, 2, 65535, 0), a.TYPED_ARRAY_SUPPORT ? (this[r] = e >>> 8, this[r + 1] = e & 255) : ve(this, e, r, !1), r + 2;
646
+ return e = +e, r = r | 0, n || D(this, e, r, 2, 65535, 0), a.TYPED_ARRAY_SUPPORT ? (this[r] = e >>> 8, this[r + 1] = e & 255) : be(this, e, r, !1), r + 2;
647
647
  };
648
648
  function Ee(t, e, r, n) {
649
649
  e < 0 && (e = 4294967295 + e + 1);
@@ -651,15 +651,15 @@ function Ee(t, e, r, n) {
651
651
  t[r + i] = e >>> (n ? i : 3 - i) * 8 & 255;
652
652
  }
653
653
  a.prototype.writeUInt32LE = function(e, r, n) {
654
- return e = +e, r = r | 0, n || N(this, e, r, 4, 4294967295, 0), a.TYPED_ARRAY_SUPPORT ? (this[r + 3] = e >>> 24, this[r + 2] = e >>> 16, this[r + 1] = e >>> 8, this[r] = e & 255) : Ee(this, e, r, !0), r + 4;
654
+ return e = +e, r = r | 0, n || D(this, e, r, 4, 4294967295, 0), a.TYPED_ARRAY_SUPPORT ? (this[r + 3] = e >>> 24, this[r + 2] = e >>> 16, this[r + 1] = e >>> 8, this[r] = e & 255) : Ee(this, e, r, !0), r + 4;
655
655
  };
656
656
  a.prototype.writeUInt32BE = function(e, r, n) {
657
- return e = +e, r = r | 0, n || N(this, e, r, 4, 4294967295, 0), a.TYPED_ARRAY_SUPPORT ? (this[r] = e >>> 24, this[r + 1] = e >>> 16, this[r + 2] = e >>> 8, this[r + 3] = e & 255) : Ee(this, e, r, !1), r + 4;
657
+ return e = +e, r = r | 0, n || D(this, e, r, 4, 4294967295, 0), a.TYPED_ARRAY_SUPPORT ? (this[r] = e >>> 24, this[r + 1] = e >>> 16, this[r + 2] = e >>> 8, this[r + 3] = e & 255) : Ee(this, e, r, !1), r + 4;
658
658
  };
659
659
  a.prototype.writeIntLE = function(e, r, n, i) {
660
660
  if (e = +e, r = r | 0, !i) {
661
661
  var o = Math.pow(2, 8 * n - 1);
662
- N(this, e, r, n, o - 1, -o);
662
+ D(this, e, r, n, o - 1, -o);
663
663
  }
664
664
  var s = 0, f = 1, l = 0;
665
665
  for (this[r] = e & 255; ++s < n && (f *= 256); )
@@ -669,7 +669,7 @@ a.prototype.writeIntLE = function(e, r, n, i) {
669
669
  a.prototype.writeIntBE = function(e, r, n, i) {
670
670
  if (e = +e, r = r | 0, !i) {
671
671
  var o = Math.pow(2, 8 * n - 1);
672
- N(this, e, r, n, o - 1, -o);
672
+ D(this, e, r, n, o - 1, -o);
673
673
  }
674
674
  var s = n - 1, f = 1, l = 0;
675
675
  for (this[r + s] = e & 255; --s >= 0 && (f *= 256); )
@@ -677,41 +677,41 @@ a.prototype.writeIntBE = function(e, r, n, i) {
677
677
  return r + n;
678
678
  };
679
679
  a.prototype.writeInt8 = function(e, r, n) {
680
- return e = +e, r = r | 0, n || N(this, e, r, 1, 127, -128), a.TYPED_ARRAY_SUPPORT || (e = Math.floor(e)), e < 0 && (e = 255 + e + 1), this[r] = e & 255, r + 1;
680
+ return e = +e, r = r | 0, n || D(this, e, r, 1, 127, -128), a.TYPED_ARRAY_SUPPORT || (e = Math.floor(e)), e < 0 && (e = 255 + e + 1), this[r] = e & 255, r + 1;
681
681
  };
682
682
  a.prototype.writeInt16LE = function(e, r, n) {
683
- return e = +e, r = r | 0, n || N(this, e, r, 2, 32767, -32768), a.TYPED_ARRAY_SUPPORT ? (this[r] = e & 255, this[r + 1] = e >>> 8) : ve(this, e, r, !0), r + 2;
683
+ return e = +e, r = r | 0, n || D(this, e, r, 2, 32767, -32768), a.TYPED_ARRAY_SUPPORT ? (this[r] = e & 255, this[r + 1] = e >>> 8) : be(this, e, r, !0), r + 2;
684
684
  };
685
685
  a.prototype.writeInt16BE = function(e, r, n) {
686
- return e = +e, r = r | 0, n || N(this, e, r, 2, 32767, -32768), a.TYPED_ARRAY_SUPPORT ? (this[r] = e >>> 8, this[r + 1] = e & 255) : ve(this, e, r, !1), r + 2;
686
+ return e = +e, r = r | 0, n || D(this, e, r, 2, 32767, -32768), a.TYPED_ARRAY_SUPPORT ? (this[r] = e >>> 8, this[r + 1] = e & 255) : be(this, e, r, !1), r + 2;
687
687
  };
688
688
  a.prototype.writeInt32LE = function(e, r, n) {
689
- return e = +e, r = r | 0, n || N(this, e, r, 4, 2147483647, -2147483648), a.TYPED_ARRAY_SUPPORT ? (this[r] = e & 255, this[r + 1] = e >>> 8, this[r + 2] = e >>> 16, this[r + 3] = e >>> 24) : Ee(this, e, r, !0), r + 4;
689
+ return e = +e, r = r | 0, n || D(this, e, r, 4, 2147483647, -2147483648), a.TYPED_ARRAY_SUPPORT ? (this[r] = e & 255, this[r + 1] = e >>> 8, this[r + 2] = e >>> 16, this[r + 3] = e >>> 24) : Ee(this, e, r, !0), r + 4;
690
690
  };
691
691
  a.prototype.writeInt32BE = function(e, r, n) {
692
- return e = +e, r = r | 0, n || N(this, e, r, 4, 2147483647, -2147483648), e < 0 && (e = 4294967295 + e + 1), a.TYPED_ARRAY_SUPPORT ? (this[r] = e >>> 24, this[r + 1] = e >>> 16, this[r + 2] = e >>> 8, this[r + 3] = e & 255) : Ee(this, e, r, !1), r + 4;
692
+ return e = +e, r = r | 0, n || D(this, e, r, 4, 2147483647, -2147483648), e < 0 && (e = 4294967295 + e + 1), a.TYPED_ARRAY_SUPPORT ? (this[r] = e >>> 24, this[r + 1] = e >>> 16, this[r + 2] = e >>> 8, this[r + 3] = e & 255) : Ee(this, e, r, !1), r + 4;
693
693
  };
694
694
  function yt(t, e, r, n, i, o) {
695
695
  if (r + n > t.length) throw new RangeError("Index out of range");
696
696
  if (r < 0) throw new RangeError("Index out of range");
697
697
  }
698
- function bt(t, e, r, n, i) {
698
+ function vt(t, e, r, n, i) {
699
699
  return i || yt(t, e, r, 4), ht(t, e, r, n, 23, 4), r + 4;
700
700
  }
701
701
  a.prototype.writeFloatLE = function(e, r, n) {
702
- return bt(this, e, r, !0, n);
702
+ return vt(this, e, r, !0, n);
703
703
  };
704
704
  a.prototype.writeFloatBE = function(e, r, n) {
705
- return bt(this, e, r, !1, n);
705
+ return vt(this, e, r, !1, n);
706
706
  };
707
- function vt(t, e, r, n, i) {
707
+ function bt(t, e, r, n, i) {
708
708
  return i || yt(t, e, r, 8), ht(t, e, r, n, 52, 8), r + 8;
709
709
  }
710
710
  a.prototype.writeDoubleLE = function(e, r, n) {
711
- return vt(this, e, r, !0, n);
711
+ return bt(this, e, r, !0, n);
712
712
  };
713
713
  a.prototype.writeDoubleBE = function(e, r, n) {
714
- return vt(this, e, r, !1, n);
714
+ return bt(this, e, r, !1, n);
715
715
  };
716
716
  a.prototype.copy = function(e, r, n, i) {
717
717
  if (n || (n = 0), !i && i !== 0 && (i = this.length), r >= e.length && (r = e.length), r || (r = 0), i > 0 && i < n && (i = n), i === n || e.length === 0 || this.length === 0) return 0;
@@ -772,7 +772,7 @@ function wr(t) {
772
772
  function yr(t) {
773
773
  return t.trim ? t.trim() : t.replace(/^\s+|\s+$/g, "");
774
774
  }
775
- function br(t) {
775
+ function vr(t) {
776
776
  return t < 16 ? "0" + t.toString(16) : t.toString(16);
777
777
  }
778
778
  function we(t, e) {
@@ -825,7 +825,7 @@ function we(t, e) {
825
825
  }
826
826
  return o;
827
827
  }
828
- function vr(t) {
828
+ function br(t) {
829
829
  for (var e = [], r = 0; r < t.length; ++r)
830
830
  e.push(t.charCodeAt(r) & 255);
831
831
  return e;
@@ -846,7 +846,7 @@ function xe(t, e, r, n) {
846
846
  function xr(t) {
847
847
  return t !== t;
848
848
  }
849
- function L(t) {
849
+ function N(t) {
850
850
  return t != null && (!!t._isBuffer || xt(t) || Sr(t));
851
851
  }
852
852
  function xt(t) {
@@ -859,27 +859,27 @@ var Oe;
859
859
  function Q() {
860
860
  }
861
861
  Q.prototype = /* @__PURE__ */ Object.create(null);
862
- function g() {
863
- g.init.call(this);
864
- }
865
- g.EventEmitter = g;
866
- g.usingDomains = !1;
867
- g.prototype.domain = void 0;
868
- g.prototype._events = void 0;
869
- g.prototype._maxListeners = void 0;
870
- g.defaultMaxListeners = 10;
871
- g.init = function() {
872
- this.domain = null, g.usingDomains && Oe.active && !(this instanceof Oe.Domain) && (this.domain = Oe.active), (!this._events || this._events === Object.getPrototypeOf(this)._events) && (this._events = new Q(), this._eventsCount = 0), this._maxListeners = this._maxListeners || void 0;
873
- };
874
- g.prototype.setMaxListeners = function(e) {
862
+ function p() {
863
+ p.init.call(this);
864
+ }
865
+ p.EventEmitter = p;
866
+ p.usingDomains = !1;
867
+ p.prototype.domain = void 0;
868
+ p.prototype._events = void 0;
869
+ p.prototype._maxListeners = void 0;
870
+ p.defaultMaxListeners = 10;
871
+ p.init = function() {
872
+ this.domain = null, p.usingDomains && Oe.active && !(this instanceof Oe.Domain) && (this.domain = Oe.active), (!this._events || this._events === Object.getPrototypeOf(this)._events) && (this._events = new Q(), this._eventsCount = 0), this._maxListeners = this._maxListeners || void 0;
873
+ };
874
+ p.prototype.setMaxListeners = function(e) {
875
875
  if (typeof e != "number" || e < 0 || isNaN(e))
876
876
  throw new TypeError('"n" argument must be a positive number');
877
877
  return this._maxListeners = e, this;
878
878
  };
879
879
  function St(t) {
880
- return t._maxListeners === void 0 ? g.defaultMaxListeners : t._maxListeners;
880
+ return t._maxListeners === void 0 ? p.defaultMaxListeners : t._maxListeners;
881
881
  }
882
- g.prototype.getMaxListeners = function() {
882
+ p.prototype.getMaxListeners = function() {
883
883
  return St(this);
884
884
  };
885
885
  function Rr(t, e, r) {
@@ -910,14 +910,14 @@ function Cr(t, e, r, n, i, o) {
910
910
  for (var s = t.length, f = ae(t, s), l = 0; l < s; ++l)
911
911
  f[l].call(r, n, i, o);
912
912
  }
913
- function Tr(t, e, r, n) {
913
+ function Ar(t, e, r, n) {
914
914
  if (e)
915
915
  t.apply(r, n);
916
916
  else
917
917
  for (var i = t.length, o = ae(t, i), s = 0; s < i; ++s)
918
918
  o[s].apply(r, n);
919
919
  }
920
- g.prototype.emit = function(e) {
920
+ p.prototype.emit = function(e) {
921
921
  var r, n, i, o, s, f, l, u = e === "error";
922
922
  if (f = this._events, f)
923
923
  u = u && f.error == null;
@@ -955,7 +955,7 @@ g.prototype.emit = function(e) {
955
955
  default:
956
956
  for (o = new Array(i - 1), s = 1; s < i; s++)
957
957
  o[s - 1] = arguments[s];
958
- Tr(n, c, this, o);
958
+ Ar(n, c, this, o);
959
959
  }
960
960
  return !0;
961
961
  };
@@ -972,18 +972,18 @@ function Rt(t, e, r, n) {
972
972
  else if (typeof s == "function" ? s = o[e] = n ? [r, s] : [s, r] : n ? s.unshift(r) : s.push(r), !s.warned && (i = St(t), i && i > 0 && s.length > i)) {
973
973
  s.warned = !0;
974
974
  var f = new Error("Possible EventEmitter memory leak detected. " + s.length + " " + e + " listeners added. Use emitter.setMaxListeners() to increase limit");
975
- f.name = "MaxListenersExceededWarning", f.emitter = t, f.type = e, f.count = s.length, Ar(f);
975
+ f.name = "MaxListenersExceededWarning", f.emitter = t, f.type = e, f.count = s.length, Tr(f);
976
976
  }
977
977
  return t;
978
978
  }
979
- function Ar(t) {
979
+ function Tr(t) {
980
980
  typeof console.warn == "function" ? console.warn(t) : console.log(t);
981
981
  }
982
- g.prototype.addListener = function(e, r) {
982
+ p.prototype.addListener = function(e, r) {
983
983
  return Rt(this, e, r, !1);
984
984
  };
985
- g.prototype.on = g.prototype.addListener;
986
- g.prototype.prependListener = function(e, r) {
985
+ p.prototype.on = p.prototype.addListener;
986
+ p.prototype.prependListener = function(e, r) {
987
987
  return Rt(this, e, r, !0);
988
988
  };
989
989
  function It(t, e, r) {
@@ -993,17 +993,17 @@ function It(t, e, r) {
993
993
  }
994
994
  return i.listener = r, i;
995
995
  }
996
- g.prototype.once = function(e, r) {
996
+ p.prototype.once = function(e, r) {
997
997
  if (typeof r != "function")
998
998
  throw new TypeError('"listener" argument must be a function');
999
999
  return this.on(e, It(this, e, r)), this;
1000
1000
  };
1001
- g.prototype.prependOnceListener = function(e, r) {
1001
+ p.prototype.prependOnceListener = function(e, r) {
1002
1002
  if (typeof r != "function")
1003
1003
  throw new TypeError('"listener" argument must be a function');
1004
1004
  return this.prependListener(e, It(this, e, r)), this;
1005
1005
  };
1006
- g.prototype.removeListener = function(e, r) {
1006
+ p.prototype.removeListener = function(e, r) {
1007
1007
  var n, i, o, s, f;
1008
1008
  if (typeof r != "function")
1009
1009
  throw new TypeError('"listener" argument must be a function');
@@ -1031,7 +1031,7 @@ g.prototype.removeListener = function(e, r) {
1031
1031
  }
1032
1032
  return this;
1033
1033
  };
1034
- g.prototype.removeAllListeners = function(e) {
1034
+ p.prototype.removeAllListeners = function(e) {
1035
1035
  var r, n;
1036
1036
  if (n = this._events, !n)
1037
1037
  return this;
@@ -1050,14 +1050,14 @@ g.prototype.removeAllListeners = function(e) {
1050
1050
  while (r[0]);
1051
1051
  return this;
1052
1052
  };
1053
- g.prototype.listeners = function(e) {
1053
+ p.prototype.listeners = function(e) {
1054
1054
  var r, n, i = this._events;
1055
1055
  return i ? (r = i[e], r ? typeof r == "function" ? n = [r.listener || r] : n = Nr(r) : n = []) : n = [], n;
1056
1056
  };
1057
- g.listenerCount = function(t, e) {
1057
+ p.listenerCount = function(t, e) {
1058
1058
  return typeof t.listenerCount == "function" ? t.listenerCount(e) : Ot.call(t, e);
1059
1059
  };
1060
- g.prototype.listenerCount = Ot;
1060
+ p.prototype.listenerCount = Ot;
1061
1061
  function Ot(t) {
1062
1062
  var e = this._events;
1063
1063
  if (e) {
@@ -1069,7 +1069,7 @@ function Ot(t) {
1069
1069
  }
1070
1070
  return 0;
1071
1071
  }
1072
- g.prototype.eventNames = function() {
1072
+ p.prototype.eventNames = function() {
1073
1073
  return this._eventsCount > 0 ? Reflect.ownKeys(this._events) : [];
1074
1074
  };
1075
1075
  function Lr(t, e) {
@@ -1090,13 +1090,13 @@ function Nr(t) {
1090
1090
  function Ct() {
1091
1091
  throw new Error("setTimeout has not been defined");
1092
1092
  }
1093
- function Tt() {
1093
+ function At() {
1094
1094
  throw new Error("clearTimeout has not been defined");
1095
1095
  }
1096
- var Y = Ct, W = Tt;
1096
+ var Y = Ct, W = At;
1097
1097
  typeof ie.setTimeout == "function" && (Y = setTimeout);
1098
1098
  typeof ie.clearTimeout == "function" && (W = clearTimeout);
1099
- function At(t) {
1099
+ function Tt(t) {
1100
1100
  if (Y === setTimeout)
1101
1101
  return setTimeout(t, 0);
1102
1102
  if ((Y === Ct || !Y) && setTimeout)
@@ -1114,7 +1114,7 @@ function At(t) {
1114
1114
  function Dr(t) {
1115
1115
  if (W === clearTimeout)
1116
1116
  return clearTimeout(t);
1117
- if ((W === Tt || !W) && clearTimeout)
1117
+ if ((W === At || !W) && clearTimeout)
1118
1118
  return W = clearTimeout, clearTimeout(t);
1119
1119
  try {
1120
1120
  return W(t);
@@ -1132,7 +1132,7 @@ function Fr() {
1132
1132
  }
1133
1133
  function Lt() {
1134
1134
  if (!ne) {
1135
- var t = At(Fr);
1135
+ var t = Tt(Fr);
1136
1136
  ne = !0;
1137
1137
  for (var e = z.length; e; ) {
1138
1138
  for (ee = z, z = []; ++ge < e; )
@@ -1147,7 +1147,7 @@ function B(t) {
1147
1147
  if (arguments.length > 1)
1148
1148
  for (var r = 1; r < arguments.length; r++)
1149
1149
  e[r - 1] = arguments[r];
1150
- z.push(new Nt(t, e)), z.length === 1 && !ne && At(Lt);
1150
+ z.push(new Nt(t, e)), z.length === 1 && !ne && Tt(Lt);
1151
1151
  }
1152
1152
  function Nt(t, e) {
1153
1153
  this.fun = t, this.array = e;
@@ -1293,33 +1293,33 @@ function ye(t, e, r) {
1293
1293
  return i;
1294
1294
  var o = Object.keys(e), s = jr(o);
1295
1295
  if (t.showHidden && (o = Object.getOwnPropertyNames(e)), Le(e) && (o.indexOf("message") >= 0 || o.indexOf("description") >= 0))
1296
- return Te(e);
1296
+ return Ae(e);
1297
1297
  if (o.length === 0) {
1298
1298
  if (Ne(e)) {
1299
1299
  var f = e.name ? ": " + e.name : "";
1300
1300
  return t.stylize("[Function" + f + "]", "special");
1301
1301
  }
1302
- if (Ae(e))
1302
+ if (Te(e))
1303
1303
  return t.stylize(RegExp.prototype.toString.call(e), "regexp");
1304
1304
  if (Xe(e))
1305
1305
  return t.stylize(Date.prototype.toString.call(e), "date");
1306
1306
  if (Le(e))
1307
- return Te(e);
1307
+ return Ae(e);
1308
1308
  }
1309
1309
  var l = "", u = !1, h = ["{", "}"];
1310
1310
  if (Jr(e) && (u = !0, h = ["[", "]"]), Ne(e)) {
1311
1311
  var c = e.name ? ": " + e.name : "";
1312
1312
  l = " [Function" + c + "]";
1313
1313
  }
1314
- if (Ae(e) && (l = " " + RegExp.prototype.toString.call(e)), Xe(e) && (l = " " + Date.prototype.toUTCString.call(e)), Le(e) && (l = " " + Te(e)), o.length === 0 && (!u || e.length == 0))
1314
+ if (Te(e) && (l = " " + RegExp.prototype.toString.call(e)), Xe(e) && (l = " " + Date.prototype.toUTCString.call(e)), Le(e) && (l = " " + Ae(e)), o.length === 0 && (!u || e.length == 0))
1315
1315
  return h[0] + l + h[1];
1316
1316
  if (r < 0)
1317
- return Ae(e) ? t.stylize(RegExp.prototype.toString.call(e), "regexp") : t.stylize("[Object]", "special");
1317
+ return Te(e) ? t.stylize(RegExp.prototype.toString.call(e), "regexp") : t.stylize("[Object]", "special");
1318
1318
  t.seen.push(e);
1319
- var w;
1320
- return u ? w = zr(t, e, r, s, o) : w = o.map(function(p) {
1321
- return ke(t, e, r, s, p, u);
1322
- }), t.seen.pop(), Vr(w, l, h);
1319
+ var m;
1320
+ return u ? m = zr(t, e, r, s, o) : m = o.map(function(w) {
1321
+ return ke(t, e, r, s, w, u);
1322
+ }), t.seen.pop(), Vr(m, l, h);
1323
1323
  }
1324
1324
  function qr(t, e) {
1325
1325
  if (H(e))
@@ -1335,7 +1335,7 @@ function qr(t, e) {
1335
1335
  if (ze(e))
1336
1336
  return t.stylize("null", "null");
1337
1337
  }
1338
- function Te(t) {
1338
+ function Ae(t) {
1339
1339
  return "[" + Error.prototype.toString.call(t) + "]";
1340
1340
  }
1341
1341
  function zr(t, e, r, n, i) {
@@ -1405,7 +1405,7 @@ function Ve(t) {
1405
1405
  function H(t) {
1406
1406
  return t === void 0;
1407
1407
  }
1408
- function Ae(t) {
1408
+ function Te(t) {
1409
1409
  return le(t) && Je(t) === "[object RegExp]";
1410
1410
  }
1411
1411
  function le(t) {
@@ -1565,9 +1565,9 @@ function Zr(t) {
1565
1565
  function Xr(t) {
1566
1566
  this.charReceived = t.length % 3, this.charLength = this.charReceived ? 3 : 0;
1567
1567
  }
1568
- x.ReadableState = Bt;
1569
- var v = kr("stream");
1570
- oe(x, g);
1568
+ R.ReadableState = Bt;
1569
+ var b = kr("stream");
1570
+ oe(R, p);
1571
1571
  function Kr(t, e, r) {
1572
1572
  if (typeof t.prependListener == "function")
1573
1573
  return t.prependListener(e, r);
@@ -1581,19 +1581,19 @@ function Bt(t, e) {
1581
1581
  var r = t.highWaterMark, n = this.objectMode ? 16 : 16 * 1024;
1582
1582
  this.highWaterMark = r || r === 0 ? r : n, this.highWaterMark = ~~this.highWaterMark, this.buffer = new te(), this.length = 0, this.pipes = null, this.pipesCount = 0, this.flowing = null, this.ended = !1, this.endEmitted = !1, this.reading = !1, this.sync = !0, this.needReadable = !1, this.emittedReadable = !1, this.readableListening = !1, this.resumeScheduled = !1, this.defaultEncoding = t.defaultEncoding || "utf8", this.ranOut = !1, this.awaitDrain = 0, this.readingMore = !1, this.decoder = null, this.encoding = null, t.encoding && (this.decoder = new ue(t.encoding), this.encoding = t.encoding);
1583
1583
  }
1584
- function x(t) {
1585
- if (!(this instanceof x)) return new x(t);
1586
- this._readableState = new Bt(t, this), this.readable = !0, t && typeof t.read == "function" && (this._read = t.read), g.call(this);
1584
+ function R(t) {
1585
+ if (!(this instanceof R)) return new R(t);
1586
+ this._readableState = new Bt(t, this), this.readable = !0, t && typeof t.read == "function" && (this._read = t.read), p.call(this);
1587
1587
  }
1588
- x.prototype.push = function(t, e) {
1588
+ R.prototype.push = function(t, e) {
1589
1589
  var r = this._readableState;
1590
1590
  return !r.objectMode && typeof t == "string" && (e = e || r.defaultEncoding, e !== r.encoding && (t = a.from(t, e), e = "")), Ut(this, r, t, e, !1);
1591
1591
  };
1592
- x.prototype.unshift = function(t) {
1592
+ R.prototype.unshift = function(t) {
1593
1593
  var e = this._readableState;
1594
1594
  return Ut(this, e, t, "", !0);
1595
1595
  };
1596
- x.prototype.isPaused = function() {
1596
+ R.prototype.isPaused = function() {
1597
1597
  return this._readableState.flowing === !1;
1598
1598
  };
1599
1599
  function Ut(t, e, r, n, i) {
@@ -1619,7 +1619,7 @@ function Ut(t, e, r, n, i) {
1619
1619
  function tn(t) {
1620
1620
  return !t.ended && (t.needReadable || t.length < t.highWaterMark || t.length === 0);
1621
1621
  }
1622
- x.prototype.setEncoding = function(t) {
1622
+ R.prototype.setEncoding = function(t) {
1623
1623
  return this._readableState.decoder = new ue(t), this._readableState.encoding = t, this;
1624
1624
  };
1625
1625
  var Ke = 8388608;
@@ -1629,21 +1629,21 @@ function rn(t) {
1629
1629
  function et(t, e) {
1630
1630
  return t <= 0 || e.length === 0 && e.ended ? 0 : e.objectMode ? 1 : t !== t ? e.flowing && e.length ? e.buffer.head.data.length : e.length : (t > e.highWaterMark && (e.highWaterMark = rn(t)), t <= e.length ? t : e.ended ? e.length : (e.needReadable = !0, 0));
1631
1631
  }
1632
- x.prototype.read = function(t) {
1633
- v("read", t), t = parseInt(t, 10);
1632
+ R.prototype.read = function(t) {
1633
+ b("read", t), t = parseInt(t, 10);
1634
1634
  var e = this._readableState, r = t;
1635
1635
  if (t !== 0 && (e.emittedReadable = !1), t === 0 && e.needReadable && (e.length >= e.highWaterMark || e.ended))
1636
- return v("read: emitReadable", e.length, e.ended), e.length === 0 && e.ended ? De(this) : Se(this), null;
1636
+ return b("read: emitReadable", e.length, e.ended), e.length === 0 && e.ended ? De(this) : Se(this), null;
1637
1637
  if (t = et(t, e), t === 0 && e.ended)
1638
1638
  return e.length === 0 && De(this), null;
1639
1639
  var n = e.needReadable;
1640
- v("need readable", n), (e.length === 0 || e.length - t < e.highWaterMark) && (n = !0, v("length less than watermark", n)), e.ended || e.reading ? (n = !1, v("reading or ended", n)) : n && (v("do read"), e.reading = !0, e.sync = !0, e.length === 0 && (e.needReadable = !0), this._read(e.highWaterMark), e.sync = !1, e.reading || (t = et(r, e)));
1640
+ b("need readable", n), (e.length === 0 || e.length - t < e.highWaterMark) && (n = !0, b("length less than watermark", n)), e.ended || e.reading ? (n = !1, b("reading or ended", n)) : n && (b("do read"), e.reading = !0, e.sync = !0, e.length === 0 && (e.needReadable = !0), this._read(e.highWaterMark), e.sync = !1, e.reading || (t = et(r, e)));
1641
1641
  var i;
1642
1642
  return t > 0 ? i = kt(t, e) : i = null, i === null ? (e.needReadable = !0, t = 0) : e.length -= t, e.length === 0 && (e.ended || (e.needReadable = !0), r !== t && e.ended && De(this)), i !== null && this.emit("data", i), i;
1643
1643
  };
1644
1644
  function nn(t, e) {
1645
1645
  var r = null;
1646
- return !L(e) && typeof e != "string" && e !== null && e !== void 0 && !t.objectMode && (r = new TypeError("Invalid non-string/buffer chunk")), r;
1646
+ return !N(e) && typeof e != "string" && e !== null && e !== void 0 && !t.objectMode && (r = new TypeError("Invalid non-string/buffer chunk")), r;
1647
1647
  }
1648
1648
  function on(t, e) {
1649
1649
  if (!e.ended) {
@@ -1656,23 +1656,23 @@ function on(t, e) {
1656
1656
  }
1657
1657
  function Se(t) {
1658
1658
  var e = t._readableState;
1659
- e.needReadable = !1, e.emittedReadable || (v("emitReadable", e.flowing), e.emittedReadable = !0, e.sync ? B(tt, t) : tt(t));
1659
+ e.needReadable = !1, e.emittedReadable || (b("emitReadable", e.flowing), e.emittedReadable = !0, e.sync ? B(tt, t) : tt(t));
1660
1660
  }
1661
1661
  function tt(t) {
1662
- v("emit readable"), t.emit("readable"), Ye(t);
1662
+ b("emit readable"), t.emit("readable"), Ye(t);
1663
1663
  }
1664
1664
  function sn(t, e) {
1665
1665
  e.readingMore || (e.readingMore = !0, B(fn, t, e));
1666
1666
  }
1667
1667
  function fn(t, e) {
1668
- for (var r = e.length; !e.reading && !e.flowing && !e.ended && e.length < e.highWaterMark && (v("maybeReadMore read 0"), t.read(0), r !== e.length); )
1668
+ for (var r = e.length; !e.reading && !e.flowing && !e.ended && e.length < e.highWaterMark && (b("maybeReadMore read 0"), t.read(0), r !== e.length); )
1669
1669
  r = e.length;
1670
1670
  e.readingMore = !1;
1671
1671
  }
1672
- x.prototype._read = function(t) {
1672
+ R.prototype._read = function(t) {
1673
1673
  this.emit("error", new Error("not implemented"));
1674
1674
  };
1675
- x.prototype.pipe = function(t, e) {
1675
+ R.prototype.pipe = function(t, e) {
1676
1676
  var r = this, n = this._readableState;
1677
1677
  switch (n.pipesCount) {
1678
1678
  case 0:
@@ -1685,52 +1685,52 @@ x.prototype.pipe = function(t, e) {
1685
1685
  n.pipes.push(t);
1686
1686
  break;
1687
1687
  }
1688
- n.pipesCount += 1, v("pipe count=%d opts=%j", n.pipesCount, e);
1688
+ n.pipesCount += 1, b("pipe count=%d opts=%j", n.pipesCount, e);
1689
1689
  var i = !e || e.end !== !1, o = i ? f : h;
1690
1690
  n.endEmitted ? B(o) : r.once("end", o), t.on("unpipe", s);
1691
1691
  function s(S) {
1692
- v("onunpipe"), S === r && h();
1692
+ b("onunpipe"), S === r && h();
1693
1693
  }
1694
1694
  function f() {
1695
- v("onend"), t.end();
1695
+ b("onend"), t.end();
1696
1696
  }
1697
1697
  var l = an(r);
1698
1698
  t.on("drain", l);
1699
1699
  var u = !1;
1700
1700
  function h() {
1701
- v("cleanup"), t.removeListener("close", I), t.removeListener("finish", m), t.removeListener("drain", l), t.removeListener("error", p), t.removeListener("unpipe", s), r.removeListener("end", f), r.removeListener("end", h), r.removeListener("data", w), u = !0, n.awaitDrain && (!t._writableState || t._writableState.needDrain) && l();
1701
+ b("cleanup"), t.removeListener("close", O), t.removeListener("finish", E), t.removeListener("drain", l), t.removeListener("error", w), t.removeListener("unpipe", s), r.removeListener("end", f), r.removeListener("end", h), r.removeListener("data", m), u = !0, n.awaitDrain && (!t._writableState || t._writableState.needDrain) && l();
1702
1702
  }
1703
1703
  var c = !1;
1704
- r.on("data", w);
1705
- function w(S) {
1706
- v("ondata"), c = !1;
1707
- var E = t.write(S);
1708
- E === !1 && !c && ((n.pipesCount === 1 && n.pipes === t || n.pipesCount > 1 && Pt(n.pipes, t) !== -1) && !u && (v("false write response, pause", r._readableState.awaitDrain), r._readableState.awaitDrain++, c = !0), r.pause());
1704
+ r.on("data", m);
1705
+ function m(S) {
1706
+ b("ondata"), c = !1;
1707
+ var g = t.write(S);
1708
+ g === !1 && !c && ((n.pipesCount === 1 && n.pipes === t || n.pipesCount > 1 && Pt(n.pipes, t) !== -1) && !u && (b("false write response, pause", r._readableState.awaitDrain), r._readableState.awaitDrain++, c = !0), r.pause());
1709
1709
  }
1710
- function p(S) {
1711
- v("onerror", S), D(), t.removeListener("error", p), en(t, "error") === 0 && t.emit("error", S);
1710
+ function w(S) {
1711
+ b("onerror", S), x(), t.removeListener("error", w), en(t, "error") === 0 && t.emit("error", S);
1712
1712
  }
1713
- Kr(t, "error", p);
1714
- function I() {
1715
- t.removeListener("finish", m), D();
1713
+ Kr(t, "error", w);
1714
+ function O() {
1715
+ t.removeListener("finish", E), x();
1716
1716
  }
1717
- t.once("close", I);
1718
- function m() {
1719
- v("onfinish"), t.removeListener("close", I), D();
1717
+ t.once("close", O);
1718
+ function E() {
1719
+ b("onfinish"), t.removeListener("close", O), x();
1720
1720
  }
1721
- t.once("finish", m);
1722
- function D() {
1723
- v("unpipe"), r.unpipe(t);
1721
+ t.once("finish", E);
1722
+ function x() {
1723
+ b("unpipe"), r.unpipe(t);
1724
1724
  }
1725
- return t.emit("pipe", r), n.flowing || (v("pipe resume"), r.resume()), t;
1725
+ return t.emit("pipe", r), n.flowing || (b("pipe resume"), r.resume()), t;
1726
1726
  };
1727
1727
  function an(t) {
1728
1728
  return function() {
1729
1729
  var e = t._readableState;
1730
- v("pipeOnDrain", e.awaitDrain), e.awaitDrain && e.awaitDrain--, e.awaitDrain === 0 && t.listeners("data").length && (e.flowing = !0, Ye(t));
1730
+ b("pipeOnDrain", e.awaitDrain), e.awaitDrain && e.awaitDrain--, e.awaitDrain === 0 && t.listeners("data").length && (e.flowing = !0, Ye(t));
1731
1731
  };
1732
1732
  }
1733
- x.prototype.unpipe = function(t) {
1733
+ R.prototype.unpipe = function(t) {
1734
1734
  var e = this._readableState;
1735
1735
  if (e.pipesCount === 0) return this;
1736
1736
  if (e.pipesCount === 1)
@@ -1745,8 +1745,8 @@ x.prototype.unpipe = function(t) {
1745
1745
  var o = Pt(e.pipes, t);
1746
1746
  return o === -1 ? this : (e.pipes.splice(o, 1), e.pipesCount -= 1, e.pipesCount === 1 && (e.pipes = e.pipes[0]), t.emit("unpipe", this), this);
1747
1747
  };
1748
- x.prototype.on = function(t, e) {
1749
- var r = g.prototype.on.call(this, t, e);
1748
+ R.prototype.on = function(t, e) {
1749
+ var r = p.prototype.on.call(this, t, e);
1750
1750
  if (t === "data")
1751
1751
  this._readableState.flowing !== !1 && this.resume();
1752
1752
  else if (t === "readable") {
@@ -1755,38 +1755,38 @@ x.prototype.on = function(t, e) {
1755
1755
  }
1756
1756
  return r;
1757
1757
  };
1758
- x.prototype.addListener = x.prototype.on;
1758
+ R.prototype.addListener = R.prototype.on;
1759
1759
  function ln(t) {
1760
- v("readable nexttick read 0"), t.read(0);
1760
+ b("readable nexttick read 0"), t.read(0);
1761
1761
  }
1762
- x.prototype.resume = function() {
1762
+ R.prototype.resume = function() {
1763
1763
  var t = this._readableState;
1764
- return t.flowing || (v("resume"), t.flowing = !0, un(this, t)), this;
1764
+ return t.flowing || (b("resume"), t.flowing = !0, un(this, t)), this;
1765
1765
  };
1766
1766
  function un(t, e) {
1767
1767
  e.resumeScheduled || (e.resumeScheduled = !0, B(hn, t, e));
1768
1768
  }
1769
1769
  function hn(t, e) {
1770
- e.reading || (v("resume read 0"), t.read(0)), e.resumeScheduled = !1, e.awaitDrain = 0, t.emit("resume"), Ye(t), e.flowing && !e.reading && t.read(0);
1770
+ e.reading || (b("resume read 0"), t.read(0)), e.resumeScheduled = !1, e.awaitDrain = 0, t.emit("resume"), Ye(t), e.flowing && !e.reading && t.read(0);
1771
1771
  }
1772
- x.prototype.pause = function() {
1773
- return v("call pause flowing=%j", this._readableState.flowing), this._readableState.flowing !== !1 && (v("pause"), this._readableState.flowing = !1, this.emit("pause")), this;
1772
+ R.prototype.pause = function() {
1773
+ return b("call pause flowing=%j", this._readableState.flowing), this._readableState.flowing !== !1 && (b("pause"), this._readableState.flowing = !1, this.emit("pause")), this;
1774
1774
  };
1775
1775
  function Ye(t) {
1776
1776
  var e = t._readableState;
1777
- for (v("flow", e.flowing); e.flowing && t.read() !== null; )
1777
+ for (b("flow", e.flowing); e.flowing && t.read() !== null; )
1778
1778
  ;
1779
1779
  }
1780
- x.prototype.wrap = function(t) {
1780
+ R.prototype.wrap = function(t) {
1781
1781
  var e = this._readableState, r = !1, n = this;
1782
1782
  t.on("end", function() {
1783
- if (v("wrapped end"), e.decoder && !e.ended) {
1783
+ if (b("wrapped end"), e.decoder && !e.ended) {
1784
1784
  var s = e.decoder.end();
1785
1785
  s && s.length && n.push(s);
1786
1786
  }
1787
1787
  n.push(null);
1788
1788
  }), t.on("data", function(s) {
1789
- if (v("wrapped data"), e.decoder && (s = e.decoder.write(s)), !(e.objectMode && s == null) && !(!e.objectMode && (!s || !s.length))) {
1789
+ if (b("wrapped data"), e.decoder && (s = e.decoder.write(s)), !(e.objectMode && s == null) && !(!e.objectMode && (!s || !s.length))) {
1790
1790
  var f = n.push(s);
1791
1791
  f || (r = !0, t.pause());
1792
1792
  }
@@ -1801,10 +1801,10 @@ x.prototype.wrap = function(t) {
1801
1801
  return mn(o, function(s) {
1802
1802
  t.on(s, n.emit.bind(n, s));
1803
1803
  }), n._read = function(s) {
1804
- v("wrapped _read", s), r && (r = !1, t.resume());
1804
+ b("wrapped _read", s), r && (r = !1, t.resume());
1805
1805
  }, n;
1806
1806
  };
1807
- x._fromList = kt;
1807
+ R._fromList = kt;
1808
1808
  function kt(t, e) {
1809
1809
  if (e.length === 0) return null;
1810
1810
  var r;
@@ -1856,7 +1856,7 @@ function Pt(t, e) {
1856
1856
  return -1;
1857
1857
  }
1858
1858
  T.WritableState = We;
1859
- oe(T, g);
1859
+ oe(T, p);
1860
1860
  function _n() {
1861
1861
  }
1862
1862
  function wn(t, e, r) {
@@ -1882,7 +1882,7 @@ We.prototype.getBuffer = function() {
1882
1882
  };
1883
1883
  function T(t) {
1884
1884
  if (!(this instanceof T) && !(this instanceof M)) return new T(t);
1885
- this._writableState = new We(t, this), this.writable = !0, t && (typeof t.write == "function" && (this._write = t.write), typeof t.writev == "function" && (this._writev = t.writev)), g.call(this);
1885
+ this._writableState = new We(t, this), this.writable = !0, t && (typeof t.write == "function" && (this._write = t.write), typeof t.writev == "function" && (this._writev = t.writev)), p.call(this);
1886
1886
  }
1887
1887
  T.prototype.pipe = function() {
1888
1888
  this.emit("error", new Error("Cannot pipe, not readable"));
@@ -1891,13 +1891,13 @@ function yn(t, e) {
1891
1891
  var r = new Error("write after end");
1892
1892
  t.emit("error", r), B(e, r);
1893
1893
  }
1894
- function bn(t, e, r, n) {
1894
+ function vn(t, e, r, n) {
1895
1895
  var i = !0, o = !1;
1896
1896
  return r === null ? o = new TypeError("May not write null values to stream") : !a.isBuffer(r) && typeof r != "string" && r !== void 0 && !e.objectMode && (o = new TypeError("Invalid non-string/buffer chunk")), o && (t.emit("error", o), B(n, o), i = !1), i;
1897
1897
  }
1898
1898
  T.prototype.write = function(t, e, r) {
1899
1899
  var n = this._writableState, i = !1;
1900
- return typeof e == "function" && (r = e, e = null), a.isBuffer(t) ? e = "buffer" : e || (e = n.defaultEncoding), typeof r != "function" && (r = _n), n.ended ? yn(this, r) : bn(this, n, t, r) && (n.pendingcb++, i = En(this, n, t, e, r)), i;
1900
+ return typeof e == "function" && (r = e, e = null), a.isBuffer(t) ? e = "buffer" : e || (e = n.defaultEncoding), typeof r != "function" && (r = _n), n.ended ? yn(this, r) : vn(this, n, t, r) && (n.pendingcb++, i = En(this, n, t, e, r)), i;
1901
1901
  };
1902
1902
  T.prototype.cork = function() {
1903
1903
  var t = this._writableState;
@@ -1911,11 +1911,11 @@ T.prototype.setDefaultEncoding = function(e) {
1911
1911
  if (typeof e == "string" && (e = e.toLowerCase()), !(["hex", "utf8", "utf-8", "ascii", "binary", "base64", "ucs2", "ucs-2", "utf16le", "utf-16le", "raw"].indexOf((e + "").toLowerCase()) > -1)) throw new TypeError("Unknown encoding: " + e);
1912
1912
  return this._writableState.defaultEncoding = e, this;
1913
1913
  };
1914
- function vn(t, e, r) {
1914
+ function bn(t, e, r) {
1915
1915
  return !t.objectMode && t.decodeStrings !== !1 && typeof e == "string" && (e = a.from(e, r)), e;
1916
1916
  }
1917
1917
  function En(t, e, r, n, i) {
1918
- r = vn(e, r, n), a.isBuffer(r) && (n = "buffer");
1918
+ r = bn(e, r, n), a.isBuffer(r) && (n = "buffer");
1919
1919
  var o = e.objectMode ? 1 : r.length;
1920
1920
  e.length += o;
1921
1921
  var s = e.length < e.highWaterMark;
@@ -2000,7 +2000,7 @@ function zt(t) {
2000
2000
  t.corkedRequestsFree ? t.corkedRequestsFree.next = e : t.corkedRequestsFree = e;
2001
2001
  };
2002
2002
  }
2003
- oe(M, x);
2003
+ oe(M, R);
2004
2004
  var it = Object.keys(T.prototype);
2005
2005
  for (var Fe = 0; Fe < it.length; Fe++) {
2006
2006
  var Me = it[Fe];
@@ -2008,16 +2008,16 @@ for (var Fe = 0; Fe < it.length; Fe++) {
2008
2008
  }
2009
2009
  function M(t) {
2010
2010
  if (!(this instanceof M)) return new M(t);
2011
- x.call(this, t), T.call(this, t), t && t.readable === !1 && (this.readable = !1), t && t.writable === !1 && (this.writable = !1), this.allowHalfOpen = !0, t && t.allowHalfOpen === !1 && (this.allowHalfOpen = !1), this.once("end", Cn);
2011
+ R.call(this, t), T.call(this, t), t && t.readable === !1 && (this.readable = !1), t && t.writable === !1 && (this.writable = !1), this.allowHalfOpen = !0, t && t.allowHalfOpen === !1 && (this.allowHalfOpen = !1), this.once("end", Cn);
2012
2012
  }
2013
2013
  function Cn() {
2014
- this.allowHalfOpen || this._writableState.ended || B(Tn, this);
2014
+ this.allowHalfOpen || this._writableState.ended || B(An, this);
2015
2015
  }
2016
- function Tn(t) {
2016
+ function An(t) {
2017
2017
  t.end();
2018
2018
  }
2019
2019
  oe(k, M);
2020
- function An(t) {
2020
+ function Tn(t) {
2021
2021
  this.afterTransform = function(e, r) {
2022
2022
  return Ln(t, e, r);
2023
2023
  }, this.needTransform = !1, this.transforming = !1, this.writecb = null, this.writechunk = null, this.writeencoding = null;
@@ -2033,7 +2033,7 @@ function Ln(t, e, r) {
2033
2033
  }
2034
2034
  function k(t) {
2035
2035
  if (!(this instanceof k)) return new k(t);
2036
- M.call(this, t), this._transformState = new An(this);
2036
+ M.call(this, t), this._transformState = new Tn(this);
2037
2037
  var e = this;
2038
2038
  this._readableState.needReadable = !0, this._readableState.sync = !1, t && (typeof t.transform == "function" && (this._transform = t.transform), typeof t.flush == "function" && (this._flush = t.flush)), this.once("prefinish", function() {
2039
2039
  typeof this._flush == "function" ? this._flush(function(r) {
@@ -2073,15 +2073,15 @@ function fe(t) {
2073
2073
  fe.prototype._transform = function(t, e, r) {
2074
2074
  r(null, t);
2075
2075
  };
2076
- oe(V, g);
2077
- V.Readable = x;
2076
+ oe(V, p);
2077
+ V.Readable = R;
2078
2078
  V.Writable = T;
2079
2079
  V.Duplex = M;
2080
2080
  V.Transform = k;
2081
2081
  V.PassThrough = fe;
2082
2082
  V.Stream = V;
2083
2083
  function V() {
2084
- g.call(this);
2084
+ p.call(this);
2085
2085
  }
2086
2086
  V.prototype.pipe = function(t, e) {
2087
2087
  var r = this;
@@ -2101,7 +2101,7 @@ V.prototype.pipe = function(t, e) {
2101
2101
  o || (o = !0, typeof t.destroy == "function" && t.destroy());
2102
2102
  }
2103
2103
  function l(h) {
2104
- if (u(), g.listenerCount(this, "error") === 0)
2104
+ if (u(), p.listenerCount(this, "error") === 0)
2105
2105
  throw h;
2106
2106
  }
2107
2107
  r.on("error", l), t.on("error", l);
@@ -2119,7 +2119,7 @@ class _ extends Error {
2119
2119
  for (const o of i)
2120
2120
  for (const s in o) {
2121
2121
  const f = o[s];
2122
- this[s] = L(f) ? f.toString(n.encoding) : f == null ? f : JSON.parse(JSON.stringify(f));
2122
+ this[s] = N(f) ? f.toString(n.encoding) : f == null ? f : JSON.parse(JSON.stringify(f));
2123
2123
  }
2124
2124
  }
2125
2125
  }
@@ -2153,7 +2153,7 @@ class st {
2153
2153
  this.size = e, this.length = 0, this.buf = a.allocUnsafe(e);
2154
2154
  }
2155
2155
  prepend(e) {
2156
- if (L(e)) {
2156
+ if (N(e)) {
2157
2157
  const r = this.length + e.length;
2158
2158
  if (r >= this.size && (this.resize(), r >= this.size))
2159
2159
  throw Error("INVALID_BUFFER_STATE");
@@ -2199,7 +2199,7 @@ const Nn = 12, Dn = 13, Fn = 10, Mn = 32, Bn = 9, Un = function(t) {
2199
2199
  error: void 0,
2200
2200
  enabled: t.from_line === 1,
2201
2201
  escaping: !1,
2202
- escapeIsQuote: L(t.escape) && L(t.quote) && a.compare(t.escape, t.quote) === 0,
2202
+ escapeIsQuote: N(t.escape) && N(t.quote) && a.compare(t.escape, t.quote) === 0,
2203
2203
  // columns can be `false`, `true`, `Array`
2204
2204
  expectedRecordLength: Array.isArray(t.columns) ? t.columns.length : void 0,
2205
2205
  field: new st(20),
@@ -2341,7 +2341,7 @@ const Nn = 12, Dn = 13, Fn = 10, Mn = 32, Bn = 9, Un = function(t) {
2341
2341
  }
2342
2342
  if (e.comment === void 0 || e.comment === null || e.comment === !1 || e.comment === "")
2343
2343
  e.comment = null;
2344
- else if (typeof e.comment == "string" && (e.comment = a.from(e.comment, e.encoding)), !L(e.comment))
2344
+ else if (typeof e.comment == "string" && (e.comment = a.from(e.comment, e.encoding)), !N(e.comment))
2345
2345
  throw new _(
2346
2346
  "CSV_INVALID_OPTION_COMMENT",
2347
2347
  [
@@ -2377,7 +2377,7 @@ const Nn = 12, Dn = 13, Fn = 10, Mn = 32, Bn = 9, Un = function(t) {
2377
2377
  if (e.delimiter = e.delimiter.map(function(n) {
2378
2378
  if (n == null || n === !1)
2379
2379
  return a.from(",", e.encoding);
2380
- if (typeof n == "string" && (n = a.from(n, e.encoding)), !L(n) || n.length === 0)
2380
+ if (typeof n == "string" && (n = a.from(n, e.encoding)), !N(n) || n.length === 0)
2381
2381
  throw new _(
2382
2382
  "CSV_INVALID_OPTION_DELIMITER",
2383
2383
  [
@@ -2388,7 +2388,7 @@ const Nn = 12, Dn = 13, Fn = 10, Mn = 32, Bn = 9, Un = function(t) {
2388
2388
  e
2389
2389
  );
2390
2390
  return n;
2391
- }), e.escape === void 0 || e.escape === !0 ? e.escape = a.from('"', e.encoding) : typeof e.escape == "string" ? e.escape = a.from(e.escape, e.encoding) : (e.escape === null || e.escape === !1) && (e.escape = null), e.escape !== null && !L(e.escape))
2391
+ }), e.escape === void 0 || e.escape === !0 ? e.escape = a.from('"', e.encoding) : typeof e.escape == "string" ? e.escape = a.from(e.escape, e.encoding) : (e.escape === null || e.escape === !1) && (e.escape = null), e.escape !== null && !N(e.escape))
2392
2392
  throw new Error(
2393
2393
  `Invalid Option: escape must be a buffer, a string or a boolean, got ${JSON.stringify(e.escape)}`
2394
2394
  );
@@ -2453,7 +2453,7 @@ const Nn = 12, Dn = 13, Fn = 10, Mn = 32, Bn = 9, Un = function(t) {
2453
2453
  );
2454
2454
  if (e.objname === void 0 || e.objname === null || e.objname === !1)
2455
2455
  e.objname = void 0;
2456
- else if (L(e.objname)) {
2456
+ else if (N(e.objname)) {
2457
2457
  if (e.objname.length === 0)
2458
2458
  throw new Error("Invalid Option: objname must be a non empty buffer");
2459
2459
  e.encoding === null || (e.objname = e.objname.toString(e.encoding));
@@ -2492,7 +2492,7 @@ const Nn = 12, Dn = 13, Fn = 10, Mn = 32, Bn = 9, Un = function(t) {
2492
2492
  );
2493
2493
  if (e.quote === null || e.quote === !1 || e.quote === "")
2494
2494
  e.quote = null;
2495
- else if (e.quote === void 0 || e.quote === !0 ? e.quote = a.from('"', e.encoding) : typeof e.quote == "string" && (e.quote = a.from(e.quote, e.encoding)), !L(e.quote))
2495
+ else if (e.quote === void 0 || e.quote === !0 ? e.quote = a.from('"', e.encoding) : typeof e.quote == "string" && (e.quote = a.from(e.quote, e.encoding)), !N(e.quote))
2496
2496
  throw new Error(
2497
2497
  `Invalid Option: quote must be a buffer or a string, got ${JSON.stringify(e.quote)}`
2498
2498
  );
@@ -2504,7 +2504,7 @@ const Nn = 12, Dn = 13, Fn = 10, Mn = 32, Bn = 9, Un = function(t) {
2504
2504
  );
2505
2505
  if (e.record_delimiter === void 0)
2506
2506
  e.record_delimiter = [];
2507
- else if (typeof e.record_delimiter == "string" || L(e.record_delimiter)) {
2507
+ else if (typeof e.record_delimiter == "string" || N(e.record_delimiter)) {
2508
2508
  if (e.record_delimiter.length === 0)
2509
2509
  throw new _(
2510
2510
  "CSV_INVALID_OPTION_RECORD_DELIMITER",
@@ -2527,7 +2527,7 @@ const Nn = 12, Dn = 13, Fn = 10, Mn = 32, Bn = 9, Un = function(t) {
2527
2527
  e
2528
2528
  );
2529
2529
  if (e.record_delimiter = e.record_delimiter.map(function(n, i) {
2530
- if (typeof n != "string" && !L(n))
2530
+ if (typeof n != "string" && !N(n))
2531
2531
  throw new _(
2532
2532
  "CSV_INVALID_OPTION_RECORD_DELIMITER",
2533
2533
  [
@@ -2665,7 +2665,7 @@ const Nn = 12, Dn = 13, Fn = 10, Mn = 32, Bn = 9, Un = function(t) {
2665
2665
  state: Un(r),
2666
2666
  __needMoreData: function(n, i, o) {
2667
2667
  if (o) return !1;
2668
- const { encoding: s, escape: f, quote: l } = this.options, { quoting: u, needMoreDataSize: h, recordDelimiterMaxLength: c } = this.state, w = i - n - 1, p = Math.max(
2668
+ const { encoding: s, escape: f, quote: l } = this.options, { quoting: u, needMoreDataSize: h, recordDelimiterMaxLength: c } = this.state, m = i - n - 1, w = Math.max(
2669
2669
  h,
2670
2670
  // Skip if the remaining buffer smaller than record delimiter
2671
2671
  // If "record_delimiter" is yet to be discovered:
@@ -2680,7 +2680,7 @@ const Nn = 12, Dn = 13, Fn = 10, Mn = 32, Bn = 9, Un = function(t) {
2680
2680
  // Skip if remaining buffer can be record delimiter following the closing quote
2681
2681
  u ? l.length + c : 0
2682
2682
  );
2683
- return w < p;
2683
+ return m < w;
2684
2684
  },
2685
2685
  // Central parser implementation
2686
2686
  parse: function(n, i, o, s) {
@@ -2690,92 +2690,92 @@ const Nn = 12, Dn = 13, Fn = 10, Mn = 32, Bn = 9, Un = function(t) {
2690
2690
  encoding: u,
2691
2691
  from_line: h,
2692
2692
  ltrim: c,
2693
- max_record_size: w,
2694
- raw: p,
2695
- relax_quotes: I,
2696
- rtrim: m,
2697
- skip_empty_lines: D,
2693
+ max_record_size: m,
2694
+ raw: w,
2695
+ relax_quotes: O,
2696
+ rtrim: E,
2697
+ skip_empty_lines: x,
2698
2698
  to: S,
2699
- to_line: E
2699
+ to_line: g
2700
2700
  } = this.options;
2701
- let { comment: y, escape: A, quote: U, record_delimiter: Re } = this.options;
2701
+ let { comment: y, escape: L, quote: U, record_delimiter: Re } = this.options;
2702
2702
  const { bomSkipped: Yt, previousBuf: he, rawBuffer: Wt, escapeIsQuote: Ht } = this.state;
2703
- let b;
2703
+ let v;
2704
2704
  if (he === void 0)
2705
2705
  if (n === void 0) {
2706
2706
  s();
2707
2707
  return;
2708
2708
  } else
2709
- b = n;
2710
- else he !== void 0 && n === void 0 ? b = he : b = a.concat([he, n]);
2709
+ v = n;
2710
+ else he !== void 0 && n === void 0 ? v = he : v = a.concat([he, n]);
2711
2711
  if (Yt === !1)
2712
2712
  if (f === !1)
2713
2713
  this.state.bomSkipped = !0;
2714
- else if (b.length < 3) {
2714
+ else if (v.length < 3) {
2715
2715
  if (i === !1) {
2716
- this.state.previousBuf = b;
2716
+ this.state.previousBuf = v;
2717
2717
  return;
2718
2718
  }
2719
2719
  } else {
2720
- for (const R in re)
2721
- if (re[R].compare(b, 0, re[R].length) === 0) {
2722
- const J = re[R].length;
2723
- this.state.bufBytesStart += J, b = b.slice(J);
2720
+ for (const I in re)
2721
+ if (re[I].compare(v, 0, re[I].length) === 0) {
2722
+ const J = re[I].length;
2723
+ this.state.bufBytesStart += J, v = v.slice(J);
2724
2724
  const ce = ft({
2725
2725
  ...this.original_options,
2726
- encoding: R
2726
+ encoding: I
2727
2727
  });
2728
- for (const O in ce)
2729
- this.options[O] = ce[O];
2730
- ({ comment: y, escape: A, quote: U } = this.options);
2728
+ for (const C in ce)
2729
+ this.options[C] = ce[C];
2730
+ ({ comment: y, escape: L, quote: U } = this.options);
2731
2731
  break;
2732
2732
  }
2733
2733
  this.state.bomSkipped = !0;
2734
2734
  }
2735
- const Ie = b.length;
2735
+ const Ie = v.length;
2736
2736
  let d;
2737
2737
  for (d = 0; d < Ie && !this.__needMoreData(d, Ie, i); d++) {
2738
- if (this.state.wasRowDelimiter === !0 && (this.info.lines++, this.state.wasRowDelimiter = !1), E !== -1 && this.info.lines > E) {
2738
+ if (this.state.wasRowDelimiter === !0 && (this.info.lines++, this.state.wasRowDelimiter = !1), g !== -1 && this.info.lines > g) {
2739
2739
  this.state.stop = !0, s();
2740
2740
  return;
2741
2741
  }
2742
2742
  this.state.quoting === !1 && Re.length === 0 && this.__autoDiscoverRecordDelimiter(
2743
- b,
2743
+ v,
2744
2744
  d
2745
2745
  ) && (Re = this.options.record_delimiter);
2746
- const R = b[d];
2747
- if (p === !0 && Wt.append(R), (R === Pn || R === $n) && this.state.wasRowDelimiter === !1 && (this.state.wasRowDelimiter = !0), this.state.escaping === !0)
2746
+ const I = v[d];
2747
+ if (w === !0 && Wt.append(I), (I === Pn || I === $n) && this.state.wasRowDelimiter === !1 && (this.state.wasRowDelimiter = !0), this.state.escaping === !0)
2748
2748
  this.state.escaping = !1;
2749
2749
  else {
2750
- if (A !== null && this.state.quoting === !0 && this.__isEscape(b, d, R) && d + A.length < Ie)
2750
+ if (L !== null && this.state.quoting === !0 && this.__isEscape(v, d, I) && d + L.length < Ie)
2751
2751
  if (Ht) {
2752
- if (this.__isQuote(b, d + A.length)) {
2753
- this.state.escaping = !0, d += A.length - 1;
2752
+ if (this.__isQuote(v, d + L.length)) {
2753
+ this.state.escaping = !0, d += L.length - 1;
2754
2754
  continue;
2755
2755
  }
2756
2756
  } else {
2757
- this.state.escaping = !0, d += A.length - 1;
2757
+ this.state.escaping = !0, d += L.length - 1;
2758
2758
  continue;
2759
2759
  }
2760
- if (this.state.commenting === !1 && this.__isQuote(b, d))
2760
+ if (this.state.commenting === !1 && this.__isQuote(v, d))
2761
2761
  if (this.state.quoting === !0) {
2762
- const O = b[d + U.length], Z = m && this.__isCharTrimable(b, d + U.length), j = y !== null && this.__compareBytes(y, b, d + U.length, O), X = this.__isDelimiter(
2763
- b,
2762
+ const C = v[d + U.length], Z = E && this.__isCharTrimable(v, d + U.length), j = y !== null && this.__compareBytes(y, v, d + U.length, C), X = this.__isDelimiter(
2763
+ v,
2764
2764
  d + U.length,
2765
- O
2766
- ), de = Re.length === 0 ? this.__autoDiscoverRecordDelimiter(b, d + U.length) : this.__isRecordDelimiter(O, b, d + U.length);
2767
- if (A !== null && this.__isEscape(b, d, R) && this.__isQuote(b, d + A.length))
2768
- d += A.length - 1;
2769
- else if (!O || X || de || j || Z) {
2765
+ C
2766
+ ), de = Re.length === 0 ? this.__autoDiscoverRecordDelimiter(v, d + U.length) : this.__isRecordDelimiter(C, v, d + U.length);
2767
+ if (L !== null && this.__isEscape(v, d, I) && this.__isQuote(v, d + L.length))
2768
+ d += L.length - 1;
2769
+ else if (!C || X || de || j || Z) {
2770
2770
  this.state.quoting = !1, this.state.wasQuoting = !0, d += U.length - 1;
2771
2771
  continue;
2772
- } else if (I === !1) {
2772
+ } else if (O === !1) {
2773
2773
  const He = this.__error(
2774
2774
  new _(
2775
2775
  "CSV_INVALID_CLOSING_QUOTE",
2776
2776
  [
2777
2777
  "Invalid Closing Quote:",
2778
- `got "${String.fromCharCode(O)}"`,
2778
+ `got "${String.fromCharCode(C)}"`,
2779
2779
  `at line ${this.info.lines}`,
2780
2780
  "instead of delimiter, record delimiter, trimable character",
2781
2781
  "(if activated) or comment"
@@ -2788,19 +2788,19 @@ const Nn = 12, Dn = 13, Fn = 10, Mn = 32, Bn = 9, Un = function(t) {
2788
2788
  } else
2789
2789
  this.state.quoting = !1, this.state.wasQuoting = !0, this.state.field.prepend(U), d += U.length - 1;
2790
2790
  } else if (this.state.field.length !== 0) {
2791
- if (I === !1) {
2792
- const O = this.__infoField(), Z = Object.keys(re).map(
2791
+ if (O === !1) {
2792
+ const C = this.__infoField(), Z = Object.keys(re).map(
2793
2793
  (X) => re[X].equals(this.state.field.toString()) ? X : !1
2794
2794
  ).filter(Boolean)[0], j = this.__error(
2795
2795
  new _(
2796
2796
  "INVALID_OPENING_QUOTE",
2797
2797
  [
2798
2798
  "Invalid Opening Quote:",
2799
- `a quote is found on field ${JSON.stringify(O.column)} at line ${O.lines}, value is ${JSON.stringify(this.state.field.toString(u))}`,
2799
+ `a quote is found on field ${JSON.stringify(C.column)} at line ${C.lines}, value is ${JSON.stringify(this.state.field.toString(u))}`,
2800
2800
  Z ? `(${Z} bom)` : void 0
2801
2801
  ],
2802
2802
  this.options,
2803
- O,
2803
+ C,
2804
2804
  {
2805
2805
  field: this.state.field
2806
2806
  }
@@ -2813,27 +2813,27 @@ const Nn = 12, Dn = 13, Fn = 10, Mn = 32, Bn = 9, Un = function(t) {
2813
2813
  continue;
2814
2814
  }
2815
2815
  if (this.state.quoting === !1) {
2816
- const O = this.__isRecordDelimiter(
2817
- R,
2818
- b,
2816
+ const C = this.__isRecordDelimiter(
2817
+ I,
2818
+ v,
2819
2819
  d
2820
2820
  );
2821
- if (O !== 0) {
2821
+ if (C !== 0) {
2822
2822
  if (this.state.commenting && this.state.wasQuoting === !1 && this.state.record.length === 0 && this.state.field.length === 0)
2823
2823
  this.info.comment_lines++;
2824
2824
  else {
2825
2825
  if (this.state.enabled === !1 && this.info.lines + (this.state.wasRowDelimiter === !0 ? 1 : 0) >= h) {
2826
- this.state.enabled = !0, this.__resetField(), this.__resetRecord(), d += O - 1;
2826
+ this.state.enabled = !0, this.__resetField(), this.__resetRecord(), d += C - 1;
2827
2827
  continue;
2828
2828
  }
2829
- if (D === !0 && this.state.wasQuoting === !1 && this.state.record.length === 0 && this.state.field.length === 0) {
2830
- this.info.empty_lines++, d += O - 1;
2829
+ if (x === !0 && this.state.wasQuoting === !1 && this.state.record.length === 0 && this.state.field.length === 0) {
2830
+ this.info.empty_lines++, d += C - 1;
2831
2831
  continue;
2832
2832
  }
2833
2833
  this.info.bytes = this.state.bufBytesStart + d;
2834
2834
  const X = this.__onField();
2835
2835
  if (X !== void 0) return X;
2836
- this.info.bytes = this.state.bufBytesStart + d + O;
2836
+ this.info.bytes = this.state.bufBytesStart + d + C;
2837
2837
  const de = this.__onRecord(o);
2838
2838
  if (de !== void 0) return de;
2839
2839
  if (S !== -1 && this.info.records >= S) {
@@ -2841,16 +2841,16 @@ const Nn = 12, Dn = 13, Fn = 10, Mn = 32, Bn = 9, Un = function(t) {
2841
2841
  return;
2842
2842
  }
2843
2843
  }
2844
- this.state.commenting = !1, d += O - 1;
2844
+ this.state.commenting = !1, d += C - 1;
2845
2845
  continue;
2846
2846
  }
2847
2847
  if (this.state.commenting)
2848
2848
  continue;
2849
- if (y !== null && (l === !1 || this.state.record.length === 0 && this.state.field.length === 0) && this.__compareBytes(y, b, d, R) !== 0) {
2849
+ if (y !== null && (l === !1 || this.state.record.length === 0 && this.state.field.length === 0) && this.__compareBytes(y, v, d, I) !== 0) {
2850
2850
  this.state.commenting = !0;
2851
2851
  continue;
2852
2852
  }
2853
- const Z = this.__isDelimiter(b, d, R);
2853
+ const Z = this.__isDelimiter(v, d, I);
2854
2854
  if (Z !== 0) {
2855
2855
  this.info.bytes = this.state.bufBytesStart + d;
2856
2856
  const j = this.__onField();
@@ -2860,25 +2860,25 @@ const Nn = 12, Dn = 13, Fn = 10, Mn = 32, Bn = 9, Un = function(t) {
2860
2860
  }
2861
2861
  }
2862
2862
  }
2863
- if (this.state.commenting === !1 && w !== 0 && this.state.record_length + this.state.field.length > w)
2863
+ if (this.state.commenting === !1 && m !== 0 && this.state.record_length + this.state.field.length > m)
2864
2864
  return this.__error(
2865
2865
  new _(
2866
2866
  "CSV_MAX_RECORD_SIZE",
2867
2867
  [
2868
2868
  "Max Record Size:",
2869
2869
  "record exceed the maximum number of tolerated bytes",
2870
- `of ${w}`,
2870
+ `of ${m}`,
2871
2871
  `at line ${this.info.lines}`
2872
2872
  ],
2873
2873
  this.options,
2874
2874
  this.__infoField()
2875
2875
  )
2876
2876
  );
2877
- const J = c === !1 || this.state.quoting === !0 || this.state.field.length !== 0 || !this.__isCharTrimable(b, d), ce = m === !1 || this.state.wasQuoting === !1;
2877
+ const J = c === !1 || this.state.quoting === !0 || this.state.field.length !== 0 || !this.__isCharTrimable(v, d), ce = E === !1 || this.state.wasQuoting === !1;
2878
2878
  if (J === !0 && ce === !0)
2879
- this.state.field.append(R);
2879
+ this.state.field.append(I);
2880
2880
  else {
2881
- if (m === !0 && !this.__isCharTrimable(b, d))
2881
+ if (E === !0 && !this.__isCharTrimable(v, d))
2882
2882
  return this.__error(
2883
2883
  new _(
2884
2884
  "CSV_NON_TRIMABLE_CHAR_AFTER_CLOSING_QUOTE",
@@ -2891,13 +2891,13 @@ const Nn = 12, Dn = 13, Fn = 10, Mn = 32, Bn = 9, Un = function(t) {
2891
2891
  this.__infoField()
2892
2892
  )
2893
2893
  );
2894
- J === !1 && (d += this.__isCharTrimable(b, d) - 1);
2894
+ J === !1 && (d += this.__isCharTrimable(v, d) - 1);
2895
2895
  continue;
2896
2896
  }
2897
2897
  }
2898
2898
  if (i === !0)
2899
2899
  if (this.state.quoting === !0) {
2900
- const R = this.__error(
2900
+ const I = this.__error(
2901
2901
  new _(
2902
2902
  "CSV_QUOTE_NOT_CLOSED",
2903
2903
  [
@@ -2908,16 +2908,16 @@ const Nn = 12, Dn = 13, Fn = 10, Mn = 32, Bn = 9, Un = function(t) {
2908
2908
  this.__infoField()
2909
2909
  )
2910
2910
  );
2911
- if (R !== void 0) return R;
2911
+ if (I !== void 0) return I;
2912
2912
  } else if (this.state.wasQuoting === !0 || this.state.record.length !== 0 || this.state.field.length !== 0) {
2913
2913
  this.info.bytes = this.state.bufBytesStart + d;
2914
- const R = this.__onField();
2915
- if (R !== void 0) return R;
2914
+ const I = this.__onField();
2915
+ if (I !== void 0) return I;
2916
2916
  const J = this.__onRecord(o);
2917
2917
  if (J !== void 0) return J;
2918
2918
  } else this.state.wasRowDelimiter === !0 ? this.info.empty_lines++ : this.state.commenting === !0 && this.info.comment_lines++;
2919
2919
  else
2920
- this.state.bufBytesStart += d, this.state.previousBuf = b.slice(d);
2920
+ this.state.bufBytesStart += d, this.state.previousBuf = v.slice(d);
2921
2921
  this.state.wasRowDelimiter === !0 && (this.info.lines++, this.state.wasRowDelimiter = !1);
2922
2922
  },
2923
2923
  __onRecord: function(n) {
@@ -2930,31 +2930,31 @@ const Nn = 12, Dn = 13, Fn = 10, Mn = 32, Bn = 9, Un = function(t) {
2930
2930
  relax_column_count: u,
2931
2931
  relax_column_count_less: h,
2932
2932
  relax_column_count_more: c,
2933
- raw: w,
2934
- skip_records_with_empty_values: p
2935
- } = this.options, { enabled: I, record: m } = this.state;
2936
- if (I === !1)
2933
+ raw: m,
2934
+ skip_records_with_empty_values: w
2935
+ } = this.options, { enabled: O, record: E } = this.state;
2936
+ if (O === !1)
2937
2937
  return this.__resetRecord();
2938
- const D = m.length;
2938
+ const x = E.length;
2939
2939
  if (i === !0) {
2940
- if (p === !0 && at(m)) {
2940
+ if (w === !0 && at(E)) {
2941
2941
  this.__resetRecord();
2942
2942
  return;
2943
2943
  }
2944
- return this.__firstLineToColumns(m);
2944
+ return this.__firstLineToColumns(E);
2945
2945
  }
2946
- if (i === !1 && this.info.records === 0 && (this.state.expectedRecordLength = D), D !== this.state.expectedRecordLength) {
2946
+ if (i === !1 && this.info.records === 0 && (this.state.expectedRecordLength = x), x !== this.state.expectedRecordLength) {
2947
2947
  const S = i === !1 ? new _(
2948
2948
  "CSV_RECORD_INCONSISTENT_FIELDS_LENGTH",
2949
2949
  [
2950
2950
  "Invalid Record Length:",
2951
2951
  `expect ${this.state.expectedRecordLength},`,
2952
- `got ${D} on line ${this.info.lines}`
2952
+ `got ${x} on line ${this.info.lines}`
2953
2953
  ],
2954
2954
  this.options,
2955
2955
  this.__infoField(),
2956
2956
  {
2957
- record: m
2957
+ record: E
2958
2958
  }
2959
2959
  ) : new _(
2960
2960
  "CSV_RECORD_INCONSISTENT_COLUMNS",
@@ -2962,22 +2962,22 @@ const Nn = 12, Dn = 13, Fn = 10, Mn = 32, Bn = 9, Un = function(t) {
2962
2962
  "Invalid Record Length:",
2963
2963
  `columns length is ${i.length},`,
2964
2964
  // rename columns
2965
- `got ${D} on line ${this.info.lines}`
2965
+ `got ${x} on line ${this.info.lines}`
2966
2966
  ],
2967
2967
  this.options,
2968
2968
  this.__infoField(),
2969
2969
  {
2970
- record: m
2970
+ record: E
2971
2971
  }
2972
2972
  );
2973
- if (u === !0 || h === !0 && D < this.state.expectedRecordLength || c === !0 && D > this.state.expectedRecordLength)
2973
+ if (u === !0 || h === !0 && x < this.state.expectedRecordLength || c === !0 && x > this.state.expectedRecordLength)
2974
2974
  this.info.invalid_field_length++, this.state.error = S;
2975
2975
  else {
2976
- const E = this.__error(S);
2977
- if (E) return E;
2976
+ const g = this.__error(S);
2977
+ if (g) return g;
2978
2978
  }
2979
2979
  }
2980
- if (p === !0 && at(m)) {
2980
+ if (w === !0 && at(E)) {
2981
2981
  this.__resetRecord();
2982
2982
  return;
2983
2983
  }
@@ -2988,46 +2988,46 @@ const Nn = 12, Dn = 13, Fn = 10, Mn = 32, Bn = 9, Un = function(t) {
2988
2988
  if (this.info.records++, l === 1 || this.info.records >= l) {
2989
2989
  const { objname: S } = this.options;
2990
2990
  if (i !== !1) {
2991
- const E = {};
2992
- for (let y = 0, A = m.length; y < A; y++)
2993
- i[y] === void 0 || i[y].disabled || (o === !0 && E[i[y].name] !== void 0 ? Array.isArray(E[i[y].name]) ? E[i[y].name] = E[i[y].name].concat(m[y]) : E[i[y].name] = [E[i[y].name], m[y]] : E[i[y].name] = m[y]);
2994
- if (w === !0 || f === !0) {
2991
+ const g = {};
2992
+ for (let y = 0, L = E.length; y < L; y++)
2993
+ i[y] === void 0 || i[y].disabled || (o === !0 && g[i[y].name] !== void 0 ? Array.isArray(g[i[y].name]) ? g[i[y].name] = g[i[y].name].concat(E[y]) : g[i[y].name] = [g[i[y].name], E[y]] : g[i[y].name] = E[y]);
2994
+ if (m === !0 || f === !0) {
2995
2995
  const y = Object.assign(
2996
- { record: E },
2997
- w === !0 ? { raw: this.state.rawBuffer.toString(s) } : {},
2996
+ { record: g },
2997
+ m === !0 ? { raw: this.state.rawBuffer.toString(s) } : {},
2998
2998
  f === !0 ? { info: this.__infoRecord() } : {}
2999
- ), A = this.__push(
3000
- S === void 0 ? y : [E[S], y],
2999
+ ), L = this.__push(
3000
+ S === void 0 ? y : [g[S], y],
3001
3001
  n
3002
3002
  );
3003
- if (A)
3004
- return A;
3003
+ if (L)
3004
+ return L;
3005
3005
  } else {
3006
3006
  const y = this.__push(
3007
- S === void 0 ? E : [E[S], E],
3007
+ S === void 0 ? g : [g[S], g],
3008
3008
  n
3009
3009
  );
3010
3010
  if (y)
3011
3011
  return y;
3012
3012
  }
3013
- } else if (w === !0 || f === !0) {
3014
- const E = Object.assign(
3015
- { record: m },
3016
- w === !0 ? { raw: this.state.rawBuffer.toString(s) } : {},
3013
+ } else if (m === !0 || f === !0) {
3014
+ const g = Object.assign(
3015
+ { record: E },
3016
+ m === !0 ? { raw: this.state.rawBuffer.toString(s) } : {},
3017
3017
  f === !0 ? { info: this.__infoRecord() } : {}
3018
3018
  ), y = this.__push(
3019
- S === void 0 ? E : [m[S], E],
3019
+ S === void 0 ? g : [E[S], g],
3020
3020
  n
3021
3021
  );
3022
3022
  if (y)
3023
3023
  return y;
3024
3024
  } else {
3025
- const E = this.__push(
3026
- S === void 0 ? m : [m[S], m],
3025
+ const g = this.__push(
3026
+ S === void 0 ? E : [E[S], E],
3027
3027
  n
3028
3028
  );
3029
- if (E)
3030
- return E;
3029
+ if (g)
3030
+ return g;
3031
3031
  }
3032
3032
  }
3033
3033
  this.__resetRecord();
@@ -3296,7 +3296,7 @@ const lt = function() {
3296
3296
  let t, e, r;
3297
3297
  for (const i in arguments) {
3298
3298
  const o = arguments[i], s = typeof o;
3299
- if (t === void 0 && (typeof o == "string" || L(o)))
3299
+ if (t === void 0 && (typeof o == "string" || N(o)))
3300
3300
  t = o;
3301
3301
  else if (e === void 0 && Vt(o))
3302
3302
  e = o;
@@ -3382,38 +3382,44 @@ class Gn {
3382
3382
  /** Parse stream. */
3383
3383
  async parseStream(e, r, n, i) {
3384
3384
  return new Promise((o, s) => {
3385
- let f, l, u, h = !1;
3386
- const c = (p) => {
3387
- h || (console.log("handleError 1"), h = !0, console.log("handleError 2"), i.signal.aborted || i.abort(p), console.log("handleError 3"), this.ignoreErrors(() => {
3385
+ let f, l, u, h = !1, c = 0, m = !1;
3386
+ const w = () => {
3387
+ if (m) return;
3388
+ m = !0;
3389
+ const x = f;
3390
+ f = void 0, u = void 0, x != null && (this.ignoreErrors(() => x.removeAllListeners()), this.ignoreErrors(() => x.end())), this.ignoreErrors(() => {
3388
3391
  l?.cancel();
3389
- }), console.log("handleError 4"), s(p), console.log("handleError 5"));
3392
+ }), l = void 0;
3393
+ }, O = (x) => {
3394
+ h || (console.log("handleError 1"), h = !0, console.log("handleError 2"), w(), i.signal.aborted || i.abort(x), console.log("handleError 3"), console.log("handleError 4"), s(x), console.log("handleError 5"));
3390
3395
  };
3391
- (async () => {
3396
+ i.signal.addEventListener("abort", w, { once: !0 }), (async () => {
3392
3397
  f = lt(e), u = this.constructRowBuffer({ chunk: r.chunk, chunkSize: r.chunkSize ?? Qn }), f.on("readable", () => {
3393
3398
  try {
3394
- if (console.log(2222), f == null || u == null) return;
3395
- let m;
3396
- for (; (m = f.read()) != null; ) {
3397
- if (console.log(9999), h) return;
3398
- i.signal.throwIfAborted(), u.push(m);
3399
+ if (console.log(2222, c), f == null || u == null) return;
3400
+ let g;
3401
+ for (; (g = f.read()) != null; ) {
3402
+ if (c++, h) return;
3403
+ i.signal.throwIfAborted(), u.push(g);
3399
3404
  }
3400
- } catch (m) {
3401
- c(m);
3405
+ console.log(3333, c);
3406
+ } catch (g) {
3407
+ O(g);
3402
3408
  }
3403
- }), f.on("error", (m) => c(m)), f.on("end", () => {
3409
+ }), f.on("error", (g) => O(g)), f.on("end", () => {
3404
3410
  h || (u?.flush(), o(this.constructSummary(f)));
3405
3411
  });
3406
- const p = await fetch(encodeURI(n), { signal: i.signal });
3407
- if (!p.ok || p.body == null)
3408
- throw await Yn(p, `Failed to fetch '${n}' file.`, "datapos-connector-file-store-emulator|Connector|retrieve");
3409
- l = p.body.pipeThrough(new TextDecoderStream(r.encodingId)).getReader();
3410
- let I = await l.read();
3411
- for (; !I.done; ) {
3412
+ const x = await fetch(encodeURI(n), { signal: i.signal });
3413
+ if (!x.ok || x.body == null)
3414
+ throw await Yn(x, `Failed to fetch '${n}' file.`, "datapos-connector-file-store-emulator|Connector|retrieve");
3415
+ l = x.body.pipeThrough(new TextDecoderStream(r.encodingId)).getReader();
3416
+ let S = await l.read();
3417
+ for (; !S.done; ) {
3412
3418
  if (console.log(1111.1), h) return;
3413
- console.log(1111.2), i.signal.throwIfAborted(), await this.writeToParser(f, I.value), I = await l.read();
3419
+ console.log(1111.2), i.signal.throwIfAborted(), await this.writeToParser(f, S.value), S = await l.read();
3414
3420
  }
3415
3421
  f.end();
3416
- })().catch((p) => c(p));
3422
+ })().catch((x) => O(x));
3417
3423
  });
3418
3424
  }
3419
3425
  /** Parse string. */