@dylanpiercey/work 0.0.159 → 0.0.160
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/bin/work.mjs +57 -16
- package/dist/{_B8Ruz8T9.js → _BRBF-t9p.js} +9 -7
- package/dist/_Cr-5sjB_.js +2 -0
- package/dist/index.mjs +362 -362
- package/dist/public/assets/_BU6w6X4q.js +1 -0
- package/dist/public/assets/_BbqN_0Hf.js +1 -0
- package/dist/public/assets/_BfEhpnxc.js +1 -0
- package/dist/public/assets/_Bjs6hRWD.js +1 -0
- package/dist/public/assets/_BjtlvkCt.js +1 -0
- package/dist/public/assets/_BnZSGKpL.js +1 -0
- package/dist/public/assets/_BnepJiz-.js +1 -0
- package/dist/public/assets/{_DrrcCvtP.js → _BpIalLUl.js} +1 -1
- package/dist/public/assets/_BpIalLUl.js.br +0 -0
- package/dist/public/assets/_BvcYfwFl.js +1 -0
- package/dist/public/assets/_C0zwP2qH.js +1 -0
- package/dist/public/assets/_C9oWRx13.js +1 -0
- package/dist/public/assets/_CC3Ffsld.js +1 -0
- package/dist/public/assets/_ClG30-Cs.js +1 -0
- package/dist/public/assets/_CxFNOCPZ.js +1 -0
- package/dist/public/assets/{_DzlXAMSp.js → _D6gBuUWs.js} +4 -4
- package/dist/public/assets/_D6gBuUWs.js.br +0 -0
- package/dist/public/assets/_D9-BvOKl.js +1 -0
- package/dist/public/assets/_D_opOE0v.js +1 -0
- package/dist/public/assets/_DdJpsshP.js +1 -0
- package/dist/public/assets/_L9P-Lxf4.js +1 -0
- package/dist/public/assets/{_DgrVjbbj.js → __CI6owKB.js} +4 -4
- package/dist/public/assets/__CI6owKB.js.br +0 -0
- package/dist/public/assets/_dvB7DobJ.js +1 -0
- package/dist/public/assets/_o7CRZZeJ.js +1 -0
- package/dist/public/assets/{app-page-DkJHV2Hb.css → app-page-DyrVoVeZ.css} +1 -1
- package/dist/public/assets/app-page-DyrVoVeZ.css.br +0 -0
- package/dist/public/assets/diff-view-DH-5ACi2.js +2 -0
- package/dist/public/assets/{diff-view-D_kTcxOl.css → diff-view-DKJzuUb0.css} +1 -1
- package/dist/public/assets/diff-view-DKJzuUb0.css.br +0 -0
- package/dist/public/assets/{icon-arrow-down-ptjlirxL.css → icon-arrow-down-Bh8nsodJ.css} +1 -1
- package/dist/public/assets/icon-arrow-down-Bh8nsodJ.css.br +0 -0
- package/dist/public/assets/new-qqqf-1EI.js +1 -0
- package/dist/public/assets/settings-qqqf-1EI.js +1 -0
- package/dist/public/assets/w-qqqf-1EI.js +1 -0
- package/dist/public/assets/w._-Bmrox8Ci.js +1 -0
- package/dist/public/assets/w._-qqqf-1EI.js +1 -0
- package/package.json +1 -1
- package/dist/_wmfv4tOT.js +0 -2
- package/dist/public/assets/_BEMlWJ3i.js +0 -1
- package/dist/public/assets/_BF3jdOKL.js +0 -1
- package/dist/public/assets/_BN2MNMec.js +0 -1
- package/dist/public/assets/_BX85X6vL.js +0 -1
- package/dist/public/assets/_BgTyVBoz.js +0 -1
- package/dist/public/assets/_BtPnCFTI.js +0 -1
- package/dist/public/assets/_C62EU_76.js +0 -1
- package/dist/public/assets/_C9t1K6t0.js +0 -1
- package/dist/public/assets/_CV1AUMfT.js +0 -1
- package/dist/public/assets/_DONc62ot.js +0 -1
- package/dist/public/assets/_DQxAgIZ5.js +0 -1
- package/dist/public/assets/_DRrf0ps3.js +0 -1
- package/dist/public/assets/_DUwNzfo2.js +0 -1
- package/dist/public/assets/_DgrVjbbj.js.br +0 -0
- package/dist/public/assets/_DliuBq2F.js +0 -1
- package/dist/public/assets/_DrrcCvtP.js.br +0 -0
- package/dist/public/assets/_Dt9shJET.js +0 -1
- package/dist/public/assets/_DzlXAMSp.js.br +0 -0
- package/dist/public/assets/_KbIm5gXb.js +0 -1
- package/dist/public/assets/_kP4m5eyY.js +0 -1
- package/dist/public/assets/_kRAx7xJD.js +0 -1
- package/dist/public/assets/_wGg-Flxh.js +0 -1
- package/dist/public/assets/app-page-DkJHV2Hb.css.br +0 -0
- package/dist/public/assets/diff-view-B7Akkn43.js +0 -2
- package/dist/public/assets/diff-view-D_kTcxOl.css.br +0 -0
- package/dist/public/assets/icon-arrow-down-ptjlirxL.css.br +0 -0
- package/dist/public/assets/new-CjRAL7y8.js +0 -1
- package/dist/public/assets/settings-CjRAL7y8.js +0 -1
- package/dist/public/assets/w-CjRAL7y8.js +0 -1
- package/dist/public/assets/w._-CjRAL7y8.js +0 -1
- package/dist/public/assets/w._-DvPeuuNc.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$input_onSent as e}from"./_D6gBuUWs.js";export{e as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$input_onFileChange as e}from"./_D6gBuUWs.js";export{e as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$input_findTick as e}from"./_D6gBuUWs.js";export{e as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$input_focusFile as e}from"./_D6gBuUWs.js";export{e as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$input_findTickChange as e}from"./_D6gBuUWs.js";export{e as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$input_workspaceName as e}from"./_D6gBuUWs.js";export{e as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$input_onExit as e}from"./_D6gBuUWs.js";export{e as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{H as e,L as t,N as n,P as r,R as i,U as a,a as o,b as s,g as ee,h as te,i as c,v as ne,w as re,y as ie,z as l}from"./_BOllftHQ.js";var u=!0,d=new Set;function ae(){return u}function f(e){if(u!==e){u=e;for(let t of d)t(e)}}function oe(e){return d.add(e),()=>d.delete(e)}var p=`work:auth-reload`,m=!1;function h(){if(!(typeof location>`u`||m)){try{if(sessionStorage.getItem(p))return;sessionStorage.setItem(p,`1`)}catch{}m=!0,location.reload()}}function se(){try{sessionStorage.removeItem(p)}catch{}}function g(e){if(e.status===401||e.status===403||e.type===`opaqueredirect`||e.redirected&&new URL(e.url).origin!==location.origin)return!0;let t=e.headers.get(`content-type`)||``;return!!(t.includes(`text/html`)&&!t.includes(`json`))}async function ce(){try{let e=await fetch(`/api/boot`,{credentials:`same-origin`,cache:`no-store`,redirect:`manual`});return g(e)?(h(),!1):(e.ok&&se(),e.ok)}catch{return!0}}function le(e){let t=async()=>{if(!e?.aborted){try{let e=await fetch(`/api/boot`,{credentials:`same-origin`,cache:`no-store`,redirect:`manual`});if(g(e))return h();if(e.ok){m=!0,location.reload();return}}catch{}setTimeout(t,2e3)}};t()}async function _(e,t){let n=await fetch(e,t);if(g(n))throw h(),Error(`session expired`);let r;try{r=await n.json()}catch{throw g(n)?(h(),Error(`session expired`)):Error(n.ok?`invalid response`:`HTTP ${n.status}`)}if(r&&typeof r==`object`&&r.error)throw Error(r.error);if(!n.ok)throw Error(`HTTP ${n.status}`);return se(),f(!0),r}function ue(e){let t=e instanceof Error?e.message:String(e);return/HTTP 502|HTTP 503|HTTP 504|Failed to fetch|NetworkError|Load failed|ECONNREFUSED|session expired/i.test(t)}var de=new Set([`workspaces.changed`,`sessions.changed`,`workspace.progress`,`review.changed`,`status.changed`]),fe=1e4,pe=4e4,me=8e3,he=5e3,ge=6e4,_e=6e3,ve=4e3,v,y,b=null,x,S,C,w,T,E,D=0,ye=0,be=0,xe=0,Se=1e3;function Ce(){return!!b&&b.readyState===WebSocket.OPEN&&!D}function O(e){v?.dispatchEvent(new MessageEvent(`sse.health`,{data:{healthy:e}}))}function k(e){y&&e!==y&&location.reload(),y=e}async function A(){try{k((await _(`/api/boot`)).boot),f(!0)}catch{}}function j(){let e=Date.now();if(e-xe<Se)return;xe=e;let t=e-Math.max(ye,be)>pe;b&&t&&(F(),D||P()),I(),!(!t&&b&&!D)&&(A(),Te())}function M(){ye=Date.now(),clearTimeout(S),clearTimeout(C),clearTimeout(E),E=void 0,C=setTimeout(P,pe),f(!0),D&&(D=0,clearInterval(w),w=void 0,O(!0))}function N(){_(`/api/status`).then(e=>{f(!0),v.dispatchEvent(new MessageEvent(`status.changed`,{data:e}))}).catch(()=>f(!1))}function P(){F(),!D&&(D=Date.now(),O(!1),ce(),w=setInterval(()=>{document.visibilityState===`visible`&&(Date.now()-D>ge&&(D=Date.now(),I()),Te(),A(),N())},he),N())}function we(){clearInterval(T),T=setInterval(()=>{if(document.visibilityState===`visible`&&!(!b||b.readyState!==WebSocket.OPEN||E)){try{b.send(`ping`)}catch{P();return}E=setTimeout(P,ve)}},_e)}function F(){clearTimeout(S),clearTimeout(C),clearTimeout(E),E=void 0,clearInterval(T),T=void 0;let e=b;b=null,e&&(e.onopen=null,e.onmessage=null,e.onerror=null,e.onclose=null,(e.readyState===WebSocket.OPEN||e.readyState===WebSocket.CONNECTING)&&e.close())}function Te(){for(let e of[`workspaces.changed`,`sessions.changed`])v.dispatchEvent(new MessageEvent(e,{data:null}))}function I(){if(b&&(b.readyState===WebSocket.OPEN||b.readyState===WebSocket.CONNECTING))return;let e=location.protocol===`https:`?`wss`:`ws`,t=b=new WebSocket(`${e}://${location.host}/api/events`);be=Date.now(),clearTimeout(S),S=setTimeout(P,me),t.onmessage=e=>{let t;try{t=JSON.parse(String(e.data))}catch{return}let n=t.type;if(n){if(n===`hello`){M(),O(!0),k(t.data?.boot),we();return}if(n===`ping`){M();return}de.has(n)&&(M(),v.dispatchEvent(new MessageEvent(n,{data:t.data??null})))}},t.onerror=()=>{},t.onclose=()=>{b===t&&(b=null,D||P())}}function Ee(){return v||(v=new EventTarget,I(),A(),oe(e=>v?.dispatchEvent(new MessageEvent(`app.reachable`,{data:{reachable:e}}))),window.addEventListener(`offline`,()=>f(!1)),window.addEventListener(`online`,j),window.addEventListener(`pageshow`,j),window.addEventListener(`focus`,j),document.addEventListener(`visibilitychange`,()=>{document.visibilityState===`visible`?(clearTimeout(x),j()):(clearTimeout(x),x=setTimeout(()=>{D||F()},fe))})),v}var L=new Map,De=new Set,Oe;function ke(e){for(let[t,n]of Object.entries(e))De.has(t)||L.set(t,n);typeof window<`u`&&(Oe??=Promise.resolve())}function Ae(){return typeof window>`u`?Promise.resolve():Oe??=(async()=>{try{let e=await fetch(`/api/prefs`);if(g(e)){h();return}ke(await e.json())}catch{}})()}function R(e){return L.get(e)??null}function z(e,t){De.add(e),t===null?L.delete(e):L.set(e,t),je(e,t)}function je(e,t){return fetch(`/api/prefs`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({key:e,value:t}),keepalive:!0}).catch(()=>{})}function Me(e){z(`last-workspace`,e)}function Ne(){return R(`side-nav`)!==`0`}function Pe(e){z(`side-nav`,e?`1`:`0`)}function Fe(e){return R(`tab:${e}`)}function Ie(e,t){z(`tab:${e}`,t)}function Le(){return R(`diff-tree`)!==`0`}function Re(e){z(`diff-tree`,e?`1`:`0`)}function ze(){let e=R(`diff-scope`);return e===`working`||e===`dirty`?e:`committed`}function Be(e){z(`diff-scope`,e)}function Ve(e){return R(`diff-filter:${e}`)||``}function He(e,t){z(`diff-filter:${e}`,t||null)}function Ue(e){let t=R(`diff-pos:${e}`);if(!t)return null;try{let e=JSON.parse(t);return e&&typeof e.key==`string`?e:null}catch{return null}}function We(e,t){z(`diff-pos:${e}`,t?JSON.stringify(t):null)}function Ge(e){z(`setup-later`,e?`1`:null)}function B(){let e=R(`sso-ignored`);if(!e)return[];try{let t=JSON.parse(e);return Array.isArray(t)?t.filter(e=>typeof e==`string`):[]}catch{return[]}}function Ke(e){let t=new Set(B());t.add(e),z(`sso-ignored`,JSON.stringify([...t].sort()))}function qe(e){let t=B().filter(t=>t!==e);z(`sso-ignored`,t.length?JSON.stringify(t):null)}function Je(){let e=R(`theme`);return e===`light`||e===`dark`?e:`system`}function Ye(e){z(`theme`,e===`system`?null:e)}function V(e){if(e.view===`settings`)return`/settings`;if(e.view===`new`)return`/new`;if(!e.workspaceId)return`/`;let t=`/w/${encodeURIComponent(e.workspaceId)}`;if(e.view===`diff`){let n=new URLSearchParams;e.pr&&n.set(`pr`,e.pr),e.scope&&e.scope!==`committed`&&n.set(`scope`,e.scope),e.file&&n.set(`file`,e.file);let r=n.toString();return`${t}/review${r?`?${r}`:``}`}return e.view===`manage`?`${t}/manage`:`${t}${e.sessionId?`?s=${encodeURIComponent(e.sessionId)}`:``}`}function Xe(e){let t=e.pathname.replace(/\/+$/,``)||`/`;if(t===`/settings`)return{workspaceId:null,view:`settings`};if(t===`/new`)return{workspaceId:null,view:`new`};let n=/^\/w\/([^/]+)(?:\/(review|manage))?$/.exec(t);if(!n)return t===`/`?{workspaceId:null,view:`term`}:null;let r=decodeURIComponent(n[1]),i=new URLSearchParams(e.search);if(n[2]===`review`){let e=i.get(`scope`);return{workspaceId:r,view:`diff`,pr:i.get(`pr`),scope:e===`working`||e===`dirty`?e:null,file:i.get(`file`)}}return n[2]===`manage`?{workspaceId:r,view:`manage`}:{workspaceId:r,view:`term`,sessionId:i.get(`s`)}}function Ze(e,t){if(typeof history>`u`)return;let n=V(e);location.pathname+location.search!==n&&(t&&t.workspaceId===e.workspaceId&&t.view===e.view?history.replaceState:history.pushState).call(history,null,``,n)}function Qe(){return typeof window<`u`&&window.matchMedia(`(pointer: coarse)`).matches}function $e(){return typeof window<`u`&&window.matchMedia(`(max-width: 899px)`).matches}function H(){return typeof navigator<`u`&&navigator.standalone===!0}function et(e,t){if(!/^https?:\/\//.test(e)){window.open(e,`_blank`,`noopener`);return}if(t?.system&&H()){location.href=`x-safari-${e}`;return}if(!H()){window.open(e,`_blank`,`noopener`);return}if(localStorage.getItem(`xSafariOk`)){location.href=`x-safari-${e}`;return}if(localStorage.getItem(`xSafariNo`)){window.open(e,`_blank`,`noopener`);return}let n=!1,r=()=>{document.visibilityState===`hidden`&&(n=!0,localStorage.setItem(`xSafariOk`,`1`))};document.addEventListener(`visibilitychange`,r),window.addEventListener(`pagehide`,r),setTimeout(()=>{document.removeEventListener(`visibilitychange`,r),window.removeEventListener(`pagehide`,r),!(n||document.visibilityState===`hidden`)&&(localStorage.setItem(`xSafariNo`,`1`),window.open(e,`_blank`,`noopener`))},1500),location.href=`x-safari-${e}`}var tt={working:`_B`,waiting:`_C`,idle:`_D`,off:`_E`},nt=`_L _q`,rt=`_M _q`,it={accent:`_Q`,ok:`_R`,warn:`_S`,danger:`_T`,merged:`_U`,closed:`_V`},at=`_Y _X`,ot=`_0 _Z`,st=`_4 _l`,U=`_5 _l`,ct=`_6 _l`,lt=`_7 _l`;function ut(e){let t=e.split(`/`);return t.length>=3&&t[0].includes(`.`)?`https://${t[0]}/${t.slice(1).join(`/`)}`:`https://github.com/${e}`}function dt(e){let t=e.trim(),n=/^(?:https?|ssh):\/\/(?:[^@/\s]+@)?([a-z0-9.-]+)(?::\d+)?\/([\w.-]+)\/([\w.-]*?)(?:\.git)?\/?$/i.exec(t)||/^[\w.-]+@([a-z0-9.-]+):([\w.-]+)\/([\w.-]*?)(?:\.git)?$/i.exec(t);if(!n)return null;let r=n[1].toLowerCase();if(!r.includes(`.`)||!n[3])return null;let i=`${n[2]}/${n[3]}`;return r===`github.com`?i:`${r}/${i}`}var W=`github.com`;function ft(e){let t=(e||[]).filter(e=>e.authed).map(e=>e.host);W=t.includes(`github.com`)||t.length!==1?`github.com`:t[0]}function pt(e){let t=e.split(`/`);return t.length>=3&&t[0].includes(`.`)&&t[0]===W?t.slice(1).join(`/`):e}var mt={error:`_bm`,warn:`_bn`,info:`_bo`},ht={error:`_bp`,warn:`_bq`,info:`_br`},gt={sm:12,md:14,lg:16,xl:18},G=`<svg viewBox="0 0 24 24" fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round aria-hidden=true><path></path></svg>`,K=` D l`,_t=(e,t)=>{c(e.a,`width`,t),c(e.a,`height`,t)},q=(e,t)=>_t(e,t??gt.md),J=(e,t)=>o(e.a,[`_m`,t]),Y=(e,t)=>c(e.b,`d`,t),vt=G,yt=(e=>`/${e}&`)(K);function bt(e){Y(e.a,`M6.75827 17.2426L12.0009 12M17.2435 6.75736L12.0009 12M12.0009 12L6.75827 6.75736M12.0009 12L17.2435 17.2426`)}var xt=(e,t)=>q(e.a,t),St=(e,t)=>J(e.a,t),Ct=`<div><div><!><!></div><!></div>`,wt=` D D%b%l%l`,Tt=e(`G0`,e=>i(e.a,`click`,function(){e._._.o?.()})),Et=e=>{o(e.a,[U,`_bw`]),bt(e.b),xt(e.b,14),St(e.b),Tt(e)},Dt=re(0),Ot=ie(25,e=>Dt(e,e._._.n),e=>e._._),kt=n(1,`<!><!><!>`,`b%`,Ot),At=r(4,0,e=>{o(e.a,[`_bu`,e._.m&&`_bv`]),kt(e,+!e._.m)}),jt=e=>{At._(e),Nt._(e)},Mt=n(2,(e=>`<button type=button title=Dismiss aria-label=Dismiss>${e}</button>`)(vt),(e=>` D/${e}&l`)(yt),Et),Nt=r(4,0,e=>Mt(e,+!e._.o)),Pt=re(1),Ft=r(3,0,e=>Pt(e,e._.l)),It=e=>{Ft._(e),o(e.a,`_bt`)},Lt=r(2,0,e=>a(e.b,e._.j)),Rt=e=>{Lt._(e),X._(e)},X=r(2,0,e=>o(e.a,ht[e._.r])),Z=l(21,e=>o(e.a,[`_bj`,mt[e.r],e.u,e.k]),2),zt=s(17,e=>{c(e.a,`role`,e.r===`error`?`alert`:`status`),Z(e),X(e)}),Bt=(e,t)=>zt(e,t||`error`),Vt=s(20,Z),Ht=e(`G1`,e=>t(e,{onDismiss:e.o,placement:e.s,onMount:function(){let e=new AbortController;return this.placement===`float`&&this.onDismiss&&window.addEventListener(`keydown`,e=>{e.key===`Escape`&&(document.querySelector(`dialog[open]`)||e.target instanceof HTMLInputElement&&e.target.value||(e.stopPropagation(),this.onDismiss?.()))},{capture:!0,signal:e.signal}),{abort:e}},onDestroy:function(){this.abort.abort()}})),Ut=l(19,Ht),Wt=s(18,e=>{Vt(e,{float:`_bk`,inline:`_bl`}[e.s]),Ut(e)}),Gt=(e,t)=>Wt(e,t||`float`),Kt=s(10,Z),qt=e(`G2`,e=>ee(e,`a`)),Jt=s(16,e=>{te(e,`a`,e.q,{class:1,role:1}),qt(e)});function Yt(e){o(e.b,`_bs`)}var Xt=n(2,`<strong> </strong>`,` D `,Rt),Zt=s(9,e=>{Xt(e,+!e.j),Lt(e)}),Qt=n(3,`<div><!></div>`,` D%`,It),$t=s(11,e=>{Qt(e,+!e.l),Ft(e)}),en=n(4,`<div><!><!></div>`,` D%b%`,jt),tn=l(15,e=>en(e,e.m||e.o?0:1)),nn=s(12,e=>{an(e,e.m?.content),tn(e),At(e)}),rn=s(14,e=>{tn(e),Ut(e),Nt(e)}),an=s(13,ne(Ot)),on=`#fafafa`,sn=`#131316`,Q=new Set;function cn(){if(typeof document>`u`)return`system`;let e=document.documentElement.dataset.theme;return e===`light`||e===`dark`?e:`system`}function ln(e){return Q.add(e),()=>Q.delete(e)}function un(e){if(typeof document>`u`)return;let t=document.documentElement;e===`system`?t.removeAttribute(`data-theme`):t.setAttribute(`data-theme`,e),dn(e,t.style.getPropertyValue(`--accent`).trim()||``);for(let t of Q)t(e)}function dn(e,t){if(typeof document>`u`)return;let n=document.head;for(let e of n.querySelectorAll(`meta[name="theme-color"]`))e.remove();let r=(e,t)=>{let r=document.createElement(`meta`);r.name=`theme-color`,r.content=e,t&&(r.media=t),n.append(r)};e===`light`?r(t||on):e===`dark`?r(t||sn):(r(t||on,`(prefers-color-scheme: light)`),r(t||sn,`(prefers-color-scheme: dark)`))}var fn=`_ch _N _O`,pn=`_5 _l`,mn=G,hn=(e=>`/${e}&`)(K);function gn(e){Y(e.a,`M21.8883 13.5C21.1645 18.3113 17.013 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C16.1006 2 19.6248 4.46819 21.1679 8 M17 8H21.4C21.7314 8 22 7.73137 22 7.4V3`)}var _n=(e,t)=>q(e.a,t),vn=(e,t)=>J(e.a,t),yn=G,bn=(e=>`/${e}&`)(K);function xn(e){Y(e.a,`M15 6L9 12L15 18`)}var Sn=(e,t)=>q(e.a,t),Cn=(e,t)=>J(e.a,t),wn=G,Tn=(e=>`/${e}&`)(K);function En(e){Y(e.a,`M9 6L15 12L9 18`)}var Dn=(e,t)=>q(e.a,t),On=(e,t)=>J(e.a,t),kn=G,An=(e=>`/${e}&`)(K);function jn(e){Y(e.a,`M17 17L21 21 M3 11C3 15.4183 6.58172 19 11 19C13.213 19 15.2161 18.1015 16.6644 16.6493C18.1077 15.2022 19 13.2053 19 11C19 6.58172 15.4183 3 11 3C6.58172 3 3 6.58172 3 11Z`)}var Mn=(e,t)=>q(e.a,t),Nn=(e,t)=>J(e.a,t),Pn=G,Fn=(e=>`/${e}&`)(K);function In(e){Y(e.a,`M12 21L12 3M12 3L20.5 11.5M12 3L3.5 11.5`)}var Ln=(e,t)=>q(e.a,t),Rn=(e,t)=>J(e.a,t),zn=G,Bn=(e=>`/${e}&`)(K);function Vn(e){Y(e.a,`M19 21L5 21C3.89543 21 3 20.1046 3 19L3 5C3 3.89543 3.89543 3 5 3L19 3C20.1046 3 21 3.89543 21 5L21 19C21 20.1046 20.1046 21 19 21Z M9.5 21V3 M5.5 10L7.25 12L5.5 14`)}var Hn=(e,t)=>q(e.a,t),Un=(e,t)=>J(e.a,t);async function Wn(e){try{return await navigator.clipboard.writeText(e),!0}catch{let t=document.createElement(`textarea`);t.value=e,t.style.cssText=`position:fixed;top:-100px;opacity:0;`,document.body.append(t),t.focus(),t.select();let n=document.execCommand(`copy`);return t.remove(),n}}function Gn(e,t){if(!e)return-1;let n=e.toLowerCase(),r=t.toLowerCase(),i=r.lastIndexOf(`/`),a=r.slice(i+1),o=r.slice(0,Math.max(0,i)).includes(n)?5:0;return a===n?1e3+o:a.startsWith(n)?800+o:a.includes(n)?600+o:$(n,a)?400+o:r.includes(n)?300:$(n,r)?100:-1}function Kn(e,t,n){return e?t.map(t=>({repo:t,score:Gn(e,t.nameWithOwner)})).filter(({repo:e,score:t})=>!e.isArchived&&t>=0&&!n(e.nameWithOwner)).sort((e,t)=>t.score-e.score||e.repo.nameWithOwner.length-t.repo.nameWithOwner.length||e.repo.nameWithOwner.localeCompare(t.repo.nameWithOwner)).slice(0,8).map(({repo:e})=>e):[]}function qn(e,t){return e?t.map(t=>({branch:t,score:Gn(e,t)})).filter(({score:e})=>e>=0).sort((e,t)=>t.score-e.score||e.branch.length-t.branch.length||e.branch.localeCompare(t.branch)).map(({branch:e})=>e):t}function $(e,t){if(!e)return!0;let n=0,r=t.toLowerCase();for(let t of e.toLowerCase()){if(n=r.indexOf(t,n),n===-1)return!1;n++}return!0}var Jn=null;function Yn(e,t){Jn={cols:e,rows:t}}function Xn(){return Jn}var Zn=`_cw _n`,Qn=`_cz _l`,$n=G,er=(e=>`/${e}&`)(K);function tr(e){Y(e.a,`M12 3L12 21M12 21L20.5 12.5M12 21L3.5 12.5`)}var nr=(e,t)=>q(e.a,t),rr=(e,t)=>J(e.a,t);export{Kt as $,Ye as $t,Dn as A,tt as At,_n as B,Ue as Bt,Fn as C,nt as Ct,kn as D,st as Dt,jn as E,U as Et,Sn as F,et as Ft,fn as G,B as Gt,mn as H,Le as Ht,xn as I,Xe as It,ln as J,Be as Jt,un as K,He as Kt,yn as L,Ze as Lt,wn as M,H as Mt,Tn as N,$e as Nt,An as O,ot as Ot,Cn as P,Qe as Pt,Jt as Q,Pe as Qt,bn as R,V as Rt,Pn as S,rt as St,Mn as T,ct as Tt,hn as U,ke as Ut,gn as V,ze as Vt,pn as W,Ke as Wt,nn as X,Me as Xt,dn as Y,Re as Yt,$t as Z,Ge as Zt,zn as _,gt as _t,er as a,Fe as an,Zt as at,Ln as b,ut as bt,Xn as c,_ as cn,xt as ct,qn as d,le as dn,yt as dt,Ie as en,Bt as et,Kn as f,ae as fn,J as ft,Vn as g,K as gt,Hn as h,G as ht,$n as i,qe as in,Ct as it,En as j,it as jt,On as k,at as kt,Yn as l,ue as ln,bt as lt,Un as m,q as mt,nr as n,Ae as nn,rn as nt,Qn as o,Ee as on,wt as ot,Wn as p,Y as pt,cn as q,We as qt,tr as r,Je as rn,Yt as rt,Zn as s,Ce as sn,St as st,rr as t,Ne as tn,Gt as tt,$ as u,ce as un,vt as ut,Bn as v,dt as vt,Nn as w,lt as wt,In as x,ft as xt,Rn as y,pt as yt,vn as z,Ve as zt};
|
|
1
|
+
import{H as e,L as t,N as n,P as r,R as i,U as a,a as o,b as s,g as ee,h as te,i as c,v as ne,w as re,y as ie,z as l}from"./_BOllftHQ.js";var u=!0,d=new Set;function ae(){return u}function f(e){if(u!==e){u=e;for(let t of d)t(e)}}function oe(e){return d.add(e),()=>d.delete(e)}var p=`work:auth-reload`,m=!1;function h(){if(!(typeof location>`u`||m)){try{if(sessionStorage.getItem(p))return;sessionStorage.setItem(p,`1`)}catch{}m=!0,location.reload()}}function se(){try{sessionStorage.removeItem(p)}catch{}}function g(e){if(e.status===401||e.status===403||e.type===`opaqueredirect`||e.redirected&&new URL(e.url).origin!==location.origin)return!0;let t=e.headers.get(`content-type`)||``;return!!(t.includes(`text/html`)&&!t.includes(`json`))}async function ce(){try{let e=await fetch(`/api/boot`,{credentials:`same-origin`,cache:`no-store`,redirect:`manual`});return g(e)?(h(),!1):(e.ok&&se(),e.ok)}catch{return!0}}function le(e){let t=async()=>{if(!e?.aborted){try{let e=await fetch(`/api/boot`,{credentials:`same-origin`,cache:`no-store`,redirect:`manual`});if(g(e))return h();if(e.ok){m=!0,location.reload();return}}catch{}setTimeout(t,2e3)}};t()}async function _(e,t){let n=await fetch(e,t);if(g(n))throw h(),Error(`session expired`);let r;try{r=await n.json()}catch{throw g(n)?(h(),Error(`session expired`)):Error(n.ok?`invalid response`:`HTTP ${n.status}`)}if(r&&typeof r==`object`&&r.error)throw Error(r.error);if(!n.ok)throw Error(`HTTP ${n.status}`);return se(),f(!0),r}function ue(e){let t=e instanceof Error?e.message:String(e);return/HTTP 502|HTTP 503|HTTP 504|Failed to fetch|NetworkError|Load failed|ECONNREFUSED|session expired/i.test(t)}var de=new Set([`workspaces.changed`,`sessions.changed`,`workspace.progress`,`review.changed`,`status.changed`]),fe=1e4,pe=4e4,me=8e3,he=5e3,ge=6e4,_e=6e3,ve=4e3,v,y,b=null,x,S,C,w,T,E,D=0,ye=0,be=0,xe=0,Se=1e3;function Ce(){return!!b&&b.readyState===WebSocket.OPEN&&!D}function O(e){v?.dispatchEvent(new MessageEvent(`sse.health`,{data:{healthy:e}}))}function k(e){y&&e!==y&&location.reload(),y=e}async function A(){try{k((await _(`/api/boot`)).boot),f(!0)}catch{}}function j(){let e=Date.now();if(e-xe<Se)return;xe=e;let t=e-Math.max(ye,be)>pe;b&&t&&(F(),D||P()),I(),!(!t&&b&&!D)&&(A(),Te())}function M(){ye=Date.now(),clearTimeout(S),clearTimeout(C),clearTimeout(E),E=void 0,C=setTimeout(P,pe),f(!0),D&&(D=0,clearInterval(w),w=void 0,O(!0))}function N(){_(`/api/status`).then(e=>{f(!0),v.dispatchEvent(new MessageEvent(`status.changed`,{data:e}))}).catch(()=>f(!1))}function P(){F(),!D&&(D=Date.now(),O(!1),ce(),w=setInterval(()=>{document.visibilityState===`visible`&&(Date.now()-D>ge&&(D=Date.now(),I()),Te(),A(),N())},he),N())}function we(){clearInterval(T),T=setInterval(()=>{if(document.visibilityState===`visible`&&!(!b||b.readyState!==WebSocket.OPEN||E)){try{b.send(`ping`)}catch{P();return}E=setTimeout(P,ve)}},_e)}function F(){clearTimeout(S),clearTimeout(C),clearTimeout(E),E=void 0,clearInterval(T),T=void 0;let e=b;b=null,e&&(e.onopen=null,e.onmessage=null,e.onerror=null,e.onclose=null,(e.readyState===WebSocket.OPEN||e.readyState===WebSocket.CONNECTING)&&e.close())}function Te(){for(let e of[`workspaces.changed`,`sessions.changed`])v.dispatchEvent(new MessageEvent(e,{data:null}))}function I(){if(b&&(b.readyState===WebSocket.OPEN||b.readyState===WebSocket.CONNECTING))return;let e=location.protocol===`https:`?`wss`:`ws`,t=b=new WebSocket(`${e}://${location.host}/api/events`);be=Date.now(),clearTimeout(S),S=setTimeout(P,me),t.onmessage=e=>{let t;try{t=JSON.parse(String(e.data))}catch{return}let n=t.type;if(n){if(n===`hello`){M(),O(!0),k(t.data?.boot),we();return}if(n===`ping`){M();return}de.has(n)&&(M(),v.dispatchEvent(new MessageEvent(n,{data:t.data??null})))}},t.onerror=()=>{},t.onclose=()=>{b===t&&(b=null,D||P())}}function Ee(){return v||(v=new EventTarget,I(),A(),oe(e=>v?.dispatchEvent(new MessageEvent(`app.reachable`,{data:{reachable:e}}))),window.addEventListener(`offline`,()=>f(!1)),window.addEventListener(`online`,j),window.addEventListener(`pageshow`,j),window.addEventListener(`focus`,j),document.addEventListener(`visibilitychange`,()=>{document.visibilityState===`visible`?(clearTimeout(x),j()):(clearTimeout(x),x=setTimeout(()=>{D||F()},fe))})),v}var L=new Map,De=new Set,Oe;function ke(e){for(let[t,n]of Object.entries(e))De.has(t)||L.set(t,n);typeof window<`u`&&(Oe??=Promise.resolve())}function Ae(){return typeof window>`u`?Promise.resolve():Oe??=(async()=>{try{let e=await fetch(`/api/prefs`);if(g(e)){h();return}ke(await e.json())}catch{}})()}function R(e){return L.get(e)??null}function z(e,t){De.add(e),t===null?L.delete(e):L.set(e,t),je(e,t)}function je(e,t){return fetch(`/api/prefs`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({key:e,value:t}),keepalive:!0}).catch(()=>{})}function Me(e){z(`last-workspace`,e)}function Ne(){return R(`side-nav`)!==`0`}function Pe(e){z(`side-nav`,e?`1`:`0`)}function Fe(e){return R(`tab:${e}`)}function Ie(e,t){z(`tab:${e}`,t)}function Le(){return R(`diff-tree`)!==`0`}function Re(e){z(`diff-tree`,e?`1`:`0`)}function ze(){let e=R(`diff-scope`);return e===`working`||e===`dirty`?e:`committed`}function Be(e){z(`diff-scope`,e)}function Ve(e){return R(`diff-filter:${e}`)||``}function He(e,t){z(`diff-filter:${e}`,t||null)}function Ue(e){let t=R(`diff-pos:${e}`);if(!t)return null;try{let e=JSON.parse(t);return e&&typeof e.key==`string`?e:null}catch{return null}}function We(e,t){z(`diff-pos:${e}`,t?JSON.stringify(t):null)}function Ge(e){z(`setup-later`,e?`1`:null)}function B(){let e=R(`sso-ignored`);if(!e)return[];try{let t=JSON.parse(e);return Array.isArray(t)?t.filter(e=>typeof e==`string`):[]}catch{return[]}}function Ke(e){let t=new Set(B());t.add(e),z(`sso-ignored`,JSON.stringify([...t].sort()))}function qe(e){let t=B().filter(t=>t!==e);z(`sso-ignored`,t.length?JSON.stringify(t):null)}function Je(){let e=R(`theme`);return e===`light`||e===`dark`?e:`system`}function Ye(e){z(`theme`,e===`system`?null:e)}function V(e){if(e.view===`settings`)return`/settings`;if(e.view===`new`)return`/new`;if(!e.workspaceId)return`/`;let t=`/w/${encodeURIComponent(e.workspaceId)}`;if(e.view===`diff`){let n=new URLSearchParams;e.pr&&n.set(`pr`,e.pr),e.scope&&e.scope!==`committed`&&n.set(`scope`,e.scope),e.file&&n.set(`file`,e.file);let r=n.toString();return`${t}/review${r?`?${r}`:``}`}return e.view===`manage`?`${t}/manage`:`${t}${e.sessionId?`?s=${encodeURIComponent(e.sessionId)}`:``}`}function Xe(e){let t=e.pathname.replace(/\/+$/,``)||`/`;if(t===`/settings`)return{workspaceId:null,view:`settings`};if(t===`/new`)return{workspaceId:null,view:`new`};let n=/^\/w\/([^/]+)(?:\/(review|manage))?$/.exec(t);if(!n)return t===`/`?{workspaceId:null,view:`term`}:null;let r=decodeURIComponent(n[1]),i=new URLSearchParams(e.search);if(n[2]===`review`){let e=i.get(`scope`);return{workspaceId:r,view:`diff`,pr:i.get(`pr`),scope:e===`working`||e===`dirty`?e:null,file:i.get(`file`)}}return n[2]===`manage`?{workspaceId:r,view:`manage`}:{workspaceId:r,view:`term`,sessionId:i.get(`s`)}}function Ze(e,t){if(typeof history>`u`)return;let n=V(e);location.pathname+location.search!==n&&(t&&t.workspaceId===e.workspaceId&&t.view===e.view?history.replaceState:history.pushState).call(history,null,``,n)}function Qe(){return typeof window<`u`&&window.matchMedia(`(pointer: coarse)`).matches}function $e(){return typeof window<`u`&&window.matchMedia(`(max-width: 899px)`).matches}function H(){return typeof navigator<`u`&&navigator.standalone===!0}function et(e,t){if(!/^https?:\/\//.test(e)){window.open(e,`_blank`,`noopener`);return}if(t?.system&&H()){location.href=`x-safari-${e}`;return}if(!H()){window.open(e,`_blank`,`noopener`);return}if(localStorage.getItem(`xSafariOk`)){location.href=`x-safari-${e}`;return}if(localStorage.getItem(`xSafariNo`)){window.open(e,`_blank`,`noopener`);return}let n=!1,r=()=>{document.visibilityState===`hidden`&&(n=!0,localStorage.setItem(`xSafariOk`,`1`))};document.addEventListener(`visibilitychange`,r),window.addEventListener(`pagehide`,r),setTimeout(()=>{document.removeEventListener(`visibilitychange`,r),window.removeEventListener(`pagehide`,r),!(n||document.visibilityState===`hidden`)&&(localStorage.setItem(`xSafariNo`,`1`),window.open(e,`_blank`,`noopener`))},1500),location.href=`x-safari-${e}`}var tt={working:`_B`,waiting:`_C`,idle:`_D`,off:`_E`},nt=`_L _q`,rt=`_M _q`,it={accent:`_Q`,ok:`_R`,warn:`_S`,danger:`_T`,merged:`_U`,closed:`_V`},at=`_Y _X`,ot=`_0 _Z`,st=`_4 _l`,U=`_5 _l`,ct=`_6 _l`,lt=`_7 _l`;function ut(e){let t=e.split(`/`);return t.length>=3&&t[0].includes(`.`)?`https://${t[0]}/${t.slice(1).join(`/`)}`:`https://github.com/${e}`}function dt(e){let t=e.trim(),n=/^(?:https?|ssh):\/\/(?:[^@/\s]+@)?([a-z0-9.-]+)(?::\d+)?\/([\w.-]+)\/([\w.-]*?)(?:\.git)?\/?$/i.exec(t)||/^[\w.-]+@([a-z0-9.-]+):([\w.-]+)\/([\w.-]*?)(?:\.git)?$/i.exec(t);if(!n)return null;let r=n[1].toLowerCase();if(!r.includes(`.`)||!n[3])return null;let i=`${n[2]}/${n[3]}`;return r===`github.com`?i:`${r}/${i}`}var W=`github.com`;function ft(e){let t=(e||[]).filter(e=>e.authed).map(e=>e.host);W=t.includes(`github.com`)||t.length!==1?`github.com`:t[0]}function pt(e){let t=e.split(`/`);return t.length>=3&&t[0].includes(`.`)&&t[0]===W?t.slice(1).join(`/`):e}var mt={error:`_bm`,warn:`_bn`,info:`_bo`},ht={error:`_bp`,warn:`_bq`,info:`_br`},gt={sm:12,md:14,lg:16,xl:18},G=`<svg viewBox="0 0 24 24" fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round aria-hidden=true><path></path></svg>`,K=` D l`,_t=(e,t)=>{c(e.a,`width`,t),c(e.a,`height`,t)},q=(e,t)=>_t(e,t??gt.md),J=(e,t)=>o(e.a,[`_m`,t]),Y=(e,t)=>c(e.b,`d`,t),vt=G,yt=(e=>`/${e}&`)(K);function bt(e){Y(e.a,`M6.75827 17.2426L12.0009 12M17.2435 6.75736L12.0009 12M12.0009 12L6.75827 6.75736M12.0009 12L17.2435 17.2426`)}var xt=(e,t)=>q(e.a,t),St=(e,t)=>J(e.a,t),Ct=`<div><div><!><!></div><!></div>`,wt=` D D%b%l%l`,Tt=e(`G0`,e=>i(e.a,`click`,function(){e._._.o?.()})),Et=e=>{o(e.a,[U,`_bw`]),bt(e.b),xt(e.b,14),St(e.b),Tt(e)},Dt=re(0),Ot=ie(25,e=>Dt(e,e._._.n),e=>e._._),kt=n(1,`<!><!><!>`,`b%`,Ot),At=r(4,0,e=>{o(e.a,[`_bu`,e._.m&&`_bv`]),kt(e,+!e._.m)}),jt=e=>{At._(e),Nt._(e)},Mt=n(2,(e=>`<button type=button title=Dismiss aria-label=Dismiss>${e}</button>`)(vt),(e=>` D/${e}&l`)(yt),Et),Nt=r(4,0,e=>Mt(e,+!e._.o)),Pt=re(1),Ft=r(3,0,e=>Pt(e,e._.l)),It=e=>{Ft._(e),o(e.a,`_bt`)},Lt=r(2,0,e=>a(e.b,e._.j)),Rt=e=>{Lt._(e),X._(e)},X=r(2,0,e=>o(e.a,ht[e._.r])),Z=l(21,e=>o(e.a,[`_bj`,mt[e.r],e.u,e.k]),2),zt=s(17,e=>{c(e.a,`role`,e.r===`error`?`alert`:`status`),Z(e),X(e)}),Bt=(e,t)=>zt(e,t||`error`),Vt=s(20,Z),Ht=e(`G1`,e=>t(e,{onDismiss:e.o,placement:e.s,onMount:function(){let e=new AbortController;return this.placement===`float`&&this.onDismiss&&window.addEventListener(`keydown`,e=>{e.key===`Escape`&&(document.querySelector(`dialog[open]`)||e.target instanceof HTMLInputElement&&e.target.value||(e.stopPropagation(),this.onDismiss?.()))},{capture:!0,signal:e.signal}),{abort:e}},onDestroy:function(){this.abort.abort()}})),Ut=l(19,Ht),Wt=s(18,e=>{Vt(e,{float:`_bk`,inline:`_bl`}[e.s]),Ut(e)}),Gt=(e,t)=>Wt(e,t||`float`),Kt=s(10,Z),qt=e(`G2`,e=>ee(e,`a`)),Jt=s(16,e=>{te(e,`a`,e.q,{class:1,role:1}),qt(e)});function Yt(e){o(e.b,`_bs`)}var Xt=n(2,`<strong> </strong>`,` D `,Rt),Zt=s(9,e=>{Xt(e,+!e.j),Lt(e)}),Qt=n(3,`<div><!></div>`,` D%`,It),$t=s(11,e=>{Qt(e,+!e.l),Ft(e)}),en=n(4,`<div><!><!></div>`,` D%b%`,jt),tn=l(15,e=>en(e,e.m||e.o?0:1)),nn=s(12,e=>{an(e,e.m?.content),tn(e),At(e)}),rn=s(14,e=>{tn(e),Ut(e),Nt(e)}),an=s(13,ne(Ot)),on=`#fafafa`,sn=`#131316`,Q=new Set;function cn(){if(typeof document>`u`)return`system`;let e=document.documentElement.dataset.theme;return e===`light`||e===`dark`?e:`system`}function ln(e){return Q.add(e),()=>Q.delete(e)}function un(e){if(typeof document>`u`)return;let t=document.documentElement;e===`system`?t.removeAttribute(`data-theme`):t.setAttribute(`data-theme`,e),dn(e,t.style.getPropertyValue(`--accent`).trim()||``);for(let t of Q)t(e)}function dn(e,t){if(typeof document>`u`)return;let n=document.head;for(let e of n.querySelectorAll(`meta[name="theme-color"]`))e.remove();let r=(e,t)=>{let r=document.createElement(`meta`);r.name=`theme-color`,r.content=e,t&&(r.media=t),n.append(r)};e===`light`?r(t||on):e===`dark`?r(t||sn):(r(t||on,`(prefers-color-scheme: light)`),r(t||sn,`(prefers-color-scheme: dark)`))}var fn=`_ch _N _O`,pn=`_5 _l`,mn=G,hn=(e=>`/${e}&`)(K);function gn(e){Y(e.a,`M21.8883 13.5C21.1645 18.3113 17.013 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C16.1006 2 19.6248 4.46819 21.1679 8 M17 8H21.4C21.7314 8 22 7.73137 22 7.4V3`)}var _n=(e,t)=>q(e.a,t),vn=(e,t)=>J(e.a,t),yn=G,bn=(e=>`/${e}&`)(K);function xn(e){Y(e.a,`M15 6L9 12L15 18`)}var Sn=(e,t)=>q(e.a,t),Cn=(e,t)=>J(e.a,t),wn=G,Tn=(e=>`/${e}&`)(K);function En(e){Y(e.a,`M9 6L15 12L9 18`)}var Dn=(e,t)=>q(e.a,t),On=(e,t)=>J(e.a,t),kn=G,An=(e=>`/${e}&`)(K);function jn(e){Y(e.a,`M17 17L21 21 M3 11C3 15.4183 6.58172 19 11 19C13.213 19 15.2161 18.1015 16.6644 16.6493C18.1077 15.2022 19 13.2053 19 11C19 6.58172 15.4183 3 11 3C6.58172 3 3 6.58172 3 11Z`)}var Mn=(e,t)=>q(e.a,t),Nn=(e,t)=>J(e.a,t),Pn=G,Fn=(e=>`/${e}&`)(K);function In(e){Y(e.a,`M12 21L12 3M12 3L20.5 11.5M12 3L3.5 11.5`)}var Ln=(e,t)=>q(e.a,t),Rn=(e,t)=>J(e.a,t),zn=G,Bn=(e=>`/${e}&`)(K);function Vn(e){Y(e.a,`M19 21L5 21C3.89543 21 3 20.1046 3 19L3 5C3 3.89543 3.89543 3 5 3L19 3C20.1046 3 21 3.89543 21 5L21 19C21 20.1046 20.1046 21 19 21Z M9.5 21V3 M5.5 10L7.25 12L5.5 14`)}var Hn=(e,t)=>q(e.a,t),Un=(e,t)=>J(e.a,t);async function Wn(e){try{return await navigator.clipboard.writeText(e),!0}catch{let t=document.createElement(`textarea`);t.value=e,t.style.cssText=`position:fixed;top:-100px;opacity:0;`,document.body.append(t),t.focus(),t.select();let n=document.execCommand(`copy`);return t.remove(),n}}function Gn(e,t){if(!e)return-1;let n=e.toLowerCase(),r=t.toLowerCase(),i=r.lastIndexOf(`/`),a=r.slice(i+1),o=r.slice(0,Math.max(0,i)).includes(n)?5:0;return a===n?1e3+o:a.startsWith(n)?800+o:a.includes(n)?600+o:$(n,a)?400+o:r.includes(n)?300:$(n,r)?100:-1}function Kn(e,t,n){return e?t.map(t=>({repo:t,score:Gn(e,t.nameWithOwner)})).filter(({repo:e,score:t})=>!e.isArchived&&t>=0&&!n(e.nameWithOwner)).sort((e,t)=>t.score-e.score||e.repo.nameWithOwner.length-t.repo.nameWithOwner.length||e.repo.nameWithOwner.localeCompare(t.repo.nameWithOwner)).slice(0,8).map(({repo:e})=>e):[]}function qn(e,t){return e?t.map(t=>({branch:t,score:Gn(e,t)})).filter(({score:e})=>e>=0).sort((e,t)=>t.score-e.score||e.branch.length-t.branch.length||e.branch.localeCompare(t.branch)).map(({branch:e})=>e):t}function $(e,t){if(!e)return!0;let n=0,r=t.toLowerCase();for(let t of e.toLowerCase()){if(n=r.indexOf(t,n),n===-1)return!1;n++}return!0}var Jn=null;function Yn(e,t){Jn={cols:e,rows:t}}function Xn(){return Jn}var Zn=`_eh _n`,Qn=`_ek _l`,$n=G,er=(e=>`/${e}&`)(K);function tr(e){Y(e.a,`M12 3L12 21M12 21L20.5 12.5M12 21L3.5 12.5`)}var nr=(e,t)=>q(e.a,t),rr=(e,t)=>J(e.a,t);export{Kt as $,Ye as $t,Dn as A,tt as At,_n as B,Ue as Bt,Fn as C,nt as Ct,kn as D,st as Dt,jn as E,U as Et,Sn as F,et as Ft,fn as G,B as Gt,mn as H,Le as Ht,xn as I,Xe as It,ln as J,Be as Jt,un as K,He as Kt,yn as L,Ze as Lt,wn as M,H as Mt,Tn as N,$e as Nt,An as O,ot as Ot,Cn as P,Qe as Pt,Jt as Q,Pe as Qt,bn as R,V as Rt,Pn as S,rt as St,Mn as T,ct as Tt,hn as U,ke as Ut,gn as V,ze as Vt,pn as W,Ke as Wt,nn as X,Me as Xt,dn as Y,Re as Yt,$t as Z,Ge as Zt,zn as _,gt as _t,er as a,Fe as an,Zt as at,Ln as b,ut as bt,Xn as c,_ as cn,xt as ct,qn as d,le as dn,yt as dt,Ie as en,Bt as et,Kn as f,ae as fn,J as ft,Vn as g,K as gt,Hn as h,G as ht,$n as i,qe as in,Ct as it,En as j,it as jt,On as k,at as kt,Yn as l,ue as ln,bt as lt,Un as m,q as mt,nr as n,Ae as nn,rn as nt,Qn as o,Ee as on,wt as ot,Wn as p,Y as pt,cn as q,We as qt,tr as r,Je as rn,Yt as rt,Zn as s,Ce as sn,St as st,rr as t,Ne as tn,Gt as tt,$ as u,ce as un,vt as ut,Bn as v,dt as vt,Nn as w,lt as wt,In as x,ft as xt,Rn as y,pt as yt,vn as z,Ve as zt};
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$input_workspaceBranch as e}from"./_D6gBuUWs.js";export{e as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$input_focusNonce as e}from"./_D6gBuUWs.js";export{e as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$input_active as e}from"./_D6gBuUWs.js";export{e as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$input_findOpen as e}from"./_D6gBuUWs.js";export{e as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$setup as e,$template as t,$walks as n}from"./_D6gBuUWs.js";var r=[t,n,e];export{r as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$input_focusFileNonce as e}from"./_D6gBuUWs.js";export{e as _};
|