@revenuecat/purchases-ui-js 2.0.1 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/button/ButtonNode.stories.svelte +66 -108
- package/dist/components/button/ButtonNode.svelte +3 -31
- package/dist/components/footer/Footer.stories.svelte +112 -106
- package/dist/components/footer/Footer.svelte +10 -6
- package/dist/components/icon/Icon.stories.svelte +100 -0
- package/dist/components/icon/Icon.stories.svelte.d.ts +19 -0
- package/dist/components/icon/Icon.svelte +73 -0
- package/dist/components/icon/Icon.svelte.d.ts +4 -0
- package/dist/components/image/ClipPath.svelte +49 -0
- package/dist/components/image/ClipPath.svelte.d.ts +9 -0
- package/dist/components/image/Image.stories.svelte +83 -199
- package/dist/components/image/Image.svelte +152 -137
- package/dist/components/image/Image.svelte.d.ts +1 -1
- package/dist/components/image/Overlay.svelte +36 -0
- package/dist/components/image/Overlay.svelte.d.ts +8 -0
- package/dist/components/package/Package.stories.svelte +12 -27
- package/dist/components/package/Package.svelte +10 -44
- package/dist/components/paywall/Node.svelte +45 -43
- package/dist/components/paywall/Node.svelte.d.ts +10 -12
- package/dist/components/paywall/Paywall.stories.svelte +36 -140
- package/dist/components/paywall/Paywall.svelte +38 -20
- package/dist/components/paywall/Paywall.svelte.d.ts +3 -2
- package/dist/components/paywall/fixtures/override-paywall.d.ts +2 -0
- package/dist/components/paywall/fixtures/override-paywall.js +1310 -0
- package/dist/components/paywall/fixtures/stack-paywall.d.ts +2 -0
- package/dist/components/paywall/fixtures/stack-paywall.js +5223 -0
- package/dist/components/paywall/fixtures/variables.d.ts +261 -0
- package/dist/components/paywall/fixtures/variables.js +262 -0
- package/dist/components/purchase-button/PurchaseButton.stories.svelte +10 -29
- package/dist/components/purchase-button/PurchaseButton.svelte +2 -34
- package/dist/components/stack/Stack.stories.svelte +2364 -1020
- package/dist/components/stack/Stack.svelte +108 -151
- package/dist/components/stack/Stack.svelte.d.ts +6 -2
- package/dist/components/stack/stack-utils.d.ts +10 -30
- package/dist/components/stack/stack-utils.js +77 -257
- package/dist/components/text/Text.svelte +3 -37
- package/dist/components/text/Text.svelte.d.ts +1 -2
- package/dist/components/text/TextNode.stories.svelte +10 -48
- package/dist/components/text/TextNode.svelte +25 -37
- package/dist/components/text/TextNode.svelte.d.ts +1 -1
- package/dist/components/text/text-utils.d.ts +4 -9
- package/dist/components/text/text-utils.js +32 -117
- package/dist/components/timeline/Timeline.stories.svelte +640 -256
- package/dist/components/timeline/Timeline.svelte +42 -30
- package/dist/components/timeline/Timeline.svelte.d.ts +1 -1
- package/dist/components/timeline/TimelineItem.svelte +80 -112
- package/dist/components/timeline/TimelineItem.svelte.d.ts +6 -2
- package/dist/components/timeline/timeline-utils.d.ts +24 -6
- package/dist/components/timeline/timeline-utils.js +21 -114
- package/dist/data/entities.d.ts +23 -169
- package/dist/index.d.ts +11 -10
- package/dist/index.js +11 -10
- package/dist/stores/color-mode.d.ts +1 -1
- package/dist/stores/localization.d.ts +1 -1
- package/dist/stores/localization.js +3 -2
- package/dist/stores/paywall.d.ts +7 -3
- package/dist/stores/selected.d.ts +5 -0
- package/dist/stores/selected.js +12 -0
- package/dist/stores/variables.d.ts +2 -3
- package/dist/stores/variables.js +0 -1
- package/dist/stories/component-decorator.d.ts +2 -0
- package/dist/stories/component-decorator.js +12 -0
- package/dist/stories/fixtures.d.ts +6 -4
- package/dist/stories/fixtures.js +6241 -5485
- package/dist/stories/localization-decorator.js +1 -1
- package/dist/stories/paywall-decorator.js +8 -1
- package/dist/stories/variables-decorator.d.ts +1 -1
- package/dist/stories/viewport-decorator.d.ts +2 -0
- package/dist/stories/viewport-decorator.js +8 -0
- package/dist/stories/viewport-wrapper.svelte +53 -0
- package/dist/stories/viewport-wrapper.svelte.d.ts +10 -0
- package/dist/stories/with-layout.d.ts +2 -10
- package/dist/stories/with-layout.js +3 -5
- package/dist/stories/with-layout.svelte +3 -3
- package/dist/types/alignment.d.ts +5 -3
- package/dist/types/background.d.ts +6 -5
- package/dist/types/base.d.ts +7 -0
- package/dist/types/colors.d.ts +4 -4
- package/dist/types/component.d.ts +10 -0
- package/dist/types/component.js +1 -0
- package/dist/types/components/button.d.ts +5 -2
- package/dist/types/components/footer.d.ts +3 -2
- package/dist/types/components/icon.d.ts +28 -0
- package/dist/types/components/icon.js +1 -0
- package/dist/types/components/image.d.ts +20 -0
- package/dist/types/components/image.js +1 -0
- package/dist/types/components/package.d.ts +3 -2
- package/dist/types/components/purchase-button.d.ts +3 -2
- package/dist/types/components/stack.d.ts +32 -0
- package/dist/types/components/stack.js +1 -0
- package/dist/types/components/text.d.ts +20 -0
- package/dist/types/components/text.js +1 -0
- package/dist/types/components/timeline.d.ts +35 -0
- package/dist/types/components/timeline.js +1 -0
- package/dist/types/localization.d.ts +2 -1
- package/dist/types/media.d.ts +4 -3
- package/dist/types/overrides.d.ts +48 -0
- package/dist/types/overrides.js +1 -0
- package/dist/types/variables.d.ts +13 -0
- package/dist/types/variables.js +10 -0
- package/dist/types.d.ts +17 -9
- package/dist/ui/atoms/typography.stories.svelte +3 -29
- package/dist/ui/atoms/typography.stories.svelte.d.ts +1 -1
- package/dist/ui/layout/main-block.svelte +2 -2
- package/dist/ui/molecules/button.stories.svelte +5 -10
- package/dist/ui/molecules/button.svelte +1 -1
- package/dist/ui/theme/colors.d.ts +0 -6
- package/dist/ui/theme/colors.js +1 -1
- package/dist/ui/theme/text.d.ts +3 -4
- package/dist/ui/theme/theme.d.ts +2 -2
- package/dist/ui/theme/theme.js +2 -2
- package/dist/ui/theme/utils.d.ts +2 -12
- package/dist/ui/theme/utils.js +5 -5
- package/dist/utils/background-utils.d.ts +4 -0
- package/dist/utils/background-utils.js +39 -0
- package/dist/utils/base-utils.d.ts +18 -0
- package/dist/utils/base-utils.js +124 -0
- package/dist/utils/constants.d.ts +2 -2
- package/dist/utils/constants.js +6 -1
- package/dist/utils/font-utils.d.ts +4 -0
- package/dist/utils/font-utils.js +47 -0
- package/dist/utils/style-utils.d.ts +7 -120
- package/dist/utils/style-utils.js +35 -314
- package/dist/utils/variable-utils.d.ts +1 -22
- package/dist/utils/variable-utils.js +28 -24
- package/dist/web-components/index.css +1 -1
- package/dist/web-components/index.js +1415 -987
- package/package.json +34 -24
- package/dist/components/button/button-utils.d.ts +0 -2
- package/dist/components/button/button-utils.js +0 -19
- package/dist/components/image/image-utils.d.ts +0 -19
- package/dist/components/image/image-utils.js +0 -33
- package/dist/components/purchase-button/purchase-button-utils.d.ts +0 -2
- package/dist/components/purchase-button/purchase-button-utils.js +0 -20
- package/dist/data/state.d.ts +0 -4
- package/dist/stories/meta-templates.d.ts +0 -12
- package/dist/stories/meta-templates.js +0 -155
- /package/dist/{data/state.js → types/base.js} +0 -0
|
@@ -1,423 +1,900 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
function le(t) {
|
|
10
|
-
return t === this.v;
|
|
1
|
+
typeof window < "u" && ((window.__svelte ??= {}).v ??= /* @__PURE__ */ new Set()).add("5");
|
|
2
|
+
const Ze = 1, Je = 2, Qe = 4, tn = 8, en = 16, y = Symbol(), nn = "http://www.w3.org/1999/xhtml", ve = !1;
|
|
3
|
+
var rn = Array.isArray, an = Array.prototype.indexOf, ee = Object.defineProperty, St = Object.getOwnPropertyDescriptor, pe = Object.getOwnPropertyDescriptors, sn = Object.prototype, ln = Array.prototype, Ht = Object.getPrototypeOf;
|
|
4
|
+
const Ut = () => {
|
|
5
|
+
};
|
|
6
|
+
function on(t) {
|
|
7
|
+
for (var e = 0; e < t.length; e++)
|
|
8
|
+
t[e]();
|
|
11
9
|
}
|
|
12
|
-
function
|
|
13
|
-
|
|
10
|
+
function fn() {
|
|
11
|
+
var t, e, n = new Promise((r, i) => {
|
|
12
|
+
t = r, e = i;
|
|
13
|
+
});
|
|
14
|
+
return { promise: n, resolve: t, reject: e };
|
|
14
15
|
}
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
const F = 2, he = 4, un = 8, ot = 16, Y = 32, ft = 64, ge = 128, R = 256, wt = 512, x = 1024, D = 2048, G = 4096, q = 8192, Q = 16384, me = 32768, Ft = 65536, ne = 1 << 17, cn = 1 << 18, It = 1 << 19, _n = 1 << 20, Ct = 1 << 21, Vt = 1 << 22, Z = 1 << 23, rt = Symbol("$state"), dn = Symbol("legacy props"), vn = Symbol(""), Wt = new class extends Error {
|
|
17
|
+
name = "StaleReactionError";
|
|
18
|
+
message = "The reaction that called `getAbortSignal()` was re-run or destroyed";
|
|
19
|
+
}();
|
|
20
|
+
function pn() {
|
|
21
|
+
throw new Error("https://svelte.dev/e/async_derived_orphan");
|
|
17
22
|
}
|
|
18
|
-
function
|
|
23
|
+
function hn() {
|
|
19
24
|
throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
|
|
20
25
|
}
|
|
21
|
-
function
|
|
26
|
+
function gn(t) {
|
|
22
27
|
throw new Error("https://svelte.dev/e/props_invalid_value");
|
|
23
28
|
}
|
|
24
|
-
function
|
|
29
|
+
function mn() {
|
|
25
30
|
throw new Error("https://svelte.dev/e/state_descriptors_fixed");
|
|
26
31
|
}
|
|
27
|
-
function
|
|
32
|
+
function bn() {
|
|
28
33
|
throw new Error("https://svelte.dev/e/state_prototype_fixed");
|
|
29
34
|
}
|
|
30
|
-
function
|
|
31
|
-
throw new Error("https://svelte.dev/e/state_unsafe_local_read");
|
|
32
|
-
}
|
|
33
|
-
function tn() {
|
|
35
|
+
function yn() {
|
|
34
36
|
throw new Error("https://svelte.dev/e/state_unsafe_mutation");
|
|
35
37
|
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
it = !0;
|
|
38
|
+
function be(t) {
|
|
39
|
+
return t === this.v;
|
|
39
40
|
}
|
|
40
|
-
function
|
|
41
|
+
function Sn(t, e) {
|
|
42
|
+
return t != t ? e == e : t !== e || t !== null && typeof t == "object" || typeof t == "function";
|
|
43
|
+
}
|
|
44
|
+
function wn(t) {
|
|
45
|
+
return !Sn(t, this.v);
|
|
46
|
+
}
|
|
47
|
+
let Ot = !1, En = !1;
|
|
48
|
+
function xn() {
|
|
49
|
+
Ot = !0;
|
|
50
|
+
}
|
|
51
|
+
let P = null;
|
|
52
|
+
function Et(t) {
|
|
53
|
+
P = t;
|
|
54
|
+
}
|
|
55
|
+
function kn(t, e = !1, n) {
|
|
56
|
+
P = {
|
|
57
|
+
p: P,
|
|
58
|
+
c: null,
|
|
59
|
+
e: null,
|
|
60
|
+
s: t,
|
|
61
|
+
x: null,
|
|
62
|
+
l: Ot && !e ? { s: null, u: null, $: [] } : null
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
function Tn(t) {
|
|
66
|
+
var e = (
|
|
67
|
+
/** @type {ComponentContext} */
|
|
68
|
+
P
|
|
69
|
+
), n = e.e;
|
|
70
|
+
if (n !== null) {
|
|
71
|
+
e.e = null;
|
|
72
|
+
for (var r of n)
|
|
73
|
+
Hn(r);
|
|
74
|
+
}
|
|
75
|
+
return P = e.p, /** @type {T} */
|
|
76
|
+
{};
|
|
77
|
+
}
|
|
78
|
+
function gt() {
|
|
79
|
+
return !Ot || P !== null && P.l === null;
|
|
80
|
+
}
|
|
81
|
+
let et = [];
|
|
82
|
+
function An() {
|
|
83
|
+
var t = et;
|
|
84
|
+
et = [], on(t);
|
|
85
|
+
}
|
|
86
|
+
function Fn(t) {
|
|
87
|
+
if (et.length === 0) {
|
|
88
|
+
var e = et;
|
|
89
|
+
queueMicrotask(() => {
|
|
90
|
+
e === et && An();
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
et.push(t);
|
|
94
|
+
}
|
|
95
|
+
const In = /* @__PURE__ */ new WeakMap();
|
|
96
|
+
function On(t) {
|
|
97
|
+
var e = h;
|
|
98
|
+
if (e === null)
|
|
99
|
+
return p.f |= Z, t;
|
|
100
|
+
if ((e.f & me) === 0) {
|
|
101
|
+
if ((e.f & ge) === 0)
|
|
102
|
+
throw !e.parent && t instanceof Error && ye(t), t;
|
|
103
|
+
e.b.error(t);
|
|
104
|
+
} else
|
|
105
|
+
xt(t, e);
|
|
106
|
+
}
|
|
107
|
+
function xt(t, e) {
|
|
108
|
+
for (; e !== null; ) {
|
|
109
|
+
if ((e.f & ge) !== 0)
|
|
110
|
+
try {
|
|
111
|
+
e.b.error(t);
|
|
112
|
+
return;
|
|
113
|
+
} catch (n) {
|
|
114
|
+
t = n;
|
|
115
|
+
}
|
|
116
|
+
e = e.parent;
|
|
117
|
+
}
|
|
118
|
+
throw t instanceof Error && ye(t), t;
|
|
119
|
+
}
|
|
120
|
+
function ye(t) {
|
|
121
|
+
const e = In.get(t);
|
|
122
|
+
e && (ee(t, "message", {
|
|
123
|
+
value: e.message
|
|
124
|
+
}), ee(t, "stack", {
|
|
125
|
+
value: e.stack
|
|
126
|
+
}));
|
|
127
|
+
}
|
|
128
|
+
const Nt = /* @__PURE__ */ new Set();
|
|
129
|
+
let w = null, re = /* @__PURE__ */ new Set(), dt = [], qt = null, Mt = !1;
|
|
130
|
+
class vt {
|
|
131
|
+
/**
|
|
132
|
+
* The current values of any sources that are updated in this batch
|
|
133
|
+
* They keys of this map are identical to `this.#previous`
|
|
134
|
+
* @type {Map<Source, any>}
|
|
135
|
+
*/
|
|
136
|
+
current = /* @__PURE__ */ new Map();
|
|
137
|
+
/**
|
|
138
|
+
* The values of any sources that are updated in this batch _before_ those updates took place.
|
|
139
|
+
* They keys of this map are identical to `this.#current`
|
|
140
|
+
* @type {Map<Source, any>}
|
|
141
|
+
*/
|
|
142
|
+
#o = /* @__PURE__ */ new Map();
|
|
143
|
+
/**
|
|
144
|
+
* When the batch is committed (and the DOM is updated), we need to remove old branches
|
|
145
|
+
* and append new ones by calling the functions added inside (if/each/key/etc) blocks
|
|
146
|
+
* @type {Set<() => void>}
|
|
147
|
+
*/
|
|
148
|
+
#i = /* @__PURE__ */ new Set();
|
|
149
|
+
/**
|
|
150
|
+
* The number of async effects that are currently in flight
|
|
151
|
+
*/
|
|
152
|
+
#t = 0;
|
|
153
|
+
/**
|
|
154
|
+
* A deferred that resolves when the batch is committed, used with `settled()`
|
|
155
|
+
* TODO replace with Promise.withResolvers once supported widely enough
|
|
156
|
+
* @type {{ promise: Promise<void>, resolve: (value?: any) => void, reject: (reason: unknown) => void } | null}
|
|
157
|
+
*/
|
|
158
|
+
#f = null;
|
|
159
|
+
/**
|
|
160
|
+
* True if an async effect inside this batch resolved and
|
|
161
|
+
* its parent branch was already deleted
|
|
162
|
+
*/
|
|
163
|
+
#u = !1;
|
|
164
|
+
/**
|
|
165
|
+
* Async effects (created inside `async_derived`) encountered during processing.
|
|
166
|
+
* These run after the rest of the batch has updated, since they should
|
|
167
|
+
* always have the latest values
|
|
168
|
+
* @type {Effect[]}
|
|
169
|
+
*/
|
|
170
|
+
#n = [];
|
|
171
|
+
/**
|
|
172
|
+
* The same as `#async_effects`, but for effects inside a newly-created
|
|
173
|
+
* `<svelte:boundary>` — these do not prevent the batch from committing
|
|
174
|
+
* @type {Effect[]}
|
|
175
|
+
*/
|
|
176
|
+
#a = [];
|
|
177
|
+
/**
|
|
178
|
+
* Template effects and `$effect.pre` effects, which run when
|
|
179
|
+
* a batch is committed
|
|
180
|
+
* @type {Effect[]}
|
|
181
|
+
*/
|
|
182
|
+
#r = [];
|
|
183
|
+
/**
|
|
184
|
+
* The same as `#render_effects`, but for `$effect` (which runs after)
|
|
185
|
+
* @type {Effect[]}
|
|
186
|
+
*/
|
|
187
|
+
#e = [];
|
|
188
|
+
/**
|
|
189
|
+
* Block effects, which may need to re-run on subsequent flushes
|
|
190
|
+
* in order to update internal sources (e.g. each block items)
|
|
191
|
+
* @type {Effect[]}
|
|
192
|
+
*/
|
|
193
|
+
#s = [];
|
|
194
|
+
/**
|
|
195
|
+
* Deferred effects (which run after async work has completed) that are DIRTY
|
|
196
|
+
* @type {Effect[]}
|
|
197
|
+
*/
|
|
198
|
+
#c = [];
|
|
199
|
+
/**
|
|
200
|
+
* Deferred effects that are MAYBE_DIRTY
|
|
201
|
+
* @type {Effect[]}
|
|
202
|
+
*/
|
|
203
|
+
#_ = [];
|
|
204
|
+
/**
|
|
205
|
+
* A set of branches that still exist, but will be destroyed when this batch
|
|
206
|
+
* is committed — we skip over these during `process`
|
|
207
|
+
* @type {Set<Effect>}
|
|
208
|
+
*/
|
|
209
|
+
skipped_effects = /* @__PURE__ */ new Set();
|
|
210
|
+
/**
|
|
211
|
+
*
|
|
212
|
+
* @param {Effect[]} root_effects
|
|
213
|
+
*/
|
|
214
|
+
process(e) {
|
|
215
|
+
dt = [];
|
|
216
|
+
for (const i of e)
|
|
217
|
+
this.#v(i);
|
|
218
|
+
if (this.#n.length === 0 && this.#t === 0) {
|
|
219
|
+
this.#d();
|
|
220
|
+
var n = this.#r, r = this.#e;
|
|
221
|
+
this.#r = [], this.#e = [], this.#s = [], w = null, ie(n), ie(r), w === null ? w = this : Nt.delete(this), this.#f?.resolve();
|
|
222
|
+
} else
|
|
223
|
+
this.#l(this.#r), this.#l(this.#e), this.#l(this.#s);
|
|
224
|
+
for (const i of this.#n)
|
|
225
|
+
at(i);
|
|
226
|
+
for (const i of this.#a)
|
|
227
|
+
at(i);
|
|
228
|
+
this.#n = [], this.#a = [];
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* Traverse the effect tree, executing effects or stashing
|
|
232
|
+
* them for later execution as appropriate
|
|
233
|
+
* @param {Effect} root
|
|
234
|
+
*/
|
|
235
|
+
#v(e) {
|
|
236
|
+
e.f ^= x;
|
|
237
|
+
for (var n = e.first; n !== null; ) {
|
|
238
|
+
var r = n.f, i = (r & (Y | ft)) !== 0, a = i && (r & x) !== 0, s = a || (r & q) !== 0 || this.skipped_effects.has(n);
|
|
239
|
+
if (!s && n.fn !== null) {
|
|
240
|
+
if (i)
|
|
241
|
+
n.f ^= x;
|
|
242
|
+
else if ((r & he) !== 0)
|
|
243
|
+
this.#e.push(n);
|
|
244
|
+
else if ((r & x) === 0)
|
|
245
|
+
if ((r & Vt) !== 0) {
|
|
246
|
+
var o = n.b?.is_pending() ? this.#a : this.#n;
|
|
247
|
+
o.push(n);
|
|
248
|
+
} else Dt(n) && ((n.f & ot) !== 0 && this.#s.push(n), at(n));
|
|
249
|
+
var l = n.first;
|
|
250
|
+
if (l !== null) {
|
|
251
|
+
n = l;
|
|
252
|
+
continue;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
var f = n.parent;
|
|
256
|
+
for (n = n.next; n === null && f !== null; )
|
|
257
|
+
n = f.next, f = f.parent;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
/**
|
|
261
|
+
* @param {Effect[]} effects
|
|
262
|
+
*/
|
|
263
|
+
#l(e) {
|
|
264
|
+
for (const n of e)
|
|
265
|
+
((n.f & D) !== 0 ? this.#c : this.#_).push(n), A(n, x);
|
|
266
|
+
e.length = 0;
|
|
267
|
+
}
|
|
268
|
+
/**
|
|
269
|
+
* Associate a change to a given source with the current
|
|
270
|
+
* batch, noting its previous and current values
|
|
271
|
+
* @param {Source} source
|
|
272
|
+
* @param {any} value
|
|
273
|
+
*/
|
|
274
|
+
capture(e, n) {
|
|
275
|
+
this.#o.has(e) || this.#o.set(e, n), this.current.set(e, e.v);
|
|
276
|
+
}
|
|
277
|
+
activate() {
|
|
278
|
+
w = this;
|
|
279
|
+
}
|
|
280
|
+
deactivate() {
|
|
281
|
+
w = null;
|
|
282
|
+
for (const e of re)
|
|
283
|
+
if (re.delete(e), e(), w !== null)
|
|
284
|
+
break;
|
|
285
|
+
}
|
|
286
|
+
neuter() {
|
|
287
|
+
this.#u = !0;
|
|
288
|
+
}
|
|
289
|
+
flush() {
|
|
290
|
+
dt.length > 0 ? Ln() : this.#d(), w === this && (this.#t === 0 && Nt.delete(this), this.deactivate());
|
|
291
|
+
}
|
|
292
|
+
/**
|
|
293
|
+
* Append and remove branches to/from the DOM
|
|
294
|
+
*/
|
|
295
|
+
#d() {
|
|
296
|
+
if (!this.#u)
|
|
297
|
+
for (const e of this.#i)
|
|
298
|
+
e();
|
|
299
|
+
this.#i.clear();
|
|
300
|
+
}
|
|
301
|
+
increment() {
|
|
302
|
+
this.#t += 1;
|
|
303
|
+
}
|
|
304
|
+
decrement() {
|
|
305
|
+
if (this.#t -= 1, this.#t === 0) {
|
|
306
|
+
for (const e of this.#c)
|
|
307
|
+
A(e, D), st(e);
|
|
308
|
+
for (const e of this.#_)
|
|
309
|
+
A(e, G), st(e);
|
|
310
|
+
this.#r = [], this.#e = [], this.flush();
|
|
311
|
+
} else
|
|
312
|
+
this.deactivate();
|
|
313
|
+
}
|
|
314
|
+
/** @param {() => void} fn */
|
|
315
|
+
add_callback(e) {
|
|
316
|
+
this.#i.add(e);
|
|
317
|
+
}
|
|
318
|
+
settled() {
|
|
319
|
+
return (this.#f ??= fn()).promise;
|
|
320
|
+
}
|
|
321
|
+
static ensure() {
|
|
322
|
+
if (w === null) {
|
|
323
|
+
const e = w = new vt();
|
|
324
|
+
Nt.add(w), vt.enqueue(() => {
|
|
325
|
+
w === e && e.flush();
|
|
326
|
+
});
|
|
327
|
+
}
|
|
328
|
+
return w;
|
|
329
|
+
}
|
|
330
|
+
/** @param {() => void} task */
|
|
331
|
+
static enqueue(e) {
|
|
332
|
+
Fn(e);
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
function Ln() {
|
|
336
|
+
var t = it;
|
|
337
|
+
Mt = !0;
|
|
338
|
+
try {
|
|
339
|
+
var e = 0;
|
|
340
|
+
for (ae(!0); dt.length > 0; ) {
|
|
341
|
+
var n = vt.ensure();
|
|
342
|
+
if (e++ > 1e3) {
|
|
343
|
+
var r, i;
|
|
344
|
+
Dn();
|
|
345
|
+
}
|
|
346
|
+
n.process(dt), W.clear();
|
|
347
|
+
}
|
|
348
|
+
} finally {
|
|
349
|
+
Mt = !1, ae(t), qt = null;
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
function Dn() {
|
|
353
|
+
try {
|
|
354
|
+
hn();
|
|
355
|
+
} catch (t) {
|
|
356
|
+
xt(t, qt);
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
let K = null;
|
|
360
|
+
function ie(t) {
|
|
361
|
+
var e = t.length;
|
|
362
|
+
if (e !== 0) {
|
|
363
|
+
for (var n = 0; n < e; ) {
|
|
364
|
+
var r = t[n++];
|
|
365
|
+
if ((r.f & (Q | q)) === 0 && Dt(r) && (K = [], at(r), r.deps === null && r.first === null && r.nodes_start === null && (r.teardown === null && r.ac === null ? Re(r) : r.fn = null), K?.length > 0)) {
|
|
366
|
+
W.clear();
|
|
367
|
+
for (const i of K)
|
|
368
|
+
at(i);
|
|
369
|
+
K = [];
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
K = null;
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
function st(t) {
|
|
376
|
+
for (var e = qt = t; e.parent !== null; ) {
|
|
377
|
+
e = e.parent;
|
|
378
|
+
var n = e.f;
|
|
379
|
+
if (Mt && e === h && (n & ot) !== 0)
|
|
380
|
+
return;
|
|
381
|
+
if ((n & (ft | Y)) !== 0) {
|
|
382
|
+
if ((n & x) === 0) return;
|
|
383
|
+
e.f ^= x;
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
dt.push(e);
|
|
387
|
+
}
|
|
388
|
+
function Nn(t, e, n) {
|
|
389
|
+
const r = gt() ? Lt : we;
|
|
390
|
+
if (e.length === 0) {
|
|
391
|
+
n(t.map(r));
|
|
392
|
+
return;
|
|
393
|
+
}
|
|
394
|
+
var i = w, a = (
|
|
395
|
+
/** @type {Effect} */
|
|
396
|
+
h
|
|
397
|
+
), s = Rn();
|
|
398
|
+
Promise.all(e.map((o) => /* @__PURE__ */ Pn(o))).then((o) => {
|
|
399
|
+
i?.activate(), s();
|
|
400
|
+
try {
|
|
401
|
+
n([...t.map(r), ...o]);
|
|
402
|
+
} catch (l) {
|
|
403
|
+
(a.f & Q) === 0 && xt(l, a);
|
|
404
|
+
}
|
|
405
|
+
i?.deactivate(), Se();
|
|
406
|
+
}).catch((o) => {
|
|
407
|
+
xt(o, a);
|
|
408
|
+
});
|
|
409
|
+
}
|
|
410
|
+
function Rn() {
|
|
411
|
+
var t = h, e = p, n = P, r = w;
|
|
412
|
+
return function() {
|
|
413
|
+
lt(t), X(e), Et(n), r?.activate();
|
|
414
|
+
};
|
|
415
|
+
}
|
|
416
|
+
function Se() {
|
|
417
|
+
lt(null), X(null), Et(null);
|
|
418
|
+
}
|
|
419
|
+
// @__NO_SIDE_EFFECTS__
|
|
420
|
+
function Lt(t) {
|
|
421
|
+
var e = F | D, n = p !== null && (p.f & F) !== 0 ? (
|
|
422
|
+
/** @type {Derived} */
|
|
423
|
+
p
|
|
424
|
+
) : null;
|
|
425
|
+
return h === null || n !== null && (n.f & R) !== 0 ? e |= R : h.f |= It, {
|
|
426
|
+
ctx: P,
|
|
427
|
+
deps: null,
|
|
428
|
+
effects: null,
|
|
429
|
+
equals: be,
|
|
430
|
+
f: e,
|
|
431
|
+
fn: t,
|
|
432
|
+
reactions: null,
|
|
433
|
+
rv: 0,
|
|
434
|
+
v: (
|
|
435
|
+
/** @type {V} */
|
|
436
|
+
y
|
|
437
|
+
),
|
|
438
|
+
wv: 0,
|
|
439
|
+
parent: n ?? h,
|
|
440
|
+
ac: null
|
|
441
|
+
};
|
|
442
|
+
}
|
|
443
|
+
// @__NO_SIDE_EFFECTS__
|
|
444
|
+
function Pn(t, e) {
|
|
445
|
+
let n = (
|
|
446
|
+
/** @type {Effect | null} */
|
|
447
|
+
h
|
|
448
|
+
);
|
|
449
|
+
n === null && pn();
|
|
450
|
+
var r = (
|
|
451
|
+
/** @type {Boundary} */
|
|
452
|
+
n.b
|
|
453
|
+
), i = (
|
|
454
|
+
/** @type {Promise<V>} */
|
|
455
|
+
/** @type {unknown} */
|
|
456
|
+
void 0
|
|
457
|
+
), a = ke(
|
|
458
|
+
/** @type {V} */
|
|
459
|
+
y
|
|
460
|
+
), s = null, o = !p;
|
|
461
|
+
return Un(() => {
|
|
462
|
+
try {
|
|
463
|
+
var l = t();
|
|
464
|
+
s && Promise.resolve(l).catch(() => {
|
|
465
|
+
});
|
|
466
|
+
} catch (d) {
|
|
467
|
+
l = Promise.reject(d);
|
|
468
|
+
}
|
|
469
|
+
var f = () => l;
|
|
470
|
+
i = s?.then(f, f) ?? Promise.resolve(l), s = i;
|
|
471
|
+
var u = (
|
|
472
|
+
/** @type {Batch} */
|
|
473
|
+
w
|
|
474
|
+
), c = r.is_pending();
|
|
475
|
+
o && (r.update_pending_count(1), c || u.increment());
|
|
476
|
+
const v = (d, _ = void 0) => {
|
|
477
|
+
s = null, c || u.activate(), _ ? _ !== Wt && (a.f |= Z, Bt(a, _)) : ((a.f & Z) !== 0 && (a.f ^= Z), Bt(a, d)), o && (r.update_pending_count(-1), c || u.decrement()), Se();
|
|
478
|
+
};
|
|
479
|
+
if (i.then(v, (d) => v(null, d || "unknown")), u)
|
|
480
|
+
return () => {
|
|
481
|
+
queueMicrotask(() => u.neuter());
|
|
482
|
+
};
|
|
483
|
+
}), new Promise((l) => {
|
|
484
|
+
function f(u) {
|
|
485
|
+
function c() {
|
|
486
|
+
u === i ? l(a) : f(i);
|
|
487
|
+
}
|
|
488
|
+
u.then(c, c);
|
|
489
|
+
}
|
|
490
|
+
f(i);
|
|
491
|
+
});
|
|
492
|
+
}
|
|
493
|
+
// @__NO_SIDE_EFFECTS__
|
|
494
|
+
function tt(t) {
|
|
495
|
+
const e = /* @__PURE__ */ Lt(t);
|
|
496
|
+
return Me(e), e;
|
|
497
|
+
}
|
|
498
|
+
// @__NO_SIDE_EFFECTS__
|
|
499
|
+
function we(t) {
|
|
500
|
+
const e = /* @__PURE__ */ Lt(t);
|
|
501
|
+
return e.equals = wn, e;
|
|
502
|
+
}
|
|
503
|
+
function Ee(t) {
|
|
504
|
+
var e = t.effects;
|
|
505
|
+
if (e !== null) {
|
|
506
|
+
t.effects = null;
|
|
507
|
+
for (var n = 0; n < e.length; n += 1)
|
|
508
|
+
ut(
|
|
509
|
+
/** @type {Effect} */
|
|
510
|
+
e[n]
|
|
511
|
+
);
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
function Cn(t) {
|
|
515
|
+
for (var e = t.parent; e !== null; ) {
|
|
516
|
+
if ((e.f & F) === 0)
|
|
517
|
+
return (
|
|
518
|
+
/** @type {Effect} */
|
|
519
|
+
e
|
|
520
|
+
);
|
|
521
|
+
e = e.parent;
|
|
522
|
+
}
|
|
523
|
+
return null;
|
|
524
|
+
}
|
|
525
|
+
function Xt(t) {
|
|
526
|
+
var e, n = h;
|
|
527
|
+
lt(Cn(t));
|
|
528
|
+
try {
|
|
529
|
+
Ee(t), e = $e(t);
|
|
530
|
+
} finally {
|
|
531
|
+
lt(n);
|
|
532
|
+
}
|
|
533
|
+
return e;
|
|
534
|
+
}
|
|
535
|
+
function xe(t) {
|
|
536
|
+
var e = Xt(t);
|
|
537
|
+
if (t.equals(e) || (t.v = e, t.wv = je()), !ct) {
|
|
538
|
+
var n = (V || (t.f & R) !== 0) && t.deps !== null ? G : x;
|
|
539
|
+
A(t, n);
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
const W = /* @__PURE__ */ new Map();
|
|
543
|
+
function ke(t, e) {
|
|
41
544
|
var n = {
|
|
42
545
|
f: 0,
|
|
43
546
|
// TODO ideally we could skip this altogether, but it causes type errors
|
|
44
547
|
v: t,
|
|
45
548
|
reactions: null,
|
|
46
|
-
equals:
|
|
47
|
-
|
|
549
|
+
equals: be,
|
|
550
|
+
rv: 0,
|
|
551
|
+
wv: 0
|
|
48
552
|
};
|
|
49
553
|
return n;
|
|
50
554
|
}
|
|
51
555
|
// @__NO_SIDE_EFFECTS__
|
|
52
|
-
function
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
function
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
556
|
+
function H(t, e) {
|
|
557
|
+
const n = ke(t);
|
|
558
|
+
return Me(n), n;
|
|
559
|
+
}
|
|
560
|
+
function U(t, e, n = !1) {
|
|
561
|
+
p !== null && // since we are untracking the function inside `$inspect.with` we need to add this check
|
|
562
|
+
// to ensure we error if state is set inside an inspect effect
|
|
563
|
+
(!z || (p.f & ne) !== 0) && gt() && (p.f & (F | ot | Vt | ne)) !== 0 && !$?.includes(t) && yn();
|
|
564
|
+
let r = n ? nt(e) : e;
|
|
565
|
+
return Bt(t, r);
|
|
566
|
+
}
|
|
567
|
+
function Bt(t, e) {
|
|
568
|
+
if (!t.equals(e)) {
|
|
569
|
+
var n = t.v;
|
|
570
|
+
ct ? W.set(t, e) : W.set(t, n), t.v = e;
|
|
571
|
+
var r = vt.ensure();
|
|
572
|
+
r.capture(t, n), (t.f & F) !== 0 && ((t.f & D) !== 0 && Xt(
|
|
573
|
+
/** @type {Derived} */
|
|
574
|
+
t
|
|
575
|
+
), A(t, (t.f & R) === 0 ? x : G)), t.wv = je(), Te(t, D), gt() && h !== null && (h.f & x) !== 0 && (h.f & (Y | ft)) === 0 && (O === null ? Gn([t]) : O.push(t));
|
|
576
|
+
}
|
|
577
|
+
return e;
|
|
61
578
|
}
|
|
62
|
-
function
|
|
63
|
-
|
|
579
|
+
function Rt(t) {
|
|
580
|
+
U(t, t.v + 1);
|
|
64
581
|
}
|
|
65
|
-
function
|
|
582
|
+
function Te(t, e) {
|
|
66
583
|
var n = t.reactions;
|
|
67
584
|
if (n !== null)
|
|
68
|
-
for (var r =
|
|
69
|
-
var
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
585
|
+
for (var r = gt(), i = n.length, a = 0; a < i; a++) {
|
|
586
|
+
var s = n[a], o = s.f;
|
|
587
|
+
if (!(!r && s === h)) {
|
|
588
|
+
var l = (o & D) === 0;
|
|
589
|
+
l && A(s, e), (o & F) !== 0 ? Te(
|
|
590
|
+
/** @type {Derived} */
|
|
591
|
+
s,
|
|
592
|
+
G
|
|
593
|
+
) : l && ((o & ot) !== 0 && K !== null && K.push(
|
|
594
|
+
/** @type {Effect} */
|
|
595
|
+
s
|
|
596
|
+
), st(
|
|
597
|
+
/** @type {Effect} */
|
|
598
|
+
s
|
|
599
|
+
));
|
|
600
|
+
}
|
|
78
601
|
}
|
|
79
602
|
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
if (typeof t != "object" || t === null || ot in t)
|
|
603
|
+
function nt(t) {
|
|
604
|
+
if (typeof t != "object" || t === null || rt in t)
|
|
83
605
|
return t;
|
|
84
|
-
const
|
|
85
|
-
if (
|
|
606
|
+
const e = Ht(t);
|
|
607
|
+
if (e !== sn && e !== ln)
|
|
86
608
|
return t;
|
|
87
|
-
var
|
|
88
|
-
|
|
609
|
+
var n = /* @__PURE__ */ new Map(), r = rn(t), i = /* @__PURE__ */ H(0), a = J, s = (o) => {
|
|
610
|
+
if (J === a)
|
|
611
|
+
return o();
|
|
612
|
+
var l = p, f = J;
|
|
613
|
+
X(null), le(a);
|
|
614
|
+
var u = o();
|
|
615
|
+
return X(l), le(f), u;
|
|
616
|
+
};
|
|
617
|
+
return r && n.set("length", /* @__PURE__ */ H(
|
|
89
618
|
/** @type {any[]} */
|
|
90
619
|
t.length
|
|
91
|
-
))
|
|
92
|
-
var _;
|
|
93
|
-
return new Proxy(
|
|
620
|
+
)), new Proxy(
|
|
94
621
|
/** @type {any} */
|
|
95
622
|
t,
|
|
96
623
|
{
|
|
97
|
-
defineProperty(
|
|
98
|
-
(!("value" in
|
|
99
|
-
var
|
|
100
|
-
return
|
|
624
|
+
defineProperty(o, l, f) {
|
|
625
|
+
(!("value" in f) || f.configurable === !1 || f.enumerable === !1 || f.writable === !1) && mn();
|
|
626
|
+
var u = n.get(l);
|
|
627
|
+
return u === void 0 ? u = s(() => {
|
|
628
|
+
var c = /* @__PURE__ */ H(f.value);
|
|
629
|
+
return n.set(l, c), c;
|
|
630
|
+
}) : U(u, f.value, !0), !0;
|
|
101
631
|
},
|
|
102
|
-
deleteProperty(
|
|
103
|
-
var
|
|
104
|
-
if (
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
var o = (
|
|
109
|
-
/** @type {Source<number>} */
|
|
110
|
-
i.get("length")
|
|
111
|
-
), c = Number(s);
|
|
112
|
-
Number.isInteger(c) && c < o.v && B(o, c);
|
|
632
|
+
deleteProperty(o, l) {
|
|
633
|
+
var f = n.get(l);
|
|
634
|
+
if (f === void 0) {
|
|
635
|
+
if (l in o) {
|
|
636
|
+
const u = s(() => /* @__PURE__ */ H(y));
|
|
637
|
+
n.set(l, u), Rt(i);
|
|
113
638
|
}
|
|
114
|
-
|
|
115
|
-
|
|
639
|
+
} else
|
|
640
|
+
U(f, y), Rt(i);
|
|
116
641
|
return !0;
|
|
117
642
|
},
|
|
118
|
-
get(
|
|
119
|
-
|
|
120
|
-
if (s === ot)
|
|
643
|
+
get(o, l, f) {
|
|
644
|
+
if (l === rt)
|
|
121
645
|
return t;
|
|
122
|
-
var
|
|
123
|
-
if (
|
|
124
|
-
var
|
|
125
|
-
return
|
|
646
|
+
var u = n.get(l), c = l in o;
|
|
647
|
+
if (u === void 0 && (!c || St(o, l)?.writable) && (u = s(() => {
|
|
648
|
+
var d = nt(c ? o[l] : y), _ = /* @__PURE__ */ H(d);
|
|
649
|
+
return _;
|
|
650
|
+
}), n.set(l, u)), u !== void 0) {
|
|
651
|
+
var v = S(u);
|
|
652
|
+
return v === y ? void 0 : v;
|
|
126
653
|
}
|
|
127
|
-
return Reflect.get(
|
|
654
|
+
return Reflect.get(o, l, f);
|
|
128
655
|
},
|
|
129
|
-
getOwnPropertyDescriptor(
|
|
130
|
-
var
|
|
131
|
-
if (
|
|
132
|
-
var
|
|
133
|
-
|
|
134
|
-
} else if (
|
|
135
|
-
var c =
|
|
136
|
-
if (c !== void 0 &&
|
|
656
|
+
getOwnPropertyDescriptor(o, l) {
|
|
657
|
+
var f = Reflect.getOwnPropertyDescriptor(o, l);
|
|
658
|
+
if (f && "value" in f) {
|
|
659
|
+
var u = n.get(l);
|
|
660
|
+
u && (f.value = S(u));
|
|
661
|
+
} else if (f === void 0) {
|
|
662
|
+
var c = n.get(l), v = c?.v;
|
|
663
|
+
if (c !== void 0 && v !== y)
|
|
137
664
|
return {
|
|
138
665
|
enumerable: !0,
|
|
139
666
|
configurable: !0,
|
|
140
|
-
value:
|
|
667
|
+
value: v,
|
|
141
668
|
writable: !0
|
|
142
669
|
};
|
|
143
670
|
}
|
|
144
|
-
return
|
|
671
|
+
return f;
|
|
145
672
|
},
|
|
146
|
-
has(
|
|
147
|
-
|
|
148
|
-
if (s === ot)
|
|
673
|
+
has(o, l) {
|
|
674
|
+
if (l === rt)
|
|
149
675
|
return !0;
|
|
150
|
-
var
|
|
151
|
-
if (
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
676
|
+
var f = n.get(l), u = f !== void 0 && f.v !== y || Reflect.has(o, l);
|
|
677
|
+
if (f !== void 0 || h !== null && (!u || St(o, l)?.writable)) {
|
|
678
|
+
f === void 0 && (f = s(() => {
|
|
679
|
+
var v = u ? nt(o[l]) : y, d = /* @__PURE__ */ H(v);
|
|
680
|
+
return d;
|
|
681
|
+
}), n.set(l, f));
|
|
682
|
+
var c = S(f);
|
|
683
|
+
if (c === y)
|
|
155
684
|
return !1;
|
|
156
685
|
}
|
|
157
|
-
return
|
|
686
|
+
return u;
|
|
158
687
|
},
|
|
159
|
-
set(
|
|
160
|
-
var
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
m !== void 0 ? B(m, E) : w in f && (m = A(E), i.set(w + "", m));
|
|
688
|
+
set(o, l, f, u) {
|
|
689
|
+
var c = n.get(l), v = l in o;
|
|
690
|
+
if (r && l === "length")
|
|
691
|
+
for (var d = f; d < /** @type {Source<number>} */
|
|
692
|
+
c.v; d += 1) {
|
|
693
|
+
var _ = n.get(d + "");
|
|
694
|
+
_ !== void 0 ? U(_, y) : d in o && (_ = s(() => /* @__PURE__ */ H(y)), n.set(d + "", _));
|
|
167
695
|
}
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
696
|
+
if (c === void 0)
|
|
697
|
+
(!v || St(o, l)?.writable) && (c = s(() => /* @__PURE__ */ H(void 0)), U(c, nt(f)), n.set(l, c));
|
|
698
|
+
else {
|
|
699
|
+
v = c.v !== y;
|
|
700
|
+
var b = s(() => nt(f));
|
|
701
|
+
U(c, b);
|
|
702
|
+
}
|
|
703
|
+
var I = Reflect.getOwnPropertyDescriptor(o, l);
|
|
704
|
+
if (I?.set && I.set.call(u, f), !v) {
|
|
705
|
+
if (r && typeof l == "string") {
|
|
706
|
+
var k = (
|
|
173
707
|
/** @type {Source<number>} */
|
|
174
|
-
|
|
175
|
-
),
|
|
176
|
-
Number.isInteger(
|
|
708
|
+
n.get("length")
|
|
709
|
+
), N = Number(l);
|
|
710
|
+
Number.isInteger(N) && N >= k.v && U(k, N + 1);
|
|
177
711
|
}
|
|
178
|
-
|
|
712
|
+
Rt(i);
|
|
179
713
|
}
|
|
180
714
|
return !0;
|
|
181
715
|
},
|
|
182
|
-
ownKeys(
|
|
183
|
-
|
|
184
|
-
var
|
|
185
|
-
var
|
|
186
|
-
return
|
|
716
|
+
ownKeys(o) {
|
|
717
|
+
S(i);
|
|
718
|
+
var l = Reflect.ownKeys(o).filter((c) => {
|
|
719
|
+
var v = n.get(c);
|
|
720
|
+
return v === void 0 || v.v !== y;
|
|
187
721
|
});
|
|
188
|
-
for (var [
|
|
189
|
-
|
|
190
|
-
return
|
|
722
|
+
for (var [f, u] of n)
|
|
723
|
+
u.v !== y && !(f in o) && l.push(f);
|
|
724
|
+
return l;
|
|
191
725
|
},
|
|
192
726
|
setPrototypeOf() {
|
|
193
|
-
|
|
727
|
+
bn();
|
|
194
728
|
}
|
|
195
729
|
}
|
|
196
730
|
);
|
|
197
731
|
}
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
}
|
|
201
|
-
var an, sn;
|
|
202
|
-
function on(t = "") {
|
|
732
|
+
var Mn, Bn;
|
|
733
|
+
function Ae(t = "") {
|
|
203
734
|
return document.createTextNode(t);
|
|
204
735
|
}
|
|
205
736
|
// @__NO_SIDE_EFFECTS__
|
|
206
|
-
function
|
|
207
|
-
return
|
|
737
|
+
function Yt(t) {
|
|
738
|
+
return Mn.call(t);
|
|
208
739
|
}
|
|
209
740
|
// @__NO_SIDE_EFFECTS__
|
|
210
|
-
function
|
|
211
|
-
return
|
|
741
|
+
function Fe(t) {
|
|
742
|
+
return Bn.call(t);
|
|
212
743
|
}
|
|
213
|
-
function
|
|
214
|
-
return /* @__PURE__ */
|
|
744
|
+
function Ie(t, e) {
|
|
745
|
+
return /* @__PURE__ */ Yt(t);
|
|
215
746
|
}
|
|
216
|
-
function
|
|
747
|
+
function jn(t, e = !1) {
|
|
217
748
|
{
|
|
218
749
|
var n = (
|
|
219
750
|
/** @type {DocumentFragment} */
|
|
220
|
-
/* @__PURE__ */
|
|
751
|
+
/* @__PURE__ */ Yt(
|
|
221
752
|
/** @type {Node} */
|
|
222
753
|
t
|
|
223
754
|
)
|
|
224
755
|
);
|
|
225
|
-
return n instanceof Comment && n.data === "" ? /* @__PURE__ */
|
|
756
|
+
return n instanceof Comment && n.data === "" ? /* @__PURE__ */ Fe(n) : n;
|
|
226
757
|
}
|
|
227
758
|
}
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
var e = N | V;
|
|
231
|
-
v === null ? e |= K : v.f |= ie;
|
|
232
|
-
var n = h !== null && (h.f & N) !== 0 ? (
|
|
233
|
-
/** @type {Derived} */
|
|
234
|
-
h
|
|
235
|
-
) : null;
|
|
236
|
-
const r = {
|
|
237
|
-
children: null,
|
|
238
|
-
ctx: x,
|
|
239
|
-
deps: null,
|
|
240
|
-
equals: le,
|
|
241
|
-
f: e,
|
|
242
|
-
fn: t,
|
|
243
|
-
reactions: null,
|
|
244
|
-
v: (
|
|
245
|
-
/** @type {V} */
|
|
246
|
-
null
|
|
247
|
-
),
|
|
248
|
-
version: 0,
|
|
249
|
-
parent: n ?? v
|
|
250
|
-
};
|
|
251
|
-
return n !== null && (n.children ?? (n.children = [])).push(r), r;
|
|
252
|
-
}
|
|
253
|
-
// @__NO_SIDE_EFFECTS__
|
|
254
|
-
function fn(t) {
|
|
255
|
-
const e = /* @__PURE__ */ P(t);
|
|
256
|
-
return e.equals = At, e;
|
|
257
|
-
}
|
|
258
|
-
function ue(t) {
|
|
259
|
-
var e = t.children;
|
|
260
|
-
if (e !== null) {
|
|
261
|
-
t.children = null;
|
|
262
|
-
for (var n = 0; n < e.length; n += 1) {
|
|
263
|
-
var r = e[n];
|
|
264
|
-
(r.f & N) !== 0 ? Rt(
|
|
265
|
-
/** @type {Derived} */
|
|
266
|
-
r
|
|
267
|
-
) : J(
|
|
268
|
-
/** @type {Effect} */
|
|
269
|
-
r
|
|
270
|
-
);
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
function cn(t) {
|
|
275
|
-
for (var e = t.parent; e !== null; ) {
|
|
276
|
-
if ((e.f & N) === 0)
|
|
277
|
-
return (
|
|
278
|
-
/** @type {Effect} */
|
|
279
|
-
e
|
|
280
|
-
);
|
|
281
|
-
e = e.parent;
|
|
282
|
-
}
|
|
283
|
-
return null;
|
|
759
|
+
function zn() {
|
|
760
|
+
return !1;
|
|
284
761
|
}
|
|
285
|
-
function
|
|
286
|
-
var e, n =
|
|
287
|
-
|
|
762
|
+
function Oe(t) {
|
|
763
|
+
var e = p, n = h;
|
|
764
|
+
X(null), lt(null);
|
|
288
765
|
try {
|
|
289
|
-
|
|
766
|
+
return t();
|
|
290
767
|
} finally {
|
|
291
|
-
|
|
768
|
+
X(e), lt(n);
|
|
292
769
|
}
|
|
293
|
-
return e;
|
|
294
770
|
}
|
|
295
|
-
function
|
|
296
|
-
var e = fe(t), n = ($ || (t.f & K) !== 0) && t.deps !== null ? bt : F;
|
|
297
|
-
M(t, n), t.equals(e) || (t.v = e, t.version = me());
|
|
298
|
-
}
|
|
299
|
-
function Rt(t) {
|
|
300
|
-
ue(t), nt(t, 0), M(t, Z), t.v = t.children = t.deps = t.ctx = t.reactions = null;
|
|
301
|
-
}
|
|
302
|
-
function _n(t, e) {
|
|
771
|
+
function $n(t, e) {
|
|
303
772
|
var n = e.last;
|
|
304
773
|
n === null ? e.last = e.first = t : (n.next = t, t.prev = n, e.last = t);
|
|
305
774
|
}
|
|
306
|
-
function
|
|
307
|
-
var i =
|
|
308
|
-
|
|
775
|
+
function mt(t, e, n, r = !0) {
|
|
776
|
+
var i = h;
|
|
777
|
+
i !== null && (i.f & q) !== 0 && (t |= q);
|
|
778
|
+
var a = {
|
|
779
|
+
ctx: P,
|
|
309
780
|
deps: null,
|
|
310
|
-
deriveds: null,
|
|
311
781
|
nodes_start: null,
|
|
312
782
|
nodes_end: null,
|
|
313
|
-
f: t |
|
|
783
|
+
f: t | D,
|
|
314
784
|
first: null,
|
|
315
785
|
fn: e,
|
|
316
786
|
last: null,
|
|
317
787
|
next: null,
|
|
318
|
-
parent: i
|
|
788
|
+
parent: i,
|
|
789
|
+
b: i && i.b,
|
|
319
790
|
prev: null,
|
|
320
791
|
teardown: null,
|
|
321
792
|
transitions: null,
|
|
322
|
-
|
|
793
|
+
wv: 0,
|
|
794
|
+
ac: null
|
|
323
795
|
};
|
|
324
|
-
if (n)
|
|
325
|
-
var _ = X;
|
|
796
|
+
if (n)
|
|
326
797
|
try {
|
|
327
|
-
|
|
328
|
-
} catch (
|
|
329
|
-
throw
|
|
330
|
-
}
|
|
331
|
-
|
|
798
|
+
at(a), a.f |= me;
|
|
799
|
+
} catch (l) {
|
|
800
|
+
throw ut(a), l;
|
|
801
|
+
}
|
|
802
|
+
else e !== null && st(a);
|
|
803
|
+
if (r) {
|
|
804
|
+
var s = a;
|
|
805
|
+
if (n && s.deps === null && s.teardown === null && s.nodes_start === null && s.first === s.last && // either `null`, or a singular child
|
|
806
|
+
(s.f & It) === 0 && (s = s.first), s !== null && (s.parent = i, i !== null && $n(s, i), p !== null && (p.f & F) !== 0 && (t & ft) === 0)) {
|
|
807
|
+
var o = (
|
|
808
|
+
/** @type {Derived} */
|
|
809
|
+
p
|
|
810
|
+
);
|
|
811
|
+
(o.effects ??= []).push(s);
|
|
332
812
|
}
|
|
333
|
-
} else e !== null && xt(a);
|
|
334
|
-
var f = n && a.deps === null && a.first === null && a.nodes_start === null && a.teardown === null && (a.f & ie) === 0;
|
|
335
|
-
if (!f && !i && r && (l !== null && _n(a, l), h !== null && (h.f & N) !== 0)) {
|
|
336
|
-
var s = (
|
|
337
|
-
/** @type {Derived} */
|
|
338
|
-
h
|
|
339
|
-
);
|
|
340
|
-
(s.children ?? (s.children = [])).push(a);
|
|
341
813
|
}
|
|
342
814
|
return a;
|
|
343
815
|
}
|
|
344
|
-
function
|
|
345
|
-
return
|
|
816
|
+
function Hn(t) {
|
|
817
|
+
return mt(he | _n, t, !1);
|
|
346
818
|
}
|
|
347
|
-
function
|
|
348
|
-
return
|
|
819
|
+
function Un(t) {
|
|
820
|
+
return mt(Vt | It, t, !0);
|
|
349
821
|
}
|
|
350
|
-
function
|
|
351
|
-
|
|
822
|
+
function Gt(t, e = [], n = []) {
|
|
823
|
+
Nn(e, n, (r) => {
|
|
824
|
+
mt(un, () => t(...r.map(S)), !0);
|
|
825
|
+
});
|
|
826
|
+
}
|
|
827
|
+
function Le(t, e = 0) {
|
|
828
|
+
var n = mt(ot | e, t, !0);
|
|
829
|
+
return n;
|
|
352
830
|
}
|
|
353
|
-
function
|
|
354
|
-
return
|
|
831
|
+
function jt(t, e = !0) {
|
|
832
|
+
return mt(Y | It, t, !0, e);
|
|
355
833
|
}
|
|
356
|
-
function
|
|
834
|
+
function De(t) {
|
|
357
835
|
var e = t.teardown;
|
|
358
836
|
if (e !== null) {
|
|
359
|
-
const n =
|
|
360
|
-
|
|
837
|
+
const n = ct, r = p;
|
|
838
|
+
se(!0), X(null);
|
|
361
839
|
try {
|
|
362
840
|
e.call(null);
|
|
363
841
|
} finally {
|
|
364
|
-
|
|
842
|
+
se(n), X(r);
|
|
365
843
|
}
|
|
366
844
|
}
|
|
367
845
|
}
|
|
368
|
-
function
|
|
369
|
-
var e = t.deriveds;
|
|
370
|
-
if (e !== null) {
|
|
371
|
-
t.deriveds = null;
|
|
372
|
-
for (var n = 0; n < e.length; n += 1)
|
|
373
|
-
Rt(e[n]);
|
|
374
|
-
}
|
|
375
|
-
}
|
|
376
|
-
function ge(t, e = !1) {
|
|
846
|
+
function Ne(t, e = !1) {
|
|
377
847
|
var n = t.first;
|
|
378
848
|
for (t.first = t.last = null; n !== null; ) {
|
|
849
|
+
const i = n.ac;
|
|
850
|
+
i !== null && Oe(() => {
|
|
851
|
+
i.abort(Wt);
|
|
852
|
+
});
|
|
379
853
|
var r = n.next;
|
|
380
|
-
|
|
854
|
+
(n.f & ft) !== 0 ? n.parent = null : ut(n, e), n = r;
|
|
381
855
|
}
|
|
382
856
|
}
|
|
383
|
-
function
|
|
857
|
+
function Vn(t) {
|
|
384
858
|
for (var e = t.first; e !== null; ) {
|
|
385
859
|
var n = e.next;
|
|
386
|
-
(e.f &
|
|
860
|
+
(e.f & Y) === 0 && ut(e), e = n;
|
|
387
861
|
}
|
|
388
862
|
}
|
|
389
|
-
function
|
|
863
|
+
function ut(t, e = !0) {
|
|
390
864
|
var n = !1;
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
865
|
+
(e || (t.f & cn) !== 0) && t.nodes_start !== null && t.nodes_end !== null && (Wn(
|
|
866
|
+
t.nodes_start,
|
|
867
|
+
/** @type {TemplateNode} */
|
|
868
|
+
t.nodes_end
|
|
869
|
+
), n = !0), Ne(t, e && !n), kt(t, 0), A(t, Q);
|
|
870
|
+
var r = t.transitions;
|
|
871
|
+
if (r !== null)
|
|
872
|
+
for (const a of r)
|
|
873
|
+
a.stop();
|
|
874
|
+
De(t);
|
|
875
|
+
var i = t.parent;
|
|
876
|
+
i !== null && i.first !== null && Re(t), t.next = t.prev = t.teardown = t.ctx = t.deps = t.fn = t.nodes_start = t.nodes_end = t.ac = null;
|
|
877
|
+
}
|
|
878
|
+
function Wn(t, e) {
|
|
879
|
+
for (; t !== null; ) {
|
|
880
|
+
var n = t === e ? null : (
|
|
881
|
+
/** @type {TemplateNode} */
|
|
882
|
+
/* @__PURE__ */ Fe(t)
|
|
883
|
+
);
|
|
884
|
+
t.remove(), t = n;
|
|
885
|
+
}
|
|
886
|
+
}
|
|
887
|
+
function Re(t) {
|
|
411
888
|
var e = t.parent, n = t.prev, r = t.next;
|
|
412
889
|
n !== null && (n.next = r), r !== null && (r.prev = n), e !== null && (e.first === t && (e.first = r), e.last === t && (e.last = n));
|
|
413
890
|
}
|
|
414
|
-
function
|
|
891
|
+
function qn(t, e) {
|
|
415
892
|
var n = [];
|
|
416
|
-
|
|
417
|
-
|
|
893
|
+
Pe(t, n, !0), Xn(n, () => {
|
|
894
|
+
ut(t), e && e();
|
|
418
895
|
});
|
|
419
896
|
}
|
|
420
|
-
function
|
|
897
|
+
function Xn(t, e) {
|
|
421
898
|
var n = t.length;
|
|
422
899
|
if (n > 0) {
|
|
423
900
|
var r = () => --n || e();
|
|
@@ -426,619 +903,546 @@ function dn(t, e) {
|
|
|
426
903
|
} else
|
|
427
904
|
e();
|
|
428
905
|
}
|
|
429
|
-
function
|
|
430
|
-
if ((t.f &
|
|
431
|
-
if (t.f ^=
|
|
432
|
-
for (const
|
|
433
|
-
(
|
|
906
|
+
function Pe(t, e, n) {
|
|
907
|
+
if ((t.f & q) === 0) {
|
|
908
|
+
if (t.f ^= q, t.transitions !== null)
|
|
909
|
+
for (const s of t.transitions)
|
|
910
|
+
(s.is_global || n) && e.push(s);
|
|
434
911
|
for (var r = t.first; r !== null; ) {
|
|
435
|
-
var i = r.next,
|
|
436
|
-
|
|
912
|
+
var i = r.next, a = (r.f & Ft) !== 0 || (r.f & Y) !== 0;
|
|
913
|
+
Pe(r, e, a ? n : !1), r = i;
|
|
437
914
|
}
|
|
438
915
|
}
|
|
439
916
|
}
|
|
440
|
-
function
|
|
441
|
-
|
|
917
|
+
function Yn(t) {
|
|
918
|
+
Ce(t, !0);
|
|
442
919
|
}
|
|
443
|
-
function
|
|
444
|
-
if ((t.f &
|
|
445
|
-
|
|
920
|
+
function Ce(t, e) {
|
|
921
|
+
if ((t.f & q) !== 0) {
|
|
922
|
+
t.f ^= q, (t.f & x) === 0 && (A(t, D), st(t));
|
|
446
923
|
for (var n = t.first; n !== null; ) {
|
|
447
|
-
var r = n.next, i = (n.f &
|
|
448
|
-
|
|
924
|
+
var r = n.next, i = (n.f & Ft) !== 0 || (n.f & Y) !== 0;
|
|
925
|
+
Ce(n, i ? e : !1), n = r;
|
|
449
926
|
}
|
|
450
927
|
if (t.transitions !== null)
|
|
451
|
-
for (const
|
|
452
|
-
(
|
|
928
|
+
for (const a of t.transitions)
|
|
929
|
+
(a.is_global || e) && a.in();
|
|
453
930
|
}
|
|
454
931
|
}
|
|
455
|
-
let
|
|
456
|
-
function
|
|
457
|
-
|
|
932
|
+
let it = !1;
|
|
933
|
+
function ae(t) {
|
|
934
|
+
it = t;
|
|
935
|
+
}
|
|
936
|
+
let ct = !1;
|
|
937
|
+
function se(t) {
|
|
938
|
+
ct = t;
|
|
939
|
+
}
|
|
940
|
+
let p = null, z = !1;
|
|
941
|
+
function X(t) {
|
|
942
|
+
p = t;
|
|
458
943
|
}
|
|
459
|
-
let It = [], tt = 0;
|
|
460
944
|
let h = null;
|
|
461
|
-
function
|
|
945
|
+
function lt(t) {
|
|
462
946
|
h = t;
|
|
463
947
|
}
|
|
464
|
-
let
|
|
465
|
-
function
|
|
466
|
-
|
|
948
|
+
let $ = null;
|
|
949
|
+
function Me(t) {
|
|
950
|
+
p !== null && ($ === null ? $ = [t] : $.push(t));
|
|
467
951
|
}
|
|
468
|
-
let
|
|
469
|
-
function
|
|
470
|
-
|
|
952
|
+
let E = null, T = 0, O = null;
|
|
953
|
+
function Gn(t) {
|
|
954
|
+
O = t;
|
|
471
955
|
}
|
|
472
|
-
let
|
|
473
|
-
function
|
|
474
|
-
|
|
956
|
+
let Be = 1, pt = 0, J = pt;
|
|
957
|
+
function le(t) {
|
|
958
|
+
J = t;
|
|
475
959
|
}
|
|
476
|
-
|
|
477
|
-
|
|
960
|
+
let V = !1;
|
|
961
|
+
function je() {
|
|
962
|
+
return ++Be;
|
|
478
963
|
}
|
|
479
|
-
function
|
|
480
|
-
var a, _;
|
|
964
|
+
function Dt(t) {
|
|
481
965
|
var e = t.f;
|
|
482
|
-
if ((e &
|
|
966
|
+
if ((e & D) !== 0)
|
|
483
967
|
return !0;
|
|
484
|
-
if ((e &
|
|
485
|
-
var n = t.deps, r = (e &
|
|
968
|
+
if ((e & G) !== 0) {
|
|
969
|
+
var n = t.deps, r = (e & R) !== 0;
|
|
486
970
|
if (n !== null) {
|
|
487
|
-
var i;
|
|
488
|
-
if ((
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
971
|
+
var i, a, s = (e & wt) !== 0, o = r && h !== null && !V, l = n.length;
|
|
972
|
+
if ((s || o) && (h === null || (h.f & Q) === 0)) {
|
|
973
|
+
var f = (
|
|
974
|
+
/** @type {Derived} */
|
|
975
|
+
t
|
|
976
|
+
), u = f.parent;
|
|
977
|
+
for (i = 0; i < l; i++)
|
|
978
|
+
a = n[i], (s || !a?.reactions?.includes(f)) && (a.reactions ??= []).push(f);
|
|
979
|
+
s && (f.f ^= wt), o && u !== null && (u.f & R) === 0 && (f.f ^= R);
|
|
492
980
|
}
|
|
493
|
-
for (i = 0; i <
|
|
494
|
-
|
|
495
|
-
if (lt(
|
|
981
|
+
for (i = 0; i < l; i++)
|
|
982
|
+
if (a = n[i], Dt(
|
|
496
983
|
/** @type {Derived} */
|
|
497
|
-
|
|
498
|
-
) &&
|
|
984
|
+
a
|
|
985
|
+
) && xe(
|
|
499
986
|
/** @type {Derived} */
|
|
500
|
-
|
|
501
|
-
),
|
|
987
|
+
a
|
|
988
|
+
), a.wv > t.wv)
|
|
502
989
|
return !0;
|
|
503
|
-
}
|
|
504
990
|
}
|
|
505
|
-
(!r ||
|
|
991
|
+
(!r || h !== null && !V) && A(t, x);
|
|
506
992
|
}
|
|
507
993
|
return !1;
|
|
508
994
|
}
|
|
509
|
-
function
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
}
|
|
525
|
-
function yt(t, e, n, r) {
|
|
526
|
-
if (ut) {
|
|
527
|
-
if (n === null && (ut = !1), bn(e))
|
|
528
|
-
throw t;
|
|
529
|
-
return;
|
|
530
|
-
}
|
|
531
|
-
n !== null && (ut = !0);
|
|
532
|
-
{
|
|
533
|
-
pn(t, e);
|
|
534
|
-
return;
|
|
535
|
-
}
|
|
995
|
+
function ze(t, e, n = !0) {
|
|
996
|
+
var r = t.reactions;
|
|
997
|
+
if (r !== null && !$?.includes(t))
|
|
998
|
+
for (var i = 0; i < r.length; i++) {
|
|
999
|
+
var a = r[i];
|
|
1000
|
+
(a.f & F) !== 0 ? ze(
|
|
1001
|
+
/** @type {Derived} */
|
|
1002
|
+
a,
|
|
1003
|
+
e,
|
|
1004
|
+
!1
|
|
1005
|
+
) : e === a && (n ? A(a, D) : (a.f & x) !== 0 && A(a, G), st(
|
|
1006
|
+
/** @type {Effect} */
|
|
1007
|
+
a
|
|
1008
|
+
));
|
|
1009
|
+
}
|
|
536
1010
|
}
|
|
537
|
-
function
|
|
538
|
-
var
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
1011
|
+
function $e(t) {
|
|
1012
|
+
var e = E, n = T, r = O, i = p, a = V, s = $, o = P, l = z, f = J, u = t.f;
|
|
1013
|
+
E = /** @type {null | Value[]} */
|
|
1014
|
+
null, T = 0, O = null, V = (u & R) !== 0 && (z || !it || p === null), p = (u & (Y | ft)) === 0 ? t : null, $ = null, Et(t.ctx), z = !1, J = ++pt, t.ac !== null && (Oe(() => {
|
|
1015
|
+
t.ac.abort(Wt);
|
|
1016
|
+
}), t.ac = null);
|
|
542
1017
|
try {
|
|
543
|
-
|
|
1018
|
+
t.f |= Ct;
|
|
1019
|
+
var c = (
|
|
544
1020
|
/** @type {Function} */
|
|
545
|
-
|
|
546
|
-
),
|
|
547
|
-
if (
|
|
548
|
-
var
|
|
549
|
-
if (
|
|
550
|
-
for (
|
|
551
|
-
|
|
1021
|
+
t.fn
|
|
1022
|
+
), v = c(), d = t.deps;
|
|
1023
|
+
if (E !== null) {
|
|
1024
|
+
var _;
|
|
1025
|
+
if (kt(t, T), d !== null && T > 0)
|
|
1026
|
+
for (d.length = T + E.length, _ = 0; _ < E.length; _++)
|
|
1027
|
+
d[T + _] = E[_];
|
|
552
1028
|
else
|
|
553
|
-
t.deps =
|
|
554
|
-
if (
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
1029
|
+
t.deps = d = E;
|
|
1030
|
+
if (!V || // Deriveds that already have reactions can cleanup, so we still add them as reactions
|
|
1031
|
+
(u & F) !== 0 && /** @type {import('#client').Derived} */
|
|
1032
|
+
t.reactions !== null)
|
|
1033
|
+
for (_ = T; _ < d.length; _++)
|
|
1034
|
+
(d[_].reactions ??= []).push(t);
|
|
1035
|
+
} else d !== null && T < d.length && (kt(t, T), d.length = T);
|
|
1036
|
+
if (gt() && O !== null && !z && d !== null && (t.f & (F | G | D)) === 0)
|
|
1037
|
+
for (_ = 0; _ < /** @type {Source[]} */
|
|
1038
|
+
O.length; _++)
|
|
1039
|
+
ze(
|
|
1040
|
+
O[_],
|
|
1041
|
+
/** @type {Effect} */
|
|
1042
|
+
t
|
|
1043
|
+
);
|
|
1044
|
+
return i !== null && i !== t && (pt++, O !== null && (r === null ? r = O : r.push(.../** @type {Source[]} */
|
|
1045
|
+
O))), (t.f & Z) !== 0 && (t.f ^= Z), v;
|
|
1046
|
+
} catch (b) {
|
|
1047
|
+
return On(b);
|
|
559
1048
|
} finally {
|
|
560
|
-
|
|
1049
|
+
t.f ^= Ct, E = e, T = n, O = r, p = i, V = a, $ = s, Et(o), z = l, J = f;
|
|
561
1050
|
}
|
|
562
1051
|
}
|
|
563
|
-
function
|
|
1052
|
+
function Kn(t, e) {
|
|
564
1053
|
let n = e.reactions;
|
|
565
1054
|
if (n !== null) {
|
|
566
|
-
var r =
|
|
1055
|
+
var r = an.call(n, t);
|
|
567
1056
|
if (r !== -1) {
|
|
568
1057
|
var i = n.length - 1;
|
|
569
1058
|
i === 0 ? n = e.reactions = null : (n[r] = n[i], n.pop());
|
|
570
1059
|
}
|
|
571
1060
|
}
|
|
572
|
-
n === null && (e.f &
|
|
1061
|
+
n === null && (e.f & F) !== 0 && // Destroying a child effect while updating a parent effect can cause a dependency to appear
|
|
573
1062
|
// to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`
|
|
574
1063
|
// allows us to skip the expensive work of disconnecting and immediately reconnecting it
|
|
575
|
-
(
|
|
1064
|
+
(E === null || !E.includes(e)) && (A(e, G), (e.f & (R | wt)) === 0 && (e.f ^= wt), Ee(
|
|
1065
|
+
/** @type {Derived} **/
|
|
1066
|
+
e
|
|
1067
|
+
), kt(
|
|
576
1068
|
/** @type {Derived} **/
|
|
577
1069
|
e,
|
|
578
1070
|
0
|
|
579
1071
|
));
|
|
580
1072
|
}
|
|
581
|
-
function
|
|
1073
|
+
function kt(t, e) {
|
|
582
1074
|
var n = t.deps;
|
|
583
1075
|
if (n !== null)
|
|
584
1076
|
for (var r = e; r < n.length; r++)
|
|
585
|
-
|
|
1077
|
+
Kn(t, n[r]);
|
|
586
1078
|
}
|
|
587
|
-
function
|
|
1079
|
+
function at(t) {
|
|
588
1080
|
var e = t.f;
|
|
589
|
-
if ((e &
|
|
590
|
-
|
|
591
|
-
var n =
|
|
592
|
-
|
|
593
|
-
try {
|
|
594
|
-
(e & Lt) !== 0 ? gn(t) : ge(t), ve(t), _e(t);
|
|
595
|
-
var i = ye(t);
|
|
596
|
-
t.teardown = typeof i == "function" ? i : null, t.version = be;
|
|
597
|
-
} catch (l) {
|
|
598
|
-
yt(l, t, n, r || t.ctx);
|
|
599
|
-
} finally {
|
|
600
|
-
v = n;
|
|
601
|
-
}
|
|
602
|
-
}
|
|
603
|
-
}
|
|
604
|
-
function yn() {
|
|
605
|
-
if (tt > 1e3) {
|
|
606
|
-
tt = 0;
|
|
607
|
-
try {
|
|
608
|
-
Ge();
|
|
609
|
-
} catch (t) {
|
|
610
|
-
if (vt !== null)
|
|
611
|
-
yt(t, vt, null);
|
|
612
|
-
else
|
|
613
|
-
throw t;
|
|
614
|
-
}
|
|
615
|
-
}
|
|
616
|
-
tt++;
|
|
617
|
-
}
|
|
618
|
-
function Sn(t) {
|
|
619
|
-
var e = t.length;
|
|
620
|
-
if (e !== 0) {
|
|
621
|
-
yn();
|
|
622
|
-
var n = X;
|
|
623
|
-
X = !0;
|
|
1081
|
+
if ((e & Q) === 0) {
|
|
1082
|
+
A(t, x);
|
|
1083
|
+
var n = h, r = it;
|
|
1084
|
+
h = t, it = !0;
|
|
624
1085
|
try {
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
}
|
|
1086
|
+
(e & ot) !== 0 ? Vn(t) : Ne(t), De(t);
|
|
1087
|
+
var i = $e(t);
|
|
1088
|
+
t.teardown = typeof i == "function" ? i : null, t.wv = Be;
|
|
1089
|
+
var a;
|
|
1090
|
+
ve && En && (t.f & D) !== 0 && t.deps;
|
|
631
1091
|
} finally {
|
|
632
|
-
|
|
1092
|
+
it = r, h = n;
|
|
633
1093
|
}
|
|
634
1094
|
}
|
|
635
1095
|
}
|
|
636
|
-
function
|
|
637
|
-
var e = t.
|
|
638
|
-
if (
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
}
|
|
649
|
-
function wn() {
|
|
650
|
-
if (_t = !1, tt > 1001)
|
|
651
|
-
return;
|
|
652
|
-
const t = It;
|
|
653
|
-
It = [], Sn(t), _t || (tt = 0, vt = null);
|
|
654
|
-
}
|
|
655
|
-
function xt(t) {
|
|
656
|
-
_t || (_t = !0, queueMicrotask(wn)), vt = t;
|
|
657
|
-
for (var e = t; e.parent !== null; ) {
|
|
658
|
-
e = e.parent;
|
|
659
|
-
var n = e.f;
|
|
660
|
-
if ((n & (pt | R)) !== 0) {
|
|
661
|
-
if ((n & F) === 0) return;
|
|
662
|
-
e.f ^= F;
|
|
663
|
-
}
|
|
664
|
-
}
|
|
665
|
-
It.push(e);
|
|
666
|
-
}
|
|
667
|
-
function Se(t, e) {
|
|
668
|
-
var n = t.first, r = [];
|
|
669
|
-
t: for (; n !== null; ) {
|
|
670
|
-
var i = n.f, l = (i & R) !== 0, a = l && (i & F) !== 0, _ = n.next;
|
|
671
|
-
if (!a && (i & Y) === 0)
|
|
672
|
-
if ((i & Dt) !== 0) {
|
|
673
|
-
if (l)
|
|
674
|
-
n.f ^= F;
|
|
675
|
-
else
|
|
676
|
-
try {
|
|
677
|
-
lt(n) && St(n);
|
|
678
|
-
} catch (o) {
|
|
679
|
-
yt(o, n, null, n.ctx);
|
|
680
|
-
}
|
|
681
|
-
var f = n.first;
|
|
682
|
-
if (f !== null) {
|
|
683
|
-
n = f;
|
|
684
|
-
continue;
|
|
685
|
-
}
|
|
686
|
-
} else (i & re) !== 0 && r.push(n);
|
|
687
|
-
if (_ === null) {
|
|
688
|
-
let o = n.parent;
|
|
689
|
-
for (; o !== null; ) {
|
|
690
|
-
if (t === o)
|
|
691
|
-
break t;
|
|
692
|
-
var s = o.next;
|
|
693
|
-
if (s !== null) {
|
|
694
|
-
n = s;
|
|
695
|
-
continue t;
|
|
696
|
-
}
|
|
697
|
-
o = o.parent;
|
|
1096
|
+
function S(t) {
|
|
1097
|
+
var e = t.f, n = (e & F) !== 0;
|
|
1098
|
+
if (p !== null && !z) {
|
|
1099
|
+
var r = h !== null && (h.f & Q) !== 0;
|
|
1100
|
+
if (!r && !$?.includes(t)) {
|
|
1101
|
+
var i = p.deps;
|
|
1102
|
+
if ((p.f & Ct) !== 0)
|
|
1103
|
+
t.rv < pt && (t.rv = pt, E === null && i !== null && i[T] === t ? T++ : E === null ? E = [t] : (!V || !E.includes(t)) && E.push(t));
|
|
1104
|
+
else {
|
|
1105
|
+
(p.deps ??= []).push(t);
|
|
1106
|
+
var a = t.reactions;
|
|
1107
|
+
a === null ? t.reactions = [p] : a.includes(p) || a.push(p);
|
|
698
1108
|
}
|
|
699
1109
|
}
|
|
700
|
-
n = _;
|
|
701
|
-
}
|
|
702
|
-
for (var u = 0; u < r.length; u++)
|
|
703
|
-
f = r[u], e.push(f), Se(f, e);
|
|
704
|
-
}
|
|
705
|
-
function p(t) {
|
|
706
|
-
var u;
|
|
707
|
-
var e = t.f, n = (e & N) !== 0;
|
|
708
|
-
if (n && (e & Z) !== 0) {
|
|
709
|
-
var r = fe(
|
|
710
|
-
/** @type {Derived} */
|
|
711
|
-
t
|
|
712
|
-
);
|
|
713
|
-
return Rt(
|
|
714
|
-
/** @type {Derived} */
|
|
715
|
-
t
|
|
716
|
-
), r;
|
|
717
|
-
}
|
|
718
|
-
if (h !== null) {
|
|
719
|
-
H !== null && H.includes(t) && Qe();
|
|
720
|
-
var i = h.deps;
|
|
721
|
-
S === null && i !== null && i[T] === t ? T++ : S === null ? S = [t] : S.push(t), j !== null && v !== null && (v.f & F) !== 0 && (v.f & R) === 0 && j.includes(t) && (M(v, V), xt(v));
|
|
722
1110
|
} else if (n && /** @type {Derived} */
|
|
723
|
-
t.deps === null
|
|
724
|
-
|
|
1111
|
+
t.deps === null && /** @type {Derived} */
|
|
1112
|
+
t.effects === null) {
|
|
1113
|
+
var s = (
|
|
725
1114
|
/** @type {Derived} */
|
|
726
1115
|
t
|
|
727
|
-
),
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
1116
|
+
), o = s.parent;
|
|
1117
|
+
o !== null && (o.f & R) === 0 && (s.f ^= R);
|
|
1118
|
+
}
|
|
1119
|
+
if (ct) {
|
|
1120
|
+
if (W.has(t))
|
|
1121
|
+
return W.get(t);
|
|
1122
|
+
if (n) {
|
|
1123
|
+
s = /** @type {Derived} */
|
|
1124
|
+
t;
|
|
1125
|
+
var l = s.v;
|
|
1126
|
+
return ((s.f & x) === 0 && s.reactions !== null || He(s)) && (l = Xt(s)), W.set(s, l), l;
|
|
1127
|
+
}
|
|
1128
|
+
} else n && (s = /** @type {Derived} */
|
|
1129
|
+
t, Dt(s) && xe(s));
|
|
1130
|
+
if ((t.f & Z) !== 0)
|
|
1131
|
+
throw t.v;
|
|
1132
|
+
return t.v;
|
|
1133
|
+
}
|
|
1134
|
+
function He(t) {
|
|
1135
|
+
if (t.v === y) return !0;
|
|
1136
|
+
if (t.deps === null) return !1;
|
|
1137
|
+
for (const e of t.deps)
|
|
1138
|
+
if (W.has(e) || (e.f & F) !== 0 && He(
|
|
1139
|
+
/** @type {Derived} */
|
|
1140
|
+
e
|
|
1141
|
+
))
|
|
1142
|
+
return !0;
|
|
1143
|
+
return !1;
|
|
744
1144
|
}
|
|
745
|
-
function
|
|
746
|
-
|
|
1145
|
+
function zt(t) {
|
|
1146
|
+
var e = z;
|
|
747
1147
|
try {
|
|
748
|
-
return
|
|
1148
|
+
return z = !0, t();
|
|
749
1149
|
} finally {
|
|
750
|
-
|
|
1150
|
+
z = e;
|
|
751
1151
|
}
|
|
752
1152
|
}
|
|
753
|
-
const
|
|
754
|
-
function
|
|
755
|
-
t.f = t.f &
|
|
756
|
-
}
|
|
757
|
-
function
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
}
|
|
767
|
-
s: null,
|
|
768
|
-
u: null,
|
|
769
|
-
r1: [],
|
|
770
|
-
r2: A(!1)
|
|
771
|
-
});
|
|
1153
|
+
const Zn = -7169;
|
|
1154
|
+
function A(t, e) {
|
|
1155
|
+
t.f = t.f & Zn | e;
|
|
1156
|
+
}
|
|
1157
|
+
function oe(t) {
|
|
1158
|
+
if (!(typeof t != "object" || !t || t instanceof EventTarget)) {
|
|
1159
|
+
if (rt in t)
|
|
1160
|
+
$t(t);
|
|
1161
|
+
else if (!Array.isArray(t))
|
|
1162
|
+
for (let e in t) {
|
|
1163
|
+
const n = t[e];
|
|
1164
|
+
typeof n == "object" && n && rt in n && $t(n);
|
|
1165
|
+
}
|
|
1166
|
+
}
|
|
772
1167
|
}
|
|
773
|
-
function
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
var n = v, r = h;
|
|
779
|
-
e.e = null;
|
|
1168
|
+
function $t(t, e = /* @__PURE__ */ new Set()) {
|
|
1169
|
+
if (typeof t == "object" && t !== null && // We don't want to traverse DOM elements
|
|
1170
|
+
!(t instanceof EventTarget) && !e.has(t)) {
|
|
1171
|
+
e.add(t), t instanceof Date && t.getTime();
|
|
1172
|
+
for (let r in t)
|
|
780
1173
|
try {
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
1174
|
+
$t(t[r], e);
|
|
1175
|
+
} catch {
|
|
1176
|
+
}
|
|
1177
|
+
const n = Ht(t);
|
|
1178
|
+
if (n !== Object.prototype && n !== Array.prototype && n !== Map.prototype && n !== Set.prototype && n !== Date.prototype) {
|
|
1179
|
+
const r = pe(n);
|
|
1180
|
+
for (let i in r) {
|
|
1181
|
+
const a = r[i].get;
|
|
1182
|
+
if (a)
|
|
1183
|
+
try {
|
|
1184
|
+
a.call(t);
|
|
1185
|
+
} catch {
|
|
1186
|
+
}
|
|
787
1187
|
}
|
|
788
1188
|
}
|
|
789
|
-
x = e.p, e.m = !0;
|
|
790
1189
|
}
|
|
791
|
-
return (
|
|
792
|
-
/** @type {T} */
|
|
793
|
-
{}
|
|
794
|
-
);
|
|
795
1190
|
}
|
|
796
|
-
const
|
|
797
|
-
function
|
|
1191
|
+
const Jn = /* @__PURE__ */ new Set(), Qn = /* @__PURE__ */ new Set();
|
|
1192
|
+
function tr(t) {
|
|
798
1193
|
for (var e = 0; e < t.length; e++)
|
|
799
|
-
|
|
800
|
-
for (var n of
|
|
1194
|
+
Jn.add(t[e]);
|
|
1195
|
+
for (var n of Qn)
|
|
801
1196
|
n(t);
|
|
802
1197
|
}
|
|
803
|
-
function
|
|
1198
|
+
function er(t) {
|
|
804
1199
|
var e = document.createElement("template");
|
|
805
|
-
return e.innerHTML = t, e.content;
|
|
1200
|
+
return e.innerHTML = t.replaceAll("<!>", "<!---->"), e.content;
|
|
806
1201
|
}
|
|
807
|
-
function
|
|
1202
|
+
function Ue(t, e) {
|
|
808
1203
|
var n = (
|
|
809
1204
|
/** @type {Effect} */
|
|
810
|
-
|
|
1205
|
+
h
|
|
811
1206
|
);
|
|
812
1207
|
n.nodes_start === null && (n.nodes_start = t, n.nodes_end = e);
|
|
813
1208
|
}
|
|
814
1209
|
// @__NO_SIDE_EFFECTS__
|
|
815
|
-
function
|
|
1210
|
+
function Kt(t, e) {
|
|
816
1211
|
var n, r = !t.startsWith("<!>");
|
|
817
1212
|
return () => {
|
|
818
|
-
n === void 0 && (n =
|
|
819
|
-
/* @__PURE__ */
|
|
1213
|
+
n === void 0 && (n = er(r ? t : "<!>" + t), n = /** @type {Node} */
|
|
1214
|
+
/* @__PURE__ */ Yt(n));
|
|
820
1215
|
var i = (
|
|
821
1216
|
/** @type {TemplateNode} */
|
|
822
1217
|
n.cloneNode(!0)
|
|
823
1218
|
);
|
|
824
|
-
return
|
|
1219
|
+
return Ue(i, i), i;
|
|
825
1220
|
};
|
|
826
1221
|
}
|
|
827
|
-
function
|
|
828
|
-
var t = document.createDocumentFragment(), e = document.createComment(""), n =
|
|
829
|
-
return t.append(e, n),
|
|
1222
|
+
function nr() {
|
|
1223
|
+
var t = document.createDocumentFragment(), e = document.createComment(""), n = Ae();
|
|
1224
|
+
return t.append(e, n), Ue(e, n), t;
|
|
830
1225
|
}
|
|
831
|
-
function
|
|
1226
|
+
function Tt(t, e) {
|
|
832
1227
|
t !== null && t.before(
|
|
833
1228
|
/** @type {Node} */
|
|
834
1229
|
e
|
|
835
1230
|
);
|
|
836
1231
|
}
|
|
837
|
-
function
|
|
838
|
-
var r = t, i =
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
}, u = (o, c) => {
|
|
842
|
-
a !== (a = o) && (a ? (i ? Yt(i) : c && (i = Ft(() => c(r))), l && Xt(l, () => {
|
|
843
|
-
l = null;
|
|
844
|
-
})) : (l ? Yt(l) : c && (l = Ft(() => c(r))), i && Xt(i, () => {
|
|
845
|
-
i = null;
|
|
846
|
-
})));
|
|
847
|
-
};
|
|
848
|
-
Mt(() => {
|
|
849
|
-
f = !1, e(s), f || u(null, null);
|
|
850
|
-
}, _);
|
|
851
|
-
}
|
|
852
|
-
function Te(t, e, ...n) {
|
|
853
|
-
var r = t, i = Ot, l;
|
|
854
|
-
Mt(() => {
|
|
855
|
-
i !== (i = e()) && (l && (J(l), l = null), l = Ft(() => (
|
|
1232
|
+
function Ve(t, e, ...n) {
|
|
1233
|
+
var r = t, i = Ut, a;
|
|
1234
|
+
Le(() => {
|
|
1235
|
+
i !== (i = e()) && (a && (ut(a), a = null), a = jt(() => (
|
|
856
1236
|
/** @type {SnippetFn} */
|
|
857
1237
|
i(r, ...n)
|
|
858
1238
|
)));
|
|
859
|
-
},
|
|
860
|
-
}
|
|
861
|
-
function
|
|
862
|
-
var
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
n[l].set && e.push(l);
|
|
874
|
-
r = ne(r);
|
|
1239
|
+
}, Ft);
|
|
1240
|
+
}
|
|
1241
|
+
function rr(t, e, n = !1) {
|
|
1242
|
+
var r = t, i = null, a = null, s = y, o = n ? Ft : 0, l = !1;
|
|
1243
|
+
const f = (d, _ = !0) => {
|
|
1244
|
+
l = !0, v(_, d);
|
|
1245
|
+
};
|
|
1246
|
+
var u = null;
|
|
1247
|
+
function c() {
|
|
1248
|
+
u !== null && (u.lastChild.remove(), r.before(u), u = null);
|
|
1249
|
+
var d = s ? i : a, _ = s ? a : i;
|
|
1250
|
+
d && Yn(d), _ && qn(_, () => {
|
|
1251
|
+
s ? a = null : i = null;
|
|
1252
|
+
});
|
|
875
1253
|
}
|
|
876
|
-
|
|
1254
|
+
const v = (d, _) => {
|
|
1255
|
+
if (s !== (s = d)) {
|
|
1256
|
+
var b = zn(), I = r;
|
|
1257
|
+
if (b && (u = document.createDocumentFragment(), u.append(I = Ae())), s ? i ??= _ && jt(() => _(I)) : a ??= _ && jt(() => _(I)), b) {
|
|
1258
|
+
var k = (
|
|
1259
|
+
/** @type {Batch} */
|
|
1260
|
+
w
|
|
1261
|
+
), N = s ? i : a, g = s ? a : i;
|
|
1262
|
+
N && k.skipped_effects.delete(N), g && k.skipped_effects.add(g), k.add_callback(c);
|
|
1263
|
+
} else
|
|
1264
|
+
c();
|
|
1265
|
+
}
|
|
1266
|
+
};
|
|
1267
|
+
Le(() => {
|
|
1268
|
+
l = !1, e(f), l || v(null, null);
|
|
1269
|
+
}, o);
|
|
877
1270
|
}
|
|
878
|
-
function
|
|
879
|
-
var
|
|
880
|
-
|
|
1271
|
+
function ir(t, e, n) {
|
|
1272
|
+
var r = t == null ? "" : "" + t;
|
|
1273
|
+
return e && (r = r ? r + " " + e : e), r === "" ? null : r;
|
|
1274
|
+
}
|
|
1275
|
+
function ar(t, e) {
|
|
1276
|
+
return t == null ? null : String(t);
|
|
881
1277
|
}
|
|
882
|
-
function
|
|
883
|
-
|
|
1278
|
+
function We(t, e, n, r, i, a) {
|
|
1279
|
+
var s = t.__className;
|
|
1280
|
+
if (s !== n || s === void 0) {
|
|
1281
|
+
var o = ir(n, r);
|
|
1282
|
+
o == null ? t.removeAttribute("class") : t.className = o, t.__className = n;
|
|
1283
|
+
}
|
|
1284
|
+
return a;
|
|
884
1285
|
}
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
} finally {
|
|
891
|
-
at = e;
|
|
1286
|
+
function qe(t, e, n, r) {
|
|
1287
|
+
var i = t.__style;
|
|
1288
|
+
if (i !== e) {
|
|
1289
|
+
var a = ar(e);
|
|
1290
|
+
a == null ? t.removeAttribute("style") : t.style.cssText = a, t.__style = e;
|
|
892
1291
|
}
|
|
1292
|
+
return r;
|
|
893
1293
|
}
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
1294
|
+
const sr = Symbol("is custom element"), lr = Symbol("is html");
|
|
1295
|
+
function fe(t, e, n, r) {
|
|
1296
|
+
var i = or(t);
|
|
1297
|
+
i[e] !== (i[e] = n) && (e === "loading" && (t[vn] = n), n == null ? t.removeAttribute(e) : typeof n != "string" && fr(t).includes(e) ? t[e] = n : t.setAttribute(e, n));
|
|
1298
|
+
}
|
|
1299
|
+
function or(t) {
|
|
1300
|
+
return (
|
|
1301
|
+
/** @type {Record<string | symbol, unknown>} **/
|
|
1302
|
+
// @ts-expect-error
|
|
1303
|
+
t.__attributes ??= {
|
|
1304
|
+
[sr]: t.nodeName.includes("-"),
|
|
1305
|
+
[lr]: t.namespaceURI === nn
|
|
1306
|
+
}
|
|
1307
|
+
);
|
|
1308
|
+
}
|
|
1309
|
+
var ue = /* @__PURE__ */ new Map();
|
|
1310
|
+
function fr(t) {
|
|
1311
|
+
var e = t.getAttribute("is") || t.nodeName, n = ue.get(e);
|
|
1312
|
+
if (n) return n;
|
|
1313
|
+
ue.set(e, n = []);
|
|
1314
|
+
for (var r, i = t, a = Element.prototype; a !== i; ) {
|
|
1315
|
+
r = pe(i);
|
|
1316
|
+
for (var s in r)
|
|
1317
|
+
r[s].set && n.push(s);
|
|
1318
|
+
i = Ht(i);
|
|
1319
|
+
}
|
|
1320
|
+
return n;
|
|
1321
|
+
}
|
|
1322
|
+
let yt = !1;
|
|
1323
|
+
function ur(t) {
|
|
1324
|
+
var e = yt;
|
|
897
1325
|
try {
|
|
898
|
-
return
|
|
1326
|
+
return yt = !1, [t(), yt];
|
|
899
1327
|
} finally {
|
|
900
|
-
|
|
1328
|
+
yt = e;
|
|
901
1329
|
}
|
|
902
1330
|
}
|
|
903
|
-
function
|
|
904
|
-
var
|
|
905
|
-
var i = (n & Ne) !== 0, l = !it || (n & Re) !== 0, a = (n & Pe) !== 0, _ = (n & Me) !== 0, f = !1, s;
|
|
906
|
-
a ? [s, f] = Nn(() => (
|
|
907
|
-
/** @type {V} */
|
|
908
|
-
t[e]
|
|
909
|
-
)) : s = /** @type {V} */
|
|
910
|
-
t[e];
|
|
911
|
-
var u = ot in t || We in t, o = ((Ut = st(t, e)) == null ? void 0 : Ut.set) ?? (u && a && e in t ? (b) => t[e] = b : void 0), c = (
|
|
1331
|
+
function _t(t, e, n, r) {
|
|
1332
|
+
var i = !Ot || (n & Je) !== 0, a = (n & tn) !== 0, s = (n & en) !== 0, o = (
|
|
912
1333
|
/** @type {V} */
|
|
913
1334
|
r
|
|
914
|
-
),
|
|
1335
|
+
), l = !0, f = () => (l && (l = !1, o = s ? zt(
|
|
915
1336
|
/** @type {() => V} */
|
|
916
1337
|
r
|
|
917
|
-
) :
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
if (
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
/** @type {V} */
|
|
925
|
-
t[e]
|
|
926
|
-
);
|
|
927
|
-
return b === void 0 ? m() : (g = !0, w = !1, b);
|
|
928
|
-
};
|
|
929
|
-
else {
|
|
930
|
-
var U = Jt(
|
|
931
|
-
() => (i ? P : fn)(() => (
|
|
932
|
-
/** @type {V} */
|
|
933
|
-
t[e]
|
|
934
|
-
))
|
|
935
|
-
);
|
|
936
|
-
U.f |= Ue, y = () => {
|
|
937
|
-
var b = p(U);
|
|
938
|
-
return b !== void 0 && (c = /** @type {V} */
|
|
939
|
-
void 0), b === void 0 ? c : b;
|
|
940
|
-
};
|
|
1338
|
+
) : (
|
|
1339
|
+
/** @type {V} */
|
|
1340
|
+
r
|
|
1341
|
+
)), o), u;
|
|
1342
|
+
if (a) {
|
|
1343
|
+
var c = rt in t || dn in t;
|
|
1344
|
+
u = St(t, e)?.set ?? (c && e in t ? (g) => t[e] = g : void 0);
|
|
941
1345
|
}
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
1346
|
+
var v, d = !1;
|
|
1347
|
+
a ? [v, d] = ur(() => (
|
|
1348
|
+
/** @type {V} */
|
|
1349
|
+
t[e]
|
|
1350
|
+
)) : v = /** @type {V} */
|
|
1351
|
+
t[e], v === void 0 && r !== void 0 && (v = f(), u && (i && gn(), u(v)));
|
|
1352
|
+
var _;
|
|
1353
|
+
if (i ? _ = () => {
|
|
1354
|
+
var g = (
|
|
1355
|
+
/** @type {V} */
|
|
1356
|
+
t[e]
|
|
1357
|
+
);
|
|
1358
|
+
return g === void 0 ? f() : (l = !0, g);
|
|
1359
|
+
} : _ = () => {
|
|
1360
|
+
var g = (
|
|
1361
|
+
/** @type {V} */
|
|
1362
|
+
t[e]
|
|
1363
|
+
);
|
|
1364
|
+
return g !== void 0 && (o = /** @type {V} */
|
|
1365
|
+
void 0), g === void 0 ? o : g;
|
|
1366
|
+
}, i && (n & Qe) === 0)
|
|
1367
|
+
return _;
|
|
1368
|
+
if (u) {
|
|
1369
|
+
var b = t.$$legacy;
|
|
1370
|
+
return (
|
|
1371
|
+
/** @type {() => V} */
|
|
1372
|
+
(function(g, bt) {
|
|
1373
|
+
return arguments.length > 0 ? ((!i || !bt || b || d) && u(bt ? _() : g), g) : _();
|
|
1374
|
+
})
|
|
1375
|
+
);
|
|
949
1376
|
}
|
|
950
|
-
var
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
1377
|
+
var I = !1, k = ((n & Ze) !== 0 ? Lt : we)(() => (I = !1, _()));
|
|
1378
|
+
a && S(k);
|
|
1379
|
+
var N = (
|
|
1380
|
+
/** @type {Effect} */
|
|
1381
|
+
h
|
|
1382
|
+
);
|
|
1383
|
+
return (
|
|
1384
|
+
/** @type {() => V} */
|
|
1385
|
+
(function(g, bt) {
|
|
1386
|
+
if (arguments.length > 0) {
|
|
1387
|
+
const te = bt ? S(k) : i && a ? nt(g) : g;
|
|
1388
|
+
return U(k, te), I = !0, o !== void 0 && (o = te), g;
|
|
1389
|
+
}
|
|
1390
|
+
return ct && I || (N.f & Q) !== 0 ? k.v : S(k);
|
|
954
1391
|
})
|
|
955
1392
|
);
|
|
956
|
-
return i || (Q.equals = At), function(b, q) {
|
|
957
|
-
if (arguments.length > 0) {
|
|
958
|
-
const Et = q ? p(Q) : l && a ? W(b) : b;
|
|
959
|
-
return Q.equals(Et) || (C = !0, B(wt, Et), w && c !== void 0 && (c = Et), Kt(() => p(Q))), b;
|
|
960
|
-
}
|
|
961
|
-
return p(Q);
|
|
962
|
-
};
|
|
963
|
-
}
|
|
964
|
-
en();
|
|
965
|
-
var Rn = /* @__PURE__ */ Ct('<div class="rcb-processing svelte-2j2b59"></div>');
|
|
966
|
-
function Bn(t, e) {
|
|
967
|
-
let n = et(e, "size", 8, "medium");
|
|
968
|
-
const r = {
|
|
969
|
-
small: { width: "8px", offset: "10px" },
|
|
970
|
-
medium: { width: "12px", offset: "20px" },
|
|
971
|
-
large: { width: "16px", offset: "30px" }
|
|
972
|
-
};
|
|
973
|
-
var i = Rn();
|
|
974
|
-
Pt(() => ft(i, "style", `--shadow-offset: ${r[n()].offset ?? ""}; --width: ${r[n()].width ?? ""};`)), dt(t, i);
|
|
975
1393
|
}
|
|
976
|
-
var
|
|
977
|
-
function
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
Te(i, () => e.children ?? Ot), Pt(() => ke(r, `rcb-typography rcb-typography-${n() ?? ""} svelte-byrjto`)), dt(t, r), we();
|
|
1394
|
+
var cr = /* @__PURE__ */ Kt("<span><!></span>");
|
|
1395
|
+
function _r(t, e) {
|
|
1396
|
+
const n = _t(e, "size", 3, "body-base");
|
|
1397
|
+
var r = cr(), i = Ie(r);
|
|
1398
|
+
Ve(i, () => e.children ?? Ut), Gt(() => We(r, 1, `rcb-typography rcb-typography-${n() ?? ""}`, "svelte-jt3g5k")), Tt(t, r);
|
|
982
1399
|
}
|
|
983
|
-
const
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
},
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
},
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
},
|
|
1025
|
-
...Fe,
|
|
1026
|
-
"input-background": "color_product_info_bg",
|
|
1027
|
-
background: "color_product_info_bg"
|
|
1028
|
-
}, Ie = {
|
|
1029
|
-
"input-border-radius": "4px",
|
|
1030
|
-
"input-button-border-radius": "8px"
|
|
1031
|
-
}, Hn = {
|
|
1032
|
-
"input-border-radius": "0px",
|
|
1033
|
-
"input-button-border-radius": "0px"
|
|
1034
|
-
}, Vn = {
|
|
1035
|
-
"input-border-radius": "12px",
|
|
1036
|
-
"input-button-border-radius": "9999px"
|
|
1037
|
-
}, Qt = Ie, te = "-apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif", I = {
|
|
1400
|
+
const dr = {
|
|
1401
|
+
outerPadding: {
|
|
1402
|
+
mobile: "clamp(1.3125rem, 5.6vw, 1.5rem)",
|
|
1403
|
+
desktop: "clamp(1.5rem, 9.44vw, 5rem)"
|
|
1404
|
+
},
|
|
1405
|
+
outerPaddingSmall: {
|
|
1406
|
+
mobile: "clamp(0.75rem, 4.2vw, 1rem)",
|
|
1407
|
+
desktop: "clamp(1.5rem, 9.44vw, 5rem)"
|
|
1408
|
+
},
|
|
1409
|
+
gapSmall: {
|
|
1410
|
+
mobile: "0.25rem",
|
|
1411
|
+
desktop: "0.375rem"
|
|
1412
|
+
},
|
|
1413
|
+
gapMedium: {
|
|
1414
|
+
mobile: "0.5rem",
|
|
1415
|
+
desktop: "0.75rem"
|
|
1416
|
+
},
|
|
1417
|
+
gapLarge: {
|
|
1418
|
+
mobile: "0.75rem",
|
|
1419
|
+
desktop: "0.75rem"
|
|
1420
|
+
},
|
|
1421
|
+
gapXLarge: {
|
|
1422
|
+
mobile: "1rem",
|
|
1423
|
+
desktop: "1.5rem"
|
|
1424
|
+
},
|
|
1425
|
+
gapXXLarge: {
|
|
1426
|
+
mobile: "1.25rem",
|
|
1427
|
+
desktop: "2.25rem"
|
|
1428
|
+
},
|
|
1429
|
+
gapXXXLarge: {
|
|
1430
|
+
mobile: "2.25rem",
|
|
1431
|
+
desktop: "4.5rem"
|
|
1432
|
+
},
|
|
1433
|
+
inputHeight: {
|
|
1434
|
+
mobile: "3rem",
|
|
1435
|
+
desktop: "3rem"
|
|
1436
|
+
},
|
|
1437
|
+
gapStripeElement: {
|
|
1438
|
+
mobile: "0.70rem",
|
|
1439
|
+
desktop: "1rem"
|
|
1440
|
+
}
|
|
1441
|
+
}, ce = "-apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif", C = {
|
|
1038
1442
|
regular: "400",
|
|
1039
1443
|
medium: "500",
|
|
1040
1444
|
semibold: "600"
|
|
1041
|
-
},
|
|
1445
|
+
}, L = {
|
|
1042
1446
|
12: "12px",
|
|
1043
1447
|
14: "14px",
|
|
1044
1448
|
16: "16px",
|
|
@@ -1047,151 +1451,205 @@ const zn = {
|
|
|
1047
1451
|
28: "28px",
|
|
1048
1452
|
32: "32px",
|
|
1049
1453
|
36: "36px"
|
|
1050
|
-
},
|
|
1454
|
+
}, M = {
|
|
1051
1455
|
120: "120%",
|
|
1052
1456
|
130: "130%",
|
|
1053
1457
|
140: "140%"
|
|
1054
|
-
},
|
|
1458
|
+
}, B = {
|
|
1055
1459
|
tight: "0.20%",
|
|
1056
1460
|
regular: "0"
|
|
1057
|
-
},
|
|
1461
|
+
}, m = {
|
|
1058
1462
|
heading2xl: {
|
|
1059
|
-
fontSize:
|
|
1060
|
-
lineHeight:
|
|
1061
|
-
fontWeight:
|
|
1062
|
-
letterSpacing:
|
|
1463
|
+
fontSize: L[28],
|
|
1464
|
+
lineHeight: M[120],
|
|
1465
|
+
fontWeight: C.semibold,
|
|
1466
|
+
letterSpacing: B.tight
|
|
1063
1467
|
},
|
|
1064
1468
|
headingXl: {
|
|
1065
|
-
fontSize:
|
|
1066
|
-
lineHeight:
|
|
1067
|
-
fontWeight:
|
|
1068
|
-
letterSpacing:
|
|
1469
|
+
fontSize: L[24],
|
|
1470
|
+
lineHeight: M[130],
|
|
1471
|
+
fontWeight: C.semibold,
|
|
1472
|
+
letterSpacing: B.regular
|
|
1069
1473
|
},
|
|
1070
1474
|
headingLg: {
|
|
1071
1475
|
fontSize: "20px",
|
|
1072
|
-
lineHeight:
|
|
1073
|
-
fontWeight:
|
|
1074
|
-
letterSpacing:
|
|
1476
|
+
lineHeight: M[130],
|
|
1477
|
+
fontWeight: C.semibold,
|
|
1478
|
+
letterSpacing: B.regular
|
|
1075
1479
|
},
|
|
1076
1480
|
headingMd: {
|
|
1077
1481
|
fontSize: "16px",
|
|
1078
|
-
lineHeight:
|
|
1079
|
-
fontWeight:
|
|
1080
|
-
letterSpacing:
|
|
1482
|
+
lineHeight: M[140],
|
|
1483
|
+
fontWeight: C.medium,
|
|
1484
|
+
letterSpacing: B.regular
|
|
1081
1485
|
},
|
|
1082
1486
|
bodyBase: {
|
|
1083
|
-
fontSize:
|
|
1084
|
-
lineHeight:
|
|
1085
|
-
fontWeight:
|
|
1086
|
-
letterSpacing:
|
|
1487
|
+
fontSize: L[16],
|
|
1488
|
+
lineHeight: M[140],
|
|
1489
|
+
fontWeight: C.regular,
|
|
1490
|
+
letterSpacing: B.regular
|
|
1087
1491
|
},
|
|
1088
1492
|
bodySmall: {
|
|
1089
|
-
fontSize:
|
|
1090
|
-
lineHeight:
|
|
1091
|
-
fontWeight:
|
|
1092
|
-
letterSpacing:
|
|
1493
|
+
fontSize: L[14],
|
|
1494
|
+
lineHeight: M[140],
|
|
1495
|
+
fontWeight: C.regular,
|
|
1496
|
+
letterSpacing: B.regular
|
|
1093
1497
|
},
|
|
1094
1498
|
labelButton: {
|
|
1095
|
-
fontSize:
|
|
1096
|
-
lineHeight:
|
|
1097
|
-
fontWeight:
|
|
1098
|
-
letterSpacing:
|
|
1499
|
+
fontSize: L[16],
|
|
1500
|
+
lineHeight: M[140],
|
|
1501
|
+
fontWeight: C.regular,
|
|
1502
|
+
letterSpacing: B.tight
|
|
1099
1503
|
},
|
|
1100
1504
|
labelDefault: {
|
|
1101
|
-
fontSize:
|
|
1102
|
-
lineHeight:
|
|
1103
|
-
fontWeight:
|
|
1104
|
-
letterSpacing:
|
|
1505
|
+
fontSize: L[14],
|
|
1506
|
+
lineHeight: M[140],
|
|
1507
|
+
fontWeight: C.regular,
|
|
1508
|
+
letterSpacing: B.tight
|
|
1105
1509
|
},
|
|
1106
1510
|
captionDefault: {
|
|
1107
|
-
fontSize:
|
|
1108
|
-
lineHeight:
|
|
1109
|
-
fontWeight:
|
|
1110
|
-
letterSpacing:
|
|
1511
|
+
fontSize: L[12],
|
|
1512
|
+
lineHeight: M[140],
|
|
1513
|
+
fontWeight: C.regular,
|
|
1514
|
+
letterSpacing: B.regular
|
|
1111
1515
|
},
|
|
1112
1516
|
captionLink: {
|
|
1113
|
-
fontSize:
|
|
1114
|
-
lineHeight:
|
|
1115
|
-
fontWeight:
|
|
1116
|
-
letterSpacing:
|
|
1517
|
+
fontSize: L[12],
|
|
1518
|
+
lineHeight: M[140],
|
|
1519
|
+
fontWeight: C.regular,
|
|
1520
|
+
letterSpacing: B.regular
|
|
1117
1521
|
}
|
|
1118
|
-
},
|
|
1522
|
+
}, j = {
|
|
1119
1523
|
heading2xl: {
|
|
1120
|
-
...
|
|
1121
|
-
fontSize:
|
|
1524
|
+
...m.heading2xl,
|
|
1525
|
+
fontSize: L[36]
|
|
1122
1526
|
},
|
|
1123
1527
|
headingXl: {
|
|
1124
|
-
...
|
|
1125
|
-
fontSize:
|
|
1528
|
+
...m.headingXl,
|
|
1529
|
+
fontSize: L[32]
|
|
1126
1530
|
},
|
|
1127
1531
|
headingLg: {
|
|
1128
|
-
...
|
|
1129
|
-
fontSize:
|
|
1532
|
+
...m.headingLg,
|
|
1533
|
+
fontSize: L[24]
|
|
1130
1534
|
},
|
|
1131
1535
|
headingMd: {
|
|
1132
|
-
...
|
|
1133
|
-
fontSize:
|
|
1536
|
+
...m.headingMd,
|
|
1537
|
+
fontSize: L[18]
|
|
1134
1538
|
},
|
|
1135
1539
|
bodyBase: {
|
|
1136
|
-
...
|
|
1540
|
+
...m.bodyBase
|
|
1137
1541
|
},
|
|
1138
1542
|
bodySmall: {
|
|
1139
|
-
...
|
|
1543
|
+
...m.bodySmall
|
|
1140
1544
|
},
|
|
1141
1545
|
labelButton: {
|
|
1142
|
-
...
|
|
1546
|
+
...m.labelButton
|
|
1143
1547
|
},
|
|
1144
1548
|
labelDefault: {
|
|
1145
|
-
...
|
|
1549
|
+
...m.labelDefault
|
|
1146
1550
|
},
|
|
1147
1551
|
captionDefault: {
|
|
1148
|
-
...
|
|
1552
|
+
...m.captionDefault
|
|
1149
1553
|
},
|
|
1150
1554
|
captionLink: {
|
|
1151
|
-
...
|
|
1555
|
+
...m.captionLink
|
|
1152
1556
|
}
|
|
1153
|
-
},
|
|
1557
|
+
}, vr = {
|
|
1154
1558
|
heading2xl: {
|
|
1155
|
-
mobile:
|
|
1156
|
-
desktop:
|
|
1559
|
+
mobile: m.heading2xl,
|
|
1560
|
+
desktop: j.heading2xl
|
|
1157
1561
|
},
|
|
1158
1562
|
headingXl: {
|
|
1159
|
-
desktop:
|
|
1160
|
-
mobile:
|
|
1563
|
+
desktop: j.headingXl,
|
|
1564
|
+
mobile: m.headingXl
|
|
1161
1565
|
},
|
|
1162
1566
|
headingLg: {
|
|
1163
|
-
desktop:
|
|
1164
|
-
mobile:
|
|
1567
|
+
desktop: j.headingLg,
|
|
1568
|
+
mobile: m.headingLg
|
|
1165
1569
|
},
|
|
1166
1570
|
headingMd: {
|
|
1167
|
-
desktop:
|
|
1168
|
-
mobile:
|
|
1571
|
+
desktop: j.headingMd,
|
|
1572
|
+
mobile: m.headingMd
|
|
1169
1573
|
},
|
|
1170
1574
|
bodyBase: {
|
|
1171
|
-
desktop:
|
|
1172
|
-
mobile:
|
|
1575
|
+
desktop: j.bodyBase,
|
|
1576
|
+
mobile: m.bodyBase
|
|
1173
1577
|
},
|
|
1174
1578
|
bodySmall: {
|
|
1175
|
-
desktop:
|
|
1176
|
-
mobile:
|
|
1579
|
+
desktop: j.bodySmall,
|
|
1580
|
+
mobile: m.bodySmall
|
|
1177
1581
|
},
|
|
1178
1582
|
labelButton: {
|
|
1179
|
-
desktop:
|
|
1180
|
-
mobile:
|
|
1583
|
+
desktop: j.labelButton,
|
|
1584
|
+
mobile: m.labelButton
|
|
1181
1585
|
},
|
|
1182
1586
|
labelDefault: {
|
|
1183
|
-
desktop:
|
|
1184
|
-
mobile:
|
|
1587
|
+
desktop: j.labelDefault,
|
|
1588
|
+
mobile: m.labelDefault
|
|
1185
1589
|
},
|
|
1186
1590
|
captionDefault: {
|
|
1187
|
-
desktop:
|
|
1188
|
-
mobile:
|
|
1591
|
+
desktop: j.captionDefault,
|
|
1592
|
+
mobile: m.captionDefault
|
|
1189
1593
|
},
|
|
1190
1594
|
captionLink: {
|
|
1191
|
-
desktop:
|
|
1192
|
-
mobile:
|
|
1595
|
+
desktop: j.captionLink,
|
|
1596
|
+
mobile: m.captionLink
|
|
1193
1597
|
}
|
|
1194
|
-
},
|
|
1598
|
+
}, pr = {
|
|
1599
|
+
error: "#B0171F",
|
|
1600
|
+
warning: "#f4e971",
|
|
1601
|
+
focus: "#1148B8",
|
|
1602
|
+
accent: "#767676",
|
|
1603
|
+
primary: "#576CDB",
|
|
1604
|
+
"primary-hover": "rgba(87, 108, 219, .8)",
|
|
1605
|
+
"primary-pressed": "rgba(87, 108, 219, .9)",
|
|
1606
|
+
"primary-text": "#ffffff",
|
|
1607
|
+
white: "#ffffff",
|
|
1608
|
+
"grey-text-dark": "rgba(0,0,0,1)",
|
|
1609
|
+
"grey-text-light": "rgba(0,0,0,0.7)",
|
|
1610
|
+
"grey-ui-dark": "rgba(0,0,0,0.3)",
|
|
1611
|
+
"grey-ui-light": "rgba(0,0,0,0.1)",
|
|
1612
|
+
"input-background": "white",
|
|
1613
|
+
background: "white"
|
|
1614
|
+
}, hr = {
|
|
1615
|
+
error: "#B0171F",
|
|
1616
|
+
warning: "#f4e971",
|
|
1617
|
+
focus: "#1148B8",
|
|
1618
|
+
accent: "#767676",
|
|
1619
|
+
primary: "#576CDB",
|
|
1620
|
+
"primary-hover": "rgba(87, 108, 219, .8)",
|
|
1621
|
+
"primary-pressed": "rgba(87, 108, 219, .9)",
|
|
1622
|
+
"primary-text": "#ffffff",
|
|
1623
|
+
white: "#ffffff",
|
|
1624
|
+
"grey-text-dark": "rgba(0,0,0,1)",
|
|
1625
|
+
"grey-text-light": "rgba(0,0,0,0.7)",
|
|
1626
|
+
"grey-ui-dark": "rgba(0,0,0,0.3)",
|
|
1627
|
+
"grey-ui-light": "rgba(0,0,0,0.1)",
|
|
1628
|
+
"input-background": "white",
|
|
1629
|
+
background: "#EFF3FA"
|
|
1630
|
+
}, Xe = {
|
|
1631
|
+
error: "color_error",
|
|
1632
|
+
focus: "color_accent",
|
|
1633
|
+
accent: "color_accent",
|
|
1634
|
+
primary: "color_buttons_primary"
|
|
1635
|
+
}, gr = {
|
|
1636
|
+
...Xe,
|
|
1637
|
+
"input-background": "color_form_bg",
|
|
1638
|
+
background: "color_form_bg"
|
|
1639
|
+
}, mr = {
|
|
1640
|
+
...Xe,
|
|
1641
|
+
"input-background": "color_product_info_bg",
|
|
1642
|
+
background: "color_product_info_bg"
|
|
1643
|
+
}, Ye = {
|
|
1644
|
+
"input-border-radius": "4px",
|
|
1645
|
+
"input-button-border-radius": "8px"
|
|
1646
|
+
}, br = {
|
|
1647
|
+
"input-border-radius": "0px",
|
|
1648
|
+
"input-button-border-radius": "0px"
|
|
1649
|
+
}, yr = {
|
|
1650
|
+
"input-border-radius": "12px",
|
|
1651
|
+
"input-button-border-radius": "9999px"
|
|
1652
|
+
}, _e = Ye, ht = (t) => t.length == 7 ? {
|
|
1195
1653
|
r: parseInt(t.slice(1, 3), 16),
|
|
1196
1654
|
g: parseInt(t.slice(3, 5), 16),
|
|
1197
1655
|
b: parseInt(t.slice(5, 7), 16)
|
|
@@ -1199,16 +1657,16 @@ const zn = {
|
|
|
1199
1657
|
r: parseInt(t[1], 16),
|
|
1200
1658
|
g: parseInt(t[2], 16),
|
|
1201
1659
|
b: parseInt(t[3], 16)
|
|
1202
|
-
} : null,
|
|
1660
|
+
} : null, Zt = ({
|
|
1203
1661
|
r: t,
|
|
1204
1662
|
g: e,
|
|
1205
1663
|
b: n,
|
|
1206
1664
|
luminanceThreshold: r
|
|
1207
1665
|
}) => {
|
|
1208
|
-
const i = (
|
|
1666
|
+
const i = (s) => (s = s / 255, s <= 0.03928 ? s / 12.92 : Math.pow((s + 0.055) / 1.055, 2.4));
|
|
1209
1667
|
return 0.2126 * i(t) + 0.7152 * i(e) + 0.0722 * i(n) > r;
|
|
1210
|
-
},
|
|
1211
|
-
const n =
|
|
1668
|
+
}, Jt = 0.37, Sr = (t, e = Jt) => {
|
|
1669
|
+
const n = Zt({ ...t, luminanceThreshold: e }) ? "0,0,0" : "255,255,255";
|
|
1212
1670
|
return {
|
|
1213
1671
|
"grey-text-dark": `rgb(${n})`,
|
|
1214
1672
|
"grey-text-light": `rgba(${n},0.70)`,
|
|
@@ -1216,24 +1674,24 @@ const zn = {
|
|
|
1216
1674
|
"grey-ui-light": `rgba(${n},0.1)`
|
|
1217
1675
|
};
|
|
1218
1676
|
};
|
|
1219
|
-
function
|
|
1220
|
-
const r =
|
|
1221
|
-
return `#${
|
|
1677
|
+
function wr(t, e, n) {
|
|
1678
|
+
const r = ht(t) || { r: 0, g: 0, b: 0 }, i = ht(e) || { r: 255, g: 255, b: 255 }, a = Math.round(i.r * n + r.r * (1 - n)), s = Math.round(i.g * n + r.g * (1 - n)), o = Math.round(i.b * n + r.b * (1 - n));
|
|
1679
|
+
return `#${Pt(a)}${Pt(s)}${Pt(o)}`;
|
|
1222
1680
|
}
|
|
1223
|
-
function
|
|
1681
|
+
function de(t, e) {
|
|
1224
1682
|
const n = { r: 255, g: 255, b: 255 }, r = Math.max(0, Math.min(1, e));
|
|
1225
|
-
let i = t,
|
|
1226
|
-
(isNaN(
|
|
1227
|
-
const
|
|
1228
|
-
...
|
|
1229
|
-
luminanceThreshold:
|
|
1683
|
+
let i = t, a = ht(t) || n;
|
|
1684
|
+
(isNaN(a.r) || isNaN(a.g) || isNaN(a.b)) && (a = n, i = "#FFFFFF");
|
|
1685
|
+
const o = Zt({
|
|
1686
|
+
...a,
|
|
1687
|
+
luminanceThreshold: Jt
|
|
1230
1688
|
}) ? "#000000" : "#FFFFFF";
|
|
1231
|
-
return
|
|
1689
|
+
return wr(i, o, r);
|
|
1232
1690
|
}
|
|
1233
|
-
function
|
|
1691
|
+
function Pt(t) {
|
|
1234
1692
|
return t.toString(16).padStart(2, "0").toUpperCase();
|
|
1235
1693
|
}
|
|
1236
|
-
const
|
|
1694
|
+
const Er = (t, e, n, r = Jt) => {
|
|
1237
1695
|
const i = {
|
|
1238
1696
|
"grey-text-dark": n["grey-text-dark"],
|
|
1239
1697
|
"grey-text-light": n["grey-text-light"],
|
|
@@ -1241,29 +1699,29 @@ const Xn = (t, e, n, r = $t) => {
|
|
|
1241
1699
|
"grey-ui-light": n["grey-ui-light"],
|
|
1242
1700
|
"primary-text": n["primary-text"]
|
|
1243
1701
|
};
|
|
1244
|
-
if (t
|
|
1245
|
-
const
|
|
1246
|
-
|
|
1702
|
+
if (t?.startsWith("#")) {
|
|
1703
|
+
const a = ht(t);
|
|
1704
|
+
a !== null && Object.assign(i, Sr(a));
|
|
1247
1705
|
}
|
|
1248
|
-
if (e
|
|
1249
|
-
const
|
|
1250
|
-
|
|
1706
|
+
if (e?.startsWith("#")) {
|
|
1707
|
+
const a = ht(e);
|
|
1708
|
+
a !== null && (i["primary-text"] = Zt({ ...a, luminanceThreshold: r }) ? "black" : "white");
|
|
1251
1709
|
}
|
|
1252
1710
|
return i;
|
|
1253
|
-
},
|
|
1254
|
-
"primary-hover":
|
|
1255
|
-
"primary-pressed":
|
|
1256
|
-
}),
|
|
1257
|
-
const r = Object.entries(t).map(([i,
|
|
1711
|
+
}, xr = (t) => ({
|
|
1712
|
+
"primary-hover": de(t, 0.1),
|
|
1713
|
+
"primary-pressed": de(t, 0.15)
|
|
1714
|
+
}), kr = (t, e) => t || e, Tr = (t, e, n) => {
|
|
1715
|
+
const r = Object.entries(t).map(([i, a]) => [
|
|
1258
1716
|
i,
|
|
1259
|
-
|
|
1260
|
-
n ? n[
|
|
1717
|
+
kr(
|
|
1718
|
+
n ? n[a] : null,
|
|
1261
1719
|
e[i]
|
|
1262
1720
|
)
|
|
1263
1721
|
]);
|
|
1264
1722
|
return Object.fromEntries(r);
|
|
1265
|
-
},
|
|
1266
|
-
const r =
|
|
1723
|
+
}, Ge = (t, e, n) => {
|
|
1724
|
+
const r = Tr(
|
|
1267
1725
|
t,
|
|
1268
1726
|
e,
|
|
1269
1727
|
n
|
|
@@ -1271,169 +1729,139 @@ const Xn = (t, e, n, r = $t) => {
|
|
|
1271
1729
|
return n ? {
|
|
1272
1730
|
...e,
|
|
1273
1731
|
...r,
|
|
1274
|
-
...
|
|
1732
|
+
...Er(
|
|
1275
1733
|
r.background,
|
|
1276
1734
|
r.primary,
|
|
1277
1735
|
e
|
|
1278
1736
|
),
|
|
1279
|
-
...
|
|
1737
|
+
...xr(r.primary)
|
|
1280
1738
|
} : { ...e };
|
|
1281
|
-
},
|
|
1282
|
-
|
|
1283
|
-
|
|
1739
|
+
}, Ar = (t) => Ge(
|
|
1740
|
+
mr,
|
|
1741
|
+
hr,
|
|
1284
1742
|
t
|
|
1285
|
-
),
|
|
1286
|
-
|
|
1287
|
-
|
|
1743
|
+
), Ke = (t) => Ge(
|
|
1744
|
+
gr,
|
|
1745
|
+
pr,
|
|
1288
1746
|
t
|
|
1289
|
-
),
|
|
1747
|
+
), Qt = (t) => {
|
|
1290
1748
|
if (!t)
|
|
1291
|
-
return
|
|
1749
|
+
return _e;
|
|
1292
1750
|
switch (t.shapes) {
|
|
1293
1751
|
case "rounded":
|
|
1294
|
-
return
|
|
1752
|
+
return Ye;
|
|
1295
1753
|
case "rectangle":
|
|
1296
|
-
return
|
|
1754
|
+
return br;
|
|
1297
1755
|
case "pill":
|
|
1298
|
-
return
|
|
1756
|
+
return yr;
|
|
1299
1757
|
default:
|
|
1300
|
-
return
|
|
1758
|
+
return _e;
|
|
1301
1759
|
}
|
|
1302
|
-
},
|
|
1303
|
-
const e =
|
|
1760
|
+
}, At = (t = "", e) => e.map(([n, r]) => `--rc-${t}-${n}: ${r}`).join("; "), Fr = (t) => {
|
|
1761
|
+
const e = At(
|
|
1304
1762
|
"color",
|
|
1305
|
-
Object.entries(
|
|
1306
|
-
), n =
|
|
1763
|
+
Object.entries(Ar(t))
|
|
1764
|
+
), n = At(
|
|
1307
1765
|
"shape",
|
|
1308
|
-
Object.entries(
|
|
1766
|
+
Object.entries(Qt(t))
|
|
1309
1767
|
);
|
|
1310
1768
|
return [e, n].join("; ");
|
|
1311
|
-
},
|
|
1312
|
-
const e =
|
|
1769
|
+
}, Ir = (t) => {
|
|
1770
|
+
const e = At(
|
|
1313
1771
|
"color",
|
|
1314
|
-
Object.entries(
|
|
1315
|
-
), n =
|
|
1772
|
+
Object.entries(Ke(t))
|
|
1773
|
+
), n = At(
|
|
1316
1774
|
"shape",
|
|
1317
|
-
Object.entries(
|
|
1775
|
+
Object.entries(Qt(t))
|
|
1318
1776
|
);
|
|
1319
1777
|
return [e, n].join("; ");
|
|
1320
|
-
},
|
|
1321
|
-
`--rc-${t}-${n}-desktop: normal normal ${r.fontWeight} ${r.fontSize}/${r.lineHeight} ${
|
|
1322
|
-
`--rc-${t}-${n}-mobile: normal normal ${i.fontWeight} ${i.fontSize}/${i.lineHeight} ${
|
|
1778
|
+
}, Or = (t = "", e) => Object.entries(e).flatMap(([n, { desktop: r, mobile: i }]) => [
|
|
1779
|
+
`--rc-${t}-${n}-desktop: normal normal ${r.fontWeight} ${r.fontSize}/${r.lineHeight} ${ce}`,
|
|
1780
|
+
`--rc-${t}-${n}-mobile: normal normal ${i.fontWeight} ${i.fontSize}/${i.lineHeight} ${ce}`,
|
|
1323
1781
|
`--rc-${t}-${n}-desktop-font-size: ${r.fontSize}`,
|
|
1324
1782
|
`--rc-${t}-${n}-mobile-font-size: ${i.fontSize}`
|
|
1325
|
-
]).join("; "),
|
|
1783
|
+
]).join("; "), Lr = (t = "", e) => Object.entries(e).map(
|
|
1326
1784
|
([n, { mobile: r, desktop: i }]) => `--rc-${t}-${n}-mobile: ${r}; --rc-${t}-${n}-desktop: ${i};`
|
|
1327
|
-
).join(" ")
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
desktop: "clamp(1.5rem, 9.44vw, 5rem)"
|
|
1331
|
-
},
|
|
1332
|
-
outerPaddingSmall: {
|
|
1333
|
-
mobile: "clamp(0.75rem, 4.2vw, 1rem)",
|
|
1334
|
-
desktop: "clamp(1.5rem, 9.44vw, 5rem)"
|
|
1335
|
-
},
|
|
1336
|
-
gapSmall: {
|
|
1337
|
-
mobile: "0.25rem",
|
|
1338
|
-
desktop: "0.375rem"
|
|
1339
|
-
},
|
|
1340
|
-
gapMedium: {
|
|
1341
|
-
mobile: "0.5rem",
|
|
1342
|
-
desktop: "0.75rem"
|
|
1343
|
-
},
|
|
1344
|
-
gapLarge: {
|
|
1345
|
-
mobile: "0.75rem",
|
|
1346
|
-
desktop: "0.75rem"
|
|
1347
|
-
},
|
|
1348
|
-
gapXLarge: {
|
|
1349
|
-
mobile: "1rem",
|
|
1350
|
-
desktop: "1.5rem"
|
|
1351
|
-
},
|
|
1352
|
-
gapXXLarge: {
|
|
1353
|
-
mobile: "1.25rem",
|
|
1354
|
-
desktop: "2.25rem"
|
|
1355
|
-
},
|
|
1356
|
-
gapXXXLarge: {
|
|
1357
|
-
mobile: "2.25rem",
|
|
1358
|
-
desktop: "4.5rem"
|
|
1359
|
-
},
|
|
1360
|
-
inputHeight: {
|
|
1361
|
-
mobile: "3rem",
|
|
1362
|
-
desktop: "3rem"
|
|
1363
|
-
},
|
|
1364
|
-
gapStripeElement: {
|
|
1365
|
-
mobile: "0.70rem",
|
|
1366
|
-
desktop: "1rem"
|
|
1367
|
-
}
|
|
1368
|
-
};
|
|
1369
|
-
class rr {
|
|
1785
|
+
).join(" ");
|
|
1786
|
+
class Dr {
|
|
1787
|
+
brandingAppearance;
|
|
1370
1788
|
constructor(e) {
|
|
1371
|
-
qt(this, "brandingAppearance");
|
|
1372
1789
|
e ? this.brandingAppearance = e : this.brandingAppearance = void 0;
|
|
1373
1790
|
}
|
|
1374
1791
|
get shape() {
|
|
1375
|
-
return
|
|
1792
|
+
return Qt(this.brandingAppearance);
|
|
1376
1793
|
}
|
|
1377
1794
|
get formColors() {
|
|
1378
|
-
return
|
|
1795
|
+
return Ke(this.brandingAppearance);
|
|
1379
1796
|
}
|
|
1380
1797
|
get formStyleVars() {
|
|
1381
|
-
return
|
|
1798
|
+
return Ir(this.brandingAppearance);
|
|
1382
1799
|
}
|
|
1383
1800
|
get productInfoStyleVars() {
|
|
1384
|
-
return
|
|
1801
|
+
return Fr(this.brandingAppearance);
|
|
1385
1802
|
}
|
|
1386
1803
|
get spacing() {
|
|
1387
|
-
return
|
|
1804
|
+
return dr;
|
|
1388
1805
|
}
|
|
1389
1806
|
get textStyles() {
|
|
1390
|
-
return
|
|
1807
|
+
return vr;
|
|
1391
1808
|
}
|
|
1392
1809
|
get textStyleVars() {
|
|
1393
|
-
return
|
|
1810
|
+
return Or("text", this.textStyles);
|
|
1394
1811
|
}
|
|
1395
1812
|
get spacingStyleVars() {
|
|
1396
|
-
return
|
|
1813
|
+
return Lr("spacing", this.spacing);
|
|
1397
1814
|
}
|
|
1398
1815
|
}
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1816
|
+
xn();
|
|
1817
|
+
var Nr = /* @__PURE__ */ Kt('<div class="rcb-processing svelte-1i80tfc"></div>');
|
|
1818
|
+
function Rr(t, e) {
|
|
1819
|
+
let n = _t(e, "size", 8, "medium");
|
|
1820
|
+
const r = {
|
|
1821
|
+
small: { width: "8px", offset: "10px" },
|
|
1822
|
+
medium: { width: "12px", offset: "20px" },
|
|
1823
|
+
large: { width: "16px", offset: "30px" }
|
|
1824
|
+
};
|
|
1825
|
+
var i = Nr();
|
|
1826
|
+
Gt(() => qe(i, `--shadow-offset: ${oe(n()), zt(() => r[n()].offset) ?? ""}; --width: ${oe(n()), zt(() => r[n()].width) ?? ""};`)), Tt(t, i);
|
|
1827
|
+
}
|
|
1828
|
+
var Pr = /* @__PURE__ */ Kt("<button><!></button>");
|
|
1829
|
+
function Mr(t, e) {
|
|
1830
|
+
kn(e, !0);
|
|
1831
|
+
const n = _t(e, "intent", 3, "primary"), r = _t(e, "disabled", 3, !1), i = _t(e, "loading", 3, !1), a = /* @__PURE__ */ tt(() => new Dr(e.brandingAppearance)), s = /* @__PURE__ */ tt(() => S(a).textStyleVars), o = /* @__PURE__ */ tt(() => S(a).spacingStyleVars), l = /* @__PURE__ */ tt(() => S(a).productInfoStyleVars), f = /* @__PURE__ */ tt(() => S(a).formStyleVars), u = /* @__PURE__ */ tt(() => [
|
|
1403
1832
|
e.styleOverrides,
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1833
|
+
S(s),
|
|
1834
|
+
S(o),
|
|
1835
|
+
S(l),
|
|
1836
|
+
S(f)
|
|
1408
1837
|
].join("; "));
|
|
1409
|
-
var
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
(y = e.onclick) == null || y.apply(this, m);
|
|
1838
|
+
var c = Pr();
|
|
1839
|
+
c.__click = function(...b) {
|
|
1840
|
+
e.onclick?.apply(this, b);
|
|
1413
1841
|
};
|
|
1414
|
-
var
|
|
1842
|
+
var v = Ie(c);
|
|
1415
1843
|
{
|
|
1416
|
-
var
|
|
1417
|
-
|
|
1418
|
-
},
|
|
1419
|
-
|
|
1844
|
+
var d = (b) => {
|
|
1845
|
+
Rr(b, { size: "small" });
|
|
1846
|
+
}, _ = (b) => {
|
|
1847
|
+
_r(b, {
|
|
1420
1848
|
size: "body-base",
|
|
1421
|
-
children: (
|
|
1422
|
-
var
|
|
1423
|
-
|
|
1849
|
+
children: (I, k) => {
|
|
1850
|
+
var N = nr(), g = jn(N);
|
|
1851
|
+
Ve(g, () => e.children ?? Ut), Tt(I, N);
|
|
1424
1852
|
},
|
|
1425
1853
|
$$slots: { default: !0 }
|
|
1426
1854
|
});
|
|
1427
1855
|
};
|
|
1428
|
-
|
|
1429
|
-
i() ?
|
|
1856
|
+
rr(v, (b) => {
|
|
1857
|
+
i() ? b(d) : b(_, !1);
|
|
1430
1858
|
});
|
|
1431
1859
|
}
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
}),
|
|
1860
|
+
Gt(() => {
|
|
1861
|
+
We(c, 1, `intent-${n()}`, "svelte-hnboq0"), c.disabled = r(), fe(c, "data-testid", e.testId), fe(c, "type", e.type), qe(c, S(u));
|
|
1862
|
+
}), Tt(t, c), Tn();
|
|
1435
1863
|
}
|
|
1436
|
-
|
|
1864
|
+
tr(["click"]);
|
|
1437
1865
|
export {
|
|
1438
|
-
|
|
1866
|
+
Mr as Button
|
|
1439
1867
|
};
|