@getodk/xpath 0.2.0 → 0.2.1
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/.vite/manifest.json +4 -4
- package/dist/context/Context.d.ts +0 -1
- package/dist/context/EvaluationContext.d.ts +0 -1
- package/dist/evaluations/BooleanEvaluation.d.ts +0 -1
- package/dist/evaluations/DateTimeLikeEvaluation.d.ts +0 -1
- package/dist/evaluations/Evaluation.d.ts +0 -1
- package/dist/evaluations/LocationPathEvaluation.d.ts +0 -1
- package/dist/evaluations/NodeEvaluation.d.ts +0 -1
- package/dist/evaluations/NumberEvaluation.d.ts +0 -1
- package/dist/evaluations/StringEvaluation.d.ts +0 -1
- package/dist/evaluations/ValueEvaluation.d.ts +0 -1
- package/dist/evaluator/Evaluator.d.ts +0 -1
- package/dist/evaluator/NamespaceResolver.d.ts +0 -1
- package/dist/evaluator/expression/AbsoluteLocationPathExpressionEvaluator.d.ts +0 -1
- package/dist/evaluator/expression/BinaryExpressionEvaluator.d.ts +0 -1
- package/dist/evaluator/expression/BooleanBinaryExpressionEvaluator.d.ts +0 -1
- package/dist/evaluator/expression/ExpressionEvaluator.d.ts +0 -1
- package/dist/evaluator/expression/FilterPathExpressionEvaluator.d.ts +0 -1
- package/dist/evaluator/expression/FunctionCallExpressionEvaluator.d.ts +0 -1
- package/dist/evaluator/expression/LocationPathEvaluator.d.ts +0 -1
- package/dist/evaluator/expression/LocationPathExpressionEvaluator.d.ts +0 -1
- package/dist/evaluator/expression/NumberExpressionEvaluator.d.ts +0 -1
- package/dist/evaluator/expression/NumberLiteralExpressionEvaluator.d.ts +0 -1
- package/dist/evaluator/expression/NumericBinaryExpressionEvaluator.d.ts +0 -1
- package/dist/evaluator/expression/RelativeLocationPathExpressionEvaluator.d.ts +0 -1
- package/dist/evaluator/expression/StringExpressionEvaluator.d.ts +0 -1
- package/dist/evaluator/expression/StringLiteralExpressionEvaluator.d.ts +0 -1
- package/dist/evaluator/expression/UnaryExpressionEvaluator.d.ts +0 -1
- package/dist/evaluator/expression/UnionExpressionEvaluator.d.ts +0 -1
- package/dist/evaluator/expression/factory.d.ts +0 -1
- package/dist/evaluator/functions/BooleanFunction.d.ts +0 -1
- package/dist/evaluator/functions/FunctionAlias.d.ts +0 -1
- package/dist/evaluator/functions/FunctionImplementation.d.ts +0 -1
- package/dist/evaluator/functions/FunctionLibrary.d.ts +0 -1
- package/dist/evaluator/functions/FunctionLibraryCollection.d.ts +0 -1
- package/dist/evaluator/functions/NodeSetFunction.d.ts +0 -1
- package/dist/evaluator/functions/NumberFunction.d.ts +0 -1
- package/dist/evaluator/functions/StringFunction.d.ts +0 -1
- package/dist/evaluator/functions/TypedFunctionImplementation.d.ts +0 -1
- package/dist/evaluator/result/BooleanResult.d.ts +0 -1
- package/dist/evaluator/result/NodeSetResult.d.ts +0 -1
- package/dist/evaluator/result/NumberResult.d.ts +0 -1
- package/dist/evaluator/result/PrimitiveResult.d.ts +0 -1
- package/dist/evaluator/result/StringResult.d.ts +0 -1
- package/dist/evaluator/result/index.d.ts +0 -1
- package/dist/evaluator/step/Step.d.ts +0 -1
- package/dist/expressionParser-BVz9yCmv.js +3482 -0
- package/dist/expressionParser-BVz9yCmv.js.map +1 -0
- package/dist/expressionParser.d.ts +0 -1
- package/dist/expressionParser.js +1 -1
- package/dist/functions/_shared/number.d.ts +0 -1
- package/dist/functions/_shared/string.d.ts +0 -1
- package/dist/functions/enketo/index.d.ts +0 -1
- package/dist/functions/fn/boolean.d.ts +0 -1
- package/dist/functions/fn/index.d.ts +0 -1
- package/dist/functions/fn/node-set.d.ts +0 -1
- package/dist/functions/fn/number.d.ts +0 -1
- package/dist/functions/fn/string.d.ts +0 -1
- package/dist/functions/javarosa/index.d.ts +0 -1
- package/dist/functions/javarosa/string.d.ts +0 -1
- package/dist/functions/xforms/boolean.d.ts +0 -1
- package/dist/functions/xforms/datetime.d.ts +0 -1
- package/dist/functions/xforms/geo.d.ts +0 -1
- package/dist/functions/xforms/index.d.ts +0 -1
- package/dist/functions/xforms/node-set.d.ts +0 -1
- package/dist/functions/xforms/number.d.ts +0 -1
- package/dist/functions/xforms/select.d.ts +0 -1
- package/dist/functions/xforms/string.d.ts +0 -1
- package/dist/index.js +268 -275
- package/dist/index.js.map +1 -1
- package/dist/lib/datetime/coercion.d.ts +0 -1
- package/dist/lib/datetime/functions.d.ts +0 -1
- package/dist/lib/dom/assertions.d.ts +0 -1
- package/dist/lib/dom/predicates.d.ts +0 -1
- package/dist/lib/dom/traversal.d.ts +0 -1
- package/dist/static/grammar/ExpressionParser.d.ts +0 -1
- package/dist/static/grammar/SyntaxLanguage.d.ts +0 -1
- package/dist/static/grammar/SyntaxNode.d.ts +0 -1
- package/dist/static/grammar/SyntaxTree.d.ts +0 -1
- package/dist/static/grammar/TreeSitterXPathParser.d.ts +0 -1
- package/dist/static/grammar/type-names.d.ts +0 -1
- package/dist/xforms/XFormsItextTranslations.d.ts +0 -1
- package/dist/xforms/XFormsXPathEvaluator.d.ts +0 -1
- package/package.json +11 -11
- package/dist/expressionParser-BRkDdCO9.js +0 -2127
- package/dist/expressionParser-BRkDdCO9.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as commonjsGlobal, U as UpsertableMap, e as expressionParser, g as getAugmentedNamespace, a as getDefaultExportFromCjs } from './expressionParser-
|
|
1
|
+
import { c as commonjsGlobal, U as UpsertableMap, e as expressionParser, g as getAugmentedNamespace, a as getDefaultExportFromCjs } from './expressionParser-BVz9yCmv.js';
|
|
2
2
|
|
|
3
3
|
function _mergeNamespaces(n, m) {
|
|
4
4
|
for (var i = 0; i < m.length; i++) {
|
|
@@ -387,13 +387,13 @@ function ParseTemporalYearMonthString(e) {
|
|
|
387
387
|
if (void 0 !== n && "iso8601" !== n) throw new RangeError("YYYY-MM format is only valid with iso8601 calendar");
|
|
388
388
|
} else {
|
|
389
389
|
let t;
|
|
390
|
-
if (
|
|
390
|
+
if ({
|
|
391
391
|
year: r,
|
|
392
392
|
month: o,
|
|
393
393
|
calendar: n,
|
|
394
394
|
day: a,
|
|
395
395
|
z: t
|
|
396
|
-
} = ParseISODateTime(e)
|
|
396
|
+
} = ParseISODateTime(e), t) throw new RangeError("Z designator not supported for PlainYearMonth");
|
|
397
397
|
}
|
|
398
398
|
return {
|
|
399
399
|
year: r,
|
|
@@ -412,13 +412,13 @@ function ParseTemporalMonthDayString(e) {
|
|
|
412
412
|
if (void 0 !== n && "iso8601" !== n) throw new RangeError("MM-DD format is only valid with iso8601 calendar");
|
|
413
413
|
} else {
|
|
414
414
|
let t;
|
|
415
|
-
if (
|
|
415
|
+
if ({
|
|
416
416
|
month: r,
|
|
417
417
|
day: o,
|
|
418
418
|
calendar: n,
|
|
419
419
|
year: a,
|
|
420
420
|
z: t
|
|
421
|
-
} = ParseISODateTime(e)
|
|
421
|
+
} = ParseISODateTime(e), t) throw new RangeError("Z designator not supported for PlainMonthDay");
|
|
422
422
|
}
|
|
423
423
|
return {
|
|
424
424
|
month: r,
|
|
@@ -799,7 +799,7 @@ function ToRelativeTemporalObject(e) {
|
|
|
799
799
|
e.push("timeZone", "offset");
|
|
800
800
|
const p = PrepareTemporalFields(t, e, []),
|
|
801
801
|
f = Te(null);
|
|
802
|
-
f.overflow = "constrain",
|
|
802
|
+
f.overflow = "constrain", {
|
|
803
803
|
year: r,
|
|
804
804
|
month: o,
|
|
805
805
|
day: n,
|
|
@@ -809,10 +809,10 @@ function ToRelativeTemporalObject(e) {
|
|
|
809
809
|
millisecond: l,
|
|
810
810
|
microsecond: d,
|
|
811
811
|
nanosecond: m
|
|
812
|
-
} = InterpretTemporalDateTimeFields(c, p, f)
|
|
812
|
+
} = InterpretTemporalDateTimeFields(c, p, f), u = p.offset, void 0 === u && (T = "wall"), h = p.timeZone, void 0 !== h && (h = ToTemporalTimeZoneSlotValue(h));
|
|
813
813
|
} else {
|
|
814
814
|
let e, f;
|
|
815
|
-
if (
|
|
815
|
+
if ({
|
|
816
816
|
year: r,
|
|
817
817
|
month: o,
|
|
818
818
|
day: n,
|
|
@@ -826,7 +826,7 @@ function ToRelativeTemporalObject(e) {
|
|
|
826
826
|
ianaName: e,
|
|
827
827
|
offset: u,
|
|
828
828
|
z: f
|
|
829
|
-
} = ParseISODateTime(ToString(t))
|
|
829
|
+
} = ParseISODateTime(ToString(t)), e) h = ToTemporalTimeZoneSlotValue(e), f ? T = "exact" : u || (T = "wall"), p = !0;else if (f) throw new RangeError("Z designator not supported for PlainDate relativeTo; either remove the Z or add a bracketed time zone");
|
|
830
830
|
if (c || (c = "iso8601"), !IsBuiltinCalendar(c)) throw new RangeError(`invalid calendar identifier ${c}`);
|
|
831
831
|
c = ASCIILowercase(c);
|
|
832
832
|
}
|
|
@@ -906,14 +906,14 @@ function InterpretTemporalDateTimeFields(e, t, r) {
|
|
|
906
906
|
T = GetSlot(u, i),
|
|
907
907
|
p = GetSlot(u, s),
|
|
908
908
|
f = GetSlot(u, l);
|
|
909
|
-
return
|
|
909
|
+
return {
|
|
910
910
|
hour: o,
|
|
911
911
|
minute: n,
|
|
912
912
|
second: a,
|
|
913
913
|
millisecond: d,
|
|
914
914
|
microsecond: m,
|
|
915
915
|
nanosecond: c
|
|
916
|
-
} = RegulateTime(o, n, a, d, m, c, h)
|
|
916
|
+
} = RegulateTime(o, n, a, d, m, c, h), {
|
|
917
917
|
year: T,
|
|
918
918
|
month: p,
|
|
919
919
|
day: f,
|
|
@@ -946,7 +946,7 @@ function ToTemporalDateTime(e, t) {
|
|
|
946
946
|
} = InterpretTemporalDateTimeFields(T, f, t));
|
|
947
947
|
} else {
|
|
948
948
|
let i;
|
|
949
|
-
if (ToTemporalOverflow(t),
|
|
949
|
+
if (ToTemporalOverflow(t), {
|
|
950
950
|
year: r,
|
|
951
951
|
month: o,
|
|
952
952
|
day: n,
|
|
@@ -960,7 +960,7 @@ function ToTemporalDateTime(e, t) {
|
|
|
960
960
|
z: i
|
|
961
961
|
} = function ParseTemporalDateTimeString(e) {
|
|
962
962
|
return ParseISODateTime(e);
|
|
963
|
-
}(ToString(e))
|
|
963
|
+
}(ToString(e)), i) throw new RangeError("Z designator not supported for PlainDateTime");
|
|
964
964
|
if (RejectDateTime(r, o, n, a, d, m, c, h, u), T || (T = "iso8601"), !IsBuiltinCalendar(T)) throw new RangeError(`invalid calendar identifier ${T}`);
|
|
965
965
|
T = ASCIILowercase(T);
|
|
966
966
|
}
|
|
@@ -1033,14 +1033,14 @@ function ToTemporalTime(e, t = "constrain") {
|
|
|
1033
1033
|
millisecond: a,
|
|
1034
1034
|
microsecond: i,
|
|
1035
1035
|
nanosecond: s
|
|
1036
|
-
} = ToTemporalTimeRecord(l))),
|
|
1036
|
+
} = ToTemporalTimeRecord(l))), {
|
|
1037
1037
|
hour: r,
|
|
1038
1038
|
minute: o,
|
|
1039
1039
|
second: n,
|
|
1040
1040
|
millisecond: a,
|
|
1041
1041
|
microsecond: i,
|
|
1042
1042
|
nanosecond: s
|
|
1043
|
-
} = RegulateTime(r, o, n, a, i, s, t)
|
|
1043
|
+
} = RegulateTime(r, o, n, a, i, s, t);
|
|
1044
1044
|
} else (({
|
|
1045
1045
|
hour: r,
|
|
1046
1046
|
minute: o,
|
|
@@ -1059,7 +1059,7 @@ function ToTemporalTime(e, t = "constrain") {
|
|
|
1059
1059
|
if (t[8]) throw new RangeError("Z designator not supported for PlainTime");
|
|
1060
1060
|
} else {
|
|
1061
1061
|
let t, l;
|
|
1062
|
-
if (
|
|
1062
|
+
if ({
|
|
1063
1063
|
hasTime: l,
|
|
1064
1064
|
hour: r,
|
|
1065
1065
|
minute: o,
|
|
@@ -1068,7 +1068,7 @@ function ToTemporalTime(e, t = "constrain") {
|
|
|
1068
1068
|
microsecond: i,
|
|
1069
1069
|
nanosecond: s,
|
|
1070
1070
|
z: t
|
|
1071
|
-
} = ParseISODateTime(e)
|
|
1071
|
+
} = ParseISODateTime(e), !l) throw new RangeError(`time is missing in string: ${e}`);
|
|
1072
1072
|
if (t) throw new RangeError("Z designator not supported for PlainTime");
|
|
1073
1073
|
}
|
|
1074
1074
|
if (/[tT ][0-9][0-9]/.test(e)) return {
|
|
@@ -1170,7 +1170,7 @@ function ToTemporalZonedDateTime(e, t) {
|
|
|
1170
1170
|
const f = CalendarFields(u, ["day", "hour", "microsecond", "millisecond", "minute", "month", "monthCode", "nanosecond", "second", "year"]);
|
|
1171
1171
|
f.push("timeZone", "offset");
|
|
1172
1172
|
const I = PrepareTemporalFields(e, f, ["timeZone"]);
|
|
1173
|
-
c = ToTemporalTimeZoneSlotValue(I.timeZone), h = I.offset, void 0 === h && (y = "wall"), T = ToTemporalDisambiguation(t), p = ToTemporalOffset(t, "reject"),
|
|
1173
|
+
c = ToTemporalTimeZoneSlotValue(I.timeZone), h = I.offset, void 0 === h && (y = "wall"), T = ToTemporalDisambiguation(t), p = ToTemporalOffset(t, "reject"), {
|
|
1174
1174
|
year: r,
|
|
1175
1175
|
month: o,
|
|
1176
1176
|
day: n,
|
|
@@ -1180,10 +1180,10 @@ function ToTemporalZonedDateTime(e, t) {
|
|
|
1180
1180
|
millisecond: l,
|
|
1181
1181
|
microsecond: d,
|
|
1182
1182
|
nanosecond: m
|
|
1183
|
-
} = InterpretTemporalDateTimeFields(u, I, t)
|
|
1183
|
+
} = InterpretTemporalDateTimeFields(u, I, t);
|
|
1184
1184
|
} else {
|
|
1185
1185
|
let I, S;
|
|
1186
|
-
if (
|
|
1186
|
+
if ({
|
|
1187
1187
|
year: r,
|
|
1188
1188
|
month: o,
|
|
1189
1189
|
day: n,
|
|
@@ -1201,7 +1201,7 @@ function ToTemporalZonedDateTime(e, t) {
|
|
|
1201
1201
|
const t = ParseISODateTime(e);
|
|
1202
1202
|
if (!t.ianaName) throw new RangeError("Temporal.ZonedDateTime requires a time zone ID in brackets");
|
|
1203
1203
|
return t;
|
|
1204
|
-
}(ToString(e))
|
|
1204
|
+
}(ToString(e)), c = ToTemporalTimeZoneSlotValue(I), S ? y = "exact" : h || (y = "wall"), u || (u = "iso8601"), !IsBuiltinCalendar(u)) throw new RangeError(`invalid calendar identifier ${u}`);
|
|
1205
1205
|
u = ASCIILowercase(u), f = !0, T = ToTemporalDisambiguation(t), p = ToTemporalOffset(t, "reject"), ToTemporalOverflow(t);
|
|
1206
1206
|
}
|
|
1207
1207
|
let I = 0;
|
|
@@ -1593,7 +1593,7 @@ function GetPlainDateTimeFor(e, t, r) {
|
|
|
1593
1593
|
microsecond: u,
|
|
1594
1594
|
nanosecond: T
|
|
1595
1595
|
} = GetISOPartsFromEpoch(o);
|
|
1596
|
-
return
|
|
1596
|
+
return {
|
|
1597
1597
|
year: i,
|
|
1598
1598
|
month: s,
|
|
1599
1599
|
day: l,
|
|
@@ -1603,7 +1603,7 @@ function GetPlainDateTimeFor(e, t, r) {
|
|
|
1603
1603
|
millisecond: h,
|
|
1604
1604
|
microsecond: u,
|
|
1605
1605
|
nanosecond: T
|
|
1606
|
-
} = BalanceISODateTime(i, s, l, d, m, c, h, u, T + a)
|
|
1606
|
+
} = BalanceISODateTime(i, s, l, d, m, c, h, u, T + a), CreateTemporalDateTime(i, s, l, d, m, c, h, u, T, r);
|
|
1607
1607
|
}
|
|
1608
1608
|
function GetInstantFor(e, t, r) {
|
|
1609
1609
|
return DisambiguatePossibleInstants(GetPossibleInstantsFor(e, t), e, t, r);
|
|
@@ -1751,13 +1751,13 @@ function TemporalDurationToString(t, r = "auto", o) {
|
|
|
1751
1751
|
(({
|
|
1752
1752
|
quotient: Y,
|
|
1753
1753
|
remainder: I
|
|
1754
|
-
} = divmod(Y, De))),
|
|
1754
|
+
} = divmod(Y, De))), {
|
|
1755
1755
|
quotient: Y,
|
|
1756
1756
|
remainder: S
|
|
1757
|
-
} = divmod(Y, De)
|
|
1757
|
+
} = divmod(Y, De), {
|
|
1758
1758
|
quotient: F,
|
|
1759
1759
|
remainder: g
|
|
1760
|
-
} = divmod(Y, De)
|
|
1760
|
+
} = divmod(Y, De);
|
|
1761
1761
|
const P = 1e6 * ae(Number(g)) + 1e3 * ae(Number(S)) + ae(Number(I));
|
|
1762
1762
|
let Z;
|
|
1763
1763
|
if ("auto" === r) {
|
|
@@ -2092,10 +2092,10 @@ function BalanceISODate(e, t, r) {
|
|
|
2092
2092
|
year: o,
|
|
2093
2093
|
month: n
|
|
2094
2094
|
} = BalanceISOYearMonth(o, n - 1))), a += ISODaysInMonth(o, n);
|
|
2095
|
-
for (; a > ISODaysInMonth(o, n);) a -= ISODaysInMonth(o, n),
|
|
2095
|
+
for (; a > ISODaysInMonth(o, n);) a -= ISODaysInMonth(o, n), {
|
|
2096
2096
|
year: o,
|
|
2097
2097
|
month: n
|
|
2098
|
-
} = BalanceISOYearMonth(o, n + 1)
|
|
2098
|
+
} = BalanceISOYearMonth(o, n + 1);
|
|
2099
2099
|
return {
|
|
2100
2100
|
year: o,
|
|
2101
2101
|
month: n,
|
|
@@ -2137,25 +2137,25 @@ function BalanceTime(t, r, o, n, a, i) {
|
|
|
2137
2137
|
c = BigInt(n),
|
|
2138
2138
|
h = BigInt(a),
|
|
2139
2139
|
u = BigInt(i);
|
|
2140
|
-
return
|
|
2140
|
+
return {
|
|
2141
2141
|
quotient: s,
|
|
2142
2142
|
remainder: u
|
|
2143
|
-
} = NonNegativeBigIntDivmod(u, De)
|
|
2143
|
+
} = NonNegativeBigIntDivmod(u, De), h = h + s, {
|
|
2144
2144
|
quotient: s,
|
|
2145
2145
|
remainder: h
|
|
2146
|
-
} = NonNegativeBigIntDivmod(h, De)
|
|
2146
|
+
} = NonNegativeBigIntDivmod(h, De), c = c + s, {
|
|
2147
2147
|
quotient: s,
|
|
2148
2148
|
remainder: c
|
|
2149
|
-
} = NonNegativeBigIntDivmod(c, De)
|
|
2149
|
+
} = NonNegativeBigIntDivmod(c, De), m = m + s, {
|
|
2150
2150
|
quotient: s,
|
|
2151
2151
|
remainder: m
|
|
2152
|
-
} = NonNegativeBigIntDivmod(m, ge)
|
|
2152
|
+
} = NonNegativeBigIntDivmod(m, ge), d = d + s, {
|
|
2153
2153
|
quotient: s,
|
|
2154
2154
|
remainder: d
|
|
2155
|
-
} = NonNegativeBigIntDivmod(d, ge)
|
|
2155
|
+
} = NonNegativeBigIntDivmod(d, ge), l = l + s, {
|
|
2156
2156
|
quotient: s,
|
|
2157
2157
|
remainder: l
|
|
2158
|
-
} = NonNegativeBigIntDivmod(l, we)
|
|
2158
|
+
} = NonNegativeBigIntDivmod(l, we), {
|
|
2159
2159
|
deltaDays: Number(s),
|
|
2160
2160
|
hour: Number(l),
|
|
2161
2161
|
minute: Number(d),
|
|
@@ -2188,10 +2188,10 @@ function NanosecondsToDays(t, r) {
|
|
|
2188
2188
|
};
|
|
2189
2189
|
if (!IsTemporalZonedDateTime(r)) {
|
|
2190
2190
|
let t;
|
|
2191
|
-
return
|
|
2191
|
+
return {
|
|
2192
2192
|
quotient: t,
|
|
2193
2193
|
remainder: f
|
|
2194
|
-
} = divmod(f, BigInt(y))
|
|
2194
|
+
} = divmod(f, BigInt(y)), {
|
|
2195
2195
|
days: Number(t),
|
|
2196
2196
|
nanoseconds: f,
|
|
2197
2197
|
dayLengthNs: y
|
|
@@ -2249,10 +2249,10 @@ function BalancePossiblyInfiniteDuration(t, r, o, a, i, s, l, d, m) {
|
|
|
2249
2249
|
d = GetSlot(m, n);
|
|
2250
2250
|
c = t - d;
|
|
2251
2251
|
} else c = TotalDurationNanoseconds(I, r, o, a, i, s, l, 0);
|
|
2252
|
-
"year" === d || "month" === d || "week" === d || "day" === d ?
|
|
2252
|
+
"year" === d || "month" === d || "week" === d || "day" === d ? {
|
|
2253
2253
|
days: I,
|
|
2254
2254
|
nanoseconds: c
|
|
2255
|
-
} = NanosecondsToDays(c, m)
|
|
2255
|
+
} = NanosecondsToDays(c, m) : I = 0;
|
|
2256
2256
|
const w = c < Ie ? -1 : 1;
|
|
2257
2257
|
switch (c = abs$1(c), h = u = T = f = y = Ie, d) {
|
|
2258
2258
|
case "year":
|
|
@@ -2263,55 +2263,55 @@ function BalancePossiblyInfiniteDuration(t, r, o, a, i, s, l, d, m) {
|
|
|
2263
2263
|
(({
|
|
2264
2264
|
quotient: h,
|
|
2265
2265
|
remainder: c
|
|
2266
|
-
} = divmod(c, De))),
|
|
2266
|
+
} = divmod(c, De))), {
|
|
2267
2267
|
quotient: u,
|
|
2268
2268
|
remainder: h
|
|
2269
|
-
} = divmod(h, De)
|
|
2269
|
+
} = divmod(h, De), {
|
|
2270
2270
|
quotient: T,
|
|
2271
2271
|
remainder: u
|
|
2272
|
-
} = divmod(u, De)
|
|
2272
|
+
} = divmod(u, De), {
|
|
2273
2273
|
quotient: f,
|
|
2274
2274
|
remainder: T
|
|
2275
|
-
} = divmod(T, ge)
|
|
2275
|
+
} = divmod(T, ge), {
|
|
2276
2276
|
quotient: y,
|
|
2277
2277
|
remainder: f
|
|
2278
|
-
} = divmod(f, ge)
|
|
2278
|
+
} = divmod(f, ge);
|
|
2279
2279
|
break;
|
|
2280
2280
|
case "minute":
|
|
2281
2281
|
(({
|
|
2282
2282
|
quotient: h,
|
|
2283
2283
|
remainder: c
|
|
2284
|
-
} = divmod(c, De))),
|
|
2284
|
+
} = divmod(c, De))), {
|
|
2285
2285
|
quotient: u,
|
|
2286
2286
|
remainder: h
|
|
2287
|
-
} = divmod(h, De)
|
|
2287
|
+
} = divmod(h, De), {
|
|
2288
2288
|
quotient: T,
|
|
2289
2289
|
remainder: u
|
|
2290
|
-
} = divmod(u, De)
|
|
2290
|
+
} = divmod(u, De), {
|
|
2291
2291
|
quotient: f,
|
|
2292
2292
|
remainder: T
|
|
2293
|
-
} = divmod(T, ge)
|
|
2293
|
+
} = divmod(T, ge);
|
|
2294
2294
|
break;
|
|
2295
2295
|
case "second":
|
|
2296
2296
|
(({
|
|
2297
2297
|
quotient: h,
|
|
2298
2298
|
remainder: c
|
|
2299
|
-
} = divmod(c, De))),
|
|
2299
|
+
} = divmod(c, De))), {
|
|
2300
2300
|
quotient: u,
|
|
2301
2301
|
remainder: h
|
|
2302
|
-
} = divmod(h, De)
|
|
2302
|
+
} = divmod(h, De), {
|
|
2303
2303
|
quotient: T,
|
|
2304
2304
|
remainder: u
|
|
2305
|
-
} = divmod(u, De)
|
|
2305
|
+
} = divmod(u, De);
|
|
2306
2306
|
break;
|
|
2307
2307
|
case "millisecond":
|
|
2308
2308
|
(({
|
|
2309
2309
|
quotient: h,
|
|
2310
2310
|
remainder: c
|
|
2311
|
-
} = divmod(c, De))),
|
|
2311
|
+
} = divmod(c, De))), {
|
|
2312
2312
|
quotient: u,
|
|
2313
2313
|
remainder: h
|
|
2314
|
-
} = divmod(h, De)
|
|
2314
|
+
} = divmod(h, De);
|
|
2315
2315
|
break;
|
|
2316
2316
|
case "microsecond":
|
|
2317
2317
|
({
|
|
@@ -2590,7 +2590,7 @@ function DifferenceTime(e, t, r, o, n, a, i, s, l, d, m, c) {
|
|
|
2590
2590
|
const I = DurationSign(0, 0, 0, 0, h, u, T, p, f, y);
|
|
2591
2591
|
h *= I, u *= I, T *= I, p *= I, f *= I, y *= I;
|
|
2592
2592
|
let S = 0;
|
|
2593
|
-
if (
|
|
2593
|
+
if ({
|
|
2594
2594
|
deltaDays: S,
|
|
2595
2595
|
hour: h,
|
|
2596
2596
|
minute: u,
|
|
@@ -2598,7 +2598,7 @@ function DifferenceTime(e, t, r, o, n, a, i, s, l, d, m, c) {
|
|
|
2598
2598
|
millisecond: p,
|
|
2599
2599
|
microsecond: f,
|
|
2600
2600
|
nanosecond: y
|
|
2601
|
-
} = BalanceTime(h, u, T, p, f, y)
|
|
2601
|
+
} = BalanceTime(h, u, T, p, f, y), 0 != S) throw new Error("assertion failure in DifferenceTime: _bt_.[[Days]] should be 0");
|
|
2602
2602
|
return h *= I, u *= I, T *= I, p *= I, f *= I, y *= I, {
|
|
2603
2603
|
hours: h,
|
|
2604
2604
|
minutes: u,
|
|
@@ -2616,14 +2616,14 @@ function DifferenceInstant(t, r, o, n, a, i) {
|
|
|
2616
2616
|
c = Number(s / De % De),
|
|
2617
2617
|
h = Number(s / Ge % De),
|
|
2618
2618
|
u = Number(s / ve);
|
|
2619
|
-
return
|
|
2619
|
+
return {
|
|
2620
2620
|
hours: l,
|
|
2621
2621
|
minutes: d,
|
|
2622
2622
|
seconds: u,
|
|
2623
2623
|
milliseconds: h,
|
|
2624
2624
|
microseconds: c,
|
|
2625
2625
|
nanoseconds: m
|
|
2626
|
-
} = RoundDuration(0, 0, 0, 0, 0, 0, u, h, c, m, o, n, i)
|
|
2626
|
+
} = RoundDuration(0, 0, 0, 0, 0, 0, u, h, c, m, o, n, i), BalanceDuration(0, l, d, u, h, c, m, a);
|
|
2627
2627
|
}
|
|
2628
2628
|
function DifferenceISODateTime(e, t, r, o, n, a, i, s, l, d, m, c, h, u, T, p, f, y, I, S, g) {
|
|
2629
2629
|
let w = e,
|
|
@@ -2638,18 +2638,18 @@ function DifferenceISODateTime(e, t, r, o, n, a, i, s, l, d, m, c, h, u, T, p, f
|
|
|
2638
2638
|
nanoseconds: M
|
|
2639
2639
|
} = DifferenceTime(o, n, a, i, s, l, h, u, T, p, f, y);
|
|
2640
2640
|
const R = DurationSign(0, 0, 0, 0, v, C, O, b, E, M);
|
|
2641
|
-
CompareISODate(d, m, c, w, D, G) === -R && (
|
|
2641
|
+
CompareISODate(d, m, c, w, D, G) === -R && ({
|
|
2642
2642
|
year: w,
|
|
2643
2643
|
month: D,
|
|
2644
2644
|
day: G
|
|
2645
|
-
} = BalanceISODate(w, D, G - R)
|
|
2645
|
+
} = BalanceISODate(w, D, G - R), {
|
|
2646
2646
|
hours: v,
|
|
2647
2647
|
minutes: C,
|
|
2648
2648
|
seconds: O,
|
|
2649
2649
|
milliseconds: b,
|
|
2650
2650
|
microseconds: E,
|
|
2651
2651
|
nanoseconds: M
|
|
2652
|
-
} = BalanceDuration(-R, v, C, O, b, E, M, S))
|
|
2652
|
+
} = BalanceDuration(-R, v, C, O, b, E, M, S));
|
|
2653
2653
|
const F = CreateTemporalDate(w, D, G, I),
|
|
2654
2654
|
Y = CreateTemporalDate(d, m, c, I),
|
|
2655
2655
|
P = LargerOfTwoTemporalUnits("day", S),
|
|
@@ -2661,7 +2661,7 @@ function DifferenceISODateTime(e, t, r, o, n, a, i, s, l, d, m, c, h, u, T, p, f
|
|
|
2661
2661
|
weeks: j,
|
|
2662
2662
|
days: $
|
|
2663
2663
|
} = CalendarDateUntil(I, F, Y, Z);
|
|
2664
|
-
return
|
|
2664
|
+
return {
|
|
2665
2665
|
days: $,
|
|
2666
2666
|
hours: v,
|
|
2667
2667
|
minutes: C,
|
|
@@ -2669,7 +2669,7 @@ function DifferenceISODateTime(e, t, r, o, n, a, i, s, l, d, m, c, h, u, T, p, f
|
|
|
2669
2669
|
milliseconds: b,
|
|
2670
2670
|
microseconds: E,
|
|
2671
2671
|
nanoseconds: M
|
|
2672
|
-
} = BalanceDuration($, v, C, O, b, E, M, S)
|
|
2672
|
+
} = BalanceDuration($, v, C, O, b, E, M, S), {
|
|
2673
2673
|
years: B,
|
|
2674
2674
|
months: N,
|
|
2675
2675
|
weeks: j,
|
|
@@ -2848,7 +2848,7 @@ function DifferenceTemporalPlainDateTime(e, t, r, o) {
|
|
|
2848
2848
|
milliseconds: O,
|
|
2849
2849
|
microseconds: b,
|
|
2850
2850
|
nanoseconds: E
|
|
2851
|
-
} = RoundDuration(S, g, w, D, G, v, C, O, b, E, I.roundingIncrement, I.smallestUnit, I.roundingMode, M))),
|
|
2851
|
+
} = RoundDuration(S, g, w, D, G, v, C, O, b, E, I.roundingIncrement, I.smallestUnit, I.roundingMode, M))), {
|
|
2852
2852
|
days: D,
|
|
2853
2853
|
hours: G,
|
|
2854
2854
|
minutes: v,
|
|
@@ -2856,7 +2856,7 @@ function DifferenceTemporalPlainDateTime(e, t, r, o) {
|
|
|
2856
2856
|
milliseconds: O,
|
|
2857
2857
|
microseconds: b,
|
|
2858
2858
|
nanoseconds: E
|
|
2859
|
-
} = BalanceDuration(D, G, v, C, O, b, E, I.largestUnit)
|
|
2859
|
+
} = BalanceDuration(D, G, v, C, O, b, E, I.largestUnit);
|
|
2860
2860
|
return new (GetIntrinsic("%Temporal.Duration%"))(n * S, n * g, n * w, n * D, n * G, n * v, n * C, n * O, n * b, n * E);
|
|
2861
2861
|
}
|
|
2862
2862
|
function DifferenceTemporalPlainTime(e, t, r, o) {
|
|
@@ -2878,14 +2878,14 @@ function DifferenceTemporalPlainTime(e, t, r, o) {
|
|
|
2878
2878
|
milliseconds: f,
|
|
2879
2879
|
microseconds: y,
|
|
2880
2880
|
nanoseconds: I
|
|
2881
|
-
} = RoundDuration(0, 0, 0, 0, s, l, p, f, y, I, i.roundingIncrement, i.smallestUnit, i.roundingMode))),
|
|
2881
|
+
} = RoundDuration(0, 0, 0, 0, s, l, p, f, y, I, i.roundingIncrement, i.smallestUnit, i.roundingMode))), {
|
|
2882
2882
|
hours: s,
|
|
2883
2883
|
minutes: l,
|
|
2884
2884
|
seconds: p,
|
|
2885
2885
|
milliseconds: f,
|
|
2886
2886
|
microseconds: y,
|
|
2887
2887
|
nanoseconds: I
|
|
2888
|
-
} = BalanceDuration(0, s, l, p, f, y, I, i.largestUnit)
|
|
2888
|
+
} = BalanceDuration(0, s, l, p, f, y, I, i.largestUnit);
|
|
2889
2889
|
return new (GetIntrinsic("%Temporal.Duration%"))(0, 0, 0, 0, n * s, n * l, n * p, n * f, n * y, n * I);
|
|
2890
2890
|
}
|
|
2891
2891
|
function DifferenceTemporalPlainYearMonth(e, t, r, o) {
|
|
@@ -2924,14 +2924,14 @@ function DifferenceTemporalZonedDateTime(e, t, r, o) {
|
|
|
2924
2924
|
const m = GetSlot(t, n),
|
|
2925
2925
|
c = GetSlot(i, n);
|
|
2926
2926
|
let h, u, T, f, y, I, S, w, D, G;
|
|
2927
|
-
if ("year" !== d.largestUnit && "month" !== d.largestUnit && "week" !== d.largestUnit && "day" !== d.largestUnit) h = 0, u = 0, T = 0, f = 0,
|
|
2927
|
+
if ("year" !== d.largestUnit && "month" !== d.largestUnit && "week" !== d.largestUnit && "day" !== d.largestUnit) h = 0, u = 0, T = 0, f = 0, {
|
|
2928
2928
|
hours: y,
|
|
2929
2929
|
minutes: I,
|
|
2930
2930
|
seconds: S,
|
|
2931
2931
|
milliseconds: w,
|
|
2932
2932
|
microseconds: D,
|
|
2933
2933
|
nanoseconds: G
|
|
2934
|
-
} = DifferenceInstant(m, c, d.roundingIncrement, d.smallestUnit, d.largestUnit, d.roundingMode)
|
|
2934
|
+
} = DifferenceInstant(m, c, d.roundingIncrement, d.smallestUnit, d.largestUnit, d.roundingMode);else {
|
|
2935
2935
|
const e = GetSlot(t, g);
|
|
2936
2936
|
if (!TimeZoneEquals(e, GetSlot(i, g))) throw new RangeError("When calculating difference between time zones, largestUnit must be 'hours' or smaller because day lengths can vary between time zones due to DST or time zone offset changes.");
|
|
2937
2937
|
(({
|
|
@@ -2945,7 +2945,7 @@ function DifferenceTemporalZonedDateTime(e, t, r, o) {
|
|
|
2945
2945
|
milliseconds: w,
|
|
2946
2946
|
microseconds: D,
|
|
2947
2947
|
nanoseconds: G
|
|
2948
|
-
} = DifferenceZonedDateTime(m, c, e, s, d.largestUnit, l))),
|
|
2948
|
+
} = DifferenceZonedDateTime(m, c, e, s, d.largestUnit, l))), {
|
|
2949
2949
|
years: h,
|
|
2950
2950
|
months: u,
|
|
2951
2951
|
weeks: T,
|
|
@@ -2956,7 +2956,7 @@ function DifferenceTemporalZonedDateTime(e, t, r, o) {
|
|
|
2956
2956
|
milliseconds: w,
|
|
2957
2957
|
microseconds: D,
|
|
2958
2958
|
nanoseconds: G
|
|
2959
|
-
} = RoundDuration(h, u, T, f, y, I, S, w, D, G, d.roundingIncrement, d.smallestUnit, d.roundingMode, t)
|
|
2959
|
+
} = RoundDuration(h, u, T, f, y, I, S, w, D, G, d.roundingIncrement, d.smallestUnit, d.roundingMode, t), {
|
|
2960
2960
|
years: h,
|
|
2961
2961
|
months: u,
|
|
2962
2962
|
weeks: T,
|
|
@@ -2967,7 +2967,7 @@ function DifferenceTemporalZonedDateTime(e, t, r, o) {
|
|
|
2967
2967
|
milliseconds: w,
|
|
2968
2968
|
microseconds: D,
|
|
2969
2969
|
nanoseconds: G
|
|
2970
|
-
} = AdjustRoundedDurationDays(h, u, T, f, y, I, S, w, D, G, d.roundingIncrement, d.smallestUnit, d.roundingMode, t)
|
|
2970
|
+
} = AdjustRoundedDurationDays(h, u, T, f, y, I, S, w, D, G, d.roundingIncrement, d.smallestUnit, d.roundingMode, t);
|
|
2971
2971
|
}
|
|
2972
2972
|
return new (GetIntrinsic("%Temporal.Duration%"))(a * h, a * u, a * T, a * f, a * y, a * I, a * S, a * w, a * D, a * G);
|
|
2973
2973
|
}
|
|
@@ -2977,18 +2977,18 @@ function AddISODate(e, t, r, o, n, a, i, s) {
|
|
|
2977
2977
|
m = r,
|
|
2978
2978
|
c = a,
|
|
2979
2979
|
h = i;
|
|
2980
|
-
return l += o, d += n,
|
|
2980
|
+
return l += o, d += n, {
|
|
2981
2981
|
year: l,
|
|
2982
2982
|
month: d
|
|
2983
|
-
} = BalanceISOYearMonth(l, d)
|
|
2983
|
+
} = BalanceISOYearMonth(l, d), {
|
|
2984
2984
|
year: l,
|
|
2985
2985
|
month: d,
|
|
2986
2986
|
day: m
|
|
2987
|
-
} = RegulateISODate(l, d, m, s)
|
|
2987
|
+
} = RegulateISODate(l, d, m, s), h += 7 * c, m += h, {
|
|
2988
2988
|
year: l,
|
|
2989
2989
|
month: d,
|
|
2990
2990
|
day: m
|
|
2991
|
-
} = BalanceISODate(l, d, m)
|
|
2991
|
+
} = BalanceISODate(l, d, m), {
|
|
2992
2992
|
year: l,
|
|
2993
2993
|
month: d,
|
|
2994
2994
|
day: m
|
|
@@ -3003,7 +3003,7 @@ function AddTime(e, t, r, o, n, a, i, s, l, d, m, c) {
|
|
|
3003
3003
|
y = a;
|
|
3004
3004
|
h += i, u += s, T += l, p += d, f += m, y += c;
|
|
3005
3005
|
let I = 0;
|
|
3006
|
-
return
|
|
3006
|
+
return {
|
|
3007
3007
|
deltaDays: I,
|
|
3008
3008
|
hour: h,
|
|
3009
3009
|
minute: u,
|
|
@@ -3011,7 +3011,7 @@ function AddTime(e, t, r, o, n, a, i, s, l, d, m, c) {
|
|
|
3011
3011
|
millisecond: p,
|
|
3012
3012
|
microsecond: f,
|
|
3013
3013
|
nanosecond: y
|
|
3014
|
-
} = BalanceTime(h, u, T, p, f, y)
|
|
3014
|
+
} = BalanceTime(h, u, T, p, f, y), {
|
|
3015
3015
|
deltaDays: I,
|
|
3016
3016
|
hour: h,
|
|
3017
3017
|
minute: u,
|
|
@@ -3035,12 +3035,12 @@ function AddDuration(t, r, o, a, i, s, l, d, m, c, h, u, T, f, y, I, w, D, G, v,
|
|
|
3035
3035
|
U = CalendarDateAdd(S, k, j, void 0, $),
|
|
3036
3036
|
A = LargerOfTwoTemporalUnits("day", O),
|
|
3037
3037
|
L = Te(null);
|
|
3038
|
-
L.largestUnit = A,
|
|
3038
|
+
L.largestUnit = A, {
|
|
3039
3039
|
years: b,
|
|
3040
3040
|
months: E,
|
|
3041
3041
|
weeks: M,
|
|
3042
3042
|
days: R
|
|
3043
|
-
} = CalendarDateUntil(S, C, U, L)
|
|
3043
|
+
} = CalendarDateUntil(S, C, U, L), {
|
|
3044
3044
|
days: R,
|
|
3045
3045
|
hours: F,
|
|
3046
3046
|
minutes: Y,
|
|
@@ -3048,21 +3048,21 @@ function AddDuration(t, r, o, a, i, s, l, d, m, c, h, u, T, f, y, I, w, D, G, v,
|
|
|
3048
3048
|
milliseconds: Z,
|
|
3049
3049
|
microseconds: B,
|
|
3050
3050
|
nanoseconds: N
|
|
3051
|
-
} = BalanceDuration(R, BigInt(i) + BigInt(y), BigInt(s) + BigInt(I), BigInt(l) + BigInt(w), BigInt(d) + BigInt(D), BigInt(m) + BigInt(G), BigInt(c) + BigInt(v), O)
|
|
3051
|
+
} = BalanceDuration(R, BigInt(i) + BigInt(y), BigInt(s) + BigInt(I), BigInt(l) + BigInt(w), BigInt(d) + BigInt(D), BigInt(m) + BigInt(G), BigInt(c) + BigInt(v), O);
|
|
3052
3052
|
} else {
|
|
3053
3053
|
const e = GetIntrinsic("%Temporal.Instant%"),
|
|
3054
3054
|
j = GetSlot(C, g),
|
|
3055
3055
|
$ = GetSlot(C, p),
|
|
3056
3056
|
k = AddZonedDateTime(GetSlot(C, S), j, $, t, r, o, a, i, s, l, d, m, c),
|
|
3057
3057
|
U = AddZonedDateTime(new e(k), j, $, h, u, T, f, y, I, w, D, G, v);
|
|
3058
|
-
"year" !== O && "month" !== O && "week" !== O && "day" !== O ? (b = 0, E = 0, M = 0, R = 0,
|
|
3058
|
+
"year" !== O && "month" !== O && "week" !== O && "day" !== O ? (b = 0, E = 0, M = 0, R = 0, {
|
|
3059
3059
|
hours: F,
|
|
3060
3060
|
minutes: Y,
|
|
3061
3061
|
seconds: P,
|
|
3062
3062
|
milliseconds: Z,
|
|
3063
3063
|
microseconds: B,
|
|
3064
3064
|
nanoseconds: N
|
|
3065
|
-
} = DifferenceInstant(GetSlot(C, n), U, 1, "nanosecond", O, "halfExpand"))
|
|
3065
|
+
} = DifferenceInstant(GetSlot(C, n), U, 1, "nanosecond", O, "halfExpand")) : {
|
|
3066
3066
|
years: b,
|
|
3067
3067
|
months: E,
|
|
3068
3068
|
weeks: M,
|
|
@@ -3073,11 +3073,11 @@ function AddDuration(t, r, o, a, i, s, l, d, m, c, h, u, T, f, y, I, w, D, G, v,
|
|
|
3073
3073
|
milliseconds: Z,
|
|
3074
3074
|
microseconds: B,
|
|
3075
3075
|
nanoseconds: N
|
|
3076
|
-
} = DifferenceZonedDateTime(GetSlot(C, n), U, j, $, O, Te(null))
|
|
3076
|
+
} = DifferenceZonedDateTime(GetSlot(C, n), U, j, $, O, Te(null));
|
|
3077
3077
|
}
|
|
3078
3078
|
} else {
|
|
3079
3079
|
if ("year" === O || "month" === O || "week" === O) throw new RangeError("relativeTo is required for years, months, or weeks arithmetic");
|
|
3080
|
-
b = E = M = 0,
|
|
3080
|
+
b = E = M = 0, {
|
|
3081
3081
|
days: R,
|
|
3082
3082
|
hours: F,
|
|
3083
3083
|
minutes: Y,
|
|
@@ -3085,7 +3085,7 @@ function AddDuration(t, r, o, a, i, s, l, d, m, c, h, u, T, f, y, I, w, D, G, v,
|
|
|
3085
3085
|
milliseconds: Z,
|
|
3086
3086
|
microseconds: B,
|
|
3087
3087
|
nanoseconds: N
|
|
3088
|
-
} = BalanceDuration(a + f, BigInt(i) + BigInt(y), BigInt(s) + BigInt(I), BigInt(l) + BigInt(w), BigInt(d) + BigInt(D), BigInt(m) + BigInt(G), BigInt(c) + BigInt(v), O)
|
|
3088
|
+
} = BalanceDuration(a + f, BigInt(i) + BigInt(y), BigInt(s) + BigInt(I), BigInt(l) + BigInt(w), BigInt(d) + BigInt(D), BigInt(m) + BigInt(G), BigInt(c) + BigInt(v), O);
|
|
3089
3089
|
}
|
|
3090
3090
|
return RejectDuration(b, E, M, R, F, Y, P, Z, B, N), {
|
|
3091
3091
|
years: b,
|
|
@@ -3477,19 +3477,19 @@ function AdjustRoundedDurationDays(t, r, o, n, a, i, s, l, d, m, c, h, u, T) {
|
|
|
3477
3477
|
Y = AddZonedDateTime(GetSlot(T, S), R, F, f, y, I, w, 0, 0, 0, 0, 0, 0),
|
|
3478
3478
|
P = AddZonedDateTime(new (GetIntrinsic("%Temporal.Instant%"))(Y), R, F, 0, 0, 0, M, 0, 0, 0, 0, 0, 0),
|
|
3479
3479
|
Z = P - Y;
|
|
3480
|
-
return (E - Z) * BigInt(M) >= Ie && (
|
|
3480
|
+
return (E - Z) * BigInt(M) >= Ie && ({
|
|
3481
3481
|
years: f,
|
|
3482
3482
|
months: y,
|
|
3483
3483
|
weeks: I,
|
|
3484
3484
|
days: w
|
|
3485
|
-
} = AddDuration(f, y, I, w, 0, 0, 0, 0, 0, 0, 0, 0, 0, M, 0, 0, 0, 0, 0, 0, T)
|
|
3485
|
+
} = AddDuration(f, y, I, w, 0, 0, 0, 0, 0, 0, 0, 0, 0, M, 0, 0, 0, 0, 0, 0, T), E = RoundInstant(E - Z, c, h, u), {
|
|
3486
3486
|
hours: D,
|
|
3487
3487
|
minutes: G,
|
|
3488
3488
|
seconds: v,
|
|
3489
3489
|
milliseconds: C,
|
|
3490
3490
|
microseconds: O,
|
|
3491
3491
|
nanoseconds: b
|
|
3492
|
-
} = BalanceDuration(0, 0, 0, 0, 0, 0, Number(E), "hour"))
|
|
3492
|
+
} = BalanceDuration(0, 0, 0, 0, 0, 0, Number(E), "hour")), {
|
|
3493
3493
|
years: f,
|
|
3494
3494
|
months: y,
|
|
3495
3495
|
weeks: I,
|
|
@@ -3525,11 +3525,11 @@ function RoundDuration(t, r, o, n, a, i, s, l, d, m, c, h, u, T) {
|
|
|
3525
3525
|
}
|
|
3526
3526
|
if ("year" === h || "month" === h || "week" === h || "day" === h) {
|
|
3527
3527
|
let t, r, o;
|
|
3528
|
-
C = TotalDurationNanoseconds(0, g, w, D, G, v, m, 0), E && (t = MoveRelativeZonedDateTime(E, f, y, I, S)),
|
|
3528
|
+
C = TotalDurationNanoseconds(0, g, w, D, G, v, m, 0), E && (t = MoveRelativeZonedDateTime(E, f, y, I, S)), {
|
|
3529
3529
|
days: r,
|
|
3530
3530
|
nanoseconds: C,
|
|
3531
3531
|
dayLengthNs: o
|
|
3532
|
-
} = NanosecondsToDays(C, t)
|
|
3532
|
+
} = NanosecondsToDays(C, t), M = BigInt(o), S += r, g = w = D = G = v = 0;
|
|
3533
3533
|
}
|
|
3534
3534
|
switch (h) {
|
|
3535
3535
|
case "year":
|
|
@@ -3570,13 +3570,13 @@ function RoundDuration(t, r, o, n, a, i, s, l, d, m, c, h, u, T) {
|
|
|
3570
3570
|
const a = se(S),
|
|
3571
3571
|
i = new O(0, S < 0 ? -1 : 1);
|
|
3572
3572
|
let s;
|
|
3573
|
-
for (
|
|
3573
|
+
for ({
|
|
3574
3574
|
relativeTo: F,
|
|
3575
3575
|
days: s
|
|
3576
|
-
} = MoveRelativeDate(b, F, i, r)
|
|
3576
|
+
} = MoveRelativeDate(b, F, i, r); ae(S) >= ae(s);) y += a, S -= s, {
|
|
3577
3577
|
relativeTo: F,
|
|
3578
3578
|
days: s
|
|
3579
|
-
} = MoveRelativeDate(b, F, i, r)
|
|
3579
|
+
} = MoveRelativeDate(b, F, i, r);
|
|
3580
3580
|
s = ae(s);
|
|
3581
3581
|
const l = BigInt(s) * M;
|
|
3582
3582
|
C = l * BigInt(y) + BigInt(S) * M + C;
|
|
@@ -3591,13 +3591,13 @@ function RoundDuration(t, r, o, n, a, i, s, l, d, m, c, h, u, T) {
|
|
|
3591
3591
|
r = new O(0, 0, S < 0 ? -1 : 1),
|
|
3592
3592
|
o = "string" != typeof b ? GetMethod(b, "dateAdd") : void 0;
|
|
3593
3593
|
let n;
|
|
3594
|
-
for (
|
|
3594
|
+
for ({
|
|
3595
3595
|
relativeTo: F,
|
|
3596
3596
|
days: n
|
|
3597
|
-
} = MoveRelativeDate(b, F, r, o)
|
|
3597
|
+
} = MoveRelativeDate(b, F, r, o); ae(S) >= ae(n);) I += t, S -= n, {
|
|
3598
3598
|
relativeTo: F,
|
|
3599
3599
|
days: n
|
|
3600
|
-
} = MoveRelativeDate(b, F, r, o)
|
|
3600
|
+
} = MoveRelativeDate(b, F, r, o);
|
|
3601
3601
|
n = ae(n);
|
|
3602
3602
|
const a = BigInt(n) * M;
|
|
3603
3603
|
C = a * BigInt(I) + BigInt(S) * M + C;
|
|
@@ -4423,11 +4423,11 @@ MakeIntrinsicClass(Calendar, "Temporal.Calendar"), DefineIntrinsic("Temporal.Cal
|
|
|
4423
4423
|
month: i,
|
|
4424
4424
|
day: s
|
|
4425
4425
|
} = o;
|
|
4426
|
-
return
|
|
4426
|
+
return {
|
|
4427
4427
|
year: a,
|
|
4428
4428
|
month: i,
|
|
4429
4429
|
day: s
|
|
4430
|
-
} = RegulateISODate(a, i, s, n)
|
|
4430
|
+
} = RegulateISODate(a, i, s, n), CreateTemporalDate(a, i, s, r);
|
|
4431
4431
|
},
|
|
4432
4432
|
yearMonthFromFields(e, t, r) {
|
|
4433
4433
|
let o = PrepareTemporalFields(e, ["month", "monthCode", "year"], ["year"]);
|
|
@@ -4437,7 +4437,7 @@ MakeIntrinsicClass(Calendar, "Temporal.Calendar"), DefineIntrinsic("Temporal.Cal
|
|
|
4437
4437
|
year: a,
|
|
4438
4438
|
month: i
|
|
4439
4439
|
} = o;
|
|
4440
|
-
return
|
|
4440
|
+
return {
|
|
4441
4441
|
year: a,
|
|
4442
4442
|
month: i
|
|
4443
4443
|
} = function RegulateISOYearMonth(e, t, r) {
|
|
@@ -4457,7 +4457,7 @@ MakeIntrinsicClass(Calendar, "Temporal.Calendar"), DefineIntrinsic("Temporal.Cal
|
|
|
4457
4457
|
year: o,
|
|
4458
4458
|
month: n
|
|
4459
4459
|
};
|
|
4460
|
-
}(a, i, n)
|
|
4460
|
+
}(a, i, n), CreateTemporalYearMonth(a, i, r, 1);
|
|
4461
4461
|
},
|
|
4462
4462
|
monthDayFromFields(e, t, r) {
|
|
4463
4463
|
let o = PrepareTemporalFields(e, ["day", "month", "monthCode", "year"], ["day"]);
|
|
@@ -4470,10 +4470,10 @@ MakeIntrinsicClass(Calendar, "Temporal.Calendar"), DefineIntrinsic("Temporal.Cal
|
|
|
4470
4470
|
day: s,
|
|
4471
4471
|
year: l
|
|
4472
4472
|
} = o;
|
|
4473
|
-
return
|
|
4473
|
+
return {
|
|
4474
4474
|
month: i,
|
|
4475
4475
|
day: s
|
|
4476
|
-
} = RegulateISODate(a ? l : 1972, i, s, n)
|
|
4476
|
+
} = RegulateISODate(a ? l : 1972, i, s, n), CreateTemporalMonthDay(i, s, r, 1972);
|
|
4477
4477
|
},
|
|
4478
4478
|
fields: e => e,
|
|
4479
4479
|
fieldKeysToIgnore(e) {
|
|
@@ -4488,11 +4488,11 @@ MakeIntrinsicClass(Calendar, "Temporal.Calendar"), DefineIntrinsic("Temporal.Cal
|
|
|
4488
4488
|
let m = GetSlot(e, i),
|
|
4489
4489
|
c = GetSlot(e, s),
|
|
4490
4490
|
h = GetSlot(e, l);
|
|
4491
|
-
return
|
|
4491
|
+
return {
|
|
4492
4492
|
year: m,
|
|
4493
4493
|
month: c,
|
|
4494
4494
|
day: h
|
|
4495
|
-
} = AddISODate(m, c, h, t, r, o, n, a)
|
|
4495
|
+
} = AddISODate(m, c, h, t, r, o, n, a), CreateTemporalDate(m, c, h, d);
|
|
4496
4496
|
},
|
|
4497
4497
|
dateUntil: (e, t, r) => DifferenceISODate(GetSlot(e, i), GetSlot(e, s), GetSlot(e, l), GetSlot(t, i), GetSlot(t, s), GetSlot(t, l), r),
|
|
4498
4498
|
year: e => GetSlot(e, i),
|
|
@@ -4685,10 +4685,10 @@ class HelperBase {
|
|
|
4685
4685
|
month: i,
|
|
4686
4686
|
monthCode: s
|
|
4687
4687
|
} = n;
|
|
4688
|
-
return
|
|
4688
|
+
return {
|
|
4689
4689
|
month: i,
|
|
4690
4690
|
monthCode: s
|
|
4691
|
-
} = resolveNonLunisolarMonth(n, r, a)
|
|
4691
|
+
} = resolveNonLunisolarMonth(n, r, a), {
|
|
4692
4692
|
...n,
|
|
4693
4693
|
month: i,
|
|
4694
4694
|
monthCode: s
|
|
@@ -4996,11 +4996,11 @@ class HelperBase {
|
|
|
4996
4996
|
}, r),
|
|
4997
4997
|
h = this.calendarToIsoDate(m, "constrain", r),
|
|
4998
4998
|
u = this.isoToCalendarDate(h, r);
|
|
4999
|
-
if (
|
|
4999
|
+
if ({
|
|
5000
5000
|
year: o,
|
|
5001
5001
|
month: n,
|
|
5002
5002
|
day: a
|
|
5003
|
-
} = h
|
|
5003
|
+
} = h, u.monthCode === l && u.day === d) return {
|
|
5004
5004
|
month: n,
|
|
5005
5005
|
day: a,
|
|
5006
5006
|
year: o
|
|
@@ -5527,10 +5527,10 @@ class GregorianBaseHelper extends HelperBase {
|
|
|
5527
5527
|
const e = void 0 === o ? void 0 : this.eras.find(e => e.name === o || e.genericName === o);
|
|
5528
5528
|
if (!e) throw new RangeError(`Era ${o} (ISO year ${r}) was not matched by any era`);
|
|
5529
5529
|
if (r < 1 && e.reverseOf) throw new RangeError(`Years in ${o} era must be positive, not ${t}`);
|
|
5530
|
-
t = e.reverseOf ? e.anchorEpoch.year - r : r + e.anchorEpoch.year - (e.hasYearZero ? 0 : 1), checkField("year", t),
|
|
5530
|
+
t = e.reverseOf ? e.anchorEpoch.year - r : r + e.anchorEpoch.year - (e.hasYearZero ? 0 : 1), checkField("year", t), {
|
|
5531
5531
|
eraYear: r,
|
|
5532
5532
|
era: o
|
|
5533
|
-
} = eraFromYear(t)
|
|
5533
|
+
} = eraFromYear(t);
|
|
5534
5534
|
}
|
|
5535
5535
|
}
|
|
5536
5536
|
return {
|
|
@@ -5840,10 +5840,10 @@ class ChineseBaseHelper extends HelperBase {
|
|
|
5840
5840
|
calendarDay: s,
|
|
5841
5841
|
calendarYearToVerify: l
|
|
5842
5842
|
} = getCalendarDate(e, a);
|
|
5843
|
-
"1" !== i && (a += 29,
|
|
5843
|
+
"1" !== i && (a += 29, {
|
|
5844
5844
|
calendarMonthString: i,
|
|
5845
5845
|
calendarDay: s
|
|
5846
|
-
} = getCalendarDate(e, a))
|
|
5846
|
+
} = getCalendarDate(e, a)), a -= s - 5;
|
|
5847
5847
|
const d = {};
|
|
5848
5848
|
let m,
|
|
5849
5849
|
c,
|
|
@@ -6498,7 +6498,7 @@ class PlainDateTime {
|
|
|
6498
6498
|
D = GetSlot(this, h),
|
|
6499
6499
|
G = GetSlot(this, u),
|
|
6500
6500
|
v = GetSlot(this, T);
|
|
6501
|
-
return
|
|
6501
|
+
return {
|
|
6502
6502
|
year: f,
|
|
6503
6503
|
month: y,
|
|
6504
6504
|
day: I,
|
|
@@ -6508,7 +6508,7 @@ class PlainDateTime {
|
|
|
6508
6508
|
millisecond: D,
|
|
6509
6509
|
microsecond: G,
|
|
6510
6510
|
nanosecond: v
|
|
6511
|
-
} = RoundISODateTime(f, y, I, S, g, w, D, G, v, r, n, o)
|
|
6511
|
+
} = RoundISODateTime(f, y, I, S, g, w, D, G, v, r, n, o), CreateTemporalDateTime(f, y, I, S, g, w, D, G, v, GetSlot(this, p));
|
|
6512
6512
|
}
|
|
6513
6513
|
equals(e) {
|
|
6514
6514
|
if (!IsTemporalDateTime(this)) throw new TypeError("invalid receiver");
|
|
@@ -6734,12 +6734,12 @@ class Duration {
|
|
|
6734
6734
|
microsecond: 1e3,
|
|
6735
6735
|
nanosecond: 1e3
|
|
6736
6736
|
}[S];
|
|
6737
|
-
return void 0 !== Y && ValidateTemporalRoundingIncrement(y, Y, !1),
|
|
6737
|
+
return void 0 !== Y && ValidateTemporalRoundingIncrement(y, Y, !1), {
|
|
6738
6738
|
years: r,
|
|
6739
6739
|
months: o,
|
|
6740
6740
|
weeks: n,
|
|
6741
6741
|
days: a
|
|
6742
|
-
} = UnbalanceDurationRelative(r, o, n, a, T, f)
|
|
6742
|
+
} = UnbalanceDurationRelative(r, o, n, a, T, f), {
|
|
6743
6743
|
years: r,
|
|
6744
6744
|
months: o,
|
|
6745
6745
|
weeks: n,
|
|
@@ -6750,7 +6750,7 @@ class Duration {
|
|
|
6750
6750
|
milliseconds: d,
|
|
6751
6751
|
microseconds: m,
|
|
6752
6752
|
nanoseconds: c
|
|
6753
|
-
} = RoundDuration(r, o, n, a, i, s, l, d, m, c, y, S, I, f)
|
|
6753
|
+
} = RoundDuration(r, o, n, a, i, s, l, d, m, c, y, S, I, f), {
|
|
6754
6754
|
years: r,
|
|
6755
6755
|
months: o,
|
|
6756
6756
|
weeks: n,
|
|
@@ -6761,7 +6761,7 @@ class Duration {
|
|
|
6761
6761
|
milliseconds: d,
|
|
6762
6762
|
microseconds: m,
|
|
6763
6763
|
nanoseconds: c
|
|
6764
|
-
} = AdjustRoundedDurationDays(r, o, n, a, i, s, l, d, m, c, y, S, I, f)
|
|
6764
|
+
} = AdjustRoundedDurationDays(r, o, n, a, i, s, l, d, m, c, y, S, I, f), {
|
|
6765
6765
|
days: a,
|
|
6766
6766
|
hours: i,
|
|
6767
6767
|
minutes: s,
|
|
@@ -6769,7 +6769,7 @@ class Duration {
|
|
|
6769
6769
|
milliseconds: d,
|
|
6770
6770
|
microseconds: m,
|
|
6771
6771
|
nanoseconds: c
|
|
6772
|
-
} = BalanceDuration(a, i, s, l, d, m, c, T, f)
|
|
6772
|
+
} = BalanceDuration(a, i, s, l, d, m, c, T, f), {
|
|
6773
6773
|
years: r,
|
|
6774
6774
|
months: o,
|
|
6775
6775
|
weeks: n,
|
|
@@ -6800,20 +6800,20 @@ class Duration {
|
|
|
6800
6800
|
if (!m) throw new RangeError("a starting point is required for years balancing");
|
|
6801
6801
|
const t = "string" != typeof m ? GetMethod(m, "dateAdd") : void 0;
|
|
6802
6802
|
let r, o, n;
|
|
6803
|
-
for (
|
|
6803
|
+
for ({
|
|
6804
6804
|
relativeTo: r,
|
|
6805
6805
|
days: o
|
|
6806
|
-
} = MoveRelativeDate(m, c, y, t)
|
|
6806
|
+
} = MoveRelativeDate(m, c, y, t); abs$1(f) >= BigInt(ae(o));) f = f - BigInt(o), h = h + d, c = r, {
|
|
6807
6807
|
relativeTo: r,
|
|
6808
6808
|
days: o
|
|
6809
|
-
} = MoveRelativeDate(m, c, y, t)
|
|
6810
|
-
for (
|
|
6809
|
+
} = MoveRelativeDate(m, c, y, t);
|
|
6810
|
+
for ({
|
|
6811
6811
|
relativeTo: r,
|
|
6812
6812
|
days: n
|
|
6813
|
-
} = MoveRelativeDate(m, c, I, t)
|
|
6813
|
+
} = MoveRelativeDate(m, c, I, t); abs$1(f) >= BigInt(ae(n));) f = f - BigInt(n), u = u + d, c = r, {
|
|
6814
6814
|
relativeTo: r,
|
|
6815
6815
|
days: n
|
|
6816
|
-
} = MoveRelativeDate(m, c, I, t)
|
|
6816
|
+
} = MoveRelativeDate(m, c, I, t);
|
|
6817
6817
|
r = CalendarDateAdd(m, c, y, void 0, t);
|
|
6818
6818
|
const a = "string" != typeof m ? GetMethod(m, "dateUntil") : void 0,
|
|
6819
6819
|
i = Te(null);
|
|
@@ -6832,13 +6832,13 @@ class Duration {
|
|
|
6832
6832
|
if (!m) throw new RangeError("a starting point is required for months balancing");
|
|
6833
6833
|
const t = "string" != typeof m ? GetMethod(m, "dateAdd") : void 0;
|
|
6834
6834
|
let r, o;
|
|
6835
|
-
for (
|
|
6835
|
+
for ({
|
|
6836
6836
|
relativeTo: r,
|
|
6837
6837
|
days: o
|
|
6838
|
-
} = MoveRelativeDate(m, c, I, t)
|
|
6838
|
+
} = MoveRelativeDate(m, c, I, t); abs$1(f) >= BigInt(ae(o));) f = f - BigInt(o), u = u + d, c = r, {
|
|
6839
6839
|
relativeTo: r,
|
|
6840
6840
|
days: o
|
|
6841
|
-
} = MoveRelativeDate(m, c, I, t)
|
|
6841
|
+
} = MoveRelativeDate(m, c, I, t);
|
|
6842
6842
|
break;
|
|
6843
6843
|
}
|
|
6844
6844
|
case "week":
|
|
@@ -6846,13 +6846,13 @@ class Duration {
|
|
|
6846
6846
|
if (!m) throw new RangeError("a starting point is required for weeks balancing");
|
|
6847
6847
|
const t = "string" != typeof m ? GetMethod(m, "dateAdd") : void 0;
|
|
6848
6848
|
let r, o;
|
|
6849
|
-
for (
|
|
6849
|
+
for ({
|
|
6850
6850
|
relativeTo: r,
|
|
6851
6851
|
days: o
|
|
6852
|
-
} = MoveRelativeDate(m, c, S, t)
|
|
6852
|
+
} = MoveRelativeDate(m, c, S, t); abs$1(f) >= BigInt(ae(o));) f = f - BigInt(o), T = T + d, c = r, {
|
|
6853
6853
|
relativeTo: r,
|
|
6854
6854
|
days: o
|
|
6855
|
-
} = MoveRelativeDate(m, c, S, t)
|
|
6855
|
+
} = MoveRelativeDate(m, c, S, t);
|
|
6856
6856
|
break;
|
|
6857
6857
|
}
|
|
6858
6858
|
}
|
|
@@ -6862,7 +6862,7 @@ class Duration {
|
|
|
6862
6862
|
weeks: Number(T),
|
|
6863
6863
|
days: Number(f)
|
|
6864
6864
|
};
|
|
6865
|
-
}(r, o, n, a, T, f)
|
|
6865
|
+
}(r, o, n, a, T, f), new Duration(r, o, n, a, i, s, l, d, m, c);
|
|
6866
6866
|
}
|
|
6867
6867
|
total(e) {
|
|
6868
6868
|
if (!IsTemporalDuration(this)) throw new TypeError("invalid receiver");
|
|
@@ -6962,11 +6962,11 @@ class Duration {
|
|
|
6962
6962
|
let N = GetSlot(a, R);
|
|
6963
6963
|
const j = CalculateOffsetShift(i, s, l, d, m),
|
|
6964
6964
|
$ = CalculateOffsetShift(i, y, I, S, g);
|
|
6965
|
-
0 === s && 0 === y && 0 === l && 0 === I && 0 === d && 0 === S || (
|
|
6965
|
+
0 === s && 0 === y && 0 === l && 0 === I && 0 === d && 0 === S || ({
|
|
6966
6966
|
days: m
|
|
6967
|
-
} = UnbalanceDurationRelative(s, l, d, m, "day", i)
|
|
6967
|
+
} = UnbalanceDurationRelative(s, l, d, m, "day", i), {
|
|
6968
6968
|
days: g
|
|
6969
|
-
} = UnbalanceDurationRelative(y, I, S, g, "day", i))
|
|
6969
|
+
} = UnbalanceDurationRelative(y, I, S, g, "day", i));
|
|
6970
6970
|
const k = TotalDurationNanoseconds(m, c, h, u, T, p, f, j),
|
|
6971
6971
|
U = TotalDurationNanoseconds(g, F, Y, P, Z, B, N, $);
|
|
6972
6972
|
return ComparisonResult(Number(k - U));
|
|
@@ -7158,14 +7158,14 @@ class PlainTime {
|
|
|
7158
7158
|
microsecond: d,
|
|
7159
7159
|
nanosecond: m
|
|
7160
7160
|
} = Mt(n, o);
|
|
7161
|
-
return
|
|
7161
|
+
return {
|
|
7162
7162
|
hour: a,
|
|
7163
7163
|
minute: i,
|
|
7164
7164
|
second: s,
|
|
7165
7165
|
millisecond: l,
|
|
7166
7166
|
microsecond: d,
|
|
7167
7167
|
nanosecond: m
|
|
7168
|
-
} = RegulateTime(a, i, s, l, d, m, r)
|
|
7168
|
+
} = RegulateTime(a, i, s, l, d, m, r), new PlainTime(a, i, s, l, d, m);
|
|
7169
7169
|
}
|
|
7170
7170
|
add(e) {
|
|
7171
7171
|
if (!IsTemporalTime(this)) throw new TypeError("invalid receiver");
|
|
@@ -7204,14 +7204,14 @@ class PlainTime {
|
|
|
7204
7204
|
l = GetSlot(this, h),
|
|
7205
7205
|
p = GetSlot(this, u),
|
|
7206
7206
|
f = GetSlot(this, T);
|
|
7207
|
-
return
|
|
7207
|
+
return {
|
|
7208
7208
|
hour: a,
|
|
7209
7209
|
minute: i,
|
|
7210
7210
|
second: s,
|
|
7211
7211
|
millisecond: l,
|
|
7212
7212
|
microsecond: p,
|
|
7213
7213
|
nanosecond: f
|
|
7214
|
-
} = RoundTime(a, i, s, l, p, f, r, n, o)
|
|
7214
|
+
} = RoundTime(a, i, s, l, p, f, r, n, o), new PlainTime(a, i, s, l, p, f);
|
|
7215
7215
|
}
|
|
7216
7216
|
equals(e) {
|
|
7217
7217
|
if (!IsTemporalTime(this)) throw new TypeError("invalid receiver");
|
|
@@ -25452,7 +25452,7 @@ const date = new FunctionImplementation(
|
|
|
25452
25452
|
return new StringEvaluation(context, string);
|
|
25453
25453
|
}
|
|
25454
25454
|
if (!DATE_OR_DATE_TIME_PATTERN.test(string)) {
|
|
25455
|
-
const unpaddedMatches =
|
|
25455
|
+
const unpaddedMatches = UNPADDED_MONTH_DAY_PATTERN.exec(string);
|
|
25456
25456
|
if (unpaddedMatches == null) {
|
|
25457
25457
|
return new DateTimeLikeEvaluation(context, null);
|
|
25458
25458
|
}
|
|
@@ -27675,131 +27675,132 @@ function requireEncUtf16 () {
|
|
|
27675
27675
|
|
|
27676
27676
|
var encBase64$1 = {exports: {}};
|
|
27677
27677
|
|
|
27678
|
-
|
|
27679
|
-
|
|
27680
|
-
|
|
27681
|
-
|
|
27682
|
-
|
|
27683
|
-
|
|
27684
|
-
|
|
27685
|
-
|
|
27686
|
-
|
|
27687
|
-
|
|
27688
|
-
|
|
27689
|
-
|
|
27690
|
-
|
|
27691
|
-
|
|
27692
|
-
|
|
27693
|
-
|
|
27694
|
-
|
|
27695
|
-
|
|
27696
|
-
|
|
27697
|
-
|
|
27698
|
-
|
|
27699
|
-
|
|
27700
|
-
|
|
27701
|
-
|
|
27702
|
-
|
|
27703
|
-
|
|
27704
|
-
|
|
27705
|
-
|
|
27706
|
-
|
|
27707
|
-
|
|
27708
|
-
|
|
27709
|
-
|
|
27710
|
-
|
|
27711
|
-
|
|
27712
|
-
|
|
27713
|
-
|
|
27714
|
-
|
|
27715
|
-
|
|
27716
|
-
|
|
27717
|
-
|
|
27718
|
-
|
|
27678
|
+
(function (module, exports) {
|
|
27679
|
+
(function (root, factory) {
|
|
27680
|
+
{
|
|
27681
|
+
// CommonJS
|
|
27682
|
+
module.exports = factory(requireCore());
|
|
27683
|
+
}
|
|
27684
|
+
})(commonjsGlobal, function (CryptoJS) {
|
|
27685
|
+
(function () {
|
|
27686
|
+
// Shortcuts
|
|
27687
|
+
var C = CryptoJS;
|
|
27688
|
+
var C_lib = C.lib;
|
|
27689
|
+
var WordArray = C_lib.WordArray;
|
|
27690
|
+
var C_enc = C.enc;
|
|
27691
|
+
|
|
27692
|
+
/**
|
|
27693
|
+
* Base64 encoding strategy.
|
|
27694
|
+
*/
|
|
27695
|
+
C_enc.Base64 = {
|
|
27696
|
+
/**
|
|
27697
|
+
* Converts a word array to a Base64 string.
|
|
27698
|
+
*
|
|
27699
|
+
* @param {WordArray} wordArray The word array.
|
|
27700
|
+
*
|
|
27701
|
+
* @return {string} The Base64 string.
|
|
27702
|
+
*
|
|
27703
|
+
* @static
|
|
27704
|
+
*
|
|
27705
|
+
* @example
|
|
27706
|
+
*
|
|
27707
|
+
* var base64String = CryptoJS.enc.Base64.stringify(wordArray);
|
|
27708
|
+
*/
|
|
27709
|
+
stringify: function (wordArray) {
|
|
27710
|
+
// Shortcuts
|
|
27711
|
+
var words = wordArray.words;
|
|
27712
|
+
var sigBytes = wordArray.sigBytes;
|
|
27713
|
+
var map = this._map;
|
|
27714
|
+
|
|
27715
|
+
// Clamp excess bits
|
|
27716
|
+
wordArray.clamp();
|
|
27717
|
+
|
|
27718
|
+
// Convert
|
|
27719
|
+
var base64Chars = [];
|
|
27720
|
+
for (var i = 0; i < sigBytes; i += 3) {
|
|
27721
|
+
var byte1 = words[i >>> 2] >>> 24 - i % 4 * 8 & 0xff;
|
|
27722
|
+
var byte2 = words[i + 1 >>> 2] >>> 24 - (i + 1) % 4 * 8 & 0xff;
|
|
27723
|
+
var byte3 = words[i + 2 >>> 2] >>> 24 - (i + 2) % 4 * 8 & 0xff;
|
|
27724
|
+
var triplet = byte1 << 16 | byte2 << 8 | byte3;
|
|
27725
|
+
for (var j = 0; j < 4 && i + j * 0.75 < sigBytes; j++) {
|
|
27726
|
+
base64Chars.push(map.charAt(triplet >>> 6 * (3 - j) & 0x3f));
|
|
27727
|
+
}
|
|
27728
|
+
}
|
|
27719
27729
|
|
|
27720
|
-
|
|
27721
|
-
|
|
27730
|
+
// Add padding
|
|
27731
|
+
var paddingChar = map.charAt(64);
|
|
27732
|
+
if (paddingChar) {
|
|
27733
|
+
while (base64Chars.length % 4) {
|
|
27734
|
+
base64Chars.push(paddingChar);
|
|
27735
|
+
}
|
|
27736
|
+
}
|
|
27737
|
+
return base64Chars.join('');
|
|
27738
|
+
},
|
|
27739
|
+
/**
|
|
27740
|
+
* Converts a Base64 string to a word array.
|
|
27741
|
+
*
|
|
27742
|
+
* @param {string} base64Str The Base64 string.
|
|
27743
|
+
*
|
|
27744
|
+
* @return {WordArray} The word array.
|
|
27745
|
+
*
|
|
27746
|
+
* @static
|
|
27747
|
+
*
|
|
27748
|
+
* @example
|
|
27749
|
+
*
|
|
27750
|
+
* var wordArray = CryptoJS.enc.Base64.parse(base64String);
|
|
27751
|
+
*/
|
|
27752
|
+
parse: function (base64Str) {
|
|
27753
|
+
// Shortcuts
|
|
27754
|
+
var base64StrLength = base64Str.length;
|
|
27755
|
+
var map = this._map;
|
|
27756
|
+
var reverseMap = this._reverseMap;
|
|
27757
|
+
if (!reverseMap) {
|
|
27758
|
+
reverseMap = this._reverseMap = [];
|
|
27759
|
+
for (var j = 0; j < map.length; j++) {
|
|
27760
|
+
reverseMap[map.charCodeAt(j)] = j;
|
|
27761
|
+
}
|
|
27762
|
+
}
|
|
27722
27763
|
|
|
27723
|
-
|
|
27724
|
-
|
|
27725
|
-
|
|
27726
|
-
|
|
27727
|
-
|
|
27728
|
-
|
|
27729
|
-
|
|
27730
|
-
|
|
27731
|
-
base64Chars.push(map.charAt(triplet >>> 6 * (3 - j) & 0x3f));
|
|
27732
|
-
}
|
|
27733
|
-
}
|
|
27764
|
+
// Ignore padding
|
|
27765
|
+
var paddingChar = map.charAt(64);
|
|
27766
|
+
if (paddingChar) {
|
|
27767
|
+
var paddingIndex = base64Str.indexOf(paddingChar);
|
|
27768
|
+
if (paddingIndex !== -1) {
|
|
27769
|
+
base64StrLength = paddingIndex;
|
|
27770
|
+
}
|
|
27771
|
+
}
|
|
27734
27772
|
|
|
27735
|
-
|
|
27736
|
-
|
|
27737
|
-
|
|
27738
|
-
|
|
27739
|
-
|
|
27740
|
-
|
|
27741
|
-
|
|
27742
|
-
|
|
27743
|
-
|
|
27744
|
-
|
|
27745
|
-
|
|
27746
|
-
|
|
27747
|
-
|
|
27748
|
-
|
|
27749
|
-
|
|
27750
|
-
|
|
27751
|
-
|
|
27752
|
-
|
|
27753
|
-
|
|
27754
|
-
|
|
27755
|
-
|
|
27756
|
-
|
|
27757
|
-
|
|
27758
|
-
// Shortcuts
|
|
27759
|
-
var base64StrLength = base64Str.length;
|
|
27760
|
-
var map = this._map;
|
|
27761
|
-
var reverseMap = this._reverseMap;
|
|
27762
|
-
if (!reverseMap) {
|
|
27763
|
-
reverseMap = this._reverseMap = [];
|
|
27764
|
-
for (var j = 0; j < map.length; j++) {
|
|
27765
|
-
reverseMap[map.charCodeAt(j)] = j;
|
|
27766
|
-
}
|
|
27767
|
-
}
|
|
27773
|
+
// Convert
|
|
27774
|
+
return parseLoop(base64Str, base64StrLength, reverseMap);
|
|
27775
|
+
},
|
|
27776
|
+
_map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='
|
|
27777
|
+
};
|
|
27778
|
+
function parseLoop(base64Str, base64StrLength, reverseMap) {
|
|
27779
|
+
var words = [];
|
|
27780
|
+
var nBytes = 0;
|
|
27781
|
+
for (var i = 0; i < base64StrLength; i++) {
|
|
27782
|
+
if (i % 4) {
|
|
27783
|
+
var bits1 = reverseMap[base64Str.charCodeAt(i - 1)] << i % 4 * 2;
|
|
27784
|
+
var bits2 = reverseMap[base64Str.charCodeAt(i)] >>> 6 - i % 4 * 2;
|
|
27785
|
+
var bitsCombined = bits1 | bits2;
|
|
27786
|
+
words[nBytes >>> 2] |= bitsCombined << 24 - nBytes % 4 * 8;
|
|
27787
|
+
nBytes++;
|
|
27788
|
+
}
|
|
27789
|
+
}
|
|
27790
|
+
return WordArray.create(words, nBytes);
|
|
27791
|
+
}
|
|
27792
|
+
})();
|
|
27793
|
+
return CryptoJS.enc.Base64;
|
|
27794
|
+
});
|
|
27795
|
+
} (encBase64$1));
|
|
27768
27796
|
|
|
27769
|
-
|
|
27770
|
-
|
|
27771
|
-
if (paddingChar) {
|
|
27772
|
-
var paddingIndex = base64Str.indexOf(paddingChar);
|
|
27773
|
-
if (paddingIndex !== -1) {
|
|
27774
|
-
base64StrLength = paddingIndex;
|
|
27775
|
-
}
|
|
27776
|
-
}
|
|
27797
|
+
var encBase64Exports = encBase64$1.exports;
|
|
27798
|
+
const encBase64 = /*@__PURE__*/getDefaultExportFromCjs(encBase64Exports);
|
|
27777
27799
|
|
|
27778
|
-
|
|
27779
|
-
|
|
27780
|
-
|
|
27781
|
-
|
|
27782
|
-
};
|
|
27783
|
-
function parseLoop(base64Str, base64StrLength, reverseMap) {
|
|
27784
|
-
var words = [];
|
|
27785
|
-
var nBytes = 0;
|
|
27786
|
-
for (var i = 0; i < base64StrLength; i++) {
|
|
27787
|
-
if (i % 4) {
|
|
27788
|
-
var bits1 = reverseMap[base64Str.charCodeAt(i - 1)] << i % 4 * 2;
|
|
27789
|
-
var bits2 = reverseMap[base64Str.charCodeAt(i)] >>> 6 - i % 4 * 2;
|
|
27790
|
-
var bitsCombined = bits1 | bits2;
|
|
27791
|
-
words[nBytes >>> 2] |= bitsCombined << 24 - nBytes % 4 * 8;
|
|
27792
|
-
nBytes++;
|
|
27793
|
-
}
|
|
27794
|
-
}
|
|
27795
|
-
return WordArray.create(words, nBytes);
|
|
27796
|
-
}
|
|
27797
|
-
})();
|
|
27798
|
-
return CryptoJS.enc.Base64;
|
|
27799
|
-
});
|
|
27800
|
-
} (encBase64$1));
|
|
27801
|
-
return encBase64$1.exports;
|
|
27802
|
-
}
|
|
27800
|
+
const base64 = /*#__PURE__*/_mergeNamespaces({
|
|
27801
|
+
__proto__: null,
|
|
27802
|
+
default: encBase64
|
|
27803
|
+
}, [encBase64Exports]);
|
|
27803
27804
|
|
|
27804
27805
|
var encBase64url = {exports: {}};
|
|
27805
27806
|
|
|
@@ -31306,7 +31307,7 @@ function requireAes () {
|
|
|
31306
31307
|
(function (root, factory, undef) {
|
|
31307
31308
|
{
|
|
31308
31309
|
// CommonJS
|
|
31309
|
-
module.exports = factory(requireCore(),
|
|
31310
|
+
module.exports = factory(requireCore(), encBase64Exports, requireMd5(), requireEvpkdf(), requireCipherCore());
|
|
31310
31311
|
}
|
|
31311
31312
|
})(commonjsGlobal, function (CryptoJS) {
|
|
31312
31313
|
(function () {
|
|
@@ -31530,7 +31531,7 @@ function requireTripledes () {
|
|
|
31530
31531
|
(function (root, factory, undef) {
|
|
31531
31532
|
{
|
|
31532
31533
|
// CommonJS
|
|
31533
|
-
module.exports = factory(requireCore(),
|
|
31534
|
+
module.exports = factory(requireCore(), encBase64Exports, requireMd5(), requireEvpkdf(), requireCipherCore());
|
|
31534
31535
|
}
|
|
31535
31536
|
})(commonjsGlobal, function (CryptoJS) {
|
|
31536
31537
|
(function () {
|
|
@@ -32268,7 +32269,7 @@ function requireRc4 () {
|
|
|
32268
32269
|
(function (root, factory, undef) {
|
|
32269
32270
|
{
|
|
32270
32271
|
// CommonJS
|
|
32271
|
-
module.exports = factory(requireCore(),
|
|
32272
|
+
module.exports = factory(requireCore(), encBase64Exports, requireMd5(), requireEvpkdf(), requireCipherCore());
|
|
32272
32273
|
}
|
|
32273
32274
|
})(commonjsGlobal, function (CryptoJS) {
|
|
32274
32275
|
(function () {
|
|
@@ -32399,7 +32400,7 @@ function requireRabbit () {
|
|
|
32399
32400
|
(function (root, factory, undef) {
|
|
32400
32401
|
{
|
|
32401
32402
|
// CommonJS
|
|
32402
|
-
module.exports = factory(requireCore(),
|
|
32403
|
+
module.exports = factory(requireCore(), encBase64Exports, requireMd5(), requireEvpkdf(), requireCipherCore());
|
|
32403
32404
|
}
|
|
32404
32405
|
})(commonjsGlobal, function (CryptoJS) {
|
|
32405
32406
|
(function () {
|
|
@@ -32574,7 +32575,7 @@ function requireRabbitLegacy () {
|
|
|
32574
32575
|
(function (root, factory, undef) {
|
|
32575
32576
|
{
|
|
32576
32577
|
// CommonJS
|
|
32577
|
-
module.exports = factory(requireCore(),
|
|
32578
|
+
module.exports = factory(requireCore(), encBase64Exports, requireMd5(), requireEvpkdf(), requireCipherCore());
|
|
32578
32579
|
}
|
|
32579
32580
|
})(commonjsGlobal, function (CryptoJS) {
|
|
32580
32581
|
(function () {
|
|
@@ -32748,7 +32749,7 @@ function requireBlowfish () {
|
|
|
32748
32749
|
(function (root, factory, undef) {
|
|
32749
32750
|
{
|
|
32750
32751
|
// CommonJS
|
|
32751
|
-
module.exports = factory(requireCore(),
|
|
32752
|
+
module.exports = factory(requireCore(), encBase64Exports, requireMd5(), requireEvpkdf(), requireCipherCore());
|
|
32752
32753
|
}
|
|
32753
32754
|
})(commonjsGlobal, function (CryptoJS) {
|
|
32754
32755
|
(function () {
|
|
@@ -32920,7 +32921,7 @@ function requireBlowfish () {
|
|
|
32920
32921
|
(function (root, factory, undef) {
|
|
32921
32922
|
{
|
|
32922
32923
|
// CommonJS
|
|
32923
|
-
module.exports = factory(requireCore(), requireX64Core(), requireLibTypedarrays(), requireEncUtf16(),
|
|
32924
|
+
module.exports = factory(requireCore(), requireX64Core(), requireLibTypedarrays(), requireEncUtf16(), encBase64Exports, requireEncBase64url(), requireMd5(), requireSha1(), requireSha256(), requireSha224(), requireSha512(), requireSha384(), requireSha3(), requireRipemd160(), requireHmac(), requirePbkdf2(), requireEvpkdf(), requireCipherCore(), requireModeCfb(), requireModeCtr(), requireModeCtrGladman(), requireModeOfb(), requireModeEcb(), requirePadAnsix923(), requirePadIso10126(), requirePadIso97971(), requirePadZeropadding(), requirePadNopadding(), requireFormatHex(), requireAes(), requireTripledes(), requireRc4(), requireRabbit(), requireRabbitLegacy(), requireBlowfish());
|
|
32924
32925
|
}
|
|
32925
32926
|
})(commonjsGlobal, function (CryptoJS) {
|
|
32926
32927
|
return CryptoJS;
|
|
@@ -32929,14 +32930,6 @@ function requireBlowfish () {
|
|
|
32929
32930
|
|
|
32930
32931
|
var cryptoJsExports = cryptoJs.exports;
|
|
32931
32932
|
|
|
32932
|
-
var encBase64Exports = requireEncBase64();
|
|
32933
|
-
const encBase64 = /*@__PURE__*/getDefaultExportFromCjs(encBase64Exports);
|
|
32934
|
-
|
|
32935
|
-
const base64 = /*#__PURE__*/_mergeNamespaces({
|
|
32936
|
-
__proto__: null,
|
|
32937
|
-
default: encBase64
|
|
32938
|
-
}, [encBase64Exports]);
|
|
32939
|
-
|
|
32940
32933
|
var encHex$1 = {exports: {}};
|
|
32941
32934
|
|
|
32942
32935
|
(function (module, exports) {
|