@arenarium/maps 1.3.8 → 1.3.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.js +921 -919
- package/package.json +2 -2
package/dist/main.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
class
|
|
1
|
+
class Zt {
|
|
2
2
|
invoked = !1;
|
|
3
3
|
running = !1;
|
|
4
4
|
interval;
|
|
@@ -18,7 +18,7 @@ class Ht {
|
|
|
18
18
|
this.invoked = !1, this.running = !1, this.timeout && window.clearTimeout(this.timeout), this.timeout = void 0;
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
-
class
|
|
21
|
+
class Mi {
|
|
22
22
|
properites;
|
|
23
23
|
state;
|
|
24
24
|
constructor(e, n, r, i, s, a, u) {
|
|
@@ -36,7 +36,7 @@ class bi {
|
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
class
|
|
39
|
+
class Ei {
|
|
40
40
|
callback;
|
|
41
41
|
timeout;
|
|
42
42
|
id;
|
|
@@ -51,8 +51,8 @@ class _i {
|
|
|
51
51
|
this.id != null && (window.clearInterval(this.id), this.id = void 0);
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
const
|
|
55
|
-
class
|
|
54
|
+
const xi = 100;
|
|
55
|
+
class Si {
|
|
56
56
|
viewport = void 0;
|
|
57
57
|
state = "idle";
|
|
58
58
|
provider;
|
|
@@ -63,7 +63,7 @@ class Ei {
|
|
|
63
63
|
onIdle;
|
|
64
64
|
onClick;
|
|
65
65
|
constructor(e, n, r, i, s, a) {
|
|
66
|
-
this.provider = e, this.interval = new
|
|
66
|
+
this.provider = e, this.interval = new Ei(this.onInterval.bind(this), xi / (navigator?.hardwareConcurrency ?? 1)), this.onCancel = n, this.onError = r, this.onMove = i, this.onIdle = s, this.onClick = a;
|
|
67
67
|
}
|
|
68
68
|
start() {
|
|
69
69
|
this.interval.start(), this.provider.getContainer().addEventListener("click", this.onClick.bind(this));
|
|
@@ -87,7 +87,7 @@ class Ei {
|
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
|
-
class
|
|
90
|
+
class sr {
|
|
91
91
|
worker;
|
|
92
92
|
workerInvocations;
|
|
93
93
|
workerInvocationCounter = 0;
|
|
@@ -126,11 +126,11 @@ class We {
|
|
|
126
126
|
return new We([], []);
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
|
-
const
|
|
130
|
-
function
|
|
129
|
+
const ar = '(function(){"use strict";function w(l,t,e){return{x:T(t)*e,y:I(l)*e}}function m(l,t,e){return{lat:R(t/e),lng:P(l/e)}}function T(l){return(180+l)/360}function I(l){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+l*Math.PI/360)))/360}function P(l){return l*360-180}function R(l){return 360/Math.PI*Math.atan(Math.exp((180-l*360)*Math.PI/180))-90}class c{sw;ne;constructor(t,e,n,s){if(n<t)throw new Error(`Invalid bounds: ${t}, ${e}, ${n}, ${s}`);if(s<e)throw new Error(`Invalid bounds: ${t}, ${e}, ${n}, ${s}`);this.sw={lat:t,lng:e},this.ne={lat:n,lng:s}}contains(t,e){return!(t<this.sw.lat||this.ne.lat<t||e<this.sw.lng||this.ne.lng<e)}intersects(t){return!(t.ne.lat<this.sw.lat||this.ne.lat<t.sw.lat||t.ne.lng<this.sw.lng||this.ne.lng<t.sw.lng)}}class h{blockL;blockR;sw;ne;constructor(t,e,n,s){if(n<t)throw new Error(`Invalid bounds: ${t}, ${e}, ${n}, ${s}`);this.sw={lat:t,lng:e},this.ne={lat:n,lng:s},e<s?(this.blockL=new c(t,e,n,s),this.blockR=new c(0,0,0,0)):(this.blockL=new c(t,-180,n,s),this.blockR=new c(t,e,n,180))}static bounds(t){const e=t.bounds,n=t.center;return e.sw.lng<=n.lng&&e.ne.lng<=n.lng?{sw:{lat:e.sw.lat,lng:-180},ne:{lat:e.ne.lat,lng:180}}:e.sw.lng>=n.lng&&e.ne.lng>=n.lng?{sw:{lat:e.sw.lat,lng:-180},ne:{lat:e.ne.lat,lng:180}}:Math.abs(e.ne.lng-n.lng)+Math.abs(e.sw.lng-n.lng)>360?{sw:{lat:e.sw.lat,lng:-180},ne:{lat:e.ne.lat,lng:180}}:e.ne.lng-e.sw.lng>360?{sw:{lat:e.sw.lat,lng:-180},ne:{lat:e.ne.lat,lng:180}}:t.bounds}static create(t){const e=this.bounds(t),n=e.sw,s=e.ne;return new h(n.lat,n.lng,s.lat,s.lng)}static offset(t,e,n){const s=this.bounds(t),r=t.zoom,o=e*Math.pow(2,r),i=w(s.sw.lat,s.sw.lng,o),a=w(s.ne.lat,s.ne.lng,o);let g=Math.max(i.x-n.left,0),f=Math.min(i.y+n.bottom,o),D=Math.min(a.x+n.right,o),N=Math.max(a.y-n.top,0);const z=m(g,f,o),C=m(D,N,o);return new h(z.lat,z.lng,C.lat,C.lng)}contains(t,e){return this.blockL.contains(t,e)||this.blockR.contains(t,e)}intersects(t){return this.blockL.intersects(t)||this.blockR.intersects(t)}}class S{id;bounds;markers;constructor(t,e){this.id=t,this.bounds=e,this.markers=[]}belongs(t){const e=this.bounds.sw;if(t.lat<e.lat||t.lng<e.lng)return!1;const n=this.bounds.ne;return!(n.lat<t.lat||n.lng<t.lng)}neighbours(t,e){const n=Math.abs(t.id.length-this.id.length);if(n>e)return!1;const s=Math.min(this.id.length,t.id.length)-e+n;for(let r=0;r<s;r++)if(this.id[r]!=t.id[r])return!1;return!0}}class u{tree;zoom;cell;branches;constructor(t,e,n,s){this.tree=t,this.zoom=n,this.cell=new S(e,s),this.branches=new Array}split(){const t=this.cell.bounds,e=Math.pow(2,this.tree.depth),n=(t.ne.lat-t.sw.lat)/e,s=(t.ne.lng-t.sw.lng)/e;for(let r=0;r<e;r++)for(let o=0;o<e;o++){const i=t.sw.lat+r*n,a=t.sw.lng+o*s,g=i+n,f=a+s;this.branches.push(new u(this.tree,`${this.cell.id}${r*2+o}`,this.zoom+this.tree.depth,{sw:{lat:i,lng:a},ne:{lat:g,lng:f}}))}}add(t){if(this.cell.belongs(t)==!1)return!1;if(this.cell.markers.length<this.tree.capacity)return this.cell.markers.push(t),!0;this.branches.length==0&&this.split();for(let e=0;e<this.branches.length;e++)if(this.branches[e].add(t))return!0;throw new Error("Failed to add marker to branch")}compact(){if(this.branches.length==0)return;for(let s=0;s<this.branches.length;s++)this.branches[s].compact();const t=new Array,e=new Array;for(let s=0;s<this.branches.length;s++){const r=this.branches[s];t.push(...r.branches),e.push(...r.cell.markers)}const n=new u(this.tree,this.cell.id,this.zoom+this.tree.depth,this.cell.bounds);n.branches=t,n.cell.markers=e,this.branches=[n]}cells(t,e,n){if(t<this.zoom||e.intersects(this.cell.bounds)==!1)return n;n.push(this.cell);for(let s=0;s<this.branches.length;s++)this.branches[s].cells(t,e,n);return n}print(t){console.log(`${"---".repeat(t)}|${this.cell.id} zoom=[${this.zoom}] markers=[${this.cell.markers.length}]`);for(let e=0;e<this.branches.length;e++)this.branches[e].print(t+1)}count(){return this.cell.markers.length+this.branches.reduce((t,e)=>t+e.count(),0)}}class x{capacity;depth;root;constructor(t,e,n){this.capacity=n,this.depth=e,this.root=new u(this,"R",t,{sw:{lat:-90,lng:-180},ne:{lat:90,lng:180}})}add(t){return this.root.add(t)}compact(){this.root.compact()}cells(t,e){const n=new Array;return this.root.cells(t,e,n),n}print(){this.root.print(0)}}const A=16,p=2,k=1,M=A*4;let b,d,E=p,$=k,y=M;const v={update(l,t,e){const n=-Math.floor(Math.log2(l.mapSize/y)),s=new x(n,$,E);for(let o=0;o<t.length;o++){const i=t[o];if(!s.add(i))throw new Error("Failed to add marker to tree")}const r=-n;for(let o=0;o<r;o++)s.compact();b=s,d=e},configure(l){E=l?.process?.visibility?.cell?.capacity??p,$=l?.process?.visibility?.cell?.depth??k,y=l?.process?.visibility?.cell?.size??M},filter(l,t){if(!b||!d)return[];const e=h.create(t);let n=[],s=t.zoom;for(;s<l.zoomMax&&n.length<d;)n=b.cells(s,e).flatMap(r=>r.markers),s++;return n.map(r=>r.index)}};class _{methods;constructor(t){this.methods=t}listen(){self.onmessage=this.onmessage.bind(this)}async onmessage(t){const{id:e,method:n,args:s}=t.data;try{const r=this.methods[n];if(typeof r!="function")throw new Error(`Unknown method: ${n}`);const o=await r(...s),i={id:e,result:o};self.postMessage(i)}catch(r){const o=r instanceof Error?r.message:String(r),i={id:e,error:o};self.postMessage(i)}}}new _(v).listen()})();\n', Nn = typeof self < "u" && self.Blob && new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);", ar], { type: "text/javascript;charset=utf-8" });
|
|
130
|
+
function Pi(t) {
|
|
131
131
|
let e;
|
|
132
132
|
try {
|
|
133
|
-
if (e =
|
|
133
|
+
if (e = Nn && (self.URL || self.webkitURL).createObjectURL(Nn), !e) throw "";
|
|
134
134
|
const n = new Worker(e, {
|
|
135
135
|
name: t?.name
|
|
136
136
|
});
|
|
@@ -139,32 +139,32 @@ function xi(t) {
|
|
|
139
139
|
}), n;
|
|
140
140
|
} catch {
|
|
141
141
|
return new Worker(
|
|
142
|
-
"data:text/javascript;charset=utf-8," + encodeURIComponent(
|
|
142
|
+
"data:text/javascript;charset=utf-8," + encodeURIComponent(ar),
|
|
143
143
|
{
|
|
144
144
|
name: t?.name
|
|
145
145
|
}
|
|
146
146
|
);
|
|
147
147
|
}
|
|
148
148
|
}
|
|
149
|
-
function
|
|
150
|
-
return { x:
|
|
149
|
+
function at(t, e, n) {
|
|
150
|
+
return { x: Ti(e) * n, y: Ii(t) * n };
|
|
151
151
|
}
|
|
152
|
-
function
|
|
153
|
-
return { lat:
|
|
152
|
+
function Cn(t, e, n) {
|
|
153
|
+
return { lat: Ni(e / n), lng: Ai(t / n) };
|
|
154
154
|
}
|
|
155
|
-
function
|
|
155
|
+
function Ti(t) {
|
|
156
156
|
return (180 + t) / 360;
|
|
157
157
|
}
|
|
158
|
-
function
|
|
158
|
+
function Ii(t) {
|
|
159
159
|
return (180 - 180 / Math.PI * Math.log(Math.tan(Math.PI / 4 + t * Math.PI / 360))) / 360;
|
|
160
160
|
}
|
|
161
|
-
function
|
|
161
|
+
function Ai(t) {
|
|
162
162
|
return t * 360 - 180;
|
|
163
163
|
}
|
|
164
|
-
function
|
|
164
|
+
function Ni(t) {
|
|
165
165
|
return 360 / Math.PI * Math.atan(Math.exp((180 - t * 360) * Math.PI / 180)) - 90;
|
|
166
166
|
}
|
|
167
|
-
class
|
|
167
|
+
class _t {
|
|
168
168
|
sw;
|
|
169
169
|
ne;
|
|
170
170
|
constructor(e, n, r, i) {
|
|
@@ -179,22 +179,25 @@ class yt {
|
|
|
179
179
|
return !(e.ne.lat < this.sw.lat || this.ne.lat < e.sw.lat || e.ne.lng < this.sw.lng || this.ne.lng < e.sw.lng);
|
|
180
180
|
}
|
|
181
181
|
}
|
|
182
|
-
class
|
|
182
|
+
class ut {
|
|
183
183
|
blockL;
|
|
184
184
|
blockR;
|
|
185
185
|
sw;
|
|
186
186
|
ne;
|
|
187
187
|
constructor(e, n, r, i) {
|
|
188
188
|
if (r < e) throw new Error(`Invalid bounds: ${e}, ${n}, ${r}, ${i}`);
|
|
189
|
-
this.sw = { lat: e, lng: n }, this.ne = { lat: r, lng: i }, n < i ? (this.blockL = new
|
|
189
|
+
this.sw = { lat: e, lng: n }, this.ne = { lat: r, lng: i }, n < i ? (this.blockL = new _t(e, n, r, i), this.blockR = new _t(0, 0, 0, 0)) : (this.blockL = new _t(e, -180, r, i), this.blockR = new _t(e, n, r, 180));
|
|
190
190
|
}
|
|
191
191
|
static bounds(e) {
|
|
192
192
|
const n = e.bounds, r = e.center;
|
|
193
193
|
return n.sw.lng <= r.lng && n.ne.lng <= r.lng ? { sw: { lat: n.sw.lat, lng: -180 }, ne: { lat: n.ne.lat, lng: 180 } } : n.sw.lng >= r.lng && n.ne.lng >= r.lng ? { sw: { lat: n.sw.lat, lng: -180 }, ne: { lat: n.ne.lat, lng: 180 } } : Math.abs(n.ne.lng - r.lng) + Math.abs(n.sw.lng - r.lng) > 360 ? { sw: { lat: n.sw.lat, lng: -180 }, ne: { lat: n.ne.lat, lng: 180 } } : n.ne.lng - n.sw.lng > 360 ? { sw: { lat: n.sw.lat, lng: -180 }, ne: { lat: n.ne.lat, lng: 180 } } : e.bounds;
|
|
194
194
|
}
|
|
195
|
+
/**
|
|
196
|
+
* @param viewport - The viewport of the map.
|
|
197
|
+
*/
|
|
195
198
|
static create(e) {
|
|
196
199
|
const n = this.bounds(e), r = n.sw, i = n.ne;
|
|
197
|
-
return new
|
|
200
|
+
return new ut(r.lat, r.lng, i.lat, i.lng);
|
|
198
201
|
}
|
|
199
202
|
/**
|
|
200
203
|
* @param viewport - The viewport of the map.
|
|
@@ -203,10 +206,10 @@ class lt {
|
|
|
203
206
|
* @param offsetY - The y offset of the map in pixels at zoom level n.
|
|
204
207
|
*/
|
|
205
208
|
static offset(e, n, r) {
|
|
206
|
-
const i = this.bounds(e), s = e.zoom, a = n * Math.pow(2, s), u =
|
|
207
|
-
let l = Math.max(u.x - r.left, 0), c = Math.min(u.y + r.bottom, a), f = Math.min(o.x + r.right, a),
|
|
208
|
-
const m =
|
|
209
|
-
return new
|
|
209
|
+
const i = this.bounds(e), s = e.zoom, a = n * Math.pow(2, s), u = at(i.sw.lat, i.sw.lng, a), o = at(i.ne.lat, i.ne.lng, a);
|
|
210
|
+
let l = Math.max(u.x - r.left, 0), c = Math.min(u.y + r.bottom, a), f = Math.min(o.x + r.right, a), p = Math.max(o.y - r.top, 0);
|
|
211
|
+
const m = Cn(l, c, a), h = Cn(f, p, a);
|
|
212
|
+
return new ut(m.lat, m.lng, h.lat, h.lng);
|
|
210
213
|
}
|
|
211
214
|
contains(e, n) {
|
|
212
215
|
return this.blockL.contains(e, n) || this.blockR.contains(e, n);
|
|
@@ -215,16 +218,16 @@ class lt {
|
|
|
215
218
|
return this.blockL.intersects(e) || this.blockR.intersects(e);
|
|
216
219
|
}
|
|
217
220
|
}
|
|
218
|
-
const
|
|
219
|
-
class
|
|
221
|
+
const Ci = 75, Ri = 150, Rn = 25e-5, Di = 1e6, zi = 2e6, Dn = 3e6, or = 10, zn = 16, Oi = 8, On = 2, je = 0.5, Li = "0px 2px 2px rgba(0, 0, 0, 0.5)", Fi = 8, $i = 8, Vi = "drop-shadow(0px 2px 2px rgba(0, 0, 0, 0.5))", Ln = "white", ji = "darkgreen", Fn = 1024;
|
|
222
|
+
class Ui {
|
|
220
223
|
// State
|
|
221
224
|
markers;
|
|
222
225
|
markersVisible;
|
|
223
226
|
markerVisibilityTreeWorker;
|
|
224
227
|
markerVisibilityTreeWorkerClient;
|
|
225
|
-
markerVisibilityTreeLimit =
|
|
228
|
+
markerVisibilityTreeLimit = Fn;
|
|
226
229
|
set configuration(e) {
|
|
227
|
-
this.markerVisibilityTreeWorkerClient?.invoke("configure", e), this.markerVisibilityTreeLimit = e?.process?.visibility?.limit ??
|
|
230
|
+
this.markerVisibilityTreeWorkerClient?.invoke("configure", e), this.markerVisibilityTreeLimit = e?.process?.visibility?.limit ?? Fn;
|
|
228
231
|
}
|
|
229
232
|
getMarkers() {
|
|
230
233
|
return Array.from(this.markersVisible ?? []);
|
|
@@ -240,7 +243,7 @@ class $i {
|
|
|
240
243
|
return We.empty();
|
|
241
244
|
}
|
|
242
245
|
async updateMarkers(e, n) {
|
|
243
|
-
this.markers = n, n.length > this.markerVisibilityTreeLimit ? (this.markerVisibilityTreeWorker = new
|
|
246
|
+
this.markers = n, n.length > this.markerVisibilityTreeLimit ? (this.markerVisibilityTreeWorker = new Pi(), this.markerVisibilityTreeWorkerClient = new sr(this.markerVisibilityTreeWorker), await this.markerVisibilityTreeWorkerClient.invoke(
|
|
244
247
|
"update",
|
|
245
248
|
e,
|
|
246
249
|
n.map((r, i) => ({ index: i, lat: r.properites.lat, lng: r.properites.lng })),
|
|
@@ -251,56 +254,56 @@ class $i {
|
|
|
251
254
|
this.markers = void 0, this.markersVisible = void 0, this.markerVisibilityTreeWorker = void 0, this.markerVisibilityTreeWorkerClient = void 0;
|
|
252
255
|
}
|
|
253
256
|
}
|
|
254
|
-
const
|
|
255
|
-
var
|
|
256
|
-
const
|
|
257
|
+
const Qt = !1;
|
|
258
|
+
var Wi = Array.isArray, Bi = Array.prototype.indexOf, Ye = Array.prototype.includes, Hi = Array.from, qi = Object.defineProperty, ot = Object.getOwnPropertyDescriptor, Zi = Object.prototype, Yi = Array.prototype, Ji = Object.getPrototypeOf, $n = Object.isExtensible;
|
|
259
|
+
const Xi = () => {
|
|
257
260
|
};
|
|
258
|
-
function
|
|
261
|
+
function Ki(t) {
|
|
259
262
|
for (var e = 0; e < t.length; e++)
|
|
260
263
|
t[e]();
|
|
261
264
|
}
|
|
262
|
-
function
|
|
265
|
+
function lr() {
|
|
263
266
|
var t, e, n = new Promise((r, i) => {
|
|
264
267
|
t = r, e = i;
|
|
265
268
|
});
|
|
266
269
|
return { promise: n, resolve: t, reject: e };
|
|
267
270
|
}
|
|
268
|
-
const
|
|
271
|
+
const z = 2, pt = 4, Dt = 8, ur = 1 << 24, we = 16, Pe = 32, Fe = 64, en = 128, ee = 512, D = 1024, F = 2048, se = 4096, _e = 8192, Me = 16384, Je = 32768, Nt = 65536, Vn = 1 << 17, cr = 1 << 18, et = 1 << 19, Gi = 1 << 20, Le = 65536, tn = 1 << 21, on = 1 << 22, Ee = 1 << 23, Tt = /* @__PURE__ */ Symbol("$state"), Ne = new class extends Error {
|
|
269
272
|
name = "StaleReactionError";
|
|
270
273
|
message = "The reaction that called `getAbortSignal()` was re-run or destroyed";
|
|
271
274
|
}();
|
|
272
|
-
function
|
|
275
|
+
function Qi() {
|
|
273
276
|
throw new Error("https://svelte.dev/e/async_derived_orphan");
|
|
274
277
|
}
|
|
275
|
-
function
|
|
278
|
+
function es() {
|
|
276
279
|
throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
|
|
277
280
|
}
|
|
278
|
-
function
|
|
281
|
+
function ts() {
|
|
279
282
|
throw new Error("https://svelte.dev/e/state_descriptors_fixed");
|
|
280
283
|
}
|
|
281
|
-
function
|
|
284
|
+
function ns() {
|
|
282
285
|
throw new Error("https://svelte.dev/e/state_prototype_fixed");
|
|
283
286
|
}
|
|
284
|
-
function
|
|
287
|
+
function rs() {
|
|
285
288
|
throw new Error("https://svelte.dev/e/state_unsafe_mutation");
|
|
286
289
|
}
|
|
287
|
-
function
|
|
290
|
+
function is() {
|
|
288
291
|
throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror");
|
|
289
292
|
}
|
|
290
|
-
const
|
|
291
|
-
function
|
|
293
|
+
const R = /* @__PURE__ */ Symbol(), ss = "http://www.w3.org/1999/xhtml";
|
|
294
|
+
function as() {
|
|
292
295
|
console.warn("https://svelte.dev/e/svelte_boundary_reset_noop");
|
|
293
296
|
}
|
|
294
|
-
function
|
|
297
|
+
function fr(t) {
|
|
295
298
|
return t === this.v;
|
|
296
299
|
}
|
|
297
|
-
let
|
|
300
|
+
let os = !1, ae = null;
|
|
298
301
|
function Xe(t) {
|
|
299
|
-
|
|
302
|
+
ae = t;
|
|
300
303
|
}
|
|
301
|
-
function
|
|
302
|
-
|
|
303
|
-
p:
|
|
304
|
+
function ln(t, e = !1, n) {
|
|
305
|
+
ae = {
|
|
306
|
+
p: ae,
|
|
304
307
|
i: !1,
|
|
305
308
|
c: null,
|
|
306
309
|
e: null,
|
|
@@ -309,47 +312,47 @@ function an(t, e = !1, n) {
|
|
|
309
312
|
l: null
|
|
310
313
|
};
|
|
311
314
|
}
|
|
312
|
-
function
|
|
315
|
+
function un(t) {
|
|
313
316
|
var e = (
|
|
314
317
|
/** @type {ComponentContext} */
|
|
315
|
-
|
|
318
|
+
ae
|
|
316
319
|
), n = e.e;
|
|
317
320
|
if (n !== null) {
|
|
318
321
|
e.e = null;
|
|
319
322
|
for (var r of n)
|
|
320
|
-
|
|
323
|
+
As(r);
|
|
321
324
|
}
|
|
322
|
-
return t !== void 0 && (e.x = t), e.i = !0,
|
|
325
|
+
return t !== void 0 && (e.x = t), e.i = !0, ae = e.p, t ?? /** @type {T} */
|
|
323
326
|
{};
|
|
324
327
|
}
|
|
325
|
-
function
|
|
328
|
+
function hr() {
|
|
326
329
|
return !0;
|
|
327
330
|
}
|
|
328
331
|
let Ue = [];
|
|
329
|
-
function
|
|
332
|
+
function ls() {
|
|
330
333
|
var t = Ue;
|
|
331
|
-
Ue = [],
|
|
334
|
+
Ue = [], Ki(t);
|
|
332
335
|
}
|
|
333
336
|
function Re(t) {
|
|
334
337
|
if (Ue.length === 0) {
|
|
335
338
|
var e = Ue;
|
|
336
339
|
queueMicrotask(() => {
|
|
337
|
-
e === Ue &&
|
|
340
|
+
e === Ue && ls();
|
|
338
341
|
});
|
|
339
342
|
}
|
|
340
343
|
Ue.push(t);
|
|
341
344
|
}
|
|
342
|
-
function
|
|
343
|
-
var e =
|
|
345
|
+
function pr(t) {
|
|
346
|
+
var e = y;
|
|
344
347
|
if (e === null)
|
|
345
|
-
return k.f |=
|
|
346
|
-
if ((e.f & Je) === 0 && (e.f &
|
|
348
|
+
return k.f |= Ee, t;
|
|
349
|
+
if ((e.f & Je) === 0 && (e.f & pt) === 0)
|
|
347
350
|
throw t;
|
|
348
|
-
|
|
351
|
+
be(t, e);
|
|
349
352
|
}
|
|
350
|
-
function
|
|
353
|
+
function be(t, e) {
|
|
351
354
|
for (; e !== null; ) {
|
|
352
|
-
if ((e.f &
|
|
355
|
+
if ((e.f & en) !== 0) {
|
|
353
356
|
if ((e.f & Je) === 0)
|
|
354
357
|
throw t;
|
|
355
358
|
try {
|
|
@@ -363,27 +366,27 @@ function ye(t, e) {
|
|
|
363
366
|
}
|
|
364
367
|
throw t;
|
|
365
368
|
}
|
|
366
|
-
const
|
|
369
|
+
const us = -7169;
|
|
367
370
|
function S(t, e) {
|
|
368
|
-
t.f = t.f &
|
|
371
|
+
t.f = t.f & us | e;
|
|
369
372
|
}
|
|
370
|
-
function
|
|
371
|
-
(t.f &
|
|
373
|
+
function cn(t) {
|
|
374
|
+
(t.f & ee) !== 0 || t.deps === null ? S(t, D) : S(t, se);
|
|
372
375
|
}
|
|
373
|
-
function
|
|
376
|
+
function dr(t) {
|
|
374
377
|
if (t !== null)
|
|
375
378
|
for (const e of t)
|
|
376
|
-
(e.f &
|
|
379
|
+
(e.f & z) === 0 || (e.f & Le) === 0 || (e.f ^= Le, dr(
|
|
377
380
|
/** @type {Derived} */
|
|
378
381
|
e.deps
|
|
379
382
|
));
|
|
380
383
|
}
|
|
381
|
-
function
|
|
382
|
-
(t.f &
|
|
384
|
+
function mr(t, e, n) {
|
|
385
|
+
(t.f & F) !== 0 ? e.add(t) : (t.f & se) !== 0 && n.add(t), dr(t.deps), S(t, D);
|
|
383
386
|
}
|
|
384
|
-
const
|
|
385
|
-
let x = null,
|
|
386
|
-
class
|
|
387
|
+
const Mt = /* @__PURE__ */ new Set();
|
|
388
|
+
let x = null, re = null, G = [], fn = null, nn = !1;
|
|
389
|
+
class xe {
|
|
387
390
|
/**
|
|
388
391
|
* The current values of any sources that are updated in this batch
|
|
389
392
|
* They keys of this map are identical to `this.#previous`
|
|
@@ -461,9 +464,9 @@ class Ee {
|
|
|
461
464
|
if (n) {
|
|
462
465
|
this.#t.delete(e);
|
|
463
466
|
for (var r of n.d)
|
|
464
|
-
S(r,
|
|
467
|
+
S(r, F), ce(r);
|
|
465
468
|
for (r of n.m)
|
|
466
|
-
S(r,
|
|
469
|
+
S(r, se), ce(r);
|
|
467
470
|
}
|
|
468
471
|
}
|
|
469
472
|
/**
|
|
@@ -471,19 +474,19 @@ class Ee {
|
|
|
471
474
|
* @param {Effect[]} root_effects
|
|
472
475
|
*/
|
|
473
476
|
process(e) {
|
|
474
|
-
|
|
477
|
+
G = [], this.apply();
|
|
475
478
|
var n = [], r = [];
|
|
476
479
|
for (const i of e)
|
|
477
480
|
this.#l(i, n, r);
|
|
478
481
|
if (this.#u()) {
|
|
479
482
|
this.#c(r), this.#c(n);
|
|
480
483
|
for (const [i, s] of this.#t)
|
|
481
|
-
|
|
484
|
+
wr(i, s);
|
|
482
485
|
} else {
|
|
483
486
|
for (const i of this.#r) i();
|
|
484
|
-
this.#r.clear(), this.#i === 0 && this.#h(), x = null,
|
|
487
|
+
this.#r.clear(), this.#i === 0 && this.#h(), x = null, jn(r), jn(n), this.#s.clear(), this.#e.clear(), this.#n?.resolve();
|
|
485
488
|
}
|
|
486
|
-
|
|
489
|
+
re = null;
|
|
487
490
|
}
|
|
488
491
|
/**
|
|
489
492
|
* Traverse the effect tree, executing effects or stashing
|
|
@@ -493,11 +496,11 @@ class Ee {
|
|
|
493
496
|
* @param {Effect[]} render_effects
|
|
494
497
|
*/
|
|
495
498
|
#l(e, n, r) {
|
|
496
|
-
e.f ^=
|
|
499
|
+
e.f ^= D;
|
|
497
500
|
for (var i = e.first; i !== null; ) {
|
|
498
|
-
var s = i.f, a = (s & (
|
|
501
|
+
var s = i.f, a = (s & (Pe | Fe)) !== 0, u = a && (s & D) !== 0, o = u || (s & _e) !== 0 || this.#t.has(i);
|
|
499
502
|
if (!o && i.fn !== null) {
|
|
500
|
-
a ? i.f ^=
|
|
503
|
+
a ? i.f ^= D : (s & pt) !== 0 ? n.push(i) : dt(i) && ((s & we) !== 0 && this.#e.add(i), Ge(i));
|
|
501
504
|
var l = i.first;
|
|
502
505
|
if (l !== null) {
|
|
503
506
|
i = l;
|
|
@@ -519,7 +522,7 @@ class Ee {
|
|
|
519
522
|
*/
|
|
520
523
|
#c(e) {
|
|
521
524
|
for (var n = 0; n < e.length; n += 1)
|
|
522
|
-
|
|
525
|
+
mr(e[n], this.#s, this.#e);
|
|
523
526
|
}
|
|
524
527
|
/**
|
|
525
528
|
* Associate a change to a given source with the current
|
|
@@ -528,17 +531,17 @@ class Ee {
|
|
|
528
531
|
* @param {any} value
|
|
529
532
|
*/
|
|
530
533
|
capture(e, n) {
|
|
531
|
-
n !==
|
|
534
|
+
n !== R && !this.previous.has(e) && this.previous.set(e, n), (e.f & Ee) === 0 && (this.current.set(e, e.v), re?.set(e, e.v));
|
|
532
535
|
}
|
|
533
536
|
activate() {
|
|
534
537
|
x = this, this.apply();
|
|
535
538
|
}
|
|
536
539
|
deactivate() {
|
|
537
|
-
x === this && (x = null,
|
|
540
|
+
x === this && (x = null, re = null);
|
|
538
541
|
}
|
|
539
542
|
flush() {
|
|
540
|
-
if (this.activate(),
|
|
541
|
-
if (
|
|
543
|
+
if (this.activate(), G.length > 0) {
|
|
544
|
+
if (cs(), x !== null && x !== this)
|
|
542
545
|
return;
|
|
543
546
|
} else this.#i === 0 && this.process([]);
|
|
544
547
|
this.deactivate();
|
|
@@ -548,10 +551,10 @@ class Ee {
|
|
|
548
551
|
this.#p.clear();
|
|
549
552
|
}
|
|
550
553
|
#h() {
|
|
551
|
-
if (
|
|
554
|
+
if (Mt.size > 1) {
|
|
552
555
|
this.previous.clear();
|
|
553
|
-
var e =
|
|
554
|
-
for (const i of
|
|
556
|
+
var e = re, n = !0;
|
|
557
|
+
for (const i of Mt) {
|
|
555
558
|
if (i === this) {
|
|
556
559
|
n = !1;
|
|
557
560
|
continue;
|
|
@@ -569,23 +572,23 @@ class Ee {
|
|
|
569
572
|
continue;
|
|
570
573
|
const a = [...i.current.keys()].filter((u) => !this.current.has(u));
|
|
571
574
|
if (a.length > 0) {
|
|
572
|
-
var r =
|
|
573
|
-
|
|
575
|
+
var r = G;
|
|
576
|
+
G = [];
|
|
574
577
|
const u = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Map();
|
|
575
578
|
for (const l of s)
|
|
576
|
-
|
|
577
|
-
if (
|
|
579
|
+
vr(l, a, u, o);
|
|
580
|
+
if (G.length > 0) {
|
|
578
581
|
x = i, i.apply();
|
|
579
|
-
for (const l of
|
|
582
|
+
for (const l of G)
|
|
580
583
|
i.#l(l, [], []);
|
|
581
584
|
i.deactivate();
|
|
582
585
|
}
|
|
583
|
-
|
|
586
|
+
G = r;
|
|
584
587
|
}
|
|
585
588
|
}
|
|
586
|
-
x = null,
|
|
589
|
+
x = null, re = e;
|
|
587
590
|
}
|
|
588
|
-
this.#t.clear(),
|
|
591
|
+
this.#t.clear(), Mt.delete(this);
|
|
589
592
|
}
|
|
590
593
|
/**
|
|
591
594
|
*
|
|
@@ -600,14 +603,14 @@ class Ee {
|
|
|
600
603
|
*/
|
|
601
604
|
decrement(e) {
|
|
602
605
|
this.#i -= 1, e && (this.#o -= 1), !this.#a && (this.#a = !0, Re(() => {
|
|
603
|
-
this.#a = !1, this.#u() ?
|
|
606
|
+
this.#a = !1, this.#u() ? G.length > 0 && this.flush() : this.revive();
|
|
604
607
|
}));
|
|
605
608
|
}
|
|
606
609
|
revive() {
|
|
607
610
|
for (const e of this.#s)
|
|
608
|
-
this.#e.delete(e), S(e,
|
|
611
|
+
this.#e.delete(e), S(e, F), ce(e);
|
|
609
612
|
for (const e of this.#e)
|
|
610
|
-
S(e,
|
|
613
|
+
S(e, se), ce(e);
|
|
611
614
|
this.flush();
|
|
612
615
|
}
|
|
613
616
|
/** @param {() => void} fn */
|
|
@@ -619,12 +622,12 @@ class Ee {
|
|
|
619
622
|
this.#p.add(e);
|
|
620
623
|
}
|
|
621
624
|
settled() {
|
|
622
|
-
return (this.#n ??=
|
|
625
|
+
return (this.#n ??= lr()).promise;
|
|
623
626
|
}
|
|
624
627
|
static ensure() {
|
|
625
628
|
if (x === null) {
|
|
626
|
-
const e = x = new
|
|
627
|
-
|
|
629
|
+
const e = x = new xe();
|
|
630
|
+
Mt.add(x), Re(() => {
|
|
628
631
|
x === e && e.flush();
|
|
629
632
|
});
|
|
630
633
|
}
|
|
@@ -633,46 +636,46 @@ class Ee {
|
|
|
633
636
|
apply() {
|
|
634
637
|
}
|
|
635
638
|
}
|
|
636
|
-
function
|
|
637
|
-
|
|
639
|
+
function cs() {
|
|
640
|
+
nn = !0;
|
|
638
641
|
var t = null;
|
|
639
642
|
try {
|
|
640
|
-
for (var e = 0;
|
|
641
|
-
var n =
|
|
643
|
+
for (var e = 0; G.length > 0; ) {
|
|
644
|
+
var n = xe.ensure();
|
|
642
645
|
if (e++ > 1e3) {
|
|
643
646
|
var r, i;
|
|
644
|
-
|
|
647
|
+
fs();
|
|
645
648
|
}
|
|
646
|
-
n.process(
|
|
649
|
+
n.process(G), Se.clear();
|
|
647
650
|
}
|
|
648
651
|
} finally {
|
|
649
|
-
|
|
652
|
+
G = [], nn = !1, fn = null;
|
|
650
653
|
}
|
|
651
654
|
}
|
|
652
|
-
function
|
|
655
|
+
function fs() {
|
|
653
656
|
try {
|
|
654
|
-
|
|
657
|
+
es();
|
|
655
658
|
} catch (t) {
|
|
656
|
-
|
|
659
|
+
be(t, fn);
|
|
657
660
|
}
|
|
658
661
|
}
|
|
659
662
|
let ve = null;
|
|
660
|
-
function
|
|
663
|
+
function jn(t) {
|
|
661
664
|
var e = t.length;
|
|
662
665
|
if (e !== 0) {
|
|
663
666
|
for (var n = 0; n < e; ) {
|
|
664
667
|
var r = t[n++];
|
|
665
|
-
if ((r.f & (
|
|
666
|
-
|
|
668
|
+
if ((r.f & (Me | _e)) === 0 && dt(r) && (ve = /* @__PURE__ */ new Set(), Ge(r), r.deps === null && r.first === null && r.nodes === null && r.teardown === null && r.ac === null && Cr(r), ve?.size > 0)) {
|
|
669
|
+
Se.clear();
|
|
667
670
|
for (const i of ve) {
|
|
668
|
-
if ((i.f & (
|
|
671
|
+
if ((i.f & (Me | _e)) !== 0) continue;
|
|
669
672
|
const s = [i];
|
|
670
673
|
let a = i.parent;
|
|
671
674
|
for (; a !== null; )
|
|
672
675
|
ve.has(a) && (ve.delete(a), s.push(a)), a = a.parent;
|
|
673
676
|
for (let u = s.length - 1; u >= 0; u--) {
|
|
674
677
|
const o = s[u];
|
|
675
|
-
(o.f & (
|
|
678
|
+
(o.f & (Me | _e)) === 0 && Ge(o);
|
|
676
679
|
}
|
|
677
680
|
}
|
|
678
681
|
ve.clear();
|
|
@@ -681,30 +684,30 @@ function Vn(t) {
|
|
|
681
684
|
ve = null;
|
|
682
685
|
}
|
|
683
686
|
}
|
|
684
|
-
function
|
|
687
|
+
function vr(t, e, n, r) {
|
|
685
688
|
if (!n.has(t) && (n.add(t), t.reactions !== null))
|
|
686
689
|
for (const i of t.reactions) {
|
|
687
690
|
const s = i.f;
|
|
688
|
-
(s &
|
|
691
|
+
(s & z) !== 0 ? vr(
|
|
689
692
|
/** @type {Derived} */
|
|
690
693
|
i,
|
|
691
694
|
e,
|
|
692
695
|
n,
|
|
693
696
|
r
|
|
694
|
-
) : (s & (
|
|
697
|
+
) : (s & (on | we)) !== 0 && (s & F) === 0 && gr(i, e, r) && (S(i, F), ce(
|
|
695
698
|
/** @type {Effect} */
|
|
696
699
|
i
|
|
697
700
|
));
|
|
698
701
|
}
|
|
699
702
|
}
|
|
700
|
-
function
|
|
703
|
+
function gr(t, e, n) {
|
|
701
704
|
const r = n.get(t);
|
|
702
705
|
if (r !== void 0) return r;
|
|
703
706
|
if (t.deps !== null)
|
|
704
707
|
for (const i of t.deps) {
|
|
705
708
|
if (Ye.call(e, i))
|
|
706
709
|
return !0;
|
|
707
|
-
if ((i.f &
|
|
710
|
+
if ((i.f & z) !== 0 && gr(
|
|
708
711
|
/** @type {Derived} */
|
|
709
712
|
i,
|
|
710
713
|
e,
|
|
@@ -718,47 +721,47 @@ function vr(t, e, n) {
|
|
|
718
721
|
}
|
|
719
722
|
return n.set(t, !1), !1;
|
|
720
723
|
}
|
|
721
|
-
function
|
|
722
|
-
var e =
|
|
723
|
-
if (n?.is_pending && (t.f & (
|
|
724
|
+
function ce(t) {
|
|
725
|
+
var e = fn = t, n = e.b;
|
|
726
|
+
if (n?.is_pending && (t.f & (pt | Dt | ur)) !== 0 && (t.f & Je) === 0) {
|
|
724
727
|
n.defer_effect(t);
|
|
725
728
|
return;
|
|
726
729
|
}
|
|
727
730
|
for (; e.parent !== null; ) {
|
|
728
731
|
e = e.parent;
|
|
729
732
|
var r = e.f;
|
|
730
|
-
if (
|
|
733
|
+
if (nn && e === y && (r & we) !== 0 && (r & cr) === 0 && (r & Je) !== 0)
|
|
731
734
|
return;
|
|
732
|
-
if ((r & (Fe |
|
|
733
|
-
if ((r &
|
|
735
|
+
if ((r & (Fe | Pe)) !== 0) {
|
|
736
|
+
if ((r & D) === 0)
|
|
734
737
|
return;
|
|
735
|
-
e.f ^=
|
|
738
|
+
e.f ^= D;
|
|
736
739
|
}
|
|
737
740
|
}
|
|
738
|
-
|
|
741
|
+
G.push(e);
|
|
739
742
|
}
|
|
740
|
-
function
|
|
741
|
-
if (!((t.f &
|
|
742
|
-
(t.f &
|
|
743
|
+
function wr(t, e) {
|
|
744
|
+
if (!((t.f & Pe) !== 0 && (t.f & D) !== 0)) {
|
|
745
|
+
(t.f & F) !== 0 ? e.d.push(t) : (t.f & se) !== 0 && e.m.push(t), S(t, D);
|
|
743
746
|
for (var n = t.first; n !== null; )
|
|
744
|
-
|
|
747
|
+
wr(n, e), n = n.next;
|
|
745
748
|
}
|
|
746
749
|
}
|
|
747
|
-
function
|
|
748
|
-
let e = 0, n =
|
|
750
|
+
function hs(t) {
|
|
751
|
+
let e = 0, n = zt(0), r;
|
|
749
752
|
return () => {
|
|
750
|
-
|
|
753
|
+
dn() && (E(n), Ir(() => (e === 0 && (r = Q(() => t(() => lt(n)))), e += 1, () => {
|
|
751
754
|
Re(() => {
|
|
752
|
-
e -= 1, e === 0 && (r?.(), r = void 0,
|
|
755
|
+
e -= 1, e === 0 && (r?.(), r = void 0, lt(n));
|
|
753
756
|
});
|
|
754
757
|
})));
|
|
755
758
|
};
|
|
756
759
|
}
|
|
757
|
-
var
|
|
758
|
-
function
|
|
759
|
-
new
|
|
760
|
+
var ps = Nt | et;
|
|
761
|
+
function ds(t, e, n, r) {
|
|
762
|
+
new ms(t, e, n, r);
|
|
760
763
|
}
|
|
761
|
-
class
|
|
764
|
+
class ms {
|
|
762
765
|
/** @type {Boundary | null} */
|
|
763
766
|
parent;
|
|
764
767
|
is_pending = !1;
|
|
@@ -801,7 +804,7 @@ class hs {
|
|
|
801
804
|
* @type {Source<number> | null}
|
|
802
805
|
*/
|
|
803
806
|
#f = null;
|
|
804
|
-
#k =
|
|
807
|
+
#k = hs(() => (this.#f = zt(this.#u), () => {
|
|
805
808
|
this.#f = null;
|
|
806
809
|
}));
|
|
807
810
|
/**
|
|
@@ -814,13 +817,13 @@ class hs {
|
|
|
814
817
|
this.#r = e, this.#i = n, this.#o = (s) => {
|
|
815
818
|
var a = (
|
|
816
819
|
/** @type {Effect} */
|
|
817
|
-
|
|
820
|
+
y
|
|
818
821
|
);
|
|
819
|
-
a.b = this, a.f |=
|
|
822
|
+
a.b = this, a.f |= en, r(s);
|
|
820
823
|
}, this.parent = /** @type {Effect} */
|
|
821
|
-
|
|
824
|
+
y.b, this.transform_error = i ?? this.parent?.transform_error ?? ((s) => s), this.#n = Ds(() => {
|
|
822
825
|
this.#g();
|
|
823
|
-
},
|
|
826
|
+
}, ps);
|
|
824
827
|
}
|
|
825
828
|
#y() {
|
|
826
829
|
try {
|
|
@@ -846,8 +849,8 @@ class hs {
|
|
|
846
849
|
#_() {
|
|
847
850
|
const e = this.#i.pending;
|
|
848
851
|
e && (this.is_pending = !0, this.#e = Ae(() => e(this.#r)), Re(() => {
|
|
849
|
-
var n = this.#a = document.createDocumentFragment(), r =
|
|
850
|
-
n.append(r), this.#s = this.#v(() => (
|
|
852
|
+
var n = this.#a = document.createDocumentFragment(), r = Sr();
|
|
853
|
+
n.append(r), this.#s = this.#v(() => (xe.ensure(), Ae(() => this.#o(r)))), this.#l === 0 && (this.#r.before(n), this.#a = null, It(
|
|
851
854
|
/** @type {Effect} */
|
|
852
855
|
this.#e,
|
|
853
856
|
() => {
|
|
@@ -862,7 +865,7 @@ class hs {
|
|
|
862
865
|
this.#o(this.#r);
|
|
863
866
|
}), this.#l > 0) {
|
|
864
867
|
var e = this.#a = document.createDocumentFragment();
|
|
865
|
-
|
|
868
|
+
Ls(this.#s, e);
|
|
866
869
|
const n = (
|
|
867
870
|
/** @type {(anchor: Node) => void} */
|
|
868
871
|
this.#i.pending
|
|
@@ -877,9 +880,9 @@ class hs {
|
|
|
877
880
|
#m() {
|
|
878
881
|
this.is_pending = !1;
|
|
879
882
|
for (const e of this.#h)
|
|
880
|
-
S(e,
|
|
883
|
+
S(e, F), ce(e);
|
|
881
884
|
for (const e of this.#d)
|
|
882
|
-
S(e,
|
|
885
|
+
S(e, se), ce(e);
|
|
883
886
|
this.#h.clear(), this.#d.clear();
|
|
884
887
|
}
|
|
885
888
|
/**
|
|
@@ -887,7 +890,7 @@ class hs {
|
|
|
887
890
|
* @param {Effect} effect
|
|
888
891
|
*/
|
|
889
892
|
defer_effect(e) {
|
|
890
|
-
|
|
893
|
+
mr(e, this.#h, this.#d);
|
|
891
894
|
}
|
|
892
895
|
/**
|
|
893
896
|
* Returns `false` if the effect exists inside a boundary whose pending snippet is shown
|
|
@@ -904,14 +907,14 @@ class hs {
|
|
|
904
907
|
* @param {() => T} fn
|
|
905
908
|
*/
|
|
906
909
|
#v(e) {
|
|
907
|
-
var n =
|
|
908
|
-
|
|
910
|
+
var n = y, r = k, i = ae;
|
|
911
|
+
he(this.#n), ne(this.#n), Xe(this.#n.ctx);
|
|
909
912
|
try {
|
|
910
913
|
return e();
|
|
911
914
|
} catch (s) {
|
|
912
|
-
return
|
|
915
|
+
return pr(s), null;
|
|
913
916
|
} finally {
|
|
914
|
-
|
|
917
|
+
he(n), ne(r), Xe(i);
|
|
915
918
|
}
|
|
916
919
|
}
|
|
917
920
|
/**
|
|
@@ -924,7 +927,7 @@ class hs {
|
|
|
924
927
|
this.parent && this.parent.#w(e);
|
|
925
928
|
return;
|
|
926
929
|
}
|
|
927
|
-
this.#l += e, this.#l === 0 && (this.#m(), this.#e &&
|
|
930
|
+
this.#l += e, this.#l === 0 && (this.#m(), this.#e && It(this.#e, () => {
|
|
928
931
|
this.#e = null;
|
|
929
932
|
}), this.#a && (this.#r.before(this.#a), this.#a = null));
|
|
930
933
|
}
|
|
@@ -936,7 +939,7 @@ class hs {
|
|
|
936
939
|
*/
|
|
937
940
|
update_pending_count(e) {
|
|
938
941
|
this.#w(e), this.#u += e, !(!this.#f || this.#c) && (this.#c = !0, Re(() => {
|
|
939
|
-
this.#c = !1, this.#f &&
|
|
942
|
+
this.#c = !1, this.#f && Ct(this.#f, this.#u);
|
|
940
943
|
}));
|
|
941
944
|
}
|
|
942
945
|
get_effect_pending() {
|
|
@@ -951,40 +954,40 @@ class hs {
|
|
|
951
954
|
let r = this.#i.failed;
|
|
952
955
|
if (!n && !r)
|
|
953
956
|
throw e;
|
|
954
|
-
this.#s && (
|
|
957
|
+
this.#s && (fe(this.#s), this.#s = null), this.#e && (fe(this.#e), this.#e = null), this.#t && (fe(this.#t), this.#t = null);
|
|
955
958
|
var i = !1, s = !1;
|
|
956
959
|
const a = () => {
|
|
957
960
|
if (i) {
|
|
958
|
-
|
|
961
|
+
as();
|
|
959
962
|
return;
|
|
960
963
|
}
|
|
961
|
-
i = !0, s &&
|
|
964
|
+
i = !0, s && is(), this.#t !== null && It(this.#t, () => {
|
|
962
965
|
this.#t = null;
|
|
963
966
|
}), this.#v(() => {
|
|
964
|
-
|
|
967
|
+
xe.ensure(), this.#g();
|
|
965
968
|
});
|
|
966
969
|
}, u = (o) => {
|
|
967
970
|
try {
|
|
968
971
|
s = !0, n?.(o, a), s = !1;
|
|
969
972
|
} catch (l) {
|
|
970
|
-
|
|
973
|
+
be(l, this.#n && this.#n.parent);
|
|
971
974
|
}
|
|
972
975
|
r && (this.#t = this.#v(() => {
|
|
973
|
-
|
|
976
|
+
xe.ensure();
|
|
974
977
|
try {
|
|
975
978
|
return Ae(() => {
|
|
976
979
|
var l = (
|
|
977
980
|
/** @type {Effect} */
|
|
978
|
-
|
|
981
|
+
y
|
|
979
982
|
);
|
|
980
|
-
l.b = this, l.f |=
|
|
983
|
+
l.b = this, l.f |= en, r(
|
|
981
984
|
this.#r,
|
|
982
985
|
() => o,
|
|
983
986
|
() => a
|
|
984
987
|
);
|
|
985
988
|
});
|
|
986
989
|
} catch (l) {
|
|
987
|
-
return
|
|
990
|
+
return be(
|
|
988
991
|
l,
|
|
989
992
|
/** @type {Effect} */
|
|
990
993
|
this.#n.parent
|
|
@@ -997,20 +1000,20 @@ class hs {
|
|
|
997
1000
|
try {
|
|
998
1001
|
o = this.transform_error(e);
|
|
999
1002
|
} catch (l) {
|
|
1000
|
-
|
|
1003
|
+
be(l, this.#n && this.#n.parent);
|
|
1001
1004
|
return;
|
|
1002
1005
|
}
|
|
1003
1006
|
o !== null && typeof o == "object" && typeof /** @type {any} */
|
|
1004
1007
|
o.then == "function" ? o.then(
|
|
1005
1008
|
u,
|
|
1006
1009
|
/** @param {unknown} e */
|
|
1007
|
-
(l) =>
|
|
1010
|
+
(l) => be(l, this.#n && this.#n.parent)
|
|
1008
1011
|
) : u(o);
|
|
1009
1012
|
});
|
|
1010
1013
|
}
|
|
1011
1014
|
}
|
|
1012
|
-
function
|
|
1013
|
-
const i =
|
|
1015
|
+
function vs(t, e, n, r) {
|
|
1016
|
+
const i = ks;
|
|
1014
1017
|
var s = t.filter((f) => !f.settled);
|
|
1015
1018
|
if (n.length === 0 && s.length === 0) {
|
|
1016
1019
|
r(e.map(i));
|
|
@@ -1018,40 +1021,40 @@ function ps(t, e, n, r) {
|
|
|
1018
1021
|
}
|
|
1019
1022
|
var a = (
|
|
1020
1023
|
/** @type {Effect} */
|
|
1021
|
-
|
|
1022
|
-
), u =
|
|
1024
|
+
y
|
|
1025
|
+
), u = gs(), o = s.length === 1 ? s[0].promise : s.length > 1 ? Promise.all(s.map((f) => f.promise)) : null;
|
|
1023
1026
|
function l(f) {
|
|
1024
1027
|
u();
|
|
1025
1028
|
try {
|
|
1026
1029
|
r(f);
|
|
1027
|
-
} catch (
|
|
1028
|
-
(a.f &
|
|
1030
|
+
} catch (p) {
|
|
1031
|
+
(a.f & Me) === 0 && be(p, a);
|
|
1029
1032
|
}
|
|
1030
|
-
|
|
1033
|
+
rn();
|
|
1031
1034
|
}
|
|
1032
1035
|
if (n.length === 0) {
|
|
1033
1036
|
o.then(() => l(e.map(i)));
|
|
1034
1037
|
return;
|
|
1035
1038
|
}
|
|
1036
1039
|
function c() {
|
|
1037
|
-
u(), Promise.all(n.map((f) => /* @__PURE__ */
|
|
1040
|
+
u(), Promise.all(n.map((f) => /* @__PURE__ */ ys(f))).then((f) => l([...e.map(i), ...f])).catch((f) => be(f, a));
|
|
1038
1041
|
}
|
|
1039
1042
|
o ? o.then(c) : c();
|
|
1040
1043
|
}
|
|
1041
|
-
function
|
|
1042
|
-
var t =
|
|
1044
|
+
function gs() {
|
|
1045
|
+
var t = y, e = k, n = ae, r = x;
|
|
1043
1046
|
return function(s = !0) {
|
|
1044
|
-
|
|
1047
|
+
he(t), ne(e), Xe(n), s && r?.activate();
|
|
1045
1048
|
};
|
|
1046
1049
|
}
|
|
1047
|
-
function
|
|
1048
|
-
|
|
1050
|
+
function rn(t = !0) {
|
|
1051
|
+
he(null), ne(null), Xe(null), t && x?.deactivate();
|
|
1049
1052
|
}
|
|
1050
|
-
function
|
|
1053
|
+
function ws() {
|
|
1051
1054
|
var t = (
|
|
1052
1055
|
/** @type {Boundary} */
|
|
1053
1056
|
/** @type {Effect} */
|
|
1054
|
-
|
|
1057
|
+
y.b
|
|
1055
1058
|
), e = (
|
|
1056
1059
|
/** @type {Batch} */
|
|
1057
1060
|
x
|
|
@@ -1061,71 +1064,71 @@ function ms() {
|
|
|
1061
1064
|
};
|
|
1062
1065
|
}
|
|
1063
1066
|
// @__NO_SIDE_EFFECTS__
|
|
1064
|
-
function
|
|
1065
|
-
var e =
|
|
1067
|
+
function ks(t) {
|
|
1068
|
+
var e = z | F, n = k !== null && (k.f & z) !== 0 ? (
|
|
1066
1069
|
/** @type {Derived} */
|
|
1067
1070
|
k
|
|
1068
1071
|
) : null;
|
|
1069
|
-
return
|
|
1070
|
-
ctx:
|
|
1072
|
+
return y !== null && (y.f |= et), {
|
|
1073
|
+
ctx: ae,
|
|
1071
1074
|
deps: null,
|
|
1072
1075
|
effects: null,
|
|
1073
|
-
equals:
|
|
1076
|
+
equals: fr,
|
|
1074
1077
|
f: e,
|
|
1075
1078
|
fn: t,
|
|
1076
1079
|
reactions: null,
|
|
1077
1080
|
rv: 0,
|
|
1078
1081
|
v: (
|
|
1079
1082
|
/** @type {V} */
|
|
1080
|
-
|
|
1083
|
+
R
|
|
1081
1084
|
),
|
|
1082
1085
|
wv: 0,
|
|
1083
|
-
parent: n ??
|
|
1086
|
+
parent: n ?? y,
|
|
1084
1087
|
ac: null
|
|
1085
1088
|
};
|
|
1086
1089
|
}
|
|
1087
1090
|
// @__NO_SIDE_EFFECTS__
|
|
1088
|
-
function
|
|
1091
|
+
function ys(t, e, n) {
|
|
1089
1092
|
/** @type {Effect | null} */
|
|
1090
|
-
|
|
1093
|
+
y === null && Qi();
|
|
1091
1094
|
var i = (
|
|
1092
1095
|
/** @type {Promise<V>} */
|
|
1093
1096
|
/** @type {unknown} */
|
|
1094
1097
|
void 0
|
|
1095
|
-
), s =
|
|
1098
|
+
), s = zt(
|
|
1096
1099
|
/** @type {V} */
|
|
1097
|
-
|
|
1100
|
+
R
|
|
1098
1101
|
), a = !k, u = /* @__PURE__ */ new Map();
|
|
1099
|
-
return
|
|
1100
|
-
var o =
|
|
1102
|
+
return Rs(() => {
|
|
1103
|
+
var o = lr();
|
|
1101
1104
|
i = o.promise;
|
|
1102
1105
|
try {
|
|
1103
|
-
Promise.resolve(t()).then(o.resolve, o.reject).finally(
|
|
1104
|
-
} catch (
|
|
1105
|
-
o.reject(
|
|
1106
|
+
Promise.resolve(t()).then(o.resolve, o.reject).finally(rn);
|
|
1107
|
+
} catch (p) {
|
|
1108
|
+
o.reject(p), rn();
|
|
1106
1109
|
}
|
|
1107
1110
|
var l = (
|
|
1108
1111
|
/** @type {Batch} */
|
|
1109
1112
|
x
|
|
1110
1113
|
);
|
|
1111
1114
|
if (a) {
|
|
1112
|
-
var c =
|
|
1115
|
+
var c = ws();
|
|
1113
1116
|
u.get(l)?.reject(Ne), u.delete(l), u.set(l, o);
|
|
1114
1117
|
}
|
|
1115
|
-
const f = (
|
|
1118
|
+
const f = (p, m = void 0) => {
|
|
1116
1119
|
if (l.activate(), m)
|
|
1117
|
-
m !== Ne && (s.f |=
|
|
1120
|
+
m !== Ne && (s.f |= Ee, Ct(s, m));
|
|
1118
1121
|
else {
|
|
1119
|
-
(s.f &
|
|
1120
|
-
for (const [
|
|
1121
|
-
if (u.delete(
|
|
1122
|
+
(s.f & Ee) !== 0 && (s.f ^= Ee), Ct(s, p);
|
|
1123
|
+
for (const [h, v] of u) {
|
|
1124
|
+
if (u.delete(h), h === l) break;
|
|
1122
1125
|
v.reject(Ne);
|
|
1123
1126
|
}
|
|
1124
1127
|
}
|
|
1125
1128
|
c && c();
|
|
1126
1129
|
};
|
|
1127
|
-
o.promise.then(f, (
|
|
1128
|
-
}),
|
|
1130
|
+
o.promise.then(f, (p) => f(null, p || "unknown"));
|
|
1131
|
+
}), Is(() => {
|
|
1129
1132
|
for (const o of u.values())
|
|
1130
1133
|
o.reject(Ne);
|
|
1131
1134
|
}), new Promise((o) => {
|
|
@@ -1138,21 +1141,21 @@ function gs(t, e, n) {
|
|
|
1138
1141
|
l(i);
|
|
1139
1142
|
});
|
|
1140
1143
|
}
|
|
1141
|
-
function
|
|
1144
|
+
function bs(t) {
|
|
1142
1145
|
var e = t.effects;
|
|
1143
1146
|
if (e !== null) {
|
|
1144
1147
|
t.effects = null;
|
|
1145
1148
|
for (var n = 0; n < e.length; n += 1)
|
|
1146
|
-
|
|
1149
|
+
fe(
|
|
1147
1150
|
/** @type {Effect} */
|
|
1148
1151
|
e[n]
|
|
1149
1152
|
);
|
|
1150
1153
|
}
|
|
1151
1154
|
}
|
|
1152
|
-
function
|
|
1155
|
+
function _s(t) {
|
|
1153
1156
|
for (var e = t.parent; e !== null; ) {
|
|
1154
|
-
if ((e.f &
|
|
1155
|
-
return (e.f &
|
|
1157
|
+
if ((e.f & z) === 0)
|
|
1158
|
+
return (e.f & Me) === 0 ? (
|
|
1156
1159
|
/** @type {Effect} */
|
|
1157
1160
|
e
|
|
1158
1161
|
) : null;
|
|
@@ -1160,121 +1163,121 @@ function ks(t) {
|
|
|
1160
1163
|
}
|
|
1161
1164
|
return null;
|
|
1162
1165
|
}
|
|
1163
|
-
function
|
|
1164
|
-
var e, n =
|
|
1165
|
-
|
|
1166
|
+
function hn(t) {
|
|
1167
|
+
var e, n = y;
|
|
1168
|
+
he(_s(t));
|
|
1166
1169
|
try {
|
|
1167
|
-
t.f &= ~Le,
|
|
1170
|
+
t.f &= ~Le, bs(t), e = Lr(t);
|
|
1168
1171
|
} finally {
|
|
1169
|
-
|
|
1172
|
+
he(n);
|
|
1170
1173
|
}
|
|
1171
1174
|
return e;
|
|
1172
1175
|
}
|
|
1173
|
-
function
|
|
1174
|
-
var e =
|
|
1175
|
-
if (!t.equals(e) && (t.wv =
|
|
1176
|
-
S(t,
|
|
1176
|
+
function kr(t) {
|
|
1177
|
+
var e = hn(t);
|
|
1178
|
+
if (!t.equals(e) && (t.wv = zr(), (!x?.is_fork || t.deps === null) && (t.v = e, t.deps === null))) {
|
|
1179
|
+
S(t, D);
|
|
1177
1180
|
return;
|
|
1178
1181
|
}
|
|
1179
|
-
Ke || (
|
|
1182
|
+
Ke || (re !== null ? (dn() || x?.is_fork) && re.set(t, e) : cn(t));
|
|
1180
1183
|
}
|
|
1181
|
-
function
|
|
1184
|
+
function Ms(t) {
|
|
1182
1185
|
if (t.effects !== null)
|
|
1183
1186
|
for (const e of t.effects)
|
|
1184
|
-
(e.teardown || e.ac) && (e.teardown?.(), e.ac?.abort(Ne), e.teardown =
|
|
1187
|
+
(e.teardown || e.ac) && (e.teardown?.(), e.ac?.abort(Ne), e.teardown = Xi, e.ac = null, ct(e, 0), mn(e));
|
|
1185
1188
|
}
|
|
1186
|
-
function
|
|
1189
|
+
function yr(t) {
|
|
1187
1190
|
if (t.effects !== null)
|
|
1188
1191
|
for (const e of t.effects)
|
|
1189
1192
|
e.teardown && Ge(e);
|
|
1190
1193
|
}
|
|
1191
|
-
let
|
|
1192
|
-
const
|
|
1193
|
-
let
|
|
1194
|
-
function
|
|
1194
|
+
let sn = /* @__PURE__ */ new Set();
|
|
1195
|
+
const Se = /* @__PURE__ */ new Map();
|
|
1196
|
+
let br = !1;
|
|
1197
|
+
function zt(t, e) {
|
|
1195
1198
|
var n = {
|
|
1196
1199
|
f: 0,
|
|
1197
1200
|
// TODO ideally we could skip this altogether, but it causes type errors
|
|
1198
1201
|
v: t,
|
|
1199
1202
|
reactions: null,
|
|
1200
|
-
equals:
|
|
1203
|
+
equals: fr,
|
|
1201
1204
|
rv: 0,
|
|
1202
1205
|
wv: 0
|
|
1203
1206
|
};
|
|
1204
1207
|
return n;
|
|
1205
1208
|
}
|
|
1206
1209
|
// @__NO_SIDE_EFFECTS__
|
|
1207
|
-
function
|
|
1208
|
-
const n =
|
|
1209
|
-
return
|
|
1210
|
+
function V(t, e) {
|
|
1211
|
+
const n = zt(t);
|
|
1212
|
+
return Fs(n), n;
|
|
1210
1213
|
}
|
|
1211
|
-
function
|
|
1214
|
+
function U(t, e, n = !1) {
|
|
1212
1215
|
k !== null && // since we are untracking the function inside `$inspect.with` we need to add this check
|
|
1213
1216
|
// to ensure we error if state is set inside an inspect effect
|
|
1214
|
-
(!
|
|
1215
|
-
let r = n ?
|
|
1216
|
-
return
|
|
1217
|
+
(!ie || (k.f & Vn) !== 0) && hr() && (k.f & (z | we | on | Vn)) !== 0 && (te === null || !Ye.call(te, t)) && rs();
|
|
1218
|
+
let r = n ? rt(e) : e;
|
|
1219
|
+
return Ct(t, r);
|
|
1217
1220
|
}
|
|
1218
|
-
function
|
|
1221
|
+
function Ct(t, e) {
|
|
1219
1222
|
if (!t.equals(e)) {
|
|
1220
1223
|
var n = t.v;
|
|
1221
|
-
Ke ?
|
|
1222
|
-
var r =
|
|
1223
|
-
if (r.capture(t, n), (t.f &
|
|
1224
|
+
Ke ? Se.set(t, e) : Se.set(t, n), t.v = e;
|
|
1225
|
+
var r = xe.ensure();
|
|
1226
|
+
if (r.capture(t, n), (t.f & z) !== 0) {
|
|
1224
1227
|
const i = (
|
|
1225
1228
|
/** @type {Derived} */
|
|
1226
1229
|
t
|
|
1227
1230
|
);
|
|
1228
|
-
(t.f &
|
|
1231
|
+
(t.f & F) !== 0 && hn(i), cn(i);
|
|
1229
1232
|
}
|
|
1230
|
-
t.wv =
|
|
1233
|
+
t.wv = zr(), _r(t, F), y !== null && (y.f & D) !== 0 && (y.f & (Pe | Fe)) === 0 && (K === null ? $s([t]) : K.push(t)), !r.is_fork && sn.size > 0 && !br && Es();
|
|
1231
1234
|
}
|
|
1232
1235
|
return e;
|
|
1233
1236
|
}
|
|
1234
|
-
function
|
|
1235
|
-
|
|
1236
|
-
for (const t of
|
|
1237
|
-
(t.f &
|
|
1238
|
-
|
|
1237
|
+
function Es() {
|
|
1238
|
+
br = !1;
|
|
1239
|
+
for (const t of sn)
|
|
1240
|
+
(t.f & D) !== 0 && S(t, se), dt(t) && Ge(t);
|
|
1241
|
+
sn.clear();
|
|
1239
1242
|
}
|
|
1240
|
-
function
|
|
1241
|
-
|
|
1243
|
+
function lt(t) {
|
|
1244
|
+
U(t, t.v + 1);
|
|
1242
1245
|
}
|
|
1243
|
-
function
|
|
1246
|
+
function _r(t, e) {
|
|
1244
1247
|
var n = t.reactions;
|
|
1245
1248
|
if (n !== null)
|
|
1246
1249
|
for (var r = n.length, i = 0; i < r; i++) {
|
|
1247
|
-
var s = n[i], a = s.f, u = (a &
|
|
1248
|
-
if (u && S(s, e), (a &
|
|
1250
|
+
var s = n[i], a = s.f, u = (a & F) === 0;
|
|
1251
|
+
if (u && S(s, e), (a & z) !== 0) {
|
|
1249
1252
|
var o = (
|
|
1250
1253
|
/** @type {Derived} */
|
|
1251
1254
|
s
|
|
1252
1255
|
);
|
|
1253
|
-
|
|
1256
|
+
re?.delete(o), (a & Le) === 0 && (a & ee && (s.f |= Le), _r(o, se));
|
|
1254
1257
|
} else u && ((a & we) !== 0 && ve !== null && ve.add(
|
|
1255
1258
|
/** @type {Effect} */
|
|
1256
1259
|
s
|
|
1257
|
-
),
|
|
1260
|
+
), ce(
|
|
1258
1261
|
/** @type {Effect} */
|
|
1259
1262
|
s
|
|
1260
1263
|
));
|
|
1261
1264
|
}
|
|
1262
1265
|
}
|
|
1263
|
-
function
|
|
1264
|
-
if (typeof t != "object" || t === null ||
|
|
1266
|
+
function rt(t) {
|
|
1267
|
+
if (typeof t != "object" || t === null || Tt in t)
|
|
1265
1268
|
return t;
|
|
1266
|
-
const e =
|
|
1267
|
-
if (e !==
|
|
1269
|
+
const e = Ji(t);
|
|
1270
|
+
if (e !== Zi && e !== Yi)
|
|
1268
1271
|
return t;
|
|
1269
|
-
var n = /* @__PURE__ */ new Map(), r =
|
|
1272
|
+
var n = /* @__PURE__ */ new Map(), r = Wi(t), i = /* @__PURE__ */ V(0), s = De, a = (u) => {
|
|
1270
1273
|
if (De === s)
|
|
1271
1274
|
return u();
|
|
1272
1275
|
var o = k, l = De;
|
|
1273
|
-
|
|
1276
|
+
ne(null), Hn(s);
|
|
1274
1277
|
var c = u();
|
|
1275
|
-
return
|
|
1278
|
+
return ne(o), Hn(l), c;
|
|
1276
1279
|
};
|
|
1277
|
-
return r && n.set("length", /* @__PURE__ */
|
|
1280
|
+
return r && n.set("length", /* @__PURE__ */ V(
|
|
1278
1281
|
/** @type {any[]} */
|
|
1279
1282
|
t.length
|
|
1280
1283
|
)), new Proxy(
|
|
@@ -1282,34 +1285,34 @@ function nt(t) {
|
|
|
1282
1285
|
t,
|
|
1283
1286
|
{
|
|
1284
1287
|
defineProperty(u, o, l) {
|
|
1285
|
-
(!("value" in l) || l.configurable === !1 || l.enumerable === !1 || l.writable === !1) &&
|
|
1288
|
+
(!("value" in l) || l.configurable === !1 || l.enumerable === !1 || l.writable === !1) && ts();
|
|
1286
1289
|
var c = n.get(o);
|
|
1287
1290
|
return c === void 0 ? a(() => {
|
|
1288
|
-
var f = /* @__PURE__ */
|
|
1291
|
+
var f = /* @__PURE__ */ V(l.value);
|
|
1289
1292
|
return n.set(o, f), f;
|
|
1290
|
-
}) :
|
|
1293
|
+
}) : U(c, l.value, !0), !0;
|
|
1291
1294
|
},
|
|
1292
1295
|
deleteProperty(u, o) {
|
|
1293
1296
|
var l = n.get(o);
|
|
1294
1297
|
if (l === void 0) {
|
|
1295
1298
|
if (o in u) {
|
|
1296
|
-
const c = a(() => /* @__PURE__ */
|
|
1297
|
-
n.set(o, c),
|
|
1299
|
+
const c = a(() => /* @__PURE__ */ V(R));
|
|
1300
|
+
n.set(o, c), lt(i);
|
|
1298
1301
|
}
|
|
1299
1302
|
} else
|
|
1300
|
-
|
|
1303
|
+
U(l, R), lt(i);
|
|
1301
1304
|
return !0;
|
|
1302
1305
|
},
|
|
1303
1306
|
get(u, o, l) {
|
|
1304
|
-
if (o ===
|
|
1307
|
+
if (o === Tt)
|
|
1305
1308
|
return t;
|
|
1306
1309
|
var c = n.get(o), f = o in u;
|
|
1307
|
-
if (c === void 0 && (!f ||
|
|
1308
|
-
var m =
|
|
1309
|
-
return
|
|
1310
|
+
if (c === void 0 && (!f || ot(u, o)?.writable) && (c = a(() => {
|
|
1311
|
+
var m = rt(f ? u[o] : R), h = /* @__PURE__ */ V(m);
|
|
1312
|
+
return h;
|
|
1310
1313
|
}), n.set(o, c)), c !== void 0) {
|
|
1311
|
-
var
|
|
1312
|
-
return
|
|
1314
|
+
var p = E(c);
|
|
1315
|
+
return p === R ? void 0 : p;
|
|
1313
1316
|
}
|
|
1314
1317
|
return Reflect.get(u, o, l);
|
|
1315
1318
|
},
|
|
@@ -1319,138 +1322,138 @@ function nt(t) {
|
|
|
1319
1322
|
var c = n.get(o);
|
|
1320
1323
|
c && (l.value = E(c));
|
|
1321
1324
|
} else if (l === void 0) {
|
|
1322
|
-
var f = n.get(o),
|
|
1323
|
-
if (f !== void 0 &&
|
|
1325
|
+
var f = n.get(o), p = f?.v;
|
|
1326
|
+
if (f !== void 0 && p !== R)
|
|
1324
1327
|
return {
|
|
1325
1328
|
enumerable: !0,
|
|
1326
1329
|
configurable: !0,
|
|
1327
|
-
value:
|
|
1330
|
+
value: p,
|
|
1328
1331
|
writable: !0
|
|
1329
1332
|
};
|
|
1330
1333
|
}
|
|
1331
1334
|
return l;
|
|
1332
1335
|
},
|
|
1333
1336
|
has(u, o) {
|
|
1334
|
-
if (o ===
|
|
1337
|
+
if (o === Tt)
|
|
1335
1338
|
return !0;
|
|
1336
|
-
var l = n.get(o), c = l !== void 0 && l.v !==
|
|
1337
|
-
if (l !== void 0 ||
|
|
1339
|
+
var l = n.get(o), c = l !== void 0 && l.v !== R || Reflect.has(u, o);
|
|
1340
|
+
if (l !== void 0 || y !== null && (!c || ot(u, o)?.writable)) {
|
|
1338
1341
|
l === void 0 && (l = a(() => {
|
|
1339
|
-
var
|
|
1342
|
+
var p = c ? rt(u[o]) : R, m = /* @__PURE__ */ V(p);
|
|
1340
1343
|
return m;
|
|
1341
1344
|
}), n.set(o, l));
|
|
1342
1345
|
var f = E(l);
|
|
1343
|
-
if (f ===
|
|
1346
|
+
if (f === R)
|
|
1344
1347
|
return !1;
|
|
1345
1348
|
}
|
|
1346
1349
|
return c;
|
|
1347
1350
|
},
|
|
1348
1351
|
set(u, o, l, c) {
|
|
1349
|
-
var f = n.get(o),
|
|
1352
|
+
var f = n.get(o), p = o in u;
|
|
1350
1353
|
if (r && o === "length")
|
|
1351
1354
|
for (var m = l; m < /** @type {Source<number>} */
|
|
1352
1355
|
f.v; m += 1) {
|
|
1353
|
-
var
|
|
1354
|
-
|
|
1356
|
+
var h = n.get(m + "");
|
|
1357
|
+
h !== void 0 ? U(h, R) : m in u && (h = a(() => /* @__PURE__ */ V(R)), n.set(m + "", h));
|
|
1355
1358
|
}
|
|
1356
1359
|
if (f === void 0)
|
|
1357
|
-
(!
|
|
1360
|
+
(!p || ot(u, o)?.writable) && (f = a(() => /* @__PURE__ */ V(void 0)), U(f, rt(l)), n.set(o, f));
|
|
1358
1361
|
else {
|
|
1359
|
-
|
|
1360
|
-
var v = a(() =>
|
|
1361
|
-
|
|
1362
|
+
p = f.v !== R;
|
|
1363
|
+
var v = a(() => rt(l));
|
|
1364
|
+
U(f, v);
|
|
1362
1365
|
}
|
|
1363
|
-
var
|
|
1364
|
-
if (
|
|
1366
|
+
var b = Reflect.getOwnPropertyDescriptor(u, o);
|
|
1367
|
+
if (b?.set && b.set.call(c, l), !p) {
|
|
1365
1368
|
if (r && typeof o == "string") {
|
|
1366
|
-
var
|
|
1369
|
+
var C = (
|
|
1367
1370
|
/** @type {Source<number>} */
|
|
1368
1371
|
n.get("length")
|
|
1369
|
-
),
|
|
1370
|
-
Number.isInteger(
|
|
1372
|
+
), J = Number(o);
|
|
1373
|
+
Number.isInteger(J) && J >= C.v && U(C, J + 1);
|
|
1371
1374
|
}
|
|
1372
|
-
|
|
1375
|
+
lt(i);
|
|
1373
1376
|
}
|
|
1374
1377
|
return !0;
|
|
1375
1378
|
},
|
|
1376
1379
|
ownKeys(u) {
|
|
1377
1380
|
E(i);
|
|
1378
1381
|
var o = Reflect.ownKeys(u).filter((f) => {
|
|
1379
|
-
var
|
|
1380
|
-
return
|
|
1382
|
+
var p = n.get(f);
|
|
1383
|
+
return p === void 0 || p.v !== R;
|
|
1381
1384
|
});
|
|
1382
1385
|
for (var [l, c] of n)
|
|
1383
|
-
c.v !==
|
|
1386
|
+
c.v !== R && !(l in u) && o.push(l);
|
|
1384
1387
|
return o;
|
|
1385
1388
|
},
|
|
1386
1389
|
setPrototypeOf() {
|
|
1387
|
-
|
|
1390
|
+
ns();
|
|
1388
1391
|
}
|
|
1389
1392
|
}
|
|
1390
1393
|
);
|
|
1391
1394
|
}
|
|
1392
|
-
var
|
|
1393
|
-
function
|
|
1394
|
-
if (
|
|
1395
|
-
|
|
1395
|
+
var Un, Mr, Er, xr;
|
|
1396
|
+
function xs() {
|
|
1397
|
+
if (Un === void 0) {
|
|
1398
|
+
Un = window, Mr = /Firefox/.test(navigator.userAgent);
|
|
1396
1399
|
var t = Element.prototype, e = Node.prototype, n = Text.prototype;
|
|
1397
|
-
|
|
1400
|
+
Er = ot(e, "firstChild").get, xr = ot(e, "nextSibling").get, $n(t) && (t.__click = void 0, t.__className = void 0, t.__attributes = null, t.__style = void 0, t.__e = void 0), $n(n) && (n.__t = void 0);
|
|
1398
1401
|
}
|
|
1399
1402
|
}
|
|
1400
|
-
function
|
|
1403
|
+
function Sr(t = "") {
|
|
1401
1404
|
return document.createTextNode(t);
|
|
1402
1405
|
}
|
|
1403
1406
|
// @__NO_SIDE_EFFECTS__
|
|
1404
|
-
function
|
|
1407
|
+
function Pr(t) {
|
|
1405
1408
|
return (
|
|
1406
1409
|
/** @type {TemplateNode | null} */
|
|
1407
|
-
|
|
1410
|
+
Er.call(t)
|
|
1408
1411
|
);
|
|
1409
1412
|
}
|
|
1410
1413
|
// @__NO_SIDE_EFFECTS__
|
|
1411
|
-
function
|
|
1414
|
+
function pn(t) {
|
|
1412
1415
|
return (
|
|
1413
1416
|
/** @type {TemplateNode | null} */
|
|
1414
|
-
|
|
1417
|
+
xr.call(t)
|
|
1415
1418
|
);
|
|
1416
1419
|
}
|
|
1417
|
-
function
|
|
1418
|
-
return /* @__PURE__ */
|
|
1420
|
+
function Wn(t, e) {
|
|
1421
|
+
return /* @__PURE__ */ Pr(t);
|
|
1419
1422
|
}
|
|
1420
|
-
function
|
|
1423
|
+
function Ss(t, e = 1, n = !1) {
|
|
1421
1424
|
let r = t;
|
|
1422
1425
|
for (; e--; )
|
|
1423
1426
|
r = /** @type {TemplateNode} */
|
|
1424
|
-
/* @__PURE__ */
|
|
1427
|
+
/* @__PURE__ */ pn(r);
|
|
1425
1428
|
return r;
|
|
1426
1429
|
}
|
|
1427
|
-
function
|
|
1430
|
+
function Ps(t, e, n) {
|
|
1428
1431
|
return (
|
|
1429
1432
|
/** @type {T extends keyof HTMLElementTagNameMap ? HTMLElementTagNameMap[T] : Element} */
|
|
1430
|
-
document.createElementNS(
|
|
1433
|
+
document.createElementNS(ss, t, void 0)
|
|
1431
1434
|
);
|
|
1432
1435
|
}
|
|
1433
|
-
function
|
|
1434
|
-
var e = k, n =
|
|
1435
|
-
|
|
1436
|
+
function Tr(t) {
|
|
1437
|
+
var e = k, n = y;
|
|
1438
|
+
ne(null), he(null);
|
|
1436
1439
|
try {
|
|
1437
1440
|
return t();
|
|
1438
1441
|
} finally {
|
|
1439
|
-
|
|
1442
|
+
ne(e), he(n);
|
|
1440
1443
|
}
|
|
1441
1444
|
}
|
|
1442
|
-
function
|
|
1445
|
+
function Ts(t, e) {
|
|
1443
1446
|
var n = e.last;
|
|
1444
1447
|
n === null ? e.last = e.first = t : (n.next = t, t.prev = n, e.last = t);
|
|
1445
1448
|
}
|
|
1446
1449
|
function ke(t, e, n) {
|
|
1447
|
-
var r =
|
|
1448
|
-
r !== null && (r.f &
|
|
1450
|
+
var r = y;
|
|
1451
|
+
r !== null && (r.f & _e) !== 0 && (t |= _e);
|
|
1449
1452
|
var i = {
|
|
1450
|
-
ctx:
|
|
1453
|
+
ctx: ae,
|
|
1451
1454
|
deps: null,
|
|
1452
1455
|
nodes: null,
|
|
1453
|
-
f: t |
|
|
1456
|
+
f: t | F | ee,
|
|
1454
1457
|
first: null,
|
|
1455
1458
|
fn: e,
|
|
1456
1459
|
last: null,
|
|
@@ -1466,12 +1469,12 @@ function ke(t, e, n) {
|
|
|
1466
1469
|
try {
|
|
1467
1470
|
Ge(i);
|
|
1468
1471
|
} catch (u) {
|
|
1469
|
-
throw
|
|
1472
|
+
throw fe(i), u;
|
|
1470
1473
|
}
|
|
1471
|
-
else e !== null &&
|
|
1474
|
+
else e !== null && ce(i);
|
|
1472
1475
|
var s = i;
|
|
1473
1476
|
if (n && s.deps === null && s.teardown === null && s.nodes === null && s.first === s.last && // either `null`, or a singular child
|
|
1474
|
-
(s.f & et) === 0 && (s = s.first, (t & we) !== 0 && (t &
|
|
1477
|
+
(s.f & et) === 0 && (s = s.first, (t & we) !== 0 && (t & Nt) !== 0 && s !== null && (s.f |= Nt)), s !== null && (s.parent = r, r !== null && Ts(s, r), k !== null && (k.f & z) !== 0 && (t & Fe) === 0)) {
|
|
1475
1478
|
var a = (
|
|
1476
1479
|
/** @type {Derived} */
|
|
1477
1480
|
k
|
|
@@ -1480,105 +1483,105 @@ function ke(t, e, n) {
|
|
|
1480
1483
|
}
|
|
1481
1484
|
return i;
|
|
1482
1485
|
}
|
|
1483
|
-
function
|
|
1484
|
-
return k !== null && !
|
|
1486
|
+
function dn() {
|
|
1487
|
+
return k !== null && !ie;
|
|
1485
1488
|
}
|
|
1486
|
-
function
|
|
1487
|
-
const e = ke(
|
|
1488
|
-
return S(e,
|
|
1489
|
+
function Is(t) {
|
|
1490
|
+
const e = ke(Dt, null, !1);
|
|
1491
|
+
return S(e, D), e.teardown = t, e;
|
|
1489
1492
|
}
|
|
1490
|
-
function
|
|
1491
|
-
return ke(
|
|
1493
|
+
function As(t) {
|
|
1494
|
+
return ke(pt | Gi, t, !1);
|
|
1492
1495
|
}
|
|
1493
|
-
function
|
|
1494
|
-
|
|
1496
|
+
function Ns(t) {
|
|
1497
|
+
xe.ensure();
|
|
1495
1498
|
const e = ke(Fe | et, t, !0);
|
|
1496
1499
|
return (n = {}) => new Promise((r) => {
|
|
1497
|
-
n.outro ?
|
|
1498
|
-
|
|
1499
|
-
}) : (
|
|
1500
|
+
n.outro ? It(e, () => {
|
|
1501
|
+
fe(e), r(void 0);
|
|
1502
|
+
}) : (fe(e), r(void 0));
|
|
1500
1503
|
});
|
|
1501
1504
|
}
|
|
1502
|
-
function
|
|
1503
|
-
return ke(
|
|
1505
|
+
function Cs(t) {
|
|
1506
|
+
return ke(pt, t, !1);
|
|
1504
1507
|
}
|
|
1505
|
-
function
|
|
1506
|
-
return ke(
|
|
1508
|
+
function Rs(t) {
|
|
1509
|
+
return ke(on | et, t, !0);
|
|
1507
1510
|
}
|
|
1508
|
-
function
|
|
1509
|
-
return ke(
|
|
1511
|
+
function Ir(t, e = 0) {
|
|
1512
|
+
return ke(Dt | e, t, !0);
|
|
1510
1513
|
}
|
|
1511
|
-
function
|
|
1512
|
-
|
|
1513
|
-
ke(
|
|
1514
|
+
function Ar(t, e = [], n = [], r = []) {
|
|
1515
|
+
vs(r, e, n, (i) => {
|
|
1516
|
+
ke(Dt, () => t(...i.map(E)), !0);
|
|
1514
1517
|
});
|
|
1515
1518
|
}
|
|
1516
|
-
function
|
|
1519
|
+
function Ds(t, e = 0) {
|
|
1517
1520
|
var n = ke(we | e, t, !0);
|
|
1518
1521
|
return n;
|
|
1519
1522
|
}
|
|
1520
1523
|
function Ae(t) {
|
|
1521
|
-
return ke(
|
|
1524
|
+
return ke(Pe | et, t, !0);
|
|
1522
1525
|
}
|
|
1523
|
-
function
|
|
1526
|
+
function Nr(t) {
|
|
1524
1527
|
var e = t.teardown;
|
|
1525
1528
|
if (e !== null) {
|
|
1526
1529
|
const n = Ke, r = k;
|
|
1527
|
-
|
|
1530
|
+
Bn(!0), ne(null);
|
|
1528
1531
|
try {
|
|
1529
1532
|
e.call(null);
|
|
1530
1533
|
} finally {
|
|
1531
|
-
|
|
1534
|
+
Bn(n), ne(r);
|
|
1532
1535
|
}
|
|
1533
1536
|
}
|
|
1534
1537
|
}
|
|
1535
|
-
function
|
|
1538
|
+
function mn(t, e = !1) {
|
|
1536
1539
|
var n = t.first;
|
|
1537
1540
|
for (t.first = t.last = null; n !== null; ) {
|
|
1538
1541
|
const i = n.ac;
|
|
1539
|
-
i !== null &&
|
|
1542
|
+
i !== null && Tr(() => {
|
|
1540
1543
|
i.abort(Ne);
|
|
1541
1544
|
});
|
|
1542
1545
|
var r = n.next;
|
|
1543
|
-
(n.f & Fe) !== 0 ? n.parent = null :
|
|
1546
|
+
(n.f & Fe) !== 0 ? n.parent = null : fe(n, e), n = r;
|
|
1544
1547
|
}
|
|
1545
1548
|
}
|
|
1546
|
-
function
|
|
1549
|
+
function zs(t) {
|
|
1547
1550
|
for (var e = t.first; e !== null; ) {
|
|
1548
1551
|
var n = e.next;
|
|
1549
|
-
(e.f &
|
|
1552
|
+
(e.f & Pe) === 0 && fe(e), e = n;
|
|
1550
1553
|
}
|
|
1551
1554
|
}
|
|
1552
|
-
function
|
|
1555
|
+
function fe(t, e = !0) {
|
|
1553
1556
|
var n = !1;
|
|
1554
|
-
(e || (t.f &
|
|
1557
|
+
(e || (t.f & cr) !== 0) && t.nodes !== null && t.nodes.end !== null && (Os(
|
|
1555
1558
|
t.nodes.start,
|
|
1556
1559
|
/** @type {TemplateNode} */
|
|
1557
1560
|
t.nodes.end
|
|
1558
|
-
), n = !0),
|
|
1561
|
+
), n = !0), mn(t, e && !n), ct(t, 0), S(t, Me);
|
|
1559
1562
|
var r = t.nodes && t.nodes.t;
|
|
1560
1563
|
if (r !== null)
|
|
1561
1564
|
for (const s of r)
|
|
1562
1565
|
s.stop();
|
|
1563
|
-
|
|
1566
|
+
Nr(t);
|
|
1564
1567
|
var i = t.parent;
|
|
1565
|
-
i !== null && i.first !== null &&
|
|
1568
|
+
i !== null && i.first !== null && Cr(t), t.next = t.prev = t.teardown = t.ctx = t.deps = t.fn = t.nodes = t.ac = null;
|
|
1566
1569
|
}
|
|
1567
|
-
function
|
|
1570
|
+
function Os(t, e) {
|
|
1568
1571
|
for (; t !== null; ) {
|
|
1569
|
-
var n = t === e ? null : /* @__PURE__ */
|
|
1572
|
+
var n = t === e ? null : /* @__PURE__ */ pn(t);
|
|
1570
1573
|
t.remove(), t = n;
|
|
1571
1574
|
}
|
|
1572
1575
|
}
|
|
1573
|
-
function
|
|
1576
|
+
function Cr(t) {
|
|
1574
1577
|
var e = t.parent, n = t.prev, r = t.next;
|
|
1575
1578
|
n !== null && (n.next = r), r !== null && (r.prev = n), e !== null && (e.first === t && (e.first = r), e.last === t && (e.last = n));
|
|
1576
1579
|
}
|
|
1577
|
-
function
|
|
1580
|
+
function It(t, e, n = !0) {
|
|
1578
1581
|
var r = [];
|
|
1579
|
-
|
|
1582
|
+
Rr(t, r, !0);
|
|
1580
1583
|
var i = () => {
|
|
1581
|
-
n &&
|
|
1584
|
+
n && fe(t), e && e();
|
|
1582
1585
|
}, s = r.length;
|
|
1583
1586
|
if (s > 0) {
|
|
1584
1587
|
var a = () => --s || i();
|
|
@@ -1587,127 +1590,127 @@ function Pt(t, e, n = !0) {
|
|
|
1587
1590
|
} else
|
|
1588
1591
|
i();
|
|
1589
1592
|
}
|
|
1590
|
-
function
|
|
1591
|
-
if ((t.f &
|
|
1592
|
-
t.f ^=
|
|
1593
|
+
function Rr(t, e, n) {
|
|
1594
|
+
if ((t.f & _e) === 0) {
|
|
1595
|
+
t.f ^= _e;
|
|
1593
1596
|
var r = t.nodes && t.nodes.t;
|
|
1594
1597
|
if (r !== null)
|
|
1595
1598
|
for (const u of r)
|
|
1596
1599
|
(u.is_global || n) && e.push(u);
|
|
1597
1600
|
for (var i = t.first; i !== null; ) {
|
|
1598
|
-
var s = i.next, a = (i.f &
|
|
1601
|
+
var s = i.next, a = (i.f & Nt) !== 0 || // If this is a branch effect without a block effect parent,
|
|
1599
1602
|
// it means the parent block effect was pruned. In that case,
|
|
1600
1603
|
// transparency information was transferred to the branch effect.
|
|
1601
|
-
(i.f &
|
|
1602
|
-
|
|
1604
|
+
(i.f & Pe) !== 0 && (t.f & we) !== 0;
|
|
1605
|
+
Rr(i, e, a ? n : !1), i = s;
|
|
1603
1606
|
}
|
|
1604
1607
|
}
|
|
1605
1608
|
}
|
|
1606
|
-
function
|
|
1609
|
+
function Ls(t, e) {
|
|
1607
1610
|
if (t.nodes)
|
|
1608
1611
|
for (var n = t.nodes.start, r = t.nodes.end; n !== null; ) {
|
|
1609
|
-
var i = n === r ? null : /* @__PURE__ */
|
|
1612
|
+
var i = n === r ? null : /* @__PURE__ */ pn(n);
|
|
1610
1613
|
e.append(n), n = i;
|
|
1611
1614
|
}
|
|
1612
1615
|
}
|
|
1613
|
-
let
|
|
1614
|
-
function
|
|
1616
|
+
let At = !1, Ke = !1;
|
|
1617
|
+
function Bn(t) {
|
|
1615
1618
|
Ke = t;
|
|
1616
1619
|
}
|
|
1617
|
-
let k = null,
|
|
1618
|
-
function
|
|
1620
|
+
let k = null, ie = !1;
|
|
1621
|
+
function ne(t) {
|
|
1619
1622
|
k = t;
|
|
1620
1623
|
}
|
|
1621
|
-
let
|
|
1622
|
-
function
|
|
1623
|
-
|
|
1624
|
+
let y = null;
|
|
1625
|
+
function he(t) {
|
|
1626
|
+
y = t;
|
|
1624
1627
|
}
|
|
1625
|
-
let
|
|
1626
|
-
function
|
|
1627
|
-
k !== null && (
|
|
1628
|
+
let te = null;
|
|
1629
|
+
function Fs(t) {
|
|
1630
|
+
k !== null && (te === null ? te = [t] : te.push(t));
|
|
1628
1631
|
}
|
|
1629
|
-
let
|
|
1630
|
-
function
|
|
1631
|
-
|
|
1632
|
+
let j = null, Z = 0, K = null;
|
|
1633
|
+
function $s(t) {
|
|
1634
|
+
K = t;
|
|
1632
1635
|
}
|
|
1633
|
-
let
|
|
1634
|
-
function
|
|
1636
|
+
let Dr = 1, Ce = 0, De = Ce;
|
|
1637
|
+
function Hn(t) {
|
|
1635
1638
|
De = t;
|
|
1636
1639
|
}
|
|
1637
|
-
function
|
|
1638
|
-
return ++
|
|
1640
|
+
function zr() {
|
|
1641
|
+
return ++Dr;
|
|
1639
1642
|
}
|
|
1640
|
-
function
|
|
1643
|
+
function dt(t) {
|
|
1641
1644
|
var e = t.f;
|
|
1642
|
-
if ((e &
|
|
1645
|
+
if ((e & F) !== 0)
|
|
1643
1646
|
return !0;
|
|
1644
|
-
if (e &
|
|
1647
|
+
if (e & z && (t.f &= ~Le), (e & se) !== 0) {
|
|
1645
1648
|
for (var n = (
|
|
1646
1649
|
/** @type {Value[]} */
|
|
1647
1650
|
t.deps
|
|
1648
1651
|
), r = n.length, i = 0; i < r; i++) {
|
|
1649
1652
|
var s = n[i];
|
|
1650
|
-
if (
|
|
1653
|
+
if (dt(
|
|
1651
1654
|
/** @type {Derived} */
|
|
1652
1655
|
s
|
|
1653
|
-
) &&
|
|
1656
|
+
) && kr(
|
|
1654
1657
|
/** @type {Derived} */
|
|
1655
1658
|
s
|
|
1656
1659
|
), s.wv > t.wv)
|
|
1657
1660
|
return !0;
|
|
1658
1661
|
}
|
|
1659
|
-
(e &
|
|
1662
|
+
(e & ee) !== 0 && // During time traveling we don't want to reset the status so that
|
|
1660
1663
|
// traversal of the graph in the other batches still happens
|
|
1661
|
-
|
|
1664
|
+
re === null && S(t, D);
|
|
1662
1665
|
}
|
|
1663
1666
|
return !1;
|
|
1664
1667
|
}
|
|
1665
|
-
function
|
|
1668
|
+
function Or(t, e, n = !0) {
|
|
1666
1669
|
var r = t.reactions;
|
|
1667
|
-
if (r !== null && !(
|
|
1670
|
+
if (r !== null && !(te !== null && Ye.call(te, t)))
|
|
1668
1671
|
for (var i = 0; i < r.length; i++) {
|
|
1669
1672
|
var s = r[i];
|
|
1670
|
-
(s.f &
|
|
1673
|
+
(s.f & z) !== 0 ? Or(
|
|
1671
1674
|
/** @type {Derived} */
|
|
1672
1675
|
s,
|
|
1673
1676
|
e,
|
|
1674
1677
|
!1
|
|
1675
|
-
) : e === s && (n ? S(s,
|
|
1678
|
+
) : e === s && (n ? S(s, F) : (s.f & D) !== 0 && S(s, se), ce(
|
|
1676
1679
|
/** @type {Effect} */
|
|
1677
1680
|
s
|
|
1678
1681
|
));
|
|
1679
1682
|
}
|
|
1680
1683
|
}
|
|
1681
|
-
function
|
|
1682
|
-
var e =
|
|
1683
|
-
|
|
1684
|
-
null,
|
|
1684
|
+
function Lr(t) {
|
|
1685
|
+
var e = j, n = Z, r = K, i = k, s = te, a = ae, u = ie, o = De, l = t.f;
|
|
1686
|
+
j = /** @type {null | Value[]} */
|
|
1687
|
+
null, Z = 0, K = null, k = (l & (Pe | Fe)) === 0 ? t : null, te = null, Xe(t.ctx), ie = !1, De = ++Ce, t.ac !== null && (Tr(() => {
|
|
1685
1688
|
t.ac.abort(Ne);
|
|
1686
1689
|
}), t.ac = null);
|
|
1687
1690
|
try {
|
|
1688
|
-
t.f |=
|
|
1691
|
+
t.f |= tn;
|
|
1689
1692
|
var c = (
|
|
1690
1693
|
/** @type {Function} */
|
|
1691
1694
|
t.fn
|
|
1692
1695
|
), f = c();
|
|
1693
1696
|
t.f |= Je;
|
|
1694
|
-
var
|
|
1695
|
-
if (
|
|
1696
|
-
var
|
|
1697
|
-
if (m ||
|
|
1698
|
-
for (
|
|
1699
|
-
|
|
1697
|
+
var p = t.deps, m = x?.is_fork;
|
|
1698
|
+
if (j !== null) {
|
|
1699
|
+
var h;
|
|
1700
|
+
if (m || ct(t, Z), p !== null && Z > 0)
|
|
1701
|
+
for (p.length = Z + j.length, h = 0; h < j.length; h++)
|
|
1702
|
+
p[Z + h] = j[h];
|
|
1700
1703
|
else
|
|
1701
|
-
t.deps =
|
|
1702
|
-
if (
|
|
1703
|
-
for (
|
|
1704
|
-
(h
|
|
1705
|
-
} else !m &&
|
|
1706
|
-
if (
|
|
1707
|
-
for (
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1704
|
+
t.deps = p = j;
|
|
1705
|
+
if (dn() && (t.f & ee) !== 0)
|
|
1706
|
+
for (h = Z; h < p.length; h++)
|
|
1707
|
+
(p[h].reactions ??= []).push(t);
|
|
1708
|
+
} else !m && p !== null && Z < p.length && (ct(t, Z), p.length = Z);
|
|
1709
|
+
if (hr() && K !== null && !ie && p !== null && (t.f & (z | se | F)) === 0)
|
|
1710
|
+
for (h = 0; h < /** @type {Source[]} */
|
|
1711
|
+
K.length; h++)
|
|
1712
|
+
Or(
|
|
1713
|
+
K[h],
|
|
1711
1714
|
/** @type {Effect} */
|
|
1712
1715
|
t
|
|
1713
1716
|
);
|
|
@@ -1718,67 +1721,67 @@ function Or(t) {
|
|
|
1718
1721
|
if (e !== null)
|
|
1719
1722
|
for (const v of e)
|
|
1720
1723
|
v.rv = Ce;
|
|
1721
|
-
|
|
1722
|
-
|
|
1724
|
+
K !== null && (r === null ? r = K : r.push(.../** @type {Source[]} */
|
|
1725
|
+
K));
|
|
1723
1726
|
}
|
|
1724
|
-
return (t.f &
|
|
1727
|
+
return (t.f & Ee) !== 0 && (t.f ^= Ee), f;
|
|
1725
1728
|
} catch (v) {
|
|
1726
|
-
return
|
|
1729
|
+
return pr(v);
|
|
1727
1730
|
} finally {
|
|
1728
|
-
t.f ^=
|
|
1731
|
+
t.f ^= tn, j = e, Z = n, K = r, k = i, te = s, Xe(a), ie = u, De = o;
|
|
1729
1732
|
}
|
|
1730
1733
|
}
|
|
1731
|
-
function
|
|
1734
|
+
function Vs(t, e) {
|
|
1732
1735
|
let n = e.reactions;
|
|
1733
1736
|
if (n !== null) {
|
|
1734
|
-
var r =
|
|
1737
|
+
var r = Bi.call(n, t);
|
|
1735
1738
|
if (r !== -1) {
|
|
1736
1739
|
var i = n.length - 1;
|
|
1737
1740
|
i === 0 ? n = e.reactions = null : (n[r] = n[i], n.pop());
|
|
1738
1741
|
}
|
|
1739
1742
|
}
|
|
1740
|
-
if (n === null && (e.f &
|
|
1743
|
+
if (n === null && (e.f & z) !== 0 && // Destroying a child effect while updating a parent effect can cause a dependency to appear
|
|
1741
1744
|
// to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`
|
|
1742
1745
|
// allows us to skip the expensive work of disconnecting and immediately reconnecting it
|
|
1743
|
-
(
|
|
1746
|
+
(j === null || !Ye.call(j, e))) {
|
|
1744
1747
|
var s = (
|
|
1745
1748
|
/** @type {Derived} */
|
|
1746
1749
|
e
|
|
1747
1750
|
);
|
|
1748
|
-
(s.f &
|
|
1751
|
+
(s.f & ee) !== 0 && (s.f ^= ee, s.f &= ~Le), cn(s), Ms(s), ct(s, 0);
|
|
1749
1752
|
}
|
|
1750
1753
|
}
|
|
1751
|
-
function
|
|
1754
|
+
function ct(t, e) {
|
|
1752
1755
|
var n = t.deps;
|
|
1753
1756
|
if (n !== null)
|
|
1754
1757
|
for (var r = e; r < n.length; r++)
|
|
1755
|
-
|
|
1758
|
+
Vs(t, n[r]);
|
|
1756
1759
|
}
|
|
1757
1760
|
function Ge(t) {
|
|
1758
1761
|
var e = t.f;
|
|
1759
|
-
if ((e &
|
|
1760
|
-
S(t,
|
|
1761
|
-
var n =
|
|
1762
|
-
|
|
1762
|
+
if ((e & Me) === 0) {
|
|
1763
|
+
S(t, D);
|
|
1764
|
+
var n = y, r = At;
|
|
1765
|
+
y = t, At = !0;
|
|
1763
1766
|
try {
|
|
1764
|
-
(e & (we |
|
|
1765
|
-
var i =
|
|
1766
|
-
t.teardown = typeof i == "function" ? i : null, t.wv =
|
|
1767
|
+
(e & (we | ur)) !== 0 ? zs(t) : mn(t), Nr(t);
|
|
1768
|
+
var i = Lr(t);
|
|
1769
|
+
t.teardown = typeof i == "function" ? i : null, t.wv = Dr;
|
|
1767
1770
|
var s;
|
|
1768
|
-
|
|
1771
|
+
Qt && os && (t.f & F) !== 0 && t.deps;
|
|
1769
1772
|
} finally {
|
|
1770
|
-
|
|
1773
|
+
At = r, y = n;
|
|
1771
1774
|
}
|
|
1772
1775
|
}
|
|
1773
1776
|
}
|
|
1774
1777
|
function E(t) {
|
|
1775
|
-
var e = t.f, n = (e &
|
|
1776
|
-
if (k !== null && !
|
|
1777
|
-
var r =
|
|
1778
|
-
if (!r && (
|
|
1778
|
+
var e = t.f, n = (e & z) !== 0;
|
|
1779
|
+
if (k !== null && !ie) {
|
|
1780
|
+
var r = y !== null && (y.f & Me) !== 0;
|
|
1781
|
+
if (!r && (te === null || !Ye.call(te, t))) {
|
|
1779
1782
|
var i = k.deps;
|
|
1780
|
-
if ((k.f &
|
|
1781
|
-
t.rv < Ce && (t.rv = Ce,
|
|
1783
|
+
if ((k.f & tn) !== 0)
|
|
1784
|
+
t.rv < Ce && (t.rv = Ce, j === null && i !== null && i[Z] === t ? Z++ : j === null ? j = [t] : j.push(t));
|
|
1782
1785
|
else {
|
|
1783
1786
|
(k.deps ??= []).push(t);
|
|
1784
1787
|
var s = t.reactions;
|
|
@@ -1786,8 +1789,8 @@ function E(t) {
|
|
|
1786
1789
|
}
|
|
1787
1790
|
}
|
|
1788
1791
|
}
|
|
1789
|
-
if (Ke &&
|
|
1790
|
-
return
|
|
1792
|
+
if (Ke && Se.has(t))
|
|
1793
|
+
return Se.get(t);
|
|
1791
1794
|
if (n) {
|
|
1792
1795
|
var a = (
|
|
1793
1796
|
/** @type {Derived} */
|
|
@@ -1795,54 +1798,54 @@ function E(t) {
|
|
|
1795
1798
|
);
|
|
1796
1799
|
if (Ke) {
|
|
1797
1800
|
var u = a.v;
|
|
1798
|
-
return ((a.f &
|
|
1801
|
+
return ((a.f & D) === 0 && a.reactions !== null || $r(a)) && (u = hn(a)), Se.set(a, u), u;
|
|
1799
1802
|
}
|
|
1800
|
-
var o = (a.f &
|
|
1801
|
-
|
|
1803
|
+
var o = (a.f & ee) === 0 && !ie && k !== null && (At || (k.f & ee) !== 0), l = (a.f & Je) === 0;
|
|
1804
|
+
dt(a) && (o && (a.f |= ee), kr(a)), o && !l && (yr(a), Fr(a));
|
|
1802
1805
|
}
|
|
1803
|
-
if (
|
|
1804
|
-
return
|
|
1805
|
-
if ((t.f &
|
|
1806
|
+
if (re?.has(t))
|
|
1807
|
+
return re.get(t);
|
|
1808
|
+
if ((t.f & Ee) !== 0)
|
|
1806
1809
|
throw t.v;
|
|
1807
1810
|
return t.v;
|
|
1808
1811
|
}
|
|
1809
|
-
function
|
|
1810
|
-
if (t.f |=
|
|
1812
|
+
function Fr(t) {
|
|
1813
|
+
if (t.f |= ee, t.deps !== null)
|
|
1811
1814
|
for (const e of t.deps)
|
|
1812
|
-
(e.reactions ??= []).push(t), (e.f &
|
|
1815
|
+
(e.reactions ??= []).push(t), (e.f & z) !== 0 && (e.f & ee) === 0 && (yr(
|
|
1813
1816
|
/** @type {Derived} */
|
|
1814
1817
|
e
|
|
1815
|
-
),
|
|
1818
|
+
), Fr(
|
|
1816
1819
|
/** @type {Derived} */
|
|
1817
1820
|
e
|
|
1818
1821
|
));
|
|
1819
1822
|
}
|
|
1820
|
-
function
|
|
1821
|
-
if (t.v ===
|
|
1823
|
+
function $r(t) {
|
|
1824
|
+
if (t.v === R) return !0;
|
|
1822
1825
|
if (t.deps === null) return !1;
|
|
1823
1826
|
for (const e of t.deps)
|
|
1824
|
-
if (
|
|
1827
|
+
if (Se.has(e) || (e.f & z) !== 0 && $r(
|
|
1825
1828
|
/** @type {Derived} */
|
|
1826
1829
|
e
|
|
1827
1830
|
))
|
|
1828
1831
|
return !0;
|
|
1829
1832
|
return !1;
|
|
1830
1833
|
}
|
|
1831
|
-
function
|
|
1832
|
-
var e =
|
|
1834
|
+
function Q(t) {
|
|
1835
|
+
var e = ie;
|
|
1833
1836
|
try {
|
|
1834
|
-
return
|
|
1837
|
+
return ie = !0, t();
|
|
1835
1838
|
} finally {
|
|
1836
|
-
|
|
1839
|
+
ie = e;
|
|
1837
1840
|
}
|
|
1838
1841
|
}
|
|
1839
|
-
const
|
|
1840
|
-
function
|
|
1841
|
-
return
|
|
1842
|
+
const js = ["touchstart", "touchmove"];
|
|
1843
|
+
function Us(t) {
|
|
1844
|
+
return js.includes(t);
|
|
1842
1845
|
}
|
|
1843
|
-
const
|
|
1844
|
-
let
|
|
1845
|
-
function
|
|
1846
|
+
const Et = /* @__PURE__ */ Symbol("events"), Ws = /* @__PURE__ */ new Set(), qn = /* @__PURE__ */ new Set();
|
|
1847
|
+
let Zn = null;
|
|
1848
|
+
function Yn(t) {
|
|
1846
1849
|
var e = this, n = (
|
|
1847
1850
|
/** @type {Node} */
|
|
1848
1851
|
e.ownerDocument
|
|
@@ -1850,13 +1853,13 @@ function Zn(t) {
|
|
|
1850
1853
|
/** @type {null | Element} */
|
|
1851
1854
|
i[0] || t.target
|
|
1852
1855
|
);
|
|
1853
|
-
|
|
1854
|
-
var a = 0, u =
|
|
1856
|
+
Zn = t;
|
|
1857
|
+
var a = 0, u = Zn === t && t[Et];
|
|
1855
1858
|
if (u) {
|
|
1856
1859
|
var o = i.indexOf(u);
|
|
1857
1860
|
if (o !== -1 && (e === document || e === /** @type {any} */
|
|
1858
1861
|
window)) {
|
|
1859
|
-
t[
|
|
1862
|
+
t[Et] = e;
|
|
1860
1863
|
return;
|
|
1861
1864
|
}
|
|
1862
1865
|
var l = i.indexOf(e);
|
|
@@ -1866,95 +1869,95 @@ function Zn(t) {
|
|
|
1866
1869
|
}
|
|
1867
1870
|
if (s = /** @type {Element} */
|
|
1868
1871
|
i[a] || t.target, s !== e) {
|
|
1869
|
-
|
|
1872
|
+
qi(t, "currentTarget", {
|
|
1870
1873
|
configurable: !0,
|
|
1871
1874
|
get() {
|
|
1872
1875
|
return s || n;
|
|
1873
1876
|
}
|
|
1874
1877
|
});
|
|
1875
|
-
var c = k, f =
|
|
1876
|
-
|
|
1878
|
+
var c = k, f = y;
|
|
1879
|
+
ne(null), he(null);
|
|
1877
1880
|
try {
|
|
1878
|
-
for (var
|
|
1879
|
-
var
|
|
1881
|
+
for (var p, m = []; s !== null; ) {
|
|
1882
|
+
var h = s.assignedSlot || s.parentNode || /** @type {any} */
|
|
1880
1883
|
s.host || null;
|
|
1881
1884
|
try {
|
|
1882
|
-
var v = s[
|
|
1885
|
+
var v = s[Et]?.[r];
|
|
1883
1886
|
v != null && (!/** @type {any} */
|
|
1884
1887
|
s.disabled || // DOM could've been updated already by the time this is reached, so we check this as well
|
|
1885
1888
|
// -> the target could not have been disabled because it emits the event in the first place
|
|
1886
1889
|
t.target === s) && v.call(s, t);
|
|
1887
|
-
} catch (
|
|
1888
|
-
|
|
1890
|
+
} catch (b) {
|
|
1891
|
+
p ? m.push(b) : p = b;
|
|
1889
1892
|
}
|
|
1890
|
-
if (t.cancelBubble ||
|
|
1893
|
+
if (t.cancelBubble || h === e || h === null)
|
|
1891
1894
|
break;
|
|
1892
|
-
s =
|
|
1895
|
+
s = h;
|
|
1893
1896
|
}
|
|
1894
|
-
if (
|
|
1895
|
-
for (let
|
|
1897
|
+
if (p) {
|
|
1898
|
+
for (let b of m)
|
|
1896
1899
|
queueMicrotask(() => {
|
|
1897
|
-
throw
|
|
1900
|
+
throw b;
|
|
1898
1901
|
});
|
|
1899
|
-
throw
|
|
1902
|
+
throw p;
|
|
1900
1903
|
}
|
|
1901
1904
|
} finally {
|
|
1902
|
-
t[
|
|
1905
|
+
t[Et] = e, delete t.currentTarget, ne(c), he(f);
|
|
1903
1906
|
}
|
|
1904
1907
|
}
|
|
1905
1908
|
}
|
|
1906
|
-
const
|
|
1909
|
+
const Bs = (
|
|
1907
1910
|
// We gotta write it like this because after downleveling the pure comment may end up in the wrong location
|
|
1908
1911
|
globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", {
|
|
1909
1912
|
/** @param {string} html */
|
|
1910
1913
|
createHTML: (t) => t
|
|
1911
1914
|
})
|
|
1912
1915
|
);
|
|
1913
|
-
function
|
|
1916
|
+
function Hs(t) {
|
|
1914
1917
|
return (
|
|
1915
1918
|
/** @type {string} */
|
|
1916
|
-
|
|
1919
|
+
Bs?.createHTML(t) ?? t
|
|
1917
1920
|
);
|
|
1918
1921
|
}
|
|
1919
|
-
function
|
|
1920
|
-
var e =
|
|
1921
|
-
return e.innerHTML =
|
|
1922
|
+
function qs(t) {
|
|
1923
|
+
var e = Ps("template");
|
|
1924
|
+
return e.innerHTML = Hs(t.replaceAll("<!>", "<!---->")), e.content;
|
|
1922
1925
|
}
|
|
1923
|
-
function
|
|
1926
|
+
function Zs(t, e) {
|
|
1924
1927
|
var n = (
|
|
1925
1928
|
/** @type {Effect} */
|
|
1926
|
-
|
|
1929
|
+
y
|
|
1927
1930
|
);
|
|
1928
1931
|
n.nodes === null && (n.nodes = { start: t, end: e, a: null, t: null });
|
|
1929
1932
|
}
|
|
1930
1933
|
// @__NO_SIDE_EFFECTS__
|
|
1931
|
-
function
|
|
1934
|
+
function Vr(t, e) {
|
|
1932
1935
|
var n, r = !t.startsWith("<!>");
|
|
1933
1936
|
return () => {
|
|
1934
|
-
n === void 0 && (n =
|
|
1935
|
-
/* @__PURE__ */
|
|
1937
|
+
n === void 0 && (n = qs(r ? t : "<!>" + t), n = /** @type {TemplateNode} */
|
|
1938
|
+
/* @__PURE__ */ Pr(n));
|
|
1936
1939
|
var i = (
|
|
1937
1940
|
/** @type {TemplateNode} */
|
|
1938
|
-
|
|
1941
|
+
Mr ? document.importNode(n, !0) : n.cloneNode(!0)
|
|
1939
1942
|
);
|
|
1940
|
-
return
|
|
1943
|
+
return Zs(i, i), i;
|
|
1941
1944
|
};
|
|
1942
1945
|
}
|
|
1943
|
-
function
|
|
1946
|
+
function jr(t, e) {
|
|
1944
1947
|
t !== null && t.before(
|
|
1945
1948
|
/** @type {Node} */
|
|
1946
1949
|
e
|
|
1947
1950
|
);
|
|
1948
1951
|
}
|
|
1949
|
-
function
|
|
1950
|
-
return
|
|
1952
|
+
function vn(t, e) {
|
|
1953
|
+
return Ys(t, e);
|
|
1951
1954
|
}
|
|
1952
|
-
const
|
|
1953
|
-
function
|
|
1954
|
-
|
|
1955
|
-
var o = void 0, l =
|
|
1956
|
-
var c = n ?? e.appendChild(
|
|
1957
|
-
|
|
1955
|
+
const xt = /* @__PURE__ */ new Map();
|
|
1956
|
+
function Ys(t, { target: e, anchor: n, props: r = {}, events: i, context: s, intro: a = !0, transformError: u }) {
|
|
1957
|
+
xs();
|
|
1958
|
+
var o = void 0, l = Ns(() => {
|
|
1959
|
+
var c = n ?? e.appendChild(Sr());
|
|
1960
|
+
ds(
|
|
1958
1961
|
/** @type {TemplateNode} */
|
|
1959
1962
|
c,
|
|
1960
1963
|
{
|
|
@@ -1962,69 +1965,69 @@ function Hs(t, { target: e, anchor: n, props: r = {}, events: i, context: s, int
|
|
|
1962
1965
|
}
|
|
1963
1966
|
},
|
|
1964
1967
|
(m) => {
|
|
1965
|
-
|
|
1966
|
-
var
|
|
1968
|
+
ln({});
|
|
1969
|
+
var h = (
|
|
1967
1970
|
/** @type {ComponentContext} */
|
|
1968
|
-
|
|
1971
|
+
ae
|
|
1969
1972
|
);
|
|
1970
|
-
s && (
|
|
1973
|
+
s && (h.c = s), i && (r.$$events = i), o = t(m, r) || {}, un();
|
|
1971
1974
|
},
|
|
1972
1975
|
u
|
|
1973
1976
|
);
|
|
1974
|
-
var f = /* @__PURE__ */ new Set(),
|
|
1975
|
-
for (var
|
|
1976
|
-
var v = m[
|
|
1977
|
+
var f = /* @__PURE__ */ new Set(), p = (m) => {
|
|
1978
|
+
for (var h = 0; h < m.length; h++) {
|
|
1979
|
+
var v = m[h];
|
|
1977
1980
|
if (!f.has(v)) {
|
|
1978
1981
|
f.add(v);
|
|
1979
|
-
var
|
|
1980
|
-
for (const
|
|
1981
|
-
var
|
|
1982
|
-
|
|
1983
|
-
var
|
|
1984
|
-
|
|
1982
|
+
var b = Us(v);
|
|
1983
|
+
for (const oe of [e, document]) {
|
|
1984
|
+
var C = xt.get(oe);
|
|
1985
|
+
C === void 0 && (C = /* @__PURE__ */ new Map(), xt.set(oe, C));
|
|
1986
|
+
var J = C.get(v);
|
|
1987
|
+
J === void 0 ? (oe.addEventListener(v, Yn, { passive: b }), C.set(v, 1)) : C.set(v, J + 1);
|
|
1985
1988
|
}
|
|
1986
1989
|
}
|
|
1987
1990
|
}
|
|
1988
1991
|
};
|
|
1989
|
-
return
|
|
1992
|
+
return p(Hi(Ws)), qn.add(p), () => {
|
|
1990
1993
|
for (var m of f)
|
|
1991
|
-
for (const
|
|
1992
|
-
var
|
|
1994
|
+
for (const b of [e, document]) {
|
|
1995
|
+
var h = (
|
|
1993
1996
|
/** @type {Map<string, number>} */
|
|
1994
|
-
|
|
1997
|
+
xt.get(b)
|
|
1995
1998
|
), v = (
|
|
1996
1999
|
/** @type {number} */
|
|
1997
|
-
|
|
2000
|
+
h.get(m)
|
|
1998
2001
|
);
|
|
1999
|
-
--v == 0 ? (
|
|
2002
|
+
--v == 0 ? (b.removeEventListener(m, Yn), h.delete(m), h.size === 0 && xt.delete(b)) : h.set(m, v);
|
|
2000
2003
|
}
|
|
2001
|
-
|
|
2004
|
+
qn.delete(p), c !== n && c.parentNode?.removeChild(c);
|
|
2002
2005
|
};
|
|
2003
2006
|
});
|
|
2004
|
-
return
|
|
2007
|
+
return Js.set(o, l), o;
|
|
2005
2008
|
}
|
|
2006
|
-
let
|
|
2007
|
-
function
|
|
2009
|
+
let Js = /* @__PURE__ */ new WeakMap();
|
|
2010
|
+
function Ur(t) {
|
|
2008
2011
|
var e, n, r = "";
|
|
2009
2012
|
if (typeof t == "string" || typeof t == "number") r += t;
|
|
2010
2013
|
else if (typeof t == "object") if (Array.isArray(t)) {
|
|
2011
2014
|
var i = t.length;
|
|
2012
|
-
for (e = 0; e < i; e++) t[e] && (n =
|
|
2015
|
+
for (e = 0; e < i; e++) t[e] && (n = Ur(t[e])) && (r && (r += " "), r += n);
|
|
2013
2016
|
} else for (n in t) t[n] && (r && (r += " "), r += n);
|
|
2014
2017
|
return r;
|
|
2015
2018
|
}
|
|
2016
|
-
function
|
|
2017
|
-
for (var t, e, n = 0, r = "", i = arguments.length; n < i; n++) (t = arguments[n]) && (e =
|
|
2019
|
+
function Xs() {
|
|
2020
|
+
for (var t, e, n = 0, r = "", i = arguments.length; n < i; n++) (t = arguments[n]) && (e = Ur(t)) && (r && (r += " "), r += e);
|
|
2018
2021
|
return r;
|
|
2019
2022
|
}
|
|
2020
|
-
function
|
|
2021
|
-
return typeof t == "object" ?
|
|
2023
|
+
function Wr(t) {
|
|
2024
|
+
return typeof t == "object" ? Xs(t) : t ?? "";
|
|
2022
2025
|
}
|
|
2023
|
-
function
|
|
2026
|
+
function Ks(t, e, n) {
|
|
2024
2027
|
var r = t == null ? "" : "" + t;
|
|
2025
2028
|
return e && (r = r ? r + " " + e : e), r === "" ? null : r;
|
|
2026
2029
|
}
|
|
2027
|
-
function
|
|
2030
|
+
function Jn(t, e = !1) {
|
|
2028
2031
|
var n = e ? " !important;" : ";", r = "";
|
|
2029
2032
|
for (var i of Object.keys(t)) {
|
|
2030
2033
|
var s = t[i];
|
|
@@ -2032,53 +2035,53 @@ function Yn(t, e = !1) {
|
|
|
2032
2035
|
}
|
|
2033
2036
|
return r;
|
|
2034
2037
|
}
|
|
2035
|
-
function
|
|
2038
|
+
function Gs(t, e) {
|
|
2036
2039
|
if (e) {
|
|
2037
2040
|
var n = "", r, i;
|
|
2038
|
-
return Array.isArray(e) ? (r = e[0], i = e[1]) : r = e, r && (n +=
|
|
2041
|
+
return Array.isArray(e) ? (r = e[0], i = e[1]) : r = e, r && (n += Jn(r)), i && (n += Jn(i, !0)), n = n.trim(), n === "" ? null : n;
|
|
2039
2042
|
}
|
|
2040
2043
|
return String(t);
|
|
2041
2044
|
}
|
|
2042
|
-
function
|
|
2045
|
+
function Br(t, e, n, r, i, s) {
|
|
2043
2046
|
var a = t.__className;
|
|
2044
2047
|
if (a !== n || a === void 0) {
|
|
2045
|
-
var u =
|
|
2048
|
+
var u = Ks(n, r);
|
|
2046
2049
|
u == null ? t.removeAttribute("class") : t.className = u, t.__className = n;
|
|
2047
2050
|
}
|
|
2048
2051
|
return s;
|
|
2049
2052
|
}
|
|
2050
|
-
function
|
|
2053
|
+
function Yt(t, e = {}, n, r) {
|
|
2051
2054
|
for (var i in n) {
|
|
2052
2055
|
var s = n[i];
|
|
2053
2056
|
e[i] !== s && (n[i] == null ? t.style.removeProperty(i) : t.style.setProperty(i, s, r));
|
|
2054
2057
|
}
|
|
2055
2058
|
}
|
|
2056
|
-
function
|
|
2059
|
+
function it(t, e, n, r) {
|
|
2057
2060
|
var i = t.__style;
|
|
2058
2061
|
if (i !== e) {
|
|
2059
|
-
var s =
|
|
2062
|
+
var s = Gs(e, r);
|
|
2060
2063
|
s == null ? t.removeAttribute("style") : t.style.cssText = s, t.__style = e;
|
|
2061
|
-
} else r && (Array.isArray(r) ? (
|
|
2064
|
+
} else r && (Array.isArray(r) ? (Yt(t, n?.[0], r[0]), Yt(t, n?.[1], r[1], "important")) : Yt(t, n, r));
|
|
2062
2065
|
return r;
|
|
2063
2066
|
}
|
|
2064
|
-
function
|
|
2065
|
-
return t === e || t?.[
|
|
2067
|
+
function Xn(t, e) {
|
|
2068
|
+
return t === e || t?.[Tt] === e;
|
|
2066
2069
|
}
|
|
2067
|
-
function
|
|
2068
|
-
return
|
|
2070
|
+
function st(t = {}, e, n, r) {
|
|
2071
|
+
return Cs(() => {
|
|
2069
2072
|
var i, s;
|
|
2070
|
-
return
|
|
2071
|
-
i = s, s = [],
|
|
2072
|
-
t !== n(...s) && (e(t, ...s), i &&
|
|
2073
|
+
return Ir(() => {
|
|
2074
|
+
i = s, s = [], Q(() => {
|
|
2075
|
+
t !== n(...s) && (e(t, ...s), i && Xn(n(...i), t) && e(null, ...i));
|
|
2073
2076
|
});
|
|
2074
2077
|
}), () => {
|
|
2075
2078
|
Re(() => {
|
|
2076
|
-
s &&
|
|
2079
|
+
s && Xn(n(...s), t) && e(null, ...s);
|
|
2077
2080
|
});
|
|
2078
2081
|
};
|
|
2079
2082
|
}), t;
|
|
2080
2083
|
}
|
|
2081
|
-
class
|
|
2084
|
+
class gn {
|
|
2082
2085
|
div;
|
|
2083
2086
|
marker;
|
|
2084
2087
|
constructor(e, n, r, i) {
|
|
@@ -2094,7 +2097,7 @@ class mn {
|
|
|
2094
2097
|
this.marker.update(e);
|
|
2095
2098
|
}
|
|
2096
2099
|
}
|
|
2097
|
-
class
|
|
2100
|
+
class mt {
|
|
2098
2101
|
shown;
|
|
2099
2102
|
id;
|
|
2100
2103
|
lat;
|
|
@@ -2102,16 +2105,16 @@ class dt {
|
|
|
2102
2105
|
rank;
|
|
2103
2106
|
marker;
|
|
2104
2107
|
constructor(e, n, r, i, s) {
|
|
2105
|
-
if (new.target ===
|
|
2108
|
+
if (new.target === mt) throw new Error("Unsupported code");
|
|
2106
2109
|
this.shown = !0, this.id = e, this.lat = n, this.lng = r, this.rank = i, this.marker = s;
|
|
2107
2110
|
}
|
|
2108
2111
|
}
|
|
2109
|
-
const
|
|
2110
|
-
typeof window < "u" && ((window.__svelte ??= {}).v ??= /* @__PURE__ */ new Set()).add(
|
|
2111
|
-
function
|
|
2112
|
+
const Qs = "5";
|
|
2113
|
+
typeof window < "u" && ((window.__svelte ??= {}).v ??= /* @__PURE__ */ new Set()).add(Qs);
|
|
2114
|
+
function Hr(t) {
|
|
2112
2115
|
return -0.5 * (Math.cos(Math.PI * t) - 1);
|
|
2113
2116
|
}
|
|
2114
|
-
class
|
|
2117
|
+
class qr {
|
|
2115
2118
|
animating;
|
|
2116
2119
|
animationEasing;
|
|
2117
2120
|
animationCallback;
|
|
@@ -2155,100 +2158,100 @@ class Hr {
|
|
|
2155
2158
|
return performance.now() > this.time.end;
|
|
2156
2159
|
}
|
|
2157
2160
|
}
|
|
2158
|
-
var
|
|
2159
|
-
function
|
|
2160
|
-
|
|
2161
|
-
let n =
|
|
2162
|
-
setDisplayed:
|
|
2163
|
-
getDisplayed:
|
|
2161
|
+
var ea = /* @__PURE__ */ Vr("<div></div>");
|
|
2162
|
+
function ta(t, e) {
|
|
2163
|
+
ln(e, !0);
|
|
2164
|
+
let n = Q(() => e.id), r = Q(() => e.element), i = Q(() => e.style), s = Q(() => e.dimensions), a = Q(() => e.initialize), u = {
|
|
2165
|
+
setDisplayed: J,
|
|
2166
|
+
getDisplayed: oe,
|
|
2164
2167
|
setSuppressed: de,
|
|
2165
|
-
setCollapsed:
|
|
2166
|
-
getCollapsed:
|
|
2167
|
-
setScale:
|
|
2168
|
+
setCollapsed: ye,
|
|
2169
|
+
getCollapsed: Te,
|
|
2170
|
+
setScale: Ot
|
|
2168
2171
|
};
|
|
2169
2172
|
function o() {
|
|
2170
2173
|
return u;
|
|
2171
2174
|
}
|
|
2172
|
-
let l, c = s.width, f = s.height,
|
|
2173
|
-
function
|
|
2174
|
-
|
|
2175
|
+
let l, c = s.width, f = s.height, p = s.padding, m = i?.background ?? ji, h = i?.radius ?? Oi, v = i?.shadow ?? Li, b = /* @__PURE__ */ V(!1), C = !1;
|
|
2176
|
+
function J(_) {
|
|
2177
|
+
_ == !0 && (l && r && r.parentElement != l && l.appendChild(r), C == !1 && a && r && (C = !0, setTimeout(async () => await a(n, r), 0))), _ != E(b) && (U(b, _, !0), _ == !1 && q.end());
|
|
2175
2178
|
}
|
|
2176
|
-
function
|
|
2177
|
-
return E(
|
|
2179
|
+
function oe() {
|
|
2180
|
+
return E(b);
|
|
2178
2181
|
}
|
|
2179
|
-
let
|
|
2180
|
-
function de(
|
|
2181
|
-
|
|
2182
|
+
let pe = /* @__PURE__ */ V(!0);
|
|
2183
|
+
function de(_) {
|
|
2184
|
+
_ != E(pe) && (U(pe, _, !0), _ && (X = je, q.set(je)));
|
|
2182
2185
|
}
|
|
2183
|
-
let
|
|
2184
|
-
function
|
|
2185
|
-
|
|
2186
|
+
let le = /* @__PURE__ */ V(!0);
|
|
2187
|
+
function ye(_) {
|
|
2188
|
+
_ != E(le) && (U(le, _, !0), q.target(E(le) ? 0 : X));
|
|
2186
2189
|
}
|
|
2187
|
-
function
|
|
2188
|
-
return E(
|
|
2190
|
+
function Te() {
|
|
2191
|
+
return E(b) ? q.expired() : !0;
|
|
2189
2192
|
}
|
|
2190
|
-
let
|
|
2193
|
+
let X = je, q = new qr({
|
|
2191
2194
|
value: je,
|
|
2192
2195
|
min: 0,
|
|
2193
2196
|
max: 1,
|
|
2194
|
-
timespan:
|
|
2195
|
-
easing:
|
|
2196
|
-
callback:
|
|
2197
|
+
timespan: Ci,
|
|
2198
|
+
easing: Hr,
|
|
2199
|
+
callback: Lt
|
|
2197
2200
|
});
|
|
2198
|
-
function
|
|
2199
|
-
|
|
2201
|
+
function Ot(_) {
|
|
2202
|
+
X = _, q.target(_);
|
|
2200
2203
|
}
|
|
2201
|
-
function
|
|
2202
|
-
l.style.scale =
|
|
2204
|
+
function Lt(_) {
|
|
2205
|
+
l.style.scale = _.toString(), l.style.filter = `brightness(${vt(_)})`;
|
|
2203
2206
|
}
|
|
2204
|
-
function
|
|
2205
|
-
return 0.25 + 0.75 *
|
|
2207
|
+
function vt(_) {
|
|
2208
|
+
return 0.25 + 0.75 * _;
|
|
2206
2209
|
}
|
|
2207
|
-
var
|
|
2208
|
-
let
|
|
2209
|
-
return
|
|
2210
|
-
(
|
|
2211
|
-
|
|
2212
|
-
|
|
2210
|
+
var me = { invoke: o }, $e = ea();
|
|
2211
|
+
let tt;
|
|
2212
|
+
return st($e, (_) => l = _, () => l), Ar(
|
|
2213
|
+
(_) => {
|
|
2214
|
+
Br(
|
|
2215
|
+
$e,
|
|
2213
2216
|
1,
|
|
2214
|
-
|
|
2217
|
+
Wr([
|
|
2215
2218
|
"pin",
|
|
2216
|
-
E(
|
|
2217
|
-
E(
|
|
2219
|
+
E(b) && "displayed",
|
|
2220
|
+
E(pe) && "suppressed"
|
|
2218
2221
|
]),
|
|
2219
2222
|
"svelte-10kxbrm"
|
|
2220
|
-
),
|
|
2223
|
+
), tt = it($e, "", tt, _);
|
|
2221
2224
|
},
|
|
2222
2225
|
[
|
|
2223
2226
|
() => ({
|
|
2224
2227
|
width: `${c}px`,
|
|
2225
2228
|
height: `${f}px`,
|
|
2226
|
-
padding: `${
|
|
2227
|
-
"border-radius": `${
|
|
2229
|
+
padding: `${p}px`,
|
|
2230
|
+
"border-radius": `${h}px`,
|
|
2228
2231
|
"background-color": `rgb(from ${m} r g b / 1)`,
|
|
2229
2232
|
"box-shadow": v,
|
|
2230
2233
|
scale: je,
|
|
2231
|
-
filter: `brightness(${
|
|
2234
|
+
filter: `brightness(${vt(je)})`
|
|
2232
2235
|
})
|
|
2233
2236
|
]
|
|
2234
|
-
),
|
|
2237
|
+
), jr(t, $e), un(me);
|
|
2235
2238
|
}
|
|
2236
|
-
class
|
|
2239
|
+
class na extends mt {
|
|
2237
2240
|
width;
|
|
2238
2241
|
height;
|
|
2239
2242
|
zoom;
|
|
2240
2243
|
component;
|
|
2241
2244
|
constructor(e, n, r, i, s, a) {
|
|
2242
|
-
super(n, r, i, s, new
|
|
2245
|
+
super(n, r, i, s, new gn(e, r, i, s)), this.width = a.dimensions.width, this.height = a.dimensions.height, this.zoom = NaN, this.component = vn(ta, {
|
|
2243
2246
|
target: this.marker.div,
|
|
2244
2247
|
props: a
|
|
2245
2248
|
});
|
|
2246
2249
|
}
|
|
2247
2250
|
get zIndex() {
|
|
2248
|
-
return Number.isNaN(this.zoom) ? this.rank : Math.round(-this.zoom *
|
|
2251
|
+
return Number.isNaN(this.zoom) ? this.rank : Math.round(-this.zoom * or) + Di;
|
|
2249
2252
|
}
|
|
2250
2253
|
}
|
|
2251
|
-
class
|
|
2254
|
+
class Kn {
|
|
2252
2255
|
animating;
|
|
2253
2256
|
animationTimestamp;
|
|
2254
2257
|
animationEnd;
|
|
@@ -2302,127 +2305,126 @@ class Xn {
|
|
|
2302
2305
|
return performance.now() > this.animationEnd;
|
|
2303
2306
|
}
|
|
2304
2307
|
}
|
|
2305
|
-
function
|
|
2308
|
+
function an(t, e, n) {
|
|
2306
2309
|
if (t <= 0 || e <= 0) return { x: 0, y: 0 };
|
|
2307
2310
|
let r = t / 2, i = e / 2, s = Math.sqrt(r * r + i * i), a = Math.atan(i / r) * (180 / Math.PI), u = n * (Math.PI / 180);
|
|
2308
2311
|
return n < 180 ? n < 90 ? n < a ? { x: 0, y: s * Math.sin(u) - i } : { x: s * Math.cos(u) - r, y: 0 } : n < 180 - a ? { x: s * Math.cos(u) - r, y: 0 } : { x: -t, y: s * Math.sin(u) - i } : n < 270 ? n < 180 + a ? { x: -t, y: s * Math.sin(u) - i } : { x: s * Math.cos(u) - r, y: -e } : n < 360 - a ? { x: s * Math.cos(u) - r, y: -e } : { x: 0, y: s * Math.sin(u) - i };
|
|
2309
2312
|
}
|
|
2310
|
-
var
|
|
2311
|
-
function
|
|
2312
|
-
|
|
2313
|
-
let n =
|
|
2314
|
-
setDisplayed:
|
|
2315
|
-
getDisplayed:
|
|
2316
|
-
setCollapsed:
|
|
2317
|
-
getCollapsed:
|
|
2318
|
-
getExpanded:
|
|
2319
|
-
setAngle:
|
|
2313
|
+
var ra = /* @__PURE__ */ Vr('<div><div class="element pointer svelte-1no6o2a"></div> <div class="element bubble svelte-1no6o2a"><div class="element body svelte-1no6o2a"></div></div></div>');
|
|
2314
|
+
function Zr(t, e) {
|
|
2315
|
+
ln(e, !0);
|
|
2316
|
+
let n = Q(() => e.id), r = Q(() => e.element), i = Q(() => e.style), s = Q(() => e.dimensions), a = Q(() => e.initialize), u = {
|
|
2317
|
+
setDisplayed: li,
|
|
2318
|
+
getDisplayed: ui,
|
|
2319
|
+
setCollapsed: ci,
|
|
2320
|
+
getCollapsed: fi,
|
|
2321
|
+
getExpanded: hi,
|
|
2322
|
+
setAngle: di
|
|
2320
2323
|
};
|
|
2321
2324
|
function o() {
|
|
2322
2325
|
return u;
|
|
2323
2326
|
}
|
|
2324
|
-
let l
|
|
2325
|
-
s.width, s.height, i?.radius;
|
|
2326
|
-
let
|
|
2327
|
-
function
|
|
2328
|
-
g != E(
|
|
2327
|
+
let l, c, f, p, m = i?.filter ?? Vi;
|
|
2328
|
+
const h = s.width + 2 * s.padding, v = s.height + 2 * s.padding, b = s.padding, C = s.width, J = s.height, oe = i?.radius, pe = s.width, de = s.height, le = Math.min(i?.radius ?? Fi, Math.min(pe, de) / 2), ye = Math.min(1, 2 * le / Math.min(de, pe)), Te = i?.background ?? Ln, X = s.padding * 2, q = s.padding * 0.5 * ye, Ot = i?.background ?? Ln, Lt = v < h ? v / h : 1, vt = h < v ? h / v : 1, me = Math.min(h, v) / 2, $e = me * Math.SQRT2, tt = 15, _ = 15 * Math.SQRT2;
|
|
2329
|
+
let bn = !1, Ve = /* @__PURE__ */ V(!1);
|
|
2330
|
+
function li(g) {
|
|
2331
|
+
g != E(Ve) && (U(Ve, g, !0), g == !0 && (r && r.parentElement != c && c.appendChild(r), bn == !1 && a && r && (bn = !0, setTimeout(async () => await a(n, r), 0))), g == !1 && (gt.end(), jt.end(), Wt.end()));
|
|
2329
2332
|
}
|
|
2330
|
-
function
|
|
2331
|
-
return E(
|
|
2333
|
+
function ui() {
|
|
2334
|
+
return E(Ve);
|
|
2332
2335
|
}
|
|
2333
|
-
let
|
|
2334
|
-
function
|
|
2335
|
-
g != E(
|
|
2336
|
+
let Ft = /* @__PURE__ */ V(!0);
|
|
2337
|
+
function ci(g) {
|
|
2338
|
+
g != E(Ft) && (U(Ft, g, !0), gt.target(E(Ft) ? 0 : 1));
|
|
2336
2339
|
}
|
|
2337
|
-
function
|
|
2338
|
-
return E(
|
|
2340
|
+
function fi() {
|
|
2341
|
+
return E(Ve) ? gt.expired() : !0;
|
|
2339
2342
|
}
|
|
2340
|
-
function
|
|
2341
|
-
return E(
|
|
2343
|
+
function hi() {
|
|
2344
|
+
return E(Ve) ? gt.expired() : !1;
|
|
2342
2345
|
}
|
|
2343
|
-
let
|
|
2346
|
+
let gt = new qr({
|
|
2344
2347
|
value: 0,
|
|
2345
2348
|
min: 0,
|
|
2346
2349
|
max: 1,
|
|
2347
|
-
timespan:
|
|
2348
|
-
easing:
|
|
2349
|
-
callback:
|
|
2350
|
+
timespan: Ri,
|
|
2351
|
+
easing: Hr,
|
|
2352
|
+
callback: pi
|
|
2350
2353
|
});
|
|
2351
|
-
function
|
|
2352
|
-
|
|
2354
|
+
function pi(g) {
|
|
2355
|
+
l.style.opacity = `${g}`, l.style.scale = `${g}`, c.style.opacity = `${g}`;
|
|
2353
2356
|
}
|
|
2354
|
-
let
|
|
2355
|
-
value: -
|
|
2356
|
-
min: -
|
|
2357
|
+
let wt = NaN, $t = /* @__PURE__ */ V(!1), Vt = -h / 2, jt = new Kn({
|
|
2358
|
+
value: -h / 2,
|
|
2359
|
+
min: -h,
|
|
2357
2360
|
max: 0,
|
|
2358
2361
|
precision: 1,
|
|
2359
|
-
stiffness:
|
|
2360
|
-
callback:
|
|
2361
|
-
}),
|
|
2362
|
-
value: -
|
|
2363
|
-
min: -
|
|
2362
|
+
stiffness: Rn,
|
|
2363
|
+
callback: mi
|
|
2364
|
+
}), Ut = -v / 2, Wt = new Kn({
|
|
2365
|
+
value: -v / 2,
|
|
2366
|
+
min: -v,
|
|
2364
2367
|
max: 0,
|
|
2365
2368
|
precision: 1,
|
|
2366
|
-
stiffness:
|
|
2367
|
-
callback:
|
|
2369
|
+
stiffness: Rn,
|
|
2370
|
+
callback: vi
|
|
2368
2371
|
});
|
|
2369
|
-
function
|
|
2372
|
+
function di(g, kt) {
|
|
2370
2373
|
if (Number.isNaN(g)) {
|
|
2371
|
-
|
|
2374
|
+
wt = NaN, U($t, !1);
|
|
2372
2375
|
return;
|
|
2373
2376
|
}
|
|
2374
|
-
if (E(
|
|
2375
|
-
|
|
2376
|
-
const Ie =
|
|
2377
|
-
|
|
2377
|
+
if (E($t) == !1 || kt == !0) {
|
|
2378
|
+
U($t, !0), wt = g;
|
|
2379
|
+
const Ie = an(h, v, g);
|
|
2380
|
+
jt.set(Math.round(Ie.x)), Wt.set(Math.round(Ie.y));
|
|
2378
2381
|
return;
|
|
2379
2382
|
}
|
|
2380
|
-
if (
|
|
2381
|
-
|
|
2382
|
-
const Ie =
|
|
2383
|
-
|
|
2383
|
+
if (wt != g) {
|
|
2384
|
+
wt = g;
|
|
2385
|
+
const Ie = an(h, v, g);
|
|
2386
|
+
jt.target(Math.round(Ie.x)), Wt.target(Math.round(Ie.y));
|
|
2384
2387
|
return;
|
|
2385
2388
|
}
|
|
2386
2389
|
}
|
|
2387
|
-
function
|
|
2388
|
-
|
|
2390
|
+
function mi(g) {
|
|
2391
|
+
Vt = g, _n(Vt, Ut);
|
|
2389
2392
|
}
|
|
2390
|
-
function
|
|
2391
|
-
|
|
2392
|
-
}
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
}
|
|
2398
|
-
var mi = { invoke: o }, tt = ea();
|
|
2399
|
-
let bn;
|
|
2400
|
-
var Ut = Un(tt);
|
|
2401
|
-
let _n;
|
|
2402
|
-
it(Ut, (g) => d = g, () => d);
|
|
2403
|
-
var Wt = Ms(Ut, 2);
|
|
2393
|
+
function vi(g) {
|
|
2394
|
+
Ut = g, _n(Vt, Ut);
|
|
2395
|
+
}
|
|
2396
|
+
function _n(g, kt) {
|
|
2397
|
+
const Ie = g + h / 2, wi = kt + v / 2, yt = Ie * Lt, bt = wi * vt, qt = Math.sqrt(yt * yt + bt * bt), Tn = (qt - me) / ($e - me), ki = Math.atan2(bt, yt) / Math.PI * 180 - 45, In = tt + Tn * (_ - tt), yi = qt < me ? qt / me : 1, An = 0.5 * ((1 + 0.5 * ye) * Tn), bi = g + b * (1 - An * (yt / me)), _i = kt + b * (1 - An * (bt / me));
|
|
2398
|
+
p.style.transform = `scale(${yi}) rotate(${ki}deg) skew(${In}deg, ${In}deg)`, f.style.transform = `translate(${Math.round(bi)}px, ${Math.round(_i)}px)`;
|
|
2399
|
+
}
|
|
2400
|
+
var gi = { invoke: o }, nt = ra();
|
|
2404
2401
|
let Mn;
|
|
2405
|
-
var
|
|
2402
|
+
var Bt = Wn(nt);
|
|
2403
|
+
let En;
|
|
2404
|
+
st(Bt, (g) => p = g, () => p);
|
|
2405
|
+
var Ht = Ss(Bt, 2);
|
|
2406
2406
|
let xn;
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2407
|
+
var Sn = Wn(Ht);
|
|
2408
|
+
let Pn;
|
|
2409
|
+
return st(Sn, (g) => c = g, () => c), st(Ht, (g) => f = g, () => f), st(nt, (g) => l = g, () => l), Ar(() => {
|
|
2410
|
+
Br(nt, 1, Wr(["element anchor", E(Ve) && "displayed"]), "svelte-1no6o2a"), Mn = it(nt, "", Mn, { filter: m }), En = it(Bt, "", En, {
|
|
2411
|
+
width: `${X}px`,
|
|
2412
|
+
height: `${X}px`,
|
|
2413
|
+
"border-radius": `${q}px`,
|
|
2414
|
+
"background-color": `rgb(from ${Ot} r g b / 1)`
|
|
2415
|
+
}), xn = it(Ht, "", xn, {
|
|
2416
|
+
width: `${pe}px`,
|
|
2417
|
+
height: `${de}px`,
|
|
2418
|
+
"border-radius": `${le}px`,
|
|
2419
|
+
"background-color": `rgb(from ${Te} r g b / 1)`
|
|
2420
|
+
}), Pn = it(Sn, "", Pn, {
|
|
2421
|
+
width: `${C}px`,
|
|
2422
|
+
height: `${J}px`,
|
|
2423
|
+
"border-radius": `${oe}px`
|
|
2422
2424
|
});
|
|
2423
|
-
}),
|
|
2425
|
+
}), jr(t, nt), un(gi);
|
|
2424
2426
|
}
|
|
2425
|
-
class
|
|
2427
|
+
class ia extends mt {
|
|
2426
2428
|
width;
|
|
2427
2429
|
height;
|
|
2428
2430
|
zoom;
|
|
@@ -2430,32 +2432,32 @@ class ta extends dt {
|
|
|
2430
2432
|
directions;
|
|
2431
2433
|
component;
|
|
2432
2434
|
constructor(e, n, r, i, s, a) {
|
|
2433
|
-
super(n, r, i, s, new
|
|
2435
|
+
super(n, r, i, s, new gn(e, r, i, s)), this.width = a.dimensions.width + a.dimensions.padding * 2, this.height = a.dimensions.height + a.dimensions.padding * 2, this.zoom = NaN, this.angle = NaN, this.directions = [], this.component = vn(Zr, {
|
|
2434
2436
|
target: this.marker.div,
|
|
2435
2437
|
props: a
|
|
2436
2438
|
});
|
|
2437
2439
|
}
|
|
2438
2440
|
get zIndex() {
|
|
2439
|
-
return Number.isNaN(this.zoom) ? this.rank : Math.round(-this.zoom *
|
|
2441
|
+
return Number.isNaN(this.zoom) ? this.rank : Math.round(-this.zoom * or) + zi;
|
|
2440
2442
|
}
|
|
2441
2443
|
}
|
|
2442
|
-
class
|
|
2444
|
+
class sa extends mt {
|
|
2443
2445
|
width;
|
|
2444
2446
|
height;
|
|
2445
2447
|
padding;
|
|
2446
2448
|
angle;
|
|
2447
2449
|
component;
|
|
2448
2450
|
constructor(e, n, r, i, s, a) {
|
|
2449
|
-
super(n, r, i, s, new
|
|
2451
|
+
super(n, r, i, s, new gn(e, r, i, Dn)), this.width = a.dimensions.width, this.height = a.dimensions.height, this.padding = a.dimensions.padding, this.angle = NaN, this.shown = !1, this.component = vn(Zr, {
|
|
2450
2452
|
target: this.marker.div,
|
|
2451
2453
|
props: a
|
|
2452
2454
|
});
|
|
2453
2455
|
}
|
|
2454
2456
|
get zIndex() {
|
|
2455
|
-
return
|
|
2457
|
+
return Dn;
|
|
2456
2458
|
}
|
|
2457
2459
|
}
|
|
2458
|
-
class
|
|
2460
|
+
class aa {
|
|
2459
2461
|
id;
|
|
2460
2462
|
state = void 0;
|
|
2461
2463
|
pin;
|
|
@@ -2463,21 +2465,21 @@ class ra {
|
|
|
2463
2465
|
popup;
|
|
2464
2466
|
constructor(e, n) {
|
|
2465
2467
|
const r = n.properites.id, i = n.properites.lat, s = n.properites.lng, a = n.properites.rank, u = n.properites.pin, o = n.properites.tooltip, l = n.properites.popup;
|
|
2466
|
-
this.id = r, this.pin = new
|
|
2468
|
+
this.id = r, this.pin = new na(e, r, i, s, a, u), this.tooltip = new ia(e, r, i, s, a, o), this.popup = l ? new sa(e, r, i, s, a, l) : void 0;
|
|
2467
2469
|
}
|
|
2468
2470
|
}
|
|
2469
|
-
const
|
|
2470
|
-
class
|
|
2471
|
+
const Jt = 4;
|
|
2472
|
+
class oa {
|
|
2471
2473
|
// Elements
|
|
2472
2474
|
pins = /* @__PURE__ */ new Set();
|
|
2473
2475
|
// Configuration
|
|
2474
2476
|
pinMaxWidth = 0;
|
|
2475
2477
|
pinMaxHeight = 0;
|
|
2476
2478
|
pinFade = !1;
|
|
2477
|
-
pinZoomMax =
|
|
2478
|
-
pinZoomDelta =
|
|
2479
|
+
pinZoomMax = Jt;
|
|
2480
|
+
pinZoomDelta = Jt;
|
|
2479
2481
|
set configuration(e) {
|
|
2480
|
-
this.pinFade = e?.pin?.fade ?? !0, this.pinZoomMax = e?.pin?.maxZoom ??
|
|
2482
|
+
this.pinFade = e?.pin?.fade ?? !0, this.pinZoomMax = e?.pin?.maxZoom ?? Jt, this.pinZoomDelta = this.pinZoomMax;
|
|
2481
2483
|
}
|
|
2482
2484
|
insert(e, n) {
|
|
2483
2485
|
this.update(e, n), this.pins.add(e);
|
|
@@ -2496,7 +2498,7 @@ class ia {
|
|
|
2496
2498
|
this.pinMaxWidth = e.reduce((n, r) => Math.max(n, r.width), 0), this.pinMaxHeight = e.reduce((n, r) => Math.max(n, r.height), 0), this.pinZoomDelta = Math.max(1, this.pinZoomMax - Math.log10(e.length));
|
|
2497
2499
|
}
|
|
2498
2500
|
render(e, n) {
|
|
2499
|
-
const r = e.zoom, i = n.mapSize, s =
|
|
2501
|
+
const r = e.zoom, i = n.mapSize, s = ut.offset(e, i, {
|
|
2500
2502
|
top: this.pinMaxHeight,
|
|
2501
2503
|
bottom: this.pinMaxHeight,
|
|
2502
2504
|
right: this.pinMaxWidth,
|
|
@@ -2506,8 +2508,8 @@ class ia {
|
|
|
2506
2508
|
s.contains(a.lat, a.lng) ? Number.isNaN(a.zoom) ? (a.component.invoke().setDisplayed(!0), a.component.invoke().setSuppressed(!0), a.component.invoke().setCollapsed(!1), a.marker.insert()) : (a.component.invoke().setSuppressed(!1), a.shown && r < a.zoom && a.zoom < r + this.pinZoomDelta ? (a.component.invoke().setDisplayed(!0), a.component.invoke().setCollapsed(!1), a.component.invoke().setScale(this.pinFade ? Math.max(0, 1 - (a.zoom - r) * 0.2) : 1), a.marker.insert()) : (a.component.invoke().setCollapsed(!0), a.component.invoke().getCollapsed() && (a.component.invoke().setDisplayed(!1), a.marker.remove()))) : (a.component.invoke().setDisplayed(!1), a.marker.remove());
|
|
2507
2509
|
}
|
|
2508
2510
|
}
|
|
2509
|
-
var
|
|
2510
|
-
class
|
|
2511
|
+
var la = (t) => 9;
|
|
2512
|
+
class ua {
|
|
2511
2513
|
// Elements
|
|
2512
2514
|
tooltips = /* @__PURE__ */ new Set();
|
|
2513
2515
|
// Configuration
|
|
@@ -2530,7 +2532,7 @@ class aa {
|
|
|
2530
2532
|
this.tooltipMaxWidth = e.reduce((n, r) => Math.max(n, r.width), 0), this.tooltipMaxHeight = e.reduce((n, r) => Math.max(n, r.height), 0);
|
|
2531
2533
|
}
|
|
2532
2534
|
render(e, n) {
|
|
2533
|
-
const r = e.zoom, i = n.mapSize, s =
|
|
2535
|
+
const r = e.zoom, i = n.mapSize, s = ut.offset(e, i, {
|
|
2534
2536
|
top: this.tooltipMaxHeight,
|
|
2535
2537
|
bottom: this.tooltipMaxHeight,
|
|
2536
2538
|
right: this.tooltipMaxWidth,
|
|
@@ -2548,7 +2550,7 @@ class aa {
|
|
|
2548
2550
|
a.component.invoke().setDisplayed(!1), a.marker.remove();
|
|
2549
2551
|
}
|
|
2550
2552
|
}
|
|
2551
|
-
class
|
|
2553
|
+
class ca {
|
|
2552
2554
|
// Elements
|
|
2553
2555
|
popups = /* @__PURE__ */ new Set();
|
|
2554
2556
|
// Configuration
|
|
@@ -2567,11 +2569,11 @@ class oa {
|
|
|
2567
2569
|
}
|
|
2568
2570
|
show(e, n) {
|
|
2569
2571
|
if (!e.popup || !e.tooltip || !e.pin || (e.pin.shown = !1, e.tooltip.shown = !1, e.popup.angle = e.tooltip.angle, e.popup.shown = !0, this.pan == !1)) return;
|
|
2570
|
-
const r = e.popup, i = n.getViewport(), s = i.bounds, a = i.zoom, o = n.getParameters().mapSize * Math.pow(2, a), l =
|
|
2571
|
-
let
|
|
2572
|
-
f < m ?
|
|
2573
|
-
let
|
|
2574
|
-
|
|
2572
|
+
const r = e.popup, i = n.getViewport(), s = i.bounds, a = i.zoom, o = n.getParameters().mapSize * Math.pow(2, a), l = at(s.ne.lat, s.sw.lng, o), c = at(s.sw.lat, s.ne.lng, o), f = c.x - l.x, p = c.y - l.y, m = r.width + r.padding * 8, h = r.height + r.padding * 8, v = at(r.lat, r.lng, o), b = an(m, h, e.tooltip.angle), C = v.x + b.x, J = C + m, oe = v.y + b.y, pe = oe + h, de = C - l.x, le = c.x - J, ye = oe - l.y, Te = c.y - pe;
|
|
2573
|
+
let X = 0;
|
|
2574
|
+
f < m ? X = (de - le) / 2 : (de < 0 && (X = de), le < 0 && (X = -le));
|
|
2575
|
+
let q = 0;
|
|
2576
|
+
p < h ? q = (ye - Te) / 2 : (ye < 0 && (q = ye), Te < 0 && (q = -Te)), (X != 0 || q != 0) && n.panBy(X, q);
|
|
2575
2577
|
}
|
|
2576
2578
|
hide(e) {
|
|
2577
2579
|
!e.popup || !e.tooltip || !e.pin || (e.pin.shown = !0, e.tooltip.shown = !0, e.popup.shown = !1);
|
|
@@ -2581,14 +2583,14 @@ class oa {
|
|
|
2581
2583
|
e.shown ? (e.component.invoke().setDisplayed(!0), e.component.invoke().setCollapsed(!1), e.component.invoke().setAngle(e.angle, !0), e.marker.insert()) : (e.component.invoke().setCollapsed(!0), e.component.invoke().getCollapsed() && (e.component.invoke().setDisplayed(!1), e.marker.remove()));
|
|
2582
2584
|
}
|
|
2583
2585
|
}
|
|
2584
|
-
class
|
|
2586
|
+
class fa {
|
|
2585
2587
|
provider;
|
|
2586
2588
|
pinManager;
|
|
2587
2589
|
tooltipManager;
|
|
2588
2590
|
popupManager;
|
|
2589
2591
|
elementsStore;
|
|
2590
2592
|
constructor(e) {
|
|
2591
|
-
this.provider = e, this.pinManager = new
|
|
2593
|
+
this.provider = e, this.pinManager = new oa(), this.tooltipManager = new ua(), this.popupManager = new ca(), this.elementsStore = /* @__PURE__ */ new Map();
|
|
2592
2594
|
}
|
|
2593
2595
|
set configuration(e) {
|
|
2594
2596
|
this.pinManager.configuration = e, this.popupManager.configuration = e;
|
|
@@ -2613,7 +2615,7 @@ class la {
|
|
|
2613
2615
|
insertElements(e, n) {
|
|
2614
2616
|
for (const r of e) {
|
|
2615
2617
|
let i = this.elementsStore.get(r.properites.id);
|
|
2616
|
-
i == null && (i = new
|
|
2618
|
+
i == null && (i = new aa(this.provider, r), i.tooltip.marker.div.addEventListener("click", (s) => n(s, r.properites.id)), this.elementsStore.set(r.properites.id, i)), this.pinManager.insert(i.pin, r.state), this.tooltipManager.insert(i.tooltip, r.state), i.popup != null && this.popupManager.insert(i.popup);
|
|
2617
2619
|
}
|
|
2618
2620
|
this.pinManager.refresh(), this.tooltipManager.refresh();
|
|
2619
2621
|
}
|
|
@@ -2638,11 +2640,11 @@ class la {
|
|
|
2638
2640
|
}
|
|
2639
2641
|
//#endregion
|
|
2640
2642
|
}
|
|
2641
|
-
const
|
|
2642
|
-
function
|
|
2643
|
+
const Yr = '(function(){"use strict";var h=[0,30,60,90,120,150,180,210,240,270,300,330],l=",";function i(e,t){return parseFloat(e[t]+e[t+1]+"."+e[t+2])}function f(e,t){return h[parseInt(e[t],16)]}function m(e){if(!e||e.length===0)return[];let t=[],n=e.split(l);for(let o=0;o<n.length;o++){let s=n[o],r=i(s,0),a=[];for(let c=3;c<s.length;c+=4){let v=i(s,c),T=f(s,c+3);a.push({zoom:v,angle:T})}t.push({zoom:r,directions:a})}return t}var d=e=>new Promise(t=>setTimeout(t,e));async function u(e,t){let n=0,o=Math.max(1,t?.retry?.times??1);for(;n<o;)try{return{data:await e(),error:null}}catch(s){if(n++,n==o){if(s instanceof Error)return(!t?.exceptions||t.exceptions.some(r=>s instanceof r)==!1)&&t?.catch?.(s),{data:null,error:s};throw t?.catch?.(s),s}else t?.retry?.delay&&await d(t.retry.delay)}throw Error("Unreachable code")}async function w(e,t,n,o,s){let r=await u(async()=>await fetch(e,{...n,method:"POST",body:t?JSON.stringify(t):void 0}),{retry:{times:o,delay:s}});if(r.error)throw r.error;let a=r.data;if(!a.ok)throw Error(await a.text());return await a.json()}const y="https://maps.api.arenarium.dev/states",p=3,E=500,S={async fetch(e){const n={headers:{"Cache-Control":self?.location.host.startsWith("localhost")||self?.location.host.startsWith("127.0.0.1")?"no-cache":""}},o=await w(y,e,n,p,E),s=m(o.states),r=o.jwt;return{states:s,jwt:r}}};class k{methods;constructor(t){this.methods=t}listen(){self.onmessage=this.onmessage.bind(this)}async onmessage(t){const{id:n,method:o,args:s}=t.data;try{const r=this.methods[o];if(typeof r!="function")throw new Error(`Unknown method: ${o}`);const a=await r(...s),c={id:n,result:a};self.postMessage(c)}catch(r){const a=r instanceof Error?r.message:String(r),c={id:n,error:a};self.postMessage(c)}}}new k(S).listen()})();\n', Gn = typeof self < "u" && self.Blob && new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);", Yr], { type: "text/javascript;charset=utf-8" });
|
|
2644
|
+
function ha(t) {
|
|
2643
2645
|
let e;
|
|
2644
2646
|
try {
|
|
2645
|
-
if (e =
|
|
2647
|
+
if (e = Gn && (self.URL || self.webkitURL).createObjectURL(Gn), !e) throw "";
|
|
2646
2648
|
const n = new Worker(e, {
|
|
2647
2649
|
name: t?.name
|
|
2648
2650
|
});
|
|
@@ -2651,15 +2653,15 @@ function ua(t) {
|
|
|
2651
2653
|
}), n;
|
|
2652
2654
|
} catch {
|
|
2653
2655
|
return new Worker(
|
|
2654
|
-
"data:text/javascript;charset=utf-8," + encodeURIComponent(
|
|
2656
|
+
"data:text/javascript;charset=utf-8," + encodeURIComponent(Yr),
|
|
2655
2657
|
{
|
|
2656
2658
|
name: t?.name
|
|
2657
2659
|
}
|
|
2658
2660
|
);
|
|
2659
2661
|
}
|
|
2660
2662
|
}
|
|
2661
|
-
var
|
|
2662
|
-
async function
|
|
2663
|
+
var pa = (t) => new Promise((e) => setTimeout(e, t));
|
|
2664
|
+
async function Jr(t, e) {
|
|
2663
2665
|
let n = 0, r = Math.max(1, e?.retry?.times ?? 1);
|
|
2664
2666
|
for (; n < r; ) try {
|
|
2665
2667
|
return { data: await t(), error: null };
|
|
@@ -2668,146 +2670,146 @@ async function Yr(t, e) {
|
|
|
2668
2670
|
if (i instanceof Error)
|
|
2669
2671
|
return (!e?.exceptions || e.exceptions.some((s) => i instanceof s) == !1) && e?.catch?.(i), { data: null, error: i };
|
|
2670
2672
|
throw e?.catch?.(i), i;
|
|
2671
|
-
} else e?.retry?.delay && await
|
|
2673
|
+
} else e?.retry?.delay && await pa(e.retry.delay);
|
|
2672
2674
|
}
|
|
2673
2675
|
throw Error("Unreachable code");
|
|
2674
2676
|
}
|
|
2675
|
-
async function
|
|
2676
|
-
let s = await
|
|
2677
|
+
async function da(t, e, n, r, i) {
|
|
2678
|
+
let s = await Jr(async () => await fetch(t, { ...n, method: "POST", body: e ? JSON.stringify(e) : void 0 }), { retry: { times: r, delay: i } });
|
|
2677
2679
|
if (s.error) throw s.error;
|
|
2678
2680
|
let a = s.data;
|
|
2679
2681
|
if (!a.ok) throw Error(await a.text());
|
|
2680
2682
|
return await a.json();
|
|
2681
2683
|
}
|
|
2682
|
-
async function
|
|
2683
|
-
let s = await
|
|
2684
|
+
async function ma(t, e, n, r, i) {
|
|
2685
|
+
let s = await Jr(async () => await fetch(t, { ...n, method: "PUT", body: e ? JSON.stringify(e) : void 0 }), { retry: { times: r, delay: i } });
|
|
2684
2686
|
if (s.error) throw s.error;
|
|
2685
2687
|
let a = s.data;
|
|
2686
2688
|
if (!a.ok) throw Error(await a.text());
|
|
2687
2689
|
}
|
|
2688
|
-
const Be = 0xc3a5c85c97cb3127n,
|
|
2689
|
-
function
|
|
2690
|
-
return t &
|
|
2690
|
+
const Be = 0xc3a5c85c97cb3127n, ue = 0xb492b66fbe98f273n, He = 0x9ae16a3b2f90404fn, Xr = 0xc949d7c7509e6557n, W = 0xffffffffffffffffn;
|
|
2691
|
+
function d(t) {
|
|
2692
|
+
return t & W;
|
|
2691
2693
|
}
|
|
2692
|
-
function
|
|
2693
|
-
return e === 0 ? t &
|
|
2694
|
+
function A(t, e) {
|
|
2695
|
+
return e === 0 ? t & W : (t = t & W, (t >> BigInt(e) | t << BigInt(64 - e)) & W);
|
|
2694
2696
|
}
|
|
2695
|
-
function
|
|
2696
|
-
return t = t &
|
|
2697
|
+
function va(t, e) {
|
|
2698
|
+
return t = t & W, (t >> BigInt(e) | t << BigInt(64 - e)) & W;
|
|
2697
2699
|
}
|
|
2698
|
-
function
|
|
2699
|
-
return
|
|
2700
|
+
function ft(t) {
|
|
2701
|
+
return d(t ^ t >> 47n);
|
|
2700
2702
|
}
|
|
2701
2703
|
function M(t, e = 0) {
|
|
2702
2704
|
let n = 0n;
|
|
2703
2705
|
for (let r = 0; r < 8; r++)
|
|
2704
2706
|
e + r < t.length && (n |= BigInt(t[e + r]) << BigInt(r * 8));
|
|
2705
|
-
return n &
|
|
2707
|
+
return n & W;
|
|
2706
2708
|
}
|
|
2707
|
-
function
|
|
2709
|
+
function Qn(t, e = 0) {
|
|
2708
2710
|
let n = 0n;
|
|
2709
2711
|
for (let r = 0; r < 4; r++)
|
|
2710
2712
|
e + r < t.length && (n |= BigInt(t[e + r]) << BigInt(r * 8));
|
|
2711
2713
|
return n & 0xffffffffn;
|
|
2712
2714
|
}
|
|
2713
|
-
function
|
|
2715
|
+
function ga(t) {
|
|
2714
2716
|
const e = 0x9ddfea08eb382d69n;
|
|
2715
|
-
let n = (t.first ^ t.second) * e &
|
|
2716
|
-
n ^= n >> 47n, n = n &
|
|
2717
|
-
let r = (t.second ^ n) * e &
|
|
2718
|
-
return r ^= r >> 47n, r = r * e &
|
|
2717
|
+
let n = (t.first ^ t.second) * e & W;
|
|
2718
|
+
n ^= n >> 47n, n = n & W;
|
|
2719
|
+
let r = (t.second ^ n) * e & W;
|
|
2720
|
+
return r ^= r >> 47n, r = r * e & W, r;
|
|
2719
2721
|
}
|
|
2720
2722
|
function qe(t, e) {
|
|
2721
|
-
return
|
|
2723
|
+
return ga({ first: t, second: e });
|
|
2722
2724
|
}
|
|
2723
|
-
function
|
|
2725
|
+
function wa(t) {
|
|
2724
2726
|
const e = t.length;
|
|
2725
2727
|
if (e > 8) {
|
|
2726
2728
|
const n = M(t), r = M(t, e - 8);
|
|
2727
|
-
return (qe(n,
|
|
2729
|
+
return (qe(n, va(r + BigInt(e) & W, e)) ^ r) & W;
|
|
2728
2730
|
}
|
|
2729
2731
|
if (e >= 4) {
|
|
2730
|
-
const n =
|
|
2731
|
-
return qe(BigInt(e) + (n << 3n) &
|
|
2732
|
+
const n = Qn(t);
|
|
2733
|
+
return qe(BigInt(e) + (n << 3n) & W, Qn(t, e - 4));
|
|
2732
2734
|
}
|
|
2733
2735
|
if (e > 0) {
|
|
2734
|
-
const n = BigInt(t[0]), r = BigInt(t[e >> 1]), i = BigInt(t[e - 1]), s =
|
|
2735
|
-
return
|
|
2736
|
+
const n = BigInt(t[0]), r = BigInt(t[e >> 1]), i = BigInt(t[e - 1]), s = d(n + (r << 8n)), a = d(BigInt(e) + (i << 2n));
|
|
2737
|
+
return d(ft(d(s * He) ^ d(a * Xr)) * He);
|
|
2736
2738
|
}
|
|
2737
2739
|
return He;
|
|
2738
2740
|
}
|
|
2739
|
-
function
|
|
2740
|
-
const e = t.length, n =
|
|
2741
|
-
return qe(
|
|
2741
|
+
function ka(t) {
|
|
2742
|
+
const e = t.length, n = d(M(t) * ue), r = M(t, 8), i = d(M(t, e - 8) * He), s = d(M(t, e - 16) * Be);
|
|
2743
|
+
return qe(d(A(d(n - r), 43) + A(i, 30) + s), d(n + A(r ^ Xr, 20) - i + BigInt(e)));
|
|
2742
2744
|
}
|
|
2743
|
-
function
|
|
2744
|
-
i =
|
|
2745
|
+
function ya(t, e, n, r, i, s) {
|
|
2746
|
+
i = d(i + t), s = A(d(s + i + r), 21);
|
|
2745
2747
|
const a = i;
|
|
2746
|
-
return i =
|
|
2748
|
+
return i = d(i + e), i = d(i + n), s = d(s + A(i, 44)), { first: d(i + r), second: d(s + a) };
|
|
2747
2749
|
}
|
|
2748
|
-
function
|
|
2749
|
-
return
|
|
2750
|
+
function St(t, e, n, r) {
|
|
2751
|
+
return ya(M(t, e), M(t, e + 8), M(t, e + 16), M(t, e + 24), n, r);
|
|
2750
2752
|
}
|
|
2751
|
-
function
|
|
2753
|
+
function ba(t) {
|
|
2752
2754
|
const e = t.length, n = M(t, 24);
|
|
2753
|
-
let r =
|
|
2754
|
-
r =
|
|
2755
|
-
const a =
|
|
2756
|
-
r =
|
|
2755
|
+
let r = d(M(t) + d((BigInt(e) + M(t, e - 16)) * Be)), i = A(d(r + n), 52), s = A(r, 37);
|
|
2756
|
+
r = d(r + M(t, 8)), s = d(s + A(r, 7)), r = d(r + M(t, 16));
|
|
2757
|
+
const a = d(r + n), u = d(i + A(r, 31) + s);
|
|
2758
|
+
r = d(M(t, 16) + M(t, e - 32));
|
|
2757
2759
|
const o = M(t, e - 8);
|
|
2758
|
-
i =
|
|
2759
|
-
const l =
|
|
2760
|
-
return
|
|
2760
|
+
i = A(d(r + o), 52), s = A(r, 37), r = d(r + M(t, e - 24)), s = d(s + A(r, 7)), r = d(r + M(t, e - 16));
|
|
2761
|
+
const l = d(r + o), c = d(i + A(r, 31) + s), f = ft(d(d(a + c) * He + d(l + u) * Be));
|
|
2762
|
+
return d(ft(d(f * Be + u)) * He);
|
|
2761
2763
|
}
|
|
2762
|
-
function
|
|
2764
|
+
function _a(t) {
|
|
2763
2765
|
let e;
|
|
2764
2766
|
typeof t == "string" ? e = new TextEncoder().encode(t) : e = t;
|
|
2765
2767
|
const n = e.length;
|
|
2766
2768
|
if (n <= 32)
|
|
2767
|
-
return n <= 16 ?
|
|
2769
|
+
return n <= 16 ? wa(e) : ka(e);
|
|
2768
2770
|
if (n <= 64)
|
|
2769
|
-
return
|
|
2770
|
-
let r = M(e), i =
|
|
2771
|
-
s =
|
|
2771
|
+
return ba(e);
|
|
2772
|
+
let r = M(e), i = d(M(e, n - 16) ^ ue), s = d(M(e, n - 56) ^ Be), a = St(e, n - 64, BigInt(n), i), u = St(e, n - 32, d(BigInt(n) * ue), Be);
|
|
2773
|
+
s = d(s + ft(a.second) * ue), r = d(A(d(s + r), 39) * ue), i = d(A(i, 33) * ue);
|
|
2772
2774
|
let o = n - 1 & -64, l = 0;
|
|
2773
2775
|
for (; o > 0; )
|
|
2774
|
-
r =
|
|
2775
|
-
return qe(qe(a.first, u.first) +
|
|
2776
|
+
r = d(A(d(r + i + a.first + M(e, l + 16)), 37) * ue), i = d(A(d(i + a.second + M(e, l + 48)), 42) * ue), r ^= u.second, i ^= a.first, s = A(s ^ u.first, 33), a = St(e, l, d(a.second * ue), d(r + u.first)), u = St(e, l + 32, d(s + u.second), i), [s, r] = [r, s], l += 64, o -= 64;
|
|
2777
|
+
return qe(qe(a.first, u.first) + d(ft(i) * ue) + s, qe(a.second, u.second) + r);
|
|
2776
2778
|
}
|
|
2777
|
-
function
|
|
2778
|
-
return
|
|
2779
|
+
function Ma(t) {
|
|
2780
|
+
return _a(JSON.stringify(t)).toString();
|
|
2779
2781
|
}
|
|
2780
|
-
let
|
|
2782
|
+
let Xt;
|
|
2781
2783
|
// @__NO_SIDE_EFFECTS__
|
|
2782
|
-
function
|
|
2784
|
+
function Kr(t) {
|
|
2783
2785
|
return {
|
|
2784
|
-
lang:
|
|
2786
|
+
lang: Xt?.lang,
|
|
2785
2787
|
message: t?.message,
|
|
2786
|
-
abortEarly:
|
|
2787
|
-
abortPipeEarly:
|
|
2788
|
+
abortEarly: Xt?.abortEarly,
|
|
2789
|
+
abortPipeEarly: Xt?.abortPipeEarly
|
|
2788
2790
|
};
|
|
2789
2791
|
}
|
|
2790
|
-
let
|
|
2792
|
+
let Ea;
|
|
2791
2793
|
// @__NO_SIDE_EFFECTS__
|
|
2792
|
-
function
|
|
2793
|
-
return
|
|
2794
|
+
function xa(t) {
|
|
2795
|
+
return Ea?.get(t);
|
|
2794
2796
|
}
|
|
2795
|
-
let
|
|
2797
|
+
let Sa;
|
|
2796
2798
|
// @__NO_SIDE_EFFECTS__
|
|
2797
|
-
function
|
|
2798
|
-
return
|
|
2799
|
+
function Pa(t) {
|
|
2800
|
+
return Sa?.get(t);
|
|
2799
2801
|
}
|
|
2800
|
-
let
|
|
2802
|
+
let Ta;
|
|
2801
2803
|
// @__NO_SIDE_EFFECTS__
|
|
2802
|
-
function
|
|
2803
|
-
return
|
|
2804
|
+
function Ia(t, e) {
|
|
2805
|
+
return Ta?.get(t)?.get(e);
|
|
2804
2806
|
}
|
|
2805
2807
|
// @__NO_SIDE_EFFECTS__
|
|
2806
2808
|
function Qe(t) {
|
|
2807
2809
|
const e = typeof t;
|
|
2808
2810
|
return e === "string" ? `"${t}"` : e === "number" || e === "bigint" || e === "boolean" ? `${t}` : e === "object" || e === "function" ? (t && Object.getPrototypeOf(t)?.constructor?.name) ?? "null" : e;
|
|
2809
2811
|
}
|
|
2810
|
-
function
|
|
2812
|
+
function N(t, e, n, r, i) {
|
|
2811
2813
|
const s = i && "input" in i ? i.input : n.value, a = i?.expected ?? t.expects ?? null, u = i?.received ?? /* @__PURE__ */ Qe(s), o = {
|
|
2812
2814
|
kind: t.kind,
|
|
2813
2815
|
type: t.type,
|
|
@@ -2821,25 +2823,25 @@ function C(t, e, n, r, i) {
|
|
|
2821
2823
|
lang: r.lang,
|
|
2822
2824
|
abortEarly: r.abortEarly,
|
|
2823
2825
|
abortPipeEarly: r.abortPipeEarly
|
|
2824
|
-
}, l = t.kind === "schema", c = i?.message ?? t.message ?? /* @__PURE__ */
|
|
2826
|
+
}, l = t.kind === "schema", c = i?.message ?? t.message ?? /* @__PURE__ */ Ia(t.reference, o.lang) ?? (l ? /* @__PURE__ */ Pa(o.lang) : null) ?? r.message ?? /* @__PURE__ */ xa(o.lang);
|
|
2825
2827
|
c !== void 0 && (o.message = typeof c == "function" ? c(o) : c), l && (n.typed = !1), n.issues ? n.issues.push(o) : n.issues = [o];
|
|
2826
2828
|
}
|
|
2827
2829
|
// @__NO_SIDE_EFFECTS__
|
|
2828
|
-
function
|
|
2830
|
+
function Y(t) {
|
|
2829
2831
|
return {
|
|
2830
2832
|
version: 1,
|
|
2831
2833
|
vendor: "valibot",
|
|
2832
2834
|
validate(e) {
|
|
2833
|
-
return t["~run"]({ value: e }, /* @__PURE__ */
|
|
2835
|
+
return t["~run"]({ value: e }, /* @__PURE__ */ Kr());
|
|
2834
2836
|
}
|
|
2835
2837
|
};
|
|
2836
2838
|
}
|
|
2837
2839
|
// @__NO_SIDE_EFFECTS__
|
|
2838
|
-
function
|
|
2840
|
+
function Aa(t, e) {
|
|
2839
2841
|
const n = [...new Set(t)];
|
|
2840
2842
|
return n.length > 1 ? `(${n.join(` ${e} `)})` : n[0] ?? "never";
|
|
2841
2843
|
}
|
|
2842
|
-
var
|
|
2844
|
+
var wn = class extends Error {
|
|
2843
2845
|
/**
|
|
2844
2846
|
* Creates a Valibot error with useful information.
|
|
2845
2847
|
*
|
|
@@ -2850,136 +2852,136 @@ var vn = class extends Error {
|
|
|
2850
2852
|
}
|
|
2851
2853
|
};
|
|
2852
2854
|
// @__NO_SIDE_EFFECTS__
|
|
2853
|
-
function
|
|
2855
|
+
function O(t) {
|
|
2854
2856
|
return {
|
|
2855
2857
|
kind: "transformation",
|
|
2856
2858
|
type: "args",
|
|
2857
|
-
reference:
|
|
2859
|
+
reference: O,
|
|
2858
2860
|
async: !1,
|
|
2859
2861
|
schema: t,
|
|
2860
2862
|
"~run"(e, n) {
|
|
2861
2863
|
const r = e.value;
|
|
2862
2864
|
return e.value = (...i) => {
|
|
2863
2865
|
const s = this.schema["~run"]({ value: i }, n);
|
|
2864
|
-
if (s.issues) throw new
|
|
2866
|
+
if (s.issues) throw new wn(s.issues);
|
|
2865
2867
|
return r(...s.value);
|
|
2866
2868
|
}, e;
|
|
2867
2869
|
}
|
|
2868
2870
|
};
|
|
2869
2871
|
}
|
|
2870
2872
|
// @__NO_SIDE_EFFECTS__
|
|
2871
|
-
function
|
|
2873
|
+
function Gr(t, e) {
|
|
2872
2874
|
return {
|
|
2873
2875
|
kind: "validation",
|
|
2874
2876
|
type: "check",
|
|
2875
|
-
reference:
|
|
2877
|
+
reference: Gr,
|
|
2876
2878
|
async: !1,
|
|
2877
2879
|
expects: null,
|
|
2878
2880
|
requirement: t,
|
|
2879
2881
|
message: e,
|
|
2880
2882
|
"~run"(n, r) {
|
|
2881
|
-
return n.typed && !this.requirement(n.value) &&
|
|
2883
|
+
return n.typed && !this.requirement(n.value) && N(this, "input", n, r), n;
|
|
2882
2884
|
}
|
|
2883
2885
|
};
|
|
2884
2886
|
}
|
|
2885
2887
|
// @__NO_SIDE_EFFECTS__
|
|
2886
|
-
function
|
|
2888
|
+
function Qr(t, e) {
|
|
2887
2889
|
return {
|
|
2888
2890
|
kind: "validation",
|
|
2889
2891
|
type: "length",
|
|
2890
|
-
reference:
|
|
2892
|
+
reference: Qr,
|
|
2891
2893
|
async: !1,
|
|
2892
2894
|
expects: `${t}`,
|
|
2893
2895
|
requirement: t,
|
|
2894
2896
|
message: e,
|
|
2895
2897
|
"~run"(n, r) {
|
|
2896
|
-
return n.typed && n.value.length !== this.requirement &&
|
|
2898
|
+
return n.typed && n.value.length !== this.requirement && N(this, "length", n, r, { received: `${n.value.length}` }), n;
|
|
2897
2899
|
}
|
|
2898
2900
|
};
|
|
2899
2901
|
}
|
|
2900
2902
|
// @__NO_SIDE_EFFECTS__
|
|
2901
|
-
function
|
|
2903
|
+
function ht(t, e) {
|
|
2902
2904
|
return {
|
|
2903
2905
|
kind: "validation",
|
|
2904
2906
|
type: "max_value",
|
|
2905
|
-
reference:
|
|
2907
|
+
reference: ht,
|
|
2906
2908
|
async: !1,
|
|
2907
2909
|
expects: `<=${t instanceof Date ? t.toJSON() : /* @__PURE__ */ Qe(t)}`,
|
|
2908
2910
|
requirement: t,
|
|
2909
2911
|
message: e,
|
|
2910
2912
|
"~run"(n, r) {
|
|
2911
|
-
return n.typed && !(n.value <= this.requirement) &&
|
|
2913
|
+
return n.typed && !(n.value <= this.requirement) && N(this, "value", n, r, { received: n.value instanceof Date ? n.value.toJSON() : /* @__PURE__ */ Qe(n.value) }), n;
|
|
2912
2914
|
}
|
|
2913
2915
|
};
|
|
2914
2916
|
}
|
|
2915
2917
|
// @__NO_SIDE_EFFECTS__
|
|
2916
|
-
function
|
|
2918
|
+
function kn(t, e) {
|
|
2917
2919
|
return {
|
|
2918
2920
|
kind: "validation",
|
|
2919
2921
|
type: "min_length",
|
|
2920
|
-
reference:
|
|
2922
|
+
reference: kn,
|
|
2921
2923
|
async: !1,
|
|
2922
2924
|
expects: `>=${t}`,
|
|
2923
2925
|
requirement: t,
|
|
2924
2926
|
message: e,
|
|
2925
2927
|
"~run"(n, r) {
|
|
2926
|
-
return n.typed && n.value.length < this.requirement &&
|
|
2928
|
+
return n.typed && n.value.length < this.requirement && N(this, "length", n, r, { received: `${n.value.length}` }), n;
|
|
2927
2929
|
}
|
|
2928
2930
|
};
|
|
2929
2931
|
}
|
|
2930
2932
|
// @__NO_SIDE_EFFECTS__
|
|
2931
|
-
function
|
|
2933
|
+
function H(t, e) {
|
|
2932
2934
|
return {
|
|
2933
2935
|
kind: "validation",
|
|
2934
2936
|
type: "min_value",
|
|
2935
|
-
reference:
|
|
2937
|
+
reference: H,
|
|
2936
2938
|
async: !1,
|
|
2937
2939
|
expects: `>=${t instanceof Date ? t.toJSON() : /* @__PURE__ */ Qe(t)}`,
|
|
2938
2940
|
requirement: t,
|
|
2939
2941
|
message: e,
|
|
2940
2942
|
"~run"(n, r) {
|
|
2941
|
-
return n.typed && !(n.value >= this.requirement) &&
|
|
2943
|
+
return n.typed && !(n.value >= this.requirement) && N(this, "value", n, r, { received: n.value instanceof Date ? n.value.toJSON() : /* @__PURE__ */ Qe(n.value) }), n;
|
|
2942
2944
|
}
|
|
2943
2945
|
};
|
|
2944
2946
|
}
|
|
2945
2947
|
// @__NO_SIDE_EFFECTS__
|
|
2946
|
-
function
|
|
2948
|
+
function $(t) {
|
|
2947
2949
|
return {
|
|
2948
2950
|
kind: "transformation",
|
|
2949
2951
|
type: "returns",
|
|
2950
|
-
reference:
|
|
2952
|
+
reference: $,
|
|
2951
2953
|
async: !1,
|
|
2952
2954
|
schema: t,
|
|
2953
2955
|
"~run"(e, n) {
|
|
2954
2956
|
const r = e.value;
|
|
2955
2957
|
return e.value = (...i) => {
|
|
2956
2958
|
const s = this.schema["~run"]({ value: r(...i) }, n);
|
|
2957
|
-
if (s.issues) throw new
|
|
2959
|
+
if (s.issues) throw new wn(s.issues);
|
|
2958
2960
|
return s.value;
|
|
2959
2961
|
}, e;
|
|
2960
2962
|
}
|
|
2961
2963
|
};
|
|
2962
2964
|
}
|
|
2963
2965
|
// @__NO_SIDE_EFFECTS__
|
|
2964
|
-
function
|
|
2966
|
+
function Na(t, e, n) {
|
|
2965
2967
|
return typeof t.fallback == "function" ? t.fallback(e, n) : t.fallback;
|
|
2966
2968
|
}
|
|
2967
2969
|
// @__NO_SIDE_EFFECTS__
|
|
2968
|
-
function
|
|
2970
|
+
function ei(t, e, n) {
|
|
2969
2971
|
return typeof t.default == "function" ? t.default(e, n) : t.default;
|
|
2970
2972
|
}
|
|
2971
2973
|
// @__NO_SIDE_EFFECTS__
|
|
2972
|
-
function
|
|
2974
|
+
function ti(t, e) {
|
|
2973
2975
|
return {
|
|
2974
2976
|
kind: "schema",
|
|
2975
2977
|
type: "array",
|
|
2976
|
-
reference:
|
|
2978
|
+
reference: ti,
|
|
2977
2979
|
expects: "Array",
|
|
2978
2980
|
async: !1,
|
|
2979
2981
|
item: t,
|
|
2980
2982
|
message: e,
|
|
2981
2983
|
get "~standard"() {
|
|
2982
|
-
return /* @__PURE__ */
|
|
2984
|
+
return /* @__PURE__ */ Y(this);
|
|
2983
2985
|
},
|
|
2984
2986
|
"~run"(n, r) {
|
|
2985
2987
|
const i = n.value;
|
|
@@ -3004,60 +3006,60 @@ function ei(t, e) {
|
|
|
3004
3006
|
}
|
|
3005
3007
|
u.typed || (n.typed = !1), n.value.push(u.value);
|
|
3006
3008
|
}
|
|
3007
|
-
} else
|
|
3009
|
+
} else N(this, "type", n, r);
|
|
3008
3010
|
return n;
|
|
3009
3011
|
}
|
|
3010
3012
|
};
|
|
3011
3013
|
}
|
|
3012
3014
|
// @__NO_SIDE_EFFECTS__
|
|
3013
|
-
function
|
|
3015
|
+
function ni(t) {
|
|
3014
3016
|
return {
|
|
3015
3017
|
kind: "schema",
|
|
3016
3018
|
type: "boolean",
|
|
3017
|
-
reference:
|
|
3019
|
+
reference: ni,
|
|
3018
3020
|
expects: "boolean",
|
|
3019
3021
|
async: !1,
|
|
3020
3022
|
message: t,
|
|
3021
3023
|
get "~standard"() {
|
|
3022
|
-
return /* @__PURE__ */
|
|
3024
|
+
return /* @__PURE__ */ Y(this);
|
|
3023
3025
|
},
|
|
3024
3026
|
"~run"(e, n) {
|
|
3025
|
-
return typeof e.value == "boolean" ? e.typed = !0 :
|
|
3027
|
+
return typeof e.value == "boolean" ? e.typed = !0 : N(this, "type", e, n), e;
|
|
3026
3028
|
}
|
|
3027
3029
|
};
|
|
3028
3030
|
}
|
|
3029
3031
|
// @__NO_SIDE_EFFECTS__
|
|
3030
|
-
function
|
|
3032
|
+
function ri(t, e) {
|
|
3031
3033
|
return {
|
|
3032
3034
|
kind: "schema",
|
|
3033
3035
|
type: "custom",
|
|
3034
|
-
reference:
|
|
3036
|
+
reference: ri,
|
|
3035
3037
|
expects: "unknown",
|
|
3036
3038
|
async: !1,
|
|
3037
3039
|
check: t,
|
|
3038
3040
|
message: e,
|
|
3039
3041
|
get "~standard"() {
|
|
3040
|
-
return /* @__PURE__ */
|
|
3042
|
+
return /* @__PURE__ */ Y(this);
|
|
3041
3043
|
},
|
|
3042
3044
|
"~run"(n, r) {
|
|
3043
|
-
return this.check(n.value) ? n.typed = !0 :
|
|
3045
|
+
return this.check(n.value) ? n.typed = !0 : N(this, "type", n, r), n;
|
|
3044
3046
|
}
|
|
3045
3047
|
};
|
|
3046
3048
|
}
|
|
3047
3049
|
// @__NO_SIDE_EFFECTS__
|
|
3048
|
-
function
|
|
3050
|
+
function I(t) {
|
|
3049
3051
|
return {
|
|
3050
3052
|
kind: "schema",
|
|
3051
3053
|
type: "function",
|
|
3052
|
-
reference:
|
|
3054
|
+
reference: I,
|
|
3053
3055
|
expects: "Function",
|
|
3054
3056
|
async: !1,
|
|
3055
3057
|
message: t,
|
|
3056
3058
|
get "~standard"() {
|
|
3057
|
-
return /* @__PURE__ */
|
|
3059
|
+
return /* @__PURE__ */ Y(this);
|
|
3058
3060
|
},
|
|
3059
3061
|
"~run"(e, n) {
|
|
3060
|
-
return typeof e.value == "function" ? e.typed = !0 :
|
|
3062
|
+
return typeof e.value == "function" ? e.typed = !0 : N(this, "type", e, n), e;
|
|
3061
3063
|
}
|
|
3062
3064
|
};
|
|
3063
3065
|
}
|
|
@@ -3072,10 +3074,10 @@ function ze(t, e) {
|
|
|
3072
3074
|
literal: t,
|
|
3073
3075
|
message: e,
|
|
3074
3076
|
get "~standard"() {
|
|
3075
|
-
return /* @__PURE__ */
|
|
3077
|
+
return /* @__PURE__ */ Y(this);
|
|
3076
3078
|
},
|
|
3077
3079
|
"~run"(n, r) {
|
|
3078
|
-
return n.value === this.literal ? n.typed = !0 :
|
|
3080
|
+
return n.value === this.literal ? n.typed = !0 : N(this, "type", n, r), n;
|
|
3079
3081
|
}
|
|
3080
3082
|
};
|
|
3081
3083
|
}
|
|
@@ -3089,25 +3091,25 @@ function P(t) {
|
|
|
3089
3091
|
async: !1,
|
|
3090
3092
|
message: t,
|
|
3091
3093
|
get "~standard"() {
|
|
3092
|
-
return /* @__PURE__ */
|
|
3094
|
+
return /* @__PURE__ */ Y(this);
|
|
3093
3095
|
},
|
|
3094
3096
|
"~run"(e, n) {
|
|
3095
|
-
return typeof e.value == "number" && !isNaN(e.value) ? e.typed = !0 :
|
|
3097
|
+
return typeof e.value == "number" && !isNaN(e.value) ? e.typed = !0 : N(this, "type", e, n), e;
|
|
3096
3098
|
}
|
|
3097
3099
|
};
|
|
3098
3100
|
}
|
|
3099
3101
|
// @__NO_SIDE_EFFECTS__
|
|
3100
|
-
function
|
|
3102
|
+
function B(t, e) {
|
|
3101
3103
|
return {
|
|
3102
3104
|
kind: "schema",
|
|
3103
3105
|
type: "object",
|
|
3104
|
-
reference:
|
|
3106
|
+
reference: B,
|
|
3105
3107
|
expects: "Object",
|
|
3106
3108
|
async: !1,
|
|
3107
3109
|
entries: t,
|
|
3108
3110
|
message: e,
|
|
3109
3111
|
get "~standard"() {
|
|
3110
|
-
return /* @__PURE__ */
|
|
3112
|
+
return /* @__PURE__ */ Y(this);
|
|
3111
3113
|
},
|
|
3112
3114
|
"~run"(n, r) {
|
|
3113
3115
|
const i = n.value;
|
|
@@ -3116,7 +3118,7 @@ function q(t, e) {
|
|
|
3116
3118
|
for (const s in this.entries) {
|
|
3117
3119
|
const a = this.entries[s];
|
|
3118
3120
|
if (s in i || (a.type === "exact_optional" || a.type === "optional" || a.type === "nullish") && a.default !== void 0) {
|
|
3119
|
-
const u = s in i ? i[s] : /* @__PURE__ */
|
|
3121
|
+
const u = s in i ? i[s] : /* @__PURE__ */ ei(a), o = a["~run"]({ value: u }, r);
|
|
3120
3122
|
if (o.issues) {
|
|
3121
3123
|
const l = {
|
|
3122
3124
|
type: "object",
|
|
@@ -3133,8 +3135,8 @@ function q(t, e) {
|
|
|
3133
3135
|
}
|
|
3134
3136
|
}
|
|
3135
3137
|
o.typed || (n.typed = !1), n.value[s] = o.value;
|
|
3136
|
-
} else if (a.fallback !== void 0) n.value[s] = /* @__PURE__ */
|
|
3137
|
-
else if (a.type !== "exact_optional" && a.type !== "optional" && a.type !== "nullish" && (
|
|
3138
|
+
} else if (a.fallback !== void 0) n.value[s] = /* @__PURE__ */ Na(a);
|
|
3139
|
+
else if (a.type !== "exact_optional" && a.type !== "optional" && a.type !== "nullish" && (N(this, "key", n, r, {
|
|
3138
3140
|
input: void 0,
|
|
3139
3141
|
expected: `"${s}"`,
|
|
3140
3142
|
path: [{
|
|
@@ -3147,7 +3149,7 @@ function q(t, e) {
|
|
|
3147
3149
|
}), r.abortEarly))
|
|
3148
3150
|
break;
|
|
3149
3151
|
}
|
|
3150
|
-
} else
|
|
3152
|
+
} else N(this, "type", n, r);
|
|
3151
3153
|
return n;
|
|
3152
3154
|
}
|
|
3153
3155
|
};
|
|
@@ -3163,10 +3165,10 @@ function T(t, e) {
|
|
|
3163
3165
|
wrapped: t,
|
|
3164
3166
|
default: e,
|
|
3165
3167
|
get "~standard"() {
|
|
3166
|
-
return /* @__PURE__ */
|
|
3168
|
+
return /* @__PURE__ */ Y(this);
|
|
3167
3169
|
},
|
|
3168
3170
|
"~run"(n, r) {
|
|
3169
|
-
return n.value === void 0 && (this.default !== void 0 && (n.value = /* @__PURE__ */
|
|
3171
|
+
return n.value === void 0 && (this.default !== void 0 && (n.value = /* @__PURE__ */ ei(this, n, r)), n.value === void 0) ? (n.typed = !0, n) : this.wrapped["~run"](n, r);
|
|
3170
3172
|
}
|
|
3171
3173
|
};
|
|
3172
3174
|
}
|
|
@@ -3180,25 +3182,25 @@ function ge(t) {
|
|
|
3180
3182
|
async: !1,
|
|
3181
3183
|
message: t,
|
|
3182
3184
|
get "~standard"() {
|
|
3183
|
-
return /* @__PURE__ */
|
|
3185
|
+
return /* @__PURE__ */ Y(this);
|
|
3184
3186
|
},
|
|
3185
3187
|
"~run"(e, n) {
|
|
3186
|
-
return typeof e.value == "string" ? e.typed = !0 :
|
|
3188
|
+
return typeof e.value == "string" ? e.typed = !0 : N(this, "type", e, n), e;
|
|
3187
3189
|
}
|
|
3188
3190
|
};
|
|
3189
3191
|
}
|
|
3190
3192
|
// @__NO_SIDE_EFFECTS__
|
|
3191
|
-
function
|
|
3193
|
+
function L(t, e) {
|
|
3192
3194
|
return {
|
|
3193
3195
|
kind: "schema",
|
|
3194
3196
|
type: "tuple",
|
|
3195
|
-
reference:
|
|
3197
|
+
reference: L,
|
|
3196
3198
|
expects: "Array",
|
|
3197
3199
|
async: !1,
|
|
3198
3200
|
items: t,
|
|
3199
3201
|
message: e,
|
|
3200
3202
|
get "~standard"() {
|
|
3201
|
-
return /* @__PURE__ */
|
|
3203
|
+
return /* @__PURE__ */ Y(this);
|
|
3202
3204
|
},
|
|
3203
3205
|
"~run"(n, r) {
|
|
3204
3206
|
const i = n.value;
|
|
@@ -3223,29 +3225,29 @@ function F(t, e) {
|
|
|
3223
3225
|
}
|
|
3224
3226
|
u.typed || (n.typed = !1), n.value.push(u.value);
|
|
3225
3227
|
}
|
|
3226
|
-
} else
|
|
3228
|
+
} else N(this, "type", n, r);
|
|
3227
3229
|
return n;
|
|
3228
3230
|
}
|
|
3229
3231
|
};
|
|
3230
3232
|
}
|
|
3231
3233
|
// @__NO_SIDE_EFFECTS__
|
|
3232
|
-
function
|
|
3234
|
+
function er(t) {
|
|
3233
3235
|
let e;
|
|
3234
3236
|
if (t) for (const n of t) e ? e.push(...n.issues) : e = n.issues;
|
|
3235
3237
|
return e;
|
|
3236
3238
|
}
|
|
3237
3239
|
// @__NO_SIDE_EFFECTS__
|
|
3238
|
-
function
|
|
3240
|
+
function yn(t, e) {
|
|
3239
3241
|
return {
|
|
3240
3242
|
kind: "schema",
|
|
3241
3243
|
type: "union",
|
|
3242
|
-
reference:
|
|
3243
|
-
expects: /* @__PURE__ */
|
|
3244
|
+
reference: yn,
|
|
3245
|
+
expects: /* @__PURE__ */ Aa(t.map((n) => n.expects), "|"),
|
|
3244
3246
|
async: !1,
|
|
3245
3247
|
options: t,
|
|
3246
3248
|
message: e,
|
|
3247
3249
|
get "~standard"() {
|
|
3248
|
-
return /* @__PURE__ */
|
|
3250
|
+
return /* @__PURE__ */ Y(this);
|
|
3249
3251
|
},
|
|
3250
3252
|
"~run"(n, r) {
|
|
3251
3253
|
let i, s, a;
|
|
@@ -3261,10 +3263,10 @@ function wn(t, e) {
|
|
|
3261
3263
|
if (i) return i;
|
|
3262
3264
|
if (s) {
|
|
3263
3265
|
if (s.length === 1) return s[0];
|
|
3264
|
-
|
|
3266
|
+
N(this, "type", n, r, { issues: /* @__PURE__ */ er(s) }), n.typed = !0;
|
|
3265
3267
|
} else {
|
|
3266
3268
|
if (a?.length === 1) return a[0];
|
|
3267
|
-
|
|
3269
|
+
N(this, "type", n, r, { issues: /* @__PURE__ */ er(a) });
|
|
3268
3270
|
}
|
|
3269
3271
|
return n;
|
|
3270
3272
|
}
|
|
@@ -3280,16 +3282,16 @@ function Oe(t) {
|
|
|
3280
3282
|
async: !1,
|
|
3281
3283
|
message: t,
|
|
3282
3284
|
get "~standard"() {
|
|
3283
|
-
return /* @__PURE__ */
|
|
3285
|
+
return /* @__PURE__ */ Y(this);
|
|
3284
3286
|
},
|
|
3285
3287
|
"~run"(e, n) {
|
|
3286
|
-
return e.value === void 0 ? e.typed = !0 :
|
|
3288
|
+
return e.value === void 0 ? e.typed = !0 : N(this, "type", e, n), e;
|
|
3287
3289
|
}
|
|
3288
3290
|
};
|
|
3289
3291
|
}
|
|
3290
|
-
function
|
|
3291
|
-
const r = t["~run"]({ value: e }, /* @__PURE__ */
|
|
3292
|
-
if (r.issues) throw new
|
|
3292
|
+
function Pt(t, e, n) {
|
|
3293
|
+
const r = t["~run"]({ value: e }, /* @__PURE__ */ Kr(n));
|
|
3294
|
+
if (r.issues) throw new wn(r.issues);
|
|
3293
3295
|
return r.value;
|
|
3294
3296
|
}
|
|
3295
3297
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -3298,7 +3300,7 @@ function w(...t) {
|
|
|
3298
3300
|
...t[0],
|
|
3299
3301
|
pipe: t,
|
|
3300
3302
|
get "~standard"() {
|
|
3301
|
-
return /* @__PURE__ */
|
|
3303
|
+
return /* @__PURE__ */ Y(this);
|
|
3302
3304
|
},
|
|
3303
3305
|
"~run"(e, n) {
|
|
3304
3306
|
for (const r of t) if (r.kind !== "metadata") {
|
|
@@ -3312,16 +3314,16 @@ function w(...t) {
|
|
|
3312
3314
|
}
|
|
3313
3315
|
};
|
|
3314
3316
|
}
|
|
3315
|
-
var
|
|
3316
|
-
const
|
|
3317
|
-
class
|
|
3317
|
+
var ii = /* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ H(-90), /* @__PURE__ */ ht(90)), si = /* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ H(-180), /* @__PURE__ */ ht(180)), Rt = /* @__PURE__ */ B({ lat: ii, lng: si }), ai = /* @__PURE__ */ B({ sw: Rt, ne: Rt }), Ca = /* @__PURE__ */ B({ bounds: ai, center: Rt, zoom: /* @__PURE__ */ P() }), Ze = /* @__PURE__ */ ri((t) => t instanceof HTMLElement, "Must be an HTMLElement"), Ra = /* @__PURE__ */ B({ mapSize: /* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ H(1)), zoomMin: /* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ H(0)), zoomMax: /* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ H(0)), zoomScale: /* @__PURE__ */ yn([/* @__PURE__ */ ze(1), /* @__PURE__ */ ze(2), /* @__PURE__ */ ze(10)]) }), Da = /* @__PURE__ */ B({ inserted: /* @__PURE__ */ w(/* @__PURE__ */ I(), /* @__PURE__ */ O(/* @__PURE__ */ L([])), /* @__PURE__ */ $(/* @__PURE__ */ ni())), insert: /* @__PURE__ */ w(/* @__PURE__ */ I(), /* @__PURE__ */ O(/* @__PURE__ */ L([])), /* @__PURE__ */ $(/* @__PURE__ */ Oe())), remove: /* @__PURE__ */ w(/* @__PURE__ */ I(), /* @__PURE__ */ O(/* @__PURE__ */ L([])), /* @__PURE__ */ $(/* @__PURE__ */ Oe())), update: /* @__PURE__ */ w(/* @__PURE__ */ I(), /* @__PURE__ */ O(/* @__PURE__ */ L([/* @__PURE__ */ P()])), /* @__PURE__ */ $(/* @__PURE__ */ Oe())) }), tr = /* @__PURE__ */ yn([/* @__PURE__ */ ze("idle"), /* @__PURE__ */ ze("move"), /* @__PURE__ */ ze("click")]), za = /* @__PURE__ */ B({ getParameters: /* @__PURE__ */ w(/* @__PURE__ */ I(), /* @__PURE__ */ O(/* @__PURE__ */ L([])), /* @__PURE__ */ $(Ra)), getContainer: /* @__PURE__ */ w(/* @__PURE__ */ I(), /* @__PURE__ */ O(/* @__PURE__ */ L([])), /* @__PURE__ */ $(Ze)), getZoom: /* @__PURE__ */ w(/* @__PURE__ */ I(), /* @__PURE__ */ O(/* @__PURE__ */ L([])), /* @__PURE__ */ $(/* @__PURE__ */ P())), getBounds: /* @__PURE__ */ w(/* @__PURE__ */ I(), /* @__PURE__ */ O(/* @__PURE__ */ L([])), /* @__PURE__ */ $(ai)), getCenter: /* @__PURE__ */ w(/* @__PURE__ */ I(), /* @__PURE__ */ O(/* @__PURE__ */ L([])), /* @__PURE__ */ $(Rt)), getViewport: /* @__PURE__ */ w(/* @__PURE__ */ I(), /* @__PURE__ */ O(/* @__PURE__ */ L([])), /* @__PURE__ */ $(Ca)), panBy: /* @__PURE__ */ w(/* @__PURE__ */ I(), /* @__PURE__ */ O(/* @__PURE__ */ L([/* @__PURE__ */ P(), /* @__PURE__ */ P()])), /* @__PURE__ */ $(/* @__PURE__ */ Oe())), createMarker: /* @__PURE__ */ w(/* @__PURE__ */ I(), /* @__PURE__ */ O(/* @__PURE__ */ L([Ze, ii, si, /* @__PURE__ */ P()])), /* @__PURE__ */ $(Da)), subscribe: /* @__PURE__ */ w(/* @__PURE__ */ I(), /* @__PURE__ */ O(/* @__PURE__ */ L([tr, /* @__PURE__ */ I()])), /* @__PURE__ */ $(/* @__PURE__ */ Oe())), unsubscribe: /* @__PURE__ */ w(/* @__PURE__ */ I(), /* @__PURE__ */ O(/* @__PURE__ */ L([tr, /* @__PURE__ */ I()])), /* @__PURE__ */ $(/* @__PURE__ */ Oe())) }), Kt = /* @__PURE__ */ w(/* @__PURE__ */ I(), /* @__PURE__ */ O(/* @__PURE__ */ L([/* @__PURE__ */ ge(), Ze]))), Gt = /* @__PURE__ */ w(/* @__PURE__ */ B({ width: /* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ H(0)), height: /* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ H(0)), padding: /* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ H(0)) }), /* @__PURE__ */ Gr((t) => Math.min(t.width, t.height) / t.padding >= 4, "Minimum of width or height must be greater than or equal to 4 * padding")), Oa = /* @__PURE__ */ B({ background: /* @__PURE__ */ T(/* @__PURE__ */ ge()), radius: /* @__PURE__ */ T(/* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ H(0))), shadow: /* @__PURE__ */ T(/* @__PURE__ */ ge()) }), nr = /* @__PURE__ */ B({ background: /* @__PURE__ */ T(/* @__PURE__ */ ge()), radius: /* @__PURE__ */ T(/* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ H(0))), filter: /* @__PURE__ */ T(/* @__PURE__ */ ge()) }), La = /* @__PURE__ */ B({ id: /* @__PURE__ */ w(/* @__PURE__ */ ge(), /* @__PURE__ */ kn(1)), rank: /* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ H(0)), lat: /* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ H(-90), /* @__PURE__ */ ht(90)), lng: /* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ H(-180), /* @__PURE__ */ ht(180)), tooltip: /* @__PURE__ */ B({ element: Ze, style: /* @__PURE__ */ T(nr), dimensions: /* @__PURE__ */ T(Gt), initialize: /* @__PURE__ */ T(Kt) }), pin: /* @__PURE__ */ T(/* @__PURE__ */ B({ element: /* @__PURE__ */ T(Ze), style: /* @__PURE__ */ T(Oa), dimensions: /* @__PURE__ */ T(Gt), initialize: /* @__PURE__ */ T(Kt) })), popup: /* @__PURE__ */ T(/* @__PURE__ */ B({ element: Ze, style: /* @__PURE__ */ T(nr), dimensions: /* @__PURE__ */ T(Gt), initialize: /* @__PURE__ */ T(Kt) })) }), Fa = /* @__PURE__ */ w(/* @__PURE__ */ ge(), /* @__PURE__ */ Qr(32)), $a = /* @__PURE__ */ w(/* @__PURE__ */ ge(), /* @__PURE__ */ kn(1));
|
|
3318
|
+
const Va = "1.3.9";
|
|
3319
|
+
class ja {
|
|
3318
3320
|
apiKey;
|
|
3319
3321
|
apiJwt;
|
|
3320
3322
|
markerStatesStore;
|
|
3321
3323
|
markerStatesWorker;
|
|
3322
3324
|
markerStatesWorkerClient;
|
|
3323
3325
|
constructor(e, n) {
|
|
3324
|
-
this.apiKey = e, this.apiJwt = n, this.markerStatesStore = /* @__PURE__ */ new Map(), this.markerStatesWorker = new
|
|
3326
|
+
this.apiKey = e, this.apiJwt = n, this.markerStatesStore = /* @__PURE__ */ new Map(), this.markerStatesWorker = new ha(), this.markerStatesWorkerClient = new sr(this.markerStatesWorker);
|
|
3325
3327
|
}
|
|
3326
3328
|
clearStates() {
|
|
3327
3329
|
this.markerStatesStore.clear();
|
|
@@ -3335,7 +3337,7 @@ class Fa {
|
|
|
3335
3337
|
async updateStates(e, n) {
|
|
3336
3338
|
if (e.length == 0) return;
|
|
3337
3339
|
e.sort((a, u) => a.properites.id.localeCompare(u.properites.id));
|
|
3338
|
-
const r = e.map((a) => a.input), i =
|
|
3340
|
+
const r = e.map((a) => a.input), i = Ma(r);
|
|
3339
3341
|
let s = this.markerStatesStore.get(i);
|
|
3340
3342
|
s == null && (s = await this.fetchStates(r, n), this.markerStatesStore.set(i, s));
|
|
3341
3343
|
for (let a = 0; a < e.length; a++) {
|
|
@@ -3345,19 +3347,19 @@ class Fa {
|
|
|
3345
3347
|
}
|
|
3346
3348
|
async fetchStates(e, n) {
|
|
3347
3349
|
if (e.length == 0) return [];
|
|
3348
|
-
if (e.length == 1) return [{ zoom: 0, directions: [{ zoom: 0, angle:
|
|
3350
|
+
if (e.length == 1) return [{ zoom: 0, directions: [{ zoom: 0, angle: la() }] }];
|
|
3349
3351
|
const r = {
|
|
3350
3352
|
key: this.apiKey,
|
|
3351
3353
|
jwt: this.apiJwt,
|
|
3352
|
-
version:
|
|
3354
|
+
version: Va,
|
|
3353
3355
|
input: e,
|
|
3354
3356
|
parameters: n
|
|
3355
3357
|
}, i = await this.markerStatesWorkerClient.invoke("fetch", r);
|
|
3356
3358
|
return i.jwt && (this.apiJwt = i.jwt), i.states;
|
|
3357
3359
|
}
|
|
3358
3360
|
}
|
|
3359
|
-
const
|
|
3360
|
-
class
|
|
3361
|
+
const rr = "1.3.9", Ua = "https://maps.api.arenarium.dev/auth", Wa = "https://maps.api.arenarium.dev/log", ir = 500;
|
|
3362
|
+
class oi {
|
|
3361
3363
|
apiKey;
|
|
3362
3364
|
mapProvider;
|
|
3363
3365
|
mapStateProvider;
|
|
@@ -3368,26 +3370,26 @@ class ai {
|
|
|
3368
3370
|
markerVisibilityProcessor;
|
|
3369
3371
|
markerElementsProcessor;
|
|
3370
3372
|
markerStateProcessor;
|
|
3371
|
-
markerStatesProcessDelay =
|
|
3373
|
+
markerStatesProcessDelay = ir;
|
|
3372
3374
|
markerStatesProcessTimeout = void 0;
|
|
3373
3375
|
constructor(e, n, r, i) {
|
|
3374
|
-
|
|
3376
|
+
Pt(Fa, e), Pt($a, n), Pt(za, r), this.apiKey = e, this.mapProvider = r, this.mapStateProvider = new Si(
|
|
3375
3377
|
this.mapProvider,
|
|
3376
3378
|
this.detached.bind(this),
|
|
3377
3379
|
this.error.bind(this),
|
|
3378
3380
|
this.onMapMove.bind(this),
|
|
3379
3381
|
this.onMapIdle.bind(this),
|
|
3380
3382
|
this.onMapClick.bind(this)
|
|
3381
|
-
), this.markers = /* @__PURE__ */ new Map(), this.markerVisibilityManager = new
|
|
3383
|
+
), this.markers = /* @__PURE__ */ new Map(), this.markerVisibilityManager = new Ui(), this.markerElementsManager = new fa(this.mapProvider), this.markerStatesManager = new ja(e, n), this.markerVisibilityProcessor = new Zt(this.onMarkersVisiblityProcess.bind(this)), this.markerElementsProcessor = new Zt(this.onMarkersRenderProcess.bind(this)), this.markerStateProcessor = new Zt(this.onMarkersStateProcess.bind(this)), this.configuration = i;
|
|
3382
3384
|
}
|
|
3383
3385
|
//#region Core
|
|
3384
3386
|
static async create(e, n, r) {
|
|
3385
|
-
|
|
3387
|
+
const a = (await da(Ua, { key: e, version: rr })).jwt;
|
|
3386
3388
|
if (!a) throw new Error("Failed to get api jwt");
|
|
3387
|
-
return new
|
|
3389
|
+
return new oi(e, a, n, r);
|
|
3388
3390
|
}
|
|
3389
3391
|
set configuration(e) {
|
|
3390
|
-
this.markerStatesProcessDelay = e?.process?.states?.delay ??
|
|
3392
|
+
this.markerStatesProcessDelay = e?.process?.states?.delay ?? ir, this.markerVisibilityManager.configuration = e, this.markerElementsManager.configuration = e;
|
|
3391
3393
|
}
|
|
3392
3394
|
clear() {
|
|
3393
3395
|
this.markers.clear(), this.markerVisibilityManager.clearMarkers(), this.markerStatesManager.clearStates(), this.markerElementsManager.clearElements(), this.mapStateProvider.stop(), this.markerVisibilityProcessor.stop(), this.markerStateProcessor.stop(), this.markerElementsProcessor.stop();
|
|
@@ -3416,7 +3418,7 @@ class ai {
|
|
|
3416
3418
|
title: n,
|
|
3417
3419
|
level: e,
|
|
3418
3420
|
content: {
|
|
3419
|
-
version:
|
|
3421
|
+
version: rr,
|
|
3420
3422
|
key: this.apiKey,
|
|
3421
3423
|
name: r.name,
|
|
3422
3424
|
message: r.message,
|
|
@@ -3424,7 +3426,7 @@ class ai {
|
|
|
3424
3426
|
stack: r.stack
|
|
3425
3427
|
}
|
|
3426
3428
|
};
|
|
3427
|
-
await
|
|
3429
|
+
await ma(Wa, i);
|
|
3428
3430
|
} catch (i) {
|
|
3429
3431
|
console.error(i);
|
|
3430
3432
|
}
|
|
@@ -3491,24 +3493,24 @@ class ai {
|
|
|
3491
3493
|
}, a = (o, l) => {
|
|
3492
3494
|
if (l) return l;
|
|
3493
3495
|
if (o) {
|
|
3494
|
-
const c = s(o), f = c.width,
|
|
3495
|
-
return { width: f, height:
|
|
3496
|
+
const c = s(o), f = c.width, p = c.height;
|
|
3497
|
+
return { width: f, height: p, padding: On };
|
|
3496
3498
|
} else
|
|
3497
|
-
return { width:
|
|
3499
|
+
return { width: zn, height: zn, padding: On };
|
|
3498
3500
|
}, u = (o, l) => {
|
|
3499
3501
|
if (l) return l;
|
|
3500
|
-
const c = s(o), f = c.width,
|
|
3501
|
-
return { width: f, height:
|
|
3502
|
+
const c = s(o), f = c.width, p = c.height, m = Math.min(Math.round(Math.min(f, p) / 4), $i);
|
|
3503
|
+
return { width: f, height: p, padding: m };
|
|
3502
3504
|
};
|
|
3503
3505
|
for (const o of r) {
|
|
3504
|
-
const l = o.id, c = o.lat, f = o.lng,
|
|
3506
|
+
const l = o.id, c = o.lat, f = o.lng, p = o.rank;
|
|
3505
3507
|
let m = {
|
|
3506
3508
|
id: l,
|
|
3507
3509
|
initialize: o.pin?.initialize,
|
|
3508
3510
|
element: o.pin?.element,
|
|
3509
3511
|
style: o.pin?.style,
|
|
3510
3512
|
dimensions: a(o.pin?.element, o.pin?.dimensions)
|
|
3511
|
-
},
|
|
3513
|
+
}, h = {
|
|
3512
3514
|
id: l,
|
|
3513
3515
|
initialize: o.tooltip.initialize,
|
|
3514
3516
|
element: o.tooltip.element,
|
|
@@ -3522,13 +3524,13 @@ class ai {
|
|
|
3522
3524
|
style: o.popup.style,
|
|
3523
3525
|
dimensions: u(o.popup.element, o.popup.dimensions)
|
|
3524
3526
|
});
|
|
3525
|
-
const
|
|
3526
|
-
n.push(
|
|
3527
|
+
const b = new Mi(l, c, f, p, m, h, v);
|
|
3528
|
+
n.push(b);
|
|
3527
3529
|
}
|
|
3528
3530
|
return n.forEach((o) => this.markers.set(o.properites.id, o)), n.sort((o, l) => l.properites.rank - o.properites.rank), n;
|
|
3529
3531
|
}
|
|
3530
3532
|
async updateMarkers(e) {
|
|
3531
|
-
|
|
3533
|
+
Pt(/* @__PURE__ */ ti(La), e);
|
|
3532
3534
|
try {
|
|
3533
3535
|
const n = this.mapProvider.getParameters(), r = this.getMarkers(e);
|
|
3534
3536
|
await this.markerVisibilityManager.updateMarkers(n, r), this.mapStateProvider.start(), this.markerVisibilityProcessor.run();
|
|
@@ -3568,5 +3570,5 @@ class ai {
|
|
|
3568
3570
|
//#endregion
|
|
3569
3571
|
}
|
|
3570
3572
|
export {
|
|
3571
|
-
|
|
3573
|
+
oi as MapManager
|
|
3572
3574
|
};
|