contentful-management 9.0.0 → 9.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3255,365 +3255,358 @@ function errorHandler(errorResponse) {
3255
3255
  /***/ (function(module, exports, __webpack_require__) {
3256
3256
 
3257
3257
  /* WEBPACK VAR INJECTION */(function(global) {(function (global, factory) {
3258
- true ? module.exports = factory() :
3259
- undefined;
3260
- }(this, (function () { 'use strict';
3261
-
3262
- var toStringFunction = Function.prototype.toString;
3263
- var create = Object.create, defineProperty = Object.defineProperty, getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor, getOwnPropertyNames = Object.getOwnPropertyNames, getOwnPropertySymbols = Object.getOwnPropertySymbols, getPrototypeOf = Object.getPrototypeOf;
3264
- var _a = Object.prototype, hasOwnProperty = _a.hasOwnProperty, propertyIsEnumerable = _a.propertyIsEnumerable;
3265
- /**
3266
- * @enum
3267
- *
3268
- * @const {Object} SUPPORTS
3269
- *
3270
- * @property {boolean} SYMBOL_PROPERTIES are symbol properties supported
3271
- * @property {boolean} WEAKMAP is WeakMap supported
3272
- */
3273
- var SUPPORTS = {
3274
- SYMBOL_PROPERTIES: typeof getOwnPropertySymbols === 'function',
3275
- WEAKMAP: typeof WeakMap === 'function',
3276
- };
3277
- /**
3278
- * @function createCache
3279
- *
3280
- * @description
3281
- * get a new cache object to prevent circular references
3282
- *
3283
- * @returns the new cache object
3284
- */
3285
- var createCache = function () {
3286
- if (SUPPORTS.WEAKMAP) {
3287
- return new WeakMap();
3288
- }
3289
- // tiny implementation of WeakMap
3290
- var object = create({
3291
- has: function (key) { return !!~object._keys.indexOf(key); },
3292
- set: function (key, value) {
3293
- object._keys.push(key);
3294
- object._values.push(value);
3295
- },
3296
- get: function (key) { return object._values[object._keys.indexOf(key)]; },
3297
- });
3298
- object._keys = [];
3299
- object._values = [];
3300
- return object;
3301
- };
3302
- /**
3303
- * @function getCleanClone
3304
- *
3305
- * @description
3306
- * get an empty version of the object with the same prototype it has
3307
- *
3308
- * @param object the object to build a clean clone from
3309
- * @param realm the realm the object resides in
3310
- * @returns the empty cloned object
3311
- */
3312
- var getCleanClone = function (object, realm) {
3313
- if (!object.constructor) {
3314
- return create(null);
3315
- }
3316
- var Constructor = object.constructor;
3317
- var prototype = object.__proto__ || getPrototypeOf(object);
3318
- if (Constructor === realm.Object) {
3319
- return prototype === realm.Object.prototype ? {} : create(prototype);
3320
- }
3321
- if (~toStringFunction.call(Constructor).indexOf('[native code]')) {
3322
- try {
3323
- return new Constructor();
3324
- }
3325
- catch (_a) { }
3326
- }
3327
- return create(prototype);
3328
- };
3329
- /**
3330
- * @function getObjectCloneLoose
3331
- *
3332
- * @description
3333
- * get a copy of the object based on loose rules, meaning all enumerable keys
3334
- * and symbols are copied, but property descriptors are not considered
3335
- *
3336
- * @param object the object to clone
3337
- * @param realm the realm the object resides in
3338
- * @param handleCopy the function that handles copying the object
3339
- * @returns the copied object
3340
- */
3341
- var getObjectCloneLoose = function (object, realm, handleCopy, cache) {
3342
- var clone = getCleanClone(object, realm);
3343
- // set in the cache immediately to be able to reuse the object recursively
3344
- cache.set(object, clone);
3345
- for (var key in object) {
3346
- if (hasOwnProperty.call(object, key)) {
3347
- clone[key] = handleCopy(object[key], cache);
3348
- }
3349
- }
3350
- if (SUPPORTS.SYMBOL_PROPERTIES) {
3351
- var symbols = getOwnPropertySymbols(object);
3352
- var length_1 = symbols.length;
3353
- if (length_1) {
3354
- for (var index = 0, symbol = void 0; index < length_1; index++) {
3355
- symbol = symbols[index];
3356
- if (propertyIsEnumerable.call(object, symbol)) {
3357
- clone[symbol] = handleCopy(object[symbol], cache);
3358
- }
3359
- }
3360
- }
3361
- }
3362
- return clone;
3363
- };
3364
- /**
3365
- * @function getObjectCloneStrict
3366
- *
3367
- * @description
3368
- * get a copy of the object based on strict rules, meaning all keys and symbols
3369
- * are copied based on the original property descriptors
3370
- *
3371
- * @param object the object to clone
3372
- * @param realm the realm the object resides in
3373
- * @param handleCopy the function that handles copying the object
3374
- * @returns the copied object
3375
- */
3376
- var getObjectCloneStrict = function (object, realm, handleCopy, cache) {
3377
- var clone = getCleanClone(object, realm);
3378
- // set in the cache immediately to be able to reuse the object recursively
3379
- cache.set(object, clone);
3380
- var properties = SUPPORTS.SYMBOL_PROPERTIES
3381
- ? getOwnPropertyNames(object).concat(getOwnPropertySymbols(object))
3382
- : getOwnPropertyNames(object);
3383
- var length = properties.length;
3384
- if (length) {
3385
- for (var index = 0, property = void 0, descriptor = void 0; index < length; index++) {
3386
- property = properties[index];
3387
- if (property !== 'callee' && property !== 'caller') {
3388
- descriptor = getOwnPropertyDescriptor(object, property);
3389
- if (descriptor) {
3390
- // Only clone the value if actually a value, not a getter / setter.
3391
- if (!descriptor.get && !descriptor.set) {
3392
- descriptor.value = handleCopy(object[property], cache);
3393
- }
3394
- try {
3395
- defineProperty(clone, property, descriptor);
3396
- }
3397
- catch (error) {
3398
- // Tee above can fail on node in edge cases, so fall back to the loose assignment.
3399
- clone[property] = descriptor.value;
3400
- }
3401
- }
3402
- else {
3403
- // In extra edge cases where the property descriptor cannot be retrived, fall back to
3404
- // the loose assignment.
3405
- clone[property] = handleCopy(object[property], cache);
3406
- }
3407
- }
3408
- }
3409
- }
3410
- return clone;
3411
- };
3412
- /**
3413
- * @function getRegExpFlags
3414
- *
3415
- * @description
3416
- * get the flags to apply to the copied regexp
3417
- *
3418
- * @param regExp the regexp to get the flags of
3419
- * @returns the flags for the regexp
3420
- */
3421
- var getRegExpFlags = function (regExp) {
3422
- var flags = '';
3423
- if (regExp.global) {
3424
- flags += 'g';
3425
- }
3426
- if (regExp.ignoreCase) {
3427
- flags += 'i';
3428
- }
3429
- if (regExp.multiline) {
3430
- flags += 'm';
3431
- }
3432
- if (regExp.unicode) {
3433
- flags += 'u';
3434
- }
3435
- if (regExp.sticky) {
3436
- flags += 'y';
3437
- }
3438
- return flags;
3439
- };
3258
+ true ? module.exports = factory() :
3259
+ undefined;
3260
+ })(this, (function () { 'use strict';
3261
+
3262
+ var toStringFunction = Function.prototype.toString;
3263
+ var create = Object.create, defineProperty = Object.defineProperty, getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor, getOwnPropertyNames = Object.getOwnPropertyNames, getOwnPropertySymbols = Object.getOwnPropertySymbols, getPrototypeOf$1 = Object.getPrototypeOf;
3264
+ var _a = Object.prototype, hasOwnProperty = _a.hasOwnProperty, propertyIsEnumerable = _a.propertyIsEnumerable;
3265
+ var SYMBOL_PROPERTIES = typeof getOwnPropertySymbols === 'function';
3266
+ var WEAK_MAP = typeof WeakMap === 'function';
3267
+ /**
3268
+ * @function createCache
3269
+ *
3270
+ * @description
3271
+ * get a new cache object to prevent circular references
3272
+ *
3273
+ * @returns the new cache object
3274
+ */
3275
+ var createCache = (function () {
3276
+ if (WEAK_MAP) {
3277
+ return function () { return new WeakMap(); };
3278
+ }
3279
+ var Cache = /** @class */ (function () {
3280
+ function Cache() {
3281
+ this._keys = [];
3282
+ this._values = [];
3283
+ }
3284
+ Cache.prototype.has = function (key) {
3285
+ return !!~this._keys.indexOf(key);
3286
+ };
3287
+ Cache.prototype.get = function (key) {
3288
+ return this._values[this._keys.indexOf(key)];
3289
+ };
3290
+ Cache.prototype.set = function (key, value) {
3291
+ this._keys.push(key);
3292
+ this._values.push(value);
3293
+ };
3294
+ return Cache;
3295
+ }());
3296
+ return function () { return new Cache(); };
3297
+ })();
3298
+ /**
3299
+ * @function getCleanClone
3300
+ *
3301
+ * @description
3302
+ * get an empty version of the object with the same prototype it has
3303
+ *
3304
+ * @param object the object to build a clean clone from
3305
+ * @param realm the realm the object resides in
3306
+ * @returns the empty cloned object
3307
+ */
3308
+ var getCleanClone = function (object, realm) {
3309
+ var prototype = object.__proto__ || getPrototypeOf$1(object);
3310
+ if (!prototype) {
3311
+ return create(null);
3312
+ }
3313
+ var Constructor = prototype.constructor;
3314
+ if (Constructor === realm.Object) {
3315
+ return prototype === realm.Object.prototype ? {} : create(prototype);
3316
+ }
3317
+ if (~toStringFunction.call(Constructor).indexOf('[native code]')) {
3318
+ try {
3319
+ return new Constructor();
3320
+ }
3321
+ catch (_a) { }
3322
+ }
3323
+ return create(prototype);
3324
+ };
3325
+ /**
3326
+ * @function getObjectCloneLoose
3327
+ *
3328
+ * @description
3329
+ * get a copy of the object based on loose rules, meaning all enumerable keys
3330
+ * and symbols are copied, but property descriptors are not considered
3331
+ *
3332
+ * @param object the object to clone
3333
+ * @param realm the realm the object resides in
3334
+ * @param handleCopy the function that handles copying the object
3335
+ * @returns the copied object
3336
+ */
3337
+ var getObjectCloneLoose = function (object, realm, handleCopy, cache) {
3338
+ var clone = getCleanClone(object, realm);
3339
+ // set in the cache immediately to be able to reuse the object recursively
3340
+ cache.set(object, clone);
3341
+ for (var key in object) {
3342
+ if (hasOwnProperty.call(object, key)) {
3343
+ clone[key] = handleCopy(object[key], cache);
3344
+ }
3345
+ }
3346
+ if (SYMBOL_PROPERTIES) {
3347
+ var symbols = getOwnPropertySymbols(object);
3348
+ for (var index = 0, length_1 = symbols.length, symbol = void 0; index < length_1; ++index) {
3349
+ symbol = symbols[index];
3350
+ if (propertyIsEnumerable.call(object, symbol)) {
3351
+ clone[symbol] = handleCopy(object[symbol], cache);
3352
+ }
3353
+ }
3354
+ }
3355
+ return clone;
3356
+ };
3357
+ /**
3358
+ * @function getObjectCloneStrict
3359
+ *
3360
+ * @description
3361
+ * get a copy of the object based on strict rules, meaning all keys and symbols
3362
+ * are copied based on the original property descriptors
3363
+ *
3364
+ * @param object the object to clone
3365
+ * @param realm the realm the object resides in
3366
+ * @param handleCopy the function that handles copying the object
3367
+ * @returns the copied object
3368
+ */
3369
+ var getObjectCloneStrict = function (object, realm, handleCopy, cache) {
3370
+ var clone = getCleanClone(object, realm);
3371
+ // set in the cache immediately to be able to reuse the object recursively
3372
+ cache.set(object, clone);
3373
+ var properties = SYMBOL_PROPERTIES
3374
+ ? getOwnPropertyNames(object).concat(getOwnPropertySymbols(object))
3375
+ : getOwnPropertyNames(object);
3376
+ for (var index = 0, length_2 = properties.length, property = void 0, descriptor = void 0; index < length_2; ++index) {
3377
+ property = properties[index];
3378
+ if (property !== 'callee' && property !== 'caller') {
3379
+ descriptor = getOwnPropertyDescriptor(object, property);
3380
+ if (descriptor) {
3381
+ // Only clone the value if actually a value, not a getter / setter.
3382
+ if (!descriptor.get && !descriptor.set) {
3383
+ descriptor.value = handleCopy(object[property], cache);
3384
+ }
3385
+ try {
3386
+ defineProperty(clone, property, descriptor);
3387
+ }
3388
+ catch (error) {
3389
+ // Tee above can fail on node in edge cases, so fall back to the loose assignment.
3390
+ clone[property] = descriptor.value;
3391
+ }
3392
+ }
3393
+ else {
3394
+ // In extra edge cases where the property descriptor cannot be retrived, fall back to
3395
+ // the loose assignment.
3396
+ clone[property] = handleCopy(object[property], cache);
3397
+ }
3398
+ }
3399
+ }
3400
+ return clone;
3401
+ };
3402
+ /**
3403
+ * @function getRegExpFlags
3404
+ *
3405
+ * @description
3406
+ * get the flags to apply to the copied regexp
3407
+ *
3408
+ * @param regExp the regexp to get the flags of
3409
+ * @returns the flags for the regexp
3410
+ */
3411
+ var getRegExpFlags = function (regExp) {
3412
+ var flags = '';
3413
+ if (regExp.global) {
3414
+ flags += 'g';
3415
+ }
3416
+ if (regExp.ignoreCase) {
3417
+ flags += 'i';
3418
+ }
3419
+ if (regExp.multiline) {
3420
+ flags += 'm';
3421
+ }
3422
+ if (regExp.unicode) {
3423
+ flags += 'u';
3424
+ }
3425
+ if (regExp.sticky) {
3426
+ flags += 'y';
3427
+ }
3428
+ return flags;
3429
+ };
3440
3430
 
3441
- // utils
3442
- var isArray = Array.isArray;
3443
- var GLOBAL_THIS = (function () {
3444
- if (typeof self !== 'undefined') {
3445
- return self;
3446
- }
3447
- if (typeof window !== 'undefined') {
3448
- return window;
3449
- }
3450
- if (typeof global !== 'undefined') {
3451
- return global;
3452
- }
3453
- if (console && console.error) {
3454
- console.error('Unable to locate global object, returning "this".');
3455
- }
3456
- })();
3457
- /**
3458
- * @function copy
3459
- *
3460
- * @description
3461
- * copy an object deeply as much as possible
3462
- *
3463
- * If `strict` is applied, then all properties (including non-enumerable ones)
3464
- * are copied with their original property descriptors on both objects and arrays.
3465
- *
3466
- * The object is compared to the global constructors in the `realm` provided,
3467
- * and the native constructor is always used to ensure that extensions of native
3468
- * objects (allows in ES2015+) are maintained.
3469
- *
3470
- * @param object the object to copy
3471
- * @param [options] the options for copying with
3472
- * @param [options.isStrict] should the copy be strict
3473
- * @param [options.realm] the realm (this) object the object is copied from
3474
- * @returns the copied object
3475
- */
3476
- function copy(object, options) {
3477
- // manually coalesced instead of default parameters for performance
3478
- var isStrict = !!(options && options.isStrict);
3479
- var realm = (options && options.realm) || GLOBAL_THIS;
3480
- var getObjectClone = isStrict
3481
- ? getObjectCloneStrict
3482
- : getObjectCloneLoose;
3483
- /**
3484
- * @function handleCopy
3485
- *
3486
- * @description
3487
- * copy the object recursively based on its type
3488
- *
3489
- * @param object the object to copy
3490
- * @returns the copied object
3491
- */
3492
- var handleCopy = function (object, cache) {
3493
- if (!object || typeof object !== 'object') {
3494
- return object;
3495
- }
3496
- if (cache.has(object)) {
3497
- return cache.get(object);
3498
- }
3499
- var Constructor = object.constructor;
3500
- // plain objects
3501
- if (Constructor === realm.Object) {
3502
- return getObjectClone(object, realm, handleCopy, cache);
3503
- }
3504
- var clone;
3505
- // arrays
3506
- if (isArray(object)) {
3507
- // if strict, include non-standard properties
3508
- if (isStrict) {
3509
- return getObjectCloneStrict(object, realm, handleCopy, cache);
3510
- }
3511
- var length_1 = object.length;
3512
- clone = new Constructor();
3513
- cache.set(object, clone);
3514
- for (var index = 0; index < length_1; index++) {
3515
- clone[index] = handleCopy(object[index], cache);
3516
- }
3517
- return clone;
3518
- }
3519
- // dates
3520
- if (object instanceof realm.Date) {
3521
- return new Constructor(object.getTime());
3522
- }
3523
- // regexps
3524
- if (object instanceof realm.RegExp) {
3525
- clone = new Constructor(object.source, object.flags || getRegExpFlags(object));
3526
- clone.lastIndex = object.lastIndex;
3527
- return clone;
3528
- }
3529
- // maps
3530
- if (realm.Map && object instanceof realm.Map) {
3531
- clone = new Constructor();
3532
- cache.set(object, clone);
3533
- object.forEach(function (value, key) {
3534
- clone.set(key, handleCopy(value, cache));
3535
- });
3536
- return clone;
3537
- }
3538
- // sets
3539
- if (realm.Set && object instanceof realm.Set) {
3540
- clone = new Constructor();
3541
- cache.set(object, clone);
3542
- object.forEach(function (value) {
3543
- clone.add(handleCopy(value, cache));
3544
- });
3545
- return clone;
3546
- }
3547
- // blobs
3548
- if (realm.Blob && object instanceof realm.Blob) {
3549
- return object.slice(0, object.size, object.type);
3550
- }
3551
- // buffers (node-only)
3552
- if (realm.Buffer && realm.Buffer.isBuffer(object)) {
3553
- clone = realm.Buffer.allocUnsafe
3554
- ? realm.Buffer.allocUnsafe(object.length)
3555
- : new Constructor(object.length);
3556
- cache.set(object, clone);
3557
- object.copy(clone);
3558
- return clone;
3559
- }
3560
- // arraybuffers / dataviews
3561
- if (realm.ArrayBuffer) {
3562
- // dataviews
3563
- if (realm.ArrayBuffer.isView(object)) {
3564
- clone = new Constructor(object.buffer.slice(0));
3565
- cache.set(object, clone);
3566
- return clone;
3567
- }
3568
- // arraybuffers
3569
- if (object instanceof realm.ArrayBuffer) {
3570
- clone = object.slice(0);
3571
- cache.set(object, clone);
3572
- return clone;
3573
- }
3574
- }
3575
- // if the object cannot / should not be cloned, don't
3576
- if (
3577
- // promise-like
3578
- typeof object.then === 'function' ||
3579
- // errors
3580
- object instanceof Error ||
3581
- // weakmaps
3582
- (realm.WeakMap && object instanceof realm.WeakMap) ||
3583
- // weaksets
3584
- (realm.WeakSet && object instanceof realm.WeakSet)) {
3585
- return object;
3586
- }
3587
- // assume anything left is a custom constructor
3588
- return getObjectClone(object, realm, handleCopy, cache);
3589
- };
3590
- return handleCopy(object, createCache());
3591
- }
3592
- // Adding reference to allow usage in CommonJS libraries compiled using TSC, which
3593
- // expects there to be a default property on the exported object. See
3594
- // [#37](https://github.com/planttheidea/fast-copy/issues/37) for details.
3595
- copy.default = copy;
3596
- /**
3597
- * @function strictCopy
3598
- *
3599
- * @description
3600
- * copy the object with `strict` option pre-applied
3601
- *
3602
- * @param object the object to copy
3603
- * @param [options] the options for copying with
3604
- * @param [options.realm] the realm (this) object the object is copied from
3605
- * @returns the copied object
3606
- */
3607
- copy.strict = function strictCopy(object, options) {
3608
- return copy(object, {
3609
- isStrict: true,
3610
- realm: options ? options.realm : void 0,
3611
- });
3612
- };
3431
+ // utils
3432
+ var isArray = Array.isArray;
3433
+ var getPrototypeOf = Object.getPrototypeOf;
3434
+ var GLOBAL_THIS = (function () {
3435
+ if (typeof globalThis !== 'undefined') {
3436
+ return globalThis;
3437
+ }
3438
+ if (typeof self !== 'undefined') {
3439
+ return self;
3440
+ }
3441
+ if (typeof window !== 'undefined') {
3442
+ return window;
3443
+ }
3444
+ if (typeof global !== 'undefined') {
3445
+ return global;
3446
+ }
3447
+ if (console && console.error) {
3448
+ console.error('Unable to locate global object, returning "this".');
3449
+ }
3450
+ return this;
3451
+ })();
3452
+ /**
3453
+ * @function copy
3454
+ *
3455
+ * @description
3456
+ * copy an value deeply as much as possible
3457
+ *
3458
+ * If `strict` is applied, then all properties (including non-enumerable ones)
3459
+ * are copied with their original property descriptors on both objects and arrays.
3460
+ *
3461
+ * The value is compared to the global constructors in the `realm` provided,
3462
+ * and the native constructor is always used to ensure that extensions of native
3463
+ * objects (allows in ES2015+) are maintained.
3464
+ *
3465
+ * @param value the value to copy
3466
+ * @param [options] the options for copying with
3467
+ * @param [options.isStrict] should the copy be strict
3468
+ * @param [options.realm] the realm (this) value the value is copied from
3469
+ * @returns the copied value
3470
+ */
3471
+ function copy(value, options) {
3472
+ // manually coalesced instead of default parameters for performance
3473
+ var isStrict = !!(options && options.isStrict);
3474
+ var realm = (options && options.realm) || GLOBAL_THIS;
3475
+ var getObjectClone = isStrict ? getObjectCloneStrict : getObjectCloneLoose;
3476
+ /**
3477
+ * @function handleCopy
3478
+ *
3479
+ * @description
3480
+ * copy the value recursively based on its type
3481
+ *
3482
+ * @param value the value to copy
3483
+ * @returns the copied value
3484
+ */
3485
+ var handleCopy = function (value, cache) {
3486
+ if (!value || typeof value !== 'object') {
3487
+ return value;
3488
+ }
3489
+ if (cache.has(value)) {
3490
+ return cache.get(value);
3491
+ }
3492
+ var prototype = value.__proto__ || getPrototypeOf(value);
3493
+ var Constructor = prototype && prototype.constructor;
3494
+ // plain objects
3495
+ if (!Constructor || Constructor === realm.Object) {
3496
+ return getObjectClone(value, realm, handleCopy, cache);
3497
+ }
3498
+ var clone;
3499
+ // arrays
3500
+ if (isArray(value)) {
3501
+ // if strict, include non-standard properties
3502
+ if (isStrict) {
3503
+ return getObjectCloneStrict(value, realm, handleCopy, cache);
3504
+ }
3505
+ clone = new Constructor();
3506
+ cache.set(value, clone);
3507
+ for (var index = 0, length_1 = value.length; index < length_1; ++index) {
3508
+ clone[index] = handleCopy(value[index], cache);
3509
+ }
3510
+ return clone;
3511
+ }
3512
+ // dates
3513
+ if (value instanceof realm.Date) {
3514
+ return new Constructor(value.getTime());
3515
+ }
3516
+ // regexps
3517
+ if (value instanceof realm.RegExp) {
3518
+ clone = new Constructor(value.source, value.flags || getRegExpFlags(value));
3519
+ clone.lastIndex = value.lastIndex;
3520
+ return clone;
3521
+ }
3522
+ // maps
3523
+ if (realm.Map && value instanceof realm.Map) {
3524
+ clone = new Constructor();
3525
+ cache.set(value, clone);
3526
+ value.forEach(function (value, key) {
3527
+ clone.set(key, handleCopy(value, cache));
3528
+ });
3529
+ return clone;
3530
+ }
3531
+ // sets
3532
+ if (realm.Set && value instanceof realm.Set) {
3533
+ clone = new Constructor();
3534
+ cache.set(value, clone);
3535
+ value.forEach(function (value) {
3536
+ clone.add(handleCopy(value, cache));
3537
+ });
3538
+ return clone;
3539
+ }
3540
+ // blobs
3541
+ if (realm.Blob && value instanceof realm.Blob) {
3542
+ return value.slice(0, value.size, value.type);
3543
+ }
3544
+ // buffers (node-only)
3545
+ if (realm.Buffer && realm.Buffer.isBuffer(value)) {
3546
+ clone = realm.Buffer.allocUnsafe
3547
+ ? realm.Buffer.allocUnsafe(value.length)
3548
+ : new Constructor(value.length);
3549
+ cache.set(value, clone);
3550
+ value.copy(clone);
3551
+ return clone;
3552
+ }
3553
+ // arraybuffers / dataviews
3554
+ if (realm.ArrayBuffer) {
3555
+ // dataviews
3556
+ if (realm.ArrayBuffer.isView(value)) {
3557
+ clone = new Constructor(value.buffer.slice(0));
3558
+ cache.set(value, clone);
3559
+ return clone;
3560
+ }
3561
+ // arraybuffers
3562
+ if (value instanceof realm.ArrayBuffer) {
3563
+ clone = value.slice(0);
3564
+ cache.set(value, clone);
3565
+ return clone;
3566
+ }
3567
+ }
3568
+ // if the value cannot / should not be cloned, don't
3569
+ if (
3570
+ // promise-like
3571
+ typeof value.then === 'function' ||
3572
+ // errors
3573
+ value instanceof Error ||
3574
+ // weakmaps
3575
+ (realm.WeakMap && value instanceof realm.WeakMap) ||
3576
+ // weaksets
3577
+ (realm.WeakSet && value instanceof realm.WeakSet)) {
3578
+ return value;
3579
+ }
3580
+ // assume anything left is a custom constructor
3581
+ return getObjectClone(value, realm, handleCopy, cache);
3582
+ };
3583
+ return handleCopy(value, createCache());
3584
+ }
3585
+ // Adding reference to allow usage in CommonJS libraries compiled using TSC, which
3586
+ // expects there to be a default property on the exported value. See
3587
+ // [#37](https://github.com/planttheidea/fast-copy/issues/37) for details.
3588
+ copy.default = copy;
3589
+ /**
3590
+ * @function strictCopy
3591
+ *
3592
+ * @description
3593
+ * copy the value with `strict` option pre-applied
3594
+ *
3595
+ * @param value the value to copy
3596
+ * @param [options] the options for copying with
3597
+ * @param [options.realm] the realm (this) value the value is copied from
3598
+ * @returns the copied value
3599
+ */
3600
+ copy.strict = function strictCopy(value, options) {
3601
+ return copy(value, {
3602
+ isStrict: true,
3603
+ realm: options ? options.realm : void 0,
3604
+ });
3605
+ };
3613
3606
 
3614
- return copy;
3607
+ return copy;
3615
3608
 
3616
- })));
3609
+ }));
3617
3610
  //# sourceMappingURL=fast-copy.js.map
3618
3611
 
3619
3612
  /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ "../node_modules/webpack/buildin/global.js")))
@@ -10174,7 +10167,7 @@ function createClient(params) {
10174
10167
  var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
10175
10168
  var sdkMain = opts.type === 'plain' ? 'contentful-management-plain.js' : 'contentful-management.js';
10176
10169
  var userAgent = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__["getUserAgentHeader"])( // @ts-expect-error
10177
- "".concat(sdkMain, "/").concat("9.0.0"), params.application, params.integration, params.feature);
10170
+ "".concat(sdkMain, "/").concat("9.1.2"), params.application, params.integration, params.feature);
10178
10171
  var adapter = Object(_create_adapter__WEBPACK_IMPORTED_MODULE_1__["createAdapter"])(params); // Parameters<?> and ReturnType<?> only return the types of the last overload
10179
10172
  // https://github.com/microsoft/TypeScript/issues/26591
10180
10173
  // @ts-expect-error