@vscode/component-explorer 0.1.1-19 → 0.1.1-20

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/viewer.js CHANGED
@@ -1,34 +1,34 @@
1
- var Nt = Object.defineProperty;
2
- var Vt = (r, e, t) => e in r ? Nt(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
3
- var c = (r, e, t) => Vt(r, typeof e != "symbol" ? e + "" : e, t);
4
- import { f as Te, a as ke, s as Ie } from "./index-BsQr630j.js";
5
- import { b as is, d as as, c as ds, e as ls, g as cs } from "./index-BsQr630j.js";
6
- import { createRoot as Mt } from "react-dom/client";
7
- import { createContext as et, useReducer as Ft, useState as Dt, useContext as Et, useEffect as Oe, createElement as Bt } from "react";
8
- import { jsx as a, jsxs as m, Fragment as ve } from "react/jsx-runtime";
9
- import { unstable_batchedUpdates as tt } from "react-dom";
1
+ var Vt = Object.defineProperty;
2
+ var Mt = (r, e, t) => e in r ? Vt(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
3
+ var l = (r, e, t) => Mt(r, typeof e != "symbol" ? e + "" : e, t);
4
+ import { f as Re, a as Te, s as ke } from "./index-BsQr630j.js";
5
+ import { b as as, d as ds, c as cs, e as ls, g as hs } from "./index-BsQr630j.js";
6
+ import { createRoot as Ft } from "react-dom/client";
7
+ import { createContext as Ye, useReducer as Et, useState as Dt, useContext as Bt, useEffect as Ie, createElement as At } from "react";
8
+ import { jsx as a, jsxs as g, Fragment as me } from "react/jsx-runtime";
9
+ import { unstable_batchedUpdates as et } from "react-dom";
10
+ function ve(r) {
11
+ return typeof r == "object" && r !== null && ke in r && r[ke] === !0 && "_options" in r && typeof r._options == "object";
12
+ }
10
13
  function be(r) {
11
- return typeof r == "object" && r !== null && Ie in r && r[Ie] === !0 && "_options" in r && typeof r._options == "object";
14
+ return typeof r == "object" && r !== null && Re in r && r[Re] === !0 && "_entries" in r && typeof r._entries == "object";
12
15
  }
13
16
  function _e(r) {
14
- return typeof r == "object" && r !== null && Te in r && r[Te] === !0 && "_entries" in r && typeof r._entries == "object";
15
- }
16
- function ye(r) {
17
- return typeof r == "object" && r !== null && ke in r && r[ke] === !0 && "_variants" in r && typeof r._variants == "object";
18
- }
19
- function Zn(r) {
20
- return be(r) ? { success: !0, data: r } : _e(r) ? { success: !0, data: r } : ye(r) ? { success: !0, data: r } : { success: !1, error: "Value is not a valid fixture export (missing brand symbol or _options/_entries/_variants)" };
17
+ return typeof r == "object" && r !== null && Te in r && r[Te] === !0 && "_variants" in r && typeof r._variants == "object";
21
18
  }
22
19
  function Xn(r) {
23
- return be(r) ? { success: !0, data: r } : { success: !1, error: "Value is not a SingleFixtureExport" };
20
+ return ve(r) ? { success: !0, data: r } : be(r) ? { success: !0, data: r } : _e(r) ? { success: !0, data: r } : { success: !1, error: "Value is not a valid fixture export (missing brand symbol or _options/_entries/_variants)" };
24
21
  }
25
22
  function Yn(r) {
26
- return _e(r) ? { success: !0, data: r } : { success: !1, error: "Value is not a FixtureGroupExport" };
23
+ return ve(r) ? { success: !0, data: r } : { success: !1, error: "Value is not a SingleFixtureExport" };
27
24
  }
28
25
  function es(r) {
29
- return ye(r) ? { success: !0, data: r } : { success: !1, error: "Value is not a FixtureVariantsExport" };
26
+ return be(r) ? { success: !0, data: r } : { success: !1, error: "Value is not a FixtureGroupExport" };
27
+ }
28
+ function ts(r) {
29
+ return _e(r) ? { success: !0, data: r } : { success: !1, error: "Value is not a FixtureVariantsExport" };
30
30
  }
31
- function Ne(r, e, t) {
31
+ function Oe(r, e, t) {
32
32
  const n = r._options;
33
33
  return {
34
34
  id: e,
@@ -43,24 +43,24 @@ function Ne(r, e, t) {
43
43
  render: n.render
44
44
  };
45
45
  }
46
- function ts(r) {
46
+ function rs(r) {
47
47
  return typeof r == "object" && r !== null && "render" in r && typeof r.render == "function" && "id" in r && "name" in r;
48
48
  }
49
- const At = {
49
+ const $t = {
50
50
  mobile: { width: 390, height: 844 },
51
51
  tablet: { width: 768, height: 1024 },
52
52
  desktop: { width: 1440, height: 900 }
53
53
  };
54
- function $t(r) {
55
- return typeof r == "string" ? { name: r, ...At[r] } : r;
56
- }
57
54
  function zt(r) {
55
+ return typeof r == "string" ? { name: r, ...$t[r] } : r;
56
+ }
57
+ function Lt(r) {
58
58
  const e = {};
59
59
  for (const t of r)
60
60
  e[t.name] = t.defaultValue;
61
61
  return e;
62
62
  }
63
- function Ve(r) {
63
+ function Ne(r) {
64
64
  if (r.startsWith("/"))
65
65
  throw new Error(`Fixture path cannot start with '/': ${r}`);
66
66
  if (r.includes("//"))
@@ -68,19 +68,19 @@ function Ve(r) {
68
68
  if (r === "")
69
69
  throw new Error("Fixture path cannot be empty (use undefined for default)");
70
70
  }
71
- function Lt(r, e) {
72
- const t = Ht(r);
71
+ function Ht(r, e) {
72
+ const t = jt(r);
73
73
  if (e === void 0)
74
74
  return [t];
75
75
  if (e.endsWith("/")) {
76
76
  const n = e.slice(0, -1);
77
77
  if (n)
78
- return Ve(n), [...n.split("/"), t];
78
+ return Ne(n), [...n.split("/"), t];
79
79
  throw new Error(`Fixture path cannot be just '/': ${e}`);
80
80
  } else
81
- return Ve(e), e.split("/");
81
+ return Ne(e), e.split("/");
82
82
  }
83
- function ae(r) {
83
+ function ie(r) {
84
84
  const e = {
85
85
  id: "",
86
86
  name: "Components",
@@ -89,80 +89,80 @@ function ae(r) {
89
89
  labels: []
90
90
  };
91
91
  for (const [t, n] of r) {
92
- const s = "_path" in n ? n._path : void 0, o = Lt(t, s);
93
- rt(e, o, n);
92
+ const s = "_path" in n ? n._path : void 0, o = Ht(t, s);
93
+ tt(e, o, n);
94
94
  }
95
95
  return e;
96
96
  }
97
- function Ht(r) {
97
+ function jt(r) {
98
98
  return (r.split("/").pop() ?? r).replace(/\.fixture\.(tsx?|jsx?)$/, "");
99
99
  }
100
- function rt(r, e, t, n = []) {
101
- var l, h;
100
+ function tt(r, e, t, n = []) {
101
+ var c, u;
102
102
  let s = r;
103
103
  const o = [...n];
104
- for (let u = 0; u < e.length - 1; u++) {
105
- const g = e[u];
106
- o.push(g);
107
- const b = o.join("/");
108
- let p = (l = s.children) == null ? void 0 : l.find(
109
- (_) => _.type === "folder" && _.name === g
104
+ for (let h = 0; h < e.length - 1; h++) {
105
+ const p = e[h];
106
+ o.push(p);
107
+ const m = o.join("/");
108
+ let b = (c = s.children) == null ? void 0 : c.find(
109
+ (S) => S.type === "folder" && S.name === p
110
110
  );
111
- p || (p = {
112
- id: b,
113
- name: g,
111
+ b || (b = {
112
+ id: m,
113
+ name: p,
114
114
  type: "folder",
115
115
  children: [],
116
116
  labels: []
117
- }, s.children || (s.children = []), s.children.push(p)), s = p;
117
+ }, s.children || (s.children = []), s.children.push(b)), s = b;
118
118
  }
119
119
  const i = e[e.length - 1];
120
120
  o.push(i);
121
121
  const d = o.join("/");
122
- if (be(t)) {
123
- const u = Ne(t, d, i), g = {
122
+ if (ve(t)) {
123
+ const h = Oe(t, d, i), p = {
124
124
  id: d,
125
125
  name: i,
126
126
  type: "component",
127
- component: u,
128
- labels: [...u.labels]
127
+ component: h,
128
+ labels: [...h.labels]
129
129
  };
130
- s.children || (s.children = []), s.children.push(g);
131
- } else if (_e(t)) {
132
- let u = (h = s.children) == null ? void 0 : h.find(
133
- (g) => g.type === "folder" && g.name === i
130
+ s.children || (s.children = []), s.children.push(p);
131
+ } else if (be(t)) {
132
+ let h = (u = s.children) == null ? void 0 : u.find(
133
+ (p) => p.type === "folder" && p.name === i
134
134
  );
135
- u || (u = {
135
+ h || (h = {
136
136
  id: d,
137
137
  name: i,
138
138
  type: "folder",
139
139
  children: [],
140
140
  labels: [...t._labels ?? []]
141
- }, s.children || (s.children = []), s.children.push(u));
142
- for (const [g, b] of Object.entries(t._entries))
143
- rt(u, [g], b, o);
144
- } else if (ye(t)) {
145
- const u = {
141
+ }, s.children || (s.children = []), s.children.push(h));
142
+ for (const [p, m] of Object.entries(t._entries))
143
+ tt(h, [p], m, o);
144
+ } else if (_e(t)) {
145
+ const h = {
146
146
  id: d,
147
147
  name: i,
148
148
  type: "variants",
149
149
  children: [],
150
150
  labels: [...t._labels ?? []]
151
151
  };
152
- s.children || (s.children = []), s.children.push(u);
153
- for (const [g, b] of Object.entries(t._variants)) {
154
- const p = [...o, g].join("/"), _ = {
155
- id: p,
156
- name: g,
152
+ s.children || (s.children = []), s.children.push(h);
153
+ for (const [p, m] of Object.entries(t._variants)) {
154
+ const b = [...o, p].join("/"), S = {
155
+ id: b,
156
+ name: p,
157
157
  type: "component",
158
- component: Ne(b, p, g),
159
- labels: [...b._options.labels ?? []]
158
+ component: Oe(m, b, p),
159
+ labels: [...m._options.labels ?? []]
160
160
  };
161
- u.children.push(_);
161
+ h.children.push(S);
162
162
  }
163
163
  }
164
164
  }
165
- function Me(r, e) {
165
+ function Ve(r, e) {
166
166
  if (e.length === 0)
167
167
  return r;
168
168
  let t = r;
@@ -173,29 +173,29 @@ function Me(r, e) {
173
173
  }
174
174
  return t;
175
175
  }
176
- function Pt(r) {
176
+ function Ut(r) {
177
177
  if (r.type === "component" && r.component)
178
178
  return [r.component];
179
179
  const e = [];
180
180
  for (const t of r.children ?? [])
181
- e.push(...Pt(t));
181
+ e.push(...Ut(t));
182
182
  return e;
183
183
  }
184
184
  let L;
185
- function jt(r) {
186
- L ? L instanceof Fe ? L.loggers.push(r) : L = new Fe([L, r]) : L = r;
185
+ function Pt(r) {
186
+ L ? L instanceof Me ? L.loggers.push(r) : L = new Me([L, r]) : L = r;
187
187
  }
188
- function w() {
188
+ function y() {
189
189
  return L;
190
190
  }
191
- let de;
192
- function Ut(r) {
193
- de = r;
194
- }
191
+ let ae;
195
192
  function Wt(r) {
196
- de && de(r);
193
+ ae = r;
194
+ }
195
+ function Gt(r) {
196
+ ae && ae(r);
197
197
  }
198
- class Fe {
198
+ class Me {
199
199
  constructor(e) {
200
200
  this.loggers = e;
201
201
  }
@@ -248,7 +248,7 @@ class Fe {
248
248
  t.handleEndTransaction(e);
249
249
  }
250
250
  }
251
- var F;
251
+ var V;
252
252
  (function(r) {
253
253
  let e = !1;
254
254
  function t() {
@@ -264,23 +264,23 @@ var F;
264
264
  return;
265
265
  const i = Error, d = i.stackTraceLimit;
266
266
  i.stackTraceLimit = 3;
267
- const l = new Error().stack;
268
- return i.stackTraceLimit = d, xe.fromStack(l, o + 1);
267
+ const c = new Error().stack;
268
+ return i.stackTraceLimit = d, ye.fromStack(c, o + 1);
269
269
  }
270
270
  r.ofNthCaller = s;
271
- })(F || (F = {}));
272
- class xe {
271
+ })(V || (V = {}));
272
+ class ye {
273
273
  static fromStack(e, t) {
274
274
  const n = e.split(`
275
- `), s = Gt(n[t + 1]);
275
+ `), s = qt(n[t + 1]);
276
276
  if (s)
277
- return new xe(s.fileName, s.line, s.column, s.id);
277
+ return new ye(s.fileName, s.line, s.column, s.id);
278
278
  }
279
279
  constructor(e, t, n, s) {
280
280
  this.fileName = e, this.line = t, this.column = n, this.id = s;
281
281
  }
282
282
  }
283
- function Gt(r) {
283
+ function qt(r) {
284
284
  if (!r)
285
285
  return;
286
286
  const e = r.match(/\((.*):(\d+):(\d+)\)/);
@@ -300,32 +300,32 @@ function Gt(r) {
300
300
  id: r
301
301
  };
302
302
  }
303
- class E {
303
+ class D {
304
304
  constructor(e, t, n) {
305
305
  this.owner = e, this.debugNameSource = t, this.referenceFn = n;
306
306
  }
307
307
  getDebugName(e) {
308
- return qt(e, this);
308
+ return Kt(e, this);
309
309
  }
310
310
  }
311
- const De = /* @__PURE__ */ new Map(), le = /* @__PURE__ */ new WeakMap();
312
- function qt(r, e) {
313
- const t = le.get(r);
311
+ const Fe = /* @__PURE__ */ new Map(), de = /* @__PURE__ */ new WeakMap();
312
+ function Kt(r, e) {
313
+ const t = de.get(r);
314
314
  if (t)
315
315
  return t;
316
- const n = Kt(r, e);
316
+ const n = Jt(r, e);
317
317
  if (n) {
318
- let s = De.get(n) ?? 0;
319
- s++, De.set(n, s);
318
+ let s = Fe.get(n) ?? 0;
319
+ s++, Fe.set(n, s);
320
320
  const o = s === 1 ? n : `${n}#${s}`;
321
- return le.set(r, o), o;
321
+ return de.set(r, o), o;
322
322
  }
323
323
  }
324
- function Kt(r, e) {
325
- const t = le.get(r);
324
+ function Jt(r, e) {
325
+ const t = de.get(r);
326
326
  if (t)
327
327
  return t;
328
- const n = e.owner ? Qt(e.owner) + "." : "";
328
+ const n = e.owner ? Zt(e.owner) + "." : "";
329
329
  let s;
330
330
  const o = e.debugNameSource;
331
331
  if (o !== void 0)
@@ -335,56 +335,56 @@ function Kt(r, e) {
335
335
  } else
336
336
  return n + o;
337
337
  const i = e.referenceFn;
338
- if (i !== void 0 && (s = Se(i), s !== void 0))
338
+ if (i !== void 0 && (s = xe(i), s !== void 0))
339
339
  return n + s;
340
340
  if (e.owner !== void 0) {
341
- const d = Jt(e.owner, r);
341
+ const d = Qt(e.owner, r);
342
342
  if (d !== void 0)
343
343
  return n + d;
344
344
  }
345
345
  }
346
- function Jt(r, e) {
346
+ function Qt(r, e) {
347
347
  for (const t in r)
348
348
  if (r[t] === e)
349
349
  return t;
350
350
  }
351
- const Ee = /* @__PURE__ */ new Map(), Be = /* @__PURE__ */ new WeakMap();
352
- function Qt(r) {
353
- const e = Be.get(r);
351
+ const Ee = /* @__PURE__ */ new Map(), De = /* @__PURE__ */ new WeakMap();
352
+ function Zt(r) {
353
+ const e = De.get(r);
354
354
  if (e)
355
355
  return e;
356
- const t = nt(r) ?? "Object";
356
+ const t = rt(r) ?? "Object";
357
357
  let n = Ee.get(t) ?? 0;
358
358
  n++, Ee.set(t, n);
359
359
  const s = n === 1 ? t : `${t}#${n}`;
360
- return Be.set(r, s), s;
360
+ return De.set(r, s), s;
361
361
  }
362
- function nt(r) {
362
+ function rt(r) {
363
363
  const e = r.constructor;
364
364
  if (e)
365
365
  return e.name === "Object" ? void 0 : e.name;
366
366
  }
367
- function Se(r) {
367
+ function xe(r) {
368
368
  const e = r.toString(), n = /\/\*\*\s*@description\s*([^*]*)\*\//.exec(e), s = n ? n[1] : void 0;
369
369
  return s == null ? void 0 : s.trim();
370
370
  }
371
371
  let ce;
372
- function Zt(r) {
372
+ function Xt(r) {
373
373
  ce = r;
374
374
  }
375
+ let nt;
376
+ function Yt(r) {
377
+ nt = r;
378
+ }
375
379
  let st;
376
- function Xt(r) {
380
+ function er(r) {
377
381
  st = r;
378
382
  }
379
383
  let ot;
380
- function Yt(r) {
384
+ function tr(r) {
381
385
  ot = r;
382
386
  }
383
- let it;
384
- function er(r) {
385
- it = r;
386
- }
387
- class tr {
387
+ class rr {
388
388
  get TChange() {
389
389
  return null;
390
390
  }
@@ -395,17 +395,17 @@ class tr {
395
395
  read(e) {
396
396
  return e ? e.readObservable(this) : this.get();
397
397
  }
398
- map(e, t, n = F.ofCaller()) {
398
+ map(e, t, n = V.ofCaller()) {
399
399
  const s = t === void 0 ? void 0 : e, o = t === void 0 ? e : t;
400
400
  return ce({
401
401
  owner: s,
402
402
  debugName: () => {
403
- const i = Se(o);
403
+ const i = xe(o);
404
404
  if (i !== void 0)
405
405
  return i;
406
- const l = /^\s*\(?\s*([a-zA-Z_$][a-zA-Z_$0-9]*)\s*\)?\s*=>\s*\1(?:\??)\.([a-zA-Z_$][a-zA-Z_$0-9]*)\s*$/.exec(o.toString());
407
- if (l)
408
- return `${this.debugName}.${l[2]}`;
406
+ const c = /^\s*\(?\s*([a-zA-Z_$][a-zA-Z_$0-9]*)\s*\)?\s*=>\s*\1(?:\??)\.([a-zA-Z_$][a-zA-Z_$0-9]*)\s*$/.exec(o.toString());
407
+ if (c)
408
+ return `${this.debugName}.${c[2]}`;
409
409
  if (!s)
410
410
  return `${this.debugName} (mapped)`;
411
411
  },
@@ -423,7 +423,7 @@ class tr {
423
423
  }, (e) => this.read(e).read(e));
424
424
  }
425
425
  recomputeInitiallyAndOnChange(e, t) {
426
- return e.add(st(this, t)), this;
426
+ return e.add(nt(this, t)), this;
427
427
  }
428
428
  /**
429
429
  * Ensures that this observable is observed. This keeps the cache alive.
@@ -431,29 +431,29 @@ class tr {
431
431
  * Use `recomputeInitiallyAndOnChange` for eager evaluation.
432
432
  */
433
433
  keepObserved(e) {
434
- return e.add(ot(this)), this;
434
+ return e.add(st(this)), this;
435
435
  }
436
436
  get debugValue() {
437
437
  return this.get();
438
438
  }
439
439
  debugGetDependencyGraph() {
440
- return it(this);
440
+ return ot(this);
441
441
  }
442
442
  }
443
- class we extends tr {
443
+ class Se extends rr {
444
444
  constructor(e) {
445
445
  var t;
446
- super(), this._observers = /* @__PURE__ */ new Set(), (t = w()) == null || t.handleObservableCreated(this, e);
446
+ super(), this._observers = /* @__PURE__ */ new Set(), (t = y()) == null || t.handleObservableCreated(this, e);
447
447
  }
448
448
  addObserver(e) {
449
449
  var n;
450
450
  const t = this._observers.size;
451
- this._observers.add(e), t === 0 && this.onFirstObserverAdded(), t !== this._observers.size && ((n = w()) == null || n.handleOnListenerCountChanged(this, this._observers.size));
451
+ this._observers.add(e), t === 0 && this.onFirstObserverAdded(), t !== this._observers.size && ((n = y()) == null || n.handleOnListenerCountChanged(this, this._observers.size));
452
452
  }
453
453
  removeObserver(e) {
454
454
  var n;
455
455
  const t = this._observers.delete(e);
456
- t && this._observers.size === 0 && this.onLastObserverRemoved(), t && ((n = w()) == null || n.handleOnListenerCountChanged(this, this._observers.size));
456
+ t && this._observers.size === 0 && this.onLastObserverRemoved(), t && ((n = y()) == null || n.handleOnListenerCountChanged(this, this._observers.size));
457
457
  }
458
458
  onFirstObserverAdded() {
459
459
  }
@@ -461,27 +461,27 @@ class we extends tr {
461
461
  }
462
462
  log() {
463
463
  var t;
464
- const e = !!w();
465
- return Wt(this), e || (t = w()) == null || t.handleObservableCreated(this, F.ofCaller()), this;
464
+ const e = !!y();
465
+ return Gt(this), e || (t = y()) == null || t.handleObservableCreated(this, V.ofCaller()), this;
466
466
  }
467
467
  debugGetObservers() {
468
468
  return this._observers;
469
469
  }
470
470
  }
471
- function at(r) {
471
+ function it(r) {
472
472
  return {
473
473
  dispose: r
474
474
  };
475
475
  }
476
- class P extends Error {
476
+ class j extends Error {
477
477
  constructor(e) {
478
- super(e || "An unexpected bug occurred."), Object.setPrototypeOf(this, P.prototype);
478
+ super(e || "An unexpected bug occurred."), Object.setPrototypeOf(this, j.prototype);
479
479
  }
480
480
  }
481
- function ne(r) {
481
+ function re(r) {
482
482
  throw r;
483
483
  }
484
- function rr(r) {
484
+ function nr(r) {
485
485
  console.error("Unexpected error:", r);
486
486
  }
487
487
  const X = (r, e) => r === e;
@@ -513,7 +513,7 @@ class Y {
513
513
  this.disposables = [];
514
514
  }
515
515
  }
516
- function nr(r) {
516
+ function sr(r) {
517
517
  switch (r) {
518
518
  case 0:
519
519
  return "initial";
@@ -527,7 +527,7 @@ function nr(r) {
527
527
  return "<unknown>";
528
528
  }
529
529
  }
530
- class j extends we {
530
+ class U extends Se {
531
531
  get debugName() {
532
532
  return this._debugNameData.getDebugName(this) ?? "(anonymous)";
533
533
  }
@@ -537,7 +537,7 @@ class j extends we {
537
537
  }
538
538
  onLastObserverRemoved() {
539
539
  var e, t;
540
- this._state = 0, this._value = void 0, (e = w()) == null || e.handleDerivedCleared(this);
540
+ this._state = 0, this._value = void 0, (e = y()) == null || e.handleDerivedCleared(this);
541
541
  for (const n of this._dependencies)
542
542
  n.removeObserver(this);
543
543
  this._dependencies.clear(), this._store !== void 0 && (this._store.dispose(), this._store = void 0), this._delayedStore !== void 0 && (this._delayedStore.dispose(), this._delayedStore = void 0), (t = this._handleLastObserverRemoved) == null || t.call(this);
@@ -575,27 +575,27 @@ class j extends we {
575
575
  try {
576
576
  const d = this._changeSummary;
577
577
  this._isReaderValid = !0, this._changeTracker && (this._isInBeforeUpdate = !0, (s = (n = this._changeTracker).beforeUpdate) == null || s.call(n, this, d), this._isInBeforeUpdate = !1, this._changeSummary = (o = this._changeTracker) == null ? void 0 : o.createChangeSummary(d));
578
- const l = this._state !== 0, h = this._value;
578
+ const c = this._state !== 0, u = this._value;
579
579
  this._state = 3;
580
- const u = this._delayedStore;
581
- u !== void 0 && (this._delayedStore = void 0);
580
+ const h = this._delayedStore;
581
+ h !== void 0 && (this._delayedStore = void 0);
582
582
  try {
583
583
  this._store !== void 0 && (this._store.dispose(), this._store = void 0), this._value = this._computeFn(this, d);
584
584
  } finally {
585
585
  this._isReaderValid = !1;
586
- for (const g of this._dependenciesToBeRemoved)
587
- g.removeObserver(this);
588
- this._dependenciesToBeRemoved.clear(), u !== void 0 && u.dispose();
586
+ for (const p of this._dependenciesToBeRemoved)
587
+ p.removeObserver(this);
588
+ this._dependenciesToBeRemoved.clear(), h !== void 0 && h.dispose();
589
589
  }
590
- e = this._didReportChange || l && !this._equalityComparator(h, this._value), (i = w()) == null || i.handleObservableUpdated(this, {
591
- oldValue: h,
590
+ e = this._didReportChange || c && !this._equalityComparator(u, this._value), (i = y()) == null || i.handleObservableUpdated(this, {
591
+ oldValue: u,
592
592
  newValue: this._value,
593
593
  change: void 0,
594
594
  didChange: e,
595
- hadValue: l
595
+ hadValue: c
596
596
  });
597
597
  } catch (d) {
598
- ne(d);
598
+ re(d);
599
599
  }
600
600
  if (this._isComputing = !1, !this._didReportChange && e)
601
601
  for (const d of this._observers)
@@ -609,7 +609,7 @@ class j extends we {
609
609
  // IObserver Implementation
610
610
  beginUpdate(e) {
611
611
  if (this._isUpdating)
612
- throw new P("Cyclic deriveds are not supported yet!");
612
+ throw new j("Cyclic deriveds are not supported yet!");
613
613
  this._updateCount++, this._isUpdating = !0;
614
614
  try {
615
615
  const t = this._updateCount === 1;
@@ -646,7 +646,7 @@ class j extends we {
646
646
  handleChange(e, t) {
647
647
  var n;
648
648
  if (this._dependencies.has(e) && !this._dependenciesToBeRemoved.has(e) || this._isInBeforeUpdate) {
649
- (n = w()) == null || n.handleDerivedDependencyChanged(this, e, t);
649
+ (n = y()) == null || n.handleDerivedDependencyChanged(this, e, t);
650
650
  let s = !1;
651
651
  try {
652
652
  s = this._changeTracker ? this._changeTracker.handleChange({
@@ -655,7 +655,7 @@ class j extends we {
655
655
  didChange: (i) => i === e
656
656
  }, this._changeSummary) : !0;
657
657
  } catch (i) {
658
- ne(i);
658
+ re(i);
659
659
  }
660
660
  const o = this._state === 3;
661
661
  if (s && (this._state === 1 || o) && (this._state = 2, o))
@@ -666,7 +666,7 @@ class j extends we {
666
666
  // IReader Implementation
667
667
  _ensureReaderValid() {
668
668
  if (!this._isReaderValid)
669
- throw new P("The reader object cannot be used outside its compute function!");
669
+ throw new j("The reader object cannot be used outside its compute function!");
670
670
  }
671
671
  readObservable(e) {
672
672
  this._ensureReaderValid(), e.addObserver(this);
@@ -694,7 +694,7 @@ class j extends we {
694
694
  debugGetState() {
695
695
  return {
696
696
  state: this._state,
697
- stateStr: nr(this._state),
697
+ stateStr: sr(this._state),
698
698
  updateCount: this._updateCount,
699
699
  isComputing: this._isComputing,
700
700
  dependencies: this._dependencies,
@@ -715,18 +715,18 @@ class j extends we {
715
715
  o.handleChange(this, n);
716
716
  }
717
717
  }
718
- function V(r, e, t = F.ofCaller()) {
719
- return e !== void 0 ? new j(new E(r, void 0, e), e, void 0, void 0, X, t) : new j(new E(void 0, void 0, r), r, void 0, void 0, X, t);
718
+ function O(r, e, t = V.ofCaller()) {
719
+ return e !== void 0 ? new U(new D(r, void 0, e), e, void 0, void 0, X, t) : new U(new D(void 0, void 0, r), r, void 0, void 0, X, t);
720
720
  }
721
- function sr(r, e, t = F.ofCaller()) {
722
- return new j(new E(r.owner, r.debugName, r.debugReferenceFn), e, void 0, r.onLastObserverRemoved, r.equalsFn ?? X, t);
721
+ function or(r, e, t = V.ofCaller()) {
722
+ return new U(new D(r.owner, r.debugName, r.debugReferenceFn), e, void 0, r.onLastObserverRemoved, r.equalsFn ?? X, t);
723
723
  }
724
- Zt(sr);
725
- function or(r, e, t = F.ofCaller()) {
724
+ Xt(or);
725
+ function ir(r, e, t = V.ofCaller()) {
726
726
  let n, s;
727
727
  n = r, s = void 0;
728
728
  let o;
729
- return new j(new E(s, void 0, n), (i) => {
729
+ return new U(new D(s, void 0, n), (i) => {
730
730
  o ? o.clear() : o = new Y();
731
731
  const d = n(i);
732
732
  return d && o.add(d), d;
@@ -734,7 +734,7 @@ function or(r, e, t = F.ofCaller()) {
734
734
  o && (o.dispose(), o = void 0);
735
735
  }, X, t);
736
736
  }
737
- function ir(r) {
737
+ function ar(r) {
738
738
  switch (r) {
739
739
  case 1:
740
740
  return "dependenciesMightHaveChanged";
@@ -746,13 +746,13 @@ function ir(r) {
746
746
  return "<unknown>";
747
747
  }
748
748
  }
749
- class dt {
749
+ class at {
750
750
  get debugName() {
751
751
  return this._debugNameData.getDebugName(this) ?? "(anonymous)";
752
752
  }
753
753
  constructor(e, t, n, s) {
754
754
  var o, i;
755
- this._debugNameData = e, this._runFn = t, this._changeTracker = n, this._state = 2, this._updateCount = 0, this._disposed = !1, this._dependencies = /* @__PURE__ */ new Set(), this._dependenciesToBeRemoved = /* @__PURE__ */ new Set(), this._isRunning = !1, this._store = void 0, this._delayedStore = void 0, this._changeSummary = (o = this._changeTracker) == null ? void 0 : o.createChangeSummary(void 0), (i = w()) == null || i.handleAutorunCreated(this, s), this._run();
755
+ this._debugNameData = e, this._runFn = t, this._changeTracker = n, this._state = 2, this._updateCount = 0, this._disposed = !1, this._dependencies = /* @__PURE__ */ new Set(), this._dependenciesToBeRemoved = /* @__PURE__ */ new Set(), this._isRunning = !1, this._store = void 0, this._delayedStore = void 0, this._changeSummary = (o = this._changeTracker) == null ? void 0 : o.createChangeSummary(void 0), (i = y()) == null || i.handleAutorunCreated(this, s), this._run();
756
756
  }
757
757
  dispose() {
758
758
  var e;
@@ -760,7 +760,7 @@ class dt {
760
760
  this._disposed = !0;
761
761
  for (const t of this._dependencies)
762
762
  t.removeObserver(this);
763
- this._dependencies.clear(), this._store !== void 0 && this._store.dispose(), this._delayedStore !== void 0 && this._delayedStore.dispose(), (e = w()) == null || e.handleAutorunDisposed(this);
763
+ this._dependencies.clear(), this._store !== void 0 && this._store.dispose(), this._delayedStore !== void 0 && this._delayedStore.dispose(), (e = y()) == null || e.handleAutorunDisposed(this);
764
764
  }
765
765
  }
766
766
  _run() {
@@ -769,19 +769,19 @@ class dt {
769
769
  this._dependenciesToBeRemoved = this._dependencies, this._dependencies = e, this._state = 3;
770
770
  try {
771
771
  if (!this._disposed) {
772
- (t = w()) == null || t.handleAutorunStarted(this);
772
+ (t = y()) == null || t.handleAutorunStarted(this);
773
773
  const i = this._changeSummary, d = this._delayedStore;
774
774
  d !== void 0 && (this._delayedStore = void 0);
775
775
  try {
776
776
  this._isRunning = !0, this._changeTracker && ((s = (n = this._changeTracker).beforeUpdate) == null || s.call(n, this, i), this._changeSummary = this._changeTracker.createChangeSummary(i)), this._store !== void 0 && (this._store.dispose(), this._store = void 0), this._runFn(this, i);
777
- } catch (l) {
778
- ne(l);
777
+ } catch (c) {
778
+ re(c);
779
779
  } finally {
780
780
  this._isRunning = !1, d !== void 0 && d.dispose();
781
781
  }
782
782
  }
783
783
  } finally {
784
- this._disposed || (o = w()) == null || o.handleAutorunFinished(this);
784
+ this._disposed || (o = y()) == null || o.handleAutorunFinished(this);
785
785
  for (const i of this._dependenciesToBeRemoved)
786
786
  i.removeObserver(this);
787
787
  this._dependenciesToBeRemoved.clear();
@@ -816,7 +816,7 @@ class dt {
816
816
  handleChange(e, t) {
817
817
  var n;
818
818
  if (this._isDependency(e)) {
819
- (n = w()) == null || n.handleAutorunDependencyChanged(this, e, t);
819
+ (n = y()) == null || n.handleAutorunDependencyChanged(this, e, t);
820
820
  try {
821
821
  (this._changeTracker ? this._changeTracker.handleChange({
822
822
  changedObservable: e,
@@ -824,7 +824,7 @@ class dt {
824
824
  didChange: (o) => o === e
825
825
  }, this._changeSummary) : !0) && (this._state = 2);
826
826
  } catch (s) {
827
- ne(s);
827
+ re(s);
828
828
  }
829
829
  }
830
830
  }
@@ -834,7 +834,7 @@ class dt {
834
834
  // IReader implementation
835
835
  _ensureNoRunning() {
836
836
  if (!this._isRunning)
837
- throw new P("The reader object cannot be used outside its compute function!");
837
+ throw new j("The reader object cannot be used outside its compute function!");
838
838
  }
839
839
  readObservable(e) {
840
840
  if (this._ensureNoRunning(), this._disposed)
@@ -845,12 +845,12 @@ class dt {
845
845
  }
846
846
  get store() {
847
847
  if (this._ensureNoRunning(), this._disposed)
848
- throw new P("Cannot access store after dispose");
848
+ throw new j("Cannot access store after dispose");
849
849
  return this._store === void 0 && (this._store = new Y()), this._store;
850
850
  }
851
851
  get delayedStore() {
852
852
  if (this._ensureNoRunning(), this._disposed)
853
- throw new P("Cannot access store after dispose");
853
+ throw new j("Cannot access store after dispose");
854
854
  return this._delayedStore === void 0 && (this._delayedStore = new Y()), this._delayedStore;
855
855
  }
856
856
  debugGetState() {
@@ -859,42 +859,42 @@ class dt {
859
859
  updateCount: this._updateCount,
860
860
  dependencies: this._dependencies,
861
861
  state: this._state,
862
- stateStr: ir(this._state)
862
+ stateStr: ar(this._state)
863
863
  };
864
864
  }
865
865
  debugRerun() {
866
866
  this._isRunning ? this._state = 2 : this._run();
867
867
  }
868
868
  }
869
- function lt(r, e = F.ofCaller()) {
870
- return new dt(new E(void 0, void 0, r), r, void 0, e);
869
+ function dt(r, e = V.ofCaller()) {
870
+ return new at(new D(void 0, void 0, r), r, void 0, e);
871
871
  }
872
- function Ae(r) {
872
+ function Be(r) {
873
873
  const e = new Error("BugIndicatingErrorRecovery: " + r);
874
- rr(e), console.error("recovered from an error that indicates a bug", e);
874
+ nr(e), console.error("recovered from an error that indicates a bug", e);
875
875
  }
876
876
  function ct(r, e) {
877
- const t = new ht(r, e);
877
+ const t = new lt(r, e);
878
878
  try {
879
879
  r(t);
880
880
  } finally {
881
881
  t.finish();
882
882
  }
883
883
  }
884
- function ar(r, e, t) {
884
+ function dr(r, e, t) {
885
885
  r ? e(r) : ct(e, t);
886
886
  }
887
- class ht {
887
+ class lt {
888
888
  constructor(e, t) {
889
889
  var n;
890
- this._fn = e, this._getDebugName = t, this._updatingObservers = [], (n = w()) == null || n.handleBeginTransaction(this);
890
+ this._fn = e, this._getDebugName = t, this._updatingObservers = [], (n = y()) == null || n.handleBeginTransaction(this);
891
891
  }
892
892
  getDebugName() {
893
- return this._getDebugName ? this._getDebugName() : Se(this._fn);
893
+ return this._getDebugName ? this._getDebugName() : xe(this._fn);
894
894
  }
895
895
  updateObserver(e, t) {
896
896
  if (!this._updatingObservers) {
897
- Ae("Transaction already finished!"), ct((n) => {
897
+ Be("Transaction already finished!"), ct((n) => {
898
898
  n.updateObserver(e, t);
899
899
  });
900
900
  return;
@@ -905,30 +905,30 @@ class ht {
905
905
  var t;
906
906
  const e = this._updatingObservers;
907
907
  if (!e) {
908
- Ae("transaction.finish() has already been called!");
908
+ Be("transaction.finish() has already been called!");
909
909
  return;
910
910
  }
911
911
  for (let n = 0; n < e.length; n++) {
912
912
  const { observer: s, observable: o } = e[n];
913
913
  s.endUpdate(o);
914
914
  }
915
- this._updatingObservers = null, (t = w()) == null || t.handleEndTransaction(this);
915
+ this._updatingObservers = null, (t = y()) == null || t.handleEndTransaction(this);
916
916
  }
917
917
  debugGetUpdatingObservers() {
918
918
  return this._updatingObservers;
919
919
  }
920
920
  }
921
- function C(r, e, t = F.ofCaller()) {
921
+ function x(r, e, t = V.ofCaller()) {
922
922
  let n;
923
- return typeof r == "string" ? n = new E(void 0, r, void 0) : n = new E(r, void 0, void 0), new ut(n, e, X, t);
923
+ return typeof r == "string" ? n = new D(void 0, r, void 0) : n = new D(r, void 0, void 0), new ht(n, e, X, t);
924
924
  }
925
- class ut extends we {
925
+ class ht extends Se {
926
926
  get debugName() {
927
927
  return this._debugNameData.getDebugName(this) ?? "ObservableValue";
928
928
  }
929
929
  constructor(e, t, n, s) {
930
930
  var o;
931
- super(s), this._debugNameData = e, this._equalityComparator = n, this._value = t, (o = w()) == null || o.handleObservableUpdated(this, { hadValue: !1, newValue: t, change: void 0, didChange: !0, oldValue: void 0 });
931
+ super(s), this._debugNameData = e, this._equalityComparator = n, this._value = t, (o = y()) == null || o.handleObservableUpdated(this, { hadValue: !1, newValue: t, change: void 0, didChange: !0, oldValue: void 0 });
932
932
  }
933
933
  get() {
934
934
  return this._value;
@@ -938,11 +938,11 @@ class ut extends we {
938
938
  if (n === void 0 && this._equalityComparator(this._value, e))
939
939
  return;
940
940
  let s;
941
- t || (t = s = new ht(() => {
941
+ t || (t = s = new lt(() => {
942
942
  }, () => `Setting ${this.debugName}`));
943
943
  try {
944
944
  const i = this._value;
945
- this._setValue(e), (o = w()) == null || o.handleObservableUpdated(this, { oldValue: i, newValue: e, change: n, didChange: !0, hadValue: !0 });
945
+ this._setValue(e), (o = y()) == null || o.handleObservableUpdated(this, { oldValue: i, newValue: e, change: n, didChange: !0, hadValue: !0 });
946
946
  for (const d of this._observers)
947
947
  t.updateObserver(d, this), d.handleChange(this, n);
948
948
  } finally {
@@ -964,25 +964,25 @@ class ut extends we {
964
964
  this._value = e;
965
965
  }
966
966
  }
967
- function $e(...r) {
967
+ function Ae(...r) {
968
968
  let e, t, n, s;
969
- return r.length === 2 ? [t, n] = r : [e, t, n, s] = r, new H(new E(e, void 0, n), t, n, () => H.globalTransaction, X, s ?? F.ofCaller());
969
+ return r.length === 2 ? [t, n] = r : [e, t, n, s] = r, new H(new D(e, void 0, n), t, n, () => H.globalTransaction, X, s ?? V.ofCaller());
970
970
  }
971
- class H extends we {
971
+ class H extends Se {
972
972
  constructor(e, t, n, s, o, i) {
973
973
  super(i), this._debugNameData = e, this.event = t, this._getValue = n, this._getTransaction = s, this._equalityComparator = o, this._hasValue = !1, this.handleEvent = (d) => {
974
- var b;
975
- const l = this._getValue(d), h = this._value, u = !this._hasValue || !this._equalityComparator(h, l);
976
- let g = !1;
977
- u && (this._value = l, this._hasValue && (g = !0, ar(this._getTransaction(), (p) => {
978
- var _;
979
- (_ = w()) == null || _.handleObservableUpdated(this, { oldValue: h, newValue: l, change: void 0, didChange: u, hadValue: this._hasValue });
980
- for (const x of this._observers)
981
- p.updateObserver(x, this), x.handleChange(this, void 0);
974
+ var m;
975
+ const c = this._getValue(d), u = this._value, h = !this._hasValue || !this._equalityComparator(u, c);
976
+ let p = !1;
977
+ h && (this._value = c, this._hasValue && (p = !0, dr(this._getTransaction(), (b) => {
978
+ var S;
979
+ (S = y()) == null || S.handleObservableUpdated(this, { oldValue: u, newValue: c, change: void 0, didChange: h, hadValue: this._hasValue });
980
+ for (const C of this._observers)
981
+ b.updateObserver(C, this), C.handleChange(this, void 0);
982
982
  }, () => {
983
- const p = this.getDebugName();
984
- return "Event fired" + (p ? `: ${p}` : "");
985
- })), this._hasValue = !0), g || (b = w()) == null || b.handleObservableUpdated(this, { oldValue: h, newValue: l, change: void 0, didChange: u, hadValue: this._hasValue });
983
+ const b = this.getDebugName();
984
+ return "Event fired" + (b ? `: ${b}` : "");
985
+ })), this._hasValue = !0), p || (m = y()) == null || m.handleObservableUpdated(this, { oldValue: u, newValue: c, change: void 0, didChange: h, hadValue: this._hasValue });
986
986
  };
987
987
  }
988
988
  getDebugName() {
@@ -1020,28 +1020,28 @@ class H extends we {
1020
1020
  }
1021
1021
  }
1022
1022
  r.batchEventsGlobally = e;
1023
- })($e || ($e = {}));
1024
- function dr(r) {
1025
- const e = new pt(!1, void 0);
1026
- return r.addObserver(e), at(() => {
1023
+ })(Ae || (Ae = {}));
1024
+ function cr(r) {
1025
+ const e = new ut(!1, void 0);
1026
+ return r.addObserver(e), it(() => {
1027
1027
  r.removeObserver(e);
1028
1028
  });
1029
1029
  }
1030
- Yt(dr);
1030
+ er(cr);
1031
1031
  function lr(r, e) {
1032
- const t = new pt(!0, e);
1032
+ const t = new ut(!0, e);
1033
1033
  r.addObserver(t);
1034
1034
  try {
1035
1035
  t.beginUpdate(r);
1036
1036
  } finally {
1037
1037
  t.endUpdate(r);
1038
1038
  }
1039
- return at(() => {
1039
+ return it(() => {
1040
1040
  r.removeObserver(t);
1041
1041
  });
1042
1042
  }
1043
- Xt(lr);
1044
- class pt {
1043
+ Yt(lr);
1044
+ class ut {
1045
1045
  constructor(e, t) {
1046
1046
  this._forceRecompute = e, this._handleValue = t, this._counter = 0;
1047
1047
  }
@@ -1056,11 +1056,11 @@ class pt {
1056
1056
  handleChange(e, t) {
1057
1057
  }
1058
1058
  }
1059
- let te;
1060
- function cr(r) {
1061
- te || (te = new hr(), jt(te)), te.addFilteredObj(r);
1059
+ let ee;
1060
+ function hr(r) {
1061
+ ee || (ee = new ur(), Pt(ee)), ee.addFilteredObj(r);
1062
1062
  }
1063
- class hr {
1063
+ class ur {
1064
1064
  constructor() {
1065
1065
  this.indentation = 0, this.changedObservablesSets = /* @__PURE__ */ new WeakMap();
1066
1066
  }
@@ -1072,32 +1072,32 @@ class hr {
1072
1072
  return ((t = this._filteredObjects) == null ? void 0 : t.has(e)) ?? !0;
1073
1073
  }
1074
1074
  textToConsoleArgs(e) {
1075
- return ur([
1076
- U(mr("| ", this.indentation)),
1075
+ return pr([
1076
+ P(vr("| ", this.indentation)),
1077
1077
  e
1078
1078
  ]);
1079
1079
  }
1080
1080
  formatInfo(e) {
1081
1081
  return e.hadValue ? e.didChange ? [
1082
- U(" "),
1083
- I(Z(e.oldValue, 70), {
1082
+ P(" "),
1083
+ T(Z(e.oldValue, 70), {
1084
1084
  color: "red",
1085
1085
  strikeThrough: !0
1086
1086
  }),
1087
- U(" "),
1088
- I(Z(e.newValue, 60), {
1087
+ P(" "),
1088
+ T(Z(e.newValue, 60), {
1089
1089
  color: "green"
1090
1090
  })
1091
- ] : [U(" (unchanged)")] : [
1092
- U(" "),
1093
- I(Z(e.newValue, 60), {
1091
+ ] : [P(" (unchanged)")] : [
1092
+ P(" "),
1093
+ T(Z(e.newValue, 60), {
1094
1094
  color: "green"
1095
1095
  }),
1096
- U(" (initial)")
1096
+ P(" (initial)")
1097
1097
  ];
1098
1098
  }
1099
1099
  handleObservableCreated(e) {
1100
- if (e instanceof j) {
1100
+ if (e instanceof U) {
1101
1101
  const t = e;
1102
1102
  this.changedObservablesSets.set(t, /* @__PURE__ */ new Set());
1103
1103
  }
@@ -1106,20 +1106,20 @@ class hr {
1106
1106
  }
1107
1107
  handleObservableUpdated(e, t) {
1108
1108
  if (this._isIncluded(e)) {
1109
- if (e instanceof j) {
1109
+ if (e instanceof U) {
1110
1110
  this._handleDerivedRecomputed(e, t);
1111
1111
  return;
1112
1112
  }
1113
1113
  console.log(...this.textToConsoleArgs([
1114
1114
  W("observable value changed"),
1115
- I(e.debugName, { color: "BlueViolet" }),
1115
+ T(e.debugName, { color: "BlueViolet" }),
1116
1116
  ...this.formatInfo(t)
1117
1117
  ]));
1118
1118
  }
1119
1119
  }
1120
1120
  formatChanges(e) {
1121
1121
  if (e.size !== 0)
1122
- return I(" (changed deps: " + [...e].map((t) => t.debugName).join(", ") + ")", { color: "gray" });
1122
+ return T(" (changed deps: " + [...e].map((t) => t.debugName).join(", ") + ")", { color: "gray" });
1123
1123
  }
1124
1124
  handleDerivedDependencyChanged(e, t, n) {
1125
1125
  var s;
@@ -1131,7 +1131,7 @@ class hr {
1131
1131
  const n = this.changedObservablesSets.get(e);
1132
1132
  n && (console.log(...this.textToConsoleArgs([
1133
1133
  W("derived recomputed"),
1134
- I(e.debugName, { color: "BlueViolet" }),
1134
+ T(e.debugName, { color: "BlueViolet" }),
1135
1135
  ...this.formatInfo(t),
1136
1136
  this.formatChanges(n),
1137
1137
  { data: [{ fn: e._debugNameData.referenceFn ?? e._computeFn }] }
@@ -1140,13 +1140,13 @@ class hr {
1140
1140
  handleDerivedCleared(e) {
1141
1141
  this._isIncluded(e) && console.log(...this.textToConsoleArgs([
1142
1142
  W("derived cleared"),
1143
- I(e.debugName, { color: "BlueViolet" })
1143
+ T(e.debugName, { color: "BlueViolet" })
1144
1144
  ]));
1145
1145
  }
1146
1146
  handleFromEventObservableTriggered(e, t) {
1147
1147
  this._isIncluded(e) && console.log(...this.textToConsoleArgs([
1148
1148
  W("observable from event triggered"),
1149
- I(e.debugName, { color: "BlueViolet" }),
1149
+ T(e.debugName, { color: "BlueViolet" }),
1150
1150
  ...this.formatInfo(t),
1151
1151
  { data: [{ fn: e._getValue }] }
1152
1152
  ]));
@@ -1163,7 +1163,7 @@ class hr {
1163
1163
  const t = this.changedObservablesSets.get(e);
1164
1164
  t && (this._isIncluded(e) && console.log(...this.textToConsoleArgs([
1165
1165
  W("autorun"),
1166
- I(e.debugName, { color: "BlueViolet" }),
1166
+ T(e.debugName, { color: "BlueViolet" }),
1167
1167
  this.formatChanges(t),
1168
1168
  { data: [{ fn: e._debugNameData.referenceFn ?? e._runFn }] }
1169
1169
  ])), t.clear(), this.indentation++);
@@ -1175,7 +1175,7 @@ class hr {
1175
1175
  let t = e.getDebugName();
1176
1176
  t === void 0 && (t = ""), this._isIncluded(e) && console.log(...this.textToConsoleArgs([
1177
1177
  W("transaction"),
1178
- I(t, { color: "BlueViolet" }),
1178
+ T(t, { color: "BlueViolet" }),
1179
1179
  { data: [{ fn: e._fn }] }
1180
1180
  ])), this.indentation++;
1181
1181
  }
@@ -1183,7 +1183,7 @@ class hr {
1183
1183
  this.indentation--;
1184
1184
  }
1185
1185
  }
1186
- function ur(r) {
1186
+ function pr(r) {
1187
1187
  const e = new Array(), t = [];
1188
1188
  let n = "";
1189
1189
  function s(i) {
@@ -1196,13 +1196,13 @@ function ur(r) {
1196
1196
  const o = [n, ...e];
1197
1197
  return o.push(...t), o;
1198
1198
  }
1199
- function U(r) {
1200
- return I(r, { color: "black" });
1199
+ function P(r) {
1200
+ return T(r, { color: "black" });
1201
1201
  }
1202
1202
  function W(r) {
1203
- return I(vr(`${r}: `, 10), { color: "black", bold: !0 });
1203
+ return T(br(`${r}: `, 10), { color: "black", bold: !0 });
1204
1204
  }
1205
- function I(r, e = {
1205
+ function T(r, e = {
1206
1206
  color: "black"
1207
1207
  }) {
1208
1208
  function t(s) {
@@ -1218,12 +1218,12 @@ function I(r, e = {
1218
1218
  }
1219
1219
  function Z(r, e) {
1220
1220
  try {
1221
- return pr(r, e);
1221
+ return fr(r, e);
1222
1222
  } catch {
1223
1223
  return "[[???]]";
1224
1224
  }
1225
1225
  }
1226
- function pr(r, e) {
1226
+ function fr(r, e) {
1227
1227
  switch (typeof r) {
1228
1228
  case "number":
1229
1229
  return "" + r;
@@ -1234,7 +1234,7 @@ function pr(r, e) {
1234
1234
  case "undefined":
1235
1235
  return "undefined";
1236
1236
  case "object":
1237
- return r === null ? "null" : Array.isArray(r) ? fr(r, e) : gr(r, e);
1237
+ return r === null ? "null" : Array.isArray(r) ? gr(r, e) : mr(r, e);
1238
1238
  case "symbol":
1239
1239
  return r.toString();
1240
1240
  case "function":
@@ -1243,7 +1243,7 @@ function pr(r, e) {
1243
1243
  return "" + r;
1244
1244
  }
1245
1245
  }
1246
- function fr(r, e) {
1246
+ function gr(r, e) {
1247
1247
  let t = "[ ", n = !0;
1248
1248
  for (const s of r) {
1249
1249
  if (n || (t += ", "), t.length - 5 > e) {
@@ -1254,7 +1254,7 @@ function fr(r, e) {
1254
1254
  }
1255
1255
  return t += " ]", t;
1256
1256
  }
1257
- function gr(r, e) {
1257
+ function mr(r, e) {
1258
1258
  try {
1259
1259
  if (typeof r.toString == "function" && r.toString !== Object.prototype.toString) {
1260
1260
  const i = r.toString();
@@ -1263,7 +1263,7 @@ function gr(r, e) {
1263
1263
  } catch {
1264
1264
  return "[[Object]]";
1265
1265
  }
1266
- const t = nt(r);
1266
+ const t = rt(r);
1267
1267
  let n = t ? t + "(" : "{ ", s = !0, o;
1268
1268
  try {
1269
1269
  o = Object.entries(r);
@@ -1279,22 +1279,22 @@ function gr(r, e) {
1279
1279
  }
1280
1280
  return n += t ? ")" : " }", n;
1281
1281
  }
1282
- function mr(r, e) {
1282
+ function vr(r, e) {
1283
1283
  let t = "";
1284
1284
  for (let n = 1; n <= e; n++)
1285
1285
  t += r;
1286
1286
  return t;
1287
1287
  }
1288
- function vr(r, e) {
1288
+ function br(r, e) {
1289
1289
  for (; r.length < e; )
1290
1290
  r += " ";
1291
1291
  return r;
1292
1292
  }
1293
- function br(r, e) {
1294
- const t = (e == null ? void 0 : e.debugNamePostProcessor) ?? ((o) => o), n = N.from(r, t);
1295
- return n ? ft(n, 0, /* @__PURE__ */ new Set()).trim() : "";
1293
+ function _r(r, e) {
1294
+ const t = (e == null ? void 0 : e.debugNamePostProcessor) ?? ((o) => o), n = I.from(r, t);
1295
+ return n ? pt(n, 0, /* @__PURE__ */ new Set()).trim() : "";
1296
1296
  }
1297
- function ft(r, e, t) {
1297
+ function pt(r, e, t) {
1298
1298
  const n = " ".repeat(e), s = [];
1299
1299
  if (t.has(r.sourceObj))
1300
1300
  return s.push(`${n}* ${r.type} ${r.name} (already listed)`), s.join(`
@@ -1302,43 +1302,43 @@ function ft(r, e, t) {
1302
1302
  if (t.add(r.sourceObj), s.push(`${n}* ${r.type} ${r.name}:`), s.push(`${n} value: ${Z(r.value, 50)}`), s.push(`${n} state: ${r.state}`), r.dependencies.length > 0) {
1303
1303
  s.push(`${n} dependencies:`);
1304
1304
  for (const i of r.dependencies)
1305
- s.push(ft(i, e + 1, t));
1305
+ s.push(pt(i, e + 1, t));
1306
1306
  }
1307
1307
  return s.join(`
1308
1308
  `);
1309
1309
  }
1310
- class N {
1310
+ class I {
1311
1311
  static from(e, t) {
1312
- if (e instanceof dt) {
1312
+ if (e instanceof at) {
1313
1313
  const n = e.debugGetState();
1314
- return new N(e, t(e.debugName), "autorun", void 0, n.stateStr, Array.from(n.dependencies).map((s) => N.from(s, t) || N.unknown(s)));
1315
- } else if (e instanceof j) {
1314
+ return new I(e, t(e.debugName), "autorun", void 0, n.stateStr, Array.from(n.dependencies).map((s) => I.from(s, t) || I.unknown(s)));
1315
+ } else if (e instanceof U) {
1316
1316
  const n = e.debugGetState();
1317
- return new N(e, t(e.debugName), "derived", n.value, n.stateStr, Array.from(n.dependencies).map((s) => N.from(s, t) || N.unknown(s)));
1318
- } else if (e instanceof ut) {
1317
+ return new I(e, t(e.debugName), "derived", n.value, n.stateStr, Array.from(n.dependencies).map((s) => I.from(s, t) || I.unknown(s)));
1318
+ } else if (e instanceof ht) {
1319
1319
  const n = e.debugGetState();
1320
- return new N(e, t(e.debugName), "observableValue", n.value, "upToDate", []);
1320
+ return new I(e, t(e.debugName), "observableValue", n.value, "upToDate", []);
1321
1321
  } else if (e instanceof H) {
1322
1322
  const n = e.debugGetState();
1323
- return new N(e, t(e.debugName), "fromEvent", n.value, n.hasValue ? "upToDate" : "initial", []);
1323
+ return new I(e, t(e.debugName), "fromEvent", n.value, n.hasValue ? "upToDate" : "initial", []);
1324
1324
  }
1325
1325
  }
1326
1326
  static unknown(e) {
1327
- return new N(e, "(unknown)", "unknown", void 0, "unknown", []);
1327
+ return new I(e, "(unknown)", "unknown", void 0, "unknown", []);
1328
1328
  }
1329
1329
  constructor(e, t, n, s, o, i) {
1330
1330
  this.sourceObj = e, this.name = t, this.type = n, this.value = s, this.state = o, this.dependencies = i;
1331
1331
  }
1332
1332
  }
1333
- er(br);
1334
- Ut(cr);
1335
- class _r {
1333
+ tr(_r);
1334
+ Wt(hr);
1335
+ class yr {
1336
1336
  constructor() {
1337
- c(this, "_fixtures", C(this, /* @__PURE__ */ new Map()));
1337
+ l(this, "_fixtures", x(this, /* @__PURE__ */ new Map()));
1338
1338
  /** Observable root of the fixture tree */
1339
- c(this, "root", V(this, (e) => {
1339
+ l(this, "root", O(this, (e) => {
1340
1340
  const t = this._fixtures.read(e);
1341
- return ae(t);
1341
+ return ie(t);
1342
1342
  }));
1343
1343
  }
1344
1344
  /**
@@ -1369,25 +1369,73 @@ class _r {
1369
1369
  */
1370
1370
  getNode(e, t) {
1371
1371
  const n = this.root.read(e);
1372
- return Me(n, t);
1372
+ return Ve(n, t);
1373
1373
  }
1374
1374
  /**
1375
1375
  * Gets a component by path (non-reactive, for use in preview iframe).
1376
1376
  * @param path Array of path segments (e.g., ['Button', 'Primary'])
1377
1377
  */
1378
1378
  getComponentByPath(e) {
1379
- const t = this._fixtures.get(), n = ae(t), s = Me(n, e);
1379
+ const t = this._fixtures.get(), n = ie(t), s = Ve(n, e);
1380
1380
  return s == null ? void 0 : s.component;
1381
1381
  }
1382
1382
  }
1383
- class rs {
1383
+ class ft {
1384
1384
  constructor(e, t) {
1385
- c(this, "sessionId", Math.random().toString(36).slice(2));
1386
- c(this, "_updateVersion", 0);
1387
- c(this, "_root");
1388
- c(this, "_fixtureModules");
1389
- c(this, "_currentDisposable");
1390
- c(this, "_currentContainer");
1385
+ l(this, "renderTarget");
1386
+ l(this, "shadowRoot");
1387
+ l(this, "_abortController", new AbortController());
1388
+ l(this, "_rawResult");
1389
+ l(this, "_resolvedResult");
1390
+ if (this.component = t, t.isolation === "shadow-dom") {
1391
+ let s;
1392
+ if (e.shadowRoot) {
1393
+ for (s = e.shadowRoot; s.firstChild; )
1394
+ s.removeChild(s.firstChild);
1395
+ s.adoptedStyleSheets = [];
1396
+ } else
1397
+ s = e.attachShadow({ mode: "open" });
1398
+ if (t.styles)
1399
+ for (const o of t.styles)
1400
+ if (o.type === "css") {
1401
+ const i = document.createElement("style");
1402
+ i.textContent = o.content, s.appendChild(i);
1403
+ } else if (o.type === "url") {
1404
+ const i = document.createElement("link");
1405
+ i.rel = "stylesheet", i.href = o.href, s.appendChild(i);
1406
+ } else o.type === "adopted" && (s.adoptedStyleSheets = [
1407
+ ...s.adoptedStyleSheets,
1408
+ o.sheet
1409
+ ]);
1410
+ this.renderTarget = document.createElement("div"), s.appendChild(this.renderTarget), this.shadowRoot = s;
1411
+ } else
1412
+ this.renderTarget = document.createElement("div"), e.appendChild(this.renderTarget), this.shadowRoot = null;
1413
+ const n = Lt(t.properties);
1414
+ this._rawResult = t.render(this.renderTarget, {
1415
+ props: n,
1416
+ signal: this._abortController.signal
1417
+ }), this._rawResult instanceof Promise ? this._rawResult.then((s) => {
1418
+ var o;
1419
+ this._abortController.signal.aborted ? (o = s == null ? void 0 : s.dispose) == null || o.call(s) : this._resolvedResult = s ?? void 0;
1420
+ }).catch(() => {
1421
+ }) : this._resolvedResult = this._rawResult ?? void 0;
1422
+ }
1423
+ get result() {
1424
+ return this._rawResult;
1425
+ }
1426
+ dispose() {
1427
+ var e, t;
1428
+ this._abortController.abort(), (t = (e = this._resolvedResult) == null ? void 0 : e.dispose) == null || t.call(e), this._resolvedResult = void 0;
1429
+ }
1430
+ }
1431
+ class ns {
1432
+ constructor(e, t) {
1433
+ l(this, "sessionId", Math.random().toString(36).slice(2));
1434
+ l(this, "_updateVersion", 0);
1435
+ l(this, "_root");
1436
+ l(this, "_fixtureModules");
1437
+ l(this, "_currentRendering");
1438
+ l(this, "_currentContainer");
1391
1439
  this._containerElement = e, this._fixtureModules = t, this._root = this._buildRegistry(), this._installGlobalApi();
1392
1440
  const n = this._flattenFixtures(this._root).length;
1393
1441
  console.log("[cli] CLI entry initialized, sessionId:", this.sessionId, "version:", this._updateVersion, "fixtures:", n);
@@ -1407,58 +1455,48 @@ class rs {
1407
1455
  return this._flattenFixtures(this._root);
1408
1456
  }
1409
1457
  async renderFixture(e) {
1410
- var b;
1411
1458
  const t = this._findFixtureNode(this._root, e);
1412
1459
  if (!t || !t.component)
1413
1460
  throw new Error("Fixture not found: " + e);
1414
- (b = this._currentDisposable) != null && b.dispose && this._currentDisposable.dispose(), this._currentDisposable = void 0, this._currentContainer && (this._currentContainer.remove(), this._currentContainer = void 0);
1461
+ this._currentRendering && (this._currentRendering.dispose(), this._currentRendering = void 0), this._currentContainer && (this._currentContainer.remove(), this._currentContainer = void 0);
1415
1462
  const n = document.createElement("div");
1416
1463
  n.style.display = "inline-block", this._containerElement.appendChild(n), this._currentContainer = n;
1417
- const s = t.component, o = zt(s.properties);
1418
- let i = n;
1419
- if (s.isolation === "shadow-dom") {
1420
- const p = n.attachShadow({ mode: "open" });
1421
- i = document.createElement("div"), p.appendChild(i);
1422
- }
1423
- const d = [], l = console.error, h = console.warn;
1424
- console.error = (...p) => {
1425
- d.push({ kind: "console", level: "error", message: p.map(String).join(" ") }), l.apply(console, p);
1426
- }, console.warn = (...p) => {
1427
- d.push({ kind: "console", level: "warn", message: p.map(String).join(" ") }), h.apply(console, p);
1464
+ const s = t.component, o = [], i = console.error, d = console.warn;
1465
+ console.error = (...h) => {
1466
+ o.push({ kind: "console", level: "error", message: h.map(String).join(" ") }), i.apply(console, h);
1467
+ }, console.warn = (...h) => {
1468
+ o.push({ kind: "console", level: "warn", message: h.map(String).join(" ") }), d.apply(console, h);
1428
1469
  };
1429
- const u = (p) => {
1430
- var _;
1431
- d.push({ kind: "exception", message: p.message, stack: (_ = p.error) == null ? void 0 : _.stack });
1432
- }, g = (p) => {
1433
- const _ = p.reason, x = _ instanceof Error ? _.message : String(_), y = _ instanceof Error ? _.stack : void 0;
1434
- d.push({ kind: "exception", message: x, stack: y });
1470
+ const c = (h) => {
1471
+ var p;
1472
+ o.push({ kind: "exception", message: h.message, stack: (p = h.error) == null ? void 0 : p.stack });
1473
+ }, u = (h) => {
1474
+ const p = h.reason, m = p instanceof Error ? p.message : String(p), b = p instanceof Error ? p.stack : void 0;
1475
+ o.push({ kind: "exception", message: m, stack: b });
1435
1476
  };
1436
- window.addEventListener("error", u), window.addEventListener("unhandledrejection", g);
1477
+ window.addEventListener("error", c), window.addEventListener("unhandledrejection", u);
1437
1478
  try {
1438
- const p = new AbortController(), _ = 3e3;
1439
- let x = s.render(i, {
1440
- props: o,
1441
- signal: p.signal
1442
- });
1443
- if (x instanceof Promise) {
1444
- const y = new Promise((S) => setTimeout(() => S("timeout"), _)), T = await Promise.race([x.then((S) => ({ resolved: S })), y]);
1445
- T === "timeout" ? (p.abort(), d.push({ kind: "exception", message: `Fixture render() timed out after ${_}ms` }), x.then((S) => {
1446
- var ee;
1447
- return (ee = S == null ? void 0 : S.dispose) == null ? void 0 : ee.call(S);
1448
- }).catch(() => {
1449
- }), x = void 0) : x = T.resolved;
1450
- }
1451
- if (this._currentDisposable = x ?? void 0, x != null && x.ready) {
1452
- const y = new Promise((S) => setTimeout(() => S("timeout"), _));
1453
- await Promise.race([x.ready.then(() => "done"), y]) === "timeout" && (p.abort(), d.push({ kind: "exception", message: `Fixture ready promise timed out after ${_}ms` }));
1479
+ const h = new ft(n, s);
1480
+ this._currentRendering = h;
1481
+ const p = 3e3;
1482
+ let m;
1483
+ const b = h.result;
1484
+ if (b instanceof Promise) {
1485
+ const S = new Promise((_) => setTimeout(() => _("timeout"), p)), C = await Promise.race([b.then((_) => ({ resolved: _ })), S]);
1486
+ C === "timeout" ? (h.dispose(), o.push({ kind: "exception", message: `Fixture render() timed out after ${p}ms` })) : m = C.resolved ?? void 0;
1487
+ } else
1488
+ m = b ?? void 0;
1489
+ if (m != null && m.ready) {
1490
+ const S = new Promise((_) => setTimeout(() => _("timeout"), p));
1491
+ await Promise.race([m.ready.then(() => "done"), S]) === "timeout" && (h.dispose(), o.push({ kind: "exception", message: `Fixture ready promise timed out after ${p}ms` }));
1454
1492
  }
1455
- } catch (p) {
1456
- const _ = p instanceof Error ? p : new Error(String(p));
1457
- d.push({ kind: "exception", message: _.message, stack: _.stack });
1493
+ } catch (h) {
1494
+ const p = h instanceof Error ? h : new Error(String(h));
1495
+ o.push({ kind: "exception", message: p.message, stack: p.stack });
1458
1496
  } finally {
1459
- console.error = l, console.warn = h;
1497
+ console.error = i, console.warn = d;
1460
1498
  }
1461
- return await new Promise((p) => requestAnimationFrame(() => requestAnimationFrame(() => p()))), window.removeEventListener("error", u), window.removeEventListener("unhandledrejection", g), { errors: d };
1499
+ return await new Promise((h) => requestAnimationFrame(() => requestAnimationFrame(() => h()))), window.removeEventListener("error", c), window.removeEventListener("unhandledrejection", u), { errors: o };
1462
1500
  }
1463
1501
  _buildRegistry() {
1464
1502
  const e = /* @__PURE__ */ new Map();
@@ -1466,15 +1504,15 @@ class rs {
1466
1504
  const s = n.default;
1467
1505
  s && typeof s == "object" && e.set(t, s);
1468
1506
  }
1469
- return ae(e);
1507
+ return ie(e);
1470
1508
  }
1471
1509
  _flattenFixtures(e, t = [], n = []) {
1472
1510
  var i;
1473
1511
  const s = n.length > 0 && e.labels.length > 0 ? [.../* @__PURE__ */ new Set([...n, ...e.labels])] : e.labels.length > 0 ? [...e.labels] : [...n], o = [];
1474
1512
  e.type === "component" && o.push({ fixtureId: e.id, fixtureName: e.name, groupPath: t, background: ((i = e.component) == null ? void 0 : i.background) ?? "light", labels: s });
1475
1513
  for (const d of e.children ?? []) {
1476
- const l = e.id ? [...t, e.name] : t;
1477
- o.push(...this._flattenFixtures(d, l, s));
1514
+ const c = e.id ? [...t, e.name] : t;
1515
+ o.push(...this._flattenFixtures(d, c, s));
1478
1516
  }
1479
1517
  return o;
1480
1518
  }
@@ -1498,7 +1536,7 @@ class rs {
1498
1536
  });
1499
1537
  }
1500
1538
  }
1501
- class yr {
1539
+ class xr {
1502
1540
  constructor(e) {
1503
1541
  this._run = e, this._changes = [], this._map = /* @__PURE__ */ new Map(), this._updateCounter = 0;
1504
1542
  }
@@ -1525,48 +1563,48 @@ class yr {
1525
1563
  }
1526
1564
  }
1527
1565
  function f() {
1566
+ return le.instance;
1567
+ }
1568
+ function Sr() {
1528
1569
  return he.instance;
1529
1570
  }
1530
- function xr() {
1571
+ function wr() {
1531
1572
  return ue.instance;
1532
1573
  }
1533
- function Sr() {
1534
- return pe.instance;
1535
- }
1536
- f.const = xr;
1537
- f.obs = Sr;
1538
- class he {
1574
+ f.const = Sr;
1575
+ f.obs = wr;
1576
+ class le {
1539
1577
  create(e) {
1540
- const t = V((n) => e(n));
1578
+ const t = O((n) => e(n));
1541
1579
  return { read: (n) => t };
1542
1580
  }
1543
1581
  }
1544
- he.instance = new he();
1545
- class ue {
1582
+ le.instance = new le();
1583
+ class he {
1546
1584
  create(e) {
1547
- const t = V((n) => e(n));
1585
+ const t = O((n) => e(n));
1548
1586
  return { read: (n) => t.read(n) };
1549
1587
  }
1550
1588
  }
1551
- ue.instance = new ue();
1552
- class pe {
1589
+ he.instance = new he();
1590
+ class ue {
1553
1591
  create(e) {
1554
- const t = V((n) => {
1592
+ const t = O((n) => {
1555
1593
  const s = e(n);
1556
- return wr(s) ? s.read(n) : s;
1594
+ return Cr(s) ? s.read(n) : s;
1557
1595
  });
1558
1596
  return { read: (n) => t };
1559
1597
  }
1560
1598
  }
1561
- pe.instance = new pe();
1562
- function wr(r) {
1599
+ ue.instance = new ue();
1600
+ function Cr(r) {
1563
1601
  return typeof r == "object" && r !== null && "read" in r;
1564
1602
  }
1565
1603
  function J(r, e) {
1566
1604
  return Object.fromEntries(Object.entries(r).map(([t, n]) => [t, e(n, t)]));
1567
1605
  }
1568
- const oe = Symbol("ViewModelContext");
1569
- class Cr {
1606
+ const se = Symbol("ViewModelContext");
1607
+ class Rr {
1570
1608
  constructor(e) {
1571
1609
  this._store = new Y(), this.props = e;
1572
1610
  }
@@ -1574,35 +1612,35 @@ class Cr {
1574
1612
  this._store.dispose();
1575
1613
  }
1576
1614
  }
1577
- function Rr(r) {
1578
- return r[oe] || (r[oe] = et(void 0)), r[oe];
1615
+ function Tr(r) {
1616
+ return r[se] || (r[se] = Ye(void 0)), r[se];
1579
1617
  }
1580
1618
  function B(r = {}) {
1581
1619
  var e;
1582
- return e = class extends Cr {
1620
+ return e = class extends Rr {
1583
1621
  }, e._props = r, e;
1584
1622
  }
1585
- let fe = 0;
1586
- const Tr = new yr((r) => {
1623
+ let pe = 0;
1624
+ const kr = new xr((r) => {
1587
1625
  for (const e of r)
1588
1626
  e.rendered = !1;
1589
- if (fe > 0) {
1627
+ if (pe > 0) {
1590
1628
  const e = r.find((t) => t.isRendering);
1591
1629
  e.itemsToRender = r;
1592
1630
  } else
1593
- tt(() => {
1631
+ et(() => {
1594
1632
  for (const e of r)
1595
1633
  e.rendered || e.forceUpdate();
1596
1634
  });
1597
1635
  });
1598
- let kr = 0;
1599
- class Ir {
1636
+ let Ir = 0;
1637
+ class Or {
1600
1638
  constructor(e, t) {
1601
1639
  this.debugName = e, this.renderFactory = t, this._obsProps = void 0, this.forceUpdate = void 0, this._render = void 0, this._disposable = void 0, this.contextValues = /* @__PURE__ */ new Map(), this.cleanupEffect = () => () => {
1602
1640
  var n;
1603
1641
  (n = this._disposable) == null || n.dispose();
1604
1642
  }, this.itemsToRender = [], this.handleAfterRender = () => {
1605
- tt(() => {
1643
+ et(() => {
1606
1644
  for (const n of this.itemsToRender)
1607
1645
  n.rendered || n.forceUpdate();
1608
1646
  }), this.itemsToRender = [];
@@ -1612,30 +1650,30 @@ class Ir {
1612
1650
  return this.debugName;
1613
1651
  }
1614
1652
  updateProps(e) {
1615
- this._obsProps ? this._obsProps.set(e, void 0) : (this._obsProps = C(this, e), this._render = this.renderFactory(this._obsProps, () => this.contextValues), this.rendering = V(this, this._render), this._disposable = Tr.addDependency(this.rendering, this));
1653
+ this._obsProps ? this._obsProps.set(e, void 0) : (this._obsProps = x(this, e), this._render = this.renderFactory(this._obsProps, () => this.contextValues), this.rendering = O(this, this._render), this._disposable = kr.addDependency(this.rendering, this));
1616
1654
  }
1617
1655
  }
1618
- function Ce(r, e, t) {
1619
- const n = (i) => i + 1, s = () => new Ir(r + ++kr, e), o = function(i) {
1620
- const d = Ft(n, 0)[1], l = Dt(s)[0];
1621
- for (const h of t ?? [])
1622
- l.contextValues.set(h, Et(h));
1623
- if (Oe(l.cleanupEffect, []), Oe(l.handleAfterRender), l.isRendering)
1656
+ function we(r, e, t) {
1657
+ const n = (i) => i + 1, s = () => new Or(r + ++Ir, e), o = function(i) {
1658
+ const d = Et(n, 0)[1], c = Dt(s)[0];
1659
+ for (const u of t ?? [])
1660
+ c.contextValues.set(u, Bt(u));
1661
+ if (Ie(c.cleanupEffect, []), Ie(c.handleAfterRender), c.isRendering)
1624
1662
  throw new Error("Component is already rendering");
1625
- l.isRendering = !0, fe++;
1663
+ c.isRendering = !0, pe++;
1626
1664
  try {
1627
- l.forceUpdate = d, l.updateProps(i);
1628
- const h = l.rendering.get();
1629
- return l.rendered = !0, h;
1665
+ c.forceUpdate = d, c.updateProps(i);
1666
+ const u = c.rendering.get();
1667
+ return c.rendered = !0, u;
1630
1668
  } finally {
1631
- l.isRendering = !1, fe--;
1669
+ c.isRendering = !1, pe--;
1632
1670
  }
1633
1671
  };
1634
1672
  return o.displayName = r, o;
1635
1673
  }
1636
- Ce("ObsView", (r) => (e) => r.read(e).children(e));
1637
- function O(r, e) {
1638
- return Ce("view", (t) => {
1674
+ we("ObsView", (r) => (e) => r.read(e).children(e));
1675
+ function k(r, e) {
1676
+ return we("view", (t) => {
1639
1677
  const n = J(r, (s, o) => s.create((i) => t.read(i)[o], void 0));
1640
1678
  return (s) => {
1641
1679
  const o = J(n, (i) => i.read(s));
@@ -1643,7 +1681,7 @@ function O(r, e) {
1643
1681
  };
1644
1682
  });
1645
1683
  }
1646
- function Or(r) {
1684
+ function Nr(r) {
1647
1685
  const e = [];
1648
1686
  for (const t of Object.values(r)) {
1649
1687
  const n = t._requiredContext;
@@ -1652,21 +1690,21 @@ function Or(r) {
1652
1690
  return e;
1653
1691
  }
1654
1692
  function A(r, e, t) {
1655
- const n = typeof e == "function" ? {} : e, s = typeof e == "function" ? e : t, o = "_props" in r ? r._props : {}, i = Or({ ...o, ...n }), d = Rr(r), l = [...i, d];
1656
- return Ce("viewWithModel", (h, u) => {
1657
- const g = u(), b = g.get(d), p = "_props" in r ? J(r._props, (y, T) => y.create((S) => h.read(S)[T], g.get(y._requiredContext))) : {}, _ = b ? { read: () => b, dispose: () => {
1658
- } } : or((y) => {
1659
- const T = J(p, (S) => S.read(y));
1660
- return new r(T);
1661
- }), x = J(n, (y, T) => y.create((S) => h.read(S)[T], g.get(y._requiredContext)));
1662
- return (y) => {
1663
- const T = _.read(y), S = J(x, (ee) => ee.read(y));
1664
- return s(y, T, S);
1693
+ const n = typeof e == "function" ? {} : e, s = typeof e == "function" ? e : t, o = "_props" in r ? r._props : {}, i = Nr({ ...o, ...n }), d = Tr(r), c = [...i, d];
1694
+ return we("viewWithModel", (u, h) => {
1695
+ const p = h(), m = p.get(d), b = "_props" in r ? J(r._props, (_, M) => _.create((F) => u.read(F)[M], p.get(_._requiredContext))) : {}, S = m ? { read: () => m, dispose: () => {
1696
+ } } : ir((_) => {
1697
+ const M = J(b, (F) => F.read(_));
1698
+ return new r(M);
1699
+ }), C = J(n, (_, M) => _.create((F) => u.read(F)[M], p.get(_._requiredContext)));
1700
+ return (_) => {
1701
+ const M = S.read(_), F = J(C, (Nt) => Nt.read(_));
1702
+ return s(_, M, F);
1665
1703
  };
1666
- }, l.length > 0 ? l : void 0);
1704
+ }, c.length > 0 ? c : void 0);
1667
1705
  }
1668
- O({ value: f.obs() }, (r, e) => e.value.read(r));
1669
- et(null);
1706
+ k({ value: f.obs() }, (r, e) => e.value.read(r));
1707
+ Ye(null);
1670
1708
  function gt(r) {
1671
1709
  var e;
1672
1710
  return {
@@ -1678,19 +1716,19 @@ function gt(r) {
1678
1716
  labels: r.labels
1679
1717
  };
1680
1718
  }
1681
- function Nr(r, e) {
1719
+ function Vr(r, e) {
1682
1720
  if (r.name.toLowerCase().includes(e)) return !0;
1683
1721
  for (const t of r.labels)
1684
1722
  if (t.toLowerCase().includes(e)) return !0;
1685
1723
  return !1;
1686
1724
  }
1687
- function Vr(r, e) {
1725
+ function Mr(r, e) {
1688
1726
  if (!e) return r;
1689
1727
  const t = e.toLowerCase();
1690
1728
  return mt(r, t);
1691
1729
  }
1692
1730
  function mt(r, e) {
1693
- const t = Nr(r, e);
1731
+ const t = Vr(r, e);
1694
1732
  if (!r.children || r.children.length === 0)
1695
1733
  return t ? r : void 0;
1696
1734
  if (t) return r;
@@ -1705,7 +1743,7 @@ function mt(r, e) {
1705
1743
  children: n
1706
1744
  };
1707
1745
  }
1708
- function re(r, e) {
1746
+ function te(r, e) {
1709
1747
  const {
1710
1748
  storageKey: t,
1711
1749
  defaultValue: n,
@@ -1714,108 +1752,108 @@ function re(r, e) {
1714
1752
  } = e;
1715
1753
  let i = n;
1716
1754
  try {
1717
- const h = localStorage.getItem(t);
1718
- h !== null && (i = o(h));
1755
+ const u = localStorage.getItem(t);
1756
+ u !== null && (i = o(u));
1719
1757
  } catch {
1720
1758
  }
1721
- const d = C(r, i), l = d.set.bind(d);
1722
- return d.set = (h, u) => {
1759
+ const d = x(r, i), c = d.set.bind(d);
1760
+ return d.set = (u, h) => {
1723
1761
  try {
1724
- localStorage.setItem(t, s(h));
1762
+ localStorage.setItem(t, s(u));
1725
1763
  } catch {
1726
1764
  }
1727
- l(h, u);
1765
+ c(u, h);
1728
1766
  }, d;
1729
1767
  }
1730
- function ze(r, e) {
1731
- const n = new URLSearchParams(location.search).get(e) || void 0, s = C(r, n);
1768
+ function $e(r, e) {
1769
+ const n = new URLSearchParams(location.search).get(e) || void 0, s = x(r, n);
1732
1770
  window.addEventListener("popstate", () => {
1733
1771
  const i = new URLSearchParams(location.search);
1734
1772
  s.set(i.get(e) || void 0, void 0);
1735
1773
  });
1736
1774
  const o = s.set.bind(s);
1737
1775
  return s.set = (i, d) => {
1738
- const l = new URLSearchParams(location.search);
1739
- i ? l.set(e, i) : l.delete(e);
1740
- const h = l.toString(), u = location.pathname + (h ? "?" + h : "") + location.hash;
1741
- history.replaceState(history.state, "", u), o(i, d);
1776
+ const c = new URLSearchParams(location.search);
1777
+ i ? c.set(e, i) : c.delete(e);
1778
+ const u = c.toString(), h = location.pathname + (u ? "?" + u : "") + location.hash;
1779
+ history.replaceState(history.state, "", h), o(i, d);
1742
1780
  }, s;
1743
1781
  }
1744
1782
  function vt(r, e) {
1745
1783
  const t = new URLSearchParams(location.search);
1746
1784
  return t.set(r, e), location.pathname + "?" + t.toString();
1747
1785
  }
1748
- class Mr extends B({
1786
+ class Fr extends B({
1749
1787
  registry: f.const(),
1750
1788
  daemonModel: f.const(),
1751
1789
  reportModel: f.const()
1752
1790
  }) {
1753
1791
  constructor() {
1754
1792
  super(...arguments);
1755
- c(this, "leftSidebarVisible", re(this, {
1793
+ l(this, "leftSidebarVisible", te(this, {
1756
1794
  storageKey: "component-explorer:leftSidebarVisible",
1757
1795
  defaultValue: !0
1758
1796
  }));
1759
- c(this, "rightSidebarVisible", re(this, {
1797
+ l(this, "rightSidebarVisible", te(this, {
1760
1798
  storageKey: "component-explorer:rightSidebarVisible",
1761
1799
  defaultValue: !1
1762
1800
  }));
1763
- c(this, "isDarkTheme", re(this, {
1801
+ l(this, "isDarkTheme", te(this, {
1764
1802
  storageKey: "component-explorer:isDarkTheme",
1765
1803
  defaultValue: !0
1766
1804
  }));
1767
- c(this, "selectedNodeId", ze(this, "component"));
1768
- c(this, "expandedNodeIds", C(this, this._initialExpandedNodes()));
1769
- c(this, "viewMode", re(this, {
1805
+ l(this, "selectedNodeId", $e(this, "component"));
1806
+ l(this, "expandedNodeIds", x(this, this._initialExpandedNodes()));
1807
+ l(this, "viewMode", te(this, {
1770
1808
  storageKey: "component-explorer:viewMode",
1771
1809
  defaultValue: "session"
1772
1810
  }));
1773
- c(this, "searchQuery", ze(this, "search"));
1811
+ l(this, "searchQuery", $e(this, "search"));
1774
1812
  /** The explorer's tree derived from the registry or report */
1775
- c(this, "tree", V(this, (t) => {
1813
+ l(this, "tree", O(this, (t) => {
1776
1814
  const n = this.props.reportModel;
1777
1815
  if (n)
1778
1816
  return n.buildTree(t);
1779
1817
  const s = this.props.registry.root.read(t);
1780
1818
  return gt(s);
1781
1819
  }));
1782
- c(this, "filteredTree", V(this, (t) => {
1820
+ l(this, "filteredTree", O(this, (t) => {
1783
1821
  const n = this.tree.read(t), s = this.searchQuery.read(t);
1784
- return Vr(n, s) ?? { ...n, children: [] };
1822
+ return Mr(n, s) ?? { ...n, children: [] };
1785
1823
  }));
1786
- c(this, "selectedNode", V(this, (t) => {
1824
+ l(this, "selectedNode", O(this, (t) => {
1787
1825
  const n = this.selectedNodeId.read(t);
1788
1826
  if (n === void 0) return;
1789
1827
  const s = this.filteredTree.read(t);
1790
1828
  return s.id === n ? s : this._findNode(s.children ?? [], n);
1791
1829
  }));
1792
1830
  /** List of preview rows to render based on current selection and view mode */
1793
- c(this, "selectedFixtures", V(this, (t) => {
1831
+ l(this, "selectedFixtures", O(this, (t) => {
1794
1832
  const n = this.selectedNode.read(t);
1795
1833
  return n ? this.isReportMode ? (this.props.reportModel.state.read(t), this._collectReportRows(n, n.name)) : this.viewMode.read(t) === "diff" && this.daemonAvailable && this.daemon.sessions.read(t).length > 1 ? this._collectDiffRows(n, n.name) : this._collectPreviewRows(n, n.name) : [];
1796
1834
  }));
1797
- c(this, "setViewMode", (t) => {
1835
+ l(this, "setViewMode", (t) => {
1798
1836
  this.viewMode.set(t, void 0);
1799
1837
  });
1800
- c(this, "navigateToSession", (t) => {
1838
+ l(this, "navigateToSession", (t) => {
1801
1839
  const n = this.props.daemonModel;
1802
1840
  if (!n) return;
1803
1841
  const s = n.getSessionExplorerUrl(t);
1804
1842
  s && (window.location.href = s);
1805
1843
  });
1806
- c(this, "toggleLeftSidebar", () => {
1844
+ l(this, "toggleLeftSidebar", () => {
1807
1845
  this.leftSidebarVisible.set(!this.leftSidebarVisible.get(), void 0);
1808
1846
  });
1809
- c(this, "toggleRightSidebar", () => {
1847
+ l(this, "toggleRightSidebar", () => {
1810
1848
  this.rightSidebarVisible.set(!this.rightSidebarVisible.get(), void 0);
1811
1849
  });
1812
- c(this, "toggleTheme", () => {
1850
+ l(this, "toggleTheme", () => {
1813
1851
  this.isDarkTheme.set(!this.isDarkTheme.get(), void 0);
1814
1852
  });
1815
- c(this, "selectNode", (t) => {
1853
+ l(this, "selectNode", (t) => {
1816
1854
  this.selectedNodeId.set(t, void 0);
1817
1855
  });
1818
- c(this, "toggleNodeExpanded", (t) => {
1856
+ l(this, "toggleNodeExpanded", (t) => {
1819
1857
  const n = this.expandedNodeIds.get(), s = new Set(n);
1820
1858
  s.has(t) ? s.delete(t) : s.add(t), this.expandedNodeIds.set(s, void 0);
1821
1859
  });
@@ -1948,8 +1986,8 @@ class Mr extends B({
1948
1986
  }
1949
1987
  const i = [];
1950
1988
  for (const d of t.children ?? []) {
1951
- const l = n ? `${n} / ${d.name}` : d.name;
1952
- i.push(...this._collectReportRows(d, l));
1989
+ const c = n ? `${n} / ${d.name}` : d.name;
1990
+ i.push(...this._collectReportRows(d, c));
1953
1991
  }
1954
1992
  return i;
1955
1993
  }
@@ -2143,16 +2181,16 @@ const v = {
2143
2181
  cursor: "pointer"
2144
2182
  }
2145
2183
  };
2146
- function Re(...r) {
2184
+ function Ce(...r) {
2147
2185
  return Object.assign({}, ...r.filter(Boolean));
2148
2186
  }
2149
- class Fr extends B({
2187
+ class Er extends B({
2150
2188
  active: f()
2151
2189
  }) {
2152
2190
  constructor() {
2153
2191
  super(...arguments);
2154
- c(this, "isHovered", C(this, !1));
2155
- c(this, "setHovered", (t) => {
2192
+ l(this, "isHovered", x(this, !1));
2193
+ l(this, "setHovered", (t) => {
2156
2194
  this.isHovered.set(t, void 0);
2157
2195
  });
2158
2196
  }
@@ -2160,15 +2198,15 @@ class Fr extends B({
2160
2198
  return this.props.active;
2161
2199
  }
2162
2200
  }
2163
- const ie = A(
2164
- Fr,
2201
+ const oe = A(
2202
+ Er,
2165
2203
  {
2166
2204
  onClick: f.const(),
2167
2205
  title: f.const(),
2168
2206
  children: f.const()
2169
2207
  },
2170
2208
  (r, e, t) => {
2171
- const n = e.isHovered.read(r), s = e.active.read(r), o = Re(
2209
+ const n = e.isHovered.read(r), s = e.active.read(r), o = Ce(
2172
2210
  v.titleBarButton,
2173
2211
  n && !s && v.titleBarButtonHover,
2174
2212
  s && v.titleBarButtonActive
@@ -2185,33 +2223,33 @@ const ie = A(
2185
2223
  }
2186
2224
  );
2187
2225
  }
2188
- ), Dr = ({ style: r }) => /* @__PURE__ */ a("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "currentColor", style: r, children: /* @__PURE__ */ a("path", { d: "M5.7 13.7L5 13l4.6-4.6L5 3.7l.7-.7 5.3 5.4-5.3 5.3z" }) }), Er = ({ style: r }) => /* @__PURE__ */ a("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "currentColor", style: r, children: /* @__PURE__ */ a("path", { d: "M11 5.5L6 10.5L5.3 9.8L9.6 5.5L5.3 1.2L6 0.5L11 5.5z", transform: "rotate(90 8 5.5)" }) }), Br = ({ style: r }) => /* @__PURE__ */ a("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "currentColor", style: r, children: /* @__PURE__ */ a("path", { d: "M14.5 2H9l-.35.15-.65.64-.65-.64L7 2H1.5l-.5.5v10l.5.5H7l.35-.15.65-.64.65.64.35.15h5.5l.5-.5v-10l-.5-.5zm-7 10H2V3h5v.86L5.85 5l1.15 1.14V10l-1.15-1.14L7 7.72V12zm6 0H8V7.72l1.15 1.14L8 10V6.14L9.15 5 8 3.86V3h5v9z" }) }), Ar = ({ style: r }) => /* @__PURE__ */ a("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "currentColor", style: r, children: /* @__PURE__ */ a("path", { d: "M14.5 3H7.71l-.85-.85L6.5 2h-5l-.5.5v11l.5.5h13l.5-.5v-10l-.5-.5zm-.5 10H2V6h12v7zm0-8H2V3h4.29l.85.85.36.15H14v1z" }) }), $r = () => /* @__PURE__ */ a("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "currentColor", children: /* @__PURE__ */ a("path", { d: "M2 2v12h12V2H2zm11 11H6V3h7v10zM3 3h2v10H3V3z" }) }), zr = () => /* @__PURE__ */ a("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "currentColor", children: /* @__PURE__ */ a("path", { d: "M2 2v12h12V2H2zm6 11V3h5v10H8zM3 3h4v10H3V3z" }) }), Lr = () => /* @__PURE__ */ a("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "currentColor", children: /* @__PURE__ */ a("path", { d: "M8 11a3 3 0 1 1 0-6 3 3 0 0 1 0 6zm0 1a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM8 0a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 0zm0 13a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 13zm8-5a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2a.5.5 0 0 1 .5.5zM3 8a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2A.5.5 0 0 1 3 8zm10.657-5.657a.5.5 0 0 1 0 .707l-1.414 1.415a.5.5 0 1 1-.707-.708l1.414-1.414a.5.5 0 0 1 .707 0zm-9.193 9.193a.5.5 0 0 1 0 .707L3.05 13.657a.5.5 0 0 1-.707-.707l1.414-1.414a.5.5 0 0 1 .707 0zm9.193 2.121a.5.5 0 0 1-.707 0l-1.414-1.414a.5.5 0 0 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .707zM4.464 4.465a.5.5 0 0 1-.707 0L2.343 3.05a.5.5 0 1 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .708z" }) }), Hr = () => /* @__PURE__ */ a("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "currentColor", children: /* @__PURE__ */ a("path", { d: "M6 .278a.768.768 0 0 1 .08.858 7.208 7.208 0 0 0-.878 3.46c0 4.021 3.278 7.277 7.318 7.277.527 0 1.04-.055 1.533-.16a.787.787 0 0 1 .81.316.733.733 0 0 1-.031.893A8.349 8.349 0 0 1 8.344 16C3.734 16 0 12.286 0 7.71 0 4.266 2.114 1.312 5.124.06A.752.752 0 0 1 6 .278z" }) }), Pr = O(
2226
+ ), Dr = ({ style: r }) => /* @__PURE__ */ a("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "currentColor", style: r, children: /* @__PURE__ */ a("path", { d: "M5.7 13.7L5 13l4.6-4.6L5 3.7l.7-.7 5.3 5.4-5.3 5.3z" }) }), Br = ({ style: r }) => /* @__PURE__ */ a("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "currentColor", style: r, children: /* @__PURE__ */ a("path", { d: "M11 5.5L6 10.5L5.3 9.8L9.6 5.5L5.3 1.2L6 0.5L11 5.5z", transform: "rotate(90 8 5.5)" }) }), Ar = ({ style: r }) => /* @__PURE__ */ a("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "currentColor", style: r, children: /* @__PURE__ */ a("path", { d: "M14.5 2H9l-.35.15-.65.64-.65-.64L7 2H1.5l-.5.5v10l.5.5H7l.35-.15.65-.64.65.64.35.15h5.5l.5-.5v-10l-.5-.5zm-7 10H2V3h5v.86L5.85 5l1.15 1.14V10l-1.15-1.14L7 7.72V12zm6 0H8V7.72l1.15 1.14L8 10V6.14L9.15 5 8 3.86V3h5v9z" }) }), $r = ({ style: r }) => /* @__PURE__ */ a("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "currentColor", style: r, children: /* @__PURE__ */ a("path", { d: "M14.5 3H7.71l-.85-.85L6.5 2h-5l-.5.5v11l.5.5h13l.5-.5v-10l-.5-.5zm-.5 10H2V6h12v7zm0-8H2V3h4.29l.85.85.36.15H14v1z" }) }), zr = () => /* @__PURE__ */ a("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "currentColor", children: /* @__PURE__ */ a("path", { d: "M2 2v12h12V2H2zm11 11H6V3h7v10zM3 3h2v10H3V3z" }) }), Lr = () => /* @__PURE__ */ a("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "currentColor", children: /* @__PURE__ */ a("path", { d: "M2 2v12h12V2H2zm6 11V3h5v10H8zM3 3h4v10H3V3z" }) }), Hr = () => /* @__PURE__ */ a("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "currentColor", children: /* @__PURE__ */ a("path", { d: "M8 11a3 3 0 1 1 0-6 3 3 0 0 1 0 6zm0 1a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM8 0a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 0zm0 13a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 13zm8-5a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2a.5.5 0 0 1 .5.5zM3 8a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2A.5.5 0 0 1 3 8zm10.657-5.657a.5.5 0 0 1 0 .707l-1.414 1.415a.5.5 0 1 1-.707-.708l1.414-1.414a.5.5 0 0 1 .707 0zm-9.193 9.193a.5.5 0 0 1 0 .707L3.05 13.657a.5.5 0 0 1-.707-.707l1.414-1.414a.5.5 0 0 1 .707 0zm9.193 2.121a.5.5 0 0 1-.707 0l-1.414-1.414a.5.5 0 0 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .707zM4.464 4.465a.5.5 0 0 1-.707 0L2.343 3.05a.5.5 0 1 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .708z" }) }), jr = () => /* @__PURE__ */ a("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "currentColor", children: /* @__PURE__ */ a("path", { d: "M6 .278a.768.768 0 0 1 .08.858 7.208 7.208 0 0 0-.878 3.46c0 4.021 3.278 7.277 7.318 7.277.527 0 1.04-.055 1.533-.16a.787.787 0 0 1 .81.316.733.733 0 0 1-.031.893A8.349 8.349 0 0 1 8.344 16C3.734 16 0 12.286 0 7.71 0 4.266 2.114 1.312 5.124.06A.752.752 0 0 1 6 .278z" }) }), Ur = k(
2189
2227
  { model: f.const() },
2190
2228
  (r, e) => {
2191
- var d, l;
2192
- const t = e.model, n = t.viewMode.read(r), s = ((d = t.daemon) == null ? void 0 : d.sessions.read(r)) ?? [], o = (l = t.daemon) == null ? void 0 : l.sessionName, i = s.filter((h) => h.name !== o);
2193
- return s.length <= 1 ? null : /* @__PURE__ */ m("div", { style: Q.container, children: [
2194
- /* @__PURE__ */ m("div", { style: Q.segmentedControl, children: [
2195
- /* @__PURE__ */ a(Le, { label: "Live", mode: "session", active: n === "session", onClick: () => t.setViewMode("session") }),
2196
- /* @__PURE__ */ a(Le, { label: "Diff", mode: "diff", active: n === "diff", onClick: () => t.setViewMode("diff") })
2229
+ var d, c;
2230
+ const t = e.model, n = t.viewMode.read(r), s = ((d = t.daemon) == null ? void 0 : d.sessions.read(r)) ?? [], o = (c = t.daemon) == null ? void 0 : c.sessionName, i = s.filter((u) => u.name !== o);
2231
+ return s.length <= 1 ? null : /* @__PURE__ */ g("div", { style: Q.container, children: [
2232
+ /* @__PURE__ */ g("div", { style: Q.segmentedControl, children: [
2233
+ /* @__PURE__ */ a(ze, { label: "Live", mode: "session", active: n === "session", onClick: () => t.setViewMode("session") }),
2234
+ /* @__PURE__ */ a(ze, { label: "Diff", mode: "diff", active: n === "diff", onClick: () => t.setViewMode("diff") })
2197
2235
  ] }),
2198
- i.length > 0 && /* @__PURE__ */ a("div", { style: Q.sessionLinks, children: i.map((h) => /* @__PURE__ */ m(
2236
+ i.length > 0 && /* @__PURE__ */ a("div", { style: Q.sessionLinks, children: i.map((u) => /* @__PURE__ */ g(
2199
2237
  "button",
2200
2238
  {
2201
2239
  style: Q.sessionLink,
2202
- onClick: () => t.navigateToSession(h.name),
2203
- title: `Switch to ${h.name} session`,
2240
+ onClick: () => t.navigateToSession(u.name),
2241
+ title: `Switch to ${u.name} session`,
2204
2242
  children: [
2205
2243
  "→ ",
2206
- h.name
2244
+ u.name
2207
2245
  ]
2208
2246
  },
2209
- h.name
2247
+ u.name
2210
2248
  )) })
2211
2249
  ] });
2212
2250
  }
2213
2251
  );
2214
- function Le({ label: r, mode: e, active: t, onClick: n }) {
2252
+ function ze({ label: r, mode: e, active: t, onClick: n }) {
2215
2253
  return /* @__PURE__ */ a(
2216
2254
  "button",
2217
2255
  {
@@ -2221,47 +2259,47 @@ function Le({ label: r, mode: e, active: t, onClick: n }) {
2221
2259
  }
2222
2260
  );
2223
2261
  }
2224
- const jr = O(
2262
+ const Pr = k(
2225
2263
  {
2226
2264
  model: f.const()
2227
2265
  },
2228
2266
  (r, e) => {
2229
2267
  const t = e.model, n = t.leftSidebarVisible.read(r), s = t.rightSidebarVisible.read(r), o = t.isDarkTheme.read(r), i = t.selectedNode.read(r);
2230
- return /* @__PURE__ */ m("div", { style: v.titleBar, children: [
2268
+ return /* @__PURE__ */ g("div", { style: v.titleBar, children: [
2231
2269
  /* @__PURE__ */ a("div", { style: v.titleBarSection, children: /* @__PURE__ */ a(
2232
- ie,
2270
+ oe,
2233
2271
  {
2234
2272
  active: n,
2235
2273
  onClick: t.toggleLeftSidebar,
2236
2274
  title: "Toggle left sidebar",
2237
- children: /* @__PURE__ */ a($r, {})
2275
+ children: /* @__PURE__ */ a(zr, {})
2238
2276
  }
2239
2277
  ) }),
2240
- /* @__PURE__ */ m("div", { style: v.titleBarCenter, children: [
2241
- t.isReportMode ? /* @__PURE__ */ a("span", { style: { fontSize: 12, color: "var(--vscode-descriptionForeground)" }, children: "Screenshot Report" }) : t.daemonAvailable ? /* @__PURE__ */ a(Pr, { model: t }) : null,
2242
- i ? /* @__PURE__ */ m(ve, { children: [
2278
+ /* @__PURE__ */ g("div", { style: v.titleBarCenter, children: [
2279
+ t.isReportMode ? /* @__PURE__ */ a("span", { style: { fontSize: 12, color: "var(--vscode-descriptionForeground)" }, children: "Screenshot Report" }) : t.daemonAvailable ? /* @__PURE__ */ a(Ur, { model: t }) : null,
2280
+ i ? /* @__PURE__ */ g(me, { children: [
2243
2281
  /* @__PURE__ */ a("span", { style: { color: "var(--vscode-textLink-foreground)" }, children: "<" }),
2244
2282
  /* @__PURE__ */ a("span", { children: i.name }),
2245
2283
  /* @__PURE__ */ a("span", { style: { color: "var(--vscode-textLink-foreground)" }, children: "/>" })
2246
2284
  ] }) : /* @__PURE__ */ a("span", { style: { color: "var(--vscode-descriptionForeground)" }, children: "No component selected" })
2247
2285
  ] }),
2248
- /* @__PURE__ */ m("div", { style: v.titleBarSection, children: [
2286
+ /* @__PURE__ */ g("div", { style: v.titleBarSection, children: [
2249
2287
  /* @__PURE__ */ a(
2250
- ie,
2288
+ oe,
2251
2289
  {
2252
2290
  active: !1,
2253
2291
  onClick: t.toggleTheme,
2254
2292
  title: o ? "Switch to light theme" : "Switch to dark theme",
2255
- children: o ? /* @__PURE__ */ a(Lr, {}) : /* @__PURE__ */ a(Hr, {})
2293
+ children: o ? /* @__PURE__ */ a(Hr, {}) : /* @__PURE__ */ a(jr, {})
2256
2294
  }
2257
2295
  ),
2258
2296
  /* @__PURE__ */ a(
2259
- ie,
2297
+ oe,
2260
2298
  {
2261
2299
  active: s,
2262
2300
  onClick: t.toggleRightSidebar,
2263
2301
  title: "Toggle right sidebar",
2264
- children: /* @__PURE__ */ a(zr, {})
2302
+ children: /* @__PURE__ */ a(Lr, {})
2265
2303
  }
2266
2304
  )
2267
2305
  ] })
@@ -2311,14 +2349,14 @@ const jr = O(
2311
2349
  color: "var(--vscode-textLink-foreground)",
2312
2350
  cursor: "pointer"
2313
2351
  }
2314
- }, Ur = {
2352
+ }, Wr = {
2315
2353
  display: "flex",
2316
2354
  gap: "3px",
2317
2355
  marginLeft: "6px",
2318
2356
  overflow: "hidden",
2319
2357
  flexShrink: 1,
2320
2358
  minWidth: 0
2321
- }, Wr = {
2359
+ }, Gr = {
2322
2360
  fontSize: "10px",
2323
2361
  lineHeight: "14px",
2324
2362
  padding: "0 4px",
@@ -2330,32 +2368,32 @@ const jr = O(
2330
2368
  textOverflow: "ellipsis",
2331
2369
  maxWidth: "60px",
2332
2370
  cursor: "pointer"
2333
- }, bt = O(
2371
+ }, bt = k(
2334
2372
  {
2335
2373
  model: f.const(),
2336
2374
  nodes: f.const(),
2337
2375
  depth: f.const()
2338
2376
  },
2339
- (r, e) => /* @__PURE__ */ a(ve, { children: e.nodes.map((t) => /* @__PURE__ */ a(qr, { model: e.model, node: t, depth: e.depth }, t.id)) })
2377
+ (r, e) => /* @__PURE__ */ a(me, { children: e.nodes.map((t) => /* @__PURE__ */ a(Kr, { model: e.model, node: t, depth: e.depth }, t.id)) })
2340
2378
  );
2341
- class Gr extends B({
2379
+ class qr extends B({
2342
2380
  model: f.const(),
2343
2381
  node: f.const(),
2344
2382
  depth: f.const()
2345
2383
  }) {
2346
2384
  constructor() {
2347
2385
  super(...arguments);
2348
- c(this, "isHovered", C(this, !1));
2349
- c(this, "setHovered", (t) => {
2386
+ l(this, "isHovered", x(this, !1));
2387
+ l(this, "setHovered", (t) => {
2350
2388
  this.isHovered.set(t, void 0);
2351
2389
  });
2352
- c(this, "handleClick", () => {
2390
+ l(this, "handleClick", () => {
2353
2391
  this.props.model.selectNode(this.props.node.id);
2354
2392
  });
2355
- c(this, "handleDoubleClick", () => {
2393
+ l(this, "handleDoubleClick", () => {
2356
2394
  this._hasChildren && this.props.model.toggleNodeExpanded(this.props.node.id);
2357
2395
  });
2358
- c(this, "handleChevronClick", (t) => {
2396
+ l(this, "handleChevronClick", (t) => {
2359
2397
  t.stopPropagation(), this.props.model.toggleNodeExpanded(this.props.node.id);
2360
2398
  });
2361
2399
  }
@@ -2373,37 +2411,37 @@ class Gr extends B({
2373
2411
  return !!(this.props.node.children && this.props.node.children.length > 0);
2374
2412
  }
2375
2413
  }
2376
- const qr = A(Gr, {}, (r, e) => {
2377
- const t = e.explorerModel, n = e.treeNode, s = e.treeDepth, o = !!(n.children && n.children.length > 0), i = o ? t.isNodeExpanded(n.id, r) : !1, l = t.selectedNodeId.read(r) === n.id, h = e.isHovered.read(r), u = Re(
2414
+ const Kr = A(qr, {}, (r, e) => {
2415
+ const t = e.explorerModel, n = e.treeNode, s = e.treeDepth, o = !!(n.children && n.children.length > 0), i = o ? t.isNodeExpanded(n.id, r) : !1, c = t.selectedNodeId.read(r) === n.id, u = e.isHovered.read(r), h = Ce(
2378
2416
  v.treeItem,
2379
2417
  { paddingLeft: `${8 + s * 12}px` },
2380
- l && v.treeItemSelected,
2381
- !l && h && v.treeItemHover
2418
+ c && v.treeItemSelected,
2419
+ !c && u && v.treeItemHover
2382
2420
  );
2383
- return /* @__PURE__ */ m(ve, { children: [
2384
- /* @__PURE__ */ m(
2421
+ return /* @__PURE__ */ g(me, { children: [
2422
+ /* @__PURE__ */ g(
2385
2423
  "div",
2386
2424
  {
2387
- style: u,
2425
+ style: h,
2388
2426
  onClick: e.handleClick,
2389
2427
  onDoubleClick: e.handleDoubleClick,
2390
2428
  onMouseEnter: () => e.setHovered(!0),
2391
2429
  onMouseLeave: () => e.setHovered(!1),
2392
2430
  children: [
2393
- o ? /* @__PURE__ */ a("div", { style: v.treeItemChevron, onClick: e.handleChevronClick, children: i ? /* @__PURE__ */ a(Er, {}) : /* @__PURE__ */ a(Dr, {}) }) : /* @__PURE__ */ a("div", { style: v.treeItemChevronPlaceholder }),
2394
- /* @__PURE__ */ a("div", { style: v.treeItemIcon, children: n.type === "folder" ? /* @__PURE__ */ a(Ar, { style: { color: "var(--vscode-symbolIcon-folderForeground)" } }) : /* @__PURE__ */ a(Br, { style: { color: "#deb45b" } }) }),
2431
+ o ? /* @__PURE__ */ a("div", { style: v.treeItemChevron, onClick: e.handleChevronClick, children: i ? /* @__PURE__ */ a(Br, {}) : /* @__PURE__ */ a(Dr, {}) }) : /* @__PURE__ */ a("div", { style: v.treeItemChevronPlaceholder }),
2432
+ /* @__PURE__ */ a("div", { style: v.treeItemIcon, children: n.type === "folder" ? /* @__PURE__ */ a($r, { style: { color: "var(--vscode-symbolIcon-folderForeground)" } }) : /* @__PURE__ */ a(Ar, { style: { color: "#deb45b" } }) }),
2395
2433
  /* @__PURE__ */ a("span", { style: v.treeItemLabel, children: n.name }),
2396
- n.labels.some((g) => !g.startsWith(".")) && /* @__PURE__ */ a("span", { style: Ur, children: n.labels.filter((g) => !g.startsWith(".")).map((g) => /* @__PURE__ */ a(
2434
+ n.labels.some((p) => !p.startsWith(".")) && /* @__PURE__ */ a("span", { style: Wr, children: n.labels.filter((p) => !p.startsWith(".")).map((p) => /* @__PURE__ */ a(
2397
2435
  "span",
2398
2436
  {
2399
- style: Wr,
2400
- onClick: (b) => {
2401
- b.stopPropagation(), t.searchQuery.set(g, void 0);
2437
+ style: Gr,
2438
+ onClick: (m) => {
2439
+ m.stopPropagation(), t.searchQuery.set(p, void 0);
2402
2440
  },
2403
- title: g,
2404
- children: g
2441
+ title: p,
2442
+ children: p
2405
2443
  },
2406
- g
2444
+ p
2407
2445
  )) }),
2408
2446
  o && /* @__PURE__ */ a("span", { style: v.treeItemCount, children: n.children.length })
2409
2447
  ]
@@ -2411,10 +2449,10 @@ const qr = A(Gr, {}, (r, e) => {
2411
2449
  ),
2412
2450
  o && i && /* @__PURE__ */ a(bt, { model: t, nodes: n.children, depth: s + 1 })
2413
2451
  ] });
2414
- }), Kr = {
2452
+ }), Jr = {
2415
2453
  padding: "4px 8px",
2416
2454
  borderBottom: "1px solid var(--vscode-panel-border)"
2417
- }, Jr = {
2455
+ }, Qr = {
2418
2456
  width: "100%",
2419
2457
  height: "24px",
2420
2458
  padding: "0 22px 0 6px",
@@ -2425,9 +2463,9 @@ const qr = A(Gr, {}, (r, e) => {
2425
2463
  borderRadius: "2px",
2426
2464
  outline: "none",
2427
2465
  boxSizing: "border-box"
2428
- }, Qr = {
2429
- position: "relative"
2430
2466
  }, Zr = {
2467
+ position: "relative"
2468
+ }, Xr = {
2431
2469
  position: "absolute",
2432
2470
  right: "2px",
2433
2471
  top: "50%",
@@ -2444,19 +2482,19 @@ const qr = A(Gr, {}, (r, e) => {
2444
2482
  borderRadius: "2px",
2445
2483
  fontSize: "14px",
2446
2484
  opacity: 0.7
2447
- }, Xr = O(
2485
+ }, Yr = k(
2448
2486
  {
2449
2487
  model: f.const()
2450
2488
  },
2451
2489
  (r, e) => {
2452
2490
  const t = e.model.searchQuery.read(r);
2453
- return /* @__PURE__ */ a("div", { style: Kr, children: /* @__PURE__ */ m("div", { style: Qr, children: [
2491
+ return /* @__PURE__ */ a("div", { style: Jr, children: /* @__PURE__ */ g("div", { style: Zr, children: [
2454
2492
  /* @__PURE__ */ a(
2455
2493
  "input",
2456
2494
  {
2457
2495
  type: "text",
2458
2496
  placeholder: "Filter (name or label)",
2459
- style: Jr,
2497
+ style: Qr,
2460
2498
  value: t ?? "",
2461
2499
  onChange: (n) => e.model.searchQuery.set(n.target.value || void 0, void 0),
2462
2500
  onFocus: (n) => n.target.style.borderColor = "var(--vscode-focusBorder)",
@@ -2466,7 +2504,7 @@ const qr = A(Gr, {}, (r, e) => {
2466
2504
  t && /* @__PURE__ */ a(
2467
2505
  "button",
2468
2506
  {
2469
- style: Zr,
2507
+ style: Xr,
2470
2508
  onClick: () => e.model.searchQuery.set(void 0, void 0),
2471
2509
  title: "Clear filter",
2472
2510
  children: "×"
@@ -2474,29 +2512,29 @@ const qr = A(Gr, {}, (r, e) => {
2474
2512
  )
2475
2513
  ] }) });
2476
2514
  }
2477
- ), Yr = O(
2515
+ ), en = k(
2478
2516
  {
2479
2517
  model: f.const()
2480
2518
  },
2481
2519
  (r, e) => {
2482
2520
  const t = e.model.filteredTree.read(r);
2483
- return /* @__PURE__ */ m("div", { style: v.sidebar, children: [
2521
+ return /* @__PURE__ */ g("div", { style: v.sidebar, children: [
2484
2522
  /* @__PURE__ */ a("div", { style: v.sidebarHeader, children: "Explorer" }),
2485
- /* @__PURE__ */ a(Xr, { model: e.model }),
2523
+ /* @__PURE__ */ a(Yr, { model: e.model }),
2486
2524
  /* @__PURE__ */ a("div", { style: v.sidebarContent, children: /* @__PURE__ */ a(bt, { model: e.model, nodes: [t], depth: 0 }) })
2487
2525
  ] });
2488
2526
  }
2489
2527
  );
2490
- class en extends B({}) {
2528
+ class tn extends B({}) {
2491
2529
  constructor() {
2492
2530
  super(...arguments);
2493
- c(this, "checked", C(this, !1));
2494
- c(this, "toggle", () => {
2531
+ l(this, "checked", x(this, !1));
2532
+ l(this, "toggle", () => {
2495
2533
  this.checked.set(!this.checked.get(), void 0);
2496
2534
  });
2497
2535
  }
2498
2536
  }
2499
- const tn = A(en, {}, (r, e) => {
2537
+ const rn = A(tn, {}, (r, e) => {
2500
2538
  const t = e.checked.read(r), n = {
2501
2539
  position: "relative",
2502
2540
  width: "36px",
@@ -2517,13 +2555,13 @@ const tn = A(en, {}, (r, e) => {
2517
2555
  transition: "left 0.2s"
2518
2556
  };
2519
2557
  return /* @__PURE__ */ a("div", { style: n, onClick: e.toggle, children: /* @__PURE__ */ a("div", { style: s }) });
2520
- }), rn = O(
2558
+ }), nn = k(
2521
2559
  {
2522
2560
  node: f.const()
2523
2561
  },
2524
- (r, e) => e.node.type !== "component" ? /* @__PURE__ */ a("div", { style: { padding: "12px", color: "var(--vscode-descriptionForeground)", fontSize: "12px" }, children: "Select a component (not a folder) to view its properties" }) : /* @__PURE__ */ m("div", { style: v.propertiesPanel, children: [
2525
- /* @__PURE__ */ m("div", { style: v.propertyRow, children: [
2526
- /* @__PURE__ */ m("div", { style: v.propertyLabel, children: [
2562
+ (r, e) => e.node.type !== "component" ? /* @__PURE__ */ a("div", { style: { padding: "12px", color: "var(--vscode-descriptionForeground)", fontSize: "12px" }, children: "Select a component (not a folder) to view its properties" }) : /* @__PURE__ */ g("div", { style: v.propertiesPanel, children: [
2563
+ /* @__PURE__ */ g("div", { style: v.propertyRow, children: [
2564
+ /* @__PURE__ */ g("div", { style: v.propertyLabel, children: [
2527
2565
  "children",
2528
2566
  /* @__PURE__ */ a("span", { style: { color: "var(--vscode-descriptionForeground)" }, children: " : string" })
2529
2567
  ] }),
@@ -2538,12 +2576,12 @@ const tn = A(en, {}, (r, e) => {
2538
2576
  ),
2539
2577
  /* @__PURE__ */ a("div", { style: v.propertyDescription, children: "Button text content" })
2540
2578
  ] }),
2541
- /* @__PURE__ */ m("div", { style: v.propertyRow, children: [
2542
- /* @__PURE__ */ m("div", { style: v.propertyLabel, children: [
2579
+ /* @__PURE__ */ g("div", { style: v.propertyRow, children: [
2580
+ /* @__PURE__ */ g("div", { style: v.propertyLabel, children: [
2543
2581
  "variant",
2544
2582
  /* @__PURE__ */ a("span", { style: { color: "var(--vscode-descriptionForeground)" }, children: " : select" })
2545
2583
  ] }),
2546
- /* @__PURE__ */ m("select", { style: v.propertySelect, defaultValue: "default", children: [
2584
+ /* @__PURE__ */ g("select", { style: v.propertySelect, defaultValue: "default", children: [
2547
2585
  /* @__PURE__ */ a("option", { value: "default", children: "default" }),
2548
2586
  /* @__PURE__ */ a("option", { value: "primary", children: "primary" }),
2549
2587
  /* @__PURE__ */ a("option", { value: "secondary", children: "secondary" }),
@@ -2551,70 +2589,67 @@ const tn = A(en, {}, (r, e) => {
2551
2589
  ] }),
2552
2590
  /* @__PURE__ */ a("div", { style: v.propertyDescription, children: "Visual style variant" })
2553
2591
  ] }),
2554
- /* @__PURE__ */ m("div", { style: v.propertyRow, children: [
2555
- /* @__PURE__ */ m("div", { style: v.propertyLabel, children: [
2592
+ /* @__PURE__ */ g("div", { style: v.propertyRow, children: [
2593
+ /* @__PURE__ */ g("div", { style: v.propertyLabel, children: [
2556
2594
  "size",
2557
2595
  /* @__PURE__ */ a("span", { style: { color: "var(--vscode-descriptionForeground)" }, children: " : select" })
2558
2596
  ] }),
2559
- /* @__PURE__ */ m("select", { style: v.propertySelect, defaultValue: "default", children: [
2597
+ /* @__PURE__ */ g("select", { style: v.propertySelect, defaultValue: "default", children: [
2560
2598
  /* @__PURE__ */ a("option", { value: "sm", children: "sm" }),
2561
2599
  /* @__PURE__ */ a("option", { value: "default", children: "default" }),
2562
2600
  /* @__PURE__ */ a("option", { value: "lg", children: "lg" })
2563
2601
  ] }),
2564
2602
  /* @__PURE__ */ a("div", { style: v.propertyDescription, children: "Button size" })
2565
2603
  ] }),
2566
- /* @__PURE__ */ m("div", { style: v.propertyRow, children: [
2567
- /* @__PURE__ */ m("div", { style: v.propertyLabel, children: [
2604
+ /* @__PURE__ */ g("div", { style: v.propertyRow, children: [
2605
+ /* @__PURE__ */ g("div", { style: v.propertyLabel, children: [
2568
2606
  "disabled",
2569
2607
  /* @__PURE__ */ a("span", { style: { color: "var(--vscode-descriptionForeground)" }, children: " : boolean" })
2570
2608
  ] }),
2571
- /* @__PURE__ */ a(tn, {}),
2609
+ /* @__PURE__ */ a(rn, {}),
2572
2610
  /* @__PURE__ */ a("div", { style: v.propertyDescription, children: "Disable the button" })
2573
2611
  ] })
2574
2612
  ] })
2575
- ), nn = O(
2613
+ ), sn = k(
2576
2614
  {
2577
2615
  selectedNode: f.const()
2578
2616
  },
2579
- (r, e) => /* @__PURE__ */ m("div", { style: Re(v.sidebar, v.sidebarRight), children: [
2580
- /* @__PURE__ */ m("div", { style: v.sidebarHeader, children: [
2617
+ (r, e) => /* @__PURE__ */ g("div", { style: Ce(v.sidebar, v.sidebarRight), children: [
2618
+ /* @__PURE__ */ g("div", { style: v.sidebarHeader, children: [
2581
2619
  /* @__PURE__ */ a("span", { style: { marginRight: "6px", color: "var(--vscode-textLink-foreground)" }, children: "</>" }),
2582
2620
  "Props"
2583
2621
  ] }),
2584
- /* @__PURE__ */ a("div", { style: v.sidebarContent, children: e.selectedNode ? /* @__PURE__ */ a(rn, { node: e.selectedNode }) : /* @__PURE__ */ a("div", { style: { padding: "12px", color: "var(--vscode-descriptionForeground)", fontSize: "12px" }, children: "Select a component to view its properties" }) })
2622
+ /* @__PURE__ */ a("div", { style: v.sidebarContent, children: e.selectedNode ? /* @__PURE__ */ a(nn, { node: e.selectedNode }) : /* @__PURE__ */ a("div", { style: { padding: "12px", color: "var(--vscode-descriptionForeground)", fontSize: "12px" }, children: "Select a component to view its properties" }) })
2585
2623
  ] })
2586
- ), _t = /* @__PURE__ */ new WeakSet(), He = HTMLElement.prototype.focus;
2624
+ ), _t = /* @__PURE__ */ new WeakSet(), Le = HTMLElement.prototype.focus;
2587
2625
  HTMLElement.prototype.focus = function(r) {
2588
2626
  const e = this.getRootNode();
2589
- e instanceof ShadowRoot && _t.has(e) && !(r != null && r.preventScroll) ? He.call(this, { ...r, preventScroll: !0 }) : He.call(this, r);
2627
+ e instanceof ShadowRoot && _t.has(e) && !(r != null && r.preventScroll) ? Le.call(this, { ...r, preventScroll: !0 }) : Le.call(this, r);
2590
2628
  };
2591
- function sn(r) {
2629
+ function on(r) {
2592
2630
  _t.add(r);
2593
2631
  }
2594
- class on extends B({
2632
+ class an extends B({
2595
2633
  fixture: f.const(),
2596
2634
  compact: f.const(),
2597
2635
  onSelect: f.const()
2598
2636
  }) {
2599
2637
  constructor() {
2600
2638
  super(...arguments);
2601
- c(this, "_containerRef", null);
2602
- c(this, "_shadowRoot", null);
2603
- c(this, "_renderContainer", null);
2604
- c(this, "_renderResult", null);
2605
- c(this, "_abortController", null);
2606
- c(this, "_resizeObserver", null);
2607
- c(this, "measuredWidth", C(this, void 0));
2608
- c(this, "measuredHeight", C(this, void 0));
2609
- c(this, "setContainerRef", (t) => {
2639
+ l(this, "_containerRef", null);
2640
+ l(this, "_rendering", null);
2641
+ l(this, "_resizeObserver", null);
2642
+ l(this, "measuredWidth", x(this, void 0));
2643
+ l(this, "measuredHeight", x(this, void 0));
2644
+ l(this, "setContainerRef", (t) => {
2610
2645
  if (t === this._containerRef || (this._cleanup(), this._containerRef = t, !t)) return;
2611
- const n = this.fixture.component;
2612
- n.isolation === "shadow-dom" ? this._renderInShadowDom(t, n) : this._renderDirect(t, n);
2613
- const s = this._renderContainer ?? t;
2646
+ const n = new ft(t, this.fixture.component);
2647
+ this._rendering = n, n.shadowRoot && on(n.shadowRoot);
2648
+ const s = n.renderTarget;
2614
2649
  this._resizeObserver = new ResizeObserver((o) => {
2615
2650
  for (const i of o) {
2616
- const { width: d, height: l } = i.contentRect;
2617
- l > 0 && (this.measuredWidth.set(Math.round(d), void 0), this.measuredHeight.set(Math.round(l), void 0));
2651
+ const { width: d, height: c } = i.contentRect;
2652
+ c > 0 && (this.measuredWidth.set(Math.round(d), void 0), this.measuredHeight.set(Math.round(c), void 0));
2618
2653
  }
2619
2654
  }), this._resizeObserver.observe(s);
2620
2655
  });
@@ -2628,95 +2663,48 @@ class on extends B({
2628
2663
  get onSelect() {
2629
2664
  return this.props.onSelect;
2630
2665
  }
2631
- _renderInShadowDom(t, n) {
2632
- if (t.shadowRoot) {
2633
- for (this._shadowRoot = t.shadowRoot; this._shadowRoot.firstChild; )
2634
- this._shadowRoot.removeChild(this._shadowRoot.firstChild);
2635
- this._shadowRoot.adoptedStyleSheets = [];
2636
- } else
2637
- this._shadowRoot = t.attachShadow({ mode: "open" });
2638
- if (sn(this._shadowRoot), n.styles)
2639
- for (const i of n.styles)
2640
- if (i.type === "css") {
2641
- const d = document.createElement("style");
2642
- d.textContent = i.content, this._shadowRoot.appendChild(d);
2643
- } else if (i.type === "url") {
2644
- const d = document.createElement("link");
2645
- d.rel = "stylesheet", d.href = i.href, this._shadowRoot.appendChild(d);
2646
- } else i.type === "adopted" && (this._shadowRoot.adoptedStyleSheets = [
2647
- ...this._shadowRoot.adoptedStyleSheets,
2648
- i.sheet
2649
- ]);
2650
- const s = document.createElement("div");
2651
- s.style.display = "inline-block", this._renderContainer = s, this._shadowRoot.appendChild(s);
2652
- const o = this._getDefaultProps(n);
2653
- this._abortController = new AbortController(), this._handleRenderReturn(n.render(s, {
2654
- props: o,
2655
- signal: this._abortController.signal
2656
- }));
2657
- }
2658
- _renderDirect(t, n) {
2659
- this._renderContainer = t;
2660
- const s = this._getDefaultProps(n);
2661
- this._abortController = new AbortController(), this._handleRenderReturn(n.render(t, {
2662
- props: s,
2663
- signal: this._abortController.signal
2664
- }));
2665
- }
2666
- _handleRenderReturn(t) {
2667
- t instanceof Promise ? t.then((n) => {
2668
- this._abortController && !this._abortController.signal.aborted && (this._renderResult = n ?? void 0);
2669
- }).catch(() => {
2670
- }) : this._renderResult = t ?? void 0;
2671
- }
2672
- _getDefaultProps(t) {
2673
- const n = {};
2674
- for (const s of t.properties)
2675
- n[s.name] = s.defaultValue;
2676
- return n;
2677
- }
2678
2666
  _cleanup() {
2679
2667
  var t, n;
2680
- this._abortController && (this._abortController.abort(), this._abortController = null), (t = this._renderResult) != null && t.dispose && this._renderResult.dispose(), this._renderResult = null, (n = this._resizeObserver) == null || n.disconnect(), this._resizeObserver = null, this._shadowRoot = null, this._renderContainer = null;
2668
+ (t = this._rendering) == null || t.dispose(), this._rendering = null, (n = this._resizeObserver) == null || n.disconnect(), this._resizeObserver = null;
2681
2669
  }
2682
2670
  dispose() {
2683
2671
  this._cleanup();
2684
2672
  }
2685
2673
  }
2686
2674
  const yt = A(
2687
- on,
2675
+ an,
2688
2676
  {},
2689
2677
  (r, e) => {
2690
2678
  const t = e.fixture, n = t.component, s = n.displayMode, o = e.measuredWidth.read(r), i = e.measuredHeight.read(r), d = e.compact;
2691
- let l;
2679
+ let c;
2692
2680
  if (s.type === "page") {
2693
- const b = s.viewports[0], p = $t(b);
2694
- l = {
2695
- width: p.width,
2696
- height: p.height,
2681
+ const m = s.viewports[0], b = zt(m);
2682
+ c = {
2683
+ width: b.width,
2684
+ height: b.height,
2697
2685
  overflow: "auto"
2698
2686
  };
2699
2687
  } else
2700
- l = {
2688
+ c = {
2701
2689
  display: "inline-block"
2702
2690
  };
2703
- const h = o && i ? `${o} × ${i}` : "", u = d ? q.wrapperCompact : q.wrapper, g = d ? q.nameCompact : q.name;
2704
- return /* @__PURE__ */ m("div", { style: u, children: [
2705
- /* @__PURE__ */ m("div", { style: q.labelRow, children: [
2691
+ const u = o && i ? `${o} × ${i}` : "", h = d ? q.wrapperCompact : q.wrapper, p = d ? q.nameCompact : q.name;
2692
+ return /* @__PURE__ */ g("div", { style: h, children: [
2693
+ /* @__PURE__ */ g("div", { style: q.labelRow, children: [
2706
2694
  d && /* @__PURE__ */ a(
2707
2695
  "a",
2708
2696
  {
2709
2697
  href: vt("component", t.id),
2710
- style: { ...g, textDecoration: "none", color: "inherit" },
2711
- onClick: (b) => {
2712
- e.onSelect && (b.preventDefault(), e.onSelect(t.id));
2698
+ style: { ...p, textDecoration: "none", color: "inherit" },
2699
+ onClick: (m) => {
2700
+ e.onSelect && (m.preventDefault(), e.onSelect(t.id));
2713
2701
  },
2714
2702
  children: t.name
2715
2703
  }
2716
2704
  ),
2717
- !d && h && /* @__PURE__ */ a("span", { style: q.dimensions, children: h })
2705
+ !d && u && /* @__PURE__ */ a("span", { style: q.dimensions, children: u })
2718
2706
  ] }),
2719
- /* @__PURE__ */ a("div", { style: cn(n.background), children: /* @__PURE__ */ a("div", { ref: e.setContainerRef, style: l }) })
2707
+ /* @__PURE__ */ a("div", { style: hn(n.background), children: /* @__PURE__ */ a("div", { ref: e.setContainerRef, style: c }) })
2720
2708
  ] });
2721
2709
  }
2722
2710
  ), G = 8;
@@ -2728,10 +2716,10 @@ function xt(r, e) {
2728
2716
  linear-gradient(-45deg, transparent 75%, ${e} 75%)
2729
2717
  `;
2730
2718
  }
2731
- const an = {
2719
+ const dn = {
2732
2720
  backgroundColor: "#ffffff",
2733
2721
  backgroundImage: xt("#ffffff", "#e5e5e5")
2734
- }, dn = {
2722
+ }, cn = {
2735
2723
  backgroundColor: "#1e1e1e",
2736
2724
  backgroundImage: xt("#1e1e1e", "#2d2d2d")
2737
2725
  }, ln = {
@@ -2744,8 +2732,8 @@ const an = {
2744
2732
  overflow: "hidden",
2745
2733
  position: "relative"
2746
2734
  };
2747
- function cn(r) {
2748
- const e = r === "dark" ? dn : an;
2735
+ function hn(r) {
2736
+ const e = r === "dark" ? cn : dn;
2749
2737
  return {
2750
2738
  ...ln,
2751
2739
  backgroundColor: e.backgroundColor,
@@ -2781,16 +2769,16 @@ const q = {
2781
2769
  fontFamily: "var(--vscode-editor-font-family, monospace)"
2782
2770
  }
2783
2771
  };
2784
- class hn extends B({
2772
+ class un extends B({
2785
2773
  fixtureId: f.const(),
2786
2774
  sessionName: f.const(),
2787
2775
  daemon: f.const()
2788
2776
  }) {
2789
2777
  constructor(t) {
2790
2778
  super(t);
2791
- c(this, "screenshot", C(this, { status: "idle" }));
2792
- c(this, "_fetchVersion", 0);
2793
- this._store.add(lt((n) => {
2779
+ l(this, "screenshot", x(this, { status: "idle" }));
2780
+ l(this, "_fetchVersion", 0);
2781
+ this._store.add(dt((n) => {
2794
2782
  this.props.daemon.sourceTreeIds.read(n).get(this.props.sessionName) && this._fetchScreenshot();
2795
2783
  }));
2796
2784
  }
@@ -2808,8 +2796,8 @@ class hn extends B({
2808
2796
  }
2809
2797
  }
2810
2798
  }
2811
- const Pe = A(
2812
- hn,
2799
+ const He = A(
2800
+ un,
2813
2801
  {},
2814
2802
  (r, e) => {
2815
2803
  const t = e.screenshot.read(r);
@@ -2870,7 +2858,7 @@ const Pe = A(
2870
2858
  border: "1px solid var(--vscode-panel-border)"
2871
2859
  }
2872
2860
  };
2873
- class un extends B({
2861
+ class pn extends B({
2874
2862
  fixtureId: f.const(),
2875
2863
  daemon: f.const(),
2876
2864
  baselineSession: f.const(),
@@ -2878,8 +2866,8 @@ class un extends B({
2878
2866
  }) {
2879
2867
  constructor(t) {
2880
2868
  super(t);
2881
- c(this, "comparisonStatus", C(this, { status: "loading" }));
2882
- this._store.add(lt((n) => {
2869
+ l(this, "comparisonStatus", x(this, { status: "loading" }));
2870
+ this._store.add(dt((n) => {
2883
2871
  const s = this.props.daemon.sourceTreeIds.read(n), o = s.get(this.props.baselineSession), i = s.get(this.props.currentSession);
2884
2872
  o && i && this._fetchComparison();
2885
2873
  }));
@@ -2910,21 +2898,21 @@ class un extends B({
2910
2898
  }
2911
2899
  }
2912
2900
  }
2913
- const pn = A(
2914
- un,
2901
+ const fn = A(
2902
+ pn,
2915
2903
  {},
2916
2904
  (r, e) => {
2917
- const t = e.comparisonStatus.read(r), n = t.status === "loading" ? /* @__PURE__ */ a("span", { style: k.badgeLoading, children: "comparing..." }) : t.status === "error" ? /* @__PURE__ */ a("span", { style: k.badgeError, children: "error" }) : t.match ? /* @__PURE__ */ a("span", { style: k.badgeMatch, children: "✓ match" }) : /* @__PURE__ */ a("span", { style: k.badgeChanged, children: "● changed" });
2918
- return /* @__PURE__ */ m("div", { style: k.fixtureRow, children: [
2919
- /* @__PURE__ */ m("div", { style: k.fixtureLabel, children: [
2920
- /* @__PURE__ */ a("span", { style: k.fixtureName, children: e.fixtureId }),
2905
+ const t = e.comparisonStatus.read(r), n = t.status === "loading" ? /* @__PURE__ */ a("span", { style: R.badgeLoading, children: "comparing..." }) : t.status === "error" ? /* @__PURE__ */ a("span", { style: R.badgeError, children: "error" }) : t.match ? /* @__PURE__ */ a("span", { style: R.badgeMatch, children: "✓ match" }) : /* @__PURE__ */ a("span", { style: R.badgeChanged, children: "● changed" });
2906
+ return /* @__PURE__ */ g("div", { style: R.fixtureRow, children: [
2907
+ /* @__PURE__ */ g("div", { style: R.fixtureLabel, children: [
2908
+ /* @__PURE__ */ a("span", { style: R.fixtureName, children: e.fixtureId }),
2921
2909
  n
2922
2910
  ] }),
2923
- /* @__PURE__ */ m("div", { style: k.sideBySide, children: [
2924
- /* @__PURE__ */ m("div", { style: k.screenshotColumn, children: [
2925
- /* @__PURE__ */ a("span", { style: k.columnLabel, children: "Current" }),
2911
+ /* @__PURE__ */ g("div", { style: R.sideBySide, children: [
2912
+ /* @__PURE__ */ g("div", { style: R.screenshotColumn, children: [
2913
+ /* @__PURE__ */ a("span", { style: R.columnLabel, children: "Current" }),
2926
2914
  /* @__PURE__ */ a(
2927
- Pe,
2915
+ He,
2928
2916
  {
2929
2917
  fixtureId: e.fixtureId,
2930
2918
  sessionName: e.currentSession,
@@ -2932,10 +2920,10 @@ const pn = A(
2932
2920
  }
2933
2921
  )
2934
2922
  ] }),
2935
- /* @__PURE__ */ m("div", { style: k.screenshotColumn, children: [
2936
- /* @__PURE__ */ a("span", { style: k.columnLabel, children: "Baseline" }),
2923
+ /* @__PURE__ */ g("div", { style: R.screenshotColumn, children: [
2924
+ /* @__PURE__ */ a("span", { style: R.columnLabel, children: "Baseline" }),
2937
2925
  /* @__PURE__ */ a(
2938
- Pe,
2926
+ He,
2939
2927
  {
2940
2928
  fixtureId: e.fixtureId,
2941
2929
  sessionName: e.baselineSession,
@@ -2946,7 +2934,7 @@ const pn = A(
2946
2934
  ] })
2947
2935
  ] });
2948
2936
  }
2949
- ), fn = O(
2937
+ ), gn = k(
2950
2938
  {
2951
2939
  name: f.const(),
2952
2940
  path: f.const(),
@@ -2955,8 +2943,8 @@ const pn = A(
2955
2943
  baselineSession: f.const(),
2956
2944
  currentSession: f.const()
2957
2945
  },
2958
- (r, e) => /* @__PURE__ */ a("div", { style: k.groupContent, children: e.items.map((t) => /* @__PURE__ */ a(
2959
- pn,
2946
+ (r, e) => /* @__PURE__ */ a("div", { style: R.groupContent, children: e.items.map((t) => /* @__PURE__ */ a(
2947
+ fn,
2960
2948
  {
2961
2949
  fixtureId: t.fixtureId,
2962
2950
  daemon: e.daemon,
@@ -2965,7 +2953,7 @@ const pn = A(
2965
2953
  },
2966
2954
  t.fixtureId
2967
2955
  )) })
2968
- ), k = {
2956
+ ), R = {
2969
2957
  groupContent: {
2970
2958
  display: "flex",
2971
2959
  flexDirection: "column",
@@ -3034,13 +3022,13 @@ function St(r, e) {
3034
3022
  linear-gradient(-45deg, transparent 75%, ${e} 75%)
3035
3023
  `;
3036
3024
  }
3037
- const gn = {
3025
+ const mn = {
3038
3026
  backgroundColor: "#ffffff",
3039
3027
  backgroundImage: St("#ffffff", "#e5e5e5")
3040
- }, mn = {
3028
+ }, vn = {
3041
3029
  backgroundColor: "#1e1e1e",
3042
3030
  backgroundImage: St("#1e1e1e", "#2d2d2d")
3043
- }, vn = {
3031
+ }, bn = {
3044
3032
  display: "inline-block",
3045
3033
  padding: "12px",
3046
3034
  borderRadius: "4px",
@@ -3048,32 +3036,32 @@ const gn = {
3048
3036
  backgroundPosition: `0 0, 0 ${K}px, ${K}px -${K}px, -${K}px 0`,
3049
3037
  boxShadow: "0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.08)"
3050
3038
  };
3051
- function bn(r) {
3052
- const e = r === "dark" ? mn : gn;
3039
+ function _n(r) {
3040
+ const e = r === "dark" ? vn : mn;
3053
3041
  return {
3054
- ...vn,
3042
+ ...bn,
3055
3043
  backgroundColor: e.backgroundColor,
3056
3044
  backgroundImage: e.backgroundImage
3057
3045
  };
3058
3046
  }
3059
3047
  function je({ src: r, alt: e, background: t }) {
3060
- return /* @__PURE__ */ a("div", { style: bn(t), children: /* @__PURE__ */ a("img", { src: r, alt: e, style: R.image }) });
3048
+ return /* @__PURE__ */ a("div", { style: _n(t), children: /* @__PURE__ */ a("img", { src: r, alt: e, style: w.image }) });
3061
3049
  }
3062
- const _n = O(
3050
+ const yn = k(
3063
3051
  {
3064
3052
  item: f.const(),
3065
3053
  reportModel: f.const()
3066
3054
  },
3067
3055
  (r, e) => {
3068
- const { item: t, reportModel: n } = e, { entry: s } = t, o = s.background ?? "light", i = s.status === "unchanged" ? /* @__PURE__ */ a("span", { style: R.badgeMatch, children: "✓ match" }) : s.status === "changed" ? /* @__PURE__ */ a("span", { style: R.badgeChanged, children: "● changed" }) : /* @__PURE__ */ a("span", { style: R.badgeAdded, children: "+ added" }), d = s.baselineScreenshot || s.currentScreenshot;
3069
- return /* @__PURE__ */ m("div", { style: R.fixtureRow, children: [
3070
- /* @__PURE__ */ m("div", { style: R.fixtureLabel, children: [
3071
- /* @__PURE__ */ a("span", { style: R.fixtureName, children: t.fixtureId }),
3056
+ const { item: t, reportModel: n } = e, { entry: s } = t, o = s.background ?? "light", i = s.status === "unchanged" ? /* @__PURE__ */ a("span", { style: w.badgeMatch, children: "✓ match" }) : s.status === "changed" ? /* @__PURE__ */ a("span", { style: w.badgeChanged, children: "● changed" }) : /* @__PURE__ */ a("span", { style: w.badgeAdded, children: "+ added" }), d = s.baselineScreenshot || s.currentScreenshot;
3057
+ return /* @__PURE__ */ g("div", { style: w.fixtureRow, children: [
3058
+ /* @__PURE__ */ g("div", { style: w.fixtureLabel, children: [
3059
+ /* @__PURE__ */ a("span", { style: w.fixtureName, children: t.fixtureId }),
3072
3060
  i
3073
3061
  ] }),
3074
- d && /* @__PURE__ */ m("div", { style: R.sideBySide, children: [
3075
- s.baselineScreenshot && /* @__PURE__ */ m("div", { style: R.screenshotColumn, children: [
3076
- /* @__PURE__ */ a("span", { style: R.columnLabel, children: "Baseline" }),
3062
+ d && /* @__PURE__ */ g("div", { style: w.sideBySide, children: [
3063
+ s.baselineScreenshot && /* @__PURE__ */ g("div", { style: w.screenshotColumn, children: [
3064
+ /* @__PURE__ */ a("span", { style: w.columnLabel, children: "Baseline" }),
3077
3065
  /* @__PURE__ */ a(
3078
3066
  je,
3079
3067
  {
@@ -3083,8 +3071,8 @@ const _n = O(
3083
3071
  }
3084
3072
  )
3085
3073
  ] }),
3086
- s.currentScreenshot && /* @__PURE__ */ m("div", { style: R.screenshotColumn, children: [
3087
- /* @__PURE__ */ a("span", { style: R.columnLabel, children: "Current" }),
3074
+ s.currentScreenshot && /* @__PURE__ */ g("div", { style: w.screenshotColumn, children: [
3075
+ /* @__PURE__ */ a("span", { style: w.columnLabel, children: "Current" }),
3088
3076
  /* @__PURE__ */ a(
3089
3077
  je,
3090
3078
  {
@@ -3095,28 +3083,28 @@ const _n = O(
3095
3083
  )
3096
3084
  ] })
3097
3085
  ] }),
3098
- !d && s.status === "unchanged" && /* @__PURE__ */ a("div", { style: R.hashRow, children: /* @__PURE__ */ m("span", { style: R.hashText, children: [
3086
+ !d && s.status === "unchanged" && /* @__PURE__ */ a("div", { style: w.hashRow, children: /* @__PURE__ */ g("span", { style: w.hashText, children: [
3099
3087
  "hash: ",
3100
3088
  s.targetHash
3101
3089
  ] }) })
3102
3090
  ] });
3103
3091
  }
3104
- ), yn = O(
3092
+ ), xn = k(
3105
3093
  {
3106
3094
  name: f.const(),
3107
3095
  path: f.const(),
3108
3096
  items: f.const(),
3109
3097
  reportModel: f.const()
3110
3098
  },
3111
- (r, e) => /* @__PURE__ */ a("div", { style: R.groupContent, children: e.items.map((t) => /* @__PURE__ */ a(
3112
- _n,
3099
+ (r, e) => /* @__PURE__ */ a("div", { style: w.groupContent, children: e.items.map((t) => /* @__PURE__ */ a(
3100
+ yn,
3113
3101
  {
3114
3102
  item: t,
3115
3103
  reportModel: e.reportModel
3116
3104
  },
3117
3105
  t.fixtureId
3118
3106
  )) })
3119
- ), R = {
3107
+ ), w = {
3120
3108
  groupContent: {
3121
3109
  display: "flex",
3122
3110
  flexDirection: "column",
@@ -3181,33 +3169,33 @@ const _n = O(
3181
3169
  fontWeight: 500
3182
3170
  }
3183
3171
  }, wt = "component-explorer:fixtureHeights", Ue = 500;
3184
- let M = null;
3172
+ let N = null;
3185
3173
  function Ct() {
3186
- if (M !== null) return M;
3174
+ if (N !== null) return N;
3187
3175
  try {
3188
3176
  const r = localStorage.getItem(wt);
3189
3177
  if (r)
3190
- return M = JSON.parse(r), M;
3178
+ return N = JSON.parse(r), N;
3191
3179
  } catch {
3192
3180
  }
3193
- return M = {}, M;
3181
+ return N = {}, N;
3194
3182
  }
3195
- function xn() {
3196
- if (M !== null)
3183
+ function Sn() {
3184
+ if (N !== null)
3197
3185
  try {
3198
- const r = Object.entries(M);
3199
- r.length > Ue && (M = Object.fromEntries(r.slice(-Ue))), localStorage.setItem(wt, JSON.stringify(M));
3186
+ const r = Object.entries(N);
3187
+ r.length > Ue && (N = Object.fromEntries(r.slice(-Ue))), localStorage.setItem(wt, JSON.stringify(N));
3200
3188
  } catch {
3201
3189
  }
3202
3190
  }
3203
- function Sn(r, e) {
3191
+ function wn(r, e) {
3204
3192
  const t = Ct();
3205
- t[r] = e, xn();
3193
+ t[r] = e, Sn();
3206
3194
  }
3207
- function wn() {
3195
+ function Cn() {
3208
3196
  return new Map(Object.entries(Ct()));
3209
3197
  }
3210
- const Cn = 280, Rn = 32, se = 32, We = 400;
3198
+ const Rn = 280, Tn = 32, ne = 32, Pe = 400;
3211
3199
  let Rt = 0;
3212
3200
  function z(r, e) {
3213
3201
  const t = ++Rt, n = performance.now().toFixed(1);
@@ -3217,14 +3205,14 @@ function z(r, e) {
3217
3205
  e
3218
3206
  );
3219
3207
  }
3220
- function Ge(r, e) {
3208
+ function We(r, e) {
3221
3209
  const t = ++Rt, n = performance.now().toFixed(1);
3222
3210
  console.warn(
3223
3211
  `[scroll #${t} @${n}ms] ${r}`,
3224
3212
  e
3225
3213
  );
3226
3214
  }
3227
- const Tt = "component-explorer:scrollAnchors", qe = 100;
3215
+ const Tt = "component-explorer:scrollAnchors", Ge = 100;
3228
3216
  function kt() {
3229
3217
  try {
3230
3218
  const r = localStorage.getItem(Tt);
@@ -3233,34 +3221,34 @@ function kt() {
3233
3221
  }
3234
3222
  return {};
3235
3223
  }
3236
- function Tn(r, e) {
3224
+ function kn(r, e) {
3237
3225
  try {
3238
3226
  const t = kt();
3239
3227
  t[r] = e;
3240
- const n = Object.entries(t), s = n.length > qe ? Object.fromEntries(n.slice(-qe)) : t;
3228
+ const n = Object.entries(t), s = n.length > Ge ? Object.fromEntries(n.slice(-Ge)) : t;
3241
3229
  localStorage.setItem(Tt, JSON.stringify(s));
3242
3230
  } catch {
3243
3231
  }
3244
3232
  }
3245
- function kn(r) {
3233
+ function In(r) {
3246
3234
  return kt()[r];
3247
3235
  }
3248
3236
  function It(r) {
3249
3237
  return r.type === "single" ? r.fixture.id : r.id;
3250
3238
  }
3251
- function In(r, e) {
3239
+ function On(r, e) {
3252
3240
  const t = new Array(r.length);
3253
- let n = se;
3241
+ let n = ne;
3254
3242
  for (let s = 0; s < r.length; s++) {
3255
- const o = e.get(It(r[s])) ?? Cn;
3256
- t[s] = { top: n, height: o }, n += o + Rn;
3243
+ const o = e.get(It(r[s])) ?? Rn;
3244
+ t[s] = { top: n, height: o }, n += o + Tn;
3257
3245
  }
3258
3246
  return t;
3259
3247
  }
3260
- function ge(r) {
3248
+ function fe(r) {
3261
3249
  if (r.length === 0) return 0;
3262
3250
  const e = r[r.length - 1];
3263
- return e.top + e.height + se;
3251
+ return e.top + e.height + ne;
3264
3252
  }
3265
3253
  function Ot(r, e) {
3266
3254
  let t = 0, n = r.length;
@@ -3270,16 +3258,16 @@ function Ot(r, e) {
3270
3258
  }
3271
3259
  return t;
3272
3260
  }
3273
- function On(r, e, t) {
3261
+ function Nn(r, e, t) {
3274
3262
  if (r.length === 0) return { start: 0, end: 0 };
3275
- const n = Ot(r, e - We);
3263
+ const n = Ot(r, e - Pe);
3276
3264
  let s = n;
3277
- const o = e + t + We;
3265
+ const o = e + t + Pe;
3278
3266
  for (; s < r.length && r[s].top < o; )
3279
3267
  s++;
3280
3268
  return { start: n, end: s };
3281
3269
  }
3282
- function Ke(r, e) {
3270
+ function qe(r, e) {
3283
3271
  if (r.length === 0) return;
3284
3272
  const t = Ot(r, e), n = Math.min(t, r.length - 1);
3285
3273
  return {
@@ -3287,16 +3275,16 @@ function Ke(r, e) {
3287
3275
  offsetFromViewport: r[n].top - e
3288
3276
  };
3289
3277
  }
3290
- function Je(r, e) {
3278
+ function Ke(r, e) {
3291
3279
  return e.rowIndex >= r.length ? 0 : r[e.rowIndex].top - e.offsetFromViewport;
3292
3280
  }
3293
- function Qe(r) {
3281
+ function Je(r) {
3294
3282
  return r.type === "single" ? r.fixture.path : r.path;
3295
3283
  }
3296
- function Ze(r) {
3284
+ function Qe(r) {
3297
3285
  return r.split(" / ").slice(1);
3298
3286
  }
3299
- function Nn(r, e, t) {
3287
+ function Vn(r, e, t) {
3300
3288
  const n = t.split("/"), s = n.length - r.length;
3301
3289
  for (let o = 0; o < r.length; o++)
3302
3290
  if (!e || o >= e.length || r[o] !== e[o])
@@ -3307,14 +3295,14 @@ function Nn(r, e, t) {
3307
3295
  }));
3308
3296
  return [];
3309
3297
  }
3310
- const Xe = ["h1", "h2", "h3", "h4"];
3311
- function Vn(r) {
3312
- return Xe[Math.min(r, Xe.length - 1)];
3313
- }
3314
- const Ye = ["22px", "15px", "13px", "12px"];
3298
+ const Ze = ["h1", "h2", "h3", "h4"];
3315
3299
  function Mn(r) {
3300
+ return Ze[Math.min(r, Ze.length - 1)];
3301
+ }
3302
+ const Xe = ["22px", "15px", "13px", "12px"];
3303
+ function Fn(r) {
3316
3304
  return {
3317
- fontSize: Ye[Math.min(r, Ye.length - 1)],
3305
+ fontSize: Xe[Math.min(r, Xe.length - 1)],
3318
3306
  fontWeight: r <= 1 ? 600 : 500,
3319
3307
  color: "var(--vscode-foreground)",
3320
3308
  margin: 0,
@@ -3323,39 +3311,39 @@ function Mn(r) {
3323
3311
  borderBottom: r === 0 ? "1px solid var(--vscode-widget-border, var(--vscode-panel-border, rgba(128,128,128,0.35)))" : void 0
3324
3312
  };
3325
3313
  }
3326
- class Fn extends B({
3314
+ class En extends B({
3327
3315
  model: f.const()
3328
3316
  }) {
3329
3317
  constructor() {
3330
3318
  super(...arguments);
3331
- c(this, "_rowHeights", C(this, wn()));
3332
- c(this, "_scrollTop", C(this, 0));
3333
- c(this, "_viewportHeight", C(this, 0));
3334
- c(this, "_scrollContainerRef", null);
3335
- c(this, "_resizeObserver", null);
3336
- c(this, "_viewportResizeObserver", null);
3337
- c(this, "_currentNodeId");
3338
- c(this, "_scrollSaveTimeout", null);
3339
- c(this, "_suppressScrollHandler", !1);
3340
- c(this, "layout", V(this, (t) => {
3319
+ l(this, "_rowHeights", x(this, Cn()));
3320
+ l(this, "_scrollTop", x(this, 0));
3321
+ l(this, "_viewportHeight", x(this, 0));
3322
+ l(this, "_scrollContainerRef", null);
3323
+ l(this, "_resizeObserver", null);
3324
+ l(this, "_viewportResizeObserver", null);
3325
+ l(this, "_currentNodeId");
3326
+ l(this, "_scrollSaveTimeout", null);
3327
+ l(this, "_suppressScrollHandler", !1);
3328
+ l(this, "layout", O(this, (t) => {
3341
3329
  const n = this.explorerModel.selectedFixtures.read(t), s = this._rowHeights.read(t);
3342
- return In(n, s);
3330
+ return On(n, s);
3343
3331
  }));
3344
- c(this, "visibleRowRange", V(this, (t) => {
3332
+ l(this, "visibleRowRange", O(this, (t) => {
3345
3333
  const n = this.layout.read(t), s = this._scrollTop.read(t), o = this._viewportHeight.read(t);
3346
- return On(n, s, o);
3334
+ return Nn(n, s, o);
3347
3335
  }));
3348
- c(this, "setScrollContainerRef", (t) => {
3336
+ l(this, "setScrollContainerRef", (t) => {
3349
3337
  var n;
3350
3338
  this._scrollContainerRef && this._scrollContainerRef.removeEventListener("scroll", this._handleScroll), (n = this._viewportResizeObserver) == null || n.disconnect(), this._scrollContainerRef = t, t && (t.addEventListener("scroll", this._handleScroll, { passive: !0 }), this._viewportHeight.set(t.clientHeight, void 0), z("setScrollContainerRef", { clientHeight: t.clientHeight, scrollTop: t.scrollTop }), this._viewportResizeObserver = new ResizeObserver(([s]) => {
3351
3339
  const o = Math.round(s.contentRect.height), i = this._viewportHeight.get();
3352
3340
  o !== i && z("viewportResize", { prev: i, new: o }), this._viewportHeight.set(o, void 0);
3353
3341
  }), this._viewportResizeObserver.observe(t), this._restoreScrollPosition());
3354
3342
  });
3355
- c(this, "_handleScroll", () => {
3343
+ l(this, "_handleScroll", () => {
3356
3344
  if (!this._scrollContainerRef) return;
3357
3345
  const t = this._scrollTop.get(), n = this._scrollContainerRef.scrollTop, s = n - t;
3358
- if (this._scrollTop.set(n, void 0), Math.abs(s) > 200 && Ge("handleScroll:LARGE_JUMP", {
3346
+ if (this._scrollTop.set(n, void 0), Math.abs(s) > 200 && We("handleScroll:LARGE_JUMP", {
3359
3347
  prevObsScrollTop: t,
3360
3348
  newScrollTop: n,
3361
3349
  delta: s,
@@ -3367,42 +3355,42 @@ class Fn extends B({
3367
3355
  }
3368
3356
  this._scrollSaveTimeout && clearTimeout(this._scrollSaveTimeout), this._scrollSaveTimeout = setTimeout(() => {
3369
3357
  if (!this._currentNodeId) return;
3370
- const o = this.layout.get(), i = Ke(o, this._scrollTop.get());
3371
- i && Tn(this._currentNodeId, i);
3358
+ const o = this.layout.get(), i = qe(o, this._scrollTop.get());
3359
+ i && kn(this._currentNodeId, i);
3372
3360
  }, 150);
3373
3361
  });
3374
- c(this, "observeRowElement", (t, n) => {
3362
+ l(this, "observeRowElement", (t, n) => {
3375
3363
  t && (this._resizeObserver || (this._resizeObserver = new ResizeObserver((s) => {
3376
3364
  const o = this._rowHeights.get();
3377
3365
  let i;
3378
3366
  const d = [];
3379
- for (const l of s) {
3380
- const h = l.target.getAttribute("data-row-id");
3381
- if (!h) continue;
3382
- const u = Math.round(l.contentRect.height);
3383
- u > 0 && o.get(h) !== u && (d.push({ rid: h, oldH: o.get(h), newH: u }), i || (i = new Map(o)), i.set(h, u), Sn(h, u));
3367
+ for (const c of s) {
3368
+ const u = c.target.getAttribute("data-row-id");
3369
+ if (!u) continue;
3370
+ const h = Math.round(c.contentRect.height);
3371
+ h > 0 && o.get(u) !== h && (d.push({ rid: u, oldH: o.get(u), newH: h }), i || (i = new Map(o)), i.set(u, h), wn(u, h));
3384
3372
  }
3385
3373
  if (i) {
3386
- const l = this.layout.get(), h = this._scrollTop.get(), u = Ke(l, h);
3374
+ const c = this.layout.get(), u = this._scrollTop.get(), h = qe(c, u);
3387
3375
  this._rowHeights.set(i, void 0);
3388
- const g = this.layout.get();
3389
- if (u && this._scrollContainerRef) {
3390
- const b = Je(g, u), p = b - h;
3391
- Math.abs(p) > 2 && z("resizeObserver:reAnchor", {
3376
+ const p = this.layout.get();
3377
+ if (h && this._scrollContainerRef) {
3378
+ const m = Ke(p, h), b = m - u;
3379
+ Math.abs(b) > 2 && z("resizeObserver:reAnchor", {
3392
3380
  changedRows: d,
3393
- anchor: u,
3394
- scrollTopBefore: h,
3395
- newScrollTop: b,
3396
- delta: p,
3397
- oldTotalHeight: ge(l),
3398
- newTotalHeight: ge(g)
3399
- }), Math.abs(p) > 200 && Ge("resizeObserver:LARGE_REANCHOR", {
3381
+ anchor: h,
3382
+ scrollTopBefore: u,
3383
+ newScrollTop: m,
3384
+ delta: b,
3385
+ oldTotalHeight: fe(c),
3386
+ newTotalHeight: fe(p)
3387
+ }), Math.abs(b) > 200 && We("resizeObserver:LARGE_REANCHOR", {
3400
3388
  changedRows: d,
3401
- anchor: u,
3402
- scrollTopBefore: h,
3403
- newScrollTop: b,
3404
- delta: p
3405
- }), this._suppressScrollHandler = !0, this._scrollContainerRef.scrollTop = b, this._scrollTop.set(b, void 0), requestAnimationFrame(() => {
3389
+ anchor: h,
3390
+ scrollTopBefore: u,
3391
+ newScrollTop: m,
3392
+ delta: b
3393
+ }), this._suppressScrollHandler = !0, this._scrollContainerRef.scrollTop = m, this._scrollTop.set(m, void 0), requestAnimationFrame(() => {
3406
3394
  this._suppressScrollHandler = !1;
3407
3395
  });
3408
3396
  }
@@ -3432,12 +3420,12 @@ class Fn extends B({
3432
3420
  }
3433
3421
  _restoreScrollPosition() {
3434
3422
  if (!this._scrollContainerRef || !this._currentNodeId) return;
3435
- const t = kn(this._currentNodeId);
3423
+ const t = In(this._currentNodeId);
3436
3424
  if (!t) {
3437
3425
  z("restoreScroll:noAnchor", { nodeId: this._currentNodeId });
3438
3426
  return;
3439
3427
  }
3440
- const n = this.layout.get(), s = Je(n, t), o = this._scrollContainerRef.scrollTop;
3428
+ const n = this.layout.get(), s = Ke(n, t), o = this._scrollContainerRef.scrollTop;
3441
3429
  z("restoreScroll", {
3442
3430
  nodeId: this._currentNodeId,
3443
3431
  anchor: t,
@@ -3455,82 +3443,82 @@ class Fn extends B({
3455
3443
  }
3456
3444
  }
3457
3445
  const Dn = A(
3458
- Fn,
3446
+ En,
3459
3447
  {},
3460
3448
  (r, e) => {
3461
3449
  const t = e.explorerModel.selectedFixtures.read(r), n = e.explorerModel.selectedNodeId.read(r), s = e.layout.read(r), { start: o, end: i } = e.visibleRowRange.read(r);
3462
3450
  if (e.updateForSelection(n), t.length === 0) {
3463
- const l = e.explorerModel.reportModel;
3464
- if (l) {
3465
- const h = l.state.read(r);
3466
- if (h.status === "loading")
3467
- return /* @__PURE__ */ a("div", { style: D.emptyState, children: /* @__PURE__ */ a("span", { style: D.emptyText, children: "Loading report..." }) });
3468
- if (h.status === "error")
3469
- return /* @__PURE__ */ a("div", { style: D.emptyState, children: /* @__PURE__ */ m("span", { style: { ...D.emptyText, color: "var(--vscode-errorForeground)" }, children: [
3451
+ const c = e.explorerModel.reportModel;
3452
+ if (c) {
3453
+ const u = c.state.read(r);
3454
+ if (u.status === "loading")
3455
+ return /* @__PURE__ */ a("div", { style: E.emptyState, children: /* @__PURE__ */ a("span", { style: E.emptyText, children: "Loading report..." }) });
3456
+ if (u.status === "error")
3457
+ return /* @__PURE__ */ a("div", { style: E.emptyState, children: /* @__PURE__ */ g("span", { style: { ...E.emptyText, color: "var(--vscode-errorForeground)" }, children: [
3470
3458
  "Failed to load report: ",
3471
- h.message
3459
+ u.message
3472
3460
  ] }) });
3473
3461
  }
3474
- return /* @__PURE__ */ a("div", { style: D.emptyState, children: /* @__PURE__ */ a("span", { style: D.emptyText, children: "Select a component or folder to preview" }) });
3462
+ return /* @__PURE__ */ a("div", { style: E.emptyState, children: /* @__PURE__ */ a("span", { style: E.emptyText, children: "Select a component or folder to preview" }) });
3475
3463
  }
3476
- const d = ge(s);
3477
- return /* @__PURE__ */ a("div", { ref: e.setScrollContainerRef, style: D.scrollContainer, children: /* @__PURE__ */ a("div", { style: { position: "relative", height: d }, children: t.slice(o, i).map((l, h) => {
3478
- const u = o + h, { top: g } = s[u], b = It(l), p = Ze(Qe(l)), _ = u > 0 ? Ze(Qe(t[u - 1])) : void 0, x = Nn(p, _, b);
3479
- return /* @__PURE__ */ m(
3464
+ const d = fe(s);
3465
+ return /* @__PURE__ */ a("div", { ref: e.setScrollContainerRef, style: E.scrollContainer, children: /* @__PURE__ */ a("div", { style: { position: "relative", height: d }, children: t.slice(o, i).map((c, u) => {
3466
+ const h = o + u, { top: p } = s[h], m = It(c), b = Qe(Je(c)), S = h > 0 ? Qe(Je(t[h - 1])) : void 0, C = Vn(b, S, m);
3467
+ return /* @__PURE__ */ g(
3480
3468
  "div",
3481
3469
  {
3482
- ref: (y) => e.observeRowElement(y, b),
3483
- style: { position: "absolute", top: g, left: se, right: se },
3470
+ ref: (_) => e.observeRowElement(_, m),
3471
+ style: { position: "absolute", top: p, left: ne, right: ne },
3484
3472
  children: [
3485
- x.map((y) => {
3486
- const T = Vn(y.depth);
3487
- return /* @__PURE__ */ a(T, { style: Mn(y.depth), children: /* @__PURE__ */ a(
3473
+ C.map((_) => {
3474
+ const M = Mn(_.depth);
3475
+ return /* @__PURE__ */ a(M, { style: Fn(_.depth), children: /* @__PURE__ */ a(
3488
3476
  "a",
3489
3477
  {
3490
- href: vt("component", y.nodeId),
3491
- style: D.headingLink,
3492
- onClick: (S) => {
3493
- S.preventDefault(), e.explorerModel.selectNode(y.nodeId);
3478
+ href: vt("component", _.nodeId),
3479
+ style: E.headingLink,
3480
+ onClick: (F) => {
3481
+ F.preventDefault(), e.explorerModel.selectNode(_.nodeId);
3494
3482
  },
3495
- children: y.name
3483
+ children: _.name
3496
3484
  }
3497
- ) }, y.depth);
3485
+ ) }, _.depth);
3498
3486
  }),
3499
- l.type === "single" ? /* @__PURE__ */ a(yt, { fixture: l.fixture, compact: !1 }) : l.type === "variants" ? /* @__PURE__ */ a(En, { row: l, onSelect: e.explorerModel.selectNode }) : l.type === "screenshot-comparison" && e.explorerModel.daemon ? /* @__PURE__ */ a(
3500
- fn,
3487
+ c.type === "single" ? /* @__PURE__ */ a(yt, { fixture: c.fixture, compact: !1 }) : c.type === "variants" ? /* @__PURE__ */ a(Bn, { row: c, onSelect: e.explorerModel.selectNode }) : c.type === "screenshot-comparison" && e.explorerModel.daemon ? /* @__PURE__ */ a(
3488
+ gn,
3501
3489
  {
3502
- name: l.name,
3503
- path: l.path,
3504
- items: l.items,
3490
+ name: c.name,
3491
+ path: c.path,
3492
+ items: c.items,
3505
3493
  daemon: e.explorerModel.daemon,
3506
3494
  baselineSession: e.baselineSessionName,
3507
3495
  currentSession: e.currentSessionName
3508
3496
  }
3509
- ) : l.type === "report-comparison" && e.explorerModel.reportModel ? /* @__PURE__ */ a(
3510
- yn,
3497
+ ) : c.type === "report-comparison" && e.explorerModel.reportModel ? /* @__PURE__ */ a(
3498
+ xn,
3511
3499
  {
3512
- name: l.name,
3513
- path: l.path,
3514
- items: l.items,
3500
+ name: c.name,
3501
+ path: c.path,
3502
+ items: c.items,
3515
3503
  reportModel: e.explorerModel.reportModel
3516
3504
  }
3517
3505
  ) : null
3518
3506
  ]
3519
3507
  },
3520
- b
3508
+ m
3521
3509
  );
3522
3510
  }) }) });
3523
3511
  }
3524
- ), En = O(
3512
+ ), Bn = k(
3525
3513
  {
3526
3514
  row: f.const(),
3527
3515
  onSelect: f.const()
3528
3516
  },
3529
3517
  (r, e) => {
3530
3518
  const t = e.row;
3531
- return /* @__PURE__ */ a("div", { style: D.variantsContent, children: t.fixtures.map((n) => /* @__PURE__ */ a(yt, { fixture: n, compact: !0, onSelect: e.onSelect }, n.id)) });
3519
+ return /* @__PURE__ */ a("div", { style: E.variantsContent, children: t.fixtures.map((n) => /* @__PURE__ */ a(yt, { fixture: n, compact: !0, onSelect: e.onSelect }, n.id)) });
3532
3520
  }
3533
- ), D = {
3521
+ ), E = {
3534
3522
  scrollContainer: {
3535
3523
  flex: 1,
3536
3524
  overflow: "auto",
@@ -3557,41 +3545,41 @@ const Dn = A(
3557
3545
  textDecoration: "none",
3558
3546
  color: "inherit"
3559
3547
  }
3560
- }, Bn = A(
3561
- Mr,
3548
+ }, An = A(
3549
+ Fr,
3562
3550
  { daemonModel: f.const(), reportModel: f.const() },
3563
3551
  (r, e) => {
3564
3552
  const t = e.leftSidebarVisible.read(r), n = e.rightSidebarVisible.read(r), s = e.isDarkTheme.read(r), o = e.selectedNode.read(r);
3565
- return /* @__PURE__ */ m("div", { className: s ? "vscode-theme default-dark-plus" : "vscode-theme default-light-plus", style: v.container, children: [
3566
- t && /* @__PURE__ */ a(Yr, { model: e }),
3567
- /* @__PURE__ */ m("div", { style: v.centerArea, children: [
3568
- /* @__PURE__ */ a(jr, { model: e }),
3553
+ return /* @__PURE__ */ g("div", { className: s ? "vscode-theme default-dark-plus" : "vscode-theme default-light-plus", style: v.container, children: [
3554
+ t && /* @__PURE__ */ a(en, { model: e }),
3555
+ /* @__PURE__ */ g("div", { style: v.centerArea, children: [
3556
+ /* @__PURE__ */ a(Pr, { model: e }),
3569
3557
  /* @__PURE__ */ a(Dn, { model: e })
3570
3558
  ] }),
3571
- n && /* @__PURE__ */ a(nn, { selectedNode: o })
3559
+ n && /* @__PURE__ */ a(sn, { selectedNode: o })
3572
3560
  ] });
3573
3561
  }
3574
3562
  );
3575
- var An = class me {
3563
+ var $n = class ge {
3576
3564
  constructor(e) {
3577
3565
  this.iterator = e;
3578
3566
  }
3579
3567
  static fromIterable(e) {
3580
- return new me(e[Symbol.asyncIterator]());
3568
+ return new ge(e[Symbol.asyncIterator]());
3581
3569
  }
3582
3570
  static fromFn(e) {
3583
- return new me(e());
3571
+ return new ge(e());
3584
3572
  }
3585
3573
  [Symbol.asyncIterator]() {
3586
3574
  return this.iterator;
3587
3575
  }
3588
- }, $n = class extends Error {
3576
+ }, zn = class extends Error {
3589
3577
  constructor(r, e, t) {
3590
3578
  super(t), this.statusCode = r, this.method = e, this.name = "ApiError";
3591
3579
  }
3592
- }, zn = class {
3580
+ }, Ln = class {
3593
3581
  constructor(r) {
3594
- c(this, "methods", this._createProxy(""));
3582
+ l(this, "methods", this._createProxy(""));
3595
3583
  this._request = r;
3596
3584
  }
3597
3585
  _createProxy(r) {
@@ -3605,8 +3593,8 @@ var An = class me {
3605
3593
  });
3606
3594
  }
3607
3595
  };
3608
- function Ln(r, e) {
3609
- return new zn(async (t, n) => {
3596
+ function Hn(r, e) {
3597
+ return new Ln(async (t, n) => {
3610
3598
  var d;
3611
3599
  const s = await fetch(`${r}/${t}`, {
3612
3600
  method: "POST",
@@ -3617,48 +3605,48 @@ function Ln(r, e) {
3617
3605
  body: JSON.stringify(n)
3618
3606
  });
3619
3607
  if (s.status !== 200) {
3620
- const l = await s.json().catch(() => null);
3621
- let h;
3622
- throw l && typeof l == "object" && "errorMessage" in l ? h = `${l.errorMessage}` : h = `Error calling API method ${t}: ${JSON.stringify(l)} (Status: ${s.status}, Status Text: ${s.statusText})`, new $n(s.status, t, h);
3608
+ const c = await s.json().catch(() => null);
3609
+ let u;
3610
+ throw c && typeof c == "object" && "errorMessage" in c ? u = `${c.errorMessage}` : u = `Error calling API method ${t}: ${JSON.stringify(c)} (Status: ${s.status}, Status Text: ${s.statusText})`, new zn(s.status, t, u);
3623
3611
  }
3624
3612
  const o = s.headers.get("Content-Type");
3625
- return o != null && o.startsWith("application/jsonl") ? An.fromFn(async function* () {
3626
- var b;
3627
- const l = (b = s.body) == null ? void 0 : b.getReader();
3628
- if (!l)
3613
+ return o != null && o.startsWith("application/jsonl") ? $n.fromFn(async function* () {
3614
+ var m;
3615
+ const c = (m = s.body) == null ? void 0 : m.getReader();
3616
+ if (!c)
3629
3617
  return;
3630
- let h = "";
3631
- const u = new TextDecoder("utf-8");
3618
+ let u = "";
3619
+ const h = new TextDecoder("utf-8");
3632
3620
  for (; ; ) {
3633
- const { done: p, value: _ } = await l.read();
3634
- if (p)
3621
+ const { done: b, value: S } = await c.read();
3622
+ if (b)
3635
3623
  break;
3636
- h += u.decode(_, { stream: !0 });
3637
- let x;
3638
- for (; (x = h.indexOf(`
3624
+ u += h.decode(S, { stream: !0 });
3625
+ let C;
3626
+ for (; (C = u.indexOf(`
3639
3627
  `)) >= 0; ) {
3640
- const y = h.slice(0, x).trim();
3641
- h = h.slice(x + 1), y.length > 0 && (yield JSON.parse(y));
3628
+ const _ = u.slice(0, C).trim();
3629
+ u = u.slice(C + 1), _.length > 0 && (yield JSON.parse(_));
3642
3630
  }
3643
3631
  }
3644
- const g = h.trim();
3645
- g.length > 0 && (yield JSON.parse(g));
3632
+ const p = u.trim();
3633
+ p.length > 0 && (yield JSON.parse(p));
3646
3634
  }) : await s.json();
3647
3635
  });
3648
3636
  }
3649
- class Hn {
3637
+ class jn {
3650
3638
  constructor(e) {
3651
- c(this, "_sourceTreeIds", C(this, /* @__PURE__ */ new Map()));
3652
- c(this, "_sessions", C(this, []));
3653
- c(this, "_screenshotCache", /* @__PURE__ */ new Map());
3654
- c(this, "_client");
3655
- c(this, "_eventStreamAbort", null);
3656
- c(this, "sessionName");
3639
+ l(this, "_sourceTreeIds", x(this, /* @__PURE__ */ new Map()));
3640
+ l(this, "_sessions", x(this, []));
3641
+ l(this, "_screenshotCache", /* @__PURE__ */ new Map());
3642
+ l(this, "_client");
3643
+ l(this, "_eventStreamAbort", null);
3644
+ l(this, "sessionName");
3657
3645
  /** Observable map of sessionName → current sourceTreeId */
3658
- c(this, "sourceTreeIds", this._sourceTreeIds);
3646
+ l(this, "sourceTreeIds", this._sourceTreeIds);
3659
3647
  /** Observable list of sessions from the daemon */
3660
- c(this, "sessions", this._sessions);
3661
- this.config = e, this.sessionName = e.sessionName, this._client = Ln("/__explorer/daemon-api");
3648
+ l(this, "sessions", this._sessions);
3649
+ this.config = e, this.sessionName = e.sessionName, this._client = Hn("/__explorer/daemon-api");
3662
3650
  }
3663
3651
  /**
3664
3652
  * Initializes the model: fetches initial session info and starts listening to events.
@@ -3756,13 +3744,13 @@ class Hn {
3756
3744
  }
3757
3745
  }
3758
3746
  }
3759
- function Pn() {
3747
+ function Un() {
3760
3748
  return window.__EXPLORER_DAEMON__;
3761
3749
  }
3762
- class jn {
3750
+ class Pn {
3763
3751
  constructor(e) {
3764
- c(this, "state", C(this, { status: "loading" }));
3765
- c(this, "_baseUrl");
3752
+ l(this, "state", x(this, { status: "loading" }));
3753
+ l(this, "_baseUrl");
3766
3754
  this.reportUrl = e;
3767
3755
  const t = e.lastIndexOf("/");
3768
3756
  this._baseUrl = t >= 0 ? e.slice(0, t + 1) : "", this._fetch();
@@ -3772,7 +3760,7 @@ class jn {
3772
3760
  }
3773
3761
  buildTree(e) {
3774
3762
  const t = this.state.read(e);
3775
- return t.status !== "ready" ? { id: "", name: "Report", type: "folder", children: [], labels: [] } : Un(t.report.fixtures);
3763
+ return t.status !== "ready" ? { id: "", name: "Report", type: "folder", children: [], labels: [] } : Wn(t.report.fixtures);
3776
3764
  }
3777
3765
  async _fetch() {
3778
3766
  this.state.set({ status: "loading" }, void 0);
@@ -3787,36 +3775,36 @@ class jn {
3787
3775
  }
3788
3776
  }
3789
3777
  }
3790
- function Un(r) {
3778
+ function Wn(r) {
3791
3779
  const e = { id: "", name: "Components", type: "folder", children: [], labels: [] };
3792
3780
  for (const [t, n] of Object.entries(r)) {
3793
3781
  const s = t.split("/");
3794
3782
  let o = e;
3795
3783
  for (let i = 0; i < s.length; i++) {
3796
- const d = s[i], l = i === s.length - 1, h = s.slice(0, i + 1).join("/");
3797
- if (l)
3784
+ const d = s[i], c = i === s.length - 1, u = s.slice(0, i + 1).join("/");
3785
+ if (c)
3798
3786
  o.children.push({
3799
- id: h,
3787
+ id: u,
3800
3788
  name: d,
3801
3789
  type: "component",
3802
3790
  reportEntry: n,
3803
3791
  labels: []
3804
3792
  });
3805
3793
  else {
3806
- let u = o.children.find((g) => g.type === "folder" && g.name === d);
3807
- u || (u = { id: h, name: d, type: "folder", children: [], labels: [] }, o.children.push(u)), o = u;
3794
+ let h = o.children.find((p) => p.type === "folder" && p.name === d);
3795
+ h || (h = { id: u, name: d, type: "folder", children: [], labels: [] }, o.children.push(h)), o = h;
3808
3796
  }
3809
3797
  }
3810
3798
  }
3811
3799
  return e;
3812
3800
  }
3813
- class ns {
3801
+ class ss {
3814
3802
  constructor(e, t) {
3815
- c(this, "_root");
3816
- c(this, "_registry", new _r());
3817
- c(this, "_daemonModel");
3818
- c(this, "_reportModel");
3819
- this._populateRegistry(t), this._reportModel = this._initializeReportModel(), this._daemonModel = this._reportModel ? void 0 : this._initializeDaemonModel(), this._root = Mt(e), this._root.render(Bt(Bn, {
3803
+ l(this, "_root");
3804
+ l(this, "_registry", new yr());
3805
+ l(this, "_daemonModel");
3806
+ l(this, "_reportModel");
3807
+ this._populateRegistry(t), this._reportModel = this._initializeReportModel(), this._daemonModel = this._reportModel ? void 0 : this._initializeDaemonModel(), this._root = Ft(e), this._root.render(At(An, {
3820
3808
  registry: this._registry,
3821
3809
  daemonModel: this._daemonModel,
3822
3810
  reportModel: this._reportModel
@@ -3825,13 +3813,13 @@ class ns {
3825
3813
  _initializeReportModel() {
3826
3814
  const t = new URLSearchParams(location.search).get("report");
3827
3815
  if (t)
3828
- return new jn(t);
3816
+ return new Pn(t);
3829
3817
  }
3830
3818
  _initializeDaemonModel() {
3831
- const e = Pn();
3819
+ const e = Un();
3832
3820
  if (!e)
3833
3821
  return;
3834
- const t = new Hn(e);
3822
+ const t = new jn(e);
3835
3823
  return t.initialize().catch((n) => {
3836
3824
  console.error("[ExplorerApp] Failed to initialize DaemonModel:", n);
3837
3825
  }), t;
@@ -3864,52 +3852,52 @@ class ns {
3864
3852
  }
3865
3853
  }
3866
3854
  export {
3867
- Er as ChevronDownIcon,
3855
+ Br as ChevronDownIcon,
3868
3856
  Dr as ChevronRightIcon,
3869
- rs as CliRuntime,
3870
- Br as ComponentIcon,
3871
- Hn as DaemonModel,
3872
- Bn as Explorer,
3873
- ns as ExplorerApp,
3874
- Mr as ExplorerModel,
3875
- _r as FixtureRegistry,
3876
- Ar as FolderIcon,
3877
- Yr as LeftSidebar,
3878
- Hr as MoonIcon,
3879
- $r as PanelLeftIcon,
3880
- zr as PanelRightIcon,
3881
- jn as ReportModel,
3882
- nn as RightSidebar,
3883
- Lr as SunIcon,
3884
- jr as TitleBar,
3885
- ie as TitleBarButton,
3886
- qr as TreeItem,
3857
+ ns as CliRuntime,
3858
+ Ar as ComponentIcon,
3859
+ jn as DaemonModel,
3860
+ An as Explorer,
3861
+ ss as ExplorerApp,
3862
+ Fr as ExplorerModel,
3863
+ yr as FixtureRegistry,
3864
+ $r as FolderIcon,
3865
+ en as LeftSidebar,
3866
+ jr as MoonIcon,
3867
+ zr as PanelLeftIcon,
3868
+ Lr as PanelRightIcon,
3869
+ Pn as ReportModel,
3870
+ sn as RightSidebar,
3871
+ Hr as SunIcon,
3872
+ Pr as TitleBar,
3873
+ oe as TitleBarButton,
3874
+ Kr as TreeItem,
3887
3875
  bt as TreeView,
3888
- At as VIEWPORT_SIZES,
3889
- is as asyncRender,
3890
- Pt as collectComponents,
3891
- Ne as createComponentDefinition,
3892
- ae as createFixtureTree,
3893
- as as defineFixture,
3894
- ds as defineFixtureGroup,
3876
+ $t as VIEWPORT_SIZES,
3877
+ as as asyncRender,
3878
+ Ut as collectComponents,
3879
+ Oe as createComponentDefinition,
3880
+ ie as createFixtureTree,
3881
+ ds as defineFixture,
3882
+ cs as defineFixtureGroup,
3895
3883
  ls as defineFixtureVariants,
3896
- Me as findNodeByPath,
3897
- Te as fixtureGroupBrand,
3898
- ke as fixtureVariantsBrand,
3899
- zt as getDefaultPropertyValues,
3900
- ts as isComponentDefinition,
3901
- _e as isFixtureGroup,
3902
- ye as isFixtureVariants,
3903
- be as isSingleFixture,
3904
- Re as mergeStyles,
3905
- Zn as parseFixtureExport,
3906
- Yn as parseFixtureGroup,
3907
- es as parseFixtureVariants,
3908
- Xn as parseSingleFixture,
3909
- $t as resolveViewport,
3910
- Ie as singleFixtureBrand,
3884
+ Ve as findNodeByPath,
3885
+ Re as fixtureGroupBrand,
3886
+ Te as fixtureVariantsBrand,
3887
+ Lt as getDefaultPropertyValues,
3888
+ rs as isComponentDefinition,
3889
+ be as isFixtureGroup,
3890
+ _e as isFixtureVariants,
3891
+ ve as isSingleFixture,
3892
+ Ce as mergeStyles,
3893
+ Xn as parseFixtureExport,
3894
+ es as parseFixtureGroup,
3895
+ ts as parseFixtureVariants,
3896
+ Yn as parseSingleFixture,
3897
+ zt as resolveViewport,
3898
+ ke as singleFixtureBrand,
3911
3899
  v as styles,
3912
- cs as syncRender,
3900
+ hs as syncRender,
3913
3901
  gt as toExplorerTree
3914
3902
  };
3915
3903
  //# sourceMappingURL=viewer.js.map