@digipair/skill-web 0.117.7 → 0.117.8
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 +285 -94
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { snakeCase, kebabCase, camelCase } from 'case-anything/dist/index.js';
|
|
2
1
|
import { JSDOM } from 'jsdom';
|
|
3
2
|
import { readFile } from 'fs/promises';
|
|
4
3
|
import require$$1 from 'path';
|
|
@@ -8197,7 +8196,7 @@ function _create_class$v(Constructor, protoProps, staticProps) {
|
|
|
8197
8196
|
if (staticProps) _defineProperties$v(Constructor, staticProps);
|
|
8198
8197
|
return Constructor;
|
|
8199
8198
|
}
|
|
8200
|
-
function _define_property$
|
|
8199
|
+
function _define_property$5(obj, key, value) {
|
|
8201
8200
|
if (key in obj) {
|
|
8202
8201
|
Object.defineProperty(obj, key, {
|
|
8203
8202
|
value: value,
|
|
@@ -8272,7 +8271,7 @@ function _non_iterable_rest$5() {
|
|
|
8272
8271
|
function _non_iterable_spread$6() {
|
|
8273
8272
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
8274
8273
|
}
|
|
8275
|
-
function _object_spread$
|
|
8274
|
+
function _object_spread$3(target) {
|
|
8276
8275
|
for(var i = 1; i < arguments.length; i++){
|
|
8277
8276
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
8278
8277
|
var ownKeys = Object.keys(source);
|
|
@@ -8282,12 +8281,12 @@ function _object_spread$2(target) {
|
|
|
8282
8281
|
}));
|
|
8283
8282
|
}
|
|
8284
8283
|
ownKeys.forEach(function(key) {
|
|
8285
|
-
_define_property$
|
|
8284
|
+
_define_property$5(target, key, source[key]);
|
|
8286
8285
|
});
|
|
8287
8286
|
}
|
|
8288
8287
|
return target;
|
|
8289
8288
|
}
|
|
8290
|
-
function ownKeys$
|
|
8289
|
+
function ownKeys$2(object, enumerableOnly) {
|
|
8291
8290
|
var keys = Object.keys(object);
|
|
8292
8291
|
if (Object.getOwnPropertySymbols) {
|
|
8293
8292
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
@@ -8295,12 +8294,12 @@ function ownKeys$1(object, enumerableOnly) {
|
|
|
8295
8294
|
}
|
|
8296
8295
|
return keys;
|
|
8297
8296
|
}
|
|
8298
|
-
function _object_spread_props$
|
|
8297
|
+
function _object_spread_props$2(target, source) {
|
|
8299
8298
|
source = source != null ? source : {};
|
|
8300
8299
|
if (Object.getOwnPropertyDescriptors) {
|
|
8301
8300
|
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
8302
8301
|
} else {
|
|
8303
|
-
ownKeys$
|
|
8302
|
+
ownKeys$2(Object(source)).forEach(function(key) {
|
|
8304
8303
|
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
8305
8304
|
});
|
|
8306
8305
|
}
|
|
@@ -9171,7 +9170,7 @@ function getCachedWeekInfo(locString) {
|
|
|
9171
9170
|
data = "getWeekInfo" in locale ? locale.getWeekInfo() : locale.weekInfo;
|
|
9172
9171
|
// minimalDays was removed from WeekInfo: https://github.com/tc39/proposal-intl-locale-info/issues/86
|
|
9173
9172
|
if (!("minimalDays" in data)) {
|
|
9174
|
-
data = _object_spread$
|
|
9173
|
+
data = _object_spread$3({}, fallbackWeekSettings, data);
|
|
9175
9174
|
}
|
|
9176
9175
|
weekInfoCache.set(locString, data);
|
|
9177
9176
|
}
|
|
@@ -9278,7 +9277,7 @@ function supportsFastNumbers(loc) {
|
|
|
9278
9277
|
"floor"
|
|
9279
9278
|
]);
|
|
9280
9279
|
if (!forceSimple || Object.keys(otherOpts).length > 0) {
|
|
9281
|
-
var intlOpts = _object_spread$
|
|
9280
|
+
var intlOpts = _object_spread$3({
|
|
9282
9281
|
useGrouping: false
|
|
9283
9282
|
}, opts);
|
|
9284
9283
|
if (opts.padTo > 0) intlOpts.minimumIntegerDigits = opts.padTo;
|
|
@@ -9348,7 +9347,7 @@ function supportsFastNumbers(loc) {
|
|
|
9348
9347
|
});
|
|
9349
9348
|
this.originalZone = dt.zone;
|
|
9350
9349
|
}
|
|
9351
|
-
var intlOpts = _object_spread$
|
|
9350
|
+
var intlOpts = _object_spread$3({}, this.opts);
|
|
9352
9351
|
intlOpts.timeZone = intlOpts.timeZone || z;
|
|
9353
9352
|
this.dtf = getCachedDTF(intl, intlOpts);
|
|
9354
9353
|
}
|
|
@@ -9379,7 +9378,7 @@ function supportsFastNumbers(loc) {
|
|
|
9379
9378
|
locale: _this.dt.locale,
|
|
9380
9379
|
format: _this.opts.timeZoneName
|
|
9381
9380
|
});
|
|
9382
|
-
return _object_spread_props$
|
|
9381
|
+
return _object_spread_props$2(_object_spread$3({}, part), {
|
|
9383
9382
|
value: offsetName
|
|
9384
9383
|
});
|
|
9385
9384
|
} else {
|
|
@@ -9404,7 +9403,7 @@ function supportsFastNumbers(loc) {
|
|
|
9404
9403
|
*/ var PolyRelFormatter = /*#__PURE__*/ function() {
|
|
9405
9404
|
function PolyRelFormatter(intl, isEnglish, opts) {
|
|
9406
9405
|
_class_call_check$A(this, PolyRelFormatter);
|
|
9407
|
-
this.opts = _object_spread$
|
|
9406
|
+
this.opts = _object_spread$3({
|
|
9408
9407
|
style: "long"
|
|
9409
9408
|
}, opts);
|
|
9410
9409
|
if (!isEnglish && hasRelative()) {
|
|
@@ -9499,7 +9498,7 @@ var fallbackWeekSettings = {
|
|
|
9499
9498
|
key: "redefaultToEN",
|
|
9500
9499
|
value: function redefaultToEN() {
|
|
9501
9500
|
var alts = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
9502
|
-
return this.clone(_object_spread_props$
|
|
9501
|
+
return this.clone(_object_spread_props$2(_object_spread$3({}, alts), {
|
|
9503
9502
|
defaultToEN: true
|
|
9504
9503
|
}));
|
|
9505
9504
|
}
|
|
@@ -9508,7 +9507,7 @@ var fallbackWeekSettings = {
|
|
|
9508
9507
|
key: "redefaultToSystem",
|
|
9509
9508
|
value: function redefaultToSystem() {
|
|
9510
9509
|
var alts = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
9511
|
-
return this.clone(_object_spread_props$
|
|
9510
|
+
return this.clone(_object_spread_props$2(_object_spread$3({}, alts), {
|
|
9512
9511
|
defaultToEN: false
|
|
9513
9512
|
}));
|
|
9514
9513
|
}
|
|
@@ -10387,7 +10386,7 @@ function isoWeekdayToLocal(isoWeekday, startOfWeek) {
|
|
|
10387
10386
|
} else {
|
|
10388
10387
|
weekYear = year;
|
|
10389
10388
|
}
|
|
10390
|
-
return _object_spread$
|
|
10389
|
+
return _object_spread$3({
|
|
10391
10390
|
weekYear: weekYear,
|
|
10392
10391
|
weekNumber: weekNumber,
|
|
10393
10392
|
weekday: weekday
|
|
@@ -10407,7 +10406,7 @@ function weekToGregorian(weekData) {
|
|
|
10407
10406
|
year = weekYear;
|
|
10408
10407
|
}
|
|
10409
10408
|
var _uncomputeOrdinal = uncomputeOrdinal(year, ordinal), month = _uncomputeOrdinal.month, day = _uncomputeOrdinal.day;
|
|
10410
|
-
return _object_spread$
|
|
10409
|
+
return _object_spread$3({
|
|
10411
10410
|
year: year,
|
|
10412
10411
|
month: month,
|
|
10413
10412
|
day: day
|
|
@@ -10416,7 +10415,7 @@ function weekToGregorian(weekData) {
|
|
|
10416
10415
|
function gregorianToOrdinal(gregData) {
|
|
10417
10416
|
var year = gregData.year, month = gregData.month, day = gregData.day;
|
|
10418
10417
|
var ordinal = computeOrdinal(year, month, day);
|
|
10419
|
-
return _object_spread$
|
|
10418
|
+
return _object_spread$3({
|
|
10420
10419
|
year: year,
|
|
10421
10420
|
ordinal: ordinal
|
|
10422
10421
|
}, timeObject(gregData));
|
|
@@ -10424,7 +10423,7 @@ function gregorianToOrdinal(gregData) {
|
|
|
10424
10423
|
function ordinalToGregorian(ordinalData) {
|
|
10425
10424
|
var year = ordinalData.year, ordinal = ordinalData.ordinal;
|
|
10426
10425
|
var _uncomputeOrdinal = uncomputeOrdinal(year, ordinal), month = _uncomputeOrdinal.month, day = _uncomputeOrdinal.day;
|
|
10427
|
-
return _object_spread$
|
|
10426
|
+
return _object_spread$3({
|
|
10428
10427
|
year: year,
|
|
10429
10428
|
month: month,
|
|
10430
10429
|
day: day
|
|
@@ -10720,7 +10719,7 @@ function parseZoneInfo(ts, offsetFormat, locale) {
|
|
|
10720
10719
|
if (timeZone) {
|
|
10721
10720
|
intlOpts.timeZone = timeZone;
|
|
10722
10721
|
}
|
|
10723
|
-
var modified = _object_spread$
|
|
10722
|
+
var modified = _object_spread$3({
|
|
10724
10723
|
timeZoneName: offsetFormat
|
|
10725
10724
|
}, intlOpts);
|
|
10726
10725
|
var parsed = new Intl.DateTimeFormat(locale, modified).formatToParts(date).find(function(m) {
|
|
@@ -11079,7 +11078,7 @@ var macroTokenToFormatOpts = {
|
|
|
11079
11078
|
if (this.systemLoc === null) {
|
|
11080
11079
|
this.systemLoc = this.loc.redefaultToSystem();
|
|
11081
11080
|
}
|
|
11082
|
-
var df = this.systemLoc.dtFormatter(dt, _object_spread$
|
|
11081
|
+
var df = this.systemLoc.dtFormatter(dt, _object_spread$3({}, this.opts, opts));
|
|
11083
11082
|
return df.format();
|
|
11084
11083
|
}
|
|
11085
11084
|
},
|
|
@@ -11087,7 +11086,7 @@ var macroTokenToFormatOpts = {
|
|
|
11087
11086
|
key: "dtFormatter",
|
|
11088
11087
|
value: function dtFormatter(dt) {
|
|
11089
11088
|
var opts = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
11090
|
-
return this.loc.dtFormatter(dt, _object_spread$
|
|
11089
|
+
return this.loc.dtFormatter(dt, _object_spread$3({}, this.opts, opts));
|
|
11091
11090
|
}
|
|
11092
11091
|
},
|
|
11093
11092
|
{
|
|
@@ -11123,7 +11122,7 @@ var macroTokenToFormatOpts = {
|
|
|
11123
11122
|
if (this.opts.forceSimple) {
|
|
11124
11123
|
return padStart(n, p);
|
|
11125
11124
|
}
|
|
11126
|
-
var opts = _object_spread$
|
|
11125
|
+
var opts = _object_spread$3({}, this.opts);
|
|
11127
11126
|
if (p > 0) {
|
|
11128
11127
|
opts.padTo = p;
|
|
11129
11128
|
}
|
|
@@ -11539,7 +11538,7 @@ function combineExtractors() {
|
|
|
11539
11538
|
var _param = _sliced_to_array$5(param, 3), mergedVals = _param[0], mergedZone = _param[1], cursor = _param[2];
|
|
11540
11539
|
var _ex = _sliced_to_array$5(ex(m, cursor), 3), val = _ex[0], zone = _ex[1], next = _ex[2];
|
|
11541
11540
|
return [
|
|
11542
|
-
_object_spread$
|
|
11541
|
+
_object_spread$3({}, mergedVals, val),
|
|
11543
11542
|
zone || mergedZone,
|
|
11544
11543
|
next
|
|
11545
11544
|
];
|
|
@@ -11850,7 +11849,7 @@ var lowOrderMatrix = {
|
|
|
11850
11849
|
seconds: {
|
|
11851
11850
|
milliseconds: 1000
|
|
11852
11851
|
}
|
|
11853
|
-
}, casualMatrix = _object_spread$
|
|
11852
|
+
}, casualMatrix = _object_spread$3({
|
|
11854
11853
|
years: {
|
|
11855
11854
|
quarters: 4,
|
|
11856
11855
|
months: 12,
|
|
@@ -11878,7 +11877,7 @@ var lowOrderMatrix = {
|
|
|
11878
11877
|
seconds: 30 * 24 * 60 * 60,
|
|
11879
11878
|
milliseconds: 30 * 24 * 60 * 60 * 1000
|
|
11880
11879
|
}
|
|
11881
|
-
}, lowOrderMatrix), daysInYearAccurate = 146097.0 / 400, daysInMonthAccurate = 146097.0 / 4800, accurateMatrix = _object_spread$
|
|
11880
|
+
}, lowOrderMatrix), daysInYearAccurate = 146097.0 / 400, daysInMonthAccurate = 146097.0 / 4800, accurateMatrix = _object_spread$3({
|
|
11882
11881
|
years: {
|
|
11883
11882
|
quarters: 4,
|
|
11884
11883
|
months: 12,
|
|
@@ -11925,7 +11924,7 @@ function clone$1(dur, alts) {
|
|
|
11925
11924
|
var clear = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false;
|
|
11926
11925
|
// deep merge for vals
|
|
11927
11926
|
var conf = {
|
|
11928
|
-
values: clear ? alts.values : _object_spread$
|
|
11927
|
+
values: clear ? alts.values : _object_spread$3({}, dur.values, alts.values || {}),
|
|
11929
11928
|
loc: dur.loc.clone(alts.loc),
|
|
11930
11929
|
conversionAccuracy: alts.conversionAccuracy || dur.conversionAccuracy,
|
|
11931
11930
|
matrix: alts.matrix || dur.matrix
|
|
@@ -12124,7 +12123,7 @@ function removeZeroes(vals) {
|
|
|
12124
12123
|
value: function toFormat(fmt) {
|
|
12125
12124
|
var opts = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
12126
12125
|
// reverse-compat since 1.2; we always round down now, never up, and we do it by default
|
|
12127
|
-
var fmtOpts = _object_spread_props$
|
|
12126
|
+
var fmtOpts = _object_spread_props$2(_object_spread$3({}, opts), {
|
|
12128
12127
|
floor: opts.round !== false && opts.floor !== false
|
|
12129
12128
|
});
|
|
12130
12129
|
return this.isValid ? Formatter.create(this.loc, fmtOpts).formatDurationFromString(this, fmt) : INVALID$2;
|
|
@@ -12157,7 +12156,7 @@ function removeZeroes(vals) {
|
|
|
12157
12156
|
if (isUndefined$2(val) || val === 0 && !showZeros) {
|
|
12158
12157
|
return null;
|
|
12159
12158
|
}
|
|
12160
|
-
return _this.loc.numberFormatter(_object_spread_props$
|
|
12159
|
+
return _this.loc.numberFormatter(_object_spread_props$2(_object_spread$3({
|
|
12161
12160
|
style: "unit",
|
|
12162
12161
|
unitDisplay: "long"
|
|
12163
12162
|
}, opts), {
|
|
@@ -12166,7 +12165,7 @@ function removeZeroes(vals) {
|
|
|
12166
12165
|
}).filter(function(n) {
|
|
12167
12166
|
return n;
|
|
12168
12167
|
});
|
|
12169
|
-
return this.loc.listFormatter(_object_spread$
|
|
12168
|
+
return this.loc.listFormatter(_object_spread$3({
|
|
12170
12169
|
type: "conjunction",
|
|
12171
12170
|
style: opts.listStyle || "narrow"
|
|
12172
12171
|
}, opts)).format(l);
|
|
@@ -12180,7 +12179,7 @@ function removeZeroes(vals) {
|
|
|
12180
12179
|
*/ key: "toObject",
|
|
12181
12180
|
value: function toObject() {
|
|
12182
12181
|
if (!this.isValid) return {};
|
|
12183
|
-
return _object_spread$
|
|
12182
|
+
return _object_spread$3({}, this.values);
|
|
12184
12183
|
}
|
|
12185
12184
|
},
|
|
12186
12185
|
{
|
|
@@ -12233,7 +12232,7 @@ function removeZeroes(vals) {
|
|
|
12233
12232
|
if (!this.isValid) return null;
|
|
12234
12233
|
var millis = this.toMillis();
|
|
12235
12234
|
if (millis < 0 || millis >= 86400000) return null;
|
|
12236
|
-
opts = _object_spread_props$
|
|
12235
|
+
opts = _object_spread_props$2(_object_spread$3({
|
|
12237
12236
|
suppressMilliseconds: false,
|
|
12238
12237
|
suppressSeconds: false,
|
|
12239
12238
|
includePrefix: false,
|
|
@@ -12404,7 +12403,7 @@ function removeZeroes(vals) {
|
|
|
12404
12403
|
*/ key: "set",
|
|
12405
12404
|
value: function set(values) {
|
|
12406
12405
|
if (!this.isValid) return this;
|
|
12407
|
-
var mixed = _object_spread$
|
|
12406
|
+
var mixed = _object_spread$3({}, this.values, normalizeObject(values, Duration.normalizeUnit));
|
|
12408
12407
|
return clone$1(this, {
|
|
12409
12408
|
values: mixed
|
|
12410
12409
|
});
|
|
@@ -14015,7 +14014,7 @@ function diff(earlier, later, units, opts) {
|
|
|
14015
14014
|
});
|
|
14016
14015
|
if (lowerOrderUnits.length === 0) {
|
|
14017
14016
|
if (highWater < later) {
|
|
14018
|
-
highWater = cursor.plus(_define_property$
|
|
14017
|
+
highWater = cursor.plus(_define_property$5({}, lowestOrder, 1));
|
|
14019
14018
|
}
|
|
14020
14019
|
if (highWater !== cursor) {
|
|
14021
14020
|
results[lowestOrder] = (results[lowestOrder] || 0) + remainingMillis / (highWater - cursor);
|
|
@@ -14575,7 +14574,7 @@ function clone$2(inst, alts) {
|
|
|
14575
14574
|
loc: inst.loc,
|
|
14576
14575
|
invalid: inst.invalid
|
|
14577
14576
|
};
|
|
14578
|
-
return new DateTime(_object_spread_props$
|
|
14577
|
+
return new DateTime(_object_spread_props$2(_object_spread$3({}, current, alts), {
|
|
14579
14578
|
old: current
|
|
14580
14579
|
}));
|
|
14581
14580
|
}
|
|
@@ -14629,7 +14628,7 @@ function objToTS(obj, offset, zone) {
|
|
|
14629
14628
|
}
|
|
14630
14629
|
// create a new DT instance by adding a duration, adjusting for DSTs
|
|
14631
14630
|
function adjustTime(inst, dur) {
|
|
14632
|
-
var oPre = inst.o, year = inst.c.year + Math.trunc(dur.years), month = inst.c.month + Math.trunc(dur.months) + Math.trunc(dur.quarters) * 3, c = _object_spread_props$
|
|
14631
|
+
var oPre = inst.o, year = inst.c.year + Math.trunc(dur.years), month = inst.c.month + Math.trunc(dur.months) + Math.trunc(dur.quarters) * 3, c = _object_spread_props$2(_object_spread$3({}, inst.c), {
|
|
14633
14632
|
year: year,
|
|
14634
14633
|
month: month,
|
|
14635
14634
|
day: Math.min(inst.c.day, daysInMonth(year, month)) + Math.trunc(dur.days) + Math.trunc(dur.weeks) * 7
|
|
@@ -14660,7 +14659,7 @@ function adjustTime(inst, dur) {
|
|
|
14660
14659
|
function parseDataToDateTime(parsed, parsedZone, opts, format, text, specificOffset) {
|
|
14661
14660
|
var setZone = opts.setZone, zone = opts.zone;
|
|
14662
14661
|
if (parsed && Object.keys(parsed).length !== 0 || parsedZone) {
|
|
14663
|
-
var interpretationZone = parsedZone || zone, inst = DateTime.fromObject(parsed, _object_spread_props$
|
|
14662
|
+
var interpretationZone = parsedZone || zone, inst = DateTime.fromObject(parsed, _object_spread_props$2(_object_spread$3({}, opts), {
|
|
14664
14663
|
zone: interpretationZone,
|
|
14665
14664
|
specificOffset: specificOffset
|
|
14666
14665
|
}));
|
|
@@ -15680,11 +15679,11 @@ function lastOpts(argList) {
|
|
|
15680
15679
|
}
|
|
15681
15680
|
var mixed;
|
|
15682
15681
|
if (settingWeekStuff) {
|
|
15683
|
-
mixed = weekToGregorian(_object_spread$
|
|
15682
|
+
mixed = weekToGregorian(_object_spread$3({}, gregorianToWeek(this.c, minDaysInFirstWeek, startOfWeek), normalized), minDaysInFirstWeek, startOfWeek);
|
|
15684
15683
|
} else if (!isUndefined$2(normalized.ordinal)) {
|
|
15685
|
-
mixed = ordinalToGregorian(_object_spread$
|
|
15684
|
+
mixed = ordinalToGregorian(_object_spread$3({}, gregorianToOrdinal(this.c), normalized));
|
|
15686
15685
|
} else {
|
|
15687
|
-
mixed = _object_spread$
|
|
15686
|
+
mixed = _object_spread$3({}, this.toObject(), normalized);
|
|
15688
15687
|
// if we didn't set the day but we ended up on an overflow date,
|
|
15689
15688
|
// use the last day of the right month
|
|
15690
15689
|
if (isUndefined$2(normalized.day)) {
|
|
@@ -15803,7 +15802,7 @@ function lastOpts(argList) {
|
|
|
15803
15802
|
* @return {DateTime}
|
|
15804
15803
|
*/ key: "endOf",
|
|
15805
15804
|
value: function endOf(unit, opts) {
|
|
15806
|
-
return this.isValid ? this.plus(_define_property$
|
|
15805
|
+
return this.isValid ? this.plus(_define_property$5({}, unit, 1)).startOf(unit, opts).minus(1) : this;
|
|
15807
15806
|
}
|
|
15808
15807
|
},
|
|
15809
15808
|
{
|
|
@@ -16131,7 +16130,7 @@ function lastOpts(argList) {
|
|
|
16131
16130
|
value: function toObject() {
|
|
16132
16131
|
var opts = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
16133
16132
|
if (!this.isValid) return {};
|
|
16134
|
-
var base = _object_spread$
|
|
16133
|
+
var base = _object_spread$3({}, this.c);
|
|
16135
16134
|
if (opts.includeConfig) {
|
|
16136
16135
|
base.outputCalendar = this.outputCalendar;
|
|
16137
16136
|
base.numberingSystem = this.loc.numberingSystem;
|
|
@@ -16171,7 +16170,7 @@ function lastOpts(argList) {
|
|
|
16171
16170
|
if (!this.isValid || !otherDateTime.isValid) {
|
|
16172
16171
|
return Duration.invalid("created by diffing an invalid DateTime");
|
|
16173
16172
|
}
|
|
16174
|
-
var durOpts = _object_spread$
|
|
16173
|
+
var durOpts = _object_spread$3({
|
|
16175
16174
|
locale: this.locale,
|
|
16176
16175
|
numberingSystem: this.numberingSystem
|
|
16177
16176
|
}, opts);
|
|
@@ -16275,7 +16274,7 @@ function lastOpts(argList) {
|
|
|
16275
16274
|
units = options.unit;
|
|
16276
16275
|
unit = undefined;
|
|
16277
16276
|
}
|
|
16278
|
-
return diffRelative(base, this.plus(padding), _object_spread_props$
|
|
16277
|
+
return diffRelative(base, this.plus(padding), _object_spread_props$2(_object_spread$3({}, options), {
|
|
16279
16278
|
numeric: "always",
|
|
16280
16279
|
units: units,
|
|
16281
16280
|
unit: unit
|
|
@@ -16301,7 +16300,7 @@ function lastOpts(argList) {
|
|
|
16301
16300
|
if (!this.isValid) return null;
|
|
16302
16301
|
return diffRelative(options.base || DateTime.fromObject({}, {
|
|
16303
16302
|
zone: this.zone
|
|
16304
|
-
}), this, _object_spread_props$
|
|
16303
|
+
}), this, _object_spread_props$2(_object_spread$3({}, options), {
|
|
16305
16304
|
numeric: "auto",
|
|
16306
16305
|
units: [
|
|
16307
16306
|
"years",
|
|
@@ -22569,7 +22568,7 @@ function _create_class$r(Constructor, protoProps, staticProps) {
|
|
|
22569
22568
|
if (staticProps) _defineProperties$r(Constructor, staticProps);
|
|
22570
22569
|
return Constructor;
|
|
22571
22570
|
}
|
|
22572
|
-
function _define_property$
|
|
22571
|
+
function _define_property$4(obj, key, value) {
|
|
22573
22572
|
if (key in obj) {
|
|
22574
22573
|
Object.defineProperty(obj, key, {
|
|
22575
22574
|
value: value,
|
|
@@ -22622,7 +22621,7 @@ function _non_iterable_rest$2() {
|
|
|
22622
22621
|
function _non_iterable_spread$4() {
|
|
22623
22622
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
22624
22623
|
}
|
|
22625
|
-
function _object_spread$
|
|
22624
|
+
function _object_spread$2(target) {
|
|
22626
22625
|
for(var i = 1; i < arguments.length; i++){
|
|
22627
22626
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
22628
22627
|
var ownKeys = Object.keys(source);
|
|
@@ -22632,12 +22631,12 @@ function _object_spread$1(target) {
|
|
|
22632
22631
|
}));
|
|
22633
22632
|
}
|
|
22634
22633
|
ownKeys.forEach(function(key) {
|
|
22635
|
-
_define_property$
|
|
22634
|
+
_define_property$4(target, key, source[key]);
|
|
22636
22635
|
});
|
|
22637
22636
|
}
|
|
22638
22637
|
return target;
|
|
22639
22638
|
}
|
|
22640
|
-
function ownKeys(object, enumerableOnly) {
|
|
22639
|
+
function ownKeys$1(object, enumerableOnly) {
|
|
22641
22640
|
var keys = Object.keys(object);
|
|
22642
22641
|
if (Object.getOwnPropertySymbols) {
|
|
22643
22642
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
@@ -22645,12 +22644,12 @@ function ownKeys(object, enumerableOnly) {
|
|
|
22645
22644
|
}
|
|
22646
22645
|
return keys;
|
|
22647
22646
|
}
|
|
22648
|
-
function _object_spread_props(target, source) {
|
|
22647
|
+
function _object_spread_props$1(target, source) {
|
|
22649
22648
|
source = source != null ? source : {};
|
|
22650
22649
|
if (Object.getOwnPropertyDescriptors) {
|
|
22651
22650
|
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
22652
22651
|
} else {
|
|
22653
|
-
ownKeys(Object(source)).forEach(function(key) {
|
|
22652
|
+
ownKeys$1(Object(source)).forEach(function(key) {
|
|
22654
22653
|
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
22655
22654
|
});
|
|
22656
22655
|
}
|
|
@@ -22843,14 +22842,14 @@ function indent(str, spaces) {
|
|
|
22843
22842
|
var match = parseIdentifier(input, i1, namePart) || namePart && parseAdditionalSymbol(input, i1) || maybeSpace && parseSpaces(input, i1);
|
|
22844
22843
|
// match is required
|
|
22845
22844
|
if (!match) {
|
|
22846
|
-
return
|
|
22845
|
+
return nextMatch = nextMatch1, i = i1, tokens = tokens1, {
|
|
22847
22846
|
v: nextMatch1
|
|
22848
22847
|
};
|
|
22849
22848
|
}
|
|
22850
22849
|
var token = match.token, offset = match.offset;
|
|
22851
22850
|
i1 += offset;
|
|
22852
22851
|
if (token === ' ') {
|
|
22853
|
-
return
|
|
22852
|
+
return nextMatch = nextMatch1, i = i1, tokens = tokens1, "continue";
|
|
22854
22853
|
}
|
|
22855
22854
|
tokens1 = _to_consumable_array$4(tokens1).concat([
|
|
22856
22855
|
token
|
|
@@ -22869,7 +22868,7 @@ function indent(str, spaces) {
|
|
|
22869
22868
|
if (contextKeys.some(function(el) {
|
|
22870
22869
|
return el.startsWith(name);
|
|
22871
22870
|
})) {
|
|
22872
|
-
return
|
|
22871
|
+
return nextMatch = nextMatch1, i = i1, tokens = tokens1, "continue";
|
|
22873
22872
|
}
|
|
22874
22873
|
if (dateTimeIdentifiers.some(function(el) {
|
|
22875
22874
|
return el === name;
|
|
@@ -22888,9 +22887,9 @@ function indent(str, spaces) {
|
|
|
22888
22887
|
if (dateTimeIdentifiers.some(function(el) {
|
|
22889
22888
|
return el.startsWith(name);
|
|
22890
22889
|
})) {
|
|
22891
|
-
return
|
|
22890
|
+
return nextMatch = nextMatch1, i = i1, tokens = tokens1, "continue";
|
|
22892
22891
|
}
|
|
22893
|
-
return
|
|
22892
|
+
return nextMatch = nextMatch1, i = i1, tokens = tokens1, {
|
|
22894
22893
|
v: nextMatch1
|
|
22895
22894
|
};
|
|
22896
22895
|
};
|
|
@@ -22902,7 +22901,7 @@ function indent(str, spaces) {
|
|
|
22902
22901
|
}
|
|
22903
22902
|
}
|
|
22904
22903
|
var _obj;
|
|
22905
|
-
var identifiersMap = (_obj = {}, _define_property$
|
|
22904
|
+
var identifiersMap = (_obj = {}, _define_property$4(_obj, identifier, 'identifier'), _define_property$4(_obj, nameIdentifier, 'nameIdentifier'), _obj);
|
|
22906
22905
|
var identifiers = new ExternalTokenizer(function(input, stack) {
|
|
22907
22906
|
LOG_PARSE_DEBUG && console.log('%s: T <identifier | nameIdentifier>', input.pos);
|
|
22908
22907
|
var nameMatch = parseName(input, stack.context);
|
|
@@ -22951,11 +22950,11 @@ var insertSemicolon = new ExternalTokenizer(function(input, stack) {
|
|
|
22951
22950
|
}
|
|
22952
22951
|
});
|
|
22953
22952
|
var _obj1;
|
|
22954
|
-
var prefixedContextStarts = (_obj1 = {}, _define_property$
|
|
22953
|
+
var prefixedContextStarts = (_obj1 = {}, _define_property$4(_obj1, functionInvocationStart, 'FunctionInvocation'), _define_property$4(_obj1, filterExpressionStart, 'FilterExpression'), _define_property$4(_obj1, pathExpressionStart, 'PathExpression'), _obj1);
|
|
22955
22954
|
var _obj2;
|
|
22956
|
-
var contextStarts = (_obj2 = {}, _define_property$
|
|
22955
|
+
var contextStarts = (_obj2 = {}, _define_property$4(_obj2, contextStart, 'Context'), _define_property$4(_obj2, functionDefinitionStart, 'FunctionDefinition'), _define_property$4(_obj2, forExpressionStart, 'ForExpression'), _define_property$4(_obj2, listStart, 'List'), _define_property$4(_obj2, ifExpressionStart, 'IfExpression'), _define_property$4(_obj2, quantifiedExpressionStart, 'QuantifiedExpression'), _obj2);
|
|
22957
22956
|
var _obj3;
|
|
22958
|
-
var contextEnds = (_obj3 = {}, _define_property$
|
|
22957
|
+
var contextEnds = (_obj3 = {}, _define_property$4(_obj3, Context, 'Context'), _define_property$4(_obj3, FunctionDefinition, 'FunctionDefinition'), _define_property$4(_obj3, ForExpression, 'ForExpression'), _define_property$4(_obj3, List, 'List'), _define_property$4(_obj3, IfExpression, 'IfExpression'), _define_property$4(_obj3, QuantifiedExpression, 'QuantifiedExpression'), _define_property$4(_obj3, PathExpression, 'PathExpression'), _define_property$4(_obj3, FunctionInvocation, 'FunctionInvocation'), _define_property$4(_obj3, FilterExpression, 'FilterExpression'), _define_property$4(_obj3, ArithmeticExpression, 'ArithmeticExpression'), _obj3);
|
|
22959
22958
|
/**
|
|
22960
22959
|
* A simple producer that retrievs a value from
|
|
22961
22960
|
* a given context. Used to lazily take things.
|
|
@@ -23043,7 +23042,7 @@ var dateTimeIdentifiers = Object.keys(dateTimeLiterals);
|
|
|
23043
23042
|
*/ key: "set",
|
|
23044
23043
|
value: function set(key, value) {
|
|
23045
23044
|
var constructor = /** @type { typeof VariableContext } */ this.constructor;
|
|
23046
|
-
return constructor.of(_object_spread_props(_object_spread$
|
|
23045
|
+
return constructor.of(_object_spread_props$1(_object_spread$2({}, this.value), _define_property$4({}, key, value)));
|
|
23047
23046
|
}
|
|
23048
23047
|
},
|
|
23049
23048
|
{
|
|
@@ -23107,7 +23106,7 @@ var dateTimeIdentifiers = Object.keys(dateTimeLiterals);
|
|
|
23107
23106
|
if ((typeof context === "undefined" ? "undefined" : _type_of$z(context)) !== 'object') {
|
|
23108
23107
|
return {};
|
|
23109
23108
|
}
|
|
23110
|
-
return _object_spread$
|
|
23109
|
+
return _object_spread$2({}, context);
|
|
23111
23110
|
}
|
|
23112
23111
|
},
|
|
23113
23112
|
{
|
|
@@ -23125,13 +23124,13 @@ var dateTimeIdentifiers = Object.keys(dateTimeLiterals);
|
|
|
23125
23124
|
return reduce$1(this.__unwrap(other), function(merged, value, key) {
|
|
23126
23125
|
if (_instanceof$f(value, ValueProducer)) {
|
|
23127
23126
|
// keep value producers in tact
|
|
23128
|
-
return _object_spread_props(_object_spread$
|
|
23127
|
+
return _object_spread_props$1(_object_spread$2({}, merged), _define_property$4({}, key, value));
|
|
23129
23128
|
}
|
|
23130
23129
|
value = _this.__unwrap(value);
|
|
23131
23130
|
if (has$2(merged, key)) {
|
|
23132
23131
|
value = _this.__merge(_this.__unwrap(merged[key]), value);
|
|
23133
23132
|
}
|
|
23134
|
-
return _object_spread_props(_object_spread$
|
|
23133
|
+
return _object_spread_props$1(_object_spread$2({}, merged), _define_property$4({}, key, value));
|
|
23135
23134
|
}, this.__unwrap(context));
|
|
23136
23135
|
}
|
|
23137
23136
|
}
|
|
@@ -23350,7 +23349,7 @@ var Variables = /*#__PURE__*/ function() {
|
|
|
23350
23349
|
*/ key: "assign",
|
|
23351
23350
|
value: function assign() {
|
|
23352
23351
|
var options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
23353
|
-
return Variables.of(_object_spread$
|
|
23352
|
+
return Variables.of(_object_spread$2({}, this, options));
|
|
23354
23353
|
}
|
|
23355
23354
|
},
|
|
23356
23355
|
{
|
|
@@ -23365,7 +23364,7 @@ var Variables = /*#__PURE__*/ function() {
|
|
|
23365
23364
|
context: this.context,
|
|
23366
23365
|
parent: this.parent
|
|
23367
23366
|
};
|
|
23368
|
-
return Variables.of(_object_spread$
|
|
23367
|
+
return Variables.of(_object_spread$2({}, defaultOptions, options));
|
|
23369
23368
|
}
|
|
23370
23369
|
}
|
|
23371
23370
|
], [
|
|
@@ -23848,7 +23847,7 @@ function _create_class$q(Constructor, protoProps, staticProps) {
|
|
|
23848
23847
|
if (protoProps) _defineProperties$q(Constructor.prototype, protoProps);
|
|
23849
23848
|
return Constructor;
|
|
23850
23849
|
}
|
|
23851
|
-
function _define_property$
|
|
23850
|
+
function _define_property$3(obj, key, value) {
|
|
23852
23851
|
if (key in obj) {
|
|
23853
23852
|
Object.defineProperty(obj, key, {
|
|
23854
23853
|
value: value,
|
|
@@ -25155,7 +25154,7 @@ var builtins = {
|
|
|
25155
25154
|
if (key in context) {
|
|
25156
25155
|
return FALSE;
|
|
25157
25156
|
}
|
|
25158
|
-
return Object.assign(Object.assign({}, context), _define_property$
|
|
25157
|
+
return Object.assign(Object.assign({}, context), _define_property$3({}, entry.key, entry.value));
|
|
25159
25158
|
}, {});
|
|
25160
25159
|
if (context === FALSE) {
|
|
25161
25160
|
return null;
|
|
@@ -25208,7 +25207,7 @@ var builtins = {
|
|
|
25208
25207
|
return null;
|
|
25209
25208
|
}
|
|
25210
25209
|
}
|
|
25211
|
-
return Object.assign(Object.assign({}, context), _define_property$
|
|
25210
|
+
return Object.assign(Object.assign({}, context), _define_property$3({}, key, value));
|
|
25212
25211
|
}
|
|
25213
25212
|
function matches(a, b) {
|
|
25214
25213
|
return a === b;
|
|
@@ -25935,7 +25934,7 @@ function evalNode(node, input, args) {
|
|
|
25935
25934
|
return function(context) {
|
|
25936
25935
|
return args.slice(1, -1).reduce(function(obj, arg) {
|
|
25937
25936
|
var _arg = _sliced_to_array$1(arg(Object.assign(Object.assign({}, context), obj)), 2), key = _arg[0], value = _arg[1];
|
|
25938
|
-
return Object.assign(Object.assign({}, obj), _define_property$
|
|
25937
|
+
return Object.assign(Object.assign({}, obj), _define_property$3({}, key, value));
|
|
25939
25938
|
}, {});
|
|
25940
25939
|
};
|
|
25941
25940
|
case 'FunctionBody':
|
|
@@ -26432,7 +26431,7 @@ function extractValue(context, prop, _target) {
|
|
|
26432
26431
|
'range'
|
|
26433
26432
|
].includes(getType(target))) {
|
|
26434
26433
|
return target.map(function(t) {
|
|
26435
|
-
return _define_property$
|
|
26434
|
+
return _define_property$3({}, prop, t);
|
|
26436
26435
|
});
|
|
26437
26436
|
}
|
|
26438
26437
|
return null;
|
|
@@ -42896,7 +42895,7 @@ function _class_call_check$1(instance, Constructor) {
|
|
|
42896
42895
|
throw new TypeError("Cannot call a class as a function");
|
|
42897
42896
|
}
|
|
42898
42897
|
}
|
|
42899
|
-
function _define_property$
|
|
42898
|
+
function _define_property$2(obj, key, value) {
|
|
42900
42899
|
if (key in obj) {
|
|
42901
42900
|
Object.defineProperty(obj, key, {
|
|
42902
42901
|
value: value,
|
|
@@ -42976,7 +42975,7 @@ var CelParser = /*#__PURE__*/ function(CstParser) {
|
|
|
42976
42975
|
_class_call_check$1(this, CelParser);
|
|
42977
42976
|
var _this;
|
|
42978
42977
|
_this = _super.call(this, allTokens);
|
|
42979
|
-
_define_property$
|
|
42978
|
+
_define_property$2(_assert_this_initialized$1(_this), "expr", _this.RULE('expr', function() {
|
|
42980
42979
|
_this.SUBRULE(_this.conditionalOr, {
|
|
42981
42980
|
LABEL: 'conditionalOr'
|
|
42982
42981
|
});
|
|
@@ -42991,7 +42990,7 @@ var CelParser = /*#__PURE__*/ function(CstParser) {
|
|
|
42991
42990
|
});
|
|
42992
42991
|
});
|
|
42993
42992
|
}));
|
|
42994
|
-
_define_property$
|
|
42993
|
+
_define_property$2(_assert_this_initialized$1(_this), "conditionalAnd", _this.RULE('conditionalAnd', function() {
|
|
42995
42994
|
_this.SUBRULE(_this.relation, {
|
|
42996
42995
|
LABEL: 'lhs'
|
|
42997
42996
|
});
|
|
@@ -43002,7 +43001,7 @@ var CelParser = /*#__PURE__*/ function(CstParser) {
|
|
|
43002
43001
|
});
|
|
43003
43002
|
});
|
|
43004
43003
|
}));
|
|
43005
|
-
_define_property$
|
|
43004
|
+
_define_property$2(_assert_this_initialized$1(_this), "conditionalOr", _this.RULE('conditionalOr', function() {
|
|
43006
43005
|
_this.SUBRULE(_this.conditionalAnd, {
|
|
43007
43006
|
LABEL: 'lhs'
|
|
43008
43007
|
});
|
|
@@ -43013,7 +43012,7 @@ var CelParser = /*#__PURE__*/ function(CstParser) {
|
|
|
43013
43012
|
});
|
|
43014
43013
|
});
|
|
43015
43014
|
}));
|
|
43016
|
-
_define_property$
|
|
43015
|
+
_define_property$2(_assert_this_initialized$1(_this), "relation", _this.RULE('relation', function() {
|
|
43017
43016
|
_this.SUBRULE(_this.addition, {
|
|
43018
43017
|
LABEL: 'lhs'
|
|
43019
43018
|
});
|
|
@@ -43024,7 +43023,7 @@ var CelParser = /*#__PURE__*/ function(CstParser) {
|
|
|
43024
43023
|
});
|
|
43025
43024
|
});
|
|
43026
43025
|
}));
|
|
43027
|
-
_define_property$
|
|
43026
|
+
_define_property$2(_assert_this_initialized$1(_this), "addition", _this.RULE('addition', function() {
|
|
43028
43027
|
_this.SUBRULE(_this.multiplication, {
|
|
43029
43028
|
LABEL: 'lhs'
|
|
43030
43029
|
});
|
|
@@ -43035,7 +43034,7 @@ var CelParser = /*#__PURE__*/ function(CstParser) {
|
|
|
43035
43034
|
});
|
|
43036
43035
|
});
|
|
43037
43036
|
}));
|
|
43038
|
-
_define_property$
|
|
43037
|
+
_define_property$2(_assert_this_initialized$1(_this), "multiplication", _this.RULE('multiplication', function() {
|
|
43039
43038
|
_this.SUBRULE(_this.unaryExpression, {
|
|
43040
43039
|
LABEL: 'lhs'
|
|
43041
43040
|
});
|
|
@@ -43046,13 +43045,13 @@ var CelParser = /*#__PURE__*/ function(CstParser) {
|
|
|
43046
43045
|
});
|
|
43047
43046
|
});
|
|
43048
43047
|
}));
|
|
43049
|
-
_define_property$
|
|
43048
|
+
_define_property$2(_assert_this_initialized$1(_this), "unaryExpression", _this.RULE('unaryExpression', function() {
|
|
43050
43049
|
_this.MANY(function() {
|
|
43051
43050
|
_this.CONSUME(UnaryOperator);
|
|
43052
43051
|
});
|
|
43053
43052
|
_this.SUBRULE(_this.atomicExpression);
|
|
43054
43053
|
}));
|
|
43055
|
-
_define_property$
|
|
43054
|
+
_define_property$2(_assert_this_initialized$1(_this), "parenthesisExpression", _this.RULE('parenthesisExpression', function() {
|
|
43056
43055
|
_this.CONSUME(OpenParenthesis, {
|
|
43057
43056
|
LABEL: 'open'
|
|
43058
43057
|
});
|
|
@@ -43061,7 +43060,7 @@ var CelParser = /*#__PURE__*/ function(CstParser) {
|
|
|
43061
43060
|
LABEL: 'close'
|
|
43062
43061
|
});
|
|
43063
43062
|
}));
|
|
43064
|
-
_define_property$
|
|
43063
|
+
_define_property$2(_assert_this_initialized$1(_this), "listExpression", _this.RULE('listExpression', function() {
|
|
43065
43064
|
_this.CONSUME(OpenBracket);
|
|
43066
43065
|
_this.OPTION(function() {
|
|
43067
43066
|
_this.SUBRULE(_this.expr, {
|
|
@@ -43081,7 +43080,7 @@ var CelParser = /*#__PURE__*/ function(CstParser) {
|
|
|
43081
43080
|
});
|
|
43082
43081
|
});
|
|
43083
43082
|
}));
|
|
43084
|
-
_define_property$
|
|
43083
|
+
_define_property$2(_assert_this_initialized$1(_this), "mapExpression", _this.RULE('mapExpression', function() {
|
|
43085
43084
|
_this.CONSUME(OpenCurlyBracket);
|
|
43086
43085
|
_this.MANY(function() {
|
|
43087
43086
|
_this.SUBRULE(_this.mapKeyValues, {
|
|
@@ -43106,7 +43105,7 @@ var CelParser = /*#__PURE__*/ function(CstParser) {
|
|
|
43106
43105
|
]);
|
|
43107
43106
|
});
|
|
43108
43107
|
}));
|
|
43109
|
-
_define_property$
|
|
43108
|
+
_define_property$2(_assert_this_initialized$1(_this), "mapKeyValues", _this.RULE('mapKeyValues', function() {
|
|
43110
43109
|
_this.SUBRULE(_this.expr, {
|
|
43111
43110
|
LABEL: 'key'
|
|
43112
43111
|
});
|
|
@@ -43118,7 +43117,7 @@ var CelParser = /*#__PURE__*/ function(CstParser) {
|
|
|
43118
43117
|
_this.CONSUME(Comma);
|
|
43119
43118
|
});
|
|
43120
43119
|
}));
|
|
43121
|
-
_define_property$
|
|
43120
|
+
_define_property$2(_assert_this_initialized$1(_this), "macrosExpression", _this.RULE('macrosExpression', function() {
|
|
43122
43121
|
_this.CONSUME(Identifier);
|
|
43123
43122
|
_this.CONSUME(OpenParenthesis);
|
|
43124
43123
|
_this.OPTION(function() {
|
|
@@ -43134,7 +43133,7 @@ var CelParser = /*#__PURE__*/ function(CstParser) {
|
|
|
43134
43133
|
});
|
|
43135
43134
|
_this.CONSUME(CloseParenthesis);
|
|
43136
43135
|
}));
|
|
43137
|
-
_define_property$
|
|
43136
|
+
_define_property$2(_assert_this_initialized$1(_this), "identifierExpression", _this.RULE('identifierExpression', function() {
|
|
43138
43137
|
_this.CONSUME(Identifier);
|
|
43139
43138
|
_this.MANY(function() {
|
|
43140
43139
|
_this.OR([
|
|
@@ -43153,7 +43152,7 @@ var CelParser = /*#__PURE__*/ function(CstParser) {
|
|
|
43153
43152
|
]);
|
|
43154
43153
|
});
|
|
43155
43154
|
}));
|
|
43156
|
-
_define_property$
|
|
43155
|
+
_define_property$2(_assert_this_initialized$1(_this), "identifierDotExpression", _this.RULE('identifierDotExpression', function() {
|
|
43157
43156
|
_this.CONSUME(Dot);
|
|
43158
43157
|
_this.CONSUME(Identifier);
|
|
43159
43158
|
// Optional method call with arguments (for collection macros)
|
|
@@ -43173,12 +43172,12 @@ var CelParser = /*#__PURE__*/ function(CstParser) {
|
|
|
43173
43172
|
_this.CONSUME(CloseParenthesis);
|
|
43174
43173
|
});
|
|
43175
43174
|
}));
|
|
43176
|
-
_define_property$
|
|
43175
|
+
_define_property$2(_assert_this_initialized$1(_this), "indexExpression", _this.RULE('indexExpression', function() {
|
|
43177
43176
|
_this.CONSUME(OpenBracket);
|
|
43178
43177
|
_this.SUBRULE(_this.expr);
|
|
43179
43178
|
_this.CONSUME(CloseBracket);
|
|
43180
43179
|
}));
|
|
43181
|
-
_define_property$
|
|
43180
|
+
_define_property$2(_assert_this_initialized$1(_this), "atomicExpression", _this.RULE('atomicExpression', function() {
|
|
43182
43181
|
_this.OR([
|
|
43183
43182
|
{
|
|
43184
43183
|
ALT: function() {
|
|
@@ -43287,7 +43286,7 @@ function _create_class(Constructor, protoProps, staticProps) {
|
|
|
43287
43286
|
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
43288
43287
|
return Constructor;
|
|
43289
43288
|
}
|
|
43290
|
-
function _define_property(obj, key, value) {
|
|
43289
|
+
function _define_property$1(obj, key, value) {
|
|
43291
43290
|
if (key in obj) {
|
|
43292
43291
|
Object.defineProperty(obj, key, {
|
|
43293
43292
|
value: value,
|
|
@@ -43359,7 +43358,7 @@ function _non_iterable_rest() {
|
|
|
43359
43358
|
function _non_iterable_spread() {
|
|
43360
43359
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
43361
43360
|
}
|
|
43362
|
-
function _object_spread(target) {
|
|
43361
|
+
function _object_spread$1(target) {
|
|
43363
43362
|
for(var i = 1; i < arguments.length; i++){
|
|
43364
43363
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
43365
43364
|
var ownKeys = Object.keys(source);
|
|
@@ -43369,7 +43368,7 @@ function _object_spread(target) {
|
|
|
43369
43368
|
}));
|
|
43370
43369
|
}
|
|
43371
43370
|
ownKeys.forEach(function(key) {
|
|
43372
|
-
_define_property(target, key, source[key]);
|
|
43371
|
+
_define_property$1(target, key, source[key]);
|
|
43373
43372
|
});
|
|
43374
43373
|
}
|
|
43375
43374
|
return target;
|
|
@@ -43455,13 +43454,13 @@ var CelVisitor = /*#__PURE__*/ function(BaseCelVisitor) {
|
|
|
43455
43454
|
_class_call_check(this, CelVisitor);
|
|
43456
43455
|
var _this;
|
|
43457
43456
|
_this = _super.call(this);
|
|
43458
|
-
_define_property(_assert_this_initialized(_this), "context", void 0);
|
|
43457
|
+
_define_property$1(_assert_this_initialized(_this), "context", void 0);
|
|
43459
43458
|
/**
|
|
43460
43459
|
* Tracks the current mode of the visitor to handle special cases.
|
|
43461
|
-
*/ _define_property(_assert_this_initialized(_this), "mode", Mode.normal);
|
|
43462
|
-
_define_property(_assert_this_initialized(_this), "functions", void 0);
|
|
43460
|
+
*/ _define_property$1(_assert_this_initialized(_this), "mode", Mode.normal);
|
|
43461
|
+
_define_property$1(_assert_this_initialized(_this), "functions", void 0);
|
|
43463
43462
|
_this.context = context || {};
|
|
43464
|
-
_this.functions = _object_spread({}, defaultFunctions, functions || {});
|
|
43463
|
+
_this.functions = _object_spread$1({}, defaultFunctions, functions || {});
|
|
43465
43464
|
_this.validateVisitor();
|
|
43466
43465
|
return _this;
|
|
43467
43466
|
}
|
|
@@ -44202,6 +44201,198 @@ function evaluate(expression, context, functions) {
|
|
|
44202
44201
|
}
|
|
44203
44202
|
return toAstVisitorInstance.visit(result.cst);
|
|
44204
44203
|
}
|
|
44204
|
+
// Latin-1 Supplement
|
|
44205
|
+
// upper case ranges
|
|
44206
|
+
// [À-ÖØ-ß]
|
|
44207
|
+
// lower case ranges
|
|
44208
|
+
// [à-öø-ÿ]
|
|
44209
|
+
var magicSplit = /^[a-zà-öø-ÿа-я]+|[A-ZÀ-ÖØ-ßА-Я][a-zà-öø-ÿа-я]+|[a-zà-öø-ÿа-я]+|[0-9]+|[A-ZÀ-ÖØ-ßА-Я]+(?![a-zà-öø-ÿа-я])/g;
|
|
44210
|
+
var spaceSplit = /\S+/g;
|
|
44211
|
+
/**
|
|
44212
|
+
* A string.matchAll function that will return an array of "string parts" and the indexes at which it split each part
|
|
44213
|
+
*/ function getPartsAndIndexes(string, splitRegex) {
|
|
44214
|
+
var result = {
|
|
44215
|
+
parts: [],
|
|
44216
|
+
prefixes: []
|
|
44217
|
+
};
|
|
44218
|
+
var matches = string.matchAll(splitRegex);
|
|
44219
|
+
var lastWordEndIndex = 0;
|
|
44220
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
44221
|
+
try {
|
|
44222
|
+
for(var _iterator = matches[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
44223
|
+
var match = _step.value;
|
|
44224
|
+
if (typeof match.index !== 'number') continue;
|
|
44225
|
+
var word = match[0];
|
|
44226
|
+
result.parts.push(word);
|
|
44227
|
+
var prefix = string.slice(lastWordEndIndex, match.index).trim();
|
|
44228
|
+
result.prefixes.push(prefix);
|
|
44229
|
+
lastWordEndIndex = match.index + word.length;
|
|
44230
|
+
}
|
|
44231
|
+
} catch (err) {
|
|
44232
|
+
_didIteratorError = true;
|
|
44233
|
+
_iteratorError = err;
|
|
44234
|
+
} finally{
|
|
44235
|
+
try {
|
|
44236
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
44237
|
+
_iterator.return();
|
|
44238
|
+
}
|
|
44239
|
+
} finally{
|
|
44240
|
+
if (_didIteratorError) {
|
|
44241
|
+
throw _iteratorError;
|
|
44242
|
+
}
|
|
44243
|
+
}
|
|
44244
|
+
}
|
|
44245
|
+
var tail = string.slice(lastWordEndIndex).trim();
|
|
44246
|
+
if (tail) {
|
|
44247
|
+
result.parts.push('');
|
|
44248
|
+
result.prefixes.push(tail);
|
|
44249
|
+
}
|
|
44250
|
+
return result;
|
|
44251
|
+
}
|
|
44252
|
+
/**
|
|
44253
|
+
* A function that splits a string on words and returns an array of words.
|
|
44254
|
+
* - It can prefix each word with a given character
|
|
44255
|
+
* - It can strip or keep special characters, this affects the logic for adding a prefix as well
|
|
44256
|
+
*/ function splitAndPrefix(string, options) {
|
|
44257
|
+
var _ref = options || {}, _ref_keepSpecialCharacters = _ref.keepSpecialCharacters, keepSpecialCharacters = _ref_keepSpecialCharacters === void 0 ? false : _ref_keepSpecialCharacters, keep = _ref.keep, _ref_prefix = _ref.prefix, prefix = _ref_prefix === void 0 ? '' : _ref_prefix;
|
|
44258
|
+
var normalString = string.trim().normalize('NFC');
|
|
44259
|
+
var hasSpaces = normalString.includes(' ');
|
|
44260
|
+
var split = hasSpaces ? spaceSplit : magicSplit;
|
|
44261
|
+
var partsAndIndexes = getPartsAndIndexes(normalString, split);
|
|
44262
|
+
return partsAndIndexes.parts.map(function(_part, i) {
|
|
44263
|
+
var foundPrefix = partsAndIndexes.prefixes[i] || '';
|
|
44264
|
+
var part = _part;
|
|
44265
|
+
if (keepSpecialCharacters === false) {
|
|
44266
|
+
if (keep) {
|
|
44267
|
+
part = part.normalize('NFD').replace(new RegExp("[^a-zA-Z\xd8\xdf\xf80-9".concat(keep.join(''), "]"), 'g'), '');
|
|
44268
|
+
}
|
|
44269
|
+
if (!keep) {
|
|
44270
|
+
part = part.normalize('NFD').replace(/[^a-zA-ZØßø0-9]/g, '');
|
|
44271
|
+
foundPrefix = '';
|
|
44272
|
+
}
|
|
44273
|
+
}
|
|
44274
|
+
if (keep && foundPrefix) {
|
|
44275
|
+
foundPrefix = foundPrefix.replace(new RegExp("[^".concat(keep.join(''), "]"), 'g'), '');
|
|
44276
|
+
}
|
|
44277
|
+
// the first word doesn't need a prefix, so only return the found prefix
|
|
44278
|
+
if (i === 0) {
|
|
44279
|
+
// console.log(`foundPrefix → `, foundPrefix)
|
|
44280
|
+
return foundPrefix + part;
|
|
44281
|
+
}
|
|
44282
|
+
if (!foundPrefix && !part) return '';
|
|
44283
|
+
if (!hasSpaces) {
|
|
44284
|
+
// return the found prefix OR fall back to a given prefix
|
|
44285
|
+
return (foundPrefix || prefix) + part;
|
|
44286
|
+
}
|
|
44287
|
+
// space based sentence was split on spaces, so only return found prefixes
|
|
44288
|
+
if (!foundPrefix && prefix.match(/\s/)) {
|
|
44289
|
+
// in this case we have no more found prefix, it was trimmed, but we're looking to add a space
|
|
44290
|
+
// so let's return that space
|
|
44291
|
+
return ' ' + part;
|
|
44292
|
+
}
|
|
44293
|
+
return (foundPrefix || prefix) + part;
|
|
44294
|
+
}).filter(Boolean);
|
|
44295
|
+
}
|
|
44296
|
+
/**
|
|
44297
|
+
* Capitalises a single word
|
|
44298
|
+
* @returns the word with the first character in uppercase and the rest in lowercase
|
|
44299
|
+
*/ function capitaliseWord(string) {
|
|
44300
|
+
var match = string.matchAll(magicSplit).next().value;
|
|
44301
|
+
var firstLetterIndex = match ? match.index : 0;
|
|
44302
|
+
return string.slice(0, firstLetterIndex + 1).toUpperCase() + string.slice(firstLetterIndex + 1).toLowerCase();
|
|
44303
|
+
}
|
|
44304
|
+
function _define_property(obj, key, value) {
|
|
44305
|
+
if (key in obj) {
|
|
44306
|
+
Object.defineProperty(obj, key, {
|
|
44307
|
+
value: value,
|
|
44308
|
+
enumerable: true,
|
|
44309
|
+
configurable: true,
|
|
44310
|
+
writable: true
|
|
44311
|
+
});
|
|
44312
|
+
} else {
|
|
44313
|
+
obj[key] = value;
|
|
44314
|
+
}
|
|
44315
|
+
return obj;
|
|
44316
|
+
}
|
|
44317
|
+
function _object_spread(target) {
|
|
44318
|
+
for(var i = 1; i < arguments.length; i++){
|
|
44319
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
44320
|
+
var ownKeys = Object.keys(source);
|
|
44321
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
44322
|
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
44323
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
44324
|
+
}));
|
|
44325
|
+
}
|
|
44326
|
+
ownKeys.forEach(function(key) {
|
|
44327
|
+
_define_property(target, key, source[key]);
|
|
44328
|
+
});
|
|
44329
|
+
}
|
|
44330
|
+
return target;
|
|
44331
|
+
}
|
|
44332
|
+
function ownKeys(object, enumerableOnly) {
|
|
44333
|
+
var keys = Object.keys(object);
|
|
44334
|
+
if (Object.getOwnPropertySymbols) {
|
|
44335
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
44336
|
+
keys.push.apply(keys, symbols);
|
|
44337
|
+
}
|
|
44338
|
+
return keys;
|
|
44339
|
+
}
|
|
44340
|
+
function _object_spread_props(target, source) {
|
|
44341
|
+
source = source != null ? source : {};
|
|
44342
|
+
if (Object.getOwnPropertyDescriptors) {
|
|
44343
|
+
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
44344
|
+
} else {
|
|
44345
|
+
ownKeys(Object(source)).forEach(function(key) {
|
|
44346
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
44347
|
+
});
|
|
44348
|
+
}
|
|
44349
|
+
return target;
|
|
44350
|
+
}
|
|
44351
|
+
/**
|
|
44352
|
+
* # 🐪 camelCase
|
|
44353
|
+
* converts a string to camelCase
|
|
44354
|
+
* - first lowercase then all capitalised
|
|
44355
|
+
* - *strips away* special characters by default
|
|
44356
|
+
*
|
|
44357
|
+
* @example
|
|
44358
|
+
* camelCase('$catDog') === 'catDog'
|
|
44359
|
+
* @example
|
|
44360
|
+
* camelCase('$catDog', { keepSpecialCharacters: true }) === '$catDog'
|
|
44361
|
+
*/ function camelCase(string, options) {
|
|
44362
|
+
return splitAndPrefix(string, options).reduce(function(result, word, index) {
|
|
44363
|
+
return index === 0 || !(word[0] || '').match(magicSplit) ? result + word.toLowerCase() : result + capitaliseWord(word);
|
|
44364
|
+
}, '');
|
|
44365
|
+
}
|
|
44366
|
+
/**
|
|
44367
|
+
* # 🥙 kebab-case
|
|
44368
|
+
* converts a string to kebab-case
|
|
44369
|
+
* - hyphenated lowercase
|
|
44370
|
+
* - *strips away* special characters by default
|
|
44371
|
+
*
|
|
44372
|
+
* @example
|
|
44373
|
+
* kebabCase('$catDog') === 'cat-dog'
|
|
44374
|
+
* @example
|
|
44375
|
+
* kebabCase('$catDog', { keepSpecialCharacters: true }) === '$cat-dog'
|
|
44376
|
+
*/ function kebabCase(string, options) {
|
|
44377
|
+
return splitAndPrefix(string, _object_spread_props(_object_spread({}, options), {
|
|
44378
|
+
prefix: '-'
|
|
44379
|
+
})).join('').toLowerCase();
|
|
44380
|
+
}
|
|
44381
|
+
/**
|
|
44382
|
+
* # 🐍 snake_case
|
|
44383
|
+
* converts a string to snake_case
|
|
44384
|
+
* - underscored lowercase
|
|
44385
|
+
* - *strips away* special characters by default
|
|
44386
|
+
*
|
|
44387
|
+
* @example
|
|
44388
|
+
* snakeCase('$catDog') === 'cat_dog'
|
|
44389
|
+
* @example
|
|
44390
|
+
* snakeCase('$catDog', { keepSpecialCharacters: true }) === '$cat_dog'
|
|
44391
|
+
*/ function snakeCase(string, options) {
|
|
44392
|
+
return splitAndPrefix(string, _object_spread_props(_object_spread({}, options), {
|
|
44393
|
+
prefix: '_'
|
|
44394
|
+
})).join('').toLowerCase();
|
|
44395
|
+
}
|
|
44205
44396
|
const Handlebars = handlebars_min || HandlebarsNamespace;
|
|
44206
44397
|
Handlebars.registerHelper('JSONstringify', function(value) {
|
|
44207
44398
|
return JSON.stringify(value);
|