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