@adartem/adlib-attributes 0.1.4 → 0.1.5
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/attributes.js +957 -1
- package/attributes.js.map +4 -4
- package/dist/chunk-IEGIKJKW.js +5776 -0
- package/dist/chunk-IEGIKJKW.js.map +7 -0
- package/dist/chunk-M2KO765Q.js +43 -0
- package/dist/chunk-M2KO765Q.js.map +7 -0
- package/dist/chunk-NS2GB4WB.js +63 -0
- package/dist/chunk-NS2GB4WB.js.map +7 -0
- package/dist/dist-46N2ZXQQ.js +80 -0
- package/dist/dist-46N2ZXQQ.js.map +7 -0
- package/dist/dist-4EIQOOMJ.js +331 -0
- package/dist/dist-4EIQOOMJ.js.map +7 -0
- package/dist/dist-6YSNCGWO.js +227 -0
- package/dist/dist-6YSNCGWO.js.map +7 -0
- package/dist/dist-7GSHUMRU.js +60 -0
- package/dist/dist-7GSHUMRU.js.map +7 -0
- package/dist/dist-ALT6N2V6.js +165 -0
- package/dist/dist-ALT6N2V6.js.map +7 -0
- package/dist/dist-BXD5YEF3.js +290 -0
- package/dist/dist-BXD5YEF3.js.map +7 -0
- package/dist/dist-D2J4YZM6.js +52 -0
- package/dist/dist-D2J4YZM6.js.map +7 -0
- package/dist/dist-D2X7FLMD.js +126 -0
- package/dist/dist-D2X7FLMD.js.map +7 -0
- package/dist/dist-DOOWCYTM.js +92 -0
- package/dist/dist-DOOWCYTM.js.map +7 -0
- package/dist/dist-GLBAV2CS.js +202 -0
- package/dist/dist-GLBAV2CS.js.map +7 -0
- package/dist/dist-GQHJZHTH.js +73 -0
- package/dist/dist-GQHJZHTH.js.map +7 -0
- package/dist/dist-H4ILPDRU.js +59 -0
- package/dist/dist-H4ILPDRU.js.map +7 -0
- package/dist/dist-IDJRFWAH.js +71 -0
- package/dist/dist-IDJRFWAH.js.map +7 -0
- package/dist/dist-KDCRSMGT.js +63 -0
- package/dist/dist-KDCRSMGT.js.map +7 -0
- package/dist/dist-KF5AKQ52.js +740 -0
- package/dist/dist-KF5AKQ52.js.map +7 -0
- package/dist/dist-KU26ZFEG.js +169 -0
- package/dist/dist-KU26ZFEG.js.map +7 -0
- package/dist/dist-M6QCD7TL.js +4281 -0
- package/dist/dist-M6QCD7TL.js.map +7 -0
- package/dist/dist-MBFKX56S.js +482 -0
- package/dist/dist-MBFKX56S.js.map +7 -0
- package/dist/dist-NOIPAOTU.js +131 -0
- package/dist/dist-NOIPAOTU.js.map +7 -0
- package/dist/dist-QPNIGMZA.js +33028 -0
- package/dist/dist-QPNIGMZA.js.map +7 -0
- package/dist/dist-RAOZ6VUA.js +14416 -0
- package/dist/dist-RAOZ6VUA.js.map +7 -0
- package/dist/dist-RQZGUXDL.js +102 -0
- package/dist/dist-RQZGUXDL.js.map +7 -0
- package/dist/dist-T4V65O5X.js +54 -0
- package/dist/dist-T4V65O5X.js.map +7 -0
- package/dist/dist-UFMW7V6T.js +317 -0
- package/dist/dist-UFMW7V6T.js.map +7 -0
- package/dist/dist-V7I3FQX7.js +1419 -0
- package/dist/dist-V7I3FQX7.js.map +7 -0
- package/dist/dist-XTGERRGU.js +160 -0
- package/dist/dist-XTGERRGU.js.map +7 -0
- package/dist/dist-YAVVMJ7W.js +72 -0
- package/dist/dist-YAVVMJ7W.js.map +7 -0
- package/dist/dist-YGJKGMK6.js +137 -0
- package/dist/dist-YGJKGMK6.js.map +7 -0
- package/package.json +11 -11
|
@@ -0,0 +1,4281 @@
|
|
|
1
|
+
import {
|
|
2
|
+
functionThrottle
|
|
3
|
+
} from "./chunk-NS2GB4WB.js";
|
|
4
|
+
import {
|
|
5
|
+
require_just_debounce
|
|
6
|
+
} from "./chunk-M2KO765Q.js";
|
|
7
|
+
import {
|
|
8
|
+
$o,
|
|
9
|
+
$t,
|
|
10
|
+
A,
|
|
11
|
+
Bt,
|
|
12
|
+
Dn,
|
|
13
|
+
Do,
|
|
14
|
+
Dt,
|
|
15
|
+
F,
|
|
16
|
+
Fn,
|
|
17
|
+
Ft,
|
|
18
|
+
Ht,
|
|
19
|
+
Jo,
|
|
20
|
+
K,
|
|
21
|
+
Kn,
|
|
22
|
+
Mn,
|
|
23
|
+
Mo,
|
|
24
|
+
Nt,
|
|
25
|
+
Po,
|
|
26
|
+
Qt,
|
|
27
|
+
Sn,
|
|
28
|
+
Un,
|
|
29
|
+
Vo,
|
|
30
|
+
Wt,
|
|
31
|
+
Xt,
|
|
32
|
+
Yo,
|
|
33
|
+
Yt,
|
|
34
|
+
__commonJS,
|
|
35
|
+
__toESM,
|
|
36
|
+
_n,
|
|
37
|
+
be,
|
|
38
|
+
ce,
|
|
39
|
+
co,
|
|
40
|
+
gt,
|
|
41
|
+
ie,
|
|
42
|
+
init_live_reload,
|
|
43
|
+
j,
|
|
44
|
+
jo,
|
|
45
|
+
kn,
|
|
46
|
+
on,
|
|
47
|
+
q,
|
|
48
|
+
qo,
|
|
49
|
+
rn,
|
|
50
|
+
rr,
|
|
51
|
+
sn,
|
|
52
|
+
tn,
|
|
53
|
+
tr,
|
|
54
|
+
uo,
|
|
55
|
+
vn,
|
|
56
|
+
vo,
|
|
57
|
+
vt,
|
|
58
|
+
wn,
|
|
59
|
+
xn,
|
|
60
|
+
zo
|
|
61
|
+
} from "./chunk-IEGIKJKW.js";
|
|
62
|
+
|
|
63
|
+
// ../../node_modules/fuzzysort/fuzzysort.js
|
|
64
|
+
var require_fuzzysort = __commonJS({
|
|
65
|
+
"../../node_modules/fuzzysort/fuzzysort.js"(exports, module) {
|
|
66
|
+
init_live_reload();
|
|
67
|
+
((root, UMD) => {
|
|
68
|
+
if (typeof define === "function" && define.amd) define([], UMD);
|
|
69
|
+
else if (typeof module === "object" && module.exports) module.exports = UMD();
|
|
70
|
+
else root["fuzzysort"] = UMD();
|
|
71
|
+
})(exports, (_2) => {
|
|
72
|
+
"use strict";
|
|
73
|
+
var single = (search, target) => {
|
|
74
|
+
if (!search || !target) return NULL;
|
|
75
|
+
var preparedSearch = getPreparedSearch(search);
|
|
76
|
+
if (!isPrepared(target)) target = getPrepared(target);
|
|
77
|
+
var searchBitflags = preparedSearch.bitflags;
|
|
78
|
+
if ((searchBitflags & target._bitflags) !== searchBitflags) return NULL;
|
|
79
|
+
return algorithm(preparedSearch, target);
|
|
80
|
+
};
|
|
81
|
+
var go2 = (search, targets, options) => {
|
|
82
|
+
if (!search) return options?.all ? all(targets, options) : noResults;
|
|
83
|
+
var preparedSearch = getPreparedSearch(search);
|
|
84
|
+
var searchBitflags = preparedSearch.bitflags;
|
|
85
|
+
var containsSpace = preparedSearch.containsSpace;
|
|
86
|
+
var threshold = denormalizeScore(options?.threshold || 0);
|
|
87
|
+
var limit = options?.limit || INFINITY;
|
|
88
|
+
var resultsLen = 0;
|
|
89
|
+
var limitedCount = 0;
|
|
90
|
+
var targetsLen = targets.length;
|
|
91
|
+
function push_result(result2) {
|
|
92
|
+
if (resultsLen < limit) {
|
|
93
|
+
q3.add(result2);
|
|
94
|
+
++resultsLen;
|
|
95
|
+
} else {
|
|
96
|
+
++limitedCount;
|
|
97
|
+
if (result2._score > q3.peek()._score) q3.replaceTop(result2);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
if (options?.key) {
|
|
101
|
+
var key = options.key;
|
|
102
|
+
for (var i = 0; i < targetsLen; ++i) {
|
|
103
|
+
var obj = targets[i];
|
|
104
|
+
var target = getValue(obj, key);
|
|
105
|
+
if (!target) continue;
|
|
106
|
+
if (!isPrepared(target)) target = getPrepared(target);
|
|
107
|
+
if ((searchBitflags & target._bitflags) !== searchBitflags) continue;
|
|
108
|
+
var result = algorithm(preparedSearch, target);
|
|
109
|
+
if (result === NULL) continue;
|
|
110
|
+
if (result._score < threshold) continue;
|
|
111
|
+
result.obj = obj;
|
|
112
|
+
push_result(result);
|
|
113
|
+
}
|
|
114
|
+
} else if (options?.keys) {
|
|
115
|
+
var keys = options.keys;
|
|
116
|
+
var keysLen = keys.length;
|
|
117
|
+
outer: for (var i = 0; i < targetsLen; ++i) {
|
|
118
|
+
var obj = targets[i];
|
|
119
|
+
{
|
|
120
|
+
var keysBitflags = 0;
|
|
121
|
+
for (var keyI = 0; keyI < keysLen; ++keyI) {
|
|
122
|
+
var key = keys[keyI];
|
|
123
|
+
var target = getValue(obj, key);
|
|
124
|
+
if (!target) {
|
|
125
|
+
tmpTargets[keyI] = noTarget;
|
|
126
|
+
continue;
|
|
127
|
+
}
|
|
128
|
+
if (!isPrepared(target)) target = getPrepared(target);
|
|
129
|
+
tmpTargets[keyI] = target;
|
|
130
|
+
keysBitflags |= target._bitflags;
|
|
131
|
+
}
|
|
132
|
+
if ((searchBitflags & keysBitflags) !== searchBitflags) continue;
|
|
133
|
+
}
|
|
134
|
+
if (containsSpace) for (let i2 = 0; i2 < preparedSearch.spaceSearches.length; i2++) keysSpacesBestScores[i2] = NEGATIVE_INFINITY;
|
|
135
|
+
for (var keyI = 0; keyI < keysLen; ++keyI) {
|
|
136
|
+
target = tmpTargets[keyI];
|
|
137
|
+
if (target === noTarget) {
|
|
138
|
+
tmpResults[keyI] = noTarget;
|
|
139
|
+
continue;
|
|
140
|
+
}
|
|
141
|
+
tmpResults[keyI] = algorithm(
|
|
142
|
+
preparedSearch,
|
|
143
|
+
target,
|
|
144
|
+
/*allowSpaces=*/
|
|
145
|
+
false,
|
|
146
|
+
/*allowPartialMatch=*/
|
|
147
|
+
containsSpace
|
|
148
|
+
);
|
|
149
|
+
if (tmpResults[keyI] === NULL) {
|
|
150
|
+
tmpResults[keyI] = noTarget;
|
|
151
|
+
continue;
|
|
152
|
+
}
|
|
153
|
+
if (containsSpace) for (let i2 = 0; i2 < preparedSearch.spaceSearches.length; i2++) {
|
|
154
|
+
if (allowPartialMatchScores[i2] > -1e3) {
|
|
155
|
+
if (keysSpacesBestScores[i2] > NEGATIVE_INFINITY) {
|
|
156
|
+
var tmp = (keysSpacesBestScores[i2] + allowPartialMatchScores[i2]) / 4;
|
|
157
|
+
if (tmp > keysSpacesBestScores[i2]) keysSpacesBestScores[i2] = tmp;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
if (allowPartialMatchScores[i2] > keysSpacesBestScores[i2]) keysSpacesBestScores[i2] = allowPartialMatchScores[i2];
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
if (containsSpace) {
|
|
164
|
+
for (let i2 = 0; i2 < preparedSearch.spaceSearches.length; i2++) {
|
|
165
|
+
if (keysSpacesBestScores[i2] === NEGATIVE_INFINITY) continue outer;
|
|
166
|
+
}
|
|
167
|
+
} else {
|
|
168
|
+
var hasAtLeast1Match = false;
|
|
169
|
+
for (let i2 = 0; i2 < keysLen; i2++) {
|
|
170
|
+
if (tmpResults[i2]._score !== NEGATIVE_INFINITY) {
|
|
171
|
+
hasAtLeast1Match = true;
|
|
172
|
+
break;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
if (!hasAtLeast1Match) continue;
|
|
176
|
+
}
|
|
177
|
+
var objResults = new KeysResult(keysLen);
|
|
178
|
+
for (let i2 = 0; i2 < keysLen; i2++) {
|
|
179
|
+
objResults[i2] = tmpResults[i2];
|
|
180
|
+
}
|
|
181
|
+
if (containsSpace) {
|
|
182
|
+
var score = 0;
|
|
183
|
+
for (let i2 = 0; i2 < preparedSearch.spaceSearches.length; i2++) score += keysSpacesBestScores[i2];
|
|
184
|
+
} else {
|
|
185
|
+
var score = NEGATIVE_INFINITY;
|
|
186
|
+
for (let i2 = 0; i2 < keysLen; i2++) {
|
|
187
|
+
var result = objResults[i2];
|
|
188
|
+
if (result._score > -1e3) {
|
|
189
|
+
if (score > NEGATIVE_INFINITY) {
|
|
190
|
+
var tmp = (score + result._score) / 4;
|
|
191
|
+
if (tmp > score) score = tmp;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
if (result._score > score) score = result._score;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
objResults.obj = obj;
|
|
198
|
+
objResults._score = score;
|
|
199
|
+
if (options?.scoreFn) {
|
|
200
|
+
score = options.scoreFn(objResults);
|
|
201
|
+
if (!score) continue;
|
|
202
|
+
score = denormalizeScore(score);
|
|
203
|
+
objResults._score = score;
|
|
204
|
+
}
|
|
205
|
+
if (score < threshold) continue;
|
|
206
|
+
push_result(objResults);
|
|
207
|
+
}
|
|
208
|
+
} else {
|
|
209
|
+
for (var i = 0; i < targetsLen; ++i) {
|
|
210
|
+
var target = targets[i];
|
|
211
|
+
if (!target) continue;
|
|
212
|
+
if (!isPrepared(target)) target = getPrepared(target);
|
|
213
|
+
if ((searchBitflags & target._bitflags) !== searchBitflags) continue;
|
|
214
|
+
var result = algorithm(preparedSearch, target);
|
|
215
|
+
if (result === NULL) continue;
|
|
216
|
+
if (result._score < threshold) continue;
|
|
217
|
+
push_result(result);
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
if (resultsLen === 0) return noResults;
|
|
221
|
+
var results = new Array(resultsLen);
|
|
222
|
+
for (var i = resultsLen - 1; i >= 0; --i) results[i] = q3.poll();
|
|
223
|
+
results.total = resultsLen + limitedCount;
|
|
224
|
+
return results;
|
|
225
|
+
};
|
|
226
|
+
var highlight = (result, open = "<b>", close = "</b>") => {
|
|
227
|
+
var callback = typeof open === "function" ? open : void 0;
|
|
228
|
+
var target = result.target;
|
|
229
|
+
var targetLen = target.length;
|
|
230
|
+
var indexes = result.indexes;
|
|
231
|
+
var highlighted = "";
|
|
232
|
+
var matchI = 0;
|
|
233
|
+
var indexesI = 0;
|
|
234
|
+
var opened = false;
|
|
235
|
+
var parts = [];
|
|
236
|
+
for (var i = 0; i < targetLen; ++i) {
|
|
237
|
+
var char = target[i];
|
|
238
|
+
if (indexes[indexesI] === i) {
|
|
239
|
+
++indexesI;
|
|
240
|
+
if (!opened) {
|
|
241
|
+
opened = true;
|
|
242
|
+
if (callback) {
|
|
243
|
+
parts.push(highlighted);
|
|
244
|
+
highlighted = "";
|
|
245
|
+
} else {
|
|
246
|
+
highlighted += open;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
if (indexesI === indexes.length) {
|
|
250
|
+
if (callback) {
|
|
251
|
+
highlighted += char;
|
|
252
|
+
parts.push(callback(highlighted, matchI++));
|
|
253
|
+
highlighted = "";
|
|
254
|
+
parts.push(target.substr(i + 1));
|
|
255
|
+
} else {
|
|
256
|
+
highlighted += char + close + target.substr(i + 1);
|
|
257
|
+
}
|
|
258
|
+
break;
|
|
259
|
+
}
|
|
260
|
+
} else {
|
|
261
|
+
if (opened) {
|
|
262
|
+
opened = false;
|
|
263
|
+
if (callback) {
|
|
264
|
+
parts.push(callback(highlighted, matchI++));
|
|
265
|
+
highlighted = "";
|
|
266
|
+
} else {
|
|
267
|
+
highlighted += close;
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
highlighted += char;
|
|
272
|
+
}
|
|
273
|
+
return callback ? parts : highlighted;
|
|
274
|
+
};
|
|
275
|
+
var prepare = (target) => {
|
|
276
|
+
if (typeof target === "number") target = "" + target;
|
|
277
|
+
else if (typeof target !== "string") target = "";
|
|
278
|
+
var info = prepareLowerInfo(target);
|
|
279
|
+
return new_result(target, { _targetLower: info._lower, _targetLowerCodes: info.lowerCodes, _bitflags: info.bitflags });
|
|
280
|
+
};
|
|
281
|
+
var cleanup = () => {
|
|
282
|
+
preparedCache.clear();
|
|
283
|
+
preparedSearchCache.clear();
|
|
284
|
+
};
|
|
285
|
+
class Result {
|
|
286
|
+
get ["indexes"]() {
|
|
287
|
+
return this._indexes.slice(0, this._indexes.len).sort((a, b) => a - b);
|
|
288
|
+
}
|
|
289
|
+
set ["indexes"](indexes) {
|
|
290
|
+
return this._indexes = indexes;
|
|
291
|
+
}
|
|
292
|
+
["highlight"](open, close) {
|
|
293
|
+
return highlight(this, open, close);
|
|
294
|
+
}
|
|
295
|
+
get ["score"]() {
|
|
296
|
+
return normalizeScore(this._score);
|
|
297
|
+
}
|
|
298
|
+
set ["score"](score) {
|
|
299
|
+
this._score = denormalizeScore(score);
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
class KeysResult extends Array {
|
|
303
|
+
get ["score"]() {
|
|
304
|
+
return normalizeScore(this._score);
|
|
305
|
+
}
|
|
306
|
+
set ["score"](score) {
|
|
307
|
+
this._score = denormalizeScore(score);
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
var new_result = (target, options) => {
|
|
311
|
+
const result = new Result();
|
|
312
|
+
result["target"] = target;
|
|
313
|
+
result["obj"] = options.obj ?? NULL;
|
|
314
|
+
result._score = options._score ?? NEGATIVE_INFINITY;
|
|
315
|
+
result._indexes = options._indexes ?? [];
|
|
316
|
+
result._targetLower = options._targetLower ?? "";
|
|
317
|
+
result._targetLowerCodes = options._targetLowerCodes ?? NULL;
|
|
318
|
+
result._nextBeginningIndexes = options._nextBeginningIndexes ?? NULL;
|
|
319
|
+
result._bitflags = options._bitflags ?? 0;
|
|
320
|
+
return result;
|
|
321
|
+
};
|
|
322
|
+
var normalizeScore = (score) => {
|
|
323
|
+
if (score === NEGATIVE_INFINITY) return 0;
|
|
324
|
+
if (score > 1) return score;
|
|
325
|
+
return Math.E ** (((-score + 1) ** 0.04307 - 1) * -2);
|
|
326
|
+
};
|
|
327
|
+
var denormalizeScore = (normalizedScore) => {
|
|
328
|
+
if (normalizedScore === 0) return NEGATIVE_INFINITY;
|
|
329
|
+
if (normalizedScore > 1) return normalizedScore;
|
|
330
|
+
return 1 - Math.pow(Math.log(normalizedScore) / -2 + 1, 1 / 0.04307);
|
|
331
|
+
};
|
|
332
|
+
var prepareSearch = (search) => {
|
|
333
|
+
if (typeof search === "number") search = "" + search;
|
|
334
|
+
else if (typeof search !== "string") search = "";
|
|
335
|
+
search = search.trim();
|
|
336
|
+
var info = prepareLowerInfo(search);
|
|
337
|
+
var spaceSearches = [];
|
|
338
|
+
if (info.containsSpace) {
|
|
339
|
+
var searches = search.split(/\s+/);
|
|
340
|
+
searches = [...new Set(searches)];
|
|
341
|
+
for (var i = 0; i < searches.length; i++) {
|
|
342
|
+
if (searches[i] === "") continue;
|
|
343
|
+
var _info = prepareLowerInfo(searches[i]);
|
|
344
|
+
spaceSearches.push({ lowerCodes: _info.lowerCodes, _lower: searches[i].toLowerCase(), containsSpace: false });
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
return { lowerCodes: info.lowerCodes, _lower: info._lower, containsSpace: info.containsSpace, bitflags: info.bitflags, spaceSearches };
|
|
348
|
+
};
|
|
349
|
+
var getPrepared = (target) => {
|
|
350
|
+
if (target.length > 999) return prepare(target);
|
|
351
|
+
var targetPrepared = preparedCache.get(target);
|
|
352
|
+
if (targetPrepared !== void 0) return targetPrepared;
|
|
353
|
+
targetPrepared = prepare(target);
|
|
354
|
+
preparedCache.set(target, targetPrepared);
|
|
355
|
+
return targetPrepared;
|
|
356
|
+
};
|
|
357
|
+
var getPreparedSearch = (search) => {
|
|
358
|
+
if (search.length > 999) return prepareSearch(search);
|
|
359
|
+
var searchPrepared = preparedSearchCache.get(search);
|
|
360
|
+
if (searchPrepared !== void 0) return searchPrepared;
|
|
361
|
+
searchPrepared = prepareSearch(search);
|
|
362
|
+
preparedSearchCache.set(search, searchPrepared);
|
|
363
|
+
return searchPrepared;
|
|
364
|
+
};
|
|
365
|
+
var all = (targets, options) => {
|
|
366
|
+
var results = [];
|
|
367
|
+
results.total = targets.length;
|
|
368
|
+
var limit = options?.limit || INFINITY;
|
|
369
|
+
if (options?.key) {
|
|
370
|
+
for (var i = 0; i < targets.length; i++) {
|
|
371
|
+
var obj = targets[i];
|
|
372
|
+
var target = getValue(obj, options.key);
|
|
373
|
+
if (target == NULL) continue;
|
|
374
|
+
if (!isPrepared(target)) target = getPrepared(target);
|
|
375
|
+
var result = new_result(target.target, { _score: target._score, obj });
|
|
376
|
+
results.push(result);
|
|
377
|
+
if (results.length >= limit) return results;
|
|
378
|
+
}
|
|
379
|
+
} else if (options?.keys) {
|
|
380
|
+
for (var i = 0; i < targets.length; i++) {
|
|
381
|
+
var obj = targets[i];
|
|
382
|
+
var objResults = new KeysResult(options.keys.length);
|
|
383
|
+
for (var keyI = options.keys.length - 1; keyI >= 0; --keyI) {
|
|
384
|
+
var target = getValue(obj, options.keys[keyI]);
|
|
385
|
+
if (!target) {
|
|
386
|
+
objResults[keyI] = noTarget;
|
|
387
|
+
continue;
|
|
388
|
+
}
|
|
389
|
+
if (!isPrepared(target)) target = getPrepared(target);
|
|
390
|
+
target._score = NEGATIVE_INFINITY;
|
|
391
|
+
target._indexes.len = 0;
|
|
392
|
+
objResults[keyI] = target;
|
|
393
|
+
}
|
|
394
|
+
objResults.obj = obj;
|
|
395
|
+
objResults._score = NEGATIVE_INFINITY;
|
|
396
|
+
results.push(objResults);
|
|
397
|
+
if (results.length >= limit) return results;
|
|
398
|
+
}
|
|
399
|
+
} else {
|
|
400
|
+
for (var i = 0; i < targets.length; i++) {
|
|
401
|
+
var target = targets[i];
|
|
402
|
+
if (target == NULL) continue;
|
|
403
|
+
if (!isPrepared(target)) target = getPrepared(target);
|
|
404
|
+
target._score = NEGATIVE_INFINITY;
|
|
405
|
+
target._indexes.len = 0;
|
|
406
|
+
results.push(target);
|
|
407
|
+
if (results.length >= limit) return results;
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
return results;
|
|
411
|
+
};
|
|
412
|
+
var algorithm = (preparedSearch, prepared, allowSpaces = false, allowPartialMatch = false) => {
|
|
413
|
+
if (allowSpaces === false && preparedSearch.containsSpace) return algorithmSpaces(preparedSearch, prepared, allowPartialMatch);
|
|
414
|
+
var searchLower = preparedSearch._lower;
|
|
415
|
+
var searchLowerCodes = preparedSearch.lowerCodes;
|
|
416
|
+
var searchLowerCode = searchLowerCodes[0];
|
|
417
|
+
var targetLowerCodes = prepared._targetLowerCodes;
|
|
418
|
+
var searchLen = searchLowerCodes.length;
|
|
419
|
+
var targetLen = targetLowerCodes.length;
|
|
420
|
+
var searchI = 0;
|
|
421
|
+
var targetI = 0;
|
|
422
|
+
var matchesSimpleLen = 0;
|
|
423
|
+
for (; ; ) {
|
|
424
|
+
var isMatch = searchLowerCode === targetLowerCodes[targetI];
|
|
425
|
+
if (isMatch) {
|
|
426
|
+
matchesSimple[matchesSimpleLen++] = targetI;
|
|
427
|
+
++searchI;
|
|
428
|
+
if (searchI === searchLen) break;
|
|
429
|
+
searchLowerCode = searchLowerCodes[searchI];
|
|
430
|
+
}
|
|
431
|
+
++targetI;
|
|
432
|
+
if (targetI >= targetLen) return NULL;
|
|
433
|
+
}
|
|
434
|
+
var searchI = 0;
|
|
435
|
+
var successStrict = false;
|
|
436
|
+
var matchesStrictLen = 0;
|
|
437
|
+
var nextBeginningIndexes = prepared._nextBeginningIndexes;
|
|
438
|
+
if (nextBeginningIndexes === NULL) nextBeginningIndexes = prepared._nextBeginningIndexes = prepareNextBeginningIndexes(prepared.target);
|
|
439
|
+
targetI = matchesSimple[0] === 0 ? 0 : nextBeginningIndexes[matchesSimple[0] - 1];
|
|
440
|
+
var backtrackCount = 0;
|
|
441
|
+
if (targetI !== targetLen) for (; ; ) {
|
|
442
|
+
if (targetI >= targetLen) {
|
|
443
|
+
if (searchI <= 0) break;
|
|
444
|
+
++backtrackCount;
|
|
445
|
+
if (backtrackCount > 200) break;
|
|
446
|
+
--searchI;
|
|
447
|
+
var lastMatch = matchesStrict[--matchesStrictLen];
|
|
448
|
+
targetI = nextBeginningIndexes[lastMatch];
|
|
449
|
+
} else {
|
|
450
|
+
var isMatch = searchLowerCodes[searchI] === targetLowerCodes[targetI];
|
|
451
|
+
if (isMatch) {
|
|
452
|
+
matchesStrict[matchesStrictLen++] = targetI;
|
|
453
|
+
++searchI;
|
|
454
|
+
if (searchI === searchLen) {
|
|
455
|
+
successStrict = true;
|
|
456
|
+
break;
|
|
457
|
+
}
|
|
458
|
+
++targetI;
|
|
459
|
+
} else {
|
|
460
|
+
targetI = nextBeginningIndexes[targetI];
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
var substringIndex = searchLen <= 1 ? -1 : prepared._targetLower.indexOf(searchLower, matchesSimple[0]);
|
|
465
|
+
var isSubstring = !!~substringIndex;
|
|
466
|
+
var isSubstringBeginning = !isSubstring ? false : substringIndex === 0 || prepared._nextBeginningIndexes[substringIndex - 1] === substringIndex;
|
|
467
|
+
if (isSubstring && !isSubstringBeginning) {
|
|
468
|
+
for (var i = 0; i < nextBeginningIndexes.length; i = nextBeginningIndexes[i]) {
|
|
469
|
+
if (i <= substringIndex) continue;
|
|
470
|
+
for (var s = 0; s < searchLen; s++) if (searchLowerCodes[s] !== prepared._targetLowerCodes[i + s]) break;
|
|
471
|
+
if (s === searchLen) {
|
|
472
|
+
substringIndex = i;
|
|
473
|
+
isSubstringBeginning = true;
|
|
474
|
+
break;
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
var calculateScore = (matches) => {
|
|
479
|
+
var score2 = 0;
|
|
480
|
+
var extraMatchGroupCount = 0;
|
|
481
|
+
for (var i2 = 1; i2 < searchLen; ++i2) {
|
|
482
|
+
if (matches[i2] - matches[i2 - 1] !== 1) {
|
|
483
|
+
score2 -= matches[i2];
|
|
484
|
+
++extraMatchGroupCount;
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
var unmatchedDistance = matches[searchLen - 1] - matches[0] - (searchLen - 1);
|
|
488
|
+
score2 -= (12 + unmatchedDistance) * extraMatchGroupCount;
|
|
489
|
+
if (matches[0] !== 0) score2 -= matches[0] * matches[0] * 0.2;
|
|
490
|
+
if (!successStrict) {
|
|
491
|
+
score2 *= 1e3;
|
|
492
|
+
} else {
|
|
493
|
+
var uniqueBeginningIndexes = 1;
|
|
494
|
+
for (var i2 = nextBeginningIndexes[0]; i2 < targetLen; i2 = nextBeginningIndexes[i2]) ++uniqueBeginningIndexes;
|
|
495
|
+
if (uniqueBeginningIndexes > 24) score2 *= (uniqueBeginningIndexes - 24) * 10;
|
|
496
|
+
}
|
|
497
|
+
score2 -= (targetLen - searchLen) / 2;
|
|
498
|
+
if (isSubstring) score2 /= 1 + searchLen * searchLen * 1;
|
|
499
|
+
if (isSubstringBeginning) score2 /= 1 + searchLen * searchLen * 1;
|
|
500
|
+
score2 -= (targetLen - searchLen) / 2;
|
|
501
|
+
return score2;
|
|
502
|
+
};
|
|
503
|
+
if (!successStrict) {
|
|
504
|
+
if (isSubstring) for (var i = 0; i < searchLen; ++i) matchesSimple[i] = substringIndex + i;
|
|
505
|
+
var matchesBest = matchesSimple;
|
|
506
|
+
var score = calculateScore(matchesBest);
|
|
507
|
+
} else {
|
|
508
|
+
if (isSubstringBeginning) {
|
|
509
|
+
for (var i = 0; i < searchLen; ++i) matchesSimple[i] = substringIndex + i;
|
|
510
|
+
var matchesBest = matchesSimple;
|
|
511
|
+
var score = calculateScore(matchesSimple);
|
|
512
|
+
} else {
|
|
513
|
+
var matchesBest = matchesStrict;
|
|
514
|
+
var score = calculateScore(matchesStrict);
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
prepared._score = score;
|
|
518
|
+
for (var i = 0; i < searchLen; ++i) prepared._indexes[i] = matchesBest[i];
|
|
519
|
+
prepared._indexes.len = searchLen;
|
|
520
|
+
const result = new Result();
|
|
521
|
+
result.target = prepared.target;
|
|
522
|
+
result._score = prepared._score;
|
|
523
|
+
result._indexes = prepared._indexes;
|
|
524
|
+
return result;
|
|
525
|
+
};
|
|
526
|
+
var algorithmSpaces = (preparedSearch, target, allowPartialMatch) => {
|
|
527
|
+
var seen_indexes = /* @__PURE__ */ new Set();
|
|
528
|
+
var score = 0;
|
|
529
|
+
var result = NULL;
|
|
530
|
+
var first_seen_index_last_search = 0;
|
|
531
|
+
var searches = preparedSearch.spaceSearches;
|
|
532
|
+
var searchesLen = searches.length;
|
|
533
|
+
var changeslen = 0;
|
|
534
|
+
var resetNextBeginningIndexes = () => {
|
|
535
|
+
for (let i2 = changeslen - 1; i2 >= 0; i2--) target._nextBeginningIndexes[nextBeginningIndexesChanges[i2 * 2 + 0]] = nextBeginningIndexesChanges[i2 * 2 + 1];
|
|
536
|
+
};
|
|
537
|
+
var hasAtLeast1Match = false;
|
|
538
|
+
for (var i = 0; i < searchesLen; ++i) {
|
|
539
|
+
allowPartialMatchScores[i] = NEGATIVE_INFINITY;
|
|
540
|
+
var search = searches[i];
|
|
541
|
+
result = algorithm(search, target);
|
|
542
|
+
if (allowPartialMatch) {
|
|
543
|
+
if (result === NULL) continue;
|
|
544
|
+
hasAtLeast1Match = true;
|
|
545
|
+
} else {
|
|
546
|
+
if (result === NULL) {
|
|
547
|
+
resetNextBeginningIndexes();
|
|
548
|
+
return NULL;
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
var isTheLastSearch = i === searchesLen - 1;
|
|
552
|
+
if (!isTheLastSearch) {
|
|
553
|
+
var indexes = result._indexes;
|
|
554
|
+
var indexesIsConsecutiveSubstring = true;
|
|
555
|
+
for (let i2 = 0; i2 < indexes.len - 1; i2++) {
|
|
556
|
+
if (indexes[i2 + 1] - indexes[i2] !== 1) {
|
|
557
|
+
indexesIsConsecutiveSubstring = false;
|
|
558
|
+
break;
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
if (indexesIsConsecutiveSubstring) {
|
|
562
|
+
var newBeginningIndex = indexes[indexes.len - 1] + 1;
|
|
563
|
+
var toReplace = target._nextBeginningIndexes[newBeginningIndex - 1];
|
|
564
|
+
for (let i2 = newBeginningIndex - 1; i2 >= 0; i2--) {
|
|
565
|
+
if (toReplace !== target._nextBeginningIndexes[i2]) break;
|
|
566
|
+
target._nextBeginningIndexes[i2] = newBeginningIndex;
|
|
567
|
+
nextBeginningIndexesChanges[changeslen * 2 + 0] = i2;
|
|
568
|
+
nextBeginningIndexesChanges[changeslen * 2 + 1] = toReplace;
|
|
569
|
+
changeslen++;
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
score += result._score / searchesLen;
|
|
574
|
+
allowPartialMatchScores[i] = result._score / searchesLen;
|
|
575
|
+
if (result._indexes[0] < first_seen_index_last_search) {
|
|
576
|
+
score -= (first_seen_index_last_search - result._indexes[0]) * 2;
|
|
577
|
+
}
|
|
578
|
+
first_seen_index_last_search = result._indexes[0];
|
|
579
|
+
for (var j3 = 0; j3 < result._indexes.len; ++j3) seen_indexes.add(result._indexes[j3]);
|
|
580
|
+
}
|
|
581
|
+
if (allowPartialMatch && !hasAtLeast1Match) return NULL;
|
|
582
|
+
resetNextBeginningIndexes();
|
|
583
|
+
var allowSpacesResult = algorithm(
|
|
584
|
+
preparedSearch,
|
|
585
|
+
target,
|
|
586
|
+
/*allowSpaces=*/
|
|
587
|
+
true
|
|
588
|
+
);
|
|
589
|
+
if (allowSpacesResult !== NULL && allowSpacesResult._score > score) {
|
|
590
|
+
if (allowPartialMatch) {
|
|
591
|
+
for (var i = 0; i < searchesLen; ++i) {
|
|
592
|
+
allowPartialMatchScores[i] = allowSpacesResult._score / searchesLen;
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
return allowSpacesResult;
|
|
596
|
+
}
|
|
597
|
+
if (allowPartialMatch) result = target;
|
|
598
|
+
result._score = score;
|
|
599
|
+
var i = 0;
|
|
600
|
+
for (let index of seen_indexes) result._indexes[i++] = index;
|
|
601
|
+
result._indexes.len = i;
|
|
602
|
+
return result;
|
|
603
|
+
};
|
|
604
|
+
var remove_accents = (str) => str.replace(/\p{Script=Latin}+/gu, (match) => match.normalize("NFD")).replace(/[\u0300-\u036f]/g, "");
|
|
605
|
+
var prepareLowerInfo = (str) => {
|
|
606
|
+
str = remove_accents(str);
|
|
607
|
+
var strLen = str.length;
|
|
608
|
+
var lower = str.toLowerCase();
|
|
609
|
+
var lowerCodes = [];
|
|
610
|
+
var bitflags = 0;
|
|
611
|
+
var containsSpace = false;
|
|
612
|
+
for (var i = 0; i < strLen; ++i) {
|
|
613
|
+
var lowerCode = lowerCodes[i] = lower.charCodeAt(i);
|
|
614
|
+
if (lowerCode === 32) {
|
|
615
|
+
containsSpace = true;
|
|
616
|
+
continue;
|
|
617
|
+
}
|
|
618
|
+
var bit = lowerCode >= 97 && lowerCode <= 122 ? lowerCode - 97 : lowerCode >= 48 && lowerCode <= 57 ? 26 : lowerCode <= 127 ? 30 : 31;
|
|
619
|
+
bitflags |= 1 << bit;
|
|
620
|
+
}
|
|
621
|
+
return { lowerCodes, bitflags, containsSpace, _lower: lower };
|
|
622
|
+
};
|
|
623
|
+
var prepareBeginningIndexes = (target) => {
|
|
624
|
+
var targetLen = target.length;
|
|
625
|
+
var beginningIndexes = [];
|
|
626
|
+
var beginningIndexesLen = 0;
|
|
627
|
+
var wasUpper = false;
|
|
628
|
+
var wasAlphanum = false;
|
|
629
|
+
for (var i = 0; i < targetLen; ++i) {
|
|
630
|
+
var targetCode = target.charCodeAt(i);
|
|
631
|
+
var isUpper = targetCode >= 65 && targetCode <= 90;
|
|
632
|
+
var isAlphanum = isUpper || targetCode >= 97 && targetCode <= 122 || targetCode >= 48 && targetCode <= 57;
|
|
633
|
+
var isBeginning = isUpper && !wasUpper || !wasAlphanum || !isAlphanum;
|
|
634
|
+
wasUpper = isUpper;
|
|
635
|
+
wasAlphanum = isAlphanum;
|
|
636
|
+
if (isBeginning) beginningIndexes[beginningIndexesLen++] = i;
|
|
637
|
+
}
|
|
638
|
+
return beginningIndexes;
|
|
639
|
+
};
|
|
640
|
+
var prepareNextBeginningIndexes = (target) => {
|
|
641
|
+
target = remove_accents(target);
|
|
642
|
+
var targetLen = target.length;
|
|
643
|
+
var beginningIndexes = prepareBeginningIndexes(target);
|
|
644
|
+
var nextBeginningIndexes = [];
|
|
645
|
+
var lastIsBeginning = beginningIndexes[0];
|
|
646
|
+
var lastIsBeginningI = 0;
|
|
647
|
+
for (var i = 0; i < targetLen; ++i) {
|
|
648
|
+
if (lastIsBeginning > i) {
|
|
649
|
+
nextBeginningIndexes[i] = lastIsBeginning;
|
|
650
|
+
} else {
|
|
651
|
+
lastIsBeginning = beginningIndexes[++lastIsBeginningI];
|
|
652
|
+
nextBeginningIndexes[i] = lastIsBeginning === void 0 ? targetLen : lastIsBeginning;
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
return nextBeginningIndexes;
|
|
656
|
+
};
|
|
657
|
+
var preparedCache = /* @__PURE__ */ new Map();
|
|
658
|
+
var preparedSearchCache = /* @__PURE__ */ new Map();
|
|
659
|
+
var matchesSimple = [];
|
|
660
|
+
var matchesStrict = [];
|
|
661
|
+
var nextBeginningIndexesChanges = [];
|
|
662
|
+
var keysSpacesBestScores = [];
|
|
663
|
+
var allowPartialMatchScores = [];
|
|
664
|
+
var tmpTargets = [];
|
|
665
|
+
var tmpResults = [];
|
|
666
|
+
var getValue = (obj, prop) => {
|
|
667
|
+
var tmp = obj[prop];
|
|
668
|
+
if (tmp !== void 0) return tmp;
|
|
669
|
+
if (typeof prop === "function") return prop(obj);
|
|
670
|
+
var segs = prop;
|
|
671
|
+
if (!Array.isArray(prop)) segs = prop.split(".");
|
|
672
|
+
var len = segs.length;
|
|
673
|
+
var i = -1;
|
|
674
|
+
while (obj && ++i < len) obj = obj[segs[i]];
|
|
675
|
+
return obj;
|
|
676
|
+
};
|
|
677
|
+
var isPrepared = (x) => {
|
|
678
|
+
return typeof x === "object" && typeof x._bitflags === "number";
|
|
679
|
+
};
|
|
680
|
+
var INFINITY = Infinity;
|
|
681
|
+
var NEGATIVE_INFINITY = -INFINITY;
|
|
682
|
+
var noResults = [];
|
|
683
|
+
noResults.total = 0;
|
|
684
|
+
var NULL = null;
|
|
685
|
+
var noTarget = prepare("");
|
|
686
|
+
var fastpriorityqueue = (r) => {
|
|
687
|
+
var e = [], o = 0, a = {}, v2 = (r2) => {
|
|
688
|
+
for (var a2 = 0, v3 = e[a2], c = 1; c < o; ) {
|
|
689
|
+
var s = c + 1;
|
|
690
|
+
a2 = c, s < o && e[s]._score < e[c]._score && (a2 = s), e[a2 - 1 >> 1] = e[a2], c = 1 + (a2 << 1);
|
|
691
|
+
}
|
|
692
|
+
for (var f = a2 - 1 >> 1; a2 > 0 && v3._score < e[f]._score; f = (a2 = f) - 1 >> 1) e[a2] = e[f];
|
|
693
|
+
e[a2] = v3;
|
|
694
|
+
};
|
|
695
|
+
return a.add = ((r2) => {
|
|
696
|
+
var a2 = o;
|
|
697
|
+
e[o++] = r2;
|
|
698
|
+
for (var v3 = a2 - 1 >> 1; a2 > 0 && r2._score < e[v3]._score; v3 = (a2 = v3) - 1 >> 1) e[a2] = e[v3];
|
|
699
|
+
e[a2] = r2;
|
|
700
|
+
}), a.poll = ((r2) => {
|
|
701
|
+
if (0 !== o) {
|
|
702
|
+
var a2 = e[0];
|
|
703
|
+
return e[0] = e[--o], v2(), a2;
|
|
704
|
+
}
|
|
705
|
+
}), a.peek = ((r2) => {
|
|
706
|
+
if (0 !== o) return e[0];
|
|
707
|
+
}), a.replaceTop = ((r2) => {
|
|
708
|
+
e[0] = r2, v2();
|
|
709
|
+
}), a;
|
|
710
|
+
};
|
|
711
|
+
var q3 = fastpriorityqueue();
|
|
712
|
+
return { "single": single, "go": go2, "prepare": prepare, "cleanup": cleanup };
|
|
713
|
+
});
|
|
714
|
+
}
|
|
715
|
+
});
|
|
716
|
+
|
|
717
|
+
// ../list/dist/index.js
|
|
718
|
+
init_live_reload();
|
|
719
|
+
|
|
720
|
+
// ../../node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js
|
|
721
|
+
init_live_reload();
|
|
722
|
+
|
|
723
|
+
// ../../node_modules/@vue/shared/dist/shared.esm-bundler.js
|
|
724
|
+
init_live_reload();
|
|
725
|
+
// @__NO_SIDE_EFFECTS__
|
|
726
|
+
function makeMap(str) {
|
|
727
|
+
const map = /* @__PURE__ */ Object.create(null);
|
|
728
|
+
for (const key of str.split(",")) map[key] = 1;
|
|
729
|
+
return (val) => val in map;
|
|
730
|
+
}
|
|
731
|
+
var EMPTY_OBJ = true ? Object.freeze({}) : {};
|
|
732
|
+
var EMPTY_ARR = true ? Object.freeze([]) : [];
|
|
733
|
+
var NOOP = () => {
|
|
734
|
+
};
|
|
735
|
+
var extend = Object.assign;
|
|
736
|
+
var remove = (arr, el) => {
|
|
737
|
+
const i = arr.indexOf(el);
|
|
738
|
+
if (i > -1) {
|
|
739
|
+
arr.splice(i, 1);
|
|
740
|
+
}
|
|
741
|
+
};
|
|
742
|
+
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
743
|
+
var hasOwn = (val, key) => hasOwnProperty.call(val, key);
|
|
744
|
+
var isArray = Array.isArray;
|
|
745
|
+
var isMap = (val) => toTypeString(val) === "[object Map]";
|
|
746
|
+
var isSet = (val) => toTypeString(val) === "[object Set]";
|
|
747
|
+
var isFunction = (val) => typeof val === "function";
|
|
748
|
+
var isString = (val) => typeof val === "string";
|
|
749
|
+
var isSymbol = (val) => typeof val === "symbol";
|
|
750
|
+
var isObject = (val) => val !== null && typeof val === "object";
|
|
751
|
+
var objectToString = Object.prototype.toString;
|
|
752
|
+
var toTypeString = (value) => objectToString.call(value);
|
|
753
|
+
var toRawType = (value) => {
|
|
754
|
+
return toTypeString(value).slice(8, -1);
|
|
755
|
+
};
|
|
756
|
+
var isPlainObject = (val) => toTypeString(val) === "[object Object]";
|
|
757
|
+
var isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key;
|
|
758
|
+
var cacheStringFunction = (fn) => {
|
|
759
|
+
const cache = /* @__PURE__ */ Object.create(null);
|
|
760
|
+
return ((str) => {
|
|
761
|
+
const hit = cache[str];
|
|
762
|
+
return hit || (cache[str] = fn(str));
|
|
763
|
+
});
|
|
764
|
+
};
|
|
765
|
+
var camelizeRE = /-\w/g;
|
|
766
|
+
var camelize = cacheStringFunction(
|
|
767
|
+
(str) => {
|
|
768
|
+
return str.replace(camelizeRE, (c) => c.slice(1).toUpperCase());
|
|
769
|
+
}
|
|
770
|
+
);
|
|
771
|
+
var hyphenateRE = /\B([A-Z])/g;
|
|
772
|
+
var hyphenate = cacheStringFunction(
|
|
773
|
+
(str) => str.replace(hyphenateRE, "-$1").toLowerCase()
|
|
774
|
+
);
|
|
775
|
+
var capitalize = cacheStringFunction((str) => {
|
|
776
|
+
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
777
|
+
});
|
|
778
|
+
var toHandlerKey = cacheStringFunction(
|
|
779
|
+
(str) => {
|
|
780
|
+
const s = str ? `on${capitalize(str)}` : ``;
|
|
781
|
+
return s;
|
|
782
|
+
}
|
|
783
|
+
);
|
|
784
|
+
var hasChanged = (value, oldValue) => !Object.is(value, oldValue);
|
|
785
|
+
var specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;
|
|
786
|
+
var isBooleanAttr = /* @__PURE__ */ makeMap(
|
|
787
|
+
specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`
|
|
788
|
+
);
|
|
789
|
+
|
|
790
|
+
// ../../node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js
|
|
791
|
+
function warn(msg, ...args) {
|
|
792
|
+
console.warn(`[Vue warn] ${msg}`, ...args);
|
|
793
|
+
}
|
|
794
|
+
var activeEffectScope;
|
|
795
|
+
function getCurrentScope() {
|
|
796
|
+
return activeEffectScope;
|
|
797
|
+
}
|
|
798
|
+
var activeSub;
|
|
799
|
+
var pausedQueueEffects = /* @__PURE__ */ new WeakSet();
|
|
800
|
+
var ReactiveEffect = class {
|
|
801
|
+
constructor(fn) {
|
|
802
|
+
this.fn = fn;
|
|
803
|
+
this.deps = void 0;
|
|
804
|
+
this.depsTail = void 0;
|
|
805
|
+
this.flags = 1 | 4;
|
|
806
|
+
this.next = void 0;
|
|
807
|
+
this.cleanup = void 0;
|
|
808
|
+
this.scheduler = void 0;
|
|
809
|
+
if (activeEffectScope && activeEffectScope.active) {
|
|
810
|
+
activeEffectScope.effects.push(this);
|
|
811
|
+
}
|
|
812
|
+
}
|
|
813
|
+
pause() {
|
|
814
|
+
this.flags |= 64;
|
|
815
|
+
}
|
|
816
|
+
resume() {
|
|
817
|
+
if (this.flags & 64) {
|
|
818
|
+
this.flags &= -65;
|
|
819
|
+
if (pausedQueueEffects.has(this)) {
|
|
820
|
+
pausedQueueEffects.delete(this);
|
|
821
|
+
this.trigger();
|
|
822
|
+
}
|
|
823
|
+
}
|
|
824
|
+
}
|
|
825
|
+
/**
|
|
826
|
+
* @internal
|
|
827
|
+
*/
|
|
828
|
+
notify() {
|
|
829
|
+
if (this.flags & 2 && !(this.flags & 32)) {
|
|
830
|
+
return;
|
|
831
|
+
}
|
|
832
|
+
if (!(this.flags & 8)) {
|
|
833
|
+
batch(this);
|
|
834
|
+
}
|
|
835
|
+
}
|
|
836
|
+
run() {
|
|
837
|
+
if (!(this.flags & 1)) {
|
|
838
|
+
return this.fn();
|
|
839
|
+
}
|
|
840
|
+
this.flags |= 2;
|
|
841
|
+
cleanupEffect(this);
|
|
842
|
+
prepareDeps(this);
|
|
843
|
+
const prevEffect = activeSub;
|
|
844
|
+
const prevShouldTrack = shouldTrack;
|
|
845
|
+
activeSub = this;
|
|
846
|
+
shouldTrack = true;
|
|
847
|
+
try {
|
|
848
|
+
return this.fn();
|
|
849
|
+
} finally {
|
|
850
|
+
if (activeSub !== this) {
|
|
851
|
+
warn(
|
|
852
|
+
"Active effect was not restored correctly - this is likely a Vue internal bug."
|
|
853
|
+
);
|
|
854
|
+
}
|
|
855
|
+
cleanupDeps(this);
|
|
856
|
+
activeSub = prevEffect;
|
|
857
|
+
shouldTrack = prevShouldTrack;
|
|
858
|
+
this.flags &= -3;
|
|
859
|
+
}
|
|
860
|
+
}
|
|
861
|
+
stop() {
|
|
862
|
+
if (this.flags & 1) {
|
|
863
|
+
for (let link = this.deps; link; link = link.nextDep) {
|
|
864
|
+
removeSub(link);
|
|
865
|
+
}
|
|
866
|
+
this.deps = this.depsTail = void 0;
|
|
867
|
+
cleanupEffect(this);
|
|
868
|
+
this.onStop && this.onStop();
|
|
869
|
+
this.flags &= -2;
|
|
870
|
+
}
|
|
871
|
+
}
|
|
872
|
+
trigger() {
|
|
873
|
+
if (this.flags & 64) {
|
|
874
|
+
pausedQueueEffects.add(this);
|
|
875
|
+
} else if (this.scheduler) {
|
|
876
|
+
this.scheduler();
|
|
877
|
+
} else {
|
|
878
|
+
this.runIfDirty();
|
|
879
|
+
}
|
|
880
|
+
}
|
|
881
|
+
/**
|
|
882
|
+
* @internal
|
|
883
|
+
*/
|
|
884
|
+
runIfDirty() {
|
|
885
|
+
if (isDirty(this)) {
|
|
886
|
+
this.run();
|
|
887
|
+
}
|
|
888
|
+
}
|
|
889
|
+
get dirty() {
|
|
890
|
+
return isDirty(this);
|
|
891
|
+
}
|
|
892
|
+
};
|
|
893
|
+
var batchDepth = 0;
|
|
894
|
+
var batchedSub;
|
|
895
|
+
var batchedComputed;
|
|
896
|
+
function batch(sub, isComputed = false) {
|
|
897
|
+
sub.flags |= 8;
|
|
898
|
+
if (isComputed) {
|
|
899
|
+
sub.next = batchedComputed;
|
|
900
|
+
batchedComputed = sub;
|
|
901
|
+
return;
|
|
902
|
+
}
|
|
903
|
+
sub.next = batchedSub;
|
|
904
|
+
batchedSub = sub;
|
|
905
|
+
}
|
|
906
|
+
function startBatch() {
|
|
907
|
+
batchDepth++;
|
|
908
|
+
}
|
|
909
|
+
function endBatch() {
|
|
910
|
+
if (--batchDepth > 0) {
|
|
911
|
+
return;
|
|
912
|
+
}
|
|
913
|
+
if (batchedComputed) {
|
|
914
|
+
let e = batchedComputed;
|
|
915
|
+
batchedComputed = void 0;
|
|
916
|
+
while (e) {
|
|
917
|
+
const next = e.next;
|
|
918
|
+
e.next = void 0;
|
|
919
|
+
e.flags &= -9;
|
|
920
|
+
e = next;
|
|
921
|
+
}
|
|
922
|
+
}
|
|
923
|
+
let error;
|
|
924
|
+
while (batchedSub) {
|
|
925
|
+
let e = batchedSub;
|
|
926
|
+
batchedSub = void 0;
|
|
927
|
+
while (e) {
|
|
928
|
+
const next = e.next;
|
|
929
|
+
e.next = void 0;
|
|
930
|
+
e.flags &= -9;
|
|
931
|
+
if (e.flags & 1) {
|
|
932
|
+
try {
|
|
933
|
+
;
|
|
934
|
+
e.trigger();
|
|
935
|
+
} catch (err) {
|
|
936
|
+
if (!error) error = err;
|
|
937
|
+
}
|
|
938
|
+
}
|
|
939
|
+
e = next;
|
|
940
|
+
}
|
|
941
|
+
}
|
|
942
|
+
if (error) throw error;
|
|
943
|
+
}
|
|
944
|
+
function prepareDeps(sub) {
|
|
945
|
+
for (let link = sub.deps; link; link = link.nextDep) {
|
|
946
|
+
link.version = -1;
|
|
947
|
+
link.prevActiveLink = link.dep.activeLink;
|
|
948
|
+
link.dep.activeLink = link;
|
|
949
|
+
}
|
|
950
|
+
}
|
|
951
|
+
function cleanupDeps(sub) {
|
|
952
|
+
let head;
|
|
953
|
+
let tail = sub.depsTail;
|
|
954
|
+
let link = tail;
|
|
955
|
+
while (link) {
|
|
956
|
+
const prev = link.prevDep;
|
|
957
|
+
if (link.version === -1) {
|
|
958
|
+
if (link === tail) tail = prev;
|
|
959
|
+
removeSub(link);
|
|
960
|
+
removeDep(link);
|
|
961
|
+
} else {
|
|
962
|
+
head = link;
|
|
963
|
+
}
|
|
964
|
+
link.dep.activeLink = link.prevActiveLink;
|
|
965
|
+
link.prevActiveLink = void 0;
|
|
966
|
+
link = prev;
|
|
967
|
+
}
|
|
968
|
+
sub.deps = head;
|
|
969
|
+
sub.depsTail = tail;
|
|
970
|
+
}
|
|
971
|
+
function isDirty(sub) {
|
|
972
|
+
for (let link = sub.deps; link; link = link.nextDep) {
|
|
973
|
+
if (link.dep.version !== link.version || link.dep.computed && (refreshComputed(link.dep.computed) || link.dep.version !== link.version)) {
|
|
974
|
+
return true;
|
|
975
|
+
}
|
|
976
|
+
}
|
|
977
|
+
if (sub._dirty) {
|
|
978
|
+
return true;
|
|
979
|
+
}
|
|
980
|
+
return false;
|
|
981
|
+
}
|
|
982
|
+
function refreshComputed(computed2) {
|
|
983
|
+
if (computed2.flags & 4 && !(computed2.flags & 16)) {
|
|
984
|
+
return;
|
|
985
|
+
}
|
|
986
|
+
computed2.flags &= -17;
|
|
987
|
+
if (computed2.globalVersion === globalVersion) {
|
|
988
|
+
return;
|
|
989
|
+
}
|
|
990
|
+
computed2.globalVersion = globalVersion;
|
|
991
|
+
if (!computed2.isSSR && computed2.flags & 128 && (!computed2.deps && !computed2._dirty || !isDirty(computed2))) {
|
|
992
|
+
return;
|
|
993
|
+
}
|
|
994
|
+
computed2.flags |= 2;
|
|
995
|
+
const dep = computed2.dep;
|
|
996
|
+
const prevSub = activeSub;
|
|
997
|
+
const prevShouldTrack = shouldTrack;
|
|
998
|
+
activeSub = computed2;
|
|
999
|
+
shouldTrack = true;
|
|
1000
|
+
try {
|
|
1001
|
+
prepareDeps(computed2);
|
|
1002
|
+
const value = computed2.fn(computed2._value);
|
|
1003
|
+
if (dep.version === 0 || hasChanged(value, computed2._value)) {
|
|
1004
|
+
computed2.flags |= 128;
|
|
1005
|
+
computed2._value = value;
|
|
1006
|
+
dep.version++;
|
|
1007
|
+
}
|
|
1008
|
+
} catch (err) {
|
|
1009
|
+
dep.version++;
|
|
1010
|
+
throw err;
|
|
1011
|
+
} finally {
|
|
1012
|
+
activeSub = prevSub;
|
|
1013
|
+
shouldTrack = prevShouldTrack;
|
|
1014
|
+
cleanupDeps(computed2);
|
|
1015
|
+
computed2.flags &= -3;
|
|
1016
|
+
}
|
|
1017
|
+
}
|
|
1018
|
+
function removeSub(link, soft = false) {
|
|
1019
|
+
const { dep, prevSub, nextSub } = link;
|
|
1020
|
+
if (prevSub) {
|
|
1021
|
+
prevSub.nextSub = nextSub;
|
|
1022
|
+
link.prevSub = void 0;
|
|
1023
|
+
}
|
|
1024
|
+
if (nextSub) {
|
|
1025
|
+
nextSub.prevSub = prevSub;
|
|
1026
|
+
link.nextSub = void 0;
|
|
1027
|
+
}
|
|
1028
|
+
if (dep.subsHead === link) {
|
|
1029
|
+
dep.subsHead = nextSub;
|
|
1030
|
+
}
|
|
1031
|
+
if (dep.subs === link) {
|
|
1032
|
+
dep.subs = prevSub;
|
|
1033
|
+
if (!prevSub && dep.computed) {
|
|
1034
|
+
dep.computed.flags &= -5;
|
|
1035
|
+
for (let l = dep.computed.deps; l; l = l.nextDep) {
|
|
1036
|
+
removeSub(l, true);
|
|
1037
|
+
}
|
|
1038
|
+
}
|
|
1039
|
+
}
|
|
1040
|
+
if (!soft && !--dep.sc && dep.map) {
|
|
1041
|
+
dep.map.delete(dep.key);
|
|
1042
|
+
}
|
|
1043
|
+
}
|
|
1044
|
+
function removeDep(link) {
|
|
1045
|
+
const { prevDep, nextDep } = link;
|
|
1046
|
+
if (prevDep) {
|
|
1047
|
+
prevDep.nextDep = nextDep;
|
|
1048
|
+
link.prevDep = void 0;
|
|
1049
|
+
}
|
|
1050
|
+
if (nextDep) {
|
|
1051
|
+
nextDep.prevDep = prevDep;
|
|
1052
|
+
link.nextDep = void 0;
|
|
1053
|
+
}
|
|
1054
|
+
}
|
|
1055
|
+
function effect(fn, options) {
|
|
1056
|
+
if (fn.effect instanceof ReactiveEffect) {
|
|
1057
|
+
fn = fn.effect.fn;
|
|
1058
|
+
}
|
|
1059
|
+
const e = new ReactiveEffect(fn);
|
|
1060
|
+
if (options) {
|
|
1061
|
+
extend(e, options);
|
|
1062
|
+
}
|
|
1063
|
+
try {
|
|
1064
|
+
e.run();
|
|
1065
|
+
} catch (err) {
|
|
1066
|
+
e.stop();
|
|
1067
|
+
throw err;
|
|
1068
|
+
}
|
|
1069
|
+
const runner = e.run.bind(e);
|
|
1070
|
+
runner.effect = e;
|
|
1071
|
+
return runner;
|
|
1072
|
+
}
|
|
1073
|
+
var shouldTrack = true;
|
|
1074
|
+
var trackStack = [];
|
|
1075
|
+
function pauseTracking() {
|
|
1076
|
+
trackStack.push(shouldTrack);
|
|
1077
|
+
shouldTrack = false;
|
|
1078
|
+
}
|
|
1079
|
+
function resetTracking() {
|
|
1080
|
+
const last = trackStack.pop();
|
|
1081
|
+
shouldTrack = last === void 0 ? true : last;
|
|
1082
|
+
}
|
|
1083
|
+
function cleanupEffect(e) {
|
|
1084
|
+
const { cleanup } = e;
|
|
1085
|
+
e.cleanup = void 0;
|
|
1086
|
+
if (cleanup) {
|
|
1087
|
+
const prevSub = activeSub;
|
|
1088
|
+
activeSub = void 0;
|
|
1089
|
+
try {
|
|
1090
|
+
cleanup();
|
|
1091
|
+
} finally {
|
|
1092
|
+
activeSub = prevSub;
|
|
1093
|
+
}
|
|
1094
|
+
}
|
|
1095
|
+
}
|
|
1096
|
+
var globalVersion = 0;
|
|
1097
|
+
var Link = class {
|
|
1098
|
+
constructor(sub, dep) {
|
|
1099
|
+
this.sub = sub;
|
|
1100
|
+
this.dep = dep;
|
|
1101
|
+
this.version = dep.version;
|
|
1102
|
+
this.nextDep = this.prevDep = this.nextSub = this.prevSub = this.prevActiveLink = void 0;
|
|
1103
|
+
}
|
|
1104
|
+
};
|
|
1105
|
+
var Dep = class {
|
|
1106
|
+
// TODO isolatedDeclarations "__v_skip"
|
|
1107
|
+
constructor(computed2) {
|
|
1108
|
+
this.computed = computed2;
|
|
1109
|
+
this.version = 0;
|
|
1110
|
+
this.activeLink = void 0;
|
|
1111
|
+
this.subs = void 0;
|
|
1112
|
+
this.map = void 0;
|
|
1113
|
+
this.key = void 0;
|
|
1114
|
+
this.sc = 0;
|
|
1115
|
+
this.__v_skip = true;
|
|
1116
|
+
if (true) {
|
|
1117
|
+
this.subsHead = void 0;
|
|
1118
|
+
}
|
|
1119
|
+
}
|
|
1120
|
+
track(debugInfo) {
|
|
1121
|
+
if (!activeSub || !shouldTrack || activeSub === this.computed) {
|
|
1122
|
+
return;
|
|
1123
|
+
}
|
|
1124
|
+
let link = this.activeLink;
|
|
1125
|
+
if (link === void 0 || link.sub !== activeSub) {
|
|
1126
|
+
link = this.activeLink = new Link(activeSub, this);
|
|
1127
|
+
if (!activeSub.deps) {
|
|
1128
|
+
activeSub.deps = activeSub.depsTail = link;
|
|
1129
|
+
} else {
|
|
1130
|
+
link.prevDep = activeSub.depsTail;
|
|
1131
|
+
activeSub.depsTail.nextDep = link;
|
|
1132
|
+
activeSub.depsTail = link;
|
|
1133
|
+
}
|
|
1134
|
+
addSub(link);
|
|
1135
|
+
} else if (link.version === -1) {
|
|
1136
|
+
link.version = this.version;
|
|
1137
|
+
if (link.nextDep) {
|
|
1138
|
+
const next = link.nextDep;
|
|
1139
|
+
next.prevDep = link.prevDep;
|
|
1140
|
+
if (link.prevDep) {
|
|
1141
|
+
link.prevDep.nextDep = next;
|
|
1142
|
+
}
|
|
1143
|
+
link.prevDep = activeSub.depsTail;
|
|
1144
|
+
link.nextDep = void 0;
|
|
1145
|
+
activeSub.depsTail.nextDep = link;
|
|
1146
|
+
activeSub.depsTail = link;
|
|
1147
|
+
if (activeSub.deps === link) {
|
|
1148
|
+
activeSub.deps = next;
|
|
1149
|
+
}
|
|
1150
|
+
}
|
|
1151
|
+
}
|
|
1152
|
+
if (activeSub.onTrack) {
|
|
1153
|
+
activeSub.onTrack(
|
|
1154
|
+
extend(
|
|
1155
|
+
{
|
|
1156
|
+
effect: activeSub
|
|
1157
|
+
},
|
|
1158
|
+
debugInfo
|
|
1159
|
+
)
|
|
1160
|
+
);
|
|
1161
|
+
}
|
|
1162
|
+
return link;
|
|
1163
|
+
}
|
|
1164
|
+
trigger(debugInfo) {
|
|
1165
|
+
this.version++;
|
|
1166
|
+
globalVersion++;
|
|
1167
|
+
this.notify(debugInfo);
|
|
1168
|
+
}
|
|
1169
|
+
notify(debugInfo) {
|
|
1170
|
+
startBatch();
|
|
1171
|
+
try {
|
|
1172
|
+
if (true) {
|
|
1173
|
+
for (let head = this.subsHead; head; head = head.nextSub) {
|
|
1174
|
+
if (head.sub.onTrigger && !(head.sub.flags & 8)) {
|
|
1175
|
+
head.sub.onTrigger(
|
|
1176
|
+
extend(
|
|
1177
|
+
{
|
|
1178
|
+
effect: head.sub
|
|
1179
|
+
},
|
|
1180
|
+
debugInfo
|
|
1181
|
+
)
|
|
1182
|
+
);
|
|
1183
|
+
}
|
|
1184
|
+
}
|
|
1185
|
+
}
|
|
1186
|
+
for (let link = this.subs; link; link = link.prevSub) {
|
|
1187
|
+
if (link.sub.notify()) {
|
|
1188
|
+
;
|
|
1189
|
+
link.sub.dep.notify();
|
|
1190
|
+
}
|
|
1191
|
+
}
|
|
1192
|
+
} finally {
|
|
1193
|
+
endBatch();
|
|
1194
|
+
}
|
|
1195
|
+
}
|
|
1196
|
+
};
|
|
1197
|
+
function addSub(link) {
|
|
1198
|
+
link.dep.sc++;
|
|
1199
|
+
if (link.sub.flags & 4) {
|
|
1200
|
+
const computed2 = link.dep.computed;
|
|
1201
|
+
if (computed2 && !link.dep.subs) {
|
|
1202
|
+
computed2.flags |= 4 | 16;
|
|
1203
|
+
for (let l = computed2.deps; l; l = l.nextDep) {
|
|
1204
|
+
addSub(l);
|
|
1205
|
+
}
|
|
1206
|
+
}
|
|
1207
|
+
const currentTail = link.dep.subs;
|
|
1208
|
+
if (currentTail !== link) {
|
|
1209
|
+
link.prevSub = currentTail;
|
|
1210
|
+
if (currentTail) currentTail.nextSub = link;
|
|
1211
|
+
}
|
|
1212
|
+
if (link.dep.subsHead === void 0) {
|
|
1213
|
+
link.dep.subsHead = link;
|
|
1214
|
+
}
|
|
1215
|
+
link.dep.subs = link;
|
|
1216
|
+
}
|
|
1217
|
+
}
|
|
1218
|
+
var targetMap = /* @__PURE__ */ new WeakMap();
|
|
1219
|
+
var ITERATE_KEY = /* @__PURE__ */ Symbol(
|
|
1220
|
+
true ? "Object iterate" : ""
|
|
1221
|
+
);
|
|
1222
|
+
var MAP_KEY_ITERATE_KEY = /* @__PURE__ */ Symbol(
|
|
1223
|
+
true ? "Map keys iterate" : ""
|
|
1224
|
+
);
|
|
1225
|
+
var ARRAY_ITERATE_KEY = /* @__PURE__ */ Symbol(
|
|
1226
|
+
true ? "Array iterate" : ""
|
|
1227
|
+
);
|
|
1228
|
+
function track(target, type, key) {
|
|
1229
|
+
if (shouldTrack && activeSub) {
|
|
1230
|
+
let depsMap = targetMap.get(target);
|
|
1231
|
+
if (!depsMap) {
|
|
1232
|
+
targetMap.set(target, depsMap = /* @__PURE__ */ new Map());
|
|
1233
|
+
}
|
|
1234
|
+
let dep = depsMap.get(key);
|
|
1235
|
+
if (!dep) {
|
|
1236
|
+
depsMap.set(key, dep = new Dep());
|
|
1237
|
+
dep.map = depsMap;
|
|
1238
|
+
dep.key = key;
|
|
1239
|
+
}
|
|
1240
|
+
if (true) {
|
|
1241
|
+
dep.track({
|
|
1242
|
+
target,
|
|
1243
|
+
type,
|
|
1244
|
+
key
|
|
1245
|
+
});
|
|
1246
|
+
} else {
|
|
1247
|
+
dep.track();
|
|
1248
|
+
}
|
|
1249
|
+
}
|
|
1250
|
+
}
|
|
1251
|
+
function trigger(target, type, key, newValue, oldValue, oldTarget) {
|
|
1252
|
+
const depsMap = targetMap.get(target);
|
|
1253
|
+
if (!depsMap) {
|
|
1254
|
+
globalVersion++;
|
|
1255
|
+
return;
|
|
1256
|
+
}
|
|
1257
|
+
const run = (dep) => {
|
|
1258
|
+
if (dep) {
|
|
1259
|
+
if (true) {
|
|
1260
|
+
dep.trigger({
|
|
1261
|
+
target,
|
|
1262
|
+
type,
|
|
1263
|
+
key,
|
|
1264
|
+
newValue,
|
|
1265
|
+
oldValue,
|
|
1266
|
+
oldTarget
|
|
1267
|
+
});
|
|
1268
|
+
} else {
|
|
1269
|
+
dep.trigger();
|
|
1270
|
+
}
|
|
1271
|
+
}
|
|
1272
|
+
};
|
|
1273
|
+
startBatch();
|
|
1274
|
+
if (type === "clear") {
|
|
1275
|
+
depsMap.forEach(run);
|
|
1276
|
+
} else {
|
|
1277
|
+
const targetIsArray = isArray(target);
|
|
1278
|
+
const isArrayIndex = targetIsArray && isIntegerKey(key);
|
|
1279
|
+
if (targetIsArray && key === "length") {
|
|
1280
|
+
const newLength = Number(newValue);
|
|
1281
|
+
depsMap.forEach((dep, key2) => {
|
|
1282
|
+
if (key2 === "length" || key2 === ARRAY_ITERATE_KEY || !isSymbol(key2) && key2 >= newLength) {
|
|
1283
|
+
run(dep);
|
|
1284
|
+
}
|
|
1285
|
+
});
|
|
1286
|
+
} else {
|
|
1287
|
+
if (key !== void 0 || depsMap.has(void 0)) {
|
|
1288
|
+
run(depsMap.get(key));
|
|
1289
|
+
}
|
|
1290
|
+
if (isArrayIndex) {
|
|
1291
|
+
run(depsMap.get(ARRAY_ITERATE_KEY));
|
|
1292
|
+
}
|
|
1293
|
+
switch (type) {
|
|
1294
|
+
case "add":
|
|
1295
|
+
if (!targetIsArray) {
|
|
1296
|
+
run(depsMap.get(ITERATE_KEY));
|
|
1297
|
+
if (isMap(target)) {
|
|
1298
|
+
run(depsMap.get(MAP_KEY_ITERATE_KEY));
|
|
1299
|
+
}
|
|
1300
|
+
} else if (isArrayIndex) {
|
|
1301
|
+
run(depsMap.get("length"));
|
|
1302
|
+
}
|
|
1303
|
+
break;
|
|
1304
|
+
case "delete":
|
|
1305
|
+
if (!targetIsArray) {
|
|
1306
|
+
run(depsMap.get(ITERATE_KEY));
|
|
1307
|
+
if (isMap(target)) {
|
|
1308
|
+
run(depsMap.get(MAP_KEY_ITERATE_KEY));
|
|
1309
|
+
}
|
|
1310
|
+
}
|
|
1311
|
+
break;
|
|
1312
|
+
case "set":
|
|
1313
|
+
if (isMap(target)) {
|
|
1314
|
+
run(depsMap.get(ITERATE_KEY));
|
|
1315
|
+
}
|
|
1316
|
+
break;
|
|
1317
|
+
}
|
|
1318
|
+
}
|
|
1319
|
+
}
|
|
1320
|
+
endBatch();
|
|
1321
|
+
}
|
|
1322
|
+
function reactiveReadArray(array) {
|
|
1323
|
+
const raw = /* @__PURE__ */ toRaw(array);
|
|
1324
|
+
if (raw === array) return raw;
|
|
1325
|
+
track(raw, "iterate", ARRAY_ITERATE_KEY);
|
|
1326
|
+
return /* @__PURE__ */ isShallow(array) ? raw : raw.map(toReactive);
|
|
1327
|
+
}
|
|
1328
|
+
function shallowReadArray(arr) {
|
|
1329
|
+
track(arr = /* @__PURE__ */ toRaw(arr), "iterate", ARRAY_ITERATE_KEY);
|
|
1330
|
+
return arr;
|
|
1331
|
+
}
|
|
1332
|
+
function toWrapped(target, item) {
|
|
1333
|
+
if (/* @__PURE__ */ isReadonly(target)) {
|
|
1334
|
+
return /* @__PURE__ */ isReactive(target) ? toReadonly(toReactive(item)) : toReadonly(item);
|
|
1335
|
+
}
|
|
1336
|
+
return toReactive(item);
|
|
1337
|
+
}
|
|
1338
|
+
var arrayInstrumentations = {
|
|
1339
|
+
__proto__: null,
|
|
1340
|
+
[Symbol.iterator]() {
|
|
1341
|
+
return iterator(this, Symbol.iterator, (item) => toWrapped(this, item));
|
|
1342
|
+
},
|
|
1343
|
+
concat(...args) {
|
|
1344
|
+
return reactiveReadArray(this).concat(
|
|
1345
|
+
...args.map((x) => isArray(x) ? reactiveReadArray(x) : x)
|
|
1346
|
+
);
|
|
1347
|
+
},
|
|
1348
|
+
entries() {
|
|
1349
|
+
return iterator(this, "entries", (value) => {
|
|
1350
|
+
value[1] = toWrapped(this, value[1]);
|
|
1351
|
+
return value;
|
|
1352
|
+
});
|
|
1353
|
+
},
|
|
1354
|
+
every(fn, thisArg) {
|
|
1355
|
+
return apply(this, "every", fn, thisArg, void 0, arguments);
|
|
1356
|
+
},
|
|
1357
|
+
filter(fn, thisArg) {
|
|
1358
|
+
return apply(
|
|
1359
|
+
this,
|
|
1360
|
+
"filter",
|
|
1361
|
+
fn,
|
|
1362
|
+
thisArg,
|
|
1363
|
+
(v2) => v2.map((item) => toWrapped(this, item)),
|
|
1364
|
+
arguments
|
|
1365
|
+
);
|
|
1366
|
+
},
|
|
1367
|
+
find(fn, thisArg) {
|
|
1368
|
+
return apply(
|
|
1369
|
+
this,
|
|
1370
|
+
"find",
|
|
1371
|
+
fn,
|
|
1372
|
+
thisArg,
|
|
1373
|
+
(item) => toWrapped(this, item),
|
|
1374
|
+
arguments
|
|
1375
|
+
);
|
|
1376
|
+
},
|
|
1377
|
+
findIndex(fn, thisArg) {
|
|
1378
|
+
return apply(this, "findIndex", fn, thisArg, void 0, arguments);
|
|
1379
|
+
},
|
|
1380
|
+
findLast(fn, thisArg) {
|
|
1381
|
+
return apply(
|
|
1382
|
+
this,
|
|
1383
|
+
"findLast",
|
|
1384
|
+
fn,
|
|
1385
|
+
thisArg,
|
|
1386
|
+
(item) => toWrapped(this, item),
|
|
1387
|
+
arguments
|
|
1388
|
+
);
|
|
1389
|
+
},
|
|
1390
|
+
findLastIndex(fn, thisArg) {
|
|
1391
|
+
return apply(this, "findLastIndex", fn, thisArg, void 0, arguments);
|
|
1392
|
+
},
|
|
1393
|
+
// flat, flatMap could benefit from ARRAY_ITERATE but are not straight-forward to implement
|
|
1394
|
+
forEach(fn, thisArg) {
|
|
1395
|
+
return apply(this, "forEach", fn, thisArg, void 0, arguments);
|
|
1396
|
+
},
|
|
1397
|
+
includes(...args) {
|
|
1398
|
+
return searchProxy(this, "includes", args);
|
|
1399
|
+
},
|
|
1400
|
+
indexOf(...args) {
|
|
1401
|
+
return searchProxy(this, "indexOf", args);
|
|
1402
|
+
},
|
|
1403
|
+
join(separator) {
|
|
1404
|
+
return reactiveReadArray(this).join(separator);
|
|
1405
|
+
},
|
|
1406
|
+
// keys() iterator only reads `length`, no optimization required
|
|
1407
|
+
lastIndexOf(...args) {
|
|
1408
|
+
return searchProxy(this, "lastIndexOf", args);
|
|
1409
|
+
},
|
|
1410
|
+
map(fn, thisArg) {
|
|
1411
|
+
return apply(this, "map", fn, thisArg, void 0, arguments);
|
|
1412
|
+
},
|
|
1413
|
+
pop() {
|
|
1414
|
+
return noTracking(this, "pop");
|
|
1415
|
+
},
|
|
1416
|
+
push(...args) {
|
|
1417
|
+
return noTracking(this, "push", args);
|
|
1418
|
+
},
|
|
1419
|
+
reduce(fn, ...args) {
|
|
1420
|
+
return reduce(this, "reduce", fn, args);
|
|
1421
|
+
},
|
|
1422
|
+
reduceRight(fn, ...args) {
|
|
1423
|
+
return reduce(this, "reduceRight", fn, args);
|
|
1424
|
+
},
|
|
1425
|
+
shift() {
|
|
1426
|
+
return noTracking(this, "shift");
|
|
1427
|
+
},
|
|
1428
|
+
// slice could use ARRAY_ITERATE but also seems to beg for range tracking
|
|
1429
|
+
some(fn, thisArg) {
|
|
1430
|
+
return apply(this, "some", fn, thisArg, void 0, arguments);
|
|
1431
|
+
},
|
|
1432
|
+
splice(...args) {
|
|
1433
|
+
return noTracking(this, "splice", args);
|
|
1434
|
+
},
|
|
1435
|
+
toReversed() {
|
|
1436
|
+
return reactiveReadArray(this).toReversed();
|
|
1437
|
+
},
|
|
1438
|
+
toSorted(comparer) {
|
|
1439
|
+
return reactiveReadArray(this).toSorted(comparer);
|
|
1440
|
+
},
|
|
1441
|
+
toSpliced(...args) {
|
|
1442
|
+
return reactiveReadArray(this).toSpliced(...args);
|
|
1443
|
+
},
|
|
1444
|
+
unshift(...args) {
|
|
1445
|
+
return noTracking(this, "unshift", args);
|
|
1446
|
+
},
|
|
1447
|
+
values() {
|
|
1448
|
+
return iterator(this, "values", (item) => toWrapped(this, item));
|
|
1449
|
+
}
|
|
1450
|
+
};
|
|
1451
|
+
function iterator(self2, method, wrapValue) {
|
|
1452
|
+
const arr = shallowReadArray(self2);
|
|
1453
|
+
const iter = arr[method]();
|
|
1454
|
+
if (arr !== self2 && !/* @__PURE__ */ isShallow(self2)) {
|
|
1455
|
+
iter._next = iter.next;
|
|
1456
|
+
iter.next = () => {
|
|
1457
|
+
const result = iter._next();
|
|
1458
|
+
if (!result.done) {
|
|
1459
|
+
result.value = wrapValue(result.value);
|
|
1460
|
+
}
|
|
1461
|
+
return result;
|
|
1462
|
+
};
|
|
1463
|
+
}
|
|
1464
|
+
return iter;
|
|
1465
|
+
}
|
|
1466
|
+
var arrayProto = Array.prototype;
|
|
1467
|
+
function apply(self2, method, fn, thisArg, wrappedRetFn, args) {
|
|
1468
|
+
const arr = shallowReadArray(self2);
|
|
1469
|
+
const needsWrap = arr !== self2 && !/* @__PURE__ */ isShallow(self2);
|
|
1470
|
+
const methodFn = arr[method];
|
|
1471
|
+
if (methodFn !== arrayProto[method]) {
|
|
1472
|
+
const result2 = methodFn.apply(self2, args);
|
|
1473
|
+
return needsWrap ? toReactive(result2) : result2;
|
|
1474
|
+
}
|
|
1475
|
+
let wrappedFn = fn;
|
|
1476
|
+
if (arr !== self2) {
|
|
1477
|
+
if (needsWrap) {
|
|
1478
|
+
wrappedFn = function(item, index) {
|
|
1479
|
+
return fn.call(this, toWrapped(self2, item), index, self2);
|
|
1480
|
+
};
|
|
1481
|
+
} else if (fn.length > 2) {
|
|
1482
|
+
wrappedFn = function(item, index) {
|
|
1483
|
+
return fn.call(this, item, index, self2);
|
|
1484
|
+
};
|
|
1485
|
+
}
|
|
1486
|
+
}
|
|
1487
|
+
const result = methodFn.call(arr, wrappedFn, thisArg);
|
|
1488
|
+
return needsWrap && wrappedRetFn ? wrappedRetFn(result) : result;
|
|
1489
|
+
}
|
|
1490
|
+
function reduce(self2, method, fn, args) {
|
|
1491
|
+
const arr = shallowReadArray(self2);
|
|
1492
|
+
let wrappedFn = fn;
|
|
1493
|
+
if (arr !== self2) {
|
|
1494
|
+
if (!/* @__PURE__ */ isShallow(self2)) {
|
|
1495
|
+
wrappedFn = function(acc, item, index) {
|
|
1496
|
+
return fn.call(this, acc, toWrapped(self2, item), index, self2);
|
|
1497
|
+
};
|
|
1498
|
+
} else if (fn.length > 3) {
|
|
1499
|
+
wrappedFn = function(acc, item, index) {
|
|
1500
|
+
return fn.call(this, acc, item, index, self2);
|
|
1501
|
+
};
|
|
1502
|
+
}
|
|
1503
|
+
}
|
|
1504
|
+
return arr[method](wrappedFn, ...args);
|
|
1505
|
+
}
|
|
1506
|
+
function searchProxy(self2, method, args) {
|
|
1507
|
+
const arr = /* @__PURE__ */ toRaw(self2);
|
|
1508
|
+
track(arr, "iterate", ARRAY_ITERATE_KEY);
|
|
1509
|
+
const res = arr[method](...args);
|
|
1510
|
+
if ((res === -1 || res === false) && /* @__PURE__ */ isProxy(args[0])) {
|
|
1511
|
+
args[0] = /* @__PURE__ */ toRaw(args[0]);
|
|
1512
|
+
return arr[method](...args);
|
|
1513
|
+
}
|
|
1514
|
+
return res;
|
|
1515
|
+
}
|
|
1516
|
+
function noTracking(self2, method, args = []) {
|
|
1517
|
+
pauseTracking();
|
|
1518
|
+
startBatch();
|
|
1519
|
+
const res = (/* @__PURE__ */ toRaw(self2))[method].apply(self2, args);
|
|
1520
|
+
endBatch();
|
|
1521
|
+
resetTracking();
|
|
1522
|
+
return res;
|
|
1523
|
+
}
|
|
1524
|
+
var isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`);
|
|
1525
|
+
var builtInSymbols = new Set(
|
|
1526
|
+
/* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol)
|
|
1527
|
+
);
|
|
1528
|
+
function hasOwnProperty2(key) {
|
|
1529
|
+
if (!isSymbol(key)) key = String(key);
|
|
1530
|
+
const obj = /* @__PURE__ */ toRaw(this);
|
|
1531
|
+
track(obj, "has", key);
|
|
1532
|
+
return obj.hasOwnProperty(key);
|
|
1533
|
+
}
|
|
1534
|
+
var BaseReactiveHandler = class {
|
|
1535
|
+
constructor(_isReadonly = false, _isShallow = false) {
|
|
1536
|
+
this._isReadonly = _isReadonly;
|
|
1537
|
+
this._isShallow = _isShallow;
|
|
1538
|
+
}
|
|
1539
|
+
get(target, key, receiver) {
|
|
1540
|
+
if (key === "__v_skip") return target["__v_skip"];
|
|
1541
|
+
const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow;
|
|
1542
|
+
if (key === "__v_isReactive") {
|
|
1543
|
+
return !isReadonly2;
|
|
1544
|
+
} else if (key === "__v_isReadonly") {
|
|
1545
|
+
return isReadonly2;
|
|
1546
|
+
} else if (key === "__v_isShallow") {
|
|
1547
|
+
return isShallow2;
|
|
1548
|
+
} else if (key === "__v_raw") {
|
|
1549
|
+
if (receiver === (isReadonly2 ? isShallow2 ? shallowReadonlyMap : readonlyMap : isShallow2 ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype
|
|
1550
|
+
// this means the receiver is a user proxy of the reactive proxy
|
|
1551
|
+
Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) {
|
|
1552
|
+
return target;
|
|
1553
|
+
}
|
|
1554
|
+
return;
|
|
1555
|
+
}
|
|
1556
|
+
const targetIsArray = isArray(target);
|
|
1557
|
+
if (!isReadonly2) {
|
|
1558
|
+
let fn;
|
|
1559
|
+
if (targetIsArray && (fn = arrayInstrumentations[key])) {
|
|
1560
|
+
return fn;
|
|
1561
|
+
}
|
|
1562
|
+
if (key === "hasOwnProperty") {
|
|
1563
|
+
return hasOwnProperty2;
|
|
1564
|
+
}
|
|
1565
|
+
}
|
|
1566
|
+
const res = Reflect.get(
|
|
1567
|
+
target,
|
|
1568
|
+
key,
|
|
1569
|
+
// if this is a proxy wrapping a ref, return methods using the raw ref
|
|
1570
|
+
// as receiver so that we don't have to call `toRaw` on the ref in all
|
|
1571
|
+
// its class methods
|
|
1572
|
+
/* @__PURE__ */ isRef(target) ? target : receiver
|
|
1573
|
+
);
|
|
1574
|
+
if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) {
|
|
1575
|
+
return res;
|
|
1576
|
+
}
|
|
1577
|
+
if (!isReadonly2) {
|
|
1578
|
+
track(target, "get", key);
|
|
1579
|
+
}
|
|
1580
|
+
if (isShallow2) {
|
|
1581
|
+
return res;
|
|
1582
|
+
}
|
|
1583
|
+
if (/* @__PURE__ */ isRef(res)) {
|
|
1584
|
+
const value = targetIsArray && isIntegerKey(key) ? res : res.value;
|
|
1585
|
+
return isReadonly2 && isObject(value) ? /* @__PURE__ */ readonly(value) : value;
|
|
1586
|
+
}
|
|
1587
|
+
if (isObject(res)) {
|
|
1588
|
+
return isReadonly2 ? /* @__PURE__ */ readonly(res) : /* @__PURE__ */ reactive(res);
|
|
1589
|
+
}
|
|
1590
|
+
return res;
|
|
1591
|
+
}
|
|
1592
|
+
};
|
|
1593
|
+
var MutableReactiveHandler = class extends BaseReactiveHandler {
|
|
1594
|
+
constructor(isShallow2 = false) {
|
|
1595
|
+
super(false, isShallow2);
|
|
1596
|
+
}
|
|
1597
|
+
set(target, key, value, receiver) {
|
|
1598
|
+
let oldValue = target[key];
|
|
1599
|
+
const isArrayWithIntegerKey = isArray(target) && isIntegerKey(key);
|
|
1600
|
+
if (!this._isShallow) {
|
|
1601
|
+
const isOldValueReadonly = /* @__PURE__ */ isReadonly(oldValue);
|
|
1602
|
+
if (!/* @__PURE__ */ isShallow(value) && !/* @__PURE__ */ isReadonly(value)) {
|
|
1603
|
+
oldValue = /* @__PURE__ */ toRaw(oldValue);
|
|
1604
|
+
value = /* @__PURE__ */ toRaw(value);
|
|
1605
|
+
}
|
|
1606
|
+
if (!isArrayWithIntegerKey && /* @__PURE__ */ isRef(oldValue) && !/* @__PURE__ */ isRef(value)) {
|
|
1607
|
+
if (isOldValueReadonly) {
|
|
1608
|
+
if (true) {
|
|
1609
|
+
warn(
|
|
1610
|
+
`Set operation on key "${String(key)}" failed: target is readonly.`,
|
|
1611
|
+
target[key]
|
|
1612
|
+
);
|
|
1613
|
+
}
|
|
1614
|
+
return true;
|
|
1615
|
+
} else {
|
|
1616
|
+
oldValue.value = value;
|
|
1617
|
+
return true;
|
|
1618
|
+
}
|
|
1619
|
+
}
|
|
1620
|
+
}
|
|
1621
|
+
const hadKey = isArrayWithIntegerKey ? Number(key) < target.length : hasOwn(target, key);
|
|
1622
|
+
const result = Reflect.set(
|
|
1623
|
+
target,
|
|
1624
|
+
key,
|
|
1625
|
+
value,
|
|
1626
|
+
/* @__PURE__ */ isRef(target) ? target : receiver
|
|
1627
|
+
);
|
|
1628
|
+
if (target === /* @__PURE__ */ toRaw(receiver)) {
|
|
1629
|
+
if (!hadKey) {
|
|
1630
|
+
trigger(target, "add", key, value);
|
|
1631
|
+
} else if (hasChanged(value, oldValue)) {
|
|
1632
|
+
trigger(target, "set", key, value, oldValue);
|
|
1633
|
+
}
|
|
1634
|
+
}
|
|
1635
|
+
return result;
|
|
1636
|
+
}
|
|
1637
|
+
deleteProperty(target, key) {
|
|
1638
|
+
const hadKey = hasOwn(target, key);
|
|
1639
|
+
const oldValue = target[key];
|
|
1640
|
+
const result = Reflect.deleteProperty(target, key);
|
|
1641
|
+
if (result && hadKey) {
|
|
1642
|
+
trigger(target, "delete", key, void 0, oldValue);
|
|
1643
|
+
}
|
|
1644
|
+
return result;
|
|
1645
|
+
}
|
|
1646
|
+
has(target, key) {
|
|
1647
|
+
const result = Reflect.has(target, key);
|
|
1648
|
+
if (!isSymbol(key) || !builtInSymbols.has(key)) {
|
|
1649
|
+
track(target, "has", key);
|
|
1650
|
+
}
|
|
1651
|
+
return result;
|
|
1652
|
+
}
|
|
1653
|
+
ownKeys(target) {
|
|
1654
|
+
track(
|
|
1655
|
+
target,
|
|
1656
|
+
"iterate",
|
|
1657
|
+
isArray(target) ? "length" : ITERATE_KEY
|
|
1658
|
+
);
|
|
1659
|
+
return Reflect.ownKeys(target);
|
|
1660
|
+
}
|
|
1661
|
+
};
|
|
1662
|
+
var ReadonlyReactiveHandler = class extends BaseReactiveHandler {
|
|
1663
|
+
constructor(isShallow2 = false) {
|
|
1664
|
+
super(true, isShallow2);
|
|
1665
|
+
}
|
|
1666
|
+
set(target, key) {
|
|
1667
|
+
if (true) {
|
|
1668
|
+
warn(
|
|
1669
|
+
`Set operation on key "${String(key)}" failed: target is readonly.`,
|
|
1670
|
+
target
|
|
1671
|
+
);
|
|
1672
|
+
}
|
|
1673
|
+
return true;
|
|
1674
|
+
}
|
|
1675
|
+
deleteProperty(target, key) {
|
|
1676
|
+
if (true) {
|
|
1677
|
+
warn(
|
|
1678
|
+
`Delete operation on key "${String(key)}" failed: target is readonly.`,
|
|
1679
|
+
target
|
|
1680
|
+
);
|
|
1681
|
+
}
|
|
1682
|
+
return true;
|
|
1683
|
+
}
|
|
1684
|
+
};
|
|
1685
|
+
var mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler();
|
|
1686
|
+
var readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler();
|
|
1687
|
+
var toShallow = (value) => value;
|
|
1688
|
+
var getProto = (v2) => Reflect.getPrototypeOf(v2);
|
|
1689
|
+
function createIterableMethod(method, isReadonly2, isShallow2) {
|
|
1690
|
+
return function(...args) {
|
|
1691
|
+
const target = this["__v_raw"];
|
|
1692
|
+
const rawTarget = /* @__PURE__ */ toRaw(target);
|
|
1693
|
+
const targetIsMap = isMap(rawTarget);
|
|
1694
|
+
const isPair = method === "entries" || method === Symbol.iterator && targetIsMap;
|
|
1695
|
+
const isKeyOnly = method === "keys" && targetIsMap;
|
|
1696
|
+
const innerIterator = target[method](...args);
|
|
1697
|
+
const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;
|
|
1698
|
+
!isReadonly2 && track(
|
|
1699
|
+
rawTarget,
|
|
1700
|
+
"iterate",
|
|
1701
|
+
isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY
|
|
1702
|
+
);
|
|
1703
|
+
return extend(
|
|
1704
|
+
// inheriting all iterator properties
|
|
1705
|
+
Object.create(innerIterator),
|
|
1706
|
+
{
|
|
1707
|
+
// iterator protocol
|
|
1708
|
+
next() {
|
|
1709
|
+
const { value, done } = innerIterator.next();
|
|
1710
|
+
return done ? { value, done } : {
|
|
1711
|
+
value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value),
|
|
1712
|
+
done
|
|
1713
|
+
};
|
|
1714
|
+
}
|
|
1715
|
+
}
|
|
1716
|
+
);
|
|
1717
|
+
};
|
|
1718
|
+
}
|
|
1719
|
+
function createReadonlyMethod(type) {
|
|
1720
|
+
return function(...args) {
|
|
1721
|
+
if (true) {
|
|
1722
|
+
const key = args[0] ? `on key "${args[0]}" ` : ``;
|
|
1723
|
+
warn(
|
|
1724
|
+
`${capitalize(type)} operation ${key}failed: target is readonly.`,
|
|
1725
|
+
/* @__PURE__ */ toRaw(this)
|
|
1726
|
+
);
|
|
1727
|
+
}
|
|
1728
|
+
return type === "delete" ? false : type === "clear" ? void 0 : this;
|
|
1729
|
+
};
|
|
1730
|
+
}
|
|
1731
|
+
function createInstrumentations(readonly2, shallow) {
|
|
1732
|
+
const instrumentations = {
|
|
1733
|
+
get(key) {
|
|
1734
|
+
const target = this["__v_raw"];
|
|
1735
|
+
const rawTarget = /* @__PURE__ */ toRaw(target);
|
|
1736
|
+
const rawKey = /* @__PURE__ */ toRaw(key);
|
|
1737
|
+
if (!readonly2) {
|
|
1738
|
+
if (hasChanged(key, rawKey)) {
|
|
1739
|
+
track(rawTarget, "get", key);
|
|
1740
|
+
}
|
|
1741
|
+
track(rawTarget, "get", rawKey);
|
|
1742
|
+
}
|
|
1743
|
+
const { has } = getProto(rawTarget);
|
|
1744
|
+
const wrap = shallow ? toShallow : readonly2 ? toReadonly : toReactive;
|
|
1745
|
+
if (has.call(rawTarget, key)) {
|
|
1746
|
+
return wrap(target.get(key));
|
|
1747
|
+
} else if (has.call(rawTarget, rawKey)) {
|
|
1748
|
+
return wrap(target.get(rawKey));
|
|
1749
|
+
} else if (target !== rawTarget) {
|
|
1750
|
+
target.get(key);
|
|
1751
|
+
}
|
|
1752
|
+
},
|
|
1753
|
+
get size() {
|
|
1754
|
+
const target = this["__v_raw"];
|
|
1755
|
+
!readonly2 && track(/* @__PURE__ */ toRaw(target), "iterate", ITERATE_KEY);
|
|
1756
|
+
return target.size;
|
|
1757
|
+
},
|
|
1758
|
+
has(key) {
|
|
1759
|
+
const target = this["__v_raw"];
|
|
1760
|
+
const rawTarget = /* @__PURE__ */ toRaw(target);
|
|
1761
|
+
const rawKey = /* @__PURE__ */ toRaw(key);
|
|
1762
|
+
if (!readonly2) {
|
|
1763
|
+
if (hasChanged(key, rawKey)) {
|
|
1764
|
+
track(rawTarget, "has", key);
|
|
1765
|
+
}
|
|
1766
|
+
track(rawTarget, "has", rawKey);
|
|
1767
|
+
}
|
|
1768
|
+
return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);
|
|
1769
|
+
},
|
|
1770
|
+
forEach(callback, thisArg) {
|
|
1771
|
+
const observed = this;
|
|
1772
|
+
const target = observed["__v_raw"];
|
|
1773
|
+
const rawTarget = /* @__PURE__ */ toRaw(target);
|
|
1774
|
+
const wrap = shallow ? toShallow : readonly2 ? toReadonly : toReactive;
|
|
1775
|
+
!readonly2 && track(rawTarget, "iterate", ITERATE_KEY);
|
|
1776
|
+
return target.forEach((value, key) => {
|
|
1777
|
+
return callback.call(thisArg, wrap(value), wrap(key), observed);
|
|
1778
|
+
});
|
|
1779
|
+
}
|
|
1780
|
+
};
|
|
1781
|
+
extend(
|
|
1782
|
+
instrumentations,
|
|
1783
|
+
readonly2 ? {
|
|
1784
|
+
add: createReadonlyMethod("add"),
|
|
1785
|
+
set: createReadonlyMethod("set"),
|
|
1786
|
+
delete: createReadonlyMethod("delete"),
|
|
1787
|
+
clear: createReadonlyMethod("clear")
|
|
1788
|
+
} : {
|
|
1789
|
+
add(value) {
|
|
1790
|
+
if (!shallow && !/* @__PURE__ */ isShallow(value) && !/* @__PURE__ */ isReadonly(value)) {
|
|
1791
|
+
value = /* @__PURE__ */ toRaw(value);
|
|
1792
|
+
}
|
|
1793
|
+
const target = /* @__PURE__ */ toRaw(this);
|
|
1794
|
+
const proto = getProto(target);
|
|
1795
|
+
const hadKey = proto.has.call(target, value);
|
|
1796
|
+
if (!hadKey) {
|
|
1797
|
+
target.add(value);
|
|
1798
|
+
trigger(target, "add", value, value);
|
|
1799
|
+
}
|
|
1800
|
+
return this;
|
|
1801
|
+
},
|
|
1802
|
+
set(key, value) {
|
|
1803
|
+
if (!shallow && !/* @__PURE__ */ isShallow(value) && !/* @__PURE__ */ isReadonly(value)) {
|
|
1804
|
+
value = /* @__PURE__ */ toRaw(value);
|
|
1805
|
+
}
|
|
1806
|
+
const target = /* @__PURE__ */ toRaw(this);
|
|
1807
|
+
const { has, get } = getProto(target);
|
|
1808
|
+
let hadKey = has.call(target, key);
|
|
1809
|
+
if (!hadKey) {
|
|
1810
|
+
key = /* @__PURE__ */ toRaw(key);
|
|
1811
|
+
hadKey = has.call(target, key);
|
|
1812
|
+
} else if (true) {
|
|
1813
|
+
checkIdentityKeys(target, has, key);
|
|
1814
|
+
}
|
|
1815
|
+
const oldValue = get.call(target, key);
|
|
1816
|
+
target.set(key, value);
|
|
1817
|
+
if (!hadKey) {
|
|
1818
|
+
trigger(target, "add", key, value);
|
|
1819
|
+
} else if (hasChanged(value, oldValue)) {
|
|
1820
|
+
trigger(target, "set", key, value, oldValue);
|
|
1821
|
+
}
|
|
1822
|
+
return this;
|
|
1823
|
+
},
|
|
1824
|
+
delete(key) {
|
|
1825
|
+
const target = /* @__PURE__ */ toRaw(this);
|
|
1826
|
+
const { has, get } = getProto(target);
|
|
1827
|
+
let hadKey = has.call(target, key);
|
|
1828
|
+
if (!hadKey) {
|
|
1829
|
+
key = /* @__PURE__ */ toRaw(key);
|
|
1830
|
+
hadKey = has.call(target, key);
|
|
1831
|
+
} else if (true) {
|
|
1832
|
+
checkIdentityKeys(target, has, key);
|
|
1833
|
+
}
|
|
1834
|
+
const oldValue = get ? get.call(target, key) : void 0;
|
|
1835
|
+
const result = target.delete(key);
|
|
1836
|
+
if (hadKey) {
|
|
1837
|
+
trigger(target, "delete", key, void 0, oldValue);
|
|
1838
|
+
}
|
|
1839
|
+
return result;
|
|
1840
|
+
},
|
|
1841
|
+
clear() {
|
|
1842
|
+
const target = /* @__PURE__ */ toRaw(this);
|
|
1843
|
+
const hadItems = target.size !== 0;
|
|
1844
|
+
const oldTarget = true ? isMap(target) ? new Map(target) : new Set(target) : void 0;
|
|
1845
|
+
const result = target.clear();
|
|
1846
|
+
if (hadItems) {
|
|
1847
|
+
trigger(
|
|
1848
|
+
target,
|
|
1849
|
+
"clear",
|
|
1850
|
+
void 0,
|
|
1851
|
+
void 0,
|
|
1852
|
+
oldTarget
|
|
1853
|
+
);
|
|
1854
|
+
}
|
|
1855
|
+
return result;
|
|
1856
|
+
}
|
|
1857
|
+
}
|
|
1858
|
+
);
|
|
1859
|
+
const iteratorMethods = [
|
|
1860
|
+
"keys",
|
|
1861
|
+
"values",
|
|
1862
|
+
"entries",
|
|
1863
|
+
Symbol.iterator
|
|
1864
|
+
];
|
|
1865
|
+
iteratorMethods.forEach((method) => {
|
|
1866
|
+
instrumentations[method] = createIterableMethod(method, readonly2, shallow);
|
|
1867
|
+
});
|
|
1868
|
+
return instrumentations;
|
|
1869
|
+
}
|
|
1870
|
+
function createInstrumentationGetter(isReadonly2, shallow) {
|
|
1871
|
+
const instrumentations = createInstrumentations(isReadonly2, shallow);
|
|
1872
|
+
return (target, key, receiver) => {
|
|
1873
|
+
if (key === "__v_isReactive") {
|
|
1874
|
+
return !isReadonly2;
|
|
1875
|
+
} else if (key === "__v_isReadonly") {
|
|
1876
|
+
return isReadonly2;
|
|
1877
|
+
} else if (key === "__v_raw") {
|
|
1878
|
+
return target;
|
|
1879
|
+
}
|
|
1880
|
+
return Reflect.get(
|
|
1881
|
+
hasOwn(instrumentations, key) && key in target ? instrumentations : target,
|
|
1882
|
+
key,
|
|
1883
|
+
receiver
|
|
1884
|
+
);
|
|
1885
|
+
};
|
|
1886
|
+
}
|
|
1887
|
+
var mutableCollectionHandlers = {
|
|
1888
|
+
get: /* @__PURE__ */ createInstrumentationGetter(false, false)
|
|
1889
|
+
};
|
|
1890
|
+
var readonlyCollectionHandlers = {
|
|
1891
|
+
get: /* @__PURE__ */ createInstrumentationGetter(true, false)
|
|
1892
|
+
};
|
|
1893
|
+
function checkIdentityKeys(target, has, key) {
|
|
1894
|
+
const rawKey = /* @__PURE__ */ toRaw(key);
|
|
1895
|
+
if (rawKey !== key && has.call(target, rawKey)) {
|
|
1896
|
+
const type = toRawType(target);
|
|
1897
|
+
warn(
|
|
1898
|
+
`Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`
|
|
1899
|
+
);
|
|
1900
|
+
}
|
|
1901
|
+
}
|
|
1902
|
+
var reactiveMap = /* @__PURE__ */ new WeakMap();
|
|
1903
|
+
var shallowReactiveMap = /* @__PURE__ */ new WeakMap();
|
|
1904
|
+
var readonlyMap = /* @__PURE__ */ new WeakMap();
|
|
1905
|
+
var shallowReadonlyMap = /* @__PURE__ */ new WeakMap();
|
|
1906
|
+
function targetTypeMap(rawType) {
|
|
1907
|
+
switch (rawType) {
|
|
1908
|
+
case "Object":
|
|
1909
|
+
case "Array":
|
|
1910
|
+
return 1;
|
|
1911
|
+
case "Map":
|
|
1912
|
+
case "Set":
|
|
1913
|
+
case "WeakMap":
|
|
1914
|
+
case "WeakSet":
|
|
1915
|
+
return 2;
|
|
1916
|
+
default:
|
|
1917
|
+
return 0;
|
|
1918
|
+
}
|
|
1919
|
+
}
|
|
1920
|
+
function getTargetType(value) {
|
|
1921
|
+
return value["__v_skip"] || !Object.isExtensible(value) ? 0 : targetTypeMap(toRawType(value));
|
|
1922
|
+
}
|
|
1923
|
+
// @__NO_SIDE_EFFECTS__
|
|
1924
|
+
function reactive(target) {
|
|
1925
|
+
if (/* @__PURE__ */ isReadonly(target)) {
|
|
1926
|
+
return target;
|
|
1927
|
+
}
|
|
1928
|
+
return createReactiveObject(
|
|
1929
|
+
target,
|
|
1930
|
+
false,
|
|
1931
|
+
mutableHandlers,
|
|
1932
|
+
mutableCollectionHandlers,
|
|
1933
|
+
reactiveMap
|
|
1934
|
+
);
|
|
1935
|
+
}
|
|
1936
|
+
// @__NO_SIDE_EFFECTS__
|
|
1937
|
+
function readonly(target) {
|
|
1938
|
+
return createReactiveObject(
|
|
1939
|
+
target,
|
|
1940
|
+
true,
|
|
1941
|
+
readonlyHandlers,
|
|
1942
|
+
readonlyCollectionHandlers,
|
|
1943
|
+
readonlyMap
|
|
1944
|
+
);
|
|
1945
|
+
}
|
|
1946
|
+
function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) {
|
|
1947
|
+
if (!isObject(target)) {
|
|
1948
|
+
if (true) {
|
|
1949
|
+
warn(
|
|
1950
|
+
`value cannot be made ${isReadonly2 ? "readonly" : "reactive"}: ${String(
|
|
1951
|
+
target
|
|
1952
|
+
)}`
|
|
1953
|
+
);
|
|
1954
|
+
}
|
|
1955
|
+
return target;
|
|
1956
|
+
}
|
|
1957
|
+
if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) {
|
|
1958
|
+
return target;
|
|
1959
|
+
}
|
|
1960
|
+
const targetType = getTargetType(target);
|
|
1961
|
+
if (targetType === 0) {
|
|
1962
|
+
return target;
|
|
1963
|
+
}
|
|
1964
|
+
const existingProxy = proxyMap.get(target);
|
|
1965
|
+
if (existingProxy) {
|
|
1966
|
+
return existingProxy;
|
|
1967
|
+
}
|
|
1968
|
+
const proxy = new Proxy(
|
|
1969
|
+
target,
|
|
1970
|
+
targetType === 2 ? collectionHandlers : baseHandlers
|
|
1971
|
+
);
|
|
1972
|
+
proxyMap.set(target, proxy);
|
|
1973
|
+
return proxy;
|
|
1974
|
+
}
|
|
1975
|
+
// @__NO_SIDE_EFFECTS__
|
|
1976
|
+
function isReactive(value) {
|
|
1977
|
+
if (/* @__PURE__ */ isReadonly(value)) {
|
|
1978
|
+
return /* @__PURE__ */ isReactive(value["__v_raw"]);
|
|
1979
|
+
}
|
|
1980
|
+
return !!(value && value["__v_isReactive"]);
|
|
1981
|
+
}
|
|
1982
|
+
// @__NO_SIDE_EFFECTS__
|
|
1983
|
+
function isReadonly(value) {
|
|
1984
|
+
return !!(value && value["__v_isReadonly"]);
|
|
1985
|
+
}
|
|
1986
|
+
// @__NO_SIDE_EFFECTS__
|
|
1987
|
+
function isShallow(value) {
|
|
1988
|
+
return !!(value && value["__v_isShallow"]);
|
|
1989
|
+
}
|
|
1990
|
+
// @__NO_SIDE_EFFECTS__
|
|
1991
|
+
function isProxy(value) {
|
|
1992
|
+
return value ? !!value["__v_raw"] : false;
|
|
1993
|
+
}
|
|
1994
|
+
// @__NO_SIDE_EFFECTS__
|
|
1995
|
+
function toRaw(observed) {
|
|
1996
|
+
const raw = observed && observed["__v_raw"];
|
|
1997
|
+
return raw ? /* @__PURE__ */ toRaw(raw) : observed;
|
|
1998
|
+
}
|
|
1999
|
+
var toReactive = (value) => isObject(value) ? /* @__PURE__ */ reactive(value) : value;
|
|
2000
|
+
var toReadonly = (value) => isObject(value) ? /* @__PURE__ */ readonly(value) : value;
|
|
2001
|
+
// @__NO_SIDE_EFFECTS__
|
|
2002
|
+
function isRef(r) {
|
|
2003
|
+
return r ? r["__v_isRef"] === true : false;
|
|
2004
|
+
}
|
|
2005
|
+
// @__NO_SIDE_EFFECTS__
|
|
2006
|
+
function ref(value) {
|
|
2007
|
+
return createRef(value, false);
|
|
2008
|
+
}
|
|
2009
|
+
// @__NO_SIDE_EFFECTS__
|
|
2010
|
+
function shallowRef(value) {
|
|
2011
|
+
return createRef(value, true);
|
|
2012
|
+
}
|
|
2013
|
+
function createRef(rawValue, shallow) {
|
|
2014
|
+
if (/* @__PURE__ */ isRef(rawValue)) {
|
|
2015
|
+
return rawValue;
|
|
2016
|
+
}
|
|
2017
|
+
return new RefImpl(rawValue, shallow);
|
|
2018
|
+
}
|
|
2019
|
+
var RefImpl = class {
|
|
2020
|
+
constructor(value, isShallow2) {
|
|
2021
|
+
this.dep = new Dep();
|
|
2022
|
+
this["__v_isRef"] = true;
|
|
2023
|
+
this["__v_isShallow"] = false;
|
|
2024
|
+
this._rawValue = isShallow2 ? value : /* @__PURE__ */ toRaw(value);
|
|
2025
|
+
this._value = isShallow2 ? value : toReactive(value);
|
|
2026
|
+
this["__v_isShallow"] = isShallow2;
|
|
2027
|
+
}
|
|
2028
|
+
get value() {
|
|
2029
|
+
if (true) {
|
|
2030
|
+
this.dep.track({
|
|
2031
|
+
target: this,
|
|
2032
|
+
type: "get",
|
|
2033
|
+
key: "value"
|
|
2034
|
+
});
|
|
2035
|
+
} else {
|
|
2036
|
+
this.dep.track();
|
|
2037
|
+
}
|
|
2038
|
+
return this._value;
|
|
2039
|
+
}
|
|
2040
|
+
set value(newValue) {
|
|
2041
|
+
const oldValue = this._rawValue;
|
|
2042
|
+
const useDirectValue = this["__v_isShallow"] || /* @__PURE__ */ isShallow(newValue) || /* @__PURE__ */ isReadonly(newValue);
|
|
2043
|
+
newValue = useDirectValue ? newValue : /* @__PURE__ */ toRaw(newValue);
|
|
2044
|
+
if (hasChanged(newValue, oldValue)) {
|
|
2045
|
+
this._rawValue = newValue;
|
|
2046
|
+
this._value = useDirectValue ? newValue : toReactive(newValue);
|
|
2047
|
+
if (true) {
|
|
2048
|
+
this.dep.trigger({
|
|
2049
|
+
target: this,
|
|
2050
|
+
type: "set",
|
|
2051
|
+
key: "value",
|
|
2052
|
+
newValue,
|
|
2053
|
+
oldValue
|
|
2054
|
+
});
|
|
2055
|
+
} else {
|
|
2056
|
+
this.dep.trigger();
|
|
2057
|
+
}
|
|
2058
|
+
}
|
|
2059
|
+
}
|
|
2060
|
+
};
|
|
2061
|
+
function triggerRef(ref2) {
|
|
2062
|
+
if (ref2.dep) {
|
|
2063
|
+
if (true) {
|
|
2064
|
+
ref2.dep.trigger({
|
|
2065
|
+
target: ref2,
|
|
2066
|
+
type: "set",
|
|
2067
|
+
key: "value",
|
|
2068
|
+
newValue: ref2._value
|
|
2069
|
+
});
|
|
2070
|
+
} else {
|
|
2071
|
+
ref2.dep.trigger();
|
|
2072
|
+
}
|
|
2073
|
+
}
|
|
2074
|
+
}
|
|
2075
|
+
var ComputedRefImpl = class {
|
|
2076
|
+
constructor(fn, setter, isSSR) {
|
|
2077
|
+
this.fn = fn;
|
|
2078
|
+
this.setter = setter;
|
|
2079
|
+
this._value = void 0;
|
|
2080
|
+
this.dep = new Dep(this);
|
|
2081
|
+
this.__v_isRef = true;
|
|
2082
|
+
this.deps = void 0;
|
|
2083
|
+
this.depsTail = void 0;
|
|
2084
|
+
this.flags = 16;
|
|
2085
|
+
this.globalVersion = globalVersion - 1;
|
|
2086
|
+
this.next = void 0;
|
|
2087
|
+
this.effect = this;
|
|
2088
|
+
this["__v_isReadonly"] = !setter;
|
|
2089
|
+
this.isSSR = isSSR;
|
|
2090
|
+
}
|
|
2091
|
+
/**
|
|
2092
|
+
* @internal
|
|
2093
|
+
*/
|
|
2094
|
+
notify() {
|
|
2095
|
+
this.flags |= 16;
|
|
2096
|
+
if (!(this.flags & 8) && // avoid infinite self recursion
|
|
2097
|
+
activeSub !== this) {
|
|
2098
|
+
batch(this, true);
|
|
2099
|
+
return true;
|
|
2100
|
+
} else if (true) ;
|
|
2101
|
+
}
|
|
2102
|
+
get value() {
|
|
2103
|
+
const link = true ? this.dep.track({
|
|
2104
|
+
target: this,
|
|
2105
|
+
type: "get",
|
|
2106
|
+
key: "value"
|
|
2107
|
+
}) : this.dep.track();
|
|
2108
|
+
refreshComputed(this);
|
|
2109
|
+
if (link) {
|
|
2110
|
+
link.version = this.dep.version;
|
|
2111
|
+
}
|
|
2112
|
+
return this._value;
|
|
2113
|
+
}
|
|
2114
|
+
set value(newValue) {
|
|
2115
|
+
if (this.setter) {
|
|
2116
|
+
this.setter(newValue);
|
|
2117
|
+
} else if (true) {
|
|
2118
|
+
warn("Write operation failed: computed value is readonly");
|
|
2119
|
+
}
|
|
2120
|
+
}
|
|
2121
|
+
};
|
|
2122
|
+
// @__NO_SIDE_EFFECTS__
|
|
2123
|
+
function computed(getterOrOptions, debugOptions, isSSR = false) {
|
|
2124
|
+
let getter;
|
|
2125
|
+
let setter;
|
|
2126
|
+
if (isFunction(getterOrOptions)) {
|
|
2127
|
+
getter = getterOrOptions;
|
|
2128
|
+
} else {
|
|
2129
|
+
getter = getterOrOptions.get;
|
|
2130
|
+
setter = getterOrOptions.set;
|
|
2131
|
+
}
|
|
2132
|
+
const cRef = new ComputedRefImpl(getter, setter, isSSR);
|
|
2133
|
+
if (debugOptions && !isSSR) {
|
|
2134
|
+
cRef.onTrack = debugOptions.onTrack;
|
|
2135
|
+
cRef.onTrigger = debugOptions.onTrigger;
|
|
2136
|
+
}
|
|
2137
|
+
return cRef;
|
|
2138
|
+
}
|
|
2139
|
+
var INITIAL_WATCHER_VALUE = {};
|
|
2140
|
+
var cleanupMap = /* @__PURE__ */ new WeakMap();
|
|
2141
|
+
var activeWatcher = void 0;
|
|
2142
|
+
function onWatcherCleanup(cleanupFn, failSilently = false, owner = activeWatcher) {
|
|
2143
|
+
if (owner) {
|
|
2144
|
+
let cleanups = cleanupMap.get(owner);
|
|
2145
|
+
if (!cleanups) cleanupMap.set(owner, cleanups = []);
|
|
2146
|
+
cleanups.push(cleanupFn);
|
|
2147
|
+
} else if (!failSilently) {
|
|
2148
|
+
warn(
|
|
2149
|
+
`onWatcherCleanup() was called when there was no active watcher to associate with.`
|
|
2150
|
+
);
|
|
2151
|
+
}
|
|
2152
|
+
}
|
|
2153
|
+
function watch(source, cb, options = EMPTY_OBJ) {
|
|
2154
|
+
const { immediate, deep, once, scheduler, augmentJob, call } = options;
|
|
2155
|
+
const warnInvalidSource = (s) => {
|
|
2156
|
+
(options.onWarn || warn)(
|
|
2157
|
+
`Invalid watch source: `,
|
|
2158
|
+
s,
|
|
2159
|
+
`A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.`
|
|
2160
|
+
);
|
|
2161
|
+
};
|
|
2162
|
+
const reactiveGetter = (source2) => {
|
|
2163
|
+
if (deep) return source2;
|
|
2164
|
+
if (/* @__PURE__ */ isShallow(source2) || deep === false || deep === 0)
|
|
2165
|
+
return traverse(source2, 1);
|
|
2166
|
+
return traverse(source2);
|
|
2167
|
+
};
|
|
2168
|
+
let effect2;
|
|
2169
|
+
let getter;
|
|
2170
|
+
let cleanup;
|
|
2171
|
+
let boundCleanup;
|
|
2172
|
+
let forceTrigger = false;
|
|
2173
|
+
let isMultiSource = false;
|
|
2174
|
+
if (/* @__PURE__ */ isRef(source)) {
|
|
2175
|
+
getter = () => source.value;
|
|
2176
|
+
forceTrigger = /* @__PURE__ */ isShallow(source);
|
|
2177
|
+
} else if (/* @__PURE__ */ isReactive(source)) {
|
|
2178
|
+
getter = () => reactiveGetter(source);
|
|
2179
|
+
forceTrigger = true;
|
|
2180
|
+
} else if (isArray(source)) {
|
|
2181
|
+
isMultiSource = true;
|
|
2182
|
+
forceTrigger = source.some((s) => /* @__PURE__ */ isReactive(s) || /* @__PURE__ */ isShallow(s));
|
|
2183
|
+
getter = () => source.map((s) => {
|
|
2184
|
+
if (/* @__PURE__ */ isRef(s)) {
|
|
2185
|
+
return s.value;
|
|
2186
|
+
} else if (/* @__PURE__ */ isReactive(s)) {
|
|
2187
|
+
return reactiveGetter(s);
|
|
2188
|
+
} else if (isFunction(s)) {
|
|
2189
|
+
return call ? call(s, 2) : s();
|
|
2190
|
+
} else {
|
|
2191
|
+
warnInvalidSource(s);
|
|
2192
|
+
}
|
|
2193
|
+
});
|
|
2194
|
+
} else if (isFunction(source)) {
|
|
2195
|
+
if (cb) {
|
|
2196
|
+
getter = call ? () => call(source, 2) : source;
|
|
2197
|
+
} else {
|
|
2198
|
+
getter = () => {
|
|
2199
|
+
if (cleanup) {
|
|
2200
|
+
pauseTracking();
|
|
2201
|
+
try {
|
|
2202
|
+
cleanup();
|
|
2203
|
+
} finally {
|
|
2204
|
+
resetTracking();
|
|
2205
|
+
}
|
|
2206
|
+
}
|
|
2207
|
+
const currentEffect = activeWatcher;
|
|
2208
|
+
activeWatcher = effect2;
|
|
2209
|
+
try {
|
|
2210
|
+
return call ? call(source, 3, [boundCleanup]) : source(boundCleanup);
|
|
2211
|
+
} finally {
|
|
2212
|
+
activeWatcher = currentEffect;
|
|
2213
|
+
}
|
|
2214
|
+
};
|
|
2215
|
+
}
|
|
2216
|
+
} else {
|
|
2217
|
+
getter = NOOP;
|
|
2218
|
+
warnInvalidSource(source);
|
|
2219
|
+
}
|
|
2220
|
+
if (cb && deep) {
|
|
2221
|
+
const baseGetter = getter;
|
|
2222
|
+
const depth = deep === true ? Infinity : deep;
|
|
2223
|
+
getter = () => traverse(baseGetter(), depth);
|
|
2224
|
+
}
|
|
2225
|
+
const scope = getCurrentScope();
|
|
2226
|
+
const watchHandle = () => {
|
|
2227
|
+
effect2.stop();
|
|
2228
|
+
if (scope && scope.active) {
|
|
2229
|
+
remove(scope.effects, effect2);
|
|
2230
|
+
}
|
|
2231
|
+
};
|
|
2232
|
+
if (once && cb) {
|
|
2233
|
+
const _cb = cb;
|
|
2234
|
+
cb = (...args) => {
|
|
2235
|
+
_cb(...args);
|
|
2236
|
+
watchHandle();
|
|
2237
|
+
};
|
|
2238
|
+
}
|
|
2239
|
+
let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;
|
|
2240
|
+
const job = (immediateFirstRun) => {
|
|
2241
|
+
if (!(effect2.flags & 1) || !effect2.dirty && !immediateFirstRun) {
|
|
2242
|
+
return;
|
|
2243
|
+
}
|
|
2244
|
+
if (cb) {
|
|
2245
|
+
const newValue = effect2.run();
|
|
2246
|
+
if (deep || forceTrigger || (isMultiSource ? newValue.some((v2, i) => hasChanged(v2, oldValue[i])) : hasChanged(newValue, oldValue))) {
|
|
2247
|
+
if (cleanup) {
|
|
2248
|
+
cleanup();
|
|
2249
|
+
}
|
|
2250
|
+
const currentWatcher = activeWatcher;
|
|
2251
|
+
activeWatcher = effect2;
|
|
2252
|
+
try {
|
|
2253
|
+
const args = [
|
|
2254
|
+
newValue,
|
|
2255
|
+
// pass undefined as the old value when it's changed for the first time
|
|
2256
|
+
oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue,
|
|
2257
|
+
boundCleanup
|
|
2258
|
+
];
|
|
2259
|
+
oldValue = newValue;
|
|
2260
|
+
call ? call(cb, 3, args) : (
|
|
2261
|
+
// @ts-expect-error
|
|
2262
|
+
cb(...args)
|
|
2263
|
+
);
|
|
2264
|
+
} finally {
|
|
2265
|
+
activeWatcher = currentWatcher;
|
|
2266
|
+
}
|
|
2267
|
+
}
|
|
2268
|
+
} else {
|
|
2269
|
+
effect2.run();
|
|
2270
|
+
}
|
|
2271
|
+
};
|
|
2272
|
+
if (augmentJob) {
|
|
2273
|
+
augmentJob(job);
|
|
2274
|
+
}
|
|
2275
|
+
effect2 = new ReactiveEffect(getter);
|
|
2276
|
+
effect2.scheduler = scheduler ? () => scheduler(job, false) : job;
|
|
2277
|
+
boundCleanup = (fn) => onWatcherCleanup(fn, false, effect2);
|
|
2278
|
+
cleanup = effect2.onStop = () => {
|
|
2279
|
+
const cleanups = cleanupMap.get(effect2);
|
|
2280
|
+
if (cleanups) {
|
|
2281
|
+
if (call) {
|
|
2282
|
+
call(cleanups, 4);
|
|
2283
|
+
} else {
|
|
2284
|
+
for (const cleanup2 of cleanups) cleanup2();
|
|
2285
|
+
}
|
|
2286
|
+
cleanupMap.delete(effect2);
|
|
2287
|
+
}
|
|
2288
|
+
};
|
|
2289
|
+
if (true) {
|
|
2290
|
+
effect2.onTrack = options.onTrack;
|
|
2291
|
+
effect2.onTrigger = options.onTrigger;
|
|
2292
|
+
}
|
|
2293
|
+
if (cb) {
|
|
2294
|
+
if (immediate) {
|
|
2295
|
+
job(true);
|
|
2296
|
+
} else {
|
|
2297
|
+
oldValue = effect2.run();
|
|
2298
|
+
}
|
|
2299
|
+
} else if (scheduler) {
|
|
2300
|
+
scheduler(job.bind(null, true), true);
|
|
2301
|
+
} else {
|
|
2302
|
+
effect2.run();
|
|
2303
|
+
}
|
|
2304
|
+
watchHandle.pause = effect2.pause.bind(effect2);
|
|
2305
|
+
watchHandle.resume = effect2.resume.bind(effect2);
|
|
2306
|
+
watchHandle.stop = watchHandle;
|
|
2307
|
+
return watchHandle;
|
|
2308
|
+
}
|
|
2309
|
+
function traverse(value, depth = Infinity, seen) {
|
|
2310
|
+
if (depth <= 0 || !isObject(value) || value["__v_skip"]) {
|
|
2311
|
+
return value;
|
|
2312
|
+
}
|
|
2313
|
+
seen = seen || /* @__PURE__ */ new Map();
|
|
2314
|
+
if ((seen.get(value) || 0) >= depth) {
|
|
2315
|
+
return value;
|
|
2316
|
+
}
|
|
2317
|
+
seen.set(value, depth);
|
|
2318
|
+
depth--;
|
|
2319
|
+
if (/* @__PURE__ */ isRef(value)) {
|
|
2320
|
+
traverse(value.value, depth, seen);
|
|
2321
|
+
} else if (isArray(value)) {
|
|
2322
|
+
for (let i = 0; i < value.length; i++) {
|
|
2323
|
+
traverse(value[i], depth, seen);
|
|
2324
|
+
}
|
|
2325
|
+
} else if (isSet(value) || isMap(value)) {
|
|
2326
|
+
value.forEach((v2) => {
|
|
2327
|
+
traverse(v2, depth, seen);
|
|
2328
|
+
});
|
|
2329
|
+
} else if (isPlainObject(value)) {
|
|
2330
|
+
for (const key in value) {
|
|
2331
|
+
traverse(value[key], depth, seen);
|
|
2332
|
+
}
|
|
2333
|
+
for (const key of Object.getOwnPropertySymbols(value)) {
|
|
2334
|
+
if (Object.prototype.propertyIsEnumerable.call(value, key)) {
|
|
2335
|
+
traverse(value[key], depth, seen);
|
|
2336
|
+
}
|
|
2337
|
+
}
|
|
2338
|
+
}
|
|
2339
|
+
return value;
|
|
2340
|
+
}
|
|
2341
|
+
|
|
2342
|
+
// ../list/dist/index.js
|
|
2343
|
+
var import_just_debounce = __toESM(require_just_debounce(), 1);
|
|
2344
|
+
var import_fuzzysort = __toESM(require_fuzzysort(), 1);
|
|
2345
|
+
|
|
2346
|
+
// inline-worker:__inline-worker
|
|
2347
|
+
init_live_reload();
|
|
2348
|
+
function inlineWorker(scriptText) {
|
|
2349
|
+
let blob = new Blob([scriptText], { type: "text/javascript" });
|
|
2350
|
+
let url = URL.createObjectURL(blob);
|
|
2351
|
+
let worker = new Worker(url);
|
|
2352
|
+
URL.revokeObjectURL(url);
|
|
2353
|
+
return worker;
|
|
2354
|
+
}
|
|
2355
|
+
|
|
2356
|
+
// ../list/dist/index.js
|
|
2357
|
+
var rr2 = Object.defineProperty;
|
|
2358
|
+
var yt = (e) => {
|
|
2359
|
+
throw TypeError(e);
|
|
2360
|
+
};
|
|
2361
|
+
var ir = (e, t, n) => t in e ? rr2(e, t, { enumerable: true, configurable: true, writable: true, value: n }) : e[t] = n;
|
|
2362
|
+
var g = (e, t, n) => ir(e, typeof t != "symbol" ? t + "" : t, n);
|
|
2363
|
+
var or = (e, t, n) => t.has(e) || yt("Cannot " + n);
|
|
2364
|
+
var vt2 = (e, t, n) => t.has(e) ? yt("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n);
|
|
2365
|
+
var Q = (e, t, n) => (or(e, t, "access private method"), n);
|
|
2366
|
+
var _ = /* @__PURE__ */ new Map();
|
|
2367
|
+
var Et = (e, t) => {
|
|
2368
|
+
let n = tr(t), i = [..._.values()].filter((o) => o !== e && o.instance && n.includes(o.instance));
|
|
2369
|
+
if (!i.length) return;
|
|
2370
|
+
let a = i.map((o) => {
|
|
2371
|
+
let r = effect(() => {
|
|
2372
|
+
if (!o.items.value.length) return;
|
|
2373
|
+
let s = o.items.value.map((l) => (l.currentIndex = void 0, e.createItem(l.element)));
|
|
2374
|
+
o.renderedItems.clear(), o.items.value = [], e.items.value = [...e.items.value, ...s];
|
|
2375
|
+
});
|
|
2376
|
+
return () => r.effect.stop();
|
|
2377
|
+
});
|
|
2378
|
+
return () => {
|
|
2379
|
+
a.forEach((o) => o());
|
|
2380
|
+
};
|
|
2381
|
+
};
|
|
2382
|
+
var K2 = "ad-list";
|
|
2383
|
+
var Se = { cache: { type: "boolean", default: true }, showquery: { type: "boolean", default: false }, highlight: { type: "boolean", default: false }, itemsperpage: { type: "number", default: 0 }, load: { type: "string", default: "" }, combine: { type: "string", default: "" }, filteringclass: { type: "string", default: "is-list-filtering" }, sortingclass: { type: "string", default: "is-list-sorting" }, loadingclass: { type: "string", default: "is-list-loading" }, resetix: { type: "boolean", default: false }, threshold: { type: "number", default: -20 }, loadcount: { type: "string", default: "" }, pagesiblings: { type: "string", default: "1" }, pageboundary: { type: "string", default: "1" }, a11y: { type: "boolean", default: true } };
|
|
2384
|
+
var We = ["wrapper", "list", "item", "item-link", "clear", "pagination-wrapper", "pagination-next", "pagination-previous", "page-count", "empty", "sort-trigger", "dropdown-label", "loader", "items-count", "visible-count", "visible-count-from", "visible-count-to", "results-count", "facet-count", "page-button", "page-dots", "filters", "initial", "tag", "tag-field", "tag-value", "tag-operator", "tag-operator-equal", "tag-operator-not-equal", "tag-operator-contain", "tag-operator-not-contain", "tag-operator-start", "tag-operator-not-start", "tag-operator-end", "tag-operator-not-end", "tag-operator-greater", "tag-operator-greater-equal", "tag-operator-less", "tag-operator-less-equal", "tag-operator-empty", "tag-operator-not-empty", "tag-remove", "tag-group", "tag-group-remove", "condition-group", "condition-group-match", "condition-groups-match", "condition-group-add", "condition-groups-add", "condition-group-remove", "condition", "condition-match", "condition-field", "condition-operator", "condition-value", "condition-add", "condition-remove", "slider", "tabs", "tab-link", "select", "select-value", "nest-target", "nest-slugs", "scroll-anchor", "scroll-anchor-filter", "scroll-anchor-sort", "scroll-anchor-pagination", "previous-item", "next-item", "previous-empty", "next-empty"];
|
|
2385
|
+
var w = "text";
|
|
2386
|
+
var H = "number";
|
|
2387
|
+
var N = "date";
|
|
2388
|
+
var be2 = "select-one";
|
|
2389
|
+
var Te = "select-multiple";
|
|
2390
|
+
var Ne = "contain";
|
|
2391
|
+
var Be = "not-contain";
|
|
2392
|
+
var $e = "start";
|
|
2393
|
+
var Ke = "not-start";
|
|
2394
|
+
var Ue = "end";
|
|
2395
|
+
var qe = "not-end";
|
|
2396
|
+
var Z = "equal";
|
|
2397
|
+
var J = "not-equal";
|
|
2398
|
+
var de = "greater";
|
|
2399
|
+
var me = "greater-equal";
|
|
2400
|
+
var fe = "less";
|
|
2401
|
+
var he = "less-equal";
|
|
2402
|
+
var ee = "empty";
|
|
2403
|
+
var te = "not-empty";
|
|
2404
|
+
var D = { field: { key: "field" }, fieldmatch: { key: "fieldmatch", values: ["and", "or"], defaultValue: "or" }, filtermatch: { key: "filtermatch", values: ["and", "or"], defaultValue: "or" }, conditionsmatch: { key: "conditionsmatch", values: ["and", "or"], defaultValue: "and" }, groupsmatch: { key: "groupsmatch", values: ["and", "or"], defaultValue: "and" }, fieldtype: { key: "fieldtype", values: ["number", "date"] }, reverse: { key: "reverse", values: ["true"] }, debounce: { key: "debounce", isNumeric: true }, ascclass: { key: "ascclass", defaultValue: "is-list-asc" }, descclass: { key: "descclass", defaultValue: "is-list-desc" }, activeclass: { key: "activeclass", defaultValue: "is-list-active" }, dynamicdisabledclass: { key: "dynamicdisabledclass", defaultValue: "is-list-dynamic-disabled" }, load: { key: "load", values: ["more", "infinite", "pagination", "all"] }, loadcount: { key: "loadcount", values: ["all"] }, threshold: { key: "threshold", defaultValue: "-20", isNumeric: true }, pagesiblings: { key: "pagesiblings", defaultValue: "1" }, pageboundary: { key: "pageboundary", defaultValue: "1" }, paginationdisabledclass: { key: "paginationdisabledclass", defaultValue: "is-list-pagination-disabled" }, easing: { key: "easing" }, duration: { key: "duration", defaultValue: "1000", isNumeric: true }, showquery: { key: "showquery", values: ["true"] }, highlight: { key: "highlight", values: ["true"] }, highlightclass: { key: "highlightclass", defaultValue: "is-list-highlight" }, emptyfacet: { key: "emptyfacet", values: ["hide", "add-class"] }, emptyfacetclass: { key: "emptyfacetclass", defaultValue: "is-list-emptyfacet" }, operator: { key: "operator", values: [Z, J, Ne, Be, $e, Ke, Ue, qe, me, de, he, fe, ee, te] }, fuzzy: { key: "fuzzy", isNumeric: true }, filteron: { key: "filteron", values: ["input", "change", "submit"], defaultValue: "input" }, allowsubmit: { key: "allowsubmit", values: ["true"] }, value: { key: "value" }, split: { key: "split" }, combine: { key: "combine" }, nest: { key: "nest" }, cache: { key: "cache", values: ["true"], defaultValue: "true" }, tagfield: { key: "tagfield" }, tagvalues: { key: "tagvalues", values: ["combined", "separate"], defaultValue: "combined" }, showtag: { key: "showtag", values: ["false"] }, formatdisplay: { key: "formatdisplay", values: ["true"] }, position: { key: "position", isNumeric: true, defaultValue: "1" }, repeat: { key: "repeat", isNumeric: true }, interactive: { key: "interactive", values: ["true"] }, itemsperpage: { key: "itemsperpage", isNumeric: true }, filteringclass: { key: "filteringclass", defaultValue: "is-list-filtering" }, loadingclass: { key: "loadingclass", defaultValue: "is-list-loading" }, sortingclass: { key: "sortingclass", defaultValue: "is-list-sorting" }, startingclass: { key: "startingclass", defaultValue: "is-list-starting" }, stagger: { key: "stagger", isNumeric: true }, resetix: { key: "resetix", values: ["true"] }, facetcount: { key: "facetcount" }, disabled: { key: "disabled", values: ["true"] }, a11y: { key: "a11y", values: ["false"] } };
|
|
2405
|
+
var bt = { main: 0, medium: 1, small: 2, tiny: 3 };
|
|
2406
|
+
var Ge = { text: { single: { [Ne]: [w], [Be]: [w], [$e]: [w], [Ke]: [w], [Ue]: [w], [qe]: [w], [Z]: [Te, be2, w], [J]: [Te, be2, w], [ee]: [], [te]: [] }, multiple: { [Ne]: [w], [Be]: [w], [$e]: [w], [Ke]: [w], [Ue]: [w], [qe]: [w], [Z]: [Te, be2, w], [J]: [Te, be2, w], [ee]: [], [te]: [] } }, number: { single: { [Z]: [H, w], [J]: [H, w], [fe]: [H, w], [he]: [H, w], [de]: [H, w], [me]: [H, w], [ee]: [], [te]: [] }, multiple: { [Z]: [H, w], [J]: [H, w], [fe]: [H, w], [he]: [H, w], [de]: [H, w], [me]: [H, w], [ee]: [], [te]: [] } }, date: { single: { [Z]: [N, w], [J]: [N, w], [fe]: [N, w], [he]: [N, w], [de]: [N, w], [me]: [N, w], [ee]: [], [te]: [] }, multiple: { [Z]: [N, w], [J]: [N, w], [fe]: [N, w], [he]: [N, w], [de]: [N, w], [me]: [N, w], [ee]: [], [te]: [] } } };
|
|
2407
|
+
var Le = "--ad-list-renderindex";
|
|
2408
|
+
window.CSS?.registerProperty?.({ name: Le, syntax: "<number>", inherits: false, initialValue: "0" });
|
|
2409
|
+
var { getElementSelector: I, queryElement: v, queryAllElements: R, getSettingSelector: B, getSettingAttributeName: ur, getClosestElement: zo2, getAttribute: y, hasAttributeValue: G, getInstance: j2, getInstanceSelector: Yo2, getPresenceSelector: Xo } = Jo(K2, We, D);
|
|
2410
|
+
var ne = ur("value");
|
|
2411
|
+
var we = (e) => {
|
|
2412
|
+
let t = y(e, "split");
|
|
2413
|
+
return t === "true" ? " " : t;
|
|
2414
|
+
};
|
|
2415
|
+
var cr = { wrapper: `.${Yt.wrapper}`, list: `.${Yt.list}`, item: `.${Yt.item}`, "pagination-wrapper": `.${Yt.paginationWrapper}`, "pagination-next": `.${Yt.paginationNext}`, "pagination-previous": `.${Yt.paginationPrevious}`, "page-count": `.${Yt.pageCount}`, empty: `.${Yt.emptyState}` };
|
|
2416
|
+
var P = (e, t) => `:is(${cr[e]}, ${I(e, t)})`;
|
|
2417
|
+
function F2(e, t) {
|
|
2418
|
+
let n = e.closest(P("wrapper"));
|
|
2419
|
+
if (!n) return null;
|
|
2420
|
+
let i = n.querySelector(P("list"));
|
|
2421
|
+
return t === "wrapper" ? n : t === "list" ? i : t === "item" ? [...i?.querySelectorAll(`:scope > ${P(t)}`) || []] : t === "page-count" ? n.querySelector(P(t)) : t === "empty" ? n.querySelector(`:scope > ${P(t)}`) : n.querySelector(P(t));
|
|
2422
|
+
}
|
|
2423
|
+
var re = (e = document) => [...e.querySelectorAll(P("wrapper"))];
|
|
2424
|
+
var je = (e) => {
|
|
2425
|
+
let { href: t } = e, { searchParams: n } = new URL(t);
|
|
2426
|
+
return [...n.entries()];
|
|
2427
|
+
};
|
|
2428
|
+
var ge = class {
|
|
2429
|
+
constructor(t, n, i) {
|
|
2430
|
+
this.element = t;
|
|
2431
|
+
this.list = n;
|
|
2432
|
+
this.currentIndex = i;
|
|
2433
|
+
g(this, "id", crypto.randomUUID());
|
|
2434
|
+
g(this, "href");
|
|
2435
|
+
g(this, "url");
|
|
2436
|
+
g(this, "startingClass");
|
|
2437
|
+
g(this, "highlightClass");
|
|
2438
|
+
g(this, "stagger");
|
|
2439
|
+
g(this, "fields", {});
|
|
2440
|
+
g(this, "fieldElements", {});
|
|
2441
|
+
g(this, "nesting");
|
|
2442
|
+
let a = v("item-link", { scope: t });
|
|
2443
|
+
if (sn(a) || (a = t.querySelector("a")), this.href = a?.href, this.highlightClass = y(t, "highlightclass"), this.startingClass = y(t, "startingclass"), this.stagger = y(t, "stagger"), this.href) try {
|
|
2444
|
+
this.url = new URL(this.href, window.location.origin);
|
|
2445
|
+
} catch {
|
|
2446
|
+
}
|
|
2447
|
+
this.collectFields();
|
|
2448
|
+
}
|
|
2449
|
+
collectFields() {
|
|
2450
|
+
var i, a, o;
|
|
2451
|
+
this.fields = {}, this.fieldElements = {};
|
|
2452
|
+
let t = B("field"), n = [...this.element.querySelectorAll(t)];
|
|
2453
|
+
for (let r of n) {
|
|
2454
|
+
let s = y(r, "field")?.trim();
|
|
2455
|
+
if (!s) continue;
|
|
2456
|
+
let l = r.textContent;
|
|
2457
|
+
if (!l) continue;
|
|
2458
|
+
let u = y(r, "fieldtype", { filterInvalid: true }) || "text", d = u === "number" ? qo(l) : u === "date" ? Sn(l) : l.trim();
|
|
2459
|
+
if (d === void 0) continue;
|
|
2460
|
+
(i = this.fieldElements)[s] || (i[s] = []), this.fieldElements[s].push({ value: d, element: r, originalHTML: r.innerHTML });
|
|
2461
|
+
let p = P("list"), c = r.closest(p);
|
|
2462
|
+
if (this.list.listElement && c && c !== this.list.listElement) {
|
|
2463
|
+
(a = this.fields)[s] || (a[s] = { type: u, rawValue: [], value: [] });
|
|
2464
|
+
let f = this.fields[s];
|
|
2465
|
+
if (f.type !== u || !Array.isArray(f.value) || !Array.isArray(f.rawValue) || f.value.some((L) => L === d) || f.rawValue.some((L) => L === l)) continue;
|
|
2466
|
+
f.value.push(d), f.rawValue.push(l);
|
|
2467
|
+
} else (o = this.fields)[s] || (o[s] = { fieldKey: s, type: u, rawValue: l, value: d });
|
|
2468
|
+
}
|
|
2469
|
+
}
|
|
2470
|
+
highlight(t) {
|
|
2471
|
+
if (this.list.highlight) for (let n in this.fields) {
|
|
2472
|
+
let i = this.fieldElements[n];
|
|
2473
|
+
if (!i) continue;
|
|
2474
|
+
let a = t[n];
|
|
2475
|
+
if (!a) {
|
|
2476
|
+
for (let { element: o, originalHTML: r } of i) o.innerHTML = r;
|
|
2477
|
+
continue;
|
|
2478
|
+
}
|
|
2479
|
+
for (let { value: o, element: r, originalHTML: s } of i) {
|
|
2480
|
+
r.innerHTML = s;
|
|
2481
|
+
let l = a.find(({ fieldValue: p }) => p === o);
|
|
2482
|
+
if (!l) continue;
|
|
2483
|
+
let u = new RegExp(l.filterValue, "gi"), d = (p) => {
|
|
2484
|
+
for (let c of Array.from(p.childNodes)) {
|
|
2485
|
+
if (c.nodeType === Node.ELEMENT_NODE) {
|
|
2486
|
+
d(c);
|
|
2487
|
+
continue;
|
|
2488
|
+
}
|
|
2489
|
+
if (c.nodeType !== Node.TEXT_NODE) continue;
|
|
2490
|
+
let m = c.textContent || "";
|
|
2491
|
+
if (!u.test(m)) continue;
|
|
2492
|
+
let f = document.createElement("template");
|
|
2493
|
+
f.innerHTML = m.replace(u, `<span class="${this.highlightClass}">$&</span>`), c.replaceWith(f.content);
|
|
2494
|
+
}
|
|
2495
|
+
};
|
|
2496
|
+
d(r);
|
|
2497
|
+
}
|
|
2498
|
+
}
|
|
2499
|
+
}
|
|
2500
|
+
};
|
|
2501
|
+
var O;
|
|
2502
|
+
var Lt;
|
|
2503
|
+
var wt;
|
|
2504
|
+
var Ct;
|
|
2505
|
+
var xt;
|
|
2506
|
+
var Ye;
|
|
2507
|
+
var le = class {
|
|
2508
|
+
constructor(t, n, i = true, a = {}) {
|
|
2509
|
+
this.wrapperElement = t;
|
|
2510
|
+
this.pageIndex = n;
|
|
2511
|
+
this.options = a;
|
|
2512
|
+
vt2(this, O);
|
|
2513
|
+
g(this, "items", shallowRef([]));
|
|
2514
|
+
g(this, "hooks", { start: { index: 0, callbacks: [], result: shallowRef([]) }, filter: { index: 1, previous: "start", callbacks: [], result: shallowRef([]) }, sort: { index: 2, previous: "filter", callbacks: [], result: shallowRef([]) }, static: { index: 3, previous: "sort", callbacks: [], result: shallowRef([]) }, pagination: { index: 4, previous: "static", callbacks: [], result: shallowRef([]) }, beforeRender: { index: 5, previous: "pagination", callbacks: [], result: shallowRef([]) }, render: { index: 6, previous: "beforeRender", callbacks: [], result: shallowRef([]) }, afterRender: { index: 7, previous: "render", callbacks: [], result: shallowRef([]) } });
|
|
2515
|
+
g(this, "currentHook");
|
|
2516
|
+
g(this, "triggeredHook");
|
|
2517
|
+
g(this, "queuedHook");
|
|
2518
|
+
g(this, "renderedItems", /* @__PURE__ */ new Set());
|
|
2519
|
+
g(this, "instance");
|
|
2520
|
+
g(this, "listElement");
|
|
2521
|
+
g(this, "paginationWrapperElement");
|
|
2522
|
+
g(this, "paginationCountElement");
|
|
2523
|
+
g(this, "allPaginationPreviousElements", shallowRef(/* @__PURE__ */ new Set()));
|
|
2524
|
+
g(this, "paginationPreviousCMSElement", computed(() => [...this.allPaginationPreviousElements.value].filter(sn).find((t2) => t2.classList.contains(Yt.paginationPrevious))));
|
|
2525
|
+
g(this, "allPaginationNextElements", shallowRef(/* @__PURE__ */ new Set()));
|
|
2526
|
+
g(this, "paginationNextCMSElement", computed(() => [...this.allPaginationNextElements.value].filter(sn).find((t2) => t2.classList.contains(Yt.paginationNext))));
|
|
2527
|
+
g(this, "emptyElement", ref());
|
|
2528
|
+
g(this, "initialElement");
|
|
2529
|
+
g(this, "loaderElement");
|
|
2530
|
+
g(this, "itemsCountElement");
|
|
2531
|
+
g(this, "resultsCountElement");
|
|
2532
|
+
g(this, "visibleCountElement");
|
|
2533
|
+
g(this, "visibleCountFromElement");
|
|
2534
|
+
g(this, "visibleCountToElement");
|
|
2535
|
+
g(this, "scrollAnchorElement");
|
|
2536
|
+
g(this, "scrollAnchorFilterElement");
|
|
2537
|
+
g(this, "scrollAnchorSortElement");
|
|
2538
|
+
g(this, "scrollAnchorPaginationElement");
|
|
2539
|
+
g(this, "initialItemsPerPage");
|
|
2540
|
+
g(this, "customItemsPerPage");
|
|
2541
|
+
g(this, "itemsPerPage");
|
|
2542
|
+
g(this, "totalPages", computed(() => Math.ceil(this.hooks.static.result.value.length / this.itemsPerPage.value)));
|
|
2543
|
+
g(this, "currentPage", ref(1));
|
|
2544
|
+
g(this, "filters", ref({ groups: [] }));
|
|
2545
|
+
g(this, "allFieldsData", computed(() => this.items.value.reduce((t2, n2) => {
|
|
2546
|
+
for (let [i2, a2] of Object.entries(n2.fields)) {
|
|
2547
|
+
t2[i2] || (t2[i2] = { type: a2.type, valueType: Array.isArray(a2.value) ? "multiple" : "single", rawValues: /* @__PURE__ */ new Set() });
|
|
2548
|
+
let o2 = Array.isArray(a2.rawValue) ? a2.rawValue : [a2.rawValue];
|
|
2549
|
+
for (let r2 of o2) t2[i2].rawValues.add(r2);
|
|
2550
|
+
}
|
|
2551
|
+
return t2;
|
|
2552
|
+
}, {})));
|
|
2553
|
+
g(this, "sorting", ref({}));
|
|
2554
|
+
g(this, "loading", ref(false));
|
|
2555
|
+
g(this, "hasInteracted", computed(() => this.sorting.value.interacted || this.filters.value.groups.some((t2) => t2.conditions.some((n2) => n2.interacted))));
|
|
2556
|
+
g(this, "hasFilters", computed(() => this.filters.value.groups.some((t2) => t2.conditions.some((n2) => !!n2.value?.length))));
|
|
2557
|
+
g(this, "showQuery");
|
|
2558
|
+
g(this, "highlight");
|
|
2559
|
+
g(this, "cache");
|
|
2560
|
+
g(this, "webflowModules", /* @__PURE__ */ new Set());
|
|
2561
|
+
g(this, "paginationSearchParam");
|
|
2562
|
+
g(this, "searchParamsPrefix");
|
|
2563
|
+
g(this, "loadingSearchParamsData");
|
|
2564
|
+
g(this, "loadingPaginationElements");
|
|
2565
|
+
g(this, "loadingPaginatedItems");
|
|
2566
|
+
g(this, "readingFilters");
|
|
2567
|
+
g(this, "settingFilters");
|
|
2568
|
+
g(this, "destroy", () => {
|
|
2569
|
+
});
|
|
2570
|
+
g(this, "watch", watch);
|
|
2571
|
+
g(this, "effect", effect);
|
|
2572
|
+
g(this, "createItem", (t2) => new ge(t2, this));
|
|
2573
|
+
let o = F2(t, "list");
|
|
2574
|
+
this.listElement = o;
|
|
2575
|
+
let r = j2(o || t);
|
|
2576
|
+
this.instance = r, this.paginationWrapperElement = F2(t, "pagination-wrapper"), this.paginationCountElement = F2(t, "page-count"), this.emptyElement.value = F2(t, "empty") || v("empty", { instance: r }), this.initialElement = v("initial", { instance: r }), this.loaderElement = v("loader", { instance: r }), this.itemsCountElement = v("items-count", { instance: r }), this.visibleCountElement = v("visible-count", { instance: r }), this.visibleCountFromElement = v("visible-count-from", { instance: r }), this.visibleCountToElement = v("visible-count-to", { instance: r }), this.resultsCountElement = v("results-count", { instance: r }), this.scrollAnchorElement = v("scroll-anchor", { instance: r }), this.scrollAnchorFilterElement = v("scroll-anchor-filter", { instance: r }), this.scrollAnchorSortElement = v("scroll-anchor-sort", { instance: r }), this.scrollAnchorPaginationElement = v("scroll-anchor-pagination", { instance: r }), this.cache = a.cache ?? true, this.showQuery = a.showquery ?? false, this.highlight = a.highlight ?? false;
|
|
2577
|
+
let s = F2(t, "pagination-next");
|
|
2578
|
+
s && this.allPaginationNextElements.value.add(s), R("pagination-next", { instance: r }).forEach((c) => this.allPaginationNextElements.value.add(c));
|
|
2579
|
+
let l = F2(t, "pagination-previous");
|
|
2580
|
+
l && this.allPaginationPreviousElements.value.add(l), R("pagination-previous", { instance: r }).forEach((c) => this.allPaginationPreviousElements.value.add(c));
|
|
2581
|
+
let u = F2(t, "item");
|
|
2582
|
+
if (this.customItemsPerPage = a.itemsperpage || 0, this.initialItemsPerPage = this.customItemsPerPage || u.length, this.itemsPerPage = ref(this.initialItemsPerPage), o) {
|
|
2583
|
+
let c = u.map((m, f) => new ge(m, this, f));
|
|
2584
|
+
this.items.value = c, this.renderedItems = new Set(c);
|
|
2585
|
+
}
|
|
2586
|
+
if (!i) return;
|
|
2587
|
+
this.loadingSearchParamsData = Q(this, O, Ct).call(this).then((c) => {
|
|
2588
|
+
this.searchParamsPrefix = c?.split("_")[0];
|
|
2589
|
+
}), this.loadingPaginationElements = Q(this, O, xt).call(this);
|
|
2590
|
+
let d = Q(this, O, wt).call(this), p = Q(this, O, Lt).call(this);
|
|
2591
|
+
this.destroy = () => {
|
|
2592
|
+
p(), d(), _.delete(this.wrapperElement);
|
|
2593
|
+
};
|
|
2594
|
+
}
|
|
2595
|
+
addHook(t, n) {
|
|
2596
|
+
let i = this.hooks[t];
|
|
2597
|
+
return i.callbacks.push(n), () => {
|
|
2598
|
+
i.callbacks = i.callbacks.filter((a) => a !== n);
|
|
2599
|
+
};
|
|
2600
|
+
}
|
|
2601
|
+
triggerHook(t, { scrollToAnchor: n, resetCurrentPage: i } = {}) {
|
|
2602
|
+
if (this.currentHook) {
|
|
2603
|
+
let a = this.hooks[t].index;
|
|
2604
|
+
if (this.hooks[this.currentHook].index >= a) if (this.queuedHook) {
|
|
2605
|
+
let r = this.hooks[this.queuedHook].index;
|
|
2606
|
+
this.queuedHook = a < r ? t : this.queuedHook;
|
|
2607
|
+
} else this.queuedHook = t;
|
|
2608
|
+
return;
|
|
2609
|
+
}
|
|
2610
|
+
return this.triggeredHook = t, this.currentHook = t, n && this.scrollToAnchor(t), i && (this.currentPage.value = 1), Q(this, O, Ye).call(this, t);
|
|
2611
|
+
}
|
|
2612
|
+
scrollToAnchor(t) {
|
|
2613
|
+
let { scrollAnchorFilterElement: n, scrollAnchorSortElement: i, scrollAnchorPaginationElement: a, scrollAnchorElement: o } = this, r = (t === "filter" ? n : t === "sort" ? i : t === "pagination" ? a : o) || o;
|
|
2614
|
+
r && r.scrollIntoView({ behavior: "smooth" });
|
|
2615
|
+
}
|
|
2616
|
+
async getSearchParam(t, n = true) {
|
|
2617
|
+
await this.loadingSearchParamsData;
|
|
2618
|
+
let { searchParams: i } = new URL(location.href);
|
|
2619
|
+
if (!n) return i.get(t);
|
|
2620
|
+
let a = [this.instance, this.searchParamsPrefix, this.pageIndex.toString()];
|
|
2621
|
+
for (let o of a) {
|
|
2622
|
+
if (!o) continue;
|
|
2623
|
+
let r = `${o}_${t}`, s = i.get(r);
|
|
2624
|
+
if (s) return s;
|
|
2625
|
+
}
|
|
2626
|
+
return null;
|
|
2627
|
+
}
|
|
2628
|
+
async getAllSearchParams(t = true) {
|
|
2629
|
+
await this.loadingSearchParamsData;
|
|
2630
|
+
let { searchParams: n } = new URL(location.href);
|
|
2631
|
+
if (!t) return [...n.entries()];
|
|
2632
|
+
let i = /* @__PURE__ */ new Map(), a = [this.instance, this.searchParamsPrefix, this.pageIndex.toString()];
|
|
2633
|
+
for (let [o, r] of n) for (let s of a) {
|
|
2634
|
+
if (!s || !o.startsWith(`${s}_`)) continue;
|
|
2635
|
+
let l = o.replace(`${s}_`, "");
|
|
2636
|
+
i.set(l, r);
|
|
2637
|
+
break;
|
|
2638
|
+
}
|
|
2639
|
+
return [...i.entries()];
|
|
2640
|
+
}
|
|
2641
|
+
async setSearchParam(t, n, { usePrefix: i = true, useSearchParamsPrefix: a = false } = {}) {
|
|
2642
|
+
await this.loadingSearchParamsData;
|
|
2643
|
+
let o = new URL(location.href), r = t;
|
|
2644
|
+
a ? r = `${this.searchParamsPrefix}_${t}` : i && (r = `${this.instance || this.searchParamsPrefix || this.pageIndex.toString()}_${t}`), n ? o.searchParams.set(r, n) : o.searchParams.delete(r), history.replaceState({}, "", o.toString());
|
|
2645
|
+
}
|
|
2646
|
+
get listOrWrapper() {
|
|
2647
|
+
return this.listElement || this.wrapperElement;
|
|
2648
|
+
}
|
|
2649
|
+
};
|
|
2650
|
+
O = /* @__PURE__ */ new WeakSet(), Lt = function() {
|
|
2651
|
+
let t = [];
|
|
2652
|
+
this.addHook("render", async (i) => {
|
|
2653
|
+
let a = 0, o = Promise.all(i.map((r, s) => {
|
|
2654
|
+
let l = i[s - 1], u = async () => {
|
|
2655
|
+
r.element.style.setProperty(Le, `${a}`), r.element.classList.add(r.startingClass), r.stagger && (r.element.style.transitionDelay = `${a * r.stagger}ms`), l ? l.element.after(r.element) : this.listElement?.prepend(r.element), r.currentIndex = s, a += 1, await new Promise(requestAnimationFrame), r.element.classList.remove(r.startingClass);
|
|
2656
|
+
let d = r.element.getAnimations({ subtree: true });
|
|
2657
|
+
try {
|
|
2658
|
+
await Promise.all(d.map((p) => p.finished));
|
|
2659
|
+
} catch {
|
|
2660
|
+
}
|
|
2661
|
+
r.element.style.removeProperty(Le), r.stagger && (r.element.style.transitionDelay = "");
|
|
2662
|
+
};
|
|
2663
|
+
if (ie(r.currentIndex)) {
|
|
2664
|
+
if (this.renderedItems.delete(r), r.currentIndex !== s) return u();
|
|
2665
|
+
} else return u();
|
|
2666
|
+
}));
|
|
2667
|
+
return this.renderedItems.forEach((r) => {
|
|
2668
|
+
r.element.remove(), r.currentIndex = void 0;
|
|
2669
|
+
}), this.renderedItems = new Set(i), await o, i;
|
|
2670
|
+
}), this.addHook("afterRender", async () => {
|
|
2671
|
+
Mo([...this.webflowModules]);
|
|
2672
|
+
});
|
|
2673
|
+
let n = (i) => {
|
|
2674
|
+
let { previous: a } = this.hooks[i];
|
|
2675
|
+
if (!a) {
|
|
2676
|
+
let r = watch(this.items, () => this.triggerHook(i), { immediate: true });
|
|
2677
|
+
t.push(r);
|
|
2678
|
+
return;
|
|
2679
|
+
}
|
|
2680
|
+
let o = watch(this.hooks[a].result, async () => {
|
|
2681
|
+
if (await Q(this, O, Ye).call(this, i), i === "afterRender" && (this.currentHook = void 0, this.triggeredHook = void 0, this.queuedHook)) {
|
|
2682
|
+
let { queuedHook: r } = this;
|
|
2683
|
+
this.queuedHook = void 0, this.triggerHook(r);
|
|
2684
|
+
}
|
|
2685
|
+
});
|
|
2686
|
+
t.push(o), n(a);
|
|
2687
|
+
};
|
|
2688
|
+
return n("afterRender"), () => {
|
|
2689
|
+
t.forEach((i) => i()), t.length = 0;
|
|
2690
|
+
};
|
|
2691
|
+
}, wt = function() {
|
|
2692
|
+
let t = effect(() => {
|
|
2693
|
+
this.itemsCountElement && (this.itemsCountElement.textContent = `${this.items.value.length}`);
|
|
2694
|
+
}), n = effect(() => {
|
|
2695
|
+
if (!this.initialElement) return;
|
|
2696
|
+
let o = !this.hasInteracted.value || !this.hasFilters.value;
|
|
2697
|
+
this.wrapperElement.style.display = o ? "none" : "", this.initialElement.style.display = o ? "" : "none";
|
|
2698
|
+
}), i = effect(() => {
|
|
2699
|
+
this.loaderElement && (this.loaderElement.style.display = this.loading.value ? "" : "none");
|
|
2700
|
+
}), a = watch([this.hooks.render.result, this.emptyElement], ([o, r]) => {
|
|
2701
|
+
let s = o.length > 0;
|
|
2702
|
+
this.listElement && (this.listElement.style.display = s ? "" : "none"), r && (r.style.display = s ? "none" : "");
|
|
2703
|
+
});
|
|
2704
|
+
return () => {
|
|
2705
|
+
t.effect.stop(), n.effect.stop(), i.effect.stop(), a();
|
|
2706
|
+
};
|
|
2707
|
+
}, Ct = async function() {
|
|
2708
|
+
let t = this.paginationNextCMSElement.value || this.paginationPreviousCMSElement.value;
|
|
2709
|
+
if (!t) return;
|
|
2710
|
+
let n = je(t);
|
|
2711
|
+
if (!n.length) return;
|
|
2712
|
+
let i, a;
|
|
2713
|
+
if (n.length === 1) {
|
|
2714
|
+
let [s] = n;
|
|
2715
|
+
if (!s) return;
|
|
2716
|
+
[i, a] = s;
|
|
2717
|
+
} else {
|
|
2718
|
+
let { origin: s, pathname: l } = location, u = await Po(s + l);
|
|
2719
|
+
if (!u) return;
|
|
2720
|
+
let p = u.querySelectorAll(P("wrapper"))[this.pageIndex];
|
|
2721
|
+
if (!p) return;
|
|
2722
|
+
let c = F2(p, "pagination-next");
|
|
2723
|
+
if (!c) return;
|
|
2724
|
+
let [m] = je(c) || [];
|
|
2725
|
+
if (!m) return;
|
|
2726
|
+
[i] = m, [, a] = n.find(([f]) => f === i) || [];
|
|
2727
|
+
}
|
|
2728
|
+
if (!i || !a) return;
|
|
2729
|
+
let o = parseInt(a), r = this.paginationNextCMSElement.value ? o - 1 : o + 1;
|
|
2730
|
+
return this.paginationSearchParam = i, this.currentPage.value = r, i;
|
|
2731
|
+
}, xt = async function() {
|
|
2732
|
+
await this.loadingSearchParamsData;
|
|
2733
|
+
let { origin: t, pathname: n } = window.location, { wrapperElement: i, listElement: a, paginationWrapperElement: o, paginationNextCMSElement: r, paginationPreviousCMSElement: s, emptyElement: l, currentPage: u, paginationSearchParam: d, pageIndex: p } = this;
|
|
2734
|
+
await Promise.all([(async () => {
|
|
2735
|
+
if (r.value) return;
|
|
2736
|
+
let c = u.value;
|
|
2737
|
+
if (!c || c === 1 || !d) return;
|
|
2738
|
+
let m = await Po(`${t}${n}?${d}=${c - 1}`);
|
|
2739
|
+
if (!m) return;
|
|
2740
|
+
let L = re(m)[p];
|
|
2741
|
+
if (!L) return;
|
|
2742
|
+
let h = F2(L, "pagination-next");
|
|
2743
|
+
if (!h) return;
|
|
2744
|
+
let E = s.value?.parentElement || o;
|
|
2745
|
+
E && (h.style.display = "none", E.append(h), this.allPaginationNextElements.value.add(h));
|
|
2746
|
+
})(), (async () => {
|
|
2747
|
+
if (s.value && l.value || !d) return;
|
|
2748
|
+
let c = await Po(`${t}${n}?${d}=9999`);
|
|
2749
|
+
if (!c) return;
|
|
2750
|
+
let f = re(c)[p];
|
|
2751
|
+
if (!f) return;
|
|
2752
|
+
let L = F2(f, "pagination-previous"), h = F2(f, "empty");
|
|
2753
|
+
if (L && !s.value) {
|
|
2754
|
+
let E = r.value?.parentElement || o;
|
|
2755
|
+
if (!E) return;
|
|
2756
|
+
L.style.display = "none", E.prepend(L), this.allPaginationPreviousElements.value.add(L);
|
|
2757
|
+
}
|
|
2758
|
+
h && !l.value && (h.style.display = "none", i.insertBefore(h, a?.nextSibling || null), l.value = h);
|
|
2759
|
+
})()]);
|
|
2760
|
+
}, Ye = async function(t) {
|
|
2761
|
+
this.currentHook = t;
|
|
2762
|
+
let n = this.hooks[t], { previous: i } = n, o = (i ? this.hooks[i].result : void 0)?.value || this.items.value;
|
|
2763
|
+
for (let r of n.callbacks) o = await r(o) || o;
|
|
2764
|
+
n.result.value = [...o];
|
|
2765
|
+
};
|
|
2766
|
+
var It = (e) => {
|
|
2767
|
+
let t = effect(() => {
|
|
2768
|
+
let n = e.hooks.filter.result.value;
|
|
2769
|
+
e.resultsCountElement && (e.resultsCountElement.textContent = `${n.length}`);
|
|
2770
|
+
});
|
|
2771
|
+
return () => t.effect.stop();
|
|
2772
|
+
};
|
|
2773
|
+
var Me = (e) => {
|
|
2774
|
+
let t = G(e, "allowsubmit", "true"), n = kn(e, "submit", (a) => {
|
|
2775
|
+
if (t) return;
|
|
2776
|
+
a.preventDefault(), a.stopPropagation();
|
|
2777
|
+
let { activeElement: o } = document, r = matchMedia("(pointer: coarse)").matches, s = /Mobi|Android|iPhone|iPad/i.test(navigator.userAgent);
|
|
2778
|
+
(r || s) && q(o) && o.blur();
|
|
2779
|
+
}), i = kn(e, "change", (a) => {
|
|
2780
|
+
let { target: o } = a;
|
|
2781
|
+
on(o) && br(o);
|
|
2782
|
+
});
|
|
2783
|
+
return () => {
|
|
2784
|
+
n(), i();
|
|
2785
|
+
};
|
|
2786
|
+
};
|
|
2787
|
+
var br = (e) => {
|
|
2788
|
+
let t = y(e, "activeclass");
|
|
2789
|
+
switch (e.type) {
|
|
2790
|
+
case "checkbox": {
|
|
2791
|
+
let { checked: n } = e;
|
|
2792
|
+
Yo(e).classList.toggle(t, n);
|
|
2793
|
+
break;
|
|
2794
|
+
}
|
|
2795
|
+
case "radio": {
|
|
2796
|
+
let n = gt(e);
|
|
2797
|
+
for (let i of n) Yo(i).classList.toggle(t, i.checked);
|
|
2798
|
+
break;
|
|
2799
|
+
}
|
|
2800
|
+
default:
|
|
2801
|
+
e.classList.toggle(t, !!e.value);
|
|
2802
|
+
}
|
|
2803
|
+
};
|
|
2804
|
+
var Xe = (e, t, n) => {
|
|
2805
|
+
if (t === "date" || t === "time" || t === "datetime-local" || t === "month" || t === "week") {
|
|
2806
|
+
let i = Sn(e);
|
|
2807
|
+
return i === void 0 || isNaN(i.getTime()) ? null : i;
|
|
2808
|
+
}
|
|
2809
|
+
if (t === "number" || t === "range") {
|
|
2810
|
+
let i = qo(e);
|
|
2811
|
+
return i === void 0 || isNaN(i) ? null : i;
|
|
2812
|
+
}
|
|
2813
|
+
return e;
|
|
2814
|
+
};
|
|
2815
|
+
var Ae = (e, t) => e.split(t).map((n) => n.trim()).filter(Boolean);
|
|
2816
|
+
var wr = /\[field=(?:"([^"]*)"|([^\]]+))\]/;
|
|
2817
|
+
var Cr = new RegExp(`^(${D.operator.values.join("|")})`);
|
|
2818
|
+
var kt = D.fieldmatch.values.join("|");
|
|
2819
|
+
var xr = new RegExp(`\\[fieldmatch=(${kt}|"(${kt})")\\]`);
|
|
2820
|
+
var ie2 = (e) => e.value === "or" ? "or" : "and";
|
|
2821
|
+
var Ie = (e) => {
|
|
2822
|
+
let t, n, i, a = e.match(Cr);
|
|
2823
|
+
a && (t = a[1]);
|
|
2824
|
+
let o = e.match(wr);
|
|
2825
|
+
o && (n = o[1] || o[2]);
|
|
2826
|
+
let r = e.match(xr);
|
|
2827
|
+
return r && (i = r[2] || r[1]), { op: t, fieldKey: n, fieldMatch: i };
|
|
2828
|
+
};
|
|
2829
|
+
var Ft2 = (e, t, n) => {
|
|
2830
|
+
let i = kn(t, "change", () => {
|
|
2831
|
+
let r = ue(e, n);
|
|
2832
|
+
if (!r) return;
|
|
2833
|
+
let s = ie2(t);
|
|
2834
|
+
r.conditionsMatch = s;
|
|
2835
|
+
}), a = y(t, "dynamicdisabledclass"), o = effect(() => {
|
|
2836
|
+
let r = n.conditions.value.length <= 1;
|
|
2837
|
+
t.setAttribute("aria-disabled", r ? "true" : "false"), t.classList.toggle(a, r);
|
|
2838
|
+
});
|
|
2839
|
+
return () => {
|
|
2840
|
+
i(), o.effect.stop();
|
|
2841
|
+
};
|
|
2842
|
+
};
|
|
2843
|
+
var Rt = (e, t, n, i) => kn(t, "click", () => {
|
|
2844
|
+
let o = F(n), r = Je(e, o, i);
|
|
2845
|
+
if (!r) return;
|
|
2846
|
+
let s = i.conditions.value, l = s[s.length - 2];
|
|
2847
|
+
l ? l.element.after(r.element) : i.element.append(r.element);
|
|
2848
|
+
});
|
|
2849
|
+
var kr = (e, t, n) => {
|
|
2850
|
+
let i = kn(e, "click", () => {
|
|
2851
|
+
n.conditions.value.length <= 1 || t.cleanup();
|
|
2852
|
+
}), a = y(e, "dynamicdisabledclass"), o = effect(() => {
|
|
2853
|
+
let r = n.conditions.value.length <= 1;
|
|
2854
|
+
e.setAttribute("aria-disabled", r ? "true" : "false"), e.classList.toggle(a, r);
|
|
2855
|
+
});
|
|
2856
|
+
return () => {
|
|
2857
|
+
i(), o.effect.stop();
|
|
2858
|
+
};
|
|
2859
|
+
};
|
|
2860
|
+
var Pr = (e, t, n) => {
|
|
2861
|
+
let i = kn(t, "change", () => {
|
|
2862
|
+
let o = q2(e, n);
|
|
2863
|
+
o && (o.fieldKey = t.value);
|
|
2864
|
+
}), a = effect(() => {
|
|
2865
|
+
let o = false;
|
|
2866
|
+
for (let r of t.options) {
|
|
2867
|
+
let s = !!e.allFieldsData.value[r.value];
|
|
2868
|
+
r.style.display = s ? "" : "none", r.disabled = !s, !s && r.selected && (r.selected = false, o = true);
|
|
2869
|
+
}
|
|
2870
|
+
o && A(t, ["input", "change"]);
|
|
2871
|
+
});
|
|
2872
|
+
return () => {
|
|
2873
|
+
i(), a.effect.stop();
|
|
2874
|
+
};
|
|
2875
|
+
};
|
|
2876
|
+
var Fr = (e, t, n) => {
|
|
2877
|
+
let i = kn(t, "change", () => {
|
|
2878
|
+
let r = q2(e, n);
|
|
2879
|
+
if (!r) return;
|
|
2880
|
+
let { op: s, fieldMatch: l = D.fieldmatch.defaultValue } = Ie(t.value);
|
|
2881
|
+
Object.assign(r, { op: s, fieldMatch: l });
|
|
2882
|
+
}), a = ([r, s]) => {
|
|
2883
|
+
let l = r ? s[r] : void 0, u = Object.keys(s), d = false, { optionsData: p, optionsDataByOp: c, optionsToHide: m, optionsToDisplay: f } = [...t.options].reduce((h, E) => {
|
|
2884
|
+
let S = () => (h.optionsToHide.push(E), h);
|
|
2885
|
+
if (!E.value || !l) return S();
|
|
2886
|
+
let C = Ie(E.value);
|
|
2887
|
+
if (!C.op) return S();
|
|
2888
|
+
let b = !C.fieldKey;
|
|
2889
|
+
if (C.fieldKey && (b = (C.fieldKey === "*" ? u : tr(C.fieldKey)).some((x) => x === r)), !b || !!!Ge[l.type]?.[l.valueType]?.[C.op]) return S();
|
|
2890
|
+
let T = { option: E, ...C };
|
|
2891
|
+
return h.optionsData.push(T), h.optionsDataByOp.set(C.op, [...h.optionsDataByOp.get(C.op) || [], T]), h;
|
|
2892
|
+
}, { optionsData: [], optionsDataByOp: /* @__PURE__ */ new Map(), optionsToHide: [], optionsToDisplay: [] }), L = l?.valueType === "multiple";
|
|
2893
|
+
for (let { op: h, option: E, fieldMatch: S = D.fieldmatch.defaultValue } of p) {
|
|
2894
|
+
let C = c.get(h) || [], b;
|
|
2895
|
+
L ? b = C.find((T) => T.fieldMatch === S) || C.find((T) => T.fieldMatch) || C.find((T) => !T.fieldMatch) : b = C.find((T) => !T.fieldMatch), b?.option !== E ? m.push(E) : f.push(E);
|
|
2896
|
+
}
|
|
2897
|
+
for (let h of f) h.style.display = "", h.disabled = false;
|
|
2898
|
+
for (let h of m) h.style.display = "none", h.disabled = true, h.selected && (h.selected = false, d = true);
|
|
2899
|
+
d && A(t, ["input", "change"]);
|
|
2900
|
+
}, o = watch([() => q2(e, n)?.fieldKey, e.allFieldsData], (0, import_just_debounce.default)(a, 0), { immediate: true });
|
|
2901
|
+
return () => {
|
|
2902
|
+
i(), o();
|
|
2903
|
+
};
|
|
2904
|
+
};
|
|
2905
|
+
var Rr = (e, t, n, i) => {
|
|
2906
|
+
let a = new Comment();
|
|
2907
|
+
t.after(a);
|
|
2908
|
+
let { instance: o } = e, r = I("condition", { instance: o }), s = I("condition-value", { instance: o }), l = `:is(${s}):not(:is(${r}) :is(${s}))`, u = R("condition-value", { scope: n }), d = document.querySelectorAll(l), p = /* @__PURE__ */ new Map();
|
|
2909
|
+
for (let b of u) {
|
|
2910
|
+
if (!on(b)) continue;
|
|
2911
|
+
let M = b.type;
|
|
2912
|
+
p.has(M) || p.set(M, b);
|
|
2913
|
+
}
|
|
2914
|
+
for (let b of d) {
|
|
2915
|
+
if (!on(b)) continue;
|
|
2916
|
+
let M = b.type;
|
|
2917
|
+
if (p.has(M)) continue;
|
|
2918
|
+
let T = F(b);
|
|
2919
|
+
p.set(M, T);
|
|
2920
|
+
}
|
|
2921
|
+
let c, m = () => {
|
|
2922
|
+
if (e.settingFilters || !c) return;
|
|
2923
|
+
let b = q2(e, i);
|
|
2924
|
+
if (!b) return;
|
|
2925
|
+
e.readingFilters = true;
|
|
2926
|
+
let M = p.get(c), T = y(M, "fuzzy"), A2 = we(M), x = Dt2(M);
|
|
2927
|
+
Qt(x) && A2 && (x = Ae(x, A2)), Object.assign(b, { value: x, fuzzyThreshold: T, type: c }), e.readingFilters = false;
|
|
2928
|
+
}, f = [...p].map(([, b]) => {
|
|
2929
|
+
let M = y(b, "filteron", { filterInvalid: true }), T = y(b, "debounce"), A2 = M === "submit" ? b.form : b, x = T ? (0, import_just_debounce.default)(m, T) : m;
|
|
2930
|
+
return kn(A2, M, x);
|
|
2931
|
+
}), L = ([b, M, T]) => {
|
|
2932
|
+
let A2 = b ? T[b] : void 0, x = [];
|
|
2933
|
+
A2 && M && (x = Ge[A2.type]?.[A2.valueType]?.[M] || []);
|
|
2934
|
+
let $ = c;
|
|
2935
|
+
c = x.find((k) => p.has(k));
|
|
2936
|
+
for (let [k, V] of p) k === c ? a.after(V) : V.remove();
|
|
2937
|
+
if (c && $ !== c) {
|
|
2938
|
+
let k = p.get(c);
|
|
2939
|
+
j(k) ? k.selectedIndex = 0 : k.value = "", A(k, ["input", "change"]);
|
|
2940
|
+
}
|
|
2941
|
+
}, h = ([b, M]) => {
|
|
2942
|
+
let T = [...p.values()].filter(j);
|
|
2943
|
+
if (!T.length) return;
|
|
2944
|
+
let A2 = c ? p.get(c) : void 0, $ = (b ? M[b] : void 0)?.rawValues || /* @__PURE__ */ new Set(), k = [...$].sort((V, oe) => V.localeCompare(oe));
|
|
2945
|
+
for (let V of T) {
|
|
2946
|
+
let oe = V.value !== "" && !$.has(V.value);
|
|
2947
|
+
for (let X of [...V.options]) X.value !== "" && X.remove();
|
|
2948
|
+
for (let X of k) {
|
|
2949
|
+
let W = document.createElement("option");
|
|
2950
|
+
W.value = X, W.textContent = X, V.append(W);
|
|
2951
|
+
}
|
|
2952
|
+
V === A2 && oe && A(V, ["input", "change"]);
|
|
2953
|
+
}
|
|
2954
|
+
}, E = watch([() => q2(e, i)?.fieldKey, () => q2(e, i)?.op, e.allFieldsData], (0, import_just_debounce.default)(L, 0), { immediate: true }), S = watch([() => q2(e, i)?.fieldKey, e.allFieldsData], (0, import_just_debounce.default)(h, 0), { immediate: true }), C = watch(() => q2(e, i)?.value, (b, M) => {
|
|
2955
|
+
if (!e.readingFilters) {
|
|
2956
|
+
b ?? (b = Array.isArray(M) ? [] : "");
|
|
2957
|
+
for (let T of p.values()) Vo(T, b, ne);
|
|
2958
|
+
}
|
|
2959
|
+
});
|
|
2960
|
+
return () => {
|
|
2961
|
+
for (let b of f) b();
|
|
2962
|
+
E(), S(), C();
|
|
2963
|
+
};
|
|
2964
|
+
};
|
|
2965
|
+
var Dt2 = (e) => {
|
|
2966
|
+
let t = e.type, n;
|
|
2967
|
+
switch (t) {
|
|
2968
|
+
case "select-multiple": {
|
|
2969
|
+
n = [...e.selectedOptions].map((i) => i.value).filter(Boolean);
|
|
2970
|
+
break;
|
|
2971
|
+
}
|
|
2972
|
+
case "date":
|
|
2973
|
+
case "month":
|
|
2974
|
+
case "week":
|
|
2975
|
+
case "time": {
|
|
2976
|
+
let { valueAsDate: i, value: a } = e;
|
|
2977
|
+
n = i ? i.toISOString() : a;
|
|
2978
|
+
break;
|
|
2979
|
+
}
|
|
2980
|
+
default:
|
|
2981
|
+
n = e.value;
|
|
2982
|
+
}
|
|
2983
|
+
return n;
|
|
2984
|
+
};
|
|
2985
|
+
var q2 = (e, t) => {
|
|
2986
|
+
let n = ue(e, t.conditionGroup);
|
|
2987
|
+
if (n) return n.conditions.find((i) => i.id === t.id);
|
|
2988
|
+
};
|
|
2989
|
+
var Je = (e, t, n) => {
|
|
2990
|
+
let i = v("condition-field", { scope: t });
|
|
2991
|
+
if (!j(i)) return;
|
|
2992
|
+
let a = v("condition-operator", { scope: t });
|
|
2993
|
+
if (!j(a)) return;
|
|
2994
|
+
let o = v("condition-value", { scope: t });
|
|
2995
|
+
if (!on(o)) return;
|
|
2996
|
+
let r = crypto.randomUUID(), s = /* @__PURE__ */ new Set(), l = { id: r, element: t, conditionGroup: n, cleanup: () => {
|
|
2997
|
+
for (let x of s) x();
|
|
2998
|
+
s.clear(), t.remove(), n.conditions.value = n.conditions.value.filter((x) => x.id !== r);
|
|
2999
|
+
let T = ue(e, n);
|
|
3000
|
+
if (!T) return;
|
|
3001
|
+
let A2 = T.conditions.findIndex((x) => x.id === r);
|
|
3002
|
+
A2 !== -1 && T.conditions.splice(A2, 1);
|
|
3003
|
+
} }, u = i.value, d = o.type, p = Dt2(o), c = y(o, "fuzzy"), m = y(o, "tagvalues", { filterInvalid: true }) ?? D.tagvalues.defaultValue, { op: f, fieldMatch: L } = Ie(a.value);
|
|
3004
|
+
n.conditions.value = [...n.conditions.value, l];
|
|
3005
|
+
let h = ue(e, n);
|
|
3006
|
+
if (!h) return;
|
|
3007
|
+
h.conditions.push({ id: r, type: d, fieldKey: u, op: f, value: p, fuzzyThreshold: c, fieldMatch: L, showTag: true, interacted: true, tagValuesDisplay: m });
|
|
3008
|
+
let E = v("condition-remove", { scope: t });
|
|
3009
|
+
if (E) {
|
|
3010
|
+
let T = kr(E, l, n);
|
|
3011
|
+
s.add(T);
|
|
3012
|
+
}
|
|
3013
|
+
let S = Pr(e, i, l);
|
|
3014
|
+
s.add(S);
|
|
3015
|
+
let C = Fr(e, a, l);
|
|
3016
|
+
s.add(C);
|
|
3017
|
+
let b = Rr(e, o, t, l);
|
|
3018
|
+
s.add(b);
|
|
3019
|
+
let M = watch(() => q2(e, l), (T) => {
|
|
3020
|
+
T || l.cleanup();
|
|
3021
|
+
});
|
|
3022
|
+
return s.add(M), l;
|
|
3023
|
+
};
|
|
3024
|
+
var Ot = (e, t, n) => {
|
|
3025
|
+
let i = kn(t, "change", () => {
|
|
3026
|
+
e.filters.value.groupsMatch = ie2(t);
|
|
3027
|
+
}), a = y(t, "dynamicdisabledclass"), o = effect(() => {
|
|
3028
|
+
let r = n.value.length <= 1;
|
|
3029
|
+
t.setAttribute("aria-disabled", r ? "true" : "false"), t.classList.toggle(a, r);
|
|
3030
|
+
});
|
|
3031
|
+
return () => {
|
|
3032
|
+
i(), o.effect.stop();
|
|
3033
|
+
};
|
|
3034
|
+
};
|
|
3035
|
+
var Ht2 = (e, t, n, i, a) => kn(t, "click", () => {
|
|
3036
|
+
let r = F(n), s = tt(e, r, a);
|
|
3037
|
+
if (!s) return;
|
|
3038
|
+
let l = a.value[a.value.length - 2];
|
|
3039
|
+
l ? l.element.after(s.element) : i.append(s.element);
|
|
3040
|
+
});
|
|
3041
|
+
var _r = (e, t, n) => {
|
|
3042
|
+
let i = kn(e, "click", () => {
|
|
3043
|
+
n.value.length <= 1 || t.cleanup();
|
|
3044
|
+
}), a = y(e, "dynamicdisabledclass"), o = effect(() => {
|
|
3045
|
+
let r = n.value.length <= 1;
|
|
3046
|
+
e.setAttribute("aria-disabled", r ? "true" : "false"), e.classList.toggle(a, r);
|
|
3047
|
+
});
|
|
3048
|
+
return () => {
|
|
3049
|
+
i(), o.effect.stop();
|
|
3050
|
+
};
|
|
3051
|
+
};
|
|
3052
|
+
var ue = (e, t) => e.filters.value.groups.find((n) => n.id === t.id);
|
|
3053
|
+
var tt = (e, t, n) => {
|
|
3054
|
+
let i = v("condition", { scope: t });
|
|
3055
|
+
if (!i) return;
|
|
3056
|
+
let a = F(i), o = crypto.randomUUID(), r = /* @__PURE__ */ new Set(), s = { id: o, element: t, conditions: shallowRef([]), cleanup: () => {
|
|
3057
|
+
for (let f of s.conditions.value) f.cleanup();
|
|
3058
|
+
for (let f of r) f();
|
|
3059
|
+
r.clear(), t.remove(), n.value = n.value.filter((f) => f.id !== o);
|
|
3060
|
+
let m = e.filters.value.groups.findIndex((f) => f.id === o);
|
|
3061
|
+
m !== -1 && e.filters.value.groups.splice(m, 1);
|
|
3062
|
+
} }, l = "and", u = v("condition-match", { scope: t });
|
|
3063
|
+
if (u) {
|
|
3064
|
+
l = ie2(u);
|
|
3065
|
+
let m = Ft2(e, u, s);
|
|
3066
|
+
r.add(m);
|
|
3067
|
+
}
|
|
3068
|
+
n.value = [...n.value, s], e.filters.value.groups.push({ id: o, conditionsMatch: l, conditions: [] });
|
|
3069
|
+
let d = v("condition-add", { scope: t });
|
|
3070
|
+
if (d) {
|
|
3071
|
+
let m = Rt(e, d, a, s);
|
|
3072
|
+
r.add(m);
|
|
3073
|
+
}
|
|
3074
|
+
let p = v("condition-group-remove", { scope: t });
|
|
3075
|
+
if (p) {
|
|
3076
|
+
let m = _r(p, s, n);
|
|
3077
|
+
r.add(m);
|
|
3078
|
+
}
|
|
3079
|
+
Je(e, i, s);
|
|
3080
|
+
let c = watch(() => ue(e, s), (m) => {
|
|
3081
|
+
m || s.cleanup();
|
|
3082
|
+
});
|
|
3083
|
+
return r.add(c), s;
|
|
3084
|
+
};
|
|
3085
|
+
var Nt2 = (e, t) => {
|
|
3086
|
+
let n = v("condition-group", { scope: t });
|
|
3087
|
+
if (!n) return;
|
|
3088
|
+
let i = n.parentElement;
|
|
3089
|
+
if (!i) return;
|
|
3090
|
+
let a = F(n), o = shallowRef([]), r = /* @__PURE__ */ new Set(), s = Me(t);
|
|
3091
|
+
r.add(s);
|
|
3092
|
+
let l = v("condition-group-add", { scope: t }) || v("condition-groups-add", { scope: t });
|
|
3093
|
+
if (l) {
|
|
3094
|
+
let c = Ht2(e, l, a, i, o);
|
|
3095
|
+
r.add(c);
|
|
3096
|
+
}
|
|
3097
|
+
let u = "and", d = v("condition-group-match", { scope: t }) || v("condition-groups-match", { scope: t });
|
|
3098
|
+
if (d) {
|
|
3099
|
+
u = ie2(d);
|
|
3100
|
+
let c = Ot(e, d, o);
|
|
3101
|
+
r.add(c);
|
|
3102
|
+
}
|
|
3103
|
+
e.filters.value.groupsMatch = u;
|
|
3104
|
+
let p = Br(e);
|
|
3105
|
+
return r.add(p), tt(e, n, o), () => {
|
|
3106
|
+
for (let c of o.value) c.cleanup();
|
|
3107
|
+
for (let c of r) c();
|
|
3108
|
+
r.clear();
|
|
3109
|
+
};
|
|
3110
|
+
};
|
|
3111
|
+
var Br = (e) => kn(window, "click", (t) => {
|
|
3112
|
+
let { target: n } = t;
|
|
3113
|
+
if (!(n instanceof Element)) return;
|
|
3114
|
+
let { instance: i, filters: a } = e, o = I("clear", { instance: i });
|
|
3115
|
+
if (!n?.closest(o)) return;
|
|
3116
|
+
e.settingFilters = true, a.value.groups.splice(1);
|
|
3117
|
+
let s = a.value.groups[0];
|
|
3118
|
+
if (!s) return;
|
|
3119
|
+
s.conditions.splice(1);
|
|
3120
|
+
let l = s.conditions[0];
|
|
3121
|
+
if (!l) return;
|
|
3122
|
+
let u = { value: Array.isArray(l.value) ? [] : "", interacted: false };
|
|
3123
|
+
Object.assign(l, u), e.settingFilters = false;
|
|
3124
|
+
});
|
|
3125
|
+
function nt() {
|
|
3126
|
+
return inlineWorker('var Bo=Object.create;var Hr=Object.defineProperty,Oo=Object.defineProperties,Fo=Object.getOwnPropertyDescriptor,Lo=Object.getOwnPropertyDescriptors,ko=Object.getOwnPropertyNames,or=Object.getOwnPropertySymbols,Po=Object.getPrototypeOf,zr=Object.prototype.hasOwnProperty,On=Object.prototype.propertyIsEnumerable;var Bn=(t,e,r)=>e in t?Hr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,b=(t,e)=>{for(var r in e||(e={}))zr.call(e,r)&&Bn(t,r,e[r]);if(or)for(var r of or(e))On.call(e,r)&&Bn(t,r,e[r]);return t},O=(t,e)=>Oo(t,Lo(e));var X=(t,e)=>{var r={};for(var n in t)zr.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&or)for(var n of or(t))e.indexOf(n)<0&&On.call(t,n)&&(r[n]=t[n]);return r};var No=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Ko=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of ko(e))!zr.call(t,i)&&i!==r&&Hr(t,i,{get:()=>e[i],enumerable:!(n=Fo(e,i))||n.enumerable});return t};var Uo=(t,e,r)=>(r=t!=null?Bo(Po(t)):{},Ko(e||!t||!t.__esModule?Hr(r,"default",{value:t,enumerable:!0}):r,t));var _o=No((Mo,Yr)=>{((t,e)=>{typeof define=="function"&&define.amd?define([],e):typeof Yr=="object"&&Yr.exports?Yr.exports=e():t.fuzzysort=e()})(Mo,t=>{"use strict";var e=(p,u)=>{if(!p||!u)return H;var h=d(p);xe(u)||(u=g(u));var w=h.bitflags;return(w&u._bitflags)!==w?H:A(h,u)},r=(p,u,h)=>{if(!p)return h!=null&&h.all?R(u,h):Et;var w=d(p),V=w.bitflags,T=w.containsSpace,x=f((h==null?void 0:h.threshold)||0),_=(h==null?void 0:h.limit)||rr,E=0,L=0,G=u.length;function he(ze){E<_?(He.add(ze),++E):(++L,ze._score>He.peek()._score&&He.replaceTop(ze))}if(h!=null&&h.key)for(var ae=h.key,W=0;W<G;++W){var me=u[W],Y=Le(me,ae);if(Y&&(xe(Y)||(Y=g(Y)),(V&Y._bitflags)===V)){var z=A(w,Y);z!==H&&(z._score<x||(z.obj=me,he(z)))}}else if(h!=null&&h.keys){var ke=h.keys,Se=ke.length;e:for(var W=0;W<G;++W){var me=u[W];{for(var le=0,$=0;$<Se;++$){var ae=ke[$],Y=Le(me,ae);if(!Y){be[$]=ne;continue}xe(Y)||(Y=g(Y)),be[$]=Y,le|=Y._bitflags}if((V&le)!==V)continue}if(T)for(let q=0;q<w.spaceSearches.length;q++)N[q]=de;for(var $=0;$<Se;++$){if(Y=be[$],Y===ne){re[$]=ne;continue}if(re[$]=A(w,Y,!1,T),re[$]===H){re[$]=ne;continue}if(T)for(let j=0;j<w.spaceSearches.length;j++){if(k[j]>-1e3&&N[j]>de){var ie=(N[j]+k[j])/4;ie>N[j]&&(N[j]=ie)}k[j]>N[j]&&(N[j]=k[j])}}if(T){for(let q=0;q<w.spaceSearches.length;q++)if(N[q]===de)continue e}else{var U=!1;for(let q=0;q<Se;q++)if(re[q]._score!==de){U=!0;break}if(!U)continue}var ye=new a(Se);for(let q=0;q<Se;q++)ye[q]=re[q];if(T){var ee=0;for(let q=0;q<w.spaceSearches.length;q++)ee+=N[q]}else{var ee=de;for(let j=0;j<Se;j++){var z=ye[j];if(z._score>-1e3&&ee>de){var ie=(ee+z._score)/4;ie>ee&&(ee=ie)}z._score>ee&&(ee=z._score)}}if(ye.obj=me,ye._score=ee,h!=null&&h.scoreFn){if(ee=h.scoreFn(ye),!ee)continue;ee=f(ee),ye._score=ee}ee<x||he(ye)}}else for(var W=0;W<G;++W){var Y=u[W];if(Y&&(xe(Y)||(Y=g(Y)),(V&Y._bitflags)===V)){var z=A(w,Y);z!==H&&(z._score<x||he(z))}}if(E===0)return Et;for(var Pe=new Array(E),W=E-1;W>=0;--W)Pe[W]=He.poll();return Pe.total=E+L,Pe},n=(p,u="<b>",h="</b>")=>{for(var w=typeof u=="function"?u:void 0,V=p.target,T=V.length,x=p.indexes,_="",E=0,L=0,G=!1,he=[],ae=0;ae<T;++ae){var W=V[ae];if(x[L]===ae){if(++L,G||(G=!0,w?(he.push(_),_=""):_+=u),L===x.length){w?(_+=W,he.push(w(_,E++)),_="",he.push(V.substr(ae+1))):_+=W+h+V.substr(ae+1);break}}else G&&(G=!1,w?(he.push(w(_,E++)),_=""):_+=h);_+=W}return w?he:_},i=p=>{typeof p=="number"?p=""+p:typeof p!="string"&&(p="");var u=I(p);return l(p,{_targetLower:u._lower,_targetLowerCodes:u.lowerCodes,_bitflags:u.bitflags})},o=()=>{M.clear(),B.clear()};class s{get indexes(){return this._indexes.slice(0,this._indexes.len).sort((u,h)=>u-h)}set indexes(u){return this._indexes=u}highlight(u,h){return n(this,u,h)}get score(){return m(this._score)}set score(u){this._score=f(u)}}class a extends Array{get score(){return m(this._score)}set score(u){this._score=f(u)}}var l=(p,u)=>{var w,V,T,x,_,E,L;let h=new s;return h.target=p,h.obj=(w=u.obj)!=null?w:H,h._score=(V=u._score)!=null?V:de,h._indexes=(T=u._indexes)!=null?T:[],h._targetLower=(x=u._targetLower)!=null?x:"",h._targetLowerCodes=(_=u._targetLowerCodes)!=null?_:H,h._nextBeginningIndexes=(E=u._nextBeginningIndexes)!=null?E:H,h._bitflags=(L=u._bitflags)!=null?L:0,h},m=p=>p===de?0:p>1?p:Math.E**(((-p+1)**.04307-1)*-2),f=p=>p===0?de:p>1?p:1-Math.pow(Math.log(p)/-2+1,1/.04307),c=p=>{typeof p=="number"?p=""+p:typeof p!="string"&&(p=""),p=p.trim();var u=I(p),h=[];if(u.containsSpace){var w=p.split(/\\s+/);w=[...new Set(w)];for(var V=0;V<w.length;V++)if(w[V]!==""){var T=I(w[V]);h.push({lowerCodes:T.lowerCodes,_lower:w[V].toLowerCase(),containsSpace:!1})}}return{lowerCodes:u.lowerCodes,_lower:u._lower,containsSpace:u.containsSpace,bitflags:u.bitflags,spaceSearches:h}},g=p=>{if(p.length>999)return i(p);var u=M.get(p);return u!==void 0||(u=i(p),M.set(p,u)),u},d=p=>{if(p.length>999)return c(p);var u=B.get(p);return u!==void 0||(u=c(p),B.set(p,u)),u},R=(p,u)=>{var h=[];h.total=p.length;var w=(u==null?void 0:u.limit)||rr;if(u!=null&&u.key)for(var V=0;V<p.length;V++){var T=p[V],x=Le(T,u.key);if(x!=H){xe(x)||(x=g(x));var _=l(x.target,{_score:x._score,obj:T});if(h.push(_),h.length>=w)return h}}else if(u!=null&&u.keys)for(var V=0;V<p.length;V++){for(var T=p[V],E=new a(u.keys.length),L=u.keys.length-1;L>=0;--L){var x=Le(T,u.keys[L]);if(!x){E[L]=ne;continue}xe(x)||(x=g(x)),x._score=de,x._indexes.len=0,E[L]=x}if(E.obj=T,E._score=de,h.push(E),h.length>=w)return h}else for(var V=0;V<p.length;V++){var x=p[V];if(x!=H&&(xe(x)||(x=g(x)),x._score=de,x._indexes.len=0,h.push(x),h.length>=w))return h}return h},A=(p,u,h=!1,w=!1)=>{if(h===!1&&p.containsSpace)return C(p,u,w);for(var V=p._lower,T=p.lowerCodes,x=T[0],_=u._targetLowerCodes,E=T.length,L=_.length,W=0,G=0,he=0;;){var ae=x===_[G];if(ae){if(K[he++]=G,++W,W===E)break;x=T[W]}if(++G,G>=L)return H}var W=0,me=!1,Y=0,z=u._nextBeginningIndexes;z===H&&(z=u._nextBeginningIndexes=F(u.target)),G=K[0]===0?0:z[K[0]-1];var ke=0;if(G!==L)for(;;)if(G>=L){if(W<=0||(++ke,ke>200))break;--W;var Se=v[--Y];G=z[Se]}else{var ae=T[W]===_[G];if(ae){if(v[Y++]=G,++W,W===E){me=!0;break}++G}else G=z[G]}var le=E<=1?-1:u._targetLower.indexOf(V,K[0]),$=!!~le,ie=$?le===0||u._nextBeginningIndexes[le-1]===le:!1;if($&&!ie){for(var U=0;U<z.length;U=z[U])if(!(U<=le)){for(var ye=0;ye<E&&T[ye]===u._targetLowerCodes[U+ye];ye++);if(ye===E){le=U,ie=!0;break}}}var ee=q=>{for(var j=0,Dn=0,_e=1;_e<E;++_e)q[_e]-q[_e-1]!==1&&(j-=q[_e],++Dn);var Do=q[E-1]-q[0]-(E-1);if(j-=(12+Do)*Dn,q[0]!==0&&(j-=q[0]*q[0]*.2),!me)j*=1e3;else{for(var qr=1,_e=z[0];_e<L;_e=z[_e])++qr;qr>24&&(j*=(qr-24)*10)}return j-=(L-E)/2,$&&(j/=1+E*E*1),ie&&(j/=1+E*E*1),j-=(L-E)/2,j};if(me)if(ie){for(var U=0;U<E;++U)K[U]=le+U;var Pe=K,ze=ee(K)}else var Pe=v,ze=ee(v);else{if($)for(var U=0;U<E;++U)K[U]=le+U;var Pe=K,ze=ee(Pe)}u._score=ze;for(var U=0;U<E;++U)u._indexes[U]=Pe[U];u._indexes.len=E;let ir=new s;return ir.target=u.target,ir._score=u._score,ir._indexes=u._indexes,ir},C=(p,u,h)=>{for(var w=new Set,V=0,T=H,x=0,_=p.spaceSearches,E=_.length,L=0,G=()=>{for(let ie=L-1;ie>=0;ie--)u._nextBeginningIndexes[P[ie*2+0]]=P[ie*2+1]},he=!1,$=0;$<E;++$){k[$]=de;var ae=_[$];if(T=A(ae,u),h){if(T===H)continue;he=!0}else if(T===H)return G(),H;var W=$===E-1;if(!W){var me=T._indexes,Y=!0;for(let U=0;U<me.len-1;U++)if(me[U+1]-me[U]!==1){Y=!1;break}if(Y){var z=me[me.len-1]+1,ke=u._nextBeginningIndexes[z-1];for(let U=z-1;U>=0&&ke===u._nextBeginningIndexes[U];U--)u._nextBeginningIndexes[U]=z,P[L*2+0]=U,P[L*2+1]=ke,L++}}V+=T._score/E,k[$]=T._score/E,T._indexes[0]<x&&(V-=(x-T._indexes[0])*2),x=T._indexes[0];for(var Se=0;Se<T._indexes.len;++Se)w.add(T._indexes[Se])}if(h&&!he)return H;G();var le=A(p,u,!0);if(le!==H&&le._score>V){if(h)for(var $=0;$<E;++$)k[$]=le._score/E;return le}h&&(T=u),T._score=V;var $=0;for(let ie of w)T._indexes[$++]=ie;return T._indexes.len=$,T},S=p=>p.replace(new RegExp("\\\\p{Script=Latin}+","gu"),u=>u.normalize("NFD")).replace(/[\\u0300-\\u036f]/g,""),I=p=>{p=S(p);for(var u=p.length,h=p.toLowerCase(),w=[],V=0,T=!1,x=0;x<u;++x){var _=w[x]=h.charCodeAt(x);if(_===32){T=!0;continue}var E=_>=97&&_<=122?_-97:_>=48&&_<=57?26:_<=127?30:31;V|=1<<E}return{lowerCodes:w,bitflags:V,containsSpace:T,_lower:h}},D=p=>{for(var u=p.length,h=[],w=0,V=!1,T=!1,x=0;x<u;++x){var _=p.charCodeAt(x),E=_>=65&&_<=90,L=E||_>=97&&_<=122||_>=48&&_<=57,G=E&&!V||!T||!L;V=E,T=L,G&&(h[w++]=x)}return h},F=p=>{p=S(p);for(var u=p.length,h=D(p),w=[],V=h[0],T=0,x=0;x<u;++x)V>x?w[x]=V:(V=h[++T],w[x]=V===void 0?u:V);return w},M=new Map,B=new Map,K=[],v=[],P=[],N=[],k=[],be=[],re=[],Le=(p,u)=>{var h=p[u];if(h!==void 0)return h;if(typeof u=="function")return u(p);var w=u;Array.isArray(u)||(w=u.split("."));for(var V=w.length,T=-1;p&&++T<V;)p=p[w[T]];return p},xe=p=>typeof p=="object"&&typeof p._bitflags=="number",rr=1/0,de=-rr,Et=[];Et.total=0;var H=null,ne=i(""),nr=p=>{var u=[],h=0,w={},V=T=>{for(var x=0,_=u[x],E=1;E<h;){var L=E+1;x=E,L<h&&u[L]._score<u[E]._score&&(x=L),u[x-1>>1]=u[x],E=1+(x<<1)}for(var G=x-1>>1;x>0&&_._score<u[G]._score;G=(x=G)-1>>1)u[x]=u[G];u[x]=_};return w.add=(T=>{var x=h;u[h++]=T;for(var _=x-1>>1;x>0&&T._score<u[_]._score;_=(x=_)-1>>1)u[x]=u[_];u[x]=T}),w.poll=(T=>{if(h!==0){var x=u[0];return u[0]=u[--h],V(),x}}),w.peek=(T=>{if(h!==0)return u[0]}),w.replaceTop=(T=>{u[0]=T,V()}),w},He=nr();return{single:e,go:r,prepare:i,cleanup:o}})});function jr(t,e){t.indexOf(e)===-1&&t.push(e)}function je(t,e){let r=t.indexOf(e);r>-1&&t.splice(r,1)}var fe=(t,e,r)=>r>e?e:r<t?t:r;var Ie=()=>{},ge=()=>{};var ue={};var wt=t=>/^-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)$/u.test(t);function Xr(t){return typeof t=="object"&&t!==null}var Vt=t=>/^0[^.\\s]+$/u.test(t);function Xe(t){let e;return()=>(e===void 0&&(e=t()),e)}var Te=t=>t;var Go=(t,e)=>r=>e(t(r)),Ze=(...t)=>t.reduce(Go);var Je=(t,e,r)=>{let n=e-t;return n===0?1:(r-t)/n};var Qe=class{constructor(){this.subscriptions=[]}add(e){return jr(this.subscriptions,e),()=>je(this.subscriptions,e)}notify(e,r,n){let i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,r,n);else for(let o=0;o<i;o++){let s=this.subscriptions[o];s&&s(e,r,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}};var oe=t=>t*1e3,se=t=>t/1e3;function Mt(t,e){return e?t*(1e3/e):0}var Fn=(t,e,r)=>{let n=e-t;return((r-t)%n+n)%n+t};var Ln=(t,e,r)=>(((1-3*r+3*e)*t+(3*r-6*e))*t+3*e)*t,$o=1e-7,Wo=12;function Yo(t,e,r,n,i){let o,s,a=0;do s=e+(r-e)/2,o=Ln(s,n,i)-t,o>0?r=s:e=s;while(Math.abs(o)>$o&&++a<Wo);return s}function Ne(t,e,r,n){if(t===e&&r===n)return Te;let i=o=>Yo(o,0,1,t,r);return o=>o===0||o===1?o:Ln(i(o),e,n)}var sr=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2;var ar=t=>e=>1-t(1-e);var lr=Ne(.33,1.53,.69,.99),st=ar(lr),_t=sr(st);var It=t=>(t*=2)<1?.5*st(t):.5*(2-Math.pow(2,-10*(t-1)));var Ct=t=>1-Math.sin(Math.acos(t)),Zr=ar(Ct),Rt=sr(Ct);var Jr=Ne(.42,0,1,1),Qr=Ne(0,0,.58,1),Dt=Ne(.42,0,.58,1);var Bt=t=>Array.isArray(t)&&typeof t[0]!="number";function Ot(t,e){return Bt(t)?t[Fn(0,t.length,e)]:t}var Ft=t=>Array.isArray(t)&&typeof t[0]=="number";var kn={linear:Te,easeIn:Jr,easeInOut:Dt,easeOut:Qr,circIn:Ct,circInOut:Rt,circOut:Zr,backIn:st,backInOut:_t,backOut:lr,anticipate:It},qo=t=>typeof t=="string",at=t=>{if(Ft(t)){ge(t.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");let[e,r,n,i]=t;return Ne(e,r,n,i)}else if(qo(t))return ge(kn[t]!==void 0,`Invalid easing type \'${t}\'`,"invalid-easing-type"),kn[t];return t};var Lt=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];var lt={value:null,addProjectionMetrics:null};function Pn(t,e){let r=new Set,n=new Set,i=!1,o=!1,s=new WeakSet,a={delta:0,timestamp:0,isProcessing:!1},l=0;function m(c){s.has(c)&&(f.schedule(c),t()),l++,c(a)}let f={schedule:(c,g=!1,d=!1)=>{let A=d&&i?r:n;return g&&s.add(c),A.has(c)||A.add(c),c},cancel:c=>{n.delete(c),s.delete(c)},process:c=>{if(a=c,i){o=!0;return}i=!0,[r,n]=[n,r],r.forEach(m),e&<.value&<.value.frameloop[e].push(l),l=0,r.clear(),i=!1,o&&(o=!1,f.process(c))}};return f}var Ho=40;function fr(t,e){let r=!1,n=!0,i={delta:0,timestamp:0,isProcessing:!1},o=()=>r=!0,s=Lt.reduce((D,F)=>(D[F]=Pn(o,e?F:void 0),D),{}),{setup:a,read:l,resolveKeyframes:m,preUpdate:f,update:c,preRender:g,render:d,postRender:R}=s,A=()=>{let D=ue.useManualTiming?i.timestamp:performance.now();r=!1,ue.useManualTiming||(i.delta=n?1e3/60:Math.max(Math.min(D-i.timestamp,Ho),1)),i.timestamp=D,i.isProcessing=!0,a.process(i),l.process(i),m.process(i),f.process(i),c.process(i),g.process(i),d.process(i),R.process(i),i.isProcessing=!1,r&&e&&(n=!1,t(A))},C=()=>{r=!0,n=!0,i.isProcessing||t(A)};return{schedule:Lt.reduce((D,F)=>{let M=s[F];return D[F]=(B,K=!1,v=!1)=>(r||C(),M.schedule(B,K,v)),D},{}),cancel:D=>{for(let F=0;F<Lt.length;F++)s[Lt[F]].cancel(D)},state:i,steps:s}}var{schedule:ce,cancel:kt,state:ft,steps:Af}=fr(typeof requestAnimationFrame!="undefined"?requestAnimationFrame:Te,!0);var ur;function zo(){ur=void 0}var te={now:()=>(ur===void 0&&te.set(ft.isProcessing||ue.useManualTiming?ft.timestamp:performance.now()),ur),set:t=>{ur=t,queueMicrotask(zo)}};var ut={layout:0,mainThread:0,waapi:0};var Nn=t=>e=>typeof e=="string"&&e.startsWith(t),mr=Nn("--"),jo=Nn("var(--"),mt=t=>jo(t)?Xo.test(t.split("/*")[0].trim()):!1,Xo=/var\\(--(?:[\\w-]+\\s*|[\\w-]+\\s*,(?:\\s*[^)(\\s]|\\s*\\((?:[^)(]|\\([^)(]*\\))*\\))+\\s*)\\)$/iu;function en(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}var Ee={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Ce=O(b({},Ee),{transform:t=>fe(0,1,t)}),Pt=O(b({},Ee),{default:1});var Ke=t=>Math.round(t*1e5)/1e5;var ct=/-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)/gu;function Kn(t){return t==null}var Un=/^(?:#[\\da-f]{3,8}|(?:rgb|hsl)a?\\((?:-?[\\d.]+%?[,\\s]+){2}-?[\\d.]+%?\\s*(?:[,/]\\s*)?(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)?%?\\))$/iu;var pt=(t,e)=>r=>!!(typeof r=="string"&&Un.test(r)&&r.startsWith(t)||e&&!Kn(r)&&Object.prototype.hasOwnProperty.call(r,e)),cr=(t,e,r)=>n=>{if(typeof n!="string")return n;let[i,o,s,a]=n.match(ct);return{[t]:parseFloat(i),[e]:parseFloat(o),[r]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}};var Zo=t=>fe(0,255,t),tn=O(b({},Ee),{transform:t=>Math.round(Zo(t))}),we={test:pt("rgb","red"),parse:cr("red","green","blue"),transform:({red:t,green:e,blue:r,alpha:n=1})=>"rgba("+tn.transform(t)+", "+tn.transform(e)+", "+tn.transform(r)+", "+Ke(Ce.transform(n))+")"};function Jo(t){let e="",r="",n="",i="";return t.length>5?(e=t.substring(1,3),r=t.substring(3,5),n=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),r=t.substring(2,3),n=t.substring(3,4),i=t.substring(4,5),e+=e,r+=r,n+=n,i+=i),{red:parseInt(e,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:i?parseInt(i,16)/255:1}}var Nt={test:pt("#"),parse:Jo,transform:we.transform};var Kt=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Ve=Kt("deg"),Ue=Kt("%"),y=Kt("px"),Gn=Kt("vh"),$n=Kt("vw"),rn=O(b({},Ue),{parse:t=>Ue.parse(t)/100,transform:t=>Ue.transform(t*100)});var Ge={test:pt("hsl","hue"),parse:cr("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:r,alpha:n=1})=>"hsla("+Math.round(t)+", "+Ue.transform(Ke(e))+", "+Ue.transform(Ke(r))+", "+Ke(Ce.transform(n))+")"};var Q={test:t=>we.test(t)||Nt.test(t)||Ge.test(t),parse:t=>we.test(t)?we.parse(t):Ge.test(t)?Ge.parse(t):Nt.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?we.transform(t):Ge.transform(t),getAnimatableNone:t=>{let e=Q.parse(t);return e.alpha=0,Q.transform(e)}};var Wn=/(?:#[\\da-f]{3,8}|(?:rgb|hsl)a?\\((?:-?[\\d.]+%?[,\\s]+){2}-?[\\d.]+%?\\s*(?:[,/]\\s*)?(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)?%?\\))/giu;function Qo(t){var e,r;return isNaN(t)&&typeof t=="string"&&(((e=t.match(ct))==null?void 0:e.length)||0)+(((r=t.match(Wn))==null?void 0:r.length)||0)>0}var qn="number",Hn="color",es="var",ts="var(",Yn="${}",rs=/var\\s*\\(\\s*--(?:[\\w-]+\\s*|[\\w-]+\\s*,(?:\\s*[^)(\\s]|\\s*\\((?:[^)(]|\\([^)(]*\\))*\\))+\\s*)\\)|#[\\da-f]{3,8}|(?:rgb|hsl)a?\\((?:-?[\\d.]+%?[,\\s]+){2}-?[\\d.]+%?\\s*(?:[,/]\\s*)?(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)?%?\\)|-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)/giu;function et(t){let e=t.toString(),r=[],n={color:[],number:[],var:[]},i=[],o=0,a=e.replace(rs,l=>(Q.test(l)?(n.color.push(o),i.push(Hn),r.push(Q.parse(l))):l.startsWith(ts)?(n.var.push(o),i.push(es),r.push(l)):(n.number.push(o),i.push(qn),r.push(parseFloat(l))),++o,Yn)).split(Yn);return{values:r,split:a,indexes:n,types:i}}function zn(t){return et(t).values}function jn(t){let{split:e,types:r}=et(t),n=e.length;return i=>{let o="";for(let s=0;s<n;s++)if(o+=e[s],i[s]!==void 0){let a=r[s];a===qn?o+=Ke(i[s]):a===Hn?o+=Q.transform(i[s]):o+=i[s]}return o}}var ns=t=>typeof t=="number"?0:Q.test(t)?Q.getAnimatableNone(t):t;function is(t){let e=zn(t);return jn(t)(e.map(ns))}var pe={test:Qo,parse:zn,createTransformer:jn,getAnimatableNone:is};function nn(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+(e-t)*6*r:r<1/2?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function Xn({hue:t,saturation:e,lightness:r,alpha:n}){t/=360,e/=100,r/=100;let i=0,o=0,s=0;if(!e)i=o=s=r;else{let a=r<.5?r*(1+e):r+e-r*e,l=2*r-a;i=nn(l,a,t+1/3),o=nn(l,a,t),s=nn(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(s*255),alpha:n}}function dt(t,e){return r=>r>0?e:t}var ve=(t,e,r)=>t+(e-t)*r;var on=(t,e,r)=>{let n=t*t,i=r*(e*e-n)+n;return i<0?0:Math.sqrt(i)},os=[Nt,we,Ge],ss=t=>os.find(e=>e.test(t));function Zn(t){let e=ss(t);if(Ie(!!e,`\'${t}\' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!e)return!1;let r=e.parse(t);return e===Ge&&(r=Xn(r)),r}var sn=(t,e)=>{let r=Zn(t),n=Zn(e);if(!r||!n)return dt(t,e);let i=b({},r);return o=>(i.red=on(r.red,n.red,o),i.green=on(r.green,n.green,o),i.blue=on(r.blue,n.blue,o),i.alpha=ve(r.alpha,n.alpha,o),we.transform(i))};var pr=new Set(["none","hidden"]);function Jn(t,e){return pr.has(t)?r=>r<=0?t:e:r=>r>=1?e:t}function as(t,e){return r=>ve(t,e,r)}function dr(t){return typeof t=="number"?as:typeof t=="string"?mt(t)?dt:Q.test(t)?sn:us:Array.isArray(t)?Qn:typeof t=="object"?Q.test(t)?sn:ls:dt}function Qn(t,e){let r=[...t],n=r.length,i=t.map((o,s)=>dr(o)(o,e[s]));return o=>{for(let s=0;s<n;s++)r[s]=i[s](o);return r}}function ls(t,e){let r=b(b({},t),e),n={};for(let i in r)t[i]!==void 0&&e[i]!==void 0&&(n[i]=dr(t[i])(t[i],e[i]));return i=>{for(let o in n)r[o]=n[o](i);return r}}function fs(t,e){var i;let r=[],n={color:0,var:0,number:0};for(let o=0;o<e.values.length;o++){let s=e.types[o],a=t.indexes[s][n[s]],l=(i=t.values[a])!=null?i:0;r[o]=l,n[s]++}return r}var us=(t,e)=>{let r=pe.createTransformer(e),n=et(t),i=et(e);return n.indexes.var.length===i.indexes.var.length&&n.indexes.color.length===i.indexes.color.length&&n.indexes.number.length>=i.indexes.number.length?pr.has(t)&&!i.values.length||pr.has(e)&&!n.values.length?Jn(t,e):Ze(Qn(fs(n,i),i.values),r):(Ie(!0,`Complex values \'${t}\' and \'${e}\' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),dt(t,e))};function hr(t,e,r){return typeof t=="number"&&typeof e=="number"&&typeof r=="number"?ve(t,e,r):dr(t)(t,e)}var ei=t=>{let e=({timestamp:r})=>t(r);return{start:(r=!0)=>ce.update(e,r),stop:()=>kt(e),now:()=>ft.isProcessing?ft.timestamp:te.now()}};var gr=(t,e,r=10)=>{let n="",i=Math.max(Math.round(e/r),2);for(let o=0;o<i;o++)n+=Math.round(t(o/(i-1))*1e4)/1e4+", ";return`linear(${n.substring(0,n.length-2)})`};function ht(t){let e=0,r=50,n=t.next(e);for(;!n.done&&e<2e4;)e+=r,n=t.next(e);return e>=2e4?1/0:e}function Ut(t,e=100,r){let n=r(O(b({},t),{keyframes:[0,e]})),i=Math.min(ht(n),2e4);return{type:"keyframes",ease:o=>n.next(i*o).value/e,duration:se(i)}}var ms=5;function xr(t,e,r){let n=Math.max(e-ms,0);return Mt(r-t(n),e-n)}var Z={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};var ln=.001;function ti({duration:t=Z.duration,bounce:e=Z.bounce,velocity:r=Z.velocity,mass:n=Z.mass}){let i,o;Ie(t<=oe(Z.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let s=1-e;s=fe(Z.minDamping,Z.maxDamping,s),t=fe(Z.minDuration,Z.maxDuration,se(t)),s<1?(i=m=>{let f=m*s,c=f*t,g=f-r,d=yr(m,s),R=Math.exp(-c);return ln-g/d*R},o=m=>{let c=m*s*t,g=c*r+r,d=Math.pow(s,2)*Math.pow(m,2)*t,R=Math.exp(-c),A=yr(Math.pow(m,2),s);return(-i(m)+ln>0?-1:1)*((g-d)*R)/A}):(i=m=>{let f=Math.exp(-m*t),c=(m-r)*t+1;return-ln+f*c},o=m=>{let f=Math.exp(-m*t),c=(r-m)*(t*t);return f*c});let a=5/t,l=ps(i,o,a);if(t=oe(t),isNaN(l))return{stiffness:Z.stiffness,damping:Z.damping,duration:t};{let m=Math.pow(l,2)*n;return{stiffness:m,damping:s*2*Math.sqrt(n*m),duration:t}}}var cs=12;function ps(t,e,r){let n=r;for(let i=1;i<cs;i++)n=n-t(n)/e(n);return n}function yr(t,e){return t*Math.sqrt(1-e*e)}var ds=["duration","bounce"],hs=["stiffness","damping","mass"];function ri(t,e){return e.some(r=>t[r]!==void 0)}function gs(t){let e=b({velocity:Z.velocity,stiffness:Z.stiffness,damping:Z.damping,mass:Z.mass,isResolvedFromDuration:!1},t);if(!ri(t,hs)&&ri(t,ds))if(t.visualDuration){let r=t.visualDuration,n=2*Math.PI/(r*1.2),i=n*n,o=2*fe(.05,1,1-(t.bounce||0))*Math.sqrt(i);e=O(b({},e),{mass:Z.mass,stiffness:i,damping:o})}else{let r=ti(t);e=O(b(b({},e),r),{mass:Z.mass}),e.isResolvedFromDuration=!0}return e}function Re(t=Z.visualDuration,e=Z.bounce){let r=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t,{restSpeed:n,restDelta:i}=r,o=r.keyframes[0],s=r.keyframes[r.keyframes.length-1],a={done:!1,value:o},{stiffness:l,damping:m,mass:f,duration:c,velocity:g,isResolvedFromDuration:d}=gs(O(b({},r),{velocity:-se(r.velocity||0)})),R=g||0,A=m/(2*Math.sqrt(l*f)),C=s-o,S=se(Math.sqrt(l/f)),I=Math.abs(C)<5;n||(n=I?Z.restSpeed.granular:Z.restSpeed.default),i||(i=I?Z.restDelta.granular:Z.restDelta.default);let D;if(A<1){let M=yr(S,A);D=B=>{let K=Math.exp(-A*S*B);return s-K*((R+A*S*C)/M*Math.sin(M*B)+C*Math.cos(M*B))}}else if(A===1)D=M=>s-Math.exp(-S*M)*(C+(R+S*C)*M);else{let M=S*Math.sqrt(A*A-1);D=B=>{let K=Math.exp(-A*S*B),v=Math.min(M*B,300);return s-K*((R+A*S*C)*Math.sinh(v)+M*C*Math.cosh(v))/M}}let F={calculatedDuration:d&&c||null,next:M=>{let B=D(M);if(d)a.done=M>=c;else{let K=M===0?R:0;A<1&&(K=M===0?oe(R):xr(D,M,B));let v=Math.abs(K)<=n,P=Math.abs(s-B)<=i;a.done=v&&P}return a.value=a.done?s:B,a},toString:()=>{let M=Math.min(ht(F),2e4),B=gr(K=>F.next(M*K).value,M,30);return M+"ms "+B},toTransition:()=>{}};return F}Re.applyToOptions=t=>{let e=Ut(t,100,Re);return t.ease=e.ease,t.duration=oe(e.duration),t.type="keyframes",t};function Gt({keyframes:t,velocity:e=0,power:r=.8,timeConstant:n=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:s,min:a,max:l,restDelta:m=.5,restSpeed:f}){let c=t[0],g={done:!1,value:c},d=v=>a!==void 0&&v<a||l!==void 0&&v>l,R=v=>a===void 0?l:l===void 0||Math.abs(a-v)<Math.abs(l-v)?a:l,A=r*e,C=c+A,S=s===void 0?C:s(C);S!==C&&(A=S-c);let I=v=>-A*Math.exp(-v/n),D=v=>S+I(v),F=v=>{let P=I(v),N=D(v);g.done=Math.abs(P)<=m,g.value=g.done?S:N},M,B,K=v=>{d(g.value)&&(M=v,B=Re({keyframes:[g.value,R(g.value)],velocity:xr(D,v,g.value),damping:i,stiffness:o,restDelta:m,restSpeed:f}))};return K(0),{calculatedDuration:null,next:v=>{let P=!1;return!B&&M===void 0&&(P=!0,F(v),K(v)),M!==void 0&&v>=M?B.next(v-M):(!P&&F(v),g)}}}function xs(t,e,r){let n=[],i=r||ue.mix||hr,o=t.length-1;for(let s=0;s<o;s++){let a=i(t[s],t[s+1]);if(e){let l=Array.isArray(e)?e[s]||Te:e;a=Ze(l,a)}n.push(a)}return n}function ni(t,e,{clamp:r=!0,ease:n,mixer:i}={}){let o=t.length;if(ge(o===e.length,"Both input and output ranges must be the same length","range-length"),o===1)return()=>e[0];if(o===2&&e[0]===e[1])return()=>e[1];let s=t[0]===t[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());let a=xs(e,n,i),l=a.length,m=f=>{if(s&&f<t[0])return e[0];let c=0;if(l>1)for(;c<t.length-2&&!(f<t[c+1]);c++);let g=Je(t[c],t[c+1],f);return a[c](g)};return r?f=>m(fe(t[0],t[o-1],f)):m}function $t(t,e){let r=t[t.length-1];for(let n=1;n<=e;n++){let i=Je(0,e,n);t.push(ve(r,1,i))}}function Wt(t){let e=[0];return $t(e,t.length-1),e}function ii(t,e){return t.map(r=>r*e)}function ys(t,e){return t.map(()=>e||Dt).splice(0,t.length-1)}function tt({duration:t=300,keyframes:e,times:r,ease:n="easeInOut"}){let i=Bt(n)?n.map(at):at(n),o={done:!1,value:e[0]},s=ii(r&&r.length===e.length?r:Wt(e),t),a=ni(s,e,{ease:Array.isArray(i)?i:ys(e,i)});return{calculatedDuration:t,next:l=>(o.value=a(l),o.done=l>=t,o)}}var Ts=t=>t!==null;function gt(t,{repeat:e,repeatType:r="loop"},n,i=1){let o=t.filter(Ts),a=i<0||e&&r!=="loop"&&e%2===1?0:o.length-1;return!a||n===void 0?o[a]:n}var vs={decay:Gt,inertia:Gt,tween:tt,keyframes:tt,spring:Re};function Tr(t){typeof t.type=="string"&&(t.type=vs[t.type])}var $e=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,r){return this.finished.then(e,r)}};var bs=t=>t/100,We=class extends $e{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var n,i;let{motionValue:r}=this.options;r&&r.updatedAt!==te.now()&&this.tick(te.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(n=this.options).onStop)==null||i.call(n))},ut.mainThread++,this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){let{options:e}=this;Tr(e);let{type:r=tt,repeat:n=0,repeatDelay:i=0,repeatType:o,velocity:s=0}=e,{keyframes:a}=e,l=r||tt;l!==tt&&typeof a[0]!="number"&&(this.mixKeyframes=Ze(bs,hr(a[0],a[1])),a=[0,100]);let m=l(O(b({},e),{keyframes:a}));o==="mirror"&&(this.mirroredGenerator=l(O(b({},e),{keyframes:[...a].reverse(),velocity:-s}))),m.calculatedDuration===null&&(m.calculatedDuration=ht(m));let{calculatedDuration:f}=m;this.calculatedDuration=f,this.resolvedDuration=f+i,this.totalDuration=this.resolvedDuration*(n+1)-i,this.generator=m}updateTime(e){let r=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=r}tick(e,r=!1){let{generator:n,totalDuration:i,mixKeyframes:o,mirroredGenerator:s,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return n.next(0);let{delay:m=0,keyframes:f,repeat:c,repeatType:g,repeatDelay:d,type:R,onUpdate:A,finalKeyframe:C}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-i/this.speed,this.startTime)),r?this.currentTime=e:this.updateTime(e);let S=this.currentTime-m*(this.playbackSpeed>=0?1:-1),I=this.playbackSpeed>=0?S<0:S>i;this.currentTime=Math.max(S,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let D=this.currentTime,F=n;if(c){let v=Math.min(this.currentTime,i)/a,P=Math.floor(v),N=v%1;!N&&v>=1&&(N=1),N===1&&P--,P=Math.min(P,c+1),P%2&&(g==="reverse"?(N=1-N,d&&(N-=d/a)):g==="mirror"&&(F=s)),D=fe(0,1,N)*a}let M=I?{done:!1,value:f[0]}:F.next(D);o&&(M.value=o(M.value));let{done:B}=M;!I&&l!==null&&(B=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);let K=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&B);return K&&R!==Gt&&(M.value=gt(f,this.options,C,this.speed)),A&&A(M.value),K&&this.finish(),M}then(e,r){return this.finished.then(e,r)}get duration(){return se(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+se(e)}get time(){return se(this.currentTime)}set time(e){var r;e=oe(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),(r=this.driver)==null||r.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(te.now());let r=this.playbackSpeed!==e;this.playbackSpeed=e,r&&(this.time=se(this.currentTime))}play(){var i,o;if(this.isStopped)return;let{driver:e=ei,startTime:r}=this.options;this.driver||(this.driver=e(s=>this.tick(s))),(o=(i=this.options).onPlay)==null||o.call(i);let n=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=n):this.holdTime!==null?this.startTime=n-this.holdTime:this.startTime||(this.startTime=r!=null?r:n),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(te.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var e,r;this.notifyFinished(),this.teardown(),this.state="finished",(r=(e=this.options).onComplete)==null||r.call(e)}cancel(){var e,r;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(r=(e=this.options).onCancel)==null||r.call(e)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null,ut.mainThread--}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){var r;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(r=this.driver)==null||r.stop(),e.observe(this)}};function oi(t){var e;for(let r=1;r<t.length;r++)(e=t[r])!=null||(t[r]=t[r-1])}var rt=t=>t*180/Math.PI,fn=t=>{let e=rt(Math.atan2(t[1],t[0]));return un(e)},Ss={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:fn,rotateZ:fn,skewX:t=>rt(Math.atan(t[1])),skewY:t=>rt(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},un=t=>(t=t%360,t<0&&(t+=360),t),si=fn,ai=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),li=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),As={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:ai,scaleY:li,scale:t=>(ai(t)+li(t))/2,rotateX:t=>un(rt(Math.atan2(t[6],t[5]))),rotateY:t=>un(rt(Math.atan2(-t[2],t[0]))),rotateZ:si,rotate:si,skewX:t=>rt(Math.atan(t[4])),skewY:t=>rt(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function vr(t){return t.includes("scale")?1:0}function br(t,e){if(!t||t==="none")return vr(e);let r=t.match(/^matrix3d\\(([-\\d.e\\s,]+)\\)$/u),n,i;if(r)n=As,i=r;else{let a=t.match(/^matrix\\(([-\\d.e\\s,]+)\\)$/u);n=Ss,i=a}if(!i)return vr(e);let o=n[e],s=i[1].split(",").map(Es);return typeof o=="function"?o(s):s[o]}var fi=(t,e)=>{let{transform:r="none"}=getComputedStyle(t);return br(r,e)};function Es(t){return parseFloat(t.trim())}var Me=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ae=new Set(Me);var mn=t=>t===Ee||t===y,ws=new Set(["x","y","z"]),Vs=Me.filter(t=>!ws.has(t));function ui(t){let e=[];return Vs.forEach(r=>{let n=t.getValue(r);n!==void 0&&(e.push([r,n.get()]),n.set(r.startsWith("scale")?1:0))}),e}var De={width:({x:t},{paddingLeft:e="0",paddingRight:r="0"})=>t.max-t.min-parseFloat(e)-parseFloat(r),height:({y:t},{paddingTop:e="0",paddingBottom:r="0"})=>t.max-t.min-parseFloat(e)-parseFloat(r),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>br(e,"x"),y:(t,{transform:e})=>br(e,"y")};De.translateX=De.x;De.translateY=De.y;var nt=new Set,cn=!1,pn=!1,dn=!1;function mi(){if(pn){let t=Array.from(nt).filter(n=>n.needsMeasurement),e=new Set(t.map(n=>n.element)),r=new Map;e.forEach(n=>{let i=ui(n);i.length&&(r.set(n,i),n.render())}),t.forEach(n=>n.measureInitialState()),e.forEach(n=>{n.render();let i=r.get(n);i&&i.forEach(([o,s])=>{var a;(a=n.getValue(o))==null||a.set(s)})}),t.forEach(n=>n.measureEndState()),t.forEach(n=>{n.suspendedScrollY!==void 0&&window.scrollTo(0,n.suspendedScrollY)})}pn=!1,cn=!1,nt.forEach(t=>t.complete(dn)),nt.clear()}function ci(){nt.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(pn=!0)})}function pi(){dn=!0,ci(),mi(),dn=!1}var Ye=class{constructor(e,r,n,i,o,s=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=r,this.name=n,this.motionValue=i,this.element=o,this.isAsync=s}scheduleResolve(){this.state="scheduled",this.isAsync?(nt.add(this),cn||(cn=!0,ce.read(ci),ce.resolveKeyframes(mi))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:r,element:n,motionValue:i}=this;if(e[0]===null){let o=i==null?void 0:i.get(),s=e[e.length-1];if(o!==void 0)e[0]=o;else if(n&&r){let a=n.readValue(r,s);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=s),i&&o===void 0&&i.set(e[0])}oi(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),nt.delete(this)}cancel(){this.state==="scheduled"&&(nt.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}};var di=t=>t.startsWith("--");function hi(t,e,r){di(e)?t.style.setProperty(e,r):t.style[e]=r}var gi=Xe(()=>window.ScrollTimeline!==void 0);var xi={};function yi(t,e){let r=Xe(t);return()=>{var n;return(n=xi[e])!=null?n:r()}}var Sr=yi(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing");var it=([t,e,r,n])=>`cubic-bezier(${t}, ${e}, ${r}, ${n})`;var hn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:it([0,.65,.55,1]),circOut:it([.55,0,1,.45]),backIn:it([.31,.01,.66,-.59]),backOut:it([.33,1.53,.69,.99])};function gn(t,e){if(t)return typeof t=="function"?Sr()?gr(t,e):"ease-out":Ft(t)?it(t):Array.isArray(t)?t.map(r=>gn(r,e)||hn.easeOut):hn[t]}function Ti(t,e,r,{delay:n=0,duration:i=300,repeat:o=0,repeatType:s="loop",ease:a="easeOut",times:l}={},m=void 0){let f={[e]:r};l&&(f.offset=l);let c=gn(a,i);Array.isArray(c)&&(f.easing=c),lt.value&&ut.waapi++;let g={delay:n,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:o+1,direction:s==="reverse"?"alternate":"normal"};m&&(g.pseudoElement=m);let d=t.animate(f,g);return lt.value&&d.finished.finally(()=>{ut.waapi--}),d}function ot(t){return typeof t=="function"&&"applyToOptions"in t}function vi(r){var n=r,{type:t}=n,e=X(n,["type"]);var i,o;return ot(t)&&Sr()?t.applyToOptions(e):((i=e.duration)!=null||(e.duration=300),(o=e.ease)!=null||(e.ease="easeOut"),e)}var Ar=class extends $e{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:r,name:n,keyframes:i,pseudoElement:o,allowFlatten:s=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=!!o,this.allowFlatten=s,this.options=e,ge(typeof e.type!="string",`Mini animate() doesn\'t support "type" as a string.`,"mini-spring");let m=vi(e);this.animation=Ti(r,n,i,m,o),m.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){let f=gt(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(f):hi(r,n,f),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var e,r;(r=(e=this.animation).finish)==null||r.call(e)}cancel(){try{this.animation.cancel()}catch(e){}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var e,r;this.isPseudoElement||(r=(e=this.animation).commitStyles)==null||r.call(e)}get duration(){var r,n;let e=((n=(r=this.animation.effect)==null?void 0:r.getComputedTiming)==null?void 0:n.call(r).duration)||0;return se(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+se(e)}get time(){return se(Number(this.animation.currentTime)||0)}set time(e){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=oe(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){var e;return(e=this.manualStartTime)!=null?e:Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,observe:r}){var n;return this.allowFlatten&&((n=this.animation.effect)==null||n.updateTiming({easing:"linear"})),this.animation.onfinish=null,e&&gi()?(this.animation.timeline=e,Te):r(this)}};var bi={anticipate:It,backInOut:_t,circInOut:Rt};function Ms(t){return t in bi}function Si(t){typeof t.ease=="string"&&Ms(t.ease)&&(t.ease=bi[t.ease])}var xn=10,Er=class extends Ar{constructor(e){Si(e),Tr(e),super(e),e.startTime!==void 0&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let f=this.options,{motionValue:r,onUpdate:n,onComplete:i,element:o}=f,s=X(f,["motionValue","onUpdate","onComplete","element"]);if(!r)return;if(e!==void 0){r.set(e);return}let a=new We(O(b({},s),{autoplay:!1})),l=Math.max(xn,te.now()-this.startTime),m=fe(0,xn,l-xn);r.setWithVelocity(a.sample(Math.max(0,l-m)).value,a.sample(l).value,m),a.stop()}};var yn=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(pe.test(t)||t==="0")&&!t.startsWith("url("));function _s(t){let e=t[0];if(t.length===1)return!0;for(let r=0;r<t.length;r++)if(t[r]!==e)return!0}function Ai(t,e,r,n){let i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;let o=t[t.length-1],s=yn(i,e),a=yn(o,e);return Ie(s===a,`You are trying to animate ${e} from "${i}" to "${o}". "${s?o:i}" is not an animatable value.`,"value-not-animatable"),!s||!a?!1:_s(t)||(r==="spring"||ot(r))&&n}function Yt(t){t.duration=0,t.type="keyframes"}var Is=new Set(["opacity","clipPath","filter","transform"]),Cs=Xe(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Ei(t){var f;let{motionValue:e,name:r,repeatDelay:n,repeatType:i,damping:o,type:s}=t;if(!(((f=e==null?void 0:e.owner)==null?void 0:f.current)instanceof HTMLElement))return!1;let{onUpdate:l,transformTemplate:m}=e.owner.getProps();return Cs()&&r&&Is.has(r)&&(r!=="transform"||!m)&&!l&&!n&&i!=="mirror"&&o!==0&&s!=="inertia"}var Rs=40,wr=class extends $e{constructor(g){var d=g,{autoplay:e=!0,delay:r=0,type:n="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:s="loop",keyframes:a,name:l,motionValue:m,element:f}=d,c=X(d,["autoplay","delay","type","repeat","repeatDelay","repeatType","keyframes","name","motionValue","element"]);var C;super(),this.stop=()=>{var S,I;this._animation&&(this._animation.stop(),(S=this.stopTimeline)==null||S.call(this)),(I=this.keyframeResolver)==null||I.cancel()},this.createdAt=te.now();let R=b({autoplay:e,delay:r,type:n,repeat:i,repeatDelay:o,repeatType:s,name:l,motionValue:m,element:f},c),A=(f==null?void 0:f.KeyframeResolver)||Ye;this.keyframeResolver=new A(a,(S,I,D)=>this.onKeyframesResolved(S,I,R,!D),l,m,f),(C=this.keyframeResolver)==null||C.scheduleResolve()}onKeyframesResolved(e,r,n,i){var C,S;this.keyframeResolver=void 0;let{name:o,type:s,velocity:a,delay:l,isHandoff:m,onUpdate:f}=n;this.resolvedAt=te.now(),Ai(e,o,s,a)||((ue.instantAnimations||!l)&&(f==null||f(gt(e,n,r))),e[0]=e[e.length-1],Yt(n),n.repeat=0);let c=i?this.resolvedAt?this.resolvedAt-this.createdAt>Rs?this.resolvedAt:this.createdAt:this.createdAt:void 0,g=O(b({startTime:c,finalKeyframe:r},n),{keyframes:e}),d=!m&&Ei(g),R=(S=(C=g.motionValue)==null?void 0:C.owner)==null?void 0:S.current,A=d?new Er(O(b({},g),{element:R})):new We(g);A.finished.then(()=>{this.notifyFinished()}).catch(Te),this.pendingTimeline&&(this.stopTimeline=A.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=A}get finished(){return this._animation?this.animation.finished:this._finished}then(e,r){return this.finished.finally(e).then(()=>{})}get animation(){var e;return this._animation||((e=this.keyframeResolver)==null||e.resume(),pi()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var e;this._animation&&this.animation.cancel(),(e=this.keyframeResolver)==null||e.cancel()}};var Vr=class{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>e.finished))}getAll(e){return this.animations[0][e]}setAll(e,r){for(let n=0;n<this.animations.length;n++)this.animations[n][e]=r}attachTimeline(e){let r=this.animations.map(n=>n.attachTimeline(e));return()=>{r.forEach((n,i)=>{n&&n(),this.animations[i].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return wi(this.animations,"duration")}get iterationDuration(){return wi(this.animations,"iterationDuration")}runAll(e){this.animations.forEach(r=>r[e]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}};function wi(t,e){let r=0;for(let n=0;n<t.length;n++){let i=t[n][e];i!==null&&i>r&&(r=i)}return r}var qt=class extends Vr{then(e,r){return this.finished.finally(e).then(()=>{})}};var Ds=/^var\\(--(?:([\\w-]+)|([\\w-]+), ?([a-zA-Z\\d ()%#.,-]+))\\)/u;function Bs(t){let e=Ds.exec(t);if(!e)return[,];let[,r,n,i]=e;return[`--${r!=null?r:n}`,i]}var Os=4;function Tn(t,e,r=1){ge(r<=Os,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");let[n,i]=Bs(t);if(!n)return;let o=window.getComputedStyle(e).getPropertyValue(n);if(o){let s=o.trim();return wt(s)?parseFloat(s):s}return mt(i)?Tn(i,e,r+1):i}var Fs={type:"spring",stiffness:500,damping:25,restSpeed:10},Ls=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),ks={type:"keyframes",duration:.8},Ps={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Vi=(t,{keyframes:e})=>e.length>2?ks:Ae.has(t)?t.startsWith("scale")?Ls(e[1]):Fs:Ps;var Ns=t=>t!==null;function Mi(t,{repeat:e,repeatType:r="loop"},n){let i=t.filter(Ns),o=e&&r!=="loop"&&e%2===1?0:i.length-1;return!o||n===void 0?i[o]:n}function Mr(t,e){var r,n;return(n=(r=t==null?void 0:t[e])!=null?r:t==null?void 0:t.default)!=null?n:t}function _i(c){var g=c,{when:t,delay:e,delayChildren:r,staggerChildren:n,staggerDirection:i,repeat:o,repeatType:s,repeatDelay:a,from:l,elapsed:m}=g,f=X(g,["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);return!!Object.keys(f).length}var _r=(t,e,r,n={},i,o)=>s=>{let a=Mr(n,t)||{},l=a.delay||n.delay||0,{elapsed:m=0}=n;m=m-oe(l);let f=O(b({keyframes:Array.isArray(r)?r:[null,r],ease:"easeOut",velocity:e.getVelocity()},a),{delay:-m,onUpdate:g=>{e.set(g),a.onUpdate&&a.onUpdate(g)},onComplete:()=>{s(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:o?void 0:i});_i(a)||Object.assign(f,Vi(t,f)),f.duration&&(f.duration=oe(f.duration)),f.repeatDelay&&(f.repeatDelay=oe(f.repeatDelay)),f.from!==void 0&&(f.keyframes[0]=f.from);let c=!1;if((f.type===!1||f.duration===0&&!f.repeatDelay)&&(Yt(f),f.delay===0&&(c=!0)),(ue.instantAnimations||ue.skipAnimations)&&(c=!0,Yt(f),f.delay=0),f.allowFlatten=!a.type&&!a.ease,c&&!o&&e.get()!==void 0){let g=Mi(f.keyframes,a);if(g!==void 0){ce.update(()=>{f.onUpdate(g),f.onComplete()});return}}return a.isSync?new We(f):new wr(f)};function Ii(t){let e=[{},{}];return t==null||t.values.forEach((r,n)=>{e[0][n]=r.get(),e[1][n]=r.getVelocity()}),e}function Ir(t,e,r,n){if(typeof e=="function"){let[i,o]=Ii(n);e=e(r!==void 0?r:t.custom,i,o)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){let[i,o]=Ii(n);e=e(r!==void 0?r:t.custom,i,o)}return e}function Ci(t,e,r){let n=t.getProps();return Ir(n,e,r!==void 0?r:n.custom,t)}var Cr=new Set(["width","height","top","left","right","bottom",...Me]);var Ri=30,Ks=t=>!isNaN(parseFloat(t)),Di={current:void 0},vn=class{constructor(e,r={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=n=>{var o;let i=te.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(n),this.current!==this.prev&&((o=this.events.change)==null||o.notify(this.current),this.dependents))for(let s of this.dependents)s.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=r.owner}setCurrent(e){this.current=e,this.updatedAt=te.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Ks(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,r){this.events[e]||(this.events[e]=new Qe);let n=this.events[e].add(r);return e==="change"?()=>{n(),ce.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,r){this.passiveEffect=e,this.stopPassiveEffect=r}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,r,n){this.set(r),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,r=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,r&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var e;(e=this.events.change)==null||e.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return Di.current&&Di.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=te.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Ri)return 0;let r=Math.min(this.updatedAt-this.prevUpdatedAt,Ri);return Mt(parseFloat(this.current)-parseFloat(this.prevFrameValue),r)}start(e){return this.stop(),new Promise(r=>{this.hasAnimated=!0,this.animation=e(r),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var e,r;(e=this.dependents)==null||e.clear(),(r=this.events.destroy)==null||r.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function Be(t,e){return new vn(t,e)}var Bi=t=>Array.isArray(t);function Us(t,e,r){t.hasValue(e)?t.getValue(e).set(r):t.addValue(e,Be(r))}function Gs(t){return Bi(t)?t[t.length-1]||0:t}function Oi(t,e){let s=Ci(t,e)||{},{transitionEnd:n={},transition:i={}}=s,o=X(s,["transitionEnd","transition"]);o=b(b({},o),n);for(let a in o){let l=Gs(o[a]);Us(t,a,l)}}var J=t=>!!(t&&t.getVelocity);function Fi(t){return!!(J(t)&&t.add)}function Li(t,e){let r=t.getValue("willChange");if(Fi(r))return r.add(e);if(!r&&ue.WillChange){let n=new ue.WillChange("auto");t.addValue("willChange",n),n.add(e)}}function xt(t){return t.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}var $s="framerAppearId",ki="data-"+xt($s);function Pi(t){return t.props[ki]}function Ws({protectedKeys:t,needsAnimating:e},r){let n=t.hasOwnProperty(r)&&e[r]!==!0;return e[r]=!1,n}function bn(t,e,{delay:r=0,transitionOverride:n,type:i}={}){var c;let f=e,{transition:o=t.getDefaultTransition(),transitionEnd:s}=f,a=X(f,["transition","transitionEnd"]);n&&(o=n);let l=[],m=i&&t.animationState&&t.animationState.getState()[i];for(let g in a){let d=t.getValue(g,(c=t.latestValues[g])!=null?c:null),R=a[g];if(R===void 0||m&&Ws(m,g))continue;let A=b({delay:r},Mr(o||{},g)),C=d.get();if(C!==void 0&&!d.isAnimating&&!Array.isArray(R)&&R===C&&!A.velocity)continue;let S=!1;if(window.MotionHandoffAnimation){let D=Pi(t);if(D){let F=window.MotionHandoffAnimation(D,g,ce);F!==null&&(A.startTime=F,S=!0)}}Li(t,g),d.start(_r(g,d,R,t.shouldReduceMotion&&Cr.has(g)?{type:!1}:A,t,S));let I=d.animation;I&&l.push(I)}return s&&Promise.all(l).then(()=>{ce.update(()=>{s&&Oi(t,s)})}),l}var Ni={test:t=>t==="auto",parse:t=>t};var Rr=t=>e=>e.test(t);var Sn=[Ee,y,Ue,Ve,$n,Gn,Ni],An=t=>Sn.find(Rr(t));function Ki(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Vt(t):!0}var Ys=new Set(["brightness","contrast","saturate","opacity"]);function qs(t){let[e,r]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;let[n]=r.match(ct)||[];if(!n)return t;let i=r.replace(n,""),o=Ys.has(e)?1:0;return n!==r&&(o*=100),e+"("+o+i+")"}var Hs=/\\b([a-z-]*)\\(.*?\\)/gu,Ht=O(b({},pe),{getAnimatableNone:t=>{let e=t.match(Hs);return e?e.map(qs).join(" "):t}});var En=O(b({},Ee),{transform:Math.round});var Ui={rotate:Ve,rotateX:Ve,rotateY:Ve,rotateZ:Ve,scale:Pt,scaleX:Pt,scaleY:Pt,scaleZ:Pt,skew:Ve,skewX:Ve,skewY:Ve,distance:y,translateX:y,translateY:y,translateZ:y,x:y,y,z:y,perspective:y,transformPerspective:y,opacity:Ce,originX:rn,originY:rn,originZ:y};var yt=O(b({borderWidth:y,borderTopWidth:y,borderRightWidth:y,borderBottomWidth:y,borderLeftWidth:y,borderRadius:y,borderTopLeftRadius:y,borderTopRightRadius:y,borderBottomRightRadius:y,borderBottomLeftRadius:y,width:y,maxWidth:y,height:y,maxHeight:y,top:y,right:y,bottom:y,left:y,inset:y,insetBlock:y,insetBlockStart:y,insetBlockEnd:y,insetInline:y,insetInlineStart:y,insetInlineEnd:y,padding:y,paddingTop:y,paddingRight:y,paddingBottom:y,paddingLeft:y,paddingBlock:y,paddingBlockStart:y,paddingBlockEnd:y,paddingInline:y,paddingInlineStart:y,paddingInlineEnd:y,margin:y,marginTop:y,marginRight:y,marginBottom:y,marginLeft:y,marginBlock:y,marginBlockStart:y,marginBlockEnd:y,marginInline:y,marginInlineStart:y,marginInlineEnd:y,fontSize:y,backgroundPositionX:y,backgroundPositionY:y},Ui),{zIndex:En,fillOpacity:Ce,strokeOpacity:Ce,numOctaves:En});var zs=O(b({},yt),{color:Q,backgroundColor:Q,outlineColor:Q,fill:Q,stroke:Q,borderColor:Q,borderTopColor:Q,borderRightColor:Q,borderBottomColor:Q,borderLeftColor:Q,filter:Ht,WebkitFilter:Ht}),Dr=t=>zs[t];function Br(t,e){let r=Dr(t);return r!==Ht&&(r=pe),r.getAnimatableNone?r.getAnimatableNone(e):void 0}var js=new Set(["auto","none","0"]);function Gi(t,e,r){let n=0,i;for(;n<t.length&&!i;){let o=t[n];typeof o=="string"&&!js.has(o)&&et(o).values.length&&(i=t[n]),n++}if(i&&r)for(let o of e)t[o]=Br(r,i)}var Or=class extends Ye{constructor(e,r,n,i,o){super(e,r,n,i,o,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:r,name:n}=this;if(!r||!r.current)return;super.readKeyframes();for(let f=0;f<e.length;f++){let c=e[f];if(typeof c=="string"&&(c=c.trim(),mt(c))){let g=Tn(c,r.current);g!==void 0&&(e[f]=g),f===e.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!Cr.has(n)||e.length!==2)return;let[i,o]=e,s=An(i),a=An(o),l=en(i),m=en(o);if(l!==m&&De[n]){this.needsMeasurement=!0;return}if(s!==a)if(mn(s)&&mn(a))for(let f=0;f<e.length;f++){let c=e[f];typeof c=="string"&&(e[f]=parseFloat(c))}else De[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:r}=this,n=[];for(let i=0;i<e.length;i++)(e[i]===null||Ki(e[i]))&&n.push(i);n.length&&Gi(e,n,r)}measureInitialState(){let{element:e,unresolvedKeyframes:r,name:n}=this;if(!e||!e.current)return;n==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=De[n](e.measureViewportBox(),window.getComputedStyle(e.current)),r[0]=this.measuredOrigin;let i=r[r.length-1];i!==void 0&&e.getValue(n,i).jump(i,!1)}measureEndState(){var a;let{element:e,name:r,unresolvedKeyframes:n}=this;if(!e||!e.current)return;let i=e.getValue(r);i&&i.jump(this.measuredOrigin,!1);let o=n.length-1,s=n[o];n[o]=De[r](e.measureViewportBox(),window.getComputedStyle(e.current)),s!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=s),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([l,m])=>{e.getValue(l).set(m)}),this.resolveNoneKeyframes()}};function wn(t,e,r){var n;if(t==null)return[];if(t instanceof EventTarget)return[t];if(typeof t=="string"){let i=document;e&&(i=e.current);let o=(n=r==null?void 0:r[t])!=null?n:i.querySelectorAll(t);return o?Array.from(o):[]}return Array.from(t).filter(i=>i!=null)}var Fr=(t,e)=>e&&typeof t=="number"?e.transform(t):t;var{schedule:$i,cancel:yh}=fr(queueMicrotask,!1);function zt(t){return Xr(t)&&"ownerSVGElement"in t}function Vn(t){return zt(t)&&t.tagName==="svg"}function Wi(t,e){if(t==="first")return 0;{let r=e-1;return t==="last"?r:r/2}}function Lr(t=.1,{startDelay:e=0,from:r=0,ease:n}={}){return(i,o)=>{let s=typeof r=="number"?r:Wi(r,o),a=Math.abs(s-i),l=t*a;if(n){let m=o*t;l=at(n)(l/m)*m}return e+l}}var Xs=[...Sn,Q,pe],Yi=t=>Xs.find(Rr(t));var qi=()=>({min:0,max:0}),Tt=()=>({x:qi(),y:qi()});var jt={current:null},kr={current:!1};var Zs=typeof window!="undefined";function Hi(){if(kr.current=!0,!!Zs)if(window.matchMedia){let t=window.matchMedia("(prefers-reduced-motion)"),e=()=>jt.current=t.matches;t.addEventListener("change",e),e()}else jt.current=!1}var Oe=new WeakMap;function zi(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function ji(t){return typeof t=="string"||Array.isArray(t)}var Js=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Xi=["initial",...Js];function Mn(t){return zi(t.animate)||Xi.some(e=>ji(t[e]))}function Zi(t){return!!(Mn(t)||t.variants)}function Ji(t,e,r){for(let n in e){let i=e[n],o=r[n];if(J(i))t.addValue(n,i);else if(J(o))t.addValue(n,Be(i,{owner:t}));else if(o!==i)if(t.hasValue(n)){let s=t.getValue(n);s.liveStyle===!0?s.jump(i):s.hasAnimated||s.set(i)}else{let s=t.getStaticValue(n);t.addValue(n,Be(s!==void 0?s:i,{owner:t}))}}for(let n in r)e[n]===void 0&&t.removeValue(n);return e}var Qi=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],eo={};var vt=class{scrapeMotionValuesFromProps(e,r,n){return{}}constructor({parent:e,props:r,presenceContext:n,reducedMotionConfig:i,blockInitialAnimation:o,visualState:s},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Ye,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let d=te.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,ce.render(this.render,!1,!0))};let{latestValues:l,renderState:m}=s;this.latestValues=l,this.baseTarget=b({},l),this.initialValues=r.initial?b({},l):{},this.renderState=m,this.parent=e,this.props=r,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!o,this.isControllingVariants=Mn(r),this.isVariantNode=Zi(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let g=this.scrapeMotionValuesFromProps(r,{},this),{willChange:f}=g,c=X(g,["willChange"]);for(let d in c){let R=c[d];l[d]!==void 0&&J(R)&&R.set(l[d])}}mount(e){var r;this.current=e,Oe.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,i)=>this.bindToMotionValue(i,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(kr.current||Hi(),this.shouldReduceMotion=jt.current),(r=this.parent)==null||r.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var e;this.projection&&this.projection.unmount(),kt(this.notifyUpdate),kt(this.render),this.valueSubscriptions.forEach(r=>r()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(e=this.parent)==null||e.removeChild(this);for(let r in this.events)this.events[r].clear();for(let r in this.features){let n=this.features[r];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(e){var r;this.children.add(e),(r=this.enteringChildren)!=null||(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,r){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();let n=Ae.has(e);n&&this.onBindTransform&&this.onBindTransform();let i=r.on("change",s=>{this.latestValues[e]=s,this.props.onUpdate&&ce.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),o;typeof window!="undefined"&&window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,e,r)),this.valueSubscriptions.set(e,()=>{i(),o&&o(),r.owner&&r.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in eo){let r=eo[e];if(!r)continue;let{isEnabled:n,Feature:i}=r;if(!this.features[e]&&i&&n(this.props)&&(this.features[e]=new i(this)),this.features[e]){let o=this.features[e];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Tt()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,r){this.latestValues[e]=r}update(e,r){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=r;for(let n=0;n<Qi.length;n++){let i=Qi[n];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);let o="on"+i,s=e[o];s&&(this.propEventSubscriptions[i]=this.on(i,s))}this.prevMotionValues=Ji(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){let r=this.getClosestVariantNode();if(r)return r.variantChildren&&r.variantChildren.add(e),()=>r.variantChildren.delete(e)}addValue(e,r){let n=this.values.get(e);r!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,r),this.values.set(e,r),this.latestValues[e]=r.get())}removeValue(e){this.values.delete(e);let r=this.valueSubscriptions.get(e);r&&(r(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,r){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&r!==void 0&&(n=Be(r===null?void 0:r,{owner:this}),this.addValue(e,n)),n}readValue(e,r){var i;let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:(i=this.getBaseTargetFromProps(this.props,e))!=null?i:this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n=="string"&&(wt(n)||Vt(n))?n=parseFloat(n):!Yi(n)&&pe.test(r)&&(n=Br(e,r)),this.setBaseTarget(e,J(n)?n.get():n)),J(n)?n.get():n}setBaseTarget(e,r){this.baseTarget[e]=r}getBaseTarget(e){var o;let{initial:r}=this.props,n;if(typeof r=="string"||typeof r=="object"){let s=Ir(this.props,r,(o=this.presenceContext)==null?void 0:o.custom);s&&(n=s[e])}if(r&&n!==void 0)return n;let i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!J(i)?i:this.initialValues[e]!==void 0&&n===void 0?void 0:this.baseTarget[e]}on(e,r){return this.events[e]||(this.events[e]=new Qe),this.events[e].add(r)}notify(e,...r){this.events[e]&&this.events[e].notify(...r)}scheduleRenderMicrotask(){$i.render(this.render)}};var bt=class extends vt{constructor(){super(...arguments),this.KeyframeResolver=Or}sortInstanceNodePosition(e,r){return e.compareDocumentPosition(r)&2?1:-1}getBaseTargetFromProps(e,r){let n=e.style;return n?n[r]:void 0}removeValueFromRenderState(e,{vars:r,style:n}){delete r[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;J(e)&&(this.childSubscription=e.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}};function to({top:t,left:e,right:r,bottom:n}){return{x:{min:e,max:r},y:{min:t,max:n}}}function ro(t,e){if(!e)return t;let r=e({x:t.left,y:t.top}),n=e({x:t.right,y:t.bottom});return{top:r.y,left:r.x,bottom:n.y,right:n.x}}function no(t,e){return to(ro(t.getBoundingClientRect(),e))}var Qs={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},ea=Me.length;function io(t,e,r){let n="",i=!0;for(let o=0;o<ea;o++){let s=Me[o],a=t[s];if(a===void 0)continue;let l=!0;if(typeof a=="number")l=a===(s.startsWith("scale")?1:0);else{let m=parseFloat(a);l=s.startsWith("scale")?m===1:m===0}if(!l||r){let m=Fr(a,yt[s]);if(!l){i=!1;let f=Qs[s]||s;n+=`${f}(${m}) `}r&&(e[s]=m)}}return n=n.trim(),r?n=r(e,i?"":n):i&&(n="none"),n}function Pr(t,e,r){let{style:n,vars:i,transformOrigin:o}=t,s=!1,a=!1;for(let l in e){let m=e[l];if(Ae.has(l)){s=!0;continue}else if(mr(l)){i[l]=m;continue}else{let f=Fr(m,yt[l]);l.startsWith("origin")?(a=!0,o[l]=f):n[l]=f}}if(e.transform||(s||r?n.transform=io(e,t.transform,r):n.transform&&(n.transform="none")),a){let{originX:l="50%",originY:m="50%",originZ:f=0}=o;n.transformOrigin=`${l} ${m} ${f}`}}function Nr(t,{style:e,vars:r},n,i){let o=t.style,s;for(s in e)o[s]=e[s];i==null||i.applyProjectionStyles(o,n);for(s in r)o.setProperty(s,r[s])}function oo(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}var St={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(y.test(t))t=parseFloat(t);else return t;let r=oo(t,e.target.x),n=oo(t,e.target.y);return`${r}% ${n}%`}};var so={correct:(t,{treeScale:e,projectionDelta:r})=>{let n=t,i=pe.parse(t);if(i.length>5)return n;let o=pe.createTransformer(t),s=typeof i[0]!="number"?1:0,a=r.x.scale*e.x,l=r.y.scale*e.y;i[0+s]/=a,i[1+s]/=l;let m=ve(a,l,.5);return typeof i[2+s]=="number"&&(i[2+s]/=m),typeof i[3+s]=="number"&&(i[3+s]/=m),o(i)}};var ao={borderRadius:O(b({},St),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:St,borderTopRightRadius:St,borderBottomLeftRadius:St,borderBottomRightRadius:St,boxShadow:so};function lo(t,{layout:e,layoutId:r}){return Ae.has(t)||t.startsWith("origin")||(e||r!==void 0)&&(!!ao[t]||t==="opacity")}function Kr(t,e,r){var s;let n=t.style,i=e==null?void 0:e.style,o={};if(!n)return o;for(let a in n)(J(n[a])||i&&J(i[a])||lo(a,t)||((s=r==null?void 0:r.getValue(a))==null?void 0:s.liveStyle)!==void 0)&&(o[a]=n[a]);return o}function ta(t){return window.getComputedStyle(t)}var Xt=class extends bt{constructor(){super(...arguments),this.type="html",this.renderInstance=Nr}readValueFromInstance(e,r){var n;if(Ae.has(r))return(n=this.projection)!=null&&n.isProjecting?vr(r):fi(e,r);{let i=ta(e),o=(mr(r)?i.getPropertyValue(r):i[r])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(e,{transformPagePoint:r}){return no(e,r)}build(e,r,n){Pr(e,r,n.transformTemplate)}scrapeMotionValuesFromProps(e,r,n){return Kr(e,r,n)}};function ra(t,e){return t in e}var Zt=class extends vt{constructor(){super(...arguments),this.type="object"}readValueFromInstance(e,r){if(ra(r,e)){let n=e[r];if(typeof n=="string"||typeof n=="number")return n}}getBaseTargetFromProps(){}removeValueFromRenderState(e,r){delete r.output[e]}measureInstanceViewportBox(){return Tt()}build(e,r){Object.assign(e.output,r)}renderInstance(e,{output:r}){Object.assign(e,r)}sortInstanceNodePosition(){return 0}};var na={offset:"stroke-dashoffset",array:"stroke-dasharray"},ia={offset:"strokeDashoffset",array:"strokeDasharray"};function fo(t,e,r=1,n=0,i=!0){t.pathLength=1;let o=i?na:ia;t[o.offset]=`${-n}`,t[o.array]=`${e} ${r}`}var oa=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function uo(t,c,l,m,f){var g=c,{attrX:e,attrY:r,attrScale:n,pathLength:i,pathSpacing:o=1,pathOffset:s=0}=g,a=X(g,["attrX","attrY","attrScale","pathLength","pathSpacing","pathOffset"]);var A,C;if(Pr(t,a,m),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};let{attrs:d,style:R}=t;d.transform&&(R.transform=d.transform,delete d.transform),(R.transform||d.transformOrigin)&&(R.transformOrigin=(A=d.transformOrigin)!=null?A:"50% 50%",delete d.transformOrigin),R.transform&&(R.transformBox=(C=f==null?void 0:f.transformBox)!=null?C:"fill-box",delete d.transformBox);for(let S of oa)d[S]!==void 0&&(R[S]=d[S],delete d[S]);e!==void 0&&(d.x=e),r!==void 0&&(d.y=r),n!==void 0&&(d.scale=n),i!==void 0&&fo(d,i,o,s,!1)}var Ur=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);var mo=t=>typeof t=="string"&&t.toLowerCase()==="svg";function co(t,e,r,n){Nr(t,e,void 0,n);for(let i in e.attrs)t.setAttribute(Ur.has(i)?i:xt(i),e.attrs[i])}function po(t,e,r){let n=Kr(t,e,r);for(let i in t)if(J(t[i])||J(e[i])){let o=Me.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;n[o]=t[i]}return n}var Jt=class extends bt{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Tt}getBaseTargetFromProps(e,r){return e[r]}readValueFromInstance(e,r){if(Ae.has(r)){let n=Dr(r);return n&&n.default||0}return r=Ur.has(r)?r:xt(r),e.getAttribute(r)}scrapeMotionValuesFromProps(e,r,n){return po(e,r,n)}build(e,r,n){uo(e,r,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,r,n,i){co(e,r,n,i)}mount(e){this.isSVGTag=mo(e.tagName),super.mount(e)}};function _n(t,e,r){let n=J(t)?t:Be(t);return n.start(_r("",n,e,r)),n.animation}function Qt(t){return typeof t=="object"&&!Array.isArray(t)}function Gr(t,e,r,n){return t==null?[]:typeof t=="string"&&Qt(e)?wn(t,r,n):t instanceof NodeList?Array.from(t):Array.isArray(t)?t.filter(i=>i!=null):[t]}function ho(t,e,r){return t*(e+1)}function In(t,e,r,n){var i;return typeof e=="number"?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):e==="<"?r:e.startsWith("<")?Math.max(0,r+parseFloat(e.slice(1))):(i=n.get(e))!=null?i:t}function sa(t,e,r){for(let n=0;n<t.length;n++){let i=t[n];i.at>e&&i.at<r&&(je(t,i),n--)}}function go(t,e,r,n,i,o){sa(t,i,o);for(let s=0;s<e.length;s++)t.push({value:e[s],at:ve(i,o,n[s]),easing:Ot(r,s)})}function xo(t,e){for(let r=0;r<t.length;r++)t[r]=t[r]/(e+1)}function yo(t,e){return t.at===e.at?t.value===null?1:e.value===null?-1:0:t.at-e.at}var aa="easeInOut",la=20;function bo(t,o={},n,i){var s=o,{defaultTransition:e={}}=s,r=X(s,["defaultTransition"]);let a=e.duration||.3,l=new Map,m=new Map,f={},c=new Map,g=0,d=0,R=0;for(let A=0;A<t.length;A++){let C=t[A];if(typeof C=="string"){c.set(C,d);continue}else if(!Array.isArray(C)){c.set(C.name,In(d,C.at,g,c));continue}let[S,I,D={}]=C;D.at!==void 0&&(d=In(d,D.at,g,c));let F=0,M=(B,K,v,P=0,N=0)=>{let k=fa(B),V=K,{delay:be=0,times:re=Wt(k),type:Le=e.type||"keyframes",repeat:xe,repeatType:rr,repeatDelay:de=0}=V,Et=X(V,["delay","times","type","repeat","repeatType","repeatDelay"]),{ease:H=e.ease||"easeOut",duration:ne}=K,nr=typeof be=="function"?be(P,N):be,He=k.length,p=ot(Le)?Le:i==null?void 0:i[Le||"keyframes"];if(He<=2&&p){let T=100;if(He===2&&ca(k)){let E=k[1]-k[0];T=Math.abs(E)}let x=b(b({},e),Et);ne!==void 0&&(x.duration=oe(ne));let _=Ut(x,T,p);H=_.ease,ne=_.duration}ne!=null||(ne=a);let u=d+nr;re.length===1&&re[0]===0&&(re[1]=1);let h=re.length-k.length;if(h>0&&$t(re,h),k.length===1&&k.unshift(null),xe){ge(xe<la,"Repeat count too high, must be less than 20","repeat-count-high"),ne=ho(ne,xe);let T=[...k],x=[...re];H=Array.isArray(H)?[...H]:[H];let _=[...H];for(let E=0;E<xe;E++){k.push(...T);for(let L=0;L<T.length;L++)re.push(x[L]+(E+1)),H.push(L===0?"linear":Ot(_,L-1))}xo(re,xe)}let w=u+ne;go(v,k,H,re,u,w),F=Math.max(nr+ne,F),R=Math.max(w,R)};if(J(S)){let B=To(S,m);M(I,D,vo("default",B))}else{let B=Gr(S,I,n,f),K=B.length;for(let v=0;v<K;v++){I=I,D=D;let P=B[v],N=To(P,m);for(let k in I)M(I[k],ua(D,k),vo(k,N),v,K)}}g=d,d+=F}return m.forEach((A,C)=>{for(let I in A){let D=A[I];D.sort(yo);let F=[],M=[],B=[];for(let N=0;N<D.length;N++){let{at:k,value:be,easing:re}=D[N];F.push(be),M.push(Je(0,R,k)),B.push(re||"easeOut")}M[0]!==0&&(M.unshift(0),F.unshift(F[0]),B.unshift(aa)),M[M.length-1]!==1&&(M.push(1),F.push(null)),l.has(C)||l.set(C,{keyframes:{},transition:{}});let K=l.get(C);K.keyframes[I]=F;let S=e,{type:v}=S,P=X(S,["type"]);K.transition[I]=b(O(b({},P),{duration:R,ease:B,times:M}),r)}}),l}function To(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function vo(t,e){return e[t]||(e[t]=[]),e[t]}function fa(t){return Array.isArray(t)?t:[t]}function ua(t,e){return t&&t[e]?b(b({},t),t[e]):b({},t)}var ma=t=>typeof t=="number",ca=t=>t.every(ma);function So(t){let e={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},r=zt(t)&&!Vn(t)?new Jt(e):new Xt(e);r.mount(t),Oe.set(t,r)}function Ao(t){let e={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},r=new Zt(e);r.mount(t),Oe.set(t,r)}function pa(t,e){return J(t)||typeof t=="number"||typeof t=="string"&&!Qt(e)}function $r(t,e,r,n){let i=[];if(pa(t,e))i.push(_n(t,Qt(e)&&e.default||e,r&&(r.default||r)));else{if(t==null)return i;let o=Gr(t,e,n),s=o.length;ge(!!s,"No valid elements provided.","no-valid-elements");for(let a=0;a<s;a++){let l=o[a],m=l instanceof Element?So:Ao;Oe.has(l)||m(l);let f=Oe.get(l),c=b({},r);"delay"in c&&typeof c.delay=="function"&&(c.delay=c.delay(a,s)),i.push(...bn(f,O(b({},e),{transition:c}),{}))}}return i}function Eo(t,e,r){let n=[];return bo(t,e,r,{spring:Re}).forEach(({keyframes:o,transition:s},a)=>{n.push(...$r(a,o,s))}),n}function da(t){return Array.isArray(t)&&t.some(Array.isArray)}function wo(t){function e(r,n,i){let o=[],s;if(da(r))o=Eo(r,n,t);else{let l=i||{},{onComplete:m}=l,f=X(l,["onComplete"]);typeof m=="function"&&(s=m),o=$r(r,n,f,t)}let a=new qt(o);return s&&a.finished.then(s),t&&(t.animations.push(a),a.finished.then(()=>{je(t.animations,a)})),a}return e}var Cn=wo();var ha=Object.defineProperty;var ga=(t,e)=>{for(var r in e)ha(t,r,{get:e[r],enumerable:!0})};var qe=({initialStyles:t,keyframes:e})=>{let r=Cn,n=o=>Object.fromEntries(Object.entries(o).map(([s,a])=>[s,Array.isArray(a)?[...a].reverse():a])),i=(o,s={})=>{let{target:a,insertAfter:l,display:m=""}=s;Array.isArray(o)||(o=[o]);for(let f of o)f.style.display=m,Object.assign(f.style,t),a&&l!==void 0?l?a.insertBefore(f,l.nextSibling):a.prepend(f):a&&a.appendChild(f)};return{prepareIn:i,animateIn:async(o,s={})=>{let A=s,{prepared:a,stagger:l,display:m,duration:f}=A,c=X(A,["prepared","stagger","display","duration"]),g=f?f/1e3:void 0;a||i(o,s);let d=Array.isArray(o)?o:[o],{finished:R}=r(d,e,O(b({},c),{delay:l?Lr(l/1e3):void 0,duration:g}));return await R},animateOut:async(o,s={})=>{let S=s,{remove:a,stagger:l,target:m,insertAfter:f,display:c="none",duration:g}=S,d=X(S,["remove","stagger","target","insertAfter","display","duration"]),R=g?g/1e3:void 0,A=(Array.isArray(o)?o:[o]).filter(I=>document.body.contains(I));if(!A.length)return;let{finished:C}=r(A,n(e),O(b({},d),{duration:R,delay:l?Lr(l/1e3):void 0}));await C;for(let I of A)m&&f!==void 0?f?m.insertBefore(I,f.nextSibling):m.prepend(I):m&&m.appendChild(I),a?I.remove():I.style.display=c}}};var Wy={fade:qe({keyframes:{opacity:[0,1]},initialStyles:{opacity:"0"}}),"slide-up":qe({keyframes:{y:[100,0],opacity:[0,1]},initialStyles:{transform:"translateY(100px)",opacity:"0"}}),"slide-down":qe({keyframes:{y:[-100,0],opacity:[0,1]},initialStyles:{transform:"translateY(-100px)",opacity:"0"}}),"slide-right":qe({keyframes:{x:[-100,0],opacity:[0,1]},initialStyles:{transform:"translateX(-100px)",opacity:"0"}}),"slide-left":qe({keyframes:{x:[100,0],opacity:[0,1]},initialStyles:{transform:"translateX(100px)",opacity:"0"}}),grow:qe({keyframes:{scale:[0,1],opacity:[0,1]},initialStyles:{transform:"scale(0)",opacity:"0"}}),shrink:qe({keyframes:{scale:[1.25,1],opacity:[0,1]},initialStyles:{transform:"scale(1.25)",opacity:"0"}}),spin:qe({keyframes:{rotate:[900,0],opacity:[0,1]},initialStyles:{transform:"rotate(900deg)",opacity:"0"}})};var er=t=>typeof t=="string",xa=t=>typeof t=="number";var Rn=t=>t===void 0,Fe=t=>t instanceof Date;var At=t=>{if(Fe(t))return t;if(t==="")return;let e=new Date(t);if(!isNaN(e.getTime()))return e};var ya={};ga(ya,{ACCORDION_ATTRIBUTE:()=>Ta,AUTO_VIDEO_ATTRIBUTE:()=>va,CODE_HIGHLIGHT_ATTRIBUTE:()=>ba,COMBO_BOX_ATTRIBUTE:()=>Sa,COPY_CLIP_ATTRIBUTE:()=>Ea,DISPLAY_VALUES_ATTRIBUTE:()=>wa,DOCS_ATTRIBUTE:()=>Va,FAV_CUSTOM_ATTRIBUTE:()=>Ma,FORM_SUBMIT_ATTRIBUTE:()=>_a,INJECT_ATTRIBUTE:()=>Aa,INPUT_ACTIVE_ATTRIBUTE:()=>Ia,INPUT_COUNTER_ATTRIBUTE:()=>Ca,LIST_ATTRIBUTE:()=>Fa,MIRROR_CLICK_ATTRIBUTE:()=>Ra,MIRROR_INPUT_ATTRIBUTE:()=>Da,MODAL_ATTRIBUTE:()=>Ba,NUMBER_COUNT_ATTRIBUTE:()=>Oa,QUERY_PARAM_ATTRIBUTE:()=>La,RANGE_SLIDER_ATTRIBUTE:()=>ka,READ_TIME_ATTRIBUTE:()=>Ya,REMOVE_QUERY_ATTRIBUTE:()=>qa,SCROLL_DISABLE_ATTRIBUTE:()=>Pa,SELECT_CUSTOM_ATTRIBUTE:()=>Na,SLIDER_DOTS_ATTRIBUTE:()=>Ka,SMART_LIGHTBOX_ATTRIBUTE:()=>Ua,SOCIAL_SHARE_ATTRIBUTE:()=>Ga,STAR_RATING_ATTRIBUTE:()=>$a,TOC_ATTRIBUTE:()=>Wa,VIDEO_HLS_ATTRIBUTE:()=>Ha});var Ta="accordion",va="autovideo",ba="codehighlight",Sa="combobox",Aa="inject",Ea="copyclip",wa="displayvalues",Va="docs",Ma="favcustom",_a="formsubmit",Ia="inputactive",Ca="inputcounter",Ra="mirrorclick",Da="mirrorinput",Ba="modal",Oa="numbercount",Fa="list",La="queryparam",ka="rangeslider",Pa="scrolldisable",Na="selectcustom",Ka="sliderdots",Ua="smartlightbox",Ga="socialshare",$a="starrating",Wa="toc",Ya="readtime",qa="removequery",Ha="videohls";var Wr=t=>{if(xa(t))return t;if(Fe(t))return t.getTime();if(t)return parseFloat(t.replace(/[^0-9.-]+/g,""))};var Vo=(t,e=!0)=>t?t.split(",").reduce((r,n)=>{let i=n.trim();return(!e||i)&&r.push(i),r},[]):[];var za,ja;za=new WeakMap,ja=new WeakMap;var Io=Uo(_o(),1),tr=(t,e,r)=>{if(r==="date"||e==="date"||e==="time"||e==="datetime-local"||e==="month"||e==="week"){let n=At(t);return n===void 0||isNaN(n.getTime())?null:n}if(r==="number"||e==="number"||e==="range"){let n=Wr(t);return n===void 0||isNaN(n)?null:n}return t},Co=(t,e,r)=>{var o;typeof t!=typeof e&&(Fe(t)?e=At(e)||e:Fe(e)&&(t=At(t)||t));let n=Fe(t)?t.getTime():er(t)?t.toLowerCase():t,i=Fe(e)?e.getTime():er(e)?e.toLowerCase():e;if(r){let s=r/100,a=(o=Io.single(i.toString(),n.toString()))==null?void 0:o.score;return!!a&&a>=s}return n===i},Ro=(t,e,r)=>{var o,s;let n,i;return Fe(t)||Fe(e)?(n=(o=At(t))==null?void 0:o.getTime(),i=(s=At(e))==null?void 0:s.getTime()):er(t)||er(e)?(n=Wr(t),i=Wr(e)):(n=t,i=e),Rn(n)||Rn(i)?!1:r==="greater"?n>i:r==="greater-equal"?n>=i:r==="less"?n<i:r==="less-equal"?n<=i:!1};self.onmessage=t=>{let{filters:e,items:r}=t.data,n=e.groups.reduce((o,s)=>{let a=s.conditions.reduce((l,m)=>{let{op:f,value:c,fieldKey:g}=m;return!g||!f||f!=="empty"&&f!=="not-empty"&&(c===""||Array.isArray(c)&&!c.length)||l.push(m),l},[]);return a.length&&o.push(O(b({},s),{validConditions:a})),o},[]),i=r.filter(o=>{let s=a=>{let l=m=>{let f=g=>{let{op:d,filterMatch:R,fieldMatch:A}=m,C=o.fields[g];if(!C)return!1;let S=C.value,I=m.value;if(d==="empty")return Array.isArray(S)?!S.length:!S;if(d==="not-empty")return Array.isArray(S)?!!S.length:!!S;let D=d==null?void 0:d.startsWith("not-"),F=(v,P,N)=>{var be;let k=!1;return d==="equal"||d==="not-equal"?k=Co(v,N,m.fuzzyThreshold):d==="start"||d==="not-start"?k=v.toString().toLowerCase().startsWith(P.toLowerCase()):d==="end"||d==="not-end"?k=v.toString().toLowerCase().endsWith(P.toLowerCase()):d==="contain"||d==="not-contain"?k=v.toString().toLowerCase().includes(P.toLowerCase()):(d==="greater"||d==="greater-equal"||d==="less"||d==="less-equal")&&(k=Ro(v,N,d)),k&&(d==="equal"||d==="contain")&&((be=o.matchedFields)[g]||(be[g]=[]),o.matchedFields[g].push({fieldValue:v,filterValue:P})),D?!k:k},M=Array.isArray(I),B=Array.isArray(S);if(S===""||B&&!S.length)return D;if(M&&B){let v=P=>{let N=tr(P,m.type,C.type);return N===null?!1:A==="and"?S.every(k=>F(k,P,N)):S.some(k=>F(k,P,N))};return R==="and"?I.every(v):I.some(v)}if(M&&!B){let v=P=>{let N=tr(P,m.type,C.type);return N===null?!1:F(S,P,N)};return R==="and"?I.every(v):I.some(v)}if(!M&&B){let v=tr(I,m.type,C.type);return v===null?!1:A==="and"?S.every(P=>F(P,I,v)):S.some(P=>F(P,I,v))}if(!M&&!B){let v=tr(I,m.type,C.type);return v===null?!1:F(S,I,v)}return!1},c=m.fieldKey==="*"?Object.keys(o.fields):Vo(m.fieldKey);return m.fieldMatch==="and"?c.every(f):c.some(f)};return a.conditionsMatch==="or"?a.validConditions.some(l):a.validConditions.every(l)};return e.groupsMatch==="or"?n.some(s):n.every(s)});self.postMessage(i)};\n');
|
|
3127
|
+
}
|
|
3128
|
+
var Ur = navigator.hardwareConcurrency || 4;
|
|
3129
|
+
var qr = Array.from({ length: Ur }, () => new nt());
|
|
3130
|
+
var $t2 = qr.slice();
|
|
3131
|
+
var Kt = [];
|
|
3132
|
+
var Ut = (e, t) => {
|
|
3133
|
+
let n = new AbortController(), { signal: i } = n, a = () => {
|
|
3134
|
+
n.abort();
|
|
3135
|
+
let o = Kt.shift();
|
|
3136
|
+
o ? Ut(e, o) : $t2.push(e);
|
|
3137
|
+
};
|
|
3138
|
+
kn(e, "message", ((o) => {
|
|
3139
|
+
t.resolve(o.data), a();
|
|
3140
|
+
}), { signal: i, once: true }), kn(e, "error", ((o) => {
|
|
3141
|
+
t.reject(o), a();
|
|
3142
|
+
}), { signal: i, once: true }), e.postMessage(t.data);
|
|
3143
|
+
};
|
|
3144
|
+
var Wr = (e) => {
|
|
3145
|
+
let t = $t2.pop();
|
|
3146
|
+
t ? Ut(t, e) : Kt.push(e);
|
|
3147
|
+
};
|
|
3148
|
+
var Gr = (e) => new Promise((t, n) => {
|
|
3149
|
+
Wr({ data: e, resolve: t, reject: n });
|
|
3150
|
+
});
|
|
3151
|
+
var Re = async (e, t, n) => {
|
|
3152
|
+
let i = /* @__PURE__ */ new Map(), a = t.map((s) => {
|
|
3153
|
+
i.set(s.id, s);
|
|
3154
|
+
let { id: l, fields: u } = s;
|
|
3155
|
+
return { id: l, fields: u, matchedFields: {} };
|
|
3156
|
+
}), r = (await Gr({ items: a, filters: toRaw(e) })).map(({ id: s, matchedFields: l }) => {
|
|
3157
|
+
let u = i.get(s);
|
|
3158
|
+
return i.delete(s), n && u.highlight(l), u;
|
|
3159
|
+
});
|
|
3160
|
+
return n && i.forEach((s) => s.highlight({})), r;
|
|
3161
|
+
};
|
|
3162
|
+
var rt = (e, t, n = false) => {
|
|
3163
|
+
let i = e.type, a = De(e), o = `${t}_${a}`, r = y(e, "tagfield"), s = y(e, "tagvalues", { filterInvalid: true }) ?? D.tagvalues.defaultValue, l = y(e, "filtermatch", { filterInvalid: true }), u = y(e, "fieldmatch", { filterInvalid: true }), d = y(e, "fuzzy"), p = !G(e, "showtag", "false"), c = we(e), m = $o(e, ne);
|
|
3164
|
+
return Qt(m) && c && (m = Ae(m, c)), { id: o, fieldKey: t, type: i, op: a, value: m, filterMatch: l, fieldMatch: u, fuzzyThreshold: d, interacted: n, tagFieldDisplay: r, tagValuesDisplay: s, showTag: p };
|
|
3165
|
+
};
|
|
3166
|
+
var Wt2 = (e, t, n) => {
|
|
3167
|
+
e.settingFilters = true;
|
|
3168
|
+
for (let { fieldKey: i, value: a, op: o, type: r } of n) {
|
|
3169
|
+
let s = `:is(input[type="${r}"], select, textarea)`, l = B("field", i), u = `:is(${B("operator", o)}, :not(${B("operator")}))`, d = [s, l, u].join(""), p = t.querySelector(d);
|
|
3170
|
+
on(p) && Vo(p, a, ne);
|
|
3171
|
+
}
|
|
3172
|
+
e.settingFilters = false;
|
|
3173
|
+
};
|
|
3174
|
+
var De = (e) => {
|
|
3175
|
+
let t = e.type, i = ["text", "password", "email", "tel", "url", "search", "color"].includes(t) ? "contain" : "equal";
|
|
3176
|
+
return y(e, "operator", { filterInvalid: true }) || i;
|
|
3177
|
+
};
|
|
3178
|
+
var it = (e, t, n, i = false) => {
|
|
3179
|
+
e.readingFilters = true;
|
|
3180
|
+
let a = { id: n.toString(), conditions: [], conditionsMatch: y(t, "conditionsmatch", { filterInvalid: true }) ?? D.conditionsmatch.defaultValue };
|
|
3181
|
+
for (let o of t.elements) {
|
|
3182
|
+
if (!on(o)) continue;
|
|
3183
|
+
let { type: r } = o;
|
|
3184
|
+
if (r === "submit") continue;
|
|
3185
|
+
let s = y(o, "field")?.trim();
|
|
3186
|
+
if (!s) continue;
|
|
3187
|
+
let l = rt(o, s, i);
|
|
3188
|
+
a.conditions.some((u) => u.fieldKey === s && u.op === l.op) || a.conditions.push(l);
|
|
3189
|
+
}
|
|
3190
|
+
return e.readingFilters = false, a;
|
|
3191
|
+
};
|
|
3192
|
+
var Xt2 = (e, t, n) => {
|
|
3193
|
+
let i = /* @__PURE__ */ new Map(), a = (r) => {
|
|
3194
|
+
let s = q(r), l = j(r);
|
|
3195
|
+
if (!s && !l) return;
|
|
3196
|
+
let u = s ? Jr(e, r, n) : ei(e, r, n);
|
|
3197
|
+
if (!u) return;
|
|
3198
|
+
let d = watch(e.items, (c) => u({ items: c })), p = watch(e.filters, (c) => u({ filters: c }), { deep: true, immediate: true });
|
|
3199
|
+
return () => {
|
|
3200
|
+
d(), p();
|
|
3201
|
+
};
|
|
3202
|
+
};
|
|
3203
|
+
for (let r of [...t.elements]) {
|
|
3204
|
+
let s = a(r);
|
|
3205
|
+
i.set(r, s);
|
|
3206
|
+
}
|
|
3207
|
+
let o = new MutationObserver((r) => {
|
|
3208
|
+
for (let { addedNodes: s, removedNodes: l } of r) {
|
|
3209
|
+
for (let u of s) {
|
|
3210
|
+
if (!tn(u)) continue;
|
|
3211
|
+
let d = [u, ...u.querySelectorAll("input, select")];
|
|
3212
|
+
for (let p of d) {
|
|
3213
|
+
if (i.has(p)) continue;
|
|
3214
|
+
let c = a(p);
|
|
3215
|
+
i.set(p, c);
|
|
3216
|
+
}
|
|
3217
|
+
}
|
|
3218
|
+
for (let u of l) {
|
|
3219
|
+
if (!tn(u)) continue;
|
|
3220
|
+
let d = [u, ...u.querySelectorAll("input, select")];
|
|
3221
|
+
for (let p of d) i.get(p)?.(), i.delete(p);
|
|
3222
|
+
}
|
|
3223
|
+
}
|
|
3224
|
+
});
|
|
3225
|
+
return o.observe(t, { childList: true, subtree: true }), () => {
|
|
3226
|
+
o.disconnect();
|
|
3227
|
+
for (let [, r] of i) r?.();
|
|
3228
|
+
};
|
|
3229
|
+
};
|
|
3230
|
+
var Jr = (e, t, n) => {
|
|
3231
|
+
let i = y(t, "field")?.trim();
|
|
3232
|
+
if (!i) return;
|
|
3233
|
+
let a = t.parentElement ?? void 0, o = v("facet-count", { scope: a });
|
|
3234
|
+
j(o) && (o = null);
|
|
3235
|
+
let r = t.closest(B("emptyfacet", "hide")), s = t.closest(B("emptyfacet", "add-class"));
|
|
3236
|
+
if (!o && !r && !s) return;
|
|
3237
|
+
let l = t.type, u = De(t), d = y(s, "emptyfacetclass"), c = l === "checkbox" && !be(t.name, t.form, ne)?.length ? y(t, "value") || "true" : y(t, "value") || t.value, m;
|
|
3238
|
+
return (0, import_just_debounce.default)(async ({ filters: L = e.filters.value, items: h = e.items.value }) => {
|
|
3239
|
+
await m, m = Qt2({ filters: L, items: h, fieldKey: i, op: u, groupIndex: n, value: c });
|
|
3240
|
+
let E = await m;
|
|
3241
|
+
if (!E) return;
|
|
3242
|
+
let S = E.length > 0;
|
|
3243
|
+
o && (o.textContent = `${E.length}`), r && (r.style.display = S ? "" : "none"), s && s.classList.toggle(d, !S);
|
|
3244
|
+
}, 0);
|
|
3245
|
+
};
|
|
3246
|
+
var ei = (e, t, n) => {
|
|
3247
|
+
let i = y(t, "field")?.trim();
|
|
3248
|
+
if (!i) return;
|
|
3249
|
+
let a = De(t), o = y(t, "emptyfacet", { filterInvalid: true }) === "hide", r = t.matches(I("facet-count")) || t.matches(B("facetcount"));
|
|
3250
|
+
if (!o && !r) return;
|
|
3251
|
+
let s = /* @__PURE__ */ new Map(), l;
|
|
3252
|
+
return (0, import_just_debounce.default)(async ({ filters: d = e.filters.value, items: p = e.items.value }) => {
|
|
3253
|
+
await l, l = Promise.all([...t.options].map(async (c) => {
|
|
3254
|
+
let { value: m } = c;
|
|
3255
|
+
if (!m) return;
|
|
3256
|
+
s.has(c) || s.set(c, c.text);
|
|
3257
|
+
let f = await Qt2({ filters: d, items: p, fieldKey: i, op: a, groupIndex: n, value: m });
|
|
3258
|
+
if (!f) return;
|
|
3259
|
+
let L = !f.length;
|
|
3260
|
+
if (r) {
|
|
3261
|
+
let h = s.get(c) || "";
|
|
3262
|
+
c.text = `${h} (${f.length})`;
|
|
3263
|
+
}
|
|
3264
|
+
o && !c.selected && (c.hidden = L, c.disabled = L);
|
|
3265
|
+
}));
|
|
3266
|
+
}, 0);
|
|
3267
|
+
};
|
|
3268
|
+
var Qt2 = ({ filters: e, items: t, fieldKey: n, op: i, groupIndex: a, value: o }) => {
|
|
3269
|
+
let r = structuredClone(toRaw(e)), s = r.groups[a];
|
|
3270
|
+
if (!s) return;
|
|
3271
|
+
let { conditions: l = [] } = s, u = l.findIndex((p) => p.fieldKey === n && p.op === i), d = l[u];
|
|
3272
|
+
if (d) return Array.isArray(d.value) ? d.filterMatch === "and" ? d.value.push(o) : d.value = [o] : d.value = o, Re(r, t);
|
|
3273
|
+
};
|
|
3274
|
+
var Zt = (e, t) => {
|
|
3275
|
+
let n = t.map((i, a) => ai(e, i, a));
|
|
3276
|
+
return () => {
|
|
3277
|
+
for (let i of n) i();
|
|
3278
|
+
};
|
|
3279
|
+
};
|
|
3280
|
+
var ai = (e, t, n) => {
|
|
3281
|
+
var d;
|
|
3282
|
+
let i = /* @__PURE__ */ new Map(), a = Me(t), o = li(e, t, n, i), r = ui(e, n, i), s = y(t, "groupsmatch", { filterInvalid: true });
|
|
3283
|
+
(d = e.filters.value).groupsMatch || (d.groupsMatch = s), e.filters.value.groups[n] = it(e, t, n);
|
|
3284
|
+
let l = watch(() => e.filters.value.groups[n]?.conditions, (p) => {
|
|
3285
|
+
e.readingFilters || Wt2(e, t, p);
|
|
3286
|
+
}, { deep: true }), u = Xt2(e, t, n);
|
|
3287
|
+
return () => {
|
|
3288
|
+
a(), o(), r(), l(), u();
|
|
3289
|
+
};
|
|
3290
|
+
};
|
|
3291
|
+
var li = (e, t, n, i) => {
|
|
3292
|
+
let a = y(t, "filteron", { filterInvalid: true });
|
|
3293
|
+
return a === "submit" ? kn(t, "submit", () => {
|
|
3294
|
+
e.readingFilters = true, e.filters.value.groups[n] = it(e, t, n, true), e.readingFilters = false;
|
|
3295
|
+
}) : kn(t, a, (o) => {
|
|
3296
|
+
if (e.settingFilters) return;
|
|
3297
|
+
let { target: r } = o;
|
|
3298
|
+
if (!on(r)) return;
|
|
3299
|
+
let s = y(r, "field")?.trim();
|
|
3300
|
+
if (!s) return;
|
|
3301
|
+
let l = rt(r, s, true), u = () => {
|
|
3302
|
+
let m = e.filters.value.groups[n]?.conditions || [], f = m.findIndex((L) => L.fieldKey === s && L.op === l.op);
|
|
3303
|
+
e.readingFilters = true, f >= 0 ? m[f] = l : m.push(l), e.readingFilters = false;
|
|
3304
|
+
}, d = `${s}_${l.op}`, p = i.get(d);
|
|
3305
|
+
p && clearTimeout(p);
|
|
3306
|
+
let c = y(r, "debounce");
|
|
3307
|
+
if (ie(c) && !isNaN(c)) {
|
|
3308
|
+
let m = window.setTimeout(u, c);
|
|
3309
|
+
i.set(d, m);
|
|
3310
|
+
return;
|
|
3311
|
+
}
|
|
3312
|
+
u();
|
|
3313
|
+
});
|
|
3314
|
+
};
|
|
3315
|
+
var ui = (e, t, n) => {
|
|
3316
|
+
let { instance: i } = e, a = I("clear", { instance: i });
|
|
3317
|
+
if (e.options.a11y !== false) {
|
|
3318
|
+
let l = document.querySelectorAll(a);
|
|
3319
|
+
for (let u of l) Dt(u);
|
|
3320
|
+
}
|
|
3321
|
+
let o = (l) => {
|
|
3322
|
+
let u = l.closest(a);
|
|
3323
|
+
if (!u) return;
|
|
3324
|
+
let d = y(u, "field")?.trim(), p = e.filters.value.groups[t]?.conditions || [], c = d ? p.filter((m) => m.fieldKey === d) : p;
|
|
3325
|
+
for (let m of c) {
|
|
3326
|
+
n.delete(`${m.fieldKey}_${m.op}`);
|
|
3327
|
+
let f = { value: Array.isArray(m.value) ? [] : "", interacted: false };
|
|
3328
|
+
Object.assign(m, f);
|
|
3329
|
+
}
|
|
3330
|
+
}, r = kn(window, "click", (l) => {
|
|
3331
|
+
let { target: u } = l;
|
|
3332
|
+
u instanceof Element && o(u);
|
|
3333
|
+
}), s;
|
|
3334
|
+
return e.options.a11y !== false && (s = kn(window, "keydown", (l) => {
|
|
3335
|
+
if (!vt(l)) return;
|
|
3336
|
+
let { target: u } = l;
|
|
3337
|
+
if (!tn(u)) return;
|
|
3338
|
+
let d = u.closest(a);
|
|
3339
|
+
d && ((l.key === " " || l.key === "Spacebar") && l.preventDefault(), d.click());
|
|
3340
|
+
})), () => {
|
|
3341
|
+
r(), s?.();
|
|
3342
|
+
};
|
|
3343
|
+
};
|
|
3344
|
+
var en = (e) => {
|
|
3345
|
+
let t = Object.keys(e.allFieldsData.value), n = e.filters.value.groups.flatMap((r) => r.conditions.flatMap((s) => s.fieldKey)), a = [.../* @__PURE__ */ new Set([...t, ...n])].map((r) => r.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"));
|
|
3346
|
+
return new RegExp(`^(?:([0-9]+)_)?(${a.join("|")})(?:_(${D.operator.values.join("|")}))?$`);
|
|
3347
|
+
};
|
|
3348
|
+
var tn2 = async (e) => {
|
|
3349
|
+
let t = _.size > 1, n = await e.getAllSearchParams(t), i = en(e), a = n.filter(([o]) => o.match(i));
|
|
3350
|
+
for (let [o, r] of a) {
|
|
3351
|
+
let s = o.match(i);
|
|
3352
|
+
if (!s) continue;
|
|
3353
|
+
let l = s[1] ? parseInt(s[1]) : 0, u = s[2], d = s[3] ? s[3] : void 0, p = e.filters.value.groups[l]?.conditions.find((m) => m.fieldKey === u && m.op === d);
|
|
3354
|
+
if (!p) continue;
|
|
3355
|
+
let c = r;
|
|
3356
|
+
try {
|
|
3357
|
+
let m = JSON.parse(r);
|
|
3358
|
+
(Array.isArray(m) && m.every(Qt) || Qt(m)) && (c = m);
|
|
3359
|
+
} catch {
|
|
3360
|
+
}
|
|
3361
|
+
p.value = c, p.interacted = true;
|
|
3362
|
+
}
|
|
3363
|
+
};
|
|
3364
|
+
var nn = async (e) => {
|
|
3365
|
+
let t = _.size > 1, n = await e.getAllSearchParams(t), i = en(e);
|
|
3366
|
+
for (let [o] of n) o.match(i) && await e.setSearchParam(o, null, { usePrefix: t });
|
|
3367
|
+
let a = e.filters.value.groups.length > 1;
|
|
3368
|
+
e.filters.value.groups.forEach((o, r) => {
|
|
3369
|
+
o.conditions.forEach(({ fieldKey: s, op: l, value: u, interacted: d }) => {
|
|
3370
|
+
let p = [a ? r : void 0, s, l].filter(ce).join("_"), c = Array.isArray(u);
|
|
3371
|
+
if (!d || !u || c && !u.length) return;
|
|
3372
|
+
let m = null;
|
|
3373
|
+
if (c) try {
|
|
3374
|
+
m = JSON.stringify(u);
|
|
3375
|
+
} catch {
|
|
3376
|
+
}
|
|
3377
|
+
else m = u;
|
|
3378
|
+
e.setSearchParam(p, m, { usePrefix: t });
|
|
3379
|
+
});
|
|
3380
|
+
});
|
|
3381
|
+
};
|
|
3382
|
+
var mi = { empty: "\u2205", "not-empty": "!\u2205", contain: "\u2283", "not-contain": "\u2285", start: "\u22C0", "not-start": "\u22C0\u0338", end: "\u22C1", "not-end": "\u22C1\u0338", equal: "=", "not-equal": "\u2260", less: "<", "less-equal": "\u2264", greater: ">", "greater-equal": "\u2265" };
|
|
3383
|
+
var an = (e, t) => {
|
|
3384
|
+
let n = v("tag", { instance: e.instance });
|
|
3385
|
+
if (!n) return;
|
|
3386
|
+
let i = n.closest(I("tag-group")) || n.parentElement;
|
|
3387
|
+
if (!i) return;
|
|
3388
|
+
let a = i.parentNode;
|
|
3389
|
+
if (!a) return;
|
|
3390
|
+
let o = Array.from(i.children).indexOf(n), r = Array.from(a.children).indexOf(i);
|
|
3391
|
+
i.remove(), n.remove();
|
|
3392
|
+
let s = /* @__PURE__ */ new Map(), l = watch(e.filters, (u) => {
|
|
3393
|
+
let d = /* @__PURE__ */ new Map();
|
|
3394
|
+
u.groups.forEach((p) => {
|
|
3395
|
+
let c = s.get(p.id), m = !!c;
|
|
3396
|
+
if (!c) {
|
|
3397
|
+
let h = F(i), E = v("tag-group-remove", { scope: h }), S = kn(E, "click", () => {
|
|
3398
|
+
c?.remove();
|
|
3399
|
+
});
|
|
3400
|
+
c = { element: h, renderedTags: /* @__PURE__ */ new Map(), remove: () => {
|
|
3401
|
+
c?.renderedTags.forEach((b) => b.remove());
|
|
3402
|
+
let C = u.groups.length > 1;
|
|
3403
|
+
if (t && C) {
|
|
3404
|
+
let b = u.groups.findIndex((M) => M.id === p.id);
|
|
3405
|
+
u.groups.splice(b, 1);
|
|
3406
|
+
}
|
|
3407
|
+
}, cleanup: () => {
|
|
3408
|
+
S(), c?.renderedTags.forEach((C) => C.cleanup()), c?.element.remove(), s.delete(p.id);
|
|
3409
|
+
} }, s.set(p.id, c);
|
|
3410
|
+
}
|
|
3411
|
+
let f = /* @__PURE__ */ new Map(), L = p.conditions.map((h) => {
|
|
3412
|
+
let E = h.value;
|
|
3413
|
+
if (Array.isArray(E) && h.tagValuesDisplay === "separate") return E.map((x) => {
|
|
3414
|
+
let $ = `${h.id}:${x}`, k = c.renderedTags.get($), V = !!k;
|
|
3415
|
+
if (!(h.showTag && !!h.interacted && !!x)) return k?.cleanup(), false;
|
|
3416
|
+
if (!k) {
|
|
3417
|
+
let W = F(n), er = v("tag-remove", { scope: W }), tr2 = kn(er, "click", () => k?.remove());
|
|
3418
|
+
k = { element: W, remove: () => {
|
|
3419
|
+
let nr = p.conditions.length > 1, Ee = p.conditions.findIndex((He) => He.id === h.id), Oe = p.conditions[Ee].value;
|
|
3420
|
+
Array.isArray(Oe) && Oe.length > 1 ? p.conditions[Ee].value = Oe.filter((He) => He !== x) : t && nr ? p.conditions.splice(Ee, 1) : p.conditions[Ee].value = [];
|
|
3421
|
+
}, cleanup: () => {
|
|
3422
|
+
tr2(), k?.element.remove(), c.renderedTags.delete($);
|
|
3423
|
+
} }, c.renderedTags.set($, k);
|
|
3424
|
+
}
|
|
3425
|
+
let X = { ...h, value: x };
|
|
3426
|
+
if (sn2(X, k), !V) {
|
|
3427
|
+
let W = c.element.children[o + f.size] || null;
|
|
3428
|
+
c.element.insertBefore(k.element, W);
|
|
3429
|
+
}
|
|
3430
|
+
return f.set($, k), true;
|
|
3431
|
+
}).some(Boolean);
|
|
3432
|
+
let C = h.id, b = c.renderedTags.get(C), M = !!b;
|
|
3433
|
+
if (!(h.showTag && !!h.interacted && !!h.value && (Array.isArray(h.value) ? !!h.value.length : true))) return b?.cleanup(), false;
|
|
3434
|
+
if (!b) {
|
|
3435
|
+
let A2 = F(n), x = v("tag-remove", { scope: A2 }), $ = kn(x, "click", () => b?.remove());
|
|
3436
|
+
b = { element: A2, remove: () => {
|
|
3437
|
+
let k = p.conditions.length > 1, V = p.conditions.findIndex((oe) => oe.id === h.id);
|
|
3438
|
+
t && k ? p.conditions.splice(V, 1) : p.conditions[V].value = Array.isArray(h.value) ? [] : "";
|
|
3439
|
+
}, cleanup: () => {
|
|
3440
|
+
$(), b?.element.remove(), c.renderedTags.delete(C);
|
|
3441
|
+
} }, c.renderedTags.set(C, b);
|
|
3442
|
+
}
|
|
3443
|
+
if (sn2(h, b), !M) {
|
|
3444
|
+
let A2 = c.element.children[o + f.size] || null;
|
|
3445
|
+
c.element.insertBefore(b.element, A2);
|
|
3446
|
+
}
|
|
3447
|
+
return f.set(C, b), true;
|
|
3448
|
+
}).some(Boolean);
|
|
3449
|
+
for (let [h, E] of c.renderedTags) f.has(h) || E.cleanup();
|
|
3450
|
+
if (!L) {
|
|
3451
|
+
c.cleanup();
|
|
3452
|
+
return;
|
|
3453
|
+
}
|
|
3454
|
+
if (!m) {
|
|
3455
|
+
let h = a.children[r + d.size] || null;
|
|
3456
|
+
a.insertBefore(c.element, h);
|
|
3457
|
+
}
|
|
3458
|
+
d.set(p.id, c);
|
|
3459
|
+
});
|
|
3460
|
+
for (let [p, c] of s) d.has(p) || c.cleanup();
|
|
3461
|
+
}, { deep: true });
|
|
3462
|
+
return () => {
|
|
3463
|
+
l();
|
|
3464
|
+
for (let [, { cleanup: u }] of s) u();
|
|
3465
|
+
};
|
|
3466
|
+
};
|
|
3467
|
+
var sn2 = (e, t) => {
|
|
3468
|
+
let n = t.element, i = v("tag-field", { scope: n }), a = v("tag-operator", { scope: n }), o = v("tag-value", { scope: n }), r = new Map(D.operator.values.map((l) => {
|
|
3469
|
+
let u = v(`tag-operator-${l}`, { scope: n });
|
|
3470
|
+
if (u) return [l, u];
|
|
3471
|
+
}).filter(ce));
|
|
3472
|
+
i && (i.textContent = e.tagFieldDisplay || e.fieldKey);
|
|
3473
|
+
let s = e.op;
|
|
3474
|
+
if (s) {
|
|
3475
|
+
if (r.get(s)) a?.remove(), r.delete(s);
|
|
3476
|
+
else if (a) {
|
|
3477
|
+
let u = mi[s];
|
|
3478
|
+
a.textContent = u;
|
|
3479
|
+
}
|
|
3480
|
+
for (let [, u] of r) u.remove();
|
|
3481
|
+
}
|
|
3482
|
+
if (o) if (!e.value) o.remove();
|
|
3483
|
+
else {
|
|
3484
|
+
let l = e.value, u = y(o, "formatdisplay");
|
|
3485
|
+
if (u) {
|
|
3486
|
+
let p = u === "true" ? void 0 : u;
|
|
3487
|
+
if (Array.isArray(e.value)) l = e.value.map((c) => {
|
|
3488
|
+
let m = Xe(c, e.type);
|
|
3489
|
+
return ie(m) ? m.toLocaleString(p) : K(m) ? m.toLocaleDateString(p) : c;
|
|
3490
|
+
});
|
|
3491
|
+
else {
|
|
3492
|
+
let c = Xe(e.value, e.type);
|
|
3493
|
+
ie(c) && (l = c.toLocaleString(p)), K(c) && (l = c.toLocaleDateString(p));
|
|
3494
|
+
}
|
|
3495
|
+
}
|
|
3496
|
+
let d = Array.isArray(l) ? l.join(e.filterMatch === "and" ? " & " : " | ") : l;
|
|
3497
|
+
o.textContent = d;
|
|
3498
|
+
}
|
|
3499
|
+
};
|
|
3500
|
+
var ln = (e, t) => {
|
|
3501
|
+
let n = e.options.filteringclass ?? "is-list-filtering", i = e.addHook("filter", async (p) => await Re(e.filters.value, p, e.highlight)), a = e.addHook("beforeRender", async (p) => {
|
|
3502
|
+
if (e.triggeredHook === "filter") {
|
|
3503
|
+
e.wrapperElement.classList.add(n);
|
|
3504
|
+
let c = e.wrapperElement.getAnimations({ subtree: true });
|
|
3505
|
+
try {
|
|
3506
|
+
await Promise.all(c.map((m) => m.finished));
|
|
3507
|
+
} catch {
|
|
3508
|
+
}
|
|
3509
|
+
}
|
|
3510
|
+
return p;
|
|
3511
|
+
}), o = e.addHook("afterRender", (p) => (e.wrapperElement.classList.remove(n), p)), r = It(e), s = !!v("condition-group", { scope: t[0] }), l = s ? Nt2(e, t[0]) : Zt(e, t), u = an(e, s), d = watch(e.filters, (0, import_just_debounce.default)(() => {
|
|
3512
|
+
e.triggerHook("filter", { scrollToAnchor: e.hasInteracted.value, resetCurrentPage: e.hasInteracted.value }), e.showQuery && nn(e);
|
|
3513
|
+
}, 0), { deep: true, immediate: true });
|
|
3514
|
+
return tn2(e), () => {
|
|
3515
|
+
i(), a(), o(), r(), u?.(), d(), l?.();
|
|
3516
|
+
};
|
|
3517
|
+
};
|
|
3518
|
+
var Y = (e) => {
|
|
3519
|
+
let { paginationNextCMSElement: t, paginationPreviousCMSElement: n, paginationCountElement: i, loadingSearchParamsData: a, cache: o } = e;
|
|
3520
|
+
if (!t.value && !n.value) return Promise.resolve();
|
|
3521
|
+
e.loading.value = true;
|
|
3522
|
+
let r;
|
|
3523
|
+
if (i) {
|
|
3524
|
+
let [, s] = i.textContent?.split("/") || [];
|
|
3525
|
+
s && (r = parseInt(s.trim()));
|
|
3526
|
+
}
|
|
3527
|
+
return e.loadingPaginatedItems = (async () => {
|
|
3528
|
+
await a, r ? await un(e, r, o) : await yi(e, o), e.loading.value = false;
|
|
3529
|
+
})(), e.loadingPaginatedItems;
|
|
3530
|
+
};
|
|
3531
|
+
var yi = async (e, t) => {
|
|
3532
|
+
let n = e.currentPage.value;
|
|
3533
|
+
if (n > 1 && await un(e, n, t), !e.paginationNextCMSElement.value) return;
|
|
3534
|
+
let { href: i } = e.paginationNextCMSElement.value, a = [i], o = async (r) => {
|
|
3535
|
+
let s = await Po(r, { cache: t });
|
|
3536
|
+
if (!s) return;
|
|
3537
|
+
let l = await lt(s, e);
|
|
3538
|
+
!l || a.includes(l) || (a.push(l), await o(l));
|
|
3539
|
+
};
|
|
3540
|
+
await o(i);
|
|
3541
|
+
};
|
|
3542
|
+
var un = async (e, t, n) => {
|
|
3543
|
+
if (!e.paginationNextCMSElement.value && !e.paginationPreviousCMSElement.value) return;
|
|
3544
|
+
let i = e.currentPage.value;
|
|
3545
|
+
if (!e.paginationSearchParam || !i) return;
|
|
3546
|
+
let { origin: a, pathname: o } = window.location, r = (l) => `${a}${o}?${e.paginationSearchParam}=${l}`;
|
|
3547
|
+
for (let l = i - 1; l >= 1; l--) {
|
|
3548
|
+
let u = r(l), d = await Po(u, { cache: n });
|
|
3549
|
+
if (!d) return;
|
|
3550
|
+
await lt(d, e, "unshift");
|
|
3551
|
+
}
|
|
3552
|
+
let s = [];
|
|
3553
|
+
for (let l = i + 1; l <= t; l++) s[l] = (async () => {
|
|
3554
|
+
let u = s[l - 1], d = r(l), p = await Po(d, { cache: n });
|
|
3555
|
+
await u, p && await lt(p, e);
|
|
3556
|
+
})();
|
|
3557
|
+
await Promise.all(s);
|
|
3558
|
+
};
|
|
3559
|
+
var lt = async (e, t, n = "push") => {
|
|
3560
|
+
let a = e.querySelectorAll(P("wrapper"))[t.pageIndex];
|
|
3561
|
+
if (!a) return;
|
|
3562
|
+
let o = F2(a, "pagination-next")?.href, r = F2(a, "item"), { length: s } = r;
|
|
3563
|
+
o && t.initialItemsPerPage !== s && !t.customItemsPerPage && (t.initialItemsPerPage = s, t.itemsPerPage.value = s);
|
|
3564
|
+
let l = r.map(t.createItem).filter(ce);
|
|
3565
|
+
return n === "push" ? t.items.value = [...t.items.value, ...l] : t.items.value = [...l, ...t.items.value], o;
|
|
3566
|
+
};
|
|
3567
|
+
var cn = (e) => {
|
|
3568
|
+
Y(e).then(() => {
|
|
3569
|
+
e.itemsPerPage.value = e.items.value.length;
|
|
3570
|
+
});
|
|
3571
|
+
let t = kn([...e.allPaginationPreviousElements.value, ...e.allPaginationNextElements.value], "click", (n) => {
|
|
3572
|
+
n.preventDefault();
|
|
3573
|
+
});
|
|
3574
|
+
return () => {
|
|
3575
|
+
t();
|
|
3576
|
+
};
|
|
3577
|
+
};
|
|
3578
|
+
var pn = (e) => {
|
|
3579
|
+
let t = effect(() => {
|
|
3580
|
+
let n = e.hooks.filter.result.value;
|
|
3581
|
+
if (e.visibleCountElement) {
|
|
3582
|
+
let i = Math.min(e.itemsPerPage.value, n.length);
|
|
3583
|
+
e.visibleCountElement.textContent = `${i}`;
|
|
3584
|
+
}
|
|
3585
|
+
if (e.visibleCountFromElement) {
|
|
3586
|
+
let i = Math.min((e.currentPage.value - 1) * e.itemsPerPage.value + 1, n.length);
|
|
3587
|
+
e.visibleCountFromElement.textContent = `${i}`;
|
|
3588
|
+
}
|
|
3589
|
+
if (e.visibleCountToElement) {
|
|
3590
|
+
let i = Math.min(e.currentPage.value * e.itemsPerPage.value, n.length);
|
|
3591
|
+
e.visibleCountToElement.textContent = `${i}`;
|
|
3592
|
+
}
|
|
3593
|
+
});
|
|
3594
|
+
return () => {
|
|
3595
|
+
t.effect.stop();
|
|
3596
|
+
};
|
|
3597
|
+
};
|
|
3598
|
+
var dn = (e) => {
|
|
3599
|
+
e.addHook("pagination", (i) => i.slice(0, e.itemsPerPage.value)), Y(e);
|
|
3600
|
+
let t = ut(e), n = ct(e);
|
|
3601
|
+
return () => {
|
|
3602
|
+
t(), n();
|
|
3603
|
+
};
|
|
3604
|
+
};
|
|
3605
|
+
var ut = (e) => {
|
|
3606
|
+
let t;
|
|
3607
|
+
e.options.a11y !== false && e.allPaginationNextElements.value.forEach((a) => Dt(a));
|
|
3608
|
+
let n = I("pagination-next", { instance: e.instance }), i = _n(n, { click: ({ event: a, el: o }) => {
|
|
3609
|
+
if (!tn(o)) return;
|
|
3610
|
+
a.preventDefault();
|
|
3611
|
+
let r = y(o, "loadcount") || e.options.loadcount;
|
|
3612
|
+
r === "all" ? t || (t = watch(e.items, (s) => {
|
|
3613
|
+
e.itemsPerPage.value = s.length;
|
|
3614
|
+
}, { immediate: true })) : e.itemsPerPage.value += jo(r, e.initialItemsPerPage), e.triggerHook("pagination");
|
|
3615
|
+
}, keydown: ({ event: a, el: o }) => {
|
|
3616
|
+
e.options.a11y !== false && vt(a) && ((a.key === " " || a.key === "Spacebar") && a.preventDefault(), o.click());
|
|
3617
|
+
} });
|
|
3618
|
+
return () => {
|
|
3619
|
+
i(), t?.();
|
|
3620
|
+
};
|
|
3621
|
+
};
|
|
3622
|
+
var ct = (e) => {
|
|
3623
|
+
let t = effect(() => {
|
|
3624
|
+
let n = e.itemsPerPage.value >= e.hooks.filter.result.value.length;
|
|
3625
|
+
if (e.allPaginationNextElements.value.forEach((i) => {
|
|
3626
|
+
i.style.display = n ? "none" : "", i.setAttribute("aria-hidden", n ? "true" : "false"), i.setAttribute("tabindex", n ? "-1" : "0");
|
|
3627
|
+
}), e.paginationCountElement) {
|
|
3628
|
+
let i = Math.ceil(e.hooks.filter.result.value.length / e.initialItemsPerPage), a = Math.ceil(e.itemsPerPage.value / e.initialItemsPerPage);
|
|
3629
|
+
e.paginationCountElement.innerText = `${a} / ${i}`, e.paginationCountElement.setAttribute("aria-label", `Page ${a} of ${i}`);
|
|
3630
|
+
}
|
|
3631
|
+
});
|
|
3632
|
+
return () => {
|
|
3633
|
+
t.effect.stop();
|
|
3634
|
+
};
|
|
3635
|
+
};
|
|
3636
|
+
var mn = (e) => {
|
|
3637
|
+
if (!e.listElement) return;
|
|
3638
|
+
let t = Ii(e);
|
|
3639
|
+
e.addHook("pagination", (s) => s.slice(0, e.itemsPerPage.value)), Y(e);
|
|
3640
|
+
let n = functionThrottle(async () => {
|
|
3641
|
+
if (!e.listElement) return;
|
|
3642
|
+
let { innerHeight: s } = window, { bottom: l } = e.listElement.getBoundingClientRect(), u = t * s;
|
|
3643
|
+
l > 0 && l <= u && e.itemsPerPage.value < e.items.value.length && (e.itemsPerPage.value += e.initialItemsPerPage, e.triggerHook("pagination"));
|
|
3644
|
+
}, 10), i, a = new IntersectionObserver((s) => {
|
|
3645
|
+
for (let { isIntersecting: l } of s) l ? i || (i = kn(window, "scroll", n)) : (i?.(), i = void 0);
|
|
3646
|
+
});
|
|
3647
|
+
a.observe(e.listElement);
|
|
3648
|
+
let o = ut(e), r = ct(e);
|
|
3649
|
+
return () => {
|
|
3650
|
+
a.disconnect(), i?.(), o(), r();
|
|
3651
|
+
};
|
|
3652
|
+
};
|
|
3653
|
+
var Ii = (e) => 1 - (e.options.threshold ?? -20) / 100;
|
|
3654
|
+
var bn = async (e) => {
|
|
3655
|
+
let { currentPage: t, itemsPerPage: n, paginationWrapperElement: i } = e;
|
|
3656
|
+
if (!i) return;
|
|
3657
|
+
e.addHook("pagination", (h) => {
|
|
3658
|
+
let E = n.value, S = (t.value - 1) * E, C = S + E;
|
|
3659
|
+
return h.slice(S, C);
|
|
3660
|
+
});
|
|
3661
|
+
let a = watch(e.currentPage, () => {
|
|
3662
|
+
e.triggeredHook || e.triggerHook("pagination", { scrollToAnchor: true }), e.showQuery && e.setSearchParam("page", t.value.toString(), { useSearchParamsPrefix: true });
|
|
3663
|
+
}, {}), o = watch(e.itemsPerPage, () => {
|
|
3664
|
+
e.triggerHook("pagination", { scrollToAnchor: true });
|
|
3665
|
+
});
|
|
3666
|
+
Y(e), await e.loadingSearchParamsData;
|
|
3667
|
+
let [r, s] = yn(e, "pageboundary"), [l, u] = yn(e, "pagesiblings"), d = v("page-button", { scope: i }), p = v("page-dots", { scope: i });
|
|
3668
|
+
p ? p.remove() : (p = document.createElement("div"), p.textContent = "...");
|
|
3669
|
+
let c;
|
|
3670
|
+
if (d) {
|
|
3671
|
+
let { parentElement: h } = d;
|
|
3672
|
+
d.remove(), h && (c = Oi(e, h, d, p, l, r));
|
|
3673
|
+
}
|
|
3674
|
+
let m = Bi(e), f = $i(e), L = Ni(e);
|
|
3675
|
+
return () => {
|
|
3676
|
+
s?.(), u?.(), c?.(), m?.(), L?.(), f(), a(), o();
|
|
3677
|
+
};
|
|
3678
|
+
};
|
|
3679
|
+
var Oi = (e, t, n, i, a, o) => {
|
|
3680
|
+
let { currentPage: r, totalPages: s } = e, l = /* @__PURE__ */ new Map(), u = effect(() => {
|
|
3681
|
+
let c = a.value * 2 + 1, f = o.value * 2 + c + 2, L = r.value - 1 < f - c, h = s.value - r.value < f - c, E = [...l];
|
|
3682
|
+
for (let S = 1; S <= f; S++) {
|
|
3683
|
+
let [C, b] = E[S - 1] || [], [M] = E[S - 2] || [];
|
|
3684
|
+
if (S > s.value) {
|
|
3685
|
+
C && (C.remove(), E[S - 1] = void 0);
|
|
3686
|
+
continue;
|
|
3687
|
+
}
|
|
3688
|
+
let T;
|
|
3689
|
+
s.value <= f ? T = S : L ? S > f - o.value ? T = s.value - (f - S) : S === f - o.value ? T = null : T = S : h ? S < o.value + 1 ? T = S : S === o.value + 1 ? T = null : T = s.value - (f - S) : S < o.value + 1 ? T = S : S > f - o.value ? T = s.value - (f - S) : S === o.value + 1 || S === f - o.value ? T = null : T = r.value + (S - (o.value + 1) - (1 + a.value));
|
|
3690
|
+
let A2;
|
|
3691
|
+
b !== T && (C?.remove(), A2 = Hi(n, i, T, e), E[S - 1] = [A2, T], M ? t.insertBefore(A2, M.nextSibling) : t.appendChild(A2), A2.style.opacity = "");
|
|
3692
|
+
let x = A2 || C;
|
|
3693
|
+
x && (T === r.value ? (x.classList.add(Ht), x.setAttribute("aria-current", "page")) : (x.classList.remove(Ht), x.removeAttribute("aria-current")));
|
|
3694
|
+
}
|
|
3695
|
+
l = new Map([...E.filter(ce)]);
|
|
3696
|
+
}), d = I("page-button"), p = _n(d, { click: ({ event: c, el: m }) => {
|
|
3697
|
+
c.preventDefault();
|
|
3698
|
+
let f = l.get(m);
|
|
3699
|
+
f && (e.currentPage.value = f);
|
|
3700
|
+
}, keydown: ({ event: c, el: m }) => {
|
|
3701
|
+
e.options.a11y !== false && vt(c) && ((c.key === " " || c.key === "Spacebar") && c.preventDefault(), m.click());
|
|
3702
|
+
} }, { root: t });
|
|
3703
|
+
return () => {
|
|
3704
|
+
u.effect.stop(), p();
|
|
3705
|
+
};
|
|
3706
|
+
};
|
|
3707
|
+
var Hi = (e, t, n, { paginationSearchParam: i }) => {
|
|
3708
|
+
if (!n) return F(t);
|
|
3709
|
+
let a = F(e);
|
|
3710
|
+
return a.classList.remove(Ht), a.textContent = `${n}`, sn(a) && i && (a.href = `?${i}=${n}`), a;
|
|
3711
|
+
};
|
|
3712
|
+
var Ni = ({ paginationCountElement: e, currentPage: t, totalPages: n }) => {
|
|
3713
|
+
if (!e) return;
|
|
3714
|
+
let i = effect(() => {
|
|
3715
|
+
e.setAttribute("aria-label", `Page ${t.value} of ${n.value}`), e.textContent = `${t.value} / ${n.value}`;
|
|
3716
|
+
});
|
|
3717
|
+
return () => i.effect.stop();
|
|
3718
|
+
};
|
|
3719
|
+
var Bi = (e) => {
|
|
3720
|
+
if (!e.paginationWrapperElement) return;
|
|
3721
|
+
let t = effect(() => {
|
|
3722
|
+
e.paginationWrapperElement.style.display = e.hooks.pagination.result.value.length > 0 ? "" : "none";
|
|
3723
|
+
});
|
|
3724
|
+
return () => t.effect.stop();
|
|
3725
|
+
};
|
|
3726
|
+
var $i = (e) => {
|
|
3727
|
+
let t = (r, s) => {
|
|
3728
|
+
let l = y(r, "paginationdisabledclass");
|
|
3729
|
+
r.style.display = "", r.classList[s ? "remove" : "add"](l), r.setAttribute("aria-disabled", s ? "false" : "true"), r.setAttribute("tabindex", s ? "0" : "-1");
|
|
3730
|
+
}, n = effect(() => {
|
|
3731
|
+
e.allPaginationPreviousElements.value.forEach((r) => {
|
|
3732
|
+
let s = e.currentPage.value !== 1;
|
|
3733
|
+
t(r, s), sn(r) && (r.href = `?${e.paginationSearchParam}=${e.currentPage.value - 1}`);
|
|
3734
|
+
}), e.allPaginationNextElements.value.forEach((r) => {
|
|
3735
|
+
let s = e.currentPage.value !== e.totalPages.value;
|
|
3736
|
+
t(r, s), sn(r) && (r.href = `?${e.paginationSearchParam}=${e.currentPage.value + 1}`);
|
|
3737
|
+
});
|
|
3738
|
+
});
|
|
3739
|
+
e.options.a11y !== false && (e.allPaginationPreviousElements.value.forEach((r) => Dt(r)), e.allPaginationNextElements.value.forEach((r) => Dt(r)));
|
|
3740
|
+
let i = P("pagination-next"), a = P("pagination-previous"), o = _n(`:is(${i}, ${a})`, { click: ({ event: r, el: s }) => {
|
|
3741
|
+
if (j2(s) !== e.instance) return;
|
|
3742
|
+
r.preventDefault();
|
|
3743
|
+
let u = s.matches(i) ? e.currentPage.value + 1 : e.currentPage.value - 1;
|
|
3744
|
+
!u || u < 1 || u > e.totalPages.value || (e.currentPage.value = u);
|
|
3745
|
+
}, keydown: ({ event: r, el: s }) => {
|
|
3746
|
+
e.options.a11y !== false && vt(r) && j2(s) === e.instance && ((r.key === " " || r.key === "Spacebar") && r.preventDefault(), s.click());
|
|
3747
|
+
} });
|
|
3748
|
+
return () => {
|
|
3749
|
+
n.effect.stop(), o();
|
|
3750
|
+
};
|
|
3751
|
+
};
|
|
3752
|
+
var yn = (e, t) => {
|
|
3753
|
+
let n = e.options[t], i = tr(n).map(parseInt), a = ref(i[0]), o = () => {
|
|
3754
|
+
let s = Do(), l = bt[s];
|
|
3755
|
+
for (let u = l; u >= 0; u--) {
|
|
3756
|
+
let d = i[u];
|
|
3757
|
+
if (ie(d)) {
|
|
3758
|
+
a.value = d;
|
|
3759
|
+
break;
|
|
3760
|
+
}
|
|
3761
|
+
}
|
|
3762
|
+
}, r = kn(window, "resize", (0, import_just_debounce.default)(o, 100));
|
|
3763
|
+
return o(), [a, r];
|
|
3764
|
+
};
|
|
3765
|
+
var Tn = (e, t) => {
|
|
3766
|
+
let n = e.options.loadingclass ?? "is-list-loading";
|
|
3767
|
+
(e.options.resetix ?? false) && e.webflowModules.add("ix2");
|
|
3768
|
+
let a = pn(e), o = t === "all" ? cn(e) : t === "more" ? dn(e) : t === "infinite" ? mn(e) : bn(e), r = e.addHook("beforeRender", async (l) => {
|
|
3769
|
+
if (e.triggeredHook === "pagination") {
|
|
3770
|
+
e.wrapperElement.classList.add(n);
|
|
3771
|
+
let u = e.wrapperElement.getAnimations({ subtree: true });
|
|
3772
|
+
try {
|
|
3773
|
+
await Promise.all(u.map((d) => d.finished));
|
|
3774
|
+
} catch {
|
|
3775
|
+
}
|
|
3776
|
+
}
|
|
3777
|
+
return l;
|
|
3778
|
+
}), s = e.addHook("afterRender", (l) => (e.wrapperElement.classList.remove(n), l));
|
|
3779
|
+
return async () => {
|
|
3780
|
+
(await o)?.(), r(), s(), a();
|
|
3781
|
+
};
|
|
3782
|
+
};
|
|
3783
|
+
var Sn2 = (e) => {
|
|
3784
|
+
let t = /* @__PURE__ */ new Set(), n = effect(() => {
|
|
3785
|
+
let i = false;
|
|
3786
|
+
Promise.all(e.items.value.map(async (a) => {
|
|
3787
|
+
if (t.has(a)) return;
|
|
3788
|
+
t.add(a);
|
|
3789
|
+
let o = R("nest-target", { scope: a.element });
|
|
3790
|
+
o.length && (await Promise.all(o.map(async (r) => ji(e, a, r))), i = true);
|
|
3791
|
+
})).then(() => {
|
|
3792
|
+
i && triggerRef(e.items);
|
|
3793
|
+
});
|
|
3794
|
+
});
|
|
3795
|
+
return () => {
|
|
3796
|
+
n.effect.stop(), t.clear();
|
|
3797
|
+
};
|
|
3798
|
+
};
|
|
3799
|
+
var ji = (e, t, n) => {
|
|
3800
|
+
if (!t.href) return;
|
|
3801
|
+
let i = y(n, "nest");
|
|
3802
|
+
if (!i) return;
|
|
3803
|
+
let a = t.element.querySelector(`${I("nest-slugs")}${B("nest", i)}`);
|
|
3804
|
+
return t.nesting = new Promise((o) => {
|
|
3805
|
+
if (a) {
|
|
3806
|
+
let r = tr(a.textContent);
|
|
3807
|
+
zi(e, t, n, r, i).then(o);
|
|
3808
|
+
} else Ln(e, t, n, i).then(o);
|
|
3809
|
+
}), t.nesting;
|
|
3810
|
+
};
|
|
3811
|
+
var zi = async (e, t, n, i, a) => {
|
|
3812
|
+
if (!i.length || !t.href) return;
|
|
3813
|
+
let o = [..._.values()].find((l) => l !== e && l.instance === a);
|
|
3814
|
+
if (!o) return;
|
|
3815
|
+
let r = o.items.value.filter(({ href: l }) => {
|
|
3816
|
+
if (!l) return false;
|
|
3817
|
+
try {
|
|
3818
|
+
let u = new URL(l), [d] = u.pathname.match(/[^/]+(?=\/$|$)/g) || [];
|
|
3819
|
+
return d && i.includes(d);
|
|
3820
|
+
} catch {
|
|
3821
|
+
return false;
|
|
3822
|
+
}
|
|
3823
|
+
}), s = F(o.wrapperElement, false);
|
|
3824
|
+
if (r.length) {
|
|
3825
|
+
let l = o.listElement ? F(o.listElement, false) : document.createElement("div");
|
|
3826
|
+
await Promise.resolve();
|
|
3827
|
+
let u = await Promise.all(r.map(async (d) => (await d.nesting, F(d.element))));
|
|
3828
|
+
l.append(...u), s.append(l);
|
|
3829
|
+
} else {
|
|
3830
|
+
let l = o.emptyElement.value;
|
|
3831
|
+
l || (await o.loadingPaginationElements, l = o.emptyElement.value), l && s.append(l);
|
|
3832
|
+
}
|
|
3833
|
+
n.append(s), t.collectFields();
|
|
3834
|
+
};
|
|
3835
|
+
var Ln = async (e, t, n, i) => {
|
|
3836
|
+
if (!t.href) return;
|
|
3837
|
+
let a = await Po(t.href, { cache: e.cache });
|
|
3838
|
+
if (!a) return;
|
|
3839
|
+
let o = v("wrapper", { scope: a, instance: i }) || v("list", { scope: a, instance: i });
|
|
3840
|
+
if (!o) return;
|
|
3841
|
+
let r = F2(o, "wrapper");
|
|
3842
|
+
if (!r) return;
|
|
3843
|
+
let l = re(a).indexOf(r);
|
|
3844
|
+
if (l === -1) return;
|
|
3845
|
+
let u = new le(r, l, false);
|
|
3846
|
+
if (u.emptyElement.value) {
|
|
3847
|
+
n.append(u.emptyElement.value);
|
|
3848
|
+
return;
|
|
3849
|
+
}
|
|
3850
|
+
if (!u.items.value.length) return;
|
|
3851
|
+
let d = xn(a);
|
|
3852
|
+
await Promise.all(u.items.value.map(async (p) => {
|
|
3853
|
+
let c = R("nest-target", { scope: p.element });
|
|
3854
|
+
c.length && await Promise.all(c.map(async (m) => {
|
|
3855
|
+
let f = y(m, "nest");
|
|
3856
|
+
f && (await Ln(e, p, m, f), t.collectFields());
|
|
3857
|
+
}));
|
|
3858
|
+
})), await d, n.append(r), t.collectFields();
|
|
3859
|
+
};
|
|
3860
|
+
var Cn = (e, t, n) => {
|
|
3861
|
+
let i = v("previous-empty", { instance: e.instance }), a = v("next-empty", { instance: e.instance });
|
|
3862
|
+
i?.remove(), a?.remove();
|
|
3863
|
+
let o = !!e.loadingPaginatedItems, r, s;
|
|
3864
|
+
e.loadingPaginatedItems?.then(() => {
|
|
3865
|
+
o = false, l(e.items.value);
|
|
3866
|
+
});
|
|
3867
|
+
let l = (d) => {
|
|
3868
|
+
if (r && s) return;
|
|
3869
|
+
let p = window.location.origin + window.location.pathname, c = d.findIndex((m) => m.href === p);
|
|
3870
|
+
if (c === -1 && !o && (i && t?.append(i), a && n?.append(a)), c !== -1) {
|
|
3871
|
+
if (!r) if (r = d[c - 1], r) {
|
|
3872
|
+
let m = F(r.element);
|
|
3873
|
+
i?.remove(), t?.append(m);
|
|
3874
|
+
} else !o && i && t?.append(i);
|
|
3875
|
+
if (!s) if (s = d[c + 1], s) {
|
|
3876
|
+
let m = F(s.element);
|
|
3877
|
+
a?.remove(), n?.append(m);
|
|
3878
|
+
} else !o && a && n?.append(a);
|
|
3879
|
+
}
|
|
3880
|
+
};
|
|
3881
|
+
return watch(e.items, l, { immediate: true });
|
|
3882
|
+
};
|
|
3883
|
+
var xn2 = (e, t) => {
|
|
3884
|
+
e.webflowModules.add("slider");
|
|
3885
|
+
let n = t.map((i) => Qi(e, i));
|
|
3886
|
+
return () => {
|
|
3887
|
+
for (let i of n) i?.();
|
|
3888
|
+
};
|
|
3889
|
+
};
|
|
3890
|
+
var Qi = (e, t) => {
|
|
3891
|
+
if (!j(t)) return;
|
|
3892
|
+
let n = /* @__PURE__ */ new Map();
|
|
3893
|
+
return e.addHook("render", (i = []) => {
|
|
3894
|
+
let a = /* @__PURE__ */ new Set();
|
|
3895
|
+
for (let o of i) {
|
|
3896
|
+
let r = R("select-value", { scope: o.element });
|
|
3897
|
+
for (let s of r) a.add(s.innerText);
|
|
3898
|
+
}
|
|
3899
|
+
for (let o of a) {
|
|
3900
|
+
if (n.has(o)) continue;
|
|
3901
|
+
let r = new Option(o, o);
|
|
3902
|
+
t.options.add(r), n.set(o, r);
|
|
3903
|
+
}
|
|
3904
|
+
for (let [o, r] of n) a.has(o) || (r?.remove(), n.delete(o));
|
|
3905
|
+
}), () => {
|
|
3906
|
+
n.clear();
|
|
3907
|
+
};
|
|
3908
|
+
};
|
|
3909
|
+
var Mn2 = (e, t) => {
|
|
3910
|
+
e.webflowModules.add("slider");
|
|
3911
|
+
let n = t.map((i) => Ji(e, i));
|
|
3912
|
+
return () => {
|
|
3913
|
+
for (let i of n) i?.();
|
|
3914
|
+
};
|
|
3915
|
+
};
|
|
3916
|
+
var Ji = (e, t) => {
|
|
3917
|
+
let n = t.closest(`.${Ft.slider}`);
|
|
3918
|
+
if (!n) return;
|
|
3919
|
+
let i = n.querySelector(`.${Ft.sliderMask}`);
|
|
3920
|
+
if (!i) return;
|
|
3921
|
+
let a = n.querySelectorAll(`.${Ft.slide}`);
|
|
3922
|
+
if (!a.length) return;
|
|
3923
|
+
let o = a[0].classList.value;
|
|
3924
|
+
for (let s of a) s.remove();
|
|
3925
|
+
let r = /* @__PURE__ */ new Map();
|
|
3926
|
+
return e.addHook("beforeRender", (s = []) => {
|
|
3927
|
+
for (let l of s) {
|
|
3928
|
+
if (r.has(l.id)) continue;
|
|
3929
|
+
l.currentIndex = void 0, l.element.removeAttribute(Mn);
|
|
3930
|
+
let u = document.createElement("div");
|
|
3931
|
+
u.setAttribute("class", o), u.appendChild(l.element), i.appendChild(u), r.set(l.id, u);
|
|
3932
|
+
}
|
|
3933
|
+
for (let [l, u] of r) s.some((d) => d.id === l) || (u?.remove(), r.delete(l));
|
|
3934
|
+
return e.renderedItems.clear(), [];
|
|
3935
|
+
}), e.triggerHook("beforeRender"), () => {
|
|
3936
|
+
r.clear();
|
|
3937
|
+
};
|
|
3938
|
+
};
|
|
3939
|
+
var Fn2 = (e, t) => {
|
|
3940
|
+
let n = ref(), i = /* @__PURE__ */ new Map(), a = e.flatMap((s) => {
|
|
3941
|
+
let l = y(s, "field")?.trim();
|
|
3942
|
+
if (!l) return;
|
|
3943
|
+
let u = G(s, "reverse", "true"), d = y(s, "ascclass"), p = y(s, "descclass"), c = ref();
|
|
3944
|
+
s.setAttribute(Mn, Dn.columnheader), s.setAttribute(vn, "0"), t.options.a11y !== false && Dt(s), i.set(s, { fieldKey: l, reverse: u, currentDirection: c });
|
|
3945
|
+
let m = computed(() => n.value !== s ? "none" : c.value === "asc" ? uo.ascending : uo.descending), f = effect(() => {
|
|
3946
|
+
s.setAttribute(co, m.value);
|
|
3947
|
+
}), L = computed(() => n.value !== s ? null : c.value === "asc" ? d : p), h = effect(() => {
|
|
3948
|
+
s.classList.remove(d, p), L.value && s.classList.add(L.value);
|
|
3949
|
+
});
|
|
3950
|
+
return [() => f.effect.stop(), () => h.effect.stop()];
|
|
3951
|
+
}).filter(ce), o = I("sort-trigger", { instance: t.instance }), r = _n(o, { click: ({ event: s, el: l }) => {
|
|
3952
|
+
let u = i.get(l);
|
|
3953
|
+
u && (s.preventDefault(), n.value = l, u.currentDirection.value = lo(u.currentDirection.value, u.reverse), t.sorting.value = { fieldKey: u.fieldKey, direction: u.currentDirection.value, interacted: true });
|
|
3954
|
+
}, keydown: ({ event: s, el: l }) => {
|
|
3955
|
+
i.has(l) && t.options.a11y !== false && vt(s) && ((s.key === " " || s.key === "Spacebar") && s.preventDefault(), l.click());
|
|
3956
|
+
} });
|
|
3957
|
+
return () => {
|
|
3958
|
+
r();
|
|
3959
|
+
for (let s of a) s();
|
|
3960
|
+
};
|
|
3961
|
+
};
|
|
3962
|
+
var lo = (e, t) => e ? e === "desc" ? "asc" : "desc" : t ? "desc" : "asc";
|
|
3963
|
+
var Hn = (e, t) => {
|
|
3964
|
+
let n = e.querySelector(`.${Wt.dropdownToggle}`), i = e.querySelector(`.${Wt.dropdownList}`);
|
|
3965
|
+
if (!n || !i) return;
|
|
3966
|
+
yo(n, i);
|
|
3967
|
+
let a = ref(), o = go(n, a), r = ho(i, a);
|
|
3968
|
+
if (!r) return;
|
|
3969
|
+
let s = _n("a", { click: ({ event: l, el: u }) => {
|
|
3970
|
+
l.preventDefault();
|
|
3971
|
+
let d = u, p = r.get(d);
|
|
3972
|
+
!p || a.value?.element === d || (a.value = p, t.sorting.value = { fieldKey: p.fieldKey, direction: p.direction, interacted: true }, vo(n));
|
|
3973
|
+
} }, { root: i });
|
|
3974
|
+
return () => {
|
|
3975
|
+
o?.(), s();
|
|
3976
|
+
};
|
|
3977
|
+
};
|
|
3978
|
+
var ho = (e, t) => {
|
|
3979
|
+
let n = /* @__PURE__ */ new Map(), i = [...e.querySelectorAll("a")];
|
|
3980
|
+
if (i.length) {
|
|
3981
|
+
for (let a of i) {
|
|
3982
|
+
a.setAttribute(Mn, Dn.option);
|
|
3983
|
+
let o = y(a, "field")?.trim(), r, s;
|
|
3984
|
+
o && (o.endsWith("-asc") ? (s = "asc", r = o.slice(0, -4)) : o.endsWith("-desc") ? (s = "desc", r = o.slice(0, -5)) : (s = "asc", r = o));
|
|
3985
|
+
let l = effect(() => {
|
|
3986
|
+
t.value?.element === a ? (a.setAttribute(Un, "true"), a.classList.add(Ht)) : (a.removeAttribute(Un), a.classList.remove(Ht));
|
|
3987
|
+
});
|
|
3988
|
+
n.set(a, { element: a, fieldKey: r, direction: s, cleanup: () => l.effect.stop() });
|
|
3989
|
+
}
|
|
3990
|
+
return n;
|
|
3991
|
+
}
|
|
3992
|
+
};
|
|
3993
|
+
var go = (e, t) => {
|
|
3994
|
+
let n = v("dropdown-label", { scope: e });
|
|
3995
|
+
if (!n) return;
|
|
3996
|
+
let i = n.innerHTML, a = effect(() => {
|
|
3997
|
+
if (!t.value) {
|
|
3998
|
+
n.innerHTML = i;
|
|
3999
|
+
return;
|
|
4000
|
+
}
|
|
4001
|
+
n.innerHTML = t.value.element.innerHTML;
|
|
4002
|
+
});
|
|
4003
|
+
return () => a.effect.stop();
|
|
4004
|
+
};
|
|
4005
|
+
var yo = (e, t) => {
|
|
4006
|
+
e.setAttribute(Kn, Dn.listbox), t.setAttribute(Mn, Dn.listbox), t.setAttribute(Fn, "false");
|
|
4007
|
+
};
|
|
4008
|
+
var Nn = (e) => {
|
|
4009
|
+
let t = Object.keys(e.allFieldsData.value);
|
|
4010
|
+
return new RegExp(`sort_(${t.join("|")})$`);
|
|
4011
|
+
};
|
|
4012
|
+
var Bn = async (e) => {
|
|
4013
|
+
let t = _.size > 1, n = await e.getAllSearchParams(t), i = Nn(e), a = n.find(([u, d]) => u.match(i) && (d === "asc" || d === "desc"));
|
|
4014
|
+
if (!a) return;
|
|
4015
|
+
let [o, r] = a, s = o.match(i);
|
|
4016
|
+
if (!s) return;
|
|
4017
|
+
let l = s[1];
|
|
4018
|
+
e.sorting.value.fieldKey = l, e.sorting.value.direction = r, e.sorting.value.interacted = true;
|
|
4019
|
+
};
|
|
4020
|
+
var $n = async (e) => {
|
|
4021
|
+
let t = _.size > 1, n = await e.getAllSearchParams(t), i = Nn(e);
|
|
4022
|
+
for (let [s] of n) s.match(i) && await e.setSearchParam(s, null, { usePrefix: t });
|
|
4023
|
+
let { fieldKey: a, direction: o } = e.sorting.value;
|
|
4024
|
+
if (!a || !o) return;
|
|
4025
|
+
let r = `sort_${a}`;
|
|
4026
|
+
e.setSearchParam(r, o, { usePrefix: t });
|
|
4027
|
+
};
|
|
4028
|
+
var Un2 = (e, t) => {
|
|
4029
|
+
let n = (s = false) => {
|
|
4030
|
+
t.sorting.value = Eo(e.value, s);
|
|
4031
|
+
}, i = kn(e, "change", () => n(true));
|
|
4032
|
+
n();
|
|
4033
|
+
let a = e.closest("form"), r = G(e, "allowsubmit", "true") ? kn(a, "submit", vo2) : void 0;
|
|
4034
|
+
return () => {
|
|
4035
|
+
i(), r?.();
|
|
4036
|
+
};
|
|
4037
|
+
};
|
|
4038
|
+
var vo2 = (e) => (e.preventDefault(), e.stopImmediatePropagation(), false);
|
|
4039
|
+
var Eo = (e, t = false) => {
|
|
4040
|
+
let n, i;
|
|
4041
|
+
return e.endsWith("-asc") ? (i = "asc", n = e.slice(0, -4)) : e.endsWith("-desc") ? (i = "desc", n = e.slice(0, -5)) : (i = "asc", n = e), { fieldKey: n, direction: i, interacted: t };
|
|
4042
|
+
};
|
|
4043
|
+
var qn = (e, { fieldKey: t, direction: n }) => !!n && !!t && e.some(({ fields: o }) => t in o) ? [...e].sort((o, r) => {
|
|
4044
|
+
let s = o.fields[t], l = r.fields[t];
|
|
4045
|
+
if (!s) return 1;
|
|
4046
|
+
if (!l) return -1;
|
|
4047
|
+
if (s.type === "number" && l.type === "number") {
|
|
4048
|
+
let u = pe(s.value), d = pe(l.value);
|
|
4049
|
+
return isNaN(u) ? 1 : isNaN(d) ? -1 : n === "asc" ? u - d : d - u;
|
|
4050
|
+
}
|
|
4051
|
+
if (s.type === "date" && l.type === "date") {
|
|
4052
|
+
let u = pe(s.value).getTime(), d = pe(l.value).getTime();
|
|
4053
|
+
return n === "asc" ? u - d : d - u;
|
|
4054
|
+
}
|
|
4055
|
+
if (s.type === "text" && l.type === "text") {
|
|
4056
|
+
let u = pe(s.value), d = pe(l.value), p = { numeric: true, sensitivity: "base" };
|
|
4057
|
+
return n === "asc" ? u.localeCompare(d, void 0, p) : d.localeCompare(u, void 0, p);
|
|
4058
|
+
}
|
|
4059
|
+
return 0;
|
|
4060
|
+
}) : void 0;
|
|
4061
|
+
var pe = (e) => {
|
|
4062
|
+
let [t] = Array.isArray(e) ? e : [e];
|
|
4063
|
+
return t;
|
|
4064
|
+
};
|
|
4065
|
+
var Wn = (e, t) => {
|
|
4066
|
+
let n = e.options.sortingclass ?? "is-list-sorting", [i] = t, a = j(i), o = i.closest(`.${Wt.dropdown}`), r = a ? Un2(i, e) : o ? Hn(o, e) : Fn2(t, e), s = e.addHook("sort", (p) => qn(p, e.sorting.value)), l = e.addHook("beforeRender", async (p) => {
|
|
4067
|
+
if (e.triggeredHook === "sort") {
|
|
4068
|
+
e.wrapperElement.classList.add(n);
|
|
4069
|
+
let c = e.wrapperElement.getAnimations({ subtree: true });
|
|
4070
|
+
try {
|
|
4071
|
+
await Promise.all(c.map((m) => m.finished));
|
|
4072
|
+
} catch {
|
|
4073
|
+
}
|
|
4074
|
+
}
|
|
4075
|
+
return p;
|
|
4076
|
+
}), u = e.addHook("afterRender", (p) => (e.wrapperElement.classList.remove(n), p)), d = watch(e.sorting, (0, import_just_debounce.default)(() => {
|
|
4077
|
+
e.triggerHook("sort", { scrollToAnchor: e.hasInteracted.value, resetCurrentPage: e.hasInteracted.value }), e.showQuery && $n(e);
|
|
4078
|
+
}, 0), { deep: true, immediate: true });
|
|
4079
|
+
return Bn(e), () => {
|
|
4080
|
+
r?.(), s(), l(), u(), d();
|
|
4081
|
+
};
|
|
4082
|
+
};
|
|
4083
|
+
var jn = /* @__PURE__ */ new WeakSet();
|
|
4084
|
+
var zn = (e, t) => {
|
|
4085
|
+
let { interactiveItems: n, nonInteractiveItems: i } = t.reduce((o, r) => {
|
|
4086
|
+
let s = y(r, "position") - 1, l = y(r, "repeat"), u = y(r, "interactive"), d;
|
|
4087
|
+
if (jn.has(r)) {
|
|
4088
|
+
let p = F(r);
|
|
4089
|
+
d = e.createItem(p);
|
|
4090
|
+
} else d = e.createItem(r);
|
|
4091
|
+
return jn.add(r), u ? o.interactiveItems.push({ position: s, item: d }) : o.nonInteractiveItems.push({ position: s, item: d, repeat: l }), o;
|
|
4092
|
+
}, { interactiveItems: [], nonInteractiveItems: [] });
|
|
4093
|
+
n.sort((o, r) => o.position - r.position), i.sort((o, r) => o.position - r.position);
|
|
4094
|
+
let a = e.addHook("static", (o) => {
|
|
4095
|
+
let r = [...o];
|
|
4096
|
+
for (let { position: s, item: l, repeat: u } of i) {
|
|
4097
|
+
if (r.splice(s, 0, l), !u) continue;
|
|
4098
|
+
let d = s + u;
|
|
4099
|
+
for (; d < r.length; ) {
|
|
4100
|
+
let p = F(l.element), c = e.createItem(p);
|
|
4101
|
+
r.splice(d, 0, c), d += u;
|
|
4102
|
+
}
|
|
4103
|
+
}
|
|
4104
|
+
return r;
|
|
4105
|
+
});
|
|
4106
|
+
for (let { position: o, item: r } of n) e.items.value.splice(o, 0, r);
|
|
4107
|
+
return n.length ? triggerRef(e.items) : i.length && e.triggerHook("static"), a;
|
|
4108
|
+
};
|
|
4109
|
+
var Yn = (e, t) => {
|
|
4110
|
+
e.webflowModules.add("tabs");
|
|
4111
|
+
let n = t.map((i) => Mo2(e, i));
|
|
4112
|
+
return () => {
|
|
4113
|
+
for (let i of n) i?.();
|
|
4114
|
+
};
|
|
4115
|
+
};
|
|
4116
|
+
var Mo2 = (e, t) => {
|
|
4117
|
+
let n = t.closest(`.${$t.tabs}`);
|
|
4118
|
+
if (!n) return;
|
|
4119
|
+
let i = n.querySelector(`.${$t.tabsMenu}`);
|
|
4120
|
+
if (!i) return;
|
|
4121
|
+
let a = n.querySelector(`.${$t.tabsContent}`);
|
|
4122
|
+
if (!a) return;
|
|
4123
|
+
let o = n.querySelectorAll(`.${$t.tabLink}`);
|
|
4124
|
+
if (!o.length) return;
|
|
4125
|
+
let r = n.querySelectorAll(`.${$t.tabPane}`);
|
|
4126
|
+
if (!r.length) return;
|
|
4127
|
+
let s = o[0].classList.value, l = r[0].classList.value;
|
|
4128
|
+
for (let d of [...o, ...r]) d.remove();
|
|
4129
|
+
let u = /* @__PURE__ */ new Map();
|
|
4130
|
+
return e.addHook("beforeRender", (d = []) => {
|
|
4131
|
+
for (let p of d) {
|
|
4132
|
+
if (u.has(p.id)) continue;
|
|
4133
|
+
p.currentIndex = void 0, p.element.removeAttribute(Mn);
|
|
4134
|
+
let c = document.createElement("div");
|
|
4135
|
+
c.setAttribute("class", s);
|
|
4136
|
+
let m = document.createElement("div");
|
|
4137
|
+
m.setAttribute("class", l);
|
|
4138
|
+
let f = v("tab-link", { scope: p.element });
|
|
4139
|
+
f ? f = F(f) : (f = document.createElement("div"), f.innerHTML = 'Missing <strong>ad-list-element="tab-link"</strong>'), c.appendChild(f), i.appendChild(c), m.appendChild(p.element), a.appendChild(m), u.set(p.id, { tabLink: c, tabPane: m });
|
|
4140
|
+
}
|
|
4141
|
+
for (let [p, { tabLink: c, tabPane: m }] of u) d.some((f) => f.id === p) || (c?.remove(), m?.remove(), u.delete(p));
|
|
4142
|
+
return [...u.values()].forEach(({ tabLink: p, tabPane: c }, m) => {
|
|
4143
|
+
let f = `Tab ${m}`;
|
|
4144
|
+
p.dataset.wTab = f, c.dataset.wTab = f;
|
|
4145
|
+
}), e.renderedItems.clear(), [];
|
|
4146
|
+
}), e.triggerHook("beforeRender"), () => {
|
|
4147
|
+
u.clear();
|
|
4148
|
+
};
|
|
4149
|
+
};
|
|
4150
|
+
var Xn = (e) => {
|
|
4151
|
+
let t = F2(e, "wrapper");
|
|
4152
|
+
if (!t) return;
|
|
4153
|
+
let n = _.get(t);
|
|
4154
|
+
if (n) return n;
|
|
4155
|
+
let a = re().indexOf(t);
|
|
4156
|
+
if (a === -1) return;
|
|
4157
|
+
let o = zo(t, K2, Se, { includeGlobal: false }), r = new le(t, a, true, o);
|
|
4158
|
+
return _.set(t, r), r;
|
|
4159
|
+
};
|
|
4160
|
+
var Qn = (e) => {
|
|
4161
|
+
let { instance: t } = e, n = /* @__PURE__ */ new Set(), i = R("filters", { instance: t }).filter(rn);
|
|
4162
|
+
if (i.length) {
|
|
4163
|
+
let E = ln(e, i);
|
|
4164
|
+
n.add(E);
|
|
4165
|
+
}
|
|
4166
|
+
let a = R("sort-trigger", { instance: t });
|
|
4167
|
+
if (a.length) {
|
|
4168
|
+
let E = Wn(e, a);
|
|
4169
|
+
n.add(E);
|
|
4170
|
+
}
|
|
4171
|
+
let { load: o } = e.options;
|
|
4172
|
+
if (o && (o === "all" || o === "more" || o === "infinite" || o === "pagination")) {
|
|
4173
|
+
let E = Tn(e, o);
|
|
4174
|
+
n.add(E);
|
|
4175
|
+
}
|
|
4176
|
+
let { combine: r } = e.options;
|
|
4177
|
+
if (r) {
|
|
4178
|
+
let E = Et(e, r);
|
|
4179
|
+
n.add(E);
|
|
4180
|
+
}
|
|
4181
|
+
let s = Sn2(e);
|
|
4182
|
+
n.add(s);
|
|
4183
|
+
let l = I("list", { instance: t }), u = I("item", { instance: t }), d = `:is(${u}):not(:is(${l}) :is(${u}))`, p = document.querySelectorAll(d);
|
|
4184
|
+
if (p.length) {
|
|
4185
|
+
let E = zn(e, [...p]);
|
|
4186
|
+
n.add(E);
|
|
4187
|
+
}
|
|
4188
|
+
let c = R("slider", { instance: t });
|
|
4189
|
+
if (c.length) {
|
|
4190
|
+
let E = Mn2(e, c);
|
|
4191
|
+
n.add(E);
|
|
4192
|
+
}
|
|
4193
|
+
let m = R("tabs", { instance: t });
|
|
4194
|
+
if (m.length) {
|
|
4195
|
+
let E = Yn(e, m);
|
|
4196
|
+
n.add(E);
|
|
4197
|
+
}
|
|
4198
|
+
let f = R("select", { instance: t });
|
|
4199
|
+
if (f.length) {
|
|
4200
|
+
let E = xn2(e, f);
|
|
4201
|
+
n.add(E);
|
|
4202
|
+
}
|
|
4203
|
+
let L = v("previous-item", { instance: t }), h = v("next-item", { instance: t });
|
|
4204
|
+
return (L || h) && Cn(e, L, h), () => {
|
|
4205
|
+
for (let E of n) E?.();
|
|
4206
|
+
n.clear(), e.destroy();
|
|
4207
|
+
};
|
|
4208
|
+
};
|
|
4209
|
+
var gt2 = async () => {
|
|
4210
|
+
await rr();
|
|
4211
|
+
let e = Nt(), t = Bt(() => e.run()), n = { activeCount: 0, disabledCount: 0, guardFailedCount: 0, lastNonActivationReason: null }, i = async () => {
|
|
4212
|
+
let o = R("list"), r = [];
|
|
4213
|
+
for (let u of o) {
|
|
4214
|
+
let d = await Xt({ el: u, moduleKey: K2, includeGlobal: false, guardsRegistry: {}, readOptions: () => zo(u, K2, Se, { includeGlobal: false }), action: () => {
|
|
4215
|
+
let p = P("list"), c = [], m = u.parentElement?.closest(p);
|
|
4216
|
+
for (; m; ) c.push(m), m = m.parentElement?.closest(p);
|
|
4217
|
+
if (c.length > 0) {
|
|
4218
|
+
let h = j2(u);
|
|
4219
|
+
if (c.some((S) => {
|
|
4220
|
+
let C = j2(S);
|
|
4221
|
+
return h === C;
|
|
4222
|
+
})) return;
|
|
4223
|
+
}
|
|
4224
|
+
let L = Xn(u);
|
|
4225
|
+
L && r.push(L);
|
|
4226
|
+
} });
|
|
4227
|
+
d.ok ? n.activeCount += 1 : d.reason === "disabled" ? (n.disabledCount += 1, n.lastNonActivationReason = "disabled") : d.reason === "guard-failed" && (n.guardFailedCount += 1, n.lastNonActivationReason = "guard-failed");
|
|
4228
|
+
}
|
|
4229
|
+
let s = r.filter(ce);
|
|
4230
|
+
return s.map(Qn).forEach((u) => e.add(u)), s;
|
|
4231
|
+
};
|
|
4232
|
+
return { result: { lists: await i(), diagnostics: n }, destroy() {
|
|
4233
|
+
t();
|
|
4234
|
+
}, async restart() {
|
|
4235
|
+
e.run(), e = Nt(), t = Bt(() => e.run()), await i();
|
|
4236
|
+
} };
|
|
4237
|
+
};
|
|
4238
|
+
var Vo2 = "0.1.1";
|
|
4239
|
+
var Bu = wn({ key: K2, init: async (e) => {
|
|
4240
|
+
let t = Nt(), n = await gt2();
|
|
4241
|
+
n && typeof n.destroy == "function" && t.add(() => {
|
|
4242
|
+
try {
|
|
4243
|
+
n.destroy();
|
|
4244
|
+
} catch {
|
|
4245
|
+
}
|
|
4246
|
+
});
|
|
4247
|
+
let i = { key: K2, destroy: () => t.run() };
|
|
4248
|
+
return n && typeof n.restart == "function" ? { ...i, restart: async () => {
|
|
4249
|
+
try {
|
|
4250
|
+
await n.restart();
|
|
4251
|
+
} catch {
|
|
4252
|
+
}
|
|
4253
|
+
} } : i;
|
|
4254
|
+
} });
|
|
4255
|
+
export {
|
|
4256
|
+
We as ELEMENTS,
|
|
4257
|
+
le as List,
|
|
4258
|
+
ge as ListItem,
|
|
4259
|
+
K2 as MODULE_KEY,
|
|
4260
|
+
D as SETTINGS,
|
|
4261
|
+
Bu as default,
|
|
4262
|
+
gt2 as init,
|
|
4263
|
+
Vo2 as version
|
|
4264
|
+
};
|
|
4265
|
+
/*! Bundled license information:
|
|
4266
|
+
|
|
4267
|
+
@vue/shared/dist/shared.esm-bundler.js:
|
|
4268
|
+
(**
|
|
4269
|
+
* @vue/shared v3.5.27
|
|
4270
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4271
|
+
* @license MIT
|
|
4272
|
+
**)
|
|
4273
|
+
|
|
4274
|
+
@vue/reactivity/dist/reactivity.esm-bundler.js:
|
|
4275
|
+
(**
|
|
4276
|
+
* @vue/reactivity v3.5.27
|
|
4277
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4278
|
+
* @license MIT
|
|
4279
|
+
**)
|
|
4280
|
+
*/
|
|
4281
|
+
//# sourceMappingURL=dist-M6QCD7TL.js.map
|