framework7 8.3.0 → 8.3.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/components/app/app-class.js +5 -5
- package/components/calendar/calendar.d.ts +1 -1
- package/components/color-picker/color-picker.less +8 -2
- package/components/navbar/navbar-ios.less +4 -4
- package/components/page/page-md.less +2 -1
- package/components/preloader/preloader-md.less +2 -1
- package/components/pull-to-refresh/pull-to-refresh-md.less +3 -1
- package/components/sortable/sortable-rtl.css +1 -1
- package/components/sortable/sortable.css +1 -1
- package/components/sortable/sortable.less +1 -0
- package/framework7-bundle-rtl.css +10 -5
- package/framework7-bundle-rtl.min.css +4 -4
- package/framework7-bundle.css +10 -5
- package/framework7-bundle.esm.js +3 -3
- package/framework7-bundle.js +1503 -187
- package/framework7-bundle.js.map +1 -1
- package/framework7-bundle.less +3 -3
- package/framework7-bundle.min.css +4 -4
- package/framework7-bundle.min.js +4 -4
- package/framework7-bundle.min.js.map +1 -1
- package/framework7-lite-bundle.esm.js +3 -3
- package/framework7-lite.esm.js +3 -3
- package/framework7-rtl.css +3 -3
- package/framework7-rtl.min.css +3 -3
- package/framework7.css +3 -3
- package/framework7.esm.js +3 -3
- package/framework7.less +3 -3
- package/framework7.min.css +3 -3
- package/package.json +26 -8
- package/shared/material-color-utils.js +622 -5
- package/framework7-lite.js +0 -31
- package/framework7.js +0 -42
- package/less/plugin.js +0 -15
package/framework7-bundle.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Framework7 8.3.
|
|
2
|
+
* Framework7 8.3.1
|
|
3
3
|
* Full featured mobile HTML framework for building iOS & Android apps
|
|
4
4
|
* https://framework7.io/
|
|
5
5
|
*
|
|
6
|
-
* Copyright 2014-
|
|
6
|
+
* Copyright 2014-2024 Vladimir Kharlampidi
|
|
7
7
|
*
|
|
8
8
|
* Released under the MIT License
|
|
9
9
|
*
|
|
10
|
-
* Released on:
|
|
10
|
+
* Released on: February 5, 2024
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
(function (global, factory) {
|
|
@@ -1530,6 +1530,9 @@
|
|
|
1530
1530
|
function clampInt(min, max, input) {
|
|
1531
1531
|
return input < min ? min : input > max ? max : input;
|
|
1532
1532
|
}
|
|
1533
|
+
function clampDouble(min, max, input) {
|
|
1534
|
+
return input < min ? min : input > max ? max : input;
|
|
1535
|
+
}
|
|
1533
1536
|
function sanitizeDegreesDouble(degrees) {
|
|
1534
1537
|
return (degrees %= 360) < 0 && (degrees += 360), degrees;
|
|
1535
1538
|
}
|
|
@@ -1580,6 +1583,9 @@
|
|
|
1580
1583
|
function yFromLstar(lstar) {
|
|
1581
1584
|
return 100 * labInvf((lstar + 16) / 116);
|
|
1582
1585
|
}
|
|
1586
|
+
function lstarFromY(y) {
|
|
1587
|
+
return 116 * labF(y / 100) - 16;
|
|
1588
|
+
}
|
|
1583
1589
|
function linearized(rgbComponent) {
|
|
1584
1590
|
const normalized = rgbComponent / 255;
|
|
1585
1591
|
return normalized <= .040449936 ? normalized / 12.92 * 100 : 100 * Math.pow((normalized + .055) / 1.055, 2.4);
|
|
@@ -1758,6 +1764,68 @@
|
|
|
1758
1764
|
bF = bC / viewingConditions.rgbD[2];
|
|
1759
1765
|
return argbFromXyz(1.86206786 * rF - 1.01125463 * gF + .14918677 * bF, .38752654 * rF + .62144744 * gF - .00897398 * bF, -.0158415 * rF - .03412294 * gF + 1.04996444 * bF);
|
|
1760
1766
|
}
|
|
1767
|
+
static fromXyzInViewingConditions(x, y, z, viewingConditions) {
|
|
1768
|
+
const rC = .401288 * x + .650173 * y - .051461 * z,
|
|
1769
|
+
gC = -.250268 * x + 1.204414 * y + .045854 * z,
|
|
1770
|
+
bC = -.002079 * x + .048952 * y + .953127 * z,
|
|
1771
|
+
rD = viewingConditions.rgbD[0] * rC,
|
|
1772
|
+
gD = viewingConditions.rgbD[1] * gC,
|
|
1773
|
+
bD = viewingConditions.rgbD[2] * bC,
|
|
1774
|
+
rAF = Math.pow(viewingConditions.fl * Math.abs(rD) / 100, .42),
|
|
1775
|
+
gAF = Math.pow(viewingConditions.fl * Math.abs(gD) / 100, .42),
|
|
1776
|
+
bAF = Math.pow(viewingConditions.fl * Math.abs(bD) / 100, .42),
|
|
1777
|
+
rA = 400 * signum(rD) * rAF / (rAF + 27.13),
|
|
1778
|
+
gA = 400 * signum(gD) * gAF / (gAF + 27.13),
|
|
1779
|
+
bA = 400 * signum(bD) * bAF / (bAF + 27.13),
|
|
1780
|
+
a = (11 * rA + -12 * gA + bA) / 11,
|
|
1781
|
+
b = (rA + gA - 2 * bA) / 9,
|
|
1782
|
+
u = (20 * rA + 20 * gA + 21 * bA) / 20,
|
|
1783
|
+
p2 = (40 * rA + 20 * gA + bA) / 20,
|
|
1784
|
+
atanDegrees = 180 * Math.atan2(b, a) / Math.PI,
|
|
1785
|
+
hue = atanDegrees < 0 ? atanDegrees + 360 : atanDegrees >= 360 ? atanDegrees - 360 : atanDegrees,
|
|
1786
|
+
hueRadians = hue * Math.PI / 180,
|
|
1787
|
+
ac = p2 * viewingConditions.nbb,
|
|
1788
|
+
J = 100 * Math.pow(ac / viewingConditions.aw, viewingConditions.c * viewingConditions.z),
|
|
1789
|
+
Q = 4 / viewingConditions.c * Math.sqrt(J / 100) * (viewingConditions.aw + 4) * viewingConditions.fLRoot,
|
|
1790
|
+
huePrime = hue < 20.14 ? hue + 360 : hue,
|
|
1791
|
+
t = 5e4 / 13 * (1 / 4 * (Math.cos(huePrime * Math.PI / 180 + 2) + 3.8)) * viewingConditions.nc * viewingConditions.ncb * Math.sqrt(a * a + b * b) / (u + .305),
|
|
1792
|
+
alpha = Math.pow(t, .9) * Math.pow(1.64 - Math.pow(.29, viewingConditions.n), .73),
|
|
1793
|
+
C = alpha * Math.sqrt(J / 100),
|
|
1794
|
+
M = C * viewingConditions.fLRoot,
|
|
1795
|
+
s = 50 * Math.sqrt(alpha * viewingConditions.c / (viewingConditions.aw + 4)),
|
|
1796
|
+
jstar = (1 + 100 * .007) * J / (1 + .007 * J),
|
|
1797
|
+
mstar = Math.log(1 + .0228 * M) / .0228,
|
|
1798
|
+
astar = mstar * Math.cos(hueRadians),
|
|
1799
|
+
bstar = mstar * Math.sin(hueRadians);
|
|
1800
|
+
return new Cam16(hue, C, J, Q, M, s, jstar, astar, bstar);
|
|
1801
|
+
}
|
|
1802
|
+
xyzInViewingConditions(viewingConditions) {
|
|
1803
|
+
const alpha = 0 === this.chroma || 0 === this.j ? 0 : this.chroma / Math.sqrt(this.j / 100),
|
|
1804
|
+
t = Math.pow(alpha / Math.pow(1.64 - Math.pow(.29, viewingConditions.n), .73), 1 / .9),
|
|
1805
|
+
hRad = this.hue * Math.PI / 180,
|
|
1806
|
+
eHue = .25 * (Math.cos(hRad + 2) + 3.8),
|
|
1807
|
+
ac = viewingConditions.aw * Math.pow(this.j / 100, 1 / viewingConditions.c / viewingConditions.z),
|
|
1808
|
+
p1 = eHue * (5e4 / 13) * viewingConditions.nc * viewingConditions.ncb,
|
|
1809
|
+
p2 = ac / viewingConditions.nbb,
|
|
1810
|
+
hSin = Math.sin(hRad),
|
|
1811
|
+
hCos = Math.cos(hRad),
|
|
1812
|
+
gamma = 23 * (p2 + .305) * t / (23 * p1 + 11 * t * hCos + 108 * t * hSin),
|
|
1813
|
+
a = gamma * hCos,
|
|
1814
|
+
b = gamma * hSin,
|
|
1815
|
+
rA = (460 * p2 + 451 * a + 288 * b) / 1403,
|
|
1816
|
+
gA = (460 * p2 - 891 * a - 261 * b) / 1403,
|
|
1817
|
+
bA = (460 * p2 - 220 * a - 6300 * b) / 1403,
|
|
1818
|
+
rCBase = Math.max(0, 27.13 * Math.abs(rA) / (400 - Math.abs(rA))),
|
|
1819
|
+
rC = signum(rA) * (100 / viewingConditions.fl) * Math.pow(rCBase, 1 / .42),
|
|
1820
|
+
gCBase = Math.max(0, 27.13 * Math.abs(gA) / (400 - Math.abs(gA))),
|
|
1821
|
+
gC = signum(gA) * (100 / viewingConditions.fl) * Math.pow(gCBase, 1 / .42),
|
|
1822
|
+
bCBase = Math.max(0, 27.13 * Math.abs(bA) / (400 - Math.abs(bA))),
|
|
1823
|
+
bC = signum(bA) * (100 / viewingConditions.fl) * Math.pow(bCBase, 1 / .42),
|
|
1824
|
+
rF = rC / viewingConditions.rgbD[0],
|
|
1825
|
+
gF = gC / viewingConditions.rgbD[1],
|
|
1826
|
+
bF = bC / viewingConditions.rgbD[2];
|
|
1827
|
+
return [1.86206786 * rF - 1.01125463 * gF + .14918677 * bF, .38752654 * rF + .62144744 * gF - .00897398 * bF, -.0158415 * rF - .03412294 * gF + 1.04996444 * bF];
|
|
1828
|
+
}
|
|
1761
1829
|
}
|
|
1762
1830
|
class HctSolver {
|
|
1763
1831
|
static sanitizeRadians(angle) {
|
|
@@ -1950,6 +2018,11 @@
|
|
|
1950
2018
|
const cam = Cam16.fromInt(argb);
|
|
1951
2019
|
this.internalHue = cam.hue, this.internalChroma = cam.chroma, this.internalTone = lstarFromArgb(argb), this.argb = argb;
|
|
1952
2020
|
}
|
|
2021
|
+
inViewingConditions(vc) {
|
|
2022
|
+
const viewedInVc = Cam16.fromInt(this.toInt()).xyzInViewingConditions(vc),
|
|
2023
|
+
recastInVc = Cam16.fromXyzInViewingConditions(viewedInVc[0], viewedInVc[1], viewedInVc[2], ViewingConditions.make());
|
|
2024
|
+
return Hct.from(recastInVc.hue, recastInVc.chroma, lstarFromY(viewedInVc[1]));
|
|
2025
|
+
}
|
|
1953
2026
|
}
|
|
1954
2027
|
class Blend {
|
|
1955
2028
|
static harmonize(designColor, sourceColor) {
|
|
@@ -1978,21 +2051,565 @@
|
|
|
1978
2051
|
return Cam16.fromUcs(jstar, astar, bstar).toInt();
|
|
1979
2052
|
}
|
|
1980
2053
|
}
|
|
2054
|
+
class Contrast {
|
|
2055
|
+
static ratioOfTones(toneA, toneB) {
|
|
2056
|
+
return toneA = clampDouble(0, 100, toneA), toneB = clampDouble(0, 100, toneB), Contrast.ratioOfYs(yFromLstar(toneA), yFromLstar(toneB));
|
|
2057
|
+
}
|
|
2058
|
+
static ratioOfYs(y1, y2) {
|
|
2059
|
+
const lighter = y1 > y2 ? y1 : y2;
|
|
2060
|
+
return (lighter + 5) / ((lighter === y2 ? y1 : y2) + 5);
|
|
2061
|
+
}
|
|
2062
|
+
static lighter(tone, ratio) {
|
|
2063
|
+
if (tone < 0 || tone > 100) return -1;
|
|
2064
|
+
const darkY = yFromLstar(tone),
|
|
2065
|
+
lightY = ratio * (darkY + 5) - 5,
|
|
2066
|
+
realContrast = Contrast.ratioOfYs(lightY, darkY),
|
|
2067
|
+
delta = Math.abs(realContrast - ratio);
|
|
2068
|
+
if (realContrast < ratio && delta > .04) return -1;
|
|
2069
|
+
const returnValue = lstarFromY(lightY) + .4;
|
|
2070
|
+
return returnValue < 0 || returnValue > 100 ? -1 : returnValue;
|
|
2071
|
+
}
|
|
2072
|
+
static darker(tone, ratio) {
|
|
2073
|
+
if (tone < 0 || tone > 100) return -1;
|
|
2074
|
+
const lightY = yFromLstar(tone),
|
|
2075
|
+
darkY = (lightY + 5) / ratio - 5,
|
|
2076
|
+
realContrast = Contrast.ratioOfYs(lightY, darkY),
|
|
2077
|
+
delta = Math.abs(realContrast - ratio);
|
|
2078
|
+
if (realContrast < ratio && delta > .04) return -1;
|
|
2079
|
+
const returnValue = lstarFromY(darkY) - .4;
|
|
2080
|
+
return returnValue < 0 || returnValue > 100 ? -1 : returnValue;
|
|
2081
|
+
}
|
|
2082
|
+
static lighterUnsafe(tone, ratio) {
|
|
2083
|
+
const lighterSafe = Contrast.lighter(tone, ratio);
|
|
2084
|
+
return lighterSafe < 0 ? 100 : lighterSafe;
|
|
2085
|
+
}
|
|
2086
|
+
static darkerUnsafe(tone, ratio) {
|
|
2087
|
+
const darkerSafe = Contrast.darker(tone, ratio);
|
|
2088
|
+
return darkerSafe < 0 ? 0 : darkerSafe;
|
|
2089
|
+
}
|
|
2090
|
+
}
|
|
2091
|
+
class DislikeAnalyzer {
|
|
2092
|
+
static isDisliked(hct) {
|
|
2093
|
+
const huePasses = Math.round(hct.hue) >= 90 && Math.round(hct.hue) <= 111,
|
|
2094
|
+
chromaPasses = Math.round(hct.chroma) > 16,
|
|
2095
|
+
tonePasses = Math.round(hct.tone) < 65;
|
|
2096
|
+
return huePasses && chromaPasses && tonePasses;
|
|
2097
|
+
}
|
|
2098
|
+
static fixIfDisliked(hct) {
|
|
2099
|
+
return DislikeAnalyzer.isDisliked(hct) ? Hct.from(hct.hue, hct.chroma, 70) : hct;
|
|
2100
|
+
}
|
|
2101
|
+
}
|
|
2102
|
+
class DynamicColor {
|
|
2103
|
+
static fromPalette(args) {
|
|
2104
|
+
return new DynamicColor(args.name ?? "", args.palette, args.tone, args.isBackground ?? !1, args.background, args.secondBackground, args.contrastCurve, args.toneDeltaPair);
|
|
2105
|
+
}
|
|
2106
|
+
constructor(name, palette, tone, isBackground, background, secondBackground, contrastCurve, toneDeltaPair) {
|
|
2107
|
+
if (this.name = name, this.palette = palette, this.tone = tone, this.isBackground = isBackground, this.background = background, this.secondBackground = secondBackground, this.contrastCurve = contrastCurve, this.toneDeltaPair = toneDeltaPair, this.hctCache = new Map(), !background && secondBackground) throw new Error(`Color ${name} has secondBackgrounddefined, but background is not defined.`);
|
|
2108
|
+
if (!background && contrastCurve) throw new Error(`Color ${name} has contrastCurvedefined, but background is not defined.`);
|
|
2109
|
+
if (background && !contrastCurve) throw new Error(`Color ${name} has backgrounddefined, but contrastCurve is not defined.`);
|
|
2110
|
+
}
|
|
2111
|
+
getArgb(scheme) {
|
|
2112
|
+
return this.getHct(scheme).toInt();
|
|
2113
|
+
}
|
|
2114
|
+
getHct(scheme) {
|
|
2115
|
+
const cachedAnswer = this.hctCache.get(scheme);
|
|
2116
|
+
if (null != cachedAnswer) return cachedAnswer;
|
|
2117
|
+
const tone = this.getTone(scheme),
|
|
2118
|
+
answer = this.palette(scheme).getHct(tone);
|
|
2119
|
+
return this.hctCache.size > 4 && this.hctCache.clear(), this.hctCache.set(scheme, answer), answer;
|
|
2120
|
+
}
|
|
2121
|
+
getTone(scheme) {
|
|
2122
|
+
const decreasingContrast = scheme.contrastLevel < 0;
|
|
2123
|
+
if (this.toneDeltaPair) {
|
|
2124
|
+
const toneDeltaPair = this.toneDeltaPair(scheme),
|
|
2125
|
+
roleA = toneDeltaPair.roleA,
|
|
2126
|
+
roleB = toneDeltaPair.roleB,
|
|
2127
|
+
delta = toneDeltaPair.delta,
|
|
2128
|
+
polarity = toneDeltaPair.polarity,
|
|
2129
|
+
stayTogether = toneDeltaPair.stayTogether,
|
|
2130
|
+
bgTone = this.background(scheme).getTone(scheme),
|
|
2131
|
+
aIsNearer = "nearer" === polarity || "lighter" === polarity && !scheme.isDark || "darker" === polarity && scheme.isDark,
|
|
2132
|
+
nearer = aIsNearer ? roleA : roleB,
|
|
2133
|
+
farther = aIsNearer ? roleB : roleA,
|
|
2134
|
+
amNearer = this.name === nearer.name,
|
|
2135
|
+
expansionDir = scheme.isDark ? 1 : -1,
|
|
2136
|
+
nContrast = nearer.contrastCurve.getContrast(scheme.contrastLevel),
|
|
2137
|
+
fContrast = farther.contrastCurve.getContrast(scheme.contrastLevel),
|
|
2138
|
+
nInitialTone = nearer.tone(scheme);
|
|
2139
|
+
let nTone = Contrast.ratioOfTones(bgTone, nInitialTone) >= nContrast ? nInitialTone : DynamicColor.foregroundTone(bgTone, nContrast);
|
|
2140
|
+
const fInitialTone = farther.tone(scheme);
|
|
2141
|
+
let fTone = Contrast.ratioOfTones(bgTone, fInitialTone) >= fContrast ? fInitialTone : DynamicColor.foregroundTone(bgTone, fContrast);
|
|
2142
|
+
return decreasingContrast && (nTone = DynamicColor.foregroundTone(bgTone, nContrast), fTone = DynamicColor.foregroundTone(bgTone, fContrast)), (fTone - nTone) * expansionDir >= delta || (fTone = clampDouble(0, 100, nTone + delta * expansionDir), (fTone - nTone) * expansionDir >= delta || (nTone = clampDouble(0, 100, fTone - delta * expansionDir))), 50 <= nTone && nTone < 60 ? expansionDir > 0 ? (nTone = 60, fTone = Math.max(fTone, nTone + delta * expansionDir)) : (nTone = 49, fTone = Math.min(fTone, nTone + delta * expansionDir)) : 50 <= fTone && fTone < 60 && (stayTogether ? expansionDir > 0 ? (nTone = 60, fTone = Math.max(fTone, nTone + delta * expansionDir)) : (nTone = 49, fTone = Math.min(fTone, nTone + delta * expansionDir)) : fTone = expansionDir > 0 ? 60 : 49), amNearer ? nTone : fTone;
|
|
2143
|
+
}
|
|
2144
|
+
{
|
|
2145
|
+
let answer = this.tone(scheme);
|
|
2146
|
+
if (null == this.background) return answer;
|
|
2147
|
+
const bgTone = this.background(scheme).getTone(scheme),
|
|
2148
|
+
desiredRatio = this.contrastCurve.getContrast(scheme.contrastLevel);
|
|
2149
|
+
if (Contrast.ratioOfTones(bgTone, answer) >= desiredRatio || (answer = DynamicColor.foregroundTone(bgTone, desiredRatio)), decreasingContrast && (answer = DynamicColor.foregroundTone(bgTone, desiredRatio)), this.isBackground && 50 <= answer && answer < 60 && (answer = Contrast.ratioOfTones(49, bgTone) >= desiredRatio ? 49 : 60), this.secondBackground) {
|
|
2150
|
+
const [bg1, bg2] = [this.background, this.secondBackground],
|
|
2151
|
+
[bgTone1, bgTone2] = [bg1(scheme).getTone(scheme), bg2(scheme).getTone(scheme)],
|
|
2152
|
+
[upper, lower] = [Math.max(bgTone1, bgTone2), Math.min(bgTone1, bgTone2)];
|
|
2153
|
+
if (Contrast.ratioOfTones(upper, answer) >= desiredRatio && Contrast.ratioOfTones(lower, answer) >= desiredRatio) return answer;
|
|
2154
|
+
const lightOption = Contrast.lighter(upper, desiredRatio),
|
|
2155
|
+
darkOption = Contrast.darker(lower, desiredRatio),
|
|
2156
|
+
availables = [];
|
|
2157
|
+
-1 !== lightOption && availables.push(lightOption), -1 !== darkOption && availables.push(darkOption);
|
|
2158
|
+
return DynamicColor.tonePrefersLightForeground(bgTone1) || DynamicColor.tonePrefersLightForeground(bgTone2) ? lightOption < 0 ? 100 : lightOption : 1 === availables.length ? availables[0] : darkOption < 0 ? 0 : darkOption;
|
|
2159
|
+
}
|
|
2160
|
+
return answer;
|
|
2161
|
+
}
|
|
2162
|
+
}
|
|
2163
|
+
static foregroundTone(bgTone, ratio) {
|
|
2164
|
+
const lighterTone = Contrast.lighterUnsafe(bgTone, ratio),
|
|
2165
|
+
darkerTone = Contrast.darkerUnsafe(bgTone, ratio),
|
|
2166
|
+
lighterRatio = Contrast.ratioOfTones(lighterTone, bgTone),
|
|
2167
|
+
darkerRatio = Contrast.ratioOfTones(darkerTone, bgTone);
|
|
2168
|
+
if (DynamicColor.tonePrefersLightForeground(bgTone)) {
|
|
2169
|
+
const negligibleDifference = Math.abs(lighterRatio - darkerRatio) < .1 && lighterRatio < ratio && darkerRatio < ratio;
|
|
2170
|
+
return lighterRatio >= ratio || lighterRatio >= darkerRatio || negligibleDifference ? lighterTone : darkerTone;
|
|
2171
|
+
}
|
|
2172
|
+
return darkerRatio >= ratio || darkerRatio >= lighterRatio ? darkerTone : lighterTone;
|
|
2173
|
+
}
|
|
2174
|
+
static tonePrefersLightForeground(tone) {
|
|
2175
|
+
return Math.round(tone) < 60;
|
|
2176
|
+
}
|
|
2177
|
+
static toneAllowsLightForeground(tone) {
|
|
2178
|
+
return Math.round(tone) <= 49;
|
|
2179
|
+
}
|
|
2180
|
+
static enableLightForeground(tone) {
|
|
2181
|
+
return DynamicColor.tonePrefersLightForeground(tone) && !DynamicColor.toneAllowsLightForeground(tone) ? 49 : tone;
|
|
2182
|
+
}
|
|
2183
|
+
}
|
|
2184
|
+
var Variant;
|
|
2185
|
+
!function (Variant) {
|
|
2186
|
+
Variant[Variant.MONOCHROME = 0] = "MONOCHROME", Variant[Variant.NEUTRAL = 1] = "NEUTRAL", Variant[Variant.TONAL_SPOT = 2] = "TONAL_SPOT", Variant[Variant.VIBRANT = 3] = "VIBRANT", Variant[Variant.EXPRESSIVE = 4] = "EXPRESSIVE", Variant[Variant.FIDELITY = 5] = "FIDELITY", Variant[Variant.CONTENT = 6] = "CONTENT", Variant[Variant.RAINBOW = 7] = "RAINBOW", Variant[Variant.FRUIT_SALAD = 8] = "FRUIT_SALAD";
|
|
2187
|
+
}(Variant || (Variant = {}));
|
|
2188
|
+
class ContrastCurve {
|
|
2189
|
+
constructor(low, normal, medium, high) {
|
|
2190
|
+
this.low = low, this.normal = normal, this.medium = medium, this.high = high;
|
|
2191
|
+
}
|
|
2192
|
+
getContrast(contrastLevel) {
|
|
2193
|
+
return contrastLevel <= -1 ? this.low : contrastLevel < 0 ? lerp(this.low, this.normal, (contrastLevel - -1) / 1) : contrastLevel < .5 ? lerp(this.normal, this.medium, (contrastLevel - 0) / .5) : contrastLevel < 1 ? lerp(this.medium, this.high, (contrastLevel - .5) / .5) : this.high;
|
|
2194
|
+
}
|
|
2195
|
+
}
|
|
2196
|
+
class ToneDeltaPair {
|
|
2197
|
+
constructor(roleA, roleB, delta, polarity, stayTogether) {
|
|
2198
|
+
this.roleA = roleA, this.roleB = roleB, this.delta = delta, this.polarity = polarity, this.stayTogether = stayTogether;
|
|
2199
|
+
}
|
|
2200
|
+
}
|
|
2201
|
+
function isFidelity(scheme) {
|
|
2202
|
+
return scheme.variant === Variant.FIDELITY || scheme.variant === Variant.CONTENT;
|
|
2203
|
+
}
|
|
2204
|
+
function isMonochrome(scheme) {
|
|
2205
|
+
return scheme.variant === Variant.MONOCHROME;
|
|
2206
|
+
}
|
|
2207
|
+
function findDesiredChromaByTone(hue, chroma, tone, byDecreasingTone) {
|
|
2208
|
+
let answer = tone,
|
|
2209
|
+
closestToChroma = Hct.from(hue, chroma, tone);
|
|
2210
|
+
if (closestToChroma.chroma < chroma) {
|
|
2211
|
+
let chromaPeak = closestToChroma.chroma;
|
|
2212
|
+
for (; closestToChroma.chroma < chroma;) {
|
|
2213
|
+
answer += byDecreasingTone ? -1 : 1;
|
|
2214
|
+
const potentialSolution = Hct.from(hue, chroma, answer);
|
|
2215
|
+
if (chromaPeak > potentialSolution.chroma) break;
|
|
2216
|
+
if (Math.abs(potentialSolution.chroma - chroma) < .4) break;
|
|
2217
|
+
Math.abs(potentialSolution.chroma - chroma) < Math.abs(closestToChroma.chroma - chroma) && (closestToChroma = potentialSolution), chromaPeak = Math.max(chromaPeak, potentialSolution.chroma);
|
|
2218
|
+
}
|
|
2219
|
+
}
|
|
2220
|
+
return answer;
|
|
2221
|
+
}
|
|
2222
|
+
function viewingConditionsForAlbers(scheme) {
|
|
2223
|
+
return ViewingConditions.make(void 0, void 0, scheme.isDark ? 30 : 80, void 0, void 0);
|
|
2224
|
+
}
|
|
2225
|
+
function performAlbers(prealbers, scheme) {
|
|
2226
|
+
const albersd = prealbers.inViewingConditions(viewingConditionsForAlbers(scheme));
|
|
2227
|
+
return DynamicColor.tonePrefersLightForeground(prealbers.tone) && !DynamicColor.toneAllowsLightForeground(albersd.tone) ? DynamicColor.enableLightForeground(prealbers.tone) : DynamicColor.enableLightForeground(albersd.tone);
|
|
2228
|
+
}
|
|
2229
|
+
class MaterialDynamicColors {
|
|
2230
|
+
static highestSurface(s) {
|
|
2231
|
+
return s.isDark ? MaterialDynamicColors.surfaceBright : MaterialDynamicColors.surfaceDim;
|
|
2232
|
+
}
|
|
2233
|
+
}
|
|
2234
|
+
MaterialDynamicColors.contentAccentToneDelta = 15, MaterialDynamicColors.primaryPaletteKeyColor = DynamicColor.fromPalette({
|
|
2235
|
+
name: "primary_palette_key_color",
|
|
2236
|
+
palette: s => s.primaryPalette,
|
|
2237
|
+
tone: s => s.primaryPalette.keyColor.tone
|
|
2238
|
+
}), MaterialDynamicColors.secondaryPaletteKeyColor = DynamicColor.fromPalette({
|
|
2239
|
+
name: "secondary_palette_key_color",
|
|
2240
|
+
palette: s => s.secondaryPalette,
|
|
2241
|
+
tone: s => s.secondaryPalette.keyColor.tone
|
|
2242
|
+
}), MaterialDynamicColors.tertiaryPaletteKeyColor = DynamicColor.fromPalette({
|
|
2243
|
+
name: "tertiary_palette_key_color",
|
|
2244
|
+
palette: s => s.tertiaryPalette,
|
|
2245
|
+
tone: s => s.tertiaryPalette.keyColor.tone
|
|
2246
|
+
}), MaterialDynamicColors.neutralPaletteKeyColor = DynamicColor.fromPalette({
|
|
2247
|
+
name: "neutral_palette_key_color",
|
|
2248
|
+
palette: s => s.neutralPalette,
|
|
2249
|
+
tone: s => s.neutralPalette.keyColor.tone
|
|
2250
|
+
}), MaterialDynamicColors.neutralVariantPaletteKeyColor = DynamicColor.fromPalette({
|
|
2251
|
+
name: "neutral_variant_palette_key_color",
|
|
2252
|
+
palette: s => s.neutralVariantPalette,
|
|
2253
|
+
tone: s => s.neutralVariantPalette.keyColor.tone
|
|
2254
|
+
}), MaterialDynamicColors.background = DynamicColor.fromPalette({
|
|
2255
|
+
name: "background",
|
|
2256
|
+
palette: s => s.neutralPalette,
|
|
2257
|
+
tone: s => s.isDark ? 6 : 98,
|
|
2258
|
+
isBackground: !0
|
|
2259
|
+
}), MaterialDynamicColors.onBackground = DynamicColor.fromPalette({
|
|
2260
|
+
name: "on_background",
|
|
2261
|
+
palette: s => s.neutralPalette,
|
|
2262
|
+
tone: s => s.isDark ? 90 : 10,
|
|
2263
|
+
background: s => MaterialDynamicColors.background,
|
|
2264
|
+
contrastCurve: new ContrastCurve(3, 3, 4.5, 7)
|
|
2265
|
+
}), MaterialDynamicColors.surface = DynamicColor.fromPalette({
|
|
2266
|
+
name: "surface",
|
|
2267
|
+
palette: s => s.neutralPalette,
|
|
2268
|
+
tone: s => s.isDark ? 6 : 98,
|
|
2269
|
+
isBackground: !0
|
|
2270
|
+
}), MaterialDynamicColors.surfaceDim = DynamicColor.fromPalette({
|
|
2271
|
+
name: "surface_dim",
|
|
2272
|
+
palette: s => s.neutralPalette,
|
|
2273
|
+
tone: s => s.isDark ? 6 : 87,
|
|
2274
|
+
isBackground: !0
|
|
2275
|
+
}), MaterialDynamicColors.surfaceBright = DynamicColor.fromPalette({
|
|
2276
|
+
name: "surface_bright",
|
|
2277
|
+
palette: s => s.neutralPalette,
|
|
2278
|
+
tone: s => s.isDark ? 24 : 98,
|
|
2279
|
+
isBackground: !0
|
|
2280
|
+
}), MaterialDynamicColors.surfaceContainerLowest = DynamicColor.fromPalette({
|
|
2281
|
+
name: "surface_container_lowest",
|
|
2282
|
+
palette: s => s.neutralPalette,
|
|
2283
|
+
tone: s => s.isDark ? 4 : 100,
|
|
2284
|
+
isBackground: !0
|
|
2285
|
+
}), MaterialDynamicColors.surfaceContainerLow = DynamicColor.fromPalette({
|
|
2286
|
+
name: "surface_container_low",
|
|
2287
|
+
palette: s => s.neutralPalette,
|
|
2288
|
+
tone: s => s.isDark ? 10 : 96,
|
|
2289
|
+
isBackground: !0
|
|
2290
|
+
}), MaterialDynamicColors.surfaceContainer = DynamicColor.fromPalette({
|
|
2291
|
+
name: "surface_container",
|
|
2292
|
+
palette: s => s.neutralPalette,
|
|
2293
|
+
tone: s => s.isDark ? 12 : 94,
|
|
2294
|
+
isBackground: !0
|
|
2295
|
+
}), MaterialDynamicColors.surfaceContainerHigh = DynamicColor.fromPalette({
|
|
2296
|
+
name: "surface_container_high",
|
|
2297
|
+
palette: s => s.neutralPalette,
|
|
2298
|
+
tone: s => s.isDark ? 17 : 92,
|
|
2299
|
+
isBackground: !0
|
|
2300
|
+
}), MaterialDynamicColors.surfaceContainerHighest = DynamicColor.fromPalette({
|
|
2301
|
+
name: "surface_container_highest",
|
|
2302
|
+
palette: s => s.neutralPalette,
|
|
2303
|
+
tone: s => s.isDark ? 22 : 90,
|
|
2304
|
+
isBackground: !0
|
|
2305
|
+
}), MaterialDynamicColors.onSurface = DynamicColor.fromPalette({
|
|
2306
|
+
name: "on_surface",
|
|
2307
|
+
palette: s => s.neutralPalette,
|
|
2308
|
+
tone: s => s.isDark ? 90 : 10,
|
|
2309
|
+
background: s => MaterialDynamicColors.highestSurface(s),
|
|
2310
|
+
contrastCurve: new ContrastCurve(4.5, 7, 11, 21)
|
|
2311
|
+
}), MaterialDynamicColors.surfaceVariant = DynamicColor.fromPalette({
|
|
2312
|
+
name: "surface_variant",
|
|
2313
|
+
palette: s => s.neutralVariantPalette,
|
|
2314
|
+
tone: s => s.isDark ? 30 : 90,
|
|
2315
|
+
isBackground: !0
|
|
2316
|
+
}), MaterialDynamicColors.onSurfaceVariant = DynamicColor.fromPalette({
|
|
2317
|
+
name: "on_surface_variant",
|
|
2318
|
+
palette: s => s.neutralVariantPalette,
|
|
2319
|
+
tone: s => s.isDark ? 80 : 30,
|
|
2320
|
+
background: s => MaterialDynamicColors.highestSurface(s),
|
|
2321
|
+
contrastCurve: new ContrastCurve(3, 4.5, 7, 11)
|
|
2322
|
+
}), MaterialDynamicColors.inverseSurface = DynamicColor.fromPalette({
|
|
2323
|
+
name: "inverse_surface",
|
|
2324
|
+
palette: s => s.neutralPalette,
|
|
2325
|
+
tone: s => s.isDark ? 90 : 20
|
|
2326
|
+
}), MaterialDynamicColors.inverseOnSurface = DynamicColor.fromPalette({
|
|
2327
|
+
name: "inverse_on_surface",
|
|
2328
|
+
palette: s => s.neutralPalette,
|
|
2329
|
+
tone: s => s.isDark ? 20 : 95,
|
|
2330
|
+
background: s => MaterialDynamicColors.inverseSurface,
|
|
2331
|
+
contrastCurve: new ContrastCurve(4.5, 7, 11, 21)
|
|
2332
|
+
}), MaterialDynamicColors.outline = DynamicColor.fromPalette({
|
|
2333
|
+
name: "outline",
|
|
2334
|
+
palette: s => s.neutralVariantPalette,
|
|
2335
|
+
tone: s => s.isDark ? 60 : 50,
|
|
2336
|
+
background: s => MaterialDynamicColors.highestSurface(s),
|
|
2337
|
+
contrastCurve: new ContrastCurve(1.5, 3, 4.5, 7)
|
|
2338
|
+
}), MaterialDynamicColors.outlineVariant = DynamicColor.fromPalette({
|
|
2339
|
+
name: "outline_variant",
|
|
2340
|
+
palette: s => s.neutralVariantPalette,
|
|
2341
|
+
tone: s => s.isDark ? 30 : 80,
|
|
2342
|
+
background: s => MaterialDynamicColors.highestSurface(s),
|
|
2343
|
+
contrastCurve: new ContrastCurve(1, 1, 3, 7)
|
|
2344
|
+
}), MaterialDynamicColors.shadow = DynamicColor.fromPalette({
|
|
2345
|
+
name: "shadow",
|
|
2346
|
+
palette: s => s.neutralPalette,
|
|
2347
|
+
tone: s => 0
|
|
2348
|
+
}), MaterialDynamicColors.scrim = DynamicColor.fromPalette({
|
|
2349
|
+
name: "scrim",
|
|
2350
|
+
palette: s => s.neutralPalette,
|
|
2351
|
+
tone: s => 0
|
|
2352
|
+
}), MaterialDynamicColors.surfaceTint = DynamicColor.fromPalette({
|
|
2353
|
+
name: "surface_tint",
|
|
2354
|
+
palette: s => s.primaryPalette,
|
|
2355
|
+
tone: s => s.isDark ? 80 : 40,
|
|
2356
|
+
isBackground: !0
|
|
2357
|
+
}), MaterialDynamicColors.primary = DynamicColor.fromPalette({
|
|
2358
|
+
name: "primary",
|
|
2359
|
+
palette: s => s.primaryPalette,
|
|
2360
|
+
tone: s => isMonochrome(s) ? s.isDark ? 100 : 0 : s.isDark ? 80 : 40,
|
|
2361
|
+
isBackground: !0,
|
|
2362
|
+
background: s => MaterialDynamicColors.highestSurface(s),
|
|
2363
|
+
contrastCurve: new ContrastCurve(3, 4.5, 7, 11),
|
|
2364
|
+
toneDeltaPair: s => new ToneDeltaPair(MaterialDynamicColors.primaryContainer, MaterialDynamicColors.primary, 15, "nearer", !1)
|
|
2365
|
+
}), MaterialDynamicColors.onPrimary = DynamicColor.fromPalette({
|
|
2366
|
+
name: "on_primary",
|
|
2367
|
+
palette: s => s.primaryPalette,
|
|
2368
|
+
tone: s => isMonochrome(s) ? s.isDark ? 10 : 90 : s.isDark ? 20 : 100,
|
|
2369
|
+
background: s => MaterialDynamicColors.primary,
|
|
2370
|
+
contrastCurve: new ContrastCurve(4.5, 7, 11, 21)
|
|
2371
|
+
}), MaterialDynamicColors.primaryContainer = DynamicColor.fromPalette({
|
|
2372
|
+
name: "primary_container",
|
|
2373
|
+
palette: s => s.primaryPalette,
|
|
2374
|
+
tone: s => isFidelity(s) ? performAlbers(s.sourceColorHct, s) : isMonochrome(s) ? s.isDark ? 85 : 25 : s.isDark ? 30 : 90,
|
|
2375
|
+
isBackground: !0,
|
|
2376
|
+
background: s => MaterialDynamicColors.highestSurface(s),
|
|
2377
|
+
contrastCurve: new ContrastCurve(1, 1, 3, 7),
|
|
2378
|
+
toneDeltaPair: s => new ToneDeltaPair(MaterialDynamicColors.primaryContainer, MaterialDynamicColors.primary, 15, "nearer", !1)
|
|
2379
|
+
}), MaterialDynamicColors.onPrimaryContainer = DynamicColor.fromPalette({
|
|
2380
|
+
name: "on_primary_container",
|
|
2381
|
+
palette: s => s.primaryPalette,
|
|
2382
|
+
tone: s => isFidelity(s) ? DynamicColor.foregroundTone(MaterialDynamicColors.primaryContainer.tone(s), 4.5) : isMonochrome(s) ? s.isDark ? 0 : 100 : s.isDark ? 90 : 10,
|
|
2383
|
+
background: s => MaterialDynamicColors.primaryContainer,
|
|
2384
|
+
contrastCurve: new ContrastCurve(4.5, 7, 11, 21)
|
|
2385
|
+
}), MaterialDynamicColors.inversePrimary = DynamicColor.fromPalette({
|
|
2386
|
+
name: "inverse_primary",
|
|
2387
|
+
palette: s => s.primaryPalette,
|
|
2388
|
+
tone: s => s.isDark ? 40 : 80,
|
|
2389
|
+
background: s => MaterialDynamicColors.inverseSurface,
|
|
2390
|
+
contrastCurve: new ContrastCurve(3, 4.5, 7, 11)
|
|
2391
|
+
}), MaterialDynamicColors.secondary = DynamicColor.fromPalette({
|
|
2392
|
+
name: "secondary",
|
|
2393
|
+
palette: s => s.secondaryPalette,
|
|
2394
|
+
tone: s => s.isDark ? 80 : 40,
|
|
2395
|
+
isBackground: !0,
|
|
2396
|
+
background: s => MaterialDynamicColors.highestSurface(s),
|
|
2397
|
+
contrastCurve: new ContrastCurve(3, 4.5, 7, 11),
|
|
2398
|
+
toneDeltaPair: s => new ToneDeltaPair(MaterialDynamicColors.secondaryContainer, MaterialDynamicColors.secondary, 15, "nearer", !1)
|
|
2399
|
+
}), MaterialDynamicColors.onSecondary = DynamicColor.fromPalette({
|
|
2400
|
+
name: "on_secondary",
|
|
2401
|
+
palette: s => s.secondaryPalette,
|
|
2402
|
+
tone: s => isMonochrome(s) ? s.isDark ? 10 : 100 : s.isDark ? 20 : 100,
|
|
2403
|
+
background: s => MaterialDynamicColors.secondary,
|
|
2404
|
+
contrastCurve: new ContrastCurve(4.5, 7, 11, 21)
|
|
2405
|
+
}), MaterialDynamicColors.secondaryContainer = DynamicColor.fromPalette({
|
|
2406
|
+
name: "secondary_container",
|
|
2407
|
+
palette: s => s.secondaryPalette,
|
|
2408
|
+
tone: s => {
|
|
2409
|
+
const initialTone = s.isDark ? 30 : 90;
|
|
2410
|
+
if (isMonochrome(s)) return s.isDark ? 30 : 85;
|
|
2411
|
+
if (!isFidelity(s)) return initialTone;
|
|
2412
|
+
let answer = findDesiredChromaByTone(s.secondaryPalette.hue, s.secondaryPalette.chroma, initialTone, !s.isDark);
|
|
2413
|
+
return answer = performAlbers(s.secondaryPalette.getHct(answer), s), answer;
|
|
2414
|
+
},
|
|
2415
|
+
isBackground: !0,
|
|
2416
|
+
background: s => MaterialDynamicColors.highestSurface(s),
|
|
2417
|
+
contrastCurve: new ContrastCurve(1, 1, 3, 7),
|
|
2418
|
+
toneDeltaPair: s => new ToneDeltaPair(MaterialDynamicColors.secondaryContainer, MaterialDynamicColors.secondary, 15, "nearer", !1)
|
|
2419
|
+
}), MaterialDynamicColors.onSecondaryContainer = DynamicColor.fromPalette({
|
|
2420
|
+
name: "on_secondary_container",
|
|
2421
|
+
palette: s => s.secondaryPalette,
|
|
2422
|
+
tone: s => isFidelity(s) ? DynamicColor.foregroundTone(MaterialDynamicColors.secondaryContainer.tone(s), 4.5) : s.isDark ? 90 : 10,
|
|
2423
|
+
background: s => MaterialDynamicColors.secondaryContainer,
|
|
2424
|
+
contrastCurve: new ContrastCurve(4.5, 7, 11, 21)
|
|
2425
|
+
}), MaterialDynamicColors.tertiary = DynamicColor.fromPalette({
|
|
2426
|
+
name: "tertiary",
|
|
2427
|
+
palette: s => s.tertiaryPalette,
|
|
2428
|
+
tone: s => isMonochrome(s) ? s.isDark ? 90 : 25 : s.isDark ? 80 : 40,
|
|
2429
|
+
isBackground: !0,
|
|
2430
|
+
background: s => MaterialDynamicColors.highestSurface(s),
|
|
2431
|
+
contrastCurve: new ContrastCurve(3, 4.5, 7, 11),
|
|
2432
|
+
toneDeltaPair: s => new ToneDeltaPair(MaterialDynamicColors.tertiaryContainer, MaterialDynamicColors.tertiary, 15, "nearer", !1)
|
|
2433
|
+
}), MaterialDynamicColors.onTertiary = DynamicColor.fromPalette({
|
|
2434
|
+
name: "on_tertiary",
|
|
2435
|
+
palette: s => s.tertiaryPalette,
|
|
2436
|
+
tone: s => isMonochrome(s) ? s.isDark ? 10 : 90 : s.isDark ? 20 : 100,
|
|
2437
|
+
background: s => MaterialDynamicColors.tertiary,
|
|
2438
|
+
contrastCurve: new ContrastCurve(4.5, 7, 11, 21)
|
|
2439
|
+
}), MaterialDynamicColors.tertiaryContainer = DynamicColor.fromPalette({
|
|
2440
|
+
name: "tertiary_container",
|
|
2441
|
+
palette: s => s.tertiaryPalette,
|
|
2442
|
+
tone: s => {
|
|
2443
|
+
if (isMonochrome(s)) return s.isDark ? 60 : 49;
|
|
2444
|
+
if (!isFidelity(s)) return s.isDark ? 30 : 90;
|
|
2445
|
+
const albersTone = performAlbers(s.tertiaryPalette.getHct(s.sourceColorHct.tone), s),
|
|
2446
|
+
proposedHct = s.tertiaryPalette.getHct(albersTone);
|
|
2447
|
+
return DislikeAnalyzer.fixIfDisliked(proposedHct).tone;
|
|
2448
|
+
},
|
|
2449
|
+
isBackground: !0,
|
|
2450
|
+
background: s => MaterialDynamicColors.highestSurface(s),
|
|
2451
|
+
contrastCurve: new ContrastCurve(1, 1, 3, 7),
|
|
2452
|
+
toneDeltaPair: s => new ToneDeltaPair(MaterialDynamicColors.tertiaryContainer, MaterialDynamicColors.tertiary, 15, "nearer", !1)
|
|
2453
|
+
}), MaterialDynamicColors.onTertiaryContainer = DynamicColor.fromPalette({
|
|
2454
|
+
name: "on_tertiary_container",
|
|
2455
|
+
palette: s => s.tertiaryPalette,
|
|
2456
|
+
tone: s => isMonochrome(s) ? s.isDark ? 0 : 100 : isFidelity(s) ? DynamicColor.foregroundTone(MaterialDynamicColors.tertiaryContainer.tone(s), 4.5) : s.isDark ? 90 : 10,
|
|
2457
|
+
background: s => MaterialDynamicColors.tertiaryContainer,
|
|
2458
|
+
contrastCurve: new ContrastCurve(4.5, 7, 11, 21)
|
|
2459
|
+
}), MaterialDynamicColors.error = DynamicColor.fromPalette({
|
|
2460
|
+
name: "error",
|
|
2461
|
+
palette: s => s.errorPalette,
|
|
2462
|
+
tone: s => s.isDark ? 80 : 40,
|
|
2463
|
+
isBackground: !0,
|
|
2464
|
+
background: s => MaterialDynamicColors.highestSurface(s),
|
|
2465
|
+
contrastCurve: new ContrastCurve(3, 4.5, 7, 11),
|
|
2466
|
+
toneDeltaPair: s => new ToneDeltaPair(MaterialDynamicColors.errorContainer, MaterialDynamicColors.error, 15, "nearer", !1)
|
|
2467
|
+
}), MaterialDynamicColors.onError = DynamicColor.fromPalette({
|
|
2468
|
+
name: "on_error",
|
|
2469
|
+
palette: s => s.errorPalette,
|
|
2470
|
+
tone: s => s.isDark ? 20 : 100,
|
|
2471
|
+
background: s => MaterialDynamicColors.error,
|
|
2472
|
+
contrastCurve: new ContrastCurve(4.5, 7, 11, 21)
|
|
2473
|
+
}), MaterialDynamicColors.errorContainer = DynamicColor.fromPalette({
|
|
2474
|
+
name: "error_container",
|
|
2475
|
+
palette: s => s.errorPalette,
|
|
2476
|
+
tone: s => s.isDark ? 30 : 90,
|
|
2477
|
+
isBackground: !0,
|
|
2478
|
+
background: s => MaterialDynamicColors.highestSurface(s),
|
|
2479
|
+
contrastCurve: new ContrastCurve(1, 1, 3, 7),
|
|
2480
|
+
toneDeltaPair: s => new ToneDeltaPair(MaterialDynamicColors.errorContainer, MaterialDynamicColors.error, 15, "nearer", !1)
|
|
2481
|
+
}), MaterialDynamicColors.onErrorContainer = DynamicColor.fromPalette({
|
|
2482
|
+
name: "on_error_container",
|
|
2483
|
+
palette: s => s.errorPalette,
|
|
2484
|
+
tone: s => s.isDark ? 90 : 10,
|
|
2485
|
+
background: s => MaterialDynamicColors.errorContainer,
|
|
2486
|
+
contrastCurve: new ContrastCurve(4.5, 7, 11, 21)
|
|
2487
|
+
}), MaterialDynamicColors.primaryFixed = DynamicColor.fromPalette({
|
|
2488
|
+
name: "primary_fixed",
|
|
2489
|
+
palette: s => s.primaryPalette,
|
|
2490
|
+
tone: s => isMonochrome(s) ? 40 : 90,
|
|
2491
|
+
isBackground: !0,
|
|
2492
|
+
background: s => MaterialDynamicColors.highestSurface(s),
|
|
2493
|
+
contrastCurve: new ContrastCurve(1, 1, 3, 7),
|
|
2494
|
+
toneDeltaPair: s => new ToneDeltaPair(MaterialDynamicColors.primaryFixed, MaterialDynamicColors.primaryFixedDim, 10, "lighter", !0)
|
|
2495
|
+
}), MaterialDynamicColors.primaryFixedDim = DynamicColor.fromPalette({
|
|
2496
|
+
name: "primary_fixed_dim",
|
|
2497
|
+
palette: s => s.primaryPalette,
|
|
2498
|
+
tone: s => isMonochrome(s) ? 30 : 80,
|
|
2499
|
+
isBackground: !0,
|
|
2500
|
+
background: s => MaterialDynamicColors.highestSurface(s),
|
|
2501
|
+
contrastCurve: new ContrastCurve(1, 1, 3, 7),
|
|
2502
|
+
toneDeltaPair: s => new ToneDeltaPair(MaterialDynamicColors.primaryFixed, MaterialDynamicColors.primaryFixedDim, 10, "lighter", !0)
|
|
2503
|
+
}), MaterialDynamicColors.onPrimaryFixed = DynamicColor.fromPalette({
|
|
2504
|
+
name: "on_primary_fixed",
|
|
2505
|
+
palette: s => s.primaryPalette,
|
|
2506
|
+
tone: s => isMonochrome(s) ? 100 : 10,
|
|
2507
|
+
background: s => MaterialDynamicColors.primaryFixedDim,
|
|
2508
|
+
secondBackground: s => MaterialDynamicColors.primaryFixed,
|
|
2509
|
+
contrastCurve: new ContrastCurve(4.5, 7, 11, 21)
|
|
2510
|
+
}), MaterialDynamicColors.onPrimaryFixedVariant = DynamicColor.fromPalette({
|
|
2511
|
+
name: "on_primary_fixed_variant",
|
|
2512
|
+
palette: s => s.primaryPalette,
|
|
2513
|
+
tone: s => isMonochrome(s) ? 90 : 30,
|
|
2514
|
+
background: s => MaterialDynamicColors.primaryFixedDim,
|
|
2515
|
+
secondBackground: s => MaterialDynamicColors.primaryFixed,
|
|
2516
|
+
contrastCurve: new ContrastCurve(3, 4.5, 7, 11)
|
|
2517
|
+
}), MaterialDynamicColors.secondaryFixed = DynamicColor.fromPalette({
|
|
2518
|
+
name: "secondary_fixed",
|
|
2519
|
+
palette: s => s.secondaryPalette,
|
|
2520
|
+
tone: s => isMonochrome(s) ? 80 : 90,
|
|
2521
|
+
isBackground: !0,
|
|
2522
|
+
background: s => MaterialDynamicColors.highestSurface(s),
|
|
2523
|
+
contrastCurve: new ContrastCurve(1, 1, 3, 7),
|
|
2524
|
+
toneDeltaPair: s => new ToneDeltaPair(MaterialDynamicColors.secondaryFixed, MaterialDynamicColors.secondaryFixedDim, 10, "lighter", !0)
|
|
2525
|
+
}), MaterialDynamicColors.secondaryFixedDim = DynamicColor.fromPalette({
|
|
2526
|
+
name: "secondary_fixed_dim",
|
|
2527
|
+
palette: s => s.secondaryPalette,
|
|
2528
|
+
tone: s => isMonochrome(s) ? 70 : 80,
|
|
2529
|
+
isBackground: !0,
|
|
2530
|
+
background: s => MaterialDynamicColors.highestSurface(s),
|
|
2531
|
+
contrastCurve: new ContrastCurve(1, 1, 3, 7),
|
|
2532
|
+
toneDeltaPair: s => new ToneDeltaPair(MaterialDynamicColors.secondaryFixed, MaterialDynamicColors.secondaryFixedDim, 10, "lighter", !0)
|
|
2533
|
+
}), MaterialDynamicColors.onSecondaryFixed = DynamicColor.fromPalette({
|
|
2534
|
+
name: "on_secondary_fixed",
|
|
2535
|
+
palette: s => s.secondaryPalette,
|
|
2536
|
+
tone: s => 10,
|
|
2537
|
+
background: s => MaterialDynamicColors.secondaryFixedDim,
|
|
2538
|
+
secondBackground: s => MaterialDynamicColors.secondaryFixed,
|
|
2539
|
+
contrastCurve: new ContrastCurve(4.5, 7, 11, 21)
|
|
2540
|
+
}), MaterialDynamicColors.onSecondaryFixedVariant = DynamicColor.fromPalette({
|
|
2541
|
+
name: "on_secondary_fixed_variant",
|
|
2542
|
+
palette: s => s.secondaryPalette,
|
|
2543
|
+
tone: s => isMonochrome(s) ? 25 : 30,
|
|
2544
|
+
background: s => MaterialDynamicColors.secondaryFixedDim,
|
|
2545
|
+
secondBackground: s => MaterialDynamicColors.secondaryFixed,
|
|
2546
|
+
contrastCurve: new ContrastCurve(3, 4.5, 7, 11)
|
|
2547
|
+
}), MaterialDynamicColors.tertiaryFixed = DynamicColor.fromPalette({
|
|
2548
|
+
name: "tertiary_fixed",
|
|
2549
|
+
palette: s => s.tertiaryPalette,
|
|
2550
|
+
tone: s => isMonochrome(s) ? 40 : 90,
|
|
2551
|
+
isBackground: !0,
|
|
2552
|
+
background: s => MaterialDynamicColors.highestSurface(s),
|
|
2553
|
+
contrastCurve: new ContrastCurve(1, 1, 3, 7),
|
|
2554
|
+
toneDeltaPair: s => new ToneDeltaPair(MaterialDynamicColors.tertiaryFixed, MaterialDynamicColors.tertiaryFixedDim, 10, "lighter", !0)
|
|
2555
|
+
}), MaterialDynamicColors.tertiaryFixedDim = DynamicColor.fromPalette({
|
|
2556
|
+
name: "tertiary_fixed_dim",
|
|
2557
|
+
palette: s => s.tertiaryPalette,
|
|
2558
|
+
tone: s => isMonochrome(s) ? 30 : 80,
|
|
2559
|
+
isBackground: !0,
|
|
2560
|
+
background: s => MaterialDynamicColors.highestSurface(s),
|
|
2561
|
+
contrastCurve: new ContrastCurve(1, 1, 3, 7),
|
|
2562
|
+
toneDeltaPair: s => new ToneDeltaPair(MaterialDynamicColors.tertiaryFixed, MaterialDynamicColors.tertiaryFixedDim, 10, "lighter", !0)
|
|
2563
|
+
}), MaterialDynamicColors.onTertiaryFixed = DynamicColor.fromPalette({
|
|
2564
|
+
name: "on_tertiary_fixed",
|
|
2565
|
+
palette: s => s.tertiaryPalette,
|
|
2566
|
+
tone: s => isMonochrome(s) ? 100 : 10,
|
|
2567
|
+
background: s => MaterialDynamicColors.tertiaryFixedDim,
|
|
2568
|
+
secondBackground: s => MaterialDynamicColors.tertiaryFixed,
|
|
2569
|
+
contrastCurve: new ContrastCurve(4.5, 7, 11, 21)
|
|
2570
|
+
}), MaterialDynamicColors.onTertiaryFixedVariant = DynamicColor.fromPalette({
|
|
2571
|
+
name: "on_tertiary_fixed_variant",
|
|
2572
|
+
palette: s => s.tertiaryPalette,
|
|
2573
|
+
tone: s => isMonochrome(s) ? 90 : 30,
|
|
2574
|
+
background: s => MaterialDynamicColors.tertiaryFixedDim,
|
|
2575
|
+
secondBackground: s => MaterialDynamicColors.tertiaryFixed,
|
|
2576
|
+
contrastCurve: new ContrastCurve(3, 4.5, 7, 11)
|
|
2577
|
+
});
|
|
1981
2578
|
class TonalPalette {
|
|
1982
2579
|
static fromInt(argb) {
|
|
1983
2580
|
const hct = Hct.fromInt(argb);
|
|
1984
|
-
return TonalPalette.
|
|
2581
|
+
return TonalPalette.fromHct(hct);
|
|
2582
|
+
}
|
|
2583
|
+
static fromHct(hct) {
|
|
2584
|
+
return new TonalPalette(hct.hue, hct.chroma, hct);
|
|
1985
2585
|
}
|
|
1986
2586
|
static fromHueAndChroma(hue, chroma) {
|
|
1987
|
-
return new TonalPalette(hue, chroma);
|
|
2587
|
+
return new TonalPalette(hue, chroma, TonalPalette.createKeyColor(hue, chroma));
|
|
1988
2588
|
}
|
|
1989
|
-
constructor(hue, chroma) {
|
|
1990
|
-
this.hue = hue, this.chroma = chroma, this.cache = new Map();
|
|
2589
|
+
constructor(hue, chroma, keyColor) {
|
|
2590
|
+
this.hue = hue, this.chroma = chroma, this.keyColor = keyColor, this.cache = new Map();
|
|
2591
|
+
}
|
|
2592
|
+
static createKeyColor(hue, chroma) {
|
|
2593
|
+
let smallestDeltaHct = Hct.from(hue, chroma, 50),
|
|
2594
|
+
smallestDelta = Math.abs(smallestDeltaHct.chroma - chroma);
|
|
2595
|
+
for (let delta = 1; delta < 50; delta += 1) {
|
|
2596
|
+
if (Math.round(chroma) === Math.round(smallestDeltaHct.chroma)) return smallestDeltaHct;
|
|
2597
|
+
const hctAdd = Hct.from(hue, chroma, 50 + delta),
|
|
2598
|
+
hctAddDelta = Math.abs(hctAdd.chroma - chroma);
|
|
2599
|
+
hctAddDelta < smallestDelta && (smallestDelta = hctAddDelta, smallestDeltaHct = hctAdd);
|
|
2600
|
+
const hctSubtract = Hct.from(hue, chroma, 50 - delta),
|
|
2601
|
+
hctSubtractDelta = Math.abs(hctSubtract.chroma - chroma);
|
|
2602
|
+
hctSubtractDelta < smallestDelta && (smallestDelta = hctSubtractDelta, smallestDeltaHct = hctSubtract);
|
|
2603
|
+
}
|
|
2604
|
+
return smallestDeltaHct;
|
|
1991
2605
|
}
|
|
1992
2606
|
tone(tone) {
|
|
1993
2607
|
let argb = this.cache.get(tone);
|
|
1994
2608
|
return void 0 === argb && (argb = Hct.from(this.hue, this.chroma, tone).toInt(), this.cache.set(tone, argb)), argb;
|
|
1995
2609
|
}
|
|
2610
|
+
getHct(tone) {
|
|
2611
|
+
return Hct.fromInt(this.tone(tone));
|
|
2612
|
+
}
|
|
1996
2613
|
}
|
|
1997
2614
|
class CorePalette {
|
|
1998
2615
|
static of(argb) {
|
|
@@ -3600,6 +4217,7 @@
|
|
|
3600
4217
|
};
|
|
3601
4218
|
|
|
3602
4219
|
/* eslint-disable no-underscore-dangle */
|
|
4220
|
+
|
|
3603
4221
|
class Framework7 extends Framework7Class {
|
|
3604
4222
|
constructor(params) {
|
|
3605
4223
|
if (params === void 0) {
|
|
@@ -3721,7 +4339,7 @@
|
|
|
3721
4339
|
const document = getDocument$1();
|
|
3722
4340
|
if (!app.colorsStyleEl) {
|
|
3723
4341
|
app.colorsStyleEl = document.createElement('style');
|
|
3724
|
-
document.head.
|
|
4342
|
+
document.head.prepend(app.colorsStyleEl);
|
|
3725
4343
|
}
|
|
3726
4344
|
app.colorsStyleEl.textContent = app.utils.colorThemeCSSStyles(app.colors);
|
|
3727
4345
|
}
|
|
@@ -3781,8 +4399,8 @@
|
|
|
3781
4399
|
const app = this;
|
|
3782
4400
|
const html = document.querySelector('html');
|
|
3783
4401
|
if (app.mq.dark && app.mq.light) {
|
|
3784
|
-
app.mq.dark.
|
|
3785
|
-
app.mq.light.
|
|
4402
|
+
app.mq.dark.addEventListener('change', app.colorSchemeListener);
|
|
4403
|
+
app.mq.light.addEventListener('change', app.colorSchemeListener);
|
|
3786
4404
|
}
|
|
3787
4405
|
if (app.mq.dark && app.mq.dark.matches) {
|
|
3788
4406
|
html.classList.add('dark');
|
|
@@ -3798,8 +4416,8 @@
|
|
|
3798
4416
|
const window = getWindow$1();
|
|
3799
4417
|
if (!window.matchMedia) return;
|
|
3800
4418
|
const app = this;
|
|
3801
|
-
if (app.mq.dark) app.mq.dark.
|
|
3802
|
-
if (app.mq.light) app.mq.light.
|
|
4419
|
+
if (app.mq.dark) app.mq.dark.removeEventListener('change', app.colorSchemeListener);
|
|
4420
|
+
if (app.mq.light) app.mq.light.removeEventListener('change', app.colorSchemeListener);
|
|
3803
4421
|
}
|
|
3804
4422
|
setDarkMode(mode) {
|
|
3805
4423
|
const app = this;
|
|
@@ -4594,7 +5212,7 @@
|
|
|
4594
5212
|
}
|
|
4595
5213
|
break;
|
|
4596
5214
|
}
|
|
4597
|
-
if (!name) throw new TypeError("Missing parameter name at "
|
|
5215
|
+
if (!name) throw new TypeError("Missing parameter name at ".concat(i));
|
|
4598
5216
|
tokens.push({
|
|
4599
5217
|
type: "NAME",
|
|
4600
5218
|
index: i,
|
|
@@ -4608,7 +5226,7 @@
|
|
|
4608
5226
|
var pattern = "";
|
|
4609
5227
|
var j = i + 1;
|
|
4610
5228
|
if (str[j] === "?") {
|
|
4611
|
-
throw new TypeError("Pattern cannot start with \"?\" at "
|
|
5229
|
+
throw new TypeError("Pattern cannot start with \"?\" at ".concat(j));
|
|
4612
5230
|
}
|
|
4613
5231
|
while (j < str.length) {
|
|
4614
5232
|
if (str[j] === "\\") {
|
|
@@ -4624,13 +5242,13 @@
|
|
|
4624
5242
|
} else if (str[j] === "(") {
|
|
4625
5243
|
count++;
|
|
4626
5244
|
if (str[j + 1] !== "?") {
|
|
4627
|
-
throw new TypeError("Capturing groups are not allowed at "
|
|
5245
|
+
throw new TypeError("Capturing groups are not allowed at ".concat(j));
|
|
4628
5246
|
}
|
|
4629
5247
|
}
|
|
4630
5248
|
pattern += str[j++];
|
|
4631
5249
|
}
|
|
4632
|
-
if (count) throw new TypeError("Unbalanced pattern at "
|
|
4633
|
-
if (!pattern) throw new TypeError("Missing pattern at "
|
|
5250
|
+
if (count) throw new TypeError("Unbalanced pattern at ".concat(i));
|
|
5251
|
+
if (!pattern) throw new TypeError("Missing pattern at ".concat(i));
|
|
4634
5252
|
tokens.push({
|
|
4635
5253
|
type: "PATTERN",
|
|
4636
5254
|
index: i,
|
|
@@ -4662,7 +5280,7 @@
|
|
|
4662
5280
|
var tokens = lexer(str);
|
|
4663
5281
|
var _a = options.prefixes,
|
|
4664
5282
|
prefixes = _a === void 0 ? "./" : _a;
|
|
4665
|
-
var defaultPattern = "[^"
|
|
5283
|
+
var defaultPattern = "[^".concat(escapeString(options.delimiter || "/#?"), "]+?");
|
|
4666
5284
|
var result = [];
|
|
4667
5285
|
var key = 0;
|
|
4668
5286
|
var i = 0;
|
|
@@ -4676,12 +5294,11 @@
|
|
|
4676
5294
|
var _a = tokens[i],
|
|
4677
5295
|
nextType = _a.type,
|
|
4678
5296
|
index = _a.index;
|
|
4679
|
-
throw new TypeError("Unexpected "
|
|
5297
|
+
throw new TypeError("Unexpected ".concat(nextType, " at ").concat(index, ", expected ").concat(type));
|
|
4680
5298
|
};
|
|
4681
5299
|
var consumeText = function () {
|
|
4682
5300
|
var result = "";
|
|
4683
5301
|
var value;
|
|
4684
|
-
// tslint:disable-next-line
|
|
4685
5302
|
while (value = tryConsume("CHAR") || tryConsume("ESCAPED_CHAR")) {
|
|
4686
5303
|
result += value;
|
|
4687
5304
|
}
|
|
@@ -4762,7 +5379,7 @@
|
|
|
4762
5379
|
// Compile all the tokens into regexps.
|
|
4763
5380
|
var matches = tokens.map(function (token) {
|
|
4764
5381
|
if (typeof token === "object") {
|
|
4765
|
-
return new RegExp("^(?:"
|
|
5382
|
+
return new RegExp("^(?:".concat(token.pattern, ")$"), reFlags);
|
|
4766
5383
|
}
|
|
4767
5384
|
});
|
|
4768
5385
|
return function (data) {
|
|
@@ -4778,16 +5395,16 @@
|
|
|
4778
5395
|
var repeat = token.modifier === "*" || token.modifier === "+";
|
|
4779
5396
|
if (Array.isArray(value)) {
|
|
4780
5397
|
if (!repeat) {
|
|
4781
|
-
throw new TypeError("Expected \""
|
|
5398
|
+
throw new TypeError("Expected \"".concat(token.name, "\" to not repeat, but got an array"));
|
|
4782
5399
|
}
|
|
4783
5400
|
if (value.length === 0) {
|
|
4784
5401
|
if (optional) continue;
|
|
4785
|
-
throw new TypeError("Expected \""
|
|
5402
|
+
throw new TypeError("Expected \"".concat(token.name, "\" to not be empty"));
|
|
4786
5403
|
}
|
|
4787
5404
|
for (var j = 0; j < value.length; j++) {
|
|
4788
5405
|
var segment = encode(value[j], token);
|
|
4789
5406
|
if (validate && !matches[i].test(segment)) {
|
|
4790
|
-
throw new TypeError("Expected all \""
|
|
5407
|
+
throw new TypeError("Expected all \"".concat(token.name, "\" to match \"").concat(token.pattern, "\", but got \"").concat(segment, "\""));
|
|
4791
5408
|
}
|
|
4792
5409
|
path += token.prefix + segment + token.suffix;
|
|
4793
5410
|
}
|
|
@@ -4796,14 +5413,14 @@
|
|
|
4796
5413
|
if (typeof value === "string" || typeof value === "number") {
|
|
4797
5414
|
var segment = encode(String(value), token);
|
|
4798
5415
|
if (validate && !matches[i].test(segment)) {
|
|
4799
|
-
throw new TypeError("Expected \""
|
|
5416
|
+
throw new TypeError("Expected \"".concat(token.name, "\" to match \"").concat(token.pattern, "\", but got \"").concat(segment, "\""));
|
|
4800
5417
|
}
|
|
4801
5418
|
path += token.prefix + segment + token.suffix;
|
|
4802
5419
|
continue;
|
|
4803
5420
|
}
|
|
4804
5421
|
if (optional) continue;
|
|
4805
5422
|
var typeOfMessage = repeat ? "an array" : "a string";
|
|
4806
|
-
throw new TypeError("Expected \""
|
|
5423
|
+
throw new TypeError("Expected \"".concat(token.name, "\" to be ").concat(typeOfMessage));
|
|
4807
5424
|
}
|
|
4808
5425
|
return path;
|
|
4809
5426
|
};
|
|
@@ -4834,7 +5451,6 @@
|
|
|
4834
5451
|
index = m.index;
|
|
4835
5452
|
var params = Object.create(null);
|
|
4836
5453
|
var _loop_1 = function (i) {
|
|
4837
|
-
// tslint:disable-next-line
|
|
4838
5454
|
if (m[i] === undefined) return "continue";
|
|
4839
5455
|
var key = keys[i - 1];
|
|
4840
5456
|
if (key.modifier === "*" || key.modifier === "+") {
|
|
@@ -4895,7 +5511,7 @@
|
|
|
4895
5511
|
var parts = paths.map(function (path) {
|
|
4896
5512
|
return pathToRegexp(path, keys, options).source;
|
|
4897
5513
|
});
|
|
4898
|
-
return new RegExp("(?:"
|
|
5514
|
+
return new RegExp("(?:".concat(parts.join("|"), ")"), flags(options));
|
|
4899
5515
|
}
|
|
4900
5516
|
/**
|
|
4901
5517
|
* Create a path regexp from string input.
|
|
@@ -4919,9 +5535,13 @@
|
|
|
4919
5535
|
_d = options.encode,
|
|
4920
5536
|
encode = _d === void 0 ? function (x) {
|
|
4921
5537
|
return x;
|
|
4922
|
-
} : _d
|
|
4923
|
-
|
|
4924
|
-
|
|
5538
|
+
} : _d,
|
|
5539
|
+
_e = options.delimiter,
|
|
5540
|
+
delimiter = _e === void 0 ? "/#?" : _e,
|
|
5541
|
+
_f = options.endsWith,
|
|
5542
|
+
endsWith = _f === void 0 ? "" : _f;
|
|
5543
|
+
var endsWithRe = "[".concat(escapeString(endsWith), "]|$");
|
|
5544
|
+
var delimiterRe = "[".concat(escapeString(delimiter), "]");
|
|
4925
5545
|
var route = start ? "^" : "";
|
|
4926
5546
|
// Iterate over the tokens and create our regexp string.
|
|
4927
5547
|
for (var _i = 0, tokens_1 = tokens; _i < tokens_1.length; _i++) {
|
|
@@ -4936,31 +5556,33 @@
|
|
|
4936
5556
|
if (prefix || suffix) {
|
|
4937
5557
|
if (token.modifier === "+" || token.modifier === "*") {
|
|
4938
5558
|
var mod = token.modifier === "*" ? "?" : "";
|
|
4939
|
-
route += "(?:"
|
|
5559
|
+
route += "(?:".concat(prefix, "((?:").concat(token.pattern, ")(?:").concat(suffix).concat(prefix, "(?:").concat(token.pattern, "))*)").concat(suffix, ")").concat(mod);
|
|
4940
5560
|
} else {
|
|
4941
|
-
route += "(?:"
|
|
5561
|
+
route += "(?:".concat(prefix, "(").concat(token.pattern, ")").concat(suffix, ")").concat(token.modifier);
|
|
4942
5562
|
}
|
|
4943
5563
|
} else {
|
|
4944
|
-
|
|
5564
|
+
if (token.modifier === "+" || token.modifier === "*") {
|
|
5565
|
+
route += "((?:".concat(token.pattern, ")").concat(token.modifier, ")");
|
|
5566
|
+
} else {
|
|
5567
|
+
route += "(".concat(token.pattern, ")").concat(token.modifier);
|
|
5568
|
+
}
|
|
4945
5569
|
}
|
|
4946
5570
|
} else {
|
|
4947
|
-
route += "(?:"
|
|
5571
|
+
route += "(?:".concat(prefix).concat(suffix, ")").concat(token.modifier);
|
|
4948
5572
|
}
|
|
4949
5573
|
}
|
|
4950
5574
|
}
|
|
4951
5575
|
if (end) {
|
|
4952
|
-
if (!strict) route +=
|
|
4953
|
-
route += !options.endsWith ? "$" : "(?="
|
|
5576
|
+
if (!strict) route += "".concat(delimiterRe, "?");
|
|
5577
|
+
route += !options.endsWith ? "$" : "(?=".concat(endsWithRe, ")");
|
|
4954
5578
|
} else {
|
|
4955
5579
|
var endToken = tokens[tokens.length - 1];
|
|
4956
|
-
var isEndDelimited = typeof endToken === "string" ?
|
|
4957
|
-
// tslint:disable-next-line
|
|
4958
|
-
endToken === undefined;
|
|
5580
|
+
var isEndDelimited = typeof endToken === "string" ? delimiterRe.indexOf(endToken[endToken.length - 1]) > -1 : endToken === undefined;
|
|
4959
5581
|
if (!strict) {
|
|
4960
|
-
route += "(?:"
|
|
5582
|
+
route += "(?:".concat(delimiterRe, "(?=").concat(endsWithRe, "))?");
|
|
4961
5583
|
}
|
|
4962
5584
|
if (!isEndDelimited) {
|
|
4963
|
-
route += "(?="
|
|
5585
|
+
route += "(?=".concat(delimiterRe, "|").concat(endsWithRe, ")");
|
|
4964
5586
|
}
|
|
4965
5587
|
}
|
|
4966
5588
|
return new RegExp(route, flags(options));
|
|
@@ -9859,6 +10481,7 @@
|
|
|
9859
10481
|
var customComponents = {};
|
|
9860
10482
|
|
|
9861
10483
|
/* eslint no-use-before-define: "off" */
|
|
10484
|
+
/* eslint import/no-named-as-default: "off" */
|
|
9862
10485
|
const SELF_CLOSING = 'area base br col command embed hr img input keygen link menuitem meta param source track wbr'.split(' ');
|
|
9863
10486
|
const PROPS_ATTRS = 'hidden checked disabled readonly selected autofocus autoplay required multiple value indeterminate routeProps innerHTML'.split(' ');
|
|
9864
10487
|
const BOOLEAN_PROPS = 'hidden checked disabled readonly selected autofocus autoplay required multiple readOnly indeterminate'.split(' ');
|
|
@@ -28004,12 +28627,608 @@
|
|
|
28004
28627
|
protoMetadataMap = {};
|
|
28005
28628
|
return old_applyMemberDecs(ret, targetClass, protoMetadataMap, staticMetadataMap, memberDecs), old_convertMetadataMapToFinal(targetClass.prototype, protoMetadataMap), old_applyClassDecs(ret, targetClass, staticMetadataMap, classDecs), old_convertMetadataMapToFinal(targetClass, staticMetadataMap), ret;
|
|
28006
28629
|
}
|
|
28630
|
+
function applyDecs2203Factory() {
|
|
28631
|
+
function createAddInitializerMethod(initializers, decoratorFinishedRef) {
|
|
28632
|
+
return function (initializer) {
|
|
28633
|
+
!function (decoratorFinishedRef, fnName) {
|
|
28634
|
+
if (decoratorFinishedRef.v) throw new Error("attempted to call " + fnName + " after decoration was finished");
|
|
28635
|
+
}(decoratorFinishedRef, "addInitializer"), assertCallable(initializer, "An initializer"), initializers.push(initializer);
|
|
28636
|
+
};
|
|
28637
|
+
}
|
|
28638
|
+
function memberDec(dec, name, desc, initializers, kind, isStatic, isPrivate, value) {
|
|
28639
|
+
var kindStr;
|
|
28640
|
+
switch (kind) {
|
|
28641
|
+
case 1:
|
|
28642
|
+
kindStr = "accessor";
|
|
28643
|
+
break;
|
|
28644
|
+
case 2:
|
|
28645
|
+
kindStr = "method";
|
|
28646
|
+
break;
|
|
28647
|
+
case 3:
|
|
28648
|
+
kindStr = "getter";
|
|
28649
|
+
break;
|
|
28650
|
+
case 4:
|
|
28651
|
+
kindStr = "setter";
|
|
28652
|
+
break;
|
|
28653
|
+
default:
|
|
28654
|
+
kindStr = "field";
|
|
28655
|
+
}
|
|
28656
|
+
var get,
|
|
28657
|
+
set,
|
|
28658
|
+
ctx = {
|
|
28659
|
+
kind: kindStr,
|
|
28660
|
+
name: isPrivate ? "#" + name : name,
|
|
28661
|
+
static: isStatic,
|
|
28662
|
+
private: isPrivate
|
|
28663
|
+
},
|
|
28664
|
+
decoratorFinishedRef = {
|
|
28665
|
+
v: !1
|
|
28666
|
+
};
|
|
28667
|
+
0 !== kind && (ctx.addInitializer = createAddInitializerMethod(initializers, decoratorFinishedRef)), 0 === kind ? isPrivate ? (get = desc.get, set = desc.set) : (get = function () {
|
|
28668
|
+
return this[name];
|
|
28669
|
+
}, set = function (v) {
|
|
28670
|
+
this[name] = v;
|
|
28671
|
+
}) : 2 === kind ? get = function () {
|
|
28672
|
+
return desc.value;
|
|
28673
|
+
} : (1 !== kind && 3 !== kind || (get = function () {
|
|
28674
|
+
return desc.get.call(this);
|
|
28675
|
+
}), 1 !== kind && 4 !== kind || (set = function (v) {
|
|
28676
|
+
desc.set.call(this, v);
|
|
28677
|
+
})), ctx.access = get && set ? {
|
|
28678
|
+
get: get,
|
|
28679
|
+
set: set
|
|
28680
|
+
} : get ? {
|
|
28681
|
+
get: get
|
|
28682
|
+
} : {
|
|
28683
|
+
set: set
|
|
28684
|
+
};
|
|
28685
|
+
try {
|
|
28686
|
+
return dec(value, ctx);
|
|
28687
|
+
} finally {
|
|
28688
|
+
decoratorFinishedRef.v = !0;
|
|
28689
|
+
}
|
|
28690
|
+
}
|
|
28691
|
+
function assertCallable(fn, hint) {
|
|
28692
|
+
if ("function" != typeof fn) throw new TypeError(hint + " must be a function");
|
|
28693
|
+
}
|
|
28694
|
+
function assertValidReturnValue(kind, value) {
|
|
28695
|
+
var type = typeof value;
|
|
28696
|
+
if (1 === kind) {
|
|
28697
|
+
if ("object" !== type || null === value) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");
|
|
28698
|
+
void 0 !== value.get && assertCallable(value.get, "accessor.get"), void 0 !== value.set && assertCallable(value.set, "accessor.set"), void 0 !== value.init && assertCallable(value.init, "accessor.init");
|
|
28699
|
+
} else if ("function" !== type) {
|
|
28700
|
+
var hint;
|
|
28701
|
+
throw hint = 0 === kind ? "field" : 10 === kind ? "class" : "method", new TypeError(hint + " decorators must return a function or void 0");
|
|
28702
|
+
}
|
|
28703
|
+
}
|
|
28704
|
+
function applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers) {
|
|
28705
|
+
var desc,
|
|
28706
|
+
init,
|
|
28707
|
+
value,
|
|
28708
|
+
newValue,
|
|
28709
|
+
get,
|
|
28710
|
+
set,
|
|
28711
|
+
decs = decInfo[0];
|
|
28712
|
+
if (isPrivate ? desc = 0 === kind || 1 === kind ? {
|
|
28713
|
+
get: decInfo[3],
|
|
28714
|
+
set: decInfo[4]
|
|
28715
|
+
} : 3 === kind ? {
|
|
28716
|
+
get: decInfo[3]
|
|
28717
|
+
} : 4 === kind ? {
|
|
28718
|
+
set: decInfo[3]
|
|
28719
|
+
} : {
|
|
28720
|
+
value: decInfo[3]
|
|
28721
|
+
} : 0 !== kind && (desc = Object.getOwnPropertyDescriptor(base, name)), 1 === kind ? value = {
|
|
28722
|
+
get: desc.get,
|
|
28723
|
+
set: desc.set
|
|
28724
|
+
} : 2 === kind ? value = desc.value : 3 === kind ? value = desc.get : 4 === kind && (value = desc.set), "function" == typeof decs) void 0 !== (newValue = memberDec(decs, name, desc, initializers, kind, isStatic, isPrivate, value)) && (assertValidReturnValue(kind, newValue), 0 === kind ? init = newValue : 1 === kind ? (init = newValue.init, get = newValue.get || value.get, set = newValue.set || value.set, value = {
|
|
28725
|
+
get: get,
|
|
28726
|
+
set: set
|
|
28727
|
+
}) : value = newValue);else for (var i = decs.length - 1; i >= 0; i--) {
|
|
28728
|
+
var newInit;
|
|
28729
|
+
if (void 0 !== (newValue = memberDec(decs[i], name, desc, initializers, kind, isStatic, isPrivate, value))) assertValidReturnValue(kind, newValue), 0 === kind ? newInit = newValue : 1 === kind ? (newInit = newValue.init, get = newValue.get || value.get, set = newValue.set || value.set, value = {
|
|
28730
|
+
get: get,
|
|
28731
|
+
set: set
|
|
28732
|
+
}) : value = newValue, void 0 !== newInit && (void 0 === init ? init = newInit : "function" == typeof init ? init = [init, newInit] : init.push(newInit));
|
|
28733
|
+
}
|
|
28734
|
+
if (0 === kind || 1 === kind) {
|
|
28735
|
+
if (void 0 === init) init = function (instance, init) {
|
|
28736
|
+
return init;
|
|
28737
|
+
};else if ("function" != typeof init) {
|
|
28738
|
+
var ownInitializers = init;
|
|
28739
|
+
init = function (instance, init) {
|
|
28740
|
+
for (var value = init, i = 0; i < ownInitializers.length; i++) value = ownInitializers[i].call(instance, value);
|
|
28741
|
+
return value;
|
|
28742
|
+
};
|
|
28743
|
+
} else {
|
|
28744
|
+
var originalInitializer = init;
|
|
28745
|
+
init = function (instance, init) {
|
|
28746
|
+
return originalInitializer.call(instance, init);
|
|
28747
|
+
};
|
|
28748
|
+
}
|
|
28749
|
+
ret.push(init);
|
|
28750
|
+
}
|
|
28751
|
+
0 !== kind && (1 === kind ? (desc.get = value.get, desc.set = value.set) : 2 === kind ? desc.value = value : 3 === kind ? desc.get = value : 4 === kind && (desc.set = value), isPrivate ? 1 === kind ? (ret.push(function (instance, args) {
|
|
28752
|
+
return value.get.call(instance, args);
|
|
28753
|
+
}), ret.push(function (instance, args) {
|
|
28754
|
+
return value.set.call(instance, args);
|
|
28755
|
+
})) : 2 === kind ? ret.push(value) : ret.push(function (instance, args) {
|
|
28756
|
+
return value.call(instance, args);
|
|
28757
|
+
}) : Object.defineProperty(base, name, desc));
|
|
28758
|
+
}
|
|
28759
|
+
function pushInitializers(ret, initializers) {
|
|
28760
|
+
initializers && ret.push(function (instance) {
|
|
28761
|
+
for (var i = 0; i < initializers.length; i++) initializers[i].call(instance);
|
|
28762
|
+
return instance;
|
|
28763
|
+
});
|
|
28764
|
+
}
|
|
28765
|
+
return function (targetClass, memberDecs, classDecs) {
|
|
28766
|
+
var ret = [];
|
|
28767
|
+
return function (ret, Class, decInfos) {
|
|
28768
|
+
for (var protoInitializers, staticInitializers, existingProtoNonFields = new Map(), existingStaticNonFields = new Map(), i = 0; i < decInfos.length; i++) {
|
|
28769
|
+
var decInfo = decInfos[i];
|
|
28770
|
+
if (Array.isArray(decInfo)) {
|
|
28771
|
+
var base,
|
|
28772
|
+
initializers,
|
|
28773
|
+
kind = decInfo[1],
|
|
28774
|
+
name = decInfo[2],
|
|
28775
|
+
isPrivate = decInfo.length > 3,
|
|
28776
|
+
isStatic = kind >= 5;
|
|
28777
|
+
if (isStatic ? (base = Class, 0 != (kind -= 5) && (initializers = staticInitializers = staticInitializers || [])) : (base = Class.prototype, 0 !== kind && (initializers = protoInitializers = protoInitializers || [])), 0 !== kind && !isPrivate) {
|
|
28778
|
+
var existingNonFields = isStatic ? existingStaticNonFields : existingProtoNonFields,
|
|
28779
|
+
existingKind = existingNonFields.get(name) || 0;
|
|
28780
|
+
if (!0 === existingKind || 3 === existingKind && 4 !== kind || 4 === existingKind && 3 !== kind) throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + name);
|
|
28781
|
+
!existingKind && kind > 2 ? existingNonFields.set(name, kind) : existingNonFields.set(name, !0);
|
|
28782
|
+
}
|
|
28783
|
+
applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers);
|
|
28784
|
+
}
|
|
28785
|
+
}
|
|
28786
|
+
pushInitializers(ret, protoInitializers), pushInitializers(ret, staticInitializers);
|
|
28787
|
+
}(ret, targetClass, memberDecs), function (ret, targetClass, classDecs) {
|
|
28788
|
+
if (classDecs.length > 0) {
|
|
28789
|
+
for (var initializers = [], newClass = targetClass, name = targetClass.name, i = classDecs.length - 1; i >= 0; i--) {
|
|
28790
|
+
var decoratorFinishedRef = {
|
|
28791
|
+
v: !1
|
|
28792
|
+
};
|
|
28793
|
+
try {
|
|
28794
|
+
var nextNewClass = classDecs[i](newClass, {
|
|
28795
|
+
kind: "class",
|
|
28796
|
+
name: name,
|
|
28797
|
+
addInitializer: createAddInitializerMethod(initializers, decoratorFinishedRef)
|
|
28798
|
+
});
|
|
28799
|
+
} finally {
|
|
28800
|
+
decoratorFinishedRef.v = !0;
|
|
28801
|
+
}
|
|
28802
|
+
void 0 !== nextNewClass && (assertValidReturnValue(10, nextNewClass), newClass = nextNewClass);
|
|
28803
|
+
}
|
|
28804
|
+
ret.push(newClass, function () {
|
|
28805
|
+
for (var i = 0; i < initializers.length; i++) initializers[i].call(newClass);
|
|
28806
|
+
});
|
|
28807
|
+
}
|
|
28808
|
+
}(ret, targetClass, classDecs), ret;
|
|
28809
|
+
};
|
|
28810
|
+
}
|
|
28811
|
+
var applyDecs2203Impl;
|
|
28812
|
+
function _applyDecs2203(targetClass, memberDecs, classDecs) {
|
|
28813
|
+
return (applyDecs2203Impl = applyDecs2203Impl || applyDecs2203Factory())(targetClass, memberDecs, classDecs);
|
|
28814
|
+
}
|
|
28815
|
+
function applyDecs2203RFactory() {
|
|
28816
|
+
function createAddInitializerMethod(initializers, decoratorFinishedRef) {
|
|
28817
|
+
return function (initializer) {
|
|
28818
|
+
!function (decoratorFinishedRef, fnName) {
|
|
28819
|
+
if (decoratorFinishedRef.v) throw new Error("attempted to call " + fnName + " after decoration was finished");
|
|
28820
|
+
}(decoratorFinishedRef, "addInitializer"), assertCallable(initializer, "An initializer"), initializers.push(initializer);
|
|
28821
|
+
};
|
|
28822
|
+
}
|
|
28823
|
+
function memberDec(dec, name, desc, initializers, kind, isStatic, isPrivate, value) {
|
|
28824
|
+
var kindStr;
|
|
28825
|
+
switch (kind) {
|
|
28826
|
+
case 1:
|
|
28827
|
+
kindStr = "accessor";
|
|
28828
|
+
break;
|
|
28829
|
+
case 2:
|
|
28830
|
+
kindStr = "method";
|
|
28831
|
+
break;
|
|
28832
|
+
case 3:
|
|
28833
|
+
kindStr = "getter";
|
|
28834
|
+
break;
|
|
28835
|
+
case 4:
|
|
28836
|
+
kindStr = "setter";
|
|
28837
|
+
break;
|
|
28838
|
+
default:
|
|
28839
|
+
kindStr = "field";
|
|
28840
|
+
}
|
|
28841
|
+
var get,
|
|
28842
|
+
set,
|
|
28843
|
+
ctx = {
|
|
28844
|
+
kind: kindStr,
|
|
28845
|
+
name: isPrivate ? "#" + name : name,
|
|
28846
|
+
static: isStatic,
|
|
28847
|
+
private: isPrivate
|
|
28848
|
+
},
|
|
28849
|
+
decoratorFinishedRef = {
|
|
28850
|
+
v: !1
|
|
28851
|
+
};
|
|
28852
|
+
0 !== kind && (ctx.addInitializer = createAddInitializerMethod(initializers, decoratorFinishedRef)), 0 === kind ? isPrivate ? (get = desc.get, set = desc.set) : (get = function () {
|
|
28853
|
+
return this[name];
|
|
28854
|
+
}, set = function (v) {
|
|
28855
|
+
this[name] = v;
|
|
28856
|
+
}) : 2 === kind ? get = function () {
|
|
28857
|
+
return desc.value;
|
|
28858
|
+
} : (1 !== kind && 3 !== kind || (get = function () {
|
|
28859
|
+
return desc.get.call(this);
|
|
28860
|
+
}), 1 !== kind && 4 !== kind || (set = function (v) {
|
|
28861
|
+
desc.set.call(this, v);
|
|
28862
|
+
})), ctx.access = get && set ? {
|
|
28863
|
+
get: get,
|
|
28864
|
+
set: set
|
|
28865
|
+
} : get ? {
|
|
28866
|
+
get: get
|
|
28867
|
+
} : {
|
|
28868
|
+
set: set
|
|
28869
|
+
};
|
|
28870
|
+
try {
|
|
28871
|
+
return dec(value, ctx);
|
|
28872
|
+
} finally {
|
|
28873
|
+
decoratorFinishedRef.v = !0;
|
|
28874
|
+
}
|
|
28875
|
+
}
|
|
28876
|
+
function assertCallable(fn, hint) {
|
|
28877
|
+
if ("function" != typeof fn) throw new TypeError(hint + " must be a function");
|
|
28878
|
+
}
|
|
28879
|
+
function assertValidReturnValue(kind, value) {
|
|
28880
|
+
var type = typeof value;
|
|
28881
|
+
if (1 === kind) {
|
|
28882
|
+
if ("object" !== type || null === value) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");
|
|
28883
|
+
void 0 !== value.get && assertCallable(value.get, "accessor.get"), void 0 !== value.set && assertCallable(value.set, "accessor.set"), void 0 !== value.init && assertCallable(value.init, "accessor.init");
|
|
28884
|
+
} else if ("function" !== type) {
|
|
28885
|
+
var hint;
|
|
28886
|
+
throw hint = 0 === kind ? "field" : 10 === kind ? "class" : "method", new TypeError(hint + " decorators must return a function or void 0");
|
|
28887
|
+
}
|
|
28888
|
+
}
|
|
28889
|
+
function applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers) {
|
|
28890
|
+
var desc,
|
|
28891
|
+
init,
|
|
28892
|
+
value,
|
|
28893
|
+
newValue,
|
|
28894
|
+
get,
|
|
28895
|
+
set,
|
|
28896
|
+
decs = decInfo[0];
|
|
28897
|
+
if (isPrivate ? desc = 0 === kind || 1 === kind ? {
|
|
28898
|
+
get: decInfo[3],
|
|
28899
|
+
set: decInfo[4]
|
|
28900
|
+
} : 3 === kind ? {
|
|
28901
|
+
get: decInfo[3]
|
|
28902
|
+
} : 4 === kind ? {
|
|
28903
|
+
set: decInfo[3]
|
|
28904
|
+
} : {
|
|
28905
|
+
value: decInfo[3]
|
|
28906
|
+
} : 0 !== kind && (desc = Object.getOwnPropertyDescriptor(base, name)), 1 === kind ? value = {
|
|
28907
|
+
get: desc.get,
|
|
28908
|
+
set: desc.set
|
|
28909
|
+
} : 2 === kind ? value = desc.value : 3 === kind ? value = desc.get : 4 === kind && (value = desc.set), "function" == typeof decs) void 0 !== (newValue = memberDec(decs, name, desc, initializers, kind, isStatic, isPrivate, value)) && (assertValidReturnValue(kind, newValue), 0 === kind ? init = newValue : 1 === kind ? (init = newValue.init, get = newValue.get || value.get, set = newValue.set || value.set, value = {
|
|
28910
|
+
get: get,
|
|
28911
|
+
set: set
|
|
28912
|
+
}) : value = newValue);else for (var i = decs.length - 1; i >= 0; i--) {
|
|
28913
|
+
var newInit;
|
|
28914
|
+
if (void 0 !== (newValue = memberDec(decs[i], name, desc, initializers, kind, isStatic, isPrivate, value))) assertValidReturnValue(kind, newValue), 0 === kind ? newInit = newValue : 1 === kind ? (newInit = newValue.init, get = newValue.get || value.get, set = newValue.set || value.set, value = {
|
|
28915
|
+
get: get,
|
|
28916
|
+
set: set
|
|
28917
|
+
}) : value = newValue, void 0 !== newInit && (void 0 === init ? init = newInit : "function" == typeof init ? init = [init, newInit] : init.push(newInit));
|
|
28918
|
+
}
|
|
28919
|
+
if (0 === kind || 1 === kind) {
|
|
28920
|
+
if (void 0 === init) init = function (instance, init) {
|
|
28921
|
+
return init;
|
|
28922
|
+
};else if ("function" != typeof init) {
|
|
28923
|
+
var ownInitializers = init;
|
|
28924
|
+
init = function (instance, init) {
|
|
28925
|
+
for (var value = init, i = 0; i < ownInitializers.length; i++) value = ownInitializers[i].call(instance, value);
|
|
28926
|
+
return value;
|
|
28927
|
+
};
|
|
28928
|
+
} else {
|
|
28929
|
+
var originalInitializer = init;
|
|
28930
|
+
init = function (instance, init) {
|
|
28931
|
+
return originalInitializer.call(instance, init);
|
|
28932
|
+
};
|
|
28933
|
+
}
|
|
28934
|
+
ret.push(init);
|
|
28935
|
+
}
|
|
28936
|
+
0 !== kind && (1 === kind ? (desc.get = value.get, desc.set = value.set) : 2 === kind ? desc.value = value : 3 === kind ? desc.get = value : 4 === kind && (desc.set = value), isPrivate ? 1 === kind ? (ret.push(function (instance, args) {
|
|
28937
|
+
return value.get.call(instance, args);
|
|
28938
|
+
}), ret.push(function (instance, args) {
|
|
28939
|
+
return value.set.call(instance, args);
|
|
28940
|
+
})) : 2 === kind ? ret.push(value) : ret.push(function (instance, args) {
|
|
28941
|
+
return value.call(instance, args);
|
|
28942
|
+
}) : Object.defineProperty(base, name, desc));
|
|
28943
|
+
}
|
|
28944
|
+
function applyMemberDecs(Class, decInfos) {
|
|
28945
|
+
for (var protoInitializers, staticInitializers, ret = [], existingProtoNonFields = new Map(), existingStaticNonFields = new Map(), i = 0; i < decInfos.length; i++) {
|
|
28946
|
+
var decInfo = decInfos[i];
|
|
28947
|
+
if (Array.isArray(decInfo)) {
|
|
28948
|
+
var base,
|
|
28949
|
+
initializers,
|
|
28950
|
+
kind = decInfo[1],
|
|
28951
|
+
name = decInfo[2],
|
|
28952
|
+
isPrivate = decInfo.length > 3,
|
|
28953
|
+
isStatic = kind >= 5;
|
|
28954
|
+
if (isStatic ? (base = Class, 0 !== (kind -= 5) && (initializers = staticInitializers = staticInitializers || [])) : (base = Class.prototype, 0 !== kind && (initializers = protoInitializers = protoInitializers || [])), 0 !== kind && !isPrivate) {
|
|
28955
|
+
var existingNonFields = isStatic ? existingStaticNonFields : existingProtoNonFields,
|
|
28956
|
+
existingKind = existingNonFields.get(name) || 0;
|
|
28957
|
+
if (!0 === existingKind || 3 === existingKind && 4 !== kind || 4 === existingKind && 3 !== kind) throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + name);
|
|
28958
|
+
!existingKind && kind > 2 ? existingNonFields.set(name, kind) : existingNonFields.set(name, !0);
|
|
28959
|
+
}
|
|
28960
|
+
applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers);
|
|
28961
|
+
}
|
|
28962
|
+
}
|
|
28963
|
+
return pushInitializers(ret, protoInitializers), pushInitializers(ret, staticInitializers), ret;
|
|
28964
|
+
}
|
|
28965
|
+
function pushInitializers(ret, initializers) {
|
|
28966
|
+
initializers && ret.push(function (instance) {
|
|
28967
|
+
for (var i = 0; i < initializers.length; i++) initializers[i].call(instance);
|
|
28968
|
+
return instance;
|
|
28969
|
+
});
|
|
28970
|
+
}
|
|
28971
|
+
return function (targetClass, memberDecs, classDecs) {
|
|
28972
|
+
return {
|
|
28973
|
+
e: applyMemberDecs(targetClass, memberDecs),
|
|
28974
|
+
get c() {
|
|
28975
|
+
return function (targetClass, classDecs) {
|
|
28976
|
+
if (classDecs.length > 0) {
|
|
28977
|
+
for (var initializers = [], newClass = targetClass, name = targetClass.name, i = classDecs.length - 1; i >= 0; i--) {
|
|
28978
|
+
var decoratorFinishedRef = {
|
|
28979
|
+
v: !1
|
|
28980
|
+
};
|
|
28981
|
+
try {
|
|
28982
|
+
var nextNewClass = classDecs[i](newClass, {
|
|
28983
|
+
kind: "class",
|
|
28984
|
+
name: name,
|
|
28985
|
+
addInitializer: createAddInitializerMethod(initializers, decoratorFinishedRef)
|
|
28986
|
+
});
|
|
28987
|
+
} finally {
|
|
28988
|
+
decoratorFinishedRef.v = !0;
|
|
28989
|
+
}
|
|
28990
|
+
void 0 !== nextNewClass && (assertValidReturnValue(10, nextNewClass), newClass = nextNewClass);
|
|
28991
|
+
}
|
|
28992
|
+
return [newClass, function () {
|
|
28993
|
+
for (var i = 0; i < initializers.length; i++) initializers[i].call(newClass);
|
|
28994
|
+
}];
|
|
28995
|
+
}
|
|
28996
|
+
}(targetClass, classDecs);
|
|
28997
|
+
}
|
|
28998
|
+
};
|
|
28999
|
+
};
|
|
29000
|
+
}
|
|
29001
|
+
function _applyDecs2203R(targetClass, memberDecs, classDecs) {
|
|
29002
|
+
return (_applyDecs2203R = applyDecs2203RFactory())(targetClass, memberDecs, classDecs);
|
|
29003
|
+
}
|
|
29004
|
+
function applyDecs2301Factory() {
|
|
29005
|
+
function createAddInitializerMethod(initializers, decoratorFinishedRef) {
|
|
29006
|
+
return function (initializer) {
|
|
29007
|
+
!function (decoratorFinishedRef, fnName) {
|
|
29008
|
+
if (decoratorFinishedRef.v) throw new Error("attempted to call " + fnName + " after decoration was finished");
|
|
29009
|
+
}(decoratorFinishedRef, "addInitializer"), assertCallable(initializer, "An initializer"), initializers.push(initializer);
|
|
29010
|
+
};
|
|
29011
|
+
}
|
|
29012
|
+
function assertInstanceIfPrivate(has, target) {
|
|
29013
|
+
if (!has(target)) throw new TypeError("Attempted to access private element on non-instance");
|
|
29014
|
+
}
|
|
29015
|
+
function memberDec(dec, name, desc, initializers, kind, isStatic, isPrivate, value, hasPrivateBrand) {
|
|
29016
|
+
var kindStr;
|
|
29017
|
+
switch (kind) {
|
|
29018
|
+
case 1:
|
|
29019
|
+
kindStr = "accessor";
|
|
29020
|
+
break;
|
|
29021
|
+
case 2:
|
|
29022
|
+
kindStr = "method";
|
|
29023
|
+
break;
|
|
29024
|
+
case 3:
|
|
29025
|
+
kindStr = "getter";
|
|
29026
|
+
break;
|
|
29027
|
+
case 4:
|
|
29028
|
+
kindStr = "setter";
|
|
29029
|
+
break;
|
|
29030
|
+
default:
|
|
29031
|
+
kindStr = "field";
|
|
29032
|
+
}
|
|
29033
|
+
var get,
|
|
29034
|
+
set,
|
|
29035
|
+
ctx = {
|
|
29036
|
+
kind: kindStr,
|
|
29037
|
+
name: isPrivate ? "#" + name : name,
|
|
29038
|
+
static: isStatic,
|
|
29039
|
+
private: isPrivate
|
|
29040
|
+
},
|
|
29041
|
+
decoratorFinishedRef = {
|
|
29042
|
+
v: !1
|
|
29043
|
+
};
|
|
29044
|
+
if (0 !== kind && (ctx.addInitializer = createAddInitializerMethod(initializers, decoratorFinishedRef)), isPrivate || 0 !== kind && 2 !== kind) {
|
|
29045
|
+
if (2 === kind) get = function (target) {
|
|
29046
|
+
return assertInstanceIfPrivate(hasPrivateBrand, target), desc.value;
|
|
29047
|
+
};else {
|
|
29048
|
+
var t = 0 === kind || 1 === kind;
|
|
29049
|
+
(t || 3 === kind) && (get = isPrivate ? function (target) {
|
|
29050
|
+
return assertInstanceIfPrivate(hasPrivateBrand, target), desc.get.call(target);
|
|
29051
|
+
} : function (target) {
|
|
29052
|
+
return desc.get.call(target);
|
|
29053
|
+
}), (t || 4 === kind) && (set = isPrivate ? function (target, value) {
|
|
29054
|
+
assertInstanceIfPrivate(hasPrivateBrand, target), desc.set.call(target, value);
|
|
29055
|
+
} : function (target, value) {
|
|
29056
|
+
desc.set.call(target, value);
|
|
29057
|
+
});
|
|
29058
|
+
}
|
|
29059
|
+
} else get = function (target) {
|
|
29060
|
+
return target[name];
|
|
29061
|
+
}, 0 === kind && (set = function (target, v) {
|
|
29062
|
+
target[name] = v;
|
|
29063
|
+
});
|
|
29064
|
+
var has = isPrivate ? hasPrivateBrand.bind() : function (target) {
|
|
29065
|
+
return name in target;
|
|
29066
|
+
};
|
|
29067
|
+
ctx.access = get && set ? {
|
|
29068
|
+
get: get,
|
|
29069
|
+
set: set,
|
|
29070
|
+
has: has
|
|
29071
|
+
} : get ? {
|
|
29072
|
+
get: get,
|
|
29073
|
+
has: has
|
|
29074
|
+
} : {
|
|
29075
|
+
set: set,
|
|
29076
|
+
has: has
|
|
29077
|
+
};
|
|
29078
|
+
try {
|
|
29079
|
+
return dec(value, ctx);
|
|
29080
|
+
} finally {
|
|
29081
|
+
decoratorFinishedRef.v = !0;
|
|
29082
|
+
}
|
|
29083
|
+
}
|
|
29084
|
+
function assertCallable(fn, hint) {
|
|
29085
|
+
if ("function" != typeof fn) throw new TypeError(hint + " must be a function");
|
|
29086
|
+
}
|
|
29087
|
+
function assertValidReturnValue(kind, value) {
|
|
29088
|
+
var type = typeof value;
|
|
29089
|
+
if (1 === kind) {
|
|
29090
|
+
if ("object" !== type || null === value) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");
|
|
29091
|
+
void 0 !== value.get && assertCallable(value.get, "accessor.get"), void 0 !== value.set && assertCallable(value.set, "accessor.set"), void 0 !== value.init && assertCallable(value.init, "accessor.init");
|
|
29092
|
+
} else if ("function" !== type) {
|
|
29093
|
+
var hint;
|
|
29094
|
+
throw hint = 0 === kind ? "field" : 10 === kind ? "class" : "method", new TypeError(hint + " decorators must return a function or void 0");
|
|
29095
|
+
}
|
|
29096
|
+
}
|
|
29097
|
+
function curryThis2(fn) {
|
|
29098
|
+
return function (value) {
|
|
29099
|
+
fn(this, value);
|
|
29100
|
+
};
|
|
29101
|
+
}
|
|
29102
|
+
function applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers, hasPrivateBrand) {
|
|
29103
|
+
var desc,
|
|
29104
|
+
init,
|
|
29105
|
+
value,
|
|
29106
|
+
fn,
|
|
29107
|
+
newValue,
|
|
29108
|
+
get,
|
|
29109
|
+
set,
|
|
29110
|
+
decs = decInfo[0];
|
|
29111
|
+
if (isPrivate ? desc = 0 === kind || 1 === kind ? {
|
|
29112
|
+
get: (fn = decInfo[3], function () {
|
|
29113
|
+
return fn(this);
|
|
29114
|
+
}),
|
|
29115
|
+
set: curryThis2(decInfo[4])
|
|
29116
|
+
} : 3 === kind ? {
|
|
29117
|
+
get: decInfo[3]
|
|
29118
|
+
} : 4 === kind ? {
|
|
29119
|
+
set: decInfo[3]
|
|
29120
|
+
} : {
|
|
29121
|
+
value: decInfo[3]
|
|
29122
|
+
} : 0 !== kind && (desc = Object.getOwnPropertyDescriptor(base, name)), 1 === kind ? value = {
|
|
29123
|
+
get: desc.get,
|
|
29124
|
+
set: desc.set
|
|
29125
|
+
} : 2 === kind ? value = desc.value : 3 === kind ? value = desc.get : 4 === kind && (value = desc.set), "function" == typeof decs) void 0 !== (newValue = memberDec(decs, name, desc, initializers, kind, isStatic, isPrivate, value, hasPrivateBrand)) && (assertValidReturnValue(kind, newValue), 0 === kind ? init = newValue : 1 === kind ? (init = newValue.init, get = newValue.get || value.get, set = newValue.set || value.set, value = {
|
|
29126
|
+
get: get,
|
|
29127
|
+
set: set
|
|
29128
|
+
}) : value = newValue);else for (var i = decs.length - 1; i >= 0; i--) {
|
|
29129
|
+
var newInit;
|
|
29130
|
+
if (void 0 !== (newValue = memberDec(decs[i], name, desc, initializers, kind, isStatic, isPrivate, value, hasPrivateBrand))) assertValidReturnValue(kind, newValue), 0 === kind ? newInit = newValue : 1 === kind ? (newInit = newValue.init, get = newValue.get || value.get, set = newValue.set || value.set, value = {
|
|
29131
|
+
get: get,
|
|
29132
|
+
set: set
|
|
29133
|
+
}) : value = newValue, void 0 !== newInit && (void 0 === init ? init = newInit : "function" == typeof init ? init = [init, newInit] : init.push(newInit));
|
|
29134
|
+
}
|
|
29135
|
+
if (0 === kind || 1 === kind) {
|
|
29136
|
+
if (void 0 === init) init = function (instance, init) {
|
|
29137
|
+
return init;
|
|
29138
|
+
};else if ("function" != typeof init) {
|
|
29139
|
+
var ownInitializers = init;
|
|
29140
|
+
init = function (instance, init) {
|
|
29141
|
+
for (var value = init, i = 0; i < ownInitializers.length; i++) value = ownInitializers[i].call(instance, value);
|
|
29142
|
+
return value;
|
|
29143
|
+
};
|
|
29144
|
+
} else {
|
|
29145
|
+
var originalInitializer = init;
|
|
29146
|
+
init = function (instance, init) {
|
|
29147
|
+
return originalInitializer.call(instance, init);
|
|
29148
|
+
};
|
|
29149
|
+
}
|
|
29150
|
+
ret.push(init);
|
|
29151
|
+
}
|
|
29152
|
+
0 !== kind && (1 === kind ? (desc.get = value.get, desc.set = value.set) : 2 === kind ? desc.value = value : 3 === kind ? desc.get = value : 4 === kind && (desc.set = value), isPrivate ? 1 === kind ? (ret.push(function (instance, args) {
|
|
29153
|
+
return value.get.call(instance, args);
|
|
29154
|
+
}), ret.push(function (instance, args) {
|
|
29155
|
+
return value.set.call(instance, args);
|
|
29156
|
+
})) : 2 === kind ? ret.push(value) : ret.push(function (instance, args) {
|
|
29157
|
+
return value.call(instance, args);
|
|
29158
|
+
}) : Object.defineProperty(base, name, desc));
|
|
29159
|
+
}
|
|
29160
|
+
function applyMemberDecs(Class, decInfos, instanceBrand) {
|
|
29161
|
+
for (var protoInitializers, staticInitializers, staticBrand, ret = [], existingProtoNonFields = new Map(), existingStaticNonFields = new Map(), i = 0; i < decInfos.length; i++) {
|
|
29162
|
+
var decInfo = decInfos[i];
|
|
29163
|
+
if (Array.isArray(decInfo)) {
|
|
29164
|
+
var base,
|
|
29165
|
+
initializers,
|
|
29166
|
+
kind = decInfo[1],
|
|
29167
|
+
name = decInfo[2],
|
|
29168
|
+
isPrivate = decInfo.length > 3,
|
|
29169
|
+
isStatic = kind >= 5,
|
|
29170
|
+
hasPrivateBrand = instanceBrand;
|
|
29171
|
+
if (isStatic ? (base = Class, 0 !== (kind -= 5) && (initializers = staticInitializers = staticInitializers || []), isPrivate && !staticBrand && (staticBrand = function (_) {
|
|
29172
|
+
return _checkInRHS(_) === Class;
|
|
29173
|
+
}), hasPrivateBrand = staticBrand) : (base = Class.prototype, 0 !== kind && (initializers = protoInitializers = protoInitializers || [])), 0 !== kind && !isPrivate) {
|
|
29174
|
+
var existingNonFields = isStatic ? existingStaticNonFields : existingProtoNonFields,
|
|
29175
|
+
existingKind = existingNonFields.get(name) || 0;
|
|
29176
|
+
if (!0 === existingKind || 3 === existingKind && 4 !== kind || 4 === existingKind && 3 !== kind) throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + name);
|
|
29177
|
+
!existingKind && kind > 2 ? existingNonFields.set(name, kind) : existingNonFields.set(name, !0);
|
|
29178
|
+
}
|
|
29179
|
+
applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers, hasPrivateBrand);
|
|
29180
|
+
}
|
|
29181
|
+
}
|
|
29182
|
+
return pushInitializers(ret, protoInitializers), pushInitializers(ret, staticInitializers), ret;
|
|
29183
|
+
}
|
|
29184
|
+
function pushInitializers(ret, initializers) {
|
|
29185
|
+
initializers && ret.push(function (instance) {
|
|
29186
|
+
for (var i = 0; i < initializers.length; i++) initializers[i].call(instance);
|
|
29187
|
+
return instance;
|
|
29188
|
+
});
|
|
29189
|
+
}
|
|
29190
|
+
return function (targetClass, memberDecs, classDecs, instanceBrand) {
|
|
29191
|
+
return {
|
|
29192
|
+
e: applyMemberDecs(targetClass, memberDecs, instanceBrand),
|
|
29193
|
+
get c() {
|
|
29194
|
+
return function (targetClass, classDecs) {
|
|
29195
|
+
if (classDecs.length > 0) {
|
|
29196
|
+
for (var initializers = [], newClass = targetClass, name = targetClass.name, i = classDecs.length - 1; i >= 0; i--) {
|
|
29197
|
+
var decoratorFinishedRef = {
|
|
29198
|
+
v: !1
|
|
29199
|
+
};
|
|
29200
|
+
try {
|
|
29201
|
+
var nextNewClass = classDecs[i](newClass, {
|
|
29202
|
+
kind: "class",
|
|
29203
|
+
name: name,
|
|
29204
|
+
addInitializer: createAddInitializerMethod(initializers, decoratorFinishedRef)
|
|
29205
|
+
});
|
|
29206
|
+
} finally {
|
|
29207
|
+
decoratorFinishedRef.v = !0;
|
|
29208
|
+
}
|
|
29209
|
+
void 0 !== nextNewClass && (assertValidReturnValue(10, nextNewClass), newClass = nextNewClass);
|
|
29210
|
+
}
|
|
29211
|
+
return [newClass, function () {
|
|
29212
|
+
for (var i = 0; i < initializers.length; i++) initializers[i].call(newClass);
|
|
29213
|
+
}];
|
|
29214
|
+
}
|
|
29215
|
+
}(targetClass, classDecs);
|
|
29216
|
+
}
|
|
29217
|
+
};
|
|
29218
|
+
};
|
|
29219
|
+
}
|
|
29220
|
+
function _applyDecs2301(targetClass, memberDecs, classDecs, instanceBrand) {
|
|
29221
|
+
return (_applyDecs2301 = applyDecs2301Factory())(targetClass, memberDecs, classDecs, instanceBrand);
|
|
29222
|
+
}
|
|
28007
29223
|
function createAddInitializerMethod(initializers, decoratorFinishedRef) {
|
|
28008
29224
|
return function (initializer) {
|
|
28009
29225
|
assertNotFinished(decoratorFinishedRef, "addInitializer"), assertCallable(initializer, "An initializer"), initializers.push(initializer);
|
|
28010
29226
|
};
|
|
28011
29227
|
}
|
|
28012
|
-
function
|
|
29228
|
+
function assertInstanceIfPrivate(has, target) {
|
|
29229
|
+
if (!has(target)) throw new TypeError("Attempted to access private element on non-instance");
|
|
29230
|
+
}
|
|
29231
|
+
function memberDec(dec, thisArg, name, desc, initializers, kind, isStatic, isPrivate, value, hasPrivateBrand) {
|
|
28013
29232
|
var kindStr;
|
|
28014
29233
|
switch (kind) {
|
|
28015
29234
|
case 1:
|
|
@@ -28038,26 +29257,42 @@
|
|
|
28038
29257
|
decoratorFinishedRef = {
|
|
28039
29258
|
v: !1
|
|
28040
29259
|
};
|
|
28041
|
-
0 !== kind && (ctx.addInitializer = createAddInitializerMethod(initializers, decoratorFinishedRef)),
|
|
28042
|
-
|
|
28043
|
-
|
|
28044
|
-
|
|
28045
|
-
|
|
28046
|
-
|
|
28047
|
-
|
|
28048
|
-
|
|
28049
|
-
|
|
28050
|
-
|
|
28051
|
-
|
|
29260
|
+
if (0 !== kind && (ctx.addInitializer = createAddInitializerMethod(initializers, decoratorFinishedRef)), isPrivate || 0 !== kind && 2 !== kind) {
|
|
29261
|
+
if (2 === kind) get = function (target) {
|
|
29262
|
+
return assertInstanceIfPrivate(hasPrivateBrand, target), desc.value;
|
|
29263
|
+
};else {
|
|
29264
|
+
var t = 0 === kind || 1 === kind;
|
|
29265
|
+
(t || 3 === kind) && (get = isPrivate ? function (target) {
|
|
29266
|
+
return assertInstanceIfPrivate(hasPrivateBrand, target), desc.get.call(target);
|
|
29267
|
+
} : function (target) {
|
|
29268
|
+
return desc.get.call(target);
|
|
29269
|
+
}), (t || 4 === kind) && (set = isPrivate ? function (target, value) {
|
|
29270
|
+
assertInstanceIfPrivate(hasPrivateBrand, target), desc.set.call(target, value);
|
|
29271
|
+
} : function (target, value) {
|
|
29272
|
+
desc.set.call(target, value);
|
|
29273
|
+
});
|
|
29274
|
+
}
|
|
29275
|
+
} else get = function (target) {
|
|
29276
|
+
return target[name];
|
|
29277
|
+
}, 0 === kind && (set = function (target, v) {
|
|
29278
|
+
target[name] = v;
|
|
29279
|
+
});
|
|
29280
|
+
var has = isPrivate ? hasPrivateBrand.bind() : function (target) {
|
|
29281
|
+
return name in target;
|
|
29282
|
+
};
|
|
29283
|
+
ctx.access = get && set ? {
|
|
28052
29284
|
get: get,
|
|
28053
|
-
set: set
|
|
29285
|
+
set: set,
|
|
29286
|
+
has: has
|
|
28054
29287
|
} : get ? {
|
|
28055
|
-
get: get
|
|
29288
|
+
get: get,
|
|
29289
|
+
has: has
|
|
28056
29290
|
} : {
|
|
28057
|
-
set: set
|
|
29291
|
+
set: set,
|
|
29292
|
+
has: has
|
|
28058
29293
|
};
|
|
28059
29294
|
try {
|
|
28060
|
-
return dec(value, ctx);
|
|
29295
|
+
return dec.call(thisArg, value, ctx);
|
|
28061
29296
|
} finally {
|
|
28062
29297
|
decoratorFinishedRef.v = !0;
|
|
28063
29298
|
}
|
|
@@ -28075,10 +29310,20 @@
|
|
|
28075
29310
|
void 0 !== value.get && assertCallable(value.get, "accessor.get"), void 0 !== value.set && assertCallable(value.set, "accessor.set"), void 0 !== value.init && assertCallable(value.init, "accessor.init");
|
|
28076
29311
|
} else if ("function" !== type) {
|
|
28077
29312
|
var hint;
|
|
28078
|
-
throw hint = 0 === kind ? "field" :
|
|
29313
|
+
throw hint = 0 === kind ? "field" : 5 === kind ? "class" : "method", new TypeError(hint + " decorators must return a function or void 0");
|
|
28079
29314
|
}
|
|
28080
29315
|
}
|
|
28081
|
-
function
|
|
29316
|
+
function curryThis1(fn) {
|
|
29317
|
+
return function () {
|
|
29318
|
+
return fn(this);
|
|
29319
|
+
};
|
|
29320
|
+
}
|
|
29321
|
+
function curryThis2(fn) {
|
|
29322
|
+
return function (value) {
|
|
29323
|
+
fn(this, value);
|
|
29324
|
+
};
|
|
29325
|
+
}
|
|
29326
|
+
function applyMemberDec(ret, base, decInfo, decoratorsHaveThis, name, kind, isStatic, isPrivate, initializers, hasPrivateBrand) {
|
|
28082
29327
|
var desc,
|
|
28083
29328
|
init,
|
|
28084
29329
|
value,
|
|
@@ -28086,9 +29331,9 @@
|
|
|
28086
29331
|
get,
|
|
28087
29332
|
set,
|
|
28088
29333
|
decs = decInfo[0];
|
|
28089
|
-
|
|
28090
|
-
get: decInfo[3],
|
|
28091
|
-
set: decInfo[4]
|
|
29334
|
+
decoratorsHaveThis || Array.isArray(decs) || (decs = [decs]), isPrivate ? desc = 0 === kind || 1 === kind ? {
|
|
29335
|
+
get: curryThis1(decInfo[3]),
|
|
29336
|
+
set: curryThis2(decInfo[4])
|
|
28092
29337
|
} : 3 === kind ? {
|
|
28093
29338
|
get: decInfo[3]
|
|
28094
29339
|
} : 4 === kind ? {
|
|
@@ -28098,12 +29343,10 @@
|
|
|
28098
29343
|
} : 0 !== kind && (desc = Object.getOwnPropertyDescriptor(base, name)), 1 === kind ? value = {
|
|
28099
29344
|
get: desc.get,
|
|
28100
29345
|
set: desc.set
|
|
28101
|
-
} : 2 === kind ? value = desc.value : 3 === kind ? value = desc.get : 4 === kind && (value = desc.set)
|
|
28102
|
-
|
|
28103
|
-
set: set
|
|
28104
|
-
}) : value = newValue);else for (var i = decs.length - 1; i >= 0; i--) {
|
|
29346
|
+
} : 2 === kind ? value = desc.value : 3 === kind ? value = desc.get : 4 === kind && (value = desc.set);
|
|
29347
|
+
for (var inc = decoratorsHaveThis ? 2 : 1, i = decs.length - 1; i >= 0; i -= inc) {
|
|
28105
29348
|
var newInit;
|
|
28106
|
-
if (void 0 !== (newValue = memberDec(decs[i], name, desc, initializers, kind, isStatic, isPrivate, value))) assertValidReturnValue(kind, newValue), 0 === kind ? newInit = newValue : 1 === kind ? (newInit = newValue.init, get = newValue.get || value.get, set = newValue.set || value.set, value = {
|
|
29349
|
+
if (void 0 !== (newValue = memberDec(decs[i], decoratorsHaveThis ? decs[i - 1] : void 0, name, desc, initializers, kind, isStatic, isPrivate, value, hasPrivateBrand))) assertValidReturnValue(kind, newValue), 0 === kind ? newInit = newValue : 1 === kind ? (newInit = newValue.init, get = newValue.get || value.get, set = newValue.set || value.set, value = {
|
|
28107
29350
|
get: get,
|
|
28108
29351
|
set: set
|
|
28109
29352
|
}) : value = newValue, void 0 !== newInit && (void 0 === init ? init = newInit : "function" == typeof init ? init = [init, newInit] : init.push(newInit));
|
|
@@ -28114,7 +29357,7 @@
|
|
|
28114
29357
|
};else if ("function" != typeof init) {
|
|
28115
29358
|
var ownInitializers = init;
|
|
28116
29359
|
init = function (instance, init) {
|
|
28117
|
-
for (var value = init, i =
|
|
29360
|
+
for (var value = init, i = ownInitializers.length - 1; i >= 0; i--) value = ownInitializers[i].call(instance, value);
|
|
28118
29361
|
return value;
|
|
28119
29362
|
};
|
|
28120
29363
|
} else {
|
|
@@ -28133,8 +29376,8 @@
|
|
|
28133
29376
|
return value.call(instance, args);
|
|
28134
29377
|
}) : Object.defineProperty(base, name, desc));
|
|
28135
29378
|
}
|
|
28136
|
-
function applyMemberDecs(
|
|
28137
|
-
for (var protoInitializers, staticInitializers, existingProtoNonFields = new Map(), existingStaticNonFields = new Map(), i = 0; i < decInfos.length; i++) {
|
|
29379
|
+
function applyMemberDecs(Class, decInfos, instanceBrand) {
|
|
29380
|
+
for (var protoInitializers, staticInitializers, staticBrand, ret = [], existingProtoNonFields = new Map(), existingStaticNonFields = new Map(), i = 0; i < decInfos.length; i++) {
|
|
28138
29381
|
var decInfo = decInfos[i];
|
|
28139
29382
|
if (Array.isArray(decInfo)) {
|
|
28140
29383
|
var base,
|
|
@@ -28142,17 +29385,21 @@
|
|
|
28142
29385
|
kind = decInfo[1],
|
|
28143
29386
|
name = decInfo[2],
|
|
28144
29387
|
isPrivate = decInfo.length > 3,
|
|
28145
|
-
|
|
28146
|
-
|
|
29388
|
+
decoratorsHaveThis = 16 & kind,
|
|
29389
|
+
isStatic = !!(8 & kind),
|
|
29390
|
+
hasPrivateBrand = instanceBrand;
|
|
29391
|
+
if (kind &= 7, isStatic ? (base = Class, 0 !== kind && (initializers = staticInitializers = staticInitializers || []), isPrivate && !staticBrand && (staticBrand = function (_) {
|
|
29392
|
+
return _checkInRHS(_) === Class;
|
|
29393
|
+
}), hasPrivateBrand = staticBrand) : (base = Class.prototype, 0 !== kind && (initializers = protoInitializers = protoInitializers || [])), 0 !== kind && !isPrivate) {
|
|
28147
29394
|
var existingNonFields = isStatic ? existingStaticNonFields : existingProtoNonFields,
|
|
28148
29395
|
existingKind = existingNonFields.get(name) || 0;
|
|
28149
29396
|
if (!0 === existingKind || 3 === existingKind && 4 !== kind || 4 === existingKind && 3 !== kind) throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + name);
|
|
28150
|
-
!existingKind && kind > 2
|
|
29397
|
+
existingNonFields.set(name, !(!existingKind && kind > 2) || kind);
|
|
28151
29398
|
}
|
|
28152
|
-
applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers);
|
|
29399
|
+
applyMemberDec(ret, base, decInfo, decoratorsHaveThis, name, kind, isStatic, isPrivate, initializers, hasPrivateBrand);
|
|
28153
29400
|
}
|
|
28154
29401
|
}
|
|
28155
|
-
pushInitializers(ret, protoInitializers), pushInitializers(ret, staticInitializers);
|
|
29402
|
+
return pushInitializers(ret, protoInitializers), pushInitializers(ret, staticInitializers), ret;
|
|
28156
29403
|
}
|
|
28157
29404
|
function pushInitializers(ret, initializers) {
|
|
28158
29405
|
initializers && ret.push(function (instance) {
|
|
@@ -28160,14 +29407,14 @@
|
|
|
28160
29407
|
return instance;
|
|
28161
29408
|
});
|
|
28162
29409
|
}
|
|
28163
|
-
function applyClassDecs(
|
|
28164
|
-
if (classDecs.length
|
|
28165
|
-
for (var initializers = [], newClass = targetClass, name = targetClass.name, i = classDecs.length - 1; i >= 0; i
|
|
29410
|
+
function applyClassDecs(targetClass, classDecs, decoratorsHaveThis) {
|
|
29411
|
+
if (classDecs.length) {
|
|
29412
|
+
for (var initializers = [], newClass = targetClass, name = targetClass.name, inc = decoratorsHaveThis ? 2 : 1, i = classDecs.length - 1; i >= 0; i -= inc) {
|
|
28166
29413
|
var decoratorFinishedRef = {
|
|
28167
29414
|
v: !1
|
|
28168
29415
|
};
|
|
28169
29416
|
try {
|
|
28170
|
-
var nextNewClass = classDecs[i](newClass, {
|
|
29417
|
+
var nextNewClass = classDecs[i].call(decoratorsHaveThis ? classDecs[i - 1] : void 0, newClass, {
|
|
28171
29418
|
kind: "class",
|
|
28172
29419
|
name: name,
|
|
28173
29420
|
addInitializer: createAddInitializerMethod(initializers, decoratorFinishedRef)
|
|
@@ -28175,16 +29422,20 @@
|
|
|
28175
29422
|
} finally {
|
|
28176
29423
|
decoratorFinishedRef.v = !0;
|
|
28177
29424
|
}
|
|
28178
|
-
void 0 !== nextNewClass && (assertValidReturnValue(
|
|
29425
|
+
void 0 !== nextNewClass && (assertValidReturnValue(5, nextNewClass), newClass = nextNewClass);
|
|
28179
29426
|
}
|
|
28180
|
-
|
|
29427
|
+
return [newClass, function () {
|
|
28181
29428
|
for (var i = 0; i < initializers.length; i++) initializers[i].call(newClass);
|
|
28182
|
-
}
|
|
29429
|
+
}];
|
|
28183
29430
|
}
|
|
28184
29431
|
}
|
|
28185
|
-
function
|
|
28186
|
-
|
|
28187
|
-
|
|
29432
|
+
function _applyDecs2305(targetClass, memberDecs, classDecs, classDecsHaveThis, instanceBrand) {
|
|
29433
|
+
return {
|
|
29434
|
+
e: applyMemberDecs(targetClass, memberDecs, instanceBrand),
|
|
29435
|
+
get c() {
|
|
29436
|
+
return applyClassDecs(targetClass, classDecs, classDecsHaveThis);
|
|
29437
|
+
}
|
|
29438
|
+
};
|
|
28188
29439
|
}
|
|
28189
29440
|
function _asyncGeneratorDelegate(inner) {
|
|
28190
29441
|
var iter = {},
|
|
@@ -28255,6 +29506,80 @@
|
|
|
28255
29506
|
function _awaitAsyncGenerator(value) {
|
|
28256
29507
|
return new _OverloadYield(value, 0);
|
|
28257
29508
|
}
|
|
29509
|
+
function _checkInRHS(value) {
|
|
29510
|
+
if (Object(value) !== value) throw TypeError("right-hand side of 'in' should be an object, got " + (null !== value ? typeof value : "null"));
|
|
29511
|
+
return value;
|
|
29512
|
+
}
|
|
29513
|
+
function _defineAccessor(type, obj, key, fn) {
|
|
29514
|
+
var desc = {
|
|
29515
|
+
configurable: !0,
|
|
29516
|
+
enumerable: !0
|
|
29517
|
+
};
|
|
29518
|
+
return desc[type] = fn, Object.defineProperty(obj, key, desc);
|
|
29519
|
+
}
|
|
29520
|
+
function dispose_SuppressedError(suppressed, error) {
|
|
29521
|
+
return "undefined" != typeof SuppressedError ? dispose_SuppressedError = SuppressedError : (dispose_SuppressedError = function (suppressed, error) {
|
|
29522
|
+
this.suppressed = suppressed, this.error = error, this.stack = new Error().stack;
|
|
29523
|
+
}, dispose_SuppressedError.prototype = Object.create(Error.prototype, {
|
|
29524
|
+
constructor: {
|
|
29525
|
+
value: dispose_SuppressedError,
|
|
29526
|
+
writable: !0,
|
|
29527
|
+
configurable: !0
|
|
29528
|
+
}
|
|
29529
|
+
})), new dispose_SuppressedError(suppressed, error);
|
|
29530
|
+
}
|
|
29531
|
+
function _dispose(stack, error, hasError) {
|
|
29532
|
+
function next() {
|
|
29533
|
+
for (; stack.length > 0;) try {
|
|
29534
|
+
var r = stack.pop(),
|
|
29535
|
+
p = r.d.call(r.v);
|
|
29536
|
+
if (r.a) return Promise.resolve(p).then(next, err);
|
|
29537
|
+
} catch (e) {
|
|
29538
|
+
return err(e);
|
|
29539
|
+
}
|
|
29540
|
+
if (hasError) throw error;
|
|
29541
|
+
}
|
|
29542
|
+
function err(e) {
|
|
29543
|
+
return error = hasError ? new dispose_SuppressedError(e, error) : e, hasError = !0, next();
|
|
29544
|
+
}
|
|
29545
|
+
return next();
|
|
29546
|
+
}
|
|
29547
|
+
function _iterableToArrayLimit(arr, i) {
|
|
29548
|
+
var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
|
|
29549
|
+
if (null != _i) {
|
|
29550
|
+
var _s,
|
|
29551
|
+
_e,
|
|
29552
|
+
_x,
|
|
29553
|
+
_r,
|
|
29554
|
+
_arr = [],
|
|
29555
|
+
_n = !0,
|
|
29556
|
+
_d = !1;
|
|
29557
|
+
try {
|
|
29558
|
+
if (_x = (_i = _i.call(arr)).next, 0 === i) {
|
|
29559
|
+
if (Object(_i) !== _i) return;
|
|
29560
|
+
_n = !1;
|
|
29561
|
+
} else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
|
|
29562
|
+
} catch (err) {
|
|
29563
|
+
_d = !0, _e = err;
|
|
29564
|
+
} finally {
|
|
29565
|
+
try {
|
|
29566
|
+
if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return;
|
|
29567
|
+
} finally {
|
|
29568
|
+
if (_d) throw _e;
|
|
29569
|
+
}
|
|
29570
|
+
}
|
|
29571
|
+
return _arr;
|
|
29572
|
+
}
|
|
29573
|
+
}
|
|
29574
|
+
function _iterableToArrayLimitLoose(arr, i) {
|
|
29575
|
+
var _i = arr && ("undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]);
|
|
29576
|
+
if (null != _i) {
|
|
29577
|
+
var _s,
|
|
29578
|
+
_arr = [];
|
|
29579
|
+
for (_i = _i.call(arr); arr.length < i && !(_s = _i.next()).done;) _arr.push(_s.value);
|
|
29580
|
+
return _arr;
|
|
29581
|
+
}
|
|
29582
|
+
}
|
|
28258
29583
|
var REACT_ELEMENT_TYPE;
|
|
28259
29584
|
function _jsx(type, props, key, children) {
|
|
28260
29585
|
REACT_ELEMENT_TYPE || (REACT_ELEMENT_TYPE = "function" == typeof Symbol && Symbol.for && Symbol.for("react.element") || 60103);
|
|
@@ -28305,6 +29630,9 @@
|
|
|
28305
29630
|
var exports = {},
|
|
28306
29631
|
Op = Object.prototype,
|
|
28307
29632
|
hasOwn = Op.hasOwnProperty,
|
|
29633
|
+
defineProperty = Object.defineProperty || function (obj, key, desc) {
|
|
29634
|
+
obj[key] = desc.value;
|
|
29635
|
+
},
|
|
28308
29636
|
$Symbol = "function" == typeof Symbol ? Symbol : {},
|
|
28309
29637
|
iteratorSymbol = $Symbol.iterator || "@@iterator",
|
|
28310
29638
|
asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
|
|
@@ -28328,40 +29656,9 @@
|
|
|
28328
29656
|
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
|
|
28329
29657
|
generator = Object.create(protoGenerator.prototype),
|
|
28330
29658
|
context = new Context(tryLocsList || []);
|
|
28331
|
-
return generator
|
|
28332
|
-
|
|
28333
|
-
|
|
28334
|
-
if ("executing" === state) throw new Error("Generator is already running");
|
|
28335
|
-
if ("completed" === state) {
|
|
28336
|
-
if ("throw" === method) throw arg;
|
|
28337
|
-
return doneResult();
|
|
28338
|
-
}
|
|
28339
|
-
for (context.method = method, context.arg = arg;;) {
|
|
28340
|
-
var delegate = context.delegate;
|
|
28341
|
-
if (delegate) {
|
|
28342
|
-
var delegateResult = maybeInvokeDelegate(delegate, context);
|
|
28343
|
-
if (delegateResult) {
|
|
28344
|
-
if (delegateResult === ContinueSentinel) continue;
|
|
28345
|
-
return delegateResult;
|
|
28346
|
-
}
|
|
28347
|
-
}
|
|
28348
|
-
if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
|
|
28349
|
-
if ("suspendedStart" === state) throw state = "completed", context.arg;
|
|
28350
|
-
context.dispatchException(context.arg);
|
|
28351
|
-
} else "return" === context.method && context.abrupt("return", context.arg);
|
|
28352
|
-
state = "executing";
|
|
28353
|
-
var record = tryCatch(innerFn, self, context);
|
|
28354
|
-
if ("normal" === record.type) {
|
|
28355
|
-
if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
|
|
28356
|
-
return {
|
|
28357
|
-
value: record.arg,
|
|
28358
|
-
done: context.done
|
|
28359
|
-
};
|
|
28360
|
-
}
|
|
28361
|
-
"throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
|
|
28362
|
-
}
|
|
28363
|
-
};
|
|
28364
|
-
}(innerFn, self, context), generator;
|
|
29659
|
+
return defineProperty(generator, "_invoke", {
|
|
29660
|
+
value: makeInvokeMethod(innerFn, self, context)
|
|
29661
|
+
}), generator;
|
|
28365
29662
|
}
|
|
28366
29663
|
function tryCatch(fn, obj, arg) {
|
|
28367
29664
|
try {
|
|
@@ -28415,24 +29712,58 @@
|
|
|
28415
29712
|
reject(record.arg);
|
|
28416
29713
|
}
|
|
28417
29714
|
var previousPromise;
|
|
28418
|
-
this
|
|
28419
|
-
function
|
|
28420
|
-
|
|
28421
|
-
|
|
28422
|
-
|
|
29715
|
+
defineProperty(this, "_invoke", {
|
|
29716
|
+
value: function (method, arg) {
|
|
29717
|
+
function callInvokeWithMethodAndArg() {
|
|
29718
|
+
return new PromiseImpl(function (resolve, reject) {
|
|
29719
|
+
invoke(method, arg, resolve, reject);
|
|
29720
|
+
});
|
|
29721
|
+
}
|
|
29722
|
+
return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
29723
|
+
}
|
|
29724
|
+
});
|
|
29725
|
+
}
|
|
29726
|
+
function makeInvokeMethod(innerFn, self, context) {
|
|
29727
|
+
var state = "suspendedStart";
|
|
29728
|
+
return function (method, arg) {
|
|
29729
|
+
if ("executing" === state) throw new Error("Generator is already running");
|
|
29730
|
+
if ("completed" === state) {
|
|
29731
|
+
if ("throw" === method) throw arg;
|
|
29732
|
+
return {
|
|
29733
|
+
value: void 0,
|
|
29734
|
+
done: !0
|
|
29735
|
+
};
|
|
29736
|
+
}
|
|
29737
|
+
for (context.method = method, context.arg = arg;;) {
|
|
29738
|
+
var delegate = context.delegate;
|
|
29739
|
+
if (delegate) {
|
|
29740
|
+
var delegateResult = maybeInvokeDelegate(delegate, context);
|
|
29741
|
+
if (delegateResult) {
|
|
29742
|
+
if (delegateResult === ContinueSentinel) continue;
|
|
29743
|
+
return delegateResult;
|
|
29744
|
+
}
|
|
29745
|
+
}
|
|
29746
|
+
if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
|
|
29747
|
+
if ("suspendedStart" === state) throw state = "completed", context.arg;
|
|
29748
|
+
context.dispatchException(context.arg);
|
|
29749
|
+
} else "return" === context.method && context.abrupt("return", context.arg);
|
|
29750
|
+
state = "executing";
|
|
29751
|
+
var record = tryCatch(innerFn, self, context);
|
|
29752
|
+
if ("normal" === record.type) {
|
|
29753
|
+
if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
|
|
29754
|
+
return {
|
|
29755
|
+
value: record.arg,
|
|
29756
|
+
done: context.done
|
|
29757
|
+
};
|
|
29758
|
+
}
|
|
29759
|
+
"throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
|
|
28423
29760
|
}
|
|
28424
|
-
return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
28425
29761
|
};
|
|
28426
29762
|
}
|
|
28427
29763
|
function maybeInvokeDelegate(delegate, context) {
|
|
28428
|
-
var
|
|
28429
|
-
|
|
28430
|
-
|
|
28431
|
-
if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel;
|
|
28432
|
-
context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method");
|
|
28433
|
-
}
|
|
28434
|
-
return ContinueSentinel;
|
|
28435
|
-
}
|
|
29764
|
+
var methodName = context.method,
|
|
29765
|
+
method = delegate.iterator[methodName];
|
|
29766
|
+
if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel;
|
|
28436
29767
|
var record = tryCatch(method, delegate.iterator, context.arg);
|
|
28437
29768
|
if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
|
|
28438
29769
|
var info = record.arg;
|
|
@@ -28454,7 +29785,7 @@
|
|
|
28454
29785
|
}], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
|
|
28455
29786
|
}
|
|
28456
29787
|
function values(iterable) {
|
|
28457
|
-
if (iterable) {
|
|
29788
|
+
if (iterable || "" === iterable) {
|
|
28458
29789
|
var iteratorMethod = iterable[iteratorSymbol];
|
|
28459
29790
|
if (iteratorMethod) return iteratorMethod.call(iterable);
|
|
28460
29791
|
if ("function" == typeof iterable.next) return iterable;
|
|
@@ -28467,17 +29798,15 @@
|
|
|
28467
29798
|
return next.next = next;
|
|
28468
29799
|
}
|
|
28469
29800
|
}
|
|
28470
|
-
|
|
28471
|
-
next: doneResult
|
|
28472
|
-
};
|
|
29801
|
+
throw new TypeError(typeof iterable + " is not iterable");
|
|
28473
29802
|
}
|
|
28474
|
-
|
|
28475
|
-
|
|
28476
|
-
|
|
28477
|
-
|
|
28478
|
-
|
|
28479
|
-
|
|
28480
|
-
|
|
29803
|
+
return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
|
|
29804
|
+
value: GeneratorFunctionPrototype,
|
|
29805
|
+
configurable: !0
|
|
29806
|
+
}), defineProperty(GeneratorFunctionPrototype, "constructor", {
|
|
29807
|
+
value: GeneratorFunction,
|
|
29808
|
+
configurable: !0
|
|
29809
|
+
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
|
|
28481
29810
|
var ctor = "function" == typeof genFun && genFun.constructor;
|
|
28482
29811
|
return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
|
|
28483
29812
|
}, exports.mark = function (genFun) {
|
|
@@ -28498,8 +29827,9 @@
|
|
|
28498
29827
|
return this;
|
|
28499
29828
|
}), define(Gp, "toString", function () {
|
|
28500
29829
|
return "[object Generator]";
|
|
28501
|
-
}), exports.keys = function (
|
|
28502
|
-
var
|
|
29830
|
+
}), exports.keys = function (val) {
|
|
29831
|
+
var object = Object(val),
|
|
29832
|
+
keys = [];
|
|
28503
29833
|
for (var key in object) keys.push(key);
|
|
28504
29834
|
return keys.reverse(), function next() {
|
|
28505
29835
|
for (; keys.length;) {
|
|
@@ -28598,6 +29928,17 @@
|
|
|
28598
29928
|
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
28599
29929
|
}, _typeof(obj);
|
|
28600
29930
|
}
|
|
29931
|
+
function _using(stack, value, isAwait) {
|
|
29932
|
+
if (null == value) return value;
|
|
29933
|
+
if ("object" != typeof value) throw new TypeError("using declarations can only be used with objects, null, or undefined.");
|
|
29934
|
+
if (isAwait) var dispose = value[Symbol.asyncDispose || Symbol.for("Symbol.asyncDispose")];
|
|
29935
|
+
if (null == dispose && (dispose = value[Symbol.dispose || Symbol.for("Symbol.dispose")]), "function" != typeof dispose) throw new TypeError("Property [Symbol.dispose] is not a function.");
|
|
29936
|
+
return stack.push({
|
|
29937
|
+
v: value,
|
|
29938
|
+
d: dispose,
|
|
29939
|
+
a: isAwait
|
|
29940
|
+
}), value;
|
|
29941
|
+
}
|
|
28601
29942
|
function _wrapRegExp() {
|
|
28602
29943
|
_wrapRegExp = function (re, groups) {
|
|
28603
29944
|
return new BabelRegExp(re, void 0, groups);
|
|
@@ -28621,12 +29962,18 @@
|
|
|
28621
29962
|
}
|
|
28622
29963
|
return _inherits(BabelRegExp, RegExp), BabelRegExp.prototype.exec = function (str) {
|
|
28623
29964
|
var result = _super.exec.call(this, str);
|
|
28624
|
-
|
|
29965
|
+
if (result) {
|
|
29966
|
+
result.groups = buildGroups(result, this);
|
|
29967
|
+
var indices = result.indices;
|
|
29968
|
+
indices && (indices.groups = buildGroups(indices, this));
|
|
29969
|
+
}
|
|
29970
|
+
return result;
|
|
28625
29971
|
}, BabelRegExp.prototype[Symbol.replace] = function (str, substitution) {
|
|
28626
29972
|
if ("string" == typeof substitution) {
|
|
28627
29973
|
var groups = _groups.get(this);
|
|
28628
29974
|
return _super[Symbol.replace].call(this, str, substitution.replace(/\$<([^>]+)>/g, function (_, name) {
|
|
28629
|
-
|
|
29975
|
+
var group = groups[name];
|
|
29976
|
+
return "$" + (Array.isArray(group) ? group.join("$") : group);
|
|
28630
29977
|
}));
|
|
28631
29978
|
}
|
|
28632
29979
|
if ("function" == typeof substitution) {
|
|
@@ -28688,7 +30035,7 @@
|
|
|
28688
30035
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
28689
30036
|
descriptor.configurable = true;
|
|
28690
30037
|
if ("value" in descriptor) descriptor.writable = true;
|
|
28691
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
30038
|
+
Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
|
|
28692
30039
|
}
|
|
28693
30040
|
}
|
|
28694
30041
|
function _createClass(Constructor, protoProps, staticProps) {
|
|
@@ -28730,6 +30077,7 @@
|
|
|
28730
30077
|
return obj;
|
|
28731
30078
|
}
|
|
28732
30079
|
function _defineProperty(obj, key, value) {
|
|
30080
|
+
key = _toPropertyKey(key);
|
|
28733
30081
|
if (key in obj) {
|
|
28734
30082
|
Object.defineProperty(obj, key, {
|
|
28735
30083
|
value: value,
|
|
@@ -29031,7 +30379,7 @@
|
|
|
29031
30379
|
function _set(target, property, value, receiver, isStrict) {
|
|
29032
30380
|
var s = set(target, property, value, receiver || target);
|
|
29033
30381
|
if (!s && isStrict) {
|
|
29034
|
-
throw new
|
|
30382
|
+
throw new TypeError('failed to set property');
|
|
29035
30383
|
}
|
|
29036
30384
|
return value;
|
|
29037
30385
|
}
|
|
@@ -29059,7 +30407,7 @@
|
|
|
29059
30407
|
throw new TypeError("\"" + name + "\" is write-only");
|
|
29060
30408
|
}
|
|
29061
30409
|
function _classNameTDZError(name) {
|
|
29062
|
-
throw new
|
|
30410
|
+
throw new ReferenceError("Class \"" + name + "\" cannot be referenced in computed property keys.");
|
|
29063
30411
|
}
|
|
29064
30412
|
function _temporalUndefined() {}
|
|
29065
30413
|
function _tdz(name) {
|
|
@@ -29096,40 +30444,6 @@
|
|
|
29096
30444
|
function _iterableToArray(iter) {
|
|
29097
30445
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
29098
30446
|
}
|
|
29099
|
-
function _iterableToArrayLimit(arr, i) {
|
|
29100
|
-
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
29101
|
-
if (_i == null) return;
|
|
29102
|
-
var _arr = [];
|
|
29103
|
-
var _n = true;
|
|
29104
|
-
var _d = false;
|
|
29105
|
-
var _s, _e;
|
|
29106
|
-
try {
|
|
29107
|
-
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
|
|
29108
|
-
_arr.push(_s.value);
|
|
29109
|
-
if (i && _arr.length === i) break;
|
|
29110
|
-
}
|
|
29111
|
-
} catch (err) {
|
|
29112
|
-
_d = true;
|
|
29113
|
-
_e = err;
|
|
29114
|
-
} finally {
|
|
29115
|
-
try {
|
|
29116
|
-
if (!_n && _i["return"] != null) _i["return"]();
|
|
29117
|
-
} finally {
|
|
29118
|
-
if (_d) throw _e;
|
|
29119
|
-
}
|
|
29120
|
-
}
|
|
29121
|
-
return _arr;
|
|
29122
|
-
}
|
|
29123
|
-
function _iterableToArrayLimitLoose(arr, i) {
|
|
29124
|
-
var _i = arr && (typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]);
|
|
29125
|
-
if (_i == null) return;
|
|
29126
|
-
var _arr = [];
|
|
29127
|
-
for (_i = _i.call(arr), _step; !(_step = _i.next()).done;) {
|
|
29128
|
-
_arr.push(_step.value);
|
|
29129
|
-
if (i && _arr.length === i) break;
|
|
29130
|
-
}
|
|
29131
|
-
return _arr;
|
|
29132
|
-
}
|
|
29133
30447
|
function _unsupportedIterableToArray(o, minLen) {
|
|
29134
30448
|
if (!o) return;
|
|
29135
30449
|
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
@@ -29240,7 +30554,7 @@
|
|
|
29240
30554
|
return typeof key === "symbol" ? key : String(key);
|
|
29241
30555
|
}
|
|
29242
30556
|
function _initializerWarningHelper(descriptor, context) {
|
|
29243
|
-
throw new Error('Decorating class property failed. Please ensure that ' + '
|
|
30557
|
+
throw new Error('Decorating class property failed. Please ensure that ' + 'transform-class-properties is enabled and runs after the decorators transform.');
|
|
29244
30558
|
}
|
|
29245
30559
|
function _initializerDefineProperty(target, property, descriptor, context) {
|
|
29246
30560
|
if (!descriptor) return;
|
|
@@ -39783,6 +41097,7 @@
|
|
|
39783
41097
|
* Released on: August 17, 2023
|
|
39784
41098
|
*/
|
|
39785
41099
|
|
|
41100
|
+
|
|
39786
41101
|
// Swiper Class
|
|
39787
41102
|
const modules = [Virtual, Keyboard, Mousewheel, Navigation, Pagination, Scrollbar, Parallax, Zoom, Controller, A11y, History, HashNavigation, Autoplay, Thumb, freeMode, Grid, Manipulation, EffectFade, EffectCube, EffectFlip, EffectCoverflow, EffectCreative, EffectCards];
|
|
39788
41103
|
Swiper$1.use(modules);
|
|
@@ -40129,6 +41444,7 @@
|
|
|
40129
41444
|
* Released on: August 17, 2023
|
|
40130
41445
|
*/
|
|
40131
41446
|
|
|
41447
|
+
|
|
40132
41448
|
/* eslint-disable spaced-comment */
|
|
40133
41449
|
|
|
40134
41450
|
const SwiperCSS = `:host{--swiper-theme-color:#007aff}:host{position:relative;display:block;margin-left:auto;margin-right:auto;z-index:1}.swiper{width:100%;height:100%;margin-left:auto;margin-right:auto;position:relative;overflow:hidden;overflow:clip;list-style:none;padding:0;z-index:1;display:block}.swiper-vertical>.swiper-wrapper{flex-direction:column}.swiper-wrapper{position:relative;width:100%;height:100%;z-index:1;display:flex;transition-property:transform;transition-timing-function:var(--swiper-wrapper-transition-timing-function,initial);box-sizing:content-box}.swiper-android ::slotted(swiper-slide),.swiper-ios ::slotted(swiper-slide),.swiper-wrapper{transform:translate3d(0px,0,0)}.swiper-horizontal{touch-action:pan-y}.swiper-vertical{touch-action:pan-x}::slotted(swiper-slide){flex-shrink:0;width:100%;height:100%;position:relative;transition-property:transform;display:block}::slotted(.swiper-slide-invisible-blank){visibility:hidden}.swiper-autoheight,.swiper-autoheight ::slotted(swiper-slide){height:auto}.swiper-autoheight .swiper-wrapper{align-items:flex-start;transition-property:transform,height}.swiper-backface-hidden ::slotted(swiper-slide){transform:translateZ(0);-webkit-backface-visibility:hidden;backface-visibility:hidden}.swiper-3d.swiper-css-mode .swiper-wrapper{perspective:1200px}.swiper-3d .swiper-wrapper{transform-style:preserve-3d}.swiper-3d{perspective:1200px}.swiper-3d .swiper-cube-shadow,.swiper-3d ::slotted(swiper-slide){transform-style:preserve-3d}.swiper-css-mode>.swiper-wrapper{overflow:auto;scrollbar-width:none;-ms-overflow-style:none}.swiper-css-mode>.swiper-wrapper::-webkit-scrollbar{display:none}.swiper-css-mode ::slotted(swiper-slide){scroll-snap-align:start start}.swiper-css-mode.swiper-horizontal>.swiper-wrapper{scroll-snap-type:x mandatory}.swiper-css-mode.swiper-vertical>.swiper-wrapper{scroll-snap-type:y mandatory}.swiper-css-mode.swiper-free-mode>.swiper-wrapper{scroll-snap-type:none}.swiper-css-mode.swiper-free-mode ::slotted(swiper-slide){scroll-snap-align:none}.swiper-css-mode.swiper-centered>.swiper-wrapper::before{content:'';flex-shrink:0;order:9999}.swiper-css-mode.swiper-centered ::slotted(swiper-slide){scroll-snap-align:center center;scroll-snap-stop:always}.swiper-css-mode.swiper-centered.swiper-horizontal ::slotted(swiper-slide):first-child{margin-inline-start:var(--swiper-centered-offset-before)}.swiper-css-mode.swiper-centered.swiper-horizontal>.swiper-wrapper::before{height:100%;min-height:1px;width:var(--swiper-centered-offset-after)}.swiper-css-mode.swiper-centered.swiper-vertical ::slotted(swiper-slide):first-child{margin-block-start:var(--swiper-centered-offset-before)}.swiper-css-mode.swiper-centered.swiper-vertical>.swiper-wrapper::before{width:100%;min-width:1px;height:var(--swiper-centered-offset-after)}.swiper-virtual ::slotted(swiper-slide){-webkit-backface-visibility:hidden;transform:translateZ(0)}.swiper-virtual.swiper-css-mode .swiper-wrapper::after{content:'';position:absolute;left:0;top:0;pointer-events:none}.swiper-virtual.swiper-css-mode.swiper-horizontal .swiper-wrapper::after{height:1px;width:var(--swiper-virtual-size)}.swiper-virtual.swiper-css-mode.swiper-vertical .swiper-wrapper::after{width:1px;height:var(--swiper-virtual-size)}:host{--swiper-navigation-size:44px}.swiper-button-next,.swiper-button-prev{position:absolute;top:var(--swiper-navigation-top-offset,50%);width:calc(var(--swiper-navigation-size)/ 44 * 27);height:var(--swiper-navigation-size);margin-top:calc(0px - (var(--swiper-navigation-size)/ 2));z-index:10;cursor:pointer;display:flex;align-items:center;justify-content:center;color:var(--swiper-navigation-color,var(--swiper-theme-color))}.swiper-button-next.swiper-button-disabled,.swiper-button-prev.swiper-button-disabled{opacity:.35;cursor:auto;pointer-events:none}.swiper-button-next.swiper-button-hidden,.swiper-button-prev.swiper-button-hidden{opacity:0;cursor:auto;pointer-events:none}.swiper-navigation-disabled .swiper-button-next,.swiper-navigation-disabled .swiper-button-prev{display:none!important}.swiper-button-next svg,.swiper-button-prev svg{width:100%;height:100%;object-fit:contain;transform-origin:center}.swiper-rtl .swiper-button-next svg,.swiper-rtl .swiper-button-prev svg{transform:rotate(180deg)}.swiper-button-prev,.swiper-rtl .swiper-button-next{left:var(--swiper-navigation-sides-offset,10px);right:auto}.swiper-button-next,.swiper-rtl .swiper-button-prev{right:var(--swiper-navigation-sides-offset,10px);left:auto}.swiper-button-lock{display:none}.swiper-pagination{position:absolute;text-align:center;transition:.3s opacity;transform:translate3d(0,0,0);z-index:10}.swiper-pagination.swiper-pagination-hidden{opacity:0}.swiper-pagination-disabled>.swiper-pagination,.swiper-pagination.swiper-pagination-disabled{display:none!important}.swiper-horizontal>.swiper-pagination-bullets,.swiper-pagination-bullets.swiper-pagination-horizontal,.swiper-pagination-custom,.swiper-pagination-fraction{bottom:var(--swiper-pagination-bottom,8px);top:var(--swiper-pagination-top,auto);left:0;width:100%}.swiper-pagination-bullets-dynamic{overflow:hidden;font-size:0}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transform:scale(.33);position:relative}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active{transform:scale(1)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-main{transform:scale(1)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev{transform:scale(.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev-prev{transform:scale(.33)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next{transform:scale(.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next-next{transform:scale(.33)}.swiper-pagination-bullet{width:var(--swiper-pagination-bullet-width,var(--swiper-pagination-bullet-size,8px));height:var(--swiper-pagination-bullet-height,var(--swiper-pagination-bullet-size,8px));display:inline-block;border-radius:var(--swiper-pagination-bullet-border-radius,50%);background:var(--swiper-pagination-bullet-inactive-color,#000);opacity:var(--swiper-pagination-bullet-inactive-opacity, .2)}button.swiper-pagination-bullet{border:none;margin:0;padding:0;box-shadow:none;-webkit-appearance:none;appearance:none}.swiper-pagination-clickable .swiper-pagination-bullet{cursor:pointer}.swiper-pagination-bullet:only-child{display:none!important}.swiper-pagination-bullet-active{opacity:var(--swiper-pagination-bullet-opacity, 1);background:var(--swiper-pagination-color,var(--swiper-theme-color))}.swiper-pagination-vertical.swiper-pagination-bullets,.swiper-vertical>.swiper-pagination-bullets{right:var(--swiper-pagination-right,8px);left:var(--swiper-pagination-left,auto);top:50%;transform:translate3d(0px,-50%,0)}.swiper-pagination-vertical.swiper-pagination-bullets .swiper-pagination-bullet,.swiper-vertical>.swiper-pagination-bullets .swiper-pagination-bullet{margin:var(--swiper-pagination-bullet-vertical-gap,6px) 0;display:block}.swiper-pagination-vertical.swiper-pagination-bullets.swiper-pagination-bullets-dynamic,.swiper-vertical>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic{top:50%;transform:translateY(-50%);width:8px}.swiper-pagination-vertical.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet,.swiper-vertical>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{display:inline-block;transition:.2s transform,.2s top}.swiper-horizontal>.swiper-pagination-bullets .swiper-pagination-bullet,.swiper-pagination-horizontal.swiper-pagination-bullets .swiper-pagination-bullet{margin:0 var(--swiper-pagination-bullet-horizontal-gap,4px)}.swiper-horizontal>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic,.swiper-pagination-horizontal.swiper-pagination-bullets.swiper-pagination-bullets-dynamic{left:50%;transform:translateX(-50%);white-space:nowrap}.swiper-horizontal>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet,.swiper-pagination-horizontal.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transition:.2s transform,.2s left}.swiper-horizontal.swiper-rtl>.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transition:.2s transform,.2s right}.swiper-pagination-fraction{color:var(--swiper-pagination-fraction-color,inherit)}.swiper-pagination-progressbar{background:var(--swiper-pagination-progressbar-bg-color,rgba(0,0,0,.25));position:absolute}.swiper-pagination-progressbar .swiper-pagination-progressbar-fill{background:var(--swiper-pagination-color,var(--swiper-theme-color));position:absolute;left:0;top:0;width:100%;height:100%;transform:scale(0);transform-origin:left top}.swiper-rtl .swiper-pagination-progressbar .swiper-pagination-progressbar-fill{transform-origin:right top}.swiper-horizontal>.swiper-pagination-progressbar,.swiper-pagination-progressbar.swiper-pagination-horizontal,.swiper-pagination-progressbar.swiper-pagination-vertical.swiper-pagination-progressbar-opposite,.swiper-vertical>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite{width:100%;height:var(--swiper-pagination-progressbar-size,4px);left:0;top:0}.swiper-horizontal>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite,.swiper-pagination-progressbar.swiper-pagination-horizontal.swiper-pagination-progressbar-opposite,.swiper-pagination-progressbar.swiper-pagination-vertical,.swiper-vertical>.swiper-pagination-progressbar{width:var(--swiper-pagination-progressbar-size,4px);height:100%;left:0;top:0}.swiper-pagination-lock{display:none}.swiper-scrollbar{border-radius:var(--swiper-scrollbar-border-radius,10px);position:relative;-ms-touch-action:none;background:var(--swiper-scrollbar-bg-color,rgba(0,0,0,.1))}.swiper-scrollbar-disabled>.swiper-scrollbar,.swiper-scrollbar.swiper-scrollbar-disabled{display:none!important}.swiper-horizontal>.swiper-scrollbar,.swiper-scrollbar.swiper-scrollbar-horizontal{position:absolute;left:var(--swiper-scrollbar-sides-offset,1%);bottom:var(--swiper-scrollbar-bottom,4px);top:var(--swiper-scrollbar-top,auto);z-index:50;height:var(--swiper-scrollbar-size,4px);width:calc(100% - 2 * var(--swiper-scrollbar-sides-offset,1%))}.swiper-scrollbar.swiper-scrollbar-vertical,.swiper-vertical>.swiper-scrollbar{position:absolute;left:var(--swiper-scrollbar-left,auto);right:var(--swiper-scrollbar-right,4px);top:var(--swiper-scrollbar-sides-offset,1%);z-index:50;width:var(--swiper-scrollbar-size,4px);height:calc(100% - 2 * var(--swiper-scrollbar-sides-offset,1%))}.swiper-scrollbar-drag{height:100%;width:100%;position:relative;background:var(--swiper-scrollbar-drag-bg-color,rgba(0,0,0,.5));border-radius:var(--swiper-scrollbar-border-radius,10px);left:0;top:0}.swiper-scrollbar-cursor-drag{cursor:move}.swiper-scrollbar-lock{display:none}::slotted(.swiper-slide-zoomed){cursor:move;touch-action:none}.swiper .swiper-notification{position:absolute;left:0;top:0;pointer-events:none;opacity:0;z-index:-1000}.swiper-free-mode>.swiper-wrapper{transition-timing-function:ease-out;margin:0 auto}.swiper-grid>.swiper-wrapper{flex-wrap:wrap}.swiper-grid-column>.swiper-wrapper{flex-wrap:wrap;flex-direction:column}.swiper-fade.swiper-free-mode ::slotted(swiper-slide){transition-timing-function:ease-out}.swiper-fade ::slotted(swiper-slide){pointer-events:none;transition-property:opacity}.swiper-fade ::slotted(swiper-slide) ::slotted(swiper-slide){pointer-events:none}.swiper-fade ::slotted(.swiper-slide-active){pointer-events:auto}.swiper-fade ::slotted(.swiper-slide-active) ::slotted(.swiper-slide-active){pointer-events:auto}.swiper-cube{overflow:visible}.swiper-cube ::slotted(swiper-slide){pointer-events:none;-webkit-backface-visibility:hidden;backface-visibility:hidden;z-index:1;visibility:hidden;transform-origin:0 0;width:100%;height:100%}.swiper-cube ::slotted(swiper-slide) ::slotted(swiper-slide){pointer-events:none}.swiper-cube.swiper-rtl ::slotted(swiper-slide){transform-origin:100% 0}.swiper-cube ::slotted(.swiper-slide-active),.swiper-cube ::slotted(.swiper-slide-active) ::slotted(.swiper-slide-active){pointer-events:auto}.swiper-cube ::slotted(.swiper-slide-active),.swiper-cube ::slotted(.swiper-slide-next),.swiper-cube ::slotted(.swiper-slide-prev){pointer-events:auto;visibility:visible}.swiper-cube .swiper-cube-shadow{position:absolute;left:0;bottom:0px;width:100%;height:100%;opacity:.6;z-index:0}.swiper-cube .swiper-cube-shadow:before{content:'';background:#000;position:absolute;left:0;top:0;bottom:0;right:0;filter:blur(50px)}.swiper-cube ::slotted(.swiper-slide-next)+::slotted(swiper-slide){pointer-events:auto;visibility:visible}.swiper-flip{overflow:visible}.swiper-flip ::slotted(swiper-slide){pointer-events:none;-webkit-backface-visibility:hidden;backface-visibility:hidden;z-index:1}.swiper-flip ::slotted(swiper-slide) ::slotted(swiper-slide){pointer-events:none}.swiper-flip ::slotted(.swiper-slide-active),.swiper-flip ::slotted(.swiper-slide-active) ::slotted(.swiper-slide-active){pointer-events:auto}.swiper-creative ::slotted(swiper-slide){-webkit-backface-visibility:hidden;backface-visibility:hidden;overflow:hidden;transition-property:transform,opacity,height}.swiper-cards{overflow:visible}.swiper-cards ::slotted(swiper-slide){transform-origin:center bottom;-webkit-backface-visibility:hidden;backface-visibility:hidden;overflow:hidden}`;
|