kaizen-agent 1.87.2 → 1.87.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli/browser.ts +21 -0
- package/cli/chatgpt.ts +1 -1
- package/cli/dashboard.ts +1 -1
- package/cli/models.ts +94 -0
- package/cli/sources.ts +84 -20
- package/cli/state.ts +2 -2
- package/cli/task-service.ts +2 -0
- package/cli/web.ts +31 -6
- package/package.json +1 -1
- package/web/components/home/home-window.tsx +0 -36
- package/web/components/icebox/capture-box.tsx +11 -2
- package/web/components/icebox/request-card.tsx +33 -11
- package/web/components/rail/rail-list.tsx +43 -1
- package/web/components/settings/setting-row.tsx +8 -5
- package/web/components/settings/settings-section.tsx +5 -3
- package/web/components/shared/picker.tsx +21 -1
- package/web/dist/annotate.js +1 -1
- package/web/dist/board.css +5 -10
- package/web/dist/board.js +57 -55
- package/web/dist/boot.js +1 -1
- package/web/dist/notebook.css +2 -2
- package/web/dist/notebook.js +34 -34
- package/web/dist/popup.css +1 -1
- package/web/dist/popup.js +1 -1
- package/web/dist/term.js +1 -1
- package/web/dist/ui.css +2 -2
- package/web/dist/video.js +1 -1
- package/web/lib/icebox/icebox-actions.ts +24 -2
- package/web/lib/icebox/icebox-store.ts +7 -1
- package/web/lib/icebox/icebox-view.ts +3 -2
- package/web/lib/icebox/icebox.ts +24 -4
- package/web/lib/icebox/use-ice-keys.ts +5 -0
- package/web/lib/rail/rules.ts +4 -1
- package/web/lib/settings/index.ts +1 -0
- package/web/lib/settings/settings-actions.ts +8 -0
- package/web/lib/settings/settings.ts +0 -3
- package/web/lib/settings/use-model-choices.ts +31 -0
- package/web/pages/board/App.tsx +1 -9
- package/web/pages/icebox-page.tsx +173 -125
- package/web/ui/legacy/board.css +3 -8
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
hostOf,
|
|
4
4
|
hue,
|
|
5
5
|
iceKey,
|
|
6
|
+
linkImage,
|
|
6
7
|
isLive,
|
|
7
8
|
short,
|
|
8
9
|
srcName,
|
|
@@ -20,12 +21,14 @@ import { RequestBadges } from "./request-badges.tsx";
|
|
|
20
21
|
import { RequestImages } from "./request-images.tsx";
|
|
21
22
|
|
|
22
23
|
// A card: what it is, the words, where it sits, how old. A link leads with its title and summary, coloured from the
|
|
23
|
-
// site's name
|
|
24
|
+
// site's name, over the page's own preview picture when it named one (the browser loads that from the site's server,
|
|
25
|
+
// without a referrer). Opening it shows it in the Sort list.
|
|
24
26
|
export function RequestCard({ item, ctx }: { item: IceItem; ctx: RowCtx }) {
|
|
25
27
|
const k = iceKey(item),
|
|
26
28
|
cur = ctx.cur === k,
|
|
27
29
|
lk = item.link && /^https?:\/\//i.test(item.link.url) ? item.link : null,
|
|
28
|
-
site = lk ? hostOf(lk.url).replace(/^www\./, "") : ""
|
|
30
|
+
site = lk ? hostOf(lk.url).replace(/^www\./, "") : "",
|
|
31
|
+
img = lk ? linkImage(lk) : "";
|
|
29
32
|
return (
|
|
30
33
|
<article
|
|
31
34
|
data-cur={cur || undefined}
|
|
@@ -38,12 +41,26 @@ export function RequestCard({ item, ctx }: { item: IceItem; ctx: RowCtx }) {
|
|
|
38
41
|
href={webUrl(lk.url)}
|
|
39
42
|
target="_blank"
|
|
40
43
|
rel="noopener noreferrer"
|
|
44
|
+
data-img={img || undefined}
|
|
41
45
|
style={{ "--h": hue(site) } as React.CSSProperties}
|
|
42
|
-
className="group/lk flex min-h-[88px] flex-col justify-end gap-[3px] rounded-t-lg bg-[hsl(var(--h)_42%_40%)] px-3 pb-2.5 pt-3.5 text-white"
|
|
46
|
+
className="group/lk relative flex min-h-[88px] data-[img]:min-h-[160px] flex-col justify-end gap-[3px] overflow-hidden rounded-t-lg bg-[hsl(var(--h)_42%_40%)] px-3 pb-2.5 pt-3.5 text-white"
|
|
43
47
|
>
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
48
|
+
{img && (
|
|
49
|
+
<>
|
|
50
|
+
<img
|
|
51
|
+
src={img}
|
|
52
|
+
alt=""
|
|
53
|
+
loading="lazy"
|
|
54
|
+
referrerPolicy="no-referrer"
|
|
55
|
+
onError={(e) => (e.currentTarget.hidden = true)}
|
|
56
|
+
className="absolute inset-0 h-full w-full object-cover"
|
|
57
|
+
/>
|
|
58
|
+
<span aria-hidden className="absolute inset-0 bg-gradient-to-t from-black/75 via-black/25 to-transparent" />
|
|
59
|
+
</>
|
|
60
|
+
)}
|
|
61
|
+
<b className="relative break-words text-base leading-[1.35] group-hover/lk:underline">{lk.title || site}</b>
|
|
62
|
+
{lk.summary && <span className="relative line-clamp-2 text-sm leading-[1.4] opacity-90">{lk.summary}</span>}
|
|
63
|
+
<small className="relative text-xs opacity-85">{site}</small>
|
|
47
64
|
</a>
|
|
48
65
|
)}
|
|
49
66
|
<div className="flex flex-col gap-2 px-3 pb-2.5 pt-3">
|
|
@@ -67,7 +84,7 @@ export function RequestCard({ item, ctx }: { item: IceItem; ctx: RowCtx }) {
|
|
|
67
84
|
>
|
|
68
85
|
{item.text}
|
|
69
86
|
</button>
|
|
70
|
-
<RequestImages item={item} card />
|
|
87
|
+
{!img && <RequestImages item={item} card />}
|
|
71
88
|
<div className="flex flex-wrap items-center gap-1.5 text-sm text-muted-foreground">
|
|
72
89
|
{item.board && <span className="text-foreground">{item.board}</span>}
|
|
73
90
|
{(item.tags || []).map((t) => (
|
|
@@ -82,9 +99,14 @@ export function RequestCard({ item, ctx }: { item: IceItem; ctx: RowCtx }) {
|
|
|
82
99
|
</span>
|
|
83
100
|
)}
|
|
84
101
|
<span className="flex-1" />
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
{
|
|
102
|
+
{/* A long source name (a search's words) is cut to the card; its age always shows. */}
|
|
103
|
+
<span className="flex min-w-0 max-w-full items-center gap-1 tabular-nums">
|
|
104
|
+
{item.source !== "manual" && (
|
|
105
|
+
<span className="min-w-0 truncate" title={srcName(ctx.list, item)}>
|
|
106
|
+
{srcName(ctx.list, item)} ·
|
|
107
|
+
</span>
|
|
108
|
+
)}
|
|
109
|
+
<span className="shrink-0 whitespace-nowrap">{ago(item.at)}</span>
|
|
88
110
|
</span>
|
|
89
111
|
</div>
|
|
90
112
|
</div>
|
|
@@ -92,7 +114,7 @@ export function RequestCard({ item, ctx }: { item: IceItem; ctx: RowCtx }) {
|
|
|
92
114
|
item={item}
|
|
93
115
|
boards={ctx.boards}
|
|
94
116
|
variant="card"
|
|
95
|
-
className="hidden border-t border-[color:color-mix(in_srgb,var(--line)_50%,transparent)] px-1.5 pb-1.5 pt-1 group-focus-within/card:flex group-hover/card:flex
|
|
117
|
+
className="hidden border-t border-[color:color-mix(in_srgb,var(--line)_50%,transparent)] px-1.5 pb-1.5 pt-1 group-focus-within/card:flex group-hover/card:flex [@media(hover:none)]:flex"
|
|
96
118
|
/>
|
|
97
119
|
</article>
|
|
98
120
|
);
|
|
@@ -21,6 +21,7 @@ import {
|
|
|
21
21
|
type RailTask,
|
|
22
22
|
} from "@lib/rail";
|
|
23
23
|
import { useRoute } from "@lib/router";
|
|
24
|
+
import { closeAllHome, homeTabs, showHomeWs, useHomeWs } from "@lib/home";
|
|
24
25
|
import { useRailData, useServer } from "@lib/server";
|
|
25
26
|
import { AgentChips } from "./agent-chips.tsx";
|
|
26
27
|
|
|
@@ -137,6 +138,40 @@ function WsRow({ dir, r, now, current }: { dir: string; r: RailRow; now: number;
|
|
|
137
138
|
);
|
|
138
139
|
}
|
|
139
140
|
|
|
141
|
+
// Home's own terminals (the Home window) while it is minimized: how many are open, a click brings the window back,
|
|
142
|
+
// × closes them all. Open or closed, the window speaks for itself; it opens with Ctrl+Alt+A or a Home row's +.
|
|
143
|
+
function HomeTerms() {
|
|
144
|
+
const h = useHomeWs(),
|
|
145
|
+
n = homeTabs(useServer((x) => x.shells), h.ending).length;
|
|
146
|
+
if (!n || h.st !== "min") return null;
|
|
147
|
+
return (
|
|
148
|
+
<span className="hterm">
|
|
149
|
+
<button
|
|
150
|
+
type="button"
|
|
151
|
+
title={`Home terminals: ${n} open (Ctrl+Alt+A)`}
|
|
152
|
+
aria-label={`Open the Home window, ${n} terminals`}
|
|
153
|
+
onClick={() => showHomeWs("open")}
|
|
154
|
+
>
|
|
155
|
+
<svg aria-hidden="true">
|
|
156
|
+
<use href="#i-term" />
|
|
157
|
+
</svg>
|
|
158
|
+
{n}
|
|
159
|
+
</button>
|
|
160
|
+
<button
|
|
161
|
+
type="button"
|
|
162
|
+
className="hx"
|
|
163
|
+
title="Close the Home terminals"
|
|
164
|
+
aria-label="Close the Home terminals"
|
|
165
|
+
onClick={() => void closeAllHome()}
|
|
166
|
+
>
|
|
167
|
+
<svg viewBox="0 0 24 24" aria-hidden="true">
|
|
168
|
+
<path d="M7 7l10 10M17 7 7 17" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" />
|
|
169
|
+
</svg>
|
|
170
|
+
</button>
|
|
171
|
+
</span>
|
|
172
|
+
);
|
|
173
|
+
}
|
|
174
|
+
|
|
140
175
|
function Group({
|
|
141
176
|
g,
|
|
142
177
|
logo,
|
|
@@ -171,7 +206,13 @@ function Group({
|
|
|
171
206
|
aria-expanded={!g.shut}
|
|
172
207
|
onClick={fold}
|
|
173
208
|
>
|
|
174
|
-
|
|
209
|
+
{g.home ? (
|
|
210
|
+
<svg className="plogo hwsico" aria-hidden="true">
|
|
211
|
+
<use href="#i-home" />
|
|
212
|
+
</svg>
|
|
213
|
+
) : (
|
|
214
|
+
<RailLogo dir={g.dir} name={g.name} logo={logo} />
|
|
215
|
+
)}
|
|
175
216
|
<span className="pname">{g.name}</span>
|
|
176
217
|
<svg className="fchev" viewBox="0 0 24 24" aria-hidden="true">
|
|
177
218
|
<path
|
|
@@ -184,6 +225,7 @@ function Group({
|
|
|
184
225
|
/>
|
|
185
226
|
</svg>
|
|
186
227
|
</button>
|
|
228
|
+
{g.home && <HomeTerms />}
|
|
187
229
|
{g.git && (
|
|
188
230
|
<button
|
|
189
231
|
type="button"
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
saveSetting,
|
|
7
7
|
useSettings,
|
|
8
8
|
controlOf,
|
|
9
|
-
|
|
9
|
+
useModelChoices,
|
|
10
10
|
modelName,
|
|
11
11
|
modelTool,
|
|
12
12
|
rowHint,
|
|
@@ -29,7 +29,8 @@ export function SettingRow({ row, off }: { row: Row; off?: boolean }) {
|
|
|
29
29
|
shown = useSettings((s) => s.local[row.key] ?? row.value),
|
|
30
30
|
id = settingId(row.key),
|
|
31
31
|
kind = controlOf(row),
|
|
32
|
-
model = kind === "model"
|
|
32
|
+
model = kind === "model",
|
|
33
|
+
choices = useModelChoices(modelTool(row.key), model);
|
|
33
34
|
const text = rowHint(row);
|
|
34
35
|
const help: ReactNode =
|
|
35
36
|
row.own && scoped ? (
|
|
@@ -115,10 +116,12 @@ export function SettingRow({ row, off }: { row: Row; off?: boolean }) {
|
|
|
115
116
|
return (
|
|
116
117
|
<span>
|
|
117
118
|
{field}
|
|
118
|
-
{
|
|
119
|
+
{choices.length > 0 && (
|
|
119
120
|
<datalist id={`${id}-dl`}>
|
|
120
|
-
{
|
|
121
|
-
<option key={m} value={m}
|
|
121
|
+
{choices.map((m) => (
|
|
122
|
+
<option key={m.id} value={m.id}>
|
|
123
|
+
{m.name}
|
|
124
|
+
</option>
|
|
122
125
|
))}
|
|
123
126
|
</datalist>
|
|
124
127
|
)}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { recheck, useSettings } from "@lib/settings";
|
|
2
2
|
import type { Section } from "@lib/settings";
|
|
3
3
|
import { Button } from "@web/ui";
|
|
4
4
|
import { SettingsItem } from "./settings-item.tsx";
|
|
@@ -6,6 +6,7 @@ import { SettingsItem } from "./settings-item.tsx";
|
|
|
6
6
|
// A subsection: its name over a rounded box with hairline dividers between rows. A section with no name (Orchestration's
|
|
7
7
|
// picture) draws its rows with no box. Refresh and Re-check read the page again.
|
|
8
8
|
export function SettingsSection({ section }: { section: Section }) {
|
|
9
|
+
const busy = useSettings((s) => s.busy);
|
|
9
10
|
if (!section.title) return section.items.map((i) => <SettingsItem key={i.id} item={i} />);
|
|
10
11
|
return (
|
|
11
12
|
<section className="mt-6 first:mt-0">
|
|
@@ -17,9 +18,10 @@ export function SettingsSection({ section }: { section: Section }) {
|
|
|
17
18
|
variant="ghost"
|
|
18
19
|
size="sm"
|
|
19
20
|
className="text-primary"
|
|
20
|
-
|
|
21
|
+
disabled={busy === section.extra}
|
|
22
|
+
onClick={() => void recheck(section.extra!, section.extra === "refresh" ? "Refreshed" : "Checked again")}
|
|
21
23
|
>
|
|
22
|
-
{section.extra === "refresh" ? "Refresh" : "Re-check"}
|
|
24
|
+
{busy === section.extra ? "Checking…" : section.extra === "refresh" ? "Refresh" : "Re-check"}
|
|
23
25
|
</Button>
|
|
24
26
|
)}
|
|
25
27
|
</h3>
|
|
@@ -2,7 +2,8 @@ import { useState, type ReactNode } from "react";
|
|
|
2
2
|
import { cn } from "@lib/core";
|
|
3
3
|
import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, Icon, Popover, PopoverContent, PopoverTrigger } from "@web/ui";
|
|
4
4
|
|
|
5
|
-
// `group` heads a run of rows (sources under their platform); `icon` leads the row and the button; `count` trails it
|
|
5
|
+
// `group` heads a run of rows (sources under their platform); `icon` leads the row and the button; `count` trails it;
|
|
6
|
+
// `removable` puts a remove button on the row, which calls the Picker's `onRemove`.
|
|
6
7
|
export type PickerOption = {
|
|
7
8
|
value: string;
|
|
8
9
|
label: string;
|
|
@@ -10,6 +11,7 @@ export type PickerOption = {
|
|
|
10
11
|
icon?: ReactNode;
|
|
11
12
|
count?: number;
|
|
12
13
|
search?: string;
|
|
14
|
+
removable?: boolean;
|
|
13
15
|
};
|
|
14
16
|
// A searchable choice (project, source, category, agent): a button showing the choice that opens a list with a
|
|
15
17
|
// search box. The search matches a row's words and its group's; Enter picks the first row left.
|
|
@@ -23,6 +25,7 @@ export function Picker({
|
|
|
23
25
|
groupIcons,
|
|
24
26
|
open: openProp,
|
|
25
27
|
onOpenChange,
|
|
28
|
+
onRemove,
|
|
26
29
|
}: {
|
|
27
30
|
options: PickerOption[];
|
|
28
31
|
value: string;
|
|
@@ -34,6 +37,7 @@ export function Picker({
|
|
|
34
37
|
// Opened from outside (a form that needs a choice before it can send).
|
|
35
38
|
open?: boolean;
|
|
36
39
|
onOpenChange?: (o: boolean) => void;
|
|
40
|
+
onRemove?: (v: string) => void;
|
|
37
41
|
}) {
|
|
38
42
|
const [own, setOwn] = useState(false),
|
|
39
43
|
open = openProp ?? own,
|
|
@@ -55,6 +59,22 @@ export function Picker({
|
|
|
55
59
|
<span className="min-w-0 flex-1 truncate">{o.label}</span>
|
|
56
60
|
{o.count != null && <i className="text-xs not-italic tabular-nums text-muted-foreground">{o.count}</i>}
|
|
57
61
|
{o.value === value && <Icon name="check" className="size-3.5 text-primary" />}
|
|
62
|
+
{o.removable && onRemove && (
|
|
63
|
+
<button
|
|
64
|
+
type="button"
|
|
65
|
+
aria-label={`Remove ${o.label}`}
|
|
66
|
+
title={`Remove ${o.label}`}
|
|
67
|
+
onPointerDown={(e) => e.stopPropagation()}
|
|
68
|
+
onClick={(e) => {
|
|
69
|
+
e.stopPropagation();
|
|
70
|
+
setOpen(false);
|
|
71
|
+
onRemove(o.value);
|
|
72
|
+
}}
|
|
73
|
+
className="-mr-1 grid size-5 place-items-center rounded-xs text-muted-foreground opacity-60 hover:bg-muted hover:text-foreground hover:opacity-100"
|
|
74
|
+
>
|
|
75
|
+
<Icon name="x" className="size-3" />
|
|
76
|
+
</button>
|
|
77
|
+
)}
|
|
58
78
|
</CommandItem>
|
|
59
79
|
);
|
|
60
80
|
const groups = [...new Set(options.map((o) => o.group).filter((g): g is string => !!g))];
|
package/web/dist/annotate.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* kaizen annotator page script
|
|
1
|
+
/* kaizen annotator page script 5d70282a1fae9198 -- generated by bun run build:web from web/annotate/annotate.ts; do not edit */
|
|
2
2
|
(()=>{var Z=(o)=>o.length<24&&!/\d{3,}|^css-|^_|^sc-|^jsx-/.test(o),dt=(o)=>{let i=Math.min(...o.map((f)=>f.left)),d=Math.min(...o.map((f)=>f.top)),u=Math.max(...o.map((f)=>f.right)),b=Math.max(...o.map((f)=>f.bottom));return{left:i,top:d,right:u,bottom:b,width:u-i,height:b-d}},tt=(o)=>{let i=Math.min(o.x0,o.x1),d=Math.min(o.y0,o.y1),u=Math.abs(o.x1-o.x0),b=Math.abs(o.y1-o.y0);return{left:i,top:d,width:u,height:b,right:i+u,bottom:d+b}},pt=(o)=>o.width>=8&&o.height>=8,ut=(o,i)=>o.width>=4&&o.height>=4&&o.left>=i.left-1&&o.top>=i.top-1&&o.right<=i.right+1&&o.bottom<=i.bottom+1,mt=20,ft=(o,i)=>{let d=o.replace(/\s+/g," ").trim();return d?`"${d.slice(0,60)}${d.length>60?"…":""}"`:i},gt=(o,i)=>`area ${Math.round(o.width)}x${Math.round(o.height)} (${i} elements)`,ht=(o,i,d)=>({left:Math.max(8,Math.min(i-316,o.left)),top:o.bottom+330<d?Math.min(o.bottom+8,d-200):Math.max(8,o.top-190)}),xt=(o,i)=>({left:Math.min(i-12,o.left+o.width),top:Math.max(12,o.top)}),bt=(o,i,d)=>({left:Math.max(8,Math.min(i-268,o.left)),top:Math.min(o.top+o.height+8,d-90)}),yt=(o,i,d,u)=>({kind:o.kind,comment:d.comment,intent:d.intent,severity:d.severity,selector:i.selector,items:o.count>1?i.items:[],path:i.path,text:i.text.slice(0,200),tag:i.tag,url:i.url,box:`${Math.round(o.rect.left+u.x)},${Math.round(o.rect.top+u.y)} ${Math.round(o.rect.width)}x${Math.round(o.rect.height)}`,pb:{x:o.rect.left+u.x,y:o.rect.top+u.y,w:o.rect.width,h:o.rect.height},page:i.page,attrs:i.attrs,styles:i.styles,nearby:i.nearby,selected:o.selected||"",source:i.source,components:i.components});var wt=1500,kt=1300000,et=(o)=>o.width>2400||o.height>2400,vt=(o,i)=>{if(o.width<2||o.height<2||et(o))return null;let d=Math.ceil(o.width),u=Math.ceil(o.height),b=Math.max(0,i.left-o.left),f=Math.max(0,i.top-o.top),l=Math.min(d-b,i.width),C=Math.min(u-f,i.height);return l<2||C<2?null:{w:d,h:u,sx:b,sy:f,sw:l,sh:C}},Et=(o,i,d)=>{let u=[];for(let b=Math.min(2,d||1);b>=0.5;b-=0.5)u.push(Math.min(b,1600/Math.max(o,i)));return u};(()=>{let o=window,i=window.parent!==window||o.__kzHost===!0;if(o.__kzAnnotate||!i)return;o.__kzAnnotate=!0;let d=document.currentScript,u=typeof o.__kzAnnToken==="string"?o.__kzAnnToken:"";if(!u)try{u=new URL(d.src).searchParams.get("t")||""}catch{}let b=window.parent,f=(e)=>b.postMessage({kz:1,t:u,out:1,...e},"*"),l={on:!1,mode:"element",hide:!1,block:!0,color:"#3c82f7",components:!0},C=[],g=null,y=[],E=null,U=!1,j=[],I=[],F=[],nt=window.requestAnimationFrame.bind(window);window.requestAnimationFrame=(e)=>U?(F.push(e),F.length):nt(e);let H=document.createElement("style");H.textContent="*,*::before,*::after{animation-play-state:paused!important;transition:none!important}";function At(e){if(e===U)return;if(U=e,e){document.documentElement.append(H);try{j=document.getAnimations().filter((t)=>t.playState==="running"),j.forEach((t)=>t.pause())}catch{}I=[...document.querySelectorAll("video,audio")].filter((t)=>!t.paused),I.forEach((t)=>t.pause())}else H.remove(),j.forEach((t)=>{try{t.play()}catch{}}),I.forEach((t)=>t.play().catch(()=>{})),j=[],I=[],F.splice(0).forEach((t)=>nt(t))}let z=(e)=>window.CSS&&CSS.escape?CSS.escape(e):e.replace(/[^\w-]/g,"\\$&"),D=(e)=>{try{return document.querySelectorAll(e).length===1}catch{return!1}};function ot(e){if(e.id&&D("#"+z(e.id)))return"#"+z(e.id);let t=e.getAttribute("data-testid");if(t&&D(`[data-testid="${t.replace(/"/g,"\\\"")}"]`))return`[data-testid="${t.replace(/"/g,"\\\"")}"]`;let n=[];for(let r=e;r&&r.nodeType===1&&r!==document.documentElement;r=r.parentElement){let s=r.tagName.toLowerCase();if(r.id){if(n.unshift("#"+z(r.id)),D(n.join(" > ")))break;n.shift()}let c=[...r.classList].filter(Z).slice(0,2);if(c.length)s+=c.map((w)=>"."+z(w)).join("");let p=r.parentElement?[...r.parentElement.children].filter((w)=>w.tagName===r.tagName):[];if(p.length>1&&!(c.length&&r.parentElement.querySelectorAll(":scope > "+s).length===1))s+=`:nth-of-type(${p.indexOf(r)+1})`;if(n.unshift(s),D(n.join(" > ")))break}return n.join(" > ")}let Ct=(e)=>{let t=[];for(let n=e;n&&n.nodeType===1;n=n.parentElement)t.unshift(n.tagName.toLowerCase()+(n.id?"#"+n.id:""));return t.join(" > ")},K=(e)=>e.tagName.toLowerCase()+(e.id?"#"+e.id:"")+[...e.classList].filter(Z).slice(0,2).map((t)=>"."+t).join(""),Y=(e)=>(e.innerText||e.textContent||e.getAttribute("aria-label")||e.getAttribute("alt")||"").replace(/\s+/g," ").trim(),_t=["id","class","role","aria-label","href","type","name","placeholder","alt","data-testid"],St=(e)=>_t.filter((t)=>e.hasAttribute(t)).map((t)=>`${t}="${e.getAttribute(t).slice(0,80)}"`).join(" "),Rt=["color","background-color","font-family","font-size","font-weight","line-height","padding","margin","display","position","border-radius","width","height"],Mt=(e)=>{let t=getComputedStyle(e);return Rt.map((n)=>`${n}: ${t.getPropertyValue(n)}`).join("; ")};function $t(e){let t="",n=[];for(let r=e,s=0;r&&r.nodeType===1&&s<14;r=r.parentElement,s++){let c=r.getAttribute("data-astro-source-file");if(c&&!t)t=c+(r.getAttribute("data-astro-source-loc")?":"+r.getAttribute("data-astro-source-loc").replace(/:/,":"):"");let p=r.__svelte_meta&&r.__svelte_meta.loc;if(p&&!t)t=`${p.file}:${p.line}`;let w=r.__vueParentComponent;for(let a=w,v=0;a&&v<6;a=a.parent,v++){let m=a.type&&(a.type.name||a.type.__name);if(m&&!n.includes(m))n.push(m);if(a.type&&a.type.__file&&!t)t=a.type.__file}if(r.__vue__&&r.__vue__.$options){let a=r.__vue__.$options;if(a.name&&!n.includes(a.name))n.push(a.name);if(a.__file&&!t)t=a.__file}let P=Object.keys(r).find((a)=>a.startsWith("__reactFiber$"));if(P)for(let a=r[P],v=0;a&&v<40;a=a.return,v++){if(a._debugSource&&!t)t=`${a._debugSource.fileName}:${a._debugSource.lineNumber}`;let m=a.type;if(typeof m==="function"||m&&typeof m==="object"){let S=m.displayName||m.name||m.render&&m.render.name||"";if(S&&!n.includes(S)&&n.length<8)n.push(S)}}if(t&&n.length)break}return{source:t,components:n.reverse().join(" > ")}}let M=document.createElement("div");M.style.cssText="all:initial;position:fixed;inset:0;z-index:2147483647;pointer-events:none";let Tt=M.attachShadow({mode:"closed"}),rt=document.createElement("style");rt.textContent=`
|
|
3
3
|
*{box-sizing:border-box;font:12px/1.4 system-ui,sans-serif}
|
|
4
4
|
.b{position:fixed;pointer-events:none;border:2px solid var(--c);background:color-mix(in srgb,var(--c) 14%,transparent);border-radius:2px}
|