dsh-code-server-app 0.2.1 → 0.2.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/README.en.md +93 -27
- package/README.md +83 -26
- package/cordis.patch.yml +5 -3
- package/lib/client.js +3 -2
- package/lib/index.js +61 -8
- package/package.json +3 -4
- package/vendor/VENDOR.json +1 -1
package/README.en.md
CHANGED
|
@@ -12,19 +12,64 @@
|
|
|
12
12
|
|
|
13
13
|
A static profile plugin (npm package with host + client bundle) that ships the **VS Code server tree** from a [code-server](https://github.com/coder/code-server) release as a **platform-independent dependency package** (pack-time artifact `vendor/vscode` → `@jinsiyu/dshcs-vscode-server`, no install scripts, no postinstall). The code-server **Node service layer is replaced by the plugin's own `lib/launcher.mjs`**: it drives `<tree>/lib/vscode/out/server-main.js` (`loadCodeWithNls()` / `createServer()` / `handleRequest()` / `handleUpgrade()`) directly and re-adds the few HTTP endpoints code-server used to provide (`/healthz`, `/manifest.json`, `/_static/*`, `/proxy/:port`). The 16 native modules (node-pty / @vscode/sqlite3 / spdlog / …) come from `@jinsiyu/dshcs-*-win32-<arch>` platform packages selected automatically per architecture by the platform aggregator. VS Code's inner dependencies and the prebuilt native modules are **all installed by the package manager together with the plugin** — no global npm install, no `bin` configuration, no profile config changes, no second install command, **no argon2/C++ toolchain**.
|
|
14
14
|
|
|
15
|
-
## UI carrier
|
|
15
|
+
## UI carrier and required DSH version (0.2.3: right-sidebar DSH only)
|
|
16
16
|
|
|
17
17
|
| DSH version | Carrier | Entry points |
|
|
18
18
|
|---|---|---|
|
|
19
|
-
| **>= 0.1.5-alpha.1** (has `sidebarRight` / `sidebarRightTabs`) | **Right-sidebar tab** (kind `code-server`, chip `Code Server`)
|
|
20
|
-
| older (no sidebar service) |
|
|
21
|
-
|
|
22
|
-
- Detection: `ctx.
|
|
19
|
+
| **>= 0.1.5-alpha.1** (has `sidebarRight` / `sidebarRightTabs`) | **Right-sidebar tab** (kind `code-server`, chip `Code Server`) | ① the **Code Server box** on the sidebar's guide ("开始") page; ② the icon button beside each turn's artifacts; ③ Settings → Plugins → Code Server → **"Open in right sidebar"** |
|
|
20
|
+
| older (no sidebar service) | **Unsupported**: nothing but one notice on the settings page | none (Settings → Plugins → Code Server shows an upgrade notice) |
|
|
21
|
+
|
|
22
|
+
- Detection: first a synchronous `ctx.get('sidebarRightTabs') / ctx.get('sidebarRight')` probe; because the services may come up after this plugin, `ctx.inject(['sidebarRightTabs','sidebarRight'], …)` is awaited and a **2.5 s timeout marks the DSH as legacy** (no version comparison, and the plugin's own activation is never blocked).
|
|
23
|
+
- **0.2.3 dropped legacy-DSH compatibility**: the floating ball and the internal floating window are **deleted**. When the DSH is detected as legacy the plugin
|
|
24
|
+
- registers only the settings card (an upgrade notice) — no ball, no floating window, no artifact buttons, no IDE preload;
|
|
25
|
+
- reports `/api/code-server/ui-mode { sidebar:false }` to the host, which then **recycles an instance it auto-prestarted** and stops prestarting (a user-started/adopted instance is never touched);
|
|
26
|
+
- upgrading DSH needs **no reinstall** — refresh the page and the card turns back into the full settings card.
|
|
23
27
|
- The sidebar tab hosts the code-server page (iframe) and follows the current session workspace; the panel can be collapsed/split/floated/fullscreened by DSH's right sidebar.
|
|
24
|
-
- **
|
|
25
|
-
-
|
|
28
|
+
- **Resident IDE (0.2.2, on by default)**: switching to another tab or collapsing the sidebar and coming back **no longer reloads** code-server — unsaved editor buffers, terminals and debug sessions all stay put (see "Why switching tabs no longer reloads" below).
|
|
29
|
+
- The settings card now has just two rows: "Open in a window (new tab)" and "Resident in background".
|
|
30
|
+
`reserveComposer` (reserve space above the composer) only ever mattered for the deleted floating window: it is **deprecated** in 0.2.3 — an old value in the settings document is still accepted but ignored.
|
|
26
31
|
- `windowedOpen` has the highest priority: when on, entry buttons always open a browser tab.
|
|
27
32
|
|
|
33
|
+
## Why switching tabs no longer reloads (resident IDE)
|
|
34
|
+
|
|
35
|
+
**The old trap**: DSH's right sidebar (ui-dockkit) renders **only the active tab's body**
|
|
36
|
+
(`TabPanel.tsx:412` → `renderTab(active)`) — switching to another tab unmounts that body in React, which moves the
|
|
37
|
+
iframe out of the document and destroys its browsing context; switching back is a full VS Code reload (unsaved buffers
|
|
38
|
+
lost). Floating the tab into its own panel only worked around it.
|
|
39
|
+
|
|
40
|
+
**What it does now (`src/surface.js` in the client, 0.2.2)**: the plugin takes the iframe **away from React** and turns
|
|
41
|
+
it into a **singleton resident surface**:
|
|
42
|
+
|
|
43
|
+
| Situation | Action | Result |
|
|
44
|
+
|---|---|---|
|
|
45
|
+
| tab becomes active | `host.moveBefore(frame, null)` into the visible dock slot | state-preserving atomic move, **no reload** |
|
|
46
|
+
| tab deactivates / sidebar collapses | move back into a document-level park container (offscreen, keeps last docked size, `inert` + `aria-hidden`) | never destroyed, keeps running in the background |
|
|
47
|
+
| workspace / port changes | assign `src` explicitly | the only normal "reload" entry point |
|
|
48
|
+
|
|
49
|
+
- **Why `moveBefore`**: measured in a real browser (Edge/Chromium 151), a plain `appendChild` move resets the iframe's
|
|
50
|
+
internal timers (i.e. reloads it), while `Element.moveBefore()` (Chromium ≥133) preserves state (a probe counter keeps
|
|
51
|
+
counting 1→2).
|
|
52
|
+
- **Degradation is never silent**: when `moveBefore` is missing, or the host was already detached by React and it throws
|
|
53
|
+
`HierarchyRequestError: invalid hierarchy` (passive effect cleanup runs after DOM removal), the code falls back to
|
|
54
|
+
`appendChild` — one reload, but the frame is **never lost** — and reports `degraded` / `lastMoveError` so the UI can
|
|
55
|
+
say "residency unavailable".
|
|
56
|
+
- **Repaint fallback (measured)**: in the real GUI the surface was seen once with correct size, hit testing and
|
|
57
|
+
`visibility` that simply **stopped repainting** (a fully white panel, byte-identical screenshots proving no new frame).
|
|
58
|
+
`translateZ(0)` and `opacity` nudges did nothing; `display:none → forced reflow → restore` inside a single JS task
|
|
59
|
+
restored it without reloading the iframe document, without losing internal state and without a visible flash.
|
|
60
|
+
**The trigger could not be reproduced**: in a probe page an offscreen `moveBefore` park of 337 s (past Chrome's
|
|
61
|
+
~5 min cross-origin throttle window) followed by a dock with the fallback disabled still painted normally. It is
|
|
62
|
+
therefore kept as a **fallback**: every park→dock transition runs one `nudgeRepaint()` (counted as
|
|
63
|
+
`surfaceSnapshot().nudgeCount`; `setNudgeEnabled(false)` A/Bs it live).
|
|
64
|
+
- **Warm-up**: with `keepResident` (default `true`) the host builds the surface right after plugin start and leaves it
|
|
65
|
+
parked, so the first tab open needs no cold start; preloading never yanks a surface that is currently docked.
|
|
66
|
+
- **Debug handle**: `window.__dshcsSurface` (`snapshot()`, `setParkStrategy('offscreen'|'behind')`, `dock()`, `park()`,
|
|
67
|
+
`nudge()`, `setNudgeEnabled(false)`, `destroy()`).
|
|
68
|
+
|
|
69
|
+
**Measured** (DSH web GUI, real mouse clicks between sidebar tabs): switching away → `docked:false`, same iframe node,
|
|
70
|
+
in-frame probe still alive, `degraded:false`; switching back → `docked:true`, unchanged `src`, IDE pixels and editing
|
|
71
|
+
state preserved (no full reload). Full evidence and probe scripts: `docs/analysis-code-server-as-dsh-plugin.md`.
|
|
72
|
+
|
|
28
73
|
## Serving mode (`serve`)
|
|
29
74
|
|
|
30
75
|
| Mode | What it does | Requires |
|
|
@@ -46,14 +91,29 @@ A static profile plugin (npm package with host + client bundle) that ships the *
|
|
|
46
91
|
browser page could complete a handshake against `ws://127.0.0.1:<port>/stable-<commit>` and drive the IDE.
|
|
47
92
|
|
|
48
93
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
94
|
+
## Legacy DSH (unsupported since 0.2.3)
|
|
95
|
+
|
|
96
|
+
**Behaviour**: when `sidebarRightTabs` / `sidebarRight` cannot be found, the plugin registers a single settings card:
|
|
97
|
+
|
|
98
|
+
> **Code Server** — this DSH version is unsupported (no right-sidebar service)
|
|
99
|
+
> Since 0.2.3 this plugin no longer supports older DSH versions.
|
|
100
|
+
> The right-sidebar plugin services `sidebarRightTabs` / `sidebarRight` were not detected, so the plugin exposes no
|
|
101
|
+
> entry point at all (the old floating ball and floating window have been removed) and will not start the IDE in the
|
|
102
|
+
> background. Upgrade DSH to a version with the right sidebar (>= 0.1.5-alpha.1): Code Server then appears as a
|
|
103
|
+
> right-sidebar tab, this page shows the full settings again, and no reinstall is needed — a page refresh is enough.
|
|
104
|
+
|
|
105
|
+
- **No other UI**: no `shell.overlay` registration (floating ball), no artifact buttons, no resident preload.
|
|
106
|
+
- **Host side**: the client posts `/api/code-server/ui-mode { sidebar:false }`; the host then ① stops auto-prestarting
|
|
107
|
+
the IDE (`maybePrestart` returns immediately) and ② **recycles** an instance it had just auto-prestarted (unless it
|
|
108
|
+
was adopted), so no unusable IDE process or port is left behind. A user-started/adopted instance is never stopped.
|
|
109
|
+
- **Why delete instead of keeping**: the internal floating window was a stopgap from the era of early-2026 DSH builds
|
|
110
|
+
without right-sidebar services. The resident surface, clipboard handling, shortcuts and panel collapsing all build on
|
|
111
|
+
DSH's right sidebar, so maintaining two carriers costs more than it is worth. Older-DSH users should stay on `0.2.2`
|
|
112
|
+
(`dsh plugin --profile web add dsh-code-server-app@0.2.2`).
|
|
113
|
+
|
|
114
|
+
## code-server workspace and process lifecycle
|
|
115
|
+
|
|
116
|
+
- code-server's workspace **follows the active DSH session/workspace**: switching sessions/workspaces while the IDE is open restarts code-server to the new directory
|
|
57
117
|
(resolution order: current session cwd → session's workspace.path → recentWorkspace.path → first workspace.path);
|
|
58
118
|
the opened directory is shown inside code-server (`?folder=<cwd>`, the page reloads when following a switch);
|
|
59
119
|
implementation note: the iframe `src` must carry `?folder=<cwd>` — code-server's front-end remembers the "last workspace" and restores it by itself;
|
|
@@ -71,7 +131,6 @@ A static profile plugin (npm package with host + client bundle) that ships the *
|
|
|
71
131
|
> placed offline at activation → VS Code internal deps installed → started → healthz 200 →
|
|
72
132
|
> cwd switch restart while running → stopped → fully recycled.
|
|
73
133
|
|
|
74
|
-
## Floating ball / window (legacy-DSH fallback path only)
|
|
75
134
|
## Packaging (how to build the tarball)
|
|
76
135
|
|
|
77
136
|
```powershell
|
|
@@ -268,11 +327,12 @@ persisted via the official settings domain (`settingsScope`, namespace `code-ser
|
|
|
268
327
|
|
|
269
328
|
| Key | Default | Description |
|
|
270
329
|
|---|---|---|
|
|
271
|
-
| `
|
|
272
|
-
| `
|
|
330
|
+
| `windowedOpen` | `false` | **Open in a window**: on, every entry point (artifact button / settings card) opens code-server in a browser **new tab** (auto-starts and follows the active workspace); off (default) uses the right-sidebar tab |
|
|
331
|
+
| `keepResident` | `true` | **Resident in background**: on, the host preloads the IDE into a parked surface right after start — switching tabs or collapsing the sidebar never reloads it and the first open needs no cold start; off loads it only when the panel is opened (saves memory) |
|
|
332
|
+
| ~~`reserveComposer`~~ | `true` | **Deprecated in 0.2.3**: it only ever affected the deleted internal floating window. An old value in the settings document is still accepted but ignored (the key is kept so old settings documents keep validating) |
|
|
273
333
|
|
|
274
|
-
> Card changes take effect immediately via `scope.watch` (the host status API returns `
|
|
275
|
-
> `
|
|
334
|
+
> Card changes take effect immediately via `scope.watch` (the host status API returns `windowedOpen` and
|
|
335
|
+
> `keepResident`; the client applies them at once); no dsh restart needed. **After adding new setting keys, restart dsh web before first use**,
|
|
276
336
|
> so the host re-registers the settings namespace (schema includes the new key); otherwise save/validation of the new key won't work.
|
|
277
337
|
|
|
278
338
|
The bottom of the card is **Environment check** (click "Check environment" to read the host `status.env`): entry,
|
|
@@ -333,9 +393,9 @@ Host/Origin fence and browser auth); in the desktop profile `apps/desktop-host`
|
|
|
333
393
|
## Artifact open buttons
|
|
334
394
|
|
|
335
395
|
Each produced file (written/edited) in a turn is shown as a chip with a **code-server icon button** next to it
|
|
336
|
-
in the conversation's turn tail; clicking either opens the file in code-server — in the right-sidebar tab
|
|
337
|
-
|
|
338
|
-
(
|
|
396
|
+
in the conversation's turn tail; clicking either opens the file in code-server — in the right-sidebar tab
|
|
397
|
+
(opening/expanding the column and focusing the tab). When `windowedOpen` is on, both open a browser tab instead;
|
|
398
|
+
if the sidebar cannot be opened (no mounted seat), they also fall back to a browser tab.
|
|
339
399
|
The `dshcs-open-file` extension is installed as a **built-in** extension of code-server (in `lib/vscode/extensions`),
|
|
340
400
|
so users cannot remove it from the extensions panel.
|
|
341
401
|
|
|
@@ -351,9 +411,15 @@ so users cannot remove it from the extensions panel.
|
|
|
351
411
|
works). Use `serve: loopback` when you need it.
|
|
352
412
|
- **`serve: dsh` shares DSH's origin**, so the iframe is not sandboxed there (same-origin plus `allow-same-origin` is
|
|
353
413
|
escapable by the frame itself); in `loopback` mode the iframe is cross-origin and `sandbox` stays as real protection.
|
|
354
|
-
- **Single instance across sessions**: one shared IDE per host; switching cwd requires a restart (the sidebar tab
|
|
355
|
-
|
|
356
|
-
- **
|
|
357
|
-
|
|
414
|
+
- **Single instance across sessions**: one shared IDE per host; switching cwd requires a restart (the sidebar tab
|
|
415
|
+
handles it and hints).
|
|
416
|
+
- **Older DSH versions are unsupported (since 0.2.3)**: on a DSH without `sidebarRightTabs` / `sidebarRight` the plugin
|
|
417
|
+
offers nothing but an upgrade notice on the settings page; older-DSH users should stay on `0.2.2`
|
|
418
|
+
(`dsh plugin --profile web add dsh-code-server-app@0.2.2`).
|
|
419
|
+
- **Sidebar tab switching** (no longer reloads since 0.2.2): DSH's right sidebar renders only the active tab's body, and
|
|
420
|
+
a React unmount moves the iframe away; the plugin keeps it as a singleton resident surface and shuttles it between the
|
|
421
|
+
dock slot and a document-level park container with `Element.moveBefore()` (a state-preserving atomic move), so
|
|
422
|
+
switching tabs or collapsing the sidebar and back **does not reload** it. Browsers without `moveBefore` fall back to
|
|
423
|
+
the old behaviour (`appendChild` → full reload), reported as `degraded`; see "Why switching tabs no longer reloads".
|
|
358
424
|
- **Remote access**: with `serve: dsh` the browser only needs to reach DSH itself (one port, protected exactly like `/api`);
|
|
359
425
|
`serve: loopback` stays loopback-only with `auth: none`, and 0.2.0 no longer supports `auth: password`.
|
package/README.md
CHANGED
|
@@ -22,22 +22,63 @@
|
|
|
22
22
|
> 全部不再随包分发**(减少 ~34.5MB + 一条原生构建链);IDE 提供方式见下方「服务方式(serve)」。
|
|
23
23
|
> 依据与实测证据见 `docs/analysis-code-server-as-dsh-plugin.md`(含子路径挂载、WS 路径、命名管道、fence 的逐项验证)。
|
|
24
24
|
|
|
25
|
-
## UI
|
|
25
|
+
## UI 载体与 DSH 版本要求(0.2.3 起只支持带右侧栏的 DSH)
|
|
26
26
|
|
|
27
27
|
| DSH 版本 | 载体 | 入口 |
|
|
28
28
|
|---|---|---|
|
|
29
|
-
| **≥ 0.1.5-alpha.1**(有 `sidebarRight` / `sidebarRightTabs` 服务) | **右侧栏标签**(kind=`code-server`,标签名 `Code Server`)
|
|
30
|
-
| 更早(无右侧栏服务) |
|
|
31
|
-
|
|
32
|
-
-
|
|
33
|
-
|
|
29
|
+
| **≥ 0.1.5-alpha.1**(有 `sidebarRight` / `sidebarRightTabs` 服务) | **右侧栏标签**(kind=`code-server`,标签名 `Code Server`) | ① 右侧栏「开始」页的 **Code Server 入口框**;② 每轮产物旁的图标按钮;③ 设置 → 插件 → Code Server → **「在右侧栏打开」** |
|
|
30
|
+
| 更早(无右侧栏服务) | **不受支持**:除设置页的一条提示外**不提供任何入口** | 无(设置 → 插件 → Code Server 显示升级提示) |
|
|
31
|
+
|
|
32
|
+
- 检测方式:先 `ctx.get('sidebarRightTabs') / ctx.get('sidebarRight')` 同步探测;
|
|
33
|
+
服务可能晚于本插件就绪,则 `ctx.inject(['sidebarRightTabs','sidebarRight'], …)` 等待,
|
|
34
|
+
**2.5 s 内仍未就绪即判定旧版 DSH**(不按版本号硬判,也不影响插件激活)。
|
|
35
|
+
- **0.2.3 起不再兼容旧版 DSH**:悬浮球与内部浮动窗口回退**已删除**。判定为旧版时:
|
|
36
|
+
- 只注册设置卡片,内容是一条升级提示(见下),不注册悬浮球/浮窗/产物按钮,也不预热 IDE;
|
|
37
|
+
- 客户端向 host 上报 `/api/code-server/ui-mode { sidebar:false }`,host 据此**回收自动预启动的实例**
|
|
38
|
+
并停止预启动(用户手动启动的实例不受影响);
|
|
39
|
+
- 升级 DSH 后**无需重装插件**,刷新页面即可,本页会恢复为完整设置卡片。
|
|
34
40
|
- 侧栏标签内即 code-server 页面(iframe),跟随当前会话工作区;面板可折叠/分屏/浮动/全屏(由 DSH 右侧栏提供)。
|
|
35
|
-
-
|
|
36
|
-
(
|
|
37
|
-
-
|
|
38
|
-
|
|
41
|
+
- **IDE 常驻(0.2.2 起,默认开)**:切到别的标签/收起侧栏再回来**不再重载** code-server——
|
|
42
|
+
未保存的编辑缓冲区、终端、调试会话都留在原处(见下方「为什么切标签不再重载」)。
|
|
43
|
+
- 设置卡片只剩两行:「窗口化打开(新标签页)」与「后台常驻(切标签不重载)」。
|
|
44
|
+
`reserveComposer`(保留输入框上方空间)只对已删除的浮窗有意义,0.2.3 起**废弃**:设置文件里的旧值仍被接受但被忽略。
|
|
39
45
|
- `windowedOpen` 优先级最高:开启时入口按钮一律新开浏览器标签页。
|
|
40
46
|
|
|
47
|
+
## 为什么切标签不再重载(IDE 常驻)
|
|
48
|
+
|
|
49
|
+
**过去的坑**:DSH 的右侧栏(ui-dockkit)`TabPanel` **只渲染当前激活标签的 body**
|
|
50
|
+
(`TabPanel.tsx:412` → `renderTab(active)`)——切到别的标签 = React 卸载该 body = iframe 被移出文档 =
|
|
51
|
+
浏览上下文销毁,切回来就是一次完整的 VS Code 重载(未保存的缓冲区丢失)。把标签浮动成独立面板只是绕开它,
|
|
52
|
+
并没有解决。
|
|
53
|
+
|
|
54
|
+
**现在的做法(客户端 `src/surface.js`,0.2.2)**:插件把 iframe **从 React 手里接管**,做成**单例常驻面**:
|
|
55
|
+
|
|
56
|
+
| 场景 | 动作 | 结果 |
|
|
57
|
+
|---|---|---|
|
|
58
|
+
| 标签激活 | `host.moveBefore(frame, null)` 移进当前可见的停靠位 | 状态保持型原子移动,**不重载** |
|
|
59
|
+
| 标签失活 / 收起侧栏 | 移回文档级 park 容器(离屏、保留最后停靠尺寸、`inert` + `aria-hidden`) | 面不销毁,后台继续跑 |
|
|
60
|
+
| 工作区 / 端口变化 | 显式设置 `src` | 这是唯一正常的"重载"入口 |
|
|
61
|
+
|
|
62
|
+
- **为什么是 `moveBefore`**:浏览器实测(Edge/Chromium 151)普通 `appendChild` 移动 iframe 会让内部计时器**归零**
|
|
63
|
+
(等价重载),而 `Element.moveBefore()`(Chromium ≥133)保持状态(计时器 1→2 连续)。
|
|
64
|
+
- **降级不静默**:`moveBefore` 缺失、或宿主已被 React 摘除而抛 `HierarchyRequestError: invalid hierarchy`
|
|
65
|
+
(passive effect cleanup 晚于 DOM 卸载)时,退回 `appendChild`——会重载一次,但**绝不丢帧**;
|
|
66
|
+
状态里 `degraded`/`lastMoveError` 明示,界面据此提示"常驻不可用"。
|
|
67
|
+
- **重绘兜底(实测坑)**:真实 GUI 里观测到一次"元素在、画面不重绘"——iframe 尺寸、命中测试、`visibility`
|
|
68
|
+
全部正常,面板却一片白(连续两张截图哈希相同,确认没有新帧);`translateZ(0)`、`opacity` 微调无效,
|
|
69
|
+
`display:none → 强制重排 → 还原`(同一个 JS 任务内)可恢复,且 iframe 文档不重载、内部状态不变、无可见闪烁。
|
|
70
|
+
**触发条件未能复现**:探针页里 `moveBefore` 停放 337 s(超过 Chrome 对不可见跨源 iframe 的 ~5 min 节流窗口)
|
|
71
|
+
后移回、且关掉修复,仍正常绘制。因此把它当**兜底**保留:每次「停放 → 停靠」补一次
|
|
72
|
+
`nudgeRepaint()`(`surfaceSnapshot().nudgeCount` 计数,`setNudgeEnabled(false)` 可现场 A/B)。
|
|
73
|
+
- **后台预热**:配置 `keepResident`(默认 `true`)时,宿主在插件启动后就把面建好并停在停放区,
|
|
74
|
+
首次点开标签无需冷启动等待;`preload` 不会把正在使用的面拽走。
|
|
75
|
+
- **排障句柄**:控制台可用 `window.__dshcsSurface`(`snapshot()` / `setParkStrategy('offscreen'|'behind')` /
|
|
76
|
+
`dock()` / `park()` / `nudge()` / `setNudgeEnabled(false)` / `destroy()`)。
|
|
77
|
+
|
|
78
|
+
**实测记录**(DSH web GUI,sidebar 标签间真实鼠标切换):切走 → `docked:false`、iframe 仍为同一节点、内部探针存活、
|
|
79
|
+
`degraded:false`;切回 → `docked:true`、`src` 不变、IDE 画面与编辑状态保持(无整页重载)。
|
|
80
|
+
完整证据与探针脚本见 `docs/analysis-code-server-as-dsh-plugin.md`。
|
|
81
|
+
|
|
41
82
|
## 服务方式(serve)
|
|
42
83
|
|
|
43
84
|
| 方式 | 说明 | 需要 |
|
|
@@ -57,16 +98,27 @@
|
|
|
57
98
|
(含 `Forwarded: host=` / `X-Forwarded-Host` 的反代语义),否则回 `403`;缺 `Origin` 的非浏览器请求放行。
|
|
58
99
|
没有这道检查时,本机任意浏览器页面都能对 `ws://127.0.0.1:<port>/stable-<commit>` 完成握手并驱动 IDE。
|
|
59
100
|
|
|
60
|
-
##
|
|
101
|
+
## 旧版 DSH(0.2.3 起不再支持)
|
|
102
|
+
|
|
103
|
+
**行为**:探测不到 `sidebarRightTabs` / `sidebarRight` 时,插件只注册一张设置卡片,内容是:
|
|
104
|
+
|
|
105
|
+
> **Code Server** — 当前 DSH 版本不受支持(缺少右侧栏服务)
|
|
106
|
+
> 本插件自 0.2.3 起不再兼容旧版 DSH。
|
|
107
|
+
> 未检测到右侧栏插件服务 sidebarRightTabs / sidebarRight,因此插件不提供任何入口(旧版的悬浮球与浮动窗口已移除),
|
|
108
|
+
> 也不会后台启动 IDE。升级 DSH 到带右侧栏的版本(≥ 0.1.5-alpha.1)后,Code Server 会出现在右侧栏标签里,
|
|
109
|
+
> 本页同时显示完整设置项;升级后无需重装本插件,刷新页面即可。
|
|
110
|
+
|
|
111
|
+
- **没有任何其他 UI**:不注册 `shell.overlay`(悬浮球)、不注册产物按钮、不做常驻预热。
|
|
112
|
+
- **host 侧**:客户端会 `POST /api/code-server/ui-mode { sidebar:false }`;host 收到后
|
|
113
|
+
① 不再自动预启动 IDE(`maybePrestart` 直接返回),② 若 IDE 是本插件刚自动预启动且尚未被 adopt,则**回收**该进程,
|
|
114
|
+
避免留下一个用不上的 IDE 与端口。用户手动启动的实例(`adopted`)不会被停。
|
|
115
|
+
- **为什么删除而不是保留**:内部浮动窗口是 2026 年早期 DSH(无右侧栏服务)时代的临时载体,
|
|
116
|
+
常驻面、剪贴板、快捷键、面板折叠等能力都建立在 DSH 右侧栏之上;维护两套载体的成本高于其残余价值。
|
|
117
|
+
旧版用户继续用 `0.2.2` 即可(`dsh plugin --profile web add dsh-code-server-app@0.2.2`)。
|
|
118
|
+
- **回滚**:任何版本都能降级到旧版实现,例如 `dsh plugin --profile web add dsh-code-server-app@0.2.2`。
|
|
119
|
+
|
|
120
|
+
## code-server 服务目录与进程生命周期
|
|
61
121
|
|
|
62
|
-
- **右下角悬浮球**(code-server 官方图标,输入框上方):点击**展开浮窗并亮起**(蓝色光环),再点击**收起并复原**;
|
|
63
|
-
**可按住拖动到任意位置**(松手后记忆,刷新不丢;拖完不会误触发点击);
|
|
64
|
-
无侧栏按钮、无窗口控制按钮组(球是唯一入口/开关);球上带运行状态点(绿=运行 / 黄=启动中 / 红=错误);
|
|
65
|
-
- 窗口为**内部浮动窗口**(参照 dsh-univer-office 的 WorktreeWindow 模式):固定定位浮窗 + 空转根容器,窗口接管指针事件,
|
|
66
|
-
**无标题栏无按钮**——顶部细条拖动(悬停有淡色提示;**拖到窗口顶部松开 = 最大化**,
|
|
67
|
-
**最大化后按住顶部细条向下拖 = 恢复**并继续跟手拖动)、双击最大化、8 向缩放、Esc 关闭(与球收起等效),
|
|
68
|
-
初始位置在输入框上方靠右,最大化与缩放都止于输入栏上方,不遮挡 composer;
|
|
69
|
-
- 窗口内直接是 code-server 页面(iframe);未运行/启动失败时显示状态说明与错误信息;
|
|
70
122
|
- code-server 服务目录**跟随活动工作区/会话**:打开期间切换 DSH 会话/工作区,code-server 自动重启到新目录
|
|
71
123
|
(解析优先级:当前会话 cwd → 会话所属 workspace.path → recentWorkspace.path → 首个 workspace.path);
|
|
72
124
|
打开目录显示在 code-server 页面内(`?folder=<cwd>`,跟随切换时页面自动重新加载);
|
|
@@ -287,15 +339,16 @@ host 探测顺序:`@jinsiyu/dshcs-vscode-server/vscode`(**0.2.0+ 正式布局**)
|
|
|
287
339
|
|
|
288
340
|
| 键 | 默认 | 说明 |
|
|
289
341
|
|---|---|---|
|
|
290
|
-
| `
|
|
291
|
-
| `
|
|
342
|
+
| `windowedOpen` | `false` | **窗口化打开**:开启后各入口(产物按钮 / 设置卡)在浏览器**新标签页**打开 code-server(自动启动并跟随当前工作区目录);关闭(默认)使用右侧栏标签 |
|
|
343
|
+
| `keepResident` | `true` | **后台常驻**:开启后宿主启动即把 IDE 预加载到"停放区",切标签/收起侧栏不重载、首次打开免等待;关闭则只在打开面板时加载(省内存) |
|
|
344
|
+
| ~~`reserveComposer`~~ | `true` | **0.2.3 起废弃**:只对已删除的内部浮动窗口有意义。设置文件里的旧值仍被接受但被忽略(键保留,避免旧设置文档校验失败) |
|
|
292
345
|
|
|
293
346
|
卡片底部是**环境检测**(点「检测环境」读取 host `status.env`):
|
|
294
347
|
树版本 / `productPath` / server 入口、VS Code 内部依赖、**预编译原生包**(平台聚合包名 + 已解析模块数)。
|
|
295
348
|
0.1.36 起没有「安装环境」按钮 —— 依赖由包管理器安装,卡片里只显示结果。
|
|
296
349
|
|
|
297
|
-
> 卡片改动经 `scope.watch` 实时生效(host 端 status API 同步返回 `
|
|
298
|
-
> `
|
|
350
|
+
> 卡片改动经 `scope.watch` 实时生效(host 端 status API 同步返回 `windowedOpen` 与
|
|
351
|
+
> `keepResident`,客户端立即生效);无需重启 dsh。**新增设置键后首次使用前需重启 dsh web**,
|
|
299
352
|
> 让 host 重新注册设置命名空间(schema 含新键),否则新键的保存与校验不生效。
|
|
300
353
|
|
|
301
354
|
## 配置(cordis.patch.yml 的 `config`,均有默认值)
|
|
@@ -358,9 +411,13 @@ desktop profile 由 `apps/desktop-host` 把 `/api/*` 交给同一个 `createShar
|
|
|
358
411
|
→ 该模式下 Ports 面板的 **WebSocket** 转发不可用(HTTP 转发正常);需要时用 `serve: loopback`。
|
|
359
412
|
- **`serve: dsh` 的 iframe 与 DSH 同源** → 该模式不挂 `sandbox`(同源 + `allow-same-origin` 可被 frame 自行摘除);
|
|
360
413
|
`loopback` 模式跨源,`sandbox` 作为真防护保留。
|
|
361
|
-
- **跨会话单实例**:host 级共享一份 IDE;切换 cwd 需重启实例(
|
|
362
|
-
-
|
|
363
|
-
|
|
414
|
+
- **跨会话单实例**:host 级共享一份 IDE;切换 cwd 需重启实例(右侧栏标签自动处理并提示)。
|
|
415
|
+
- **旧版 DSH 不受支持(0.2.3 起)**:没有 `sidebarRightTabs`/`sidebarRight` 的 DSH 上,除设置页一条升级提示外无任何入口;
|
|
416
|
+
旧版用户请留在 `0.2.2`(`dsh plugin --profile web add dsh-code-server-app@0.2.2`)。
|
|
417
|
+
- **侧栏标签切换**(0.2.2 起不再重载):DSH 右侧栏只渲染当前激活标签的 body,React 卸载会移走 iframe;
|
|
418
|
+
插件把 iframe 收成单例常驻面,用 `Element.moveBefore()`(状态保持型原子移动)在停靠位与文档级停放区之间搬,
|
|
419
|
+
切标签/收起侧栏再回来**不重载**。不支持 `moveBefore` 的浏览器退回旧行为(`appendChild` → 整页重载),
|
|
420
|
+
状态里以 `degraded` 明示;详见下方「为什么切标签不再重载」。
|
|
364
421
|
- **远程访问**:`serve: dsh` 下浏览器只需能到达 DSH 本身(单一端口,认证与 `/api` 同级);
|
|
365
422
|
`serve: loopback` 默认仅回环、`auth: none`,跨机访问请改用 `serve: dsh`
|
|
366
423
|
(0.2.0 起不再支持 `auth: password`)。
|
package/cordis.patch.yml
CHANGED
|
@@ -30,6 +30,8 @@
|
|
|
30
30
|
locale: ''
|
|
31
31
|
# 启动就绪探测超时(ms)。
|
|
32
32
|
readyTimeoutMs: 60000
|
|
33
|
-
#
|
|
34
|
-
# 卡片控制,持久化于官方 settings 域(命名空间 code-server,键
|
|
35
|
-
# 默认 true);此处不需配置,卡片修改即时生效。
|
|
33
|
+
# 注:窗口化打开(新标签页)与后台常驻(切标签不重载)由"设置 → 插件 → Code Server"
|
|
34
|
+
# 卡片控制,持久化于官方 settings 域(命名空间 code-server,键 windowedOpen / keepResident,
|
|
35
|
+
# 默认 false / true);此处不需配置,卡片修改即时生效。
|
|
36
|
+
# 另:0.2.3 起不再兼容旧版 DSH(无 sidebarRightTabs/sidebarRight 服务的版本),
|
|
37
|
+
# 旧版上只在设置页给一条升级提示,不提供任何入口,也不预启动 IDE。
|
package/lib/client.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
window.__ModuleLoader__.load({id:'dsh-code-server-app',factory:function(require){var module={exports:{}};var exports=module.exports;
|
|
2
|
-
var wi=Object.defineProperty;var Cc=Object.getOwnPropertyDescriptor;var Pc=Object.getOwnPropertyNames;var Ec=Object.prototype.hasOwnProperty;var Mc=(e,t)=>{for(var r in t)wi(e,r,{get:t[r],enumerable:!0})},Ac=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Pc(t))!Ec.call(e,i)&&i!==r&&wi(e,i,{get:()=>t[i],enumerable:!(n=Cc(t,i))||n.enumerable});return e};var Dc=e=>Ac(wi({},"__esModule",{value:!0}),e);var Um={};Mc(Um,{apply:()=>jm,inject:()=>Gm,name:()=>Wm});module.exports=Dc(Um);var Zo=require("react"),Wr=(0,Zo.createContext)({});var Jo=require("react");function Qo(e){let t=(0,Jo.useRef)(null);return t.current===null&&(t.current=e()),t.current}var Ur=require("react");var es=typeof window!="undefined";var ts=es?Ur.useLayoutEffect:Ur.useEffect;var rs=require("react"),wt=(0,rs.createContext)(null);function rt(e,t){e.indexOf(t)===-1&&e.push(t)}function ze(e,t){let r=e.indexOf(t);r>-1&&e.splice(r,1)}var $=(e,t,r)=>r>t?t:r<e?e:r;var Re=()=>{},se=()=>{};var ne={};var Yt=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);var $t=e=>typeof e=="object"&&e!==null;var Xt=e=>/^0[^.\s]+$/u.test(e);function qt(e){let t;return()=>(t===void 0&&(t=e()),t)}var j=e=>e;var ve=(...e)=>e.reduce((t,r)=>n=>r(t(n)));var Te=(e,t,r)=>{let n=t-e;return n?(r-e)/n:1};var ke=class{constructor(){this.subscriptions=[]}add(t){return rt(this.subscriptions,t),()=>ze(this.subscriptions,t)}notify(t,r,n){let i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,r,n);else for(let s=0;s<i;s++){let o=this.subscriptions[s];o&&o(t,r,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}};var U=e=>e*1e3,Z=e=>e/1e3;var Zt=(e,t)=>t?e*(1e3/t):0;var ns=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,Rc=1e-7,kc=12;function Lc(e,t,r,n,i){let s,o,a=0;do o=t+(r-t)/2,s=ns(o,n,i)-e,s>0?r=o:t=o;while(Math.abs(s)>Rc&&++a<kc);return o}function Ge(e,t,r,n){if(e===t&&r===n)return j;let i=s=>Lc(s,0,1,e,r);return s=>s===0||s===1?s:ns(i(s),t,n)}var Hr=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2;var Kr=e=>t=>1-e(1-t);var _r=Ge(.33,1.53,.69,.99),Tt=Kr(_r),Jt=Hr(Tt);var Qt=e=>e>=1?1:(e*=2)<1?.5*Tt(e):.5*(2-Math.pow(2,-10*(e-1)));var er=e=>1-Math.sin(Math.acos(e)),tr=Kr(er),rr=Hr(er);var Ti=Ge(.42,0,1,1),Si=Ge(0,0,.58,1),nr=Ge(.42,0,.58,1);var Vi=e=>Array.isArray(e)&&typeof e[0]!="number";var ir=e=>Array.isArray(e)&&typeof e[0]=="number";var is={linear:j,easeIn:Ti,easeInOut:nr,easeOut:Si,circIn:er,circInOut:rr,circOut:tr,backIn:Tt,backInOut:Jt,backOut:_r,anticipate:Qt},Ic=e=>typeof e=="string",Yr=e=>{if(ir(e)){se(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");let[t,r,n,i]=e;return Ge(t,r,n,i)}else if(Ic(e))return se(is[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),is[e];return e};var or=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function os(e){let t=new Set,r=new Set,n=!1,i=!1,s=new WeakSet,o={delta:0,timestamp:0,isProcessing:!1};function a(u){s.has(u)&&(c.schedule(u),e()),u(o)}let c={schedule:(u,l=!1,f=!1)=>{let d=f&&n?t:r;return l&&s.add(u),d.add(u),u},cancel:u=>{r.delete(u),s.delete(u)},process:u=>{if(o=u,n){i=!0;return}n=!0;let l=t;t=r,r=l,t.forEach(a),t.clear(),n=!1,i&&(i=!1,c.process(u))}};return c}var Oc=40;function $r(e,t){let r=!1,n=!0,i={delta:0,timestamp:0,isProcessing:!1},s=()=>r=!0,o=or.reduce((w,g)=>(w[g]=os(s),w),{}),{setup:a,read:c,resolveKeyframes:u,preUpdate:l,update:f,preRender:m,render:d,postRender:p}=o,x=()=>{let w=ne.useManualTiming,g=w?i.timestamp:performance.now();r=!1,w||(i.delta=n?1e3/60:Math.max(Math.min(g-i.timestamp,Oc),1)),i.timestamp=g,i.isProcessing=!0,a.process(i),c.process(i),u.process(i),l.process(i),f.process(i),m.process(i),d.process(i),p.process(i),i.isProcessing=!1,r&&t&&(n=!1,e(x))},y=()=>{r=!0,n=!0,i.isProcessing||e(x)};return{schedule:or.reduce((w,g)=>{let S=o[g];return w[g]=(E,A=!1,V=!1)=>(r||y(),S.schedule(E,A,V)),w},{}),cancel:w=>{for(let g=0;g<or.length;g++)o[or[g]].cancel(w)},state:i,steps:o}}var{schedule:P,cancel:ae,state:W,steps:sr}=$r(typeof requestAnimationFrame!="undefined"?requestAnimationFrame:j,!0);var Xr;function Nc(){Xr=void 0}var z={now:()=>(Xr===void 0&&z.set(W.isProcessing||ne.useManualTiming?W.timestamp:performance.now()),Xr),set:e=>{Xr=e,queueMicrotask(Nc)}};var ss=e=>t=>typeof t=="string"&&t.startsWith(e),qr=ss("--"),Bc=ss("var(--"),St=e=>Bc(e)?Fc.test(e.split("/*")[0].trim()):!1,Fc=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Ci(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}var Se={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Le={...Se,transform:e=>$(0,1,e)},ar={...Se,default:1};var We=e=>Math.round(e*1e5)/1e5;var Vt=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function as(e){return e==null}var ls=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;var Ct=(e,t)=>r=>!!(typeof r=="string"&&ls.test(r)&&r.startsWith(e)||t&&!as(r)&&Object.prototype.hasOwnProperty.call(r,t)),Zr=(e,t,r)=>n=>{if(typeof n!="string")return n;let[i,s,o,a]=n.match(Vt);return{[e]:parseFloat(i),[t]:parseFloat(s),[r]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}};var jc=e=>$(0,255,e),Pi={...Se,transform:e=>Math.round(jc(e))},Ve={test:Ct("rgb","red"),parse:Zr("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:n=1})=>"rgba("+Pi.transform(e)+", "+Pi.transform(t)+", "+Pi.transform(r)+", "+We(Le.transform(n))+")"};function zc(e){let t="",r="",n="",i="";return e.length>5?(t=e.substring(1,3),r=e.substring(3,5),n=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),r=e.substring(2,3),n=e.substring(3,4),i=e.substring(4,5),t+=t,r+=r,n+=n,i+=i),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:i?parseInt(i,16)/255:1}}var lr={test:Ct("#"),parse:zc,transform:Ve.transform};var cr=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),pe=cr("deg"),te=cr("%"),T=cr("px"),Ei=cr("vh"),Mi=cr("vw"),Jr={...te,parse:e=>te.parse(e)/100,transform:e=>te.transform(e*100)};var Ue={test:Ct("hsl","hue"),parse:Zr("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:n=1})=>"hsla("+Math.round(e)+", "+te.transform(We(t))+", "+te.transform(We(r))+", "+We(Le.transform(n))+")"};var O={test:e=>Ve.test(e)||lr.test(e)||Ue.test(e),parse:e=>Ve.test(e)?Ve.parse(e):Ue.test(e)?Ue.parse(e):lr.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Ve.transform(e):Ue.transform(e),getAnimatableNone:e=>{let t=O.parse(e);return t.alpha=0,O.transform(t)}};var cs=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Gc(e){var t,r;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Vt))==null?void 0:t.length)||0)+(((r=e.match(cs))==null?void 0:r.length)||0)>0}var fs="number",ms="color",Wc="var",Uc="var(",us="${}",Hc=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function He(e){let t=e.toString(),r=[],n={color:[],number:[],var:[]},i=[],s=0,a=t.replace(Hc,c=>(O.test(c)?(n.color.push(s),i.push(ms),r.push(O.parse(c))):c.startsWith(Uc)?(n.var.push(s),i.push(Wc),r.push(c)):(n.number.push(s),i.push(fs),r.push(parseFloat(c))),++s,us)).split(us);return{values:r,split:a,indexes:n,types:i}}function Kc(e){return He(e).values}function ds({split:e,types:t}){let r=e.length;return n=>{let i="";for(let s=0;s<r;s++)if(i+=e[s],n[s]!==void 0){let o=t[s];o===fs?i+=We(n[s]):o===ms?i+=O.transform(n[s]):i+=n[s]}return i}}function _c(e){return ds(He(e))}var Yc=e=>typeof e=="number"?0:O.test(e)?O.getAnimatableNone(e):e,$c=(e,t)=>typeof e=="number"?t!=null&&t.trim().endsWith("/")?e:0:Yc(e);function Xc(e){let t=He(e);return ds(t)(t.values.map((n,i)=>$c(n,t.split[i])))}var X={test:Gc,parse:Kc,createTransformer:_c,getAnimatableNone:Xc};function Ai(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function ps({hue:e,saturation:t,lightness:r,alpha:n}){e/=360,t/=100,r/=100;let i=0,s=0,o=0;if(!t)i=s=o=r;else{let a=r<.5?r*(1+t):r+t-r*t,c=2*r-a;i=Ai(c,a,e+1/3),s=Ai(c,a,e),o=Ai(c,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:n}}function Pt(e,t){return r=>r>0?t:e}var M=(e,t,r)=>e+(t-e)*r;var Di=(e,t,r)=>{let n=e*e,i=r*(t*t-n)+n;return i<0?0:Math.sqrt(i)},qc=[lr,Ve,Ue],Zc=e=>qc.find(t=>t.test(e));function hs(e){let t=Zc(e);if(Re(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let r=t.parse(e);return t===Ue&&(r=ps(r)),r}var Ri=(e,t)=>{let r=hs(e),n=hs(t);if(!r||!n)return Pt(e,t);let i={...r};return s=>(i.red=Di(r.red,n.red,s),i.green=Di(r.green,n.green,s),i.blue=Di(r.blue,n.blue,s),i.alpha=M(r.alpha,n.alpha,s),Ve.transform(i))};var Qr=new Set(["none","hidden"]);function gs(e,t){return Qr.has(e)?r=>r<=0?e:t:r=>r>=1?t:e}function Jc(e,t){return r=>M(e,t,r)}function en(e){return typeof e=="number"?Jc:typeof e=="string"?St(e)?Pt:O.test(e)?Ri:tu:Array.isArray(e)?xs:typeof e=="object"?O.test(e)?Ri:Qc:Pt}function xs(e,t){let r=[...e],n=r.length,i=e.map((s,o)=>en(s)(s,t[o]));return s=>{for(let o=0;o<n;o++)r[o]=i[o](s);return r}}function Qc(e,t){let r={...e,...t},n={};for(let i in r)e[i]!==void 0&&t[i]!==void 0&&(n[i]=en(e[i])(e[i],t[i]));return i=>{for(let s in n)r[s]=n[s](i);return r}}function eu(e,t){var i;let r=[],n={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){let o=t.types[s],a=e.indexes[o][n[o]],c=(i=e.values[a])!=null?i:0;r[s]=c,n[o]++}return r}var tu=(e,t)=>{let r=X.createTransformer(t),n=He(e),i=He(t);return n.indexes.var.length===i.indexes.var.length&&n.indexes.color.length===i.indexes.color.length&&n.indexes.number.length>=i.indexes.number.length?Qr.has(e)&&!i.values.length||Qr.has(t)&&!n.values.length?gs(e,t):ve(xs(eu(n,i),i.values),r):(Re(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),Pt(e,t))};function tn(e,t,r){return typeof e=="number"&&typeof t=="number"&&typeof r=="number"?M(e,t,r):en(e)(e,t)}var ys=e=>{let t=({timestamp:r})=>e(r);return{start:(r=!0)=>P.update(t,r),stop:()=>ae(t),now:()=>W.isProcessing?W.timestamp:z.now()}};var rn=(e,t,r=10)=>{let n="",i=Math.max(Math.round(t/r),2);for(let s=0;s<i;s++)n+=Math.round(e(s/(i-1))*1e4)/1e4+", ";return`linear(${n.substring(0,n.length-2)})`};function Et(e){let t=0,r=50,n=e.next(t);for(;!n.done&&t<2e4;)t+=r,n=e.next(t);return t>=2e4?1/0:t}function vs(e,t=100,r){let n=r({...e,keyframes:[0,t]}),i=Math.min(Et(n),2e4);return{type:"keyframes",ease:s=>n.next(i*s).value/t,duration:Z(i)}}var G={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function Ii(e,t){return e*Math.sqrt(1-t*t)}var ru=12;function nu(e,t,r){let n=r;for(let i=1;i<ru;i++)n=n-e(n)/t(n);return n}var Li=.001;function iu({duration:e=G.duration,bounce:t=G.bounce,velocity:r=G.velocity,mass:n=G.mass}){let i,s;Re(e<=U(G.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-t;o=$(G.minDamping,G.maxDamping,o),e=$(G.minDuration,G.maxDuration,Z(e)),o<1?(i=u=>{let l=u*o,f=l*e,m=l-r,d=Ii(u,o),p=Math.exp(-f);return Li-m/d*p},s=u=>{let f=u*o*e,m=f*r+r,d=Math.pow(o,2)*Math.pow(u,2)*e,p=Math.exp(-f),x=Ii(Math.pow(u,2),o);return(-i(u)+Li>0?-1:1)*((m-d)*p)/x}):(i=u=>{let l=Math.exp(-u*e),f=(u-r)*e+1;return-Li+l*f},s=u=>{let l=Math.exp(-u*e),f=(r-u)*(e*e);return l*f});let a=5/e,c=nu(i,s,a);if(e=U(e),isNaN(c))return{stiffness:G.stiffness,damping:G.damping,duration:e};{let u=Math.pow(c,2)*n;return{stiffness:u,damping:o*2*Math.sqrt(n*u),duration:e}}}var ou=["duration","bounce"],su=["stiffness","damping","mass"];function bs(e,t){return t.some(r=>e[r]!==void 0)}function au(e){let t={velocity:G.velocity,stiffness:G.stiffness,damping:G.damping,mass:G.mass,isResolvedFromDuration:!1,...e};if(!bs(e,su)&&bs(e,ou))if(t.velocity=0,e.visualDuration){let r=e.visualDuration,n=2*Math.PI/(r*1.2),i=n*n,s=2*$(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:G.mass,stiffness:i,damping:s}}else{let r=iu({...e,velocity:0});t={...t,...r,mass:G.mass},t.isResolvedFromDuration=!0}return t}function Mt(e=G.visualDuration,t=G.bounce){let r=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e,{restSpeed:n,restDelta:i}=r,s=r.keyframes[0],o=r.keyframes[r.keyframes.length-1],a={done:!1,value:s},{stiffness:c,damping:u,mass:l,duration:f,velocity:m,isResolvedFromDuration:d}=au({...r,velocity:-Z(r.velocity||0)}),p=m||0,x=u/(2*Math.sqrt(c*l)),y=o-s,v=Z(Math.sqrt(c/l)),b=Math.abs(y)<5;n||(n=b?G.restSpeed.granular:G.restSpeed.default),i||(i=b?G.restDelta.granular:G.restDelta.default);let w,g,S,E,A,V;if(x<1)S=Ii(v,x),E=(p+x*v*y)/S,w=C=>{let I=Math.exp(-x*v*C);return o-I*(E*Math.sin(S*C)+y*Math.cos(S*C))},A=x*v*E+y*S,V=x*v*y-E*S,g=C=>Math.exp(-x*v*C)*(A*Math.sin(S*C)+V*Math.cos(S*C));else if(x===1){w=I=>o-Math.exp(-v*I)*(y+(p+v*y)*I);let C=p+v*y;g=I=>Math.exp(-v*I)*(v*C*I-p)}else{let C=v*Math.sqrt(x*x-1);w=J=>{let re=Math.exp(-x*v*J),me=Math.min(C*J,300);return o-re*((p+x*v*y)*Math.sinh(me)+C*y*Math.cosh(me))/C};let I=(p+x*v*y)/C,R=x*v*I-y*C,H=x*v*y-I*C;g=J=>{let re=Math.exp(-x*v*J),me=Math.min(C*J,300);return re*(R*Math.sinh(me)+H*Math.cosh(me))}}let L={calculatedDuration:d&&f||null,velocity:C=>U(g(C)),next:C=>{if(!d&&x<1){let R=Math.exp(-x*v*C),H=Math.sin(S*C),J=Math.cos(S*C),re=o-R*(E*H+y*J),me=U(R*(A*H+V*J));return a.done=Math.abs(me)<=n&&Math.abs(o-re)<=i,a.value=a.done?o:re,a}let I=w(C);if(d)a.done=C>=f;else{let R=U(g(C));a.done=Math.abs(R)<=n&&Math.abs(o-I)<=i}return a.value=a.done?o:I,a},toString:()=>{let C=Math.min(Et(L),2e4),I=rn(R=>L.next(C*R).value,C,30);return C+"ms "+I},toTransition:()=>{}};return L}Mt.applyToOptions=e=>{let t=vs(e,100,Mt);return e.ease=t.ease,e.duration=U(t.duration),e.type="keyframes",e};var lu=5;function nn(e,t,r){let n=Math.max(t-lu,0);return Zt(r-e(n),t-n)}function ur({keyframes:e,velocity:t=0,power:r=.8,timeConstant:n=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:o,min:a,max:c,restDelta:u=.5,restSpeed:l}){let f=e[0],m={done:!1,value:f},d=V=>a!==void 0&&V<a||c!==void 0&&V>c,p=V=>a===void 0?c:c===void 0||Math.abs(a-V)<Math.abs(c-V)?a:c,x=r*t,y=f+x,v=o===void 0?y:o(y);v!==y&&(x=v-f);let b=V=>-x*Math.exp(-V/n),w=V=>v+b(V),g=V=>{let L=b(V),C=w(V);m.done=Math.abs(L)<=u,m.value=m.done?v:C},S,E,A=V=>{d(m.value)&&(S=V,E=Mt({keyframes:[m.value,p(m.value)],velocity:nn(w,V,m.value),damping:i,stiffness:s,restDelta:u,restSpeed:l}))};return A(0),{calculatedDuration:null,next:V=>{let L=!1;return!E&&S===void 0&&(L=!0,g(V),A(V)),S!==void 0&&V>=S?E.next(V-S):(!L&&g(V),m)}}}function cu(e,t,r){let n=[],i=r||ne.mix||tn,s=e.length-1;for(let o=0;o<s;o++){let a=i(e[o],e[o+1]);if(t){let c=Array.isArray(t)?t[o]||j:t;a=ve(c,a)}n.push(a)}return n}function ws(e,t,{clamp:r=!0,ease:n,mixer:i}={}){let s=e.length;if(se(s===t.length,"Both input and output ranges must be the same length","range-length"),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());let a=cu(t,n,i),c=a.length,u=l=>{if(o&&l<e[0])return t[0];let f=0;if(c>1)for(;f<e.length-2&&!(l<e[f+1]);f++);let m=Te(e[f],e[f+1],l);return a[f](m)};return r?l=>u($(e[0],e[s-1],l)):u}function Ts(e,t){let r=e[e.length-1];for(let n=1;n<=t;n++){let i=Te(0,t,n);e.push(M(r,1,i))}}function Ss(e){let t=[0];return Ts(t,e.length-1),t}function Vs(e,t){return e.map(r=>r*t)}function uu(e,t){return e.map(()=>t||nr).splice(0,e.length-1)}function nt({duration:e=300,keyframes:t,times:r,ease:n="easeInOut"}){let i=Vi(n)?n.map(Yr):Yr(n),s={done:!1,value:t[0]},o=Vs(r&&r.length===t.length?r:Ss(t),e),a=ws(o,t,{ease:Array.isArray(i)?i:uu(t,i)});return{calculatedDuration:e,next:c=>(s.value=a(c),s.done=c>=e,s)}}var fu=e=>e!==null;function Ke(e,{repeat:t,repeatType:r="loop"},n,i=1){let s=e.filter(fu),a=i<0||t&&r!=="loop"&&t%2===1?0:s.length-1;return!a||n===void 0?s[a]:n}var mu={decay:ur,inertia:ur,tween:nt,keyframes:nt,spring:Mt};function on(e){typeof e.type=="string"&&(e.type=mu[e.type])}var _e=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,r){return this.finished.then(t,r)}};var du=e=>e/100,Ie=class extends _e{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{var n,i;let{motionValue:r}=this.options;r&&r.updatedAt!==z.now()&&this.tick(z.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(n=this.options).onStop)==null||i.call(n))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){let{options:t}=this;on(t);let{type:r=nt,repeat:n=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=t,{keyframes:a}=t,c=r||nt;c!==nt&&typeof a[0]!="number"&&(this.mixKeyframes=ve(du,tn(a[0],a[1])),a=[0,100]);let u=c({...t,keyframes:a});s==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...a].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=Et(u));let{calculatedDuration:l}=u;this.calculatedDuration=l,this.resolvedDuration=l+i,this.totalDuration=this.resolvedDuration*(n+1)-i,this.generator=u}updateTime(t){let r=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=r}tick(t,r=!1){let{generator:n,totalDuration:i,mixKeyframes:s,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:c}=this;if(this.startTime===null)return n.next(0);let{delay:u=0,keyframes:l,repeat:f,repeatType:m,repeatDelay:d,type:p,onUpdate:x,finalKeyframe:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),r?this.currentTime=t:this.updateTime(t);let v=this.currentTime-u*(this.playbackSpeed>=0?1:-1),b=this.playbackSpeed>=0?v<0:v>i;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let w=this.currentTime,g=n;if(f){let V=Math.min(this.currentTime,i)/a,L=Math.floor(V),C=V%1;!C&&V>=1&&(C=1),C===1&&L--,L=Math.min(L,f+1),!!(L%2)&&(m==="reverse"?(C=1-C,d&&(C-=d/a)):m==="mirror"&&(g=o)),w=$(0,1,C)*a}let S;b?(this.delayState.value=l[0],S=this.delayState):S=g.next(w),s&&!b&&(S.value=s(S.value));let{done:E}=S;!b&&c!==null&&(E=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);let A=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return A&&p!==ur&&(S.value=Ke(l,this.options,y,this.speed)),x&&x(S.value),A&&this.finish(),S}then(t,r){return this.finished.then(t,r)}get duration(){return Z(this.calculatedDuration)}get iterationDuration(){let{delay:t=0}=this.options||{};return this.duration+Z(t)}get time(){return Z(this.currentTime)}set time(t){t=U(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){let t=this.currentTime;if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);let r=this.generator.next(t).value;return nn(n=>this.generator.next(n).value,t,r)}get speed(){return this.playbackSpeed}set speed(t){let r=this.playbackSpeed!==t;r&&this.driver&&this.updateTime(z.now()),this.playbackSpeed=t,r&&this.driver&&(this.time=Z(this.currentTime))}play(){var i,s;if(this.isStopped)return;let{driver:t=ys,startTime:r}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),(s=(i=this.options).onPlay)==null||s.call(i);let n=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=n):this.holdTime!==null?this.startTime=n-this.holdTime:this.startTime||(this.startTime=r!=null?r:n),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(z.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,r;this.notifyFinished(),this.teardown(),this.state="finished",(r=(t=this.options).onComplete)==null||r.call(t)}cancel(){var t,r;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(r=(t=this.options).onCancel)==null||r.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var r;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(r=this.driver)==null||r.stop(),t.observe(this)}};function Cs(e){var t;for(let r=1;r<e.length;r++)(t=e[r])!=null||(e[r]=e[r-1])}var it=e=>e*180/Math.PI,Oi=e=>{let t=it(Math.atan2(e[1],e[0]));return Ni(t)},pu={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Oi,rotateZ:Oi,skewX:e=>it(Math.atan(e[1])),skewY:e=>it(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Ni=e=>(e=e%360,e<0&&(e+=360),e),Ps=Oi,Es=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Ms=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),hu={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Es,scaleY:Ms,scale:e=>(Es(e)+Ms(e))/2,rotateX:e=>Ni(it(Math.atan2(e[6],e[5]))),rotateY:e=>Ni(it(Math.atan2(-e[2],e[0]))),rotateZ:Ps,rotate:Ps,skewX:e=>it(Math.atan(e[4])),skewY:e=>it(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function sn(e){return e.includes("scale")?1:0}function an(e,t){if(!e||e==="none")return sn(t);let r=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),n,i;if(r)n=hu,i=r;else{let a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=pu,i=a}if(!i)return sn(t);let s=n[t],o=i[1].split(",").map(gu);return typeof s=="function"?s(o):o[s]}var As=(e,t)=>{let{transform:r="none"}=getComputedStyle(e);return an(r,t)};function gu(e){return parseFloat(e.trim())}var Ce=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],he=new Set([...Ce,"pathRotation"]);var Bi=e=>e===Se||e===T,xu=new Set(["x","y","z"]),yu=Ce.filter(e=>!xu.has(e));function Ds(e){let t=[];return yu.forEach(r=>{let n=e.getValue(r);n!==void 0&&(t.push([r,n.get()]),n.set(r.startsWith("scale")?1:0))}),t}var Oe={width:({x:e},{paddingLeft:t="0",paddingRight:r="0",boxSizing:n})=>{let i=e.max-e.min;return n==="border-box"?i:i-parseFloat(t)-parseFloat(r)},height:({y:e},{paddingTop:t="0",paddingBottom:r="0",boxSizing:n})=>{let i=e.max-e.min;return n==="border-box"?i:i-parseFloat(t)-parseFloat(r)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>an(t,"x"),y:(e,{transform:t})=>an(t,"y")};Oe.translateX=Oe.x;Oe.translateY=Oe.y;var ot=new Set,Fi=!1,ji=!1,zi=!1;function Rs(){if(ji){let e=Array.from(ot).filter(n=>n.needsMeasurement),t=new Set(e.map(n=>n.element)),r=new Map;t.forEach(n=>{let i=Ds(n);i.length&&(r.set(n,i),n.render())}),e.forEach(n=>n.measureInitialState()),t.forEach(n=>{n.render();let i=r.get(n);i&&i.forEach(([s,o])=>{var a;(a=n.getValue(s))==null||a.set(o)})}),e.forEach(n=>n.measureEndState()),e.forEach(n=>{n.suspendedScrollY!==void 0&&window.scrollTo(0,n.suspendedScrollY)})}ji=!1,Fi=!1,ot.forEach(e=>e.complete(zi)),ot.clear()}function ks(){ot.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(ji=!0)})}function Ls(){zi=!0,ks(),Rs(),zi=!1}var Ye=class{constructor(t,r,n,i,s,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=r,this.name=n,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(ot.add(this),Fi||(Fi=!0,P.read(ks),P.resolveKeyframes(Rs))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:t,name:r,element:n,motionValue:i}=this;if(t[0]===null){let s=i==null?void 0:i.get(),o=t[t.length-1];if(s!==void 0)t[0]=s;else if(n&&r){let a=n.readValue(r,o);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=o),i&&s===void 0&&i.set(t[0])}Cs(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),ot.delete(this)}cancel(){this.state==="scheduled"&&(ot.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}};var Is=e=>e.startsWith("--");function ln(e,t,r){Is(t)?e.style.setProperty(t,r):e.style[t]=r}var Os={};function cn(e,t){let r=qt(e);return()=>{var n;return(n=Os[t])!=null?n:r()}}var Ns=cn(()=>window.ScrollTimeline!==void 0,"scrollTimeline");var un=cn(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(e){return!1}return!0},"linearEasing");var st=([e,t,r,n])=>`cubic-bezier(${e}, ${t}, ${r}, ${n})`;var Gi={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:st([0,.65,.55,1]),circOut:st([.55,0,1,.45]),backIn:st([.31,.01,.66,-.59]),backOut:st([.33,1.53,.69,.99])};function Wi(e,t){if(e)return typeof e=="function"?un()?rn(e,t):"ease-out":ir(e)?st(e):Array.isArray(e)?e.map(r=>Wi(r,t)||Gi.easeOut):Gi[e]}function Bs(e,t,r,{delay:n=0,duration:i=300,repeat:s=0,repeatType:o="loop",ease:a="easeOut",times:c}={},u=void 0){let l={[t]:r};c&&(l.offset=c);let f=Wi(a,i);Array.isArray(f)&&(l.easing=f);let m={delay:n,duration:i,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal"};return u&&(m.pseudoElement=u),e.animate(l,m)}function fn(e){return typeof e=="function"&&"applyToOptions"in e}function Fs({type:e,...t}){var r,n;return fn(e)&&un()?e.applyToOptions(t):((r=t.duration)!=null||(t.duration=300),(n=t.ease)!=null||(t.ease="easeOut"),t)}var At=class extends _e{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;let{element:r,name:n,keyframes:i,pseudoElement:s,allowFlatten:o=!1,finalKeyframe:a,onComplete:c}=t;this.isPseudoElement=!!s,this.allowFlatten=o,this.options=t,se(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");let u=Fs(t);this.animation=Bs(r,n,i,u,s),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){let l=Ke(i,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(l),ln(r,n,l),this.animation.cancel()}c==null||c(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,r;(r=(t=this.animation).finish)==null||r.call(t)}cancel(){try{this.animation.cancel()}catch(t){}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var r,n,i;let t=(r=this.options)==null?void 0:r.element;!this.isPseudoElement&&(t!=null&&t.isConnected)&&((i=(n=this.animation).commitStyles)==null||i.call(n))}get duration(){var r,n;let t=((n=(r=this.animation.effect)==null?void 0:r.getComputedTiming)==null?void 0:n.call(r).duration)||0;return Z(Number(t))}get iterationDuration(){let{delay:t=0}=this.options||{};return this.duration+Z(t)}get time(){return Z(Number(this.animation.currentTime)||0)}set time(t){let r=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=U(t),r&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){var t;return(t=this.manualStartTime)!=null?t:Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:r,rangeEnd:n,observe:i}){var s;return this.allowFlatten&&((s=this.animation.effect)==null||s.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&Ns()?(this.animation.timeline=t,r&&(this.animation.rangeStart=r),n&&(this.animation.rangeEnd=n),j):i(this)}};var js={anticipate:Qt,backInOut:Jt,circInOut:rr};function vu(e){return e in js}function zs(e){typeof e.ease=="string"&&vu(e.ease)&&(e.ease=js[e.ease])}var Ui=10,mn=class extends At{constructor(t){zs(t),on(t),super(t),t.startTime!==void 0&&t.autoplay!==!1&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){let{motionValue:r,onUpdate:n,onComplete:i,element:s,...o}=this.options;if(!r)return;if(t!==void 0){r.set(t);return}let a=new Ie({...o,autoplay:!1}),c=Math.max(Ui,z.now()-this.startTime),u=$(0,Ui,c-Ui),l=a.sample(c).value,{name:f}=this.options;s&&f&&ln(s,f,l),r.setWithVelocity(a.sample(Math.max(0,c-u)).value,l,u),a.stop()}};var Hi=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(X.test(e)||e==="0")&&!e.startsWith("url("));function bu(e){let t=e[0];if(e.length===1)return!0;for(let r=0;r<e.length;r++)if(e[r]!==t)return!0}function Gs(e,t,r,n){let i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;let s=e[e.length-1],o=Hi(i,t),a=Hi(s,t);return Re(o===a,`You are trying to animate ${t} from "${i}" to "${s}". "${o?s:i}" is not an animatable value.`,"value-not-animatable"),!o||!a?!1:bu(e)||(r==="spring"||fn(r))&&n}function fr(e){e.duration=0,e.type="keyframes"}var dn=new Set(["opacity","clipPath","filter","transform","backgroundColor"]);var wu=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function Ws(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&wu.test(e[t]))return!0;return!1}var Tu=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),Su=qt(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Us(e){var f;let{motionValue:t,name:r,repeatDelay:n,repeatType:i,damping:s,type:o,keyframes:a}=e,c=(f=t==null?void 0:t.owner)==null?void 0:f.current;if(!(c instanceof HTMLElement)&&!(c instanceof SVGElement))return!1;let{onUpdate:u,transformTemplate:l}=t.owner.getProps();return Su()&&r&&(dn.has(r)||Tu.has(r)&&Ws(a))&&(r!=="transform"||!l)&&!u&&!n&&i!=="mirror"&&s!==0&&o!=="inertia"}var Vu=40,pn=class extends _e{constructor({autoplay:t=!0,delay:r=0,type:n="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:o="loop",keyframes:a,name:c,motionValue:u,element:l,...f}){var p;super(),this.stop=()=>{var x,y;this._animation&&(this._animation.stop(),(x=this.stopTimeline)==null||x.call(this)),(y=this.keyframeResolver)==null||y.cancel()},this.createdAt=z.now();let m={autoplay:t,delay:r,type:n,repeat:i,repeatDelay:s,repeatType:o,name:c,motionValue:u,element:l,...f},d=(l==null?void 0:l.KeyframeResolver)||Ye;this.keyframeResolver=new d(a,(x,y,v)=>this.onKeyframesResolved(x,y,m,!v),c,u,l),(p=this.keyframeResolver)==null||p.scheduleResolve()}onKeyframesResolved(t,r,n,i){var v,b;this.keyframeResolver=void 0;let{name:s,type:o,velocity:a,delay:c,isHandoff:u,onUpdate:l}=n;this.resolvedAt=z.now();let f=!0;Gs(t,s,o,a)||(f=!1,(ne.instantAnimations||!c)&&(l==null||l(Ke(t,n,r))),t[0]=t[t.length-1],fr(n),n.repeat=0);let d={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>Vu?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:r,...n,keyframes:t},p=f&&!u&&Us(d),x=(b=(v=d.motionValue)==null?void 0:v.owner)==null?void 0:b.current,y;if(p)try{y=new mn({...d,element:x})}catch(w){y=new Ie(d)}else y=new Ie(d);y.finished.then(()=>{this.notifyFinished()}).catch(j),this.pendingTimeline&&(this.stopTimeline=y.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=y}get finished(){return this._animation?this.animation.finished:this._finished}then(t,r){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),Ls()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}};function hn(e,t,r,n=0,i=1){let s=Array.from(e).sort((u,l)=>u.sortNodePosition(l)).indexOf(t),o=e.size,a=(o-1)*n;return typeof r=="function"?r(s,o):i===1?s*n:a-s*n}var Hs=30,Cu=e=>!isNaN(parseFloat(e)),Ks={current:void 0},Ki=class{constructor(t,r={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=n=>{var s;let i=z.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(n),this.current!==this.prev&&((s=this.events.change)==null||s.notify(this.current),this.dependents))for(let o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=r.owner}setCurrent(t){this.current=t,this.updatedAt=z.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Cu(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,r){this.events[t]||(this.events[t]=new ke);let n=this.events[t].add(r);return t==="change"?()=>{n(),P.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let t in this.events)this.events[t].clear()}attach(t,r){this.passiveEffect=t,this.stopPassiveEffect=r}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,r,n){this.set(r),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,r=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,r&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return Ks.current&&Ks.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let t=z.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Hs)return 0;let r=Math.min(this.updatedAt-this.prevUpdatedAt,Hs);return Zt(parseFloat(this.current)-parseFloat(this.prevFrameValue),r)}start(t){return this.stop(),new Promise(r=>{this.hasAnimated=!0,this.animation=t(r),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,r;(t=this.dependents)==null||t.clear(),(r=this.events.destroy)==null||r.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function be(e,t){return new Ki(e,t)}function gn(e,t){if(e!=null&&e.inherit&&t){let{inherit:r,...n}=e;return{...t,...n}}return e}function Dt(e,t){var n,i;let r=(i=(n=e==null?void 0:e[t])!=null?n:e==null?void 0:e.default)!=null?i:e;return r!==e?gn(r,e):r}var Pu={type:"spring",stiffness:500,damping:25,restSpeed:10},Eu=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Mu={type:"keyframes",duration:.8},Au={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},_s=(e,{keyframes:t})=>t.length>2?Mu:he.has(e)?e.startsWith("scale")?Eu(t[1]):Pu:Au;var Du=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function Ys(e){for(let t in e)if(!Du.has(t))return!0;return!1}var at=(e,t,r,n={},i,s)=>o=>{let a=Dt(n,e)||{},c=a.delay||n.delay||0,{elapsed:u=0}=n;u=u-U(c);let l={keyframes:Array.isArray(r)?r:[null,r],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-u,onUpdate:m=>{t.set(m),a.onUpdate&&a.onUpdate(m)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:s?void 0:i};Ys(a)||Object.assign(l,_s(e,l)),l.duration&&(l.duration=U(l.duration)),l.repeatDelay&&(l.repeatDelay=U(l.repeatDelay)),l.from!==void 0&&(l.keyframes[0]=l.from);let f=!1;if((l.type===!1||l.duration===0&&!l.repeatDelay)&&(fr(l),l.delay===0&&(f=!0)),(ne.instantAnimations||ne.skipAnimations||i!=null&&i.shouldSkipAnimations||a.skipAnimations)&&(f=!0,fr(l),l.delay=0),l.allowFlatten=!a.type&&!a.ease,f&&!s&&t.get()!==void 0){let m=Ke(l.keyframes,a);if(m!==void 0){P.update(()=>{l.onUpdate(m),l.onComplete()});return}}return a.isSync?new Ie(l):new pn(l)};var Ru=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function ku(e){let t=Ru.exec(e);if(!t)return[,];let[,r,n,i]=t;return[`--${r!=null?r:n}`,i]}var Lu=4;function _i(e,t,r=1){se(r<=Lu,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");let[n,i]=ku(e);if(!n)return;let s=window.getComputedStyle(t).getPropertyValue(n);if(s){let o=s.trim();return Yt(o)?parseFloat(o):o}return St(i)?_i(i,t,r+1):i}function $s(e){let t=[{},{}];return e==null||e.values.forEach((r,n)=>{t[0][n]=r.get(),t[1][n]=r.getVelocity()}),t}function lt(e,t,r,n){if(typeof t=="function"){let[i,s]=$s(n);t=t(r!==void 0?r:e.custom,i,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){let[i,s]=$s(n);t=t(r!==void 0?r:e.custom,i,s)}return t}function ce(e,t,r){let n=e.getProps();return lt(n,t,r!==void 0?r:n.custom,e)}var xn=new Set(["width","height","top","left","right","bottom",...Ce]);var mr=e=>Array.isArray(e);function Iu(e,t,r){e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,be(r))}function Ou(e){return mr(e)?e[e.length-1]||0:e}function Xs(e,t){let r=ce(e,t),{transitionEnd:n={},transition:i={},...s}=r||{};s={...s,...n};for(let o in s){let a=Ou(s[o]);Iu(e,o,a)}}var k=e=>!!(e&&e.getVelocity);function qs(e){return!!(k(e)&&e.add)}function Rt(e,t){let r=e.getValue("willChange");if(qs(r))return r.add(t);if(!r&&ne.WillChange){let n=new ne.WillChange("auto");e.addValue("willChange",n),n.add(t)}}function kt(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}var Zs="framerAppearId",dr="data-"+kt(Zs);function yn(e){return e.props[dr]}function Nu({protectedKeys:e,needsAnimating:t},r){let n=e.hasOwnProperty(r)&&t[r]!==!0;return t[r]=!1,n}function vn(e,t,{delay:r=0,transitionOverride:n,type:i}={}){var p;let{transition:s,transitionEnd:o,...a}=t,c=e.getDefaultTransition();s=s?gn(s,c):c;let u=s==null?void 0:s.reduceMotion,l=s==null?void 0:s.skipAnimations;n&&(s=n);let f=[],m=i&&e.animationState&&e.animationState.getState()[i],d=s==null?void 0:s.path;d&&d.animateVisualElement(e,a,s,r,f);for(let x in a){let y=e.getValue(x,(p=e.latestValues[x])!=null?p:null),v=a[x];if(v===void 0||m&&Nu(m,x))continue;let b={delay:r,...Dt(s||{},x)};l&&(b.skipAnimations=!0);let w=y.get();if(w!==void 0&&!y.isAnimating()&&!Array.isArray(v)&&v===w&&!b.velocity){P.update(()=>y.set(v));continue}let g=!1;if(window.MotionHandoffAnimation){let A=yn(e);if(A){let V=window.MotionHandoffAnimation(A,x,P);V!==null&&(b.startTime=V,g=!0)}}Rt(e,x);let S=u!=null?u:e.shouldReduceMotion;y.start(at(x,y,v,S&&xn.has(x)?{type:!1}:b,e,g));let E=y.animation;E&&f.push(E)}if(o){let x=()=>P.update(()=>{o&&Xs(e,o)});f.length?Promise.all(f).then(x):x()}return f}function bn(e,t,r={}){var c;let n=ce(e,t,r.type==="exit"?(c=e.presenceContext)==null?void 0:c.custom:void 0),{transition:i=e.getDefaultTransition()||{}}=n||{};r.transitionOverride&&(i=r.transitionOverride);let s=n?()=>Promise.all(vn(e,n,r)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(u=0)=>{let{delayChildren:l=0,staggerChildren:f,staggerDirection:m}=i;return Bu(e,t,u,l,f,m,r)}:()=>Promise.resolve(),{when:a}=i;if(a){let[u,l]=a==="beforeChildren"?[s,o]:[o,s];return u().then(()=>l())}else return Promise.all([s(),o(r.delay)])}function Bu(e,t,r=0,n=0,i=0,s=1,o){let a=[];for(let c of e.variantChildren)c.notify("AnimationStart",t),a.push(bn(c,t,{...o,delay:r+(typeof n=="function"?0:n)+hn(e.variantChildren,c,n,i,s)}).then(()=>c.notify("AnimationComplete",t)));return Promise.all(a)}function Js(e,t,r={}){e.notify("AnimationStart",t);let n;if(Array.isArray(t)){let i=t.map(s=>bn(e,s,r));n=Promise.all(i)}else if(typeof t=="string")n=bn(e,t,r);else{let i=typeof t=="function"?ce(e,t,r.custom):t;n=Promise.all(vn(e,i,r))}return n.then(()=>{e.notify("AnimationComplete",t)})}var Qs={test:e=>e==="auto",parse:e=>e};var wn=e=>t=>t.test(e);var Yi=[Se,T,te,pe,Mi,Ei,Qs],$i=e=>Yi.find(wn(e));function ea(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Xt(e):!0}var Fu=new Set(["brightness","contrast","saturate","opacity"]);function ju(e){let[t,r]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;let[n]=r.match(Vt)||[];if(!n)return e;let i=r.replace(n,""),s=Fu.has(t)?1:0;return n!==r&&(s*=100),t+"("+s+i+")"}var zu=/\b([a-z-]*)\(.*?\)/gu,pr={...X,getAnimatableNone:e=>{let t=e.match(zu);return t?t.map(ju).join(" "):e}};var hr={...X,getAnimatableNone:e=>{let t=X.parse(e);return X.createTransformer(e)(t.map(n=>typeof n=="number"?0:typeof n=="object"?{...n,alpha:1}:n))}};var Xi={...Se,transform:Math.round};var ta={rotate:pe,pathRotation:pe,rotateX:pe,rotateY:pe,rotateZ:pe,scale:ar,scaleX:ar,scaleY:ar,scaleZ:ar,skew:pe,skewX:pe,skewY:pe,distance:T,translateX:T,translateY:T,translateZ:T,x:T,y:T,z:T,perspective:T,transformPerspective:T,opacity:Le,originX:Jr,originY:Jr,originZ:T};var ct={borderWidth:T,borderTopWidth:T,borderRightWidth:T,borderBottomWidth:T,borderLeftWidth:T,borderRadius:T,borderTopLeftRadius:T,borderTopRightRadius:T,borderBottomRightRadius:T,borderBottomLeftRadius:T,width:T,maxWidth:T,height:T,maxHeight:T,top:T,right:T,bottom:T,left:T,inset:T,insetBlock:T,insetBlockStart:T,insetBlockEnd:T,insetInline:T,insetInlineStart:T,insetInlineEnd:T,padding:T,paddingTop:T,paddingRight:T,paddingBottom:T,paddingLeft:T,paddingBlock:T,paddingBlockStart:T,paddingBlockEnd:T,paddingInline:T,paddingInlineStart:T,paddingInlineEnd:T,margin:T,marginTop:T,marginRight:T,marginBottom:T,marginLeft:T,marginBlock:T,marginBlockStart:T,marginBlockEnd:T,marginInline:T,marginInlineStart:T,marginInlineEnd:T,fontSize:T,backgroundPositionX:T,backgroundPositionY:T,...ta,zIndex:Xi,fillOpacity:Le,strokeOpacity:Le,numOctaves:Xi};var Gu={...ct,color:O,backgroundColor:O,outlineColor:O,fill:O,stroke:O,borderColor:O,borderTopColor:O,borderRightColor:O,borderBottomColor:O,borderLeftColor:O,filter:pr,WebkitFilter:pr,mask:hr,WebkitMask:hr},Tn=e=>Gu[e];var Wu=new Set([pr,hr]);function Sn(e,t){let r=Tn(e);return Wu.has(r)||(r=X),r.getAnimatableNone?r.getAnimatableNone(t):void 0}var Uu=new Set(["auto","none","0"]);function ra(e,t,r){let n=0,i;for(;n<e.length&&!i;){let s=e[n];typeof s=="string"&&!Uu.has(s)&&He(s).values.length&&(i=e[n]),n++}if(i&&r)for(let s of t)e[s]=Sn(r,i)}var Vn=class extends Ye{constructor(t,r,n,i,s){super(t,r,n,i,s,!0)}readKeyframes(){let{unresolvedKeyframes:t,element:r,name:n}=this;if(!r||!r.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let f=t[l];if(typeof f=="string"&&(f=f.trim(),St(f))){let m=_i(f,r.current);m!==void 0&&(t[l]=m),l===t.length-1&&(this.finalKeyframe=f)}}if(this.resolveNoneKeyframes(),!xn.has(n)||t.length!==2)return;let[i,s]=t,o=$i(i),a=$i(s),c=Ci(i),u=Ci(s);if(c!==u&&Oe[n]){this.needsMeasurement=!0;return}if(o!==a)if(Bi(o)&&Bi(a))for(let l=0;l<t.length;l++){let f=t[l];typeof f=="string"&&(t[l]=parseFloat(f))}else Oe[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:t,name:r}=this,n=[];for(let i=0;i<t.length;i++)(t[i]===null||ea(t[i]))&&n.push(i);n.length&&ra(t,n,r)}measureInitialState(){let{element:t,unresolvedKeyframes:r,name:n}=this;if(!t||!t.current)return;n==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Oe[n](t.measureViewportBox(),window.getComputedStyle(t.current)),r[0]=this.measuredOrigin;let i=r[r.length-1];i!==void 0&&t.getValue(n,i).jump(i,!1)}measureEndState(){var a;let{element:t,name:r,unresolvedKeyframes:n}=this;if(!t||!t.current)return;let i=t.getValue(r);i&&i.jump(this.measuredOrigin,!1);let s=n.length-1,o=n[s];n[s]=Oe[r](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([c,u])=>{t.getValue(c).set(u)}),this.resolveNoneKeyframes()}};var gr=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"];function Cn(e,t,r){var n;if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let i=document;t&&(i=t.current);let s=(n=r==null?void 0:r[e])!=null?n:i.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e).filter(i=>i!=null)}var xr=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function na(e){return $t(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}var{schedule:ut,cancel:Hu}=$r(queueMicrotask,!1);var ge={x:!1,y:!1};function Pn(){return ge.x||ge.y}function qi(e){return e==="x"||e==="y"?ge[e]?null:(ge[e]=!0,()=>{ge[e]=!1}):ge.x||ge.y?null:(ge.x=ge.y=!0,()=>{ge.x=ge.y=!1})}function En(e,t){let r=Cn(e),n=new AbortController,i={passive:!0,...t,signal:n.signal};return[r,i,()=>n.abort()]}function Ku(e){return!(e.pointerType==="touch"||Pn())}function Zi(e,t,r={}){let[n,i,s]=En(e,r);return n.forEach(o=>{let a=!1,c=!1,u,l=()=>{o.removeEventListener("pointerleave",p)},f=y=>{u&&(u(y),u=void 0),l()},m=y=>{a=!1,window.removeEventListener("pointerup",m),window.removeEventListener("pointercancel",m),c&&(c=!1,f(y))},d=()=>{a=!0,window.addEventListener("pointerup",m,i),window.addEventListener("pointercancel",m,i)},p=y=>{if(y.pointerType!=="touch"){if(a){c=!0;return}f(y)}},x=y=>{if(!Ku(y))return;c=!1;let v=t(o,y);typeof v=="function"&&(u=v,o.addEventListener("pointerleave",p,i))};o.addEventListener("pointerenter",x,i),o.addEventListener("pointerdown",d,i)}),s}var Ji=(e,t)=>t?e===t?!0:Ji(e,t.parentElement):!1;var ft=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;var _u=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Qi(e){return _u.has(e.tagName)||e.isContentEditable===!0}var Yu=new Set(["INPUT","SELECT","TEXTAREA"]);function eo(e){return Yu.has(e.tagName)||e.isContentEditable===!0}var Lt=new WeakSet;function ia(e){return t=>{t.key==="Enter"&&e(t)}}function to(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}var oa=(e,t)=>{let r=e.currentTarget;if(!r)return;let n=ia(()=>{if(Lt.has(r))return;to(r,"down");let i=ia(()=>{to(r,"up")}),s=()=>to(r,"cancel");r.addEventListener("keyup",i,t),r.addEventListener("blur",s,t)});r.addEventListener("keydown",n,t),r.addEventListener("blur",()=>r.removeEventListener("keydown",n),t)};function sa(e){return ft(e)&&!Pn()}var aa=new WeakSet;function ro(e,t,r={}){let[n,i,s]=En(e,r),o=a=>{let c=a.currentTarget;if(!sa(a)||aa.has(a))return;Lt.add(c),r.stopPropagation&&aa.add(a);let u=t(c,a),l={...i,capture:!0},f=(p,x)=>{window.removeEventListener("pointerup",m,l),window.removeEventListener("pointercancel",d,l),Lt.has(c)&&Lt.delete(c),sa(p)&&typeof u=="function"&&u(p,{success:x})},m=p=>{f(p,c===window||c===document||r.useGlobalTarget||Ji(c,p.target))},d=p=>{f(p,!1)};window.addEventListener("pointerup",m,l),window.addEventListener("pointercancel",d,l)};return n.forEach(a=>{(r.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),na(a)&&(a.addEventListener("focus",u=>oa(u,i)),!Qi(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),s}function It(e){return $t(e)&&"ownerSVGElement"in e}var Mn=new WeakMap,$e,la=(e,t,r)=>(n,i)=>i&&i[0]?i[0][e+"Size"]:It(n)&&"getBBox"in n?n.getBBox()[t]:n[r],$u=la("inline","width","offsetWidth"),Xu=la("block","height","offsetHeight");function qu({target:e,borderBoxSize:t}){var r;(r=Mn.get(e))==null||r.forEach(n=>{n(e,{get width(){return $u(e,t)},get height(){return Xu(e,t)}})})}function Zu(e){e.forEach(qu)}function Ju(){typeof ResizeObserver!="undefined"&&($e=new ResizeObserver(Zu))}function ca(e,t){$e||Ju();let r=Cn(e);return r.forEach(n=>{let i=Mn.get(n);i||(i=new Set,Mn.set(n,i)),i.add(t),$e==null||$e.observe(n)}),()=>{r.forEach(n=>{let i=Mn.get(n);i==null||i.delete(t),i!=null&&i.size||$e==null||$e.unobserve(n)})}}var An=new Set,Ot;function Qu(){Ot=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};An.forEach(t=>t(e))},window.addEventListener("resize",Ot)}function ua(e){return An.add(e),Ot||Qu(),()=>{An.delete(e),!An.size&&typeof Ot=="function"&&(window.removeEventListener("resize",Ot),Ot=void 0)}}function Dn(e,t){return typeof e=="function"?ua(e):ca(e,t)}var mt={value:null,addProjectionMetrics:null};function fa(e){return It(e)&&e.tagName==="svg"}var ef=[...Yi,O,X],ma=e=>ef.find(wn(e));var no=()=>({translate:0,scale:1,origin:0,originPoint:0}),Xe=()=>({x:no(),y:no()}),io=()=>({min:0,max:0}),N=()=>({x:io(),y:io()});var da=new WeakMap;function Ne(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Pe(e){return typeof e=="string"||Array.isArray(e)}var Rn=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],yr=["initial",...Rn];function qe(e){return Ne(e.animate)||yr.some(t=>Pe(e[t]))}function vr(e){return!!(qe(e)||e.variants)}function pa(e,t,r){for(let n in t){let i=t[n],s=r[n];if(k(i))e.addValue(n,i);else if(k(s))e.addValue(n,be(i,{owner:e}));else if(s!==i)if(e.hasValue(n)){let o=e.getValue(n);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{let o=e.getStaticValue(n);e.addValue(n,be(o!==void 0?o:i,{owner:e}))}}for(let n in r)t[n]===void 0&&e.removeValue(n);return t}var br={current:null},kn={current:!1};var tf=typeof window!="undefined";function ha(){if(kn.current=!0,!!tf)if(window.matchMedia){let e=window.matchMedia("(prefers-reduced-motion)"),t=()=>br.current=e.matches;e.addEventListener("change",t),t()}else br.current=!1}var ga=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Ln={};function Tr(e){Ln=e}function oo(){return Ln}var wr=class{scrapeMotionValuesFromProps(t,r,n){return{}}constructor({parent:t,props:r,presenceContext:n,reducedMotionConfig:i,skipAnimations:s,blockInitialAnimation:o,visualState:a},c={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Ye,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let d=z.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,P.render(this.render,!1,!0))};let{latestValues:u,renderState:l}=a;this.latestValues=u,this.baseTarget={...u},this.initialValues=r.initial?{...u}:{},this.renderState=l,this.parent=t,this.props=r,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=s,this.options=c,this.blockInitialAnimation=!!o,this.isControllingVariants=qe(r),this.isVariantNode=vr(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);let{willChange:f,...m}=this.scrapeMotionValuesFromProps(r,{},this);for(let d in m){let p=m[d];u[d]!==void 0&&k(p)&&p.set(u[d])}}mount(t){var r,n,i;if(this.hasBeenMounted)for(let s in this.initialValues)(r=this.values.get(s))==null||r.jump(this.initialValues[s]),this.latestValues[s]=this.initialValues[s];this.current=t,da.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((s,o)=>this.bindToMotionValue(o,s)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(kn.current||ha(),this.shouldReduceMotion=br.current),this.shouldSkipAnimations=(n=this.skipAnimationsConfig)!=null?n:!1,(i=this.parent)==null||i.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var t;this.projection&&this.projection.unmount(),ae(this.notifyUpdate),ae(this.render),this.valueSubscriptions.forEach(r=>r()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(let r in this.events)this.events[r].clear();for(let r in this.features){let n=this.features[r];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(t){var r;this.children.add(t),(r=this.enteringChildren)!=null||(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,r){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),r.accelerate&&dn.has(t)&&this.current instanceof HTMLElement){let{factory:o,keyframes:a,times:c,ease:u,duration:l}=r.accelerate,f=new At({element:this.current,name:t,keyframes:a,times:c,ease:u,duration:U(l)}),m=o(f);this.valueSubscriptions.set(t,()=>{m(),f.cancel()});return}let n=he.has(t);n&&this.onBindTransform&&this.onBindTransform();let i=r.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&P.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),s;typeof window!="undefined"&&window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,r)),this.valueSubscriptions.set(t,()=>{i(),s&&s()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Ln){let r=Ln[t];if(!r)continue;let{isEnabled:n,Feature:i}=r;if(!this.features[t]&&i&&n(this.props)&&(this.features[t]=new i(this)),this.features[t]){let s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):N()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,r){this.latestValues[t]=r}update(t,r){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=r;for(let n=0;n<ga.length;n++){let i=ga[n];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);let s="on"+i,o=t[s];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=pa(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){let r=this.getClosestVariantNode();if(r)return r.variantChildren&&r.variantChildren.add(t),()=>r.variantChildren.delete(t)}addValue(t,r){let n=this.values.get(t);r!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,r),this.values.set(t,r),this.latestValues[t]=r.get())}removeValue(t){this.values.delete(t);let r=this.valueSubscriptions.get(t);r&&(r(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,r){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return n===void 0&&r!==void 0&&(n=be(r===null?void 0:r,{owner:this}),this.addValue(t,n)),n}readValue(t,r){var i;let n=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(i=this.getBaseTargetFromProps(this.props,t))!=null?i:this.readValueFromInstance(this.current,t,this.options);return n!=null&&(typeof n=="string"&&(Yt(n)||Xt(n))?n=parseFloat(n):!ma(n)&&X.test(r)&&(n=Sn(t,r)),this.setBaseTarget(t,k(n)?n.get():n)),k(n)?n.get():n}setBaseTarget(t,r){this.baseTarget[t]=r}getBaseTarget(t){var s;let{initial:r}=this.props,n;if(typeof r=="string"||typeof r=="object"){let o=lt(this.props,r,(s=this.presenceContext)==null?void 0:s.custom);o&&(n=o[t])}if(r&&n!==void 0)return n;let i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!k(i)?i:this.initialValues[t]!==void 0&&n===void 0?void 0:this.baseTarget[t]}on(t,r){return this.events[t]||(this.events[t]=new ke),this.events[t].add(r)}notify(t,...r){this.events[t]&&this.events[t].notify(...r)}scheduleRenderMicrotask(){ut.render(this.render)}};var Nt=class extends wr{constructor(){super(...arguments),this.KeyframeResolver=Vn}sortInstanceNodePosition(t,r){return t.compareDocumentPosition(r)&2?1:-1}getBaseTargetFromProps(t,r){let n=t.style;return n?n[r]:void 0}removeValueFromRenderState(t,{vars:r,style:n}){delete r[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:t}=this.props;k(t)&&(this.childSubscription=t.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}};var q=class{constructor(t){this.isMounted=!1,this.node=t}update(){}};function Sr({top:e,left:t,right:r,bottom:n}){return{x:{min:t,max:r},y:{min:e,max:n}}}function so({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function ao(e,t){if(!t)return e;let r=t({x:e.left,y:e.top}),n=t({x:e.right,y:e.bottom});return{top:r.y,left:r.x,bottom:n.y,right:n.x}}function lo(e){return e===void 0||e===1}function In({scale:e,scaleX:t,scaleY:r}){return!lo(e)||!lo(t)||!lo(r)}function Be(e){return In(e)||co(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function co(e){return xa(e.x)||xa(e.y)}function xa(e){return e&&e!=="0%"}function Vr(e,t,r){let n=e-r,i=t*n;return r+i}function ya(e,t,r,n,i){return i!==void 0&&(e=Vr(e,i,n)),Vr(e,r,n)+t}function uo(e,t=0,r=1,n,i){e.min=ya(e.min,t,r,n,i),e.max=ya(e.max,t,r,n,i)}function fo(e,{x:t,y:r}){uo(e.x,t.translate,t.scale,t.originPoint),uo(e.y,r.translate,r.scale,r.originPoint)}var va=.999999999999,ba=1.0000000000001;function Sa(e,t,r,n=!1){var a;let i=r.length;if(!i)return;t.x=t.y=1;let s,o;for(let c=0;c<i;c++){s=r[c],o=s.projectionDelta;let{visualElement:u}=s.options;u&&u.props.style&&u.props.style.display==="contents"||(n&&s.options.layoutScroll&&s.scroll&&s!==s.root&&(xe(e.x,-s.scroll.offset.x),xe(e.y,-s.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,fo(e,o)),n&&Be(s.latestValues)&&Cr(e,s.latestValues,(a=s.layout)==null?void 0:a.layoutBox))}t.x<ba&&t.x>va&&(t.x=1),t.y<ba&&t.y>va&&(t.y=1)}function xe(e,t){e.min+=t,e.max+=t}function wa(e,t,r,n,i=.5){let s=M(e.min,e.max,i);uo(e,t,r,s,n)}function Ta(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function Cr(e,t,r){let n=r!=null?r:e;wa(e.x,Ta(t.x,n.x),t.scaleX,t.scale,t.originX),wa(e.y,Ta(t.y,n.y),t.scaleY,t.scale,t.originY)}function On(e,t){return Sr(ao(e.getBoundingClientRect(),t))}function mo(e,t,r){let n=On(e,r),{scroll:i}=t;return i&&(xe(n.x,i.offset.x),xe(n.y,i.offset.y)),n}var rf={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},nf=Ce.length;function Va(e,t,r){let n="",i=!0;for(let o=0;o<nf;o++){let a=Ce[o],c=e[a];if(c===void 0)continue;let u=!0;if(typeof c=="number")u=c===(a.startsWith("scale")?1:0);else{let l=parseFloat(c);u=a.startsWith("scale")?l===1:l===0}if(!u||r){let l=xr(c,ct[a]);if(!u){i=!1;let f=rf[a]||a;n+=`${f}(${l}) `}r&&(t[a]=l)}}let s=e.pathRotation;return s&&(i=!1,n+=`rotate(${xr(s,ct.pathRotation)}) `),n=n.trim(),r?n=r(t,i?"":n):i&&(n="none"),n}function dt(e,t,r){let{style:n,vars:i,transformOrigin:s}=e,o=!1,a=!1;for(let c in t){let u=t[c];if(he.has(c)){o=!0;continue}else if(qr(c)){i[c]=u;continue}else{let l=xr(u,ct[c]);c.startsWith("origin")?(a=!0,s[c]=l):n[c]=l}}if(t.transform||(o||r?n.transform=Va(t,e.transform,r):n.transform&&(n.transform="none")),a){let{originX:c="50%",originY:u="50%",originZ:l=0}=s;n.transformOrigin=`${c} ${u} ${l}`}}function Nn(e,{style:t,vars:r},n,i){let s=e.style,o;for(o in t)s[o]=t[o];i==null||i.applyProjectionStyles(s,n);for(o in r)s.setProperty(o,r[o])}function Ca(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var Bt={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(T.test(e))e=parseFloat(e);else return e;let r=Ca(e,t.target.x),n=Ca(e,t.target.y);return`${r}% ${n}%`}};var Pa={correct:(e,{treeScale:t,projectionDelta:r})=>{let n=e,i=X.parse(e);if(i.length>5)return n;let s=X.createTransformer(e),o=typeof i[0]!="number"?1:0,a=r.x.scale*t.x,c=r.y.scale*t.y;i[0+o]/=a,i[1+o]/=c;let u=M(a,c,.5);return typeof i[2+o]=="number"&&(i[2+o]/=u),typeof i[3+o]=="number"&&(i[3+o]/=u),s(i)}};var Pr={borderRadius:{...Bt,applyTo:[...gr]},borderTopLeftRadius:Bt,borderTopRightRadius:Bt,borderBottomLeftRadius:Bt,borderBottomRightRadius:Bt,boxShadow:Pa};function Er(e,{layout:t,layoutId:r}){return he.has(e)||e.startsWith("origin")||(t||r!==void 0)&&(!!Pr[e]||e==="opacity")}function pt(e,t,r){var o;let n=e.style,i=t==null?void 0:t.style,s={};if(!n)return s;for(let a in n)(k(n[a])||i&&k(i[a])||Er(a,e)||((o=r==null?void 0:r.getValue(a))==null?void 0:o.liveStyle)!==void 0)&&(s[a]=n[a]);return s}function of(e){return window.getComputedStyle(e)}var Mr=class extends Nt{constructor(){super(...arguments),this.type="html",this.renderInstance=Nn}mount(t){se(!!t.style,"motion.create() components must forward their ref to a HTML or SVG element","custom-component-ref"),super.mount(t)}readValueFromInstance(t,r){var n;if(he.has(r))return(n=this.projection)!=null&&n.isProjecting?sn(r):As(t,r);{let i=of(t),s=(qr(r)?i.getPropertyValue(r):i[r])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:r}){return On(t,r)}build(t,r,n){dt(t,r,n.transformTemplate)}scrapeMotionValuesFromProps(t,r,n){return pt(t,r,n)}};var sf={offset:"stroke-dashoffset",array:"stroke-dasharray"},af={offset:"strokeDashoffset",array:"strokeDasharray"};function Ea(e,t,r=1,n=0,i=!0){e.pathLength=1;let s=i?sf:af;e[s.offset]=`${-n}`,e[s.array]=`${t} ${r}`}var lf=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Ar(e,{attrX:t,attrY:r,attrScale:n,pathLength:i,pathSpacing:s=1,pathOffset:o=0,...a},c,u,l){var d,p;if(dt(e,a,u),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:f,style:m}=e;f.transform&&(m.transform=f.transform,delete f.transform),(m.transform||f.transformOrigin)&&(m.transformOrigin=(d=f.transformOrigin)!=null?d:"50% 50%",delete f.transformOrigin),m.transform&&(m.transformBox=(p=l==null?void 0:l.transformBox)!=null?p:"fill-box",delete f.transformBox);for(let x of lf)f[x]!==void 0&&(m[x]=f[x],delete f[x]);t!==void 0&&(f.x=t),r!==void 0&&(f.y=r),n!==void 0&&(f.scale=n),i!==void 0&&Ea(f,i,s,o,!1)}var Bn=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);var Dr=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Ma(e,t,r,n){Nn(e,t,void 0,n);for(let i in t.attrs)e.setAttribute(Bn.has(i)?i:kt(i),t.attrs[i])}function Rr(e,t,r){let n=pt(e,t,r);for(let i in e)if(k(e[i])||k(t[i])){let s=Ce.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;n[s]=e[i]}return n}var kr=class extends Nt{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=N}getBaseTargetFromProps(t,r){return t[r]}readValueFromInstance(t,r){if(he.has(r)){let n=Tn(r);return n&&n.default||0}return r=Bn.has(r)?r:kt(r),t.getAttribute(r)}scrapeMotionValuesFromProps(t,r,n){return Rr(t,r,n)}build(t,r,n){Ar(t,r,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,r,n,i){Ma(t,r,n,i)}mount(t){this.isSVGTag=Dr(t.tagName),super.mount(t)}};var cf=yr.length;function po(e){if(!e)return;if(!e.isControllingVariants){let r=e.parent?po(e.parent)||{}:{};return e.props.initial!==void 0&&(r.initial=e.props.initial),r}let t={};for(let r=0;r<cf;r++){let n=yr[r],i=e.props[n];(Pe(i)||i===!1)&&(t[n]=i)}return t}function ho(e,t){if(!Array.isArray(t))return!1;let r=t.length;if(r!==e.length)return!1;for(let n=0;n<r;n++)if(t[n]!==e[n])return!1;return!0}var uf=[...Rn].reverse(),ff=Rn.length;function mf(e){return t=>Promise.all(t.map(({animation:r,options:n})=>Js(e,r,n)))}function go(e){let t=mf(e),r=Aa(),n=!0,i=!1,s=u=>(l,f)=>{var d;let m=ce(e,f,u==="exit"?(d=e.presenceContext)==null?void 0:d.custom:void 0);if(m){let{transition:p,transitionEnd:x,...y}=m;l={...l,...y,...x}}return l};function o(u){t=u(e)}function a(u){let{props:l}=e,f=po(e.parent)||{},m=[],d=new Set,p={},x=1/0;for(let v=0;v<ff;v++){let b=uf[v],w=r[b],g=l[b]!==void 0?l[b]:f[b],S=Pe(g),E=b===u?w.isActive:null;E===!1&&(x=v);let A=g===f[b]&&g!==l[b]&&S;if(A&&(n||i)&&e.manuallyAnimateOnMount&&(A=!1),w.protectedKeys={...p},!w.isActive&&E===null||!g&&!w.prevProp||Ne(g)||typeof g=="boolean")continue;if(b==="exit"&&w.isActive&&E!==!0){w.prevResolvedValues&&(p={...p,...w.prevResolvedValues});continue}let V=Da(w.prevProp,g),L=V||b===u&&w.isActive&&!A&&S||v>x&&S,C=!1,I=Array.isArray(g)?g:[g],R=I.reduce(s(b),{});E===!1&&(R={});let{prevResolvedValues:H={}}=w,J={...H,...R},re=Y=>{L=!0,d.has(Y)&&(C=!0,d.delete(Y)),w.needsAnimating[Y]=!0;let B=e.getValue(Y);B&&(B.liveStyle=!1)};for(let Y in J){let B=R[Y],we=H[Y];if(p.hasOwnProperty(Y))continue;let De=!1;mr(B)&&mr(we)?De=!ho(B,we)||V:De=B!==we,De?B!=null?re(Y):d.add(Y):B!==void 0&&d.has(Y)?re(Y):w.protectedKeys[Y]=!0}w.prevProp=g,w.prevResolvedValues=R,w.isActive&&(p={...p,...R}),(n||i)&&e.blockInitialAnimation&&(L=!1);let me=A&&V;L&&(!me||C)&&m.push(...I.map(Y=>{let B={type:b};if(typeof Y=="string"&&(n||i)&&!me&&e.manuallyAnimateOnMount&&e.parent){let{parent:we}=e,De=ce(we,Y);if(we.enteringChildren&&De){let{delayChildren:yi}=De.transition||{};B.delay=hn(we.enteringChildren,e,yi)}}return{animation:Y,options:B}}))}if(d.size){let v={};if(typeof l.initial!="boolean"){let b=ce(e,Array.isArray(l.initial)?l.initial[0]:l.initial);b&&b.transition&&(v.transition=b.transition)}d.forEach(b=>{let w=e.getBaseTarget(b),g=e.getValue(b);g&&(g.liveStyle=!0),v[b]=w!=null?w:null}),m.push({animation:v})}let y=!!m.length;return n&&(l.initial===!1||l.initial===l.animate)&&!e.manuallyAnimateOnMount&&(y=!1),n=!1,i=!1,y?t(m):Promise.resolve()}function c(u,l){var m;if(r[u].isActive===l)return Promise.resolve();(m=e.variantChildren)==null||m.forEach(d=>{var p;return(p=d.animationState)==null?void 0:p.setActive(u,l)}),r[u].isActive=l;let f=a(u);for(let d in r)r[d].protectedKeys={};return f}return{animateChanges:a,setActive:c,setAnimateFunction:o,getState:()=>r,reset:()=>{r=Aa(),i=!0}}}function Da(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!ho(t,e):!1}function ht(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Aa(){return{animate:ht(!0),whileInView:ht(),whileHover:ht(),whileTap:ht(),whileDrag:ht(),whileFocus:ht(),exit:ht()}}function Fn(e,t){e.min=t.min,e.max=t.max}function ye(e,t){Fn(e.x,t.x),Fn(e.y,t.y)}function xo(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var Ra=1e-4,df=1-Ra,pf=1+Ra,ka=.01,hf=0-ka,gf=0+ka;function K(e){return e.max-e.min}function wo(e,t,r){return Math.abs(e-t)<=r}function yo(e,t,r,n=.5){e.origin=n,e.originPoint=M(t.min,t.max,e.origin),e.scale=K(r)/K(t),e.translate=M(r.min,r.max,e.origin)-e.originPoint,(e.scale>=df&&e.scale<=pf||isNaN(e.scale))&&(e.scale=1),(e.translate>=hf&&e.translate<=gf||isNaN(e.translate))&&(e.translate=0)}function gt(e,t,r,n){yo(e.x,t.x,r.x,n?n.originX:void 0),yo(e.y,t.y,r.y,n?n.originY:void 0)}function vo(e,t,r,n=0){let i=n?M(r.min,r.max,n):r.min;e.min=i+t.min,e.max=e.min+K(t)}function To(e,t,r,n){vo(e.x,t.x,r.x,n==null?void 0:n.x),vo(e.y,t.y,r.y,n==null?void 0:n.y)}function bo(e,t,r,n=0){let i=n?M(r.min,r.max,n):r.min;e.min=t.min-i,e.max=e.min+K(t)}function Ft(e,t,r,n){bo(e.x,t.x,r.x,n==null?void 0:n.x),bo(e.y,t.y,r.y,n==null?void 0:n.y)}function La(e,t,r,n,i){return e-=t,e=Vr(e,1/r,n),i!==void 0&&(e=Vr(e,1/i,n)),e}function xf(e,t=0,r=1,n=.5,i,s=e,o=e){if(te.test(t)&&(t=parseFloat(t),t=M(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=M(s.min,s.max,n);e===s&&(a-=t),e.min=La(e.min,t,r,a,i),e.max=La(e.max,t,r,a,i)}function Ia(e,t,[r,n,i],s,o){xf(e,t[r],t[n],t[i],t.scale,s,o)}var yf=["x","scaleX","originX"],vf=["y","scaleY","originY"];function So(e,t,r,n){Ia(e.x,t,yf,r?r.x:void 0,n?n.x:void 0),Ia(e.y,t,vf,r?r.y:void 0,n?n.y:void 0)}function Oa(e){return e.translate===0&&e.scale===1}function Vo(e){return Oa(e.x)&&Oa(e.y)}function Na(e,t){return e.min===t.min&&e.max===t.max}function Fa(e,t){return Na(e.x,t.x)&&Na(e.y,t.y)}function Ba(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Co(e,t){return Ba(e.x,t.x)&&Ba(e.y,t.y)}function Po(e){return K(e.x)/K(e.y)}function Eo(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function ue(e){return[e("x"),e("y")]}function ja(e,t,r){let n="",i=e.x.translate/t.x,s=e.y.translate/t.y,o=(r==null?void 0:r.z)||0;if((i||s||o)&&(n=`translate3d(${i}px, ${s}px, ${o}px) `),(t.x!==1||t.y!==1)&&(n+=`scale(${1/t.x}, ${1/t.y}) `),r){let{transformPerspective:u,rotate:l,pathRotation:f,rotateX:m,rotateY:d,skewX:p,skewY:x}=r;u&&(n=`perspective(${u}px) ${n}`),l&&(n+=`rotate(${l}deg) `),f&&(n+=`rotate(${f}deg) `),m&&(n+=`rotateX(${m}deg) `),d&&(n+=`rotateY(${d}deg) `),p&&(n+=`skewX(${p}deg) `),x&&(n+=`skewY(${x}deg) `)}let a=e.x.scale*t.x,c=e.y.scale*t.y;return(a!==1||c!==1)&&(n+=`scale(${a}, ${c})`),n||"none"}var bf=gr.length,za=e=>typeof e=="string"?parseFloat(e):e,Ga=e=>typeof e=="number"||T.test(e);function Ua(e,t,r,n,i,s){var o,a,c,u;i?(e.opacity=M(0,(o=r.opacity)!=null?o:1,wf(n)),e.opacityExit=M((a=t.opacity)!=null?a:1,0,Tf(n))):s&&(e.opacity=M((c=t.opacity)!=null?c:1,(u=r.opacity)!=null?u:1,n));for(let l=0;l<bf;l++){let f=gr[l],m=Wa(t,f),d=Wa(r,f);if(m===void 0&&d===void 0)continue;m||(m=0),d||(d=0),m===0||d===0||Ga(m)===Ga(d)?(e[f]=Math.max(M(za(m),za(d),n),0),(te.test(d)||te.test(m))&&(e[f]+="%")):e[f]=d}(t.rotate||r.rotate)&&(e.rotate=M(t.rotate||0,r.rotate||0,n))}function Wa(e,t){return e[t]!==void 0?e[t]:e.borderRadius}var wf=Ha(0,.5,tr),Tf=Ha(.5,.95,j);function Ha(e,t,r){return n=>n<e?0:n>t?1:r(Te(e,t,n))}function Ka(e,t,r){let n=k(e)?e:be(e);return n.start(at("",n,t,r)),n.animation}function Ee(e,t,r,n={passive:!0}){return e.addEventListener(t,r,n),()=>e.removeEventListener(t,r,n)}var _a=(e,t)=>e.depth-t.depth;var jn=class{constructor(){this.children=[],this.isDirty=!1}add(t){rt(this.children,t),this.isDirty=!0}remove(t){ze(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(_a),this.isDirty=!1,this.children.forEach(t)}};function Ya(e,t){let r=z.now(),n=({timestamp:i})=>{let s=i-r;s>=t&&(ae(n),e(s-t))};return P.setup(n,!0),()=>ae(n)}function xt(e){return k(e)?e.get():e}var zn=class{constructor(){this.members=[]}add(t){rt(this.members,t);for(let r=this.members.length-1;r>=0;r--){let n=this.members[r];if(n===t||n===this.lead||n===this.prevLead)continue;let i=n.instance;(!i||i.isConnected===!1)&&!n.snapshot&&(ze(this.members,n),n.unmount())}t.scheduleRender()}remove(t){if(ze(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){let r=this.members[this.members.length-1];r&&this.promote(r)}}relegate(t){var r;for(let n=this.members.indexOf(t)-1;n>=0;n--){let i=this.members[n];if(i.isPresent!==!1&&((r=i.instance)==null?void 0:r.isConnected)!==!1)return this.promote(i),!0}return!1}promote(t,r){var i;let n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.updateSnapshot(),t.scheduleRender();let{layoutDependency:s}=n.options,{layoutDependency:o}=t.options;(s===void 0||s!==o)&&(t.resumeFrom=n,r&&(n.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),(i=t.root)!=null&&i.isUpdating&&(t.isLayoutDirty=!0)),t.options.crossfade===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var r,n,i,s,o;(n=(r=t.options).onExitComplete)==null||n.call(r),(o=(i=t.resumingFrom)==null?void 0:(s=i.options).onExitComplete)==null||o.call(s)})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){var t;(t=this.lead)!=null&&t.snapshot&&(this.lead.snapshot=void 0)}};var yt={hasAnimatedSinceResize:!0,hasEverUpdated:!1};var vt={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},Mo=["","X","Y","Z"],Sf=1e3,Vf=0;function Ao(e,t,r,n){let{latestValues:i}=t;i[e]&&(r[e]=i[e],t.setStaticValue(e,0),n&&(n[e]=0))}function rl(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let r=yn(t);if(window.MotionHasOptimisedAnimation(r,"transform")){let{layout:i,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(r,"transform",P,!(i||s))}let{parent:n}=e;n&&!n.hasCheckedOptimisedAppear&&rl(n)}function Gn({attachResizeListener:e,defaultParent:t,measureScroll:r,checkIsScrollRoot:n,resetTransform:i}){return class{constructor(o={},a=t==null?void 0:t()){this.id=Vf++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,mt.value&&(vt.nodes=vt.calculatedTargetDeltas=vt.calculatedProjections=0),this.nodes.forEach(Ef),this.nodes.forEach(Lf),this.nodes.forEach(If),this.nodes.forEach(Mf),mt.addProjectionMetrics&&mt.addProjectionMetrics(vt)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new jn)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new ke),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){let c=this.eventHandlers.get(o);c&&c.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=It(o)&&!fa(o),this.instance=o;let{layoutId:a,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||a)&&(this.isLayoutDirty=!0),e){let l,f=0,m=()=>this.root.updateBlockedByResize=!1;P.read(()=>{f=window.innerWidth}),e(o,()=>{let d=window.innerWidth;d!==f&&(f=d,this.root.updateBlockedByResize=!0,l&&l(),l=Ya(m,250),yt.hasAnimatedSinceResize&&(yt.hasAnimatedSinceResize=!1,this.nodes.forEach(qa)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||c)&&this.addEventListener("didUpdate",({delta:l,hasLayoutChanged:f,hasRelativeLayoutChanged:m,layout:d})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let p=this.options.transition||u.getDefaultTransition()||jf,{onLayoutAnimationStart:x,onLayoutAnimationComplete:y}=u.getProps(),v=!this.targetLayout||!Co(this.targetLayout,d),b=!f&&m;if(this.options.layoutRoot||this.resumeFrom||b||f&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let w={...Dt(p,"layout"),onPlay:x,onComplete:y};(u.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w),this.setAnimationOrigin(l,b,w.path)}else f||qa(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=d})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),ae(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Of),this.animationId++)}getTransformTemplate(){let{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&rl(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let l=0;l<this.path.length;l++){let f=this.path[l];f.shouldResetTransform=!0,(typeof f.latestValues.x=="string"||typeof f.latestValues.y=="string")&&(f.isLayoutDirty=!0),f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}let{layoutId:a,layout:c}=this.options;if(a===void 0&&!c)return;let u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){let c=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),c&&this.nodes.forEach(Df),this.nodes.forEach($a);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Xa);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Rf),this.nodes.forEach(kf),this.nodes.forEach(Cf),this.nodes.forEach(Pf)):this.nodes.forEach(Xa),this.clearAllSnapshots();let a=z.now();W.delta=$(0,1e3/60,a-W.timestamp),W.timestamp=a,W.isProcessing=!0,sr.update.process(W),sr.preRender.process(W),sr.render.process(W),W.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,ut.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Af),this.sharedNodes.forEach(Nf)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,P.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){P.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!K(this.snapshot.measuredBox.x)&&!K(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();let o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=N()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);let{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&this.instance){let c=n(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:c,offset:r(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!i)return;let o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Vo(this.projectionDelta),c=this.getTransformTemplate(),u=c?c(this.latestValues,""):void 0,l=u!==this.prevTransformTemplateValue;o&&this.instance&&(a||Be(this.latestValues)||l)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){let a=this.measurePageBox(),c=this.removeElementScroll(a);return o&&(c=this.removeTransform(c)),zf(c),{animationId:this.root.animationId,measuredBox:a,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var u;let{visualElement:o}=this.options;if(!o)return N();let a=o.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(Gf))){let{scroll:l}=this.root;l&&(xe(a.x,l.offset.x),xe(a.y,l.offset.y))}return a}removeElementScroll(o){var c;let a=N();if(ye(a,o),(c=this.scroll)!=null&&c.wasRoot)return a;for(let u=0;u<this.path.length;u++){let l=this.path[u],{scroll:f,options:m}=l;l!==this.root&&f&&m.layoutScroll&&(f.wasRoot&&ye(a,o),xe(a.x,f.offset.x),xe(a.y,f.offset.y))}return a}applyTransform(o,a=!1,c){var l,f;let u=c||N();ye(u,o);for(let m=0;m<this.path.length;m++){let d=this.path[m];!a&&d.options.layoutScroll&&d.scroll&&d!==d.root&&(xe(u.x,-d.scroll.offset.x),xe(u.y,-d.scroll.offset.y)),Be(d.latestValues)&&Cr(u,d.latestValues,(l=d.layout)==null?void 0:l.layoutBox)}return Be(this.latestValues)&&Cr(u,this.latestValues,(f=this.layout)==null?void 0:f.layoutBox),u}removeTransform(o){var c;let a=N();ye(a,o);for(let u=0;u<this.path.length;u++){let l=this.path[u];if(!Be(l.latestValues))continue;let f;l.instance&&(In(l.latestValues)&&l.updateSnapshot(),f=N(),ye(f,l.measurePageBox())),So(a,l.latestValues,(c=l.snapshot)==null?void 0:c.layoutBox,f)}return Be(this.latestValues)&&So(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==W.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var d;let a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);let c=!!this.resumingFrom||this!==a;if(!(o||c&&this.isSharedProjectionDirty||this.isProjectionDirty||(d=this.parent)!=null&&d.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:l,layoutId:f}=this.options;if(!this.layout||!(l||f))return;this.resolvedRelativeTargetAt=W.timestamp;let m=this.getClosestProjectingParent();m&&this.linkedParentVersion!==m.layoutVersion&&!m.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&m&&m.layout?this.createRelativeTarget(m,this.layout.layoutBox,m.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=N(),this.targetWithTransforms=N()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),To(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):ye(this.target,this.layout.layoutBox),fo(this.target,this.targetDelta)):ye(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&m&&!!m.resumingFrom==!!this.resumingFrom&&!m.options.layoutScroll&&m.target&&this.animationProgress!==1?this.createRelativeTarget(m,this.target,m.target):this.relativeParent=this.relativeTarget=void 0),mt.value&&vt.calculatedTargetDeltas++)}getClosestProjectingParent(){if(!(!this.parent||In(this.parent.latestValues)||co(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(o,a,c){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=N(),this.relativeTargetOrigin=N(),Ft(this.relativeTargetOrigin,a,c,this.options.layoutAnchor||void 0),ye(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var p;let o=this.getLead(),a=!!this.resumingFrom||this!==o,c=!0;if((this.isProjectionDirty||(p=this.parent)!=null&&p.isProjectionDirty)&&(c=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===W.timestamp&&(c=!1),c)return;let{layout:u,layoutId:l}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||l))return;ye(this.layoutCorrected,this.layout.layoutBox);let f=this.treeScale.x,m=this.treeScale.y;Sa(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=N());let{target:d}=o;if(!d){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(xo(this.prevProjectionDelta.x,this.projectionDelta.x),xo(this.prevProjectionDelta.y,this.projectionDelta.y)),gt(this.projectionDelta,this.layoutCorrected,d,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==m||!Eo(this.projectionDelta.x,this.prevProjectionDelta.x)||!Eo(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",d)),mt.value&&vt.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),o){let c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Xe(),this.projectionDelta=Xe(),this.projectionDeltaWithTransform=Xe()}setAnimationOrigin(o,a=!1,c){let u=this.snapshot,l=u?u.latestValues:{},f={...this.latestValues},m=Xe();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;let d=N(),p=u?u.source:void 0,x=this.layout?this.layout.source:void 0,y=p!==x,v=this.getStack(),b=!v||v.members.length<=1,w=!!(y&&!b&&this.options.crossfade===!0&&!this.path.some(Ff));this.animationProgress=0;let g,S=c==null?void 0:c.interpolateProjection(o);this.mixTargetDelta=E=>{let A=E/1e3,V=S==null?void 0:S(A);V?(m.x.translate=V.x,m.x.scale=M(o.x.scale,1,A),m.x.origin=o.x.origin,m.x.originPoint=o.x.originPoint,m.y.translate=V.y,m.y.scale=M(o.y.scale,1,A),m.y.origin=o.y.origin,m.y.originPoint=o.y.originPoint):(Za(m.x,o.x,A),Za(m.y,o.y,A)),this.setTargetDelta(m),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ft(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),Bf(this.relativeTarget,this.relativeTargetOrigin,d,A),g&&Fa(this.relativeTarget,g)&&(this.isProjectionDirty=!1),g||(g=N()),ye(g,this.relativeTarget)),y&&(this.animationValues=f,Ua(f,l,this.latestValues,A,w,b)),V&&V.rotate!==void 0&&(this.animationValues||(this.animationValues=f),this.animationValues.pathRotation=V.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=A},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,c,u;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(u=(c=this.resumingFrom)==null?void 0:c.currentAnimation)==null||u.stop(),this.pendingAnimation&&(ae(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=P.update(()=>{yt.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=be(0)),this.motionValue.jump(0,!1),this.currentAnimation=Ka(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:l=>{this.mixTargetDelta(l),o.onUpdate&&o.onUpdate(l)},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Sf),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let o=this.getLead(),{targetWithTransforms:a,target:c,layout:u,latestValues:l}=o;if(!(!a||!c||!u)){if(this!==o&&this.layout&&u&&nl(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||N();let f=K(this.layout.layoutBox.x);c.x.min=o.target.x.min,c.x.max=c.x.min+f;let m=K(this.layout.layoutBox.y);c.y.min=o.target.y.min,c.y.max=c.y.min+m}ye(a,c),Cr(a,l),gt(this.projectionDeltaWithTransform,this.layoutCorrected,a,l)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new zn),this.sharedNodes.get(o).add(a);let u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){let o=this.getStack();return o?o.lead===this:!0}getLead(){var a;let{layoutId:o}=this.options;return o?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;let{layoutId:o}=this.options;return o?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){let{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:c}={}){let u=this.getStack();u&&u.promote(this,c),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){let o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){let{visualElement:o}=this.options;if(!o)return;let a=!1,{latestValues:c}=o;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(a=!0),!a)return;let u={};c.z&&Ao("z",o,u,this.animationValues);for(let l=0;l<Mo.length;l++)Ao(`rotate${Mo[l]}`,o,u,this.animationValues),Ao(`skew${Mo[l]}`,o,u,this.animationValues);o.render();for(let l in u)o.setStaticValue(l,u[l]),this.animationValues&&(this.animationValues[l]=u[l]);o.scheduleRender()}applyProjectionStyles(o,a){var p,x;if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}let c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=xt(a==null?void 0:a.pointerEvents)||"",o.transform=c?c(this.latestValues,""):"none";return}let u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=xt(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!Be(this.latestValues)&&(o.transform=c?c({},""):"none",this.hasProjected=!1);return}o.visibility="";let l=u.animationValues||u.latestValues;this.applyTransformsToTarget();let f=ja(this.projectionDeltaWithTransform,this.treeScale,l);c&&(f=c(l,f)),o.transform=f;let{x:m,y:d}=this.projectionDelta;o.transformOrigin=`${m.origin*100}% ${d.origin*100}% 0`,u.animationValues?o.opacity=u===this?(x=(p=l.opacity)!=null?p:this.latestValues.opacity)!=null?x:1:this.preserveOpacity?this.latestValues.opacity:l.opacityExit:o.opacity=u===this?l.opacity!==void 0?l.opacity:"":l.opacityExit!==void 0?l.opacityExit:0;for(let y in Pr){if(l[y]===void 0)continue;let{correct:v,applyTo:b,isCSSVariable:w}=Pr[y],g=f==="none"?l[y]:v(l[y],u);if(b){let S=b.length;for(let E=0;E<S;E++)o[b[E]]=g}else w?this.options.visualElement.renderState.vars[y]=g:o[y]=g}this.options.layoutId&&(o.pointerEvents=u===this?xt(a==null?void 0:a.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach($a),this.root.sharedNodes.clear()}}}function Cf(e){e.updateLayout()}function Pf(e){var r;let t=((r=e.resumeFrom)==null?void 0:r.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){let{layoutBox:n,measuredBox:i}=e.layout,{animationType:s}=e.options,o=t.source!==e.layout.source;if(s==="size")ue(f=>{let m=o?t.measuredBox[f]:t.layoutBox[f],d=K(m);m.min=n[f].min,m.max=m.min+d});else if(s==="x"||s==="y"){let f=s==="x"?"y":"x";Fn(o?t.measuredBox[f]:t.layoutBox[f],n[f])}else nl(s,t.layoutBox,n)&&ue(f=>{let m=o?t.measuredBox[f]:t.layoutBox[f],d=K(n[f]);m.max=m.min+d,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+d)});let a=Xe();gt(a,n,t.layoutBox);let c=Xe();o?gt(c,e.applyTransform(i,!0),t.measuredBox):gt(c,n,t.layoutBox);let u=!Vo(a),l=!1;if(!e.resumeFrom){let f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){let{snapshot:m,layout:d}=f;if(m&&d){let p=e.options.layoutAnchor||void 0,x=N();Ft(x,t.layoutBox,m.layoutBox,p);let y=N();Ft(y,n,d.layoutBox,p),Co(x,y)||(l=!0),f.options.layoutRoot&&(e.relativeTarget=y,e.relativeTargetOrigin=x,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:c,layoutDelta:a,hasLayoutChanged:u,hasRelativeLayoutChanged:l})}else if(e.isLead()){let{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function Ef(e){mt.value&&vt.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function Mf(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Af(e){e.clearSnapshot()}function $a(e){e.clearMeasurements()}function Df(e){e.isLayoutDirty=!0,e.updateLayout()}function Xa(e){e.isLayoutDirty=!1}function Rf(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function kf(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function qa(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Lf(e){e.resolveTargetDelta()}function If(e){e.calcProjection()}function Of(e){e.resetSkewAndRotation()}function Nf(e){e.removeLeadSnapshot()}function Za(e,t,r){e.translate=M(t.translate,0,r),e.scale=M(t.scale,1,r),e.origin=t.origin,e.originPoint=t.originPoint}function Ja(e,t,r,n){e.min=M(t.min,r.min,n),e.max=M(t.max,r.max,n)}function Bf(e,t,r,n){Ja(e.x,t.x,r.x,n),Ja(e.y,t.y,r.y,n)}function Ff(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var jf={duration:.45,ease:[.4,0,.1,1]},Qa=e=>typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),el=Qa("applewebkit/")&&!Qa("chrome/")?Math.round:j;function tl(e){e.min=el(e.min),e.max=el(e.max)}function zf(e){tl(e.x),tl(e.y)}function nl(e,t,r){return e==="position"||e==="preserve-aspect"&&!wo(Po(t),Po(r),.2)}function Gf(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}var il=Gn({attachResizeListener:(e,t)=>Ee(e,"resize",t),measureScroll:()=>{var e,t;return{x:document.documentElement.scrollLeft||((e=document.body)==null?void 0:e.scrollLeft)||0,y:document.documentElement.scrollTop||((t=document.body)==null?void 0:t.scrollTop)||0}},checkIsScrollRoot:()=>!0});var Wn={current:void 0},Lr=Gn({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Wn.current){let e=new il({});e.mount(window),e.setOptions({layoutScroll:!0}),Wn.current=e}return Wn.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"});var ol=require("react"),Un=(0,ol.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});var Ze=require("react");function sl(e=!0){let t=(0,Ze.useContext)(wt);if(t===null)return[!0,null];let{isPresent:r,onExitComplete:n,register:i}=t,s=(0,Ze.useId)();(0,Ze.useEffect)(()=>{if(e)return i(s)},[e]);let o=(0,Ze.useCallback)(()=>e&&n&&n(s),[s,n,e]);return!r&&n?[!1,o]:[!0]}var al=require("react"),Hn=(0,al.createContext)({strict:!1});var ll={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},cl=!1;function Wf(){if(cl)return;let e={};for(let t in ll)e[t]={isEnabled:r=>ll[t].some(n=>!!r[n])};Tr(e),cl=!0}function Kn(){return Wf(),oo()}function ul(e){let t=Kn();for(let r in e)t[r]={...t[r],...e[r]};Tr(t)}var Uf=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function Ir(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Uf.has(e)}var fl=e=>!Ir(e);function Hf(e){typeof e=="function"&&(fl=t=>t.startsWith("on")?!Ir(t):e(t))}try{Hf(require("@emotion/is-prop-valid").default)}catch(e){}function ml(e,t,r){let n={};for(let i in e)i==="values"&&typeof e.values=="object"||k(e[i])||(fl(i)||r===!0&&Ir(i)||!t&&!Ir(i)||e.draggable&&i.startsWith("onDrag"))&&(n[i]=e[i]);return n}var qn=require("react/jsx-runtime");var Wt=require("react");var dl=require("react"),Je=(0,dl.createContext)({});var _n=require("react");function pl(e,t){if(qe(e)){let{initial:r,animate:n}=e;return{initial:r===!1||Pe(r)?r:void 0,animate:Pe(n)?n:void 0}}return e.inherit!==!1?t:{}}function gl(e){let{initial:t,animate:r}=pl(e,(0,_n.useContext)(Je));return(0,_n.useMemo)(()=>({initial:t,animate:r}),[hl(t),hl(r)])}function hl(e){return Array.isArray(e)?e.join(" "):e}var Gt=require("react");var xl=require("react");var jt=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Do(e,t,r){for(let n in t)!k(t[n])&&!Er(n,r)&&(e[n]=t[n])}function Kf({transformTemplate:e},t){return(0,xl.useMemo)(()=>{let r=jt();return dt(r,t,e),Object.assign({},r.vars,r.style)},[t])}function _f(e,t){let r=e.style||{},n={};return Do(n,r,e),Object.assign(n,Kf(e,t)),n}function yl(e,t){let r={},n=_f(e,t);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,n.userSelect=n.WebkitUserSelect=n.WebkitTouchCallout="none",n.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=n,r}var vl=require("react");var Yn=()=>({...jt(),attrs:{}});function bl(e,t,r,n){let i=(0,vl.useMemo)(()=>{let s=Yn();return Ar(s,t,Dr(n),e.transformTemplate,e.style),{...s.attrs,style:{...s.style}}},[t]);if(e.style){let s={};Do(s,e.style,e),i.style={...s,...i.style}}return i}var wl=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function zt(e){return typeof e!="string"||e.includes("-")?!1:!!(wl.indexOf(e)>-1||/[A-Z]/u.test(e))}function Tl(e,t,r,{latestValues:n},i,s=!1,o){let c=((o!=null?o:zt(e))?bl:yl)(t,n,i,e),u=ml(t,typeof e=="string",s),l=e!==Gt.Fragment?{...u,...c,ref:r}:{},{children:f}=t,m=(0,Gt.useMemo)(()=>k(f)?f.get():f,[f]);return(0,Gt.createElement)(e,{...l,children:m})}var Ro=require("react");function Yf({scrapeMotionValuesFromProps:e,createRenderState:t},r,n,i){return{latestValues:$f(r,n,i,e),renderState:t()}}function $f(e,t,r,n){let i={},s=n(e,{});for(let m in s)i[m]=xt(s[m]);let{initial:o,animate:a}=e,c=qe(e),u=vr(e);t&&u&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let l=r?r.initial===!1:!1;l=l||o===!1;let f=l?a:o;if(f&&typeof f!="boolean"&&!Ne(f)){let m=Array.isArray(f)?f:[f];for(let d=0;d<m.length;d++){let p=lt(e,m[d]);if(p){let{transitionEnd:x,transition:y,...v}=p;for(let b in v){let w=v[b];if(Array.isArray(w)){let g=l?w.length-1:0;w=w[g]}w!==null&&(i[b]=w)}for(let b in x)i[b]=x[b]}}}return i}var $n=e=>(t,r)=>{let n=(0,Ro.useContext)(Je),i=(0,Ro.useContext)(wt),s=()=>Yf(e,t,n,i);return r?s():Qo(s)};var Sl=$n({scrapeMotionValuesFromProps:pt,createRenderState:jt});var Vl=$n({scrapeMotionValuesFromProps:Rr,createRenderState:Yn});var Cl=Symbol.for("motionComponentSymbol");var bt=require("react");function Pl(e,t,r){let n=(0,bt.useRef)(r);(0,bt.useInsertionEffect)(()=>{n.current=r});let i=(0,bt.useRef)(null);return(0,bt.useCallback)(s=>{var a;s&&((a=e.onMount)==null||a.call(e,s)),t&&(s?t.mount(s):t.unmount());let o=n.current;if(typeof o=="function")if(s){let c=o(s);typeof c=="function"&&(i.current=c)}else i.current?(i.current(),i.current=null):o(s);else o&&(o.current=s)},[t])}var ie=require("react");var El=require("react"),Xn=(0,El.createContext)({});function Qe(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Ml(e,t,r,n,i,s){var w,g;let{visualElement:o}=(0,ie.useContext)(Je),a=(0,ie.useContext)(Hn),c=(0,ie.useContext)(wt),u=(0,ie.useContext)(Un),l=u.reducedMotion,f=u.skipAnimations,m=(0,ie.useRef)(null),d=(0,ie.useRef)(!1);n=n||a.renderer,!m.current&&n&&(m.current=n(e,{visualState:t,parent:o,props:r,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:l,skipAnimations:f,isSVG:s}),d.current&&m.current&&(m.current.manuallyAnimateOnMount=!0));let p=m.current,x=(0,ie.useContext)(Xn);p&&!p.projection&&i&&(p.type==="html"||p.type==="svg")&&Xf(m.current,r,i,x);let y=(0,ie.useRef)(!1);(0,ie.useInsertionEffect)(()=>{p&&y.current&&p.update(r,c)});let v=r[dr],b=(0,ie.useRef)(!!v&&typeof window!="undefined"&&!((w=window.MotionHandoffIsComplete)!=null&&w.call(window,v))&&((g=window.MotionHasOptimisedAnimation)==null?void 0:g.call(window,v)));return ts(()=>{d.current=!0,p&&(y.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),p.scheduleRenderMicrotask(),b.current&&p.animationState&&p.animationState.animateChanges())}),(0,ie.useEffect)(()=>{p&&(!b.current&&p.animationState&&p.animationState.animateChanges(),b.current&&(queueMicrotask(()=>{var S;(S=window.MotionHandoffMarkAsComplete)==null||S.call(window,v)}),b.current=!1),p.enteringChildren=void 0)}),p}function Xf(e,t,r,n){let{layoutId:i,layout:s,drag:o,dragConstraints:a,layoutScroll:c,layoutRoot:u,layoutAnchor:l,layoutCrossfade:f}=t;e.projection=new r(e.latestValues,t["data-framer-portal-id"]?void 0:Al(e.parent)),e.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!o||a&&Qe(a),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:n,crossfade:f,layoutScroll:c,layoutRoot:u,layoutAnchor:l})}function Al(e){if(e)return e.options.allowProjection!==!1?e.projection:Al(e.parent)}function Zn(e,{forwardMotionProps:t=!1,type:r}={},n,i){var u,l;n&&ul(n);let s=r?r==="svg":zt(e),o=s?Vl:Sl;function a(f,m){let d,p={...(0,Wt.useContext)(Un),...f,layoutId:qf(f)},{isStatic:x}=p,y=gl(f),v=o(f,x);if(!x&&typeof window!="undefined"){Zf(p,n);let b=Jf(p);d=b.MeasureLayout,y.visualElement=Ml(e,v,p,i,b.ProjectionNode,s)}return(0,qn.jsxs)(Je.Provider,{value:y,children:[d&&y.visualElement?(0,qn.jsx)(d,{visualElement:y.visualElement,...p}):null,Tl(e,f,Pl(v,y.visualElement,m),v,x,t,s)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${(l=(u=e.displayName)!=null?u:e.name)!=null?l:""})`}`;let c=(0,Wt.forwardRef)(a);return c[Cl]=e,c}function qf({layoutId:e}){let t=(0,Wt.useContext)(Wr).id;return t&&e!==void 0?t+"-"+e:e}function Zf(e,t){let r=(0,Wt.useContext)(Hn).strict}function Jf(e){let t=Kn(),{drag:r,layout:n}=t;if(!r&&!n)return{};let i={...r,...n};return{MeasureLayout:r!=null&&r.isEnabled(e)||n!=null&&n.isEnabled(e)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function Dl(e,t){if(typeof Proxy=="undefined")return Zn;let r=new Map,n=(s,o)=>Zn(s,o,e,t),i=(s,o)=>n(s,o);return new Proxy(i,{get:(s,o)=>o==="create"?n:(r.has(o)||r.set(o,Zn(o,void 0,e,t)),r.get(o))})}var Rl=require("react");var kl=(e,t)=>{var n;return((n=t.isSVG)!=null?n:zt(e))?new kr(t):new Mr(t,{allowProjection:e!==Rl.Fragment})};var Jn=class extends q{constructor(t){super(t),t.animationState||(t.animationState=go(t))}updateAnimationControlsSubscription(){let{animate:t}=this.node.getProps();Ne(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:t}=this.node.getProps(),{animate:r}=this.node.prevProps||{};t!==r&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}};var Qf=0,Qn=class extends q{constructor(){super(...arguments),this.id=Qf++,this.isExitComplete=!1}update(){var s;if(!this.node.presenceContext)return;let{isPresent:t,onExitComplete:r}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;if(t&&n===!1){if(this.isExitComplete){let{initial:o,custom:a}=this.node.getProps();if(typeof o=="string"||typeof o=="object"&&o!==null&&!Array.isArray(o)){let c=ce(this.node,o,a);if(c){let{transition:u,transitionEnd:l,...f}=c;for(let m in f)(s=this.node.getValue(m))==null||s.jump(f[m])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}let i=this.node.animationState.setActive("exit",!t);r&&!t&&i.then(()=>{this.isExitComplete=!0,r(this.id)})}mount(){let{register:t,onExitComplete:r}=this.node.presenceContext||{};r&&r(this.id),t&&(this.unmount=t(this.id))}unmount(){}};var Ll={animation:{Feature:Jn},exit:{Feature:Qn}};function Fe(e){return{point:{x:e.pageX,y:e.pageY}}}var Il=e=>t=>ft(t)&&e(t,Fe(t));function et(e,t,r,n){return Ee(e,t,Il(r),n)}var ei=({current:e})=>e?e.ownerDocument.defaultView:null;var Ol=(e,t)=>Math.abs(e-t);function Nl(e,t){let r=Ol(e.x,t.x),n=Ol(e.y,t.y);return Math.sqrt(r**2+n**2)}var Bl=new Set(["auto","scroll"]),Ut=class{constructor(t,r,{transformPagePoint:n,contextWindow:i=window,dragSnapToOrigin:s=!1,distanceThreshold:o=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=p=>{this.handleScroll(p.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=ti(this.lastRawMoveEventInfo,this.transformPagePoint));let p=ko(this.lastMoveEventInfo,this.history),x=this.startEvent!==null,y=Nl(p.offset,{x:0,y:0})>=this.distanceThreshold;if(!x&&!y)return;let{point:v}=p,{timestamp:b}=W;this.history.push({...v,timestamp:b});let{onStart:w,onMove:g}=this.handlers;x||(w&&w(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),g&&g(this.lastMoveEvent,p)},this.handlePointerMove=(p,x)=>{this.lastMoveEvent=p,this.lastRawMoveEventInfo=x,this.lastMoveEventInfo=ti(x,this.transformPagePoint),P.update(this.updatePoint,!0)},this.handlePointerUp=(p,x)=>{this.end();let{onEnd:y,onSessionEnd:v,resumeAnimation:b}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&b&&b(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let w=ko(p.type==="pointercancel"?this.lastMoveEventInfo:ti(x,this.transformPagePoint),this.history);this.startEvent&&y&&y(p,w),v&&v(p,w)},!ft(t))return;this.dragSnapToOrigin=s,this.handlers=r,this.transformPagePoint=n,this.distanceThreshold=o,this.contextWindow=i||window;let c=Fe(t),u=ti(c,this.transformPagePoint),{point:l}=u,{timestamp:f}=W;this.history=[{...l,timestamp:f}];let{onSessionStart:m}=r;m&&m(t,ko(u,this.history));let d={passive:!0,capture:!0};this.removeListeners=ve(et(this.contextWindow,"pointermove",this.handlePointerMove,d),et(this.contextWindow,"pointerup",this.handlePointerUp,d),et(this.contextWindow,"pointercancel",this.handlePointerUp,d)),a&&this.startScrollTracking(a)}startScrollTracking(t){let r=t.parentElement;for(;r;){let n=getComputedStyle(r);(Bl.has(n.overflowX)||Bl.has(n.overflowY))&&this.scrollPositions.set(r,{x:r.scrollLeft,y:r.scrollTop}),r=r.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){let r=this.scrollPositions.get(t);if(!r)return;let n=t===window,i=n?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},s={x:i.x-r.x,y:i.y-r.y};s.x===0&&s.y===0||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=s.x,this.lastMoveEventInfo.point.y+=s.y):this.history.length>0&&(this.history[0].x-=s.x,this.history[0].y-=s.y),this.scrollPositions.set(t,i),P.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),ae(this.updatePoint)}};function ti(e,t){return t?{point:t(e.point)}:e}function Fl(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ko({point:e},t){return{point:e,delta:Fl(e,jl(t)),offset:Fl(e,em(t)),velocity:tm(t,.1)}}function em(e){return e[0]}function jl(e){return e[e.length-1]}function tm(e,t){if(e.length<2)return{x:0,y:0};let r=e.length-1,n=null,i=jl(e);for(;r>=0&&(n=e[r],!(i.timestamp-n.timestamp>U(t)));)r--;if(!n)return{x:0,y:0};n===e[0]&&e.length>2&&i.timestamp-n.timestamp>U(t)*2&&(n=e[1]);let s=Z(i.timestamp-n.timestamp);if(s===0)return{x:0,y:0};let o={x:(i.x-n.x)/s,y:(i.y-n.y)/s};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function Hl(e,{min:t,max:r},n){return t!==void 0&&e<t?e=n?M(t,e,n.min):Math.max(e,t):r!==void 0&&e>r&&(e=n?M(r,e,n.max):Math.min(e,r)),e}function zl(e,t,r){return{min:t!==void 0?e.min+t:void 0,max:r!==void 0?e.max+r-(e.max-e.min):void 0}}function Kl(e,{top:t,left:r,bottom:n,right:i}){return{x:zl(e.x,r,i),y:zl(e.y,t,n)}}function Gl(e,t){let r=t.min-e.min,n=t.max-e.max;return t.max-t.min<e.max-e.min&&([r,n]=[n,r]),{min:r,max:n}}function _l(e,t){return{x:Gl(e.x,t.x),y:Gl(e.y,t.y)}}function Yl(e,t){let r=.5,n=K(e),i=K(t);return i>n?r=Te(t.min,t.max-n,e.min):n>i&&(r=Te(e.min,e.max-i,t.min)),$(0,1,r)}function $l(e,t){let r={};return t.min!==void 0&&(r.min=t.min-e.min),t.max!==void 0&&(r.max=t.max-e.min),r}var ri=.35;function Xl(e=ri){return e===!1?e=0:e===!0&&(e=ri),{x:Wl(e,"left","right"),y:Wl(e,"top","bottom")}}function Wl(e,t,r){return{min:Ul(e,t),max:Ul(e,r)}}function Ul(e,t){return typeof e=="number"?e:e[t]||0}var rm=new WeakMap,ii=class{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=N(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:r=!1,distanceThreshold:n}={}){let{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;let s=f=>{r&&this.snapToCursor(Fe(f).point),this.stopAnimation()},o=(f,m)=>{let{drag:d,dragPropagation:p,onDragStart:x}=this.getProps();if(d&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=qi(d),!this.openDragLock))return;this.latestPointerEvent=f,this.latestPanInfo=m,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ue(v=>{let b=this.getAxisMotionValue(v).get()||0;if(te.test(b)){let{projection:w}=this.visualElement;if(w&&w.layout){let g=w.layout.layoutBox[v];g&&(b=K(g)*(parseFloat(b)/100))}}this.originPoint[v]=b}),x&&P.update(()=>x(f,m),!1,!0),Rt(this.visualElement,"transform");let{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},a=(f,m)=>{this.latestPointerEvent=f,this.latestPanInfo=m;let{dragPropagation:d,dragDirectionLock:p,onDirectionLock:x,onDrag:y}=this.getProps();if(!d&&!this.openDragLock)return;let{offset:v}=m;if(p&&this.currentDirection===null){this.currentDirection=im(v),this.currentDirection!==null&&x&&x(this.currentDirection);return}this.updateAxis("x",m.point,v),this.updateAxis("y",m.point,v),this.visualElement.render(),y&&P.update(()=>y(f,m),!1,!0)},c=(f,m)=>{this.latestPointerEvent=f,this.latestPanInfo=m,this.stop(f,m),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>{let{dragSnapToOrigin:f}=this.getProps();(f||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:l}=this.getProps();this.panSession=new Ut(t,{onSessionStart:s,onStart:o,onMove:a,onSessionEnd:c,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:n,contextWindow:ei(this.visualElement),element:this.visualElement.current})}stop(t,r){let n=t||this.latestPointerEvent,i=r||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!i||!n)return;let{velocity:o}=i;this.startAnimation(o);let{onDragEnd:a}=this.getProps();a&&P.postRender(()=>a(n,i))}cancel(){this.isDragging=!1;let{projection:t,animationState:r}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),r&&r.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,r,n){let{drag:i}=this.getProps();if(!n||!ni(t,i,this.currentDirection))return;let s=this.getAxisMotionValue(t),o=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(o=Hl(o,this.constraints[t],this.elastic[t])),s.set(o)}resolveConstraints(){var s;let{dragConstraints:t,dragElastic:r}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(s=this.visualElement.projection)==null?void 0:s.layout,i=this.constraints;t&&Qe(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&n?this.constraints=Kl(n.layoutBox,t):this.constraints=!1,this.elastic=Xl(r),i!==this.constraints&&!Qe(t)&&n&&this.constraints&&!this.hasMutatedConstraints&&ue(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=$l(n.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){let{dragConstraints:t,onMeasureDragConstraints:r}=this.getProps();if(!t||!Qe(t))return!1;let n=t.current;se(n!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");let{projection:i}=this.visualElement;if(!i||!i.layout)return!1;i.root&&(i.root.scroll=void 0,i.root.updateScroll());let s=mo(n,i.root,this.visualElement.getTransformPagePoint()),o=_l(i.layout.layoutBox,s);if(r){let a=r(so(o));this.hasMutatedConstraints=!!a,a&&(o=Sr(a))}return o}startAnimation(t){let{drag:r,dragMomentum:n,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),c=this.constraints||{},u=ue(l=>{if(!ni(l,r,this.currentDirection))return;let f=c&&c[l]||{};(o===!0||o===l)&&(f={min:0,max:0});let m=i?200:1e6,d=i?40:1e7,p={type:"inertia",velocity:n?t[l]:0,bounceStiffness:m,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...s,...f};return this.startAxisValueAnimation(l,p)});return Promise.all(u).then(a)}startAxisValueAnimation(t,r){let n=this.getAxisMotionValue(t);return Rt(this.visualElement,t),n.start(at(t,n,0,r,this.visualElement,!1))}stopAnimation(){ue(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){var s;let r=`_drag${t.toUpperCase()}`,i=this.visualElement.getProps()[r];return i||this.visualElement.getValue(t,(s=this.visualElement.latestValues[t])!=null?s:0)}snapToCursor(t){ue(r=>{let{drag:n}=this.getProps();if(!ni(r,n,this.currentDirection))return;let{projection:i}=this.visualElement,s=this.getAxisMotionValue(r);if(i&&i.layout){let{min:o,max:a}=i.layout.layoutBox[r],c=s.get()||0;s.set(t[r]-M(o,a,.5)+c)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:t,dragConstraints:r}=this.getProps(),{projection:n}=this.visualElement;if(!Qe(r)||!n||!this.constraints)return;this.stopAnimation();let i={x:0,y:0};ue(o=>{let a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){let c=a.get();i[o]=Yl({min:c,max:c},this.constraints[o])}});let{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),ue(o=>{if(!ni(o,t,null))return;let a=this.getAxisMotionValue(o),{min:c,max:u}=this.constraints[o];a.set(M(c,u,i[o]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;rm.set(this.visualElement,this);let t=this.visualElement.current,r=et(t,"pointerdown",u=>{let{drag:l,dragListener:f=!0}=this.getProps(),m=u.target,d=m!==t&&eo(m);l&&f&&!d&&this.start(u)}),n,i=()=>{let{dragConstraints:u}=this.getProps();Qe(u)&&u.current&&(this.constraints=this.resolveRefConstraints(),n||(n=nm(t,u.current,()=>this.scalePositionWithinConstraints())))},{projection:s}=this.visualElement,o=s.addEventListener("measure",i);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),P.read(i);let a=Ee(window,"resize",()=>this.scalePositionWithinConstraints()),c=s.addEventListener("didUpdate",(({delta:u,hasLayoutChanged:l})=>{this.isDragging&&l&&(ue(f=>{let m=this.getAxisMotionValue(f);m&&(this.originPoint[f]+=u[f].translate,m.set(m.get()+u[f].translate))}),this.visualElement.render())}));return()=>{a(),r(),o(),c&&c(),n&&n()}}getProps(){let t=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=ri,dragMomentum:a=!0}=t;return{...t,drag:r,dragDirectionLock:n,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:a}}};function ql(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function nm(e,t,r){let n=Dn(e,ql(r)),i=Dn(t,ql(r));return()=>{n(),i()}}function ni(e,t,r){return(t===!0||t===e)&&(r===null||r===e)}function im(e,t=10){let r=null;return Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x"),r}var oi=class extends q{constructor(t){super(t),this.removeGroupControls=j,this.removeListeners=j,this.controls=new ii(t)}mount(){let{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||j}update(){let{dragControls:t}=this.node.getProps(),{dragControls:r}=this.node.prevProps||{};t!==r&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}};var Lo=e=>(t,r)=>{e&&P.update(()=>e(t,r),!1,!0)},si=class extends q{constructor(){super(...arguments),this.removePointerDownListener=j}onPointerDown(t){this.session=new Ut(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:ei(this.node)})}createPanHandlers(){let{onPanSessionStart:t,onPanStart:r,onPan:n,onPanEnd:i}=this.node.getProps();return{onSessionStart:Lo(t),onStart:Lo(r),onMove:Lo(n),onEnd:(s,o)=>{delete this.session,i&&P.postRender(()=>i(s,o))}}}mount(){this.removePointerDownListener=et(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}};var Zl=require("react/jsx-runtime");var Or=require("react");var Io=!1,Oo=class extends Or.Component{componentDidMount(){let{visualElement:t,layoutGroup:r,switchLayoutGroup:n,layoutId:i}=this.props,{projection:s}=t;s&&(r.group&&r.group.add(s),n&&n.register&&i&&n.register(s),Io&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),yt.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){let{layoutDependency:r,visualElement:n,drag:i,isPresent:s}=this.props,{projection:o}=n;return o&&(o.isPresent=s,t.layoutDependency!==r&&o.setOptions({...o.options,layoutDependency:r}),Io=!0,i||t.layoutDependency!==r||r===void 0||t.isPresent!==s?o.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?o.promote():o.relegate()||P.postRender(()=>{let a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){let{visualElement:t,layoutAnchor:r}=this.props,{projection:n}=t;n&&(n.options.layoutAnchor=r,n.root.didUpdate(),ut.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:t,layoutGroup:r,switchLayoutGroup:n}=this.props,{projection:i}=t;Io=!0,i&&(i.scheduleCheckAfterUnmount(),r&&r.group&&r.group.remove(i),n&&n.deregister&&n.deregister(i))}safeToRemove(){let{safeToRemove:t}=this.props;t&&t()}render(){return null}};function ai(e){let[t,r]=sl(),n=(0,Or.useContext)(Wr);return(0,Zl.jsx)(Oo,{...e,layoutGroup:n,switchLayoutGroup:(0,Or.useContext)(Xn),isPresent:t,safeToRemove:r})}var Jl={pan:{Feature:si},drag:{Feature:oi,ProjectionNode:Lr,MeasureLayout:ai}};function Ql(e,t,r){let{props:n}=e;e.animationState&&n.whileHover&&e.animationState.setActive("whileHover",r==="Start");let i="onHover"+r,s=n[i];s&&P.postRender(()=>s(t,Fe(t)))}var li=class extends q{mount(){let{current:t}=this.node;t&&(this.unmount=Zi(t,(r,n)=>(Ql(this.node,n,"Start"),i=>Ql(this.node,i,"End"))))}unmount(){}};var ci=class extends q{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(r){t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=ve(Ee(this.node.current,"focus",()=>this.onFocus()),Ee(this.node.current,"blur",()=>this.onBlur()))}unmount(){}};function ec(e,t,r){let{props:n}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&n.whileTap&&e.animationState.setActive("whileTap",r==="Start");let i="onTap"+(r==="End"?"":r),s=n[i];s&&P.postRender(()=>s(t,Fe(t)))}var ui=class extends q{mount(){let{current:t}=this.node;if(!t)return;let{globalTapTarget:r,propagate:n}=this.node.props;this.unmount=ro(t,(i,s)=>(ec(this.node,s,"Start"),(o,{success:a})=>ec(this.node,o,a?"End":"Cancel")),{useGlobalTarget:r,stopPropagation:(n==null?void 0:n.tap)===!1})}unmount(){}};var Bo=new WeakMap,No=new WeakMap,om=e=>{let t=Bo.get(e.target);t&&t(e)},sm=e=>{e.forEach(om)};function am({root:e,...t}){let r=e||document;No.has(r)||No.set(r,{});let n=No.get(r),i=JSON.stringify(t);return n[i]||(n[i]=new IntersectionObserver(sm,{root:e,...t})),n[i]}function tc(e,t,r){let n=am(t);return Bo.set(e,r),n.observe(e),()=>{Bo.delete(e),n.unobserve(e)}}var lm={some:0,all:1},fi=class extends q{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var c;(c=this.stopObserver)==null||c.call(this);let{viewport:t={}}=this.node.getProps(),{root:r,margin:n,amount:i="some",once:s}=t,o={root:r?r.current:void 0,rootMargin:n,threshold:typeof i=="number"?i:lm[i]},a=u=>{let{isIntersecting:l}=u;if(this.isInView===l||(this.isInView=l,s&&!l&&this.hasEnteredView))return;l&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",l);let{onViewportEnter:f,onViewportLeave:m}=this.node.getProps(),d=l?f:m;d&&d(u)};this.stopObserver=tc(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver=="undefined")return;let{props:t,prevProps:r}=this.node;["amount","margin","root"].some(cm(t,r))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}};function cm({viewport:e={}},{viewport:t={}}={}){return r=>e[r]!==t[r]}var rc={inView:{Feature:fi},tap:{Feature:ui},focus:{Feature:ci},hover:{Feature:li}};var nc={layout:{ProjectionNode:Lr,MeasureLayout:ai}};var ic={...Ll,...rc,...Jl,...nc};var Fo=Dl(ic,kl);var jo=Fo;var h=require("react"),uc=require("react-dom"),Go=new Set,Wo={open:!1,status:null,busy:!1,ballPos:null,sidebarActive:!1};function _(e){Wo=Object.assign({},Wo,e),Go.forEach(function(t){t()})}function fm(e){return Go.add(e),function(){Go.delete(e)}}function Uo(){return Wo}function Nr(){return h.useSyncExternalStore(fm,Uo)}var mm="/api",Ko="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB2aWV3Qm94PSIwIDAgMTQ3IDE0NyIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8c3R5bGU+QG1lZGlhIChwcmVmZXJzLWNvbG9yLXNjaGVtZTogZGFyaykgeyogeyBmaWxsOiB3aGl0ZTsgfX08L3N0eWxlPgogIDxwYXRoIGQ9Im00Mi40MjE0LDM5LjY1NWMtMjQuNDA1NywwIC00Mi4xNTU0LDEzLjE3MjEgLTQyLjE1NTQsMzMuODQ1YzAsMjAuNTgxNCAxOC40ODkyLDMzLjg0NSA0Mi4xNTU0LDMzLjg0NWMyMy42NjYyLDAgMzguMTgwMywtMTEuNjE3MSAzOC43MzQ5LC0yOC43MjI1bC0yMS4wNzc3LC0wLjQ1NzRjLTAuOTI0NCw5LjMzMDMgLTkuMTA1OSwxNS4xODQ1IC0xNy42NTcyLDE1LjE4NDVjLTExLjc0MDYsMCAtMjAuNDMwNiwtNy41OTIyIC0yMC40MzA2LC0xOS44NDk2YzAsLTEyLjI1NzQgOC42OSwtMTkuOTg2OCAyMC40MzA2LC0yMC4yMTU1YzguNTUxMywtMC4xODMgMTYuOTE3Nyw1Ljk0NTcgMTcuNDcyMywxNS4yNzZsMjEuMDc3NywtMC42NDAzYy0wLjQ2MjIsLTE2LjgzMTEgLTE0LjE0NDIsLTI4LjI2NTIgLTM4LjU1LC0yOC4yNjUyem00OC44NDQ2LDJsNTUuNDY4LDBsMCw2NC4wMzExbC01NS40NjgsMGwwLC02NC4wMzExeiIgY2xpcC1ydWxlPSJldmVub2RkIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz4KPC9zdmc+Cg==";async function fe(e,t){var r={method:t===void 0?"GET":"POST",headers:{}};t!==void 0&&(r.headers["content-type"]="application/json",r.body=JSON.stringify(t));var n=await fetch(mm+e,r),i=await n.text(),s=null;try{s=i===""?null:JSON.parse(i)}catch(o){s=null}return n.ok?s!==null?s:{ok:!1,error:"invalid JSON response"}:{ok:!1,error:"HTTP "+n.status+(s!==null&&s.error!==void 0?": "+s.error:"")}}function gi(e,t){try{var r=e(function(f){return f}),n=t===null?null:typeof t=="function"?t(function(f){return f}):null,i=r!=null?r.current:void 0;if(i!==void 0&&r!=null&&r.byId!=null){var s=r.byId[i];if(s!=null&&typeof s.cwd=="string"&&s.cwd!=="")return s.cwd}var o=n!=null&&Array.isArray(n.items)?n.items:[];if(i!==void 0)for(var a=0;a<o.length;a++){var c=o[a];if(c.sessionIds!=null&&c.sessionIds.indexOf(i)!==-1&&typeof c.path=="string"&&c.path!=="")return c.path}var u=n!=null?n.recentWorkspaceId:void 0;if(u!==void 0){for(var l=0;l<o.length;l++)if(o[l].workspaceId===u&&typeof o[l].path=="string"&&o[l].path!=="")return o[l].path}if(o.length>0&&typeof o[0].path=="string"&&o[0].path!=="")return o[0].path}catch(f){}}function fc(e,t){if(e==null||typeof e.url!="string"||e.url==="")return null;var r=typeof t=="string"&&t!==""?t:e!=null&&e.cwd!=null?e.cwd:null;if(r==null||r==="")return e.url;var n=r.replace(/\\/g,"/"),i=n;return(/^[A-Za-z]:\//.test(n)||n.charCodeAt(0)!==47)&&(i="/"+n),e.url+"?folder="+encodeURIComponent(i)}function mc(e,t,r){var n=e!=null&&e.ok===!0&&e.running===!0,i=e!=null&&e.status==="starting",s=e!=null&&e.ok===!1,o=e!=null&&e.serve==="dsh",a={key:r,className:"dshcs-frame",src:"",title:"code-server",allow:"clipboard-read; clipboard-write"};o||(a.sandbox="allow-scripts allow-same-origin allow-forms allow-modals allow-popups allow-pointer-lock allow-clipboard-read allow-clipboard-write");var c=function(f){return h.createElement("iframe",Object.assign({},a,{src:f}))};if(n&&t!==null)return c(t);if(i)return h.createElement(h.Fragment,null,c("about:blank"),h.createElement("div",{className:"dshcs-loading"},"\u6B63\u5728\u542F\u52A8 code-server\u2026"));var u=s&&e!=null&&e.error?e.error:"code-server \u672A\u8FD0\u884C",l=o?"\u5F53\u524D\u4EE5 DSH \u540C\u6E90\u8DEF\u5F84 "+(e!=null&&e.url||"/code-server/")+" \u63D0\u4F9B(\u65E0\u72EC\u7ACB\u7AEF\u53E3)\u3002":"\u5F53\u524D\u4EE5\u72EC\u7ACB\u56DE\u73AF\u7AEF\u53E3\u63D0\u4F9B(\u7AEF\u53E3 "+(e!=null&&e.port!=null?e.port:"8090")+" \u88AB\u5360\u7528\u65F6\u8BF7\u91CA\u653E\u6216\u4FEE\u6539 port \u914D\u7F6E)\u3002";return h.createElement("div",{className:"dshcs-empty"},h.createElement("div",{className:"dshcs-emptybox"},h.createElement("div",null,s?"code-server \u542F\u52A8\u5931\u8D25":"code-server \u672A\u8FD0\u884C"),h.createElement("pre",{className:"dshcs-error"},u),h.createElement("p",{className:"dshcs-hint"},"VS Code \u6811\u968F\u63D2\u4EF6\u5305\u5185\u7F6E\u3001\u5C31\u5730\u8FD0\u884C(\u65E0\u9700\u5168\u5C40\u5B89\u88C5\u3001\u65E0\u9700\u8054\u7F51\u5B89\u88C5\u3001\u65E0\u300C\u5B89\u88C5\u73AF\u5883\u300D\u6B65\u9AA4);\u5185\u90E8\u4F9D\u8D56\u4E0E\u9884\u7F16\u8BD1\u539F\u751F\u6A21\u5757\u7531\u5305\u7BA1\u7406\u5668\u5728\u5B89\u88C5\u63D2\u4EF6\u65F6\u4E00\u5E76\u88C5\u597D(\u65E0\u9700 C++ \u5DE5\u5177\u94FE)\u3002\u82E5\u6B64\u5904\u957F\u671F\u672A\u8FD0\u884C,\u8BF7\u5230 \u8BBE\u7F6E \u2192 \u63D2\u4EF6 \u2192 Code Server \u70B9\u300C\u68C0\u6D4B\u73AF\u5883\u300D\u67E5\u770B\u539F\u56E0\u3002"+l)))}function dc(e){var t=function(n){var i=fc(n,e);i!=null&&typeof window.open=="function"&&window.open(i,"_blank","noopener")},r=Uo().status;if(r!=null&&r.running===!0){t(r);return}Uo().busy!==!0&&(_({busy:!0}),fe("/code-server/start",typeof e=="string"?{cwd:e}:{}).then(function(n){_({status:n,busy:!1}),t(n)}).catch(function(){_({busy:!1})}))}var dm=["nw","n","ne","w","e","sw","s","se"],Q=12,pm=720,hm=520,pc=360,hc=260,oc=24;function Ho(e){if(e===!1)return 0;try{if(typeof document=="undefined")return 0;var t=document.querySelectorAll("[data-composer-seat]");if(t===null||t.length===0)return 0;for(var r=Number.POSITIVE_INFINITY,n=0,i=0;i<t.length;i++){var s=t[i].getBoundingClientRect();s===null||s.width<=0||(s.top<r&&(r=s.top),s.bottom>n&&(n=s.bottom))}if(!isFinite(r)||n<=0)return 0;var o=window.innerHeight;return o-n>24?0:Math.min(Math.max(1,o-r+8),420)}catch(a){return 0}}function Me(){return{width:Math.max(1,window.innerWidth),height:Math.max(1,window.innerHeight)}}function xi(e,t){return{width:Math.max(1,e.width-Q*2),height:Math.max(1,e.height-Q*2-t)}}function tt(e,t,r){return Math.min(r,Math.max(t,e))}function Ht(e,t,r){let n=xi(t,r),i=tt(e.width,Math.min(pc,n.width),n.width),s=tt(e.height,Math.min(hc,n.height),n.height);return{x:tt(e.x,Q,Math.max(Q,t.width-Q-i)),y:tt(e.y,Q,Math.max(Q,t.height-Q-r-s)),width:i,height:s}}function gm(e,t,r){let n=xi(t,r),i=Math.min(pm,n.width),s=Math.min(hm,n.height),o=xm(),a=o>0?o-8:t.height-Q-r;return Ht({x:t.width-Q-i-e*oc,y:Math.max(Q,a-s-e*oc),width:i,height:s},t,r)}function xm(){try{if(typeof document=="undefined")return-1;var e=document.querySelectorAll("[data-composer-seat]");if(e===null||e.length===0)return-1;for(var t=Number.POSITIVE_INFINITY,r=0;r<e.length;r++){var n=e[r].getBoundingClientRect();n!==null&&n.width>0&&n.top<t&&(t=n.top)}return isFinite(t)?t:-1}catch(i){return-1}}function ym(e,t,r,n,i){return Ht({...e,x:e.x+t,y:e.y+r},n,i)}function vm(e,t,r,n,i,s){let o=Ht(e,i,s),a=xi(i,s),c=Math.min(pc,a.width),u=Math.min(hc,a.height),l=i.height-Q-s,f=o.x,m=o.x+o.width,d=o.y,p=o.y+o.height;return t.includes("w")&&(f=tt(o.x+r,Q,m-c)),t.includes("e")&&(m=tt(m+r,f+c,i.width-Q)),t.includes("n")&&(d=tt(o.y+n,Q,p-u)),t.includes("s")&&(p=tt(p+n,d+u,l)),{x:f,y:d,width:m-f,height:p-d}}function mi(e,t){let r=xi(e,t);return{x:Q,y:Q,width:r.width,height:r.height}}var bm='.dshcs-root{position:fixed;inset:0;z-index:2147483000;pointer-events:none}.dshcs-win{--dshcs-accent:#5b6cff;pointer-events:auto;position:fixed;isolation:isolate;z-index:2147483000;display:flex;flex-direction:column;min-width:1px;min-height:1px;overflow:hidden;color:var(--dsw-alias-label-primary,#172033);background:var(--dsw-alias-bg-base,#fff);border:1px solid var(--dsw-alias-border-l2,#dfe3eb);border-radius:12px;box-shadow:0 1px 2px rgba(13,22,38,.08),0 18px 48px rgba(13,22,38,.2),0 0 0 1px rgba(255,255,255,.4) inset;transition:border-color .16s ease,box-shadow .16s ease}.dshcs-win:hover{border-color:color-mix(in srgb,var(--dshcs-accent) 28%,var(--dsw-alias-border-l2,#dfe3eb));box-shadow:0 2px 5px rgba(13,22,38,.1),0 22px 58px rgba(13,22,38,.24),0 0 0 1px rgba(255,255,255,.5) inset}.dshcs-win[data-interaction]{transition:none;user-select:none}.dshcs-win[data-interaction]::after{content:"";position:absolute;inset:0;z-index:18;background:transparent}.dshcs-win-max{border-radius:14px;z-index:2147483001;box-shadow:0 1px 2px rgba(13,22,38,.06),0 8px 24px rgba(13,22,38,.12)}.dshcs-win-max:hover{box-shadow:0 1px 2px rgba(13,22,38,.06),0 10px 28px rgba(13,22,38,.14)}.dshcs-win-snap{border-color:color-mix(in srgb,var(--dshcs-accent) 70%,var(--dsw-alias-border-l2,#dfe3eb));box-shadow:0 0 0 3px color-mix(in srgb,var(--dshcs-accent) 26%,transparent),0 22px 58px rgba(13,22,38,.24),0 0 0 1px rgba(255,255,255,.5) inset}.dshcs-snapghost{position:fixed;left:0;top:0;z-index:2147483000;pointer-events:none;display:grid;place-items:center;border:1.5px solid color-mix(in srgb,var(--dshcs-accent,#5b6cff) 85%,transparent);background:color-mix(in srgb,var(--dshcs-accent,#5b6cff) 11%,transparent);border-radius:12px;box-shadow:0 0 0 3px color-mix(in srgb,var(--dshcs-accent,#5b6cff) 20%,transparent),0 10px 34px rgba(13,22,38,.14)}.dshcs-snapghint{position:absolute;top:12px;left:50%;transform:translateX(-50%);padding:5px 14px;border-radius:999px;background:color-mix(in srgb,var(--dshcs-accent,#5b6cff) 92%,#172033);color:#fff;font-size:12px;font-weight:650;letter-spacing:.02em;white-space:nowrap;box-shadow:0 6px 18px rgba(13,22,38,.3)}.dshcs-drag{position:absolute;top:0;left:0;right:0;height:14px;z-index:26;cursor:grab;touch-action:none;user-select:none}.dshcs-win[data-interaction=move] .dshcs-drag{cursor:grabbing}.dshcs-win-max .dshcs-drag{cursor:default}.dshcs-drag:hover{background:color-mix(in srgb,var(--dsw-alias-label-primary,#172033) 5%,transparent)}.dshcs-artbtn{appearance:none;display:inline-grid;place-items:center;width:22px;height:22px;padding:0;border:1px solid var(--dsw-alias-border-l2,#dfe3eb);border-radius:6px;color:var(--dsw-alias-label-secondary,#566174);background:color-mix(in srgb,var(--dsw-alias-bg-base,#fff) 60%,transparent);cursor:pointer;transition:color .12s ease,background .12s ease,border-color .12s ease;vertical-align:middle}.dshcs-artbtn:hover{color:var(--dsw-alias-label-primary,#172033);border-color:color-mix(in srgb,var(--dshcs-accent) 40%,var(--dsw-alias-border-l2,#dfe3eb));background:color-mix(in srgb,var(--dshcs-accent) 8%,transparent)}.dshcs-artbtn:active{transform:scale(.94)}.dshcs-artbtn:focus-visible{outline:2px solid color-mix(in srgb,var(--dshcs-accent) 65%,transparent);outline-offset:1px}.dshcs-artifacts{display:grid;grid-template-columns:max-content minmax(0,1fr);align-items:center;gap:6px 8px;margin-top:16px;font-size:13px;line-height:22px;position:relative}.dshcs-artlabel{color:var(--dsw-alias-label-tertiary,#7d8798);grid-area:1/1}.dshcs-artrow{flex-wrap:nowrap;grid-area:1/2;align-items:center;gap:8px;min-width:0;display:flex;overflow:hidden}.dshcs-artitem{display:inline-flex;align-items:center;gap:4px;flex:none;min-width:0}.dshcs-artfile{text-overflow:ellipsis;white-space:nowrap;background:var(--dsw-alias-interactive-bg-hover);max-width:320px;color:var(--dsw-alias-label-secondary,#566174);font:inherit;cursor:pointer;border:none;border-radius:6px;margin:0;padding:0 8px;overflow:hidden}.dshcs-artfile:hover{color:var(--dsw-alias-label-primary,#172033);text-decoration:underline}.dshcs-artfile:focus-visible{box-shadow:inset 0 0 0 2px var(--dsw-alias-border-l3);outline:none}.dshcs-artmore{white-space:nowrap;color:var(--dsw-alias-label-tertiary,#7d8798);flex:none}.dshcs-body{position:relative;display:flex;flex:1;min-width:0;min-height:0;flex-direction:column;background:var(--dsw-alias-bg-base,#fff)}.dshcs-body[hidden]{display:none}.dshcs-frame{display:block;position:absolute;inset:0;z-index:1;width:100%;height:100%;border:0;background:var(--dsw-alias-bg-base,#fff)}.dshcs-loading{position:absolute;inset:0;z-index:2;display:grid;place-items:center;background:var(--dsw-alias-bg-base,#fff);color:var(--dsw-alias-label-tertiary,#7d8798);font-size:13px}.dshcs-win-hidden{pointer-events:none!important}.dshcs-empty{position:relative;z-index:2;flex:1;display:flex;align-items:center;justify-content:center;padding:44px 24px 24px}.dshcs-emptybox{max-width:560px;text-align:left;background:var(--dsw-alias-bg-layer-2,#f7f8fb);border:1px solid var(--dsw-alias-border-l2,#dfe3eb);border-radius:12px;padding:16px 18px}.dshcs-error{color:var(--dsw-alias-label-error,#d92d20);white-space:pre-wrap;word-break:break-all;font-family:ui-monospace,Consolas,monospace;font-size:12px;margin:8px 0 0}.dshcs-hint{color:var(--dsw-alias-label-tertiary,#7d8798);font-size:12px;margin:6px 0 0}.dshcs-resize{position:absolute;z-index:24;display:block;touch-action:none}.dshcs-resize-n,.dshcs-resize-s{left:16px;right:16px;height:10px;cursor:ns-resize}.dshcs-resize-n{top:0}.dshcs-resize-s{bottom:0}.dshcs-resize-w,.dshcs-resize-e{top:16px;bottom:16px;width:10px;cursor:ew-resize}.dshcs-resize-w{left:0}.dshcs-resize-e{right:0}.dshcs-resize-nw,.dshcs-resize-ne,.dshcs-resize-sw,.dshcs-resize-se{width:18px;height:18px}.dshcs-resize-nw{left:0;top:0;cursor:nwse-resize}.dshcs-resize-ne{right:0;top:0;cursor:nesw-resize}.dshcs-resize-sw{left:0;bottom:0;cursor:nesw-resize}.dshcs-resize-se{right:0;bottom:0;cursor:nwse-resize}.dshcs-resize-se::after{content:"";position:absolute;right:4px;bottom:4px;width:7px;height:7px;border-right:1.5px solid color-mix(in srgb,var(--dsw-alias-label-tertiary,#7d8798) 58%,transparent);border-bottom:1.5px solid color-mix(in srgb,var(--dsw-alias-label-tertiary,#7d8798) 58%,transparent);border-radius:0 0 2px}.dshcs-ball{position:fixed;width:38px;height:38px;padding:0;border:1px solid color-mix(in srgb,var(--dsw-alias-border-l2,#dfe3eb) 80%,transparent);border-radius:50%;display:grid;place-items:center;cursor:grab;touch-action:none;user-select:none;-webkit-user-select:none;z-index:2147483002;background:color-mix(in srgb,var(--dsw-alias-bg-layer-2,#f2f4f8) 88%,transparent);backdrop-filter:blur(8px) saturate(1.2);box-shadow:0 8px 20px rgba(13,22,38,.18),0 1px 2px rgba(13,22,38,.1);transition:transform .16s ease,box-shadow .16s ease,background .16s ease,border-color .16s ease}.dshcs-ball img,.dshcs-ball svg{-webkit-user-drag:none;user-drag:none}.dshcs-ball[data-dragging]{cursor:grabbing;transform:scale(1.06);box-shadow:0 14px 28px rgba(13,22,38,.28),0 2px 6px rgba(13,22,38,.16)}.dshcs-ball:hover{transform:scale(1.06);box-shadow:0 10px 24px rgba(13,22,38,.22),0 1px 2px rgba(13,22,38,.1)}.dshcs-ball:active{transform:scale(.94)}.dshcs-ball:focus-visible{outline:2px solid color-mix(in srgb,var(--dshcs-accent) 65%,transparent);outline-offset:2px}.dshcs-ball-open{background:color-mix(in srgb,var(--dshcs-accent) 14%,var(--dsw-alias-bg-layer-2,#f2f4f8));border-color:color-mix(in srgb,var(--dshcs-accent) 55%,var(--dsw-alias-border-l2,#dfe3eb));box-shadow:0 0 0 3px color-mix(in srgb,var(--dshcs-accent) 22%,transparent),0 0 20px color-mix(in srgb,var(--dshcs-accent) 38%,transparent),0 8px 20px rgba(13,22,38,.16);transform:scale(1.08)}.dshcs-ball-dot{position:absolute;top:-2px;right:-2px;width:9px;height:9px;border-radius:50%;background:#20a66a;border:2px solid var(--dsw-alias-bg-base,#fff)}.dshcs-ball-dot[data-status=starting]{background:#d78b25}.dshcs-ball-dot[data-status=error]{background:#f85149}.dshcs-ball-dot[data-status=idle]{background:#7d8798}.dshcs-ball-dot[data-status=running]::after{content:"";position:absolute;inset:-4px;border-radius:50%;border:1px solid currentColor;opacity:.3;animation:dshcs-pulse 2s ease-out infinite}.dshcs-tabroot{position:relative;display:flex;flex-direction:column;width:100%;height:100%;min-width:0;min-height:0;background:var(--dsw-alias-bg-base,#fff)}@keyframes dshcs-pulse{0%{transform:scale(.7);opacity:.35}70%,100%{transform:scale(1.65);opacity:0}}',sc="dsh-code-server/styles";typeof document!="undefined"&&document.querySelector("style[data-dshcs="+JSON.stringify(sc)+"]")===null&&(di=document.createElement("style"),di.setAttribute("data-dshcs",sc),di.textContent=bm,document.head.appendChild(di));var di;function wm(e){var[t,r]=h.useState(!1),n=h.useRef(e.url);return h.useEffect(function(){n.current!==e.url&&(n.current=e.url,r(!1))},[e.url]),e.url!=null&&t!==!0?h.createElement("img",{src:e.url,key:"img-"+e.url,alt:"","aria-hidden":!0,draggable:!1,onError:function(){r(!0)},style:{width:20,height:20,display:"block",objectFit:"contain",borderRadius:3,WebkitUserDrag:"none",userSelect:"none"}}):h.createElement("svg",{viewBox:"0 0 18 18","aria-hidden":!0,style:{width:17,height:17}},h.createElement("rect",{x:"3",y:"3",width:"12",height:"12",rx:"2",fill:"none",stroke:"currentColor",strokeWidth:1.4}),h.createElement("path",{d:"M3 7h12M7 3v12",fill:"none",stroke:"currentColor",strokeWidth:1.4}))}var je=38,Ae=8,gc="dshcs-ball-pos";function pi(e){var t=Math.max(Ae,window.innerWidth-Ae-je),r=Math.max(Ae,window.innerHeight-Ae-je);return{x:Math.min(t,Math.max(Ae,e.x)),y:Math.min(r,Math.max(Ae,e.y))}}function Tm(){try{var e=window.localStorage.getItem(gc);if(e==null)return null;var t=JSON.parse(e);if(t!=null&&typeof t.x=="number"&&typeof t.y=="number"&&isFinite(t.x)&&isFinite(t.y))return pi(t)}catch(r){}return null}function Sm(e){try{window.localStorage.setItem(gc,JSON.stringify(e))}catch(t){}}function Vm(e){var t=Nr(),r=t.status,n=r!=null?r.env:null,i=r!=null&&r.running===!0,s=i?"running":r!=null&&r.status==="starting"?"starting":r!=null&&r.status==="error"?"error":"idle",o=Ho(r!=null?r.reserveComposer:!0),a=t.open===!0,c=Ko,[u,l]=h.useState(Tm),[f,m]=h.useState(!1),d=h.useRef(null),p=h.useRef(!1);if(h.useEffect(function(){var g=function(){l(function(S){return S==null?S:pi(S)})};return window.addEventListener("resize",g),function(){window.removeEventListener("resize",g)}},[]),h.useEffect(function(){var g=u!=null?u:(function(){var S=Ho(r!=null?r.reserveComposer:!0);return{x:window.innerWidth-Ae-je,y:window.innerHeight-Ae-je-(S>0?S+10:18)}})();_({ballPos:pi(g)})},[u,r]),n!=null&&n.ok!==!0||t.sidebarActive===!0)return null;var x=function(g){if(g.button===0){var S=g.currentTarget,E=S.getBoundingClientRect();d.current={pointerId:g.pointerId,dx:g.clientX-E.left,dy:g.clientY-E.top,moved:!1},p.current=!1,m(!0);try{S.setPointerCapture(g.pointerId)}catch(A){}}},y=function(g){var S=d.current;if(!(S==null||g.pointerId!==S.pointerId)){var E=g.clientX-S.dx,A=g.clientY-S.dy;(Math.abs(E-(u!=null?u.x:0))>2||Math.abs(A-(u!=null?u.y:0))>2)&&(S.moved=!0),l(pi({x:E,y:A}))}},v=function(){var g=d.current;d.current=null,m(!1),g!=null&&g.moved===!0&&(p.current=!0),g!=null&&g.moved===!0&&l(function(S){return S!=null&&Sm(S),S})},b=function(){if(p.current===!0){p.current=!1;return}if(r!=null&&r.windowedOpen===!0){dc(gi(e&&e.useSessions,e&&e.useWorkspaces));return}_({open:!a})},w=u!=null?{left:u.x,top:u.y}:{right:14,bottom:o>0?o+10:18};return uc.createPortal(h.createElement("button",{type:"button",className:"dshcs-ball"+(a?" dshcs-ball-open":""),style:w,"data-dragging":f===!0?"":void 0,title:r!=null&&r.windowedOpen===!0?"\u5728\u6D4F\u89C8\u5668\u65B0\u6807\u7B7E\u9875\u6253\u5F00 Code Server(\u53EF\u62D6\u52A8)":a?"\u6536\u8D77 Code Server(Esc)":"\u6253\u5F00 Code Server(\u53EF\u62D6\u52A8)","aria-label":a?"\u6536\u8D77 Code Server(Esc)":"\u6253\u5F00 Code Server","aria-expanded":a,onPointerDown:x,onPointerMove:y,onPointerUp:v,onPointerCancel:v,onDragStart:function(g){g&&g.preventDefault&&g.preventDefault()},onClick:b},h.createElement(wm,{url:c}),h.createElement("span",{className:"dshcs-ball-dot","data-status":s,"aria-hidden":!0})),document.body)}function Cm(e){var t=Nr(),r=t.status,n=r!=null&&r.ok===!0&&r.running===!0,i=r!=null&&r.status==="starting",s=r!=null&&r.ok===!1,o=gi(e&&e.useSessions,e&&e.useWorkspaces),a=h.useRef(void 0),[c,u]=h.useState(0),l=Ho(r!=null?r.reserveComposer:!0),[f,m]=h.useState(!1),[d,p]=h.useState(null),[x,y]=h.useState(function(){return gm(0,Me(),l)}),v=h.useRef(x),b=h.useRef(function(){});v.current=x,h.useEffect(function(){var D=function(){y(function(ee){return f?mi(Me(),l):Ht(ee,Me(),l)})};return window.addEventListener("resize",D),function(){window.removeEventListener("resize",D)}},[f,l]),h.useEffect(function(){y(function(D){return Ht(D,Me(),l)})},[l]),h.useEffect(function(){return function(){b.current()}},[]);var w=12,g=4,[S,E]=h.useState(!1),A=h.useRef(null),V=function(D,ee){if(D.button===0){D.preventDefault(),D.stopPropagation(),b.current();var oe=D.currentTarget.ownerDocument.defaultView;if(oe!==null){var de=D.pointerId,Fr=D.currentTarget,Yo=f,_t=Yo?mi(Me(),l):v.current,wc=_t.width>0?(D.clientX-_t.x)/_t.width:0,Tc=Math.min(14,Math.max(0,D.clientY-_t.y)),F={pointerId:de,origin:{x:D.clientX,y:D.clientY},start:_t,ratio:wc,grabY:Tc,wasMaximized:Yo,restored:!1,snapped:!1,moved:!1};A.current=F,p(ee);try{Fr.setPointerCapture(de)}catch(le){}var $o=function(le){if(le.pointerId===de){if(ee!=="move"){y(vm(F.start,ee,le.clientX-F.origin.x,le.clientY-F.origin.y,Me(),l));return}var qo=le.clientX-F.origin.x,zr=le.clientY-F.origin.y;if(Math.abs(qo)+Math.abs(zr)>3&&(F.moved=!0),F.wasMaximized&&!F.restored){if(zr<g)return;var vi=v.current,Gr={x:le.clientX-vi.width*Math.min(.9,Math.max(.1,F.ratio)),y:le.clientY-F.grabY,width:vi.width,height:vi.height};Gr=Ht(Gr,Me(),l),F.restored=!0,F.start=Gr,F.origin={x:le.clientX,y:le.clientY},m(!1),y(Gr);return}var Sc=F.start.y+zr,Vc=ym(F.start,qo,zr,Me(),l);y(Vc);var bi=Sc<=w;bi!==F.snapped&&(F.snapped=bi,E(bi))}},Xo=function(){oe.removeEventListener("pointermove",$o),oe.removeEventListener("pointerup",jr),oe.removeEventListener("pointercancel",jr),b.current=function(){},A.current=null;try{Fr.releasePointerCapture(de)}catch(le){}},jr=function(le){le.pointerId===de&&(Xo(),p(null),(!F.wasMaximized||F.restored===!0)&&(F.snapped===!0&&F.moved===!0&&m(!0),F.snapped===!0&&E(!1)))};b.current=Xo,oe.addEventListener("pointermove",$o),oe.addEventListener("pointerup",jr),oe.addEventListener("pointercancel",jr)}}},L=function(){m(function(D){return!D})},C=function(D){D.target.closest("[data-window-control]")===null&&V(D,"move")},I=function(D){D.target.closest("[data-window-control]")===null&&L()};if(h.useEffect(function(){if(!t.open||t.sidebarActive===!0)return;var D=!1;async function ee(){_({busy:!0});var oe=await fe("/code-server/status");if(!D){if(oe!=null&&oe.ok===!0&&oe.running===!0){_({status:oe,busy:!1});return}var de=await fe("/code-server/start",typeof o=="string"?{cwd:o}:{});D||_({status:de,busy:!1})}}return ee(),function(){D=!0}},[t.open,t.sidebarActive]),h.useEffect(function(){if(t.sidebarActive===!0||typeof o!="string"||o===""||a.current===o)return;var D=a.current!==void 0&&a.current!==o;a.current=o;var ee=!1;async function oe(){_({busy:!0});var de=await fe("/code-server/start",{cwd:o});ee||(_({status:de,busy:!1}),D&&de!=null&&de.ok===!0&&de.running===!0&&u(function(Fr){return Fr+1}))}return oe(),function(){ee=!0}},[o,t.sidebarActive]),h.useEffect(function(){t.open||(a.current=void 0)},[t.open]),h.useEffect(function(){if(t.sidebarActive!==!0){var D=window.setInterval(function(){fe("/code-server/status").then(function(ee){_({status:ee})})},3e3);return function(){window.clearInterval(D)}}},[t.sidebarActive]),h.useEffect(function(){if(!t.open)return;function D(ee){ee.key==="Escape"&&_({open:!1})}return window.addEventListener("keydown",D),function(){window.removeEventListener("keydown",D)}},[t.open]),t.sidebarActive===!0)return null;var R=r!=null&&typeof r.url=="string"?r.url:null,H=n&&r!=null&&typeof r.cwd=="string"&&r.cwd!==""?r.cwd:null,J=null;if(H!==null){var re=H.replace(/\\/g,"/");J=re,(/^[A-Za-z]:\//.test(re)||re.charCodeAt(0)!==47)&&(J="/"+re)}var me=R!==null?R+(J!==null?"?folder="+encodeURIComponent(J):""):null,_o=mc(r,me,c),Y=["dshcs-win",f?"dshcs-win-max":"",S?"dshcs-win-snap":"",t.open===!1?"dshcs-win-hidden":""].filter(Boolean).join(" "),B=f?mi(Me(),l):x,we=t.ballPos!=null?t.ballPos:{x:window.innerWidth-Ae-je,y:window.innerHeight-Ae-je-(l>0?l+10:18)},De={x:we.x+je/2,y:we.y+je/2},yi=Math.max(.05,je/Math.max(B.width,B.height)),xc=t.open===!1?{x:De.x-B.width/2,y:De.y-B.height/2,width:B.width,height:B.height,scale:yi,borderRadius:19,opacity:0}:{x:B.x,y:B.y,width:B.width,height:B.height,scale:1,borderRadius:12,opacity:1},yc=d!==null?{duration:0}:{type:"spring",stiffness:340,damping:38,mass:.9,opacity:{type:"spring",stiffness:420,damping:40,mass:.8},borderRadius:{duration:.2}},vc=h.createElement(jo.section,{className:Y,style:t.open===!1?{left:0,top:0,pointerEvents:"none"}:{left:0,top:0},animate:xc,initial:!1,transition:yc,"data-interaction":d!==null?d:void 0,role:"dialog","aria-label":"Code Server"},h.createElement("span",{className:"dshcs-drag",title:"\u62D6\u52A8\u79FB\u52A8 / \u53CC\u51FB\u6700\u5927\u5316",onPointerDown:C,onDoubleClick:I}),h.createElement("div",{className:"dshcs-body"},_o),f?null:dm.map(function(D){return h.createElement("span",{key:D,className:"dshcs-resize dshcs-resize-"+D,"data-direction":D,onPointerDown:function(ee){V(ee,D)}})})),Br=mi(Me(),l),bc=h.createElement(jo.div,{className:"dshcs-snapghost",initial:!1,animate:{opacity:S===!0?1:0,x:Br.x,y:Br.y,width:Br.width,height:Br.height},transition:S===!0?{type:"spring",stiffness:500,damping:44,mass:.9}:{duration:.14}},h.createElement("span",{className:"dshcs-snapghint"},"\u677E\u5F00\u4EE5\u6700\u5927\u5316"));return uc.createPortal(h.createElement(h.Fragment,null,vc,bc),document.body)}var zo="code-server",ac="dsh-code-server-app",Kt={openTab:null};function Pm(e){var t=e!=null&&typeof e.size=="number"?e.size:16;return h.createElement("img",{src:Ko,alt:"","aria-hidden":!0,draggable:!1,className:e!=null?e.className:void 0,style:{width:t,height:t,display:"block",objectFit:"contain",WebkitUserDrag:"none",userSelect:"none"}})}function Em(e){var t=e.useTabInfo(),r=t.tab,n=Nr(),i=n.status,s=gi(e.useSessions,null),o=h.useRef(void 0),[a,c]=h.useState(0),u=r.navigation,l=u!=null&&typeof u.revision=="number"?u.revision:0;return h.useEffect(function(){if(!(typeof s!="string"||s==="")&&o.current!==s){var f=o.current!==void 0;o.current=s;var m=!1;return fe("/code-server/start",{cwd:s}).then(function(d){m||(_({status:d}),f&&d!=null&&d.ok===!0&&d.running===!0&&c(function(p){return p+1}))}).catch(function(){}),function(){m=!0}}},[s]),h.useEffect(function(){fe("/code-server/status").then(function(m){m!=null&&_({status:m})}).catch(function(){});var f=window.setInterval(function(){fe("/code-server/status").then(function(m){_({status:m})}).catch(function(){})},3e3);return function(){window.clearInterval(f)}},[]),h.useEffect(function(){var f=u!=null?u.params:null,m=f!=null&&typeof f.path=="string"?f.path:"";m!==""&&fe("/code-server/open-file",{file:m}).catch(function(){})},[l]),h.createElement("div",{className:"dshcs-tabroot","data-code-server-tab":"body"},mc(i,fc(i,s),a))}function Mm(e){var t=e.sidebarRightTabs,r=e.sidebarRight;t==null||r==null||(e.effect(function(){return t.register({id:ac,kind:zo,priority:"extension",title:function(){return"Code Server"},guide:[{order:20,title:function(){return"Code Server"},description:function(){return"\u5728\u53F3\u4FA7\u680F\u6807\u7B7E\u91CC\u8FD0\u884C VS Code \u7F51\u9875\u7248,\u8DDF\u968F\u5F53\u524D\u4F1A\u8BDD\u5DE5\u4F5C\u533A\u3002"},icon:Pm}]})},"code-server: sidebar tab type"),e.effect(function(){return e.slots.inject("sidebar.right.pane.tab",function(){return e.slots.register({name:"sidebar.right.pane.tab",key:ac},Em)})},"code-server: sidebar tab body"),Kt.openTab=function(n){try{return r.openTab(zo,n!=null?{params:n}:void 0),!0}catch(i){return console.warn("[code-server] sidebar openTab failed:",i!=null&&i.message!=null?i.message:String(i)),!1}},e.effect(function(){return function(){Kt.openTab=null,_({sidebarActive:!1})}},"code-server: sidebar mode reset"),_({sidebarActive:!0,open:!1}),console.log("[code-server] right-sidebar tab registered (kind="+zo+")"))}var Am=".dshcs-card{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-3);border-radius:12px;list-style:none;transition:border-color .16s,background .16s}.dshcs-card:hover{border-color:var(--dsw-alias-label-dimmed,var(--dsw-alias-border-l2))}.dshcs-cardOpen{background:var(--dsw-alias-bg-layer-2);border-color:var(--dsw-alias-label-dimmed,var(--dsw-alias-border-l2))}.dshcs-cardHeader{appearance:none;width:100%;font:inherit;color:inherit;text-align:left;cursor:pointer;background:0 0;border:0;border-radius:12px;align-items:center;gap:12px;padding:14px 16px;display:flex}.dshcs-cardHeader:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:-2px}.dshcs-cardHeadText{flex-direction:column;flex:1;gap:4px;min-width:0;display:flex}.dshcs-cardName{color:var(--dsw-alias-label-primary);font-size:15px;font-weight:600;line-height:1.4}.dshcs-cardDescription{color:var(--dsw-alias-label-tertiary,var(--dsw-alias-label-secondary));font-size:13px;line-height:1.5}.dshcs-cardChevron{color:var(--dsw-alias-label-tertiary,var(--dsw-alias-label-secondary));flex:none;transition:transform .16s;display:inline-flex}.dshcs-cardChevronOpen{transform:rotate(180deg)}.dshcs-cardBody{border-top:1px solid var(--dsw-alias-border-l2);margin:0 16px;padding-bottom:8px}.dshcs-cardReadOnly{color:var(--dsw-alias-label-tertiary,var(--dsw-alias-label-secondary));margin:12px 0 0;font-size:12px;line-height:1.5}.dshcs-pending{white-space:nowrap;background:var(--dsw-alias-bg-module-platform,var(--dsw-alias-bg-layer-2));color:var(--dsw-alias-label-secondary);border-radius:999px;flex:none;padding:1px 8px;font-size:11px;font-weight:500;line-height:17px}.dshcs-cardFooter{border-top:1px solid var(--dsw-alias-border-l2);justify-content:flex-end;align-items:center;gap:8px;padding:12px 0 4px;display:flex}.dshcs-cardFailed{min-width:0;color:var(--dsw-alias-label-error,var(--dsw-alias-state-error-primary));flex:1;margin:0;font-size:12px;line-height:1.5}.dshcs-cbtn{appearance:none;font:inherit;cursor:pointer;border-radius:8px;padding:5px 14px;font-size:13px;line-height:1.5;border:1px solid transparent;transition:color .12s ease,background .12s ease}.dshcs-cbtn:disabled{opacity:.4;cursor:default}.dshcs-cbtn:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:1px}.dshcs-cbtnOutline{border-color:var(--dsw-alias-border-l2);color:var(--dsw-alias-label-secondary);background:0 0}.dshcs-cbtnOutline:hover:not(:disabled){color:var(--dsw-alias-label-primary);background:var(--dsw-alias-interactive-bg-hover,transparent)}.dshcs-cbtnPrimary{background:var(--dsw-alias-label-primary);color:var(--dsw-alias-bg-layer-3);border-color:var(--dsw-alias-label-primary);font-weight:600}.dshcs-cbtnPrimary:hover:not(:disabled){filter:brightness(.95)}.dshcs-cbtnPrimary:active:not(:disabled){filter:brightness(.9)}.dshcs-field{flex-direction:column;gap:6px;padding:12px 0;display:flex}.dshcs-field+.dshcs-field{border-top:1px solid var(--dsw-alias-border-l2)}.dshcs-fieldHead{align-items:center;gap:8px;display:flex}.dshcs-fieldLabel{min-width:0;color:var(--dsw-alias-label-primary);flex:1;font-size:13px;font-weight:500;line-height:1.5}.dshcs-hint{color:var(--dsw-alias-label-tertiary,var(--dsw-alias-label-secondary));margin:0;font-size:12px;line-height:1.5}.dshcs-check{display:flex;align-items:center;gap:8px;cursor:pointer}.dshcs-check input{accent-color:var(--dsw-alias-brand-primary);width:15px;height:15px;margin:0;flex:none}.dshcs-check input:disabled{cursor:default}.dshcs-badges{align-items:center;gap:8px;display:inline-flex}.dshcs-badge{white-space:nowrap;background:var(--dsw-alias-bg-module-platform,var(--dsw-alias-bg-layer-2));color:var(--dsw-alias-label-secondary);border-radius:999px;padding:1px 8px;font-size:11px;font-weight:500;line-height:17px}.dshcs-reset{font:inherit;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;padding:0;font-size:12px;line-height:1.5}.dshcs-reset:hover:not(:disabled){color:var(--dsw-alias-label-primary)}.dshcs-reset:disabled{cursor:default}",Dm="dsh-code-server/Card.module.css";function Rm(e,t){if(typeof document!="undefined"&&document.querySelector("style[data-plugin-css="+JSON.stringify(e)+"]")===null){var r=document.createElement("style");r.dataset.plugin="dsh-code-server",r.dataset.pluginCss=e,r.textContent=t,document.head.appendChild(r)}}Rm(Dm,Am);function km(e){return h.createElement("svg",{width:14,height:14,viewBox:"0 0 14 14",fill:"none","aria-hidden":!0,className:e.className},h.createElement("path",{d:"M3.5 5.25L7 8.75L10.5 5.25",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}))}function hi(e){return h.createElement("button",{type:"button",className:"dshcs-cbtn "+(e.variant==="primary"?"dshcs-cbtnPrimary":"dshcs-cbtnOutline"),disabled:e.disabled===!0,onClick:e.onClick},e.children)}function lc(e){return h.createElement("label",{className:"dshcs-check"},h.createElement("input",{type:"checkbox",checked:e.checked===!0,disabled:e.disabled===!0,onChange:function(t){e.onChange(t.target.checked)}}),h.createElement("span",{className:"dshcs-hint"},e.children))}function cc(e){var t=[];return e.overridden===!0&&(t.push(h.createElement("span",{className:"dshcs-badge"},e.overriddenLabel)),t.push(h.createElement("button",{type:"button",className:"dshcs-reset",disabled:e.disabled===!0,onClick:e.onReset},e.resetLabel))),t.length===0?null:h.createElement("span",{className:"dshcs-badges"},...t)}function Lm(e){var[t,r]=h.useState(!1),n=e.state;if(n==null||n.available!==!0)return null;var i=e.title,s=n.dirty!==!0||n.invalid===!0||n.saving===!0;return h.createElement("li",{className:"dshcs-card"+(t?" dshcs-cardOpen":"")},h.createElement("button",{type:"button",className:"dshcs-cardHeader","aria-expanded":t,onClick:function(){r(!t)}},h.createElement("span",{className:"dshcs-cardHeadText"},h.createElement("span",{className:"dshcs-cardName"},i),h.createElement("span",{className:"dshcs-cardDescription"},e.description)),n.dirty===!0?h.createElement("span",{className:"dshcs-pending"},e.unsavedLabel):null,h.createElement(km,{className:"dshcs-cardChevron"+(t?" dshcs-cardChevronOpen":"")})),t===!0?h.createElement("div",{className:"dshcs-cardBody"},n.writable!==!0?h.createElement("p",{className:"dshcs-cardReadOnly",role:"status"},e.readOnlyLabel):null,e.children,h.createElement("div",{className:"dshcs-cardFooter"},n.failed===!0?h.createElement("p",{className:"dshcs-cardFailed",role:"status"},e.saveFailedLabel):null,h.createElement(hi,{disabled:n.dirty!==!0||n.saving===!0,onClick:e.onDiscard},e.discardLabel),h.createElement(hi,{variant:"primary",disabled:s,onClick:e.onSave},n.saving===!0?e.savingLabel:e.saveLabel))):null)}function Im(e){try{let L=function(){fe("/code-server/status").then(function(R){R!=null&&typeof R=="object"&&_({status:R})}).catch(function(){})};var t=e.scope,[r,n]=h.useState(function(){return t!==void 0?t.getSnapshot():null}),[i,s]=h.useState(null),[o,a]=h.useState(!1),[c,u]=h.useState(!1),l=Nr();if(h.useEffect(function(){if(t===void 0||typeof t.subscribe!="function")return;function R(){try{n(t.getSnapshot())}catch(J){}}var H=t.subscribe(R);return function(){typeof H=="function"&&H()}},[t]),t===void 0)return console.error("[code-server] card scope missing"),null;if(r==null||r.status!=="ready")return r!=null&&r.status==="unavailable"&&console.warn("[code-server] settings scope unavailable:",r.status),null;var f=r.value!==void 0&&r.value!==null?r.value:{},m=r.user,d={reserveComposer:f.reserveComposer!==!1,windowedOpen:f.windowedOpen===!0},p=m!=null&&Object.prototype.hasOwnProperty.call(m,"reserveComposer"),x=m!=null&&Object.prototype.hasOwnProperty.call(m,"windowedOpen"),y=l!=null&&l.sidebarActive===!0,v=i!==null&&(i.reserveComposer!==d.reserveComposer||i.windowedOpen!==d.windowedOpen),b=!v||o,w={available:!0,writable:r.writable,dirty:v,invalid:!1,saving:o,failed:c,reserveComposer:{text:i!==null?i.reserveComposer:d.reserveComposer,overridden:p}};async function C(){if(v&&!o){a(!0),u(!1);try{var R=i!==null?i:d;await e.scope.set("reserveComposer",R.reserveComposer===!0),await e.scope.set("windowedOpen",R.windowedOpen===!0),s(null),L()}catch(H){u(!0)}a(!1)}}async function I(){if(!(o||r.writable!==!0)){a(!0),u(!1);try{typeof e.scope.unset=="function"?(await e.scope.unset("reserveComposer"),await e.scope.unset("windowedOpen")):(await e.scope.set("reserveComposer",f.reserveComposer===void 0||f.reserveComposer===null?!0:f.reserveComposer),await e.scope.set("windowedOpen",f.windowedOpen===!0)),s(null),L()}catch(R){u(!0)}a(!1)}}var[g,S]=h.useState(null),[E,A]=h.useState(!1),V=h.createElement("div",{className:"dshcs-field"},h.createElement("div",{className:"dshcs-fieldHead"},h.createElement("span",{className:"dshcs-fieldLabel"},"\u73AF\u5883\u68C0\u6D4B"),h.createElement("span",{className:"dshcs-badges"},h.createElement(hi,{variant:"primary",disabled:E,onClick:async function(){A(!0);var R=await fe("/code-server/status");S(R!=null&&R.env!=null?R.env:{error:"status \u672A\u8FD4\u56DE env"}),A(!1)}},E?"\u68C0\u6D4B\u4E2D\u2026":"\u68C0\u6D4B\u73AF\u5883"))),g!=null?h.createElement("div",{className:"dshcs-hint",style:{marginTop:6}},g.error!=null?h.createElement("span",null,"\u68C0\u6D4B\u5931\u8D25: "+g.error):h.createElement("span",null,"\u72B6\u6001: "+(g.ok===!0?"\u2705 \u5C31\u7EEA":"\u274C \u4E0D\u901A\u8FC7")+(g.treeVersion!=null?" \xB7 VS Code \u6811: "+g.treeVersion:"")+(g.upToDate===!1&&g.vendored!=null?"(\u5185\u7F6E "+g.vendored+") ":"")+(g.productPath!=null?" \xB7 \u5BA2\u6237\u7AEF\u8DEF\u5F84: "+g.productPath:"")+(g.entry!=null?" \xB7 \u5165\u53E3: "+g.entry:" \xB7 \u5165\u53E3\u7F3A\u5931")+" \xB7 VS Code \u5185\u90E8\u4F9D\u8D56: "+(g.vscodeInner===!0?"\u2705":"\u274C")+" \xB7 \u9884\u7F16\u8BD1\u539F\u751F\u5305: "+(g.nativeRuntime!=null&&g.nativeRuntime.packages>0?"\u2705 "+g.nativeRuntime.name+"@"+(g.nativeRuntime.version!=null?g.nativeRuntime.version:"?")+"("+g.nativeRuntime.packages+" \u5305)":"\u274C \u672A\u5B89\u88C5("+(g.nativeRuntime!=null&&g.nativeRuntime.name!=null?g.nativeRuntime.name:"\u5E73\u53F0\u805A\u5408\u5305")+")"))):h.createElement("div",{className:"dshcs-hint",style:{marginTop:6}},'\u70B9\u51FB"\u68C0\u6D4B\u73AF\u5883"\u67E5\u770B VS Code \u6811\u72B6\u6001(\u4F9D\u8D56\u7531\u5305\u7BA1\u7406\u5668\u5B89\u88C5,\u65E0\u9700\u5B89\u88C5\u6B65\u9AA4)'),h.createElement("div",{className:"dshcs-hint",style:{marginTop:10,color:"var(--dsw-alias-label-tertiary,var(--dsw-alias-label-secondary))"}},"\u8FD0\u884C\u4F4D\u7F6E: "+(g!=null&&g.tree!=null?g.tree:"<\u63D2\u4EF6\u76EE\u5F55>\\vendor\\vscode")+`
|
|
3
|
-
\
|
|
2
|
+
var z=Object.defineProperty;var fe=Object.getOwnPropertyDescriptor;var pe=Object.getOwnPropertyNames;var he=Object.prototype.hasOwnProperty;var be=(e,r)=>{for(var n in r)z(e,n,{get:r[n],enumerable:!0})},ve=(e,r,n,s)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of pe(r))!he.call(e,i)&&i!==n&&z(e,i,{get:()=>r[i],enumerable:!(s=fe(r,i))||s.enumerable});return e};var me=e=>ve(z({},"__esModule",{value:!0}),e);var qe={};be(qe,{apply:()=>Ye,inject:()=>Fe,name:()=>Je});module.exports=me(qe);var N=typeof Element!="undefined"&&typeof Element.prototype.moveBefore=="function",ge=-2e4,t={park:null,frame:null,currentSrc:null,sameOrigin:null,owner:null,lastRect:null,parkStrategy:"offscreen",degraded:!1,preloaded:!1,nudgeCount:0,nudgeEnabled:!0,lastNudgeAt:0,listeners:new Set};function D(){return{ready:t.frame!==null,docked:t.owner!==null,owner:t.owner,src:t.currentSrc,sameOrigin:t.sameOrigin,parkStrategy:t.parkStrategy,degraded:t.degraded,preloaded:t.preloaded,supportsMoveBefore:N,nudgeCount:t.nudgeCount,lastNudgeAt:t.lastNudgeAt}}function C(){var e=D();t.listeners.forEach(function(r){try{r(e)}catch(n){}})}function Z(e){return t.listeners.add(e),function(){t.listeners.delete(e)}}function F(){return D()}function ye(e){e!=="offscreen"&&e!=="behind"||t.parkStrategy!==e&&(t.parkStrategy=e,t.frame!==null&&t.owner===null&&j(),C())}function we(){return t.parkStrategy}function xe(){var e=t.lastRect;e!==null&&(t.park.style.width=Math.max(1,Math.round(e.width))+"px",t.park.style.height=Math.max(1,Math.round(e.height))+"px")}function j(){if(t.park!==null){if(xe(),t.parkStrategy==="behind"&&t.lastRect!==null){t.park.style.left=Math.round(t.lastRect.left)+"px",t.park.style.top=Math.round(t.lastRect.top)+"px",t.park.style.visibility="visible",t.park.style.zIndex="0";return}t.park.style.left=ge+"px",t.park.style.top="0px",t.park.style.visibility="hidden",t.park.style.zIndex="0"}}function J(){t.frame!==null&&(t.frame.setAttribute("inert",""),t.frame.setAttribute("aria-hidden","true"))}function ke(){t.frame!==null&&(t.frame.removeAttribute("inert"),t.frame.removeAttribute("aria-hidden"))}function Se(){var e=document.createElement("div");e.className="dshcs-park",e.setAttribute("data-dshcs-park",""),e.setAttribute("aria-hidden","true");var r=document.createElement("iframe");return r.className="dshcs-frame",r.setAttribute("title","code-server"),r.setAttribute("allow","clipboard-read; clipboard-write"),r.setAttribute("data-dshcs-resident",""),r.src="about:blank",e.appendChild(r),document.body.appendChild(e),t.park=e,t.frame=r,t.currentSrc="about:blank",t.owner=null,j(),J(),r}function Ee(e){var r=t.frame;if(r!==null){var n=t.sameOrigin!==e;!n&&r.hasAttribute("data-dshcs-attrs")||(e===!0?r.removeAttribute("sandbox"):e===!1&&r.setAttribute("sandbox","allow-scripts allow-same-origin allow-forms allow-modals allow-popups allow-pointer-lock allow-clipboard-read allow-clipboard-write"),r.setAttribute("data-dshcs-attrs",e===!0?"same-origin":"cross-origin"),t.sameOrigin=e)}}function I(e){var r=e||{};return t.frame===null&&Se(),typeof r.sameOrigin=="boolean"&&Ee(r.sameOrigin),typeof r.src=="string"&&r.src!==""&&r.src!==t.currentSrc&&Ne(r.src),t.frame}function Ne(e){t.frame===null||typeof e!="string"||e===""||e===t.currentSrc||(t.currentSrc=e,t.frame.src=e,C())}function q(){var e=t.frame;if(t.nudgeEnabled!==!0||e===null||e.isConnected!==!0)return!1;var r=e.style.display;return e.style.display="none",e.offsetHeight,e.style.display=r,t.nudgeCount+=1,t.lastNudgeAt=Date.now(),!0}function Ce(e){return t.nudgeEnabled=e!==!1,t.nudgeEnabled}function X(e){if(t.frame!==null){if(N)try{e.moveBefore(t.frame,null);return}catch(r){t.degraded=!0,t.lastMoveError=(r&&r.name?r.name+": ":"")+(r&&r.message?r.message:String(r))}else t.degraded=!0;e.appendChild(t.frame)}}function P(e,r){if(!(t.frame===null||e==null)){var n=t.owner===null,s=e.getBoundingClientRect();s.width>=1&&s.height>=1&&(t.lastRect={left:s.left,top:s.top,width:s.width,height:s.height}),t.owner=r===void 0?null:r,ke(),t.park.setAttribute("aria-hidden","true"),X(e),n&&q(),C()}}function T(e){t.frame!==null&&(e!==void 0&&t.owner!==e||(t.owner=null,j(),J(),t.park.setAttribute("aria-hidden","true"),X(t.park),C()))}function H(e){var r=e||{};return I(r),t.owner===null&&(typeof r.src=="string"&&r.src!==""&&(t.preloaded=!0),T()),t.frame}function Te(){t.park!==null&&t.park.parentNode!==null&&t.park.parentNode.removeChild(t.park),t.park=null,t.frame=null,t.currentSrc=null,t.sameOrigin=null,t.owner=null,t.lastRect=null,t.degraded=!1,t.preloaded=!1,t.nudgeCount=0,t.lastNudgeAt=0,C()}typeof window!="undefined"&&(window.__dshcsSurface={snapshot:D,setParkStrategy:ye,getParkStrategy:we,preload:H,dock:P,park:T,nudge:q,setNudgeEnabled:Ce,destroy:Te});var a=require("react"),B=new Set,G={status:null,busy:!1,sidebarActive:!1,sidebarUi:"unknown"};function m(e){G=Object.assign({},G,e),B.forEach(function(r){r()})}function Oe(e){return B.add(e),function(){B.delete(e)}}function _(){return G}function R(){return a.useSyncExternalStore(Oe,_)}var Le="/api",ne="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB2aWV3Qm94PSIwIDAgMTQ3IDE0NyIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8c3R5bGU+QG1lZGlhIChwcmVmZXJzLWNvbG9yLXNjaGVtZTogZGFyaykgeyogeyBmaWxsOiB3aGl0ZTsgfX08L3N0eWxlPgogIDxwYXRoIGQ9Im00Mi40MjE0LDM5LjY1NWMtMjQuNDA1NywwIC00Mi4xNTU0LDEzLjE3MjEgLTQyLjE1NTQsMzMuODQ1YzAsMjAuNTgxNCAxOC40ODkyLDMzLjg0NSA0Mi4xNTU0LDMzLjg0NWMyMy42NjYyLDAgMzguMTgwMywtMTEuNjE3MSAzOC43MzQ5LC0yOC43MjI1bC0yMS4wNzc3LC0wLjQ1NzRjLTAuOTI0NCw5LjMzMDMgLTkuMTA1OSwxNS4xODQ1IC0xNy42NTcyLDE1LjE4NDVjLTExLjc0MDYsMCAtMjAuNDMwNiwtNy41OTIyIC0yMC40MzA2LC0xOS44NDk2YzAsLTEyLjI1NzQgOC42OSwtMTkuOTg2OCAyMC40MzA2LC0yMC4yMTU1YzguNTUxMywtMC4xODMgMTYuOTE3Nyw1Ljk0NTcgMTcuNDcyMywxNS4yNzZsMjEuMDc3NywtMC42NDAzYy0wLjQ2MjIsLTE2LjgzMTEgLTE0LjE0NDIsLTI4LjI2NTIgLTM4LjU1LC0yOC4yNjUyem00OC44NDQ2LDJsNTUuNDY4LDBsMCw2NC4wMzExbC01NS40NjgsMGwwLC02NC4wMzExeiIgY2xpcC1ydWxlPSJldmVub2RkIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz4KPC9zdmc+Cg==";async function y(e,r){var n={method:r===void 0?"GET":"POST",headers:{}};r!==void 0&&(n.headers["content-type"]="application/json",n.body=JSON.stringify(r));var s=await fetch(Le+e,n),i=await s.text(),l=null;try{l=i===""?null:JSON.parse(i)}catch(d){l=null}return s.ok?l!==null?l:{ok:!1,error:"invalid JSON response"}:{ok:!1,error:"HTTP "+s.status+(l!==null&&l.error!==void 0?": "+l.error:"")}}function L(e,r){try{var n=e(function(h){return h}),s=r===null?null:typeof r=="function"?r(function(h){return h}):null,i=n!=null?n.current:void 0;if(i!==void 0&&n!=null&&n.byId!=null){var l=n.byId[i];if(l!=null&&typeof l.cwd=="string"&&l.cwd!=="")return l.cwd}var d=s!=null&&Array.isArray(s.items)?s.items:[];if(i!==void 0)for(var o=0;o<d.length;o++){var b=d[o];if(b.sessionIds!=null&&b.sessionIds.indexOf(i)!==-1&&typeof b.path=="string"&&b.path!=="")return b.path}var c=s!=null?s.recentWorkspaceId:void 0;if(c!==void 0){for(var u=0;u<d.length;u++)if(d[u].workspaceId===c&&typeof d[u].path=="string"&&d[u].path!=="")return d[u].path}if(d.length>0&&typeof d[0].path=="string"&&d[0].path!=="")return d[0].path}catch(h){}}function V(e,r){if(e==null||typeof e.url!="string"||e.url==="")return null;var n=typeof r=="string"&&r!==""?r:e!=null&&e.cwd!=null?e.cwd:null;if(n==null||n==="")return e.url;var s=n.replace(/\\/g,"/"),i=s;return(/^[A-Za-z]:\//.test(s)||s.charCodeAt(0)!==47)&&(i="/"+s),e.url+"?folder="+encodeURIComponent(i)}function Me(e){var r=e.status,n=e.pageUrl,s=e.reloadTick,i=e.owner,l=a.useRef(null),d=r!=null&&r.ok===!0&&r.running===!0,o=r!=null&&r.status==="starting",b=r!=null&&r.ok===!1,c=r!=null&&r.serve==="dsh";if(a.useLayoutEffect(function(){if(!d||n===null){T(i);return}I({src:n,sameOrigin:c}),l.current!==null&&P(l.current,i)},[d,n,c,s,i]),a.useLayoutEffect(function(){return function(){T(i)}},[i]),d&&n!==null)return a.createElement("div",{ref:l,className:"dshcs-slot","data-code-server-slot":i!=null?i:"code-server"});if(o)return a.createElement("div",{className:"dshcs-loading"},"\u6B63\u5728\u542F\u52A8 code-server\u2026");var u=b&&r!=null&&r.error?r.error:"code-server \u672A\u8FD0\u884C",h=c?"\u5F53\u524D\u4EE5 DSH \u540C\u6E90\u8DEF\u5F84 "+(r!=null&&r.url||"/code-server/")+" \u63D0\u4F9B(\u65E0\u72EC\u7ACB\u7AEF\u53E3)\u3002":"\u5F53\u524D\u4EE5\u72EC\u7ACB\u56DE\u73AF\u7AEF\u53E3\u63D0\u4F9B(\u7AEF\u53E3 "+(r!=null&&r.port!=null?r.port:"8090")+" \u88AB\u5360\u7528\u65F6\u8BF7\u91CA\u653E\u6216\u4FEE\u6539 port \u914D\u7F6E)\u3002",v=N?"\u5E38\u9A7B\u9762:\u53EF\u7528(\u5207\u6807\u7B7E/\u6536\u8D77\u4FA7\u680F\u4E0D\u91CD\u8F7D)\u3002":"\u5E38\u9A7B\u9762:\u5F53\u524D\u6D4F\u89C8\u5668\u4E0D\u652F\u6301 Element.moveBefore \u2014\u2014 \u5207\u6807\u7B7E\u4F1A\u6574\u9875\u91CD\u8F7D(\u5347\u7EA7\u6D4F\u89C8\u5668\u540E\u81EA\u52A8\u53EF\u7528)\u3002";return a.createElement("div",{className:"dshcs-empty"},a.createElement("div",{className:"dshcs-emptybox"},a.createElement("div",null,b?"code-server \u542F\u52A8\u5931\u8D25":"code-server \u672A\u8FD0\u884C"),a.createElement("pre",{className:"dshcs-error"},u),a.createElement("p",{className:"dshcs-hint"},"VS Code \u6811\u968F\u63D2\u4EF6\u5305\u5185\u7F6E\u3001\u5C31\u5730\u8FD0\u884C(\u65E0\u9700\u5168\u5C40\u5B89\u88C5\u3001\u65E0\u9700\u8054\u7F51\u5B89\u88C5\u3001\u65E0\u300C\u5B89\u88C5\u73AF\u5883\u300D\u6B65\u9AA4);\u5185\u90E8\u4F9D\u8D56\u4E0E\u9884\u7F16\u8BD1\u539F\u751F\u6A21\u5757\u7531\u5305\u7BA1\u7406\u5668\u5728\u5B89\u88C5\u63D2\u4EF6\u65F6\u4E00\u5E76\u88C5\u597D(\u65E0\u9700 C++ \u5DE5\u5177\u94FE)\u3002\u82E5\u6B64\u5904\u957F\u671F\u672A\u8FD0\u884C,\u8BF7\u5230 \u8BBE\u7F6E \u2192 \u63D2\u4EF6 \u2192 Code Server \u70B9\u300C\u68C0\u6D4B\u73AF\u5883\u300D\u67E5\u770B\u539F\u56E0\u3002"+h+v)))}function Re(e){var r=R(),n=r.status,s=n!=null&&n.ok===!0&&n.running===!0,i=n!=null&&n.keepResident===!0,l=L(e&&e.useSessions,e&&e.useWorkspaces),d=s?V(n,l):null;return a.useEffect(function(){!i||!s||d===null||H({src:d,sameOrigin:n!=null&&n.serve==="dsh"})},[i,s,d,n!=null?n.serve:null]),null}function K(e){var r=function(s){var i=V(s,e);i!=null&&typeof window.open=="function"&&window.open(i,"_blank","noopener")},n=_().status;if(n!=null&&n.running===!0){r(n);return}_().busy!==!0&&(m({busy:!0}),y("/code-server/start",typeof e=="string"?{cwd:e}:{}).then(function(s){m({status:s,busy:!1}),r(s)}).catch(function(){m({busy:!1})}))}var Ae=".dshcs-artbtn{appearance:none;display:inline-grid;place-items:center;width:22px;height:22px;padding:0;border:1px solid var(--dsw-alias-border-l2,#dfe3eb);border-radius:6px;color:var(--dsw-alias-label-secondary,#566174);background:color-mix(in srgb,var(--dsw-alias-bg-base,#fff) 60%,transparent);cursor:pointer;transition:color .12s ease,background .12s ease,border-color .12s ease;vertical-align:middle}.dshcs-artbtn:hover{color:var(--dsw-alias-label-primary,#172033);border-color:color-mix(in srgb,var(--dshcs-accent,#5b6cff) 40%,var(--dsw-alias-border-l2,#dfe3eb));background:color-mix(in srgb,var(--dshcs-accent,#5b6cff) 8%,transparent)}.dshcs-artbtn:active{transform:scale(.94)}.dshcs-artbtn:focus-visible{outline:2px solid color-mix(in srgb,var(--dshcs-accent,#5b6cff) 65%,transparent);outline-offset:1px}.dshcs-artifacts{display:grid;grid-template-columns:max-content minmax(0,1fr);align-items:center;gap:6px 8px;margin-top:16px;font-size:13px;line-height:22px;position:relative}.dshcs-artlabel{color:var(--dsw-alias-label-tertiary,#7d8798);grid-area:1/1}.dshcs-artrow{flex-wrap:nowrap;grid-area:1/2;align-items:center;gap:8px;min-width:0;display:flex;overflow:hidden}.dshcs-artitem{display:inline-flex;align-items:center;gap:4px;flex:none;min-width:0}.dshcs-artfile{text-overflow:ellipsis;white-space:nowrap;background:var(--dsw-alias-interactive-bg-hover);max-width:320px;color:var(--dsw-alias-label-secondary,#566174);font:inherit;cursor:pointer;border:none;border-radius:6px;margin:0;padding:0 8px;overflow:hidden}.dshcs-artfile:hover{color:var(--dsw-alias-label-primary,#172033);text-decoration:underline}.dshcs-artfile:focus-visible{box-shadow:inset 0 0 0 2px var(--dsw-alias-border-l3);outline:none}.dshcs-artmore{white-space:nowrap;color:var(--dsw-alias-label-tertiary,#7d8798);flex:none}.dshcs-frame{display:block;position:absolute;inset:0;z-index:1;width:100%;height:100%;border:0;background:var(--dsw-alias-bg-base,#fff)}.dshcs-tabroot{position:relative;display:flex;flex-direction:column;width:100%;height:100%;min-width:0;min-height:0;background:var(--dsw-alias-bg-base,#fff)}.dshcs-slot{position:relative;display:block;width:100%;height:100%;min-width:0;min-height:0;overflow:hidden;background:var(--dsw-alias-bg-base,#fff)}.dshcs-park{position:fixed;left:-20000px;top:0;width:320px;height:200px;overflow:hidden;pointer-events:none;z-index:0;visibility:hidden;contain:strict}.dshcs-loading{position:absolute;inset:0;z-index:2;display:grid;place-items:center;background:var(--dsw-alias-bg-base,#fff);color:var(--dsw-alias-label-tertiary,#7d8798);font-size:13px}.dshcs-empty{position:relative;z-index:2;flex:1;display:flex;align-items:center;justify-content:center;padding:44px 24px 24px}.dshcs-emptybox{max-width:560px;text-align:left;background:var(--dsw-alias-bg-layer-2,#f7f8fb);border:1px solid var(--dsw-alias-border-l2,#dfe3eb);border-radius:12px;padding:16px 18px}.dshcs-error{color:var(--dsw-alias-label-error,#d92d20);white-space:pre-wrap;word-break:break-all;font-family:ui-monospace,Consolas,monospace;font-size:12px;margin:8px 0 0}.dshcs-hint{color:var(--dsw-alias-label-tertiary,#7d8798);font-size:12px;margin:6px 0 0}.dshcs-legacy{color:var(--dsw-alias-label-warning,#b54708);font-size:12px;font-weight:600;margin:0 0 6px}",$="dsh-code-server/styles";typeof document!="undefined"&&document.querySelector("style[data-dshcs="+JSON.stringify($)+"]")===null&&(O=document.createElement("style"),O.setAttribute("data-dshcs",$),O.textContent=Ae,document.head.appendChild(O));var O,U="code-server",ee="dsh-code-server-app",ze=2500,E={openTab:null};function De(e){var r=e!=null&&typeof e.size=="number"?e.size:16;return a.createElement("img",{src:ne,alt:"","aria-hidden":!0,draggable:!1,className:e!=null?e.className:void 0,style:{width:r,height:r,display:"block",objectFit:"contain",WebkitUserDrag:"none",userSelect:"none"}})}function je(e){var r=e.useTabInfo(),n=r.tab,s=R(),i=s.status,l=L(e.useSessions,null),d=a.useRef(void 0),[o,b]=a.useState(0),c=n.navigation,u=c!=null&&typeof c.revision=="number"?c.revision:0;return a.useEffect(function(){if(!(typeof l!="string"||l==="")&&d.current!==l){var h=d.current!==void 0;d.current=l;var v=!1;return y("/code-server/start",{cwd:l}).then(function(g){v||(m({status:g}),h&&g!=null&&g.ok===!0&&g.running===!0&&b(function(x){return x+1}))}).catch(function(){}),function(){v=!0}}},[l]),a.useEffect(function(){y("/code-server/status").then(function(v){v!=null&&m({status:v})}).catch(function(){});var h=window.setInterval(function(){y("/code-server/status").then(function(v){m({status:v})}).catch(function(){})},3e3);return function(){window.clearInterval(h)}},[]),a.useEffect(function(){var h=c!=null?c.params:null,v=h!=null&&typeof h.path=="string"?h.path:"";v!==""&&y("/code-server/open-file",{file:v}).catch(function(){})},[u]),a.createElement("div",{className:"dshcs-tabroot","data-code-server-tab":"body"},a.createElement(Me,{status:i,pageUrl:V(i,l),reloadTick:o,owner:"tab:"+n.id}))}function Ie(e){var r=e.sidebarRightTabs,n=e.sidebarRight;r==null||n==null||(e.effect(function(){return r.register({id:ee,kind:U,priority:"extension",title:function(){return"Code Server"},guide:[{order:20,title:function(){return"Code Server"},description:function(){return"\u5728\u53F3\u4FA7\u680F\u6807\u7B7E\u91CC\u8FD0\u884C VS Code \u7F51\u9875\u7248,\u8DDF\u968F\u5F53\u524D\u4F1A\u8BDD\u5DE5\u4F5C\u533A\u3002"},icon:De}]})},"code-server: sidebar tab type"),e.effect(function(){return e.slots.inject("sidebar.right.pane.tab",function(){return e.slots.register({name:"sidebar.right.pane.tab",key:ee},je)})},"code-server: sidebar tab body"),E.openTab=function(s){try{return n.openTab(U,s!=null?{params:s}:void 0),!0}catch(i){return console.warn("[code-server] sidebar openTab failed:",i!=null&&i.message!=null?i.message:String(i)),!1}},e.effect(function(){return function(){E.openTab=null,m({sidebarActive:!1,sidebarUi:"unknown"})}},"code-server: sidebar mode reset"),m({sidebarActive:!0}),console.log("[code-server] right-sidebar tab registered (kind="+U+")"))}var Pe=".dshcs-card{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-3);border-radius:12px;list-style:none;transition:border-color .16s,background .16s}.dshcs-card:hover{border-color:var(--dsw-alias-label-dimmed,var(--dsw-alias-border-l2))}.dshcs-cardOpen{background:var(--dsw-alias-bg-layer-2);border-color:var(--dsw-alias-label-dimmed,var(--dsw-alias-border-l2))}.dshcs-cardHeader{appearance:none;width:100%;font:inherit;color:inherit;text-align:left;cursor:pointer;background:0 0;border:0;border-radius:12px;align-items:center;gap:12px;padding:14px 16px;display:flex}.dshcs-cardHeader:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:-2px}.dshcs-cardHeadText{flex-direction:column;flex:1;gap:4px;min-width:0;display:flex}.dshcs-cardName{color:var(--dsw-alias-label-primary);font-size:15px;font-weight:600;line-height:1.4}.dshcs-cardDescription{color:var(--dsw-alias-label-tertiary,var(--dsw-alias-label-secondary));font-size:13px;line-height:1.5}.dshcs-cardChevron{color:var(--dsw-alias-label-tertiary,var(--dsw-alias-label-secondary));flex:none;transition:transform .16s;display:inline-flex}.dshcs-cardChevronOpen{transform:rotate(180deg)}.dshcs-cardBody{border-top:1px solid var(--dsw-alias-border-l2);margin:0 16px;padding-bottom:8px}.dshcs-cardReadOnly{color:var(--dsw-alias-label-tertiary,var(--dsw-alias-label-secondary));margin:12px 0 0;font-size:12px;line-height:1.5}.dshcs-pending{white-space:nowrap;background:var(--dsw-alias-bg-module-platform,var(--dsw-alias-bg-layer-2));color:var(--dsw-alias-label-secondary);border-radius:999px;flex:none;padding:1px 8px;font-size:11px;font-weight:500;line-height:17px}.dshcs-cardFooter{border-top:1px solid var(--dsw-alias-border-l2);justify-content:flex-end;align-items:center;gap:8px;padding:12px 0 4px;display:flex}.dshcs-cardFailed{min-width:0;color:var(--dsw-alias-label-error,var(--dsw-alias-state-error-primary));flex:1;margin:0;font-size:12px;line-height:1.5}.dshcs-cbtn{appearance:none;font:inherit;cursor:pointer;border-radius:8px;padding:5px 14px;font-size:13px;line-height:1.5;border:1px solid transparent;transition:color .12s ease,background .12s ease}.dshcs-cbtn:disabled{opacity:.4;cursor:default}.dshcs-cbtn:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:1px}.dshcs-cbtnOutline{border-color:var(--dsw-alias-border-l2);color:var(--dsw-alias-label-secondary);background:0 0}.dshcs-cbtnOutline:hover:not(:disabled){color:var(--dsw-alias-label-primary);background:var(--dsw-alias-interactive-bg-hover,transparent)}.dshcs-cbtnPrimary{background:var(--dsw-alias-label-primary);color:var(--dsw-alias-bg-layer-3);border-color:var(--dsw-alias-label-primary);font-weight:600}.dshcs-cbtnPrimary:hover:not(:disabled){filter:brightness(.95)}.dshcs-cbtnPrimary:active:not(:disabled){filter:brightness(.9)}.dshcs-field{flex-direction:column;gap:6px;padding:12px 0;display:flex}.dshcs-field+.dshcs-field{border-top:1px solid var(--dsw-alias-border-l2)}.dshcs-fieldHead{align-items:center;gap:8px;display:flex}.dshcs-fieldLabel{min-width:0;color:var(--dsw-alias-label-primary);flex:1;font-size:13px;font-weight:500;line-height:1.5}.dshcs-hint{color:var(--dsw-alias-label-tertiary,var(--dsw-alias-label-secondary));margin:0;font-size:12px;line-height:1.5}.dshcs-check{display:flex;align-items:center;gap:8px;cursor:pointer}.dshcs-check input{accent-color:var(--dsw-alias-brand-primary);width:15px;height:15px;margin:0;flex:none}.dshcs-check input:disabled{cursor:default}.dshcs-badges{align-items:center;gap:8px;display:inline-flex}.dshcs-badge{white-space:nowrap;background:var(--dsw-alias-bg-module-platform,var(--dsw-alias-bg-layer-2));color:var(--dsw-alias-label-secondary);border-radius:999px;padding:1px 8px;font-size:11px;font-weight:500;line-height:17px}.dshcs-reset{font:inherit;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;padding:0;font-size:12px;line-height:1.5}.dshcs-reset:hover:not(:disabled){color:var(--dsw-alias-label-primary)}.dshcs-reset:disabled{cursor:default}",He="dsh-code-server/Card.module.css";function Ue(e,r){if(typeof document!="undefined"&&document.querySelector("style[data-plugin-css="+JSON.stringify(e)+"]")===null){var n=document.createElement("style");n.dataset.plugin="dsh-code-server",n.dataset.pluginCss=e,n.textContent=r,document.head.appendChild(n)}}Ue(He,Pe);function Be(e){return a.createElement("svg",{width:14,height:14,viewBox:"0 0 14 14",fill:"none","aria-hidden":!0,className:e.className},a.createElement("path",{d:"M3.5 5.25L7 8.75L10.5 5.25",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}))}function M(e){return a.createElement("button",{type:"button",className:"dshcs-cbtn "+(e.variant==="primary"?"dshcs-cbtnPrimary":"dshcs-cbtnOutline"),disabled:e.disabled===!0,onClick:e.onClick},e.children)}function re(e){return a.createElement("label",{className:"dshcs-check"},a.createElement("input",{type:"checkbox",checked:e.checked===!0,disabled:e.disabled===!0,onChange:function(r){e.onChange(r.target.checked)}}),a.createElement("span",{className:"dshcs-hint"},e.children))}function ae(e){var r=[];return e.overridden===!0&&(r.push(a.createElement("span",{className:"dshcs-badge"},e.overriddenLabel)),r.push(a.createElement("button",{type:"button",className:"dshcs-reset",disabled:e.disabled===!0,onClick:e.onReset},e.resetLabel))),r.length===0?null:a.createElement("span",{className:"dshcs-badges"},...r)}function te(e){var[r,n]=a.useState(e.defaultOpen===!0),s=e.state;if(s==null||s.available!==!0)return null;var i=e.title,l=e.noticeOnly===!0,d=s.dirty!==!0||s.invalid===!0||s.saving===!0;return a.createElement("li",{className:"dshcs-card"+(r?" dshcs-cardOpen":"")},a.createElement("button",{type:"button",className:"dshcs-cardHeader","aria-expanded":r,onClick:function(){n(!r)}},a.createElement("span",{className:"dshcs-cardHeadText"},a.createElement("span",{className:"dshcs-cardName"},i),a.createElement("span",{className:"dshcs-cardDescription"},e.description)),s.dirty===!0?a.createElement("span",{className:"dshcs-pending"},e.unsavedLabel):null,a.createElement(Be,{className:"dshcs-cardChevron"+(r?" dshcs-cardChevronOpen":"")})),r===!0?a.createElement("div",{className:"dshcs-cardBody"},l===!0?null:s.writable!==!0?a.createElement("p",{className:"dshcs-cardReadOnly",role:"status"},e.readOnlyLabel):null,e.children,l===!0?null:a.createElement("div",{className:"dshcs-cardFooter"},s.failed===!0?a.createElement("p",{className:"dshcs-cardFailed",role:"status"},e.saveFailedLabel):null,a.createElement(M,{disabled:s.dirty!==!0||s.saving===!0,onClick:e.onDiscard},e.discardLabel),a.createElement(M,{variant:"primary",disabled:d,onClick:e.onSave},s.saving===!0?e.savingLabel:e.saveLabel))):null)}function Ge(e){try{let k=function(){y("/code-server/status").then(function(p){p!=null&&typeof p=="object"&&m({status:p})}).catch(function(){})};var r=e.scope,[n,s]=a.useState(function(){return r!==void 0?r.getSnapshot():null}),[i,l]=a.useState(null),[d,o]=a.useState(!1),[b,c]=a.useState(!1),u=R(),[h,v]=a.useState(F());if(a.useEffect(function(){return Z(function(p){v(p)})},[]),a.useEffect(function(){if(r===void 0||typeof r.subscribe!="function")return;function p(){try{s(r.getSnapshot())}catch(Ke){}}var w=r.subscribe(p);return function(){typeof w=="function"&&w()}},[r]),r===void 0)return console.error("[code-server] card scope missing"),null;if(n==null||n.status!=="ready")return n!=null&&n.status==="unavailable"&&console.warn("[code-server] settings scope unavailable:",n.status),null;var g=n.value!==void 0&&n.value!==null?n.value:{},x=n.user,S={windowedOpen:g.windowedOpen===!0,keepResident:g.keepResident!==!1};if(u!=null&&u.sidebarUi==="legacy")return a.createElement(te,{title:"Code Server",description:"\u5F53\u524D DSH \u7248\u672C\u4E0D\u53D7\u652F\u6301(\u7F3A\u5C11\u53F3\u4FA7\u680F\u670D\u52A1)",defaultOpen:!0,noticeOnly:!0,state:{available:!0,writable:!1,dirty:!1,invalid:!1,saving:!1,failed:!1}},a.createElement("div",{className:"dshcs-field"},a.createElement("div",{className:"dshcs-legacy"},"\u672C\u63D2\u4EF6\u81EA 0.2.3 \u8D77\u4E0D\u518D\u517C\u5BB9\u65E7\u7248 DSH\u3002"),a.createElement("div",{className:"dshcs-hint",style:{marginTop:0}},`\u672A\u68C0\u6D4B\u5230\u53F3\u4FA7\u680F\u63D2\u4EF6\u670D\u52A1 sidebarRightTabs / sidebarRight,\u56E0\u6B64\u63D2\u4EF6\u4E0D\u63D0\u4F9B\u4EFB\u4F55\u5165\u53E3(\u65E7\u7248\u7684\u60AC\u6D6E\u7403\u4E0E\u6D6E\u52A8\u7A97\u53E3\u5DF2\u79FB\u9664),\u4E5F\u4E0D\u4F1A\u540E\u53F0\u542F\u52A8 IDE\u3002
|
|
3
|
+
\u5347\u7EA7 DSH \u5230\u5E26\u53F3\u4FA7\u680F\u7684\u7248\u672C(\u2265 0.1.5-alpha.1)\u540E,Code Server \u4F1A\u51FA\u73B0\u5728\u53F3\u4FA7\u680F\u6807\u7B7E\u91CC,\u672C\u9875\u540C\u65F6\u663E\u793A\u5B8C\u6574\u8BBE\u7F6E\u9879;\u5347\u7EA7\u540E\u65E0\u9700\u91CD\u88C5\u672C\u63D2\u4EF6,\u5237\u65B0\u9875\u9762\u5373\u53EF\u3002`)));var se=x!=null&&Object.prototype.hasOwnProperty.call(x,"windowedOpen"),ie=x!=null&&Object.prototype.hasOwnProperty.call(x,"keepResident"),le=u!=null&&u.sidebarActive===!0,A=i!==null&&(i.windowedOpen!==S.windowedOpen||i.keepResident!==S.keepResident),Xe=!A||d,de={available:!0,writable:n.writable,dirty:A,invalid:!1,saving:d,failed:b};async function ue(){if(A&&!d){o(!0),c(!1);try{var p=i!==null?i:S;await e.scope.set("windowedOpen",p.windowedOpen===!0),await e.scope.set("keepResident",p.keepResident===!0),l(null),k()}catch(w){c(!0)}o(!1)}}async function Y(){if(!(d||n.writable!==!0)){o(!0),c(!1);try{typeof e.scope.unset=="function"?(await e.scope.unset("windowedOpen"),await e.scope.unset("keepResident")):(await e.scope.set("windowedOpen",g.windowedOpen===!0),await e.scope.set("keepResident",g.keepResident===void 0||g.keepResident===null?!0:g.keepResident)),l(null),k()}catch(p){c(!0)}o(!1)}}var[f,ce]=a.useState(null),[W,Q]=a.useState(!1),oe=a.createElement("div",{className:"dshcs-field"},a.createElement("div",{className:"dshcs-fieldHead"},a.createElement("span",{className:"dshcs-fieldLabel"},"\u73AF\u5883\u68C0\u6D4B"),a.createElement("span",{className:"dshcs-badges"},a.createElement(M,{variant:"primary",disabled:W,onClick:async function(){Q(!0);var p=await y("/code-server/status");ce(p!=null&&p.env!=null?p.env:{error:"status \u672A\u8FD4\u56DE env"}),Q(!1)}},W?"\u68C0\u6D4B\u4E2D\u2026":"\u68C0\u6D4B\u73AF\u5883"))),f!=null?a.createElement("div",{className:"dshcs-hint",style:{marginTop:6}},f.error!=null?a.createElement("span",null,"\u68C0\u6D4B\u5931\u8D25: "+f.error):a.createElement("span",null,"\u72B6\u6001: "+(f.ok===!0?"\u2705 \u5C31\u7EEA":"\u274C \u4E0D\u901A\u8FC7")+(f.treeVersion!=null?" \xB7 VS Code \u6811: "+f.treeVersion:"")+(f.upToDate===!1&&f.vendored!=null?"(\u5185\u7F6E "+f.vendored+") ":"")+(f.productPath!=null?" \xB7 \u5BA2\u6237\u7AEF\u8DEF\u5F84: "+f.productPath:"")+(f.entry!=null?" \xB7 \u5165\u53E3: "+f.entry:" \xB7 \u5165\u53E3\u7F3A\u5931")+" \xB7 VS Code \u5185\u90E8\u4F9D\u8D56: "+(f.vscodeInner===!0?"\u2705":"\u274C")+" \xB7 \u9884\u7F16\u8BD1\u539F\u751F\u5305: "+(f.nativeRuntime!=null&&f.nativeRuntime.packages>0?"\u2705 "+f.nativeRuntime.name+"@"+(f.nativeRuntime.version!=null?f.nativeRuntime.version:"?")+"("+f.nativeRuntime.packages+" \u5305)":"\u274C \u672A\u5B89\u88C5("+(f.nativeRuntime!=null&&f.nativeRuntime.name!=null?f.nativeRuntime.name:"\u5E73\u53F0\u805A\u5408\u5305")+")"))):a.createElement("div",{className:"dshcs-hint",style:{marginTop:6}},'\u70B9\u51FB"\u68C0\u6D4B\u73AF\u5883"\u67E5\u770B VS Code \u6811\u72B6\u6001(\u4F9D\u8D56\u7531\u5305\u7BA1\u7406\u5668\u5B89\u88C5,\u65E0\u9700\u5B89\u88C5\u6B65\u9AA4)'),a.createElement("div",{className:"dshcs-hint",style:{marginTop:10,color:"var(--dsw-alias-label-tertiary,var(--dsw-alias-label-secondary))"}},"\u8FD0\u884C\u4F4D\u7F6E: "+(f!=null&&f.tree!=null?f.tree:"<\u63D2\u4EF6\u76EE\u5F55>\\vendor\\vscode")+`
|
|
4
|
+
\u5378\u8F7D: dsh plugin --profile web remove dsh-code-server-app`));return a.createElement(te,{title:"Code Server",description:"\u5165\u53E3:\u53F3\u4FA7\u680F\u6807\u7B7E(DSH \u2265 0.1.5-alpha.1);\u7A97\u53E3\u5316\u8BBE\u7F6E\u63A7\u5236\u65B0\u6807\u7B7E\u9875\u6253\u5F00",state:de,unsavedLabel:"\u672A\u4FDD\u5B58",readOnlyLabel:"\u672C\u90E8\u7F72\u7684\u8BBE\u7F6E\u4E3A\u53EA\u8BFB\u3002",saveFailedLabel:"\u672C\u90E8\u7F72\u6CA1\u6709\u63A5\u53D7\u8FD9\u4E9B\u503C\uFF0C\u5DF2\u4FDD\u7559\u4F9B\u4F60\u4FEE\u6539\u3002",discardLabel:"\u653E\u5F03\u4FEE\u6539",saveLabel:"\u4FDD\u5B58",savingLabel:"\u4FDD\u5B58\u4E2D\u2026",onSave:ue,onDiscard:function(){l(null),c(!1)}},a.createElement("div",{className:"dshcs-field"},a.createElement("div",{className:"dshcs-fieldHead"},a.createElement("span",{className:"dshcs-fieldLabel"},"\u5165\u53E3"),a.createElement("span",{className:"dshcs-badges"},a.createElement(M,{disabled:le!==!0,onClick:function(){E.openTab!==null&&E.openTab(null)}},"\u5728\u53F3\u4FA7\u680F\u6253\u5F00"))),a.createElement("div",{className:"dshcs-hint",style:{marginTop:6}},"\u5F53\u524D:\u53F3\u4FA7\u680F\u6807\u7B7E\u3002\u4ECE\u53F3\u4FA7\u680F\u300C\u5F00\u59CB\u300D\u9875\u7684 Code Server \u5165\u53E3\u6846\u3001\u4EA7\u7269\u65C1\u6309\u94AE\u6216\u4E0A\u9762\u7684\u6309\u94AE\u6253\u5F00\u3002")),a.createElement("div",{className:"dshcs-field"},a.createElement("div",{className:"dshcs-fieldHead"},a.createElement("span",{className:"dshcs-fieldLabel"},"\u7A97\u53E3\u5316\u6253\u5F00(\u65B0\u6807\u7B7E\u9875)"),se===!0?a.createElement(ae,{overridden:!0,disabled:n.writable!==!0,overriddenLabel:"\u5DF2\u8986\u76D6",resetLabel:"\u6062\u590D\u9ED8\u8BA4",onReset:function(){Y()}}):null),a.createElement(re,{checked:i!==null?i.windowedOpen:S.windowedOpen,disabled:n.writable!==!0,onChange:function(p){l(function(w){return Object.assign({},w!==null?w:S,{windowedOpen:p===!0})}),c(!1)}},"\u5F00\u542F\u540E\u5165\u53E3(\u4EA7\u7269\u6309\u94AE/\u8BBE\u7F6E\u5361)\u5728\u6D4F\u89C8\u5668\u65B0\u6807\u7B7E\u9875\u6253\u5F00 code-server(\u81EA\u52A8\u542F\u52A8\u5E76\u8DDF\u968F\u5F53\u524D\u5DE5\u4F5C\u533A);\u5173\u95ED\u5219\u4F7F\u7528\u53F3\u4FA7\u680F\u6807\u7B7E")),a.createElement("div",{className:"dshcs-field"},a.createElement("div",{className:"dshcs-fieldHead"},a.createElement("span",{className:"dshcs-fieldLabel"},"\u540E\u53F0\u5E38\u9A7B(\u5207\u6807\u7B7E\u4E0D\u91CD\u8F7D)"),ie===!0?a.createElement(ae,{overridden:!0,disabled:n.writable!==!0,overriddenLabel:"\u5DF2\u8986\u76D6",resetLabel:"\u6062\u590D\u9ED8\u8BA4",onReset:function(){Y()}}):null),a.createElement(re,{checked:i!==null?i.keepResident:S.keepResident,disabled:n.writable!==!0,onChange:function(p){l(function(w){return Object.assign({},w!==null?w:S,{keepResident:p===!0})}),c(!1)}},'\u5F00\u542F\u540E\u5BBF\u4E3B\u542F\u52A8\u5373\u628A IDE \u52A0\u8F7D\u5230\u540E\u53F0"\u505C\u653E\u533A":\u5207\u6362\u53F3\u4FA7\u680F\u6807\u7B7E\u3001\u6536\u8D77/\u5C55\u5F00\u4FA7\u680F\u3001\u62D6\u6210\u6D6E\u52A8\u7A97\u53E3\u90FD\u4E0D\u518D\u91CD\u8F7D,\u9996\u6B21\u6253\u5F00\u514D\u7B49\u5F85;\u5173\u95ED\u5219\u53EA\u5728\u6253\u5F00\u9762\u677F\u65F6\u52A0\u8F7D(\u7701\u5185\u5B58)'),a.createElement("div",{className:"dshcs-hint",style:{marginTop:4}},N?"\u5E38\u9A7B\u9762:"+(h.docked?"\u5DF2\u505C\u9760":h.ready?"\u5DF2\u505C\u653E(\u540E\u53F0\u8FD0\u884C\u4E2D)":"\u672A\u542F\u52A8")+(h.degraded?" \xB7 \u672C\u6B21\u53D1\u751F\u8FC7\u964D\u7EA7\u91CD\u8F7D":""):"\u5F53\u524D\u6D4F\u89C8\u5668\u4E0D\u652F\u6301 Element.moveBefore(Chromium <133)\u2192 \u5E38\u9A7B\u4E0D\u53EF\u7528,\u5207\u6807\u7B7E\u4ECD\u4F1A\u6574\u9875\u91CD\u8F7D(\u5347\u7EA7\u6D4F\u89C8\u5668\u540E\u81EA\u52A8\u751F\u6548)")),a.createElement("div",{className:"dshcs-field"},a.createElement("div",{className:"dshcs-fieldHead"},a.createElement("span",{className:"dshcs-fieldLabel"},"\u4F9D\u8D56\u5B89\u88C5"),null),a.createElement("div",{className:"dshcs-hint",style:{marginTop:4}},"0.1.36 \u8D77 code-server \u672C\u4F53\u968F\u63D2\u4EF6\u5305\u53D1\u5E03,VS Code \u5185\u90E8\u4F9D\u8D56\u4E0E\u9884\u7F16\u8BD1\u539F\u751F\u6A21\u5757(\u5E73\u53F0\u805A\u5408\u5305)\u5168\u90E8\u7531\u5305\u7BA1\u7406\u5668\u5728 dsh plugin add \u65F6\u5B89\u88C5,\u4E0D\u518D\u9700\u8981\u300C\u5B89\u88C5\u73AF\u5883\u300D\u6B65\u9AA4\u3002")),oe)}catch(k){return console.error("[code-server] card render error:",k!=null&&k.message!==void 0?k.message:String(k)),null}}function _e(e){var r=[];try{var n=e.turn.data.get("deliverables"),s=e.seq!=null?e.seq:Number.POSITIVE_INFINITY;if(n!=null&&Array.isArray(n.produced))for(var i={},l=0;l<n.produced.length;l++){var d=n.produced[l];d==null||typeof d.path!="string"||d.path===""||d.seq!=null&&d.seq>s||i[d.path]!==!0&&(i[d.path]=!0,r.push(d.path))}}catch(o){}return r}function Ve(e){var r=_e(e);return r.length===0?null:r}function We(e){return a.createElement("img",{src:ne,alt:"","aria-hidden":!0,draggable:!1,style:{width:15,height:15,display:"block",objectFit:"contain",WebkitUserDrag:"none",userSelect:"none"}})}function Qe(e){var r=R();if(e==null||!Array.isArray(e.matched)||e.matched.length===0)return null;var n=e.matched;function s(l){var d=String(l).replace(/\\/g,"/"),o=d.lastIndexOf("/");return o>=0?d.slice(o+1):d}function i(l){var d=r.status;if(d!=null&&d.windowedOpen===!0){K(L(e.useSessions,e.useWorkspaces));return}r.sidebarActive===!0&&E.openTab!==null&&E.openTab({path:l})===!0||(K(L(e.useSessions,e.useWorkspaces)),y("/code-server/open-file",{file:l}).then(function(o){(o==null||o.ok!==!0)&&window.alert(o!=null&&o.error?o.error:"\u6253\u5F00\u5931\u8D25")}).catch(function(o){window.alert("\u6253\u5F00\u5931\u8D25: "+String(o))}))}return a.createElement("div",{className:"dshcs-artifacts"},a.createElement("span",{className:"dshcs-artlabel"},"\u4EA7\u7269"),a.createElement("div",{className:"dshcs-artrow"},n.slice(0,6).map(function(l){return a.createElement("span",{key:l,className:"dshcs-artitem"},a.createElement("button",{type:"button",className:"dshcs-artfile",title:l,"aria-label":"\u6253\u5F00: "+l,onClick:function(){i(l)}},s(l)),a.createElement("button",{type:"button",className:"dshcs-artbtn",title:"\u5728 Code Server \u6253\u5F00: "+l,"aria-label":"\u5728 Code Server \u6253\u5F00: "+l,onClick:function(){i(l)}},a.createElement(We,null)))}),n.length>6?a.createElement("span",{className:"dshcs-artmore"},"\u2026"):null))}function Ye(e){try{Ze(e)}catch(r){console.error("[code-server] apply failed:",r&&r.stack?r.stack:String(r));try{document.title="CS-ERR "+(r&&r.message||String(r))}catch(n){}}}function Ze(e){var r=e.get("slots");if(r===void 0){console.error("[code-server] slots service unavailable");return}var n=e.settingsScope,s=null;if(n!==void 0&&typeof n.bind=="function")s=n.bind({namespace:"code-server"});else{console.error("[code-server] settingsScope unavailable (inject missing?); settings card disabled");return}y("/code-server/status").then(function(c){m({status:c})}).catch(function(){}),r.inject("settings.plugin.item",()=>r.register({name:"settings.plugin.item",key:"code-server",label:"Code Server",inject:function(){return{scope:s}}},Ge));function i(c){Ie(c),m({sidebarActive:!0,sidebarUi:"modern"}),r.inject("shell.overlay",()=>r.register({name:"shell.overlay",id:"code-server",order:70,label:"Code Server"},u=>a.createElement(Re,u)));try{r.inject("conversation.chat.turnTail",function(){return r.register({name:"conversation.chat.turnTail",priority:-9,id:"dshcs-open-file",select:Ve},Qe)})}catch(u){console.warn("[code-server] turnTail register failed:",u!=null&&u.message!=null?u.message:String(u))}console.log("[code-server] client registered: right-sidebar tab + turnTail artifacts + resident preload + settings card")}function l(){m({sidebarActive:!1,sidebarUi:"legacy"}),console.warn("[code-server] \u672A\u63A2\u6D4B\u5230\u53F3\u4FA7\u680F\u670D\u52A1(sidebarRightTabs/sidebarRight): \u672C\u63D2\u4EF6\u81EA 0.2.3 \u8D77\u4E0D\u518D\u517C\u5BB9\u65E7\u7248 DSH \u2014\u2014 \u9664\u300C\u8BBE\u7F6E \u2192 \u63D2\u4EF6 \u2192 Code Server\u300D\u7684\u63D0\u793A\u5916\u4E0D\u63D0\u4F9B\u4EFB\u4F55\u5165\u53E3,\u4E5F\u4E0D\u9884\u70ED IDE\u3002\u8BF7\u5347\u7EA7 DSH\u3002"),y("/code-server/ui-mode",{sidebar:!1}).catch(function(){})}var d=typeof e.get=="function"?e.get("sidebarRightTabs")!==void 0&&e.get("sidebarRight")!==void 0:!1;if(d){try{i(e)}catch(c){console.error("[code-server] sidebar tab registration failed:",c!=null&&c.message!=null?c.message:String(c))}return}var o=!1,b=setTimeout(function(){o||(o=!0,l())},ze);try{typeof e.inject=="function"?e.inject(["sidebarRightTabs","sidebarRight"],function(c){if(!o){o=!0,clearTimeout(b);try{i(c)}catch(u){console.error("[code-server] sidebar tab registration failed:",u!=null&&u.message!=null?u.message:String(u))}}}):(clearTimeout(b),o=!0,l())}catch(c){clearTimeout(b),o=!0,console.warn("[code-server] sidebar inject failed:",c!=null&&c.message!=null?c.message:String(c)),l()}}var Fe=["slots","settingsScope"],Je="code-server";
|
|
4
5
|
return module.exports;}});
|
package/lib/index.js
CHANGED
|
@@ -10,8 +10,11 @@
|
|
|
10
10
|
* 静态 profile 插件,与 dsh-webproxy-router-plugin 同形态:
|
|
11
11
|
* - exports.name = 插件名(与 cordis.patch.yml 行 id 一致)
|
|
12
12
|
* - exports.inject = ['connection', 'settings'](connection 承载 client↔host 通道)
|
|
13
|
-
* - apply(ctx, config) 在共享 /api 通道注册
|
|
14
|
-
* status / start / stop / setup(兼容空操作) / open-file
|
|
13
|
+
* - apply(ctx, config) 在共享 /api 通道注册 6 条 exact Fetch 路由:
|
|
14
|
+
* status / start / stop / setup(兼容空操作) / open-file / ui-mode
|
|
15
|
+
*
|
|
16
|
+
* 0.2.3 起客户端不再兼容旧版 DSH(没有右侧栏服务的版本):客户端上报 { sidebar:false } 时,
|
|
17
|
+
* 本插件回收「自动预启动」的实例并停止预启动(/ui-mode);用户手动启动的实例不受影响。
|
|
15
18
|
*
|
|
16
19
|
* 通道选择(重要):**不依赖 webServer**。路由经 ctx.connection.fetch.register
|
|
17
20
|
* 挂在 Connection 服务的共享 /api 通道上:
|
|
@@ -34,6 +37,7 @@
|
|
|
34
37
|
* version, error, logTail[, adopted] }
|
|
35
38
|
* POST /api/code-server/start { cwd? } → 幂等启动(换 cwd 则先停后启) → status
|
|
36
39
|
* POST /api/code-server/stop → 停止 → status
|
|
40
|
+
* POST /api/code-server/ui-mode { sidebar } → 客户端上报 UI 载体能力(旧版 DSH 上报 false)
|
|
37
41
|
*/
|
|
38
42
|
|
|
39
43
|
import { spawn, execFile, execFileSync } from 'node:child_process';
|
|
@@ -89,16 +93,18 @@ export const SETTINGS_NS = 'code-server';
|
|
|
89
93
|
|
|
90
94
|
/** 设置卡片 schema(参照 auto-open-web 的 Config 形态)。 */
|
|
91
95
|
export const Config = z.object({
|
|
92
|
-
/**
|
|
93
|
-
* false 时允许盖住输入框(最大化到视口底)。 */
|
|
96
|
+
/** 【0.2.3 起废弃】只对已删除的内部浮动窗口有意义;保留该键仅为兼容旧设置文件(读写均被忽略)。 */
|
|
94
97
|
reserveComposer: z.boolean().default(true),
|
|
95
|
-
/** windowedOpen=false(默认)
|
|
98
|
+
/** windowedOpen=false(默认)在右侧栏标签里打开;
|
|
96
99
|
* true 时改为在浏览器新标签页打开 code-server(自动启动并跟随工作区)。 */
|
|
97
100
|
windowedOpen: z.boolean().default(false),
|
|
98
101
|
/** 服务方式:loopback(默认)独立回环端口;dsh 挂到 DSH webServer 的 /code-server
|
|
99
102
|
* (同源、无额外端口、复用 DSH 的 Host/Origin + cookie 防护;需要 DSH 提供 webServer 服务,
|
|
100
103
|
* 缺失或注册失败时自动回退 loopback)。 */
|
|
101
104
|
serve: z.union([z.const('loopback'), z.const('dsh')]).default('loopback'),
|
|
105
|
+
/** keepResident=true(默认)客户端在宿主 running 后把 IDE 预先加载到"停放区",
|
|
106
|
+
* 切标签/收起侧栏不再重载;false 则只在打开面板时才加载(省内存)。 */
|
|
107
|
+
keepResident: z.boolean().default(true),
|
|
102
108
|
});
|
|
103
109
|
|
|
104
110
|
const DEFAULT_CONFIG = {
|
|
@@ -384,6 +390,7 @@ export async function apply(ctx, config) {
|
|
|
384
390
|
let reserveComposer = true;
|
|
385
391
|
let windowedOpen = false;
|
|
386
392
|
let serveSetting = 'loopback';
|
|
393
|
+
let keepResident = true; // 客户端常驻预热(0.2.2)
|
|
387
394
|
if (settingsSvc !== undefined && typeof settingsSvc.register === 'function') {
|
|
388
395
|
try {
|
|
389
396
|
const scope = settingsSvc.register(SETTINGS_NS, Config);
|
|
@@ -393,6 +400,7 @@ export async function apply(ctx, config) {
|
|
|
393
400
|
reserveComposer = resolved && typeof resolved.reserveComposer === 'boolean' ? resolved.reserveComposer : true;
|
|
394
401
|
windowedOpen = resolved && typeof resolved.windowedOpen === 'boolean' ? resolved.windowedOpen : false;
|
|
395
402
|
serveSetting = resolved && resolved.serve === 'dsh' ? 'dsh' : 'loopback';
|
|
403
|
+
keepResident = resolved && typeof resolved.keepResident === 'boolean' ? resolved.keepResident : true;
|
|
396
404
|
}
|
|
397
405
|
scope.watch((next) => {
|
|
398
406
|
if (next != null && typeof next.reserveComposer === 'boolean') {
|
|
@@ -409,9 +417,13 @@ export async function apply(ctx, config) {
|
|
|
409
417
|
console.log(`[code-server] serve updated: ${serveSetting}(下次启动生效)`);
|
|
410
418
|
}
|
|
411
419
|
}
|
|
420
|
+
if (next != null && typeof next.keepResident === 'boolean') {
|
|
421
|
+
keepResident = next.keepResident;
|
|
422
|
+
console.log(`[code-server] keepResident updated: ${keepResident}`);
|
|
423
|
+
}
|
|
412
424
|
});
|
|
413
425
|
} catch (error) {
|
|
414
|
-
console.error(`[code-server] settings unavailable; using defaults (
|
|
426
|
+
console.error(`[code-server] settings unavailable; using defaults (keepResident=true, windowedOpen=false): ${error.message}`);
|
|
415
427
|
}
|
|
416
428
|
}
|
|
417
429
|
|
|
@@ -446,6 +458,10 @@ export async function apply(ctx, config) {
|
|
|
446
458
|
adopted: false,
|
|
447
459
|
serve: 'loopback', // 实际生效的服务方式(loopback | dsh)
|
|
448
460
|
pipe: null, // dsh 模式下的命名管道
|
|
461
|
+
/** 客户端上报的 UI 载体能力:null=未上报 | true=带右侧栏(受支持) | false=旧版 DSH(只提示,不预启动) */
|
|
462
|
+
sidebarUi: null,
|
|
463
|
+
/** 本实例是否由插件的自动预启动拉起(旧版 DSH 上报后据此回收,不动用户/被 adopt 的实例) */
|
|
464
|
+
prestarted: false,
|
|
449
465
|
env: envCheck(), // 环境检测(VS Code 树 / server 入口 / 内部依赖 / 预编译原生包)
|
|
450
466
|
setup: { running: false, done: true, ok: true, logTail: '0.1.36 起由包管理器安装依赖,无需「安装环境」步骤', startedAt: null, finishedAt: null }, // 兼容旧客户端
|
|
451
467
|
};
|
|
@@ -500,8 +516,10 @@ export async function apply(ctx, config) {
|
|
|
500
516
|
error: state.error,
|
|
501
517
|
logTail: state.logTail.slice(-LOG_TAIL_MAX),
|
|
502
518
|
adopted: state.adopted,
|
|
503
|
-
reserveComposer,
|
|
519
|
+
reserveComposer, // 0.2.3 起废弃(仅旧版浮窗用过);保留字段以免旧客户端读取时报错
|
|
504
520
|
windowedOpen,
|
|
521
|
+
keepResident,
|
|
522
|
+
sidebarUi: state.sidebarUi,
|
|
505
523
|
env: state.env,
|
|
506
524
|
setup: {
|
|
507
525
|
running: state.setup.running,
|
|
@@ -933,6 +951,36 @@ export async function apply(ctx, config) {
|
|
|
933
951
|
}
|
|
934
952
|
}
|
|
935
953
|
|
|
954
|
+
/**
|
|
955
|
+
* 客户端上报 UI 载体能力(0.2.3):{ sidebar: false } = 旧版 DSH(没有右侧栏服务)。
|
|
956
|
+
* 旧版 DSH 上本插件不提供任何入口 → 这里回收「由本插件自动预启动」的实例,避免留下用不上的 IDE 进程;
|
|
957
|
+
* 用户手动启动的实例(adopted)不动,后续也不再有 UI 触发启动。
|
|
958
|
+
*/
|
|
959
|
+
async function handleUiMode(request) {
|
|
960
|
+
try {
|
|
961
|
+
const body = await readJsonBody(request);
|
|
962
|
+
if (body !== null && typeof body.sidebar === 'boolean') {
|
|
963
|
+
const next = body.sidebar;
|
|
964
|
+
if (state.sidebarUi !== next) {
|
|
965
|
+
state.sidebarUi = next;
|
|
966
|
+
console.log(`[code-server] 客户端 UI 载体:${next ? '右侧栏(受支持)' : '无右侧栏(旧版 DSH,只给设置页提示)'}`);
|
|
967
|
+
}
|
|
968
|
+
if (next === false && state.prestarted === true && state.adopted !== true) {
|
|
969
|
+
state.prestarted = false;
|
|
970
|
+
if (state.status === 'running' || state.status === 'starting') {
|
|
971
|
+
console.warn('[code-server] 旧版 DSH:回收自动预启动的实例(旧版已不受支持)');
|
|
972
|
+
await stop('legacy-ui').catch(err => {
|
|
973
|
+
console.error(`[code-server] 回收失败:${err && err.message ? err.message : err}`);
|
|
974
|
+
});
|
|
975
|
+
}
|
|
976
|
+
}
|
|
977
|
+
}
|
|
978
|
+
return jsonResponse({ ok: true, sidebarUi: state.sidebarUi });
|
|
979
|
+
} catch (err) {
|
|
980
|
+
return failureResponse(err);
|
|
981
|
+
}
|
|
982
|
+
}
|
|
983
|
+
|
|
936
984
|
// 每条操作一条 exact Fetch 路由。desktop 的 assetHandler 只把 /api/* 交给
|
|
937
985
|
// createSharedFetchHandler('/api'),所以路径必须落在 /api 下。
|
|
938
986
|
const disposers = [ { path: `${API_BASE}/status`, methods: ['GET'], fetch: handleStatus },
|
|
@@ -940,6 +988,7 @@ export async function apply(ctx, config) {
|
|
|
940
988
|
{ path: `${API_BASE}/stop`, methods: ['POST'], fetch: handleStop },
|
|
941
989
|
{ path: `${API_BASE}/setup`, methods: ['POST'], fetch: handleSetup },
|
|
942
990
|
{ path: `${API_BASE}/open-file`, methods: ['POST'], fetch: handleOpenFile },
|
|
991
|
+
{ path: `${API_BASE}/ui-mode`, methods: ['POST'], fetch: handleUiMode },
|
|
943
992
|
].map(route => connection.fetch.register({
|
|
944
993
|
path: route.path,
|
|
945
994
|
methods: route.methods,
|
|
@@ -975,9 +1024,13 @@ export async function apply(ctx, config) {
|
|
|
975
1024
|
const liveInstance = record !== undefined && record !== null && isAlive(record.pid);
|
|
976
1025
|
|
|
977
1026
|
function maybePrestart() {
|
|
978
|
-
// 环境就绪且未运行 → 后台自动拉起(不等待)
|
|
1027
|
+
// 环境就绪且未运行 → 后台自动拉起(不等待),首次打开侧栏标签时 iframe 立即加载。
|
|
1028
|
+
// 旧版 DSH(客户端上报 sidebarUi=false)没有可用入口 → 不预启动,也不占端口。
|
|
1029
|
+
if (state.sidebarUi === false) return;
|
|
979
1030
|
if (state.env.ok && state.status !== 'running' && state.status !== 'starting') {
|
|
1031
|
+
state.prestarted = true;
|
|
980
1032
|
start().catch((err) => {
|
|
1033
|
+
state.prestarted = false;
|
|
981
1034
|
console.error('[code-server] prestart failed:', err && err.message ? err.message : String(err));
|
|
982
1035
|
});
|
|
983
1036
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-code-server-app",
|
|
3
|
-
"version": "0.2.
|
|
4
|
-
"description": "VS Code (from a code-server release) inside DSH
|
|
3
|
+
"version": "0.2.3",
|
|
4
|
+
"description": "VS Code (from a code-server release) inside DSH: a right-sidebar tab driven by the plugin's own launcher over the in-process VS Code server (lib/launcher.mjs). The IDE is a resident surface moved with Element.moveBefore instead of being remounted, so switching sidebar tabs no longer reloads the workbench. Requires a DSH with the right-sidebar services (sidebarRightTabs/sidebarRight, >= 0.1.5-alpha.1); older DSH versions get a single upgrade notice on the settings page and no other UI. Two serving modes: loopback port (default) or same-origin mount on DSH's own webServer (/code-server, protected by ctx.connection.requestRejection). No code-server Node layer, no argon2, no C++ toolchain.",
|
|
5
5
|
"homepage": "https://github.com/jinsiyu/dsh-code-server-app",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -57,8 +57,7 @@
|
|
|
57
57
|
"README.en.md"
|
|
58
58
|
],
|
|
59
59
|
"devDependencies": {
|
|
60
|
-
"esbuild": "^0.25.0"
|
|
61
|
-
"motion": "^12.0.0"
|
|
60
|
+
"esbuild": "^0.25.0"
|
|
62
61
|
},
|
|
63
62
|
"license": "MIT",
|
|
64
63
|
"dependencies": {
|
package/vendor/VENDOR.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"vscodeVersion": "1.136.1",
|
|
4
4
|
"productPath": "stable-8d5f383f301ca20681f5b6606b8207d9dc87bdd8",
|
|
5
5
|
"layout": "vscode-only",
|
|
6
|
-
"preparedAt": "2026-09-
|
|
6
|
+
"preparedAt": "2026-09-10T14:05:25.353Z",
|
|
7
7
|
"source": "registry",
|
|
8
8
|
"node": "v24.13.1",
|
|
9
9
|
"platform": "win32",
|