@moovio/sdk 26.4.0-dev.0 → 26.4.0-dev.1

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.
Files changed (28) hide show
  1. package/bin/mcp-server.js +661 -195
  2. package/bin/mcp-server.js.map +27 -24
  3. package/examples/package-lock.json +4 -4
  4. package/jsr.json +1 -1
  5. package/lib/config.d.ts +3 -3
  6. package/lib/config.js +3 -3
  7. package/mcp-server/mcp-server.js +1 -1
  8. package/mcp-server/server.js +1 -1
  9. package/models/components/createpaymentlinklineitem.d.ts +10 -2
  10. package/models/components/createpaymentlinklineitem.d.ts.map +1 -1
  11. package/models/components/createpaymentlinklineitem.js.map +1 -1
  12. package/models/components/createpaymentlinklineitemoption.d.ts +6 -1
  13. package/models/components/createpaymentlinklineitemoption.d.ts.map +1 -1
  14. package/models/components/createpaymentlinklineitemoption.js.map +1 -1
  15. package/models/components/createscheduledtransferlineitem.d.ts +4 -1
  16. package/models/components/createscheduledtransferlineitem.d.ts.map +1 -1
  17. package/models/components/createscheduledtransferlineitem.js.map +1 -1
  18. package/models/components/createtransferlineitem.d.ts +4 -1
  19. package/models/components/createtransferlineitem.d.ts.map +1 -1
  20. package/models/components/createtransferlineitem.js.map +1 -1
  21. package/package.json +4 -4
  22. package/src/lib/config.ts +3 -3
  23. package/src/mcp-server/mcp-server.ts +1 -1
  24. package/src/mcp-server/server.ts +1 -1
  25. package/src/models/components/createpaymentlinklineitem.ts +10 -2
  26. package/src/models/components/createpaymentlinklineitemoption.ts +6 -1
  27. package/src/models/components/createscheduledtransferlineitem.ts +4 -1
  28. package/src/models/components/createtransferlineitem.ts +4 -1
package/bin/mcp-server.js CHANGED
@@ -9696,7 +9696,7 @@ var require_setprototypeof = __commonJS((exports, module) => {
9696
9696
  }
9697
9697
  });
9698
9698
 
9699
- // node_modules/statuses/codes.json
9699
+ // node_modules/raw-body/node_modules/statuses/codes.json
9700
9700
  var require_codes = __commonJS((exports, module) => {
9701
9701
  module.exports = {
9702
9702
  "100": "Continue",
@@ -9765,7 +9765,7 @@ var require_codes = __commonJS((exports, module) => {
9765
9765
  };
9766
9766
  });
9767
9767
 
9768
- // node_modules/statuses/index.js
9768
+ // node_modules/raw-body/node_modules/statuses/index.js
9769
9769
  var require_statuses = __commonJS((exports, module) => {
9770
9770
  /*!
9771
9771
  * statuses
@@ -9896,7 +9896,7 @@ var require_toidentifier = __commonJS((exports, module) => {
9896
9896
  }
9897
9897
  });
9898
9898
 
9899
- // node_modules/http-errors/index.js
9899
+ // node_modules/raw-body/node_modules/http-errors/index.js
9900
9900
  var require_http_errors = __commonJS((exports, module) => {
9901
9901
  /*!
9902
9902
  * http-errors
@@ -10059,7 +10059,7 @@ var require_http_errors = __commonJS((exports, module) => {
10059
10059
  });
10060
10060
  }
10061
10061
  function toClassName(name) {
10062
- return name.substr(-5) !== "Error" ? name + "Error" : name;
10062
+ return name.slice(-5) === "Error" ? name : name + "Error";
10063
10063
  }
10064
10064
  });
10065
10065
 
@@ -10157,12 +10157,14 @@ var require_bom_handling = __commonJS((exports) => {
10157
10157
  }
10158
10158
  StripBOMWrapper.prototype.write = function(buf) {
10159
10159
  var res = this.decoder.write(buf);
10160
- if (this.pass || !res)
10160
+ if (this.pass || !res) {
10161
10161
  return res;
10162
+ }
10162
10163
  if (res[0] === BOMChar) {
10163
10164
  res = res.slice(1);
10164
- if (typeof this.options.stripBOM === "function")
10165
+ if (typeof this.options.stripBOM === "function") {
10165
10166
  this.options.stripBOM();
10167
+ }
10166
10168
  }
10167
10169
  this.pass = true;
10168
10170
  return res;
@@ -10172,6 +10174,19 @@ var require_bom_handling = __commonJS((exports) => {
10172
10174
  };
10173
10175
  });
10174
10176
 
10177
+ // node_modules/raw-body/node_modules/iconv-lite/lib/helpers/merge-exports.js
10178
+ var require_merge_exports = __commonJS((exports, module) => {
10179
+ var hasOwn = typeof Object.hasOwn === "undefined" ? Function.call.bind(Object.prototype.hasOwnProperty) : Object.hasOwn;
10180
+ function mergeModules(target, module2) {
10181
+ for (var key in module2) {
10182
+ if (hasOwn(module2, key)) {
10183
+ target[key] = module2[key];
10184
+ }
10185
+ }
10186
+ }
10187
+ module.exports = mergeModules;
10188
+ });
10189
+
10175
10190
  // node_modules/raw-body/node_modules/iconv-lite/encodings/internal.js
10176
10191
  var require_internal = __commonJS((exports, module) => {
10177
10192
  var Buffer2 = require_safer().Buffer;
@@ -10189,9 +10204,11 @@ var require_internal = __commonJS((exports, module) => {
10189
10204
  function InternalCodec(codecOptions, iconv) {
10190
10205
  this.enc = codecOptions.encodingName;
10191
10206
  this.bomAware = codecOptions.bomAware;
10192
- if (this.enc === "base64")
10207
+ if (this.enc === "base64") {
10193
10208
  this.encoder = InternalEncoderBase64;
10194
- else if (this.enc === "cesu8") {
10209
+ } else if (this.enc === "utf8") {
10210
+ this.encoder = InternalEncoderUtf8;
10211
+ } else if (this.enc === "cesu8") {
10195
10212
  this.enc = "utf8";
10196
10213
  this.encoder = InternalEncoderCesu8;
10197
10214
  if (Buffer2.from("eda0bdedb2a9", "hex").toString() !== "\uD83D\uDCA9") {
@@ -10203,8 +10220,6 @@ var require_internal = __commonJS((exports, module) => {
10203
10220
  InternalCodec.prototype.encoder = InternalEncoder;
10204
10221
  InternalCodec.prototype.decoder = InternalDecoder;
10205
10222
  var StringDecoder = __require("string_decoder").StringDecoder;
10206
- if (!StringDecoder.prototype.end)
10207
- StringDecoder.prototype.end = function() {};
10208
10223
  function InternalDecoder(options, codec) {
10209
10224
  this.decoder = new StringDecoder(codec.enc);
10210
10225
  }
@@ -10239,12 +10254,13 @@ var require_internal = __commonJS((exports, module) => {
10239
10254
  };
10240
10255
  function InternalEncoderCesu8(options, codec) {}
10241
10256
  InternalEncoderCesu8.prototype.write = function(str) {
10242
- var buf = Buffer2.alloc(str.length * 3), bufIdx = 0;
10257
+ var buf = Buffer2.alloc(str.length * 3);
10258
+ var bufIdx = 0;
10243
10259
  for (var i = 0;i < str.length; i++) {
10244
10260
  var charCode = str.charCodeAt(i);
10245
- if (charCode < 128)
10261
+ if (charCode < 128) {
10246
10262
  buf[bufIdx++] = charCode;
10247
- else if (charCode < 2048) {
10263
+ } else if (charCode < 2048) {
10248
10264
  buf[bufIdx++] = 192 + (charCode >>> 6);
10249
10265
  buf[bufIdx++] = 128 + (charCode & 63);
10250
10266
  } else {
@@ -10263,7 +10279,10 @@ var require_internal = __commonJS((exports, module) => {
10263
10279
  this.defaultCharUnicode = codec.defaultCharUnicode;
10264
10280
  }
10265
10281
  InternalDecoderCesu8.prototype.write = function(buf) {
10266
- var acc = this.acc, contBytes = this.contBytes, accBytes = this.accBytes, res = "";
10282
+ var acc = this.acc;
10283
+ var contBytes = this.contBytes;
10284
+ var accBytes = this.accBytes;
10285
+ var res = "";
10267
10286
  for (var i = 0;i < buf.length; i++) {
10268
10287
  var curByte = buf[i];
10269
10288
  if ((curByte & 192) !== 128) {
@@ -10290,12 +10309,13 @@ var require_internal = __commonJS((exports, module) => {
10290
10309
  contBytes--;
10291
10310
  accBytes++;
10292
10311
  if (contBytes === 0) {
10293
- if (accBytes === 2 && acc < 128 && acc > 0)
10312
+ if (accBytes === 2 && acc < 128 && acc > 0) {
10294
10313
  res += this.defaultCharUnicode;
10295
- else if (accBytes === 3 && acc < 2048)
10314
+ } else if (accBytes === 3 && acc < 2048) {
10296
10315
  res += this.defaultCharUnicode;
10297
- else
10316
+ } else {
10298
10317
  res += String.fromCharCode(acc);
10318
+ }
10299
10319
  }
10300
10320
  } else {
10301
10321
  res += this.defaultCharUnicode;
@@ -10309,10 +10329,35 @@ var require_internal = __commonJS((exports, module) => {
10309
10329
  };
10310
10330
  InternalDecoderCesu8.prototype.end = function() {
10311
10331
  var res = 0;
10312
- if (this.contBytes > 0)
10332
+ if (this.contBytes > 0) {
10313
10333
  res += this.defaultCharUnicode;
10334
+ }
10314
10335
  return res;
10315
10336
  };
10337
+ function InternalEncoderUtf8(options, codec) {
10338
+ this.highSurrogate = "";
10339
+ }
10340
+ InternalEncoderUtf8.prototype.write = function(str) {
10341
+ if (this.highSurrogate) {
10342
+ str = this.highSurrogate + str;
10343
+ this.highSurrogate = "";
10344
+ }
10345
+ if (str.length > 0) {
10346
+ var charCode = str.charCodeAt(str.length - 1);
10347
+ if (charCode >= 55296 && charCode < 56320) {
10348
+ this.highSurrogate = str[str.length - 1];
10349
+ str = str.slice(0, str.length - 1);
10350
+ }
10351
+ }
10352
+ return Buffer2.from(str, this.enc);
10353
+ };
10354
+ InternalEncoderUtf8.prototype.end = function() {
10355
+ if (this.highSurrogate) {
10356
+ var str = this.highSurrogate;
10357
+ this.highSurrogate = "";
10358
+ return Buffer2.from(str, this.enc);
10359
+ }
10360
+ };
10316
10361
  });
10317
10362
 
10318
10363
  // node_modules/raw-body/node_modules/iconv-lite/encodings/utf32.js
@@ -10341,8 +10386,8 @@ var require_utf32 = __commonJS((exports) => {
10341
10386
  var offset = 0;
10342
10387
  for (var i = 0;i < src.length; i += 2) {
10343
10388
  var code = src.readUInt16LE(i);
10344
- var isHighSurrogate = 55296 <= code && code < 56320;
10345
- var isLowSurrogate = 56320 <= code && code < 57344;
10389
+ var isHighSurrogate = code >= 55296 && code < 56320;
10390
+ var isLowSurrogate = code >= 56320 && code < 57344;
10346
10391
  if (this.highSurrogate) {
10347
10392
  if (isHighSurrogate || !isLowSurrogate) {
10348
10393
  write32.call(dst, this.highSurrogate, offset);
@@ -10355,26 +10400,29 @@ var require_utf32 = __commonJS((exports) => {
10355
10400
  continue;
10356
10401
  }
10357
10402
  }
10358
- if (isHighSurrogate)
10403
+ if (isHighSurrogate) {
10359
10404
  this.highSurrogate = code;
10360
- else {
10405
+ } else {
10361
10406
  write32.call(dst, code, offset);
10362
10407
  offset += 4;
10363
10408
  this.highSurrogate = 0;
10364
10409
  }
10365
10410
  }
10366
- if (offset < dst.length)
10411
+ if (offset < dst.length) {
10367
10412
  dst = dst.slice(0, offset);
10413
+ }
10368
10414
  return dst;
10369
10415
  };
10370
10416
  Utf32Encoder.prototype.end = function() {
10371
- if (!this.highSurrogate)
10417
+ if (!this.highSurrogate) {
10372
10418
  return;
10419
+ }
10373
10420
  var buf = Buffer2.alloc(4);
10374
- if (this.isLE)
10421
+ if (this.isLE) {
10375
10422
  buf.writeUInt32LE(this.highSurrogate, 0);
10376
- else
10423
+ } else {
10377
10424
  buf.writeUInt32BE(this.highSurrogate, 0);
10425
+ }
10378
10426
  this.highSurrogate = 0;
10379
10427
  return buf;
10380
10428
  };
@@ -10384,8 +10432,9 @@ var require_utf32 = __commonJS((exports) => {
10384
10432
  this.overflow = [];
10385
10433
  }
10386
10434
  Utf32Decoder.prototype.write = function(src) {
10387
- if (src.length === 0)
10435
+ if (src.length === 0) {
10388
10436
  return "";
10437
+ }
10389
10438
  var i = 0;
10390
10439
  var codepoint = 0;
10391
10440
  var dst = Buffer2.alloc(src.length + 4);
@@ -10394,8 +10443,9 @@ var require_utf32 = __commonJS((exports) => {
10394
10443
  var overflow = this.overflow;
10395
10444
  var badChar = this.badChar;
10396
10445
  if (overflow.length > 0) {
10397
- for (;i < src.length && overflow.length < 4; i++)
10446
+ for (;i < src.length && overflow.length < 4; i++) {
10398
10447
  overflow.push(src[i]);
10448
+ }
10399
10449
  if (overflow.length === 4) {
10400
10450
  if (isLE) {
10401
10451
  codepoint = overflow[i] | overflow[i + 1] << 8 | overflow[i + 2] << 16 | overflow[i + 3] << 24;
@@ -10446,8 +10496,9 @@ var require_utf32 = __commonJS((exports) => {
10446
10496
  Utf32AutoCodec.prototype.decoder = Utf32AutoDecoder;
10447
10497
  function Utf32AutoEncoder(options, codec) {
10448
10498
  options = options || {};
10449
- if (options.addBOM === undefined)
10499
+ if (options.addBOM === undefined) {
10450
10500
  options.addBOM = true;
10501
+ }
10451
10502
  this.encoder = codec.iconv.getEncoder(options.defaultEncoding || "utf-32le", options);
10452
10503
  }
10453
10504
  Utf32AutoEncoder.prototype.write = function(str) {
@@ -10467,13 +10518,15 @@ var require_utf32 = __commonJS((exports) => {
10467
10518
  if (!this.decoder) {
10468
10519
  this.initialBufs.push(buf);
10469
10520
  this.initialBufsLen += buf.length;
10470
- if (this.initialBufsLen < 32)
10521
+ if (this.initialBufsLen < 32) {
10471
10522
  return "";
10523
+ }
10472
10524
  var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding);
10473
10525
  this.decoder = this.iconv.getDecoder(encoding, this.options);
10474
10526
  var resStr = "";
10475
- for (var i = 0;i < this.initialBufs.length; i++)
10527
+ for (var i = 0;i < this.initialBufs.length; i++) {
10476
10528
  resStr += this.decoder.write(this.initialBufs[i]);
10529
+ }
10477
10530
  this.initialBufs.length = this.initialBufsLen = 0;
10478
10531
  return resStr;
10479
10532
  }
@@ -10484,11 +10537,13 @@ var require_utf32 = __commonJS((exports) => {
10484
10537
  var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding);
10485
10538
  this.decoder = this.iconv.getDecoder(encoding, this.options);
10486
10539
  var resStr = "";
10487
- for (var i = 0;i < this.initialBufs.length; i++)
10540
+ for (var i = 0;i < this.initialBufs.length; i++) {
10488
10541
  resStr += this.decoder.write(this.initialBufs[i]);
10542
+ }
10489
10543
  var trail = this.decoder.end();
10490
- if (trail)
10544
+ if (trail) {
10491
10545
  resStr += trail;
10546
+ }
10492
10547
  this.initialBufs.length = this.initialBufsLen = 0;
10493
10548
  return resStr;
10494
10549
  }
@@ -10497,9 +10552,11 @@ var require_utf32 = __commonJS((exports) => {
10497
10552
  function detectEncoding(bufs, defaultEncoding) {
10498
10553
  var b2 = [];
10499
10554
  var charsProcessed = 0;
10500
- var invalidLE = 0, invalidBE = 0;
10501
- var bmpCharsLE = 0, bmpCharsBE = 0;
10502
- outer_loop:
10555
+ var invalidLE = 0;
10556
+ var invalidBE = 0;
10557
+ var bmpCharsLE = 0;
10558
+ var bmpCharsBE = 0;
10559
+ outerLoop:
10503
10560
  for (var i = 0;i < bufs.length; i++) {
10504
10561
  var buf = bufs[i];
10505
10562
  for (var j2 = 0;j2 < buf.length; j2++) {
@@ -10524,7 +10581,7 @@ var require_utf32 = __commonJS((exports) => {
10524
10581
  b2.length = 0;
10525
10582
  charsProcessed++;
10526
10583
  if (charsProcessed >= 100) {
10527
- break outer_loop;
10584
+ break outerLoop;
10528
10585
  }
10529
10586
  }
10530
10587
  }
@@ -10560,9 +10617,12 @@ var require_utf16 = __commonJS((exports) => {
10560
10617
  this.overflowByte = -1;
10561
10618
  }
10562
10619
  Utf16BEDecoder.prototype.write = function(buf) {
10563
- if (buf.length == 0)
10620
+ if (buf.length == 0) {
10564
10621
  return "";
10565
- var buf2 = Buffer2.alloc(buf.length + 1), i = 0, j2 = 0;
10622
+ }
10623
+ var buf2 = Buffer2.alloc(buf.length + 1);
10624
+ var i = 0;
10625
+ var j2 = 0;
10566
10626
  if (this.overflowByte !== -1) {
10567
10627
  buf2[0] = buf[0];
10568
10628
  buf2[1] = this.overflowByte;
@@ -10587,8 +10647,9 @@ var require_utf16 = __commonJS((exports) => {
10587
10647
  Utf16Codec.prototype.decoder = Utf16Decoder;
10588
10648
  function Utf16Encoder(options, codec) {
10589
10649
  options = options || {};
10590
- if (options.addBOM === undefined)
10650
+ if (options.addBOM === undefined) {
10591
10651
  options.addBOM = true;
10652
+ }
10592
10653
  this.encoder = codec.iconv.getEncoder("utf-16le", options);
10593
10654
  }
10594
10655
  Utf16Encoder.prototype.write = function(str) {
@@ -10608,13 +10669,15 @@ var require_utf16 = __commonJS((exports) => {
10608
10669
  if (!this.decoder) {
10609
10670
  this.initialBufs.push(buf);
10610
10671
  this.initialBufsLen += buf.length;
10611
- if (this.initialBufsLen < 16)
10672
+ if (this.initialBufsLen < 16) {
10612
10673
  return "";
10674
+ }
10613
10675
  var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding);
10614
10676
  this.decoder = this.iconv.getDecoder(encoding, this.options);
10615
10677
  var resStr = "";
10616
- for (var i = 0;i < this.initialBufs.length; i++)
10678
+ for (var i = 0;i < this.initialBufs.length; i++) {
10617
10679
  resStr += this.decoder.write(this.initialBufs[i]);
10680
+ }
10618
10681
  this.initialBufs.length = this.initialBufsLen = 0;
10619
10682
  return resStr;
10620
10683
  }
@@ -10625,11 +10688,13 @@ var require_utf16 = __commonJS((exports) => {
10625
10688
  var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding);
10626
10689
  this.decoder = this.iconv.getDecoder(encoding, this.options);
10627
10690
  var resStr = "";
10628
- for (var i = 0;i < this.initialBufs.length; i++)
10691
+ for (var i = 0;i < this.initialBufs.length; i++) {
10629
10692
  resStr += this.decoder.write(this.initialBufs[i]);
10693
+ }
10630
10694
  var trail = this.decoder.end();
10631
- if (trail)
10695
+ if (trail) {
10632
10696
  resStr += trail;
10697
+ }
10633
10698
  this.initialBufs.length = this.initialBufsLen = 0;
10634
10699
  return resStr;
10635
10700
  }
@@ -10638,8 +10703,9 @@ var require_utf16 = __commonJS((exports) => {
10638
10703
  function detectEncoding(bufs, defaultEncoding) {
10639
10704
  var b2 = [];
10640
10705
  var charsProcessed = 0;
10641
- var asciiCharsLE = 0, asciiCharsBE = 0;
10642
- outer_loop:
10706
+ var asciiCharsLE = 0;
10707
+ var asciiCharsBE = 0;
10708
+ outerLoop:
10643
10709
  for (var i = 0;i < bufs.length; i++) {
10644
10710
  var buf = bufs[i];
10645
10711
  for (var j2 = 0;j2 < buf.length; j2++) {
@@ -10658,7 +10724,7 @@ var require_utf16 = __commonJS((exports) => {
10658
10724
  b2.length = 0;
10659
10725
  charsProcessed++;
10660
10726
  if (charsProcessed >= 100) {
10661
- break outer_loop;
10727
+ break outerLoop;
10662
10728
  }
10663
10729
  }
10664
10730
  }
@@ -10699,14 +10765,18 @@ var require_utf7 = __commonJS((exports) => {
10699
10765
  }
10700
10766
  var base64Regex2 = /[A-Za-z0-9\/+]/;
10701
10767
  var base64Chars = [];
10702
- for (i = 0;i < 256; i++)
10768
+ for (i = 0;i < 256; i++) {
10703
10769
  base64Chars[i] = base64Regex2.test(String.fromCharCode(i));
10770
+ }
10704
10771
  var i;
10705
10772
  var plusChar = 43;
10706
10773
  var minusChar = 45;
10707
10774
  var andChar = 38;
10708
10775
  Utf7Decoder.prototype.write = function(buf) {
10709
- var res = "", lastI = 0, inBase64 = this.inBase64, base64Accum = this.base64Accum;
10776
+ var res = "";
10777
+ var lastI = 0;
10778
+ var inBase64 = this.inBase64;
10779
+ var base64Accum = this.base64Accum;
10710
10780
  for (var i2 = 0;i2 < buf.length; i2++) {
10711
10781
  if (!inBase64) {
10712
10782
  if (buf[i2] == plusChar) {
@@ -10722,8 +10792,9 @@ var require_utf7 = __commonJS((exports) => {
10722
10792
  var b64str = base64Accum + this.iconv.decode(buf.slice(lastI, i2), "ascii");
10723
10793
  res += this.iconv.decode(Buffer2.from(b64str, "base64"), "utf16-be");
10724
10794
  }
10725
- if (buf[i2] != minusChar)
10795
+ if (buf[i2] != minusChar) {
10726
10796
  i2--;
10797
+ }
10727
10798
  lastI = i2 + 1;
10728
10799
  inBase64 = false;
10729
10800
  base64Accum = "";
@@ -10745,8 +10816,9 @@ var require_utf7 = __commonJS((exports) => {
10745
10816
  };
10746
10817
  Utf7Decoder.prototype.end = function() {
10747
10818
  var res = "";
10748
- if (this.inBase64 && this.base64Accum.length > 0)
10819
+ if (this.inBase64 && this.base64Accum.length > 0) {
10749
10820
  res = this.iconv.decode(Buffer2.from(this.base64Accum, "base64"), "utf16-be");
10821
+ }
10750
10822
  this.inBase64 = false;
10751
10823
  this.base64Accum = "";
10752
10824
  return res;
@@ -10765,10 +10837,14 @@ var require_utf7 = __commonJS((exports) => {
10765
10837
  this.base64AccumIdx = 0;
10766
10838
  }
10767
10839
  Utf7IMAPEncoder.prototype.write = function(str) {
10768
- var inBase64 = this.inBase64, base64Accum = this.base64Accum, base64AccumIdx = this.base64AccumIdx, buf = Buffer2.alloc(str.length * 5 + 10), bufIdx = 0;
10840
+ var inBase64 = this.inBase64;
10841
+ var base64Accum = this.base64Accum;
10842
+ var base64AccumIdx = this.base64AccumIdx;
10843
+ var buf = Buffer2.alloc(str.length * 5 + 10);
10844
+ var bufIdx = 0;
10769
10845
  for (var i2 = 0;i2 < str.length; i2++) {
10770
10846
  var uChar = str.charCodeAt(i2);
10771
- if (32 <= uChar && uChar <= 126) {
10847
+ if (uChar >= 32 && uChar <= 126) {
10772
10848
  if (inBase64) {
10773
10849
  if (base64AccumIdx > 0) {
10774
10850
  bufIdx += buf.write(base64Accum.slice(0, base64AccumIdx).toString("base64").replace(/\//g, ",").replace(/=+$/, ""), bufIdx);
@@ -10779,8 +10855,9 @@ var require_utf7 = __commonJS((exports) => {
10779
10855
  }
10780
10856
  if (!inBase64) {
10781
10857
  buf[bufIdx++] = uChar;
10782
- if (uChar === andChar)
10858
+ if (uChar === andChar) {
10783
10859
  buf[bufIdx++] = minusChar;
10860
+ }
10784
10861
  }
10785
10862
  } else {
10786
10863
  if (!inBase64) {
@@ -10802,7 +10879,8 @@ var require_utf7 = __commonJS((exports) => {
10802
10879
  return buf.slice(0, bufIdx);
10803
10880
  };
10804
10881
  Utf7IMAPEncoder.prototype.end = function() {
10805
- var buf = Buffer2.alloc(10), bufIdx = 0;
10882
+ var buf = Buffer2.alloc(10);
10883
+ var bufIdx = 0;
10806
10884
  if (this.inBase64) {
10807
10885
  if (this.base64AccumIdx > 0) {
10808
10886
  bufIdx += buf.write(this.base64Accum.slice(0, this.base64AccumIdx).toString("base64").replace(/\//g, ",").replace(/=+$/, ""), bufIdx);
@@ -10821,7 +10899,10 @@ var require_utf7 = __commonJS((exports) => {
10821
10899
  var base64IMAPChars = base64Chars.slice();
10822
10900
  base64IMAPChars[44] = true;
10823
10901
  Utf7IMAPDecoder.prototype.write = function(buf) {
10824
- var res = "", lastI = 0, inBase64 = this.inBase64, base64Accum = this.base64Accum;
10902
+ var res = "";
10903
+ var lastI = 0;
10904
+ var inBase64 = this.inBase64;
10905
+ var base64Accum = this.base64Accum;
10825
10906
  for (var i2 = 0;i2 < buf.length; i2++) {
10826
10907
  if (!inBase64) {
10827
10908
  if (buf[i2] == andChar) {
@@ -10837,8 +10918,9 @@ var require_utf7 = __commonJS((exports) => {
10837
10918
  var b64str = base64Accum + this.iconv.decode(buf.slice(lastI, i2), "ascii").replace(/,/g, "/");
10838
10919
  res += this.iconv.decode(Buffer2.from(b64str, "base64"), "utf16-be");
10839
10920
  }
10840
- if (buf[i2] != minusChar)
10921
+ if (buf[i2] != minusChar) {
10841
10922
  i2--;
10923
+ }
10842
10924
  lastI = i2 + 1;
10843
10925
  inBase64 = false;
10844
10926
  base64Accum = "";
@@ -10860,8 +10942,9 @@ var require_utf7 = __commonJS((exports) => {
10860
10942
  };
10861
10943
  Utf7IMAPDecoder.prototype.end = function() {
10862
10944
  var res = "";
10863
- if (this.inBase64 && this.base64Accum.length > 0)
10945
+ if (this.inBase64 && this.base64Accum.length > 0) {
10864
10946
  res = this.iconv.decode(Buffer2.from(this.base64Accum, "base64"), "utf16-be");
10947
+ }
10865
10948
  this.inBase64 = false;
10866
10949
  this.base64Accum = "";
10867
10950
  return res;
@@ -10873,20 +10956,24 @@ var require_sbcs_codec = __commonJS((exports) => {
10873
10956
  var Buffer2 = require_safer().Buffer;
10874
10957
  exports._sbcs = SBCSCodec;
10875
10958
  function SBCSCodec(codecOptions, iconv) {
10876
- if (!codecOptions)
10959
+ if (!codecOptions) {
10877
10960
  throw new Error("SBCS codec is called without the data.");
10878
- if (!codecOptions.chars || codecOptions.chars.length !== 128 && codecOptions.chars.length !== 256)
10961
+ }
10962
+ if (!codecOptions.chars || codecOptions.chars.length !== 128 && codecOptions.chars.length !== 256) {
10879
10963
  throw new Error("Encoding '" + codecOptions.type + "' has incorrect 'chars' (must be of len 128 or 256)");
10964
+ }
10880
10965
  if (codecOptions.chars.length === 128) {
10881
10966
  var asciiString = "";
10882
- for (var i = 0;i < 128; i++)
10967
+ for (var i = 0;i < 128; i++) {
10883
10968
  asciiString += String.fromCharCode(i);
10969
+ }
10884
10970
  codecOptions.chars = asciiString + codecOptions.chars;
10885
10971
  }
10886
10972
  this.decodeBuf = Buffer2.from(codecOptions.chars, "ucs2");
10887
10973
  var encodeBuf = Buffer2.alloc(65536, iconv.defaultCharSingleByte.charCodeAt(0));
10888
- for (var i = 0;i < codecOptions.chars.length; i++)
10974
+ for (var i = 0;i < codecOptions.chars.length; i++) {
10889
10975
  encodeBuf[codecOptions.chars.charCodeAt(i)] = i;
10976
+ }
10890
10977
  this.encodeBuf = encodeBuf;
10891
10978
  }
10892
10979
  SBCSCodec.prototype.encoder = SBCSEncoder;
@@ -10896,8 +10983,9 @@ var require_sbcs_codec = __commonJS((exports) => {
10896
10983
  }
10897
10984
  SBCSEncoder.prototype.write = function(str) {
10898
10985
  var buf = Buffer2.alloc(str.length);
10899
- for (var i = 0;i < str.length; i++)
10986
+ for (var i = 0;i < str.length; i++) {
10900
10987
  buf[i] = this.encodeBuf[str.charCodeAt(i)];
10988
+ }
10901
10989
  return buf;
10902
10990
  };
10903
10991
  SBCSEncoder.prototype.end = function() {};
@@ -10907,7 +10995,8 @@ var require_sbcs_codec = __commonJS((exports) => {
10907
10995
  SBCSDecoder.prototype.write = function(buf) {
10908
10996
  var decodeBuf = this.decodeBuf;
10909
10997
  var newBuf = Buffer2.alloc(buf.length * 2);
10910
- var idx1 = 0, idx2 = 0;
10998
+ var idx1 = 0;
10999
+ var idx2 = 0;
10911
11000
  for (var i = 0;i < buf.length; i++) {
10912
11001
  idx1 = buf[i] * 2;
10913
11002
  idx2 = i * 2;
@@ -10922,12 +11011,12 @@ var require_sbcs_codec = __commonJS((exports) => {
10922
11011
  // node_modules/raw-body/node_modules/iconv-lite/encodings/sbcs-data.js
10923
11012
  var require_sbcs_data = __commonJS((exports, module) => {
10924
11013
  module.exports = {
10925
- "10029": "maccenteuro",
11014
+ 10029: "maccenteuro",
10926
11015
  maccenteuro: {
10927
11016
  type: "_sbcs",
10928
11017
  chars: "ÄĀāÉĄÖÜáąČäčĆć鏟ĎíďĒēĖóėôöõúĚěü†°Ę£§•¶ß®©™ę¨≠ģĮįĪ≤≥īĶ∂∑łĻļĽľĹĺŅņѬ√ńŇ∆«»… ňŐÕőŌ–—“”‘’÷◊ōŔŕŘ‹›řŖŗŠ‚„šŚśÁŤťÍŽžŪÓÔūŮÚůŰűŲųÝýķŻŁżĢˇ"
10929
11018
  },
10930
- "808": "cp808",
11019
+ 808: "cp808",
10931
11020
  ibm808: "cp808",
10932
11021
  cp808: {
10933
11022
  type: "_sbcs",
@@ -11023,11 +11112,11 @@ var require_sbcs_data = __commonJS((exports, module) => {
11023
11112
  tis6200: "tis620",
11024
11113
  tis62025291: "tis620",
11025
11114
  tis62025330: "tis620",
11026
- "10000": "macroman",
11027
- "10006": "macgreek",
11028
- "10007": "maccyrillic",
11029
- "10079": "maciceland",
11030
- "10081": "macturkish",
11115
+ 1e4: "macroman",
11116
+ 10006: "macgreek",
11117
+ 10007: "maccyrillic",
11118
+ 10079: "maciceland",
11119
+ 10081: "macturkish",
11031
11120
  cspc8codepage437: "cp437",
11032
11121
  cspc775baltic: "cp775",
11033
11122
  cspc850multilingual: "cp850",
@@ -11043,11 +11132,11 @@ var require_sbcs_data = __commonJS((exports, module) => {
11043
11132
  msarab: "cp1256",
11044
11133
  winbaltrim: "cp1257",
11045
11134
  cp20866: "koi8r",
11046
- "20866": "koi8r",
11135
+ 20866: "koi8r",
11047
11136
  ibm878: "koi8r",
11048
11137
  cskoi8r: "koi8r",
11049
11138
  cp21866: "koi8u",
11050
- "21866": "koi8u",
11139
+ 21866: "koi8u",
11051
11140
  ibm1168: "koi8u",
11052
11141
  strk10482002: "rk1048",
11053
11142
  tcvn5712: "tcvn",
@@ -11534,21 +11623,25 @@ var require_dbcs_codec = __commonJS((exports) => {
11534
11623
  var NODE_START = -1000;
11535
11624
  var UNASSIGNED_NODE = new Array(256);
11536
11625
  var DEF_CHAR = -1;
11537
- for (i = 0;i < 256; i++)
11626
+ for (i = 0;i < 256; i++) {
11538
11627
  UNASSIGNED_NODE[i] = UNASSIGNED;
11628
+ }
11539
11629
  var i;
11540
11630
  function DBCSCodec(codecOptions, iconv) {
11541
11631
  this.encodingName = codecOptions.encodingName;
11542
- if (!codecOptions)
11632
+ if (!codecOptions) {
11543
11633
  throw new Error("DBCS codec is called without the data.");
11544
- if (!codecOptions.table)
11634
+ }
11635
+ if (!codecOptions.table) {
11545
11636
  throw new Error("Encoding '" + this.encodingName + "' has no data.");
11637
+ }
11546
11638
  var mappingTable = codecOptions.table();
11547
11639
  this.decodeTables = [];
11548
11640
  this.decodeTables[0] = UNASSIGNED_NODE.slice(0);
11549
11641
  this.decodeTableSeq = [];
11550
- for (var i2 = 0;i2 < mappingTable.length; i2++)
11642
+ for (var i2 = 0;i2 < mappingTable.length; i2++) {
11551
11643
  this._addDecodeChunk(mappingTable[i2]);
11644
+ }
11552
11645
  if (typeof codecOptions.gb18030 === "function") {
11553
11646
  this.gb18030 = codecOptions.gb18030();
11554
11647
  var commonThirdByteNodeIdx = this.decodeTables.length;
@@ -11575,8 +11668,9 @@ var require_dbcs_codec = __commonJS((exports) => {
11575
11668
  }
11576
11669
  var fourthByteNode = this.decodeTables[NODE_START - thirdByteNode[k2]];
11577
11670
  for (var l = 48;l <= 57; l++) {
11578
- if (fourthByteNode[l] === UNASSIGNED)
11671
+ if (fourthByteNode[l] === UNASSIGNED) {
11579
11672
  fourthByteNode[l] = GB18030_CODE;
11673
+ }
11580
11674
  }
11581
11675
  }
11582
11676
  }
@@ -11586,20 +11680,25 @@ var require_dbcs_codec = __commonJS((exports) => {
11586
11680
  this.encodeTable = [];
11587
11681
  this.encodeTableSeq = [];
11588
11682
  var skipEncodeChars = {};
11589
- if (codecOptions.encodeSkipVals)
11683
+ if (codecOptions.encodeSkipVals) {
11590
11684
  for (var i2 = 0;i2 < codecOptions.encodeSkipVals.length; i2++) {
11591
11685
  var val = codecOptions.encodeSkipVals[i2];
11592
- if (typeof val === "number")
11686
+ if (typeof val === "number") {
11593
11687
  skipEncodeChars[val] = true;
11594
- else
11595
- for (var j2 = val.from;j2 <= val.to; j2++)
11688
+ } else {
11689
+ for (var j2 = val.from;j2 <= val.to; j2++) {
11596
11690
  skipEncodeChars[j2] = true;
11691
+ }
11692
+ }
11597
11693
  }
11694
+ }
11598
11695
  this._fillEncodeTable(0, 0, skipEncodeChars);
11599
11696
  if (codecOptions.encodeAdd) {
11600
- for (var uChar in codecOptions.encodeAdd)
11601
- if (Object.prototype.hasOwnProperty.call(codecOptions.encodeAdd, uChar))
11697
+ for (var uChar in codecOptions.encodeAdd) {
11698
+ if (Object.prototype.hasOwnProperty.call(codecOptions.encodeAdd, uChar)) {
11602
11699
  this._setEncodeChar(uChar.charCodeAt(0), codecOptions.encodeAdd[uChar]);
11700
+ }
11701
+ }
11603
11702
  }
11604
11703
  this.defCharSB = this.encodeTable[0][iconv.defaultCharSingleByte.charCodeAt(0)];
11605
11704
  if (this.defCharSB === UNASSIGNED)
@@ -11611,10 +11710,12 @@ var require_dbcs_codec = __commonJS((exports) => {
11611
11710
  DBCSCodec.prototype.decoder = DBCSDecoder;
11612
11711
  DBCSCodec.prototype._getDecodeTrieNode = function(addr) {
11613
11712
  var bytes = [];
11614
- for (;addr > 0; addr >>>= 8)
11713
+ for (;addr > 0; addr >>>= 8) {
11615
11714
  bytes.push(addr & 255);
11616
- if (bytes.length == 0)
11715
+ }
11716
+ if (bytes.length == 0) {
11617
11717
  bytes.push(0);
11718
+ }
11618
11719
  var node = this.decodeTables[0];
11619
11720
  for (var i2 = bytes.length - 1;i2 > 0; i2--) {
11620
11721
  var val = node[bytes[i2]];
@@ -11623,8 +11724,9 @@ var require_dbcs_codec = __commonJS((exports) => {
11623
11724
  this.decodeTables.push(node = UNASSIGNED_NODE.slice(0));
11624
11725
  } else if (val <= NODE_START) {
11625
11726
  node = this.decodeTables[NODE_START - val];
11626
- } else
11727
+ } else {
11627
11728
  throw new Error("Overwrite byte in " + this.encodingName + ", addr: " + addr.toString(16));
11729
+ }
11628
11730
  }
11629
11731
  return node;
11630
11732
  };
@@ -11637,45 +11739,53 @@ var require_dbcs_codec = __commonJS((exports) => {
11637
11739
  if (typeof part === "string") {
11638
11740
  for (var l = 0;l < part.length; ) {
11639
11741
  var code = part.charCodeAt(l++);
11640
- if (55296 <= code && code < 56320) {
11742
+ if (code >= 55296 && code < 56320) {
11641
11743
  var codeTrail = part.charCodeAt(l++);
11642
- if (56320 <= codeTrail && codeTrail < 57344)
11744
+ if (codeTrail >= 56320 && codeTrail < 57344) {
11643
11745
  writeTable[curAddr++] = 65536 + (code - 55296) * 1024 + (codeTrail - 56320);
11644
- else
11746
+ } else {
11645
11747
  throw new Error("Incorrect surrogate pair in " + this.encodingName + " at chunk " + chunk[0]);
11646
- } else if (4080 < code && code <= 4095) {
11748
+ }
11749
+ } else if (code > 4080 && code <= 4095) {
11647
11750
  var len = 4095 - code + 2;
11648
11751
  var seq = [];
11649
- for (var m = 0;m < len; m++)
11752
+ for (var m = 0;m < len; m++) {
11650
11753
  seq.push(part.charCodeAt(l++));
11754
+ }
11651
11755
  writeTable[curAddr++] = SEQ_START - this.decodeTableSeq.length;
11652
11756
  this.decodeTableSeq.push(seq);
11653
- } else
11757
+ } else {
11654
11758
  writeTable[curAddr++] = code;
11759
+ }
11655
11760
  }
11656
11761
  } else if (typeof part === "number") {
11657
11762
  var charCode = writeTable[curAddr - 1] + 1;
11658
- for (var l = 0;l < part; l++)
11763
+ for (var l = 0;l < part; l++) {
11659
11764
  writeTable[curAddr++] = charCode++;
11660
- } else
11765
+ }
11766
+ } else {
11661
11767
  throw new Error("Incorrect type '" + typeof part + "' given in " + this.encodingName + " at chunk " + chunk[0]);
11768
+ }
11662
11769
  }
11663
- if (curAddr > 255)
11770
+ if (curAddr > 255) {
11664
11771
  throw new Error("Incorrect chunk in " + this.encodingName + " at addr " + chunk[0] + ": too long" + curAddr);
11772
+ }
11665
11773
  };
11666
11774
  DBCSCodec.prototype._getEncodeBucket = function(uCode) {
11667
11775
  var high = uCode >> 8;
11668
- if (this.encodeTable[high] === undefined)
11776
+ if (this.encodeTable[high] === undefined) {
11669
11777
  this.encodeTable[high] = UNASSIGNED_NODE.slice(0);
11778
+ }
11670
11779
  return this.encodeTable[high];
11671
11780
  };
11672
11781
  DBCSCodec.prototype._setEncodeChar = function(uCode, dbcsCode) {
11673
11782
  var bucket = this._getEncodeBucket(uCode);
11674
11783
  var low = uCode & 255;
11675
- if (bucket[low] <= SEQ_START)
11784
+ if (bucket[low] <= SEQ_START) {
11676
11785
  this.encodeTableSeq[SEQ_START - bucket[low]][DEF_CHAR] = dbcsCode;
11677
- else if (bucket[low] == UNASSIGNED)
11786
+ } else if (bucket[low] == UNASSIGNED) {
11678
11787
  bucket[low] = dbcsCode;
11788
+ }
11679
11789
  };
11680
11790
  DBCSCodec.prototype._setEncodeSequence = function(seq, dbcsCode) {
11681
11791
  var uCode = seq[0];
@@ -11693,12 +11803,13 @@ var require_dbcs_codec = __commonJS((exports) => {
11693
11803
  }
11694
11804
  for (var j2 = 1;j2 < seq.length - 1; j2++) {
11695
11805
  var oldVal = node[uCode];
11696
- if (typeof oldVal === "object")
11806
+ if (typeof oldVal === "object") {
11697
11807
  node = oldVal;
11698
- else {
11808
+ } else {
11699
11809
  node = node[uCode] = {};
11700
- if (oldVal !== undefined)
11810
+ if (oldVal !== undefined) {
11701
11811
  node[DEF_CHAR] = oldVal;
11812
+ }
11702
11813
  }
11703
11814
  }
11704
11815
  uCode = seq[seq.length - 1];
@@ -11711,8 +11822,9 @@ var require_dbcs_codec = __commonJS((exports) => {
11711
11822
  for (var i2 = 0;i2 < 256; i2++) {
11712
11823
  var uCode = node[i2];
11713
11824
  var mbCode = prefix + i2;
11714
- if (skipEncodeChars[mbCode])
11825
+ if (skipEncodeChars[mbCode]) {
11715
11826
  continue;
11827
+ }
11716
11828
  if (uCode >= 0) {
11717
11829
  this._setEncodeChar(uCode, mbCode);
11718
11830
  hasValues = true;
@@ -11720,10 +11832,11 @@ var require_dbcs_codec = __commonJS((exports) => {
11720
11832
  var subNodeIdx = NODE_START - uCode;
11721
11833
  if (!subNodeEmpty[subNodeIdx]) {
11722
11834
  var newPrefix = mbCode << 8 >>> 0;
11723
- if (this._fillEncodeTable(subNodeIdx, newPrefix, skipEncodeChars))
11835
+ if (this._fillEncodeTable(subNodeIdx, newPrefix, skipEncodeChars)) {
11724
11836
  hasValues = true;
11725
- else
11837
+ } else {
11726
11838
  subNodeEmpty[subNodeIdx] = true;
11839
+ }
11727
11840
  }
11728
11841
  } else if (uCode <= SEQ_START) {
11729
11842
  this._setEncodeSequence(this.decodeTableSeq[SEQ_START - uCode], mbCode);
@@ -11741,7 +11854,12 @@ var require_dbcs_codec = __commonJS((exports) => {
11741
11854
  this.gb18030 = codec.gb18030;
11742
11855
  }
11743
11856
  DBCSEncoder.prototype.write = function(str) {
11744
- var newBuf = Buffer2.alloc(str.length * (this.gb18030 ? 4 : 3)), leadSurrogate = this.leadSurrogate, seqObj = this.seqObj, nextChar = -1, i2 = 0, j2 = 0;
11857
+ var newBuf = Buffer2.alloc(str.length * (this.gb18030 ? 4 : 3));
11858
+ var leadSurrogate = this.leadSurrogate;
11859
+ var seqObj = this.seqObj;
11860
+ var nextChar = -1;
11861
+ var i2 = 0;
11862
+ var j2 = 0;
11745
11863
  while (true) {
11746
11864
  if (nextChar === -1) {
11747
11865
  if (i2 == str.length)
@@ -11751,7 +11869,7 @@ var require_dbcs_codec = __commonJS((exports) => {
11751
11869
  var uCode = nextChar;
11752
11870
  nextChar = -1;
11753
11871
  }
11754
- if (55296 <= uCode && uCode < 57344) {
11872
+ if (uCode >= 55296 && uCode < 57344) {
11755
11873
  if (uCode < 56320) {
11756
11874
  if (leadSurrogate === -1) {
11757
11875
  leadSurrogate = uCode;
@@ -11779,7 +11897,7 @@ var require_dbcs_codec = __commonJS((exports) => {
11779
11897
  if (typeof resCode === "object") {
11780
11898
  seqObj = resCode;
11781
11899
  continue;
11782
- } else if (typeof resCode == "number") {
11900
+ } else if (typeof resCode === "number") {
11783
11901
  dbcsCode = resCode;
11784
11902
  } else if (resCode == undefined) {
11785
11903
  resCode = seqObj[DEF_CHAR];
@@ -11791,8 +11909,9 @@ var require_dbcs_codec = __commonJS((exports) => {
11791
11909
  seqObj = undefined;
11792
11910
  } else if (uCode >= 0) {
11793
11911
  var subtable = this.encodeTable[uCode >> 8];
11794
- if (subtable !== undefined)
11912
+ if (subtable !== undefined) {
11795
11913
  dbcsCode = subtable[uCode & 255];
11914
+ }
11796
11915
  if (dbcsCode <= SEQ_START) {
11797
11916
  seqObj = this.encodeTableSeq[SEQ_START - dbcsCode];
11798
11917
  continue;
@@ -11812,8 +11931,9 @@ var require_dbcs_codec = __commonJS((exports) => {
11812
11931
  }
11813
11932
  }
11814
11933
  }
11815
- if (dbcsCode === UNASSIGNED)
11934
+ if (dbcsCode === UNASSIGNED) {
11816
11935
  dbcsCode = this.defaultCharSingleByte;
11936
+ }
11817
11937
  if (dbcsCode < 256) {
11818
11938
  newBuf[j2++] = dbcsCode;
11819
11939
  } else if (dbcsCode < 65536) {
@@ -11835,9 +11955,11 @@ var require_dbcs_codec = __commonJS((exports) => {
11835
11955
  return newBuf.slice(0, j2);
11836
11956
  };
11837
11957
  DBCSEncoder.prototype.end = function() {
11838
- if (this.leadSurrogate === -1 && this.seqObj === undefined)
11958
+ if (this.leadSurrogate === -1 && this.seqObj === undefined) {
11839
11959
  return;
11840
- var newBuf = Buffer2.alloc(10), j2 = 0;
11960
+ }
11961
+ var newBuf = Buffer2.alloc(10);
11962
+ var j2 = 0;
11841
11963
  if (this.seqObj) {
11842
11964
  var dbcsCode = this.seqObj[DEF_CHAR];
11843
11965
  if (dbcsCode !== undefined) {
@@ -11866,7 +11988,12 @@ var require_dbcs_codec = __commonJS((exports) => {
11866
11988
  this.gb18030 = codec.gb18030;
11867
11989
  }
11868
11990
  DBCSDecoder.prototype.write = function(buf) {
11869
- var newBuf = Buffer2.alloc(buf.length * 2), nodeIdx = this.nodeIdx, prevBytes = this.prevBytes, prevOffset = this.prevBytes.length, seqStart = -this.prevBytes.length, uCode;
11991
+ var newBuf = Buffer2.alloc(buf.length * 2);
11992
+ var nodeIdx = this.nodeIdx;
11993
+ var prevBytes = this.prevBytes;
11994
+ var prevOffset = this.prevBytes.length;
11995
+ var seqStart = -this.prevBytes.length;
11996
+ var uCode;
11870
11997
  for (var i2 = 0, j2 = 0;i2 < buf.length; i2++) {
11871
11998
  var curByte = i2 >= 0 ? buf[i2] : prevBytes[i2 + prevOffset];
11872
11999
  var uCode = this.decodeTables[nodeIdx][curByte];
@@ -11892,8 +12019,9 @@ var require_dbcs_codec = __commonJS((exports) => {
11892
12019
  newBuf[j2++] = uCode >> 8;
11893
12020
  }
11894
12021
  uCode = seq[seq.length - 1];
11895
- } else
12022
+ } else {
11896
12023
  throw new Error("iconv-lite internal error: invalid decoding table value " + uCode + " at " + nodeIdx + "/" + curByte);
12024
+ }
11897
12025
  if (uCode >= 65536) {
11898
12026
  uCode -= 65536;
11899
12027
  var uCodeLead = 55296 | uCode >> 10;
@@ -11917,23 +12045,27 @@ var require_dbcs_codec = __commonJS((exports) => {
11917
12045
  var bytesArr = this.prevBytes.slice(1);
11918
12046
  this.prevBytes = [];
11919
12047
  this.nodeIdx = 0;
11920
- if (bytesArr.length > 0)
12048
+ if (bytesArr.length > 0) {
11921
12049
  ret += this.write(bytesArr);
12050
+ }
11922
12051
  }
11923
12052
  this.prevBytes = [];
11924
12053
  this.nodeIdx = 0;
11925
12054
  return ret;
11926
12055
  };
11927
12056
  function findIdx(table, val) {
11928
- if (table[0] > val)
12057
+ if (table[0] > val) {
11929
12058
  return -1;
11930
- var l = 0, r = table.length;
12059
+ }
12060
+ var l = 0;
12061
+ var r = table.length;
11931
12062
  while (l < r - 1) {
11932
12063
  var mid = l + (r - l + 1 >> 1);
11933
- if (table[mid] <= val)
12064
+ if (table[mid] <= val) {
11934
12065
  l = mid;
11935
- else
12066
+ } else {
11936
12067
  r = mid;
12068
+ }
11937
12069
  }
11938
12070
  return l;
11939
12071
  }
@@ -13190,7 +13322,7 @@ var require_dbcs_data = __commonJS((exports, module) => {
13190
13322
  xsjis: "shiftjis",
13191
13323
  windows932: "shiftjis",
13192
13324
  ms932: "shiftjis",
13193
- "932": "shiftjis",
13325
+ 932: "shiftjis",
13194
13326
  cp932: "shiftjis",
13195
13327
  eucjp: {
13196
13328
  type: "_dbcs",
@@ -13207,7 +13339,7 @@ var require_dbcs_data = __commonJS((exports, module) => {
13207
13339
  euccn: "cp936",
13208
13340
  windows936: "cp936",
13209
13341
  ms936: "cp936",
13210
- "936": "cp936",
13342
+ 936: "cp936",
13211
13343
  cp936: {
13212
13344
  type: "_dbcs",
13213
13345
  table: function() {
@@ -13236,7 +13368,7 @@ var require_dbcs_data = __commonJS((exports, module) => {
13236
13368
  chinese: "gb18030",
13237
13369
  windows949: "cp949",
13238
13370
  ms949: "cp949",
13239
- "949": "cp949",
13371
+ 949: "cp949",
13240
13372
  cp949: {
13241
13373
  type: "_dbcs",
13242
13374
  table: function() {
@@ -13253,7 +13385,7 @@ var require_dbcs_data = __commonJS((exports, module) => {
13253
13385
  ksc5601: "cp949",
13254
13386
  windows950: "cp950",
13255
13387
  ms950: "cp950",
13256
- "950": "cp950",
13388
+ 950: "cp950",
13257
13389
  cp950: {
13258
13390
  type: "_dbcs",
13259
13391
  table: function() {
@@ -13344,6 +13476,7 @@ var require_dbcs_data = __commonJS((exports, module) => {
13344
13476
 
13345
13477
  // node_modules/raw-body/node_modules/iconv-lite/encodings/index.js
13346
13478
  var require_encodings = __commonJS((exports, module) => {
13479
+ var mergeModules = require_merge_exports();
13347
13480
  var modules = [
13348
13481
  require_internal(),
13349
13482
  require_utf32(),
@@ -13357,20 +13490,17 @@ var require_encodings = __commonJS((exports, module) => {
13357
13490
  ];
13358
13491
  for (i = 0;i < modules.length; i++) {
13359
13492
  module = modules[i];
13360
- for (enc in module)
13361
- if (Object.prototype.hasOwnProperty.call(module, enc))
13362
- exports[enc] = module[enc];
13493
+ mergeModules(exports, module);
13363
13494
  }
13364
13495
  var module;
13365
- var enc;
13366
13496
  var i;
13367
13497
  });
13368
13498
 
13369
13499
  // node_modules/raw-body/node_modules/iconv-lite/lib/streams.js
13370
13500
  var require_streams = __commonJS((exports, module) => {
13371
13501
  var Buffer2 = require_safer().Buffer;
13372
- module.exports = function(stream_module) {
13373
- var Transform = stream_module.Transform;
13502
+ module.exports = function(streamModule) {
13503
+ var Transform = streamModule.Transform;
13374
13504
  function IconvLiteEncoderStream(conv, options) {
13375
13505
  this.conv = conv;
13376
13506
  options = options || {};
@@ -13381,8 +13511,9 @@ var require_streams = __commonJS((exports, module) => {
13381
13511
  constructor: { value: IconvLiteEncoderStream }
13382
13512
  });
13383
13513
  IconvLiteEncoderStream.prototype._transform = function(chunk, encoding, done) {
13384
- if (typeof chunk != "string")
13514
+ if (typeof chunk !== "string") {
13385
13515
  return done(new Error("Iconv encoding stream needs strings as its input."));
13516
+ }
13386
13517
  try {
13387
13518
  var res = this.conv.write(chunk);
13388
13519
  if (res && res.length)
@@ -13423,8 +13554,9 @@ var require_streams = __commonJS((exports, module) => {
13423
13554
  constructor: { value: IconvLiteDecoderStream }
13424
13555
  });
13425
13556
  IconvLiteDecoderStream.prototype._transform = function(chunk, encoding, done) {
13426
- if (!Buffer2.isBuffer(chunk) && !(chunk instanceof Uint8Array))
13557
+ if (!Buffer2.isBuffer(chunk) && !(chunk instanceof Uint8Array)) {
13427
13558
  return done(new Error("Iconv decoding stream needs buffers as its input."));
13559
+ }
13428
13560
  try {
13429
13561
  var res = this.conv.write(chunk);
13430
13562
  if (res && res.length)
@@ -13466,110 +13598,122 @@ var require_streams = __commonJS((exports, module) => {
13466
13598
  var require_lib = __commonJS((exports, module) => {
13467
13599
  var Buffer2 = require_safer().Buffer;
13468
13600
  var bomHandling = require_bom_handling();
13469
- var iconv = exports;
13470
- iconv.encodings = null;
13471
- iconv.defaultCharUnicode = "�";
13472
- iconv.defaultCharSingleByte = "?";
13473
- iconv.encode = function encode(str, encoding, options) {
13601
+ var mergeModules = require_merge_exports();
13602
+ exports.encodings = null;
13603
+ exports.defaultCharUnicode = "�";
13604
+ exports.defaultCharSingleByte = "?";
13605
+ exports.encode = function encode(str, encoding, options) {
13474
13606
  str = "" + (str || "");
13475
- var encoder = iconv.getEncoder(encoding, options);
13607
+ var encoder = exports.getEncoder(encoding, options);
13476
13608
  var res = encoder.write(str);
13477
13609
  var trail = encoder.end();
13478
13610
  return trail && trail.length > 0 ? Buffer2.concat([res, trail]) : res;
13479
13611
  };
13480
- iconv.decode = function decode(buf, encoding, options) {
13612
+ exports.decode = function decode(buf, encoding, options) {
13481
13613
  if (typeof buf === "string") {
13482
- if (!iconv.skipDecodeWarning) {
13614
+ if (!exports.skipDecodeWarning) {
13483
13615
  console.error("Iconv-lite warning: decode()-ing strings is deprecated. Refer to https://github.com/ashtuchkin/iconv-lite/wiki/Use-Buffers-when-decoding");
13484
- iconv.skipDecodeWarning = true;
13616
+ exports.skipDecodeWarning = true;
13485
13617
  }
13486
13618
  buf = Buffer2.from("" + (buf || ""), "binary");
13487
13619
  }
13488
- var decoder = iconv.getDecoder(encoding, options);
13620
+ var decoder = exports.getDecoder(encoding, options);
13489
13621
  var res = decoder.write(buf);
13490
13622
  var trail = decoder.end();
13491
13623
  return trail ? res + trail : res;
13492
13624
  };
13493
- iconv.encodingExists = function encodingExists(enc) {
13625
+ exports.encodingExists = function encodingExists(enc) {
13494
13626
  try {
13495
- iconv.getCodec(enc);
13627
+ exports.getCodec(enc);
13496
13628
  return true;
13497
13629
  } catch (e) {
13498
13630
  return false;
13499
13631
  }
13500
13632
  };
13501
- iconv.toEncoding = iconv.encode;
13502
- iconv.fromEncoding = iconv.decode;
13503
- iconv._codecDataCache = {};
13504
- iconv.getCodec = function getCodec(encoding) {
13505
- if (!iconv.encodings)
13506
- iconv.encodings = require_encodings();
13507
- var enc = iconv._canonicalizeEncoding(encoding);
13633
+ exports.toEncoding = exports.encode;
13634
+ exports.fromEncoding = exports.decode;
13635
+ exports._codecDataCache = { __proto__: null };
13636
+ exports.getCodec = function getCodec(encoding) {
13637
+ if (!exports.encodings) {
13638
+ var raw = require_encodings();
13639
+ exports.encodings = { __proto__: null };
13640
+ mergeModules(exports.encodings, raw);
13641
+ }
13642
+ var enc = exports._canonicalizeEncoding(encoding);
13508
13643
  var codecOptions = {};
13509
13644
  while (true) {
13510
- var codec = iconv._codecDataCache[enc];
13511
- if (codec)
13645
+ var codec = exports._codecDataCache[enc];
13646
+ if (codec) {
13512
13647
  return codec;
13513
- var codecDef = iconv.encodings[enc];
13648
+ }
13649
+ var codecDef = exports.encodings[enc];
13514
13650
  switch (typeof codecDef) {
13515
13651
  case "string":
13516
13652
  enc = codecDef;
13517
13653
  break;
13518
13654
  case "object":
13519
- for (var key in codecDef)
13655
+ for (var key in codecDef) {
13520
13656
  codecOptions[key] = codecDef[key];
13521
- if (!codecOptions.encodingName)
13657
+ }
13658
+ if (!codecOptions.encodingName) {
13522
13659
  codecOptions.encodingName = enc;
13660
+ }
13523
13661
  enc = codecDef.type;
13524
13662
  break;
13525
13663
  case "function":
13526
- if (!codecOptions.encodingName)
13664
+ if (!codecOptions.encodingName) {
13527
13665
  codecOptions.encodingName = enc;
13528
- codec = new codecDef(codecOptions, iconv);
13529
- iconv._codecDataCache[codecOptions.encodingName] = codec;
13666
+ }
13667
+ codec = new codecDef(codecOptions, exports);
13668
+ exports._codecDataCache[codecOptions.encodingName] = codec;
13530
13669
  return codec;
13531
13670
  default:
13532
13671
  throw new Error("Encoding not recognized: '" + encoding + "' (searched as: '" + enc + "')");
13533
13672
  }
13534
13673
  }
13535
13674
  };
13536
- iconv._canonicalizeEncoding = function(encoding) {
13675
+ exports._canonicalizeEncoding = function(encoding) {
13537
13676
  return ("" + encoding).toLowerCase().replace(/:\d{4}$|[^0-9a-z]/g, "");
13538
13677
  };
13539
- iconv.getEncoder = function getEncoder(encoding, options) {
13540
- var codec = iconv.getCodec(encoding), encoder = new codec.encoder(options, codec);
13541
- if (codec.bomAware && options && options.addBOM)
13678
+ exports.getEncoder = function getEncoder(encoding, options) {
13679
+ var codec = exports.getCodec(encoding);
13680
+ var encoder = new codec.encoder(options, codec);
13681
+ if (codec.bomAware && options && options.addBOM) {
13542
13682
  encoder = new bomHandling.PrependBOM(encoder, options);
13683
+ }
13543
13684
  return encoder;
13544
13685
  };
13545
- iconv.getDecoder = function getDecoder(encoding, options) {
13546
- var codec = iconv.getCodec(encoding), decoder = new codec.decoder(options, codec);
13547
- if (codec.bomAware && !(options && options.stripBOM === false))
13686
+ exports.getDecoder = function getDecoder(encoding, options) {
13687
+ var codec = exports.getCodec(encoding);
13688
+ var decoder = new codec.decoder(options, codec);
13689
+ if (codec.bomAware && !(options && options.stripBOM === false)) {
13548
13690
  decoder = new bomHandling.StripBOM(decoder, options);
13691
+ }
13549
13692
  return decoder;
13550
13693
  };
13551
- iconv.enableStreamingAPI = function enableStreamingAPI(stream_module2) {
13552
- if (iconv.supportsStreams)
13694
+ exports.enableStreamingAPI = function enableStreamingAPI(streamModule2) {
13695
+ if (exports.supportsStreams) {
13553
13696
  return;
13554
- var streams = require_streams()(stream_module2);
13555
- iconv.IconvLiteEncoderStream = streams.IconvLiteEncoderStream;
13556
- iconv.IconvLiteDecoderStream = streams.IconvLiteDecoderStream;
13557
- iconv.encodeStream = function encodeStream(encoding, options) {
13558
- return new iconv.IconvLiteEncoderStream(iconv.getEncoder(encoding, options), options);
13697
+ }
13698
+ var streams = require_streams()(streamModule2);
13699
+ exports.IconvLiteEncoderStream = streams.IconvLiteEncoderStream;
13700
+ exports.IconvLiteDecoderStream = streams.IconvLiteDecoderStream;
13701
+ exports.encodeStream = function encodeStream(encoding, options) {
13702
+ return new exports.IconvLiteEncoderStream(exports.getEncoder(encoding, options), options);
13559
13703
  };
13560
- iconv.decodeStream = function decodeStream(encoding, options) {
13561
- return new iconv.IconvLiteDecoderStream(iconv.getDecoder(encoding, options), options);
13704
+ exports.decodeStream = function decodeStream(encoding, options) {
13705
+ return new exports.IconvLiteDecoderStream(exports.getDecoder(encoding, options), options);
13562
13706
  };
13563
- iconv.supportsStreams = true;
13707
+ exports.supportsStreams = true;
13564
13708
  };
13565
- var stream_module;
13709
+ var streamModule;
13566
13710
  try {
13567
- stream_module = __require("stream");
13711
+ streamModule = __require("stream");
13568
13712
  } catch (e) {}
13569
- if (stream_module && stream_module.Transform) {
13570
- iconv.enableStreamingAPI(stream_module);
13713
+ if (streamModule && streamModule.Transform) {
13714
+ exports.enableStreamingAPI(streamModule);
13571
13715
  } else {
13572
- iconv.encodeStream = iconv.decodeStream = function() {
13716
+ exports.encodeStream = exports.decodeStream = function() {
13573
13717
  throw new Error("iconv-lite Streaming API is not enabled. Use iconv.enableStreamingAPI(require('stream')); to enable it.");
13574
13718
  };
13575
13719
  }
@@ -14141,6 +14285,316 @@ var init_stdio2 = __esm(() => {
14141
14285
  init_stdio();
14142
14286
  });
14143
14287
 
14288
+ // node_modules/statuses/codes.json
14289
+ var require_codes2 = __commonJS((exports, module) => {
14290
+ module.exports = {
14291
+ "100": "Continue",
14292
+ "101": "Switching Protocols",
14293
+ "102": "Processing",
14294
+ "103": "Early Hints",
14295
+ "200": "OK",
14296
+ "201": "Created",
14297
+ "202": "Accepted",
14298
+ "203": "Non-Authoritative Information",
14299
+ "204": "No Content",
14300
+ "205": "Reset Content",
14301
+ "206": "Partial Content",
14302
+ "207": "Multi-Status",
14303
+ "208": "Already Reported",
14304
+ "226": "IM Used",
14305
+ "300": "Multiple Choices",
14306
+ "301": "Moved Permanently",
14307
+ "302": "Found",
14308
+ "303": "See Other",
14309
+ "304": "Not Modified",
14310
+ "305": "Use Proxy",
14311
+ "307": "Temporary Redirect",
14312
+ "308": "Permanent Redirect",
14313
+ "400": "Bad Request",
14314
+ "401": "Unauthorized",
14315
+ "402": "Payment Required",
14316
+ "403": "Forbidden",
14317
+ "404": "Not Found",
14318
+ "405": "Method Not Allowed",
14319
+ "406": "Not Acceptable",
14320
+ "407": "Proxy Authentication Required",
14321
+ "408": "Request Timeout",
14322
+ "409": "Conflict",
14323
+ "410": "Gone",
14324
+ "411": "Length Required",
14325
+ "412": "Precondition Failed",
14326
+ "413": "Payload Too Large",
14327
+ "414": "URI Too Long",
14328
+ "415": "Unsupported Media Type",
14329
+ "416": "Range Not Satisfiable",
14330
+ "417": "Expectation Failed",
14331
+ "418": "I'm a Teapot",
14332
+ "421": "Misdirected Request",
14333
+ "422": "Unprocessable Entity",
14334
+ "423": "Locked",
14335
+ "424": "Failed Dependency",
14336
+ "425": "Too Early",
14337
+ "426": "Upgrade Required",
14338
+ "428": "Precondition Required",
14339
+ "429": "Too Many Requests",
14340
+ "431": "Request Header Fields Too Large",
14341
+ "451": "Unavailable For Legal Reasons",
14342
+ "500": "Internal Server Error",
14343
+ "501": "Not Implemented",
14344
+ "502": "Bad Gateway",
14345
+ "503": "Service Unavailable",
14346
+ "504": "Gateway Timeout",
14347
+ "505": "HTTP Version Not Supported",
14348
+ "506": "Variant Also Negotiates",
14349
+ "507": "Insufficient Storage",
14350
+ "508": "Loop Detected",
14351
+ "509": "Bandwidth Limit Exceeded",
14352
+ "510": "Not Extended",
14353
+ "511": "Network Authentication Required"
14354
+ };
14355
+ });
14356
+
14357
+ // node_modules/statuses/index.js
14358
+ var require_statuses2 = __commonJS((exports, module) => {
14359
+ /*!
14360
+ * statuses
14361
+ * Copyright(c) 2014 Jonathan Ong
14362
+ * Copyright(c) 2016 Douglas Christopher Wilson
14363
+ * MIT Licensed
14364
+ */
14365
+ var codes = require_codes2();
14366
+ module.exports = status;
14367
+ status.message = codes;
14368
+ status.code = createMessageToStatusCodeMap(codes);
14369
+ status.codes = createStatusCodeList(codes);
14370
+ status.redirect = {
14371
+ 300: true,
14372
+ 301: true,
14373
+ 302: true,
14374
+ 303: true,
14375
+ 305: true,
14376
+ 307: true,
14377
+ 308: true
14378
+ };
14379
+ status.empty = {
14380
+ 204: true,
14381
+ 205: true,
14382
+ 304: true
14383
+ };
14384
+ status.retry = {
14385
+ 502: true,
14386
+ 503: true,
14387
+ 504: true
14388
+ };
14389
+ function createMessageToStatusCodeMap(codes2) {
14390
+ var map = {};
14391
+ Object.keys(codes2).forEach(function forEachCode(code) {
14392
+ var message = codes2[code];
14393
+ var status2 = Number(code);
14394
+ map[message.toLowerCase()] = status2;
14395
+ });
14396
+ return map;
14397
+ }
14398
+ function createStatusCodeList(codes2) {
14399
+ return Object.keys(codes2).map(function mapCode(code) {
14400
+ return Number(code);
14401
+ });
14402
+ }
14403
+ function getStatusCode(message) {
14404
+ var msg = message.toLowerCase();
14405
+ if (!Object.prototype.hasOwnProperty.call(status.code, msg)) {
14406
+ throw new Error('invalid status message: "' + message + '"');
14407
+ }
14408
+ return status.code[msg];
14409
+ }
14410
+ function getStatusMessage(code) {
14411
+ if (!Object.prototype.hasOwnProperty.call(status.message, code)) {
14412
+ throw new Error("invalid status code: " + code);
14413
+ }
14414
+ return status.message[code];
14415
+ }
14416
+ function status(code) {
14417
+ if (typeof code === "number") {
14418
+ return getStatusMessage(code);
14419
+ }
14420
+ if (typeof code !== "string") {
14421
+ throw new TypeError("code must be a number or string");
14422
+ }
14423
+ var n = parseInt(code, 10);
14424
+ if (!isNaN(n)) {
14425
+ return getStatusMessage(n);
14426
+ }
14427
+ return getStatusCode(code);
14428
+ }
14429
+ });
14430
+
14431
+ // node_modules/http-errors/index.js
14432
+ var require_http_errors2 = __commonJS((exports, module) => {
14433
+ /*!
14434
+ * http-errors
14435
+ * Copyright(c) 2014 Jonathan Ong
14436
+ * Copyright(c) 2016 Douglas Christopher Wilson
14437
+ * MIT Licensed
14438
+ */
14439
+ var deprecate = require_depd()("http-errors");
14440
+ var setPrototypeOf = require_setprototypeof();
14441
+ var statuses = require_statuses2();
14442
+ var inherits = require_inherits();
14443
+ var toIdentifier = require_toidentifier();
14444
+ module.exports = createError;
14445
+ module.exports.HttpError = createHttpErrorConstructor();
14446
+ module.exports.isHttpError = createIsHttpErrorFunction(module.exports.HttpError);
14447
+ populateConstructorExports(module.exports, statuses.codes, module.exports.HttpError);
14448
+ function codeClass(status) {
14449
+ return Number(String(status).charAt(0) + "00");
14450
+ }
14451
+ function createError() {
14452
+ var err;
14453
+ var msg;
14454
+ var status = 500;
14455
+ var props = {};
14456
+ for (var i = 0;i < arguments.length; i++) {
14457
+ var arg = arguments[i];
14458
+ var type = typeof arg;
14459
+ if (type === "object" && arg instanceof Error) {
14460
+ err = arg;
14461
+ status = err.status || err.statusCode || status;
14462
+ } else if (type === "number" && i === 0) {
14463
+ status = arg;
14464
+ } else if (type === "string") {
14465
+ msg = arg;
14466
+ } else if (type === "object") {
14467
+ props = arg;
14468
+ } else {
14469
+ throw new TypeError("argument #" + (i + 1) + " unsupported type " + type);
14470
+ }
14471
+ }
14472
+ if (typeof status === "number" && (status < 400 || status >= 600)) {
14473
+ deprecate("non-error status code; use only 4xx or 5xx status codes");
14474
+ }
14475
+ if (typeof status !== "number" || !statuses.message[status] && (status < 400 || status >= 600)) {
14476
+ status = 500;
14477
+ }
14478
+ var HttpError = createError[status] || createError[codeClass(status)];
14479
+ if (!err) {
14480
+ err = HttpError ? new HttpError(msg) : new Error(msg || statuses.message[status]);
14481
+ Error.captureStackTrace(err, createError);
14482
+ }
14483
+ if (!HttpError || !(err instanceof HttpError) || err.status !== status) {
14484
+ err.expose = status < 500;
14485
+ err.status = err.statusCode = status;
14486
+ }
14487
+ for (var key in props) {
14488
+ if (key !== "status" && key !== "statusCode") {
14489
+ err[key] = props[key];
14490
+ }
14491
+ }
14492
+ return err;
14493
+ }
14494
+ function createHttpErrorConstructor() {
14495
+ function HttpError() {
14496
+ throw new TypeError("cannot construct abstract class");
14497
+ }
14498
+ inherits(HttpError, Error);
14499
+ return HttpError;
14500
+ }
14501
+ function createClientErrorConstructor(HttpError, name, code) {
14502
+ var className = toClassName(name);
14503
+ function ClientError(message) {
14504
+ var msg = message != null ? message : statuses.message[code];
14505
+ var err = new Error(msg);
14506
+ Error.captureStackTrace(err, ClientError);
14507
+ setPrototypeOf(err, ClientError.prototype);
14508
+ Object.defineProperty(err, "message", {
14509
+ enumerable: true,
14510
+ configurable: true,
14511
+ value: msg,
14512
+ writable: true
14513
+ });
14514
+ Object.defineProperty(err, "name", {
14515
+ enumerable: false,
14516
+ configurable: true,
14517
+ value: className,
14518
+ writable: true
14519
+ });
14520
+ return err;
14521
+ }
14522
+ inherits(ClientError, HttpError);
14523
+ nameFunc(ClientError, className);
14524
+ ClientError.prototype.status = code;
14525
+ ClientError.prototype.statusCode = code;
14526
+ ClientError.prototype.expose = true;
14527
+ return ClientError;
14528
+ }
14529
+ function createIsHttpErrorFunction(HttpError) {
14530
+ return function isHttpError(val) {
14531
+ if (!val || typeof val !== "object") {
14532
+ return false;
14533
+ }
14534
+ if (val instanceof HttpError) {
14535
+ return true;
14536
+ }
14537
+ return val instanceof Error && typeof val.expose === "boolean" && typeof val.statusCode === "number" && val.status === val.statusCode;
14538
+ };
14539
+ }
14540
+ function createServerErrorConstructor(HttpError, name, code) {
14541
+ var className = toClassName(name);
14542
+ function ServerError(message) {
14543
+ var msg = message != null ? message : statuses.message[code];
14544
+ var err = new Error(msg);
14545
+ Error.captureStackTrace(err, ServerError);
14546
+ setPrototypeOf(err, ServerError.prototype);
14547
+ Object.defineProperty(err, "message", {
14548
+ enumerable: true,
14549
+ configurable: true,
14550
+ value: msg,
14551
+ writable: true
14552
+ });
14553
+ Object.defineProperty(err, "name", {
14554
+ enumerable: false,
14555
+ configurable: true,
14556
+ value: className,
14557
+ writable: true
14558
+ });
14559
+ return err;
14560
+ }
14561
+ inherits(ServerError, HttpError);
14562
+ nameFunc(ServerError, className);
14563
+ ServerError.prototype.status = code;
14564
+ ServerError.prototype.statusCode = code;
14565
+ ServerError.prototype.expose = false;
14566
+ return ServerError;
14567
+ }
14568
+ function nameFunc(func, name) {
14569
+ var desc = Object.getOwnPropertyDescriptor(func, "name");
14570
+ if (desc && desc.configurable) {
14571
+ desc.value = name;
14572
+ Object.defineProperty(func, "name", desc);
14573
+ }
14574
+ }
14575
+ function populateConstructorExports(exports2, codes, HttpError) {
14576
+ codes.forEach(function forEachCode(code) {
14577
+ var CodeError;
14578
+ var name = toIdentifier(statuses.message[code]);
14579
+ switch (codeClass(code)) {
14580
+ case 400:
14581
+ CodeError = createClientErrorConstructor(HttpError, name, code);
14582
+ break;
14583
+ case 500:
14584
+ CodeError = createServerErrorConstructor(HttpError, name, code);
14585
+ break;
14586
+ }
14587
+ if (CodeError) {
14588
+ exports2[code] = CodeError;
14589
+ exports2[name] = CodeError;
14590
+ }
14591
+ });
14592
+ }
14593
+ function toClassName(name) {
14594
+ return name.substr(-5) !== "Error" ? name + "Error" : name;
14595
+ }
14596
+ });
14597
+
14144
14598
  // node_modules/body-parser/node_modules/ms/index.js
14145
14599
  var require_ms = __commonJS((exports, module) => {
14146
14600
  var s = 1000;
@@ -17894,7 +18348,7 @@ var require_raw_body2 = __commonJS((exports, module) => {
17894
18348
  */
17895
18349
  var asyncHooks = tryRequireAsyncHooks();
17896
18350
  var bytes = require_bytes();
17897
- var createError = require_http_errors();
18351
+ var createError = require_http_errors2();
17898
18352
  var iconv = require_lib2();
17899
18353
  var unpipe = require_unpipe();
17900
18354
  module.exports = getRawBody2;
@@ -18260,7 +18714,7 @@ var require_read = __commonJS((exports, module) => {
18260
18714
  * Copyright(c) 2014-2015 Douglas Christopher Wilson
18261
18715
  * MIT Licensed
18262
18716
  */
18263
- var createError = require_http_errors();
18717
+ var createError = require_http_errors2();
18264
18718
  var destroy = require_destroy();
18265
18719
  var getBody = require_raw_body2();
18266
18720
  var iconv = require_lib2();
@@ -27255,7 +27709,7 @@ var require_json = __commonJS((exports, module) => {
27255
27709
  */
27256
27710
  var bytes = require_bytes();
27257
27711
  var contentType2 = require_content_type();
27258
- var createError = require_http_errors();
27712
+ var createError = require_http_errors2();
27259
27713
  var debug = require_src()("body-parser:json");
27260
27714
  var read = require_read();
27261
27715
  var typeis = require_type_is();
@@ -29676,7 +30130,7 @@ var require_urlencoded = __commonJS((exports, module) => {
29676
30130
  */
29677
30131
  var bytes = require_bytes();
29678
30132
  var contentType2 = require_content_type();
29679
- var createError = require_http_errors();
30133
+ var createError = require_http_errors2();
29680
30134
  var debug = require_src()("body-parser:urlencoded");
29681
30135
  var deprecate = require_depd()("body-parser");
29682
30136
  var read = require_read();
@@ -30528,7 +30982,7 @@ var require_finalhandler = __commonJS((exports, module) => {
30528
30982
  var escapeHtml = require_escape_html();
30529
30983
  var onFinished = require_on_finished();
30530
30984
  var parseUrl = require_parseurl();
30531
- var statuses = require_statuses();
30985
+ var statuses = require_statuses2();
30532
30986
  var unpipe = require_unpipe();
30533
30987
  var DOUBLE_SPACE_REGEXP = /\x20{2}/g;
30534
30988
  var NEWLINE_REGEXP = /\n/g;
@@ -33068,7 +33522,7 @@ var require_send = __commonJS((exports, module) => {
33068
33522
  * Copyright(c) 2014-2022 Douglas Christopher Wilson
33069
33523
  * MIT Licensed
33070
33524
  */
33071
- var createError = require_http_errors();
33525
+ var createError = require_http_errors2();
33072
33526
  var debug = require_src4()("send");
33073
33527
  var deprecate = require_depd()("send");
33074
33528
  var destroy = require_destroy();
@@ -33082,7 +33536,7 @@ var require_send = __commonJS((exports, module) => {
33082
33536
  var onFinished = require_on_finished();
33083
33537
  var parseRange = require_range_parser();
33084
33538
  var path = __require("path");
33085
- var statuses = require_statuses();
33539
+ var statuses = require_statuses2();
33086
33540
  var Stream = __require("stream");
33087
33541
  var util3 = __require("util");
33088
33542
  var extname = path.extname;
@@ -35901,7 +36355,7 @@ var require_response = __commonJS((exports, module) => {
35901
36355
  */
35902
36356
  var Buffer2 = require_safe_buffer().Buffer;
35903
36357
  var contentDisposition = require_content_disposition();
35904
- var createError = require_http_errors();
36358
+ var createError = require_http_errors2();
35905
36359
  var deprecate = require_depd()("express");
35906
36360
  var encodeUrl = require_encodeurl();
35907
36361
  var escapeHtml = require_escape_html();
@@ -35909,7 +36363,7 @@ var require_response = __commonJS((exports, module) => {
35909
36363
  var isAbsolute = require_utils2().isAbsolute;
35910
36364
  var onFinished = require_on_finished();
35911
36365
  var path = __require("path");
35912
- var statuses = require_statuses();
36366
+ var statuses = require_statuses2();
35913
36367
  var merge2 = require_utils_merge();
35914
36368
  var sign = require_cookie_signature().sign;
35915
36369
  var normalizeType = require_utils2().normalizeType;
@@ -38529,6 +38983,9 @@ class Protocol {
38529
38983
  }
38530
38984
  }
38531
38985
  async connect(transport) {
38986
+ if (this._transport) {
38987
+ throw new Error("Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.");
38988
+ }
38532
38989
  this._transport = transport;
38533
38990
  const _onclose = this.transport?.onclose;
38534
38991
  this._transport.onclose = () => {
@@ -38561,6 +39018,10 @@ class Protocol {
38561
39018
  this._progressHandlers.clear();
38562
39019
  this._taskProgressTokens.clear();
38563
39020
  this._pendingDebouncedNotifications.clear();
39021
+ for (const controller of this._requestHandlerAbortControllers.values()) {
39022
+ controller.abort();
39023
+ }
39024
+ this._requestHandlerAbortControllers.clear();
38564
39025
  const error2 = McpError.fromError(ErrorCode.ConnectionClosed, "Connection closed");
38565
39026
  this._transport = undefined;
38566
39027
  this.onclose?.();
@@ -38611,6 +39072,8 @@ class Protocol {
38611
39072
  sessionId: capturedTransport?.sessionId,
38612
39073
  _meta: request.params?._meta,
38613
39074
  sendNotification: async (notification) => {
39075
+ if (abortController.signal.aborted)
39076
+ return;
38614
39077
  const notificationOptions = { relatedRequestId: request.id };
38615
39078
  if (relatedTaskId) {
38616
39079
  notificationOptions.relatedTask = { taskId: relatedTaskId };
@@ -38618,6 +39081,9 @@ class Protocol {
38618
39081
  await this.notification(notification, notificationOptions);
38619
39082
  },
38620
39083
  sendRequest: async (r, resultSchema, options) => {
39084
+ if (abortController.signal.aborted) {
39085
+ throw new McpError(ErrorCode.ConnectionClosed, "Request was cancelled");
39086
+ }
38621
39087
  const requestOptions = { ...options, relatedRequestId: request.id };
38622
39088
  if (relatedTaskId && !requestOptions.relatedTask) {
38623
39089
  requestOptions.relatedTask = { taskId: relatedTaskId };
@@ -52413,9 +52879,9 @@ var init_config = __esm(() => {
52413
52879
  SDK_METADATA = {
52414
52880
  language: "typescript",
52415
52881
  openapiDocVersion: "v2026.04.00",
52416
- sdkVersion: "26.4.0-dev.0",
52417
- genVersion: "2.803.3",
52418
- userAgent: "speakeasy-sdk/typescript 26.4.0-dev.0 2.803.3 v2026.04.00 @moovio/sdk"
52882
+ sdkVersion: "26.4.0-dev.1",
52883
+ genVersion: "2.811.2",
52884
+ userAgent: "speakeasy-sdk/typescript 26.4.0-dev.1 2.811.2 v2026.04.00 @moovio/sdk"
52419
52885
  };
52420
52886
  });
52421
52887
 
@@ -100236,7 +100702,7 @@ var init_webhooksUpdate2 = __esm(() => {
100236
100702
  function createMCPServer(deps) {
100237
100703
  const server = new McpServer({
100238
100704
  name: "Moov",
100239
- version: "26.4.0-dev.0"
100705
+ version: "26.4.0-dev.1"
100240
100706
  });
100241
100707
  const client = new MoovCore({
100242
100708
  security: deps.security,
@@ -101802,7 +102268,7 @@ var routes = rn({
101802
102268
  var app = Ve(routes, {
101803
102269
  name: "mcp",
101804
102270
  versionInfo: {
101805
- currentVersion: "26.4.0-dev.0"
102271
+ currentVersion: "26.4.0-dev.1"
101806
102272
  }
101807
102273
  });
101808
102274
  _t(app, process3.argv.slice(2), buildContext(process3));
@@ -101810,5 +102276,5 @@ export {
101810
102276
  app
101811
102277
  };
101812
102278
 
101813
- //# debugId=3D796353F2710E7E64756E2164756E21
102279
+ //# debugId=C10AE72E4217F96764756E2164756E21
101814
102280
  //# sourceMappingURL=mcp-server.js.map