@digipair/skill-html 0.117.6 → 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 +289 -94
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -8194,7 +8194,7 @@ function _create_class$v(Constructor, protoProps, staticProps) {
|
|
|
8194
8194
|
if (staticProps) _defineProperties$v(Constructor, staticProps);
|
|
8195
8195
|
return Constructor;
|
|
8196
8196
|
}
|
|
8197
|
-
function _define_property$
|
|
8197
|
+
function _define_property$5(obj, key, value) {
|
|
8198
8198
|
if (key in obj) {
|
|
8199
8199
|
Object.defineProperty(obj, key, {
|
|
8200
8200
|
value: value,
|
|
@@ -8269,7 +8269,7 @@ function _non_iterable_rest$5() {
|
|
|
8269
8269
|
function _non_iterable_spread$6() {
|
|
8270
8270
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
8271
8271
|
}
|
|
8272
|
-
function _object_spread$
|
|
8272
|
+
function _object_spread$3(target) {
|
|
8273
8273
|
for(var i = 1; i < arguments.length; i++){
|
|
8274
8274
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
8275
8275
|
var ownKeys = Object.keys(source);
|
|
@@ -8279,12 +8279,12 @@ function _object_spread$2(target) {
|
|
|
8279
8279
|
}));
|
|
8280
8280
|
}
|
|
8281
8281
|
ownKeys.forEach(function(key) {
|
|
8282
|
-
_define_property$
|
|
8282
|
+
_define_property$5(target, key, source[key]);
|
|
8283
8283
|
});
|
|
8284
8284
|
}
|
|
8285
8285
|
return target;
|
|
8286
8286
|
}
|
|
8287
|
-
function ownKeys$
|
|
8287
|
+
function ownKeys$2(object, enumerableOnly) {
|
|
8288
8288
|
var keys = Object.keys(object);
|
|
8289
8289
|
if (Object.getOwnPropertySymbols) {
|
|
8290
8290
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
@@ -8292,12 +8292,12 @@ function ownKeys$1(object, enumerableOnly) {
|
|
|
8292
8292
|
}
|
|
8293
8293
|
return keys;
|
|
8294
8294
|
}
|
|
8295
|
-
function _object_spread_props$
|
|
8295
|
+
function _object_spread_props$2(target, source) {
|
|
8296
8296
|
source = source != null ? source : {};
|
|
8297
8297
|
if (Object.getOwnPropertyDescriptors) {
|
|
8298
8298
|
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
8299
8299
|
} else {
|
|
8300
|
-
ownKeys$
|
|
8300
|
+
ownKeys$2(Object(source)).forEach(function(key) {
|
|
8301
8301
|
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
8302
8302
|
});
|
|
8303
8303
|
}
|
|
@@ -9168,7 +9168,7 @@ function getCachedWeekInfo(locString) {
|
|
|
9168
9168
|
data = "getWeekInfo" in locale ? locale.getWeekInfo() : locale.weekInfo;
|
|
9169
9169
|
// minimalDays was removed from WeekInfo: https://github.com/tc39/proposal-intl-locale-info/issues/86
|
|
9170
9170
|
if (!("minimalDays" in data)) {
|
|
9171
|
-
data = _object_spread$
|
|
9171
|
+
data = _object_spread$3({}, fallbackWeekSettings, data);
|
|
9172
9172
|
}
|
|
9173
9173
|
weekInfoCache.set(locString, data);
|
|
9174
9174
|
}
|
|
@@ -9275,7 +9275,7 @@ function supportsFastNumbers(loc) {
|
|
|
9275
9275
|
"floor"
|
|
9276
9276
|
]);
|
|
9277
9277
|
if (!forceSimple || Object.keys(otherOpts).length > 0) {
|
|
9278
|
-
var intlOpts = _object_spread$
|
|
9278
|
+
var intlOpts = _object_spread$3({
|
|
9279
9279
|
useGrouping: false
|
|
9280
9280
|
}, opts);
|
|
9281
9281
|
if (opts.padTo > 0) intlOpts.minimumIntegerDigits = opts.padTo;
|
|
@@ -9345,7 +9345,7 @@ function supportsFastNumbers(loc) {
|
|
|
9345
9345
|
});
|
|
9346
9346
|
this.originalZone = dt.zone;
|
|
9347
9347
|
}
|
|
9348
|
-
var intlOpts = _object_spread$
|
|
9348
|
+
var intlOpts = _object_spread$3({}, this.opts);
|
|
9349
9349
|
intlOpts.timeZone = intlOpts.timeZone || z;
|
|
9350
9350
|
this.dtf = getCachedDTF(intl, intlOpts);
|
|
9351
9351
|
}
|
|
@@ -9376,7 +9376,7 @@ function supportsFastNumbers(loc) {
|
|
|
9376
9376
|
locale: _this.dt.locale,
|
|
9377
9377
|
format: _this.opts.timeZoneName
|
|
9378
9378
|
});
|
|
9379
|
-
return _object_spread_props$
|
|
9379
|
+
return _object_spread_props$2(_object_spread$3({}, part), {
|
|
9380
9380
|
value: offsetName
|
|
9381
9381
|
});
|
|
9382
9382
|
} else {
|
|
@@ -9401,7 +9401,7 @@ function supportsFastNumbers(loc) {
|
|
|
9401
9401
|
*/ var PolyRelFormatter = /*#__PURE__*/ function() {
|
|
9402
9402
|
function PolyRelFormatter(intl, isEnglish, opts) {
|
|
9403
9403
|
_class_call_check$A(this, PolyRelFormatter);
|
|
9404
|
-
this.opts = _object_spread$
|
|
9404
|
+
this.opts = _object_spread$3({
|
|
9405
9405
|
style: "long"
|
|
9406
9406
|
}, opts);
|
|
9407
9407
|
if (!isEnglish && hasRelative()) {
|
|
@@ -9496,7 +9496,7 @@ var fallbackWeekSettings = {
|
|
|
9496
9496
|
key: "redefaultToEN",
|
|
9497
9497
|
value: function redefaultToEN() {
|
|
9498
9498
|
var alts = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
9499
|
-
return this.clone(_object_spread_props$
|
|
9499
|
+
return this.clone(_object_spread_props$2(_object_spread$3({}, alts), {
|
|
9500
9500
|
defaultToEN: true
|
|
9501
9501
|
}));
|
|
9502
9502
|
}
|
|
@@ -9505,7 +9505,7 @@ var fallbackWeekSettings = {
|
|
|
9505
9505
|
key: "redefaultToSystem",
|
|
9506
9506
|
value: function redefaultToSystem() {
|
|
9507
9507
|
var alts = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
9508
|
-
return this.clone(_object_spread_props$
|
|
9508
|
+
return this.clone(_object_spread_props$2(_object_spread$3({}, alts), {
|
|
9509
9509
|
defaultToEN: false
|
|
9510
9510
|
}));
|
|
9511
9511
|
}
|
|
@@ -10384,7 +10384,7 @@ function isoWeekdayToLocal(isoWeekday, startOfWeek) {
|
|
|
10384
10384
|
} else {
|
|
10385
10385
|
weekYear = year;
|
|
10386
10386
|
}
|
|
10387
|
-
return _object_spread$
|
|
10387
|
+
return _object_spread$3({
|
|
10388
10388
|
weekYear: weekYear,
|
|
10389
10389
|
weekNumber: weekNumber,
|
|
10390
10390
|
weekday: weekday
|
|
@@ -10404,7 +10404,7 @@ function weekToGregorian(weekData) {
|
|
|
10404
10404
|
year = weekYear;
|
|
10405
10405
|
}
|
|
10406
10406
|
var _uncomputeOrdinal = uncomputeOrdinal(year, ordinal), month = _uncomputeOrdinal.month, day = _uncomputeOrdinal.day;
|
|
10407
|
-
return _object_spread$
|
|
10407
|
+
return _object_spread$3({
|
|
10408
10408
|
year: year,
|
|
10409
10409
|
month: month,
|
|
10410
10410
|
day: day
|
|
@@ -10413,7 +10413,7 @@ function weekToGregorian(weekData) {
|
|
|
10413
10413
|
function gregorianToOrdinal(gregData) {
|
|
10414
10414
|
var year = gregData.year, month = gregData.month, day = gregData.day;
|
|
10415
10415
|
var ordinal = computeOrdinal(year, month, day);
|
|
10416
|
-
return _object_spread$
|
|
10416
|
+
return _object_spread$3({
|
|
10417
10417
|
year: year,
|
|
10418
10418
|
ordinal: ordinal
|
|
10419
10419
|
}, timeObject(gregData));
|
|
@@ -10421,7 +10421,7 @@ function gregorianToOrdinal(gregData) {
|
|
|
10421
10421
|
function ordinalToGregorian(ordinalData) {
|
|
10422
10422
|
var year = ordinalData.year, ordinal = ordinalData.ordinal;
|
|
10423
10423
|
var _uncomputeOrdinal = uncomputeOrdinal(year, ordinal), month = _uncomputeOrdinal.month, day = _uncomputeOrdinal.day;
|
|
10424
|
-
return _object_spread$
|
|
10424
|
+
return _object_spread$3({
|
|
10425
10425
|
year: year,
|
|
10426
10426
|
month: month,
|
|
10427
10427
|
day: day
|
|
@@ -10717,7 +10717,7 @@ function parseZoneInfo(ts, offsetFormat, locale) {
|
|
|
10717
10717
|
if (timeZone) {
|
|
10718
10718
|
intlOpts.timeZone = timeZone;
|
|
10719
10719
|
}
|
|
10720
|
-
var modified = _object_spread$
|
|
10720
|
+
var modified = _object_spread$3({
|
|
10721
10721
|
timeZoneName: offsetFormat
|
|
10722
10722
|
}, intlOpts);
|
|
10723
10723
|
var parsed = new Intl.DateTimeFormat(locale, modified).formatToParts(date).find(function(m) {
|
|
@@ -11076,7 +11076,7 @@ var macroTokenToFormatOpts = {
|
|
|
11076
11076
|
if (this.systemLoc === null) {
|
|
11077
11077
|
this.systemLoc = this.loc.redefaultToSystem();
|
|
11078
11078
|
}
|
|
11079
|
-
var df = this.systemLoc.dtFormatter(dt, _object_spread$
|
|
11079
|
+
var df = this.systemLoc.dtFormatter(dt, _object_spread$3({}, this.opts, opts));
|
|
11080
11080
|
return df.format();
|
|
11081
11081
|
}
|
|
11082
11082
|
},
|
|
@@ -11084,7 +11084,7 @@ var macroTokenToFormatOpts = {
|
|
|
11084
11084
|
key: "dtFormatter",
|
|
11085
11085
|
value: function dtFormatter(dt) {
|
|
11086
11086
|
var opts = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
11087
|
-
return this.loc.dtFormatter(dt, _object_spread$
|
|
11087
|
+
return this.loc.dtFormatter(dt, _object_spread$3({}, this.opts, opts));
|
|
11088
11088
|
}
|
|
11089
11089
|
},
|
|
11090
11090
|
{
|
|
@@ -11120,7 +11120,7 @@ var macroTokenToFormatOpts = {
|
|
|
11120
11120
|
if (this.opts.forceSimple) {
|
|
11121
11121
|
return padStart(n, p);
|
|
11122
11122
|
}
|
|
11123
|
-
var opts = _object_spread$
|
|
11123
|
+
var opts = _object_spread$3({}, this.opts);
|
|
11124
11124
|
if (p > 0) {
|
|
11125
11125
|
opts.padTo = p;
|
|
11126
11126
|
}
|
|
@@ -11536,7 +11536,7 @@ function combineExtractors() {
|
|
|
11536
11536
|
var _param = _sliced_to_array$5(param, 3), mergedVals = _param[0], mergedZone = _param[1], cursor = _param[2];
|
|
11537
11537
|
var _ex = _sliced_to_array$5(ex(m, cursor), 3), val = _ex[0], zone = _ex[1], next = _ex[2];
|
|
11538
11538
|
return [
|
|
11539
|
-
_object_spread$
|
|
11539
|
+
_object_spread$3({}, mergedVals, val),
|
|
11540
11540
|
zone || mergedZone,
|
|
11541
11541
|
next
|
|
11542
11542
|
];
|
|
@@ -11847,7 +11847,7 @@ var lowOrderMatrix = {
|
|
|
11847
11847
|
seconds: {
|
|
11848
11848
|
milliseconds: 1000
|
|
11849
11849
|
}
|
|
11850
|
-
}, casualMatrix = _object_spread$
|
|
11850
|
+
}, casualMatrix = _object_spread$3({
|
|
11851
11851
|
years: {
|
|
11852
11852
|
quarters: 4,
|
|
11853
11853
|
months: 12,
|
|
@@ -11875,7 +11875,7 @@ var lowOrderMatrix = {
|
|
|
11875
11875
|
seconds: 30 * 24 * 60 * 60,
|
|
11876
11876
|
milliseconds: 30 * 24 * 60 * 60 * 1000
|
|
11877
11877
|
}
|
|
11878
|
-
}, lowOrderMatrix), daysInYearAccurate = 146097.0 / 400, daysInMonthAccurate = 146097.0 / 4800, accurateMatrix = _object_spread$
|
|
11878
|
+
}, lowOrderMatrix), daysInYearAccurate = 146097.0 / 400, daysInMonthAccurate = 146097.0 / 4800, accurateMatrix = _object_spread$3({
|
|
11879
11879
|
years: {
|
|
11880
11880
|
quarters: 4,
|
|
11881
11881
|
months: 12,
|
|
@@ -11922,7 +11922,7 @@ function clone$1(dur, alts) {
|
|
|
11922
11922
|
var clear = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false;
|
|
11923
11923
|
// deep merge for vals
|
|
11924
11924
|
var conf = {
|
|
11925
|
-
values: clear ? alts.values : _object_spread$
|
|
11925
|
+
values: clear ? alts.values : _object_spread$3({}, dur.values, alts.values || {}),
|
|
11926
11926
|
loc: dur.loc.clone(alts.loc),
|
|
11927
11927
|
conversionAccuracy: alts.conversionAccuracy || dur.conversionAccuracy,
|
|
11928
11928
|
matrix: alts.matrix || dur.matrix
|
|
@@ -12121,7 +12121,7 @@ function removeZeroes(vals) {
|
|
|
12121
12121
|
value: function toFormat(fmt) {
|
|
12122
12122
|
var opts = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
12123
12123
|
// reverse-compat since 1.2; we always round down now, never up, and we do it by default
|
|
12124
|
-
var fmtOpts = _object_spread_props$
|
|
12124
|
+
var fmtOpts = _object_spread_props$2(_object_spread$3({}, opts), {
|
|
12125
12125
|
floor: opts.round !== false && opts.floor !== false
|
|
12126
12126
|
});
|
|
12127
12127
|
return this.isValid ? Formatter.create(this.loc, fmtOpts).formatDurationFromString(this, fmt) : INVALID$2;
|
|
@@ -12154,7 +12154,7 @@ function removeZeroes(vals) {
|
|
|
12154
12154
|
if (isUndefined$2(val) || val === 0 && !showZeros) {
|
|
12155
12155
|
return null;
|
|
12156
12156
|
}
|
|
12157
|
-
return _this.loc.numberFormatter(_object_spread_props$
|
|
12157
|
+
return _this.loc.numberFormatter(_object_spread_props$2(_object_spread$3({
|
|
12158
12158
|
style: "unit",
|
|
12159
12159
|
unitDisplay: "long"
|
|
12160
12160
|
}, opts), {
|
|
@@ -12163,7 +12163,7 @@ function removeZeroes(vals) {
|
|
|
12163
12163
|
}).filter(function(n) {
|
|
12164
12164
|
return n;
|
|
12165
12165
|
});
|
|
12166
|
-
return this.loc.listFormatter(_object_spread$
|
|
12166
|
+
return this.loc.listFormatter(_object_spread$3({
|
|
12167
12167
|
type: "conjunction",
|
|
12168
12168
|
style: opts.listStyle || "narrow"
|
|
12169
12169
|
}, opts)).format(l);
|
|
@@ -12177,7 +12177,7 @@ function removeZeroes(vals) {
|
|
|
12177
12177
|
*/ key: "toObject",
|
|
12178
12178
|
value: function toObject() {
|
|
12179
12179
|
if (!this.isValid) return {};
|
|
12180
|
-
return _object_spread$
|
|
12180
|
+
return _object_spread$3({}, this.values);
|
|
12181
12181
|
}
|
|
12182
12182
|
},
|
|
12183
12183
|
{
|
|
@@ -12230,7 +12230,7 @@ function removeZeroes(vals) {
|
|
|
12230
12230
|
if (!this.isValid) return null;
|
|
12231
12231
|
var millis = this.toMillis();
|
|
12232
12232
|
if (millis < 0 || millis >= 86400000) return null;
|
|
12233
|
-
opts = _object_spread_props$
|
|
12233
|
+
opts = _object_spread_props$2(_object_spread$3({
|
|
12234
12234
|
suppressMilliseconds: false,
|
|
12235
12235
|
suppressSeconds: false,
|
|
12236
12236
|
includePrefix: false,
|
|
@@ -12401,7 +12401,7 @@ function removeZeroes(vals) {
|
|
|
12401
12401
|
*/ key: "set",
|
|
12402
12402
|
value: function set(values) {
|
|
12403
12403
|
if (!this.isValid) return this;
|
|
12404
|
-
var mixed = _object_spread$
|
|
12404
|
+
var mixed = _object_spread$3({}, this.values, normalizeObject(values, Duration.normalizeUnit));
|
|
12405
12405
|
return clone$1(this, {
|
|
12406
12406
|
values: mixed
|
|
12407
12407
|
});
|
|
@@ -14012,7 +14012,7 @@ function diff(earlier, later, units, opts) {
|
|
|
14012
14012
|
});
|
|
14013
14013
|
if (lowerOrderUnits.length === 0) {
|
|
14014
14014
|
if (highWater < later) {
|
|
14015
|
-
highWater = cursor.plus(_define_property$
|
|
14015
|
+
highWater = cursor.plus(_define_property$5({}, lowestOrder, 1));
|
|
14016
14016
|
}
|
|
14017
14017
|
if (highWater !== cursor) {
|
|
14018
14018
|
results[lowestOrder] = (results[lowestOrder] || 0) + remainingMillis / (highWater - cursor);
|
|
@@ -14572,7 +14572,7 @@ function clone$2(inst, alts) {
|
|
|
14572
14572
|
loc: inst.loc,
|
|
14573
14573
|
invalid: inst.invalid
|
|
14574
14574
|
};
|
|
14575
|
-
return new DateTime(_object_spread_props$
|
|
14575
|
+
return new DateTime(_object_spread_props$2(_object_spread$3({}, current, alts), {
|
|
14576
14576
|
old: current
|
|
14577
14577
|
}));
|
|
14578
14578
|
}
|
|
@@ -14626,7 +14626,7 @@ function objToTS(obj, offset, zone) {
|
|
|
14626
14626
|
}
|
|
14627
14627
|
// create a new DT instance by adding a duration, adjusting for DSTs
|
|
14628
14628
|
function adjustTime(inst, dur) {
|
|
14629
|
-
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$
|
|
14629
|
+
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), {
|
|
14630
14630
|
year: year,
|
|
14631
14631
|
month: month,
|
|
14632
14632
|
day: Math.min(inst.c.day, daysInMonth(year, month)) + Math.trunc(dur.days) + Math.trunc(dur.weeks) * 7
|
|
@@ -14657,7 +14657,7 @@ function adjustTime(inst, dur) {
|
|
|
14657
14657
|
function parseDataToDateTime(parsed, parsedZone, opts, format, text, specificOffset) {
|
|
14658
14658
|
var setZone = opts.setZone, zone = opts.zone;
|
|
14659
14659
|
if (parsed && Object.keys(parsed).length !== 0 || parsedZone) {
|
|
14660
|
-
var interpretationZone = parsedZone || zone, inst = DateTime.fromObject(parsed, _object_spread_props$
|
|
14660
|
+
var interpretationZone = parsedZone || zone, inst = DateTime.fromObject(parsed, _object_spread_props$2(_object_spread$3({}, opts), {
|
|
14661
14661
|
zone: interpretationZone,
|
|
14662
14662
|
specificOffset: specificOffset
|
|
14663
14663
|
}));
|
|
@@ -15677,11 +15677,11 @@ function lastOpts(argList) {
|
|
|
15677
15677
|
}
|
|
15678
15678
|
var mixed;
|
|
15679
15679
|
if (settingWeekStuff) {
|
|
15680
|
-
mixed = weekToGregorian(_object_spread$
|
|
15680
|
+
mixed = weekToGregorian(_object_spread$3({}, gregorianToWeek(this.c, minDaysInFirstWeek, startOfWeek), normalized), minDaysInFirstWeek, startOfWeek);
|
|
15681
15681
|
} else if (!isUndefined$2(normalized.ordinal)) {
|
|
15682
|
-
mixed = ordinalToGregorian(_object_spread$
|
|
15682
|
+
mixed = ordinalToGregorian(_object_spread$3({}, gregorianToOrdinal(this.c), normalized));
|
|
15683
15683
|
} else {
|
|
15684
|
-
mixed = _object_spread$
|
|
15684
|
+
mixed = _object_spread$3({}, this.toObject(), normalized);
|
|
15685
15685
|
// if we didn't set the day but we ended up on an overflow date,
|
|
15686
15686
|
// use the last day of the right month
|
|
15687
15687
|
if (isUndefined$2(normalized.day)) {
|
|
@@ -15800,7 +15800,7 @@ function lastOpts(argList) {
|
|
|
15800
15800
|
* @return {DateTime}
|
|
15801
15801
|
*/ key: "endOf",
|
|
15802
15802
|
value: function endOf(unit, opts) {
|
|
15803
|
-
return this.isValid ? this.plus(_define_property$
|
|
15803
|
+
return this.isValid ? this.plus(_define_property$5({}, unit, 1)).startOf(unit, opts).minus(1) : this;
|
|
15804
15804
|
}
|
|
15805
15805
|
},
|
|
15806
15806
|
{
|
|
@@ -16128,7 +16128,7 @@ function lastOpts(argList) {
|
|
|
16128
16128
|
value: function toObject() {
|
|
16129
16129
|
var opts = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
16130
16130
|
if (!this.isValid) return {};
|
|
16131
|
-
var base = _object_spread$
|
|
16131
|
+
var base = _object_spread$3({}, this.c);
|
|
16132
16132
|
if (opts.includeConfig) {
|
|
16133
16133
|
base.outputCalendar = this.outputCalendar;
|
|
16134
16134
|
base.numberingSystem = this.loc.numberingSystem;
|
|
@@ -16168,7 +16168,7 @@ function lastOpts(argList) {
|
|
|
16168
16168
|
if (!this.isValid || !otherDateTime.isValid) {
|
|
16169
16169
|
return Duration.invalid("created by diffing an invalid DateTime");
|
|
16170
16170
|
}
|
|
16171
|
-
var durOpts = _object_spread$
|
|
16171
|
+
var durOpts = _object_spread$3({
|
|
16172
16172
|
locale: this.locale,
|
|
16173
16173
|
numberingSystem: this.numberingSystem
|
|
16174
16174
|
}, opts);
|
|
@@ -16272,7 +16272,7 @@ function lastOpts(argList) {
|
|
|
16272
16272
|
units = options.unit;
|
|
16273
16273
|
unit = undefined;
|
|
16274
16274
|
}
|
|
16275
|
-
return diffRelative(base, this.plus(padding), _object_spread_props$
|
|
16275
|
+
return diffRelative(base, this.plus(padding), _object_spread_props$2(_object_spread$3({}, options), {
|
|
16276
16276
|
numeric: "always",
|
|
16277
16277
|
units: units,
|
|
16278
16278
|
unit: unit
|
|
@@ -16298,7 +16298,7 @@ function lastOpts(argList) {
|
|
|
16298
16298
|
if (!this.isValid) return null;
|
|
16299
16299
|
return diffRelative(options.base || DateTime.fromObject({}, {
|
|
16300
16300
|
zone: this.zone
|
|
16301
|
-
}), this, _object_spread_props$
|
|
16301
|
+
}), this, _object_spread_props$2(_object_spread$3({}, options), {
|
|
16302
16302
|
numeric: "auto",
|
|
16303
16303
|
units: [
|
|
16304
16304
|
"years",
|
|
@@ -22566,7 +22566,7 @@ function _create_class$r(Constructor, protoProps, staticProps) {
|
|
|
22566
22566
|
if (staticProps) _defineProperties$r(Constructor, staticProps);
|
|
22567
22567
|
return Constructor;
|
|
22568
22568
|
}
|
|
22569
|
-
function _define_property$
|
|
22569
|
+
function _define_property$4(obj, key, value) {
|
|
22570
22570
|
if (key in obj) {
|
|
22571
22571
|
Object.defineProperty(obj, key, {
|
|
22572
22572
|
value: value,
|
|
@@ -22619,7 +22619,7 @@ function _non_iterable_rest$2() {
|
|
|
22619
22619
|
function _non_iterable_spread$4() {
|
|
22620
22620
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
22621
22621
|
}
|
|
22622
|
-
function _object_spread$
|
|
22622
|
+
function _object_spread$2(target) {
|
|
22623
22623
|
for(var i = 1; i < arguments.length; i++){
|
|
22624
22624
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
22625
22625
|
var ownKeys = Object.keys(source);
|
|
@@ -22629,12 +22629,12 @@ function _object_spread$1(target) {
|
|
|
22629
22629
|
}));
|
|
22630
22630
|
}
|
|
22631
22631
|
ownKeys.forEach(function(key) {
|
|
22632
|
-
_define_property$
|
|
22632
|
+
_define_property$4(target, key, source[key]);
|
|
22633
22633
|
});
|
|
22634
22634
|
}
|
|
22635
22635
|
return target;
|
|
22636
22636
|
}
|
|
22637
|
-
function ownKeys(object, enumerableOnly) {
|
|
22637
|
+
function ownKeys$1(object, enumerableOnly) {
|
|
22638
22638
|
var keys = Object.keys(object);
|
|
22639
22639
|
if (Object.getOwnPropertySymbols) {
|
|
22640
22640
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
@@ -22642,12 +22642,12 @@ function ownKeys(object, enumerableOnly) {
|
|
|
22642
22642
|
}
|
|
22643
22643
|
return keys;
|
|
22644
22644
|
}
|
|
22645
|
-
function _object_spread_props(target, source) {
|
|
22645
|
+
function _object_spread_props$1(target, source) {
|
|
22646
22646
|
source = source != null ? source : {};
|
|
22647
22647
|
if (Object.getOwnPropertyDescriptors) {
|
|
22648
22648
|
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
22649
22649
|
} else {
|
|
22650
|
-
ownKeys(Object(source)).forEach(function(key) {
|
|
22650
|
+
ownKeys$1(Object(source)).forEach(function(key) {
|
|
22651
22651
|
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
22652
22652
|
});
|
|
22653
22653
|
}
|
|
@@ -22840,14 +22840,14 @@ function indent(str, spaces) {
|
|
|
22840
22840
|
var match = parseIdentifier(input, i1, namePart) || namePart && parseAdditionalSymbol(input, i1) || maybeSpace && parseSpaces(input, i1);
|
|
22841
22841
|
// match is required
|
|
22842
22842
|
if (!match) {
|
|
22843
|
-
return
|
|
22843
|
+
return nextMatch = nextMatch1, i = i1, tokens = tokens1, {
|
|
22844
22844
|
v: nextMatch1
|
|
22845
22845
|
};
|
|
22846
22846
|
}
|
|
22847
22847
|
var token = match.token, offset = match.offset;
|
|
22848
22848
|
i1 += offset;
|
|
22849
22849
|
if (token === ' ') {
|
|
22850
|
-
return
|
|
22850
|
+
return nextMatch = nextMatch1, i = i1, tokens = tokens1, "continue";
|
|
22851
22851
|
}
|
|
22852
22852
|
tokens1 = _to_consumable_array$4(tokens1).concat([
|
|
22853
22853
|
token
|
|
@@ -22866,7 +22866,7 @@ function indent(str, spaces) {
|
|
|
22866
22866
|
if (contextKeys.some(function(el) {
|
|
22867
22867
|
return el.startsWith(name);
|
|
22868
22868
|
})) {
|
|
22869
|
-
return
|
|
22869
|
+
return nextMatch = nextMatch1, i = i1, tokens = tokens1, "continue";
|
|
22870
22870
|
}
|
|
22871
22871
|
if (dateTimeIdentifiers.some(function(el) {
|
|
22872
22872
|
return el === name;
|
|
@@ -22885,9 +22885,9 @@ function indent(str, spaces) {
|
|
|
22885
22885
|
if (dateTimeIdentifiers.some(function(el) {
|
|
22886
22886
|
return el.startsWith(name);
|
|
22887
22887
|
})) {
|
|
22888
|
-
return
|
|
22888
|
+
return nextMatch = nextMatch1, i = i1, tokens = tokens1, "continue";
|
|
22889
22889
|
}
|
|
22890
|
-
return
|
|
22890
|
+
return nextMatch = nextMatch1, i = i1, tokens = tokens1, {
|
|
22891
22891
|
v: nextMatch1
|
|
22892
22892
|
};
|
|
22893
22893
|
};
|
|
@@ -22899,7 +22899,7 @@ function indent(str, spaces) {
|
|
|
22899
22899
|
}
|
|
22900
22900
|
}
|
|
22901
22901
|
var _obj;
|
|
22902
|
-
var identifiersMap = (_obj = {}, _define_property$
|
|
22902
|
+
var identifiersMap = (_obj = {}, _define_property$4(_obj, identifier, 'identifier'), _define_property$4(_obj, nameIdentifier, 'nameIdentifier'), _obj);
|
|
22903
22903
|
var identifiers = new ExternalTokenizer(function(input, stack) {
|
|
22904
22904
|
LOG_PARSE_DEBUG && console.log('%s: T <identifier | nameIdentifier>', input.pos);
|
|
22905
22905
|
var nameMatch = parseName(input, stack.context);
|
|
@@ -22948,11 +22948,11 @@ var insertSemicolon = new ExternalTokenizer(function(input, stack) {
|
|
|
22948
22948
|
}
|
|
22949
22949
|
});
|
|
22950
22950
|
var _obj1;
|
|
22951
|
-
var prefixedContextStarts = (_obj1 = {}, _define_property$
|
|
22951
|
+
var prefixedContextStarts = (_obj1 = {}, _define_property$4(_obj1, functionInvocationStart, 'FunctionInvocation'), _define_property$4(_obj1, filterExpressionStart, 'FilterExpression'), _define_property$4(_obj1, pathExpressionStart, 'PathExpression'), _obj1);
|
|
22952
22952
|
var _obj2;
|
|
22953
|
-
var contextStarts = (_obj2 = {}, _define_property$
|
|
22953
|
+
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);
|
|
22954
22954
|
var _obj3;
|
|
22955
|
-
var contextEnds = (_obj3 = {}, _define_property$
|
|
22955
|
+
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);
|
|
22956
22956
|
/**
|
|
22957
22957
|
* A simple producer that retrievs a value from
|
|
22958
22958
|
* a given context. Used to lazily take things.
|
|
@@ -23040,7 +23040,7 @@ var dateTimeIdentifiers = Object.keys(dateTimeLiterals);
|
|
|
23040
23040
|
*/ key: "set",
|
|
23041
23041
|
value: function set(key, value) {
|
|
23042
23042
|
var constructor = /** @type { typeof VariableContext } */ this.constructor;
|
|
23043
|
-
return constructor.of(_object_spread_props(_object_spread$
|
|
23043
|
+
return constructor.of(_object_spread_props$1(_object_spread$2({}, this.value), _define_property$4({}, key, value)));
|
|
23044
23044
|
}
|
|
23045
23045
|
},
|
|
23046
23046
|
{
|
|
@@ -23104,7 +23104,7 @@ var dateTimeIdentifiers = Object.keys(dateTimeLiterals);
|
|
|
23104
23104
|
if ((typeof context === "undefined" ? "undefined" : _type_of$z(context)) !== 'object') {
|
|
23105
23105
|
return {};
|
|
23106
23106
|
}
|
|
23107
|
-
return _object_spread$
|
|
23107
|
+
return _object_spread$2({}, context);
|
|
23108
23108
|
}
|
|
23109
23109
|
},
|
|
23110
23110
|
{
|
|
@@ -23122,13 +23122,13 @@ var dateTimeIdentifiers = Object.keys(dateTimeLiterals);
|
|
|
23122
23122
|
return reduce$1(this.__unwrap(other), function(merged, value, key) {
|
|
23123
23123
|
if (_instanceof$f(value, ValueProducer)) {
|
|
23124
23124
|
// keep value producers in tact
|
|
23125
|
-
return _object_spread_props(_object_spread$
|
|
23125
|
+
return _object_spread_props$1(_object_spread$2({}, merged), _define_property$4({}, key, value));
|
|
23126
23126
|
}
|
|
23127
23127
|
value = _this.__unwrap(value);
|
|
23128
23128
|
if (has$2(merged, key)) {
|
|
23129
23129
|
value = _this.__merge(_this.__unwrap(merged[key]), value);
|
|
23130
23130
|
}
|
|
23131
|
-
return _object_spread_props(_object_spread$
|
|
23131
|
+
return _object_spread_props$1(_object_spread$2({}, merged), _define_property$4({}, key, value));
|
|
23132
23132
|
}, this.__unwrap(context));
|
|
23133
23133
|
}
|
|
23134
23134
|
}
|
|
@@ -23347,7 +23347,7 @@ var Variables = /*#__PURE__*/ function() {
|
|
|
23347
23347
|
*/ key: "assign",
|
|
23348
23348
|
value: function assign() {
|
|
23349
23349
|
var options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
23350
|
-
return Variables.of(_object_spread$
|
|
23350
|
+
return Variables.of(_object_spread$2({}, this, options));
|
|
23351
23351
|
}
|
|
23352
23352
|
},
|
|
23353
23353
|
{
|
|
@@ -23362,7 +23362,7 @@ var Variables = /*#__PURE__*/ function() {
|
|
|
23362
23362
|
context: this.context,
|
|
23363
23363
|
parent: this.parent
|
|
23364
23364
|
};
|
|
23365
|
-
return Variables.of(_object_spread$
|
|
23365
|
+
return Variables.of(_object_spread$2({}, defaultOptions, options));
|
|
23366
23366
|
}
|
|
23367
23367
|
}
|
|
23368
23368
|
], [
|
|
@@ -23845,7 +23845,7 @@ function _create_class$q(Constructor, protoProps, staticProps) {
|
|
|
23845
23845
|
if (protoProps) _defineProperties$q(Constructor.prototype, protoProps);
|
|
23846
23846
|
return Constructor;
|
|
23847
23847
|
}
|
|
23848
|
-
function _define_property$
|
|
23848
|
+
function _define_property$3(obj, key, value) {
|
|
23849
23849
|
if (key in obj) {
|
|
23850
23850
|
Object.defineProperty(obj, key, {
|
|
23851
23851
|
value: value,
|
|
@@ -25152,7 +25152,7 @@ var builtins = {
|
|
|
25152
25152
|
if (key in context) {
|
|
25153
25153
|
return FALSE;
|
|
25154
25154
|
}
|
|
25155
|
-
return Object.assign(Object.assign({}, context), _define_property$
|
|
25155
|
+
return Object.assign(Object.assign({}, context), _define_property$3({}, entry.key, entry.value));
|
|
25156
25156
|
}, {});
|
|
25157
25157
|
if (context === FALSE) {
|
|
25158
25158
|
return null;
|
|
@@ -25205,7 +25205,7 @@ var builtins = {
|
|
|
25205
25205
|
return null;
|
|
25206
25206
|
}
|
|
25207
25207
|
}
|
|
25208
|
-
return Object.assign(Object.assign({}, context), _define_property$
|
|
25208
|
+
return Object.assign(Object.assign({}, context), _define_property$3({}, key, value));
|
|
25209
25209
|
}
|
|
25210
25210
|
function matches(a, b) {
|
|
25211
25211
|
return a === b;
|
|
@@ -25932,7 +25932,7 @@ function evalNode(node, input, args) {
|
|
|
25932
25932
|
return function(context) {
|
|
25933
25933
|
return args.slice(1, -1).reduce(function(obj, arg) {
|
|
25934
25934
|
var _arg = _sliced_to_array$1(arg(Object.assign(Object.assign({}, context), obj)), 2), key = _arg[0], value = _arg[1];
|
|
25935
|
-
return Object.assign(Object.assign({}, obj), _define_property$
|
|
25935
|
+
return Object.assign(Object.assign({}, obj), _define_property$3({}, key, value));
|
|
25936
25936
|
}, {});
|
|
25937
25937
|
};
|
|
25938
25938
|
case 'FunctionBody':
|
|
@@ -26429,7 +26429,7 @@ function extractValue(context, prop, _target) {
|
|
|
26429
26429
|
'range'
|
|
26430
26430
|
].includes(getType(target))) {
|
|
26431
26431
|
return target.map(function(t) {
|
|
26432
|
-
return _define_property$
|
|
26432
|
+
return _define_property$3({}, prop, t);
|
|
26433
26433
|
});
|
|
26434
26434
|
}
|
|
26435
26435
|
return null;
|
|
@@ -42893,7 +42893,7 @@ function _class_call_check$1(instance, Constructor) {
|
|
|
42893
42893
|
throw new TypeError("Cannot call a class as a function");
|
|
42894
42894
|
}
|
|
42895
42895
|
}
|
|
42896
|
-
function _define_property$
|
|
42896
|
+
function _define_property$2(obj, key, value) {
|
|
42897
42897
|
if (key in obj) {
|
|
42898
42898
|
Object.defineProperty(obj, key, {
|
|
42899
42899
|
value: value,
|
|
@@ -42973,7 +42973,7 @@ var CelParser = /*#__PURE__*/ function(CstParser) {
|
|
|
42973
42973
|
_class_call_check$1(this, CelParser);
|
|
42974
42974
|
var _this;
|
|
42975
42975
|
_this = _super.call(this, allTokens);
|
|
42976
|
-
_define_property$
|
|
42976
|
+
_define_property$2(_assert_this_initialized$1(_this), "expr", _this.RULE('expr', function() {
|
|
42977
42977
|
_this.SUBRULE(_this.conditionalOr, {
|
|
42978
42978
|
LABEL: 'conditionalOr'
|
|
42979
42979
|
});
|
|
@@ -42988,7 +42988,7 @@ var CelParser = /*#__PURE__*/ function(CstParser) {
|
|
|
42988
42988
|
});
|
|
42989
42989
|
});
|
|
42990
42990
|
}));
|
|
42991
|
-
_define_property$
|
|
42991
|
+
_define_property$2(_assert_this_initialized$1(_this), "conditionalAnd", _this.RULE('conditionalAnd', function() {
|
|
42992
42992
|
_this.SUBRULE(_this.relation, {
|
|
42993
42993
|
LABEL: 'lhs'
|
|
42994
42994
|
});
|
|
@@ -42999,7 +42999,7 @@ var CelParser = /*#__PURE__*/ function(CstParser) {
|
|
|
42999
42999
|
});
|
|
43000
43000
|
});
|
|
43001
43001
|
}));
|
|
43002
|
-
_define_property$
|
|
43002
|
+
_define_property$2(_assert_this_initialized$1(_this), "conditionalOr", _this.RULE('conditionalOr', function() {
|
|
43003
43003
|
_this.SUBRULE(_this.conditionalAnd, {
|
|
43004
43004
|
LABEL: 'lhs'
|
|
43005
43005
|
});
|
|
@@ -43010,7 +43010,7 @@ var CelParser = /*#__PURE__*/ function(CstParser) {
|
|
|
43010
43010
|
});
|
|
43011
43011
|
});
|
|
43012
43012
|
}));
|
|
43013
|
-
_define_property$
|
|
43013
|
+
_define_property$2(_assert_this_initialized$1(_this), "relation", _this.RULE('relation', function() {
|
|
43014
43014
|
_this.SUBRULE(_this.addition, {
|
|
43015
43015
|
LABEL: 'lhs'
|
|
43016
43016
|
});
|
|
@@ -43021,7 +43021,7 @@ var CelParser = /*#__PURE__*/ function(CstParser) {
|
|
|
43021
43021
|
});
|
|
43022
43022
|
});
|
|
43023
43023
|
}));
|
|
43024
|
-
_define_property$
|
|
43024
|
+
_define_property$2(_assert_this_initialized$1(_this), "addition", _this.RULE('addition', function() {
|
|
43025
43025
|
_this.SUBRULE(_this.multiplication, {
|
|
43026
43026
|
LABEL: 'lhs'
|
|
43027
43027
|
});
|
|
@@ -43032,7 +43032,7 @@ var CelParser = /*#__PURE__*/ function(CstParser) {
|
|
|
43032
43032
|
});
|
|
43033
43033
|
});
|
|
43034
43034
|
}));
|
|
43035
|
-
_define_property$
|
|
43035
|
+
_define_property$2(_assert_this_initialized$1(_this), "multiplication", _this.RULE('multiplication', function() {
|
|
43036
43036
|
_this.SUBRULE(_this.unaryExpression, {
|
|
43037
43037
|
LABEL: 'lhs'
|
|
43038
43038
|
});
|
|
@@ -43043,13 +43043,13 @@ var CelParser = /*#__PURE__*/ function(CstParser) {
|
|
|
43043
43043
|
});
|
|
43044
43044
|
});
|
|
43045
43045
|
}));
|
|
43046
|
-
_define_property$
|
|
43046
|
+
_define_property$2(_assert_this_initialized$1(_this), "unaryExpression", _this.RULE('unaryExpression', function() {
|
|
43047
43047
|
_this.MANY(function() {
|
|
43048
43048
|
_this.CONSUME(UnaryOperator);
|
|
43049
43049
|
});
|
|
43050
43050
|
_this.SUBRULE(_this.atomicExpression);
|
|
43051
43051
|
}));
|
|
43052
|
-
_define_property$
|
|
43052
|
+
_define_property$2(_assert_this_initialized$1(_this), "parenthesisExpression", _this.RULE('parenthesisExpression', function() {
|
|
43053
43053
|
_this.CONSUME(OpenParenthesis, {
|
|
43054
43054
|
LABEL: 'open'
|
|
43055
43055
|
});
|
|
@@ -43058,7 +43058,7 @@ var CelParser = /*#__PURE__*/ function(CstParser) {
|
|
|
43058
43058
|
LABEL: 'close'
|
|
43059
43059
|
});
|
|
43060
43060
|
}));
|
|
43061
|
-
_define_property$
|
|
43061
|
+
_define_property$2(_assert_this_initialized$1(_this), "listExpression", _this.RULE('listExpression', function() {
|
|
43062
43062
|
_this.CONSUME(OpenBracket);
|
|
43063
43063
|
_this.OPTION(function() {
|
|
43064
43064
|
_this.SUBRULE(_this.expr, {
|
|
@@ -43078,7 +43078,7 @@ var CelParser = /*#__PURE__*/ function(CstParser) {
|
|
|
43078
43078
|
});
|
|
43079
43079
|
});
|
|
43080
43080
|
}));
|
|
43081
|
-
_define_property$
|
|
43081
|
+
_define_property$2(_assert_this_initialized$1(_this), "mapExpression", _this.RULE('mapExpression', function() {
|
|
43082
43082
|
_this.CONSUME(OpenCurlyBracket);
|
|
43083
43083
|
_this.MANY(function() {
|
|
43084
43084
|
_this.SUBRULE(_this.mapKeyValues, {
|
|
@@ -43103,7 +43103,7 @@ var CelParser = /*#__PURE__*/ function(CstParser) {
|
|
|
43103
43103
|
]);
|
|
43104
43104
|
});
|
|
43105
43105
|
}));
|
|
43106
|
-
_define_property$
|
|
43106
|
+
_define_property$2(_assert_this_initialized$1(_this), "mapKeyValues", _this.RULE('mapKeyValues', function() {
|
|
43107
43107
|
_this.SUBRULE(_this.expr, {
|
|
43108
43108
|
LABEL: 'key'
|
|
43109
43109
|
});
|
|
@@ -43115,7 +43115,7 @@ var CelParser = /*#__PURE__*/ function(CstParser) {
|
|
|
43115
43115
|
_this.CONSUME(Comma);
|
|
43116
43116
|
});
|
|
43117
43117
|
}));
|
|
43118
|
-
_define_property$
|
|
43118
|
+
_define_property$2(_assert_this_initialized$1(_this), "macrosExpression", _this.RULE('macrosExpression', function() {
|
|
43119
43119
|
_this.CONSUME(Identifier);
|
|
43120
43120
|
_this.CONSUME(OpenParenthesis);
|
|
43121
43121
|
_this.OPTION(function() {
|
|
@@ -43131,7 +43131,7 @@ var CelParser = /*#__PURE__*/ function(CstParser) {
|
|
|
43131
43131
|
});
|
|
43132
43132
|
_this.CONSUME(CloseParenthesis);
|
|
43133
43133
|
}));
|
|
43134
|
-
_define_property$
|
|
43134
|
+
_define_property$2(_assert_this_initialized$1(_this), "identifierExpression", _this.RULE('identifierExpression', function() {
|
|
43135
43135
|
_this.CONSUME(Identifier);
|
|
43136
43136
|
_this.MANY(function() {
|
|
43137
43137
|
_this.OR([
|
|
@@ -43150,7 +43150,7 @@ var CelParser = /*#__PURE__*/ function(CstParser) {
|
|
|
43150
43150
|
]);
|
|
43151
43151
|
});
|
|
43152
43152
|
}));
|
|
43153
|
-
_define_property$
|
|
43153
|
+
_define_property$2(_assert_this_initialized$1(_this), "identifierDotExpression", _this.RULE('identifierDotExpression', function() {
|
|
43154
43154
|
_this.CONSUME(Dot);
|
|
43155
43155
|
_this.CONSUME(Identifier);
|
|
43156
43156
|
// Optional method call with arguments (for collection macros)
|
|
@@ -43170,12 +43170,12 @@ var CelParser = /*#__PURE__*/ function(CstParser) {
|
|
|
43170
43170
|
_this.CONSUME(CloseParenthesis);
|
|
43171
43171
|
});
|
|
43172
43172
|
}));
|
|
43173
|
-
_define_property$
|
|
43173
|
+
_define_property$2(_assert_this_initialized$1(_this), "indexExpression", _this.RULE('indexExpression', function() {
|
|
43174
43174
|
_this.CONSUME(OpenBracket);
|
|
43175
43175
|
_this.SUBRULE(_this.expr);
|
|
43176
43176
|
_this.CONSUME(CloseBracket);
|
|
43177
43177
|
}));
|
|
43178
|
-
_define_property$
|
|
43178
|
+
_define_property$2(_assert_this_initialized$1(_this), "atomicExpression", _this.RULE('atomicExpression', function() {
|
|
43179
43179
|
_this.OR([
|
|
43180
43180
|
{
|
|
43181
43181
|
ALT: function() {
|
|
@@ -43284,7 +43284,7 @@ function _create_class(Constructor, protoProps, staticProps) {
|
|
|
43284
43284
|
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
43285
43285
|
return Constructor;
|
|
43286
43286
|
}
|
|
43287
|
-
function _define_property(obj, key, value) {
|
|
43287
|
+
function _define_property$1(obj, key, value) {
|
|
43288
43288
|
if (key in obj) {
|
|
43289
43289
|
Object.defineProperty(obj, key, {
|
|
43290
43290
|
value: value,
|
|
@@ -43356,7 +43356,7 @@ function _non_iterable_rest() {
|
|
|
43356
43356
|
function _non_iterable_spread() {
|
|
43357
43357
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
43358
43358
|
}
|
|
43359
|
-
function _object_spread(target) {
|
|
43359
|
+
function _object_spread$1(target) {
|
|
43360
43360
|
for(var i = 1; i < arguments.length; i++){
|
|
43361
43361
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
43362
43362
|
var ownKeys = Object.keys(source);
|
|
@@ -43366,7 +43366,7 @@ function _object_spread(target) {
|
|
|
43366
43366
|
}));
|
|
43367
43367
|
}
|
|
43368
43368
|
ownKeys.forEach(function(key) {
|
|
43369
|
-
_define_property(target, key, source[key]);
|
|
43369
|
+
_define_property$1(target, key, source[key]);
|
|
43370
43370
|
});
|
|
43371
43371
|
}
|
|
43372
43372
|
return target;
|
|
@@ -43452,13 +43452,13 @@ var CelVisitor = /*#__PURE__*/ function(BaseCelVisitor) {
|
|
|
43452
43452
|
_class_call_check(this, CelVisitor);
|
|
43453
43453
|
var _this;
|
|
43454
43454
|
_this = _super.call(this);
|
|
43455
|
-
_define_property(_assert_this_initialized(_this), "context", void 0);
|
|
43455
|
+
_define_property$1(_assert_this_initialized(_this), "context", void 0);
|
|
43456
43456
|
/**
|
|
43457
43457
|
* Tracks the current mode of the visitor to handle special cases.
|
|
43458
|
-
*/ _define_property(_assert_this_initialized(_this), "mode", Mode.normal);
|
|
43459
|
-
_define_property(_assert_this_initialized(_this), "functions", void 0);
|
|
43458
|
+
*/ _define_property$1(_assert_this_initialized(_this), "mode", Mode.normal);
|
|
43459
|
+
_define_property$1(_assert_this_initialized(_this), "functions", void 0);
|
|
43460
43460
|
_this.context = context || {};
|
|
43461
|
-
_this.functions = _object_spread({}, defaultFunctions, functions || {});
|
|
43461
|
+
_this.functions = _object_spread$1({}, defaultFunctions, functions || {});
|
|
43462
43462
|
_this.validateVisitor();
|
|
43463
43463
|
return _this;
|
|
43464
43464
|
}
|
|
@@ -44199,6 +44199,198 @@ function evaluate(expression, context, functions) {
|
|
|
44199
44199
|
}
|
|
44200
44200
|
return toAstVisitorInstance.visit(result.cst);
|
|
44201
44201
|
}
|
|
44202
|
+
// Latin-1 Supplement
|
|
44203
|
+
// upper case ranges
|
|
44204
|
+
// [À-ÖØ-ß]
|
|
44205
|
+
// lower case ranges
|
|
44206
|
+
// [à-öø-ÿ]
|
|
44207
|
+
var magicSplit = /^[a-zà-öø-ÿа-я]+|[A-ZÀ-ÖØ-ßА-Я][a-zà-öø-ÿа-я]+|[a-zà-öø-ÿа-я]+|[0-9]+|[A-ZÀ-ÖØ-ßА-Я]+(?![a-zà-öø-ÿа-я])/g;
|
|
44208
|
+
var spaceSplit = /\S+/g;
|
|
44209
|
+
/**
|
|
44210
|
+
* A string.matchAll function that will return an array of "string parts" and the indexes at which it split each part
|
|
44211
|
+
*/ function getPartsAndIndexes(string, splitRegex) {
|
|
44212
|
+
var result = {
|
|
44213
|
+
parts: [],
|
|
44214
|
+
prefixes: []
|
|
44215
|
+
};
|
|
44216
|
+
var matches = string.matchAll(splitRegex);
|
|
44217
|
+
var lastWordEndIndex = 0;
|
|
44218
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
44219
|
+
try {
|
|
44220
|
+
for(var _iterator = matches[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
44221
|
+
var match = _step.value;
|
|
44222
|
+
if (typeof match.index !== 'number') continue;
|
|
44223
|
+
var word = match[0];
|
|
44224
|
+
result.parts.push(word);
|
|
44225
|
+
var prefix = string.slice(lastWordEndIndex, match.index).trim();
|
|
44226
|
+
result.prefixes.push(prefix);
|
|
44227
|
+
lastWordEndIndex = match.index + word.length;
|
|
44228
|
+
}
|
|
44229
|
+
} catch (err) {
|
|
44230
|
+
_didIteratorError = true;
|
|
44231
|
+
_iteratorError = err;
|
|
44232
|
+
} finally{
|
|
44233
|
+
try {
|
|
44234
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
44235
|
+
_iterator.return();
|
|
44236
|
+
}
|
|
44237
|
+
} finally{
|
|
44238
|
+
if (_didIteratorError) {
|
|
44239
|
+
throw _iteratorError;
|
|
44240
|
+
}
|
|
44241
|
+
}
|
|
44242
|
+
}
|
|
44243
|
+
var tail = string.slice(lastWordEndIndex).trim();
|
|
44244
|
+
if (tail) {
|
|
44245
|
+
result.parts.push('');
|
|
44246
|
+
result.prefixes.push(tail);
|
|
44247
|
+
}
|
|
44248
|
+
return result;
|
|
44249
|
+
}
|
|
44250
|
+
/**
|
|
44251
|
+
* A function that splits a string on words and returns an array of words.
|
|
44252
|
+
* - It can prefix each word with a given character
|
|
44253
|
+
* - It can strip or keep special characters, this affects the logic for adding a prefix as well
|
|
44254
|
+
*/ function splitAndPrefix(string, options) {
|
|
44255
|
+
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;
|
|
44256
|
+
var normalString = string.trim().normalize('NFC');
|
|
44257
|
+
var hasSpaces = normalString.includes(' ');
|
|
44258
|
+
var split = hasSpaces ? spaceSplit : magicSplit;
|
|
44259
|
+
var partsAndIndexes = getPartsAndIndexes(normalString, split);
|
|
44260
|
+
return partsAndIndexes.parts.map(function(_part, i) {
|
|
44261
|
+
var foundPrefix = partsAndIndexes.prefixes[i] || '';
|
|
44262
|
+
var part = _part;
|
|
44263
|
+
if (keepSpecialCharacters === false) {
|
|
44264
|
+
if (keep) {
|
|
44265
|
+
part = part.normalize('NFD').replace(new RegExp("[^a-zA-Z\xd8\xdf\xf80-9".concat(keep.join(''), "]"), 'g'), '');
|
|
44266
|
+
}
|
|
44267
|
+
if (!keep) {
|
|
44268
|
+
part = part.normalize('NFD').replace(/[^a-zA-ZØßø0-9]/g, '');
|
|
44269
|
+
foundPrefix = '';
|
|
44270
|
+
}
|
|
44271
|
+
}
|
|
44272
|
+
if (keep && foundPrefix) {
|
|
44273
|
+
foundPrefix = foundPrefix.replace(new RegExp("[^".concat(keep.join(''), "]"), 'g'), '');
|
|
44274
|
+
}
|
|
44275
|
+
// the first word doesn't need a prefix, so only return the found prefix
|
|
44276
|
+
if (i === 0) {
|
|
44277
|
+
// console.log(`foundPrefix → `, foundPrefix)
|
|
44278
|
+
return foundPrefix + part;
|
|
44279
|
+
}
|
|
44280
|
+
if (!foundPrefix && !part) return '';
|
|
44281
|
+
if (!hasSpaces) {
|
|
44282
|
+
// return the found prefix OR fall back to a given prefix
|
|
44283
|
+
return (foundPrefix || prefix) + part;
|
|
44284
|
+
}
|
|
44285
|
+
// space based sentence was split on spaces, so only return found prefixes
|
|
44286
|
+
if (!foundPrefix && prefix.match(/\s/)) {
|
|
44287
|
+
// in this case we have no more found prefix, it was trimmed, but we're looking to add a space
|
|
44288
|
+
// so let's return that space
|
|
44289
|
+
return ' ' + part;
|
|
44290
|
+
}
|
|
44291
|
+
return (foundPrefix || prefix) + part;
|
|
44292
|
+
}).filter(Boolean);
|
|
44293
|
+
}
|
|
44294
|
+
/**
|
|
44295
|
+
* Capitalises a single word
|
|
44296
|
+
* @returns the word with the first character in uppercase and the rest in lowercase
|
|
44297
|
+
*/ function capitaliseWord(string) {
|
|
44298
|
+
var match = string.matchAll(magicSplit).next().value;
|
|
44299
|
+
var firstLetterIndex = match ? match.index : 0;
|
|
44300
|
+
return string.slice(0, firstLetterIndex + 1).toUpperCase() + string.slice(firstLetterIndex + 1).toLowerCase();
|
|
44301
|
+
}
|
|
44302
|
+
function _define_property(obj, key, value) {
|
|
44303
|
+
if (key in obj) {
|
|
44304
|
+
Object.defineProperty(obj, key, {
|
|
44305
|
+
value: value,
|
|
44306
|
+
enumerable: true,
|
|
44307
|
+
configurable: true,
|
|
44308
|
+
writable: true
|
|
44309
|
+
});
|
|
44310
|
+
} else {
|
|
44311
|
+
obj[key] = value;
|
|
44312
|
+
}
|
|
44313
|
+
return obj;
|
|
44314
|
+
}
|
|
44315
|
+
function _object_spread(target) {
|
|
44316
|
+
for(var i = 1; i < arguments.length; i++){
|
|
44317
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
44318
|
+
var ownKeys = Object.keys(source);
|
|
44319
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
44320
|
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
44321
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
44322
|
+
}));
|
|
44323
|
+
}
|
|
44324
|
+
ownKeys.forEach(function(key) {
|
|
44325
|
+
_define_property(target, key, source[key]);
|
|
44326
|
+
});
|
|
44327
|
+
}
|
|
44328
|
+
return target;
|
|
44329
|
+
}
|
|
44330
|
+
function ownKeys(object, enumerableOnly) {
|
|
44331
|
+
var keys = Object.keys(object);
|
|
44332
|
+
if (Object.getOwnPropertySymbols) {
|
|
44333
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
44334
|
+
keys.push.apply(keys, symbols);
|
|
44335
|
+
}
|
|
44336
|
+
return keys;
|
|
44337
|
+
}
|
|
44338
|
+
function _object_spread_props(target, source) {
|
|
44339
|
+
source = source != null ? source : {};
|
|
44340
|
+
if (Object.getOwnPropertyDescriptors) {
|
|
44341
|
+
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
44342
|
+
} else {
|
|
44343
|
+
ownKeys(Object(source)).forEach(function(key) {
|
|
44344
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
44345
|
+
});
|
|
44346
|
+
}
|
|
44347
|
+
return target;
|
|
44348
|
+
}
|
|
44349
|
+
/**
|
|
44350
|
+
* # 🐪 camelCase
|
|
44351
|
+
* converts a string to camelCase
|
|
44352
|
+
* - first lowercase then all capitalised
|
|
44353
|
+
* - *strips away* special characters by default
|
|
44354
|
+
*
|
|
44355
|
+
* @example
|
|
44356
|
+
* camelCase('$catDog') === 'catDog'
|
|
44357
|
+
* @example
|
|
44358
|
+
* camelCase('$catDog', { keepSpecialCharacters: true }) === '$catDog'
|
|
44359
|
+
*/ function camelCase(string, options) {
|
|
44360
|
+
return splitAndPrefix(string, options).reduce(function(result, word, index) {
|
|
44361
|
+
return index === 0 || !(word[0] || '').match(magicSplit) ? result + word.toLowerCase() : result + capitaliseWord(word);
|
|
44362
|
+
}, '');
|
|
44363
|
+
}
|
|
44364
|
+
/**
|
|
44365
|
+
* # 🥙 kebab-case
|
|
44366
|
+
* converts a string to kebab-case
|
|
44367
|
+
* - hyphenated lowercase
|
|
44368
|
+
* - *strips away* special characters by default
|
|
44369
|
+
*
|
|
44370
|
+
* @example
|
|
44371
|
+
* kebabCase('$catDog') === 'cat-dog'
|
|
44372
|
+
* @example
|
|
44373
|
+
* kebabCase('$catDog', { keepSpecialCharacters: true }) === '$cat-dog'
|
|
44374
|
+
*/ function kebabCase(string, options) {
|
|
44375
|
+
return splitAndPrefix(string, _object_spread_props(_object_spread({}, options), {
|
|
44376
|
+
prefix: '-'
|
|
44377
|
+
})).join('').toLowerCase();
|
|
44378
|
+
}
|
|
44379
|
+
/**
|
|
44380
|
+
* # 🐍 snake_case
|
|
44381
|
+
* converts a string to snake_case
|
|
44382
|
+
* - underscored lowercase
|
|
44383
|
+
* - *strips away* special characters by default
|
|
44384
|
+
*
|
|
44385
|
+
* @example
|
|
44386
|
+
* snakeCase('$catDog') === 'cat_dog'
|
|
44387
|
+
* @example
|
|
44388
|
+
* snakeCase('$catDog', { keepSpecialCharacters: true }) === '$cat_dog'
|
|
44389
|
+
*/ function snakeCase(string, options) {
|
|
44390
|
+
return splitAndPrefix(string, _object_spread_props(_object_spread({}, options), {
|
|
44391
|
+
prefix: '_'
|
|
44392
|
+
})).join('').toLowerCase();
|
|
44393
|
+
}
|
|
44202
44394
|
const Handlebars = handlebars_min || HandlebarsNamespace;
|
|
44203
44395
|
Handlebars.registerHelper('JSONstringify', function(value) {
|
|
44204
44396
|
return JSON.stringify(value);
|
|
@@ -44213,7 +44405,10 @@ const DIGIPAIR_FUNCTIONS = {
|
|
|
44213
44405
|
encodeUTF8: (value)=>Array.from(new TextEncoder().encode(value)).map((b)=>String.fromCharCode(b)).join(''),
|
|
44214
44406
|
decodeUTF8: (value)=>new TextDecoder().decode(new Uint8Array(Array.from(value).map((c)=>c.charCodeAt(0)))),
|
|
44215
44407
|
JSONparse: (value)=>JSON.parse(value),
|
|
44216
|
-
JSONstringify: (value)=>JSON.stringify(value)
|
|
44408
|
+
JSONstringify: (value)=>JSON.stringify(value),
|
|
44409
|
+
camelCase: (value)=>camelCase(value),
|
|
44410
|
+
kebabCase: (value)=>kebabCase(value),
|
|
44411
|
+
snakeCase: (value)=>snakeCase(value)
|
|
44217
44412
|
};
|
|
44218
44413
|
const globalInstance = typeof window === 'undefined' ? global : window;
|
|
44219
44414
|
const _config = globalInstance.__DIGIPAIR_CONFIG__ = globalInstance.__DIGIPAIR_CONFIG__ ?? {
|