pixelagent 0.1.20 → 0.1.22

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.
@@ -1,54 +1,54 @@
1
- import { jsxs as d, Fragment as q, jsx as n } from "react/jsx-runtime";
2
- import { useState as A, useEffect as _, useRef as X, useMemo as Me, useLayoutEffect as Kt, useCallback as $, useId as jt } from "react";
3
- import { getElementDisplayLabel as Xe, captureTextSnapshot as tt, captureInlineStyles as nt, restoreInlineStyles as ke, restoreTextSnapshot as Ae, getPreviewTargets as Re, clearTailwindStatePreview as Se, applyTailwindStatePreview as ze, setEditableTextPreview as rt, getRelevantComputedStyles as Ce, getEditableTextInfo as ve, readStateRuleDeclarations as qt, readReactSource as Ge, detectStylingSystem as kt, countElementInstances as Ct, getScopeSelector as Mt, getCssSelector as At, copyToClipboard as St, getWindowSelectionText as Lt, getNearestReactComponentName as Jt, getDomPath as Zt, resolveElementFromEntry as $t, getAnnotationSessionDisplay as Qt, loadAnnotationSession as en, saveAnnotationSession as tn, DEFAULT_PIXEL_AGENT_UI_SETTINGS as nn, readHostThemeFromDocument as it, resolvePixelAgentChrome as rn, applyHostThemeToDocument as on, pixelAgentRootAttributes as an, getElementsInArea as sn, formatAllAnnotations as ln, formatAnnotation as cn } from "@pixelagent/shared";
1
+ import { jsxs as c, Fragment as q, jsx as n } from "react/jsx-runtime";
2
+ import { useState as A, useEffect as _, useRef as j, useMemo as Me, useLayoutEffect as Kt, useCallback as L, useId as qt } from "react";
3
+ import { getElementDisplayLabel as je, captureTextSnapshot as tt, captureInlineStyles as nt, restoreInlineStyles as Ne, restoreTextSnapshot as Ae, getPreviewTargets as $e, clearTailwindStatePreview as ze, applyTailwindStatePreview as Be, setEditableTextPreview as at, getRelevantComputedStyles as Ce, getEditableTextInfo as xe, readStateRuleDeclarations as Jt, readReactSource as Xe, detectStylingSystem as Ct, countElementInstances as Mt, getScopeSelector as At, getCssSelector as zt, copyToClipboard as St, getWindowSelectionText as Lt, getNearestReactComponentName as Zt, getDomPath as Qt, resolveElementFromEntry as Et, getAnnotationSessionDisplay as en, loadAnnotationSession as tn, saveAnnotationSession as nn, DEFAULT_PIXEL_AGENT_UI_SETTINGS as an, readHostThemeFromDocument as rt, resolvePixelAgentChrome as rn, applyHostThemeToDocument as on, pixelAgentRootAttributes as sn, getElementsInArea as ln, formatAllAnnotations as pn, formatAnnotation as cn } from "@pixelagent/shared";
4
4
  export * from "@pixelagent/shared";
5
- import { createPortal as Ke } from "react-dom";
6
- function Et({
5
+ import { createPortal as Ge } from "react-dom";
6
+ function It({
7
7
  element: e,
8
8
  selected: t,
9
- multiSelected: i = [],
10
- primarySelected: r = null
9
+ multiSelected: r = [],
10
+ primarySelected: a = null
11
11
  }) {
12
- const [o, s] = A([]), a = r ?? t;
12
+ const [o, s] = A([]), i = a ?? t;
13
13
  if (_(() => {
14
- const l = /* @__PURE__ */ new Map(), f = i.length > 0;
15
- e && !t && !f && l.set(e, !1), t && l.set(t, !0);
16
- for (const m of i)
17
- l.set(m, !0);
14
+ const l = /* @__PURE__ */ new Map(), g = r.length > 0;
15
+ e && !t && !g && l.set(e, !1), t && l.set(t, !0);
16
+ for (const h of r)
17
+ l.set(h, !0);
18
18
  if (l.size === 0) {
19
19
  s([]);
20
20
  return;
21
21
  }
22
- const p = () => {
22
+ const f = () => {
23
23
  s(
24
- Array.from(l.entries()).map(([m, g]) => ({
25
- rect: m.getBoundingClientRect(),
26
- label: Xe(m),
27
- isSelected: g,
28
- isPrimary: a !== null && m === a
24
+ Array.from(l.entries()).map(([h, m]) => ({
25
+ rect: h.getBoundingClientRect(),
26
+ label: je(h),
27
+ isSelected: m,
28
+ isPrimary: i !== null && h === i
29
29
  }))
30
30
  );
31
31
  };
32
- p();
33
- const v = Array.from(l.keys()).map((m) => {
34
- const g = new ResizeObserver(p);
35
- return g.observe(m), g;
32
+ f();
33
+ const x = Array.from(l.keys()).map((h) => {
34
+ const m = new ResizeObserver(f);
35
+ return m.observe(h), m;
36
36
  });
37
- return window.addEventListener("scroll", p, !0), window.addEventListener("resize", p), () => {
38
- for (const m of v) m.disconnect();
39
- window.removeEventListener("scroll", p, !0), window.removeEventListener("resize", p);
37
+ return window.addEventListener("scroll", f, !0), window.addEventListener("resize", f), () => {
38
+ for (const h of x) h.disconnect();
39
+ window.removeEventListener("scroll", f, !0), window.removeEventListener("resize", f);
40
40
  };
41
- }, [e, t, i, a]), o.length === 0) return null;
42
- const c = o.find((l) => l.isPrimary) ?? o.find((l) => l.isSelected) ?? o[0], u = o.filter((l) => l.isSelected).length;
43
- return /* @__PURE__ */ d(q, { children: [
44
- o.map((l, f) => /* @__PURE__ */ n(
41
+ }, [e, t, r, i]), o.length === 0) return null;
42
+ const p = o.find((l) => l.isPrimary) ?? o.find((l) => l.isSelected) ?? o[0], d = o.filter((l) => l.isSelected).length;
43
+ return /* @__PURE__ */ c(q, { children: [
44
+ o.map((l, g) => /* @__PURE__ */ n(
45
45
  "div",
46
46
  {
47
47
  className: [
48
48
  "pa-highlight",
49
49
  l.isSelected ? "pa-highlight-selected" : "",
50
50
  l.isPrimary ? "pa-highlight-primary" : "",
51
- l.isSelected && !l.isPrimary && u > 1 ? "pa-highlight-scope" : ""
51
+ l.isSelected && !l.isPrimary && d > 1 ? "pa-highlight-scope" : ""
52
52
  ].filter(Boolean).join(" "),
53
53
  style: {
54
54
  top: l.rect.top,
@@ -57,106 +57,106 @@ function Et({
57
57
  height: l.rect.height
58
58
  }
59
59
  },
60
- `${l.label}-${f}`
60
+ `${l.label}-${g}`
61
61
  )),
62
62
  /* @__PURE__ */ n(
63
63
  "div",
64
64
  {
65
65
  className: "pa-tooltip",
66
66
  style: {
67
- top: Math.max(0, c.rect.top - 28),
68
- left: c.rect.left
67
+ top: Math.max(0, p.rect.top - 28),
68
+ left: p.rect.left
69
69
  },
70
- children: u > 1 ? `${u} instances · ${c.label}` : c.label
70
+ children: d > 1 ? `${d} instances · ${p.label}` : p.label
71
71
  }
72
72
  )
73
73
  ] });
74
74
  }
75
- const It = 0.35, dn = 0.48;
76
- function un(e, t, i, r = It) {
75
+ const $t = 0.35, dn = 0.48;
76
+ function fn(e, t, r, a = $t) {
77
77
  if (e < 8 || t < 8) return null;
78
- const o = 1, s = Math.max(1, Math.round(e * o)), a = Math.max(1, Math.round(t * o)), c = document.createElement("canvas");
79
- c.width = s, c.height = a;
80
- const u = c.getContext("2d");
81
- if (!u) return null;
82
- const l = u.createImageData(s, a), f = l.data, p = Math.min(0.5, i / Math.min(e, t)), v = 0.3, m = 0.2, g = Math.max(0.4, p + 0.1);
83
- let y = 0;
84
- const S = new Float32Array(s * a * 2);
78
+ const o = 1, s = Math.max(1, Math.round(e * o)), i = Math.max(1, Math.round(t * o)), p = document.createElement("canvas");
79
+ p.width = s, p.height = i;
80
+ const d = p.getContext("2d");
81
+ if (!d) return null;
82
+ const l = d.createImageData(s, i), g = l.data, f = Math.min(0.5, r / Math.min(e, t)), x = 0.3, h = 0.2, m = Math.max(0.4, f + 0.1);
83
+ let v = 0;
84
+ const z = new Float32Array(s * i * 2);
85
85
  let w = 0;
86
- for (let N = 0; N < a; N++)
86
+ for (let k = 0; k < i; k++)
87
87
  for (let E = 0; E < s; E++) {
88
- const z = E / s - 0.5, R = N / a - 0.5, x = pn(z, R, v, m, g), I = ot(0.8, 0, x - 0.15), L = ot(0, 1, I), h = (z * L + 0.5) * s - E, F = (R * L + 0.5) * a - N;
89
- Math.abs(h) > y && (y = Math.abs(h)), Math.abs(F) > y && (y = Math.abs(F)), S[w++] = h, S[w++] = F;
88
+ const B = E / s - 0.5, $ = k / i - 0.5, y = un(B, $, x, h, m), I = ot(0.8, 0, y - 0.15), S = ot(0, 1, I), u = (B * S + 0.5) * s - E, O = ($ * S + 0.5) * i - k;
89
+ Math.abs(u) > v && (v = Math.abs(u)), Math.abs(O) > v && (v = Math.abs(O)), z[w++] = u, z[w++] = O;
90
90
  }
91
- if (y === 0) return null;
92
- y *= 0.4 * r;
93
- let k = 0;
94
- for (let N = 0; N < f.length; N += 4) {
95
- const E = S[k++] / y + 0.5, z = S[k++] / y + 0.5;
96
- f[N] = E * 255, f[N + 1] = z * 255, f[N + 2] = 0, f[N + 3] = 255;
91
+ if (v === 0) return null;
92
+ v *= 0.4 * a;
93
+ let N = 0;
94
+ for (let k = 0; k < g.length; k += 4) {
95
+ const E = z[N++] / v + 0.5, B = z[N++] / v + 0.5;
96
+ g[k] = E * 255, g[k + 1] = B * 255, g[k + 2] = 0, g[k + 3] = 255;
97
97
  }
98
- return u.putImageData(l, 0, 0), {
99
- href: c.toDataURL("image/png"),
100
- scale: y / o,
98
+ return d.putImageData(l, 0, 0), {
99
+ href: p.toDataURL("image/png"),
100
+ scale: v / o,
101
101
  width: s,
102
- height: a
102
+ height: i
103
103
  };
104
104
  }
105
- function pn(e, t, i, r, o) {
106
- const s = Math.abs(e) - i + o, a = Math.abs(t) - r + o;
107
- return Math.min(Math.max(s, a), 0) + Math.hypot(Math.max(s, 0), Math.max(a, 0)) - o;
105
+ function un(e, t, r, a, o) {
106
+ const s = Math.abs(e) - r + o, i = Math.abs(t) - a + o;
107
+ return Math.min(Math.max(s, i), 0) + Math.hypot(Math.max(s, 0), Math.max(i, 0)) - o;
108
108
  }
109
- function ot(e, t, i) {
110
- const r = Math.max(0, Math.min(1, (i - e) / (t - e)));
111
- return r * r * (3 - 2 * r);
109
+ function ot(e, t, r) {
110
+ const a = Math.max(0, Math.min(1, (r - e) / (t - e)));
111
+ return a * a * (3 - 2 * a);
112
112
  }
113
- function Ue() {
113
+ function We() {
114
114
  if (typeof navigator > "u") return !1;
115
115
  const e = navigator.userAgent;
116
116
  return !(/AppleWebKit/i.test(e) && !/Chrome|Chromium|Edg|OPR|CriOS|FxiOS/i.test(e) || /Firefox/i.test(e));
117
117
  }
118
- const hn = {
118
+ const gn = {
119
119
  default: "blur(4px) saturate(130%)",
120
120
  /** Toolbar — slightly stronger frost + refraction chain. */
121
121
  enhanced: "blur(6px) saturate(138%)"
122
122
  };
123
- function fn(e, t = "default") {
124
- const i = hn[t], o = e !== null && Ue() ? `${i} url(#${e})` : i;
123
+ function hn(e, t = "default") {
124
+ const r = gn[t], o = e !== null && We() ? `${r} url(#${e})` : r;
125
125
  return {
126
126
  backdropFilter: o,
127
127
  WebkitBackdropFilter: o
128
128
  };
129
129
  }
130
130
  let mn = 0;
131
- function Rt({
131
+ function Tt({
132
132
  shape: e = "rect",
133
133
  cornerRadius: t,
134
- tint: i = "neutral",
135
- intensity: r = "default",
134
+ tint: r = "neutral",
135
+ intensity: a = "default",
136
136
  className: o = "",
137
137
  style: s,
138
- children: a
138
+ children: i
139
139
  }) {
140
- const c = t ?? (e === "capsule" ? 9999 : 20), u = r === "enhanced" ? dn : It, l = X(null), f = Me(() => `pa-lg-${++mn}`, []), [p, v] = A(null);
140
+ const p = t ?? (e === "capsule" ? 9999 : 20), d = a === "enhanced" ? dn : $t, l = j(null), g = Me(() => `pa-lg-${++mn}`, []), [f, x] = A(null);
141
141
  Kt(() => {
142
- const g = l.current;
143
- if (!g) return;
144
- let y = 0;
145
- const S = () => {
146
- cancelAnimationFrame(y), y = requestAnimationFrame(() => {
147
- const k = g.getBoundingClientRect(), N = Math.round(k.width), E = Math.round(k.height);
148
- if (N < 8 || E < 8) return;
149
- const z = e === "capsule" ? E / 2 : Math.min(c, N / 2, E / 2), R = un(N, E, z, u);
150
- R && v(R);
142
+ const m = l.current;
143
+ if (!m) return;
144
+ let v = 0;
145
+ const z = () => {
146
+ cancelAnimationFrame(v), v = requestAnimationFrame(() => {
147
+ const N = m.getBoundingClientRect(), k = Math.round(N.width), E = Math.round(N.height);
148
+ if (k < 8 || E < 8) return;
149
+ const B = e === "capsule" ? E / 2 : Math.min(p, k / 2, E / 2), $ = fn(k, E, B, d);
150
+ $ && x($);
151
151
  });
152
152
  };
153
- S();
154
- const w = new ResizeObserver(S);
155
- return w.observe(g), () => {
156
- cancelAnimationFrame(y), w.disconnect();
153
+ z();
154
+ const w = new ResizeObserver(z);
155
+ return w.observe(m), () => {
156
+ cancelAnimationFrame(v), w.disconnect();
157
157
  };
158
- }, [e, c, u]);
159
- const m = p && Ue() && typeof document < "u" ? Ke(
158
+ }, [e, p, d]);
159
+ const h = f && We() && typeof document < "u" ? Ge(
160
160
  /* @__PURE__ */ n(
161
161
  "svg",
162
162
  {
@@ -172,24 +172,24 @@ function Rt({
172
172
  overflow: "hidden",
173
173
  pointerEvents: "none"
174
174
  },
175
- children: /* @__PURE__ */ n("defs", { children: /* @__PURE__ */ d(
175
+ children: /* @__PURE__ */ n("defs", { children: /* @__PURE__ */ c(
176
176
  "filter",
177
177
  {
178
- id: f,
178
+ id: g,
179
179
  filterUnits: "userSpaceOnUse",
180
180
  colorInterpolationFilters: "sRGB",
181
181
  x: "0",
182
182
  y: "0",
183
- width: p.width,
184
- height: p.height,
183
+ width: f.width,
184
+ height: f.height,
185
185
  children: [
186
186
  /* @__PURE__ */ n(
187
187
  "feImage",
188
188
  {
189
- href: p.href,
190
- xlinkHref: p.href,
191
- width: p.width,
192
- height: p.height,
189
+ href: f.href,
190
+ xlinkHref: f.href,
191
+ width: f.width,
192
+ height: f.height,
193
193
  preserveAspectRatio: "none",
194
194
  result: "map"
195
195
  }
@@ -199,7 +199,7 @@ function Rt({
199
199
  {
200
200
  in: "SourceGraphic",
201
201
  in2: "map",
202
- scale: p.scale,
202
+ scale: f.scale,
203
203
  xChannelSelector: "R",
204
204
  yChannelSelector: "G"
205
205
  }
@@ -211,25 +211,25 @@ function Rt({
211
211
  ),
212
212
  document.body
213
213
  ) : null;
214
- return /* @__PURE__ */ d(q, { children: [
215
- m,
216
- /* @__PURE__ */ d(
214
+ return /* @__PURE__ */ c(q, { children: [
215
+ h,
216
+ /* @__PURE__ */ c(
217
217
  "div",
218
218
  {
219
219
  ref: l,
220
- className: `pa-glass-surface pa-glass-surface--${e} pa-glass-surface--${i} ${o}`.trim(),
220
+ className: `pa-glass-surface pa-glass-surface--${e} pa-glass-surface--${r} ${o}`.trim(),
221
221
  style: {
222
- borderRadius: e === "capsule" ? "999px" : `${c}px`,
223
- ...fn(
224
- p && Ue() ? f : null,
225
- r
222
+ borderRadius: e === "capsule" ? "999px" : `${p}px`,
223
+ ...hn(
224
+ f && We() ? g : null,
225
+ a
226
226
  ),
227
227
  ...s
228
228
  },
229
229
  children: [
230
230
  /* @__PURE__ */ n("div", { className: "pa-glass-surface-bg", "aria-hidden": "true" }),
231
231
  /* @__PURE__ */ n("div", { className: "pa-glass-surface-shine", "aria-hidden": "true" }),
232
- /* @__PURE__ */ n("div", { className: "pa-glass-surface-content", children: a })
232
+ /* @__PURE__ */ n("div", { className: "pa-glass-surface-content", children: i })
233
233
  ]
234
234
  }
235
235
  )
@@ -238,122 +238,122 @@ function Rt({
238
238
  function V({
239
239
  variant: e = "regular",
240
240
  className: t = "",
241
- children: i,
242
- ...r
241
+ children: r,
242
+ ...a
243
243
  }) {
244
244
  return /* @__PURE__ */ n(
245
245
  "button",
246
246
  {
247
247
  type: "button",
248
248
  className: `pa-glass-btn pa-glass-btn--${e} ${t}`.trim(),
249
- ...r,
250
- children: i
249
+ ...a,
250
+ children: r
251
251
  }
252
252
  );
253
253
  }
254
- function Pe({
254
+ function Re({
255
255
  variant: e = "sheet",
256
256
  side: t = "left",
257
- className: i = "",
258
- style: r,
257
+ className: r = "",
258
+ style: a,
259
259
  children: o
260
260
  }) {
261
261
  return /* @__PURE__ */ n(
262
- Rt,
262
+ Tt,
263
263
  {
264
264
  shape: "rect",
265
265
  cornerRadius: e === "popover" ? 16 : 20,
266
- className: `pa-glass-panel pa-glass-panel--${e} pa-glass-panel--${t} ${i}`.trim(),
267
- style: r,
266
+ className: `pa-glass-panel pa-glass-panel--${e} pa-glass-panel--${t} ${r}`.trim(),
267
+ style: a,
268
268
  children: o
269
269
  }
270
270
  );
271
271
  }
272
- function Tt({
272
+ function Rt({
273
273
  defaultPosition: e = null,
274
274
  computeDefaultPosition: t
275
275
  } = {}) {
276
- const [i, r] = A(e), [o, s] = A(!1), a = X(null), c = X(null), u = $(() => {
277
- if (i !== null) return;
278
- const m = c.current;
279
- if (!m) return;
280
- const g = m.getBoundingClientRect();
281
- r(
282
- t ? t(g) : {
283
- x: (window.innerWidth - g.width) / 2,
284
- y: window.innerHeight - g.height - 24
276
+ const [r, a] = A(e), [o, s] = A(!1), i = j(null), p = j(null), d = L(() => {
277
+ if (r !== null) return;
278
+ const h = p.current;
279
+ if (!h) return;
280
+ const m = h.getBoundingClientRect();
281
+ a(
282
+ t ? t(m) : {
283
+ x: (window.innerWidth - m.width) / 2,
284
+ y: window.innerHeight - m.height - 24
285
285
  }
286
286
  );
287
- }, [i, t]);
287
+ }, [r, t]);
288
288
  _(() => {
289
- u();
290
- }, [u]), _(() => {
291
- const m = () => {
292
- r((g) => {
293
- if (!g || !c.current) return g;
294
- const y = c.current.getBoundingClientRect();
289
+ d();
290
+ }, [d]), _(() => {
291
+ const h = () => {
292
+ a((m) => {
293
+ if (!m || !p.current) return m;
294
+ const v = p.current.getBoundingClientRect();
295
295
  return {
296
- x: Math.min(g.x, window.innerWidth - y.width),
297
- y: Math.min(g.y, window.innerHeight - y.height)
296
+ x: Math.min(m.x, window.innerWidth - v.width),
297
+ y: Math.min(m.y, window.innerHeight - v.height)
298
298
  };
299
299
  });
300
300
  };
301
- return window.addEventListener("resize", m), () => window.removeEventListener("resize", m);
301
+ return window.addEventListener("resize", h), () => window.removeEventListener("resize", h);
302
302
  }, []);
303
- const l = $(
304
- (m) => {
305
- if (m.button !== 0) return;
306
- const g = c.current;
307
- if (!g) return;
308
- let y = i;
309
- if (!y) {
310
- const S = g.getBoundingClientRect();
311
- y = { x: S.left, y: S.top }, r(y);
303
+ const l = L(
304
+ (h) => {
305
+ if (h.button !== 0) return;
306
+ const m = p.current;
307
+ if (!m) return;
308
+ let v = r;
309
+ if (!v) {
310
+ const z = m.getBoundingClientRect();
311
+ v = { x: z.left, y: z.top }, a(v);
312
312
  }
313
- a.current = {
314
- pointerId: m.pointerId,
315
- startX: m.clientX,
316
- startY: m.clientY,
317
- originX: y.x,
318
- originY: y.y
319
- }, s(!0), m.currentTarget.setPointerCapture(m.pointerId), m.preventDefault();
313
+ i.current = {
314
+ pointerId: h.pointerId,
315
+ startX: h.clientX,
316
+ startY: h.clientY,
317
+ originX: v.x,
318
+ originY: v.y
319
+ }, s(!0), h.currentTarget.setPointerCapture(h.pointerId), h.preventDefault();
320
320
  },
321
- [i]
322
- ), f = $((m) => {
323
- if (!a.current || a.current.pointerId !== m.pointerId) return;
324
- const g = c.current, y = (g == null ? void 0 : g.offsetWidth) ?? 320, S = (g == null ? void 0 : g.offsetHeight) ?? 48, w = m.clientX - a.current.startX, k = m.clientY - a.current.startY, N = Math.max(8, Math.min(window.innerWidth - y - 8, a.current.originX + w)), E = Math.max(8, Math.min(window.innerHeight - S - 8, a.current.originY + k));
325
- r({ x: N, y: E });
326
- }, []), p = $((m) => {
327
- if (!(!a.current || a.current.pointerId !== m.pointerId)) {
328
- a.current = null, s(!1);
321
+ [r]
322
+ ), g = L((h) => {
323
+ if (!i.current || i.current.pointerId !== h.pointerId) return;
324
+ const m = p.current, v = (m == null ? void 0 : m.offsetWidth) ?? 320, z = (m == null ? void 0 : m.offsetHeight) ?? 48, w = h.clientX - i.current.startX, N = h.clientY - i.current.startY, k = Math.max(8, Math.min(window.innerWidth - v - 8, i.current.originX + w)), E = Math.max(8, Math.min(window.innerHeight - z - 8, i.current.originY + N));
325
+ a({ x: k, y: E });
326
+ }, []), f = L((h) => {
327
+ if (!(!i.current || i.current.pointerId !== h.pointerId)) {
328
+ i.current = null, s(!1);
329
329
  try {
330
- m.currentTarget.releasePointerCapture(m.pointerId);
330
+ h.currentTarget.releasePointerCapture(h.pointerId);
331
331
  } catch {
332
332
  }
333
333
  }
334
- }, []), v = i !== null ? {
334
+ }, []), x = r !== null ? {
335
335
  position: "fixed",
336
- left: i.x,
337
- top: i.y,
336
+ left: r.x,
337
+ top: r.y,
338
338
  transform: "none",
339
339
  marginLeft: 0,
340
340
  bottom: "auto"
341
341
  } : void 0;
342
342
  return {
343
- elementRef: c,
344
- position: i,
343
+ elementRef: p,
344
+ position: r,
345
345
  isDragging: o,
346
- style: v,
346
+ style: x,
347
347
  dragHandleProps: {
348
348
  onPointerDown: l,
349
- onPointerMove: f,
350
- onPointerUp: p,
351
- onPointerCancel: p
349
+ onPointerMove: g,
350
+ onPointerUp: f,
351
+ onPointerCancel: f
352
352
  }
353
353
  };
354
354
  }
355
- function gn({ className: e }) {
356
- return /* @__PURE__ */ d("svg", { className: e, width: "16", height: "16", viewBox: "0 0 16 16", "aria-hidden": "true", children: [
355
+ function xn({ className: e }) {
356
+ return /* @__PURE__ */ c("svg", { className: e, width: "16", height: "16", viewBox: "0 0 16 16", "aria-hidden": "true", children: [
357
357
  /* @__PURE__ */ n(
358
358
  "path",
359
359
  {
@@ -378,8 +378,8 @@ function gn({ className: e }) {
378
378
  )
379
379
  ] });
380
380
  }
381
- function vn({ className: e }) {
382
- return /* @__PURE__ */ d("svg", { className: e, width: "16", height: "16", viewBox: "0 0 16 16", "aria-hidden": "true", children: [
381
+ function bn({ className: e }) {
382
+ return /* @__PURE__ */ c("svg", { className: e, width: "16", height: "16", viewBox: "0 0 16 16", "aria-hidden": "true", children: [
383
383
  /* @__PURE__ */ n(
384
384
  "path",
385
385
  {
@@ -404,24 +404,24 @@ function vn({ className: e }) {
404
404
  )
405
405
  ] });
406
406
  }
407
- const be = (e, t, i) => Math.min(i, Math.max(t, e));
408
- function je(e) {
407
+ const be = (e, t, r) => Math.min(r, Math.max(t, e));
408
+ function Ke(e) {
409
409
  const t = e.trim();
410
410
  if (!t) return null;
411
- const i = t.match(/^#([0-9a-f]{6})$/i);
412
- if (i)
411
+ const r = t.match(/^#([0-9a-f]{6})$/i);
412
+ if (r)
413
413
  return {
414
- r: parseInt(i[1].slice(0, 2), 16),
415
- g: parseInt(i[1].slice(2, 4), 16),
416
- b: parseInt(i[1].slice(4, 6), 16)
414
+ r: parseInt(r[1].slice(0, 2), 16),
415
+ g: parseInt(r[1].slice(2, 4), 16),
416
+ b: parseInt(r[1].slice(4, 6), 16)
417
417
  };
418
- const r = t.match(/^#([0-9a-f]{3})$/i);
419
- if (r) {
420
- const [s, a, c] = r[1].split("");
418
+ const a = t.match(/^#([0-9a-f]{3})$/i);
419
+ if (a) {
420
+ const [s, i, p] = a[1].split("");
421
421
  return {
422
422
  r: parseInt(s + s, 16),
423
- g: parseInt(a + a, 16),
424
- b: parseInt(c + c, 16)
423
+ g: parseInt(i + i, 16),
424
+ b: parseInt(p + p, 16)
425
425
  };
426
426
  }
427
427
  const o = t.match(/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)/i);
@@ -432,133 +432,133 @@ function je(e) {
432
432
  } : null;
433
433
  }
434
434
  function Pt(e) {
435
- const t = (i) => be(Math.round(i), 0, 255).toString(16).padStart(2, "0");
435
+ const t = (r) => be(Math.round(r), 0, 255).toString(16).padStart(2, "0");
436
436
  return `#${t(e.r)}${t(e.g)}${t(e.b)}`;
437
437
  }
438
- function bn(e) {
438
+ function vn(e) {
439
439
  return `rgb(${e.r}, ${e.g}, ${e.b})`;
440
440
  }
441
- function Dt({ r: e, g: t, b: i }) {
442
- const r = e / 255, o = t / 255, s = i / 255, a = Math.max(r, o, s), c = Math.min(r, o, s), u = a - c;
441
+ function Dt({ r: e, g: t, b: r }) {
442
+ const a = e / 255, o = t / 255, s = r / 255, i = Math.max(a, o, s), p = Math.min(a, o, s), d = i - p;
443
443
  let l = 0;
444
- u !== 0 && (a === r ? l = (o - s) / u % 6 : a === o ? l = (s - r) / u + 2 : l = (r - o) / u + 4, l *= 60, l < 0 && (l += 360));
445
- const f = a === 0 ? 0 : u / a * 100, p = a * 100;
446
- return { h: l, s: f, v: p };
447
- }
448
- function Ot({ h: e, s: t, v: i }) {
449
- const r = be(t, 0, 100) / 100, o = be(i, 0, 100) / 100, s = o * r, a = s * (1 - Math.abs(e / 60 % 2 - 1)), c = o - s;
450
- let u = 0, l = 0, f = 0;
451
- const p = (e % 360 + 360) % 360;
452
- return p < 60 ? (u = s, l = a) : p < 120 ? (u = a, l = s) : p < 180 ? (l = s, f = a) : p < 240 ? (l = a, f = s) : p < 300 ? (u = a, f = s) : (u = s, f = a), {
453
- r: Math.round((u + c) * 255),
454
- g: Math.round((l + c) * 255),
455
- b: Math.round((f + c) * 255)
444
+ d !== 0 && (i === a ? l = (o - s) / d % 6 : i === o ? l = (s - a) / d + 2 : l = (a - o) / d + 4, l *= 60, l < 0 && (l += 360));
445
+ const g = i === 0 ? 0 : d / i * 100, f = i * 100;
446
+ return { h: l, s: g, v: f };
447
+ }
448
+ function Ot({ h: e, s: t, v: r }) {
449
+ const a = be(t, 0, 100) / 100, o = be(r, 0, 100) / 100, s = o * a, i = s * (1 - Math.abs(e / 60 % 2 - 1)), p = o - s;
450
+ let d = 0, l = 0, g = 0;
451
+ const f = (e % 360 + 360) % 360;
452
+ return f < 60 ? (d = s, l = i) : f < 120 ? (d = i, l = s) : f < 180 ? (l = s, g = i) : f < 240 ? (l = i, g = s) : f < 300 ? (d = i, g = s) : (d = s, g = i), {
453
+ r: Math.round((d + p) * 255),
454
+ g: Math.round((l + p) * 255),
455
+ b: Math.round((g + p) * 255)
456
456
  };
457
457
  }
458
- function at(e) {
459
- const t = je(e);
458
+ function it(e) {
459
+ const t = Ke(e);
460
460
  return t ? Dt(t) : { h: 0, s: 0, v: 45 };
461
461
  }
462
- function yn(e) {
462
+ function wn(e) {
463
463
  return e.replace(/^#/, "").toUpperCase().slice(0, 6);
464
464
  }
465
- function wn(e, t) {
466
- const i = e.replace(/[^0-9a-f]/gi, "").slice(0, 6);
467
- return i.length < 6 ? t : je(`#${i}`) ?? t;
465
+ function yn(e, t) {
466
+ const r = e.replace(/[^0-9a-f]/gi, "").slice(0, 6);
467
+ return r.length < 6 ? t : Ke(`#${r}`) ?? t;
468
468
  }
469
- function xn(e) {
469
+ function kn(e) {
470
470
  return Pt(Ot(e));
471
471
  }
472
- function Nn(e, t, i) {
473
- const r = st((e - i.left) / i.width), o = st((t - i.top) / i.height);
474
- return { x: r * 100, y: o * 100 };
472
+ function Nn(e, t, r) {
473
+ const a = st((e - r.left) / r.width), o = st((t - r.top) / r.height);
474
+ return { x: a * 100, y: o * 100 };
475
475
  }
476
476
  function st(e) {
477
477
  return Math.min(1, Math.max(0, e));
478
478
  }
479
- function kn() {
479
+ function Cn() {
480
480
  if (typeof document > "u") return {};
481
481
  const e = document.querySelector("[data-pixelagent-root]") ?? document.querySelector("[data-pixelagent-toolbar-portal]"), t = e == null ? void 0 : e.getAttribute("data-pa-chrome");
482
482
  return t ? { "data-pa-chrome": t } : {};
483
483
  }
484
- function _e({ label: e, value: t, onChange: i }) {
485
- const [r, o] = A(!1), [s, a] = A(() => at(t)), c = X(null), u = X(null), l = X(null), f = jt(), [p, v] = A({ top: 0, left: 0, width: 260 }), m = Ot(s), g = yn(Pt(m)), y = je(t) ? t : bn(m), S = e.toLowerCase().includes("color") ? e : `${e} color`;
484
+ function _e({ label: e, value: t, onChange: r }) {
485
+ const [a, o] = A(!1), [s, i] = A(() => it(t)), p = j(null), d = j(null), l = j(null), g = qt(), [f, x] = A({ top: 0, left: 0, width: 260 }), h = Ot(s), m = wn(Pt(h)), v = Ke(t) ? t : vn(h), z = e.toLowerCase().includes("color") ? e : `${e} color`;
486
486
  _(() => {
487
- a(at(t));
487
+ i(it(t));
488
488
  }, [t]);
489
- const w = $(
490
- (x) => {
491
- a(x), i(xn(x));
489
+ const w = L(
490
+ (y) => {
491
+ i(y), r(kn(y));
492
492
  },
493
- [i]
494
- ), k = $(
495
- (x) => {
496
- w(Dt(x));
493
+ [r]
494
+ ), N = L(
495
+ (y) => {
496
+ w(Dt(y));
497
497
  },
498
498
  [w]
499
- ), N = $(() => {
500
- const x = c.current;
501
- if (!x) return;
502
- const I = x.getBoundingClientRect(), L = 260;
503
- let h = I.left;
504
- h + L > window.innerWidth - 12 && (h = window.innerWidth - L - 12), h = Math.max(12, h);
505
- let F = I.bottom + 8;
506
- const U = 320;
507
- F + U > window.innerHeight - 12 && (F = Math.max(12, I.top - U - 8)), v({ top: F, left: h, width: L });
499
+ ), k = L(() => {
500
+ const y = p.current;
501
+ if (!y) return;
502
+ const I = y.getBoundingClientRect(), S = 260;
503
+ let u = I.left;
504
+ u + S > window.innerWidth - 12 && (u = window.innerWidth - S - 12), u = Math.max(12, u);
505
+ let O = I.bottom + 8;
506
+ const W = 320;
507
+ O + W > window.innerHeight - 12 && (O = Math.max(12, I.top - W - 8)), x({ top: O, left: u, width: S });
508
508
  }, []);
509
509
  _(() => {
510
- if (!r) return;
511
- N();
512
- const x = (L) => {
513
- var F, U;
514
- const h = L.target;
515
- (F = c.current) != null && F.contains(h) || (U = u.current) != null && U.contains(h) || o(!1);
516
- }, I = (L) => {
517
- L.key === "Escape" && o(!1);
510
+ if (!a) return;
511
+ k();
512
+ const y = (S) => {
513
+ var O, W;
514
+ const u = S.target;
515
+ (O = p.current) != null && O.contains(u) || (W = d.current) != null && W.contains(u) || o(!1);
516
+ }, I = (S) => {
517
+ S.key === "Escape" && o(!1);
518
518
  };
519
- return window.addEventListener("mousedown", x, !0), window.addEventListener("keydown", I), window.addEventListener("resize", N), window.addEventListener("scroll", N, !0), () => {
520
- window.removeEventListener("mousedown", x, !0), window.removeEventListener("keydown", I), window.removeEventListener("resize", N), window.removeEventListener("scroll", N, !0);
519
+ return window.addEventListener("mousedown", y, !0), window.addEventListener("keydown", I), window.addEventListener("resize", k), window.addEventListener("scroll", k, !0), () => {
520
+ window.removeEventListener("mousedown", y, !0), window.removeEventListener("keydown", I), window.removeEventListener("resize", k), window.removeEventListener("scroll", k, !0);
521
521
  };
522
- }, [r, N]);
523
- const E = (x, I) => {
524
- var U;
525
- const L = (U = l.current) == null ? void 0 : U.getBoundingClientRect();
526
- if (!L) return;
527
- const { x: h, y: F } = Nn(x, I, L);
528
- w({ ...s, s: h, v: 100 - F });
529
- }, z = (x) => {
530
- x.preventDefault(), E(x.clientX, x.clientY);
531
- const I = (h) => E(h.clientX, h.clientY), L = () => {
532
- window.removeEventListener("mousemove", I), window.removeEventListener("mouseup", L);
522
+ }, [a, k]);
523
+ const E = (y, I) => {
524
+ var W;
525
+ const S = (W = l.current) == null ? void 0 : W.getBoundingClientRect();
526
+ if (!S) return;
527
+ const { x: u, y: O } = Nn(y, I, S);
528
+ w({ ...s, s: u, v: 100 - O });
529
+ }, B = (y) => {
530
+ y.preventDefault(), E(y.clientX, y.clientY);
531
+ const I = (u) => E(u.clientX, u.clientY), S = () => {
532
+ window.removeEventListener("mousemove", I), window.removeEventListener("mouseup", S);
533
533
  };
534
- window.addEventListener("mousemove", I), window.addEventListener("mouseup", L);
535
- }, R = r ? Ke(
534
+ window.addEventListener("mousemove", I), window.addEventListener("mouseup", S);
535
+ }, $ = a ? Ge(
536
536
  /* @__PURE__ */ n(
537
537
  "div",
538
538
  {
539
539
  className: "pa-root pa-root--toolbar-portal pa-color-picker-portal",
540
540
  "data-pixelagent-picker-portal": !0,
541
- ...kn(),
542
- children: /* @__PURE__ */ d(
541
+ ...Cn(),
542
+ children: /* @__PURE__ */ c(
543
543
  "div",
544
544
  {
545
- ref: u,
546
- id: f,
545
+ ref: d,
546
+ id: g,
547
547
  role: "dialog",
548
- "aria-label": S,
548
+ "aria-label": z,
549
549
  className: "pa-color-picker",
550
- style: { top: p.top, left: p.left, width: p.width },
550
+ style: { top: f.top, left: f.left, width: f.width },
551
551
  children: [
552
- /* @__PURE__ */ d("header", { className: "pa-color-picker-header", children: [
552
+ /* @__PURE__ */ c("header", { className: "pa-color-picker-header", children: [
553
553
  /* @__PURE__ */ n(
554
554
  "span",
555
555
  {
556
556
  className: "pa-color-picker-preview",
557
- style: { backgroundColor: y },
557
+ style: { backgroundColor: v },
558
558
  "aria-hidden": "true"
559
559
  }
560
560
  ),
561
- /* @__PURE__ */ n("span", { className: "pa-color-picker-header-label", children: S })
561
+ /* @__PURE__ */ n("span", { className: "pa-color-picker-header-label", children: z })
562
562
  ] }),
563
563
  /* @__PURE__ */ n(
564
564
  "div",
@@ -566,7 +566,7 @@ function _e({ label: e, value: t, onChange: i }) {
566
566
  ref: l,
567
567
  className: "pa-color-picker-sb",
568
568
  style: { "--pa-picker-h": String(Math.round(s.h)) },
569
- onMouseDown: z,
569
+ onMouseDown: B,
570
570
  children: /* @__PURE__ */ n(
571
571
  "span",
572
572
  {
@@ -577,7 +577,7 @@ function _e({ label: e, value: t, onChange: i }) {
577
577
  )
578
578
  }
579
579
  ),
580
- /* @__PURE__ */ d("div", { className: "pa-color-picker-hue", children: [
580
+ /* @__PURE__ */ c("div", { className: "pa-color-picker-hue", children: [
581
581
  /* @__PURE__ */ n(
582
582
  "input",
583
583
  {
@@ -587,7 +587,7 @@ function _e({ label: e, value: t, onChange: i }) {
587
587
  max: 360,
588
588
  value: Math.round(s.h),
589
589
  "aria-label": "Hue",
590
- onChange: (x) => w({ ...s, h: parseFloat(x.target.value) })
590
+ onChange: (y) => w({ ...s, h: parseFloat(y.target.value) })
591
591
  }
592
592
  ),
593
593
  /* @__PURE__ */ n(
@@ -599,21 +599,21 @@ function _e({ label: e, value: t, onChange: i }) {
599
599
  }
600
600
  )
601
601
  ] }),
602
- /* @__PURE__ */ d("label", { className: "pa-color-picker-field", children: [
602
+ /* @__PURE__ */ c("label", { className: "pa-color-picker-field", children: [
603
603
  /* @__PURE__ */ n("span", { className: "pa-color-picker-field-label", children: "Hex" }),
604
604
  /* @__PURE__ */ n(
605
605
  "input",
606
606
  {
607
607
  className: "pa-input pa-color-picker-input",
608
608
  type: "text",
609
- value: g,
609
+ value: m,
610
610
  spellCheck: !1,
611
- onChange: (x) => k(wn(x.target.value, m))
611
+ onChange: (y) => N(yn(y.target.value, h))
612
612
  }
613
613
  )
614
614
  ] }),
615
- /* @__PURE__ */ n("div", { className: "pa-color-picker-rgb", children: ["r", "g", "b"].map((x) => /* @__PURE__ */ d("label", { className: "pa-color-picker-field pa-color-picker-field--rgb", children: [
616
- /* @__PURE__ */ n("span", { className: "pa-color-picker-field-label", children: x.toUpperCase() }),
615
+ /* @__PURE__ */ n("div", { className: "pa-color-picker-rgb", children: ["r", "g", "b"].map((y) => /* @__PURE__ */ c("label", { className: "pa-color-picker-field pa-color-picker-field--rgb", children: [
616
+ /* @__PURE__ */ n("span", { className: "pa-color-picker-field-label", children: y.toUpperCase() }),
617
617
  /* @__PURE__ */ n(
618
618
  "input",
619
619
  {
@@ -621,14 +621,14 @@ function _e({ label: e, value: t, onChange: i }) {
621
621
  type: "number",
622
622
  min: 0,
623
623
  max: 255,
624
- value: m[x],
624
+ value: h[y],
625
625
  onChange: (I) => {
626
- const L = Cn(parseInt(I.target.value, 10));
627
- k({ ...m, [x]: L });
626
+ const S = Mn(parseInt(I.target.value, 10));
627
+ N({ ...h, [y]: S });
628
628
  }
629
629
  }
630
630
  )
631
- ] }, x)) })
631
+ ] }, y)) })
632
632
  ]
633
633
  }
634
634
  )
@@ -636,22 +636,22 @@ function _e({ label: e, value: t, onChange: i }) {
636
636
  ),
637
637
  document.body
638
638
  ) : null;
639
- return /* @__PURE__ */ d("div", { className: "pa-color-field", children: [
639
+ return /* @__PURE__ */ c("div", { className: "pa-color-field", children: [
640
640
  /* @__PURE__ */ n("span", { className: "pa-edit-field-label", children: e }),
641
- /* @__PURE__ */ d(
641
+ /* @__PURE__ */ c(
642
642
  "button",
643
643
  {
644
- ref: c,
644
+ ref: p,
645
645
  type: "button",
646
646
  className: "pa-color-field-trigger",
647
- "aria-expanded": r,
647
+ "aria-expanded": a,
648
648
  "aria-haspopup": "dialog",
649
- "aria-controls": r ? f : void 0,
649
+ "aria-controls": a ? g : void 0,
650
650
  onClick: () => {
651
- r || N(), o((x) => !x);
651
+ a || k(), o((y) => !y);
652
652
  },
653
653
  children: [
654
- /* @__PURE__ */ n("span", { className: "pa-color-field-swatch", style: { backgroundColor: y }, "aria-hidden": "true" }),
654
+ /* @__PURE__ */ n("span", { className: "pa-color-field-swatch", style: { backgroundColor: v }, "aria-hidden": "true" }),
655
655
  /* @__PURE__ */ n(
656
656
  "input",
657
657
  {
@@ -666,25 +666,25 @@ function _e({ label: e, value: t, onChange: i }) {
666
666
  ]
667
667
  }
668
668
  ),
669
- R
669
+ $
670
670
  ] });
671
671
  }
672
- function Cn(e) {
672
+ function Mn(e) {
673
673
  return Number.isFinite(e) ? Math.min(255, Math.max(0, e)) : 0;
674
674
  }
675
- function fe({ title: e, children: t, defaultOpen: i = !0, badge: r }) {
676
- const [o, s] = A(i);
677
- return /* @__PURE__ */ d("section", { className: `pa-edit-section ${o ? "pa-edit-section--open" : ""}`, children: [
678
- /* @__PURE__ */ d(
675
+ function ge({ title: e, children: t, defaultOpen: r = !0, badge: a }) {
676
+ const [o, s] = A(r);
677
+ return /* @__PURE__ */ c("section", { className: `pa-edit-section ${o ? "pa-edit-section--open" : ""}`, children: [
678
+ /* @__PURE__ */ c(
679
679
  "button",
680
680
  {
681
681
  type: "button",
682
682
  className: "pa-edit-section-header",
683
683
  "aria-expanded": o,
684
- onClick: () => s((a) => !a),
684
+ onClick: () => s((i) => !i),
685
685
  children: [
686
686
  /* @__PURE__ */ n("span", { className: "pa-edit-section-title", children: e }),
687
- r ? /* @__PURE__ */ n("span", { className: "pa-edit-section-badge", children: r }) : null,
687
+ a ? /* @__PURE__ */ n("span", { className: "pa-edit-section-badge", children: a }) : null,
688
688
  /* @__PURE__ */ n("span", { className: "pa-edit-section-chevron", "aria-hidden": "true" })
689
689
  ]
690
690
  }
@@ -692,7 +692,7 @@ function fe({ title: e, children: t, defaultOpen: i = !0, badge: r }) {
692
692
  o ? /* @__PURE__ */ n("div", { className: "pa-edit-section-body", children: t }) : null
693
693
  ] });
694
694
  }
695
- const me = [
695
+ const he = [
696
696
  { value: "Inter, system-ui, sans-serif", label: "Inter" },
697
697
  { value: "system-ui, sans-serif", label: "System UI" },
698
698
  {
@@ -706,53 +706,53 @@ const me = [
706
706
  { value: '"JetBrains Mono", ui-monospace, monospace', label: "JetBrains Mono" },
707
707
  { value: "ui-monospace, monospace", label: "Monospace" }
708
708
  ], Te = "";
709
- function Le(e) {
710
- var i;
711
- return (((i = e.split(",")[0]) == null ? void 0 : i.trim()) ?? "").replace(/^["']|["']$/g, "");
709
+ function Se(e) {
710
+ var r;
711
+ return (((r = e.split(",")[0]) == null ? void 0 : r.trim()) ?? "").replace(/^["']|["']$/g, "");
712
712
  }
713
- function Mn(e) {
713
+ function An(e) {
714
714
  const t = e.trim();
715
715
  if (!t)
716
716
  return {
717
717
  selectValue: Te,
718
- options: me
718
+ options: he
719
719
  };
720
- const i = Le(t).toLowerCase(), r = me.find(
721
- (s) => s.value === t || Le(s.value).toLowerCase() === i
720
+ const r = Se(t).toLowerCase(), a = he.find(
721
+ (s) => s.value === t || Se(s.value).toLowerCase() === r
722
722
  );
723
- if (r)
724
- return { selectValue: r.value, options: me };
725
- const o = me.find((s) => {
726
- const a = Le(s.value).toLowerCase();
727
- return t.toLowerCase().includes(a) || a.includes(i);
723
+ if (a)
724
+ return { selectValue: a.value, options: he };
725
+ const o = he.find((s) => {
726
+ const i = Se(s.value).toLowerCase();
727
+ return t.toLowerCase().includes(i) || i.includes(r);
728
728
  });
729
- return o ? { selectValue: o.value, options: me } : {
729
+ return o ? { selectValue: o.value, options: he } : {
730
730
  selectValue: t,
731
731
  options: [
732
- ...me,
733
- { value: t, label: Le(t) || "Custom" }
732
+ ...he,
733
+ { value: t, label: Se(t) || "Custom" }
734
734
  ]
735
735
  };
736
736
  }
737
- function An({ value: e, onChange: t }) {
738
- const { selectValue: i, options: r } = Me(
739
- () => Mn(e),
737
+ function zn({ value: e, onChange: t }) {
738
+ const { selectValue: r, options: a } = Me(
739
+ () => An(e),
740
740
  [e]
741
741
  );
742
- return /* @__PURE__ */ d("label", { className: "pa-edit-stack-field", children: [
742
+ return /* @__PURE__ */ c("label", { className: "pa-edit-stack-field", children: [
743
743
  /* @__PURE__ */ n("span", { className: "pa-edit-field-label", children: "Font family" }),
744
- /* @__PURE__ */ d(
744
+ /* @__PURE__ */ c(
745
745
  "select",
746
746
  {
747
747
  className: "pa-select pa-font-family-select",
748
- value: i || Te,
748
+ value: r || Te,
749
749
  onChange: (o) => {
750
750
  const s = o.target.value;
751
751
  s && s !== Te && t(s);
752
752
  },
753
753
  children: [
754
754
  /* @__PURE__ */ n("option", { value: Te, disabled: !0, children: "Select font style" }),
755
- r.map((o) => /* @__PURE__ */ n("option", { value: o.value, children: o.label }, o.value))
755
+ a.map((o) => /* @__PURE__ */ n("option", { value: o.value, children: o.label }, o.value))
756
756
  ]
757
757
  }
758
758
  )
@@ -766,27 +766,27 @@ function Sn(e) {
766
766
  const t = e.trim();
767
767
  if (!t) return null;
768
768
  if (t.endsWith("%")) {
769
- const r = parseFloat(t);
770
- return Number.isFinite(r) ? r / 100 : null;
769
+ const a = parseFloat(t);
770
+ return Number.isFinite(a) ? a / 100 : null;
771
771
  }
772
- const i = parseFloat(t);
773
- return Number.isFinite(i) && i >= 0 && i <= 1 ? i : null;
772
+ const r = parseFloat(t);
773
+ return Number.isFinite(r) && r >= 0 && r <= 1 ? r : null;
774
774
  }
775
775
  function Ln(e) {
776
776
  const t = Ft(e);
777
777
  if (t !== null) return t > 0;
778
- const i = qe(e);
779
- return i !== null && i > 0;
778
+ const r = qe(e);
779
+ return r !== null && r > 0;
780
780
  }
781
781
  function Ft(e) {
782
782
  const t = e.trim().split(/\s+/).filter(Boolean);
783
783
  if (t.length === 0) return null;
784
- const i = t.map((o) => qe(o));
785
- if (i.some((o) => o === null)) return null;
786
- const r = i[0];
787
- return i.every((o) => o === r) ? r : null;
784
+ const r = t.map((o) => qe(o));
785
+ if (r.some((o) => o === null)) return null;
786
+ const a = r[0];
787
+ return r.every((o) => o === a) ? a : null;
788
788
  }
789
- const $n = {
789
+ const En = {
790
790
  padding: { kind: "uniform-px", min: 0, max: 80, step: 1 },
791
791
  margin: { kind: "uniform-px", min: 0, max: 80, step: 1 },
792
792
  width: { kind: "text" },
@@ -800,8 +800,8 @@ const $n = {
800
800
  "border-radius": { kind: "px", min: 0, max: 48, step: 1 },
801
801
  opacity: { kind: "opacity", min: 0, max: 1, step: 0.01 }
802
802
  };
803
- function En(e, t, i) {
804
- switch (i.kind) {
803
+ function In(e, t, r) {
804
+ switch (r.kind) {
805
805
  case "opacity":
806
806
  return Sn(t);
807
807
  case "px":
@@ -812,8 +812,8 @@ function En(e, t, i) {
812
812
  return null;
813
813
  }
814
814
  }
815
- function In(e, t, i) {
816
- switch (i.kind) {
815
+ function $n(e, t, r) {
816
+ switch (r.kind) {
817
817
  case "opacity":
818
818
  return String(Math.round(t * 100) / 100);
819
819
  case "px":
@@ -826,41 +826,41 @@ function In(e, t, i) {
826
826
  function se({
827
827
  property: e,
828
828
  label: t,
829
- value: i,
830
- onChange: r,
829
+ value: r,
830
+ onChange: a,
831
831
  compact: o = !1
832
832
  }) {
833
- const s = $n[e] ?? { kind: "text" }, a = En(e, i, s), c = s.kind !== "text" && a !== null, u = o ? "pa-prop-row pa-prop-row--compact" : "pa-prop-row", l = o ? "pa-edit-field-label" : "pa-prop-label";
834
- if (!c)
835
- return /* @__PURE__ */ d("label", { className: u, children: [
833
+ const s = En[e] ?? { kind: "text" }, i = In(e, r, s), p = s.kind !== "text" && i !== null, d = o ? "pa-prop-row pa-prop-row--compact" : "pa-prop-row", l = o ? "pa-edit-field-label" : "pa-prop-label";
834
+ if (!p)
835
+ return /* @__PURE__ */ c("label", { className: d, children: [
836
836
  /* @__PURE__ */ n("span", { className: l, children: t }),
837
837
  /* @__PURE__ */ n(
838
838
  "input",
839
839
  {
840
840
  className: "pa-input",
841
841
  type: "text",
842
- value: i,
843
- onChange: (g) => r(g.target.value)
842
+ value: r,
843
+ onChange: (m) => a(m.target.value)
844
844
  }
845
845
  )
846
846
  ] });
847
- const f = s.min ?? 0, p = s.max ?? 100, v = s.step ?? 1, m = (g) => {
848
- r(In(e, g, s));
847
+ const g = s.min ?? 0, f = s.max ?? 100, x = s.step ?? 1, h = (m) => {
848
+ a($n(e, m, s));
849
849
  };
850
- return /* @__PURE__ */ d("label", { className: `${u} pa-prop-row--slider`, children: [
850
+ return /* @__PURE__ */ c("label", { className: `${d} pa-prop-row--slider`, children: [
851
851
  /* @__PURE__ */ n("span", { className: l, children: t }),
852
- /* @__PURE__ */ d("div", { className: "pa-prop-slider-wrap", children: [
852
+ /* @__PURE__ */ c("div", { className: "pa-prop-slider-wrap", children: [
853
853
  /* @__PURE__ */ n(
854
854
  "input",
855
855
  {
856
856
  type: "range",
857
857
  className: "pa-slider",
858
- min: f,
859
- max: p,
860
- step: v,
861
- value: a,
862
- "aria-valuetext": i,
863
- onChange: (g) => m(parseFloat(g.target.value))
858
+ min: g,
859
+ max: f,
860
+ step: x,
861
+ value: i,
862
+ "aria-valuetext": r,
863
+ onChange: (m) => h(parseFloat(m.target.value))
864
864
  }
865
865
  ),
866
866
  /* @__PURE__ */ n(
@@ -868,91 +868,91 @@ function se({
868
868
  {
869
869
  className: "pa-input pa-prop-slider-value",
870
870
  type: "text",
871
- value: i,
872
- onChange: (g) => r(g.target.value),
871
+ value: r,
872
+ onChange: (m) => a(m.target.value),
873
873
  "aria-label": `${t} value`
874
874
  }
875
875
  )
876
876
  ] })
877
877
  ] });
878
878
  }
879
- function Rn(e) {
880
- const t = e.trim().split(/\s+/).filter(Boolean), i = t[0] ?? "0px";
881
- if (t.length <= 1) return { top: i, right: i, bottom: i, left: i };
882
- const r = t[1];
883
- if (t.length === 2) return { top: i, right: r, bottom: i, left: r };
879
+ function Tn(e) {
880
+ const t = e.trim().split(/\s+/).filter(Boolean), r = t[0] ?? "0px";
881
+ if (t.length <= 1) return { top: r, right: r, bottom: r, left: r };
882
+ const a = t[1];
883
+ if (t.length === 2) return { top: r, right: a, bottom: r, left: a };
884
884
  const o = t[2];
885
- return t.length === 3 ? { top: i, right: r, bottom: o, left: r } : { top: i, right: r, bottom: o, left: t[3] };
885
+ return t.length === 3 ? { top: r, right: a, bottom: o, left: a } : { top: r, right: a, bottom: o, left: t[3] };
886
886
  }
887
- function Tn({ top: e, right: t, bottom: i, left: r }) {
888
- return e === t && t === i && i === r ? e : e === i && t === r ? `${e} ${t}` : t === r ? `${e} ${t} ${i}` : `${e} ${t} ${i} ${r}`;
887
+ function Rn({ top: e, right: t, bottom: r, left: a }) {
888
+ return e === t && t === r && r === a ? e : e === r && t === a ? `${e} ${t}` : t === a ? `${e} ${t} ${r}` : `${e} ${t} ${r} ${a}`;
889
889
  }
890
- function ue(e) {
890
+ function de(e) {
891
891
  const t = e.trim().match(/^(-?\d+(?:\.\d+)?)px$/i);
892
892
  return t ? t[1] : e;
893
893
  }
894
- function pe(e) {
894
+ function fe(e) {
895
895
  const t = e.trim();
896
896
  return t === "" ? "0px" : /^-?\d+(?:\.\d+)?$/.test(t) ? `${t}px` : t;
897
897
  }
898
898
  function lt(e, t) {
899
- return e === t ? ue(e) : `${ue(e)}, ${ue(t)}`;
900
- }
901
- function ct(e, t) {
902
- const i = e.split(",").map((r) => r.trim()).filter(Boolean);
903
- if (i.length === 0) return [t, t];
904
- if (i.length === 1) {
905
- const r = pe(i[0]);
906
- return [r, r];
899
+ return e === t ? de(e) : `${de(e)}, ${de(t)}`;
900
+ }
901
+ function pt(e, t) {
902
+ const r = e.split(",").map((a) => a.trim()).filter(Boolean);
903
+ if (r.length === 0) return [t, t];
904
+ if (r.length === 1) {
905
+ const a = fe(r[0]);
906
+ return [a, a];
907
907
  }
908
- return [pe(i[0]), pe(i[1])];
908
+ return [fe(r[0]), fe(r[1])];
909
909
  }
910
- const dt = 12, Je = {
911
- width: dt,
912
- height: dt,
910
+ const ct = 12, Je = {
911
+ width: ct,
912
+ height: ct,
913
913
  viewBox: "0 0 12 12",
914
914
  fill: "none",
915
915
  "aria-hidden": !0
916
916
  };
917
917
  function Pn() {
918
- return /* @__PURE__ */ d("svg", { ...Je, children: [
918
+ return /* @__PURE__ */ c("svg", { ...Je, children: [
919
919
  /* @__PURE__ */ n("rect", { x: "1.5", y: "1.5", width: "9", height: "9", stroke: "currentColor", strokeOpacity: "0.35" }),
920
920
  /* @__PURE__ */ n("line", { x1: "1.5", y1: "1.5", x2: "1.5", y2: "10.5", stroke: "currentColor", strokeWidth: "1.5" }),
921
921
  /* @__PURE__ */ n("line", { x1: "10.5", y1: "1.5", x2: "10.5", y2: "10.5", stroke: "currentColor", strokeWidth: "1.5" })
922
922
  ] });
923
923
  }
924
924
  function Dn() {
925
- return /* @__PURE__ */ d("svg", { ...Je, children: [
925
+ return /* @__PURE__ */ c("svg", { ...Je, children: [
926
926
  /* @__PURE__ */ n("rect", { x: "1.5", y: "1.5", width: "9", height: "9", stroke: "currentColor", strokeOpacity: "0.35" }),
927
927
  /* @__PURE__ */ n("line", { x1: "1.5", y1: "1.5", x2: "10.5", y2: "1.5", stroke: "currentColor", strokeWidth: "1.5" }),
928
928
  /* @__PURE__ */ n("line", { x1: "1.5", y1: "10.5", x2: "10.5", y2: "10.5", stroke: "currentColor", strokeWidth: "1.5" })
929
929
  ] });
930
930
  }
931
- function $e({ side: e }) {
931
+ function Le({ side: e }) {
932
932
  const t = {
933
933
  top: { x1: 1.5, y1: 1.5, x2: 10.5, y2: 1.5 },
934
934
  right: { x1: 10.5, y1: 1.5, x2: 10.5, y2: 10.5 },
935
935
  bottom: { x1: 1.5, y1: 10.5, x2: 10.5, y2: 10.5 },
936
936
  left: { x1: 1.5, y1: 1.5, x2: 1.5, y2: 10.5 }
937
937
  }[e];
938
- return /* @__PURE__ */ d("svg", { ...Je, children: [
938
+ return /* @__PURE__ */ c("svg", { ...Je, children: [
939
939
  /* @__PURE__ */ n("rect", { x: "1.5", y: "1.5", width: "9", height: "9", stroke: "currentColor", strokeOpacity: "0.35" }),
940
940
  /* @__PURE__ */ n("line", { ...t, stroke: "currentColor", strokeWidth: "1.5" })
941
941
  ] });
942
942
  }
943
943
  function On() {
944
- return /* @__PURE__ */ d("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", "aria-hidden": "true", children: [
944
+ return /* @__PURE__ */ c("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", "aria-hidden": "true", children: [
945
945
  /* @__PURE__ */ n("rect", { x: "2", y: "2", width: "4", height: "4", stroke: "currentColor", strokeWidth: "1.2" }),
946
946
  /* @__PURE__ */ n("rect", { x: "8", y: "2", width: "4", height: "4", stroke: "currentColor", strokeWidth: "1.2" }),
947
947
  /* @__PURE__ */ n("rect", { x: "2", y: "8", width: "4", height: "4", stroke: "currentColor", strokeWidth: "1.2" }),
948
948
  /* @__PURE__ */ n("rect", { x: "8", y: "8", width: "4", height: "4", stroke: "currentColor", strokeWidth: "1.2" })
949
949
  ] });
950
950
  }
951
- function ge({ icon: e, display: t, ariaLabel: i, mixed: r, onCommit: o }) {
952
- const [s, a] = A(t);
951
+ function me({ icon: e, display: t, ariaLabel: r, mixed: a, onCommit: o }) {
952
+ const [s, i] = A(t);
953
953
  return _(() => {
954
- a(t);
955
- }, [t]), /* @__PURE__ */ d("label", { className: `pa-spacing-cell ${r ? "pa-spacing-cell--mixed" : ""}`, children: [
954
+ i(t);
955
+ }, [t]), /* @__PURE__ */ c("label", { className: `pa-spacing-cell ${a ? "pa-spacing-cell--mixed" : ""}`, children: [
956
956
  /* @__PURE__ */ n("span", { className: "pa-spacing-cell-icon", children: e }),
957
957
  /* @__PURE__ */ n(
958
958
  "input",
@@ -960,24 +960,24 @@ function ge({ icon: e, display: t, ariaLabel: i, mixed: r, onCommit: o }) {
960
960
  className: "pa-input pa-spacing-cell-input",
961
961
  type: "text",
962
962
  value: s,
963
- onChange: (c) => a(c.target.value),
963
+ onChange: (p) => i(p.target.value),
964
964
  onBlur: () => o(s),
965
- onKeyDown: (c) => {
966
- c.key === "Enter" && c.target.blur(), c.key === "Escape" && (a(t), c.target.blur());
965
+ onKeyDown: (p) => {
966
+ p.key === "Enter" && p.target.blur(), p.key === "Escape" && (i(t), p.target.blur());
967
967
  },
968
- "aria-label": i,
968
+ "aria-label": r,
969
969
  spellCheck: !1
970
970
  }
971
971
  )
972
972
  ] });
973
973
  }
974
- function ut({ label: e, value: t, onChange: i }) {
975
- const r = Rn(t), [o, s] = A(!1), a = (l) => {
976
- i(Tn({ ...r, ...l }));
977
- }, c = r.left !== r.right, u = r.top !== r.bottom;
978
- return /* @__PURE__ */ d("div", { className: "pa-prop-row pa-prop-row--compact pa-spacing-row", children: [
974
+ function dt({ label: e, value: t, onChange: r }) {
975
+ const a = Tn(t), [o, s] = A(!1), i = (l) => {
976
+ r(Rn({ ...a, ...l }));
977
+ }, p = a.left !== a.right, d = a.top !== a.bottom;
978
+ return /* @__PURE__ */ c("div", { className: "pa-prop-row pa-prop-row--compact pa-spacing-row", children: [
979
979
  /* @__PURE__ */ n("span", { className: "pa-edit-field-label", children: e }),
980
- /* @__PURE__ */ d(
980
+ /* @__PURE__ */ c(
981
981
  "div",
982
982
  {
983
983
  className: `pa-spacing-control ${o ? "pa-spacing-control--split" : "pa-spacing-control--pair"}`,
@@ -986,68 +986,68 @@ function ut({ label: e, value: t, onChange: i }) {
986
986
  // Grid mirrors pair-view columns:
987
987
  // Col 1 (horizontal pair) → L on top, R on bottom
988
988
  // Col 2 (vertical pair) → T on top, B on bottom
989
- /* @__PURE__ */ d("div", { className: "pa-spacing-grid", children: [
989
+ /* @__PURE__ */ c("div", { className: "pa-spacing-grid", children: [
990
990
  /* @__PURE__ */ n(
991
- ge,
991
+ me,
992
992
  {
993
- icon: /* @__PURE__ */ n($e, { side: "left" }),
994
- display: ue(r.left),
993
+ icon: /* @__PURE__ */ n(Le, { side: "left" }),
994
+ display: de(a.left),
995
995
  ariaLabel: `${e} left`,
996
- onCommit: (l) => a({ left: pe(l) })
996
+ onCommit: (l) => i({ left: fe(l) })
997
997
  }
998
998
  ),
999
999
  /* @__PURE__ */ n(
1000
- ge,
1000
+ me,
1001
1001
  {
1002
- icon: /* @__PURE__ */ n($e, { side: "top" }),
1003
- display: ue(r.top),
1002
+ icon: /* @__PURE__ */ n(Le, { side: "top" }),
1003
+ display: de(a.top),
1004
1004
  ariaLabel: `${e} top`,
1005
- onCommit: (l) => a({ top: pe(l) })
1005
+ onCommit: (l) => i({ top: fe(l) })
1006
1006
  }
1007
1007
  ),
1008
1008
  /* @__PURE__ */ n(
1009
- ge,
1009
+ me,
1010
1010
  {
1011
- icon: /* @__PURE__ */ n($e, { side: "right" }),
1012
- display: ue(r.right),
1011
+ icon: /* @__PURE__ */ n(Le, { side: "right" }),
1012
+ display: de(a.right),
1013
1013
  ariaLabel: `${e} right`,
1014
- onCommit: (l) => a({ right: pe(l) })
1014
+ onCommit: (l) => i({ right: fe(l) })
1015
1015
  }
1016
1016
  ),
1017
1017
  /* @__PURE__ */ n(
1018
- ge,
1018
+ me,
1019
1019
  {
1020
- icon: /* @__PURE__ */ n($e, { side: "bottom" }),
1021
- display: ue(r.bottom),
1020
+ icon: /* @__PURE__ */ n(Le, { side: "bottom" }),
1021
+ display: de(a.bottom),
1022
1022
  ariaLabel: `${e} bottom`,
1023
- onCommit: (l) => a({ bottom: pe(l) })
1023
+ onCommit: (l) => i({ bottom: fe(l) })
1024
1024
  }
1025
1025
  )
1026
1026
  ] })
1027
- ) : /* @__PURE__ */ d("div", { className: "pa-spacing-pair", children: [
1027
+ ) : /* @__PURE__ */ c("div", { className: "pa-spacing-pair", children: [
1028
1028
  /* @__PURE__ */ n(
1029
- ge,
1029
+ me,
1030
1030
  {
1031
1031
  icon: /* @__PURE__ */ n(Pn, {}),
1032
- display: lt(r.left, r.right),
1033
- mixed: c,
1032
+ display: lt(a.left, a.right),
1033
+ mixed: p,
1034
1034
  ariaLabel: `${e} horizontal`,
1035
1035
  onCommit: (l) => {
1036
- const [f, p] = ct(l, r.left);
1037
- a({ left: f, right: p });
1036
+ const [g, f] = pt(l, a.left);
1037
+ i({ left: g, right: f });
1038
1038
  }
1039
1039
  }
1040
1040
  ),
1041
1041
  /* @__PURE__ */ n(
1042
- ge,
1042
+ me,
1043
1043
  {
1044
1044
  icon: /* @__PURE__ */ n(Dn, {}),
1045
- display: lt(r.top, r.bottom),
1046
- mixed: u,
1045
+ display: lt(a.top, a.bottom),
1046
+ mixed: d,
1047
1047
  ariaLabel: `${e} vertical`,
1048
1048
  onCommit: (l) => {
1049
- const [f, p] = ct(l, r.top);
1050
- a({ top: f, bottom: p });
1049
+ const [g, f] = pt(l, a.top);
1050
+ i({ top: g, bottom: f });
1051
1051
  }
1052
1052
  }
1053
1053
  )
@@ -1072,10 +1072,10 @@ function ut({ label: e, value: t, onChange: i }) {
1072
1072
  function Fn({
1073
1073
  options: e,
1074
1074
  value: t,
1075
- ariaLabel: i,
1076
- onChange: r
1075
+ ariaLabel: r,
1076
+ onChange: a
1077
1077
  }) {
1078
- return /* @__PURE__ */ n("div", { className: "pa-segmented", role: "group", "aria-label": i, children: e.map((o) => /* @__PURE__ */ n(
1078
+ return /* @__PURE__ */ n("div", { className: "pa-segmented", role: "group", "aria-label": r, children: e.map((o) => /* @__PURE__ */ n(
1079
1079
  "button",
1080
1080
  {
1081
1081
  type: "button",
@@ -1083,7 +1083,7 @@ function Fn({
1083
1083
  title: o.title,
1084
1084
  "aria-pressed": t === o.value,
1085
1085
  "aria-label": o.title,
1086
- onClick: () => r == null ? void 0 : r(o.value),
1086
+ onClick: () => a == null ? void 0 : a(o.value),
1087
1087
  children: o.content
1088
1088
  },
1089
1089
  o.value
@@ -1092,23 +1092,23 @@ function Fn({
1092
1092
  function Bn({
1093
1093
  options: e,
1094
1094
  ariaLabel: t,
1095
- onToggle: i
1095
+ onToggle: r
1096
1096
  }) {
1097
- return /* @__PURE__ */ n("div", { className: "pa-segmented", role: "group", "aria-label": t, children: e.map((r) => /* @__PURE__ */ n(
1097
+ return /* @__PURE__ */ n("div", { className: "pa-segmented", role: "group", "aria-label": t, children: e.map((a) => /* @__PURE__ */ n(
1098
1098
  "button",
1099
1099
  {
1100
1100
  type: "button",
1101
- className: `pa-segmented-btn ${r.pressed ? "pa-segmented-btn--on" : ""}`,
1102
- title: r.title,
1103
- "aria-pressed": r.pressed,
1104
- "aria-label": r.title,
1105
- onClick: () => i(r.id),
1106
- children: r.content
1101
+ className: `pa-segmented-btn ${a.pressed ? "pa-segmented-btn--on" : ""}`,
1102
+ title: a.title,
1103
+ "aria-pressed": a.pressed,
1104
+ "aria-label": a.title,
1105
+ onClick: () => r(a.id),
1106
+ children: a.content
1107
1107
  },
1108
- r.id
1108
+ a.id
1109
1109
  )) });
1110
1110
  }
1111
- function zn({ className: e }) {
1111
+ function _n({ className: e }) {
1112
1112
  return /* @__PURE__ */ n("svg", { className: e, width: "16", height: "16", viewBox: "0 0 16 16", "aria-hidden": "true", children: /* @__PURE__ */ n(
1113
1113
  "path",
1114
1114
  {
@@ -1117,7 +1117,7 @@ function zn({ className: e }) {
1117
1117
  }
1118
1118
  ) });
1119
1119
  }
1120
- function _n({ className: e }) {
1120
+ function Hn({ className: e }) {
1121
1121
  return /* @__PURE__ */ n("svg", { className: e, width: "16", height: "16", viewBox: "0 0 16 16", "aria-hidden": "true", children: /* @__PURE__ */ n(
1122
1122
  "path",
1123
1123
  {
@@ -1126,7 +1126,7 @@ function _n({ className: e }) {
1126
1126
  }
1127
1127
  ) });
1128
1128
  }
1129
- function Hn({ className: e }) {
1129
+ function Vn({ className: e }) {
1130
1130
  return /* @__PURE__ */ n("svg", { className: e, width: "16", height: "16", viewBox: "0 0 16 16", "aria-hidden": "true", children: /* @__PURE__ */ n(
1131
1131
  "path",
1132
1132
  {
@@ -1135,7 +1135,7 @@ function Hn({ className: e }) {
1135
1135
  }
1136
1136
  ) });
1137
1137
  }
1138
- function Vn({ className: e }) {
1138
+ function Un({ className: e }) {
1139
1139
  return /* @__PURE__ */ n("svg", { className: e, width: "16", height: "16", viewBox: "0 0 16 16", "aria-hidden": "true", children: /* @__PURE__ */ n("path", { fill: "currentColor", d: "M2 3h12v1.5H2V3zm0 3.5h12v1.5H2V6.5zm0 3.5h12v1.5H2V10zm0 3.5h12v1.5H2V13.5z" }) });
1140
1140
  }
1141
1141
  function Wn({ className: e }) {
@@ -1151,29 +1151,29 @@ function Bt(e) {
1151
1151
  const t = parseInt(e.trim(), 10);
1152
1152
  return Number.isFinite(t) ? t >= 600 : e.trim() === "bold" || e.trim() === "bolder";
1153
1153
  }
1154
- function Un(e) {
1154
+ function Yn(e) {
1155
1155
  return Bt(e) ? "400" : "700";
1156
1156
  }
1157
- function zt(e) {
1157
+ function _t(e) {
1158
1158
  return e.trim() === "italic" || e.trim() === "oblique";
1159
1159
  }
1160
- function Yn(e) {
1161
- return zt(e) ? "normal" : "italic";
1160
+ function jn(e) {
1161
+ return _t(e) ? "normal" : "italic";
1162
1162
  }
1163
- function pt(e, t) {
1163
+ function ft(e, t) {
1164
1164
  return e.split(/\s+/).includes(t);
1165
1165
  }
1166
- function ht(e, t) {
1167
- const i = new Set(
1168
- e.trim().split(/\s+/).filter((r) => r && r !== "none")
1166
+ function ut(e, t) {
1167
+ const r = new Set(
1168
+ e.trim().split(/\s+/).filter((a) => a && a !== "none")
1169
1169
  );
1170
- return i.has(t) ? i.delete(t) : i.add(t), i.size === 0 ? "none" : Array.from(i).join(" ");
1170
+ return r.has(t) ? r.delete(t) : r.add(t), r.size === 0 ? "none" : Array.from(r).join(" ");
1171
1171
  }
1172
1172
  function Xn(e) {
1173
1173
  const t = e.trim();
1174
1174
  return t === "center" || t === "right" || t === "justify" ? t : "left";
1175
1175
  }
1176
- const ft = [
1176
+ const gt = [
1177
1177
  "none",
1178
1178
  "solid",
1179
1179
  "dashed",
@@ -1183,7 +1183,7 @@ const ft = [
1183
1183
  "ridge",
1184
1184
  "inset",
1185
1185
  "outset"
1186
- ], mt = [
1186
+ ], ht = [
1187
1187
  "block",
1188
1188
  "inline",
1189
1189
  "inline-block",
@@ -1197,35 +1197,35 @@ const ft = [
1197
1197
  function Kn({
1198
1198
  values: e,
1199
1199
  onPropertyChange: t,
1200
- textKind: i,
1201
- textValue: r,
1200
+ textKind: r,
1201
+ textValue: a,
1202
1202
  onTextChange: o,
1203
1203
  targetScope: s,
1204
- onTargetScopeChange: a,
1205
- elementState: c,
1206
- onElementStateChange: u,
1204
+ onTargetScopeChange: i,
1205
+ elementState: p,
1206
+ onElementStateChange: d,
1207
1207
  instanceCount: l,
1208
- scopeHint: f,
1209
- stateHint: p
1208
+ scopeHint: g,
1209
+ stateHint: f
1210
1210
  }) {
1211
- var I, L;
1212
- const v = e["font-weight"] ?? "", m = e["font-style"] ?? "normal", g = e["text-decoration"] ?? "none", y = Xn(e["text-align"] ?? "left"), S = ((I = e.display) == null ? void 0 : I.trim()) ?? "", w = !!S, k = Gn.has(S), N = [...mt];
1213
- S && !mt.includes(S) && N.push(S);
1214
- const E = ((L = e.gap) == null ? void 0 : L.trim()) ?? "", z = E === "normal" || E === "" ? "0px" : E, R = e["border-style"] ?? "none", x = [...ft];
1215
- return R && !ft.includes(R) && x.push(R), /* @__PURE__ */ d("div", { className: "pa-edit-sections", children: [
1216
- /* @__PURE__ */ d(fe, { title: "Targeting", defaultOpen: !0, children: [
1217
- /* @__PURE__ */ d("div", { className: "pa-edit-field-grid pa-edit-field-grid--2", children: [
1218
- /* @__PURE__ */ d("label", { className: "pa-edit-mini-field", children: [
1211
+ var I, S;
1212
+ const x = e["font-weight"] ?? "", h = e["font-style"] ?? "normal", m = e["text-decoration"] ?? "none", v = Xn(e["text-align"] ?? "left"), z = ((I = e.display) == null ? void 0 : I.trim()) ?? "", w = !!z, N = Gn.has(z), k = [...ht];
1213
+ z && !ht.includes(z) && k.push(z);
1214
+ const E = ((S = e.gap) == null ? void 0 : S.trim()) ?? "", B = E === "normal" || E === "" ? "0px" : E, $ = e["border-style"] ?? "none", y = [...gt];
1215
+ return $ && !gt.includes($) && y.push($), /* @__PURE__ */ c("div", { className: "pa-edit-sections", children: [
1216
+ /* @__PURE__ */ c(ge, { title: "Targeting", defaultOpen: !0, children: [
1217
+ /* @__PURE__ */ c("div", { className: "pa-edit-field-grid pa-edit-field-grid--2", children: [
1218
+ /* @__PURE__ */ c("label", { className: "pa-edit-mini-field", children: [
1219
1219
  /* @__PURE__ */ n("span", { className: "pa-edit-field-label", children: "Scope" }),
1220
- /* @__PURE__ */ d(
1220
+ /* @__PURE__ */ c(
1221
1221
  "select",
1222
1222
  {
1223
1223
  className: "pa-select",
1224
1224
  value: s,
1225
- onChange: (h) => a(h.target.value),
1225
+ onChange: (u) => i(u.target.value),
1226
1226
  children: [
1227
1227
  /* @__PURE__ */ n("option", { value: "this-instance", children: "This instance" }),
1228
- /* @__PURE__ */ d("option", { value: "all-instances", disabled: l <= 1, children: [
1228
+ /* @__PURE__ */ c("option", { value: "all-instances", disabled: l <= 1, children: [
1229
1229
  "All (",
1230
1230
  l,
1231
1231
  ")"
@@ -1234,14 +1234,14 @@ function Kn({
1234
1234
  }
1235
1235
  )
1236
1236
  ] }),
1237
- /* @__PURE__ */ d("label", { className: "pa-edit-mini-field", children: [
1237
+ /* @__PURE__ */ c("label", { className: "pa-edit-mini-field", children: [
1238
1238
  /* @__PURE__ */ n("span", { className: "pa-edit-field-label", children: "State" }),
1239
- /* @__PURE__ */ d(
1239
+ /* @__PURE__ */ c(
1240
1240
  "select",
1241
1241
  {
1242
1242
  className: "pa-select",
1243
- value: c,
1244
- onChange: (h) => u(h.target.value),
1243
+ value: p,
1244
+ onChange: (u) => d(u.target.value),
1245
1245
  children: [
1246
1246
  /* @__PURE__ */ n("option", { value: "normal", children: "Normal" }),
1247
1247
  /* @__PURE__ */ n("option", { value: "hover", children: "Hover" }),
@@ -1253,31 +1253,31 @@ function Kn({
1253
1253
  )
1254
1254
  ] })
1255
1255
  ] }),
1256
- f ? /* @__PURE__ */ n("p", { className: "pa-edit-inline-hint", children: f }) : null,
1257
- p ? /* @__PURE__ */ n("p", { className: "pa-edit-inline-hint", children: p }) : null
1256
+ g ? /* @__PURE__ */ n("p", { className: "pa-edit-inline-hint", children: g }) : null,
1257
+ f ? /* @__PURE__ */ n("p", { className: "pa-edit-inline-hint", children: f }) : null
1258
1258
  ] }),
1259
- i !== "none" && /* @__PURE__ */ n(fe, { title: "Content", defaultOpen: !0, children: /* @__PURE__ */ d("label", { className: "pa-edit-stack-field", children: [
1259
+ r !== "none" && /* @__PURE__ */ n(ge, { title: "Content", defaultOpen: !0, children: /* @__PURE__ */ c("label", { className: "pa-edit-stack-field", children: [
1260
1260
  /* @__PURE__ */ n("span", { className: "pa-edit-field-label", children: "Text" }),
1261
1261
  /* @__PURE__ */ n(
1262
1262
  "textarea",
1263
1263
  {
1264
1264
  className: "pa-textarea pa-edit-text-input",
1265
- value: r,
1266
- onChange: (h) => o(h.target.value),
1267
- rows: i === "value" ? 2 : 3,
1265
+ value: a,
1266
+ onChange: (u) => o(u.target.value),
1267
+ rows: r === "value" ? 2 : 3,
1268
1268
  placeholder: "Edit visible text…"
1269
1269
  }
1270
1270
  )
1271
1271
  ] }) }),
1272
- /* @__PURE__ */ d(fe, { title: "Typography", defaultOpen: !0, children: [
1272
+ /* @__PURE__ */ c(ge, { title: "Typography", defaultOpen: !0, children: [
1273
1273
  /* @__PURE__ */ n(
1274
- An,
1274
+ zn,
1275
1275
  {
1276
1276
  value: e["font-family"] ?? "",
1277
- onChange: (h) => t("font-family", h)
1277
+ onChange: (u) => t("font-family", u)
1278
1278
  }
1279
1279
  ),
1280
- /* @__PURE__ */ d("div", { className: "pa-edit-field-block", children: [
1280
+ /* @__PURE__ */ c("div", { className: "pa-edit-field-block", children: [
1281
1281
  /* @__PURE__ */ n("span", { className: "pa-edit-field-label", children: "Style" }),
1282
1282
  /* @__PURE__ */ n(
1283
1283
  Bn,
@@ -1287,74 +1287,74 @@ function Kn({
1287
1287
  {
1288
1288
  id: "bold",
1289
1289
  title: "Bold",
1290
- pressed: Bt(v),
1290
+ pressed: Bt(x),
1291
1291
  content: /* @__PURE__ */ n("span", { className: "pa-segmented-type pa-segmented-type--bold", children: "B" })
1292
1292
  },
1293
1293
  {
1294
1294
  id: "italic",
1295
1295
  title: "Italic",
1296
- pressed: zt(m),
1296
+ pressed: _t(h),
1297
1297
  content: /* @__PURE__ */ n("span", { className: "pa-segmented-type pa-segmented-type--italic", children: "I" })
1298
1298
  },
1299
1299
  {
1300
1300
  id: "underline",
1301
1301
  title: "Underline",
1302
- pressed: pt(g, "underline"),
1302
+ pressed: ft(m, "underline"),
1303
1303
  content: /* @__PURE__ */ n("span", { className: "pa-segmented-type pa-segmented-type--underline", children: "U" })
1304
1304
  },
1305
1305
  {
1306
1306
  id: "strikethrough",
1307
1307
  title: "Strikethrough",
1308
- pressed: pt(g, "line-through"),
1308
+ pressed: ft(m, "line-through"),
1309
1309
  content: /* @__PURE__ */ n(Wn, { className: "pa-segmented-icon" })
1310
1310
  }
1311
1311
  ],
1312
- onToggle: (h) => {
1313
- h === "bold" ? t("font-weight", Un(v)) : h === "italic" ? t("font-style", Yn(m)) : h === "underline" ? t(
1312
+ onToggle: (u) => {
1313
+ u === "bold" ? t("font-weight", Yn(x)) : u === "italic" ? t("font-style", jn(h)) : u === "underline" ? t(
1314
1314
  "text-decoration",
1315
- ht(g, "underline")
1316
- ) : h === "strikethrough" && t(
1315
+ ut(m, "underline")
1316
+ ) : u === "strikethrough" && t(
1317
1317
  "text-decoration",
1318
- ht(g, "line-through")
1318
+ ut(m, "line-through")
1319
1319
  );
1320
1320
  }
1321
1321
  }
1322
1322
  )
1323
1323
  ] }),
1324
- /* @__PURE__ */ d("div", { className: "pa-edit-field-block", children: [
1324
+ /* @__PURE__ */ c("div", { className: "pa-edit-field-block", children: [
1325
1325
  /* @__PURE__ */ n("span", { className: "pa-edit-field-label", children: "Align" }),
1326
1326
  /* @__PURE__ */ n(
1327
1327
  Fn,
1328
1328
  {
1329
1329
  ariaLabel: "Text align",
1330
- value: y,
1331
- onChange: (h) => t("text-align", h),
1330
+ value: v,
1331
+ onChange: (u) => t("text-align", u),
1332
1332
  options: [
1333
1333
  {
1334
1334
  value: "left",
1335
1335
  title: "Align left",
1336
- content: /* @__PURE__ */ n(zn, { className: "pa-segmented-icon" })
1336
+ content: /* @__PURE__ */ n(_n, { className: "pa-segmented-icon" })
1337
1337
  },
1338
1338
  {
1339
1339
  value: "center",
1340
1340
  title: "Align center",
1341
- content: /* @__PURE__ */ n(_n, { className: "pa-segmented-icon" })
1341
+ content: /* @__PURE__ */ n(Hn, { className: "pa-segmented-icon" })
1342
1342
  },
1343
1343
  {
1344
1344
  value: "right",
1345
1345
  title: "Align right",
1346
- content: /* @__PURE__ */ n(Hn, { className: "pa-segmented-icon" })
1346
+ content: /* @__PURE__ */ n(Vn, { className: "pa-segmented-icon" })
1347
1347
  },
1348
1348
  {
1349
1349
  value: "justify",
1350
1350
  title: "Justify",
1351
- content: /* @__PURE__ */ n(Vn, { className: "pa-segmented-icon" })
1351
+ content: /* @__PURE__ */ n(Un, { className: "pa-segmented-icon" })
1352
1352
  }
1353
1353
  ]
1354
1354
  }
1355
1355
  )
1356
1356
  ] }),
1357
- /* @__PURE__ */ d("div", { className: "pa-edit-field-grid pa-edit-field-grid--2 pa-edit-size-row", children: [
1357
+ /* @__PURE__ */ c("div", { className: "pa-edit-field-grid pa-edit-field-grid--2 pa-edit-size-row", children: [
1358
1358
  /* @__PURE__ */ n(
1359
1359
  se,
1360
1360
  {
@@ -1362,7 +1362,7 @@ function Kn({
1362
1362
  property: "font-size",
1363
1363
  label: "Font size (px)",
1364
1364
  value: e["font-size"] ?? "",
1365
- onChange: (h) => t("font-size", h)
1365
+ onChange: (u) => t("font-size", u)
1366
1366
  }
1367
1367
  ),
1368
1368
  /* @__PURE__ */ n(
@@ -1372,7 +1372,7 @@ function Kn({
1372
1372
  property: "line-height",
1373
1373
  label: "Line height (px)",
1374
1374
  value: e["line-height"] ?? "",
1375
- onChange: (h) => t("line-height", h)
1375
+ onChange: (u) => t("line-height", u)
1376
1376
  }
1377
1377
  )
1378
1378
  ] }),
@@ -1381,12 +1381,12 @@ function Kn({
1381
1381
  {
1382
1382
  label: "Color",
1383
1383
  value: e.color ?? "",
1384
- onChange: (h) => t("color", h)
1384
+ onChange: (u) => t("color", u)
1385
1385
  }
1386
1386
  )
1387
1387
  ] }),
1388
- /* @__PURE__ */ d(fe, { title: "Layout", defaultOpen: !0, children: [
1389
- /* @__PURE__ */ d("div", { className: "pa-edit-split-fields", children: [
1388
+ /* @__PURE__ */ c(ge, { title: "Layout", defaultOpen: !0, children: [
1389
+ /* @__PURE__ */ c("div", { className: "pa-edit-split-fields", children: [
1390
1390
  /* @__PURE__ */ n(
1391
1391
  se,
1392
1392
  {
@@ -1394,7 +1394,7 @@ function Kn({
1394
1394
  property: "width",
1395
1395
  label: "Width",
1396
1396
  value: e.width ?? "",
1397
- onChange: (h) => t("width", h)
1397
+ onChange: (u) => t("width", u)
1398
1398
  }
1399
1399
  ),
1400
1400
  /* @__PURE__ */ n(
@@ -1404,58 +1404,58 @@ function Kn({
1404
1404
  property: "height",
1405
1405
  label: "Height",
1406
1406
  value: e.height ?? "",
1407
- onChange: (h) => t("height", h)
1407
+ onChange: (u) => t("height", u)
1408
1408
  }
1409
1409
  )
1410
1410
  ] }),
1411
1411
  /* @__PURE__ */ n(
1412
- ut,
1412
+ dt,
1413
1413
  {
1414
1414
  property: "padding",
1415
1415
  label: "Padding",
1416
1416
  value: e.padding ?? "",
1417
- onChange: (h) => t("padding", h)
1417
+ onChange: (u) => t("padding", u)
1418
1418
  }
1419
1419
  ),
1420
1420
  /* @__PURE__ */ n(
1421
- ut,
1421
+ dt,
1422
1422
  {
1423
1423
  property: "margin",
1424
1424
  label: "Margin",
1425
1425
  value: e.margin ?? "",
1426
- onChange: (h) => t("margin", h)
1426
+ onChange: (u) => t("margin", u)
1427
1427
  }
1428
1428
  ),
1429
- w && /* @__PURE__ */ d("label", { className: "pa-prop-row pa-prop-row--compact", children: [
1429
+ w && /* @__PURE__ */ c("label", { className: "pa-prop-row pa-prop-row--compact", children: [
1430
1430
  /* @__PURE__ */ n("span", { className: "pa-edit-field-label", children: "Display" }),
1431
1431
  /* @__PURE__ */ n(
1432
1432
  "select",
1433
1433
  {
1434
1434
  className: "pa-select",
1435
- value: S,
1436
- onChange: (h) => t("display", h.target.value),
1437
- children: N.map((h) => /* @__PURE__ */ n("option", { value: h, children: h }, h))
1435
+ value: z,
1436
+ onChange: (u) => t("display", u.target.value),
1437
+ children: k.map((u) => /* @__PURE__ */ n("option", { value: u, children: u }, u))
1438
1438
  }
1439
1439
  )
1440
1440
  ] }),
1441
- k && /* @__PURE__ */ n(
1441
+ N && /* @__PURE__ */ n(
1442
1442
  se,
1443
1443
  {
1444
1444
  compact: !0,
1445
1445
  property: "gap",
1446
1446
  label: "Gap",
1447
- value: z,
1448
- onChange: (h) => t("gap", h)
1447
+ value: B,
1448
+ onChange: (u) => t("gap", u)
1449
1449
  }
1450
1450
  )
1451
1451
  ] }),
1452
- /* @__PURE__ */ d(fe, { title: "Fill", children: [
1452
+ /* @__PURE__ */ c(ge, { title: "Fill", children: [
1453
1453
  /* @__PURE__ */ n(
1454
1454
  _e,
1455
1455
  {
1456
1456
  label: "Background",
1457
1457
  value: e["background-color"] ?? "",
1458
- onChange: (h) => t("background-color", h)
1458
+ onChange: (u) => t("background-color", u)
1459
1459
  }
1460
1460
  ),
1461
1461
  /* @__PURE__ */ n(
@@ -1465,28 +1465,28 @@ function Kn({
1465
1465
  property: "opacity",
1466
1466
  label: "Opacity",
1467
1467
  value: e.opacity ?? "",
1468
- onChange: (h) => t("opacity", h)
1468
+ onChange: (u) => t("opacity", u)
1469
1469
  }
1470
1470
  )
1471
1471
  ] }),
1472
- /* @__PURE__ */ d(fe, { title: "Border", defaultOpen: !0, children: [
1472
+ /* @__PURE__ */ c(ge, { title: "Border", defaultOpen: !0, children: [
1473
1473
  /* @__PURE__ */ n(
1474
1474
  _e,
1475
1475
  {
1476
1476
  label: "Border color",
1477
1477
  value: e["border-color"] ?? "",
1478
- onChange: (h) => t("border-color", h)
1478
+ onChange: (u) => t("border-color", u)
1479
1479
  }
1480
1480
  ),
1481
- /* @__PURE__ */ d("label", { className: "pa-edit-stack-field", children: [
1481
+ /* @__PURE__ */ c("label", { className: "pa-edit-stack-field", children: [
1482
1482
  /* @__PURE__ */ n("span", { className: "pa-edit-field-label", children: "Style" }),
1483
1483
  /* @__PURE__ */ n(
1484
1484
  "select",
1485
1485
  {
1486
1486
  className: "pa-select",
1487
- value: R,
1488
- onChange: (h) => t("border-style", h.target.value),
1489
- children: x.map((h) => /* @__PURE__ */ n("option", { value: h, children: h }, h))
1487
+ value: $,
1488
+ onChange: (u) => t("border-style", u.target.value),
1489
+ children: y.map((u) => /* @__PURE__ */ n("option", { value: u, children: u }, u))
1490
1490
  }
1491
1491
  )
1492
1492
  ] }),
@@ -1497,7 +1497,7 @@ function Kn({
1497
1497
  property: "border-width",
1498
1498
  label: "Stroke width (px)",
1499
1499
  value: e["border-width"] ?? "",
1500
- onChange: (h) => t("border-width", h)
1500
+ onChange: (u) => t("border-width", u)
1501
1501
  }
1502
1502
  ),
1503
1503
  /* @__PURE__ */ n(
@@ -1507,13 +1507,13 @@ function Kn({
1507
1507
  property: "border-radius",
1508
1508
  label: "Radius (px)",
1509
1509
  value: e["border-radius"] ?? "",
1510
- onChange: (h) => t("border-radius", h)
1510
+ onChange: (u) => t("border-radius", u)
1511
1511
  }
1512
1512
  )
1513
1513
  ] })
1514
1514
  ] });
1515
1515
  }
1516
- const jn = 50, gt = [
1516
+ const qn = 50, mt = [
1517
1517
  "font-family",
1518
1518
  "font-size",
1519
1519
  "font-weight",
@@ -1535,237 +1535,237 @@ const jn = 50, gt = [
1535
1535
  "border-radius",
1536
1536
  "opacity"
1537
1537
  ];
1538
- function qn(e, t, i) {
1539
- var ce;
1540
- const r = X([]), o = X(/* @__PURE__ */ new Set()), s = X([]), a = X(null), c = X([]), u = X(
1538
+ function Jn(e, t, r) {
1539
+ var pe;
1540
+ const a = j([]), o = j(/* @__PURE__ */ new Set()), s = j([]), i = j(null), p = j([]), d = j(
1541
1541
  null
1542
- ), [l, f] = A({}), [p, v] = A({}), [m, g] = A("none"), [y, S] = A(""), [w, k] = A(""), [N, E] = A(() => /* @__PURE__ */ new Map()), [z, R] = A(!1), x = $(() => {
1542
+ ), [l, g] = A({}), [f, x] = A({}), [h, m] = A("none"), [v, z] = A(""), [w, N] = A(""), [k, E] = A(() => /* @__PURE__ */ new Map()), [B, $] = A(!1), y = L(() => {
1543
1543
  const C = Array.from(o.current);
1544
1544
  return {
1545
- inline: nt(C, [...gt]),
1546
- text: e && m !== "none" ? tt(e, m) : null
1545
+ inline: nt(C, [...mt]),
1546
+ text: e && h !== "none" ? tt(e, h) : null
1547
1547
  };
1548
- }, [e, m]), I = $(() => {
1549
- c.current.push(x()), c.current.length > jn && c.current.shift(), R(c.current.length > 0);
1550
- }, [x]), L = $(
1548
+ }, [e, h]), I = L(() => {
1549
+ p.current.push(y()), p.current.length > qn && p.current.shift(), $(p.current.length > 0);
1550
+ }, [y]), S = L(
1551
1551
  (C) => {
1552
1552
  var H;
1553
1553
  if (!e) return;
1554
- const P = Array.from(o.current);
1555
- ke(s.current.filter((O) => P.includes(O.element))), a.current && Ae(a.current);
1556
- const D = Re(e, t);
1557
- r.current = D, o.current = new Set(D), Se(P), ze(D, i);
1558
- const T = e ? ((H = N.get(e)) == null ? void 0 : H.get(i)) ?? [] : [];
1554
+ const R = Array.from(o.current);
1555
+ Ne(s.current.filter((D) => R.includes(D.element))), i.current && Ae(i.current);
1556
+ const P = $e(e, t);
1557
+ a.current = P, o.current = new Set(P), ze(R), Be(P, r);
1558
+ const T = e ? ((H = k.get(e)) == null ? void 0 : H.get(r)) ?? [] : [];
1559
1559
  if (C && T.length > 0)
1560
- for (const O of T)
1561
- if (O.property === "textContent" || O.property === "value")
1562
- for (const Y of D)
1563
- rt(Y, O.property, O.newValue);
1560
+ for (const D of T)
1561
+ if (D.property === "textContent" || D.property === "value")
1562
+ for (const Y of P)
1563
+ at(Y, D.property, D.newValue);
1564
1564
  else
1565
- for (const Y of D)
1566
- Y.style.setProperty(O.property, O.newValue);
1565
+ for (const Y of P)
1566
+ Y.style.setProperty(D.property, D.newValue);
1567
1567
  },
1568
- [e, t, i, N]
1568
+ [e, t, r, k]
1569
1569
  );
1570
1570
  _(() => {
1571
1571
  if (!e) {
1572
- r.current = [], o.current = /* @__PURE__ */ new Set(), s.current = [], a.current = null, c.current = [], f({}), v({}), g("none"), S(""), k(""), E(/* @__PURE__ */ new Map()), R(!1);
1572
+ a.current = [], o.current = /* @__PURE__ */ new Set(), s.current = [], i.current = null, p.current = [], g({}), x({}), m("none"), z(""), N(""), E(/* @__PURE__ */ new Map()), $(!1);
1573
1573
  return;
1574
1574
  }
1575
- const C = Re(e, t);
1576
- r.current = C, o.current = new Set(C), s.current = nt(C, [...gt]), c.current = [], R(!1);
1577
- const P = Ce(e);
1578
- f(P), v(P);
1579
- const D = ve(e);
1580
- return g(D.kind), S(D.value), k(D.value), a.current = D.kind !== "none" ? tt(e, D.kind) : null, ze(C, i), () => Se(C);
1575
+ const C = $e(e, t);
1576
+ a.current = C, o.current = new Set(C), s.current = nt(C, [...mt]), p.current = [], $(!1);
1577
+ const R = Ce(e);
1578
+ g(R), x(R);
1579
+ const P = xe(e);
1580
+ return m(P.kind), z(P.value), N(P.value), i.current = P.kind !== "none" ? tt(e, P.kind) : null, Be(C, r), () => ze(C);
1581
1581
  }, [e]), _(() => {
1582
- e && L(!0);
1582
+ e && S(!0);
1583
1583
  }, [t]), _(() => {
1584
- var ae;
1584
+ var ie;
1585
1585
  if (!e) return;
1586
- const C = Re(e, t);
1587
- r.current = C, ke(
1588
- s.current.filter((G) => C.includes(G.element))
1586
+ const C = $e(e, t);
1587
+ a.current = C, Ne(
1588
+ s.current.filter((X) => C.includes(X.element))
1589
1589
  );
1590
- const P = Ce(e), D = i === "normal" ? {} : qt(e, i);
1591
- for (const [G, K] of Object.entries(D))
1592
- for (const he of C) he.style.setProperty(G, K);
1593
- const T = ((ae = N.get(e)) == null ? void 0 : ae.get(i)) ?? [];
1594
- for (const G of T)
1595
- if (!(G.property === "textContent" || G.property === "value"))
1596
- for (const K of C)
1597
- K.style.setProperty(G.property, G.newValue);
1598
- const H = u.current, O = H !== null && H.element === e && H.state !== i, Y = H !== null && H.element !== e && i !== "normal";
1599
- if (O || Y) {
1600
- const G = { ...P, ...D };
1601
- for (const K of T)
1602
- K.property === "textContent" || K.property === "value" || (G[K.property] = K.newValue);
1603
- f(G);
1590
+ const R = Ce(e), P = r === "normal" ? {} : Jt(e, r);
1591
+ for (const [X, G] of Object.entries(P))
1592
+ for (const ue of C) ue.style.setProperty(X, G);
1593
+ const T = ((ie = k.get(e)) == null ? void 0 : ie.get(r)) ?? [];
1594
+ for (const X of T)
1595
+ if (!(X.property === "textContent" || X.property === "value"))
1596
+ for (const G of C)
1597
+ G.style.setProperty(X.property, X.newValue);
1598
+ const H = d.current, D = H !== null && H.element === e && H.state !== r, Y = H !== null && H.element !== e && r !== "normal";
1599
+ if (D || Y) {
1600
+ const X = { ...R, ...P };
1601
+ for (const G of T)
1602
+ G.property === "textContent" || G.property === "value" || (X[G.property] = G.newValue);
1603
+ g(X);
1604
1604
  }
1605
- u.current = { element: e, state: i }, Se(Array.from(o.current)), ze(C, i), o.current = new Set(C);
1606
- }, [i, e, t]);
1607
- const h = $(
1608
- (C, P, D) => {
1605
+ d.current = { element: e, state: r }, ze(Array.from(o.current)), Be(C, r), o.current = new Set(C);
1606
+ }, [r, e, t]);
1607
+ const u = L(
1608
+ (C, R, P) => {
1609
1609
  e && E((T) => {
1610
- const H = new Map(T), O = new Map(H.get(e) ?? /* @__PURE__ */ new Map()), ae = (O.get(i) ?? []).filter((G) => G.property !== C);
1611
- return D === P ? ae.length === 0 ? O.delete(i) : O.set(i, ae) : O.set(i, [...ae, { property: C, oldValue: P, newValue: D }]), O.size === 0 ? H.delete(e) : H.set(e, O), H;
1610
+ const H = new Map(T), D = new Map(H.get(e) ?? /* @__PURE__ */ new Map()), ie = (D.get(r) ?? []).filter((X) => X.property !== C);
1611
+ return P === R ? ie.length === 0 ? D.delete(r) : D.set(r, ie) : D.set(r, [...ie, { property: C, oldValue: R, newValue: P }]), D.size === 0 ? H.delete(e) : H.set(e, D), H;
1612
1612
  });
1613
1613
  },
1614
- [e, i]
1615
- ), F = $(
1616
- (C, P) => {
1614
+ [e, r]
1615
+ ), O = L(
1616
+ (C, R) => {
1617
1617
  if (!e) return;
1618
- const D = { [C]: P };
1619
- C === "border-width" && (l["border-style"] ?? "none") === "none" && Ln(P) && (D["border-style"] = "solid"), I(), f((T) => ({ ...T, ...D }));
1620
- for (const [T, H] of Object.entries(D)) {
1621
- const O = p[T] ?? "";
1622
- for (const Y of r.current)
1618
+ const P = { [C]: R };
1619
+ C === "border-width" && (l["border-style"] ?? "none") === "none" && Ln(R) && (P["border-style"] = "solid"), I(), g((T) => ({ ...T, ...P }));
1620
+ for (const [T, H] of Object.entries(P)) {
1621
+ const D = f[T] ?? "";
1622
+ for (const Y of a.current)
1623
1623
  Y.style.setProperty(T, H), o.current.add(Y);
1624
- h(T, O, H);
1624
+ u(T, D, H);
1625
1625
  }
1626
1626
  },
1627
- [e, p, l, I, h]
1628
- ), U = $(
1627
+ [e, f, l, I, u]
1628
+ ), W = L(
1629
1629
  (C) => {
1630
- if (!(!e || m === "none")) {
1631
- I(), S(C);
1632
- for (const P of r.current)
1633
- rt(P, m, C), o.current.add(P);
1634
- h(m, w, C);
1630
+ if (!(!e || h === "none")) {
1631
+ I(), z(C);
1632
+ for (const R of a.current)
1633
+ at(R, h, C), o.current.add(R);
1634
+ u(h, w, C);
1635
1635
  }
1636
1636
  },
1637
- [e, m, w, I, h]
1638
- ), ye = $(() => {
1639
- const C = c.current.pop();
1640
- if (C && (ke(C.inline), C.text && Ae(C.text), R(c.current.length > 0), e)) {
1641
- f(Ce(e));
1642
- const P = ve(e);
1643
- P.kind !== "none" && S(P.value);
1637
+ [e, h, w, I, u]
1638
+ ), ve = L(() => {
1639
+ const C = p.current.pop();
1640
+ if (C && (Ne(C.inline), C.text && Ae(C.text), $(p.current.length > 0), e)) {
1641
+ g(Ce(e));
1642
+ const R = xe(e);
1643
+ R.kind !== "none" && z(R.value);
1644
1644
  }
1645
- }, [e]), ee = $(() => {
1646
- if (ke(s.current), a.current && Ae(a.current), c.current = [], R(!1), E(/* @__PURE__ */ new Map()), e) {
1647
- f(Ce(e));
1648
- const C = ve(e);
1649
- S(C.value);
1645
+ }, [e]), ee = L(() => {
1646
+ if (Ne(s.current), i.current && Ae(i.current), p.current = [], $(!1), E(/* @__PURE__ */ new Map()), e) {
1647
+ g(Ce(e));
1648
+ const C = xe(e);
1649
+ z(C.value);
1650
1650
  }
1651
- }, [e]), re = $(() => {
1652
- ke(s.current), a.current && Ae(a.current);
1653
- }, []), oe = $(() => {
1654
- if (re(), Se(Array.from(o.current)), c.current = [], R(!1), E(/* @__PURE__ */ new Map()), e) {
1655
- f(Ce(e));
1656
- const C = ve(e);
1657
- C.kind !== "none" && S(C.value);
1651
+ }, [e]), ae = L(() => {
1652
+ Ne(s.current), i.current && Ae(i.current);
1653
+ }, []), oe = L(() => {
1654
+ if (ae(), ze(Array.from(o.current)), p.current = [], $(!1), E(/* @__PURE__ */ new Map()), e) {
1655
+ g(Ce(e));
1656
+ const C = xe(e);
1657
+ C.kind !== "none" && z(C.value);
1658
1658
  }
1659
- }, [re, e]), W = e ? ((ce = N.get(e)) == null ? void 0 : ce.get(i)) ?? [] : [];
1660
- let j = 0;
1661
- for (const C of N.values())
1662
- for (const P of C.values()) j += P.length;
1663
- const ie = $(() => {
1659
+ }, [ae, e]), U = e ? ((pe = k.get(e)) == null ? void 0 : pe.get(r)) ?? [] : [];
1660
+ let K = 0;
1661
+ for (const C of k.values())
1662
+ for (const R of C.values()) K += R.length;
1663
+ const re = L(() => {
1664
1664
  E(/* @__PURE__ */ new Map());
1665
1665
  }, []);
1666
1666
  return {
1667
1667
  values: l,
1668
- textKind: m,
1669
- textValue: y,
1670
- pendingChanges: W,
1671
- pendingByElement: N,
1672
- totalPendingCount: j,
1673
- clearAllPending: ie,
1674
- canUndo: z,
1675
- updateProperty: F,
1676
- updateText: U,
1677
- undo: ye,
1668
+ textKind: h,
1669
+ textValue: v,
1670
+ pendingChanges: U,
1671
+ pendingByElement: k,
1672
+ totalPendingCount: K,
1673
+ clearAllPending: re,
1674
+ canUndo: B,
1675
+ updateProperty: O,
1676
+ updateText: W,
1677
+ undo: ve,
1678
1678
  reset: ee,
1679
1679
  clearPreviews: oe,
1680
- revertPreviews: re
1680
+ revertPreviews: ae
1681
1681
  };
1682
1682
  }
1683
- function Jn({
1683
+ function Zn({
1684
1684
  selectedElement: e,
1685
1685
  hoveredElement: t,
1686
- onSelectElement: i,
1687
- onHoverElement: r,
1686
+ onSelectElement: r,
1687
+ onHoverElement: a,
1688
1688
  targetScope: o,
1689
1689
  onTargetScopeChange: s,
1690
- elementState: a,
1691
- onElementStateChange: c,
1692
- onApply: u,
1690
+ elementState: i,
1691
+ onElementStateChange: p,
1692
+ onApply: d,
1693
1693
  applyStatus: l,
1694
- isToolbarTarget: f,
1695
- onPreviewApi: p
1694
+ isToolbarTarget: g,
1695
+ onPreviewApi: f
1696
1696
  }) {
1697
1697
  const {
1698
- values: v,
1699
- textKind: m,
1700
- textValue: g,
1701
- pendingChanges: y,
1702
- pendingByElement: S,
1698
+ values: x,
1699
+ textKind: h,
1700
+ textValue: m,
1701
+ pendingChanges: v,
1702
+ pendingByElement: z,
1703
1703
  totalPendingCount: w,
1704
- clearAllPending: k,
1705
- canUndo: N,
1704
+ clearAllPending: N,
1705
+ canUndo: k,
1706
1706
  updateProperty: E,
1707
- updateText: z,
1708
- undo: R,
1709
- reset: x,
1707
+ updateText: B,
1708
+ undo: $,
1709
+ reset: y,
1710
1710
  clearPreviews: I,
1711
- revertPreviews: L
1712
- } = qn(e, o, a), { elementRef: h, isDragging: F, style: U, dragHandleProps: ye } = Tt({
1711
+ revertPreviews: S
1712
+ } = Jn(e, o, i), { elementRef: u, isDragging: O, style: W, dragHandleProps: ve } = Rt({
1713
1713
  computeDefaultPosition: (T) => ({
1714
1714
  x: window.innerWidth - T.width - 16,
1715
1715
  y: 16
1716
1716
  })
1717
1717
  });
1718
- _(() => (p == null || p({ clearPreviews: I, revertPreviews: L }), () => p == null ? void 0 : p(null)), [p, I, L]);
1719
- const ee = $(
1718
+ _(() => (f == null || f({ clearPreviews: I, revertPreviews: S }), () => f == null ? void 0 : f(null)), [f, I, S]);
1719
+ const ee = L(
1720
1720
  (T) => {
1721
- if (f(T.target)) return;
1722
- const O = document.elementsFromPoint(T.clientX, T.clientY).find(
1721
+ if (g(T.target)) return;
1722
+ const D = document.elementsFromPoint(T.clientX, T.clientY).find(
1723
1723
  (Y) => Y instanceof Element && !Y.closest(
1724
1724
  "[data-pixelagent-root],[data-pixelagent-toolbar-portal],[data-pixelagent-picker-portal]"
1725
1725
  )
1726
1726
  );
1727
- r(O ?? null);
1727
+ a(D ?? null);
1728
1728
  },
1729
- [f, r]
1730
- ), re = $(
1729
+ [g, a]
1730
+ ), ae = L(
1731
1731
  (T) => {
1732
- if (f(T.target)) return;
1732
+ if (g(T.target)) return;
1733
1733
  T.preventDefault(), T.stopPropagation();
1734
- const O = document.elementsFromPoint(T.clientX, T.clientY).find(
1734
+ const D = document.elementsFromPoint(T.clientX, T.clientY).find(
1735
1735
  (Y) => Y instanceof Element && !Y.closest(
1736
1736
  "[data-pixelagent-root],[data-pixelagent-toolbar-portal],[data-pixelagent-picker-portal]"
1737
1737
  )
1738
1738
  );
1739
- i(O ?? null);
1739
+ r(D ?? null);
1740
1740
  },
1741
- [f, i]
1741
+ [g, r]
1742
1742
  );
1743
- _(() => (document.addEventListener("mousemove", ee, !0), document.addEventListener("click", re, !0), () => {
1744
- document.removeEventListener("mousemove", ee, !0), document.removeEventListener("click", re, !0);
1745
- }), [ee, re]);
1743
+ _(() => (document.addEventListener("mousemove", ee, !0), document.addEventListener("click", ae, !0), () => {
1744
+ document.removeEventListener("mousemove", ee, !0), document.removeEventListener("click", ae, !0);
1745
+ }), [ee, ae]);
1746
1746
  const oe = async () => {
1747
1747
  if (w === 0) return;
1748
- const T = await u(S);
1749
- T.applied && (k(), T.skipRevert || L());
1750
- }, W = e ? Ge(e) : null, j = e ? kt(e) : null, ie = e ? Ct(e) : 0, ce = e ? Mt(e, "all-instances") : "", C = a !== "normal" && j === "tailwind" ? "Tailwind variant preview: matching hover:/focus:/… classes are applied without the prefix." : a !== "normal" ? "State preview uses focus/disabled simulation where possible." : null, P = ie > 1 ? o === "all-instances" ? `Preview & Apply on ${ie} elements (${ce}).` : `This instance only — ${ie - 1} other on page.` : o === "all-instances" ? "Only one match — scope has no effect." : null, D = Me(() => !e || o !== "all-instances" ? [] : Re(e, "all-instances"), [e, o]);
1751
- return /* @__PURE__ */ d(q, { children: [
1748
+ const T = await d(z);
1749
+ T.applied && (N(), T.skipRevert || S());
1750
+ }, U = e ? Xe(e) : null, K = e ? Ct(e) : null, re = e ? Mt(e) : 0, pe = e ? At(e, "all-instances") : "", C = i !== "normal" && K === "tailwind" ? "Tailwind variant preview: matching hover:/focus:/… classes are applied without the prefix." : i !== "normal" ? "State preview uses focus/disabled simulation where possible." : null, R = re > 1 ? o === "all-instances" ? `Preview & Apply on ${re} elements (${pe}).` : `This instance only — ${re - 1} other on page.` : o === "all-instances" ? "Only one match — scope has no effect." : null, P = Me(() => !e || o !== "all-instances" ? [] : $e(e, "all-instances"), [e, o]);
1751
+ return /* @__PURE__ */ c(q, { children: [
1752
1752
  /* @__PURE__ */ n(
1753
- Et,
1753
+ It,
1754
1754
  {
1755
1755
  element: o === "all-instances" ? null : t,
1756
1756
  selected: e,
1757
- multiSelected: D,
1757
+ multiSelected: P,
1758
1758
  primarySelected: e
1759
1759
  }
1760
1760
  ),
1761
1761
  /* @__PURE__ */ n(
1762
1762
  "div",
1763
1763
  {
1764
- ref: h,
1765
- className: `pa-edit-panel-float ${F ? "pa-edit-panel-float--dragging" : ""}`,
1766
- style: U,
1767
- children: /* @__PURE__ */ n(Pe, { variant: "sheet", side: "right", className: "pa-edit-panel-glass", children: /* @__PURE__ */ d("div", { className: "pa-edit-panel-inner", children: [
1768
- /* @__PURE__ */ d("div", { className: "pa-edit-panel-header", children: [
1764
+ ref: u,
1765
+ className: `pa-edit-panel-float ${O ? "pa-edit-panel-float--dragging" : ""}`,
1766
+ style: W,
1767
+ children: /* @__PURE__ */ n(Re, { variant: "sheet", side: "right", className: "pa-edit-panel-glass", children: /* @__PURE__ */ c("div", { className: "pa-edit-panel-inner", children: [
1768
+ /* @__PURE__ */ c("div", { className: "pa-edit-panel-header", children: [
1769
1769
  /* @__PURE__ */ n(
1770
1770
  "button",
1771
1771
  {
@@ -1773,8 +1773,8 @@ function Jn({
1773
1773
  className: "pa-edit-panel-drag",
1774
1774
  "aria-label": "Drag edit panel",
1775
1775
  title: "Drag to move",
1776
- ...ye,
1777
- children: /* @__PURE__ */ d("span", { className: "pa-edit-panel-grip", "aria-hidden": "true", children: [
1776
+ ...ve,
1777
+ children: /* @__PURE__ */ c("span", { className: "pa-edit-panel-grip", "aria-hidden": "true", children: [
1778
1778
  /* @__PURE__ */ n("span", {}),
1779
1779
  /* @__PURE__ */ n("span", {}),
1780
1780
  /* @__PURE__ */ n("span", {}),
@@ -1786,63 +1786,63 @@ function Jn({
1786
1786
  ),
1787
1787
  /* @__PURE__ */ n("h3", { className: "pa-edit-title", children: "Edit" })
1788
1788
  ] }),
1789
- e ? /* @__PURE__ */ d(q, { children: [
1790
- /* @__PURE__ */ d("div", { className: "pa-edit-meta", children: [
1789
+ e ? /* @__PURE__ */ c(q, { children: [
1790
+ /* @__PURE__ */ c("div", { className: "pa-edit-meta", children: [
1791
1791
  /* @__PURE__ */ n(
1792
1792
  "code",
1793
1793
  {
1794
1794
  className: "pa-edit-meta-label",
1795
- title: `This instance: ${At(e)}
1796
- All instances: ${ce}`,
1797
- children: Xe(e)
1795
+ title: `This instance: ${zt(e)}
1796
+ All instances: ${pe}`,
1797
+ children: je(e)
1798
1798
  }
1799
1799
  ),
1800
- ((W == null ? void 0 : W.sourceFile) || j) && /* @__PURE__ */ d("span", { className: "pa-edit-source", children: [
1801
- (W == null ? void 0 : W.sourceFile) && /* @__PURE__ */ d(q, { children: [
1802
- W.sourceFile,
1803
- W.lineNumber ? `:${W.lineNumber}` : ""
1800
+ ((U == null ? void 0 : U.sourceFile) || K) && /* @__PURE__ */ c("span", { className: "pa-edit-source", children: [
1801
+ (U == null ? void 0 : U.sourceFile) && /* @__PURE__ */ c(q, { children: [
1802
+ U.sourceFile,
1803
+ U.lineNumber ? `:${U.lineNumber}` : ""
1804
1804
  ] }),
1805
- W != null && W.sourceFile && j ? " · " : "",
1806
- j ?? ""
1805
+ U != null && U.sourceFile && K ? " · " : "",
1806
+ K ?? ""
1807
1807
  ] })
1808
1808
  ] }),
1809
1809
  /* @__PURE__ */ n("div", { className: "pa-edit-panel-scroll", children: /* @__PURE__ */ n(
1810
1810
  Kn,
1811
1811
  {
1812
- values: v,
1812
+ values: x,
1813
1813
  onPropertyChange: E,
1814
- textKind: m,
1815
- textValue: g,
1816
- onTextChange: z,
1814
+ textKind: h,
1815
+ textValue: m,
1816
+ onTextChange: B,
1817
1817
  targetScope: o,
1818
1818
  onTargetScopeChange: s,
1819
- elementState: a,
1820
- onElementStateChange: c,
1821
- instanceCount: ie,
1822
- scopeHint: P,
1819
+ elementState: i,
1820
+ onElementStateChange: p,
1821
+ instanceCount: re,
1822
+ scopeHint: R,
1823
1823
  stateHint: C
1824
1824
  }
1825
1825
  ) }),
1826
- /* @__PURE__ */ d("div", { className: "pa-edit-panel-sticky", children: [
1827
- /* @__PURE__ */ d("div", { className: "pa-edit-actions", children: [
1828
- /* @__PURE__ */ n(V, { variant: "regular", onClick: R, disabled: !N, children: /* @__PURE__ */ d("span", { className: "pa-glass-btn-inner", children: [
1829
- /* @__PURE__ */ n(gn, { className: "pa-glass-btn-icon" }),
1826
+ /* @__PURE__ */ c("div", { className: "pa-edit-panel-sticky", children: [
1827
+ /* @__PURE__ */ c("div", { className: "pa-edit-actions", children: [
1828
+ /* @__PURE__ */ n(V, { variant: "regular", onClick: $, disabled: !k, children: /* @__PURE__ */ c("span", { className: "pa-glass-btn-inner", children: [
1829
+ /* @__PURE__ */ n(xn, { className: "pa-glass-btn-icon" }),
1830
1830
  /* @__PURE__ */ n("span", { children: "Undo" })
1831
1831
  ] }) }),
1832
1832
  /* @__PURE__ */ n(
1833
1833
  V,
1834
1834
  {
1835
1835
  variant: "regular",
1836
- onClick: x,
1837
- disabled: y.length === 0,
1838
- children: /* @__PURE__ */ d("span", { className: "pa-glass-btn-inner", children: [
1839
- /* @__PURE__ */ n(vn, { className: "pa-glass-btn-icon" }),
1836
+ onClick: y,
1837
+ disabled: v.length === 0,
1838
+ children: /* @__PURE__ */ c("span", { className: "pa-glass-btn-inner", children: [
1839
+ /* @__PURE__ */ n(bn, { className: "pa-glass-btn-icon" }),
1840
1840
  /* @__PURE__ */ n("span", { children: "Reset" })
1841
1841
  ] })
1842
1842
  }
1843
1843
  )
1844
1844
  ] }),
1845
- /* @__PURE__ */ d("div", { className: "pa-edit-footer", children: [
1845
+ /* @__PURE__ */ c("div", { className: "pa-edit-footer", children: [
1846
1846
  /* @__PURE__ */ n(
1847
1847
  "span",
1848
1848
  {
@@ -1856,7 +1856,7 @@ All instances: ${ce}`,
1856
1856
  variant: "glass-primary",
1857
1857
  onClick: oe,
1858
1858
  disabled: w === 0,
1859
- title: W != null && W.sourceFile ? void 0 : "No source file — Apply copies selector + changes to clipboard",
1859
+ title: U != null && U.sourceFile ? void 0 : "No source file — Apply copies selector + changes to clipboard",
1860
1860
  children: "Apply"
1861
1861
  }
1862
1862
  )
@@ -1868,58 +1868,58 @@ All instances: ${ce}`,
1868
1868
  )
1869
1869
  ] });
1870
1870
  }
1871
- async function Zn(e, t = {}) {
1871
+ async function Qn(e, t = {}) {
1872
1872
  if (t.onApply)
1873
1873
  try {
1874
- const r = await t.onApply(e);
1875
- if (r) return { mode: "mcp", result: r };
1876
- } catch (r) {
1877
- return { mode: "error", message: r instanceof Error ? r.message : String(r) };
1874
+ const a = await t.onApply(e);
1875
+ if (a) return { mode: "mcp", result: a };
1876
+ } catch (a) {
1877
+ return { mode: "error", message: a instanceof Error ? a.message : String(a) };
1878
1878
  }
1879
- const i = t.applyEndpoint;
1880
- if (i)
1879
+ const r = t.applyEndpoint;
1880
+ if (r)
1881
1881
  try {
1882
- const r = await fetch(i, {
1882
+ const a = await fetch(r, {
1883
1883
  method: "POST",
1884
1884
  headers: { "Content-Type": "application/json" },
1885
1885
  body: JSON.stringify({ payload: e })
1886
- }), o = await r.json();
1887
- return r.ok ? { mode: "mcp", result: o } : { mode: "error", message: o.error ?? r.statusText };
1888
- } catch (r) {
1889
- return { mode: "error", message: r instanceof Error ? r.message : String(r) };
1886
+ }), o = await a.json();
1887
+ return a.ok ? { mode: "mcp", result: o } : { mode: "error", message: o.error ?? a.statusText };
1888
+ } catch (a) {
1889
+ return { mode: "error", message: a instanceof Error ? a.message : String(a) };
1890
1890
  }
1891
1891
  return await St(JSON.stringify(e, null, 2)), { mode: "clipboard" };
1892
1892
  }
1893
- function Qn(e) {
1894
- const [t, i] = A(null);
1893
+ function ea(e) {
1894
+ const [t, r] = A(null);
1895
1895
  return _(() => {
1896
1896
  if (!e) {
1897
- i(null);
1897
+ r(null);
1898
1898
  return;
1899
1899
  }
1900
- const r = () => i(e.getBoundingClientRect());
1901
- r();
1902
- const o = new ResizeObserver(r);
1903
- return o.observe(e), window.addEventListener("scroll", r, !0), window.addEventListener("resize", r), () => {
1904
- o.disconnect(), window.removeEventListener("scroll", r, !0), window.removeEventListener("resize", r);
1900
+ const a = () => r(e.getBoundingClientRect());
1901
+ a();
1902
+ const o = new ResizeObserver(a);
1903
+ return o.observe(e), window.addEventListener("scroll", a, !0), window.addEventListener("resize", a), () => {
1904
+ o.disconnect(), window.removeEventListener("scroll", a, !0), window.removeEventListener("resize", a);
1905
1905
  };
1906
1906
  }, [e]), t;
1907
1907
  }
1908
- const le = 8, Q = 8, er = 12, tr = 300, nr = 280;
1909
- function He(e, t, i, r) {
1908
+ const le = 8, Q = 8, ta = 12, na = 300, aa = 280;
1909
+ function He(e, t, r, a) {
1910
1910
  return {
1911
1911
  top: e,
1912
1912
  left: t,
1913
- right: t + i,
1914
- bottom: e + r,
1915
- width: i,
1916
- height: r
1913
+ right: t + r,
1914
+ bottom: e + a,
1915
+ width: r,
1916
+ height: a
1917
1917
  };
1918
1918
  }
1919
1919
  function Ye(e, t) {
1920
1920
  return e.left < t.right && e.right > t.left && e.top < t.bottom && e.bottom > t.top;
1921
1921
  }
1922
- function rr(e, t) {
1922
+ function ra(e, t) {
1923
1923
  return {
1924
1924
  top: e.top - t,
1925
1925
  left: e.left - t,
@@ -1929,12 +1929,12 @@ function rr(e, t) {
1929
1929
  height: e.height + t * 2
1930
1930
  };
1931
1931
  }
1932
- function ir() {
1932
+ function oa() {
1933
1933
  if (typeof document > "u") return null;
1934
1934
  const e = document.querySelector(
1935
1935
  "[data-pixelagent-toolbar-portal] .pa-toolbar-float"
1936
1936
  );
1937
- return e ? rr(e.getBoundingClientRect(), er) : null;
1937
+ return e ? ra(e.getBoundingClientRect(), ta) : null;
1938
1938
  }
1939
1939
  function Ve(e, t) {
1940
1940
  return Math.min(
@@ -1948,108 +1948,108 @@ function Ee(e, t) {
1948
1948
  window.innerHeight - t - le
1949
1949
  );
1950
1950
  }
1951
- function or(e) {
1951
+ function ia(e) {
1952
1952
  return e.top >= le && e.left >= le && e.right <= window.innerWidth - le && e.bottom <= window.innerHeight - le;
1953
1953
  }
1954
- function ar(e, t) {
1955
- return t && Ye(e, t) ? !1 : or(e);
1954
+ function sa(e, t) {
1955
+ return t && Ye(e, t) ? !1 : ia(e);
1956
1956
  }
1957
- function sr(e, t = tr, i = nr) {
1958
- const r = ir(), s = e.top > window.innerHeight * 0.45 ? [
1959
- { placement: "above", top: e.top - i - Q, left: e.left },
1957
+ function la(e, t = na, r = aa) {
1958
+ const a = oa(), s = e.top > window.innerHeight * 0.45 ? [
1959
+ { placement: "above", top: e.top - r - Q, left: e.left },
1960
1960
  { placement: "below", top: e.bottom + Q, left: e.left },
1961
1961
  { placement: "right", top: e.top, left: e.right + Q },
1962
1962
  { placement: "left", top: e.top, left: e.left - t - Q }
1963
1963
  ] : [
1964
1964
  { placement: "below", top: e.bottom + Q, left: e.left },
1965
- { placement: "above", top: e.top - i - Q, left: e.left },
1965
+ { placement: "above", top: e.top - r - Q, left: e.left },
1966
1966
  { placement: "right", top: e.top, left: e.right + Q },
1967
1967
  { placement: "left", top: e.top, left: e.left - t - Q }
1968
1968
  ];
1969
- for (const { top: u, left: l } of s) {
1970
- const f = He(
1971
- Ee(u, i),
1969
+ for (const { top: d, left: l } of s) {
1970
+ const g = He(
1971
+ Ee(d, r),
1972
1972
  Ve(l, t),
1973
1973
  t,
1974
- i
1974
+ r
1975
1975
  );
1976
- if (ar(f, r))
1977
- return { top: f.top, left: f.left };
1976
+ if (sa(g, a))
1977
+ return { top: g.top, left: g.left };
1978
1978
  }
1979
- let a = Ee(e.top - i - Q, i), c = Ve(e.left, t);
1980
- if (r) {
1981
- let u = He(a, c, t, i);
1982
- Ye(u, r) && (a = Ee(r.top - i - Q, i), u = He(a, c, t, i)), Ye(u, r) && (a = Ee(e.bottom + Q, i), c = Ve(
1983
- Math.min(e.left, r.left - t - Q),
1979
+ let i = Ee(e.top - r - Q, r), p = Ve(e.left, t);
1980
+ if (a) {
1981
+ let d = He(i, p, t, r);
1982
+ Ye(d, a) && (i = Ee(a.top - r - Q, r), d = He(i, p, t, r)), Ye(d, a) && (i = Ee(e.bottom + Q, r), p = Ve(
1983
+ Math.min(e.left, a.left - t - Q),
1984
1984
  t
1985
1985
  ));
1986
1986
  }
1987
- return { top: a, left: c };
1987
+ return { top: i, left: p };
1988
1988
  }
1989
- function lr({
1989
+ function pa({
1990
1990
  elements: e,
1991
1991
  areaBbox: t,
1992
- onSubmit: i,
1993
- onCancel: r
1992
+ onSubmit: r,
1993
+ onCancel: a
1994
1994
  }) {
1995
- const [o, s] = A(""), a = X(null), c = X(null), u = e[0] ?? null, l = t ? new DOMRect(t.x, t.y, t.width, t.height) : null, f = Qn(u), p = l ?? f, v = Lt(), m = u ? ve(u) : { kind: "none", value: "" }, g = m.kind !== "none" ? m.value : void 0;
1995
+ const [o, s] = A(""), i = j(null), p = j(null), d = e[0] ?? null, l = t ? new DOMRect(t.x, t.y, t.width, t.height) : null, g = ea(d), f = l ?? g, x = Lt(), h = d ? xe(d) : { kind: "none", value: "" }, m = h.kind !== "none" ? h.value : void 0;
1996
1996
  if (_(() => {
1997
- var k;
1998
- (k = a.current) == null || k.focus();
1997
+ var N;
1998
+ (N = i.current) == null || N.focus();
1999
1999
  }, [e]), _(() => {
2000
- const k = (N) => {
2001
- N.key === "Escape" && r();
2000
+ const N = (k) => {
2001
+ k.key === "Escape" && a();
2002
2002
  };
2003
- return document.addEventListener("keydown", k), () => document.removeEventListener("keydown", k);
2004
- }, [r]), !p) return null;
2005
- const y = sr(p), S = e.length > 1 ? `${e.length} selected` : u ? Xe(u) : "Area selection", w = (k) => {
2006
- o.trim() && i(o, k);
2003
+ return document.addEventListener("keydown", N), () => document.removeEventListener("keydown", N);
2004
+ }, [a]), !f) return null;
2005
+ const v = la(f), z = e.length > 1 ? `${e.length} selected` : d ? je(d) : "Area selection", w = (N) => {
2006
+ o.trim() && r(o, N);
2007
2007
  };
2008
2008
  return /* @__PURE__ */ n(
2009
- Pe,
2009
+ Re,
2010
2010
  {
2011
2011
  variant: "popover",
2012
- style: { top: y.top, left: y.left },
2013
- children: /* @__PURE__ */ d(
2012
+ style: { top: v.top, left: v.left },
2013
+ children: /* @__PURE__ */ c(
2014
2014
  "div",
2015
2015
  {
2016
- ref: c,
2016
+ ref: p,
2017
2017
  role: "dialog",
2018
2018
  "aria-modal": "true",
2019
2019
  "aria-label": "Add annotation",
2020
2020
  className: "pa-popover-body",
2021
2021
  children: [
2022
- /* @__PURE__ */ n("div", { className: "pa-popover-header", children: /* @__PURE__ */ n("span", { className: "pa-popover-selector", children: S }) }),
2023
- (v || g) && /* @__PURE__ */ d("div", { className: "pa-popover-context", children: [
2024
- v && /* @__PURE__ */ d("p", { className: "pa-popover-context-line", children: [
2022
+ /* @__PURE__ */ n("div", { className: "pa-popover-header", children: /* @__PURE__ */ n("span", { className: "pa-popover-selector", children: z }) }),
2023
+ (x || m) && /* @__PURE__ */ c("div", { className: "pa-popover-context", children: [
2024
+ x && /* @__PURE__ */ c("p", { className: "pa-popover-context-line", children: [
2025
2025
  /* @__PURE__ */ n("span", { className: "pa-popover-context-label", children: "Selected" }),
2026
- v
2026
+ x
2027
2027
  ] }),
2028
- g && g !== v && /* @__PURE__ */ d("p", { className: "pa-popover-context-line", children: [
2028
+ m && m !== x && /* @__PURE__ */ c("p", { className: "pa-popover-context-line", children: [
2029
2029
  /* @__PURE__ */ n("span", { className: "pa-popover-context-label", children: "Element" }),
2030
- g
2030
+ m
2031
2031
  ] })
2032
2032
  ] }),
2033
- /* @__PURE__ */ d("label", { className: "pa-label", children: [
2033
+ /* @__PURE__ */ c("label", { className: "pa-label", children: [
2034
2034
  "Note",
2035
2035
  /* @__PURE__ */ n(
2036
2036
  "textarea",
2037
2037
  {
2038
- ref: a,
2038
+ ref: i,
2039
2039
  className: "pa-textarea",
2040
2040
  value: o,
2041
- onChange: (k) => s(k.target.value),
2041
+ onChange: (N) => s(N.target.value),
2042
2042
  placeholder: "Describe the change...",
2043
2043
  rows: 3,
2044
- onKeyDown: (k) => {
2045
- k.key === "Enter" && (k.metaKey || k.ctrlKey) && (k.preventDefault(), w(k.shiftKey)), k.key === "Escape" && r();
2044
+ onKeyDown: (N) => {
2045
+ N.key === "Enter" && (N.metaKey || N.ctrlKey) && (N.preventDefault(), w(N.shiftKey)), N.key === "Escape" && a();
2046
2046
  }
2047
2047
  }
2048
2048
  )
2049
2049
  ] }),
2050
2050
  /* @__PURE__ */ n("p", { className: "pa-popover-hint", children: "⌘↵ Add · ⇧⌘↵ Add & next · Esc Cancel" }),
2051
- /* @__PURE__ */ d("div", { className: "pa-popover-actions", children: [
2052
- /* @__PURE__ */ n(V, { variant: "ghost", onClick: r, children: "Cancel" }),
2051
+ /* @__PURE__ */ c("div", { className: "pa-popover-actions", children: [
2052
+ /* @__PURE__ */ n(V, { variant: "ghost", onClick: a, children: "Cancel" }),
2053
2053
  /* @__PURE__ */ n(
2054
2054
  V,
2055
2055
  {
@@ -2075,7 +2075,7 @@ function lr({
2075
2075
  }
2076
2076
  );
2077
2077
  }
2078
- function cr({ area: e, isDragging: t }) {
2078
+ function ca({ area: e, isDragging: t }) {
2079
2079
  return !e || e.width < 2 || e.height < 2 ? null : /* @__PURE__ */ n(
2080
2080
  "div",
2081
2081
  {
@@ -2090,31 +2090,31 @@ function cr({ area: e, isDragging: t }) {
2090
2090
  }
2091
2091
  );
2092
2092
  }
2093
- function dr(e) {
2094
- const { elements: t, note: i, areaBbox: r } = e, o = t[0];
2095
- if (!o && r)
2093
+ function da(e) {
2094
+ const { elements: t, note: r, areaBbox: a } = e, o = t[0];
2095
+ if (!o && a)
2096
2096
  return {
2097
2097
  id: crypto.randomUUID(),
2098
2098
  selector: "area-selection",
2099
- note: i.trim(),
2100
- areaBbox: r,
2101
- position: { x: Math.round(r.x), y: Math.round(r.y) },
2099
+ note: r.trim(),
2100
+ areaBbox: a,
2101
+ position: { x: Math.round(a.x), y: Math.round(a.y) },
2102
2102
  bbox: {
2103
- x: Math.round(r.x),
2104
- y: Math.round(r.y),
2105
- width: Math.round(r.width),
2106
- height: Math.round(r.height)
2103
+ x: Math.round(a.x),
2104
+ y: Math.round(a.y),
2105
+ width: Math.round(a.width),
2106
+ height: Math.round(a.height)
2107
2107
  },
2108
2108
  createdAt: Date.now()
2109
2109
  };
2110
2110
  if (!o)
2111
2111
  throw new Error("buildAnnotationEntry requires at least one element or areaBbox");
2112
- const s = o.getBoundingClientRect(), a = Ge(o), c = Lt(), u = ve(o), l = u.kind !== "none" ? u.value : void 0, f = t.map((p) => At(p));
2112
+ const s = o.getBoundingClientRect(), i = Xe(o), p = Lt(), d = xe(o), l = d.kind !== "none" ? d.value : void 0, g = t.map((f) => zt(f));
2113
2113
  return {
2114
2114
  id: crypto.randomUUID(),
2115
- selector: f[0],
2116
- selectors: f.length > 1 ? f : void 0,
2117
- note: i.trim(),
2115
+ selector: g[0],
2116
+ selectors: g.length > 1 ? g : void 0,
2117
+ note: r.trim(),
2118
2118
  position: { x: Math.round(s.x), y: Math.round(s.y) },
2119
2119
  bbox: {
2120
2120
  x: Math.round(s.x),
@@ -2122,101 +2122,101 @@ function dr(e) {
2122
2122
  width: Math.round(s.width),
2123
2123
  height: Math.round(s.height)
2124
2124
  },
2125
- areaBbox: r,
2126
- domPath: Zt(o),
2127
- selectedText: c,
2125
+ areaBbox: a,
2126
+ domPath: Qt(o),
2127
+ selectedText: p,
2128
2128
  elementText: l,
2129
- sourceFile: a.sourceFile,
2130
- lineNumber: a.lineNumber,
2131
- componentName: Jt(o) ?? a.componentName,
2129
+ sourceFile: i.sourceFile,
2130
+ lineNumber: i.lineNumber,
2131
+ componentName: Zt(o) ?? i.componentName,
2132
2132
  createdAt: Date.now()
2133
2133
  };
2134
2134
  }
2135
- function ur(e) {
2136
- const t = $t(e);
2135
+ function fa(e) {
2136
+ const t = Et(e);
2137
2137
  if (t) return t.getBoundingClientRect();
2138
2138
  if (e.bbox) {
2139
- const { x: i, y: r, width: o, height: s } = e.bbox;
2140
- return new DOMRect(i, r, o, s);
2139
+ const { x: r, y: a, width: o, height: s } = e.bbox;
2140
+ return new DOMRect(r, a, o, s);
2141
2141
  }
2142
2142
  if (e.areaBbox) {
2143
- const { x: i, y: r, width: o, height: s } = e.areaBbox;
2144
- return new DOMRect(i, r, o, s);
2143
+ const { x: r, y: a, width: o, height: s } = e.areaBbox;
2144
+ return new DOMRect(r, a, o, s);
2145
2145
  }
2146
2146
  if (e.position) {
2147
- const { x: i, y: r } = e.position;
2148
- return new DOMRect(i, r, 1, 1);
2147
+ const { x: r, y: a } = e.position;
2148
+ return new DOMRect(r, a, 1, 1);
2149
2149
  }
2150
2150
  return null;
2151
2151
  }
2152
- function pr(e) {
2152
+ function ua(e) {
2153
2153
  return `${Math.round(e.top)}:${Math.round(e.left)}:${Math.round(e.width)}:${Math.round(e.height)}`;
2154
2154
  }
2155
- const hr = 20;
2156
- function fr({ annotations: e }) {
2157
- const [t, i] = A([]);
2155
+ const ga = 20;
2156
+ function ha({ annotations: e }) {
2157
+ const [t, r] = A([]);
2158
2158
  return _(() => {
2159
2159
  if (e.length === 0) {
2160
- i([]);
2160
+ r([]);
2161
2161
  return;
2162
2162
  }
2163
- const r = /* @__PURE__ */ new Map(), o = () => {
2164
- const c = [];
2165
- e.forEach((u, l) => {
2166
- const f = ur(u);
2167
- if (!f) return;
2168
- const p = pr(f), v = r.get(p) ?? 0;
2169
- r.set(p, v + 1), c.push({
2170
- id: u.id,
2163
+ const a = /* @__PURE__ */ new Map(), o = () => {
2164
+ const p = [];
2165
+ e.forEach((d, l) => {
2166
+ const g = fa(d);
2167
+ if (!g) return;
2168
+ const f = ua(g), x = a.get(f) ?? 0;
2169
+ a.set(f, x + 1), p.push({
2170
+ id: d.id,
2171
2171
  index: l + 1,
2172
- top: f.top - 6 - v * hr,
2173
- left: f.right - 6
2172
+ top: g.top - 6 - x * ga,
2173
+ left: g.right - 6
2174
2174
  });
2175
- }), i(c);
2175
+ }), r(p);
2176
2176
  };
2177
2177
  o();
2178
2178
  const s = /* @__PURE__ */ new Set();
2179
- for (const c of e) {
2180
- const u = $t(c);
2181
- u && s.add(u);
2179
+ for (const p of e) {
2180
+ const d = Et(p);
2181
+ d && s.add(d);
2182
2182
  }
2183
- const a = Array.from(s).map((c) => {
2184
- const u = new ResizeObserver(o);
2185
- return u.observe(c), u;
2183
+ const i = Array.from(s).map((p) => {
2184
+ const d = new ResizeObserver(o);
2185
+ return d.observe(p), d;
2186
2186
  });
2187
2187
  return window.addEventListener("scroll", o, !0), window.addEventListener("resize", o), () => {
2188
- for (const c of a) c.disconnect();
2188
+ for (const p of i) p.disconnect();
2189
2189
  window.removeEventListener("scroll", o, !0), window.removeEventListener("resize", o);
2190
2190
  };
2191
- }, [e]), t.length === 0 ? null : /* @__PURE__ */ n(q, { children: t.map((r) => /* @__PURE__ */ n(
2191
+ }, [e]), t.length === 0 ? null : /* @__PURE__ */ n(q, { children: t.map((a) => /* @__PURE__ */ n(
2192
2192
  "span",
2193
2193
  {
2194
2194
  className: "pa-annotation-badge",
2195
- style: { top: r.top, left: r.left },
2195
+ style: { top: a.top, left: a.left },
2196
2196
  "aria-hidden": "true",
2197
- children: r.index
2197
+ children: a.index
2198
2198
  },
2199
- r.id
2199
+ a.id
2200
2200
  )) });
2201
2201
  }
2202
2202
  const Ze = "[data-pixelagent-root],[data-pixelagent-toolbar-portal],[data-pixelagent-picker-portal]";
2203
2203
  function Ie(e) {
2204
2204
  return e instanceof Element ? !!e.closest(Ze) : !1;
2205
2205
  }
2206
- function vt(e, t) {
2206
+ function xt(e, t) {
2207
2207
  return document.elementsFromPoint(e, t).find(
2208
- (r) => r instanceof Element && !r.closest(Ze)
2208
+ (a) => a instanceof Element && !a.closest(Ze)
2209
2209
  ) ?? null;
2210
2210
  }
2211
- function _t(e) {
2211
+ function Ht(e) {
2212
2212
  return e ? e === "Copied all!" || e.startsWith("Copy failed") : !1;
2213
2213
  }
2214
- function Ht({
2214
+ function Vt({
2215
2215
  feedback: e,
2216
2216
  slotClassName: t,
2217
- children: i
2217
+ children: r
2218
2218
  }) {
2219
- return e && _t(e) ? /* @__PURE__ */ n(
2219
+ return e && Ht(e) ? /* @__PURE__ */ n(
2220
2220
  "span",
2221
2221
  {
2222
2222
  className: `pa-status pa-copy-feedback-slot ${t}`,
@@ -2224,65 +2224,65 @@ function Ht({
2224
2224
  "aria-live": "polite",
2225
2225
  children: e
2226
2226
  }
2227
- ) : /* @__PURE__ */ n(q, { children: i });
2227
+ ) : /* @__PURE__ */ n(q, { children: r });
2228
2228
  }
2229
- function mr({
2229
+ function ma({
2230
2230
  annotations: e,
2231
2231
  collapsed: t,
2232
- onToggleCollapsed: i,
2233
- onClose: r,
2232
+ onToggleCollapsed: r,
2233
+ onClose: a,
2234
2234
  onCopyAll: o,
2235
2235
  onCopyOne: s,
2236
- onRemove: a,
2237
- onUpdate: c,
2238
- copyStatus: u,
2236
+ onRemove: i,
2237
+ onUpdate: p,
2238
+ copyStatus: d,
2239
2239
  copiedEntryId: l,
2240
- copyAllFrom: f
2240
+ copyAllFrom: g
2241
2241
  }) {
2242
- const [p, v] = A(null), [m, g] = A("");
2242
+ const [f, x] = A(null), [h, m] = A("");
2243
2243
  _(() => {
2244
- const w = (k) => {
2245
- k.key === "Escape" && (t ? r() : i());
2244
+ const w = (N) => {
2245
+ N.key === "Escape" && (t ? a() : r());
2246
2246
  };
2247
2247
  return document.addEventListener("keydown", w), () => document.removeEventListener("keydown", w);
2248
- }, [t, r, i]);
2249
- const y = (w) => {
2250
- v(w.id), g(w.note);
2251
- }, S = (w) => {
2252
- m.trim() && (c(w, { note: m.trim() }), v(null));
2248
+ }, [t, a, r]);
2249
+ const v = (w) => {
2250
+ x(w.id), m(w.note);
2251
+ }, z = (w) => {
2252
+ h.trim() && (p(w, { note: h.trim() }), x(null));
2253
2253
  };
2254
- return /* @__PURE__ */ d(
2255
- Pe,
2254
+ return /* @__PURE__ */ c(
2255
+ Re,
2256
2256
  {
2257
2257
  variant: "sheet",
2258
2258
  side: "right",
2259
2259
  className: t ? "pa-session-panel--collapsed" : void 0,
2260
2260
  children: [
2261
- /* @__PURE__ */ d("div", { className: "pa-session-header", children: [
2262
- /* @__PURE__ */ d("div", { className: "pa-session-header-main", children: [
2261
+ /* @__PURE__ */ c("div", { className: "pa-session-header", children: [
2262
+ /* @__PURE__ */ c("div", { className: "pa-session-header-main", children: [
2263
2263
  /* @__PURE__ */ n(
2264
2264
  V,
2265
2265
  {
2266
2266
  variant: "ghost",
2267
2267
  className: "pa-glass-btn--sm pa-session-collapse-btn",
2268
- onClick: i,
2268
+ onClick: r,
2269
2269
  "aria-expanded": !t,
2270
2270
  "aria-label": t ? "Expand session panel" : "Collapse session panel",
2271
2271
  children: /* @__PURE__ */ n("span", { className: "pa-session-chevron", "aria-hidden": "true", children: t ? "▶" : "▼" })
2272
2272
  }
2273
2273
  ),
2274
- /* @__PURE__ */ d("h3", { className: "pa-session-title", children: [
2274
+ /* @__PURE__ */ c("h3", { className: "pa-session-title", children: [
2275
2275
  "Session (",
2276
2276
  e.length,
2277
2277
  ")"
2278
2278
  ] })
2279
2279
  ] }),
2280
2280
  !t && /* @__PURE__ */ n("p", { className: "pa-session-subtitle", children: "Persists until tab close" }),
2281
- /* @__PURE__ */ d("div", { className: "pa-session-actions", children: [
2281
+ /* @__PURE__ */ c("div", { className: "pa-session-actions", children: [
2282
2282
  /* @__PURE__ */ n(
2283
- Ht,
2283
+ Vt,
2284
2284
  {
2285
- feedback: f === "session" ? u : null,
2285
+ feedback: g === "session" ? d : null,
2286
2286
  slotClassName: "pa-copy-feedback-slot--session",
2287
2287
  children: /* @__PURE__ */ n(
2288
2288
  V,
@@ -2296,46 +2296,46 @@ function mr({
2296
2296
  )
2297
2297
  }
2298
2298
  ),
2299
- /* @__PURE__ */ n(V, { variant: "ghost", onClick: r, "aria-label": "Close session panel", children: "✕" })
2299
+ /* @__PURE__ */ n(V, { variant: "ghost", onClick: a, "aria-label": "Close session panel", children: "✕" })
2300
2300
  ] })
2301
2301
  ] }),
2302
- !t && /* @__PURE__ */ d("ul", { className: "pa-session-list", children: [
2302
+ !t && /* @__PURE__ */ c("ul", { className: "pa-session-list", children: [
2303
2303
  e.length === 0 && /* @__PURE__ */ n("li", { className: "pa-session-empty", children: "No annotations yet. Click an element, drag an area, or Shift+click for multi-select." }),
2304
2304
  e.map((w) => {
2305
- const k = Qt(w);
2306
- return /* @__PURE__ */ n("li", { className: "pa-session-item", children: p === w.id ? /* @__PURE__ */ d("div", { className: "pa-session-edit", children: [
2307
- /* @__PURE__ */ d("label", { className: "pa-label", children: [
2305
+ const N = en(w);
2306
+ return /* @__PURE__ */ n("li", { className: "pa-session-item", children: f === w.id ? /* @__PURE__ */ c("div", { className: "pa-session-edit", children: [
2307
+ /* @__PURE__ */ c("label", { className: "pa-label", children: [
2308
2308
  "Note",
2309
2309
  /* @__PURE__ */ n(
2310
2310
  "textarea",
2311
2311
  {
2312
2312
  className: "pa-textarea",
2313
- value: m,
2314
- onChange: (N) => g(N.target.value),
2313
+ value: h,
2314
+ onChange: (k) => m(k.target.value),
2315
2315
  rows: 3
2316
2316
  }
2317
2317
  )
2318
2318
  ] }),
2319
- /* @__PURE__ */ d("div", { className: "pa-session-item-actions", children: [
2320
- /* @__PURE__ */ n(V, { variant: "ghost", onClick: () => v(null), children: "Cancel" }),
2319
+ /* @__PURE__ */ c("div", { className: "pa-session-item-actions", children: [
2320
+ /* @__PURE__ */ n(V, { variant: "ghost", onClick: () => x(null), children: "Cancel" }),
2321
2321
  /* @__PURE__ */ n(
2322
2322
  V,
2323
2323
  {
2324
2324
  variant: "glass-primary",
2325
- onClick: () => S(w.id),
2326
- disabled: !m.trim(),
2325
+ onClick: () => z(w.id),
2326
+ disabled: !h.trim(),
2327
2327
  children: "Save"
2328
2328
  }
2329
2329
  )
2330
2330
  ] })
2331
- ] }) : /* @__PURE__ */ d(q, { children: [
2332
- /* @__PURE__ */ d("div", { className: "pa-session-content", children: [
2333
- /* @__PURE__ */ n("span", { className: "pa-session-target", children: k.target }),
2334
- /* @__PURE__ */ n("p", { className: "pa-session-note", children: k.note }),
2335
- k.meta && /* @__PURE__ */ n("p", { className: "pa-session-meta-line", children: k.meta })
2331
+ ] }) : /* @__PURE__ */ c(q, { children: [
2332
+ /* @__PURE__ */ c("div", { className: "pa-session-content", children: [
2333
+ /* @__PURE__ */ n("span", { className: "pa-session-target", children: N.target }),
2334
+ /* @__PURE__ */ n("p", { className: "pa-session-note", children: N.note }),
2335
+ N.meta && /* @__PURE__ */ n("p", { className: "pa-session-meta-line", children: N.meta })
2336
2336
  ] }),
2337
- /* @__PURE__ */ d("div", { className: "pa-session-item-actions", children: [
2338
- u === "Copied!" && l === w.id ? /* @__PURE__ */ n(
2337
+ /* @__PURE__ */ c("div", { className: "pa-session-item-actions", children: [
2338
+ d === "Copied!" && l === w.id ? /* @__PURE__ */ n(
2339
2339
  "span",
2340
2340
  {
2341
2341
  className: "pa-status pa-copy-feedback-slot pa-copy-feedback-slot--item",
@@ -2358,7 +2358,7 @@ function mr({
2358
2358
  {
2359
2359
  variant: "ghost",
2360
2360
  className: "pa-glass-btn--sm",
2361
- onClick: () => y(w),
2361
+ onClick: () => v(w),
2362
2362
  "aria-label": "Edit annotation note",
2363
2363
  children: "✎"
2364
2364
  }
@@ -2368,7 +2368,7 @@ function mr({
2368
2368
  {
2369
2369
  variant: "ghost",
2370
2370
  className: "pa-glass-btn--sm",
2371
- onClick: () => a(w.id),
2371
+ onClick: () => i(w.id),
2372
2372
  "aria-label": "Remove annotation",
2373
2373
  children: "✕"
2374
2374
  }
@@ -2381,29 +2381,24 @@ function mr({
2381
2381
  }
2382
2382
  );
2383
2383
  }
2384
- function gr() {
2385
- return /* @__PURE__ */ d("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
2386
- /* @__PURE__ */ n(
2387
- "path",
2388
- {
2389
- d: "M8 10.25a2.25 2.25 0 1 0 0-4.5 2.25 2.25 0 0 0 0 4.5Z",
2390
- stroke: "currentColor",
2391
- strokeWidth: "1.25"
2392
- }
2393
- ),
2394
- /* @__PURE__ */ n(
2395
- "path",
2396
- {
2397
- d: "M12.1 9.2c.08-.42.08-.86 0-1.28l1.12-.87a.75.75 0 0 0 .18-.97l-1.06-1.84a.75.75 0 0 0-.92-.34l-1.32.53a5.2 5.2 0 0 0-1.1-.64l-.2-1.4A.75.75 0 0 0 8.9 2h-2.1a.75.75 0 0 0-.74.63l-.2 1.4c-.39.16-.76.37-1.1.64l-1.32-.53a.75.75 0 0 0-.92.34L1.56 6.08a.75.75 0 0 0 .18.97l1.12.87c-.08.42-.08.86 0 1.28l-1.12.87a.75.75 0 0 0-.18.97l1.06 1.84c.2.35.6.5.97.34l1.32-.53c.34.27.71.48 1.1.64l.2 1.4c.08.37.4.63.74.63h2.1c.37 0 .68-.28.74-.63l.2-1.4c.39-.16.76-.37 1.1-.64l1.32.53c.37.15.77 0 .97-.34l1.06-1.84a.75.75 0 0 0-.18-.97l-1.12-.87Z",
2398
- stroke: "currentColor",
2399
- strokeWidth: "1.1",
2400
- strokeLinejoin: "round"
2401
- }
2402
- )
2403
- ] });
2384
+ function xa() {
2385
+ return /* @__PURE__ */ c(
2386
+ "svg",
2387
+ {
2388
+ width: "16",
2389
+ height: "16",
2390
+ viewBox: "0 0 512.054 511.942",
2391
+ fill: "currentColor",
2392
+ "aria-hidden": "true",
2393
+ children: [
2394
+ /* @__PURE__ */ n("path", { d: "M223.49 1.3c-8.4 2.1-14.7 5.7-21 12.1-9.2 9.1-12 16.3-15.6 40-.6 4.4-1.7 8.5-2.3 9.1s-4.8 2.6-9.2 4.4l-8.2 3.3-10.8-7.9c-17.3-12.4-23.4-14.8-37.3-14.6-7 .1-13.7 2-20.9 6-2.8 1.5-12.8 10.6-24.3 22.1-16.5 16.5-20.1 20.6-22.8 26.2-4.3 8.9-5.8 17.7-4.4 26.7 1.3 8.7 5 15.9 14.8 29.7l7.7 10.6-3.3 8.2c-1.7 4.5-3.7 8.7-4.3 9.3-.6.7-6.9 2.2-14 3.3-7.1 1.2-15.3 3-18.2 4-14.1 5-25.1 17.8-28.3 32.9-1.5 7-1.5 53.4 0 60.4 3.2 15 14.3 27.9 28.2 32.8 2.9 1 10.6 2.8 17.2 3.9 6.6 1.2 13 2.4 14.1 2.6 1.6.4 3.1 2.7 5.8 8.9 2 4.7 3.6 8.8 3.6 9.1 0 .4-3.6 5.8-8 12-11.1 15.7-13.3 20.7-13.8 32.1-.5 10.2 1 16.8 5.5 25 3.8 7 39.1 42.1 46.5 46.3 7.2 4 18.4 6.5 26 5.7 9.5-.9 16.2-4 30-13.7l13-9.2 8.4 3.4c6.1 2.4 8.6 4 8.9 5.4.3 1.1 1.4 7.5 2.5 14.3 2.5 14.8 4.9 21.6 10 28.1 7.3 9.2 14.7 14.1 25.2 16.6 7.8 1.8 53.8 2.1 62 .4 15.4-3.3 28.6-14.9 33.2-29.4.9-2.8 2.7-11 4-18.3s2.5-13.4 2.7-13.6c.2-.1 4.3-1.9 9-3.9l8.7-3.5 9.5 6.8c13.6 9.8 16.8 11.7 23.6 14 11.7 3.9 26.6 1.9 37.6-5.1 6.1-3.8 35-32.1 41-40.2 10.2-13.4 12.3-31.5 5.4-46.2-1.2-2.4-5.8-9.7-10.4-16.1l-8.3-11.6 3.8-9.2 3.8-9.1 13.3-2.2c7.4-1.2 15.7-3 18.4-3.8 14.5-4.7 26.1-17.9 29.4-33.3 1.8-8.5 1.5-55.4-.4-62.7-2.2-8.4-6-14.7-12.5-20.9-8.9-8.5-13.4-10.3-35-14l-12.5-2.1-2.7-5.5c-1.4-3-3.2-7.1-3.9-9.2-1.2-3.7-1.1-3.9 3.7-10.8 11.6-16.5 13.6-19.8 15.4-25.8 3.8-12.2 2-26.7-4.4-37.2-4.5-7.1-40.2-42.3-46.1-45.2-14.3-7.3-29.2-7.6-42-1-2.2 1.1-9.1 5.6-15.3 10l-11.3 8-8.2-3.5c-4.5-1.9-8.9-3.8-9.7-4.2-1-.5-2.2-5.1-3.7-14-3.5-20.9-6.5-27.6-16.6-36.7-11.3-10.1-17.1-11.4-51.2-11.3-17.3 0-27.7.5-31 1.3m59 30.5c6.1 2.7 8 7.4 11.5 28.6 2 12 3.6 18.8 4.9 20.5 2.5 3.5 7.4 6.6 13.4 8.5 2.9 1 10.7 4.1 17.3 7.1 6.7 3 13.6 5.4 15.3 5.4 4.9 0 8.7-2 22.6-12 7.1-5.1 14.2-10.1 15.9-11.1 3.7-2.3 9.7-2.5 13.4-.5 3.2 1.7 35.5 34.2 37.1 37.3s1.4 8.9-.5 12.6c-1 1.8-5.9 9.1-11 16.3-9.7 13.6-12.4 18.5-12.4 22.9 0 1.4 2.2 7.4 4.8 13.3 2.7 5.9 6.1 14.1 7.6 18.3 3.1 8.7 7 13.4 12.5 14.9 2 .5 10.6 2.1 19.1 3.5 17.6 2.9 22.2 4.5 25.3 8.9 2.1 3 2.2 4.3 2.5 27.5.5 36.3 1.1 35.4-28.6 40.6-10.3 1.8-20.2 4-21.9 4.9-4.1 2.1-5.7 4.4-8.9 13.1-1.5 3.8-4.9 12.1-7.7 18.4-6.3 14.3-6.2 17.1.9 27.2 17.6 25.1 19.4 28 19.4 31.4 0 1.8-.5 4.6-1.1 6.2-1.4 3.8-33.6 36.2-37.6 37.9-1.8.8-4.8 1.4-6.7 1.4-3.6 0-4-.2-30-18.4-11.8-8.2-13.9-8.3-28.7-1.8-6.3 2.7-14.1 5.9-17.3 7.1-13.9 5.1-14.6 6.3-19 31-5.3 29.8-4.4 29.1-38.9 29.1-34-.1-33.7.2-38.7-30.3-3.9-24.1-4.2-24.5-20.7-30.6-4.3-1.6-11.4-4.6-15.8-6.6-8.5-3.9-15.2-4.8-19.4-2.6-1.2.7-8.5 5.8-16.4 11.3-7.8 5.6-16 10.8-18.2 11.6-7.6 2.6-9.5 1.5-26.9-15.6-19.8-19.6-21.6-22-21.6-28.3 0-5.2.8-6.5 15.8-27.3 7.5-10.2 9.7-15.6 8.6-20.3-.4-1.5-2.5-6.6-4.7-11.3-2.1-4.7-5.4-12.5-7.2-17.3-3.6-9.4-5.3-12-9.7-14.3-1.6-.8-11.3-3-21.8-4.8-29.6-5.3-29-4.5-29-38.6 0-34.2-.6-33.3 29.2-38.5 13.2-2.3 19.9-4 21.7-5.3 3.6-2.7 6.7-7.4 8.7-13.5.9-2.9 3.8-10.2 6.5-16.3 3.7-8.4 4.9-12.4 4.9-16.1 0-5.4.1-5.3-13.7-24.5-10.1-14.1-11.7-17.6-10.7-23.2.6-3.6 2.6-6.1 17.8-21.4 9.4-9.6 18.3-18 19.8-18.8 3.8-2 10.7-1.7 14.4.5 1.7 1 8.9 6 16 11.2 18.9 13.6 20.1 13.8 35.4 6.7 4.7-2.2 12.2-5.3 16.7-7 9.3-3.4 12.6-5.6 15-10.1.8-1.7 3-11.6 4.8-22 2.6-14.4 3.9-19.6 5.7-22.3 4-5.8 6.5-6.3 32.8-6.3 20.7-.1 24 .2 27.5 1.8" }),
2395
+ /* @__PURE__ */ n("path", { d: "M245.99 157c-23.1 2.3-46.5 13.9-62.5 31a99.5 99.5 0 0 0 0 135.8c39 41.7 106 41.7 145 0a99.5 99.5 0 0 0 0-135.8c-15.4-16.4-39.2-28.6-59.7-30.6-12.8-1.2-14.5-1.2-22.8-.4m27.2 31.8c30.9 7.9 51.8 35 51.8 67.1 0 38.8-30.2 69-69 69s-69-30.2-69-69c0-31.9 20.8-59 51.4-67 9.8-2.6 24.9-2.6 34.8-.1" })
2396
+ ]
2397
+ }
2398
+ );
2404
2399
  }
2405
- function vr() {
2406
- return /* @__PURE__ */ d("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
2400
+ function ba() {
2401
+ return /* @__PURE__ */ c("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
2407
2402
  /* @__PURE__ */ n("circle", { cx: "8", cy: "8", r: "2.75", stroke: "currentColor", strokeWidth: "1.25" }),
2408
2403
  /* @__PURE__ */ n(
2409
2404
  "path",
@@ -2416,7 +2411,7 @@ function vr() {
2416
2411
  )
2417
2412
  ] });
2418
2413
  }
2419
- function br() {
2414
+ function va() {
2420
2415
  return /* @__PURE__ */ n("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ n(
2421
2416
  "path",
2422
2417
  {
@@ -2427,51 +2422,51 @@ function br() {
2427
2422
  }
2428
2423
  ) });
2429
2424
  }
2430
- function yr({
2425
+ function wa({
2431
2426
  open: e,
2432
2427
  onClose: t,
2433
- hostTheme: i,
2434
- chrome: r,
2428
+ hostTheme: r,
2429
+ chrome: a,
2435
2430
  onToggleHostTheme: o
2436
2431
  }) {
2437
- const s = X(null);
2432
+ const s = j(null);
2438
2433
  return _(() => {
2439
2434
  if (!e) return;
2440
- const a = (u) => {
2441
- u.key === "Escape" && t();
2442
- }, c = (u) => {
2443
- var f, p;
2444
- const l = u.target;
2445
- (f = s.current) != null && f.contains(l) || (p = l.closest) != null && p.call(l, "[data-pa-settings-trigger]") || t();
2435
+ const i = (d) => {
2436
+ d.key === "Escape" && t();
2437
+ }, p = (d) => {
2438
+ var g, f;
2439
+ const l = d.target;
2440
+ (g = s.current) != null && g.contains(l) || (f = l.closest) != null && f.call(l, "[data-pa-settings-trigger]") || t();
2446
2441
  };
2447
- return window.addEventListener("keydown", a), window.addEventListener("mousedown", c), () => {
2448
- window.removeEventListener("keydown", a), window.removeEventListener("mousedown", c);
2442
+ return window.addEventListener("keydown", i), window.addEventListener("mousedown", p), () => {
2443
+ window.removeEventListener("keydown", i), window.removeEventListener("mousedown", p);
2449
2444
  };
2450
- }, [e, t]), e ? /* @__PURE__ */ n("div", { ref: s, className: "pa-settings-menu", role: "dialog", "aria-label": "PixelAgent settings", children: /* @__PURE__ */ n(Pe, { variant: "popover", className: "pa-settings-menu-panel", children: /* @__PURE__ */ d("div", { className: "pa-settings-menu-inner", children: [
2451
- /* @__PURE__ */ d("header", { className: "pa-settings-menu-header", children: [
2445
+ }, [e, t]), e ? /* @__PURE__ */ n("div", { ref: s, className: "pa-settings-menu", role: "dialog", "aria-label": "PixelAgent settings", children: /* @__PURE__ */ n(Re, { variant: "popover", className: "pa-settings-menu-panel", children: /* @__PURE__ */ c("div", { className: "pa-settings-menu-inner", children: [
2446
+ /* @__PURE__ */ c("header", { className: "pa-settings-menu-header", children: [
2452
2447
  /* @__PURE__ */ n("h4", { className: "pa-settings-menu-title", children: "Settings" }),
2453
2448
  /* @__PURE__ */ n("p", { className: "pa-settings-menu-subtitle", children: "Appearance and chrome" })
2454
2449
  ] }),
2455
- /* @__PURE__ */ d("section", { className: "pa-settings-section", children: [
2450
+ /* @__PURE__ */ c("section", { className: "pa-settings-section", children: [
2456
2451
  /* @__PURE__ */ n("span", { className: "pa-settings-section-label", children: "Host theme" }),
2457
- /* @__PURE__ */ d("div", { className: "pa-settings-row", children: [
2458
- /* @__PURE__ */ n("span", { className: "pa-settings-row-value", children: i === "dark" ? "Dark canvas" : "Light canvas" }),
2452
+ /* @__PURE__ */ c("div", { className: "pa-settings-row", children: [
2453
+ /* @__PURE__ */ n("span", { className: "pa-settings-row-value", children: r === "dark" ? "Dark canvas" : "Light canvas" }),
2459
2454
  /* @__PURE__ */ n(
2460
2455
  V,
2461
2456
  {
2462
2457
  variant: "icon",
2463
2458
  onClick: o,
2464
- "aria-label": i === "dark" ? "Switch host to light theme" : "Switch host to dark theme",
2465
- title: i === "dark" ? "Light theme" : "Dark theme",
2466
- children: i === "dark" ? /* @__PURE__ */ n(vr, {}) : /* @__PURE__ */ n(br, {})
2459
+ "aria-label": r === "dark" ? "Switch host to light theme" : "Switch host to dark theme",
2460
+ title: r === "dark" ? "Light theme" : "Dark theme",
2461
+ children: r === "dark" ? /* @__PURE__ */ n(ba, {}) : /* @__PURE__ */ n(va, {})
2467
2462
  }
2468
2463
  )
2469
2464
  ] })
2470
2465
  ] }),
2471
- /* @__PURE__ */ d("section", { className: "pa-settings-section", children: [
2466
+ /* @__PURE__ */ c("section", { className: "pa-settings-section", children: [
2472
2467
  /* @__PURE__ */ n("span", { className: "pa-settings-section-label", children: "Glass chrome" }),
2473
- /* @__PURE__ */ d("p", { className: "pa-settings-hint", children: [
2474
- r === "dim" ? "Dim gray glass for readability on bright pages." : "Frosted glass for dark pages.",
2468
+ /* @__PURE__ */ c("p", { className: "pa-settings-hint", children: [
2469
+ a === "dim" ? "Dim gray glass for readability on bright pages." : "Frosted glass for dark pages.",
2475
2470
  " ",
2476
2471
  "(auto)"
2477
2472
  ] })
@@ -2479,14 +2474,14 @@ function yr({
2479
2474
  ] }) }) }) : null;
2480
2475
  }
2481
2476
  const bt = "0 0 24 24";
2482
- function wr() {
2483
- return /* @__PURE__ */ d(q, { children: [
2477
+ function ya() {
2478
+ return /* @__PURE__ */ c(q, { children: [
2484
2479
  /* @__PURE__ */ n("rect", { x: "3", y: "14", width: "4", height: "4", fill: "currentColor" }),
2485
2480
  /* @__PURE__ */ n("path", { fill: "currentColor", d: "M7 5h12v12L7 5z" })
2486
2481
  ] });
2487
2482
  }
2488
- const xr = "M4.5 2.5L4.5 17.25L9.1 12.9L11.35 19.15L13.55 17.95L11.05 11.85L16.85 11.85L4.5 2.5Z";
2489
- function Nr({ size: e = 22, variant: t = "cursor" }) {
2483
+ const ka = "M4.5 2.5L4.5 17.25L9.1 12.9L11.35 19.15L13.55 17.95L11.05 11.85L16.85 11.85L4.5 2.5Z";
2484
+ function Na({ size: e = 22, variant: t = "cursor" }) {
2490
2485
  return t === "pointer" ? /* @__PURE__ */ n(
2491
2486
  "svg",
2492
2487
  {
@@ -2500,7 +2495,7 @@ function Nr({ size: e = 22, variant: t = "cursor" }) {
2500
2495
  "path",
2501
2496
  {
2502
2497
  fill: "currentColor",
2503
- d: xr
2498
+ d: ka
2504
2499
  }
2505
2500
  )
2506
2501
  }
@@ -2513,57 +2508,57 @@ function Nr({ size: e = 22, variant: t = "cursor" }) {
2513
2508
  viewBox: bt,
2514
2509
  xmlns: "http://www.w3.org/2000/svg",
2515
2510
  "aria-hidden": "true",
2516
- children: /* @__PURE__ */ n(wr, {})
2511
+ children: /* @__PURE__ */ n(ya, {})
2517
2512
  }
2518
2513
  );
2519
2514
  }
2520
- const kr = ["element", "area", "multi"], Cr = {
2515
+ const Ca = ["element", "area", "multi"], Ma = {
2521
2516
  element: "Click",
2522
2517
  area: "Area",
2523
2518
  multi: "Multi"
2524
2519
  };
2525
- function Mr({
2520
+ function Aa({
2526
2521
  rootAttributes: e,
2527
2522
  hostTheme: t,
2528
- chrome: i,
2529
- settingsOpen: r,
2523
+ chrome: r,
2524
+ settingsOpen: a,
2530
2525
  onToggleSettings: o,
2531
2526
  onCloseSettings: s,
2532
- onToggleHostTheme: a,
2533
- active: c,
2534
- mode: u,
2527
+ onToggleHostTheme: i,
2528
+ active: p,
2529
+ mode: d,
2535
2530
  captureMode: l,
2536
- annotationCount: f,
2537
- multiSelectCount: p,
2538
- copyStatus: v,
2539
- copyAllFrom: m,
2540
- onActivateAnnotate: g,
2541
- onActivateEdit: y,
2542
- onDeactivate: S,
2531
+ annotationCount: g,
2532
+ multiSelectCount: f,
2533
+ copyStatus: x,
2534
+ copyAllFrom: h,
2535
+ onActivateAnnotate: m,
2536
+ onActivateEdit: v,
2537
+ onDeactivate: z,
2543
2538
  onCopyAll: w,
2544
- onCaptureModeChange: k,
2545
- onConfirmMultiSelect: N
2539
+ onCaptureModeChange: N,
2540
+ onConfirmMultiSelect: k
2546
2541
  }) {
2547
- const { elementRef: E, isDragging: z, style: R, dragHandleProps: x } = Tt(), I = /* @__PURE__ */ d(
2542
+ const { elementRef: E, isDragging: B, style: $, dragHandleProps: y } = Rt(), I = /* @__PURE__ */ c(
2548
2543
  "div",
2549
2544
  {
2550
2545
  ref: E,
2551
- className: `pa-toolbar-float ${z ? "pa-toolbar-float--dragging" : ""}`,
2552
- style: R,
2546
+ className: `pa-toolbar-float ${B ? "pa-toolbar-float--dragging" : ""}`,
2547
+ style: $,
2553
2548
  role: "toolbar",
2554
2549
  "aria-label": "PixelAgent",
2555
2550
  children: [
2556
- !c && /* @__PURE__ */ n(
2557
- yr,
2551
+ !p && /* @__PURE__ */ n(
2552
+ wa,
2558
2553
  {
2559
- open: r,
2554
+ open: a,
2560
2555
  onClose: s,
2561
2556
  hostTheme: t,
2562
- chrome: i,
2563
- onToggleHostTheme: a
2557
+ chrome: r,
2558
+ onToggleHostTheme: i
2564
2559
  }
2565
2560
  ),
2566
- /* @__PURE__ */ n(Rt, { shape: "capsule", className: "pa-toolbar-glass", intensity: "enhanced", children: /* @__PURE__ */ d("div", { className: "pa-toolbar-inner", children: [
2561
+ /* @__PURE__ */ n(Tt, { shape: "capsule", className: "pa-toolbar-glass", intensity: "enhanced", children: /* @__PURE__ */ c("div", { className: "pa-toolbar-inner", children: [
2567
2562
  /* @__PURE__ */ n(
2568
2563
  "button",
2569
2564
  {
@@ -2571,47 +2566,47 @@ function Mr({
2571
2566
  className: "pa-toolbar-drag",
2572
2567
  "aria-label": "Drag PixelAgent toolbar",
2573
2568
  title: "Drag to move",
2574
- ...x,
2575
- children: /* @__PURE__ */ n(Nr, { size: 22 })
2569
+ ...y,
2570
+ children: /* @__PURE__ */ n(Na, { size: 22 })
2576
2571
  }
2577
2572
  ),
2578
2573
  /* @__PURE__ */ n("span", { className: "pa-toolbar-divider", "aria-hidden": "true" }),
2579
- c ? /* @__PURE__ */ d(q, { children: [
2580
- /* @__PURE__ */ d("div", { className: "pa-toolbar-segment", children: [
2581
- /* @__PURE__ */ n("span", { className: "pa-mode-badge", children: u }),
2582
- u === "annotate" && /* @__PURE__ */ d(q, { children: [
2574
+ p ? /* @__PURE__ */ c(q, { children: [
2575
+ /* @__PURE__ */ c("div", { className: "pa-toolbar-segment", children: [
2576
+ /* @__PURE__ */ n("span", { className: "pa-mode-badge", children: d }),
2577
+ d === "annotate" && /* @__PURE__ */ c(q, { children: [
2583
2578
  /* @__PURE__ */ n(
2584
2579
  "select",
2585
2580
  {
2586
2581
  className: "pa-select pa-toolbar-capture-select",
2587
2582
  value: l,
2588
- onChange: (L) => k(L.target.value),
2583
+ onChange: (S) => N(S.target.value),
2589
2584
  "aria-label": "Capture mode",
2590
- children: kr.map((L) => /* @__PURE__ */ n("option", { value: L, children: Cr[L] }, L))
2585
+ children: Ca.map((S) => /* @__PURE__ */ n("option", { value: S, children: Ma[S] }, S))
2591
2586
  }
2592
2587
  ),
2593
- p > 0 && /* @__PURE__ */ n(
2588
+ f > 0 && /* @__PURE__ */ n(
2594
2589
  V,
2595
2590
  {
2596
2591
  variant: "glass-primary",
2597
- onClick: N,
2592
+ onClick: k,
2598
2593
  "aria-label": "Annotate selected elements",
2599
- children: p
2594
+ children: f
2600
2595
  }
2601
2596
  ),
2602
2597
  /* @__PURE__ */ n(
2603
- Ht,
2598
+ Vt,
2604
2599
  {
2605
- feedback: m === "toolbar" ? v : null,
2600
+ feedback: h === "toolbar" ? x : null,
2606
2601
  slotClassName: "pa-copy-feedback-slot--toolbar",
2607
2602
  children: /* @__PURE__ */ n(
2608
2603
  V,
2609
2604
  {
2610
2605
  variant: "glass-primary",
2611
2606
  onClick: w,
2612
- disabled: f === 0,
2613
- "aria-label": f > 0 ? `Copy all annotations (${f})` : "Copy all annotations",
2614
- children: f > 0 ? `Copy (${f})` : "Copy"
2607
+ disabled: g === 0,
2608
+ "aria-label": g > 0 ? `Copy all annotations (${g})` : "Copy all annotations",
2609
+ children: g > 0 ? `Copy (${g})` : "Copy"
2615
2610
  }
2616
2611
  )
2617
2612
  }
@@ -2623,7 +2618,7 @@ function Mr({
2623
2618
  {
2624
2619
  variant: "icon",
2625
2620
  className: "pa-toolbar-close",
2626
- onClick: S,
2621
+ onClick: z,
2627
2622
  "aria-label": "Close",
2628
2623
  children: /* @__PURE__ */ n(
2629
2624
  "svg",
@@ -2646,11 +2641,11 @@ function Mr({
2646
2641
  )
2647
2642
  }
2648
2643
  )
2649
- ] }) : /* @__PURE__ */ d("div", { className: "pa-toolbar-segment", children: [
2650
- /* @__PURE__ */ n(V, { onClick: g, children: "Annotate" }),
2651
- /* @__PURE__ */ n(V, { onClick: y, children: "Edit" })
2644
+ ] }) : /* @__PURE__ */ c("div", { className: "pa-toolbar-segment", children: [
2645
+ /* @__PURE__ */ n(V, { onClick: m, children: "Annotate" }),
2646
+ /* @__PURE__ */ n(V, { onClick: v, children: "Edit" })
2652
2647
  ] }),
2653
- !c && /* @__PURE__ */ d(q, { children: [
2648
+ !p && /* @__PURE__ */ c(q, { children: [
2654
2649
  /* @__PURE__ */ n("span", { className: "pa-toolbar-divider", "aria-hidden": "true" }),
2655
2650
  /* @__PURE__ */ n(
2656
2651
  V,
@@ -2660,18 +2655,18 @@ function Mr({
2660
2655
  "data-pa-settings-trigger": !0,
2661
2656
  onClick: o,
2662
2657
  "aria-label": "PixelAgent settings",
2663
- "aria-expanded": r,
2658
+ "aria-expanded": a,
2664
2659
  title: "Settings",
2665
- children: /* @__PURE__ */ n(gr, {})
2660
+ children: /* @__PURE__ */ n(xa, {})
2666
2661
  }
2667
2662
  )
2668
2663
  ] }),
2669
- v && !_t(v) && v !== "Copied!" && /* @__PURE__ */ n("span", { className: "pa-status pa-toolbar-status", role: "status", children: v })
2664
+ x && !Ht(x) && x !== "Copied!" && /* @__PURE__ */ n("span", { className: "pa-status pa-toolbar-status", role: "status", children: x })
2670
2665
  ] }) })
2671
2666
  ]
2672
2667
  }
2673
2668
  );
2674
- return typeof document > "u" ? I : Ke(
2669
+ return typeof document > "u" ? I : Ge(
2675
2670
  /* @__PURE__ */ n(
2676
2671
  "div",
2677
2672
  {
@@ -2684,401 +2679,408 @@ function Mr({
2684
2679
  document.body
2685
2680
  );
2686
2681
  }
2687
- function Ar() {
2688
- const e = X(en()), [t, i] = A(
2682
+ function za() {
2683
+ const e = j(tn()), [t, r] = A(
2689
2684
  () => {
2690
2685
  var s;
2691
2686
  return ((s = e.current) == null ? void 0 : s.annotations) ?? [];
2692
2687
  }
2693
2688
  );
2694
2689
  _(() => {
2695
- tn({ annotations: t });
2690
+ nn({ annotations: t });
2696
2691
  }, [t]);
2697
- const r = $((s, a) => {
2698
- i(
2699
- (c) => c.map((u) => u.id === s ? { ...u, ...a } : u)
2692
+ const a = L((s, i) => {
2693
+ r(
2694
+ (p) => p.map((d) => d.id === s ? { ...d, ...i } : d)
2700
2695
  );
2701
- }, []), o = $((s) => {
2702
- i((a) => a.filter((c) => c.id !== s));
2696
+ }, []), o = L((s) => {
2697
+ r((i) => i.filter((p) => p.id !== s));
2703
2698
  }, []);
2704
2699
  return {
2705
2700
  annotations: t,
2706
- setAnnotations: i,
2707
- updateAnnotation: r,
2701
+ setAnnotations: r,
2702
+ updateAnnotation: a,
2708
2703
  removeAnnotation: o
2709
2704
  };
2710
2705
  }
2711
- function Sr({
2706
+ function Sa({
2712
2707
  ui: e,
2713
2708
  hostTheme: t,
2714
- onHostThemeChange: i
2709
+ onHostThemeChange: r
2715
2710
  }) {
2716
- const r = Me(
2717
- () => ({ ...nn, ...e }),
2711
+ const a = Me(
2712
+ () => ({ ...an, ...e }),
2718
2713
  [e]
2719
2714
  ), [o, s] = A(
2720
- () => t ?? it(r) ?? "dark"
2721
- ), [a, c] = A(!1), u = t ?? o;
2715
+ () => t ?? rt(a) ?? "dark"
2716
+ ), [i, p] = A(!1), d = t ?? o;
2722
2717
  _(() => {
2723
2718
  if (t !== void 0) return;
2724
- const v = () => {
2725
- const y = it(r);
2726
- y && s(y);
2719
+ const x = () => {
2720
+ const v = rt(a);
2721
+ v && s(v);
2727
2722
  };
2728
- v();
2729
- const m = r.hostThemeAttribute, g = new MutationObserver(v);
2730
- return g.observe(document.documentElement, {
2723
+ x();
2724
+ const h = a.hostThemeAttribute, m = new MutationObserver(x);
2725
+ return m.observe(document.documentElement, {
2731
2726
  attributes: !0,
2732
- attributeFilter: [m]
2733
- }), () => g.disconnect();
2734
- }, [t, r]);
2727
+ attributeFilter: [h]
2728
+ }), () => m.disconnect();
2729
+ }, [t, a]);
2735
2730
  const l = Me(
2736
- () => rn(r, u),
2737
- [r, u]
2738
- ), f = $(() => {
2739
- const v = u === "dark" ? "light" : "dark";
2740
- if (i) {
2741
- i(v);
2731
+ () => rn(a, d),
2732
+ [a, d]
2733
+ ), g = L(() => {
2734
+ const x = d === "dark" ? "light" : "dark";
2735
+ if (r) {
2736
+ r(x);
2742
2737
  return;
2743
2738
  }
2744
- s(v), on(v, r);
2745
- }, [u, i, r]), p = $(() => {
2746
- c((v) => !v);
2739
+ s(x), on(x, a);
2740
+ }, [d, r, a]), f = L(() => {
2741
+ p((x) => !x);
2747
2742
  }, []);
2748
2743
  return {
2749
2744
  chrome: l,
2750
- rootAttributes: an(l),
2751
- hostTheme: u,
2752
- toggleHostTheme: f,
2753
- settingsOpen: a,
2754
- setSettingsOpen: c,
2755
- toggleSettings: p,
2756
- uiSettings: r
2745
+ rootAttributes: sn(l),
2746
+ hostTheme: d,
2747
+ toggleHostTheme: g,
2748
+ settingsOpen: i,
2749
+ setSettingsOpen: p,
2750
+ toggleSettings: f,
2751
+ uiSettings: a
2757
2752
  };
2758
2753
  }
2759
- const yt = "/__pixelagent/apply", wt = "pixelagent-runtime-styles";
2760
- let xt = 0;
2761
- const We = /* @__PURE__ */ new WeakMap();
2762
- function Lr(e) {
2763
- let t = We.get(e);
2754
+ const La = `.pa-root{--pa-glass-blur: 4px;--pa-glass-saturate: 130%;--pa-glass-opacity: .78;--pa-glass-tint: rgba(255, 255, 255, .08);--pa-glass-tint-accent: rgba(99, 102, 241, .32);--pa-glass-border: rgba(255, 255, 255, .28);--pa-glass-rim: inset 0 1px 0 rgba(255, 255, 255, .55), inset 0 0 0 1px rgba(255, 255, 255, .06), inset 1px 0 0 rgba(255, 255, 255, .18), inset -1px 0 0 rgba(255, 255, 255, .18), inset 0 -1px 1px rgba(0, 0, 0, .18);--pa-glass-shadow: 0 1px 1px rgba(0, 0, 0, .06), 0 4px 12px rgba(0, 0, 0, .14), 0 12px 40px rgba(0, 0, 0, .32);--pa-glass-specular: radial-gradient( ellipse 65% 45% at 22% 14%, rgba(255, 255, 255, .38) 0%, rgba(255, 255, 255, .08) 38%, transparent 72% );--pa-glass-underglow: radial-gradient( ellipse 95% 38% at 50% 100%, rgba(129, 140, 248, .18) 0%, transparent 60% );--pa-glass-radius-bar: 999px;--pa-glass-radius-panel: 20px;--pa-glass-radius-popover: 16px;--pa-glass-radius-control: 10px;--pa-glass-group-gap: 10px;--pa-glass-morph-duration: .32s;--pa-glass-morph-easing: cubic-bezier(.4, 0, .2, 1);--pa-glass-fallback-bg: rgba(28, 28, 30, .94);--pa-glass-fallback-border: rgba(255, 255, 255, .12);--pa-glass-surface-fill: rgba(255, 255, 255, .06);--pa-glass-control-hover: rgba(255, 255, 255, .12);--pa-glass-control-active: rgba(255, 255, 255, .18);--pa-divider: rgba(255, 255, 255, .08);--pa-tooltip-bg: rgba(20, 20, 24, .82);--pa-tooltip-border: rgba(255, 255, 255, .14);--pa-toolbar-segment-bg: rgba(0, 0, 0, .28);--pa-toolbar-segment-border: rgba(255, 255, 255, .06);--pa-toolbar-divider-color: rgba(255, 255, 255, .12);--pa-text: rgba(255, 255, 255, .92);--pa-text-secondary: rgba(255, 255, 255, .62);--pa-accent: #818cf8;--pa-accent-bright: #a5b4fc;--pa-success: #6ee7b7;--pa-font: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;--pa-font-mono: ui-monospace, "JetBrains Mono", "SF Mono", Menlo, monospace;--pa-z: 2147483640;--pa-field-bg: rgba(255, 255, 255, .04);--pa-field-bg-hover: rgba(255, 255, 255, .06);--pa-field-border: rgba(255, 255, 255, .12);--pa-field-border-hover: rgba(255, 255, 255, .2);--pa-field-border-focus: rgba(255, 255, 255, .32);--pa-field-radius: 8px}@media(prefers-reduced-transparency:reduce){.pa-root{--pa-glass-blur: 0px;--pa-glass-saturate: 100%;--pa-glass-opacity: 1;--pa-glass-tint: var(--pa-glass-fallback-bg);--pa-glass-tint-accent: rgba(99, 102, 241, .85);--pa-glass-border: var(--pa-glass-fallback-border);--pa-glass-rim: none;--pa-glass-specular: none;--pa-glass-underglow: none}}@media(prefers-reduced-motion:reduce){.pa-root{--pa-glass-morph-duration: 0ms}}.pa-root[data-pa-chrome=dim],.pa-root--toolbar-portal[data-pa-chrome=dim]{--pa-glass-blur: 16px;--pa-glass-saturate: 125%;--pa-glass-opacity: .88;--pa-glass-tint: rgba(92, 92, 96, .68);--pa-glass-tint-accent: rgba(100, 100, 104, .74);--pa-glass-surface-fill: rgba(96, 96, 100, .64);--pa-glass-border: rgba(255, 255, 255, .2);--pa-glass-rim: inset 0 1px 0 rgba(255, 255, 255, .28), inset 0 0 0 1px rgba(255, 255, 255, .05), inset 1px 0 0 rgba(255, 255, 255, .08), inset -1px 0 0 rgba(255, 255, 255, .08), inset 0 -1px 1px rgba(0, 0, 0, .22);--pa-glass-shadow: 0 2px 4px rgba(0, 0, 0, .08), 0 10px 32px rgba(0, 0, 0, .14), 0 24px 48px rgba(0, 0, 0, .1);--pa-glass-specular: radial-gradient( ellipse 68% 48% at 22% 10%, rgba(255, 255, 255, .3) 0%, rgba(255, 255, 255, .1) 40%, transparent 72% );--pa-glass-underglow: none;--pa-glass-fallback-bg: rgba(82, 82, 86, .96);--pa-glass-fallback-border: rgba(255, 255, 255, .12);--pa-glass-control-hover: rgba(255, 255, 255, .1);--pa-glass-control-active: rgba(255, 255, 255, .16);--pa-divider: rgba(255, 255, 255, .1);--pa-tooltip-bg: rgba(82, 82, 86, .96);--pa-tooltip-border: rgba(255, 255, 255, .18);--pa-toolbar-segment-bg: rgba(0, 0, 0, .18);--pa-toolbar-segment-border: rgba(255, 255, 255, .08);--pa-toolbar-divider-color: rgba(255, 255, 255, .14);--pa-text: rgba(255, 255, 255, .94);--pa-text-secondary: rgba(255, 255, 255, .58);--pa-accent: #a5b4fc;--pa-accent-bright: #c7d2fe;--pa-success: #6ee7b7;--pa-field-bg: rgba(255, 255, 255, .06);--pa-field-bg-hover: rgba(255, 255, 255, .09);--pa-field-border: rgba(255, 255, 255, .14);--pa-field-border-hover: rgba(255, 255, 255, .22);--pa-field-border-focus: rgba(255, 255, 255, .32)}.pa-glass-surface{position:relative;overflow:hidden;background:var(--pa-glass-surface-fill);border:1px solid var(--pa-glass-border);box-shadow:var(--pa-glass-shadow),var(--pa-glass-rim);border-radius:inherit;backdrop-filter:blur(4px) saturate(130%);-webkit-backdrop-filter:blur(4px) saturate(130%);will-change:backdrop-filter}.pa-glass-surface.pa-toolbar-glass{backdrop-filter:blur(6px) saturate(138%);-webkit-backdrop-filter:blur(6px) saturate(138%)}.pa-glass-surface-blur{display:none}.pa-glass-surface-bg{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;border-radius:inherit;background:linear-gradient(180deg,#ffffff1a,#fff0 28%),linear-gradient(0deg,#ffffff08,#fff0 22%);pointer-events:none}@media(prefers-reduced-transparency:reduce){.pa-glass-surface{backdrop-filter:none;-webkit-backdrop-filter:none;background:var(--pa-glass-fallback-bg);border-color:var(--pa-glass-fallback-border);box-shadow:none}.pa-glass-surface-bg{filter:none;background:transparent}}.pa-glass-surface--accent{background:var(--pa-glass-tint-accent)}.pa-glass-surface-shine{position:absolute;top:0;right:0;bottom:0;left:0;z-index:2;border-radius:inherit;pointer-events:none;background:var(--pa-glass-specular);mix-blend-mode:screen}.pa-glass-surface:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;z-index:2;border-radius:inherit;pointer-events:none;background:var(--pa-glass-underglow);mix-blend-mode:screen}@media(prefers-reduced-transparency:reduce){.pa-glass-surface-shine,.pa-glass-surface:after{display:none}}.pa-glass-surface-content{position:relative;z-index:3}.pa-glass-container{display:flex;align-items:center;gap:var(--pa-glass-group-gap);font-family:var(--pa-font)}.pa-toolbar-float{position:fixed;bottom:24px;left:50%;margin-left:-150px;z-index:var(--pa-z);touch-action:none}.pa-toolbar-float--dragging{-webkit-user-select:none;user-select:none}.pa-toolbar-inner{display:flex;align-items:center;gap:6px;padding:6px 10px 6px 6px}.pa-toolbar-drag{all:unset;display:flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:50%;color:var(--pa-text);cursor:grab;touch-action:none;flex-shrink:0;transition:background .15s ease}.pa-toolbar-drag:hover{background:var(--pa-glass-control-hover)}.pa-brand-cursor{display:block;flex-shrink:0;pointer-events:none}.pa-brand-cursor--pointer{margin-top:-2px;margin-left:-1px}.pa-brand-cursor--minimal{display:block}.pa-toolbar-float--dragging .pa-toolbar-drag{cursor:grabbing;background:#ffffff24}.pa-toolbar-divider{width:1px;height:24px;background:var(--pa-toolbar-divider-color);flex-shrink:0}.pa-toolbar-segment{display:flex;align-items:center;gap:4px;padding:3px 4px;border-radius:999px;background:var(--pa-toolbar-segment-bg);border:1px solid var(--pa-toolbar-segment-border)}.pa-toolbar-capture-select{width:auto;min-width:76px;padding:6px 28px 6px 10px;font-size:12px;font-weight:500;letter-spacing:0;text-transform:none;border-radius:999px;cursor:pointer}.pa-toolbar-close{margin-left:2px;flex-shrink:0}.pa-toolbar-status{font-size:11px;padding:0 8px;white-space:nowrap}.pa-settings-menu{position:absolute;right:8px;bottom:calc(100% + 12px);z-index:2;width:min(280px,calc(100vw - 32px));pointer-events:auto}.pa-settings-menu-panel{width:100%}.pa-settings-menu-inner{padding:14px 16px 16px}.pa-settings-menu-header{margin-bottom:14px}.pa-settings-menu-title{margin:0;font-size:14px;font-weight:600;color:var(--pa-text)}.pa-settings-menu-subtitle{margin:4px 0 0;font-size:11px;color:var(--pa-text-secondary)}.pa-settings-section{padding:12px 0;border-top:1px solid var(--pa-divider)}.pa-settings-section:first-of-type{border-top:none;padding-top:0}.pa-settings-section-label{display:block;font-size:10px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--pa-text-secondary);margin-bottom:8px}.pa-settings-row{display:flex;align-items:center;justify-content:space-between;gap:10px}.pa-settings-row-value{font-size:12px;color:var(--pa-text)}.pa-settings-hint{margin:0;font-size:11px;line-height:1.45;color:var(--pa-text-secondary)}.pa-glass-group{flex-shrink:0}.pa-glass-group-inner{display:flex;align-items:center;gap:2px;padding:4px 6px}.pa-glass-group--brand .pa-glass-group-inner{padding:6px 14px}.pa-glass-btn{all:unset;box-sizing:border-box;cursor:pointer;font-family:var(--pa-font);font-size:12px;font-weight:500;color:var(--pa-text);padding:6px 12px;border-radius:var(--pa-glass-radius-control);white-space:nowrap;transition:background var(--pa-glass-morph-duration) var(--pa-glass-morph-easing),transform .12s ease,color var(--pa-glass-morph-duration) ease}.pa-glass-btn:hover:not(:disabled){background:var(--pa-glass-control-hover)}.pa-glass-btn:active:not(:disabled){transform:scale(.97);background:var(--pa-glass-control-active)}.pa-glass-btn:disabled{opacity:.38;cursor:not-allowed}.pa-glass-btn--glass-primary,.pa-glass-btn--prominent{position:relative;color:#fff;font-weight:600;padding:8px 16px;background:#ffffff1a;backdrop-filter:blur(12px) saturate(140%);-webkit-backdrop-filter:blur(12px) saturate(140%);border:1px solid rgba(255,255,255,.28);box-shadow:inset 0 1px #fff6,0 4px 16px #00000026}.pa-glass-btn--glass-primary:before,.pa-glass-btn--prominent:before{content:"";position:absolute;top:0;right:0;bottom:0;left:0;border-radius:inherit;background:linear-gradient(135deg,rgba(255,255,255,.22) 0%,transparent 45%,transparent 100%);pointer-events:none}.pa-glass-btn--glass-primary:hover:not(:disabled),.pa-glass-btn--prominent:hover:not(:disabled){background:#ffffff29;border-color:#ffffff61;box-shadow:inset 0 1px #ffffff73,0 6px 20px #0003}@media(prefers-reduced-transparency:reduce){.pa-glass-btn--glass-primary,.pa-glass-btn--prominent{backdrop-filter:none;-webkit-backdrop-filter:none;background:#3c3c46e6}}.pa-glass-btn--icon{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;padding:0;border-radius:50%;color:#ffffffbf;background:#ffffff0f;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid rgba(255,255,255,.14);box-shadow:inset 0 1px #ffffff1f}.pa-glass-btn--icon:hover:not(:disabled){color:#fff;background:#ffffff1f;border-color:#ffffff38}.pa-glass-btn--ghost{color:var(--pa-text-secondary);padding:6px 10px}.pa-glass-btn--ghost:hover:not(:disabled){color:var(--pa-text);background:#ffffff14}.pa-glass-btn--active{background:#6366f173;color:#fff}.pa-glass-btn--sm{padding:2px 8px;font-size:11px}.pa-glass-panel{font-family:var(--pa-font);color:var(--pa-text)}.pa-glass-panel--sheet.pa-glass-panel--left{position:fixed;top:16px;left:16px;z-index:var(--pa-z);width:288px;max-height:calc(100vh - 100px)}.pa-glass-panel--sheet.pa-glass-panel--right{position:fixed;top:16px;right:16px;z-index:var(--pa-z);width:360px;max-height:60vh}.pa-glass-panel--popover{position:fixed;z-index:calc(var(--pa-z) + 2);width:300px}.pa-glass-panel .pa-glass-surface-content{padding:14px;display:flex;flex-direction:column;gap:10px}.pa-glass-panel--sheet .pa-glass-surface-content{padding:14px;overflow-y:auto;max-height:inherit}.pa-glass-panel--sheet.pa-glass-panel--right:not(.pa-edit-panel-glass) .pa-glass-surface-content{padding:0;gap:0}.pa-toolbar-brand{font-weight:600;font-size:12px;color:var(--pa-accent-bright);letter-spacing:-.01em}.pa-mode-badge{font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--pa-text-secondary);padding:4px 10px}.pa-status{font-size:11px;font-weight:500;color:var(--pa-success);padding:4px 10px;animation:pa-status-in .28s var(--pa-glass-morph-easing)}.pa-copy-feedback-slot{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;font-size:12px;font-weight:600;white-space:nowrap;border-radius:999px;flex-shrink:0;animation:pa-status-in .28s var(--pa-glass-morph-easing)}.pa-copy-feedback-slot--toolbar{padding:8px 16px;min-height:34px}.pa-copy-feedback-slot--session{padding:8px 14px;min-height:34px}.pa-copy-feedback-slot--item{padding:6px 10px;min-width:44px;min-height:28px;font-size:11px}@keyframes pa-status-in{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}@media(prefers-reduced-motion:reduce){.pa-status{animation:none}}.pa-glass-divider{width:1px;height:16px;background:#ffffff26;margin:0 2px;flex-shrink:0}.pa-root{all:initial;font-family:var(--pa-font);font-size:13px;line-height:1.4;color:var(--pa-text)}.pa-root--toolbar-portal{all:unset;position:static;font-family:var(--pa-font);font-size:13px;line-height:1.4;color:var(--pa-text);pointer-events:none}.pa-root--toolbar-portal .pa-toolbar-float{pointer-events:auto}.pa-root *,.pa-root *:before,.pa-root *:after{box-sizing:border-box}.pa-highlight{position:fixed;pointer-events:none;z-index:calc(var(--pa-z) - 2);border:2px solid var(--pa-accent);background:#6366f11f;border-radius:4px;box-shadow:0 0 0 1px #6366f140;transition:top .05s,left .05s,width .05s,height .05s,background var(--pa-glass-morph-duration) ease}.pa-highlight-selected{background:#6366f138;border-color:var(--pa-accent-bright);box-shadow:0 0 0 2px #6366f159,0 0 20px #6366f126}.pa-highlight-scope{background:#6366f129;border-style:dashed}.pa-highlight-primary{border-width:2px;background:#6366f147;box-shadow:0 0 0 3px #6366f173,0 0 24px #6366f133}.pa-annotation-badge{position:fixed;pointer-events:none;z-index:calc(var(--pa-z) - 1);min-width:22px;height:22px;padding:0 6px;display:inline-flex;align-items:center;justify-content:center;font-family:var(--pa-font);font-size:12px;font-weight:700;line-height:1;color:#fff;background:#6669f8;border:none;border-radius:999px;box-shadow:0 2px 10px #37348c52;transform:translate(-50%,-50%);transition:top .05s,left .05s}.pa-tooltip{position:fixed;pointer-events:none;z-index:calc(var(--pa-z) - 1);font-family:var(--pa-font);font-size:12px;font-weight:600;letter-spacing:-.01em;color:var(--pa-text);padding:4px 8px;border-radius:6px;max-width:240px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background:var(--pa-tooltip-bg);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid var(--pa-tooltip-border)}@media(prefers-reduced-transparency:reduce){.pa-tooltip{-webkit-backdrop-filter:none;backdrop-filter:none;background:var(--pa-glass-fallback-bg);border-color:var(--pa-glass-fallback-border)}}.pa-label{display:flex;flex-direction:column;gap:6px;font-size:11px;font-weight:500;letter-spacing:.04em;text-transform:uppercase;color:var(--pa-text-secondary);font-family:var(--pa-font)}.pa-select,.pa-input,.pa-textarea{font-family:var(--pa-font);font-size:12px;font-weight:400;line-height:1.4;color:var(--pa-text);background-color:var(--pa-field-bg);border:1px solid var(--pa-field-border);border-radius:var(--pa-field-radius);padding:8px 10px;outline:none;width:100%;transition:background-color .15s ease,border-color .15s ease,box-shadow .15s ease}.pa-select{-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;padding-right:28px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' stroke='rgba(255,255,255,0.45)' stroke-width='1.25' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 10px center}.pa-select:hover:not(:focus),.pa-input:hover:not(:focus),.pa-textarea:hover:not(:focus){background-color:var(--pa-field-bg-hover);border-color:var(--pa-field-border-hover)}.pa-select:focus,.pa-input:focus,.pa-textarea:focus{background-color:#ffffff0d;border-color:var(--pa-field-border-focus);box-shadow:inset 0 1px #ffffff0f}.pa-textarea{resize:vertical;min-height:64px;line-height:1.5}@media(prefers-reduced-transparency:reduce){.pa-select,.pa-input,.pa-textarea{background-color:var(--pa-glass-fallback-bg);border-color:var(--pa-glass-fallback-border)}.pa-select:focus,.pa-input:focus,.pa-textarea:focus{border-color:var(--pa-accent)}}.pa-popover-header{display:flex;flex-direction:column;gap:3px}.pa-popover-selector{font-size:11px;font-weight:500;color:var(--pa-accent-bright);word-break:break-all}.pa-popover-actions{display:flex;justify-content:flex-end;gap:6px;margin-top:2px}.pa-edit-panel-float{position:fixed;right:16px;top:16px;z-index:calc(var(--pa-z) + 4);width:312px;max-height:calc(100vh - 32px)}.pa-edit-panel-float--dragging{-webkit-user-select:none;user-select:none}.pa-edit-panel-float .pa-glass-panel--sheet{position:relative;top:auto;left:auto;right:auto;width:100%;max-height:calc(100vh - 32px)}.pa-edit-panel-glass .pa-glass-surface-content{display:flex;flex-direction:column;min-height:0;max-height:calc(100vh - 32px);padding:14px 14px 12px}.pa-edit-panel-inner{display:flex;flex-direction:column;min-height:0;flex:1;gap:10px}.pa-edit-panel-scroll{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;margin:0 -4px;padding:0 4px;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.2) transparent}.pa-edit-panel-sticky{flex-shrink:0;padding-top:4px;border-top:1px solid rgba(255,255,255,.08)}.pa-edit-panel-header{display:flex;align-items:center;gap:8px}.pa-edit-panel-drag{all:unset;display:flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:8px;cursor:grab;touch-action:none;flex-shrink:0;color:#ffffff73;transition:background .15s ease,color .15s ease}.pa-edit-panel-drag:hover{background:#ffffff1a;color:#ffffffd9}.pa-edit-panel-float--dragging .pa-edit-panel-drag{cursor:grabbing}.pa-edit-panel-grip{display:grid;grid-template-columns:repeat(2,4px);gap:3px}.pa-edit-panel-grip span{display:block;width:4px;height:4px;border-radius:50%;background:currentColor}.pa-edit-title{all:unset;display:block;font-size:14px;font-weight:600;letter-spacing:-.02em;flex:1}.pa-edit-hint{font-size:12px;color:var(--pa-text-secondary);margin:0;line-height:1.5}.pa-edit-state-hint{font-size:11px;color:var(--pa-text-secondary);margin:0 0 8px;line-height:1.45}.pa-edit-actions{display:flex;gap:8px;margin-top:8px}.pa-edit-actions .pa-glass-btn{display:inline-flex;align-items:center;justify-content:center}.pa-glass-btn-inner{display:inline-flex;align-items:center;gap:6px}.pa-glass-btn-icon{width:14px;height:14px;flex-shrink:0;opacity:.92}.pa-preview-disabled{opacity:.55;pointer-events:none}.pa-edit-meta{display:flex;flex-direction:column;gap:3px;margin-bottom:4px}.pa-edit-meta code,.pa-edit-meta-label{font-size:12px;font-weight:500;color:var(--pa-accent-bright);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pa-edit-source{font-size:10px;color:var(--pa-text-secondary)}.pa-edit-source--warn{color:var(--pa-warning, #e8a838);line-height:1.4}.pa-edit-text-input{min-height:72px;font-size:13px;line-height:1.55}.pa-edit-sections{display:flex;flex-direction:column}.pa-edit-section{border-bottom:1px solid rgba(255,255,255,.06)}.pa-edit-section:last-child{border-bottom:none}.pa-edit-section-header{all:unset;box-sizing:border-box;display:flex;align-items:center;gap:8px;width:100%;padding:10px 2px 8px;cursor:pointer;color:#ffffffb8}.pa-edit-section-header:hover{color:#ffffffeb}.pa-edit-section-title{font-size:11px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;flex:1;text-align:left}.pa-edit-section-badge{font-size:10px;color:var(--pa-text-secondary)}.pa-edit-section-chevron{width:8px;height:8px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(45deg);transition:transform .16s ease;opacity:.55}.pa-edit-section:not(.pa-edit-section--open) .pa-edit-section-chevron{transform:rotate(-45deg)}.pa-edit-section-body{display:flex;flex-direction:column;gap:10px;padding:0 2px 12px}.pa-edit-field-label{display:block;font-size:10px;font-weight:500;letter-spacing:.04em;color:var(--pa-text-secondary);margin-bottom:5px}.pa-edit-stack-field{display:flex;flex-direction:column}.pa-edit-field-block{display:flex;flex-direction:column;gap:6px}.pa-edit-field-grid{display:grid;gap:10px}.pa-edit-field-grid--2{grid-template-columns:1fr 1fr}.pa-edit-mini-field{display:flex;flex-direction:column;min-width:0}.pa-edit-mini-field .pa-select{font-size:12px;padding:7px 8px}.pa-edit-inline-hint{font-size:10px;line-height:1.45;color:var(--pa-text-secondary);margin:0}.pa-edit-split-fields{display:grid;grid-template-columns:1fr 1fr;gap:8px 10px}.pa-edit-split-fields .pa-prop-row{grid-template-columns:1fr;gap:4px}.pa-segmented{display:flex;width:100%;border-radius:10px;border:1px solid rgba(255,255,255,.14);background:#00000047;overflow:hidden}.pa-segmented-btn{all:unset;box-sizing:border-box;flex:1;display:inline-flex;align-items:center;justify-content:center;min-width:0;height:34px;color:#ffffff80;border-right:1px solid rgba(255,255,255,.1);cursor:pointer;transition:background .12s ease,color .12s ease}.pa-segmented-btn:last-child{border-right:none}.pa-segmented-btn:hover{background:#ffffff0f;color:#ffffffd1}.pa-segmented-btn--on{background:#ffffff24;color:#fffffff2}.pa-segmented-icon{display:block;width:16px;height:16px;flex-shrink:0}.pa-segmented-type{font-size:13px;font-weight:600;line-height:1;font-family:var(--pa-font, system-ui, sans-serif)}.pa-segmented-type--bold{font-weight:700}.pa-segmented-type--italic{font-style:italic;font-weight:600}.pa-segmented-type--underline{text-decoration:underline;text-underline-offset:2px}.pa-font-family-select{width:100%;font-size:13px;padding:9px 32px 9px 10px;color:#ffffffe0;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff99' d='M3 4.5 6 8l3-3.5'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 10px center}.pa-font-family-select:invalid,.pa-font-family-select option[value=""]{color:#ffffff73}.pa-edit-size-row .pa-prop-row{grid-template-columns:1fr;gap:4px}.pa-edit-size-row .pa-prop-row--slider .pa-prop-slider-wrap{flex-direction:column;align-items:stretch;gap:6px}.pa-edit-size-row .pa-prop-slider-value{width:100%;text-align:left}.pa-color-field{display:flex;flex-direction:column;gap:6px}.pa-color-field-trigger{all:unset;box-sizing:border-box;display:flex;align-items:center;gap:10px;width:100%;padding:6px 8px;border-radius:10px;border:1px solid rgba(255,255,255,.12);background:#00000038;cursor:pointer;transition:border-color .14s ease,background .14s ease}.pa-color-field-trigger:hover{border-color:#ffffff38;background:#ffffff0f}.pa-color-field-trigger[aria-expanded=true]{border-color:#818cf873;background:#6366f11f}.pa-color-field-swatch{width:28px;height:28px;flex-shrink:0;border-radius:8px;border:1px solid rgba(255,255,255,.2);box-shadow:inset 0 0 0 1px #00000026}.pa-color-field-hex{flex:1;min-width:0;pointer-events:none;font-family:var(--pa-font-mono);font-size:12px}.pa-color-picker-portal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:calc(var(--pa-z) + 50);pointer-events:none}.pa-color-picker-portal .pa-color-picker{pointer-events:auto}.pa-color-picker{position:fixed;z-index:calc(var(--pa-z) + 50);box-sizing:border-box;padding:14px;border-radius:14px;border:1px solid rgba(255,255,255,.14);background:#121214f0;backdrop-filter:blur(20px) saturate(140%);-webkit-backdrop-filter:blur(20px) saturate(140%);box-shadow:0 4px 6px #0000001f,0 16px 40px #00000073,inset 0 1px #ffffff14;display:flex;flex-direction:column;gap:12px}.pa-color-picker-header{display:flex;align-items:center;gap:10px}.pa-color-picker-preview{width:22px;height:22px;flex-shrink:0;border-radius:6px;border:1px solid rgba(255,255,255,.18);box-shadow:inset 0 0 0 1px #0000001f}.pa-color-picker-header-label{font-size:13px;font-weight:500;color:#ffffff8c;letter-spacing:-.01em}.pa-color-picker-sb{position:relative;width:100%;height:148px;border-radius:10px;border:1px solid rgba(255,255,255,.1);overflow:hidden;cursor:crosshair;touch-action:none;background:linear-gradient(to bottom,transparent,#000),linear-gradient(to right,#fff,hsl(var(--pa-picker-h, 0) 100% 50%))}.pa-color-picker-sb-thumb{position:absolute;width:14px;height:14px;margin:-7px 0 0 -7px;border-radius:50%;border:2px solid #fff;box-shadow:0 0 0 1px #00000059,0 2px 6px #00000059;pointer-events:none}.pa-color-picker-hue{position:relative;height:14px;border-radius:999px;border:1px solid rgba(255,255,255,.08);background:linear-gradient(90deg,red,#ff0,#0f0,#0ff,#00f,#f0f,red)}.pa-color-picker-hue-input{position:absolute;top:-4px;right:0;bottom:-4px;left:0;width:100%;height:calc(100% + 8px);margin:0;opacity:0;cursor:pointer}.pa-color-picker-hue-thumb{position:absolute;top:50%;width:14px;height:14px;margin:-7px 0 0 -7px;border-radius:50%;border:2px solid #fff;box-shadow:0 0 0 1px #0000004d,0 1px 4px #00000059;pointer-events:none}.pa-color-picker-field{display:flex;flex-direction:column;gap:6px}.pa-color-picker-field--rgb{flex:1;min-width:0}.pa-color-picker-field-label{font-size:11px;font-weight:500;color:#ffffff73;letter-spacing:.02em}.pa-color-picker-input{width:100%;font-family:var(--pa-font-mono);font-size:12px;padding:8px 10px!important;border-radius:8px;border:1px solid rgba(255,255,255,.12)!important;background:#00000059!important;color:#ffffffe6!important;transition:border-color .14s ease,box-shadow .14s ease}.pa-color-picker-input:hover{border-color:#fff3!important}.pa-color-picker-input:focus{outline:none;border-color:#818cf88c!important;box-shadow:0 0 0 2px #6366f140}.pa-color-picker-rgb{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.pa-color-picker-field--rgb .pa-color-picker-input{text-align:center;padding-left:6px!important;padding-right:6px!important}.pa-color-picker-input[type=number]::-webkit-inner-spin-button,.pa-color-picker-input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.pa-prop-row{display:grid;grid-template-columns:88px minmax(0,1fr);align-items:center;gap:10px;padding:2px 0}.pa-prop-row--compact{grid-template-columns:72px minmax(0,1fr)}.pa-prop-label{font-size:10px;font-weight:500;letter-spacing:.06em;text-transform:uppercase;color:var(--pa-text-secondary)}.pa-prop-row--slider{align-items:center}.pa-prop-slider-wrap{display:flex;align-items:center;gap:8px;min-width:0}.pa-slider{flex:1;min-width:0;height:4px;margin:0;cursor:pointer;accent-color:rgba(255,255,255,.82);background:transparent}.pa-slider::-webkit-slider-runnable-track{height:4px;border-radius:999px;background:#ffffff1f}.pa-slider::-webkit-slider-thumb{-webkit-appearance:none;width:12px;height:12px;margin-top:-4px;border-radius:50%;background:#ffffffeb;border:1px solid rgba(255,255,255,.35);box-shadow:0 1px 4px #00000059}.pa-slider::-moz-range-track{height:4px;border-radius:999px;background:#ffffff1f}.pa-slider::-moz-range-thumb{width:12px;height:12px;border-radius:50%;background:#ffffffeb;border:1px solid rgba(255,255,255,.35);box-shadow:0 1px 4px #00000059}.pa-prop-slider-value{width:56px;flex-shrink:0;padding:5px 6px!important;text-align:right}.pa-spacing-control{display:flex;align-items:stretch;gap:6px;min-width:0}.pa-spacing-pair,.pa-spacing-grid{display:grid;grid-template-columns:1fr 1fr;gap:6px;flex:1;min-width:0}.pa-spacing-grid{grid-template-rows:1fr 1fr}.pa-spacing-cell{position:relative;display:flex;align-items:center;min-width:0}.pa-spacing-cell-icon{position:absolute;left:7px;top:50%;transform:translateY(-50%);display:inline-flex;color:#ffffff8c;pointer-events:none}.pa-spacing-cell-input{width:100%;padding:6px 6px 6px 24px!important;text-align:left;font-family:var(--pa-font-mono);font-size:11px}.pa-spacing-cell--mixed .pa-spacing-cell-input{color:#ffffffb3}.pa-spacing-cell--mixed .pa-spacing-cell-icon{color:#fff6}.pa-spacing-toggle{all:unset;display:inline-flex;align-items:center;justify-content:center;width:26px;min-height:26px;border-radius:6px;border:1px solid rgba(255,255,255,.08);color:#ffffff8c;cursor:pointer;flex-shrink:0;transition:background .12s ease,color .12s ease,border-color .12s ease}.pa-spacing-toggle:hover:not(:disabled){background:#ffffff0f;color:#ffffffe6}.pa-spacing-toggle--on{background:#ffffff1f;color:#fffffff2;border-color:#ffffff2e}.pa-spacing-toggle:disabled{opacity:.4;cursor:not-allowed}.pa-edit-panel-glass .pa-prop-row .pa-input{font-family:var(--pa-font-mono);font-size:11px;padding:6px 8px;border-radius:6px;color:#ffffffe0}.pa-edit-panel-glass .pa-select,.pa-edit-panel-glass .pa-textarea{border-radius:var(--pa-field-radius)}.pa-edit-footer{display:flex;align-items:center;justify-content:space-between;margin-top:8px;padding-top:10px}.pa-change-count{font-size:11px;color:var(--pa-text-secondary)}.pa-change-count--success{color:var(--pa-success)}.pa-change-count--error{color:#fca5a5}.pa-popover-body{display:flex;flex-direction:column;gap:10px}.pa-popover-controls{display:grid;grid-template-columns:1fr 1fr;gap:8px}.pa-popover-context{display:flex;flex-direction:column;gap:4px;padding:8px 10px;border-radius:var(--pa-field-radius);background:#0003;border:1px solid rgba(255,255,255,.08)}.pa-popover-context-line{margin:0;font-size:11px;line-height:1.45;color:var(--pa-text)}.pa-popover-context-label{display:inline-block;min-width:52px;margin-right:6px;font-size:10px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:var(--pa-text-secondary)}.pa-popover-hint{margin:0;font-size:10px;color:var(--pa-text-secondary)}.pa-area-select{position:fixed;pointer-events:none;z-index:calc(var(--pa-z) - 3);border:2px dashed var(--pa-accent-bright);background:#6366f114;border-radius:4px}.pa-area-select--dragging{background:#6366f124}.pa-session-panel--collapsed .pa-session-header{border-bottom:none}.pa-session-header{display:grid;grid-template-columns:1fr auto;grid-template-rows:auto auto;gap:4px 8px;align-items:center;padding:14px;border-bottom:1px solid rgba(255,255,255,.1)}.pa-session-header-main{display:flex;align-items:center;gap:4px;grid-column:1;min-width:0}.pa-session-collapse-btn{flex-shrink:0;padding:4px 6px!important}.pa-session-chevron{display:inline-block;font-size:10px;line-height:1;opacity:.85}.pa-session-title{all:unset;font-size:14px;font-weight:600;letter-spacing:-.02em}.pa-session-subtitle{grid-column:1;margin:0;font-size:10px;color:var(--pa-text-secondary)}.pa-session-actions{grid-column:2;grid-row:1 / span 2}.pa-session-status{margin:0;padding:8px 14px 0;font-size:11px;color:var(--pa-accent-bright)}.pa-session-content{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}.pa-session-target{font-size:11px;font-weight:600;font-family:var(--pa-font-mono, ui-monospace, monospace);color:var(--pa-accent-bright);letter-spacing:-.01em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pa-session-note{margin:0;font-size:13px;font-weight:500;line-height:1.4;color:var(--pa-text);word-break:break-word}.pa-session-meta-line{margin:0;font-size:10px;line-height:1.35;color:var(--pa-text-secondary);overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.pa-session-meta{display:flex;flex-wrap:wrap;gap:4px;margin-top:6px}.pa-session-badge{font-size:9px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;padding:1px 6px;border-radius:999px;color:var(--pa-text-secondary);background:#ffffff14}.pa-session-edit{flex:1;display:flex;flex-direction:column;gap:8px}.pa-session-item-actions{display:flex;flex-shrink:0;flex-direction:row;align-items:center;gap:2px}.pa-session-list{list-style:none;margin:0;padding:10px;overflow-y:auto;display:flex;flex-direction:column;gap:6px;max-height:calc(60vh - 60px)}.pa-session-item{display:flex;align-items:flex-start;gap:8px;padding:10px;background:#0000002e;border:1px solid rgba(255,255,255,.08);border-radius:var(--pa-glass-radius-control)}.pa-session-empty{font-size:12px;color:var(--pa-text-secondary);padding:16px;text-align:center;line-height:1.5}`, vt = "pixelagent-base-styles";
2755
+ function Ea() {
2756
+ if (typeof document > "u" || document.getElementById(vt)) return;
2757
+ const e = document.createElement("style");
2758
+ e.id = vt, e.textContent = La, document.head.appendChild(e);
2759
+ }
2760
+ Ea();
2761
+ const wt = "/__pixelagent/apply", yt = "pixelagent-runtime-styles";
2762
+ let kt = 0;
2763
+ const Ue = /* @__PURE__ */ new WeakMap();
2764
+ function Ia(e) {
2765
+ let t = Ue.get(e);
2764
2766
  if (t) return t;
2765
- for (const i of Array.from(e.classList))
2766
- if (i.startsWith("pa-runtime-"))
2767
- return We.set(e, i), i;
2768
- return xt += 1, t = `pa-runtime-${xt}`, We.set(e, t), e.classList.add(t), t;
2767
+ for (const r of Array.from(e.classList))
2768
+ if (r.startsWith("pa-runtime-"))
2769
+ return Ue.set(e, r), r;
2770
+ return kt += 1, t = `pa-runtime-${kt}`, Ue.set(e, t), e.classList.add(t), t;
2769
2771
  }
2770
- function $r() {
2771
- let e = document.getElementById(wt);
2772
- return e || (e = document.createElement("style"), e.id = wt, document.head.appendChild(e)), e;
2772
+ function $a() {
2773
+ let e = document.getElementById(yt);
2774
+ return e || (e = document.createElement("style"), e.id = yt, document.head.appendChild(e)), e;
2773
2775
  }
2774
- function Er(e, t, i, r) {
2775
- const o = $r(), s = e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), a = new RegExp(
2776
+ function Ta(e, t, r, a) {
2777
+ const o = $a(), s = e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), i = new RegExp(
2776
2778
  `(\\.${s}:${t}\\s*\\{)([\\s\\S]*?)(\\})`,
2777
2779
  "m"
2778
- ), c = `${i}: ${r} !important`;
2779
- let u = o.textContent ?? "";
2780
- const l = u.match(a);
2780
+ ), p = `${r}: ${a} !important`;
2781
+ let d = o.textContent ?? "";
2782
+ const l = d.match(i);
2781
2783
  if (l) {
2782
- const f = l[2], p = new RegExp(`(\\s*${i.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}\\s*:\\s*)[^;]+;?`);
2783
- let v;
2784
- if (p.test(f))
2785
- v = f.replace(p, `$1${r} !important;`);
2784
+ const g = l[2], f = new RegExp(`(\\s*${r.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}\\s*:\\s*)[^;]+;?`);
2785
+ let x;
2786
+ if (f.test(g))
2787
+ x = g.replace(f, `$1${a} !important;`);
2786
2788
  else {
2787
- const m = f.replace(/\s+$/, ""), g = m.endsWith(";") || m === "" ? "" : ";";
2788
- v = `${m}${g}
2789
- ${c};
2789
+ const h = g.replace(/\s+$/, ""), m = h.endsWith(";") || h === "" ? "" : ";";
2790
+ x = `${h}${m}
2791
+ ${p};
2790
2792
  `;
2791
2793
  }
2792
- u = u.replace(a, `$1${v}$3`);
2794
+ d = d.replace(i, `$1${x}$3`);
2793
2795
  } else
2794
- u && !u.endsWith(`
2795
- `) && (u += `
2796
- `), u += `
2796
+ d && !d.endsWith(`
2797
+ `) && (d += `
2798
+ `), d += `
2797
2799
  .${e}:${t} {
2798
- ${c};
2800
+ ${p};
2799
2801
  }
2800
2802
  `;
2801
- o.textContent = u;
2803
+ o.textContent = d;
2802
2804
  }
2803
2805
  function Nt(e) {
2804
- const t = Math.min(e.startX, e.currentX), i = Math.min(e.startY, e.currentY), r = Math.abs(e.currentX - e.startX), o = Math.abs(e.currentY - e.startY);
2805
- return { x: t, y: i, width: r, height: o };
2806
+ const t = Math.min(e.startX, e.currentX), r = Math.min(e.startY, e.currentY), a = Math.abs(e.currentX - e.startX), o = Math.abs(e.currentY - e.startY);
2807
+ return { x: t, y: r, width: a, height: o };
2806
2808
  }
2807
- function Ir({
2809
+ function Ra({
2808
2810
  ui: e,
2809
2811
  hostTheme: t,
2810
- onHostThemeChange: i,
2811
- applyEndpoint: r,
2812
+ onHostThemeChange: r,
2813
+ applyEndpoint: a,
2812
2814
  onApply: o,
2813
2815
  runtimeStateStyles: s
2814
2816
  } = {}) {
2815
- const a = Sr({ ui: e, hostTheme: t, onHostThemeChange: i }), [c, u] = A(null);
2817
+ const i = Sa({ ui: e, hostTheme: t, onHostThemeChange: r }), [p, d] = A(null);
2816
2818
  _(() => {
2817
- if (r || o) return;
2819
+ if (a || o) return;
2818
2820
  let b = !1;
2819
- return fetch(yt, { method: "GET" }).then((M) => {
2820
- !b && M.status === 405 && u(yt);
2821
+ return fetch(wt, { method: "GET" }).then((M) => {
2822
+ !b && M.status === 405 && d(wt);
2821
2823
  }).catch(() => {
2822
2824
  }), () => {
2823
2825
  b = !0;
2824
2826
  };
2825
- }, [r, o]);
2826
- const [l, f] = A(!1), [p, v] = A("idle"), [m, g] = A("element"), {
2827
- annotations: y,
2828
- setAnnotations: S,
2827
+ }, [a, o]);
2828
+ const [l, g] = A(!1), [f, x] = A("idle"), [h, m] = A("element"), {
2829
+ annotations: v,
2830
+ setAnnotations: z,
2829
2831
  updateAnnotation: w,
2830
- removeAnnotation: k
2831
- } = Ar(), [N, E] = A(null), [z, R] = A(null), [x, I] = A([]), [L, h] = A(null), [F, U] = A(null), [ye, ee] = A(!1), [re, oe] = A(!1), W = l && p === "annotate" && y.length > 0 && !ye, [j, ie] = A("this-instance"), [ce, C] = A("normal"), [P, D] = A(null), [T, H] = A(null), [O, Y] = A(null), ae = X(null), G = X(null), K = $(
2832
+ removeAnnotation: N
2833
+ } = za(), [k, E] = A(null), [B, $] = A(null), [y, I] = A([]), [S, u] = A(null), [O, W] = A(null), [ve, ee] = A(!1), [ae, oe] = A(!1), U = l && f === "annotate" && v.length > 0 && !ve, [K, re] = A("this-instance"), [pe, C] = A("normal"), [R, P] = A(null), [T, H] = A(null), [D, Y] = A(null), ie = j(null), X = j(null), G = L(
2832
2834
  (b, M) => {
2833
- G.current && clearTimeout(G.current), D(b), H((M == null ? void 0 : M.entryId) ?? null), Y((M == null ? void 0 : M.copyAllFrom) ?? null), G.current = setTimeout(() => {
2834
- D(null), H(null), Y(null);
2835
+ X.current && clearTimeout(X.current), P(b), H((M == null ? void 0 : M.entryId) ?? null), Y((M == null ? void 0 : M.copyAllFrom) ?? null), X.current = setTimeout(() => {
2836
+ P(null), H(null), Y(null);
2835
2837
  }, 2500);
2836
2838
  },
2837
2839
  []
2838
- ), he = $(
2840
+ ), ue = L(
2839
2841
  async (b, M, J) => {
2840
2842
  if (b)
2841
2843
  try {
2842
- await St(b), K(M, J);
2844
+ await St(b), G(M, J);
2843
2845
  } catch {
2844
- K("Copy failed — check clipboard permissions", J);
2846
+ G("Copy failed — check clipboard permissions", J);
2845
2847
  }
2846
2848
  },
2847
- [K]
2848
- ), we = $(
2849
+ [G]
2850
+ ), we = L(
2849
2851
  (b, M) => {
2850
- b.length === 0 && !M || (h({ elements: b, areaBbox: M }), R(b[0] ?? null));
2852
+ b.length === 0 && !M || (u({ elements: b, areaBbox: M }), $(b[0] ?? null));
2851
2853
  },
2852
2854
  []
2853
- ), De = $(
2855
+ ), Pe = L(
2854
2856
  (b) => {
2855
- if (!(!l || p !== "annotate" || Ie(b.target))) {
2856
- if (F) {
2857
- U(
2857
+ if (!(!l || f !== "annotate" || Ie(b.target))) {
2858
+ if (O) {
2859
+ W(
2858
2860
  (M) => M && { ...M, currentX: b.clientX, currentY: b.clientY }
2859
2861
  );
2860
2862
  return;
2861
2863
  }
2862
- m !== "area" && E(vt(b.clientX, b.clientY));
2864
+ h !== "area" && E(xt(b.clientX, b.clientY));
2863
2865
  }
2864
2866
  },
2865
- [l, p, F, m]
2866
- ), Oe = $(
2867
+ [l, f, O, h]
2868
+ ), De = L(
2867
2869
  (b) => {
2868
- !l || p !== "annotate" || Ie(b.target) || m !== "area" || b.button !== 0 || (b.preventDefault(), b.stopPropagation(), U({
2870
+ !l || f !== "annotate" || Ie(b.target) || h !== "area" || b.button !== 0 || (b.preventDefault(), b.stopPropagation(), W({
2869
2871
  startX: b.clientX,
2870
2872
  startY: b.clientY,
2871
2873
  currentX: b.clientX,
2872
2874
  currentY: b.clientY
2873
- }), h(null));
2875
+ }), u(null));
2874
2876
  },
2875
- [l, p, m]
2876
- ), Fe = $(() => {
2877
- if (!F) return;
2878
- const b = Nt(F);
2879
- if (U(null), b.width < 8 || b.height < 8) return;
2880
- const M = sn(b, Ze);
2877
+ [l, f, h]
2878
+ ), Oe = L(() => {
2879
+ if (!O) return;
2880
+ const b = Nt(O);
2881
+ if (W(null), b.width < 8 || b.height < 8) return;
2882
+ const M = ln(b, Ze);
2881
2883
  we(M, b);
2882
- }, [F, we]), Be = $(
2884
+ }, [O, we]), Fe = L(
2883
2885
  (b) => {
2884
- if (!l || p !== "annotate" || Ie(b.target) || m === "area") return;
2886
+ if (!l || f !== "annotate" || Ie(b.target) || h === "area") return;
2885
2887
  b.preventDefault(), b.stopPropagation();
2886
- const M = vt(b.clientX, b.clientY);
2888
+ const M = xt(b.clientX, b.clientY);
2887
2889
  if (!M) return;
2888
- if (b.shiftKey || m === "multi") {
2889
- I((te) => te.includes(M) ? te.filter((B) => B !== M) : [...te, M]), R(M);
2890
+ if (b.shiftKey || h === "multi") {
2891
+ I((te) => te.includes(M) ? te.filter((F) => F !== M) : [...te, M]), $(M);
2890
2892
  return;
2891
2893
  }
2892
- const J = x.length > 0 ? x : [M];
2894
+ const J = y.length > 0 ? y : [M];
2893
2895
  we(J.includes(M) ? J : [M]);
2894
2896
  },
2895
- [l, p, m, x, we]
2897
+ [l, f, h, y, we]
2896
2898
  );
2897
2899
  _(() => {
2898
- !z || j !== "all-instances" || Ct(z) <= 1 && ie("this-instance");
2899
- }, [z, j]), _(() => {
2900
+ !B || K !== "all-instances" || Mt(B) <= 1 && re("this-instance");
2901
+ }, [B, K]), _(() => {
2900
2902
  if (l)
2901
- return document.addEventListener("mousemove", De, !0), document.addEventListener("mousedown", Oe, !0), document.addEventListener("mouseup", Fe, !0), document.addEventListener("click", Be, !0), () => {
2902
- document.removeEventListener("mousemove", De, !0), document.removeEventListener("mousedown", Oe, !0), document.removeEventListener("mouseup", Fe, !0), document.removeEventListener("click", Be, !0);
2903
+ return document.addEventListener("mousemove", Pe, !0), document.addEventListener("mousedown", De, !0), document.addEventListener("mouseup", Oe, !0), document.addEventListener("click", Fe, !0), () => {
2904
+ document.removeEventListener("mousemove", Pe, !0), document.removeEventListener("mousedown", De, !0), document.removeEventListener("mouseup", Oe, !0), document.removeEventListener("click", Fe, !0);
2903
2905
  };
2904
- }, [l, De, Oe, Fe, Be]);
2905
- const Vt = $(
2906
+ }, [l, Pe, De, Oe, Fe]);
2907
+ const Ut = L(
2906
2908
  (b, M) => {
2907
- if (!L || !b.trim()) return;
2908
- const { elements: J, areaBbox: te } = L;
2909
+ if (!S || !b.trim()) return;
2910
+ const { elements: J, areaBbox: te } = S;
2909
2911
  if (J.length === 0 && !te) return;
2910
- const xe = dr({
2912
+ const ye = da({
2911
2913
  elements: J,
2912
2914
  note: b,
2913
2915
  areaBbox: te
2914
2916
  });
2915
- S((B) => [...B, xe]), ee(!1), oe(!1), M ? (h(null), R(null)) : (h(null), R(null), I([]));
2917
+ z((F) => [...F, ye]), ee(!1), oe(!1), M ? (u(null), $(null)) : (u(null), $(null), I([]));
2916
2918
  },
2917
- [L, S]
2918
- ), Wt = $(() => {
2919
- h(null), R(null);
2920
- }, []), Qe = $(
2919
+ [S, z]
2920
+ ), Wt = L(() => {
2921
+ u(null), $(null);
2922
+ }, []), Qe = L(
2921
2923
  async (b) => {
2922
- const M = ln(y);
2923
- await he(M, "Copied all!", { copyAllFrom: b });
2924
+ const M = pn(v);
2925
+ await ue(M, "Copied all!", { copyAllFrom: b });
2924
2926
  },
2925
- [y, he]
2926
- ), Ut = $(
2927
+ [v, ue]
2928
+ ), Yt = L(
2927
2929
  async (b) => {
2928
- const M = y.find((J) => J.id === b);
2929
- M && await he(cn(M), "Copied!", { entryId: b });
2930
+ const M = v.find((J) => J.id === b);
2931
+ M && await ue(cn(M), "Copied!", { entryId: b });
2930
2932
  },
2931
- [y, he]
2932
- ), Yt = $(
2933
+ [v, ue]
2934
+ ), jt = L(
2933
2935
  async (b) => {
2934
2936
  const M = [];
2935
- for (const [B, Z] of b)
2936
- for (const [de, ne] of Z)
2937
- ne.length > 0 && M.push([B, de, ne]);
2937
+ for (const [F, Z] of b)
2938
+ for (const [ce, ne] of Z)
2939
+ ne.length > 0 && M.push([F, ce, ne]);
2938
2940
  if (M.length === 0) return { applied: !1 };
2939
2941
  if (s) {
2940
- for (const [B, Z, de] of M) {
2942
+ for (const [F, Z, ce] of M) {
2941
2943
  if (Z === "normal") continue;
2942
- const ne = Lr(B);
2943
- for (const Ne of de)
2944
- B.style.removeProperty(Ne.property), Er(ne, Z, Ne.property, Ne.newValue);
2944
+ const ne = Ia(F);
2945
+ for (const ke of ce)
2946
+ F.style.removeProperty(ke.property), Ta(ne, Z, ke.property, ke.newValue);
2945
2947
  }
2946
- for (const [B, Z, de] of M)
2948
+ for (const [F, Z, ce] of M)
2947
2949
  if (Z === "normal")
2948
- for (const ne of de)
2949
- B.style.setProperty(ne.property, ne.newValue);
2950
- return K("Change applied"), { applied: !0, skipRevert: !0 };
2950
+ for (const ne of ce)
2951
+ F.style.setProperty(ne.property, ne.newValue);
2952
+ return G("Change applied"), { applied: !0, skipRevert: !0 };
2951
2953
  }
2952
- const J = r ?? c ?? void 0, te = [];
2953
- for (const [B, Z, de] of M) {
2954
- const ne = Ge(B), Ne = {
2954
+ const J = a ?? p ?? void 0, te = [];
2955
+ for (const [F, Z, ce] of M) {
2956
+ const ne = Xe(F), ke = {
2955
2957
  schemaVersion: 1,
2956
- elementSelector: Mt(B, j),
2958
+ elementSelector: At(F, K),
2957
2959
  sourceFile: ne.sourceFile,
2958
2960
  lineNumber: ne.lineNumber,
2959
- targetScope: j,
2961
+ targetScope: K,
2960
2962
  state: Z,
2961
- stylingSystem: kt(B),
2962
- changes: de
2963
+ stylingSystem: Ct(F),
2964
+ changes: ce
2963
2965
  };
2964
- te.push(await Zn(Ne, { applyEndpoint: J, onApply: o }));
2966
+ te.push(await Qn(ke, { applyEndpoint: J, onApply: o }));
2965
2967
  }
2966
- const xe = te.every(
2967
- (B) => B.mode === "mcp" && B.result.success && B.result.linesChanged.length > 0
2968
+ const ye = te.every(
2969
+ (F) => F.mode === "mcp" && F.result.success && F.result.linesChanged.length > 0
2968
2970
  );
2969
- return K(xe ? "Change applied" : "Apply failed"), te.forEach((B, Z) => {
2970
- B.mode === "error" ? console.error(`[pixelagent] Apply #${Z} failed:`, B.message) : B.mode === "clipboard" ? console.warn(`[pixelagent] Apply #${Z} fell back to clipboard`) : B.mode === "mcp" && !B.result.success && console.warn(`[pixelagent] Apply #${Z} reported no changes:`, B.result);
2971
- }), { applied: xe };
2971
+ return G(ye ? "Change applied" : "Apply failed"), te.forEach((F, Z) => {
2972
+ F.mode === "error" ? console.error(`[pixelagent] Apply #${Z} failed:`, F.message) : F.mode === "clipboard" ? console.warn(`[pixelagent] Apply #${Z} fell back to clipboard`) : F.mode === "mcp" && !F.result.success && console.warn(`[pixelagent] Apply #${Z} reported no changes:`, F.result);
2973
+ }), { applied: ye };
2972
2974
  },
2973
- [j, r, c, o, s, K]
2975
+ [K, a, p, o, s, G]
2974
2976
  ), et = (b) => {
2975
- a.setSettingsOpen(!1), f(!0), v(b), R(null), E(null), h(null), I([]), U(null), b === "annotate" && ee(!1);
2977
+ i.setSettingsOpen(!1), g(!0), x(b), $(null), E(null), u(null), I([]), W(null), b === "annotate" && ee(!1);
2976
2978
  }, Xt = () => {
2977
- f(!1), v("idle"), R(null), E(null), h(null), I([]), U(null), ee(!1), oe(!1);
2978
- }, Gt = F ? Nt(F) : null;
2979
- return /* @__PURE__ */ d(
2979
+ g(!1), x("idle"), $(null), E(null), u(null), I([]), W(null), ee(!1), oe(!1);
2980
+ }, Gt = O ? Nt(O) : null;
2981
+ return /* @__PURE__ */ c(
2980
2982
  "div",
2981
2983
  {
2982
- ref: ae,
2984
+ ref: ie,
2983
2985
  className: "pa-root",
2984
2986
  "data-pixelagent-root": !0,
2985
- ...a.rootAttributes,
2987
+ ...i.rootAttributes,
2986
2988
  children: [
2987
2989
  /* @__PURE__ */ n(
2988
- Mr,
2990
+ Aa,
2989
2991
  {
2990
- rootAttributes: a.rootAttributes,
2991
- hostTheme: a.hostTheme,
2992
- chrome: a.chrome,
2993
- settingsOpen: a.settingsOpen,
2994
- onToggleSettings: a.toggleSettings,
2995
- onCloseSettings: () => a.setSettingsOpen(!1),
2996
- onToggleHostTheme: a.toggleHostTheme,
2992
+ rootAttributes: i.rootAttributes,
2993
+ hostTheme: i.hostTheme,
2994
+ chrome: i.chrome,
2995
+ settingsOpen: i.settingsOpen,
2996
+ onToggleSettings: i.toggleSettings,
2997
+ onCloseSettings: () => i.setSettingsOpen(!1),
2998
+ onToggleHostTheme: i.toggleHostTheme,
2997
2999
  active: l,
2998
- mode: p,
2999
- captureMode: m,
3000
- annotationCount: y.length,
3001
- multiSelectCount: x.length,
3002
- copyStatus: P,
3003
- copyAllFrom: O,
3000
+ mode: f,
3001
+ captureMode: h,
3002
+ annotationCount: v.length,
3003
+ multiSelectCount: y.length,
3004
+ copyStatus: R,
3005
+ copyAllFrom: D,
3004
3006
  onActivateAnnotate: () => et("annotate"),
3005
3007
  onActivateEdit: () => et("edit"),
3006
3008
  onDeactivate: Xt,
3007
3009
  onCopyAll: () => Qe("toolbar"),
3008
- onCaptureModeChange: g,
3010
+ onCaptureModeChange: m,
3009
3011
  onConfirmMultiSelect: () => {
3010
- x.length > 0 && we(x);
3012
+ y.length > 0 && we(y);
3011
3013
  }
3012
3014
  }
3013
3015
  ),
3014
- l && p === "annotate" && /* @__PURE__ */ d(q, { children: [
3016
+ l && f === "annotate" && /* @__PURE__ */ c(q, { children: [
3015
3017
  /* @__PURE__ */ n(
3016
- Et,
3018
+ It,
3017
3019
  {
3018
- element: N,
3019
- selected: z,
3020
- multiSelected: x
3020
+ element: k,
3021
+ selected: B,
3022
+ multiSelected: y
3021
3023
  }
3022
3024
  ),
3023
- /* @__PURE__ */ n(fr, { annotations: y }),
3024
- /* @__PURE__ */ n(cr, { area: Gt, isDragging: !!F })
3025
+ /* @__PURE__ */ n(ha, { annotations: v }),
3026
+ /* @__PURE__ */ n(ca, { area: Gt, isDragging: !!O })
3025
3027
  ] }),
3026
- l && p === "annotate" && L && /* @__PURE__ */ n(
3027
- lr,
3028
+ l && f === "annotate" && S && /* @__PURE__ */ n(
3029
+ pa,
3028
3030
  {
3029
- elements: L.elements,
3030
- areaBbox: L.areaBbox,
3031
- onSubmit: Vt,
3031
+ elements: S.elements,
3032
+ areaBbox: S.areaBbox,
3033
+ onSubmit: Ut,
3032
3034
  onCancel: Wt
3033
3035
  }
3034
3036
  ),
3035
- l && p === "edit" && /* @__PURE__ */ n(
3036
- Jn,
3037
+ l && f === "edit" && /* @__PURE__ */ n(
3038
+ Zn,
3037
3039
  {
3038
- selectedElement: z,
3039
- hoveredElement: N,
3040
- onSelectElement: R,
3040
+ selectedElement: B,
3041
+ hoveredElement: k,
3042
+ onSelectElement: $,
3041
3043
  onHoverElement: E,
3042
- targetScope: j,
3043
- onTargetScopeChange: ie,
3044
- elementState: ce,
3044
+ targetScope: K,
3045
+ onTargetScopeChange: re,
3046
+ elementState: pe,
3045
3047
  onElementStateChange: C,
3046
- onApply: Yt,
3047
- applyStatus: p === "edit" ? P : null,
3048
+ onApply: jt,
3049
+ applyStatus: f === "edit" ? R : null,
3048
3050
  isToolbarTarget: Ie
3049
3051
  }
3050
3052
  ),
3051
- W && /* @__PURE__ */ n(
3052
- mr,
3053
+ U && /* @__PURE__ */ n(
3054
+ ma,
3053
3055
  {
3054
- annotations: y,
3055
- collapsed: re,
3056
+ annotations: v,
3057
+ collapsed: ae,
3056
3058
  onToggleCollapsed: () => oe((b) => !b),
3057
3059
  onClose: () => {
3058
3060
  ee(!0), oe(!1);
3059
3061
  },
3060
3062
  onCopyAll: () => Qe("session"),
3061
- onCopyOne: Ut,
3062
- onRemove: k,
3063
+ onCopyOne: Yt,
3064
+ onRemove: N,
3063
3065
  onUpdate: w,
3064
- copyStatus: P,
3066
+ copyStatus: R,
3065
3067
  copiedEntryId: T,
3066
- copyAllFrom: O
3068
+ copyAllFrom: D
3067
3069
  }
3068
3070
  )
3069
3071
  ]
3070
3072
  }
3071
3073
  );
3072
3074
  }
3073
- function Rr() {
3075
+ function Pa() {
3074
3076
  return typeof process < "u" && process.env.NODE_ENV !== "production";
3075
3077
  }
3076
- function Fr() {
3077
- return Rr() ? /* @__PURE__ */ n(Ir, {}) : null;
3078
+ function _a() {
3079
+ return Pa() ? /* @__PURE__ */ n(Ra, {}) : null;
3078
3080
  }
3079
3081
  export {
3080
- Ir as PixelAgent,
3081
- Fr as PixelAgentDev,
3082
- Rr as isDevEnvironment
3082
+ Ra as PixelAgent,
3083
+ _a as PixelAgentDev,
3084
+ Pa as isDevEnvironment
3083
3085
  };
3084
3086
  //# sourceMappingURL=pixelagent.js.map