@digipair/skill-keycloak 0.136.0 → 0.136.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js
CHANGED
|
@@ -6,7 +6,7 @@ import { JSDOM } from 'jsdom';
|
|
|
6
6
|
import { readFile } from 'fs/promises';
|
|
7
7
|
import require$$1$1 from 'path';
|
|
8
8
|
|
|
9
|
-
function _mergeNamespaces(n, m) {
|
|
9
|
+
function _mergeNamespaces$1(n, m) {
|
|
10
10
|
m.forEach(function(e) {
|
|
11
11
|
e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function(k) {
|
|
12
12
|
if (k !== 'default' && !(k in n)) {
|
|
@@ -26,7 +26,7 @@ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof win
|
|
|
26
26
|
function getDefaultExportFromCjs(x) {
|
|
27
27
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
28
28
|
}
|
|
29
|
-
var handlebars_min
|
|
29
|
+
var handlebars_min = {
|
|
30
30
|
exports: {}
|
|
31
31
|
};
|
|
32
32
|
/**!
|
|
@@ -54,7 +54,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
54
54
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
55
55
|
THE SOFTWARE.
|
|
56
56
|
|
|
57
|
-
*/ handlebars_min
|
|
57
|
+
*/ handlebars_min.exports;
|
|
58
58
|
(function(module1, exports1) {
|
|
59
59
|
function _instanceof(left, right) {
|
|
60
60
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
@@ -8135,12 +8135,12 @@ THE SOFTWARE.
|
|
|
8135
8135
|
}
|
|
8136
8136
|
]);
|
|
8137
8137
|
});
|
|
8138
|
-
})(handlebars_min
|
|
8139
|
-
var handlebars_minExports = handlebars_min
|
|
8140
|
-
var
|
|
8141
|
-
var HandlebarsNamespace = /*#__PURE__*/ _mergeNamespaces({
|
|
8138
|
+
})(handlebars_min, handlebars_min.exports);
|
|
8139
|
+
var handlebars_minExports = handlebars_min.exports;
|
|
8140
|
+
var handlebars_min_default = /*@__PURE__*/ getDefaultExportFromCjs(handlebars_minExports);
|
|
8141
|
+
var HandlebarsNamespace = /*#__PURE__*/ _mergeNamespaces$1({
|
|
8142
8142
|
__proto__: null,
|
|
8143
|
-
default:
|
|
8143
|
+
default: handlebars_min_default
|
|
8144
8144
|
}, [
|
|
8145
8145
|
handlebars_minExports
|
|
8146
8146
|
]);
|
|
@@ -9986,7 +9986,7 @@ var singleton = null;
|
|
|
9986
9986
|
else if (lowered === "local" || lowered === "system") return SystemZone.instance;
|
|
9987
9987
|
else if (lowered === "utc" || lowered === "gmt") return FixedOffsetZone.utcInstance;
|
|
9988
9988
|
else return FixedOffsetZone.parseSpecifier(lowered) || IANAZone.create(input);
|
|
9989
|
-
} else if (isNumber$1
|
|
9989
|
+
} else if (isNumber$1(input)) {
|
|
9990
9990
|
return FixedOffsetZone.instance(input);
|
|
9991
9991
|
} else if ((typeof input === "undefined" ? "undefined" : _type_of$C(input)) === "object" && "offset" in input && typeof input.offset === "function") {
|
|
9992
9992
|
// This is dumb, but the instanceof check above doesn't seem to really work
|
|
@@ -10464,7 +10464,7 @@ function ordinalToGregorian(ordinalData) {
|
|
|
10464
10464
|
}
|
|
10465
10465
|
function hasInvalidWeekData(obj) {
|
|
10466
10466
|
var minDaysInFirstWeek = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 4, startOfWeek = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 1;
|
|
10467
|
-
var validYear = isInteger
|
|
10467
|
+
var validYear = isInteger(obj.weekYear), validWeek = integerBetween(obj.weekNumber, 1, weeksInWeekYear(obj.weekYear, minDaysInFirstWeek, startOfWeek)), validWeekday = integerBetween(obj.weekday, 1, 7);
|
|
10468
10468
|
if (!validYear) {
|
|
10469
10469
|
return unitOutOfRange("weekYear", obj.weekYear);
|
|
10470
10470
|
} else if (!validWeek) {
|
|
@@ -10474,7 +10474,7 @@ function hasInvalidWeekData(obj) {
|
|
|
10474
10474
|
} else return false;
|
|
10475
10475
|
}
|
|
10476
10476
|
function hasInvalidOrdinalData(obj) {
|
|
10477
|
-
var validYear = isInteger
|
|
10477
|
+
var validYear = isInteger(obj.year), validOrdinal = integerBetween(obj.ordinal, 1, daysInYear(obj.year));
|
|
10478
10478
|
if (!validYear) {
|
|
10479
10479
|
return unitOutOfRange("year", obj.year);
|
|
10480
10480
|
} else if (!validOrdinal) {
|
|
@@ -10482,7 +10482,7 @@ function hasInvalidOrdinalData(obj) {
|
|
|
10482
10482
|
} else return false;
|
|
10483
10483
|
}
|
|
10484
10484
|
function hasInvalidGregorianData(obj) {
|
|
10485
|
-
var validYear = isInteger
|
|
10485
|
+
var validYear = isInteger(obj.year), validMonth = integerBetween(obj.month, 1, 12), validDay = integerBetween(obj.day, 1, daysInMonth(obj.year, obj.month));
|
|
10486
10486
|
if (!validYear) {
|
|
10487
10487
|
return unitOutOfRange("year", obj.year);
|
|
10488
10488
|
} else if (!validMonth) {
|
|
@@ -10514,10 +10514,10 @@ function hasInvalidTimeData(obj) {
|
|
|
10514
10514
|
function isUndefined$2(o) {
|
|
10515
10515
|
return typeof o === "undefined";
|
|
10516
10516
|
}
|
|
10517
|
-
function isNumber$1
|
|
10517
|
+
function isNumber$1(o) {
|
|
10518
10518
|
return typeof o === "number";
|
|
10519
10519
|
}
|
|
10520
|
-
function isInteger
|
|
10520
|
+
function isInteger(o) {
|
|
10521
10521
|
return typeof o === "number" && o % 1 === 0;
|
|
10522
10522
|
}
|
|
10523
10523
|
function isString$3(o) {
|
|
@@ -10594,7 +10594,7 @@ function validateWeekSettings(settings) {
|
|
|
10594
10594
|
}
|
|
10595
10595
|
// NUMBERS AND STRINGS
|
|
10596
10596
|
function integerBetween(thing, bottom, top) {
|
|
10597
|
-
return isInteger
|
|
10597
|
+
return isInteger(thing) && thing >= bottom && thing <= top;
|
|
10598
10598
|
}
|
|
10599
10599
|
// x % n but takes the sign of n instead of x
|
|
10600
10600
|
function floorMod(x, n) {
|
|
@@ -12517,7 +12517,7 @@ function removeZeroes(vals) {
|
|
|
12517
12517
|
accumulated[ak] = 0;
|
|
12518
12518
|
}
|
|
12519
12519
|
// plus anything that's already in this unit
|
|
12520
|
-
if (isNumber$1
|
|
12520
|
+
if (isNumber$1(vals[k])) {
|
|
12521
12521
|
own += vals[k];
|
|
12522
12522
|
}
|
|
12523
12523
|
// only keep the integer part for now in the hopes of putting any decimal part
|
|
@@ -12526,7 +12526,7 @@ function removeZeroes(vals) {
|
|
|
12526
12526
|
built[k] = i;
|
|
12527
12527
|
accumulated[k] = (own * 1000 - i * 1000) / 1000;
|
|
12528
12528
|
// otherwise, keep it in the wings to boil it later
|
|
12529
|
-
} else if (isNumber$1
|
|
12529
|
+
} else if (isNumber$1(vals[k])) {
|
|
12530
12530
|
accumulated[k] = vals[k];
|
|
12531
12531
|
}
|
|
12532
12532
|
}
|
|
@@ -12832,7 +12832,7 @@ function removeZeroes(vals) {
|
|
|
12832
12832
|
* - Duration instance
|
|
12833
12833
|
* @return {Duration}
|
|
12834
12834
|
*/ function fromDurationLike(durationLike) {
|
|
12835
|
-
if (isNumber$1
|
|
12835
|
+
if (isNumber$1(durationLike)) {
|
|
12836
12836
|
return Duration.fromMillis(durationLike);
|
|
12837
12837
|
} else if (Duration.isDuration(durationLike)) {
|
|
12838
12838
|
return durationLike;
|
|
@@ -15036,7 +15036,7 @@ function lastOpts(argList) {
|
|
|
15036
15036
|
} else {
|
|
15037
15037
|
// If an offset has been passed and we have not been called from
|
|
15038
15038
|
// clone(), we can trust it and avoid the offset calculation.
|
|
15039
|
-
var ot = isNumber$1
|
|
15039
|
+
var ot = isNumber$1(config.o) && !config.old ? config.o : zone.offset(this.ts);
|
|
15040
15040
|
c = tsToObj(this.ts, ot);
|
|
15041
15041
|
invalid = Number.isNaN(c.year) ? new Invalid("invalid input") : null;
|
|
15042
15042
|
c = invalid ? null : c;
|
|
@@ -16442,7 +16442,7 @@ function lastOpts(argList) {
|
|
|
16442
16442
|
* @return {DateTime}
|
|
16443
16443
|
*/ function fromMillis(milliseconds) {
|
|
16444
16444
|
var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
16445
|
-
if (!isNumber$1
|
|
16445
|
+
if (!isNumber$1(milliseconds)) {
|
|
16446
16446
|
throw new InvalidArgumentError("fromMillis requires a numerical input, but received a ".concat(typeof milliseconds === "undefined" ? "undefined" : _type_of$C(milliseconds), " with value ").concat(milliseconds));
|
|
16447
16447
|
} else if (milliseconds < -MAX_DATE || milliseconds > MAX_DATE) {
|
|
16448
16448
|
// this isn't perfect because we can still end up out of range because of additional shifting, but it's a start
|
|
@@ -16470,7 +16470,7 @@ function lastOpts(argList) {
|
|
|
16470
16470
|
* @return {DateTime}
|
|
16471
16471
|
*/ function fromSeconds(seconds) {
|
|
16472
16472
|
var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
16473
|
-
if (!isNumber$1
|
|
16473
|
+
if (!isNumber$1(seconds)) {
|
|
16474
16474
|
throw new InvalidArgumentError("fromSeconds requires a numerical input");
|
|
16475
16475
|
} else {
|
|
16476
16476
|
return new DateTime({
|
|
@@ -17135,7 +17135,7 @@ function lastOpts(argList) {
|
|
|
17135
17135
|
*/ function friendlyDateTime(dateTimeish) {
|
|
17136
17136
|
if (DateTime.isDateTime(dateTimeish)) {
|
|
17137
17137
|
return dateTimeish;
|
|
17138
|
-
} else if (dateTimeish && dateTimeish.valueOf && isNumber$1
|
|
17138
|
+
} else if (dateTimeish && dateTimeish.valueOf && isNumber$1(dateTimeish.valueOf())) {
|
|
17139
17139
|
return DateTime.fromJSDate(dateTimeish);
|
|
17140
17140
|
} else if (dateTimeish && (typeof dateTimeish === "undefined" ? "undefined" : _type_of$C(dateTimeish)) === "object") {
|
|
17141
17141
|
return DateTime.fromObject(dateTimeish);
|
|
@@ -17303,6 +17303,7 @@ class represent prop names.
|
|
|
17303
17303
|
this.deserialize = config.deserialize || function() {
|
|
17304
17304
|
throw new Error("This node type doesn't define a deserialize function");
|
|
17305
17305
|
};
|
|
17306
|
+
this.combine = config.combine || null;
|
|
17306
17307
|
}
|
|
17307
17308
|
_create_class$u(NodeProp, [
|
|
17308
17309
|
{
|
|
@@ -17415,10 +17416,16 @@ represented by another tree.
|
|
|
17415
17416
|
*/ overlay, /**
|
|
17416
17417
|
The parser used to create this subtree.
|
|
17417
17418
|
*/ parser) {
|
|
17419
|
+
var /**
|
|
17420
|
+
[Indicates](#common.IterMode.EnterBracketed) that the nested
|
|
17421
|
+
content is delineated with some kind
|
|
17422
|
+
of bracket token.
|
|
17423
|
+
*/ bracketed = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : false;
|
|
17418
17424
|
_class_call_check$z(this, MountedTree);
|
|
17419
17425
|
this.tree = tree;
|
|
17420
17426
|
this.overlay = overlay;
|
|
17421
17427
|
this.parser = parser;
|
|
17428
|
+
this.bracketed = bracketed;
|
|
17422
17429
|
}
|
|
17423
17430
|
_create_class$u(MountedTree, null, [
|
|
17424
17431
|
{
|
|
@@ -17634,7 +17641,9 @@ types in it, so that the ids fit into 16-bit typed array slots.
|
|
|
17634
17641
|
var add = source(type);
|
|
17635
17642
|
if (add) {
|
|
17636
17643
|
if (!newProps) newProps = Object.assign({}, type.props);
|
|
17637
|
-
|
|
17644
|
+
var value = add[1], prop = add[0];
|
|
17645
|
+
if (prop.combine && prop.id in newProps) value = prop.combine(newProps[prop.id], value);
|
|
17646
|
+
newProps[prop.id] = value;
|
|
17638
17647
|
}
|
|
17639
17648
|
}
|
|
17640
17649
|
} catch (err) {
|
|
@@ -17700,6 +17709,12 @@ operator to enable multiple ones.
|
|
|
17700
17709
|
library to not enter mounted overlays if one covers the given
|
|
17701
17710
|
position.
|
|
17702
17711
|
*/ IterMode[IterMode["IgnoreOverlays"] = 8] = "IgnoreOverlays";
|
|
17712
|
+
/**
|
|
17713
|
+
When set, positions on the boundary of a mounted overlay tree
|
|
17714
|
+
that has its [`bracketed`](#common.NestedParse.bracketed) flag
|
|
17715
|
+
set will enter that tree regardless of side. Only supported in
|
|
17716
|
+
[`enter`](#common.SyntaxNode.enter), not in cursors.
|
|
17717
|
+
*/ IterMode[IterMode["EnterBracketed"] = 16] = "EnterBracketed";
|
|
17703
17718
|
})(IterMode || (IterMode = {}));
|
|
17704
17719
|
/**
|
|
17705
17720
|
A piece of syntax tree. There are two ways to approach these
|
|
@@ -18258,17 +18273,17 @@ var TreeNode = /*#__PURE__*/ function(BaseNode) {
|
|
|
18258
18273
|
var mode = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : 0;
|
|
18259
18274
|
for(var parent = this;;){
|
|
18260
18275
|
for(var _parent__tree = parent._tree, children = _parent__tree.children, positions = _parent__tree.positions, e = dir > 0 ? children.length : -1; i != e; i += dir){
|
|
18261
|
-
var next = children[i], start = positions[i] + parent.from;
|
|
18262
|
-
if (!checkSide(side, pos, start, start + next.length)) continue;
|
|
18276
|
+
var next = children[i], start = positions[i] + parent.from, mounted = void 0;
|
|
18277
|
+
if (!(mode & IterMode.EnterBracketed && _instanceof$i(next, Tree) && (mounted = MountedTree.get(next)) && !mounted.overlay && mounted.bracketed && pos >= start && pos <= start + next.length) && !checkSide(side, pos, start, start + next.length)) continue;
|
|
18263
18278
|
if (_instanceof$i(next, TreeBuffer)) {
|
|
18264
18279
|
if (mode & IterMode.ExcludeBuffers) continue;
|
|
18265
18280
|
var index = next.findChild(0, next.buffer.length, dir, pos - start, side);
|
|
18266
18281
|
if (index > -1) return new BufferNode(new BufferContext(parent, next, i, start), null, index);
|
|
18267
18282
|
} else if (mode & IterMode.IncludeAnonymous || !next.type.isAnonymous || hasChild(next)) {
|
|
18268
|
-
var
|
|
18269
|
-
if (!(mode & IterMode.IgnoreMounts) && (
|
|
18283
|
+
var mounted1 = void 0;
|
|
18284
|
+
if (!(mode & IterMode.IgnoreMounts) && (mounted1 = MountedTree.get(next)) && !mounted1.overlay) return new TreeNode(mounted1.tree, start, i, parent);
|
|
18270
18285
|
var inner = new TreeNode(next, start, i, parent);
|
|
18271
|
-
return mode & IterMode.IncludeAnonymous || !inner.type.isAnonymous ? inner : inner.nextChild(dir < 0 ? next.children.length - 1 : 0, dir, pos, side);
|
|
18286
|
+
return mode & IterMode.IncludeAnonymous || !inner.type.isAnonymous ? inner : inner.nextChild(dir < 0 ? next.children.length - 1 : 0, dir, pos, side, mode);
|
|
18272
18287
|
}
|
|
18273
18288
|
}
|
|
18274
18289
|
if (mode & IterMode.IncludeAnonymous || !parent.type.isAnonymous) return null;
|
|
@@ -18303,18 +18318,24 @@ var TreeNode = /*#__PURE__*/ function(BaseNode) {
|
|
|
18303
18318
|
return this.nextChild(this._tree.children.length - 1, -1, pos, -2 /* Side.Before */ );
|
|
18304
18319
|
}
|
|
18305
18320
|
},
|
|
18321
|
+
{
|
|
18322
|
+
key: "prop",
|
|
18323
|
+
value: function prop(prop) {
|
|
18324
|
+
return this._tree.prop(prop);
|
|
18325
|
+
}
|
|
18326
|
+
},
|
|
18306
18327
|
{
|
|
18307
18328
|
key: "enter",
|
|
18308
18329
|
value: function enter(pos, side) {
|
|
18309
18330
|
var mode = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0;
|
|
18310
18331
|
var mounted;
|
|
18311
18332
|
if (!(mode & IterMode.IgnoreOverlays) && (mounted = MountedTree.get(this._tree)) && mounted.overlay) {
|
|
18312
|
-
var rPos = pos - this.from;
|
|
18333
|
+
var rPos = pos - this.from, enterBracketed = mode & IterMode.EnterBracketed && mounted.bracketed;
|
|
18313
18334
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
18314
18335
|
try {
|
|
18315
18336
|
for(var _iterator = mounted.overlay[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
18316
18337
|
var _step_value = _step.value, from = _step_value.from, to = _step_value.to;
|
|
18317
|
-
if ((side > 0 ? from <= rPos : from < rPos) && (side < 0 ? to >= rPos : to > rPos)) return new TreeNode(mounted.tree, mounted.overlay[0].from + this.from, -1, this);
|
|
18338
|
+
if ((side > 0 || enterBracketed ? from <= rPos : from < rPos) && (side < 0 || enterBracketed ? to >= rPos : to > rPos)) return new TreeNode(mounted.tree, mounted.overlay[0].from + this.from, -1, this);
|
|
18318
18339
|
}
|
|
18319
18340
|
} catch (err) {
|
|
18320
18341
|
_didIteratorError = true;
|
|
@@ -18478,6 +18499,12 @@ var BufferNode = /*#__PURE__*/ function(BaseNode) {
|
|
|
18478
18499
|
return this.child(-1, pos, -2 /* Side.Before */ );
|
|
18479
18500
|
}
|
|
18480
18501
|
},
|
|
18502
|
+
{
|
|
18503
|
+
key: "prop",
|
|
18504
|
+
value: function prop(prop) {
|
|
18505
|
+
return this.type.prop(prop);
|
|
18506
|
+
}
|
|
18507
|
+
},
|
|
18481
18508
|
{
|
|
18482
18509
|
key: "enter",
|
|
18483
18510
|
value: function enter(pos, side) {
|
|
@@ -18608,11 +18635,8 @@ A tree cursor object focuses on a given node in a syntax tree, and
|
|
|
18608
18635
|
allows you to move to adjacent nodes.
|
|
18609
18636
|
*/ var TreeCursor = /*#__PURE__*/ function() {
|
|
18610
18637
|
function TreeCursor(node) {
|
|
18611
|
-
var
|
|
18612
|
-
@internal
|
|
18613
|
-
*/ mode = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
|
|
18638
|
+
var mode = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
|
|
18614
18639
|
_class_call_check$z(this, TreeCursor);
|
|
18615
|
-
this.mode = mode;
|
|
18616
18640
|
/**
|
|
18617
18641
|
@internal
|
|
18618
18642
|
*/ this.buffer = null;
|
|
@@ -18621,6 +18645,7 @@ allows you to move to adjacent nodes.
|
|
|
18621
18645
|
@internal
|
|
18622
18646
|
*/ this.index = 0;
|
|
18623
18647
|
this.bufferNode = null;
|
|
18648
|
+
this.mode = mode & ~IterMode.EnterBracketed;
|
|
18624
18649
|
if (_instanceof$i(node, TreeNode)) {
|
|
18625
18650
|
this.yieldNode(node);
|
|
18626
18651
|
} else {
|
|
@@ -18964,7 +18989,7 @@ function buildTree(data) {
|
|
|
18964
18989
|
function takeNode(parentStart, minPos, children, positions, inRepeat, depth) {
|
|
18965
18990
|
var id = cursor.id, start = cursor.start, end = cursor.end, size = cursor.size;
|
|
18966
18991
|
var lookAheadAtStart = lookAhead, contextAtStart = contextHash;
|
|
18967
|
-
|
|
18992
|
+
if (size < 0) {
|
|
18968
18993
|
cursor.next();
|
|
18969
18994
|
if (size == -1 /* SpecialRecord.Reuse */ ) {
|
|
18970
18995
|
var node = reused[id];
|
|
@@ -19131,7 +19156,7 @@ function buildTree(data) {
|
|
|
19131
19156
|
fork.next();
|
|
19132
19157
|
while(fork.pos > startPos){
|
|
19133
19158
|
if (fork.size < 0) {
|
|
19134
|
-
if (fork.size == -3 /* SpecialRecord.ContextChange */ ) localSkipped += 4;
|
|
19159
|
+
if (fork.size == -3 /* SpecialRecord.ContextChange */ || fork.size == -4 /* SpecialRecord.LookAhead */ ) localSkipped += 4;
|
|
19135
19160
|
else break scan;
|
|
19136
19161
|
} else if (fork.id >= minRepeatType) {
|
|
19137
19162
|
localSkipped += 4;
|
|
@@ -19570,11 +19595,11 @@ about the parse state.
|
|
|
19570
19595
|
var _a;
|
|
19571
19596
|
var depth = action >> 19 /* Action.ReduceDepthShift */ , type = action & 65535 /* Action.ValueMask */ ;
|
|
19572
19597
|
var parser = this.p.parser;
|
|
19573
|
-
var lookaheadRecord = this.reducePos < this.pos - 25 /* Lookahead.Margin */ ;
|
|
19574
|
-
if (lookaheadRecord) this.setLookAhead(this.pos);
|
|
19598
|
+
var lookaheadRecord = this.reducePos < this.pos - 25 /* Lookahead.Margin */ && this.setLookAhead(this.pos);
|
|
19575
19599
|
var dPrec = parser.dynamicPrecedence(type);
|
|
19576
19600
|
if (dPrec) this.score += dPrec;
|
|
19577
19601
|
if (depth == 0) {
|
|
19602
|
+
if (type < parser.minRepeatTerm && this.reducePos < this.pos) this.reducePos = this.pos;
|
|
19578
19603
|
this.pushState(parser.getGoto(this.state, type, true), this.reducePos);
|
|
19579
19604
|
// Zero-depth reductions are a special case—they add stuff to
|
|
19580
19605
|
// the stack without popping anything off.
|
|
@@ -19588,7 +19613,9 @@ about the parse state.
|
|
|
19588
19613
|
// expression and the state that we'll be staying in, which should
|
|
19589
19614
|
// be moved to `this.state`).
|
|
19590
19615
|
var base = this.stack.length - (depth - 1) * 3 - (action & 262144 /* Action.StayFlag */ ? 6 : 0);
|
|
19591
|
-
var start = base ? this.stack[base - 2] : this.p.ranges[0].from
|
|
19616
|
+
var start = base ? this.stack[base - 2] : this.p.ranges[0].from;
|
|
19617
|
+
if (type < parser.minRepeatTerm && start == this.reducePos && this.reducePos < this.pos) this.reducePos = this.pos;
|
|
19618
|
+
var size = this.reducePos - start;
|
|
19592
19619
|
// This is a kludge to try and detect overly deep left-associative
|
|
19593
19620
|
// trees, which will not increase the parse stack depth and thus
|
|
19594
19621
|
// won't be caught by the regular stack-depth limit check.
|
|
@@ -19627,15 +19654,11 @@ about the parse state.
|
|
|
19627
19654
|
var size = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 4, mustSink = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : false;
|
|
19628
19655
|
if (term == 0 /* Term.Err */ && (!this.stack.length || this.stack[this.stack.length - 1] < this.buffer.length + this.bufferBase)) {
|
|
19629
19656
|
// Try to omit/merge adjacent error nodes
|
|
19630
|
-
var
|
|
19631
|
-
if (top == 0 &&
|
|
19632
|
-
top = cur.bufferBase - cur.parent.bufferBase;
|
|
19633
|
-
cur = cur.parent;
|
|
19634
|
-
}
|
|
19635
|
-
if (top > 0 && cur.buffer[top - 4] == 0 /* Term.Err */ && cur.buffer[top - 1] > -1) {
|
|
19657
|
+
var top = this.buffer.length;
|
|
19658
|
+
if (top > 0 && this.buffer[top - 4] == 0 /* Term.Err */ && this.buffer[top - 1] > -1) {
|
|
19636
19659
|
if (start == end) return;
|
|
19637
|
-
if (
|
|
19638
|
-
|
|
19660
|
+
if (this.buffer[top - 2] >= start) {
|
|
19661
|
+
this.buffer[top - 2] = end;
|
|
19639
19662
|
return;
|
|
19640
19663
|
}
|
|
19641
19664
|
}
|
|
@@ -19644,7 +19667,7 @@ about the parse state.
|
|
|
19644
19667
|
this.buffer.push(term, start, end, size);
|
|
19645
19668
|
} else {
|
|
19646
19669
|
var index = this.buffer.length;
|
|
19647
|
-
if (index > 0 && this.buffer[index - 4] != 0 /* Term.Err */ ) {
|
|
19670
|
+
if (index > 0 && (this.buffer[index - 4] != 0 /* Term.Err */ || this.buffer[index - 1] < 0)) {
|
|
19648
19671
|
var mustMove = false;
|
|
19649
19672
|
for(var scan = index; scan > 0 && this.buffer[scan - 2] > end; scan -= 4){
|
|
19650
19673
|
if (this.buffer[scan - 1] >= 0) {
|
|
@@ -19679,11 +19702,11 @@ about the parse state.
|
|
|
19679
19702
|
this.pushState(action & 65535 /* Action.ValueMask */ , this.pos);
|
|
19680
19703
|
} else if ((action & 262144 /* Action.StayFlag */ ) == 0) {
|
|
19681
19704
|
var nextState = action, parser = this.p.parser;
|
|
19682
|
-
|
|
19683
|
-
|
|
19684
|
-
|
|
19685
|
-
|
|
19686
|
-
this.pushState(nextState, start);
|
|
19705
|
+
this.pos = end;
|
|
19706
|
+
var skipped = parser.stateFlag(nextState, 1 /* StateFlag.Skipped */ );
|
|
19707
|
+
// Skipped or zero-length non-tree tokens don't move reducePos
|
|
19708
|
+
if (!skipped && (end > start || type <= parser.maxNode)) this.reducePos = end;
|
|
19709
|
+
this.pushState(nextState, skipped ? start : Math.min(start, this.reducePos));
|
|
19687
19710
|
this.shiftContext(type, start);
|
|
19688
19711
|
if (type <= parser.maxNode) this.buffer.push(type, start, end, 4);
|
|
19689
19712
|
} else {
|
|
@@ -19731,6 +19754,9 @@ about the parse state.
|
|
|
19731
19754
|
value: function split() {
|
|
19732
19755
|
var parent = this;
|
|
19733
19756
|
var off = parent.buffer.length;
|
|
19757
|
+
// Leave off top error node, if there, because that might be
|
|
19758
|
+
// merged with other nodes.
|
|
19759
|
+
if (off && parent.buffer[off - 4] == 0 /* Term.Err */ ) off -= 4;
|
|
19734
19760
|
// Because the top of the buffer (after this.pos) may be mutated
|
|
19735
19761
|
// to reorder reductions and skipped tokens, and shared buffers
|
|
19736
19762
|
// should be immutable, this copies any outstanding skipped tokens
|
|
@@ -19974,10 +20000,10 @@ about the parse state.
|
|
|
19974
20000
|
@internal
|
|
19975
20001
|
*/ key: "setLookAhead",
|
|
19976
20002
|
value: function setLookAhead(lookAhead) {
|
|
19977
|
-
if (lookAhead
|
|
19978
|
-
|
|
19979
|
-
|
|
19980
|
-
|
|
20003
|
+
if (lookAhead <= this.lookAhead) return false;
|
|
20004
|
+
this.emitLookAhead();
|
|
20005
|
+
this.lookAhead = lookAhead;
|
|
20006
|
+
return true;
|
|
19981
20007
|
}
|
|
19982
20008
|
},
|
|
19983
20009
|
{
|
|
@@ -20870,7 +20896,12 @@ var Parse = /*#__PURE__*/ function() {
|
|
|
20870
20896
|
}
|
|
20871
20897
|
}
|
|
20872
20898
|
}
|
|
20873
|
-
if (newStacks.length > 12 /* Rec.MaxStackCount */ )
|
|
20899
|
+
if (newStacks.length > 12 /* Rec.MaxStackCount */ ) {
|
|
20900
|
+
newStacks.sort(function(a, b) {
|
|
20901
|
+
return b.score - a.score;
|
|
20902
|
+
});
|
|
20903
|
+
newStacks.splice(12 /* Rec.MaxStackCount */ , newStacks.length - 12 /* Rec.MaxStackCount */ );
|
|
20904
|
+
}
|
|
20874
20905
|
}
|
|
20875
20906
|
this.minStackPos = newStacks[0].pos;
|
|
20876
20907
|
for(var i2 = 1; i2 < newStacks.length; i2++)if (newStacks[i2].pos < this.minStackPos) this.minStackPos = newStacks[i2].pos;
|
|
@@ -20965,7 +20996,7 @@ var Parse = /*#__PURE__*/ function() {
|
|
|
20965
20996
|
if (done) continue;
|
|
20966
20997
|
}
|
|
20967
20998
|
var force = stack.split(), forceBase = base;
|
|
20968
|
-
for(var j = 0;
|
|
20999
|
+
for(var j = 0; j < 10 /* Rec.ForceReduceLimit */ && force.forceReduce(); j++){
|
|
20969
21000
|
if (verbose) console.log(forceBase + this.stackID(force) + " (via force-reduce)");
|
|
20970
21001
|
var done1 = this.advanceFully(force, newStacks);
|
|
20971
21002
|
if (done1) break;
|
|
@@ -21000,8 +21031,8 @@ var Parse = /*#__PURE__*/ function() {
|
|
|
21000
21031
|
stack.recoverByDelete(token, tokenEnd);
|
|
21001
21032
|
if (verbose) console.log(base + this.stackID(stack) + " (via recover-delete ".concat(this.parser.getName(token), ")"));
|
|
21002
21033
|
pushStackDedup(stack, newStacks);
|
|
21003
|
-
} else if (!finished || finished.score <
|
|
21004
|
-
finished =
|
|
21034
|
+
} else if (!finished || finished.score < force.score) {
|
|
21035
|
+
finished = force;
|
|
21005
21036
|
}
|
|
21006
21037
|
}
|
|
21007
21038
|
return finished;
|
|
@@ -21850,7 +21881,7 @@ must be quoted as JSON strings.
|
|
|
21850
21881
|
For example:
|
|
21851
21882
|
|
|
21852
21883
|
```javascript
|
|
21853
|
-
parser.
|
|
21884
|
+
parser.configure({props: [
|
|
21854
21885
|
styleTags({
|
|
21855
21886
|
// Style Number and BigNumber nodes
|
|
21856
21887
|
"Number BigNumber": tags.number,
|
|
@@ -21865,7 +21896,7 @@ parser.withProps(
|
|
|
21865
21896
|
// Style the node named "/" as punctuation
|
|
21866
21897
|
'"/"': tags.punctuation
|
|
21867
21898
|
})
|
|
21868
|
-
)
|
|
21899
|
+
]})
|
|
21869
21900
|
```
|
|
21870
21901
|
*/ function styleTags(spec) {
|
|
21871
21902
|
var byName = Object.create(null);
|
|
@@ -21921,7 +21952,26 @@ parser.withProps(
|
|
|
21921
21952
|
}
|
|
21922
21953
|
return ruleNodeProp.add(byName);
|
|
21923
21954
|
}
|
|
21924
|
-
var ruleNodeProp = new NodeProp(
|
|
21955
|
+
var ruleNodeProp = new NodeProp({
|
|
21956
|
+
combine: function combine(a, b) {
|
|
21957
|
+
var cur, root, take;
|
|
21958
|
+
while(a || b){
|
|
21959
|
+
if (!a || b && a.depth >= b.depth) {
|
|
21960
|
+
take = b;
|
|
21961
|
+
b = b.next;
|
|
21962
|
+
} else {
|
|
21963
|
+
take = a;
|
|
21964
|
+
a = a.next;
|
|
21965
|
+
}
|
|
21966
|
+
if (cur && cur.mode == take.mode && !take.context && !cur.context) continue;
|
|
21967
|
+
var copy = new Rule$1(take.tags, take.mode, take.context);
|
|
21968
|
+
if (cur) cur.next = copy;
|
|
21969
|
+
else root = copy;
|
|
21970
|
+
cur = copy;
|
|
21971
|
+
}
|
|
21972
|
+
return root;
|
|
21973
|
+
}
|
|
21974
|
+
});
|
|
21925
21975
|
var Rule$1 = /*#__PURE__*/ function() {
|
|
21926
21976
|
function Rule(tags, mode, context, next) {
|
|
21927
21977
|
_class_call_check$x(this, Rule);
|
|
@@ -22846,14 +22896,14 @@ function indent(str, spaces) {
|
|
|
22846
22896
|
var match = parseIdentifier(input, i1, namePart) || namePart && parseAdditionalSymbol(input, i1) || maybeSpace && parseSpaces(input, i1);
|
|
22847
22897
|
// match is required
|
|
22848
22898
|
if (!match) {
|
|
22849
|
-
return
|
|
22899
|
+
return i = i1, nextMatch = nextMatch1, tokens = tokens1, {
|
|
22850
22900
|
v: nextMatch1
|
|
22851
22901
|
};
|
|
22852
22902
|
}
|
|
22853
22903
|
var token = match.token, offset = match.offset;
|
|
22854
22904
|
i1 += offset;
|
|
22855
22905
|
if (token === ' ') {
|
|
22856
|
-
return
|
|
22906
|
+
return i = i1, nextMatch = nextMatch1, tokens = tokens1, "continue";
|
|
22857
22907
|
}
|
|
22858
22908
|
tokens1 = _to_consumable_array$4(tokens1).concat([
|
|
22859
22909
|
token
|
|
@@ -22872,7 +22922,7 @@ function indent(str, spaces) {
|
|
|
22872
22922
|
if (contextKeys.some(function(el) {
|
|
22873
22923
|
return el.startsWith(name);
|
|
22874
22924
|
})) {
|
|
22875
|
-
return
|
|
22925
|
+
return i = i1, nextMatch = nextMatch1, tokens = tokens1, "continue";
|
|
22876
22926
|
}
|
|
22877
22927
|
if (dateTimeIdentifiers.some(function(el) {
|
|
22878
22928
|
return el === name;
|
|
@@ -22891,9 +22941,9 @@ function indent(str, spaces) {
|
|
|
22891
22941
|
if (dateTimeIdentifiers.some(function(el) {
|
|
22892
22942
|
return el.startsWith(name);
|
|
22893
22943
|
})) {
|
|
22894
|
-
return
|
|
22944
|
+
return i = i1, nextMatch = nextMatch1, tokens = tokens1, "continue";
|
|
22895
22945
|
}
|
|
22896
|
-
return
|
|
22946
|
+
return i = i1, nextMatch = nextMatch1, tokens = tokens1, {
|
|
22897
22947
|
v: nextMatch1
|
|
22898
22948
|
};
|
|
22899
22949
|
};
|
|
@@ -24022,20 +24072,20 @@ function isDuration(obj) {
|
|
|
24022
24072
|
function isArray$2(e) {
|
|
24023
24073
|
return Array.isArray(e);
|
|
24024
24074
|
}
|
|
24025
|
-
function isBoolean$1
|
|
24075
|
+
function isBoolean$1(e) {
|
|
24026
24076
|
return typeof e === 'boolean';
|
|
24027
24077
|
}
|
|
24028
24078
|
function getType(e) {
|
|
24029
24079
|
if (e === null || e === undefined) {
|
|
24030
24080
|
return 'nil';
|
|
24031
24081
|
}
|
|
24032
|
-
if (isBoolean$1
|
|
24082
|
+
if (isBoolean$1(e)) {
|
|
24033
24083
|
return 'boolean';
|
|
24034
24084
|
}
|
|
24035
|
-
if (isNumber
|
|
24085
|
+
if (isNumber(e)) {
|
|
24036
24086
|
return 'number';
|
|
24037
24087
|
}
|
|
24038
|
-
if (isString$2
|
|
24088
|
+
if (isString$2(e)) {
|
|
24039
24089
|
return 'string';
|
|
24040
24090
|
}
|
|
24041
24091
|
if (isContext(e)) {
|
|
@@ -24092,10 +24142,10 @@ var Range$a = function Range(props) {
|
|
|
24092
24142
|
_class_call_check$v(this, Range);
|
|
24093
24143
|
Object.assign(this, props);
|
|
24094
24144
|
};
|
|
24095
|
-
function isNumber
|
|
24145
|
+
function isNumber(obj) {
|
|
24096
24146
|
return typeof obj === 'number';
|
|
24097
24147
|
}
|
|
24098
|
-
function isString$2
|
|
24148
|
+
function isString$2(obj) {
|
|
24099
24149
|
return typeof obj === 'string';
|
|
24100
24150
|
}
|
|
24101
24151
|
function equals$1(a, b) {
|
|
@@ -24385,19 +24435,19 @@ var builtins = {
|
|
|
24385
24435
|
// date(from) => date and time
|
|
24386
24436
|
// date(year, month, day)
|
|
24387
24437
|
'date': fn(function(year, month, day, from) {
|
|
24388
|
-
if (!from && !isNumber
|
|
24438
|
+
if (!from && !isNumber(year)) {
|
|
24389
24439
|
from = year;
|
|
24390
24440
|
year = null;
|
|
24391
24441
|
}
|
|
24392
24442
|
var d;
|
|
24393
|
-
if (isString$2
|
|
24443
|
+
if (isString$2(from)) {
|
|
24394
24444
|
d = date(from);
|
|
24395
24445
|
}
|
|
24396
24446
|
if (isDateTime(from)) {
|
|
24397
24447
|
d = from;
|
|
24398
24448
|
}
|
|
24399
24449
|
if (year) {
|
|
24400
|
-
if (!isNumber
|
|
24450
|
+
if (!isNumber(month) || !isNumber(day)) {
|
|
24401
24451
|
return null;
|
|
24402
24452
|
}
|
|
24403
24453
|
d = date().setZone('utc').set({
|
|
@@ -24425,11 +24475,11 @@ var builtins = {
|
|
|
24425
24475
|
day: dLocal.day
|
|
24426
24476
|
});
|
|
24427
24477
|
}
|
|
24428
|
-
if (isString$2
|
|
24478
|
+
if (isString$2(d)) {
|
|
24429
24479
|
from = d;
|
|
24430
24480
|
d = null;
|
|
24431
24481
|
}
|
|
24432
|
-
if (isString$2
|
|
24482
|
+
if (isString$2(from)) {
|
|
24433
24483
|
dt = date(from, null, from.includes('@') ? null : SystemZone.instance);
|
|
24434
24484
|
}
|
|
24435
24485
|
return dt && ifValid(dt) || null;
|
|
@@ -24450,11 +24500,11 @@ var builtins = {
|
|
|
24450
24500
|
if (offset) {
|
|
24451
24501
|
throw notImplemented('time(..., offset)');
|
|
24452
24502
|
}
|
|
24453
|
-
if (isString$2
|
|
24503
|
+
if (isString$2(hour) || isDateTime(hour)) {
|
|
24454
24504
|
from = hour;
|
|
24455
24505
|
hour = null;
|
|
24456
24506
|
}
|
|
24457
|
-
if (isString$2
|
|
24507
|
+
if (isString$2(from) && from) {
|
|
24458
24508
|
t = date(null, from);
|
|
24459
24509
|
}
|
|
24460
24510
|
if (isDateTime(from)) {
|
|
@@ -24464,8 +24514,8 @@ var builtins = {
|
|
|
24464
24514
|
day: 1
|
|
24465
24515
|
});
|
|
24466
24516
|
}
|
|
24467
|
-
if (isNumber
|
|
24468
|
-
if (!isNumber
|
|
24517
|
+
if (isNumber(hour)) {
|
|
24518
|
+
if (!isNumber(minute) || !isNumber(second)) {
|
|
24469
24519
|
return null;
|
|
24470
24520
|
}
|
|
24471
24521
|
// TODO: support offset = days and time duration
|
|
@@ -24620,7 +24670,7 @@ var builtins = {
|
|
|
24620
24670
|
]),
|
|
24621
24671
|
'string join': fn(function(list, delimiter) {
|
|
24622
24672
|
if (list.some(function(e) {
|
|
24623
|
-
return !isString$2
|
|
24673
|
+
return !isString$2(e) && e !== null;
|
|
24624
24674
|
})) {
|
|
24625
24675
|
return null;
|
|
24626
24676
|
}
|
|
@@ -25006,13 +25056,13 @@ var builtins = {
|
|
|
25006
25056
|
]),
|
|
25007
25057
|
// 10.3.4.7 Range Functions
|
|
25008
25058
|
'before': fn(function(a, b) {
|
|
25009
|
-
return before
|
|
25059
|
+
return before(a, b);
|
|
25010
25060
|
}, [
|
|
25011
25061
|
'any',
|
|
25012
25062
|
'any'
|
|
25013
25063
|
]),
|
|
25014
25064
|
'after': fn(function(a, b) {
|
|
25015
|
-
return before
|
|
25065
|
+
return before(b, a);
|
|
25016
25066
|
}, [
|
|
25017
25067
|
'any',
|
|
25018
25068
|
'any'
|
|
@@ -25030,7 +25080,7 @@ var builtins = {
|
|
|
25030
25080
|
'range'
|
|
25031
25081
|
]),
|
|
25032
25082
|
'overlaps': fn(function(range1, range2) {
|
|
25033
|
-
return !before
|
|
25083
|
+
return !before(range1, range2) && !before(range2, range1);
|
|
25034
25084
|
}, [
|
|
25035
25085
|
'range',
|
|
25036
25086
|
'range'
|
|
@@ -25334,7 +25384,7 @@ function createArgsValidator(argDefinitions) {
|
|
|
25334
25384
|
/**
|
|
25335
25385
|
* @param {Range|number} a
|
|
25336
25386
|
* @param {Range|number} b
|
|
25337
|
-
*/ function before
|
|
25387
|
+
*/ function before(a, b) {
|
|
25338
25388
|
if (_instanceof$e(a, Range$a) && _instanceof$e(b, Range$a)) {
|
|
25339
25389
|
return a.end < b.start || (!a['end included'] || !b['start included']) && a.end == b.start;
|
|
25340
25390
|
}
|
|
@@ -25464,7 +25514,7 @@ function stddev(array) {
|
|
|
25464
25514
|
}) / (n - 1));
|
|
25465
25515
|
}
|
|
25466
25516
|
function listReplace(list, matcher, newItem) {
|
|
25467
|
-
if (isNumber
|
|
25517
|
+
if (isNumber(matcher)) {
|
|
25468
25518
|
return _to_consumable_array$3(list.slice(0, matcher - 1)).concat([
|
|
25469
25519
|
newItem
|
|
25470
25520
|
], _to_consumable_array$3(list.slice(matcher)));
|
|
@@ -26314,7 +26364,7 @@ function evalNode(node, input, args) {
|
|
|
26314
26364
|
if (typeof filterFn.type === 'undefined') {
|
|
26315
26365
|
try {
|
|
26316
26366
|
var value = filterFn(context);
|
|
26317
|
-
if (isNumber
|
|
26367
|
+
if (isNumber(value)) {
|
|
26318
26368
|
filterFn.type = 'number';
|
|
26319
26369
|
}
|
|
26320
26370
|
} catch (_err) {
|
|
@@ -27142,7 +27192,7 @@ function _type_of$u(obj) {
|
|
|
27142
27192
|
* @private
|
|
27143
27193
|
* @param {*} value The value to convert.
|
|
27144
27194
|
* @returns {string} Returns the converted string.
|
|
27145
|
-
*/ function objectToString$
|
|
27195
|
+
*/ function objectToString$1(value) {
|
|
27146
27196
|
return nativeObjectToString.call(value);
|
|
27147
27197
|
}
|
|
27148
27198
|
/** `Object#toString` result references. */ var nullTag = '[object Null]', undefinedTag = '[object Undefined]';
|
|
@@ -27157,7 +27207,7 @@ function _type_of$u(obj) {
|
|
|
27157
27207
|
if (value == null) {
|
|
27158
27208
|
return value === undefined ? undefinedTag : nullTag;
|
|
27159
27209
|
}
|
|
27160
|
-
return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString$
|
|
27210
|
+
return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString$1(value);
|
|
27161
27211
|
}
|
|
27162
27212
|
/**
|
|
27163
27213
|
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
@@ -27186,7 +27236,7 @@ function _type_of$u(obj) {
|
|
|
27186
27236
|
"@swc/helpers - typeof";
|
|
27187
27237
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
27188
27238
|
}
|
|
27189
|
-
function isObjectLike$
|
|
27239
|
+
function isObjectLike$1(value) {
|
|
27190
27240
|
return value != null && (typeof value === "undefined" ? "undefined" : _type_of$t(value)) == 'object';
|
|
27191
27241
|
}
|
|
27192
27242
|
function _type_of$s(obj) {
|
|
@@ -27210,8 +27260,8 @@ function _type_of$s(obj) {
|
|
|
27210
27260
|
*
|
|
27211
27261
|
* _.isSymbol('abc');
|
|
27212
27262
|
* // => false
|
|
27213
|
-
*/ function isSymbol$
|
|
27214
|
-
return (typeof value === "undefined" ? "undefined" : _type_of$s(value)) == 'symbol' || isObjectLike$
|
|
27263
|
+
*/ function isSymbol$1(value) {
|
|
27264
|
+
return (typeof value === "undefined" ? "undefined" : _type_of$s(value)) == 'symbol' || isObjectLike$1(value) && baseGetTag(value) == symbolTag$3;
|
|
27215
27265
|
}
|
|
27216
27266
|
/**
|
|
27217
27267
|
* A specialized version of `_.map` for arrays without support for iteratee
|
|
@@ -27250,7 +27300,7 @@ function _type_of$s(obj) {
|
|
|
27250
27300
|
*
|
|
27251
27301
|
* _.isArray(_.noop);
|
|
27252
27302
|
* // => false
|
|
27253
|
-
*/ var isArray$1
|
|
27303
|
+
*/ var isArray$1 = Array.isArray;
|
|
27254
27304
|
/** Used to convert symbols to primitives and strings. */ var symbolProto$2 = Symbol$1 ? Symbol$1.prototype : undefined, symbolToString = symbolProto$2 ? symbolProto$2.toString : undefined;
|
|
27255
27305
|
/**
|
|
27256
27306
|
* The base implementation of `_.toString` which doesn't convert nullish
|
|
@@ -27264,11 +27314,11 @@ function _type_of$s(obj) {
|
|
|
27264
27314
|
if (typeof value == 'string') {
|
|
27265
27315
|
return value;
|
|
27266
27316
|
}
|
|
27267
|
-
if (isArray$1
|
|
27317
|
+
if (isArray$1(value)) {
|
|
27268
27318
|
// Recursively convert values (susceptible to call stack limits).
|
|
27269
27319
|
return arrayMap$1(value, baseToString) + '';
|
|
27270
27320
|
}
|
|
27271
|
-
if (isSymbol$
|
|
27321
|
+
if (isSymbol$1(value)) {
|
|
27272
27322
|
return symbolToString ? symbolToString.call(value) : '';
|
|
27273
27323
|
}
|
|
27274
27324
|
var result = value + '';
|
|
@@ -27325,15 +27375,15 @@ function _type_of$s(obj) {
|
|
|
27325
27375
|
"@swc/helpers - typeof";
|
|
27326
27376
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
27327
27377
|
}
|
|
27328
|
-
function isObject$
|
|
27378
|
+
function isObject$2(value) {
|
|
27329
27379
|
var type = typeof value === "undefined" ? "undefined" : _type_of$r(value);
|
|
27330
27380
|
return value != null && (type == 'object' || type == 'function');
|
|
27331
27381
|
}
|
|
27332
|
-
/** Used as references for various `Number` constants. */ var NAN$
|
|
27333
|
-
/** Used to detect bad signed hexadecimal string values. */ var reIsBadHex$
|
|
27334
|
-
/** Used to detect binary string values. */ var reIsBinary$
|
|
27335
|
-
/** Used to detect octal string values. */ var reIsOctal$
|
|
27336
|
-
/** Built-in method references without a dependency on `root`. */ var freeParseInt$
|
|
27382
|
+
/** Used as references for various `Number` constants. */ var NAN$1 = 0 / 0;
|
|
27383
|
+
/** Used to detect bad signed hexadecimal string values. */ var reIsBadHex$1 = /^[-+]0x[0-9a-f]+$/i;
|
|
27384
|
+
/** Used to detect binary string values. */ var reIsBinary$1 = /^0b[01]+$/i;
|
|
27385
|
+
/** Used to detect octal string values. */ var reIsOctal$1 = /^0o[0-7]+$/i;
|
|
27386
|
+
/** Built-in method references without a dependency on `root`. */ var freeParseInt$1 = parseInt;
|
|
27337
27387
|
/**
|
|
27338
27388
|
* Converts `value` to a number.
|
|
27339
27389
|
*
|
|
@@ -27356,25 +27406,25 @@ function isObject$4(value) {
|
|
|
27356
27406
|
*
|
|
27357
27407
|
* _.toNumber('3.2');
|
|
27358
27408
|
* // => 3.2
|
|
27359
|
-
*/ function toNumber$
|
|
27409
|
+
*/ function toNumber$1(value) {
|
|
27360
27410
|
if (typeof value == 'number') {
|
|
27361
27411
|
return value;
|
|
27362
27412
|
}
|
|
27363
|
-
if (isSymbol$
|
|
27364
|
-
return NAN$
|
|
27413
|
+
if (isSymbol$1(value)) {
|
|
27414
|
+
return NAN$1;
|
|
27365
27415
|
}
|
|
27366
|
-
if (isObject$
|
|
27416
|
+
if (isObject$2(value)) {
|
|
27367
27417
|
var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
|
|
27368
|
-
value = isObject$
|
|
27418
|
+
value = isObject$2(other) ? other + '' : other;
|
|
27369
27419
|
}
|
|
27370
27420
|
if (typeof value != 'string') {
|
|
27371
27421
|
return value === 0 ? value : +value;
|
|
27372
27422
|
}
|
|
27373
27423
|
value = baseTrim(value);
|
|
27374
|
-
var isBinary = reIsBinary$
|
|
27375
|
-
return isBinary || reIsOctal$
|
|
27424
|
+
var isBinary = reIsBinary$1.test(value);
|
|
27425
|
+
return isBinary || reIsOctal$1.test(value) ? freeParseInt$1(value.slice(2), isBinary ? 2 : 8) : reIsBadHex$1.test(value) ? NAN$1 : +value;
|
|
27376
27426
|
}
|
|
27377
|
-
/** Used as references for various `Number` constants. */ var INFINITY$1
|
|
27427
|
+
/** Used as references for various `Number` constants. */ var INFINITY$1 = 1 / 0, MAX_INTEGER$1 = 1.7976931348623157e+308;
|
|
27378
27428
|
/**
|
|
27379
27429
|
* Converts `value` to a finite number.
|
|
27380
27430
|
*
|
|
@@ -27397,14 +27447,14 @@ function isObject$4(value) {
|
|
|
27397
27447
|
*
|
|
27398
27448
|
* _.toFinite('3.2');
|
|
27399
27449
|
* // => 3.2
|
|
27400
|
-
*/ function toFinite$
|
|
27450
|
+
*/ function toFinite$1(value) {
|
|
27401
27451
|
if (!value) {
|
|
27402
27452
|
return value === 0 ? value : 0;
|
|
27403
27453
|
}
|
|
27404
|
-
value = toNumber$
|
|
27405
|
-
if (value === INFINITY$1
|
|
27454
|
+
value = toNumber$1(value);
|
|
27455
|
+
if (value === INFINITY$1 || value === -INFINITY$1) {
|
|
27406
27456
|
var sign = value < 0 ? -1 : 1;
|
|
27407
|
-
return sign * MAX_INTEGER$
|
|
27457
|
+
return sign * MAX_INTEGER$1;
|
|
27408
27458
|
}
|
|
27409
27459
|
return value === value ? value : 0;
|
|
27410
27460
|
}
|
|
@@ -27433,8 +27483,8 @@ function isObject$4(value) {
|
|
|
27433
27483
|
*
|
|
27434
27484
|
* _.toInteger('3.2');
|
|
27435
27485
|
* // => 3
|
|
27436
|
-
*/ function toInteger$
|
|
27437
|
-
var result = toFinite$
|
|
27486
|
+
*/ function toInteger$1(value) {
|
|
27487
|
+
var result = toFinite$1(value), remainder = result % 1;
|
|
27438
27488
|
return result === result ? remainder ? result - remainder : result : 0;
|
|
27439
27489
|
}
|
|
27440
27490
|
/**
|
|
@@ -27473,7 +27523,7 @@ function isObject$4(value) {
|
|
|
27473
27523
|
* _.isFunction(/abc/);
|
|
27474
27524
|
* // => false
|
|
27475
27525
|
*/ function isFunction$1(value) {
|
|
27476
|
-
if (!isObject$
|
|
27526
|
+
if (!isObject$2(value)) {
|
|
27477
27527
|
return false;
|
|
27478
27528
|
}
|
|
27479
27529
|
// The use of `Object#toString` avoids issues with the `typeof` operator
|
|
@@ -27531,7 +27581,7 @@ function isObject$4(value) {
|
|
|
27531
27581
|
* @returns {boolean} Returns `true` if `value` is a native function,
|
|
27532
27582
|
* else `false`.
|
|
27533
27583
|
*/ function baseIsNative(value) {
|
|
27534
|
-
if (!isObject$
|
|
27584
|
+
if (!isObject$2(value) || isMasked(value)) {
|
|
27535
27585
|
return false;
|
|
27536
27586
|
}
|
|
27537
27587
|
var pattern = isFunction$1(value) ? reIsNative : reIsHostCtor;
|
|
@@ -27570,7 +27620,7 @@ function isObject$4(value) {
|
|
|
27570
27620
|
*/ var baseCreate = function() {
|
|
27571
27621
|
function object() {}
|
|
27572
27622
|
return function(proto) {
|
|
27573
|
-
if (!isObject$
|
|
27623
|
+
if (!isObject$2(proto)) {
|
|
27574
27624
|
return {};
|
|
27575
27625
|
}
|
|
27576
27626
|
if (objectCreate) {
|
|
@@ -28018,7 +28068,7 @@ function _type_of$p(obj) {
|
|
|
28018
28068
|
* @returns {boolean} Returns `true` if the arguments are from an iteratee call,
|
|
28019
28069
|
* else `false`.
|
|
28020
28070
|
*/ function isIterateeCall(value, index, object) {
|
|
28021
|
-
if (!isObject$
|
|
28071
|
+
if (!isObject$2(object)) {
|
|
28022
28072
|
return false;
|
|
28023
28073
|
}
|
|
28024
28074
|
var type = typeof index === "undefined" ? "undefined" : _type_of$p(index);
|
|
@@ -28085,7 +28135,7 @@ function _type_of$p(obj) {
|
|
|
28085
28135
|
* @param {*} value The value to check.
|
|
28086
28136
|
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
|
|
28087
28137
|
*/ function baseIsArguments(value) {
|
|
28088
|
-
return isObjectLike$
|
|
28138
|
+
return isObjectLike$1(value) && baseGetTag(value) == argsTag$3;
|
|
28089
28139
|
}
|
|
28090
28140
|
/** Used for built-in method references. */ var objectProto$e = Object.prototype;
|
|
28091
28141
|
/** Used to check objects for own properties. */ var hasOwnProperty$d = objectProto$e.hasOwnProperty;
|
|
@@ -28110,7 +28160,7 @@ function _type_of$p(obj) {
|
|
|
28110
28160
|
*/ var isArguments$1 = baseIsArguments(function() {
|
|
28111
28161
|
return arguments;
|
|
28112
28162
|
}()) ? baseIsArguments : function isArguments(value) {
|
|
28113
|
-
return isObjectLike$
|
|
28163
|
+
return isObjectLike$1(value) && hasOwnProperty$d.call(value, 'callee') && !propertyIsEnumerable$1.call(value, 'callee');
|
|
28114
28164
|
};
|
|
28115
28165
|
/**
|
|
28116
28166
|
* This method returns `false`.
|
|
@@ -28165,7 +28215,7 @@ typedArrayTags[argsTag$2] = typedArrayTags[arrayTag$2] = typedArrayTags[arrayBuf
|
|
|
28165
28215
|
* @param {*} value The value to check.
|
|
28166
28216
|
* @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
|
|
28167
28217
|
*/ function baseIsTypedArray(value) {
|
|
28168
|
-
return isObjectLike$
|
|
28218
|
+
return isObjectLike$1(value) && isLength$1(value.length) && !!typedArrayTags[baseGetTag(value)];
|
|
28169
28219
|
}
|
|
28170
28220
|
/**
|
|
28171
28221
|
* The base implementation of `_.unary` without support for storing metadata.
|
|
@@ -28225,7 +28275,7 @@ function _type_of$n(obj) {
|
|
|
28225
28275
|
* @param {boolean} inherited Specify returning inherited property names.
|
|
28226
28276
|
* @returns {Array} Returns the array of property names.
|
|
28227
28277
|
*/ function arrayLikeKeys$1(value, inherited) {
|
|
28228
|
-
var isArr = isArray$1
|
|
28278
|
+
var isArr = isArray$1(value), isArg = !isArr && isArguments$1(value), isBuff = !isArr && !isArg && isBuffer(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes$1(value.length, String) : [], length = result.length;
|
|
28229
28279
|
for(var key in value){
|
|
28230
28280
|
if ((inherited || hasOwnProperty$c.call(value, key)) && !(skipIndexes && // Safari 9 has enumerable `arguments.length` in strict mode.
|
|
28231
28281
|
(key == 'length' || // Node.js 0.10 has enumerable non-index properties on buffers.
|
|
@@ -28244,12 +28294,12 @@ function _type_of$n(obj) {
|
|
|
28244
28294
|
* @param {Function} func The function to wrap.
|
|
28245
28295
|
* @param {Function} transform The argument transform.
|
|
28246
28296
|
* @returns {Function} Returns the new function.
|
|
28247
|
-
*/ function overArg$
|
|
28297
|
+
*/ function overArg$1(func, transform) {
|
|
28248
28298
|
return function(arg) {
|
|
28249
28299
|
return func(transform(arg));
|
|
28250
28300
|
};
|
|
28251
28301
|
}
|
|
28252
|
-
/* Built-in method references for those with the same name as other `lodash` methods. */ var nativeKeys$1 = overArg$
|
|
28302
|
+
/* Built-in method references for those with the same name as other `lodash` methods. */ var nativeKeys$1 = overArg$1(Object.keys, Object);
|
|
28253
28303
|
/** Used for built-in method references. */ var objectProto$c = Object.prototype;
|
|
28254
28304
|
/** Used to check objects for own properties. */ var hasOwnProperty$b = objectProto$c.hasOwnProperty;
|
|
28255
28305
|
/**
|
|
@@ -28370,7 +28420,7 @@ function _type_of$n(obj) {
|
|
|
28370
28420
|
* @param {Object} object The object to query.
|
|
28371
28421
|
* @returns {Array} Returns the array of property names.
|
|
28372
28422
|
*/ function baseKeysIn(object) {
|
|
28373
|
-
if (!isObject$
|
|
28423
|
+
if (!isObject$2(object)) {
|
|
28374
28424
|
return nativeKeysIn(object);
|
|
28375
28425
|
}
|
|
28376
28426
|
var isProto = isPrototype$1(object), result = [];
|
|
@@ -28419,11 +28469,11 @@ function _type_of$m(obj) {
|
|
|
28419
28469
|
* @param {Object} [object] The object to query keys on.
|
|
28420
28470
|
* @returns {boolean} Returns `true` if `value` is a property name, else `false`.
|
|
28421
28471
|
*/ function isKey(value, object) {
|
|
28422
|
-
if (isArray$1
|
|
28472
|
+
if (isArray$1(value)) {
|
|
28423
28473
|
return false;
|
|
28424
28474
|
}
|
|
28425
28475
|
var type = typeof value === "undefined" ? "undefined" : _type_of$m(value);
|
|
28426
|
-
if (type == 'number' || type == 'symbol' || type == 'boolean' || value == null || isSymbol$
|
|
28476
|
+
if (type == 'number' || type == 'symbol' || type == 'boolean' || value == null || isSymbol$1(value)) {
|
|
28427
28477
|
return true;
|
|
28428
28478
|
}
|
|
28429
28479
|
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object);
|
|
@@ -28876,7 +28926,7 @@ memoize.Cache = MapCache;
|
|
|
28876
28926
|
* @param {Object} [object] The object to query keys on.
|
|
28877
28927
|
* @returns {Array} Returns the cast property path array.
|
|
28878
28928
|
*/ function castPath(value, object) {
|
|
28879
|
-
if (isArray$1
|
|
28929
|
+
if (isArray$1(value)) {
|
|
28880
28930
|
return value;
|
|
28881
28931
|
}
|
|
28882
28932
|
return isKey(value, object) ? [
|
|
@@ -28890,7 +28940,7 @@ memoize.Cache = MapCache;
|
|
|
28890
28940
|
* @param {*} value The value to inspect.
|
|
28891
28941
|
* @returns {string|symbol} Returns the key.
|
|
28892
28942
|
*/ function toKey(value) {
|
|
28893
|
-
if (typeof value == 'string' || isSymbol$
|
|
28943
|
+
if (typeof value == 'string' || isSymbol$1(value)) {
|
|
28894
28944
|
return value;
|
|
28895
28945
|
}
|
|
28896
28946
|
var result = value + '';
|
|
@@ -28961,7 +29011,7 @@ memoize.Cache = MapCache;
|
|
|
28961
29011
|
* @param {*} value The value to check.
|
|
28962
29012
|
* @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
|
|
28963
29013
|
*/ function isFlattenable(value) {
|
|
28964
|
-
return isArray$1
|
|
29014
|
+
return isArray$1(value) || isArguments$1(value) || !!(spreadableSymbol && value && value[spreadableSymbol]);
|
|
28965
29015
|
}
|
|
28966
29016
|
/**
|
|
28967
29017
|
* The base implementation of `_.flatten` with support for restricting flattening.
|
|
@@ -29006,7 +29056,7 @@ memoize.Cache = MapCache;
|
|
|
29006
29056
|
var length = array == null ? 0 : array.length;
|
|
29007
29057
|
return length ? baseFlatten(array) : [];
|
|
29008
29058
|
}
|
|
29009
|
-
/** Built-in value references. */ var getPrototype
|
|
29059
|
+
/** Built-in value references. */ var getPrototype = overArg$1(Object.getPrototypeOf, Object);
|
|
29010
29060
|
/**
|
|
29011
29061
|
* The base implementation of `_.slice` without an iteratee call guard.
|
|
29012
29062
|
*
|
|
@@ -29257,7 +29307,7 @@ function _type_of$k(obj) {
|
|
|
29257
29307
|
var result = [];
|
|
29258
29308
|
while(object){
|
|
29259
29309
|
arrayPush(result, getSymbols(object));
|
|
29260
|
-
object = getPrototype
|
|
29310
|
+
object = getPrototype(object);
|
|
29261
29311
|
}
|
|
29262
29312
|
return result;
|
|
29263
29313
|
};
|
|
@@ -29273,7 +29323,7 @@ function _type_of$k(obj) {
|
|
|
29273
29323
|
* @returns {Array} Returns the array of property names and symbols.
|
|
29274
29324
|
*/ function baseGetAllKeys(object, keysFunc, symbolsFunc) {
|
|
29275
29325
|
var result = keysFunc(object);
|
|
29276
|
-
return isArray$1
|
|
29326
|
+
return isArray$1(object) ? result : arrayPush(result, symbolsFunc(object));
|
|
29277
29327
|
}
|
|
29278
29328
|
/**
|
|
29279
29329
|
* Creates an array of own enumerable property names and symbols of `object`.
|
|
@@ -29328,8 +29378,8 @@ if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag$3 || Map
|
|
|
29328
29378
|
return result;
|
|
29329
29379
|
};
|
|
29330
29380
|
}
|
|
29331
|
-
/** Used for built-in method references. */ var objectProto$6
|
|
29332
|
-
/** Used to check objects for own properties. */ var hasOwnProperty$6 = objectProto$6
|
|
29381
|
+
/** Used for built-in method references. */ var objectProto$6 = Object.prototype;
|
|
29382
|
+
/** Used to check objects for own properties. */ var hasOwnProperty$6 = objectProto$6.hasOwnProperty;
|
|
29333
29383
|
/**
|
|
29334
29384
|
* Initializes an array clone.
|
|
29335
29385
|
*
|
|
@@ -29401,7 +29451,7 @@ if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag$3 || Map
|
|
|
29401
29451
|
var buffer = typedArray.buffer;
|
|
29402
29452
|
return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
|
|
29403
29453
|
}
|
|
29404
|
-
/** `Object#toString` result references. */ var boolTag$2 = '[object Boolean]', dateTag$2 = '[object Date]', mapTag$4 = '[object Map]', numberTag$2 = '[object Number]', regexpTag$3 = '[object RegExp]', setTag$4 = '[object Set]', stringTag$3 = '[object String]', symbolTag$2
|
|
29454
|
+
/** `Object#toString` result references. */ var boolTag$2 = '[object Boolean]', dateTag$2 = '[object Date]', mapTag$4 = '[object Map]', numberTag$2 = '[object Number]', regexpTag$3 = '[object RegExp]', setTag$4 = '[object Set]', stringTag$3 = '[object String]', symbolTag$2 = '[object Symbol]';
|
|
29405
29455
|
var arrayBufferTag$2 = '[object ArrayBuffer]', dataViewTag$2 = '[object DataView]', float32Tag$1 = '[object Float32Array]', float64Tag$1 = '[object Float64Array]', int8Tag$1 = '[object Int8Array]', int16Tag$1 = '[object Int16Array]', int32Tag$1 = '[object Int32Array]', uint8Tag$1 = '[object Uint8Array]', uint8ClampedTag$1 = '[object Uint8ClampedArray]', uint16Tag$1 = '[object Uint16Array]', uint32Tag$1 = '[object Uint32Array]';
|
|
29406
29456
|
/**
|
|
29407
29457
|
* Initializes an object clone based on its `toStringTag`.
|
|
@@ -29443,7 +29493,7 @@ var arrayBufferTag$2 = '[object ArrayBuffer]', dataViewTag$2 = '[object DataView
|
|
|
29443
29493
|
return cloneRegExp(object);
|
|
29444
29494
|
case setTag$4:
|
|
29445
29495
|
return new Ctor;
|
|
29446
|
-
case symbolTag$2
|
|
29496
|
+
case symbolTag$2:
|
|
29447
29497
|
return cloneSymbol(object);
|
|
29448
29498
|
}
|
|
29449
29499
|
}
|
|
@@ -29454,7 +29504,7 @@ var arrayBufferTag$2 = '[object ArrayBuffer]', dataViewTag$2 = '[object DataView
|
|
|
29454
29504
|
* @param {Object} object The object to clone.
|
|
29455
29505
|
* @returns {Object} Returns the initialized clone.
|
|
29456
29506
|
*/ function initCloneObject(object) {
|
|
29457
|
-
return typeof object.constructor == 'function' && !isPrototype$1(object) ? baseCreate(getPrototype
|
|
29507
|
+
return typeof object.constructor == 'function' && !isPrototype$1(object) ? baseCreate(getPrototype(object)) : {};
|
|
29458
29508
|
}
|
|
29459
29509
|
/** `Object#toString` result references. */ var mapTag$3 = '[object Map]';
|
|
29460
29510
|
/**
|
|
@@ -29464,7 +29514,7 @@ var arrayBufferTag$2 = '[object ArrayBuffer]', dataViewTag$2 = '[object DataView
|
|
|
29464
29514
|
* @param {*} value The value to check.
|
|
29465
29515
|
* @returns {boolean} Returns `true` if `value` is a map, else `false`.
|
|
29466
29516
|
*/ function baseIsMap(value) {
|
|
29467
|
-
return isObjectLike$
|
|
29517
|
+
return isObjectLike$1(value) && getTag(value) == mapTag$3;
|
|
29468
29518
|
}
|
|
29469
29519
|
/* Node.js helper references. */ var nodeIsMap = nodeUtil && nodeUtil.isMap;
|
|
29470
29520
|
/**
|
|
@@ -29492,7 +29542,7 @@ var arrayBufferTag$2 = '[object ArrayBuffer]', dataViewTag$2 = '[object DataView
|
|
|
29492
29542
|
* @param {*} value The value to check.
|
|
29493
29543
|
* @returns {boolean} Returns `true` if `value` is a set, else `false`.
|
|
29494
29544
|
*/ function baseIsSet(value) {
|
|
29495
|
-
return isObjectLike$
|
|
29545
|
+
return isObjectLike$1(value) && getTag(value) == setTag$3;
|
|
29496
29546
|
}
|
|
29497
29547
|
/* Node.js helper references. */ var nodeIsSet = nodeUtil && nodeUtil.isSet;
|
|
29498
29548
|
/**
|
|
@@ -29512,10 +29562,10 @@ var arrayBufferTag$2 = '[object ArrayBuffer]', dataViewTag$2 = '[object DataView
|
|
|
29512
29562
|
* _.isSet(new WeakSet);
|
|
29513
29563
|
* // => false
|
|
29514
29564
|
*/ var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
|
|
29515
|
-
/** `Object#toString` result references. */ var argsTag$1 = '[object Arguments]', arrayTag$1 = '[object Array]', boolTag$1 = '[object Boolean]', dateTag$1 = '[object Date]', errorTag$1 = '[object Error]', funcTag$3 = '[object Function]', genTag$2 = '[object GeneratorFunction]', mapTag$2 = '[object Map]', numberTag$1 = '[object Number]', objectTag$1 = '[object Object]', regexpTag$2 = '[object RegExp]', setTag$2 = '[object Set]', stringTag$2 = '[object String]', symbolTag$1
|
|
29565
|
+
/** `Object#toString` result references. */ var argsTag$1 = '[object Arguments]', arrayTag$1 = '[object Array]', boolTag$1 = '[object Boolean]', dateTag$1 = '[object Date]', errorTag$1 = '[object Error]', funcTag$3 = '[object Function]', genTag$2 = '[object GeneratorFunction]', mapTag$2 = '[object Map]', numberTag$1 = '[object Number]', objectTag$1 = '[object Object]', regexpTag$2 = '[object RegExp]', setTag$2 = '[object Set]', stringTag$2 = '[object String]', symbolTag$1 = '[object Symbol]', weakMapTag = '[object WeakMap]';
|
|
29516
29566
|
var arrayBufferTag$1 = '[object ArrayBuffer]', dataViewTag$1 = '[object DataView]', float32Tag = '[object Float32Array]', float64Tag = '[object Float64Array]', int8Tag = '[object Int8Array]', int16Tag = '[object Int16Array]', int32Tag = '[object Int32Array]', uint8Tag = '[object Uint8Array]', uint8ClampedTag = '[object Uint8ClampedArray]', uint16Tag = '[object Uint16Array]', uint32Tag = '[object Uint32Array]';
|
|
29517
29567
|
/** Used to identify `toStringTag` values supported by `_.clone`. */ var cloneableTags = {};
|
|
29518
|
-
cloneableTags[argsTag$1] = cloneableTags[arrayTag$1] = cloneableTags[arrayBufferTag$1] = cloneableTags[dataViewTag$1] = cloneableTags[boolTag$1] = cloneableTags[dateTag$1] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag$2] = cloneableTags[numberTag$1] = cloneableTags[objectTag$1] = cloneableTags[regexpTag$2] = cloneableTags[setTag$2] = cloneableTags[stringTag$2] = cloneableTags[symbolTag$1
|
|
29568
|
+
cloneableTags[argsTag$1] = cloneableTags[arrayTag$1] = cloneableTags[arrayBufferTag$1] = cloneableTags[dataViewTag$1] = cloneableTags[boolTag$1] = cloneableTags[dateTag$1] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag$2] = cloneableTags[numberTag$1] = cloneableTags[objectTag$1] = cloneableTags[regexpTag$2] = cloneableTags[setTag$2] = cloneableTags[stringTag$2] = cloneableTags[symbolTag$1] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
|
|
29519
29569
|
cloneableTags[errorTag$1] = cloneableTags[funcTag$3] = cloneableTags[weakMapTag] = false;
|
|
29520
29570
|
/**
|
|
29521
29571
|
* The base implementation of `_.clone` and `_.cloneDeep` which tracks
|
|
@@ -29537,10 +29587,10 @@ cloneableTags[errorTag$1] = cloneableTags[funcTag$3] = cloneableTags[weakMapTag]
|
|
|
29537
29587
|
if (result !== undefined) {
|
|
29538
29588
|
return result;
|
|
29539
29589
|
}
|
|
29540
|
-
if (!isObject$
|
|
29590
|
+
if (!isObject$2(value)) {
|
|
29541
29591
|
return value;
|
|
29542
29592
|
}
|
|
29543
|
-
var isArr = isArray$1
|
|
29593
|
+
var isArr = isArray$1(value);
|
|
29544
29594
|
if (isArr) {
|
|
29545
29595
|
result = initCloneArray(value);
|
|
29546
29596
|
{
|
|
@@ -29803,7 +29853,7 @@ SetCache.prototype.has = setCacheHas;
|
|
|
29803
29853
|
return result;
|
|
29804
29854
|
}
|
|
29805
29855
|
/** Used to compose bitmasks for value comparisons. */ var COMPARE_PARTIAL_FLAG$4 = 1, COMPARE_UNORDERED_FLAG$2 = 2;
|
|
29806
|
-
/** `Object#toString` result references. */ var boolTag
|
|
29856
|
+
/** `Object#toString` result references. */ var boolTag = '[object Boolean]', dateTag = '[object Date]', errorTag = '[object Error]', mapTag$1 = '[object Map]', numberTag = '[object Number]', regexpTag$1 = '[object RegExp]', setTag$1 = '[object Set]', stringTag$1 = '[object String]', symbolTag$4 = '[object Symbol]';
|
|
29807
29857
|
var arrayBufferTag = '[object ArrayBuffer]', dataViewTag = '[object DataView]';
|
|
29808
29858
|
/** Used to convert symbols to primitives and strings. */ var symbolProto = Symbol$1 ? Symbol$1.prototype : undefined, symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
|
|
29809
29859
|
/**
|
|
@@ -29835,16 +29885,16 @@ var arrayBufferTag = '[object ArrayBuffer]', dataViewTag = '[object DataView]';
|
|
|
29835
29885
|
return false;
|
|
29836
29886
|
}
|
|
29837
29887
|
return true;
|
|
29838
|
-
case boolTag
|
|
29888
|
+
case boolTag:
|
|
29839
29889
|
case dateTag:
|
|
29840
|
-
case numberTag
|
|
29890
|
+
case numberTag:
|
|
29841
29891
|
// Coerce booleans to `1` or `0` and dates to milliseconds.
|
|
29842
29892
|
// Invalid dates are coerced to `NaN`.
|
|
29843
29893
|
return eq$3(+object, +other);
|
|
29844
29894
|
case errorTag:
|
|
29845
29895
|
return object.name == other.name && object.message == other.message;
|
|
29846
29896
|
case regexpTag$1:
|
|
29847
|
-
case stringTag$1
|
|
29897
|
+
case stringTag$1:
|
|
29848
29898
|
// Coerce regexes to strings and treat strings, primitives and objects,
|
|
29849
29899
|
// as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
|
|
29850
29900
|
// for more details.
|
|
@@ -29883,8 +29933,8 @@ function _instanceof$c(left, right) {
|
|
|
29883
29933
|
}
|
|
29884
29934
|
}
|
|
29885
29935
|
/** Used to compose bitmasks for value comparisons. */ var COMPARE_PARTIAL_FLAG$3 = 1;
|
|
29886
|
-
/** Used for built-in method references. */ var objectProto$5
|
|
29887
|
-
/** Used to check objects for own properties. */ var hasOwnProperty$5 = objectProto$5
|
|
29936
|
+
/** Used for built-in method references. */ var objectProto$5 = Object.prototype;
|
|
29937
|
+
/** Used to check objects for own properties. */ var hasOwnProperty$5 = objectProto$5.hasOwnProperty;
|
|
29888
29938
|
/**
|
|
29889
29939
|
* A specialized version of `baseIsEqualDeep` for objects with support for
|
|
29890
29940
|
* partial deep comparisons.
|
|
@@ -29944,9 +29994,9 @@ function _instanceof$c(left, right) {
|
|
|
29944
29994
|
return result;
|
|
29945
29995
|
}
|
|
29946
29996
|
/** Used to compose bitmasks for value comparisons. */ var COMPARE_PARTIAL_FLAG$2 = 1;
|
|
29947
|
-
/** `Object#toString` result references. */ var argsTag$4 = '[object Arguments]', arrayTag = '[object Array]', objectTag
|
|
29948
|
-
/** Used for built-in method references. */ var objectProto$4
|
|
29949
|
-
/** Used to check objects for own properties. */ var hasOwnProperty$4 = objectProto$4
|
|
29997
|
+
/** `Object#toString` result references. */ var argsTag$4 = '[object Arguments]', arrayTag = '[object Array]', objectTag = '[object Object]';
|
|
29998
|
+
/** Used for built-in method references. */ var objectProto$4 = Object.prototype;
|
|
29999
|
+
/** Used to check objects for own properties. */ var hasOwnProperty$4 = objectProto$4.hasOwnProperty;
|
|
29950
30000
|
/**
|
|
29951
30001
|
* A specialized version of `baseIsEqual` for arrays and objects which performs
|
|
29952
30002
|
* deep comparisons and tracks traversed objects enabling objects with circular
|
|
@@ -29961,10 +30011,10 @@ function _instanceof$c(left, right) {
|
|
|
29961
30011
|
* @param {Object} [stack] Tracks traversed `object` and `other` objects.
|
|
29962
30012
|
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
|
|
29963
30013
|
*/ function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
|
|
29964
|
-
var objIsArr = isArray$1
|
|
29965
|
-
objTag = objTag == argsTag$4 ? objectTag
|
|
29966
|
-
othTag = othTag == argsTag$4 ? objectTag
|
|
29967
|
-
var objIsObj = objTag == objectTag
|
|
30014
|
+
var objIsArr = isArray$1(object), othIsArr = isArray$1(other), objTag = objIsArr ? arrayTag : getTag(object), othTag = othIsArr ? arrayTag : getTag(other);
|
|
30015
|
+
objTag = objTag == argsTag$4 ? objectTag : objTag;
|
|
30016
|
+
othTag = othTag == argsTag$4 ? objectTag : othTag;
|
|
30017
|
+
var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag;
|
|
29968
30018
|
if (isSameTag && isBuffer(object)) {
|
|
29969
30019
|
if (!isBuffer(other)) {
|
|
29970
30020
|
return false;
|
|
@@ -30007,7 +30057,7 @@ function _instanceof$c(left, right) {
|
|
|
30007
30057
|
if (value === other) {
|
|
30008
30058
|
return true;
|
|
30009
30059
|
}
|
|
30010
|
-
if (value == null || other == null || !isObjectLike$
|
|
30060
|
+
if (value == null || other == null || !isObjectLike$1(value) && !isObjectLike$1(other)) {
|
|
30011
30061
|
return value !== value && other !== other;
|
|
30012
30062
|
}
|
|
30013
30063
|
return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
|
|
@@ -30059,7 +30109,7 @@ function _instanceof$c(left, right) {
|
|
|
30059
30109
|
* @returns {boolean} Returns `true` if `value` if suitable for strict
|
|
30060
30110
|
* equality comparisons, else `false`.
|
|
30061
30111
|
*/ function isStrictComparable(value) {
|
|
30062
|
-
return value === value && !isObject$
|
|
30112
|
+
return value === value && !isObject$2(value);
|
|
30063
30113
|
}
|
|
30064
30114
|
/**
|
|
30065
30115
|
* Gets the property names, values, and compare flags of `object`.
|
|
@@ -30142,7 +30192,7 @@ function _instanceof$c(left, right) {
|
|
|
30142
30192
|
return result;
|
|
30143
30193
|
}
|
|
30144
30194
|
length = object == null ? 0 : object.length;
|
|
30145
|
-
return !!length && isLength$1(length) && isIndex$1(key, length) && (isArray$1
|
|
30195
|
+
return !!length && isLength$1(length) && isIndex$1(key, length) && (isArray$1(object) || isArguments$1(object));
|
|
30146
30196
|
}
|
|
30147
30197
|
/**
|
|
30148
30198
|
* Checks if `path` is a direct or inherited property of `object`.
|
|
@@ -30255,7 +30305,7 @@ function _type_of$j(obj) {
|
|
|
30255
30305
|
return identity;
|
|
30256
30306
|
}
|
|
30257
30307
|
if ((typeof value === "undefined" ? "undefined" : _type_of$j(value)) == 'object') {
|
|
30258
|
-
return isArray$1
|
|
30308
|
+
return isArray$1(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value);
|
|
30259
30309
|
}
|
|
30260
30310
|
return property(value);
|
|
30261
30311
|
}
|
|
@@ -30372,12 +30422,12 @@ function _type_of$j(obj) {
|
|
|
30372
30422
|
* @returns {Function} Returns the new aggregator function.
|
|
30373
30423
|
*/ function createAggregator(setter, initializer) {
|
|
30374
30424
|
return function(collection, iteratee) {
|
|
30375
|
-
var func = isArray$1
|
|
30425
|
+
var func = isArray$1(collection) ? arrayAggregator : baseAggregator, accumulator = {};
|
|
30376
30426
|
return func(collection, setter, baseIteratee(iteratee), accumulator);
|
|
30377
30427
|
};
|
|
30378
30428
|
}
|
|
30379
|
-
/** Used for built-in method references. */ var objectProto$3
|
|
30380
|
-
/** Used to check objects for own properties. */ var hasOwnProperty$3 = objectProto$3
|
|
30429
|
+
/** Used for built-in method references. */ var objectProto$3 = Object.prototype;
|
|
30430
|
+
/** Used to check objects for own properties. */ var hasOwnProperty$3 = objectProto$3.hasOwnProperty;
|
|
30381
30431
|
/**
|
|
30382
30432
|
* Assigns own and inherited enumerable string keyed properties of source
|
|
30383
30433
|
* objects to the destination object for all destination properties that
|
|
@@ -30414,7 +30464,7 @@ function _type_of$j(obj) {
|
|
|
30414
30464
|
while(++propsIndex < propsLength){
|
|
30415
30465
|
var key = props[propsIndex];
|
|
30416
30466
|
var value = object[key];
|
|
30417
|
-
if (value === undefined || eq$3(value, objectProto$3
|
|
30467
|
+
if (value === undefined || eq$3(value, objectProto$3[key]) && !hasOwnProperty$3.call(object, key)) {
|
|
30418
30468
|
object[key] = source[key];
|
|
30419
30469
|
}
|
|
30420
30470
|
}
|
|
@@ -30446,7 +30496,7 @@ function _type_of$j(obj) {
|
|
|
30446
30496
|
* _.isArrayLikeObject(_.noop);
|
|
30447
30497
|
* // => false
|
|
30448
30498
|
*/ function isArrayLikeObject$1(value) {
|
|
30449
|
-
return isObjectLike$
|
|
30499
|
+
return isObjectLike$1(value) && isArrayLike$1(value);
|
|
30450
30500
|
}
|
|
30451
30501
|
/** Used as the size to enable large array optimizations. */ var LARGE_ARRAY_SIZE$1 = 200;
|
|
30452
30502
|
/**
|
|
@@ -30555,7 +30605,7 @@ function _type_of$j(obj) {
|
|
|
30555
30605
|
if (!length) {
|
|
30556
30606
|
return [];
|
|
30557
30607
|
}
|
|
30558
|
-
n = n === undefined ? 1 : toInteger$
|
|
30608
|
+
n = n === undefined ? 1 : toInteger$1(n);
|
|
30559
30609
|
return baseSlice(array, n < 0 ? 0 : n, length);
|
|
30560
30610
|
}
|
|
30561
30611
|
/**
|
|
@@ -30587,7 +30637,7 @@ function _type_of$j(obj) {
|
|
|
30587
30637
|
if (!length) {
|
|
30588
30638
|
return [];
|
|
30589
30639
|
}
|
|
30590
|
-
n = n === undefined ? 1 : toInteger$
|
|
30640
|
+
n = n === undefined ? 1 : toInteger$1(n);
|
|
30591
30641
|
n = length - n;
|
|
30592
30642
|
return baseSlice(array, 0, n < 0 ? 0 : n);
|
|
30593
30643
|
}
|
|
@@ -30630,7 +30680,7 @@ function _type_of$j(obj) {
|
|
|
30630
30680
|
* });
|
|
30631
30681
|
* // => Logs 'a' then 'b' (iteration order is not guaranteed).
|
|
30632
30682
|
*/ function forEach(collection, iteratee) {
|
|
30633
|
-
var func = isArray$1
|
|
30683
|
+
var func = isArray$1(collection) ? arrayEach : baseEach;
|
|
30634
30684
|
return func(collection, castFunction(iteratee));
|
|
30635
30685
|
}
|
|
30636
30686
|
/**
|
|
@@ -30708,7 +30758,7 @@ function _type_of$j(obj) {
|
|
|
30708
30758
|
* _.every(users, 'active');
|
|
30709
30759
|
* // => false
|
|
30710
30760
|
*/ function every(collection, predicate, guard) {
|
|
30711
|
-
var func = isArray$1
|
|
30761
|
+
var func = isArray$1(collection) ? arrayEvery : baseEvery;
|
|
30712
30762
|
return func(collection, baseIteratee(predicate));
|
|
30713
30763
|
}
|
|
30714
30764
|
/**
|
|
@@ -30768,7 +30818,7 @@ function _type_of$j(obj) {
|
|
|
30768
30818
|
* _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]]));
|
|
30769
30819
|
* // => objects for ['fred', 'barney']
|
|
30770
30820
|
*/ function filter(collection, predicate) {
|
|
30771
|
-
var func = isArray$1
|
|
30821
|
+
var func = isArray$1(collection) ? arrayFilter : baseFilter;
|
|
30772
30822
|
return func(collection, baseIteratee(predicate));
|
|
30773
30823
|
}
|
|
30774
30824
|
/**
|
|
@@ -30831,7 +30881,7 @@ function _type_of$j(obj) {
|
|
|
30831
30881
|
if (!length) {
|
|
30832
30882
|
return -1;
|
|
30833
30883
|
}
|
|
30834
|
-
var index = fromIndex == null ? 0 : toInteger$
|
|
30884
|
+
var index = fromIndex == null ? 0 : toInteger$1(fromIndex);
|
|
30835
30885
|
if (index < 0) {
|
|
30836
30886
|
index = nativeMax$1(length + index, 0);
|
|
30837
30887
|
}
|
|
@@ -30949,7 +30999,7 @@ function _type_of$j(obj) {
|
|
|
30949
30999
|
* _.map(users, 'user');
|
|
30950
31000
|
* // => ['barney', 'fred']
|
|
30951
31001
|
*/ function map(collection, iteratee) {
|
|
30952
|
-
var func = isArray$1
|
|
31002
|
+
var func = isArray$1(collection) ? arrayMap$1 : baseMap;
|
|
30953
31003
|
return func(collection, baseIteratee(iteratee));
|
|
30954
31004
|
}
|
|
30955
31005
|
/**
|
|
@@ -30975,8 +31025,8 @@ function _type_of$j(obj) {
|
|
|
30975
31025
|
*/ function flatMap(collection, iteratee) {
|
|
30976
31026
|
return baseFlatten(map(collection, iteratee));
|
|
30977
31027
|
}
|
|
30978
|
-
/** Used for built-in method references. */ var objectProto$2
|
|
30979
|
-
/** Used to check objects for own properties. */ var hasOwnProperty$2 = objectProto$2
|
|
31028
|
+
/** Used for built-in method references. */ var objectProto$2 = Object.prototype;
|
|
31029
|
+
/** Used to check objects for own properties. */ var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
|
|
30980
31030
|
/**
|
|
30981
31031
|
* Creates an object composed of keys generated from the results of running
|
|
30982
31032
|
* each element of `collection` thru `iteratee`. The order of grouped values
|
|
@@ -31008,8 +31058,8 @@ function _type_of$j(obj) {
|
|
|
31008
31058
|
]);
|
|
31009
31059
|
}
|
|
31010
31060
|
});
|
|
31011
|
-
/** Used for built-in method references. */ var objectProto$1
|
|
31012
|
-
/** Used to check objects for own properties. */ var hasOwnProperty$1
|
|
31061
|
+
/** Used for built-in method references. */ var objectProto$1 = Object.prototype;
|
|
31062
|
+
/** Used to check objects for own properties. */ var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
|
|
31013
31063
|
/**
|
|
31014
31064
|
* The base implementation of `_.has` without support for deep paths.
|
|
31015
31065
|
*
|
|
@@ -31018,7 +31068,7 @@ function _type_of$j(obj) {
|
|
|
31018
31068
|
* @param {Array|string} key The key to check.
|
|
31019
31069
|
* @returns {boolean} Returns `true` if `key` exists, else `false`.
|
|
31020
31070
|
*/ function baseHas(object, key) {
|
|
31021
|
-
return object != null && hasOwnProperty$1
|
|
31071
|
+
return object != null && hasOwnProperty$1.call(object, key);
|
|
31022
31072
|
}
|
|
31023
31073
|
/**
|
|
31024
31074
|
* Checks if `path` is a direct property of `object`.
|
|
@@ -31066,8 +31116,8 @@ function _type_of$j(obj) {
|
|
|
31066
31116
|
*
|
|
31067
31117
|
* _.isString(1);
|
|
31068
31118
|
* // => false
|
|
31069
|
-
*/ function isString$1
|
|
31070
|
-
return typeof value == 'string' || !isArray$1
|
|
31119
|
+
*/ function isString$1(value) {
|
|
31120
|
+
return typeof value == 'string' || !isArray$1(value) && isObjectLike$1(value) && baseGetTag(value) == stringTag$5;
|
|
31071
31121
|
}
|
|
31072
31122
|
/**
|
|
31073
31123
|
* The base implementation of `_.values` and `_.valuesIn` which creates an
|
|
@@ -31143,12 +31193,12 @@ function _type_of$j(obj) {
|
|
|
31143
31193
|
* // => true
|
|
31144
31194
|
*/ function includes$2(collection, value, fromIndex, guard) {
|
|
31145
31195
|
collection = isArrayLike$1(collection) ? collection : values$1(collection);
|
|
31146
|
-
fromIndex = fromIndex && true ? toInteger$
|
|
31196
|
+
fromIndex = fromIndex && true ? toInteger$1(fromIndex) : 0;
|
|
31147
31197
|
var length = collection.length;
|
|
31148
31198
|
if (fromIndex < 0) {
|
|
31149
31199
|
fromIndex = nativeMax$3(length + fromIndex, 0);
|
|
31150
31200
|
}
|
|
31151
|
-
return isString$1
|
|
31201
|
+
return isString$1(collection) ? fromIndex <= length && collection.indexOf(value, fromIndex) > -1 : !!length && baseIndexOf$1(collection, value, fromIndex) > -1;
|
|
31152
31202
|
}
|
|
31153
31203
|
/**
|
|
31154
31204
|
* Gets the index at which the first occurrence of `value` is found in `array`
|
|
@@ -31219,7 +31269,7 @@ function _type_of$j(obj) {
|
|
|
31219
31269
|
if (value == null) {
|
|
31220
31270
|
return true;
|
|
31221
31271
|
}
|
|
31222
|
-
if (isArrayLike$1(value) && (isArray$1
|
|
31272
|
+
if (isArrayLike$1(value) && (isArray$1(value) || typeof value == 'string' || typeof value.splice == 'function' || isBuffer(value) || isTypedArray(value) || isArguments$1(value))) {
|
|
31223
31273
|
return !value.length;
|
|
31224
31274
|
}
|
|
31225
31275
|
var tag = getTag(value);
|
|
@@ -31244,7 +31294,7 @@ function _type_of$j(obj) {
|
|
|
31244
31294
|
* @param {*} value The value to check.
|
|
31245
31295
|
* @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
|
|
31246
31296
|
*/ function baseIsRegExp(value) {
|
|
31247
|
-
return isObjectLike$
|
|
31297
|
+
return isObjectLike$1(value) && baseGetTag(value) == regexpTag;
|
|
31248
31298
|
}
|
|
31249
31299
|
/* Node.js helper references. */ var nodeIsRegExp = nodeUtil && nodeUtil.isRegExp;
|
|
31250
31300
|
/**
|
|
@@ -31283,7 +31333,7 @@ function _type_of$j(obj) {
|
|
|
31283
31333
|
*/ function isUndefined(value) {
|
|
31284
31334
|
return value === undefined;
|
|
31285
31335
|
}
|
|
31286
|
-
/** Error message constants. */ var FUNC_ERROR_TEXT
|
|
31336
|
+
/** Error message constants. */ var FUNC_ERROR_TEXT = 'Expected a function';
|
|
31287
31337
|
/**
|
|
31288
31338
|
* Creates a function that negates the result of the predicate `func`. The
|
|
31289
31339
|
* `func` predicate is invoked with the `this` binding and arguments of the
|
|
@@ -31305,7 +31355,7 @@ function _type_of$j(obj) {
|
|
|
31305
31355
|
* // => [1, 3, 5]
|
|
31306
31356
|
*/ function negate(predicate) {
|
|
31307
31357
|
if (typeof predicate != 'function') {
|
|
31308
|
-
throw new TypeError(FUNC_ERROR_TEXT
|
|
31358
|
+
throw new TypeError(FUNC_ERROR_TEXT);
|
|
31309
31359
|
}
|
|
31310
31360
|
return function() {
|
|
31311
31361
|
var args = arguments;
|
|
@@ -31332,7 +31382,7 @@ function _type_of$j(obj) {
|
|
|
31332
31382
|
* @param {Function} [customizer] The function to customize path creation.
|
|
31333
31383
|
* @returns {Object} Returns `object`.
|
|
31334
31384
|
*/ function baseSet(object, path, value, customizer) {
|
|
31335
|
-
if (!isObject$
|
|
31385
|
+
if (!isObject$2(object)) {
|
|
31336
31386
|
return object;
|
|
31337
31387
|
}
|
|
31338
31388
|
path = castPath(path, object);
|
|
@@ -31346,7 +31396,7 @@ function _type_of$j(obj) {
|
|
|
31346
31396
|
var objValue = nested[key];
|
|
31347
31397
|
newValue = undefined;
|
|
31348
31398
|
if (newValue === undefined) {
|
|
31349
|
-
newValue = isObject$
|
|
31399
|
+
newValue = isObject$2(objValue) ? objValue : isIndex$1(path[index + 1]) ? [] : {};
|
|
31350
31400
|
}
|
|
31351
31401
|
}
|
|
31352
31402
|
assignValue(nested, key, newValue);
|
|
@@ -31458,7 +31508,7 @@ function _type_of$j(obj) {
|
|
|
31458
31508
|
* }, {});
|
|
31459
31509
|
* // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)
|
|
31460
31510
|
*/ function reduce(collection, iteratee, accumulator) {
|
|
31461
|
-
var func = isArray$1
|
|
31511
|
+
var func = isArray$1(collection) ? arrayReduce : baseReduce, initAccum = arguments.length < 3;
|
|
31462
31512
|
return func(collection, baseIteratee(iteratee), accumulator, initAccum, baseEach);
|
|
31463
31513
|
}
|
|
31464
31514
|
/**
|
|
@@ -31495,7 +31545,7 @@ function _type_of$j(obj) {
|
|
|
31495
31545
|
* _.reject(users, 'active');
|
|
31496
31546
|
* // => objects for ['barney']
|
|
31497
31547
|
*/ function reject(collection, predicate) {
|
|
31498
|
-
var func = isArray$1
|
|
31548
|
+
var func = isArray$1(collection) ? arrayFilter : baseFilter;
|
|
31499
31549
|
return func(collection, negate(baseIteratee(predicate)));
|
|
31500
31550
|
}
|
|
31501
31551
|
/**
|
|
@@ -31550,10 +31600,10 @@ function _type_of$j(obj) {
|
|
|
31550
31600
|
* _.some(users, 'active');
|
|
31551
31601
|
* // => true
|
|
31552
31602
|
*/ function some(collection, predicate, guard) {
|
|
31553
|
-
var func = isArray$1
|
|
31603
|
+
var func = isArray$1(collection) ? arraySome : baseSome;
|
|
31554
31604
|
return func(collection, baseIteratee(predicate));
|
|
31555
31605
|
}
|
|
31556
|
-
/** Used as references for various `Number` constants. */ var INFINITY$
|
|
31606
|
+
/** Used as references for various `Number` constants. */ var INFINITY$2 = 1 / 0;
|
|
31557
31607
|
/**
|
|
31558
31608
|
* Creates a set object of `values`.
|
|
31559
31609
|
*
|
|
@@ -31563,7 +31613,7 @@ function _type_of$j(obj) {
|
|
|
31563
31613
|
*/ var createSet = !(Set$1 && 1 / setToArray(new Set$1([
|
|
31564
31614
|
,
|
|
31565
31615
|
-0
|
|
31566
|
-
]))[1] == INFINITY$
|
|
31616
|
+
]))[1] == INFINITY$2) ? noop : function createSet(values) {
|
|
31567
31617
|
return new Set$1(values);
|
|
31568
31618
|
};
|
|
31569
31619
|
/** Used as the size to enable large array optimizations. */ var LARGE_ARRAY_SIZE = 200;
|
|
@@ -31771,7 +31821,7 @@ function tokenLabel$1(tokType) {
|
|
|
31771
31821
|
}
|
|
31772
31822
|
// TODO: duplicated code to avoid extracting another sub-package -- how to avoid?
|
|
31773
31823
|
function hasTokenLabel$1(obj) {
|
|
31774
|
-
return isString$1
|
|
31824
|
+
return isString$1(obj.LABEL) && obj.LABEL !== "";
|
|
31775
31825
|
}
|
|
31776
31826
|
var AbstractProduction = /*#__PURE__*/ function() {
|
|
31777
31827
|
function AbstractProduction(_definition) {
|
|
@@ -32000,7 +32050,7 @@ function serializeProduction(node) {
|
|
|
32000
32050
|
name: node.nonTerminalName,
|
|
32001
32051
|
idx: node.idx
|
|
32002
32052
|
};
|
|
32003
|
-
if (isString$1
|
|
32053
|
+
if (isString$1(node.label)) {
|
|
32004
32054
|
serializedNonTerminal.label = node.label;
|
|
32005
32055
|
}
|
|
32006
32056
|
return serializedNonTerminal;
|
|
@@ -32058,7 +32108,7 @@ function serializeProduction(node) {
|
|
|
32058
32108
|
label: tokenLabel$1(node.terminalType),
|
|
32059
32109
|
idx: node.idx
|
|
32060
32110
|
};
|
|
32061
|
-
if (isString$1
|
|
32111
|
+
if (isString$1(node.label)) {
|
|
32062
32112
|
serializedTerminal.terminalLabel = node.label;
|
|
32063
32113
|
}
|
|
32064
32114
|
var pattern = node.terminalType.PATTERN;
|
|
@@ -32501,7 +32551,7 @@ function _inherits$d(subClass, superClass) {
|
|
|
32501
32551
|
if (superClass) _set_prototype_of$d(subClass, superClass);
|
|
32502
32552
|
}
|
|
32503
32553
|
function _possible_constructor_return$d(self1, call) {
|
|
32504
|
-
if (call && (_type_of$g
|
|
32554
|
+
if (call && (_type_of$g(call) === "object" || typeof call === "function")) {
|
|
32505
32555
|
return call;
|
|
32506
32556
|
}
|
|
32507
32557
|
return _assert_this_initialized$d(self1);
|
|
@@ -32513,7 +32563,7 @@ function _set_prototype_of$d(o, p) {
|
|
|
32513
32563
|
};
|
|
32514
32564
|
return _set_prototype_of$d(o, p);
|
|
32515
32565
|
}
|
|
32516
|
-
function _type_of$g
|
|
32566
|
+
function _type_of$g(obj) {
|
|
32517
32567
|
"@swc/helpers - typeof";
|
|
32518
32568
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
32519
32569
|
}
|
|
@@ -33827,7 +33877,7 @@ function _instanceof$7(left, right) {
|
|
|
33827
33877
|
}
|
|
33828
33878
|
}
|
|
33829
33879
|
function _possible_constructor_return$c(self1, call) {
|
|
33830
|
-
if (call && (_type_of$f
|
|
33880
|
+
if (call && (_type_of$f(call) === "object" || typeof call === "function")) {
|
|
33831
33881
|
return call;
|
|
33832
33882
|
}
|
|
33833
33883
|
return _assert_this_initialized$c(self1);
|
|
@@ -33846,7 +33896,7 @@ function _super_prop_base$2(object, property) {
|
|
|
33846
33896
|
}
|
|
33847
33897
|
return object;
|
|
33848
33898
|
}
|
|
33849
|
-
function _type_of$f
|
|
33899
|
+
function _type_of$f(obj) {
|
|
33850
33900
|
"@swc/helpers - typeof";
|
|
33851
33901
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
33852
33902
|
}
|
|
@@ -34027,7 +34077,7 @@ function isWholeOptional(ast) {
|
|
|
34027
34077
|
if (!ast.value) {
|
|
34028
34078
|
return false;
|
|
34029
34079
|
}
|
|
34030
|
-
return isArray$1
|
|
34080
|
+
return isArray$1(ast.value) ? every(ast.value, isWholeOptional) : isWholeOptional(ast.value);
|
|
34031
34081
|
}
|
|
34032
34082
|
var CharCodeFinder = /*#__PURE__*/ function(BaseRegExpVisitor) {
|
|
34033
34083
|
_inherits$c(CharCodeFinder, BaseRegExpVisitor);
|
|
@@ -34141,7 +34191,7 @@ function _inherits$b(subClass, superClass) {
|
|
|
34141
34191
|
});
|
|
34142
34192
|
if (superClass) _set_prototype_of$b(subClass, superClass);
|
|
34143
34193
|
}
|
|
34144
|
-
function _instanceof$6
|
|
34194
|
+
function _instanceof$6(left, right) {
|
|
34145
34195
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
34146
34196
|
return !!right[Symbol.hasInstance](left);
|
|
34147
34197
|
} else {
|
|
@@ -34149,7 +34199,7 @@ function _instanceof$6$1(left, right) {
|
|
|
34149
34199
|
}
|
|
34150
34200
|
}
|
|
34151
34201
|
function _possible_constructor_return$b(self1, call) {
|
|
34152
|
-
if (call && (_type_of$e
|
|
34202
|
+
if (call && (_type_of$e(call) === "object" || typeof call === "function")) {
|
|
34153
34203
|
return call;
|
|
34154
34204
|
}
|
|
34155
34205
|
return _assert_this_initialized$b(self1);
|
|
@@ -34161,7 +34211,7 @@ function _set_prototype_of$b(o, p) {
|
|
|
34161
34211
|
};
|
|
34162
34212
|
return _set_prototype_of$b(o, p);
|
|
34163
34213
|
}
|
|
34164
|
-
function _type_of$e
|
|
34214
|
+
function _type_of$e(obj) {
|
|
34165
34215
|
"@swc/helpers - typeof";
|
|
34166
34216
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
34167
34217
|
}
|
|
@@ -34260,7 +34310,7 @@ function analyzeTokenTypes(tokenTypes, options) {
|
|
|
34260
34310
|
return {
|
|
34261
34311
|
exec: currPattern
|
|
34262
34312
|
};
|
|
34263
|
-
} else if ((typeof currPattern === "undefined" ? "undefined" : _type_of$e
|
|
34313
|
+
} else if ((typeof currPattern === "undefined" ? "undefined" : _type_of$e(currPattern)) === "object") {
|
|
34264
34314
|
hasCustom = true;
|
|
34265
34315
|
// ICustomPattern
|
|
34266
34316
|
return currPattern;
|
|
@@ -34290,7 +34340,7 @@ function analyzeTokenTypes(tokenTypes, options) {
|
|
|
34290
34340
|
var groupName = clazz.GROUP;
|
|
34291
34341
|
/* istanbul ignore next */ if (groupName === Lexer.SKIPPED) {
|
|
34292
34342
|
return undefined;
|
|
34293
|
-
} else if (isString$1
|
|
34343
|
+
} else if (isString$1(groupName)) {
|
|
34294
34344
|
return groupName;
|
|
34295
34345
|
} else if (isUndefined(groupName)) {
|
|
34296
34346
|
return false;
|
|
@@ -34301,7 +34351,7 @@ function analyzeTokenTypes(tokenTypes, options) {
|
|
|
34301
34351
|
patternIdxToLongerAltIdxArr = map(onlyRelevantTypes, function(clazz) {
|
|
34302
34352
|
var longerAltType = clazz.LONGER_ALT;
|
|
34303
34353
|
if (longerAltType) {
|
|
34304
|
-
var longerAltIdxArr = isArray$1
|
|
34354
|
+
var longerAltIdxArr = isArray$1(longerAltType) ? map(longerAltType, function(type) {
|
|
34305
34355
|
return indexOf(onlyRelevantTypes, type);
|
|
34306
34356
|
}) : [
|
|
34307
34357
|
indexOf(onlyRelevantTypes, longerAltType)
|
|
@@ -34341,7 +34391,7 @@ function analyzeTokenTypes(tokenTypes, options) {
|
|
|
34341
34391
|
patternIdxToShort = map(allTransformedPatterns, isShortPattern);
|
|
34342
34392
|
emptyGroups = reduce(onlyRelevantTypes, function(acc, clazz) {
|
|
34343
34393
|
var groupName = clazz.GROUP;
|
|
34344
|
-
if (isString$1
|
|
34394
|
+
if (isString$1(groupName) && !(groupName === Lexer.SKIPPED)) {
|
|
34345
34395
|
acc[groupName] = [];
|
|
34346
34396
|
}
|
|
34347
34397
|
return acc;
|
|
@@ -34370,7 +34420,7 @@ function analyzeTokenTypes(tokenTypes, options) {
|
|
|
34370
34420
|
var charCode = currTokType.PATTERN.charCodeAt(0);
|
|
34371
34421
|
var optimizedIdx = charCodeToOptimizedIndex(charCode);
|
|
34372
34422
|
addToMapOfArrays(result, optimizedIdx, patternIdxToConfig[idx]);
|
|
34373
|
-
} else if (isArray$1
|
|
34423
|
+
} else if (isArray$1(currTokType.START_CHARS_HINT)) {
|
|
34374
34424
|
var lastOptimizedIdx;
|
|
34375
34425
|
forEach(currTokType.START_CHARS_HINT, function(charOrInt) {
|
|
34376
34426
|
var charCode = typeof charOrInt === "string" ? charOrInt.charCodeAt(0) : charOrInt;
|
|
@@ -34468,7 +34518,7 @@ function findMissingPatterns(tokenTypes) {
|
|
|
34468
34518
|
function findInvalidPatterns(tokenTypes) {
|
|
34469
34519
|
var tokenTypesWithInvalidPattern = filter(tokenTypes, function(currType) {
|
|
34470
34520
|
var pattern = currType[PATTERN];
|
|
34471
|
-
return !isRegExp(pattern) && !isFunction$1(pattern) && !has$1(pattern, "exec") && !isString$1
|
|
34521
|
+
return !isRegExp(pattern) && !isFunction$1(pattern) && !has$1(pattern, "exec") && !isString$1(pattern);
|
|
34472
34522
|
});
|
|
34473
34523
|
var errors = map(tokenTypesWithInvalidPattern, function(currType) {
|
|
34474
34524
|
return {
|
|
@@ -34598,7 +34648,7 @@ function findStartOfInputAnchor(tokenTypes) {
|
|
|
34598
34648
|
function findUnsupportedFlags(tokenTypes) {
|
|
34599
34649
|
var invalidFlags = filter(tokenTypes, function(currType) {
|
|
34600
34650
|
var pattern = currType[PATTERN];
|
|
34601
|
-
return _instanceof$6
|
|
34651
|
+
return _instanceof$6(pattern, RegExp) && (pattern.multiline || pattern.global);
|
|
34602
34652
|
});
|
|
34603
34653
|
var errors = map(invalidFlags, function(currType) {
|
|
34604
34654
|
return {
|
|
@@ -34649,7 +34699,7 @@ function findInvalidGroupType(tokenTypes) {
|
|
|
34649
34699
|
return false;
|
|
34650
34700
|
}
|
|
34651
34701
|
var group = clazz.GROUP;
|
|
34652
|
-
return group !== Lexer.SKIPPED && group !== Lexer.NA && !isString$1
|
|
34702
|
+
return group !== Lexer.SKIPPED && group !== Lexer.NA && !isString$1(group);
|
|
34653
34703
|
});
|
|
34654
34704
|
var errors = map(invalidTypes, function(currType) {
|
|
34655
34705
|
return {
|
|
@@ -34687,7 +34737,7 @@ function findUnreachablePatterns(tokenTypes) {
|
|
|
34687
34737
|
}
|
|
34688
34738
|
// a more comprehensive validation for all forms of regExps would require
|
|
34689
34739
|
// deeper regExp analysis capabilities
|
|
34690
|
-
if (isString$1
|
|
34740
|
+
if (isString$1(pattern)) {
|
|
34691
34741
|
result.push({
|
|
34692
34742
|
str: pattern,
|
|
34693
34743
|
idx: idx,
|
|
@@ -34799,7 +34849,7 @@ function performRuntimeChecks(lexerDefinition, trackLines, lineTerminatorCharact
|
|
|
34799
34849
|
type: LexerDefinitionErrorType.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED
|
|
34800
34850
|
});
|
|
34801
34851
|
} else if (has$1(currTokType, "LONGER_ALT")) {
|
|
34802
|
-
var longerAlt = isArray$1
|
|
34852
|
+
var longerAlt = isArray$1(currTokType.LONGER_ALT) ? currTokType.LONGER_ALT : [
|
|
34803
34853
|
currTokType.LONGER_ALT
|
|
34804
34854
|
];
|
|
34805
34855
|
forEach(longerAlt, function(currLongerAlt) {
|
|
@@ -34862,7 +34912,7 @@ function cloneEmptyGroups(emptyGroups) {
|
|
|
34862
34912
|
var groupKeys = keys$1(emptyGroups);
|
|
34863
34913
|
forEach(groupKeys, function(currKey) {
|
|
34864
34914
|
var currGroupValue = emptyGroups[currKey];
|
|
34865
|
-
/* istanbul ignore else */ if (isArray$1
|
|
34915
|
+
/* istanbul ignore else */ if (isArray$1(currGroupValue)) {
|
|
34866
34916
|
clonedResult[currKey] = [];
|
|
34867
34917
|
} else {
|
|
34868
34918
|
throw Error("non exhaustive match");
|
|
@@ -34881,14 +34931,14 @@ function isCustomPattern(tokenType) {
|
|
|
34881
34931
|
} else if (has$1(pattern, "exec")) {
|
|
34882
34932
|
// ICustomPattern
|
|
34883
34933
|
return true;
|
|
34884
|
-
} else if (isString$1
|
|
34934
|
+
} else if (isString$1(pattern)) {
|
|
34885
34935
|
return false;
|
|
34886
34936
|
} else {
|
|
34887
34937
|
throw Error("non exhaustive match");
|
|
34888
34938
|
}
|
|
34889
34939
|
}
|
|
34890
34940
|
function isShortPattern(pattern) {
|
|
34891
|
-
if (isString$1
|
|
34941
|
+
if (isString$1(pattern) && pattern.length === 1) {
|
|
34892
34942
|
return pattern.charCodeAt(0);
|
|
34893
34943
|
} else {
|
|
34894
34944
|
return false;
|
|
@@ -34935,7 +34985,7 @@ function checkLineBreaksIssues(tokType, lineTerminatorCharCodes) {
|
|
|
34935
34985
|
};
|
|
34936
34986
|
}
|
|
34937
34987
|
return false;
|
|
34938
|
-
} else if (isString$1
|
|
34988
|
+
} else if (isString$1(tokType.PATTERN)) {
|
|
34939
34989
|
// string literal patterns can always be analyzed to detect line terminator usage
|
|
34940
34990
|
return false;
|
|
34941
34991
|
} else if (isCustomPattern(tokType)) {
|
|
@@ -34959,7 +35009,7 @@ function buildLineBreakIssueMessage(tokType, details) {
|
|
|
34959
35009
|
}
|
|
34960
35010
|
function getCharCodes(charsOrCodes) {
|
|
34961
35011
|
var charCodes = map(charsOrCodes, function(numOrString) {
|
|
34962
|
-
if (isString$1
|
|
35012
|
+
if (isString$1(numOrString)) {
|
|
34963
35013
|
return numOrString.charCodeAt(0);
|
|
34964
35014
|
} else {
|
|
34965
35015
|
return numOrString;
|
|
@@ -35062,7 +35112,7 @@ function assignTokenDefaultProps(tokenTypes) {
|
|
|
35062
35112
|
currTokType.tokenTypeIdx = tokenShortNameIdx++;
|
|
35063
35113
|
}
|
|
35064
35114
|
// CATEGORIES? : TokenType | TokenType[]
|
|
35065
|
-
if (hasCategoriesProperty(currTokType) && !isArray$1
|
|
35115
|
+
if (hasCategoriesProperty(currTokType) && !isArray$1(currTokType.CATEGORIES)) {
|
|
35066
35116
|
currTokType.CATEGORIES = [
|
|
35067
35117
|
currTokType.CATEGORIES
|
|
35068
35118
|
];
|
|
@@ -35252,7 +35302,7 @@ var Lexer = /*#__PURE__*/ function() {
|
|
|
35252
35302
|
_this.trackStartLines = /full|onlyStart/i.test(_this.config.positionTracking);
|
|
35253
35303
|
_this.trackEndLines = /full/i.test(_this.config.positionTracking);
|
|
35254
35304
|
// Convert SingleModeLexerDefinition into a IMultiModeLexerDefinition.
|
|
35255
|
-
if (isArray$1
|
|
35305
|
+
if (isArray$1(lexerDefinition)) {
|
|
35256
35306
|
actualDefinition = {
|
|
35257
35307
|
modes: {
|
|
35258
35308
|
defaultMode: clone(lexerDefinition)
|
|
@@ -35810,7 +35860,7 @@ function tokenLabel(tokType) {
|
|
|
35810
35860
|
}
|
|
35811
35861
|
}
|
|
35812
35862
|
function hasTokenLabel(obj) {
|
|
35813
|
-
return isString$1
|
|
35863
|
+
return isString$1(obj.LABEL) && obj.LABEL !== "";
|
|
35814
35864
|
}
|
|
35815
35865
|
var PARENT = "parent";
|
|
35816
35866
|
var CATEGORIES = "categories";
|
|
@@ -36099,7 +36149,7 @@ function _inherits$a(subClass, superClass) {
|
|
|
36099
36149
|
if (superClass) _set_prototype_of$a(subClass, superClass);
|
|
36100
36150
|
}
|
|
36101
36151
|
function _possible_constructor_return$a(self1, call) {
|
|
36102
|
-
if (call && (_type_of$d
|
|
36152
|
+
if (call && (_type_of$d(call) === "object" || typeof call === "function")) {
|
|
36103
36153
|
return call;
|
|
36104
36154
|
}
|
|
36105
36155
|
return _assert_this_initialized$a(self1);
|
|
@@ -36111,7 +36161,7 @@ function _set_prototype_of$a(o, p) {
|
|
|
36111
36161
|
};
|
|
36112
36162
|
return _set_prototype_of$a(o, p);
|
|
36113
36163
|
}
|
|
36114
|
-
function _type_of$d
|
|
36164
|
+
function _type_of$d(obj) {
|
|
36115
36165
|
"@swc/helpers - typeof";
|
|
36116
36166
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
36117
36167
|
}
|
|
@@ -36254,7 +36304,7 @@ function _instanceof$4$1(left, right) {
|
|
|
36254
36304
|
}
|
|
36255
36305
|
}
|
|
36256
36306
|
function _possible_constructor_return$9(self1, call) {
|
|
36257
|
-
if (call && (_type_of$c
|
|
36307
|
+
if (call && (_type_of$c(call) === "object" || typeof call === "function")) {
|
|
36258
36308
|
return call;
|
|
36259
36309
|
}
|
|
36260
36310
|
return _assert_this_initialized$9(self1);
|
|
@@ -36273,7 +36323,7 @@ function _super_prop_base$1(object, property) {
|
|
|
36273
36323
|
}
|
|
36274
36324
|
return object;
|
|
36275
36325
|
}
|
|
36276
|
-
function _type_of$c
|
|
36326
|
+
function _type_of$c(obj) {
|
|
36277
36327
|
"@swc/helpers - typeof";
|
|
36278
36328
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
36279
36329
|
}
|
|
@@ -36936,7 +36986,7 @@ function _instanceof$3$1(left, right) {
|
|
|
36936
36986
|
}
|
|
36937
36987
|
}
|
|
36938
36988
|
function _possible_constructor_return$8(self1, call) {
|
|
36939
|
-
if (call && (_type_of$b
|
|
36989
|
+
if (call && (_type_of$b(call) === "object" || typeof call === "function")) {
|
|
36940
36990
|
return call;
|
|
36941
36991
|
}
|
|
36942
36992
|
return _assert_this_initialized$8(self1);
|
|
@@ -36955,7 +37005,7 @@ function _super_prop_base(object, property) {
|
|
|
36955
37005
|
}
|
|
36956
37006
|
return object;
|
|
36957
37007
|
}
|
|
36958
|
-
function _type_of$b
|
|
37008
|
+
function _type_of$b(obj) {
|
|
36959
37009
|
"@swc/helpers - typeof";
|
|
36960
37010
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
36961
37011
|
}
|
|
@@ -37530,7 +37580,7 @@ function _instanceof$2$1(left, right) {
|
|
|
37530
37580
|
}
|
|
37531
37581
|
}
|
|
37532
37582
|
function _possible_constructor_return$7(self1, call) {
|
|
37533
|
-
if (call && (_type_of$a
|
|
37583
|
+
if (call && (_type_of$a(call) === "object" || typeof call === "function")) {
|
|
37534
37584
|
return call;
|
|
37535
37585
|
}
|
|
37536
37586
|
return _assert_this_initialized$7(self1);
|
|
@@ -37542,7 +37592,7 @@ function _set_prototype_of$7(o, p) {
|
|
|
37542
37592
|
};
|
|
37543
37593
|
return _set_prototype_of$7(o, p);
|
|
37544
37594
|
}
|
|
37545
|
-
function _type_of$a
|
|
37595
|
+
function _type_of$a(obj) {
|
|
37546
37596
|
"@swc/helpers - typeof";
|
|
37547
37597
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
37548
37598
|
}
|
|
@@ -39280,7 +39330,7 @@ function createBaseSemanticVisitorConstructor(grammarName, ruleNames) {
|
|
|
39280
39330
|
var semanticProto = {
|
|
39281
39331
|
visit: function visit(cstNode, param) {
|
|
39282
39332
|
// enables writing more concise visitor methods when CstNode has only a single child
|
|
39283
|
-
if (isArray$1
|
|
39333
|
+
if (isArray$1(cstNode)) {
|
|
39284
39334
|
// A CST Node's children dictionary can never have empty arrays as values
|
|
39285
39335
|
// If a key is defined there will be at least one element in the corresponding value array.
|
|
39286
39336
|
cstNode = cstNode[0];
|
|
@@ -40374,7 +40424,7 @@ function _create_class$6(Constructor, protoProps, staticProps) {
|
|
|
40374
40424
|
if (has$1(config, "serializedGrammar")) {
|
|
40375
40425
|
throw Error("The Parser's configuration can no longer contain a <serializedGrammar> property.\n" + "\tSee: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0\n" + "\tFor Further details.");
|
|
40376
40426
|
}
|
|
40377
|
-
if (isArray$1
|
|
40427
|
+
if (isArray$1(tokenVocabulary)) {
|
|
40378
40428
|
// This only checks for Token vocabularies provided as arrays.
|
|
40379
40429
|
// That is good enough because the main objective is to detect users of pre-V4.0 APIs
|
|
40380
40430
|
// rather than all edge cases of empty Token vocabularies.
|
|
@@ -40385,7 +40435,7 @@ function _create_class$6(Constructor, protoProps, staticProps) {
|
|
|
40385
40435
|
throw Error("The Parser constructor no longer accepts a token vector as the first argument.\n" + "\tSee: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0\n" + "\tFor Further details.");
|
|
40386
40436
|
}
|
|
40387
40437
|
}
|
|
40388
|
-
if (isArray$1
|
|
40438
|
+
if (isArray$1(tokenVocabulary)) {
|
|
40389
40439
|
this.tokensMap = reduce(tokenVocabulary, function(acc, tokType) {
|
|
40390
40440
|
acc[tokType.name] = tokType;
|
|
40391
40441
|
return acc;
|
|
@@ -40397,7 +40447,7 @@ function _create_class$6(Constructor, protoProps, staticProps) {
|
|
|
40397
40447
|
acc[tokType.name] = tokType;
|
|
40398
40448
|
return acc;
|
|
40399
40449
|
}, {});
|
|
40400
|
-
} else if (isObject$
|
|
40450
|
+
} else if (isObject$2(tokenVocabulary)) {
|
|
40401
40451
|
this.tokensMap = clone(tokenVocabulary);
|
|
40402
40452
|
} else {
|
|
40403
40453
|
throw new Error("<tokensDictionary> argument must be An Array of Token constructors," + " A dictionary of Token constructors or an IMultiModeLexerDefinition");
|
|
@@ -40759,7 +40809,7 @@ function _create_class$6(Constructor, protoProps, staticProps) {
|
|
|
40759
40809
|
key: "orInternal",
|
|
40760
40810
|
value: function orInternal(altsOrOpts, occurrence) {
|
|
40761
40811
|
var laKey = this.getKeyForAutomaticLookahead(OR_IDX, occurrence);
|
|
40762
|
-
var alts = isArray$1
|
|
40812
|
+
var alts = isArray$1(altsOrOpts) ? altsOrOpts : altsOrOpts.DEF;
|
|
40763
40813
|
var laFunc = this.getLaFuncFromCache(laKey);
|
|
40764
40814
|
var altIdxToTake = laFunc.call(this, alts);
|
|
40765
40815
|
if (altIdxToTake !== undefined) {
|
|
@@ -41417,7 +41467,7 @@ function recordOrProd(mainProdArg, occurrence) {
|
|
|
41417
41467
|
assertMethodIdxIsValid(occurrence);
|
|
41418
41468
|
var prevProd = last(this.recordingProdStack);
|
|
41419
41469
|
// Only an array of alternatives
|
|
41420
|
-
var hasOptions = isArray$1
|
|
41470
|
+
var hasOptions = isArray$1(mainProdArg) === false;
|
|
41421
41471
|
var alts = hasOptions === false ? mainProdArg : mainProdArg.DEF;
|
|
41422
41472
|
var newOrProd = new Alternation({
|
|
41423
41473
|
definition: [],
|
|
@@ -42480,7 +42530,7 @@ var isString$4 = function(value) {
|
|
|
42480
42530
|
var isArray$4 = function(value) {
|
|
42481
42531
|
return getCelType(value) === CelType.list;
|
|
42482
42532
|
};
|
|
42483
|
-
var isBoolean
|
|
42533
|
+
var isBoolean = function(value) {
|
|
42484
42534
|
return getCelType(value) === CelType.bool;
|
|
42485
42535
|
};
|
|
42486
42536
|
var isMap = function(value) {
|
|
@@ -42581,13 +42631,13 @@ var moduloOperation = function(left, right) {
|
|
|
42581
42631
|
throw new CelTypeError(Operations.modulo, left, right);
|
|
42582
42632
|
};
|
|
42583
42633
|
var logicalAndOperation = function(left, right) {
|
|
42584
|
-
if (isBoolean
|
|
42634
|
+
if (isBoolean(left) && isBoolean(right)) {
|
|
42585
42635
|
return left && right;
|
|
42586
42636
|
}
|
|
42587
42637
|
throw new CelTypeError(Operations.logicalAnd, left, right);
|
|
42588
42638
|
};
|
|
42589
42639
|
var logicalOrOperation = function(left, right) {
|
|
42590
|
-
if (isBoolean
|
|
42640
|
+
if (isBoolean(left) && isBoolean(right)) {
|
|
42591
42641
|
return left || right;
|
|
42592
42642
|
}
|
|
42593
42643
|
throw new CelTypeError(Operations.logicalOr, left, right);
|
|
@@ -42669,7 +42719,7 @@ var getResult = function(operator, left, right) {
|
|
|
42669
42719
|
if (operand === null) {
|
|
42670
42720
|
return !isEvenOperators; // Odd number gives true, even gives false
|
|
42671
42721
|
}
|
|
42672
|
-
if (!isBoolean
|
|
42722
|
+
if (!isBoolean(operand)) {
|
|
42673
42723
|
throw new CelTypeError('logical negation', operand, null);
|
|
42674
42724
|
}
|
|
42675
42725
|
return isEvenOperators ? operand : !operand;
|
|
@@ -44177,7 +44227,7 @@ var CelVisitor = /*#__PURE__*/ function(BaseCelVisitor) {
|
|
|
44177
44227
|
return CelVisitor;
|
|
44178
44228
|
}(BaseCelVisitor);
|
|
44179
44229
|
var parserInstance = new CelParser();
|
|
44180
|
-
function parse$
|
|
44230
|
+
function parse$9(expression) {
|
|
44181
44231
|
var lexResult = CELLexer.tokenize(expression);
|
|
44182
44232
|
parserInstance.input = lexResult.tokens;
|
|
44183
44233
|
var cst = parserInstance.expr();
|
|
@@ -44195,7 +44245,7 @@ function parse$8(expression) {
|
|
|
44195
44245
|
};
|
|
44196
44246
|
}
|
|
44197
44247
|
function evaluate(expression, context, functions) {
|
|
44198
|
-
var result = typeof expression === 'string' ? parse$
|
|
44248
|
+
var result = typeof expression === 'string' ? parse$9(expression) : {
|
|
44199
44249
|
isSuccess: true,
|
|
44200
44250
|
cst: expression
|
|
44201
44251
|
};
|
|
@@ -44397,7 +44447,7 @@ function _object_spread_props(target, source) {
|
|
|
44397
44447
|
prefix: '_'
|
|
44398
44448
|
})).join('').toLowerCase();
|
|
44399
44449
|
}
|
|
44400
|
-
const Handlebars =
|
|
44450
|
+
const Handlebars = handlebars_min_default || HandlebarsNamespace;
|
|
44401
44451
|
Handlebars.registerHelper('JSONstringify', function(value) {
|
|
44402
44452
|
return JSON.stringify(value);
|
|
44403
44453
|
});
|
|
@@ -44658,7 +44708,7 @@ const preparePinsSettings = (settings, context)=>{
|
|
|
44658
44708
|
};
|
|
44659
44709
|
};
|
|
44660
44710
|
|
|
44661
|
-
var jws$
|
|
44711
|
+
var jws$2 = {};
|
|
44662
44712
|
|
|
44663
44713
|
var safeBuffer = {
|
|
44664
44714
|
exports: {}
|
|
@@ -44728,7 +44778,7 @@ var safeBufferExports = safeBuffer.exports;
|
|
|
44728
44778
|
|
|
44729
44779
|
/*global module, process*/
|
|
44730
44780
|
|
|
44731
|
-
function _type_of$
|
|
44781
|
+
function _type_of$9(obj) {
|
|
44732
44782
|
"@swc/helpers - typeof";
|
|
44733
44783
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
44734
44784
|
}
|
|
@@ -44752,7 +44802,7 @@ function DataStream$2(data) {
|
|
|
44752
44802
|
}
|
|
44753
44803
|
// Buffer or String
|
|
44754
44804
|
// or Object (assumedly a passworded key)
|
|
44755
|
-
if (data.length || (typeof data === "undefined" ? "undefined" : _type_of$
|
|
44805
|
+
if (data.length || (typeof data === "undefined" ? "undefined" : _type_of$9(data)) === 'object') {
|
|
44756
44806
|
this.buffer = data;
|
|
44757
44807
|
this.writable = false;
|
|
44758
44808
|
process.nextTick((function() {
|
|
@@ -44762,7 +44812,7 @@ function DataStream$2(data) {
|
|
|
44762
44812
|
}).bind(this));
|
|
44763
44813
|
return this;
|
|
44764
44814
|
}
|
|
44765
|
-
throw new TypeError('Unexpected data type (' + (typeof data === "undefined" ? "undefined" : _type_of$
|
|
44815
|
+
throw new TypeError('Unexpected data type (' + (typeof data === "undefined" ? "undefined" : _type_of$9(data)) + ')');
|
|
44766
44816
|
}
|
|
44767
44817
|
util$3.inherits(DataStream$2, Stream$2);
|
|
44768
44818
|
DataStream$2.prototype.write = function write(data) {
|
|
@@ -44976,7 +45026,7 @@ function requireBufferEqualConstantTime () {
|
|
|
44976
45026
|
return bufferEqualConstantTime;
|
|
44977
45027
|
}
|
|
44978
45028
|
|
|
44979
|
-
function _type_of$
|
|
45029
|
+
function _type_of$8(obj) {
|
|
44980
45030
|
"@swc/helpers - typeof";
|
|
44981
45031
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
44982
45032
|
}
|
|
@@ -45003,7 +45053,7 @@ function checkIsPublicKey(key) {
|
|
|
45003
45053
|
if (!supportsKeyObjects) {
|
|
45004
45054
|
throw typeError(MSG_INVALID_VERIFIER_KEY);
|
|
45005
45055
|
}
|
|
45006
|
-
if ((typeof key === "undefined" ? "undefined" : _type_of$
|
|
45056
|
+
if ((typeof key === "undefined" ? "undefined" : _type_of$8(key)) !== 'object') {
|
|
45007
45057
|
throw typeError(MSG_INVALID_VERIFIER_KEY);
|
|
45008
45058
|
}
|
|
45009
45059
|
if (typeof key.type !== 'string') {
|
|
@@ -45023,7 +45073,7 @@ function checkIsPrivateKey(key) {
|
|
|
45023
45073
|
if (typeof key === 'string') {
|
|
45024
45074
|
return;
|
|
45025
45075
|
}
|
|
45026
|
-
if ((typeof key === "undefined" ? "undefined" : _type_of$
|
|
45076
|
+
if ((typeof key === "undefined" ? "undefined" : _type_of$8(key)) === 'object') {
|
|
45027
45077
|
return;
|
|
45028
45078
|
}
|
|
45029
45079
|
throw typeError(MSG_INVALID_SIGNER_KEY);
|
|
@@ -45038,7 +45088,7 @@ function checkIsSecretKey(key) {
|
|
|
45038
45088
|
if (!supportsKeyObjects) {
|
|
45039
45089
|
throw typeError(MSG_INVALID_SECRET);
|
|
45040
45090
|
}
|
|
45041
|
-
if ((typeof key === "undefined" ? "undefined" : _type_of$
|
|
45091
|
+
if ((typeof key === "undefined" ? "undefined" : _type_of$8(key)) !== 'object') {
|
|
45042
45092
|
throw typeError(MSG_INVALID_SECRET);
|
|
45043
45093
|
}
|
|
45044
45094
|
if (key.type !== 'secret') {
|
|
@@ -45189,7 +45239,7 @@ var jwa$2 = function jwa(algorithm) {
|
|
|
45189
45239
|
es: createECDSAVerifer,
|
|
45190
45240
|
none: createNoneVerifier
|
|
45191
45241
|
};
|
|
45192
|
-
var match = algorithm.match(/^(RS|PS|ES|HS)(256|384|512)$|^(none)$/
|
|
45242
|
+
var match = algorithm.match(/^(RS|PS|ES|HS)(256|384|512)$|^(none)$/);
|
|
45193
45243
|
if (!match) throw typeError(MSG_INVALID_ALGORITHM, algorithm);
|
|
45194
45244
|
var algo = (match[1] || match[3]).toLowerCase();
|
|
45195
45245
|
var bits = match[2];
|
|
@@ -45236,7 +45286,12 @@ function jwsSign(opts) {
|
|
|
45236
45286
|
return util$1.format('%s.%s', securedInput, signature);
|
|
45237
45287
|
}
|
|
45238
45288
|
function SignStream$1(opts) {
|
|
45239
|
-
var secret = opts.secret
|
|
45289
|
+
var secret = opts.secret;
|
|
45290
|
+
secret = secret == null ? opts.privateKey : secret;
|
|
45291
|
+
secret = secret == null ? opts.key : secret;
|
|
45292
|
+
if (/^hs/i.test(opts.header.alg) === true && secret == null) {
|
|
45293
|
+
throw new TypeError('secret must be a string or buffer or a KeyObject');
|
|
45294
|
+
}
|
|
45240
45295
|
var secretStream = new DataStream$1(secret);
|
|
45241
45296
|
this.readable = true;
|
|
45242
45297
|
this.header = opts.header;
|
|
@@ -45282,11 +45337,11 @@ var Stream = require$$3;
|
|
|
45282
45337
|
var toString = tostring;
|
|
45283
45338
|
var util = require$$5;
|
|
45284
45339
|
var JWS_REGEX = /^[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?\.([a-zA-Z0-9\-_]+)?$/;
|
|
45285
|
-
function isObject$
|
|
45340
|
+
function isObject$1(thing) {
|
|
45286
45341
|
return Object.prototype.toString.call(thing) === '[object Object]';
|
|
45287
45342
|
}
|
|
45288
45343
|
function safeJsonParse(thing) {
|
|
45289
|
-
if (isObject$
|
|
45344
|
+
if (isObject$1(thing)) return thing;
|
|
45290
45345
|
try {
|
|
45291
45346
|
return JSON.parse(thing);
|
|
45292
45347
|
} catch (e) {
|
|
@@ -45339,7 +45394,12 @@ function jwsDecode(jwsSig, opts) {
|
|
|
45339
45394
|
}
|
|
45340
45395
|
function VerifyStream$1(opts) {
|
|
45341
45396
|
opts = opts || {};
|
|
45342
|
-
var secretOrKey = opts.secret
|
|
45397
|
+
var secretOrKey = opts.secret;
|
|
45398
|
+
secretOrKey = secretOrKey == null ? opts.publicKey : secretOrKey;
|
|
45399
|
+
secretOrKey = secretOrKey == null ? opts.key : secretOrKey;
|
|
45400
|
+
if (/^hs/i.test(opts.algorithm) === true && secretOrKey == null) {
|
|
45401
|
+
throw new TypeError('secret must be a string or buffer or a KeyObject');
|
|
45402
|
+
}
|
|
45343
45403
|
var secretStream = new DataStream(secretOrKey);
|
|
45344
45404
|
this.readable = true;
|
|
45345
45405
|
this.algorithm = opts.algorithm;
|
|
@@ -45392,26 +45452,26 @@ var ALGORITHMS = [
|
|
|
45392
45452
|
'ES384',
|
|
45393
45453
|
'ES512'
|
|
45394
45454
|
];
|
|
45395
|
-
jws$
|
|
45396
|
-
jws$
|
|
45397
|
-
jws$
|
|
45398
|
-
jws$
|
|
45399
|
-
jws$
|
|
45400
|
-
jws$
|
|
45455
|
+
jws$2.ALGORITHMS = ALGORITHMS;
|
|
45456
|
+
jws$2.sign = SignStream.sign;
|
|
45457
|
+
jws$2.verify = VerifyStream.verify;
|
|
45458
|
+
jws$2.decode = VerifyStream.decode;
|
|
45459
|
+
jws$2.isValid = VerifyStream.isValid;
|
|
45460
|
+
jws$2.createSign = function createSign(opts) {
|
|
45401
45461
|
return new SignStream(opts);
|
|
45402
45462
|
};
|
|
45403
|
-
jws$
|
|
45463
|
+
jws$2.createVerify = function createVerify(opts) {
|
|
45404
45464
|
return new VerifyStream(opts);
|
|
45405
45465
|
};
|
|
45406
45466
|
|
|
45407
|
-
function _type_of$
|
|
45467
|
+
function _type_of$7(obj) {
|
|
45408
45468
|
"@swc/helpers - typeof";
|
|
45409
45469
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
45410
45470
|
}
|
|
45411
|
-
var jws$
|
|
45471
|
+
var jws$1 = jws$2;
|
|
45412
45472
|
var decode$1 = function(jwt, options) {
|
|
45413
45473
|
options = options || {};
|
|
45414
|
-
var decoded = jws$
|
|
45474
|
+
var decoded = jws$1.decode(jwt, options);
|
|
45415
45475
|
if (!decoded) {
|
|
45416
45476
|
return null;
|
|
45417
45477
|
}
|
|
@@ -45420,7 +45480,7 @@ var decode$1 = function(jwt, options) {
|
|
|
45420
45480
|
if (typeof payload === 'string') {
|
|
45421
45481
|
try {
|
|
45422
45482
|
var obj = JSON.parse(payload);
|
|
45423
|
-
if (obj !== null && (typeof obj === "undefined" ? "undefined" : _type_of$
|
|
45483
|
+
if (obj !== null && (typeof obj === "undefined" ? "undefined" : _type_of$7(obj)) === 'object') {
|
|
45424
45484
|
payload = obj;
|
|
45425
45485
|
}
|
|
45426
45486
|
} catch (e) {}
|
|
@@ -45475,7 +45535,7 @@ var TokenExpiredError_1 = TokenExpiredError$1;
|
|
|
45475
45535
|
* Helpers.
|
|
45476
45536
|
*/
|
|
45477
45537
|
|
|
45478
|
-
function _type_of$
|
|
45538
|
+
function _type_of$6(obj) {
|
|
45479
45539
|
"@swc/helpers - typeof";
|
|
45480
45540
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
45481
45541
|
}
|
|
@@ -45499,9 +45559,9 @@ var y = d * 365.25;
|
|
|
45499
45559
|
* @api public
|
|
45500
45560
|
*/ var ms$1 = function(val, options) {
|
|
45501
45561
|
options = options || {};
|
|
45502
|
-
var type = typeof val === "undefined" ? "undefined" : _type_of$
|
|
45562
|
+
var type = typeof val === "undefined" ? "undefined" : _type_of$6(val);
|
|
45503
45563
|
if (type === 'string' && val.length > 0) {
|
|
45504
|
-
return parse$
|
|
45564
|
+
return parse$8(val);
|
|
45505
45565
|
} else if (type === 'number' && isFinite(val)) {
|
|
45506
45566
|
return options.long ? fmtLong(val) : fmtShort(val);
|
|
45507
45567
|
}
|
|
@@ -45513,7 +45573,7 @@ var y = d * 365.25;
|
|
|
45513
45573
|
* @param {String} str
|
|
45514
45574
|
* @return {Number}
|
|
45515
45575
|
* @api private
|
|
45516
|
-
*/ function parse$
|
|
45576
|
+
*/ function parse$8(str) {
|
|
45517
45577
|
str = String(str);
|
|
45518
45578
|
if (str.length > 100) {
|
|
45519
45579
|
return;
|
|
@@ -45619,7 +45679,7 @@ var y = d * 365.25;
|
|
|
45619
45679
|
}
|
|
45620
45680
|
|
|
45621
45681
|
var ms = ms$1;
|
|
45622
|
-
var timespan$
|
|
45682
|
+
var timespan$1 = function(time, iat) {
|
|
45623
45683
|
var timestamp = iat || Math.floor(Date.now() / 1000);
|
|
45624
45684
|
if (typeof time === 'string') {
|
|
45625
45685
|
var milliseconds = ms(time);
|
|
@@ -45657,7 +45717,7 @@ var RELEASE_TYPES = [
|
|
|
45657
45717
|
'prepatch',
|
|
45658
45718
|
'prerelease'
|
|
45659
45719
|
];
|
|
45660
|
-
var constants$
|
|
45720
|
+
var constants$2 = {
|
|
45661
45721
|
MAX_LENGTH: MAX_LENGTH$1,
|
|
45662
45722
|
MAX_SAFE_COMPONENT_LENGTH: MAX_SAFE_COMPONENT_LENGTH,
|
|
45663
45723
|
MAX_SAFE_BUILD_LENGTH: MAX_SAFE_BUILD_LENGTH,
|
|
@@ -45685,7 +45745,7 @@ function _non_iterable_spread() {
|
|
|
45685
45745
|
function _to_consumable_array(arr) {
|
|
45686
45746
|
return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array$1(arr) || _non_iterable_spread();
|
|
45687
45747
|
}
|
|
45688
|
-
function _type_of$
|
|
45748
|
+
function _type_of$5(obj) {
|
|
45689
45749
|
"@swc/helpers - typeof";
|
|
45690
45750
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
45691
45751
|
}
|
|
@@ -45698,7 +45758,7 @@ function _unsupported_iterable_to_array$1(o, minLen) {
|
|
|
45698
45758
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$1(o, minLen);
|
|
45699
45759
|
}
|
|
45700
45760
|
var _console;
|
|
45701
|
-
var debug$1 = (typeof process === "undefined" ? "undefined" : _type_of$
|
|
45761
|
+
var debug$1 = (typeof process === "undefined" ? "undefined" : _type_of$5(process)) === 'object' && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? function() {
|
|
45702
45762
|
for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
|
|
45703
45763
|
args[_key] = arguments[_key];
|
|
45704
45764
|
}
|
|
@@ -45755,7 +45815,7 @@ var debug_1 = debug$1;
|
|
|
45755
45815
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
45756
45816
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
45757
45817
|
}
|
|
45758
|
-
var _require = constants$
|
|
45818
|
+
var _require = constants$2, MAX_SAFE_COMPONENT_LENGTH = _require.MAX_SAFE_COMPONENT_LENGTH, MAX_SAFE_BUILD_LENGTH = _require.MAX_SAFE_BUILD_LENGTH, MAX_LENGTH = _require.MAX_LENGTH;
|
|
45759
45819
|
var debug = debug_1;
|
|
45760
45820
|
exports = module.exports = {};
|
|
45761
45821
|
// The actual regexps go on exports.re
|
|
@@ -45835,8 +45895,8 @@ var debug_1 = debug$1;
|
|
|
45835
45895
|
createToken('MAINVERSIONLOOSE', "(".concat(src[t.NUMERICIDENTIFIERLOOSE], ")\\.") + "(".concat(src[t.NUMERICIDENTIFIERLOOSE], ")\\.") + "(".concat(src[t.NUMERICIDENTIFIERLOOSE], ")"));
|
|
45836
45896
|
// ## Pre-release Version Identifier
|
|
45837
45897
|
// A numeric identifier, or a non-numeric identifier.
|
|
45838
|
-
// Non-
|
|
45839
|
-
// Therefore non-
|
|
45898
|
+
// Non-numeric identifiers include numeric identifiers but can be longer.
|
|
45899
|
+
// Therefore non-numeric identifiers must go first.
|
|
45840
45900
|
createToken('PRERELEASEIDENTIFIER', "(?:".concat(src[t.NONNUMERICIDENTIFIER], "|").concat(src[t.NUMERICIDENTIFIER], ")"));
|
|
45841
45901
|
createToken('PRERELEASEIDENTIFIERLOOSE', "(?:".concat(src[t.NONNUMERICIDENTIFIER], "|").concat(src[t.NUMERICIDENTIFIERLOOSE], ")"));
|
|
45842
45902
|
// ## Pre-release Version
|
|
@@ -45867,7 +45927,7 @@ var debug_1 = debug$1;
|
|
|
45867
45927
|
createToken('LOOSE', "^".concat(src[t.LOOSEPLAIN], "$"));
|
|
45868
45928
|
createToken('GTLT', '((?:<|>)?=?)');
|
|
45869
45929
|
// Something like "2.*" or "1.2.x".
|
|
45870
|
-
// Note that "x.x" is a valid xRange
|
|
45930
|
+
// Note that "x.x" is a valid xRange identifier, meaning "any version"
|
|
45871
45931
|
// Only the first item is strictly required.
|
|
45872
45932
|
createToken('XRANGEIDENTIFIERLOOSE', "".concat(src[t.NUMERICIDENTIFIERLOOSE], "|x|X|\\*"));
|
|
45873
45933
|
createToken('XRANGEIDENTIFIER', "".concat(src[t.NUMERICIDENTIFIER], "|x|X|\\*"));
|
|
@@ -45918,7 +45978,7 @@ var debug_1 = debug$1;
|
|
|
45918
45978
|
|
|
45919
45979
|
var reExports = re$2.exports;
|
|
45920
45980
|
|
|
45921
|
-
function _type_of$
|
|
45981
|
+
function _type_of$4(obj) {
|
|
45922
45982
|
"@swc/helpers - typeof";
|
|
45923
45983
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
45924
45984
|
}
|
|
@@ -45931,7 +45991,7 @@ var parseOptions$1 = function(options) {
|
|
|
45931
45991
|
if (!options) {
|
|
45932
45992
|
return emptyOpts;
|
|
45933
45993
|
}
|
|
45934
|
-
if ((typeof options === "undefined" ? "undefined" : _type_of$
|
|
45994
|
+
if ((typeof options === "undefined" ? "undefined" : _type_of$4(options)) !== 'object') {
|
|
45935
45995
|
return looseOption;
|
|
45936
45996
|
}
|
|
45937
45997
|
return options;
|
|
@@ -45977,34 +46037,46 @@ function _create_class(Constructor, protoProps, staticProps) {
|
|
|
45977
46037
|
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
45978
46038
|
return Constructor;
|
|
45979
46039
|
}
|
|
45980
|
-
function _instanceof$
|
|
46040
|
+
function _instanceof$5(left, right) {
|
|
45981
46041
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
45982
46042
|
return !!right[Symbol.hasInstance](left);
|
|
45983
46043
|
} else {
|
|
45984
46044
|
return left instanceof right;
|
|
45985
46045
|
}
|
|
45986
46046
|
}
|
|
45987
|
-
function _type_of$
|
|
46047
|
+
function _type_of$3(obj) {
|
|
45988
46048
|
"@swc/helpers - typeof";
|
|
45989
46049
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
45990
46050
|
}
|
|
45991
46051
|
var debug = debug_1;
|
|
45992
|
-
var _require$3 = constants$
|
|
46052
|
+
var _require$3 = constants$2, MAX_LENGTH = _require$3.MAX_LENGTH, MAX_SAFE_INTEGER$1 = _require$3.MAX_SAFE_INTEGER;
|
|
45993
46053
|
var _require1 = reExports, re$1 = _require1.safeRe, t$1 = _require1.t;
|
|
45994
46054
|
var parseOptions = parseOptions_1;
|
|
45995
46055
|
var compareIdentifiers = identifiers$1.compareIdentifiers;
|
|
45996
|
-
var
|
|
46056
|
+
var isPrereleaseIdentifier = function(prerelease, identifier) {
|
|
46057
|
+
var identifiers = identifier.split('.');
|
|
46058
|
+
if (identifiers.length > prerelease.length) {
|
|
46059
|
+
return false;
|
|
46060
|
+
}
|
|
46061
|
+
for(var i = 0; i < identifiers.length; i++){
|
|
46062
|
+
if (compareIdentifiers(prerelease[i], identifiers[i]) !== 0) {
|
|
46063
|
+
return false;
|
|
46064
|
+
}
|
|
46065
|
+
}
|
|
46066
|
+
return true;
|
|
46067
|
+
};
|
|
46068
|
+
var SemVer$e = /*#__PURE__*/ function() {
|
|
45997
46069
|
function SemVer(version, options) {
|
|
45998
46070
|
_class_call_check(this, SemVer);
|
|
45999
46071
|
options = parseOptions(options);
|
|
46000
|
-
if (_instanceof$
|
|
46072
|
+
if (_instanceof$5(version, SemVer)) {
|
|
46001
46073
|
if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) {
|
|
46002
46074
|
return version;
|
|
46003
46075
|
} else {
|
|
46004
46076
|
version = version.version;
|
|
46005
46077
|
}
|
|
46006
46078
|
} else if (typeof version !== 'string') {
|
|
46007
|
-
throw new TypeError('Invalid version. Must be a string. Got type "'.concat(typeof version === "undefined" ? "undefined" : _type_of$
|
|
46079
|
+
throw new TypeError('Invalid version. Must be a string. Got type "'.concat(typeof version === "undefined" ? "undefined" : _type_of$3(version), '".'));
|
|
46008
46080
|
}
|
|
46009
46081
|
if (version.length > MAX_LENGTH) {
|
|
46010
46082
|
throw new TypeError("version is longer than ".concat(MAX_LENGTH, " characters"));
|
|
@@ -46071,7 +46143,7 @@ var SemVer$d = /*#__PURE__*/ function() {
|
|
|
46071
46143
|
key: "compare",
|
|
46072
46144
|
value: function compare(other) {
|
|
46073
46145
|
debug('SemVer.compare', this.version, this.options, other);
|
|
46074
|
-
if (!_instanceof$
|
|
46146
|
+
if (!_instanceof$5(other, SemVer)) {
|
|
46075
46147
|
if (typeof other === 'string' && other === this.version) {
|
|
46076
46148
|
return 0;
|
|
46077
46149
|
}
|
|
@@ -46086,7 +46158,7 @@ var SemVer$d = /*#__PURE__*/ function() {
|
|
|
46086
46158
|
{
|
|
46087
46159
|
key: "compareMain",
|
|
46088
46160
|
value: function compareMain(other) {
|
|
46089
|
-
if (!_instanceof$
|
|
46161
|
+
if (!_instanceof$5(other, SemVer)) {
|
|
46090
46162
|
other = new SemVer(other, this.options);
|
|
46091
46163
|
}
|
|
46092
46164
|
if (this.major < other.major) {
|
|
@@ -46113,7 +46185,7 @@ var SemVer$d = /*#__PURE__*/ function() {
|
|
|
46113
46185
|
{
|
|
46114
46186
|
key: "comparePre",
|
|
46115
46187
|
value: function comparePre(other) {
|
|
46116
|
-
if (!_instanceof$
|
|
46188
|
+
if (!_instanceof$5(other, SemVer)) {
|
|
46117
46189
|
other = new SemVer(other, this.options);
|
|
46118
46190
|
}
|
|
46119
46191
|
// NOT having a prerelease is > having one
|
|
@@ -46146,7 +46218,7 @@ var SemVer$d = /*#__PURE__*/ function() {
|
|
|
46146
46218
|
{
|
|
46147
46219
|
key: "compareBuild",
|
|
46148
46220
|
value: function compareBuild(other) {
|
|
46149
|
-
if (!_instanceof$
|
|
46221
|
+
if (!_instanceof$5(other, SemVer)) {
|
|
46150
46222
|
other = new SemVer(other, this.options);
|
|
46151
46223
|
}
|
|
46152
46224
|
var i = 0;
|
|
@@ -46291,8 +46363,9 @@ var SemVer$d = /*#__PURE__*/ function() {
|
|
|
46291
46363
|
identifier
|
|
46292
46364
|
];
|
|
46293
46365
|
}
|
|
46294
|
-
if (
|
|
46295
|
-
|
|
46366
|
+
if (isPrereleaseIdentifier(this.prerelease, identifier)) {
|
|
46367
|
+
var prereleaseBase = this.prerelease[identifier.split('.').length];
|
|
46368
|
+
if (isNaN(prereleaseBase)) {
|
|
46296
46369
|
this.prerelease = prerelease;
|
|
46297
46370
|
}
|
|
46298
46371
|
} else {
|
|
@@ -46314,23 +46387,23 @@ var SemVer$d = /*#__PURE__*/ function() {
|
|
|
46314
46387
|
]);
|
|
46315
46388
|
return SemVer;
|
|
46316
46389
|
}();
|
|
46317
|
-
var semver$4 = SemVer$
|
|
46390
|
+
var semver$4 = SemVer$e;
|
|
46318
46391
|
|
|
46319
|
-
function _instanceof$
|
|
46392
|
+
function _instanceof$4(left, right) {
|
|
46320
46393
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
46321
46394
|
return !!right[Symbol.hasInstance](left);
|
|
46322
46395
|
} else {
|
|
46323
46396
|
return left instanceof right;
|
|
46324
46397
|
}
|
|
46325
46398
|
}
|
|
46326
|
-
var SemVer$
|
|
46327
|
-
var parse$
|
|
46399
|
+
var SemVer$d = semver$4;
|
|
46400
|
+
var parse$7 = function(version, options) {
|
|
46328
46401
|
var throwErrors = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false;
|
|
46329
|
-
if (_instanceof$
|
|
46402
|
+
if (_instanceof$4(version, SemVer$d)) {
|
|
46330
46403
|
return version;
|
|
46331
46404
|
}
|
|
46332
46405
|
try {
|
|
46333
|
-
return new SemVer$
|
|
46406
|
+
return new SemVer$d(version, options);
|
|
46334
46407
|
} catch (er) {
|
|
46335
46408
|
if (!throwErrors) {
|
|
46336
46409
|
return null;
|
|
@@ -46338,30 +46411,30 @@ var parse$6 = function(version, options) {
|
|
|
46338
46411
|
throw er;
|
|
46339
46412
|
}
|
|
46340
46413
|
};
|
|
46341
|
-
var parse_1 = parse$
|
|
46414
|
+
var parse_1 = parse$7;
|
|
46342
46415
|
|
|
46343
|
-
var parse$
|
|
46416
|
+
var parse$6 = parse_1;
|
|
46344
46417
|
var valid$2 = function(version, options) {
|
|
46345
|
-
var v = parse$
|
|
46418
|
+
var v = parse$6(version, options);
|
|
46346
46419
|
return v ? v.version : null;
|
|
46347
46420
|
};
|
|
46348
46421
|
var valid_1 = valid$2;
|
|
46349
46422
|
|
|
46350
|
-
var parse$
|
|
46423
|
+
var parse$5 = parse_1;
|
|
46351
46424
|
var clean$1 = function(version, options) {
|
|
46352
|
-
var s = parse$
|
|
46425
|
+
var s = parse$5(version.trim().replace(/^[=v]+/, ''), options);
|
|
46353
46426
|
return s ? s.version : null;
|
|
46354
46427
|
};
|
|
46355
46428
|
var clean_1 = clean$1;
|
|
46356
46429
|
|
|
46357
|
-
function _instanceof$
|
|
46430
|
+
function _instanceof$3(left, right) {
|
|
46358
46431
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
46359
46432
|
return !!right[Symbol.hasInstance](left);
|
|
46360
46433
|
} else {
|
|
46361
46434
|
return left instanceof right;
|
|
46362
46435
|
}
|
|
46363
46436
|
}
|
|
46364
|
-
var SemVer$
|
|
46437
|
+
var SemVer$c = semver$4;
|
|
46365
46438
|
var inc$1 = function(version, release, options, identifier, identifierBase) {
|
|
46366
46439
|
if (typeof options === 'string') {
|
|
46367
46440
|
identifierBase = identifier;
|
|
@@ -46369,17 +46442,17 @@ var inc$1 = function(version, release, options, identifier, identifierBase) {
|
|
|
46369
46442
|
options = undefined;
|
|
46370
46443
|
}
|
|
46371
46444
|
try {
|
|
46372
|
-
return new SemVer$
|
|
46445
|
+
return new SemVer$c(_instanceof$3(version, SemVer$c) ? version.version : version, options).inc(release, identifier, identifierBase).version;
|
|
46373
46446
|
} catch (er) {
|
|
46374
46447
|
return null;
|
|
46375
46448
|
}
|
|
46376
46449
|
};
|
|
46377
46450
|
var inc_1 = inc$1;
|
|
46378
46451
|
|
|
46379
|
-
var parse$
|
|
46452
|
+
var parse$4 = parse_1;
|
|
46380
46453
|
var diff$1 = function(version1, version2) {
|
|
46381
|
-
var v1 = parse$
|
|
46382
|
-
var v2 = parse$
|
|
46454
|
+
var v1 = parse$4(version1, null, true);
|
|
46455
|
+
var v2 = parse$4(version2, null, true);
|
|
46383
46456
|
var comparison = v1.compare(v2);
|
|
46384
46457
|
if (comparison === 0) {
|
|
46385
46458
|
return null;
|
|
@@ -46418,39 +46491,39 @@ var diff$1 = function(version1, version2) {
|
|
|
46418
46491
|
if (v1.patch !== v2.patch) {
|
|
46419
46492
|
return prefix + 'patch';
|
|
46420
46493
|
}
|
|
46421
|
-
// high and low are
|
|
46494
|
+
// high and low are prereleases
|
|
46422
46495
|
return 'prerelease';
|
|
46423
46496
|
};
|
|
46424
46497
|
var diff_1 = diff$1;
|
|
46425
46498
|
|
|
46426
|
-
var SemVer$
|
|
46499
|
+
var SemVer$b = semver$4;
|
|
46427
46500
|
var major$1 = function(a, loose) {
|
|
46428
|
-
return new SemVer$
|
|
46501
|
+
return new SemVer$b(a, loose).major;
|
|
46429
46502
|
};
|
|
46430
46503
|
var major_1 = major$1;
|
|
46431
46504
|
|
|
46432
|
-
var SemVer$
|
|
46505
|
+
var SemVer$a = semver$4;
|
|
46433
46506
|
var minor$1 = function(a, loose) {
|
|
46434
|
-
return new SemVer$
|
|
46507
|
+
return new SemVer$a(a, loose).minor;
|
|
46435
46508
|
};
|
|
46436
46509
|
var minor_1 = minor$1;
|
|
46437
46510
|
|
|
46438
|
-
var SemVer$
|
|
46511
|
+
var SemVer$9 = semver$4;
|
|
46439
46512
|
var patch$1 = function(a, loose) {
|
|
46440
|
-
return new SemVer$
|
|
46513
|
+
return new SemVer$9(a, loose).patch;
|
|
46441
46514
|
};
|
|
46442
46515
|
var patch_1 = patch$1;
|
|
46443
46516
|
|
|
46444
|
-
var parse$
|
|
46517
|
+
var parse$3 = parse_1;
|
|
46445
46518
|
var prerelease$1 = function(version, options) {
|
|
46446
|
-
var parsed = parse$
|
|
46519
|
+
var parsed = parse$3(version, options);
|
|
46447
46520
|
return parsed && parsed.prerelease.length ? parsed.prerelease : null;
|
|
46448
46521
|
};
|
|
46449
46522
|
var prerelease_1 = prerelease$1;
|
|
46450
46523
|
|
|
46451
|
-
var SemVer$
|
|
46524
|
+
var SemVer$8 = semver$4;
|
|
46452
46525
|
var compare$b = function(a, b, loose) {
|
|
46453
|
-
return new SemVer$
|
|
46526
|
+
return new SemVer$8(a, loose).compare(new SemVer$8(b, loose));
|
|
46454
46527
|
};
|
|
46455
46528
|
var compare_1 = compare$b;
|
|
46456
46529
|
|
|
@@ -46466,10 +46539,10 @@ var compareLoose$1 = function(a, b) {
|
|
|
46466
46539
|
};
|
|
46467
46540
|
var compareLoose_1 = compareLoose$1;
|
|
46468
46541
|
|
|
46469
|
-
var SemVer$
|
|
46542
|
+
var SemVer$7 = semver$4;
|
|
46470
46543
|
var compareBuild$3 = function(a, b, loose) {
|
|
46471
|
-
var versionA = new SemVer$
|
|
46472
|
-
var versionB = new SemVer$
|
|
46544
|
+
var versionA = new SemVer$7(a, loose);
|
|
46545
|
+
var versionB = new SemVer$7(b, loose);
|
|
46473
46546
|
return versionA.compare(versionB) || versionA.compareBuild(versionB);
|
|
46474
46547
|
};
|
|
46475
46548
|
var compareBuild_1 = compareBuild$3;
|
|
@@ -46526,7 +46599,7 @@ var lte$3 = function(a, b, loose) {
|
|
|
46526
46599
|
};
|
|
46527
46600
|
var lte_1 = lte$3;
|
|
46528
46601
|
|
|
46529
|
-
function _type_of$
|
|
46602
|
+
function _type_of$2(obj) {
|
|
46530
46603
|
"@swc/helpers - typeof";
|
|
46531
46604
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
46532
46605
|
}
|
|
@@ -46539,18 +46612,18 @@ var lte$2 = lte_1;
|
|
|
46539
46612
|
var cmp$1 = function(a, op, b, loose) {
|
|
46540
46613
|
switch(op){
|
|
46541
46614
|
case '===':
|
|
46542
|
-
if ((typeof a === "undefined" ? "undefined" : _type_of$
|
|
46615
|
+
if ((typeof a === "undefined" ? "undefined" : _type_of$2(a)) === 'object') {
|
|
46543
46616
|
a = a.version;
|
|
46544
46617
|
}
|
|
46545
|
-
if ((typeof b === "undefined" ? "undefined" : _type_of$
|
|
46618
|
+
if ((typeof b === "undefined" ? "undefined" : _type_of$2(b)) === 'object') {
|
|
46546
46619
|
b = b.version;
|
|
46547
46620
|
}
|
|
46548
46621
|
return a === b;
|
|
46549
46622
|
case '!==':
|
|
46550
|
-
if ((typeof a === "undefined" ? "undefined" : _type_of$
|
|
46623
|
+
if ((typeof a === "undefined" ? "undefined" : _type_of$2(a)) === 'object') {
|
|
46551
46624
|
a = a.version;
|
|
46552
46625
|
}
|
|
46553
|
-
if ((typeof b === "undefined" ? "undefined" : _type_of$
|
|
46626
|
+
if ((typeof b === "undefined" ? "undefined" : _type_of$2(b)) === 'object') {
|
|
46554
46627
|
b = b.version;
|
|
46555
46628
|
}
|
|
46556
46629
|
return a !== b;
|
|
@@ -46574,18 +46647,18 @@ var cmp$1 = function(a, op, b, loose) {
|
|
|
46574
46647
|
};
|
|
46575
46648
|
var cmp_1 = cmp$1;
|
|
46576
46649
|
|
|
46577
|
-
function _instanceof$
|
|
46650
|
+
function _instanceof$2(left, right) {
|
|
46578
46651
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
46579
46652
|
return !!right[Symbol.hasInstance](left);
|
|
46580
46653
|
} else {
|
|
46581
46654
|
return left instanceof right;
|
|
46582
46655
|
}
|
|
46583
46656
|
}
|
|
46584
|
-
var SemVer$
|
|
46585
|
-
var parse$
|
|
46657
|
+
var SemVer$6 = semver$4;
|
|
46658
|
+
var parse$2 = parse_1;
|
|
46586
46659
|
var _require$2 = reExports, re = _require$2.safeRe, t = _require$2.t;
|
|
46587
46660
|
var coerce$1 = function(version, options) {
|
|
46588
|
-
if (_instanceof$
|
|
46661
|
+
if (_instanceof$2(version, SemVer$6)) {
|
|
46589
46662
|
return version;
|
|
46590
46663
|
}
|
|
46591
46664
|
if (typeof version === 'number') {
|
|
@@ -46627,10 +46700,52 @@ var coerce$1 = function(version, options) {
|
|
|
46627
46700
|
var patch = match[4] || '0';
|
|
46628
46701
|
var prerelease = options.includePrerelease && match[5] ? "-".concat(match[5]) : '';
|
|
46629
46702
|
var build = options.includePrerelease && match[6] ? "+".concat(match[6]) : '';
|
|
46630
|
-
return parse$
|
|
46703
|
+
return parse$2("".concat(major, ".").concat(minor, ".").concat(patch).concat(prerelease).concat(build), options);
|
|
46631
46704
|
};
|
|
46632
46705
|
var coerce_1 = coerce$1;
|
|
46633
46706
|
|
|
46707
|
+
function _instanceof$1(left, right) {
|
|
46708
|
+
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
46709
|
+
return !!right[Symbol.hasInstance](left);
|
|
46710
|
+
} else {
|
|
46711
|
+
return left instanceof right;
|
|
46712
|
+
}
|
|
46713
|
+
}
|
|
46714
|
+
var parse$1 = parse_1;
|
|
46715
|
+
var constants$1 = constants$2;
|
|
46716
|
+
var SemVer$5 = semver$4;
|
|
46717
|
+
var truncate$1 = function(version, truncation, options) {
|
|
46718
|
+
if (!constants$1.RELEASE_TYPES.includes(truncation)) {
|
|
46719
|
+
return null;
|
|
46720
|
+
}
|
|
46721
|
+
var clonedVersion = cloneInputVersion(version, options);
|
|
46722
|
+
return clonedVersion && doTruncation(clonedVersion, truncation);
|
|
46723
|
+
};
|
|
46724
|
+
var cloneInputVersion = function(version, options) {
|
|
46725
|
+
var versionStringToParse = _instanceof$1(version, SemVer$5) ? version.version : version;
|
|
46726
|
+
return parse$1(versionStringToParse, options);
|
|
46727
|
+
};
|
|
46728
|
+
var doTruncation = function(version, truncation) {
|
|
46729
|
+
if (isPrerelease(truncation)) {
|
|
46730
|
+
return version.version;
|
|
46731
|
+
}
|
|
46732
|
+
version.prerelease = [];
|
|
46733
|
+
switch(truncation){
|
|
46734
|
+
case 'major':
|
|
46735
|
+
version.minor = 0;
|
|
46736
|
+
version.patch = 0;
|
|
46737
|
+
break;
|
|
46738
|
+
case 'minor':
|
|
46739
|
+
version.patch = 0;
|
|
46740
|
+
break;
|
|
46741
|
+
}
|
|
46742
|
+
return version.format();
|
|
46743
|
+
};
|
|
46744
|
+
var isPrerelease = function(type) {
|
|
46745
|
+
return type.startsWith('pre');
|
|
46746
|
+
};
|
|
46747
|
+
var truncate_1 = truncate$1;
|
|
46748
|
+
|
|
46634
46749
|
var lrucache;
|
|
46635
46750
|
var hasRequiredLrucache;
|
|
46636
46751
|
|
|
@@ -46885,6 +47000,8 @@ function requireRange () {
|
|
|
46885
47000
|
key: "parseRange",
|
|
46886
47001
|
value: function parseRange(range) {
|
|
46887
47002
|
var _this = this;
|
|
47003
|
+
// strip build metadata so it can't bleed into the version
|
|
47004
|
+
range = range.replace(BUILDSTRIPRE, '');
|
|
46888
47005
|
// memoize range parsing for performance.
|
|
46889
47006
|
// this is a very hot path, and fully deterministic.
|
|
46890
47007
|
var memoOpts = (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE);
|
|
@@ -47012,8 +47129,10 @@ function requireRange () {
|
|
|
47012
47129
|
var Comparator = requireComparator();
|
|
47013
47130
|
var debug = debug_1;
|
|
47014
47131
|
var SemVer = semver$4;
|
|
47015
|
-
var _require = reExports, re = _require.safeRe, t = _require.t, comparatorTrimReplace = _require.comparatorTrimReplace, tildeTrimReplace = _require.tildeTrimReplace, caretTrimReplace = _require.caretTrimReplace;
|
|
47016
|
-
var _require1 = constants$
|
|
47132
|
+
var _require = reExports, re = _require.safeRe, src = _require.src, t = _require.t, comparatorTrimReplace = _require.comparatorTrimReplace, tildeTrimReplace = _require.tildeTrimReplace, caretTrimReplace = _require.caretTrimReplace;
|
|
47133
|
+
var _require1 = constants$2, FLAG_INCLUDE_PRERELEASE = _require1.FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE = _require1.FLAG_LOOSE;
|
|
47134
|
+
// unbounded global build-metadata stripper used by parseRange
|
|
47135
|
+
var BUILDSTRIPRE = new RegExp(src[t.BUILD], 'g');
|
|
47017
47136
|
var isNullSet = function(c) {
|
|
47018
47137
|
return c.value === '<0.0.0-0';
|
|
47019
47138
|
};
|
|
@@ -47053,6 +47172,9 @@ function requireRange () {
|
|
|
47053
47172
|
var isX = function(id) {
|
|
47054
47173
|
return !id || id.toLowerCase() === 'x' || id === '*';
|
|
47055
47174
|
};
|
|
47175
|
+
var invalidXRangeOrder = function(M, m, p) {
|
|
47176
|
+
return isX(M) && !isX(m) || isX(m) && p && !isX(p);
|
|
47177
|
+
};
|
|
47056
47178
|
// ~, ~> --> * (any, kinda silly)
|
|
47057
47179
|
// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0-0
|
|
47058
47180
|
// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0-0
|
|
@@ -47133,9 +47255,9 @@ function requireRange () {
|
|
|
47133
47255
|
debug('no pr');
|
|
47134
47256
|
if (M === '0') {
|
|
47135
47257
|
if (m === '0') {
|
|
47136
|
-
ret = ">=".concat(M, ".").concat(m, ".").concat(p
|
|
47258
|
+
ret = ">=".concat(M, ".").concat(m, ".").concat(p, " <").concat(M, ".").concat(m, ".").concat(+p + 1, "-0");
|
|
47137
47259
|
} else {
|
|
47138
|
-
ret = ">=".concat(M, ".").concat(m, ".").concat(p
|
|
47260
|
+
ret = ">=".concat(M, ".").concat(m, ".").concat(p, " <").concat(M, ".").concat(+m + 1, ".0-0");
|
|
47139
47261
|
}
|
|
47140
47262
|
} else {
|
|
47141
47263
|
ret = ">=".concat(M, ".").concat(m, ".").concat(p, " <").concat(+M + 1, ".0.0-0");
|
|
@@ -47156,6 +47278,9 @@ function requireRange () {
|
|
|
47156
47278
|
var r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE];
|
|
47157
47279
|
return comp.replace(r, function(ret, gtlt, M, m, p, pr) {
|
|
47158
47280
|
debug('xRange', comp, ret, gtlt, M, m, p, pr);
|
|
47281
|
+
if (invalidXRangeOrder(M, m, p)) {
|
|
47282
|
+
return comp;
|
|
47283
|
+
}
|
|
47159
47284
|
var xM = isX(M);
|
|
47160
47285
|
var xm = xM || isX(m);
|
|
47161
47286
|
var xp = xm || isX(p);
|
|
@@ -47600,7 +47725,7 @@ var validRange$1 = function(range, options) {
|
|
|
47600
47725
|
};
|
|
47601
47726
|
var valid$1 = validRange$1;
|
|
47602
47727
|
|
|
47603
|
-
function _type_of$
|
|
47728
|
+
function _type_of$1(obj) {
|
|
47604
47729
|
"@swc/helpers - typeof";
|
|
47605
47730
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
47606
47731
|
}
|
|
@@ -47678,7 +47803,7 @@ var outside$3 = function(version, range, hilo, options) {
|
|
|
47678
47803
|
// but note that everything is flipped for the "ltr" function.
|
|
47679
47804
|
for(var i = 0; i < range.set.length; ++i){
|
|
47680
47805
|
var _ret = _loop(i);
|
|
47681
|
-
if (_type_of$
|
|
47806
|
+
if (_type_of$1(_ret) === "object") return _ret.v;
|
|
47682
47807
|
}
|
|
47683
47808
|
return true;
|
|
47684
47809
|
};
|
|
@@ -47878,7 +48003,7 @@ var compare$1 = compare_1;
|
|
|
47878
48003
|
// - If LT
|
|
47879
48004
|
// - If LT.semver is greater than any < or <= comp in C, return false
|
|
47880
48005
|
// - If LT is <=, and LT.semver does not satisfy every C, return false
|
|
47881
|
-
// - If
|
|
48006
|
+
// - If LT.semver has a prerelease, and not in prerelease mode
|
|
47882
48007
|
// - If no C has a prerelease and the LT.semver tuple, return false
|
|
47883
48008
|
// - Else return true
|
|
47884
48009
|
var subset$1 = function(sub, dom) {
|
|
@@ -48083,7 +48208,7 @@ var simpleSubset = function(sub, dom, options) {
|
|
|
48083
48208
|
if (higher === c2 && higher !== gt) {
|
|
48084
48209
|
return false;
|
|
48085
48210
|
}
|
|
48086
|
-
} else if (gt.operator === '>=' && !
|
|
48211
|
+
} else if (gt.operator === '>=' && !c2.test(gt.semver)) {
|
|
48087
48212
|
return false;
|
|
48088
48213
|
}
|
|
48089
48214
|
}
|
|
@@ -48098,7 +48223,7 @@ var simpleSubset = function(sub, dom, options) {
|
|
|
48098
48223
|
if (lower === c2 && lower !== lt) {
|
|
48099
48224
|
return false;
|
|
48100
48225
|
}
|
|
48101
|
-
} else if (lt.operator === '<=' && !
|
|
48226
|
+
} else if (lt.operator === '<=' && !c2.test(lt.semver)) {
|
|
48102
48227
|
return false;
|
|
48103
48228
|
}
|
|
48104
48229
|
}
|
|
@@ -48157,7 +48282,7 @@ var subset_1 = subset$1;
|
|
|
48157
48282
|
|
|
48158
48283
|
// just pre-load all the stuff that index.js lazily exports
|
|
48159
48284
|
var internalRe = reExports;
|
|
48160
|
-
var constants = constants$
|
|
48285
|
+
var constants = constants$2;
|
|
48161
48286
|
var SemVer = semver$4;
|
|
48162
48287
|
var identifiers = identifiers$1;
|
|
48163
48288
|
var parse = parse_1;
|
|
@@ -48183,6 +48308,7 @@ var gte = gte_1;
|
|
|
48183
48308
|
var lte = lte_1;
|
|
48184
48309
|
var cmp = cmp_1;
|
|
48185
48310
|
var coerce = coerce_1;
|
|
48311
|
+
var truncate = truncate_1;
|
|
48186
48312
|
var Comparator = requireComparator();
|
|
48187
48313
|
var Range = requireRange();
|
|
48188
48314
|
var satisfies = satisfies_1;
|
|
@@ -48221,6 +48347,7 @@ var semver$3 = {
|
|
|
48221
48347
|
lte: lte,
|
|
48222
48348
|
cmp: cmp,
|
|
48223
48349
|
coerce: coerce,
|
|
48350
|
+
truncate: truncate,
|
|
48224
48351
|
Comparator: Comparator,
|
|
48225
48352
|
Range: Range,
|
|
48226
48353
|
satisfies: satisfies,
|
|
@@ -48278,7 +48405,7 @@ var allowedCurves = {
|
|
|
48278
48405
|
ES384: 'secp384r1',
|
|
48279
48406
|
ES512: 'secp521r1'
|
|
48280
48407
|
};
|
|
48281
|
-
var validateAsymmetricKey$
|
|
48408
|
+
var validateAsymmetricKey$1 = function(algorithm, key) {
|
|
48282
48409
|
if (!algorithm || !key) return;
|
|
48283
48410
|
var keyType = key.asymmetricKeyType;
|
|
48284
48411
|
if (!keyType) return;
|
|
@@ -48322,7 +48449,7 @@ var validateAsymmetricKey$2 = function(algorithm, key) {
|
|
|
48322
48449
|
var semver = semver$3;
|
|
48323
48450
|
var psSupported = semver.satisfies(process.version, '^6.12.0 || >=8.0.0');
|
|
48324
48451
|
|
|
48325
|
-
function _instanceof
|
|
48452
|
+
function _instanceof(left, right) {
|
|
48326
48453
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
48327
48454
|
return !!right[Symbol.hasInstance](left);
|
|
48328
48455
|
} else {
|
|
@@ -48333,11 +48460,11 @@ var JsonWebTokenError = JsonWebTokenError_1;
|
|
|
48333
48460
|
var NotBeforeError = NotBeforeError_1;
|
|
48334
48461
|
var TokenExpiredError = TokenExpiredError_1;
|
|
48335
48462
|
var decode = decode$1;
|
|
48336
|
-
var timespan
|
|
48337
|
-
var validateAsymmetricKey
|
|
48463
|
+
var timespan = timespan$1;
|
|
48464
|
+
var validateAsymmetricKey = validateAsymmetricKey$1;
|
|
48338
48465
|
var PS_SUPPORTED$1 = psSupported;
|
|
48339
|
-
var jws
|
|
48340
|
-
var _require$1 = require$$1, KeyObject
|
|
48466
|
+
var jws = jws$2;
|
|
48467
|
+
var _require$1 = require$$1, KeyObject = _require$1.KeyObject, createSecretKey = _require$1.createSecretKey, createPublicKey = _require$1.createPublicKey;
|
|
48341
48468
|
var PUB_KEY_ALGS = [
|
|
48342
48469
|
'RS256',
|
|
48343
48470
|
'RS384',
|
|
@@ -48438,12 +48565,12 @@ var verify = function(jwtString, secretOrPublicKey, options, callback) {
|
|
|
48438
48565
|
if (!hasSignature && !options.algorithms) {
|
|
48439
48566
|
return done(new JsonWebTokenError('please specify "none" in "algorithms" to verify unsigned tokens'));
|
|
48440
48567
|
}
|
|
48441
|
-
if (secretOrPublicKey != null && !_instanceof
|
|
48568
|
+
if (secretOrPublicKey != null && !_instanceof(secretOrPublicKey, KeyObject)) {
|
|
48442
48569
|
try {
|
|
48443
48570
|
secretOrPublicKey = createPublicKey(secretOrPublicKey);
|
|
48444
48571
|
} catch (_) {
|
|
48445
48572
|
try {
|
|
48446
|
-
secretOrPublicKey = createSecretKey
|
|
48573
|
+
secretOrPublicKey = createSecretKey(typeof secretOrPublicKey === 'string' ? Buffer.from(secretOrPublicKey) : secretOrPublicKey);
|
|
48447
48574
|
} catch (_) {
|
|
48448
48575
|
return done(new JsonWebTokenError('secretOrPublicKey is not valid key material'));
|
|
48449
48576
|
}
|
|
@@ -48473,14 +48600,14 @@ var verify = function(jwtString, secretOrPublicKey, options, callback) {
|
|
|
48473
48600
|
}
|
|
48474
48601
|
if (!options.allowInvalidAsymmetricKeyTypes) {
|
|
48475
48602
|
try {
|
|
48476
|
-
validateAsymmetricKey
|
|
48603
|
+
validateAsymmetricKey(header.alg, secretOrPublicKey);
|
|
48477
48604
|
} catch (e) {
|
|
48478
48605
|
return done(e);
|
|
48479
48606
|
}
|
|
48480
48607
|
}
|
|
48481
48608
|
var valid;
|
|
48482
48609
|
try {
|
|
48483
|
-
valid = jws
|
|
48610
|
+
valid = jws.verify(jwtString, decodedToken.header.alg, secretOrPublicKey);
|
|
48484
48611
|
} catch (e) {
|
|
48485
48612
|
return done(e);
|
|
48486
48613
|
}
|
|
@@ -48513,7 +48640,7 @@ var verify = function(jwtString, secretOrPublicKey, options, callback) {
|
|
|
48513
48640
|
];
|
|
48514
48641
|
var match = target.some(function(targetAudience) {
|
|
48515
48642
|
return audiences.some(function(audience) {
|
|
48516
|
-
return _instanceof
|
|
48643
|
+
return _instanceof(audience, RegExp) ? audience.test(targetAudience) : audience === targetAudience;
|
|
48517
48644
|
});
|
|
48518
48645
|
});
|
|
48519
48646
|
if (!match) {
|
|
@@ -48545,7 +48672,7 @@ var verify = function(jwtString, secretOrPublicKey, options, callback) {
|
|
|
48545
48672
|
if (typeof payload.iat !== 'number') {
|
|
48546
48673
|
return done(new JsonWebTokenError('iat required when maxAge is specified'));
|
|
48547
48674
|
}
|
|
48548
|
-
var maxAgeTimestamp = timespan
|
|
48675
|
+
var maxAgeTimestamp = timespan(options.maxAge, payload.iat);
|
|
48549
48676
|
if (typeof maxAgeTimestamp === 'undefined') {
|
|
48550
48677
|
return done(new JsonWebTokenError('"maxAge" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'));
|
|
48551
48678
|
}
|
|
@@ -48574,18 +48701,18 @@ var verify = function(jwtString, secretOrPublicKey, options, callback) {
|
|
|
48574
48701
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
48575
48702
|
*/
|
|
48576
48703
|
|
|
48577
|
-
/** Used as references for various `Number` constants. */ function _type_of
|
|
48704
|
+
/** Used as references for various `Number` constants. */ function _type_of(obj) {
|
|
48578
48705
|
"@swc/helpers - typeof";
|
|
48579
48706
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
48580
48707
|
}
|
|
48581
|
-
var INFINITY
|
|
48582
|
-
/** `Object#toString` result references. */ var argsTag = '[object Arguments]', funcTag = '[object Function]', genTag = '[object GeneratorFunction]', stringTag
|
|
48583
|
-
/** Used to match leading and trailing whitespace. */ var reTrim
|
|
48584
|
-
/** Used to detect bad signed hexadecimal string values. */ var reIsBadHex
|
|
48585
|
-
/** Used to detect binary string values. */ var reIsBinary
|
|
48586
|
-
/** Used to detect octal string values. */ var reIsOctal
|
|
48708
|
+
var INFINITY = 1 / 0, MAX_SAFE_INTEGER = 9007199254740991, MAX_INTEGER = 1.7976931348623157e+308, NAN = 0 / 0;
|
|
48709
|
+
/** `Object#toString` result references. */ var argsTag = '[object Arguments]', funcTag = '[object Function]', genTag = '[object GeneratorFunction]', stringTag = '[object String]', symbolTag = '[object Symbol]';
|
|
48710
|
+
/** Used to match leading and trailing whitespace. */ var reTrim = /^\s+|\s+$/g;
|
|
48711
|
+
/** Used to detect bad signed hexadecimal string values. */ var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
|
|
48712
|
+
/** Used to detect binary string values. */ var reIsBinary = /^0b[01]+$/i;
|
|
48713
|
+
/** Used to detect octal string values. */ var reIsOctal = /^0o[0-7]+$/i;
|
|
48587
48714
|
/** Used to detect unsigned integer values. */ var reIsUint = /^(?:0|[1-9]\d*)$/;
|
|
48588
|
-
/** Built-in method references without a dependency on `root`. */ var freeParseInt
|
|
48715
|
+
/** Built-in method references without a dependency on `root`. */ var freeParseInt = parseInt;
|
|
48589
48716
|
/**
|
|
48590
48717
|
* A specialized version of `_.map` for arrays without support for iteratee
|
|
48591
48718
|
* shorthands.
|
|
@@ -48685,20 +48812,20 @@ var INFINITY$2 = 1 / 0, MAX_SAFE_INTEGER = 9007199254740991, MAX_INTEGER$2 = 1.7
|
|
|
48685
48812
|
* @param {Function} func The function to wrap.
|
|
48686
48813
|
* @param {Function} transform The argument transform.
|
|
48687
48814
|
* @returns {Function} Returns the new function.
|
|
48688
|
-
*/ function overArg
|
|
48815
|
+
*/ function overArg(func, transform) {
|
|
48689
48816
|
return function(arg) {
|
|
48690
48817
|
return func(transform(arg));
|
|
48691
48818
|
};
|
|
48692
48819
|
}
|
|
48693
|
-
/** Used for built-in method references. */ var objectProto
|
|
48694
|
-
/** Used to check objects for own properties. */ var hasOwnProperty
|
|
48820
|
+
/** Used for built-in method references. */ var objectProto = Object.prototype;
|
|
48821
|
+
/** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty;
|
|
48695
48822
|
/**
|
|
48696
48823
|
* Used to resolve the
|
|
48697
48824
|
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
48698
48825
|
* of values.
|
|
48699
|
-
*/ var objectToString
|
|
48700
|
-
/** Built-in value references. */ var propertyIsEnumerable = objectProto
|
|
48701
|
-
/* Built-in method references for those with the same name as other `lodash` methods. */ var nativeKeys = overArg
|
|
48826
|
+
*/ var objectToString = objectProto.toString;
|
|
48827
|
+
/** Built-in value references. */ var propertyIsEnumerable = objectProto.propertyIsEnumerable;
|
|
48828
|
+
/* Built-in method references for those with the same name as other `lodash` methods. */ var nativeKeys = overArg(Object.keys, Object), nativeMax = Math.max;
|
|
48702
48829
|
/**
|
|
48703
48830
|
* Creates an array of the enumerable property names of the array-like `value`.
|
|
48704
48831
|
*
|
|
@@ -48709,10 +48836,10 @@ var INFINITY$2 = 1 / 0, MAX_SAFE_INTEGER = 9007199254740991, MAX_INTEGER$2 = 1.7
|
|
|
48709
48836
|
*/ function arrayLikeKeys(value, inherited) {
|
|
48710
48837
|
// Safari 8.1 makes `arguments.callee` enumerable in strict mode.
|
|
48711
48838
|
// Safari 9 makes `arguments.length` enumerable in strict mode.
|
|
48712
|
-
var result = isArray
|
|
48839
|
+
var result = isArray(value) || isArguments(value) ? baseTimes(value.length, String) : [];
|
|
48713
48840
|
var length = result.length, skipIndexes = !!length;
|
|
48714
48841
|
for(var key in value){
|
|
48715
|
-
if ((hasOwnProperty
|
|
48842
|
+
if ((hasOwnProperty.call(value, key)) && !(skipIndexes && (key == 'length' || isIndex(key, length)))) {
|
|
48716
48843
|
result.push(key);
|
|
48717
48844
|
}
|
|
48718
48845
|
}
|
|
@@ -48730,7 +48857,7 @@ var INFINITY$2 = 1 / 0, MAX_SAFE_INTEGER = 9007199254740991, MAX_INTEGER$2 = 1.7
|
|
|
48730
48857
|
}
|
|
48731
48858
|
var result = [];
|
|
48732
48859
|
for(var key in Object(object)){
|
|
48733
|
-
if (hasOwnProperty
|
|
48860
|
+
if (hasOwnProperty.call(object, key) && key != 'constructor') {
|
|
48734
48861
|
result.push(key);
|
|
48735
48862
|
}
|
|
48736
48863
|
}
|
|
@@ -48754,7 +48881,7 @@ var INFINITY$2 = 1 / 0, MAX_SAFE_INTEGER = 9007199254740991, MAX_INTEGER$2 = 1.7
|
|
|
48754
48881
|
* @param {*} value The value to check.
|
|
48755
48882
|
* @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
|
|
48756
48883
|
*/ function isPrototype(value) {
|
|
48757
|
-
var Ctor = value && value.constructor, proto = typeof Ctor == 'function' && Ctor.prototype || objectProto
|
|
48884
|
+
var Ctor = value && value.constructor, proto = typeof Ctor == 'function' && Ctor.prototype || objectProto;
|
|
48758
48885
|
return value === proto;
|
|
48759
48886
|
}
|
|
48760
48887
|
/**
|
|
@@ -48788,12 +48915,12 @@ var INFINITY$2 = 1 / 0, MAX_SAFE_INTEGER = 9007199254740991, MAX_INTEGER$2 = 1.7
|
|
|
48788
48915
|
* // => true
|
|
48789
48916
|
*/ function includes$1(collection, value, fromIndex, guard) {
|
|
48790
48917
|
collection = isArrayLike(collection) ? collection : values(collection);
|
|
48791
|
-
fromIndex = fromIndex && !guard ? toInteger
|
|
48918
|
+
fromIndex = fromIndex && !guard ? toInteger(fromIndex) : 0;
|
|
48792
48919
|
var length = collection.length;
|
|
48793
48920
|
if (fromIndex < 0) {
|
|
48794
48921
|
fromIndex = nativeMax(length + fromIndex, 0);
|
|
48795
48922
|
}
|
|
48796
|
-
return isString
|
|
48923
|
+
return isString(collection) ? fromIndex <= length && collection.indexOf(value, fromIndex) > -1 : !!length && baseIndexOf(collection, value, fromIndex) > -1;
|
|
48797
48924
|
}
|
|
48798
48925
|
/**
|
|
48799
48926
|
* Checks if `value` is likely an `arguments` object.
|
|
@@ -48814,7 +48941,7 @@ var INFINITY$2 = 1 / 0, MAX_SAFE_INTEGER = 9007199254740991, MAX_INTEGER$2 = 1.7
|
|
|
48814
48941
|
* // => false
|
|
48815
48942
|
*/ function isArguments(value) {
|
|
48816
48943
|
// Safari 8.1 makes `arguments.callee` enumerable in strict mode.
|
|
48817
|
-
return isArrayLikeObject(value) && hasOwnProperty
|
|
48944
|
+
return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') && (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
|
|
48818
48945
|
}
|
|
48819
48946
|
/**
|
|
48820
48947
|
* Checks if `value` is classified as an `Array` object.
|
|
@@ -48838,7 +48965,7 @@ var INFINITY$2 = 1 / 0, MAX_SAFE_INTEGER = 9007199254740991, MAX_INTEGER$2 = 1.7
|
|
|
48838
48965
|
*
|
|
48839
48966
|
* _.isArray(_.noop);
|
|
48840
48967
|
* // => false
|
|
48841
|
-
*/ var isArray
|
|
48968
|
+
*/ var isArray = Array.isArray;
|
|
48842
48969
|
/**
|
|
48843
48970
|
* Checks if `value` is array-like. A value is considered array-like if it's
|
|
48844
48971
|
* not a function and has a `value.length` that's an integer greater than or
|
|
@@ -48891,7 +49018,7 @@ var INFINITY$2 = 1 / 0, MAX_SAFE_INTEGER = 9007199254740991, MAX_INTEGER$2 = 1.7
|
|
|
48891
49018
|
* _.isArrayLikeObject(_.noop);
|
|
48892
49019
|
* // => false
|
|
48893
49020
|
*/ function isArrayLikeObject(value) {
|
|
48894
|
-
return isObjectLike
|
|
49021
|
+
return isObjectLike(value) && isArrayLike(value);
|
|
48895
49022
|
}
|
|
48896
49023
|
/**
|
|
48897
49024
|
* Checks if `value` is classified as a `Function` object.
|
|
@@ -48912,7 +49039,7 @@ var INFINITY$2 = 1 / 0, MAX_SAFE_INTEGER = 9007199254740991, MAX_INTEGER$2 = 1.7
|
|
|
48912
49039
|
*/ function isFunction(value) {
|
|
48913
49040
|
// The use of `Object#toString` avoids issues with the `typeof` operator
|
|
48914
49041
|
// in Safari 8-9 which returns 'object' for typed array and other constructors.
|
|
48915
|
-
var tag = isObject
|
|
49042
|
+
var tag = isObject(value) ? objectToString.call(value) : '';
|
|
48916
49043
|
return tag == funcTag || tag == genTag;
|
|
48917
49044
|
}
|
|
48918
49045
|
/**
|
|
@@ -48967,8 +49094,8 @@ var INFINITY$2 = 1 / 0, MAX_SAFE_INTEGER = 9007199254740991, MAX_INTEGER$2 = 1.7
|
|
|
48967
49094
|
*
|
|
48968
49095
|
* _.isObject(null);
|
|
48969
49096
|
* // => false
|
|
48970
|
-
*/ function isObject
|
|
48971
|
-
var type = typeof value === "undefined" ? "undefined" : _type_of
|
|
49097
|
+
*/ function isObject(value) {
|
|
49098
|
+
var type = typeof value === "undefined" ? "undefined" : _type_of(value);
|
|
48972
49099
|
return !!value && (type == 'object' || type == 'function');
|
|
48973
49100
|
}
|
|
48974
49101
|
/**
|
|
@@ -48994,8 +49121,8 @@ var INFINITY$2 = 1 / 0, MAX_SAFE_INTEGER = 9007199254740991, MAX_INTEGER$2 = 1.7
|
|
|
48994
49121
|
*
|
|
48995
49122
|
* _.isObjectLike(null);
|
|
48996
49123
|
* // => false
|
|
48997
|
-
*/ function isObjectLike
|
|
48998
|
-
return !!value && (typeof value === "undefined" ? "undefined" : _type_of
|
|
49124
|
+
*/ function isObjectLike(value) {
|
|
49125
|
+
return !!value && (typeof value === "undefined" ? "undefined" : _type_of(value)) == 'object';
|
|
48999
49126
|
}
|
|
49000
49127
|
/**
|
|
49001
49128
|
* Checks if `value` is classified as a `String` primitive or object.
|
|
@@ -49013,8 +49140,8 @@ var INFINITY$2 = 1 / 0, MAX_SAFE_INTEGER = 9007199254740991, MAX_INTEGER$2 = 1.7
|
|
|
49013
49140
|
*
|
|
49014
49141
|
* _.isString(1);
|
|
49015
49142
|
* // => false
|
|
49016
|
-
*/ function isString
|
|
49017
|
-
return typeof value == 'string' || !isArray
|
|
49143
|
+
*/ function isString(value) {
|
|
49144
|
+
return typeof value == 'string' || !isArray(value) && isObjectLike(value) && objectToString.call(value) == stringTag;
|
|
49018
49145
|
}
|
|
49019
49146
|
/**
|
|
49020
49147
|
* Checks if `value` is classified as a `Symbol` primitive or object.
|
|
@@ -49032,8 +49159,8 @@ var INFINITY$2 = 1 / 0, MAX_SAFE_INTEGER = 9007199254740991, MAX_INTEGER$2 = 1.7
|
|
|
49032
49159
|
*
|
|
49033
49160
|
* _.isSymbol('abc');
|
|
49034
49161
|
* // => false
|
|
49035
|
-
*/ function isSymbol
|
|
49036
|
-
return (typeof value === "undefined" ? "undefined" : _type_of
|
|
49162
|
+
*/ function isSymbol(value) {
|
|
49163
|
+
return (typeof value === "undefined" ? "undefined" : _type_of(value)) == 'symbol' || isObjectLike(value) && objectToString.call(value) == symbolTag;
|
|
49037
49164
|
}
|
|
49038
49165
|
/**
|
|
49039
49166
|
* Converts `value` to a finite number.
|
|
@@ -49057,14 +49184,14 @@ var INFINITY$2 = 1 / 0, MAX_SAFE_INTEGER = 9007199254740991, MAX_INTEGER$2 = 1.7
|
|
|
49057
49184
|
*
|
|
49058
49185
|
* _.toFinite('3.2');
|
|
49059
49186
|
* // => 3.2
|
|
49060
|
-
*/ function toFinite
|
|
49187
|
+
*/ function toFinite(value) {
|
|
49061
49188
|
if (!value) {
|
|
49062
49189
|
return value === 0 ? value : 0;
|
|
49063
49190
|
}
|
|
49064
|
-
value = toNumber
|
|
49065
|
-
if (value === INFINITY
|
|
49191
|
+
value = toNumber(value);
|
|
49192
|
+
if (value === INFINITY || value === -INFINITY) {
|
|
49066
49193
|
var sign = value < 0 ? -1 : 1;
|
|
49067
|
-
return sign * MAX_INTEGER
|
|
49194
|
+
return sign * MAX_INTEGER;
|
|
49068
49195
|
}
|
|
49069
49196
|
return value === value ? value : 0;
|
|
49070
49197
|
}
|
|
@@ -49093,8 +49220,8 @@ var INFINITY$2 = 1 / 0, MAX_SAFE_INTEGER = 9007199254740991, MAX_INTEGER$2 = 1.7
|
|
|
49093
49220
|
*
|
|
49094
49221
|
* _.toInteger('3.2');
|
|
49095
49222
|
* // => 3
|
|
49096
|
-
*/ function toInteger
|
|
49097
|
-
var result = toFinite
|
|
49223
|
+
*/ function toInteger(value) {
|
|
49224
|
+
var result = toFinite(value), remainder = result % 1;
|
|
49098
49225
|
return result === result ? remainder ? result - remainder : result : 0;
|
|
49099
49226
|
}
|
|
49100
49227
|
/**
|
|
@@ -49119,23 +49246,23 @@ var INFINITY$2 = 1 / 0, MAX_SAFE_INTEGER = 9007199254740991, MAX_INTEGER$2 = 1.7
|
|
|
49119
49246
|
*
|
|
49120
49247
|
* _.toNumber('3.2');
|
|
49121
49248
|
* // => 3.2
|
|
49122
|
-
*/ function toNumber
|
|
49249
|
+
*/ function toNumber(value) {
|
|
49123
49250
|
if (typeof value == 'number') {
|
|
49124
49251
|
return value;
|
|
49125
49252
|
}
|
|
49126
|
-
if (isSymbol
|
|
49127
|
-
return NAN
|
|
49253
|
+
if (isSymbol(value)) {
|
|
49254
|
+
return NAN;
|
|
49128
49255
|
}
|
|
49129
|
-
if (isObject
|
|
49256
|
+
if (isObject(value)) {
|
|
49130
49257
|
var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
|
|
49131
|
-
value = isObject
|
|
49258
|
+
value = isObject(other) ? other + '' : other;
|
|
49132
49259
|
}
|
|
49133
49260
|
if (typeof value != 'string') {
|
|
49134
49261
|
return value === 0 ? value : +value;
|
|
49135
49262
|
}
|
|
49136
|
-
value = value.replace(reTrim
|
|
49137
|
-
var isBinary = reIsBinary
|
|
49138
|
-
return isBinary || reIsOctal
|
|
49263
|
+
value = value.replace(reTrim, '');
|
|
49264
|
+
var isBinary = reIsBinary.test(value);
|
|
49265
|
+
return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
|
|
49139
49266
|
}
|
|
49140
49267
|
/**
|
|
49141
49268
|
* Creates an array of the own enumerable property names of `object`.
|
|
@@ -49197,374 +49324,6 @@ var INFINITY$2 = 1 / 0, MAX_SAFE_INTEGER = 9007199254740991, MAX_INTEGER$2 = 1.7
|
|
|
49197
49324
|
}
|
|
49198
49325
|
var lodash_includes = includes$1;
|
|
49199
49326
|
|
|
49200
|
-
/**
|
|
49201
|
-
* lodash 3.0.3 (Custom Build) <https://lodash.com/>
|
|
49202
|
-
* Build: `lodash modularize exports="npm" -o ./`
|
|
49203
|
-
* Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
|
|
49204
|
-
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
49205
|
-
* Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
49206
|
-
* Available under MIT license <https://lodash.com/license>
|
|
49207
|
-
*/
|
|
49208
|
-
|
|
49209
|
-
/** `Object#toString` result references. */ function _type_of$6(obj) {
|
|
49210
|
-
"@swc/helpers - typeof";
|
|
49211
|
-
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
49212
|
-
}
|
|
49213
|
-
var boolTag = '[object Boolean]';
|
|
49214
|
-
/** Used for built-in method references. */ var objectProto$5 = Object.prototype;
|
|
49215
|
-
/**
|
|
49216
|
-
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
|
|
49217
|
-
* of values.
|
|
49218
|
-
*/ var objectToString$5 = objectProto$5.toString;
|
|
49219
|
-
/**
|
|
49220
|
-
* Checks if `value` is classified as a boolean primitive or object.
|
|
49221
|
-
*
|
|
49222
|
-
* @static
|
|
49223
|
-
* @memberOf _
|
|
49224
|
-
* @category Lang
|
|
49225
|
-
* @param {*} value The value to check.
|
|
49226
|
-
* @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
|
|
49227
|
-
* @example
|
|
49228
|
-
*
|
|
49229
|
-
* _.isBoolean(false);
|
|
49230
|
-
* // => true
|
|
49231
|
-
*
|
|
49232
|
-
* _.isBoolean(null);
|
|
49233
|
-
* // => false
|
|
49234
|
-
*/ function isBoolean$1(value) {
|
|
49235
|
-
return value === true || value === false || isObjectLike$5(value) && objectToString$5.call(value) == boolTag;
|
|
49236
|
-
}
|
|
49237
|
-
/**
|
|
49238
|
-
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
49239
|
-
* and has a `typeof` result of "object".
|
|
49240
|
-
*
|
|
49241
|
-
* @static
|
|
49242
|
-
* @memberOf _
|
|
49243
|
-
* @category Lang
|
|
49244
|
-
* @param {*} value The value to check.
|
|
49245
|
-
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
|
49246
|
-
* @example
|
|
49247
|
-
*
|
|
49248
|
-
* _.isObjectLike({});
|
|
49249
|
-
* // => true
|
|
49250
|
-
*
|
|
49251
|
-
* _.isObjectLike([1, 2, 3]);
|
|
49252
|
-
* // => true
|
|
49253
|
-
*
|
|
49254
|
-
* _.isObjectLike(_.noop);
|
|
49255
|
-
* // => false
|
|
49256
|
-
*
|
|
49257
|
-
* _.isObjectLike(null);
|
|
49258
|
-
* // => false
|
|
49259
|
-
*/ function isObjectLike$5(value) {
|
|
49260
|
-
return !!value && (typeof value === "undefined" ? "undefined" : _type_of$6(value)) == 'object';
|
|
49261
|
-
}
|
|
49262
|
-
var lodash_isboolean = isBoolean$1;
|
|
49263
|
-
|
|
49264
|
-
/**
|
|
49265
|
-
* lodash (Custom Build) <https://lodash.com/>
|
|
49266
|
-
* Build: `lodash modularize exports="npm" -o ./`
|
|
49267
|
-
* Copyright jQuery Foundation and other contributors <https://jquery.org/>
|
|
49268
|
-
* Released under MIT license <https://lodash.com/license>
|
|
49269
|
-
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
49270
|
-
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
49271
|
-
*/
|
|
49272
|
-
|
|
49273
|
-
/** Used as references for various `Number` constants. */ function _type_of$5(obj) {
|
|
49274
|
-
"@swc/helpers - typeof";
|
|
49275
|
-
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
49276
|
-
}
|
|
49277
|
-
var INFINITY$1 = 1 / 0, MAX_INTEGER$1 = 1.7976931348623157e+308, NAN$1 = 0 / 0;
|
|
49278
|
-
/** `Object#toString` result references. */ var symbolTag$1 = '[object Symbol]';
|
|
49279
|
-
/** Used to match leading and trailing whitespace. */ var reTrim$1 = /^\s+|\s+$/g;
|
|
49280
|
-
/** Used to detect bad signed hexadecimal string values. */ var reIsBadHex$1 = /^[-+]0x[0-9a-f]+$/i;
|
|
49281
|
-
/** Used to detect binary string values. */ var reIsBinary$1 = /^0b[01]+$/i;
|
|
49282
|
-
/** Used to detect octal string values. */ var reIsOctal$1 = /^0o[0-7]+$/i;
|
|
49283
|
-
/** Built-in method references without a dependency on `root`. */ var freeParseInt$1 = parseInt;
|
|
49284
|
-
/** Used for built-in method references. */ var objectProto$4 = Object.prototype;
|
|
49285
|
-
/**
|
|
49286
|
-
* Used to resolve the
|
|
49287
|
-
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
49288
|
-
* of values.
|
|
49289
|
-
*/ var objectToString$4 = objectProto$4.toString;
|
|
49290
|
-
/**
|
|
49291
|
-
* Checks if `value` is an integer.
|
|
49292
|
-
*
|
|
49293
|
-
* **Note:** This method is based on
|
|
49294
|
-
* [`Number.isInteger`](https://mdn.io/Number/isInteger).
|
|
49295
|
-
*
|
|
49296
|
-
* @static
|
|
49297
|
-
* @memberOf _
|
|
49298
|
-
* @since 4.0.0
|
|
49299
|
-
* @category Lang
|
|
49300
|
-
* @param {*} value The value to check.
|
|
49301
|
-
* @returns {boolean} Returns `true` if `value` is an integer, else `false`.
|
|
49302
|
-
* @example
|
|
49303
|
-
*
|
|
49304
|
-
* _.isInteger(3);
|
|
49305
|
-
* // => true
|
|
49306
|
-
*
|
|
49307
|
-
* _.isInteger(Number.MIN_VALUE);
|
|
49308
|
-
* // => false
|
|
49309
|
-
*
|
|
49310
|
-
* _.isInteger(Infinity);
|
|
49311
|
-
* // => false
|
|
49312
|
-
*
|
|
49313
|
-
* _.isInteger('3');
|
|
49314
|
-
* // => false
|
|
49315
|
-
*/ function isInteger$1(value) {
|
|
49316
|
-
return typeof value == 'number' && value == toInteger$1(value);
|
|
49317
|
-
}
|
|
49318
|
-
/**
|
|
49319
|
-
* Checks if `value` is the
|
|
49320
|
-
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
|
49321
|
-
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
|
49322
|
-
*
|
|
49323
|
-
* @static
|
|
49324
|
-
* @memberOf _
|
|
49325
|
-
* @since 0.1.0
|
|
49326
|
-
* @category Lang
|
|
49327
|
-
* @param {*} value The value to check.
|
|
49328
|
-
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
|
49329
|
-
* @example
|
|
49330
|
-
*
|
|
49331
|
-
* _.isObject({});
|
|
49332
|
-
* // => true
|
|
49333
|
-
*
|
|
49334
|
-
* _.isObject([1, 2, 3]);
|
|
49335
|
-
* // => true
|
|
49336
|
-
*
|
|
49337
|
-
* _.isObject(_.noop);
|
|
49338
|
-
* // => true
|
|
49339
|
-
*
|
|
49340
|
-
* _.isObject(null);
|
|
49341
|
-
* // => false
|
|
49342
|
-
*/ function isObject$1(value) {
|
|
49343
|
-
var type = typeof value === "undefined" ? "undefined" : _type_of$5(value);
|
|
49344
|
-
return !!value && (type == 'object' || type == 'function');
|
|
49345
|
-
}
|
|
49346
|
-
/**
|
|
49347
|
-
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
49348
|
-
* and has a `typeof` result of "object".
|
|
49349
|
-
*
|
|
49350
|
-
* @static
|
|
49351
|
-
* @memberOf _
|
|
49352
|
-
* @since 4.0.0
|
|
49353
|
-
* @category Lang
|
|
49354
|
-
* @param {*} value The value to check.
|
|
49355
|
-
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
|
49356
|
-
* @example
|
|
49357
|
-
*
|
|
49358
|
-
* _.isObjectLike({});
|
|
49359
|
-
* // => true
|
|
49360
|
-
*
|
|
49361
|
-
* _.isObjectLike([1, 2, 3]);
|
|
49362
|
-
* // => true
|
|
49363
|
-
*
|
|
49364
|
-
* _.isObjectLike(_.noop);
|
|
49365
|
-
* // => false
|
|
49366
|
-
*
|
|
49367
|
-
* _.isObjectLike(null);
|
|
49368
|
-
* // => false
|
|
49369
|
-
*/ function isObjectLike$4(value) {
|
|
49370
|
-
return !!value && (typeof value === "undefined" ? "undefined" : _type_of$5(value)) == 'object';
|
|
49371
|
-
}
|
|
49372
|
-
/**
|
|
49373
|
-
* Checks if `value` is classified as a `Symbol` primitive or object.
|
|
49374
|
-
*
|
|
49375
|
-
* @static
|
|
49376
|
-
* @memberOf _
|
|
49377
|
-
* @since 4.0.0
|
|
49378
|
-
* @category Lang
|
|
49379
|
-
* @param {*} value The value to check.
|
|
49380
|
-
* @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
|
|
49381
|
-
* @example
|
|
49382
|
-
*
|
|
49383
|
-
* _.isSymbol(Symbol.iterator);
|
|
49384
|
-
* // => true
|
|
49385
|
-
*
|
|
49386
|
-
* _.isSymbol('abc');
|
|
49387
|
-
* // => false
|
|
49388
|
-
*/ function isSymbol$1(value) {
|
|
49389
|
-
return (typeof value === "undefined" ? "undefined" : _type_of$5(value)) == 'symbol' || isObjectLike$4(value) && objectToString$4.call(value) == symbolTag$1;
|
|
49390
|
-
}
|
|
49391
|
-
/**
|
|
49392
|
-
* Converts `value` to a finite number.
|
|
49393
|
-
*
|
|
49394
|
-
* @static
|
|
49395
|
-
* @memberOf _
|
|
49396
|
-
* @since 4.12.0
|
|
49397
|
-
* @category Lang
|
|
49398
|
-
* @param {*} value The value to convert.
|
|
49399
|
-
* @returns {number} Returns the converted number.
|
|
49400
|
-
* @example
|
|
49401
|
-
*
|
|
49402
|
-
* _.toFinite(3.2);
|
|
49403
|
-
* // => 3.2
|
|
49404
|
-
*
|
|
49405
|
-
* _.toFinite(Number.MIN_VALUE);
|
|
49406
|
-
* // => 5e-324
|
|
49407
|
-
*
|
|
49408
|
-
* _.toFinite(Infinity);
|
|
49409
|
-
* // => 1.7976931348623157e+308
|
|
49410
|
-
*
|
|
49411
|
-
* _.toFinite('3.2');
|
|
49412
|
-
* // => 3.2
|
|
49413
|
-
*/ function toFinite$1(value) {
|
|
49414
|
-
if (!value) {
|
|
49415
|
-
return value === 0 ? value : 0;
|
|
49416
|
-
}
|
|
49417
|
-
value = toNumber$1(value);
|
|
49418
|
-
if (value === INFINITY$1 || value === -INFINITY$1) {
|
|
49419
|
-
var sign = value < 0 ? -1 : 1;
|
|
49420
|
-
return sign * MAX_INTEGER$1;
|
|
49421
|
-
}
|
|
49422
|
-
return value === value ? value : 0;
|
|
49423
|
-
}
|
|
49424
|
-
/**
|
|
49425
|
-
* Converts `value` to an integer.
|
|
49426
|
-
*
|
|
49427
|
-
* **Note:** This method is loosely based on
|
|
49428
|
-
* [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
|
|
49429
|
-
*
|
|
49430
|
-
* @static
|
|
49431
|
-
* @memberOf _
|
|
49432
|
-
* @since 4.0.0
|
|
49433
|
-
* @category Lang
|
|
49434
|
-
* @param {*} value The value to convert.
|
|
49435
|
-
* @returns {number} Returns the converted integer.
|
|
49436
|
-
* @example
|
|
49437
|
-
*
|
|
49438
|
-
* _.toInteger(3.2);
|
|
49439
|
-
* // => 3
|
|
49440
|
-
*
|
|
49441
|
-
* _.toInteger(Number.MIN_VALUE);
|
|
49442
|
-
* // => 0
|
|
49443
|
-
*
|
|
49444
|
-
* _.toInteger(Infinity);
|
|
49445
|
-
* // => 1.7976931348623157e+308
|
|
49446
|
-
*
|
|
49447
|
-
* _.toInteger('3.2');
|
|
49448
|
-
* // => 3
|
|
49449
|
-
*/ function toInteger$1(value) {
|
|
49450
|
-
var result = toFinite$1(value), remainder = result % 1;
|
|
49451
|
-
return result === result ? remainder ? result - remainder : result : 0;
|
|
49452
|
-
}
|
|
49453
|
-
/**
|
|
49454
|
-
* Converts `value` to a number.
|
|
49455
|
-
*
|
|
49456
|
-
* @static
|
|
49457
|
-
* @memberOf _
|
|
49458
|
-
* @since 4.0.0
|
|
49459
|
-
* @category Lang
|
|
49460
|
-
* @param {*} value The value to process.
|
|
49461
|
-
* @returns {number} Returns the number.
|
|
49462
|
-
* @example
|
|
49463
|
-
*
|
|
49464
|
-
* _.toNumber(3.2);
|
|
49465
|
-
* // => 3.2
|
|
49466
|
-
*
|
|
49467
|
-
* _.toNumber(Number.MIN_VALUE);
|
|
49468
|
-
* // => 5e-324
|
|
49469
|
-
*
|
|
49470
|
-
* _.toNumber(Infinity);
|
|
49471
|
-
* // => Infinity
|
|
49472
|
-
*
|
|
49473
|
-
* _.toNumber('3.2');
|
|
49474
|
-
* // => 3.2
|
|
49475
|
-
*/ function toNumber$1(value) {
|
|
49476
|
-
if (typeof value == 'number') {
|
|
49477
|
-
return value;
|
|
49478
|
-
}
|
|
49479
|
-
if (isSymbol$1(value)) {
|
|
49480
|
-
return NAN$1;
|
|
49481
|
-
}
|
|
49482
|
-
if (isObject$1(value)) {
|
|
49483
|
-
var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
|
|
49484
|
-
value = isObject$1(other) ? other + '' : other;
|
|
49485
|
-
}
|
|
49486
|
-
if (typeof value != 'string') {
|
|
49487
|
-
return value === 0 ? value : +value;
|
|
49488
|
-
}
|
|
49489
|
-
value = value.replace(reTrim$1, '');
|
|
49490
|
-
var isBinary = reIsBinary$1.test(value);
|
|
49491
|
-
return isBinary || reIsOctal$1.test(value) ? freeParseInt$1(value.slice(2), isBinary ? 2 : 8) : reIsBadHex$1.test(value) ? NAN$1 : +value;
|
|
49492
|
-
}
|
|
49493
|
-
var lodash_isinteger = isInteger$1;
|
|
49494
|
-
|
|
49495
|
-
/**
|
|
49496
|
-
* lodash 3.0.3 (Custom Build) <https://lodash.com/>
|
|
49497
|
-
* Build: `lodash modularize exports="npm" -o ./`
|
|
49498
|
-
* Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
|
|
49499
|
-
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
49500
|
-
* Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
49501
|
-
* Available under MIT license <https://lodash.com/license>
|
|
49502
|
-
*/
|
|
49503
|
-
|
|
49504
|
-
/** `Object#toString` result references. */ function _type_of$4(obj) {
|
|
49505
|
-
"@swc/helpers - typeof";
|
|
49506
|
-
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
49507
|
-
}
|
|
49508
|
-
var numberTag = '[object Number]';
|
|
49509
|
-
/** Used for built-in method references. */ var objectProto$3 = Object.prototype;
|
|
49510
|
-
/**
|
|
49511
|
-
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
|
|
49512
|
-
* of values.
|
|
49513
|
-
*/ var objectToString$3 = objectProto$3.toString;
|
|
49514
|
-
/**
|
|
49515
|
-
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
49516
|
-
* and has a `typeof` result of "object".
|
|
49517
|
-
*
|
|
49518
|
-
* @static
|
|
49519
|
-
* @memberOf _
|
|
49520
|
-
* @category Lang
|
|
49521
|
-
* @param {*} value The value to check.
|
|
49522
|
-
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
|
49523
|
-
* @example
|
|
49524
|
-
*
|
|
49525
|
-
* _.isObjectLike({});
|
|
49526
|
-
* // => true
|
|
49527
|
-
*
|
|
49528
|
-
* _.isObjectLike([1, 2, 3]);
|
|
49529
|
-
* // => true
|
|
49530
|
-
*
|
|
49531
|
-
* _.isObjectLike(_.noop);
|
|
49532
|
-
* // => false
|
|
49533
|
-
*
|
|
49534
|
-
* _.isObjectLike(null);
|
|
49535
|
-
* // => false
|
|
49536
|
-
*/ function isObjectLike$3(value) {
|
|
49537
|
-
return !!value && (typeof value === "undefined" ? "undefined" : _type_of$4(value)) == 'object';
|
|
49538
|
-
}
|
|
49539
|
-
/**
|
|
49540
|
-
* Checks if `value` is classified as a `Number` primitive or object.
|
|
49541
|
-
*
|
|
49542
|
-
* **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are classified
|
|
49543
|
-
* as numbers, use the `_.isFinite` method.
|
|
49544
|
-
*
|
|
49545
|
-
* @static
|
|
49546
|
-
* @memberOf _
|
|
49547
|
-
* @category Lang
|
|
49548
|
-
* @param {*} value The value to check.
|
|
49549
|
-
* @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
|
|
49550
|
-
* @example
|
|
49551
|
-
*
|
|
49552
|
-
* _.isNumber(3);
|
|
49553
|
-
* // => true
|
|
49554
|
-
*
|
|
49555
|
-
* _.isNumber(Number.MIN_VALUE);
|
|
49556
|
-
* // => true
|
|
49557
|
-
*
|
|
49558
|
-
* _.isNumber(Infinity);
|
|
49559
|
-
* // => true
|
|
49560
|
-
*
|
|
49561
|
-
* _.isNumber('3');
|
|
49562
|
-
* // => false
|
|
49563
|
-
*/ function isNumber$1(value) {
|
|
49564
|
-
return typeof value == 'number' || isObjectLike$3(value) && objectToString$3.call(value) == numberTag;
|
|
49565
|
-
}
|
|
49566
|
-
var lodash_isnumber = isNumber$1;
|
|
49567
|
-
|
|
49568
49327
|
/**
|
|
49569
49328
|
* lodash (Custom Build) <https://lodash.com/>
|
|
49570
49329
|
* Build: `lodash modularize exports="npm" -o ./`
|
|
@@ -49573,490 +49332,13 @@ var lodash_isnumber = isNumber$1;
|
|
|
49573
49332
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
49574
49333
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
49575
49334
|
*/
|
|
49576
|
-
|
|
49577
|
-
/** `Object#toString` result references. */ function _instanceof$1(left, right) {
|
|
49578
|
-
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
49579
|
-
return !!right[Symbol.hasInstance](left);
|
|
49580
|
-
} else {
|
|
49581
|
-
return left instanceof right;
|
|
49582
|
-
}
|
|
49583
|
-
}
|
|
49584
|
-
function _type_of$3(obj) {
|
|
49585
|
-
"@swc/helpers - typeof";
|
|
49586
|
-
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
49587
|
-
}
|
|
49588
|
-
var objectTag = '[object Object]';
|
|
49589
|
-
/**
|
|
49590
|
-
* Checks if `value` is a host object in IE < 9.
|
|
49591
|
-
*
|
|
49592
|
-
* @private
|
|
49593
|
-
* @param {*} value The value to check.
|
|
49594
|
-
* @returns {boolean} Returns `true` if `value` is a host object, else `false`.
|
|
49595
|
-
*/ function isHostObject(value) {
|
|
49596
|
-
// Many host objects are `Object` objects that can coerce to strings
|
|
49597
|
-
// despite having improperly defined `toString` methods.
|
|
49598
|
-
var result = false;
|
|
49599
|
-
if (value != null && typeof value.toString != 'function') {
|
|
49600
|
-
try {
|
|
49601
|
-
result = !!(value + '');
|
|
49602
|
-
} catch (e) {}
|
|
49603
|
-
}
|
|
49604
|
-
return result;
|
|
49605
|
-
}
|
|
49606
|
-
/**
|
|
49607
|
-
* Creates a unary function that invokes `func` with its argument transformed.
|
|
49608
|
-
*
|
|
49609
|
-
* @private
|
|
49610
|
-
* @param {Function} func The function to wrap.
|
|
49611
|
-
* @param {Function} transform The argument transform.
|
|
49612
|
-
* @returns {Function} Returns the new function.
|
|
49613
|
-
*/ function overArg(func, transform) {
|
|
49614
|
-
return function(arg) {
|
|
49615
|
-
return func(transform(arg));
|
|
49616
|
-
};
|
|
49617
|
-
}
|
|
49618
|
-
/** Used for built-in method references. */ var funcProto = Function.prototype, objectProto$2 = Object.prototype;
|
|
49335
|
+
/** Used for built-in method references. */ var funcProto = Function.prototype;
|
|
49619
49336
|
/** Used to resolve the decompiled source of functions. */ var funcToString = funcProto.toString;
|
|
49620
|
-
/** Used to
|
|
49621
|
-
/** Used to infer the `Object` constructor. */ var objectCtorString = funcToString.call(Object);
|
|
49622
|
-
/**
|
|
49623
|
-
* Used to resolve the
|
|
49624
|
-
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
49625
|
-
* of values.
|
|
49626
|
-
*/ var objectToString$2 = objectProto$2.toString;
|
|
49627
|
-
/** Built-in value references. */ var getPrototype = overArg(Object.getPrototypeOf, Object);
|
|
49628
|
-
/**
|
|
49629
|
-
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
49630
|
-
* and has a `typeof` result of "object".
|
|
49631
|
-
*
|
|
49632
|
-
* @static
|
|
49633
|
-
* @memberOf _
|
|
49634
|
-
* @since 4.0.0
|
|
49635
|
-
* @category Lang
|
|
49636
|
-
* @param {*} value The value to check.
|
|
49637
|
-
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
|
49638
|
-
* @example
|
|
49639
|
-
*
|
|
49640
|
-
* _.isObjectLike({});
|
|
49641
|
-
* // => true
|
|
49642
|
-
*
|
|
49643
|
-
* _.isObjectLike([1, 2, 3]);
|
|
49644
|
-
* // => true
|
|
49645
|
-
*
|
|
49646
|
-
* _.isObjectLike(_.noop);
|
|
49647
|
-
* // => false
|
|
49648
|
-
*
|
|
49649
|
-
* _.isObjectLike(null);
|
|
49650
|
-
* // => false
|
|
49651
|
-
*/ function isObjectLike$2(value) {
|
|
49652
|
-
return !!value && (typeof value === "undefined" ? "undefined" : _type_of$3(value)) == 'object';
|
|
49653
|
-
}
|
|
49654
|
-
/**
|
|
49655
|
-
* Checks if `value` is a plain object, that is, an object created by the
|
|
49656
|
-
* `Object` constructor or one with a `[[Prototype]]` of `null`.
|
|
49657
|
-
*
|
|
49658
|
-
* @static
|
|
49659
|
-
* @memberOf _
|
|
49660
|
-
* @since 0.8.0
|
|
49661
|
-
* @category Lang
|
|
49662
|
-
* @param {*} value The value to check.
|
|
49663
|
-
* @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
|
|
49664
|
-
* @example
|
|
49665
|
-
*
|
|
49666
|
-
* function Foo() {
|
|
49667
|
-
* this.a = 1;
|
|
49668
|
-
* }
|
|
49669
|
-
*
|
|
49670
|
-
* _.isPlainObject(new Foo);
|
|
49671
|
-
* // => false
|
|
49672
|
-
*
|
|
49673
|
-
* _.isPlainObject([1, 2, 3]);
|
|
49674
|
-
* // => false
|
|
49675
|
-
*
|
|
49676
|
-
* _.isPlainObject({ 'x': 0, 'y': 0 });
|
|
49677
|
-
* // => true
|
|
49678
|
-
*
|
|
49679
|
-
* _.isPlainObject(Object.create(null));
|
|
49680
|
-
* // => true
|
|
49681
|
-
*/ function isPlainObject$1(value) {
|
|
49682
|
-
if (!isObjectLike$2(value) || objectToString$2.call(value) != objectTag || isHostObject(value)) {
|
|
49683
|
-
return false;
|
|
49684
|
-
}
|
|
49685
|
-
var proto = getPrototype(value);
|
|
49686
|
-
if (proto === null) {
|
|
49687
|
-
return true;
|
|
49688
|
-
}
|
|
49689
|
-
var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
|
|
49690
|
-
return typeof Ctor == 'function' && _instanceof$1(Ctor, Ctor) && funcToString.call(Ctor) == objectCtorString;
|
|
49691
|
-
}
|
|
49692
|
-
var lodash_isplainobject = isPlainObject$1;
|
|
49693
|
-
|
|
49694
|
-
/**
|
|
49695
|
-
* lodash 4.0.1 (Custom Build) <https://lodash.com/>
|
|
49696
|
-
* Build: `lodash modularize exports="npm" -o ./`
|
|
49697
|
-
* Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
|
|
49698
|
-
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
49699
|
-
* Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
49700
|
-
* Available under MIT license <https://lodash.com/license>
|
|
49701
|
-
*/
|
|
49702
|
-
|
|
49703
|
-
/** `Object#toString` result references. */ function _type_of$2(obj) {
|
|
49704
|
-
"@swc/helpers - typeof";
|
|
49705
|
-
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
49706
|
-
}
|
|
49707
|
-
var stringTag = '[object String]';
|
|
49708
|
-
/** Used for built-in method references. */ var objectProto$1 = Object.prototype;
|
|
49709
|
-
/**
|
|
49710
|
-
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
|
|
49711
|
-
* of values.
|
|
49712
|
-
*/ var objectToString$1 = objectProto$1.toString;
|
|
49713
|
-
/**
|
|
49714
|
-
* Checks if `value` is classified as an `Array` object.
|
|
49715
|
-
*
|
|
49716
|
-
* @static
|
|
49717
|
-
* @memberOf _
|
|
49718
|
-
* @type Function
|
|
49719
|
-
* @category Lang
|
|
49720
|
-
* @param {*} value The value to check.
|
|
49721
|
-
* @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
|
|
49722
|
-
* @example
|
|
49723
|
-
*
|
|
49724
|
-
* _.isArray([1, 2, 3]);
|
|
49725
|
-
* // => true
|
|
49726
|
-
*
|
|
49727
|
-
* _.isArray(document.body.children);
|
|
49728
|
-
* // => false
|
|
49729
|
-
*
|
|
49730
|
-
* _.isArray('abc');
|
|
49731
|
-
* // => false
|
|
49732
|
-
*
|
|
49733
|
-
* _.isArray(_.noop);
|
|
49734
|
-
* // => false
|
|
49735
|
-
*/ var isArray = Array.isArray;
|
|
49736
|
-
/**
|
|
49737
|
-
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
49738
|
-
* and has a `typeof` result of "object".
|
|
49739
|
-
*
|
|
49740
|
-
* @static
|
|
49741
|
-
* @memberOf _
|
|
49742
|
-
* @category Lang
|
|
49743
|
-
* @param {*} value The value to check.
|
|
49744
|
-
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
|
49745
|
-
* @example
|
|
49746
|
-
*
|
|
49747
|
-
* _.isObjectLike({});
|
|
49748
|
-
* // => true
|
|
49749
|
-
*
|
|
49750
|
-
* _.isObjectLike([1, 2, 3]);
|
|
49751
|
-
* // => true
|
|
49752
|
-
*
|
|
49753
|
-
* _.isObjectLike(_.noop);
|
|
49754
|
-
* // => false
|
|
49755
|
-
*
|
|
49756
|
-
* _.isObjectLike(null);
|
|
49757
|
-
* // => false
|
|
49758
|
-
*/ function isObjectLike$1(value) {
|
|
49759
|
-
return !!value && (typeof value === "undefined" ? "undefined" : _type_of$2(value)) == 'object';
|
|
49760
|
-
}
|
|
49761
|
-
/**
|
|
49762
|
-
* Checks if `value` is classified as a `String` primitive or object.
|
|
49763
|
-
*
|
|
49764
|
-
* @static
|
|
49765
|
-
* @memberOf _
|
|
49766
|
-
* @category Lang
|
|
49767
|
-
* @param {*} value The value to check.
|
|
49768
|
-
* @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
|
|
49769
|
-
* @example
|
|
49770
|
-
*
|
|
49771
|
-
* _.isString('abc');
|
|
49772
|
-
* // => true
|
|
49773
|
-
*
|
|
49774
|
-
* _.isString(1);
|
|
49775
|
-
* // => false
|
|
49776
|
-
*/ function isString$1(value) {
|
|
49777
|
-
return typeof value == 'string' || !isArray(value) && isObjectLike$1(value) && objectToString$1.call(value) == stringTag;
|
|
49778
|
-
}
|
|
49779
|
-
var lodash_isstring = isString$1;
|
|
49780
|
-
|
|
49781
|
-
/**
|
|
49782
|
-
* lodash (Custom Build) <https://lodash.com/>
|
|
49783
|
-
* Build: `lodash modularize exports="npm" -o ./`
|
|
49784
|
-
* Copyright jQuery Foundation and other contributors <https://jquery.org/>
|
|
49785
|
-
* Released under MIT license <https://lodash.com/license>
|
|
49786
|
-
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
49787
|
-
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
49788
|
-
*/
|
|
49789
|
-
|
|
49790
|
-
/** Used as the `TypeError` message for "Functions" methods. */ function _type_of$1(obj) {
|
|
49791
|
-
"@swc/helpers - typeof";
|
|
49792
|
-
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
49793
|
-
}
|
|
49794
|
-
var FUNC_ERROR_TEXT = 'Expected a function';
|
|
49795
|
-
/** Used as references for various `Number` constants. */ var INFINITY = 1 / 0, MAX_INTEGER = 1.7976931348623157e+308, NAN = 0 / 0;
|
|
49796
|
-
/** `Object#toString` result references. */ var symbolTag = '[object Symbol]';
|
|
49797
|
-
/** Used to match leading and trailing whitespace. */ var reTrim = /^\s+|\s+$/g;
|
|
49798
|
-
/** Used to detect bad signed hexadecimal string values. */ var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
|
|
49799
|
-
/** Used to detect binary string values. */ var reIsBinary = /^0b[01]+$/i;
|
|
49800
|
-
/** Used to detect octal string values. */ var reIsOctal = /^0o[0-7]+$/i;
|
|
49801
|
-
/** Built-in method references without a dependency on `root`. */ var freeParseInt = parseInt;
|
|
49802
|
-
/** Used for built-in method references. */ var objectProto = Object.prototype;
|
|
49803
|
-
/**
|
|
49804
|
-
* Used to resolve the
|
|
49805
|
-
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
49806
|
-
* of values.
|
|
49807
|
-
*/ var objectToString = objectProto.toString;
|
|
49808
|
-
/**
|
|
49809
|
-
* Creates a function that invokes `func`, with the `this` binding and arguments
|
|
49810
|
-
* of the created function, while it's called less than `n` times. Subsequent
|
|
49811
|
-
* calls to the created function return the result of the last `func` invocation.
|
|
49812
|
-
*
|
|
49813
|
-
* @static
|
|
49814
|
-
* @memberOf _
|
|
49815
|
-
* @since 3.0.0
|
|
49816
|
-
* @category Function
|
|
49817
|
-
* @param {number} n The number of calls at which `func` is no longer invoked.
|
|
49818
|
-
* @param {Function} func The function to restrict.
|
|
49819
|
-
* @returns {Function} Returns the new restricted function.
|
|
49820
|
-
* @example
|
|
49821
|
-
*
|
|
49822
|
-
* jQuery(element).on('click', _.before(5, addContactToList));
|
|
49823
|
-
* // => Allows adding up to 4 contacts to the list.
|
|
49824
|
-
*/ function before(n, func) {
|
|
49825
|
-
var result;
|
|
49826
|
-
if (typeof func != 'function') {
|
|
49827
|
-
throw new TypeError(FUNC_ERROR_TEXT);
|
|
49828
|
-
}
|
|
49829
|
-
n = toInteger(n);
|
|
49830
|
-
return function() {
|
|
49831
|
-
if (--n > 0) {
|
|
49832
|
-
result = func.apply(this, arguments);
|
|
49833
|
-
}
|
|
49834
|
-
if (n <= 1) {
|
|
49835
|
-
func = undefined;
|
|
49836
|
-
}
|
|
49837
|
-
return result;
|
|
49838
|
-
};
|
|
49839
|
-
}
|
|
49840
|
-
/**
|
|
49841
|
-
* Creates a function that is restricted to invoking `func` once. Repeat calls
|
|
49842
|
-
* to the function return the value of the first invocation. The `func` is
|
|
49843
|
-
* invoked with the `this` binding and arguments of the created function.
|
|
49844
|
-
*
|
|
49845
|
-
* @static
|
|
49846
|
-
* @memberOf _
|
|
49847
|
-
* @since 0.1.0
|
|
49848
|
-
* @category Function
|
|
49849
|
-
* @param {Function} func The function to restrict.
|
|
49850
|
-
* @returns {Function} Returns the new restricted function.
|
|
49851
|
-
* @example
|
|
49852
|
-
*
|
|
49853
|
-
* var initialize = _.once(createApplication);
|
|
49854
|
-
* initialize();
|
|
49855
|
-
* initialize();
|
|
49856
|
-
* // => `createApplication` is invoked once
|
|
49857
|
-
*/ function once$1(func) {
|
|
49858
|
-
return before(2, func);
|
|
49859
|
-
}
|
|
49860
|
-
/**
|
|
49861
|
-
* Checks if `value` is the
|
|
49862
|
-
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
|
49863
|
-
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
|
49864
|
-
*
|
|
49865
|
-
* @static
|
|
49866
|
-
* @memberOf _
|
|
49867
|
-
* @since 0.1.0
|
|
49868
|
-
* @category Lang
|
|
49869
|
-
* @param {*} value The value to check.
|
|
49870
|
-
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
|
49871
|
-
* @example
|
|
49872
|
-
*
|
|
49873
|
-
* _.isObject({});
|
|
49874
|
-
* // => true
|
|
49875
|
-
*
|
|
49876
|
-
* _.isObject([1, 2, 3]);
|
|
49877
|
-
* // => true
|
|
49878
|
-
*
|
|
49879
|
-
* _.isObject(_.noop);
|
|
49880
|
-
* // => true
|
|
49881
|
-
*
|
|
49882
|
-
* _.isObject(null);
|
|
49883
|
-
* // => false
|
|
49884
|
-
*/ function isObject(value) {
|
|
49885
|
-
var type = typeof value === "undefined" ? "undefined" : _type_of$1(value);
|
|
49886
|
-
return !!value && (type == 'object' || type == 'function');
|
|
49887
|
-
}
|
|
49888
|
-
/**
|
|
49889
|
-
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
49890
|
-
* and has a `typeof` result of "object".
|
|
49891
|
-
*
|
|
49892
|
-
* @static
|
|
49893
|
-
* @memberOf _
|
|
49894
|
-
* @since 4.0.0
|
|
49895
|
-
* @category Lang
|
|
49896
|
-
* @param {*} value The value to check.
|
|
49897
|
-
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
|
49898
|
-
* @example
|
|
49899
|
-
*
|
|
49900
|
-
* _.isObjectLike({});
|
|
49901
|
-
* // => true
|
|
49902
|
-
*
|
|
49903
|
-
* _.isObjectLike([1, 2, 3]);
|
|
49904
|
-
* // => true
|
|
49905
|
-
*
|
|
49906
|
-
* _.isObjectLike(_.noop);
|
|
49907
|
-
* // => false
|
|
49908
|
-
*
|
|
49909
|
-
* _.isObjectLike(null);
|
|
49910
|
-
* // => false
|
|
49911
|
-
*/ function isObjectLike(value) {
|
|
49912
|
-
return !!value && (typeof value === "undefined" ? "undefined" : _type_of$1(value)) == 'object';
|
|
49913
|
-
}
|
|
49914
|
-
/**
|
|
49915
|
-
* Checks if `value` is classified as a `Symbol` primitive or object.
|
|
49916
|
-
*
|
|
49917
|
-
* @static
|
|
49918
|
-
* @memberOf _
|
|
49919
|
-
* @since 4.0.0
|
|
49920
|
-
* @category Lang
|
|
49921
|
-
* @param {*} value The value to check.
|
|
49922
|
-
* @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
|
|
49923
|
-
* @example
|
|
49924
|
-
*
|
|
49925
|
-
* _.isSymbol(Symbol.iterator);
|
|
49926
|
-
* // => true
|
|
49927
|
-
*
|
|
49928
|
-
* _.isSymbol('abc');
|
|
49929
|
-
* // => false
|
|
49930
|
-
*/ function isSymbol(value) {
|
|
49931
|
-
return (typeof value === "undefined" ? "undefined" : _type_of$1(value)) == 'symbol' || isObjectLike(value) && objectToString.call(value) == symbolTag;
|
|
49932
|
-
}
|
|
49933
|
-
/**
|
|
49934
|
-
* Converts `value` to a finite number.
|
|
49935
|
-
*
|
|
49936
|
-
* @static
|
|
49937
|
-
* @memberOf _
|
|
49938
|
-
* @since 4.12.0
|
|
49939
|
-
* @category Lang
|
|
49940
|
-
* @param {*} value The value to convert.
|
|
49941
|
-
* @returns {number} Returns the converted number.
|
|
49942
|
-
* @example
|
|
49943
|
-
*
|
|
49944
|
-
* _.toFinite(3.2);
|
|
49945
|
-
* // => 3.2
|
|
49946
|
-
*
|
|
49947
|
-
* _.toFinite(Number.MIN_VALUE);
|
|
49948
|
-
* // => 5e-324
|
|
49949
|
-
*
|
|
49950
|
-
* _.toFinite(Infinity);
|
|
49951
|
-
* // => 1.7976931348623157e+308
|
|
49952
|
-
*
|
|
49953
|
-
* _.toFinite('3.2');
|
|
49954
|
-
* // => 3.2
|
|
49955
|
-
*/ function toFinite(value) {
|
|
49956
|
-
if (!value) {
|
|
49957
|
-
return value === 0 ? value : 0;
|
|
49958
|
-
}
|
|
49959
|
-
value = toNumber(value);
|
|
49960
|
-
if (value === INFINITY || value === -INFINITY) {
|
|
49961
|
-
var sign = value < 0 ? -1 : 1;
|
|
49962
|
-
return sign * MAX_INTEGER;
|
|
49963
|
-
}
|
|
49964
|
-
return value === value ? value : 0;
|
|
49965
|
-
}
|
|
49966
|
-
/**
|
|
49967
|
-
* Converts `value` to an integer.
|
|
49968
|
-
*
|
|
49969
|
-
* **Note:** This method is loosely based on
|
|
49970
|
-
* [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
|
|
49971
|
-
*
|
|
49972
|
-
* @static
|
|
49973
|
-
* @memberOf _
|
|
49974
|
-
* @since 4.0.0
|
|
49975
|
-
* @category Lang
|
|
49976
|
-
* @param {*} value The value to convert.
|
|
49977
|
-
* @returns {number} Returns the converted integer.
|
|
49978
|
-
* @example
|
|
49979
|
-
*
|
|
49980
|
-
* _.toInteger(3.2);
|
|
49981
|
-
* // => 3
|
|
49982
|
-
*
|
|
49983
|
-
* _.toInteger(Number.MIN_VALUE);
|
|
49984
|
-
* // => 0
|
|
49985
|
-
*
|
|
49986
|
-
* _.toInteger(Infinity);
|
|
49987
|
-
* // => 1.7976931348623157e+308
|
|
49988
|
-
*
|
|
49989
|
-
* _.toInteger('3.2');
|
|
49990
|
-
* // => 3
|
|
49991
|
-
*/ function toInteger(value) {
|
|
49992
|
-
var result = toFinite(value), remainder = result % 1;
|
|
49993
|
-
return result === result ? remainder ? result - remainder : result : 0;
|
|
49994
|
-
}
|
|
49995
|
-
/**
|
|
49996
|
-
* Converts `value` to a number.
|
|
49997
|
-
*
|
|
49998
|
-
* @static
|
|
49999
|
-
* @memberOf _
|
|
50000
|
-
* @since 4.0.0
|
|
50001
|
-
* @category Lang
|
|
50002
|
-
* @param {*} value The value to process.
|
|
50003
|
-
* @returns {number} Returns the number.
|
|
50004
|
-
* @example
|
|
50005
|
-
*
|
|
50006
|
-
* _.toNumber(3.2);
|
|
50007
|
-
* // => 3.2
|
|
50008
|
-
*
|
|
50009
|
-
* _.toNumber(Number.MIN_VALUE);
|
|
50010
|
-
* // => 5e-324
|
|
50011
|
-
*
|
|
50012
|
-
* _.toNumber(Infinity);
|
|
50013
|
-
* // => Infinity
|
|
50014
|
-
*
|
|
50015
|
-
* _.toNumber('3.2');
|
|
50016
|
-
* // => 3.2
|
|
50017
|
-
*/ function toNumber(value) {
|
|
50018
|
-
if (typeof value == 'number') {
|
|
50019
|
-
return value;
|
|
50020
|
-
}
|
|
50021
|
-
if (isSymbol(value)) {
|
|
50022
|
-
return NAN;
|
|
50023
|
-
}
|
|
50024
|
-
if (isObject(value)) {
|
|
50025
|
-
var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
|
|
50026
|
-
value = isObject(other) ? other + '' : other;
|
|
50027
|
-
}
|
|
50028
|
-
if (typeof value != 'string') {
|
|
50029
|
-
return value === 0 ? value : +value;
|
|
50030
|
-
}
|
|
50031
|
-
value = value.replace(reTrim, '');
|
|
50032
|
-
var isBinary = reIsBinary.test(value);
|
|
50033
|
-
return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
|
|
50034
|
-
}
|
|
50035
|
-
var lodash_once = once$1;
|
|
49337
|
+
/** Used to infer the `Object` constructor. */ funcToString.call(Object);
|
|
50036
49338
|
|
|
50037
|
-
function _instanceof(left, right) {
|
|
50038
|
-
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
50039
|
-
return !!right[Symbol.hasInstance](left);
|
|
50040
|
-
} else {
|
|
50041
|
-
return left instanceof right;
|
|
50042
|
-
}
|
|
50043
|
-
}
|
|
50044
|
-
function _type_of(obj) {
|
|
50045
|
-
"@swc/helpers - typeof";
|
|
50046
|
-
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
50047
|
-
}
|
|
50048
|
-
var timespan = timespan$2;
|
|
50049
49339
|
var PS_SUPPORTED = psSupported;
|
|
50050
|
-
var validateAsymmetricKey = validateAsymmetricKey$2;
|
|
50051
|
-
var jws = jws$3;
|
|
50052
49340
|
var includes = lodash_includes;
|
|
50053
|
-
var
|
|
50054
|
-
var isInteger = lodash_isinteger;
|
|
50055
|
-
var isNumber = lodash_isnumber;
|
|
50056
|
-
var isPlainObject = lodash_isplainobject;
|
|
50057
|
-
var isString = lodash_isstring;
|
|
50058
|
-
var once = lodash_once;
|
|
50059
|
-
var _require = require$$1, KeyObject = _require.KeyObject, createSecretKey = _require.createSecretKey, createPrivateKey = _require.createPrivateKey;
|
|
49341
|
+
var _require = require$$1; _require.KeyObject; _require.createSecretKey; _require.createPrivateKey;
|
|
50060
49342
|
var SUPPORTED_ALGS = [
|
|
50061
49343
|
'RS256',
|
|
50062
49344
|
'RS384',
|
|
@@ -50072,276 +49354,12 @@ var SUPPORTED_ALGS = [
|
|
|
50072
49354
|
if (PS_SUPPORTED) {
|
|
50073
49355
|
SUPPORTED_ALGS.splice(3, 0, 'PS256', 'PS384', 'PS512');
|
|
50074
49356
|
}
|
|
50075
|
-
|
|
50076
|
-
expiresIn: {
|
|
50077
|
-
isValid: function isValid(value) {
|
|
50078
|
-
return isInteger(value) || isString(value) && value;
|
|
50079
|
-
},
|
|
50080
|
-
message: '"expiresIn" should be a number of seconds or string representing a timespan'
|
|
50081
|
-
},
|
|
50082
|
-
notBefore: {
|
|
50083
|
-
isValid: function isValid(value) {
|
|
50084
|
-
return isInteger(value) || isString(value) && value;
|
|
50085
|
-
},
|
|
50086
|
-
message: '"notBefore" should be a number of seconds or string representing a timespan'
|
|
50087
|
-
},
|
|
50088
|
-
audience: {
|
|
50089
|
-
isValid: function isValid(value) {
|
|
50090
|
-
return isString(value) || Array.isArray(value);
|
|
50091
|
-
},
|
|
50092
|
-
message: '"audience" must be a string or array'
|
|
50093
|
-
},
|
|
49357
|
+
({
|
|
50094
49358
|
algorithm: {
|
|
50095
|
-
isValid: includes.bind(null, SUPPORTED_ALGS)
|
|
50096
|
-
message: '"algorithm" must be a valid string enum value'
|
|
50097
|
-
},
|
|
50098
|
-
header: {
|
|
50099
|
-
isValid: isPlainObject,
|
|
50100
|
-
message: '"header" must be an object'
|
|
50101
|
-
},
|
|
50102
|
-
encoding: {
|
|
50103
|
-
isValid: isString,
|
|
50104
|
-
message: '"encoding" must be a string'
|
|
50105
|
-
},
|
|
50106
|
-
issuer: {
|
|
50107
|
-
isValid: isString,
|
|
50108
|
-
message: '"issuer" must be a string'
|
|
50109
|
-
},
|
|
50110
|
-
subject: {
|
|
50111
|
-
isValid: isString,
|
|
50112
|
-
message: '"subject" must be a string'
|
|
50113
|
-
},
|
|
50114
|
-
jwtid: {
|
|
50115
|
-
isValid: isString,
|
|
50116
|
-
message: '"jwtid" must be a string'
|
|
50117
|
-
},
|
|
50118
|
-
noTimestamp: {
|
|
50119
|
-
isValid: isBoolean,
|
|
50120
|
-
message: '"noTimestamp" must be a boolean'
|
|
50121
|
-
},
|
|
50122
|
-
keyid: {
|
|
50123
|
-
isValid: isString,
|
|
50124
|
-
message: '"keyid" must be a string'
|
|
50125
|
-
},
|
|
50126
|
-
mutatePayload: {
|
|
50127
|
-
isValid: isBoolean,
|
|
50128
|
-
message: '"mutatePayload" must be a boolean'
|
|
50129
|
-
},
|
|
50130
|
-
allowInsecureKeySizes: {
|
|
50131
|
-
isValid: isBoolean,
|
|
50132
|
-
message: '"allowInsecureKeySizes" must be a boolean'
|
|
50133
|
-
},
|
|
50134
|
-
allowInvalidAsymmetricKeyTypes: {
|
|
50135
|
-
isValid: isBoolean,
|
|
50136
|
-
message: '"allowInvalidAsymmetricKeyTypes" must be a boolean'
|
|
50137
|
-
}
|
|
50138
|
-
};
|
|
50139
|
-
var registered_claims_schema = {
|
|
50140
|
-
iat: {
|
|
50141
|
-
isValid: isNumber,
|
|
50142
|
-
message: '"iat" should be a number of seconds'
|
|
50143
|
-
},
|
|
50144
|
-
exp: {
|
|
50145
|
-
isValid: isNumber,
|
|
50146
|
-
message: '"exp" should be a number of seconds'
|
|
50147
|
-
},
|
|
50148
|
-
nbf: {
|
|
50149
|
-
isValid: isNumber,
|
|
50150
|
-
message: '"nbf" should be a number of seconds'
|
|
50151
|
-
}
|
|
50152
|
-
};
|
|
50153
|
-
function validate(schema, allowUnknown, object, parameterName) {
|
|
50154
|
-
if (!isPlainObject(object)) {
|
|
50155
|
-
throw new Error('Expected "' + parameterName + '" to be a plain object.');
|
|
50156
|
-
}
|
|
50157
|
-
Object.keys(object).forEach(function(key) {
|
|
50158
|
-
var validator = schema[key];
|
|
50159
|
-
if (!validator) {
|
|
50160
|
-
if (!allowUnknown) {
|
|
50161
|
-
throw new Error('"' + key + '" is not allowed in "' + parameterName + '"');
|
|
50162
|
-
}
|
|
50163
|
-
return;
|
|
50164
|
-
}
|
|
50165
|
-
if (!validator.isValid(object[key])) {
|
|
50166
|
-
throw new Error(validator.message);
|
|
50167
|
-
}
|
|
50168
|
-
});
|
|
50169
|
-
}
|
|
50170
|
-
function validateOptions(options) {
|
|
50171
|
-
return validate(sign_options_schema, false, options, 'options');
|
|
50172
|
-
}
|
|
50173
|
-
function validatePayload(payload) {
|
|
50174
|
-
return validate(registered_claims_schema, true, payload, 'payload');
|
|
50175
|
-
}
|
|
50176
|
-
var options_to_payload = {
|
|
50177
|
-
'audience': 'aud',
|
|
50178
|
-
'issuer': 'iss',
|
|
50179
|
-
'subject': 'sub',
|
|
50180
|
-
'jwtid': 'jti'
|
|
50181
|
-
};
|
|
50182
|
-
var options_for_objects = [
|
|
50183
|
-
'expiresIn',
|
|
50184
|
-
'notBefore',
|
|
50185
|
-
'noTimestamp',
|
|
50186
|
-
'audience',
|
|
50187
|
-
'issuer',
|
|
50188
|
-
'subject',
|
|
50189
|
-
'jwtid'
|
|
50190
|
-
];
|
|
50191
|
-
var sign = function(payload, secretOrPrivateKey, options, callback) {
|
|
50192
|
-
if (typeof options === 'function') {
|
|
50193
|
-
callback = options;
|
|
50194
|
-
options = {};
|
|
50195
|
-
} else {
|
|
50196
|
-
options = options || {};
|
|
50197
|
-
}
|
|
50198
|
-
var isObjectPayload = (typeof payload === "undefined" ? "undefined" : _type_of(payload)) === 'object' && !Buffer.isBuffer(payload);
|
|
50199
|
-
var header = Object.assign({
|
|
50200
|
-
alg: options.algorithm || 'HS256',
|
|
50201
|
-
typ: isObjectPayload ? 'JWT' : undefined,
|
|
50202
|
-
kid: options.keyid
|
|
50203
|
-
}, options.header);
|
|
50204
|
-
function failure(err) {
|
|
50205
|
-
if (callback) {
|
|
50206
|
-
return callback(err);
|
|
50207
|
-
}
|
|
50208
|
-
throw err;
|
|
50209
|
-
}
|
|
50210
|
-
if (!secretOrPrivateKey && options.algorithm !== 'none') {
|
|
50211
|
-
return failure(new Error('secretOrPrivateKey must have a value'));
|
|
50212
|
-
}
|
|
50213
|
-
if (secretOrPrivateKey != null && !_instanceof(secretOrPrivateKey, KeyObject)) {
|
|
50214
|
-
try {
|
|
50215
|
-
secretOrPrivateKey = createPrivateKey(secretOrPrivateKey);
|
|
50216
|
-
} catch (_) {
|
|
50217
|
-
try {
|
|
50218
|
-
secretOrPrivateKey = createSecretKey(typeof secretOrPrivateKey === 'string' ? Buffer.from(secretOrPrivateKey) : secretOrPrivateKey);
|
|
50219
|
-
} catch (_) {
|
|
50220
|
-
return failure(new Error('secretOrPrivateKey is not valid key material'));
|
|
50221
|
-
}
|
|
50222
|
-
}
|
|
50223
|
-
}
|
|
50224
|
-
if (header.alg.startsWith('HS') && secretOrPrivateKey.type !== 'secret') {
|
|
50225
|
-
return failure(new Error("secretOrPrivateKey must be a symmetric key when using ".concat(header.alg)));
|
|
50226
|
-
} else if (/^(?:RS|PS|ES)/.test(header.alg)) {
|
|
50227
|
-
if (secretOrPrivateKey.type !== 'private') {
|
|
50228
|
-
return failure(new Error("secretOrPrivateKey must be an asymmetric key when using ".concat(header.alg)));
|
|
50229
|
-
}
|
|
50230
|
-
if (!options.allowInsecureKeySizes && !header.alg.startsWith('ES') && secretOrPrivateKey.asymmetricKeyDetails !== undefined && //KeyObject.asymmetricKeyDetails is supported in Node 15+
|
|
50231
|
-
secretOrPrivateKey.asymmetricKeyDetails.modulusLength < 2048) {
|
|
50232
|
-
return failure(new Error("secretOrPrivateKey has a minimum key size of 2048 bits for ".concat(header.alg)));
|
|
50233
|
-
}
|
|
50234
|
-
}
|
|
50235
|
-
if (typeof payload === 'undefined') {
|
|
50236
|
-
return failure(new Error('payload is required'));
|
|
50237
|
-
} else if (isObjectPayload) {
|
|
50238
|
-
try {
|
|
50239
|
-
validatePayload(payload);
|
|
50240
|
-
} catch (error) {
|
|
50241
|
-
return failure(error);
|
|
50242
|
-
}
|
|
50243
|
-
if (!options.mutatePayload) {
|
|
50244
|
-
payload = Object.assign({}, payload);
|
|
50245
|
-
}
|
|
50246
|
-
} else {
|
|
50247
|
-
var invalid_options = options_for_objects.filter(function(opt) {
|
|
50248
|
-
return typeof options[opt] !== 'undefined';
|
|
50249
|
-
});
|
|
50250
|
-
if (invalid_options.length > 0) {
|
|
50251
|
-
return failure(new Error('invalid ' + invalid_options.join(',') + ' option for ' + (typeof payload === "undefined" ? "undefined" : _type_of(payload)) + ' payload'));
|
|
50252
|
-
}
|
|
50253
|
-
}
|
|
50254
|
-
if (typeof payload.exp !== 'undefined' && typeof options.expiresIn !== 'undefined') {
|
|
50255
|
-
return failure(new Error('Bad "options.expiresIn" option the payload already has an "exp" property.'));
|
|
50256
|
-
}
|
|
50257
|
-
if (typeof payload.nbf !== 'undefined' && typeof options.notBefore !== 'undefined') {
|
|
50258
|
-
return failure(new Error('Bad "options.notBefore" option the payload already has an "nbf" property.'));
|
|
50259
|
-
}
|
|
50260
|
-
try {
|
|
50261
|
-
validateOptions(options);
|
|
50262
|
-
} catch (error) {
|
|
50263
|
-
return failure(error);
|
|
50264
|
-
}
|
|
50265
|
-
if (!options.allowInvalidAsymmetricKeyTypes) {
|
|
50266
|
-
try {
|
|
50267
|
-
validateAsymmetricKey(header.alg, secretOrPrivateKey);
|
|
50268
|
-
} catch (error) {
|
|
50269
|
-
return failure(error);
|
|
50270
|
-
}
|
|
50271
|
-
}
|
|
50272
|
-
var timestamp = payload.iat || Math.floor(Date.now() / 1000);
|
|
50273
|
-
if (options.noTimestamp) {
|
|
50274
|
-
delete payload.iat;
|
|
50275
|
-
} else if (isObjectPayload) {
|
|
50276
|
-
payload.iat = timestamp;
|
|
50277
|
-
}
|
|
50278
|
-
if (typeof options.notBefore !== 'undefined') {
|
|
50279
|
-
try {
|
|
50280
|
-
payload.nbf = timespan(options.notBefore, timestamp);
|
|
50281
|
-
} catch (err) {
|
|
50282
|
-
return failure(err);
|
|
50283
|
-
}
|
|
50284
|
-
if (typeof payload.nbf === 'undefined') {
|
|
50285
|
-
return failure(new Error('"notBefore" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'));
|
|
50286
|
-
}
|
|
50287
|
-
}
|
|
50288
|
-
if (typeof options.expiresIn !== 'undefined' && (typeof payload === "undefined" ? "undefined" : _type_of(payload)) === 'object') {
|
|
50289
|
-
try {
|
|
50290
|
-
payload.exp = timespan(options.expiresIn, timestamp);
|
|
50291
|
-
} catch (err) {
|
|
50292
|
-
return failure(err);
|
|
50293
|
-
}
|
|
50294
|
-
if (typeof payload.exp === 'undefined') {
|
|
50295
|
-
return failure(new Error('"expiresIn" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'));
|
|
50296
|
-
}
|
|
50297
|
-
}
|
|
50298
|
-
Object.keys(options_to_payload).forEach(function(key) {
|
|
50299
|
-
var claim = options_to_payload[key];
|
|
50300
|
-
if (typeof options[key] !== 'undefined') {
|
|
50301
|
-
if (typeof payload[claim] !== 'undefined') {
|
|
50302
|
-
return failure(new Error('Bad "options.' + key + '" option. The payload already has an "' + claim + '" property.'));
|
|
50303
|
-
}
|
|
50304
|
-
payload[claim] = options[key];
|
|
50305
|
-
}
|
|
50306
|
-
});
|
|
50307
|
-
var encoding = options.encoding || 'utf8';
|
|
50308
|
-
if (typeof callback === 'function') {
|
|
50309
|
-
callback = callback && once(callback);
|
|
50310
|
-
jws.createSign({
|
|
50311
|
-
header: header,
|
|
50312
|
-
privateKey: secretOrPrivateKey,
|
|
50313
|
-
payload: payload,
|
|
50314
|
-
encoding: encoding
|
|
50315
|
-
}).once('error', callback).once('done', function(signature) {
|
|
50316
|
-
// TODO: Remove in favor of the modulus length check before signing once node 15+ is the minimum supported version
|
|
50317
|
-
if (!options.allowInsecureKeySizes && /^(?:RS|PS)/.test(header.alg) && signature.length < 256) {
|
|
50318
|
-
return callback(new Error("secretOrPrivateKey has a minimum key size of 2048 bits for ".concat(header.alg)));
|
|
50319
|
-
}
|
|
50320
|
-
callback(null, signature);
|
|
50321
|
-
});
|
|
50322
|
-
} else {
|
|
50323
|
-
var signature = jws.sign({
|
|
50324
|
-
header: header,
|
|
50325
|
-
payload: payload,
|
|
50326
|
-
secret: secretOrPrivateKey,
|
|
50327
|
-
encoding: encoding
|
|
50328
|
-
});
|
|
50329
|
-
// TODO: Remove in favor of the modulus length check before signing once node 15+ is the minimum supported version
|
|
50330
|
-
if (!options.allowInsecureKeySizes && /^(?:RS|PS)/.test(header.alg) && signature.length < 256) {
|
|
50331
|
-
throw new Error("secretOrPrivateKey has a minimum key size of 2048 bits for ".concat(header.alg));
|
|
50332
|
-
}
|
|
50333
|
-
return signature;
|
|
50334
|
-
}
|
|
50335
|
-
};
|
|
49359
|
+
isValid: includes.bind(null, SUPPORTED_ALGS)}});
|
|
50336
49360
|
|
|
50337
49361
|
var jsonwebtoken = {
|
|
50338
|
-
|
|
50339
|
-
verify: verify,
|
|
50340
|
-
sign: sign,
|
|
50341
|
-
JsonWebTokenError: JsonWebTokenError_1,
|
|
50342
|
-
NotBeforeError: NotBeforeError_1,
|
|
50343
|
-
TokenExpiredError: TokenExpiredError_1
|
|
50344
|
-
};
|
|
49362
|
+
verify: verify};
|
|
50345
49363
|
|
|
50346
49364
|
var mimeTypes = {};
|
|
50347
49365
|
|