@moberg_hr/work-tree 2.22.4 → 2.22.5
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/bin.js +1 -1
- package/dist/{chunk-HUW27DSB.js → chunk-EVTMZ5IH.js} +4 -4
- package/dist/chunk-EXZ4A6VJ.js +9 -0
- package/dist/{cli-XI2W5KRQ.js → cli-OPORB5PF.js} +3 -3
- package/dist/{pty-host-ULVOMW3R.js → pty-host-EAWW62U4.js} +2 -2
- package/dist/wd-bin.js +2 -2
- package/dist/web/assets/{PtyView-CW2GxKSc.js → PtyView-CYAhB_pW.js} +2 -2
- package/dist/web/assets/{PtyView-CW2GxKSc.js.map → PtyView-CYAhB_pW.js.map} +1 -1
- package/dist/web/assets/{index-DEdSxNCA.js → index-iBmmgBZv.js} +4 -4
- package/dist/web/assets/{index-DEdSxNCA.js.map → index-iBmmgBZv.js.map} +1 -1
- package/dist/web/index.html +1 -1
- package/dist/{web-EC3KKH6E.js → web-Q672AIMZ.js} +301 -247
- package/dist/web-Q672AIMZ.js.map +1 -0
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/dist/chunk-TDJVYUF2.js +0 -9
- package/dist/web-EC3KKH6E.js.map +0 -1
- /package/dist/{chunk-HUW27DSB.js.map → chunk-EVTMZ5IH.js.map} +0 -0
- /package/dist/{chunk-TDJVYUF2.js.map → chunk-EXZ4A6VJ.js.map} +0 -0
- /package/dist/{cli-XI2W5KRQ.js.map → cli-OPORB5PF.js.map} +0 -0
- /package/dist/{pty-host-ULVOMW3R.js.map → pty-host-EAWW62U4.js.map} +0 -0
package/dist/bin.js
CHANGED
|
@@ -52,7 +52,7 @@ if (args[0] === "hook" && args[1] === "statusline") {
|
|
|
52
52
|
} else {
|
|
53
53
|
const { default: chalk } = await import("chalk");
|
|
54
54
|
if (!process.env.NO_COLOR && chalk.level === 0) chalk.level = 1;
|
|
55
|
-
const { run } = await import("./cli-
|
|
55
|
+
const { run } = await import("./cli-OPORB5PF.js");
|
|
56
56
|
const { withReporter } = await import("./report-Z36H65YG.js");
|
|
57
57
|
const { consoleReporter, reportStreamFor } = await import("./console-reporter-XU6VFUZE.js");
|
|
58
58
|
await withReporter(consoleReporter(reportStreamFor(args)), () => run(args));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
VERSION
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-EXZ4A6VJ.js";
|
|
5
5
|
import {
|
|
6
6
|
resolveProjectTarget
|
|
7
7
|
} from "./chunk-IPHADNF5.js";
|
|
@@ -219,12 +219,12 @@ var COMMANDS = [
|
|
|
219
219
|
{ names: ["todo"], load: async () => (await import("./todo-ZBFRL2A5.js")).todoCommand },
|
|
220
220
|
{ names: ["hydrate"], load: async () => (await import("./hydrate-IJEKNZIP.js")).hydrateCommand },
|
|
221
221
|
{ names: ["diff"], load: async () => (await import("./diff-HEOLTXO2.js")).diffCommand },
|
|
222
|
-
{ names: ["web"], load: async () => (await import("./web-
|
|
222
|
+
{ names: ["web"], load: async () => (await import("./web-Q672AIMZ.js")).webCommand },
|
|
223
223
|
{ names: ["hook"], load: async () => (await import("./hook-B4JO2X57.js")).hookCommand },
|
|
224
224
|
{ names: ["run"], load: async () => (await import("./run-WNP2SMNW.js")).runCommand },
|
|
225
225
|
{ names: ["broadcast"], load: async () => (await import("./broadcast-GZNMZFOY.js")).broadcastCommand },
|
|
226
226
|
{ names: ["attach", "a"], load: async () => (await import("./attach-7LBIFBLX.js")).attachCommand },
|
|
227
|
-
{ names: ["pty-host"], load: async () => (await import("./pty-host-
|
|
227
|
+
{ names: ["pty-host"], load: async () => (await import("./pty-host-EAWW62U4.js")).ptyHostCommand },
|
|
228
228
|
{ names: ["state"], load: async () => (await import("./state-GM22X3RN.js")).stateCommand },
|
|
229
229
|
{ names: ["move"], load: async () => (await import("./move-IAZY23ZX.js")).moveCommand },
|
|
230
230
|
{ names: ["install-skills"], load: async () => (await import("./install-skills-FV2L5QHE.js")).installSkillsCommand },
|
|
@@ -328,4 +328,4 @@ export {
|
|
|
328
328
|
commandsFor,
|
|
329
329
|
run
|
|
330
330
|
};
|
|
331
|
-
//# sourceMappingURL=chunk-
|
|
331
|
+
//# sourceMappingURL=chunk-EVTMZ5IH.js.map
|
|
@@ -3,8 +3,8 @@ import {
|
|
|
3
3
|
COMMANDS,
|
|
4
4
|
commandsFor,
|
|
5
5
|
run
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-EVTMZ5IH.js";
|
|
7
|
+
import "./chunk-EXZ4A6VJ.js";
|
|
8
8
|
import "./chunk-IPHADNF5.js";
|
|
9
9
|
import "./chunk-JYWX2N5W.js";
|
|
10
10
|
import "./chunk-3ZPVKUYD.js";
|
|
@@ -17,4 +17,4 @@ export {
|
|
|
17
17
|
commandsFor,
|
|
18
18
|
run
|
|
19
19
|
};
|
|
20
|
-
//# sourceMappingURL=cli-
|
|
20
|
+
//# sourceMappingURL=cli-OPORB5PF.js.map
|
|
@@ -58,7 +58,7 @@ import {
|
|
|
58
58
|
} from "./chunk-ED6YLB4S.js";
|
|
59
59
|
import {
|
|
60
60
|
VERSION
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-EXZ4A6VJ.js";
|
|
62
62
|
import "./chunk-Z6ACV5ZQ.js";
|
|
63
63
|
import "./chunk-JUGF3YE7.js";
|
|
64
64
|
import {
|
|
@@ -1232,4 +1232,4 @@ export {
|
|
|
1232
1232
|
ptyHostCommand,
|
|
1233
1233
|
stopHost
|
|
1234
1234
|
};
|
|
1235
|
-
//# sourceMappingURL=pty-host-
|
|
1235
|
+
//# sourceMappingURL=pty-host-EAWW62U4.js.map
|
package/dist/wd-bin.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
run
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-EVTMZ5IH.js";
|
|
5
5
|
import {
|
|
6
6
|
consoleReporter
|
|
7
7
|
} from "./chunk-S5HJT7CM.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-EXZ4A6VJ.js";
|
|
9
9
|
import "./chunk-IPHADNF5.js";
|
|
10
10
|
import "./chunk-JYWX2N5W.js";
|
|
11
11
|
import "./chunk-3ZPVKUYD.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{C as e,D as t,E as n,O as r,S as i,T as a,_ as o,a as s,b as c,c as l,d as u,f as d,g as f,h as p,i as m,k as h,l as g,m as _,n as v,o as y,p as ee,r as b,s as x,t as te,u as S,v as ne,w as re,x as C,y as ie}from"./index-
|
|
1
|
+
import{C as e,D as t,E as n,O as r,S as i,T as a,_ as o,a as s,b as c,c as l,d as u,f as d,g as f,h as p,i as m,k as h,l as g,m as _,n as v,o as y,p as ee,r as b,s as x,t as te,u as S,v as ne,w as re,x as C,y as ie}from"./index-iBmmgBZv.js";var w=h(r(),1),ae=t(),oe=2e3,se=20,T=class{sentAt=null;samples=[];shownSamples=[];open=null;keySent(e){let t=this.open;return this.open=null,this.sentAt===null&&(this.sentAt=e),t?{arrived:t.arrived,shown:null}:null}output(e){if(this.sentAt===null)return null;let t=e-this.sentAt,n=this.sentAt;return this.sentAt=null,t<0||t>oe?null:(E(this.samples,t),this.open={sentAt:n,arrived:t},t)}rendered(e){let t=this.open;if(!t)return null;this.open=null;let n=e-t.sentAt;return n<0||n>oe?{arrived:t.arrived,shown:null}:(E(this.shownSamples,n),{arrived:t.arrived,shown:n})}median(){return this.samples.length?D(this.samples).median:null}reading(){return this.samples.length?{arrived:D(this.samples),shown:this.shownSamples.length?D(this.shownSamples):null}:null}};function E(e,t){e.push(t),e.length>se&&e.shift()}function D(e){let t=[...e].sort((e,t)=>e-t),n=t.length>>1;return{median:t.length%2?t[n]:(t[n-1]+t[n])/2,worst:t[Math.min(t.length-1,Math.ceil(t.length*.9)-1)]}}function ce(e,t,n=null){let r=t!==`webgl`;if(e===null&&!r)return null;let i=e=>`${Math.round(e)} ms`,a=e?.shown??e?.arrived??null;return{text:[a&&`⌁ ${i(a.median)}${a.worst>a.median*1.5?` (${i(a.worst)})`:``}`,r&&`DOM`].filter(Boolean).join(` · `),title:[e&&`A keystroke, over the last 20 (median, and in brackets the slowest of most of them): its echo arrived in ${i(e.arrived.median)} (${i(e.arrived.worst)}) — browser → PTY host → ConPTY → Claude and back`+(e.shown?`; it was on screen in ${i(e.shown.median)} (${i(e.shown.worst)}) — the frame drawn after it.`:`.`),e&&n===`direct`&&`Connected straight to the PTY host.`,e&&n===`relay`&&"Connected through work web (the PTY host gave no ticket: restart it with `work pty-host --restart`).",r&&`Drawn without the GPU, which is slower while Claude works.`,t===`retrying`&&`The GPU renderer was lost; it is tried again by itself.`,t===`dom`&&`WebGL is unavailable here, or kept getting lost; reloading the page tries it again.`,e&&`Each keystroke and every freeze of this window is written to work’s debug log (terminal-perf).`].filter(Boolean).join(` `),slow:r||(a?.median??0)>100}}var le=200,ue=100,de=class{keys=[];stalls=[];key(e){e&&this.keys.length<le&&this.keys.push({arrived:Math.round(e.arrived),shown:e.shown===null?null:Math.round(e.shown)})}stall(e,t){this.stalls.length>=ue||this.stalls.push({at:t,ms:Math.round(e.duration),blocking:e.blockingDuration===void 0?null:Math.round(e.blockingDuration),what:fe(e)})}take(e){if(!this.keys.length&&!this.stalls.length)return null;let t={...e,keys:this.keys,stalls:this.stalls};return this.keys=[],this.stalls=[],t}};function fe(e){return[...e.scripts??[]].sort((e,t)=>(t.duration??0)-(e.duration??0)).slice(0,3).map(e=>{let t=(e.sourceURL??``).split(`/`).pop()?.split(`?`)[0]??``;return[e.invoker,e.sourceFunctionName,t,e.duration===void 0?``:`${Math.round(e.duration)}ms`].filter(Boolean).join(` `).slice(0,160)}).join(`; `)}function pe(e){let t=typeof PerformanceObserver>`u`?null:PerformanceObserver,n=t?.supportedEntryTypes??[],r=n.includes(`long-animation-frame`)?`long-animation-frame`:n.includes(`longtask`)?`longtask`:null;if(!t||!r)return()=>{};let i=new t(t=>{for(let n of t.getEntries())e(n)});return i.observe({type:r,buffered:!1}),()=>i.disconnect()}async function me(e,t){try{let n=await fetch(`/api/terminals/${encodeURIComponent(e)}/ticket`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({force:t})});return n.status===404&&!(n.headers.get(`content-type`)??``).includes(`json`)?null:await n.json()}catch{return null}}function he(e,t){let n=t.WebSocketImpl??WebSocket,r=t.askTicket??me,i=[],a=[],o=[],s=null,c=!1,l=!1,u=null,d=e=>{let t=new MessageEvent(`message`,{data:e});for(let e of i)e(t)},f=(e=new Event(`close`))=>{if(!l){l=!0;for(let t of a)t(e)}},p=(e,r)=>{if(c)return;u=r?`direct`:`relay`;let a=new n(e);a.binaryType=m.binaryType,s=a;let l=!1;a.addEventListener(`open`,()=>{l=!0;for(let e of o)a.send(e);o.length=0}),a.addEventListener(`message`,e=>{if(s===a)for(let t of i)t(e)}),a.addEventListener(`close`,e=>{if(s===a){if(r&&!l&&!c)return p(t.relayUrl,!1);f(e)}})},m={binaryType:`blob`,addEventListener(e,t){e===`message`?i.push(t):a.push(t)},send(e){s&&s.readyState===n.OPEN?s.send(e):o.push(e)},close(){c=!0,s?s.close():f()},get route(){return u}};return r(e,t.force).then(e=>{if(!c){if(e&&`url`in e)return p(e.url,!0);if(e&&`elsewhere`in e)return d(JSON.stringify(e.elsewhere)),f();if(e&&`error`in e)return d(JSON.stringify({type:`error`,message:e.error})),f();p(t.relayUrl,!1)}}),m}var ge=[3,10,30,60];function _e(e){return e>=0&&e<ge.length?ge[e]*1e3:null}function ve(e){return e?.trim()?e.trim():`the connection closed before it started`}var ye=[2e3,1e4,6e4],be=6e5,xe=class{losses=[];lost(e){return this.losses=this.losses.filter(t=>e-t<be),this.losses.push(e),ye[this.losses.length-1]??null}},Se=/^(\s*)([●⏺⎿])(\s)/u,Ce=/^(?:[-*+•]\s|\d+[.)]\s|#{1,6}\s|>\s|[│┃|┌└├╭╰─━])/u,we=/^(?:[-*+•]|\d+[.)])\s+/u,Te=e=>e.length-e.trimStart().length,Ee=``,De=``,Oe=``,ke=``,Ae=/[\uE000-\uE003]/gu,je=e=>e.replace(Ae,``);function Me(e,t){let n=``,r=0;for(;r<e.length&&t>0;r++)if(/[\uE000-\uE003]/u.test(e[r]))n+=e[r];else if(/\s/u.test(e[r]))t--;else break;return n+e.slice(r)}var Ne=e=>Me(e,Te(je(e)));function Pe(e,t,n){let r=e.split(/\r?\n/).map(e=>{let t=e.replace(/\s+$/u,``);return Se.test(je(t))?t.replace(/[●⏺⎿]/u,` `):t}),i=e=>e===0?n:0,a=[],o=null;for(let e=0;e<r.length;e++){let n=r[e],s=je(n),c=Ne(n),l=s.trimStart(),u=i(e)+Te(s),d=i(e)+s.length;if(o&&l&&o.end+1+(l.split(/\s/u)[0]?.length??0)>t-2&&!Ce.test(l)&&u===o.cont){o.text+=` `+c,o.end=d;continue}if(o&&a.push(o.text),!l){o=null,a.push(``);continue}let f=we.exec(l);o={text:(e===0?``:` `.repeat(Te(s)))+c,cont:u+(f?f[0].length:0),end:d},/[│┃]/u.test(l)&&(a.push(o.text),o=null)}o&&a.push(o.text);let s=a.slice(1).filter(e=>je(e).trim()),c=s.length?Math.min(...s.map(e=>Te(je(e)))):0;return a.map((e,t)=>t===0?Ne(e):Me(e,Math.min(c,Te(je(e))))).join(`
|
|
2
2
|
`)}function Fe(e,t){let n=``;for(let r=t.start.y;r<=t.end.y;r++){let i=e.getLine(r);if(!i)break;let a=r<t.end.y&&!!e.getLine(r+1)?.isWrapped,o=[],s=r===t.end.y?Math.min(t.end.x,i.length):i.length;for(let e=r===t.start.y?t.start.x:0;e<s;e++){let t=i.getCell(e);t&&t.getWidth()!==0&&o.push({ch:t.getChars()||` `,b:!!t.isBold(),i:!!t.isItalic()})}let c=o.length;if(!a)for(;c>0&&o[c-1].ch.trim()===``;)c--;let l=!1,u=!1;for(let e of o.slice(0,c)){let t=e.ch.trim()?e.b:l,r=e.ch.trim()?e.i:u;(t!==l||r!==u)&&(u&&(n+=ke),l&&(n+=De),t&&(n+=Ee),r&&(n+=Oe),l=t,u=r),n+=e.ch}u&&(n+=ke),l&&(n+=De),r<t.end.y&&!a&&(n+=`
|
|
3
3
|
`)}return n}function Ie(e){let t=e.getSelection(),n=e.getSelectionPosition();if(!n)return t;let r=Fe(e.buffer.active,n),i=e=>e.replace(/\r\n/gu,`
|
|
4
4
|
`).replace(/[ \t]+$/gmu,``);return i(je(r))===i(t)?r:t}function Le(e){let t=v(e).replaceAll(Ee,`<b>`).replaceAll(De,`</b>`).replaceAll(Oe,`<i>`).replaceAll(ke,`</i>`).replace(/<\/b>(\s*)<b>/gu,`$1`).replace(/<\/i>(\s*)<i>/gu,`$1`);for(let e=``;e!==t;)e=t,t=t.replace(/(\s+)(<\/[bi]>)/gu,`$2$1`);return t}var Re=/^\s*[│┃|].*[│┃|]\s*$/u,ze=/^\s*(?:[┌├└╭╰┏┣┗┡╞][─━┬┼┴┳╋┻┐┤┘╮╯┓┫┛┩╡═╪╤╧\s]*|\|?(?:\s*:?-{3,}:?\s*\|)+\s*:?-*:?\s*\|?)$/u,Be=e=>e.trim().replace(/^[│┃|]|[│┃|]$/gu,``).split(/[│┃|]/u).map(e=>e.trim());function Ve(e){let t=[[]],n=0;for(let r of e)ze.test(r)?(n++,t[t.length-1].length&&t.push([])):Re.test(r)&&t[t.length-1].push(Be(r));let r=t.filter(e=>e.length);if(!r.length||!r.some(e=>e.some(e=>e.length>1)))return null;let i=r.length>2||r.length===2&&r[1].length===1,a=e=>e[0].map((t,n)=>e.map(e=>e[n]??``).filter(Boolean).join(` `)),o=i?r.map(a):[a(r[0]),...r.slice(1).flat()];return n||o.length>1?o:null}function He(e){let[t,...n]=e,r=(e,t)=>`<tr>${e.map(e=>`<${t}>${v(e)}</${t}>`).join(``)}</tr>`;return`<table><thead>${r(t,`th`)}</thead><tbody>${n.map(e=>r(e,`td`)).join(``)}</tbody></table>`}function Ue(e,t,n=0){let r=Pe(e,t,n).split(`
|
|
@@ -93,4 +93,4 @@ void main() {
|
|
|
93
93
|
`);ke=!0});let Ve=n.onData(e=>{if(ke){e===`\r`&&b(e=>e+1);return}He(e)});function He(e){ke||(Ce?(ce.send(JSON.stringify({type:`input`,data:e})),Fe.key(Ae.keySent(performance.now()))):Ee.push(e))}let We=n.cols,Ge=n.rows,Ke=(e=!1)=>{d.current&&(r.fit(),(e||n.cols!==We||n.rows!==Ge)&&(We=n.cols,Ge=n.rows,Ce&&ce.send(JSON.stringify({type:`resize`,cols:n.cols,rows:n.rows}))))},O=()=>Ke(),k=typeof ResizeObserver<`u`?new ResizeObserver(()=>Ke()):null;k?k.observe(c.current):window.addEventListener(`resize`,O),h.current=()=>{Ke(!0),n.focus()},g.current=e=>{e!==t&&(t=e,n.options.theme={...e.theme},n.options.fontFamily=e.fontFamily,n.options.fontSize=e.fontSize,n.options.lineHeight=e.lineHeight,Ke())};let qe=()=>Ke(!0);return n.textarea?.addEventListener(`focus`,qe),()=>{y=!0,clearTimeout(le),clearTimeout(ge),clearTimeout(_),n.textarea?.removeEventListener(`paste`,w,!0),n.element?.removeEventListener(`copy`,ae,!0),n.textarea?.removeEventListener(`focus`,qe),a.removeEventListener(`contextmenu`,u),a.title=``,s.dispose(),o.clear(),Te.current=null,De(null),h.current=null,g.current=null,k?.disconnect(),window.removeEventListener(`resize`,O),Ve.dispose(),Le.dispose(),clearInterval(Be),Re(),ze(),clearTimeout(Ne);try{ce.close()}catch{}n.dispose()}},[e,y]),(0,w.useEffect)(()=>{g.current?.(f)},[f]);let Me=()=>{we(!0),b(e=>e+1)};(0,w.useEffect)(()=>{if(!se||!a)return;let e=setInterval(()=>{document.visibilityState===`visible`&&Me()},Jp);return()=>clearInterval(e)},[se,a]);let Ne=async()=>{await n(`Start this session's Claude here?
|
|
94
94
|
|
|
95
95
|
If it is still open in another terminal, both would write to the same conversation.`,{ok:`Start it here`})&&(D.current=!0,E(null),b(e=>e+1))},Pe=t?`work tree ${t}${r?` ${r}`:``}`:`work tree <target> <branch>`,Fe=ce(le,ge,fe);return(0,$.jsxs)($.Fragment,{children:[se&&(0,$.jsxs)(`div`,{className:`wd-pty-elsewhere`,role:`status`,children:[(0,$.jsxs)(`p`,{className:`wd-pty-elsewhere-title`,children:[se.confirmed?`This session’s Claude is open in another terminal`:`This session’s Claude seems to be running in another terminal`,se.lastActivity!==null&&(0,$.jsxs)($.Fragment,{children:[` (last wrote `,Xp(se.lastActivity),`)`]}),se.state===`needs_input`&&(0,$.jsx)($.Fragment,{children:`, waiting for your answer there`}),`.`]}),(0,$.jsxs)(`p`,{children:[`Close it there (type `,(0,$.jsx)(`code`,{children:`/exit`}),`) and this tab attaches by itself — it checks every few seconds. To have both show the same screen instead, restart it with `,(0,$.jsx)(`code`,{children:Pe}),` (Ctrl+] detaches, Claude keeps running).`]}),(0,$.jsxs)(`p`,{className:`wd-pty-elsewhere-actions`,children:[(0,$.jsx)(`button`,{type:`button`,className:`wd-btn-secondary`,onClick:Me,disabled:Ce,children:Ce?`Checking…`:`Check again`}),!se.confirmed&&(0,$.jsx)(`button`,{type:`button`,className:`wd-link-button`,onClick:()=>void Ne(),children:`It's not running — start it here…`})]})]}),(0,$.jsxs)(`div`,{className:`wd-pty-frame`,style:se?{display:`none`}:void 0,children:[(0,$.jsx)(`div`,{ref:c,className:`wd-pty-host`}),Fe&&(0,$.jsx)(`span`,{className:`wd-pty-latency`+(Fe.slow?` wd-pty-latency-slow`:``),title:Fe.title,children:Fe.text}),_!==`ready`&&!se&&!x&&(0,$.jsx)(`div`,{className:`wd-pty-connecting`,role:`status`,children:_===`starting`?`Starting Claude — resuming the conversation…`:`Connecting…`}),_!==`ready`&&!se&&x&&(0,$.jsxs)(`div`,{className:`wd-pty-connecting wd-pty-failed`,role:`alert`,children:[(0,$.jsxs)(`p`,{children:[`Couldn't start Claude: `,x.reason,`.`]}),(0,$.jsxs)(`p`,{children:[x.retryAt===null?`Stopped trying on its own.`:(0,$.jsx)(Qp,{at:x.retryAt}),` `,(0,$.jsx)(`button`,{type:`button`,className:`wd-btn-secondary`,onClick:()=>{oe.current=0,S(null),b(e=>e+1)},children:x.retryAt===null?`Try again`:`Try now`})]})]})]}),Ee&&(0,ae.createPortal)((0,$.jsx)(i,{x:Ee.x,y:Ee.y,items:u(Ee.link.result,ee(navigator.userAgent)).map((t,n)=>({label:t.label,separated:t.id===`copy`&&n>0,run:()=>Kp(e,t.id,Ee.link,ke)})),footer:Ee.link.result.path??void 0,onClose:()=>De(null)}),document.body),Oe&&(0,ae.createPortal)((0,$.jsx)(ne,{toast:Oe,onClose:Ae}),document.body)]})}function Qp({at:e}){let[t,n]=(0,w.useState)(()=>Date.now());return(0,w.useEffect)(()=>{let e=setInterval(()=>n(Date.now()),1e3);return()=>clearInterval(e)},[]),(0,$.jsxs)($.Fragment,{children:[`Trying again in `,Math.max(1,Math.ceil((e-t)/1e3)),` s…`]})}export{Jp as ELSEWHERE_RECHECK_MS,Zp as PtyView,Wp as openLink};
|
|
96
|
-
//# sourceMappingURL=PtyView-
|
|
96
|
+
//# sourceMappingURL=PtyView-CYAhB_pW.js.map
|