@bigbinary/neeto-playwright-commons 1.8.36 → 1.8.37

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.
package/index.cjs.js CHANGED
@@ -245,9 +245,13 @@ function getDefaultExportFromCjs (x) {
245
245
  }
246
246
 
247
247
  function getAugmentedNamespace(n) {
248
+ if (n.__esModule) return n;
248
249
  var f = n.default;
249
250
  if (typeof f == "function") {
250
- var a = function () {
251
+ var a = function a () {
252
+ if (this instanceof a) {
253
+ return Reflect.construct(f, arguments, this.constructor);
254
+ }
251
255
  return f.apply(this, arguments);
252
256
  };
253
257
  a.prototype = f.prototype;
@@ -928,6 +932,8 @@ var setFunctionLength = function setFunctionLength(fn, length) {
928
932
  return fn;
929
933
  };
930
934
 
935
+ callBind$1.exports;
936
+
931
937
  (function (module) {
932
938
 
933
939
  var bind = functionBind;
@@ -971,12 +977,14 @@ var setFunctionLength = function setFunctionLength(fn, length) {
971
977
  $defineProperty(module.exports, 'apply', { value: applyBind });
972
978
  } else {
973
979
  module.exports.apply = applyBind;
974
- }
980
+ }
975
981
  } (callBind$1));
976
982
 
983
+ var callBindExports = callBind$1.exports;
984
+
977
985
  var GetIntrinsic$1 = getIntrinsic;
978
986
 
979
- var callBind = callBind$1.exports;
987
+ var callBind = callBindExports;
980
988
 
981
989
  var $indexOf = callBind(GetIntrinsic$1('String.prototype.indexOf'));
982
990
 
@@ -2503,6 +2511,8 @@ var lib$7 = {
2503
2511
  stringify: stringify$5
2504
2512
  };
2505
2513
 
2514
+ var qs$1 = /*@__PURE__*/getDefaultExportFromCjs(lib$7);
2515
+
2506
2516
  class CustomCommands {
2507
2517
  constructor(page, request, baseURL = process.env.BASE_URL) {
2508
2518
  this.interceptMultipleResponses = ({ responseUrl = "", responseStatus = 200, times = 1, baseUrl, customPageContext, timeout = 35000, } = {}) => {
@@ -2569,7 +2579,7 @@ class CustomCommands {
2569
2579
  };
2570
2580
  const formattedUrl = ramda.isEmpty(params)
2571
2581
  ? url
2572
- : `${url}?${lib$7.stringify(params, {
2582
+ : `${url}?${qs$1.stringify(params, {
2573
2583
  arrayFormat: "brackets",
2574
2584
  })}`;
2575
2585
  return await this.request[method](formattedUrl, requestOptions);
@@ -3132,6 +3142,7 @@ function requireCommon$1 () {
3132
3142
  }
3133
3143
 
3134
3144
  /* eslint-env browser */
3145
+ browser$1.exports;
3135
3146
 
3136
3147
  var hasRequiredBrowser;
3137
3148
 
@@ -3405,8 +3416,8 @@ function requireBrowser () {
3405
3416
  } catch (error) {
3406
3417
  return '[UnexpectedJSONParseError]: ' + error.message;
3407
3418
  }
3408
- };
3409
- } (browser$1, browser$1.exports));
3419
+ };
3420
+ } (browser$1, browser$1.exports));
3410
3421
  return browser$1.exports;
3411
3422
  }
3412
3423
 
@@ -3574,6 +3585,7 @@ function requireSupportsColor () {
3574
3585
  /**
3575
3586
  * Module dependencies.
3576
3587
  */
3588
+ node.exports;
3577
3589
 
3578
3590
  var hasRequiredNode;
3579
3591
 
@@ -3839,8 +3851,8 @@ function requireNode () {
3839
3851
  formatters.O = function (v) {
3840
3852
  this.inspectOpts.colors = this.useColors;
3841
3853
  return util.inspect(v, this.inspectOpts);
3842
- };
3843
- } (node, node.exports));
3854
+ };
3855
+ } (node, node.exports));
3844
3856
  return node.exports;
3845
3857
  }
3846
3858
 
@@ -3849,15 +3861,14 @@ function requireNode () {
3849
3861
  * treat as a browser.
3850
3862
  */
3851
3863
 
3852
- (function (module) {
3853
- if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {
3854
- module.exports = requireBrowser();
3855
- } else {
3856
- module.exports = requireNode();
3857
- }
3858
- } (src$1));
3864
+ if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {
3865
+ src$1.exports = requireBrowser();
3866
+ } else {
3867
+ src$1.exports = requireNode();
3868
+ }
3859
3869
 
3860
- var debug$3 = /*@__PURE__*/getDefaultExportFromCjs(src$1.exports);
3870
+ var srcExports = src$1.exports;
3871
+ var debug$3 = /*@__PURE__*/getDefaultExportFromCjs(srcExports);
3861
3872
 
3862
3873
  /*!
3863
3874
  * playwright-extra v4.3.5 by berstend
@@ -5452,10 +5463,16 @@ class StealthPlugin extends PuppeteerExtraPlugin {
5452
5463
  const defaultExport = opts => new StealthPlugin(opts);
5453
5464
  var puppeteerExtraPluginStealth = defaultExport;
5454
5465
 
5466
+ // const moduleExport = defaultExport
5467
+ // moduleExport.StealthPlugin = StealthPlugin
5468
+ // module.exports = moduleExport
5469
+
5470
+ var stealth$1 = /*@__PURE__*/getDefaultExportFromCjs(puppeteerExtraPluginStealth);
5471
+
5455
5472
  var stealth = test$1.test.extend({
5456
5473
  browser: async ({ browser }, use) => {
5457
5474
  await browser.close();
5458
- chromium.use(puppeteerExtraPluginStealth());
5475
+ chromium.use(stealth$1());
5459
5476
  const stealthBrowser = await chromium.launch();
5460
5477
  await use(stealthBrowser);
5461
5478
  await stealthBrowser.close();
@@ -5974,7 +5991,7 @@ var utils$k = {};
5974
5991
  };
5975
5992
  flat(args);
5976
5993
  return result;
5977
- };
5994
+ };
5978
5995
  } (utils$k));
5979
5996
 
5980
5997
  const utils$j = utils$k;
@@ -7281,8 +7298,6 @@ braces$1.create = (input, options = {}) => {
7281
7298
 
7282
7299
  var braces_1 = braces$1;
7283
7300
 
7284
- var picomatch$2 = {exports: {}};
7285
-
7286
7301
  var utils$g = {};
7287
7302
 
7288
7303
  const path$8 = Path__default["default"];
@@ -7526,7 +7541,7 @@ var constants$b = {
7526
7541
  output = `(?:^(?!${output}).*$)`;
7527
7542
  }
7528
7543
  return output;
7529
- };
7544
+ };
7530
7545
  } (utils$g));
7531
7546
 
7532
7547
  const utils$f = utils$g;
@@ -9038,9 +9053,9 @@ const isObject$1 = val => val && typeof val === 'object' && !Array.isArray(val);
9038
9053
  * @api public
9039
9054
  */
9040
9055
 
9041
- const picomatch$1 = (glob, options, returnState = false) => {
9056
+ const picomatch$2 = (glob, options, returnState = false) => {
9042
9057
  if (Array.isArray(glob)) {
9043
- const fns = glob.map(input => picomatch$1(input, options, returnState));
9058
+ const fns = glob.map(input => picomatch$2(input, options, returnState));
9044
9059
  const arrayMatcher = str => {
9045
9060
  for (const isMatch of fns) {
9046
9061
  const state = isMatch(str);
@@ -9060,8 +9075,8 @@ const picomatch$1 = (glob, options, returnState = false) => {
9060
9075
  const opts = options || {};
9061
9076
  const posix = utils$d.isWindows(options);
9062
9077
  const regex = isState
9063
- ? picomatch$1.compileRe(glob, options)
9064
- : picomatch$1.makeRe(glob, options, false, true);
9078
+ ? picomatch$2.compileRe(glob, options)
9079
+ : picomatch$2.makeRe(glob, options, false, true);
9065
9080
 
9066
9081
  const state = regex.state;
9067
9082
  delete regex.state;
@@ -9069,11 +9084,11 @@ const picomatch$1 = (glob, options, returnState = false) => {
9069
9084
  let isIgnored = () => false;
9070
9085
  if (opts.ignore) {
9071
9086
  const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null };
9072
- isIgnored = picomatch$1(opts.ignore, ignoreOpts, returnState);
9087
+ isIgnored = picomatch$2(opts.ignore, ignoreOpts, returnState);
9073
9088
  }
9074
9089
 
9075
9090
  const matcher = (input, returnObject = false) => {
9076
- const { isMatch, match, output } = picomatch$1.test(input, regex, options, { glob, posix });
9091
+ const { isMatch, match, output } = picomatch$2.test(input, regex, options, { glob, posix });
9077
9092
  const result = { glob, state, regex, posix, input, output, match, isMatch };
9078
9093
 
9079
9094
  if (typeof opts.onResult === 'function') {
@@ -9123,7 +9138,7 @@ const picomatch$1 = (glob, options, returnState = false) => {
9123
9138
  * @api public
9124
9139
  */
9125
9140
 
9126
- picomatch$1.test = (input, regex, options, { glob, posix } = {}) => {
9141
+ picomatch$2.test = (input, regex, options, { glob, posix } = {}) => {
9127
9142
  if (typeof input !== 'string') {
9128
9143
  throw new TypeError('Expected input to be a string');
9129
9144
  }
@@ -9144,7 +9159,7 @@ picomatch$1.test = (input, regex, options, { glob, posix } = {}) => {
9144
9159
 
9145
9160
  if (match === false || opts.capture === true) {
9146
9161
  if (opts.matchBase === true || opts.basename === true) {
9147
- match = picomatch$1.matchBase(input, regex, options, posix);
9162
+ match = picomatch$2.matchBase(input, regex, options, posix);
9148
9163
  } else {
9149
9164
  match = regex.exec(output);
9150
9165
  }
@@ -9167,8 +9182,8 @@ picomatch$1.test = (input, regex, options, { glob, posix } = {}) => {
9167
9182
  * @api public
9168
9183
  */
9169
9184
 
9170
- picomatch$1.matchBase = (input, glob, options, posix = utils$d.isWindows(options)) => {
9171
- const regex = glob instanceof RegExp ? glob : picomatch$1.makeRe(glob, options);
9185
+ picomatch$2.matchBase = (input, glob, options, posix = utils$d.isWindows(options)) => {
9186
+ const regex = glob instanceof RegExp ? glob : picomatch$2.makeRe(glob, options);
9172
9187
  return regex.test(path$7.basename(input));
9173
9188
  };
9174
9189
 
@@ -9189,7 +9204,7 @@ picomatch$1.matchBase = (input, glob, options, posix = utils$d.isWindows(options
9189
9204
  * @api public
9190
9205
  */
9191
9206
 
9192
- picomatch$1.isMatch = (str, patterns, options) => picomatch$1(patterns, options)(str);
9207
+ picomatch$2.isMatch = (str, patterns, options) => picomatch$2(patterns, options)(str);
9193
9208
 
9194
9209
  /**
9195
9210
  * Parse a glob pattern to create the source string for a regular
@@ -9205,8 +9220,8 @@ picomatch$1.isMatch = (str, patterns, options) => picomatch$1(patterns, options)
9205
9220
  * @api public
9206
9221
  */
9207
9222
 
9208
- picomatch$1.parse = (pattern, options) => {
9209
- if (Array.isArray(pattern)) return pattern.map(p => picomatch$1.parse(p, options));
9223
+ picomatch$2.parse = (pattern, options) => {
9224
+ if (Array.isArray(pattern)) return pattern.map(p => picomatch$2.parse(p, options));
9210
9225
  return parse$2(pattern, { ...options, fastpaths: false });
9211
9226
  };
9212
9227
 
@@ -9237,7 +9252,7 @@ picomatch$1.parse = (pattern, options) => {
9237
9252
  * @api public
9238
9253
  */
9239
9254
 
9240
- picomatch$1.scan = (input, options) => scan$1(input, options);
9255
+ picomatch$2.scan = (input, options) => scan$1(input, options);
9241
9256
 
9242
9257
  /**
9243
9258
  * Compile a regular expression from the `state` object returned by the
@@ -9251,7 +9266,7 @@ picomatch$1.scan = (input, options) => scan$1(input, options);
9251
9266
  * @api public
9252
9267
  */
9253
9268
 
9254
- picomatch$1.compileRe = (state, options, returnOutput = false, returnState = false) => {
9269
+ picomatch$2.compileRe = (state, options, returnOutput = false, returnState = false) => {
9255
9270
  if (returnOutput === true) {
9256
9271
  return state.output;
9257
9272
  }
@@ -9265,7 +9280,7 @@ picomatch$1.compileRe = (state, options, returnOutput = false, returnState = fal
9265
9280
  source = `^(?!${source}).*$`;
9266
9281
  }
9267
9282
 
9268
- const regex = picomatch$1.toRegex(source, options);
9283
+ const regex = picomatch$2.toRegex(source, options);
9269
9284
  if (returnState === true) {
9270
9285
  regex.state = state;
9271
9286
  }
@@ -9292,7 +9307,7 @@ picomatch$1.compileRe = (state, options, returnOutput = false, returnState = fal
9292
9307
  * @api public
9293
9308
  */
9294
9309
 
9295
- picomatch$1.makeRe = (input, options = {}, returnOutput = false, returnState = false) => {
9310
+ picomatch$2.makeRe = (input, options = {}, returnOutput = false, returnState = false) => {
9296
9311
  if (!input || typeof input !== 'string') {
9297
9312
  throw new TypeError('Expected a non-empty string');
9298
9313
  }
@@ -9307,7 +9322,7 @@ picomatch$1.makeRe = (input, options = {}, returnOutput = false, returnState = f
9307
9322
  parsed = parse$2(input, options);
9308
9323
  }
9309
9324
 
9310
- return picomatch$1.compileRe(parsed, options, returnOutput, returnState);
9325
+ return picomatch$2.compileRe(parsed, options, returnOutput, returnState);
9311
9326
  };
9312
9327
 
9313
9328
  /**
@@ -9327,7 +9342,7 @@ picomatch$1.makeRe = (input, options = {}, returnOutput = false, returnState = f
9327
9342
  * @api public
9328
9343
  */
9329
9344
 
9330
- picomatch$1.toRegex = (source, options) => {
9345
+ picomatch$2.toRegex = (source, options) => {
9331
9346
  try {
9332
9347
  const opts = options || {};
9333
9348
  return new RegExp(source, opts.flags || (opts.nocase ? 'i' : ''));
@@ -9342,22 +9357,19 @@ picomatch$1.toRegex = (source, options) => {
9342
9357
  * @return {Object}
9343
9358
  */
9344
9359
 
9345
- picomatch$1.constants = constants$9;
9360
+ picomatch$2.constants = constants$9;
9346
9361
 
9347
9362
  /**
9348
9363
  * Expose "picomatch"
9349
9364
  */
9350
9365
 
9351
- var picomatch_1 = picomatch$1;
9352
-
9353
- (function (module) {
9366
+ var picomatch_1 = picomatch$2;
9354
9367
 
9355
- module.exports = picomatch_1;
9356
- } (picomatch$2));
9368
+ var picomatch$1 = picomatch_1;
9357
9369
 
9358
9370
  const util$7 = require$$0__default["default"];
9359
9371
  const braces = braces_1;
9360
- const picomatch = picomatch$2.exports;
9372
+ const picomatch = picomatch$1;
9361
9373
  const utils$c = utils$g;
9362
9374
  const isEmptyString = val => val === '' || val === './';
9363
9375
 
@@ -10411,7 +10423,7 @@ var fs$a = {};
10411
10423
  }
10412
10424
  return Object.assign(Object.assign({}, exports.FILE_SYSTEM_ADAPTER), fsMethods);
10413
10425
  }
10414
- exports.createFileSystemAdapter = createFileSystemAdapter;
10426
+ exports.createFileSystemAdapter = createFileSystemAdapter;
10415
10427
  } (fs$a));
10416
10428
 
10417
10429
  Object.defineProperty(settings$3, "__esModule", { value: true });
@@ -10764,7 +10776,7 @@ var fs$6 = {};
10764
10776
  }
10765
10777
  return Object.assign(Object.assign({}, exports.FILE_SYSTEM_ADAPTER), fsMethods);
10766
10778
  }
10767
- exports.createFileSystemAdapter = createFileSystemAdapter;
10779
+ exports.createFileSystemAdapter = createFileSystemAdapter;
10768
10780
  } (fs$6));
10769
10781
 
10770
10782
  Object.defineProperty(settings$2, "__esModule", { value: true });
@@ -11140,6 +11152,8 @@ function queueAsPromised (context, worker, concurrency) {
11140
11152
  queue.exports = fastqueue;
11141
11153
  queue.exports.promise = queueAsPromised;
11142
11154
 
11155
+ var queueExports = queue.exports;
11156
+
11143
11157
  var common$4 = {};
11144
11158
 
11145
11159
  Object.defineProperty(common$4, "__esModule", { value: true });
@@ -11189,7 +11203,7 @@ reader$1.default = Reader$1;
11189
11203
  Object.defineProperty(async$4, "__esModule", { value: true });
11190
11204
  const events_1 = require$$0__default$2["default"];
11191
11205
  const fsScandir$2 = out$2;
11192
- const fastq = queue.exports;
11206
+ const fastq = queueExports;
11193
11207
  const common$2 = common$4;
11194
11208
  const reader_1$4 = reader$1;
11195
11209
  class AsyncReader extends reader_1$4.default {
@@ -12112,7 +12126,7 @@ var settings = {};
12112
12126
  return Object.assign(Object.assign({}, exports.DEFAULT_FILE_SYSTEM_ADAPTER), methods);
12113
12127
  }
12114
12128
  }
12115
- exports.default = Settings;
12129
+ exports.default = Settings;
12116
12130
  } (settings));
12117
12131
 
12118
12132
  const taskManager = tasks;
@@ -13706,6 +13720,8 @@ anyBase.HEX = '0123456789abcdef';
13706
13720
 
13707
13721
  var anyBase_1 = anyBase;
13708
13722
 
13723
+ var anyBase$1 = /*@__PURE__*/getDefaultExportFromCjs(anyBase_1);
13724
+
13709
13725
  var pixelmatch_1 = pixelmatch;
13710
13726
 
13711
13727
  function pixelmatch(img1, img2, output, width, height, options) {
@@ -13863,6 +13879,8 @@ function grayPixel(img, i) {
13863
13879
  return rgb2y(r, g, b);
13864
13880
  }
13865
13881
 
13882
+ var pixelMatch = /*@__PURE__*/getDefaultExportFromCjs(pixelmatch_1);
13883
+
13866
13884
  // This file is autogenerated. It's used to publish ESM to npm.
13867
13885
  function _typeof$1(obj) {
13868
13886
  "@babel/helpers - typeof";
@@ -15159,13 +15177,23 @@ ImagePHash.prototype.getHash = function (img) {
15159
15177
 
15160
15178
  // DCT function stolen from http://stackoverflow.com/questions/4240490/problems-with-dct-and-idct-algorithm-in-java
15161
15179
 
15180
+ /**
15181
+ Convert a 32-bit integer color value to an RGBA object.
15182
+ */
15162
15183
  function intToRGBA(i) {
15163
- const rgba = {};
15164
- rgba.r = Math.floor(i / Math.pow(256, 3));
15165
- rgba.g = Math.floor((i - rgba.r * Math.pow(256, 3)) / Math.pow(256, 2));
15166
- rgba.b = Math.floor((i - rgba.r * Math.pow(256, 3) - rgba.g * Math.pow(256, 2)) / Math.pow(256, 1));
15167
- rgba.a = Math.floor((i - rgba.r * Math.pow(256, 3) - rgba.g * Math.pow(256, 2) - rgba.b * Math.pow(256, 1)) / Math.pow(256, 0));
15168
- return rgba;
15184
+ const a = i & 0xff;
15185
+ i >>>= 8;
15186
+ const b = i & 0xff;
15187
+ i >>>= 8;
15188
+ const g = i & 0xff;
15189
+ i >>>= 8;
15190
+ const r = i & 0xff;
15191
+ return {
15192
+ r,
15193
+ g,
15194
+ b,
15195
+ a
15196
+ };
15169
15197
  }
15170
15198
  const c$1 = [];
15171
15199
  function initCoefficients(size) {
@@ -15389,6 +15417,8 @@ conversions["RegExp"] = function (V, opts) {
15389
15417
 
15390
15418
  var utils = {exports: {}};
15391
15419
 
15420
+ utils.exports;
15421
+
15392
15422
  (function (module) {
15393
15423
 
15394
15424
  module.exports.mixin = function mixin(target, source) {
@@ -15407,9 +15437,11 @@ var utils = {exports: {}};
15407
15437
 
15408
15438
  module.exports.implForWrapper = function (wrapper) {
15409
15439
  return wrapper[module.exports.implSymbol];
15410
- };
15440
+ };
15411
15441
  } (utils));
15412
15442
 
15443
+ var utilsExports = utils.exports;
15444
+
15413
15445
  var URLImpl = {};
15414
15446
 
15415
15447
  var urlStateMachine = {exports: {}};
@@ -93259,6 +93291,8 @@ tr46.toUnicode = function(domain_name, useSTD3) {
93259
93291
 
93260
93292
  tr46.PROCESSING_OPTIONS = PROCESSING_OPTIONS;
93261
93293
 
93294
+ urlStateMachine.exports;
93295
+
93262
93296
  (function (module) {
93263
93297
  const punycode = require$$0__default$3["default"];
93264
93298
  const tr46$1 = tr46;
@@ -94554,10 +94588,12 @@ tr46.PROCESSING_OPTIONS = PROCESSING_OPTIONS;
94554
94588
 
94555
94589
  // We don't handle blobs, so this just delegates:
94556
94590
  return module.exports.basicURLParse(input, { baseURL: options.baseURL, encodingOverride: options.encodingOverride });
94557
- };
94591
+ };
94558
94592
  } (urlStateMachine));
94559
94593
 
94560
- const usm = urlStateMachine.exports;
94594
+ var urlStateMachineExports = urlStateMachine.exports;
94595
+
94596
+ const usm = urlStateMachineExports;
94561
94597
 
94562
94598
  URLImpl.implementation = class URLImpl {
94563
94599
  constructor(constructorArgs) {
@@ -94757,13 +94793,15 @@ URLImpl.implementation = class URLImpl {
94757
94793
  }
94758
94794
  };
94759
94795
 
94796
+ URL$2.exports;
94797
+
94760
94798
  (function (module) {
94761
94799
 
94762
94800
  const conversions = lib$6;
94763
- const utils$1 = utils.exports;
94801
+ const utils = utilsExports;
94764
94802
  const Impl = URLImpl;
94765
94803
 
94766
- const impl = utils$1.implSymbol;
94804
+ const impl = utils.implSymbol;
94767
94805
 
94768
94806
  function URL(url) {
94769
94807
  if (!this || this[impl] || !(this instanceof URL)) {
@@ -94944,25 +94982,27 @@ URLImpl.implementation = class URLImpl {
94944
94982
  privateData.wrapper = obj;
94945
94983
 
94946
94984
  obj[impl] = new Impl.implementation(constructorArgs, privateData);
94947
- obj[impl][utils$1.wrapperSymbol] = obj;
94985
+ obj[impl][utils.wrapperSymbol] = obj;
94948
94986
  },
94949
94987
  interface: URL,
94950
94988
  expose: {
94951
94989
  Window: { URL: URL },
94952
94990
  Worker: { URL: URL }
94953
94991
  }
94954
- };
94992
+ };
94955
94993
  } (URL$2));
94956
94994
 
94957
- publicApi.URL = URL$2.exports.interface;
94958
- publicApi.serializeURL = urlStateMachine.exports.serializeURL;
94959
- publicApi.serializeURLOrigin = urlStateMachine.exports.serializeURLOrigin;
94960
- publicApi.basicURLParse = urlStateMachine.exports.basicURLParse;
94961
- publicApi.setTheUsername = urlStateMachine.exports.setTheUsername;
94962
- publicApi.setThePassword = urlStateMachine.exports.setThePassword;
94963
- publicApi.serializeHost = urlStateMachine.exports.serializeHost;
94964
- publicApi.serializeInteger = urlStateMachine.exports.serializeInteger;
94965
- publicApi.parseURL = urlStateMachine.exports.parseURL;
94995
+ var URLExports = URL$2.exports;
94996
+
94997
+ publicApi.URL = URLExports.interface;
94998
+ publicApi.serializeURL = urlStateMachineExports.serializeURL;
94999
+ publicApi.serializeURLOrigin = urlStateMachineExports.serializeURLOrigin;
95000
+ publicApi.basicURLParse = urlStateMachineExports.basicURLParse;
95001
+ publicApi.setTheUsername = urlStateMachineExports.setTheUsername;
95002
+ publicApi.setThePassword = urlStateMachineExports.setThePassword;
95003
+ publicApi.serializeHost = urlStateMachineExports.serializeHost;
95004
+ publicApi.serializeInteger = urlStateMachineExports.serializeInteger;
95005
+ publicApi.parseURL = urlStateMachineExports.parseURL;
94966
95006
 
94967
95007
  // Based on https://github.com/tmpvar/jsdom/blob/aa85b2abf07766ff7bf5c1f6daafb3726f2f2db5/lib/jsdom/living/blob.js
94968
95008
 
@@ -96742,6 +96782,8 @@ var lib$5 = /*#__PURE__*/Object.freeze({
96742
96782
 
96743
96783
  var require$$0 = /*@__PURE__*/getAugmentedNamespace(lib$5);
96744
96784
 
96785
+ fetchNpmNode.exports;
96786
+
96745
96787
  (function (module) {
96746
96788
 
96747
96789
  var realFetch = require$$0;
@@ -96757,9 +96799,11 @@ var require$$0 = /*@__PURE__*/getAugmentedNamespace(lib$5);
96757
96799
  commonjsGlobal.Response = realFetch.Response;
96758
96800
  commonjsGlobal.Headers = realFetch.Headers;
96759
96801
  commonjsGlobal.Request = realFetch.Request;
96760
- }
96802
+ }
96761
96803
  } (fetchNpmNode));
96762
96804
 
96805
+ fetchNpmNode.exports;
96806
+
96763
96807
  var request$1 = ((_ref, cb) => {
96764
96808
  let {
96765
96809
  url,
@@ -97273,7 +97317,7 @@ var EndOfFileStream = {};
97273
97317
  super(exports.defaultMessages);
97274
97318
  }
97275
97319
  }
97276
- exports.EndOfStreamError = EndOfStreamError;
97320
+ exports.EndOfStreamError = EndOfStreamError;
97277
97321
  } (EndOfFileStream));
97278
97322
 
97279
97323
  var StreamReader = {};
@@ -97427,7 +97471,7 @@ Deferred$1.Deferred = Deferred;
97427
97471
  }
97428
97472
  }
97429
97473
  }
97430
- exports.StreamReader = StreamReader;
97474
+ exports.StreamReader = StreamReader;
97431
97475
  } (StreamReader));
97432
97476
 
97433
97477
  (function (exports) {
@@ -97436,7 +97480,7 @@ Deferred$1.Deferred = Deferred;
97436
97480
  var EndOfFileStream_1 = EndOfFileStream;
97437
97481
  Object.defineProperty(exports, "EndOfStreamError", { enumerable: true, get: function () { return EndOfFileStream_1.EndOfStreamError; } });
97438
97482
  var StreamReader_1 = StreamReader;
97439
- Object.defineProperty(exports, "StreamReader", { enumerable: true, get: function () { return StreamReader_1.StreamReader; } });
97483
+ Object.defineProperty(exports, "StreamReader", { enumerable: true, get: function () { return StreamReader_1.StreamReader; } });
97440
97484
  } (lib$3));
97441
97485
 
97442
97486
  Object.defineProperty(AbstractTokenizer$1, "__esModule", { value: true });
@@ -97726,7 +97770,7 @@ BufferTokenizer$1.BufferTokenizer = BufferTokenizer;
97726
97770
  function fromBuffer(uint8Array, fileInfo) {
97727
97771
  return new BufferTokenizer_1.BufferTokenizer(uint8Array, fileInfo);
97728
97772
  }
97729
- exports.fromBuffer = fromBuffer;
97773
+ exports.fromBuffer = fromBuffer;
97730
97774
  } (core$2));
97731
97775
 
97732
97776
  var FileTokenizer$1 = {};
@@ -97812,7 +97856,7 @@ FileTokenizer$1.fromFile = fromFile$1;
97812
97856
  }
97813
97857
  return core.fromStream(stream, fileInfo);
97814
97858
  }
97815
- exports.fromStream = fromStream;
97859
+ exports.fromStream = fromStream;
97816
97860
  } (lib$4));
97817
97861
 
97818
97862
  var lib$2 = {};
@@ -98360,7 +98404,7 @@ ieee754.write = function (buffer, value, offset, isLE, mLen, nBytes) {
98360
98404
  201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216,
98361
98405
  217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232,
98362
98406
  233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247,
98363
- 248, 249, 250, 251, 252, 253, 254, 255];
98407
+ 248, 249, 250, 251, 252, 253, 254, 255];
98364
98408
  } (lib$2));
98365
98409
 
98366
98410
  var util$6 = {};
@@ -100179,6 +100223,8 @@ Object.defineProperty(fileType, 'mimeTypes', {
100179
100223
 
100180
100224
  var fileType_1 = fileType;
100181
100225
 
100226
+ var FileType = /*@__PURE__*/getDefaultExportFromCjs(fileType_1);
100227
+
100182
100228
  /*jslint browser: true, devel: true, bitwise: false, debug: true, eqeq: false, es5: true, evil: false, forin: false, newcap: false, nomen: true, plusplus: true, regexp: false, unparam: false, sloppy: true, stupid: false, sub: false, todo: true, vars: true, white: true */
100183
100229
 
100184
100230
  var jpeg$2 = {
@@ -101480,8 +101526,10 @@ var exifParser = {
101480
101526
  }
101481
101527
  };
101482
101528
 
101529
+ var EXIFParser = /*@__PURE__*/getDefaultExportFromCjs(exifParser);
101530
+
101483
101531
  async function getMIMEFromBuffer(buffer, path) {
101484
- const fileTypeFromBuffer = await fileType_1.fromBuffer(buffer);
101532
+ const fileTypeFromBuffer = await FileType.fromBuffer(buffer);
101485
101533
  if (fileTypeFromBuffer) {
101486
101534
  // If fileType returns something for buffer, then return the mime given
101487
101535
  return fileTypeFromBuffer.mime;
@@ -101627,7 +101675,7 @@ async function parseBitmap(data, path, cb) {
101627
101675
  return cb.call(this, error, this);
101628
101676
  }
101629
101677
  try {
101630
- this._exif = exifParser.create(data).parse();
101678
+ this._exif = EXIFParser.create(data).parse();
101631
101679
  exifRotate(this); // EXIF data
101632
101680
  } catch (error) {
101633
101681
  /* meh */
@@ -101693,7 +101741,7 @@ const alphabet = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
101693
101741
  // 0 and 1 do not exist as possible hash lengths
101694
101742
  const maxHashLength = [NaN, NaN];
101695
101743
  for (let i = 2; i < 65; i++) {
101696
- const maxHash = anyBase_1(anyBase_1.BIN, alphabet.slice(0, i))(new Array(64 + 1).join("1"));
101744
+ const maxHash = anyBase$1(anyBase$1.BIN, alphabet.slice(0, i))(new Array(64 + 1).join("1"));
101697
101745
  maxHashLength.push(maxHash.length);
101698
101746
  }
101699
101747
 
@@ -102166,7 +102214,7 @@ class Jimp$1 extends require$$0__default$2["default"] {
102166
102214
  return throwError.call(this, "base must be a number between 2 and 64", cb);
102167
102215
  }
102168
102216
  let hash = this.pHash();
102169
- hash = anyBase_1(anyBase_1.BIN, alphabet.slice(0, base))(hash);
102217
+ hash = anyBase$1(anyBase$1.BIN, alphabet.slice(0, base))(hash);
102170
102218
  while (hash.length < maxHashLength[base]) {
102171
102219
  hash = "0" + hash; // pad out with leading zeros
102172
102220
  }
@@ -102275,10 +102323,6 @@ class Jimp$1 extends require$$0__default$2["default"] {
102275
102323
  */
102276
102324
  getPixelColor(x, y, cb) {
102277
102325
  if (typeof x !== "number" || typeof y !== "number") return throwError.call(this, "x and y must be numbers", cb);
102278
-
102279
- // round input
102280
- x = Math.round(x);
102281
- y = Math.round(y);
102282
102326
  const idx = this.getPixelIndex(x, y);
102283
102327
  const hex = this.bitmap.data.readUInt32BE(idx);
102284
102328
  if (isNodePattern(cb)) {
@@ -102296,10 +102340,6 @@ class Jimp$1 extends require$$0__default$2["default"] {
102296
102340
  */
102297
102341
  setPixelColor(hex, x, y, cb) {
102298
102342
  if (typeof hex !== "number" || typeof x !== "number" || typeof y !== "number") return throwError.call(this, "hex, x and y must be numbers", cb);
102299
-
102300
- // round input
102301
- x = Math.round(x);
102302
- y = Math.round(y);
102303
102343
  const idx = this.getPixelIndex(x, y);
102304
102344
  this.bitmap.data.writeUInt32BE(hex, idx);
102305
102345
  if (isNodePattern(cb)) {
@@ -102312,13 +102352,15 @@ class Jimp$1 extends require$$0__default$2["default"] {
102312
102352
  * @return {boolean} hasAlpha whether the image contains opaque pixels
102313
102353
  */
102314
102354
  hasAlpha() {
102315
- for (let yIndex = 0; yIndex < this.bitmap.height; yIndex++) {
102316
- for (let xIndex = 0; xIndex < this.bitmap.width; xIndex++) {
102317
- const idx = this.bitmap.width * yIndex + xIndex << 2;
102318
- const alpha = this.bitmap.data[idx + 3];
102319
- if (alpha !== 0xff) {
102320
- return true;
102321
- }
102355
+ const {
102356
+ width,
102357
+ height,
102358
+ data
102359
+ } = this.bitmap;
102360
+ const byteLen = width * height << 2;
102361
+ for (let idx = 3; idx < byteLen; idx += 4) {
102362
+ if (data[idx] !== 0xff) {
102363
+ return true;
102322
102364
  }
102323
102365
  }
102324
102366
  return false;
@@ -102418,11 +102460,16 @@ Jimp$1.rgbaToInt = function (r, g, b, a, cb) {
102418
102460
  if (a < 0 || a > 255) {
102419
102461
  return throwError.call(this, "a must be between 0 and 255", cb);
102420
102462
  }
102421
- r = Math.round(r);
102422
- b = Math.round(b);
102423
- g = Math.round(g);
102424
- a = Math.round(a);
102425
- const i = r * Math.pow(256, 3) + g * Math.pow(256, 2) + b * Math.pow(256, 1) + a * Math.pow(256, 0);
102463
+ let i = r & 0xff;
102464
+ i <<= 8;
102465
+ i |= g & 0xff;
102466
+ i <<= 8;
102467
+ i |= b & 0xff;
102468
+ i <<= 8;
102469
+ i |= a & 0xff;
102470
+
102471
+ // Ensure sign is correct
102472
+ i >>>= 0;
102426
102473
  if (isNodePattern(cb)) {
102427
102474
  cb.call(this, null, i);
102428
102475
  }
@@ -102498,7 +102545,7 @@ Jimp$1.diff = function (img1, img2) {
102498
102545
  return throwError.call(this, "threshold must be a number between 0 and 1");
102499
102546
  }
102500
102547
  const diff = new Jimp$1(bmp1.width, bmp1.height, 0xffffffff);
102501
- const numDiffPixels = pixelmatch_1(bmp1.data, bmp2.data, diff.bitmap.data, diff.bitmap.width, diff.bitmap.height, {
102548
+ const numDiffPixels = pixelMatch(bmp1.data, bmp2.data, diff.bitmap.data, diff.bitmap.width, diff.bitmap.height, {
102502
102549
  threshold
102503
102550
  });
102504
102551
  return {
@@ -103460,6 +103507,7 @@ var encoder$1 = {exports: {}};
103460
103507
  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
103461
103508
  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
103462
103509
  */
103510
+ encoder$1.exports;
103463
103511
 
103464
103512
  (function (module) {
103465
103513
 
@@ -104205,10 +104253,13 @@ var encoder$1 = {exports: {}};
104205
104253
  }
104206
104254
  } (encoder$1));
104207
104255
 
104256
+ var encoderExports = encoder$1.exports;
104257
+
104208
104258
  var decoder$1 = {exports: {}};
104209
104259
 
104210
104260
  /* -*- tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- /
104211
104261
  /* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
104262
+ decoder$1.exports;
104212
104263
 
104213
104264
  (function (module) {
104214
104265
  /*
@@ -105353,17 +105404,21 @@ var decoder$1 = {exports: {}};
105353
105404
  decoder.copyToImageData(image, opts.formatAsRGBA);
105354
105405
 
105355
105406
  return image;
105356
- }
105407
+ }
105357
105408
  } (decoder$1));
105358
105409
 
105359
- var encode$2 = encoder$1.exports,
105360
- decode$2 = decoder$1.exports;
105410
+ var decoderExports = decoder$1.exports;
105411
+
105412
+ var encode$2 = encoderExports,
105413
+ decode$2 = decoderExports;
105361
105414
 
105362
105415
  var jpegJs = {
105363
105416
  encode: encode$2,
105364
105417
  decode: decode$2
105365
105418
  };
105366
105419
 
105420
+ var JPEG = /*@__PURE__*/getDefaultExportFromCjs(jpegJs);
105421
+
105367
105422
  const MIME_TYPE$4 = "image/jpeg";
105368
105423
  var jpeg = (() => ({
105369
105424
  mime: {
@@ -105373,10 +105428,10 @@ var jpeg = (() => ({
105373
105428
  MIME_JPEG: MIME_TYPE$4
105374
105429
  },
105375
105430
  decoders: {
105376
- [MIME_TYPE$4]: jpegJs.decode
105431
+ [MIME_TYPE$4]: JPEG.decode
105377
105432
  },
105378
105433
  encoders: {
105379
- [MIME_TYPE$4]: image => jpegJs.encode(image.bitmap, image._quality).data
105434
+ [MIME_TYPE$4]: image => JPEG.encode(image.bitmap, image._quality).data
105380
105435
  },
105381
105436
  class: {
105382
105437
  // The quality to be used when saving JPEG images
@@ -105595,6 +105650,8 @@ ChunkStream$2.prototype._process = function () {
105595
105650
  }
105596
105651
  };
105597
105652
 
105653
+ var chunkstreamExports = chunkstream.exports;
105654
+
105598
105655
  var filterParseAsync = {exports: {}};
105599
105656
 
105600
105657
  var filterParse = {exports: {}};
@@ -105886,9 +105943,11 @@ Filter$2.prototype._reverseFilterLine = function (rawData) {
105886
105943
  }
105887
105944
  };
105888
105945
 
105946
+ var filterParseExports = filterParse.exports;
105947
+
105889
105948
  let util$4 = require$$0__default["default"];
105890
- let ChunkStream$1 = chunkstream.exports;
105891
- let Filter$1 = filterParse.exports;
105949
+ let ChunkStream$1 = chunkstreamExports;
105950
+ let Filter$1 = filterParseExports;
105892
105951
 
105893
105952
  let FilterAsync$1 = (filterParseAsync.exports = function (bitmapInfo) {
105894
105953
  ChunkStream$1.call(this);
@@ -105909,6 +105968,8 @@ let FilterAsync$1 = (filterParseAsync.exports = function (bitmapInfo) {
105909
105968
  });
105910
105969
  util$4.inherits(FilterAsync$1, ChunkStream$1);
105911
105970
 
105971
+ var filterParseAsyncExports = filterParseAsync.exports;
105972
+
105912
105973
  var parser$1 = {exports: {}};
105913
105974
 
105914
105975
  var constants$6 = {
@@ -105983,8 +106044,10 @@ CrcCalculator$1.crc32 = function (buf) {
105983
106044
  return crc ^ -1;
105984
106045
  };
105985
106046
 
106047
+ var crcExports = crc.exports;
106048
+
105986
106049
  let constants$5 = constants$6;
105987
- let CrcCalculator = crc.exports;
106050
+ let CrcCalculator = crcExports;
105988
106051
 
105989
106052
  let Parser$3 = (parser$1.exports = function (options, dependencies) {
105990
106053
  this._options = options;
@@ -106272,6 +106335,8 @@ Parser$3.prototype._parseIEND = function (data) {
106272
106335
  }
106273
106336
  };
106274
106337
 
106338
+ var parserExports = parser$1.exports;
106339
+
106275
106340
  var bitmapper$2 = {};
106276
106341
 
106277
106342
  let interlaceUtils = interlace;
@@ -106634,9 +106699,9 @@ var formatNormaliser$2 = function (indata, imageData, skipRescale = false) {
106634
106699
 
106635
106700
  let util$3 = require$$0__default["default"];
106636
106701
  let zlib$4 = zlib__default["default"];
106637
- let ChunkStream = chunkstream.exports;
106638
- let FilterAsync = filterParseAsync.exports;
106639
- let Parser$2 = parser$1.exports;
106702
+ let ChunkStream = chunkstreamExports;
106703
+ let FilterAsync = filterParseAsyncExports;
106704
+ let Parser$2 = parserExports;
106640
106705
  let bitmapper$1 = bitmapper$2;
106641
106706
  let formatNormaliser$1 = formatNormaliser$2;
106642
106707
 
@@ -106800,6 +106865,8 @@ ParserAsync.prototype._complete = function (filteredData) {
106800
106865
  this.emit("parsed", normalisedBitmapData);
106801
106866
  };
106802
106867
 
106868
+ var parserAsyncExports = parserAsync.exports;
106869
+
106803
106870
  var packerAsync = {exports: {}};
106804
106871
 
106805
106872
  var packer = {exports: {}};
@@ -107132,7 +107199,7 @@ var filterPack = function (pxData, width, height, options, bpp) {
107132
107199
  };
107133
107200
 
107134
107201
  let constants$3 = constants$6;
107135
- let CrcStream = crc.exports;
107202
+ let CrcStream = crcExports;
107136
107203
  let bitPacker = bitpacker;
107137
107204
  let filter = filterPack;
107138
107205
  let zlib$3 = zlib__default["default"];
@@ -107259,10 +107326,12 @@ Packer$3.prototype.packIEND = function () {
107259
107326
  return this._packChunk(constants$3.TYPE_IEND, null);
107260
107327
  };
107261
107328
 
107329
+ var packerExports = packer.exports;
107330
+
107262
107331
  let util$2 = require$$0__default["default"];
107263
107332
  let Stream$1 = Stream__default["default"];
107264
107333
  let constants$2 = constants$6;
107265
- let Packer$2 = packer.exports;
107334
+ let Packer$2 = packerExports;
107266
107335
 
107267
107336
  let PackerAsync = (packerAsync.exports = function (opt) {
107268
107337
  Stream$1.call(this);
@@ -107308,10 +107377,14 @@ PackerAsync.prototype.pack = function (data, width, height, gamma) {
107308
107377
  this._deflate.end(filteredData);
107309
107378
  };
107310
107379
 
107380
+ var packerAsyncExports = packerAsync.exports;
107381
+
107311
107382
  var pngSync = {};
107312
107383
 
107313
107384
  var syncInflate = {exports: {}};
107314
107385
 
107386
+ syncInflate.exports;
107387
+
107315
107388
  (function (module, exports) {
107316
107389
 
107317
107390
  let assert = require$$0__default$4["default"].ok;
@@ -107479,9 +107552,11 @@ var syncInflate = {exports: {}};
107479
107552
  module.exports = exports = inflateSync;
107480
107553
  exports.Inflate = Inflate;
107481
107554
  exports.createInflate = createInflate;
107482
- exports.inflateSync = inflateSync;
107555
+ exports.inflateSync = inflateSync;
107483
107556
  } (syncInflate, syncInflate.exports));
107484
107557
 
107558
+ var syncInflateExports = syncInflate.exports;
107559
+
107485
107560
  var syncReader = {exports: {}};
107486
107561
 
107487
107562
  let SyncReader$2 = (syncReader.exports = function (buffer) {
@@ -107528,10 +107603,12 @@ SyncReader$2.prototype.process = function () {
107528
107603
  }
107529
107604
  };
107530
107605
 
107606
+ var syncReaderExports = syncReader.exports;
107607
+
107531
107608
  var filterParseSync = {};
107532
107609
 
107533
- let SyncReader$1 = syncReader.exports;
107534
- let Filter = filterParse.exports;
107610
+ let SyncReader$1 = syncReaderExports;
107611
+ let Filter = filterParseExports;
107535
107612
 
107536
107613
  filterParseSync.process = function (inBuffer, bitmapInfo) {
107537
107614
  let outBuffers = [];
@@ -107552,13 +107629,13 @@ filterParseSync.process = function (inBuffer, bitmapInfo) {
107552
107629
 
107553
107630
  let hasSyncZlib$1 = true;
107554
107631
  let zlib$2 = zlib__default["default"];
107555
- let inflateSync = syncInflate.exports;
107632
+ let inflateSync = syncInflateExports;
107556
107633
  if (!zlib$2.deflateSync) {
107557
107634
  hasSyncZlib$1 = false;
107558
107635
  }
107559
- let SyncReader = syncReader.exports;
107636
+ let SyncReader = syncReaderExports;
107560
107637
  let FilterSync = filterParseSync;
107561
- let Parser$1 = parser$1.exports;
107638
+ let Parser$1 = parserExports;
107562
107639
  let bitmapper = bitmapper$2;
107563
107640
  let formatNormaliser = formatNormaliser$2;
107564
107641
 
@@ -107667,7 +107744,7 @@ if (!zlib$1.deflateSync) {
107667
107744
  hasSyncZlib = false;
107668
107745
  }
107669
107746
  let constants$1 = constants$6;
107670
- let Packer$1 = packer.exports;
107747
+ let Packer$1 = packerExports;
107671
107748
 
107672
107749
  var packerSync = function (metaData, opt) {
107673
107750
  if (!hasSyncZlib) {
@@ -107731,8 +107808,8 @@ var PNG_1;
107731
107808
 
107732
107809
  let util$1 = require$$0__default["default"];
107733
107810
  let Stream = Stream__default["default"];
107734
- let Parser = parserAsync.exports;
107735
- let Packer = packerAsync.exports;
107811
+ let Parser = parserAsyncExports;
107812
+ let Packer = packerAsyncExports;
107736
107813
  let PNGSync = pngSync;
107737
107814
 
107738
107815
  let PNG = (PNG_1 = function (options) {
@@ -108633,6 +108710,8 @@ var bmpJs = {
108633
108710
  decode: decode$1
108634
108711
  };
108635
108712
 
108713
+ var BMP = /*@__PURE__*/getDefaultExportFromCjs(bmpJs);
108714
+
108636
108715
  const MIME_TYPE$2 = "image/bmp";
108637
108716
  const MIME_TYPE_SECOND = "image/x-ms-bmp";
108638
108717
  function toAGBR(image) {
@@ -108661,8 +108740,8 @@ function fromAGBR(bitmap) {
108661
108740
  this.bitmap.data[index + 3] = bitmap.is_with_alpha ? alpha : 0xff;
108662
108741
  }).bitmap;
108663
108742
  }
108664
- const decode = data => fromAGBR(bmpJs.decode(data));
108665
- const encode = image => bmpJs.encode(toAGBR(image)).data;
108743
+ const decode = data => fromAGBR(BMP.decode(data));
108744
+ const encode = image => BMP.encode(toAGBR(image)).data;
108666
108745
  var bmp = (() => ({
108667
108746
  mime: {
108668
108747
  [MIME_TYPE$2]: ["bmp"]
@@ -108798,8 +108877,8 @@ function requireCommon () {
108798
108877
  }
108799
108878
  };
108800
108879
 
108801
- exports.setTyped(TYPED_OK);
108802
- } (common));
108880
+ exports.setTyped(TYPED_OK);
108881
+ } (common));
108803
108882
  return common;
108804
108883
  }
108805
108884
 
@@ -115603,6 +115682,8 @@ function requirePako () {
115603
115682
  return pako_1;
115604
115683
  }
115605
115684
 
115685
+ UTIF.exports;
115686
+
115606
115687
  (function (module) {
115607
115688
  (function(){
115608
115689
  var UTIF = {};
@@ -117239,10 +117320,11 @@ function requirePako () {
117239
117320
 
117240
117321
 
117241
117322
  })(UTIF, pako);
117242
- })();
117323
+ })();
117243
117324
  } (UTIF));
117244
117325
 
117245
- var utif = UTIF.exports;
117326
+ var UTIFExports = UTIF.exports;
117327
+ var utif = /*@__PURE__*/getDefaultExportFromCjs(UTIFExports);
117246
117328
 
117247
117329
  const MIME_TYPE$1 = "image/tiff";
117248
117330
  var tiff = (() => ({
@@ -121616,8 +121698,8 @@ function requireGifutil () {
121616
121698
  return resolve();
121617
121699
  });
121618
121700
  });
121619
- }
121620
- } (gifutil));
121701
+ }
121702
+ } (gifutil));
121621
121703
  return gifutil;
121622
121704
  }
121623
121705
 
@@ -129779,8 +129861,8 @@ function requireSax () {
129779
129861
  }
129780
129862
  }());
129781
129863
  }
129782
- })(exports);
129783
- } (sax));
129864
+ })(exports);
129865
+ } (sax));
129784
129866
  return sax;
129785
129867
  }
129786
129868
 
@@ -130237,8 +130319,8 @@ function requireParser () {
130237
130319
  return parser.parseStringPromise(str);
130238
130320
  };
130239
130321
 
130240
- }).call(commonjsGlobal);
130241
- } (parser));
130322
+ }).call(commonjsGlobal);
130323
+ } (parser));
130242
130324
  return parser;
130243
130325
  }
130244
130326
 
@@ -133467,6 +133549,8 @@ var loadBmfont = function loadFont(opt, cb) {
133467
133549
  }
133468
133550
  };
133469
133551
 
133552
+ var bMFont = /*@__PURE__*/getDefaultExportFromCjs(loadBmfont);
133553
+
133470
133554
  function measureText(font, text) {
133471
133555
  let x = 0;
133472
133556
  for (let i = 0; i < text.length; i++) {
@@ -133478,21 +133562,21 @@ function measureText(font, text) {
133478
133562
  return x;
133479
133563
  }
133480
133564
  function splitLines(font, text, maxWidth) {
133481
- const words = text.split(" ");
133565
+ const words = text.replace(/[\r\n]+/g, " \n").split(" ");
133482
133566
  const lines = [];
133483
133567
  let currentLine = [];
133484
133568
  let longestLine = 0;
133485
133569
  words.forEach(word => {
133486
133570
  const line = [...currentLine, word].join(" ");
133487
133571
  const length = measureText(font, line);
133488
- if (length <= maxWidth) {
133572
+ if (length <= maxWidth && !word.includes("\n")) {
133489
133573
  if (length > longestLine) {
133490
133574
  longestLine = length;
133491
133575
  }
133492
133576
  currentLine.push(word);
133493
133577
  } else {
133494
133578
  lines.push(currentLine);
133495
- currentLine = [word];
133579
+ currentLine = [word.replace("\n", "")];
133496
133580
  }
133497
133581
  });
133498
133582
  lines.push(currentLine);
@@ -133577,7 +133661,7 @@ var print = (() => ({
133577
133661
  cb = cb || function (err, font) {
133578
133662
  if (err) reject(err);else resolve(font);
133579
133663
  };
133580
- loadBmfont(file, (err, font) => {
133664
+ bMFont(file, (err, font) => {
133581
133665
  const chars = {};
133582
133666
  const kernings = {};
133583
133667
  if (err) {
@@ -134718,6 +134802,8 @@ var Jimp = configure({
134718
134802
 
134719
134803
  var jsQR$1 = {exports: {}};
134720
134804
 
134805
+ jsQR$1.exports;
134806
+
134721
134807
  (function (module, exports) {
134722
134808
  (function webpackUniversalModuleDefinition(root, factory) {
134723
134809
  module.exports = factory();
@@ -144787,10 +144873,11 @@ var jsQR$1 = {exports: {}};
144787
144873
 
144788
144874
  /***/ })
144789
144875
  /******/ ])["default"];
144790
- });
144791
- } (jsQR$1));
144876
+ });
144877
+ } (jsQR$1, jsQR$1.exports));
144792
144878
 
144793
- var jsQR = /*@__PURE__*/getDefaultExportFromCjs(jsQR$1.exports);
144879
+ var jsQRExports = jsQR$1.exports;
144880
+ var jsQR = /*@__PURE__*/getDefaultExportFromCjs(jsQRExports);
144794
144881
 
144795
144882
  const decodeQRCodeFromFile = async (filePath) => {
144796
144883
  let decodedString;
@@ -146349,7 +146436,7 @@ const executeWithThrottledResources = async ({ code: emulatedCode, kind = "both"
146349
146436
  var main$2 = {exports: {}};
146350
146437
 
146351
146438
  var name = "dotenv";
146352
- var version$1 = "16.3.1";
146439
+ var version$1 = "16.4.5";
146353
146440
  var description = "Loads environment variables from .env file";
146354
146441
  var main$1 = "lib/main.js";
146355
146442
  var types = "lib/main.d.ts";
@@ -146373,6 +146460,7 @@ var scripts = {
146373
146460
  "lint-readme": "standard-markdown",
146374
146461
  pretest: "npm run lint && npm run dts-check",
146375
146462
  test: "tap tests/*.js --100 -Rspec",
146463
+ "test:coverage": "tap --coverage-report=lcov",
146376
146464
  prerelease: "npm test",
146377
146465
  release: "standard-version"
146378
146466
  };
@@ -146380,7 +146468,7 @@ var repository = {
146380
146468
  type: "git",
146381
146469
  url: "git://github.com/motdotla/dotenv.git"
146382
146470
  };
146383
- var funding = "https://github.com/motdotla/dotenv?sponsor=1";
146471
+ var funding = "https://dotenvx.com";
146384
146472
  var keywords = [
146385
146473
  "dotenv",
146386
146474
  "env",
@@ -146483,11 +146571,13 @@ function _parseVault (options) {
146483
146571
  // Parse .env.vault
146484
146572
  const result = DotenvModule.configDotenv({ path: vaultPath });
146485
146573
  if (!result.parsed) {
146486
- throw new Error(`MISSING_DATA: Cannot parse ${vaultPath} for an unknown reason`)
146574
+ const err = new Error(`MISSING_DATA: Cannot parse ${vaultPath} for an unknown reason`);
146575
+ err.code = 'MISSING_DATA';
146576
+ throw err
146487
146577
  }
146488
146578
 
146489
146579
  // handle scenario for comma separated keys - for use with key rotation
146490
- // example: DOTENV_KEY="dotenv://:key_1234@dotenv.org/vault/.env.vault?environment=prod,dotenv://:key_7890@dotenv.org/vault/.env.vault?environment=prod"
146580
+ // example: DOTENV_KEY="dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=prod,dotenv://:key_7890@dotenvx.com/vault/.env.vault?environment=prod"
146491
146581
  const keys = _dotenvKey(options).split(',');
146492
146582
  const length = keys.length;
146493
146583
 
@@ -146551,7 +146641,9 @@ function _instructions (result, dotenvKey) {
146551
146641
  uri = new URL(dotenvKey);
146552
146642
  } catch (error) {
146553
146643
  if (error.code === 'ERR_INVALID_URL') {
146554
- throw new Error('INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenv.org/vault/.env.vault?environment=development')
146644
+ const err = new Error('INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development');
146645
+ err.code = 'INVALID_DOTENV_KEY';
146646
+ throw err
146555
146647
  }
146556
146648
 
146557
146649
  throw error
@@ -146560,34 +146652,53 @@ function _instructions (result, dotenvKey) {
146560
146652
  // Get decrypt key
146561
146653
  const key = uri.password;
146562
146654
  if (!key) {
146563
- throw new Error('INVALID_DOTENV_KEY: Missing key part')
146655
+ const err = new Error('INVALID_DOTENV_KEY: Missing key part');
146656
+ err.code = 'INVALID_DOTENV_KEY';
146657
+ throw err
146564
146658
  }
146565
146659
 
146566
146660
  // Get environment
146567
146661
  const environment = uri.searchParams.get('environment');
146568
146662
  if (!environment) {
146569
- throw new Error('INVALID_DOTENV_KEY: Missing environment part')
146663
+ const err = new Error('INVALID_DOTENV_KEY: Missing environment part');
146664
+ err.code = 'INVALID_DOTENV_KEY';
146665
+ throw err
146570
146666
  }
146571
146667
 
146572
146668
  // Get ciphertext payload
146573
146669
  const environmentKey = `DOTENV_VAULT_${environment.toUpperCase()}`;
146574
146670
  const ciphertext = result.parsed[environmentKey]; // DOTENV_VAULT_PRODUCTION
146575
146671
  if (!ciphertext) {
146576
- throw new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${environmentKey} in your .env.vault file.`)
146672
+ const err = new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${environmentKey} in your .env.vault file.`);
146673
+ err.code = 'NOT_FOUND_DOTENV_ENVIRONMENT';
146674
+ throw err
146577
146675
  }
146578
146676
 
146579
146677
  return { ciphertext, key }
146580
146678
  }
146581
146679
 
146582
146680
  function _vaultPath (options) {
146583
- let dotenvPath = path.resolve(process.cwd(), '.env');
146681
+ let possibleVaultPath = null;
146584
146682
 
146585
146683
  if (options && options.path && options.path.length > 0) {
146586
- dotenvPath = options.path;
146684
+ if (Array.isArray(options.path)) {
146685
+ for (const filepath of options.path) {
146686
+ if (fs.existsSync(filepath)) {
146687
+ possibleVaultPath = filepath.endsWith('.vault') ? filepath : `${filepath}.vault`;
146688
+ }
146689
+ }
146690
+ } else {
146691
+ possibleVaultPath = options.path.endsWith('.vault') ? options.path : `${options.path}.vault`;
146692
+ }
146693
+ } else {
146694
+ possibleVaultPath = path.resolve(process.cwd(), '.env.vault');
146587
146695
  }
146588
146696
 
146589
- // Locate .env.vault
146590
- return dotenvPath.endsWith('.vault') ? dotenvPath : `${dotenvPath}.vault`
146697
+ if (fs.existsSync(possibleVaultPath)) {
146698
+ return possibleVaultPath
146699
+ }
146700
+
146701
+ return null
146591
146702
  }
146592
146703
 
146593
146704
  function _resolveHome (envPath) {
@@ -146610,51 +146721,73 @@ function _configVault (options) {
146610
146721
  }
146611
146722
 
146612
146723
  function configDotenv (options) {
146613
- let dotenvPath = path.resolve(process.cwd(), '.env');
146724
+ const dotenvPath = path.resolve(process.cwd(), '.env');
146614
146725
  let encoding = 'utf8';
146615
146726
  const debug = Boolean(options && options.debug);
146616
146727
 
146617
- if (options) {
146618
- if (options.path != null) {
146619
- dotenvPath = _resolveHome(options.path);
146728
+ if (options && options.encoding) {
146729
+ encoding = options.encoding;
146730
+ } else {
146731
+ if (debug) {
146732
+ _debug('No encoding is specified. UTF-8 is used by default');
146620
146733
  }
146621
- if (options.encoding != null) {
146622
- encoding = options.encoding;
146734
+ }
146735
+
146736
+ let optionPaths = [dotenvPath]; // default, look for .env
146737
+ if (options && options.path) {
146738
+ if (!Array.isArray(options.path)) {
146739
+ optionPaths = [_resolveHome(options.path)];
146740
+ } else {
146741
+ optionPaths = []; // reset default
146742
+ for (const filepath of options.path) {
146743
+ optionPaths.push(_resolveHome(filepath));
146744
+ }
146623
146745
  }
146624
146746
  }
146625
146747
 
146626
- try {
146627
- // Specifying an encoding returns a string instead of a buffer
146628
- const parsed = DotenvModule.parse(fs.readFileSync(dotenvPath, { encoding }));
146748
+ // Build the parsed data in a temporary object (because we need to return it). Once we have the final
146749
+ // parsed data, we will combine it with process.env (or options.processEnv if provided).
146750
+ let lastError;
146751
+ const parsedAll = {};
146752
+ for (const path of optionPaths) {
146753
+ try {
146754
+ // Specifying an encoding returns a string instead of a buffer
146755
+ const parsed = DotenvModule.parse(fs.readFileSync(path, { encoding }));
146629
146756
 
146630
- let processEnv = process.env;
146631
- if (options && options.processEnv != null) {
146632
- processEnv = options.processEnv;
146757
+ DotenvModule.populate(parsedAll, parsed, options);
146758
+ } catch (e) {
146759
+ if (debug) {
146760
+ _debug(`Failed to load ${path} ${e.message}`);
146761
+ }
146762
+ lastError = e;
146633
146763
  }
146764
+ }
146634
146765
 
146635
- DotenvModule.populate(processEnv, parsed, options);
146766
+ let processEnv = process.env;
146767
+ if (options && options.processEnv != null) {
146768
+ processEnv = options.processEnv;
146769
+ }
146636
146770
 
146637
- return { parsed }
146638
- } catch (e) {
146639
- if (debug) {
146640
- _debug(`Failed to load ${dotenvPath} ${e.message}`);
146641
- }
146771
+ DotenvModule.populate(processEnv, parsedAll, options);
146642
146772
 
146643
- return { error: e }
146773
+ if (lastError) {
146774
+ return { parsed: parsedAll, error: lastError }
146775
+ } else {
146776
+ return { parsed: parsedAll }
146644
146777
  }
146645
146778
  }
146646
146779
 
146647
146780
  // Populates process.env from .env file
146648
146781
  function config (options) {
146649
- const vaultPath = _vaultPath(options);
146650
-
146651
146782
  // fallback to original dotenv if DOTENV_KEY is not set
146652
146783
  if (_dotenvKey(options).length === 0) {
146653
146784
  return DotenvModule.configDotenv(options)
146654
146785
  }
146655
146786
 
146787
+ const vaultPath = _vaultPath(options);
146788
+
146656
146789
  // dotenvKey exists but .env.vault file does not exist
146657
- if (!fs.existsSync(vaultPath)) {
146790
+ if (!vaultPath) {
146658
146791
  _warn(`You set DOTENV_KEY but you are missing a .env.vault file at ${vaultPath}. Did you forget to build it?`);
146659
146792
 
146660
146793
  return DotenvModule.configDotenv(options)
@@ -146667,9 +146800,9 @@ function decrypt (encrypted, keyStr) {
146667
146800
  const key = Buffer.from(keyStr.slice(-64), 'hex');
146668
146801
  let ciphertext = Buffer.from(encrypted, 'base64');
146669
146802
 
146670
- const nonce = ciphertext.slice(0, 12);
146671
- const authTag = ciphertext.slice(-16);
146672
- ciphertext = ciphertext.slice(12, -16);
146803
+ const nonce = ciphertext.subarray(0, 12);
146804
+ const authTag = ciphertext.subarray(-16);
146805
+ ciphertext = ciphertext.subarray(12, -16);
146673
146806
 
146674
146807
  try {
146675
146808
  const aesgcm = crypto.createDecipheriv('aes-256-gcm', key, nonce);
@@ -146681,14 +146814,14 @@ function decrypt (encrypted, keyStr) {
146681
146814
  const decryptionFailed = error.message === 'Unsupported state or unable to authenticate data';
146682
146815
 
146683
146816
  if (isRange || invalidKeyLength) {
146684
- const msg = 'INVALID_DOTENV_KEY: It must be 64 characters long (or more)';
146685
- throw new Error(msg)
146817
+ const err = new Error('INVALID_DOTENV_KEY: It must be 64 characters long (or more)');
146818
+ err.code = 'INVALID_DOTENV_KEY';
146819
+ throw err
146686
146820
  } else if (decryptionFailed) {
146687
- const msg = 'DECRYPTION_FAILED: Please check your DOTENV_KEY';
146688
- throw new Error(msg)
146821
+ const err = new Error('DECRYPTION_FAILED: Please check your DOTENV_KEY');
146822
+ err.code = 'DECRYPTION_FAILED';
146823
+ throw err
146689
146824
  } else {
146690
- console.error('Error: ', error.code);
146691
- console.error('Error: ', error.message);
146692
146825
  throw error
146693
146826
  }
146694
146827
  }
@@ -146700,7 +146833,9 @@ function populate (processEnv, parsed, options = {}) {
146700
146833
  const override = Boolean(options && options.override);
146701
146834
 
146702
146835
  if (typeof parsed !== 'object') {
146703
- throw new Error('OBJECT_REQUIRED: Please check the processEnv argument being passed to populate')
146836
+ const err = new Error('OBJECT_REQUIRED: Please check the processEnv argument being passed to populate');
146837
+ err.code = 'OBJECT_REQUIRED';
146838
+ throw err
146704
146839
  }
146705
146840
 
146706
146841
  // Set process.env
@@ -146743,82 +146878,94 @@ main$2.exports.populate = DotenvModule.populate;
146743
146878
 
146744
146879
  main$2.exports = DotenvModule;
146745
146880
 
146881
+ var mainExports = main$2.exports;
146882
+ var dotenv = /*@__PURE__*/getDefaultExportFromCjs(mainExports);
146883
+
146746
146884
  var main = {};
146747
146885
 
146748
- // like String.prototype.search but returns the last index
146749
- function _searchLast (str, rgx) {
146750
- const matches = Array.from(str.matchAll(rgx));
146751
- return matches.length > 0 ? matches.slice(-1)[0].index : -1
146752
- }
146886
+ // * /
146887
+ // * (\\)? # is it escaped with a backslash?
146888
+ // * (\$) # literal $
146889
+ // * (?!\() # shouldnt be followed by parenthesis
146890
+ // * (\{?) # first brace wrap opening
146891
+ // * ([\w.]+) # key
146892
+ // * (?::-((?:\$\{(?:\$\{(?:\$\{[^}]*\}|[^}])*}|[^}])*}|[^}])+))? # optional default nested 3 times
146893
+ // * (\}?) # last brace warp closing
146894
+ // * /xi
146753
146895
 
146754
- function _interpolate (envValue, environment, config) {
146755
- // find the last unescaped dollar sign in the
146756
- // value so that we can evaluate it
146757
- const lastUnescapedDollarSignIndex = _searchLast(envValue, /(?!(?<=\\))\$/g);
146896
+ const DOTENV_SUBSTITUTION_REGEX = /(\\)?(\$)(?!\()(\{?)([\w.]+)(?::?-((?:\$\{(?:\$\{(?:\$\{[^}]*\}|[^}])*}|[^}])*}|[^}])+))?(\}?)/gi;
146758
146897
 
146759
- // If we couldn't match any unescaped dollar sign
146760
- // let's return the string as is
146761
- if (lastUnescapedDollarSignIndex === -1) return envValue
146898
+ function _resolveEscapeSequences (value) {
146899
+ return value.replace(/\\\$/g, '$')
146900
+ }
146762
146901
 
146763
- // This is the right-most group of variables in the string
146764
- const rightMostGroup = envValue.slice(lastUnescapedDollarSignIndex);
146902
+ function interpolate (value, processEnv, parsed) {
146903
+ return value.replace(DOTENV_SUBSTITUTION_REGEX, (match, escaped, dollarSign, openBrace, key, defaultValue, closeBrace) => {
146904
+ if (escaped === '\\') {
146905
+ return match.slice(1)
146906
+ } else {
146907
+ if (processEnv[key]) {
146908
+ if (processEnv[key] === parsed[key]) {
146909
+ return processEnv[key]
146910
+ } else {
146911
+ // scenario: PASSWORD_EXPAND_NESTED=${PASSWORD_EXPAND}
146912
+ return interpolate(processEnv[key], processEnv, parsed)
146913
+ }
146914
+ }
146765
146915
 
146766
- /**
146767
- * This finds the inner most variable/group divided
146768
- * by variable name and default value (if present)
146769
- * (
146770
- * (?!(?<=\\))\$ // only match dollar signs that are not escaped
146771
- * {? // optional opening curly brace
146772
- * ([\w]+) // match the variable name
146773
- * (?::-([^}\\]*))? // match an optional default value
146774
- * }? // optional closing curly brace
146775
- * )
146776
- */
146777
- const matchGroup = /((?!(?<=\\))\${?([\w]+)(?::-([^}\\]*))?}?)/;
146778
- const match = rightMostGroup.match(matchGroup);
146779
-
146780
- if (match != null) {
146781
- const [, group, variableName, defaultValue] = match;
146782
-
146783
- return _interpolate(
146784
- envValue.replace(
146785
- group,
146786
- environment[variableName] ||
146787
- defaultValue ||
146788
- config.parsed[variableName] ||
146789
- ''
146790
- ),
146791
- environment,
146792
- config
146793
- )
146794
- }
146916
+ if (parsed[key]) {
146917
+ // avoid recursion from EXPAND_SELF=$EXPAND_SELF
146918
+ if (parsed[key] === value) {
146919
+ return parsed[key]
146920
+ } else {
146921
+ return interpolate(parsed[key], processEnv, parsed)
146922
+ }
146923
+ }
146795
146924
 
146796
- return envValue
146797
- }
146925
+ if (defaultValue) {
146926
+ if (defaultValue.startsWith('$')) {
146927
+ return interpolate(defaultValue, processEnv, parsed)
146928
+ } else {
146929
+ return defaultValue
146930
+ }
146931
+ }
146798
146932
 
146799
- function _resolveEscapeSequences (value) {
146800
- return value.replace(/\\\$/g, '$')
146933
+ return ''
146934
+ }
146935
+ })
146801
146936
  }
146802
146937
 
146803
- function expand (config) {
146804
- // if ignoring process.env, use a blank object
146805
- const environment = config.ignoreProcessEnv ? {} : process.env;
146938
+ function expand (options) {
146939
+ let processEnv = process.env;
146940
+ if (options && options.processEnv != null) {
146941
+ processEnv = options.processEnv;
146942
+ }
146806
146943
 
146807
- for (const configKey in config.parsed) {
146808
- const value = Object.prototype.hasOwnProperty.call(environment, configKey)
146809
- ? environment[configKey]
146810
- : config.parsed[configKey];
146944
+ for (const key in options.parsed) {
146945
+ let value = options.parsed[key];
146811
146946
 
146812
- config.parsed[configKey] = _resolveEscapeSequences(
146813
- _interpolate(value, environment, config)
146814
- );
146947
+ const inProcessEnv = Object.prototype.hasOwnProperty.call(processEnv, key);
146948
+ if (inProcessEnv) {
146949
+ if (processEnv[key] === options.parsed[key]) {
146950
+ // assume was set to processEnv from the .env file if the values match and therefore interpolate
146951
+ value = interpolate(value, processEnv, options.parsed);
146952
+ } else {
146953
+ // do not interpolate - assume processEnv had the intended value even if containing a $.
146954
+ value = processEnv[key];
146955
+ }
146956
+ } else {
146957
+ // not inProcessEnv so assume interpolation for this .env key
146958
+ value = interpolate(value, processEnv, options.parsed);
146959
+ }
146960
+
146961
+ options.parsed[key] = _resolveEscapeSequences(value);
146815
146962
  }
146816
146963
 
146817
- for (const processKey in config.parsed) {
146818
- environment[processKey] = config.parsed[processKey];
146964
+ for (const processKey in options.parsed) {
146965
+ processEnv[processKey] = options.parsed[processKey];
146819
146966
  }
146820
146967
 
146821
- return config
146968
+ return options
146822
146969
  }
146823
146970
 
146824
146971
  main.expand = expand;
@@ -146826,12 +146973,12 @@ main.expand = expand;
146826
146973
  // @ts-check
146827
146974
  var _a, _b;
146828
146975
  process.env.TEST_ENV = (_a = process.env.TEST_ENV) !== null && _a !== void 0 ? _a : ENVIRONMENT.development;
146829
- const env = main$2.exports.config({
146976
+ const env = dotenv.config({
146830
146977
  path: `./e2e/config/.env.${process.env.TEST_ENV}`,
146831
146978
  });
146832
146979
  main.expand(env);
146833
146980
  if (fs__namespace.existsSync("./e2e/config/.env.local")) {
146834
- const localEnv = main$2.exports.config({
146981
+ const localEnv = dotenv.config({
146835
146982
  path: "./e2e/config/.env.local",
146836
146983
  });
146837
146984
  main.expand(localEnv);