karin-plugin-kkk 2.20.0 → 2.20.2

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.
@@ -11,12 +11,12 @@ import Path from "path";
11
11
  import { URL as URL$2, URLSearchParams as URLSearchParams$1 } from "url";
12
12
  import FS from "fs";
13
13
  import { TextDecoder as TextDecoder$1, TextEncoder } from "util";
14
- import Zlib from "zlib";
15
14
  import { ReadableStream as ReadableStream$1 } from "stream/web";
16
15
  import VM, { Script } from "vm";
17
16
  import { isIP } from "net";
18
17
  import HTTP from "http";
19
18
  import HTTPS from "https";
19
+ import Zlib from "zlib";
20
20
  import ChildProcess from "child_process";
21
21
  import { PerformanceEntry, PerformanceObserver } from "node:perf_hooks";
22
22
  function $constructor(name$2, initializer$2, params) {
@@ -85,7 +85,7 @@ var util_exports = __export({
85
85
  NUMBER_FORMAT_RANGES: () => NUMBER_FORMAT_RANGES,
86
86
  aborted: () => aborted$1,
87
87
  allowsEval: () => allowsEval,
88
- assert: () => assert$3,
88
+ assert: () => assert$2,
89
89
  assertEqual: () => assertEqual,
90
90
  assertIs: () => assertIs,
91
91
  assertNever: () => assertNever,
@@ -153,7 +153,7 @@ function assertIs(_arg) {}
153
153
  function assertNever(_x) {
154
154
  throw new Error("Unexpected value in exhaustive check");
155
155
  }
156
- function assert$3(_) {}
156
+ function assert$2(_) {}
157
157
  function getEnumValues(entries$1) {
158
158
  const numericValues = Object.values(entries$1).filter((v) => typeof v === "number");
159
159
  return Object.entries(entries$1).filter(([k, _]) => numericValues.indexOf(+k) === -1).map(([_, v]) => v);
@@ -740,7 +740,7 @@ var init_errors$2 = __esmMin(() => {
740
740
  $ZodError = $constructor("$ZodError", initializer$1);
741
741
  $ZodRealError = $constructor("$ZodError", initializer$1, { Parent: Error });
742
742
  });
743
- var _parse, parse$26, _parseAsync, parseAsync$1, _safeParse, safeParse$1, _safeParseAsync, safeParseAsync$1, _encode, encode$6, _decode, decode$8, _encodeAsync, encodeAsync$1, _decodeAsync, decodeAsync$1, _safeEncode, safeEncode$1, _safeDecode, safeDecode$1, _safeEncodeAsync, safeEncodeAsync$1, _safeDecodeAsync, safeDecodeAsync$1;
743
+ var _parse, parse$25, _parseAsync, parseAsync$1, _safeParse, safeParse$1, _safeParseAsync, safeParseAsync$1, _encode, encode$6, _decode, decode$8, _encodeAsync, encodeAsync$1, _decodeAsync, decodeAsync$1, _safeEncode, safeEncode$1, _safeDecode, safeDecode$1, _safeEncodeAsync, safeEncodeAsync$1, _safeDecodeAsync, safeDecodeAsync$1;
744
744
  var init_parse$3 = __esmMin(() => {
745
745
  init_core$2();
746
746
  init_errors$2();
@@ -759,7 +759,7 @@ var init_parse$3 = __esmMin(() => {
759
759
  }
760
760
  return result$1.value;
761
761
  };
762
- parse$26 = _parse($ZodRealError);
762
+ parse$25 = _parse($ZodRealError);
763
763
  _parseAsync = (_Err) => async (schema, value$1, _ctx, params) => {
764
764
  const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true };
765
765
  let result$1 = schema._zod.run({
@@ -3135,9 +3135,9 @@ var init_schemas$1 = __esmMin(() => {
3135
3135
  inst.implement = (func) => {
3136
3136
  if (typeof func !== "function") throw new Error("implement() must be called with a function");
3137
3137
  return function(...args) {
3138
- const parsedArgs = inst._def.input ? parse$26(inst._def.input, args) : args;
3138
+ const parsedArgs = inst._def.input ? parse$25(inst._def.input, args) : args;
3139
3139
  const result$1 = Reflect.apply(func, this, parsedArgs);
3140
- if (inst._def.output) return parse$26(inst._def.output, result$1);
3140
+ if (inst._def.output) return parse$25(inst._def.output, result$1);
3141
3141
  return result$1;
3142
3142
  };
3143
3143
  };
@@ -10706,7 +10706,7 @@ var core_exports = __export({
10706
10706
  isValidJWT: () => isValidJWT,
10707
10707
  locales: () => locales_exports,
10708
10708
  meta: () => meta$1,
10709
- parse: () => parse$26,
10709
+ parse: () => parse$25,
10710
10710
  parseAsync: () => parseAsync$1,
10711
10711
  prettifyError: () => prettifyError,
10712
10712
  process: () => process$2,
@@ -10845,11 +10845,11 @@ var init_errors$1 = __esmMin(() => {
10845
10845
  ZodError = $constructor("ZodError", initializer);
10846
10846
  ZodRealError = $constructor("ZodError", initializer, { Parent: Error });
10847
10847
  });
10848
- var parse$25, parseAsync, safeParse, safeParseAsync, encode$5, decode$7, encodeAsync, decodeAsync, safeEncode, safeDecode, safeEncodeAsync, safeDecodeAsync;
10848
+ var parse$24, parseAsync, safeParse, safeParseAsync, encode$5, decode$7, encodeAsync, decodeAsync, safeEncode, safeDecode, safeEncodeAsync, safeDecodeAsync;
10849
10849
  var init_parse$2 = __esmMin(() => {
10850
10850
  init_core$1();
10851
10851
  init_errors$1();
10852
- parse$25 = _parse(ZodRealError);
10852
+ parse$24 = _parse(ZodRealError);
10853
10853
  parseAsync = _parseAsync(ZodRealError);
10854
10854
  safeParse = _safeParse(ZodRealError);
10855
10855
  safeParseAsync = _safeParseAsync(ZodRealError);
@@ -11505,7 +11505,7 @@ var init_schemas = __esmMin(() => {
11505
11505
  reg.add(inst, meta$2);
11506
11506
  return inst;
11507
11507
  };
11508
- inst.parse = (data$1, params) => parse$25(inst, data$1, params, { callee: inst.parse });
11508
+ inst.parse = (data$1, params) => parse$24(inst, data$1, params, { callee: inst.parse });
11509
11509
  inst.safeParse = (data$1, params) => safeParse(inst, data$1, params);
11510
11510
  inst.parseAsync = async (data$1, params) => parseAsync(inst, data$1, params, { callee: inst.parseAsync });
11511
11511
  inst.safeParseAsync = async (data$1, params) => safeParseAsync(inst, data$1, params);
@@ -12643,7 +12643,7 @@ var external_exports = __export({
12643
12643
  object: () => object,
12644
12644
  optional: () => optional$1,
12645
12645
  overwrite: () => _overwrite,
12646
- parse: () => parse$25,
12646
+ parse: () => parse$24,
12647
12647
  parseAsync: () => parseAsync,
12648
12648
  partialRecord: () => partialRecord,
12649
12649
  pipe: () => pipe$1,
@@ -13886,7 +13886,7 @@ var init_utils$6 = __esmMin(() => {
13886
13886
  Object.defineProperty(constructor, "super", { value: superConstructor.prototype });
13887
13887
  props && Object.assign(constructor.prototype, props);
13888
13888
  };
13889
- toFlatObject = (sourceObj, destObj, filter$3, propFilter) => {
13889
+ toFlatObject = (sourceObj, destObj, filter$2, propFilter) => {
13890
13890
  let props;
13891
13891
  let i$4;
13892
13892
  let prop;
@@ -13903,8 +13903,8 @@ var init_utils$6 = __esmMin(() => {
13903
13903
  merged[prop] = true;
13904
13904
  }
13905
13905
  }
13906
- sourceObj = filter$3 !== false && getPrototypeOf(sourceObj);
13907
- } while (sourceObj && (!filter$3 || filter$3(sourceObj, destObj)) && sourceObj !== Object.prototype);
13906
+ sourceObj = filter$2 !== false && getPrototypeOf(sourceObj);
13907
+ } while (sourceObj && (!filter$2 || filter$2(sourceObj, destObj)) && sourceObj !== Object.prototype);
13908
13908
  return destObj;
13909
13909
  };
13910
13910
  endsWith = (str, searchString, position$2) => {
@@ -14135,7 +14135,7 @@ var init_AxiosError = __esmMin(() => {
14135
14135
  Object.defineProperty(prototype$1, "isAxiosError", { value: true });
14136
14136
  AxiosError$1.from = (error$49, code$2, config$1, request, response, customProps) => {
14137
14137
  const axiosError = Object.create(prototype$1);
14138
- utils_default.toFlatObject(error$49, axiosError, function filter$3(obj) {
14138
+ utils_default.toFlatObject(error$49, axiosError, function filter$2(obj) {
14139
14139
  return obj !== Error.prototype;
14140
14140
  }, (prop) => prop !== "isAxiosError");
14141
14141
  const msg = error$49 && error$49.message ? error$49.message : "Error";
@@ -14235,7 +14235,7 @@ var init_toFormData = __esmMin(() => {
14235
14235
  init_utils$6();
14236
14236
  init_AxiosError();
14237
14237
  init_null();
14238
- predicates = utils_default.toFlatObject(utils_default, {}, null, function filter$3(prop) {
14238
+ predicates = utils_default.toFlatObject(utils_default, {}, null, function filter$2(prop) {
14239
14239
  return /^is[A-Z]/.test(prop);
14240
14240
  });
14241
14241
  toFormData_default = toFormData$1;
@@ -14611,12 +14611,12 @@ function parseTokens(str) {
14611
14611
  while (match$3 = tokensRE.exec(str)) tokens[match$3[1]] = match$3[2];
14612
14612
  return tokens;
14613
14613
  }
14614
- function matchHeaderValue(context, value$1, header, filter$3, isHeaderNameFilter) {
14615
- if (utils_default.isFunction(filter$3)) return filter$3.call(this, value$1, header);
14614
+ function matchHeaderValue(context, value$1, header, filter$2, isHeaderNameFilter) {
14615
+ if (utils_default.isFunction(filter$2)) return filter$2.call(this, value$1, header);
14616
14616
  if (isHeaderNameFilter) value$1 = header;
14617
14617
  if (!utils_default.isString(value$1)) return;
14618
- if (utils_default.isString(filter$3)) return value$1.indexOf(filter$3) !== -1;
14619
- if (utils_default.isRegExp(filter$3)) return filter$3.test(value$1);
14618
+ if (utils_default.isString(filter$2)) return value$1.indexOf(filter$2) !== -1;
14619
+ if (utils_default.isRegExp(filter$2)) return filter$2.test(value$1);
14620
14620
  }
14621
14621
  function formatHeader(header) {
14622
14622
  return header.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (w$2, char, str) => char.toUpperCase() + str);
@@ -16840,7 +16840,7 @@ var require_pool = __commonJSMin((exports, module) => {
16840
16840
  });
16841
16841
  var require_longbits = __commonJSMin((exports, module) => {
16842
16842
  module.exports = LongBits$2;
16843
- var util$40 = require_minimal();
16843
+ var util$34 = require_minimal();
16844
16844
  function LongBits$2(lo, hi) {
16845
16845
  this.lo = lo >>> 0;
16846
16846
  this.hi = hi >>> 0;
@@ -16873,7 +16873,7 @@ var require_longbits = __commonJSMin((exports, module) => {
16873
16873
  };
16874
16874
  LongBits$2.from = function from(value$1) {
16875
16875
  if (typeof value$1 === "number") return LongBits$2.fromNumber(value$1);
16876
- if (util$40.isString(value$1)) if (util$40.Long) value$1 = util$40.Long.fromString(value$1);
16876
+ if (util$34.isString(value$1)) if (util$34.Long) value$1 = util$34.Long.fromString(value$1);
16877
16877
  else return LongBits$2.fromNumber(parseInt(value$1, 10));
16878
16878
  return value$1.low || value$1.high ? new LongBits$2(value$1.low >>> 0, value$1.high >>> 0) : zero;
16879
16879
  };
@@ -16886,7 +16886,7 @@ var require_longbits = __commonJSMin((exports, module) => {
16886
16886
  return this.lo + this.hi * 4294967296;
16887
16887
  };
16888
16888
  LongBits$2.prototype.toLong = function toLong(unsigned) {
16889
- return util$40.Long ? new util$40.Long(this.lo | 0, this.hi | 0, Boolean(unsigned)) : {
16889
+ return util$34.Long ? new util$34.Long(this.lo | 0, this.hi | 0, Boolean(unsigned)) : {
16890
16890
  low: this.lo | 0,
16891
16891
  high: this.hi | 0,
16892
16892
  unsigned: Boolean(unsigned)
@@ -16918,65 +16918,65 @@ var require_longbits = __commonJSMin((exports, module) => {
16918
16918
  };
16919
16919
  });
16920
16920
  var require_minimal = __commonJSMin((exports) => {
16921
- var util$39 = exports;
16922
- util$39.asPromise = require_aspromise();
16923
- util$39.base64 = require_base64();
16924
- util$39.EventEmitter = require_eventemitter();
16925
- util$39.float = require_float();
16926
- util$39.inquire = require_inquire();
16927
- util$39.utf8 = require_utf8();
16928
- util$39.pool = require_pool();
16929
- util$39.LongBits = require_longbits();
16930
- util$39.isNode = Boolean(typeof global !== "undefined" && global && global.process && global.process.versions && global.process.versions.node);
16931
- util$39.global = util$39.isNode && global || typeof window !== "undefined" && window || typeof self !== "undefined" && self || exports;
16932
- util$39.emptyArray = Object.freeze ? Object.freeze([]) : [];
16933
- util$39.emptyObject = Object.freeze ? Object.freeze({}) : {};
16934
- util$39.isInteger = Number.isInteger || function isInteger$1(value$1) {
16921
+ var util$33 = exports;
16922
+ util$33.asPromise = require_aspromise();
16923
+ util$33.base64 = require_base64();
16924
+ util$33.EventEmitter = require_eventemitter();
16925
+ util$33.float = require_float();
16926
+ util$33.inquire = require_inquire();
16927
+ util$33.utf8 = require_utf8();
16928
+ util$33.pool = require_pool();
16929
+ util$33.LongBits = require_longbits();
16930
+ util$33.isNode = Boolean(typeof global !== "undefined" && global && global.process && global.process.versions && global.process.versions.node);
16931
+ util$33.global = util$33.isNode && global || typeof window !== "undefined" && window || typeof self !== "undefined" && self || exports;
16932
+ util$33.emptyArray = Object.freeze ? Object.freeze([]) : [];
16933
+ util$33.emptyObject = Object.freeze ? Object.freeze({}) : {};
16934
+ util$33.isInteger = Number.isInteger || function isInteger$1(value$1) {
16935
16935
  return typeof value$1 === "number" && isFinite(value$1) && Math.floor(value$1) === value$1;
16936
16936
  };
16937
- util$39.isString = function isString$3(value$1) {
16937
+ util$33.isString = function isString$3(value$1) {
16938
16938
  return typeof value$1 === "string" || value$1 instanceof String;
16939
16939
  };
16940
- util$39.isObject = function isObject$6(value$1) {
16940
+ util$33.isObject = function isObject$6(value$1) {
16941
16941
  return value$1 && typeof value$1 === "object";
16942
16942
  };
16943
- util$39.isset = util$39.isSet = function isSet$1(obj, prop) {
16943
+ util$33.isset = util$33.isSet = function isSet$1(obj, prop) {
16944
16944
  var value$1 = obj[prop];
16945
16945
  if (value$1 != null && obj.hasOwnProperty(prop)) return typeof value$1 !== "object" || (Array.isArray(value$1) ? value$1.length : Object.keys(value$1).length) > 0;
16946
16946
  return false;
16947
16947
  };
16948
- util$39.Buffer = function() {
16948
+ util$33.Buffer = function() {
16949
16949
  try {
16950
- var Buffer$13 = util$39.inquire("buffer").Buffer;
16950
+ var Buffer$13 = util$33.inquire("buffer").Buffer;
16951
16951
  return Buffer$13.prototype.utf8Write ? Buffer$13 : null;
16952
16952
  } catch (e) {
16953
16953
  return null;
16954
16954
  }
16955
16955
  }();
16956
- util$39._Buffer_from = null;
16957
- util$39._Buffer_allocUnsafe = null;
16958
- util$39.newBuffer = function newBuffer(sizeOrArray) {
16959
- return typeof sizeOrArray === "number" ? util$39.Buffer ? util$39._Buffer_allocUnsafe(sizeOrArray) : new util$39.Array(sizeOrArray) : util$39.Buffer ? util$39._Buffer_from(sizeOrArray) : typeof Uint8Array === "undefined" ? sizeOrArray : new Uint8Array(sizeOrArray);
16960
- };
16961
- util$39.Array = typeof Uint8Array !== "undefined" ? Uint8Array : Array;
16962
- util$39.Long = util$39.global.dcodeIO && util$39.global.dcodeIO.Long || util$39.global.Long || util$39.inquire("long");
16963
- util$39.key2Re = /^true|false|0|1$/;
16964
- util$39.key32Re = /^-?(?:0|[1-9][0-9]*)$/;
16965
- util$39.key64Re = /^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;
16966
- util$39.longToHash = function longToHash(value$1) {
16967
- return value$1 ? util$39.LongBits.from(value$1).toHash() : util$39.LongBits.zeroHash;
16968
- };
16969
- util$39.longFromHash = function longFromHash(hash$1, unsigned) {
16970
- var bits = util$39.LongBits.fromHash(hash$1);
16971
- if (util$39.Long) return util$39.Long.fromBits(bits.lo, bits.hi, unsigned);
16956
+ util$33._Buffer_from = null;
16957
+ util$33._Buffer_allocUnsafe = null;
16958
+ util$33.newBuffer = function newBuffer(sizeOrArray) {
16959
+ return typeof sizeOrArray === "number" ? util$33.Buffer ? util$33._Buffer_allocUnsafe(sizeOrArray) : new util$33.Array(sizeOrArray) : util$33.Buffer ? util$33._Buffer_from(sizeOrArray) : typeof Uint8Array === "undefined" ? sizeOrArray : new Uint8Array(sizeOrArray);
16960
+ };
16961
+ util$33.Array = typeof Uint8Array !== "undefined" ? Uint8Array : Array;
16962
+ util$33.Long = util$33.global.dcodeIO && util$33.global.dcodeIO.Long || util$33.global.Long || util$33.inquire("long");
16963
+ util$33.key2Re = /^true|false|0|1$/;
16964
+ util$33.key32Re = /^-?(?:0|[1-9][0-9]*)$/;
16965
+ util$33.key64Re = /^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;
16966
+ util$33.longToHash = function longToHash(value$1) {
16967
+ return value$1 ? util$33.LongBits.from(value$1).toHash() : util$33.LongBits.zeroHash;
16968
+ };
16969
+ util$33.longFromHash = function longFromHash(hash$1, unsigned) {
16970
+ var bits = util$33.LongBits.fromHash(hash$1);
16971
+ if (util$33.Long) return util$33.Long.fromBits(bits.lo, bits.hi, unsigned);
16972
16972
  return bits.toNumber(Boolean(unsigned));
16973
16973
  };
16974
16974
  function merge$2(dst, src, ifNotSet) {
16975
16975
  for (var keys$1 = Object.keys(src), i$4 = 0; i$4 < keys$1.length; ++i$4) if (dst[keys$1[i$4]] === void 0 || !ifNotSet) dst[keys$1[i$4]] = src[keys$1[i$4]];
16976
16976
  return dst;
16977
16977
  }
16978
- util$39.merge = merge$2;
16979
- util$39.lcFirst = function lcFirst(str) {
16978
+ util$33.merge = merge$2;
16979
+ util$33.lcFirst = function lcFirst(str) {
16980
16980
  return str.charAt(0).toLowerCase() + str.substring(1);
16981
16981
  };
16982
16982
  function newError(name$2) {
@@ -17015,45 +17015,45 @@ var require_minimal = __commonJSMin((exports) => {
17015
17015
  });
17016
17016
  return CustomError;
17017
17017
  }
17018
- util$39.newError = newError;
17019
- util$39.ProtocolError = newError("ProtocolError");
17020
- util$39.oneOfGetter = function getOneOf(fieldNames) {
17018
+ util$33.newError = newError;
17019
+ util$33.ProtocolError = newError("ProtocolError");
17020
+ util$33.oneOfGetter = function getOneOf(fieldNames) {
17021
17021
  var fieldMap = {};
17022
17022
  for (var i$4 = 0; i$4 < fieldNames.length; ++i$4) fieldMap[fieldNames[i$4]] = 1;
17023
17023
  return function() {
17024
17024
  for (var keys$1 = Object.keys(this), i$5 = keys$1.length - 1; i$5 > -1; --i$5) if (fieldMap[keys$1[i$5]] === 1 && this[keys$1[i$5]] !== void 0 && this[keys$1[i$5]] !== null) return keys$1[i$5];
17025
17025
  };
17026
17026
  };
17027
- util$39.oneOfSetter = function setOneOf(fieldNames) {
17027
+ util$33.oneOfSetter = function setOneOf(fieldNames) {
17028
17028
  return function(name$2) {
17029
17029
  for (var i$4 = 0; i$4 < fieldNames.length; ++i$4) if (fieldNames[i$4] !== name$2) delete this[fieldNames[i$4]];
17030
17030
  };
17031
17031
  };
17032
- util$39.toJSONOptions = {
17032
+ util$33.toJSONOptions = {
17033
17033
  longs: String,
17034
17034
  enums: String,
17035
17035
  bytes: String,
17036
17036
  json: true
17037
17037
  };
17038
- util$39._configure = function() {
17039
- var Buffer$13 = util$39.Buffer;
17038
+ util$33._configure = function() {
17039
+ var Buffer$13 = util$33.Buffer;
17040
17040
  if (!Buffer$13) {
17041
- util$39._Buffer_from = util$39._Buffer_allocUnsafe = null;
17041
+ util$33._Buffer_from = util$33._Buffer_allocUnsafe = null;
17042
17042
  return;
17043
17043
  }
17044
- util$39._Buffer_from = Buffer$13.from !== Uint8Array.from && Buffer$13.from || function Buffer_from(value$1, encoding) {
17044
+ util$33._Buffer_from = Buffer$13.from !== Uint8Array.from && Buffer$13.from || function Buffer_from(value$1, encoding) {
17045
17045
  return new Buffer$13(value$1, encoding);
17046
17046
  };
17047
- util$39._Buffer_allocUnsafe = Buffer$13.allocUnsafe || function Buffer_allocUnsafe(size) {
17047
+ util$33._Buffer_allocUnsafe = Buffer$13.allocUnsafe || function Buffer_allocUnsafe(size) {
17048
17048
  return new Buffer$13(size);
17049
17049
  };
17050
17050
  };
17051
17051
  });
17052
17052
  var require_writer = __commonJSMin((exports, module) => {
17053
17053
  module.exports = Writer$2;
17054
- var util$38 = require_minimal();
17054
+ var util$32 = require_minimal();
17055
17055
  var BufferWriter$1;
17056
- var LongBits$1 = util$38.LongBits, base64 = util$38.base64, utf8$1 = util$38.utf8;
17056
+ var LongBits$1 = util$32.LongBits, base64 = util$32.base64, utf8$1 = util$32.utf8;
17057
17057
  function Op(fn, len, val) {
17058
17058
  this.fn = fn;
17059
17059
  this.len = len;
@@ -17074,7 +17074,7 @@ var require_writer = __commonJSMin((exports, module) => {
17074
17074
  this.states = null;
17075
17075
  }
17076
17076
  var create$2 = function create$3() {
17077
- return util$38.Buffer ? function create_buffer_setup() {
17077
+ return util$32.Buffer ? function create_buffer_setup() {
17078
17078
  return (Writer$2.create = function create_buffer() {
17079
17079
  return new BufferWriter$1();
17080
17080
  })();
@@ -17084,9 +17084,9 @@ var require_writer = __commonJSMin((exports, module) => {
17084
17084
  };
17085
17085
  Writer$2.create = create$2();
17086
17086
  Writer$2.alloc = function alloc(size) {
17087
- return new util$38.Array(size);
17087
+ return new util$32.Array(size);
17088
17088
  };
17089
- if (util$38.Array !== Array) Writer$2.alloc = util$38.pool(Writer$2.alloc, util$38.Array.prototype.subarray);
17089
+ if (util$32.Array !== Array) Writer$2.alloc = util$32.pool(Writer$2.alloc, util$32.Array.prototype.subarray);
17090
17090
  Writer$2.prototype._push = function push$3(fn, len, val) {
17091
17091
  this.tail = this.tail.next = new Op(fn, len, val);
17092
17092
  this.len += len;
@@ -17159,12 +17159,12 @@ var require_writer = __commonJSMin((exports, module) => {
17159
17159
  };
17160
17160
  Writer$2.prototype.sfixed64 = Writer$2.prototype.fixed64;
17161
17161
  Writer$2.prototype.float = function write_float(value$1) {
17162
- return this._push(util$38.float.writeFloatLE, 4, value$1);
17162
+ return this._push(util$32.float.writeFloatLE, 4, value$1);
17163
17163
  };
17164
17164
  Writer$2.prototype.double = function write_double(value$1) {
17165
- return this._push(util$38.float.writeDoubleLE, 8, value$1);
17165
+ return this._push(util$32.float.writeDoubleLE, 8, value$1);
17166
17166
  };
17167
- var writeBytes = util$38.Array.prototype.set ? function writeBytes_set(val, buf, pos) {
17167
+ var writeBytes = util$32.Array.prototype.set ? function writeBytes_set(val, buf, pos) {
17168
17168
  buf.set(val, pos);
17169
17169
  } : function writeBytes_for(val, buf, pos) {
17170
17170
  for (var i$4 = 0; i$4 < val.length; ++i$4) buf[pos + i$4] = val[i$4];
@@ -17172,7 +17172,7 @@ var require_writer = __commonJSMin((exports, module) => {
17172
17172
  Writer$2.prototype.bytes = function write_bytes(value$1) {
17173
17173
  var len = value$1.length >>> 0;
17174
17174
  if (!len) return this._push(writeByte, 1, 0);
17175
- if (util$38.isString(value$1)) {
17175
+ if (util$32.isString(value$1)) {
17176
17176
  var buf = Writer$2.alloc(len = base64.length(value$1));
17177
17177
  base64.decode(value$1, buf, 0);
17178
17178
  value$1 = buf;
@@ -17230,13 +17230,13 @@ var require_writer_buffer = __commonJSMin((exports, module) => {
17230
17230
  module.exports = BufferWriter;
17231
17231
  var Writer$1 = require_writer();
17232
17232
  (BufferWriter.prototype = Object.create(Writer$1.prototype)).constructor = BufferWriter;
17233
- var util$37 = require_minimal();
17233
+ var util$31 = require_minimal();
17234
17234
  function BufferWriter() {
17235
17235
  Writer$1.call(this);
17236
17236
  }
17237
17237
  BufferWriter._configure = function() {
17238
- BufferWriter.alloc = util$37._Buffer_allocUnsafe;
17239
- BufferWriter.writeBytesBuffer = util$37.Buffer && util$37.Buffer.prototype instanceof Uint8Array && util$37.Buffer.prototype.set.name === "set" ? function writeBytesBuffer_set(val, buf, pos) {
17238
+ BufferWriter.alloc = util$31._Buffer_allocUnsafe;
17239
+ BufferWriter.writeBytesBuffer = util$31.Buffer && util$31.Buffer.prototype instanceof Uint8Array && util$31.Buffer.prototype.set.name === "set" ? function writeBytesBuffer_set(val, buf, pos) {
17240
17240
  buf.set(val, pos);
17241
17241
  } : function writeBytesBuffer_copy(val, buf, pos) {
17242
17242
  if (val.copy) val.copy(buf, pos, 0, val.length);
@@ -17244,19 +17244,19 @@ var require_writer_buffer = __commonJSMin((exports, module) => {
17244
17244
  };
17245
17245
  };
17246
17246
  BufferWriter.prototype.bytes = function write_bytes_buffer(value$1) {
17247
- if (util$37.isString(value$1)) value$1 = util$37._Buffer_from(value$1, "base64");
17247
+ if (util$31.isString(value$1)) value$1 = util$31._Buffer_from(value$1, "base64");
17248
17248
  var len = value$1.length >>> 0;
17249
17249
  this.uint32(len);
17250
17250
  if (len) this._push(BufferWriter.writeBytesBuffer, len, value$1);
17251
17251
  return this;
17252
17252
  };
17253
17253
  function writeStringBuffer(val, buf, pos) {
17254
- if (val.length < 40) util$37.utf8.write(val, buf, pos);
17254
+ if (val.length < 40) util$31.utf8.write(val, buf, pos);
17255
17255
  else if (buf.utf8Write) buf.utf8Write(val, pos);
17256
17256
  else buf.write(val, pos);
17257
17257
  }
17258
17258
  BufferWriter.prototype.string = function write_string_buffer(value$1) {
17259
- var len = util$37.Buffer.byteLength(value$1);
17259
+ var len = util$31.Buffer.byteLength(value$1);
17260
17260
  this.uint32(len);
17261
17261
  if (len) this._push(writeStringBuffer, len, value$1);
17262
17262
  return this;
@@ -17265,9 +17265,9 @@ var require_writer_buffer = __commonJSMin((exports, module) => {
17265
17265
  });
17266
17266
  var require_reader = __commonJSMin((exports, module) => {
17267
17267
  module.exports = Reader$2;
17268
- var util$36 = require_minimal();
17268
+ var util$30 = require_minimal();
17269
17269
  var BufferReader$1;
17270
- var LongBits = util$36.LongBits, utf8 = util$36.utf8;
17270
+ var LongBits = util$30.LongBits, utf8 = util$30.utf8;
17271
17271
  function indexOutOfRange(reader, writeLength) {
17272
17272
  return RangeError("index out of range: " + reader.pos + " + " + (writeLength || 1) + " > " + reader.len);
17273
17273
  }
@@ -17284,14 +17284,14 @@ var require_reader = __commonJSMin((exports, module) => {
17284
17284
  throw Error("illegal buffer");
17285
17285
  };
17286
17286
  var create$1 = function create$3() {
17287
- return util$36.Buffer ? function create_buffer_setup(buffer$2) {
17287
+ return util$30.Buffer ? function create_buffer_setup(buffer$2) {
17288
17288
  return (Reader$2.create = function create_buffer(buffer$3) {
17289
- return util$36.Buffer.isBuffer(buffer$3) ? new BufferReader$1(buffer$3) : create_array(buffer$3);
17289
+ return util$30.Buffer.isBuffer(buffer$3) ? new BufferReader$1(buffer$3) : create_array(buffer$3);
17290
17290
  })(buffer$2);
17291
17291
  } : create_array;
17292
17292
  };
17293
17293
  Reader$2.create = create$1();
17294
- Reader$2.prototype._slice = util$36.Array.prototype.subarray || util$36.Array.prototype.slice;
17294
+ Reader$2.prototype._slice = util$30.Array.prototype.subarray || util$30.Array.prototype.slice;
17295
17295
  Reader$2.prototype.uint32 = function read_uint32_setup() {
17296
17296
  var value$1 = 4294967295;
17297
17297
  return function read_uint32() {
@@ -17371,13 +17371,13 @@ var require_reader = __commonJSMin((exports, module) => {
17371
17371
  }
17372
17372
  Reader$2.prototype.float = function read_float() {
17373
17373
  if (this.pos + 4 > this.len) throw indexOutOfRange(this, 4);
17374
- var value$1 = util$36.float.readFloatLE(this.buf, this.pos);
17374
+ var value$1 = util$30.float.readFloatLE(this.buf, this.pos);
17375
17375
  this.pos += 4;
17376
17376
  return value$1;
17377
17377
  };
17378
17378
  Reader$2.prototype.double = function read_double() {
17379
17379
  if (this.pos + 8 > this.len) throw indexOutOfRange(this, 4);
17380
- var value$1 = util$36.float.readDoubleLE(this.buf, this.pos);
17380
+ var value$1 = util$30.float.readDoubleLE(this.buf, this.pos);
17381
17381
  this.pos += 8;
17382
17382
  return value$1;
17383
17383
  };
@@ -17387,7 +17387,7 @@ var require_reader = __commonJSMin((exports, module) => {
17387
17387
  this.pos += length;
17388
17388
  if (Array.isArray(this.buf)) return this.buf.slice(start$2, end$1);
17389
17389
  if (start$2 === end$1) {
17390
- var nativeBuffer = util$36.Buffer;
17390
+ var nativeBuffer = util$30.Buffer;
17391
17391
  return nativeBuffer ? nativeBuffer.alloc(0) : new this.buf.constructor(0);
17392
17392
  }
17393
17393
  return this._slice.call(this.buf, start$2, end$1);
@@ -17430,8 +17430,8 @@ var require_reader = __commonJSMin((exports, module) => {
17430
17430
  BufferReader$1 = BufferReader_;
17431
17431
  Reader$2.create = create$1();
17432
17432
  BufferReader$1._configure();
17433
- var fn = util$36.Long ? "toLong" : "toNumber";
17434
- util$36.merge(Reader$2.prototype, {
17433
+ var fn = util$30.Long ? "toLong" : "toNumber";
17434
+ util$30.merge(Reader$2.prototype, {
17435
17435
  int64: function read_int64() {
17436
17436
  return readLongVarint.call(this)[fn](false);
17437
17437
  },
@@ -17454,12 +17454,12 @@ var require_reader_buffer = __commonJSMin((exports, module) => {
17454
17454
  module.exports = BufferReader;
17455
17455
  var Reader$1 = require_reader();
17456
17456
  (BufferReader.prototype = Object.create(Reader$1.prototype)).constructor = BufferReader;
17457
- var util$35 = require_minimal();
17457
+ var util$29 = require_minimal();
17458
17458
  function BufferReader(buffer$2) {
17459
17459
  Reader$1.call(this, buffer$2);
17460
17460
  }
17461
17461
  BufferReader._configure = function() {
17462
- if (util$35.Buffer) BufferReader.prototype._slice = util$35.Buffer.prototype.slice;
17462
+ if (util$29.Buffer) BufferReader.prototype._slice = util$29.Buffer.prototype.slice;
17463
17463
  };
17464
17464
  BufferReader.prototype.string = function read_string_buffer() {
17465
17465
  var len = this.uint32();
@@ -17469,11 +17469,11 @@ var require_reader_buffer = __commonJSMin((exports, module) => {
17469
17469
  });
17470
17470
  var require_service$1 = __commonJSMin((exports, module) => {
17471
17471
  module.exports = Service$4;
17472
- var util$34 = require_minimal();
17473
- (Service$4.prototype = Object.create(util$34.EventEmitter.prototype)).constructor = Service$4;
17472
+ var util$28 = require_minimal();
17473
+ (Service$4.prototype = Object.create(util$28.EventEmitter.prototype)).constructor = Service$4;
17474
17474
  function Service$4(rpcImpl, requestDelimited, responseDelimited) {
17475
17475
  if (typeof rpcImpl !== "function") throw TypeError("rpcImpl must be a function");
17476
- util$34.EventEmitter.call(this);
17476
+ util$28.EventEmitter.call(this);
17477
17477
  this.rpcImpl = rpcImpl;
17478
17478
  this.requestDelimited = Boolean(requestDelimited);
17479
17479
  this.responseDelimited = Boolean(responseDelimited);
@@ -17481,7 +17481,7 @@ var require_service$1 = __commonJSMin((exports, module) => {
17481
17481
  Service$4.prototype.rpcCall = function rpcCall(method$1, requestCtor, responseCtor, request, callback) {
17482
17482
  if (!request) throw TypeError("request must be specified");
17483
17483
  var self$2 = this;
17484
- if (!callback) return util$34.asPromise(rpcCall, self$2, method$1, requestCtor, responseCtor, request);
17484
+ if (!callback) return util$28.asPromise(rpcCall, self$2, method$1, requestCtor, responseCtor, request);
17485
17485
  if (!self$2.rpcImpl) {
17486
17486
  setTimeout(function() {
17487
17487
  callback(Error("already ended"));
@@ -17664,7 +17664,7 @@ var require_namespace = __commonJSMin((exports, module) => {
17664
17664
  module.exports = Namespace$4;
17665
17665
  var ReflectionObject$6 = require_object();
17666
17666
  ((Namespace$4.prototype = Object.create(ReflectionObject$6.prototype)).constructor = Namespace$4).className = "Namespace";
17667
- var Field$6 = require_field(), util$33 = require_util(), OneOf$5 = require_oneof();
17667
+ var Field$6 = require_field(), util$27 = require_util(), OneOf$5 = require_oneof();
17668
17668
  var Type$5, Service$3, Enum$10;
17669
17669
  Namespace$4.fromJSON = function fromJSON(name$2, json$3) {
17670
17670
  return new Namespace$4(name$2, json$3.options).addJSON(json$3.nested);
@@ -17704,10 +17704,10 @@ var require_namespace = __commonJSMin((exports, module) => {
17704
17704
  return namespace;
17705
17705
  }
17706
17706
  Object.defineProperty(Namespace$4.prototype, "nestedArray", { get: function() {
17707
- return this._nestedArray || (this._nestedArray = util$33.toArray(this.nested));
17707
+ return this._nestedArray || (this._nestedArray = util$27.toArray(this.nested));
17708
17708
  } });
17709
17709
  Namespace$4.prototype.toJSON = function toJSON(toJSONOptions) {
17710
- return util$33.toObject([
17710
+ return util$27.toObject([
17711
17711
  "options",
17712
17712
  this.options,
17713
17713
  "nested",
@@ -17765,7 +17765,7 @@ var require_namespace = __commonJSMin((exports, module) => {
17765
17765
  return clearCache$3(this);
17766
17766
  };
17767
17767
  Namespace$4.prototype.define = function define$1(path$8, json$3) {
17768
- if (util$33.isString(path$8)) path$8 = path$8.split(".");
17768
+ if (util$27.isString(path$8)) path$8 = path$8.split(".");
17769
17769
  else if (!Array.isArray(path$8)) throw TypeError("illegal path");
17770
17770
  if (path$8 && path$8.length && path$8[0] === "") throw Error("path must be relative");
17771
17771
  var ptr = this;
@@ -17804,7 +17804,7 @@ var require_namespace = __commonJSMin((exports, module) => {
17804
17804
  parentAlreadyChecked = filterTypes;
17805
17805
  filterTypes = void 0;
17806
17806
  } else if (filterTypes && !Array.isArray(filterTypes)) filterTypes = [filterTypes];
17807
- if (util$33.isString(path$8) && path$8.length) {
17807
+ if (util$27.isString(path$8) && path$8.length) {
17808
17808
  if (path$8 === ".") return this.root;
17809
17809
  path$8 = path$8.split(".");
17810
17810
  } else if (!path$8.length) return this;
@@ -17867,10 +17867,10 @@ var require_mapfield = __commonJSMin((exports, module) => {
17867
17867
  module.exports = MapField$2;
17868
17868
  var Field$5 = require_field();
17869
17869
  ((MapField$2.prototype = Object.create(Field$5.prototype)).constructor = MapField$2).className = "MapField";
17870
- var types$5 = require_types(), util$32 = require_util();
17870
+ var types$5 = require_types(), util$26 = require_util();
17871
17871
  function MapField$2(name$2, id$2, keyType, type$1, options$1, comment) {
17872
17872
  Field$5.call(this, name$2, id$2, type$1, void 0, void 0, options$1, comment);
17873
- if (!util$32.isString(keyType)) throw TypeError("keyType must be a string");
17873
+ if (!util$26.isString(keyType)) throw TypeError("keyType must be a string");
17874
17874
  this.keyType = keyType;
17875
17875
  this.resolvedKeyType = null;
17876
17876
  this.map = true;
@@ -17880,7 +17880,7 @@ var require_mapfield = __commonJSMin((exports, module) => {
17880
17880
  };
17881
17881
  MapField$2.prototype.toJSON = function toJSON(toJSONOptions) {
17882
17882
  var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;
17883
- return util$32.toObject([
17883
+ return util$26.toObject([
17884
17884
  "keyType",
17885
17885
  this.keyType,
17886
17886
  "type",
@@ -17901,10 +17901,10 @@ var require_mapfield = __commonJSMin((exports, module) => {
17901
17901
  return Field$5.prototype.resolve.call(this);
17902
17902
  };
17903
17903
  MapField$2.d = function decorateMapField(fieldId, fieldKeyType, fieldValueType) {
17904
- if (typeof fieldValueType === "function") fieldValueType = util$32.decorateType(fieldValueType).name;
17905
- else if (fieldValueType && typeof fieldValueType === "object") fieldValueType = util$32.decorateEnum(fieldValueType).name;
17904
+ if (typeof fieldValueType === "function") fieldValueType = util$26.decorateType(fieldValueType).name;
17905
+ else if (fieldValueType && typeof fieldValueType === "object") fieldValueType = util$26.decorateEnum(fieldValueType).name;
17906
17906
  return function mapFieldDecorator(prototype$2, fieldName) {
17907
- util$32.decorateType(prototype$2.constructor).add(new MapField$2(fieldName, fieldId, fieldKeyType, fieldValueType));
17907
+ util$26.decorateType(prototype$2.constructor).add(new MapField$2(fieldName, fieldId, fieldKeyType, fieldValueType));
17908
17908
  };
17909
17909
  };
17910
17910
  });
@@ -17912,18 +17912,18 @@ var require_method = __commonJSMin((exports, module) => {
17912
17912
  module.exports = Method$2;
17913
17913
  var ReflectionObject$5 = require_object();
17914
17914
  ((Method$2.prototype = Object.create(ReflectionObject$5.prototype)).constructor = Method$2).className = "Method";
17915
- var util$31 = require_util();
17915
+ var util$25 = require_util();
17916
17916
  function Method$2(name$2, type$1, requestType, responseType, requestStream, responseStream, options$1, comment, parsedOptions) {
17917
- if (util$31.isObject(requestStream)) {
17917
+ if (util$25.isObject(requestStream)) {
17918
17918
  options$1 = requestStream;
17919
17919
  requestStream = responseStream = void 0;
17920
- } else if (util$31.isObject(responseStream)) {
17920
+ } else if (util$25.isObject(responseStream)) {
17921
17921
  options$1 = responseStream;
17922
17922
  responseStream = void 0;
17923
17923
  }
17924
- if (!(type$1 === void 0 || util$31.isString(type$1))) throw TypeError("type must be a string");
17925
- if (!util$31.isString(requestType)) throw TypeError("requestType must be a string");
17926
- if (!util$31.isString(responseType)) throw TypeError("responseType must be a string");
17924
+ if (!(type$1 === void 0 || util$25.isString(type$1))) throw TypeError("type must be a string");
17925
+ if (!util$25.isString(requestType)) throw TypeError("requestType must be a string");
17926
+ if (!util$25.isString(responseType)) throw TypeError("responseType must be a string");
17927
17927
  ReflectionObject$5.call(this, name$2, options$1);
17928
17928
  this.type = type$1 || "rpc";
17929
17929
  this.requestType = requestType;
@@ -17940,7 +17940,7 @@ var require_method = __commonJSMin((exports, module) => {
17940
17940
  };
17941
17941
  Method$2.prototype.toJSON = function toJSON(toJSONOptions) {
17942
17942
  var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;
17943
- return util$31.toObject([
17943
+ return util$25.toObject([
17944
17944
  "type",
17945
17945
  this.type !== "rpc" && this.type || void 0,
17946
17946
  "requestType",
@@ -17970,7 +17970,7 @@ var require_service = __commonJSMin((exports, module) => {
17970
17970
  module.exports = Service$2;
17971
17971
  var Namespace$3 = require_namespace();
17972
17972
  ((Service$2.prototype = Object.create(Namespace$3.prototype)).constructor = Service$2).className = "Service";
17973
- var Method$1 = require_method(), util$30 = require_util(), rpc = require_rpc();
17973
+ var Method$1 = require_method(), util$24 = require_util(), rpc = require_rpc();
17974
17974
  function Service$2(name$2, options$1) {
17975
17975
  Namespace$3.call(this, name$2, options$1);
17976
17976
  this.methods = {};
@@ -17988,7 +17988,7 @@ var require_service = __commonJSMin((exports, module) => {
17988
17988
  Service$2.prototype.toJSON = function toJSON(toJSONOptions) {
17989
17989
  var inherited = Namespace$3.prototype.toJSON.call(this, toJSONOptions);
17990
17990
  var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;
17991
- return util$30.toObject([
17991
+ return util$24.toObject([
17992
17992
  "edition",
17993
17993
  this._editionToJSON(),
17994
17994
  "options",
@@ -18002,7 +18002,7 @@ var require_service = __commonJSMin((exports, module) => {
18002
18002
  ]);
18003
18003
  };
18004
18004
  Object.defineProperty(Service$2.prototype, "methodsArray", { get: function() {
18005
- return this._methodsArray || (this._methodsArray = util$30.toArray(this.methods));
18005
+ return this._methodsArray || (this._methodsArray = util$24.toArray(this.methods));
18006
18006
  } });
18007
18007
  function clearCache$2(service) {
18008
18008
  service._methodsArray = null;
@@ -18048,8 +18048,8 @@ var require_service = __commonJSMin((exports, module) => {
18048
18048
  Service$2.prototype.create = function create$3(rpcImpl, requestDelimited, responseDelimited) {
18049
18049
  var rpcService = new rpc.Service(rpcImpl, requestDelimited, responseDelimited);
18050
18050
  for (var i$4 = 0, method$1; i$4 < this.methodsArray.length; ++i$4) {
18051
- var methodName = util$30.lcFirst((method$1 = this._methodsArray[i$4]).resolve().name).replace(/[^$\w_]/g, "");
18052
- rpcService[methodName] = util$30.codegen(["r", "c"], util$30.isReserved(methodName) ? methodName + "_" : methodName)("return this.rpcCall(m,q,s,r,c)")({
18051
+ var methodName = util$24.lcFirst((method$1 = this._methodsArray[i$4]).resolve().name).replace(/[^$\w_]/g, "");
18052
+ rpcService[methodName] = util$24.codegen(["r", "c"], util$24.isReserved(methodName) ? methodName + "_" : methodName)("return this.rpcCall(m,q,s,r,c)")({
18053
18053
  m: method$1,
18054
18054
  q: method$1.resolvedRequestType.ctor,
18055
18055
  s: method$1.resolvedResponseType.ctor
@@ -18060,7 +18060,7 @@ var require_service = __commonJSMin((exports, module) => {
18060
18060
  });
18061
18061
  var require_message = __commonJSMin((exports, module) => {
18062
18062
  module.exports = Message$2;
18063
- var util$29 = require_minimal();
18063
+ var util$23 = require_minimal();
18064
18064
  function Message$2(properties) {
18065
18065
  if (properties) for (var keys$1 = Object.keys(properties), i$4 = 0; i$4 < keys$1.length; ++i$4) this[keys$1[i$4]] = properties[keys$1[i$4]];
18066
18066
  }
@@ -18089,17 +18089,17 @@ var require_message = __commonJSMin((exports, module) => {
18089
18089
  return this.$type.toObject(message$1, options$1);
18090
18090
  };
18091
18091
  Message$2.prototype.toJSON = function toJSON() {
18092
- return this.$type.toObject(this, util$29.toJSONOptions);
18092
+ return this.$type.toObject(this, util$23.toJSONOptions);
18093
18093
  };
18094
18094
  });
18095
18095
  var require_decoder$1 = __commonJSMin((exports, module) => {
18096
18096
  module.exports = decoder$1;
18097
- var Enum$9 = require_enum(), types$4 = require_types(), util$28 = require_util();
18097
+ var Enum$9 = require_enum(), types$4 = require_types(), util$22 = require_util();
18098
18098
  function missing(field) {
18099
18099
  return "missing required '" + field.name + "'";
18100
18100
  }
18101
18101
  function decoder$1(mtype) {
18102
- var gen = util$28.codegen([
18102
+ var gen = util$22.codegen([
18103
18103
  "r",
18104
18104
  "l",
18105
18105
  "e"
@@ -18108,7 +18108,7 @@ var require_decoder$1 = __commonJSMin((exports, module) => {
18108
18108
  }).length ? ",k,value" : ""))("while(r.pos<c){")("var t=r.uint32()")("if(t===e)")("break")("switch(t>>>3){");
18109
18109
  var i$4 = 0;
18110
18110
  for (; i$4 < mtype.fieldsArray.length; ++i$4) {
18111
- var field = mtype._fieldsArray[i$4].resolve(), type$1 = field.resolvedType instanceof Enum$9 ? "int32" : field.type, ref = "m" + util$28.safeProp(field.name);
18111
+ var field = mtype._fieldsArray[i$4].resolve(), type$1 = field.resolvedType instanceof Enum$9 ? "int32" : field.type, ref = "m" + util$22.safeProp(field.name);
18112
18112
  gen("case %i: {", field.id);
18113
18113
  if (field.map) {
18114
18114
  gen("if(%s===util.emptyObject)", ref)("%s={}", ref)("var c2 = r.uint32()+r.pos");
@@ -18141,7 +18141,7 @@ var require_decoder$1 = __commonJSMin((exports, module) => {
18141
18141
  });
18142
18142
  var require_verifier = __commonJSMin((exports, module) => {
18143
18143
  module.exports = verifier$1;
18144
- var Enum$8 = require_enum(), util$27 = require_util();
18144
+ var Enum$8 = require_enum(), util$21 = require_util();
18145
18145
  function invalid(field, expected) {
18146
18146
  return field.name + ": " + expected + (field.repeated && expected !== "array" ? "[]" : field.map && expected !== "object" ? "{k:" + field.keyType + "}" : "") + " expected";
18147
18147
  }
@@ -18205,11 +18205,11 @@ var require_verifier = __commonJSMin((exports, module) => {
18205
18205
  return gen;
18206
18206
  }
18207
18207
  function verifier$1(mtype) {
18208
- var gen = util$27.codegen(["m"], mtype.name + "$verify")("if(typeof m!==\"object\"||m===null)")("return%j", "object expected");
18208
+ var gen = util$21.codegen(["m"], mtype.name + "$verify")("if(typeof m!==\"object\"||m===null)")("return%j", "object expected");
18209
18209
  var oneofs = mtype.oneofsArray, seenFirstField = {};
18210
18210
  if (oneofs.length) gen("var p={}");
18211
18211
  for (var i$4 = 0; i$4 < mtype.fieldsArray.length; ++i$4) {
18212
- var field = mtype._fieldsArray[i$4].resolve(), ref = "m" + util$27.safeProp(field.name);
18212
+ var field = mtype._fieldsArray[i$4].resolve(), ref = "m" + util$21.safeProp(field.name);
18213
18213
  if (field.optional) gen("if(%s!=null&&m.hasOwnProperty(%j)){", ref, field.name);
18214
18214
  if (field.map) {
18215
18215
  gen("if(!util.isObject(%s))", ref)("return%j", invalid(field, "object"))("var k=Object.keys(%s)", ref)("for(var i=0;i<k.length;++i){");
@@ -18220,7 +18220,7 @@ var require_verifier = __commonJSMin((exports, module) => {
18220
18220
  genVerifyValue(gen, field, i$4, ref + "[i]")("}");
18221
18221
  } else {
18222
18222
  if (field.partOf) {
18223
- var oneofProp = util$27.safeProp(field.partOf.name);
18223
+ var oneofProp = util$21.safeProp(field.partOf.name);
18224
18224
  if (seenFirstField[field.partOf.name] === 1) gen("if(p%s===1)", oneofProp)("return%j", field.partOf.name + ": multiple values");
18225
18225
  seenFirstField[field.partOf.name] = 1;
18226
18226
  gen("p%s=1", oneofProp);
@@ -18234,7 +18234,7 @@ var require_verifier = __commonJSMin((exports, module) => {
18234
18234
  });
18235
18235
  var require_converter = __commonJSMin((exports) => {
18236
18236
  var converter$1 = exports;
18237
- var Enum$7 = require_enum(), util$26 = require_util();
18237
+ var Enum$7 = require_enum(), util$20 = require_util();
18238
18238
  function genValuePartial_fromObject(gen, field, fieldIndex, prop) {
18239
18239
  var defaultAlreadyEmitted = false;
18240
18240
  if (field.resolvedType) if (field.resolvedType instanceof Enum$7) {
@@ -18287,11 +18287,11 @@ var require_converter = __commonJSMin((exports) => {
18287
18287
  }
18288
18288
  converter$1.fromObject = function fromObject(mtype) {
18289
18289
  var fields = mtype.fieldsArray;
18290
- var gen = util$26.codegen(["d"], mtype.name + "$fromObject")("if(d instanceof this.ctor)")("return d");
18290
+ var gen = util$20.codegen(["d"], mtype.name + "$fromObject")("if(d instanceof this.ctor)")("return d");
18291
18291
  if (!fields.length) return gen("return new this.ctor");
18292
18292
  gen("var m=new this.ctor");
18293
18293
  for (var i$4 = 0; i$4 < fields.length; ++i$4) {
18294
- var field = fields[i$4].resolve(), prop = util$26.safeProp(field.name);
18294
+ var field = fields[i$4].resolve(), prop = util$20.safeProp(field.name);
18295
18295
  if (field.map) {
18296
18296
  gen("if(d%s){", prop)("if(typeof d%s!==\"object\")", prop)("throw TypeError(%j)", field.fullName + ": object expected")("m%s={}", prop)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){", prop);
18297
18297
  genValuePartial_fromObject(gen, field, i$4, prop + "[ks[i]]")("}")("}");
@@ -18334,25 +18334,25 @@ var require_converter = __commonJSMin((exports) => {
18334
18334
  return gen;
18335
18335
  }
18336
18336
  converter$1.toObject = function toObject$1(mtype) {
18337
- var fields = mtype.fieldsArray.slice().sort(util$26.compareFieldsById);
18338
- if (!fields.length) return util$26.codegen()("return {}");
18339
- var gen = util$26.codegen(["m", "o"], mtype.name + "$toObject")("if(!o)")("o={}")("var d={}");
18337
+ var fields = mtype.fieldsArray.slice().sort(util$20.compareFieldsById);
18338
+ if (!fields.length) return util$20.codegen()("return {}");
18339
+ var gen = util$20.codegen(["m", "o"], mtype.name + "$toObject")("if(!o)")("o={}")("var d={}");
18340
18340
  var repeatedFields = [], mapFields = [], normalFields = [], i$4 = 0;
18341
18341
  for (; i$4 < fields.length; ++i$4) if (!fields[i$4].partOf) (fields[i$4].resolve().repeated ? repeatedFields : fields[i$4].map ? mapFields : normalFields).push(fields[i$4]);
18342
18342
  if (repeatedFields.length) {
18343
18343
  gen("if(o.arrays||o.defaults){");
18344
- for (i$4 = 0; i$4 < repeatedFields.length; ++i$4) gen("d%s=[]", util$26.safeProp(repeatedFields[i$4].name));
18344
+ for (i$4 = 0; i$4 < repeatedFields.length; ++i$4) gen("d%s=[]", util$20.safeProp(repeatedFields[i$4].name));
18345
18345
  gen("}");
18346
18346
  }
18347
18347
  if (mapFields.length) {
18348
18348
  gen("if(o.objects||o.defaults){");
18349
- for (i$4 = 0; i$4 < mapFields.length; ++i$4) gen("d%s={}", util$26.safeProp(mapFields[i$4].name));
18349
+ for (i$4 = 0; i$4 < mapFields.length; ++i$4) gen("d%s={}", util$20.safeProp(mapFields[i$4].name));
18350
18350
  gen("}");
18351
18351
  }
18352
18352
  if (normalFields.length) {
18353
18353
  gen("if(o.defaults){");
18354
18354
  for (i$4 = 0; i$4 < normalFields.length; ++i$4) {
18355
- var field = normalFields[i$4], prop = util$26.safeProp(field.name);
18355
+ var field = normalFields[i$4], prop = util$20.safeProp(field.name);
18356
18356
  if (field.resolvedType instanceof Enum$7) gen("d%s=o.enums===String?%j:%j", prop, field.resolvedType.valuesById[field.typeDefault], field.typeDefault);
18357
18357
  else if (field.long) gen("if(util.Long){")("var n=new util.Long(%i,%i,%j)", field.typeDefault.low, field.typeDefault.high, field.typeDefault.unsigned)("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n", prop)("}else")("d%s=o.longs===String?%j:%i", prop, field.typeDefault.toString(), field.typeDefault.toNumber());
18358
18358
  else if (field.bytes) {
@@ -18364,7 +18364,7 @@ var require_converter = __commonJSMin((exports) => {
18364
18364
  }
18365
18365
  var hasKs2 = false;
18366
18366
  for (i$4 = 0; i$4 < fields.length; ++i$4) {
18367
- var field = fields[i$4], index$2 = mtype._fieldsArray.indexOf(field), prop = util$26.safeProp(field.name);
18367
+ var field = fields[i$4], index$2 = mtype._fieldsArray.indexOf(field), prop = util$20.safeProp(field.name);
18368
18368
  if (field.map) {
18369
18369
  if (!hasKs2) {
18370
18370
  hasKs2 = true;
@@ -18378,7 +18378,7 @@ var require_converter = __commonJSMin((exports) => {
18378
18378
  } else {
18379
18379
  gen("if(m%s!=null&&m.hasOwnProperty(%j)){", prop, field.name);
18380
18380
  genValuePartial_toObject(gen, field, index$2, prop);
18381
- if (field.partOf) gen("if(o.oneofs)")("d%s=%j", util$26.safeProp(field.partOf.name), field.name);
18381
+ if (field.partOf) gen("if(o.oneofs)")("d%s=%j", util$20.safeProp(field.partOf.name), field.name);
18382
18382
  }
18383
18383
  gen("}");
18384
18384
  }
@@ -18430,7 +18430,7 @@ var require_type$1 = __commonJSMin((exports, module) => {
18430
18430
  module.exports = Type$4;
18431
18431
  var Namespace$2 = require_namespace();
18432
18432
  ((Type$4.prototype = Object.create(Namespace$2.prototype)).constructor = Type$4).className = "Type";
18433
- var Enum$6 = require_enum(), OneOf$4 = require_oneof(), Field$4 = require_field(), MapField$1 = require_mapfield(), Service$1 = require_service(), Message = require_message(), Reader = require_reader(), Writer = require_writer(), util$25 = require_util(), encoder$1 = require_encoder$1(), decoder = require_decoder$1(), verifier = require_verifier(), converter = require_converter(), wrappers = require_wrappers();
18433
+ var Enum$6 = require_enum(), OneOf$4 = require_oneof(), Field$4 = require_field(), MapField$1 = require_mapfield(), Service$1 = require_service(), Message = require_message(), Reader = require_reader(), Writer = require_writer(), util$19 = require_util(), encoder$1 = require_encoder$1(), decoder = require_decoder$1(), verifier = require_verifier(), converter = require_converter(), wrappers = require_wrappers();
18434
18434
  function Type$4(name$2, options$1) {
18435
18435
  Namespace$2.call(this, name$2, options$1);
18436
18436
  this.fields = {};
@@ -18455,10 +18455,10 @@ var require_type$1 = __commonJSMin((exports, module) => {
18455
18455
  return this._fieldsById;
18456
18456
  } },
18457
18457
  fieldsArray: { get: function() {
18458
- return this._fieldsArray || (this._fieldsArray = util$25.toArray(this.fields));
18458
+ return this._fieldsArray || (this._fieldsArray = util$19.toArray(this.fields));
18459
18459
  } },
18460
18460
  oneofsArray: { get: function() {
18461
- return this._oneofsArray || (this._oneofsArray = util$25.toArray(this.oneofs));
18461
+ return this._oneofsArray || (this._oneofsArray = util$19.toArray(this.oneofs));
18462
18462
  } },
18463
18463
  ctor: {
18464
18464
  get: function() {
@@ -18468,26 +18468,26 @@ var require_type$1 = __commonJSMin((exports, module) => {
18468
18468
  var prototype$2 = ctor.prototype;
18469
18469
  if (!(prototype$2 instanceof Message)) {
18470
18470
  (ctor.prototype = new Message()).constructor = ctor;
18471
- util$25.merge(ctor.prototype, prototype$2);
18471
+ util$19.merge(ctor.prototype, prototype$2);
18472
18472
  }
18473
18473
  ctor.$type = ctor.prototype.$type = this;
18474
- util$25.merge(ctor, Message, true);
18474
+ util$19.merge(ctor, Message, true);
18475
18475
  this._ctor = ctor;
18476
18476
  var i$4 = 0;
18477
18477
  for (; i$4 < this.fieldsArray.length; ++i$4) this._fieldsArray[i$4].resolve();
18478
18478
  var ctorProperties = {};
18479
18479
  for (i$4 = 0; i$4 < this.oneofsArray.length; ++i$4) ctorProperties[this._oneofsArray[i$4].resolve().name] = {
18480
- get: util$25.oneOfGetter(this._oneofsArray[i$4].oneof),
18481
- set: util$25.oneOfSetter(this._oneofsArray[i$4].oneof)
18480
+ get: util$19.oneOfGetter(this._oneofsArray[i$4].oneof),
18481
+ set: util$19.oneOfSetter(this._oneofsArray[i$4].oneof)
18482
18482
  };
18483
18483
  if (i$4) Object.defineProperties(ctor.prototype, ctorProperties);
18484
18484
  }
18485
18485
  }
18486
18486
  });
18487
18487
  Type$4.generateConstructor = function generateConstructor(mtype) {
18488
- var gen = util$25.codegen(["p"], mtype.name);
18489
- for (var i$4 = 0, field; i$4 < mtype.fieldsArray.length; ++i$4) if ((field = mtype._fieldsArray[i$4]).map) gen("this%s={}", util$25.safeProp(field.name));
18490
- else if (field.repeated) gen("this%s=[]", util$25.safeProp(field.name));
18488
+ var gen = util$19.codegen(["p"], mtype.name);
18489
+ for (var i$4 = 0, field; i$4 < mtype.fieldsArray.length; ++i$4) if ((field = mtype._fieldsArray[i$4]).map) gen("this%s={}", util$19.safeProp(field.name));
18490
+ else if (field.repeated) gen("this%s=[]", util$19.safeProp(field.name));
18491
18491
  return gen("if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)")("this[ks[i]]=p[ks[i]]");
18492
18492
  };
18493
18493
  function clearCache$1(type$1) {
@@ -18519,7 +18519,7 @@ var require_type$1 = __commonJSMin((exports, module) => {
18519
18519
  Type$4.prototype.toJSON = function toJSON(toJSONOptions) {
18520
18520
  var inherited = Namespace$2.prototype.toJSON.call(this, toJSONOptions);
18521
18521
  var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;
18522
- return util$25.toObject([
18522
+ return util$19.toObject([
18523
18523
  "edition",
18524
18524
  this._editionToJSON(),
18525
18525
  "options",
@@ -18619,24 +18619,24 @@ var require_type$1 = __commonJSMin((exports, module) => {
18619
18619
  this.encode = encoder$1(this)({
18620
18620
  Writer,
18621
18621
  types: types$6,
18622
- util: util$25
18622
+ util: util$19
18623
18623
  });
18624
18624
  this.decode = decoder(this)({
18625
18625
  Reader,
18626
18626
  types: types$6,
18627
- util: util$25
18627
+ util: util$19
18628
18628
  });
18629
18629
  this.verify = verifier(this)({
18630
18630
  types: types$6,
18631
- util: util$25
18631
+ util: util$19
18632
18632
  });
18633
18633
  this.fromObject = converter.fromObject(this)({
18634
18634
  types: types$6,
18635
- util: util$25
18635
+ util: util$19
18636
18636
  });
18637
18637
  this.toObject = converter.toObject(this)({
18638
18638
  types: types$6,
18639
- util: util$25
18639
+ util: util$19
18640
18640
  });
18641
18641
  var wrapper = wrappers[fullName];
18642
18642
  if (wrapper) {
@@ -18672,7 +18672,7 @@ var require_type$1 = __commonJSMin((exports, module) => {
18672
18672
  };
18673
18673
  Type$4.d = function decorateType(typeName) {
18674
18674
  return function typeDecorator(target$1) {
18675
- util$25.decorateType(target$1, typeName);
18675
+ util$19.decorateType(target$1, typeName);
18676
18676
  };
18677
18677
  };
18678
18678
  });
@@ -18680,8 +18680,8 @@ var require_root = __commonJSMin((exports, module) => {
18680
18680
  module.exports = Root$2;
18681
18681
  var Namespace$1 = require_namespace();
18682
18682
  ((Root$2.prototype = Object.create(Namespace$1.prototype)).constructor = Root$2).className = "Root";
18683
- var Field$3 = require_field(), Enum$5 = require_enum(), OneOf$3 = require_oneof(), util$24 = require_util();
18684
- var Type$3, parse$24, common$5;
18683
+ var Field$3 = require_field(), Enum$5 = require_enum(), OneOf$3 = require_oneof(), util$18 = require_util();
18684
+ var Type$3, parse$23, common$5;
18685
18685
  function Root$2(options$1) {
18686
18686
  Namespace$1.call(this, "", options$1);
18687
18687
  this.deferred = [];
@@ -18694,8 +18694,8 @@ var require_root = __commonJSMin((exports, module) => {
18694
18694
  if (json$3.options) root$2.setOptions(json$3.options);
18695
18695
  return root$2.addJSON(json$3.nested).resolveAll();
18696
18696
  };
18697
- Root$2.prototype.resolvePath = util$24.path.resolve;
18698
- Root$2.prototype.fetch = util$24.fetch;
18697
+ Root$2.prototype.resolvePath = util$18.path.resolve;
18698
+ Root$2.prototype.fetch = util$18.fetch;
18699
18699
  function SYNC() {}
18700
18700
  Root$2.prototype.load = function load$2(filename, options$1, callback) {
18701
18701
  if (typeof options$1 === "function") {
@@ -18703,7 +18703,7 @@ var require_root = __commonJSMin((exports, module) => {
18703
18703
  options$1 = void 0;
18704
18704
  }
18705
18705
  var self$2 = this;
18706
- if (!callback) return util$24.asPromise(load$2, self$2, filename, options$1);
18706
+ if (!callback) return util$18.asPromise(load$2, self$2, filename, options$1);
18707
18707
  var sync = callback === SYNC;
18708
18708
  function finish(err, root$2) {
18709
18709
  if (!callback) return;
@@ -18723,11 +18723,11 @@ var require_root = __commonJSMin((exports, module) => {
18723
18723
  }
18724
18724
  function process$3(filename$1, source$2) {
18725
18725
  try {
18726
- if (util$24.isString(source$2) && source$2.charAt(0) === "{") source$2 = JSON.parse(source$2);
18727
- if (!util$24.isString(source$2)) self$2.setOptions(source$2.options).addJSON(source$2.nested);
18726
+ if (util$18.isString(source$2) && source$2.charAt(0) === "{") source$2 = JSON.parse(source$2);
18727
+ if (!util$18.isString(source$2)) self$2.setOptions(source$2.options).addJSON(source$2.nested);
18728
18728
  else {
18729
- parse$24.filename = filename$1;
18730
- var parsed = parse$24(source$2, self$2, options$1), resolved$1, i$5 = 0;
18729
+ parse$23.filename = filename$1;
18730
+ var parsed = parse$23(source$2, self$2, options$1), resolved$1, i$5 = 0;
18731
18731
  if (parsed.imports) {
18732
18732
  for (; i$5 < parsed.imports.length; ++i$5) if (resolved$1 = getBundledFileName(parsed.imports[i$5]) || self$2.resolvePath(filename$1, parsed.imports[i$5])) fetch$2(resolved$1);
18733
18733
  }
@@ -18758,7 +18758,7 @@ var require_root = __commonJSMin((exports, module) => {
18758
18758
  if (sync) {
18759
18759
  var source$2;
18760
18760
  try {
18761
- source$2 = util$24.fs.readFileSync(filename$1).toString("utf8");
18761
+ source$2 = util$18.fs.readFileSync(filename$1).toString("utf8");
18762
18762
  } catch (err) {
18763
18763
  if (!weak) finish(err);
18764
18764
  return;
@@ -18779,7 +18779,7 @@ var require_root = __commonJSMin((exports, module) => {
18779
18779
  }
18780
18780
  }
18781
18781
  var queued = 0;
18782
- if (util$24.isString(filename)) filename = [filename];
18782
+ if (util$18.isString(filename)) filename = [filename];
18783
18783
  for (var i$4 = 0, resolved; i$4 < filename.length; ++i$4) if (resolved = self$2.resolvePath("", filename[i$4])) fetch$2(resolved);
18784
18784
  if (sync) {
18785
18785
  self$2.resolveAll();
@@ -18789,7 +18789,7 @@ var require_root = __commonJSMin((exports, module) => {
18789
18789
  return self$2;
18790
18790
  };
18791
18791
  Root$2.prototype.loadSync = function loadSync$1(filename, options$1) {
18792
- if (!util$24.isNode) throw Error("not supported");
18792
+ if (!util$18.isNode) throw Error("not supported");
18793
18793
  return this.load(filename, options$1, SYNC);
18794
18794
  };
18795
18795
  Root$2.prototype.resolveAll = function resolveAll$1() {
@@ -18846,19 +18846,19 @@ var require_root = __commonJSMin((exports, module) => {
18846
18846
  };
18847
18847
  Root$2._configure = function(Type_, parse_, common_) {
18848
18848
  Type$3 = Type_;
18849
- parse$24 = parse_;
18849
+ parse$23 = parse_;
18850
18850
  common$5 = common_;
18851
18851
  };
18852
18852
  });
18853
18853
  var require_util = __commonJSMin((exports, module) => {
18854
- var util$23 = module.exports = require_minimal();
18854
+ var util$17 = module.exports = require_minimal();
18855
18855
  var roots = require_roots();
18856
18856
  var Type$2, Enum$4;
18857
- util$23.codegen = require_codegen();
18858
- util$23.fetch = require_fetch();
18859
- util$23.path = require_path();
18860
- util$23.fs = util$23.inquire("fs");
18861
- util$23.toArray = function toArray$2(object$1) {
18857
+ util$17.codegen = require_codegen();
18858
+ util$17.fetch = require_fetch();
18859
+ util$17.path = require_path();
18860
+ util$17.fs = util$17.inquire("fs");
18861
+ util$17.toArray = function toArray$2(object$1) {
18862
18862
  if (object$1) {
18863
18863
  var keys$1 = Object.keys(object$1), array$1 = new Array(keys$1.length), index$2 = 0;
18864
18864
  while (index$2 < keys$1.length) array$1[index$2] = object$1[keys$1[index$2++]];
@@ -18866,7 +18866,7 @@ var require_util = __commonJSMin((exports, module) => {
18866
18866
  }
18867
18867
  return [];
18868
18868
  };
18869
- util$23.toObject = function toObject$1(array$1) {
18869
+ util$17.toObject = function toObject$1(array$1) {
18870
18870
  var object$1 = {}, index$2 = 0;
18871
18871
  while (index$2 < array$1.length) {
18872
18872
  var key$1 = array$1[index$2++], val = array$1[index$2++];
@@ -18875,37 +18875,37 @@ var require_util = __commonJSMin((exports, module) => {
18875
18875
  return object$1;
18876
18876
  };
18877
18877
  var safePropBackslashRe = /\\/g, safePropQuoteRe = /"/g;
18878
- util$23.isReserved = function isReserved(name$2) {
18878
+ util$17.isReserved = function isReserved(name$2) {
18879
18879
  return /^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/.test(name$2);
18880
18880
  };
18881
- util$23.safeProp = function safeProp(prop) {
18882
- if (!/^[$\w_]+$/.test(prop) || util$23.isReserved(prop)) return "[\"" + prop.replace(safePropBackslashRe, "\\\\").replace(safePropQuoteRe, "\\\"") + "\"]";
18881
+ util$17.safeProp = function safeProp(prop) {
18882
+ if (!/^[$\w_]+$/.test(prop) || util$17.isReserved(prop)) return "[\"" + prop.replace(safePropBackslashRe, "\\\\").replace(safePropQuoteRe, "\\\"") + "\"]";
18883
18883
  return "." + prop;
18884
18884
  };
18885
- util$23.ucFirst = function ucFirst(str) {
18885
+ util$17.ucFirst = function ucFirst(str) {
18886
18886
  return str.charAt(0).toUpperCase() + str.substring(1);
18887
18887
  };
18888
18888
  var camelCaseRe = /_([a-z])/g;
18889
- util$23.camelCase = function camelCase$1(str) {
18889
+ util$17.camelCase = function camelCase$1(str) {
18890
18890
  return str.substring(0, 1) + str.substring(1).replace(camelCaseRe, function($0, $1) {
18891
18891
  return $1.toUpperCase();
18892
18892
  });
18893
18893
  };
18894
- util$23.compareFieldsById = function compareFieldsById(a, b) {
18894
+ util$17.compareFieldsById = function compareFieldsById(a, b) {
18895
18895
  return a.id - b.id;
18896
18896
  };
18897
- util$23.decorateType = function decorateType(ctor, typeName) {
18897
+ util$17.decorateType = function decorateType(ctor, typeName) {
18898
18898
  if (ctor.$type) {
18899
18899
  if (typeName && ctor.$type.name !== typeName) {
18900
- util$23.decorateRoot.remove(ctor.$type);
18900
+ util$17.decorateRoot.remove(ctor.$type);
18901
18901
  ctor.$type.name = typeName;
18902
- util$23.decorateRoot.add(ctor.$type);
18902
+ util$17.decorateRoot.add(ctor.$type);
18903
18903
  }
18904
18904
  return ctor.$type;
18905
18905
  }
18906
18906
  if (!Type$2) Type$2 = require_type$1();
18907
18907
  var type$1 = new Type$2(typeName || ctor.name);
18908
- util$23.decorateRoot.add(type$1);
18908
+ util$17.decorateRoot.add(type$1);
18909
18909
  type$1.ctor = ctor;
18910
18910
  Object.defineProperty(ctor, "$type", {
18911
18911
  value: type$1,
@@ -18918,18 +18918,18 @@ var require_util = __commonJSMin((exports, module) => {
18918
18918
  return type$1;
18919
18919
  };
18920
18920
  var decorateEnumIndex = 0;
18921
- util$23.decorateEnum = function decorateEnum(object$1) {
18921
+ util$17.decorateEnum = function decorateEnum(object$1) {
18922
18922
  if (object$1.$type) return object$1.$type;
18923
18923
  if (!Enum$4) Enum$4 = require_enum();
18924
18924
  var enm = new Enum$4("Enum" + decorateEnumIndex++, object$1);
18925
- util$23.decorateRoot.add(enm);
18925
+ util$17.decorateRoot.add(enm);
18926
18926
  Object.defineProperty(object$1, "$type", {
18927
18927
  value: enm,
18928
18928
  enumerable: false
18929
18929
  });
18930
18930
  return enm;
18931
18931
  };
18932
- util$23.setProperty = function setProperty$1(dst, path$8, value$1, ifNotSet) {
18932
+ util$17.setProperty = function setProperty$1(dst, path$8, value$1, ifNotSet) {
18933
18933
  function setProp(dst$1, path$9, value$2) {
18934
18934
  var part = path$9.shift();
18935
18935
  if (part === "__proto__" || part === "prototype") return dst$1;
@@ -18947,13 +18947,13 @@ var require_util = __commonJSMin((exports, module) => {
18947
18947
  path$8 = path$8.split(".");
18948
18948
  return setProp(dst, path$8, value$1);
18949
18949
  };
18950
- Object.defineProperty(util$23, "decorateRoot", { get: function() {
18950
+ Object.defineProperty(util$17, "decorateRoot", { get: function() {
18951
18951
  return roots["decorated"] || (roots["decorated"] = new (require_root())());
18952
18952
  } });
18953
18953
  });
18954
18954
  var require_types = __commonJSMin((exports) => {
18955
18955
  var types$3 = exports;
18956
- var util$22 = require_util();
18956
+ var util$16 = require_util();
18957
18957
  var s$2 = [
18958
18958
  "double",
18959
18959
  "float",
@@ -19009,7 +19009,7 @@ var require_types = __commonJSMin((exports) => {
19009
19009
  0,
19010
19010
  false,
19011
19011
  "",
19012
- util$22.emptyArray,
19012
+ util$16.emptyArray,
19013
19013
  null
19014
19014
  ]);
19015
19015
  types$3.long = bake([
@@ -19053,7 +19053,7 @@ var require_field = __commonJSMin((exports, module) => {
19053
19053
  module.exports = Field$2;
19054
19054
  var ReflectionObject$4 = require_object();
19055
19055
  ((Field$2.prototype = Object.create(ReflectionObject$4.prototype)).constructor = Field$2).className = "Field";
19056
- var Enum$3 = require_enum(), types$2 = require_types(), util$21 = require_util();
19056
+ var Enum$3 = require_enum(), types$2 = require_types(), util$15 = require_util();
19057
19057
  var Type$1;
19058
19058
  var ruleRe = /^required|optional|repeated$/;
19059
19059
  Field$2.fromJSON = function fromJSON(name$2, json$3) {
@@ -19063,20 +19063,20 @@ var require_field = __commonJSMin((exports, module) => {
19063
19063
  return field;
19064
19064
  };
19065
19065
  function Field$2(name$2, id$2, type$1, rule, extend$5, options$1, comment) {
19066
- if (util$21.isObject(rule)) {
19066
+ if (util$15.isObject(rule)) {
19067
19067
  comment = extend$5;
19068
19068
  options$1 = rule;
19069
19069
  rule = extend$5 = void 0;
19070
- } else if (util$21.isObject(extend$5)) {
19070
+ } else if (util$15.isObject(extend$5)) {
19071
19071
  comment = options$1;
19072
19072
  options$1 = extend$5;
19073
19073
  extend$5 = void 0;
19074
19074
  }
19075
19075
  ReflectionObject$4.call(this, name$2, options$1);
19076
- if (!util$21.isInteger(id$2) || id$2 < 0) throw TypeError("id must be a non-negative integer");
19077
- if (!util$21.isString(type$1)) throw TypeError("type must be a string");
19076
+ if (!util$15.isInteger(id$2) || id$2 < 0) throw TypeError("id must be a non-negative integer");
19077
+ if (!util$15.isString(type$1)) throw TypeError("type must be a string");
19078
19078
  if (rule !== void 0 && !ruleRe.test(rule = rule.toString().toLowerCase())) throw TypeError("rule must be a string rule");
19079
- if (extend$5 !== void 0 && !util$21.isString(extend$5)) throw TypeError("extend must be a string");
19079
+ if (extend$5 !== void 0 && !util$15.isString(extend$5)) throw TypeError("extend must be a string");
19080
19080
  if (rule === "proto3_optional") rule = "optional";
19081
19081
  this.rule = rule && rule !== "optional" ? rule : void 0;
19082
19082
  this.type = type$1;
@@ -19088,7 +19088,7 @@ var require_field = __commonJSMin((exports, module) => {
19088
19088
  this.partOf = null;
19089
19089
  this.typeDefault = null;
19090
19090
  this.defaultValue = null;
19091
- this.long = util$21.Long ? types$2.long[type$1] !== void 0 : false;
19091
+ this.long = util$15.Long ? types$2.long[type$1] !== void 0 : false;
19092
19092
  this.bytes = type$1 === "bytes";
19093
19093
  this.resolvedType = null;
19094
19094
  this.extensionField = null;
@@ -19116,7 +19116,7 @@ var require_field = __commonJSMin((exports, module) => {
19116
19116
  };
19117
19117
  Field$2.prototype.toJSON = function toJSON(toJSONOptions) {
19118
19118
  var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;
19119
- return util$21.toObject([
19119
+ return util$15.toObject([
19120
19120
  "edition",
19121
19121
  this._editionToJSON(),
19122
19122
  "rule",
@@ -19149,16 +19149,16 @@ var require_field = __commonJSMin((exports, module) => {
19149
19149
  if (!Object.keys(this.options).length) this.options = void 0;
19150
19150
  }
19151
19151
  if (this.long) {
19152
- this.typeDefault = util$21.Long.fromNumber(this.typeDefault, this.type.charAt(0) === "u");
19152
+ this.typeDefault = util$15.Long.fromNumber(this.typeDefault, this.type.charAt(0) === "u");
19153
19153
  if (Object.freeze) Object.freeze(this.typeDefault);
19154
19154
  } else if (this.bytes && typeof this.typeDefault === "string") {
19155
19155
  var buf;
19156
- if (util$21.base64.test(this.typeDefault)) util$21.base64.decode(this.typeDefault, buf = util$21.newBuffer(util$21.base64.length(this.typeDefault)), 0);
19157
- else util$21.utf8.write(this.typeDefault, buf = util$21.newBuffer(util$21.utf8.length(this.typeDefault)), 0);
19156
+ if (util$15.base64.test(this.typeDefault)) util$15.base64.decode(this.typeDefault, buf = util$15.newBuffer(util$15.base64.length(this.typeDefault)), 0);
19157
+ else util$15.utf8.write(this.typeDefault, buf = util$15.newBuffer(util$15.utf8.length(this.typeDefault)), 0);
19158
19158
  this.typeDefault = buf;
19159
19159
  }
19160
- if (this.map) this.defaultValue = util$21.emptyObject;
19161
- else if (this.repeated) this.defaultValue = util$21.emptyArray;
19160
+ if (this.map) this.defaultValue = util$15.emptyObject;
19161
+ else if (this.repeated) this.defaultValue = util$15.emptyArray;
19162
19162
  else this.defaultValue = this.typeDefault;
19163
19163
  if (this.parent instanceof Type$1) this.parent.ctor.prototype[this.name] = this.defaultValue;
19164
19164
  return ReflectionObject$4.prototype.resolve.call(this);
@@ -19179,10 +19179,10 @@ var require_field = __commonJSMin((exports, module) => {
19179
19179
  return ReflectionObject$4.prototype._resolveFeatures.call(this, this._edition || edition);
19180
19180
  };
19181
19181
  Field$2.d = function decorateField(fieldId, fieldType, fieldRule, defaultValue$1) {
19182
- if (typeof fieldType === "function") fieldType = util$21.decorateType(fieldType).name;
19183
- else if (fieldType && typeof fieldType === "object") fieldType = util$21.decorateEnum(fieldType).name;
19182
+ if (typeof fieldType === "function") fieldType = util$15.decorateType(fieldType).name;
19183
+ else if (fieldType && typeof fieldType === "object") fieldType = util$15.decorateEnum(fieldType).name;
19184
19184
  return function fieldDecorator(prototype$2, fieldName) {
19185
- util$21.decorateType(prototype$2.constructor).add(new Field$2(fieldName, fieldId, fieldType, fieldRule, { default: defaultValue$1 }));
19185
+ util$15.decorateType(prototype$2.constructor).add(new Field$2(fieldName, fieldId, fieldType, fieldRule, { default: defaultValue$1 }));
19186
19186
  };
19187
19187
  };
19188
19188
  Field$2._configure = function configure$2(Type_) {
@@ -19193,7 +19193,7 @@ var require_oneof = __commonJSMin((exports, module) => {
19193
19193
  module.exports = OneOf$2;
19194
19194
  var ReflectionObject$3 = require_object();
19195
19195
  ((OneOf$2.prototype = Object.create(ReflectionObject$3.prototype)).constructor = OneOf$2).className = "OneOf";
19196
- var Field$1 = require_field(), util$20 = require_util();
19196
+ var Field$1 = require_field(), util$14 = require_util();
19197
19197
  function OneOf$2(name$2, fieldNames, options$1, comment) {
19198
19198
  if (!Array.isArray(fieldNames)) {
19199
19199
  options$1 = fieldNames;
@@ -19210,7 +19210,7 @@ var require_oneof = __commonJSMin((exports, module) => {
19210
19210
  };
19211
19211
  OneOf$2.prototype.toJSON = function toJSON(toJSONOptions) {
19212
19212
  var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;
19213
- return util$20.toObject([
19213
+ return util$14.toObject([
19214
19214
  "options",
19215
19215
  this.options,
19216
19216
  "oneof",
@@ -19268,10 +19268,10 @@ var require_oneof = __commonJSMin((exports, module) => {
19268
19268
  var fieldNames = new Array(arguments.length), index$2 = 0;
19269
19269
  while (index$2 < arguments.length) fieldNames[index$2] = arguments[index$2++];
19270
19270
  return function oneOfDecorator(prototype$2, oneofName) {
19271
- util$20.decorateType(prototype$2.constructor).add(new OneOf$2(oneofName, fieldNames));
19271
+ util$14.decorateType(prototype$2.constructor).add(new OneOf$2(oneofName, fieldNames));
19272
19272
  Object.defineProperty(prototype$2, oneofName, {
19273
- get: util$20.oneOfGetter(fieldNames),
19274
- set: util$20.oneOfSetter(fieldNames)
19273
+ get: util$14.oneOfGetter(fieldNames),
19274
+ set: util$14.oneOfSetter(fieldNames)
19275
19275
  });
19276
19276
  };
19277
19277
  };
@@ -19280,7 +19280,7 @@ var require_object = __commonJSMin((exports, module) => {
19280
19280
  module.exports = ReflectionObject$2;
19281
19281
  ReflectionObject$2.className = "ReflectionObject";
19282
19282
  var OneOf$1 = require_oneof();
19283
- var util$19 = require_util();
19283
+ var util$13 = require_util();
19284
19284
  var Root$1;
19285
19285
  var editions2024Defaults = {
19286
19286
  enum_type: "OPEN",
@@ -19323,8 +19323,8 @@ var require_object = __commonJSMin((exports, module) => {
19323
19323
  default_symbol_visibility: "EXPORT_ALL"
19324
19324
  };
19325
19325
  function ReflectionObject$2(name$2, options$1) {
19326
- if (!util$19.isString(name$2)) throw TypeError("name must be a string");
19327
- if (options$1 && !util$19.isObject(options$1)) throw TypeError("options must be an object");
19326
+ if (!util$13.isString(name$2)) throw TypeError("name must be a string");
19327
+ if (options$1 && !util$13.isObject(options$1)) throw TypeError("options must be an object");
19328
19328
  this.options = options$1;
19329
19329
  this.parsedOptions = null;
19330
19330
  this.name = name$2;
@@ -19409,7 +19409,7 @@ var require_object = __commonJSMin((exports, module) => {
19409
19409
  };
19410
19410
  ReflectionObject$2.prototype.setOption = function setOption(name$2, value$1, ifNotSet) {
19411
19411
  if (!this.options) this.options = {};
19412
- if (/^features\./.test(name$2)) util$19.setProperty(this.options, name$2, value$1, ifNotSet);
19412
+ if (/^features\./.test(name$2)) util$13.setProperty(this.options, name$2, value$1, ifNotSet);
19413
19413
  else if (!ifNotSet || this.options[name$2] === void 0) {
19414
19414
  if (this.getOption(name$2) !== value$1) this.resolved = false;
19415
19415
  this.options[name$2] = value$1;
@@ -19425,10 +19425,10 @@ var require_object = __commonJSMin((exports, module) => {
19425
19425
  });
19426
19426
  if (opt) {
19427
19427
  var newValue = opt[name$2];
19428
- util$19.setProperty(newValue, propName, value$1);
19428
+ util$13.setProperty(newValue, propName, value$1);
19429
19429
  } else {
19430
19430
  opt = {};
19431
- opt[name$2] = util$19.setProperty({}, propName, value$1);
19431
+ opt[name$2] = util$13.setProperty({}, propName, value$1);
19432
19432
  parsedOptions.push(opt);
19433
19433
  }
19434
19434
  } else {
@@ -19459,7 +19459,7 @@ var require_enum = __commonJSMin((exports, module) => {
19459
19459
  module.exports = Enum$2;
19460
19460
  var ReflectionObject$1 = require_object();
19461
19461
  ((Enum$2.prototype = Object.create(ReflectionObject$1.prototype)).constructor = Enum$2).className = "Enum";
19462
- var Namespace = require_namespace(), util$18 = require_util();
19462
+ var Namespace = require_namespace(), util$12 = require_util();
19463
19463
  function Enum$2(name$2, values$1, options$1, comment, comments, valuesOptions) {
19464
19464
  ReflectionObject$1.call(this, name$2, options$1);
19465
19465
  if (values$1 && typeof values$1 !== "object") throw TypeError("values must be an object");
@@ -19492,7 +19492,7 @@ var require_enum = __commonJSMin((exports, module) => {
19492
19492
  };
19493
19493
  Enum$2.prototype.toJSON = function toJSON(toJSONOptions) {
19494
19494
  var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;
19495
- return util$18.toObject([
19495
+ return util$12.toObject([
19496
19496
  "edition",
19497
19497
  this._editionToJSON(),
19498
19498
  "options",
@@ -19510,8 +19510,8 @@ var require_enum = __commonJSMin((exports, module) => {
19510
19510
  ]);
19511
19511
  };
19512
19512
  Enum$2.prototype.add = function add(name$2, id$2, comment, options$1) {
19513
- if (!util$18.isString(name$2)) throw TypeError("name must be a string");
19514
- if (!util$18.isInteger(id$2)) throw TypeError("id must be an integer");
19513
+ if (!util$12.isString(name$2)) throw TypeError("name must be a string");
19514
+ if (!util$12.isInteger(id$2)) throw TypeError("id must be an integer");
19515
19515
  if (this.values[name$2] !== void 0) throw Error("duplicate name '" + name$2 + "' in " + this);
19516
19516
  if (this.isReservedId(id$2)) throw Error("id " + id$2 + " is reserved in " + this);
19517
19517
  if (this.isReservedName(name$2)) throw Error("name '" + name$2 + "' is reserved in " + this);
@@ -19527,7 +19527,7 @@ var require_enum = __commonJSMin((exports, module) => {
19527
19527
  return this;
19528
19528
  };
19529
19529
  Enum$2.prototype.remove = function remove(name$2) {
19530
- if (!util$18.isString(name$2)) throw TypeError("name must be a string");
19530
+ if (!util$12.isString(name$2)) throw TypeError("name must be a string");
19531
19531
  var val = this.values[name$2];
19532
19532
  if (val == null) throw Error("name '" + name$2 + "' does not exist in " + this);
19533
19533
  delete this.valuesById[val];
@@ -19545,17 +19545,17 @@ var require_enum = __commonJSMin((exports, module) => {
19545
19545
  });
19546
19546
  var require_encoder$1 = __commonJSMin((exports, module) => {
19547
19547
  module.exports = encoder;
19548
- var Enum$1 = require_enum(), types$1 = require_types(), util$17 = require_util();
19548
+ var Enum$1 = require_enum(), types$1 = require_types(), util$11 = require_util();
19549
19549
  function genTypePartial(gen, field, fieldIndex, ref) {
19550
19550
  return field.delimited ? gen("types[%i].encode(%s,w.uint32(%i)).uint32(%i)", fieldIndex, ref, (field.id << 3 | 3) >>> 0, (field.id << 3 | 4) >>> 0) : gen("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()", fieldIndex, ref, (field.id << 3 | 2) >>> 0);
19551
19551
  }
19552
19552
  function encoder(mtype) {
19553
- var gen = util$17.codegen(["m", "w"], mtype.name + "$encode")("if(!w)")("w=Writer.create()");
19553
+ var gen = util$11.codegen(["m", "w"], mtype.name + "$encode")("if(!w)")("w=Writer.create()");
19554
19554
  var i$4, ref;
19555
- var fields = mtype.fieldsArray.slice().sort(util$17.compareFieldsById);
19555
+ var fields = mtype.fieldsArray.slice().sort(util$11.compareFieldsById);
19556
19556
  for (var i$4 = 0; i$4 < fields.length; ++i$4) {
19557
19557
  var field = fields[i$4].resolve(), index$2 = mtype._fieldsArray.indexOf(field), type$1 = field.resolvedType instanceof Enum$1 ? "int32" : field.type, wireType = types$1.basic[type$1];
19558
- ref = "m" + util$17.safeProp(field.name);
19558
+ ref = "m" + util$11.safeProp(field.name);
19559
19559
  if (field.map) {
19560
19560
  gen("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){", ref, field.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){", ref)("w.uint32(%i).fork().uint32(%i).%s(ks[i])", (field.id << 3 | 2) >>> 0, 8 | types$1.mapKey[field.keyType], field.keyType);
19561
19561
  if (wireType === void 0) gen("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()", index$2, ref);
@@ -19808,17 +19808,17 @@ var require_tokenize = __commonJSMin((exports, module) => {
19808
19808
  }
19809
19809
  });
19810
19810
  var require_parse$3 = __commonJSMin((exports, module) => {
19811
- module.exports = parse$23;
19812
- parse$23.filename = null;
19813
- parse$23.defaults = { keepCase: false };
19814
- var tokenize = require_tokenize(), Root = require_root(), Type = require_type$1(), Field = require_field(), MapField = require_mapfield(), OneOf = require_oneof(), Enum = require_enum(), Service = require_service(), Method = require_method(), ReflectionObject = require_object(), types = require_types(), util$16 = require_util();
19811
+ module.exports = parse$22;
19812
+ parse$22.filename = null;
19813
+ parse$22.defaults = { keepCase: false };
19814
+ var tokenize = require_tokenize(), Root = require_root(), Type = require_type$1(), Field = require_field(), MapField = require_mapfield(), OneOf = require_oneof(), Enum = require_enum(), Service = require_service(), Method = require_method(), ReflectionObject = require_object(), types = require_types(), util$10 = require_util();
19815
19815
  var base10Re = /^[1-9][0-9]*$/, base10NegRe = /^-?[1-9][0-9]*$/, base16Re = /^0[x][0-9a-fA-F]+$/, base16NegRe = /^-?0[x][0-9a-fA-F]+$/, base8Re = /^0[0-7]+$/, base8NegRe = /^-?0[0-7]+$/, numberRe = /^(?![eE])[0-9]*(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/, nameRe$1 = /^[a-zA-Z_][a-zA-Z_0-9]*$/, typeRefRe = /^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*$/;
19816
- function parse$23(source$2, root$2, options$1) {
19816
+ function parse$22(source$2, root$2, options$1) {
19817
19817
  if (!(root$2 instanceof Root)) {
19818
19818
  options$1 = root$2;
19819
19819
  root$2 = new Root();
19820
19820
  }
19821
- if (!options$1) options$1 = parse$23.defaults;
19821
+ if (!options$1) options$1 = parse$22.defaults;
19822
19822
  var preferTrailingComment = options$1.preferTrailingComment || false;
19823
19823
  var tn = tokenize(source$2, options$1.alternateCommentMode || false), next = tn.next, push$3 = tn.push, peek = tn.peek, skip = tn.skip, cmnt = tn.cmnt;
19824
19824
  var head = true, pkg, imports, weakImports, edition = "proto2";
@@ -19827,7 +19827,7 @@ var require_parse$3 = __commonJSMin((exports, module) => {
19827
19827
  var topLevelOptions = {};
19828
19828
  var applyCase = options$1.keepCase ? function(name$2) {
19829
19829
  return name$2;
19830
- } : util$16.camelCase;
19830
+ } : util$10.camelCase;
19831
19831
  function resolveFileFeatures() {
19832
19832
  topLevelObjects.forEach((obj) => {
19833
19833
  obj._edition = edition;
@@ -19838,8 +19838,8 @@ var require_parse$3 = __commonJSMin((exports, module) => {
19838
19838
  });
19839
19839
  }
19840
19840
  function illegal(token$1, name$2, insideTryCatch) {
19841
- var filename = parse$23.filename;
19842
- if (!insideTryCatch) parse$23.filename = null;
19841
+ var filename = parse$22.filename;
19842
+ if (!insideTryCatch) parse$22.filename = null;
19843
19843
  return Error("illegal " + (name$2 || "token") + " '" + token$1 + "' (" + (filename ? filename + ", " : "") + "line " + tn.line + ")");
19844
19844
  }
19845
19845
  function readString() {
@@ -20008,7 +20008,7 @@ var require_parse$3 = __commonJSMin((exports, module) => {
20008
20008
  var trailingLine = tn.line;
20009
20009
  if (obj) {
20010
20010
  if (typeof obj.comment !== "string") obj.comment = cmnt();
20011
- obj.filename = parse$23.filename;
20011
+ obj.filename = parse$22.filename;
20012
20012
  }
20013
20013
  if (skip("{", true)) {
20014
20014
  var token$1;
@@ -20090,14 +20090,14 @@ var require_parse$3 = __commonJSMin((exports, module) => {
20090
20090
  if (edition >= 2023) throw illegal("group");
20091
20091
  var name$2 = next();
20092
20092
  if (!nameRe$1.test(name$2)) throw illegal(name$2, "name");
20093
- var fieldName = util$16.lcFirst(name$2);
20094
- if (name$2 === fieldName) name$2 = util$16.ucFirst(name$2);
20093
+ var fieldName = util$10.lcFirst(name$2);
20094
+ if (name$2 === fieldName) name$2 = util$10.ucFirst(name$2);
20095
20095
  skip("=");
20096
20096
  var id$2 = parseId(next());
20097
20097
  var type$1 = new Type(name$2);
20098
20098
  type$1.group = true;
20099
20099
  var field = new Field(fieldName, id$2, name$2, rule);
20100
- field.filename = parse$23.filename;
20100
+ field.filename = parse$22.filename;
20101
20101
  ifBlock(type$1, function parseGroup_block(token$1) {
20102
20102
  switch (token$1) {
20103
20103
  case "option":
@@ -20388,7 +20388,7 @@ var require_parse$3 = __commonJSMin((exports, module) => {
20388
20388
  throw illegal(token);
20389
20389
  }
20390
20390
  resolveFileFeatures();
20391
- parse$23.filename = null;
20391
+ parse$22.filename = null;
20392
20392
  return {
20393
20393
  package: pkg,
20394
20394
  imports,
@@ -20547,11 +20547,11 @@ var require_ms = __commonJSMin((exports, module) => {
20547
20547
  module.exports = function(val, options$1) {
20548
20548
  options$1 = options$1 || {};
20549
20549
  var type$1 = typeof val;
20550
- if (type$1 === "string" && val.length > 0) return parse$22(val);
20550
+ if (type$1 === "string" && val.length > 0) return parse$21(val);
20551
20551
  else if (type$1 === "number" && isFinite(val)) return options$1.long ? fmtLong(val) : fmtShort(val);
20552
20552
  throw new Error("val is not a non-empty string or a valid number. val=" + JSON.stringify(val));
20553
20553
  };
20554
- function parse$22(str) {
20554
+ function parse$21(str) {
20555
20555
  str = String(str);
20556
20556
  if (str.length > 100) return;
20557
20557
  var match$3 = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(str);
@@ -21228,7 +21228,7 @@ var require_http_errors = __commonJSMin((exports, module) => {
21228
21228
  var require_bytes = __commonJSMin((exports, module) => {
21229
21229
  module.exports = bytes$2;
21230
21230
  module.exports.format = format$6;
21231
- module.exports.parse = parse$21;
21231
+ module.exports.parse = parse$20;
21232
21232
  var formatThousandsRegExp = /\B(?=(\d{3})+(?!\d))/g;
21233
21233
  var formatDecimalsRegExp = /(?:\.0*|(\.[^0]+)0+)$/;
21234
21234
  var map = {
@@ -21241,7 +21241,7 @@ var require_bytes = __commonJSMin((exports, module) => {
21241
21241
  };
21242
21242
  var parseRegExp = /^((-|\+)?(\d+(?:\.\d+)?)) *(kb|mb|gb|tb|pb)$/i;
21243
21243
  function bytes$2(value$1, options$1) {
21244
- if (typeof value$1 === "string") return parse$21(value$1);
21244
+ if (typeof value$1 === "string") return parse$20(value$1);
21245
21245
  if (typeof value$1 === "number") return format$6(value$1, options$1);
21246
21246
  return null;
21247
21247
  }
@@ -21266,7 +21266,7 @@ var require_bytes = __commonJSMin((exports, module) => {
21266
21266
  }).join(".");
21267
21267
  return str + unitSeparator + unit;
21268
21268
  }
21269
- function parse$21(val) {
21269
+ function parse$20(val) {
21270
21270
  if (typeof val === "number" && !isNaN(val)) return val;
21271
21271
  if (typeof val !== "string") return null;
21272
21272
  var results = parseRegExp.exec(val);
@@ -24407,7 +24407,7 @@ var require_content_type = __commonJSMin((exports) => {
24407
24407
  var QUOTE_REGEXP$1 = /([\\"])/g;
24408
24408
  var TYPE_REGEXP$1 = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;
24409
24409
  exports.format = format$5;
24410
- exports.parse = parse$20;
24410
+ exports.parse = parse$19;
24411
24411
  function format$5(obj) {
24412
24412
  if (!obj || typeof obj !== "object") throw new TypeError("argument obj is required");
24413
24413
  var parameters = obj.parameters;
@@ -24425,7 +24425,7 @@ var require_content_type = __commonJSMin((exports) => {
24425
24425
  }
24426
24426
  return string$5;
24427
24427
  }
24428
- function parse$20(string$5) {
24428
+ function parse$19(string$5) {
24429
24429
  if (!string$5) throw new TypeError("argument string is required");
24430
24430
  var header = typeof string$5 === "object" ? getcontenttype(string$5) : string$5;
24431
24431
  if (typeof header !== "string") throw new TypeError("argument string is required to be a string");
@@ -32212,7 +32212,7 @@ var require_media_typer = __commonJSMin((exports) => {
32212
32212
  var TYPE_NAME_REGEXP = /^[A-Za-z0-9][A-Za-z0-9!#$&^_-]{0,126}$/;
32213
32213
  var TYPE_REGEXP = /^ *([A-Za-z0-9][A-Za-z0-9!#$&^_-]{0,126})\/([A-Za-z0-9][A-Za-z0-9!#$&^_.+-]{0,126}) *$/;
32214
32214
  exports.format = format$4;
32215
- exports.parse = parse$19;
32215
+ exports.parse = parse$18;
32216
32216
  exports.test = test$1;
32217
32217
  function format$4(obj) {
32218
32218
  if (!obj || typeof obj !== "object") throw new TypeError("argument obj is required");
@@ -32233,7 +32233,7 @@ var require_media_typer = __commonJSMin((exports) => {
32233
32233
  if (typeof string$5 !== "string") throw new TypeError("argument string is required to be a string");
32234
32234
  return TYPE_REGEXP.test(string$5.toLowerCase());
32235
32235
  }
32236
- function parse$19(string$5) {
32236
+ function parse$18(string$5) {
32237
32237
  if (!string$5) throw new TypeError("argument string is required");
32238
32238
  if (typeof string$5 !== "string") throw new TypeError("argument string is required to be a string");
32239
32239
  var match$3 = TYPE_REGEXP.exec(string$5.toLowerCase());
@@ -32363,11 +32363,11 @@ var require_read = __commonJSMin((exports, module) => {
32363
32363
  var getBody = require_raw_body();
32364
32364
  var iconv = require_lib$4();
32365
32365
  var onFinished$3 = require_on_finished();
32366
- var zlib$12 = __require("node:zlib");
32366
+ var zlib$7 = __require("node:zlib");
32367
32367
  var hasBody = require_type_is().hasBody;
32368
32368
  var { getCharset } = require_utils$5();
32369
32369
  module.exports = read$4;
32370
- function read$4(req$2, res$2, next, parse$27, debug$20, options$1) {
32370
+ function read$4(req$2, res$2, next, parse$26, debug$20, options$1) {
32371
32371
  if (onFinished$3.isFinished(req$2)) {
32372
32372
  debug$20("body already parsed");
32373
32373
  next();
@@ -32446,7 +32446,7 @@ var require_read = __commonJSMin((exports, module) => {
32446
32446
  try {
32447
32447
  debug$20("parse body");
32448
32448
  str = typeof body$1 !== "string" && encoding !== null ? iconv.decode(body$1, encoding) : body$1;
32449
- req$2.body = parse$27(str, encoding);
32449
+ req$2.body = parse$26(str, encoding);
32450
32450
  } catch (err) {
32451
32451
  next(createError$3(400, err, {
32452
32452
  body: str,
@@ -32477,13 +32477,13 @@ var require_read = __commonJSMin((exports, module) => {
32477
32477
  switch (encoding) {
32478
32478
  case "deflate":
32479
32479
  debug$20("inflate body");
32480
- return zlib$12.createInflate();
32480
+ return zlib$7.createInflate();
32481
32481
  case "gzip":
32482
32482
  debug$20("gunzip body");
32483
- return zlib$12.createGunzip();
32483
+ return zlib$7.createGunzip();
32484
32484
  case "br":
32485
32485
  debug$20("brotli decompress body");
32486
- return zlib$12.createBrotliDecompress();
32486
+ return zlib$7.createBrotliDecompress();
32487
32487
  default: throw createError$3(415, "unsupported content encoding \"" + encoding + "\"", {
32488
32488
  encoding,
32489
32489
  type: "encoding.unsupported"
@@ -32510,7 +32510,7 @@ var require_json = __commonJSMin((exports, module) => {
32510
32510
  const normalizedOptions = normalizeOptions$3(options$1, "application/json");
32511
32511
  var reviver = options$1?.reviver;
32512
32512
  var strict = options$1?.strict !== false;
32513
- function parse$27(body$1) {
32513
+ function parse$26(body$1) {
32514
32514
  if (body$1.length === 0) return {};
32515
32515
  if (strict) {
32516
32516
  var first$2 = firstchar(body$1);
@@ -32534,7 +32534,7 @@ var require_json = __commonJSMin((exports, module) => {
32534
32534
  isValidCharset: (charset$1) => charset$1.slice(0, 4) === "utf-"
32535
32535
  };
32536
32536
  return function jsonParser(req$2, res$2, next) {
32537
- read$3(req$2, res$2, next, parse$27, debug$19, readOptions);
32537
+ read$3(req$2, res$2, next, parse$26, debug$19, readOptions);
32538
32538
  };
32539
32539
  }
32540
32540
  function createStrictSyntaxError(str, char) {
@@ -33996,7 +33996,7 @@ var require_stringify$1 = __commonJSMin((exports, module) => {
33996
33996
  return typeof v === "string" || typeof v === "number" || typeof v === "boolean" || typeof v === "symbol" || typeof v === "bigint";
33997
33997
  };
33998
33998
  var sentinel = {};
33999
- var stringify$9 = function stringify$10(object$1, prefix$4, generateArrayPrefix, commaRoundTrip, allowEmptyArrays, strictNullHandling, skipNulls, encodeDotInKeys, encoder$2, filter$3, sort, allowDots, serializeDate, format$7, formatter, encodeValuesOnly, charset$1, sideChannel) {
33999
+ var stringify$9 = function stringify$10(object$1, prefix$4, generateArrayPrefix, commaRoundTrip, allowEmptyArrays, strictNullHandling, skipNulls, encodeDotInKeys, encoder$2, filter$2, sort, allowDots, serializeDate, format$7, formatter, encodeValuesOnly, charset$1, sideChannel) {
34000
34000
  var obj = object$1;
34001
34001
  var tmpSc = sideChannel;
34002
34002
  var step = 0;
@@ -34008,7 +34008,7 @@ var require_stringify$1 = __commonJSMin((exports, module) => {
34008
34008
  else findFlag = true;
34009
34009
  if (typeof tmpSc.get(sentinel) === "undefined") step = 0;
34010
34010
  }
34011
- if (typeof filter$3 === "function") obj = filter$3(prefix$4, obj);
34011
+ if (typeof filter$2 === "function") obj = filter$2(prefix$4, obj);
34012
34012
  else if (obj instanceof Date) obj = serializeDate(obj);
34013
34013
  else if (generateArrayPrefix === "comma" && isArray$2(obj)) obj = utils$8.maybeMap(obj, function(value$2) {
34014
34014
  if (value$2 instanceof Date) return serializeDate(value$2);
@@ -34028,7 +34028,7 @@ var require_stringify$1 = __commonJSMin((exports, module) => {
34028
34028
  if (generateArrayPrefix === "comma" && isArray$2(obj)) {
34029
34029
  if (encodeValuesOnly && encoder$2) obj = utils$8.maybeMap(obj, encoder$2);
34030
34030
  objKeys = [{ value: obj.length > 0 ? obj.join(",") || null : void 0 }];
34031
- } else if (isArray$2(filter$3)) objKeys = filter$3;
34031
+ } else if (isArray$2(filter$2)) objKeys = filter$2;
34032
34032
  else {
34033
34033
  var keys$1 = Object.keys(obj);
34034
34034
  objKeys = sort ? keys$1.sort(sort) : keys$1;
@@ -34045,7 +34045,7 @@ var require_stringify$1 = __commonJSMin((exports, module) => {
34045
34045
  sideChannel.set(object$1, step);
34046
34046
  var valueSideChannel = getSideChannel();
34047
34047
  valueSideChannel.set(sentinel, sideChannel);
34048
- pushToArray(values$1, stringify$10(value$1, keyPrefix, generateArrayPrefix, commaRoundTrip, allowEmptyArrays, strictNullHandling, skipNulls, encodeDotInKeys, generateArrayPrefix === "comma" && encodeValuesOnly && isArray$2(obj) ? null : encoder$2, filter$3, sort, allowDots, serializeDate, format$7, formatter, encodeValuesOnly, charset$1, valueSideChannel));
34048
+ pushToArray(values$1, stringify$10(value$1, keyPrefix, generateArrayPrefix, commaRoundTrip, allowEmptyArrays, strictNullHandling, skipNulls, encodeDotInKeys, generateArrayPrefix === "comma" && encodeValuesOnly && isArray$2(obj) ? null : encoder$2, filter$2, sort, allowDots, serializeDate, format$7, formatter, encodeValuesOnly, charset$1, valueSideChannel));
34049
34049
  }
34050
34050
  return values$1;
34051
34051
  };
@@ -34062,8 +34062,8 @@ var require_stringify$1 = __commonJSMin((exports, module) => {
34062
34062
  format$7 = opts.format;
34063
34063
  }
34064
34064
  var formatter = formats$2.formatters[format$7];
34065
- var filter$3 = defaults$1.filter;
34066
- if (typeof opts.filter === "function" || isArray$2(opts.filter)) filter$3 = opts.filter;
34065
+ var filter$2 = defaults$1.filter;
34066
+ if (typeof opts.filter === "function" || isArray$2(opts.filter)) filter$2 = opts.filter;
34067
34067
  var arrayFormat;
34068
34068
  if (opts.arrayFormat in arrayPrefixGenerators) arrayFormat = opts.arrayFormat;
34069
34069
  else if ("indices" in opts) arrayFormat = opts.indices ? "indices" : "repeat";
@@ -34083,7 +34083,7 @@ var require_stringify$1 = __commonJSMin((exports, module) => {
34083
34083
  encodeDotInKeys: typeof opts.encodeDotInKeys === "boolean" ? opts.encodeDotInKeys : defaults$1.encodeDotInKeys,
34084
34084
  encoder: typeof opts.encoder === "function" ? opts.encoder : defaults$1.encoder,
34085
34085
  encodeValuesOnly: typeof opts.encodeValuesOnly === "boolean" ? opts.encodeValuesOnly : defaults$1.encodeValuesOnly,
34086
- filter: filter$3,
34086
+ filter: filter$2,
34087
34087
  format: format$7,
34088
34088
  formatter,
34089
34089
  serializeDate: typeof opts.serializeDate === "function" ? opts.serializeDate : defaults$1.serializeDate,
@@ -34096,13 +34096,13 @@ var require_stringify$1 = __commonJSMin((exports, module) => {
34096
34096
  var obj = object$1;
34097
34097
  var options$1 = normalizeStringifyOptions(opts);
34098
34098
  var objKeys;
34099
- var filter$3;
34099
+ var filter$2;
34100
34100
  if (typeof options$1.filter === "function") {
34101
- filter$3 = options$1.filter;
34102
- obj = filter$3("", obj);
34101
+ filter$2 = options$1.filter;
34102
+ obj = filter$2("", obj);
34103
34103
  } else if (isArray$2(options$1.filter)) {
34104
- filter$3 = options$1.filter;
34105
- objKeys = filter$3;
34104
+ filter$2 = options$1.filter;
34105
+ objKeys = filter$2;
34106
34106
  }
34107
34107
  var keys$1 = [];
34108
34108
  if (typeof obj !== "object" || obj === null) return "";
@@ -34325,10 +34325,10 @@ var require_parse$2 = __commonJSMin((exports, module) => {
34325
34325
  });
34326
34326
  var require_lib$3 = __commonJSMin((exports, module) => {
34327
34327
  var stringify$8 = require_stringify$1();
34328
- var parse$18 = require_parse$2();
34328
+ var parse$17 = require_parse$2();
34329
34329
  module.exports = {
34330
34330
  formats: require_formats(),
34331
- parse: parse$18,
34331
+ parse: parse$17,
34332
34332
  stringify: stringify$8
34333
34333
  };
34334
34334
  });
@@ -34343,7 +34343,7 @@ var require_urlencoded = __commonJSMin((exports, module) => {
34343
34343
  const normalizedOptions = normalizeOptions(options$1, "application/x-www-form-urlencoded");
34344
34344
  if (normalizedOptions.defaultCharset !== "utf-8" && normalizedOptions.defaultCharset !== "iso-8859-1") throw new TypeError("option defaultCharset must be either utf-8 or iso-8859-1");
34345
34345
  var queryparse = createQueryParser(options$1);
34346
- function parse$27(body$1, encoding) {
34346
+ function parse$26(body$1, encoding) {
34347
34347
  return body$1.length ? queryparse(body$1, encoding) : {};
34348
34348
  }
34349
34349
  const readOptions = {
@@ -34351,7 +34351,7 @@ var require_urlencoded = __commonJSMin((exports, module) => {
34351
34351
  isValidCharset: (charset$1) => charset$1 === "utf-8" || charset$1 === "iso-8859-1"
34352
34352
  };
34353
34353
  return function urlencodedParser(req$2, res$2, next) {
34354
- read(req$2, res$2, next, parse$27, debug$16, readOptions);
34354
+ read(req$2, res$2, next, parse$26, debug$16, readOptions);
34355
34355
  };
34356
34356
  }
34357
34357
  function createQueryParser(options$1) {
@@ -34486,7 +34486,7 @@ var require_escape_html = __commonJSMin((exports, module) => {
34486
34486
  });
34487
34487
  var require_parseurl = __commonJSMin((exports, module) => {
34488
34488
  var url$7 = __require("url");
34489
- var parse$17 = url$7.parse;
34489
+ var parse$16 = url$7.parse;
34490
34490
  var Url = url$7.Url;
34491
34491
  module.exports = parseurl;
34492
34492
  module.exports.original = originalurl;
@@ -34509,7 +34509,7 @@ var require_parseurl = __commonJSMin((exports, module) => {
34509
34509
  return req$2._parsedOriginalUrl = parsed;
34510
34510
  }
34511
34511
  function fastparse(str) {
34512
- if (typeof str !== "string" || str.charCodeAt(0) !== 47) return parse$17(str);
34512
+ if (typeof str !== "string" || str.charCodeAt(0) !== 47) return parse$16(str);
34513
34513
  var pathname = str;
34514
34514
  var query$1 = null;
34515
34515
  var search$1 = null;
@@ -34528,7 +34528,7 @@ var require_parseurl = __commonJSMin((exports, module) => {
34528
34528
  case 32:
34529
34529
  case 35:
34530
34530
  case 160:
34531
- case 65279: return parse$17(str);
34531
+ case 65279: return parse$16(str);
34532
34532
  }
34533
34533
  var url$9 = Url !== void 0 ? new Url() : {};
34534
34534
  url$9.path = str;
@@ -34751,13 +34751,13 @@ var require_forwarded = __commonJSMin((exports, module) => {
34751
34751
  module.exports = forwarded$1;
34752
34752
  function forwarded$1(req$2) {
34753
34753
  if (!req$2) throw new TypeError("argument req is required");
34754
- var proxyAddrs = parse$16(req$2.headers["x-forwarded-for"] || "");
34754
+ var proxyAddrs = parse$15(req$2.headers["x-forwarded-for"] || "");
34755
34755
  return [getSocketAddr(req$2)].concat(proxyAddrs);
34756
34756
  }
34757
34757
  function getSocketAddr(req$2) {
34758
34758
  return req$2.socket ? req$2.socket.remoteAddress : req$2.connection.remoteAddress;
34759
34759
  }
34760
- function parse$16(header) {
34760
+ function parse$15(header) {
34761
34761
  var end$1 = header.length;
34762
34762
  var list$2 = [];
34763
34763
  var start$2 = header.length;
@@ -35741,7 +35741,7 @@ var require_is_promise = __commonJSMin((exports, module) => {
35741
35741
  var require_dist$1 = __commonJSMin((exports) => {
35742
35742
  Object.defineProperty(exports, "__esModule", { value: true });
35743
35743
  exports.PathError = exports.TokenData = void 0;
35744
- exports.parse = parse$15;
35744
+ exports.parse = parse$14;
35745
35745
  exports.compile = compile$2;
35746
35746
  exports.match = match$2;
35747
35747
  exports.pathToRegexp = pathToRegexp;
@@ -35784,7 +35784,7 @@ var require_dist$1 = __commonJSMin((exports) => {
35784
35784
  }
35785
35785
  };
35786
35786
  exports.PathError = PathError;
35787
- function parse$15(str, options$1 = {}) {
35787
+ function parse$14(str, options$1 = {}) {
35788
35788
  const { encodePath = NOOP_VALUE } = options$1;
35789
35789
  const chars$1 = [...str];
35790
35790
  const tokens = [];
@@ -35885,7 +35885,7 @@ var require_dist$1 = __commonJSMin((exports) => {
35885
35885
  }
35886
35886
  function compile$2(path$8, options$1 = {}) {
35887
35887
  const { encode: encode$7 = encodeURIComponent, delimiter = DEFAULT_DELIMITER } = options$1;
35888
- const fn = tokensToFunction((typeof path$8 === "object" ? path$8 : parse$15(path$8, options$1)).tokens, delimiter, encode$7);
35888
+ const fn = tokensToFunction((typeof path$8 === "object" ? path$8 : parse$14(path$8, options$1)).tokens, delimiter, encode$7);
35889
35889
  return function path$9(params = {}) {
35890
35890
  const [path$10, ...missing$1] = fn(params);
35891
35891
  if (missing$1.length) throw new TypeError(`Missing parameters: ${missing$1.join(", ")}`);
@@ -35962,7 +35962,7 @@ var require_dist$1 = __commonJSMin((exports) => {
35962
35962
  const flags = sensitive ? "" : "i";
35963
35963
  const sources = [];
35964
35964
  for (const input$1 of pathsToArray(path$8, [])) {
35965
- const data$1 = typeof input$1 === "object" ? input$1 : parse$15(input$1, options$1);
35965
+ const data$1 = typeof input$1 === "object" ? input$1 : parse$14(input$1, options$1);
35966
35966
  for (const tokens of flatten$3(data$1.tokens, 0, [])) sources.push(toRegExpSource(tokens, delimiter, keys$1, data$1.originalPath));
35967
35967
  }
35968
35968
  let pattern = `^(?:${sources.join("|")})`;
@@ -37419,7 +37419,7 @@ var require_request = __commonJSMin((exports, module) => {
37419
37419
  var http$6 = __require("node:http");
37420
37420
  var fresh$1 = require_fresh();
37421
37421
  var parseRange$1 = require_range_parser();
37422
- var parse$14 = require_parseurl();
37422
+ var parse$13 = require_parseurl();
37423
37423
  var proxyaddr = require_proxy_addr();
37424
37424
  var req$1 = Object.create(http$6.IncomingMessage.prototype);
37425
37425
  module.exports = req$1;
@@ -37456,7 +37456,7 @@ var require_request = __commonJSMin((exports, module) => {
37456
37456
  defineGetter(req$1, "query", function query$1() {
37457
37457
  var queryparse = this.app.get("query parser fn");
37458
37458
  if (!queryparse) return Object.create(null);
37459
- var querystring$2 = parse$14(this).query;
37459
+ var querystring$2 = parse$13(this).query;
37460
37460
  return queryparse(querystring$2);
37461
37461
  });
37462
37462
  req$1.is = function is$3(types$6) {
@@ -37494,7 +37494,7 @@ var require_request = __commonJSMin((exports, module) => {
37494
37494
  return (!isIP$1(hostname$2) ? hostname$2.split(".").reverse() : [hostname$2]).slice(offset$1);
37495
37495
  });
37496
37496
  defineGetter(req$1, "path", function path$8() {
37497
- return parse$14(this).pathname;
37497
+ return parse$13(this).pathname;
37498
37498
  });
37499
37499
  defineGetter(req$1, "host", function host$1() {
37500
37500
  var trust = this.app.get("trust proxy fn");
@@ -37537,7 +37537,7 @@ var require_request = __commonJSMin((exports, module) => {
37537
37537
  });
37538
37538
  var require_content_disposition = __commonJSMin((exports, module) => {
37539
37539
  module.exports = contentDisposition$1;
37540
- module.exports.parse = parse$13;
37540
+ module.exports.parse = parse$12;
37541
37541
  var basename = __require("path").basename;
37542
37542
  var ENCODE_URL_ATTR_CHAR_REGEXP = /[\x00-\x20"'()*,/:;<=>?@[\\\]{}\x7f]/g;
37543
37543
  var HEX_ESCAPE_REGEXP = /%[0-9A-Fa-f]{2}/;
@@ -37607,7 +37607,7 @@ var require_content_disposition = __commonJSMin((exports, module) => {
37607
37607
  function getlatin1(val) {
37608
37608
  return String(val).replace(NON_LATIN1_REGEXP, "?");
37609
37609
  }
37610
- function parse$13(string$5) {
37610
+ function parse$12(string$5) {
37611
37611
  if (!string$5 || typeof string$5 !== "string") throw new TypeError("argument string is required");
37612
37612
  var match$3 = DISPOSITION_TYPE_REGEXP.exec(string$5);
37613
37613
  if (!match$3) throw new TypeError("invalid type format");
@@ -37671,7 +37671,7 @@ var require_cookie_signature = __commonJSMin((exports) => {
37671
37671
  };
37672
37672
  });
37673
37673
  var require_cookie = __commonJSMin((exports) => {
37674
- exports.parse = parse$12;
37674
+ exports.parse = parse$11;
37675
37675
  exports.serialize = serialize$2;
37676
37676
  var __toString = Object.prototype.toString;
37677
37677
  var __hasOwnProperty = Object.prototype.hasOwnProperty;
@@ -37679,7 +37679,7 @@ var require_cookie = __commonJSMin((exports) => {
37679
37679
  var cookieValueRegExp = /^("?)[\u0021\u0023-\u002B\u002D-\u003A\u003C-\u005B\u005D-\u007E]*\1$/;
37680
37680
  var domainValueRegExp = /^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i;
37681
37681
  var pathValueRegExp = /^[\u0020-\u003A\u003D-\u007E]*$/;
37682
- function parse$12(str, opt) {
37682
+ function parse$11(str, opt) {
37683
37683
  if (typeof str !== "string") throw new TypeError("argument str must be a string");
37684
37684
  var obj = {};
37685
37685
  var len = str.length;
@@ -37813,8 +37813,8 @@ var require_send = __commonJSMin((exports, module) => {
37813
37813
  var parseRange = require_range_parser();
37814
37814
  var path$5 = __require("path");
37815
37815
  var statuses$1 = require_statuses();
37816
- var Stream$7 = __require("stream");
37817
- var util$15 = __require("util");
37816
+ var Stream$4 = __require("stream");
37817
+ var util$9 = __require("util");
37818
37818
  var extname$1 = path$5.extname;
37819
37819
  var join = path$5.join;
37820
37820
  var normalize$1 = path$5.normalize;
@@ -37828,7 +37828,7 @@ var require_send = __commonJSMin((exports, module) => {
37828
37828
  return new SendStream(req$2, path$8, options$1);
37829
37829
  }
37830
37830
  function SendStream(req$2, path$8, options$1) {
37831
- Stream$7.call(this);
37831
+ Stream$4.call(this);
37832
37832
  var opts = options$1 || {};
37833
37833
  this.options = opts;
37834
37834
  this.path = path$8;
@@ -37847,7 +37847,7 @@ var require_send = __commonJSMin((exports, module) => {
37847
37847
  this._maxage = !isNaN(this._maxage) ? Math.min(Math.max(0, this._maxage), MAX_MAXAGE) : 0;
37848
37848
  this._root = opts.root ? resolve$3(opts.root) : null;
37849
37849
  }
37850
- util$15.inherits(SendStream, Stream$7);
37850
+ util$9.inherits(SendStream, Stream$4);
37851
37851
  SendStream.prototype.error = function error$49(status$1, err) {
37852
37852
  if (hasListeners(this, "error")) return this.emit("error", createHttpError(status$1, err));
37853
37853
  var res$2 = this.res;
@@ -38236,11 +38236,11 @@ var require_vary = __commonJSMin((exports, module) => {
38236
38236
  function append$1(header, field) {
38237
38237
  if (typeof header !== "string") throw new TypeError("header argument is required");
38238
38238
  if (!field) throw new TypeError("field argument is required");
38239
- var fields = !Array.isArray(field) ? parse$11(String(field)) : field;
38239
+ var fields = !Array.isArray(field) ? parse$10(String(field)) : field;
38240
38240
  for (var j = 0; j < fields.length; j++) if (!FIELD_NAME_REGEXP.test(fields[j])) throw new TypeError("field argument contains an invalid header name");
38241
38241
  if (header === "*") return header;
38242
38242
  var val = header;
38243
- var vals = parse$11(header.toLowerCase());
38243
+ var vals = parse$10(header.toLowerCase());
38244
38244
  if (fields.indexOf("*") !== -1 || vals.indexOf("*") !== -1) return "*";
38245
38245
  for (var i$4 = 0; i$4 < fields.length; i$4++) {
38246
38246
  var fld = fields[i$4].toLowerCase();
@@ -38251,7 +38251,7 @@ var require_vary = __commonJSMin((exports, module) => {
38251
38251
  }
38252
38252
  return val;
38253
38253
  }
38254
- function parse$11(header) {
38254
+ function parse$10(header) {
38255
38255
  var end$1 = 0;
38256
38256
  var list$2 = [];
38257
38257
  var start$2 = 0;
@@ -49513,1628 +49513,6 @@ var require_jsQR = __commonJSMin((exports, module) => {
49513
49513
  ])["default"];
49514
49514
  });
49515
49515
  });
49516
- var require_chunkstream$1 = __commonJSMin((exports, module) => {
49517
- var util$14 = __require("util");
49518
- var Stream$6 = __require("stream");
49519
- var ChunkStream$5 = module.exports = function() {
49520
- Stream$6.call(this);
49521
- this._buffers = [];
49522
- this._buffered = 0;
49523
- this._reads = [];
49524
- this._paused = false;
49525
- this._encoding = "utf8";
49526
- this.writable = true;
49527
- };
49528
- util$14.inherits(ChunkStream$5, Stream$6);
49529
- ChunkStream$5.prototype.read = function(length, callback) {
49530
- this._reads.push({
49531
- length: Math.abs(length),
49532
- allowLess: length < 0,
49533
- func: callback
49534
- });
49535
- process.nextTick(function() {
49536
- this._process();
49537
- if (this._paused && this._reads && this._reads.length > 0) {
49538
- this._paused = false;
49539
- this.emit("drain");
49540
- }
49541
- }.bind(this));
49542
- };
49543
- ChunkStream$5.prototype.write = function(data$1, encoding) {
49544
- if (!this.writable) {
49545
- this.emit("error", /* @__PURE__ */ new Error("Stream not writable"));
49546
- return false;
49547
- }
49548
- let dataBuffer;
49549
- if (Buffer.isBuffer(data$1)) dataBuffer = data$1;
49550
- else dataBuffer = Buffer.from(data$1, encoding || this._encoding);
49551
- this._buffers.push(dataBuffer);
49552
- this._buffered += dataBuffer.length;
49553
- this._process();
49554
- if (this._reads && this._reads.length === 0) this._paused = true;
49555
- return this.writable && !this._paused;
49556
- };
49557
- ChunkStream$5.prototype.end = function(data$1, encoding) {
49558
- if (data$1) this.write(data$1, encoding);
49559
- this.writable = false;
49560
- if (!this._buffers) return;
49561
- if (this._buffers.length === 0) this._end();
49562
- else {
49563
- this._buffers.push(null);
49564
- this._process();
49565
- }
49566
- };
49567
- ChunkStream$5.prototype.destroySoon = ChunkStream$5.prototype.end;
49568
- ChunkStream$5.prototype._end = function() {
49569
- if (this._reads.length > 0) this.emit("error", /* @__PURE__ */ new Error("Unexpected end of input"));
49570
- this.destroy();
49571
- };
49572
- ChunkStream$5.prototype.destroy = function() {
49573
- if (!this._buffers) return;
49574
- this.writable = false;
49575
- this._reads = null;
49576
- this._buffers = null;
49577
- this.emit("close");
49578
- };
49579
- ChunkStream$5.prototype._processReadAllowingLess = function(read$5) {
49580
- this._reads.shift();
49581
- let smallerBuf = this._buffers[0];
49582
- if (smallerBuf.length > read$5.length) {
49583
- this._buffered -= read$5.length;
49584
- this._buffers[0] = smallerBuf.slice(read$5.length);
49585
- read$5.func.call(this, smallerBuf.slice(0, read$5.length));
49586
- } else {
49587
- this._buffered -= smallerBuf.length;
49588
- this._buffers.shift();
49589
- read$5.func.call(this, smallerBuf);
49590
- }
49591
- };
49592
- ChunkStream$5.prototype._processRead = function(read$5) {
49593
- this._reads.shift();
49594
- let pos = 0;
49595
- let count = 0;
49596
- let data$1 = Buffer.alloc(read$5.length);
49597
- while (pos < read$5.length) {
49598
- let buf = this._buffers[count++];
49599
- let len = Math.min(buf.length, read$5.length - pos);
49600
- buf.copy(data$1, pos, 0, len);
49601
- pos += len;
49602
- if (len !== buf.length) this._buffers[--count] = buf.slice(len);
49603
- }
49604
- if (count > 0) this._buffers.splice(0, count);
49605
- this._buffered -= read$5.length;
49606
- read$5.func.call(this, data$1);
49607
- };
49608
- ChunkStream$5.prototype._process = function() {
49609
- try {
49610
- while (this._buffered > 0 && this._reads && this._reads.length > 0) {
49611
- let read$5 = this._reads[0];
49612
- if (read$5.allowLess) this._processReadAllowingLess(read$5);
49613
- else if (this._buffered >= read$5.length) this._processRead(read$5);
49614
- else break;
49615
- }
49616
- if (this._buffers && !this.writable) this._end();
49617
- } catch (ex) {
49618
- this.emit("error", ex);
49619
- }
49620
- };
49621
- });
49622
- var require_interlace$1 = __commonJSMin((exports) => {
49623
- var imagePasses$1 = [
49624
- {
49625
- x: [0],
49626
- y: [0]
49627
- },
49628
- {
49629
- x: [4],
49630
- y: [0]
49631
- },
49632
- {
49633
- x: [0, 4],
49634
- y: [4]
49635
- },
49636
- {
49637
- x: [2, 6],
49638
- y: [0, 4]
49639
- },
49640
- {
49641
- x: [
49642
- 0,
49643
- 2,
49644
- 4,
49645
- 6
49646
- ],
49647
- y: [2, 6]
49648
- },
49649
- {
49650
- x: [
49651
- 1,
49652
- 3,
49653
- 5,
49654
- 7
49655
- ],
49656
- y: [
49657
- 0,
49658
- 2,
49659
- 4,
49660
- 6
49661
- ]
49662
- },
49663
- {
49664
- x: [
49665
- 0,
49666
- 1,
49667
- 2,
49668
- 3,
49669
- 4,
49670
- 5,
49671
- 6,
49672
- 7
49673
- ],
49674
- y: [
49675
- 1,
49676
- 3,
49677
- 5,
49678
- 7
49679
- ]
49680
- }
49681
- ];
49682
- exports.getImagePasses = function(width$1, height$1) {
49683
- let images = [];
49684
- let xLeftOver = width$1 % 8;
49685
- let yLeftOver = height$1 % 8;
49686
- let xRepeats = (width$1 - xLeftOver) / 8;
49687
- let yRepeats = (height$1 - yLeftOver) / 8;
49688
- for (let i$4 = 0; i$4 < imagePasses$1.length; i$4++) {
49689
- let pass = imagePasses$1[i$4];
49690
- let passWidth = xRepeats * pass.x.length;
49691
- let passHeight = yRepeats * pass.y.length;
49692
- for (let j = 0; j < pass.x.length; j++) if (pass.x[j] < xLeftOver) passWidth++;
49693
- else break;
49694
- for (let j = 0; j < pass.y.length; j++) if (pass.y[j] < yLeftOver) passHeight++;
49695
- else break;
49696
- if (passWidth > 0 && passHeight > 0) images.push({
49697
- width: passWidth,
49698
- height: passHeight,
49699
- index: i$4
49700
- });
49701
- }
49702
- return images;
49703
- };
49704
- exports.getInterlaceIterator = function(width$1) {
49705
- return function(x$1, y$2, pass) {
49706
- let outerXLeftOver = x$1 % imagePasses$1[pass].x.length;
49707
- let outerX = (x$1 - outerXLeftOver) / imagePasses$1[pass].x.length * 8 + imagePasses$1[pass].x[outerXLeftOver];
49708
- let outerYLeftOver = y$2 % imagePasses$1[pass].y.length;
49709
- let outerY = (y$2 - outerYLeftOver) / imagePasses$1[pass].y.length * 8 + imagePasses$1[pass].y[outerYLeftOver];
49710
- return outerX * 4 + outerY * width$1 * 4;
49711
- };
49712
- };
49713
- });
49714
- var require_paeth_predictor$1 = __commonJSMin((exports, module) => {
49715
- module.exports = function paethPredictor$4(left, above, upLeft) {
49716
- let paeth = left + above - upLeft;
49717
- let pLeft = Math.abs(paeth - left);
49718
- let pAbove = Math.abs(paeth - above);
49719
- let pUpLeft = Math.abs(paeth - upLeft);
49720
- if (pLeft <= pAbove && pLeft <= pUpLeft) return left;
49721
- if (pAbove <= pUpLeft) return above;
49722
- return upLeft;
49723
- };
49724
- });
49725
- var require_filter_parse$1 = __commonJSMin((exports, module) => {
49726
- var interlaceUtils$3 = require_interlace$1();
49727
- var paethPredictor$3 = require_paeth_predictor$1();
49728
- function getByteWidth$1(width$1, bpp, depth$1) {
49729
- let byteWidth = width$1 * bpp;
49730
- if (depth$1 !== 8) byteWidth = Math.ceil(byteWidth / (8 / depth$1));
49731
- return byteWidth;
49732
- }
49733
- var Filter$5 = module.exports = function(bitmapInfo, dependencies) {
49734
- let width$1 = bitmapInfo.width;
49735
- let height$1 = bitmapInfo.height;
49736
- let interlace = bitmapInfo.interlace;
49737
- let bpp = bitmapInfo.bpp;
49738
- let depth$1 = bitmapInfo.depth;
49739
- this.read = dependencies.read;
49740
- this.write = dependencies.write;
49741
- this.complete = dependencies.complete;
49742
- this._imageIndex = 0;
49743
- this._images = [];
49744
- if (interlace) {
49745
- let passes = interlaceUtils$3.getImagePasses(width$1, height$1);
49746
- for (let i$4 = 0; i$4 < passes.length; i$4++) this._images.push({
49747
- byteWidth: getByteWidth$1(passes[i$4].width, bpp, depth$1),
49748
- height: passes[i$4].height,
49749
- lineIndex: 0
49750
- });
49751
- } else this._images.push({
49752
- byteWidth: getByteWidth$1(width$1, bpp, depth$1),
49753
- height: height$1,
49754
- lineIndex: 0
49755
- });
49756
- if (depth$1 === 8) this._xComparison = bpp;
49757
- else if (depth$1 === 16) this._xComparison = bpp * 2;
49758
- else this._xComparison = 1;
49759
- };
49760
- Filter$5.prototype.start = function() {
49761
- this.read(this._images[this._imageIndex].byteWidth + 1, this._reverseFilterLine.bind(this));
49762
- };
49763
- Filter$5.prototype._unFilterType1 = function(rawData, unfilteredLine, byteWidth) {
49764
- let xComparison = this._xComparison;
49765
- let xBiggerThan = xComparison - 1;
49766
- for (let x$1 = 0; x$1 < byteWidth; x$1++) unfilteredLine[x$1] = rawData[1 + x$1] + (x$1 > xBiggerThan ? unfilteredLine[x$1 - xComparison] : 0);
49767
- };
49768
- Filter$5.prototype._unFilterType2 = function(rawData, unfilteredLine, byteWidth) {
49769
- let lastLine = this._lastLine;
49770
- for (let x$1 = 0; x$1 < byteWidth; x$1++) unfilteredLine[x$1] = rawData[1 + x$1] + (lastLine ? lastLine[x$1] : 0);
49771
- };
49772
- Filter$5.prototype._unFilterType3 = function(rawData, unfilteredLine, byteWidth) {
49773
- let xComparison = this._xComparison;
49774
- let xBiggerThan = xComparison - 1;
49775
- let lastLine = this._lastLine;
49776
- for (let x$1 = 0; x$1 < byteWidth; x$1++) {
49777
- let rawByte = rawData[1 + x$1];
49778
- let f3Up = lastLine ? lastLine[x$1] : 0;
49779
- let f3Left = x$1 > xBiggerThan ? unfilteredLine[x$1 - xComparison] : 0;
49780
- unfilteredLine[x$1] = rawByte + Math.floor((f3Left + f3Up) / 2);
49781
- }
49782
- };
49783
- Filter$5.prototype._unFilterType4 = function(rawData, unfilteredLine, byteWidth) {
49784
- let xComparison = this._xComparison;
49785
- let xBiggerThan = xComparison - 1;
49786
- let lastLine = this._lastLine;
49787
- for (let x$1 = 0; x$1 < byteWidth; x$1++) {
49788
- let rawByte = rawData[1 + x$1];
49789
- let f4Up = lastLine ? lastLine[x$1] : 0;
49790
- unfilteredLine[x$1] = rawByte + paethPredictor$3(x$1 > xBiggerThan ? unfilteredLine[x$1 - xComparison] : 0, f4Up, x$1 > xBiggerThan && lastLine ? lastLine[x$1 - xComparison] : 0);
49791
- }
49792
- };
49793
- Filter$5.prototype._reverseFilterLine = function(rawData) {
49794
- let filter$3 = rawData[0];
49795
- let unfilteredLine;
49796
- let currentImage = this._images[this._imageIndex];
49797
- let byteWidth = currentImage.byteWidth;
49798
- if (filter$3 === 0) unfilteredLine = rawData.slice(1, byteWidth + 1);
49799
- else {
49800
- unfilteredLine = Buffer.alloc(byteWidth);
49801
- switch (filter$3) {
49802
- case 1:
49803
- this._unFilterType1(rawData, unfilteredLine, byteWidth);
49804
- break;
49805
- case 2:
49806
- this._unFilterType2(rawData, unfilteredLine, byteWidth);
49807
- break;
49808
- case 3:
49809
- this._unFilterType3(rawData, unfilteredLine, byteWidth);
49810
- break;
49811
- case 4:
49812
- this._unFilterType4(rawData, unfilteredLine, byteWidth);
49813
- break;
49814
- default: throw new Error("Unrecognised filter type - " + filter$3);
49815
- }
49816
- }
49817
- this.write(unfilteredLine);
49818
- currentImage.lineIndex++;
49819
- if (currentImage.lineIndex >= currentImage.height) {
49820
- this._lastLine = null;
49821
- this._imageIndex++;
49822
- currentImage = this._images[this._imageIndex];
49823
- } else this._lastLine = unfilteredLine;
49824
- if (currentImage) this.read(currentImage.byteWidth + 1, this._reverseFilterLine.bind(this));
49825
- else {
49826
- this._lastLine = null;
49827
- this.complete();
49828
- }
49829
- };
49830
- });
49831
- var require_filter_parse_async$1 = __commonJSMin((exports, module) => {
49832
- var util$13 = __require("util");
49833
- var ChunkStream$4 = require_chunkstream$1();
49834
- var Filter$4 = require_filter_parse$1();
49835
- var FilterAsync$3 = module.exports = function(bitmapInfo) {
49836
- ChunkStream$4.call(this);
49837
- let buffers = [];
49838
- let that = this;
49839
- this._filter = new Filter$4(bitmapInfo, {
49840
- read: this.read.bind(this),
49841
- write: function(buffer$2) {
49842
- buffers.push(buffer$2);
49843
- },
49844
- complete: function() {
49845
- that.emit("complete", Buffer.concat(buffers));
49846
- }
49847
- });
49848
- this._filter.start();
49849
- };
49850
- util$13.inherits(FilterAsync$3, ChunkStream$4);
49851
- });
49852
- var require_constants$4 = __commonJSMin((exports, module) => {
49853
- module.exports = {
49854
- PNG_SIGNATURE: [
49855
- 137,
49856
- 80,
49857
- 78,
49858
- 71,
49859
- 13,
49860
- 10,
49861
- 26,
49862
- 10
49863
- ],
49864
- TYPE_IHDR: 1229472850,
49865
- TYPE_IEND: 1229278788,
49866
- TYPE_IDAT: 1229209940,
49867
- TYPE_PLTE: 1347179589,
49868
- TYPE_tRNS: 1951551059,
49869
- TYPE_gAMA: 1732332865,
49870
- COLORTYPE_GRAYSCALE: 0,
49871
- COLORTYPE_PALETTE: 1,
49872
- COLORTYPE_COLOR: 2,
49873
- COLORTYPE_ALPHA: 4,
49874
- COLORTYPE_PALETTE_COLOR: 3,
49875
- COLORTYPE_COLOR_ALPHA: 6,
49876
- COLORTYPE_TO_BPP_MAP: {
49877
- 0: 1,
49878
- 2: 3,
49879
- 3: 1,
49880
- 4: 2,
49881
- 6: 4
49882
- },
49883
- GAMMA_DIVISION: 1e5
49884
- };
49885
- });
49886
- var require_crc$1 = __commonJSMin((exports, module) => {
49887
- var crcTable$1 = [];
49888
- (function() {
49889
- for (let i$4 = 0; i$4 < 256; i$4++) {
49890
- let currentCrc = i$4;
49891
- for (let j = 0; j < 8; j++) if (currentCrc & 1) currentCrc = 3988292384 ^ currentCrc >>> 1;
49892
- else currentCrc = currentCrc >>> 1;
49893
- crcTable$1[i$4] = currentCrc;
49894
- }
49895
- })();
49896
- var CrcCalculator$3 = module.exports = function() {
49897
- this._crc = -1;
49898
- };
49899
- CrcCalculator$3.prototype.write = function(data$1) {
49900
- for (let i$4 = 0; i$4 < data$1.length; i$4++) this._crc = crcTable$1[(this._crc ^ data$1[i$4]) & 255] ^ this._crc >>> 8;
49901
- return true;
49902
- };
49903
- CrcCalculator$3.prototype.crc32 = function() {
49904
- return this._crc ^ -1;
49905
- };
49906
- CrcCalculator$3.crc32 = function(buf) {
49907
- let crc = -1;
49908
- for (let i$4 = 0; i$4 < buf.length; i$4++) crc = crcTable$1[(crc ^ buf[i$4]) & 255] ^ crc >>> 8;
49909
- return crc ^ -1;
49910
- };
49911
- });
49912
- var require_parser$2 = __commonJSMin((exports, module) => {
49913
- var constants$11 = require_constants$4();
49914
- var CrcCalculator$2 = require_crc$1();
49915
- var Parser$7 = module.exports = function(options$1, dependencies) {
49916
- this._options = options$1;
49917
- options$1.checkCRC = options$1.checkCRC !== false;
49918
- this._hasIHDR = false;
49919
- this._hasIEND = false;
49920
- this._emittedHeadersFinished = false;
49921
- this._palette = [];
49922
- this._colorType = 0;
49923
- this._chunks = {};
49924
- this._chunks[constants$11.TYPE_IHDR] = this._handleIHDR.bind(this);
49925
- this._chunks[constants$11.TYPE_IEND] = this._handleIEND.bind(this);
49926
- this._chunks[constants$11.TYPE_IDAT] = this._handleIDAT.bind(this);
49927
- this._chunks[constants$11.TYPE_PLTE] = this._handlePLTE.bind(this);
49928
- this._chunks[constants$11.TYPE_tRNS] = this._handleTRNS.bind(this);
49929
- this._chunks[constants$11.TYPE_gAMA] = this._handleGAMA.bind(this);
49930
- this.read = dependencies.read;
49931
- this.error = dependencies.error;
49932
- this.metadata = dependencies.metadata;
49933
- this.gamma = dependencies.gamma;
49934
- this.transColor = dependencies.transColor;
49935
- this.palette = dependencies.palette;
49936
- this.parsed = dependencies.parsed;
49937
- this.inflateData = dependencies.inflateData;
49938
- this.finished = dependencies.finished;
49939
- this.simpleTransparency = dependencies.simpleTransparency;
49940
- this.headersFinished = dependencies.headersFinished || function() {};
49941
- };
49942
- Parser$7.prototype.start = function() {
49943
- this.read(constants$11.PNG_SIGNATURE.length, this._parseSignature.bind(this));
49944
- };
49945
- Parser$7.prototype._parseSignature = function(data$1) {
49946
- let signature = constants$11.PNG_SIGNATURE;
49947
- for (let i$4 = 0; i$4 < signature.length; i$4++) if (data$1[i$4] !== signature[i$4]) {
49948
- this.error(/* @__PURE__ */ new Error("Invalid file signature"));
49949
- return;
49950
- }
49951
- this.read(8, this._parseChunkBegin.bind(this));
49952
- };
49953
- Parser$7.prototype._parseChunkBegin = function(data$1) {
49954
- let length = data$1.readUInt32BE(0);
49955
- let type$1 = data$1.readUInt32BE(4);
49956
- let name$2 = "";
49957
- for (let i$4 = 4; i$4 < 8; i$4++) name$2 += String.fromCharCode(data$1[i$4]);
49958
- let ancillary = Boolean(data$1[4] & 32);
49959
- if (!this._hasIHDR && type$1 !== constants$11.TYPE_IHDR) {
49960
- this.error(/* @__PURE__ */ new Error("Expected IHDR on beggining"));
49961
- return;
49962
- }
49963
- this._crc = new CrcCalculator$2();
49964
- this._crc.write(Buffer.from(name$2));
49965
- if (this._chunks[type$1]) return this._chunks[type$1](length);
49966
- if (!ancillary) {
49967
- this.error(/* @__PURE__ */ new Error("Unsupported critical chunk type " + name$2));
49968
- return;
49969
- }
49970
- this.read(length + 4, this._skipChunk.bind(this));
49971
- };
49972
- Parser$7.prototype._skipChunk = function() {
49973
- this.read(8, this._parseChunkBegin.bind(this));
49974
- };
49975
- Parser$7.prototype._handleChunkEnd = function() {
49976
- this.read(4, this._parseChunkEnd.bind(this));
49977
- };
49978
- Parser$7.prototype._parseChunkEnd = function(data$1) {
49979
- let fileCrc = data$1.readInt32BE(0);
49980
- let calcCrc = this._crc.crc32();
49981
- if (this._options.checkCRC && calcCrc !== fileCrc) {
49982
- this.error(/* @__PURE__ */ new Error("Crc error - " + fileCrc + " - " + calcCrc));
49983
- return;
49984
- }
49985
- if (!this._hasIEND) this.read(8, this._parseChunkBegin.bind(this));
49986
- };
49987
- Parser$7.prototype._handleIHDR = function(length) {
49988
- this.read(length, this._parseIHDR.bind(this));
49989
- };
49990
- Parser$7.prototype._parseIHDR = function(data$1) {
49991
- this._crc.write(data$1);
49992
- let width$1 = data$1.readUInt32BE(0);
49993
- let height$1 = data$1.readUInt32BE(4);
49994
- let depth$1 = data$1[8];
49995
- let colorType = data$1[9];
49996
- let compr = data$1[10];
49997
- let filter$3 = data$1[11];
49998
- let interlace = data$1[12];
49999
- if (depth$1 !== 8 && depth$1 !== 4 && depth$1 !== 2 && depth$1 !== 1 && depth$1 !== 16) {
50000
- this.error(/* @__PURE__ */ new Error("Unsupported bit depth " + depth$1));
50001
- return;
50002
- }
50003
- if (!(colorType in constants$11.COLORTYPE_TO_BPP_MAP)) {
50004
- this.error(/* @__PURE__ */ new Error("Unsupported color type"));
50005
- return;
50006
- }
50007
- if (compr !== 0) {
50008
- this.error(/* @__PURE__ */ new Error("Unsupported compression method"));
50009
- return;
50010
- }
50011
- if (filter$3 !== 0) {
50012
- this.error(/* @__PURE__ */ new Error("Unsupported filter method"));
50013
- return;
50014
- }
50015
- if (interlace !== 0 && interlace !== 1) {
50016
- this.error(/* @__PURE__ */ new Error("Unsupported interlace method"));
50017
- return;
50018
- }
50019
- this._colorType = colorType;
50020
- let bpp = constants$11.COLORTYPE_TO_BPP_MAP[this._colorType];
50021
- this._hasIHDR = true;
50022
- this.metadata({
50023
- width: width$1,
50024
- height: height$1,
50025
- depth: depth$1,
50026
- interlace: Boolean(interlace),
50027
- palette: Boolean(colorType & constants$11.COLORTYPE_PALETTE),
50028
- color: Boolean(colorType & constants$11.COLORTYPE_COLOR),
50029
- alpha: Boolean(colorType & constants$11.COLORTYPE_ALPHA),
50030
- bpp,
50031
- colorType
50032
- });
50033
- this._handleChunkEnd();
50034
- };
50035
- Parser$7.prototype._handlePLTE = function(length) {
50036
- this.read(length, this._parsePLTE.bind(this));
50037
- };
50038
- Parser$7.prototype._parsePLTE = function(data$1) {
50039
- this._crc.write(data$1);
50040
- let entries$1 = Math.floor(data$1.length / 3);
50041
- for (let i$4 = 0; i$4 < entries$1; i$4++) this._palette.push([
50042
- data$1[i$4 * 3],
50043
- data$1[i$4 * 3 + 1],
50044
- data$1[i$4 * 3 + 2],
50045
- 255
50046
- ]);
50047
- this.palette(this._palette);
50048
- this._handleChunkEnd();
50049
- };
50050
- Parser$7.prototype._handleTRNS = function(length) {
50051
- this.simpleTransparency();
50052
- this.read(length, this._parseTRNS.bind(this));
50053
- };
50054
- Parser$7.prototype._parseTRNS = function(data$1) {
50055
- this._crc.write(data$1);
50056
- if (this._colorType === constants$11.COLORTYPE_PALETTE_COLOR) {
50057
- if (this._palette.length === 0) {
50058
- this.error(/* @__PURE__ */ new Error("Transparency chunk must be after palette"));
50059
- return;
50060
- }
50061
- if (data$1.length > this._palette.length) {
50062
- this.error(/* @__PURE__ */ new Error("More transparent colors than palette size"));
50063
- return;
50064
- }
50065
- for (let i$4 = 0; i$4 < data$1.length; i$4++) this._palette[i$4][3] = data$1[i$4];
50066
- this.palette(this._palette);
50067
- }
50068
- if (this._colorType === constants$11.COLORTYPE_GRAYSCALE) this.transColor([data$1.readUInt16BE(0)]);
50069
- if (this._colorType === constants$11.COLORTYPE_COLOR) this.transColor([
50070
- data$1.readUInt16BE(0),
50071
- data$1.readUInt16BE(2),
50072
- data$1.readUInt16BE(4)
50073
- ]);
50074
- this._handleChunkEnd();
50075
- };
50076
- Parser$7.prototype._handleGAMA = function(length) {
50077
- this.read(length, this._parseGAMA.bind(this));
50078
- };
50079
- Parser$7.prototype._parseGAMA = function(data$1) {
50080
- this._crc.write(data$1);
50081
- this.gamma(data$1.readUInt32BE(0) / constants$11.GAMMA_DIVISION);
50082
- this._handleChunkEnd();
50083
- };
50084
- Parser$7.prototype._handleIDAT = function(length) {
50085
- if (!this._emittedHeadersFinished) {
50086
- this._emittedHeadersFinished = true;
50087
- this.headersFinished();
50088
- }
50089
- this.read(-length, this._parseIDAT.bind(this, length));
50090
- };
50091
- Parser$7.prototype._parseIDAT = function(length, data$1) {
50092
- this._crc.write(data$1);
50093
- if (this._colorType === constants$11.COLORTYPE_PALETTE_COLOR && this._palette.length === 0) throw new Error("Expected palette not found");
50094
- this.inflateData(data$1);
50095
- let leftOverLength = length - data$1.length;
50096
- if (leftOverLength > 0) this._handleIDAT(leftOverLength);
50097
- else this._handleChunkEnd();
50098
- };
50099
- Parser$7.prototype._handleIEND = function(length) {
50100
- this.read(length, this._parseIEND.bind(this));
50101
- };
50102
- Parser$7.prototype._parseIEND = function(data$1) {
50103
- this._crc.write(data$1);
50104
- this._hasIEND = true;
50105
- this._handleChunkEnd();
50106
- if (this.finished) this.finished();
50107
- };
50108
- });
50109
- var require_bitmapper$1 = __commonJSMin((exports) => {
50110
- var interlaceUtils$2 = require_interlace$1();
50111
- var pixelBppMapper$1 = [
50112
- function() {},
50113
- function(pxData, data$1, pxPos, rawPos) {
50114
- if (rawPos === data$1.length) throw new Error("Ran out of data");
50115
- let pixel = data$1[rawPos];
50116
- pxData[pxPos] = pixel;
50117
- pxData[pxPos + 1] = pixel;
50118
- pxData[pxPos + 2] = pixel;
50119
- pxData[pxPos + 3] = 255;
50120
- },
50121
- function(pxData, data$1, pxPos, rawPos) {
50122
- if (rawPos + 1 >= data$1.length) throw new Error("Ran out of data");
50123
- let pixel = data$1[rawPos];
50124
- pxData[pxPos] = pixel;
50125
- pxData[pxPos + 1] = pixel;
50126
- pxData[pxPos + 2] = pixel;
50127
- pxData[pxPos + 3] = data$1[rawPos + 1];
50128
- },
50129
- function(pxData, data$1, pxPos, rawPos) {
50130
- if (rawPos + 2 >= data$1.length) throw new Error("Ran out of data");
50131
- pxData[pxPos] = data$1[rawPos];
50132
- pxData[pxPos + 1] = data$1[rawPos + 1];
50133
- pxData[pxPos + 2] = data$1[rawPos + 2];
50134
- pxData[pxPos + 3] = 255;
50135
- },
50136
- function(pxData, data$1, pxPos, rawPos) {
50137
- if (rawPos + 3 >= data$1.length) throw new Error("Ran out of data");
50138
- pxData[pxPos] = data$1[rawPos];
50139
- pxData[pxPos + 1] = data$1[rawPos + 1];
50140
- pxData[pxPos + 2] = data$1[rawPos + 2];
50141
- pxData[pxPos + 3] = data$1[rawPos + 3];
50142
- }
50143
- ];
50144
- var pixelBppCustomMapper$1 = [
50145
- function() {},
50146
- function(pxData, pixelData, pxPos, maxBit) {
50147
- let pixel = pixelData[0];
50148
- pxData[pxPos] = pixel;
50149
- pxData[pxPos + 1] = pixel;
50150
- pxData[pxPos + 2] = pixel;
50151
- pxData[pxPos + 3] = maxBit;
50152
- },
50153
- function(pxData, pixelData, pxPos) {
50154
- let pixel = pixelData[0];
50155
- pxData[pxPos] = pixel;
50156
- pxData[pxPos + 1] = pixel;
50157
- pxData[pxPos + 2] = pixel;
50158
- pxData[pxPos + 3] = pixelData[1];
50159
- },
50160
- function(pxData, pixelData, pxPos, maxBit) {
50161
- pxData[pxPos] = pixelData[0];
50162
- pxData[pxPos + 1] = pixelData[1];
50163
- pxData[pxPos + 2] = pixelData[2];
50164
- pxData[pxPos + 3] = maxBit;
50165
- },
50166
- function(pxData, pixelData, pxPos) {
50167
- pxData[pxPos] = pixelData[0];
50168
- pxData[pxPos + 1] = pixelData[1];
50169
- pxData[pxPos + 2] = pixelData[2];
50170
- pxData[pxPos + 3] = pixelData[3];
50171
- }
50172
- ];
50173
- function bitRetriever$1(data$1, depth$1) {
50174
- let leftOver = [];
50175
- let i$4 = 0;
50176
- function split() {
50177
- if (i$4 === data$1.length) throw new Error("Ran out of data");
50178
- let byte = data$1[i$4];
50179
- i$4++;
50180
- let byte8, byte7, byte6, byte5, byte4, byte3, byte2, byte1;
50181
- switch (depth$1) {
50182
- default: throw new Error("unrecognised depth");
50183
- case 16:
50184
- byte2 = data$1[i$4];
50185
- i$4++;
50186
- leftOver.push((byte << 8) + byte2);
50187
- break;
50188
- case 4:
50189
- byte2 = byte & 15;
50190
- byte1 = byte >> 4;
50191
- leftOver.push(byte1, byte2);
50192
- break;
50193
- case 2:
50194
- byte4 = byte & 3;
50195
- byte3 = byte >> 2 & 3;
50196
- byte2 = byte >> 4 & 3;
50197
- byte1 = byte >> 6 & 3;
50198
- leftOver.push(byte1, byte2, byte3, byte4);
50199
- break;
50200
- case 1:
50201
- byte8 = byte & 1;
50202
- byte7 = byte >> 1 & 1;
50203
- byte6 = byte >> 2 & 1;
50204
- byte5 = byte >> 3 & 1;
50205
- byte4 = byte >> 4 & 1;
50206
- byte3 = byte >> 5 & 1;
50207
- byte2 = byte >> 6 & 1;
50208
- byte1 = byte >> 7 & 1;
50209
- leftOver.push(byte1, byte2, byte3, byte4, byte5, byte6, byte7, byte8);
50210
- break;
50211
- }
50212
- }
50213
- return {
50214
- get: function(count) {
50215
- while (leftOver.length < count) split();
50216
- let returner = leftOver.slice(0, count);
50217
- leftOver = leftOver.slice(count);
50218
- return returner;
50219
- },
50220
- resetAfterLine: function() {
50221
- leftOver.length = 0;
50222
- },
50223
- end: function() {
50224
- if (i$4 !== data$1.length) throw new Error("extra data found");
50225
- }
50226
- };
50227
- }
50228
- function mapImage8Bit$1(image$1, pxData, getPxPos, bpp, data$1, rawPos) {
50229
- let imageWidth = image$1.width;
50230
- let imageHeight = image$1.height;
50231
- let imagePass = image$1.index;
50232
- for (let y$2 = 0; y$2 < imageHeight; y$2++) for (let x$1 = 0; x$1 < imageWidth; x$1++) {
50233
- let pxPos = getPxPos(x$1, y$2, imagePass);
50234
- pixelBppMapper$1[bpp](pxData, data$1, pxPos, rawPos);
50235
- rawPos += bpp;
50236
- }
50237
- return rawPos;
50238
- }
50239
- function mapImageCustomBit$1(image$1, pxData, getPxPos, bpp, bits, maxBit) {
50240
- let imageWidth = image$1.width;
50241
- let imageHeight = image$1.height;
50242
- let imagePass = image$1.index;
50243
- for (let y$2 = 0; y$2 < imageHeight; y$2++) {
50244
- for (let x$1 = 0; x$1 < imageWidth; x$1++) {
50245
- let pixelData = bits.get(bpp);
50246
- let pxPos = getPxPos(x$1, y$2, imagePass);
50247
- pixelBppCustomMapper$1[bpp](pxData, pixelData, pxPos, maxBit);
50248
- }
50249
- bits.resetAfterLine();
50250
- }
50251
- }
50252
- exports.dataToBitMap = function(data$1, bitmapInfo) {
50253
- let width$1 = bitmapInfo.width;
50254
- let height$1 = bitmapInfo.height;
50255
- let depth$1 = bitmapInfo.depth;
50256
- let bpp = bitmapInfo.bpp;
50257
- let interlace = bitmapInfo.interlace;
50258
- let bits;
50259
- if (depth$1 !== 8) bits = bitRetriever$1(data$1, depth$1);
50260
- let pxData;
50261
- if (depth$1 <= 8) pxData = Buffer.alloc(width$1 * height$1 * 4);
50262
- else pxData = new Uint16Array(width$1 * height$1 * 4);
50263
- let maxBit = Math.pow(2, depth$1) - 1;
50264
- let rawPos = 0;
50265
- let images;
50266
- let getPxPos;
50267
- if (interlace) {
50268
- images = interlaceUtils$2.getImagePasses(width$1, height$1);
50269
- getPxPos = interlaceUtils$2.getInterlaceIterator(width$1, height$1);
50270
- } else {
50271
- let nonInterlacedPxPos = 0;
50272
- getPxPos = function() {
50273
- let returner = nonInterlacedPxPos;
50274
- nonInterlacedPxPos += 4;
50275
- return returner;
50276
- };
50277
- images = [{
50278
- width: width$1,
50279
- height: height$1
50280
- }];
50281
- }
50282
- for (let imageIndex = 0; imageIndex < images.length; imageIndex++) if (depth$1 === 8) rawPos = mapImage8Bit$1(images[imageIndex], pxData, getPxPos, bpp, data$1, rawPos);
50283
- else mapImageCustomBit$1(images[imageIndex], pxData, getPxPos, bpp, bits, maxBit);
50284
- if (depth$1 === 8) {
50285
- if (rawPos !== data$1.length) throw new Error("extra data found");
50286
- } else bits.end();
50287
- return pxData;
50288
- };
50289
- });
50290
- var require_format_normaliser$1 = __commonJSMin((exports, module) => {
50291
- function dePalette$1(indata, outdata, width$1, height$1, palette) {
50292
- let pxPos = 0;
50293
- for (let y$2 = 0; y$2 < height$1; y$2++) for (let x$1 = 0; x$1 < width$1; x$1++) {
50294
- let color$2 = palette[indata[pxPos]];
50295
- if (!color$2) throw new Error("index " + indata[pxPos] + " not in palette");
50296
- for (let i$4 = 0; i$4 < 4; i$4++) outdata[pxPos + i$4] = color$2[i$4];
50297
- pxPos += 4;
50298
- }
50299
- }
50300
- function replaceTransparentColor$1(indata, outdata, width$1, height$1, transColor) {
50301
- let pxPos = 0;
50302
- for (let y$2 = 0; y$2 < height$1; y$2++) for (let x$1 = 0; x$1 < width$1; x$1++) {
50303
- let makeTrans = false;
50304
- if (transColor.length === 1) {
50305
- if (transColor[0] === indata[pxPos]) makeTrans = true;
50306
- } else if (transColor[0] === indata[pxPos] && transColor[1] === indata[pxPos + 1] && transColor[2] === indata[pxPos + 2]) makeTrans = true;
50307
- if (makeTrans) for (let i$4 = 0; i$4 < 4; i$4++) outdata[pxPos + i$4] = 0;
50308
- pxPos += 4;
50309
- }
50310
- }
50311
- function scaleDepth$1(indata, outdata, width$1, height$1, depth$1) {
50312
- let maxOutSample = 255;
50313
- let maxInSample = Math.pow(2, depth$1) - 1;
50314
- let pxPos = 0;
50315
- for (let y$2 = 0; y$2 < height$1; y$2++) for (let x$1 = 0; x$1 < width$1; x$1++) {
50316
- for (let i$4 = 0; i$4 < 4; i$4++) outdata[pxPos + i$4] = Math.floor(indata[pxPos + i$4] * maxOutSample / maxInSample + .5);
50317
- pxPos += 4;
50318
- }
50319
- }
50320
- module.exports = function(indata, imageData, skipRescale = false) {
50321
- let depth$1 = imageData.depth;
50322
- let width$1 = imageData.width;
50323
- let height$1 = imageData.height;
50324
- let colorType = imageData.colorType;
50325
- let transColor = imageData.transColor;
50326
- let palette = imageData.palette;
50327
- let outdata = indata;
50328
- if (colorType === 3) dePalette$1(indata, outdata, width$1, height$1, palette);
50329
- else {
50330
- if (transColor) replaceTransparentColor$1(indata, outdata, width$1, height$1, transColor);
50331
- if (depth$1 !== 8 && !skipRescale) {
50332
- if (depth$1 === 16) outdata = Buffer.alloc(width$1 * height$1 * 4);
50333
- scaleDepth$1(indata, outdata, width$1, height$1, depth$1);
50334
- }
50335
- }
50336
- return outdata;
50337
- };
50338
- });
50339
- var require_parser_async$1 = __commonJSMin((exports, module) => {
50340
- var util$12 = __require("util");
50341
- var zlib$11 = __require("zlib");
50342
- var ChunkStream$3 = require_chunkstream$1();
50343
- var FilterAsync$2 = require_filter_parse_async$1();
50344
- var Parser$6 = require_parser$2();
50345
- var bitmapper$3 = require_bitmapper$1();
50346
- var formatNormaliser$3 = require_format_normaliser$1();
50347
- var ParserAsync$1 = module.exports = function(options$1) {
50348
- ChunkStream$3.call(this);
50349
- this._parser = new Parser$6(options$1, {
50350
- read: this.read.bind(this),
50351
- error: this._handleError.bind(this),
50352
- metadata: this._handleMetaData.bind(this),
50353
- gamma: this.emit.bind(this, "gamma"),
50354
- palette: this._handlePalette.bind(this),
50355
- transColor: this._handleTransColor.bind(this),
50356
- finished: this._finished.bind(this),
50357
- inflateData: this._inflateData.bind(this),
50358
- simpleTransparency: this._simpleTransparency.bind(this),
50359
- headersFinished: this._headersFinished.bind(this)
50360
- });
50361
- this._options = options$1;
50362
- this.writable = true;
50363
- this._parser.start();
50364
- };
50365
- util$12.inherits(ParserAsync$1, ChunkStream$3);
50366
- ParserAsync$1.prototype._handleError = function(err) {
50367
- this.emit("error", err);
50368
- this.writable = false;
50369
- this.destroy();
50370
- if (this._inflate && this._inflate.destroy) this._inflate.destroy();
50371
- if (this._filter) {
50372
- this._filter.destroy();
50373
- this._filter.on("error", function() {});
50374
- }
50375
- this.errord = true;
50376
- };
50377
- ParserAsync$1.prototype._inflateData = function(data$1) {
50378
- if (!this._inflate) if (this._bitmapInfo.interlace) {
50379
- this._inflate = zlib$11.createInflate();
50380
- this._inflate.on("error", this.emit.bind(this, "error"));
50381
- this._filter.on("complete", this._complete.bind(this));
50382
- this._inflate.pipe(this._filter);
50383
- } else {
50384
- let imageSize = ((this._bitmapInfo.width * this._bitmapInfo.bpp * this._bitmapInfo.depth + 7 >> 3) + 1) * this._bitmapInfo.height;
50385
- let chunkSize = Math.max(imageSize, zlib$11.Z_MIN_CHUNK);
50386
- this._inflate = zlib$11.createInflate({ chunkSize });
50387
- let leftToInflate = imageSize;
50388
- let emitError = this.emit.bind(this, "error");
50389
- this._inflate.on("error", function(err) {
50390
- if (!leftToInflate) return;
50391
- emitError(err);
50392
- });
50393
- this._filter.on("complete", this._complete.bind(this));
50394
- let filterWrite = this._filter.write.bind(this._filter);
50395
- this._inflate.on("data", function(chunk) {
50396
- if (!leftToInflate) return;
50397
- if (chunk.length > leftToInflate) chunk = chunk.slice(0, leftToInflate);
50398
- leftToInflate -= chunk.length;
50399
- filterWrite(chunk);
50400
- });
50401
- this._inflate.on("end", this._filter.end.bind(this._filter));
50402
- }
50403
- this._inflate.write(data$1);
50404
- };
50405
- ParserAsync$1.prototype._handleMetaData = function(metaData) {
50406
- this._metaData = metaData;
50407
- this._bitmapInfo = Object.create(metaData);
50408
- this._filter = new FilterAsync$2(this._bitmapInfo);
50409
- };
50410
- ParserAsync$1.prototype._handleTransColor = function(transColor) {
50411
- this._bitmapInfo.transColor = transColor;
50412
- };
50413
- ParserAsync$1.prototype._handlePalette = function(palette) {
50414
- this._bitmapInfo.palette = palette;
50415
- };
50416
- ParserAsync$1.prototype._simpleTransparency = function() {
50417
- this._metaData.alpha = true;
50418
- };
50419
- ParserAsync$1.prototype._headersFinished = function() {
50420
- this.emit("metadata", this._metaData);
50421
- };
50422
- ParserAsync$1.prototype._finished = function() {
50423
- if (this.errord) return;
50424
- if (!this._inflate) this.emit("error", "No Inflate block");
50425
- else this._inflate.end();
50426
- };
50427
- ParserAsync$1.prototype._complete = function(filteredData) {
50428
- if (this.errord) return;
50429
- let normalisedBitmapData;
50430
- try {
50431
- let bitmapData = bitmapper$3.dataToBitMap(filteredData, this._bitmapInfo);
50432
- normalisedBitmapData = formatNormaliser$3(bitmapData, this._bitmapInfo, this._options.skipRescale);
50433
- bitmapData = null;
50434
- } catch (ex) {
50435
- this._handleError(ex);
50436
- return;
50437
- }
50438
- this.emit("parsed", normalisedBitmapData);
50439
- };
50440
- });
50441
- var require_bitpacker$1 = __commonJSMin((exports, module) => {
50442
- var constants$10 = require_constants$4();
50443
- module.exports = function(dataIn, width$1, height$1, options$1) {
50444
- let outHasAlpha = [constants$10.COLORTYPE_COLOR_ALPHA, constants$10.COLORTYPE_ALPHA].indexOf(options$1.colorType) !== -1;
50445
- if (options$1.colorType === options$1.inputColorType) {
50446
- let bigEndian = function() {
50447
- let buffer$2 = /* @__PURE__ */ new ArrayBuffer(2);
50448
- new DataView(buffer$2).setInt16(0, 256, true);
50449
- return new Int16Array(buffer$2)[0] !== 256;
50450
- }();
50451
- if (options$1.bitDepth === 8 || options$1.bitDepth === 16 && bigEndian) return dataIn;
50452
- }
50453
- let data$1 = options$1.bitDepth !== 16 ? dataIn : new Uint16Array(dataIn.buffer);
50454
- let maxValue = 255;
50455
- let inBpp = constants$10.COLORTYPE_TO_BPP_MAP[options$1.inputColorType];
50456
- if (inBpp === 4 && !options$1.inputHasAlpha) inBpp = 3;
50457
- let outBpp = constants$10.COLORTYPE_TO_BPP_MAP[options$1.colorType];
50458
- if (options$1.bitDepth === 16) {
50459
- maxValue = 65535;
50460
- outBpp *= 2;
50461
- }
50462
- let outData = Buffer.alloc(width$1 * height$1 * outBpp);
50463
- let inIndex = 0;
50464
- let outIndex = 0;
50465
- let bgColor = options$1.bgColor || {};
50466
- if (bgColor.red === void 0) bgColor.red = maxValue;
50467
- if (bgColor.green === void 0) bgColor.green = maxValue;
50468
- if (bgColor.blue === void 0) bgColor.blue = maxValue;
50469
- function getRGBA() {
50470
- let red;
50471
- let green;
50472
- let blue;
50473
- let alpha$1 = maxValue;
50474
- switch (options$1.inputColorType) {
50475
- case constants$10.COLORTYPE_COLOR_ALPHA:
50476
- alpha$1 = data$1[inIndex + 3];
50477
- red = data$1[inIndex];
50478
- green = data$1[inIndex + 1];
50479
- blue = data$1[inIndex + 2];
50480
- break;
50481
- case constants$10.COLORTYPE_COLOR:
50482
- red = data$1[inIndex];
50483
- green = data$1[inIndex + 1];
50484
- blue = data$1[inIndex + 2];
50485
- break;
50486
- case constants$10.COLORTYPE_ALPHA:
50487
- alpha$1 = data$1[inIndex + 1];
50488
- red = data$1[inIndex];
50489
- green = red;
50490
- blue = red;
50491
- break;
50492
- case constants$10.COLORTYPE_GRAYSCALE:
50493
- red = data$1[inIndex];
50494
- green = red;
50495
- blue = red;
50496
- break;
50497
- default: throw new Error("input color type:" + options$1.inputColorType + " is not supported at present");
50498
- }
50499
- if (options$1.inputHasAlpha) {
50500
- if (!outHasAlpha) {
50501
- alpha$1 /= maxValue;
50502
- red = Math.min(Math.max(Math.round((1 - alpha$1) * bgColor.red + alpha$1 * red), 0), maxValue);
50503
- green = Math.min(Math.max(Math.round((1 - alpha$1) * bgColor.green + alpha$1 * green), 0), maxValue);
50504
- blue = Math.min(Math.max(Math.round((1 - alpha$1) * bgColor.blue + alpha$1 * blue), 0), maxValue);
50505
- }
50506
- }
50507
- return {
50508
- red,
50509
- green,
50510
- blue,
50511
- alpha: alpha$1
50512
- };
50513
- }
50514
- for (let y$2 = 0; y$2 < height$1; y$2++) for (let x$1 = 0; x$1 < width$1; x$1++) {
50515
- let rgba$1 = getRGBA(data$1, inIndex);
50516
- switch (options$1.colorType) {
50517
- case constants$10.COLORTYPE_COLOR_ALPHA:
50518
- case constants$10.COLORTYPE_COLOR:
50519
- if (options$1.bitDepth === 8) {
50520
- outData[outIndex] = rgba$1.red;
50521
- outData[outIndex + 1] = rgba$1.green;
50522
- outData[outIndex + 2] = rgba$1.blue;
50523
- if (outHasAlpha) outData[outIndex + 3] = rgba$1.alpha;
50524
- } else {
50525
- outData.writeUInt16BE(rgba$1.red, outIndex);
50526
- outData.writeUInt16BE(rgba$1.green, outIndex + 2);
50527
- outData.writeUInt16BE(rgba$1.blue, outIndex + 4);
50528
- if (outHasAlpha) outData.writeUInt16BE(rgba$1.alpha, outIndex + 6);
50529
- }
50530
- break;
50531
- case constants$10.COLORTYPE_ALPHA:
50532
- case constants$10.COLORTYPE_GRAYSCALE: {
50533
- let grayscale = (rgba$1.red + rgba$1.green + rgba$1.blue) / 3;
50534
- if (options$1.bitDepth === 8) {
50535
- outData[outIndex] = grayscale;
50536
- if (outHasAlpha) outData[outIndex + 1] = rgba$1.alpha;
50537
- } else {
50538
- outData.writeUInt16BE(grayscale, outIndex);
50539
- if (outHasAlpha) outData.writeUInt16BE(rgba$1.alpha, outIndex + 2);
50540
- }
50541
- break;
50542
- }
50543
- default: throw new Error("unrecognised color Type " + options$1.colorType);
50544
- }
50545
- inIndex += inBpp;
50546
- outIndex += outBpp;
50547
- }
50548
- return outData;
50549
- };
50550
- });
50551
- var require_filter_pack$1 = __commonJSMin((exports, module) => {
50552
- var paethPredictor$2 = require_paeth_predictor$1();
50553
- function filterNone$1(pxData, pxPos, byteWidth, rawData, rawPos) {
50554
- for (let x$1 = 0; x$1 < byteWidth; x$1++) rawData[rawPos + x$1] = pxData[pxPos + x$1];
50555
- }
50556
- function filterSumNone$1(pxData, pxPos, byteWidth) {
50557
- let sum = 0;
50558
- let length = pxPos + byteWidth;
50559
- for (let i$4 = pxPos; i$4 < length; i$4++) sum += Math.abs(pxData[i$4]);
50560
- return sum;
50561
- }
50562
- function filterSub$1(pxData, pxPos, byteWidth, rawData, rawPos, bpp) {
50563
- for (let x$1 = 0; x$1 < byteWidth; x$1++) {
50564
- let left = x$1 >= bpp ? pxData[pxPos + x$1 - bpp] : 0;
50565
- let val = pxData[pxPos + x$1] - left;
50566
- rawData[rawPos + x$1] = val;
50567
- }
50568
- }
50569
- function filterSumSub$1(pxData, pxPos, byteWidth, bpp) {
50570
- let sum = 0;
50571
- for (let x$1 = 0; x$1 < byteWidth; x$1++) {
50572
- let left = x$1 >= bpp ? pxData[pxPos + x$1 - bpp] : 0;
50573
- let val = pxData[pxPos + x$1] - left;
50574
- sum += Math.abs(val);
50575
- }
50576
- return sum;
50577
- }
50578
- function filterUp$1(pxData, pxPos, byteWidth, rawData, rawPos) {
50579
- for (let x$1 = 0; x$1 < byteWidth; x$1++) {
50580
- let up = pxPos > 0 ? pxData[pxPos + x$1 - byteWidth] : 0;
50581
- let val = pxData[pxPos + x$1] - up;
50582
- rawData[rawPos + x$1] = val;
50583
- }
50584
- }
50585
- function filterSumUp$1(pxData, pxPos, byteWidth) {
50586
- let sum = 0;
50587
- let length = pxPos + byteWidth;
50588
- for (let x$1 = pxPos; x$1 < length; x$1++) {
50589
- let up = pxPos > 0 ? pxData[x$1 - byteWidth] : 0;
50590
- let val = pxData[x$1] - up;
50591
- sum += Math.abs(val);
50592
- }
50593
- return sum;
50594
- }
50595
- function filterAvg$1(pxData, pxPos, byteWidth, rawData, rawPos, bpp) {
50596
- for (let x$1 = 0; x$1 < byteWidth; x$1++) {
50597
- let left = x$1 >= bpp ? pxData[pxPos + x$1 - bpp] : 0;
50598
- let up = pxPos > 0 ? pxData[pxPos + x$1 - byteWidth] : 0;
50599
- let val = pxData[pxPos + x$1] - (left + up >> 1);
50600
- rawData[rawPos + x$1] = val;
50601
- }
50602
- }
50603
- function filterSumAvg$1(pxData, pxPos, byteWidth, bpp) {
50604
- let sum = 0;
50605
- for (let x$1 = 0; x$1 < byteWidth; x$1++) {
50606
- let left = x$1 >= bpp ? pxData[pxPos + x$1 - bpp] : 0;
50607
- let up = pxPos > 0 ? pxData[pxPos + x$1 - byteWidth] : 0;
50608
- let val = pxData[pxPos + x$1] - (left + up >> 1);
50609
- sum += Math.abs(val);
50610
- }
50611
- return sum;
50612
- }
50613
- function filterPaeth$1(pxData, pxPos, byteWidth, rawData, rawPos, bpp) {
50614
- for (let x$1 = 0; x$1 < byteWidth; x$1++) {
50615
- let left = x$1 >= bpp ? pxData[pxPos + x$1 - bpp] : 0;
50616
- let up = pxPos > 0 ? pxData[pxPos + x$1 - byteWidth] : 0;
50617
- let upleft = pxPos > 0 && x$1 >= bpp ? pxData[pxPos + x$1 - (byteWidth + bpp)] : 0;
50618
- let val = pxData[pxPos + x$1] - paethPredictor$2(left, up, upleft);
50619
- rawData[rawPos + x$1] = val;
50620
- }
50621
- }
50622
- function filterSumPaeth$1(pxData, pxPos, byteWidth, bpp) {
50623
- let sum = 0;
50624
- for (let x$1 = 0; x$1 < byteWidth; x$1++) {
50625
- let left = x$1 >= bpp ? pxData[pxPos + x$1 - bpp] : 0;
50626
- let up = pxPos > 0 ? pxData[pxPos + x$1 - byteWidth] : 0;
50627
- let upleft = pxPos > 0 && x$1 >= bpp ? pxData[pxPos + x$1 - (byteWidth + bpp)] : 0;
50628
- let val = pxData[pxPos + x$1] - paethPredictor$2(left, up, upleft);
50629
- sum += Math.abs(val);
50630
- }
50631
- return sum;
50632
- }
50633
- var filters$1 = {
50634
- 0: filterNone$1,
50635
- 1: filterSub$1,
50636
- 2: filterUp$1,
50637
- 3: filterAvg$1,
50638
- 4: filterPaeth$1
50639
- };
50640
- var filterSums$1 = {
50641
- 0: filterSumNone$1,
50642
- 1: filterSumSub$1,
50643
- 2: filterSumUp$1,
50644
- 3: filterSumAvg$1,
50645
- 4: filterSumPaeth$1
50646
- };
50647
- module.exports = function(pxData, width$1, height$1, options$1, bpp) {
50648
- let filterTypes;
50649
- if (!("filterType" in options$1) || options$1.filterType === -1) filterTypes = [
50650
- 0,
50651
- 1,
50652
- 2,
50653
- 3,
50654
- 4
50655
- ];
50656
- else if (typeof options$1.filterType === "number") filterTypes = [options$1.filterType];
50657
- else throw new Error("unrecognised filter types");
50658
- if (options$1.bitDepth === 16) bpp *= 2;
50659
- let byteWidth = width$1 * bpp;
50660
- let rawPos = 0;
50661
- let pxPos = 0;
50662
- let rawData = Buffer.alloc((byteWidth + 1) * height$1);
50663
- let sel = filterTypes[0];
50664
- for (let y$2 = 0; y$2 < height$1; y$2++) {
50665
- if (filterTypes.length > 1) {
50666
- let min$1 = Infinity;
50667
- for (let i$4 = 0; i$4 < filterTypes.length; i$4++) {
50668
- let sum = filterSums$1[filterTypes[i$4]](pxData, pxPos, byteWidth, bpp);
50669
- if (sum < min$1) {
50670
- sel = filterTypes[i$4];
50671
- min$1 = sum;
50672
- }
50673
- }
50674
- }
50675
- rawData[rawPos] = sel;
50676
- rawPos++;
50677
- filters$1[sel](pxData, pxPos, byteWidth, rawData, rawPos, bpp);
50678
- rawPos += byteWidth;
50679
- pxPos += byteWidth;
50680
- }
50681
- return rawData;
50682
- };
50683
- });
50684
- var require_packer$1 = __commonJSMin((exports, module) => {
50685
- var constants$9 = require_constants$4();
50686
- var CrcStream$1 = require_crc$1();
50687
- var bitPacker$1 = require_bitpacker$1();
50688
- var filter$2 = require_filter_pack$1();
50689
- var zlib$10 = __require("zlib");
50690
- var Packer$7 = module.exports = function(options$1) {
50691
- this._options = options$1;
50692
- options$1.deflateChunkSize = options$1.deflateChunkSize || 32 * 1024;
50693
- options$1.deflateLevel = options$1.deflateLevel != null ? options$1.deflateLevel : 9;
50694
- options$1.deflateStrategy = options$1.deflateStrategy != null ? options$1.deflateStrategy : 3;
50695
- options$1.inputHasAlpha = options$1.inputHasAlpha != null ? options$1.inputHasAlpha : true;
50696
- options$1.deflateFactory = options$1.deflateFactory || zlib$10.createDeflate;
50697
- options$1.bitDepth = options$1.bitDepth || 8;
50698
- options$1.colorType = typeof options$1.colorType === "number" ? options$1.colorType : constants$9.COLORTYPE_COLOR_ALPHA;
50699
- options$1.inputColorType = typeof options$1.inputColorType === "number" ? options$1.inputColorType : constants$9.COLORTYPE_COLOR_ALPHA;
50700
- if ([
50701
- constants$9.COLORTYPE_GRAYSCALE,
50702
- constants$9.COLORTYPE_COLOR,
50703
- constants$9.COLORTYPE_COLOR_ALPHA,
50704
- constants$9.COLORTYPE_ALPHA
50705
- ].indexOf(options$1.colorType) === -1) throw new Error("option color type:" + options$1.colorType + " is not supported at present");
50706
- if ([
50707
- constants$9.COLORTYPE_GRAYSCALE,
50708
- constants$9.COLORTYPE_COLOR,
50709
- constants$9.COLORTYPE_COLOR_ALPHA,
50710
- constants$9.COLORTYPE_ALPHA
50711
- ].indexOf(options$1.inputColorType) === -1) throw new Error("option input color type:" + options$1.inputColorType + " is not supported at present");
50712
- if (options$1.bitDepth !== 8 && options$1.bitDepth !== 16) throw new Error("option bit depth:" + options$1.bitDepth + " is not supported at present");
50713
- };
50714
- Packer$7.prototype.getDeflateOptions = function() {
50715
- return {
50716
- chunkSize: this._options.deflateChunkSize,
50717
- level: this._options.deflateLevel,
50718
- strategy: this._options.deflateStrategy
50719
- };
50720
- };
50721
- Packer$7.prototype.createDeflate = function() {
50722
- return this._options.deflateFactory(this.getDeflateOptions());
50723
- };
50724
- Packer$7.prototype.filterData = function(data$1, width$1, height$1) {
50725
- let packedData = bitPacker$1(data$1, width$1, height$1, this._options);
50726
- let bpp = constants$9.COLORTYPE_TO_BPP_MAP[this._options.colorType];
50727
- return filter$2(packedData, width$1, height$1, this._options, bpp);
50728
- };
50729
- Packer$7.prototype._packChunk = function(type$1, data$1) {
50730
- let len = data$1 ? data$1.length : 0;
50731
- let buf = Buffer.alloc(len + 12);
50732
- buf.writeUInt32BE(len, 0);
50733
- buf.writeUInt32BE(type$1, 4);
50734
- if (data$1) data$1.copy(buf, 8);
50735
- buf.writeInt32BE(CrcStream$1.crc32(buf.slice(4, buf.length - 4)), buf.length - 4);
50736
- return buf;
50737
- };
50738
- Packer$7.prototype.packGAMA = function(gamma) {
50739
- let buf = Buffer.alloc(4);
50740
- buf.writeUInt32BE(Math.floor(gamma * constants$9.GAMMA_DIVISION), 0);
50741
- return this._packChunk(constants$9.TYPE_gAMA, buf);
50742
- };
50743
- Packer$7.prototype.packIHDR = function(width$1, height$1) {
50744
- let buf = Buffer.alloc(13);
50745
- buf.writeUInt32BE(width$1, 0);
50746
- buf.writeUInt32BE(height$1, 4);
50747
- buf[8] = this._options.bitDepth;
50748
- buf[9] = this._options.colorType;
50749
- buf[10] = 0;
50750
- buf[11] = 0;
50751
- buf[12] = 0;
50752
- return this._packChunk(constants$9.TYPE_IHDR, buf);
50753
- };
50754
- Packer$7.prototype.packIDAT = function(data$1) {
50755
- return this._packChunk(constants$9.TYPE_IDAT, data$1);
50756
- };
50757
- Packer$7.prototype.packIEND = function() {
50758
- return this._packChunk(constants$9.TYPE_IEND, null);
50759
- };
50760
- });
50761
- var require_packer_async$1 = __commonJSMin((exports, module) => {
50762
- var util$11 = __require("util");
50763
- var Stream$5 = __require("stream");
50764
- var constants$8 = require_constants$4();
50765
- var Packer$6 = require_packer$1();
50766
- var PackerAsync$1 = module.exports = function(opt) {
50767
- Stream$5.call(this);
50768
- this._packer = new Packer$6(opt || {});
50769
- this._deflate = this._packer.createDeflate();
50770
- this.readable = true;
50771
- };
50772
- util$11.inherits(PackerAsync$1, Stream$5);
50773
- PackerAsync$1.prototype.pack = function(data$1, width$1, height$1, gamma) {
50774
- this.emit("data", Buffer.from(constants$8.PNG_SIGNATURE));
50775
- this.emit("data", this._packer.packIHDR(width$1, height$1));
50776
- if (gamma) this.emit("data", this._packer.packGAMA(gamma));
50777
- let filteredData = this._packer.filterData(data$1, width$1, height$1);
50778
- this._deflate.on("error", this.emit.bind(this, "error"));
50779
- this._deflate.on("data", function(compressedData) {
50780
- this.emit("data", this._packer.packIDAT(compressedData));
50781
- }.bind(this));
50782
- this._deflate.on("end", function() {
50783
- this.emit("data", this._packer.packIEND());
50784
- this.emit("end");
50785
- }.bind(this));
50786
- this._deflate.end(filteredData);
50787
- };
50788
- });
50789
- var require_sync_inflate$1 = __commonJSMin((exports, module) => {
50790
- var assert$2 = __require("assert").ok;
50791
- var zlib$9 = __require("zlib");
50792
- var util$10 = __require("util");
50793
- var kMaxLength$1 = __require("buffer").kMaxLength;
50794
- function Inflate$1(opts) {
50795
- if (!(this instanceof Inflate$1)) return new Inflate$1(opts);
50796
- if (opts && opts.chunkSize < zlib$9.Z_MIN_CHUNK) opts.chunkSize = zlib$9.Z_MIN_CHUNK;
50797
- zlib$9.Inflate.call(this, opts);
50798
- this._offset = this._offset === void 0 ? this._outOffset : this._offset;
50799
- this._buffer = this._buffer || this._outBuffer;
50800
- if (opts && opts.maxLength != null) this._maxLength = opts.maxLength;
50801
- }
50802
- function createInflate$1(opts) {
50803
- return new Inflate$1(opts);
50804
- }
50805
- function _close$1(engine, callback) {
50806
- if (callback) process.nextTick(callback);
50807
- if (!engine._handle) return;
50808
- engine._handle.close();
50809
- engine._handle = null;
50810
- }
50811
- Inflate$1.prototype._processChunk = function(chunk, flushFlag, asyncCb) {
50812
- if (typeof asyncCb === "function") return zlib$9.Inflate._processChunk.call(this, chunk, flushFlag, asyncCb);
50813
- let self$2 = this;
50814
- let availInBefore = chunk && chunk.length;
50815
- let availOutBefore = this._chunkSize - this._offset;
50816
- let leftToInflate = this._maxLength;
50817
- let inOff = 0;
50818
- let buffers = [];
50819
- let nread = 0;
50820
- let error$49;
50821
- this.on("error", function(err) {
50822
- error$49 = err;
50823
- });
50824
- function handleChunk(availInAfter, availOutAfter) {
50825
- if (self$2._hadError) return;
50826
- let have = availOutBefore - availOutAfter;
50827
- assert$2(have >= 0, "have should not go down");
50828
- if (have > 0) {
50829
- let out = self$2._buffer.slice(self$2._offset, self$2._offset + have);
50830
- self$2._offset += have;
50831
- if (out.length > leftToInflate) out = out.slice(0, leftToInflate);
50832
- buffers.push(out);
50833
- nread += out.length;
50834
- leftToInflate -= out.length;
50835
- if (leftToInflate === 0) return false;
50836
- }
50837
- if (availOutAfter === 0 || self$2._offset >= self$2._chunkSize) {
50838
- availOutBefore = self$2._chunkSize;
50839
- self$2._offset = 0;
50840
- self$2._buffer = Buffer.allocUnsafe(self$2._chunkSize);
50841
- }
50842
- if (availOutAfter === 0) {
50843
- inOff += availInBefore - availInAfter;
50844
- availInBefore = availInAfter;
50845
- return true;
50846
- }
50847
- return false;
50848
- }
50849
- assert$2(this._handle, "zlib binding closed");
50850
- let res$2;
50851
- do {
50852
- res$2 = this._handle.writeSync(flushFlag, chunk, inOff, availInBefore, this._buffer, this._offset, availOutBefore);
50853
- res$2 = res$2 || this._writeState;
50854
- } while (!this._hadError && handleChunk(res$2[0], res$2[1]));
50855
- if (this._hadError) throw error$49;
50856
- if (nread >= kMaxLength$1) {
50857
- _close$1(this);
50858
- throw new RangeError("Cannot create final Buffer. It would be larger than 0x" + kMaxLength$1.toString(16) + " bytes");
50859
- }
50860
- let buf = Buffer.concat(buffers, nread);
50861
- _close$1(this);
50862
- return buf;
50863
- };
50864
- util$10.inherits(Inflate$1, zlib$9.Inflate);
50865
- function zlibBufferSync$1(engine, buffer$2) {
50866
- if (typeof buffer$2 === "string") buffer$2 = Buffer.from(buffer$2);
50867
- if (!(buffer$2 instanceof Buffer)) throw new TypeError("Not a string or buffer");
50868
- let flushFlag = engine._finishFlushFlag;
50869
- if (flushFlag == null) flushFlag = zlib$9.Z_FINISH;
50870
- return engine._processChunk(buffer$2, flushFlag);
50871
- }
50872
- function inflateSync$3(buffer$2, opts) {
50873
- return zlibBufferSync$1(new Inflate$1(opts), buffer$2);
50874
- }
50875
- module.exports = exports = inflateSync$3;
50876
- exports.Inflate = Inflate$1;
50877
- exports.createInflate = createInflate$1;
50878
- exports.inflateSync = inflateSync$3;
50879
- });
50880
- var require_sync_reader$1 = __commonJSMin((exports, module) => {
50881
- var SyncReader$5 = module.exports = function(buffer$2) {
50882
- this._buffer = buffer$2;
50883
- this._reads = [];
50884
- };
50885
- SyncReader$5.prototype.read = function(length, callback) {
50886
- this._reads.push({
50887
- length: Math.abs(length),
50888
- allowLess: length < 0,
50889
- func: callback
50890
- });
50891
- };
50892
- SyncReader$5.prototype.process = function() {
50893
- while (this._reads.length > 0 && this._buffer.length) {
50894
- let read$5 = this._reads[0];
50895
- if (this._buffer.length && (this._buffer.length >= read$5.length || read$5.allowLess)) {
50896
- this._reads.shift();
50897
- let buf = this._buffer;
50898
- this._buffer = buf.slice(read$5.length);
50899
- read$5.func.call(this, buf.slice(0, read$5.length));
50900
- } else break;
50901
- }
50902
- if (this._reads.length > 0) throw new Error("There are some read requests waitng on finished stream");
50903
- if (this._buffer.length > 0) throw new Error("unrecognised content at end of stream");
50904
- };
50905
- });
50906
- var require_filter_parse_sync$1 = __commonJSMin((exports) => {
50907
- var SyncReader$4 = require_sync_reader$1();
50908
- var Filter$3 = require_filter_parse$1();
50909
- exports.process = function(inBuffer, bitmapInfo) {
50910
- let outBuffers = [];
50911
- let reader = new SyncReader$4(inBuffer);
50912
- new Filter$3(bitmapInfo, {
50913
- read: reader.read.bind(reader),
50914
- write: function(bufferPart) {
50915
- outBuffers.push(bufferPart);
50916
- },
50917
- complete: function() {}
50918
- }).start();
50919
- reader.process();
50920
- return Buffer.concat(outBuffers);
50921
- };
50922
- });
50923
- var require_parser_sync$1 = __commonJSMin((exports, module) => {
50924
- var hasSyncZlib$3 = true;
50925
- var zlib$8 = __require("zlib");
50926
- var inflateSync$2 = require_sync_inflate$1();
50927
- if (!zlib$8.deflateSync) hasSyncZlib$3 = false;
50928
- var SyncReader$3 = require_sync_reader$1();
50929
- var FilterSync$1 = require_filter_parse_sync$1();
50930
- var Parser$5 = require_parser$2();
50931
- var bitmapper$2 = require_bitmapper$1();
50932
- var formatNormaliser$2 = require_format_normaliser$1();
50933
- module.exports = function(buffer$2, options$1) {
50934
- if (!hasSyncZlib$3) throw new Error("To use the sync capability of this library in old node versions, please pin pngjs to v2.3.0");
50935
- let err;
50936
- function handleError(_err_) {
50937
- err = _err_;
50938
- }
50939
- let metaData;
50940
- function handleMetaData(_metaData_) {
50941
- metaData = _metaData_;
50942
- }
50943
- function handleTransColor(transColor) {
50944
- metaData.transColor = transColor;
50945
- }
50946
- function handlePalette(palette) {
50947
- metaData.palette = palette;
50948
- }
50949
- function handleSimpleTransparency() {
50950
- metaData.alpha = true;
50951
- }
50952
- let gamma;
50953
- function handleGamma(_gamma_) {
50954
- gamma = _gamma_;
50955
- }
50956
- let inflateDataList = [];
50957
- function handleInflateData(inflatedData$1) {
50958
- inflateDataList.push(inflatedData$1);
50959
- }
50960
- let reader = new SyncReader$3(buffer$2);
50961
- new Parser$5(options$1, {
50962
- read: reader.read.bind(reader),
50963
- error: handleError,
50964
- metadata: handleMetaData,
50965
- gamma: handleGamma,
50966
- palette: handlePalette,
50967
- transColor: handleTransColor,
50968
- inflateData: handleInflateData,
50969
- simpleTransparency: handleSimpleTransparency
50970
- }).start();
50971
- reader.process();
50972
- if (err) throw err;
50973
- let inflateData = Buffer.concat(inflateDataList);
50974
- inflateDataList.length = 0;
50975
- let inflatedData;
50976
- if (metaData.interlace) inflatedData = zlib$8.inflateSync(inflateData);
50977
- else {
50978
- let imageSize = ((metaData.width * metaData.bpp * metaData.depth + 7 >> 3) + 1) * metaData.height;
50979
- inflatedData = inflateSync$2(inflateData, {
50980
- chunkSize: imageSize,
50981
- maxLength: imageSize
50982
- });
50983
- }
50984
- inflateData = null;
50985
- if (!inflatedData || !inflatedData.length) throw new Error("bad png - invalid inflate data response");
50986
- let unfilteredData = FilterSync$1.process(inflatedData, metaData);
50987
- inflateData = null;
50988
- let bitmapData = bitmapper$2.dataToBitMap(unfilteredData, metaData);
50989
- unfilteredData = null;
50990
- let normalisedBitmapData = formatNormaliser$2(bitmapData, metaData, options$1.skipRescale);
50991
- metaData.data = normalisedBitmapData;
50992
- metaData.gamma = gamma || 0;
50993
- return metaData;
50994
- };
50995
- });
50996
- var require_packer_sync$1 = __commonJSMin((exports, module) => {
50997
- var hasSyncZlib$2 = true;
50998
- var zlib$7 = __require("zlib");
50999
- if (!zlib$7.deflateSync) hasSyncZlib$2 = false;
51000
- var constants$7 = require_constants$4();
51001
- var Packer$5 = require_packer$1();
51002
- module.exports = function(metaData, opt) {
51003
- if (!hasSyncZlib$2) throw new Error("To use the sync capability of this library in old node versions, please pin pngjs to v2.3.0");
51004
- let packer = new Packer$5(opt || {});
51005
- let chunks = [];
51006
- chunks.push(Buffer.from(constants$7.PNG_SIGNATURE));
51007
- chunks.push(packer.packIHDR(metaData.width, metaData.height));
51008
- if (metaData.gamma) chunks.push(packer.packGAMA(metaData.gamma));
51009
- let filteredData = packer.filterData(metaData.data, metaData.width, metaData.height);
51010
- let compressedData = zlib$7.deflateSync(filteredData, packer.getDeflateOptions());
51011
- filteredData = null;
51012
- if (!compressedData || !compressedData.length) throw new Error("bad png - invalid compressed data response");
51013
- chunks.push(packer.packIDAT(compressedData));
51014
- chunks.push(packer.packIEND());
51015
- return Buffer.concat(chunks);
51016
- };
51017
- });
51018
- var require_png_sync$1 = __commonJSMin((exports) => {
51019
- var parse$10 = require_parser_sync$1();
51020
- var pack$1 = require_packer_sync$1();
51021
- exports.read = function(buffer$2, options$1) {
51022
- return parse$10(buffer$2, options$1 || {});
51023
- };
51024
- exports.write = function(png, options$1) {
51025
- return pack$1(png, options$1);
51026
- };
51027
- });
51028
- var require_png$1 = __commonJSMin((exports) => {
51029
- var util$9 = __require("util");
51030
- var Stream$4 = __require("stream");
51031
- var Parser$4 = require_parser_async$1();
51032
- var Packer$4 = require_packer_async$1();
51033
- var PNGSync$1 = require_png_sync$1();
51034
- var PNG$2 = exports.PNG = function(options$1) {
51035
- Stream$4.call(this);
51036
- options$1 = options$1 || {};
51037
- this.width = options$1.width | 0;
51038
- this.height = options$1.height | 0;
51039
- this.data = this.width > 0 && this.height > 0 ? Buffer.alloc(4 * this.width * this.height) : null;
51040
- if (options$1.fill && this.data) this.data.fill(0);
51041
- this.gamma = 0;
51042
- this.readable = this.writable = true;
51043
- this._parser = new Parser$4(options$1);
51044
- this._parser.on("error", this.emit.bind(this, "error"));
51045
- this._parser.on("close", this._handleClose.bind(this));
51046
- this._parser.on("metadata", this._metadata.bind(this));
51047
- this._parser.on("gamma", this._gamma.bind(this));
51048
- this._parser.on("parsed", function(data$1) {
51049
- this.data = data$1;
51050
- this.emit("parsed", data$1);
51051
- }.bind(this));
51052
- this._packer = new Packer$4(options$1);
51053
- this._packer.on("data", this.emit.bind(this, "data"));
51054
- this._packer.on("end", this.emit.bind(this, "end"));
51055
- this._parser.on("close", this._handleClose.bind(this));
51056
- this._packer.on("error", this.emit.bind(this, "error"));
51057
- };
51058
- util$9.inherits(PNG$2, Stream$4);
51059
- PNG$2.sync = PNGSync$1;
51060
- PNG$2.prototype.pack = function() {
51061
- if (!this.data || !this.data.length) {
51062
- this.emit("error", "No data provided");
51063
- return this;
51064
- }
51065
- process.nextTick(function() {
51066
- this._packer.pack(this.data, this.width, this.height, this.gamma);
51067
- }.bind(this));
51068
- return this;
51069
- };
51070
- PNG$2.prototype.parse = function(data$1, callback) {
51071
- if (callback) {
51072
- let onParsed, onError$2;
51073
- onParsed = function(parsedData) {
51074
- this.removeListener("error", onError$2);
51075
- this.data = parsedData;
51076
- callback(null, this);
51077
- }.bind(this);
51078
- onError$2 = function(err) {
51079
- this.removeListener("parsed", onParsed);
51080
- callback(err, null);
51081
- }.bind(this);
51082
- this.once("parsed", onParsed);
51083
- this.once("error", onError$2);
51084
- }
51085
- this.end(data$1);
51086
- return this;
51087
- };
51088
- PNG$2.prototype.write = function(data$1) {
51089
- this._parser.write(data$1);
51090
- return true;
51091
- };
51092
- PNG$2.prototype.end = function(data$1) {
51093
- this._parser.end(data$1);
51094
- };
51095
- PNG$2.prototype._metadata = function(metadata) {
51096
- this.width = metadata.width;
51097
- this.height = metadata.height;
51098
- this.emit("metadata", metadata);
51099
- };
51100
- PNG$2.prototype._gamma = function(gamma) {
51101
- this.gamma = gamma;
51102
- };
51103
- PNG$2.prototype._handleClose = function() {
51104
- if (!this._parser.writable && !this._packer.readable) this.emit("close");
51105
- };
51106
- PNG$2.bitblt = function(src, dst, srcX, srcY, width$1, height$1, deltaX, deltaY) {
51107
- srcX |= 0;
51108
- srcY |= 0;
51109
- width$1 |= 0;
51110
- height$1 |= 0;
51111
- deltaX |= 0;
51112
- deltaY |= 0;
51113
- if (srcX > src.width || srcY > src.height || srcX + width$1 > src.width || srcY + height$1 > src.height) throw new Error("bitblt reading outside image");
51114
- if (deltaX > dst.width || deltaY > dst.height || deltaX + width$1 > dst.width || deltaY + height$1 > dst.height) throw new Error("bitblt writing outside image");
51115
- for (let y$2 = 0; y$2 < height$1; y$2++) src.data.copy(dst.data, (deltaY + y$2) * dst.width + deltaX << 2, (srcY + y$2) * src.width + srcX << 2, (srcY + y$2) * src.width + srcX + width$1 << 2);
51116
- };
51117
- PNG$2.prototype.bitblt = function(dst, srcX, srcY, width$1, height$1, deltaX, deltaY) {
51118
- PNG$2.bitblt(this, dst, srcX, srcY, width$1, height$1, deltaX, deltaY);
51119
- return this;
51120
- };
51121
- PNG$2.adjustGamma = function(src) {
51122
- if (src.gamma) {
51123
- for (let y$2 = 0; y$2 < src.height; y$2++) for (let x$1 = 0; x$1 < src.width; x$1++) {
51124
- let idx = src.width * y$2 + x$1 << 2;
51125
- for (let i$4 = 0; i$4 < 3; i$4++) {
51126
- let sample = src.data[idx + i$4] / 255;
51127
- sample = Math.pow(sample, 1 / 2.2 / src.gamma);
51128
- src.data[idx + i$4] = Math.round(sample * 255);
51129
- }
51130
- }
51131
- src.gamma = 0;
51132
- }
51133
- };
51134
- PNG$2.prototype.adjustGamma = function() {
51135
- PNG$2.adjustGamma(this);
51136
- };
51137
- });
51138
49516
  /**
51139
49517
  * @license React
51140
49518
  * react.production.js
@@ -70239,7 +68617,7 @@ var require_react_dom = __commonJSMin((exports, module) => {
70239
68617
  }
70240
68618
  };
70241
68619
  }
70242
- var util$41 = __require("util"), crypto$4 = __require("crypto"), async_hooks$1 = __require("async_hooks"), React$5 = require_react(), ReactDOM$2 = require_react_dom(), stream$1 = __require("stream"), REACT_ELEMENT_TYPE$4 = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE$4 = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE$4 = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE$3 = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE$3 = Symbol.for("react.profiler"), REACT_CONSUMER_TYPE$3 = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE$3 = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE$3 = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE$3 = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE$2 = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE$3 = Symbol.for("react.memo"), REACT_LAZY_TYPE$3 = Symbol.for("react.lazy"), REACT_SCOPE_TYPE$2 = Symbol.for("react.scope"), REACT_ACTIVITY_TYPE$3 = Symbol.for("react.activity"), REACT_LEGACY_HIDDEN_TYPE$2 = Symbol.for("react.legacy_hidden"), REACT_MEMO_CACHE_SENTINEL$2 = Symbol.for("react.memo_cache_sentinel"), REACT_VIEW_TRANSITION_TYPE$2 = Symbol.for("react.view_transition"), MAYBE_ITERATOR_SYMBOL$3 = Symbol.iterator, isArrayImpl$3 = Array.isArray, jsxPropsParents = /* @__PURE__ */ new WeakMap(), jsxChildrenParents = /* @__PURE__ */ new WeakMap(), CLIENT_REFERENCE_TAG = Symbol.for("react.client.reference"), scheduleMicrotask$1 = queueMicrotask, currentView$1 = null, writtenBytes$1 = 0, destinationHasCapacity$1$1 = !0, textEncoder$1 = new util$41.TextEncoder(), assign$4 = Object.assign, hasOwnProperty$6 = Object.prototype.hasOwnProperty, VALID_ATTRIBUTE_NAME_REGEX$2 = RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"), illegalAttributeNameCache$2 = {}, validatedAttributeNameCache$2 = {}, unitlessNumbers$2 = new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" ")), aliases$2 = new Map([
68620
+ var util$35 = __require("util"), crypto$4 = __require("crypto"), async_hooks$1 = __require("async_hooks"), React$5 = require_react(), ReactDOM$2 = require_react_dom(), stream$1 = __require("stream"), REACT_ELEMENT_TYPE$4 = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE$4 = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE$4 = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE$3 = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE$3 = Symbol.for("react.profiler"), REACT_CONSUMER_TYPE$3 = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE$3 = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE$3 = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE$3 = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE$2 = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE$3 = Symbol.for("react.memo"), REACT_LAZY_TYPE$3 = Symbol.for("react.lazy"), REACT_SCOPE_TYPE$2 = Symbol.for("react.scope"), REACT_ACTIVITY_TYPE$3 = Symbol.for("react.activity"), REACT_LEGACY_HIDDEN_TYPE$2 = Symbol.for("react.legacy_hidden"), REACT_MEMO_CACHE_SENTINEL$2 = Symbol.for("react.memo_cache_sentinel"), REACT_VIEW_TRANSITION_TYPE$2 = Symbol.for("react.view_transition"), MAYBE_ITERATOR_SYMBOL$3 = Symbol.iterator, isArrayImpl$3 = Array.isArray, jsxPropsParents = /* @__PURE__ */ new WeakMap(), jsxChildrenParents = /* @__PURE__ */ new WeakMap(), CLIENT_REFERENCE_TAG = Symbol.for("react.client.reference"), scheduleMicrotask$1 = queueMicrotask, currentView$1 = null, writtenBytes$1 = 0, destinationHasCapacity$1$1 = !0, textEncoder$1 = new util$35.TextEncoder(), assign$4 = Object.assign, hasOwnProperty$6 = Object.prototype.hasOwnProperty, VALID_ATTRIBUTE_NAME_REGEX$2 = RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"), illegalAttributeNameCache$2 = {}, validatedAttributeNameCache$2 = {}, unitlessNumbers$2 = new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" ")), aliases$2 = new Map([
70243
68621
  ["acceptCharset", "accept-charset"],
70244
68622
  ["htmlFor", "for"],
70245
68623
  ["httpEquiv", "http-equiv"],
@@ -71793,14 +70171,14 @@ var init_circle_fading_arrow_up = __esmMin(() => {
71793
70171
  var __iconNode$32, Clock;
71794
70172
  var init_clock = __esmMin(() => {
71795
70173
  init_createLucideIcon();
71796
- __iconNode$32 = [["path", {
71797
- d: "M12 6v6l4 2",
71798
- key: "mmk7yg"
71799
- }], ["circle", {
70174
+ __iconNode$32 = [["circle", {
71800
70175
  cx: "12",
71801
70176
  cy: "12",
71802
70177
  r: "10",
71803
70178
  key: "1mglay"
70179
+ }], ["path", {
70180
+ d: "M12 6v6l4 2",
70181
+ key: "mmk7yg"
71804
70182
  }]];
71805
70183
  Clock = createLucideIcon("clock", __iconNode$32);
71806
70184
  });
@@ -71808,23 +70186,23 @@ var __iconNode$31, Coins;
71808
70186
  var init_coins = __esmMin(() => {
71809
70187
  init_createLucideIcon();
71810
70188
  __iconNode$31 = [
71811
- ["circle", {
71812
- cx: "8",
71813
- cy: "8",
71814
- r: "6",
71815
- key: "3yglwk"
71816
- }],
71817
70189
  ["path", {
71818
- d: "M18.09 10.37A6 6 0 1 1 10.34 18",
71819
- key: "t5s6rm"
70190
+ d: "M13.744 17.736a6 6 0 1 1-7.48-7.48",
70191
+ key: "bq4yh3"
71820
70192
  }],
71821
70193
  ["path", {
71822
- d: "M7 6h1v4",
71823
- key: "1obek4"
70194
+ d: "M15 6h1v4",
70195
+ key: "11y1tn"
71824
70196
  }],
71825
70197
  ["path", {
71826
- d: "m16.71 13.88.7.71-2.82 2.82",
71827
- key: "1rbuyh"
70198
+ d: "m6.134 14.768.866-.5 2 3.464",
70199
+ key: "17snzx"
70200
+ }],
70201
+ ["circle", {
70202
+ cx: "16",
70203
+ cy: "8",
70204
+ r: "6",
70205
+ key: "14bfc9"
71828
70206
  }]
71829
70207
  ];
71830
70208
  Coins = createLucideIcon("coins", __iconNode$31);
@@ -71956,25 +70334,25 @@ var __iconNode$24, Gift;
71956
70334
  var init_gift = __esmMin(() => {
71957
70335
  init_createLucideIcon();
71958
70336
  __iconNode$24 = [
71959
- ["rect", {
71960
- x: "3",
71961
- y: "8",
71962
- width: "18",
71963
- height: "4",
71964
- rx: "1",
71965
- key: "bkv52"
71966
- }],
71967
70337
  ["path", {
71968
- d: "M12 8v13",
71969
- key: "1c76mn"
70338
+ d: "M12 7v14",
70339
+ key: "1akyts"
71970
70340
  }],
71971
70341
  ["path", {
71972
- d: "M19 12v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7",
71973
- key: "6wjy6b"
70342
+ d: "M20 11v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-8",
70343
+ key: "1sqzm4"
71974
70344
  }],
71975
70345
  ["path", {
71976
- d: "M7.5 8a2.5 2.5 0 0 1 0-5A4.8 8 0 0 1 12 8a4.8 8 0 0 1 4.5-5 2.5 2.5 0 0 1 0 5",
71977
- key: "1ihvrl"
70346
+ d: "M7.5 7a1 1 0 0 1 0-5A4.8 8 0 0 1 12 7a4.8 8 0 0 1 4.5-5 1 1 0 0 1 0 5",
70347
+ key: "kc0143"
70348
+ }],
70349
+ ["rect", {
70350
+ x: "3",
70351
+ y: "7",
70352
+ width: "18",
70353
+ height: "4",
70354
+ rx: "1",
70355
+ key: "1hberx"
71978
70356
  }]
71979
70357
  ];
71980
70358
  Gift = createLucideIcon("gift", __iconNode$24);
@@ -134861,11 +133239,11 @@ var init_TreeWalker = __esmMin(() => {
134861
133239
  whatToShow = -1;
134862
133240
  filter = null;
134863
133241
  #currentNode = null;
134864
- constructor(root$2, whatToShow = -1, filter$3 = null) {
133242
+ constructor(root$2, whatToShow = -1, filter$2 = null) {
134865
133243
  if (!(root$2 instanceof Node$1)) throw new DOMException("Parameter 1 was not of type Node.");
134866
133244
  this.root = root$2;
134867
133245
  this.whatToShow = whatToShow;
134868
- this.filter = filter$3;
133246
+ this.filter = filter$2;
134869
133247
  this.#currentNode = root$2;
134870
133248
  }
134871
133249
  get currentNode() {
@@ -135024,11 +133402,11 @@ var init_NodeIterator = __esmMin(() => {
135024
133402
  #filter = null;
135025
133403
  #walker;
135026
133404
  #atRoot = true;
135027
- constructor(root$2, whatToShow = -1, filter$3 = null) {
133405
+ constructor(root$2, whatToShow = -1, filter$2 = null) {
135028
133406
  this.#root = root$2;
135029
133407
  this.#whatToShow = whatToShow;
135030
- this.#filter = filter$3;
135031
- this.#walker = new TreeWalker(root$2, whatToShow, filter$3);
133408
+ this.#filter = filter$2;
133409
+ this.#walker = new TreeWalker(root$2, whatToShow, filter$2);
135032
133410
  }
135033
133411
  get root() {
135034
133412
  return this.#root;
@@ -138110,11 +136488,11 @@ var init_Document = __esmMin(() => {
138110
136488
  createDocumentFragment() {
138111
136489
  return NodeFactory.createNode(this, this[window$1].DocumentFragment);
138112
136490
  }
138113
- createNodeIterator(root$2, whatToShow = -1, filter$3 = null) {
138114
- return new NodeIterator(root$2, whatToShow, filter$3);
136491
+ createNodeIterator(root$2, whatToShow = -1, filter$2 = null) {
136492
+ return new NodeIterator(root$2, whatToShow, filter$2);
138115
136493
  }
138116
- createTreeWalker(root$2, whatToShow = -1, filter$3 = null) {
138117
- return new TreeWalker(root$2, whatToShow, filter$3);
136494
+ createTreeWalker(root$2, whatToShow = -1, filter$2 = null) {
136495
+ return new TreeWalker(root$2, whatToShow, filter$2);
138118
136496
  }
138119
136497
  createEvent(type$1) {
138120
136498
  if (typeof this[window$1][type$1] === "function") return new this[window$1][type$1]("init");
@@ -175322,7 +173700,7 @@ var require_decoder = __commonJSMin((exports, module) => {
175322
173700
  }.bind(this);
175323
173701
  xhr.send(null);
175324
173702
  },
175325
- parse: function parse$27(data$1) {
173703
+ parse: function parse$26(data$1) {
175326
173704
  var maxResolutionInPixels = this.opts.maxResolutionInMP * 1e3 * 1e3, offset$1 = 0;
175327
173705
  data$1.length;
175328
173706
  function readUint16() {
@@ -175984,7 +174362,7 @@ var require_interlace = __commonJSMin((exports) => {
175984
174362
  };
175985
174363
  });
175986
174364
  var require_paeth_predictor = __commonJSMin((exports, module) => {
175987
- module.exports = function paethPredictor$4(left, above, upLeft) {
174365
+ module.exports = function paethPredictor$2(left, above, upLeft) {
175988
174366
  let paeth = left + above - upLeft;
175989
174367
  let pLeft = Math.abs(paeth - left);
175990
174368
  let pAbove = Math.abs(paeth - above);
@@ -176063,14 +174441,14 @@ var require_filter_parse = __commonJSMin((exports, module) => {
176063
174441
  }
176064
174442
  };
176065
174443
  Filter$2.prototype._reverseFilterLine = function(rawData) {
176066
- let filter$3 = rawData[0];
174444
+ let filter$2 = rawData[0];
176067
174445
  let unfilteredLine;
176068
174446
  let currentImage = this._images[this._imageIndex];
176069
174447
  let byteWidth = currentImage.byteWidth;
176070
- if (filter$3 === 0) unfilteredLine = rawData.slice(1, byteWidth + 1);
174448
+ if (filter$2 === 0) unfilteredLine = rawData.slice(1, byteWidth + 1);
176071
174449
  else {
176072
174450
  unfilteredLine = Buffer.alloc(byteWidth);
176073
- switch (filter$3) {
174451
+ switch (filter$2) {
176074
174452
  case 1:
176075
174453
  this._unFilterType1(rawData, unfilteredLine, byteWidth);
176076
174454
  break;
@@ -176083,7 +174461,7 @@ var require_filter_parse = __commonJSMin((exports, module) => {
176083
174461
  case 4:
176084
174462
  this._unFilterType4(rawData, unfilteredLine, byteWidth);
176085
174463
  break;
176086
- default: throw new Error("Unrecognised filter type - " + filter$3);
174464
+ default: throw new Error("Unrecognised filter type - " + filter$2);
176087
174465
  }
176088
174466
  }
176089
174467
  this.write(unfilteredLine);
@@ -176266,7 +174644,7 @@ var require_parser = __commonJSMin((exports, module) => {
176266
174644
  let depth$1 = data$1[8];
176267
174645
  let colorType = data$1[9];
176268
174646
  let compr = data$1[10];
176269
- let filter$3 = data$1[11];
174647
+ let filter$2 = data$1[11];
176270
174648
  let interlace = data$1[12];
176271
174649
  if (depth$1 !== 8 && depth$1 !== 4 && depth$1 !== 2 && depth$1 !== 1 && depth$1 !== 16) {
176272
174650
  this.error(/* @__PURE__ */ new Error("Unsupported bit depth " + depth$1));
@@ -176280,7 +174658,7 @@ var require_parser = __commonJSMin((exports, module) => {
176280
174658
  this.error(/* @__PURE__ */ new Error("Unsupported compression method"));
176281
174659
  return;
176282
174660
  }
176283
- if (filter$3 !== 0) {
174661
+ if (filter$2 !== 0) {
176284
174662
  this.error(/* @__PURE__ */ new Error("Unsupported filter method"));
176285
174663
  return;
176286
174664
  }
@@ -177477,4 +175855,4 @@ var require_heic_convert = __commonJSMin((exports, module) => {
177477
175855
  module.exports = one;
177478
175856
  module.exports.all = all;
177479
175857
  });
177480
- export { init_lu as $, Bookmark as $t, RiHashtag as A, Plug2 as At, RiRefreshLine as B, FileText as Bt, AiFillStar as C, Shield as Ct, RiArrowRightFill as D, Radio as Dt, zhCN as E, ScanLine as Et, RiListCheck2 as F, Info$1 as Ft, RiStarFill as G, Coins as Gt, RiSendPlaneFill as H, ExternalLink as Ht, RiLiveLine as I, Heart as It, RiTiktokFill as J, CircleEllipsis as Jt, RiStarLine as K, Clock as Kt, RiLoginCircleFill as L, Hash as Lt, RiHeart3Fill as M, Music as Mt, RiHeart3Line as N, MessageCircle as Nt, RiBellFill as O, Quote as Ot, RiLinkM as P, MapPin as Pt, LuFullscreen as Q, Calendar as Qt, RiMessage3Fill as R, Gift as Rt, AiFillHeart as S, Smartphone as St, init_locale as T, Share2 as Tt, RiShareForwardFill as U, Crown as Ut, RiRobot2Fill as V, Eye as Vt, RiSparkling2Fill as W, CornerDownLeft as Wt, RiVideoLine as X, CircleAlert as Xt, RiUserFollowLine as Y, CircleCheckBig as Yt, init_ri as Z, ChartColumn as Zt, HiOutlineMenuAlt2 as _, init_zod as _n, UserPlus as _t, init_lib as a, require_react as an, init_dist as at, FaCommentDots as b, Terminal as bt, rehypeHighlight as c, require_express as cn, button_default as ct, MdAccessTime as d, init_source as dn, IoSearch as dt, BookOpen as en, init_date_fns as et, init_md as f, AxiosError as fn, init_io5 as ft, init_tb as g, init_esm$2 as gn, User as gt, TbScan as h, Xhshow as hn, Users as ht, require_qr_code_styling as i, require_server_node as in, differenceInSeconds as it, RiHeart2Line as j, Play as jt, RiGroupLine as k, QrCode as kt, init_react_markdown as l, require_protobufjs as ln, HeroUIProvider as lt, init_si as m, axios_default as mn, Zap as mt, require_dist as n, clsx_default as nn, formatDistanceToNow as nt, Window as o, require_png$1 as on, code_default as ot, SiBilibili as p, init_axios as pn, init_lucide_react as pt, RiThumbUpFill as q, CircleFadingArrowUp as qt, require_lib$2 as r, init_clsx as rn, format$2 as rt, init_rehype_highlight as s, require_jsQR as sn, chip_default as st, require_heic_convert as t, Bell as tn, fromUnixTime as tt, Markdown as u, Chalk as un, require_jsx_runtime as ut, init_hi as v, zod_default as vn, TriangleAlert as vt, init_ai as w, ShieldCheck as wt, init_fa6 as x, Star as xt, FaCodeBranch as y, ThumbsUp as yt, RiQuestionFill as z, Gamepad2 as zt };
175858
+ export { init_lu as $, Bookmark as $t, RiHashtag as A, Plug2 as At, RiRefreshLine as B, FileText as Bt, AiFillStar as C, Shield as Ct, RiArrowRightFill as D, Radio as Dt, zhCN as E, ScanLine as Et, RiListCheck2 as F, Info$1 as Ft, RiStarFill as G, Coins as Gt, RiSendPlaneFill as H, ExternalLink as Ht, RiLiveLine as I, Heart as It, RiTiktokFill as J, CircleEllipsis as Jt, RiStarLine as K, Clock as Kt, RiLoginCircleFill as L, Hash as Lt, RiHeart3Fill as M, Music as Mt, RiHeart3Line as N, MessageCircle as Nt, RiBellFill as O, Quote as Ot, RiLinkM as P, MapPin as Pt, LuFullscreen as Q, Calendar as Qt, RiMessage3Fill as R, Gift as Rt, AiFillHeart as S, Smartphone as St, init_locale as T, Share2 as Tt, RiShareForwardFill as U, Crown as Ut, RiRobot2Fill as V, Eye as Vt, RiSparkling2Fill as W, CornerDownLeft as Wt, RiVideoLine as X, CircleAlert as Xt, RiUserFollowLine as Y, CircleCheckBig as Yt, init_ri as Z, ChartColumn as Zt, HiOutlineMenuAlt2 as _, zod_default as _n, UserPlus as _t, init_lib as a, require_react as an, init_dist as at, FaCommentDots as b, Terminal as bt, rehypeHighlight as c, require_protobufjs as cn, button_default as ct, MdAccessTime as d, AxiosError as dn, IoSearch as dt, BookOpen as en, init_date_fns as et, init_md as f, init_axios as fn, init_io5 as ft, init_tb as g, init_zod as gn, User as gt, TbScan as h, init_esm$2 as hn, Users as ht, require_qr_code_styling as i, require_server_node as in, differenceInSeconds as it, RiHeart2Line as j, Play as jt, RiGroupLine as k, QrCode as kt, init_react_markdown as l, Chalk as ln, HeroUIProvider as lt, init_si as m, Xhshow as mn, Zap as mt, require_dist as n, clsx_default as nn, formatDistanceToNow as nt, Window as o, require_jsQR as on, code_default as ot, SiBilibili as p, axios_default as pn, init_lucide_react as pt, RiThumbUpFill as q, CircleFadingArrowUp as qt, require_lib$2 as r, init_clsx as rn, format$2 as rt, init_rehype_highlight as s, require_express as sn, chip_default as st, require_heic_convert as t, Bell as tn, fromUnixTime as tt, Markdown as u, init_source as un, require_jsx_runtime as ut, init_hi as v, TriangleAlert as vt, init_ai as w, ShieldCheck as wt, init_fa6 as x, Star as xt, FaCodeBranch as y, ThumbsUp as yt, RiQuestionFill as z, Gamepad2 as zt };