@intent-hq/web 2.381.0 → 2.381.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/package.json +1 -1
- package/web/app/immutable/chunks/{Bw2658yD.js → -38fvEUf.js} +3 -3
- package/web/app/immutable/chunks/{CerQ3130.js → 0UjerFq2.js} +2 -2
- package/web/app/immutable/chunks/{BWrCW1dr.js → 0vwP6aoY.js} +1 -1
- package/web/app/immutable/chunks/{C67XPXpB.js → 2mW3EYuj.js} +1 -1
- package/web/app/immutable/chunks/{nUqBLDBv.js → 3XnvT-Kd.js} +1 -1
- package/web/app/immutable/chunks/{LmOh3dCE.js → 4Z3UfkCT.js} +1 -1
- package/web/app/immutable/chunks/{BdiZ1nDe.js → 4gpsTQgm.js} +1 -1
- package/web/app/immutable/chunks/{CGzBUBnV.js → 8PuV5ymR.js} +1 -1
- package/web/app/immutable/chunks/{BIESTQ5u.js → 8k-S4TgT.js} +1 -1
- package/web/app/immutable/chunks/{DFAc4vwT.js → AgrSZR3a.js} +1 -1
- package/web/app/immutable/chunks/{BjjtB7nl.js → B3AvPO6N.js} +1 -1
- package/web/app/immutable/chunks/{BC2oh8IJ.js → B4bWz8TE.js} +1 -1
- package/web/app/immutable/chunks/{RAIDAqDN.js → B4rSPxtK.js} +3 -3
- package/web/app/immutable/chunks/{Dhn_dKu8.js → B6QMsHdz.js} +2 -2
- package/web/app/immutable/chunks/{Bnvf6X0M.js → B6bO9EJF.js} +2 -2
- package/web/app/immutable/chunks/{D_RQ_xOo.js → BEm2fXhQ.js} +13 -13
- package/web/app/immutable/chunks/{Dh78EJMJ.js → BFly3ws-.js} +1 -1
- package/web/app/immutable/chunks/{BThmLvD2.js → BHq6uyQn.js} +3 -3
- package/web/app/immutable/chunks/{BZDB0rMa.js → BJZ-AKM7.js} +1 -1
- package/web/app/immutable/chunks/{ChwJUzKr.js → BLNFLvET.js} +1 -1
- package/web/app/immutable/chunks/{CCi2-V8M.js → BLWXcpbp.js} +1 -1
- package/web/app/immutable/chunks/{DMhCKu8K.js → BOnuoCKB.js} +1 -1
- package/web/app/immutable/chunks/{D1EWQhhc.js → BPvvII1k.js} +1 -1
- package/web/app/immutable/chunks/{BsnymPhN.js → BQPwOHEP.js} +1 -1
- package/web/app/immutable/chunks/{BS-hgLWx.js → BSsARSCL.js} +1 -1
- package/web/app/immutable/chunks/{qIqvLyMb.js → BUeOnhAk.js} +1 -1
- package/web/app/immutable/chunks/{-5q2sQ0G.js → BYbQHOnI.js} +2 -2
- package/web/app/immutable/chunks/{D5EjK0ep.js → B_8LEprc.js} +1 -1
- package/web/app/immutable/chunks/{DOTSixGs.js → BbxnpQro.js} +2 -2
- package/web/app/immutable/chunks/{CDUTX0DJ.js → Be_KPn6B.js} +1 -1
- package/web/app/immutable/chunks/{BFmlTVSQ.js → BfWybjMv.js} +1 -1
- package/web/app/immutable/chunks/{DAtEiLa8.js → BkBSmJUq.js} +1 -1
- package/web/app/immutable/chunks/{yELXsyLX.js → BpCFoetp.js} +2 -2
- package/web/app/immutable/chunks/{CLfui8YZ.js → BqImHrtW.js} +1 -1
- package/web/app/immutable/chunks/{DgWaupH-.js → Bq_p_Ems.js} +1 -1
- package/web/app/immutable/chunks/{BNSO2-Wl.js → Br6yAYVA.js} +1 -1
- package/web/app/immutable/chunks/{2Pj6o2Th.js → Bsz-lZyy.js} +1 -1
- package/web/app/immutable/chunks/{hGy9M9pP.js → Btz1TKUZ.js} +1 -1
- package/web/app/immutable/chunks/{ClefORrS.js → BuBupv2q.js} +1 -1
- package/web/app/immutable/chunks/{D5icpWhs.js → Bv-NFhbk.js} +1 -1
- package/web/app/immutable/chunks/{BEQUsKQ4.js → Bv4WoH6n.js} +1 -1
- package/web/app/immutable/chunks/{DMSPSXBw.js → BzHupLIV.js} +1 -1
- package/web/app/immutable/chunks/{CIdTB6Iv.js → C1XDNSjC.js} +1 -1
- package/web/app/immutable/chunks/{C1ptFBD5.js → C2g3Lo3C.js} +1 -1
- package/web/app/immutable/chunks/{SKPDG-5H.js → C6qkTCJb.js} +2 -2
- package/web/app/immutable/chunks/{B6MiyFLa.js → C7CLfLlz.js} +3 -3
- package/web/app/immutable/chunks/{BTRnabV4.js → C81BxYgH.js} +2 -2
- package/web/app/immutable/chunks/{BxVISJNP.js → CB6Z_HaZ.js} +4 -4
- package/web/app/immutable/chunks/{tY875mH4.js → CFQZwmQL.js} +1 -1
- package/web/app/immutable/chunks/{aAL3gVYX.js → CGj6Uov1.js} +1 -1
- package/web/app/immutable/chunks/{5cuuSbK3.js → CHJt826g.js} +1 -1
- package/web/app/immutable/chunks/{BGyJHbw2.js → CIzhESxA.js} +3 -3
- package/web/app/immutable/chunks/{BZAR2jjH.js → CJiiUUa9.js} +4 -4
- package/web/app/immutable/chunks/{DWrrvofx.js → CRUti2QR.js} +1 -1
- package/web/app/immutable/chunks/{Do74QoQ1.js → CRsl30lG.js} +3 -3
- package/web/app/immutable/chunks/{CVlmzDQi.js → CTcVaot6.js} +1 -1
- package/web/app/immutable/chunks/{BKyVoAeD.js → CU1be4rw.js} +1 -1
- package/web/app/immutable/chunks/{B144nRGN.js → CUDnr_3L.js} +1 -1
- package/web/app/immutable/chunks/{Dmmhqahz.js → CY700US_.js} +1 -1
- package/web/app/immutable/chunks/{B6OjVjZn.js → Cf8aoN1C.js} +1 -1
- package/web/app/immutable/chunks/{aZFhQjxq.js → CfnphW7T.js} +1 -1
- package/web/app/immutable/chunks/{Dhmsbahb.js → Cgkbg4M-.js} +1 -1
- package/web/app/immutable/chunks/{CzzxesqS.js → CmfV8NZB.js} +1 -1
- package/web/app/immutable/chunks/{mhbyybav.js → CniyTwSy.js} +1 -1
- package/web/app/immutable/chunks/{C33B5WYl.js → CpdYwtoi.js} +1 -1
- package/web/app/immutable/chunks/{D0-M2-1A.js → CrgJRVM7.js} +1 -1
- package/web/app/immutable/chunks/{BqP5UqR8.js → CsChyIko.js} +1 -1
- package/web/app/immutable/chunks/{BKjeytS6.js → Cwtu6VYt.js} +3 -3
- package/web/app/immutable/chunks/{tX5jcaSV.js → CxfgkyeR.js} +1 -1
- package/web/app/immutable/chunks/{D5Mezqe9.js → Cy2YclRs.js} +1 -1
- package/web/app/immutable/chunks/{bs-Hlguv.js → CyjFr4Uj.js} +1 -1
- package/web/app/immutable/chunks/{CdoouZdZ.js → Cz7GhlNv.js} +1 -1
- package/web/app/immutable/chunks/{Dplq9qsl.js → CzHEtjeZ.js} +4 -4
- package/web/app/immutable/chunks/{CihHTuXo.js → CzLuqZqF.js} +1 -1
- package/web/app/immutable/chunks/{BzuetahE.js → CzR1YU-6.js} +1 -1
- package/web/app/immutable/chunks/{DOpDjXTX.js → Cz_w-Ywk.js} +1 -1
- package/web/app/immutable/chunks/{BexdoSLd.js → CzqO4uZr.js} +1 -1
- package/web/app/immutable/chunks/{jmOQOjO7.js → D0qSwFDo.js} +1 -1
- package/web/app/immutable/chunks/{Cog8Z710.js → D23FNw3u.js} +1 -1
- package/web/app/immutable/chunks/{3Y0Pni2F.js → D2YsfEw1.js} +1 -1
- package/web/app/immutable/chunks/{DkkQoE5s.js → D43zGYhv.js} +1 -1
- package/web/app/immutable/chunks/{BVIm9TXR.js → D4x27t3J.js} +2 -2
- package/web/app/immutable/chunks/{BXcaLB9t.js → D6JftAWR.js} +1 -1
- package/web/app/immutable/chunks/{C2Ho3eYP.js → D7ivqtWn.js} +1 -1
- package/web/app/immutable/chunks/{CeE1gneV.js → DB3Bmw2z.js} +2 -2
- package/web/app/immutable/chunks/{RvzV_HOg.js → DB7oVHuD.js} +1 -1
- package/web/app/immutable/chunks/{BrCRcW9k.js → DBVO-l07.js} +1 -1
- package/web/app/immutable/chunks/{TR5qJIou.js → DCYhtokL.js} +1 -1
- package/web/app/immutable/chunks/{BsI87HZJ.js → DI8QKtVI.js} +1 -1
- package/web/app/immutable/chunks/{BqoHIxBq.js → DILbaYr6.js} +2 -2
- package/web/app/immutable/chunks/{Cpms7j0L.js → DJvjiyr0.js} +1 -1
- package/web/app/immutable/chunks/{CKd_dQ3I.js → DKodLYG2.js} +1 -1
- package/web/app/immutable/chunks/{10rWTy_0.js → DMS7qNz0.js} +1 -1
- package/web/app/immutable/chunks/{BNer-POS.js → DMxvL2pq.js} +1 -1
- package/web/app/immutable/chunks/{Bhy6rSvv.js → DNA4L5Jp.js} +1 -1
- package/web/app/immutable/chunks/{BKe0nSnZ.js → DVvIWU27.js} +1 -1
- package/web/app/immutable/chunks/{BKATf4Nc.js → DXrfRfkt.js} +1 -1
- package/web/app/immutable/chunks/{RNzwQD69.js → DY591siF.js} +1 -1
- package/web/app/immutable/chunks/{BSKbp9lI.js → DYLppqi3.js} +1 -1
- package/web/app/immutable/chunks/{Ce8wcBkd.js → DhClgUfO.js} +1 -1
- package/web/app/immutable/chunks/{CJvvw8wO.js → DhyB8cWp.js} +1 -1
- package/web/app/immutable/chunks/{sf_shPLF.js → DjuGqsic.js} +1 -1
- package/web/app/immutable/chunks/{DrgKPDOS.js → DlstVUk2.js} +1 -1
- package/web/app/immutable/chunks/{CrpoPBTd.js → DnHw1VUT.js} +1 -1
- package/web/app/immutable/chunks/{BnILIiQr.js → DquvKa_v.js} +1 -1
- package/web/app/immutable/chunks/{DbnnfnWt.js → DtNzpjBe.js} +1 -1
- package/web/app/immutable/chunks/{hVaxBeCC.js → GZSCGAOr.js} +1 -1
- package/web/app/immutable/chunks/{n3IgD7YZ.js → H3A5gXqL.js} +1 -1
- package/web/app/immutable/chunks/{B-GcpbNn.js → HM9LwZU0.js} +1 -1
- package/web/app/immutable/chunks/{GVrJXOR1.js → HhPY-joW.js} +1 -1
- package/web/app/immutable/chunks/{DkPtUcuG.js → USTHbXMy.js} +1 -1
- package/web/app/immutable/chunks/{DWPPdUqz.js → X9YPou2Z.js} +1 -1
- package/web/app/immutable/chunks/{CzPcTJop.js → YE1OS8p7.js} +1 -1
- package/web/app/immutable/chunks/{CKsm6CJe.js → ajSGSfsK.js} +1 -1
- package/web/app/immutable/chunks/{Cy8wWOs9.js → gWgQT-YB.js} +1 -1
- package/web/app/immutable/chunks/{CgTbTzMo.js → hALpfjsp.js} +1 -1
- package/web/app/immutable/chunks/{CSAVHgQD.js → inhLOPTf.js} +1 -1
- package/web/app/immutable/chunks/{DBpwZbtx.js → jELUCNms.js} +1 -1
- package/web/app/immutable/chunks/{C2UuFnUi.js → jVDPtQ_B.js} +1 -1
- package/web/app/immutable/chunks/{CrM2wY-L.js → knotK2ne.js} +1 -1
- package/web/app/immutable/chunks/{m5qnOCSj.js → nvUE_ize.js} +1 -1
- package/web/app/immutable/chunks/{CTu7BD0n.js → oYYFJMSc.js} +1 -1
- package/web/app/immutable/chunks/{GgorYqEy.js → qgFvgidh.js} +1 -1
- package/web/app/immutable/chunks/{D9dDI0JY.js → slJf1fOP.js} +1 -1
- package/web/app/immutable/chunks/{s3hT4nSC.js → toxSFGnz.js} +3 -3
- package/web/app/immutable/chunks/{Di0gc7qb.js → usTkJVfb.js} +1 -1
- package/web/app/immutable/chunks/{CSKmazUQ.js → vFkcanNO.js} +1 -1
- package/web/app/immutable/entry/{app.C4niOd74.js → app.BLa4aj6Q.js} +2 -2
- package/web/app/immutable/entry/start.bo1Az5Sh.js +1 -0
- package/web/app/immutable/nodes/{0.BuMjkb6U.js → 0.D0qyvy-O.js} +1 -1
- package/web/app/immutable/nodes/{1.Bcatp2sz.js → 1.LQky-UK3.js} +1 -1
- package/web/app/immutable/nodes/{10.DgKiizpn.js → 10.Nhiduazn.js} +4 -4
- package/web/app/immutable/nodes/{11.DfXClVhC.js → 11.DREbA2mH.js} +1 -1
- package/web/app/immutable/nodes/{15.CKYIQZQJ.js → 15.nRgFCYhv.js} +1 -1
- package/web/app/immutable/nodes/{19.CsmGJ0ap.js → 19.CsA9jU7R.js} +2 -2
- package/web/app/immutable/nodes/{2.3IR0OOVT.js → 2.BmzudLkh.js} +4 -4
- package/web/app/immutable/nodes/{3.Bvx20k4l.js → 3.C-U8wBjc.js} +1 -1
- package/web/app/immutable/nodes/{4.CM8HHt-M.js → 4.DpFtuYyp.js} +1 -1
- package/web/app/immutable/nodes/{5.BmDrQgal.js → 5.DFB1aYNI.js} +1 -1
- package/web/app/immutable/nodes/{6.DC9AToQP.js → 6.CJXz9NV9.js} +1 -1
- package/web/app/immutable/nodes/{7.C1BAIOxy.js → 7.CwETavlw.js} +1 -1
- package/web/app/immutable/nodes/{8.DeVz49FZ.js → 8.BvZJcCeO.js} +1 -1
- package/web/app/immutable/nodes/{9.Dcpga7TP.js → 9.CJeInbIt.js} +4 -4
- package/web/app/version.json +1 -1
- package/web/index.html +9 -9
- package/web/app/immutable/entry/start.BIOX4bLf.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as ee,bo as i,bw as te,b as ae,br as qe,bs as xe,bq as He,bp as Ke,bm as N}from"./3Mdoz-0Q.js";import{bs as re,b_ as $,aD as t,W as h,bA as q,bn as se,c9 as v,aA as l,aB as z,bV as O,br as Ve,ca as Me,bH as T,a5 as Q,bl as Z,bS as M,bO as be,ay as B,a7 as ke,aw as ze,bz as Pe}from"./3SdAC2_C.js";import{f as W}from"./yF7QjJ_G.js";import{Y as Xe}from"./CWzES__t.js";import{F as I,cF as Ye,bF as Ae,d3 as Re,aC as Ge,cr as Je,bn as Qe,bi as Ze,bh as et,bg as tt}from"./BQ64OnCJ.js";import{ay as at,aB as rt}from"./B3dKFpC0.js";import{f as st}from"./DR9or2eV.js";import{g as nt,i as it,I as lt}from"./Bj3DquZA.js";import{s as E,g as ot,f as De}from"./kR4OBGp8.js";import{a as Te}from"./
|
|
1
|
+
import{t as ee,bo as i,bw as te,b as ae,br as qe,bs as xe,bq as He,bp as Ke,bm as N}from"./3Mdoz-0Q.js";import{bs as re,b_ as $,aD as t,W as h,bA as q,bn as se,c9 as v,aA as l,aB as z,bV as O,br as Ve,ca as Me,bH as T,a5 as Q,bl as Z,bS as M,bO as be,ay as B,a7 as ke,aw as ze,bz as Pe}from"./3SdAC2_C.js";import{f as W}from"./yF7QjJ_G.js";import{Y as Xe}from"./CWzES__t.js";import{F as I,cF as Ye,bF as Ae,d3 as Re,aC as Ge,cr as Je,bn as Qe,bi as Ze,bh as et,bg as tt}from"./BQ64OnCJ.js";import{ay as at,aB as rt}from"./B3dKFpC0.js";import{f as st}from"./DR9or2eV.js";import{g as nt,i as it,I as lt}from"./Bj3DquZA.js";import{s as E,g as ot,f as De}from"./kR4OBGp8.js";import{a as Te}from"./DI8QKtVI.js";import{i as S}from"./BdqQb89H.js";import{n as J,l as Ce,c as Le}from"./C4w1ocT0.js";import{m as ct}from"./ZYFxZ-3Z.js";import{a as ut}from"./knotK2ne.js";import{al as mt,j as pe}from"./inhLOPTf.js";var dt=z('<span class="svelte-dywwvd"></span>'),vt=z('<span class="waveform svelte-dywwvd" aria-hidden="true" data-dictation-waveform=""></span>');function Ue(w,a){if(new.target)return ee({component:Ue,...w});re(a,!0);let g=i(a,"levels",7);const r=v(()=>{const s=g().slice(-Te).map(m=>Number.isFinite(m)?Math.min(1,Math.max(0,m)):0);return[...new Array(Te-s.length).fill(0),...s]});var d={get levels(){return g()},set levels(s){g(s),l()},$set:te,$on:(s,m)=>ae(a,s,m)},_=vt();return nt(_,21,()=>t(r),it,(s,m)=>{var c=dt();let x;$(()=>{E(c,"data-level",t(m)),x=ot(c,"",x,{height:`${2+t(m)*12}px`})}),h(s,c)}),q(_),h(w,_),se(d)}var gt=z('<span class="dictation-meter svelte-1oz1rct"><span class="elapsed svelte-1oz1rct" data-dictation-elapsed=""> </span> <!></span>');function Fe(w,a){if(new.target)return ee({component:Fe,...w});re(a,!0);let g=i(a,"levels",7),r=i(a,"startedAt",7,null),d=i(a,"elapsed",7),_=O(Ve(Date.now()));Me(()=>{if(!(d()!==void 0||r()===null))return T(_,Date.now(),!0),Xe.subscribe(new Date(r()),()=>T(_,Date.now(),!0),"second")});const s=v(()=>d()??st(r()===null?0:t(_)-r()));var m={get levels(){return g()},set levels(u){g(u),l()},get startedAt(){return r()},set startedAt(u=null){r(u),l()},get elapsed(){return d()},set elapsed(u){d(u),l()},$set:te,$on:(u,R)=>ae(a,u,R)},c=gt(),x=Q(c),P=Z(x,!0),C=M(x,2);return Ue(C,{get levels(){return g()}}),q(c),$(()=>be(P,t(s))),h(w,c),se(m)}var ft=new Set(["$$slots","$$events","$$legacy","class"]),pt=z("<!> <!>",1);function bt(w,a){if(new.target)return ee({component:bt,...w});re(a,!0);const g=()=>xe(c,"$levels$",d),r=()=>xe(x,"$startedAt$",d),[d,_]=He();let s=i(a,"class",7,""),m=Ke(a,ft);const c=at(),x=rt();var P={get class(){return s()},set class(u=""){s(u),l()},$set:te,$on:(u,R)=>ae(a,u,R)};{let u=v(()=>`dictation-stop-pill ${s()}`.trim());W(w,qe({variant:"ghost",size:"sm",get class(){return t(u)},"aria-pressed":"true"},()=>m,{children:(R,H)=>{var p=pt(),U=B(p);I(U,{get icon(){return Ye},size:14});var j=M(U,2);Fe(j,{get levels(){return g()},get startedAt(){return r()}}),h(R,p)},$$slots:{default:!0}}))}var C=se(P);return _(),C}var ht=z('<img class="w-full h-full object-cover"/>'),_t=z('<div class="flex size-full items-center justify-center bg-muted text-subtle"><!></div>'),yt=z("<div><!> <!></div> <!>",1),wt=z('<span class="tabular-nums opacity-70 shrink-0" data-testid="attachment-upload-progress"> </span>'),xt=z("<!> <!>",1),kt=z('<div class="w-4 h-4 rounded overflow-hidden shrink-0"><img class="w-full h-full object-cover"/></div>'),zt=z('<div><!> <span class="font-medium truncate max-w-30"> </span> <!> <!></div>');function Pt(w,a){if(new.target)return ee({component:Pt,...w});re(a,!0);let g=i(a,"id",7),r=i(a,"name",7),d=i(a,"type",7,""),_=i(a,"size",7),s=i(a,"file",7),m=i(a,"imageData",7),c=i(a,"imageMimeType",7),x=i(a,"imageUrl",7),P=i(a,"onRemove",7),C=i(a,"class",7,""),u=i(a,"variant",7,"chip"),R=i(a,"thumbnailClass",7,"w-16 h-16"),H=i(a,"disabled",7,!1),p=i(a,"placementStatus",7,void 0),U=i(a,"placementProgress",7,void 0),j=i(a,"placementError",7,void 0),K=i(a,"onRetry",7),V=O(null);const ne=v(()=>mt(c()||d()||s()?.type));let ie=O(null);const y=v(()=>t(ne)?m()&&c()?`data:${pe(c())};base64,${m()}`:x()??t(ie):null);Me(()=>{if(t(ne)&&!(m()&&c())&&s()){const e=URL.createObjectURL(s());return T(ie,e,!0),()=>URL.revokeObjectURL(e)}T(ie,null)});const Se=v(()=>{if(d()==="folder")return Qe;const e=pe(d()||c()||s()?.type);return e.startsWith("image")?Ae:e.includes("javascript")||e.includes("typescript")||e.includes("json")?Ze:e.includes("text")||e.includes("markdown")?et:tt}),le=v(()=>pe(d()||c()||s()?.type).startsWith("image")),Ie=v(()=>{if(p()!=="failed")return;const e=N.chat_attachmentPreview_placementFailed_tooltip({name:r()});return j()?`${e} — ${j()}`:e}),he=v(()=>{if(p()!=="placing"||U()===void 0)return;const e=Math.max(0,Math.min(1,U()));return ct(e,{style:"percent",maximumFractionDigits:0})});let oe=O(!1),ce=O(null);function _e(){u()==="thumbnail"&&t(le)&&t(y)&&T(oe,!0)}function Ee(e){(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),_e())}function $e(e){e.stopPropagation(),P()?.(g())}var je={get id(){return g()},set id(e){g(e),l()},get name(){return r()},set name(e){r(e),l()},get type(){return d()},set type(e=""){d(e),l()},get size(){return _()},set size(e){_(e),l()},get file(){return s()},set file(e){s(e),l()},get imageData(){return m()},set imageData(e){m(e),l()},get imageMimeType(){return c()},set imageMimeType(e){c(e),l()},get imageUrl(){return x()},set imageUrl(e){x(e),l()},get onRemove(){return P()},set onRemove(e){P(e),l()},get class(){return C()},set class(e=""){C(e),l()},get variant(){return u()},set variant(e="chip"){u(e),l()},get thumbnailClass(){return R()},set thumbnailClass(e="w-16 h-16"){R(e),l()},get disabled(){return H()},set disabled(e=!1){H(e),l()},get placementStatus(){return p()},set placementStatus(e=void 0){p(e),l()},get placementProgress(){return U()},set placementProgress(e=void 0){U(e),l()},get placementError(){return j()},set placementError(e=void 0){j(e),l()},get onRetry(){return K()},set onRetry(e){K(e),l()},$set:te,$on:(e,b)=>ae(a,e,b)},ye=ke(),Ne=B(ye);{var Oe=e=>{var b=yt(),D=B(b),X=Q(D);{let A=v(()=>N.chat_attachmentPreview_viewFullSize_ariaLabel({name:r()})),F=v(()=>H()||!t(y));W(X,{variant:"plain",wrapContent:!1,type:"button",get class(){return`${R()??""} rounded-lg overflow-hidden cursor-pointer hover:opacity-90 transition-opacity`},onclick:_e,onkeydown:Ee,get"aria-label"(){return t(A)},get title(){return r()},get disabled(){return t(F)},get ref(){return t(ce)},set ref(L){T(ce,L,!0)},children:(L,ve)=>{var Y=ke(),ge=B(Y);{var n=o=>{var f=ht();$(()=>{E(f,"src",t(y)),E(f,"alt",r())}),ze("error",f,()=>T(V,t(y),!0)),Pe(f),h(o,f)},k=o=>{var f=_t(),G=Q(f);I(G,{get icon(){return Ae},size:"15"}),q(f),h(o,f)};S(ge,o=>{t(y)?o(n):o(k,-1)})}h(L,Y)},$$slots:{default:!0}})}var ue=M(X,2);{var me=A=>{{let F=v(()=>N.chat_attachmentPreview_remove_ariaLabel({name:r()}));W(A,{variant:"ghost",size:"icon-xs",class:"absolute top-0.5 right-0.5 opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity duration-spring-fast ease-spring-fast motion-reduce:transition-none bg-background/80 hover:bg-background shadow-sm",onclick:$e,get"aria-label"(){return t(F)},children:(L,ve)=>{I(L,{get icon(){return Re},size:"10"})},$$slots:{default:!0}})}};S(ue,A=>{P()&&A(me)})}q(D);var de=M(D,2);{let A=v(()=>t(y)??"");ut(de,{get imageUrl(){return t(A)},get imageName(){return r()},get openerElement(){return t(ce)},get open(){return t(oe)},set open(F){T(oe,F,!0)}})}$(()=>De(D,1,`relative group shrink-0 ${C()??""}`)),J(1,D,()=>Ce,()=>({tier:"moderate",y:0,scale:.9})),J(2,D,()=>Le,()=>({tier:"fast"})),h(e,b)},Be=e=>{var b=zt(),D=Q(b);{var X=n=>{var k=xt(),o=B(k);lt(o,{size:15,class:"opacity-50 shrink-0"});var f=M(o,2);{var G=fe=>{var we=wt(),We=Z(we,!0);$(()=>be(We,t(he))),h(fe,we)};S(f,fe=>{t(he)!==void 0&&fe(G)})}h(n,k)},ue=n=>{I(n,{get icon(){return Ge},size:"15",class:"shrink-0"})},me=n=>{var k=kt(),o=Z(k);$(()=>{E(o,"src",t(y)),E(o,"alt",r())}),ze("error",o,()=>T(V,t(y),!0)),Pe(o),h(n,k)},de=n=>{I(n,{get icon(){return t(Se)},size:"15",class:"opacity-30 shrink-0"})};S(D,n=>{p()==="placing"?n(X):p()==="failed"?n(ue,1):t(le)&&t(y)&&t(V)!==t(y)?n(me,2):n(de,-1)})}var A=M(D,2),F=Z(A,!0),L=M(A,2);{var ve=n=>{{let k=v(()=>N.chat_attachmentPreview_retryPlacement_ariaLabel({name:r()}));W(n,{variant:"ghost-light",size:"icon-xs",class:"shrink-0 -my-1",onclick:o=>{o.stopPropagation(),K()(g())},get"aria-label"(){return t(k)},"data-testid":"attachment-retry",children:(o,f)=>{I(o,{get icon(){return Je},size:"10"})},$$slots:{default:!0}})}};S(L,n=>{p()==="failed"&&K()&&n(ve)})}var Y=M(L,2);{var ge=n=>{{let k=v(()=>p()==="failed"?"":"opacity-0 group-hover:opacity-100 focus-visible:opacity-100"),o=v(()=>N.chat_attachmentPreview_removeAttachment_ariaLabel());W(n,{variant:"ghost-light",size:"icon-xs",get class(){return`shrink-0 ${t(k)??""} transition-opacity duration-spring-fast ease-spring-fast motion-reduce:transition-none -my-1 -mr-1`},onclick:()=>P()(g()),get"aria-label"(){return t(o)},children:(f,G)=>{I(f,{get icon(){return Re},size:"10"})},$$slots:{default:!0}})}};S(Y,n=>{P()&&n(ge)})}q(b),$(()=>{De(b,1,`flex items-center gap-1.5 px-2 py-0.5 rounded text-xs whitespace-nowrap group shrink-0 ${p()==="failed"?"bg-danger-background/10 text-danger border border-danger/40":"bg-muted/70 text-subtle"} ${C()??""}`),E(b,"data-placement-status",p()),E(b,"title",t(Ie)),be(F,r())}),J(1,b,()=>Ce,()=>({tier:"moderate",y:0,scale:.9})),J(2,b,()=>Le,()=>({tier:"fast"})),h(e,b)};S(Ne,e=>{u()==="thumbnail"&&t(le)&&t(ne)&&(!t(y)||t(V)!==t(y))?e(Oe):e(Be,-1)})}return h(w,ye),se(je)}export{Pt as A,Fe as D,bt as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as lt,bo as _,bw as dt,b as ct,bm as e,br as ft,bs as Ae,bq as Lt}from"./3Mdoz-0Q.js";import{bs as pt,ay as Je,be as S,b$ as A,b_ as n,bO as i,W as s,bS as o,bl as D,bn as ut,aA as v,a7 as Et,aD as t,c9 as y,aB as b,a5 as h,bA as x,bf as gt,bo as Gt,bV as tt,br as It,ca as bt,bH as Ke,bk as Ut}from"./3SdAC2_C.js";import{g as zt,i as Tt,I as mt}from"./Bj3DquZA.js";import{c as Ft}from"./Dcys5Bs9.js";import{s as ot,f as Ot,c as Bt}from"./kR4OBGp8.js";import{f as U}from"./yF7QjJ_G.js";import"./CWzES__t.js";import"./BqvIfFJz.js";import{b as Mt}from"./BOKKr5p4.js";import"./SfUr14xu.js";import"./g4HdeOyY.js";import{b as Rt}from"./l7z39TjX.js";import{i as k}from"./BdqQb89H.js";import{b as Ht}from"./D3yXvqwY.js";import{F as Nt,ay as Jt}from"./BQ64OnCJ.js";import"./BOfUqw1E.js";import{F as ht,G as qt}from"./BEQUsKQ4.js";import"./CBw6a9pd.js";/* empty css */import{C as Wt}from"./KkEpTlxU.js";import{L as xt}from"./bDc4vYO6.js";import{I as rt}from"./Cvrwd8gY.js";import"./D1o5arZx.js";import"./B_uN9rMf.js";import{h as Vt}from"./BTRnabV4.js";import{Jv as Pe,fB as kt,J as jt,eo as yt,r5 as Qt,uA as Xt,Jm as Yt,oD as Zt,hR as er}from"./DmuzFYIt.js";import{aC as $t,aD as Kt,aE as tr,ax as rr,ay as Pt,az as sr,aA as ar,aI as ir}from"./BsI87HZJ.js";var nr=b('<!> <p class="type-body"> </p>',1);function or(c,a){if(new.target)return lt({component:or,...c});pt(a,!0);let O=_(a,"open",15,!1),G=_(a,"static",7,!1),W=_(a,"title",7),m=_(a,"message",7),I=_(a,"buttons",7),f=_(a,"cancelIndex",7,0),ae=_(a,"onSelect",7);function V(l){O(!1),ae()?.(l)}var he={get open(){return O()},set open(l=!1){O(l),v()},get static(){return G()},set static(l=!1){G(l),v()},get title(){return W()},set title(l){W(l),v()},get message(){return m()},set message(l){m(l),v()},get buttons(){return I()},set buttons(l){I(l),v()},get cancelIndex(){return f()},set cancelIndex(l=0){f(l),v()},get onSelect(){return ae()},set onSelect(l){ae(l),v()},$set:dt,$on:(l,j)=>ct(a,l,j)};return Rt(c,{get static(){return G()},role:"alertdialog",get title(){return W()},dismissOnInteractOutside:!1,focusContent:!0,onSubmit:()=>V(I().length-1),onCancel:()=>V(f()),get open(){return O()},set open(j){O(j)},footer:j=>{var $=Et(),B=Je($);zt(B,17,I,Tt,(ie,ne,te)=>{{let xe=y(()=>te===f()?"ghost":te===I().length-1?"primary":"outline");U(ie,{get variant(){return t(xe)},onclick:()=>V(te),children:(De,M)=>{S();var we=A();n(()=>i(we,t(ne))),s(De,we)},$$slots:{default:!0}})}}),s(j,$)},children:(j,$)=>{var B=nr(),ie=Je(B);Ft(ie,()=>Mt,(xe,De)=>{De(xe,{class:"sr-only",children:(M,we)=>{S();var Oe=A();n(()=>i(Oe,m())),s(M,Oe)},$$slots:{default:!0}})});var ne=o(ie,2),te=D(ne,!0);n(()=>i(te,m())),s(j,B)},$$slots:{footer:!0,default:!0}}),ut(he)}const Fe={anthropicKeys:"https://console.anthropic.com/settings/keys",openAiKeys:"https://platform.openai.com/api-keys",openAiTokens:"https://developers.openai.com/codex/enterprise/access-tokens",xaiConsole:"https://console.x.ai",factoryKeys:"https://app.factory.ai/settings/api-keys",cursorDashboard:"https://cursor.com/dashboard?tab=integrations",auggieAuth:"https://docs.augmentcode.com/cli/setup-auggie/authentication"},lr="claude setup-token",dr="auggie token print";function cr(c,a){if(a==="differentLogin")return e.settings_providerProfileKinds_differentLogin_description();if(a==="token")return c==="codex"?e.settings_providerProfileKinds_tokenCodex_description():c==="auggie"?e.settings_providerProfileKinds_tokenAuggie_description():e.settings_providerProfileKinds_tokenClaude_description();switch(c){case"codex":return e.settings_providerProfileKinds_apiKeyCodex_description();case"grok":return e.settings_providerProfileKinds_apiKeyGrok_description();case"droid":return e.settings_providerProfileKinds_apiKeyDroid_description();case"cursor":return e.settings_providerProfileKinds_apiKeyCursor_description();default:return e.settings_providerProfileKinds_apiKeyClaude_description()}}function pr(c,a){return a==="apiKey"?e.settings_providerProfileKinds_apiKey_label():c==="auggie"?e.settings_providerProfileKinds_tokenAuggie_label():e.settings_providerProfileKinds_token_label()}function cs(c,a){return c!=="claude"&&c!=="codex"?cr(c,a):a==="token"?c==="codex"?e.settings_providerProfileKinds_tokenCodexDialog_description():e.settings_providerProfileKinds_tokenClaudeDialog_description():c==="codex"?e.settings_providerProfileKinds_apiKeyCodexDialog_description():e.settings_providerProfileKinds_apiKeyClaudeDialog_description()}function ur(c,a){if(a==="token")return c==="codex"?{steps:[e.settings_providerProfileKinds_tokenCodexStep1_label()],link:{href:Fe.openAiTokens,label:e.settings_providerProfileKinds_openAiAccessTokens_link()},eligibility:e.settings_providerProfileKinds_tokenCodexEligibility_description()}:c==="auggie"?{steps:[e.settings_providerProfileKinds_tokenAuggieStep1_label(),e.settings_providerProfileKinds_tokenAuggieStep2_label()],command:dr,link:{href:Fe.auggieAuth,label:e.settings_providerProfileKinds_auggieAuthDocs_link()}}:{steps:[e.settings_providerProfileKinds_tokenClaudeStep1_label(),e.settings_providerProfileKinds_tokenClaudeStep2_label()],command:lr};switch(c){case"codex":return{steps:[e.settings_providerProfileKinds_apiKeyCodexStep1_label(),e.settings_providerProfileKinds_apiKeyCodexStep2_label()],link:{href:Fe.openAiKeys,label:e.settings_providerProfileKinds_openAiApiKeys_link()}};case"grok":return{steps:[e.settings_providerProfileKinds_apiKeyGrokStep1_label(),e.settings_providerProfileKinds_apiKeyGrokStep2_label()],link:{href:Fe.xaiConsole,label:e.settings_providerProfileKinds_xaiConsole_link()}};case"droid":return{steps:[e.settings_providerProfileKinds_apiKeyDroidStep1_label(),e.settings_providerProfileKinds_apiKeyDroidStep2_label()],link:{href:Fe.factoryKeys,label:e.settings_providerProfileKinds_factoryApiKeys_link()}};case"cursor":return{steps:[e.settings_providerProfileKinds_apiKeyCursorStep1_label(),e.settings_providerProfileKinds_apiKeyCursorStep2_label()],link:{href:Fe.cursorDashboard,label:e.settings_providerProfileKinds_cursorDashboard_link()}};default:return{steps:[e.settings_providerProfileKinds_apiKeyClaudeStep1_label(),e.settings_providerProfileKinds_apiKeyClaudeStep2_label()],link:{href:Fe.anthropicKeys,label:e.settings_providerProfileKinds_anthropicConsole_link()}}}}function _r(c,a){return a?c==="apiKey"?e.settings_providerProfileKinds_apiKeyClaudeStep3_label():e.settings_providerProfileKinds_tokenClaudeStep3_label():e.settings_providerProfileKinds_pasteNoCheck_label()}function ps(c,a){if(a==="token")return c==="codex"?e.settings_providerProfileKinds_tokenNotJwt_error():c==="auggie"?e.settings_providerProfileKinds_tokenShapeAuggie_error():e.settings_providerProfileKinds_tokenShapeClaude_error();switch(c){case"codex":return e.settings_providerProfileKinds_keyShapeCodex_error();case"grok":return e.settings_providerProfileKinds_keyShapeGrok_error();case"droid":return e.settings_providerProfileKinds_keyShapeDroid_error();case"cursor":return e.settings_providerProfileKinds_keyShapeCursor_error();default:return e.settings_providerProfileKinds_keyShapeClaude_error()}}var vr=b('<p class="type-body text-muted-foreground" data-testid="provider-profile-token-eligibility"> </p>'),fr=b('<span class="mt-1 flex items-center gap-2" data-testid="provider-profile-setup-token"><code class="rounded border border-border bg-muted px-1.5 py-0.5 font-mono type-caption text-foreground"> </code> <!></span>'),Ct=b("<li> </li>"),gr=b('<section class="space-y-2" data-testid="provider-profile-secret-steps"><h3 class="type-body font-medium! text-foreground"> </h3> <ol class="type-body list-decimal space-y-1 pl-5 text-muted-foreground"><li> <!></li> <!> <!></ol> <!></section>'),St=b('<div class="flex items-center gap-2"><!> <!></div>'),br=b('<div class="space-y-2" data-testid="provider-profile-secret-saved"><p class="type-body text-foreground"> </p> <div class="flex items-center gap-3"><span class="type-body font-mono text-muted-foreground"> </span> <!></div></div>'),mr=b('<span class="type-body text-muted-foreground"> </span> <!>',1),hr=b('<span class="type-body font-mono text-muted-foreground"> </span> <!> <!>',1),xr=b('<div class="flex flex-wrap items-center gap-3" data-testid="provider-profile-base-url-saved"><span class="type-body text-foreground"> </span> <!></div>'),kr=b('<details class="group rounded-md border border-border" data-testid="provider-profile-custom-endpoint"><summary class="flex cursor-pointer list-none items-center gap-2 px-3 py-2 type-body text-foreground [&::-webkit-details-marker]:hidden"><!> </summary> <div class="space-y-2 border-t border-border px-3 py-3"><p class="type-caption text-muted-foreground"> </p> <!></div></details>'),yr=b('<div class="space-y-5" data-testid="provider-profile-secret"><!> <!> <!> <!></div>');function $r(c,a){if(new.target)return lt({component:$r,...c});pt(a,!0);let O=_(a,"provider",7),G=_(a,"kind",7),W=_(a,"mode",7),m=_(a,"secret",15,""),I=_(a,"secretSaved",7,!1),f=_(a,"replacing",15,!1),ae=_(a,"secretError",7),V=_(a,"baseUrl",15,""),he=_(a,"baseUrlSaved",7,!1),l=_(a,"baseUrlAction",15,"keep"),j=_(a,"customEndpointOpen",15,!1),$=_(a,"disabled",7,!1),B=_(a,"secretDisabled",23,$),ie=_(a,"keyCheck",7,!0),ne=_(a,"pasteStep",7,!0),te=_(a,"customEndpoint",7,!0);const xe="https://",De=y(()=>O()==="claude"&&G()==="apiKey"),M=y(()=>ur(O(),G())),we=y(()=>_r(G(),ie())),Oe=y(()=>W()==="add"||!I()||f()),Ve=y(()=>pr(O(),G()));function st(){f(!1),m("")}var at={get provider(){return O()},set provider(r){O(r),v()},get kind(){return G()},set kind(r){G(r),v()},get mode(){return W()},set mode(r){W(r),v()},get secret(){return m()},set secret(r=""){m(r),v()},get secretSaved(){return I()},set secretSaved(r=!1){I(r),v()},get replacing(){return f()},set replacing(r=!1){f(r),v()},get secretError(){return ae()},set secretError(r){ae(r),v()},get baseUrl(){return V()},set baseUrl(r=""){V(r),v()},get baseUrlSaved(){return he()},set baseUrlSaved(r=!1){he(r),v()},get baseUrlAction(){return l()},set baseUrlAction(r="keep"){l(r),v()},get customEndpointOpen(){return j()},set customEndpointOpen(r=!1){j(r),v()},get disabled(){return $()},set disabled(r=!1){$(r),v()},get secretDisabled(){return B()},set secretDisabled(r=$){B(r),v()},get keyCheck(){return ie()},set keyCheck(r=!0){ie(r),v()},get pasteStep(){return ne()},set pasteStep(r=!0){ne(r),v()},get customEndpoint(){return te()},set customEndpoint(r=!0){te(r),v()},$set:dt,$on:(r,P)=>ct(a,r,P)},Be=yr(),Le=h(Be);{var je=r=>{var P=vr(),R=D(P,!0);n(()=>i(R,t(M).eligibility)),s(r,P)};k(Le,r=>{t(M).eligibility&&r(je)})}var _e=o(Le,2);{var Me=r=>{var P=gr(),R=h(P),oe=D(R,!0),Q=o(R,2),X=h(Q),le=h(X),ke=o(le);{var N=g=>{var w=fr(),J=h(w),T=D(J,!0),de=o(J,2);Wt(de,{get text(){return t(M).command},size:"sm"}),x(w),n(()=>i(T,t(M).command)),s(g,w)};k(ke,g=>{t(M).command&&g(N)})}x(X);var ve=o(X,2);{var re=g=>{var w=Ct(),J=D(w,!0);n(()=>i(J,t(M).steps[1])),s(g,w)};k(ve,g=>{t(M).steps[1]&&g(re)})}var z=o(ve,2);{var H=g=>{var w=Ct(),J=D(w,!0);n(()=>i(J,t(we))),s(g,w)};k(z,g=>{ne()&&g(H)})}x(Q);var ye=o(Q,2);{var Ee=g=>{U(g,{variant:"link",size:"sm",get href(){return t(M).link.href},target:"_blank",rel:"noopener noreferrer",class:"h-auto px-0",children:(w,J)=>{S();var T=A();n(()=>i(T,t(M).link.label)),s(w,T)},$$slots:{default:!0}})};k(ye,g=>{t(M).link&&g(Ee)})}x(P),n(g=>{i(oe,g),i(le,`${t(M).steps[0]??""} `)},[()=>G()==="apiKey"?e.settings_providerProfileKinds_apiKeyClaudeSteps_label():e.settings_providerProfileKinds_tokenSteps_label()]),s(r,P)};k(_e,r=>{(W()==="add"||f())&&r(Me)})}var K=o(_e,2);{var Qe=r=>{ht(r,{get label(){return t(Ve)},get error(){return ae()},control:(R,oe=gt)=>{var Q=St(),X=h(Q);rt(X,ft(oe,{type:"password",autocomplete:"off",spellcheck:!1,class:"font-mono",get disabled(){return B()},"data-testid":"provider-profile-secret-input",get value(){return m()},set value(N){m(N)}}));var le=o(X,2);{var ke=N=>{U(N,{variant:"ghost-light",size:"sm",get disabled(){return B()},onclick:st,children:(ve,re)=>{S();var z=A();n(H=>i(z,H),[()=>e.settings_providerProfileKinds_keepSaved_label()]),s(ve,z)},$$slots:{default:!0}})};k(le,N=>{W()==="edit"&&I()&&N(ke)})}x(Q),s(R,Q)},$$slots:{control:!0}})},qe=r=>{var P=br(),R=h(P),oe=D(R,!0),Q=o(R,2),X=h(Q),le=D(X,!0),ke=o(X,2);U(ke,{variant:"outline",size:"sm",get disabled(){return $()},onclick:()=>f(!0),children:(N,ve)=>{S();var re=A();n(z=>i(re,z),[()=>e.settings_providerProfileKinds_replace_label()]),s(N,re)},$$slots:{default:!0}}),x(Q),x(P),n(N=>{i(oe,t(Ve)),i(le,N)},[()=>e.settings_providerProfileKinds_saved_label()]),s(r,P)};k(K,r=>{t(Oe)?r(Qe):r(qe,-1)})}var it=o(K,2);{var Xe=r=>{var P=kr(),R=h(P),oe=h(R);Nt(oe,{get icon(){return Jt},class:"size-3 transition-transform group-open:rotate-90"});var Q=o(oe);x(R);var X=o(R,2),le=h(X),ke=D(le,!0),N=o(le,2);{var ve=z=>{var H=xr(),ye=h(H),Ee=D(ye,!0),g=o(ye,2);{var w=T=>{var de=mr(),Y=Je(de),Ce=D(Y,!0),Ge=o(Y,2);U(Ge,{variant:"ghost-light",size:"sm",get disabled(){return $()},onclick:()=>l("keep"),children:(fe,ge)=>{S();var Re=A();n($e=>i(Re,$e),[()=>e.settings_providerProfileKinds_keepSaved_label()]),s(fe,Re)},$$slots:{default:!0}}),n(fe=>i(Ce,fe),[()=>e.settings_providerProfileKinds_baseUrlRemoved_label()]),s(T,de)},J=T=>{var de=hr(),Y=Je(de),Ce=D(Y,!0),Ge=o(Y,2);U(Ge,{variant:"outline",size:"sm",get disabled(){return $()},onclick:()=>l("replace"),children:(ge,Re)=>{S();var $e=A();n(u=>i($e,u),[()=>e.settings_providerProfileKinds_replace_label()]),s(ge,$e)},$$slots:{default:!0}});var fe=o(Ge,2);U(fe,{variant:"ghost-light",size:"sm",get disabled(){return $()},onclick:()=>l("remove"),children:(ge,Re)=>{S();var $e=A();n(u=>i($e,u),[()=>e.settings_providerProfiles_remove_label()]),s(ge,$e)},$$slots:{default:!0}}),n(ge=>i(Ce,ge),[()=>e.settings_providerProfileKinds_saved_label()]),s(T,de)};k(g,T=>{l()==="remove"?T(w):T(J,-1)})}x(H),n(T=>i(Ee,T),[()=>e.settings_providerProfileKinds_baseUrl_label()]),s(z,H)},re=z=>{{const H=(Ee,g=gt)=>{var w=St(),J=h(w);rt(J,ft(g,{type:"url",placeholder:xe,autocomplete:"off",spellcheck:!1,class:"font-mono",get disabled(){return $()},"data-testid":"provider-profile-base-url-input",get value(){return V()},set value(Y){V(Y)}}));var T=o(J,2);{var de=Y=>{U(Y,{variant:"ghost-light",size:"sm",get disabled(){return $()},onclick:()=>{l("keep"),V("")},children:(Ce,Ge)=>{S();var fe=A();n(ge=>i(fe,ge),[()=>e.settings_providerProfileKinds_keepSaved_label()]),s(Ce,fe)},$$slots:{default:!0}})};k(T,Y=>{W()==="edit"&&he()&&Y(de)})}x(w),s(Ee,w)};let ye=y(()=>e.settings_providerProfileKinds_baseUrl_label());ht(z,{get label(){return t(ye)},control:H,$$slots:{control:!0}})}};k(N,z=>{W()==="edit"&&he()&&l()!=="replace"?z(ve):z(re,-1)})}x(X),x(P),n((z,H)=>{i(Q,` ${z??""}`),i(ke,H)},[()=>e.settings_providerProfileKinds_customEndpoint_label(),()=>e.settings_providerProfileKinds_customEndpoint_description()]),Ht("open","toggle",P,j,j),s(r,P)};k(it,r=>{t(De)&&te()&&r(Xe)})}return x(Be),n(()=>ot(Be,"data-kind",G())),s(c,Be),ut(at)}var Kr=b('<p class="text-sm text-subtle" role="status" data-testid="gitlab-instance-update-required"> </p>'),Pr=b('<p class="break-all type-caption text-subtle" data-testid="gitlab-connect-instance"> </p>'),Cr=b('<div class="max-w-sm space-y-3" data-testid="gitlab-connect-device-flow"><!> <div class="flex flex-wrap items-center gap-2 text-subtle text-sm"><!> <span> </span> <!> <!></div></div>'),Sr=b('<div class="flex flex-wrap items-center gap-2 text-subtle text-sm"><!> <span> </span> <!></div>'),Ar=b('<p class="text-xs text-danger" role="alert"> </p>'),Dr=b('<div class="max-w-sm space-y-1" data-testid="gitlab-connect-token"><!> <!> <p class="text-xs text-subtle"> <!></p></div> <div class="flex flex-wrap items-center gap-2"><!> <!> <!></div>',1),wr=b('<div class="flex flex-wrap items-center gap-2"><!> <!> <!></div>'),Lr=b('<div class="max-w-sm space-y-1"><!> <!> <p class="text-xs text-subtle"> </p> <!></div> <!>',1),Er=b('<p class="text-sm text-subtle" role="status"> </p>'),Gr=b('<div class="space-y-1"><p class="text-sm text-subtle" role="status"> </p> <!></div>'),Ir=b('<p class="text-sm text-danger" role="alert"> </p>'),Ur=b('<div data-testid="gitlab-connect-form"><!> <!> <!> <!> <!></div>');function zr(c,a){const O=Gt();if(new.target)return lt({component:zr,...c});pt(a,!0);const G=()=>Ae(De,"$storedInstance$",l),W=()=>Ae(st,"$deviceGrantSupported$",l),m=()=>Ae(Be,"$instanceSetupSupported$",l),I=()=>Ae(M,"$isAuthenticating$",l),f=()=>Ae(we,"$isCancelling$",l),ae=()=>Ae(Ve,"$deviceFlow$",l),V=()=>Ae(Oe,"$cancelOutcome$",l),he=()=>Ae(at,"$error$",l),[l,j]=Lt();let $=_(a,"compact",7,!1),B=_(a,"onCancel",7);const ie=`${O}-host`,ne=`${O}-host-help`,te=`${O}-host-error`,xe=`${O}-token`,De=$t(),M=Kt(),we=tr(),Oe=rr(),Ve=Pt(),st=sr(),at=ar(),Be=ir();let Le=tt(It($t.select(Pe.state))),je=tt(!1),_e=tt(""),Me=tt(!1);const K=y(()=>Xt(t(Le))),Qe=y(()=>t(Me)||t(K)===G()&&W()===!1),qe=y(()=>t(K)?Zt(t(K)):null),it=y(()=>m()&&t(K)!==null&&t(_e).trim().length>0);bt(()=>{const u=G();t(je)||Ke(Le,u,!0)}),bt(()=>{m()||Ke(_e,"")}),Ut(()=>{const u=()=>{const d=Pe.state;Kt.select(d)&&Pt.select(d)&&Pe.dispatch(kt())};return window.addEventListener("focus",u),()=>window.removeEventListener("focus",u)});function Xe(){!m()||!t(K)||t(K)===G()||I()||f()||Pe.dispatch(Qt(t(K)))}function r(){Ke(je,!0),Ke(_e,"")}function P(){!m()||!t(K)||I()||f()||Pe.dispatch(Yt(t(K)))}function R(){const u=t(_e).trim();!m()||!u||!t(K)||I()||f()||(Pe.dispatch(er(t(K),u)),Ke(_e,""))}function oe(){!m()||f()||(I()&&Pe.dispatch(yt()),Ke(Me,!0))}function Q(){Ke(Me,!1)}function X(){f()||Pe.dispatch(yt())}function le(){t(qe)&&Vt(t(qe),{})}function ke(u){u.key==="Enter"&&(u.preventDefault(),Xe(),t(Qe)?document.getElementById(xe)?.focus():P())}function N(u){u.key==="Enter"&&(u.preventDefault(),R())}const ve=y(()=>$()?"sm":"xl"),re=y(()=>$()?"sm":"default");var z={get compact(){return $()},set compact(u=!1){$(u),v()},get onCancel(){return B()},set onCancel(u){B(u),v()},$set:dt,$on:(u,d)=>ct(a,u,d)},H=Ur();{const u=d=>{U(d,{variant:"ghost",size:"sm",type:"button",class:"text-muted-foreground hover:text-foreground",get disabled(){return f()},onclick:X,children:(p,C)=>{S();var F=A();n(ce=>i(F,ce),[()=>f()?e.lib_gitlabConnect_cancelling_label():e.lib_gitlabConnect_cancel_label()]),s(p,F)},$$slots:{default:!0}})};var ye=h(H);{var Ee=d=>{var p=Kr(),C=D(p,!0);n(F=>i(C,F),[()=>e.lib_gitlabConnect_updateRequired_description()]),s(d,p)};k(ye,d=>{m()||d(Ee)})}var g=o(ye,2);{var w=d=>{var p=Pr(),C=D(p,!0);n(()=>i(C,G())),s(d,p)};k(g,d=>{(I()||f())&&d(w)})}var J=o(g,2);{var T=d=>{var p=Cr(),C=h(p);{let Ue=y(()=>e.lib_gitlabConnect_openGitlab_label());qt(C,{get userCode(){return ae().userCode},get verificationUri(){return ae().verificationUri},get openLabel(){return t(Ue)},get compact(){return $()}})}var F=o(C,2),ce=h(F);mt(ce,{size:16,class:"shrink-0"});var se=o(ce,2),He=D(se,!0),Ie=o(se,2);{let Ue=y(()=>f()||!m());U(Ie,{variant:"link",size:"sm",type:"button",class:"px-0",get disabled(){return t(Ue)},onclick:oe,children:(nt,_t)=>{S();var L=A();n(q=>i(L,q),[()=>e.lib_gitlabConnect_useToken_label()]),s(nt,L)},$$slots:{default:!0}})}var We=o(Ie,2);u(We),x(F),x(p),n(Ue=>i(He,Ue),[()=>e.lib_gitlabConnect_waitingForAuthorization_label()]),s(d,p)},de=d=>{var p=Sr(),C=h(p);mt(C,{size:16,class:"shrink-0"});var F=o(C,2),ce=D(F,!0),se=o(F,2);u(se),x(p),n(He=>i(ce,He),[()=>e.lib_gitlabConnect_connecting_label()]),s(d,p)},Y=d=>{var p=Lr(),C=Je(p),F=h(C);xt(F,{get for(){return ie},children:(L,q)=>{S();var Z=A();n(pe=>i(Z,pe),[()=>e.lib_gitlabConnect_host_label()]),s(L,Z)},$$slots:{default:!0}});var ce=o(F,2);{let L=y(()=>!m()),q=y(()=>!t(K)||void 0),Z=y(()=>t(K)?ne:`${ne} ${te}`);rt(ce,{get id(){return ie},type:"text",autocomplete:"url",spellcheck:!1,get disabled(){return t(L)},get"aria-invalid"(){return t(q)},get"aria-describedby"(){return t(Z)},get placeholder(){return jt},oninput:r,onchange:Xe,onkeydown:ke,get value(){return t(Le)},set value(pe){Ke(Le,pe,!0)}})}var se=o(ce,2),He=D(se,!0),Ie=o(se,2);{var We=L=>{var q=Ar(),Z=D(q,!0);n(pe=>{ot(q,"id",te),i(Z,pe)},[()=>e.lib_gitlabConnect_invalidInstance_error()]),s(L,q)};k(Ie,L=>{t(K)||L(We)})}x(C);var Ue=o(C,2);{var nt=L=>{var q=Dr(),Z=Je(q),pe=h(Z);xt(pe,{get for(){return xe},children:(E,me)=>{S();var Ne=A();n(ee=>i(Ne,ee),[()=>e.lib_gitlabConnect_token_label()]),s(E,Ne)},$$slots:{default:!0}});var Ye=o(pe,2);{let E=y(()=>!m());rt(Ye,{get id(){return xe},type:"password",autocomplete:"off",get disabled(){return t(E)},placeholder:"glpat-...",onkeydown:N,get value(){return t(_e)},set value(me){Ke(_e,me,!0)}})}var Ze=o(Ye,2),be=h(Ze),ze=o(be);{var et=E=>{U(E,{variant:"link",size:"sm",type:"button",class:"h-auto px-0 text-xs",onclick:le,children:(me,Ne)=>{S();var ee=A();n(Te=>i(ee,Te),[()=>e.lib_gitlabConnect_createToken_label({host:t(K)})]),s(me,ee)},$$slots:{default:!0}})};k(ze,E=>{t(qe)&&t(K)&&E(et)})}x(Ze),x(Z);var ue=o(Z,2),Se=h(ue);{let E=y(()=>!t(it));U(Se,{variant:"primary",get size(){return t(ve)},type:"button",onclick:R,get disabled(){return t(E)},children:(me,Ne)=>{S();var ee=A();n(Te=>i(ee,Te),[()=>e.lib_gitlabConnect_connect_label()]),s(me,ee)},$$slots:{default:!0}})}var vt=o(Se,2);{var At=E=>{U(E,{variant:"ghost",get size(){return t(re)},type:"button",onclick:Q,children:(me,Ne)=>{S();var ee=A();n(Te=>i(ee,Te),[()=>e.lib_gitlabConnect_useDevice_label()]),s(me,ee)},$$slots:{default:!0}})};k(vt,E=>{t(Me)&&!(t(K)===G()&&W()===!1)&&E(At)})}var Dt=o(vt,2);{var wt=E=>{U(E,{variant:"ghost",get size(){return t(re)},type:"button",get onclick(){return B()},children:(me,Ne)=>{S();var ee=A();n(Te=>i(ee,Te),[()=>e.lib_gitlabConnect_cancel_label()]),s(me,ee)},$$slots:{default:!0}})};k(Dt,E=>{B()&&E(wt)})}x(ue),n(E=>i(be,`${E??""} `),[()=>e.lib_gitlabConnect_token_description()]),s(L,q)},_t=L=>{var q=wr(),Z=h(q);{let be=y(()=>!t(K)||!m());U(Z,{variant:"primary",get size(){return t(ve)},type:"button",onclick:P,get disabled(){return t(be)},children:(ze,et)=>{S();var ue=A();n(Se=>i(ue,Se),[()=>e.lib_gitlabConnect_connect_label()]),s(ze,ue)},$$slots:{default:!0}})}var pe=o(Z,2);{let be=y(()=>!m());U(pe,{variant:"ghost",get size(){return t(re)},type:"button",get disabled(){return t(be)},onclick:oe,children:(ze,et)=>{S();var ue=A();n(Se=>i(ue,Se),[()=>e.lib_gitlabConnect_useToken_label()]),s(ze,ue)},$$slots:{default:!0}})}var Ye=o(pe,2);{var Ze=be=>{U(be,{variant:"ghost",get size(){return t(re)},type:"button",get onclick(){return B()},children:(ze,et)=>{S();var ue=A();n(Se=>i(ue,Se),[()=>e.lib_gitlabConnect_cancel_label()]),s(ze,ue)},$$slots:{default:!0}})};k(Ye,be=>{B()&&be(Ze)})}x(q),s(L,q)};k(Ue,L=>{t(Qe)?L(nt):L(_t,-1)})}n(L=>{ot(se,"id",ne),i(He,L)},[()=>e.lib_gitlabConnect_host_description()]),s(d,p)};k(J,d=>{(I()||f())&&ae()?d(T):I()||f()?d(de,1):d(Y,-1)})}var Ce=o(J,2);{var Ge=d=>{var p=Er(),C=D(p,!0);n(F=>i(C,F),[()=>e.lib_gitlabConnect_cancelled_label()]),s(d,p)},fe=d=>{var p=Gr(),C=h(p),F=D(C,!0),ce=o(C,2);U(ce,{variant:"link",size:"sm",type:"button",class:"px-0",get disabled(){return f()},onclick:()=>Pe.dispatch(kt()),children:(se,He)=>{S();var Ie=A();n(We=>i(Ie,We),[()=>e.lib_gitlabConnect_checkStatus_label()]),s(se,Ie)},$$slots:{default:!0}}),x(p),n(se=>i(F,se),[()=>V()==="already-started"?e.lib_gitlabConnect_alreadyStarted_description():e.lib_gitlabConnect_cancelFailed_description()]),s(d,p)};k(Ce,d=>{V()==="cancelled"?d(Ge):(V()==="already-started"||V()==="failed")&&d(fe,1)})}var ge=o(Ce,2);{var Re=d=>{var p=Ir(),C=D(p,!0);n(()=>i(C,he())),s(d,p)};k(ge,d=>{he()&&d(Re)})}x(H)}n(()=>Ot(H,1,Bt($()?"space-y-2":"space-y-4"))),s(c,H);var $e=ut(z);return j(),$e}export{zr as G,or as M,$r as P,pr as a,ps as b,cr as k,cs as s};
|
|
1
|
+
import{t as lt,bo as _,bw as dt,b as ct,bm as e,br as ft,bs as Ae,bq as Lt}from"./3Mdoz-0Q.js";import{bs as pt,ay as Je,be as S,b$ as A,b_ as n,bO as i,W as s,bS as o,bl as D,bn as ut,aA as v,a7 as Et,aD as t,c9 as y,aB as b,a5 as h,bA as x,bf as gt,bo as Gt,bV as tt,br as It,ca as bt,bH as Ke,bk as Ut}from"./3SdAC2_C.js";import{g as zt,i as Tt,I as mt}from"./Bj3DquZA.js";import{c as Ft}from"./Dcys5Bs9.js";import{s as ot,f as Ot,c as Bt}from"./kR4OBGp8.js";import{f as U}from"./yF7QjJ_G.js";import"./CWzES__t.js";import"./BqvIfFJz.js";import{b as Mt}from"./BOKKr5p4.js";import"./SfUr14xu.js";import"./g4HdeOyY.js";import{b as Rt}from"./l7z39TjX.js";import{i as k}from"./BdqQb89H.js";import{b as Ht}from"./D3yXvqwY.js";import{F as Nt,ay as Jt}from"./BQ64OnCJ.js";import"./BOfUqw1E.js";import{F as ht,G as qt}from"./Bv4WoH6n.js";import"./CBw6a9pd.js";/* empty css */import{C as Wt}from"./KkEpTlxU.js";import{L as xt}from"./bDc4vYO6.js";import{I as rt}from"./Cvrwd8gY.js";import"./D1o5arZx.js";import"./B_uN9rMf.js";import{h as Vt}from"./C81BxYgH.js";import{Jv as Pe,fB as kt,J as jt,eo as yt,r5 as Qt,uA as Xt,Jm as Yt,oD as Zt,hR as er}from"./DmuzFYIt.js";import{aC as $t,aD as Kt,aE as tr,ax as rr,ay as Pt,az as sr,aA as ar,aI as ir}from"./DI8QKtVI.js";var nr=b('<!> <p class="type-body"> </p>',1);function or(c,a){if(new.target)return lt({component:or,...c});pt(a,!0);let O=_(a,"open",15,!1),G=_(a,"static",7,!1),W=_(a,"title",7),m=_(a,"message",7),I=_(a,"buttons",7),f=_(a,"cancelIndex",7,0),ae=_(a,"onSelect",7);function V(l){O(!1),ae()?.(l)}var he={get open(){return O()},set open(l=!1){O(l),v()},get static(){return G()},set static(l=!1){G(l),v()},get title(){return W()},set title(l){W(l),v()},get message(){return m()},set message(l){m(l),v()},get buttons(){return I()},set buttons(l){I(l),v()},get cancelIndex(){return f()},set cancelIndex(l=0){f(l),v()},get onSelect(){return ae()},set onSelect(l){ae(l),v()},$set:dt,$on:(l,j)=>ct(a,l,j)};return Rt(c,{get static(){return G()},role:"alertdialog",get title(){return W()},dismissOnInteractOutside:!1,focusContent:!0,onSubmit:()=>V(I().length-1),onCancel:()=>V(f()),get open(){return O()},set open(j){O(j)},footer:j=>{var $=Et(),B=Je($);zt(B,17,I,Tt,(ie,ne,te)=>{{let xe=y(()=>te===f()?"ghost":te===I().length-1?"primary":"outline");U(ie,{get variant(){return t(xe)},onclick:()=>V(te),children:(De,M)=>{S();var we=A();n(()=>i(we,t(ne))),s(De,we)},$$slots:{default:!0}})}}),s(j,$)},children:(j,$)=>{var B=nr(),ie=Je(B);Ft(ie,()=>Mt,(xe,De)=>{De(xe,{class:"sr-only",children:(M,we)=>{S();var Oe=A();n(()=>i(Oe,m())),s(M,Oe)},$$slots:{default:!0}})});var ne=o(ie,2),te=D(ne,!0);n(()=>i(te,m())),s(j,B)},$$slots:{footer:!0,default:!0}}),ut(he)}const Fe={anthropicKeys:"https://console.anthropic.com/settings/keys",openAiKeys:"https://platform.openai.com/api-keys",openAiTokens:"https://developers.openai.com/codex/enterprise/access-tokens",xaiConsole:"https://console.x.ai",factoryKeys:"https://app.factory.ai/settings/api-keys",cursorDashboard:"https://cursor.com/dashboard?tab=integrations",auggieAuth:"https://docs.augmentcode.com/cli/setup-auggie/authentication"},lr="claude setup-token",dr="auggie token print";function cr(c,a){if(a==="differentLogin")return e.settings_providerProfileKinds_differentLogin_description();if(a==="token")return c==="codex"?e.settings_providerProfileKinds_tokenCodex_description():c==="auggie"?e.settings_providerProfileKinds_tokenAuggie_description():e.settings_providerProfileKinds_tokenClaude_description();switch(c){case"codex":return e.settings_providerProfileKinds_apiKeyCodex_description();case"grok":return e.settings_providerProfileKinds_apiKeyGrok_description();case"droid":return e.settings_providerProfileKinds_apiKeyDroid_description();case"cursor":return e.settings_providerProfileKinds_apiKeyCursor_description();default:return e.settings_providerProfileKinds_apiKeyClaude_description()}}function pr(c,a){return a==="apiKey"?e.settings_providerProfileKinds_apiKey_label():c==="auggie"?e.settings_providerProfileKinds_tokenAuggie_label():e.settings_providerProfileKinds_token_label()}function cs(c,a){return c!=="claude"&&c!=="codex"?cr(c,a):a==="token"?c==="codex"?e.settings_providerProfileKinds_tokenCodexDialog_description():e.settings_providerProfileKinds_tokenClaudeDialog_description():c==="codex"?e.settings_providerProfileKinds_apiKeyCodexDialog_description():e.settings_providerProfileKinds_apiKeyClaudeDialog_description()}function ur(c,a){if(a==="token")return c==="codex"?{steps:[e.settings_providerProfileKinds_tokenCodexStep1_label()],link:{href:Fe.openAiTokens,label:e.settings_providerProfileKinds_openAiAccessTokens_link()},eligibility:e.settings_providerProfileKinds_tokenCodexEligibility_description()}:c==="auggie"?{steps:[e.settings_providerProfileKinds_tokenAuggieStep1_label(),e.settings_providerProfileKinds_tokenAuggieStep2_label()],command:dr,link:{href:Fe.auggieAuth,label:e.settings_providerProfileKinds_auggieAuthDocs_link()}}:{steps:[e.settings_providerProfileKinds_tokenClaudeStep1_label(),e.settings_providerProfileKinds_tokenClaudeStep2_label()],command:lr};switch(c){case"codex":return{steps:[e.settings_providerProfileKinds_apiKeyCodexStep1_label(),e.settings_providerProfileKinds_apiKeyCodexStep2_label()],link:{href:Fe.openAiKeys,label:e.settings_providerProfileKinds_openAiApiKeys_link()}};case"grok":return{steps:[e.settings_providerProfileKinds_apiKeyGrokStep1_label(),e.settings_providerProfileKinds_apiKeyGrokStep2_label()],link:{href:Fe.xaiConsole,label:e.settings_providerProfileKinds_xaiConsole_link()}};case"droid":return{steps:[e.settings_providerProfileKinds_apiKeyDroidStep1_label(),e.settings_providerProfileKinds_apiKeyDroidStep2_label()],link:{href:Fe.factoryKeys,label:e.settings_providerProfileKinds_factoryApiKeys_link()}};case"cursor":return{steps:[e.settings_providerProfileKinds_apiKeyCursorStep1_label(),e.settings_providerProfileKinds_apiKeyCursorStep2_label()],link:{href:Fe.cursorDashboard,label:e.settings_providerProfileKinds_cursorDashboard_link()}};default:return{steps:[e.settings_providerProfileKinds_apiKeyClaudeStep1_label(),e.settings_providerProfileKinds_apiKeyClaudeStep2_label()],link:{href:Fe.anthropicKeys,label:e.settings_providerProfileKinds_anthropicConsole_link()}}}}function _r(c,a){return a?c==="apiKey"?e.settings_providerProfileKinds_apiKeyClaudeStep3_label():e.settings_providerProfileKinds_tokenClaudeStep3_label():e.settings_providerProfileKinds_pasteNoCheck_label()}function ps(c,a){if(a==="token")return c==="codex"?e.settings_providerProfileKinds_tokenNotJwt_error():c==="auggie"?e.settings_providerProfileKinds_tokenShapeAuggie_error():e.settings_providerProfileKinds_tokenShapeClaude_error();switch(c){case"codex":return e.settings_providerProfileKinds_keyShapeCodex_error();case"grok":return e.settings_providerProfileKinds_keyShapeGrok_error();case"droid":return e.settings_providerProfileKinds_keyShapeDroid_error();case"cursor":return e.settings_providerProfileKinds_keyShapeCursor_error();default:return e.settings_providerProfileKinds_keyShapeClaude_error()}}var vr=b('<p class="type-body text-muted-foreground" data-testid="provider-profile-token-eligibility"> </p>'),fr=b('<span class="mt-1 flex items-center gap-2" data-testid="provider-profile-setup-token"><code class="rounded border border-border bg-muted px-1.5 py-0.5 font-mono type-caption text-foreground"> </code> <!></span>'),Ct=b("<li> </li>"),gr=b('<section class="space-y-2" data-testid="provider-profile-secret-steps"><h3 class="type-body font-medium! text-foreground"> </h3> <ol class="type-body list-decimal space-y-1 pl-5 text-muted-foreground"><li> <!></li> <!> <!></ol> <!></section>'),St=b('<div class="flex items-center gap-2"><!> <!></div>'),br=b('<div class="space-y-2" data-testid="provider-profile-secret-saved"><p class="type-body text-foreground"> </p> <div class="flex items-center gap-3"><span class="type-body font-mono text-muted-foreground"> </span> <!></div></div>'),mr=b('<span class="type-body text-muted-foreground"> </span> <!>',1),hr=b('<span class="type-body font-mono text-muted-foreground"> </span> <!> <!>',1),xr=b('<div class="flex flex-wrap items-center gap-3" data-testid="provider-profile-base-url-saved"><span class="type-body text-foreground"> </span> <!></div>'),kr=b('<details class="group rounded-md border border-border" data-testid="provider-profile-custom-endpoint"><summary class="flex cursor-pointer list-none items-center gap-2 px-3 py-2 type-body text-foreground [&::-webkit-details-marker]:hidden"><!> </summary> <div class="space-y-2 border-t border-border px-3 py-3"><p class="type-caption text-muted-foreground"> </p> <!></div></details>'),yr=b('<div class="space-y-5" data-testid="provider-profile-secret"><!> <!> <!> <!></div>');function $r(c,a){if(new.target)return lt({component:$r,...c});pt(a,!0);let O=_(a,"provider",7),G=_(a,"kind",7),W=_(a,"mode",7),m=_(a,"secret",15,""),I=_(a,"secretSaved",7,!1),f=_(a,"replacing",15,!1),ae=_(a,"secretError",7),V=_(a,"baseUrl",15,""),he=_(a,"baseUrlSaved",7,!1),l=_(a,"baseUrlAction",15,"keep"),j=_(a,"customEndpointOpen",15,!1),$=_(a,"disabled",7,!1),B=_(a,"secretDisabled",23,$),ie=_(a,"keyCheck",7,!0),ne=_(a,"pasteStep",7,!0),te=_(a,"customEndpoint",7,!0);const xe="https://",De=y(()=>O()==="claude"&&G()==="apiKey"),M=y(()=>ur(O(),G())),we=y(()=>_r(G(),ie())),Oe=y(()=>W()==="add"||!I()||f()),Ve=y(()=>pr(O(),G()));function st(){f(!1),m("")}var at={get provider(){return O()},set provider(r){O(r),v()},get kind(){return G()},set kind(r){G(r),v()},get mode(){return W()},set mode(r){W(r),v()},get secret(){return m()},set secret(r=""){m(r),v()},get secretSaved(){return I()},set secretSaved(r=!1){I(r),v()},get replacing(){return f()},set replacing(r=!1){f(r),v()},get secretError(){return ae()},set secretError(r){ae(r),v()},get baseUrl(){return V()},set baseUrl(r=""){V(r),v()},get baseUrlSaved(){return he()},set baseUrlSaved(r=!1){he(r),v()},get baseUrlAction(){return l()},set baseUrlAction(r="keep"){l(r),v()},get customEndpointOpen(){return j()},set customEndpointOpen(r=!1){j(r),v()},get disabled(){return $()},set disabled(r=!1){$(r),v()},get secretDisabled(){return B()},set secretDisabled(r=$){B(r),v()},get keyCheck(){return ie()},set keyCheck(r=!0){ie(r),v()},get pasteStep(){return ne()},set pasteStep(r=!0){ne(r),v()},get customEndpoint(){return te()},set customEndpoint(r=!0){te(r),v()},$set:dt,$on:(r,P)=>ct(a,r,P)},Be=yr(),Le=h(Be);{var je=r=>{var P=vr(),R=D(P,!0);n(()=>i(R,t(M).eligibility)),s(r,P)};k(Le,r=>{t(M).eligibility&&r(je)})}var _e=o(Le,2);{var Me=r=>{var P=gr(),R=h(P),oe=D(R,!0),Q=o(R,2),X=h(Q),le=h(X),ke=o(le);{var N=g=>{var w=fr(),J=h(w),T=D(J,!0),de=o(J,2);Wt(de,{get text(){return t(M).command},size:"sm"}),x(w),n(()=>i(T,t(M).command)),s(g,w)};k(ke,g=>{t(M).command&&g(N)})}x(X);var ve=o(X,2);{var re=g=>{var w=Ct(),J=D(w,!0);n(()=>i(J,t(M).steps[1])),s(g,w)};k(ve,g=>{t(M).steps[1]&&g(re)})}var z=o(ve,2);{var H=g=>{var w=Ct(),J=D(w,!0);n(()=>i(J,t(we))),s(g,w)};k(z,g=>{ne()&&g(H)})}x(Q);var ye=o(Q,2);{var Ee=g=>{U(g,{variant:"link",size:"sm",get href(){return t(M).link.href},target:"_blank",rel:"noopener noreferrer",class:"h-auto px-0",children:(w,J)=>{S();var T=A();n(()=>i(T,t(M).link.label)),s(w,T)},$$slots:{default:!0}})};k(ye,g=>{t(M).link&&g(Ee)})}x(P),n(g=>{i(oe,g),i(le,`${t(M).steps[0]??""} `)},[()=>G()==="apiKey"?e.settings_providerProfileKinds_apiKeyClaudeSteps_label():e.settings_providerProfileKinds_tokenSteps_label()]),s(r,P)};k(_e,r=>{(W()==="add"||f())&&r(Me)})}var K=o(_e,2);{var Qe=r=>{ht(r,{get label(){return t(Ve)},get error(){return ae()},control:(R,oe=gt)=>{var Q=St(),X=h(Q);rt(X,ft(oe,{type:"password",autocomplete:"off",spellcheck:!1,class:"font-mono",get disabled(){return B()},"data-testid":"provider-profile-secret-input",get value(){return m()},set value(N){m(N)}}));var le=o(X,2);{var ke=N=>{U(N,{variant:"ghost-light",size:"sm",get disabled(){return B()},onclick:st,children:(ve,re)=>{S();var z=A();n(H=>i(z,H),[()=>e.settings_providerProfileKinds_keepSaved_label()]),s(ve,z)},$$slots:{default:!0}})};k(le,N=>{W()==="edit"&&I()&&N(ke)})}x(Q),s(R,Q)},$$slots:{control:!0}})},qe=r=>{var P=br(),R=h(P),oe=D(R,!0),Q=o(R,2),X=h(Q),le=D(X,!0),ke=o(X,2);U(ke,{variant:"outline",size:"sm",get disabled(){return $()},onclick:()=>f(!0),children:(N,ve)=>{S();var re=A();n(z=>i(re,z),[()=>e.settings_providerProfileKinds_replace_label()]),s(N,re)},$$slots:{default:!0}}),x(Q),x(P),n(N=>{i(oe,t(Ve)),i(le,N)},[()=>e.settings_providerProfileKinds_saved_label()]),s(r,P)};k(K,r=>{t(Oe)?r(Qe):r(qe,-1)})}var it=o(K,2);{var Xe=r=>{var P=kr(),R=h(P),oe=h(R);Nt(oe,{get icon(){return Jt},class:"size-3 transition-transform group-open:rotate-90"});var Q=o(oe);x(R);var X=o(R,2),le=h(X),ke=D(le,!0),N=o(le,2);{var ve=z=>{var H=xr(),ye=h(H),Ee=D(ye,!0),g=o(ye,2);{var w=T=>{var de=mr(),Y=Je(de),Ce=D(Y,!0),Ge=o(Y,2);U(Ge,{variant:"ghost-light",size:"sm",get disabled(){return $()},onclick:()=>l("keep"),children:(fe,ge)=>{S();var Re=A();n($e=>i(Re,$e),[()=>e.settings_providerProfileKinds_keepSaved_label()]),s(fe,Re)},$$slots:{default:!0}}),n(fe=>i(Ce,fe),[()=>e.settings_providerProfileKinds_baseUrlRemoved_label()]),s(T,de)},J=T=>{var de=hr(),Y=Je(de),Ce=D(Y,!0),Ge=o(Y,2);U(Ge,{variant:"outline",size:"sm",get disabled(){return $()},onclick:()=>l("replace"),children:(ge,Re)=>{S();var $e=A();n(u=>i($e,u),[()=>e.settings_providerProfileKinds_replace_label()]),s(ge,$e)},$$slots:{default:!0}});var fe=o(Ge,2);U(fe,{variant:"ghost-light",size:"sm",get disabled(){return $()},onclick:()=>l("remove"),children:(ge,Re)=>{S();var $e=A();n(u=>i($e,u),[()=>e.settings_providerProfiles_remove_label()]),s(ge,$e)},$$slots:{default:!0}}),n(ge=>i(Ce,ge),[()=>e.settings_providerProfileKinds_saved_label()]),s(T,de)};k(g,T=>{l()==="remove"?T(w):T(J,-1)})}x(H),n(T=>i(Ee,T),[()=>e.settings_providerProfileKinds_baseUrl_label()]),s(z,H)},re=z=>{{const H=(Ee,g=gt)=>{var w=St(),J=h(w);rt(J,ft(g,{type:"url",placeholder:xe,autocomplete:"off",spellcheck:!1,class:"font-mono",get disabled(){return $()},"data-testid":"provider-profile-base-url-input",get value(){return V()},set value(Y){V(Y)}}));var T=o(J,2);{var de=Y=>{U(Y,{variant:"ghost-light",size:"sm",get disabled(){return $()},onclick:()=>{l("keep"),V("")},children:(Ce,Ge)=>{S();var fe=A();n(ge=>i(fe,ge),[()=>e.settings_providerProfileKinds_keepSaved_label()]),s(Ce,fe)},$$slots:{default:!0}})};k(T,Y=>{W()==="edit"&&he()&&Y(de)})}x(w),s(Ee,w)};let ye=y(()=>e.settings_providerProfileKinds_baseUrl_label());ht(z,{get label(){return t(ye)},control:H,$$slots:{control:!0}})}};k(N,z=>{W()==="edit"&&he()&&l()!=="replace"?z(ve):z(re,-1)})}x(X),x(P),n((z,H)=>{i(Q,` ${z??""}`),i(ke,H)},[()=>e.settings_providerProfileKinds_customEndpoint_label(),()=>e.settings_providerProfileKinds_customEndpoint_description()]),Ht("open","toggle",P,j,j),s(r,P)};k(it,r=>{t(De)&&te()&&r(Xe)})}return x(Be),n(()=>ot(Be,"data-kind",G())),s(c,Be),ut(at)}var Kr=b('<p class="text-sm text-subtle" role="status" data-testid="gitlab-instance-update-required"> </p>'),Pr=b('<p class="break-all type-caption text-subtle" data-testid="gitlab-connect-instance"> </p>'),Cr=b('<div class="max-w-sm space-y-3" data-testid="gitlab-connect-device-flow"><!> <div class="flex flex-wrap items-center gap-2 text-subtle text-sm"><!> <span> </span> <!> <!></div></div>'),Sr=b('<div class="flex flex-wrap items-center gap-2 text-subtle text-sm"><!> <span> </span> <!></div>'),Ar=b('<p class="text-xs text-danger" role="alert"> </p>'),Dr=b('<div class="max-w-sm space-y-1" data-testid="gitlab-connect-token"><!> <!> <p class="text-xs text-subtle"> <!></p></div> <div class="flex flex-wrap items-center gap-2"><!> <!> <!></div>',1),wr=b('<div class="flex flex-wrap items-center gap-2"><!> <!> <!></div>'),Lr=b('<div class="max-w-sm space-y-1"><!> <!> <p class="text-xs text-subtle"> </p> <!></div> <!>',1),Er=b('<p class="text-sm text-subtle" role="status"> </p>'),Gr=b('<div class="space-y-1"><p class="text-sm text-subtle" role="status"> </p> <!></div>'),Ir=b('<p class="text-sm text-danger" role="alert"> </p>'),Ur=b('<div data-testid="gitlab-connect-form"><!> <!> <!> <!> <!></div>');function zr(c,a){const O=Gt();if(new.target)return lt({component:zr,...c});pt(a,!0);const G=()=>Ae(De,"$storedInstance$",l),W=()=>Ae(st,"$deviceGrantSupported$",l),m=()=>Ae(Be,"$instanceSetupSupported$",l),I=()=>Ae(M,"$isAuthenticating$",l),f=()=>Ae(we,"$isCancelling$",l),ae=()=>Ae(Ve,"$deviceFlow$",l),V=()=>Ae(Oe,"$cancelOutcome$",l),he=()=>Ae(at,"$error$",l),[l,j]=Lt();let $=_(a,"compact",7,!1),B=_(a,"onCancel",7);const ie=`${O}-host`,ne=`${O}-host-help`,te=`${O}-host-error`,xe=`${O}-token`,De=$t(),M=Kt(),we=tr(),Oe=rr(),Ve=Pt(),st=sr(),at=ar(),Be=ir();let Le=tt(It($t.select(Pe.state))),je=tt(!1),_e=tt(""),Me=tt(!1);const K=y(()=>Xt(t(Le))),Qe=y(()=>t(Me)||t(K)===G()&&W()===!1),qe=y(()=>t(K)?Zt(t(K)):null),it=y(()=>m()&&t(K)!==null&&t(_e).trim().length>0);bt(()=>{const u=G();t(je)||Ke(Le,u,!0)}),bt(()=>{m()||Ke(_e,"")}),Ut(()=>{const u=()=>{const d=Pe.state;Kt.select(d)&&Pt.select(d)&&Pe.dispatch(kt())};return window.addEventListener("focus",u),()=>window.removeEventListener("focus",u)});function Xe(){!m()||!t(K)||t(K)===G()||I()||f()||Pe.dispatch(Qt(t(K)))}function r(){Ke(je,!0),Ke(_e,"")}function P(){!m()||!t(K)||I()||f()||Pe.dispatch(Yt(t(K)))}function R(){const u=t(_e).trim();!m()||!u||!t(K)||I()||f()||(Pe.dispatch(er(t(K),u)),Ke(_e,""))}function oe(){!m()||f()||(I()&&Pe.dispatch(yt()),Ke(Me,!0))}function Q(){Ke(Me,!1)}function X(){f()||Pe.dispatch(yt())}function le(){t(qe)&&Vt(t(qe),{})}function ke(u){u.key==="Enter"&&(u.preventDefault(),Xe(),t(Qe)?document.getElementById(xe)?.focus():P())}function N(u){u.key==="Enter"&&(u.preventDefault(),R())}const ve=y(()=>$()?"sm":"xl"),re=y(()=>$()?"sm":"default");var z={get compact(){return $()},set compact(u=!1){$(u),v()},get onCancel(){return B()},set onCancel(u){B(u),v()},$set:dt,$on:(u,d)=>ct(a,u,d)},H=Ur();{const u=d=>{U(d,{variant:"ghost",size:"sm",type:"button",class:"text-muted-foreground hover:text-foreground",get disabled(){return f()},onclick:X,children:(p,C)=>{S();var F=A();n(ce=>i(F,ce),[()=>f()?e.lib_gitlabConnect_cancelling_label():e.lib_gitlabConnect_cancel_label()]),s(p,F)},$$slots:{default:!0}})};var ye=h(H);{var Ee=d=>{var p=Kr(),C=D(p,!0);n(F=>i(C,F),[()=>e.lib_gitlabConnect_updateRequired_description()]),s(d,p)};k(ye,d=>{m()||d(Ee)})}var g=o(ye,2);{var w=d=>{var p=Pr(),C=D(p,!0);n(()=>i(C,G())),s(d,p)};k(g,d=>{(I()||f())&&d(w)})}var J=o(g,2);{var T=d=>{var p=Cr(),C=h(p);{let Ue=y(()=>e.lib_gitlabConnect_openGitlab_label());qt(C,{get userCode(){return ae().userCode},get verificationUri(){return ae().verificationUri},get openLabel(){return t(Ue)},get compact(){return $()}})}var F=o(C,2),ce=h(F);mt(ce,{size:16,class:"shrink-0"});var se=o(ce,2),He=D(se,!0),Ie=o(se,2);{let Ue=y(()=>f()||!m());U(Ie,{variant:"link",size:"sm",type:"button",class:"px-0",get disabled(){return t(Ue)},onclick:oe,children:(nt,_t)=>{S();var L=A();n(q=>i(L,q),[()=>e.lib_gitlabConnect_useToken_label()]),s(nt,L)},$$slots:{default:!0}})}var We=o(Ie,2);u(We),x(F),x(p),n(Ue=>i(He,Ue),[()=>e.lib_gitlabConnect_waitingForAuthorization_label()]),s(d,p)},de=d=>{var p=Sr(),C=h(p);mt(C,{size:16,class:"shrink-0"});var F=o(C,2),ce=D(F,!0),se=o(F,2);u(se),x(p),n(He=>i(ce,He),[()=>e.lib_gitlabConnect_connecting_label()]),s(d,p)},Y=d=>{var p=Lr(),C=Je(p),F=h(C);xt(F,{get for(){return ie},children:(L,q)=>{S();var Z=A();n(pe=>i(Z,pe),[()=>e.lib_gitlabConnect_host_label()]),s(L,Z)},$$slots:{default:!0}});var ce=o(F,2);{let L=y(()=>!m()),q=y(()=>!t(K)||void 0),Z=y(()=>t(K)?ne:`${ne} ${te}`);rt(ce,{get id(){return ie},type:"text",autocomplete:"url",spellcheck:!1,get disabled(){return t(L)},get"aria-invalid"(){return t(q)},get"aria-describedby"(){return t(Z)},get placeholder(){return jt},oninput:r,onchange:Xe,onkeydown:ke,get value(){return t(Le)},set value(pe){Ke(Le,pe,!0)}})}var se=o(ce,2),He=D(se,!0),Ie=o(se,2);{var We=L=>{var q=Ar(),Z=D(q,!0);n(pe=>{ot(q,"id",te),i(Z,pe)},[()=>e.lib_gitlabConnect_invalidInstance_error()]),s(L,q)};k(Ie,L=>{t(K)||L(We)})}x(C);var Ue=o(C,2);{var nt=L=>{var q=Dr(),Z=Je(q),pe=h(Z);xt(pe,{get for(){return xe},children:(E,me)=>{S();var Ne=A();n(ee=>i(Ne,ee),[()=>e.lib_gitlabConnect_token_label()]),s(E,Ne)},$$slots:{default:!0}});var Ye=o(pe,2);{let E=y(()=>!m());rt(Ye,{get id(){return xe},type:"password",autocomplete:"off",get disabled(){return t(E)},placeholder:"glpat-...",onkeydown:N,get value(){return t(_e)},set value(me){Ke(_e,me,!0)}})}var Ze=o(Ye,2),be=h(Ze),ze=o(be);{var et=E=>{U(E,{variant:"link",size:"sm",type:"button",class:"h-auto px-0 text-xs",onclick:le,children:(me,Ne)=>{S();var ee=A();n(Te=>i(ee,Te),[()=>e.lib_gitlabConnect_createToken_label({host:t(K)})]),s(me,ee)},$$slots:{default:!0}})};k(ze,E=>{t(qe)&&t(K)&&E(et)})}x(Ze),x(Z);var ue=o(Z,2),Se=h(ue);{let E=y(()=>!t(it));U(Se,{variant:"primary",get size(){return t(ve)},type:"button",onclick:R,get disabled(){return t(E)},children:(me,Ne)=>{S();var ee=A();n(Te=>i(ee,Te),[()=>e.lib_gitlabConnect_connect_label()]),s(me,ee)},$$slots:{default:!0}})}var vt=o(Se,2);{var At=E=>{U(E,{variant:"ghost",get size(){return t(re)},type:"button",onclick:Q,children:(me,Ne)=>{S();var ee=A();n(Te=>i(ee,Te),[()=>e.lib_gitlabConnect_useDevice_label()]),s(me,ee)},$$slots:{default:!0}})};k(vt,E=>{t(Me)&&!(t(K)===G()&&W()===!1)&&E(At)})}var Dt=o(vt,2);{var wt=E=>{U(E,{variant:"ghost",get size(){return t(re)},type:"button",get onclick(){return B()},children:(me,Ne)=>{S();var ee=A();n(Te=>i(ee,Te),[()=>e.lib_gitlabConnect_cancel_label()]),s(me,ee)},$$slots:{default:!0}})};k(Dt,E=>{B()&&E(wt)})}x(ue),n(E=>i(be,`${E??""} `),[()=>e.lib_gitlabConnect_token_description()]),s(L,q)},_t=L=>{var q=wr(),Z=h(q);{let be=y(()=>!t(K)||!m());U(Z,{variant:"primary",get size(){return t(ve)},type:"button",onclick:P,get disabled(){return t(be)},children:(ze,et)=>{S();var ue=A();n(Se=>i(ue,Se),[()=>e.lib_gitlabConnect_connect_label()]),s(ze,ue)},$$slots:{default:!0}})}var pe=o(Z,2);{let be=y(()=>!m());U(pe,{variant:"ghost",get size(){return t(re)},type:"button",get disabled(){return t(be)},onclick:oe,children:(ze,et)=>{S();var ue=A();n(Se=>i(ue,Se),[()=>e.lib_gitlabConnect_useToken_label()]),s(ze,ue)},$$slots:{default:!0}})}var Ye=o(pe,2);{var Ze=be=>{U(be,{variant:"ghost",get size(){return t(re)},type:"button",get onclick(){return B()},children:(ze,et)=>{S();var ue=A();n(Se=>i(ue,Se),[()=>e.lib_gitlabConnect_cancel_label()]),s(ze,ue)},$$slots:{default:!0}})};k(Ye,be=>{B()&&be(Ze)})}x(q),s(L,q)};k(Ue,L=>{t(Qe)?L(nt):L(_t,-1)})}n(L=>{ot(se,"id",ne),i(He,L)},[()=>e.lib_gitlabConnect_host_description()]),s(d,p)};k(J,d=>{(I()||f())&&ae()?d(T):I()||f()?d(de,1):d(Y,-1)})}var Ce=o(J,2);{var Ge=d=>{var p=Er(),C=D(p,!0);n(F=>i(C,F),[()=>e.lib_gitlabConnect_cancelled_label()]),s(d,p)},fe=d=>{var p=Gr(),C=h(p),F=D(C,!0),ce=o(C,2);U(ce,{variant:"link",size:"sm",type:"button",class:"px-0",get disabled(){return f()},onclick:()=>Pe.dispatch(kt()),children:(se,He)=>{S();var Ie=A();n(We=>i(Ie,We),[()=>e.lib_gitlabConnect_checkStatus_label()]),s(se,Ie)},$$slots:{default:!0}}),x(p),n(se=>i(F,se),[()=>V()==="already-started"?e.lib_gitlabConnect_alreadyStarted_description():e.lib_gitlabConnect_cancelFailed_description()]),s(d,p)};k(Ce,d=>{V()==="cancelled"?d(Ge):(V()==="already-started"||V()==="failed")&&d(fe,1)})}var ge=o(Ce,2);{var Re=d=>{var p=Ir(),C=D(p,!0);n(()=>i(C,he())),s(d,p)};k(ge,d=>{he()&&d(Re)})}x(H)}n(()=>Ot(H,1,Bt($()?"space-y-2":"space-y-4"))),s(c,H);var $e=ut(z);return j(),$e}export{zr as G,or as M,$r as P,pr as a,ps as b,cr as k,cs as s};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Jv as l,s0 as u,J8 as v}from"./DmuzFYIt.js";import{at as b}from"./B3dKFpC0.js";import{bJ as m}from"./E8rxDAT1.js";import{be as S,ba as P}from"./
|
|
1
|
+
import{Jv as l,s0 as u,J8 as v}from"./DmuzFYIt.js";import{at as b}from"./B3dKFpC0.js";import{bJ as m}from"./E8rxDAT1.js";import{be as S,ba as P}from"./DI8QKtVI.js";import{K as M}from"./D7WlKDTE.js";import{bm as s}from"./3Mdoz-0Q.js";import{l as E}from"./ZYFxZ-3Z.js";const D=l.createSelector(t=>t.backgroundAgentSettings.defaultModel),O=l.createSelector(t=>t.backgroundAgentSettings.typeOverrides),j=l.createSelector(t=>t.backgroundAgentSettings.defaultReasoningEffort),H=l.createSelector(t=>t.backgroundAgentSettings.typeReasoningEffortOverrides),w=l.createSelector(t=>t.backgroundAgentSettings),A=l.createSelector(t=>{const a=new Map,o=(e,i)=>{const n=a.get(e)??new Set;n.add(i),a.set(e,n)},f=m.select(t),d=M.select(t),g=b.select(t)[d];g&&d&&o(d,s.settings_providers_inUseDefaultModel_label({model:g})),u(d)&&!g&&o(d,s.settings_providers_inUseDefaultProvider_label());const p=t.backgroundAgentSettings?.providerId;p&&u(p)&&o(p,s.settings_providers_inUseQuickActions_label());for(const e of S.select(t)){const i=P.select(t,e.id),n=e.source?{project:s.settings_providers_pinSourceProject_label(),user:s.settings_providers_pinSourceUser_label(),bundled:s.settings_providers_pinSourceBundled_label(),builtin:s.settings_providers_pinSourceBuiltin_label(),"electron-store":s.settings_providers_pinSourceLegacy_label()}[e.source]:void 0,c=r=>n&&i?s.settings_providers_inUseSourcePath_label({reason:r,source:n,path:i}):n?s.settings_providers_inUseSource_label({reason:r,source:n}):i?s.settings_providers_inUsePath_label({reason:r,path:i}):r;if(e.codingAgent&&o(e.codingAgent,c(s.settings_providers_inUseSpecialistAgent_label({name:e.name}))),e.modelOptions?.forEach((r,_)=>{r.provider&&u(r.provider)&&o(r.provider,c(s.settings_providers_inUseSpecialistModelOption_label({name:e.name,position:E(_+1)})))}),e.defaultModel)if(e.defaultModel.includes(":")){const r=v(e.defaultModel).providerId??f;o(r,c(s.settings_providers_inUseSpecialistModel_label({name:e.name,model:e.defaultModel})))}else e.codingAgent||o(f,c(s.settings_providers_inUseSpecialistModel_label({name:e.name,model:e.defaultModel})))}return Object.fromEntries([...a].map(([e,i])=>[e,[...i].join(`
|
|
2
2
|
`)]))});l.createSelector((t,a)=>A.select(t)[a]??null);const h=[{id:"dracula",label:"Dracula"},{id:"nord",label:"Nord"},{id:"rose-pine",label:"Rosé Pine"},{id:"tokyo-night",label:"Tokyo Night"},{id:"solarized",label:"Solarized"},{id:"github",label:"GitHub"},{id:"high-contrast",label:"High Contrast"}],J=h.map(({id:t})=>t);export{J as T,h as a,j as b,w as c,O as d,H as e,A as f,D as s};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as ie}from"./
|
|
1
|
+
import{g as ie}from"./CU1be4rw.js";import{s as re}from"./CTcVaot6.js";import{b as p,ay as b,X as $,a1 as ae,aP as ne,bh as oe,V as le,a_ as ce,U as he,aZ as de,b0 as ue,Y as fe,T as pe,z as j,r as Se,aW as vt,am as ge,aU as ye,ab as me,aG as Te}from"./CJiiUUa9.js";import{c as Ee}from"./gWgQT-YB.js";import{aR as _e}from"./inhLOPTf.js";var At=(function(){var t=p(function(V,o,f,n){for(f=f||{},n=V.length;n--;f[V[n]]=o);return f},"o"),e=[1,2],s=[1,3],a=[1,4],r=[2,4],c=[1,9],h=[1,11],u=[1,16],l=[1,17],m=[1,18],y=[1,19],_=[1,33],L=[1,20],N=[1,21],D=[1,22],S=[1,23],w=[1,24],C=[1,26],F=[1,27],I=[1,28],P=[1,29],v=[1,30],z=[1,31],at=[1,32],nt=[1,35],ot=[1,36],lt=[1,37],ct=[1,38],K=[1,34],g=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],ht=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],It=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],mt={trace:p(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:p(function(o,f,n,T,E,i,B){var d=i.length-1;switch(E){case 3:return T.setRootDoc(i[d]),i[d];case 4:this.$=[];break;case 5:i[d]!="nl"&&(i[d-1].push(i[d]),this.$=i[d-1]);break;case 6:case 7:this.$=i[d];break;case 8:this.$="nl";break;case 12:this.$=i[d];break;case 13:const Q=i[d-1];Q.description=T.trimColon(i[d]),this.$=Q;break;case 14:this.$={stmt:"relation",state1:i[d-2],state2:i[d]};break;case 15:const Tt=T.trimColon(i[d]);this.$={stmt:"relation",state1:i[d-3],state2:i[d-1],description:Tt};break;case 19:this.$={stmt:"state",id:i[d-3],type:"default",description:"",doc:i[d-1]};break;case 20:var G=i[d],X=i[d-2].trim();if(i[d].match(":")){var ut=i[d].split(":");G=ut[0],X=[X,ut[1]]}this.$={stmt:"state",id:G,type:"default",description:X};break;case 21:this.$={stmt:"state",id:i[d-3],type:"default",description:i[d-5],doc:i[d-1]};break;case 22:this.$={stmt:"state",id:i[d],type:"fork"};break;case 23:this.$={stmt:"state",id:i[d],type:"join"};break;case 24:this.$={stmt:"state",id:i[d],type:"choice"};break;case 25:this.$={stmt:"state",id:T.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:i[d-1].trim(),note:{position:i[d-2].trim(),text:i[d].trim()}};break;case 29:this.$=i[d].trim(),T.setAccTitle(this.$);break;case 30:case 31:this.$=i[d].trim(),T.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:i[d-3],url:i[d-2],tooltip:i[d-1]};break;case 33:this.$={stmt:"click",id:i[d-3],url:i[d-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:i[d-1].trim(),classes:i[d].trim()};break;case 36:this.$={stmt:"style",id:i[d-1].trim(),styleClass:i[d].trim()};break;case 37:this.$={stmt:"applyClass",id:i[d-1].trim(),styleClass:i[d].trim()};break;case 38:T.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:T.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:T.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:T.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:i[d].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:i[d-2].trim(),classes:[i[d].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:i[d-2].trim(),classes:[i[d].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:e,5:s,6:a},{1:[3]},{3:5,4:e,5:s,6:a},{3:6,4:e,5:s,6:a},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],r,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:c,5:h,8:8,9:10,10:12,11:13,12:14,13:15,16:u,17:l,19:m,22:y,24:_,25:L,26:N,27:D,28:S,29:w,32:25,33:C,35:F,37:I,38:P,41:v,45:z,48:at,51:nt,52:ot,53:lt,54:ct,57:K},t(g,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:u,17:l,19:m,22:y,24:_,25:L,26:N,27:D,28:S,29:w,32:25,33:C,35:F,37:I,38:P,41:v,45:z,48:at,51:nt,52:ot,53:lt,54:ct,57:K},t(g,[2,7]),t(g,[2,8]),t(g,[2,9]),t(g,[2,10]),t(g,[2,11]),t(g,[2,12],{14:[1,40],15:[1,41]}),t(g,[2,16]),{18:[1,42]},t(g,[2,18],{20:[1,43]}),{23:[1,44]},t(g,[2,22]),t(g,[2,23]),t(g,[2,24]),t(g,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(g,[2,28]),{34:[1,49]},{36:[1,50]},t(g,[2,31]),{13:51,24:_,57:K},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(ht,[2,44],{58:[1,56]}),t(ht,[2,45],{58:[1,57]}),t(g,[2,38]),t(g,[2,39]),t(g,[2,40]),t(g,[2,41]),t(g,[2,6]),t(g,[2,13]),{13:58,24:_,57:K},t(g,[2,17]),t(It,r,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(g,[2,29]),t(g,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},t(g,[2,14],{14:[1,71]}),{4:c,5:h,8:8,9:10,10:12,11:13,12:14,13:15,16:u,17:l,19:m,21:[1,72],22:y,24:_,25:L,26:N,27:D,28:S,29:w,32:25,33:C,35:F,37:I,38:P,41:v,45:z,48:at,51:nt,52:ot,53:lt,54:ct,57:K},t(g,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(g,[2,34]),t(g,[2,35]),t(g,[2,36]),t(g,[2,37]),t(ht,[2,46]),t(ht,[2,47]),t(g,[2,15]),t(g,[2,19]),t(It,r,{7:78}),t(g,[2,26]),t(g,[2,27]),{5:[1,79]},{5:[1,80]},{4:c,5:h,8:8,9:10,10:12,11:13,12:14,13:15,16:u,17:l,19:m,21:[1,81],22:y,24:_,25:L,26:N,27:D,28:S,29:w,32:25,33:C,35:F,37:I,38:P,41:v,45:z,48:at,51:nt,52:ot,53:lt,54:ct,57:K},t(g,[2,32]),t(g,[2,33]),t(g,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:p(function(o,f){if(f.recoverable)this.trace(o);else{var n=new Error(o);throw n.hash=f,n}},"parseError"),parse:p(function(o){var f=this,n=[0],T=[],E=[null],i=[],B=this.table,d="",G=0,X=0,ut=2,Q=1,Tt=i.slice.call(arguments,1),k=Object.create(this.lexer),W={yy:{}};for(var Et in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Et)&&(W.yy[Et]=this.yy[Et]);k.setInput(o,W.yy),W.yy.lexer=k,W.yy.parser=this,typeof k.yylloc>"u"&&(k.yylloc={});var _t=k.yylloc;i.push(_t);var ee=k.options&&k.options.ranges;typeof W.yy.parseError=="function"?this.parseError=W.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function se(R){n.length=n.length-2*R,E.length=E.length-R,i.length=i.length-R}p(se,"popStack");function Rt(){var R;return R=T.pop()||k.lex()||Q,typeof R!="number"&&(R instanceof Array&&(T=R,R=T.pop()),R=f.symbols_[R]||R),R}p(Rt,"lex");for(var x,U,O,bt,J={},ft,Y,Nt,pt;;){if(U=n[n.length-1],this.defaultActions[U]?O=this.defaultActions[U]:((x===null||typeof x>"u")&&(x=Rt()),O=B[U]&&B[U][x]),typeof O>"u"||!O.length||!O[0]){var kt="";pt=[];for(ft in B[U])this.terminals_[ft]&&ft>ut&&pt.push("'"+this.terminals_[ft]+"'");k.showPosition?kt="Parse error on line "+(G+1)+`:
|
|
2
2
|
`+k.showPosition()+`
|
|
3
3
|
Expecting `+pt.join(", ")+", got '"+(this.terminals_[x]||x)+"'":kt="Parse error on line "+(G+1)+": Unexpected "+(x==Q?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(kt,{text:k.match,token:this.terminals_[x]||x,line:k.yylineno,loc:_t,expected:pt})}if(O[0]instanceof Array&&O.length>1)throw new Error("Parse Error: multiple actions possible at state: "+U+", token: "+x);switch(O[0]){case 1:n.push(x),E.push(k.yytext),i.push(k.yylloc),n.push(O[1]),x=null,X=k.yyleng,d=k.yytext,G=k.yylineno,_t=k.yylloc;break;case 2:if(Y=this.productions_[O[1]][1],J.$=E[E.length-Y],J._$={first_line:i[i.length-(Y||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(Y||1)].first_column,last_column:i[i.length-1].last_column},ee&&(J._$.range=[i[i.length-(Y||1)].range[0],i[i.length-1].range[1]]),bt=this.performAction.apply(J,[d,X,G,W.yy,O[1],E,i].concat(Tt)),typeof bt<"u")return bt;Y&&(n=n.slice(0,-1*Y*2),E=E.slice(0,-1*Y),i=i.slice(0,-1*Y)),n.push(this.productions_[O[1]][0]),E.push(J.$),i.push(J._$),Nt=B[n[n.length-2]][n[n.length-1]],n.push(Nt);break;case 3:return!0}}return!0},"parse")},te=(function(){var V={EOF:1,parseError:p(function(f,n){if(this.yy.parser)this.yy.parser.parseError(f,n);else throw new Error(f)},"parseError"),setInput:p(function(o,f){return this.yy=f||this.yy||{},this._input=o,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:p(function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var f=o.match(/(?:\r\n?|\n).*/g);return f?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},"input"),unput:p(function(o){var f=o.length,n=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-f),this.offset-=f;var T=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var E=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===T.length?this.yylloc.first_column:0)+T[T.length-n.length].length-n[0].length:this.yylloc.first_column-f},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-f]),this.yyleng=this.yytext.length,this},"unput"),more:p(function(){return this._more=!0,this},"more"),reject:p(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:p(function(o){this.unput(this.match.slice(o))},"less"),pastInput:p(function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:p(function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:p(function(){var o=this.pastInput(),f=new Array(o.length+1).join("-");return o+this.upcomingInput()+`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var Vt=Object.defineProperty;var yt=e=>{throw TypeError(e)};var jt=(e,i,s)=>i in e?Vt(e,i,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[i]=s;var J=(e,i,s)=>jt(e,typeof i!="symbol"?i+"":i,s),bt=(e,i,s)=>i.has(e)||yt("Cannot "+s);var t=(e,i,s)=>(bt(e,i,"read from private field"),s?s.call(e):i.get(e)),g=(e,i,s)=>i.has(e)?yt("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(e):i.set(e,s),a=(e,i,s,n)=>(bt(e,i,"write to private field"),n?n.call(e,s):i.set(e,s),s),o=(e,i,s)=>(bt(e,i,"access private method"),s);var vt=(e,i,s,n)=>({set _(r){a(e,i,r,s)},get _(){return t(e,i,n)}});import{_ as wt}from"./3Mdoz-0Q.js";import{m as xt,A as qt,r as Ht,Q as Nt,aX as Gt,R as Jt}from"./BxVISJNP.js";import{B as Ft,D as Kt}from"./BsnymPhN.js";import{I as F,E as Ct,b as Qt,a as Ut}from"./DICr2Lvd.js";function Xt(e,i){for(const s of Array.isArray(e)?e:[e]){let n=xt.get(s.name);n==null&&(n=s,xt.set(s.name,n)),i.attachLanguages([n]),qt.add(n.name)}}function Zt(e,i){let s;return function(...n){clearTimeout(s),s=setTimeout(()=>e.apply(this,n),i)}}const Dt=0;let Wt=0;var H,T,P,Q,L,st,it,C,U,nt,u,D,_,A,O,b,v,z,dt,E,B,X,N,R,Z,Tt,ft,h,K,ut,zt,Et,Y,pt,It,ct,tt,Ot,gt,et,Bt,Pt,At,Yt=(At=class{constructor(e,i,s){g(this,h);J(this,"backend");g(this,H);g(this,T);g(this,P);g(this,Q);g(this,L);g(this,st);g(this,it);g(this,C);g(this,U);g(this,nt,!1);g(this,u,[F]);g(this,D,[]);g(this,_,0);g(this,A,[]);g(this,O,-1);g(this,b,!0);g(this,v,!1);g(this,z,0);g(this,dt,++Wt);g(this,E,-1);g(this,B,-1);g(this,X);g(this,N,0);g(this,R,[]);g(this,Z,!1);g(this,Tt,Zt(async e=>{if(t(this,nt))return;const{startingLine:i=0,totalLines:s=1/0}=e??{},n=Math.min(s===1/0?1/0:i+s,t(this,L).lineCount);if(t(this,T)==null&&!Lt(t(this,L).languageId)){if(await this.backend?.loadLanguages([t(this,L).languageId]),t(this,nt))return;a(this,T,t(this,H).getLanguage(t(this,L).languageId))}o(this,h,K).call(this),o(this,h,It).call(this,n)},500));g(this,ft,({data:e})=>{if(typeof e!="object"||e===null)return;const{type:i,tokenizerId:s,jobId:n}=e;i==="tokenize"&&s===t(this,dt)&&typeof n=="number"&&n===t(this,z)&&(t(this,E)>=0?o(this,h,Bt).call(this,n):o(this,h,Pt).call(this,n))});this.backend=s,a(this,H,e),a(this,L,i.textDocument),a(this,P,i.theme),a(this,Q,[]),a(this,st,i.tokenizeMaxLineLength??1e3),a(this,it,i.onDeferTokenize),a(this,C,i.matchBrackets!==!1),a(this,U,i.__debug??!1),o(this,h,ut).call(this),o(this,h,K).call(this)}getStringCommentRegexpRangesInLine(e){if(!t(this,C)||e<0||e>=t(this,L).lineCount||(o(this,h,ut).call(this),t(this,T)==null))return null;if(t(this,R)[e]===void 0){o(this,h,et).call(this,e);const i=t(this,u)[e]??F,s=o(this,h,ct).call(this,e,i);t(this,u)[e+1]=s.state}return t(this,R)[e]??null}setTheme(e){t(this,P)!==e&&(a(this,P,e),o(this,h,K).call(this),this.stopBackgroundTokenize(),a(this,u,[F]),a(this,D,[]),a(this,_,0),a(this,A,[]),t(this,T)!=null&&t(this,L).lineCount>0&&o(this,h,pt).call(this,0))}dispose(){a(this,nt,!0),this.stopBackgroundTokenize(),o(this,h,Et).call(this)}tokenize(e,i,s=!1){if(o(this,h,ut).call(this),o(this,h,K).call(this),t(this,T)==null&&!Lt(t(this,L).languageId))throw new Error(`Grammar for language "${t(this,L).languageId}" not loaded`);const{lineCount:n}=t(this,L),{startingLine:r=0,totalLines:l=1/0}=i??{},d=l===1/0?n:Math.min(r+l,n),c=e.startLine,f=Math.max(r,c),I=i!=null&&l!==1/0&&e.lineDelta>0&&c<d&&e.endLine>=d,m=e.lineDelta===0&&(e.changedLineChanges?.every(([,,p])=>p===0)??!0);t(this,C)&&!m&&(t(this,R).length=Math.min(t(this,R).length,e.startLine));const M=s&&e.lineDelta!==0&&c>=r,S=m||i==null||c>=f,y=e.changedLineRanges??[[c,e.endLine]];a(this,D,[]),a(this,_,0),a(this,A,[]);let V=-1;if(c<f)for(const[p,w]of y)p<f&&(V=Math.max(V,Math.min(w,f-1)));const mt=V>=c&&(m||e.lineDelta<0);m?o(this,h,et).call(this,c):(o(this,h,Ot).call(this,e),(i==null||c>=f)&&o(this,h,et).call(this,f));let j=0,St=y[j][1],ht,Rt=0,k=m?y[j][0]:f,rt=!1;const Mt=new Map,W=mt?new Map:void 0;if(W!=null&&!m){const p=Math.min(V+1,f,d);if(p>c){o(this,h,et).call(this,p);let w=c,ot=t(this,u)[w]??F;for(;w<p;w++){const x=o(this,h,ct).call(this,w,ot);ot=x.state,W.set(w,x.resolvedTokens)}t(this,u)[p]=ot}}let q=t(this,u)[k]??F;for(;k<d;){const p=m?t(this,u)[k+1]:M?o(this,h,gt).call(this,k+1):void 0;S&&(t(this,u)[k]=q);const{resolvedTokens:w,state:ot}=o(this,h,ct).call(this,k,q);if(q=ot,k>=f?Mt.set(k,w):W?.set(k,w),S&&(t(this,u)[k+1]=q),rt=k>=St&&(m||M)&&p!=null&&q.equals(p),rt){j++;const x=y[j];if(x==null)break;if(x[0]>=d){ht=x[0],Rt=j;break}let lt=t(this,u)[x[0]];if(M)for(let kt=k+2;kt<=x[0]&&(lt=o(this,h,gt).call(this,kt),lt!=null);kt++)t(this,u)[kt]=lt;lt==null?(St=x[1],k++):(k=x[0],q=lt,St=x[1]),rt=!1;continue}k++}if(S&&(k<d?t(this,u)[k+1]=q:t(this,u)[k]=q),rt&&M&&ht==null){for(let p=k+2;p<=n;p++){const w=o(this,h,gt).call(this,p);if(w==null)break;t(this,u)[p]=w}a(this,D,[]),a(this,_,0),a(this,A,[])}if(W!=null&&W.size>0&&t(this,it).call(this,W),ht!=null)t(this,C)&&m&&(t(this,R).length=Math.min(t(this,R).length,ht)),o(this,h,pt).call(this,ht,y,Rt);else if(!rt&&k<n){const p=I&&c>=f?d:c<f&&!m?c:k;t(this,C)&&m&&(t(this,R).length=Math.min(t(this,R).length,p)),o(this,h,pt).call(this,p,y,j)}return Mt}prebuildStateStack(e){o(this,h,ut).call(this),t(this,Tt).call(this,e)}stopBackgroundTokenize(){a(this,B,-1),!t(this,b)&&(a(this,b,!0),a(this,v,!1),a(this,O,-1),a(this,E,-1),a(this,X,void 0),a(this,N,0),a(this,D,[]),a(this,_,0),a(this,A,[]),o(this,h,Et).call(this))}pauseBackgroundTokenize(){t(this,b)||t(this,v)||(t(this,U)&&console.log("[diffs/editor] background tokenization paused",{jobId:t(this,z)}),a(this,v,!0))}resumeBackgroundTokenize(){t(this,b)||!t(this,v)||t(this,T)==null||t(this,O)<0||(t(this,U)&&console.log("[diffs/editor] background tokenization resumed",{jobId:t(this,z)}),a(this,v,!1),o(this,h,Y).call(this,t(this,z)))}},H=new WeakMap,T=new WeakMap,P=new WeakMap,Q=new WeakMap,L=new WeakMap,st=new WeakMap,it=new WeakMap,C=new WeakMap,U=new WeakMap,nt=new WeakMap,u=new WeakMap,D=new WeakMap,_=new WeakMap,A=new WeakMap,O=new WeakMap,b=new WeakMap,v=new WeakMap,z=new WeakMap,dt=new WeakMap,E=new WeakMap,B=new WeakMap,X=new WeakMap,N=new WeakMap,R=new WeakMap,Z=new WeakMap,Tt=new WeakMap,ft=new WeakMap,h=new WeakSet,K=function(){if(t(this,P)==="")return;this.backend?.getTheme(t(this,P));const{colorMap:e}=t(this,H).setTheme(t(this,P));a(this,Q,e)},ut=function(){t(this,T)==null&&!Lt(t(this,L).languageId)&&t(this,H).getLoadedLanguages().includes(t(this,L).languageId)&&a(this,T,t(this,H).getLanguage(t(this,L).languageId))},zt=function(){t(this,Z)||(globalThis.addEventListener("message",t(this,ft)),a(this,Z,!0))},Et=function(){t(this,Z)&&(globalThis.removeEventListener("message",t(this,ft)),a(this,Z,!1))},Y=function(e){globalThis.postMessage({type:"tokenize",tokenizerId:t(this,dt),jobId:e})},pt=function(e,i,s=0){if(Lt(t(this,L).languageId))return;const n=++vt(this,z)._;t(this,U)&&console.log("[diffs/editor] background tokenization scheduled",{jobId:n,startLine:e,changedLineRanges:i,changedRangeIndex:s}),a(this,b,!1),a(this,v,!1),a(this,O,e),t(this,E)>=0&&a(this,B,Math.max(t(this,B),t(this,E))),a(this,E,-1),a(this,X,i),a(this,N,s),o(this,h,zt).call(this),o(this,h,Y).call(this,n)},It=function(e){if(t(this,T)==null||t(this,u).length>e)return;if(!t(this,b)){t(this,E)>=0?a(this,E,Math.max(t(this,E),e)):a(this,B,Math.max(t(this,B),e));return}const i=++vt(this,z)._;a(this,b,!1),a(this,v,!1),a(this,O,t(this,u).length-1),a(this,E,e),a(this,B,-1),a(this,X,void 0),a(this,N,0),o(this,h,zt).call(this),o(this,h,Y).call(this,i)},ct=function(e,i){const s=t(this,L).getLineText(e);if(s.length>=t(this,st))return console.warn(`[diffs] Line(${e}) too long to tokenize: ${s.length}`),o(this,h,tt).call(this,e,null),{resolvedTokens:[[0,"",s]],state:i};if(t(this,T)==null||s===""||s.trim()==="")return o(this,h,tt).call(this,e,null),{resolvedTokens:[[0,"",s]],state:i};const n=_t(t(this,T),t(this,Q),s,i,Dt,t(this,C));return o(this,h,tt).call(this,e,n.bracketIgnoredRanges),{resolvedTokens:n.resolvedTokens,state:n.ruleStack}},tt=function(e,i){t(this,C)&&(t(this,R)[e]=i)},Ot=function(e){const i=e.changedLineChanges??[[e.startLine,e.endLine,e.lineDelta]],s=e.startLine+1;s<=t(this,u).length-s?(a(this,D,t(this,u)),a(this,_,0),a(this,u,t(this,u).slice(0,s))):(a(this,_,s),a(this,D,t(this,u).slice(s)),t(this,u).length=Math.min(t(this,u).length,s)),a(this,A,i)},gt=function(e){let i=e;for(let s=t(this,A).length-1;s>=0;s--){const[n,r,l]=t(this,A)[s];if(l!==0){if(i>r)i-=l;else if(i>n)return t(this,u)[e]}}return t(this,D)[i-t(this,_)]??t(this,u)[e]},et=function(e,i){const s=Math.min(Math.max(0,e),t(this,L).lineCount);if(t(this,u).length>s||t(this,T)==null)return!0;const n=i==null?0:performance.now();let r=t(this,u).length-1,l=t(this,u)[r]??F;for(;r<s;){t(this,u)[r]=l;const d=t(this,L).getLineText(r);if(d.length<t(this,st)&&d!==""&&d.trim()!==""){const c=_t(t(this,T),t(this,Q),d,l,Dt,t(this,C),!1);o(this,h,tt).call(this,r,c.bracketIgnoredRanges),l=c.ruleStack}else o(this,h,tt).call(this,r,null);if(r++,t(this,u)[r]=l,i!=null&&performance.now()-n>i)break}return r>=s},Bt=function(e){if(t(this,b)||t(this,v)||t(this,T)==null||e!==t(this,z))return;o(this,h,K).call(this);const i=o(this,h,et).call(this,t(this,E),1);if(!(t(this,b)||t(this,v)||e!==t(this,z))){if(i){this.stopBackgroundTokenize();return}a(this,O,t(this,u).length-1),o(this,h,Y).call(this,e)}},Pt=function(e){if(t(this,b)||t(this,v)||t(this,T)==null||e!==t(this,z))return;o(this,h,K).call(this);const i=performance.now(),s=new Map,n=t(this,L).lineCount,r=t(this,X);let l=t(this,O),d=t(this,u)[l]??F,c=!1,f=t(this,N),I=r?.[f]?.[1];for(;l<n;){t(this,u)[l]=d;const m=I!=null?o(this,h,gt).call(this,l+1):void 0,M=o(this,h,ct).call(this,l,d);if(s.set(l,M.resolvedTokens),d=M.state,t(this,u)[l+1]=d,c=I!=null&&l>=I&&m!=null&&d.equals(m),l++,c){f++;const S=r?.[f];if(S==null)break;if(I=S[1],t(this,u)[S[0]]==null)c=!1;else{l=S[0],d=t(this,u)[l]??d,c=!1;continue}}if(performance.now()-i>1)break}if(t(this,it).call(this,s),!(t(this,b)||t(this,v)||e!==t(this,z))){if(c||l>=n){const m=t(this,B);this.stopBackgroundTokenize(),m>=0&&o(this,h,It).call(this,m);return}a(this,O,l),a(this,N,f),o(this,h,Y).call(this,e)}},At);function _t(e,i,s,n,r,l=!0,d=!0){const c=e.tokenizeLine2(s,n,r);c.stoppedEarly&&console.warn(`[diffs] Time limit reached when tokenizing line: ${s.substring(0,100)}`);const f=c.tokens,I=f.length/2,m=[],M=[];if(!d&&!l)return{ruleStack:c.ruleStack,resolvedTokens:m,bracketIgnoredRanges:M};for(let S=0;S<I;S++){const y=f[2*S],V=S+1<I?f[2*S+2]:s.length;if(y===V)continue;const mt=f[2*S+1];if(d){const j=Ct.getForeground(mt);m.push([y,i[j],s.slice(y,V)])}l&&Ct.getTokenType(mt)>0&&M.push([y,V])}return{ruleStack:c.ruleStack,resolvedTokens:m,bracketIgnoredRanges:M}}function Lt(e){return e==="text"||e==="ansi"}var $,G,at,te=(at=class extends Ft{constructor(s,n){super();J(this,"highlighter");J(this,"options");g(this,$,"");g(this,G);this.highlighter=s,this.options=n}tokenizeChunk(s,n){const r=(t(this,$)+s).split(/(\r\n|\r|\n)/);let l=[];for(let d=0;d<r.length;d+=2){const c=r[d],f=this.highlighter.codeToTokens(c,{...this.options,grammarState:t(this,G)}),I=f.tokens[0].map(m=>({...m,offset:m.offset+this.stableOffset}));d+1<r.length?(Ht(n,I),this.pushLineBreak(n,c.length,r[d+1]),a(this,G,f.grammarState)):(l=I,a(this,$,c))}return{unstable:l,tailLength:t(this,$).length}}clone(){this.assertActive();const s=new at(this.highlighter,this.options);return this.copyStateTo(s),a(s,$,t(this,$)),a(s,G,t(this,G)),s}resetSource(){a(this,$,""),a(this,G,void 0)}releaseSource(){this.resetSource()}},$=new WeakMap,G=new WeakMap,at),he=class $t extends Kt{constructor(s,n){super(s,Nt(s));J(this,"raw");J(this,"loadedThemes",new Map);J(this,"attachedLanguages",new Set(["text","ansi"]));this.raw=n}static async create(s){const n=s==="shiki-wasm"?(await wt(async()=>{const{createOnigurumaEngine:l}=await import("./fp9mRO0R.js");return{createOnigurumaEngine:l}},[],import.meta.url)).createOnigurumaEngine(wt(()=>import("./Cey7Y6ql.js"),[],import.meta.url)):(await wt(async()=>{const{createJavaScriptRegexEngine:l}=await import("./LU5PuYrD.js");return{createJavaScriptRegexEngine:l}},[],import.meta.url)).createJavaScriptRegexEngine(),r=await Qt({themes:[],langs:[],engine:n});return new $t(s,r)}getTheme(s){this.assertNotDisposed();const n=this.loadedThemes.get(s),r=this.themeResolver.getResolvedTheme(s)??n;if(r==null)throw new Error(`Theme "${s}" has not been resolved`);if(n!==r){const l=r.textmate??(r.cssVariables!=null?Ut(r.cssVariables):void 0);if(l==null)throw new Error(`Theme "${s}" does not support Shiki`);this.raw.setTheme({...l,name:s}),this.loadedThemes.set(s,r)}return r}codeToTokens(s,n){return this.raw.codeToTokens(s,this.resolveOptions(n))}createEditorTokenizer(s){return new Yt(this.raw,s,this)}createStreamTokenizer(s){return new te(this.raw,this.resolveOptions(s))}async loadLanguages(s){this.assertNotDisposed();const n=s.filter(r=>!this.attachedLanguages.has(r));Xt(await Gt(n),this)}hasLoadedLanguages(s){if(this.disposed)return!1;let n;return s.every(r=>this.attachedLanguages.has(r)?!0:Jt.has(r)?!1:(n??=this.raw.getLoadedLanguages(),n.includes(r)))}attachLanguages(s){this.assertNotDisposed();for(const n of s){if(this.attachedLanguages.has(n.name))continue;const r=n.data.find(l=>l.name===n.name||l.aliases?.includes(n.name)===!0);if(r==null)throw new Error(`attachResolvedLanguages: No returned grammar declares "${n.name}" as its name or an alias.`);this.raw.loadLanguageSync(n.data);try{this.raw.getLanguage(n.name)}catch{throw new Error(`attachResolvedLanguages: "${r.name}" is already loaded without alias "${n.name}". Load the alias first or give the grammar a unique name.`)}this.attachedLanguages.add(n.name)}}releaseResources(){this.loadedThemes.clear(),this.attachedLanguages.clear(),this.raw.dispose()}resolveOptions({theme:s,themes:n,...r}){if(this.assertNotDisposed(),s!=null)return this.getTheme(s),{...r,theme:s};if(n==null)throw new Error("A theme or themes option is required");for(const l of Object.values(n))this.getTheme(l);return{...r,themes:n}}};export{he as ShikiHighlighter};
|
|
1
|
+
var Vt=Object.defineProperty;var yt=e=>{throw TypeError(e)};var jt=(e,i,s)=>i in e?Vt(e,i,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[i]=s;var J=(e,i,s)=>jt(e,typeof i!="symbol"?i+"":i,s),bt=(e,i,s)=>i.has(e)||yt("Cannot "+s);var t=(e,i,s)=>(bt(e,i,"read from private field"),s?s.call(e):i.get(e)),g=(e,i,s)=>i.has(e)?yt("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(e):i.set(e,s),a=(e,i,s,n)=>(bt(e,i,"write to private field"),n?n.call(e,s):i.set(e,s),s),o=(e,i,s)=>(bt(e,i,"access private method"),s);var vt=(e,i,s,n)=>({set _(r){a(e,i,r,s)},get _(){return t(e,i,n)}});import{_ as wt}from"./3Mdoz-0Q.js";import{m as xt,A as qt,r as Ht,Q as Nt,aX as Gt,R as Jt}from"./CB6Z_HaZ.js";import{B as Ft,D as Kt}from"./BQPwOHEP.js";import{I as F,E as Ct,b as Qt,a as Ut}from"./DICr2Lvd.js";function Xt(e,i){for(const s of Array.isArray(e)?e:[e]){let n=xt.get(s.name);n==null&&(n=s,xt.set(s.name,n)),i.attachLanguages([n]),qt.add(n.name)}}function Zt(e,i){let s;return function(...n){clearTimeout(s),s=setTimeout(()=>e.apply(this,n),i)}}const Dt=0;let Wt=0;var H,T,P,Q,L,st,it,C,U,nt,u,D,_,A,O,b,v,z,dt,E,B,X,N,R,Z,Tt,ft,h,K,ut,zt,Et,Y,pt,It,ct,tt,Ot,gt,et,Bt,Pt,At,Yt=(At=class{constructor(e,i,s){g(this,h);J(this,"backend");g(this,H);g(this,T);g(this,P);g(this,Q);g(this,L);g(this,st);g(this,it);g(this,C);g(this,U);g(this,nt,!1);g(this,u,[F]);g(this,D,[]);g(this,_,0);g(this,A,[]);g(this,O,-1);g(this,b,!0);g(this,v,!1);g(this,z,0);g(this,dt,++Wt);g(this,E,-1);g(this,B,-1);g(this,X);g(this,N,0);g(this,R,[]);g(this,Z,!1);g(this,Tt,Zt(async e=>{if(t(this,nt))return;const{startingLine:i=0,totalLines:s=1/0}=e??{},n=Math.min(s===1/0?1/0:i+s,t(this,L).lineCount);if(t(this,T)==null&&!Lt(t(this,L).languageId)){if(await this.backend?.loadLanguages([t(this,L).languageId]),t(this,nt))return;a(this,T,t(this,H).getLanguage(t(this,L).languageId))}o(this,h,K).call(this),o(this,h,It).call(this,n)},500));g(this,ft,({data:e})=>{if(typeof e!="object"||e===null)return;const{type:i,tokenizerId:s,jobId:n}=e;i==="tokenize"&&s===t(this,dt)&&typeof n=="number"&&n===t(this,z)&&(t(this,E)>=0?o(this,h,Bt).call(this,n):o(this,h,Pt).call(this,n))});this.backend=s,a(this,H,e),a(this,L,i.textDocument),a(this,P,i.theme),a(this,Q,[]),a(this,st,i.tokenizeMaxLineLength??1e3),a(this,it,i.onDeferTokenize),a(this,C,i.matchBrackets!==!1),a(this,U,i.__debug??!1),o(this,h,ut).call(this),o(this,h,K).call(this)}getStringCommentRegexpRangesInLine(e){if(!t(this,C)||e<0||e>=t(this,L).lineCount||(o(this,h,ut).call(this),t(this,T)==null))return null;if(t(this,R)[e]===void 0){o(this,h,et).call(this,e);const i=t(this,u)[e]??F,s=o(this,h,ct).call(this,e,i);t(this,u)[e+1]=s.state}return t(this,R)[e]??null}setTheme(e){t(this,P)!==e&&(a(this,P,e),o(this,h,K).call(this),this.stopBackgroundTokenize(),a(this,u,[F]),a(this,D,[]),a(this,_,0),a(this,A,[]),t(this,T)!=null&&t(this,L).lineCount>0&&o(this,h,pt).call(this,0))}dispose(){a(this,nt,!0),this.stopBackgroundTokenize(),o(this,h,Et).call(this)}tokenize(e,i,s=!1){if(o(this,h,ut).call(this),o(this,h,K).call(this),t(this,T)==null&&!Lt(t(this,L).languageId))throw new Error(`Grammar for language "${t(this,L).languageId}" not loaded`);const{lineCount:n}=t(this,L),{startingLine:r=0,totalLines:l=1/0}=i??{},d=l===1/0?n:Math.min(r+l,n),c=e.startLine,f=Math.max(r,c),I=i!=null&&l!==1/0&&e.lineDelta>0&&c<d&&e.endLine>=d,m=e.lineDelta===0&&(e.changedLineChanges?.every(([,,p])=>p===0)??!0);t(this,C)&&!m&&(t(this,R).length=Math.min(t(this,R).length,e.startLine));const M=s&&e.lineDelta!==0&&c>=r,S=m||i==null||c>=f,y=e.changedLineRanges??[[c,e.endLine]];a(this,D,[]),a(this,_,0),a(this,A,[]);let V=-1;if(c<f)for(const[p,w]of y)p<f&&(V=Math.max(V,Math.min(w,f-1)));const mt=V>=c&&(m||e.lineDelta<0);m?o(this,h,et).call(this,c):(o(this,h,Ot).call(this,e),(i==null||c>=f)&&o(this,h,et).call(this,f));let j=0,St=y[j][1],ht,Rt=0,k=m?y[j][0]:f,rt=!1;const Mt=new Map,W=mt?new Map:void 0;if(W!=null&&!m){const p=Math.min(V+1,f,d);if(p>c){o(this,h,et).call(this,p);let w=c,ot=t(this,u)[w]??F;for(;w<p;w++){const x=o(this,h,ct).call(this,w,ot);ot=x.state,W.set(w,x.resolvedTokens)}t(this,u)[p]=ot}}let q=t(this,u)[k]??F;for(;k<d;){const p=m?t(this,u)[k+1]:M?o(this,h,gt).call(this,k+1):void 0;S&&(t(this,u)[k]=q);const{resolvedTokens:w,state:ot}=o(this,h,ct).call(this,k,q);if(q=ot,k>=f?Mt.set(k,w):W?.set(k,w),S&&(t(this,u)[k+1]=q),rt=k>=St&&(m||M)&&p!=null&&q.equals(p),rt){j++;const x=y[j];if(x==null)break;if(x[0]>=d){ht=x[0],Rt=j;break}let lt=t(this,u)[x[0]];if(M)for(let kt=k+2;kt<=x[0]&&(lt=o(this,h,gt).call(this,kt),lt!=null);kt++)t(this,u)[kt]=lt;lt==null?(St=x[1],k++):(k=x[0],q=lt,St=x[1]),rt=!1;continue}k++}if(S&&(k<d?t(this,u)[k+1]=q:t(this,u)[k]=q),rt&&M&&ht==null){for(let p=k+2;p<=n;p++){const w=o(this,h,gt).call(this,p);if(w==null)break;t(this,u)[p]=w}a(this,D,[]),a(this,_,0),a(this,A,[])}if(W!=null&&W.size>0&&t(this,it).call(this,W),ht!=null)t(this,C)&&m&&(t(this,R).length=Math.min(t(this,R).length,ht)),o(this,h,pt).call(this,ht,y,Rt);else if(!rt&&k<n){const p=I&&c>=f?d:c<f&&!m?c:k;t(this,C)&&m&&(t(this,R).length=Math.min(t(this,R).length,p)),o(this,h,pt).call(this,p,y,j)}return Mt}prebuildStateStack(e){o(this,h,ut).call(this),t(this,Tt).call(this,e)}stopBackgroundTokenize(){a(this,B,-1),!t(this,b)&&(a(this,b,!0),a(this,v,!1),a(this,O,-1),a(this,E,-1),a(this,X,void 0),a(this,N,0),a(this,D,[]),a(this,_,0),a(this,A,[]),o(this,h,Et).call(this))}pauseBackgroundTokenize(){t(this,b)||t(this,v)||(t(this,U)&&console.log("[diffs/editor] background tokenization paused",{jobId:t(this,z)}),a(this,v,!0))}resumeBackgroundTokenize(){t(this,b)||!t(this,v)||t(this,T)==null||t(this,O)<0||(t(this,U)&&console.log("[diffs/editor] background tokenization resumed",{jobId:t(this,z)}),a(this,v,!1),o(this,h,Y).call(this,t(this,z)))}},H=new WeakMap,T=new WeakMap,P=new WeakMap,Q=new WeakMap,L=new WeakMap,st=new WeakMap,it=new WeakMap,C=new WeakMap,U=new WeakMap,nt=new WeakMap,u=new WeakMap,D=new WeakMap,_=new WeakMap,A=new WeakMap,O=new WeakMap,b=new WeakMap,v=new WeakMap,z=new WeakMap,dt=new WeakMap,E=new WeakMap,B=new WeakMap,X=new WeakMap,N=new WeakMap,R=new WeakMap,Z=new WeakMap,Tt=new WeakMap,ft=new WeakMap,h=new WeakSet,K=function(){if(t(this,P)==="")return;this.backend?.getTheme(t(this,P));const{colorMap:e}=t(this,H).setTheme(t(this,P));a(this,Q,e)},ut=function(){t(this,T)==null&&!Lt(t(this,L).languageId)&&t(this,H).getLoadedLanguages().includes(t(this,L).languageId)&&a(this,T,t(this,H).getLanguage(t(this,L).languageId))},zt=function(){t(this,Z)||(globalThis.addEventListener("message",t(this,ft)),a(this,Z,!0))},Et=function(){t(this,Z)&&(globalThis.removeEventListener("message",t(this,ft)),a(this,Z,!1))},Y=function(e){globalThis.postMessage({type:"tokenize",tokenizerId:t(this,dt),jobId:e})},pt=function(e,i,s=0){if(Lt(t(this,L).languageId))return;const n=++vt(this,z)._;t(this,U)&&console.log("[diffs/editor] background tokenization scheduled",{jobId:n,startLine:e,changedLineRanges:i,changedRangeIndex:s}),a(this,b,!1),a(this,v,!1),a(this,O,e),t(this,E)>=0&&a(this,B,Math.max(t(this,B),t(this,E))),a(this,E,-1),a(this,X,i),a(this,N,s),o(this,h,zt).call(this),o(this,h,Y).call(this,n)},It=function(e){if(t(this,T)==null||t(this,u).length>e)return;if(!t(this,b)){t(this,E)>=0?a(this,E,Math.max(t(this,E),e)):a(this,B,Math.max(t(this,B),e));return}const i=++vt(this,z)._;a(this,b,!1),a(this,v,!1),a(this,O,t(this,u).length-1),a(this,E,e),a(this,B,-1),a(this,X,void 0),a(this,N,0),o(this,h,zt).call(this),o(this,h,Y).call(this,i)},ct=function(e,i){const s=t(this,L).getLineText(e);if(s.length>=t(this,st))return console.warn(`[diffs] Line(${e}) too long to tokenize: ${s.length}`),o(this,h,tt).call(this,e,null),{resolvedTokens:[[0,"",s]],state:i};if(t(this,T)==null||s===""||s.trim()==="")return o(this,h,tt).call(this,e,null),{resolvedTokens:[[0,"",s]],state:i};const n=_t(t(this,T),t(this,Q),s,i,Dt,t(this,C));return o(this,h,tt).call(this,e,n.bracketIgnoredRanges),{resolvedTokens:n.resolvedTokens,state:n.ruleStack}},tt=function(e,i){t(this,C)&&(t(this,R)[e]=i)},Ot=function(e){const i=e.changedLineChanges??[[e.startLine,e.endLine,e.lineDelta]],s=e.startLine+1;s<=t(this,u).length-s?(a(this,D,t(this,u)),a(this,_,0),a(this,u,t(this,u).slice(0,s))):(a(this,_,s),a(this,D,t(this,u).slice(s)),t(this,u).length=Math.min(t(this,u).length,s)),a(this,A,i)},gt=function(e){let i=e;for(let s=t(this,A).length-1;s>=0;s--){const[n,r,l]=t(this,A)[s];if(l!==0){if(i>r)i-=l;else if(i>n)return t(this,u)[e]}}return t(this,D)[i-t(this,_)]??t(this,u)[e]},et=function(e,i){const s=Math.min(Math.max(0,e),t(this,L).lineCount);if(t(this,u).length>s||t(this,T)==null)return!0;const n=i==null?0:performance.now();let r=t(this,u).length-1,l=t(this,u)[r]??F;for(;r<s;){t(this,u)[r]=l;const d=t(this,L).getLineText(r);if(d.length<t(this,st)&&d!==""&&d.trim()!==""){const c=_t(t(this,T),t(this,Q),d,l,Dt,t(this,C),!1);o(this,h,tt).call(this,r,c.bracketIgnoredRanges),l=c.ruleStack}else o(this,h,tt).call(this,r,null);if(r++,t(this,u)[r]=l,i!=null&&performance.now()-n>i)break}return r>=s},Bt=function(e){if(t(this,b)||t(this,v)||t(this,T)==null||e!==t(this,z))return;o(this,h,K).call(this);const i=o(this,h,et).call(this,t(this,E),1);if(!(t(this,b)||t(this,v)||e!==t(this,z))){if(i){this.stopBackgroundTokenize();return}a(this,O,t(this,u).length-1),o(this,h,Y).call(this,e)}},Pt=function(e){if(t(this,b)||t(this,v)||t(this,T)==null||e!==t(this,z))return;o(this,h,K).call(this);const i=performance.now(),s=new Map,n=t(this,L).lineCount,r=t(this,X);let l=t(this,O),d=t(this,u)[l]??F,c=!1,f=t(this,N),I=r?.[f]?.[1];for(;l<n;){t(this,u)[l]=d;const m=I!=null?o(this,h,gt).call(this,l+1):void 0,M=o(this,h,ct).call(this,l,d);if(s.set(l,M.resolvedTokens),d=M.state,t(this,u)[l+1]=d,c=I!=null&&l>=I&&m!=null&&d.equals(m),l++,c){f++;const S=r?.[f];if(S==null)break;if(I=S[1],t(this,u)[S[0]]==null)c=!1;else{l=S[0],d=t(this,u)[l]??d,c=!1;continue}}if(performance.now()-i>1)break}if(t(this,it).call(this,s),!(t(this,b)||t(this,v)||e!==t(this,z))){if(c||l>=n){const m=t(this,B);this.stopBackgroundTokenize(),m>=0&&o(this,h,It).call(this,m);return}a(this,O,l),a(this,N,f),o(this,h,Y).call(this,e)}},At);function _t(e,i,s,n,r,l=!0,d=!0){const c=e.tokenizeLine2(s,n,r);c.stoppedEarly&&console.warn(`[diffs] Time limit reached when tokenizing line: ${s.substring(0,100)}`);const f=c.tokens,I=f.length/2,m=[],M=[];if(!d&&!l)return{ruleStack:c.ruleStack,resolvedTokens:m,bracketIgnoredRanges:M};for(let S=0;S<I;S++){const y=f[2*S],V=S+1<I?f[2*S+2]:s.length;if(y===V)continue;const mt=f[2*S+1];if(d){const j=Ct.getForeground(mt);m.push([y,i[j],s.slice(y,V)])}l&&Ct.getTokenType(mt)>0&&M.push([y,V])}return{ruleStack:c.ruleStack,resolvedTokens:m,bracketIgnoredRanges:M}}function Lt(e){return e==="text"||e==="ansi"}var $,G,at,te=(at=class extends Ft{constructor(s,n){super();J(this,"highlighter");J(this,"options");g(this,$,"");g(this,G);this.highlighter=s,this.options=n}tokenizeChunk(s,n){const r=(t(this,$)+s).split(/(\r\n|\r|\n)/);let l=[];for(let d=0;d<r.length;d+=2){const c=r[d],f=this.highlighter.codeToTokens(c,{...this.options,grammarState:t(this,G)}),I=f.tokens[0].map(m=>({...m,offset:m.offset+this.stableOffset}));d+1<r.length?(Ht(n,I),this.pushLineBreak(n,c.length,r[d+1]),a(this,G,f.grammarState)):(l=I,a(this,$,c))}return{unstable:l,tailLength:t(this,$).length}}clone(){this.assertActive();const s=new at(this.highlighter,this.options);return this.copyStateTo(s),a(s,$,t(this,$)),a(s,G,t(this,G)),s}resetSource(){a(this,$,""),a(this,G,void 0)}releaseSource(){this.resetSource()}},$=new WeakMap,G=new WeakMap,at),he=class $t extends Kt{constructor(s,n){super(s,Nt(s));J(this,"raw");J(this,"loadedThemes",new Map);J(this,"attachedLanguages",new Set(["text","ansi"]));this.raw=n}static async create(s){const n=s==="shiki-wasm"?(await wt(async()=>{const{createOnigurumaEngine:l}=await import("./fp9mRO0R.js");return{createOnigurumaEngine:l}},[],import.meta.url)).createOnigurumaEngine(wt(()=>import("./Cey7Y6ql.js"),[],import.meta.url)):(await wt(async()=>{const{createJavaScriptRegexEngine:l}=await import("./LU5PuYrD.js");return{createJavaScriptRegexEngine:l}},[],import.meta.url)).createJavaScriptRegexEngine(),r=await Qt({themes:[],langs:[],engine:n});return new $t(s,r)}getTheme(s){this.assertNotDisposed();const n=this.loadedThemes.get(s),r=this.themeResolver.getResolvedTheme(s)??n;if(r==null)throw new Error(`Theme "${s}" has not been resolved`);if(n!==r){const l=r.textmate??(r.cssVariables!=null?Ut(r.cssVariables):void 0);if(l==null)throw new Error(`Theme "${s}" does not support Shiki`);this.raw.setTheme({...l,name:s}),this.loadedThemes.set(s,r)}return r}codeToTokens(s,n){return this.raw.codeToTokens(s,this.resolveOptions(n))}createEditorTokenizer(s){return new Yt(this.raw,s,this)}createStreamTokenizer(s){return new te(this.raw,this.resolveOptions(s))}async loadLanguages(s){this.assertNotDisposed();const n=s.filter(r=>!this.attachedLanguages.has(r));Xt(await Gt(n),this)}hasLoadedLanguages(s){if(this.disposed)return!1;let n;return s.every(r=>this.attachedLanguages.has(r)?!0:Jt.has(r)?!1:(n??=this.raw.getLoadedLanguages(),n.includes(r)))}attachLanguages(s){this.assertNotDisposed();for(const n of s){if(this.attachedLanguages.has(n.name))continue;const r=n.data.find(l=>l.name===n.name||l.aliases?.includes(n.name)===!0);if(r==null)throw new Error(`attachResolvedLanguages: No returned grammar declares "${n.name}" as its name or an alias.`);this.raw.loadLanguageSync(n.data);try{this.raw.getLanguage(n.name)}catch{throw new Error(`attachResolvedLanguages: "${r.name}" is already loaded without alias "${n.name}". Load the alias first or give the grammar a unique name.`)}this.attachedLanguages.add(n.name)}}releaseResources(){this.loadedThemes.clear(),this.attachedLanguages.clear(),this.raw.dispose()}resolveOptions({theme:s,themes:n,...r}){if(this.assertNotDisposed(),s!=null)return this.getTheme(s),{...r,theme:s};if(n==null)throw new Error("A theme or themes option is required");for(const l of Object.values(n))this.getTheme(l);return{...r,themes:n}}};export{he as ShikiHighlighter};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as p,r as u,d as n}from"./
|
|
1
|
+
import{g as p,r as u,d as n}from"./BSsARSCL.js";import{p as f}from"./BUeOnhAk.js";import{b as a,ay as o}from"./CJiiUUa9.js";import{M as c,c as d}from"./Bp1r8JRc.js";var v=d().RailroadAbnf.parser.LangiumParser,i=a(e=>{const r=e.alternatives.map(g);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformAlternation"),g=a(e=>{const r=e.elements.map(y);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformConcatenation"),b=a(e=>{if(e.includes("*")){const[t,s]=e.split("*"),l=t?parseInt(t,10):0,m=s?parseInt(s,10):1/0;return{min:l,max:m}}const r=parseInt(e,10);return{min:r,max:r}},"parseRepeat"),y=a(e=>{const r=A(e.primary);if(!e.repeat)return r;const{min:t,max:s}=b(e.repeat);return t===0&&s===1?{type:"optional",element:r}:{type:"repetition",element:r,min:t,max:s}},"transformElement"),A=a(e=>{switch(e.$type){case"AbnfStringLiteral":return{type:"terminal",value:e.value};case"AbnfNumVal":return{type:"terminal",value:e.value};case"AbnfRuleName":return{type:"nonterminal",name:e.name};case"AbnfGroup":return i(e.element);case"AbnfOptionalGroup":return{type:"optional",element:i(e.element)};default:throw new Error(`Unsupported ABNF primary node: ${e.$type}`)}},"transformPrimary"),P=a(e=>({name:e.name,definition:i(e.definition)}),"transformRule"),h=a(e=>{f(e,n),e.title&&n.setTitle(e.title),e.rules.map(r=>n.addRule(P(r)))},"populateDb"),R={parse:a(e=>{n.clear(),o.debug("[ABNF Parser] Starting Langium parse");const r=v.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new c(r);const t=r.value;o.debug("[ABNF Parser] Parsed rules:",t.rules.length),h(t),o.debug("[ABNF Parser] Parse complete")},"parse"),parser:{yy:n}},w={parser:R,db:n,renderer:u,styles:p};export{w as diagram};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/Dt46PcSf.js","/app/immutable/chunks/DmuzFYIt.js","/app/immutable/chunks/Dms_DO28.js","/app/immutable/chunks/3SdAC2_C.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/CgpdD1It.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/BOfUqw1E.js","/app/immutable/chunks/3Mdoz-0Q.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/chunks/Bqd7fdCF.js","/app/immutable/chunks/2D4U7uPQ.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{t as Yt,bo as J,bw as te,bs as M,bq as ee,b as re,bm as n,_ as se}from"./3Mdoz-0Q.js";import{bo as ae,bs as ne,ca as C,bH as N,c5 as yt,aD as F,bj as ie,a5 as O,bS as p,bA as D,b_ as x,W as f,bn as oe,cd as lt,bV as kt,c9 as Z,aA as G,bl as R,bO as h,ay as wt,aB as y}from"./3SdAC2_C.js";import{i as I}from"./BdqQb89H.js";import{f as St,g as le,s as ce}from"./kR4OBGp8.js";import{b as ue}from"./Dn334wJv.js";import{b as de}from"./D3yXvqwY.js";import{Jv as m,D1 as pe,CT as me,CS as fe,Jp as _e,CE as ve,iz as be,iZ as ge}from"./DmuzFYIt.js";import{d as xe,T as he,D as ye,L as ke,o as we}from"./xqiJuTcv.js";import{F as ct,d3 as Se,cb as $e,c$ as Ae}from"./BQ64OnCJ.js";import{f as $t}from"./yF7QjJ_G.js";import{m as rt}from"./KkEpTlxU.js";import"./CWzES__t.js";import"./BOfUqw1E.js";import"./ChTqQfQN.js";import"./UxmdIyM3.js";import{r as Ce}from"./yD1qfwqe.js";import{selectScriptById as ut,selectScriptRuntime as Fe,selectScriptOutput as At,selectScriptRetainedOutput as Oe,selectCanDeleteScript as Ct}from"./
|
|
2
|
+
import{t as Yt,bo as J,bw as te,bs as M,bq as ee,b as re,bm as n,_ as se}from"./3Mdoz-0Q.js";import{bo as ae,bs as ne,ca as C,bH as N,c5 as yt,aD as F,bj as ie,a5 as O,bS as p,bA as D,b_ as x,W as f,bn as oe,cd as lt,bV as kt,c9 as Z,aA as G,bl as R,bO as h,ay as wt,aB as y}from"./3SdAC2_C.js";import{i as I}from"./BdqQb89H.js";import{f as St,g as le,s as ce}from"./kR4OBGp8.js";import{b as ue}from"./Dn334wJv.js";import{b as de}from"./D3yXvqwY.js";import{Jv as m,D1 as pe,CT as me,CS as fe,Jp as _e,CE as ve,iz as be,iZ as ge}from"./DmuzFYIt.js";import{d as xe,T as he,D as ye,L as ke,o as we}from"./xqiJuTcv.js";import{F as ct,d3 as Se,cb as $e,c$ as Ae}from"./BQ64OnCJ.js";import{f as $t}from"./yF7QjJ_G.js";import{m as rt}from"./KkEpTlxU.js";import"./CWzES__t.js";import"./BOfUqw1E.js";import"./ChTqQfQN.js";import"./UxmdIyM3.js";import{r as Ce}from"./yD1qfwqe.js";import{selectScriptById as ut,selectScriptRuntime as Fe,selectScriptOutput as At,selectScriptRetainedOutput as Oe,selectCanDeleteScript as Ct}from"./HhPY-joW.js";import{g as De}from"./ByHhzwUN.js";import{c4 as Re,d$ as Ie,dC as Ft}from"./E8rxDAT1.js";import"./SfUr14xu.js";import"./g4HdeOyY.js";import"./BqvIfFJz.js";import{e as Le}from"./vTqsHLsg.js";import{v as Ot}from"./DI8QKtVI.js";var Dt=y("<!> ",1),Te=y('<div class="bg-danger-background/20 border-y border-danger/20 px-3 py-1.5 flex items-center justify-between"><div class="flex items-center gap-2 text-sm text-danger font-medium"><div class="w-4 h-4 rounded-full bg-danger-background flex items-center justify-center"><!></div> <span> </span></div> <!></div>'),Ee=y('<pre class="retained-text px-3 pb-3 text-xs svelte-115p4sl"> </pre>'),qe=y('<p class="px-3 pb-3 text-xs text-muted-foreground" role="status"> </p>'),Be=y('<details class="retained-output border-b border-border svelte-115p4sl"><summary class="cursor-pointer px-3 py-2 text-xs text-muted-foreground"> </summary> <p class="px-3 pb-2 text-xs text-muted-foreground"> </p> <!></details>'),Pe=y('<div class="px-3 py-1 text-xs text-muted-foreground"> </div>'),ze=y('<code class="text-muted-foreground font-mono text-xs"> </code>'),Me=y('<span class="sr-only"> </span>'),We=y('<div class="flex-1 flex items-center justify-center px-4 py-8"><div class="flex items-center gap-3 text-sm"><span class="text-subtle font-mono">$</span> <!> <!> <!></div></div>'),je=y('<div><!> <!> <!> <!> <div><div class="xterm-output svelte-115p4sl"></div></div></div>');function Ue(_,c){const j=ae();if(new.target)return Yt({component:Ue,..._});ne(c,!0);const L=()=>M(zt,"$outputAuthority",T),u=()=>M(Tt,"$runtime$",T),v=()=>M(Et,"$output$",T),S=()=>M(Pt,"$codeFontFamilyCSS",T),W=()=>M(qt,"$retainedOutput$",T),Rt=()=>M(Bt,"$hidesAgentLifecycleActions$",T),dt=()=>M(Lt,"$script$",T),[T,It]=ee();let $=J(c,"scriptId",7),b=J(c,"workspaceId",7),st=J(c,"class",7,""),at=J(c,"runDisabled",7,!1),E=J(c,"runDisabledReason",7,null);const pt=Z(()=>at()||E()!==null),q=lt(""),U=lt(""),mt=lt("");let nt=kt(!1);C(()=>q.set(b())),C(()=>U.set($()));let B,i=null,H=null,Q=null,V=null,P=null,X=null;const Lt=ut(q,U),Tt=Fe(q,U),Et=At(q,U),qt=Oe(q,U,mt),Bt=Re(q),Pt=De(),zt=Ie(q),ft=crypto.randomUUID();C(()=>{const t=b();return $(),()=>{t&&m.dispatch(pe(t,ft))}}),C(()=>{const t=b(),e=$(),a=L(),s=u();if(!a||!t||!e)return;s.status,s.startedAt;const l=crypto.randomUUID();return mt.set(l),N(nt,yt(()=>v().chunks.length===0),!0),m.dispatch(me(t,e,l)),()=>m.dispatch(fe(t,e,l))});let Y=kt(0);const Mt=Z(()=>u().status==="exited"&&u().exitCode!=null&&u().exitCode!==0&&u().exitCode<128);function Wt(){if(!B||i)return;V=new he(B);const t=V.getCurrentTheme();i=new ye({allowProposedApi:!0,fontFamily:S(),fontSize:13,lineHeight:1.2,letterSpacing:0,cursorBlink:!1,cursorStyle:"underline",cursorWidth:1,scrollback:1e4,allowTransparency:!0,convertEol:!0,disableStdin:!0,drawBoldTextInBrightColors:!0,theme:t}),i.attachCustomKeyEventHandler(a=>{const s=a.metaKey||a.ctrlKey;return!(s&&a.key==="`"||s&&a.key==="j"||s&&a.key==="k")}),H=new we,i.loadAddon(H);const e=new ke((a,s)=>{try{const l=new URL(s);l.hostname==="localhost"||l.hostname==="127.0.0.1"?Ce(s).then(g=>{se(async()=>{const{getPanelLayoutManager:k}=await import("./Dt46PcSf.js").then(A=>A.p);return{getPanelLayoutManager:k}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12]),import.meta.url).then(({getPanelLayoutManager:k})=>{k(b()).openBrowserPanel(g.url,void 0,void 0,g.requestedUrl)}).catch(()=>{window.open(g.url,"_blank")})}):window.open(s,"_blank")}catch{window.open(s,"_blank")}});i.loadAddon(e),i.open(B),V.applyTheme(i),X=requestAnimationFrame(()=>{X=null,H?.fit()}),Q=new ResizeObserver(()=>{H?.fit()}),Q.observe(B),jt()}function jt(){if(!i)return;const t=At.select(m.state,b(),$());t.chunks.length>0&&i.write(t.chunks.map(e=>e.text).join("")),N(Y,t.dropped+t.chunks.length)}function _t(){P!==null&&(cancelAnimationFrame(P),P=null),X!==null&&(cancelAnimationFrame(X),X=null),Q?.disconnect(),Q=null,V?.dispose(),V=null;const t=i;i=null,H=null,N(Y,0),t&&xe(t)}C(()=>{const t=v(),e=yt(()=>F(Y)),a=t.dropped+t.chunks.length;if(!i||a<=e)return;const s=Math.max(e-t.dropped,0);i.write(t.chunks.slice(s).map(l=>l.text).join("")),N(Y,a)}),C(()=>{const t=S();i&&i.options.fontFamily!==t&&(i.options.fontFamily=t)});function Ut(){F(pt)||m.dispatch(_e(b(),$()))}function Ht(){if(!b()){rt.error(n.terminal_scriptOutput_noWorkspace_error());return}m.dispatch(be(b(),$(),W()?.text,ft))}C(()=>{u().status==="idle"&&v().chunks.length===0&&_t()}),C(()=>{!(u().status==="idle"&&v().chunks.length===0)&&B&&!i&&(P!==null&&cancelAnimationFrame(P),P=requestAnimationFrame(()=>{P=null,Wt()}))}),ie(()=>{_t()});var Vt={get scriptId(){return $()},set scriptId(t){$(t),G()},get workspaceId(){return b()},set workspaceId(t){b(t),G()},get class(){return st()},set class(t=""){st(t),G()},get runDisabled(){return at()},set runDisabled(t=!1){at(t),G()},get runDisabledReason(){return E()},set runDisabledReason(t=null){E(t),G()},$set:te,$on:(t,e)=>re(c,t,e)},tt=je(),vt=O(tt);{var Xt=t=>{var e=Te(),a=O(e),s=O(a),l=O(s);ct(l,{get icon(){return Se},size:"xs"}),D(s);var g=p(s,2),k=R(g,!0);D(a);var A=p(a,2);{var d=r=>{$t(r,{variant:"outline",size:"sm",class:"h-7 text-xs bg-background border border-border text-danger",onclick:Ht,children:(o,w)=>{var z=Dt(),K=wt(z);ct(K,{get icon(){return Ae},size:"sm",class:"mr-1.5"});var et=p(K);x(ot=>h(et,` ${ot??""}`),[()=>n.terminal_scriptOutput_askAiToFix_label()]),f(o,z)},$$slots:{default:!0}})};I(A,r=>{Rt()||r(d)})}D(e),x(r=>h(k,r),[()=>n.terminal_scriptOutput_buildFailed_label({exitCode:u().exitCode??0})]),f(t,e)};I(vt,t=>{F(Mt)&&t(Xt)})}var bt=p(vt,2);{var Kt=t=>{var e=Be(),a=O(e),s=R(a,!0),l=p(a,2),g=R(l,!0),k=p(l,2);{var A=r=>{var o=Ee();let w;var z=R(o,!0);x(()=>{w=le(o,"",w,{"font-family":S()}),h(z,W().text)}),f(r,o)},d=r=>{var o=qe(),w=R(o,!0);x(z=>h(w,z),[()=>W().status==="loading"?n.terminal_scriptOutput_retainedLoading_label():n.terminal_scriptOutput_retainedUnavailable_label()]),f(r,o)};I(k,r=>{W().status==="available"?r(A):r(d,-1)})}D(e),x((r,o)=>{h(s,r),h(g,o)},[()=>n.terminal_scriptOutput_retained_label(),()=>n.terminal_scriptOutput_retained_description()]),de("open","toggle",e,r=>N(nt,r),()=>F(nt)),f(t,e)};I(bt,t=>{W()&&t(Kt)})}var gt=p(bt,2);{var Jt=t=>{var e=Pe(),a=R(e,!0);x(s=>h(a,s),[()=>n.terminal_scriptOutput_live_label()]),f(t,e)};I(gt,t=>{v().chunks.length>0&&W()&&t(Jt)})}var xt=p(gt,2);{var Nt=t=>{var e=We(),a=O(e),s=p(O(a),2);{var l=d=>{var r=ze(),o=R(r,!0);x(w=>h(o,w),[()=>ve(dt())]),f(d,r)};I(s,d=>{dt()&&d(l)})}var g=p(s,2);{let d=Z(()=>E()??void 0),r=Z(()=>n.terminal_scriptOutput_run_label()),o=Z(()=>E()?j:void 0);$t(g,{variant:"ghost",size:"xs",get disabled(){return F(pt)},get tooltip(){return F(d)},get"aria-label"(){return F(r)},get"aria-describedby"(){return F(o)},onclick:Ut,class:"text-muted-foreground hover:text-foreground",children:(w,z)=>{var K=Dt(),et=wt(K);ct(et,{get icon(){return $e},class:"h-3 w-3 mr-1"});var ot=p(et);x(Qt=>h(ot,` ${Qt??""}`),[()=>n.terminal_scriptOutput_run_label()]),f(w,K)},$$slots:{default:!0}})}var k=p(g,2);{var A=d=>{var r=Me(),o=R(r,!0);x(()=>{ce(r,"id",j),h(o,E())}),f(d,r)};I(k,d=>{E()&&d(A)})}D(a),D(e),f(t,e)};I(xt,t=>{u().status==="idle"&&v().chunks.length===0&&t(Nt)})}var it=p(xt,2);let ht;var Zt=O(it);ue(Zt,t=>B=t,()=>B),D(it),D(tt),x(()=>{St(tt,1,`script-output-viewer ${st()??""}`,"svelte-115p4sl"),ht=St(it,1,"flex-1 relative overflow-hidden",null,ht,{hidden:u().status==="idle"&&v().chunks.length===0})}),f(_,tt);var Gt=oe(Vt);return It(),Gt}async function fr(_,c,j){const L=ut.select(m.state,_,c);if(!L||!j()||!Ct.select(m.state,_,c))return;const u=Ot(L.runtime?.status),v=Ft.select(m.state,_);if(!v){rt.error(n.workspace_client_accessChanged_error());return}if(!await Le({title:n.scripts_delete_title({name:L.name}),description:u?n.scripts_delete_running_description():n.scripts_delete_description(),confirmLabel:n.scripts_delete_label(),destructive:!0}))return;if(v!==Ft.select(m.state,_)){rt.error(n.workspace_client_accessChanged_error());return}const S=ut.select(m.state,_,c);if(!j()||!S||S.createdAt!==L.createdAt||S.name!==L.name||!u&&Ot(S.runtime?.status)||!Ct.select(m.state,_,c)){rt.error(n.scripts_delete_changed_error());return}m.dispatch(ge(_,c,n.terminal_quakeOverlay_deleteScriptFailed_error()))}export{Ue as S,fr as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{I as h}from"./
|
|
1
|
+
import{I as h}from"./inhLOPTf.js";import{c as v}from"./ChTqQfQN.js";import{O as d}from"./CWzES__t.js";const g=v("AttachmentImageUrl");function y(t,n){const r=n.split("/").filter(e=>e.length>0).map(e=>encodeURIComponent(e)).join("/");return`workspace-file://${t}/${r}`}const u=new Map,a=new Map;let f=0,m=!1;function p(){m||(m=!0,d(()=>{f+=1,u.clear(),a.clear()}))}function A(t,n){u.delete(`${t}/${n}`)}function F(t,n,r){p();let e=!1,i=!1,o=!1;async function l(){if(!e){if(i){o=!0;return}i=!0;try{const c=await $(t,n);e||r(c)}finally{i=!1,o&&(o=!1,l())}}}const s=d(()=>{l()});return l(),{imageFailed(){e||(A(t,n),r(null))},dispose(){e=!0,s()}}}function $(t,n){p();const r=f,e=`${t}/${n}`,i=u.get(e);if(i)return Promise.resolve(i);const o=a.get(e);if(o)return o;const l=(async()=>{try{const s=await h({attachmentId:n,workspaceId:t});if(r!==f)return null;if(!s.exists)return g.warn("Attachment file missing on disk",{attachmentId:n}),null;const c=y(t,s.path);return u.set(e,c),c}catch(s){return g.warn("Failed to resolve attachment image",{attachmentId:n,error:s}),null}finally{r===f&&a.delete(e)}})();return a.set(e,l),l}export{A as e,F as o,$ as r};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks
|
|
2
|
-
import{_ as i}from"./3Mdoz-0Q.js";import{c as m}from"./ChTqQfQN.js";import{t as g}from"./DKwAaLwd.js";function d(){return typeof window<"u"&&window.location.pathname.startsWith("/hud")}function l(){return typeof window>"u"?null:g(window.location.pathname)}function h(){return l()!==null}let w=0;function y(){w+=1}function T(){return w}const v=m("Navigation"),_="settings-previous-path";function s(t){return/^\/settings(?:[/?#]|$)/.test(t)}async function E(t,e={}){if(d()||h()||typeof window<"u"&&/^\/dock(?:\/|$)/.test(window.location.pathname)){v.debug("Ignoring navigation in auxiliary window",{route:t});return}const c=e.assistantContent||t.startsWith("intent://")||/^https?:\/\//.test(t);if(c||y(),c){const{showAssistantContent:n}=await i(async()=>{const{showAssistantContent:o}=await import("
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/BYbQHOnI.js","/app/immutable/chunks/3Mdoz-0Q.js","/app/immutable/chunks/3SdAC2_C.js","/app/immutable/chunks/DmuzFYIt.js","/app/immutable/chunks/Dms_DO28.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/CgpdD1It.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/BOfUqw1E.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/chunks/Bqd7fdCF.js","/app/immutable/chunks/D2ucd7-d.js","/app/immutable/chunks/B5aYN90J.js","/app/immutable/chunks/CWzES__t.js","/app/immutable/chunks/gpDHnGWw.js","/app/immutable/chunks/kR4OBGp8.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/BdWqymET.js","/app/immutable/chunks/BBWuirRW.js","/app/immutable/chunks/DONrLvvt.js","/app/immutable/chunks/DypB-Dwi.js","/app/immutable/chunks/a_kJM7V2.js","/app/immutable/chunks/DILbaYr6.js","/app/immutable/chunks/KkEpTlxU.js","/app/immutable/chunks/BdqQb89H.js","/app/immutable/chunks/yF7QjJ_G.js","/app/immutable/chunks/Dn334wJv.js","/app/immutable/chunks/Bj3DquZA.js","/app/immutable/chunks/Dcys5Bs9.js","/app/immutable/chunks/rlD8zTU3.js","/app/immutable/chunks/ZYFxZ-3Z.js","/app/immutable/chunks/UxmdIyM3.js","/app/immutable/chunks/D9tVylVS.js","/app/immutable/chunks/BQ64OnCJ.js","/app/immutable/chunks/C4w1ocT0.js","/app/immutable/chunks/DU3vNstz.js","/app/immutable/chunks/XJv96NUg.js","/app/immutable/assets/notify.B1j5oT2y.css","/app/immutable/chunks/E8rxDAT1.js","/app/immutable/chunks/ByHhzwUN.js","/app/immutable/chunks/e7p1l6GD.js","/app/immutable/chunks/2D4U7uPQ.js","/app/immutable/chunks/Xo-qyHto.js","/app/immutable/chunks/MkXmO5mC.js","/app/immutable/chunks/CMiilI_P.js","/app/immutable/chunks/B_QPRXJ5.js","/app/immutable/chunks/DB3Bmw2z.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as i}from"./3Mdoz-0Q.js";import{c as m}from"./ChTqQfQN.js";import{t as g}from"./DKwAaLwd.js";function d(){return typeof window<"u"&&window.location.pathname.startsWith("/hud")}function l(){return typeof window>"u"?null:g(window.location.pathname)}function h(){return l()!==null}let w=0;function y(){w+=1}function T(){return w}const v=m("Navigation"),_="settings-previous-path";function s(t){return/^\/settings(?:[/?#]|$)/.test(t)}async function E(t,e={}){if(d()||h()||typeof window<"u"&&/^\/dock(?:\/|$)/.test(window.location.pathname)){v.debug("Ignoring navigation in auxiliary window",{route:t});return}const c=e.assistantContent||t.startsWith("intent://")||/^https?:\/\//.test(t);if(c||y(),c){const{showAssistantContent:n}=await i(async()=>{const{showAssistantContent:o}=await import("./BYbQHOnI.js");return{showAssistantContent:o}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44]),import.meta.url);if(await n(t,{preserveFocus:!0,background:e.assistantContent===!0,agentId:e.assistantAgentId})){if(e.assistantContent)return;const{openPanel:o}=await i(async()=>{const{openPanel:a}=await import("./DmuzFYIt.js").then(r=>r.J3);return{openPanel:a}},__vite__mapDeps([3,4,2,5,6,7,8,1,9,10,11]),import.meta.url),{store:f}=await i(async()=>{const{store:a}=await import("./MkXmO5mC.js");return{store:a}},__vite__mapDeps([45,3,4,2,5,6,7,8,1,9,10,11,46,47]),import.meta.url);f.dispatch(o("chief"));const{goto:p}=await i(async()=>{const{goto:a}=await import("./DB3Bmw2z.js").then(r=>r.n);return{goto:a}},__vite__mapDeps([48,2]),import.meta.url);window.location.pathname!=="/"&&await p("/");return}}if(s(t)&&typeof window<"u"&&typeof sessionStorage<"u"&&!s(window.location.pathname)){const n=new URL(window.location.href);sessionStorage.setItem(_,n.pathname+n.search+n.hash)}const{goto:u}=await i(async()=>{const{goto:n}=await import("./DB3Bmw2z.js").then(o=>o.n);return{goto:n}},__vite__mapDeps([48,2]),import.meta.url);return e.state?u(t,{state:e.state}):u(t)}const b=Object.freeze(Object.defineProperty({__proto__:null,SETTINGS_PREV_PATH_KEY:_,isHudWindowRenderer:d,isSettingsRoute:s,navigateToRoute:E},Symbol.toStringTag,{value:"Module"}));export{_ as S,s as a,y as b,l as c,h as d,T as e,b as f,d as i,E as n};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ao as s}from"./3SdAC2_C.js";import{d as r}from"./
|
|
1
|
+
import{ao as s}from"./3SdAC2_C.js";import{d as r}from"./DB3Bmw2z.js";const t=()=>{const e=r;return{page:{subscribe:e.page.subscribe},navigating:{subscribe:e.navigating.subscribe},updated:e.updated}},c={subscribe(e){return(s?o("page"):t().page).subscribe(e)}};function o(e){try{return t()[e]}catch{throw new Error(`Cannot subscribe to '${e}' store on the server outside of a Svelte component, as it is bound to the current request via component context. This prevents state from leaking between users.For more information, see https://svelte.dev/docs/kit/state-management#avoid-shared-state-on-the-server`)}}export{c as p};
|