@hanzo/dev 4.2.0 → 4.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{BinaryViewer-CmFUK4zZ.js → BinaryViewer-BCDMNW2g.js} +19 -19
- package/dist/{ChatMarkdown-nvEI7iCv.js → ChatMarkdown-BUidXqSs.js} +2460 -2460
- package/dist/{DevicePanel-v5e3sEIf.js → DevicePanel-D-pksK3r.js} +532 -532
- package/dist/{DeviceStreamView-CCIfmbxH.js → DeviceStreamView-DsCoOzDV.js} +377 -377
- package/dist/{DiffCommentAnnotation-BPTN_2a6.js → DiffCommentAnnotation-2HD5qiyt.js} +227 -227
- package/dist/{DiffFileTree-B_br90vY.js → DiffFileTree-CuWvI5hS.js} +13 -13
- package/dist/{DiffPanel-V5R5TPuK.js → DiffPanel-Z2QVmBzu.js} +328 -328
- package/dist/{DiffWorkerPoolProvider-BwFR-Fc9.js → DiffWorkerPoolProvider-CEfiCIGR.js} +3 -3
- package/dist/{DocumentPages-VSn83vty.js → DocumentPages-glImt2JO.js} +3 -3
- package/dist/{ExpandedImageDialog-CAorLacL.js → ExpandedImageDialog-iqO3LiIj.js} +404 -404
- package/dist/{FileExplorerPane-CeHulcPz.js → FileExplorerPane-GwnRmXEh.js} +4 -4
- package/dist/{FilePreviewPanel-BVNLvWOc.js → FilePreviewPanel-CXWpTlfI.js} +1089 -1089
- package/dist/{FontFilePreview-Dj8Blcay.js → FontFilePreview-CDydHOXg.js} +2 -2
- package/dist/{FontViewer-CLDdwhSr.js → FontViewer-DDt9C5Cb.js} +5 -5
- package/dist/{HanzoConnectAccountPages-BEzYfu2l.js → HanzoConnectAccountPages-_sfrtw9j.js} +357 -357
- package/dist/{HanzoConnectSidebarSignIn-BhD6-Up5.js → HanzoConnectSidebarSignIn-coFQvyRw.js} +3 -3
- package/dist/{Icons-CvSmt8vD.js → Icons-CdegMw5l.js} +1 -1
- package/dist/{LargeTextViewer-DfFnYGCw.js → LargeTextViewer-D3RklYQB.js} +8 -8
- package/dist/{MermaidDiagram-CTolIzQD.js → MermaidDiagram-sVLnox7j.js} +8 -8
- package/dist/{MermaidFilePreview-CP2zP4FU.js → MermaidFilePreview-BmPdNxW5.js} +2 -2
- package/dist/{MermaidViewer-BDfYkS9E.js → MermaidViewer-BlKTevTF.js} +3 -3
- package/dist/{NotebookPreview-Cybs5uM0.js → NotebookPreview-C0gSEyeO.js} +10 -10
- package/dist/{OfficeFilePreview-7JsmSoKU.js → OfficeFilePreview-Ago_DWEt.js} +2 -2
- package/dist/{OfficeViewer-CJoojlJK.js → OfficeViewer-DBRqtLet.js} +10 -10
- package/dist/{OpenInPicker-BIMWUxBP.js → OpenInPicker-DD_h7VLv.js} +287 -287
- package/dist/{OpenXmlOfficeViewer-C24Kj8DM.js → OpenXmlOfficeViewer-B4dxjpba.js} +4 -4
- package/dist/{PdfViewer-Cf1iD759.js → PdfViewer-BanXvPmz.js} +16 -16
- package/dist/{PreviewFaviconIcon-zFOuzIxe.js → PreviewFaviconIcon-BwYKB-3e.js} +892 -892
- package/dist/{PreviewImage-oY5YnuTr.js → PreviewImage-6UU-M6_B.js} +3 -3
- package/dist/{PreviewImageContent-n6eLzY99.js → PreviewImageContent-D-00K-A9.js} +3 -3
- package/dist/{PreviewPanel-Bo4Lt02m.js → PreviewPanel-CiuHdDv8.js} +489 -489
- package/dist/{PreviewPanelShell-DhXLeN5j.js → PreviewPanelShell-Dezxjg0T.js} +71 -71
- package/dist/{ProjectIconPickerDialog-D0kFzt8f.js → ProjectIconPickerDialog-LomrzROv.js} +29 -29
- package/dist/{ProjectMonogram-D35xrrXQ.js → ProjectMonogram-D21--FQY.js} +1 -1
- package/dist/{ProviderAuthTerminal-DfsXnu7A.js → ProviderAuthTerminal-pQXIfodT.js} +3 -3
- package/dist/{PullRequestCodeTab-Dv_0kVad.js → PullRequestCodeTab-Cqfh5eN2.js} +476 -476
- package/dist/{PullRequestReviewAnnotation-LeuwO-iH.js → PullRequestReviewAnnotation-B4Lp8Ktf.js} +334 -334
- package/dist/{ReadOnlySourcePreview-D__IA5g1.js → ReadOnlySourcePreview-7xXUUySV.js} +5 -5
- package/dist/{RelativeTime-BMRprQS8.js → RelativeTime-B_yprjav.js} +2 -2
- package/dist/{RightPanelResizeHandle-BLbSz-gk.js → RightPanelResizeHandle-PumvYb9P.js} +2 -2
- package/dist/{ThemeEditorPanel-CUDdsRsE.js → ThemeEditorPanel-BmXXpaCI.js} +196 -196
- package/dist/{ThreadTerminalDrawer-BF3Ix0q_.js → ThreadTerminalDrawer-DCgE3ojz.js} +461 -461
- package/dist/{VirtualTablePreview-dajviAfu.js → VirtualTablePreview-mA6DOFwb.js} +1 -1
- package/dist/{anchoredCopyToast-DnUtg1n_.js → anchoredCopyToast-BVa_dlBU.js} +2 -2
- package/dist/{assetUrls-DkY7vXfM.js → assetUrls-D8lRk7Xd.js} +45 -45
- package/dist/{browserLinkTarget-CA46wnQC.js → browserLinkTarget-BbVlDQYx.js} +18 -18
- package/dist/builder/api/models.d.ts +2 -0
- package/dist/builder/api/models.js +6 -1
- package/dist/builder/api/sandbox.d.ts +2 -0
- package/dist/builder/api/sandbox.js +3 -1
- package/dist/builder/desk.d.ts +6 -0
- package/dist/builder/desk.js +79 -14
- package/dist/builder/mind.d.ts +5 -5
- package/dist/builder/mind.js +35 -14
- package/dist/builder/pane.d.ts +1 -1
- package/dist/builder/pane.js +1 -1
- package/dist/builder/panel.js +5 -5
- package/dist/builder/preview-fallback.d.ts +47 -0
- package/dist/builder/preview-fallback.js +341 -0
- package/dist/{changedFileKind-D6QYvIez.js → changedFileKind-DrjqPCpz.js} +5 -5
- package/dist/{collapsible-DFT41MdC.js → collapsible-CDT6JKbk.js} +1 -1
- package/dist/{color-picker-CshqBbpY.js → color-picker-kSVcH92L.js} +16 -16
- package/dist/core.js +1 -1
- package/dist/{decodeImagePreview-DnfFEjhw.js → decodeImagePreview-ZtWU3urU.js} +2 -2
- package/dist/{delimitedPreview-BiEpdYOj.js → delimitedPreview-DbbXcqOT.js} +1 -1
- package/dist/{dialog-DhQtWGRa.js → dialog-EmpqFZiK.js} +40 -40
- package/dist/{embed-c030vUqM.js → embed-CPWZKyIW.js} +36098 -35677
- package/dist/{empty-Bm5EzcG8.js → empty-ChM6gdzn.js} +1 -1
- package/dist/{errors-DrFQSJW3.js → errors-D8_Zn8KN.js} +2 -2
- package/dist/{fileContextMenu-BBo91omq.js → fileContextMenu-DW94DZj4.js} +54 -54
- package/dist/{fileExplorerLabel-AikEChiS.js → fileExplorerLabel-Cfz-3q1U.js} +507 -507
- package/dist/{fileSurfaceChrome-Cqkvn8RQ.js → fileSurfaceChrome-BDyKklTq.js} +26 -26
- package/dist/{hanzoWebAnalytics-CCxpTzcI.js → hanzoWebAnalytics-B1eETW-7.js} +1 -1
- package/dist/index.css +1 -1
- package/dist/{input-group-DEJEuwc9.js → input-group-BZ_QN-y7.js} +1 -1
- package/dist/{keybindings-C5tK_GAk.js → keybindings-D0pBlT1k.js} +7812 -7806
- package/dist/keymap.js +1 -1
- package/dist/{lucideIconByName-DUaXKH0V.js → lucideIconByName-CXY44V8P.js} +6835 -6848
- package/dist/{mediaReference-Bt_mh-ag.js → mediaReference-3wc4ZfY8.js} +95 -95
- package/dist/mediaSource-jW5c7b4r.js +70 -0
- package/dist/{modelPickerVisibility-Jue3CLfc.js → modelPickerVisibility-DBTc5r1G.js} +1 -1
- package/dist/{network-BbwqRm8c.js → network-wuXD7-is.js} +1 -1
- package/dist/{popover-anNQdce7.js → popover-BAyP2Tdr.js} +1 -1
- package/dist/{presentation-D9mVPBHm.js → presentation-68y8EAuH.js} +299 -299
- package/dist/{previewFailureMessages-BKpsSGX5.js → previewFailureMessages-CFguipaK.js} +3 -3
- package/dist/query-BPk2W3QN.js +63 -0
- package/dist/{readBinaryPreview-BAQ4fFjm.js → readBinaryPreview-CjZdBNVR.js} +2 -2
- package/dist/{refresh-icon-BYx64to1.js → refresh-icon-Vo5ImiQL.js} +1 -1
- package/dist/{scroll-area-ChvX8uOh.js → scroll-area-CEoyjC7h.js} +1 -1
- package/dist/{select-DumYjny_.js → select-DLFnkZsI.js} +2 -2
- package/dist/{session-_kmiSv2A.js → session-Decc4Fo5.js} +1063 -1063
- package/dist/{skeleton-CJqwfMSF.js → skeleton-BOKpAZv6.js} +1 -1
- package/dist/{switch-COwevwaq.js → switch-DjpPjtQN.js} +2 -2
- package/dist/{themePalette-Dl_7omVL.js → themePalette-C-GtwwqV.js} +977 -977
- package/dist/{threadSearch-BHyWwcV3.js → threadSearch-CrtCof6n.js} +162 -162
- package/dist/{toggle-CEO6qTxB.js → toggle-B4F0EEtI.js} +1 -1
- package/dist/{toggle-group-BHovdMDl.js → toggle-group-l8hRPswr.js} +2 -2
- package/dist/{use-atom-command-ByoYq_K6.js → use-atom-command-XemtT1Gv.js} +1 -1
- package/dist/{useAriaLabelledBy-DPSISlnL.js → useAriaLabelledBy-CibvSz-b.js} +1 -1
- package/dist/{useFileMetadata-e7zsixVX.js → useFileMetadata-PesehDX0.js} +33 -33
- package/dist/{useFloatingRootContext-CJ9stHca.js → useFloatingRootContext-ppoGvqar.js} +1 -1
- package/dist/{useLiveRefresh-BkKJKXhH.js → useLiveRefresh-aHkPuz6N.js} +172 -172
- package/dist/{useNextRenderData-CyUmSAgz.js → useNextRenderData-CNhjWfP0.js} +1 -1
- package/dist/{useSettings-DYG9Dmro.js → useSettings-B_MtcTyD.js} +139 -139
- package/dist/{useTextFieldSpeech-COa9XcRx.js → useTextFieldSpeech-B1wCgLPO.js} +1404 -1404
- package/dist/{useTheme-D2ZM1gvV.js → useTheme-WlXpQRKG.js} +4 -4
- package/dist/{utils-515nQ17G.js → utils-DtKQl-D3.js} +6184 -6172
- package/dist/{wizard-i86ViMRc.js → wizard-DjD4UNew.js} +3 -3
- package/dist/{workspaceFocus-BV1_9KiH.js → workspaceFocus-MR1plm6A.js} +144 -144
- package/dist/{zap-e0OsRjBR.js → zap-iwsUKtvA.js} +30 -17
- package/package.json +1 -1
- package/dist/mediaSource-zI7JWid4.js +0 -70
- package/dist/query-BxrrBAp6.js +0 -63
|
@@ -1,64 +1,64 @@
|
|
|
1
1
|
import { i as e } from "./rolldown-runtime-CwxnZyOB.js";
|
|
2
|
-
import { c as t, i as n, o as r, t as i } from "./session-
|
|
2
|
+
import { c as t, i as n, o as r, t as i } from "./session-Decc4Fo5.js";
|
|
3
3
|
import { c as a, n as o } from "./messages-yqmY7G5x.js";
|
|
4
|
-
import { Ar as s, B as c, Br as l,
|
|
5
|
-
import { Co as
|
|
6
|
-
import { $t as
|
|
7
|
-
import { t as
|
|
8
|
-
import { u as
|
|
9
|
-
import { On as
|
|
10
|
-
import { a as
|
|
11
|
-
import { n as
|
|
12
|
-
import { i as
|
|
13
|
-
import { r as
|
|
14
|
-
import { i as
|
|
15
|
-
import { a as
|
|
16
|
-
import { r as
|
|
17
|
-
import { St as
|
|
18
|
-
import "./errors-
|
|
19
|
-
import { M as
|
|
20
|
-
import { C as
|
|
21
|
-
import { t as
|
|
22
|
-
import { t as
|
|
23
|
-
import { t as
|
|
24
|
-
import { p as
|
|
25
|
-
import { i as
|
|
26
|
-
import { o as
|
|
27
|
-
import { B as
|
|
28
|
-
import { j as
|
|
29
|
-
import { F as
|
|
30
|
-
import { t as
|
|
31
|
-
import { i as
|
|
32
|
-
import { $ as
|
|
33
|
-
import { i as
|
|
34
|
-
import { t as
|
|
35
|
-
import { a as
|
|
36
|
-
import { a as
|
|
37
|
-
import { A as
|
|
38
|
-
import { A as
|
|
39
|
-
import { t as
|
|
40
|
-
import { r as
|
|
41
|
-
import { c as
|
|
42
|
-
import { i as pr } from "./useNextRenderData-
|
|
43
|
-
import { c as mr, l as hr, r as gr, s as _r, t as vr } from "./PreviewImage-
|
|
44
|
-
import { t as yr } from "./delimitedPreview-
|
|
45
|
-
import { a as br, i as xr, n as Sr, o as Cr, r as wr, t as Tr } from "./fileSurfaceChrome-
|
|
46
|
-
import { r as Er, t as Dr } from "./ReadOnlySourcePreview-
|
|
4
|
+
import { Ar as s, B as c, Br as l, C_ as u, Ef as d, F as f, Fc as p, Fr as m, Gd as h, Gh as g, Gr as _, Hh as v, Ir as y, Kh as b, Kr as x, Ld as S, Lr as C, Mr as w, Or as T, Pc as E, Pd as D, Qh as O, S_ as ee, Tf as k, ac as A, b_ as j, cc as M, ci as N, gf as te, gr as P, hf as F, hr as ne, nc as re, t as ie, uc as ae, x_ as oe, xf as I, xg as se, yr as L } from "./utils-DtKQl-D3.js";
|
|
5
|
+
import { Co as ce, G as le, Rg as ue, _o as de, ad as R } from "./keybindings-D0pBlT1k.js";
|
|
6
|
+
import { $t as fe, Y as pe, Yt as me, bt as he } from "./themePalette-C-GtwwqV.js";
|
|
7
|
+
import { t as ge, x as _e } from "./mediaReference-3wc4ZfY8.js";
|
|
8
|
+
import { u as ve } from "./network-wuXD7-is.js";
|
|
9
|
+
import { On as ye, an as be, tt as xe } from "./threadSearch-CrtCof6n.js";
|
|
10
|
+
import { a as Se, i as Ce } from "./search-3oqTSaO6.js";
|
|
11
|
+
import { n as we } from "./external-link-BJbZG79p.js";
|
|
12
|
+
import { i as Te, n as Ee, r as De } from "./message-circle-D3IVrLlW.js";
|
|
13
|
+
import { r as Oe } from "./triangle-alert-CpJvcOXh.js";
|
|
14
|
+
import { i as ke } from "./user-round-DXjpOTSK.js";
|
|
15
|
+
import { a as Ae, i as je, o as Me, t as Ne } from "./table-2-CTB_FJbA.js";
|
|
16
|
+
import { r as z } from "./text-align-start-DgfaKVRZ.js";
|
|
17
|
+
import { St as Pe, gt as Fe, q as B, t as Ie, v as Le } from "./ChatMarkdown-BUidXqSs.js";
|
|
18
|
+
import "./errors-D8_Zn8KN.js";
|
|
19
|
+
import { M as Re, p as ze, z as Be } from "./useSettings-B_MtcTyD.js";
|
|
20
|
+
import { C as Ve, S as He, T as Ue, b as We, s as Ge } from "./presentation-68y8EAuH.js";
|
|
21
|
+
import { t as Ke } from "./useStableCallback-kf0xbSaG.js";
|
|
22
|
+
import { t as qe } from "./toastHelpers-BzWu4Odu.js";
|
|
23
|
+
import { t as Je } from "./use-atom-command-XemtT1Gv.js";
|
|
24
|
+
import { p as Ye } from "./useTheme-WlXpQRKG.js";
|
|
25
|
+
import { i as Xe, n as Ze, o as Qe, t as $e } from "./assetUrls-D8lRk7Xd.js";
|
|
26
|
+
import { o as et } from "./workspaceFocus-MR1plm6A.js";
|
|
27
|
+
import { B as tt, Fn as nt, Ln as rt } from "./fileExplorerLabel-Cfz-3q1U.js";
|
|
28
|
+
import { j as it, l as at, s as V } from "./ExpandedImageDialog-iqO3LiIj.js";
|
|
29
|
+
import { F as ot, G as st, H as ct, I as lt, L as H, R as ut, U as dt, _ as ft, c as pt, g as mt, m as ht, s as gt, t as _t, u as vt, x as yt, y as bt, z as xt } from "./OpenInPicker-DD_h7VLv.js";
|
|
30
|
+
import { t as St } from "./scroll-area-CEoyjC7h.js";
|
|
31
|
+
import { i as Ct } from "./useTextFieldSpeech-B1wCgLPO.js";
|
|
32
|
+
import { $ as wt, A as U, B as Tt, C as Et, D as Dt, E as W, F as Ot, G as kt, H as At, I as jt, J as Mt, K as Nt, L as Pt, M as Ft, N as It, O as Lt, P as G, R as Rt, S as zt, T as Bt, U as Vt, V as Ht, W as Ut, X as Wt, Z as Gt, _ as Kt, at as qt, b as Jt, c as Yt, d as Xt, f as Zt, g as Qt, h as $t, j as en, k as tn, l as nn, m as rn, o as an, p as on, q as sn, s as cn, t as ln, u as un, v as dn, w as fn, x as pn, y as mn, z as K } from "./DiffCommentAnnotation-2HD5qiyt.js";
|
|
33
|
+
import { i as hn, t as gn } from "./fileContextMenu-DW94DZj4.js";
|
|
34
|
+
import { t as _n } from "./refresh-icon-Vo5ImiQL.js";
|
|
35
|
+
import { a as vn, r as yn, t as bn } from "./input-group-BZ_QN-y7.js";
|
|
36
|
+
import { a as xn, c as Sn, d as Cn, i as wn, l as Tn, n as En, r as Dn, s as On, t as kn, u as An } from "./FileExplorerPane-GwnRmXEh.js";
|
|
37
|
+
import { A as jn, Gt as Mn, N as Nn, P as Pn, Pt as Fn, Q as In, St as Ln, _n as Rn, a as zn, an as Bn, cn as Vn, dn as Hn, fn as Un, gn as Wn, hn as Gn, i as Kn, j as qn, mn as Jn, pn as Yn, sn as Xn, t as Zn, u as Qn, vn as $n, yn as er, zt as tr } from "./DiffWorkerPoolProvider-CEfiCIGR.js";
|
|
38
|
+
import { A as nr, c as rr, j as ir } from "./diffRendering-tvIuzFsP.js";
|
|
39
|
+
import { t as ar } from "./syntaxHighlighting-CqVs1cUM.js";
|
|
40
|
+
import { r as or } from "./getFiletypeFromFileName-DLahV2Rk.js";
|
|
41
|
+
import { c as sr, d as cr, l as q, n as lr, o as ur, s as dr, t as J, u as fr } from "./utils-7X1WogxY.js";
|
|
42
|
+
import { i as pr } from "./useNextRenderData-CNhjWfP0.js";
|
|
43
|
+
import { c as mr, l as hr, r as gr, s as _r, t as vr } from "./PreviewImage-6UU-M6_B.js";
|
|
44
|
+
import { t as yr } from "./delimitedPreview-DbbXcqOT.js";
|
|
45
|
+
import { a as br, i as xr, n as Sr, o as Cr, r as wr, t as Tr } from "./fileSurfaceChrome-BDyKklTq.js";
|
|
46
|
+
import { r as Er, t as Dr } from "./ReadOnlySourcePreview-7xXUUySV.js";
|
|
47
47
|
import { a as Or, i as kr, n as Ar, r as jr, t as Mr } from "./fileCommentAnnotations-BTbvReHc.js";
|
|
48
48
|
import { Suspense as Nr, lazy as Pr, useCallback as Fr, useEffect as Ir, useEffectEvent as Lr, useMemo as Rr, useRef as Y, useState as X, useSyncExternalStore as zr } from "react";
|
|
49
49
|
import { c as Z } from "react/compiler-runtime";
|
|
50
50
|
import { Fragment as Br, jsx as Q, jsxs as $ } from "react/jsx-runtime";
|
|
51
51
|
// ../../node_modules/.pnpm/@pierre+theming@1.0.2_@pierre+theme@2.0.0_@shikijs+themes@4.2.0_react-dom@19.3.0_react@19.3.0__react@19.3.0_shiki@4.2.0/node_modules/@pierre/theming/dist/color.js
|
|
52
52
|
var Vr = {
|
|
53
|
-
compositeOverBg:
|
|
54
|
-
contrastRatio:
|
|
55
|
-
deriveMutedFg:
|
|
56
|
-
hoverWouldEraseText:
|
|
57
|
-
isDarkSurface:
|
|
58
|
-
isFullyTransparent:
|
|
59
|
-
pickReadableForeground:
|
|
60
|
-
relativeLuminance:
|
|
61
|
-
surfacesMatch:
|
|
53
|
+
compositeOverBg: Hn,
|
|
54
|
+
contrastRatio: Un,
|
|
55
|
+
deriveMutedFg: Yn,
|
|
56
|
+
hoverWouldEraseText: Jn,
|
|
57
|
+
isDarkSurface: Gn,
|
|
58
|
+
isFullyTransparent: Wn,
|
|
59
|
+
pickReadableForeground: Rn,
|
|
60
|
+
relativeLuminance: $n,
|
|
61
|
+
surfacesMatch: er
|
|
62
62
|
};
|
|
63
63
|
// ../../node_modules/.pnpm/@pierre+trees@1.0.0-beta.6_@pierre+theme@2.0.0_@shikijs+themes@4.2.0_react-dom@19.3.0_r_6f89bc20e49cc599ef547096bbeb5e4e/node_modules/@pierre/trees/dist/react/useFileTreeSelector.js
|
|
64
64
|
function Hr(e, t) {
|
|
@@ -118,7 +118,7 @@ function Kr(e) {
|
|
|
118
118
|
}), [e, t]);
|
|
119
119
|
}
|
|
120
120
|
// ../../node_modules/.pnpm/@pierre+diffs@1.7.0-beta.4_patch_hash=b24b206d14c79de95be10322b96490b82e41cc13c8a02c737_31f9dca5c277eb0b5b13f052c5640fbe/node_modules/@pierre/diffs/dist/editor/EditStateManager.js
|
|
121
|
-
var qr = /* @__PURE__ */ e(
|
|
121
|
+
var qr = /* @__PURE__ */ e(zn(), 1), Jr = 100, Yr = class {
|
|
122
122
|
type;
|
|
123
123
|
#e = new qr.default.LRUMap(Jr);
|
|
124
124
|
#t = /* @__PURE__ */ new Map();
|
|
@@ -350,7 +350,7 @@ var ri = 300, ii = 100, ai = "marker-popover", oi = class {
|
|
|
350
350
|
#d(e) {
|
|
351
351
|
let t = e.closest("[data-line]");
|
|
352
352
|
if (t == null) return;
|
|
353
|
-
let n =
|
|
353
|
+
let n = sr(t);
|
|
354
354
|
if (n === void 0) return;
|
|
355
355
|
let r;
|
|
356
356
|
if (e.tagName === "SPAN") {
|
|
@@ -362,7 +362,7 @@ var ri = 300, ii = 100, ai = "marker-popover", oi = class {
|
|
|
362
362
|
line: n - 1,
|
|
363
363
|
character: r
|
|
364
364
|
};
|
|
365
|
-
for (let e = this.#t.length - 1; e >= 0; e--) if (
|
|
365
|
+
for (let e = this.#t.length - 1; e >= 0; e--) if (Vt({
|
|
366
366
|
start: i,
|
|
367
367
|
end: i
|
|
368
368
|
}, this.#t[e])) return e;
|
|
@@ -421,13 +421,13 @@ var ri = 300, ii = 100, ai = "marker-popover", oi = class {
|
|
|
421
421
|
ci(s, i);
|
|
422
422
|
let t = s.firstElementChild;
|
|
423
423
|
t?.dataset.markerMessage !== void 0 && (typeof r == "string" ? t.textContent = r : r instanceof HTMLElement ? t.replaceChildren(r) : t.innerHTML = r.html), this.#_(s, a, o), this.#l = e;
|
|
424
|
-
} else this.#r =
|
|
424
|
+
} else this.#r = q("div", {
|
|
425
425
|
dataset: {
|
|
426
426
|
editorWidget: "",
|
|
427
427
|
markerPopover: "",
|
|
428
428
|
[li(i)]: ""
|
|
429
429
|
},
|
|
430
|
-
children: [
|
|
430
|
+
children: [q("div", {
|
|
431
431
|
dataset: "markerMessage",
|
|
432
432
|
...typeof r == "string" ? { textContent: r } : r instanceof HTMLElement ? { children: [r] } : { innerHTML: r.html }
|
|
433
433
|
})]
|
|
@@ -463,7 +463,7 @@ function ui(e) {
|
|
|
463
463
|
...e.oldFile,
|
|
464
464
|
lines: [...e.oldFile.lines]
|
|
465
465
|
},
|
|
466
|
-
hunks:
|
|
466
|
+
hunks: wt(e.hunks)
|
|
467
467
|
};
|
|
468
468
|
}
|
|
469
469
|
// ../../node_modules/.pnpm/@pierre+diffs@1.7.0-beta.4_patch_hash=b24b206d14c79de95be10322b96490b82e41cc13c8a02c737_31f9dca5c277eb0b5b13f052c5640fbe/node_modules/@pierre/diffs/dist/editor/editor2.js
|
|
@@ -1138,7 +1138,7 @@ var oa = class {
|
|
|
1138
1138
|
#t;
|
|
1139
1139
|
#n;
|
|
1140
1140
|
constructor(e, t, n) {
|
|
1141
|
-
this.#e =
|
|
1141
|
+
this.#e = q("div", {
|
|
1142
1142
|
dataset: {
|
|
1143
1143
|
editorWidget: "",
|
|
1144
1144
|
selectionActionPopover: ""
|
|
@@ -1177,14 +1177,14 @@ var oa = class {
|
|
|
1177
1177
|
paddingTop = 0;
|
|
1178
1178
|
init(e) {
|
|
1179
1179
|
let t = this.lineHeight, n = !1;
|
|
1180
|
-
if (this.#e = e, this.#t ??=
|
|
1180
|
+
if (this.#e = e, this.#t ??= q("canvas", { style: { display: "none" } }), this.#n ??= this.#t.getContext("2d") ?? void 0, this.#n === void 0) throw Error("Could not get canvas context");
|
|
1181
1181
|
let r = e.parentElement;
|
|
1182
1182
|
if (r !== null) {
|
|
1183
1183
|
let { paddingTop: e } = getComputedStyle(r);
|
|
1184
1184
|
e.endsWith("px") && (this.paddingTop = parseFloat(e.slice(0, -2)));
|
|
1185
1185
|
}
|
|
1186
1186
|
let { fontSize: i, fontFamily: a, tabSize: o, lineHeight: s } = getComputedStyle(e);
|
|
1187
|
-
s.endsWith("px") ? this.lineHeight = parseFloat(s.slice(0, -2)) : i.endsWith("px") && (this.lineHeight =
|
|
1187
|
+
s.endsWith("px") ? this.lineHeight = parseFloat(s.slice(0, -2)) : i.endsWith("px") && (this.lineHeight = cr(parseFloat(i.slice(0, -2)) * parseFloat(s)));
|
|
1188
1188
|
let c = i + " " + a;
|
|
1189
1189
|
(this.#r !== c || this.ch === -1) && (this.#r = c, this.#a(c), this.ch = this.canvasMeasureTextWidth("0"), this.clearTextWidthCache(), n = !0);
|
|
1190
1190
|
let l = parseInt(o, 10);
|
|
@@ -1221,7 +1221,7 @@ var oa = class {
|
|
|
1221
1221
|
}
|
|
1222
1222
|
r = t + 1;
|
|
1223
1223
|
}
|
|
1224
|
-
return r < e.length && (n += this.#o(e.slice(r))),
|
|
1224
|
+
return r < e.length && (n += this.#o(e.slice(r))), cr(n);
|
|
1225
1225
|
}
|
|
1226
1226
|
segmentTextWidth(e, t, n) {
|
|
1227
1227
|
if (n <= t) return 0;
|
|
@@ -1233,13 +1233,13 @@ var oa = class {
|
|
|
1233
1233
|
}
|
|
1234
1234
|
canvasMeasureTextWidth(e) {
|
|
1235
1235
|
if (this.#n === void 0) throw Error("Metrics not initialized");
|
|
1236
|
-
return
|
|
1236
|
+
return cr(this.#n.measureText(e).width);
|
|
1237
1237
|
}
|
|
1238
1238
|
domMeasureTextWidth(e) {
|
|
1239
1239
|
if (this.#e === void 0) throw Error("Metrics not initialized");
|
|
1240
1240
|
let t = e + "|" + this.#r, n = this.#i.get(t);
|
|
1241
1241
|
if (n !== void 0) return n;
|
|
1242
|
-
let r =
|
|
1242
|
+
let r = q("span", {
|
|
1243
1243
|
style: {
|
|
1244
1244
|
position: "absolute",
|
|
1245
1245
|
top: "0",
|
|
@@ -1252,7 +1252,7 @@ var oa = class {
|
|
|
1252
1252
|
textContent: e
|
|
1253
1253
|
}, this.#e), i;
|
|
1254
1254
|
try {
|
|
1255
|
-
i =
|
|
1255
|
+
i = cr(r.getBoundingClientRect().width);
|
|
1256
1256
|
} finally {
|
|
1257
1257
|
r.remove();
|
|
1258
1258
|
}
|
|
@@ -1338,7 +1338,7 @@ var ma = class {
|
|
|
1338
1338
|
return this.#e;
|
|
1339
1339
|
}
|
|
1340
1340
|
constructor({ codeOptions: e, highlighter: t, textDocument: n, matchBrackets: r, setStyle: i, onDeferTokenize: a, onThemeChange: o, __debug: s }) {
|
|
1341
|
-
let { themeType: c = "system", theme: l =
|
|
1341
|
+
let { themeType: c = "system", theme: l = nr, tokenizeMaxLineLength: u = 1e3 } = e;
|
|
1342
1342
|
this.#r = window.matchMedia("(prefers-color-scheme: dark)");
|
|
1343
1343
|
let d;
|
|
1344
1344
|
if (d = c === "system" ? this.#f() : c, typeof l != "string" && c === "system") {
|
|
@@ -1376,7 +1376,7 @@ var ma = class {
|
|
|
1376
1376
|
return this.#r.matches ? "dark" : "light";
|
|
1377
1377
|
}
|
|
1378
1378
|
syncTheme(e) {
|
|
1379
|
-
let { themeType: t = "system", theme: n =
|
|
1379
|
+
let { themeType: t = "system", theme: n = nr } = e;
|
|
1380
1380
|
if (typeof n == "string") {
|
|
1381
1381
|
this.#u = !1;
|
|
1382
1382
|
let e = this.#e.getTheme(n).type;
|
|
@@ -1425,7 +1425,7 @@ var ma = class {
|
|
|
1425
1425
|
}
|
|
1426
1426
|
flush(e) {
|
|
1427
1427
|
let t = this.#t.version, n = this.#m;
|
|
1428
|
-
return n != null && n.version === t &&
|
|
1428
|
+
return n != null && n.version === t && Fn(n.renderRange, e) ? /* @__PURE__ */ new Map() : (this.#m = {
|
|
1429
1429
|
version: t,
|
|
1430
1430
|
renderRange: e
|
|
1431
1431
|
}, this.#n.flush(e));
|
|
@@ -1439,7 +1439,7 @@ var ma = class {
|
|
|
1439
1439
|
};
|
|
1440
1440
|
// ../../node_modules/.pnpm/@pierre+diffs@1.7.0-beta.4_patch_hash=b24b206d14c79de95be10322b96490b82e41cc13c8a02c737_31f9dca5c277eb0b5b13f052c5640fbe/node_modules/@pierre/diffs/dist/editor/editor.js
|
|
1441
1441
|
function ha(e, t) {
|
|
1442
|
-
let n =
|
|
1442
|
+
let n = Mn(e), r = Mn(t), i = Ln(n), a = i[i.length - 1] ?? 0;
|
|
1443
1443
|
return {
|
|
1444
1444
|
start: 0,
|
|
1445
1445
|
end: n.length,
|
|
@@ -1639,7 +1639,7 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
|
|
|
1639
1639
|
let r = this.#Z, i = this.#ce, a = i?.map((e) => [n.offsetAt(e.start), n.offsetAt(e.end)]), o = i === void 0 ? void 0 : n.resolveEdits(e).sort((e, t) => e.start - t.start), s = n.applyEdits(e, t, i);
|
|
1640
1640
|
if (s === void 0) return;
|
|
1641
1641
|
let c;
|
|
1642
|
-
i !== void 0 && a !== void 0 && o !== void 0 && (c =
|
|
1642
|
+
i !== void 0 && a !== void 0 && o !== void 0 && (c = Tt(n, i, a, o), t && n.setLastUndoSelectionsAfter(c)), this.#Mn(s, c, this.#Pn(s), { skipFocus: !r });
|
|
1643
1643
|
}
|
|
1644
1644
|
replaceSearchMatches(e, t) {
|
|
1645
1645
|
let n = this.#n?.document;
|
|
@@ -1650,12 +1650,12 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
|
|
|
1650
1650
|
start: n.positionAt(e),
|
|
1651
1651
|
end: n.positionAt(r)
|
|
1652
1652
|
},
|
|
1653
|
-
newText:
|
|
1653
|
+
newText: Bn(n, t, e, r)
|
|
1654
1654
|
})), i = this.#ce, a = i?.map((e) => [n.offsetAt(e.start), n.offsetAt(e.end)]), o = n.resolveEdits(r).sort((e, t) => e.start - t.start), s = o.at(-1).end;
|
|
1655
1655
|
for (let { start: e, end: t, text: n } of o) s += n.length - (t - e);
|
|
1656
1656
|
let c = n.applyEdits(r, !0, i);
|
|
1657
1657
|
if (c != null) {
|
|
1658
|
-
let e = i != null && a != null ?
|
|
1658
|
+
let e = i != null && a != null ? Tt(n, i, a, o) : void 0;
|
|
1659
1659
|
e != null && n.setLastUndoSelectionsAfter(e), this.#Mn(c, e, this.#Pn(c), {
|
|
1660
1660
|
skipSearchRefresh: !0,
|
|
1661
1661
|
skipFocus: !0
|
|
@@ -1737,7 +1737,7 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
|
|
|
1737
1737
|
if (t?.document == null) throw Error("Editor.setSelections: Text document is not initialized");
|
|
1738
1738
|
let { document: n } = t, r = e.map((e) => {
|
|
1739
1739
|
let t = n.normalizePosition(e.start), r = n.normalizePosition(e.end), i = e.direction === "none" ? 0 : e.direction === "backward" ? -1 : 1;
|
|
1740
|
-
return
|
|
1740
|
+
return dn(t, r) > 0 && ([t, r] = [r, t], i !== 0 && (i = i === 1 ? -1 : 1)), {
|
|
1741
1741
|
direction: i,
|
|
1742
1742
|
start: t,
|
|
1743
1743
|
end: r
|
|
@@ -1748,7 +1748,7 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
|
|
|
1748
1748
|
selections: this.#ce
|
|
1749
1749
|
}));
|
|
1750
1750
|
let i = r.at(-1);
|
|
1751
|
-
i !== void 0 && this.#Ve(
|
|
1751
|
+
i !== void 0 && this.#Ve(W(i).line), this.#Dt();
|
|
1752
1752
|
}
|
|
1753
1753
|
setMarkers(e) {
|
|
1754
1754
|
let t = this.#n?.document;
|
|
@@ -1795,7 +1795,7 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
|
|
|
1795
1795
|
let e = !this.#Pe();
|
|
1796
1796
|
n || this.#Fe(e);
|
|
1797
1797
|
}
|
|
1798
|
-
if (this.#Ye(), n || (this.#d.delivered = !1), this.#I = !1,
|
|
1798
|
+
if (this.#Ye(), n || (this.#d.delivered = !1), this.#I = !1, Xn(this.#ot), n || (this.#i?.cleanUp(), this.#i = void 0), this.#s?.forEach((e) => e()), this.#s = void 0, this.#o?.forEach((e) => e()), this.#o = void 0, n || (this.#l?.(), this.#l = void 0), this.#p = void 0, this.#m = void 0, this.#h.clear(), this.#g.clear(), this.#_ = void 0, this.#v?.remove(), this.#v = void 0, this.#y?.remove(), this.#y = void 0, this.#b?.remove(), this.#b = void 0, this.#x?.remove(), this.#x = void 0, this.#S = void 0, this.#a?.cleanUp(), this.#a = void 0, this.#C = void 0, this.#T = void 0, this.#w?.removeAttribute("contentEditable"), this.#qe(!1), this.#w = void 0, this.#xt(), this.#Z = !1, this.#E?.remove(), this.#E = void 0, this.#O = void 0, this.#M?.disconnect(), this.#M = void 0, this.#ve = !1, this.#ye !== void 0 && (cancelAnimationFrame(this.#ye), this.#ye = void 0), this.#Je(n), !n) try {
|
|
1799
1799
|
if (t != null && r != null) {
|
|
1800
1800
|
let n = this.#Ae, r = e === "complete" ? "install" : "discard";
|
|
1801
1801
|
if (t.type === "file" && n.type === "file") t.__completeEditSession(n, r);
|
|
@@ -1825,7 +1825,7 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
|
|
|
1825
1825
|
}
|
|
1826
1826
|
__postponeBgTokenizeToNextFrame() {
|
|
1827
1827
|
let e = this.#i;
|
|
1828
|
-
e !== void 0 && (e.pauseBackgroundTokenize(),
|
|
1828
|
+
e !== void 0 && (e.pauseBackgroundTokenize(), Vn(() => {
|
|
1829
1829
|
this.#i === e && e.resumeBackgroundTokenize();
|
|
1830
1830
|
}));
|
|
1831
1831
|
}
|
|
@@ -1863,8 +1863,8 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
|
|
|
1863
1863
|
this.__assertOutsideChangeCallback("FileDiff.render");
|
|
1864
1864
|
let r = this.#n;
|
|
1865
1865
|
if (r == null) throw Error("Editor.__replaceDocument: no edit session");
|
|
1866
|
-
let i = e.lang ??
|
|
1867
|
-
a == null || t || r.fileInfo?.name !== e.name || a.languageId !== i ? (this.#tn(!0), this.#Ee = [], this.#Ye(), r.editor = void 0, r.document = new
|
|
1866
|
+
let i = e.lang ?? or(e.name), a = r.document, o = a?.getText();
|
|
1867
|
+
a == null || t || r.fileInfo?.name !== e.name || a.languageId !== i ? (this.#tn(!0), this.#Ee = [], this.#Ye(), r.editor = void 0, r.document = new qn(e.name, e.contents, i, 0, new Pn({ maxEntries: this.#e.historyMaxEntries })), r.diffSession = void 0, this.#i?.cleanUp(), this.#i = void 0, this.#Je(), this.#g.clear(), this.#ce = this.#se) : this.#Ie(r, e.contents, n), r.fileInfo = {
|
|
1868
1868
|
name: e.name,
|
|
1869
1869
|
lang: e.lang
|
|
1870
1870
|
}, n != null && (this.#R = n), this.#Pe();
|
|
@@ -1892,11 +1892,11 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
|
|
|
1892
1892
|
return;
|
|
1893
1893
|
}
|
|
1894
1894
|
this.#Ge().setViewportElements(n, f), this.#S !== n && (this.#S = n, this.#v !== void 0 && n.appendChild(this.#v), this.#y !== void 0 && d.appendChild(this.#y), this.#b !== void 0 && d.appendChild(this.#b), this.#x !== void 0 && d.prepend(this.#x));
|
|
1895
|
-
let h = s.lang ??
|
|
1895
|
+
let h = s.lang ?? or(s.name), g = "contents" in s ? s.contents : s.additionLines.join("");
|
|
1896
1896
|
if (u.document == null || u.fileInfo == null) {
|
|
1897
1897
|
this.#tn(!0), this.#Ee = [], this.#Ye();
|
|
1898
1898
|
let { name: e, lang: t } = s;
|
|
1899
|
-
u.document ??= new
|
|
1899
|
+
u.document ??= new qn(s.name, g, h, 0, new Pn({ maxEntries: this.#e.historyMaxEntries })), u.fileInfo = {
|
|
1900
1900
|
name: e,
|
|
1901
1901
|
lang: t
|
|
1902
1902
|
}, this.#i?.cleanUp(), this.#i = void 0, this.#Je(), this.#g.clear(), this.#ce = this.#se, typeof process < "u" && process.env.NODE_ENV === "development" && this.#e.__debug === !0 && console.log("[diffs/editor] text document initialized from", s.name);
|
|
@@ -1941,7 +1941,7 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
|
|
|
1941
1941
|
let r = e.document;
|
|
1942
1942
|
if (r == null) return;
|
|
1943
1943
|
r.adoptLineEnding(t);
|
|
1944
|
-
let i =
|
|
1944
|
+
let i = Mn(t), a = r.lineCount - 1, o = r.offsetAt({
|
|
1945
1945
|
line: a,
|
|
1946
1946
|
character: r.getLineLength(a)
|
|
1947
1947
|
});
|
|
@@ -1953,7 +1953,7 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
|
|
|
1953
1953
|
};
|
|
1954
1954
|
if (r.applyResolvedEdits([l], !0, s, void 0, !0) != null) {
|
|
1955
1955
|
if (s != null && c != null) {
|
|
1956
|
-
let e =
|
|
1956
|
+
let e = Tt(r, s, c, [l]);
|
|
1957
1957
|
r.setLastUndoSelectionsAfter(e), this.#ce = e;
|
|
1958
1958
|
}
|
|
1959
1959
|
(this.#R != null || n != null) && r.setLastUndoLineAnnotations(this.#R ?? [], n ?? []), this.#i?.cleanUp(), this.#i = void 0, this.#Ke(), this.#g.clear(), this.#W?.removePopover(), this.#K != null && this.#K.updateMatches({ skipNavigation: !0 });
|
|
@@ -2006,7 +2006,7 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
|
|
|
2006
2006
|
}
|
|
2007
2007
|
#Ye() {
|
|
2008
2008
|
let e = this.#d;
|
|
2009
|
-
e.generation++, e.callback != null && (
|
|
2009
|
+
e.generation++, e.callback != null && (Xn(e.callback), e.callback = void 0);
|
|
2010
2010
|
}
|
|
2011
2011
|
#Xe(e) {
|
|
2012
2012
|
let t = this.#d, n = this.#n?.document;
|
|
@@ -2016,7 +2016,7 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
|
|
|
2016
2016
|
let a = this.#w, o = this.#S?.shadowRoot;
|
|
2017
2017
|
a != null && o != null && o.contains(a) && (t.delivered = !0, this.#e.onAttach?.(this, e));
|
|
2018
2018
|
};
|
|
2019
|
-
t.callback = i,
|
|
2019
|
+
t.callback = i, Vn(i);
|
|
2020
2020
|
}
|
|
2021
2021
|
#Ze() {
|
|
2022
2022
|
let e = this.#Re?.getEditorViewport?.();
|
|
@@ -2030,13 +2030,13 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
|
|
|
2030
2030
|
if (e instanceof HTMLElement) return e;
|
|
2031
2031
|
}
|
|
2032
2032
|
#$e() {
|
|
2033
|
-
this.#v =
|
|
2033
|
+
this.#v = q("style", {
|
|
2034
2034
|
dataset: "editorGlobalCss",
|
|
2035
2035
|
textContent: "\n [data-annotation-slot] {\n user-select: none;\n -webkit-user-select: none;\n }\n "
|
|
2036
|
-
}), this.#y =
|
|
2036
|
+
}), this.#y = q("style", {
|
|
2037
2037
|
dataset: "editorCss",
|
|
2038
2038
|
textContent: di
|
|
2039
|
-
}), this.#b =
|
|
2039
|
+
}), this.#b = q("style", { dataset: "editorThemeCss" }), this.#i?.applyStyle(), this.#x = Yt(), this.#E = q("div", { dataset: "editorOverlay" }), this.#O = q("span", {
|
|
2040
2040
|
ariaHidden: "true",
|
|
2041
2041
|
style: {
|
|
2042
2042
|
position: "absolute",
|
|
@@ -2056,7 +2056,7 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
|
|
|
2056
2056
|
}, n = (e) => {
|
|
2057
2057
|
if (e.pointerType !== "mouse") return;
|
|
2058
2058
|
let t = this.#ee;
|
|
2059
|
-
this.#et(), t && this.#yt(), this.#e.enabledSelectionAction === !0 && this.#ce !== void 0 && this.#ce.length > 0 && !
|
|
2059
|
+
this.#et(), t && this.#yt(), this.#e.enabledSelectionAction === !0 && this.#ce !== void 0 && this.#ce.length > 0 && !G(this.#ce.at(-1)) && this.#sn(this.#ce);
|
|
2060
2060
|
};
|
|
2061
2061
|
this.#s = [
|
|
2062
2062
|
J(document, "focusin", (n) => {
|
|
@@ -2071,21 +2071,21 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
|
|
|
2071
2071
|
J(document, "selectionchange", () => {
|
|
2072
2072
|
let e = this.#S?.shadowRoot;
|
|
2073
2073
|
if (e == null || !this.#it() || this.#ce !== void 0 && this.#ce.length > 1 && !this.#te) return;
|
|
2074
|
-
let t =
|
|
2074
|
+
let t = an(e);
|
|
2075
2075
|
if (t === void 0 || !this.#Wn(t)) return;
|
|
2076
|
-
let n =
|
|
2076
|
+
let n = mn(t, 0);
|
|
2077
2077
|
if (n !== void 0) {
|
|
2078
2078
|
if (this.#te && this.#re && this.#ce !== void 0 && this.#ce.length > 0) {
|
|
2079
2079
|
let e = this.#ce.at(-1);
|
|
2080
|
-
this.#sn([
|
|
2080
|
+
this.#sn([zt(e, n)]);
|
|
2081
2081
|
} else {
|
|
2082
|
-
if (this.#ie !== void 0) n.direction =
|
|
2082
|
+
if (this.#ie !== void 0) n.direction = Jt(this.#ie, n).direction;
|
|
2083
2083
|
else if (this.#te) this.#ie = n;
|
|
2084
2084
|
else if (this.#ce !== void 0 && this.#ce.length === 1) {
|
|
2085
2085
|
let e = this.#ce[0];
|
|
2086
|
-
|
|
2086
|
+
dn(e.start, n.start) === 0 && dn(e.end, n.end) === 0 && (n.direction = e.direction);
|
|
2087
2087
|
}
|
|
2088
|
-
this.#ne !== void 0 && (this.#ne.focusLine =
|
|
2088
|
+
this.#ne !== void 0 && (this.#ne.focusLine = W(n).line, this.#Kt()) || (this.#oe === void 0 ? this.#sn([n]) : this.#sn([...this.#oe.filter((e) => !Vt(e, n)), n]));
|
|
2089
2089
|
}
|
|
2090
2090
|
}
|
|
2091
2091
|
}, { passive: !0 }),
|
|
@@ -2135,7 +2135,7 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
|
|
|
2135
2135
|
}
|
|
2136
2136
|
this.#Ut(!1), this.#W?.removePopover();
|
|
2137
2137
|
let n = [];
|
|
2138
|
-
if (
|
|
2138
|
+
if (In() && this.#R !== void 0 && this.#R.length > 0) {
|
|
2139
2139
|
let t = [...e.querySelectorAll("[data-line-annotation]")].map((e) => [J(e, "mouseenter", () => {
|
|
2140
2140
|
this.#Y = !0;
|
|
2141
2141
|
}), J(e, "mouseleave", () => {
|
|
@@ -2156,7 +2156,7 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
|
|
|
2156
2156
|
}, {
|
|
2157
2157
|
capture: !0,
|
|
2158
2158
|
passive: !0
|
|
2159
|
-
}))) : t.button === 0 &&
|
|
2159
|
+
}))) : t.button === 0 && Gt(t) && (this.#oe = this.#ce?.map((e) => ({ ...e }))), this.#tt(n), t.shiftKey) {
|
|
2160
2160
|
let e = this.#ce?.at(-1);
|
|
2161
2161
|
if (e !== void 0) {
|
|
2162
2162
|
let t = e.direction === -1 ? e.end : e.start;
|
|
@@ -2179,31 +2179,31 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
|
|
|
2179
2179
|
this.#tn(!0), e.preventDefault();
|
|
2180
2180
|
return;
|
|
2181
2181
|
}
|
|
2182
|
-
let t =
|
|
2182
|
+
let t = sn(e, this.#e.keymap), n = this.#e.searchPanel === "host" && (t === "openSearchPanel" || t === "openSearchReplacePanel");
|
|
2183
2183
|
if (t != null && !n) {
|
|
2184
2184
|
e.preventDefault(), t === "simplifySelection" && (this.#K?.close(), this.#K = void 0, this.#_e = !1, this.#q?.cleanup(), this.#q = void 0), this.#lt(t);
|
|
2185
2185
|
return;
|
|
2186
2186
|
}
|
|
2187
|
-
let r =
|
|
2187
|
+
let r = Wt(e), a = this.#n?.document;
|
|
2188
2188
|
if (this.#ce !== void 0 && this.#ce.length > 0 && r !== void 0 && a !== void 0) {
|
|
2189
2189
|
let t = {
|
|
2190
2190
|
getSoftLineOffsets: this.#We ? (e) => this.#Un(e) : void 0,
|
|
2191
2191
|
resolveRenderableLine: this.#Be
|
|
2192
2192
|
};
|
|
2193
|
-
e.shiftKey ? this.#sn(
|
|
2193
|
+
e.shiftKey ? this.#sn(Pt(a, this.#ce, r, t)) : this.#sn(jt(a, this.#ce, r, t)), this.#Dt(), e.preventDefault();
|
|
2194
2194
|
} else {
|
|
2195
|
-
if ((e.key.length === 1 ? e.key.toLowerCase() : e.key) === "v" &&
|
|
2195
|
+
if ((e.key.length === 1 ? e.key.toLowerCase() : e.key) === "v" && Gt(e)) {
|
|
2196
2196
|
if (e.repeat) {
|
|
2197
2197
|
e.preventDefault();
|
|
2198
2198
|
return;
|
|
2199
2199
|
}
|
|
2200
2200
|
if (this.#e.clipboard !== void 0) {
|
|
2201
|
-
e.preventDefault(),
|
|
2201
|
+
e.preventDefault(), Vn(this.#ot);
|
|
2202
2202
|
return;
|
|
2203
2203
|
}
|
|
2204
2204
|
}
|
|
2205
2205
|
if (this.#K !== void 0) {
|
|
2206
|
-
let t =
|
|
2206
|
+
let t = Mt(e);
|
|
2207
2207
|
if (t !== void 0) {
|
|
2208
2208
|
e.preventDefault(), this.#K.navigate(t === "previous");
|
|
2209
2209
|
return;
|
|
@@ -2256,7 +2256,7 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
|
|
|
2256
2256
|
let a = this.#S?.shadowRoot?.querySelector("[data-deletions]");
|
|
2257
2257
|
if (a != null && this.#o.push(J(a, "pointerdown", (e) => {
|
|
2258
2258
|
let t = e.composedPath();
|
|
2259
|
-
if (
|
|
2259
|
+
if (tr(t)) {
|
|
2260
2260
|
this.#rt();
|
|
2261
2261
|
return;
|
|
2262
2262
|
}
|
|
@@ -2277,12 +2277,12 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
|
|
|
2277
2277
|
return n?.dataset.lineNumberContent === void 0 ? t && n?.tagName === "SPAN" && (n = n.closest("[data-line]")) : n = n.parentElement ?? void 0, n;
|
|
2278
2278
|
}, n = (e) => {
|
|
2279
2279
|
if (e === void 0) return;
|
|
2280
|
-
let t = e.dataset.lineType, n =
|
|
2281
|
-
if (n !== void 0 && t !== void 0 &&
|
|
2280
|
+
let t = e.dataset.lineType, n = sr(e) ?? sr(e, "columnNumber");
|
|
2281
|
+
if (n !== void 0 && t !== void 0 && Ot(t)) return n - 1;
|
|
2282
2282
|
};
|
|
2283
2283
|
this.#o.push(J(t, "pointerdown", (t) => {
|
|
2284
2284
|
let r = t.composedPath();
|
|
2285
|
-
if (
|
|
2285
|
+
if (tr(r)) {
|
|
2286
2286
|
this.#rt();
|
|
2287
2287
|
return;
|
|
2288
2288
|
}
|
|
@@ -2348,15 +2348,15 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
|
|
|
2348
2348
|
case "findNextMatch": {
|
|
2349
2349
|
let e = this.#ce;
|
|
2350
2350
|
if (e === void 0) break;
|
|
2351
|
-
if (e.some(
|
|
2352
|
-
let n = e.map((e) =>
|
|
2351
|
+
if (e.some(G)) {
|
|
2352
|
+
let n = e.map((e) => G(e) ? pn(t, e) : e);
|
|
2353
2353
|
this.#sn(n), this.focus();
|
|
2354
2354
|
} else {
|
|
2355
|
-
let n =
|
|
2355
|
+
let n = fn(t, e);
|
|
2356
2356
|
if (n !== void 0) {
|
|
2357
2357
|
this.#sn(n);
|
|
2358
2358
|
let e = n.at(-1);
|
|
2359
|
-
e !== void 0 && this.#Ve(
|
|
2359
|
+
e !== void 0 && this.#Ve(W(e).line), this.#Dt();
|
|
2360
2360
|
}
|
|
2361
2361
|
}
|
|
2362
2362
|
break;
|
|
@@ -2372,9 +2372,9 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
|
|
|
2372
2372
|
case "simplifySelection": {
|
|
2373
2373
|
let e = this.#ce, t = e?.at(-1);
|
|
2374
2374
|
if (e === void 0 || t === void 0) break;
|
|
2375
|
-
if (e.length > 1) this.#sn([t]), this.#yt(
|
|
2376
|
-
else if (!
|
|
2377
|
-
let e =
|
|
2375
|
+
if (e.length > 1) this.#sn([t]), this.#yt(W(t));
|
|
2376
|
+
else if (!G(t)) {
|
|
2377
|
+
let e = W(t);
|
|
2378
2378
|
this.#sn([{
|
|
2379
2379
|
start: e,
|
|
2380
2380
|
end: e,
|
|
@@ -2415,7 +2415,7 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
|
|
|
2415
2415
|
for (let o of this.#ce) {
|
|
2416
2416
|
let s = o.start.line, c = e === "outdent" || e === "indentLess", l = e === "indentLess" || e === "indentMore";
|
|
2417
2417
|
if (s !== o.end.line || c || l) {
|
|
2418
|
-
let e =
|
|
2418
|
+
let e = Ht(t, o, this.#r.tabSize, c);
|
|
2419
2419
|
for (let t of e[0]) {
|
|
2420
2420
|
let e = t.range.start.line;
|
|
2421
2421
|
i.has(e) || (i.add(e), n.push(t));
|
|
@@ -2466,7 +2466,7 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
|
|
|
2466
2466
|
}
|
|
2467
2467
|
break;
|
|
2468
2468
|
case "selectAll": {
|
|
2469
|
-
let e =
|
|
2469
|
+
let e = Lt(t);
|
|
2470
2470
|
this.#sn([e]), this.focus();
|
|
2471
2471
|
let n = this.#Fn().rendered, r = n[0]?.[0], i = n.at(-1)?.[1];
|
|
2472
2472
|
r !== void 0 && i !== void 0 && (this.#X = !0, this.#Et({
|
|
@@ -2485,8 +2485,8 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
|
|
|
2485
2485
|
case "moveCursorToDocStart":
|
|
2486
2486
|
case "moveCursorToDocEnd":
|
|
2487
2487
|
{
|
|
2488
|
-
let n =
|
|
2489
|
-
this.#sn([n]), this.#Ve(
|
|
2488
|
+
let n = Dt(t, e === "moveCursorToDocEnd", this.#Ue);
|
|
2489
|
+
this.#sn([n]), this.#Ve(W(n).line), this.#Dt();
|
|
2490
2490
|
}
|
|
2491
2491
|
break;
|
|
2492
2492
|
case "expandSelectionDocStart":
|
|
@@ -2494,8 +2494,8 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
|
|
|
2494
2494
|
{
|
|
2495
2495
|
let n = e === "expandSelectionDocEnd", r = this.#ce;
|
|
2496
2496
|
if (r !== void 0) {
|
|
2497
|
-
let e =
|
|
2498
|
-
this.#sn(
|
|
2497
|
+
let e = Dt(t, n, this.#Ue);
|
|
2498
|
+
this.#sn(Et(r, e)), this.#Ve(W(e).line), this.#Dt();
|
|
2499
2499
|
}
|
|
2500
2500
|
}
|
|
2501
2501
|
break;
|
|
@@ -2508,7 +2508,7 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
|
|
|
2508
2508
|
if (t == null || e === "undo" && !t.canUndo || e === "redo" && !t.canRedo) return;
|
|
2509
2509
|
let n = this.#ce, r = n?.map((e) => [t.offsetAt(e.start), t.offsetAt(e.end)]), i = e === "undo" ? t.undo() : t.redo();
|
|
2510
2510
|
if (i === void 0) return;
|
|
2511
|
-
let [a, o, s, c] = i, l = o ?? (n !== void 0 && r !== void 0 && c !== void 0 ?
|
|
2511
|
+
let [a, o, s, c] = i, l = o ?? (n !== void 0 && r !== void 0 && c !== void 0 ? Tt(t, n, r, c) : void 0), u = s ?? (this.#R == null ? void 0 : Nt(a, this.#R));
|
|
2512
2512
|
this.#Mn(a, l, u);
|
|
2513
2513
|
}
|
|
2514
2514
|
#dt(e, t) {
|
|
@@ -2526,13 +2526,13 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
|
|
|
2526
2526
|
return n === 0 ? e.end - t.end : n;
|
|
2527
2527
|
}) : void 0, s = n.applyEdits(e, !0, r, void 0, !0);
|
|
2528
2528
|
if (s === void 0) return;
|
|
2529
|
-
let c = i ?
|
|
2529
|
+
let c = i ? Tt(n, r, a, o) : t(n);
|
|
2530
2530
|
n.setLastUndoSelectionsAfter(c), this.#Mn(s, c, this.#Pn(s));
|
|
2531
2531
|
}
|
|
2532
2532
|
#ft(e) {
|
|
2533
2533
|
let t = this.#n?.document, n = this.#ce;
|
|
2534
2534
|
if (t === void 0 || n === void 0) return;
|
|
2535
|
-
let r =
|
|
2535
|
+
let r = U(n);
|
|
2536
2536
|
if (r.length === 0) return;
|
|
2537
2537
|
let i = [], a = 0, o = [];
|
|
2538
2538
|
for (let n of r) {
|
|
@@ -2613,7 +2613,7 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
|
|
|
2613
2613
|
#pt() {
|
|
2614
2614
|
let e = this.#n?.document, t = this.#ce;
|
|
2615
2615
|
if (e === void 0 || t === void 0) return;
|
|
2616
|
-
let n = t.map((e) =>
|
|
2616
|
+
let n = t.map((e) => W(e).line), r = Array.from(new Set(n)).sort((e, t) => e - t), i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), o = [];
|
|
2617
2617
|
for (let t = 0; t < r.length; t++) {
|
|
2618
2618
|
let n = r[t], s = e.getLineText(n), c = /^\s*/.exec(s)?.[0] ?? "";
|
|
2619
2619
|
i.set(n, t), a.set(n, c);
|
|
@@ -2645,7 +2645,7 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
|
|
|
2645
2645
|
#mt(e) {
|
|
2646
2646
|
let t = this.#n?.document, n = this.#ce;
|
|
2647
2647
|
if (t === void 0 || n === void 0) return;
|
|
2648
|
-
let r =
|
|
2648
|
+
let r = U(n);
|
|
2649
2649
|
if (r.length === 0 || e < 0 && r[0].startLine === 0 || e > 0 && r.at(-1).endLine >= t.lineCount - 1) return;
|
|
2650
2650
|
let i = t.lineCount, a = (e) => e < i - 1 ? {
|
|
2651
2651
|
line: e + 1,
|
|
@@ -2685,7 +2685,7 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
|
|
|
2685
2685
|
newText: o([n, ...c], n < i - 1)
|
|
2686
2686
|
});
|
|
2687
2687
|
}
|
|
2688
|
-
let c = r.at(-1), l = e > 0 && c.endLine === i - 2 ? t.getLineLength(c.endLine) : t.getLineLength(i - 1), u = n.map((n) =>
|
|
2688
|
+
let c = r.at(-1), l = e > 0 && c.endLine === i - 2 ? t.getLineLength(c.endLine) : t.getLineLength(i - 1), u = n.map((n) => Ut(n, e, i, (e) => e === i - 1 ? l : t.getLineLength(e))), d = t.applyEdits(s, !0, n, u, !0);
|
|
2689
2689
|
d !== void 0 && this.#Mn(d, u);
|
|
2690
2690
|
}
|
|
2691
2691
|
#ht = (e) => {
|
|
@@ -2708,12 +2708,12 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
|
|
|
2708
2708
|
tokens: c,
|
|
2709
2709
|
lineAnnotations: t
|
|
2710
2710
|
});
|
|
2711
|
-
(e.lineDelta !== 0 || u.length > 0) && this.#Ke(), t != null && (this.#R = t), this.#cn(), typeof process < "u" && process.env.NODE_ENV === "development" && this.#e.__debug === !0 && console.log(`[diffs/editor] re-render in: ${
|
|
2711
|
+
(e.lineDelta !== 0 || u.length > 0) && this.#Ke(), t != null && (this.#R = t), this.#cn(), typeof process < "u" && process.env.NODE_ENV === "development" && this.#e.__debug === !0 && console.log(`[diffs/editor] re-render in: ${cr(performance.now() - l)}ms,`, `tokenize in: ${cr(l - s)}ms (${c?.size ?? 0} dirty lines)`);
|
|
2712
2712
|
}
|
|
2713
2713
|
#vt(e, t) {
|
|
2714
2714
|
switch (e) {
|
|
2715
2715
|
case "insertText": {
|
|
2716
|
-
let e = t ?? "", n = this.#n?.document, r = this.#ce, i = n !== void 0 && r !== void 0 ?
|
|
2716
|
+
let e = t ?? "", n = this.#n?.document, r = this.#ce, i = n !== void 0 && r !== void 0 ? Bt(n, r, e, this.#e.autoSurround) : void 0;
|
|
2717
2717
|
this.#En(i ?? e);
|
|
2718
2718
|
break;
|
|
2719
2719
|
}
|
|
@@ -2751,12 +2751,12 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
|
|
|
2751
2751
|
direction: 0
|
|
2752
2752
|
});
|
|
2753
2753
|
let r = () => {
|
|
2754
|
-
this.#Q === a && (a.frame = void 0, !this.#Z || !i() ? this.#bt(a) : (a.restore = void 0, this.#w?.focus({ preventScroll: t }),
|
|
2754
|
+
this.#Q === a && (a.frame = void 0, !this.#Z || !i() ? this.#bt(a) : (a.restore = void 0, this.#w?.focus({ preventScroll: t }), Vn(() => this.#bt(a))));
|
|
2755
2755
|
}, a = {
|
|
2756
2756
|
frame: r,
|
|
2757
2757
|
restore: n
|
|
2758
2758
|
};
|
|
2759
|
-
this.#xt(), this.#Q = a,
|
|
2759
|
+
this.#xt(), this.#Q = a, Vn(r);
|
|
2760
2760
|
} else n != null && this.#xt(), i() ? this.#w?.focus({ preventScroll: t }) : this.#Z = !1;
|
|
2761
2761
|
}
|
|
2762
2762
|
#bt(e) {
|
|
@@ -2764,7 +2764,7 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
|
|
|
2764
2764
|
}
|
|
2765
2765
|
#xt() {
|
|
2766
2766
|
let e = this.#Q;
|
|
2767
|
-
e != null && (e.frame != null &&
|
|
2767
|
+
e != null && (e.frame != null && Xn(e.frame), this.#Q = void 0);
|
|
2768
2768
|
}
|
|
2769
2769
|
#St(e) {
|
|
2770
2770
|
let t = this.#Q?.restore;
|
|
@@ -2813,8 +2813,8 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
|
|
|
2813
2813
|
} else i = 0, a = r.defaultView?.innerHeight ?? 0;
|
|
2814
2814
|
let o = n.shadowRoot?.querySelector("[data-diffs-header][data-sticky]");
|
|
2815
2815
|
if (o != null && (i = Math.max(i, o.getBoundingClientRect().bottom)), Number.isFinite(e) && (i += Math.max(0, e)), !(a <= i)) for (let e of t.children) {
|
|
2816
|
-
let t = e, n =
|
|
2817
|
-
if (n == null || r == null || !
|
|
2816
|
+
let t = e, n = sr(t), r = t.dataset.lineType;
|
|
2817
|
+
if (n == null || r == null || !Ot(r)) continue;
|
|
2818
2818
|
let o = t.getBoundingClientRect();
|
|
2819
2819
|
if (!(o.bottom <= o.top) && o.top >= i && o.top < a) return n;
|
|
2820
2820
|
}
|
|
@@ -2831,10 +2831,10 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
|
|
|
2831
2831
|
let t = window.getSelection();
|
|
2832
2832
|
if (t === null) return;
|
|
2833
2833
|
let { start: n, end: r, direction: i } = e;
|
|
2834
|
-
|
|
2834
|
+
dn(n, r) > 0 && ([n, r] = [r, n]);
|
|
2835
2835
|
let a = this.#Ln(n.line), o = this.#Ln(r.line);
|
|
2836
2836
|
if (a === void 0 || o === void 0) return;
|
|
2837
|
-
let [s, c] =
|
|
2837
|
+
let [s, c] = en(a, n.character), [l, u] = en(o, r.character);
|
|
2838
2838
|
i === -1 && ([s, c, l, u] = [
|
|
2839
2839
|
l,
|
|
2840
2840
|
u,
|
|
@@ -2857,7 +2857,7 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
|
|
|
2857
2857
|
inline: "nearest"
|
|
2858
2858
|
});
|
|
2859
2859
|
else {
|
|
2860
|
-
let t =
|
|
2860
|
+
let t = W(n);
|
|
2861
2861
|
this.#Mt(t.line, t.character, e);
|
|
2862
2862
|
return;
|
|
2863
2863
|
}
|
|
@@ -2865,12 +2865,12 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
|
|
|
2865
2865
|
}
|
|
2866
2866
|
#Ot(e) {
|
|
2867
2867
|
let t = this.#Re, n = this.#ce?.at(-1);
|
|
2868
|
-
t !== void 0 && n !== void 0 && (this.__postponeBgTokenizeToNextFrame(), t.scrollToLine(
|
|
2868
|
+
t !== void 0 && n !== void 0 && (this.__postponeBgTokenizeToNextFrame(), t.scrollToLine(W(n).line + 1, e, this.#kt));
|
|
2869
2869
|
}
|
|
2870
2870
|
#kt = (e) => {
|
|
2871
2871
|
let t = this.#ce?.at(-1);
|
|
2872
2872
|
if (e === "settled" && t !== void 0) {
|
|
2873
|
-
let { line: e, character: n } =
|
|
2873
|
+
let { line: e, character: n } = W(t);
|
|
2874
2874
|
this.#Nt(e, n, "nearest");
|
|
2875
2875
|
}
|
|
2876
2876
|
};
|
|
@@ -2891,8 +2891,8 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
|
|
|
2891
2891
|
}
|
|
2892
2892
|
let r = 0;
|
|
2893
2893
|
if (this.#pe === e && this.#w !== void 0) for (let t = this.#w.childElementCount - 1; t >= 0; t--) {
|
|
2894
|
-
let n = this.#w.children[t], i = n.dataset.lineType, a =
|
|
2895
|
-
if (i !== void 0 &&
|
|
2894
|
+
let n = this.#w.children[t], i = n.dataset.lineType, a = sr(n);
|
|
2895
|
+
if (i !== void 0 && Ot(i) && a !== void 0) {
|
|
2896
2896
|
r = (e - (a - 1)) * this.#r.lineHeight;
|
|
2897
2897
|
break;
|
|
2898
2898
|
}
|
|
@@ -2912,7 +2912,7 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
|
|
|
2912
2912
|
}), a.remove(), !0;
|
|
2913
2913
|
}
|
|
2914
2914
|
#Pt() {
|
|
2915
|
-
return
|
|
2915
|
+
return q("div", { style: {
|
|
2916
2916
|
position: "absolute",
|
|
2917
2917
|
left: "0",
|
|
2918
2918
|
width: "2px",
|
|
@@ -2941,11 +2941,11 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
|
|
|
2941
2941
|
#It = (e) => {
|
|
2942
2942
|
let t = e.composedPath()[0], n = t instanceof HTMLElement ? t.closest("[data-line]") : null, r = this.#S?.shadowRoot, i = this.#n?.document;
|
|
2943
2943
|
if (!(n instanceof HTMLElement) || r == null || i == null || !this.#I) return;
|
|
2944
|
-
let a =
|
|
2944
|
+
let a = an(r);
|
|
2945
2945
|
if (a != null && !a.collapsed) return;
|
|
2946
|
-
let o =
|
|
2946
|
+
let o = sr(n), s = o == null ? void 0 : this.#Le?.editLineFor(o);
|
|
2947
2947
|
if (s == null) return;
|
|
2948
|
-
let c = n.dataset.lineType !== "change-deletion" && a != null && n.contains(a.startContainer) ?
|
|
2948
|
+
let c = n.dataset.lineType !== "change-deletion" && a != null && n.contains(a.startContainer) ? mn(a)?.start : void 0;
|
|
2949
2949
|
this.#Ut(!1), this.#Tt(i.normalizePosition({
|
|
2950
2950
|
line: s,
|
|
2951
2951
|
character: c?.character ?? 0
|
|
@@ -2961,7 +2961,7 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
|
|
|
2961
2961
|
let e = document.createRange();
|
|
2962
2962
|
e.setStart(o, 0), e.setEnd(s, s.childNodes.length), c.removeAllRanges(), c.addRange(e);
|
|
2963
2963
|
}
|
|
2964
|
-
this.#Ut(!0), this.#sn([]), this.#Wt(
|
|
2964
|
+
this.#Ut(!0), this.#sn([]), this.#Wt(sr(t) ?? null, !0, "deletions");
|
|
2965
2965
|
let l = Math.min(i, a), u = Math.max(i, a);
|
|
2966
2966
|
this.#ae = l < 0 ? "" : r.slice(l, u + 1).filter((e) => e.getAttribute("data-line-type") === "change-deletion").map((e) => e.textContent ?? "").join("\n");
|
|
2967
2967
|
}
|
|
@@ -3011,12 +3011,12 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
|
|
|
3011
3011
|
line: e.focusLine,
|
|
3012
3012
|
character: s
|
|
3013
3013
|
};
|
|
3014
|
-
if (e.renderedGoal !== void 0 &&
|
|
3014
|
+
if (e.renderedGoal !== void 0 && dn(e.renderedGoal, c) === 0) return !0;
|
|
3015
3015
|
e.renderedGoal = c;
|
|
3016
3016
|
let l = [], u = c.line < r.line ? -1 : 1;
|
|
3017
3017
|
for (let e = r.line;; e += u) {
|
|
3018
3018
|
if (!this.#ze(e)) {
|
|
3019
|
-
let t = n.getLineText(e), i = Math.min(r.character, t.length), a = Math.min(s, t.length), o =
|
|
3019
|
+
let t = n.getLineText(e), i = Math.min(r.character, t.length), a = Math.min(s, t.length), o = kt(t, i), c = a === i ? o : kt(t, a);
|
|
3020
3020
|
l.push({
|
|
3021
3021
|
start: {
|
|
3022
3022
|
line: e,
|
|
@@ -3039,7 +3039,7 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
|
|
|
3039
3039
|
#Jt(e, t, n) {
|
|
3040
3040
|
let r = t[n], i = n, a = r.range.end.line;
|
|
3041
3041
|
for (; i + 1 < t.length && t[i + 1].range.start.line <= a;) i++, a = Math.max(a, t[i].range.end.line);
|
|
3042
|
-
if (i === n && (r.newText.length === 0 ||
|
|
3042
|
+
if (i === n && (r.newText.length === 0 || dn(r.range.start, r.range.end) === 0)) return {
|
|
3043
3043
|
edit: r,
|
|
3044
3044
|
endIndex: i
|
|
3045
3045
|
};
|
|
@@ -3084,21 +3084,21 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
|
|
|
3084
3084
|
this.#We ? (e.dataset.wrap = "", e.style.width = `calc(100cqw - ${r}px)`) : (delete e.dataset.wrap, e.style.width = "max-content");
|
|
3085
3085
|
let a = t.split(/\r\n|\r|\n/);
|
|
3086
3086
|
for (let t = 0; t < a.length; t++) {
|
|
3087
|
-
let o = a[t], s = t === a.length - 1 ? i : void 0, c = o.length === 0 && s === void 0, l =
|
|
3087
|
+
let o = a[t], s = t === a.length - 1 ? i : void 0, c = o.length === 0 && s === void 0, l = q("span", {
|
|
3088
3088
|
dataset: c ? ["editPredictionLine", "empty"] : "editPredictionLine",
|
|
3089
3089
|
textContent: c ? "" : o
|
|
3090
3090
|
}, e);
|
|
3091
|
-
s !== void 0 &&
|
|
3091
|
+
s !== void 0 && q("span", { dataset: "editPredictionSuffix" }, l).append(s), t === 0 && n !== r && (l.style.textIndent = `${n - r}px`);
|
|
3092
3092
|
}
|
|
3093
3093
|
}
|
|
3094
3094
|
#Zt(e) {
|
|
3095
3095
|
let t = this.#Te, n = this.#n?.document;
|
|
3096
3096
|
if (t == null || n == null) return;
|
|
3097
3097
|
let { edit: r, startIndex: i, endIndex: a } = e, { start: o, end: s } = r.range;
|
|
3098
|
-
if (!(
|
|
3098
|
+
if (!(dn(o, s) === 0 && o.character < n.getLineLength(o.line)) || t.response.edits[i - 1]?.range.end.line === o.line || t.response.edits[a + 1]?.range.start.line === o.line) return;
|
|
3099
3099
|
let c = this.#Ln(o.line);
|
|
3100
3100
|
if (c === void 0) return document.createTextNode(n.getLineText(o.line).slice(o.character));
|
|
3101
|
-
let [l, u] =
|
|
3101
|
+
let [l, u] = en(c, o.character), d = document.createRange();
|
|
3102
3102
|
d.selectNodeContents(c), d.setStart(l, lr(l, u));
|
|
3103
3103
|
let f = d.cloneContents();
|
|
3104
3104
|
return f.firstChild?.textContent === "" && f.firstChild.remove(), f;
|
|
@@ -3107,7 +3107,7 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
|
|
|
3107
3107
|
let { edit: t } = e, { start: n } = t.range, [r, i] = this.#Vn(n.line, n.character), a = 1, o = t.newText.split(/\r\n|\r|\n/).length, s = this.#E;
|
|
3108
3108
|
if (this.#We && s != null) {
|
|
3109
3109
|
a = Math.max(1, this.#Un(n.line).length - 1);
|
|
3110
|
-
let i =
|
|
3110
|
+
let i = q("span", {
|
|
3111
3111
|
dataset: "editPrediction",
|
|
3112
3112
|
style: { visibility: "hidden" }
|
|
3113
3113
|
}, s);
|
|
@@ -3186,14 +3186,14 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
|
|
|
3186
3186
|
#rn() {
|
|
3187
3187
|
this.#tn(!0);
|
|
3188
3188
|
let e = this.#ce?.[0];
|
|
3189
|
-
if (this.#e.editPrediction === void 0 || this.#n?.document === void 0 || this.#n?.fileInfo === void 0 || this.#ce?.length !== 1 || e === void 0 || !
|
|
3190
|
-
let t = this.#n?.document, n = t.offsetAt(
|
|
3189
|
+
if (this.#e.editPrediction === void 0 || this.#n?.document === void 0 || this.#n?.fileInfo === void 0 || this.#ce?.length !== 1 || e === void 0 || !G(e)) return;
|
|
3190
|
+
let t = this.#n?.document, n = t.offsetAt(W(e));
|
|
3191
3191
|
this.#be = setTimeout(() => {
|
|
3192
3192
|
this.#be = void 0;
|
|
3193
3193
|
let e = this.#e.editPrediction, r = this.#ce?.[0], i = this.#n?.fileInfo?.name;
|
|
3194
|
-
if (e === void 0 || i === void 0 || this.#n?.document !== t || this.#ce?.length !== 1 || r === void 0 || !
|
|
3194
|
+
if (e === void 0 || i === void 0 || this.#n?.document !== t || this.#ce?.length !== 1 || r === void 0 || !G(r) || t.offsetAt(W(r)) !== n || !this.#nn(i)) return;
|
|
3195
3195
|
let a = (e) => this.#In(e) && !this.#ze(e);
|
|
3196
|
-
if (!a(
|
|
3196
|
+
if (!a(W(r).line)) {
|
|
3197
3197
|
this.#we = !0;
|
|
3198
3198
|
return;
|
|
3199
3199
|
}
|
|
@@ -3213,10 +3213,10 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
|
|
|
3213
3213
|
}
|
|
3214
3214
|
Promise.resolve(f).then((e) => {
|
|
3215
3215
|
let r = this.#ce?.[0];
|
|
3216
|
-
if (u.signal.aborted || d !== this.#Se || this.#xe !== u || this.#n?.document !== t || t.version !== o.version || this.#ce?.length !== 1 || r === void 0 || !
|
|
3216
|
+
if (u.signal.aborted || d !== this.#Se || this.#xe !== u || this.#n?.document !== t || t.version !== o.version || this.#ce?.length !== 1 || r === void 0 || !G(r) || t.offsetAt(W(r)) !== n || e == null || !Array.isArray(e.edits) || e.edits.length === 0 || e.edits.length > ya || e.newCursor == null) return;
|
|
3217
3217
|
let i = [], a = 0;
|
|
3218
3218
|
for (let n of e.edits) {
|
|
3219
|
-
if (n == null || typeof n.newText != "string" || !Da(t, n.range?.start) || !Da(t, n.range?.end) ||
|
|
3219
|
+
if (n == null || typeof n.newText != "string" || !Da(t, n.range?.start) || !Da(t, n.range?.end) || dn(n.range.start, n.range.end) > 0 || (a += xa.encode(n.newText).byteLength, a > ba)) return;
|
|
3220
3220
|
let e = t.offsetAt(n.range.start), r = t.offsetAt(n.range.end), o = t.resolveEdits([n])[0];
|
|
3221
3221
|
if (o.start !== e || o.end !== r) return;
|
|
3222
3222
|
i.push(o);
|
|
@@ -3277,12 +3277,12 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
|
|
|
3277
3277
|
}, va);
|
|
3278
3278
|
}
|
|
3279
3279
|
#in(e, t) {
|
|
3280
|
-
let n = this.#n?.document, r = this.#n?.fileInfo?.name, i =
|
|
3280
|
+
let n = this.#n?.document, r = this.#n?.fileInfo?.name, i = Nn(e);
|
|
3281
3281
|
n !== void 0 && r !== void 0 && i !== void 0 && this.#nn(r) && (this.#Ee = ji(this.#Ee, r, n, i, t));
|
|
3282
3282
|
}
|
|
3283
3283
|
#an() {
|
|
3284
3284
|
let e = this.#Te, t = this.#n?.document, n = this.#ce?.[0];
|
|
3285
|
-
if (e === void 0 || !e.rendered || t === void 0 || e.document !== t || e.version !== t.version || this.#ce?.length !== 1 || n === void 0 || !
|
|
3285
|
+
if (e === void 0 || !e.rendered || t === void 0 || e.document !== t || e.version !== t.version || this.#ce?.length !== 1 || n === void 0 || !G(n) || t.offsetAt(W(n)) !== e.cursorOffset) return;
|
|
3286
3286
|
let { edits: r, newCursor: i } = e.response;
|
|
3287
3287
|
this.#tn(!0);
|
|
3288
3288
|
let a = t.applyEdits(r.map((e) => ({
|
|
@@ -3309,7 +3309,7 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
|
|
|
3309
3309
|
let r = this.#Yt();
|
|
3310
3310
|
if (t != null && n != null && r != null && r.allVisible) {
|
|
3311
3311
|
for (let t of r.groups) {
|
|
3312
|
-
let { edit: r, endIndex: i } = t, { start: a, end: o } = r.range, s = r.newText.length === 0, c =
|
|
3312
|
+
let { edit: r, endIndex: i } = t, { start: a, end: o } = r.range, s = r.newText.length === 0, c = dn(a, o) !== 0, l = n.getLineLength(a.line), u = !c && a.character < l;
|
|
3313
3313
|
if (c ? this.#ln(e, s ? "editPredictionDeletion" : "editPredictionReplacement", {
|
|
3314
3314
|
start: a,
|
|
3315
3315
|
end: o
|
|
@@ -3321,7 +3321,7 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
|
|
|
3321
3321
|
}
|
|
3322
3322
|
}), s) continue;
|
|
3323
3323
|
let [d, f] = this.#Vn(a.line, a.character), p = this.#Vn(a.line, 0)[0], m = this.#Bn(a.line) + f * this.#r.lineHeight, h = `editPrediction-${i}`, g = this.#D?.get(h);
|
|
3324
|
-
if (g === void 0 ? g =
|
|
3324
|
+
if (g === void 0 ? g = q("span", {
|
|
3325
3325
|
ariaHidden: "true",
|
|
3326
3326
|
contentEditable: "false",
|
|
3327
3327
|
dataset: "editPrediction"
|
|
@@ -3340,7 +3340,7 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
|
|
|
3340
3340
|
let t = this.#ce, n = t?.length !== e.length;
|
|
3341
3341
|
if (!n && t !== void 0) for (let r = 0; r < e.length; r++) {
|
|
3342
3342
|
let i = t[r], a = e[r];
|
|
3343
|
-
if (i.direction !== a.direction ||
|
|
3343
|
+
if (i.direction !== a.direction || dn(i.start, a.start) !== 0 || dn(i.end, a.end) !== 0) {
|
|
3344
3344
|
n = !0;
|
|
3345
3345
|
break;
|
|
3346
3346
|
}
|
|
@@ -3354,12 +3354,12 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
|
|
|
3354
3354
|
elements: /* @__PURE__ */ new Map()
|
|
3355
3355
|
};
|
|
3356
3356
|
if (e.length > 0) {
|
|
3357
|
-
let t =
|
|
3357
|
+
let t = Rt(e), n = t.at(-1);
|
|
3358
3358
|
this.#ce = t;
|
|
3359
|
-
let r = t.some((e) => !
|
|
3359
|
+
let r = t.some((e) => !G(e)), a = W(n).line + 1;
|
|
3360
3360
|
this.#Wt(a, r);
|
|
3361
|
-
for (let e of t)
|
|
3362
|
-
let o = this.#e.matchBrackets !== !1 && this.#n?.document != null && this.#i !== void 0 &&
|
|
3361
|
+
for (let e of t) G(e) || this.#ln(i, "selection", e), this.#pn(i, e, e === n);
|
|
3362
|
+
let o = this.#e.matchBrackets !== !1 && this.#n?.document != null && this.#i !== void 0 && G(n) ? Ji(this.#n?.document, this.#i, n.start) : void 0;
|
|
3363
3363
|
if (o !== void 0) for (let e of o) this.#ln(i, "bracketMatch", e);
|
|
3364
3364
|
}
|
|
3365
3365
|
let a = this.#n?.document;
|
|
@@ -3393,7 +3393,7 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
|
|
|
3393
3393
|
}
|
|
3394
3394
|
if (!this.#Gn(o)) continue;
|
|
3395
3395
|
let c = r.get(n);
|
|
3396
|
-
c === void 0 && (c =
|
|
3396
|
+
c === void 0 && (c = q("div", {
|
|
3397
3397
|
dataset: "remoteCaret",
|
|
3398
3398
|
children: [t(e)]
|
|
3399
3399
|
}, i), r.set(n, c));
|
|
@@ -3465,10 +3465,10 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
|
|
|
3465
3465
|
n !== void 0 && (n.remove(), e.elements.delete(t), h += "-rtl", p.rtl = "");
|
|
3466
3466
|
}
|
|
3467
3467
|
let g = e.elements.get(h);
|
|
3468
|
-
g === void 0 && (f?.has(h) === !0 ? (g = f.get(h), g.style.cssText = d, f.delete(h)) : g =
|
|
3468
|
+
g === void 0 && (f?.has(h) === !0 ? (g = f.get(h), g.style.cssText = d, f.delete(h)) : g = q("div", {
|
|
3469
3469
|
dataset: t === "caretHighlight" ? "caretHighlightRange" : "selectionRange",
|
|
3470
3470
|
style: { cssText: d },
|
|
3471
|
-
children: [
|
|
3471
|
+
children: [q("div", { dataset: p })]
|
|
3472
3472
|
}, e.fragment), e.elements.set(h, g));
|
|
3473
3473
|
}, h = (t) => {
|
|
3474
3474
|
let o = i + a, l = t.dataset, u = e.previousSelectionRange;
|
|
@@ -3494,7 +3494,7 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
|
|
|
3494
3494
|
}, g = e.elements.get(d);
|
|
3495
3495
|
if (g !== void 0) p && h(g);
|
|
3496
3496
|
else {
|
|
3497
|
-
if (f?.has(d) === !0 ? (g = f.get(d), f.delete(d)) : g =
|
|
3497
|
+
if (f?.has(d) === !0 ? (g = f.get(d), f.delete(d)) : g = q("div", { dataset: o ? [t + "Range", o] : t + "Range" }, e.fragment), g.style.width = `${a}px`, g.style.transform = `translateX(${i}px) translateY(${u}px)`, t === "editPredictionInsertion" || t === "editPredictionReplacement") {
|
|
3498
3498
|
let e = this.#Ln(n);
|
|
3499
3499
|
e !== void 0 && g.style.setProperty("--diffs-edit-prediction-bg", getComputedStyle(e).getPropertyValue("--diffs-line-bg"));
|
|
3500
3500
|
} else g.style.removeProperty("--diffs-edit-prediction-bg");
|
|
@@ -3502,11 +3502,11 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
|
|
|
3502
3502
|
}
|
|
3503
3503
|
}
|
|
3504
3504
|
#pn(e, t, n) {
|
|
3505
|
-
let { line: r, character: i } =
|
|
3505
|
+
let { line: r, character: i } = W(t);
|
|
3506
3506
|
if (!this.#Gn(r)) return;
|
|
3507
3507
|
let [a, o] = this.#Vn(r, i), s = "caret-" + r + "/" + o + ":" + i;
|
|
3508
3508
|
if (e.elements.has(s)) return;
|
|
3509
|
-
let c = a - 1, l = this.#Bn(r) + o * this.#r.lineHeight, u =
|
|
3509
|
+
let c = a - 1, l = this.#Bn(r) + o * this.#r.lineHeight, u = q("div", {
|
|
3510
3510
|
dataset: "caret",
|
|
3511
3511
|
style: { transform: `translateX(${c}px) translateY(${l}px)` }
|
|
3512
3512
|
}, e.fragment);
|
|
@@ -3516,11 +3516,11 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
|
|
|
3516
3516
|
let e = this.#ce?.at(-1), t = this.#E, n = this.#n?.document, r = this.#e.renderSelectionAction, i = () => {
|
|
3517
3517
|
this.#q?.cleanup(), this.#q = void 0;
|
|
3518
3518
|
};
|
|
3519
|
-
if (this.#e.enabledSelectionAction !== !0 || r === void 0 || e === void 0 ||
|
|
3519
|
+
if (this.#e.enabledSelectionAction !== !0 || r === void 0 || e === void 0 || G(e) || this.#te || t === void 0 || n === void 0) {
|
|
3520
3520
|
i();
|
|
3521
3521
|
return;
|
|
3522
3522
|
}
|
|
3523
|
-
let a =
|
|
3523
|
+
let a = W(e);
|
|
3524
3524
|
if (!this.#Gn(a.line)) {
|
|
3525
3525
|
i();
|
|
3526
3526
|
return;
|
|
@@ -3622,7 +3622,7 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
|
|
|
3622
3622
|
}
|
|
3623
3623
|
if (this.#w != null && n.size > 0 && (e.paint(this.#w, (e, t) => t === "deletions" ? void 0 : n.get(e)), this.#fe)) {
|
|
3624
3624
|
let t = e.currentMatchRange;
|
|
3625
|
-
this.#fe = t == null || !
|
|
3625
|
+
this.#fe = t == null || !un(t);
|
|
3626
3626
|
}
|
|
3627
3627
|
}
|
|
3628
3628
|
#gn(e) {
|
|
@@ -3656,14 +3656,14 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
|
|
|
3656
3656
|
this.#K?.cleanup();
|
|
3657
3657
|
let t = this.#n?.document, n = this.#S?.shadowRoot?.querySelector("pre"), r = this.#ce;
|
|
3658
3658
|
if (t === void 0 || n == null) return;
|
|
3659
|
-
this.#ue ??=
|
|
3660
|
-
let i =
|
|
3659
|
+
this.#ue ??= nn.create(n.ownerDocument);
|
|
3660
|
+
let i = tn(t, r?.at(-1));
|
|
3661
3661
|
this.#de = void 0;
|
|
3662
3662
|
let a = !1, o = (e, n) => {
|
|
3663
3663
|
this.#de = e, this.#fe = !0;
|
|
3664
3664
|
let r = t.positionAt(e[0]);
|
|
3665
3665
|
this.#Ve(r.line), this.#pe = void 0, this.#he = !1, (a || !this.#vn(e)) && (a = !0, this.#Mt(r.line, r.character, !0)), this.#hn(), this.#_e = n;
|
|
3666
|
-
}, s = new
|
|
3666
|
+
}, s = new cn({
|
|
3667
3667
|
containerElement: n,
|
|
3668
3668
|
unsafeCSS: this.#N?.options.unsafeCSS,
|
|
3669
3669
|
defaultQuery: i,
|
|
@@ -3716,11 +3716,11 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
|
|
|
3716
3716
|
}
|
|
3717
3717
|
#xn() {
|
|
3718
3718
|
let e = this.#n?.document, t = this.#ce;
|
|
3719
|
-
return e === void 0 || t === void 0 ? "" :
|
|
3719
|
+
return e === void 0 || t === void 0 ? "" : It(e, t);
|
|
3720
3720
|
}
|
|
3721
3721
|
#Sn() {
|
|
3722
3722
|
let e = this.#n?.document, t = this.#ce;
|
|
3723
|
-
return e === void 0 || t === void 0 ? [] :
|
|
3723
|
+
return e === void 0 || t === void 0 ? [] : Ft(e, t);
|
|
3724
3724
|
}
|
|
3725
3725
|
#Cn(e, t, n) {
|
|
3726
3726
|
e !== null && (e.setData("text", t), n.length > 1 && e.setData(Ca, JSON.stringify(n)));
|
|
@@ -3728,11 +3728,11 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
|
|
|
3728
3728
|
#wn() {
|
|
3729
3729
|
let e = this.#n?.document, t = this.#ce;
|
|
3730
3730
|
if (e === void 0 || t === void 0 || t.length === 0) return "";
|
|
3731
|
-
if (t.some((e) =>
|
|
3732
|
-
let n =
|
|
3731
|
+
if (t.some((e) => G(e))) {
|
|
3732
|
+
let n = At(e, t);
|
|
3733
3733
|
return this.#Tn(n.edits, n.nextSelectionOffsets), n.text;
|
|
3734
3734
|
}
|
|
3735
|
-
let n =
|
|
3735
|
+
let n = It(e, t);
|
|
3736
3736
|
return this.#En("", void 0, !0), n;
|
|
3737
3737
|
}
|
|
3738
3738
|
#Tn(e, t) {
|
|
@@ -3754,7 +3754,7 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
|
|
|
3754
3754
|
if (t === void 0) return;
|
|
3755
3755
|
let i = this.#n?.document, a = t.at(-1);
|
|
3756
3756
|
if (i === void 0 || a === void 0) return;
|
|
3757
|
-
let { nextSelections: o, change: s } = Array.isArray(e) && e.length === t.length ?
|
|
3757
|
+
let { nextSelections: o, change: s } = Array.isArray(e) && e.length === t.length ? Qt(i, t, e, this.#R, n, r) : $t(i, t, {
|
|
3758
3758
|
start: i.offsetAt(a.start),
|
|
3759
3759
|
end: i.offsetAt(a.end),
|
|
3760
3760
|
text: Array.isArray(e) ? e.join("\n") : e
|
|
@@ -3764,7 +3764,7 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
|
|
|
3764
3764
|
#Dn(e = !1) {
|
|
3765
3765
|
let t = this.#ce, n = this.#n?.document;
|
|
3766
3766
|
if (t === void 0 || n === void 0) return;
|
|
3767
|
-
let { nextSelections: r, change: i } =
|
|
3767
|
+
let { nextSelections: r, change: i } = Xt(n, t, e, this.#R, this.#r.tabSize);
|
|
3768
3768
|
i !== void 0 && this.#Mn(i, r, this.#Pn(i));
|
|
3769
3769
|
}
|
|
3770
3770
|
#On() {
|
|
@@ -3777,31 +3777,31 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
|
|
|
3777
3777
|
if (t >= r && t <= i) return r;
|
|
3778
3778
|
}
|
|
3779
3779
|
return 0;
|
|
3780
|
-
} : void 0, { nextSelections: r, change: i } =
|
|
3780
|
+
} : void 0, { nextSelections: r, change: i } = on(t, e, n, this.#R);
|
|
3781
3781
|
i !== void 0 && this.#Mn(i, r, this.#Pn(i));
|
|
3782
3782
|
}
|
|
3783
3783
|
#kn() {
|
|
3784
3784
|
let e = this.#ce, t = this.#n?.document;
|
|
3785
3785
|
if (e === void 0 || t === void 0) return;
|
|
3786
|
-
let { nextSelections: n, change: r } =
|
|
3786
|
+
let { nextSelections: n, change: r } = rn(t, e, this.#R);
|
|
3787
3787
|
r !== void 0 && this.#Mn(r, n, this.#Pn(r));
|
|
3788
3788
|
}
|
|
3789
3789
|
#An() {
|
|
3790
3790
|
let e = this.#ce, t = this.#n?.document;
|
|
3791
3791
|
if (e === void 0 || t === void 0) return;
|
|
3792
|
-
let { nextSelections: n, change: r } =
|
|
3792
|
+
let { nextSelections: n, change: r } = Zt(t, e, this.#R);
|
|
3793
3793
|
r !== void 0 && this.#Mn(r, n, this.#Pn(r));
|
|
3794
3794
|
}
|
|
3795
3795
|
#jn() {
|
|
3796
3796
|
let e = this.#ce, t = this.#n?.document;
|
|
3797
3797
|
if (e === void 0 || t === void 0) return;
|
|
3798
|
-
let { nextSelections: n, change: r } =
|
|
3798
|
+
let { nextSelections: n, change: r } = Kt(t, e, this.#R);
|
|
3799
3799
|
r !== void 0 && this.#Mn(r, n, this.#Pn(r));
|
|
3800
3800
|
}
|
|
3801
3801
|
#Mn(e, t, n, r) {
|
|
3802
3802
|
this.#Te != null && this.#tn(!0);
|
|
3803
3803
|
let i = this.#n?.document;
|
|
3804
|
-
if (i !== void 0 && this.#G !== void 0) for (let t of this.#G) t.anchorOffset =
|
|
3804
|
+
if (i !== void 0 && this.#G !== void 0) for (let t of this.#G) t.anchorOffset = K(t.anchorOffset, e.changes), t.focusOffset = K(t.focusOffset, e.changes), t.caret.anchor = i.positionAt(t.anchorOffset), t.caret.focus = i.positionAt(t.focusOffset);
|
|
3805
3805
|
if (e.lineDelta !== 0 || this.#We) for (let t of this.#h.keys()) t >= e.startLine && this.#h.delete(t);
|
|
3806
3806
|
if (this.#g.size > 0) {
|
|
3807
3807
|
if (e.lineDelta === 0 && (e.changedLineRanges.length === 1 || e.changedLineChanges?.every(([, , e]) => e === 0) === !0)) for (let [t, n] of e.changedLineRanges) for (let e = t; e <= n; e++) this.#g.delete(e);
|
|
@@ -3812,7 +3812,7 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
|
|
|
3812
3812
|
lineAnnotations: n
|
|
3813
3813
|
}), n != null && (this.#R = n)), t != null && this.#sn(t), this.#Pe(), this.#in(e, r?.editSource ?? "user"), this.#rn(), this.#Nn(e.changes, n ?? this.#R), r?.skipSearchRefresh !== !0 && this.#K !== void 0 && this.#K.updateMatches({ skipNavigation: !0 }), t != null && r?.skipFocus !== !0) {
|
|
3814
3814
|
let e = t.at(-1);
|
|
3815
|
-
if (e !== void 0 && this.#Ve(
|
|
3815
|
+
if (e !== void 0 && this.#Ve(W(e).line), this.#Re !== void 0) this.#Ot("nearest");
|
|
3816
3816
|
else if (this.#j !== void 0) requestAnimationFrame(() => {
|
|
3817
3817
|
this.#j?.scrollIntoView({
|
|
3818
3818
|
block: "nearest",
|
|
@@ -3820,7 +3820,7 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
|
|
|
3820
3820
|
});
|
|
3821
3821
|
});
|
|
3822
3822
|
else if (t.length > 0) {
|
|
3823
|
-
let e =
|
|
3823
|
+
let e = W(t.at(-1));
|
|
3824
3824
|
this.#Mt(e.line, e.character);
|
|
3825
3825
|
}
|
|
3826
3826
|
this.focus({ preventScroll: !0 });
|
|
@@ -3841,7 +3841,7 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
|
|
|
3841
3841
|
}
|
|
3842
3842
|
#Pn(e) {
|
|
3843
3843
|
if (this.#R != null) {
|
|
3844
|
-
let t =
|
|
3844
|
+
let t = Nt(e, this.#R);
|
|
3845
3845
|
if (t != null) return this.#n?.document?.setLastUndoLineAnnotations(this.#R, t), t;
|
|
3846
3846
|
}
|
|
3847
3847
|
}
|
|
@@ -3866,8 +3866,8 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
|
|
|
3866
3866
|
n != null && t <= n[1] + 1 ? n[1] = Math.max(n[1], t) : e.push([t, t]);
|
|
3867
3867
|
}, c = e != null && e.bottom <= e.top;
|
|
3868
3868
|
for (let i = a ? o : 0; i < r.length; i++) {
|
|
3869
|
-
let l = r[i], u = l.dataset.lineType, d =
|
|
3870
|
-
if (d == null || u == null || !
|
|
3869
|
+
let l = r[i], u = l.dataset.lineType, d = sr(l);
|
|
3870
|
+
if (d == null || u == null || !Ot(u)) continue;
|
|
3871
3871
|
let f = d - 1;
|
|
3872
3872
|
if (a || s(t, f), e == null || c || i < o) continue;
|
|
3873
3873
|
let p = l.getBoundingClientRect();
|
|
@@ -3951,7 +3951,7 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
|
|
|
3951
3951
|
}
|
|
3952
3952
|
let r = this.#w;
|
|
3953
3953
|
if (r == null || !r.isConnected) return;
|
|
3954
|
-
let i =
|
|
3954
|
+
let i = q("div", {
|
|
3955
3955
|
style: {
|
|
3956
3956
|
position: "absolute",
|
|
3957
3957
|
top: "0",
|
|
@@ -3985,7 +3985,7 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
|
|
|
3985
3985
|
d(n).top > f ? t = n : e = n + 1;
|
|
3986
3986
|
}
|
|
3987
3987
|
if (e >= l) break;
|
|
3988
|
-
let { left: n, top: r } = d(e), i =
|
|
3988
|
+
let { left: n, top: r } = d(e), i = In() && n - c > this.#r.ch / 2;
|
|
3989
3989
|
s.push(u(i ? e - 1 : e)), f = r, p = e + 1;
|
|
3990
3990
|
}
|
|
3991
3991
|
let m = new Uint32Array(s.length + 1);
|
|
@@ -4027,7 +4027,7 @@ function Oa(e, t) {
|
|
|
4027
4027
|
}
|
|
4028
4028
|
// src/components/files/filePath.ts
|
|
4029
4029
|
function ka(e, t) {
|
|
4030
|
-
let n =
|
|
4030
|
+
let n = D(t), r = S(t), i = r ? "\\" : "/", a = (t.startsWith("~\\") ? `~/${t.slice(2)}` : t).split(r ? /[\\/]/ : "/").filter(Boolean), o = t.startsWith("\\\\") ? "\\\\" : t.startsWith("/") ? "/" : "";
|
|
4031
4031
|
return [...n ? [] : [{
|
|
4032
4032
|
label: e,
|
|
4033
4033
|
path: "",
|
|
@@ -4045,7 +4045,7 @@ function Aa(e) {
|
|
|
4045
4045
|
return ka("", e).at(-1)?.path ?? e;
|
|
4046
4046
|
}
|
|
4047
4047
|
function ja(e) {
|
|
4048
|
-
return
|
|
4048
|
+
return D(e) && !/^\\\\[^\\/]+$/.test(e);
|
|
4049
4049
|
}
|
|
4050
4050
|
function Ma(e, t) {
|
|
4051
4051
|
let n = Aa(t);
|
|
@@ -4059,7 +4059,7 @@ function Pa(e, t) {
|
|
|
4059
4059
|
return n < 0 ? null : ka("", t)[n + 1]?.label ?? null;
|
|
4060
4060
|
}
|
|
4061
4061
|
function Fa(e, t) {
|
|
4062
|
-
let n =
|
|
4062
|
+
let n = S(e) ? "\\" : "/";
|
|
4063
4063
|
return (e.endsWith(n) ? e : `${e}${n}`) + t.split("/").join(n);
|
|
4064
4064
|
}
|
|
4065
4065
|
function Ia(e, t) {
|
|
@@ -4101,9 +4101,9 @@ function za(e) {
|
|
|
4101
4101
|
if (i === null) return;
|
|
4102
4102
|
let a = t.includes(i) ? t : [i], o = a.map((t) => {
|
|
4103
4103
|
let n = t.replace(/\/+$/, "");
|
|
4104
|
-
return
|
|
4104
|
+
return vt(n && e.mentionPath ? e.mentionPath(n) : t);
|
|
4105
4105
|
}).filter((e) => e !== null);
|
|
4106
|
-
o.length !== 0 && (n = a, r.dataTransfer.setData(
|
|
4106
|
+
o.length !== 0 && (n = a, r.dataTransfer.setData(pt, o.join(" ")));
|
|
4107
4107
|
},
|
|
4108
4108
|
handleDragEnd(e) {
|
|
4109
4109
|
if (n.length !== 0) {
|
|
@@ -4178,49 +4178,49 @@ function Ja(e, t) {
|
|
|
4178
4178
|
n[1] === Symbol.for("react.memo_cache_sentinel") ? (c = /* @__PURE__ */ new Map(), n[1] = c) : c = n[1];
|
|
4179
4179
|
let [l, u] = X(c), [d, f] = X(1), [p, m] = X(to), h;
|
|
4180
4180
|
n[2] === Symbol.for("react.memo_cache_sentinel") ? (h = /* @__PURE__ */ new Map(), n[2] = h) : h = n[2];
|
|
4181
|
-
let
|
|
4182
|
-
n[3] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
4183
|
-
let v = Y(_), y;
|
|
4184
|
-
n[4] === Symbol.for("react.memo_cache_sentinel") ? (y = /* @__PURE__ */ new Map(), n[4] = y) : y = n[4];
|
|
4181
|
+
let _ = Y(h), y;
|
|
4182
|
+
n[3] === Symbol.for("react.memo_cache_sentinel") ? (y = /* @__PURE__ */ new Map(), n[3] = y) : y = n[3];
|
|
4185
4183
|
let b = Y(y), x;
|
|
4186
|
-
n[
|
|
4184
|
+
n[4] === Symbol.for("react.memo_cache_sentinel") ? (x = /* @__PURE__ */ new Map(), n[4] = x) : x = n[4];
|
|
4187
4185
|
let S = Y(x), C;
|
|
4188
|
-
n[
|
|
4189
|
-
let w = Y(C),
|
|
4190
|
-
n[
|
|
4191
|
-
let
|
|
4192
|
-
n[
|
|
4193
|
-
let
|
|
4186
|
+
n[5] === Symbol.for("react.memo_cache_sentinel") ? (C = /* @__PURE__ */ new Map(), n[5] = C) : C = n[5];
|
|
4187
|
+
let w = Y(C), T;
|
|
4188
|
+
n[6] === Symbol.for("react.memo_cache_sentinel") ? (T = /* @__PURE__ */ new Set(), n[6] = T) : T = n[6];
|
|
4189
|
+
let E = Y(T), D;
|
|
4190
|
+
n[7] === Symbol.for("react.memo_cache_sentinel") ? (D = /* @__PURE__ */ new Set(), n[7] = D) : D = n[7];
|
|
4191
|
+
let O = Y(D), ee = Y(!0), k = Y(0), A;
|
|
4192
|
+
n[8] === Symbol.for("react.memo_cache_sentinel") ? (A = [], n[8] = A) : A = n[8];
|
|
4193
|
+
let j = Y(A), M;
|
|
4194
4194
|
n[9] !== t || n[10] !== e ? (M = (n, r) => {
|
|
4195
|
-
|
|
4196
|
-
let i =
|
|
4195
|
+
E.current.add(n), O.current.add(n);
|
|
4196
|
+
let i = be.listEntries({
|
|
4197
4197
|
environmentId: e,
|
|
4198
4198
|
input: {
|
|
4199
4199
|
cwd: t,
|
|
4200
4200
|
directoryPath: n
|
|
4201
4201
|
}
|
|
4202
|
-
}), c =
|
|
4203
|
-
c && await c,
|
|
4204
|
-
let e =
|
|
4202
|
+
}), c = S.current.get(n), l = (async () => {
|
|
4203
|
+
c && await c, k.current >= 4 ? await new Promise((e) => j.current.push(e)) : k.current += 1;
|
|
4204
|
+
let e = ee.current ? await F(re, i, {
|
|
4205
4205
|
refresh: !0,
|
|
4206
4206
|
reportFailure: !1,
|
|
4207
4207
|
reportDefect: !1
|
|
4208
4208
|
}) : void 0, t = j.current.shift();
|
|
4209
|
-
return t ? t() : --
|
|
4209
|
+
return t ? t() : --k.current, e;
|
|
4210
4210
|
})().then((e) => {
|
|
4211
|
-
if (
|
|
4211
|
+
if (ee.current && e && b.current.get(n) === l) {
|
|
4212
4212
|
if (e._tag === "Success") {
|
|
4213
|
-
let t = e.value.entries.filter((e) => e.path.slice(0, Math.max(0, e.path.lastIndexOf("/"))) === n), r = new Map(
|
|
4213
|
+
let t = e.value.entries.filter((e) => e.path.slice(0, Math.max(0, e.path.lastIndexOf("/"))) === n), r = new Map(_.current).set(n, t), i = new Set(t.filter(eo).map($a)), a = n === "" ? "" : `${n}/`, o = [...O.current].filter((e) => {
|
|
4214
4214
|
if (e === n || !e.startsWith(a)) return !1;
|
|
4215
4215
|
let t = e.indexOf("/", a.length);
|
|
4216
4216
|
return !i.has(t === -1 ? e : e.slice(0, t));
|
|
4217
4217
|
});
|
|
4218
4218
|
for (let e of o) {
|
|
4219
|
-
r.delete(e),
|
|
4220
|
-
let t =
|
|
4221
|
-
t &&
|
|
4219
|
+
r.delete(e), E.current.delete(e), O.current.delete(e);
|
|
4220
|
+
let t = b.current.get(e);
|
|
4221
|
+
t && S.current.set(e, t), b.current.delete(e), w.current.delete(e);
|
|
4222
4222
|
}
|
|
4223
|
-
|
|
4223
|
+
_.current = r, s(r), o.length > 0 && m((e) => {
|
|
4224
4224
|
let t = new Set(e);
|
|
4225
4225
|
for (let e of o) t.delete(e);
|
|
4226
4226
|
return t;
|
|
@@ -4230,80 +4230,80 @@ function Ja(e, t) {
|
|
|
4230
4230
|
return t;
|
|
4231
4231
|
});
|
|
4232
4232
|
} else {
|
|
4233
|
-
|
|
4234
|
-
let t =
|
|
4235
|
-
u((e) => new Map(e).set(n,
|
|
4233
|
+
E.current.delete(n);
|
|
4234
|
+
let t = ue(e.cause);
|
|
4235
|
+
u((e) => new Map(e).set(n, ve(t, o) ?? o(a("Unable to load folder."))));
|
|
4236
4236
|
}
|
|
4237
4237
|
}
|
|
4238
4238
|
}).finally(() => {
|
|
4239
|
-
|
|
4240
|
-
let e =
|
|
4241
|
-
e &&
|
|
4239
|
+
S.current.get(n) === l && S.current.delete(n);
|
|
4240
|
+
let e = b.current.get(n) === l;
|
|
4241
|
+
e && b.current.delete(n), ee.current && (f(Qa), !r && e && m((e) => {
|
|
4242
4242
|
let t = new Set(e);
|
|
4243
4243
|
return t.delete(n), t;
|
|
4244
4244
|
}));
|
|
4245
4245
|
});
|
|
4246
|
-
return
|
|
4246
|
+
return b.current.set(n, l), l;
|
|
4247
4247
|
}, n[9] = t, n[10] = e, n[11] = M) : M = n[11];
|
|
4248
|
-
let N = M,
|
|
4249
|
-
n[12] === N ?
|
|
4250
|
-
let r = n !== void 0 && n, i =
|
|
4248
|
+
let N = M, te;
|
|
4249
|
+
n[12] === N ? te = n[13] : (te = function e(t, n) {
|
|
4250
|
+
let r = n !== void 0 && n, i = b.current.get(t);
|
|
4251
4251
|
if (i) {
|
|
4252
4252
|
if (!r) return i;
|
|
4253
|
-
let n =
|
|
4253
|
+
let n = w.current.get(t);
|
|
4254
4254
|
return n || (n = i.then(() => {
|
|
4255
|
-
if (
|
|
4256
|
-
}),
|
|
4255
|
+
if (w.current.get(t) === n && (w.current.delete(t), ee.current && O.current.has(t))) return e(t, !0);
|
|
4256
|
+
}), w.current.set(t, n)), n;
|
|
4257
4257
|
}
|
|
4258
|
-
return !r &&
|
|
4259
|
-
}, n[12] = N, n[13] =
|
|
4260
|
-
let
|
|
4261
|
-
n[14] === N ? (
|
|
4262
|
-
|
|
4263
|
-
}),
|
|
4264
|
-
let
|
|
4265
|
-
n[17] === e ?
|
|
4266
|
-
let
|
|
4267
|
-
|
|
4268
|
-
let
|
|
4269
|
-
n[19] !== l || n[20] !==
|
|
4270
|
-
for (let e of l.keys())
|
|
4271
|
-
}, n[19] = l, n[20] =
|
|
4272
|
-
let
|
|
4258
|
+
return !r && E.current.has(t) ? Promise.resolve() : (f(Za), r || m((e) => new Set(e).add(t)), N(t, r));
|
|
4259
|
+
}, n[12] = N, n[13] = te);
|
|
4260
|
+
let P = te, ne, ie;
|
|
4261
|
+
n[14] === N ? (ne = n[15], ie = n[16]) : (ne = () => (ee.current = !0, !b.current.has("") && !E.current.has("") && N("", !1), () => {
|
|
4262
|
+
ee.current = !1;
|
|
4263
|
+
}), ie = [N], n[14] = N, n[15] = ne, n[16] = ie), Ir(ne, ie);
|
|
4264
|
+
let ae;
|
|
4265
|
+
n[17] === e ? ae = n[18] : (ae = fe.sessionGenerationAtom(e), n[17] = e, n[18] = ae);
|
|
4266
|
+
let oe = ae;
|
|
4267
|
+
v(oe);
|
|
4268
|
+
let I;
|
|
4269
|
+
n[19] !== l || n[20] !== P ? (I = () => {
|
|
4270
|
+
for (let e of l.keys()) P(e);
|
|
4271
|
+
}, n[19] = l, n[20] = P, n[21] = I) : I = n[21], g(oe, I);
|
|
4272
|
+
let se;
|
|
4273
4273
|
if (n[22] !== i) {
|
|
4274
|
-
|
|
4274
|
+
se = [];
|
|
4275
4275
|
let e = (t) => {
|
|
4276
|
-
for (let n of i.get(t) ?? [])
|
|
4276
|
+
for (let n of i.get(t) ?? []) se.push(n), n.kind === "directory" && e(n.path);
|
|
4277
4277
|
};
|
|
4278
|
-
e(""), n[22] = i, n[23] =
|
|
4279
|
-
} else
|
|
4280
|
-
let
|
|
4281
|
-
n[24] ===
|
|
4282
|
-
let
|
|
4283
|
-
n[26] !==
|
|
4284
|
-
let e = [...O.current].filter((e) =>
|
|
4278
|
+
e(""), n[22] = i, n[23] = se;
|
|
4279
|
+
} else se = n[23];
|
|
4280
|
+
let L;
|
|
4281
|
+
n[24] === se ? L = n[25] : (L = /* @__PURE__ */ new Set(["", ...se.filter(Xa).map(Ya)]), n[24] = se, n[25] = L);
|
|
4282
|
+
let ce = L, le;
|
|
4283
|
+
n[26] !== P || n[27] !== ce ? (le = () => {
|
|
4284
|
+
let e = [...O.current].filter((e) => ce.has(e));
|
|
4285
4285
|
for (let t of e) {
|
|
4286
|
-
if (!
|
|
4287
|
-
|
|
4286
|
+
if (!ee.current) break;
|
|
4287
|
+
P(t, !0);
|
|
4288
4288
|
}
|
|
4289
|
-
}, n[26] =
|
|
4290
|
-
let
|
|
4291
|
-
n[29] === i ?
|
|
4292
|
-
let pe;
|
|
4293
|
-
n[31] !== l || n[32] !== se ? (pe = [...l].find((e) => {
|
|
4294
|
-
let [t] = e;
|
|
4295
|
-
return se.has(t);
|
|
4296
|
-
})?.[1] ?? null, n[31] = l, n[32] = se, n[33] = pe) : pe = n[33];
|
|
4289
|
+
}, n[26] = P, n[27] = ce, n[28] = le) : le = n[28];
|
|
4290
|
+
let de = le, R = d > 0, pe;
|
|
4291
|
+
n[29] === i ? pe = n[30] : (pe = i.has(""), n[29] = i, n[30] = pe);
|
|
4297
4292
|
let me;
|
|
4298
|
-
|
|
4299
|
-
|
|
4300
|
-
|
|
4301
|
-
|
|
4302
|
-
|
|
4293
|
+
n[31] !== l || n[32] !== ce ? (me = [...l].find((e) => {
|
|
4294
|
+
let [t] = e;
|
|
4295
|
+
return ce.has(t);
|
|
4296
|
+
})?.[1] ?? null, n[31] = l, n[32] = ce, n[33] = me) : me = n[33];
|
|
4297
|
+
let he;
|
|
4298
|
+
return n[34] !== se || n[35] !== P || n[36] !== p || n[37] !== de || n[38] !== R || n[39] !== pe || n[40] !== me ? (he = {
|
|
4299
|
+
entries: se,
|
|
4300
|
+
load: P,
|
|
4301
|
+
refresh: de,
|
|
4302
|
+
isPending: R,
|
|
4303
4303
|
loadingDirectories: p,
|
|
4304
|
-
ready:
|
|
4305
|
-
error:
|
|
4306
|
-
}, n[34] =
|
|
4304
|
+
ready: pe,
|
|
4305
|
+
error: me
|
|
4306
|
+
}, n[34] = se, n[35] = P, n[36] = p, n[37] = de, n[38] = R, n[39] = pe, n[40] = me, n[41] = he) : he = n[41], he;
|
|
4307
4307
|
}
|
|
4308
4308
|
function Ya(e) {
|
|
4309
4309
|
return e.path;
|
|
@@ -4331,7 +4331,7 @@ function no(e) {
|
|
|
4331
4331
|
return e.kind === "directory" ? `${e.path}/` : e.path;
|
|
4332
4332
|
}
|
|
4333
4333
|
function ro(e) {
|
|
4334
|
-
let t = Z(18), n =
|
|
4334
|
+
let t = Z(18), n = u(), r;
|
|
4335
4335
|
t[0] === n ? r = t[1] : (r = n("Refresh workspace files"), t[0] = n, t[1] = r);
|
|
4336
4336
|
let i;
|
|
4337
4337
|
t[2] !== e.onRefresh || t[3] !== r ? (i = /* @__PURE__ */ Q(N, {
|
|
@@ -4342,9 +4342,9 @@ function ro(e) {
|
|
|
4342
4342
|
onClick: e.onRefresh
|
|
4343
4343
|
}), t[2] = e.onRefresh, t[3] = r, t[4] = i) : i = t[4];
|
|
4344
4344
|
let a;
|
|
4345
|
-
t[5] === e.isPending ? a = t[6] : (a = /* @__PURE__ */ Q(
|
|
4345
|
+
t[5] === e.isPending ? a = t[6] : (a = /* @__PURE__ */ Q(_n, { refreshing: e.isPending }), t[5] = e.isPending, t[6] = a);
|
|
4346
4346
|
let o;
|
|
4347
|
-
t[7] !== i || t[8] !== a ? (o = /* @__PURE__ */ Q(
|
|
4347
|
+
t[7] !== i || t[8] !== a ? (o = /* @__PURE__ */ Q(L, {
|
|
4348
4348
|
render: i,
|
|
4349
4349
|
children: a
|
|
4350
4350
|
}), t[7] = i, t[8] = a, t[9] = o) : o = t[9];
|
|
@@ -4353,22 +4353,22 @@ function ro(e) {
|
|
|
4353
4353
|
let c;
|
|
4354
4354
|
t[13] === s ? c = t[14] : (c = /* @__PURE__ */ Q(P, { children: s }), t[13] = s, t[14] = c);
|
|
4355
4355
|
let l;
|
|
4356
|
-
return t[15] !== o || t[16] !== c ? (l = /* @__PURE__ */ $(
|
|
4356
|
+
return t[15] !== o || t[16] !== c ? (l = /* @__PURE__ */ $(ne, { children: [o, c] }), t[15] = o, t[16] = c, t[17] = l) : l = t[17], l;
|
|
4357
4357
|
}
|
|
4358
4358
|
function io(e) {
|
|
4359
4359
|
let t = Z(16), n, r;
|
|
4360
4360
|
t[0] === e ? (n = t[1], r = t[2]) : ({ref: r, ...n} = e, t[0] = e, t[1] = n, t[2] = r);
|
|
4361
|
-
let i =
|
|
4361
|
+
let i = u(), a = n.name, o = n.value, s = n.ariaLabel, c;
|
|
4362
4362
|
t[3] === i ? c = t[4] : (c = i("Search files"), t[3] = i, t[4] = c);
|
|
4363
|
-
let l,
|
|
4364
|
-
t[5] === n ? (l = t[6],
|
|
4363
|
+
let l, d;
|
|
4364
|
+
t[5] === n ? (l = t[6], d = t[7]) : (l = (e) => n.onValueChange(e.target.value), d = (e) => {
|
|
4365
4365
|
e.key === "Escape" && (n.onClose(), e.currentTarget.blur());
|
|
4366
|
-
}, t[5] = n, t[6] = l, t[7] =
|
|
4367
|
-
let
|
|
4368
|
-
return t[8] !== n.ariaLabel || t[9] !== n.name || t[10] !== n.value || t[11] !== r || t[12] !== c || t[13] !== l || t[14] !==
|
|
4366
|
+
}, t[5] = n, t[6] = l, t[7] = d);
|
|
4367
|
+
let f;
|
|
4368
|
+
return t[8] !== n.ariaLabel || t[9] !== n.name || t[10] !== n.value || t[11] !== r || t[12] !== c || t[13] !== l || t[14] !== d ? (f = /* @__PURE__ */ Q(bn, {
|
|
4369
4369
|
variant: "ghost",
|
|
4370
4370
|
className: "h-7 min-w-0 flex-1",
|
|
4371
|
-
children: /* @__PURE__ */ Q(
|
|
4371
|
+
children: /* @__PURE__ */ Q(yn, {
|
|
4372
4372
|
ref: r,
|
|
4373
4373
|
type: "search",
|
|
4374
4374
|
name: a,
|
|
@@ -4379,9 +4379,9 @@ function io(e) {
|
|
|
4379
4379
|
"data-workspace-focus-default": !0,
|
|
4380
4380
|
spellCheck: !1,
|
|
4381
4381
|
onChange: l,
|
|
4382
|
-
onKeyDown:
|
|
4382
|
+
onKeyDown: d
|
|
4383
4383
|
})
|
|
4384
|
-
}), t[8] = n.ariaLabel, t[9] = n.name, t[10] = n.value, t[11] = r, t[12] = c, t[13] = l, t[14] =
|
|
4384
|
+
}), t[8] = n.ariaLabel, t[9] = n.name, t[10] = n.value, t[11] = r, t[12] = c, t[13] = l, t[14] = d, t[15] = f) : f = t[15], f;
|
|
4385
4385
|
}
|
|
4386
4386
|
function ao(e, t, n, r) {
|
|
4387
4387
|
let i = new Map(e.map((e) => [e.path, e]));
|
|
@@ -4406,26 +4406,26 @@ function ao(e, t, n, r) {
|
|
|
4406
4406
|
};
|
|
4407
4407
|
}
|
|
4408
4408
|
function oo(e) {
|
|
4409
|
-
let t = Z(177), { environmentId: n, cwd: r, projectName: i, selectedPath: a, selectedPathRevealId: s, onOpenFile: c, onRefreshSelectedFile: l, workspaceMutationId:
|
|
4410
|
-
t[0] !== r || t[1] !==
|
|
4411
|
-
let
|
|
4412
|
-
t[3] ===
|
|
4413
|
-
let
|
|
4414
|
-
t[5] !== n || t[6] !==
|
|
4409
|
+
let t = Z(177), { environmentId: n, cwd: r, projectName: i, selectedPath: a, selectedPathRevealId: s, onOpenFile: c, onRefreshSelectedFile: l, workspaceMutationId: d, hostFolder: f, answersPanelFind: p } = e, m = f !== void 0 && f, h = p !== void 0 && p, g;
|
|
4410
|
+
t[0] !== r || t[1] !== m ? (g = (e) => m ? Fa(r, e) : e, t[0] = r, t[1] = m, t[2] = g) : g = t[2];
|
|
4411
|
+
let _ = g, v = u(), y = ee(), { resolvedTheme: b } = Ye(), x = it(), S = gn(n), { entries: C, load: w, refresh: T, ready: E, error: D, isPending: O, loadingDirectories: A } = Ja(n, r), [M, te] = X(""), [F, re] = X(!1), ie = m ? null : r, ae;
|
|
4412
|
+
t[3] === M ? ae = t[4] : (ae = M.slice(0, 256), t[3] = M, t[4] = ae);
|
|
4413
|
+
let oe;
|
|
4414
|
+
t[5] !== n || t[6] !== ie || t[7] !== ae ? (oe = {
|
|
4415
4415
|
environmentId: n,
|
|
4416
|
-
cwd:
|
|
4417
|
-
query:
|
|
4418
|
-
}, t[5] = n, t[6] =
|
|
4419
|
-
let I =
|
|
4420
|
-
t[9] !==
|
|
4421
|
-
let { entries:
|
|
4422
|
-
t[14] !==
|
|
4423
|
-
let i =
|
|
4416
|
+
cwd: ie,
|
|
4417
|
+
query: ae
|
|
4418
|
+
}, t[5] = n, t[6] = ie, t[7] = ae, t[8] = oe) : oe = t[8];
|
|
4419
|
+
let I = qt(oe, 200, void 0, y), se;
|
|
4420
|
+
t[9] !== C || t[10] !== I.entries || t[11] !== I.isPending || t[12] !== M ? (se = ao(C, I.entries, I.isPending, M), t[9] = C, t[10] = I.entries, t[11] = I.isPending, t[12] = M, t[13] = se) : se = t[13];
|
|
4421
|
+
let { entries: ce, entryKinds: ue, treePaths: de, directoryPaths: R, expandableDirectoryPaths: fe } = se, pe = Y(ue), me = Y(null), he = Y(!1), ge = Y(null), _e = Y(null), ye = Y(null), be;
|
|
4422
|
+
t[14] !== x || t[15] !== r || t[16] !== n || t[17] !== S || t[18] !== v || t[19] !== _ ? (be = (e, t) => {
|
|
4423
|
+
let i = Ue();
|
|
4424
4424
|
if (!i) {
|
|
4425
4425
|
t.close();
|
|
4426
4426
|
return;
|
|
4427
4427
|
}
|
|
4428
|
-
let a = e.path.replace(/\/$/, ""), s =
|
|
4428
|
+
let a = e.path.replace(/\/$/, ""), s = tt(_(a)), c = ye.current, l = c !== null && performance.now() - c.at < 1e3, u = t.anchorElement.getBoundingClientRect(), d = l ? {
|
|
4429
4429
|
x: c.x,
|
|
4430
4430
|
y: c.y
|
|
4431
4431
|
} : {
|
|
@@ -4435,350 +4435,350 @@ function oo(e) {
|
|
|
4435
4435
|
environmentId: n,
|
|
4436
4436
|
filePath: a,
|
|
4437
4437
|
workspaceRoot: r
|
|
4438
|
-
}, p =
|
|
4439
|
-
t.close({ restoreFocus: !l }),
|
|
4438
|
+
}, p = S.buildItems(f);
|
|
4439
|
+
t.close({ restoreFocus: !l }), k(async () => {
|
|
4440
4440
|
let e = await i.contextMenu.show([
|
|
4441
4441
|
...p,
|
|
4442
4442
|
{
|
|
4443
4443
|
id: "copy-mention",
|
|
4444
|
-
label:
|
|
4444
|
+
label: v("Copy mention")
|
|
4445
4445
|
},
|
|
4446
4446
|
{
|
|
4447
4447
|
id: "add-to-chat",
|
|
4448
|
-
label:
|
|
4448
|
+
label: v("Add to chat")
|
|
4449
4449
|
}
|
|
4450
4450
|
], d);
|
|
4451
4451
|
if (e !== null) {
|
|
4452
|
-
if (p.some((t) => t.id === e) || e.startsWith("editor:")) await
|
|
4452
|
+
if (p.some((t) => t.id === e) || e.startsWith("editor:")) await S.activate(e, f);
|
|
4453
4453
|
else if (e === "copy-mention") try {
|
|
4454
|
-
await
|
|
4454
|
+
await Ve(s);
|
|
4455
4455
|
} catch (e) {
|
|
4456
4456
|
let t = e;
|
|
4457
|
-
|
|
4457
|
+
Ge.add({
|
|
4458
4458
|
type: "error",
|
|
4459
|
-
title:
|
|
4460
|
-
description:
|
|
4459
|
+
title: v("Failed to copy mention"),
|
|
4460
|
+
description: ve(t, o) ?? v("An error occurred.")
|
|
4461
4461
|
});
|
|
4462
4462
|
}
|
|
4463
4463
|
else if (e === "add-to-chat") {
|
|
4464
|
-
let e =
|
|
4464
|
+
let e = x?.current;
|
|
4465
4465
|
if (!e) {
|
|
4466
|
-
|
|
4466
|
+
Ge.add({
|
|
4467
4467
|
type: "error",
|
|
4468
|
-
title:
|
|
4469
|
-
description:
|
|
4468
|
+
title: v("Unable to add to chat"),
|
|
4469
|
+
description: v("Open a chat for this project and try again.")
|
|
4470
4470
|
});
|
|
4471
4471
|
return;
|
|
4472
4472
|
}
|
|
4473
|
-
e.insertTextAtEnd(`${s} `, { ensureLeadingBoundary: !0 }) ||
|
|
4473
|
+
e.insertTextAtEnd(`${s} `, { ensureLeadingBoundary: !0 }) || Ge.add({
|
|
4474
4474
|
type: "error",
|
|
4475
|
-
title:
|
|
4476
|
-
description:
|
|
4475
|
+
title: v("Unable to add to chat"),
|
|
4476
|
+
description: v("The chat isn't ready to accept input right now.")
|
|
4477
4477
|
});
|
|
4478
4478
|
}
|
|
4479
4479
|
}
|
|
4480
4480
|
}).then(uo);
|
|
4481
|
-
}, t[14] =
|
|
4482
|
-
let
|
|
4483
|
-
t[21] !== r || t[22] !==
|
|
4484
|
-
let
|
|
4485
|
-
t[24] ===
|
|
4481
|
+
}, t[14] = x, t[15] = r, t[16] = n, t[17] = S, t[18] = v, t[19] = _, t[20] = be) : be = t[20];
|
|
4482
|
+
let xe = Ke(be), Se = Y(A), Ce;
|
|
4483
|
+
t[21] !== r || t[22] !== m ? (Ce = za(m ? { mentionPath: (e) => Fa(r, e) } : {}), t[21] = r, t[22] = m, t[23] = Ce) : Ce = t[23];
|
|
4484
|
+
let we = Ce, Ee;
|
|
4485
|
+
t[24] === xe ? Ee = t[25] : (Ee = { contextMenu: {
|
|
4486
4486
|
triggerMode: "right-click",
|
|
4487
4487
|
onOpen: (e, t) => {
|
|
4488
|
-
|
|
4488
|
+
xe(e, t);
|
|
4489
4489
|
}
|
|
4490
|
-
} }, t[24] =
|
|
4491
|
-
let De;
|
|
4492
|
-
t[26] === Symbol.for("react.memo_cache_sentinel") ? (De = { canDrop: lo }, t[26] = De) : De = t[26];
|
|
4490
|
+
} }, t[24] = xe, t[25] = Ee);
|
|
4493
4491
|
let Oe;
|
|
4494
|
-
t[
|
|
4495
|
-
if (Ce.handleSelectionChange(e), me.current || Ce.isDragInProgress()) return;
|
|
4496
|
-
let t = e.at(-1)?.replace(/\/$/, "");
|
|
4497
|
-
t && fe.current.get(t) === "file" && (he.current = t, c(g(t)));
|
|
4498
|
-
}, t[27] = Ce, t[28] = c, t[29] = g, t[30] = Oe) : Oe = t[30];
|
|
4492
|
+
t[26] === Symbol.for("react.memo_cache_sentinel") ? (Oe = { canDrop: lo }, t[26] = Oe) : Oe = t[26];
|
|
4499
4493
|
let ke;
|
|
4500
|
-
t[
|
|
4494
|
+
t[27] !== we || t[28] !== c || t[29] !== _ ? (ke = (e) => {
|
|
4495
|
+
if (we.handleSelectionChange(e), he.current || we.isDragInProgress()) return;
|
|
4496
|
+
let t = e.at(-1)?.replace(/\/$/, "");
|
|
4497
|
+
t && pe.current.get(t) === "file" && (ge.current = t, c(_(t)));
|
|
4498
|
+
}, t[27] = we, t[28] = c, t[29] = _, t[30] = ke) : ke = t[30];
|
|
4501
4499
|
let Ae;
|
|
4502
|
-
t[
|
|
4500
|
+
t[31] === Symbol.for("react.memo_cache_sentinel") ? (Ae = [], t[31] = Ae) : Ae = t[31];
|
|
4501
|
+
let je;
|
|
4502
|
+
t[32] === v ? je = t[33] : (je = (e) => {
|
|
4503
4503
|
let { item: t, row: n } = e;
|
|
4504
|
-
return n.kind === "directory" && n.isExpanded &&
|
|
4504
|
+
return n.kind === "directory" && n.isExpanded && Se.current.has(t.path.replace(/\/$/, "")) ? {
|
|
4505
4505
|
icon: "hanzo-tree-icon-loading",
|
|
4506
|
-
title:
|
|
4506
|
+
title: v("Loading…")
|
|
4507
4507
|
} : null;
|
|
4508
|
-
}, t[32] =
|
|
4509
|
-
let je;
|
|
4510
|
-
t[34] === Symbol.for("react.memo_cache_sentinel") ? (je = (e) => ee(e ?? ""), t[34] = je) : je = t[34];
|
|
4508
|
+
}, t[32] = v, t[33] = je);
|
|
4511
4509
|
let Me;
|
|
4512
|
-
t[
|
|
4513
|
-
|
|
4514
|
-
|
|
4510
|
+
t[34] === Symbol.for("react.memo_cache_sentinel") ? (Me = (e) => te(e ?? ""), t[34] = Me) : Me = t[34];
|
|
4511
|
+
let Ne;
|
|
4512
|
+
t[35] !== Ee || t[36] !== ke || t[37] !== je ? (Ne = {
|
|
4513
|
+
composition: Ee,
|
|
4514
|
+
dragAndDrop: Oe,
|
|
4515
4515
|
density: "compact",
|
|
4516
4516
|
fileTreeSearchMode: "hide-non-matches",
|
|
4517
4517
|
flattenEmptyDirectories: !0,
|
|
4518
4518
|
initialExpansion: "closed",
|
|
4519
|
-
icons:
|
|
4520
|
-
onSelectionChange:
|
|
4521
|
-
paths:
|
|
4522
|
-
renderRowDecoration:
|
|
4519
|
+
icons: Ct,
|
|
4520
|
+
onSelectionChange: ke,
|
|
4521
|
+
paths: Ae,
|
|
4522
|
+
renderRowDecoration: je,
|
|
4523
4523
|
search: !1,
|
|
4524
|
-
onSearchChange:
|
|
4525
|
-
unsafeCSS:
|
|
4526
|
-
}, t[35] =
|
|
4527
|
-
let { model:
|
|
4528
|
-
t[39] !==
|
|
4529
|
-
|
|
4530
|
-
},
|
|
4531
|
-
let
|
|
4532
|
-
t[43] !==
|
|
4533
|
-
let
|
|
4534
|
-
t[46] ===
|
|
4535
|
-
let
|
|
4536
|
-
t[48] !==
|
|
4537
|
-
let e = !(
|
|
4538
|
-
|
|
4539
|
-
}, t[48] =
|
|
4540
|
-
let
|
|
4541
|
-
t[54] ===
|
|
4542
|
-
|
|
4543
|
-
}, t[54] =
|
|
4544
|
-
let
|
|
4545
|
-
t[56] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
4546
|
-
|
|
4547
|
-
}, t[56] =
|
|
4548
|
-
let
|
|
4549
|
-
t[57] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
4550
|
-
e === "find" &&
|
|
4551
|
-
}, t[57] =
|
|
4552
|
-
let
|
|
4553
|
-
t[58] !==
|
|
4554
|
-
if (
|
|
4555
|
-
}, t[58] =
|
|
4556
|
-
let tt;
|
|
4557
|
-
t[61] === m ? tt = t[62] : (tt = [m], t[61] = m, t[62] = tt), Ir($e, tt);
|
|
4524
|
+
onSearchChange: Me,
|
|
4525
|
+
unsafeCSS: Sn
|
|
4526
|
+
}, t[35] = Ee, t[36] = ke, t[37] = je, t[38] = Ne) : Ne = t[38];
|
|
4527
|
+
let { model: z } = An(Ne), Pe, Fe;
|
|
4528
|
+
t[39] !== A || t[40] !== z ? (Pe = () => {
|
|
4529
|
+
Se.current !== A && (Se.current = A, z.setComposition(z.getComposition()));
|
|
4530
|
+
}, Fe = [A, z], t[39] = A, t[40] = z, t[41] = Pe, t[42] = Fe) : (Pe = t[41], Fe = t[42]), Ir(Pe, Fe);
|
|
4531
|
+
let B = Kr(z), Ie;
|
|
4532
|
+
t[43] !== B.matchingPaths || t[44] !== B.value ? (Ie = B.value.trim().length > 0 && B.matchingPaths.length === 0, t[43] = B.matchingPaths, t[44] = B.value, t[45] = Ie) : Ie = t[45];
|
|
4533
|
+
let Le = Ie, Re;
|
|
4534
|
+
t[46] === fe ? Re = t[47] : (Re = (e) => En(e, fe), t[46] = fe, t[47] = Re);
|
|
4535
|
+
let ze = Wr(z, Re), Be;
|
|
4536
|
+
t[48] !== ze || t[49] !== R || t[50] !== F || t[51] !== fe || t[52] !== z ? (Be = () => {
|
|
4537
|
+
let e = !(F || ze);
|
|
4538
|
+
re(e), xn(z, e ? fe : R, e);
|
|
4539
|
+
}, t[48] = ze, t[49] = R, t[50] = F, t[51] = fe, t[52] = z, t[53] = Be) : Be = t[53];
|
|
4540
|
+
let He = Be, We;
|
|
4541
|
+
t[54] === B ? We = t[55] : (We = () => {
|
|
4542
|
+
te(""), B.close();
|
|
4543
|
+
}, t[54] = B, t[55] = We);
|
|
4544
|
+
let qe = We, Je = Y(null), Xe;
|
|
4545
|
+
t[56] === Symbol.for("react.memo_cache_sentinel") ? (Xe = () => {
|
|
4546
|
+
Je.current?.focus(), Je.current?.select();
|
|
4547
|
+
}, t[56] = Xe) : Xe = t[56];
|
|
4548
|
+
let Ze = Xe, Qe;
|
|
4549
|
+
t[57] === Symbol.for("react.memo_cache_sentinel") ? (Qe = (e) => {
|
|
4550
|
+
e === "find" && Je.current?.getClientRects().length && Ze();
|
|
4551
|
+
}, t[57] = Qe) : Qe = t[57];
|
|
4552
|
+
let $e = Lr(Qe), et;
|
|
4553
|
+
t[58] !== h || t[59] !== $e ? (et = () => {
|
|
4554
|
+
if (h) return vn($e);
|
|
4555
|
+
}, t[58] = h, t[59] = $e, t[60] = et) : et = t[60];
|
|
4558
4556
|
let nt;
|
|
4559
|
-
t[
|
|
4560
|
-
let
|
|
4561
|
-
t[
|
|
4562
|
-
let
|
|
4563
|
-
t[
|
|
4564
|
-
|
|
4565
|
-
|
|
4566
|
-
let
|
|
4567
|
-
|
|
4557
|
+
t[61] === h ? nt = t[62] : (nt = [h], t[61] = h, t[62] = nt), Ir(et, nt);
|
|
4558
|
+
let rt;
|
|
4559
|
+
t[63] === Symbol.for("react.memo_cache_sentinel") ? (rt = /* @__PURE__ */ new Set(), t[63] = rt) : rt = t[63];
|
|
4560
|
+
let at = Y(rt), V = `${n}:${r}`, ot;
|
|
4561
|
+
t[64] === V ? ot = t[65] : (ot = () => new Set(wn(V)), t[64] = V, t[65] = ot);
|
|
4562
|
+
let [st] = X(ot), ct, lt;
|
|
4563
|
+
t[66] !== R || t[67] !== V || t[68] !== w || t[69] !== z || t[70] !== st ? (ct = () => {
|
|
4564
|
+
let e = new Set(R);
|
|
4565
|
+
for (let t of at.current) e.has(t) || at.current.delete(t);
|
|
4566
|
+
let t = Dn(() => {
|
|
4567
|
+
if (z.isSearchOpen()) return;
|
|
4568
4568
|
let e = !1;
|
|
4569
|
-
for (let t of
|
|
4570
|
-
let n =
|
|
4571
|
-
n?.isDirectory() &&
|
|
4569
|
+
for (let t of R) {
|
|
4570
|
+
let n = z.getItem(t);
|
|
4571
|
+
n?.isDirectory() && st.delete(t) && "expand" in n && n.expand(), n?.isDirectory() && "isExpanded" in n && n.isExpanded() ? at.current.has(t) || (at.current.add(t), e = !0, w(t.replace(/\/$/, ""))) : (n?.isDirectory() && at.current.has(t) && re(!1), at.current.delete(t) && (e = !0));
|
|
4572
4572
|
}
|
|
4573
|
-
e &&
|
|
4573
|
+
e && On(V, [...at.current, ...st]);
|
|
4574
4574
|
});
|
|
4575
|
-
return t(),
|
|
4576
|
-
},
|
|
4577
|
-
|
|
4578
|
-
|
|
4575
|
+
return t(), z.subscribe(t);
|
|
4576
|
+
}, lt = [
|
|
4577
|
+
R,
|
|
4578
|
+
V,
|
|
4579
4579
|
w,
|
|
4580
|
-
|
|
4581
|
-
|
|
4582
|
-
], t[66] =
|
|
4583
|
-
let
|
|
4584
|
-
t[73] !==
|
|
4585
|
-
|
|
4586
|
-
},
|
|
4587
|
-
let
|
|
4588
|
-
t[77] !== w || t[78] !== a ? (
|
|
4580
|
+
z,
|
|
4581
|
+
st
|
|
4582
|
+
], t[66] = R, t[67] = V, t[68] = w, t[69] = z, t[70] = st, t[71] = ct, t[72] = lt) : (ct = t[71], lt = t[72]), Ir(ct, lt);
|
|
4583
|
+
let H, ut;
|
|
4584
|
+
t[73] !== ce || t[74] !== z ? (H = () => {
|
|
4585
|
+
z.setGitStatus(ce.filter(co).map(so));
|
|
4586
|
+
}, ut = [ce, z], t[73] = ce, t[74] = z, t[75] = H, t[76] = ut) : (H = t[75], ut = t[76]), Ir(H, ut);
|
|
4587
|
+
let dt, ft;
|
|
4588
|
+
t[77] !== w || t[78] !== a ? (dt = () => {
|
|
4589
4589
|
if (!a) return;
|
|
4590
4590
|
let e = new AbortController();
|
|
4591
4591
|
return qa(a, w, { signal: e.signal }), () => {
|
|
4592
4592
|
e.abort();
|
|
4593
4593
|
};
|
|
4594
|
-
},
|
|
4595
|
-
let
|
|
4596
|
-
t[81] ===
|
|
4597
|
-
|
|
4598
|
-
}, t[81] =
|
|
4599
|
-
let
|
|
4600
|
-
t[83] !== l || t[84] !== I || t[85] !==
|
|
4601
|
-
T(),
|
|
4602
|
-
}, t[83] = l, t[84] = I, t[85] =
|
|
4603
|
-
let
|
|
4604
|
-
t[88] !== I || t[89] !==
|
|
4605
|
-
T(),
|
|
4606
|
-
}, t[88] = I, t[89] =
|
|
4607
|
-
let
|
|
4608
|
-
t[92] !==
|
|
4609
|
-
mutationId:
|
|
4610
|
-
refresh:
|
|
4611
|
-
resourceKey:
|
|
4612
|
-
}, t[92] =
|
|
4613
|
-
let
|
|
4614
|
-
t[96] !==
|
|
4615
|
-
if (!E ||
|
|
4616
|
-
|
|
4617
|
-
let e =
|
|
4618
|
-
if (
|
|
4619
|
-
|
|
4594
|
+
}, ft = [w, a], t[77] = w, t[78] = a, t[79] = dt, t[80] = ft) : (dt = t[79], ft = t[80]), Ir(dt, ft);
|
|
4595
|
+
let pt;
|
|
4596
|
+
t[81] === B ? pt = t[82] : (pt = (e) => {
|
|
4597
|
+
te(e), e.trim().length === 0 ? B.close() : B.setValue(e);
|
|
4598
|
+
}, t[81] = B, t[82] = pt);
|
|
4599
|
+
let mt = pt, ht;
|
|
4600
|
+
t[83] !== l || t[84] !== I || t[85] !== M || t[86] !== T ? (ht = () => {
|
|
4601
|
+
T(), M.trim() && I.refresh(), l?.();
|
|
4602
|
+
}, t[83] = l, t[84] = I, t[85] = M, t[86] = T, t[87] = ht) : ht = t[87];
|
|
4603
|
+
let _t = ht, vt;
|
|
4604
|
+
t[88] !== I || t[89] !== M || t[90] !== T ? (vt = () => {
|
|
4605
|
+
T(), M.trim() && I.refresh();
|
|
4606
|
+
}, t[88] = I, t[89] = M, t[90] = T, t[91] = vt) : vt = t[91];
|
|
4607
|
+
let yt = `files:${n}:${r}`, bt;
|
|
4608
|
+
t[92] !== vt || t[93] !== yt || t[94] !== d ? (bt = {
|
|
4609
|
+
mutationId: d,
|
|
4610
|
+
refresh: vt,
|
|
4611
|
+
resourceKey: yt
|
|
4612
|
+
}, t[92] = vt, t[93] = yt, t[94] = d, t[95] = bt) : bt = t[95], gt(bt);
|
|
4613
|
+
let xt, St;
|
|
4614
|
+
t[96] !== ue || t[97] !== z || t[98] !== E || t[99] !== de ? (xt = () => {
|
|
4615
|
+
if (!E || me.current === de) return;
|
|
4616
|
+
pe.current = ue;
|
|
4617
|
+
let e = me.current;
|
|
4618
|
+
if (me.current = de, e === null) {
|
|
4619
|
+
z.resetPaths(de);
|
|
4620
4620
|
return;
|
|
4621
4621
|
}
|
|
4622
|
-
let t = Ka(e,
|
|
4623
|
-
if (Ua(e,
|
|
4624
|
-
let e =
|
|
4625
|
-
e !== null &&
|
|
4626
|
-
} else t.length > 0 &&
|
|
4627
|
-
},
|
|
4622
|
+
let t = Ka(e, de);
|
|
4623
|
+
if (Ua(e, de, t)) {
|
|
4624
|
+
let e = z.isSearchOpen() ? z.getSearchValue() : null;
|
|
4625
|
+
e !== null && z.closeSearch(), z.resetPaths(de, { initialExpandedPaths: [...at.current] }), e !== null && z.setSearch(e);
|
|
4626
|
+
} else t.length > 0 && z.batch(t);
|
|
4627
|
+
}, St = [
|
|
4628
4628
|
E,
|
|
4629
|
-
|
|
4630
|
-
|
|
4631
|
-
|
|
4632
|
-
], t[96] =
|
|
4633
|
-
let
|
|
4634
|
-
t[102] !==
|
|
4635
|
-
|
|
4636
|
-
},
|
|
4637
|
-
|
|
4638
|
-
|
|
4639
|
-
|
|
4640
|
-
|
|
4641
|
-
], t[102] =
|
|
4642
|
-
let
|
|
4643
|
-
t[108] !==
|
|
4629
|
+
ue,
|
|
4630
|
+
z,
|
|
4631
|
+
de
|
|
4632
|
+
], t[96] = ue, t[97] = z, t[98] = E, t[99] = de, t[100] = xt, t[101] = St) : (xt = t[100], St = t[101]), Ir(xt, St);
|
|
4633
|
+
let wt, U;
|
|
4634
|
+
t[102] !== F || t[103] !== fe || t[104] !== z || t[105] !== M ? (wt = () => {
|
|
4635
|
+
F && !M.trim() && xn(z, fe, !0);
|
|
4636
|
+
}, U = [
|
|
4637
|
+
fe,
|
|
4638
|
+
F,
|
|
4639
|
+
z,
|
|
4640
|
+
M
|
|
4641
|
+
], t[102] = F, t[103] = fe, t[104] = z, t[105] = M, t[106] = wt, t[107] = U) : (wt = t[106], U = t[107]), Ir(wt, U);
|
|
4642
|
+
let Tt, Et;
|
|
4643
|
+
t[108] !== ue || t[109] !== z || t[110] !== a || t[111] !== s ? (Tt = () => {
|
|
4644
4644
|
if (!a) {
|
|
4645
|
-
|
|
4645
|
+
_e.current = null;
|
|
4646
4646
|
return;
|
|
4647
4647
|
}
|
|
4648
|
-
let e =
|
|
4648
|
+
let e = ue.get(a);
|
|
4649
4649
|
if (e === void 0) {
|
|
4650
|
-
|
|
4650
|
+
_e.current = null;
|
|
4651
4651
|
return;
|
|
4652
4652
|
}
|
|
4653
4653
|
let t = {
|
|
4654
4654
|
path: a,
|
|
4655
4655
|
revealId: s
|
|
4656
|
-
}, n =
|
|
4656
|
+
}, n = _e.current;
|
|
4657
4657
|
if (n?.path === t.path && n.revealId === t.revealId) return;
|
|
4658
|
-
let r = e === "directory" ? `${a}/` : a, i =
|
|
4658
|
+
let r = e === "directory" ? `${a}/` : a, i = z.getItem(r);
|
|
4659
4659
|
if (!i) return;
|
|
4660
|
-
if (
|
|
4661
|
-
|
|
4660
|
+
if (z.getSelectedPaths().some((e) => e.replace(/\/$/, "") === a) && ge.current === a) {
|
|
4661
|
+
ge.current = null, _e.current = t;
|
|
4662
4662
|
return;
|
|
4663
4663
|
}
|
|
4664
|
-
|
|
4665
|
-
for (let e of
|
|
4664
|
+
ge.current = null, _e.current = t, he.current = !0, te(""), z.closeSearch();
|
|
4665
|
+
for (let e of z.getSelectedPaths()) z.getItem(e)?.deselect();
|
|
4666
4666
|
let o = a.split("/"), c = "";
|
|
4667
4667
|
for (let e of o.slice(0, -1)) {
|
|
4668
4668
|
c = c ? `${c}/${e}` : e;
|
|
4669
|
-
let t =
|
|
4669
|
+
let t = z.getItem(`${c}/`) ?? z.getItem(c);
|
|
4670
4670
|
t && "expand" in t && t.expand();
|
|
4671
4671
|
}
|
|
4672
|
-
"expand" in i && i.expand(), i.select(),
|
|
4672
|
+
"expand" in i && i.expand(), i.select(), z.scrollToPath(r, {
|
|
4673
4673
|
focus: !0,
|
|
4674
4674
|
offset: "center"
|
|
4675
4675
|
}), queueMicrotask(() => {
|
|
4676
|
-
|
|
4676
|
+
he.current = !1;
|
|
4677
4677
|
});
|
|
4678
|
-
},
|
|
4679
|
-
|
|
4680
|
-
|
|
4678
|
+
}, Et = [
|
|
4679
|
+
ue,
|
|
4680
|
+
z,
|
|
4681
4681
|
a,
|
|
4682
4682
|
s
|
|
4683
|
-
], t[108] =
|
|
4684
|
-
let
|
|
4685
|
-
t[114] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
4686
|
-
|
|
4683
|
+
], t[108] = ue, t[109] = z, t[110] = a, t[111] = s, t[112] = Tt, t[113] = Et) : (Tt = t[112], Et = t[113]), Ir(Tt, Et);
|
|
4684
|
+
let Dt = `${n}:${r}`, W;
|
|
4685
|
+
t[114] === Symbol.for("react.memo_cache_sentinel") ? (W = (e) => {
|
|
4686
|
+
ye.current = {
|
|
4687
4687
|
x: e.clientX,
|
|
4688
4688
|
y: e.clientY,
|
|
4689
4689
|
at: e.timeStamp
|
|
4690
4690
|
};
|
|
4691
|
-
}, t[114] =
|
|
4692
|
-
let Dt;
|
|
4693
|
-
t[115] === Ce ? Dt = t[116] : (Dt = (e) => Ce.handleDragStart(e.nativeEvent), t[115] = Ce, t[116] = Dt);
|
|
4691
|
+
}, t[114] = W) : W = t[114];
|
|
4694
4692
|
let Ot;
|
|
4695
|
-
t[
|
|
4693
|
+
t[115] === we ? Ot = t[116] : (Ot = (e) => we.handleDragStart(e.nativeEvent), t[115] = we, t[116] = Ot);
|
|
4696
4694
|
let kt;
|
|
4697
|
-
t[
|
|
4698
|
-
!(ce(navigator.platform) ? e.metaKey : e.ctrlKey) || e.altKey || e.shiftKey || e.key.toLowerCase() !== "f" || (e.preventDefault(), Xe());
|
|
4699
|
-
}, t[120] = kt) : kt = t[120];
|
|
4695
|
+
t[117] !== we || t[118] !== z ? (kt = () => we.handleDragEnd((e) => z.getItem(e)?.deselect()), t[117] = we, t[118] = z, t[119] = kt) : kt = t[119];
|
|
4700
4696
|
let At;
|
|
4701
|
-
t[
|
|
4702
|
-
|
|
4703
|
-
|
|
4704
|
-
}), t[121] = gt, t[122] = O, t[123] = At) : At = t[123];
|
|
4697
|
+
t[120] === Symbol.for("react.memo_cache_sentinel") ? (At = (e) => {
|
|
4698
|
+
!(le(navigator.platform) ? e.metaKey : e.ctrlKey) || e.altKey || e.shiftKey || e.key.toLowerCase() !== "f" || (e.preventDefault(), Ze());
|
|
4699
|
+
}, t[120] = At) : At = t[120];
|
|
4705
4700
|
let jt;
|
|
4706
|
-
t[
|
|
4701
|
+
t[121] !== _t || t[122] !== O ? (jt = /* @__PURE__ */ Q(ro, {
|
|
4702
|
+
isPending: O,
|
|
4703
|
+
onRefresh: _t
|
|
4704
|
+
}), t[121] = _t, t[122] = O, t[123] = jt) : jt = t[123];
|
|
4707
4705
|
let Mt;
|
|
4708
|
-
t[
|
|
4709
|
-
ref: qe,
|
|
4710
|
-
name: "project-files-search",
|
|
4711
|
-
ariaLabel: jt,
|
|
4712
|
-
value: V.value,
|
|
4713
|
-
onValueChange: pt,
|
|
4714
|
-
onClose: Ke
|
|
4715
|
-
}), t[127] = Ke, t[128] = pt, t[129] = V.value, t[130] = jt, t[131] = Mt) : Mt = t[131];
|
|
4706
|
+
t[124] !== v || t[125] !== i ? (Mt = v("Search {projectName} files", { projectName: i }), t[124] = v, t[125] = i, t[126] = Mt) : Mt = t[126];
|
|
4716
4707
|
let Nt;
|
|
4717
|
-
t[
|
|
4708
|
+
t[127] !== qe || t[128] !== mt || t[129] !== B.value || t[130] !== Mt ? (Nt = /* @__PURE__ */ Q(io, {
|
|
4709
|
+
ref: Je,
|
|
4710
|
+
name: "project-files-search",
|
|
4711
|
+
ariaLabel: Mt,
|
|
4712
|
+
value: B.value,
|
|
4713
|
+
onValueChange: mt,
|
|
4714
|
+
onClose: qe
|
|
4715
|
+
}), t[127] = qe, t[128] = mt, t[129] = B.value, t[130] = Mt, t[131] = Nt) : Nt = t[131];
|
|
4716
|
+
let Pt;
|
|
4717
|
+
t[132] !== ze || t[133] !== R.length || t[134] !== F || t[135] !== v || t[136] !== m || t[137] !== He ? (Pt = R.length > 0 && !m ? /* @__PURE__ */ $(ne, { children: [/* @__PURE__ */ Q(L, {
|
|
4718
4718
|
render: /* @__PURE__ */ Q(N, {
|
|
4719
4719
|
type: "button",
|
|
4720
4720
|
size: "icon-xs",
|
|
4721
4721
|
variant: "ghost",
|
|
4722
|
-
"aria-label":
|
|
4723
|
-
onClick:
|
|
4722
|
+
"aria-label": v(F || ze ? "Collapse all folders" : "Expand all folders"),
|
|
4723
|
+
onClick: He
|
|
4724
4724
|
}),
|
|
4725
|
-
children: Q(
|
|
4726
|
-
}), /* @__PURE__ */ Q(P, { children:
|
|
4727
|
-
let
|
|
4728
|
-
t[139] !==
|
|
4725
|
+
children: Q(ze ? Te : De, { className: "size-3.5" })
|
|
4726
|
+
}), /* @__PURE__ */ Q(P, { children: v(F || ze ? "Collapse all folders" : "Expand all folders") })] }) : null, t[132] = ze, t[133] = R.length, t[134] = F, t[135] = v, t[136] = m, t[137] = He, t[138] = Pt) : Pt = t[138];
|
|
4727
|
+
let Ft;
|
|
4728
|
+
t[139] !== jt || t[140] !== Nt || t[141] !== Pt ? (Ft = /* @__PURE__ */ $("div", {
|
|
4729
4729
|
className: "flex h-10 min-h-10 shrink-0 items-center gap-1 border-b border-border/60 bg-background px-2 in-data-[preview-panel-mode=inline]:mb-1 in-data-[preview-panel-mode=inline]:h-9 in-data-[preview-panel-mode=inline]:min-h-9 in-data-[preview-panel-mode=inline]:border-b-transparent",
|
|
4730
4730
|
"data-surface-subheader": !0,
|
|
4731
4731
|
children: [
|
|
4732
|
-
|
|
4733
|
-
|
|
4734
|
-
|
|
4732
|
+
jt,
|
|
4733
|
+
Nt,
|
|
4734
|
+
Pt
|
|
4735
4735
|
]
|
|
4736
|
-
}), t[139] =
|
|
4737
|
-
let
|
|
4738
|
-
t[143] !== D || t[144] !==
|
|
4736
|
+
}), t[139] = jt, t[140] = Nt, t[141] = Pt, t[142] = Ft) : Ft = t[142];
|
|
4737
|
+
let It;
|
|
4738
|
+
t[143] !== D || t[144] !== v || t[145] !== _t || t[146] !== I.error ? (It = D || I.error ? /* @__PURE__ */ Q("button", {
|
|
4739
4739
|
type: "button",
|
|
4740
|
-
onClick:
|
|
4740
|
+
onClick: _t,
|
|
4741
4741
|
className: "p-4 text-left text-xs leading-relaxed text-destructive",
|
|
4742
|
-
children:
|
|
4743
|
-
}) : null, t[143] = D, t[144] =
|
|
4744
|
-
let
|
|
4745
|
-
t[148] !== I.isPending || t[149] !== I.truncated || t[150] !==
|
|
4742
|
+
children: v("{error} Click to retry.", { error: D ?? I.error })
|
|
4743
|
+
}) : null, t[143] = D, t[144] = v, t[145] = _t, t[146] = I.error, t[147] = It) : It = t[147];
|
|
4744
|
+
let Lt;
|
|
4745
|
+
t[148] !== I.isPending || t[149] !== I.truncated || t[150] !== M ? (Lt = M.trim() && I.truncated && !I.isPending ? /* @__PURE__ */ Q("div", {
|
|
4746
4746
|
className: "px-3 py-1 text-xs text-muted-foreground",
|
|
4747
|
-
children: /* @__PURE__ */ Q(
|
|
4748
|
-
}) : null, t[148] = I.isPending, t[149] = I.truncated, t[150] =
|
|
4749
|
-
let
|
|
4750
|
-
t[152] !==
|
|
4747
|
+
children: /* @__PURE__ */ Q(j, { children: "More matches available. Refine your search." })
|
|
4748
|
+
}) : null, t[148] = I.isPending, t[149] = I.truncated, t[150] = M, t[151] = Lt) : Lt = t[151];
|
|
4749
|
+
let G;
|
|
4750
|
+
t[152] !== ce.length || t[153] !== Le || t[154] !== I.isPending || t[155] !== E ? (G = (!E || I.isPending) && /* @__PURE__ */ Q("div", {
|
|
4751
4751
|
role: "status",
|
|
4752
|
-
className:
|
|
4753
|
-
children: /* @__PURE__ */ Q(
|
|
4754
|
-
}), t[152] =
|
|
4755
|
-
let
|
|
4756
|
-
t[157] !== D || t[158] !==
|
|
4752
|
+
className: ce.length > 0 && !Le ? "sr-only" : "px-3 py-1 text-xs text-muted-foreground",
|
|
4753
|
+
children: /* @__PURE__ */ Q(j, { children: "Loading files…" })
|
|
4754
|
+
}), t[152] = ce.length, t[153] = Le, t[154] = I.isPending, t[155] = E, t[156] = G) : G = t[156];
|
|
4755
|
+
let Rt;
|
|
4756
|
+
t[157] !== D || t[158] !== v || t[159] !== Le || t[160] !== O || t[161] !== z || t[162] !== I.error || t[163] !== I.isPending || t[164] !== i || t[165] !== E || t[166] !== b ? (Rt = Le ? E && !O && !I.isPending && !D && !I.error ? /* @__PURE__ */ Q("div", {
|
|
4757
4757
|
role: "status",
|
|
4758
4758
|
className: "px-3 py-4 text-xs text-muted-foreground",
|
|
4759
|
-
children: /* @__PURE__ */ Q(
|
|
4760
|
-
}) : null : /* @__PURE__ */ Q(
|
|
4761
|
-
model:
|
|
4762
|
-
"aria-label":
|
|
4759
|
+
children: /* @__PURE__ */ Q(j, { children: "No matching files." })
|
|
4760
|
+
}) : null : /* @__PURE__ */ Q(Cn, {
|
|
4761
|
+
model: z,
|
|
4762
|
+
"aria-label": v("{projectName} files", { projectName: i }),
|
|
4763
4763
|
className: "min-h-0 flex-1 overflow-hidden",
|
|
4764
|
-
style:
|
|
4765
|
-
}), t[157] = D, t[158] =
|
|
4766
|
-
let
|
|
4767
|
-
return t[168] !==
|
|
4764
|
+
style: Tn(b)
|
|
4765
|
+
}), t[157] = D, t[158] = v, t[159] = Le, t[160] = O, t[161] = z, t[162] = I.error, t[163] = I.isPending, t[164] = i, t[165] = E, t[166] = b, t[167] = Rt) : Rt = t[167];
|
|
4766
|
+
let zt;
|
|
4767
|
+
return t[168] !== Dt || t[169] !== Ot || t[170] !== kt || t[171] !== Ft || t[172] !== It || t[173] !== Lt || t[174] !== G || t[175] !== Rt ? (zt = /* @__PURE__ */ $("div", {
|
|
4768
4768
|
className: "flex min-h-0 flex-1 flex-col bg-background",
|
|
4769
|
-
"data-file-browser-panel":
|
|
4770
|
-
onContextMenuCapture:
|
|
4771
|
-
onDragStartCapture:
|
|
4772
|
-
onDragEnd:
|
|
4773
|
-
onKeyDown:
|
|
4769
|
+
"data-file-browser-panel": Dt,
|
|
4770
|
+
onContextMenuCapture: W,
|
|
4771
|
+
onDragStartCapture: Ot,
|
|
4772
|
+
onDragEnd: kt,
|
|
4773
|
+
onKeyDown: At,
|
|
4774
4774
|
children: [
|
|
4775
|
-
Pt,
|
|
4776
4775
|
Ft,
|
|
4777
4776
|
It,
|
|
4778
|
-
|
|
4779
|
-
|
|
4777
|
+
Lt,
|
|
4778
|
+
G,
|
|
4779
|
+
Rt
|
|
4780
4780
|
]
|
|
4781
|
-
}), t[168] =
|
|
4781
|
+
}), t[168] = Dt, t[169] = Ot, t[170] = kt, t[171] = Ft, t[172] = It, t[173] = Lt, t[174] = G, t[175] = Rt, t[176] = zt) : zt = t[176], zt;
|
|
4782
4782
|
}
|
|
4783
4783
|
function so(e) {
|
|
4784
4784
|
return {
|
|
@@ -4793,7 +4793,7 @@ function lo() {
|
|
|
4793
4793
|
return !1;
|
|
4794
4794
|
}
|
|
4795
4795
|
function uo(e) {
|
|
4796
|
-
if (!
|
|
4796
|
+
if (!se(e)) throw ue(e.cause);
|
|
4797
4797
|
}
|
|
4798
4798
|
// src/components/files/FileBreadcrumbs.tsx
|
|
4799
4799
|
function fo(e, t) {
|
|
@@ -4801,11 +4801,11 @@ function fo(e, t) {
|
|
|
4801
4801
|
}
|
|
4802
4802
|
function po(e) {
|
|
4803
4803
|
let t = Z(12), n = e.current ? "font-medium text-foreground" : "text-muted-foreground", r;
|
|
4804
|
-
t[0] === n ? r = t[1] : (r =
|
|
4804
|
+
t[0] === n ? r = t[1] : (r = ie("block max-w-40 truncate rounded-sm px-0.5", n), t[0] = n, t[1] = r);
|
|
4805
4805
|
let i;
|
|
4806
4806
|
t[2] === r ? i = t[3] : (i = /* @__PURE__ */ Q("span", { className: r }), t[2] = r, t[3] = i);
|
|
4807
4807
|
let a;
|
|
4808
|
-
t[4] !== e.label || t[5] !== i ? (a = /* @__PURE__ */ Q(
|
|
4808
|
+
t[4] !== e.label || t[5] !== i ? (a = /* @__PURE__ */ Q(L, {
|
|
4809
4809
|
render: i,
|
|
4810
4810
|
children: e.label
|
|
4811
4811
|
}), t[4] = e.label, t[5] = i, t[6] = a) : a = t[6];
|
|
@@ -4815,65 +4815,65 @@ function po(e) {
|
|
|
4815
4815
|
children: e.pathLabel
|
|
4816
4816
|
}), t[7] = e.pathLabel, t[8] = o);
|
|
4817
4817
|
let s;
|
|
4818
|
-
return t[9] !== a || t[10] !== o ? (s = /* @__PURE__ */ $(
|
|
4818
|
+
return t[9] !== a || t[10] !== o ? (s = /* @__PURE__ */ $(ne, { children: [a, o] }), t[9] = a, t[10] = o, t[11] = s) : s = t[11], s;
|
|
4819
4819
|
}
|
|
4820
4820
|
function mo(e) {
|
|
4821
|
-
let t = Z(45), n =
|
|
4821
|
+
let t = Z(45), n = ee(), r = dt(e.environmentId, e.cwd, e.directoryPath, e.workspaceMutationId, n), i = u(), { resolvedTheme: a } = Ye(), o;
|
|
4822
4822
|
t[0] === r.data?.entries ? o = t[1] : (o = r.data?.entries ?? [], t[0] = r.data?.entries, t[1] = o);
|
|
4823
|
-
let c = o,
|
|
4824
|
-
if (t[2] !== c || t[3] !== r.data || t[4] !== r.error || t[5] !== r.isPending || t[6] !== r.refresh || t[7] !==
|
|
4823
|
+
let c = o, d = r.data?.truncated ?? !1, f, p, h, g, _, v, b, S;
|
|
4824
|
+
if (t[2] !== c || t[3] !== r.data || t[4] !== r.error || t[5] !== r.isPending || t[6] !== r.refresh || t[7] !== d || t[8] !== i || t[9] !== e || t[10] !== a) {
|
|
4825
4825
|
let n = Ia(c, e.directoryPath), o = r.data !== null;
|
|
4826
4826
|
if (t[19] !== e) {
|
|
4827
4827
|
let n = La(e.directoryPath), r = e.directoryPath !== e.rootPath && n !== null && (e.rootPath === "" || n === e.rootPath || n.startsWith(`${e.rootPath}/`));
|
|
4828
|
-
p =
|
|
4828
|
+
p = m, _ = "start", v = "bottom", b = (t) => {
|
|
4829
4829
|
t.key === "ArrowLeft" && r && n !== null && (t.preventDefault(), t.stopPropagation(), e.onDirectoryChange(n));
|
|
4830
|
-
},
|
|
4830
|
+
}, S = r && n !== null ? /* @__PURE__ */ $(Br, { children: [/* @__PURE__ */ $(w, {
|
|
4831
4831
|
closeOnClick: !1,
|
|
4832
4832
|
onClick: () => e.onDirectoryChange(n),
|
|
4833
|
-
children: [/* @__PURE__ */ Q(
|
|
4833
|
+
children: [/* @__PURE__ */ Q(we, {}), /* @__PURE__ */ Q("span", {
|
|
4834
4834
|
className: "truncate",
|
|
4835
|
-
children: /* @__PURE__ */ $(
|
|
4835
|
+
children: /* @__PURE__ */ $(j, { children: ["Back to ", /* @__PURE__ */ Q(oe, { children: fo(n, e.projectName) })] })
|
|
4836
4836
|
})]
|
|
4837
|
-
}), /* @__PURE__ */ Q(l, {})] }) : null, t[19] = e, t[20] = p, t[21] =
|
|
4838
|
-
} else p = t[20],
|
|
4839
|
-
|
|
4837
|
+
}), /* @__PURE__ */ Q(l, {})] }) : null, t[19] = e, t[20] = p, t[21] = _, t[22] = v, t[23] = b, t[24] = S;
|
|
4838
|
+
} else p = t[20], _ = t[21], v = t[22], b = t[23], S = t[24];
|
|
4839
|
+
f = s, h = e.directoryPath, g = r.isPending && r.data === null ? /* @__PURE__ */ $(w, {
|
|
4840
4840
|
disabled: !0,
|
|
4841
|
-
children: [/* @__PURE__ */ Q(
|
|
4842
|
-
}) : r.error && r.data === null ? /* @__PURE__ */ $(
|
|
4841
|
+
children: [/* @__PURE__ */ Q(x, {}), /* @__PURE__ */ Q(j, { children: "Loading folder…" })]
|
|
4842
|
+
}) : r.error && r.data === null ? /* @__PURE__ */ $(w, {
|
|
4843
4843
|
closeOnClick: !1,
|
|
4844
4844
|
onClick: r.refresh,
|
|
4845
|
-
children: [/* @__PURE__ */ Q(
|
|
4845
|
+
children: [/* @__PURE__ */ Q(_n, { refreshing: r.isPending }), /* @__PURE__ */ Q("span", {
|
|
4846
4846
|
className: "min-w-0 flex-1 truncate",
|
|
4847
|
-
children: /* @__PURE__ */ Q(
|
|
4847
|
+
children: /* @__PURE__ */ Q(j, { children: "Retry loading folder" })
|
|
4848
4848
|
})]
|
|
4849
|
-
}) : !o && !
|
|
4849
|
+
}) : !o && !d ? /* @__PURE__ */ Q(w, {
|
|
4850
4850
|
disabled: !0,
|
|
4851
|
-
children: /* @__PURE__ */ Q(
|
|
4852
|
-
}) : n.length === 0 ? /* @__PURE__ */ Q(
|
|
4851
|
+
children: /* @__PURE__ */ Q(j, { children: "This folder is no longer available." })
|
|
4852
|
+
}) : n.length === 0 ? /* @__PURE__ */ Q(w, {
|
|
4853
4853
|
disabled: !0,
|
|
4854
|
-
children: i(
|
|
4855
|
-
}) : /* @__PURE__ */ Q(
|
|
4854
|
+
children: i(d ? "No entries from this folder are available in the partial workspace index." : "This folder is empty.")
|
|
4855
|
+
}) : /* @__PURE__ */ Q(y, {
|
|
4856
4856
|
value: e.currentFilePath,
|
|
4857
4857
|
onValueChange: (t) => {
|
|
4858
4858
|
e.onOpenChange(!1), e.onOpenFile(t);
|
|
4859
4859
|
},
|
|
4860
4860
|
children: n.map((t) => {
|
|
4861
|
-
let n = t.kind === "file" && t.path === e.currentFilePath, r = /* @__PURE__ */ $(Br, { children: [/* @__PURE__ */ Q(
|
|
4861
|
+
let n = t.kind === "file" && t.path === e.currentFilePath, r = /* @__PURE__ */ $(Br, { children: [/* @__PURE__ */ Q(Pe, {
|
|
4862
4862
|
pathValue: t.path,
|
|
4863
4863
|
kind: t.kind,
|
|
4864
4864
|
theme: a
|
|
4865
|
-
}), /* @__PURE__ */ $(
|
|
4866
|
-
render: /* @__PURE__ */ Q("span", { className:
|
|
4865
|
+
}), /* @__PURE__ */ $(ne, { children: [/* @__PURE__ */ Q(L, {
|
|
4866
|
+
render: /* @__PURE__ */ Q("span", { className: ie("min-w-0 flex-1 truncate", t.ignored && "text-muted-foreground") }),
|
|
4867
4867
|
children: t.label
|
|
4868
4868
|
}), /* @__PURE__ */ Q(P, {
|
|
4869
4869
|
side: "right",
|
|
4870
4870
|
children: t.path
|
|
4871
4871
|
})] })] });
|
|
4872
|
-
return t.kind === "directory" ? /* @__PURE__ */ $(
|
|
4872
|
+
return t.kind === "directory" ? /* @__PURE__ */ $(w, {
|
|
4873
4873
|
closeOnClick: !1,
|
|
4874
4874
|
onClick: () => e.onDirectoryChange(t.path),
|
|
4875
|
-
children: [r, /* @__PURE__ */ Q(
|
|
4876
|
-
}, t.path) : /* @__PURE__ */ Q(
|
|
4875
|
+
children: [r, /* @__PURE__ */ Q(Ce, {})]
|
|
4876
|
+
}, t.path) : /* @__PURE__ */ Q(C, {
|
|
4877
4877
|
value: t.path,
|
|
4878
4878
|
closeOnClick: !0,
|
|
4879
4879
|
"aria-current": n ? "page" : void 0,
|
|
@@ -4883,36 +4883,36 @@ function mo(e) {
|
|
|
4883
4883
|
})
|
|
4884
4884
|
}, t.path);
|
|
4885
4885
|
})
|
|
4886
|
-
}), t[2] = c, t[3] = r.data, t[4] = r.error, t[5] = r.isPending, t[6] = r.refresh, t[7] =
|
|
4887
|
-
} else
|
|
4886
|
+
}), t[2] = c, t[3] = r.data, t[4] = r.error, t[5] = r.isPending, t[6] = r.refresh, t[7] = d, t[8] = i, t[9] = e, t[10] = a, t[11] = f, t[12] = p, t[13] = h, t[14] = g, t[15] = _, t[16] = v, t[17] = b, t[18] = S;
|
|
4887
|
+
} else f = t[11], p = t[12], h = t[13], g = t[14], _ = t[15], v = t[16], b = t[17], S = t[18];
|
|
4888
4888
|
let T;
|
|
4889
|
-
t[25] !==
|
|
4889
|
+
t[25] !== f || t[26] !== h || t[27] !== g ? (T = /* @__PURE__ */ Q(f, { children: g }, h), t[25] = f, t[26] = h, t[27] = g, t[28] = T) : T = t[28];
|
|
4890
4890
|
let E;
|
|
4891
|
-
t[29] !== r.data || t[30] !== r.error || t[31] !== r.isPending || t[32] !== r.refresh ? (E = r.error && r.data !== null ? /* @__PURE__ */ $(Br, { children: [/* @__PURE__ */ Q(l, {}), /* @__PURE__ */ $(
|
|
4891
|
+
t[29] !== r.data || t[30] !== r.error || t[31] !== r.isPending || t[32] !== r.refresh ? (E = r.error && r.data !== null ? /* @__PURE__ */ $(Br, { children: [/* @__PURE__ */ Q(l, {}), /* @__PURE__ */ $(w, {
|
|
4892
4892
|
closeOnClick: !1,
|
|
4893
4893
|
onClick: r.refresh,
|
|
4894
|
-
children: [/* @__PURE__ */ Q(
|
|
4894
|
+
children: [/* @__PURE__ */ Q(_n, { refreshing: r.isPending }), /* @__PURE__ */ Q(j, { children: "Refresh failed. Retry" })]
|
|
4895
4895
|
})] }) : null, t[29] = r.data, t[30] = r.error, t[31] = r.isPending, t[32] = r.refresh, t[33] = E) : E = t[33];
|
|
4896
4896
|
let D;
|
|
4897
|
-
t[34] ===
|
|
4897
|
+
t[34] === d ? D = t[35] : (D = d ? /* @__PURE__ */ $(Br, { children: [/* @__PURE__ */ Q(l, {}), /* @__PURE__ */ Q(w, {
|
|
4898
4898
|
disabled: !0,
|
|
4899
|
-
children: /* @__PURE__ */ Q(
|
|
4900
|
-
})] }) : null, t[34] =
|
|
4899
|
+
children: /* @__PURE__ */ Q(j, { children: "Some workspace entries are not shown." })
|
|
4900
|
+
})] }) : null, t[34] = d, t[35] = D);
|
|
4901
4901
|
let O;
|
|
4902
|
-
return t[36] !== p || t[37] !==
|
|
4903
|
-
align:
|
|
4904
|
-
side:
|
|
4905
|
-
onKeyDown:
|
|
4902
|
+
return t[36] !== p || t[37] !== _ || t[38] !== v || t[39] !== b || t[40] !== S || t[41] !== T || t[42] !== E || t[43] !== D ? (O = /* @__PURE__ */ $(p, {
|
|
4903
|
+
align: _,
|
|
4904
|
+
side: v,
|
|
4905
|
+
onKeyDown: b,
|
|
4906
4906
|
children: [
|
|
4907
|
-
|
|
4907
|
+
S,
|
|
4908
4908
|
T,
|
|
4909
4909
|
E,
|
|
4910
4910
|
D
|
|
4911
4911
|
]
|
|
4912
|
-
}), t[36] = p, t[37] =
|
|
4912
|
+
}), t[36] = p, t[37] = _, t[38] = v, t[39] = b, t[40] = S, t[41] = T, t[42] = E, t[43] = D, t[44] = O) : O = t[44], O;
|
|
4913
4913
|
}
|
|
4914
4914
|
function ho(e) {
|
|
4915
|
-
let t = Z(29), n =
|
|
4915
|
+
let t = Z(29), n = u(), [r, i] = X(!1), [a, o] = X(e.crumb.path), s;
|
|
4916
4916
|
t[0] !== e.crumb.path || t[1] !== e.relativePath ? (s = {
|
|
4917
4917
|
crumbPath: e.crumb.path,
|
|
4918
4918
|
relativePath: e.relativePath
|
|
@@ -4922,50 +4922,50 @@ function ho(e) {
|
|
|
4922
4922
|
crumbPath: e.crumb.path,
|
|
4923
4923
|
relativePath: e.relativePath
|
|
4924
4924
|
}), i(!1), o(e.crumb.path));
|
|
4925
|
-
let
|
|
4926
|
-
t[3] === e.crumb.path ?
|
|
4925
|
+
let d;
|
|
4926
|
+
t[3] === e.crumb.path ? d = t[4] : (d = (t) => {
|
|
4927
4927
|
i(t), t && o(e.crumb.path);
|
|
4928
|
-
}, t[3] = e.crumb.path, t[4] =
|
|
4929
|
-
let
|
|
4930
|
-
t[5] !== n || t[6] !== e.crumb.label ? (
|
|
4931
|
-
let
|
|
4932
|
-
t[8] ===
|
|
4928
|
+
}, t[3] = e.crumb.path, t[4] = d);
|
|
4929
|
+
let f = d, p;
|
|
4930
|
+
t[5] !== n || t[6] !== e.crumb.label ? (p = n("Browse {folder}", { folder: e.crumb.label }), t[5] = n, t[6] = e.crumb.label, t[7] = p) : p = t[7];
|
|
4931
|
+
let m;
|
|
4932
|
+
t[8] === p ? m = t[9] : (m = /* @__PURE__ */ Q("button", {
|
|
4933
4933
|
type: "button",
|
|
4934
|
-
"aria-label":
|
|
4934
|
+
"aria-label": p,
|
|
4935
4935
|
className: "relative mx-0.5 flex h-5 w-4 shrink-0 cursor-pointer items-center justify-center rounded-sm text-muted-foreground/60 outline-none pointer-coarse:after:absolute pointer-coarse:after:-inset-3 hover:bg-accent hover:text-foreground focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring data-popup-open:bg-accent data-popup-open:text-foreground"
|
|
4936
|
-
}), t[8] =
|
|
4936
|
+
}), t[8] = p, t[9] = m);
|
|
4937
4937
|
let h;
|
|
4938
|
-
t[10] === Symbol.for("react.memo_cache_sentinel") ? (h = /* @__PURE__ */ Q(
|
|
4938
|
+
t[10] === Symbol.for("react.memo_cache_sentinel") ? (h = /* @__PURE__ */ Q(Ce, { className: "size-3.5" }), t[10] = h) : h = t[10];
|
|
4939
4939
|
let g;
|
|
4940
|
-
t[11] ===
|
|
4941
|
-
render:
|
|
4940
|
+
t[11] === m ? g = t[12] : (g = /* @__PURE__ */ Q(_, {
|
|
4941
|
+
render: m,
|
|
4942
4942
|
children: h
|
|
4943
|
-
}), t[11] =
|
|
4944
|
-
let
|
|
4945
|
-
t[13] !== a || t[14] !==
|
|
4943
|
+
}), t[11] = m, t[12] = g);
|
|
4944
|
+
let v;
|
|
4945
|
+
t[13] !== a || t[14] !== f || t[15] !== r || t[16] !== e.crumb.path || t[17] !== e.cwd || t[18] !== e.environmentId || t[19] !== e.onOpenFile || t[20] !== e.projectName || t[21] !== e.relativePath || t[22] !== e.workspaceMutationId ? (v = r ? /* @__PURE__ */ Q(mo, {
|
|
4946
4946
|
cwd: e.cwd,
|
|
4947
4947
|
currentFilePath: e.relativePath,
|
|
4948
4948
|
directoryPath: a,
|
|
4949
4949
|
environmentId: e.environmentId,
|
|
4950
4950
|
onDirectoryChange: o,
|
|
4951
|
-
onOpenChange:
|
|
4951
|
+
onOpenChange: f,
|
|
4952
4952
|
onOpenFile: e.onOpenFile,
|
|
4953
4953
|
projectName: e.projectName,
|
|
4954
4954
|
rootPath: e.crumb.path,
|
|
4955
4955
|
workspaceMutationId: e.workspaceMutationId
|
|
4956
|
-
}) : null, t[13] = a, t[14] =
|
|
4957
|
-
let
|
|
4958
|
-
return t[24] !==
|
|
4956
|
+
}) : null, t[13] = a, t[14] = f, t[15] = r, t[16] = e.crumb.path, t[17] = e.cwd, t[18] = e.environmentId, t[19] = e.onOpenFile, t[20] = e.projectName, t[21] = e.relativePath, t[22] = e.workspaceMutationId, t[23] = v) : v = t[23];
|
|
4957
|
+
let y;
|
|
4958
|
+
return t[24] !== f || t[25] !== r || t[26] !== g || t[27] !== v ? (y = /* @__PURE__ */ $(T, {
|
|
4959
4959
|
open: r,
|
|
4960
|
-
onOpenChange:
|
|
4961
|
-
children: [g,
|
|
4962
|
-
}), t[24] =
|
|
4960
|
+
onOpenChange: f,
|
|
4961
|
+
children: [g, v]
|
|
4962
|
+
}), t[24] = f, t[25] = r, t[26] = g, t[27] = v, t[28] = y) : y = t[28], y;
|
|
4963
4963
|
}
|
|
4964
4964
|
function go(e) {
|
|
4965
4965
|
let t = Z(17), n;
|
|
4966
4966
|
t[0] === e ? n = t[1] : (n = () => e.onNavigate(e.crumb.path), t[0] = e, t[1] = n);
|
|
4967
4967
|
let r = e.descendant ? "text-muted-foreground/70" : "text-muted-foreground", i;
|
|
4968
|
-
t[2] === r ? i = t[3] : (i =
|
|
4968
|
+
t[2] === r ? i = t[3] : (i = ie("relative block max-w-40 cursor-pointer rounded-sm px-0.5 text-left outline-none pointer-coarse:after:absolute pointer-coarse:after:inset-x-0 pointer-coarse:after:-inset-y-3 hover:bg-accent hover:text-foreground focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring", r), t[2] = r, t[3] = i);
|
|
4969
4969
|
let a;
|
|
4970
4970
|
t[4] !== n || t[5] !== i ? (a = /* @__PURE__ */ Q("button", {
|
|
4971
4971
|
type: "button",
|
|
@@ -4978,7 +4978,7 @@ function go(e) {
|
|
|
4978
4978
|
children: e.crumb.label
|
|
4979
4979
|
}), t[7] = e.crumb.label, t[8] = o);
|
|
4980
4980
|
let s;
|
|
4981
|
-
t[9] !== a || t[10] !== o ? (s = /* @__PURE__ */ Q(
|
|
4981
|
+
t[9] !== a || t[10] !== o ? (s = /* @__PURE__ */ Q(L, {
|
|
4982
4982
|
render: a,
|
|
4983
4983
|
children: o
|
|
4984
4984
|
}), t[9] = a, t[10] = o, t[11] = s) : s = t[11];
|
|
@@ -4988,18 +4988,18 @@ function go(e) {
|
|
|
4988
4988
|
children: c
|
|
4989
4989
|
}), t[12] = c, t[13] = l);
|
|
4990
4990
|
let u;
|
|
4991
|
-
return t[14] !== s || t[15] !== l ? (u = /* @__PURE__ */ $(
|
|
4991
|
+
return t[14] !== s || t[15] !== l ? (u = /* @__PURE__ */ $(ne, { children: [s, l] }), t[14] = s, t[15] = l, t[16] = u) : u = t[16], u;
|
|
4992
4992
|
}
|
|
4993
4993
|
function _o(e) {
|
|
4994
4994
|
let t = Z(13), n;
|
|
4995
|
-
t[0] === e.relativePath ? n = t[1] : (n =
|
|
4995
|
+
t[0] === e.relativePath ? n = t[1] : (n = D(e.relativePath), t[0] = e.relativePath, t[1] = n);
|
|
4996
4996
|
let r = n, i = ka(e.projectName, e.trail), a;
|
|
4997
4997
|
t[2] === e.relativePath ? a = t[3] : (a = Aa(e.relativePath), t[2] = e.relativePath, t[3] = a);
|
|
4998
4998
|
let o = a, s;
|
|
4999
4999
|
t[4] === o ? s = t[5] : (s = (e) => e.path === o, t[4] = o, t[5] = s);
|
|
5000
|
-
let c = i.findIndex(s), l =
|
|
5001
|
-
t[6] === l ?
|
|
5002
|
-
let
|
|
5000
|
+
let c = i.findIndex(s), l = u(), d;
|
|
5001
|
+
t[6] === l ? d = t[7] : (d = l("File path"), t[6] = l, t[7] = d);
|
|
5002
|
+
let f = i.map((t, n) => {
|
|
5003
5003
|
let a = n === c;
|
|
5004
5004
|
return /* @__PURE__ */ $("li", {
|
|
5005
5005
|
className: "flex min-w-0 shrink-0 items-center",
|
|
@@ -5020,7 +5020,7 @@ function _o(e) {
|
|
|
5020
5020
|
descendant: n > c,
|
|
5021
5021
|
onNavigate: e.onNavigateFolder,
|
|
5022
5022
|
projectName: e.projectName
|
|
5023
|
-
}), n === i.length - 1 ? null : r ? /* @__PURE__ */ Q(
|
|
5023
|
+
}), n === i.length - 1 ? null : r ? /* @__PURE__ */ Q(Ce, {
|
|
5024
5024
|
"aria-hidden": !0,
|
|
5025
5025
|
className: "mx-1 size-3.5 shrink-0 text-muted-foreground/60"
|
|
5026
5026
|
}) : /* @__PURE__ */ Q(ho, {
|
|
@@ -5028,17 +5028,17 @@ function _o(e) {
|
|
|
5028
5028
|
crumb: t
|
|
5029
5029
|
})]
|
|
5030
5030
|
}, t.path || "project");
|
|
5031
|
-
}),
|
|
5032
|
-
t[8] ===
|
|
5031
|
+
}), p;
|
|
5032
|
+
t[8] === f ? p = t[9] : (p = /* @__PURE__ */ Q("ol", {
|
|
5033
5033
|
className: "flex items-center",
|
|
5034
|
-
children: d
|
|
5035
|
-
}), t[8] = d, t[9] = f);
|
|
5036
|
-
let p;
|
|
5037
|
-
return t[10] !== u || t[11] !== f ? (p = /* @__PURE__ */ Q("nav", {
|
|
5038
|
-
"aria-label": u,
|
|
5039
|
-
className: "flex h-full",
|
|
5040
5034
|
children: f
|
|
5041
|
-
}), t[
|
|
5035
|
+
}), t[8] = f, t[9] = p);
|
|
5036
|
+
let m;
|
|
5037
|
+
return t[10] !== d || t[11] !== p ? (m = /* @__PURE__ */ Q("nav", {
|
|
5038
|
+
"aria-label": d,
|
|
5039
|
+
className: "flex h-full",
|
|
5040
|
+
children: p
|
|
5041
|
+
}), t[10] = d, t[11] = p, t[12] = m) : m = t[12], m;
|
|
5042
5042
|
}
|
|
5043
5043
|
// src/components/files/FileMarkdownPreview.tsx
|
|
5044
5044
|
function vo(e) {
|
|
@@ -5047,11 +5047,11 @@ function vo(e) {
|
|
|
5047
5047
|
let r;
|
|
5048
5048
|
t[2] === e.relativePath ? r = t[3] : (r = e.relativePath.lastIndexOf("\\"), t[2] = e.relativePath, t[3] = r);
|
|
5049
5049
|
let i = Math.max(n, r), a;
|
|
5050
|
-
t[4] !== i || t[5] !== e.cwd || t[6] !== e.relativePath ? (a = i >= 0 ?
|
|
5050
|
+
t[4] !== i || t[5] !== e.cwd || t[6] !== e.relativePath ? (a = i >= 0 ? _e(e.relativePath.slice(0, i), e.cwd) : e.cwd, t[4] = i, t[5] = e.cwd, t[6] = e.relativePath, t[7] = a) : a = t[7];
|
|
5051
5051
|
let o = a, s;
|
|
5052
|
-
t[8] === e.text ? s = t[9] : (s =
|
|
5052
|
+
t[8] === e.text ? s = t[9] : (s = yt(e.text), t[8] = e.text, t[9] = s);
|
|
5053
5053
|
let c;
|
|
5054
|
-
return t[10] !== o || t[11] !== e.cwd || t[12] !== e.onTaskListChange || t[13] !== e.threadRef || t[14] !== e.workspaceMutationId || t[15] !== s ? (c = /* @__PURE__ */ Q(
|
|
5054
|
+
return t[10] !== o || t[11] !== e.cwd || t[12] !== e.onTaskListChange || t[13] !== e.threadRef || t[14] !== e.workspaceMutationId || t[15] !== s ? (c = /* @__PURE__ */ Q(Ie, {
|
|
5055
5055
|
text: s,
|
|
5056
5056
|
cwd: e.cwd,
|
|
5057
5057
|
imageBaseDir: o,
|
|
@@ -5104,7 +5104,7 @@ function wo(e, t, n) {
|
|
|
5104
5104
|
}
|
|
5105
5105
|
// src/components/files/filePreviewMode.ts
|
|
5106
5106
|
function To(e, t) {
|
|
5107
|
-
return e === null || e === "." ||
|
|
5107
|
+
return e === null || e === "." || h(e, t) === "." ? null : e;
|
|
5108
5108
|
}
|
|
5109
5109
|
var Eo = (e) => /\.(?:md|mdx|markdown|mdown|mkd)$/i.test(e);
|
|
5110
5110
|
function Do(e, t = o) {
|
|
@@ -5118,7 +5118,7 @@ function Do(e, t = o) {
|
|
|
5118
5118
|
}
|
|
5119
5119
|
}
|
|
5120
5120
|
function Oo(e) {
|
|
5121
|
-
return e.attachmentOpen || e.relativePath &&
|
|
5121
|
+
return e.attachmentOpen || e.relativePath && D(e.relativePath) ? !1 : e.explorerOpen || e.relativePath === null;
|
|
5122
5122
|
}
|
|
5123
5123
|
function ko(e) {
|
|
5124
5124
|
return e.draft ? {
|
|
@@ -5126,7 +5126,7 @@ function ko(e) {
|
|
|
5126
5126
|
cwd: e.workspaceRoot,
|
|
5127
5127
|
path: e.absolutePath
|
|
5128
5128
|
} : {
|
|
5129
|
-
_tag:
|
|
5129
|
+
_tag: ge(e.absolutePath, e.workspaceRoot).relativePath === void 0 ? "media-file" : e.kind,
|
|
5130
5130
|
threadId: e.threadRef.threadId,
|
|
5131
5131
|
path: e.absolutePath
|
|
5132
5132
|
};
|
|
@@ -5236,15 +5236,15 @@ function Mo({ environmentId: e, cwd: t, relativePath: n }) {
|
|
|
5236
5236
|
}
|
|
5237
5237
|
var No = jo({
|
|
5238
5238
|
debounceMs: 500,
|
|
5239
|
-
canPersist: ({ environmentId: e }) => n(e,
|
|
5239
|
+
canPersist: ({ environmentId: e }) => n(e, de),
|
|
5240
5240
|
subscribeWritable: ({ environmentId: e }, t) => {
|
|
5241
|
-
let a = n(e,
|
|
5241
|
+
let a = n(e, de);
|
|
5242
5242
|
return re.subscribe(i.sessionStateAtom(e), (e) => {
|
|
5243
|
-
let n = r(e,
|
|
5243
|
+
let n = r(e, de);
|
|
5244
5244
|
n && !a && t(), a = n;
|
|
5245
5245
|
});
|
|
5246
5246
|
},
|
|
5247
|
-
persist: ({ environmentId: e, cwd: t, relativePath: n }, r) =>
|
|
5247
|
+
persist: ({ environmentId: e, cwd: t, relativePath: n }, r) => I(re, be.writeFile, {
|
|
5248
5248
|
environmentId: e,
|
|
5249
5249
|
input: {
|
|
5250
5250
|
cwd: t,
|
|
@@ -5252,8 +5252,8 @@ var No = jo({
|
|
|
5252
5252
|
contents: r
|
|
5253
5253
|
}
|
|
5254
5254
|
}),
|
|
5255
|
-
confirm: ({ environmentId: e, cwd: t, relativePath: n }, r) =>
|
|
5256
|
-
readUnsaved: ({ environmentId: e, cwd: t, relativePath: n }) =>
|
|
5255
|
+
confirm: ({ environmentId: e, cwd: t, relativePath: n }, r) => ot(e, t, n, r),
|
|
5256
|
+
readUnsaved: ({ environmentId: e, cwd: t, relativePath: n }) => xt(e, t, n)?.contents ?? null
|
|
5257
5257
|
});
|
|
5258
5258
|
function Po(e, t) {
|
|
5259
5259
|
let n = Z(6), { environmentId: r, cwd: i, relativePath: a } = e, o, s;
|
|
@@ -5272,9 +5272,9 @@ function Fo(e, t) {
|
|
|
5272
5272
|
No.change(e, t);
|
|
5273
5273
|
}
|
|
5274
5274
|
// src/components/files/FilePreviewPanel.tsx
|
|
5275
|
-
var Io = O(null), Lo = Pr(() => import("./MermaidFilePreview-
|
|
5275
|
+
var Io = O(null), Lo = Pr(() => import("./MermaidFilePreview-BmPdNxW5.js").then((e) => ({ default: e.MermaidFilePreview }))), Ro = "hanzodev.fileExplorerOpen", zo = "hanzodev.renderMarkdown", Bo = "hanzodev.renderBrowserFile", Vo = "hanzodev.renderTable";
|
|
5276
5276
|
function Ho(e) {
|
|
5277
|
-
let t = Z(29), n =
|
|
5277
|
+
let t = Z(29), n = ge(e.absolutePath, e.workspaceRoot).relativePath === void 0 ? "media-file" : "workspace-file", r;
|
|
5278
5278
|
t[0] !== e.absolutePath || t[1] !== e.draft || t[2] !== e.threadRef || t[3] !== e.workspaceRoot || t[4] !== n ? (r = ko({
|
|
5279
5279
|
kind: n,
|
|
5280
5280
|
threadRef: e.threadRef,
|
|
@@ -5282,10 +5282,10 @@ function Ho(e) {
|
|
|
5282
5282
|
workspaceRoot: e.workspaceRoot,
|
|
5283
5283
|
absolutePath: e.absolutePath
|
|
5284
5284
|
}), t[0] = e.absolutePath, t[1] = e.draft, t[2] = e.threadRef, t[3] = e.workspaceRoot, t[4] = n, t[5] = r) : r = t[5];
|
|
5285
|
-
let i = r, a =
|
|
5285
|
+
let i = r, a = Ze(e.environmentId, i), o;
|
|
5286
5286
|
t[6] !== a._tag || t[7] !== a.url || t[8] !== e.workspaceMutationId ? (o = e.workspaceMutationId === null ? "" : `${a._tag === "Success" && a.url.includes("?") ? "&" : "?"}workspace-revision=${encodeURIComponent(e.workspaceMutationId)}`, t[6] = a._tag, t[7] = a.url, t[8] = e.workspaceMutationId, t[9] = o) : o = t[9];
|
|
5287
5287
|
let s = o, c = a._tag === "Success" ? `${a.url}${s}` : null, l = e.alt, u;
|
|
5288
|
-
t[10] !== e.absolutePath || t[11] !== e.workspaceRoot ? (u =
|
|
5288
|
+
t[10] !== e.absolutePath || t[11] !== e.workspaceRoot ? (u = ge(e.absolutePath, e.workspaceRoot), t[10] = e.absolutePath, t[11] = e.workspaceRoot, t[12] = u) : u = t[12];
|
|
5289
5289
|
let d;
|
|
5290
5290
|
t[13] !== e.environmentId || t[14] !== i ? (d = {
|
|
5291
5291
|
environmentId: e.environmentId,
|
|
@@ -5304,16 +5304,16 @@ function Ho(e) {
|
|
|
5304
5304
|
let e;
|
|
5305
5305
|
t[21] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ Q("div", {
|
|
5306
5306
|
className: "flex min-h-0 flex-1 items-center justify-center px-6 text-center text-xs leading-relaxed text-destructive",
|
|
5307
|
-
children: /* @__PURE__ */ Q(
|
|
5307
|
+
children: /* @__PURE__ */ Q(j, { children: "Unable to load workspace image." })
|
|
5308
5308
|
}), t[21] = e) : e = t[21];
|
|
5309
5309
|
let n;
|
|
5310
|
-
return t[22] === p ? n = t[23] : (n = /* @__PURE__ */ Q(
|
|
5310
|
+
return t[22] === p ? n = t[23] : (n = /* @__PURE__ */ Q(at, {
|
|
5311
5311
|
source: p,
|
|
5312
5312
|
children: e
|
|
5313
5313
|
}), t[22] = p, t[23] = n), n;
|
|
5314
5314
|
}
|
|
5315
5315
|
let m;
|
|
5316
|
-
return t[24] !== p || t[25] !== a._tag || t[26] !== c || t[27] !== e.alt ? (m = a._tag === "Success" && c !== null ? /* @__PURE__ */ Q(
|
|
5316
|
+
return t[24] !== p || t[25] !== a._tag || t[26] !== c || t[27] !== e.alt ? (m = a._tag === "Success" && c !== null ? /* @__PURE__ */ Q(at, {
|
|
5317
5317
|
source: p,
|
|
5318
5318
|
children: /* @__PURE__ */ Q("div", {
|
|
5319
5319
|
className: "flex min-h-0 flex-1 flex-col overflow-hidden",
|
|
@@ -5324,12 +5324,12 @@ function Ho(e) {
|
|
|
5324
5324
|
})
|
|
5325
5325
|
}) : /* @__PURE__ */ Q("div", {
|
|
5326
5326
|
className: "flex min-h-0 flex-1 items-center justify-center text-muted-foreground",
|
|
5327
|
-
children: /* @__PURE__ */ Q(
|
|
5327
|
+
children: /* @__PURE__ */ Q(x, { size: "lg" })
|
|
5328
5328
|
}), t[24] = p, t[25] = a._tag, t[26] = c, t[27] = e.alt, t[28] = m) : m = t[28], m;
|
|
5329
5329
|
}
|
|
5330
5330
|
function Uo(e) {
|
|
5331
5331
|
let t = Z(26), n;
|
|
5332
|
-
t[0] === e.absolutePath ? n = t[1] : (n =
|
|
5332
|
+
t[0] === e.absolutePath ? n = t[1] : (n = bt(e.absolutePath), t[0] = e.absolutePath, t[1] = n);
|
|
5333
5333
|
let r = n, i = r ? "media-file" : "workspace-file", a;
|
|
5334
5334
|
t[2] !== e.absolutePath || t[3] !== e.draft || t[4] !== e.threadRef || t[5] !== e.workspaceRoot || t[6] !== i ? (a = ko({
|
|
5335
5335
|
kind: i,
|
|
@@ -5338,7 +5338,7 @@ function Uo(e) {
|
|
|
5338
5338
|
workspaceRoot: e.workspaceRoot,
|
|
5339
5339
|
absolutePath: e.absolutePath
|
|
5340
5340
|
}), t[2] = e.absolutePath, t[3] = e.draft, t[4] = e.threadRef, t[5] = e.workspaceRoot, t[6] = i, t[7] = a) : a = t[7];
|
|
5341
|
-
let o = a, s =
|
|
5341
|
+
let o = a, s = Ze(e.environmentId, o, e.workspaceMutationId), [c, l] = X(e.workspaceMutationId);
|
|
5342
5342
|
s._tag === "Success" && !s.waiting && c !== e.workspaceMutationId && l(e.workspaceMutationId);
|
|
5343
5343
|
let u = r && s._tag === "Success" ? s.fileRevision : void 0, d = u ?? (r ? e.workspaceMutationId : c), f;
|
|
5344
5344
|
t[8] !== s._tag || t[9] !== s.url || t[10] !== u || t[11] !== d ? (f = d === null ? "" : `${s._tag === "Success" && s.url.includes("?") ? "&" : "?"}${u === void 0 ? "workspace" : "file"}-revision=${encodeURIComponent(d)}`, t[8] = s._tag, t[9] = s.url, t[10] = u, t[11] = d, t[12] = f) : f = t[12];
|
|
@@ -5347,34 +5347,34 @@ function Uo(e) {
|
|
|
5347
5347
|
let e;
|
|
5348
5348
|
return t[13] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ Q("div", {
|
|
5349
5349
|
className: "flex min-h-0 flex-1 items-center justify-center px-6 text-center text-xs leading-relaxed text-destructive",
|
|
5350
|
-
children: /* @__PURE__ */ Q(
|
|
5350
|
+
children: /* @__PURE__ */ Q(j, { children: "Unable to load file preview." })
|
|
5351
5351
|
}), t[13] = e) : e = t[13], e;
|
|
5352
5352
|
}
|
|
5353
5353
|
if (s._tag !== "Success" || r && s.fileRevision === void 0 && s.waiting) {
|
|
5354
5354
|
let e;
|
|
5355
5355
|
return t[14] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ Q("div", {
|
|
5356
5356
|
className: "flex min-h-0 flex-1 items-center justify-center text-muted-foreground",
|
|
5357
|
-
children: /* @__PURE__ */ Q(
|
|
5357
|
+
children: /* @__PURE__ */ Q(x, { size: "lg" })
|
|
5358
5358
|
}), t[14] = e) : e = t[14], e;
|
|
5359
5359
|
}
|
|
5360
|
-
let m = `${s.url}${p}`, h = `${e.environmentId}:${o._tag}:${e.threadRef.threadId}:${e.absolutePath}:${d}`, g = `${e.environmentId}:${o._tag}:${e.threadRef.threadId}:${e.absolutePath}`,
|
|
5361
|
-
t[15] !== e.environmentId || t[16] !== e.title || t[17] !== o ? (
|
|
5360
|
+
let m = `${s.url}${p}`, h = `${e.environmentId}:${o._tag}:${e.threadRef.threadId}:${e.absolutePath}:${d}`, g = `${e.environmentId}:${o._tag}:${e.threadRef.threadId}:${e.absolutePath}`, _;
|
|
5361
|
+
t[15] !== e.environmentId || t[16] !== e.title || t[17] !== o ? (_ = /* @__PURE__ */ Q(Wo, {
|
|
5362
5362
|
environmentId: e.environmentId,
|
|
5363
5363
|
resource: o,
|
|
5364
5364
|
name: e.title
|
|
5365
|
-
}), t[15] = e.environmentId, t[16] = e.title, t[17] = o, t[18] =
|
|
5366
|
-
let
|
|
5367
|
-
return t[19] !== r || t[20] !== e.title || t[21] !== m || t[22] !== h || t[23] !== g || t[24] !==
|
|
5365
|
+
}), t[15] = e.environmentId, t[16] = e.title, t[17] = o, t[18] = _) : _ = t[18];
|
|
5366
|
+
let v;
|
|
5367
|
+
return t[19] !== r || t[20] !== e.title || t[21] !== m || t[22] !== h || t[23] !== g || t[24] !== _ ? (v = /* @__PURE__ */ Q(ft, {
|
|
5368
5368
|
src: m,
|
|
5369
5369
|
documentKey: h,
|
|
5370
5370
|
documentId: g,
|
|
5371
5371
|
title: e.title,
|
|
5372
5372
|
pdf: r,
|
|
5373
|
-
pdfActions:
|
|
5374
|
-
}), t[19] = r, t[20] = e.title, t[21] = m, t[22] = h, t[23] = g, t[24] =
|
|
5373
|
+
pdfActions: _
|
|
5374
|
+
}), t[19] = r, t[20] = e.title, t[21] = m, t[22] = h, t[23] = g, t[24] = _, t[25] = v) : v = t[25], v;
|
|
5375
5375
|
}
|
|
5376
5376
|
function Wo(e) {
|
|
5377
|
-
let t = Z(12), n =
|
|
5377
|
+
let t = Z(12), n = u(), [r, i] = X(!1), a = $e(e.environmentId, e.resource), s;
|
|
5378
5378
|
t[0] !== n || t[1] !== r ? (s = n(r ? "Preparing file…" : "Save file"), t[0] = n, t[1] = r, t[2] = s) : s = t[2];
|
|
5379
5379
|
let c;
|
|
5380
5380
|
t[3] !== n || t[4] !== e.name || t[5] !== a ? (c = () => {
|
|
@@ -5387,21 +5387,21 @@ function Wo(e) {
|
|
|
5387
5387
|
setTimeout(() => URL.revokeObjectURL(i), 3e4);
|
|
5388
5388
|
let o = document.createElement("a");
|
|
5389
5389
|
o.href = i, o.download = e.name.split(/[\\/]/).at(-1) || e.name, o.click();
|
|
5390
|
-
})().catch((e) =>
|
|
5390
|
+
})().catch((e) => Ge.add({
|
|
5391
5391
|
type: "error",
|
|
5392
5392
|
title: n("Could not save file"),
|
|
5393
|
-
description:
|
|
5393
|
+
description: ve(e, o) ?? n("Please try again.")
|
|
5394
5394
|
})).finally(() => i(!1));
|
|
5395
5395
|
}, t[3] = n, t[4] = e.name, t[5] = a, t[6] = c) : c = t[6];
|
|
5396
5396
|
let l;
|
|
5397
|
-
t[7] === Symbol.for("react.memo_cache_sentinel") ? (l = /* @__PURE__ */ Q(
|
|
5398
|
-
let
|
|
5399
|
-
return t[8] !== r || t[9] !== s || t[10] !== c ? (
|
|
5397
|
+
t[7] === Symbol.for("react.memo_cache_sentinel") ? (l = /* @__PURE__ */ Q(z, { className: "size-3.5" }), t[7] = l) : l = t[7];
|
|
5398
|
+
let d;
|
|
5399
|
+
return t[8] !== r || t[9] !== s || t[10] !== c ? (d = /* @__PURE__ */ Q(xr, {
|
|
5400
5400
|
label: s,
|
|
5401
5401
|
disabled: r,
|
|
5402
5402
|
onPress: c,
|
|
5403
5403
|
children: l
|
|
5404
|
-
}), t[8] = r, t[9] = s, t[10] = c, t[11] =
|
|
5404
|
+
}), t[8] = r, t[9] = s, t[10] = c, t[11] = d) : d = t[11], d;
|
|
5405
5405
|
}
|
|
5406
5406
|
function Go(e) {
|
|
5407
5407
|
let t = Z(28), n;
|
|
@@ -5412,10 +5412,10 @@ function Go(e) {
|
|
|
5412
5412
|
workspaceRoot: e.workspaceRoot,
|
|
5413
5413
|
absolutePath: e.absolutePath
|
|
5414
5414
|
}), t[0] = e.absolutePath, t[1] = e.draft, t[2] = e.threadRef, t[3] = e.workspaceRoot, t[4] = n) : n = t[4];
|
|
5415
|
-
let r = n, i =
|
|
5415
|
+
let r = n, i = Ze(e.environmentId, r, e.workspaceMutationId ?? void 0), a = $e(e.environmentId, r), o = i._tag === "Success" ? i.fileRevision : void 0, s = o ?? e.workspaceMutationId, c;
|
|
5416
5416
|
t[5] !== i._tag || t[6] !== i.url || t[7] !== o || t[8] !== s ? (c = s === null ? "" : `${i._tag === "Success" && i.url.includes("?") ? "&" : "?"}${o === void 0 ? "workspace" : "file"}-revision=${encodeURIComponent(s)}`, t[5] = i._tag, t[6] = i.url, t[7] = o, t[8] = s, t[9] = c) : c = t[9];
|
|
5417
5417
|
let l = c, u = i._tag === "Success" ? `${i.url}${l}` : null, d = i._tag === "Failure", f = e.name, p = e.name, m;
|
|
5418
|
-
t[10] !== e.absolutePath || t[11] !== e.workspaceRoot ? (m =
|
|
5418
|
+
t[10] !== e.absolutePath || t[11] !== e.workspaceRoot ? (m = ge(e.absolutePath, e.workspaceRoot), t[10] = e.absolutePath, t[11] = e.workspaceRoot, t[12] = m) : m = t[12];
|
|
5419
5419
|
let h;
|
|
5420
5420
|
t[13] !== e.environmentId || t[14] !== r ? (h = {
|
|
5421
5421
|
environmentId: e.environmentId,
|
|
@@ -5432,7 +5432,7 @@ function Go(e) {
|
|
|
5432
5432
|
let _;
|
|
5433
5433
|
return t[21] !== u || t[22] !== e.name || t[23] !== a || t[24] !== s || t[25] !== d || t[26] !== g ? (_ = /* @__PURE__ */ Q("div", {
|
|
5434
5434
|
className: "flex min-h-0 flex-1 items-center justify-center overflow-hidden p-4",
|
|
5435
|
-
children: /* @__PURE__ */ Q(
|
|
5435
|
+
children: /* @__PURE__ */ Q(V, {
|
|
5436
5436
|
src: u,
|
|
5437
5437
|
sourceFailed: d,
|
|
5438
5438
|
label: f,
|
|
@@ -5446,7 +5446,7 @@ function Go(e) {
|
|
|
5446
5446
|
}), t[21] = u, t[22] = e.name, t[23] = a, t[24] = s, t[25] = d, t[26] = g, t[27] = _) : _ = t[27], _;
|
|
5447
5447
|
}
|
|
5448
5448
|
function Ko(e) {
|
|
5449
|
-
let t = Z(25), n =
|
|
5449
|
+
let t = Z(25), n = u(), r;
|
|
5450
5450
|
t[0] !== e.absolutePath || t[1] !== e.draft || t[2] !== e.threadRef || t[3] !== e.workspaceRoot ? (r = ko({
|
|
5451
5451
|
kind: "media-file",
|
|
5452
5452
|
threadRef: e.threadRef,
|
|
@@ -5454,10 +5454,10 @@ function Ko(e) {
|
|
|
5454
5454
|
workspaceRoot: e.workspaceRoot,
|
|
5455
5455
|
absolutePath: e.absolutePath
|
|
5456
5456
|
}), t[0] = e.absolutePath, t[1] = e.draft, t[2] = e.threadRef, t[3] = e.workspaceRoot, t[4] = r) : r = t[4];
|
|
5457
|
-
let i = r, a =
|
|
5458
|
-
t[5] !== a._tag || t[6] !== a.url || t[7] !== l || t[8] !==
|
|
5459
|
-
let
|
|
5460
|
-
if (a._tag === "Failure" ||
|
|
5457
|
+
let i = r, a = Ze(e.environmentId, i, e.workspaceMutationId ?? void 0), o = $e(e.environmentId, i), [s, c] = X(null), l = a._tag === "Success" ? a.fileRevision : void 0, d = l ?? e.workspaceMutationId, f;
|
|
5458
|
+
t[5] !== a._tag || t[6] !== a.url || t[7] !== l || t[8] !== d ? (f = d === null ? "" : `${a._tag === "Success" && a.url.includes("?") ? "&" : "?"}${l === void 0 ? "workspace" : "file"}-revision=${encodeURIComponent(d)}`, t[5] = a._tag, t[6] = a.url, t[7] = l, t[8] = d, t[9] = f) : f = t[9];
|
|
5459
|
+
let p = f, m = a._tag === "Success" ? `${a.url}${p}` : null;
|
|
5460
|
+
if (a._tag === "Failure" || m !== null && s === m) {
|
|
5461
5461
|
let e;
|
|
5462
5462
|
t[10] === n ? e = t[11] : (e = n("Unable to load audio."), t[10] = n, t[11] = e);
|
|
5463
5463
|
let r;
|
|
@@ -5470,19 +5470,19 @@ function Ko(e) {
|
|
|
5470
5470
|
onRetry: r
|
|
5471
5471
|
}), t[14] = e, t[15] = r, t[16] = i) : i = t[16], i;
|
|
5472
5472
|
}
|
|
5473
|
-
if (
|
|
5473
|
+
if (m === null) {
|
|
5474
5474
|
let e;
|
|
5475
5475
|
return t[17] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ Q(Cr, {}), t[17] = e) : e = t[17], e;
|
|
5476
5476
|
}
|
|
5477
|
-
let m;
|
|
5478
|
-
t[18] === p ? m = t[19] : (m = () => c(p), t[18] = p, t[19] = m);
|
|
5479
5477
|
let h;
|
|
5480
|
-
|
|
5481
|
-
|
|
5478
|
+
t[18] === m ? h = t[19] : (h = () => c(m), t[18] = m, t[19] = h);
|
|
5479
|
+
let g;
|
|
5480
|
+
return t[20] !== e.name || t[21] !== d || t[22] !== h || t[23] !== m ? (g = /* @__PURE__ */ Q(Fe, {
|
|
5481
|
+
src: m,
|
|
5482
5482
|
name: e.name,
|
|
5483
|
-
revision:
|
|
5484
|
-
onError:
|
|
5485
|
-
}), t[20] = e.name, t[21] =
|
|
5483
|
+
revision: d,
|
|
5484
|
+
onError: h
|
|
5485
|
+
}), t[20] = e.name, t[21] = d, t[22] = h, t[23] = m, t[24] = g) : g = t[24], g;
|
|
5486
5486
|
}
|
|
5487
5487
|
function qo() {}
|
|
5488
5488
|
function Jo(e) {
|
|
@@ -5497,28 +5497,28 @@ function Jo(e) {
|
|
|
5497
5497
|
path: e.absolutePath,
|
|
5498
5498
|
...e.document ? {} : { disposition: "attachment" }
|
|
5499
5499
|
}, t[0] = e.absolutePath, t[1] = e.document, t[2] = e.draft, t[3] = e.threadRef, t[4] = e.workspaceRoot, t[5] = n) : n = t[5];
|
|
5500
|
-
let r = n, i =
|
|
5500
|
+
let r = n, i = u(), a = r._tag === "media-file", o = Ze(e.environmentId, a ? r : null, e.workspaceMutationId ?? void 0), s = o._tag === "Success" ? o.fileRevision ?? e.workspaceMutationId : void 0, [c, l] = X(s);
|
|
5501
5501
|
s !== void 0 && s !== c && l(s);
|
|
5502
|
-
let
|
|
5503
|
-
if (a &&
|
|
5502
|
+
let d = a ? o._tag === "Failure" ? `failure:${e.workspaceMutationId}` : s ?? c : e.workspaceMutationId;
|
|
5503
|
+
if (a && d === void 0 && o._tag === "Loading") {
|
|
5504
5504
|
let e;
|
|
5505
5505
|
return t[6] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ Q(Cr, {}), t[6] = e) : e = t[6], e;
|
|
5506
5506
|
}
|
|
5507
|
-
let
|
|
5508
|
-
t[7] !== e.environmentId || t[8] !== r ? (
|
|
5507
|
+
let f = `${d}:${e.refreshRevision}`, p = e.name, m;
|
|
5508
|
+
t[7] !== e.environmentId || t[8] !== r ? (m = {
|
|
5509
5509
|
environmentId: e.environmentId,
|
|
5510
5510
|
resource: r
|
|
5511
|
-
}, t[7] = e.environmentId, t[8] = r, t[9] =
|
|
5512
|
-
let m;
|
|
5513
|
-
t[10] === i ? m = t[11] : (m = i("File", { $context: "label for a file opened from the workspace" }), t[10] = i, t[11] = m);
|
|
5511
|
+
}, t[7] = e.environmentId, t[8] = r, t[9] = m) : m = t[9];
|
|
5514
5512
|
let h;
|
|
5515
|
-
|
|
5516
|
-
|
|
5513
|
+
t[10] === i ? h = t[11] : (h = i("File", { $context: "label for a file opened from the workspace" }), t[10] = i, t[11] = h);
|
|
5514
|
+
let g;
|
|
5515
|
+
return t[12] !== e.name || t[13] !== f || t[14] !== m || t[15] !== h ? (g = /* @__PURE__ */ Q(ht, {
|
|
5516
|
+
name: p,
|
|
5517
5517
|
mimeType: "application/octet-stream",
|
|
5518
5518
|
sizeBytes: 0,
|
|
5519
|
-
asset:
|
|
5520
|
-
origin:
|
|
5521
|
-
},
|
|
5519
|
+
asset: m,
|
|
5520
|
+
origin: h
|
|
5521
|
+
}, f), t[12] = e.name, t[13] = f, t[14] = m, t[15] = h, t[16] = g) : g = t[16], g;
|
|
5522
5522
|
}
|
|
5523
5523
|
function Yo(e, t) {
|
|
5524
5524
|
let n = 1;
|
|
@@ -5557,7 +5557,7 @@ function es(e, t, n) {
|
|
|
5557
5557
|
return;
|
|
5558
5558
|
}
|
|
5559
5559
|
let d = a.file?.contents;
|
|
5560
|
-
if (Xo(r, t === null || d === void 0 ? null : Yo(d, t)), !(a instanceof
|
|
5560
|
+
if (Xo(r, t === null || d === void 0 ? null : Yo(d, t)), !(a instanceof jn)) return;
|
|
5561
5561
|
if (c.latestRequestId !== n && (l(), c.latestRequestId = n, c.handledRequestId = null), u && c.scrollContainer !== u) {
|
|
5562
5562
|
c.scrollContainer = u;
|
|
5563
5563
|
let e = c.scrollTop;
|
|
@@ -5630,13 +5630,13 @@ function is(e, t, n, r) {
|
|
|
5630
5630
|
};
|
|
5631
5631
|
}
|
|
5632
5632
|
function as(e, t) {
|
|
5633
|
-
if (e?.isWorkingPool() !== !0 || (t.lang ??
|
|
5633
|
+
if (e?.isWorkingPool() !== !0 || (t.lang ?? or(t.name)) === "text") return !1;
|
|
5634
5634
|
let n = 1;
|
|
5635
5635
|
for (let e = t.contents.indexOf("\n"); e !== -1; e = t.contents.indexOf("\n", e + 1)) n += 1;
|
|
5636
|
-
return n <=
|
|
5636
|
+
return n <= ir;
|
|
5637
5637
|
}
|
|
5638
5638
|
function os(e) {
|
|
5639
|
-
let t = Z(15), n =
|
|
5639
|
+
let t = Z(15), n = Kn(), [r, i] = X(null), a;
|
|
5640
5640
|
t[0] !== e || t[1] !== n ? (a = as(n, e), t[0] = e, t[1] = n, t[2] = a) : a = t[2];
|
|
5641
5641
|
let o = !a || r === e, s, c;
|
|
5642
5642
|
t[3] !== e || t[4] !== o || t[5] !== n ? (s = () => {
|
|
@@ -5657,44 +5657,44 @@ function os(e) {
|
|
|
5657
5657
|
}, t[12] = u, t[13] = o, t[14] = d) : d = t[14], d;
|
|
5658
5658
|
}
|
|
5659
5659
|
function ss(e) {
|
|
5660
|
-
let t = Z(80), { environmentId: n, projectId: r, cwd: i, relativePath: a, composerDraftTarget: o, contents: s, resolvedTheme: l, revealRequestId:
|
|
5660
|
+
let t = Z(80), { environmentId: n, projectId: r, cwd: i, relativePath: a, composerDraftTarget: o, contents: s, resolvedTheme: l, revealRequestId: u, wordWrap: d, onPostRender: p, onPendingChange: m, onEditorChange: h } = e, g = ee(), _ = f(hs), v = f(ms), y;
|
|
5661
5661
|
t[0] === o ? y = t[1] : (y = (e) => e.getComposerDraft(o)?.reviewComments ?? ns, t[0] = o, t[1] = y);
|
|
5662
|
-
let b =
|
|
5662
|
+
let b = f(y), x;
|
|
5663
5663
|
t[2] === b ? x = t[3] : (x = new Set(b.map(ps)), t[2] = b, t[3] = x);
|
|
5664
5664
|
let S = x, C;
|
|
5665
5665
|
t[4] === Symbol.for("react.memo_cache_sentinel") ? (C = [], t[4] = C) : C = t[4];
|
|
5666
|
-
let [w, T] = X(C), [E, D] = X(null), O = E?.revealRequestId ===
|
|
5667
|
-
t[5] ===
|
|
5666
|
+
let [w, T] = X(C), [E, D] = X(null), O = E?.revealRequestId === u ? E.range : null, k;
|
|
5667
|
+
t[5] === u ? k = t[6] : (k = (e) => {
|
|
5668
5668
|
D({
|
|
5669
|
-
revealRequestId:
|
|
5669
|
+
revealRequestId: u,
|
|
5670
5670
|
range: e
|
|
5671
5671
|
});
|
|
5672
|
-
}, t[5] =
|
|
5673
|
-
let A = k,
|
|
5674
|
-
t[7] !== i || t[8] !== n || t[9] !== a ? (
|
|
5672
|
+
}, t[5] = u, t[6] = k);
|
|
5673
|
+
let A = k, j = Y(null), M = Y(null), N;
|
|
5674
|
+
t[7] !== i || t[8] !== n || t[9] !== a ? (N = {
|
|
5675
5675
|
environmentId: n,
|
|
5676
5676
|
cwd: i,
|
|
5677
5677
|
relativePath: a
|
|
5678
|
-
}, t[7] = i, t[8] = n, t[9] = a, t[10] =
|
|
5679
|
-
let
|
|
5680
|
-
Po(
|
|
5678
|
+
}, t[7] = i, t[8] = n, t[9] = a, t[10] = N) : N = t[10];
|
|
5679
|
+
let te = N;
|
|
5680
|
+
Po(te, m);
|
|
5681
5681
|
let P;
|
|
5682
5682
|
t[11] !== s || t[12] !== i || t[13] !== n || t[14] !== a ? (P = () => is(n, i, a, s), t[11] = s, t[12] = i, t[13] = n, t[14] = a, t[15] = P) : P = t[15];
|
|
5683
|
-
let [F,
|
|
5684
|
-
s !== (
|
|
5685
|
-
let { ready:
|
|
5686
|
-
t[16] === h ?
|
|
5683
|
+
let [F, ne] = X(P), [re, ie] = X(null);
|
|
5684
|
+
s !== (re ?? F.contents) && (ne(is(n, i, a, s)), ie(null));
|
|
5685
|
+
let { ready: ae, onPostRender: oe } = os(F), I = Y(null), se;
|
|
5686
|
+
t[16] === h ? se = t[17] : (se = {
|
|
5687
5687
|
onAttach: (e) => {
|
|
5688
|
-
|
|
5688
|
+
I.current = e, h(e);
|
|
5689
5689
|
},
|
|
5690
5690
|
onComplete: () => {
|
|
5691
|
-
|
|
5691
|
+
I.current = null, h(null);
|
|
5692
5692
|
}
|
|
5693
|
-
}, t[16] = h, t[17] =
|
|
5694
|
-
let
|
|
5695
|
-
t[18] !== _ || t[19] !== o || t[20] !== i || t[21] !== n || t[22] !== S || t[23] !== a || t[24] !==
|
|
5693
|
+
}, t[16] = h, t[17] = se);
|
|
5694
|
+
let L = se, ce;
|
|
5695
|
+
t[18] !== _ || t[19] !== o || t[20] !== i || t[21] !== n || t[22] !== S || t[23] !== a || t[24] !== te ? (ce = (e) => {
|
|
5696
5696
|
let { file: t, lineAnnotations: r } = e;
|
|
5697
|
-
if (t.contents ===
|
|
5697
|
+
if (t.contents === H(n, i, a) || (ie(t.contents), ct(n, i, a, t.contents), Fo(te, t.contents), !r)) return;
|
|
5698
5698
|
let s = Or(r);
|
|
5699
5699
|
T((e) => e === r ? e : s);
|
|
5700
5700
|
for (let e of s) for (let n of e.metadata.entries) n.kind === "comment" && S.has(n.id) && _(o, c({
|
|
@@ -5705,9 +5705,9 @@ function ss(e) {
|
|
|
5705
5705
|
text: n.text,
|
|
5706
5706
|
contents: t.contents
|
|
5707
5707
|
}));
|
|
5708
|
-
}, t[18] = _, t[19] = o, t[20] = i, t[21] = n, t[22] = S, t[23] = a, t[24] =
|
|
5709
|
-
let
|
|
5710
|
-
t[26] !== o || t[27] !== v || t[28] !== A ? (
|
|
5708
|
+
}, t[18] = _, t[19] = o, t[20] = i, t[21] = n, t[22] = S, t[23] = a, t[24] = te, t[25] = ce) : ce = t[25];
|
|
5709
|
+
let le = ce, ue;
|
|
5710
|
+
t[26] !== o || t[27] !== v || t[28] !== A ? (ue = (e) => {
|
|
5711
5711
|
A(null), v(o, e), T((t) => t.flatMap((t) => {
|
|
5712
5712
|
let n = t.metadata.entries.filter((t) => t.id !== e);
|
|
5713
5713
|
return n.length > 0 ? [{
|
|
@@ -5715,9 +5715,9 @@ function ss(e) {
|
|
|
5715
5715
|
metadata: { entries: n }
|
|
5716
5716
|
}] : [];
|
|
5717
5717
|
}));
|
|
5718
|
-
}, t[26] = o, t[27] = v, t[28] = A, t[29] =
|
|
5719
|
-
let
|
|
5720
|
-
t[30] !== _ || t[31] !== o || t[32] !== s || t[33] !== w || t[34] !== a || t[35] !== A ? (
|
|
5718
|
+
}, t[26] = o, t[27] = v, t[28] = A, t[29] = ue) : ue = t[29];
|
|
5719
|
+
let de = ue, R;
|
|
5720
|
+
t[30] !== _ || t[31] !== o || t[32] !== s || t[33] !== w || t[34] !== a || t[35] !== A ? (R = (e, t) => {
|
|
5721
5721
|
A(null);
|
|
5722
5722
|
let n = w.flatMap(fs).find((t) => t.id === e);
|
|
5723
5723
|
n && _(o, c({
|
|
@@ -5735,10 +5735,10 @@ function ss(e) {
|
|
|
5735
5735
|
text: t
|
|
5736
5736
|
} : n) }
|
|
5737
5737
|
})));
|
|
5738
|
-
}, t[30] = _, t[31] = o, t[32] = s, t[33] = w, t[34] = a, t[35] = A, t[36] =
|
|
5739
|
-
let
|
|
5740
|
-
t[37] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
5741
|
-
|
|
5738
|
+
}, t[30] = _, t[31] = o, t[32] = s, t[33] = w, t[34] = a, t[35] = A, t[36] = R) : R = t[36];
|
|
5739
|
+
let fe = R, pe;
|
|
5740
|
+
t[37] === Symbol.for("react.memo_cache_sentinel") ? (pe = (e) => {
|
|
5741
|
+
I.current?.setSelections([]), I.current?.blur();
|
|
5742
5742
|
let { startLine: t, endLine: n } = jr(e), r = {
|
|
5743
5743
|
id: Ar(),
|
|
5744
5744
|
kind: "draft",
|
|
@@ -5756,57 +5756,57 @@ function ss(e) {
|
|
|
5756
5756
|
metadata: { entries: [...e.metadata.entries, r] }
|
|
5757
5757
|
} : e);
|
|
5758
5758
|
});
|
|
5759
|
-
}, t[37] =
|
|
5760
|
-
let
|
|
5761
|
-
t[38] === w ?
|
|
5762
|
-
let
|
|
5763
|
-
t[40] !==
|
|
5764
|
-
let e =
|
|
5759
|
+
}, t[37] = pe) : pe = t[37];
|
|
5760
|
+
let me = pe, he;
|
|
5761
|
+
t[38] === w ? he = t[39] : (he = w.some(cs), t[38] = w, t[39] = he);
|
|
5762
|
+
let ge = he, _e, ve;
|
|
5763
|
+
t[40] !== ge || t[41] !== A ? (_e = () => {
|
|
5764
|
+
let e = j.current;
|
|
5765
5765
|
if (e) return xo({
|
|
5766
5766
|
root: e,
|
|
5767
|
-
editor: { setSelections: (e) =>
|
|
5768
|
-
isBlocked: () =>
|
|
5767
|
+
editor: { setSelections: (e) => I.current?.setSelections(e) },
|
|
5768
|
+
isBlocked: () => ge,
|
|
5769
5769
|
onDismiss: () => A(null)
|
|
5770
5770
|
});
|
|
5771
|
-
},
|
|
5772
|
-
let
|
|
5773
|
-
t[44] === A ?
|
|
5774
|
-
A(e), e &&
|
|
5775
|
-
}, t[44] = A, t[45] =
|
|
5776
|
-
let
|
|
5777
|
-
t[46] !==
|
|
5778
|
-
p(e, t, n),
|
|
5779
|
-
|
|
5771
|
+
}, ve = [ge, A], t[40] = ge, t[41] = A, t[42] = _e, t[43] = ve) : (_e = t[42], ve = t[43]), Ir(_e, ve);
|
|
5772
|
+
let ye;
|
|
5773
|
+
t[44] === A ? ye = t[45] : (ye = (e) => {
|
|
5774
|
+
A(e), e && me(e);
|
|
5775
|
+
}, t[44] = A, t[45] = ye);
|
|
5776
|
+
let be = ye, xe;
|
|
5777
|
+
t[46] !== oe || t[47] !== p || t[48] !== O ? (xe = (e, t, n) => {
|
|
5778
|
+
p(e, t, n), oe(t.file, n), M.current !== null && (cancelAnimationFrame(M.current), M.current = null), n !== "unmount" && (M.current = requestAnimationFrame(() => {
|
|
5779
|
+
M.current = null, e.isConnected && t.setSelectedLines(O, { notify: !1 });
|
|
5780
5780
|
}));
|
|
5781
|
-
}, t[46] =
|
|
5782
|
-
let
|
|
5783
|
-
t[50] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
5781
|
+
}, t[46] = oe, t[47] = p, t[48] = O, t[49] = xe) : xe = t[49];
|
|
5782
|
+
let Se = xe, Ce;
|
|
5783
|
+
t[50] === Symbol.for("react.memo_cache_sentinel") ? (Ce = {
|
|
5784
5784
|
overscrollSize: 600,
|
|
5785
5785
|
intersectionObserverMargin: 1200
|
|
5786
|
-
}, t[50] =
|
|
5787
|
-
let
|
|
5788
|
-
t[51] === l ?
|
|
5789
|
-
let
|
|
5790
|
-
t[53] !==
|
|
5786
|
+
}, t[50] = Ce) : Ce = t[50];
|
|
5787
|
+
let we = !ge, Te = !ge, Ee = d ? "wrap" : "scroll", De;
|
|
5788
|
+
t[51] === l ? De = t[52] : (De = rr(l), t[51] = l, t[52] = De);
|
|
5789
|
+
let Oe;
|
|
5790
|
+
t[53] !== be || t[54] !== Se || t[55] !== l || t[56] !== A || t[57] !== we || t[58] !== Te || t[59] !== Ee || t[60] !== De ? (Oe = {
|
|
5791
5791
|
disableFileHeader: !0,
|
|
5792
|
-
enableGutterUtility:
|
|
5793
|
-
enableLineSelection:
|
|
5792
|
+
enableGutterUtility: we,
|
|
5793
|
+
enableLineSelection: Te,
|
|
5794
5794
|
onGutterUtilityClick: A,
|
|
5795
5795
|
onLineSelectionChange: A,
|
|
5796
|
-
onLineSelectionEnd:
|
|
5797
|
-
overflow:
|
|
5798
|
-
theme:
|
|
5799
|
-
preferredHighlighter:
|
|
5796
|
+
onLineSelectionEnd: be,
|
|
5797
|
+
overflow: Ee,
|
|
5798
|
+
theme: De,
|
|
5799
|
+
preferredHighlighter: ar,
|
|
5800
5800
|
themeType: l,
|
|
5801
5801
|
unsafeCSS: Sr,
|
|
5802
|
-
onPostRender:
|
|
5803
|
-
}, t[53] =
|
|
5804
|
-
let
|
|
5805
|
-
t[62] !== o || t[63] !== n || t[64] !== g || t[65] !== r || t[66] !== S || t[67] !== a || t[68] !==
|
|
5802
|
+
onPostRender: Se
|
|
5803
|
+
}, t[53] = be, t[54] = Se, t[55] = l, t[56] = A, t[57] = we, t[58] = Te, t[59] = Ee, t[60] = De, t[61] = Oe) : Oe = t[61];
|
|
5804
|
+
let ke;
|
|
5805
|
+
t[62] !== o || t[63] !== n || t[64] !== g || t[65] !== r || t[66] !== S || t[67] !== a || t[68] !== de || t[69] !== fe ? (ke = (e) => {
|
|
5806
5806
|
let t = kr(e.metadata.entries, S);
|
|
5807
5807
|
return t.length === 0 ? null : /* @__PURE__ */ Q("div", {
|
|
5808
5808
|
className: "py-1",
|
|
5809
|
-
children: t.map((e) => /* @__PURE__ */ Q(
|
|
5809
|
+
children: t.map((e) => /* @__PURE__ */ Q(ln, {
|
|
5810
5810
|
environmentId: n,
|
|
5811
5811
|
projectId: r,
|
|
5812
5812
|
ownerKey: JSON.stringify([
|
|
@@ -5818,35 +5818,35 @@ function ss(e) {
|
|
|
5818
5818
|
kind: e.kind,
|
|
5819
5819
|
rangeLabel: Mr(e.startLine, e.endLine, g),
|
|
5820
5820
|
text: e.text,
|
|
5821
|
-
onCancel: () =>
|
|
5822
|
-
onComment: (t) =>
|
|
5823
|
-
onDelete: () =>
|
|
5821
|
+
onCancel: () => de(e.id),
|
|
5822
|
+
onComment: (t) => fe(e.id, t),
|
|
5823
|
+
onDelete: () => de(e.id)
|
|
5824
5824
|
}, e.id))
|
|
5825
5825
|
});
|
|
5826
|
-
}, t[62] = o, t[63] = n, t[64] = g, t[65] = r, t[66] = S, t[67] = a, t[68] =
|
|
5827
|
-
let
|
|
5828
|
-
return t[71] !==
|
|
5826
|
+
}, t[62] = o, t[63] = n, t[64] = g, t[65] = r, t[66] = S, t[67] = a, t[68] = de, t[69] = fe, t[70] = ke) : ke = t[70];
|
|
5827
|
+
let Ae;
|
|
5828
|
+
return t[71] !== ae || t[72] !== L || t[73] !== F || t[74] !== le || t[75] !== w || t[76] !== O || t[77] !== Oe || t[78] !== ke ? (Ae = /* @__PURE__ */ Q(Qn, {
|
|
5829
5829
|
createEditor: rs,
|
|
5830
5830
|
children: /* @__PURE__ */ Q("div", {
|
|
5831
|
-
ref:
|
|
5831
|
+
ref: j,
|
|
5832
5832
|
className: "flex min-h-0 flex-1",
|
|
5833
5833
|
children: /* @__PURE__ */ Q(pr, {
|
|
5834
5834
|
className: "file-preview-virtualizer min-h-0 flex-1 overflow-auto",
|
|
5835
|
-
config:
|
|
5835
|
+
config: Ce,
|
|
5836
5836
|
children: /* @__PURE__ */ Q(Er, {
|
|
5837
5837
|
file: F,
|
|
5838
|
-
edit:
|
|
5839
|
-
editorOptions:
|
|
5840
|
-
onEditChange:
|
|
5841
|
-
options:
|
|
5838
|
+
edit: ae,
|
|
5839
|
+
editorOptions: L,
|
|
5840
|
+
onEditChange: le,
|
|
5841
|
+
options: Oe,
|
|
5842
5842
|
selectedLines: O,
|
|
5843
5843
|
lineAnnotations: w,
|
|
5844
|
-
renderAnnotation:
|
|
5844
|
+
renderAnnotation: ke,
|
|
5845
5845
|
className: "min-h-full"
|
|
5846
5846
|
})
|
|
5847
5847
|
})
|
|
5848
5848
|
})
|
|
5849
|
-
}), t[71] =
|
|
5849
|
+
}), t[71] = ae, t[72] = L, t[73] = F, t[74] = le, t[75] = w, t[76] = O, t[77] = Oe, t[78] = ke, t[79] = Ae) : Ae = t[79], Ae;
|
|
5850
5850
|
}
|
|
5851
5851
|
function cs(e) {
|
|
5852
5852
|
return e.metadata.entries.some(ls);
|
|
@@ -5877,7 +5877,7 @@ function hs(e) {
|
|
|
5877
5877
|
return e.addReviewComment;
|
|
5878
5878
|
}
|
|
5879
5879
|
function gs(e) {
|
|
5880
|
-
let t =
|
|
5880
|
+
let t = le(navigator.platform);
|
|
5881
5881
|
e.key.toLowerCase() === "a" && (t ? e.metaKey && !e.ctrlKey : e.ctrlKey && !e.metaKey) && !e.shiftKey && !e.altKey && e.target instanceof Node && e.currentTarget.contains(e.target) && (e.preventDefault(), window.getSelection()?.selectAllChildren(e.currentTarget));
|
|
5882
5882
|
}
|
|
5883
5883
|
function _s(e) {
|
|
@@ -5891,11 +5891,11 @@ function _s(e) {
|
|
|
5891
5891
|
Po(d, l);
|
|
5892
5892
|
let f;
|
|
5893
5893
|
t[4] !== a || t[5] !== r || t[6] !== n || t[7] !== c || t[8] !== i || t[9] !== d ? (f = c ? void 0 : (e) => {
|
|
5894
|
-
let { markerOffset: t, checked: o } = e, s =
|
|
5895
|
-
c !== s && (
|
|
5894
|
+
let { markerOffset: t, checked: o } = e, s = lt(n, r, i)?.contents ?? a, c = B(s, t, o);
|
|
5895
|
+
c !== s && (ct(n, r, i, c), Fo(d, c));
|
|
5896
5896
|
}, t[4] = a, t[5] = r, t[6] = n, t[7] = c, t[8] = i, t[9] = d, t[10] = f) : f = t[10];
|
|
5897
5897
|
let p;
|
|
5898
|
-
return t[11] !== a || t[12] !== r || t[13] !== i || t[14] !== f || t[15] !== o || t[16] !== s ? (p = /* @__PURE__ */ Q(
|
|
5898
|
+
return t[11] !== a || t[12] !== r || t[13] !== i || t[14] !== f || t[15] !== o || t[16] !== s ? (p = /* @__PURE__ */ Q(St, {
|
|
5899
5899
|
className: "min-h-0 flex-1",
|
|
5900
5900
|
onKeyDown: gs,
|
|
5901
5901
|
children: /* @__PURE__ */ Q(vo, {
|
|
@@ -5913,138 +5913,138 @@ function vs(e, t, n) {
|
|
|
5913
5913
|
}
|
|
5914
5914
|
function ys() {
|
|
5915
5915
|
try {
|
|
5916
|
-
return
|
|
5916
|
+
return A(Ro, R) ?? !0;
|
|
5917
5917
|
} catch (e) {
|
|
5918
5918
|
return console.error(e), !0;
|
|
5919
5919
|
}
|
|
5920
5920
|
}
|
|
5921
5921
|
function bs(e) {
|
|
5922
|
-
let n = Z(216), { environmentId: r, cwd: i, projectName: a, projectId: o, relativePath: s, attachment: c, threadRef: l, composerDraftTarget:
|
|
5923
|
-
n[0] !== c || n[1] !== i || n[2] !== s ? (
|
|
5924
|
-
let
|
|
5925
|
-
n[4] === r ?
|
|
5926
|
-
let
|
|
5927
|
-
n[6] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
5922
|
+
let n = Z(216), { environmentId: r, cwd: i, projectName: a, projectId: o, relativePath: s, attachment: c, threadRef: l, composerDraftTarget: f, keybindings: m, availableEditors: h, openInShortcutEnabled: g, revealLine: _, revealRequestId: y, onOpenFile: S, onNavigateFolder: C, folderTrail: w, onPendingChange: T, selectedFilePending: O, workspaceMutationId: k } = e, A;
|
|
5923
|
+
n[0] !== c || n[1] !== i || n[2] !== s ? (A = c === void 0 ? To(s, i) : s, n[0] = c, n[1] = i, n[2] = s, n[3] = A) : A = n[3];
|
|
5924
|
+
let M = A, N = typeof f == "string", P = u(), F = ee(), { resolvedTheme: ne } = Ye(), re = ze(Ts), [I, se] = X(null), L = I ?? re, le = t(r, ce), ue = Be(), fe = b(me), ge = Le(r), be;
|
|
5925
|
+
n[4] === r ? be = n[5] : (be = he.configValueAtom(r), n[4] = r, n[5] = be);
|
|
5926
|
+
let Se = b(be), Ce = Re(r), we = xe(r), Te;
|
|
5927
|
+
n[6] === Symbol.for("react.memo_cache_sentinel") ? (Te = {
|
|
5928
5928
|
reportFailure: !1,
|
|
5929
5929
|
refresh: !0
|
|
5930
|
-
}, n[6] =
|
|
5931
|
-
let
|
|
5932
|
-
n[7] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
5933
|
-
let
|
|
5934
|
-
n[8] ===
|
|
5935
|
-
let
|
|
5936
|
-
n[10] !==
|
|
5937
|
-
let
|
|
5938
|
-
n[13] !==
|
|
5939
|
-
let
|
|
5940
|
-
n[16] ===
|
|
5941
|
-
let
|
|
5942
|
-
n[18] ===
|
|
5943
|
-
let
|
|
5944
|
-
n[20] !==
|
|
5945
|
-
let
|
|
5946
|
-
n[23] !== c || n[24] !==
|
|
5947
|
-
let
|
|
5948
|
-
n[26] !==
|
|
5949
|
-
let
|
|
5950
|
-
n[29] !==
|
|
5951
|
-
relativePath:
|
|
5952
|
-
explorerOpen:
|
|
5953
|
-
attachmentOpen:
|
|
5954
|
-
}), n[29] =
|
|
5955
|
-
let
|
|
5956
|
-
n[33] ===
|
|
5957
|
-
let
|
|
5958
|
-
n[35] ===
|
|
5959
|
-
let
|
|
5960
|
-
n[37] !== c || n[38] !==
|
|
5961
|
-
let
|
|
5962
|
-
n[40] ===
|
|
5963
|
-
let e =
|
|
5964
|
-
if (!e || document.activeElement !==
|
|
5930
|
+
}, n[6] = Te) : Te = n[6];
|
|
5931
|
+
let De = Xe(pe.createUrl, Te), Oe;
|
|
5932
|
+
n[7] === Symbol.for("react.memo_cache_sentinel") ? (Oe = { reportFailure: !1 }, n[7] = Oe) : Oe = n[7];
|
|
5933
|
+
let z = Je(ye.open, Oe), Pe;
|
|
5934
|
+
n[8] === M ? Pe = n[9] : (Pe = M !== null && mr(M), n[8] = M, n[9] = Pe);
|
|
5935
|
+
let Fe = Pe, B;
|
|
5936
|
+
n[10] !== Fe || n[11] !== M ? (B = M !== null && !Fe && E(M), n[10] = Fe, n[11] = M, n[12] = B) : B = n[12];
|
|
5937
|
+
let Ie = B, Ve;
|
|
5938
|
+
n[13] !== Fe || n[14] !== M ? (Ve = M !== null && !Fe && p(M), n[13] = Fe, n[14] = M, n[15] = Ve) : Ve = n[15];
|
|
5939
|
+
let He = Ve, Ue = He || Fe || Ie, We;
|
|
5940
|
+
n[16] === M ? We = n[17] : (We = M !== null && bt(M), n[16] = M, n[17] = We);
|
|
5941
|
+
let Ze = We, $e;
|
|
5942
|
+
n[18] === M ? $e = n[19] : ($e = M !== null && (gr({ name: M }) !== null || hr({ name: M }) !== null || _r(M)), n[18] = M, n[19] = $e);
|
|
5943
|
+
let et = $e, tt;
|
|
5944
|
+
n[20] !== Ze || n[21] !== M ? (tt = M !== null && !Ze && nt(M), n[20] = Ze, n[21] = M, n[22] = tt) : tt = n[22];
|
|
5945
|
+
let it = tt, at;
|
|
5946
|
+
n[23] !== c || n[24] !== M ? (at = c !== void 0 || M !== null && D(M), n[23] = c, n[24] = M, n[25] = at) : at = n[25];
|
|
5947
|
+
let V = at, ot = Qe(r, F), { canReadFiles: ct } = ot, lt = t(r, de), H = st(r, i, M, c === void 0 && M !== null, F), [dt, ft] = X(0), pt = H.readError?.resolvedPath ?? H.readError?.operationPath, gt = c === void 0 ? M ?? (w === void 0 ? null : "") : null, vt;
|
|
5948
|
+
n[26] !== gt || n[27] !== w ? (vt = gt === null ? null : Na(w, gt), n[26] = gt, n[27] = w, n[28] = vt) : vt = n[28];
|
|
5949
|
+
let yt = vt, xt = c === void 0 && (H.isNotFile || w !== void 0 && H.data === null && H.error === null), Ct = xt && V ? M : null, wt = !xt && (H.data !== null || H.error !== null) && Se?.shellRevealInFileManager === !0, U = xt ? null : M, [Tt, Et] = X(ys), Dt = c !== void 0, W;
|
|
5950
|
+
n[29] !== Tt || n[30] !== U || n[31] !== Dt ? (W = Oo({
|
|
5951
|
+
relativePath: U,
|
|
5952
|
+
explorerOpen: Tt,
|
|
5953
|
+
attachmentOpen: Dt
|
|
5954
|
+
}), n[29] = Tt, n[30] = U, n[31] = Dt, n[32] = W) : W = n[32];
|
|
5955
|
+
let Ot = W, [kt, At] = ae(zo, !1, R), [jt, Mt] = ae(Bo, !0, R), [Nt, Pt] = ae(Vo, !0, R), [Ft, It] = X(null), Lt = Y(null), G;
|
|
5956
|
+
n[33] === U ? G = n[34] : (G = U ? Eo(U) : !1, n[33] = U, n[34] = G);
|
|
5957
|
+
let Rt = G, zt;
|
|
5958
|
+
n[35] === U ? zt = n[36] : (zt = U !== null && /\.(mmd|mermaid)$/i.test(U), n[35] = U, n[36] = zt);
|
|
5959
|
+
let Bt = zt, [Vt, Ht] = ae("hanzodev.renderMermaid", !0, R), Ut;
|
|
5960
|
+
n[37] !== c || n[38] !== U ? (Ut = U && c === void 0 ? yr({ name: U }) : null, n[37] = c, n[38] = U, n[39] = Ut) : Ut = n[39];
|
|
5961
|
+
let Wt = Ut, Gt = _ === null || Ft?.path === M && Ft.requestId === y, Kt = Rt && kt && Gt, qt = Bt && Vt && Gt, Jt = Ze || it && jt && Gt, Yt = Wt !== null && Nt && Gt, Xt = Bt ? "mermaid" : Rt ? "markdown" : Wt ? "table" : it ? "html" : null, Zt = U !== null && c === void 0 && Xt !== null, Qt = U !== null && H.data !== null && !(Rt && Kt) && !qt && !(Wt && Yt) && !Jt && !et, $t = U !== null && !V && lt && H.error === null && !H.data?.truncated && !Ue && !et && !Jt && !qt && !(Rt && Kt) && !(Wt && Yt), en = Y(null), tn = Y(null), nn;
|
|
5962
|
+
n[40] === _ ? nn = n[41] : (nn = () => {
|
|
5963
|
+
let e = tn.current;
|
|
5964
|
+
if (!e || document.activeElement !== en.current) return;
|
|
5965
5965
|
let t = !!e.getViewState().selections?.length;
|
|
5966
5966
|
e.focus(t ? { preventScroll: !0 } : {
|
|
5967
5967
|
preventScroll: !0,
|
|
5968
|
-
lineNumber:
|
|
5968
|
+
lineNumber: _ ?? "first-visible"
|
|
5969
5969
|
});
|
|
5970
|
-
}, n[40] =
|
|
5971
|
-
let
|
|
5972
|
-
n[42] ===
|
|
5973
|
-
|
|
5974
|
-
}, n[42] =
|
|
5975
|
-
let
|
|
5976
|
-
n[44] !== c || n[45] !==
|
|
5977
|
-
let
|
|
5978
|
-
n[50] !==
|
|
5979
|
-
let t =
|
|
5980
|
-
|
|
5981
|
-
}, n[50] =
|
|
5982
|
-
let
|
|
5983
|
-
n[54] !== c || n[55] !==
|
|
5984
|
-
let
|
|
5985
|
-
n[59] !== c || n[60] !==
|
|
5986
|
-
let
|
|
5987
|
-
n[71] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
5988
|
-
let e =
|
|
5970
|
+
}, n[40] = _, n[41] = nn);
|
|
5971
|
+
let rn = nn, an;
|
|
5972
|
+
n[42] === rn ? an = n[43] : (an = (e) => {
|
|
5973
|
+
tn.current = e, rn();
|
|
5974
|
+
}, n[42] = rn, n[43] = an);
|
|
5975
|
+
let on = Ke(an), sn = Cs, cn = Bt ? qt : Rt ? Kt : Wt ? Yt : Jt, ln = Bt ? Ht : Rt ? At : Wt ? Pt : Mt, un;
|
|
5976
|
+
n[44] !== c || n[45] !== le || n[46] !== Fe || n[47] !== we || n[48] !== U ? (un = le && U !== null && c === void 0 && !Fe && we && nt(U), n[44] = c, n[45] = le, n[46] = Fe, n[47] = we, n[48] = U, n[49] = un) : un = n[49];
|
|
5977
|
+
let dn = un, fn;
|
|
5978
|
+
n[50] !== yt || n[51] !== xt || n[52] !== C ? (fn = (e) => {
|
|
5979
|
+
let t = yt !== null && Aa(yt) === e ? yt : e;
|
|
5980
|
+
C(t, Na(yt ?? void 0, t), !xt);
|
|
5981
|
+
}, n[50] = yt, n[51] = xt, n[52] = C, n[53] = fn) : fn = n[53];
|
|
5982
|
+
let pn = fn, mn;
|
|
5983
|
+
n[54] !== c || n[55] !== gt || n[56] !== i || n[57] !== M ? (mn = gt === "" ? i : M && c === void 0 ? _e(M, i) : null, n[54] = c, n[55] = gt, n[56] = i, n[57] = M, n[58] = mn) : mn = n[58];
|
|
5984
|
+
let K = mn, gn = es(M, _, y), _n;
|
|
5985
|
+
n[59] !== c || n[60] !== ct || n[61] !== i || n[62] !== r || n[63] !== et || n[64] !== xt || n[65] !== Ue || n[66] !== Ze || n[67] !== M || n[68] !== O || n[69] !== k ? (_n = ct && c === void 0 && M !== null && (xt || !Ue && !Ze && !et) && !O ? hn(ut(r, i, M), k) : Io, n[59] = c, n[60] = ct, n[61] = i, n[62] = r, n[63] = et, n[64] = xt, n[65] = Ue, n[66] = Ze, n[67] = M, n[68] = O, n[69] = k, n[70] = _n) : _n = n[70], v(_n);
|
|
5986
|
+
let vn;
|
|
5987
|
+
n[71] === Symbol.for("react.memo_cache_sentinel") ? (vn = () => {
|
|
5988
|
+
let e = Lt.current?.querySelectorAll("[data-file-crumb]");
|
|
5989
5989
|
e?.[e.length - 1]?.scrollIntoView({
|
|
5990
5990
|
block: "nearest",
|
|
5991
5991
|
inline: "end"
|
|
5992
|
-
}),
|
|
5992
|
+
}), Lt.current?.querySelector("[data-current-file-crumb='true']")?.scrollIntoView({
|
|
5993
5993
|
block: "nearest",
|
|
5994
5994
|
inline: "nearest"
|
|
5995
5995
|
});
|
|
5996
|
-
}, n[71] =
|
|
5997
|
-
let vn;
|
|
5998
|
-
n[72] !== ht || n[73] !== vt ? (vn = [ht, vt], n[72] = ht, n[73] = vt, n[74] = vn) : vn = n[74], Ir(_n, vn);
|
|
5996
|
+
}, n[71] = vn) : vn = n[71];
|
|
5999
5997
|
let yn;
|
|
6000
|
-
n[
|
|
6001
|
-
|
|
6002
|
-
|
|
6003
|
-
|
|
6004
|
-
|
|
6005
|
-
|
|
6006
|
-
|
|
5998
|
+
n[72] !== gt || n[73] !== yt ? (yn = [gt, yt], n[72] = gt, n[73] = yt, n[74] = yn) : yn = n[74], Ir(vn, yn);
|
|
5999
|
+
let bn;
|
|
6000
|
+
n[75] === Symbol.for("react.memo_cache_sentinel") ? (bn = () => {
|
|
6001
|
+
Et(Ss);
|
|
6002
|
+
}, n[75] = bn) : bn = n[75];
|
|
6003
|
+
let xn = bn, Sn;
|
|
6004
|
+
n[76] !== K || n[77] !== le || n[78] !== ct || n[79] !== De || n[80] !== i || n[81] !== Ce || n[82] !== P || n[83] !== F || n[84] !== z || n[85] !== l ? (Sn = () => {
|
|
6005
|
+
ct && le && K && Ce && (async () => {
|
|
6006
|
+
let e = await rt({
|
|
6007
6007
|
threadRef: l,
|
|
6008
|
-
filePath:
|
|
6008
|
+
filePath: K,
|
|
6009
6009
|
workspaceRoot: i,
|
|
6010
|
-
httpBaseUrl:
|
|
6011
|
-
createAssetUrl:
|
|
6012
|
-
openPreview:
|
|
6010
|
+
httpBaseUrl: Ce,
|
|
6011
|
+
createAssetUrl: De,
|
|
6012
|
+
openPreview: z
|
|
6013
6013
|
});
|
|
6014
|
-
if (e._tag === "Success" ||
|
|
6015
|
-
let t =
|
|
6016
|
-
|
|
6014
|
+
if (e._tag === "Success" || te(e)) return;
|
|
6015
|
+
let t = d(e);
|
|
6016
|
+
Ge.add(qe({
|
|
6017
6017
|
type: "error",
|
|
6018
|
-
title:
|
|
6019
|
-
description:
|
|
6018
|
+
title: P("Unable to open file in browser"),
|
|
6019
|
+
description: ve(t, F) ?? P("An error occurred.")
|
|
6020
6020
|
}));
|
|
6021
6021
|
})();
|
|
6022
|
-
}, n[76] =
|
|
6023
|
-
let
|
|
6024
|
-
if (c === void 0 && !
|
|
6025
|
-
if (
|
|
6022
|
+
}, n[76] = K, n[77] = le, n[78] = ct, n[79] = De, n[80] = i, n[81] = Ce, n[82] = P, n[83] = F, n[84] = z, n[85] = l, n[86] = Sn) : Sn = n[86];
|
|
6023
|
+
let Cn = Sn;
|
|
6024
|
+
if (c === void 0 && !ct) {
|
|
6025
|
+
if (ot.isPending) {
|
|
6026
6026
|
let e;
|
|
6027
6027
|
return n[87] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ $("div", {
|
|
6028
6028
|
className: "flex min-h-0 flex-1 items-center justify-center gap-2 text-sm text-muted-foreground",
|
|
6029
|
-
children: [/* @__PURE__ */ Q(
|
|
6029
|
+
children: [/* @__PURE__ */ Q(x, { className: "size-4" }), /* @__PURE__ */ Q(j, { children: "Checking file access..." })]
|
|
6030
6030
|
}), n[87] = e) : e = n[87], e;
|
|
6031
6031
|
}
|
|
6032
6032
|
let e;
|
|
6033
|
-
n[88] !==
|
|
6033
|
+
n[88] !== ot.error || n[89] !== P ? (e = ot.error ?? P("This connection cannot read host files."), n[88] = ot.error, n[89] = P, n[90] = e) : e = n[90];
|
|
6034
6034
|
let t;
|
|
6035
6035
|
return n[91] === e ? t = n[92] : (t = /* @__PURE__ */ Q("div", {
|
|
6036
6036
|
className: "p-4 text-sm text-muted-foreground",
|
|
6037
6037
|
children: e
|
|
6038
6038
|
}), n[91] = e, n[92] = t), t;
|
|
6039
6039
|
}
|
|
6040
|
-
let
|
|
6041
|
-
n[93] !==
|
|
6040
|
+
let wn;
|
|
6041
|
+
n[93] !== K || n[94] !== h || n[95] !== gt || n[96] !== yt || n[97] !== dn || n[98] !== Zt || n[99] !== i || n[100] !== r || n[101] !== Tt || n[102] !== H.isFile || n[103] !== P || n[104] !== Cn || n[105] !== fe || n[106] !== V || n[107] !== m || n[108] !== F || n[109] !== pn || n[110] !== S || n[111] !== g || n[112] !== U || n[113] !== ue || n[114] !== a || n[115] !== M || n[116] !== ge || n[117] !== cn || n[118] !== Xt || n[119] !== y || n[120] !== wt || n[121] !== ln || n[122] !== Qt || n[123] !== L || n[124] !== k ? (wn = gt !== null && yt !== null ? /* @__PURE__ */ $("div", {
|
|
6042
6042
|
className: wr,
|
|
6043
6043
|
"data-surface-subheader": !0,
|
|
6044
6044
|
children: [
|
|
6045
|
-
/* @__PURE__ */ Q(
|
|
6045
|
+
/* @__PURE__ */ Q(St, {
|
|
6046
6046
|
radius: "none",
|
|
6047
|
-
ref:
|
|
6047
|
+
ref: Lt,
|
|
6048
6048
|
hideScrollbars: !0,
|
|
6049
6049
|
scrollFade: !0,
|
|
6050
6050
|
className: "min-w-0 flex-1",
|
|
@@ -6054,83 +6054,83 @@ function bs(e) {
|
|
|
6054
6054
|
children: /* @__PURE__ */ Q(_o, {
|
|
6055
6055
|
cwd: i,
|
|
6056
6056
|
environmentId: r,
|
|
6057
|
-
onNavigateFolder:
|
|
6058
|
-
onOpenFile:
|
|
6057
|
+
onNavigateFolder: pn,
|
|
6058
|
+
onOpenFile: S,
|
|
6059
6059
|
projectName: a,
|
|
6060
|
-
relativePath:
|
|
6061
|
-
trail:
|
|
6060
|
+
relativePath: gt,
|
|
6061
|
+
trail: yt,
|
|
6062
6062
|
workspaceMutationId: k
|
|
6063
6063
|
})
|
|
6064
6064
|
})
|
|
6065
6065
|
}),
|
|
6066
|
-
|
|
6066
|
+
K && (r === ue || r === fe || ge.mode !== "local-exec") ? /* @__PURE__ */ Q(_t, {
|
|
6067
6067
|
environmentId: r,
|
|
6068
|
-
keybindings:
|
|
6069
|
-
availableEditors:
|
|
6070
|
-
enableShortcut:
|
|
6071
|
-
openInCwd:
|
|
6072
|
-
openInCwdIsFile:
|
|
6068
|
+
keybindings: m,
|
|
6069
|
+
availableEditors: h,
|
|
6070
|
+
enableShortcut: g,
|
|
6071
|
+
openInCwd: K,
|
|
6072
|
+
openInCwdIsFile: H.isFile,
|
|
6073
6073
|
compact: !0,
|
|
6074
|
-
revealFileManager:
|
|
6074
|
+
revealFileManager: wt
|
|
6075
6075
|
}) : null,
|
|
6076
|
-
|
|
6077
|
-
label: vs(
|
|
6078
|
-
pressed:
|
|
6076
|
+
Zt && Xt ? /* @__PURE__ */ Q(xr, {
|
|
6077
|
+
label: vs(Xt, cn, F),
|
|
6078
|
+
pressed: cn,
|
|
6079
6079
|
onPress: () => {
|
|
6080
|
-
let e = !
|
|
6081
|
-
|
|
6082
|
-
path:
|
|
6083
|
-
requestId:
|
|
6080
|
+
let e = !cn;
|
|
6081
|
+
ln(e), It(e && M !== null ? {
|
|
6082
|
+
path: M,
|
|
6083
|
+
requestId: y
|
|
6084
6084
|
} : null);
|
|
6085
6085
|
},
|
|
6086
|
-
children: Q(
|
|
6086
|
+
children: Q(cn ? Me : Xt === "table" ? Ne : je, { className: "size-3.5" })
|
|
6087
6087
|
}) : null,
|
|
6088
|
-
|
|
6089
|
-
label:
|
|
6090
|
-
pressed:
|
|
6091
|
-
onPress: () =>
|
|
6092
|
-
children: /* @__PURE__ */ Q(Oe, { className: "size-3.5" })
|
|
6093
|
-
}) : null,
|
|
6094
|
-
un ? /* @__PURE__ */ Q(xr, {
|
|
6095
|
-
label: N("Open file in preview browser"),
|
|
6096
|
-
onPress: Sn,
|
|
6088
|
+
Qt ? /* @__PURE__ */ Q(xr, {
|
|
6089
|
+
label: P(L ? "Disable word wrap" : "Enable word wrap"),
|
|
6090
|
+
pressed: L,
|
|
6091
|
+
onPress: () => se(!L),
|
|
6097
6092
|
children: /* @__PURE__ */ Q(ke, { className: "size-3.5" })
|
|
6098
6093
|
}) : null,
|
|
6099
|
-
|
|
6100
|
-
label:
|
|
6101
|
-
|
|
6102
|
-
|
|
6103
|
-
|
|
6094
|
+
dn ? /* @__PURE__ */ Q(xr, {
|
|
6095
|
+
label: P("Open file in preview browser"),
|
|
6096
|
+
onPress: Cn,
|
|
6097
|
+
children: /* @__PURE__ */ Q(Ae, { className: "size-3.5" })
|
|
6098
|
+
}) : null,
|
|
6099
|
+
!V && U !== null ? /* @__PURE__ */ Q(xr, {
|
|
6100
|
+
label: P(Tt ? "Hide file explorer" : "Show file explorer"),
|
|
6101
|
+
pressed: Tt,
|
|
6102
|
+
onPress: xn,
|
|
6103
|
+
children: /* @__PURE__ */ Q(Ee, { className: "size-3.5" })
|
|
6104
6104
|
}) : null
|
|
6105
6105
|
]
|
|
6106
|
-
}) : null, n[93] =
|
|
6107
|
-
let wn;
|
|
6108
|
-
n[126] !== c || n[127] !== ct || n[128] !== at.isPending || n[129] !== H || n[130] !== j ? (wn = j && !c && !H && !ct && !at.isPending ? /* @__PURE__ */ Q("div", {
|
|
6109
|
-
className: "shrink-0 border-b px-3 py-1.5 text-2xs text-muted-foreground",
|
|
6110
|
-
children: /* @__PURE__ */ Q(L, { children: "Read-only connection. Unsaved edits are kept until write access returns." })
|
|
6111
|
-
}) : null, n[126] = c, n[127] = ct, n[128] = at.isPending, n[129] = H, n[130] = j, n[131] = wn) : wn = n[131];
|
|
6106
|
+
}) : null, n[93] = K, n[94] = h, n[95] = gt, n[96] = yt, n[97] = dn, n[98] = Zt, n[99] = i, n[100] = r, n[101] = Tt, n[102] = H.isFile, n[103] = P, n[104] = Cn, n[105] = fe, n[106] = V, n[107] = m, n[108] = F, n[109] = pn, n[110] = S, n[111] = g, n[112] = U, n[113] = ue, n[114] = a, n[115] = M, n[116] = ge, n[117] = cn, n[118] = Xt, n[119] = y, n[120] = wt, n[121] = ln, n[122] = Qt, n[123] = L, n[124] = k, n[125] = wn) : wn = n[125];
|
|
6112
6107
|
let Tn;
|
|
6113
|
-
n[
|
|
6108
|
+
n[126] !== c || n[127] !== lt || n[128] !== ot.isPending || n[129] !== V || n[130] !== M ? (Tn = M && !c && !V && !lt && !ot.isPending ? /* @__PURE__ */ Q("div", {
|
|
6109
|
+
className: "shrink-0 border-b px-3 py-1.5 text-2xs text-muted-foreground",
|
|
6110
|
+
children: /* @__PURE__ */ Q(j, { children: "Read-only connection. Unsaved edits are kept until write access returns." })
|
|
6111
|
+
}) : null, n[126] = c, n[127] = lt, n[128] = ot.isPending, n[129] = V, n[130] = M, n[131] = Tn) : Tn = n[131];
|
|
6112
|
+
let En;
|
|
6113
|
+
n[132] !== c || n[133] !== N || n[134] !== H.data || n[135] !== P || n[136] !== it || n[137] !== Rt || n[138] !== Ue || n[139] !== Bt || n[140] !== U || n[141] !== Jt ? (En = U && c === void 0 && !Ue && !Jt && H.data?.truncated && (N || Rt || Bt || it) ? /* @__PURE__ */ Q("div", {
|
|
6114
6114
|
className: "shrink-0 border-b border-warning/20 bg-warning-surface px-3 py-1.5 text-2xs text-warning-foreground",
|
|
6115
|
-
children:
|
|
6116
|
-
count:
|
|
6117
|
-
formatted:
|
|
6115
|
+
children: P("{count, plural, one {Preview limited to the first 1 MB of a {formatted} byte file.} other {Preview limited to the first 1 MB of a {formatted} byte file.}}", {
|
|
6116
|
+
count: H.data.byteLength,
|
|
6117
|
+
formatted: H.data.byteLength.toLocaleString()
|
|
6118
6118
|
})
|
|
6119
|
-
}) : null, n[132] = c, n[133] =
|
|
6120
|
-
let
|
|
6121
|
-
n[143] ===
|
|
6122
|
-
let
|
|
6123
|
-
n[145] !==
|
|
6124
|
-
ref:
|
|
6119
|
+
}) : null, n[132] = c, n[133] = N, n[134] = H.data, n[135] = P, n[136] = it, n[137] = Rt, n[138] = Ue, n[139] = Bt, n[140] = U, n[141] = Jt, n[142] = En) : En = n[142];
|
|
6120
|
+
let Dn = U ? "flex" : "hidden", On;
|
|
6121
|
+
n[143] === Dn ? On = n[144] : (On = ie("min-w-0 flex-1 flex-col overflow-hidden", Dn), n[143] = Dn, n[144] = On);
|
|
6122
|
+
let An;
|
|
6123
|
+
n[145] !== rn || n[146] !== P || n[147] !== $t ? (An = $t ? /* @__PURE__ */ Q("div", {
|
|
6124
|
+
ref: en,
|
|
6125
6125
|
tabIndex: -1,
|
|
6126
6126
|
"data-workspace-focus-default": !0,
|
|
6127
6127
|
"data-file-content-focus": !0,
|
|
6128
|
-
"aria-label":
|
|
6128
|
+
"aria-label": P("File contents"),
|
|
6129
6129
|
className: "sr-only",
|
|
6130
|
-
onFocus: () => queueMicrotask(
|
|
6131
|
-
}) : null, n[145] =
|
|
6132
|
-
let
|
|
6133
|
-
n[149] !==
|
|
6130
|
+
onFocus: () => queueMicrotask(rn)
|
|
6131
|
+
}) : null, n[145] = rn, n[146] = P, n[147] = $t, n[148] = An) : An = n[148];
|
|
6132
|
+
let jn;
|
|
6133
|
+
n[149] !== K || n[150] !== c || n[151] !== pt || n[152] !== lt || n[153] !== f || n[154] !== i || n[155] !== N || n[156] !== r || n[157] !== H.data || n[158] !== H.error || n[159] !== H.readError || n[160] !== dt || n[161] !== on || n[162] !== Ie || n[163] !== et || n[164] !== xt || n[165] !== V || n[166] !== it || n[167] !== He || n[168] !== Rt || n[169] !== Bt || n[170] !== Fe || n[171] !== F || n[172] !== gn || n[173] !== T || n[174] !== o || n[175] !== M || n[176] !== Jt || n[177] !== Kt || n[178] !== qt || n[179] !== Yt || n[180] !== ne || n[181] !== _ || n[182] !== y || n[183] !== Wt || n[184] !== l || n[185] !== L || n[186] !== k ? (jn = xt ? null : M && c ? /* @__PURE__ */ Q(ht, {
|
|
6134
6134
|
name: c.name,
|
|
6135
6135
|
mimeType: c.mimeType,
|
|
6136
6136
|
sizeBytes: c.sizeBytes,
|
|
@@ -6140,59 +6140,59 @@ function bs(e) {
|
|
|
6140
6140
|
},
|
|
6141
6141
|
htmlRender: c.htmlRender === !0,
|
|
6142
6142
|
threadRef: l
|
|
6143
|
-
}, `${r}:${c.id}`) :
|
|
6143
|
+
}, `${r}:${c.id}`) : M && Fe && K ? /* @__PURE__ */ Q(Go, {
|
|
6144
6144
|
environmentId: r,
|
|
6145
6145
|
threadRef: l,
|
|
6146
|
-
draft:
|
|
6147
|
-
absolutePath:
|
|
6146
|
+
draft: N,
|
|
6147
|
+
absolutePath: K,
|
|
6148
6148
|
workspaceRoot: i,
|
|
6149
|
-
name:
|
|
6149
|
+
name: M,
|
|
6150
6150
|
workspaceMutationId: k
|
|
6151
|
-
}, `${r}:${l.threadId}:${
|
|
6151
|
+
}, `${r}:${l.threadId}:${K}`) : M && Ie && K ? /* @__PURE__ */ Q(Ko, {
|
|
6152
6152
|
environmentId: r,
|
|
6153
6153
|
threadRef: l,
|
|
6154
|
-
draft:
|
|
6155
|
-
absolutePath:
|
|
6154
|
+
draft: N,
|
|
6155
|
+
absolutePath: K,
|
|
6156
6156
|
workspaceRoot: i,
|
|
6157
|
-
name:
|
|
6157
|
+
name: M,
|
|
6158
6158
|
workspaceMutationId: k
|
|
6159
|
-
}, `${r}:${l.threadId}:${
|
|
6159
|
+
}, `${r}:${l.threadId}:${K}`) : M && He && K ? /* @__PURE__ */ Q(Ho, {
|
|
6160
6160
|
environmentId: r,
|
|
6161
6161
|
threadRef: l,
|
|
6162
|
-
draft:
|
|
6163
|
-
absolutePath:
|
|
6162
|
+
draft: N,
|
|
6163
|
+
absolutePath: K,
|
|
6164
6164
|
workspaceRoot: i,
|
|
6165
|
-
alt:
|
|
6165
|
+
alt: M,
|
|
6166
6166
|
workspaceMutationId: k
|
|
6167
|
-
},
|
|
6167
|
+
}, K) : M && Jt && K ? /* @__PURE__ */ Q(Uo, {
|
|
6168
6168
|
environmentId: r,
|
|
6169
6169
|
threadRef: l,
|
|
6170
|
-
draft:
|
|
6171
|
-
absolutePath:
|
|
6170
|
+
draft: N,
|
|
6171
|
+
absolutePath: K,
|
|
6172
6172
|
workspaceRoot: i,
|
|
6173
|
-
title:
|
|
6173
|
+
title: M,
|
|
6174
6174
|
workspaceMutationId: k
|
|
6175
|
-
},
|
|
6175
|
+
}, K) : M && K && H.data?.truncated && !et && !N && !Rt && !Bt && !it ? /* @__PURE__ */ Q(Ds, {
|
|
6176
6176
|
environmentId: r,
|
|
6177
6177
|
threadRef: l,
|
|
6178
|
-
absolutePath:
|
|
6179
|
-
name:
|
|
6180
|
-
delimiter:
|
|
6178
|
+
absolutePath: K,
|
|
6179
|
+
name: M,
|
|
6180
|
+
delimiter: Yt ? Wt : null,
|
|
6181
6181
|
workspaceMutationId: k,
|
|
6182
|
-
revealLine:
|
|
6183
|
-
revealRequestId:
|
|
6184
|
-
wordWrap:
|
|
6185
|
-
}, `${
|
|
6182
|
+
revealLine: _,
|
|
6183
|
+
revealRequestId: y,
|
|
6184
|
+
wordWrap: L
|
|
6185
|
+
}, `${K}:${Yt}:${dt}`) : M && K && (et || H.readError?.failure === "binary_file") ? /* @__PURE__ */ Q(Jo, {
|
|
6186
6186
|
environmentId: r,
|
|
6187
6187
|
threadRef: l,
|
|
6188
|
-
draft:
|
|
6189
|
-
document:
|
|
6190
|
-
absolutePath:
|
|
6188
|
+
draft: N,
|
|
6189
|
+
document: et,
|
|
6190
|
+
absolutePath: K,
|
|
6191
6191
|
workspaceRoot: i,
|
|
6192
|
-
name:
|
|
6192
|
+
name: M.split(/[\\/]/).at(-1) || M,
|
|
6193
6193
|
workspaceMutationId: k,
|
|
6194
|
-
refreshRevision:
|
|
6195
|
-
}, `${r}:${
|
|
6194
|
+
refreshRevision: dt
|
|
6195
|
+
}, `${r}:${K}`) : M && H.error && H.data === null ? /* @__PURE__ */ Q("div", {
|
|
6196
6196
|
role: "alert",
|
|
6197
6197
|
className: "scrollbar-gutter-both flex min-h-0 flex-1 flex-col overflow-auto",
|
|
6198
6198
|
children: /* @__PURE__ */ $("div", {
|
|
@@ -6200,113 +6200,113 @@ function bs(e) {
|
|
|
6200
6200
|
children: [
|
|
6201
6201
|
/* @__PURE__ */ Q("p", {
|
|
6202
6202
|
className: "text-destructive",
|
|
6203
|
-
children:
|
|
6203
|
+
children: H.readError ? Do(H.readError, F) : H.error
|
|
6204
6204
|
}),
|
|
6205
|
-
|
|
6205
|
+
pt ? /* @__PURE__ */ Q("p", {
|
|
6206
6206
|
className: "text-muted-foreground",
|
|
6207
|
-
children: /* @__PURE__ */ $(
|
|
6207
|
+
children: /* @__PURE__ */ $(j, { children: ["Attempted path", /* @__PURE__ */ Q("code", {
|
|
6208
6208
|
className: "block break-all font-mono text-foreground select-all",
|
|
6209
|
-
children: /* @__PURE__ */ Q(
|
|
6209
|
+
children: /* @__PURE__ */ Q(oe, { children: pt })
|
|
6210
6210
|
})] })
|
|
6211
6211
|
}) : null,
|
|
6212
|
-
|
|
6212
|
+
V ? null : /* @__PURE__ */ Q("p", {
|
|
6213
6213
|
className: "text-muted-foreground",
|
|
6214
|
-
children: /* @__PURE__ */ $(
|
|
6214
|
+
children: /* @__PURE__ */ $(j, { children: [
|
|
6215
6215
|
"Workspace folder:",
|
|
6216
6216
|
" ",
|
|
6217
6217
|
/* @__PURE__ */ Q("code", {
|
|
6218
6218
|
className: "break-all font-mono select-all",
|
|
6219
|
-
children: /* @__PURE__ */ Q(
|
|
6219
|
+
children: /* @__PURE__ */ Q(oe, { children: H.readError?.cwd ?? i })
|
|
6220
6220
|
}),
|
|
6221
6221
|
". Check the link's path or locate the file in Files."
|
|
6222
6222
|
] })
|
|
6223
6223
|
})
|
|
6224
6224
|
]
|
|
6225
6225
|
})
|
|
6226
|
-
}) :
|
|
6226
|
+
}) : M && H.data === null ? /* @__PURE__ */ Q("div", {
|
|
6227
6227
|
className: "flex min-h-0 flex-1 items-center justify-center text-muted-foreground",
|
|
6228
|
-
children: /* @__PURE__ */ Q(
|
|
6229
|
-
}) :
|
|
6228
|
+
children: /* @__PURE__ */ Q(x, { size: "lg" })
|
|
6229
|
+
}) : M && H.data ? qt ? /* @__PURE__ */ Q(Nr, {
|
|
6230
6230
|
fallback: /* @__PURE__ */ Q(Cr, {}),
|
|
6231
|
-
children: /* @__PURE__ */ Q(Lo, { text:
|
|
6232
|
-
}) :
|
|
6231
|
+
children: /* @__PURE__ */ Q(Lo, { text: H.data.contents })
|
|
6232
|
+
}) : Rt && Kt ? /* @__PURE__ */ Q(_s, {
|
|
6233
6233
|
environmentId: r,
|
|
6234
6234
|
cwd: i,
|
|
6235
|
-
relativePath:
|
|
6235
|
+
relativePath: M,
|
|
6236
6236
|
threadRef: l,
|
|
6237
|
-
contents:
|
|
6237
|
+
contents: H.data.contents,
|
|
6238
6238
|
workspaceMutationId: k,
|
|
6239
|
-
readOnly:
|
|
6240
|
-
onPendingChange:
|
|
6241
|
-
},
|
|
6242
|
-
name:
|
|
6243
|
-
text:
|
|
6244
|
-
delimiter:
|
|
6245
|
-
},
|
|
6246
|
-
name:
|
|
6247
|
-
text:
|
|
6248
|
-
cacheKey: wo(i,
|
|
6249
|
-
onPostRender:
|
|
6250
|
-
wordWrap:
|
|
6251
|
-
}) : /* @__PURE__ */ Q(
|
|
6239
|
+
readOnly: H.data.truncated || V || !lt,
|
|
6240
|
+
onPendingChange: T
|
|
6241
|
+
}, M) : Wt && Yt ? /* @__PURE__ */ Q(mt, {
|
|
6242
|
+
name: M,
|
|
6243
|
+
text: H.data.contents,
|
|
6244
|
+
delimiter: Wt
|
|
6245
|
+
}, M) : H.data.truncated || V || !lt ? /* @__PURE__ */ Q(Dr, {
|
|
6246
|
+
name: M,
|
|
6247
|
+
text: H.data.contents,
|
|
6248
|
+
cacheKey: wo(i, M, H.data.contents),
|
|
6249
|
+
onPostRender: gn,
|
|
6250
|
+
wordWrap: L
|
|
6251
|
+
}) : /* @__PURE__ */ Q(Zn, { children: /* @__PURE__ */ Q(ss, {
|
|
6252
6252
|
environmentId: r,
|
|
6253
6253
|
projectId: o,
|
|
6254
6254
|
cwd: i,
|
|
6255
|
-
relativePath:
|
|
6256
|
-
composerDraftTarget:
|
|
6257
|
-
contents:
|
|
6258
|
-
resolvedTheme:
|
|
6259
|
-
revealRequestId:
|
|
6260
|
-
wordWrap:
|
|
6261
|
-
onPostRender:
|
|
6262
|
-
onPendingChange:
|
|
6263
|
-
onEditorChange:
|
|
6264
|
-
}, `${
|
|
6265
|
-
let jn;
|
|
6266
|
-
n[188] !== Dn || n[189] !== kn || n[190] !== An ? (jn = /* @__PURE__ */ $("div", {
|
|
6267
|
-
className: Dn,
|
|
6268
|
-
children: [kn, An]
|
|
6269
|
-
}), n[188] = Dn, n[189] = kn, n[190] = An, n[191] = jn) : jn = n[191];
|
|
6255
|
+
relativePath: M,
|
|
6256
|
+
composerDraftTarget: f,
|
|
6257
|
+
contents: H.data.contents,
|
|
6258
|
+
resolvedTheme: ne,
|
|
6259
|
+
revealRequestId: y,
|
|
6260
|
+
wordWrap: L,
|
|
6261
|
+
onPostRender: gn,
|
|
6262
|
+
onPendingChange: T,
|
|
6263
|
+
onEditorChange: on
|
|
6264
|
+
}, `${M}:${ne}`) }) : null, n[149] = K, n[150] = c, n[151] = pt, n[152] = lt, n[153] = f, n[154] = i, n[155] = N, n[156] = r, n[157] = H.data, n[158] = H.error, n[159] = H.readError, n[160] = dt, n[161] = on, n[162] = Ie, n[163] = et, n[164] = xt, n[165] = V, n[166] = it, n[167] = He, n[168] = Rt, n[169] = Bt, n[170] = Fe, n[171] = F, n[172] = gn, n[173] = T, n[174] = o, n[175] = M, n[176] = Jt, n[177] = Kt, n[178] = qt, n[179] = Yt, n[180] = ne, n[181] = _, n[182] = y, n[183] = Wt, n[184] = l, n[185] = L, n[186] = k, n[187] = jn) : jn = n[187];
|
|
6270
6265
|
let Mn;
|
|
6271
|
-
n[
|
|
6272
|
-
|
|
6266
|
+
n[188] !== On || n[189] !== An || n[190] !== jn ? (Mn = /* @__PURE__ */ $("div", {
|
|
6267
|
+
className: On,
|
|
6268
|
+
children: [An, jn]
|
|
6269
|
+
}), n[188] = On, n[189] = An, n[190] = jn, n[191] = Mn) : Mn = n[191];
|
|
6270
|
+
let Nn;
|
|
6271
|
+
n[192] !== yt || n[193] !== i || n[194] !== r || n[195] !== H || n[196] !== Ct || n[197] !== et || n[198] !== Ue || n[199] !== Ze || n[200] !== S || n[201] !== U || n[202] !== a || n[203] !== M || n[204] !== y || n[205] !== Ot || n[206] !== k ? (Nn = Ot ? /* @__PURE__ */ Q(kn, {
|
|
6272
|
+
resizable: !!U,
|
|
6273
6273
|
children: /* @__PURE__ */ Q("div", {
|
|
6274
6274
|
className: "contents",
|
|
6275
|
-
onClick:
|
|
6275
|
+
onClick: sn,
|
|
6276
6276
|
onKeyDown: (e) => {
|
|
6277
|
-
e.key === "Enter" &&
|
|
6277
|
+
e.key === "Enter" && sn(e);
|
|
6278
6278
|
},
|
|
6279
6279
|
children: /* @__PURE__ */ Q(oo, {
|
|
6280
6280
|
environmentId: r,
|
|
6281
|
-
cwd:
|
|
6282
|
-
projectName:
|
|
6283
|
-
hostFolder:
|
|
6284
|
-
selectedPath:
|
|
6285
|
-
selectedPathRevealId:
|
|
6286
|
-
onOpenFile:
|
|
6287
|
-
answersPanelFind: !
|
|
6281
|
+
cwd: Ct ?? i,
|
|
6282
|
+
projectName: Ct ?? a,
|
|
6283
|
+
hostFolder: Ct !== null,
|
|
6284
|
+
selectedPath: Ct === null ? M : Pa(Ct, yt ?? Ct),
|
|
6285
|
+
selectedPathRevealId: y,
|
|
6286
|
+
onOpenFile: S,
|
|
6287
|
+
answersPanelFind: !U,
|
|
6288
6288
|
workspaceMutationId: k,
|
|
6289
|
-
...
|
|
6290
|
-
|
|
6289
|
+
...U && !Ue && !Ze ? { onRefreshSelectedFile: () => {
|
|
6290
|
+
et || H.refresh(), ft(xs);
|
|
6291
6291
|
} } : {}
|
|
6292
|
-
}, `${r}:${
|
|
6292
|
+
}, `${r}:${Ct ?? i}`)
|
|
6293
6293
|
})
|
|
6294
|
-
}) : null, n[192] =
|
|
6295
|
-
let Nn;
|
|
6296
|
-
n[208] !== jn || n[209] !== Mn ? (Nn = /* @__PURE__ */ $("div", {
|
|
6297
|
-
className: "flex min-h-0 flex-1 overflow-hidden",
|
|
6298
|
-
children: [jn, Mn]
|
|
6299
|
-
}), n[208] = jn, n[209] = Mn, n[210] = Nn) : Nn = n[210];
|
|
6294
|
+
}) : null, n[192] = yt, n[193] = i, n[194] = r, n[195] = H, n[196] = Ct, n[197] = et, n[198] = Ue, n[199] = Ze, n[200] = S, n[201] = U, n[202] = a, n[203] = M, n[204] = y, n[205] = Ot, n[206] = k, n[207] = Nn) : Nn = n[207];
|
|
6300
6295
|
let Pn;
|
|
6301
|
-
|
|
6296
|
+
n[208] !== Mn || n[209] !== Nn ? (Pn = /* @__PURE__ */ $("div", {
|
|
6297
|
+
className: "flex min-h-0 flex-1 overflow-hidden",
|
|
6298
|
+
children: [Mn, Nn]
|
|
6299
|
+
}), n[208] = Mn, n[209] = Nn, n[210] = Pn) : Pn = n[210];
|
|
6300
|
+
let Fn;
|
|
6301
|
+
return n[211] !== wn || n[212] !== Tn || n[213] !== En || n[214] !== Pn ? (Fn = /* @__PURE__ */ $("div", {
|
|
6302
6302
|
className: "flex min-h-0 flex-1 flex-col overflow-hidden bg-background",
|
|
6303
6303
|
children: [
|
|
6304
|
-
Cn,
|
|
6305
6304
|
wn,
|
|
6306
6305
|
Tn,
|
|
6307
|
-
|
|
6306
|
+
En,
|
|
6307
|
+
Pn
|
|
6308
6308
|
]
|
|
6309
|
-
}), n[211] =
|
|
6309
|
+
}), n[211] = wn, n[212] = Tn, n[213] = En, n[214] = Pn, n[215] = Fn) : Fn = n[215], Fn;
|
|
6310
6310
|
}
|
|
6311
6311
|
function xs(e) {
|
|
6312
6312
|
return e + 1;
|
|
@@ -6314,7 +6314,7 @@ function xs(e) {
|
|
|
6314
6314
|
function Ss(e) {
|
|
6315
6315
|
let t = !e;
|
|
6316
6316
|
try {
|
|
6317
|
-
M(Ro, t,
|
|
6317
|
+
M(Ro, t, R);
|
|
6318
6318
|
} catch (e) {
|
|
6319
6319
|
console.error(e);
|
|
6320
6320
|
}
|
|
@@ -6323,7 +6323,7 @@ function Ss(e) {
|
|
|
6323
6323
|
function Cs(e) {
|
|
6324
6324
|
if (e.altKey || e.ctrlKey || e.metaKey || e.shiftKey) return;
|
|
6325
6325
|
let t = e.nativeEvent.composedPath().find(ws)?.getAttribute("data-item-path");
|
|
6326
|
-
t && !t.endsWith("/") &&
|
|
6326
|
+
t && !t.endsWith("/") && et({
|
|
6327
6327
|
area: "panel",
|
|
6328
6328
|
selector: "[data-file-content-focus]"
|
|
6329
6329
|
});
|
|
@@ -6334,7 +6334,7 @@ function ws(e) {
|
|
|
6334
6334
|
function Ts(e) {
|
|
6335
6335
|
return e.wordWrap;
|
|
6336
6336
|
}
|
|
6337
|
-
var Es = Pr(() => import("./LargeTextViewer-
|
|
6337
|
+
var Es = Pr(() => import("./LargeTextViewer-D3RklYQB.js"));
|
|
6338
6338
|
function Ds(e) {
|
|
6339
6339
|
let t = Z(63), n;
|
|
6340
6340
|
t[0] !== e.absolutePath || t[1] !== e.threadRef.threadId ? (n = {
|
|
@@ -6343,73 +6343,73 @@ function Ds(e) {
|
|
|
6343
6343
|
path: e.absolutePath,
|
|
6344
6344
|
disposition: "attachment"
|
|
6345
6345
|
}, t[0] = e.absolutePath, t[1] = e.threadRef.threadId, t[2] = n) : n = t[2];
|
|
6346
|
-
let r = n, i =
|
|
6347
|
-
t[3] === e.name ? s = t[4] : (s =
|
|
6346
|
+
let r = n, i = u(), a = Y(null), s;
|
|
6347
|
+
t[3] === e.name ? s = t[4] : (s = We(e.name), t[3] = e.name, t[4] = s);
|
|
6348
6348
|
let c;
|
|
6349
6349
|
t[5] === s ? c = t[6] : (c = { target: s }, t[5] = s, t[6] = c);
|
|
6350
|
-
let { copyToClipboard: l, isCopied:
|
|
6351
|
-
t[7] === i ?
|
|
6352
|
-
|
|
6350
|
+
let { copyToClipboard: l, isCopied: d } = He(c), [f, p] = X(!1), [m, h] = X(0), g;
|
|
6351
|
+
t[7] === i ? g = t[8] : (g = (e) => {
|
|
6352
|
+
Ge.add({
|
|
6353
6353
|
type: "error",
|
|
6354
6354
|
title: i("Could not read file"),
|
|
6355
|
-
description:
|
|
6355
|
+
description: ve(e, o) ?? i("Try again.")
|
|
6356
6356
|
});
|
|
6357
|
-
}, t[7] = i, t[8] =
|
|
6358
|
-
let
|
|
6357
|
+
}, t[7] = i, t[8] = g);
|
|
6358
|
+
let _ = g, v = Ze(e.environmentId, r, e.workspaceMutationId ?? void 0), y = $e(e.environmentId, r), b = JSON.stringify([
|
|
6359
6359
|
e.environmentId,
|
|
6360
6360
|
r,
|
|
6361
|
-
|
|
6362
|
-
|
|
6363
|
-
]), [
|
|
6364
|
-
if (
|
|
6365
|
-
revision:
|
|
6366
|
-
url:
|
|
6367
|
-
}),
|
|
6361
|
+
v._tag === "Success" ? v.fileRevision ?? e.workspaceMutationId : null,
|
|
6362
|
+
m
|
|
6363
|
+
]), [x, S] = X(null);
|
|
6364
|
+
if (v._tag === "Success" && x?.revision !== b && S({
|
|
6365
|
+
revision: b,
|
|
6366
|
+
url: v.url
|
|
6367
|
+
}), v._tag === "Failure") {
|
|
6368
6368
|
let e;
|
|
6369
6369
|
t[9] === i ? e = t[10] : (e = i("Unable to load file preview."), t[9] = i, t[10] = e);
|
|
6370
6370
|
let n;
|
|
6371
|
-
t[11] !==
|
|
6372
|
-
|
|
6373
|
-
}, t[11] =
|
|
6371
|
+
t[11] !== y || t[12] !== _ ? (n = () => {
|
|
6372
|
+
h(ks), y().catch(_);
|
|
6373
|
+
}, t[11] = y, t[12] = _, t[13] = n) : n = t[13];
|
|
6374
6374
|
let r;
|
|
6375
6375
|
return t[14] !== e || t[15] !== n ? (r = /* @__PURE__ */ Q(br, {
|
|
6376
6376
|
message: e,
|
|
6377
6377
|
onRetry: n
|
|
6378
6378
|
}), t[14] = e, t[15] = n, t[16] = r) : r = t[16], r;
|
|
6379
6379
|
}
|
|
6380
|
-
if (
|
|
6380
|
+
if (v._tag !== "Success" || x === null) {
|
|
6381
6381
|
let e;
|
|
6382
6382
|
return t[17] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ Q("div", {
|
|
6383
6383
|
className: "p-6 text-xs text-muted-foreground",
|
|
6384
|
-
children: /* @__PURE__ */ Q(
|
|
6384
|
+
children: /* @__PURE__ */ Q(j, { children: "Loading…" })
|
|
6385
6385
|
}), t[17] = e) : e = t[17], e;
|
|
6386
6386
|
}
|
|
6387
|
-
let
|
|
6387
|
+
let C = `${x.url}${x.url.includes("?") ? "&" : "?"}revision=${encodeURIComponent(x.revision)}`, w;
|
|
6388
6388
|
t[18] === Symbol.for("react.memo_cache_sentinel") ? (w = /* @__PURE__ */ Q("span", {
|
|
6389
6389
|
className: "min-w-0 flex-1 text-xs text-muted-foreground",
|
|
6390
|
-
children: /* @__PURE__ */ Q(
|
|
6390
|
+
children: /* @__PURE__ */ Q(j, { children: "Full file" })
|
|
6391
6391
|
}), t[18] = w) : w = t[18];
|
|
6392
6392
|
let T;
|
|
6393
|
-
t[19] !== i || t[20] !==
|
|
6393
|
+
t[19] !== i || t[20] !== d ? (T = i(d ? "Copied" : "Copy contents"), t[19] = i, t[20] = d, t[21] = T) : T = t[21];
|
|
6394
6394
|
let E;
|
|
6395
|
-
t[22] !== l || t[23] !==
|
|
6395
|
+
t[22] !== l || t[23] !== _ ? (E = () => {
|
|
6396
6396
|
let e = a.current;
|
|
6397
|
-
e && e().then((e) => l(e, void 0)).catch(
|
|
6398
|
-
}, t[22] = l, t[23] =
|
|
6397
|
+
e && e().then((e) => l(e, void 0)).catch(_);
|
|
6398
|
+
}, t[22] = l, t[23] = _, t[24] = E) : E = t[24];
|
|
6399
6399
|
let D;
|
|
6400
|
-
t[25] ===
|
|
6400
|
+
t[25] === d ? D = t[26] : (D = Q(d ? Se : Oe, { className: "size-3.5" }), t[25] = d, t[26] = D);
|
|
6401
6401
|
let O;
|
|
6402
6402
|
t[27] !== T || t[28] !== E || t[29] !== D ? (O = /* @__PURE__ */ Q(xr, {
|
|
6403
6403
|
label: T,
|
|
6404
6404
|
onPress: E,
|
|
6405
6405
|
children: D
|
|
6406
6406
|
}), t[27] = T, t[28] = E, t[29] = D, t[30] = O) : O = t[30];
|
|
6407
|
+
let ee;
|
|
6408
|
+
t[31] !== i || t[32] !== f ? (ee = i(f ? "Preparing file…" : "Save file"), t[31] = i, t[32] = f, t[33] = ee) : ee = t[33];
|
|
6407
6409
|
let k;
|
|
6408
|
-
t[
|
|
6409
|
-
|
|
6410
|
-
|
|
6411
|
-
f(!0), (async () => {
|
|
6412
|
-
let t = await v();
|
|
6410
|
+
t[34] !== i || t[35] !== e.name || t[36] !== y || t[37] !== _ ? (k = () => {
|
|
6411
|
+
p(!0), (async () => {
|
|
6412
|
+
let t = await y();
|
|
6413
6413
|
if (!t) throw Error(i("Reconnect to the environment and try again."));
|
|
6414
6414
|
let n = await fetch(t);
|
|
6415
6415
|
if (!n.ok) throw Error(i("The file could not be loaded. Try again."));
|
|
@@ -6417,51 +6417,51 @@ function Ds(e) {
|
|
|
6417
6417
|
setTimeout(() => URL.revokeObjectURL(r), 3e4);
|
|
6418
6418
|
let a = document.createElement("a");
|
|
6419
6419
|
a.href = r, a.download = e.name.split(/[\\/]/).at(-1) || e.name, a.click();
|
|
6420
|
-
})().catch(
|
|
6421
|
-
}, t[34] = i, t[35] = e.name, t[36] =
|
|
6422
|
-
let
|
|
6423
|
-
t[39] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
6424
|
-
let j;
|
|
6425
|
-
t[40] !== d || t[41] !== A || t[42] !== k ? (j = /* @__PURE__ */ Q(xr, {
|
|
6426
|
-
label: k,
|
|
6427
|
-
disabled: d,
|
|
6428
|
-
onPress: A,
|
|
6429
|
-
children: ee
|
|
6430
|
-
}), t[40] = d, t[41] = A, t[42] = k, t[43] = j) : j = t[43];
|
|
6420
|
+
})().catch(_).finally(() => p(!1));
|
|
6421
|
+
}, t[34] = i, t[35] = e.name, t[36] = y, t[37] = _, t[38] = k) : k = t[38];
|
|
6422
|
+
let A;
|
|
6423
|
+
t[39] === Symbol.for("react.memo_cache_sentinel") ? (A = /* @__PURE__ */ Q(z, { className: "size-3.5" }), t[39] = A) : A = t[39];
|
|
6431
6424
|
let M;
|
|
6432
|
-
t[
|
|
6425
|
+
t[40] !== f || t[41] !== k || t[42] !== ee ? (M = /* @__PURE__ */ Q(xr, {
|
|
6426
|
+
label: ee,
|
|
6427
|
+
disabled: f,
|
|
6428
|
+
onPress: k,
|
|
6429
|
+
children: A
|
|
6430
|
+
}), t[40] = f, t[41] = k, t[42] = ee, t[43] = M) : M = t[43];
|
|
6431
|
+
let N;
|
|
6432
|
+
t[44] !== M || t[45] !== O ? (N = /* @__PURE__ */ $("div", {
|
|
6433
6433
|
className: wr,
|
|
6434
6434
|
children: [
|
|
6435
6435
|
w,
|
|
6436
6436
|
O,
|
|
6437
|
-
|
|
6437
|
+
M
|
|
6438
6438
|
]
|
|
6439
|
-
}), t[44] =
|
|
6440
|
-
let N;
|
|
6441
|
-
t[47] === Symbol.for("react.memo_cache_sentinel") ? (N = /* @__PURE__ */ Q("div", {
|
|
6442
|
-
className: "p-6 text-xs text-muted-foreground",
|
|
6443
|
-
children: /* @__PURE__ */ Q(L, { children: "Loading…" })
|
|
6444
|
-
}), t[47] = N) : N = t[47];
|
|
6445
|
-
let P = `${S}:${p}`, F;
|
|
6446
|
-
t[48] !== v || t[49] !== g ? (F = () => {
|
|
6447
|
-
v().then(() => m(Os)).catch(g);
|
|
6448
|
-
}, t[48] = v, t[49] = g, t[50] = F) : F = t[50];
|
|
6439
|
+
}), t[44] = M, t[45] = O, t[46] = N) : N = t[46];
|
|
6449
6440
|
let te;
|
|
6450
|
-
t[
|
|
6451
|
-
|
|
6441
|
+
t[47] === Symbol.for("react.memo_cache_sentinel") ? (te = /* @__PURE__ */ Q("div", {
|
|
6442
|
+
className: "p-6 text-xs text-muted-foreground",
|
|
6443
|
+
children: /* @__PURE__ */ Q(j, { children: "Loading…" })
|
|
6444
|
+
}), t[47] = te) : te = t[47];
|
|
6445
|
+
let P = `${C}:${m}`, F;
|
|
6446
|
+
t[48] !== y || t[49] !== _ ? (F = () => {
|
|
6447
|
+
y().then(() => h(Os)).catch(_);
|
|
6448
|
+
}, t[48] = y, t[49] = _, t[50] = F) : F = t[50];
|
|
6449
|
+
let ne;
|
|
6450
|
+
t[51] !== e.delimiter || t[52] !== e.name || t[53] !== e.revealLine || t[54] !== e.revealRequestId || t[55] !== e.wordWrap || t[56] !== C || t[57] !== P || t[58] !== F ? (ne = /* @__PURE__ */ Q(Nr, {
|
|
6451
|
+
fallback: te,
|
|
6452
6452
|
children: /* @__PURE__ */ Q(Es, {
|
|
6453
6453
|
name: e.name,
|
|
6454
6454
|
copyContents: a,
|
|
6455
6455
|
onRetry: F,
|
|
6456
|
-
src:
|
|
6456
|
+
src: C,
|
|
6457
6457
|
delimiter: e.delimiter,
|
|
6458
6458
|
revealLine: e.revealLine,
|
|
6459
6459
|
revealRequestId: e.revealRequestId,
|
|
6460
6460
|
wordWrap: e.wordWrap
|
|
6461
6461
|
}, P)
|
|
6462
|
-
}), t[51] = e.delimiter, t[52] = e.name, t[53] = e.revealLine, t[54] = e.revealRequestId, t[55] = e.wordWrap, t[56] =
|
|
6463
|
-
let
|
|
6464
|
-
return t[60] !==
|
|
6462
|
+
}), t[51] = e.delimiter, t[52] = e.name, t[53] = e.revealLine, t[54] = e.revealRequestId, t[55] = e.wordWrap, t[56] = C, t[57] = P, t[58] = F, t[59] = ne) : ne = t[59];
|
|
6463
|
+
let re;
|
|
6464
|
+
return t[60] !== N || t[61] !== ne ? (re = /* @__PURE__ */ $(Br, { children: [N, ne] }), t[60] = N, t[61] = ne, t[62] = re) : re = t[62], re;
|
|
6465
6465
|
}
|
|
6466
6466
|
function Os(e) {
|
|
6467
6467
|
return e + 1;
|