ag-psd 28.2.1 → 28.2.3

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/dist/bundle.js CHANGED
@@ -1674,7 +1674,7 @@ function parseFilterFXItem(f, options) {
1674
1674
  ;
1675
1675
  default:
1676
1676
  if (options.throwForMissingFeatures) {
1677
- console.log('FILTER', require('util').inspect(f, false, 99, true));
1677
+ // console.log('FILTER', require('util').inspect(f, false, 99, true));
1678
1678
  throw new Error("Unknown filter classId: ".concat(f.Fltr._classID));
1679
1679
  }
1680
1680
  return undefined;
@@ -1697,7 +1697,7 @@ function parseFilterFXItem(f, options) {
1697
1697
  case 1231976050: return __assign(__assign({}, base), { type: 'invert' });
1698
1698
  default:
1699
1699
  if (options.throwForMissingFeatures) {
1700
- console.log('FILTER', require('util').inspect(f, false, 99, true));
1700
+ // console.log('FILTER', require('util').inspect(f, false, 99, true));
1701
1701
  throw new Error("Unknown filterID: ".concat(f.filterID));
1702
1702
  }
1703
1703
  }
@@ -3737,7 +3737,7 @@ addHandler('tsly', hasKey('transparencyShapesLayer'), function (reader, target)
3737
3737
  (0, psdWriter_1.writeZeros)(writer, 3);
3738
3738
  });
3739
3739
 
3740
- },{"./descriptor":4,"./effectsHelpers":5,"./engineData":6,"./engineData2":7,"./helpers":8,"./psdReader":12,"./psdWriter":13,"./text":14,"base64-js":18,"util":54}],3:[function(require,module,exports){
3740
+ },{"./descriptor":4,"./effectsHelpers":5,"./engineData":6,"./engineData2":7,"./helpers":8,"./psdReader":12,"./psdWriter":13,"./text":14,"base64-js":16}],3:[function(require,module,exports){
3741
3741
  "use strict";
3742
3742
  var __assign = (this && this.__assign) || function () {
3743
3743
  __assign = Object.assign || function(t) {
@@ -7253,7 +7253,7 @@ function initializeCanvas(createCanvasMethod, createCanvasFromDataMethod, create
7253
7253
  }
7254
7254
  exports.initializeCanvas = initializeCanvas;
7255
7255
 
7256
- },{"base64-js":18,"pako":35}],9:[function(require,module,exports){
7256
+ },{"base64-js":16,"pako":19}],9:[function(require,module,exports){
7257
7257
  "use strict";
7258
7258
  var __assign = (this && this.__assign) || function () {
7259
7259
  __assign = Object.assign || function(t) {
@@ -8313,7 +8313,7 @@ target) { return target._ir4002 !== undefined; }, function (reader, target, left
8313
8313
  (0, psdWriter_1.writeBytes)(writer, target._ir4002);
8314
8314
  });
8315
8315
 
8316
- },{"./descriptor":4,"./helpers":8,"./psdReader":12,"./psdWriter":13,"./utf8":15,"base64-js":18}],10:[function(require,module,exports){
8316
+ },{"./descriptor":4,"./helpers":8,"./psdReader":12,"./psdWriter":13,"./utf8":15,"base64-js":16}],10:[function(require,module,exports){
8317
8317
  (function (Buffer){(function (){
8318
8318
  "use strict";
8319
8319
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
@@ -8369,7 +8369,7 @@ function writePsdBuffer(psd, options) {
8369
8369
  exports.writePsdBuffer = writePsdBuffer;
8370
8370
 
8371
8371
  }).call(this)}).call(this,require("buffer").Buffer)
8372
- },{"./abr":1,"./csh":3,"./helpers":8,"./psd":11,"./psdReader":12,"./psdWriter":13,"base64-js":18,"buffer":19}],11:[function(require,module,exports){
8372
+ },{"./abr":1,"./csh":3,"./helpers":8,"./psd":11,"./psdReader":12,"./psdWriter":13,"base64-js":16,"buffer":17}],11:[function(require,module,exports){
8373
8373
  "use strict";
8374
8374
  Object.defineProperty(exports, "__esModule", { value: true });
8375
8375
  exports.LayerCompCapturedInfo = exports.SectionDividerType = exports.ColorMode = void 0;
@@ -8623,7 +8623,6 @@ function readPsd(reader, readOptions) {
8623
8623
  Object.assign(reader, readOptions);
8624
8624
  reader.large = version === 2;
8625
8625
  reader.globalAlpha = false;
8626
- var fixOffsets = [0, 1, -1, 2, -2, 3, -3, 4, -4];
8627
8626
  // color mode data
8628
8627
  readSection(reader, 1, function (left) {
8629
8628
  if (!left())
@@ -8650,22 +8649,7 @@ function readPsd(reader, readOptions) {
8650
8649
  var imageResources = {};
8651
8650
  readSection(reader, 1, function (left) {
8652
8651
  var _loop_1 = function () {
8653
- var sigOffset = reader.offset;
8654
- var sig = '';
8655
- // attempt to fix broken document by realigning with the signature
8656
- for (var _i = 0, fixOffsets_1 = fixOffsets; _i < fixOffsets_1.length; _i++) {
8657
- var offset = fixOffsets_1[_i];
8658
- try {
8659
- reader.offset = sigOffset + offset;
8660
- sig = readSignature(reader);
8661
- }
8662
- catch (_a) { }
8663
- if (isValidSignature(sig))
8664
- break;
8665
- }
8666
- if (!isValidSignature(sig)) {
8667
- throw new Error("Invalid signature: '".concat(sig, "' at 0x").concat((sigOffset).toString(16)));
8668
- }
8652
+ realignWithSignature(reader, isValidSignature);
8669
8653
  var id = readUint16(reader);
8670
8654
  readPascalString(reader, 2); // name
8671
8655
  readSection(reader, 2, function (left) {
@@ -9041,10 +9025,31 @@ function readGlobalLayerMaskInfo(reader) {
9041
9025
  });
9042
9026
  }
9043
9027
  exports.readGlobalLayerMaskInfo = readGlobalLayerMaskInfo;
9028
+ var fixOffsets = [0, 1, -1, 2, -2, 3, -3, 4, -4];
9029
+ function realignWithSignature(reader, isValid) {
9030
+ var sigOffset = reader.offset;
9031
+ var sig = '';
9032
+ // attempt to fix broken document by realigning with the signature
9033
+ for (var _i = 0, fixOffsets_1 = fixOffsets; _i < fixOffsets_1.length; _i++) {
9034
+ var offset = fixOffsets_1[_i];
9035
+ try {
9036
+ reader.offset = sigOffset + offset;
9037
+ sig = readSignature(reader);
9038
+ }
9039
+ catch (_a) { }
9040
+ if (isValid(sig))
9041
+ break;
9042
+ }
9043
+ if (!isValid(sig)) {
9044
+ throw new Error("Invalid signature: '".concat(sig, "' at 0x").concat((sigOffset).toString(16)));
9045
+ }
9046
+ return sig;
9047
+ }
9048
+ function isValidAdditionalInfoSignature(sig) {
9049
+ return sig === '8BIM' || sig === '8B64';
9050
+ }
9044
9051
  function readAdditionalLayerInfo(reader, target, psd, imageResources) {
9045
- var sig = readSignature(reader);
9046
- if (sig !== '8BIM' && sig !== '8B64')
9047
- throw new Error("Invalid signature: '".concat(sig, "' at 0x").concat((reader.offset - 4).toString(16)));
9052
+ var sig = realignWithSignature(reader, isValidAdditionalInfoSignature);
9048
9053
  var key = readSignature(reader);
9049
9054
  // `largeAdditionalInfoKeys` fallback, because some keys don't have 8B64 signature even when they are 64bit
9050
9055
  var u64 = sig === '8B64' || (reader.large && helpers_1.largeAdditionalInfoKeys.indexOf(key) !== -1);
@@ -9455,8 +9460,11 @@ function readSection(reader, round, func, skipEmpty, eightBytes) {
9455
9460
  warnOrThrow(reader, "Unread section data"); // : ${end - reader.offset} bytes at 0x${reader.offset.toString(16)}`);
9456
9461
  }
9457
9462
  }
9458
- while (end % round)
9463
+ while (length % round) {
9464
+ length++;
9459
9465
  end++;
9466
+ }
9467
+ // while (end % round) end++;
9460
9468
  reader.offset = end;
9461
9469
  return result;
9462
9470
  }
@@ -9614,7 +9622,7 @@ function readPattern(reader) {
9614
9622
  }
9615
9623
  exports.readPattern = readPattern;
9616
9624
 
9617
- },{"./additionalInfo":2,"./helpers":8,"./imageResources":9,"pako":35}],13:[function(require,module,exports){
9625
+ },{"./additionalInfo":2,"./helpers":8,"./imageResources":9,"pako":19}],13:[function(require,module,exports){
9618
9626
  "use strict";
9619
9627
  var __assign = (this && this.__assign) || function () {
9620
9628
  __assign = Object.assign || function(t) {
@@ -9791,11 +9799,11 @@ function writeSection(writer, round, func, writeTotalLength, large) {
9791
9799
  func();
9792
9800
  var length = writer.offset - offset - 4;
9793
9801
  var len = length;
9794
- while ((len % round) !== 0) {
9802
+ while (len % round) {
9795
9803
  writeUint8(writer, 0);
9796
9804
  len++;
9797
9805
  }
9798
- // while ((writer.offset % round) !== 0) {
9806
+ // while (writer.offset % round) {
9799
9807
  // writeUint8(writer, 0);
9800
9808
  // len++;
9801
9809
  // }
@@ -10238,8 +10246,12 @@ function getChannels(tempBuffer, layer, background, options) {
10238
10246
  return layerData;
10239
10247
  }
10240
10248
  function getLayerDimentions(_a) {
10249
+ var _b, _c, _d, _e;
10241
10250
  var canvas = _a.canvas, imageData = _a.imageData;
10242
- return imageData || canvas || { width: 0, height: 0 };
10251
+ // this way in case canvas/imageData are incorrect objects without width/height properties
10252
+ var width = (_c = (_b = imageData === null || imageData === void 0 ? void 0 : imageData.width) !== null && _b !== void 0 ? _b : canvas === null || canvas === void 0 ? void 0 : canvas.width) !== null && _c !== void 0 ? _c : 0;
10253
+ var height = (_e = (_d = imageData === null || imageData === void 0 ? void 0 : imageData.height) !== null && _d !== void 0 ? _d : canvas === null || canvas === void 0 ? void 0 : canvas.height) !== null && _e !== void 0 ? _e : 0;
10254
+ return { width: width, height: height };
10243
10255
  }
10244
10256
  function cropImageData(data, left, top, width, height) {
10245
10257
  if (data.data instanceof Uint32Array || data.data instanceof Uint16Array) {
@@ -11148,58 +11160,6 @@ function decodeString(value) {
11148
11160
  exports.decodeString = decodeString;
11149
11161
 
11150
11162
  },{}],16:[function(require,module,exports){
11151
-
11152
- /**
11153
- * Array#filter.
11154
- *
11155
- * @param {Array} arr
11156
- * @param {Function} fn
11157
- * @param {Object=} self
11158
- * @return {Array}
11159
- * @throw TypeError
11160
- */
11161
-
11162
- module.exports = function (arr, fn, self) {
11163
- if (arr.filter) return arr.filter(fn, self);
11164
- if (void 0 === arr || null === arr) throw new TypeError;
11165
- if ('function' != typeof fn) throw new TypeError;
11166
- var ret = [];
11167
- for (var i = 0; i < arr.length; i++) {
11168
- if (!hasOwn.call(arr, i)) continue;
11169
- var val = arr[i];
11170
- if (fn.call(self, val, i, arr)) ret.push(val);
11171
- }
11172
- return ret;
11173
- };
11174
-
11175
- var hasOwn = Object.prototype.hasOwnProperty;
11176
-
11177
- },{}],17:[function(require,module,exports){
11178
- (function (global){(function (){
11179
- 'use strict';
11180
-
11181
- var filter = require('array-filter');
11182
-
11183
- module.exports = function availableTypedArrays() {
11184
- return filter([
11185
- 'BigInt64Array',
11186
- 'BigUint64Array',
11187
- 'Float32Array',
11188
- 'Float64Array',
11189
- 'Int16Array',
11190
- 'Int32Array',
11191
- 'Int8Array',
11192
- 'Uint16Array',
11193
- 'Uint32Array',
11194
- 'Uint8Array',
11195
- 'Uint8ClampedArray'
11196
- ], function (typedArray) {
11197
- return typeof global[typedArray] === 'function';
11198
- });
11199
- };
11200
-
11201
- }).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
11202
- },{"array-filter":16}],18:[function(require,module,exports){
11203
11163
  'use strict'
11204
11164
 
11205
11165
  exports.byteLength = byteLength
@@ -11351,7 +11311,7 @@ function fromByteArray (uint8) {
11351
11311
  return parts.join('')
11352
11312
  }
11353
11313
 
11354
- },{}],19:[function(require,module,exports){
11314
+ },{}],17:[function(require,module,exports){
11355
11315
  (function (Buffer){(function (){
11356
11316
  /*!
11357
11317
  * The buffer module from node.js, for the browser.
@@ -13132,609 +13092,7 @@ function numberIsNaN (obj) {
13132
13092
  }
13133
13093
 
13134
13094
  }).call(this)}).call(this,require("buffer").Buffer)
13135
- },{"base64-js":18,"buffer":19,"ieee754":30}],20:[function(require,module,exports){
13136
- 'use strict';
13137
-
13138
- var GetIntrinsic = require('get-intrinsic');
13139
-
13140
- var callBind = require('./');
13141
-
13142
- var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));
13143
-
13144
- module.exports = function callBoundIntrinsic(name, allowMissing) {
13145
- var intrinsic = GetIntrinsic(name, !!allowMissing);
13146
- if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {
13147
- return callBind(intrinsic);
13148
- }
13149
- return intrinsic;
13150
- };
13151
-
13152
- },{"./":21,"get-intrinsic":26}],21:[function(require,module,exports){
13153
- 'use strict';
13154
-
13155
- var bind = require('function-bind');
13156
- var GetIntrinsic = require('get-intrinsic');
13157
-
13158
- var $apply = GetIntrinsic('%Function.prototype.apply%');
13159
- var $call = GetIntrinsic('%Function.prototype.call%');
13160
- var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);
13161
-
13162
- var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);
13163
- var $defineProperty = GetIntrinsic('%Object.defineProperty%', true);
13164
- var $max = GetIntrinsic('%Math.max%');
13165
-
13166
- if ($defineProperty) {
13167
- try {
13168
- $defineProperty({}, 'a', { value: 1 });
13169
- } catch (e) {
13170
- // IE 8 has a broken defineProperty
13171
- $defineProperty = null;
13172
- }
13173
- }
13174
-
13175
- module.exports = function callBind(originalFunction) {
13176
- var func = $reflectApply(bind, $call, arguments);
13177
- if ($gOPD && $defineProperty) {
13178
- var desc = $gOPD(func, 'length');
13179
- if (desc.configurable) {
13180
- // original length, plus the receiver, minus any additional arguments (after the receiver)
13181
- $defineProperty(
13182
- func,
13183
- 'length',
13184
- { value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }
13185
- );
13186
- }
13187
- }
13188
- return func;
13189
- };
13190
-
13191
- var applyBind = function applyBind() {
13192
- return $reflectApply(bind, $apply, arguments);
13193
- };
13194
-
13195
- if ($defineProperty) {
13196
- $defineProperty(module.exports, 'apply', { value: applyBind });
13197
- } else {
13198
- module.exports.apply = applyBind;
13199
- }
13200
-
13201
- },{"function-bind":25,"get-intrinsic":26}],22:[function(require,module,exports){
13202
- 'use strict';
13203
-
13204
- var GetIntrinsic = require('get-intrinsic');
13205
-
13206
- var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);
13207
- if ($gOPD) {
13208
- try {
13209
- $gOPD([], 'length');
13210
- } catch (e) {
13211
- // IE 8 has a broken gOPD
13212
- $gOPD = null;
13213
- }
13214
- }
13215
-
13216
- module.exports = $gOPD;
13217
-
13218
- },{"get-intrinsic":26}],23:[function(require,module,exports){
13219
-
13220
- var hasOwn = Object.prototype.hasOwnProperty;
13221
- var toString = Object.prototype.toString;
13222
-
13223
- module.exports = function forEach (obj, fn, ctx) {
13224
- if (toString.call(fn) !== '[object Function]') {
13225
- throw new TypeError('iterator must be a function');
13226
- }
13227
- var l = obj.length;
13228
- if (l === +l) {
13229
- for (var i = 0; i < l; i++) {
13230
- fn.call(ctx, obj[i], i, obj);
13231
- }
13232
- } else {
13233
- for (var k in obj) {
13234
- if (hasOwn.call(obj, k)) {
13235
- fn.call(ctx, obj[k], k, obj);
13236
- }
13237
- }
13238
- }
13239
- };
13240
-
13241
-
13242
- },{}],24:[function(require,module,exports){
13243
- 'use strict';
13244
-
13245
- /* eslint no-invalid-this: 1 */
13246
-
13247
- var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
13248
- var toStr = Object.prototype.toString;
13249
- var max = Math.max;
13250
- var funcType = '[object Function]';
13251
-
13252
- var concatty = function concatty(a, b) {
13253
- var arr = [];
13254
-
13255
- for (var i = 0; i < a.length; i += 1) {
13256
- arr[i] = a[i];
13257
- }
13258
- for (var j = 0; j < b.length; j += 1) {
13259
- arr[j + a.length] = b[j];
13260
- }
13261
-
13262
- return arr;
13263
- };
13264
-
13265
- var slicy = function slicy(arrLike, offset) {
13266
- var arr = [];
13267
- for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) {
13268
- arr[j] = arrLike[i];
13269
- }
13270
- return arr;
13271
- };
13272
-
13273
- var joiny = function (arr, joiner) {
13274
- var str = '';
13275
- for (var i = 0; i < arr.length; i += 1) {
13276
- str += arr[i];
13277
- if (i + 1 < arr.length) {
13278
- str += joiner;
13279
- }
13280
- }
13281
- return str;
13282
- };
13283
-
13284
- module.exports = function bind(that) {
13285
- var target = this;
13286
- if (typeof target !== 'function' || toStr.apply(target) !== funcType) {
13287
- throw new TypeError(ERROR_MESSAGE + target);
13288
- }
13289
- var args = slicy(arguments, 1);
13290
-
13291
- var bound;
13292
- var binder = function () {
13293
- if (this instanceof bound) {
13294
- var result = target.apply(
13295
- this,
13296
- concatty(args, arguments)
13297
- );
13298
- if (Object(result) === result) {
13299
- return result;
13300
- }
13301
- return this;
13302
- }
13303
- return target.apply(
13304
- that,
13305
- concatty(args, arguments)
13306
- );
13307
-
13308
- };
13309
-
13310
- var boundLength = max(0, target.length - args.length);
13311
- var boundArgs = [];
13312
- for (var i = 0; i < boundLength; i++) {
13313
- boundArgs[i] = '$' + i;
13314
- }
13315
-
13316
- bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder);
13317
-
13318
- if (target.prototype) {
13319
- var Empty = function Empty() {};
13320
- Empty.prototype = target.prototype;
13321
- bound.prototype = new Empty();
13322
- Empty.prototype = null;
13323
- }
13324
-
13325
- return bound;
13326
- };
13327
-
13328
- },{}],25:[function(require,module,exports){
13329
- 'use strict';
13330
-
13331
- var implementation = require('./implementation');
13332
-
13333
- module.exports = Function.prototype.bind || implementation;
13334
-
13335
- },{"./implementation":24}],26:[function(require,module,exports){
13336
- 'use strict';
13337
-
13338
- var undefined;
13339
-
13340
- var $SyntaxError = SyntaxError;
13341
- var $Function = Function;
13342
- var $TypeError = TypeError;
13343
-
13344
- // eslint-disable-next-line consistent-return
13345
- var getEvalledConstructor = function (expressionSyntax) {
13346
- try {
13347
- return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')();
13348
- } catch (e) {}
13349
- };
13350
-
13351
- var $gOPD = Object.getOwnPropertyDescriptor;
13352
- if ($gOPD) {
13353
- try {
13354
- $gOPD({}, '');
13355
- } catch (e) {
13356
- $gOPD = null; // this is IE 8, which has a broken gOPD
13357
- }
13358
- }
13359
-
13360
- var throwTypeError = function () {
13361
- throw new $TypeError();
13362
- };
13363
- var ThrowTypeError = $gOPD
13364
- ? (function () {
13365
- try {
13366
- // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties
13367
- arguments.callee; // IE 8 does not throw here
13368
- return throwTypeError;
13369
- } catch (calleeThrows) {
13370
- try {
13371
- // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')
13372
- return $gOPD(arguments, 'callee').get;
13373
- } catch (gOPDthrows) {
13374
- return throwTypeError;
13375
- }
13376
- }
13377
- }())
13378
- : throwTypeError;
13379
-
13380
- var hasSymbols = require('has-symbols')();
13381
-
13382
- var getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto
13383
-
13384
- var needsEval = {};
13385
-
13386
- var TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array);
13387
-
13388
- var INTRINSICS = {
13389
- '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,
13390
- '%Array%': Array,
13391
- '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,
13392
- '%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined,
13393
- '%AsyncFromSyncIteratorPrototype%': undefined,
13394
- '%AsyncFunction%': needsEval,
13395
- '%AsyncGenerator%': needsEval,
13396
- '%AsyncGeneratorFunction%': needsEval,
13397
- '%AsyncIteratorPrototype%': needsEval,
13398
- '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,
13399
- '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,
13400
- '%Boolean%': Boolean,
13401
- '%DataView%': typeof DataView === 'undefined' ? undefined : DataView,
13402
- '%Date%': Date,
13403
- '%decodeURI%': decodeURI,
13404
- '%decodeURIComponent%': decodeURIComponent,
13405
- '%encodeURI%': encodeURI,
13406
- '%encodeURIComponent%': encodeURIComponent,
13407
- '%Error%': Error,
13408
- '%eval%': eval, // eslint-disable-line no-eval
13409
- '%EvalError%': EvalError,
13410
- '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,
13411
- '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,
13412
- '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,
13413
- '%Function%': $Function,
13414
- '%GeneratorFunction%': needsEval,
13415
- '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,
13416
- '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,
13417
- '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,
13418
- '%isFinite%': isFinite,
13419
- '%isNaN%': isNaN,
13420
- '%IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined,
13421
- '%JSON%': typeof JSON === 'object' ? JSON : undefined,
13422
- '%Map%': typeof Map === 'undefined' ? undefined : Map,
13423
- '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()),
13424
- '%Math%': Math,
13425
- '%Number%': Number,
13426
- '%Object%': Object,
13427
- '%parseFloat%': parseFloat,
13428
- '%parseInt%': parseInt,
13429
- '%Promise%': typeof Promise === 'undefined' ? undefined : Promise,
13430
- '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,
13431
- '%RangeError%': RangeError,
13432
- '%ReferenceError%': ReferenceError,
13433
- '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,
13434
- '%RegExp%': RegExp,
13435
- '%Set%': typeof Set === 'undefined' ? undefined : Set,
13436
- '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()),
13437
- '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,
13438
- '%String%': String,
13439
- '%StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined,
13440
- '%Symbol%': hasSymbols ? Symbol : undefined,
13441
- '%SyntaxError%': $SyntaxError,
13442
- '%ThrowTypeError%': ThrowTypeError,
13443
- '%TypedArray%': TypedArray,
13444
- '%TypeError%': $TypeError,
13445
- '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,
13446
- '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,
13447
- '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,
13448
- '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,
13449
- '%URIError%': URIError,
13450
- '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,
13451
- '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,
13452
- '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet
13453
- };
13454
-
13455
- var doEval = function doEval(name) {
13456
- var value;
13457
- if (name === '%AsyncFunction%') {
13458
- value = getEvalledConstructor('async function () {}');
13459
- } else if (name === '%GeneratorFunction%') {
13460
- value = getEvalledConstructor('function* () {}');
13461
- } else if (name === '%AsyncGeneratorFunction%') {
13462
- value = getEvalledConstructor('async function* () {}');
13463
- } else if (name === '%AsyncGenerator%') {
13464
- var fn = doEval('%AsyncGeneratorFunction%');
13465
- if (fn) {
13466
- value = fn.prototype;
13467
- }
13468
- } else if (name === '%AsyncIteratorPrototype%') {
13469
- var gen = doEval('%AsyncGenerator%');
13470
- if (gen) {
13471
- value = getProto(gen.prototype);
13472
- }
13473
- }
13474
-
13475
- INTRINSICS[name] = value;
13476
-
13477
- return value;
13478
- };
13479
-
13480
- var LEGACY_ALIASES = {
13481
- '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
13482
- '%ArrayPrototype%': ['Array', 'prototype'],
13483
- '%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
13484
- '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],
13485
- '%ArrayProto_keys%': ['Array', 'prototype', 'keys'],
13486
- '%ArrayProto_values%': ['Array', 'prototype', 'values'],
13487
- '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],
13488
- '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],
13489
- '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],
13490
- '%BooleanPrototype%': ['Boolean', 'prototype'],
13491
- '%DataViewPrototype%': ['DataView', 'prototype'],
13492
- '%DatePrototype%': ['Date', 'prototype'],
13493
- '%ErrorPrototype%': ['Error', 'prototype'],
13494
- '%EvalErrorPrototype%': ['EvalError', 'prototype'],
13495
- '%Float32ArrayPrototype%': ['Float32Array', 'prototype'],
13496
- '%Float64ArrayPrototype%': ['Float64Array', 'prototype'],
13497
- '%FunctionPrototype%': ['Function', 'prototype'],
13498
- '%Generator%': ['GeneratorFunction', 'prototype'],
13499
- '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],
13500
- '%Int8ArrayPrototype%': ['Int8Array', 'prototype'],
13501
- '%Int16ArrayPrototype%': ['Int16Array', 'prototype'],
13502
- '%Int32ArrayPrototype%': ['Int32Array', 'prototype'],
13503
- '%JSONParse%': ['JSON', 'parse'],
13504
- '%JSONStringify%': ['JSON', 'stringify'],
13505
- '%MapPrototype%': ['Map', 'prototype'],
13506
- '%NumberPrototype%': ['Number', 'prototype'],
13507
- '%ObjectPrototype%': ['Object', 'prototype'],
13508
- '%ObjProto_toString%': ['Object', 'prototype', 'toString'],
13509
- '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],
13510
- '%PromisePrototype%': ['Promise', 'prototype'],
13511
- '%PromiseProto_then%': ['Promise', 'prototype', 'then'],
13512
- '%Promise_all%': ['Promise', 'all'],
13513
- '%Promise_reject%': ['Promise', 'reject'],
13514
- '%Promise_resolve%': ['Promise', 'resolve'],
13515
- '%RangeErrorPrototype%': ['RangeError', 'prototype'],
13516
- '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],
13517
- '%RegExpPrototype%': ['RegExp', 'prototype'],
13518
- '%SetPrototype%': ['Set', 'prototype'],
13519
- '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],
13520
- '%StringPrototype%': ['String', 'prototype'],
13521
- '%SymbolPrototype%': ['Symbol', 'prototype'],
13522
- '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],
13523
- '%TypedArrayPrototype%': ['TypedArray', 'prototype'],
13524
- '%TypeErrorPrototype%': ['TypeError', 'prototype'],
13525
- '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],
13526
- '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],
13527
- '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],
13528
- '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],
13529
- '%URIErrorPrototype%': ['URIError', 'prototype'],
13530
- '%WeakMapPrototype%': ['WeakMap', 'prototype'],
13531
- '%WeakSetPrototype%': ['WeakSet', 'prototype']
13532
- };
13533
-
13534
- var bind = require('function-bind');
13535
- var hasOwn = require('has');
13536
- var $concat = bind.call(Function.call, Array.prototype.concat);
13537
- var $spliceApply = bind.call(Function.apply, Array.prototype.splice);
13538
- var $replace = bind.call(Function.call, String.prototype.replace);
13539
- var $strSlice = bind.call(Function.call, String.prototype.slice);
13540
- var $exec = bind.call(Function.call, RegExp.prototype.exec);
13541
-
13542
- /* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
13543
- var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
13544
- var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */
13545
- var stringToPath = function stringToPath(string) {
13546
- var first = $strSlice(string, 0, 1);
13547
- var last = $strSlice(string, -1);
13548
- if (first === '%' && last !== '%') {
13549
- throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`');
13550
- } else if (last === '%' && first !== '%') {
13551
- throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`');
13552
- }
13553
- var result = [];
13554
- $replace(string, rePropName, function (match, number, quote, subString) {
13555
- result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;
13556
- });
13557
- return result;
13558
- };
13559
- /* end adaptation */
13560
-
13561
- var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
13562
- var intrinsicName = name;
13563
- var alias;
13564
- if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
13565
- alias = LEGACY_ALIASES[intrinsicName];
13566
- intrinsicName = '%' + alias[0] + '%';
13567
- }
13568
-
13569
- if (hasOwn(INTRINSICS, intrinsicName)) {
13570
- var value = INTRINSICS[intrinsicName];
13571
- if (value === needsEval) {
13572
- value = doEval(intrinsicName);
13573
- }
13574
- if (typeof value === 'undefined' && !allowMissing) {
13575
- throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
13576
- }
13577
-
13578
- return {
13579
- alias: alias,
13580
- name: intrinsicName,
13581
- value: value
13582
- };
13583
- }
13584
-
13585
- throw new $SyntaxError('intrinsic ' + name + ' does not exist!');
13586
- };
13587
-
13588
- module.exports = function GetIntrinsic(name, allowMissing) {
13589
- if (typeof name !== 'string' || name.length === 0) {
13590
- throw new $TypeError('intrinsic name must be a non-empty string');
13591
- }
13592
- if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
13593
- throw new $TypeError('"allowMissing" argument must be a boolean');
13594
- }
13595
-
13596
- if ($exec(/^%?[^%]*%?$/g, name) === null) {
13597
- throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');
13598
- }
13599
- var parts = stringToPath(name);
13600
- var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
13601
-
13602
- var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);
13603
- var intrinsicRealName = intrinsic.name;
13604
- var value = intrinsic.value;
13605
- var skipFurtherCaching = false;
13606
-
13607
- var alias = intrinsic.alias;
13608
- if (alias) {
13609
- intrinsicBaseName = alias[0];
13610
- $spliceApply(parts, $concat([0, 1], alias));
13611
- }
13612
-
13613
- for (var i = 1, isOwn = true; i < parts.length; i += 1) {
13614
- var part = parts[i];
13615
- var first = $strSlice(part, 0, 1);
13616
- var last = $strSlice(part, -1);
13617
- if (
13618
- (
13619
- (first === '"' || first === "'" || first === '`')
13620
- || (last === '"' || last === "'" || last === '`')
13621
- )
13622
- && first !== last
13623
- ) {
13624
- throw new $SyntaxError('property names with quotes must have matching quotes');
13625
- }
13626
- if (part === 'constructor' || !isOwn) {
13627
- skipFurtherCaching = true;
13628
- }
13629
-
13630
- intrinsicBaseName += '.' + part;
13631
- intrinsicRealName = '%' + intrinsicBaseName + '%';
13632
-
13633
- if (hasOwn(INTRINSICS, intrinsicRealName)) {
13634
- value = INTRINSICS[intrinsicRealName];
13635
- } else if (value != null) {
13636
- if (!(part in value)) {
13637
- if (!allowMissing) {
13638
- throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');
13639
- }
13640
- return void undefined;
13641
- }
13642
- if ($gOPD && (i + 1) >= parts.length) {
13643
- var desc = $gOPD(value, part);
13644
- isOwn = !!desc;
13645
-
13646
- // By convention, when a data property is converted to an accessor
13647
- // property to emulate a data property that does not suffer from
13648
- // the override mistake, that accessor's getter is marked with
13649
- // an `originalValue` property. Here, when we detect this, we
13650
- // uphold the illusion by pretending to see that original data
13651
- // property, i.e., returning the value rather than the getter
13652
- // itself.
13653
- if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {
13654
- value = desc.get;
13655
- } else {
13656
- value = value[part];
13657
- }
13658
- } else {
13659
- isOwn = hasOwn(value, part);
13660
- value = value[part];
13661
- }
13662
-
13663
- if (isOwn && !skipFurtherCaching) {
13664
- INTRINSICS[intrinsicRealName] = value;
13665
- }
13666
- }
13667
- }
13668
- return value;
13669
- };
13670
-
13671
- },{"function-bind":25,"has":29,"has-symbols":27}],27:[function(require,module,exports){
13672
- 'use strict';
13673
-
13674
- var origSymbol = typeof Symbol !== 'undefined' && Symbol;
13675
- var hasSymbolSham = require('./shams');
13676
-
13677
- module.exports = function hasNativeSymbols() {
13678
- if (typeof origSymbol !== 'function') { return false; }
13679
- if (typeof Symbol !== 'function') { return false; }
13680
- if (typeof origSymbol('foo') !== 'symbol') { return false; }
13681
- if (typeof Symbol('bar') !== 'symbol') { return false; }
13682
-
13683
- return hasSymbolSham();
13684
- };
13685
-
13686
- },{"./shams":28}],28:[function(require,module,exports){
13687
- 'use strict';
13688
-
13689
- /* eslint complexity: [2, 18], max-statements: [2, 33] */
13690
- module.exports = function hasSymbols() {
13691
- if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
13692
- if (typeof Symbol.iterator === 'symbol') { return true; }
13693
-
13694
- var obj = {};
13695
- var sym = Symbol('test');
13696
- var symObj = Object(sym);
13697
- if (typeof sym === 'string') { return false; }
13698
-
13699
- if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }
13700
- if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }
13701
-
13702
- // temp disabled per https://github.com/ljharb/object.assign/issues/17
13703
- // if (sym instanceof Symbol) { return false; }
13704
- // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4
13705
- // if (!(symObj instanceof Symbol)) { return false; }
13706
-
13707
- // if (typeof Symbol.prototype.toString !== 'function') { return false; }
13708
- // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }
13709
-
13710
- var symVal = 42;
13711
- obj[sym] = symVal;
13712
- for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop
13713
- if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }
13714
-
13715
- if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }
13716
-
13717
- var syms = Object.getOwnPropertySymbols(obj);
13718
- if (syms.length !== 1 || syms[0] !== sym) { return false; }
13719
-
13720
- if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }
13721
-
13722
- if (typeof Object.getOwnPropertyDescriptor === 'function') {
13723
- var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
13724
- if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }
13725
- }
13726
-
13727
- return true;
13728
- };
13729
-
13730
- },{}],29:[function(require,module,exports){
13731
- 'use strict';
13732
-
13733
- var bind = require('function-bind');
13734
-
13735
- module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty);
13736
-
13737
- },{"function-bind":25}],30:[function(require,module,exports){
13095
+ },{"base64-js":16,"buffer":17,"ieee754":18}],18:[function(require,module,exports){
13738
13096
  /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
13739
13097
  exports.read = function (buffer, offset, isLE, mLen, nBytes) {
13740
13098
  var e, m
@@ -13821,170 +13179,7 @@ exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
13821
13179
  buffer[offset + i - d] |= s * 128
13822
13180
  }
13823
13181
 
13824
- },{}],31:[function(require,module,exports){
13825
- if (typeof Object.create === 'function') {
13826
- // implementation from standard node.js 'util' module
13827
- module.exports = function inherits(ctor, superCtor) {
13828
- if (superCtor) {
13829
- ctor.super_ = superCtor
13830
- ctor.prototype = Object.create(superCtor.prototype, {
13831
- constructor: {
13832
- value: ctor,
13833
- enumerable: false,
13834
- writable: true,
13835
- configurable: true
13836
- }
13837
- })
13838
- }
13839
- };
13840
- } else {
13841
- // old school shim for old browsers
13842
- module.exports = function inherits(ctor, superCtor) {
13843
- if (superCtor) {
13844
- ctor.super_ = superCtor
13845
- var TempCtor = function () {}
13846
- TempCtor.prototype = superCtor.prototype
13847
- ctor.prototype = new TempCtor()
13848
- ctor.prototype.constructor = ctor
13849
- }
13850
- }
13851
- }
13852
-
13853
- },{}],32:[function(require,module,exports){
13854
- 'use strict';
13855
-
13856
- var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';
13857
- var callBound = require('call-bind/callBound');
13858
-
13859
- var $toString = callBound('Object.prototype.toString');
13860
-
13861
- var isStandardArguments = function isArguments(value) {
13862
- if (hasToStringTag && value && typeof value === 'object' && Symbol.toStringTag in value) {
13863
- return false;
13864
- }
13865
- return $toString(value) === '[object Arguments]';
13866
- };
13867
-
13868
- var isLegacyArguments = function isArguments(value) {
13869
- if (isStandardArguments(value)) {
13870
- return true;
13871
- }
13872
- return value !== null &&
13873
- typeof value === 'object' &&
13874
- typeof value.length === 'number' &&
13875
- value.length >= 0 &&
13876
- $toString(value) !== '[object Array]' &&
13877
- $toString(value.callee) === '[object Function]';
13878
- };
13879
-
13880
- var supportsStandardArguments = (function () {
13881
- return isStandardArguments(arguments);
13882
- }());
13883
-
13884
- isStandardArguments.isLegacyArguments = isLegacyArguments; // for tests
13885
-
13886
- module.exports = supportsStandardArguments ? isStandardArguments : isLegacyArguments;
13887
-
13888
- },{"call-bind/callBound":20}],33:[function(require,module,exports){
13889
- 'use strict';
13890
-
13891
- var toStr = Object.prototype.toString;
13892
- var fnToStr = Function.prototype.toString;
13893
- var isFnRegex = /^\s*(?:function)?\*/;
13894
- var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';
13895
- var getProto = Object.getPrototypeOf;
13896
- var getGeneratorFunc = function () { // eslint-disable-line consistent-return
13897
- if (!hasToStringTag) {
13898
- return false;
13899
- }
13900
- try {
13901
- return Function('return function*() {}')();
13902
- } catch (e) {
13903
- }
13904
- };
13905
- var generatorFunc = getGeneratorFunc();
13906
- var GeneratorFunction = getProto && generatorFunc ? getProto(generatorFunc) : false;
13907
-
13908
- module.exports = function isGeneratorFunction(fn) {
13909
- if (typeof fn !== 'function') {
13910
- return false;
13911
- }
13912
- if (isFnRegex.test(fnToStr.call(fn))) {
13913
- return true;
13914
- }
13915
- if (!hasToStringTag) {
13916
- var str = toStr.call(fn);
13917
- return str === '[object GeneratorFunction]';
13918
- }
13919
- return getProto && getProto(fn) === GeneratorFunction;
13920
- };
13921
-
13922
- },{}],34:[function(require,module,exports){
13923
- (function (global){(function (){
13924
- 'use strict';
13925
-
13926
- var forEach = require('foreach');
13927
- var availableTypedArrays = require('available-typed-arrays');
13928
- var callBound = require('call-bind/callBound');
13929
-
13930
- var $toString = callBound('Object.prototype.toString');
13931
- var hasSymbols = require('has-symbols')();
13932
- var hasToStringTag = hasSymbols && typeof Symbol.toStringTag === 'symbol';
13933
-
13934
- var typedArrays = availableTypedArrays();
13935
-
13936
- var $indexOf = callBound('Array.prototype.indexOf', true) || function indexOf(array, value) {
13937
- for (var i = 0; i < array.length; i += 1) {
13938
- if (array[i] === value) {
13939
- return i;
13940
- }
13941
- }
13942
- return -1;
13943
- };
13944
- var $slice = callBound('String.prototype.slice');
13945
- var toStrTags = {};
13946
- var gOPD = require('es-abstract/helpers/getOwnPropertyDescriptor');
13947
- var getPrototypeOf = Object.getPrototypeOf; // require('getprototypeof');
13948
- if (hasToStringTag && gOPD && getPrototypeOf) {
13949
- forEach(typedArrays, function (typedArray) {
13950
- var arr = new global[typedArray]();
13951
- if (!(Symbol.toStringTag in arr)) {
13952
- throw new EvalError('this engine has support for Symbol.toStringTag, but ' + typedArray + ' does not have the property! Please report this.');
13953
- }
13954
- var proto = getPrototypeOf(arr);
13955
- var descriptor = gOPD(proto, Symbol.toStringTag);
13956
- if (!descriptor) {
13957
- var superProto = getPrototypeOf(proto);
13958
- descriptor = gOPD(superProto, Symbol.toStringTag);
13959
- }
13960
- toStrTags[typedArray] = descriptor.get;
13961
- });
13962
- }
13963
-
13964
- var tryTypedArrays = function tryAllTypedArrays(value) {
13965
- var anyTrue = false;
13966
- forEach(toStrTags, function (getter, typedArray) {
13967
- if (!anyTrue) {
13968
- try {
13969
- anyTrue = getter.call(value) === typedArray;
13970
- } catch (e) { /**/ }
13971
- }
13972
- });
13973
- return anyTrue;
13974
- };
13975
-
13976
- module.exports = function isTypedArray(value) {
13977
- if (!value || typeof value !== 'object') { return false; }
13978
- if (!hasToStringTag) {
13979
- var tag = $slice($toString(value), 8, -1);
13980
- return $indexOf(typedArrays, tag) > -1;
13981
- }
13982
- if (!gOPD) { return false; }
13983
- return tryTypedArrays(value);
13984
- };
13985
-
13986
- }).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
13987
- },{"available-typed-arrays":17,"call-bind/callBound":20,"es-abstract/helpers/getOwnPropertyDescriptor":22,"foreach":23,"has-symbols":27}],35:[function(require,module,exports){
13182
+ },{}],19:[function(require,module,exports){
13988
13183
  // Top level file is just a mixin of submodules & constants
13989
13184
  'use strict';
13990
13185
 
@@ -14004,7 +13199,7 @@ module.exports.inflateRaw = inflateRaw;
14004
13199
  module.exports.ungzip = ungzip;
14005
13200
  module.exports.constants = constants;
14006
13201
 
14007
- },{"./lib/deflate":36,"./lib/inflate":37,"./lib/zlib/constants":41}],36:[function(require,module,exports){
13202
+ },{"./lib/deflate":20,"./lib/inflate":21,"./lib/zlib/constants":25}],20:[function(require,module,exports){
14008
13203
  'use strict';
14009
13204
 
14010
13205
 
@@ -14386,7 +13581,7 @@ module.exports.deflateRaw = deflateRaw;
14386
13581
  module.exports.gzip = gzip;
14387
13582
  module.exports.constants = require('./zlib/constants');
14388
13583
 
14389
- },{"./utils/common":38,"./utils/strings":39,"./zlib/constants":41,"./zlib/deflate":43,"./zlib/messages":48,"./zlib/zstream":50}],37:[function(require,module,exports){
13584
+ },{"./utils/common":22,"./utils/strings":23,"./zlib/constants":25,"./zlib/deflate":27,"./zlib/messages":32,"./zlib/zstream":34}],21:[function(require,module,exports){
14390
13585
  'use strict';
14391
13586
 
14392
13587
 
@@ -14807,7 +14002,7 @@ module.exports.inflateRaw = inflateRaw;
14807
14002
  module.exports.ungzip = inflate;
14808
14003
  module.exports.constants = require('./zlib/constants');
14809
14004
 
14810
- },{"./utils/common":38,"./utils/strings":39,"./zlib/constants":41,"./zlib/gzheader":44,"./zlib/inflate":46,"./zlib/messages":48,"./zlib/zstream":50}],38:[function(require,module,exports){
14005
+ },{"./utils/common":22,"./utils/strings":23,"./zlib/constants":25,"./zlib/gzheader":28,"./zlib/inflate":30,"./zlib/messages":32,"./zlib/zstream":34}],22:[function(require,module,exports){
14811
14006
  'use strict';
14812
14007
 
14813
14008
 
@@ -14857,7 +14052,7 @@ module.exports.flattenChunks = (chunks) => {
14857
14052
  return result;
14858
14053
  };
14859
14054
 
14860
- },{}],39:[function(require,module,exports){
14055
+ },{}],23:[function(require,module,exports){
14861
14056
  // String encode/decode helpers
14862
14057
  'use strict';
14863
14058
 
@@ -15033,7 +14228,7 @@ module.exports.utf8border = (buf, max) => {
15033
14228
  return (pos + _utf8len[buf[pos]] > max) ? pos : max;
15034
14229
  };
15035
14230
 
15036
- },{}],40:[function(require,module,exports){
14231
+ },{}],24:[function(require,module,exports){
15037
14232
  'use strict';
15038
14233
 
15039
14234
  // Note: adler32 takes 12% for level 0 and 2% for level 6.
@@ -15086,7 +14281,7 @@ const adler32 = (adler, buf, len, pos) => {
15086
14281
 
15087
14282
  module.exports = adler32;
15088
14283
 
15089
- },{}],41:[function(require,module,exports){
14284
+ },{}],25:[function(require,module,exports){
15090
14285
  'use strict';
15091
14286
 
15092
14287
  // (C) 1995-2013 Jean-loup Gailly and Mark Adler
@@ -15156,7 +14351,7 @@ module.exports = {
15156
14351
  //Z_NULL: null // Use -1 or null inline, depending on var type
15157
14352
  };
15158
14353
 
15159
- },{}],42:[function(require,module,exports){
14354
+ },{}],26:[function(require,module,exports){
15160
14355
  'use strict';
15161
14356
 
15162
14357
  // Note: we can't get significant speed boost here.
@@ -15217,7 +14412,7 @@ const crc32 = (crc, buf, len, pos) => {
15217
14412
 
15218
14413
  module.exports = crc32;
15219
14414
 
15220
- },{}],43:[function(require,module,exports){
14415
+ },{}],27:[function(require,module,exports){
15221
14416
  'use strict';
15222
14417
 
15223
14418
  // (C) 1995-2013 Jean-loup Gailly and Mark Adler
@@ -17267,7 +16462,7 @@ module.exports.deflatePrime = deflatePrime;
17267
16462
  module.exports.deflateTune = deflateTune;
17268
16463
  */
17269
16464
 
17270
- },{"./adler32":40,"./constants":41,"./crc32":42,"./messages":48,"./trees":49}],44:[function(require,module,exports){
16465
+ },{"./adler32":24,"./constants":25,"./crc32":26,"./messages":32,"./trees":33}],28:[function(require,module,exports){
17271
16466
  'use strict';
17272
16467
 
17273
16468
  // (C) 1995-2013 Jean-loup Gailly and Mark Adler
@@ -17327,7 +16522,7 @@ function GZheader() {
17327
16522
 
17328
16523
  module.exports = GZheader;
17329
16524
 
17330
- },{}],45:[function(require,module,exports){
16525
+ },{}],29:[function(require,module,exports){
17331
16526
  'use strict';
17332
16527
 
17333
16528
  // (C) 1995-2013 Jean-loup Gailly and Mark Adler
@@ -17673,7 +16868,7 @@ module.exports = function inflate_fast(strm, start) {
17673
16868
  return;
17674
16869
  };
17675
16870
 
17676
- },{}],46:[function(require,module,exports){
16871
+ },{}],30:[function(require,module,exports){
17677
16872
  'use strict';
17678
16873
 
17679
16874
  // (C) 1995-2013 Jean-loup Gailly and Mark Adler
@@ -19247,7 +18442,7 @@ module.exports.inflateUndermine = inflateUndermine;
19247
18442
  module.exports.inflateValidate = inflateValidate;
19248
18443
  */
19249
18444
 
19250
- },{"./adler32":40,"./constants":41,"./crc32":42,"./inffast":45,"./inftrees":47}],47:[function(require,module,exports){
18445
+ },{"./adler32":24,"./constants":25,"./crc32":26,"./inffast":29,"./inftrees":31}],31:[function(require,module,exports){
19251
18446
  'use strict';
19252
18447
 
19253
18448
  // (C) 1995-2013 Jean-loup Gailly and Mark Adler
@@ -19589,7 +18784,7 @@ const inflate_table = (type, lens, lens_index, codes, table, table_index, work,
19589
18784
 
19590
18785
  module.exports = inflate_table;
19591
18786
 
19592
- },{}],48:[function(require,module,exports){
18787
+ },{}],32:[function(require,module,exports){
19593
18788
  'use strict';
19594
18789
 
19595
18790
  // (C) 1995-2013 Jean-loup Gailly and Mark Adler
@@ -19623,7 +18818,7 @@ module.exports = {
19623
18818
  '-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */
19624
18819
  };
19625
18820
 
19626
- },{}],49:[function(require,module,exports){
18821
+ },{}],33:[function(require,module,exports){
19627
18822
  'use strict';
19628
18823
 
19629
18824
  // (C) 1995-2013 Jean-loup Gailly and Mark Adler
@@ -20804,7 +19999,7 @@ module.exports._tr_flush_block = _tr_flush_block;
20804
19999
  module.exports._tr_tally = _tr_tally;
20805
20000
  module.exports._tr_align = _tr_align;
20806
20001
 
20807
- },{}],50:[function(require,module,exports){
20002
+ },{}],34:[function(require,module,exports){
20808
20003
  'use strict';
20809
20004
 
20810
20005
  // (C) 1995-2013 Jean-loup Gailly and Mark Adler
@@ -20853,1311 +20048,5 @@ function ZStream() {
20853
20048
 
20854
20049
  module.exports = ZStream;
20855
20050
 
20856
- },{}],51:[function(require,module,exports){
20857
- // shim for using process in browser
20858
- var process = module.exports = {};
20859
-
20860
- // cached from whatever global is present so that test runners that stub it
20861
- // don't break things. But we need to wrap it in a try catch in case it is
20862
- // wrapped in strict mode code which doesn't define any globals. It's inside a
20863
- // function because try/catches deoptimize in certain engines.
20864
-
20865
- var cachedSetTimeout;
20866
- var cachedClearTimeout;
20867
-
20868
- function defaultSetTimout() {
20869
- throw new Error('setTimeout has not been defined');
20870
- }
20871
- function defaultClearTimeout () {
20872
- throw new Error('clearTimeout has not been defined');
20873
- }
20874
- (function () {
20875
- try {
20876
- if (typeof setTimeout === 'function') {
20877
- cachedSetTimeout = setTimeout;
20878
- } else {
20879
- cachedSetTimeout = defaultSetTimout;
20880
- }
20881
- } catch (e) {
20882
- cachedSetTimeout = defaultSetTimout;
20883
- }
20884
- try {
20885
- if (typeof clearTimeout === 'function') {
20886
- cachedClearTimeout = clearTimeout;
20887
- } else {
20888
- cachedClearTimeout = defaultClearTimeout;
20889
- }
20890
- } catch (e) {
20891
- cachedClearTimeout = defaultClearTimeout;
20892
- }
20893
- } ())
20894
- function runTimeout(fun) {
20895
- if (cachedSetTimeout === setTimeout) {
20896
- //normal enviroments in sane situations
20897
- return setTimeout(fun, 0);
20898
- }
20899
- // if setTimeout wasn't available but was latter defined
20900
- if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
20901
- cachedSetTimeout = setTimeout;
20902
- return setTimeout(fun, 0);
20903
- }
20904
- try {
20905
- // when when somebody has screwed with setTimeout but no I.E. maddness
20906
- return cachedSetTimeout(fun, 0);
20907
- } catch(e){
20908
- try {
20909
- // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
20910
- return cachedSetTimeout.call(null, fun, 0);
20911
- } catch(e){
20912
- // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
20913
- return cachedSetTimeout.call(this, fun, 0);
20914
- }
20915
- }
20916
-
20917
-
20918
- }
20919
- function runClearTimeout(marker) {
20920
- if (cachedClearTimeout === clearTimeout) {
20921
- //normal enviroments in sane situations
20922
- return clearTimeout(marker);
20923
- }
20924
- // if clearTimeout wasn't available but was latter defined
20925
- if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
20926
- cachedClearTimeout = clearTimeout;
20927
- return clearTimeout(marker);
20928
- }
20929
- try {
20930
- // when when somebody has screwed with setTimeout but no I.E. maddness
20931
- return cachedClearTimeout(marker);
20932
- } catch (e){
20933
- try {
20934
- // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
20935
- return cachedClearTimeout.call(null, marker);
20936
- } catch (e){
20937
- // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
20938
- // Some versions of I.E. have different rules for clearTimeout vs setTimeout
20939
- return cachedClearTimeout.call(this, marker);
20940
- }
20941
- }
20942
-
20943
-
20944
-
20945
- }
20946
- var queue = [];
20947
- var draining = false;
20948
- var currentQueue;
20949
- var queueIndex = -1;
20950
-
20951
- function cleanUpNextTick() {
20952
- if (!draining || !currentQueue) {
20953
- return;
20954
- }
20955
- draining = false;
20956
- if (currentQueue.length) {
20957
- queue = currentQueue.concat(queue);
20958
- } else {
20959
- queueIndex = -1;
20960
- }
20961
- if (queue.length) {
20962
- drainQueue();
20963
- }
20964
- }
20965
-
20966
- function drainQueue() {
20967
- if (draining) {
20968
- return;
20969
- }
20970
- var timeout = runTimeout(cleanUpNextTick);
20971
- draining = true;
20972
-
20973
- var len = queue.length;
20974
- while(len) {
20975
- currentQueue = queue;
20976
- queue = [];
20977
- while (++queueIndex < len) {
20978
- if (currentQueue) {
20979
- currentQueue[queueIndex].run();
20980
- }
20981
- }
20982
- queueIndex = -1;
20983
- len = queue.length;
20984
- }
20985
- currentQueue = null;
20986
- draining = false;
20987
- runClearTimeout(timeout);
20988
- }
20989
-
20990
- process.nextTick = function (fun) {
20991
- var args = new Array(arguments.length - 1);
20992
- if (arguments.length > 1) {
20993
- for (var i = 1; i < arguments.length; i++) {
20994
- args[i - 1] = arguments[i];
20995
- }
20996
- }
20997
- queue.push(new Item(fun, args));
20998
- if (queue.length === 1 && !draining) {
20999
- runTimeout(drainQueue);
21000
- }
21001
- };
21002
-
21003
- // v8 likes predictible objects
21004
- function Item(fun, array) {
21005
- this.fun = fun;
21006
- this.array = array;
21007
- }
21008
- Item.prototype.run = function () {
21009
- this.fun.apply(null, this.array);
21010
- };
21011
- process.title = 'browser';
21012
- process.browser = true;
21013
- process.env = {};
21014
- process.argv = [];
21015
- process.version = ''; // empty string to avoid regexp issues
21016
- process.versions = {};
21017
-
21018
- function noop() {}
21019
-
21020
- process.on = noop;
21021
- process.addListener = noop;
21022
- process.once = noop;
21023
- process.off = noop;
21024
- process.removeListener = noop;
21025
- process.removeAllListeners = noop;
21026
- process.emit = noop;
21027
- process.prependListener = noop;
21028
- process.prependOnceListener = noop;
21029
-
21030
- process.listeners = function (name) { return [] }
21031
-
21032
- process.binding = function (name) {
21033
- throw new Error('process.binding is not supported');
21034
- };
21035
-
21036
- process.cwd = function () { return '/' };
21037
- process.chdir = function (dir) {
21038
- throw new Error('process.chdir is not supported');
21039
- };
21040
- process.umask = function() { return 0; };
21041
-
21042
- },{}],52:[function(require,module,exports){
21043
- module.exports = function isBuffer(arg) {
21044
- return arg && typeof arg === 'object'
21045
- && typeof arg.copy === 'function'
21046
- && typeof arg.fill === 'function'
21047
- && typeof arg.readUInt8 === 'function';
21048
- }
21049
- },{}],53:[function(require,module,exports){
21050
- // Currently in sync with Node.js lib/internal/util/types.js
21051
- // https://github.com/nodejs/node/commit/112cc7c27551254aa2b17098fb774867f05ed0d9
21052
-
21053
- 'use strict';
21054
-
21055
- var isArgumentsObject = require('is-arguments');
21056
- var isGeneratorFunction = require('is-generator-function');
21057
- var whichTypedArray = require('which-typed-array');
21058
- var isTypedArray = require('is-typed-array');
21059
-
21060
- function uncurryThis(f) {
21061
- return f.call.bind(f);
21062
- }
21063
-
21064
- var BigIntSupported = typeof BigInt !== 'undefined';
21065
- var SymbolSupported = typeof Symbol !== 'undefined';
21066
-
21067
- var ObjectToString = uncurryThis(Object.prototype.toString);
21068
-
21069
- var numberValue = uncurryThis(Number.prototype.valueOf);
21070
- var stringValue = uncurryThis(String.prototype.valueOf);
21071
- var booleanValue = uncurryThis(Boolean.prototype.valueOf);
21072
-
21073
- if (BigIntSupported) {
21074
- var bigIntValue = uncurryThis(BigInt.prototype.valueOf);
21075
- }
21076
-
21077
- if (SymbolSupported) {
21078
- var symbolValue = uncurryThis(Symbol.prototype.valueOf);
21079
- }
21080
-
21081
- function checkBoxedPrimitive(value, prototypeValueOf) {
21082
- if (typeof value !== 'object') {
21083
- return false;
21084
- }
21085
- try {
21086
- prototypeValueOf(value);
21087
- return true;
21088
- } catch(e) {
21089
- return false;
21090
- }
21091
- }
21092
-
21093
- exports.isArgumentsObject = isArgumentsObject;
21094
- exports.isGeneratorFunction = isGeneratorFunction;
21095
- exports.isTypedArray = isTypedArray;
21096
-
21097
- // Taken from here and modified for better browser support
21098
- // https://github.com/sindresorhus/p-is-promise/blob/cda35a513bda03f977ad5cde3a079d237e82d7ef/index.js
21099
- function isPromise(input) {
21100
- return (
21101
- (
21102
- typeof Promise !== 'undefined' &&
21103
- input instanceof Promise
21104
- ) ||
21105
- (
21106
- input !== null &&
21107
- typeof input === 'object' &&
21108
- typeof input.then === 'function' &&
21109
- typeof input.catch === 'function'
21110
- )
21111
- );
21112
- }
21113
- exports.isPromise = isPromise;
21114
-
21115
- function isArrayBufferView(value) {
21116
- if (typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView) {
21117
- return ArrayBuffer.isView(value);
21118
- }
21119
-
21120
- return (
21121
- isTypedArray(value) ||
21122
- isDataView(value)
21123
- );
21124
- }
21125
- exports.isArrayBufferView = isArrayBufferView;
21126
-
21127
-
21128
- function isUint8Array(value) {
21129
- return whichTypedArray(value) === 'Uint8Array';
21130
- }
21131
- exports.isUint8Array = isUint8Array;
21132
-
21133
- function isUint8ClampedArray(value) {
21134
- return whichTypedArray(value) === 'Uint8ClampedArray';
21135
- }
21136
- exports.isUint8ClampedArray = isUint8ClampedArray;
21137
-
21138
- function isUint16Array(value) {
21139
- return whichTypedArray(value) === 'Uint16Array';
21140
- }
21141
- exports.isUint16Array = isUint16Array;
21142
-
21143
- function isUint32Array(value) {
21144
- return whichTypedArray(value) === 'Uint32Array';
21145
- }
21146
- exports.isUint32Array = isUint32Array;
21147
-
21148
- function isInt8Array(value) {
21149
- return whichTypedArray(value) === 'Int8Array';
21150
- }
21151
- exports.isInt8Array = isInt8Array;
21152
-
21153
- function isInt16Array(value) {
21154
- return whichTypedArray(value) === 'Int16Array';
21155
- }
21156
- exports.isInt16Array = isInt16Array;
21157
-
21158
- function isInt32Array(value) {
21159
- return whichTypedArray(value) === 'Int32Array';
21160
- }
21161
- exports.isInt32Array = isInt32Array;
21162
-
21163
- function isFloat32Array(value) {
21164
- return whichTypedArray(value) === 'Float32Array';
21165
- }
21166
- exports.isFloat32Array = isFloat32Array;
21167
-
21168
- function isFloat64Array(value) {
21169
- return whichTypedArray(value) === 'Float64Array';
21170
- }
21171
- exports.isFloat64Array = isFloat64Array;
21172
-
21173
- function isBigInt64Array(value) {
21174
- return whichTypedArray(value) === 'BigInt64Array';
21175
- }
21176
- exports.isBigInt64Array = isBigInt64Array;
21177
-
21178
- function isBigUint64Array(value) {
21179
- return whichTypedArray(value) === 'BigUint64Array';
21180
- }
21181
- exports.isBigUint64Array = isBigUint64Array;
21182
-
21183
- function isMapToString(value) {
21184
- return ObjectToString(value) === '[object Map]';
21185
- }
21186
- isMapToString.working = (
21187
- typeof Map !== 'undefined' &&
21188
- isMapToString(new Map())
21189
- );
21190
-
21191
- function isMap(value) {
21192
- if (typeof Map === 'undefined') {
21193
- return false;
21194
- }
21195
-
21196
- return isMapToString.working
21197
- ? isMapToString(value)
21198
- : value instanceof Map;
21199
- }
21200
- exports.isMap = isMap;
21201
-
21202
- function isSetToString(value) {
21203
- return ObjectToString(value) === '[object Set]';
21204
- }
21205
- isSetToString.working = (
21206
- typeof Set !== 'undefined' &&
21207
- isSetToString(new Set())
21208
- );
21209
- function isSet(value) {
21210
- if (typeof Set === 'undefined') {
21211
- return false;
21212
- }
21213
-
21214
- return isSetToString.working
21215
- ? isSetToString(value)
21216
- : value instanceof Set;
21217
- }
21218
- exports.isSet = isSet;
21219
-
21220
- function isWeakMapToString(value) {
21221
- return ObjectToString(value) === '[object WeakMap]';
21222
- }
21223
- isWeakMapToString.working = (
21224
- typeof WeakMap !== 'undefined' &&
21225
- isWeakMapToString(new WeakMap())
21226
- );
21227
- function isWeakMap(value) {
21228
- if (typeof WeakMap === 'undefined') {
21229
- return false;
21230
- }
21231
-
21232
- return isWeakMapToString.working
21233
- ? isWeakMapToString(value)
21234
- : value instanceof WeakMap;
21235
- }
21236
- exports.isWeakMap = isWeakMap;
21237
-
21238
- function isWeakSetToString(value) {
21239
- return ObjectToString(value) === '[object WeakSet]';
21240
- }
21241
- isWeakSetToString.working = (
21242
- typeof WeakSet !== 'undefined' &&
21243
- isWeakSetToString(new WeakSet())
21244
- );
21245
- function isWeakSet(value) {
21246
- return isWeakSetToString(value);
21247
- }
21248
- exports.isWeakSet = isWeakSet;
21249
-
21250
- function isArrayBufferToString(value) {
21251
- return ObjectToString(value) === '[object ArrayBuffer]';
21252
- }
21253
- isArrayBufferToString.working = (
21254
- typeof ArrayBuffer !== 'undefined' &&
21255
- isArrayBufferToString(new ArrayBuffer())
21256
- );
21257
- function isArrayBuffer(value) {
21258
- if (typeof ArrayBuffer === 'undefined') {
21259
- return false;
21260
- }
21261
-
21262
- return isArrayBufferToString.working
21263
- ? isArrayBufferToString(value)
21264
- : value instanceof ArrayBuffer;
21265
- }
21266
- exports.isArrayBuffer = isArrayBuffer;
21267
-
21268
- function isDataViewToString(value) {
21269
- return ObjectToString(value) === '[object DataView]';
21270
- }
21271
- isDataViewToString.working = (
21272
- typeof ArrayBuffer !== 'undefined' &&
21273
- typeof DataView !== 'undefined' &&
21274
- isDataViewToString(new DataView(new ArrayBuffer(1), 0, 1))
21275
- );
21276
- function isDataView(value) {
21277
- if (typeof DataView === 'undefined') {
21278
- return false;
21279
- }
21280
-
21281
- return isDataViewToString.working
21282
- ? isDataViewToString(value)
21283
- : value instanceof DataView;
21284
- }
21285
- exports.isDataView = isDataView;
21286
-
21287
- function isSharedArrayBufferToString(value) {
21288
- return ObjectToString(value) === '[object SharedArrayBuffer]';
21289
- }
21290
- isSharedArrayBufferToString.working = (
21291
- typeof SharedArrayBuffer !== 'undefined' &&
21292
- isSharedArrayBufferToString(new SharedArrayBuffer())
21293
- );
21294
- function isSharedArrayBuffer(value) {
21295
- if (typeof SharedArrayBuffer === 'undefined') {
21296
- return false;
21297
- }
21298
-
21299
- return isSharedArrayBufferToString.working
21300
- ? isSharedArrayBufferToString(value)
21301
- : value instanceof SharedArrayBuffer;
21302
- }
21303
- exports.isSharedArrayBuffer = isSharedArrayBuffer;
21304
-
21305
- function isAsyncFunction(value) {
21306
- return ObjectToString(value) === '[object AsyncFunction]';
21307
- }
21308
- exports.isAsyncFunction = isAsyncFunction;
21309
-
21310
- function isMapIterator(value) {
21311
- return ObjectToString(value) === '[object Map Iterator]';
21312
- }
21313
- exports.isMapIterator = isMapIterator;
21314
-
21315
- function isSetIterator(value) {
21316
- return ObjectToString(value) === '[object Set Iterator]';
21317
- }
21318
- exports.isSetIterator = isSetIterator;
21319
-
21320
- function isGeneratorObject(value) {
21321
- return ObjectToString(value) === '[object Generator]';
21322
- }
21323
- exports.isGeneratorObject = isGeneratorObject;
21324
-
21325
- function isWebAssemblyCompiledModule(value) {
21326
- return ObjectToString(value) === '[object WebAssembly.Module]';
21327
- }
21328
- exports.isWebAssemblyCompiledModule = isWebAssemblyCompiledModule;
21329
-
21330
- function isNumberObject(value) {
21331
- return checkBoxedPrimitive(value, numberValue);
21332
- }
21333
- exports.isNumberObject = isNumberObject;
21334
-
21335
- function isStringObject(value) {
21336
- return checkBoxedPrimitive(value, stringValue);
21337
- }
21338
- exports.isStringObject = isStringObject;
21339
-
21340
- function isBooleanObject(value) {
21341
- return checkBoxedPrimitive(value, booleanValue);
21342
- }
21343
- exports.isBooleanObject = isBooleanObject;
21344
-
21345
- function isBigIntObject(value) {
21346
- return BigIntSupported && checkBoxedPrimitive(value, bigIntValue);
21347
- }
21348
- exports.isBigIntObject = isBigIntObject;
21349
-
21350
- function isSymbolObject(value) {
21351
- return SymbolSupported && checkBoxedPrimitive(value, symbolValue);
21352
- }
21353
- exports.isSymbolObject = isSymbolObject;
21354
-
21355
- function isBoxedPrimitive(value) {
21356
- return (
21357
- isNumberObject(value) ||
21358
- isStringObject(value) ||
21359
- isBooleanObject(value) ||
21360
- isBigIntObject(value) ||
21361
- isSymbolObject(value)
21362
- );
21363
- }
21364
- exports.isBoxedPrimitive = isBoxedPrimitive;
21365
-
21366
- function isAnyArrayBuffer(value) {
21367
- return typeof Uint8Array !== 'undefined' && (
21368
- isArrayBuffer(value) ||
21369
- isSharedArrayBuffer(value)
21370
- );
21371
- }
21372
- exports.isAnyArrayBuffer = isAnyArrayBuffer;
21373
-
21374
- ['isProxy', 'isExternal', 'isModuleNamespaceObject'].forEach(function(method) {
21375
- Object.defineProperty(exports, method, {
21376
- enumerable: false,
21377
- value: function() {
21378
- throw new Error(method + ' is not supported in userland');
21379
- }
21380
- });
21381
- });
21382
-
21383
- },{"is-arguments":32,"is-generator-function":33,"is-typed-array":34,"which-typed-array":55}],54:[function(require,module,exports){
21384
- (function (process){(function (){
21385
- // Copyright Joyent, Inc. and other Node contributors.
21386
- //
21387
- // Permission is hereby granted, free of charge, to any person obtaining a
21388
- // copy of this software and associated documentation files (the
21389
- // "Software"), to deal in the Software without restriction, including
21390
- // without limitation the rights to use, copy, modify, merge, publish,
21391
- // distribute, sublicense, and/or sell copies of the Software, and to permit
21392
- // persons to whom the Software is furnished to do so, subject to the
21393
- // following conditions:
21394
- //
21395
- // The above copyright notice and this permission notice shall be included
21396
- // in all copies or substantial portions of the Software.
21397
- //
21398
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
21399
- // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
21400
- // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
21401
- // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
21402
- // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
21403
- // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
21404
- // USE OR OTHER DEALINGS IN THE SOFTWARE.
21405
-
21406
- var getOwnPropertyDescriptors = Object.getOwnPropertyDescriptors ||
21407
- function getOwnPropertyDescriptors(obj) {
21408
- var keys = Object.keys(obj);
21409
- var descriptors = {};
21410
- for (var i = 0; i < keys.length; i++) {
21411
- descriptors[keys[i]] = Object.getOwnPropertyDescriptor(obj, keys[i]);
21412
- }
21413
- return descriptors;
21414
- };
21415
-
21416
- var formatRegExp = /%[sdj%]/g;
21417
- exports.format = function(f) {
21418
- if (!isString(f)) {
21419
- var objects = [];
21420
- for (var i = 0; i < arguments.length; i++) {
21421
- objects.push(inspect(arguments[i]));
21422
- }
21423
- return objects.join(' ');
21424
- }
21425
-
21426
- var i = 1;
21427
- var args = arguments;
21428
- var len = args.length;
21429
- var str = String(f).replace(formatRegExp, function(x) {
21430
- if (x === '%%') return '%';
21431
- if (i >= len) return x;
21432
- switch (x) {
21433
- case '%s': return String(args[i++]);
21434
- case '%d': return Number(args[i++]);
21435
- case '%j':
21436
- try {
21437
- return JSON.stringify(args[i++]);
21438
- } catch (_) {
21439
- return '[Circular]';
21440
- }
21441
- default:
21442
- return x;
21443
- }
21444
- });
21445
- for (var x = args[i]; i < len; x = args[++i]) {
21446
- if (isNull(x) || !isObject(x)) {
21447
- str += ' ' + x;
21448
- } else {
21449
- str += ' ' + inspect(x);
21450
- }
21451
- }
21452
- return str;
21453
- };
21454
-
21455
-
21456
- // Mark that a method should not be used.
21457
- // Returns a modified function which warns once by default.
21458
- // If --no-deprecation is set, then it is a no-op.
21459
- exports.deprecate = function(fn, msg) {
21460
- if (typeof process !== 'undefined' && process.noDeprecation === true) {
21461
- return fn;
21462
- }
21463
-
21464
- // Allow for deprecating things in the process of starting up.
21465
- if (typeof process === 'undefined') {
21466
- return function() {
21467
- return exports.deprecate(fn, msg).apply(this, arguments);
21468
- };
21469
- }
21470
-
21471
- var warned = false;
21472
- function deprecated() {
21473
- if (!warned) {
21474
- if (process.throwDeprecation) {
21475
- throw new Error(msg);
21476
- } else if (process.traceDeprecation) {
21477
- console.trace(msg);
21478
- } else {
21479
- console.error(msg);
21480
- }
21481
- warned = true;
21482
- }
21483
- return fn.apply(this, arguments);
21484
- }
21485
-
21486
- return deprecated;
21487
- };
21488
-
21489
-
21490
- var debugs = {};
21491
- var debugEnvRegex = /^$/;
21492
-
21493
- if (process.env.NODE_DEBUG) {
21494
- var debugEnv = process.env.NODE_DEBUG;
21495
- debugEnv = debugEnv.replace(/[|\\{}()[\]^$+?.]/g, '\\$&')
21496
- .replace(/\*/g, '.*')
21497
- .replace(/,/g, '$|^')
21498
- .toUpperCase();
21499
- debugEnvRegex = new RegExp('^' + debugEnv + '$', 'i');
21500
- }
21501
- exports.debuglog = function(set) {
21502
- set = set.toUpperCase();
21503
- if (!debugs[set]) {
21504
- if (debugEnvRegex.test(set)) {
21505
- var pid = process.pid;
21506
- debugs[set] = function() {
21507
- var msg = exports.format.apply(exports, arguments);
21508
- console.error('%s %d: %s', set, pid, msg);
21509
- };
21510
- } else {
21511
- debugs[set] = function() {};
21512
- }
21513
- }
21514
- return debugs[set];
21515
- };
21516
-
21517
-
21518
- /**
21519
- * Echos the value of a value. Trys to print the value out
21520
- * in the best way possible given the different types.
21521
- *
21522
- * @param {Object} obj The object to print out.
21523
- * @param {Object} opts Optional options object that alters the output.
21524
- */
21525
- /* legacy: obj, showHidden, depth, colors*/
21526
- function inspect(obj, opts) {
21527
- // default options
21528
- var ctx = {
21529
- seen: [],
21530
- stylize: stylizeNoColor
21531
- };
21532
- // legacy...
21533
- if (arguments.length >= 3) ctx.depth = arguments[2];
21534
- if (arguments.length >= 4) ctx.colors = arguments[3];
21535
- if (isBoolean(opts)) {
21536
- // legacy...
21537
- ctx.showHidden = opts;
21538
- } else if (opts) {
21539
- // got an "options" object
21540
- exports._extend(ctx, opts);
21541
- }
21542
- // set default options
21543
- if (isUndefined(ctx.showHidden)) ctx.showHidden = false;
21544
- if (isUndefined(ctx.depth)) ctx.depth = 2;
21545
- if (isUndefined(ctx.colors)) ctx.colors = false;
21546
- if (isUndefined(ctx.customInspect)) ctx.customInspect = true;
21547
- if (ctx.colors) ctx.stylize = stylizeWithColor;
21548
- return formatValue(ctx, obj, ctx.depth);
21549
- }
21550
- exports.inspect = inspect;
21551
-
21552
-
21553
- // http://en.wikipedia.org/wiki/ANSI_escape_code#graphics
21554
- inspect.colors = {
21555
- 'bold' : [1, 22],
21556
- 'italic' : [3, 23],
21557
- 'underline' : [4, 24],
21558
- 'inverse' : [7, 27],
21559
- 'white' : [37, 39],
21560
- 'grey' : [90, 39],
21561
- 'black' : [30, 39],
21562
- 'blue' : [34, 39],
21563
- 'cyan' : [36, 39],
21564
- 'green' : [32, 39],
21565
- 'magenta' : [35, 39],
21566
- 'red' : [31, 39],
21567
- 'yellow' : [33, 39]
21568
- };
21569
-
21570
- // Don't use 'blue' not visible on cmd.exe
21571
- inspect.styles = {
21572
- 'special': 'cyan',
21573
- 'number': 'yellow',
21574
- 'boolean': 'yellow',
21575
- 'undefined': 'grey',
21576
- 'null': 'bold',
21577
- 'string': 'green',
21578
- 'date': 'magenta',
21579
- // "name": intentionally not styling
21580
- 'regexp': 'red'
21581
- };
21582
-
21583
-
21584
- function stylizeWithColor(str, styleType) {
21585
- var style = inspect.styles[styleType];
21586
-
21587
- if (style) {
21588
- return '\u001b[' + inspect.colors[style][0] + 'm' + str +
21589
- '\u001b[' + inspect.colors[style][1] + 'm';
21590
- } else {
21591
- return str;
21592
- }
21593
- }
21594
-
21595
-
21596
- function stylizeNoColor(str, styleType) {
21597
- return str;
21598
- }
21599
-
21600
-
21601
- function arrayToHash(array) {
21602
- var hash = {};
21603
-
21604
- array.forEach(function(val, idx) {
21605
- hash[val] = true;
21606
- });
21607
-
21608
- return hash;
21609
- }
21610
-
21611
-
21612
- function formatValue(ctx, value, recurseTimes) {
21613
- // Provide a hook for user-specified inspect functions.
21614
- // Check that value is an object with an inspect function on it
21615
- if (ctx.customInspect &&
21616
- value &&
21617
- isFunction(value.inspect) &&
21618
- // Filter out the util module, it's inspect function is special
21619
- value.inspect !== exports.inspect &&
21620
- // Also filter out any prototype objects using the circular check.
21621
- !(value.constructor && value.constructor.prototype === value)) {
21622
- var ret = value.inspect(recurseTimes, ctx);
21623
- if (!isString(ret)) {
21624
- ret = formatValue(ctx, ret, recurseTimes);
21625
- }
21626
- return ret;
21627
- }
21628
-
21629
- // Primitive types cannot have properties
21630
- var primitive = formatPrimitive(ctx, value);
21631
- if (primitive) {
21632
- return primitive;
21633
- }
21634
-
21635
- // Look up the keys of the object.
21636
- var keys = Object.keys(value);
21637
- var visibleKeys = arrayToHash(keys);
21638
-
21639
- if (ctx.showHidden) {
21640
- keys = Object.getOwnPropertyNames(value);
21641
- }
21642
-
21643
- // IE doesn't make error fields non-enumerable
21644
- // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx
21645
- if (isError(value)
21646
- && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {
21647
- return formatError(value);
21648
- }
21649
-
21650
- // Some type of object without properties can be shortcutted.
21651
- if (keys.length === 0) {
21652
- if (isFunction(value)) {
21653
- var name = value.name ? ': ' + value.name : '';
21654
- return ctx.stylize('[Function' + name + ']', 'special');
21655
- }
21656
- if (isRegExp(value)) {
21657
- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
21658
- }
21659
- if (isDate(value)) {
21660
- return ctx.stylize(Date.prototype.toString.call(value), 'date');
21661
- }
21662
- if (isError(value)) {
21663
- return formatError(value);
21664
- }
21665
- }
21666
-
21667
- var base = '', array = false, braces = ['{', '}'];
21668
-
21669
- // Make Array say that they are Array
21670
- if (isArray(value)) {
21671
- array = true;
21672
- braces = ['[', ']'];
21673
- }
21674
-
21675
- // Make functions say that they are functions
21676
- if (isFunction(value)) {
21677
- var n = value.name ? ': ' + value.name : '';
21678
- base = ' [Function' + n + ']';
21679
- }
21680
-
21681
- // Make RegExps say that they are RegExps
21682
- if (isRegExp(value)) {
21683
- base = ' ' + RegExp.prototype.toString.call(value);
21684
- }
21685
-
21686
- // Make dates with properties first say the date
21687
- if (isDate(value)) {
21688
- base = ' ' + Date.prototype.toUTCString.call(value);
21689
- }
21690
-
21691
- // Make error with message first say the error
21692
- if (isError(value)) {
21693
- base = ' ' + formatError(value);
21694
- }
21695
-
21696
- if (keys.length === 0 && (!array || value.length == 0)) {
21697
- return braces[0] + base + braces[1];
21698
- }
21699
-
21700
- if (recurseTimes < 0) {
21701
- if (isRegExp(value)) {
21702
- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
21703
- } else {
21704
- return ctx.stylize('[Object]', 'special');
21705
- }
21706
- }
21707
-
21708
- ctx.seen.push(value);
21709
-
21710
- var output;
21711
- if (array) {
21712
- output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);
21713
- } else {
21714
- output = keys.map(function(key) {
21715
- return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);
21716
- });
21717
- }
21718
-
21719
- ctx.seen.pop();
21720
-
21721
- return reduceToSingleString(output, base, braces);
21722
- }
21723
-
21724
-
21725
- function formatPrimitive(ctx, value) {
21726
- if (isUndefined(value))
21727
- return ctx.stylize('undefined', 'undefined');
21728
- if (isString(value)) {
21729
- var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '')
21730
- .replace(/'/g, "\\'")
21731
- .replace(/\\"/g, '"') + '\'';
21732
- return ctx.stylize(simple, 'string');
21733
- }
21734
- if (isNumber(value))
21735
- return ctx.stylize('' + value, 'number');
21736
- if (isBoolean(value))
21737
- return ctx.stylize('' + value, 'boolean');
21738
- // For some reason typeof null is "object", so special case here.
21739
- if (isNull(value))
21740
- return ctx.stylize('null', 'null');
21741
- }
21742
-
21743
-
21744
- function formatError(value) {
21745
- return '[' + Error.prototype.toString.call(value) + ']';
21746
- }
21747
-
21748
-
21749
- function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {
21750
- var output = [];
21751
- for (var i = 0, l = value.length; i < l; ++i) {
21752
- if (hasOwnProperty(value, String(i))) {
21753
- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
21754
- String(i), true));
21755
- } else {
21756
- output.push('');
21757
- }
21758
- }
21759
- keys.forEach(function(key) {
21760
- if (!key.match(/^\d+$/)) {
21761
- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
21762
- key, true));
21763
- }
21764
- });
21765
- return output;
21766
- }
21767
-
21768
-
21769
- function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {
21770
- var name, str, desc;
21771
- desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };
21772
- if (desc.get) {
21773
- if (desc.set) {
21774
- str = ctx.stylize('[Getter/Setter]', 'special');
21775
- } else {
21776
- str = ctx.stylize('[Getter]', 'special');
21777
- }
21778
- } else {
21779
- if (desc.set) {
21780
- str = ctx.stylize('[Setter]', 'special');
21781
- }
21782
- }
21783
- if (!hasOwnProperty(visibleKeys, key)) {
21784
- name = '[' + key + ']';
21785
- }
21786
- if (!str) {
21787
- if (ctx.seen.indexOf(desc.value) < 0) {
21788
- if (isNull(recurseTimes)) {
21789
- str = formatValue(ctx, desc.value, null);
21790
- } else {
21791
- str = formatValue(ctx, desc.value, recurseTimes - 1);
21792
- }
21793
- if (str.indexOf('\n') > -1) {
21794
- if (array) {
21795
- str = str.split('\n').map(function(line) {
21796
- return ' ' + line;
21797
- }).join('\n').substr(2);
21798
- } else {
21799
- str = '\n' + str.split('\n').map(function(line) {
21800
- return ' ' + line;
21801
- }).join('\n');
21802
- }
21803
- }
21804
- } else {
21805
- str = ctx.stylize('[Circular]', 'special');
21806
- }
21807
- }
21808
- if (isUndefined(name)) {
21809
- if (array && key.match(/^\d+$/)) {
21810
- return str;
21811
- }
21812
- name = JSON.stringify('' + key);
21813
- if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) {
21814
- name = name.substr(1, name.length - 2);
21815
- name = ctx.stylize(name, 'name');
21816
- } else {
21817
- name = name.replace(/'/g, "\\'")
21818
- .replace(/\\"/g, '"')
21819
- .replace(/(^"|"$)/g, "'");
21820
- name = ctx.stylize(name, 'string');
21821
- }
21822
- }
21823
-
21824
- return name + ': ' + str;
21825
- }
21826
-
21827
-
21828
- function reduceToSingleString(output, base, braces) {
21829
- var numLinesEst = 0;
21830
- var length = output.reduce(function(prev, cur) {
21831
- numLinesEst++;
21832
- if (cur.indexOf('\n') >= 0) numLinesEst++;
21833
- return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1;
21834
- }, 0);
21835
-
21836
- if (length > 60) {
21837
- return braces[0] +
21838
- (base === '' ? '' : base + '\n ') +
21839
- ' ' +
21840
- output.join(',\n ') +
21841
- ' ' +
21842
- braces[1];
21843
- }
21844
-
21845
- return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];
21846
- }
21847
-
21848
-
21849
- // NOTE: These type checking functions intentionally don't use `instanceof`
21850
- // because it is fragile and can be easily faked with `Object.create()`.
21851
- exports.types = require('./support/types');
21852
-
21853
- function isArray(ar) {
21854
- return Array.isArray(ar);
21855
- }
21856
- exports.isArray = isArray;
21857
-
21858
- function isBoolean(arg) {
21859
- return typeof arg === 'boolean';
21860
- }
21861
- exports.isBoolean = isBoolean;
21862
-
21863
- function isNull(arg) {
21864
- return arg === null;
21865
- }
21866
- exports.isNull = isNull;
21867
-
21868
- function isNullOrUndefined(arg) {
21869
- return arg == null;
21870
- }
21871
- exports.isNullOrUndefined = isNullOrUndefined;
21872
-
21873
- function isNumber(arg) {
21874
- return typeof arg === 'number';
21875
- }
21876
- exports.isNumber = isNumber;
21877
-
21878
- function isString(arg) {
21879
- return typeof arg === 'string';
21880
- }
21881
- exports.isString = isString;
21882
-
21883
- function isSymbol(arg) {
21884
- return typeof arg === 'symbol';
21885
- }
21886
- exports.isSymbol = isSymbol;
21887
-
21888
- function isUndefined(arg) {
21889
- return arg === void 0;
21890
- }
21891
- exports.isUndefined = isUndefined;
21892
-
21893
- function isRegExp(re) {
21894
- return isObject(re) && objectToString(re) === '[object RegExp]';
21895
- }
21896
- exports.isRegExp = isRegExp;
21897
- exports.types.isRegExp = isRegExp;
21898
-
21899
- function isObject(arg) {
21900
- return typeof arg === 'object' && arg !== null;
21901
- }
21902
- exports.isObject = isObject;
21903
-
21904
- function isDate(d) {
21905
- return isObject(d) && objectToString(d) === '[object Date]';
21906
- }
21907
- exports.isDate = isDate;
21908
- exports.types.isDate = isDate;
21909
-
21910
- function isError(e) {
21911
- return isObject(e) &&
21912
- (objectToString(e) === '[object Error]' || e instanceof Error);
21913
- }
21914
- exports.isError = isError;
21915
- exports.types.isNativeError = isError;
21916
-
21917
- function isFunction(arg) {
21918
- return typeof arg === 'function';
21919
- }
21920
- exports.isFunction = isFunction;
21921
-
21922
- function isPrimitive(arg) {
21923
- return arg === null ||
21924
- typeof arg === 'boolean' ||
21925
- typeof arg === 'number' ||
21926
- typeof arg === 'string' ||
21927
- typeof arg === 'symbol' || // ES6 symbol
21928
- typeof arg === 'undefined';
21929
- }
21930
- exports.isPrimitive = isPrimitive;
21931
-
21932
- exports.isBuffer = require('./support/isBuffer');
21933
-
21934
- function objectToString(o) {
21935
- return Object.prototype.toString.call(o);
21936
- }
21937
-
21938
-
21939
- function pad(n) {
21940
- return n < 10 ? '0' + n.toString(10) : n.toString(10);
21941
- }
21942
-
21943
-
21944
- var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',
21945
- 'Oct', 'Nov', 'Dec'];
21946
-
21947
- // 26 Feb 16:19:34
21948
- function timestamp() {
21949
- var d = new Date();
21950
- var time = [pad(d.getHours()),
21951
- pad(d.getMinutes()),
21952
- pad(d.getSeconds())].join(':');
21953
- return [d.getDate(), months[d.getMonth()], time].join(' ');
21954
- }
21955
-
21956
-
21957
- // log is just a thin wrapper to console.log that prepends a timestamp
21958
- exports.log = function() {
21959
- console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments));
21960
- };
21961
-
21962
-
21963
- /**
21964
- * Inherit the prototype methods from one constructor into another.
21965
- *
21966
- * The Function.prototype.inherits from lang.js rewritten as a standalone
21967
- * function (not on Function.prototype). NOTE: If this file is to be loaded
21968
- * during bootstrapping this function needs to be rewritten using some native
21969
- * functions as prototype setup using normal JavaScript does not work as
21970
- * expected during bootstrapping (see mirror.js in r114903).
21971
- *
21972
- * @param {function} ctor Constructor function which needs to inherit the
21973
- * prototype.
21974
- * @param {function} superCtor Constructor function to inherit prototype from.
21975
- */
21976
- exports.inherits = require('inherits');
21977
-
21978
- exports._extend = function(origin, add) {
21979
- // Don't do anything if add isn't an object
21980
- if (!add || !isObject(add)) return origin;
21981
-
21982
- var keys = Object.keys(add);
21983
- var i = keys.length;
21984
- while (i--) {
21985
- origin[keys[i]] = add[keys[i]];
21986
- }
21987
- return origin;
21988
- };
21989
-
21990
- function hasOwnProperty(obj, prop) {
21991
- return Object.prototype.hasOwnProperty.call(obj, prop);
21992
- }
21993
-
21994
- var kCustomPromisifiedSymbol = typeof Symbol !== 'undefined' ? Symbol('util.promisify.custom') : undefined;
21995
-
21996
- exports.promisify = function promisify(original) {
21997
- if (typeof original !== 'function')
21998
- throw new TypeError('The "original" argument must be of type Function');
21999
-
22000
- if (kCustomPromisifiedSymbol && original[kCustomPromisifiedSymbol]) {
22001
- var fn = original[kCustomPromisifiedSymbol];
22002
- if (typeof fn !== 'function') {
22003
- throw new TypeError('The "util.promisify.custom" argument must be of type Function');
22004
- }
22005
- Object.defineProperty(fn, kCustomPromisifiedSymbol, {
22006
- value: fn, enumerable: false, writable: false, configurable: true
22007
- });
22008
- return fn;
22009
- }
22010
-
22011
- function fn() {
22012
- var promiseResolve, promiseReject;
22013
- var promise = new Promise(function (resolve, reject) {
22014
- promiseResolve = resolve;
22015
- promiseReject = reject;
22016
- });
22017
-
22018
- var args = [];
22019
- for (var i = 0; i < arguments.length; i++) {
22020
- args.push(arguments[i]);
22021
- }
22022
- args.push(function (err, value) {
22023
- if (err) {
22024
- promiseReject(err);
22025
- } else {
22026
- promiseResolve(value);
22027
- }
22028
- });
22029
-
22030
- try {
22031
- original.apply(this, args);
22032
- } catch (err) {
22033
- promiseReject(err);
22034
- }
22035
-
22036
- return promise;
22037
- }
22038
-
22039
- Object.setPrototypeOf(fn, Object.getPrototypeOf(original));
22040
-
22041
- if (kCustomPromisifiedSymbol) Object.defineProperty(fn, kCustomPromisifiedSymbol, {
22042
- value: fn, enumerable: false, writable: false, configurable: true
22043
- });
22044
- return Object.defineProperties(
22045
- fn,
22046
- getOwnPropertyDescriptors(original)
22047
- );
22048
- }
22049
-
22050
- exports.promisify.custom = kCustomPromisifiedSymbol
22051
-
22052
- function callbackifyOnRejected(reason, cb) {
22053
- // `!reason` guard inspired by bluebird (Ref: https://goo.gl/t5IS6M).
22054
- // Because `null` is a special error value in callbacks which means "no error
22055
- // occurred", we error-wrap so the callback consumer can distinguish between
22056
- // "the promise rejected with null" or "the promise fulfilled with undefined".
22057
- if (!reason) {
22058
- var newReason = new Error('Promise was rejected with a falsy value');
22059
- newReason.reason = reason;
22060
- reason = newReason;
22061
- }
22062
- return cb(reason);
22063
- }
22064
-
22065
- function callbackify(original) {
22066
- if (typeof original !== 'function') {
22067
- throw new TypeError('The "original" argument must be of type Function');
22068
- }
22069
-
22070
- // We DO NOT return the promise as it gives the user a false sense that
22071
- // the promise is actually somehow related to the callback's execution
22072
- // and that the callback throwing will reject the promise.
22073
- function callbackified() {
22074
- var args = [];
22075
- for (var i = 0; i < arguments.length; i++) {
22076
- args.push(arguments[i]);
22077
- }
22078
-
22079
- var maybeCb = args.pop();
22080
- if (typeof maybeCb !== 'function') {
22081
- throw new TypeError('The last argument must be of type Function');
22082
- }
22083
- var self = this;
22084
- var cb = function() {
22085
- return maybeCb.apply(self, arguments);
22086
- };
22087
- // In true node style we process the callback on `nextTick` with all the
22088
- // implications (stack, `uncaughtException`, `async_hooks`)
22089
- original.apply(this, args)
22090
- .then(function(ret) { process.nextTick(cb.bind(null, null, ret)) },
22091
- function(rej) { process.nextTick(callbackifyOnRejected.bind(null, rej, cb)) });
22092
- }
22093
-
22094
- Object.setPrototypeOf(callbackified, Object.getPrototypeOf(original));
22095
- Object.defineProperties(callbackified,
22096
- getOwnPropertyDescriptors(original));
22097
- return callbackified;
22098
- }
22099
- exports.callbackify = callbackify;
22100
-
22101
- }).call(this)}).call(this,require('_process'))
22102
- },{"./support/isBuffer":52,"./support/types":53,"_process":51,"inherits":31}],55:[function(require,module,exports){
22103
- (function (global){(function (){
22104
- 'use strict';
22105
-
22106
- var forEach = require('foreach');
22107
- var availableTypedArrays = require('available-typed-arrays');
22108
- var callBound = require('call-bind/callBound');
22109
-
22110
- var $toString = callBound('Object.prototype.toString');
22111
- var hasSymbols = require('has-symbols')();
22112
- var hasToStringTag = hasSymbols && typeof Symbol.toStringTag === 'symbol';
22113
-
22114
- var typedArrays = availableTypedArrays();
22115
-
22116
- var $slice = callBound('String.prototype.slice');
22117
- var toStrTags = {};
22118
- var gOPD = require('es-abstract/helpers/getOwnPropertyDescriptor');
22119
- var getPrototypeOf = Object.getPrototypeOf; // require('getprototypeof');
22120
- if (hasToStringTag && gOPD && getPrototypeOf) {
22121
- forEach(typedArrays, function (typedArray) {
22122
- if (typeof global[typedArray] === 'function') {
22123
- var arr = new global[typedArray]();
22124
- if (!(Symbol.toStringTag in arr)) {
22125
- throw new EvalError('this engine has support for Symbol.toStringTag, but ' + typedArray + ' does not have the property! Please report this.');
22126
- }
22127
- var proto = getPrototypeOf(arr);
22128
- var descriptor = gOPD(proto, Symbol.toStringTag);
22129
- if (!descriptor) {
22130
- var superProto = getPrototypeOf(proto);
22131
- descriptor = gOPD(superProto, Symbol.toStringTag);
22132
- }
22133
- toStrTags[typedArray] = descriptor.get;
22134
- }
22135
- });
22136
- }
22137
-
22138
- var tryTypedArrays = function tryAllTypedArrays(value) {
22139
- var foundName = false;
22140
- forEach(toStrTags, function (getter, typedArray) {
22141
- if (!foundName) {
22142
- try {
22143
- var name = getter.call(value);
22144
- if (name === typedArray) {
22145
- foundName = name;
22146
- }
22147
- } catch (e) {}
22148
- }
22149
- });
22150
- return foundName;
22151
- };
22152
-
22153
- var isTypedArray = require('is-typed-array');
22154
-
22155
- module.exports = function whichTypedArray(value) {
22156
- if (!isTypedArray(value)) { return false; }
22157
- if (!hasToStringTag) { return $slice($toString(value), 8, -1); }
22158
- return tryTypedArrays(value);
22159
- };
22160
-
22161
- }).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
22162
- },{"available-typed-arrays":17,"call-bind/callBound":20,"es-abstract/helpers/getOwnPropertyDescriptor":22,"foreach":23,"has-symbols":27,"is-typed-array":34}]},{},[10])(10)
20051
+ },{}]},{},[10])(10)
22163
20052
  });