@twilio/conversations 3.0.0 → 3.0.1-rc.0
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/README.md +2 -2
- package/builds/browser.esm.js +11 -3
- package/builds/browser.esm.js.map +1 -1
- package/builds/browser.js +11 -3
- package/builds/browser.js.map +1 -1
- package/builds/lib.esm.js +11 -3
- package/builds/lib.js +11 -3
- package/builds/lib.js.map +1 -1
- package/builds/twilio-conversations.js +65 -1180
- package/builds/twilio-conversations.js.map +1 -1
- package/builds/twilio-conversations.min.js +1 -1
- package/builds/twilio-conversations.min.js.map +1 -1
- package/dist/command-executor.js +3 -2
- package/dist/command-executor.js.map +1 -1
- package/dist/packages/conversations/package.json.js +1 -1
- package/dist/utils/uuid.js +145 -0
- package/dist/utils/uuid.js.map +1 -0
- package/package.json +7 -8
- package/docs/assets/css/main.css +0 -2660
- package/docs/assets/images/icons.png +0 -0
- package/docs/assets/images/icons@2x.png +0 -0
- package/docs/assets/images/widgets.png +0 -0
- package/docs/assets/images/widgets@2x.png +0 -0
- package/docs/assets/js/main.js +0 -248
- package/docs/assets/js/search.js +0 -1
- package/docs/classes/AggregatedDeliveryReceipt.html +0 -3184
- package/docs/classes/CancellablePromise.html +0 -3213
- package/docs/classes/ChannelMetadata.html +0 -3050
- package/docs/classes/Client.html +0 -4310
- package/docs/classes/ContentTemplate.html +0 -3116
- package/docs/classes/ContentTemplateVariable.html +0 -3116
- package/docs/classes/Conversation.html +0 -4391
- package/docs/classes/DetailedDeliveryReceipt.html +0 -3163
- package/docs/classes/EmailRecipientDescriptor.html +0 -3098
- package/docs/classes/Media.html +0 -3167
- package/docs/classes/Message.html +0 -3826
- package/docs/classes/MessageBuilder.html +0 -3318
- package/docs/classes/Participant.html +0 -3444
- package/docs/classes/PushNotification.html +0 -3130
- package/docs/classes/RestPaginator.html +0 -3160
- package/docs/classes/UnknownRecipientDescriptor.html +0 -3067
- package/docs/classes/UnsentMessage.html +0 -3042
- package/docs/classes/User.html +0 -3349
- package/docs/index.html +0 -4373
- package/docs/interfaces/ClientOptions.html +0 -3066
- package/docs/interfaces/ConversationBindings.html +0 -3001
- package/docs/interfaces/ConversationEmailBinding.html +0 -3001
- package/docs/interfaces/ConversationLimits.html +0 -3098
- package/docs/interfaces/ConversationState.html +0 -3050
- package/docs/interfaces/ConversationUpdatedEventArgs.html +0 -3001
- package/docs/interfaces/CreateConversationOptions.html +0 -3083
- package/docs/interfaces/LastMessage.html +0 -3050
- package/docs/interfaces/Paginator.html +0 -3141
- package/docs/interfaces/ParticipantBindings.html +0 -3001
- package/docs/interfaces/ParticipantEmailBinding.html +0 -3001
- package/docs/interfaces/PushNotificationData.html +0 -3114
- package/docs/interfaces/SendEmailOptions.html +0 -3034
- package/docs/interfaces/SendMediaOptions.html +0 -3068
- package/docs/modules.html +0 -4374
|
@@ -274,20 +274,20 @@ this.Twilio.Conversations = (function (exports) {
|
|
|
274
274
|
var Deno = global$B.Deno;
|
|
275
275
|
var versions = process$3 && process$3.versions || Deno && Deno.version;
|
|
276
276
|
var v8 = versions && versions.v8;
|
|
277
|
-
var match, version$
|
|
277
|
+
var match, version$2;
|
|
278
278
|
|
|
279
279
|
if (v8) {
|
|
280
280
|
match = v8.split('.');
|
|
281
|
-
version$
|
|
281
|
+
version$2 = match[0] < 4 ? 1 : match[0] + match[1];
|
|
282
282
|
} else if (userAgent$5) {
|
|
283
283
|
match = userAgent$5.match(/Edge\/(\d+)/);
|
|
284
284
|
if (!match || match[1] >= 74) {
|
|
285
285
|
match = userAgent$5.match(/Chrome\/(\d+)/);
|
|
286
|
-
if (match) version$
|
|
286
|
+
if (match) version$2 = match[1];
|
|
287
287
|
}
|
|
288
288
|
}
|
|
289
289
|
|
|
290
|
-
var engineV8Version = version$
|
|
290
|
+
var engineV8Version = version$2 && +version$2;
|
|
291
291
|
|
|
292
292
|
/* eslint-disable es/no-symbol -- required for testing */
|
|
293
293
|
|
|
@@ -4425,7 +4425,7 @@ this.Twilio.Conversations = (function (exports) {
|
|
|
4425
4425
|
* @return {Object} - With a property for each part of the pattern
|
|
4426
4426
|
*/
|
|
4427
4427
|
|
|
4428
|
-
var parse
|
|
4428
|
+
var parse = parse_1 = lib.parse = function parse(durationString) {
|
|
4429
4429
|
// Slice away first entry in match-array
|
|
4430
4430
|
return durationString.match(pattern).slice(1).reduce(function (prev, next, idx) {
|
|
4431
4431
|
prev[objMap[idx]] = parseFloat(next) || 0;
|
|
@@ -4477,7 +4477,7 @@ this.Twilio.Conversations = (function (exports) {
|
|
|
4477
4477
|
end: end,
|
|
4478
4478
|
toSeconds: toSeconds,
|
|
4479
4479
|
pattern: pattern,
|
|
4480
|
-
parse: parse
|
|
4480
|
+
parse: parse
|
|
4481
4481
|
};
|
|
4482
4482
|
|
|
4483
4483
|
function ownKeys$6(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
@@ -10311,917 +10311,6 @@ this.Twilio.Conversations = (function (exports) {
|
|
|
10311
10311
|
});
|
|
10312
10312
|
})(stateMachine);
|
|
10313
10313
|
|
|
10314
|
-
var commonjsBrowser = {};
|
|
10315
|
-
|
|
10316
|
-
var v1$1 = {};
|
|
10317
|
-
|
|
10318
|
-
var rng$2 = {};
|
|
10319
|
-
|
|
10320
|
-
Object.defineProperty(rng$2, "__esModule", {
|
|
10321
|
-
value: true
|
|
10322
|
-
});
|
|
10323
|
-
|
|
10324
|
-
rng$2.default = rng$1; // Unique ID creation requires a high quality random # generator. In the browser we therefore
|
|
10325
|
-
// require the crypto API and do not support built-in fallback to lower quality random number
|
|
10326
|
-
// generators (like Math.random()).
|
|
10327
|
-
|
|
10328
|
-
|
|
10329
|
-
var getRandomValues$1;
|
|
10330
|
-
var rnds8$1 = new Uint8Array(16);
|
|
10331
|
-
|
|
10332
|
-
function rng$1() {
|
|
10333
|
-
// lazy load so that environments that need to polyfill have a chance to do so
|
|
10334
|
-
if (!getRandomValues$1) {
|
|
10335
|
-
// getRandomValues needs to be invoked in a context where "this" is a Crypto implementation.
|
|
10336
|
-
getRandomValues$1 = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
|
|
10337
|
-
|
|
10338
|
-
if (!getRandomValues$1) {
|
|
10339
|
-
throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
|
|
10340
|
-
}
|
|
10341
|
-
}
|
|
10342
|
-
|
|
10343
|
-
return getRandomValues$1(rnds8$1);
|
|
10344
|
-
}
|
|
10345
|
-
|
|
10346
|
-
var stringify$1 = {};
|
|
10347
|
-
|
|
10348
|
-
var validate$1 = {};
|
|
10349
|
-
|
|
10350
|
-
var regex = {};
|
|
10351
|
-
|
|
10352
|
-
Object.defineProperty(regex, "__esModule", {
|
|
10353
|
-
value: true
|
|
10354
|
-
});
|
|
10355
|
-
regex.default = void 0;
|
|
10356
|
-
var _default$c = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
|
|
10357
|
-
regex.default = _default$c;
|
|
10358
|
-
|
|
10359
|
-
Object.defineProperty(validate$1, "__esModule", {
|
|
10360
|
-
value: true
|
|
10361
|
-
});
|
|
10362
|
-
validate$1.default = void 0;
|
|
10363
|
-
|
|
10364
|
-
var _regex = _interopRequireDefault$8(regex);
|
|
10365
|
-
|
|
10366
|
-
function _interopRequireDefault$8(obj) {
|
|
10367
|
-
return obj && obj.__esModule ? obj : {
|
|
10368
|
-
default: obj
|
|
10369
|
-
};
|
|
10370
|
-
}
|
|
10371
|
-
|
|
10372
|
-
function validate(uuid) {
|
|
10373
|
-
return typeof uuid === 'string' && _regex.default.test(uuid);
|
|
10374
|
-
}
|
|
10375
|
-
|
|
10376
|
-
var _default$b = validate;
|
|
10377
|
-
validate$1.default = _default$b;
|
|
10378
|
-
|
|
10379
|
-
Object.defineProperty(stringify$1, "__esModule", {
|
|
10380
|
-
value: true
|
|
10381
|
-
});
|
|
10382
|
-
stringify$1.default = void 0;
|
|
10383
|
-
stringify$1.unsafeStringify = unsafeStringify$1;
|
|
10384
|
-
|
|
10385
|
-
var _validate$2 = _interopRequireDefault$7(validate$1);
|
|
10386
|
-
|
|
10387
|
-
function _interopRequireDefault$7(obj) {
|
|
10388
|
-
return obj && obj.__esModule ? obj : {
|
|
10389
|
-
default: obj
|
|
10390
|
-
};
|
|
10391
|
-
}
|
|
10392
|
-
/**
|
|
10393
|
-
* Convert array of 16 byte values to UUID string format of the form:
|
|
10394
|
-
* XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
|
|
10395
|
-
*/
|
|
10396
|
-
|
|
10397
|
-
|
|
10398
|
-
var byteToHex$1 = [];
|
|
10399
|
-
|
|
10400
|
-
for (var i$1 = 0; i$1 < 256; ++i$1) {
|
|
10401
|
-
byteToHex$1.push((i$1 + 0x100).toString(16).slice(1));
|
|
10402
|
-
}
|
|
10403
|
-
|
|
10404
|
-
function unsafeStringify$1(arr) {
|
|
10405
|
-
var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
10406
|
-
// Note: Be careful editing this code! It's been tuned for performance
|
|
10407
|
-
// and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
|
|
10408
|
-
return byteToHex$1[arr[offset + 0]] + byteToHex$1[arr[offset + 1]] + byteToHex$1[arr[offset + 2]] + byteToHex$1[arr[offset + 3]] + '-' + byteToHex$1[arr[offset + 4]] + byteToHex$1[arr[offset + 5]] + '-' + byteToHex$1[arr[offset + 6]] + byteToHex$1[arr[offset + 7]] + '-' + byteToHex$1[arr[offset + 8]] + byteToHex$1[arr[offset + 9]] + '-' + byteToHex$1[arr[offset + 10]] + byteToHex$1[arr[offset + 11]] + byteToHex$1[arr[offset + 12]] + byteToHex$1[arr[offset + 13]] + byteToHex$1[arr[offset + 14]] + byteToHex$1[arr[offset + 15]];
|
|
10409
|
-
}
|
|
10410
|
-
|
|
10411
|
-
function stringify(arr) {
|
|
10412
|
-
var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
10413
|
-
var uuid = unsafeStringify$1(arr, offset); // Consistency check for valid UUID. If this throws, it's likely due to one
|
|
10414
|
-
// of the following:
|
|
10415
|
-
// - One or more input array values don't map to a hex octet (leading to
|
|
10416
|
-
// "undefined" in the uuid)
|
|
10417
|
-
// - Invalid input values for the RFC `version` or `variant` fields
|
|
10418
|
-
|
|
10419
|
-
if (!(0, _validate$2.default)(uuid)) {
|
|
10420
|
-
throw TypeError('Stringified UUID is invalid');
|
|
10421
|
-
}
|
|
10422
|
-
|
|
10423
|
-
return uuid;
|
|
10424
|
-
}
|
|
10425
|
-
|
|
10426
|
-
var _default$a = stringify;
|
|
10427
|
-
stringify$1.default = _default$a;
|
|
10428
|
-
|
|
10429
|
-
Object.defineProperty(v1$1, "__esModule", {
|
|
10430
|
-
value: true
|
|
10431
|
-
});
|
|
10432
|
-
v1$1.default = void 0;
|
|
10433
|
-
|
|
10434
|
-
var _rng$1 = _interopRequireDefault$6(rng$2);
|
|
10435
|
-
|
|
10436
|
-
var _stringify$2 = stringify$1;
|
|
10437
|
-
|
|
10438
|
-
function _interopRequireDefault$6(obj) {
|
|
10439
|
-
return obj && obj.__esModule ? obj : {
|
|
10440
|
-
default: obj
|
|
10441
|
-
};
|
|
10442
|
-
} // **`v1()` - Generate time-based UUID**
|
|
10443
|
-
//
|
|
10444
|
-
// Inspired by https://github.com/LiosK/UUID.js
|
|
10445
|
-
// and http://docs.python.org/library/uuid.html
|
|
10446
|
-
|
|
10447
|
-
|
|
10448
|
-
var _nodeId;
|
|
10449
|
-
|
|
10450
|
-
var _clockseq; // Previous uuid creation time
|
|
10451
|
-
|
|
10452
|
-
|
|
10453
|
-
var _lastMSecs = 0;
|
|
10454
|
-
var _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details
|
|
10455
|
-
|
|
10456
|
-
function v1(options, buf, offset) {
|
|
10457
|
-
var i = buf && offset || 0;
|
|
10458
|
-
var b = buf || new Array(16);
|
|
10459
|
-
options = options || {};
|
|
10460
|
-
var node = options.node || _nodeId;
|
|
10461
|
-
var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not
|
|
10462
|
-
// specified. We do this lazily to minimize issues related to insufficient
|
|
10463
|
-
// system entropy. See #189
|
|
10464
|
-
|
|
10465
|
-
if (node == null || clockseq == null) {
|
|
10466
|
-
var seedBytes = options.random || (options.rng || _rng$1.default)();
|
|
10467
|
-
|
|
10468
|
-
if (node == null) {
|
|
10469
|
-
// Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)
|
|
10470
|
-
node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];
|
|
10471
|
-
}
|
|
10472
|
-
|
|
10473
|
-
if (clockseq == null) {
|
|
10474
|
-
// Per 4.2.2, randomize (14 bit) clockseq
|
|
10475
|
-
clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;
|
|
10476
|
-
}
|
|
10477
|
-
} // UUID timestamps are 100 nano-second units since the Gregorian epoch,
|
|
10478
|
-
// (1582-10-15 00:00). JSNumbers aren't precise enough for this, so
|
|
10479
|
-
// time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'
|
|
10480
|
-
// (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.
|
|
10481
|
-
|
|
10482
|
-
|
|
10483
|
-
var msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock
|
|
10484
|
-
// cycle to simulate higher resolution clock
|
|
10485
|
-
|
|
10486
|
-
var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)
|
|
10487
|
-
|
|
10488
|
-
var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression
|
|
10489
|
-
|
|
10490
|
-
if (dt < 0 && options.clockseq === undefined) {
|
|
10491
|
-
clockseq = clockseq + 1 & 0x3fff;
|
|
10492
|
-
} // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new
|
|
10493
|
-
// time interval
|
|
10494
|
-
|
|
10495
|
-
|
|
10496
|
-
if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {
|
|
10497
|
-
nsecs = 0;
|
|
10498
|
-
} // Per 4.2.1.2 Throw error if too many uuids are requested
|
|
10499
|
-
|
|
10500
|
-
|
|
10501
|
-
if (nsecs >= 10000) {
|
|
10502
|
-
throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");
|
|
10503
|
-
}
|
|
10504
|
-
|
|
10505
|
-
_lastMSecs = msecs;
|
|
10506
|
-
_lastNSecs = nsecs;
|
|
10507
|
-
_clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch
|
|
10508
|
-
|
|
10509
|
-
msecs += 12219292800000; // `time_low`
|
|
10510
|
-
|
|
10511
|
-
var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;
|
|
10512
|
-
b[i++] = tl >>> 24 & 0xff;
|
|
10513
|
-
b[i++] = tl >>> 16 & 0xff;
|
|
10514
|
-
b[i++] = tl >>> 8 & 0xff;
|
|
10515
|
-
b[i++] = tl & 0xff; // `time_mid`
|
|
10516
|
-
|
|
10517
|
-
var tmh = msecs / 0x100000000 * 10000 & 0xfffffff;
|
|
10518
|
-
b[i++] = tmh >>> 8 & 0xff;
|
|
10519
|
-
b[i++] = tmh & 0xff; // `time_high_and_version`
|
|
10520
|
-
|
|
10521
|
-
b[i++] = tmh >>> 24 & 0xf | 0x10; // include version
|
|
10522
|
-
|
|
10523
|
-
b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)
|
|
10524
|
-
|
|
10525
|
-
b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`
|
|
10526
|
-
|
|
10527
|
-
b[i++] = clockseq & 0xff; // `node`
|
|
10528
|
-
|
|
10529
|
-
for (var n = 0; n < 6; ++n) {
|
|
10530
|
-
b[i + n] = node[n];
|
|
10531
|
-
}
|
|
10532
|
-
|
|
10533
|
-
return buf || (0, _stringify$2.unsafeStringify)(b);
|
|
10534
|
-
}
|
|
10535
|
-
|
|
10536
|
-
var _default$9 = v1;
|
|
10537
|
-
v1$1.default = _default$9;
|
|
10538
|
-
|
|
10539
|
-
var v3$1 = {};
|
|
10540
|
-
|
|
10541
|
-
var v35$1 = {};
|
|
10542
|
-
|
|
10543
|
-
var parse$1 = {};
|
|
10544
|
-
|
|
10545
|
-
Object.defineProperty(parse$1, "__esModule", {
|
|
10546
|
-
value: true
|
|
10547
|
-
});
|
|
10548
|
-
parse$1.default = void 0;
|
|
10549
|
-
|
|
10550
|
-
var _validate$1 = _interopRequireDefault$5(validate$1);
|
|
10551
|
-
|
|
10552
|
-
function _interopRequireDefault$5(obj) {
|
|
10553
|
-
return obj && obj.__esModule ? obj : {
|
|
10554
|
-
default: obj
|
|
10555
|
-
};
|
|
10556
|
-
}
|
|
10557
|
-
|
|
10558
|
-
function parse(uuid) {
|
|
10559
|
-
if (!(0, _validate$1.default)(uuid)) {
|
|
10560
|
-
throw TypeError('Invalid UUID');
|
|
10561
|
-
}
|
|
10562
|
-
|
|
10563
|
-
var v;
|
|
10564
|
-
var arr = new Uint8Array(16); // Parse ########-....-....-....-............
|
|
10565
|
-
|
|
10566
|
-
arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;
|
|
10567
|
-
arr[1] = v >>> 16 & 0xff;
|
|
10568
|
-
arr[2] = v >>> 8 & 0xff;
|
|
10569
|
-
arr[3] = v & 0xff; // Parse ........-####-....-....-............
|
|
10570
|
-
|
|
10571
|
-
arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;
|
|
10572
|
-
arr[5] = v & 0xff; // Parse ........-....-####-....-............
|
|
10573
|
-
|
|
10574
|
-
arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;
|
|
10575
|
-
arr[7] = v & 0xff; // Parse ........-....-....-####-............
|
|
10576
|
-
|
|
10577
|
-
arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;
|
|
10578
|
-
arr[9] = v & 0xff; // Parse ........-....-....-....-############
|
|
10579
|
-
// (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes)
|
|
10580
|
-
|
|
10581
|
-
arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;
|
|
10582
|
-
arr[11] = v / 0x100000000 & 0xff;
|
|
10583
|
-
arr[12] = v >>> 24 & 0xff;
|
|
10584
|
-
arr[13] = v >>> 16 & 0xff;
|
|
10585
|
-
arr[14] = v >>> 8 & 0xff;
|
|
10586
|
-
arr[15] = v & 0xff;
|
|
10587
|
-
return arr;
|
|
10588
|
-
}
|
|
10589
|
-
|
|
10590
|
-
var _default$8 = parse;
|
|
10591
|
-
parse$1.default = _default$8;
|
|
10592
|
-
|
|
10593
|
-
Object.defineProperty(v35$1, "__esModule", {
|
|
10594
|
-
value: true
|
|
10595
|
-
});
|
|
10596
|
-
v35$1.URL = v35$1.DNS = void 0;
|
|
10597
|
-
|
|
10598
|
-
v35$1.default = v35;
|
|
10599
|
-
|
|
10600
|
-
var _stringify$1 = stringify$1;
|
|
10601
|
-
|
|
10602
|
-
var _parse = _interopRequireDefault$4(parse$1);
|
|
10603
|
-
|
|
10604
|
-
function _interopRequireDefault$4(obj) {
|
|
10605
|
-
return obj && obj.__esModule ? obj : {
|
|
10606
|
-
default: obj
|
|
10607
|
-
};
|
|
10608
|
-
}
|
|
10609
|
-
|
|
10610
|
-
function stringToBytes(str) {
|
|
10611
|
-
str = unescape(encodeURIComponent(str)); // UTF8 escape
|
|
10612
|
-
|
|
10613
|
-
var bytes = [];
|
|
10614
|
-
|
|
10615
|
-
for (var i = 0; i < str.length; ++i) {
|
|
10616
|
-
bytes.push(str.charCodeAt(i));
|
|
10617
|
-
}
|
|
10618
|
-
|
|
10619
|
-
return bytes;
|
|
10620
|
-
}
|
|
10621
|
-
|
|
10622
|
-
var DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';
|
|
10623
|
-
v35$1.DNS = DNS;
|
|
10624
|
-
var URL$1 = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';
|
|
10625
|
-
v35$1.URL = URL$1;
|
|
10626
|
-
|
|
10627
|
-
function v35(name, version, hashfunc) {
|
|
10628
|
-
function generateUUID(value, namespace, buf, offset) {
|
|
10629
|
-
var _namespace;
|
|
10630
|
-
|
|
10631
|
-
if (typeof value === 'string') {
|
|
10632
|
-
value = stringToBytes(value);
|
|
10633
|
-
}
|
|
10634
|
-
|
|
10635
|
-
if (typeof namespace === 'string') {
|
|
10636
|
-
namespace = (0, _parse.default)(namespace);
|
|
10637
|
-
}
|
|
10638
|
-
|
|
10639
|
-
if (((_namespace = namespace) === null || _namespace === void 0 ? void 0 : _namespace.length) !== 16) {
|
|
10640
|
-
throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');
|
|
10641
|
-
} // Compute hash of namespace and value, Per 4.3
|
|
10642
|
-
// Future: Use spread syntax when supported on all platforms, e.g. `bytes =
|
|
10643
|
-
// hashfunc([...namespace, ... value])`
|
|
10644
|
-
|
|
10645
|
-
|
|
10646
|
-
var bytes = new Uint8Array(16 + value.length);
|
|
10647
|
-
bytes.set(namespace);
|
|
10648
|
-
bytes.set(value, namespace.length);
|
|
10649
|
-
bytes = hashfunc(bytes);
|
|
10650
|
-
bytes[6] = bytes[6] & 0x0f | version;
|
|
10651
|
-
bytes[8] = bytes[8] & 0x3f | 0x80;
|
|
10652
|
-
|
|
10653
|
-
if (buf) {
|
|
10654
|
-
offset = offset || 0;
|
|
10655
|
-
|
|
10656
|
-
for (var i = 0; i < 16; ++i) {
|
|
10657
|
-
buf[offset + i] = bytes[i];
|
|
10658
|
-
}
|
|
10659
|
-
|
|
10660
|
-
return buf;
|
|
10661
|
-
}
|
|
10662
|
-
|
|
10663
|
-
return (0, _stringify$1.unsafeStringify)(bytes);
|
|
10664
|
-
} // Function#name is not settable on some platforms (#270)
|
|
10665
|
-
|
|
10666
|
-
|
|
10667
|
-
try {
|
|
10668
|
-
generateUUID.name = name; // eslint-disable-next-line no-empty
|
|
10669
|
-
} catch (err) {} // For CommonJS default export support
|
|
10670
|
-
|
|
10671
|
-
|
|
10672
|
-
generateUUID.DNS = DNS;
|
|
10673
|
-
generateUUID.URL = URL$1;
|
|
10674
|
-
return generateUUID;
|
|
10675
|
-
}
|
|
10676
|
-
|
|
10677
|
-
var md5$1 = {};
|
|
10678
|
-
|
|
10679
|
-
Object.defineProperty(md5$1, "__esModule", {
|
|
10680
|
-
value: true
|
|
10681
|
-
});
|
|
10682
|
-
md5$1.default = void 0;
|
|
10683
|
-
/*
|
|
10684
|
-
* Browser-compatible JavaScript MD5
|
|
10685
|
-
*
|
|
10686
|
-
* Modification of JavaScript MD5
|
|
10687
|
-
* https://github.com/blueimp/JavaScript-MD5
|
|
10688
|
-
*
|
|
10689
|
-
* Copyright 2011, Sebastian Tschan
|
|
10690
|
-
* https://blueimp.net
|
|
10691
|
-
*
|
|
10692
|
-
* Licensed under the MIT license:
|
|
10693
|
-
* https://opensource.org/licenses/MIT
|
|
10694
|
-
*
|
|
10695
|
-
* Based on
|
|
10696
|
-
* A JavaScript implementation of the RSA Data Security, Inc. MD5 Message
|
|
10697
|
-
* Digest Algorithm, as defined in RFC 1321.
|
|
10698
|
-
* Version 2.2 Copyright (C) Paul Johnston 1999 - 2009
|
|
10699
|
-
* Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
|
|
10700
|
-
* Distributed under the BSD License
|
|
10701
|
-
* See http://pajhome.org.uk/crypt/md5 for more info.
|
|
10702
|
-
*/
|
|
10703
|
-
|
|
10704
|
-
function md5(bytes) {
|
|
10705
|
-
if (typeof bytes === 'string') {
|
|
10706
|
-
var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape
|
|
10707
|
-
|
|
10708
|
-
bytes = new Uint8Array(msg.length);
|
|
10709
|
-
|
|
10710
|
-
for (var i = 0; i < msg.length; ++i) {
|
|
10711
|
-
bytes[i] = msg.charCodeAt(i);
|
|
10712
|
-
}
|
|
10713
|
-
}
|
|
10714
|
-
|
|
10715
|
-
return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));
|
|
10716
|
-
}
|
|
10717
|
-
/*
|
|
10718
|
-
* Convert an array of little-endian words to an array of bytes
|
|
10719
|
-
*/
|
|
10720
|
-
|
|
10721
|
-
|
|
10722
|
-
function md5ToHexEncodedArray(input) {
|
|
10723
|
-
var output = [];
|
|
10724
|
-
var length32 = input.length * 32;
|
|
10725
|
-
var hexTab = '0123456789abcdef';
|
|
10726
|
-
|
|
10727
|
-
for (var i = 0; i < length32; i += 8) {
|
|
10728
|
-
var x = input[i >> 5] >>> i % 32 & 0xff;
|
|
10729
|
-
var hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16);
|
|
10730
|
-
output.push(hex);
|
|
10731
|
-
}
|
|
10732
|
-
|
|
10733
|
-
return output;
|
|
10734
|
-
}
|
|
10735
|
-
/**
|
|
10736
|
-
* Calculate output length with padding and bit length
|
|
10737
|
-
*/
|
|
10738
|
-
|
|
10739
|
-
|
|
10740
|
-
function getOutputLength(inputLength8) {
|
|
10741
|
-
return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;
|
|
10742
|
-
}
|
|
10743
|
-
/*
|
|
10744
|
-
* Calculate the MD5 of an array of little-endian words, and a bit length.
|
|
10745
|
-
*/
|
|
10746
|
-
|
|
10747
|
-
|
|
10748
|
-
function wordsToMd5(x, len) {
|
|
10749
|
-
/* append padding */
|
|
10750
|
-
x[len >> 5] |= 0x80 << len % 32;
|
|
10751
|
-
x[getOutputLength(len) - 1] = len;
|
|
10752
|
-
var a = 1732584193;
|
|
10753
|
-
var b = -271733879;
|
|
10754
|
-
var c = -1732584194;
|
|
10755
|
-
var d = 271733878;
|
|
10756
|
-
|
|
10757
|
-
for (var i = 0; i < x.length; i += 16) {
|
|
10758
|
-
var olda = a;
|
|
10759
|
-
var oldb = b;
|
|
10760
|
-
var oldc = c;
|
|
10761
|
-
var oldd = d;
|
|
10762
|
-
a = md5ff(a, b, c, d, x[i], 7, -680876936);
|
|
10763
|
-
d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);
|
|
10764
|
-
c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);
|
|
10765
|
-
b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);
|
|
10766
|
-
a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);
|
|
10767
|
-
d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);
|
|
10768
|
-
c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);
|
|
10769
|
-
b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);
|
|
10770
|
-
a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);
|
|
10771
|
-
d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);
|
|
10772
|
-
c = md5ff(c, d, a, b, x[i + 10], 17, -42063);
|
|
10773
|
-
b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);
|
|
10774
|
-
a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);
|
|
10775
|
-
d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);
|
|
10776
|
-
c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);
|
|
10777
|
-
b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);
|
|
10778
|
-
a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);
|
|
10779
|
-
d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);
|
|
10780
|
-
c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);
|
|
10781
|
-
b = md5gg(b, c, d, a, x[i], 20, -373897302);
|
|
10782
|
-
a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);
|
|
10783
|
-
d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);
|
|
10784
|
-
c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);
|
|
10785
|
-
b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);
|
|
10786
|
-
a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);
|
|
10787
|
-
d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);
|
|
10788
|
-
c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);
|
|
10789
|
-
b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);
|
|
10790
|
-
a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);
|
|
10791
|
-
d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);
|
|
10792
|
-
c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);
|
|
10793
|
-
b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);
|
|
10794
|
-
a = md5hh(a, b, c, d, x[i + 5], 4, -378558);
|
|
10795
|
-
d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);
|
|
10796
|
-
c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);
|
|
10797
|
-
b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);
|
|
10798
|
-
a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);
|
|
10799
|
-
d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);
|
|
10800
|
-
c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);
|
|
10801
|
-
b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);
|
|
10802
|
-
a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);
|
|
10803
|
-
d = md5hh(d, a, b, c, x[i], 11, -358537222);
|
|
10804
|
-
c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);
|
|
10805
|
-
b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);
|
|
10806
|
-
a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);
|
|
10807
|
-
d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);
|
|
10808
|
-
c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);
|
|
10809
|
-
b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);
|
|
10810
|
-
a = md5ii(a, b, c, d, x[i], 6, -198630844);
|
|
10811
|
-
d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);
|
|
10812
|
-
c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);
|
|
10813
|
-
b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);
|
|
10814
|
-
a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);
|
|
10815
|
-
d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);
|
|
10816
|
-
c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);
|
|
10817
|
-
b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);
|
|
10818
|
-
a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);
|
|
10819
|
-
d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);
|
|
10820
|
-
c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);
|
|
10821
|
-
b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);
|
|
10822
|
-
a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);
|
|
10823
|
-
d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);
|
|
10824
|
-
c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);
|
|
10825
|
-
b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);
|
|
10826
|
-
a = safeAdd(a, olda);
|
|
10827
|
-
b = safeAdd(b, oldb);
|
|
10828
|
-
c = safeAdd(c, oldc);
|
|
10829
|
-
d = safeAdd(d, oldd);
|
|
10830
|
-
}
|
|
10831
|
-
|
|
10832
|
-
return [a, b, c, d];
|
|
10833
|
-
}
|
|
10834
|
-
/*
|
|
10835
|
-
* Convert an array bytes to an array of little-endian words
|
|
10836
|
-
* Characters >255 have their high-byte silently ignored.
|
|
10837
|
-
*/
|
|
10838
|
-
|
|
10839
|
-
|
|
10840
|
-
function bytesToWords(input) {
|
|
10841
|
-
if (input.length === 0) {
|
|
10842
|
-
return [];
|
|
10843
|
-
}
|
|
10844
|
-
|
|
10845
|
-
var length8 = input.length * 8;
|
|
10846
|
-
var output = new Uint32Array(getOutputLength(length8));
|
|
10847
|
-
|
|
10848
|
-
for (var i = 0; i < length8; i += 8) {
|
|
10849
|
-
output[i >> 5] |= (input[i / 8] & 0xff) << i % 32;
|
|
10850
|
-
}
|
|
10851
|
-
|
|
10852
|
-
return output;
|
|
10853
|
-
}
|
|
10854
|
-
/*
|
|
10855
|
-
* Add integers, wrapping at 2^32. This uses 16-bit operations internally
|
|
10856
|
-
* to work around bugs in some JS interpreters.
|
|
10857
|
-
*/
|
|
10858
|
-
|
|
10859
|
-
|
|
10860
|
-
function safeAdd(x, y) {
|
|
10861
|
-
var lsw = (x & 0xffff) + (y & 0xffff);
|
|
10862
|
-
var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
|
|
10863
|
-
return msw << 16 | lsw & 0xffff;
|
|
10864
|
-
}
|
|
10865
|
-
/*
|
|
10866
|
-
* Bitwise rotate a 32-bit number to the left.
|
|
10867
|
-
*/
|
|
10868
|
-
|
|
10869
|
-
|
|
10870
|
-
function bitRotateLeft(num, cnt) {
|
|
10871
|
-
return num << cnt | num >>> 32 - cnt;
|
|
10872
|
-
}
|
|
10873
|
-
/*
|
|
10874
|
-
* These functions implement the four basic operations the algorithm uses.
|
|
10875
|
-
*/
|
|
10876
|
-
|
|
10877
|
-
|
|
10878
|
-
function md5cmn(q, a, b, x, s, t) {
|
|
10879
|
-
return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);
|
|
10880
|
-
}
|
|
10881
|
-
|
|
10882
|
-
function md5ff(a, b, c, d, x, s, t) {
|
|
10883
|
-
return md5cmn(b & c | ~b & d, a, b, x, s, t);
|
|
10884
|
-
}
|
|
10885
|
-
|
|
10886
|
-
function md5gg(a, b, c, d, x, s, t) {
|
|
10887
|
-
return md5cmn(b & d | c & ~d, a, b, x, s, t);
|
|
10888
|
-
}
|
|
10889
|
-
|
|
10890
|
-
function md5hh(a, b, c, d, x, s, t) {
|
|
10891
|
-
return md5cmn(b ^ c ^ d, a, b, x, s, t);
|
|
10892
|
-
}
|
|
10893
|
-
|
|
10894
|
-
function md5ii(a, b, c, d, x, s, t) {
|
|
10895
|
-
return md5cmn(c ^ (b | ~d), a, b, x, s, t);
|
|
10896
|
-
}
|
|
10897
|
-
|
|
10898
|
-
var _default$7 = md5;
|
|
10899
|
-
md5$1.default = _default$7;
|
|
10900
|
-
|
|
10901
|
-
Object.defineProperty(v3$1, "__esModule", {
|
|
10902
|
-
value: true
|
|
10903
|
-
});
|
|
10904
|
-
v3$1.default = void 0;
|
|
10905
|
-
|
|
10906
|
-
var _v$1 = _interopRequireDefault$3(v35$1);
|
|
10907
|
-
|
|
10908
|
-
var _md = _interopRequireDefault$3(md5$1);
|
|
10909
|
-
|
|
10910
|
-
function _interopRequireDefault$3(obj) {
|
|
10911
|
-
return obj && obj.__esModule ? obj : {
|
|
10912
|
-
default: obj
|
|
10913
|
-
};
|
|
10914
|
-
}
|
|
10915
|
-
|
|
10916
|
-
var v3 = (0, _v$1.default)('v3', 0x30, _md.default);
|
|
10917
|
-
var _default$6 = v3;
|
|
10918
|
-
v3$1.default = _default$6;
|
|
10919
|
-
|
|
10920
|
-
var v4$2 = {};
|
|
10921
|
-
|
|
10922
|
-
var native$1 = {};
|
|
10923
|
-
|
|
10924
|
-
Object.defineProperty(native$1, "__esModule", {
|
|
10925
|
-
value: true
|
|
10926
|
-
});
|
|
10927
|
-
native$1.default = void 0;
|
|
10928
|
-
var randomUUID$1 = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
|
10929
|
-
var _default$5 = {
|
|
10930
|
-
randomUUID: randomUUID$1
|
|
10931
|
-
};
|
|
10932
|
-
native$1.default = _default$5;
|
|
10933
|
-
|
|
10934
|
-
Object.defineProperty(v4$2, "__esModule", {
|
|
10935
|
-
value: true
|
|
10936
|
-
});
|
|
10937
|
-
v4$2.default = void 0;
|
|
10938
|
-
|
|
10939
|
-
var _native = _interopRequireDefault$2(native$1);
|
|
10940
|
-
|
|
10941
|
-
var _rng = _interopRequireDefault$2(rng$2);
|
|
10942
|
-
|
|
10943
|
-
var _stringify = stringify$1;
|
|
10944
|
-
|
|
10945
|
-
function _interopRequireDefault$2(obj) {
|
|
10946
|
-
return obj && obj.__esModule ? obj : {
|
|
10947
|
-
default: obj
|
|
10948
|
-
};
|
|
10949
|
-
}
|
|
10950
|
-
|
|
10951
|
-
function v4$1(options, buf, offset) {
|
|
10952
|
-
if (_native.default.randomUUID && !buf && !options) {
|
|
10953
|
-
return _native.default.randomUUID();
|
|
10954
|
-
}
|
|
10955
|
-
|
|
10956
|
-
options = options || {};
|
|
10957
|
-
|
|
10958
|
-
var rnds = options.random || (options.rng || _rng.default)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
|
|
10959
|
-
|
|
10960
|
-
|
|
10961
|
-
rnds[6] = rnds[6] & 0x0f | 0x40;
|
|
10962
|
-
rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
|
|
10963
|
-
|
|
10964
|
-
if (buf) {
|
|
10965
|
-
offset = offset || 0;
|
|
10966
|
-
|
|
10967
|
-
for (var i = 0; i < 16; ++i) {
|
|
10968
|
-
buf[offset + i] = rnds[i];
|
|
10969
|
-
}
|
|
10970
|
-
|
|
10971
|
-
return buf;
|
|
10972
|
-
}
|
|
10973
|
-
|
|
10974
|
-
return (0, _stringify.unsafeStringify)(rnds);
|
|
10975
|
-
}
|
|
10976
|
-
|
|
10977
|
-
var _default$4 = v4$1;
|
|
10978
|
-
v4$2.default = _default$4;
|
|
10979
|
-
|
|
10980
|
-
var v5$1 = {};
|
|
10981
|
-
|
|
10982
|
-
var sha1$1 = {};
|
|
10983
|
-
|
|
10984
|
-
Object.defineProperty(sha1$1, "__esModule", {
|
|
10985
|
-
value: true
|
|
10986
|
-
});
|
|
10987
|
-
sha1$1.default = void 0; // Adapted from Chris Veness' SHA1 code at
|
|
10988
|
-
// http://www.movable-type.co.uk/scripts/sha1.html
|
|
10989
|
-
|
|
10990
|
-
function f(s, x, y, z) {
|
|
10991
|
-
switch (s) {
|
|
10992
|
-
case 0:
|
|
10993
|
-
return x & y ^ ~x & z;
|
|
10994
|
-
|
|
10995
|
-
case 1:
|
|
10996
|
-
return x ^ y ^ z;
|
|
10997
|
-
|
|
10998
|
-
case 2:
|
|
10999
|
-
return x & y ^ x & z ^ y & z;
|
|
11000
|
-
|
|
11001
|
-
case 3:
|
|
11002
|
-
return x ^ y ^ z;
|
|
11003
|
-
}
|
|
11004
|
-
}
|
|
11005
|
-
|
|
11006
|
-
function ROTL(x, n) {
|
|
11007
|
-
return x << n | x >>> 32 - n;
|
|
11008
|
-
}
|
|
11009
|
-
|
|
11010
|
-
function sha1(bytes) {
|
|
11011
|
-
var K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];
|
|
11012
|
-
var H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];
|
|
11013
|
-
|
|
11014
|
-
if (typeof bytes === 'string') {
|
|
11015
|
-
var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape
|
|
11016
|
-
|
|
11017
|
-
bytes = [];
|
|
11018
|
-
|
|
11019
|
-
for (var i = 0; i < msg.length; ++i) {
|
|
11020
|
-
bytes.push(msg.charCodeAt(i));
|
|
11021
|
-
}
|
|
11022
|
-
} else if (!Array.isArray(bytes)) {
|
|
11023
|
-
// Convert Array-like to Array
|
|
11024
|
-
bytes = Array.prototype.slice.call(bytes);
|
|
11025
|
-
}
|
|
11026
|
-
|
|
11027
|
-
bytes.push(0x80);
|
|
11028
|
-
var l = bytes.length / 4 + 2;
|
|
11029
|
-
var N = Math.ceil(l / 16);
|
|
11030
|
-
var M = new Array(N);
|
|
11031
|
-
|
|
11032
|
-
for (var _i = 0; _i < N; ++_i) {
|
|
11033
|
-
var arr = new Uint32Array(16);
|
|
11034
|
-
|
|
11035
|
-
for (var j = 0; j < 16; ++j) {
|
|
11036
|
-
arr[j] = bytes[_i * 64 + j * 4] << 24 | bytes[_i * 64 + j * 4 + 1] << 16 | bytes[_i * 64 + j * 4 + 2] << 8 | bytes[_i * 64 + j * 4 + 3];
|
|
11037
|
-
}
|
|
11038
|
-
|
|
11039
|
-
M[_i] = arr;
|
|
11040
|
-
}
|
|
11041
|
-
|
|
11042
|
-
M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);
|
|
11043
|
-
M[N - 1][14] = Math.floor(M[N - 1][14]);
|
|
11044
|
-
M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff;
|
|
11045
|
-
|
|
11046
|
-
for (var _i2 = 0; _i2 < N; ++_i2) {
|
|
11047
|
-
var W = new Uint32Array(80);
|
|
11048
|
-
|
|
11049
|
-
for (var t = 0; t < 16; ++t) {
|
|
11050
|
-
W[t] = M[_i2][t];
|
|
11051
|
-
}
|
|
11052
|
-
|
|
11053
|
-
for (var _t = 16; _t < 80; ++_t) {
|
|
11054
|
-
W[_t] = ROTL(W[_t - 3] ^ W[_t - 8] ^ W[_t - 14] ^ W[_t - 16], 1);
|
|
11055
|
-
}
|
|
11056
|
-
|
|
11057
|
-
var a = H[0];
|
|
11058
|
-
var b = H[1];
|
|
11059
|
-
var c = H[2];
|
|
11060
|
-
var d = H[3];
|
|
11061
|
-
var e = H[4];
|
|
11062
|
-
|
|
11063
|
-
for (var _t2 = 0; _t2 < 80; ++_t2) {
|
|
11064
|
-
var s = Math.floor(_t2 / 20);
|
|
11065
|
-
var T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[_t2] >>> 0;
|
|
11066
|
-
e = d;
|
|
11067
|
-
d = c;
|
|
11068
|
-
c = ROTL(b, 30) >>> 0;
|
|
11069
|
-
b = a;
|
|
11070
|
-
a = T;
|
|
11071
|
-
}
|
|
11072
|
-
|
|
11073
|
-
H[0] = H[0] + a >>> 0;
|
|
11074
|
-
H[1] = H[1] + b >>> 0;
|
|
11075
|
-
H[2] = H[2] + c >>> 0;
|
|
11076
|
-
H[3] = H[3] + d >>> 0;
|
|
11077
|
-
H[4] = H[4] + e >>> 0;
|
|
11078
|
-
}
|
|
11079
|
-
|
|
11080
|
-
return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff];
|
|
11081
|
-
}
|
|
11082
|
-
|
|
11083
|
-
var _default$3 = sha1;
|
|
11084
|
-
sha1$1.default = _default$3;
|
|
11085
|
-
|
|
11086
|
-
Object.defineProperty(v5$1, "__esModule", {
|
|
11087
|
-
value: true
|
|
11088
|
-
});
|
|
11089
|
-
v5$1.default = void 0;
|
|
11090
|
-
|
|
11091
|
-
var _v = _interopRequireDefault$1(v35$1);
|
|
11092
|
-
|
|
11093
|
-
var _sha = _interopRequireDefault$1(sha1$1);
|
|
11094
|
-
|
|
11095
|
-
function _interopRequireDefault$1(obj) {
|
|
11096
|
-
return obj && obj.__esModule ? obj : {
|
|
11097
|
-
default: obj
|
|
11098
|
-
};
|
|
11099
|
-
}
|
|
11100
|
-
|
|
11101
|
-
var v5 = (0, _v.default)('v5', 0x50, _sha.default);
|
|
11102
|
-
var _default$2 = v5;
|
|
11103
|
-
v5$1.default = _default$2;
|
|
11104
|
-
|
|
11105
|
-
var nil = {};
|
|
11106
|
-
|
|
11107
|
-
Object.defineProperty(nil, "__esModule", {
|
|
11108
|
-
value: true
|
|
11109
|
-
});
|
|
11110
|
-
nil.default = void 0;
|
|
11111
|
-
var _default$1 = '00000000-0000-0000-0000-000000000000';
|
|
11112
|
-
nil.default = _default$1;
|
|
11113
|
-
|
|
11114
|
-
var version$3 = {};
|
|
11115
|
-
|
|
11116
|
-
Object.defineProperty(version$3, "__esModule", {
|
|
11117
|
-
value: true
|
|
11118
|
-
});
|
|
11119
|
-
version$3.default = void 0;
|
|
11120
|
-
|
|
11121
|
-
var _validate = _interopRequireDefault(validate$1);
|
|
11122
|
-
|
|
11123
|
-
function _interopRequireDefault(obj) {
|
|
11124
|
-
return obj && obj.__esModule ? obj : {
|
|
11125
|
-
default: obj
|
|
11126
|
-
};
|
|
11127
|
-
}
|
|
11128
|
-
|
|
11129
|
-
function version$2(uuid) {
|
|
11130
|
-
if (!(0, _validate.default)(uuid)) {
|
|
11131
|
-
throw TypeError('Invalid UUID');
|
|
11132
|
-
}
|
|
11133
|
-
|
|
11134
|
-
return parseInt(uuid.slice(14, 15), 16);
|
|
11135
|
-
}
|
|
11136
|
-
|
|
11137
|
-
var _default = version$2;
|
|
11138
|
-
version$3.default = _default;
|
|
11139
|
-
|
|
11140
|
-
(function (exports) {
|
|
11141
|
-
|
|
11142
|
-
Object.defineProperty(exports, "__esModule", {
|
|
11143
|
-
value: true
|
|
11144
|
-
});
|
|
11145
|
-
Object.defineProperty(exports, "NIL", {
|
|
11146
|
-
enumerable: true,
|
|
11147
|
-
get: function get() {
|
|
11148
|
-
return _nil.default;
|
|
11149
|
-
}
|
|
11150
|
-
});
|
|
11151
|
-
Object.defineProperty(exports, "parse", {
|
|
11152
|
-
enumerable: true,
|
|
11153
|
-
get: function get() {
|
|
11154
|
-
return _parse.default;
|
|
11155
|
-
}
|
|
11156
|
-
});
|
|
11157
|
-
Object.defineProperty(exports, "stringify", {
|
|
11158
|
-
enumerable: true,
|
|
11159
|
-
get: function get() {
|
|
11160
|
-
return _stringify.default;
|
|
11161
|
-
}
|
|
11162
|
-
});
|
|
11163
|
-
Object.defineProperty(exports, "v1", {
|
|
11164
|
-
enumerable: true,
|
|
11165
|
-
get: function get() {
|
|
11166
|
-
return _v.default;
|
|
11167
|
-
}
|
|
11168
|
-
});
|
|
11169
|
-
Object.defineProperty(exports, "v3", {
|
|
11170
|
-
enumerable: true,
|
|
11171
|
-
get: function get() {
|
|
11172
|
-
return _v2.default;
|
|
11173
|
-
}
|
|
11174
|
-
});
|
|
11175
|
-
Object.defineProperty(exports, "v4", {
|
|
11176
|
-
enumerable: true,
|
|
11177
|
-
get: function get() {
|
|
11178
|
-
return _v3.default;
|
|
11179
|
-
}
|
|
11180
|
-
});
|
|
11181
|
-
Object.defineProperty(exports, "v5", {
|
|
11182
|
-
enumerable: true,
|
|
11183
|
-
get: function get() {
|
|
11184
|
-
return _v4.default;
|
|
11185
|
-
}
|
|
11186
|
-
});
|
|
11187
|
-
Object.defineProperty(exports, "validate", {
|
|
11188
|
-
enumerable: true,
|
|
11189
|
-
get: function get() {
|
|
11190
|
-
return _validate.default;
|
|
11191
|
-
}
|
|
11192
|
-
});
|
|
11193
|
-
Object.defineProperty(exports, "version", {
|
|
11194
|
-
enumerable: true,
|
|
11195
|
-
get: function get() {
|
|
11196
|
-
return _version.default;
|
|
11197
|
-
}
|
|
11198
|
-
});
|
|
11199
|
-
|
|
11200
|
-
var _v = _interopRequireDefault(v1$1);
|
|
11201
|
-
|
|
11202
|
-
var _v2 = _interopRequireDefault(v3$1);
|
|
11203
|
-
|
|
11204
|
-
var _v3 = _interopRequireDefault(v4$2);
|
|
11205
|
-
|
|
11206
|
-
var _v4 = _interopRequireDefault(v5$1);
|
|
11207
|
-
|
|
11208
|
-
var _nil = _interopRequireDefault(nil);
|
|
11209
|
-
|
|
11210
|
-
var _version = _interopRequireDefault(version$3);
|
|
11211
|
-
|
|
11212
|
-
var _validate = _interopRequireDefault(validate$1);
|
|
11213
|
-
|
|
11214
|
-
var _stringify = _interopRequireDefault(stringify$1);
|
|
11215
|
-
|
|
11216
|
-
var _parse = _interopRequireDefault(parse$1);
|
|
11217
|
-
|
|
11218
|
-
function _interopRequireDefault(obj) {
|
|
11219
|
-
return obj && obj.__esModule ? obj : {
|
|
11220
|
-
default: obj
|
|
11221
|
-
};
|
|
11222
|
-
}
|
|
11223
|
-
})(commonjsBrowser);
|
|
11224
|
-
|
|
11225
10314
|
var typedArrayConstructor = {exports: {}};
|
|
11226
10315
|
|
|
11227
10316
|
// eslint-disable-next-line es/no-typed-arrays -- safe
|
|
@@ -14348,7 +13437,6 @@ this.Twilio.Conversations = (function (exports) {
|
|
|
14348
13437
|
var declarativeTypeValidator = browser$7;
|
|
14349
13438
|
var loglevelLog = loglevel.exports;
|
|
14350
13439
|
var StateMachine = stateMachine.exports;
|
|
14351
|
-
var uuid = commonjsBrowser;
|
|
14352
13440
|
var _wrapNativeSuper = wrapNativeSuper.exports;
|
|
14353
13441
|
var operationRetrier = browser$5;
|
|
14354
13442
|
var replayEventEmitter = browser$6;
|
|
@@ -14551,7 +13639,7 @@ this.Twilio.Conversations = (function (exports) {
|
|
|
14551
13639
|
}();
|
|
14552
13640
|
|
|
14553
13641
|
var logInstance = new Logger("");
|
|
14554
|
-
var version = "1.0.0";
|
|
13642
|
+
var version = "1.0.2-rc.0";
|
|
14555
13643
|
/**
|
|
14556
13644
|
* Settings container for the Twilsock client library
|
|
14557
13645
|
*/
|
|
@@ -14609,11 +13697,22 @@ this.Twilio.Conversations = (function (exports) {
|
|
|
14609
13697
|
|
|
14610
13698
|
return Configuration;
|
|
14611
13699
|
}();
|
|
13700
|
+
/**
|
|
13701
|
+
* Generate a random UUID using the Web Crypto API.
|
|
13702
|
+
* Available in Node.js 14.17+, modern browsers, and React Native.
|
|
13703
|
+
*/
|
|
13704
|
+
|
|
13705
|
+
|
|
13706
|
+
var randomUUID = function randomUUID() {
|
|
13707
|
+
return crypto.randomUUID();
|
|
13708
|
+
};
|
|
13709
|
+
|
|
13710
|
+
var uuid$2 = randomUUID;
|
|
14612
13711
|
|
|
14613
13712
|
var AbstractMessage = /*#__PURE__*/_createClass__default["default"](function AbstractMessage(id) {
|
|
14614
13713
|
_classCallCheck__default["default"](this, AbstractMessage);
|
|
14615
13714
|
|
|
14616
|
-
this.id = id || "TM".concat(uuid
|
|
13715
|
+
this.id = id || "TM".concat(uuid$2());
|
|
14617
13716
|
});
|
|
14618
13717
|
|
|
14619
13718
|
function _createSuper$f(Derived) {
|
|
@@ -16294,6 +15393,7 @@ this.Twilio.Conversations = (function (exports) {
|
|
|
16294
15393
|
return Metadata;
|
|
16295
15394
|
}();
|
|
16296
15395
|
|
|
15396
|
+
var uuid$1 = randomUUID;
|
|
16297
15397
|
var REQUEST_TIMEOUT$1 = 30000;
|
|
16298
15398
|
|
|
16299
15399
|
function isHttpSuccess$1(code) {
|
|
@@ -16437,7 +15537,7 @@ this.Twilio.Conversations = (function (exports) {
|
|
|
16437
15537
|
}, {
|
|
16438
15538
|
key: "send",
|
|
16439
15539
|
value: function send(header, payload) {
|
|
16440
|
-
header.id = header.id || "TM".concat(uuid
|
|
15540
|
+
header.id = header.id || "TM".concat(uuid$1());
|
|
16441
15541
|
var message = Parser.createPacket(header, preparePayload(payload));
|
|
16442
15542
|
|
|
16443
15543
|
try {
|
|
@@ -16610,12 +15710,13 @@ this.Twilio.Conversations = (function (exports) {
|
|
|
16610
15710
|
return false;
|
|
16611
15711
|
}
|
|
16612
15712
|
}
|
|
15713
|
+
|
|
15714
|
+
var uuid = randomUUID;
|
|
16613
15715
|
/**
|
|
16614
15716
|
* Registrations module handles all operations with registration contexts through twilsock.
|
|
16615
15717
|
* Main role: it automatically refreshes all registrations after reconnect.
|
|
16616
15718
|
*/
|
|
16617
15719
|
|
|
16618
|
-
|
|
16619
15720
|
var Registrations = /*#__PURE__*/function (_ReplayEventEmitter) {
|
|
16620
15721
|
_inherits__default["default"](Registrations, _ReplayEventEmitter);
|
|
16621
15722
|
|
|
@@ -16710,7 +15811,7 @@ this.Twilio.Conversations = (function (exports) {
|
|
|
16710
15811
|
this.registrationsInProgress.set(contextId, registrationAttempts);
|
|
16711
15812
|
}
|
|
16712
15813
|
|
|
16713
|
-
attemptId = uuid
|
|
15814
|
+
attemptId = uuid();
|
|
16714
15815
|
registrationAttempts.add(attemptId);
|
|
16715
15816
|
_context3.prev = 5;
|
|
16716
15817
|
_context3.next = 8;
|
|
@@ -18395,7 +17496,6 @@ this.Twilio.Conversations = (function (exports) {
|
|
|
18395
17496
|
var _slicedToArray = slicedToArray.exports;
|
|
18396
17497
|
var _toConsumableArray = toConsumableArray.exports;
|
|
18397
17498
|
var logger = loglevel.exports;
|
|
18398
|
-
var uuid = commonjsBrowser;
|
|
18399
17499
|
var declarativeTypeValidator = browser$7;
|
|
18400
17500
|
|
|
18401
17501
|
function _interopDefaultLegacy(e) {
|
|
@@ -18452,8 +17552,6 @@ this.Twilio.Conversations = (function (exports) {
|
|
|
18452
17552
|
|
|
18453
17553
|
var logger__namespace = /*#__PURE__*/_interopNamespace(logger);
|
|
18454
17554
|
|
|
18455
|
-
var uuid__namespace = /*#__PURE__*/_interopNamespace(uuid);
|
|
18456
|
-
|
|
18457
17555
|
function __decorate(decorators, target, key, desc) {
|
|
18458
17556
|
var c = arguments.length,
|
|
18459
17557
|
r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
|
|
@@ -19518,6 +18616,15 @@ this.Twilio.Conversations = (function (exports) {
|
|
|
19518
18616
|
|
|
19519
18617
|
return RegistrarConnector;
|
|
19520
18618
|
}(Connector);
|
|
18619
|
+
/**
|
|
18620
|
+
* Generate a random UUID using the Web Crypto API.
|
|
18621
|
+
* Available in Node.js 14.17+, modern browsers, and React Native.
|
|
18622
|
+
*/
|
|
18623
|
+
|
|
18624
|
+
|
|
18625
|
+
var randomUUID = function randomUUID() {
|
|
18626
|
+
return crypto.randomUUID();
|
|
18627
|
+
};
|
|
19521
18628
|
|
|
19522
18629
|
function _createSuper$1(Derived) {
|
|
19523
18630
|
var hasNativeReflectConstruct = _isNativeReflectConstruct$1();
|
|
@@ -19574,7 +18681,7 @@ this.Twilio.Conversations = (function (exports) {
|
|
|
19574
18681
|
|
|
19575
18682
|
_this = _super.call(this, "twilsock");
|
|
19576
18683
|
|
|
19577
|
-
_defineProperty__default["default"](_assertThisInitialized__default["default"](_this), "contextId",
|
|
18684
|
+
_defineProperty__default["default"](_assertThisInitialized__default["default"](_this), "contextId", randomUUID());
|
|
19578
18685
|
|
|
19579
18686
|
_this.productId = productId;
|
|
19580
18687
|
_this.platform = platform;
|
|
@@ -20208,7 +19315,6 @@ this.Twilio.Conversations = (function (exports) {
|
|
|
20208
19315
|
var loglevelLog = loglevel.exports;
|
|
20209
19316
|
var _slicedToArray = slicedToArray.exports;
|
|
20210
19317
|
var operationRetrier = browser$5;
|
|
20211
|
-
var uuid = commonjsBrowser;
|
|
20212
19318
|
var _get = get$1.exports;
|
|
20213
19319
|
var replayEventEmitter = browser$6;
|
|
20214
19320
|
var _toConsumableArray = toConsumableArray.exports;
|
|
@@ -20268,8 +19374,6 @@ this.Twilio.Conversations = (function (exports) {
|
|
|
20268
19374
|
|
|
20269
19375
|
var _slicedToArray__default = /*#__PURE__*/_interopDefaultLegacy$2(_slicedToArray);
|
|
20270
19376
|
|
|
20271
|
-
var uuid__namespace = /*#__PURE__*/_interopNamespace$1(uuid);
|
|
20272
|
-
|
|
20273
19377
|
var _get__default = /*#__PURE__*/_interopDefaultLegacy$2(_get);
|
|
20274
19378
|
|
|
20275
19379
|
var _toConsumableArray__default = /*#__PURE__*/_interopDefaultLegacy$2(_toConsumableArray);
|
|
@@ -21419,7 +20523,19 @@ this.Twilio.Conversations = (function (exports) {
|
|
|
21419
20523
|
|
|
21420
20524
|
return Subscriptions;
|
|
21421
20525
|
}();
|
|
20526
|
+
/**
|
|
20527
|
+
* Generate a random UUID using the Web Crypto API.
|
|
20528
|
+
* Available in Node.js 14.17+, modern browsers, and React Native.
|
|
20529
|
+
*/
|
|
20530
|
+
|
|
21422
20531
|
|
|
20532
|
+
var randomUUID$1 = function randomUUID() {
|
|
20533
|
+
return crypto.randomUUID();
|
|
20534
|
+
};
|
|
20535
|
+
|
|
20536
|
+
var uuid = {
|
|
20537
|
+
v4: randomUUID$1
|
|
20538
|
+
};
|
|
21423
20539
|
var MINIMUM_RETRY_DELAY = 4000;
|
|
21424
20540
|
var MAXIMUM_RETRY_DELAY = 60000;
|
|
21425
20541
|
var MAXIMUM_ATTEMPTS_TIME = 90000;
|
|
@@ -21483,7 +20599,7 @@ this.Twilio.Conversations = (function (exports) {
|
|
|
21483
20599
|
return {
|
|
21484
20600
|
'Content-Type': 'application/json',
|
|
21485
20601
|
'Twilio-Sync-Client-Info': JSON.stringify(this.clientInfo),
|
|
21486
|
-
'Twilio-Request-Id': 'RQ' +
|
|
20602
|
+
'Twilio-Request-Id': 'RQ' + uuid.v4().replace(/-/g, '')
|
|
21487
20603
|
};
|
|
21488
20604
|
}
|
|
21489
20605
|
}, {
|
|
@@ -22130,7 +21246,7 @@ this.Twilio.Conversations = (function (exports) {
|
|
|
22130
21246
|
|
|
22131
21247
|
_this = _super.call(this);
|
|
22132
21248
|
_this.closed = false;
|
|
22133
|
-
_this.uuid =
|
|
21249
|
+
_this.uuid = randomUUID$1();
|
|
22134
21250
|
return _this;
|
|
22135
21251
|
}
|
|
22136
21252
|
|
|
@@ -24533,7 +23649,7 @@ this.Twilio.Conversations = (function (exports) {
|
|
|
24533
23649
|
break;
|
|
24534
23650
|
}
|
|
24535
23651
|
|
|
24536
|
-
_step2$value = _slicedToArray__default["default"](_step2.value, 2), v = _step2$value[1];
|
|
23652
|
+
_step2$value = _slicedToArray__default["default"](_step2.value, 2), _step2$value[0], v = _step2$value[1];
|
|
24537
23653
|
|
|
24538
23654
|
if (v.isValid) {
|
|
24539
23655
|
_context.next = 10;
|
|
@@ -24614,7 +23730,7 @@ this.Twilio.Conversations = (function (exports) {
|
|
|
24614
23730
|
break;
|
|
24615
23731
|
}
|
|
24616
23732
|
|
|
24617
|
-
_step3$value = _slicedToArray__default["default"](_step3.value, 2), v = _step3$value[1];
|
|
23733
|
+
_step3$value = _slicedToArray__default["default"](_step3.value, 2), _step3$value[0], v = _step3$value[1];
|
|
24618
23734
|
|
|
24619
23735
|
if (v.isValid) {
|
|
24620
23736
|
_context2.next = 10;
|
|
@@ -30047,7 +29163,7 @@ this.Twilio.Conversations = (function (exports) {
|
|
|
30047
29163
|
|
|
30048
29164
|
__decorate([declarativeTypeValidator.validateTypes(declarativeTypeValidator.nonEmptyString), __metadata("design:type", Function), __metadata("design:paramtypes", [String]), __metadata("design:returntype", void 0)], InstantQuery.prototype, "updateIndexName", null);
|
|
30049
29165
|
|
|
30050
|
-
var version$1 = "4.0.0";
|
|
29166
|
+
var version$1 = "4.0.1-rc.0";
|
|
30051
29167
|
|
|
30052
29168
|
function _createSuper$9(Derived) {
|
|
30053
29169
|
var hasNativeReflectConstruct = _isNativeReflectConstruct$a();
|
|
@@ -33227,189 +32343,15 @@ this.Twilio.Conversations = (function (exports) {
|
|
|
33227
32343
|
var _typeof__default = /*#__PURE__*/_interopDefaultLegacy(_typeof);
|
|
33228
32344
|
|
|
33229
32345
|
var log__namespace = /*#__PURE__*/_interopNamespace(log$2);
|
|
33230
|
-
|
|
33231
|
-
var rngBrowser = {
|
|
33232
|
-
exports: {}
|
|
33233
|
-
}; // browser this is a little complicated due to unknown quality of Math.random()
|
|
33234
|
-
// and inconsistent support for the `crypto` API. We do the best we can via
|
|
33235
|
-
// feature-detection
|
|
33236
|
-
// getRandomValues needs to be invoked in a context where "this" is a Crypto
|
|
33237
|
-
// implementation. Also, find the complete implementation of crypto on IE11.
|
|
33238
|
-
|
|
33239
|
-
var getRandomValues = typeof crypto != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto != 'undefined' && typeof window.msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto);
|
|
33240
|
-
|
|
33241
|
-
if (getRandomValues) {
|
|
33242
|
-
// WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto
|
|
33243
|
-
var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef
|
|
33244
|
-
|
|
33245
|
-
rngBrowser.exports = function whatwgRNG() {
|
|
33246
|
-
getRandomValues(rnds8);
|
|
33247
|
-
return rnds8;
|
|
33248
|
-
};
|
|
33249
|
-
} else {
|
|
33250
|
-
// Math.random()-based (RNG)
|
|
33251
|
-
//
|
|
33252
|
-
// If all else fails, use Math.random(). It's fast, but is of unspecified
|
|
33253
|
-
// quality.
|
|
33254
|
-
var rnds = new Array(16);
|
|
33255
|
-
|
|
33256
|
-
rngBrowser.exports = function mathRNG() {
|
|
33257
|
-
for (var i = 0, r; i < 16; i++) {
|
|
33258
|
-
if ((i & 0x03) === 0) r = Math.random() * 0x100000000;
|
|
33259
|
-
rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;
|
|
33260
|
-
}
|
|
33261
|
-
|
|
33262
|
-
return rnds;
|
|
33263
|
-
};
|
|
33264
|
-
}
|
|
33265
32346
|
/**
|
|
33266
|
-
*
|
|
33267
|
-
*
|
|
32347
|
+
* Generate a random UUID using the Web Crypto API.
|
|
32348
|
+
* Available in Node.js 14.17+, modern browsers, and React Native.
|
|
33268
32349
|
*/
|
|
33269
32350
|
|
|
33270
32351
|
|
|
33271
|
-
var
|
|
33272
|
-
|
|
33273
|
-
|
|
33274
|
-
byteToHex[i] = (i + 0x100).toString(16).substr(1);
|
|
33275
|
-
}
|
|
33276
|
-
|
|
33277
|
-
function bytesToUuid$2(buf, offset) {
|
|
33278
|
-
var i = offset || 0;
|
|
33279
|
-
var bth = byteToHex; // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4
|
|
33280
|
-
|
|
33281
|
-
return [bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]]].join('');
|
|
33282
|
-
}
|
|
33283
|
-
|
|
33284
|
-
var bytesToUuid_1 = bytesToUuid$2;
|
|
33285
|
-
var rng$1 = rngBrowser.exports;
|
|
33286
|
-
var bytesToUuid$1 = bytesToUuid_1; // **`v1()` - Generate time-based UUID**
|
|
33287
|
-
//
|
|
33288
|
-
// Inspired by https://github.com/LiosK/UUID.js
|
|
33289
|
-
// and http://docs.python.org/library/uuid.html
|
|
33290
|
-
|
|
33291
|
-
var _nodeId;
|
|
33292
|
-
|
|
33293
|
-
var _clockseq; // Previous uuid creation time
|
|
33294
|
-
|
|
33295
|
-
|
|
33296
|
-
var _lastMSecs = 0;
|
|
33297
|
-
var _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details
|
|
33298
|
-
|
|
33299
|
-
function v1$1(options, buf, offset) {
|
|
33300
|
-
var i = buf && offset || 0;
|
|
33301
|
-
var b = buf || [];
|
|
33302
|
-
options = options || {};
|
|
33303
|
-
var node = options.node || _nodeId;
|
|
33304
|
-
var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not
|
|
33305
|
-
// specified. We do this lazily to minimize issues related to insufficient
|
|
33306
|
-
// system entropy. See #189
|
|
33307
|
-
|
|
33308
|
-
if (node == null || clockseq == null) {
|
|
33309
|
-
var seedBytes = rng$1();
|
|
33310
|
-
|
|
33311
|
-
if (node == null) {
|
|
33312
|
-
// Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)
|
|
33313
|
-
node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];
|
|
33314
|
-
}
|
|
33315
|
-
|
|
33316
|
-
if (clockseq == null) {
|
|
33317
|
-
// Per 4.2.2, randomize (14 bit) clockseq
|
|
33318
|
-
clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;
|
|
33319
|
-
}
|
|
33320
|
-
} // UUID timestamps are 100 nano-second units since the Gregorian epoch,
|
|
33321
|
-
// (1582-10-15 00:00). JSNumbers aren't precise enough for this, so
|
|
33322
|
-
// time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'
|
|
33323
|
-
// (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.
|
|
33324
|
-
|
|
33325
|
-
|
|
33326
|
-
var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime(); // Per 4.2.1.2, use count of uuid's generated during the current clock
|
|
33327
|
-
// cycle to simulate higher resolution clock
|
|
33328
|
-
|
|
33329
|
-
var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)
|
|
33330
|
-
|
|
33331
|
-
var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression
|
|
33332
|
-
|
|
33333
|
-
if (dt < 0 && options.clockseq === undefined) {
|
|
33334
|
-
clockseq = clockseq + 1 & 0x3fff;
|
|
33335
|
-
} // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new
|
|
33336
|
-
// time interval
|
|
33337
|
-
|
|
33338
|
-
|
|
33339
|
-
if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {
|
|
33340
|
-
nsecs = 0;
|
|
33341
|
-
} // Per 4.2.1.2 Throw error if too many uuids are requested
|
|
33342
|
-
|
|
33343
|
-
|
|
33344
|
-
if (nsecs >= 10000) {
|
|
33345
|
-
throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec');
|
|
33346
|
-
}
|
|
33347
|
-
|
|
33348
|
-
_lastMSecs = msecs;
|
|
33349
|
-
_lastNSecs = nsecs;
|
|
33350
|
-
_clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch
|
|
33351
|
-
|
|
33352
|
-
msecs += 12219292800000; // `time_low`
|
|
33353
|
-
|
|
33354
|
-
var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;
|
|
33355
|
-
b[i++] = tl >>> 24 & 0xff;
|
|
33356
|
-
b[i++] = tl >>> 16 & 0xff;
|
|
33357
|
-
b[i++] = tl >>> 8 & 0xff;
|
|
33358
|
-
b[i++] = tl & 0xff; // `time_mid`
|
|
33359
|
-
|
|
33360
|
-
var tmh = msecs / 0x100000000 * 10000 & 0xfffffff;
|
|
33361
|
-
b[i++] = tmh >>> 8 & 0xff;
|
|
33362
|
-
b[i++] = tmh & 0xff; // `time_high_and_version`
|
|
33363
|
-
|
|
33364
|
-
b[i++] = tmh >>> 24 & 0xf | 0x10; // include version
|
|
33365
|
-
|
|
33366
|
-
b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)
|
|
33367
|
-
|
|
33368
|
-
b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`
|
|
33369
|
-
|
|
33370
|
-
b[i++] = clockseq & 0xff; // `node`
|
|
33371
|
-
|
|
33372
|
-
for (var n = 0; n < 6; ++n) {
|
|
33373
|
-
b[i + n] = node[n];
|
|
33374
|
-
}
|
|
33375
|
-
|
|
33376
|
-
return buf ? buf : bytesToUuid$1(b);
|
|
33377
|
-
}
|
|
33378
|
-
|
|
33379
|
-
var v1_1 = v1$1;
|
|
33380
|
-
var rng = rngBrowser.exports;
|
|
33381
|
-
var bytesToUuid = bytesToUuid_1;
|
|
33382
|
-
|
|
33383
|
-
function v4$1(options, buf, offset) {
|
|
33384
|
-
var i = buf && offset || 0;
|
|
33385
|
-
|
|
33386
|
-
if (typeof options == 'string') {
|
|
33387
|
-
buf = options === 'binary' ? new Array(16) : null;
|
|
33388
|
-
options = null;
|
|
33389
|
-
}
|
|
33390
|
-
|
|
33391
|
-
options = options || {};
|
|
33392
|
-
var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
|
|
33393
|
-
|
|
33394
|
-
rnds[6] = rnds[6] & 0x0f | 0x40;
|
|
33395
|
-
rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
|
|
33396
|
-
|
|
33397
|
-
if (buf) {
|
|
33398
|
-
for (var ii = 0; ii < 16; ++ii) {
|
|
33399
|
-
buf[i + ii] = rnds[ii];
|
|
33400
|
-
}
|
|
33401
|
-
}
|
|
33402
|
-
|
|
33403
|
-
return buf || bytesToUuid(rnds);
|
|
33404
|
-
}
|
|
33405
|
-
|
|
33406
|
-
var v4_1 = v4$1;
|
|
33407
|
-
var v1 = v1_1;
|
|
33408
|
-
var v4 = v4_1;
|
|
33409
|
-
var uuid = v4;
|
|
33410
|
-
uuid.v1 = v1;
|
|
33411
|
-
uuid.v4 = v4;
|
|
33412
|
-
var uuid_1 = uuid;
|
|
32352
|
+
var randomUUID = function randomUUID() {
|
|
32353
|
+
return crypto.randomUUID();
|
|
32354
|
+
};
|
|
33413
32355
|
|
|
33414
32356
|
function _createSuper$1(Derived) {
|
|
33415
32357
|
var hasNativeReflectConstruct = _isNativeReflectConstruct$1();
|
|
@@ -33485,7 +32427,7 @@ this.Twilio.Conversations = (function (exports) {
|
|
|
33485
32427
|
|
|
33486
32428
|
_classCallCheck__default["default"](this, CancellablePromise);
|
|
33487
32429
|
|
|
33488
|
-
var outerId =
|
|
32430
|
+
var outerId = randomUUID();
|
|
33489
32431
|
var outerRejectPromise;
|
|
33490
32432
|
_this = _super.call(this, function (resolve, reject) {
|
|
33491
32433
|
outerRejectPromise = reject;
|
|
@@ -34330,7 +33272,7 @@ this.Twilio.Conversations = (function (exports) {
|
|
|
34330
33272
|
return Network;
|
|
34331
33273
|
}();
|
|
34332
33274
|
|
|
34333
|
-
var version = "1.0.0";
|
|
33275
|
+
var version = "1.0.1-rc.0";
|
|
34334
33276
|
|
|
34335
33277
|
var _class;
|
|
34336
33278
|
|
|
@@ -41769,7 +40711,7 @@ this.Twilio.Conversations = (function (exports) {
|
|
|
41769
40711
|
this.data = data.data || {};
|
|
41770
40712
|
});
|
|
41771
40713
|
|
|
41772
|
-
var version = "3.0.0";
|
|
40714
|
+
var version = "3.0.1-rc.0";
|
|
41773
40715
|
|
|
41774
40716
|
function _isNativeFunction(fn) {
|
|
41775
40717
|
return Function.toString.call(fn).indexOf("[native code]") !== -1;
|
|
@@ -41839,72 +40781,14 @@ this.Twilio.Conversations = (function (exports) {
|
|
|
41839
40781
|
return _wrapNativeSuper(Class);
|
|
41840
40782
|
}
|
|
41841
40783
|
|
|
41842
|
-
// Unique ID creation requires a high quality random # generator. In the browser we therefore
|
|
41843
|
-
// require the crypto API and do not support built-in fallback to lower quality random number
|
|
41844
|
-
// generators (like Math.random()).
|
|
41845
|
-
var getRandomValues;
|
|
41846
|
-
var rnds8 = new Uint8Array(16);
|
|
41847
|
-
function rng() {
|
|
41848
|
-
// lazy load so that environments that need to polyfill have a chance to do so
|
|
41849
|
-
if (!getRandomValues) {
|
|
41850
|
-
// getRandomValues needs to be invoked in a context where "this" is a Crypto implementation.
|
|
41851
|
-
getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
|
|
41852
|
-
|
|
41853
|
-
if (!getRandomValues) {
|
|
41854
|
-
throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
|
|
41855
|
-
}
|
|
41856
|
-
}
|
|
41857
|
-
|
|
41858
|
-
return getRandomValues(rnds8);
|
|
41859
|
-
}
|
|
41860
|
-
|
|
41861
40784
|
/**
|
|
41862
|
-
*
|
|
41863
|
-
*
|
|
40785
|
+
* Generate a random UUID using the Web Crypto API.
|
|
40786
|
+
* Available in Node.js 14.17+, modern browsers, and React Native.
|
|
41864
40787
|
*/
|
|
41865
|
-
|
|
41866
|
-
|
|
41867
|
-
|
|
41868
|
-
for (var i = 0; i < 256; ++i) {
|
|
41869
|
-
byteToHex.push((i + 0x100).toString(16).slice(1));
|
|
41870
|
-
}
|
|
41871
|
-
|
|
41872
|
-
function unsafeStringify(arr) {
|
|
41873
|
-
var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
41874
|
-
// Note: Be careful editing this code! It's been tuned for performance
|
|
41875
|
-
// and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
|
|
41876
|
-
return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];
|
|
41877
|
-
}
|
|
41878
|
-
|
|
41879
|
-
var randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
|
41880
|
-
var native = {
|
|
41881
|
-
randomUUID: randomUUID
|
|
40788
|
+
var randomUUID = function randomUUID() {
|
|
40789
|
+
return crypto.randomUUID();
|
|
41882
40790
|
};
|
|
41883
40791
|
|
|
41884
|
-
function v4(options, buf, offset) {
|
|
41885
|
-
if (native.randomUUID && !buf && !options) {
|
|
41886
|
-
return native.randomUUID();
|
|
41887
|
-
}
|
|
41888
|
-
|
|
41889
|
-
options = options || {};
|
|
41890
|
-
var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
|
|
41891
|
-
|
|
41892
|
-
rnds[6] = rnds[6] & 0x0f | 0x40;
|
|
41893
|
-
rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
|
|
41894
|
-
|
|
41895
|
-
if (buf) {
|
|
41896
|
-
offset = offset || 0;
|
|
41897
|
-
|
|
41898
|
-
for (var i = 0; i < 16; ++i) {
|
|
41899
|
-
buf[offset + i] = rnds[i];
|
|
41900
|
-
}
|
|
41901
|
-
|
|
41902
|
-
return buf;
|
|
41903
|
-
}
|
|
41904
|
-
|
|
41905
|
-
return unsafeStringify(rnds);
|
|
41906
|
-
}
|
|
41907
|
-
|
|
41908
40792
|
function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
41909
40793
|
|
|
41910
40794
|
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$1(Object(source), !0).forEach(function (key) { _defineProperty$3(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
@@ -41912,6 +40796,7 @@ this.Twilio.Conversations = (function (exports) {
|
|
|
41912
40796
|
function _createSuper$1(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1(); return function _createSuperInternal() { var Super = _getPrototypeOf$4(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf$4(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn$4(this, result); }; }
|
|
41913
40797
|
|
|
41914
40798
|
function _isNativeReflectConstruct$1() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
40799
|
+
var uuidv4 = randomUUID;
|
|
41915
40800
|
|
|
41916
40801
|
var trimSlashes = function trimSlashes(url) {
|
|
41917
40802
|
return url.replace(/(^\/+|\/+$)/g, "");
|
|
@@ -42136,7 +41021,7 @@ this.Twilio.Conversations = (function (exports) {
|
|
|
42136
41021
|
case 0:
|
|
42137
41022
|
_context4.next = 2;
|
|
42138
41023
|
return this._makeRequest(method, url, requestBody, {
|
|
42139
|
-
"X-Twilio-Mutation-Id":
|
|
41024
|
+
"X-Twilio-Mutation-Id": uuidv4()
|
|
42140
41025
|
});
|
|
42141
41026
|
|
|
42142
41027
|
case 2:
|