mesurer-solid 0.2.0-beta.13 → 0.2.0-beta.14
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/index.js +236 -233
- package/dist/inject-script.js +2 -2
- package/dist/inject.js +236 -233
- package/dist/plugins.js +657 -654
- package/package.json +1 -1
package/dist/plugins.js
CHANGED
|
@@ -42,7 +42,7 @@ function h(e) {
|
|
|
42
42
|
}
|
|
43
43
|
function g(e) {
|
|
44
44
|
if (_(e) && e.sn) {
|
|
45
|
-
let t = e.sn =
|
|
45
|
+
let t = e.sn = de(e.sn);
|
|
46
46
|
if (t.fn !== !0) return t;
|
|
47
47
|
e.sn = null;
|
|
48
48
|
}
|
|
@@ -80,7 +80,7 @@ var y = /* @__PURE__ */ new Set(), b = {
|
|
|
80
80
|
EE: 0
|
|
81
81
|
};
|
|
82
82
|
function S(e) {
|
|
83
|
-
e.se & 16 ? e.se &= -12 : (
|
|
83
|
+
e.se & 16 ? e.se &= -12 : (_e(e, x), e.se &= -4);
|
|
84
84
|
}
|
|
85
85
|
var C = 0, w = null, T = !1, E = !1, D = !1, O = 0, k = /* @__PURE__ */ new Set();
|
|
86
86
|
function A(e) {
|
|
@@ -113,7 +113,7 @@ function M() {
|
|
|
113
113
|
ln: /* @__PURE__ */ new Set()
|
|
114
114
|
};
|
|
115
115
|
}
|
|
116
|
-
function
|
|
116
|
+
function ee(e, t) {
|
|
117
117
|
t.fn = e, e.ie.push(...t.ie);
|
|
118
118
|
for (let n of f) n.Ne === t && (n.Ne = e);
|
|
119
119
|
t.Me.length && (e.Me.push(...t.Me), t.Me.length = 0), t.A.length && (e.A.push(...t.A), t.A.length = 0);
|
|
@@ -125,23 +125,23 @@ function N(e, t) {
|
|
|
125
125
|
}
|
|
126
126
|
for (let n of t.ln) e.ln.add(n);
|
|
127
127
|
}
|
|
128
|
-
function
|
|
128
|
+
function N() {
|
|
129
129
|
if (E) {
|
|
130
|
-
|
|
130
|
+
P();
|
|
131
131
|
return;
|
|
132
132
|
}
|
|
133
|
-
T || (T = !0, !O && !
|
|
133
|
+
T || (T = !0, !O && !H.gt && queueMicrotask(se));
|
|
134
134
|
}
|
|
135
|
-
function
|
|
135
|
+
function te(e) {
|
|
136
136
|
if (E) return;
|
|
137
137
|
E = !0;
|
|
138
138
|
let t = "[REACTIVITY_HALTED]";
|
|
139
139
|
e === void 0 ? console.error(t) : console.error(t, e);
|
|
140
140
|
}
|
|
141
|
-
function
|
|
141
|
+
function P() {
|
|
142
142
|
D || (D = !0, console.error("[REACTIVITY_HALTED]"));
|
|
143
143
|
}
|
|
144
|
-
var
|
|
144
|
+
var ne = 0, F = class {
|
|
145
145
|
ke = null;
|
|
146
146
|
bt = [[], []];
|
|
147
147
|
vt = [];
|
|
@@ -160,9 +160,9 @@ var te = 0, I = class {
|
|
|
160
160
|
run(e) {
|
|
161
161
|
if (this.bt[e - 1].length) {
|
|
162
162
|
let t = this.bt[e - 1];
|
|
163
|
-
this.bt[e - 1] = [],
|
|
163
|
+
this.bt[e - 1] = [], ce(t, e);
|
|
164
164
|
}
|
|
165
|
-
let t = this.vt, n = ++
|
|
165
|
+
let t = this.vt, n = ++ne;
|
|
166
166
|
for (let r = 0; r < t.length;) {
|
|
167
167
|
let i = t[r];
|
|
168
168
|
if (i.kt !== n && (i.kt = n, i.run?.(e), t[r] !== i)) {
|
|
@@ -173,7 +173,7 @@ var te = 0, I = class {
|
|
|
173
173
|
}
|
|
174
174
|
}
|
|
175
175
|
enqueue(e, t) {
|
|
176
|
-
e && (tt ? p(tt).rn[e - 1].push(t) : this.bt[e - 1].push(t)),
|
|
176
|
+
e && (tt ? p(tt).rn[e - 1].push(t) : this.bt[e - 1].push(t)), N();
|
|
177
177
|
}
|
|
178
178
|
stashQueues(e) {
|
|
179
179
|
e.bt[0].push(...this.bt[0]), e.bt[1].push(...this.bt[1]), this.bt = [[], []];
|
|
@@ -192,7 +192,7 @@ var te = 0, I = class {
|
|
|
192
192
|
r && r.restoreQueues(n);
|
|
193
193
|
}
|
|
194
194
|
}
|
|
195
|
-
},
|
|
195
|
+
}, I = class e extends F {
|
|
196
196
|
gt = !1;
|
|
197
197
|
m = M();
|
|
198
198
|
static Ce;
|
|
@@ -231,18 +231,18 @@ var te = 0, I = class {
|
|
|
231
231
|
if (!this.gt) {
|
|
232
232
|
this.gt = !0;
|
|
233
233
|
try {
|
|
234
|
-
if (
|
|
235
|
-
if (!
|
|
234
|
+
if (be(b, e.Ce), w) {
|
|
235
|
+
if (!ue(w)) {
|
|
236
236
|
let t = w;
|
|
237
|
-
|
|
237
|
+
be(x, this.m === t ? S : e.Ce), this.m === t && (oe = this.m = M()), f.size && (e.In(1), e.In(2)), this.stashQueues(t.yt), C++, T = b.EE >= b.Ve || this.m.Qt.length > 0, ae(t.Qt), w = null, ie(null, !0);
|
|
238
238
|
return;
|
|
239
239
|
}
|
|
240
240
|
let t = w, n = this.m;
|
|
241
|
-
if (n !== t && n.Qt.push(...t.Qt), this.restoreQueues(t.yt), y.delete(t), w = null,
|
|
241
|
+
if (n !== t && n.Qt.push(...t.Qt), this.restoreQueues(t.yt), y.delete(t), w = null, ae(n.Qt), ie(t), n === t) {
|
|
242
242
|
let e = M();
|
|
243
|
-
e.Qt = n.Qt, e.Me = n.Me, e.A = n.A, e.cn = n.cn,
|
|
243
|
+
e.Qt = n.Qt, e.Me = n.Me, e.A = n.A, e.cn = n.cn, oe = this.m = e;
|
|
244
244
|
}
|
|
245
|
-
} else A(this) ? (
|
|
245
|
+
} else A(this) ? (re(), b.EE >= b.Ve && (be(b, e.Ce), re())) : (y.size && be(x, e.Ce), ie());
|
|
246
246
|
C++, T = b.EE >= b.Ve, f.size && e.In(1), this.run(1), f.size && e.In(2), this.run(2);
|
|
247
247
|
} finally {
|
|
248
248
|
this.gt = !1;
|
|
@@ -258,7 +258,7 @@ var te = 0, I = class {
|
|
|
258
258
|
let n = t.source, r = w.Ie.get(n);
|
|
259
259
|
r || w.Ie.set(n, r = /* @__PURE__ */ new Set());
|
|
260
260
|
let i = r.size;
|
|
261
|
-
r.add(e), r.size !== i &&
|
|
261
|
+
r.add(e), r.size !== i && N();
|
|
262
262
|
}
|
|
263
263
|
}
|
|
264
264
|
return !0;
|
|
@@ -266,11 +266,11 @@ var te = 0, I = class {
|
|
|
266
266
|
return !1;
|
|
267
267
|
}
|
|
268
268
|
initTransition(e) {
|
|
269
|
-
if (e &&=
|
|
269
|
+
if (e &&= de(e), e && e === w || !e && w && w.de === C) return;
|
|
270
270
|
if (!w) w = e ?? M();
|
|
271
271
|
else if (e) {
|
|
272
272
|
let t = w;
|
|
273
|
-
|
|
273
|
+
ee(e, t), y.delete(t), w = e;
|
|
274
274
|
}
|
|
275
275
|
y.add(w), w.de = C;
|
|
276
276
|
let t = this.m;
|
|
@@ -289,78 +289,78 @@ var te = 0, I = class {
|
|
|
289
289
|
for (let e of t.ln) w.ln.add(e);
|
|
290
290
|
t.ln.clear();
|
|
291
291
|
}
|
|
292
|
-
|
|
292
|
+
oe = this.m = w;
|
|
293
293
|
}
|
|
294
294
|
for (let e of f) e.Ne ||= w;
|
|
295
295
|
}
|
|
296
296
|
};
|
|
297
|
-
function
|
|
298
|
-
|
|
297
|
+
function L(e) {
|
|
298
|
+
oe.Qt.push(e);
|
|
299
299
|
}
|
|
300
|
-
var
|
|
301
|
-
function
|
|
302
|
-
let n = e.Ke || tt, r = e.Le !== void 0, i =
|
|
300
|
+
var R = !1;
|
|
301
|
+
function z(e, t = !1) {
|
|
302
|
+
let n = e.Ke || tt, r = e.Le !== void 0, i = R;
|
|
303
303
|
for (let o = e.o; o !== null; o = o.le) {
|
|
304
304
|
if (i && (o.fe.se &= ~a), r && o.fe.T & 8) {
|
|
305
305
|
o.fe.se |= 256;
|
|
306
306
|
continue;
|
|
307
307
|
}
|
|
308
|
-
t && n ? (o.fe.se |= 128, v(o.fe, n)) : t && (o.fe.se |= 128, o.fe.Ke = void 0),
|
|
308
|
+
t && n ? (o.fe.se |= 128, v(o.fe, n)) : t && (o.fe.se |= 128, o.fe.Ke = void 0), U(o.fe);
|
|
309
309
|
}
|
|
310
310
|
}
|
|
311
|
-
function
|
|
311
|
+
function B(e) {
|
|
312
312
|
let t = e;
|
|
313
313
|
if (!t.ce) {
|
|
314
|
-
e.De !== o && (e.Ue = e.De, e.De = o), (e.ge || e.pe) &&
|
|
314
|
+
e.De !== o && (e.Ue = e.De, e.De = o), (e.ge || e.pe) && I.un(e);
|
|
315
315
|
return;
|
|
316
316
|
}
|
|
317
|
-
e.De !== o && (e.Ue = e.De, e.De = o, e.Re && e.Re !== 3 && (e.Je = !0)), t.Ee = !1, t.se &= ~i, t.S & 1 || (t.S &= -5), (t.We !== null || t.Qe !== null) &&
|
|
317
|
+
e.De !== o && (e.Ue = e.De, e.De = o, e.Re && e.Re !== 3 && (e.Je = !0)), t.Ee = !1, t.se &= ~i, t.S & 1 || (t.S &= -5), (t.We !== null || t.Qe !== null) && I.me(t, !1, !0), (e.ge || e.pe) && I.un(e);
|
|
318
318
|
}
|
|
319
|
-
function
|
|
320
|
-
let e =
|
|
321
|
-
for (let t = 0; t < e.length; t++)
|
|
319
|
+
function re() {
|
|
320
|
+
let e = oe.Qt;
|
|
321
|
+
for (let t = 0; t < e.length; t++) B(e[t]);
|
|
322
322
|
e.length = 0;
|
|
323
323
|
}
|
|
324
|
-
function
|
|
324
|
+
function ie(e = null, t = !1) {
|
|
325
325
|
let n = !t;
|
|
326
|
-
n &&
|
|
326
|
+
n && re(), !t && H.vt.length && V(H);
|
|
327
327
|
let r = b.EE >= b.Ve;
|
|
328
|
-
if (r &&
|
|
329
|
-
r &&
|
|
330
|
-
let t = e ??
|
|
331
|
-
if (t.Me.length &&
|
|
332
|
-
for (let e of t.ln) e.se & 64 ||
|
|
333
|
-
t.ln.clear(),
|
|
328
|
+
if (r && be(b, I.Ce), n) {
|
|
329
|
+
r && re();
|
|
330
|
+
let t = e ?? H.m;
|
|
331
|
+
if (t.Me.length && I.En(t.Me), t.ln.size) {
|
|
332
|
+
for (let e of t.ln) e.se & 64 || U(e);
|
|
333
|
+
t.ln.clear(), N();
|
|
334
334
|
}
|
|
335
|
-
t.A.length && (
|
|
335
|
+
t.A.length && (I.G(t.A), H.vt.length && V(H)), t.cn.size && I.Dt(t.cn, e), j(), f.size && I.dn(e);
|
|
336
336
|
}
|
|
337
337
|
}
|
|
338
|
-
function
|
|
339
|
-
for (let t of e.vt) t.ne?.(),
|
|
338
|
+
function V(e) {
|
|
339
|
+
for (let t of e.vt) t.ne?.(), V(t);
|
|
340
340
|
}
|
|
341
|
-
function
|
|
341
|
+
function ae(e) {
|
|
342
342
|
for (let t = 0; t < e.length; t++) e[t].Ne = w;
|
|
343
343
|
}
|
|
344
|
-
var
|
|
345
|
-
function
|
|
344
|
+
var H = new I(), oe = H.m;
|
|
345
|
+
function se(e) {
|
|
346
346
|
if (e) {
|
|
347
347
|
O++;
|
|
348
348
|
try {
|
|
349
349
|
return e();
|
|
350
350
|
} finally {
|
|
351
351
|
try {
|
|
352
|
-
|
|
352
|
+
se();
|
|
353
353
|
} finally {
|
|
354
354
|
O--;
|
|
355
355
|
}
|
|
356
356
|
}
|
|
357
357
|
}
|
|
358
|
-
if (!
|
|
358
|
+
if (!H.gt && !E) for (; T || w;) H.flush();
|
|
359
359
|
}
|
|
360
|
-
function
|
|
360
|
+
function ce(e, t) {
|
|
361
361
|
for (let n = 0; n < e.length; n++) e[n](t);
|
|
362
362
|
}
|
|
363
|
-
function
|
|
363
|
+
function le(t, n) {
|
|
364
364
|
if (t.se & 96) return !1;
|
|
365
365
|
if (t.oe?.has(n)) return !0;
|
|
366
366
|
for (let e = t.tt; e; e = e.nt) {
|
|
@@ -372,14 +372,14 @@ function se(t, n) {
|
|
|
372
372
|
}
|
|
373
373
|
return !!(t.S & 1 && t._ instanceof e && t._.source === n);
|
|
374
374
|
}
|
|
375
|
-
function
|
|
375
|
+
function ue(e) {
|
|
376
376
|
if (e.fn) return !0;
|
|
377
377
|
if (e.ie.length) return !1;
|
|
378
378
|
let t = !0;
|
|
379
379
|
for (let [n, r] of e.Ie) {
|
|
380
380
|
let i = !1;
|
|
381
381
|
for (let e of r) {
|
|
382
|
-
if (
|
|
382
|
+
if (le(e, n)) {
|
|
383
383
|
i = !0;
|
|
384
384
|
break;
|
|
385
385
|
}
|
|
@@ -391,35 +391,35 @@ function ce(e) {
|
|
|
391
391
|
break;
|
|
392
392
|
}
|
|
393
393
|
}
|
|
394
|
-
return t &&
|
|
394
|
+
return t && I.Tn?.(e) && (t = !1), t && (e.fn = !0), t;
|
|
395
395
|
}
|
|
396
|
-
function
|
|
396
|
+
function de(e) {
|
|
397
397
|
for (; e.fn && typeof e.fn == "object";) e = e.fn;
|
|
398
398
|
return e;
|
|
399
399
|
}
|
|
400
|
-
function
|
|
400
|
+
function fe(e, t) {
|
|
401
401
|
let n = w;
|
|
402
402
|
try {
|
|
403
|
-
return w =
|
|
403
|
+
return w = de(e), t();
|
|
404
404
|
} finally {
|
|
405
405
|
w = n;
|
|
406
406
|
}
|
|
407
407
|
}
|
|
408
408
|
//#endregion
|
|
409
409
|
//#region ../../node_modules/.bun/@solidjs+signals@2.0.0-rc.0/node_modules/@solidjs/signals/dist/prod/core/heap.js
|
|
410
|
-
function
|
|
410
|
+
function pe(e) {
|
|
411
411
|
return e.se & 32 ? x : b;
|
|
412
412
|
}
|
|
413
|
-
function
|
|
413
|
+
function U(e) {
|
|
414
414
|
if (e.Re === 3) {
|
|
415
415
|
let t = e;
|
|
416
416
|
t.Je || (t.Je = !0, t.C.enqueue(2, t.Ft));
|
|
417
417
|
return;
|
|
418
418
|
}
|
|
419
|
-
let t =
|
|
420
|
-
t.Ve > e.xe && (t.Ve = e.xe),
|
|
419
|
+
let t = pe(e);
|
|
420
|
+
t.Ve > e.xe && (t.Ve = e.xe), he(e, t);
|
|
421
421
|
}
|
|
422
|
-
function
|
|
422
|
+
function me(e, t) {
|
|
423
423
|
let n = (e.ke?.Nt ? e.ke.dt?.xe : e.ke?.xe) ?? -1;
|
|
424
424
|
n >= e.xe && (e.xe = n + 1);
|
|
425
425
|
let r = e.xe, i = t.eE[r];
|
|
@@ -430,15 +430,15 @@ function pe(e, t) {
|
|
|
430
430
|
}
|
|
431
431
|
r > t.EE && (t.EE = r);
|
|
432
432
|
}
|
|
433
|
-
function me(e, t) {
|
|
434
|
-
let n = e.se;
|
|
435
|
-
n & 1036 || (n & 1 ? e.se = n & -4 | 10 : (e.se = n | 8, t.tE && !(n & 2) && (t.tE = !1)), n & 16 || pe(e, t));
|
|
436
|
-
}
|
|
437
433
|
function he(e, t) {
|
|
438
434
|
let n = e.se;
|
|
439
|
-
n &
|
|
435
|
+
n & 1036 || (n & 1 ? e.se = n & -4 | 10 : (e.se = n | 8, t.tE && !(n & 2) && (t.tE = !1)), n & 16 || me(e, t));
|
|
440
436
|
}
|
|
441
437
|
function ge(e, t) {
|
|
438
|
+
let n = e.se;
|
|
439
|
+
n & 1052 || (e.se = n | 16, me(e, t));
|
|
440
|
+
}
|
|
441
|
+
function _e(e, t) {
|
|
442
442
|
let n = e.se;
|
|
443
443
|
if (!(n & 24)) return;
|
|
444
444
|
e.se = n & -25;
|
|
@@ -450,29 +450,29 @@ function ge(e, t) {
|
|
|
450
450
|
}
|
|
451
451
|
e.st = e, e.ot = void 0;
|
|
452
452
|
}
|
|
453
|
-
function
|
|
453
|
+
function ve(e) {
|
|
454
454
|
if (!e.tE) {
|
|
455
455
|
e.tE = !0;
|
|
456
|
-
for (let t = 0; t <= e.EE; t++) for (let n = e.eE[t]; n !== void 0; n = n.ot) n.se & 8 &&
|
|
456
|
+
for (let t = 0; t <= e.EE; t++) for (let n = e.eE[t]; n !== void 0; n = n.ot) n.se & 8 && ye(n);
|
|
457
457
|
}
|
|
458
458
|
}
|
|
459
|
-
function
|
|
459
|
+
function ye(e, t = 2) {
|
|
460
460
|
let n = e.se;
|
|
461
461
|
if (!((n & 3) >= t)) {
|
|
462
462
|
e.se = n & -4 | t;
|
|
463
|
-
for (let t = e.o; t !== null; t = t.le)
|
|
464
|
-
if (e.u !== null) for (let t = e.u; t !== null; t = t.ae) for (let e = t.o; e !== null; e = e.le)
|
|
463
|
+
for (let t = e.o; t !== null; t = t.le) ye(t.fe, 1);
|
|
464
|
+
if (e.u !== null) for (let t = e.u; t !== null; t = t.ae) for (let e = t.o; e !== null; e = e.le) ye(e.fe, 1);
|
|
465
465
|
}
|
|
466
466
|
}
|
|
467
|
-
function
|
|
467
|
+
function be(e, t) {
|
|
468
468
|
for (e.tE = !1, e.Ve = 0; e.Ve <= e.EE; e.Ve++) {
|
|
469
469
|
let n = e.eE[e.Ve];
|
|
470
|
-
for (; n !== void 0;) n.se & 8 ? t(n) :
|
|
470
|
+
for (; n !== void 0;) n.se & 8 ? t(n) : xe(n, e), n = e.eE[e.Ve];
|
|
471
471
|
}
|
|
472
472
|
e.EE = 0;
|
|
473
473
|
}
|
|
474
|
-
function
|
|
475
|
-
|
|
474
|
+
function xe(e, t) {
|
|
475
|
+
_e(e, t);
|
|
476
476
|
let n = e.xe;
|
|
477
477
|
for (let t = e.tt; t; t = t.nt) {
|
|
478
478
|
let e = t.it, r = e.lt || e;
|
|
@@ -480,38 +480,38 @@ function be(e, t) {
|
|
|
480
480
|
}
|
|
481
481
|
if (e.xe !== n) {
|
|
482
482
|
e.xe = n;
|
|
483
|
-
for (let t = e.o; t !== null; t = t.le)
|
|
483
|
+
for (let t = e.o; t !== null; t = t.le) ge(t.fe, pe(t.fe));
|
|
484
484
|
}
|
|
485
485
|
}
|
|
486
486
|
//#endregion
|
|
487
487
|
//#region ../../node_modules/.bun/@solidjs+signals@2.0.0-rc.0/node_modules/@solidjs/signals/dist/prod/core/owner.js
|
|
488
|
-
function
|
|
488
|
+
function Se(e) {
|
|
489
489
|
let t = e.Fe;
|
|
490
490
|
for (; t;) {
|
|
491
491
|
let e = t.se;
|
|
492
|
-
t.se = e | 32, e & 24 && (
|
|
492
|
+
t.se = e | 32, e & 24 && (_e(t, e & 32 ? x : b), e & 8 ? he(t, x) : ge(t, x)), Se(t), t = t.He;
|
|
493
493
|
}
|
|
494
494
|
}
|
|
495
|
-
function
|
|
495
|
+
function W(e, t = !1, n) {
|
|
496
496
|
let r = e.se;
|
|
497
497
|
if (r & 64) return;
|
|
498
498
|
if (t) {
|
|
499
499
|
e.se = r | 64;
|
|
500
500
|
let t = e;
|
|
501
|
-
(t.ge || t.pe) &&
|
|
501
|
+
(t.ge || t.pe) && I.un(t);
|
|
502
502
|
}
|
|
503
503
|
t && e.ce && (e.Te = null);
|
|
504
504
|
let i = n ? e.We : e.Fe;
|
|
505
505
|
for (; i;) {
|
|
506
506
|
let e = i.He, t = i;
|
|
507
|
-
if (t.se & 24 &&
|
|
507
|
+
if (t.se & 24 && _e(t, pe(t)), t.tt) {
|
|
508
508
|
let e = t.tt;
|
|
509
509
|
do
|
|
510
510
|
e = Ne(e);
|
|
511
511
|
while (e !== null);
|
|
512
512
|
t.tt = null, t.Ye = null;
|
|
513
513
|
}
|
|
514
|
-
|
|
514
|
+
W(i, !0), i = e;
|
|
515
515
|
}
|
|
516
516
|
if (n ? e.We = null : (e.Fe = null, e.qe = 0), t && !n && !(r & 32) && e.ke !== null && !(e.ke.se & 64)) {
|
|
517
517
|
let t = e.ct, n = e.He;
|
|
@@ -556,7 +556,7 @@ function ke(e) {
|
|
|
556
556
|
return G && (G.ye ? Array.isArray(G.ye) ? G.ye.push(e) : G.ye = [G.ye, e] : G.ye = e), e;
|
|
557
557
|
}
|
|
558
558
|
function Ae(e = !0) {
|
|
559
|
-
|
|
559
|
+
W(this, e);
|
|
560
560
|
}
|
|
561
561
|
function je(e) {
|
|
562
562
|
let t = G, n = e?.transparent ?? !1, r = {
|
|
@@ -568,7 +568,7 @@ function je(e) {
|
|
|
568
568
|
He: null,
|
|
569
569
|
ct: null,
|
|
570
570
|
ye: null,
|
|
571
|
-
C: t?.C ??
|
|
571
|
+
C: t?.C ?? H,
|
|
572
572
|
we: t?.we || u,
|
|
573
573
|
qe: 0,
|
|
574
574
|
Qe: null,
|
|
@@ -608,10 +608,10 @@ function Pe(e) {
|
|
|
608
608
|
}
|
|
609
609
|
}
|
|
610
610
|
function Fe(e) {
|
|
611
|
-
|
|
611
|
+
_e(e, pe(e));
|
|
612
612
|
let t = e.tt;
|
|
613
613
|
for (; t !== null;) t = Ne(t);
|
|
614
|
-
e.tt = null, e.Ye = null,
|
|
614
|
+
e.tt = null, e.Ye = null, W(e, !0);
|
|
615
615
|
}
|
|
616
616
|
function Ie(e, t, n = !1) {
|
|
617
617
|
let r = t.Ye;
|
|
@@ -681,19 +681,19 @@ function We(e) {
|
|
|
681
681
|
}
|
|
682
682
|
function Ge(e, t) {
|
|
683
683
|
let n = !1, r = /* @__PURE__ */ new Set(), i = (e) => {
|
|
684
|
-
r.has(e) || (r.add(e), e._ === t && (
|
|
684
|
+
r.has(e) || (r.add(e), e._ === t && (U(e), n = !0), He(e, i));
|
|
685
685
|
};
|
|
686
|
-
He(e, i), n &&
|
|
686
|
+
He(e, i), n && N();
|
|
687
687
|
}
|
|
688
688
|
function Ke(e) {
|
|
689
|
-
let t = !1, n, r = /* @__PURE__ */ new Set(), i =
|
|
689
|
+
let t = !1, n, r = /* @__PURE__ */ new Set(), i = I.Se, a = (o) => {
|
|
690
690
|
if (r.has(o) || !Re(o, e)) return;
|
|
691
691
|
r.add(o), o.de = C;
|
|
692
692
|
let s = o.oe?.values().next().value, c = o.S & 2;
|
|
693
|
-
s ? (c || Ve(o, s), i !== null && i(o)) : (o.S &= -2, c || Ve(o), i !== null && i(o), o.ue && (
|
|
693
|
+
s ? (c || Ve(o, s), i !== null && i(o)) : (o.S &= -2, c || Ve(o), i !== null && i(o), o.ue && (U(o), t = !0), o.ue = !1, !o.o && o.T & 32 && (n ??= []).push(o)), He(o, a);
|
|
694
694
|
};
|
|
695
695
|
if (He(e, a), n) for (let e of n) Ue(e);
|
|
696
|
-
t &&
|
|
696
|
+
t && N();
|
|
697
697
|
}
|
|
698
698
|
function qe(e) {
|
|
699
699
|
return typeof e == "object" && !!e && typeof e.then == "function";
|
|
@@ -706,11 +706,11 @@ function Je(t, n, r) {
|
|
|
706
706
|
t.Te = n;
|
|
707
707
|
let s, c = () => {
|
|
708
708
|
let e = g(t);
|
|
709
|
-
if (e && t.S & 4 && !
|
|
709
|
+
if (e && t.S & 4 && !de(e).Ie.has(t)) {
|
|
710
710
|
t.Ne = null;
|
|
711
711
|
return;
|
|
712
712
|
}
|
|
713
|
-
|
|
713
|
+
H.initTransition(e);
|
|
714
714
|
}, l = (r) => {
|
|
715
715
|
if (t.Te !== n) return;
|
|
716
716
|
let i = r instanceof e;
|
|
@@ -726,11 +726,11 @@ function Je(t, n, r) {
|
|
|
726
726
|
Pe(t), Ye(t);
|
|
727
727
|
let s = h(t);
|
|
728
728
|
if (s && s.Ae.delete(t), r) r(e), a && Ye(t, !0);
|
|
729
|
-
else if (t._e !== void 0) t.De === o &&
|
|
729
|
+
else if (t._e !== void 0) t.De === o && L(t), t.De = e, I.Pe !== null && I.Pe(t, e), _(t) || z(t), t.de = C;
|
|
730
730
|
else if (s) {
|
|
731
731
|
let n = t.Re, r = t.Ue, i = t.be;
|
|
732
732
|
try {
|
|
733
|
-
(!n && a || !i || !i(e, r)) && (t.Ue = e, t.de = C,
|
|
733
|
+
(!n && a || !i || !i(e, r)) && (t.Ue = e, t.de = C, I.Pe !== null && I.Pe(t, e), z(t, !0));
|
|
734
734
|
} catch (e) {
|
|
735
735
|
Xe(t, 2, e);
|
|
736
736
|
}
|
|
@@ -739,7 +739,7 @@ function Je(t, n, r) {
|
|
|
739
739
|
} catch (e) {
|
|
740
740
|
Xe(t, 2, e);
|
|
741
741
|
}
|
|
742
|
-
t.De === o && (t.Ee = !1), Ke(t),
|
|
742
|
+
t.De === o && (t.Ee = !1), Ke(t), N(), se(), i?.();
|
|
743
743
|
}, d = () => t.T & 32 && !t.o && !(t.S & 1) ? (Fe(t), !0) : !1;
|
|
744
744
|
if (a) {
|
|
745
745
|
let r = !1, i = !1, a, o = !0;
|
|
@@ -751,7 +751,7 @@ function Je(t, n, r) {
|
|
|
751
751
|
if (r) t.Ee = !1;
|
|
752
752
|
else {
|
|
753
753
|
if (t.Ee) return t.Ue;
|
|
754
|
-
throw
|
|
754
|
+
throw H.initTransition(g(t)), new e(G);
|
|
755
755
|
}
|
|
756
756
|
}
|
|
757
757
|
if (i) {
|
|
@@ -772,7 +772,7 @@ function Je(t, n, r) {
|
|
|
772
772
|
if ((qe(_) ? _ : { then: (e) => void e(_) }).then((r) => {
|
|
773
773
|
if (g && o) e = r, m = !0, r.done && (a = !0);
|
|
774
774
|
else if (t.Te !== n) return;
|
|
775
|
-
else r.done ? (a = !0, i ? (
|
|
775
|
+
else r.done ? (a = !0, i ? (N(), se()) : u(void 0), d()) : (i = !0, u(r.value, c));
|
|
776
776
|
}, (e) => {
|
|
777
777
|
g ? (p = e, h = !0) : t.Te === n && (a = !0, l(e), d());
|
|
778
778
|
}), g = !1, h) {
|
|
@@ -783,19 +783,19 @@ function Je(t, n, r) {
|
|
|
783
783
|
}, p = f();
|
|
784
784
|
if (o = !1, !i && !p) {
|
|
785
785
|
if (t.Ee) return t.Ue;
|
|
786
|
-
throw
|
|
786
|
+
throw H.initTransition(g(t)), new e(G);
|
|
787
787
|
}
|
|
788
788
|
t.Ee = !1;
|
|
789
789
|
}
|
|
790
790
|
return s;
|
|
791
791
|
}
|
|
792
792
|
function Ye(e, t = !1) {
|
|
793
|
-
e.oe && ze(e), e.ue &&= !1, e.he = !1, e.S = t ? 0 : e.S & 4, e._ && Ve(e), (e.ge || e.pe) &&
|
|
793
|
+
e.oe && ze(e), e.ue &&= !1, e.he = !1, e.S = t ? 0 : e.S & 4, e._ && Ve(e), (e.ge || e.pe) && I.Se(e), e.u && I.Oe !== null && I.Oe(e), e.i && e.i();
|
|
794
794
|
}
|
|
795
795
|
function Xe(n, r, i, a, o) {
|
|
796
796
|
r === 2 && !(i instanceof t) && !(i instanceof e) && (i = new t(n, i));
|
|
797
797
|
let s = r === 1 && i instanceof e ? i.source : void 0, c = s === n, l = r === 1 && n._e !== void 0 && !c, u = l && _(n);
|
|
798
|
-
a || (r === 1 && s ? (Le(n, s), n.S = 1 | n.S & 4, Ve(n, s, i)) : (ze(n), n.S = r | (r === 2 ? 0 : n.S & 4), n._ = i),
|
|
798
|
+
a || (r === 1 && s ? (Le(n, s), n.S = 1 | n.S & 4, Ve(n, s, i)) : (ze(n), n.S = r | (r === 2 ? 0 : n.S & 4), n._ = i), I.Se !== null && I.Se(n), n.u && I.Oe !== null && I.Oe(n)), o && !a && v(n, o);
|
|
799
799
|
let d = a || u, f = a || l ? void 0 : o;
|
|
800
800
|
if (n.i) {
|
|
801
801
|
if (a && r === 1) return;
|
|
@@ -805,28 +805,28 @@ function Xe(n, r, i, a, o) {
|
|
|
805
805
|
He(n, (t, n) => {
|
|
806
806
|
if (t.de = C, r === 1 && s && !t.oe?.has(s) || r !== 1 && (t._ !== i || t.oe)) {
|
|
807
807
|
if (n.Ge && r !== 1 && !(i instanceof e)) {
|
|
808
|
-
|
|
808
|
+
U(t), N();
|
|
809
809
|
return;
|
|
810
810
|
}
|
|
811
|
-
!d && !t.Ne &&
|
|
811
|
+
!d && !t.Ne && L(t), Xe(t, r, i, d, f);
|
|
812
812
|
}
|
|
813
813
|
});
|
|
814
814
|
}
|
|
815
|
-
|
|
815
|
+
I.Ce = nt, I.me = W;
|
|
816
816
|
var Ze = !1, Qe = !1, $e = !1, et = !1, G = null, tt = null;
|
|
817
817
|
function nt(t, n = !1) {
|
|
818
818
|
let r = t.Re;
|
|
819
|
-
n || (t.Ne && (!r || w) && w !== t.Ne &&
|
|
819
|
+
n || (t.Ne && (!r || w) && w !== t.Ne && H.initTransition(t.Ne), _e(t, pe(t)), t.Te = null, t.Ne || r === 3 ? W(t) : (t.Fe !== null || t.ye !== null) && (Se(t), t.Qe = t.ye, t.We = t.Fe, t.ye = null, t.Fe = null, t.qe = 0));
|
|
820
820
|
let i = !!(t.se & 128), l = t._e !== void 0 && t._e !== o, u = !!(t.S & 4), d = t.S & 2 ? t._ : void 0, f = (t.se & a) !== 0, p = t.Ee, m = G;
|
|
821
821
|
G = t, t.Ye = null, t.Ze++, t.se = 4, t.de = C;
|
|
822
822
|
let h = t.De === o ? t.Ue : t.De, g = t.xe, _ = Ze, v = tt;
|
|
823
823
|
Ze = !0;
|
|
824
824
|
let y = et;
|
|
825
825
|
if (et = !1, i) {
|
|
826
|
-
let e =
|
|
826
|
+
let e = I.je(t, !0);
|
|
827
827
|
e && (tt = e);
|
|
828
828
|
} else if (w && !n && w.Me.length) {
|
|
829
|
-
let e =
|
|
829
|
+
let e = I.je(t, !1);
|
|
830
830
|
e && (i = !0, tt = e);
|
|
831
831
|
}
|
|
832
832
|
let b = r && r !== 2, x = Qe;
|
|
@@ -837,14 +837,14 @@ function nt(t, n = !1) {
|
|
|
837
837
|
let e = t.Te, n = t.ce(h), r = typeof n == "object" && !!n, i = t.Te !== e;
|
|
838
838
|
h = i || !r ? n : Je(t, n), !i && !r && (t.Te = null, t.Ee = !1);
|
|
839
839
|
}
|
|
840
|
-
(t.S !== 0 || t.i !== void 0 || t._ || t.he || t.ue || t.oe !== void 0 || t.ge !== void 0 || t.pe !== void 0 || t.u !== null) && Ye(t, n), t.Ke &&
|
|
840
|
+
(t.S !== 0 || t.i !== void 0 || t._ || t.he || t.ue || t.oe !== void 0 || t.ge !== void 0 || t.pe !== void 0 || t.u !== null) && Ye(t, n), t.Ke && I.ze(t);
|
|
841
841
|
} catch (n) {
|
|
842
842
|
let r = n instanceof e;
|
|
843
843
|
if (r && t.Ee) Be(t, n);
|
|
844
844
|
else {
|
|
845
|
-
r && tt &&
|
|
845
|
+
r && tt && I.$e(t);
|
|
846
846
|
let e = !1;
|
|
847
|
-
r && (t.ue = !0,
|
|
847
|
+
r && (t.ue = !0, I.Be !== null && (e = I.Be(t, f))), Xe(t, r ? 1 : 2, n, void 0, r ? t.Ke : void 0), e && I.k(t);
|
|
848
848
|
}
|
|
849
849
|
} finally {
|
|
850
850
|
Ze = _, et = y, b && (Qe = x), t.se = 0 | (n ? t.se & 256 : 0), G = m;
|
|
@@ -857,16 +857,16 @@ function nt(t, n = !1) {
|
|
|
857
857
|
} catch (e) {
|
|
858
858
|
Xe(t, 2, e);
|
|
859
859
|
}
|
|
860
|
-
if (r && a && (t.Je = !t._, n || t.C.enqueue(r, t.Xe ??=
|
|
860
|
+
if (r && a && (t.Je = !t._, n || t.C.enqueue(r, t.Xe ??= I.et.bind(null, t))), !t._) {
|
|
861
861
|
if (a) {
|
|
862
862
|
let e = l ? t._e : void 0;
|
|
863
|
-
n || r && (w !== t.Ne || w === null) || i ? (t.Ue = h, l && i && (t._e = h === void 0 ? s : h, t.De = o)) : (t.De = h, p && (t.Ee = !0), (w || t.Ne) &&
|
|
864
|
-
} else if (l) t.De === o &&
|
|
865
|
-
else if (t.xe != g) for (let e = t.o; e !== null; e = e.le)
|
|
863
|
+
n || r && (w !== t.Ne || w === null) || i ? (t.Ue = h, l && i && (t._e = h === void 0 ? s : h, t.De = o)) : (t.De = h, p && (t.Ee = !0), (w || t.Ne) && I.Pe !== null && I.Pe(t, h)), t.o !== null && (!l || i || t._e !== e) && z(t, i || l);
|
|
864
|
+
} else if (l) t.De === o && L(t), t.De = h, p && (t.Ee = !0);
|
|
865
|
+
else if (t.xe != g) for (let e = t.o; e !== null; e = e.le) ge(e.fe, pe(e.fe));
|
|
866
866
|
}
|
|
867
867
|
d !== void 0 && !a && !t._ && Ge(t, d);
|
|
868
868
|
}
|
|
869
|
-
tt = v, (t.De !== o || t.We !== null || t.Qe !== null || t.S & 5) && (!n || t.S & 1) && (!t.Ne || l) &&
|
|
869
|
+
tt = v, (t.De !== o || t.We !== null || t.Qe !== null || t.S & 5) && (!n || t.S & 1) && (!t.Ne || l) && L(t), t.Ne && r && w !== t.Ne && fe(t.Ne, () => nt(t));
|
|
870
870
|
}
|
|
871
871
|
function rt(e) {
|
|
872
872
|
if (e.se & 1) for (let t = e.tt; t; t = t.nt) {
|
|
@@ -882,7 +882,7 @@ function it(e, t) {
|
|
|
882
882
|
be: t?.equals == null ? lt : t.equals,
|
|
883
883
|
ut: t?.unobserved,
|
|
884
884
|
ye: null,
|
|
885
|
-
C: G?.C ??
|
|
885
|
+
C: G?.C ?? H,
|
|
886
886
|
we: G?.we ?? u,
|
|
887
887
|
qe: 0,
|
|
888
888
|
ce: e,
|
|
@@ -920,7 +920,7 @@ function at(e, t, n, r, i, a) {
|
|
|
920
920
|
be: !1,
|
|
921
921
|
ut: a?.unobserved,
|
|
922
922
|
ye: null,
|
|
923
|
-
C: G?.C ??
|
|
923
|
+
C: G?.C ?? H,
|
|
924
924
|
we: G?.we ?? u,
|
|
925
925
|
qe: 0,
|
|
926
926
|
ce: e,
|
|
@@ -966,7 +966,7 @@ function st(e, t) {
|
|
|
966
966
|
let t = G.Fe;
|
|
967
967
|
t === null ? G.Fe = e : (e.He = t, t.ct = e, G.Fe = e);
|
|
968
968
|
}
|
|
969
|
-
n && (e.xe = n.xe + 1),
|
|
969
|
+
n && (e.xe = n.xe + 1), I.It !== null && I.It(e), !t?.lazy && nt(e, !0);
|
|
970
970
|
}
|
|
971
971
|
function ct(e, t, n = null) {
|
|
972
972
|
let r = {
|
|
@@ -987,11 +987,11 @@ function lt(e, t) {
|
|
|
987
987
|
return e === t;
|
|
988
988
|
}
|
|
989
989
|
function ut(e, t) {
|
|
990
|
-
if (
|
|
990
|
+
if (I.St === null && !Ze) return e();
|
|
991
991
|
let n = Ze;
|
|
992
992
|
Ze = !1;
|
|
993
993
|
try {
|
|
994
|
-
return
|
|
994
|
+
return I.St === null ? e() : I.St(e);
|
|
995
995
|
} finally {
|
|
996
996
|
Ze = n;
|
|
997
997
|
}
|
|
@@ -1000,20 +1000,20 @@ function dt(e, t) {
|
|
|
1000
1000
|
e.se & 512 ? (e.se &= -513, nt(e, !0)) : e.se & 64 ? nt(e, !0) : t && rt(e);
|
|
1001
1001
|
}
|
|
1002
1002
|
function ft(e) {
|
|
1003
|
-
if (et) return
|
|
1003
|
+
if (et) return I.At(e);
|
|
1004
1004
|
let t = G;
|
|
1005
1005
|
t?.Nt && (t = t.dt);
|
|
1006
1006
|
let n = e, r = e.lt || e;
|
|
1007
1007
|
if (typeof n.ce == "function" && dt(e, !1), !n.ce && r === e && e._e === void 0 && e.Le === void 0 && w === null && tt === null) return t && Ze && Ie(e, t), !t || e.De === o ? e.Ue : e.De;
|
|
1008
1008
|
if (t && Ze && (Ie(e, t, $e), r.ce)) {
|
|
1009
|
-
let n =
|
|
1010
|
-
r.xe >= n.Ve && (
|
|
1009
|
+
let n = pe(e);
|
|
1010
|
+
r.xe >= n.Ve && (ye(t), ve(n), rt(r));
|
|
1011
1011
|
let i = r.xe;
|
|
1012
1012
|
i >= t.xe && e.ke !== t && (t.xe = i + 1);
|
|
1013
1013
|
}
|
|
1014
1014
|
if (r.S & 1) {
|
|
1015
1015
|
if (t && !(Qe && r.Ne && w !== r.Ne)) {
|
|
1016
|
-
if (tt === null ||
|
|
1016
|
+
if (tt === null || I.Ot(r)) throw !Ze && e !== t && Ie(e, t), r._;
|
|
1017
1017
|
} else if (t && r !== e && r.S & 4) throw !Ze && e !== t && Ie(e, t), r._;
|
|
1018
1018
|
else if (!t && r.S & 4) throw r._;
|
|
1019
1019
|
}
|
|
@@ -1022,17 +1022,17 @@ function ft(e) {
|
|
|
1022
1022
|
throw r._;
|
|
1023
1023
|
}
|
|
1024
1024
|
if (e._e !== void 0 && e._e !== o) return c(e._e);
|
|
1025
|
-
if (tt !== null && w !== null && t !== null &&
|
|
1026
|
-
let i = !t || tt !== null &&
|
|
1025
|
+
if (tt !== null && w !== null && t !== null && I.Rt(e, r, t)) return e.Ue;
|
|
1026
|
+
let i = !t || tt !== null && I.Pt(e, r, t) || e.De === o || Qe && e.Ne && w !== e.Ne ? e.Ue : e.De;
|
|
1027
1027
|
return !t && r === e && typeof n.ce == "function" && e.T & 32 && !(r.S & 1) && !e.o && Fe(e), i;
|
|
1028
1028
|
}
|
|
1029
1029
|
function pt(e, t) {
|
|
1030
|
-
if (e.Ne && w !== e.Ne &&
|
|
1030
|
+
if (e.Ne && w !== e.Ne && H.initTransition(e.Ne), e._e !== void 0) return I.Gt(e, t);
|
|
1031
1031
|
let n = e.De === o ? e.Ue : e.De;
|
|
1032
|
-
return typeof t == "function" && (t = t(n)), e.S & 4 || !e.be || !e.be(n, t) ? (e.De === o &&
|
|
1032
|
+
return typeof t == "function" && (t = t(n)), e.S & 4 || !e.be || !e.be(n, t) ? (e.De === o && L(e), e.De = t, (e.ge !== void 0 || e.pe !== void 0) && I.Pe !== null && I.Pe(e, t), e.de = C, z(e), N(), t) : t;
|
|
1033
1033
|
}
|
|
1034
1034
|
function mt(e) {
|
|
1035
|
-
|
|
1035
|
+
_e(e, pe(e)), !(e.se & 1024) && e.De === o && (L(e), N()), e.se = e.se & -4 | i;
|
|
1036
1036
|
}
|
|
1037
1037
|
function ht(e, t) {
|
|
1038
1038
|
let n = pt(e, t);
|
|
@@ -1072,7 +1072,7 @@ function bt(e, t) {
|
|
|
1072
1072
|
this.S & 2 && (this.Je = !0, this.C.enqueue(this.Re, this.Xe ??= xt.bind(null, this)));
|
|
1073
1073
|
return;
|
|
1074
1074
|
}
|
|
1075
|
-
if (!this.C.notify(this, 2, 2)) throw
|
|
1075
|
+
if (!this.C.notify(this, 2, 2)) throw te(n(i)), i;
|
|
1076
1076
|
} else this.Re === 1 && this.C.notify(this, 3, r, i);
|
|
1077
1077
|
}
|
|
1078
1078
|
function xt(e) {
|
|
@@ -1086,7 +1086,7 @@ function xt(e) {
|
|
|
1086
1086
|
e.Tt = void 0, t?.();
|
|
1087
1087
|
}) : console.error(t);
|
|
1088
1088
|
} catch (t) {
|
|
1089
|
-
if (!e.C.notify(e, 2, 2)) throw
|
|
1089
|
+
if (!e.C.notify(e, 2, 2)) throw te(t), t;
|
|
1090
1090
|
}
|
|
1091
1091
|
return;
|
|
1092
1092
|
}
|
|
@@ -1095,12 +1095,12 @@ function xt(e) {
|
|
|
1095
1095
|
try {
|
|
1096
1096
|
r?.(), e.Tt = e.ft(e.Ue, e._t);
|
|
1097
1097
|
} catch (n) {
|
|
1098
|
-
if (e._ = new t(e, n), e.S |= 2, !e.C.notify(e, 2, 2)) throw
|
|
1098
|
+
if (e._ = new t(e, n), e.S |= 2, !e.C.notify(e, 2, 2)) throw te(n), n;
|
|
1099
1099
|
} finally {
|
|
1100
1100
|
e._t = e.Ue, e.Je = !1;
|
|
1101
1101
|
}
|
|
1102
1102
|
}
|
|
1103
|
-
|
|
1103
|
+
I.et = xt;
|
|
1104
1104
|
//#endregion
|
|
1105
1105
|
//#region ../../node_modules/.bun/@solidjs+signals@2.0.0-rc.0/node_modules/@solidjs/signals/dist/prod/signals.js
|
|
1106
1106
|
function St(e) {
|
|
@@ -1685,7 +1685,7 @@ function Dn(e, t, n, r = {}) {
|
|
|
1685
1685
|
...r,
|
|
1686
1686
|
insertOptions: { schedule: !0 }
|
|
1687
1687
|
});
|
|
1688
|
-
return
|
|
1688
|
+
return se(), i;
|
|
1689
1689
|
} finally {}
|
|
1690
1690
|
}
|
|
1691
1691
|
//#endregion
|
|
@@ -1891,7 +1891,7 @@ function Pn(e) {
|
|
|
1891
1891
|
r = i;
|
|
1892
1892
|
let a = e();
|
|
1893
1893
|
n(t, () => a, void 0, void 0, { schedule: !0 });
|
|
1894
|
-
}),
|
|
1894
|
+
}), se(), r;
|
|
1895
1895
|
}
|
|
1896
1896
|
};
|
|
1897
1897
|
}
|
|
@@ -3219,47 +3219,47 @@ function Ca(e = {}, t = !1) {
|
|
|
3219
3219
|
zIndex: "2147483646"
|
|
3220
3220
|
}), k.appendChild(h), h), M = (e, t) => {
|
|
3221
3221
|
e && (e.dataset.state = t ? "visible" : "hidden");
|
|
3222
|
-
},
|
|
3222
|
+
}, ee = () => {
|
|
3223
3223
|
let e = j();
|
|
3224
3224
|
g ??= ea(n, ga, _a), _ ??= na(n, !1), g.parentNode || e.append(g), _.parentNode || e.append(_);
|
|
3225
|
-
},
|
|
3225
|
+
}, N = (e) => Array.from(e.childNodes).some((e) => e.nodeType === p.TEXT_NODE && !!e.nodeValue?.trim()), te = (e) => !!e && e instanceof d && !(e instanceof f) && !c.has(e.tagName) && N(e) && !e.closest("[data-mesurer-root], [data-mesurer-inspector-ui='true']"), P = (e, t) => {
|
|
3226
3226
|
for (let i of n.elementsFromPoint(e, t)) {
|
|
3227
3227
|
if (Kr(i, r)) return null;
|
|
3228
|
-
if (
|
|
3228
|
+
if (te(i)) return i;
|
|
3229
3229
|
}
|
|
3230
3230
|
return null;
|
|
3231
|
-
},
|
|
3231
|
+
}, ne = () => {
|
|
3232
3232
|
v = null, M(g, !1), M(_, !1);
|
|
3233
|
-
},
|
|
3233
|
+
}, F = (e, t, n) => {
|
|
3234
3234
|
if (!e || e.dataset.state !== "visible") return !1;
|
|
3235
3235
|
let r = e.getBoundingClientRect();
|
|
3236
3236
|
return t >= r.left && t <= r.right && n >= r.top && n <= r.bottom;
|
|
3237
|
-
},
|
|
3238
|
-
if (!m || !
|
|
3239
|
-
|
|
3237
|
+
}, I = (e, t) => E.some((n) => F(n.card, e, t)), L = (t) => {
|
|
3238
|
+
if (!m || !te(t)) return !1;
|
|
3239
|
+
ee();
|
|
3240
3240
|
let i = t.getBoundingClientRect(), a = u.getFast(t);
|
|
3241
3241
|
return v = t, ra(n, _, a, !1), ta(g, i), ia(r, _, i), M(g, !0), M(_, !0), r.clearTimeout(x), x = r.setTimeout(() => {
|
|
3242
3242
|
if (!m || v !== t || !_) return;
|
|
3243
3243
|
let i = u.getFull(t, a);
|
|
3244
3244
|
ra(n, _, i, !1), ia(r, _, t.getBoundingClientRect()), e.onInspect?.(t, i);
|
|
3245
3245
|
}, 24), !0;
|
|
3246
|
-
},
|
|
3246
|
+
}, R = () => E.map((e) => ({
|
|
3247
3247
|
sourceEl: e.sourceEl,
|
|
3248
3248
|
left: e.userPlaced ? e.card.getBoundingClientRect().left + e.card.getBoundingClientRect().width / 2 : 0,
|
|
3249
3249
|
top: e.userPlaced ? e.card.getBoundingClientRect().top : 0,
|
|
3250
3250
|
userPlaced: e.userPlaced
|
|
3251
|
-
})),
|
|
3252
|
-
D.push(
|
|
3253
|
-
},
|
|
3251
|
+
})), z = () => {
|
|
3252
|
+
D.push(R()), D.length > 100 && D.shift(), O.length = 0;
|
|
3253
|
+
}, B = (t, n = !0, r = !0) => {
|
|
3254
3254
|
let i = E.indexOf(t);
|
|
3255
|
-
i < 0 || (n &&
|
|
3256
|
-
},
|
|
3257
|
-
for (; E.length;)
|
|
3258
|
-
},
|
|
3255
|
+
i < 0 || (n && z(), E.splice(i, 1), t.detach(), t.box.remove(), t.card.remove(), r && e.onUnpin?.(t.sourceEl));
|
|
3256
|
+
}, re = (e = !1) => {
|
|
3257
|
+
for (; E.length;) B(E[E.length - 1], !1, e);
|
|
3258
|
+
}, ie = (e) => {
|
|
3259
3259
|
let t = -1, n = 0, i = 0, a = 0, o = 0, s = !1, c = !1, l = (l) => {
|
|
3260
3260
|
if (l.pointerId !== t) return;
|
|
3261
3261
|
let u = l.clientX - n, d = l.clientY - i;
|
|
3262
|
-
!s && Math.abs(u) <= 6 && Math.abs(d) <= 6 || (s || (s = !0, e.card.classList.add("mesurer-ti-card--pinned"), delete e.card.dataset.mesurerNativeScrollAnchor, delete e.card.dataset.mesurerNativeScrollOwner, e.card.style.removeProperty("position-anchor")), c ||= (
|
|
3262
|
+
!s && Math.abs(u) <= 6 && Math.abs(d) <= 6 || (s || (s = !0, e.card.classList.add("mesurer-ti-card--pinned"), delete e.card.dataset.mesurerNativeScrollAnchor, delete e.card.dataset.mesurerNativeScrollOwner, e.card.style.removeProperty("position-anchor")), c ||= (z(), !0), e.userPlaced = !0, e.card.style.left = `${Math.min(r.innerWidth - 8, Math.max(8, a + u))}px`, e.card.style.top = `${Math.min(r.innerHeight - 8, Math.max(8, o + d))}px`);
|
|
3263
3263
|
}, u = (e) => {
|
|
3264
3264
|
(t === -1 || e.pointerId === t) && (r.removeEventListener("pointermove", l), r.removeEventListener("pointerup", u), r.removeEventListener("pointercancel", u), t = -1, s = !1, c = !1);
|
|
3265
3265
|
}, f = (s) => {
|
|
@@ -3270,9 +3270,9 @@ function Ca(e = {}, t = !1) {
|
|
|
3270
3270
|
return e.card.addEventListener("pointerdown", f), () => {
|
|
3271
3271
|
e.card.removeEventListener("pointerdown", f), r.removeEventListener("pointermove", l), r.removeEventListener("pointerup", u), r.removeEventListener("pointercancel", u);
|
|
3272
3272
|
};
|
|
3273
|
-
},
|
|
3273
|
+
}, V = (t, i, a = !0, o = !0) => {
|
|
3274
3274
|
if (E.find((e) => e.sourceEl === t)) return;
|
|
3275
|
-
a &&
|
|
3275
|
+
a && z(), E.length >= l && B(E[0], !1, !0);
|
|
3276
3276
|
let s = j(), c = ea(n, va, ya), d = na(n, !0);
|
|
3277
3277
|
d.classList.add("mesurer-ti-card--draggable"), d.classList.remove("mesurer-ti-card--pinned");
|
|
3278
3278
|
let f = u.getFull(t);
|
|
@@ -3288,24 +3288,24 @@ function Ca(e = {}, t = !1) {
|
|
|
3288
3288
|
userPlaced: i?.userPlaced ?? !1,
|
|
3289
3289
|
detach: () => {}
|
|
3290
3290
|
};
|
|
3291
|
-
E.push(m), m.detach =
|
|
3292
|
-
e.preventDefault(), e.stopPropagation(),
|
|
3291
|
+
E.push(m), m.detach = ie(m), d.querySelector(".mesurer-ti-close")?.addEventListener("click", (e) => {
|
|
3292
|
+
e.preventDefault(), e.stopPropagation(), B(m);
|
|
3293
3293
|
}), o && e.onPin?.(t, f);
|
|
3294
|
-
},
|
|
3295
|
-
|
|
3296
|
-
for (let t of e) t.sourceEl.isConnected &&
|
|
3297
|
-
},
|
|
3294
|
+
}, ae = (e) => {
|
|
3295
|
+
re(!1);
|
|
3296
|
+
for (let t of e) t.sourceEl.isConnected && V(t.sourceEl, t, !1, !1);
|
|
3297
|
+
}, H = () => {
|
|
3298
3298
|
let e = D.pop();
|
|
3299
|
-
return e ? (O.push(
|
|
3300
|
-
}, ae = () => {
|
|
3301
|
-
let e = O.pop();
|
|
3302
|
-
return e ? (D.push(z()), ie(e), !0) : !1;
|
|
3303
|
-
}, W = () => {
|
|
3304
|
-
E.length && (B(), H(!0));
|
|
3299
|
+
return e ? (O.push(R()), ae(e), !0) : !1;
|
|
3305
3300
|
}, oe = () => {
|
|
3301
|
+
let e = O.pop();
|
|
3302
|
+
return e ? (D.push(R()), ae(e), !0) : !1;
|
|
3303
|
+
}, se = () => {
|
|
3304
|
+
E.length && (z(), re(!0));
|
|
3305
|
+
}, ce = () => {
|
|
3306
3306
|
for (let e of E.slice()) {
|
|
3307
3307
|
if (!e.sourceEl.isConnected) {
|
|
3308
|
-
|
|
3308
|
+
B(e, !1, !1);
|
|
3309
3309
|
continue;
|
|
3310
3310
|
}
|
|
3311
3311
|
let t = e.sourceEl.getBoundingClientRect();
|
|
@@ -3313,10 +3313,10 @@ function Ca(e = {}, t = !1) {
|
|
|
3313
3313
|
let n = t.bottom >= 0 && t.right >= 0 && t.left <= r.innerWidth && t.top <= r.innerHeight;
|
|
3314
3314
|
M(e.box, n), M(e.card, n), e.card.style.pointerEvents = n ? "auto" : "none";
|
|
3315
3315
|
}
|
|
3316
|
-
},
|
|
3316
|
+
}, le = () => {
|
|
3317
3317
|
if (m) {
|
|
3318
3318
|
if (v && g && _) {
|
|
3319
|
-
if (!v.isConnected)
|
|
3319
|
+
if (!v.isConnected) ne();
|
|
3320
3320
|
else {
|
|
3321
3321
|
let e = v.getBoundingClientRect();
|
|
3322
3322
|
ta(g, e), ia(r, _, e);
|
|
@@ -3324,91 +3324,91 @@ function Ca(e = {}, t = !1) {
|
|
|
3324
3324
|
M(g, t), M(_, t);
|
|
3325
3325
|
}
|
|
3326
3326
|
}
|
|
3327
|
-
|
|
3327
|
+
ce();
|
|
3328
3328
|
}
|
|
3329
|
-
},
|
|
3329
|
+
}, ue = () => {
|
|
3330
3330
|
if (!m) return;
|
|
3331
|
-
let e =
|
|
3332
|
-
if (!e)
|
|
3333
|
-
else if (e !== v)
|
|
3331
|
+
let e = P(y.x, y.y);
|
|
3332
|
+
if (!e) ne();
|
|
3333
|
+
else if (e !== v) L(e);
|
|
3334
3334
|
else if (g && _) {
|
|
3335
3335
|
let t = e.getBoundingClientRect();
|
|
3336
3336
|
ta(g, t), ia(r, _, t);
|
|
3337
3337
|
}
|
|
3338
|
-
|
|
3339
|
-
},
|
|
3338
|
+
ce();
|
|
3339
|
+
}, de = () => {
|
|
3340
3340
|
b ||= r.requestAnimationFrame(() => {
|
|
3341
|
-
b = 0,
|
|
3341
|
+
b = 0, ue();
|
|
3342
3342
|
});
|
|
3343
|
-
},
|
|
3343
|
+
}, fe = (e) => e.composedPath().some((e) => Kr(e, r)), pe = (e) => {
|
|
3344
3344
|
if (y = {
|
|
3345
3345
|
x: e.clientX,
|
|
3346
3346
|
y: e.clientY
|
|
3347
|
-
},
|
|
3348
|
-
|
|
3347
|
+
}, fe(e) || I(e.clientX, e.clientY)) {
|
|
3348
|
+
ne();
|
|
3349
3349
|
return;
|
|
3350
3350
|
}
|
|
3351
|
-
|
|
3352
|
-
},
|
|
3351
|
+
F(_, e.clientX, e.clientY) || de();
|
|
3352
|
+
}, U = (e, t, n) => {
|
|
3353
3353
|
if (!e || e.dataset.mesurerNativeScrollAnchor) return;
|
|
3354
3354
|
let r = Number.parseFloat(e.style.left), i = Number.parseFloat(e.style.top);
|
|
3355
3355
|
Number.isFinite(r) && (e.style.left = `${r - t}px`), Number.isFinite(i) && (e.style.top = `${i - n}px`);
|
|
3356
|
-
},
|
|
3356
|
+
}, me = () => {
|
|
3357
3357
|
let e = r.scrollX, t = r.scrollY, i = e - C, a = t - w;
|
|
3358
3358
|
if (C = e, w = t, Jr(n)) {
|
|
3359
3359
|
if (i || a) {
|
|
3360
|
-
|
|
3361
|
-
for (let e of E)
|
|
3360
|
+
U(g, i, a), U(_, i, a);
|
|
3361
|
+
for (let e of E) U(e.box, i, a), e.userPlaced || U(e.card, i, a);
|
|
3362
3362
|
}
|
|
3363
3363
|
S && r.clearTimeout(S), S = r.setTimeout(() => {
|
|
3364
|
-
S = 0,
|
|
3364
|
+
S = 0, le();
|
|
3365
3365
|
}, ba);
|
|
3366
3366
|
return;
|
|
3367
3367
|
}
|
|
3368
|
-
|
|
3369
|
-
}, me = (e) => {
|
|
3370
|
-
e.relatedTarget || te();
|
|
3368
|
+
le(), de();
|
|
3371
3369
|
}, he = (e) => {
|
|
3372
|
-
|
|
3373
|
-
|
|
3370
|
+
e.relatedTarget || ne();
|
|
3371
|
+
}, ge = (e) => {
|
|
3372
|
+
if (!fe(e)) {
|
|
3373
|
+
if (F(_, e.clientX, e.clientY) || I(e.clientX, e.clientY)) {
|
|
3374
3374
|
e.preventDefault(), e.stopImmediatePropagation();
|
|
3375
3375
|
return;
|
|
3376
3376
|
}
|
|
3377
3377
|
if (e.preventDefault(), e.stopImmediatePropagation(), e.button === 0) {
|
|
3378
|
-
let t =
|
|
3379
|
-
t &&
|
|
3378
|
+
let t = P(e.clientX, e.clientY);
|
|
3379
|
+
t && V(t);
|
|
3380
3380
|
}
|
|
3381
3381
|
}
|
|
3382
|
-
},
|
|
3383
|
-
if (!
|
|
3384
|
-
if (
|
|
3382
|
+
}, _e = (e) => {
|
|
3383
|
+
if (!fe(e)) {
|
|
3384
|
+
if (F(_, e.clientX, e.clientY) || I(e.clientX, e.clientY)) {
|
|
3385
3385
|
e.preventDefault(), e.stopImmediatePropagation();
|
|
3386
3386
|
return;
|
|
3387
3387
|
}
|
|
3388
3388
|
e.preventDefault(), e.stopImmediatePropagation();
|
|
3389
3389
|
}
|
|
3390
|
-
},
|
|
3391
|
-
m || (m = !0, A(), j(), n.body.classList.add(s), C = r.scrollX, w = r.scrollY, r.addEventListener("mousemove",
|
|
3390
|
+
}, ve = () => {
|
|
3391
|
+
m || (m = !0, A(), j(), n.body.classList.add(s), C = r.scrollX, w = r.scrollY, r.addEventListener("mousemove", pe, !0), r.addEventListener("mouseout", he, !0), r.addEventListener("click", ge, !0), r.addEventListener("auxclick", _e, !0), r.addEventListener("scroll", me, {
|
|
3392
3392
|
capture: !0,
|
|
3393
3393
|
passive: !0
|
|
3394
|
-
}), r.addEventListener("resize",
|
|
3395
|
-
}, ve = () => {
|
|
3396
|
-
m && (m = !1, r.cancelAnimationFrame(b), b = 0, r.clearTimeout(x), r.clearTimeout(S), S = 0, r.removeEventListener("mousemove", de, !0), r.removeEventListener("mouseout", me, !0), r.removeEventListener("click", he, !0), r.removeEventListener("auxclick", ge, !0), r.removeEventListener("scroll", pe, !0), r.removeEventListener("resize", le, !0), te(), H(), g?.remove(), _?.remove(), g = null, _ = null, D.length = 0, O.length = 0, n.body.classList.remove(s));
|
|
3394
|
+
}), r.addEventListener("resize", de, !0));
|
|
3397
3395
|
}, ye = () => {
|
|
3398
|
-
|
|
3396
|
+
m && (m = !1, r.cancelAnimationFrame(b), b = 0, r.clearTimeout(x), r.clearTimeout(S), S = 0, r.removeEventListener("mousemove", pe, !0), r.removeEventListener("mouseout", he, !0), r.removeEventListener("click", ge, !0), r.removeEventListener("auxclick", _e, !0), r.removeEventListener("scroll", me, !0), r.removeEventListener("resize", de, !0), ne(), re(), g?.remove(), _?.remove(), g = null, _ = null, D.length = 0, O.length = 0, n.body.classList.remove(s));
|
|
3397
|
+
}, be = () => {
|
|
3398
|
+
ye(), T?.(), T = null, h?.remove(), h = null, n.getElementById(o)?.remove(), k instanceof r.ShadowRoot && k.querySelector(`#${o}`)?.remove();
|
|
3399
3399
|
};
|
|
3400
3400
|
return {
|
|
3401
|
-
enable:
|
|
3402
|
-
disable:
|
|
3403
|
-
undo:
|
|
3404
|
-
redo:
|
|
3405
|
-
clear:
|
|
3406
|
-
inspect:
|
|
3401
|
+
enable: ve,
|
|
3402
|
+
disable: ye,
|
|
3403
|
+
undo: H,
|
|
3404
|
+
redo: oe,
|
|
3405
|
+
clear: se,
|
|
3406
|
+
inspect: L,
|
|
3407
3407
|
isEnabled: () => m,
|
|
3408
3408
|
canUndo: () => D.length > 0,
|
|
3409
3409
|
canRedo: () => O.length > 0,
|
|
3410
|
-
cleanup:
|
|
3411
|
-
destroy:
|
|
3410
|
+
cleanup: be,
|
|
3411
|
+
destroy: be
|
|
3412
3412
|
};
|
|
3413
3413
|
}
|
|
3414
3414
|
Ca({}, !0);
|
|
@@ -3550,10 +3550,10 @@ var wa = "/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n@la
|
|
|
3550
3550
|
d.dataset.mesurerArrangeSnapLine = "horizontal", d.setAttribute("aria-hidden", "true"), d.style.position = "fixed", d.style.display = "none", d.style.height = "1px", d.style.backgroundColor = Wa, d.style.pointerEvents = "none";
|
|
3551
3551
|
let f = n.createElement("div");
|
|
3552
3552
|
f.dataset.mesurerArrangeBox = "true", f.setAttribute("role", "application"), f.setAttribute("aria-label", "Arrange selected elements"), f.style.position = "fixed", f.style.display = "none", f.style.boxSizing = "border-box", f.style.border = "1px solid #0d99ff", f.style.cursor = "grab", f.style.pointerEvents = "auto", f.style.touchAction = "none", f.style.userSelect = "none", l.append(u, d, f);
|
|
3553
|
-
let p = /* @__PURE__ */ new Map(), m = /* @__PURE__ */ new Map(), h = /* @__PURE__ */ new Map(), g = /* @__PURE__ */ new Map(), _ = {
|
|
3553
|
+
let p = /* @__PURE__ */ new Map(), m = /* @__PURE__ */ new Map(), h = /* @__PURE__ */ new Map(), g = /* @__PURE__ */ new Map(), _ = /* @__PURE__ */ new Map(), v = {
|
|
3554
3554
|
intentId: null,
|
|
3555
3555
|
state: "desired"
|
|
3556
|
-
},
|
|
3556
|
+
}, y = null, b = null, x = null, S = !1, C = 0, w = null, T = () => e.state.get("mesurer.arrange.intents") ?? { intents: [] }, E = () => e.state.get("mesurer.arrange.active") ?? !1, D = () => {
|
|
3557
3557
|
let t = e.state.get(ja);
|
|
3558
3558
|
return {
|
|
3559
3559
|
snapping: t?.snapping ?? !0,
|
|
@@ -3563,58 +3563,59 @@ var wa = "/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n@la
|
|
|
3563
3563
|
preferXrayEdges: t?.preferXrayEdges ?? !0,
|
|
3564
3564
|
snapLines: t?.snapLines ?? !0
|
|
3565
3565
|
};
|
|
3566
|
-
},
|
|
3566
|
+
}, O = (t) => {
|
|
3567
3567
|
e.state.update(ja, (e) => ({
|
|
3568
3568
|
...e,
|
|
3569
3569
|
...t
|
|
3570
3570
|
}));
|
|
3571
|
-
},
|
|
3571
|
+
}, k = () => io(r), A = () => T().intents.filter((e) => e.pageUrl === k()), j = (e) => !!e.closest("[data-mesurer-island='true'], [data-mesurer-inspector-ui='true'], [data-mesurer-root='true']"), M = (e) => Li(e, o) && !j(e), ee = (e) => {
|
|
3572
3572
|
let t = [];
|
|
3573
|
-
o instanceof c.HTMLElement && o.matches(e) && !
|
|
3574
|
-
for (let n of o.querySelectorAll(e)) n instanceof c.HTMLElement &&
|
|
3573
|
+
o instanceof c.HTMLElement && o.matches(e) && !j(o) && t.push(o);
|
|
3574
|
+
for (let n of o.querySelectorAll(e)) n instanceof c.HTMLElement && M(n) && t.push(n);
|
|
3575
3575
|
return t;
|
|
3576
|
-
}, N = (e) => {
|
|
3577
|
-
let t = oo(e);
|
|
3578
|
-
if (
|
|
3579
|
-
|
|
3576
|
+
}, N = (e, t) => e.localName !== t.fingerprintTag || t.fingerprintId && e.id !== t.fingerprintId || t.fingerprintTestId && e.getAttribute("data-testid") !== t.fingerprintTestId || t.fingerprintRole && e.getAttribute("role") !== t.fingerprintRole || t.fingerprintAriaLabel && e.getAttribute("aria-label") !== t.fingerprintAriaLabel ? !1 : t.fingerprintClasses.every((t) => e.classList.contains(t)), te = (e) => {
|
|
3577
|
+
let t = oo(e), n = m.get(e.selector);
|
|
3578
|
+
if (n && n.isConnected && M(n) && N(n, e)) return n;
|
|
3579
|
+
if (n && m.delete(e.selector), !Vi(t)) return null;
|
|
3580
|
+
let r = [];
|
|
3580
3581
|
try {
|
|
3581
|
-
|
|
3582
|
+
r = ee(e.selector).filter((e) => Hi(e, t));
|
|
3582
3583
|
} catch {
|
|
3583
3584
|
return null;
|
|
3584
3585
|
}
|
|
3585
|
-
if (
|
|
3586
|
+
if (r.length !== 1) return null;
|
|
3586
3587
|
if (!t.id && !t.testId) {
|
|
3587
3588
|
let e = [];
|
|
3588
3589
|
try {
|
|
3589
|
-
e =
|
|
3590
|
+
e = ee(t.tag).filter((e) => Hi(e, t));
|
|
3590
3591
|
} catch {
|
|
3591
3592
|
return null;
|
|
3592
3593
|
}
|
|
3593
|
-
if (e.length !== 1 || e[0] !==
|
|
3594
|
+
if (e.length !== 1 || e[0] !== r[0]) return null;
|
|
3594
3595
|
}
|
|
3595
|
-
return
|
|
3596
|
+
return r[0] ?? null;
|
|
3596
3597
|
}, P = {
|
|
3597
3598
|
value: "none",
|
|
3598
3599
|
priority: "important"
|
|
3599
|
-
},
|
|
3600
|
+
}, ne = (e) => {
|
|
3600
3601
|
let t = lo(e, "transition-property");
|
|
3601
|
-
(!
|
|
3602
|
+
(!h.get(e) || !fo(t, P)) && h.set(e, t), fo(t, P) || e.style.setProperty("transition-property", P.value, P.priority);
|
|
3602
3603
|
}, F = (e) => {
|
|
3603
|
-
let t =
|
|
3604
|
-
t && (fo(lo(e, "transition-property"), P) && (t.value || t.priority ? e.style.setProperty("transition-property", t.value, t.priority) : e.style.removeProperty("transition-property")),
|
|
3605
|
-
},
|
|
3606
|
-
for (let t of
|
|
3607
|
-
}, I = () => {
|
|
3608
|
-
for (let e of m.keys()) F(e);
|
|
3604
|
+
let t = h.get(e);
|
|
3605
|
+
t && (fo(lo(e, "transition-property"), P) && (t.value || t.priority ? e.style.setProperty("transition-property", t.value, t.priority) : e.style.removeProperty("transition-property")), h.delete(e));
|
|
3606
|
+
}, I = (e) => {
|
|
3607
|
+
for (let t of h.keys()) e.has(t) || F(t);
|
|
3609
3608
|
}, L = () => {
|
|
3609
|
+
for (let e of h.keys()) F(e);
|
|
3610
|
+
}, R = () => {
|
|
3610
3611
|
for (let e of p.values()) mo(e);
|
|
3611
3612
|
p.clear();
|
|
3612
|
-
}, R = () => {
|
|
3613
|
-
L(), I();
|
|
3614
3613
|
}, z = () => {
|
|
3614
|
+
R(), L();
|
|
3615
|
+
}, B = () => {
|
|
3615
3616
|
u.style.display = "none", d.style.display = "none";
|
|
3616
|
-
},
|
|
3617
|
-
if (
|
|
3617
|
+
}, re = (e, t, n) => {
|
|
3618
|
+
if (B(), D().snapLines) {
|
|
3618
3619
|
if (e) {
|
|
3619
3620
|
let t = Math.min(n.top, e.start), r = Math.max(n.top + n.height, e.end);
|
|
3620
3621
|
u.style.display = "block", u.style.left = `${e.position}px`, u.style.top = `${t}px`, u.style.height = `${Math.max(1, r - t)}px`;
|
|
@@ -3624,51 +3625,51 @@ var wa = "/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n@la
|
|
|
3624
3625
|
d.style.display = "block", d.style.left = `${e}px`, d.style.top = `${t.position}px`, d.style.width = `${Math.max(1, r - e)}px`;
|
|
3625
3626
|
}
|
|
3626
3627
|
}
|
|
3627
|
-
},
|
|
3628
|
-
if (!(
|
|
3628
|
+
}, ie = () => {
|
|
3629
|
+
if (!(g.size > 0)) for (let e of s.querySelectorAll("[data-mesurer-measurement='true']")) e instanceof c.HTMLElement && (g.set(e, {
|
|
3629
3630
|
value: e.style.getPropertyValue("visibility"),
|
|
3630
3631
|
priority: e.style.getPropertyPriority("visibility")
|
|
3631
3632
|
}), e.style.setProperty("visibility", "hidden", "important"));
|
|
3632
|
-
},
|
|
3633
|
-
for (let [e, t] of
|
|
3634
|
-
|
|
3635
|
-
},
|
|
3633
|
+
}, V = () => {
|
|
3634
|
+
for (let [e, t] of g) t.value || t.priority ? e.style.setProperty("visibility", t.value, t.priority) : e.style.removeProperty("visibility");
|
|
3635
|
+
g.clear();
|
|
3636
|
+
}, ae = (e) => {
|
|
3636
3637
|
if (e.parentElement instanceof c.HTMLElement) return e.parentElement;
|
|
3637
3638
|
let t = e.getRootNode();
|
|
3638
3639
|
return t instanceof c.ShadowRoot && t.host instanceof c.HTMLElement ? t.host : null;
|
|
3639
|
-
},
|
|
3640
|
-
let n =
|
|
3640
|
+
}, H = (e, t) => {
|
|
3641
|
+
let n = ae(e);
|
|
3641
3642
|
for (; n;) {
|
|
3642
3643
|
let e = t.get(n);
|
|
3643
3644
|
if (e) return e;
|
|
3644
|
-
n =
|
|
3645
|
+
n = ae(n);
|
|
3645
3646
|
}
|
|
3646
3647
|
return {
|
|
3647
3648
|
x: 0,
|
|
3648
3649
|
y: 0
|
|
3649
3650
|
};
|
|
3650
|
-
},
|
|
3651
|
+
}, oe = (e = A()) => {
|
|
3651
3652
|
let t = /* @__PURE__ */ new Map();
|
|
3652
3653
|
for (let n of e) for (let e of n.targets) {
|
|
3653
|
-
let n =
|
|
3654
|
+
let n = te(e);
|
|
3654
3655
|
n && t.set(n, e);
|
|
3655
3656
|
}
|
|
3656
3657
|
return t;
|
|
3657
|
-
},
|
|
3658
|
+
}, se = (e) => e.offsetSpace !== "local" || e.desiredLocalOffsetX === null || e.desiredLocalOffsetY === null ? null : {
|
|
3658
3659
|
x: e.desiredLocalOffsetX,
|
|
3659
3660
|
y: e.desiredLocalOffsetY
|
|
3660
|
-
},
|
|
3661
|
-
let n =
|
|
3661
|
+
}, ce = (e, t) => {
|
|
3662
|
+
let n = ae(e);
|
|
3662
3663
|
for (; n;) {
|
|
3663
3664
|
if (t.has(n)) return n;
|
|
3664
|
-
n =
|
|
3665
|
+
n = ae(n);
|
|
3665
3666
|
}
|
|
3666
3667
|
return null;
|
|
3667
|
-
},
|
|
3668
|
-
let n =
|
|
3668
|
+
}, le = (e = A(), t = /* @__PURE__ */ new Map()) => {
|
|
3669
|
+
let n = oe(e), r = /* @__PURE__ */ new Set([...n.keys(), ...t.keys()]), i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Set(), o = (e) => {
|
|
3669
3670
|
let s = i.get(e);
|
|
3670
3671
|
if (s) return s;
|
|
3671
|
-
let c = n.get(e), l = t.get(e) ?? (c ?
|
|
3672
|
+
let c = n.get(e), l = t.get(e) ?? (c ? se(c) : null);
|
|
3672
3673
|
if (!l && c) {
|
|
3673
3674
|
let t = {
|
|
3674
3675
|
x: c.desiredOffsetX,
|
|
@@ -3682,7 +3683,7 @@ var wa = "/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n@la
|
|
|
3682
3683
|
};
|
|
3683
3684
|
if (a.has(e)) return l;
|
|
3684
3685
|
a.add(e);
|
|
3685
|
-
let u =
|
|
3686
|
+
let u = ce(e, r), d = u ? o(u) : {
|
|
3686
3687
|
x: 0,
|
|
3687
3688
|
y: 0
|
|
3688
3689
|
}, f = {
|
|
@@ -3693,15 +3694,15 @@ var wa = "/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n@la
|
|
|
3693
3694
|
};
|
|
3694
3695
|
for (let e of r) o(e);
|
|
3695
3696
|
return i;
|
|
3696
|
-
},
|
|
3697
|
-
if (
|
|
3698
|
-
if (!
|
|
3699
|
-
let e =
|
|
3700
|
-
if (!e) return
|
|
3697
|
+
}, ue = () => {
|
|
3698
|
+
if (v.state === "live") return /* @__PURE__ */ new Map();
|
|
3699
|
+
if (!v.intentId) return le();
|
|
3700
|
+
let e = T().intents.find((e) => e.id === v.intentId);
|
|
3701
|
+
if (!e) return le();
|
|
3701
3702
|
let t = /* @__PURE__ */ new Map();
|
|
3702
3703
|
for (let n of e.targets) {
|
|
3703
|
-
let e =
|
|
3704
|
-
e && t.set(e,
|
|
3704
|
+
let e = te(n);
|
|
3705
|
+
e && t.set(e, v.state === "before" ? {
|
|
3705
3706
|
x: n.beforeOffsetX,
|
|
3706
3707
|
y: n.beforeOffsetY
|
|
3707
3708
|
} : {
|
|
@@ -3710,10 +3711,10 @@ var wa = "/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n@la
|
|
|
3710
3711
|
});
|
|
3711
3712
|
}
|
|
3712
3713
|
return t;
|
|
3713
|
-
},
|
|
3714
|
+
}, de = (e) => {
|
|
3714
3715
|
let t = [...e].flatMap(([t, n]) => {
|
|
3715
|
-
if (!t.isConnected || !
|
|
3716
|
-
let r =
|
|
3716
|
+
if (!t.isConnected || !M(t)) return [];
|
|
3717
|
+
let r = H(t, e), i = {
|
|
3717
3718
|
x: n.x - r.x,
|
|
3718
3719
|
y: n.y - r.y
|
|
3719
3720
|
};
|
|
@@ -3722,8 +3723,8 @@ var wa = "/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n@la
|
|
|
3722
3723
|
offset: i
|
|
3723
3724
|
}];
|
|
3724
3725
|
}), n = new Set(t.map(({ element: e }) => e));
|
|
3725
|
-
for (let { element: e } of t)
|
|
3726
|
-
|
|
3726
|
+
for (let { element: e } of t) ne(e);
|
|
3727
|
+
R();
|
|
3727
3728
|
for (let { element: e, offset: n } of t) {
|
|
3728
3729
|
let t = uo(e), i = r.getComputedStyle(e).transform, a = i && i !== "none" ? ` ${i}` : "";
|
|
3729
3730
|
e.style.setProperty("transform", `translate3d(${n.x}px, ${n.y}px, 0)${a}`, "important"), p.set(e, {
|
|
@@ -3732,26 +3733,26 @@ var wa = "/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n@la
|
|
|
3732
3733
|
appliedTransform: uo(e)
|
|
3733
3734
|
});
|
|
3734
3735
|
}
|
|
3735
|
-
|
|
3736
|
-
},
|
|
3737
|
-
|
|
3736
|
+
I(n);
|
|
3737
|
+
}, fe = () => de(ue()), pe = (e) => {
|
|
3738
|
+
R();
|
|
3738
3739
|
try {
|
|
3739
3740
|
return e();
|
|
3740
3741
|
} finally {
|
|
3741
|
-
!
|
|
3742
|
+
!S && !y && fe();
|
|
3742
3743
|
}
|
|
3743
|
-
},
|
|
3744
|
+
}, U = () => i.currentSelection().elements.filter((e) => e instanceof c.HTMLElement && e.isConnected && M(e));
|
|
3744
3745
|
e.state.register({
|
|
3745
3746
|
id: za,
|
|
3746
|
-
initial:
|
|
3747
|
+
initial: U().length > 0
|
|
3747
3748
|
});
|
|
3748
|
-
let
|
|
3749
|
-
let t =
|
|
3750
|
-
t !==
|
|
3751
|
-
},
|
|
3752
|
-
for (let e of
|
|
3753
|
-
|
|
3754
|
-
},
|
|
3749
|
+
let me = () => e.state.get(za) ?? !1, he = () => {
|
|
3750
|
+
let t = U().length > 0;
|
|
3751
|
+
t !== me() && e.state.update(za, () => t);
|
|
3752
|
+
}, ge = () => Qa(U().map((e) => Oi(e))), _e = () => {
|
|
3753
|
+
for (let e of _.values()) e.remove();
|
|
3754
|
+
_.clear();
|
|
3755
|
+
}, ve = (e) => {
|
|
3755
3756
|
let t = e.getBoundingClientRect(), n = t.right + Ka;
|
|
3756
3757
|
n + Ga > r.innerWidth - 4 && (n = Math.max(4, t.left - Ga - Ka));
|
|
3757
3758
|
let i = Math.min(Math.max(4, t.top + qa), Math.max(4, r.innerHeight - Ga - 4));
|
|
@@ -3759,40 +3760,40 @@ var wa = "/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n@la
|
|
|
3759
3760
|
left: n,
|
|
3760
3761
|
top: i
|
|
3761
3762
|
};
|
|
3762
|
-
},
|
|
3763
|
-
if (!
|
|
3764
|
-
|
|
3763
|
+
}, ye = () => {
|
|
3764
|
+
if (!E() || y) {
|
|
3765
|
+
_e();
|
|
3765
3766
|
return;
|
|
3766
3767
|
}
|
|
3767
|
-
let t =
|
|
3768
|
-
for (let t of
|
|
3768
|
+
let t = A(), r = oe(t), i = le(t), a = /* @__PURE__ */ new Set();
|
|
3769
|
+
for (let t of U()) {
|
|
3769
3770
|
let o = r.get(t);
|
|
3770
3771
|
if (!o) continue;
|
|
3771
3772
|
let s = i.get(t);
|
|
3772
3773
|
if (!s) continue;
|
|
3773
|
-
let c =
|
|
3774
|
+
let c = H(t, i), u = se(o) ?? {
|
|
3774
3775
|
x: s.x - c.x,
|
|
3775
3776
|
y: s.y - c.y
|
|
3776
3777
|
};
|
|
3777
3778
|
if (Math.abs(u.x) <= Ja && Math.abs(u.y) <= Ja) continue;
|
|
3778
3779
|
a.add(t);
|
|
3779
|
-
let d =
|
|
3780
|
+
let d = _.get(t);
|
|
3780
3781
|
d || (d = n.createElement("button"), d.type = "button", d.dataset.mesurerArrangeReset = "true", d.dataset.mesurerInspectorUi = "true", d.setAttribute("aria-label", "Reset position"), d.title = "Reset position", d.textContent = "↺", d.className = "msr:pointer-events-auto msr:flex msr:size-6 msr:items-center msr:justify-center msr:rounded-[7px] msr:border msr:border-ink-200 msr:bg-white msr:text-[14px] msr:leading-none msr:text-black msr:outline-none msr:hover:bg-ink-50 msr:focus-visible:border-[#0d99ff]", d.style.position = "fixed", d.addEventListener("pointerdown", (e) => e.stopPropagation()), d.addEventListener("click", (n) => {
|
|
3781
|
-
n.preventDefault(), n.stopPropagation(),
|
|
3782
|
-
|
|
3782
|
+
n.preventDefault(), n.stopPropagation(), x = [t], e.command.execute(La, void 0, { source: "arrange-reset-button" }).catch(() => {
|
|
3783
|
+
x = null;
|
|
3783
3784
|
});
|
|
3784
|
-
}),
|
|
3785
|
-
let f =
|
|
3785
|
+
}), _.set(t, d), l.append(d));
|
|
3786
|
+
let f = ve(t);
|
|
3786
3787
|
d.style.left = `${f.left}px`, d.style.top = `${f.top}px`;
|
|
3787
3788
|
}
|
|
3788
|
-
for (let [e, t] of
|
|
3789
|
-
},
|
|
3789
|
+
for (let [e, t] of _) a.has(e) || (t.remove(), _.delete(e));
|
|
3790
|
+
}, be = (t) => {
|
|
3790
3791
|
let n = new Set(t);
|
|
3791
3792
|
n.size && (e.state.update("mesurer.arrange.intents", (e) => {
|
|
3792
3793
|
let t = !1, r = e.intents.flatMap((e) => {
|
|
3793
|
-
if (e.pageUrl !==
|
|
3794
|
+
if (e.pageUrl !== k()) return [e];
|
|
3794
3795
|
let r = e.targets.filter((e) => {
|
|
3795
|
-
let r =
|
|
3796
|
+
let r = te(e), i = r !== null && n.has(r);
|
|
3796
3797
|
return i && (t = !0), !i;
|
|
3797
3798
|
});
|
|
3798
3799
|
return r.length ? r.length === e.targets.length ? [e] : [{
|
|
@@ -3801,17 +3802,17 @@ var wa = "/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n@la
|
|
|
3801
3802
|
}] : [];
|
|
3802
3803
|
});
|
|
3803
3804
|
return t ? { intents: r } : e;
|
|
3804
|
-
}),
|
|
3805
|
-
},
|
|
3805
|
+
}), Ce(), W());
|
|
3806
|
+
}, xe = () => {
|
|
3806
3807
|
e.state.update(ka, (e) => {
|
|
3807
|
-
let t = e.intents.filter((e) => e.pageUrl !==
|
|
3808
|
+
let t = e.intents.filter((e) => e.pageUrl !== k());
|
|
3808
3809
|
return t.length === e.intents.length ? e : { intents: t };
|
|
3809
|
-
}),
|
|
3810
|
-
},
|
|
3811
|
-
let t =
|
|
3810
|
+
}), Ce(), W();
|
|
3811
|
+
}, Se = (e) => {
|
|
3812
|
+
let t = D();
|
|
3812
3813
|
if (!t.snapping) return [];
|
|
3813
3814
|
let n = [], a = new Set(e), s = i.snapshot(), l = s.xrayVisible && t.preferXrayEdges && t.elementEdges, u = 0, d = (i) => {
|
|
3814
|
-
if (u >= Ua || a.has(i) || e.some((e) => e.contains(i)) || !
|
|
3815
|
+
if (u >= Ua || a.has(i) || e.some((e) => e.contains(i)) || !M(i)) return;
|
|
3815
3816
|
let o = r.getComputedStyle(i);
|
|
3816
3817
|
if (o.display === "none" || o.visibility === "hidden" || o.visibility === "collapse") return;
|
|
3817
3818
|
let s = o.outlineStyle === "solid" && (Number.parseFloat(o.outlineWidth) || 0) > 0;
|
|
@@ -3879,61 +3880,61 @@ var wa = "/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n@la
|
|
|
3879
3880
|
kind: "guide"
|
|
3880
3881
|
});
|
|
3881
3882
|
return n;
|
|
3882
|
-
},
|
|
3883
|
-
if (!
|
|
3884
|
-
f.style.display = "none",
|
|
3883
|
+
}, W = (e) => {
|
|
3884
|
+
if (!E()) {
|
|
3885
|
+
f.style.display = "none", _e();
|
|
3885
3886
|
return;
|
|
3886
3887
|
}
|
|
3887
|
-
let t = e === void 0 ?
|
|
3888
|
+
let t = e === void 0 ? ge() : e;
|
|
3888
3889
|
if (!t) {
|
|
3889
|
-
f.style.display = "none",
|
|
3890
|
+
f.style.display = "none", _e();
|
|
3890
3891
|
return;
|
|
3891
3892
|
}
|
|
3892
|
-
f.style.display = "block", f.style.left = `${t.left}px`, f.style.top = `${t.top}px`, f.style.width = `${t.width}px`, f.style.height = `${t.height}px`,
|
|
3893
|
-
},
|
|
3894
|
-
|
|
3893
|
+
f.style.display = "block", f.style.left = `${t.left}px`, f.style.top = `${t.top}px`, f.style.width = `${t.width}px`, f.style.height = `${t.height}px`, y ? _e() : ye();
|
|
3894
|
+
}, Ce = () => {
|
|
3895
|
+
v = {
|
|
3895
3896
|
intentId: null,
|
|
3896
3897
|
state: "desired"
|
|
3897
|
-
},
|
|
3898
|
-
},
|
|
3899
|
-
|
|
3898
|
+
}, fe(), B(), E() ? ie() : V();
|
|
3899
|
+
}, we = () => {
|
|
3900
|
+
v = {
|
|
3900
3901
|
intentId: null,
|
|
3901
3902
|
state: "live"
|
|
3902
|
-
},
|
|
3903
|
-
},
|
|
3904
|
-
|
|
3905
|
-
},
|
|
3906
|
-
|
|
3907
|
-
|
|
3903
|
+
}, z(), B(), V();
|
|
3904
|
+
}, Te = () => {
|
|
3905
|
+
S || y || (fe(), B(), E() ? ie() : V(), W());
|
|
3906
|
+
}, Ee = () => {
|
|
3907
|
+
C || S || (C = r.requestAnimationFrame(() => {
|
|
3908
|
+
C = 0, Te();
|
|
3908
3909
|
}));
|
|
3909
|
-
},
|
|
3910
|
+
}, De = async () => {
|
|
3910
3911
|
s.querySelector("[data-mesurer-builtin='select'] button")?.getAttribute("aria-pressed") !== "true" && await e.command.execute(Na, void 0, { source: "arrange" });
|
|
3911
|
-
},
|
|
3912
|
-
if (!
|
|
3913
|
-
let r =
|
|
3912
|
+
}, Oe = (e) => {
|
|
3913
|
+
if (!E() || e.button !== 0) return;
|
|
3914
|
+
let r = U();
|
|
3914
3915
|
if (!r.length) return;
|
|
3915
3916
|
let a = e.shiftKey ? Ri(t.rendererRoot ?? null, () => Ri(l, () => Ii({
|
|
3916
3917
|
x: e.clientX,
|
|
3917
3918
|
y: e.clientY
|
|
3918
3919
|
}, o, n))) : null;
|
|
3919
|
-
if (e.shiftKey && a instanceof c.HTMLElement &&
|
|
3920
|
+
if (e.shiftKey && a instanceof c.HTMLElement && M(a) && !r.includes(a)) {
|
|
3920
3921
|
e.preventDefault(), e.stopPropagation(), i.toggleSelection(a);
|
|
3921
3922
|
return;
|
|
3922
3923
|
}
|
|
3923
|
-
e.preventDefault(), e.stopPropagation(),
|
|
3924
|
+
e.preventDefault(), e.stopPropagation(), v = {
|
|
3924
3925
|
intentId: null,
|
|
3925
3926
|
state: "desired"
|
|
3926
|
-
},
|
|
3927
|
-
let s =
|
|
3928
|
-
|
|
3927
|
+
}, fe();
|
|
3928
|
+
let s = oe(A()), u = le(A()), d = new Set(r);
|
|
3929
|
+
R();
|
|
3929
3930
|
let p = r.map((e, t) => {
|
|
3930
|
-
let n = Oi(e), r =
|
|
3931
|
+
let n = Oi(e), r = H(e, u), i = u.get(e) ?? r, a = s.get(e), o = (a ? se(a) : null) ?? {
|
|
3931
3932
|
x: i.x - r.x,
|
|
3932
3933
|
y: i.y - r.y
|
|
3933
3934
|
}, c = Xa(n, i), l = Bi(e);
|
|
3934
3935
|
return {
|
|
3935
3936
|
element: e,
|
|
3936
|
-
movesDirectly:
|
|
3937
|
+
movesDirectly: ce(e, d) === null,
|
|
3937
3938
|
target: {
|
|
3938
3939
|
id: `target-${t + 1}`,
|
|
3939
3940
|
selector: zi(e),
|
|
@@ -3970,21 +3971,21 @@ var wa = "/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n@la
|
|
|
3970
3971
|
height: e.beforeHeight
|
|
3971
3972
|
})));
|
|
3972
3973
|
if (!m) {
|
|
3973
|
-
|
|
3974
|
+
fe();
|
|
3974
3975
|
return;
|
|
3975
3976
|
}
|
|
3976
|
-
|
|
3977
|
+
fe(), ie(), B(), y = {
|
|
3977
3978
|
pointerId: e.pointerId,
|
|
3978
3979
|
originX: e.clientX,
|
|
3979
3980
|
originY: e.clientY,
|
|
3980
3981
|
targets: p,
|
|
3981
3982
|
groupBefore: m,
|
|
3982
|
-
snapCandidates:
|
|
3983
|
+
snapCandidates: Se(r),
|
|
3983
3984
|
shiftToggleElement: e.shiftKey && a instanceof c.HTMLElement && r.includes(a) ? a : null,
|
|
3984
3985
|
dx: 0,
|
|
3985
3986
|
dy: 0
|
|
3986
|
-
},
|
|
3987
|
-
},
|
|
3987
|
+
}, W(m), f.style.cursor = "grabbing", f.setPointerCapture?.(e.pointerId);
|
|
3988
|
+
}, ke = (e, t, n) => {
|
|
3988
3989
|
let r = /* @__PURE__ */ new Map();
|
|
3989
3990
|
for (let i of e.targets) {
|
|
3990
3991
|
let e = {
|
|
@@ -3997,39 +3998,39 @@ var wa = "/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n@la
|
|
|
3997
3998
|
} : e);
|
|
3998
3999
|
}
|
|
3999
4000
|
return r;
|
|
4000
|
-
},
|
|
4001
|
-
if (!
|
|
4002
|
-
let t = e.clientX -
|
|
4001
|
+
}, Ae = (e) => {
|
|
4002
|
+
if (!y || e.pointerId !== y.pointerId) return;
|
|
4003
|
+
let t = e.clientX - y.originX, n = e.clientY - y.originY, r = null;
|
|
4003
4004
|
e.shiftKey && (Math.abs(t) >= Math.abs(n) ? (n = 0, r = "x") : (t = 0, r = "y"));
|
|
4004
|
-
let i = Xa(
|
|
4005
|
+
let i = Xa(y.groupBefore, {
|
|
4005
4006
|
x: t,
|
|
4006
4007
|
y: n
|
|
4007
|
-
}), a = r === "y" ? null : ro("x", i,
|
|
4008
|
-
t += a?.delta ?? 0, n += o?.delta ?? 0,
|
|
4009
|
-
let s =
|
|
4010
|
-
|
|
4011
|
-
let c = Xa(
|
|
4008
|
+
}), a = r === "y" ? null : ro("x", i, y.snapCandidates), o = r === "x" ? null : ro("y", i, y.snapCandidates);
|
|
4009
|
+
t += a?.delta ?? 0, n += o?.delta ?? 0, y.dx = t, y.dy = n;
|
|
4010
|
+
let s = le(A(), ke(y, t, n));
|
|
4011
|
+
de(s);
|
|
4012
|
+
let c = Xa(y.groupBefore, {
|
|
4012
4013
|
x: t,
|
|
4013
4014
|
y: n
|
|
4014
4015
|
});
|
|
4015
|
-
|
|
4016
|
-
},
|
|
4017
|
-
if (!
|
|
4018
|
-
let e =
|
|
4019
|
-
|
|
4020
|
-
},
|
|
4021
|
-
if (!
|
|
4016
|
+
W(c), re(a, o, c);
|
|
4017
|
+
}, je = () => {
|
|
4018
|
+
if (!y) return;
|
|
4019
|
+
let e = y.pointerId;
|
|
4020
|
+
y = null, f.hasPointerCapture?.(e) && f.releasePointerCapture(e), f.style.cursor = "grab", Ce(), W();
|
|
4021
|
+
}, Me = (t) => {
|
|
4022
|
+
if (!y || t.pointerId !== y.pointerId) return;
|
|
4022
4023
|
t.preventDefault(), t.stopPropagation();
|
|
4023
|
-
let n =
|
|
4024
|
-
if (
|
|
4025
|
-
n.shiftToggleElement && i.toggleSelection(n.shiftToggleElement),
|
|
4024
|
+
let n = y;
|
|
4025
|
+
if (y = null, f.hasPointerCapture?.(t.pointerId) && f.releasePointerCapture(t.pointerId), f.style.cursor = "grab", B(), n.dx === 0 && n.dy === 0) {
|
|
4026
|
+
n.shiftToggleElement && i.toggleSelection(n.shiftToggleElement), Ce(), W();
|
|
4026
4027
|
return;
|
|
4027
4028
|
}
|
|
4028
|
-
let a =
|
|
4029
|
-
|
|
4029
|
+
let a = le(A(), ke(n, n.dx, n.dy));
|
|
4030
|
+
b = {
|
|
4030
4031
|
id: ao(r, "arrange"),
|
|
4031
4032
|
createdAt: Date.now(),
|
|
4032
|
-
pageUrl:
|
|
4033
|
+
pageUrl: k(),
|
|
4033
4034
|
targets: n.targets.map(({ element: e, movesDirectly: t, target: r }) => {
|
|
4034
4035
|
let i = {
|
|
4035
4036
|
x: r.beforeLocalOffsetX ?? 0,
|
|
@@ -4051,27 +4052,29 @@ var wa = "/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n@la
|
|
|
4051
4052
|
desiredLocalOffsetY: o.y
|
|
4052
4053
|
};
|
|
4053
4054
|
})
|
|
4054
|
-
}
|
|
4055
|
-
|
|
4055
|
+
};
|
|
4056
|
+
for (let { element: e, target: t } of n.targets) m.set(t.selector, e);
|
|
4057
|
+
e.command.execute(Fa).catch(() => {
|
|
4058
|
+
b = null, Ce(), W();
|
|
4056
4059
|
});
|
|
4057
|
-
},
|
|
4058
|
-
!
|
|
4059
|
-
},
|
|
4060
|
-
if (t.key !== "Escape" || !
|
|
4061
|
-
if (t.preventDefault(), t.stopImmediatePropagation(),
|
|
4062
|
-
|
|
4060
|
+
}, Ne = (e) => {
|
|
4061
|
+
!y || e.pointerId !== y.pointerId || je();
|
|
4062
|
+
}, Pe = (t) => {
|
|
4063
|
+
if (t.key !== "Escape" || !E() && !y || ho(t.target) || s.querySelector("[data-mesurer-tool-menu]")) return;
|
|
4064
|
+
if (t.preventDefault(), t.stopImmediatePropagation(), y) {
|
|
4065
|
+
je();
|
|
4063
4066
|
return;
|
|
4064
4067
|
}
|
|
4065
4068
|
let n = i.currentSelection();
|
|
4066
4069
|
if (n.elements.length > 0 || n.region) {
|
|
4067
|
-
i.clearSelection(),
|
|
4070
|
+
i.clearSelection(), W();
|
|
4068
4071
|
return;
|
|
4069
4072
|
}
|
|
4070
|
-
e.state.update(Aa, () => !1),
|
|
4073
|
+
e.state.update(Aa, () => !1), we(), W(), e.command.execute(Na, void 0, { source: "arrange-escape" }).catch(() => void 0);
|
|
4071
4074
|
};
|
|
4072
|
-
f.addEventListener("pointerdown",
|
|
4073
|
-
|
|
4074
|
-
}),
|
|
4075
|
+
f.addEventListener("pointerdown", Oe), f.addEventListener("pointermove", Ae), f.addEventListener("pointerup", Me), f.addEventListener("pointercancel", Ne), r.addEventListener("keydown", Pe, !0), r.addEventListener("resize", Ee), r.addEventListener("scroll", Ee, !0), o.addEventListener("scroll", Ee, !0), w = new c.MutationObserver(() => {
|
|
4076
|
+
he(), Ee();
|
|
4077
|
+
}), w.observe(o, {
|
|
4075
4078
|
childList: !0,
|
|
4076
4079
|
subtree: !0,
|
|
4077
4080
|
attributes: !0,
|
|
@@ -4083,9 +4086,9 @@ var wa = "/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n@la
|
|
|
4083
4086
|
"aria-label"
|
|
4084
4087
|
]
|
|
4085
4088
|
});
|
|
4086
|
-
let
|
|
4087
|
-
|
|
4088
|
-
}),
|
|
4089
|
+
let Fe = i.subscribe(() => {
|
|
4090
|
+
he(), Ee();
|
|
4091
|
+
}), Ie = e.state.subscribe(Ee), Le = (e) => T().intents.find((t) => t.id === e) ?? null, Re = (e, t) => {
|
|
4089
4092
|
let n = null;
|
|
4090
4093
|
if (n = t === "before" ? Qa(e.targets.map((e) => ({
|
|
4091
4094
|
left: e.beforeLeft,
|
|
@@ -4097,7 +4100,7 @@ var wa = "/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n@la
|
|
|
4097
4100
|
top: e.desiredTop,
|
|
4098
4101
|
width: e.desiredWidth,
|
|
4099
4102
|
height: e.desiredHeight
|
|
4100
|
-
}))) :
|
|
4103
|
+
}))) : pe(() => Qa(e.targets.map((e) => te(e)).filter((e) => e !== null).map((e) => Oi(e)))), !n) throw Error(`Arrange intent has no resolvable capture region: ${e.id}`);
|
|
4101
4104
|
let i = Math.max(0, n.left - Va), a = Math.max(0, n.top - Va), o = Math.min(r.innerWidth, n.left + n.width + Va), s = Math.min(r.innerHeight, n.top + n.height + Va);
|
|
4102
4105
|
return {
|
|
4103
4106
|
left: i,
|
|
@@ -4105,28 +4108,28 @@ var wa = "/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n@la
|
|
|
4105
4108
|
width: Math.max(0, o - i),
|
|
4106
4109
|
height: Math.max(0, s - a)
|
|
4107
4110
|
};
|
|
4108
|
-
},
|
|
4109
|
-
active:
|
|
4110
|
-
intents: () =>
|
|
4111
|
+
}, ze = {
|
|
4112
|
+
active: E,
|
|
4113
|
+
intents: () => T().intents.map(co),
|
|
4111
4114
|
intent(e) {
|
|
4112
|
-
let t =
|
|
4115
|
+
let t = Le(e);
|
|
4113
4116
|
return t ? co(t) : null;
|
|
4114
4117
|
},
|
|
4115
4118
|
show(e, t) {
|
|
4116
|
-
if (!
|
|
4117
|
-
|
|
4119
|
+
if (!Le(e)) throw Error(`Arrange intent not found: ${e}`);
|
|
4120
|
+
v = {
|
|
4118
4121
|
intentId: e,
|
|
4119
4122
|
state: t
|
|
4120
|
-
},
|
|
4123
|
+
}, Te();
|
|
4121
4124
|
},
|
|
4122
4125
|
showCurrent() {
|
|
4123
|
-
|
|
4126
|
+
v = {
|
|
4124
4127
|
intentId: null,
|
|
4125
4128
|
state: "desired"
|
|
4126
|
-
},
|
|
4129
|
+
}, Te();
|
|
4127
4130
|
},
|
|
4128
4131
|
capturePlan(e, t) {
|
|
4129
|
-
let n =
|
|
4132
|
+
let n = Le(e);
|
|
4130
4133
|
if (!n) throw Error(`Arrange intent not found: ${e}`);
|
|
4131
4134
|
return {
|
|
4132
4135
|
schema: "mesurer.arrange-capture/v1",
|
|
@@ -4139,15 +4142,15 @@ var wa = "/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n@la
|
|
|
4139
4142
|
}, {
|
|
4140
4143
|
id: "focus",
|
|
4141
4144
|
kind: "clip",
|
|
4142
|
-
rect:
|
|
4145
|
+
rect: Re(n, t)
|
|
4143
4146
|
}]
|
|
4144
4147
|
};
|
|
4145
4148
|
},
|
|
4146
4149
|
review: (e, t = Ba) => {
|
|
4147
|
-
let n =
|
|
4150
|
+
let n = Le(e);
|
|
4148
4151
|
if (!n) throw Error(`Arrange intent not found: ${e}`);
|
|
4149
|
-
let r =
|
|
4150
|
-
let n =
|
|
4152
|
+
let r = pe(() => n.targets.map((e) => {
|
|
4153
|
+
let n = te(e), r = {
|
|
4151
4154
|
left: e.desiredLeft,
|
|
4152
4155
|
top: e.desiredTop,
|
|
4153
4156
|
width: e.desiredWidth,
|
|
@@ -4197,55 +4200,55 @@ var wa = "/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n@la
|
|
|
4197
4200
|
order: 65,
|
|
4198
4201
|
command: Pa,
|
|
4199
4202
|
icon: Ya,
|
|
4200
|
-
active:
|
|
4203
|
+
active: E,
|
|
4201
4204
|
menu: {
|
|
4202
4205
|
label: "Arrange options",
|
|
4203
4206
|
items: [
|
|
4204
4207
|
{
|
|
4205
4208
|
id: "snapping",
|
|
4206
4209
|
label: "Snapping",
|
|
4207
|
-
checked: () =>
|
|
4208
|
-
run: () =>
|
|
4210
|
+
checked: () => D().snapping,
|
|
4211
|
+
run: () => O({ snapping: !D().snapping })
|
|
4209
4212
|
},
|
|
4210
4213
|
{
|
|
4211
4214
|
id: "element-edges",
|
|
4212
4215
|
label: "Element edges",
|
|
4213
|
-
checked: () =>
|
|
4214
|
-
disabled: () => !
|
|
4215
|
-
run: () =>
|
|
4216
|
+
checked: () => D().elementEdges,
|
|
4217
|
+
disabled: () => !D().snapping,
|
|
4218
|
+
run: () => O({ elementEdges: !D().elementEdges })
|
|
4216
4219
|
},
|
|
4217
4220
|
{
|
|
4218
4221
|
id: "element-centers",
|
|
4219
4222
|
label: "Element centers",
|
|
4220
|
-
checked: () =>
|
|
4221
|
-
disabled: () => !
|
|
4222
|
-
run: () =>
|
|
4223
|
+
checked: () => D().elementCenters,
|
|
4224
|
+
disabled: () => !D().snapping,
|
|
4225
|
+
run: () => O({ elementCenters: !D().elementCenters })
|
|
4223
4226
|
},
|
|
4224
4227
|
{
|
|
4225
4228
|
id: "guides",
|
|
4226
4229
|
label: "Guides",
|
|
4227
|
-
checked: () =>
|
|
4228
|
-
disabled: () => !
|
|
4229
|
-
run: () =>
|
|
4230
|
+
checked: () => D().guides,
|
|
4231
|
+
disabled: () => !D().snapping,
|
|
4232
|
+
run: () => O({ guides: !D().guides })
|
|
4230
4233
|
},
|
|
4231
4234
|
{
|
|
4232
4235
|
id: "prefer-xray-edges",
|
|
4233
4236
|
label: "Prefer X-ray edges",
|
|
4234
|
-
checked: () =>
|
|
4235
|
-
disabled: () => !
|
|
4236
|
-
run: () =>
|
|
4237
|
+
checked: () => D().preferXrayEdges,
|
|
4238
|
+
disabled: () => !D().snapping || !D().elementEdges,
|
|
4239
|
+
run: () => O({ preferXrayEdges: !D().preferXrayEdges })
|
|
4237
4240
|
},
|
|
4238
4241
|
{
|
|
4239
4242
|
id: "alignment-rulers",
|
|
4240
4243
|
label: "Alignment rulers",
|
|
4241
|
-
checked: () =>
|
|
4242
|
-
disabled: () => !
|
|
4243
|
-
run: () =>
|
|
4244
|
+
checked: () => D().snapLines,
|
|
4245
|
+
disabled: () => !D().snapping,
|
|
4246
|
+
run: () => O({ snapLines: !D().snapLines })
|
|
4244
4247
|
},
|
|
4245
4248
|
{
|
|
4246
4249
|
id: "reset-all-positions",
|
|
4247
4250
|
label: "Reset all positions",
|
|
4248
|
-
disabled: () =>
|
|
4251
|
+
disabled: () => A().length === 0,
|
|
4249
4252
|
run: async () => {
|
|
4250
4253
|
await e.command.execute(Ra, void 0, { source: "arrange-menu" });
|
|
4251
4254
|
}
|
|
@@ -4262,75 +4265,75 @@ var wa = "/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n@la
|
|
|
4262
4265
|
id: "snapping",
|
|
4263
4266
|
label: "Snapping",
|
|
4264
4267
|
description: "Magnetically align dragged selections to nearby layout anchors.",
|
|
4265
|
-
value: () =>
|
|
4266
|
-
set: (e) =>
|
|
4268
|
+
value: () => D().snapping,
|
|
4269
|
+
set: (e) => O({ snapping: e })
|
|
4267
4270
|
},
|
|
4268
4271
|
{
|
|
4269
4272
|
type: "toggle",
|
|
4270
4273
|
id: "element-edges",
|
|
4271
4274
|
label: "Element edges",
|
|
4272
4275
|
description: "Snap left/right and top/bottom edges to nearby elements.",
|
|
4273
|
-
value: () =>
|
|
4274
|
-
set: (e) =>
|
|
4275
|
-
disabled: () => !
|
|
4276
|
+
value: () => D().elementEdges,
|
|
4277
|
+
set: (e) => O({ elementEdges: e }),
|
|
4278
|
+
disabled: () => !D().snapping
|
|
4276
4279
|
},
|
|
4277
4280
|
{
|
|
4278
4281
|
type: "toggle",
|
|
4279
4282
|
id: "element-centers",
|
|
4280
4283
|
label: "Element centers",
|
|
4281
4284
|
description: "Snap center-to-center when X-ray edge preference is not active.",
|
|
4282
|
-
value: () =>
|
|
4283
|
-
set: (e) =>
|
|
4284
|
-
disabled: () => !
|
|
4285
|
+
value: () => D().elementCenters,
|
|
4286
|
+
set: (e) => O({ elementCenters: e }),
|
|
4287
|
+
disabled: () => !D().snapping
|
|
4285
4288
|
},
|
|
4286
4289
|
{
|
|
4287
4290
|
type: "toggle",
|
|
4288
4291
|
id: "guides",
|
|
4289
4292
|
label: "Guides",
|
|
4290
4293
|
description: "Snap to existing Mesurer guides.",
|
|
4291
|
-
value: () =>
|
|
4292
|
-
set: (e) =>
|
|
4293
|
-
disabled: () => !
|
|
4294
|
+
value: () => D().guides,
|
|
4295
|
+
set: (e) => O({ guides: e }),
|
|
4296
|
+
disabled: () => !D().snapping
|
|
4294
4297
|
},
|
|
4295
4298
|
{
|
|
4296
4299
|
type: "toggle",
|
|
4297
4300
|
id: "prefer-xray-edges",
|
|
4298
4301
|
label: "Prefer X-ray edges",
|
|
4299
4302
|
description: "When X-ray is on, use its visible blue box edges as element snap targets.",
|
|
4300
|
-
value: () =>
|
|
4301
|
-
set: (e) =>
|
|
4302
|
-
disabled: () => !
|
|
4303
|
+
value: () => D().preferXrayEdges,
|
|
4304
|
+
set: (e) => O({ preferXrayEdges: e }),
|
|
4305
|
+
disabled: () => !D().snapping || !D().elementEdges
|
|
4303
4306
|
},
|
|
4304
4307
|
{
|
|
4305
4308
|
type: "toggle",
|
|
4306
4309
|
id: "alignment-rulers",
|
|
4307
4310
|
label: "Alignment rulers",
|
|
4308
4311
|
description: "Show the red alignment ruler while a snap is active.",
|
|
4309
|
-
value: () =>
|
|
4310
|
-
set: (e) =>
|
|
4311
|
-
disabled: () => !
|
|
4312
|
+
value: () => D().snapLines,
|
|
4313
|
+
set: (e) => O({ snapLines: e }),
|
|
4314
|
+
disabled: () => !D().snapping
|
|
4312
4315
|
}
|
|
4313
4316
|
]
|
|
4314
4317
|
}), e.command.register(Pa, async () => {
|
|
4315
|
-
let t = !
|
|
4316
|
-
if (t && await
|
|
4317
|
-
|
|
4318
|
+
let t = !E();
|
|
4319
|
+
if (t && await De(), e.state.update("mesurer.arrange.active", () => t), !t) {
|
|
4320
|
+
y && je(), we(), W();
|
|
4318
4321
|
return;
|
|
4319
4322
|
}
|
|
4320
|
-
|
|
4323
|
+
Ce(), W();
|
|
4321
4324
|
}), e.command.register(Fa, () => {
|
|
4322
|
-
let t =
|
|
4323
|
-
|
|
4325
|
+
let t = b;
|
|
4326
|
+
b = null, t && (e.state.update("mesurer.arrange.intents", (e) => ({ intents: [...e.intents, t].slice(-100) })), Ce(), W());
|
|
4324
4327
|
}), e.command.register(La, () => {
|
|
4325
|
-
let e =
|
|
4326
|
-
|
|
4327
|
-
}), e.command.register(Ra,
|
|
4328
|
-
e.state.update(ka, () => ({ intents: [] })),
|
|
4328
|
+
let e = x ?? U();
|
|
4329
|
+
x = null, be(e);
|
|
4330
|
+
}), e.command.register(Ra, xe), e.command.register(Ia, () => {
|
|
4331
|
+
e.state.update(ka, () => ({ intents: [] })), v = {
|
|
4329
4332
|
intentId: null,
|
|
4330
4333
|
state: "desired"
|
|
4331
|
-
},
|
|
4332
|
-
}), e.service.provide(Oa,
|
|
4333
|
-
|
|
4334
|
+
}, z(), B(), E() ? ie() : V(), W();
|
|
4335
|
+
}), e.service.provide(Oa, ze), fe(), W(), e.lifecycle.onDispose(() => {
|
|
4336
|
+
S = !0, C && r.cancelAnimationFrame(C), w?.disconnect(), w = null, f.removeEventListener("pointerdown", Oe), f.removeEventListener("pointermove", Ae), f.removeEventListener("pointerup", Me), f.removeEventListener("pointercancel", Ne), r.removeEventListener("keydown", Pe, !0), r.removeEventListener("resize", Ee), r.removeEventListener("scroll", Ee, !0), o.removeEventListener("scroll", Ee, !0), Fe(), Ie.dispose(), z(), _e(), B(), V(), i.dispose(), a.dispose();
|
|
4334
4337
|
});
|
|
4335
4338
|
}
|
|
4336
4339
|
}), _o = (e, t, n) => {
|
|
@@ -4626,129 +4629,129 @@ var zo = (e, t, n) => Math.min(Math.max(e, t), Math.max(t, n)), Bo = 0, Vo = (e)
|
|
|
4626
4629
|
} : Go(e, t, n, r, i);
|
|
4627
4630
|
};
|
|
4628
4631
|
function qo(e) {
|
|
4629
|
-
let [t, n] = K(0), [r, i] = K(0), [a, o] = K(null), [s, c] = K(null), [l, u] = K(null), [d, f] = K({}), [p, m] = K(null), [h, g] = K(!1), [_, v] = K(""), [y, b] = K(null), [x, S] = K(!1), [C, w] = K(null), [T, E] = K(null), D = `--mesurer-annotation-trigger-${++Bo}`, O = null, k = e.initialTriggerFallback === "current-and-next", A = null, j = null, M = null,
|
|
4630
|
-
if (
|
|
4631
|
-
let t =
|
|
4632
|
+
let [t, n] = K(0), [r, i] = K(0), [a, o] = K(null), [s, c] = K(null), [l, u] = K(null), [d, f] = K({}), [p, m] = K(null), [h, g] = K(!1), [_, v] = K(""), [y, b] = K(null), [x, S] = K(!1), [C, w] = K(null), [T, E] = K(null), D = `--mesurer-annotation-trigger-${++Bo}`, O = null, k = e.initialTriggerFallback === "current-and-next", A = null, j = null, M = null, ee, N, te = null, P = null, ne = null, F = null, I = null, L = null, R = /* @__PURE__ */ new Map(), z = () => ee?.ownerDocument.defaultView ?? window, B = () => e.coordinateSpace === "viewport", re = (e) => e ? "native-anchor" : B() ? "cached-delta" : "document", ie = (e) => {
|
|
4633
|
+
if (B()) return e;
|
|
4634
|
+
let t = z();
|
|
4632
4635
|
return {
|
|
4633
4636
|
left: e.left + t.scrollX,
|
|
4634
4637
|
top: e.top + t.scrollY
|
|
4635
4638
|
};
|
|
4636
|
-
},
|
|
4639
|
+
}, V = () => {
|
|
4637
4640
|
let t = e.runtime.currentSelection();
|
|
4638
4641
|
return {
|
|
4639
4642
|
elements: [...t.elements],
|
|
4640
4643
|
region: t.region ? { ...t.region } : null
|
|
4641
4644
|
};
|
|
4642
|
-
},
|
|
4645
|
+
}, ae = (e, t) => e.elements.length !== t.elements.length || e.elements.some((e, n) => e !== t.elements[n]) ? !1 : e.region === t.region ? !0 : !e.region || !t.region ? !1 : e.region.left === t.region.left && e.region.top === t.region.top && e.region.width === t.region.width && e.region.height === t.region.height, H = () => {
|
|
4643
4646
|
A = null, v(""), g(!1), b(null), m(null);
|
|
4644
|
-
},
|
|
4645
|
-
let e =
|
|
4647
|
+
}, oe = () => {
|
|
4648
|
+
let e = z();
|
|
4646
4649
|
return !!(e.CSS?.supports("anchor-name: --mesurer-annotation-trigger") && e.CSS.supports("position-anchor: --mesurer-annotation-trigger") && e.CSS.supports("left: anchor(left)"));
|
|
4647
|
-
},
|
|
4650
|
+
}, se = () => {
|
|
4648
4651
|
let t = e.runtime.currentSelection().elements;
|
|
4649
4652
|
if (!t.length) return null;
|
|
4650
4653
|
let n = e.runtime.hoveredElement();
|
|
4651
4654
|
return t.find((e) => e === n) ?? t.find((e) => n && e.contains(n)) ?? t[0];
|
|
4652
|
-
},
|
|
4653
|
-
let e =
|
|
4654
|
-
return e ? [...e.querySelectorAll("[data-mesurer-annotation-trigger='true'], [data-mesurer-annotation-composer='true']")].filter((e) => e !==
|
|
4655
|
-
},
|
|
4656
|
-
let t =
|
|
4655
|
+
}, ce = () => ee?.parentElement, le = () => {
|
|
4656
|
+
let e = ce();
|
|
4657
|
+
return e ? [...e.querySelectorAll("[data-mesurer-annotation-trigger='true'], [data-mesurer-annotation-composer='true']")].filter((e) => e !== N || P === null) : [];
|
|
4658
|
+
}, ue = (e) => {
|
|
4659
|
+
let t = ce();
|
|
4657
4660
|
return t ? [...t.querySelectorAll("[data-mesurer-annotation-id]")].filter((t) => t.dataset.mesurerAnnotationId === e) : [];
|
|
4658
|
-
},
|
|
4659
|
-
let t =
|
|
4660
|
-
t && (t.scroll.release(), t.releaseAnchor?.(),
|
|
4661
|
-
},
|
|
4661
|
+
}, de = (e) => {
|
|
4662
|
+
let t = R.get(e);
|
|
4663
|
+
t && (t.scroll.release(), t.releaseAnchor?.(), R.delete(e));
|
|
4664
|
+
}, fe = (t) => {
|
|
4662
4665
|
let n = e.runtime.annotation(t);
|
|
4663
4666
|
return !n || n.anchor.kind !== "elements" ? null : n.resolvedTargets.find(({ element: e }) => e?.isConnected)?.element ?? null;
|
|
4664
|
-
},
|
|
4665
|
-
let t =
|
|
4667
|
+
}, pe = (e) => !!(Ho(e) && B() && ee && oe() && e.getRootNode() === ee.getRootNode()), U = (e) => {
|
|
4668
|
+
let t = fe(e), n = R.get(e);
|
|
4666
4669
|
if (!t) {
|
|
4667
|
-
n && (
|
|
4670
|
+
n && (de(e), i((e) => e + 1));
|
|
4668
4671
|
return;
|
|
4669
4672
|
}
|
|
4670
|
-
let r =
|
|
4673
|
+
let r = pe(t);
|
|
4671
4674
|
if (n?.target === t && !!n.anchorName === r) {
|
|
4672
4675
|
n.scroll.sync();
|
|
4673
4676
|
return;
|
|
4674
4677
|
}
|
|
4675
|
-
|
|
4678
|
+
de(e);
|
|
4676
4679
|
let a = t.ownerDocument.defaultView;
|
|
4677
4680
|
if (a) {
|
|
4678
4681
|
if (r && Ho(t)) {
|
|
4679
4682
|
let n = `--mesurer-annotation-${++Bo}`;
|
|
4680
|
-
|
|
4683
|
+
R.set(e, {
|
|
4681
4684
|
target: t,
|
|
4682
4685
|
anchorName: n,
|
|
4683
4686
|
releaseAnchor: Uo(t, n),
|
|
4684
|
-
scroll: ri(a, t, () =>
|
|
4687
|
+
scroll: ri(a, t, () => ue(e), { trackWindow: !1 })
|
|
4685
4688
|
});
|
|
4686
|
-
} else
|
|
4689
|
+
} else R.set(e, {
|
|
4687
4690
|
target: t,
|
|
4688
4691
|
anchorName: null,
|
|
4689
4692
|
releaseAnchor: null,
|
|
4690
|
-
scroll: ri(a, t, () =>
|
|
4693
|
+
scroll: ri(a, t, () => ue(e), { trackWindow: B() })
|
|
4691
4694
|
});
|
|
4692
4695
|
i((e) => e + 1);
|
|
4693
4696
|
}
|
|
4694
|
-
},
|
|
4697
|
+
}, me = () => {
|
|
4695
4698
|
let t = new Set(e.runtime.annotations().map((e) => e.id));
|
|
4696
|
-
for (let e of
|
|
4697
|
-
for (let e of t)
|
|
4698
|
-
},
|
|
4699
|
-
|
|
4700
|
-
},
|
|
4701
|
-
|
|
4702
|
-
|
|
4703
|
-
for (let e of
|
|
4699
|
+
for (let e of R.keys()) t.has(e) || de(e);
|
|
4700
|
+
for (let e of t) U(e);
|
|
4701
|
+
}, he = (e) => {
|
|
4702
|
+
z().queueMicrotask(() => U(e));
|
|
4703
|
+
}, ge = () => {
|
|
4704
|
+
z().queueMicrotask(() => {
|
|
4705
|
+
me();
|
|
4706
|
+
for (let e of R.values()) e.anchorName || e.scroll.rebase();
|
|
4704
4707
|
});
|
|
4705
4708
|
};
|
|
4706
|
-
e.initialTriggerFallback && (O =
|
|
4707
|
-
let
|
|
4708
|
-
|
|
4709
|
-
},
|
|
4710
|
-
let e =
|
|
4709
|
+
e.initialTriggerFallback && (O = se());
|
|
4710
|
+
let _e = () => {
|
|
4711
|
+
F?.release(), F = null, ne?.(), ne = null, te = null, P = null;
|
|
4712
|
+
}, ve = (e) => !!(Ho(e) && B() && ee && e !== O && oe() && e.getRootNode() === ee.getRootNode()), ye = () => {
|
|
4713
|
+
let e = se();
|
|
4711
4714
|
O && e !== O && (O = null);
|
|
4712
|
-
let t =
|
|
4713
|
-
if (e ===
|
|
4714
|
-
|
|
4715
|
+
let t = te, n = !!(e?.isConnected && ve(e)), r = P === e;
|
|
4716
|
+
if (e === te && e?.isConnected && n === r) {
|
|
4717
|
+
F?.sync();
|
|
4715
4718
|
return;
|
|
4716
4719
|
}
|
|
4717
4720
|
let i = e === t ? D : `--mesurer-annotation-trigger-${++Bo}`;
|
|
4718
|
-
if (
|
|
4719
|
-
|
|
4721
|
+
if (_e(), !e?.isConnected) return;
|
|
4722
|
+
te = e;
|
|
4720
4723
|
let a = e.ownerDocument.defaultView;
|
|
4721
4724
|
if (a) {
|
|
4722
4725
|
if (n && Ho(e)) {
|
|
4723
|
-
|
|
4726
|
+
ne = Uo(e, i), P = e, D = i, F = ri(a, e, le, { trackWindow: !1 });
|
|
4724
4727
|
return;
|
|
4725
4728
|
}
|
|
4726
|
-
D = i,
|
|
4729
|
+
D = i, F = ri(a, e, le, { trackWindow: B() });
|
|
4727
4730
|
}
|
|
4728
|
-
},
|
|
4729
|
-
if (
|
|
4731
|
+
}, be = (e) => {
|
|
4732
|
+
if (I?.disconnect(), I = null, !e?.isConnected) return;
|
|
4730
4733
|
let t = e.ownerDocument.defaultView;
|
|
4731
|
-
t && (
|
|
4734
|
+
t && (I = new t.ResizeObserver(() => {
|
|
4732
4735
|
i((e) => e + 1);
|
|
4733
|
-
}),
|
|
4734
|
-
},
|
|
4735
|
-
let e =
|
|
4736
|
-
|
|
4736
|
+
}), I.observe(e));
|
|
4737
|
+
}, xe = () => {
|
|
4738
|
+
let e = z();
|
|
4739
|
+
L !== e && (L?.removeEventListener("resize", Se), L = e, L.addEventListener("resize", Se, { passive: !0 }));
|
|
4737
4740
|
};
|
|
4738
|
-
function
|
|
4741
|
+
function Se() {
|
|
4739
4742
|
i((e) => e + 1);
|
|
4740
4743
|
}
|
|
4741
|
-
let
|
|
4742
|
-
|
|
4744
|
+
let W = se();
|
|
4745
|
+
be(W);
|
|
4743
4746
|
let Ce = e.runtime.subscribe(() => {
|
|
4744
4747
|
let t = e.runtime.selectGestureActive();
|
|
4745
|
-
h() && t ? (k = !0,
|
|
4746
|
-
let r =
|
|
4747
|
-
i && (
|
|
4748
|
+
h() && t ? (k = !0, H()) : h() && A !== null && !ae(A, V()) && (O = se(), k = !1, H());
|
|
4749
|
+
let r = se(), i = r !== W;
|
|
4750
|
+
i && (W = r, be(W), k && (k = !1, O = r)), ye(), i && Se(), n((e) => e + 1), ge();
|
|
4748
4751
|
});
|
|
4749
|
-
|
|
4750
|
-
|
|
4751
|
-
for (let e of
|
|
4752
|
+
ye(), z().queueMicrotask(me), St(() => {
|
|
4753
|
+
I?.disconnect(), I = null, L?.removeEventListener("resize", Se), L = null, _e();
|
|
4754
|
+
for (let e of R.keys()) de(e);
|
|
4752
4755
|
Ce();
|
|
4753
4756
|
});
|
|
4754
4757
|
let we = Gt(() => (t(), e.runtime.currentSelection())), Te = Gt(() => (t(), e.runtime.annotations())), Ee = Gt(() => {
|
|
@@ -4777,7 +4780,7 @@ function qo(e) {
|
|
|
4777
4780
|
}), Ae = () => we().elements.length > 0 || we().region !== null, je = () => {
|
|
4778
4781
|
t();
|
|
4779
4782
|
let e = A;
|
|
4780
|
-
return e !== null &&
|
|
4783
|
+
return e !== null && ae(e, V());
|
|
4781
4784
|
}, Me = Gt(() => {
|
|
4782
4785
|
let e = we(), t = e.elements.filter((e) => e.isConnected).map((e) => {
|
|
4783
4786
|
let t = e.getBoundingClientRect();
|
|
@@ -4806,7 +4809,7 @@ function qo(e) {
|
|
|
4806
4809
|
top: t.top,
|
|
4807
4810
|
width: t.width,
|
|
4808
4811
|
height: t.height
|
|
4809
|
-
}, r =
|
|
4812
|
+
}, r = z(), i = [...ut(Re).values()].map((e) => ({
|
|
4810
4813
|
left: e.left,
|
|
4811
4814
|
top: e.top,
|
|
4812
4815
|
width: 24,
|
|
@@ -4820,7 +4823,7 @@ function qo(e) {
|
|
|
4820
4823
|
}, {
|
|
4821
4824
|
obstacles: i,
|
|
4822
4825
|
maxShiftRings: 1
|
|
4823
|
-
}), o = a?.left ?? zo(n.left + n.width + 6, 4, r.innerWidth - 24 - 4), s = a?.top ?? zo(n.top, 4, r.innerHeight - 24 - 4), c =
|
|
4826
|
+
}), o = a?.left ?? zo(n.left + n.width + 6, 4, r.innerWidth - 24 - 4), s = a?.top ?? zo(n.top, 4, r.innerHeight - 24 - 4), c = P === e, l = B() && !c;
|
|
4824
4827
|
return {
|
|
4825
4828
|
left: c || l ? o : o + r.scrollX,
|
|
4826
4829
|
top: c || l ? s : s + r.scrollY,
|
|
@@ -4831,7 +4834,7 @@ function qo(e) {
|
|
|
4831
4834
|
};
|
|
4832
4835
|
}, Re = Gt(() => {
|
|
4833
4836
|
t(), r();
|
|
4834
|
-
let n =
|
|
4837
|
+
let n = z(), i = Te().flatMap((t) => {
|
|
4835
4838
|
let n = e.runtime.annotationRect(t.id);
|
|
4836
4839
|
return n ? [{
|
|
4837
4840
|
id: t.id,
|
|
@@ -4844,9 +4847,9 @@ function qo(e) {
|
|
|
4844
4847
|
}, { obstacles: Me() }).map((e) => [e.id, e]));
|
|
4845
4848
|
}), ze = (e) => Re().get(e) ?? null, Be = (e, t) => {
|
|
4846
4849
|
r();
|
|
4847
|
-
let n =
|
|
4850
|
+
let n = R.get(e);
|
|
4848
4851
|
if (!n?.anchorName || !n.target.isConnected) return {
|
|
4849
|
-
...
|
|
4852
|
+
...ie(t),
|
|
4850
4853
|
nativeAnchor: !1
|
|
4851
4854
|
};
|
|
4852
4855
|
let i = n.target.getBoundingClientRect();
|
|
@@ -4858,7 +4861,7 @@ function qo(e) {
|
|
|
4858
4861
|
anchorY: t.top - i.top
|
|
4859
4862
|
};
|
|
4860
4863
|
}, Ve = () => {
|
|
4861
|
-
let e = Ne(), t =
|
|
4864
|
+
let e = Ne(), t = z(), n = p();
|
|
4862
4865
|
return n && e ? {
|
|
4863
4866
|
left: e.left + n.left,
|
|
4864
4867
|
top: e.top + n.top
|
|
@@ -4869,8 +4872,8 @@ function qo(e) {
|
|
|
4869
4872
|
}, He = () => {
|
|
4870
4873
|
r();
|
|
4871
4874
|
let e = Ve(), t = Ie();
|
|
4872
|
-
if (!t?.isConnected ||
|
|
4873
|
-
...
|
|
4875
|
+
if (!t?.isConnected || P !== t) return {
|
|
4876
|
+
...ie(e),
|
|
4874
4877
|
nativeAnchor: !1
|
|
4875
4878
|
};
|
|
4876
4879
|
let n = t.getBoundingClientRect();
|
|
@@ -4882,7 +4885,7 @@ function qo(e) {
|
|
|
4882
4885
|
anchorY: e.top - n.top
|
|
4883
4886
|
};
|
|
4884
4887
|
}, Ue = (e, t) => {
|
|
4885
|
-
let n =
|
|
4888
|
+
let n = z(), r = Re(), i = r.get(e);
|
|
4886
4889
|
if (!i) return Go(t, 272, 176, n);
|
|
4887
4890
|
let a = n.innerWidth - 272 - 8, o = n.innerHeight - 176 - 8, s = [...r.values()].map((e) => ({
|
|
4888
4891
|
left: e.left,
|
|
@@ -4939,7 +4942,7 @@ function qo(e) {
|
|
|
4939
4942
|
top: n.top + r.top
|
|
4940
4943
|
} : Ue(t, n);
|
|
4941
4944
|
}, Ge = (t) => {
|
|
4942
|
-
|
|
4945
|
+
z().queueMicrotask(() => {
|
|
4943
4946
|
let n = e.runtime.annotationRect(t);
|
|
4944
4947
|
n && f((e) => {
|
|
4945
4948
|
if (e[t]) return e;
|
|
@@ -4954,13 +4957,13 @@ function qo(e) {
|
|
|
4954
4957
|
});
|
|
4955
4958
|
});
|
|
4956
4959
|
}, Ke = (e) => Be(e, We(e)), qe = (e) => {
|
|
4957
|
-
k = !1, A = null, g(!1),
|
|
4960
|
+
k = !1, A = null, g(!1), U(e), Ge(e), o(e), w(null), he(e);
|
|
4958
4961
|
}, Je = (t, n) => {
|
|
4959
4962
|
let r = t.currentTarget.ownerDocument.defaultView?.Element, i = t.target;
|
|
4960
4963
|
if (t.button !== 0 || r && i instanceof r && i.closest("button")) return;
|
|
4961
4964
|
let a = t.currentTarget.parentElement;
|
|
4962
4965
|
if (!a) return;
|
|
4963
|
-
let o = a.getBoundingClientRect(), s =
|
|
4966
|
+
let o = a.getBoundingClientRect(), s = z(), c = s.document.documentElement, l = c.style.userSelect;
|
|
4964
4967
|
c.style.setProperty("user-select", "none", "important"), j = {
|
|
4965
4968
|
surfaceId: n,
|
|
4966
4969
|
pointerId: t.pointerId,
|
|
@@ -5015,27 +5018,27 @@ function qo(e) {
|
|
|
5015
5018
|
S(!1);
|
|
5016
5019
|
}
|
|
5017
5020
|
}
|
|
5018
|
-
}, Xe =
|
|
5021
|
+
}, Xe = H, Ze = () => {
|
|
5019
5022
|
if (!Ae()) return;
|
|
5020
|
-
k = !1, A =
|
|
5023
|
+
k = !1, A = V(), v(""), b(null), w(null), o(null);
|
|
5021
5024
|
let e = Ne();
|
|
5022
5025
|
if (e) {
|
|
5023
|
-
let t = Ko(e, 272, 168,
|
|
5026
|
+
let t = Ko(e, 272, 168, z());
|
|
5024
5027
|
m({
|
|
5025
5028
|
left: t.left - e.left,
|
|
5026
5029
|
top: t.top - e.top
|
|
5027
5030
|
});
|
|
5028
5031
|
} else m(null);
|
|
5029
|
-
g(!0),
|
|
5032
|
+
g(!0), z().queueMicrotask(() => F?.sync());
|
|
5030
5033
|
}, Qe = () => {
|
|
5031
5034
|
let e = h();
|
|
5032
|
-
A !== null && !
|
|
5035
|
+
A !== null && !ae(A, V()) ? (O = se(), k = !1, ye(), Se()) : e && (k = !1), Xe();
|
|
5033
5036
|
}, $e = () => {
|
|
5034
5037
|
h() && (k = !0, Xe());
|
|
5035
5038
|
}, et = () => {
|
|
5036
5039
|
try {
|
|
5037
5040
|
let t = e.runtime.addSelectionAnnotation(_());
|
|
5038
|
-
k = !1, A = null, v(""), b(null), g(!1), m(null),
|
|
5041
|
+
k = !1, A = null, v(""), b(null), g(!1), m(null), U(t.id), Ge(t.id), o(t.id), w(null), he(t.id);
|
|
5039
5042
|
} catch (e) {
|
|
5040
5043
|
b(e instanceof Error ? e.message : String(e));
|
|
5041
5044
|
}
|
|
@@ -5051,7 +5054,7 @@ function qo(e) {
|
|
|
5051
5054
|
style: { display: "none" }
|
|
5052
5055
|
});
|
|
5053
5056
|
return nr(() => (e) => {
|
|
5054
|
-
|
|
5057
|
+
ee = e, xe(), ye();
|
|
5055
5058
|
}, e), e;
|
|
5056
5059
|
})(),
|
|
5057
5060
|
J(Xt, {
|
|
@@ -5083,10 +5086,10 @@ function qo(e) {
|
|
|
5083
5086
|
}
|
|
5084
5087
|
});
|
|
5085
5088
|
return nr(() => (e) => {
|
|
5086
|
-
|
|
5089
|
+
N = e, F?.sync();
|
|
5087
5090
|
}, t), Z(t, J(xi, { size: 14 })), q(() => ({
|
|
5088
|
-
e:
|
|
5089
|
-
t:
|
|
5091
|
+
e: B() ? "viewport" : "document",
|
|
5092
|
+
t: re(e().nativeAnchor),
|
|
5090
5093
|
a: {
|
|
5091
5094
|
position: e().nativeAnchor || e().viewportOwned ? "fixed" : "absolute",
|
|
5092
5095
|
left: e().nativeAnchor ? `calc(anchor(left) + ${e().anchorX}px)` : `${e().left}px`,
|
|
@@ -5161,10 +5164,10 @@ function qo(e) {
|
|
|
5161
5164
|
return Z(t, e), t;
|
|
5162
5165
|
})()
|
|
5163
5166
|
}), c), X(c, l), X(c, u), X(l, Qn("⌘/Ctrl ↵")), X(u, d), X(u, f), X(d, Qn("Cancel")), X(f, Qn("Add note")), q(() => ({
|
|
5164
|
-
e:
|
|
5165
|
-
t:
|
|
5167
|
+
e: B() ? "viewport" : "document",
|
|
5168
|
+
t: re(e().nativeAnchor),
|
|
5166
5169
|
a: {
|
|
5167
|
-
position: e().nativeAnchor ||
|
|
5170
|
+
position: e().nativeAnchor || B() ? "fixed" : "absolute",
|
|
5168
5171
|
left: e().nativeAnchor ? `calc(anchor(left) + ${e().anchorX}px)` : `${e().left}px`,
|
|
5169
5172
|
top: e().nativeAnchor ? `calc(anchor(top) + ${e().anchorY}px)` : `${e().top}px`,
|
|
5170
5173
|
translate: "var(--mesurer-nested-scroll-x, 0px) var(--mesurer-nested-scroll-y, 0px)",
|
|
@@ -5191,7 +5194,7 @@ function qo(e) {
|
|
|
5191
5194
|
left: e.left,
|
|
5192
5195
|
top: e.top
|
|
5193
5196
|
}) : {
|
|
5194
|
-
...
|
|
5197
|
+
...ie({
|
|
5195
5198
|
left: e.left,
|
|
5196
5199
|
top: e.top
|
|
5197
5200
|
}),
|
|
@@ -5207,9 +5210,9 @@ function qo(e) {
|
|
|
5207
5210
|
});
|
|
5208
5211
|
return q(() => ({
|
|
5209
5212
|
e: t() ?? void 0,
|
|
5210
|
-
t:
|
|
5213
|
+
t: re(n().nativeAnchor),
|
|
5211
5214
|
a: {
|
|
5212
|
-
position: n().nativeAnchor ||
|
|
5215
|
+
position: n().nativeAnchor || B() ? "fixed" : "absolute",
|
|
5213
5216
|
left: n().nativeAnchor ? `calc(anchor(left) + ${n().anchorX}px)` : `${n().left}px`,
|
|
5214
5217
|
top: n().nativeAnchor ? `calc(anchor(top) + ${n().anchorY}px)` : `${n().top}px`,
|
|
5215
5218
|
width: `${e.width}px`,
|
|
@@ -5244,11 +5247,11 @@ function qo(e) {
|
|
|
5244
5247
|
"data-mesurer-layer": "evidence",
|
|
5245
5248
|
"data-mesurer-annotation-marker": "true",
|
|
5246
5249
|
onPointerEnter: () => {
|
|
5247
|
-
c(e.id),
|
|
5250
|
+
c(e.id), he(e.id);
|
|
5248
5251
|
},
|
|
5249
5252
|
onPointerLeave: () => c((t) => t === e.id ? null : t),
|
|
5250
5253
|
onFocus: () => {
|
|
5251
|
-
u(e.id),
|
|
5254
|
+
u(e.id), he(e.id);
|
|
5252
5255
|
},
|
|
5253
5256
|
onBlur: () => u((t) => t === e.id ? null : t),
|
|
5254
5257
|
onPointerDown: (t) => {
|
|
@@ -5269,13 +5272,13 @@ function qo(e) {
|
|
|
5269
5272
|
t: t() + 1,
|
|
5270
5273
|
a: i() ? "true" : void 0,
|
|
5271
5274
|
o: o() ? "true" : void 0,
|
|
5272
|
-
i:
|
|
5273
|
-
n:
|
|
5275
|
+
i: re(n().nativeAnchor),
|
|
5276
|
+
n: B() ? "viewport" : "document",
|
|
5274
5277
|
s: `Mesurer annotation ${t() + 1}: ${e.note}`,
|
|
5275
5278
|
h: e.note,
|
|
5276
5279
|
r: a() === e.id ? "true" : "false",
|
|
5277
5280
|
d: {
|
|
5278
|
-
position: n().nativeAnchor ||
|
|
5281
|
+
position: n().nativeAnchor || B() ? "fixed" : "absolute",
|
|
5279
5282
|
left: n().nativeAnchor ? `calc(anchor(left) + ${n().anchorX}px)` : `${n().left}px`,
|
|
5280
5283
|
top: n().nativeAnchor ? `calc(anchor(top) + ${n().anchorY}px)` : `${n().top}px`,
|
|
5281
5284
|
opacity: o() ? "0.36" : "1",
|
|
@@ -5341,7 +5344,7 @@ function qo(e) {
|
|
|
5341
5344
|
e.runtime.removeAnnotation(n), f((e) => {
|
|
5342
5345
|
let t = { ...e };
|
|
5343
5346
|
return delete t[n], t;
|
|
5344
|
-
}),
|
|
5347
|
+
}), de(n), c((e) => e === n ? null : e), u((e) => e === n ? null : e), o(null), w(null);
|
|
5345
5348
|
}
|
|
5346
5349
|
}), v = Y("button", {
|
|
5347
5350
|
type: "button",
|
|
@@ -5365,10 +5368,10 @@ function qo(e) {
|
|
|
5365
5368
|
})()
|
|
5366
5369
|
}), null), q(() => ({
|
|
5367
5370
|
e: t().id,
|
|
5368
|
-
t:
|
|
5369
|
-
a:
|
|
5371
|
+
t: re(n().nativeAnchor),
|
|
5372
|
+
a: B() ? "viewport" : "document",
|
|
5370
5373
|
o: {
|
|
5371
|
-
position: n().nativeAnchor ||
|
|
5374
|
+
position: n().nativeAnchor || B() ? "fixed" : "absolute",
|
|
5372
5375
|
left: n().nativeAnchor ? `calc(anchor(left) + ${n().anchorX}px)` : `${n().left}px`,
|
|
5373
5376
|
top: n().nativeAnchor ? `calc(anchor(top) + ${n().anchorY}px)` : `${n().top}px`,
|
|
5374
5377
|
translate: "var(--mesurer-nested-scroll-x, 0px) var(--mesurer-nested-scroll-y, 0px)",
|
|
@@ -6229,23 +6232,23 @@ var Ss = "mesurer.layout-guides", Cs = "layout-guides:v1", ws = "mesurer.layout-
|
|
|
6229
6232
|
}, t), M = (e) => {
|
|
6230
6233
|
let n = nc(e, t);
|
|
6231
6234
|
b = n, o.style.left = `${n.left}px`, o.style.top = `${n.top}px`;
|
|
6232
|
-
},
|
|
6235
|
+
}, ee = () => {
|
|
6233
6236
|
!v || !y || (T(), d.style.display = "flex", g.focus());
|
|
6234
|
-
},
|
|
6237
|
+
}, N = async () => {
|
|
6235
6238
|
let e = v;
|
|
6236
6239
|
if (e) try {
|
|
6237
6240
|
await br(Promise.resolve(e), t), D("Copied screenshot");
|
|
6238
6241
|
} catch {
|
|
6239
6242
|
D("Could not copy screenshot", !0);
|
|
6240
6243
|
}
|
|
6241
|
-
},
|
|
6244
|
+
}, te = () => {
|
|
6242
6245
|
let n = v;
|
|
6243
6246
|
if (n) try {
|
|
6244
6247
|
Sr(n, xr(), e, t), D("Saved screenshot");
|
|
6245
6248
|
} catch {
|
|
6246
6249
|
D("Could not save screenshot", !0);
|
|
6247
6250
|
}
|
|
6248
|
-
},
|
|
6251
|
+
}, P = (e, t, n) => {
|
|
6249
6252
|
if (!v) return !1;
|
|
6250
6253
|
T();
|
|
6251
6254
|
let r = o.getBoundingClientRect();
|
|
@@ -6257,7 +6260,7 @@ var Ss = "mesurer.layout-guides", Cs = "layout-guides:v1", ws = "mesurer.layout-
|
|
|
6257
6260
|
top: r.top,
|
|
6258
6261
|
moved: !1
|
|
6259
6262
|
}, o.style.cursor = "grabbing", !0;
|
|
6260
|
-
},
|
|
6263
|
+
}, ne = (e, t) => {
|
|
6261
6264
|
let n = x;
|
|
6262
6265
|
if (!n) return;
|
|
6263
6266
|
let r = e - n.startX, i = t - n.startY;
|
|
@@ -6265,42 +6268,42 @@ var Ss = "mesurer.layout-guides", Cs = "layout-guides:v1", ws = "mesurer.layout-
|
|
|
6265
6268
|
left: n.left + r,
|
|
6266
6269
|
top: n.top + i
|
|
6267
6270
|
});
|
|
6268
|
-
},
|
|
6271
|
+
}, F = () => {
|
|
6269
6272
|
let e = x;
|
|
6270
|
-
e && (x = null, o.style.cursor = "grab", e.moved ||
|
|
6271
|
-
},
|
|
6273
|
+
e && (x = null, o.style.cursor = "grab", e.moved || ee());
|
|
6274
|
+
}, I = () => {
|
|
6272
6275
|
x && (x = null, o.style.cursor = "grab");
|
|
6276
|
+
}, L = (e) => {
|
|
6277
|
+
e.button !== 0 || !P(e.clientX, e.clientY, null) || e.preventDefault();
|
|
6273
6278
|
}, R = (e) => {
|
|
6274
|
-
|
|
6279
|
+
x?.pointerId === null && ne(e.clientX, e.clientY);
|
|
6275
6280
|
}, z = (e) => {
|
|
6276
|
-
x?.pointerId === null &&
|
|
6281
|
+
e.button === 0 && x?.pointerId === null && F();
|
|
6277
6282
|
}, B = (e) => {
|
|
6278
|
-
e.button === 0 &&
|
|
6279
|
-
}, V = (e) => {
|
|
6280
|
-
e.pointerType !== "mouse" && e.button === 0 && F(e.clientX, e.clientY, e.pointerId) && (o.setPointerCapture?.(e.pointerId), e.preventDefault());
|
|
6281
|
-
}, H = (e) => {
|
|
6282
|
-
let t = x?.pointerId;
|
|
6283
|
-
t != null && t === e.pointerId && te(e.clientX, e.clientY);
|
|
6284
|
-
}, ne = (e) => {
|
|
6285
|
-
let t = x?.pointerId;
|
|
6286
|
-
t != null && t === e.pointerId && (o.hasPointerCapture?.(e.pointerId) && o.releasePointerCapture(e.pointerId), I());
|
|
6283
|
+
e.pointerType !== "mouse" && e.button === 0 && P(e.clientX, e.clientY, e.pointerId) && (o.setPointerCapture?.(e.pointerId), e.preventDefault());
|
|
6287
6284
|
}, re = (e) => {
|
|
6288
6285
|
let t = x?.pointerId;
|
|
6289
|
-
t != null && t === e.pointerId && (
|
|
6286
|
+
t != null && t === e.pointerId && ne(e.clientX, e.clientY);
|
|
6290
6287
|
}, ie = (e) => {
|
|
6291
|
-
|
|
6292
|
-
|
|
6293
|
-
|
|
6288
|
+
let t = x?.pointerId;
|
|
6289
|
+
t != null && t === e.pointerId && (o.hasPointerCapture?.(e.pointerId) && o.releasePointerCapture(e.pointerId), F());
|
|
6290
|
+
}, V = (e) => {
|
|
6291
|
+
let t = x?.pointerId;
|
|
6292
|
+
t != null && t === e.pointerId && (o.hasPointerCapture?.(e.pointerId) && o.releasePointerCapture(e.pointerId), I());
|
|
6294
6293
|
}, ae = (e) => {
|
|
6294
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), ee());
|
|
6295
|
+
}, H = (e) => {
|
|
6296
|
+
e.target !== s && e.preventDefault();
|
|
6297
|
+
}, oe = (e) => {
|
|
6295
6298
|
e.target === d && O();
|
|
6296
|
-
},
|
|
6299
|
+
}, se = (e) => {
|
|
6297
6300
|
e.key === "Escape" && d.style.display !== "none" && (e.preventDefault(), e.stopImmediatePropagation(), O());
|
|
6298
6301
|
};
|
|
6299
6302
|
return c.addEventListener("pointerdown", (e) => e.stopPropagation()), c.addEventListener("mousedown", (e) => e.stopPropagation()), c.addEventListener("click", (e) => {
|
|
6300
6303
|
e.stopPropagation(), A();
|
|
6301
|
-
}), o.addEventListener("mousedown",
|
|
6302
|
-
|
|
6303
|
-
}), h.addEventListener("click",
|
|
6304
|
+
}), o.addEventListener("mousedown", L), o.addEventListener("pointerdown", B), o.addEventListener("keydown", ae), o.addEventListener("contextmenu", H), d.addEventListener("click", oe), m.addEventListener("click", () => {
|
|
6305
|
+
N();
|
|
6306
|
+
}), h.addEventListener("click", te), g.addEventListener("click", O), t.addEventListener("mousemove", R, !0), t.addEventListener("mouseup", z, !0), t.addEventListener("pointermove", re, !0), t.addEventListener("pointerup", ie, !0), t.addEventListener("pointercancel", V, !0), t.addEventListener("keydown", se, !0), {
|
|
6304
6307
|
show(e, n) {
|
|
6305
6308
|
if (w) return;
|
|
6306
6309
|
T(), O(), k(), v = e;
|
|
@@ -6309,7 +6312,7 @@ var Ss = "mesurer.layout-guides", Cs = "layout-guides:v1", ws = "mesurer.layout-
|
|
|
6309
6312
|
},
|
|
6310
6313
|
dismiss: A,
|
|
6311
6314
|
dispose() {
|
|
6312
|
-
w || (w = !0, T(), E(), A(), t.removeEventListener("mousemove",
|
|
6315
|
+
w || (w = !0, T(), E(), A(), t.removeEventListener("mousemove", R, !0), t.removeEventListener("mouseup", z, !0), t.removeEventListener("pointermove", re, !0), t.removeEventListener("pointerup", ie, !0), t.removeEventListener("pointercancel", V, !0), t.removeEventListener("keydown", se, !0), o.removeEventListener("mousedown", L), o.removeEventListener("pointerdown", B), o.removeEventListener("keydown", ae), o.removeEventListener("contextmenu", H), d.removeEventListener("click", oe), a.remove());
|
|
6313
6316
|
}
|
|
6314
6317
|
};
|
|
6315
6318
|
}, sc = "mesurer.screenshot", cc = "screenshot", lc = "mesurer.screenshot.settings", uc = "mesurer.screenshot.active", dc = "runtime:solid", fc = "screenshot.toggle", pc = 2500, mc = 0, hc = [
|
|
@@ -6544,18 +6547,18 @@ var Ss = "mesurer.layout-guides", Cs = "layout-guides:v1", ws = "mesurer.layout-
|
|
|
6544
6547
|
ownerWindow: i,
|
|
6545
6548
|
root: u,
|
|
6546
6549
|
previewDurationMs: l
|
|
6547
|
-
}),
|
|
6550
|
+
}), ee = (e) => {
|
|
6548
6551
|
let t = j(), n = Math.max(140, e.offsetWidth || 140), r = Math.max(26, e.offsetHeight || 26), a = t ? Math.min(i.innerWidth - n - 8, Math.max(8, t.left + t.width / 2 - n / 2)) : 8, o = t ? t.bottom + 8 : 8, s = o + r <= i.innerHeight - 8 ? o : Math.max(8, (t?.top ?? i.innerHeight) - r - 8);
|
|
6549
6552
|
e.style.left = `${a}px`, e.style.top = `${s}px`;
|
|
6550
|
-
},
|
|
6551
|
-
y && i.clearTimeout(y), g.style.display = "block",
|
|
6553
|
+
}, N = () => {
|
|
6554
|
+
y && i.clearTimeout(y), g.style.display = "block", ee(g), y = i.setTimeout(() => {
|
|
6552
6555
|
y = 0, g.style.display = "none";
|
|
6553
6556
|
}, pc);
|
|
6554
|
-
},
|
|
6557
|
+
}, te = () => {
|
|
6555
6558
|
_ = null, A(null), d.style.visibility = "", d.style.display = "none", u.style.pointerEvents = "none", D(!1), k();
|
|
6556
|
-
},
|
|
6557
|
-
b += 1,
|
|
6558
|
-
},
|
|
6559
|
+
}, P = () => {
|
|
6560
|
+
b += 1, te(), Hr(i);
|
|
6561
|
+
}, ne = async (e) => {
|
|
6559
6562
|
if (x) throw Error("A screenshot capture is already running.");
|
|
6560
6563
|
if (e.width < 4 || e.height < 4) throw Error("Screenshot selection must be at least 4px by 4px.");
|
|
6561
6564
|
x = !0;
|
|
@@ -6593,14 +6596,14 @@ var Ss = "mesurer.layout-guides", Cs = "layout-guides:v1", ws = "mesurer.layout-
|
|
|
6593
6596
|
downloaded: l
|
|
6594
6597
|
};
|
|
6595
6598
|
} catch (e) {
|
|
6596
|
-
throw b === o &&
|
|
6599
|
+
throw b === o && N(), e;
|
|
6597
6600
|
} finally {
|
|
6598
6601
|
d.style.visibility = "", u(), a.finishCapture(), x = !1;
|
|
6599
6602
|
}
|
|
6600
|
-
},
|
|
6603
|
+
}, F = async () => {
|
|
6601
6604
|
if (T().toolEnabled) {
|
|
6602
6605
|
if (w()) {
|
|
6603
|
-
|
|
6606
|
+
P();
|
|
6604
6607
|
return;
|
|
6605
6608
|
}
|
|
6606
6609
|
if (!S) {
|
|
@@ -6609,13 +6612,13 @@ var Ss = "mesurer.layout-guides", Cs = "layout-guides:v1", ws = "mesurer.layout-
|
|
|
6609
6612
|
if (s || await Br(r, i), C) return;
|
|
6610
6613
|
O(), A(null), d.style.visibility = "visible", u.style.pointerEvents = "auto", d.style.display = "block", D(!0);
|
|
6611
6614
|
} catch (e) {
|
|
6612
|
-
throw e instanceof Error && e.name === "AbortError" ||
|
|
6615
|
+
throw e instanceof Error && e.name === "AbortError" || N(), e;
|
|
6613
6616
|
} finally {
|
|
6614
6617
|
S = !1;
|
|
6615
6618
|
}
|
|
6616
6619
|
}
|
|
6617
6620
|
}
|
|
6618
|
-
},
|
|
6621
|
+
}, I = (e) => {
|
|
6619
6622
|
!w() || e.button !== 0 || (e.preventDefault(), e.stopPropagation(), _ = {
|
|
6620
6623
|
x: e.clientX,
|
|
6621
6624
|
y: e.clientY
|
|
@@ -6623,7 +6626,7 @@ var Ss = "mesurer.layout-guides", Cs = "layout-guides:v1", ws = "mesurer.layout-
|
|
|
6623
6626
|
width: i.innerWidth,
|
|
6624
6627
|
height: i.innerHeight
|
|
6625
6628
|
})), d.setPointerCapture?.(e.pointerId));
|
|
6626
|
-
},
|
|
6629
|
+
}, L = (e) => {
|
|
6627
6630
|
!w() || !_ || A(vr(_, {
|
|
6628
6631
|
x: e.clientX,
|
|
6629
6632
|
y: e.clientY
|
|
@@ -6631,7 +6634,7 @@ var Ss = "mesurer.layout-guides", Cs = "layout-guides:v1", ws = "mesurer.layout-
|
|
|
6631
6634
|
width: i.innerWidth,
|
|
6632
6635
|
height: i.innerHeight
|
|
6633
6636
|
}));
|
|
6634
|
-
},
|
|
6637
|
+
}, R = (e) => {
|
|
6635
6638
|
let t = _;
|
|
6636
6639
|
if (_ = null, !w() || !t) return;
|
|
6637
6640
|
d.hasPointerCapture?.(e.pointerId) && d.releasePointerCapture(e.pointerId);
|
|
@@ -6646,22 +6649,22 @@ var Ss = "mesurer.layout-guides", Cs = "layout-guides:v1", ws = "mesurer.layout-
|
|
|
6646
6649
|
A(null);
|
|
6647
6650
|
return;
|
|
6648
6651
|
}
|
|
6649
|
-
|
|
6650
|
-
w() &&
|
|
6652
|
+
ne(n).catch(() => void 0).finally(() => {
|
|
6653
|
+
w() && te();
|
|
6651
6654
|
});
|
|
6652
|
-
},
|
|
6655
|
+
}, z = (e) => {
|
|
6653
6656
|
_ = null, d.hasPointerCapture?.(e.pointerId) && d.releasePointerCapture(e.pointerId), A(null);
|
|
6654
|
-
},
|
|
6655
|
-
e.key !== "Escape" || !w() || (e.preventDefault(), e.stopImmediatePropagation(),
|
|
6657
|
+
}, B = (e) => {
|
|
6658
|
+
e.key !== "Escape" || !w() || (e.preventDefault(), e.stopImmediatePropagation(), P());
|
|
6656
6659
|
};
|
|
6657
|
-
d.addEventListener("pointerdown",
|
|
6658
|
-
let
|
|
6660
|
+
d.addEventListener("pointerdown", I), d.addEventListener("pointermove", L), d.addEventListener("pointerup", R), d.addEventListener("pointercancel", z), i.addEventListener("keydown", B, !0);
|
|
6661
|
+
let re = {
|
|
6659
6662
|
active: w,
|
|
6660
6663
|
settings: T,
|
|
6661
6664
|
setSettings: E,
|
|
6662
|
-
start:
|
|
6663
|
-
cancel:
|
|
6664
|
-
capture:
|
|
6665
|
+
start: F,
|
|
6666
|
+
cancel: P,
|
|
6667
|
+
capture: ne
|
|
6665
6668
|
};
|
|
6666
6669
|
t.tool.register({
|
|
6667
6670
|
id: "screenshot",
|
|
@@ -6707,7 +6710,7 @@ var Ss = "mesurer.layout-guides", Cs = "layout-guides:v1", ws = "mesurer.layout-
|
|
|
6707
6710
|
description: "Show the camera tool in the toolbar.",
|
|
6708
6711
|
value: () => T().toolEnabled,
|
|
6709
6712
|
set: (e) => {
|
|
6710
|
-
E({ toolEnabled: e }), !e && w() &&
|
|
6713
|
+
E({ toolEnabled: e }), !e && w() && P();
|
|
6711
6714
|
}
|
|
6712
6715
|
},
|
|
6713
6716
|
{
|
|
@@ -6735,11 +6738,11 @@ var Ss = "mesurer.layout-guides", Cs = "layout-guides:v1", ws = "mesurer.layout-
|
|
|
6735
6738
|
set: (e) => E({ includeMeasurements: e })
|
|
6736
6739
|
}
|
|
6737
6740
|
]
|
|
6738
|
-
}), t.command.register(fc,
|
|
6739
|
-
C = !0, b += 1, d.removeEventListener("pointerdown",
|
|
6741
|
+
}), t.command.register(fc, F), t.service.provide(cc, re), t.lifecycle.onDispose(() => {
|
|
6742
|
+
C = !0, b += 1, d.removeEventListener("pointerdown", I), d.removeEventListener("pointermove", L), d.removeEventListener("pointerup", R), d.removeEventListener("pointercancel", z), i.removeEventListener("keydown", B, !0), y && i.clearTimeout(y), M.dispose(), k(), Hr(i), a.finishCapture(), a.dispose(), o.dispose();
|
|
6740
6743
|
});
|
|
6741
6744
|
}
|
|
6742
|
-
}), Oc = "0.2.0-beta.
|
|
6745
|
+
}), Oc = "0.2.0-beta.14", kc = Aa, Ac = Da, jc = Oa, Mc = ja, Nc = ka, Pc = () => ({
|
|
6743
6746
|
...So(),
|
|
6744
6747
|
version: Oc
|
|
6745
6748
|
}), Fc = (e, t) => e.left <= t.left + t.width && e.left + e.width >= t.left && e.top <= t.top + t.height && e.top + e.height >= t.top, Ic = (e) => {
|
|
@@ -7550,19 +7553,19 @@ function Yl(e = {}) {
|
|
|
7550
7553
|
selectedThread: u,
|
|
7551
7554
|
delivery: e?.thread ? e : null
|
|
7552
7555
|
});
|
|
7553
|
-
},
|
|
7556
|
+
}, ee = (e, t = !1) => {
|
|
7554
7557
|
let n = e.trim();
|
|
7555
7558
|
n && ((t || !l) && (l = n), u = n, d = !1, M());
|
|
7556
|
-
},
|
|
7559
|
+
}, N = () => b !== null && [
|
|
7557
7560
|
"queueing",
|
|
7558
7561
|
"queued",
|
|
7559
7562
|
"working",
|
|
7560
7563
|
"completed"
|
|
7561
|
-
].includes(b.status),
|
|
7564
|
+
].includes(b.status), te = (e) => e === "queueing" ? "Queueing…" : e === "queued" ? "Queued" : e === "working" ? "Working…" : e === "completed" ? "Done" : e === "interrupted" ? "Interrupted" : "Failed", P = () => b ? b.status === "queueing" ? "Queueing to Codex…" : b.status === "queued" ? b.dispatch === "desktop-wake-failed" ? "Queued — open Codex" : "Queued for Codex" : b.status === "working" ? "Codex working…" : b.status === "completed" ? "Codex finished" : b.status === "interrupted" ? "Codex interrupted" : "Queue failed" : null, ne = () => b ? [
|
|
7562
7565
|
"queueing",
|
|
7563
7566
|
"queued",
|
|
7564
7567
|
"working"
|
|
7565
|
-
].includes(b.status) ? Fl : b.status === "completed" ? Il : Pl : Pl,
|
|
7568
|
+
].includes(b.status) ? Fl : b.status === "completed" ? Il : Pl : Pl, F = () => {
|
|
7566
7569
|
let e = [], t = /* @__PURE__ */ new Set(), n = (n) => {
|
|
7567
7570
|
t.has(n.id) || (t.add(n.id), e.push(n));
|
|
7568
7571
|
}, r = (e) => ({
|
|
@@ -7577,24 +7580,24 @@ function Yl(e = {}) {
|
|
|
7577
7580
|
for (let e of m) n(e);
|
|
7578
7581
|
for (let e of p) n(m.find((t) => t.id === e) ?? r(e));
|
|
7579
7582
|
return e;
|
|
7580
|
-
},
|
|
7583
|
+
}, I = (e = !1) => Promise.resolve(), L = () => {
|
|
7581
7584
|
if (o !== "available") {
|
|
7582
7585
|
let e = s?.source === "desktop" && s.reason === "desktop-private-transport";
|
|
7583
7586
|
return [{
|
|
7584
7587
|
id: "codex.thread.connect",
|
|
7585
7588
|
label: o === "unavailable" ? e ? "Retry Codex Desktop" : "Retry Codex connection" : "Choose Codex thread…",
|
|
7586
|
-
run: () =>
|
|
7589
|
+
run: () => I(!0)
|
|
7587
7590
|
}];
|
|
7588
7591
|
}
|
|
7589
|
-
let e =
|
|
7590
|
-
let t = e.id === l ? "Current · " : e.connected ? "Loaded · " : "", r = b?.thread === e.id ? ` · ${
|
|
7592
|
+
let e = F(), t = e.slice(0, g), n = j(), r = t.map((e) => {
|
|
7593
|
+
let t = e.id === l ? "Current · " : e.connected ? "Loaded · " : "", r = b?.thread === e.id ? ` · ${te(b.status)}` : "";
|
|
7591
7594
|
return {
|
|
7592
7595
|
id: `codex.thread.${e.id}`,
|
|
7593
7596
|
label: `${t}${ql(e.title)}${r}`,
|
|
7594
7597
|
checked: () => n === e.id,
|
|
7595
|
-
disabled: () =>
|
|
7598
|
+
disabled: () => N(),
|
|
7596
7599
|
run() {
|
|
7597
|
-
|
|
7600
|
+
N() || (ee(e.id, !l), R());
|
|
7598
7601
|
}
|
|
7599
7602
|
};
|
|
7600
7603
|
});
|
|
@@ -7602,12 +7605,12 @@ function Yl(e = {}) {
|
|
|
7602
7605
|
id: "codex.thread.show-more",
|
|
7603
7606
|
label: "Show 5 more…",
|
|
7604
7607
|
run() {
|
|
7605
|
-
g = jl,
|
|
7608
|
+
g = jl, R();
|
|
7606
7609
|
}
|
|
7607
7610
|
}), r;
|
|
7608
|
-
},
|
|
7611
|
+
}, R = () => {
|
|
7609
7612
|
if (!n || w) return;
|
|
7610
|
-
let t = j(), r =
|
|
7613
|
+
let t = j(), r = L(), i = !N() && !d && o !== "unavailable" && (o === "unknown" || !!t), a = s?.source === "desktop" && s.reason === "desktop-private-transport", c = P() ?? (o === "unavailable" ? a ? "Codex Desktop not connected" : "Codex unavailable" : d || o === "available" && !t ? "Choose Codex thread" : "Queue to Codex"), l = JSON.stringify({
|
|
7611
7614
|
bridgeAvailability: o,
|
|
7612
7615
|
codexRuntime: s,
|
|
7613
7616
|
routeNeedsSelection: d,
|
|
@@ -7627,14 +7630,14 @@ function Yl(e = {}) {
|
|
|
7627
7630
|
label: c,
|
|
7628
7631
|
command: "codex.queue",
|
|
7629
7632
|
order: 73,
|
|
7630
|
-
icon:
|
|
7633
|
+
icon: ne(),
|
|
7631
7634
|
disabled: () => !i,
|
|
7632
7635
|
menu: r.length ? {
|
|
7633
7636
|
label: "Codex destination",
|
|
7634
7637
|
items: r
|
|
7635
7638
|
} : void 0
|
|
7636
7639
|
}));
|
|
7637
|
-
},
|
|
7640
|
+
}, z = async (e) => {
|
|
7638
7641
|
if (o !== "available") return;
|
|
7639
7642
|
let t = await A({
|
|
7640
7643
|
limit: jl,
|
|
@@ -7642,29 +7645,29 @@ function Yl(e = {}) {
|
|
|
7642
7645
|
});
|
|
7643
7646
|
m = t.threads, h = t.hasMore, p = t.threads.filter((e) => e.connected).map((e) => e.id), f = t.thread;
|
|
7644
7647
|
};
|
|
7645
|
-
|
|
7648
|
+
I = (e = !1) => w || o === "unknown" && !e ? Promise.resolve() : y || (y = (async () => {
|
|
7646
7649
|
try {
|
|
7647
7650
|
let e = await D();
|
|
7648
|
-
o = "available", c = !0, f = e.thread, await
|
|
7651
|
+
o = "available", c = !0, f = e.thread, await z(u ?? l ?? e.thread);
|
|
7649
7652
|
let t = u ?? l;
|
|
7650
|
-
t && p.includes(t) ? d = !1 : p.length === 1 ?
|
|
7653
|
+
t && p.includes(t) ? d = !1 : p.length === 1 ? ee(p[0], !0) : d = !0, !d && t && M();
|
|
7651
7654
|
} catch (e) {
|
|
7652
7655
|
throw o = "unavailable", s = await T().catch(() => s), e;
|
|
7653
7656
|
} finally {
|
|
7654
|
-
y = null,
|
|
7657
|
+
y = null, R();
|
|
7655
7658
|
}
|
|
7656
7659
|
})(), y);
|
|
7657
|
-
let
|
|
7660
|
+
let B = () => {
|
|
7658
7661
|
x &&= (globalThis.clearTimeout(x), 0), S &&= (globalThis.clearTimeout(S), 0);
|
|
7659
|
-
},
|
|
7662
|
+
}, re = () => {
|
|
7660
7663
|
S && globalThis.clearTimeout(S), S = globalThis.setTimeout(() => {
|
|
7661
|
-
S = 0, b?.status === "completed" && (b = null, M(),
|
|
7664
|
+
S = 0, b?.status === "completed" && (b = null, M(), R());
|
|
7662
7665
|
}, Ol);
|
|
7663
|
-
},
|
|
7666
|
+
}, ie = () => {
|
|
7664
7667
|
S && globalThis.clearTimeout(S), S = globalThis.setTimeout(() => {
|
|
7665
|
-
S = 0, !(b?.status !== "queued" || b.dispatch !== "desktop-opened" && b.dispatch !== "desktop-wake-failed") && (b = null, M(),
|
|
7668
|
+
S = 0, !(b?.status !== "queued" || b.dispatch !== "desktop-opened" && b.dispatch !== "desktop-wake-failed") && (b = null, M(), R());
|
|
7666
7669
|
}, Ol);
|
|
7667
|
-
},
|
|
7670
|
+
}, V = async (e) => {
|
|
7668
7671
|
if (!(!b || b.id !== e.id)) {
|
|
7669
7672
|
if (b = {
|
|
7670
7673
|
...b,
|
|
@@ -7674,51 +7677,51 @@ function Yl(e = {}) {
|
|
|
7674
7677
|
dispatch: e.dispatch ?? b.dispatch,
|
|
7675
7678
|
dispatchError: e.dispatchError ?? b.dispatchError
|
|
7676
7679
|
}, M(), e.status === "queued" && (e.dispatch === "desktop-opened" || e.dispatch === "desktop-wake-failed")) {
|
|
7677
|
-
|
|
7680
|
+
R(), ie();
|
|
7678
7681
|
return;
|
|
7679
7682
|
}
|
|
7680
7683
|
if (e.status === "completed") {
|
|
7681
7684
|
if (r) for (let e of b.annotationIds) await i.removeAnnotation(e);
|
|
7682
|
-
M(),
|
|
7685
|
+
M(), R(), re();
|
|
7683
7686
|
return;
|
|
7684
7687
|
}
|
|
7685
7688
|
if (e.status === "interrupted") {
|
|
7686
|
-
M(),
|
|
7689
|
+
M(), R();
|
|
7687
7690
|
let t = e.updatedAt > 0 ? e.updatedAt : Date.now();
|
|
7688
7691
|
Date.now() - t < Al && (x = globalThis.setTimeout(() => {
|
|
7689
|
-
x = 0,
|
|
7692
|
+
x = 0, ae(e.id);
|
|
7690
7693
|
}, kl));
|
|
7691
7694
|
return;
|
|
7692
7695
|
}
|
|
7693
|
-
|
|
7694
|
-
x = 0,
|
|
7696
|
+
R(), x = globalThis.setTimeout(() => {
|
|
7697
|
+
x = 0, ae(e.id);
|
|
7695
7698
|
}, Dl);
|
|
7696
7699
|
}
|
|
7697
|
-
},
|
|
7700
|
+
}, ae = async (e) => {
|
|
7698
7701
|
if (!(w || b?.id !== e)) try {
|
|
7699
|
-
await
|
|
7702
|
+
await V(await O(e));
|
|
7700
7703
|
} catch (t) {
|
|
7701
7704
|
if (b?.id !== e) return;
|
|
7702
7705
|
let n = t;
|
|
7703
7706
|
if (b.status === "queued" && b.thread) try {
|
|
7704
|
-
o !== "available" && await
|
|
7707
|
+
o !== "available" && await I(!0);
|
|
7705
7708
|
let e = await k(b);
|
|
7706
|
-
await
|
|
7709
|
+
await V(e);
|
|
7707
7710
|
return;
|
|
7708
7711
|
} catch (e) {
|
|
7709
7712
|
n = e;
|
|
7710
7713
|
}
|
|
7711
7714
|
if (b?.id !== e) return;
|
|
7712
7715
|
if (b.status === "interrupted") {
|
|
7713
|
-
|
|
7716
|
+
R();
|
|
7714
7717
|
return;
|
|
7715
7718
|
}
|
|
7716
7719
|
b = {
|
|
7717
7720
|
...b,
|
|
7718
7721
|
status: "failed"
|
|
7719
|
-
}, M(), Jl(n) && (o = "unavailable"),
|
|
7722
|
+
}, M(), Jl(n) && (o = "unavailable"), R();
|
|
7720
7723
|
}
|
|
7721
|
-
},
|
|
7724
|
+
}, H = {
|
|
7722
7725
|
health: E,
|
|
7723
7726
|
listThreads: A,
|
|
7724
7727
|
delivery: O,
|
|
@@ -7729,7 +7732,7 @@ function Yl(e = {}) {
|
|
|
7729
7732
|
action: "target",
|
|
7730
7733
|
thread: t
|
|
7731
7734
|
}), r = Hl(n);
|
|
7732
|
-
return s = Vl(n) ?? s,
|
|
7735
|
+
return s = Vl(n) ?? s, ee(t, !l), f = r.thread, p = r.threads, o = "available", c = !0, R(), r;
|
|
7733
7736
|
},
|
|
7734
7737
|
async queue(e) {
|
|
7735
7738
|
let r = await Gl(i, e, t), a = e?.thread?.trim(), s = a || (n ? j() : null);
|
|
@@ -7752,16 +7755,16 @@ function Yl(e = {}) {
|
|
|
7752
7755
|
};
|
|
7753
7756
|
return e.queuedSubmissionId !== void 0 && (n.queuedSubmissionId = e.queuedSubmissionId?.trim() || null), e.dispatch !== void 0 && (n.dispatch = e.dispatch), e.dispatchError !== void 0 && (n.dispatchError = e.dispatchError?.trim() || null), n;
|
|
7754
7757
|
} catch (e) {
|
|
7755
|
-
throw n && Jl(e) && (o = "unavailable",
|
|
7758
|
+
throw n && Jl(e) && (o = "unavailable", R()), e;
|
|
7756
7759
|
}
|
|
7757
7760
|
},
|
|
7758
7761
|
send(e) {
|
|
7759
|
-
return
|
|
7762
|
+
return H.queue(e);
|
|
7760
7763
|
}
|
|
7761
7764
|
};
|
|
7762
|
-
e.service.provide(Tl,
|
|
7763
|
-
let
|
|
7764
|
-
if (!(C ||
|
|
7765
|
+
e.service.provide(Tl, H);
|
|
7766
|
+
let oe = async () => {
|
|
7767
|
+
if (!(C || N())) return B(), b = {
|
|
7765
7768
|
id: null,
|
|
7766
7769
|
thread: j(),
|
|
7767
7770
|
status: "queueing",
|
|
@@ -7769,10 +7772,10 @@ function Yl(e = {}) {
|
|
|
7769
7772
|
queuedSubmissionId: null,
|
|
7770
7773
|
dispatch: null,
|
|
7771
7774
|
dispatchError: null
|
|
7772
|
-
},
|
|
7775
|
+
}, R(), C = (async () => {
|
|
7773
7776
|
try {
|
|
7774
|
-
n && o !== "available" && await
|
|
7775
|
-
let e = await
|
|
7777
|
+
n && o !== "available" && await I(!0);
|
|
7778
|
+
let e = await H.queue();
|
|
7776
7779
|
b = {
|
|
7777
7780
|
id: e.deliveryId,
|
|
7778
7781
|
thread: e.thread,
|
|
@@ -7781,7 +7784,7 @@ function Yl(e = {}) {
|
|
|
7781
7784
|
queuedSubmissionId: e.queuedSubmissionId ?? null,
|
|
7782
7785
|
dispatch: e.dispatch ?? null,
|
|
7783
7786
|
dispatchError: e.dispatchError ?? null
|
|
7784
|
-
},
|
|
7787
|
+
}, ee(e.thread, !l), M(), R(), console.info(`[Mesurer] Queued feedback for Codex thread ${e.thread}.`), e.deliveryId ? e.status === "completed" || e.status === "interrupted" ? await V({
|
|
7785
7788
|
id: e.deliveryId,
|
|
7786
7789
|
thread: e.thread,
|
|
7787
7790
|
status: e.status,
|
|
@@ -7789,12 +7792,12 @@ function Yl(e = {}) {
|
|
|
7789
7792
|
createdAt: 0,
|
|
7790
7793
|
updatedAt: 0
|
|
7791
7794
|
}) : x = globalThis.setTimeout(() => {
|
|
7792
|
-
x = 0,
|
|
7795
|
+
x = 0, ae(e.deliveryId);
|
|
7793
7796
|
}, Dl) : S = globalThis.setTimeout(() => {
|
|
7794
|
-
S = 0, b?.id === null && b?.status === "queued" && (b = null, M(),
|
|
7797
|
+
S = 0, b?.id === null && b?.status === "queued" && (b = null, M(), R());
|
|
7795
7798
|
}, Ol);
|
|
7796
7799
|
} catch (e) {
|
|
7797
|
-
b = null, M(),
|
|
7800
|
+
b = null, M(), R();
|
|
7798
7801
|
let t = e instanceof Error ? e.message : String(e);
|
|
7799
7802
|
throw console.error(`[Mesurer] Failed to queue feedback for Codex: ${t}`), e;
|
|
7800
7803
|
} finally {
|
|
@@ -7802,15 +7805,15 @@ function Yl(e = {}) {
|
|
|
7802
7805
|
}
|
|
7803
7806
|
})(), C;
|
|
7804
7807
|
};
|
|
7805
|
-
if (e.command.register("codex.queue",
|
|
7806
|
-
|
|
7807
|
-
x = 0, b?.id &&
|
|
7808
|
+
if (e.command.register("codex.queue", oe), e.command.register("codex.send", oe), n) {
|
|
7809
|
+
R(), window.__MESURER_HOST__?.codexBridge && I(!0).catch(() => void 0), b?.id && (c = !0, x = globalThis.setTimeout(() => {
|
|
7810
|
+
x = 0, b?.id && ae(b.id);
|
|
7808
7811
|
}, 0));
|
|
7809
7812
|
let t = globalThis.setInterval(() => {
|
|
7810
|
-
c &&
|
|
7813
|
+
c && I().catch(() => void 0);
|
|
7811
7814
|
}, El);
|
|
7812
7815
|
e.lifecycle.onDispose(() => {
|
|
7813
|
-
w = !0,
|
|
7816
|
+
w = !0, B(), globalThis.clearInterval(t), _?.dispose(), _ = void 0;
|
|
7814
7817
|
});
|
|
7815
7818
|
}
|
|
7816
7819
|
}
|