@intent-hq/web 2.393.1 → 2.393.2
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/{BZcIlO-m.js → 0Lodvm7U.js} +1 -1
- package/web/app/immutable/chunks/{PBRs5SJ0.js → 1hUesUcr.js} +1 -1
- package/web/app/immutable/chunks/{BX6cGa3P.js → 1p87nGiH.js} +1 -1
- package/web/app/immutable/chunks/{CxYEPO2e.js → 2XTpu-pp.js} +1 -1
- package/web/app/immutable/chunks/{ye-GTjqo.js → 3EQPKXoI.js} +1 -1
- package/web/app/immutable/chunks/{Do3KjvK9.js → 5NKE7nx3.js} +1 -1
- package/web/app/immutable/chunks/{BYFF4vXy.js → 5Nvv2Lts.js} +1 -1
- package/web/app/immutable/chunks/{BU9PIki-.js → 5SDFNZiZ.js} +1 -1
- package/web/app/immutable/chunks/{DgmcmslQ.js → 9N5egcma.js} +1 -1
- package/web/app/immutable/chunks/{PIyjm_eA.js → AX1GDLPb.js} +1 -1
- package/web/app/immutable/chunks/{kc2Bsov-.js → B1P2_A-D.js} +1 -1
- package/web/app/immutable/chunks/{03rp11-0.js → B25DCKCp.js} +1 -1
- package/web/app/immutable/chunks/{BoAOWVTV.js → B3_pG997.js} +1 -1
- package/web/app/immutable/chunks/{CD6SknDy.js → B8sPKQVl.js} +1 -1
- package/web/app/immutable/chunks/{_fNgz67j.js → B92LVVZl.js} +1 -1
- package/web/app/immutable/chunks/{BF2WXZJV.js → B941PH3R.js} +1 -1
- package/web/app/immutable/chunks/{CGnjVQAU.js → BET9_6zk.js} +2 -2
- package/web/app/immutable/chunks/{C9DL5612.js → BI4cZZX-.js} +1 -1
- package/web/app/immutable/chunks/{D2Y-4Hk1.js → BIDLT3JB.js} +1 -1
- package/web/app/immutable/chunks/{DeZREu1L.js → BOE0lXBq.js} +1 -1
- package/web/app/immutable/chunks/{DOrnNMXq.js → BOOf6vKl.js} +1 -1
- package/web/app/immutable/chunks/{Bz-k4xjY.js → BPphEAV1.js} +1 -1
- package/web/app/immutable/chunks/{BQr_CU_m.js → BQ9Nf0IV.js} +1 -1
- package/web/app/immutable/chunks/{DpmfoOfT.js → BSMKf5nA.js} +1 -1
- package/web/app/immutable/chunks/{DMZaN70J.js → BSVwkJI3.js} +1 -1
- package/web/app/immutable/chunks/{8XCqMH_A.js → BTQZ2eSY.js} +1 -1
- package/web/app/immutable/chunks/{By2IWKC2.js → BV9rfWFj.js} +1 -1
- package/web/app/immutable/chunks/{BbwMNYGv.js → BWH6q8SG.js} +3 -3
- package/web/app/immutable/chunks/{CC5YTA05.js → BXnNAEju.js} +1 -1
- package/web/app/immutable/chunks/{CKuv24OA.js → BZpl1Y6O.js} +1 -1
- package/web/app/immutable/chunks/{B08hyH_t.js → BcKhVYNw.js} +1 -1
- package/web/app/immutable/chunks/{DZYGgiAb.js → Bf8oyM9s.js} +1 -1
- package/web/app/immutable/chunks/{C0yEXWZT.js → BhsjECB4.js} +1 -1
- package/web/app/immutable/chunks/{2E4Z_ZFq.js → BmkQwoP6.js} +1 -1
- package/web/app/immutable/chunks/{B4H39zb5.js → Bo0ZNhTd.js} +1 -1
- package/web/app/immutable/chunks/{DhA_Bjtj.js → BvpvfHPp.js} +1 -1
- package/web/app/immutable/chunks/{CNZpDeJb.js → ByXyOGzc.js} +1 -1
- package/web/app/immutable/chunks/{DJPdI2sS.js → C-vJzBpf.js} +7 -7
- package/web/app/immutable/chunks/{DJWOAwhC.js → C0ZUrdOo.js} +1 -1
- package/web/app/immutable/chunks/{ChnCUogL.js → C3A6Etjq.js} +1 -1
- package/web/app/immutable/chunks/{BvADYKOZ.js → C3ldfPpK.js} +2 -2
- package/web/app/immutable/chunks/{Baa59Un_.js → C45mDBrU.js} +1 -1
- package/web/app/immutable/chunks/{ClK_UzEg.js → C4qoqU0x.js} +1 -1
- package/web/app/immutable/chunks/{DdNl3Rbm.js → CBdW99Fh.js} +3 -3
- package/web/app/immutable/chunks/{BHwv4Hfl.js → CCi081IH.js} +1 -1
- package/web/app/immutable/chunks/{BfFqg0tr.js → CEH2NAZ8.js} +1 -1
- package/web/app/immutable/chunks/{BBA4NncC.js → CFa8sUgf.js} +1 -1
- package/web/app/immutable/chunks/{K6U2gbY4.js → CFyhHTwc.js} +1 -1
- package/web/app/immutable/chunks/{CMQzFQs4.js → CG6G-VtV.js} +1 -1
- package/web/app/immutable/chunks/{B8COfuyw.js → CGYM6R_d.js} +1 -1
- package/web/app/immutable/chunks/{BGntbMwK.js → CH1Bpd5B.js} +1 -1
- package/web/app/immutable/chunks/{CBDRhyjO.js → CJUKJKPV.js} +1 -1
- package/web/app/immutable/chunks/{QiDikPQa.js → CJtBv95U.js} +1 -1
- package/web/app/immutable/chunks/{CkT6bu2G.js → CL5OTeL_.js} +1 -1
- package/web/app/immutable/chunks/{C0tj6dfD.js → CM3rEc3H.js} +1 -1
- package/web/app/immutable/chunks/{Bl5dZSyT.js → CNm0He-Z.js} +2 -2
- package/web/app/immutable/chunks/{CNzTIPQp.js → CPCJiIPK.js} +1 -1
- package/web/app/immutable/chunks/{BGLaHsDV.js → CPTHRAYg.js} +1 -1
- package/web/app/immutable/chunks/{B5JMHmH2.js → CPy0rCmw.js} +4 -4
- package/web/app/immutable/chunks/{BX6KUKcp.js → CR6bxzBv.js} +1 -1
- package/web/app/immutable/chunks/{DU4u3RKB.js → CVgSN9ZH.js} +2 -2
- package/web/app/immutable/chunks/{BSCmeu0N.js → CVhLsbHu.js} +1 -1
- package/web/app/immutable/chunks/{DN6txiJA.js → C_rsaO5o.js} +1 -1
- package/web/app/immutable/chunks/{BTVapThA.js → CbGGQnE9.js} +1 -1
- package/web/app/immutable/chunks/{CiezGigq.js → CdXM6BQL.js} +1 -1
- package/web/app/immutable/chunks/{Dp6gutm7.js → Cdwy3-nO.js} +4 -4
- package/web/app/immutable/chunks/{edvxHiJh.js → Ce5Cs6SN.js} +3 -3
- package/web/app/immutable/chunks/{DRVUI7n3.js → Cj36CQXD.js} +1 -1
- package/web/app/immutable/chunks/{CRNqz-CU.js → Cj92J6fP.js} +3 -3
- package/web/app/immutable/chunks/{BSglkeCR.js → CnnBx7yl.js} +1 -1
- package/web/app/immutable/chunks/{P235vPf0.js → Cnvb2S0V.js} +1 -1
- package/web/app/immutable/chunks/{Bv6jwx4N.js → Cohy0Z-x.js} +1 -1
- package/web/app/immutable/chunks/{CS_KcnQC.js → CpwZYDHS.js} +1 -1
- package/web/app/immutable/chunks/{6c2NdJk5.js → CqnoveI8.js} +1 -1
- package/web/app/immutable/chunks/{0fp6eBJ2.js → CtemMU54.js} +2 -2
- package/web/app/immutable/chunks/{D-IVWxYX.js → CuvONknh.js} +1 -1
- package/web/app/immutable/chunks/{CMHMpoVu.js → Cym4zMqt.js} +3 -3
- package/web/app/immutable/chunks/{CKGl1DmB.js → D1CYQTLS.js} +1 -1
- package/web/app/immutable/chunks/{2z2xJ2W_.js → D7rcwg4U.js} +2 -2
- package/web/app/immutable/chunks/{E6pB77s3.js → D7tp4A5_.js} +1 -1
- package/web/app/immutable/chunks/{BhzVqZCt.js → D8dc4uEZ.js} +1 -1
- package/web/app/immutable/chunks/{Bw9UsBZT.js → D9_9Xrbm.js} +1 -1
- package/web/app/immutable/chunks/{DEVOS0tD.js → DLTvtu0r.js} +1 -1
- package/web/app/immutable/chunks/{Dl68BOSP.js → DOjRTGtD.js} +1 -1
- package/web/app/immutable/chunks/{B2p16ZcG.js → DQMGgT_X.js} +1 -1
- package/web/app/immutable/chunks/{X-RVyfO0.js → DR2A4Ob1.js} +1 -1
- package/web/app/immutable/chunks/{BGBZTOoV.js → DRNQWF5u.js} +2 -2
- package/web/app/immutable/chunks/{Jpb8pOEi.js → DRgsIn-1.js} +1 -1
- package/web/app/immutable/chunks/{BDDEENB9.js → DW3UcPIr.js} +1 -1
- package/web/app/immutable/chunks/{C4P8DeLE.js → DY9oFeIm.js} +1 -1
- package/web/app/immutable/chunks/{BGZDnsPV.js → DYA10vhI.js} +2 -2
- package/web/app/immutable/chunks/{BZDblkH_.js → DYo8C3ZI.js} +1 -1
- package/web/app/immutable/chunks/{Cwn1Htr4.js → Da3dWtR7.js} +1 -1
- package/web/app/immutable/chunks/{D5vlW2SV.js → Db6ExzGF.js} +1 -1
- package/web/app/immutable/chunks/{C2BkU_2B.js → DcU97JoW.js} +1 -1
- package/web/app/immutable/chunks/{IuSiCp89.js → Dd4ehheI.js} +1 -1
- package/web/app/immutable/chunks/{xXSv9C4P.js → DeeBlDPG.js} +1 -1
- package/web/app/immutable/chunks/{CFsh8rrs.js → DfrPaMm3.js} +2 -2
- package/web/app/immutable/chunks/{D1rlIs5V.js → DgClg_4p.js} +1 -1
- package/web/app/immutable/chunks/{DBMzxcUI.js → DiaqLwTf.js} +1 -1
- package/web/app/immutable/chunks/{DjepxDVb.js → Dm529rkq.js} +4 -4
- package/web/app/immutable/chunks/{CLXQSor9.js → DmmU2UYb.js} +1 -1
- package/web/app/immutable/chunks/{BMejr7u6.js → DqVocOV1.js} +1 -1
- package/web/app/immutable/chunks/{C12O35p-.js → DsMWDyON.js} +1 -1
- package/web/app/immutable/chunks/{CHRXhmu4.js → DtyYBAfX.js} +1 -1
- package/web/app/immutable/chunks/{CfAvt2Zs.js → DuEeb8Mn.js} +1 -1
- package/web/app/immutable/chunks/{D8BXRngi.js → Dv4Vym3G.js} +1 -1
- package/web/app/immutable/chunks/{DUINlo9r.js → Dv9iFv_x.js} +1 -1
- package/web/app/immutable/chunks/{BUHPTzFz.js → G0vgahzI.js} +1 -1
- package/web/app/immutable/chunks/{Bx5_x_xs.js → M7sb2vsG.js} +1 -1
- package/web/app/immutable/chunks/{DAvgrUpQ.js → MdOlpTpG.js} +3 -3
- package/web/app/immutable/chunks/{Dq1yTcBb.js → MnHzHyX4.js} +1 -1
- package/web/app/immutable/chunks/{BiH1hXHp.js → OSt17igW.js} +1 -1
- package/web/app/immutable/chunks/{BJTRhgs4.js → OYbzRQNh.js} +1 -1
- package/web/app/immutable/chunks/{CU4LG5o2.js → PbtuJhxQ.js} +2 -2
- package/web/app/immutable/chunks/{BVY7HYcm.js → Qkw5r8H6.js} +1 -1
- package/web/app/immutable/chunks/{7qqqYD-I.js → RRXFJL92.js} +1 -1
- package/web/app/immutable/chunks/{BdvX8QCl.js → TzUDDwaI.js} +1 -1
- package/web/app/immutable/chunks/{Bb15Q1ED.js → WrCMkepk.js} +2 -2
- package/web/app/immutable/chunks/{6gbXuD_9.js → XXp2dlP1.js} +1 -1
- package/web/app/immutable/chunks/{C3PqMGoR.js → _bESm04T.js} +1 -1
- package/web/app/immutable/chunks/{BGzLfgjy.js → bNKugVDK.js} +1 -1
- package/web/app/immutable/chunks/{DOYZ_D5o.js → ch6_GOZD.js} +1 -1
- package/web/app/immutable/chunks/{DyFjB_S6.js → czWUw-OT.js} +1 -1
- package/web/app/immutable/chunks/{D9lcY5kd.js → dYI-d1qe.js} +1 -1
- package/web/app/immutable/chunks/{Dpt3eqkJ.js → grZaDfdl.js} +1 -1
- package/web/app/immutable/chunks/{CMtZLqiA.js → vXXIq-lQ.js} +1 -1
- package/web/app/immutable/entry/{app.BdS7izm7.js → app.O58wkIN2.js} +2 -2
- package/web/app/immutable/entry/start.Qg9AYZsG.js +1 -0
- package/web/app/immutable/nodes/{0.BISzmlhW.js → 0.TrE3RPnJ.js} +1 -1
- package/web/app/immutable/nodes/{1.Bb1ZAxDG.js → 1.BIksphyt.js} +1 -1
- package/web/app/immutable/nodes/{10.BgrCgg4r.js → 10.D2OvSkOf.js} +1 -1
- package/web/app/immutable/nodes/{11.BY0d-QhF.js → 11.fZEErUb-.js} +1 -1
- package/web/app/immutable/nodes/{15.DYwYAZ5-.js → 15.m6bg6xQe.js} +1 -1
- package/web/app/immutable/nodes/{19.Dlni-a6M.js → 19.CjtjBk01.js} +2 -2
- package/web/app/immutable/nodes/{2.CG_3VZwe.js → 2.DxHlcx2L.js} +1 -1
- package/web/app/immutable/nodes/{3.Dc7zxR5A.js → 3.BDHxIm-0.js} +1 -1
- package/web/app/immutable/nodes/{4.BK4Q0Tjj.js → 4.BNQKhByt.js} +1 -1
- package/web/app/immutable/nodes/{5.uyWg8rJg.js → 5.gaULhB1l.js} +1 -1
- package/web/app/immutable/nodes/{6.CqIhg880.js → 6.ZtFGqTn7.js} +1 -1
- package/web/app/immutable/nodes/{7.DNnSBe4i.js → 7.CTMwqxha.js} +1 -1
- package/web/app/immutable/nodes/{8.BGV6mK09.js → 8.DgeODsFV.js} +1 -1
- package/web/app/immutable/nodes/{9.BKtZcPwn.js → 9.BPdyHPQC.js} +2 -2
- package/web/app/version.json +1 -1
- package/web/index.html +9 -9
- package/web/app/immutable/entry/start.CnycbH9m.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{p as I}from"./
|
|
1
|
+
import{p as I}from"./TzUDDwaI.js";import{aZ as _,U as E,Y as F,b0 as D,V as P,a_ as z,b as c,aX as G,r as B,q as w,W as C,O as W,ay as b,a6 as V,B as H}from"./Cdwy3-nO.js";import{p as U}from"./BBfR26V0.js";var m={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"},y=32,A={axes:[],curves:[],options:m},x=structuredClone(A),X=W.radar,j=c(()=>w({...X,...C().radar}),"getConfig"),M=c(()=>x.axes,"getAxes"),Y=c(()=>x.curves,"getCurves"),Z=c(()=>x.options,"getOptions"),q=c(a=>{x.axes=a.map(t=>({name:t.name,label:t.label??t.name}))},"setAxes"),K=c(a=>{x.curves=a.map(t=>({name:t.name,label:t.label??t.name,entries:N(t.entries)}))},"setCurves"),N=c(a=>{if(a[0].axis==null)return a.map(e=>e.value);const t=M();if(t.length===0)throw new Error("Axes must be populated before curves for reference entries");return t.map(e=>{const r=a.find(s=>s.axis?.$refText===e.name);if(r===void 0)throw new Error("Missing entry for axis "+e.label);return r.value})},"computeCurveEntries"),J=c(a=>{const t=a.reduce((e,r)=>(e[r.name]=r,e),{});x.options={showLegend:t.showLegend?.value??m.showLegend,ticks:t.ticks?.value??m.ticks,max:t.max?.value??m.max,min:t.min?.value??m.min,graticule:t.graticule?.value??m.graticule},x.options.ticks>y&&(b.warn(`Radar diagram ticks (${x.options.ticks}) exceeds maximum allowed (${y}). Using ${y} instead.`),x.options.ticks=y)},"setOptions"),Q=c(()=>{B(),x=structuredClone(A)},"clear"),$={getAxes:M,getCurves:Y,getOptions:Z,setAxes:q,setCurves:K,setOptions:J,getConfig:j,clear:Q,setAccTitle:z,getAccTitle:P,setDiagramTitle:D,getDiagramTitle:F,getAccDescription:E,setAccDescription:_},tt=c(a=>{I(a,$);const{axes:t,curves:e,options:r}=a;$.setAxes(t),$.setCurves(e),$.setOptions(r)},"populate"),et={parse:c(async a=>{const t=await U("radar",a);b.debug(t),tt(t)},"parse")},at=c((a,t,e,r)=>{const s=r.db,i=s.getAxes(),l=s.getCurves(),n=s.getOptions(),o=s.getConfig(),d=s.getDiagramTitle(),p=G(t),u=rt(p,o),g=n.max??Math.max(...l.map(f=>Math.max(...f.entries))),h=n.min,v=Math.min(o.width,o.height)/2;st(u,i,v,n.ticks,n.graticule),nt(u,i,v,o),L(u,i,l,h,g,n.graticule,o),k(u,l,n.showLegend,o),u.append("text").attr("class","radarTitle").text(d).attr("x",0).attr("y",-o.height/2-o.marginTop)},"draw"),rt=c((a,t)=>{const e=t.width+t.marginLeft+t.marginRight,r=t.height+t.marginTop+t.marginBottom,s={x:t.marginLeft+t.width/2,y:t.marginTop+t.height/2};return H(a,r,e,t.useMaxWidth??!0),a.attr("viewBox",`0 0 ${e} ${r}`).attr("overflow","visible"),a.append("g").attr("transform",`translate(${s.x}, ${s.y})`)},"drawFrame"),st=c((a,t,e,r,s)=>{if(s==="circle")for(let i=0;i<r;i++){const l=e*(i+1)/r;a.append("circle").attr("r",l).attr("class","radarGraticule")}else if(s==="polygon"){const i=t.length;for(let l=0;l<r;l++){const n=e*(l+1)/r,o=t.map((d,p)=>{const u=2*p*Math.PI/i-Math.PI/2,g=n*Math.cos(u),h=n*Math.sin(u);return`${g},${h}`}).join(" ");a.append("polygon").attr("points",o).attr("class","radarGraticule")}}},"drawGraticule"),nt=c((a,t,e,r)=>{const s=t.length;for(let i=0;i<s;i++){const l=t[i].label,n=2*i*Math.PI/s-Math.PI/2,o=Math.cos(n),d=Math.sin(n);a.append("line").attr("x1",0).attr("y1",0).attr("x2",e*r.axisScaleFactor*o).attr("y2",e*r.axisScaleFactor*d).attr("class","radarAxisLine");const p=o>.01?"start":o<-.01?"end":"middle",u=d>.01?"hanging":d<-.01?"auto":"central",g=4;a.append("text").text(l).attr("x",e*r.axisLabelFactor*o+g*o).attr("y",e*r.axisLabelFactor*d+g*d).attr("text-anchor",p).attr("dominant-baseline",u).attr("class","radarAxisLabel")}},"drawAxes");function L(a,t,e,r,s,i,l){const n=t.length,o=Math.min(l.width,l.height)/2;e.forEach((d,p)=>{if(d.entries.length!==n)return;const u=d.entries.map((g,h)=>{const v=2*Math.PI*h/n-Math.PI/2,f=T(g,r,s,o),O=f*Math.cos(v),R=f*Math.sin(v);return{x:O,y:R}});i==="circle"?a.append("path").attr("d",S(u,l.curveTension)).attr("class",`radarCurve-${p}`):i==="polygon"&&a.append("polygon").attr("points",u.map(g=>`${g.x},${g.y}`).join(" ")).attr("class",`radarCurve-${p}`)})}c(L,"drawCurves");function T(a,t,e,r){const s=Math.min(Math.max(a,t),e);return r*(s-t)/(e-t)}c(T,"relativeRadius");function S(a,t){const e=a.length;let r=`M${a[0].x},${a[0].y}`;for(let s=0;s<e;s++){const i=a[(s-1+e)%e],l=a[s],n=a[(s+1)%e],o=a[(s+2)%e],d={x:l.x+(n.x-i.x)*t,y:l.y+(n.y-i.y)*t},p={x:n.x-(o.x-l.x)*t,y:n.y-(o.y-l.y)*t};r+=` C${d.x},${d.y} ${p.x},${p.y} ${n.x},${n.y}`}return`${r} Z`}c(S,"closedRoundCurve");function k(a,t,e,r){if(!e)return;const s=(r.width/2+r.marginRight)*3/4,i=-(r.height/2+r.marginTop)*3/4,l=20;t.forEach((n,o)=>{const d=a.append("g").attr("transform",`translate(${s}, ${i+o*l})`);d.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${o}`),d.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(n.label)})}c(k,"drawLegend");var ot={draw:at},it=c((a,t)=>{let e="";for(let r=0;r<a.THEME_COLOR_LIMIT;r++){const s=a[`cScale${r}`];e+=`
|
|
2
2
|
.radarCurve-${r} {
|
|
3
3
|
color: ${s};
|
|
4
4
|
fill: ${s};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{p as re}from"./
|
|
1
|
+
import{p as re}from"./TzUDDwaI.js";import{Y as oe,b0 as se,aZ as de,U as le,V as ce,a_ as me,b as o,ay as g,X as R,aW as ue,b4 as xe,r as fe,q as ge,W as B,O as he,aV as P,bi as S,m as pe}from"./Cdwy3-nO.js";import{p as be,i as ve}from"./BBfR26V0.js";var D="position frame",N="frame positioned",k="position relation",T="relation positioned",we=o(function(e){g.debug("options str",e)},"setOptions"),ye=o(function(){return{}},"getOptions"),Pe=o(function(){C(),fe()},"clear");function C(){w={}}o(C,"reset");var Se=he.eventmodeling,ke=o(()=>ge({...Se,...B().eventmodeling}),"getConfig"),w={};function O(){let e=Fe;const{ast:n}=w,t=E();if(!n)throw new Error("No data for EventModel");return n.frames.forEach((i,a)=>{const r=L(i,n.dataEntities,t);e=v(e,{$kind:D,index:a,frame:i,textProps:r});let d;K(i)?(g.debug("source frame",i.sourceFrames),d=n.frames.filter(l=>i.sourceFrames.some(c=>c.$refText===l.name)),d.forEach(l=>{e=v(e,{$kind:k,index:a,frame:i,sourceFrame:l})})):e=v(e,{$kind:k,index:a,frame:i})}),e={...e,sortedSwimlanesArray:A(e.swimlanes)},e}o(O,"getState");function W(e){w.ast=void 0;const n=new Set;for(const t of e.frames){if(n.has(t.name)){const i=t.$cstNode?.range.start.line,a=i===void 0?"":` on line ${i+1}`;throw new Error(`Duplicate event modeling frame ID "${t.name}"${a}`)}n.add(t.name)}w.ast=e}o(W,"setAst");var s={swimlaneMinHeight:70,swimlanePadding:15,swimlaneGap:10,boxPadding:10,boxOverlap:90,boxDefaultY:0,boxMinWidth:80,boxMaxWidth:450,boxMinHeight:80,boxMaxHeight:750,contentStartX:250,textMaxWidth:430,boxTextFontWeight:"bold",boxTextPadding:10,swimlaneTextFontWeight:"bold",labelUiAutomation:"UI/Automation",labelUiAutomationPrefix:"UI/A: ",labelCommandReadModel:"Command/Read Model",labelCommandReadModelPrefix:"C/RM: ",labelEvents:"Events",labelEventsPrefix:"Stream: "};function E(){return s}o(E,"getDiagramProps");var Fe={boxes:[],swimlanes:{},relations:[],maxR:0,sortedSwimlanesArray:[]};function I(e){const n=e.split(".");if(n.length===2)return n[0]}o(I,"extractNamespace");function H(e){const n=e.split(".");return n.length===2?n[1]:e}o(H,"extractName");function U(e,n){if(!(!n||n.length===0))return Object.values(e).find(t=>t.namespace===n)}o(U,"findSwimlaneByNamespace");function b(e,n,t){return Math.max(n,...Object.keys(e).filter(i=>{const a=Number.parseInt(i);return a>n&&a<t}).map(i=>Number.parseInt(i)))+1}o(b,"findNextAvailableIndex");function _(e,n){const t=I(e.entityIdentifier),i=U(n,t);switch(e.modelEntityType){case"ui":case"pcr":case"processor":return i?{index:i.index,label:i.namespace||s.labelUiAutomation}:t?{index:b(n,0,100),label:s.labelUiAutomationPrefix+t}:{index:0,label:s.labelUiAutomation};case"rmo":case"readmodel":case"cmd":case"command":return i?{index:i.index,label:i.namespace||s.labelCommandReadModel}:t?{index:b(n,100,200),label:s.labelCommandReadModelPrefix+t}:{index:100,label:s.labelCommandReadModel};case"evt":case"event":default:return i?{index:i.index,label:i.namespace||s.labelEvents}:t?{index:b(n,200,300),label:s.labelEventsPrefix+t}:{index:200,label:s.labelEvents}}}o(_,"calculateSwimlaneProps");function V(e){const{themeVariables:n}=B();switch(e.modelEntityType){case"ui":return{fill:n.emUiFill??"white",stroke:n.emUiStroke??"#dbdada"};case"pcr":case"processor":return{fill:n.emProcessorFill??"#edb3f6",stroke:n.emProcessorStroke??"#b88cbf"};case"rmo":case"readmodel":return{fill:n.emReadModelFill??"#d3f1a2",stroke:n.emReadModelStroke??"#a3b732"};case"cmd":case"command":return{fill:n.emCommandFill??"#bcd6fe",stroke:n.emCommandStroke??"#679ac3"};case"evt":case"event":return{fill:n.emEventFill??"#ffb778",stroke:n.emEventStroke??"#c19a0f"};default:return{fill:"red",stroke:"black"}}}o(V,"calculateEntityVisualProps");function L(e,n,t){const i=B(),a=P(H(e.entityIdentifier)??"",i);let r;const d={fontSize:16,fontWeight:700,fontFamily:'"trebuchet ms", verdana, arial, sans-serif',joinWith:"<br/>"};let c=`<b>${S(a,t.textMaxWidth,d)}</b>`;if(e.dataInlineValue&&(r=e.dataInlineValue,r=r.substring(r.indexOf("{")+1),r=r.substring(0,r.lastIndexOf("}")-1),r=P(r,i),r=S(r,t.textMaxWidth,d),r=r.replaceAll(" "," ")),e.dataReference){const p=n.find(y=>y.name===e.dataReference?.$refText);p&&(r=p.dataBlockValue,r=r.substring(r.indexOf(`{
|
|
2
2
|
`)+2),r=r.substring(0,r.lastIndexOf("}")-1),r=P(r,i),r=S(r,t.textMaxWidth,d),r=r.replaceAll(" "," "),r+="<br/>")}const m=r!==void 0;m&&(c+=`<br/><br/><code style="text-align: left; display: block;max-width:${t.textMaxWidth}px">${r}</code>`);const x={fontSize:d.fontSize,fontWeight:d.fontWeight,fontFamily:d.fontFamily},u=pe(c,x),h=m?u.width/3:u.width,f={content:c,width:h,height:u.height};return g.debug(`[${e.name}] ${e.entityIdentifier} text`,f),f}o(L,"calculateTextProps");function G(e,n){const t=n,i=V(t.frame),a={width:t.textProps.width+2*s.boxTextPadding,height:t.textProps.height+2*s.boxTextPadding};return[{$kind:N,frame:t.frame,index:t.index,visual:i,dimension:a,textProps:t.textProps}]}o(G,"decidePositionFrame");function X(e,n,t){return n===void 0?s.contentStartX:n.index===e.index&&e.r?e.r+s.boxPadding:t===void 0?s.contentStartX:t.r-s.boxOverlap+s.boxPadding}o(X,"calculateX");function Y(e,n){const t=[...e.map(i=>i.r),n];return Math.max(...t)}o(Y,"calculateMaxRight");function A(e){return Object.values(e).sort((n,t)=>n.index-t.index)}o(A,"sortedSwimlanesArray");function j(e,n){const t=n,i=_(t.frame,e.swimlanes);let a;i.index in e.swimlanes?a=e.swimlanes[i.index]:a={index:i.index,label:i.label,r:0,y:i.index*s.swimlaneMinHeight+s.swimlaneGap,height:s.swimlaneMinHeight,maxHeight:s.swimlaneMinHeight};const r=e.boxes.length>0?e.boxes[e.boxes.length-1]:void 0,d=e.previousSwimlaneNumber!==void 0?e.swimlanes[e.previousSwimlaneNumber]:void 0,l={width:Math.max(s.boxMinWidth,Math.min(s.boxMaxWidth,t.dimension.width))+2*s.boxPadding,height:Math.max(s.boxMinHeight,Math.min(s.boxMaxHeight,t.dimension.height))+2*s.boxPadding},c=X(a,d,r),m=c+l.width+s.boxPadding,x=Y(Object.values(e.swimlanes),m);a.r=c+l.width,a.maxHeight=Math.max(a.maxHeight,l.height),a.height=Math.max(s.swimlaneMinHeight,a.maxHeight)+2*s.swimlanePadding;const u={x:c,y:s.swimlanePadding+a.y,r:m,dimension:l,leftSibling:!1,swimlane:a,visual:t.visual,text:t.textProps.content,frame:t.frame,index:t.index},h={...e,boxes:[...e.boxes,u],swimlanes:{...e.swimlanes,[`${a.index}`]:a},previousSwimlaneNumber:i.index,previousFrame:t.frame,maxR:x},f=A(h.swimlanes);f.length>0&&(f[0].y=0);for(let p=1;p<f.length;p++){const y=f[p],$=f[p-1];y.y=$.y+$.height+s.swimlaneGap}return h}o(j,"evolveFramePositioned");function z(e,n){return e===0&&n.sourceFrames.length===0}o(z,"isFirstFrame");function K(e){return e.sourceFrames!==void 0&&e.sourceFrames!==null&&e.sourceFrames.length>0}o(K,"hasSourceFrame");function F(e,n){if(n!=null)return e.find(t=>t.frame.name===n.name)}o(F,"findBoxByFrame");function q(e,n,t){if(!(t<0))for(let i=t;i>=0;i--){const a=e[i];if(a.swimlane.index!==n)return a}}o(q,"findBoxByLineIndex");function Z(e,n){const t=n;if(z(t.index,t.frame))return[];const i=F(e.boxes,t.frame);if(i===void 0)throw new Error(`Target box not found for frame ${t.frame.name}`);let a;if(t.sourceFrame)a=F(e.boxes,t.sourceFrame);else{if(ve(t.frame))return[];a=q(e.boxes,i.swimlane.index,t.index-1)}return a===void 0?[]:[{$kind:T,frame:t.frame,index:t.index,sourceBox:a,targetBox:i}]}o(Z,"decidePositionRelation");function J(e,n){const t=n,i={visual:{fill:"none",stroke:"#000"},source:{x:t.sourceBox.x,y:t.sourceBox.y},target:{x:t.targetBox.x,y:t.targetBox.y},sourceBox:t.sourceBox,targetBox:t.targetBox};return{...e,relations:[...e.relations,i]}}o(J,"evolveRelationPositioned");var Me={[D]:G,[k]:Z},Be={[N]:j,[T]:J};function Q(e,n){const t=Me[n.$kind];if(t==null)return[];const i=t(e,n);return g.debug("decided events",i),i}o(Q,"decide");function ee(e,n){const t=n.reduce((i,a)=>{const r=Be[a.$kind];return r==null?i:r(i,a)},e);return g.debug("evolve events",{state:e,newState:t,events:n}),t}o(ee,"evolve");function v(e,n){const t=Q(e,n);return ee(e,t)}o(v,"dispatch");var M={getConfig:ke,preserveCommentsWhenParsing:!0,setOptions:we,getOptions:ye,clear:Pe,setAccTitle:me,getAccTitle:ce,getAccDescription:le,setAccDescription:de,setDiagramTitle:se,getDiagramTitle:oe,setAst:W,getDiagramProps:E,getState:O},Ee={parse:o(async e=>{const n=await be("eventmodeling",e);g.debug(n),M.setAst(n),re(n,M)},"parse")},Ae=R(),$e=Ae?.eventmodeling;function te(e,n){return t=>{const i=t.swimlane.y+n.swimlanePadding,a=e.append("g").attr("class","em-box");a.append("rect").attr("x",t.x).attr("y",i).attr("rx","3").attr("width",t.dimension.width).attr("height",t.dimension.height).attr("stroke",t.visual.stroke).attr("fill",t.visual.fill),a.append("foreignObject").attr("x",t.x+n.boxPadding).attr("y",i+10).attr("width",t.dimension.width-2*n.boxPadding).attr("height",t.dimension.height-2*n.boxPadding).append("xhtml:div").style("display","table").style("height","100%").style("width","100%").append("span").style("display","table-cell").style("text-align","center").style("vertical-align","middle").html(t.text)}}o(te,"renderD3Box");function ne(e,n){return e>n}o(ne,"dirUpwards");function ie(e,n,t,i){return a=>{const r=a.sourceBox.swimlane.y+n.swimlanePadding,d=a.targetBox.swimlane.y+n.swimlanePadding,l=ne(r,d),c=a.sourceBox.x+a.sourceBox.dimension.width*2/3,m=a.targetBox.x+a.targetBox.dimension.width/3;let x,u;g.debug(`rendering relation up=${l} for `,{sourceBox:a.sourceBox,targetBox:a.targetBox}),l?(x=r,u=d+a.targetBox.dimension.height):(x=r+a.sourceBox.dimension.height,u=d);const h=i.emRelationStroke??a.visual.stroke;e.append("path").attr("class","em-relation").attr("fill",a.visual.fill).attr("stroke",h).attr("stroke-width","1").attr("marker-end",`url(#${t})`).attr("d",`M${c} ${x} L${m} ${u}`)}}o(ie,"renderD3Relation");function ae(e,n,t,i){return a=>{const r=e.append("g").attr("class","em-swimlane"),d=i.emSwimlaneBackgroundOdd??"rgb(250,250,250)",l=i.emSwimlaneBackgroundStroke??"rgb(240,240,240)";r.append("rect").attr("x",0).attr("y",a.y).attr("rx","3").attr("width",n+t.swimlanePadding).attr("height",a.height).attr("fill",d).attr("stroke",l),r.append("text").attr("font-weight",t.swimlaneTextFontWeight).attr("x",30).attr("y",a.y+30).text(a.label)}}o(ae,"renderD3Swimlane");var Re=o(function(e,n,t,i){if(g.debug("in eventmodeling renderer",e+`
|
|
3
3
|
`,"id:",n,t),!$e)throw new Error("EventModeling config not found");const a=i.db,{themeVariables:r,eventmodeling:d}=R(),l=ue(`[id="${n}"]`),c=a.getDiagramProps(),m=a.getState(),x=`em-arrowhead-${n}`,u=r.emArrowhead??"#000000";m.sortedSwimlanesArray.forEach(ae(l,m.maxR,c,r)),m.boxes.forEach(te(l,c)),m.relations.forEach(ie(l,c,x,r)),l.append("defs").append("marker").attr("id",x).attr("markerWidth","10").attr("markerHeight","7").attr("refX","10").attr("refY","3.5").attr("orient","auto").append("polygon").attr("points","0 0, 10 3.5, 0 7").attr("fill",u),xe(void 0,l,d?.padding??30,d?.useMaxWidth)},"draw"),De={draw:Re},Ne=o(e=>"","getStyles"),Te=Ne,Ie={parser:Ee,db:M,renderer:De,styles:Te};export{Ie as diagram};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var Cr=Object.defineProperty;var xr=(e,t,n)=>t in e?Cr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var b=(e,t,n)=>xr(e,typeof t!="symbol"?t+"":t,n);import{t as oo,bo as M,bw as ro,b as so,bs as di,bq as Lr,bm as $e}from"./Fcr7AvC-.js";import{bs as ao,a5 as Me,ay as ui,bS as Xe,aD as C,bA as ke,b_ as Ie,bO as it,W as de,bl as Xt,be as Dn,bn as lo,c9 as oe,aA as I,b$ as uo,aB as ge,ai as wr,bV as Te,br as kr,ca as je,bH as Q,c5 as dt,bk as Er,bj as Rr,aj as Ar,c0 as ci}from"./3SdAC2_C.js";import{i as we}from"./BhYXv0ZM.js";import{f as hi,g as mn,s as fi}from"./BRCr02in.js";import{b as Hr}from"./goTpbPhD.js";import{b as pi}from"./Dn334wJv.js";import{h as Dr,c as rt,J as co,Y as B,Z as Zt,a as ho,k as fo,_ as Je,H as po,j as go,aW as Tr,ak as mo,U as Mr,f as Ir,e as vo,T as Fr,g as Nr,S as Pr,ad as Qe,ac as Ve,C as zr,G as bo,F as Ur,I as _r,N as mt,ar as Or,a8 as Ht,am as Dt,x as K,w as Ue,ax as wt,ay as So,D as Br,d as Vr,aj as yo,aa as ct,l as Tn,b as gi,B as mi,z as vi,aU as Wr,aA as ft,al as Gr,V as Le,X as Ut,W as $r,a9 as Tt,E as jr,i as qr,av as Co,af as Kr,ab as bi,y as xo,ap as kt,ae as Et,an as ot,aq as Lo,O as vn,ao as Si,ai as bn,n as Xr,aS as yi}from"./
|
|
1
|
+
var Cr=Object.defineProperty;var xr=(e,t,n)=>t in e?Cr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var b=(e,t,n)=>xr(e,typeof t!="symbol"?t+"":t,n);import{t as oo,bo as M,bw as ro,b as so,bs as di,bq as Lr,bm as $e}from"./Fcr7AvC-.js";import{bs as ao,a5 as Me,ay as ui,bS as Xe,aD as C,bA as ke,b_ as Ie,bO as it,W as de,bl as Xt,be as Dn,bn as lo,c9 as oe,aA as I,b$ as uo,aB as ge,ai as wr,bV as Te,br as kr,ca as je,bH as Q,c5 as dt,bk as Er,bj as Rr,aj as Ar,c0 as ci}from"./3SdAC2_C.js";import{i as we}from"./BhYXv0ZM.js";import{f as hi,g as mn,s as fi}from"./BRCr02in.js";import{b as Hr}from"./goTpbPhD.js";import{b as pi}from"./Dn334wJv.js";import{h as Dr,c as rt,J as co,Y as B,Z as Zt,a as ho,k as fo,_ as Je,H as po,j as go,aW as Tr,ak as mo,U as Mr,f as Ir,e as vo,T as Fr,g as Nr,S as Pr,ad as Qe,ac as Ve,C as zr,G as bo,F as Ur,I as _r,N as mt,ar as Or,a8 as Ht,am as Dt,x as K,w as Ue,ax as wt,ay as So,D as Br,d as Vr,aj as yo,aa as ct,l as Tn,b as gi,B as mi,z as vi,aU as Wr,aA as ft,al as Gr,V as Le,X as Ut,W as $r,a9 as Tt,E as jr,i as qr,av as Co,af as Kr,ab as bi,y as xo,ap as kt,ae as Et,an as ot,aq as Lo,O as vn,ao as Si,ai as bn,n as Xr,aS as yi}from"./Dm529rkq.js";import{h as Ye}from"./DEB8jcix.js";import{g as Yr,i as Jr}from"./CA6H1-bp.js";import{F as Sn,c9 as Qr,bi as Zr,ax as es,aw as ts}from"./ChHRVjww.js";import{f as Mn}from"./D-lOH49i.js";import"./pYdPYEfN.js";import{g as ns}from"./BwweojP5.js";import{c as is}from"./DRMe5Ypb.js";import{P as os}from"./CFflosJs.js";import{l as Ci}from"./C7b3vXLD.js";class rs extends Dr{constructor(){super(...arguments),this.tokenize=as}equals(t,n,i){return i.ignoreWhitespace?((!i.newlineIsToken||!t.includes(`
|
|
2
2
|
`))&&(t=t.trim()),(!i.newlineIsToken||!n.includes(`
|
|
3
3
|
`))&&(n=n.trim())):i.ignoreNewlineAtEof&&!i.newlineIsToken&&(t.endsWith(`
|
|
4
4
|
`)&&(t=t.slice(0,-1)),n.endsWith(`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as l,r as m,d as a}from"./
|
|
1
|
+
import{g as l,r as m,d as a}from"./BOOf6vKl.js";import{p}from"./TzUDDwaI.js";import{b as t,ay as o}from"./Cdwy3-nO.js";import{M as u,b as c}from"./BBfR26V0.js";var f=c().RailroadPeg.parser.LangiumParser,i=t(e=>{const r=e.alternatives.map(d);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformOrderedChoice"),d=t(e=>{const r=e.elements.map(P);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformSequence"),P=t(e=>{const r=g(e.suffix);return e.operator?{type:"special",text:e.operator==="&"?`&${s(r)}`:`!${s(r)}`}:r},"transformPrefix"),s=t(e=>{switch(e.type){case"terminal":return`"${e.value}"`;case"nonterminal":return e.name;case"special":return e.text;default:return"(...)"}},"nodeToLabel"),g=t(e=>{const r=y(e.primary);if(!e.operator)return r;switch(e.operator){case"?":return{type:"optional",element:r};case"*":return{type:"repetition",element:r,min:0,max:1/0};case"+":return{type:"repetition",element:r,min:1,max:1/0};default:throw new Error(`Unsupported PEG suffix operator: ${e.operator}`)}},"transformSuffix"),y=t(e=>{switch(e.$type){case"PegLiteral":return{type:"terminal",value:e.value};case"PegIdentifier":return{type:"nonterminal",name:e.name};case"PegGroup":return i(e.element);case"PegAny":return{type:"special",text:e.dot};default:throw new Error(`Unsupported PEG primary node: ${e.$type}`)}},"transformPrimary"),v=t(e=>({name:e.name,definition:i(e.definition)}),"transformRule"),h=t(e=>{p(e,a),e.title&&a.setTitle(e.title),e.rules.map(r=>a.addRule(v(r)))},"populateDb"),b={parse:t(e=>{a.clear(),o.debug("[PEG Parser] Starting Langium parse");const r=f.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new u(r);const n=r.value;o.debug("[PEG Parser] Parsed rules:",n.rules.length),h(n),o.debug("[PEG Parser] Parse complete")},"parse"),parser:{yy:a}},$={parser:b,db:a,renderer:m,styles:l};export{$ as diagram};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/CP-NTf2-.js","/app/immutable/chunks/qB07BmZl.js","/app/immutable/chunks/Bqd7fdCF.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/Fcr7AvC-.js","/app/immutable/chunks/3SdAC2_C.js","/app/immutable/chunks/BhYXv0ZM.js","/app/immutable/chunks/BRCr02in.js","/app/immutable/chunks/CWfjuhY2.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/D-lOH49i.js","/app/immutable/chunks/Dn334wJv.js","/app/immutable/chunks/CA6H1-bp.js","/app/immutable/chunks/pYdPYEfN.js","/app/immutable/chunks/Ccf5U4O_.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/2z64ELW5.js","/app/immutable/chunks/Cc0763mU.js","/app/immutable/chunks/C7b3vXLD.js","/app/immutable/chunks/DRMe5Ypb.js","/app/immutable/chunks/D0qhIm1r.js","/app/immutable/chunks/Dms_DO28.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/BS1zON0P.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/D9tVylVS.js","/app/immutable/chunks/ChHRVjww.js","/app/immutable/chunks/CxR-pcVt.js","/app/immutable/chunks/DU3vNstz.js","/app/immutable/chunks/XJv96NUg.js","/app/immutable/assets/notify.DylRFR3N.css","/app/immutable/chunks/
|
|
2
|
-
import{bm as b,_ as x}from"./Fcr7AvC-.js";import{m as f,JH as a,dp as P,I2 as S,zr as N,Gd as R,vV as q,r9 as W,vt as H,LM as U}from"./D0qhIm1r.js";import{f as I}from"./54ZDusyh.js";import{E as V}from"./pYdPYEfN.js";import{parseIntentLink as j}from"./
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/CP-NTf2-.js","/app/immutable/chunks/qB07BmZl.js","/app/immutable/chunks/Bqd7fdCF.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/Fcr7AvC-.js","/app/immutable/chunks/3SdAC2_C.js","/app/immutable/chunks/BhYXv0ZM.js","/app/immutable/chunks/BRCr02in.js","/app/immutable/chunks/CWfjuhY2.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/D-lOH49i.js","/app/immutable/chunks/Dn334wJv.js","/app/immutable/chunks/CA6H1-bp.js","/app/immutable/chunks/pYdPYEfN.js","/app/immutable/chunks/Ccf5U4O_.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/2z64ELW5.js","/app/immutable/chunks/Cc0763mU.js","/app/immutable/chunks/C7b3vXLD.js","/app/immutable/chunks/DRMe5Ypb.js","/app/immutable/chunks/D0qhIm1r.js","/app/immutable/chunks/Dms_DO28.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/BS1zON0P.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/D9tVylVS.js","/app/immutable/chunks/ChHRVjww.js","/app/immutable/chunks/CxR-pcVt.js","/app/immutable/chunks/DU3vNstz.js","/app/immutable/chunks/XJv96NUg.js","/app/immutable/assets/notify.DylRFR3N.css","/app/immutable/chunks/CCi081IH.js","/app/immutable/chunks/B5aYN90J.js","/app/immutable/chunks/BdWqymET.js","/app/immutable/chunks/54ZDusyh.js","/app/immutable/chunks/BBWuirRW.js","/app/immutable/chunks/DONrLvvt.js","/app/immutable/chunks/CZfU7DE3.js","/app/immutable/chunks/Cq6hdiVw.js","/app/immutable/chunks/BwweojP5.js","/app/immutable/chunks/B0Z-1lwJ.js","/app/immutable/chunks/C3ldfPpK.js","/app/immutable/chunks/DKwAaLwd.js","/app/immutable/chunks/Cohy0Z-x.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{bm as b,_ as x}from"./Fcr7AvC-.js";import{m as f,JH as a,dp as P,I2 as S,zr as N,Gd as R,vV as q,r9 as W,vt as H,LM as U}from"./D0qhIm1r.js";import{f as I}from"./54ZDusyh.js";import{E as V}from"./pYdPYEfN.js";import{parseIntentLink as j}from"./WrCMkepk.js";import{m as y}from"./qB07BmZl.js";import"./3SdAC2_C.js";import"./BRCr02in.js";import"./CWfjuhY2.js";import"./ChTqQfQN.js";import"./DRMe5Ypb.js";import{x as B,k as C,w as L}from"./CH7HNVC2.js";import{dI as D}from"./Cq6hdiVw.js";import{q as M,p as z,j as $}from"./Bo8Bzt_n.js";const p="assistant-content",G=a.createSelector(t=>{const r=M.select(t),s=z.select(t),e=$.select(t).find(i=>i.agentId===s)??r.find(i=>i.isActive)??r.find(i=>i.messageCount>0)??r[0];return P(e?.agentId??null)}),O=new Map;function J(t,r=!1){const s=O.get(t)??{explicit:0,background:0},e={explicit:s.explicit+(r?0:1),background:s.background+(r?1:0)};return O.set(t,e),r?e:{explicit:e.explicit}}function k(t,r){const s=O.get(t);return s!==void 0&&r.explicit===s.explicit&&(r.background===void 0||r.background===s.background)}async function K(t){a.dispatch(q(t)),L.select(a.state,t).restoreStatus==="pending"&&await new Promise(r=>{const s=L.withStore(a)(t).subscribe(e=>{e.restoreStatus!=="pending"&&(r(),queueMicrotask(()=>s()))})})}function _(t,r,s){const e=L.select(a.state,s);if(!e.panels[p]||Object.keys(e.panels).some(i=>i!==p)){const i=e.panels[p],d=Object.values(e.panels).flatMap(n=>n.tabs.filter(o=>o.type!=="agent"||o.workspaceId!==f)),c=d.some(n=>n.id===i?.activeTabId)?i?.activeTabId??null:d.at(-1)?.id??null;a.dispatch(W(s,{root:{type:"panel",panelId:p},panels:{[p]:{id:p,tabs:d,activeTabId:c}},focusedPanelId:e.focusedPanelId===p?p:null,hiddenTabs:C.select(a.state,s)}))}a.dispatch(H(s,t,p,void 0,!0,void 0,!1,r.background||r.preserveFocus,void 0,r.background))}async function de(t,r={}){try{return await Q(t,r)}catch(s){return y.error(b.ui_linkHandler_notFound_title(),{description:s instanceof Error?s.message:String(s)}),!0}}async function Q(t,r){const s=/^intent:\/\/local\/([^/?#]+)\/agent\/([^/?#]+)$/.exec(t),e=t.startsWith("intent://")?j(t):null,i=e?.valid&&e.type==="workspace"?[t,e.resourceId]:/^\/workspace\/([^/?#]+)\/?$/.exec(t),d=/^https?:\/\//.test(t)&&!V(t);if(!i&&!s&&!d&&!(e?.valid&&["file","message","note","task"].includes(e.type))||i&&[f,"new"].includes(i[1]))return!1;const c=M.select(a.state),n=r.agentId?P(r.agentId):r.background?c.length===1?P(c[0].agentId):null:r.layoutId??G.select(a.state);if(!n)return!0;const o=J(n,r.background);if(await K(n),!k(n,o))return!0;if(i){const u=i[1],g=await I.workspaces.get(u);return k(n,o)?g?(a.dispatch(S(g)),_({type:"workspace",title:g.title,workspaceId:u,closable:!0},r,n),!0):(y.error(b.workspace_loader_notFound_title()),!0):!0}if(s)return T(s[1],s[2],r,n,o);if(d){const{resolveBrowserLinkForOpen:u}=await x(async()=>{const{resolveBrowserLinkForOpen:v}=await import("./CP-NTf2-.js").then(w=>w.b);return{resolveBrowserLinkForOpen:v}},__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]),import.meta.url),g=await u(t);return k(n,o)&&_({type:"browser",title:new URL(t).hostname,browserUrl:g.url,browserRequestedUrl:g.requestedUrl,workspaceId:f,closable:!0},r,n),!0}if(!e?.valid)return!1;const h=e.workspaceId??f;if(e.type==="file"){const u=await I.workspaces.get(h);return k(n,o)?u?(a.dispatch(S(u)),_({type:"file",title:e.resourceId.split("/").at(-1)??e.resourceId,filePath:e.resourceId,workspaceId:h,closable:!0,data:{line:e.line,filePathIsLiteral:!0}},r,n),!0):(y.error(b.workspace_loader_notFound_title()),!0):!0}if(e.type==="message"&&e.agentId)return T(h,e.agentId,r,n,o,e.resourceId);if(e.type!=="note"&&e.type!=="task")return!1;const l=e.workspaceId??f,[m,A]=await Promise.all([a.dispatch(N(l,e.resourceId)),Promise.resolve(D.select(a.state,l)??I.workspaces.get(l)).catch(()=>null)]);if(!k(n,o))return!0;if(!m||String(m.workspaceId)!==l)return y.error(b.ui_linkHandler_notFound_title(),{description:b.ui_linkHandler_noteNotFound_error({noteId:e.resourceId,workspaceId:l})}),!0;A&&String(A.id)===l&&a.dispatch(S(A));const E=Object.entries(B.select(a.state)).some(([u,g])=>{const v=w=>w.type==="note"&&w.noteId===String(m.id)&&(w.workspaceId??u)===l;return Object.values(g.panels).some(w=>w.tabs.some(v))||C.select(a.state,u).some(v)}),F=a.state.transientUi.byWorkspaceId[l]?.noteViewModeByNoteId[String(m.id)];return!E&&(!r.background||F===void 0)&&a.dispatch(R(l,String(m.id),"editor")),_({type:"note",title:m.title,noteId:String(m.id),workspaceId:l,closable:!0},r,n),!0}async function T(t,r,s,e,i,d){const c=await I.agents.get(r,t===f?void 0:t);t===f&&c&&(t=String(c.workspaceId));const n=t===f?null:await I.workspaces.get(t);if(!k(e,i))return!0;if(!n&&t!==f||!c||String(c.workspaceId)!==t)return y.error(b.ui_linkHandler_notFound_title()),!0;if(n&&a.dispatch(S(n)),a.dispatch(U(c)),_({type:"agent",title:c.name??r,agentId:r,workspaceId:t,closable:!0},s,e),d&&!s.background){const{openMessage:o}=await x(async()=>{const{openMessage:h}=await import("./CCi081IH.js");return{openMessage:h}},__vite__mapDeps([32,33,34,35,4,5,21,22,23,24,3,8,25,15,2,13,14,7,9,16,36,37,38,39,27,17,6,12,40,19,41,42,43,44]),import.meta.url);o({workspaceId:t,agentId:r,messageId:d,contentAlreadyOpen:!0})}return!0}export{p as ASSISTANT_CONTENT_PANEL_ID,G as selectAssistantPanelLayoutId,de as showAssistantContent};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{t as oe,bo as st,bm as Q,bw as ie,bs as $t,bq as Me,b as ce}from"./Fcr7AvC-.js";import{bs as le,a5 as L,bS as C,ay as Yt,aD as t,bA as $,bl as H,b_ as k,bO as B,W as _,bn as de,c9 as y,aA as rt,aB as F,bV as Mt,br as _a,aw as Be,aj as Ne,bH as V,ai as ya,be as Ia,b$ as xa,bf as wa,aC as he,a7 as De}from"./3SdAC2_C.js";import{i as at}from"./BhYXv0ZM.js";import{I as ea,g as jt,i as Se}from"./CA6H1-bp.js";import{f as Xt,g as ne,s as gt,c as se}from"./BRCr02in.js";import{b as ba}from"./Dn334wJv.js";import{f as Ut}from"./D-lOH49i.js";import"./pYdPYEfN.js";import{A as aa,b as na,a as sa}from"./B8hXRSlI.js";import"./CWfjuhY2.js";import{ax as ra,aO as oa,az as Aa,aA as ka,aB as We,ar as ia,b as $a,w as Ta,dN as Ca,a_ as Na,aC as Sa}from"./Cq6hdiVw.js";import{R as Oa}from"./qB07BmZl.js";import{F as pe,bB as Fa,bg as Ra,aC as Ma,aW as Wa,cE as Ba}from"./ChHRVjww.js";import{H as Da}from"./DhXSKt_a.js";import{A as La}from"./DON9zoQ1.js";import{N as Ea}from"./
|
|
1
|
+
import{t as oe,bo as st,bm as Q,bw as ie,bs as $t,bq as Me,b as ce}from"./Fcr7AvC-.js";import{bs as le,a5 as L,bS as C,ay as Yt,aD as t,bA as $,bl as H,b_ as k,bO as B,W as _,bn as de,c9 as y,aA as rt,aB as F,bV as Mt,br as _a,aw as Be,aj as Ne,bH as V,ai as ya,be as Ia,b$ as xa,bf as wa,aC as he,a7 as De}from"./3SdAC2_C.js";import{i as at}from"./BhYXv0ZM.js";import{I as ea,g as jt,i as Se}from"./CA6H1-bp.js";import{f as Xt,g as ne,s as gt,c as se}from"./BRCr02in.js";import{b as ba}from"./Dn334wJv.js";import{f as Ut}from"./D-lOH49i.js";import"./pYdPYEfN.js";import{A as aa,b as na,a as sa}from"./B8hXRSlI.js";import"./CWfjuhY2.js";import{ax as ra,aO as oa,az as Aa,aA as ka,aB as We,ar as ia,b as $a,w as Ta,dN as Ca,a_ as Na,aC as Sa}from"./Cq6hdiVw.js";import{R as Oa}from"./qB07BmZl.js";import{F as pe,bB as Fa,bg as Ra,aC as Ma,aW as Wa,cE as Ba}from"./ChHRVjww.js";import{H as Da}from"./DhXSKt_a.js";import{A as La}from"./DON9zoQ1.js";import{N as Ea}from"./DYo8C3ZI.js";import{f as Pa}from"./CJtBv95U.js";import{i as St,JH as Fe,n_ as Ga,fV as za,c7 as ja,sG as Ha,v1 as Ka}from"./D0qhIm1r.js";import"./BS1zON0P.js";function qa(e){return e.type==="agent"}const Xa=180,Ya=180;var Le=F('<div class="activity-pill shrink-0 text-xs px-3 py-1.5 bg-muted/60 border border-border rounded-lg text-subtle max-w-32 truncate"><!> </div>'),Ua=F('<div class="text-ui text-subtle line-clamp-2 leading-tight px-1"> </div>'),Va=F('<div><div class="flex items-center justify-center gap-1"><!> <span class="truncate"> </span></div> <!> <!></div>'),Qa=F('<div class="text-sm text-primary-ink flex items-center justify-center gap-1"><!> <span class="truncate"> </span></div>'),Oe=F('<span class="text-xs text-subtle"> </span>'),Za=F('<span class="status-pill text-xs px-1.5 py-0.5 bg-muted/80 rounded-md text-subtle truncate max-w-[130px]"> </span>'),Ja=F('<div class="text-ui text-subtle truncate w-full px-1 leading-tight"> </div>'),tn=F('<div class="flex flex-col items-center gap-1"><div class="flex items-center justify-center gap-1.5"><!> <!></div> <!></div>'),en=F('<div class="text-sm text-subtle line-clamp-3 leading-tight"> </div>'),an=F('<div class="avatar-wrapper h-9 w-12 flex items-center justify-center bg-background rounded-full"><!></div> <span class="font-semibold text-center leading-tight line-clamp-2"> </span> <div class="status-footer mt-auto pt-2 w-full text-center"><!></div>',1),nn=F('<div class="agent-card-wrapper flex items-center gap-3 shadow"><!> <!> <!></div>');function ca(e,a){if(new.target)return oe({component:ca,...e});le(a,!0);const s=()=>$t(_t,"$attentionRequest$",o),g=()=>$t(it,"$agentSession$",o),u=()=>$t(x,"$agentIsResponding$",o),c=()=>$t(ct,"$agentIsWaitingForOtherAgents$",o),d=()=>$t(P,"$agentIsWaiting$",o),i=()=>$t(I,"$agentIsThinking$",o),[o,l]=Me();let n=st(a,"agent",7),p=st(a,"activeFile",7),R=st(a,"activeNote",7),h=st(a,"agentNames",7),v=st(a,"onclick",7),b=st(a,"onmouseenter",7),N=st(a,"onmouseleave",7);const x=ra(n().agentId),it=oa(n().agentId),E=y(()=>!n().waitingForAgentIds||n().waitingForAgentIds.length===0?[]:n().waitingForAgentIds.map(A=>h()?.get(A)||Q.agentOverview_hierarchyCard_agent_fallback()).slice(0,2)),I=Aa(n().agentId),P=ka(n().agentId),ct=We(n().agentId),_t=ia(n().agentId),Ot=y(()=>{const A={attentionKind:s()?.kind??null};return g()?na(g(),A):sa({status:n().status,isResponding:u(),isWaitingForOtherAgents:c()},{...A,isCompleted:n().status==="completed",isFailed:n().status==="failed"})});var Bt={get agent(){return n()},set agent(A){n(A),rt()},get activeFile(){return p()},set activeFile(A){p(A),rt()},get activeNote(){return R()},set activeNote(A){R(A),rt()},get agentNames(){return h()},set agentNames(A){h(A),rt()},get onclick(){return v()},set onclick(A){v(A),rt()},get onmouseenter(){return b()},set onmouseenter(A){b(A),rt()},get onmouseleave(){return N()},set onmouseleave(A){N(A),rt()},$set:ie,$on:(A,D)=>ce(a,A,D)},ht=nn(),bt=L(ht);{var Ht=A=>{var D=Le(),Tt=L(D);pe(Tt,{get icon(){return Ra},size:"xs",class:"inline"});var Rt=C(Tt);$(D),k(()=>B(Rt,` ${p()??""}`)),_(A,D)};at(bt,A=>{p()&&u()&&A(Ht)})}var Ft=C(bt,2);{let A=y(()=>d()?"border-primary-ink border-2":"");Ut(Ft,{variant:"ghost",type:"button",get class(){return`agent-card flex flex-col items-center px-2.5 py-4 bg-card border border-border
|
|
2
2
|
hover:shadow transition-all cursor-pointer ${t(A)??""}`},get style(){return`width: 180px; height: 180px; anchor-name: --agent-hierarchy-${n().agentId??""};`},get onclick(){return v()},get onmouseenter(){return b()},get onmouseleave(){return N()},children:(D,Tt)=>{var Rt=an(),Lt=Yt(Rt),me=L(Lt);aa(me,{get agentId(){return n().agentId},variant:"emphasized",get state(){return t(Ot)},get specialist(){return n().specialist}}),$(Lt);var Zt=C(Lt,2),_e=H(Zt,!0),Jt=C(Zt,2),te=L(Jt);{var ye=ft=>{var r=Va(),f=L(r),M=L(f);{let z=y(()=>s().kind==="blocker"?Ma:Wa);pe(M,{get icon(){return t(z)},size:"xs"})}var W=C(M,2),m=H(W,!0);$(f);var K=C(f,2);{var nt=z=>{var It=Ua(),ot=H(It,!0);k(()=>B(ot,s().reason)),_(z,It)};at(K,z=>{s().reason&&z(nt)})}var S=C(K,2);{var G=z=>{Oa(z,{get date(){return s().timestamp},class:"text-ui text-ghost"})};at(S,z=>{s().timestamp&&z(G)})}$(r),k(z=>{Xt(r,1,`text-sm flex flex-col items-center gap-0.5 ${s().kind==="blocker"?"text-red-500":"text-warning-ink"}`),B(m,z)},[()=>s().kind==="blocker"?Q.chat_agentCard_attentionBlocker_label():Q.chat_agentCard_attentionDiscussion_label()]),_(ft,r)},yt=ft=>{var r=Qa(),f=L(r);pe(f,{get icon(){return Fa},size:"xs",class:"animate-pulse"});var M=C(f,2),W=H(M,!0);$(r),k(m=>B(W,m),[()=>Q.agentOverview_hierarchyCard_waitingFor_label({names:t(E).join(", ")})]),_(ft,r)},Ie=ft=>{const r=y(()=>n().activeToolName?$a(n().activeToolName,n().activeToolInput||{}):null),f=y(()=>t(r)&&!t(r).hidden?t(r):null);var M=tn(),W=L(M),m=L(W);ea(m,{size:14});var K=C(m,2);{var nt=Y=>{var Z=Oe(),pt=H(Z,!0);k(Et=>B(pt,Et),[()=>Q.agentOverview_hierarchyCard_thinking_label()]),_(Y,Z)},S=Y=>{var Z=Za(),pt=H(Z);k(()=>B(pt,`${t(f).verb??""}
|
|
3
3
|
${t(f).subject??""}`)),_(Y,Z)},G=Y=>{var Z=Oe(),pt=H(Z);k(()=>B(pt,`${t(f).verb??""}...`)),_(Y,Z)},z=Y=>{var Z=Oe(),pt=H(Z,!0);k(Et=>B(pt,Et),[()=>Q.agentOverview_hierarchyCard_responding_label()]),_(Y,Z)};at(K,Y=>{i()?Y(nt):t(f)&&t(f).subject?Y(S,1):t(f)?Y(G,2):Y(z,-1)})}$(W);var It=C(W,2);{var ot=Y=>{var Z=Ja(),pt=H(Z,!0);k(()=>B(pt,n().lastResponse)),_(Y,Z)};at(It,Y=>{!t(f)&&n().lastResponse&&Y(ot)})}$(M),_(ft,M)},xe=ft=>{var r=en(),f=H(r,!0);k(()=>B(f,n().lastResponse)),_(ft,r)};at(te,ft=>{s()?ft(ye):c()?ft(yt,1):u()||i()?ft(Ie,2):n().lastResponse&&ft(xe,3)})}$(Jt),k(()=>B(_e,n().name)),_(D,Rt)},$$slots:{default:!0}})}var ge=C(Ft,2);{var Dt=A=>{var D=Le(),Tt=L(D);pe(Tt,{get icon(){return Ba},size:"xs",class:"inline"});var Rt=C(Tt);$(D),k(Lt=>B(Rt,` ${Lt??""}`),[()=>Q.agentOverview_hierarchyCard_note_label()]),_(A,D)};at(ge,A=>{R()&&u()&&A(Dt)})}$(ht),_(e,ht);var Qt=de(Bt);return l(),Qt}const sn=50;var rn=F('<span class="sr-only"> </span> <!>',1);function Re(e,a){if(new.target)return oe({component:Re,...e});le(a,!0);const s=()=>$t(R,"$attentionRequest$",c),g=()=>$t(h,"$agentSession$",c),u=()=>$t(p,"$agentIsWaitingForOtherAgents$",c),[c,d]=Me();let i=st(a,"agent",7),o=st(a,"onclick",7),l=st(a,"onmouseenter",7),n=st(a,"onmouseleave",7);const p=We(i().agentId),R=ia(i().agentId),h=oa(i().agentId),v=y(()=>{const x={attentionKind:s()?.kind??null};return g()?na(g(),x):sa({status:i().status,isResponding:i().status==="responding",isWaitingForOtherAgents:u()},{...x,isCompleted:i().status==="completed",isFailed:i().status==="failed"})});var b={get agent(){return i()},set agent(x){i(x),rt()},get onclick(){return o()},set onclick(x){o(x),rt()},get onmouseenter(){return l()},set onmouseenter(x){l(x),rt()},get onmouseleave(){return n()},set onmouseleave(x){n(x),rt()},$set:ie,$on:(x,it)=>ce(a,x,it)};Ut(e,{variant:"ghost",type:"button",class:"background-agent-card relative flex flex-col items-center justify-center gap-1 rounded-full bg-sidebar hover:bg-muted/70 transition-colors cursor-pointer p-2",get style(){return`width: 50px; min-height: 50px; anchor-name: --agent-hierarchy-${i().agentId??""};`},get onclick(){return o()},get onmouseenter(){return l()},get onmouseleave(){return n()},children:(x,it)=>{var E=rn(),I=Yt(E),P=H(I,!0),ct=C(I,2);aa(ct,{get agentId(){return i().agentId},size:32,get state(){return t(v)},get specialist(){return i().specialist}}),k(()=>B(P,i().name)),_(x,E)},$$slots:{default:!0}});var N=de(b);return d(),N}var re=he('<path fill="none"></path>'),on=F('<div class="batch-group-box relative z-10 bg-background border border-border rounded-xl"></div>'),cn=F('<svg class="connector-svg" style="overflow: visible; display: block;"><!><!></svg> <div class="children-items-row flex items-start justify-center"></div>',1),ln=F('<div class="children-wrapper flex flex-col items-center"></div>'),dn=F('<div class="agent-tree-node flex flex-col items-center"><div class="agent-card-wrapper relative z-10"><!></div> <!></div>'),gn=F('<div class="absolute inset-0 flex items-center justify-center"><div class="text-center text-subtle"><p class="text-lg font-medium"> </p> <p class="text-sm mt-1"> </p></div></div>'),un=F('<div class="utility-corral border border-dashed border-border rounded-lg p-3 min-w-20"><div class="corral-label text-xs text-subtle font-medium mb-2 text-center"> </div> <div class="corral-agents flex flex-col items-center gap-2"></div></div>'),fn=F('<div class="utility-corrals flex flex-col gap-4"></div>'),pn=F('<div class="text-xs text-subtle capitalize"> </div>'),vn=F('<span class="px-1.5 py-0.5 text-ui font-medium bg-muted text-subtle rounded"> </span>'),hn=F('<span class="text-warning-ink"> </span>'),mn=F('<span class="text-primary-ink"> </span>'),_n=F('<span class="text-green-500"> </span>'),yn=F('<span class="text-red-500"> </span>'),In=F("<span> </span>"),xn=F('<div class="text-xs text-subtle line-clamp-3 border-t border-border pt-2 mt-2"> </div>'),wn=F('<div class="text-xs text-subtle flex items-center gap-1"><!> <span> </span></div>'),bn=F('<div class="p-3 space-y-2"><div class="flex items-center gap-2"><!> <div class="flex-1 min-w-0"><div class="font-medium text-sm truncate"> </div> <!></div> <!></div> <div class="text-xs text-subtle"><!></div> <div class="text-xs text-subtle"> </div> <!> <!></div>'),An=he('<svg class="w-4 h-4" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="5" y1="12" x2="19" y2="12"></line></svg>'),kn=he('<svg class="w-4 h-4" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="12" y1="5" x2="12" y2="19"></line><line x1="5" y1="12" x2="19" y2="12"></line></svg>'),$n=he('<svg class="w-4 h-4" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7"></path></svg>'),Tn=F('<div class="canvas-content absolute inset-0 flex items-center justify-center p-8 svelte-13q5gm4"><div class="hierarchy-wrapper flex items-start gap-8"><!> <div class="main-hierarchy flex flex-col items-center gap-4"><div class="hierarchy-container flex flex-col items-center gap-4"><div class="roots-row flex justify-center"></div></div></div></div> <!></div> <div class="zoom-controls absolute bottom-4 right-4 flex items-center gap-1 bg-card border border-border rounded-lg shadow-sm p-1"><!> <!> <!> <div class="w-px h-6 bg-border mx-1"></div> <!></div> <div class="absolute bottom-4 left-4 text-xs text-subtle"> </div>',1),Cn=F('<div class="agent-hierarchy-graph relative w-full h-full overflow-hidden bg-background svelte-13q5gm4"><!></div>');function la(e,a){if(new.target)return oe({component:la,...e});le(a,!0);const s=(r,f=wa,M)=>{const W=y(()=>f().agent.isBackground),m=y(()=>f().children.length>0),K=y(()=>t(m)&&f().children[0]?.agent.isBackground?sn:Xa),nt=y(()=>16),S=y(()=>60),G=y(()=>t(m)?Rt(f().children,t(K),i):[]),z=y(()=>(()=>{const O=[];for(let q=0;q<t(G).length;q+=Tt)O.push(t(G).slice(q,q+Tt));return O})()),It=y(()=>t(z).map(O=>O.reduce((q,J)=>q+J.width,0)+Math.max(0,O.length-1)*i)),ot=y(()=>Math.max(...t(It),0));var Y=dn(),Z=L(Y),pt=L(Z);{var Et=O=>{Re(O,{get agent(){return f().agent},onclick:q=>te(f().agent,q),onmouseenter:()=>x(f().agent.agentId),onmouseleave:it})},we=O=>{ca(O,{get agent(){return f().agent},get activeFile(){return f().activeFile},get activeNote(){return f().activeNote},get agentNames(){return t(Lt)},onclick:q=>te(f().agent,q),onmouseenter:()=>x(f().agent.agentId),onmouseleave:it})};at(pt,O=>{t(W)?O(Et):O(we,-1)})}$(Z);var be=C(Z,2);{var U=O=>{const q=y(()=>f().agent.status==="waiting"?f().agent.waitingForAgentIds||[]:[]),J=y(()=>t(q).length>0),et=y(()=>t(S)/2);var xt=ln();jt(xt,21,()=>t(z),Se,(Kt,At,Ct)=>{const Pt=y(()=>t(It)[Ct]),ee=y(()=>(t(ot)-t(Pt))/2),Ae=y(()=>(()=>{let ut=0;return t(At).map(j=>{const Nt=ut+j.width/2;return ut+=j.width+i,Nt})})());var ue=cn(),Gt=Yt(ue);gt(Gt,"height",t(S));var qt=L(Gt);{var ke=ut=>{var j=re();k(()=>{gt(j,"d",`M ${t(ot)/2} -${Ya} L ${t(ot)/2} ${t(S)/3}`),gt(j,"stroke",t(J)?"var(--primary-ink)":"currentColor"),Xt(j,0,se(t(J)?"":"text-border")),gt(j,"stroke-width",t(J)?2:1)}),_(ut,j)},$e=ut=>{var j=re();k(()=>{gt(j,"d",`M ${t(ot)/2} 0 L ${t(ot)/2} ${t(S)/3}`),gt(j,"stroke",t(J)?"var(--primary-ink)":"currentColor"),Xt(j,0,se(t(J)?"":"text-border")),gt(j,"stroke-width",t(J)?2:1)}),_(ut,j)};at(qt,ut=>{Ct>0?ut(ke):ut($e,-1)})}var Te=C(qt);jt(Te,17,()=>t(At),Se,(ut,j,Nt)=>{const vt=y(()=>t(ee)+t(Ae)[Nt]),lt=y(()=>t(ot)/2),zt=y(()=>t(j).type==="batch"?t(j).children.some(wt=>t(q).includes(wt.agent.agentId)):t(q).includes(t(j).child.agent.agentId)),mt=y(()=>t(zt)?"var(--color-primary)":"currentColor"),kt=y(()=>t(zt)?"":"text-border"),w=y(()=>t(zt)?2:1),T=y(()=>t(j).type==="batch"?t(S)-A:t(S)),tt=y(()=>Math.abs(t(vt)-t(lt))),X=y(()=>Math.min(t(nt),t(tt)/2));var fe=De(),Ce=Yt(fe);{var va=wt=>{var dt=re();k(()=>{gt(dt,"d",`M ${t(lt)??""} ${t(S)/3} L ${t(lt)??""} ${t(T)??""}`),gt(dt,"stroke",t(mt)),Xt(dt,0,se(t(kt)),"svelte-13q5gm4"),gt(dt,"stroke-width",t(w))}),_(wt,dt)},ha=wt=>{var dt=re();k(()=>{gt(dt,"d",`M ${t(lt)??""} ${t(S)/3}
|
|
4
4
|
L ${t(lt)??""} ${t(et)-t(X)}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as ie}from"./
|
|
1
|
+
import{g as ie}from"./D9_9Xrbm.js";import{s as re}from"./0Lodvm7U.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"./Cdwy3-nO.js";import{c as Ee}from"./BOE0lXBq.js";import{aR as _e}from"./Db6ExzGF.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
|
-
import{b as i,aW as l,aw as d,P as o}from"./
|
|
1
|
+
import{b as i,aW as l,aw as d,P as o}from"./Cdwy3-nO.js";var x=i((r,t)=>{const e=r.append("rect");if(e.attr("x",t.x),e.attr("y",t.y),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("width",t.width),e.attr("height",t.height),t.name&&e.attr("name",t.name),t.rx&&e.attr("rx",t.rx),t.ry&&e.attr("ry",t.ry),t.attrs!==void 0)for(const s in t.attrs)e.attr(s,t.attrs[s]);return t.class&&e.attr("class",t.class),e},"drawRect"),p=i((r,t)=>{const e={x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,stroke:t.stroke,class:"rect"};x(r,e).lower()},"drawBackgroundRect"),y=i((r,t)=>{const e=t.text.replace(d," "),s=r.append("text");s.attr("x",t.x),s.attr("y",t.y),s.attr("class","legend"),s.style("text-anchor",t.anchor),t.class&&s.attr("class",t.class);const a=s.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.text(e),s},"drawText"),m=i((r,t,e,s)=>{const a=r.append("image");a.attr("x",t),a.attr("y",e);const n=o.sanitizeUrl(s);a.attr("xlink:href",n)},"drawImage"),g=i((r,t,e,s)=>{const a=r.append("use");a.attr("x",t),a.attr("y",e);const n=o.sanitizeUrl(s);a.attr("xlink:href",`#${n}`)},"drawEmbeddedImage"),h=i(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),f=i(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),w=i(()=>{let r=l(".mermaidTooltip");return r.empty()&&(r=l("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),r},"createTooltip");export{g as a,m as b,w as c,p as d,x as e,y as f,h as g,f as h};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as p,ay as C,aX as H,W as _,r as q,a6 as G,B as U,aV as j,X as K}from"./
|
|
1
|
+
import{b as p,ay as C,aX as H,W as _,r as q,a6 as G,B as U,aV as j,X as K}from"./Cdwy3-nO.js";var A="",M="",O="",D=[],b=new Map,v=p(e=>j(e,K()),"sanitizeText"),y=p(e=>{switch(e.type){case"terminal":return{...e,value:v(e.value)};case"nonterminal":return{...e,name:v(e.name)};case"sequence":return{...e,elements:e.elements.map(y)};case"choice":return{...e,alternatives:e.alternatives.map(y)};case"optional":return{...e,element:y(e.element)};case"repetition":return{...e,element:y(e.element),separator:e.separator?y(e.separator):void 0};case"special":return{...e,text:v(e.text)}}},"sanitizeAstNode"),J=p(()=>{A="",M="",O="",D.length=0,b.clear(),q(),C.debug("[Railroad] Database cleared")},"clear"),Y=p(e=>{A=v(e),C.debug("[Railroad] Title set:",e)},"setTitle"),P=p(()=>A,"getTitle"),Q=p(e=>{const i={...e,name:v(e.name),definition:y(e.definition),comment:e.comment?v(e.comment):void 0};C.debug("[Railroad] Adding rule:",i.name),b.has(i.name)&&C.warn(`[Railroad] Rule '${i.name}' is already defined. Overwriting.`),D.push(i),b.set(i.name,i)},"addRule"),Z=p(()=>D,"getRules"),V=p(e=>b.get(e),"getRule"),ee=p(e=>{M=v(e).replace(/^\s+/g,""),C.debug("[Railroad] Accessibility title set:",e)},"setAccTitle"),te=p(()=>M,"getAccTitle"),re=p(e=>{O=v(e).replace(/\n\s+/g,`
|
|
2
2
|
`),C.debug("[Railroad] Accessibility description set:",e)},"setAccDescription"),ie=p(()=>O,"getAccDescription"),ae=Y,ne=P,oe={clear:J,setTitle:Y,getTitle:P,addRule:Q,getRules:Z,getRule:V,setAccTitle:ee,getAccTitle:te,setAccDescription:re,getAccDescription:ie,setDiagramTitle:ae,getDiagramTitle:ne},f={compactMode:!1,padding:10,verticalSeparation:8,horizontalSeparation:10,arcRadius:10,fontSize:14,fontFamily:"monospace",terminalFill:"#FFFFC0",terminalStroke:"#000000",terminalTextColor:"#000000",nonTerminalFill:"#FFFFFF",nonTerminalStroke:"#000000",nonTerminalTextColor:"#000000",lineColor:"#000000",strokeWidth:2,markerFill:"#000000",commentFill:"#E8E8E8",commentStroke:"#888888",commentTextColor:"#666666",specialFill:"#F0E0FF",specialStroke:"#8800CC",ruleNameColor:"#000066",showMarkers:!0,markerRadius:5},le=/^#(?:[\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$|^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch)\([\d\s%+,./-]+\)$|^[a-z]+$/i,se=/^[\w "',.-]+$/,de=new Set(["compactMode","padding","verticalSeparation","horizontalSeparation","arcRadius","fontSize","fontFamily","terminalFill","terminalStroke","terminalTextColor","nonTerminalFill","nonTerminalStroke","nonTerminalTextColor","lineColor","strokeWidth","markerFill","commentFill","commentStroke","commentTextColor","specialFill","specialStroke","ruleNameColor","showMarkers","markerRadius"]),L=p(e=>e?Object.keys(e).every(i=>i==="railroad"||de.has(i)):!1,"isRailroadStyleOptions"),ce=p(e=>e?"railroad"in e&&e.railroad?e.railroad:L(e)?e:{}:{},"extractRailroadOverrides"),me=p(e=>{if(!e||L(e))return{};const{railroad:i,svgId:n,theme:a,look:t,...r}=e;return r},"extractThemeOverrides"),m=p((e,i)=>{if(typeof e!="string")return i;const n=e.trim();return le.test(n)?n:i},"sanitizeColorValue"),X=p((e,i)=>{if(typeof e!="string")return i;const n=e.trim();return se.test(n)?n:i},"sanitizeFontFamilyValue"),F=p((e,i)=>{const n=typeof e=="number"?e:typeof e=="string"?Number.parseFloat(e):Number.NaN;return Number.isFinite(n)&&n>=0?n:i},"sanitizeNumberValue"),he=p(e=>{const i=typeof e=="number"?e:typeof e=="string"?Number.parseFloat(e):Number.NaN;return Number.isFinite(i)&&i>0?i:void 0},"parseThemeFontSize"),pe=p(e=>{const i=X(e.fontFamily,f.fontFamily),n=he(e.fontSize)??f.fontSize;return{...f,fontFamily:i,fontSize:n,terminalFill:m(e.secondBkg??e.secondaryColor,f.terminalFill),terminalStroke:m(e.secondaryBorderColor??e.lineColor,f.terminalStroke),terminalTextColor:m(e.secondaryTextColor??e.textColor,f.terminalTextColor),nonTerminalFill:m(e.mainBkg??e.background,f.nonTerminalFill),nonTerminalStroke:m(e.primaryBorderColor??e.lineColor,f.nonTerminalStroke),nonTerminalTextColor:m(e.primaryTextColor??e.textColor,f.nonTerminalTextColor),lineColor:m(e.lineColor,f.lineColor),markerFill:m(e.lineColor,f.markerFill),commentFill:m(e.labelBackground??e.tertiaryColor,f.commentFill),commentStroke:m(e.tertiaryBorderColor??e.lineColor,f.commentStroke),commentTextColor:m(e.tertiaryTextColor??e.textColor,f.commentTextColor),specialFill:m(e.tertiaryColor??e.secondaryColor,f.specialFill),specialStroke:m(e.tertiaryBorderColor??e.secondaryBorderColor,f.specialStroke),ruleNameColor:m(e.titleColor??e.textColor,f.ruleNameColor)}},"buildThemeDefaults"),E=p(e=>{const i=_(),n={...G(),...i.themeVariables??{},...me(e)},a=pe(n),t={...i.railroad??{},...ce(e)};return{compactMode:t.compactMode??a.compactMode,padding:F(t.padding,a.padding),verticalSeparation:F(t.verticalSeparation,a.verticalSeparation),horizontalSeparation:F(t.horizontalSeparation,a.horizontalSeparation),arcRadius:F(t.arcRadius,a.arcRadius),fontSize:F(t.fontSize,a.fontSize),fontFamily:X(t.fontFamily,a.fontFamily),terminalFill:m(t.terminalFill,a.terminalFill),terminalStroke:m(t.terminalStroke,a.terminalStroke),terminalTextColor:m(t.terminalTextColor,a.terminalTextColor),nonTerminalFill:m(t.nonTerminalFill,a.nonTerminalFill),nonTerminalStroke:m(t.nonTerminalStroke,a.nonTerminalStroke),nonTerminalTextColor:m(t.nonTerminalTextColor,a.nonTerminalTextColor),lineColor:m(t.lineColor,a.lineColor),strokeWidth:F(t.strokeWidth,a.strokeWidth),markerFill:m(t.markerFill,a.markerFill),commentFill:m(t.commentFill,a.commentFill),commentStroke:m(t.commentStroke,a.commentStroke),commentTextColor:m(t.commentTextColor,a.commentTextColor),specialFill:m(t.specialFill,a.specialFill),specialStroke:m(t.specialStroke,a.specialStroke),ruleNameColor:m(t.ruleNameColor,a.ruleNameColor),showMarkers:t.showMarkers??a.showMarkers,markerRadius:F(t.markerRadius,a.markerRadius)}},"buildRailroadStyleOptions"),Te=p(e=>{const{fontFamily:i,fontSize:n,terminalFill:a,terminalStroke:t,terminalTextColor:r,nonTerminalFill:o,nonTerminalStroke:g,nonTerminalTextColor:l,lineColor:s,strokeWidth:h,markerFill:u,commentFill:c,commentStroke:w,commentTextColor:d,specialFill:T,specialStroke:z,ruleNameColor:S}=E(e);return`
|
|
3
3
|
.railroad-diagram {
|
|
4
4
|
font-family: ${i};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as Ut}from"./Bw9UsBZT.js";import{s as Kt}from"./BZcIlO-m.js";import{b as f,C as Tt,a_ as Zt,V as jt,aZ as Wt,U as qt,b0 as Ht,Y as Qt,X as tt,ay as F,z as Xt,r as Jt,$ as $t,am as te,aU as ee,ab as se,aG as ie,aT as re,p as ae,_ as ne,a1 as oe,aP as ce,aW as le,bh as he}from"./Dp6gutm7.js";var Ct=(function(){var s=f(function(G,n,l,d){for(l=l||{},d=G.length;d--;l[G[d]]=n);return l},"o"),a=[6,9,21,23,25,27,34,37,38,39,40,41,43,46,47,51,53,54,55],o=[2,2],c=[1,7],r=[1,9],u=[1,10],y=[1,11],g=[1,12],k=[1,30],C=[1,23],p=[1,24],b=[1,25],A=[1,26],v=[1,27],O=[1,19],N=[1,28],I=[1,29],x=[1,20],D=[1,18],L=[1,21],w=[1,22],Ot=[2,6],h=[6,9,21,23,25,27,33,34,37,38,39,40,41,43,46,47,51,53,54,55],dt=[1,36],pt=[1,37],ft=[1,38],bt=[1,39],gt=[1,40],Z=[6,9,12,14,16,19,20,21,23,25,27,33,34,37,38,39,40,41,43,46,47,50,51,53,54,55,69,70,71,72,73],V=[1,46],M=[1,47],j=[1,57],W=[43,51,53,54,55,74,75],q=[1,70],H=[1,68],B=[1,65],Q=[1,69],X=[1,71],et=[6,9,12,16,21,23,25,27,33,34,37,38,39,40,41,43,44,45,46,47,51,52,53,54,55,69,70,71,72,73],st=[1,78],it=[1,77],rt=[1,76],Nt=[69,70,71,72,73],xt=[1,91],At=[6,9,45,50],z=[6,9,12,44,45,50,51,52],at=[1,101],nt=[1,100],ot=[1,99],J=[18,61],It=[1,110],Rt=[1,109],vt=[20,43,51,53,54,55],yt=[18,61,64,66],_t={trace:f(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,statement:8,NEWLINE:9,entityName:10,relSpec:11,COLON:12,role:13,STYLE_SEPARATOR:14,idList:15,BLOCK_START:16,attributes:17,BLOCK_STOP:18,SQS:19,SQE:20,title:21,title_value:22,acc_title:23,acc_title_value:24,acc_descr:25,acc_descr_value:26,acc_descr_multiline_value:27,direction:28,classDefStatement:29,classStatement:30,styleStatement:31,subgraphHeader:32,END:33,SUBGRAPH:34,separator:35,subgraphTitle:36,direction_tb:37,direction_bt:38,direction_rl:39,direction_lr:40,CLASSDEF:41,stylesOpt:42,UNICODE_TEXT:43,STYLE_TEXT:44,COMMA:45,CLASS:46,STYLE:47,style:48,styleComponent:49,SEMI:50,NUM:51,BRKT:52,ENTITY_NAME:53,DECIMAL_NUM:54,ENTITY_ONE:55,attribute:56,attributeType:57,attributeName:58,attributeKeyTypeList:59,attributeComment:60,ATTRIBUTE_WORD:61,"?":62,attributeKeyType:63,",":64,ATTRIBUTE_KEY:65,COMMENT:66,cardinality:67,relType:68,ZERO_OR_ONE:69,ZERO_OR_MORE:70,ONE_OR_MORE:71,ONLY_ONE:72,MD_PARENT:73,NON_IDENTIFYING:74,IDENTIFYING:75,WORD:76,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",9:"NEWLINE",12:"COLON",14:"STYLE_SEPARATOR",16:"BLOCK_START",18:"BLOCK_STOP",19:"SQS",20:"SQE",21:"title",22:"title_value",23:"acc_title",24:"acc_title_value",25:"acc_descr",26:"acc_descr_value",27:"acc_descr_multiline_value",33:"END",34:"SUBGRAPH",37:"direction_tb",38:"direction_bt",39:"direction_rl",40:"direction_lr",41:"CLASSDEF",43:"UNICODE_TEXT",44:"STYLE_TEXT",45:"COMMA",46:"CLASS",47:"STYLE",50:"SEMI",51:"NUM",52:"BRKT",53:"ENTITY_NAME",54:"DECIMAL_NUM",55:"ENTITY_ONE",61:"ATTRIBUTE_WORD",62:"?",64:",",65:"ATTRIBUTE_KEY",66:"COMMENT",69:"ZERO_OR_ONE",70:"ZERO_OR_MORE",71:"ONE_OR_MORE",72:"ONLY_ONE",73:"MD_PARENT",74:"NON_IDENTIFYING",75:"IDENTIFYING",76:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[7,1],[8,5],[8,9],[8,7],[8,7],[8,4],[8,6],[8,3],[8,5],[8,1],[8,3],[8,7],[8,9],[8,6],[8,8],[8,4],[8,6],[8,2],[8,2],[8,2],[8,1],[8,1],[8,1],[8,1],[8,1],[8,3],[32,3],[32,6],[36,1],[36,2],[28,1],[28,1],[28,1],[28,1],[29,4],[15,1],[15,1],[15,3],[15,3],[30,3],[31,4],[42,1],[42,3],[48,1],[48,2],[35,1],[35,1],[35,1],[49,1],[49,1],[49,1],[49,1],[10,1],[10,1],[10,1],[10,1],[10,1],[17,1],[17,2],[56,2],[56,3],[56,3],[56,4],[57,1],[57,2],[58,1],[59,1],[59,3],[63,1],[60,1],[11,3],[67,1],[67,1],[67,1],[67,1],[67,1],[68,1],[68,1],[13,1],[13,1],[13,1]],performAction:f(function(n,l,d,i,_,t,$){var e=t.length-1;switch(_){case 1:break;case 2:this.$=[];break;case 3:this.$=t[e-1].concat(t[e]);break;case 4:this.$=t[e];break;case 5:case 6:this.$=[];break;case 7:i.addEntity(t[e-4]),i.addEntity(t[e-2]),i.addRelationship(t[e-4],t[e],t[e-2],t[e-3]),this.$=[t[e-4],t[e-2]];break;case 8:i.addEntity(t[e-8]),i.addEntity(t[e-4]),i.addRelationship(t[e-8],t[e],t[e-4],t[e-5]),i.setClass([t[e-8]],t[e-6]),i.setClass([t[e-4]],t[e-2]),this.$=[t[e-8],t[e-4]];break;case 9:i.addEntity(t[e-6]),i.addEntity(t[e-2]),i.addRelationship(t[e-6],t[e],t[e-2],t[e-3]),i.setClass([t[e-6]],t[e-4]),this.$=[t[e-6],t[e-2]];break;case 10:i.addEntity(t[e-6]),i.addEntity(t[e-4]),i.addRelationship(t[e-6],t[e],t[e-4],t[e-5]),i.setClass([t[e-4]],t[e-2]),this.$=[t[e-6],t[e-4]];break;case 11:i.addEntity(t[e-3]),i.addAttributes(t[e-3],t[e-1]),this.$=[t[e-3]];break;case 12:i.addEntity(t[e-5]),i.addAttributes(t[e-5],t[e-1]),i.setClass([t[e-5]],t[e-3]),this.$=[t[e-5]];break;case 13:i.addEntity(t[e-2]),this.$=[t[e-2]];break;case 14:i.addEntity(t[e-4]),i.setClass([t[e-4]],t[e-2]),this.$=[t[e-4]];break;case 15:i.addEntity(t[e]),this.$=[t[e]];break;case 16:i.addEntity(t[e-2]),i.setClass([t[e-2]],t[e]),this.$=[t[e-2]];break;case 17:i.addEntity(t[e-6],t[e-4]),i.addAttributes(t[e-6],t[e-1]),this.$=[t[e-6]];break;case 18:i.addEntity(t[e-8],t[e-6]),i.addAttributes(t[e-8],t[e-1]),i.setClass([t[e-8]],t[e-3]),this.$=[t[e-8]];break;case 19:i.addEntity(t[e-5],t[e-3]),this.$=[t[e-5]];break;case 20:i.addEntity(t[e-7],t[e-5]),i.setClass([t[e-7]],t[e-2]),this.$=[t[e-7]];break;case 21:i.addEntity(t[e-3],t[e-1]);break;case 22:i.addEntity(t[e-5],t[e-3]),i.setClass([t[e-5]],t[e]);break;case 23:case 24:this.$=t[e].trim(),i.setAccTitle(this.$);break;case 25:case 26:this.$=t[e].trim(),i.setAccDescription(this.$);break;case 27:i.subgraphDepth?this.$=t[e]:(i.setDirection(t[e].value),this.$=[]);break;case 31:i.subgraphDepth=(i.subgraphDepth||1)-1,this.$=i.addSubGraph({text:t[e-2].id},t[e-1],{text:t[e-2].text});break;case 32:i.subgraphDepth=(i.subgraphDepth||0)+1,this.$={id:t[e-1],text:t[e-1]};break;case 33:i.subgraphDepth=(i.subgraphDepth||0)+1,this.$={id:t[e-4],text:t[e-2]};break;case 34:case 59:case 60:case 61:case 62:case 86:this.$=t[e];break;case 35:this.$=t[e-1]+" "+t[e];break;case 36:this.$={stmt:"dir",value:"TB"};break;case 37:this.$={stmt:"dir",value:"BT"};break;case 38:this.$={stmt:"dir",value:"RL"};break;case 39:this.$={stmt:"dir",value:"LR"};break;case 40:this.$=t[e-3],i.addClass(t[e-2],t[e-1]);break;case 41:case 42:case 63:case 72:this.$=[t[e]];break;case 43:case 44:this.$=t[e-2].concat([t[e]]);break;case 45:this.$=t[e-2],i.setClass(t[e-1],t[e]);break;case 46:this.$=t[e-3],i.addCssStyles(t[e-2],t[e-1]);break;case 47:this.$=[t[e]];break;case 48:t[e-2].push(t[e]),this.$=t[e-2];break;case 50:this.$=t[e-1]+t[e];break;case 58:case 84:case 85:this.$=t[e].replace(/"/g,"");break;case 64:t[e].push(t[e-1]),this.$=t[e];break;case 65:this.$={type:t[e-1],name:t[e]};break;case 66:this.$={type:t[e-2],name:t[e-1],keys:t[e]};break;case 67:this.$={type:t[e-2],name:t[e-1],comment:t[e]};break;case 68:this.$={type:t[e-3],name:t[e-2],keys:t[e-1],comment:t[e]};break;case 69:case 71:case 74:this.$=t[e];break;case 70:this.$=t[e-1]+t[e];break;case 73:t[e-2].push(t[e]),this.$=t[e-2];break;case 75:this.$=t[e].replace(/"/g,"");break;case 76:this.$={cardA:t[e],relType:t[e-1],cardB:t[e-2]};break;case 77:this.$=i.Cardinality.ZERO_OR_ONE;break;case 78:this.$=i.Cardinality.ZERO_OR_MORE;break;case 79:this.$=i.Cardinality.ONE_OR_MORE;break;case 80:this.$=i.Cardinality.ONLY_ONE;break;case 81:this.$=i.Cardinality.MD_PARENT;break;case 82:this.$=i.Identification.NON_IDENTIFYING;break;case 83:this.$=i.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},s(a,o,{5:3}),{6:[1,4],7:5,8:6,9:c,10:8,21:r,23:u,25:y,27:g,28:13,29:14,30:15,31:16,32:17,34:k,37:C,38:p,39:b,40:A,41:v,43:O,46:N,47:I,51:x,53:D,54:L,55:w},s(a,Ot,{1:[2,1]}),s(h,[2,3]),s(h,[2,4]),s(h,[2,5]),s(h,[2,15],{11:31,67:35,14:[1,32],16:[1,33],19:[1,34],69:dt,70:pt,71:ft,72:bt,73:gt}),{22:[1,41]},{24:[1,42]},{26:[1,43]},s(h,[2,26]),s(h,[2,27]),s(h,[2,28]),s(h,[2,29]),s(h,[2,30]),s(h,o,{5:44}),s(Z,[2,58]),s(Z,[2,59]),s(Z,[2,60]),s(Z,[2,61]),s(Z,[2,62]),s(h,[2,36]),s(h,[2,37]),s(h,[2,38]),s(h,[2,39]),{15:45,43:V,44:M},{15:48,43:V,44:M},{15:49,43:V,44:M},{10:50,43:O,51:x,53:D,54:L,55:w},{10:51,43:O,51:x,53:D,54:L,55:w},{15:52,43:V,44:M},{17:53,18:[1,54],56:55,57:56,61:j},{10:58,43:O,51:x,53:D,54:L,55:w},{68:59,74:[1,60],75:[1,61]},s(W,[2,77]),s(W,[2,78]),s(W,[2,79]),s(W,[2,80]),s(W,[2,81]),s(h,[2,23]),s(h,[2,24]),s(h,[2,25]),{6:[1,63],7:5,8:6,9:c,10:8,21:r,23:u,25:y,27:g,28:13,29:14,30:15,31:16,32:17,33:[1,62],34:k,37:C,38:p,39:b,40:A,41:v,43:O,46:N,47:I,51:x,53:D,54:L,55:w},{12:q,42:64,44:H,45:B,48:66,49:67,51:Q,52:X},s(et,[2,41]),s(et,[2,42]),{15:72,43:V,44:M,45:B},{12:q,42:73,44:H,45:B,48:66,49:67,51:Q,52:X},{6:st,9:it,19:[1,75],35:74,50:rt},{12:[1,79],14:[1,80]},s(h,[2,16],{67:35,11:81,16:[1,82],45:B,69:dt,70:pt,71:ft,72:bt,73:gt}),{18:[1,83]},s(h,[2,13]),{17:84,18:[2,63],56:55,57:56,61:j},{58:85,61:[1,86]},{61:[2,69],62:[1,87]},{20:[1,88]},{67:89,69:dt,70:pt,71:ft,72:bt,73:gt},s(Nt,[2,82]),s(Nt,[2,83]),s(h,[2,31]),s(h,Ot),{6:st,9:it,35:90,45:xt,50:rt},{43:[1,92],44:[1,93]},s(At,[2,47],{49:94,12:q,44:H,51:Q,52:X}),s(z,[2,49]),s(z,[2,54]),s(z,[2,55]),s(z,[2,56]),s(z,[2,57]),s(h,[2,45],{45:B}),{6:st,9:it,35:95,45:xt,50:rt},s(h,[2,32]),{10:97,36:96,43:O,51:x,53:D,54:L,55:w},s(h,[2,51]),s(h,[2,52]),s(h,[2,53]),{13:98,43:at,53:nt,76:ot},{15:102,43:V,44:M},{10:103,43:O,51:x,53:D,54:L,55:w},{17:104,18:[1,105],56:55,57:56,61:j},s(h,[2,11]),{18:[2,64]},s(J,[2,65],{59:106,60:107,63:108,65:It,66:Rt}),s([18,61,65,66],[2,71]),{61:[2,70]},s(h,[2,21],{14:[1,112],16:[1,111]}),s([43,51,53,54,55],[2,76]),s(h,[2,40]),{12:q,44:H,48:113,49:67,51:Q,52:X},s(et,[2,43]),s(et,[2,44]),s(z,[2,50]),s(h,[2,46]),{10:115,20:[1,114],43:O,51:x,53:D,54:L,55:w},s(vt,[2,34]),s(h,[2,7]),s(h,[2,84]),s(h,[2,85]),s(h,[2,86]),{12:[1,116],45:B},{12:[1,118],14:[1,117]},{18:[1,119]},s(h,[2,14]),s(J,[2,66],{60:120,64:[1,121],66:Rt}),s(J,[2,67]),s(yt,[2,72]),s(J,[2,75]),s(yt,[2,74]),{17:122,18:[1,123],56:55,57:56,61:j},{15:124,43:V,44:M},s(At,[2,48],{49:94,12:q,44:H,51:Q,52:X}),{6:st,9:it,35:125,50:rt},s(vt,[2,35]),{13:126,43:at,53:nt,76:ot},{15:127,43:V,44:M},{13:128,43:at,53:nt,76:ot},s(h,[2,12]),s(J,[2,68]),{63:129,65:It},{18:[1,130]},s(h,[2,19]),s(h,[2,22],{16:[1,131],45:B}),s(h,[2,33]),s(h,[2,10]),{12:[1,132],45:B},s(h,[2,9]),s(yt,[2,73]),s(h,[2,17]),{17:133,18:[1,134],56:55,57:56,61:j},{13:135,43:at,53:nt,76:ot},{18:[1,136]},s(h,[2,20]),s(h,[2,8]),s(h,[2,18])],defaultActions:{84:[2,64],87:[2,70]},parseError:f(function(n,l){if(l.recoverable)this.trace(n);else{var d=new Error(n);throw d.hash=l,d}},"parseError"),parse:f(function(n){var l=this,d=[0],i=[],_=[null],t=[],$=this.table,e="",lt=0,Dt=0,Ft=2,Lt=1,Yt=t.slice.call(arguments,1),m=Object.create(this.lexer),Y={yy:{}};for(var kt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,kt)&&(Y.yy[kt]=this.yy[kt]);m.setInput(n,Y.yy),Y.yy.lexer=m,Y.yy.parser=this,typeof m.yylloc>"u"&&(m.yylloc={});var mt=m.yylloc;t.push(mt);var Pt=m.options&&m.options.ranges;typeof Y.yy.parseError=="function"?this.parseError=Y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function zt(S){d.length=d.length-2*S,_.length=_.length-S,t.length=t.length-S}f(zt,"popStack");function wt(){var S;return S=i.pop()||m.lex()||Lt,typeof S!="number"&&(S instanceof Array&&(i=S,S=i.pop()),S=l.symbols_[S]||S),S}f(wt,"lex");for(var E,P,T,Et,U={},ht,R,Vt,ut;;){if(P=d[d.length-1],this.defaultActions[P]?T=this.defaultActions[P]:((E===null||typeof E>"u")&&(E=wt()),T=$[P]&&$[P][E]),typeof T>"u"||!T.length||!T[0]){var St="";ut=[];for(ht in $[P])this.terminals_[ht]&&ht>Ft&&ut.push("'"+this.terminals_[ht]+"'");m.showPosition?St="Parse error on line "+(lt+1)+`:
|
|
1
|
+
import{g as Ut}from"./D9_9Xrbm.js";import{s as Kt}from"./0Lodvm7U.js";import{b as f,C as Tt,a_ as Zt,V as jt,aZ as Wt,U as qt,b0 as Ht,Y as Qt,X as tt,ay as F,z as Xt,r as Jt,$ as $t,am as te,aU as ee,ab as se,aG as ie,aT as re,p as ae,_ as ne,a1 as oe,aP as ce,aW as le,bh as he}from"./Cdwy3-nO.js";var Ct=(function(){var s=f(function(G,n,l,d){for(l=l||{},d=G.length;d--;l[G[d]]=n);return l},"o"),a=[6,9,21,23,25,27,34,37,38,39,40,41,43,46,47,51,53,54,55],o=[2,2],c=[1,7],r=[1,9],u=[1,10],y=[1,11],g=[1,12],k=[1,30],C=[1,23],p=[1,24],b=[1,25],A=[1,26],v=[1,27],O=[1,19],N=[1,28],I=[1,29],x=[1,20],D=[1,18],L=[1,21],w=[1,22],Ot=[2,6],h=[6,9,21,23,25,27,33,34,37,38,39,40,41,43,46,47,51,53,54,55],dt=[1,36],pt=[1,37],ft=[1,38],bt=[1,39],gt=[1,40],Z=[6,9,12,14,16,19,20,21,23,25,27,33,34,37,38,39,40,41,43,46,47,50,51,53,54,55,69,70,71,72,73],V=[1,46],M=[1,47],j=[1,57],W=[43,51,53,54,55,74,75],q=[1,70],H=[1,68],B=[1,65],Q=[1,69],X=[1,71],et=[6,9,12,16,21,23,25,27,33,34,37,38,39,40,41,43,44,45,46,47,51,52,53,54,55,69,70,71,72,73],st=[1,78],it=[1,77],rt=[1,76],Nt=[69,70,71,72,73],xt=[1,91],At=[6,9,45,50],z=[6,9,12,44,45,50,51,52],at=[1,101],nt=[1,100],ot=[1,99],J=[18,61],It=[1,110],Rt=[1,109],vt=[20,43,51,53,54,55],yt=[18,61,64,66],_t={trace:f(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,statement:8,NEWLINE:9,entityName:10,relSpec:11,COLON:12,role:13,STYLE_SEPARATOR:14,idList:15,BLOCK_START:16,attributes:17,BLOCK_STOP:18,SQS:19,SQE:20,title:21,title_value:22,acc_title:23,acc_title_value:24,acc_descr:25,acc_descr_value:26,acc_descr_multiline_value:27,direction:28,classDefStatement:29,classStatement:30,styleStatement:31,subgraphHeader:32,END:33,SUBGRAPH:34,separator:35,subgraphTitle:36,direction_tb:37,direction_bt:38,direction_rl:39,direction_lr:40,CLASSDEF:41,stylesOpt:42,UNICODE_TEXT:43,STYLE_TEXT:44,COMMA:45,CLASS:46,STYLE:47,style:48,styleComponent:49,SEMI:50,NUM:51,BRKT:52,ENTITY_NAME:53,DECIMAL_NUM:54,ENTITY_ONE:55,attribute:56,attributeType:57,attributeName:58,attributeKeyTypeList:59,attributeComment:60,ATTRIBUTE_WORD:61,"?":62,attributeKeyType:63,",":64,ATTRIBUTE_KEY:65,COMMENT:66,cardinality:67,relType:68,ZERO_OR_ONE:69,ZERO_OR_MORE:70,ONE_OR_MORE:71,ONLY_ONE:72,MD_PARENT:73,NON_IDENTIFYING:74,IDENTIFYING:75,WORD:76,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",9:"NEWLINE",12:"COLON",14:"STYLE_SEPARATOR",16:"BLOCK_START",18:"BLOCK_STOP",19:"SQS",20:"SQE",21:"title",22:"title_value",23:"acc_title",24:"acc_title_value",25:"acc_descr",26:"acc_descr_value",27:"acc_descr_multiline_value",33:"END",34:"SUBGRAPH",37:"direction_tb",38:"direction_bt",39:"direction_rl",40:"direction_lr",41:"CLASSDEF",43:"UNICODE_TEXT",44:"STYLE_TEXT",45:"COMMA",46:"CLASS",47:"STYLE",50:"SEMI",51:"NUM",52:"BRKT",53:"ENTITY_NAME",54:"DECIMAL_NUM",55:"ENTITY_ONE",61:"ATTRIBUTE_WORD",62:"?",64:",",65:"ATTRIBUTE_KEY",66:"COMMENT",69:"ZERO_OR_ONE",70:"ZERO_OR_MORE",71:"ONE_OR_MORE",72:"ONLY_ONE",73:"MD_PARENT",74:"NON_IDENTIFYING",75:"IDENTIFYING",76:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[7,1],[8,5],[8,9],[8,7],[8,7],[8,4],[8,6],[8,3],[8,5],[8,1],[8,3],[8,7],[8,9],[8,6],[8,8],[8,4],[8,6],[8,2],[8,2],[8,2],[8,1],[8,1],[8,1],[8,1],[8,1],[8,3],[32,3],[32,6],[36,1],[36,2],[28,1],[28,1],[28,1],[28,1],[29,4],[15,1],[15,1],[15,3],[15,3],[30,3],[31,4],[42,1],[42,3],[48,1],[48,2],[35,1],[35,1],[35,1],[49,1],[49,1],[49,1],[49,1],[10,1],[10,1],[10,1],[10,1],[10,1],[17,1],[17,2],[56,2],[56,3],[56,3],[56,4],[57,1],[57,2],[58,1],[59,1],[59,3],[63,1],[60,1],[11,3],[67,1],[67,1],[67,1],[67,1],[67,1],[68,1],[68,1],[13,1],[13,1],[13,1]],performAction:f(function(n,l,d,i,_,t,$){var e=t.length-1;switch(_){case 1:break;case 2:this.$=[];break;case 3:this.$=t[e-1].concat(t[e]);break;case 4:this.$=t[e];break;case 5:case 6:this.$=[];break;case 7:i.addEntity(t[e-4]),i.addEntity(t[e-2]),i.addRelationship(t[e-4],t[e],t[e-2],t[e-3]),this.$=[t[e-4],t[e-2]];break;case 8:i.addEntity(t[e-8]),i.addEntity(t[e-4]),i.addRelationship(t[e-8],t[e],t[e-4],t[e-5]),i.setClass([t[e-8]],t[e-6]),i.setClass([t[e-4]],t[e-2]),this.$=[t[e-8],t[e-4]];break;case 9:i.addEntity(t[e-6]),i.addEntity(t[e-2]),i.addRelationship(t[e-6],t[e],t[e-2],t[e-3]),i.setClass([t[e-6]],t[e-4]),this.$=[t[e-6],t[e-2]];break;case 10:i.addEntity(t[e-6]),i.addEntity(t[e-4]),i.addRelationship(t[e-6],t[e],t[e-4],t[e-5]),i.setClass([t[e-4]],t[e-2]),this.$=[t[e-6],t[e-4]];break;case 11:i.addEntity(t[e-3]),i.addAttributes(t[e-3],t[e-1]),this.$=[t[e-3]];break;case 12:i.addEntity(t[e-5]),i.addAttributes(t[e-5],t[e-1]),i.setClass([t[e-5]],t[e-3]),this.$=[t[e-5]];break;case 13:i.addEntity(t[e-2]),this.$=[t[e-2]];break;case 14:i.addEntity(t[e-4]),i.setClass([t[e-4]],t[e-2]),this.$=[t[e-4]];break;case 15:i.addEntity(t[e]),this.$=[t[e]];break;case 16:i.addEntity(t[e-2]),i.setClass([t[e-2]],t[e]),this.$=[t[e-2]];break;case 17:i.addEntity(t[e-6],t[e-4]),i.addAttributes(t[e-6],t[e-1]),this.$=[t[e-6]];break;case 18:i.addEntity(t[e-8],t[e-6]),i.addAttributes(t[e-8],t[e-1]),i.setClass([t[e-8]],t[e-3]),this.$=[t[e-8]];break;case 19:i.addEntity(t[e-5],t[e-3]),this.$=[t[e-5]];break;case 20:i.addEntity(t[e-7],t[e-5]),i.setClass([t[e-7]],t[e-2]),this.$=[t[e-7]];break;case 21:i.addEntity(t[e-3],t[e-1]);break;case 22:i.addEntity(t[e-5],t[e-3]),i.setClass([t[e-5]],t[e]);break;case 23:case 24:this.$=t[e].trim(),i.setAccTitle(this.$);break;case 25:case 26:this.$=t[e].trim(),i.setAccDescription(this.$);break;case 27:i.subgraphDepth?this.$=t[e]:(i.setDirection(t[e].value),this.$=[]);break;case 31:i.subgraphDepth=(i.subgraphDepth||1)-1,this.$=i.addSubGraph({text:t[e-2].id},t[e-1],{text:t[e-2].text});break;case 32:i.subgraphDepth=(i.subgraphDepth||0)+1,this.$={id:t[e-1],text:t[e-1]};break;case 33:i.subgraphDepth=(i.subgraphDepth||0)+1,this.$={id:t[e-4],text:t[e-2]};break;case 34:case 59:case 60:case 61:case 62:case 86:this.$=t[e];break;case 35:this.$=t[e-1]+" "+t[e];break;case 36:this.$={stmt:"dir",value:"TB"};break;case 37:this.$={stmt:"dir",value:"BT"};break;case 38:this.$={stmt:"dir",value:"RL"};break;case 39:this.$={stmt:"dir",value:"LR"};break;case 40:this.$=t[e-3],i.addClass(t[e-2],t[e-1]);break;case 41:case 42:case 63:case 72:this.$=[t[e]];break;case 43:case 44:this.$=t[e-2].concat([t[e]]);break;case 45:this.$=t[e-2],i.setClass(t[e-1],t[e]);break;case 46:this.$=t[e-3],i.addCssStyles(t[e-2],t[e-1]);break;case 47:this.$=[t[e]];break;case 48:t[e-2].push(t[e]),this.$=t[e-2];break;case 50:this.$=t[e-1]+t[e];break;case 58:case 84:case 85:this.$=t[e].replace(/"/g,"");break;case 64:t[e].push(t[e-1]),this.$=t[e];break;case 65:this.$={type:t[e-1],name:t[e]};break;case 66:this.$={type:t[e-2],name:t[e-1],keys:t[e]};break;case 67:this.$={type:t[e-2],name:t[e-1],comment:t[e]};break;case 68:this.$={type:t[e-3],name:t[e-2],keys:t[e-1],comment:t[e]};break;case 69:case 71:case 74:this.$=t[e];break;case 70:this.$=t[e-1]+t[e];break;case 73:t[e-2].push(t[e]),this.$=t[e-2];break;case 75:this.$=t[e].replace(/"/g,"");break;case 76:this.$={cardA:t[e],relType:t[e-1],cardB:t[e-2]};break;case 77:this.$=i.Cardinality.ZERO_OR_ONE;break;case 78:this.$=i.Cardinality.ZERO_OR_MORE;break;case 79:this.$=i.Cardinality.ONE_OR_MORE;break;case 80:this.$=i.Cardinality.ONLY_ONE;break;case 81:this.$=i.Cardinality.MD_PARENT;break;case 82:this.$=i.Identification.NON_IDENTIFYING;break;case 83:this.$=i.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},s(a,o,{5:3}),{6:[1,4],7:5,8:6,9:c,10:8,21:r,23:u,25:y,27:g,28:13,29:14,30:15,31:16,32:17,34:k,37:C,38:p,39:b,40:A,41:v,43:O,46:N,47:I,51:x,53:D,54:L,55:w},s(a,Ot,{1:[2,1]}),s(h,[2,3]),s(h,[2,4]),s(h,[2,5]),s(h,[2,15],{11:31,67:35,14:[1,32],16:[1,33],19:[1,34],69:dt,70:pt,71:ft,72:bt,73:gt}),{22:[1,41]},{24:[1,42]},{26:[1,43]},s(h,[2,26]),s(h,[2,27]),s(h,[2,28]),s(h,[2,29]),s(h,[2,30]),s(h,o,{5:44}),s(Z,[2,58]),s(Z,[2,59]),s(Z,[2,60]),s(Z,[2,61]),s(Z,[2,62]),s(h,[2,36]),s(h,[2,37]),s(h,[2,38]),s(h,[2,39]),{15:45,43:V,44:M},{15:48,43:V,44:M},{15:49,43:V,44:M},{10:50,43:O,51:x,53:D,54:L,55:w},{10:51,43:O,51:x,53:D,54:L,55:w},{15:52,43:V,44:M},{17:53,18:[1,54],56:55,57:56,61:j},{10:58,43:O,51:x,53:D,54:L,55:w},{68:59,74:[1,60],75:[1,61]},s(W,[2,77]),s(W,[2,78]),s(W,[2,79]),s(W,[2,80]),s(W,[2,81]),s(h,[2,23]),s(h,[2,24]),s(h,[2,25]),{6:[1,63],7:5,8:6,9:c,10:8,21:r,23:u,25:y,27:g,28:13,29:14,30:15,31:16,32:17,33:[1,62],34:k,37:C,38:p,39:b,40:A,41:v,43:O,46:N,47:I,51:x,53:D,54:L,55:w},{12:q,42:64,44:H,45:B,48:66,49:67,51:Q,52:X},s(et,[2,41]),s(et,[2,42]),{15:72,43:V,44:M,45:B},{12:q,42:73,44:H,45:B,48:66,49:67,51:Q,52:X},{6:st,9:it,19:[1,75],35:74,50:rt},{12:[1,79],14:[1,80]},s(h,[2,16],{67:35,11:81,16:[1,82],45:B,69:dt,70:pt,71:ft,72:bt,73:gt}),{18:[1,83]},s(h,[2,13]),{17:84,18:[2,63],56:55,57:56,61:j},{58:85,61:[1,86]},{61:[2,69],62:[1,87]},{20:[1,88]},{67:89,69:dt,70:pt,71:ft,72:bt,73:gt},s(Nt,[2,82]),s(Nt,[2,83]),s(h,[2,31]),s(h,Ot),{6:st,9:it,35:90,45:xt,50:rt},{43:[1,92],44:[1,93]},s(At,[2,47],{49:94,12:q,44:H,51:Q,52:X}),s(z,[2,49]),s(z,[2,54]),s(z,[2,55]),s(z,[2,56]),s(z,[2,57]),s(h,[2,45],{45:B}),{6:st,9:it,35:95,45:xt,50:rt},s(h,[2,32]),{10:97,36:96,43:O,51:x,53:D,54:L,55:w},s(h,[2,51]),s(h,[2,52]),s(h,[2,53]),{13:98,43:at,53:nt,76:ot},{15:102,43:V,44:M},{10:103,43:O,51:x,53:D,54:L,55:w},{17:104,18:[1,105],56:55,57:56,61:j},s(h,[2,11]),{18:[2,64]},s(J,[2,65],{59:106,60:107,63:108,65:It,66:Rt}),s([18,61,65,66],[2,71]),{61:[2,70]},s(h,[2,21],{14:[1,112],16:[1,111]}),s([43,51,53,54,55],[2,76]),s(h,[2,40]),{12:q,44:H,48:113,49:67,51:Q,52:X},s(et,[2,43]),s(et,[2,44]),s(z,[2,50]),s(h,[2,46]),{10:115,20:[1,114],43:O,51:x,53:D,54:L,55:w},s(vt,[2,34]),s(h,[2,7]),s(h,[2,84]),s(h,[2,85]),s(h,[2,86]),{12:[1,116],45:B},{12:[1,118],14:[1,117]},{18:[1,119]},s(h,[2,14]),s(J,[2,66],{60:120,64:[1,121],66:Rt}),s(J,[2,67]),s(yt,[2,72]),s(J,[2,75]),s(yt,[2,74]),{17:122,18:[1,123],56:55,57:56,61:j},{15:124,43:V,44:M},s(At,[2,48],{49:94,12:q,44:H,51:Q,52:X}),{6:st,9:it,35:125,50:rt},s(vt,[2,35]),{13:126,43:at,53:nt,76:ot},{15:127,43:V,44:M},{13:128,43:at,53:nt,76:ot},s(h,[2,12]),s(J,[2,68]),{63:129,65:It},{18:[1,130]},s(h,[2,19]),s(h,[2,22],{16:[1,131],45:B}),s(h,[2,33]),s(h,[2,10]),{12:[1,132],45:B},s(h,[2,9]),s(yt,[2,73]),s(h,[2,17]),{17:133,18:[1,134],56:55,57:56,61:j},{13:135,43:at,53:nt,76:ot},{18:[1,136]},s(h,[2,20]),s(h,[2,8]),s(h,[2,18])],defaultActions:{84:[2,64],87:[2,70]},parseError:f(function(n,l){if(l.recoverable)this.trace(n);else{var d=new Error(n);throw d.hash=l,d}},"parseError"),parse:f(function(n){var l=this,d=[0],i=[],_=[null],t=[],$=this.table,e="",lt=0,Dt=0,Ft=2,Lt=1,Yt=t.slice.call(arguments,1),m=Object.create(this.lexer),Y={yy:{}};for(var kt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,kt)&&(Y.yy[kt]=this.yy[kt]);m.setInput(n,Y.yy),Y.yy.lexer=m,Y.yy.parser=this,typeof m.yylloc>"u"&&(m.yylloc={});var mt=m.yylloc;t.push(mt);var Pt=m.options&&m.options.ranges;typeof Y.yy.parseError=="function"?this.parseError=Y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function zt(S){d.length=d.length-2*S,_.length=_.length-S,t.length=t.length-S}f(zt,"popStack");function wt(){var S;return S=i.pop()||m.lex()||Lt,typeof S!="number"&&(S instanceof Array&&(i=S,S=i.pop()),S=l.symbols_[S]||S),S}f(wt,"lex");for(var E,P,T,Et,U={},ht,R,Vt,ut;;){if(P=d[d.length-1],this.defaultActions[P]?T=this.defaultActions[P]:((E===null||typeof E>"u")&&(E=wt()),T=$[P]&&$[P][E]),typeof T>"u"||!T.length||!T[0]){var St="";ut=[];for(ht in $[P])this.terminals_[ht]&&ht>Ft&&ut.push("'"+this.terminals_[ht]+"'");m.showPosition?St="Parse error on line "+(lt+1)+`:
|
|
2
2
|
`+m.showPosition()+`
|
|
3
3
|
Expecting `+ut.join(", ")+", got '"+(this.terminals_[E]||E)+"'":St="Parse error on line "+(lt+1)+": Unexpected "+(E==Lt?"end of input":"'"+(this.terminals_[E]||E)+"'"),this.parseError(St,{text:m.match,token:this.terminals_[E]||E,line:m.yylineno,loc:mt,expected:ut})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+P+", token: "+E);switch(T[0]){case 1:d.push(E),_.push(m.yytext),t.push(m.yylloc),d.push(T[1]),E=null,Dt=m.yyleng,e=m.yytext,lt=m.yylineno,mt=m.yylloc;break;case 2:if(R=this.productions_[T[1]][1],U.$=_[_.length-R],U._$={first_line:t[t.length-(R||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(R||1)].first_column,last_column:t[t.length-1].last_column},Pt&&(U._$.range=[t[t.length-(R||1)].range[0],t[t.length-1].range[1]]),Et=this.performAction.apply(U,[e,Dt,lt,Y.yy,T[1],_,t].concat(Yt)),typeof Et<"u")return Et;R&&(d=d.slice(0,-1*R*2),_=_.slice(0,-1*R),t=t.slice(0,-1*R)),d.push(this.productions_[T[1]][0]),_.push(U.$),t.push(U._$),Vt=$[d[d.length-2]][d[d.length-1]],d.push(Vt);break;case 3:return!0}}return!0},"parse")},Gt=(function(){var G={EOF:1,parseError:f(function(l,d){if(this.yy.parser)this.yy.parser.parseError(l,d);else throw new Error(l)},"parseError"),setInput:f(function(n,l){return this.yy=l||this.yy||{},this._input=n,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:f(function(){var n=this._input[0];this.yytext+=n,this.yyleng++,this.offset++,this.match+=n,this.matched+=n;var l=n.match(/(?:\r\n?|\n).*/g);return l?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),n},"input"),unput:f(function(n){var l=n.length,d=n.split(/(?:\r\n?|\n)/g);this._input=n+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-l),this.offset-=l;var i=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),d.length-1&&(this.yylineno-=d.length-1);var _=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:d?(d.length===i.length?this.yylloc.first_column:0)+i[i.length-d.length].length-d[0].length:this.yylloc.first_column-l},this.options.ranges&&(this.yylloc.range=[_[0],_[0]+this.yyleng-l]),this.yyleng=this.yytext.length,this},"unput"),more:f(function(){return this._more=!0,this},"more"),reject:f(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:f(function(n){this.unput(this.match.slice(n))},"less"),pastInput:f(function(){var n=this.matched.substr(0,this.matched.length-this.match.length);return(n.length>20?"...":"")+n.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:f(function(){var n=this.match;return n.length<20&&(n+=this._input.substr(0,20-n.length)),(n.substr(0,20)+(n.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:f(function(){var n=this.pastInput(),l=new Array(n.length+1).join("-");return n+this.upcomingInput()+`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var Ul=Object.defineProperty;var jl=(r,t,a)=>t in r?Ul(r,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):r[t]=a;var pa=(r,t,a)=>jl(r,typeof t!="symbol"?t+"":t,a);import{t as pt,bo as g,bw as vt,b as ht,bm as d,bq as Ea,bs as tr,br as Vl,bp as vn}from"./Fcr7AvC-.js";import{ai as Ga,bs as _t,ca as Yt,aD as e,bH as D,ay as fe,bS as A,a7 as St,W as c,a5 as V,bA as F,bn as bt,c9 as n,bV as ue,aA as m,b_ as $,aj as xr,aB as I,be as Cr,b$ as Pr,bO as Q,bf as rr,c0 as Ia,bl as oe,bj as ja,c6 as Gl,bo as nn,br as Zr,am as Da,ax as Ba,bk as as,aw as pn,bz as ns,cb as Fn,c5 as Mn,aC as Ir,cd as vo,bv as Kl}from"./3SdAC2_C.js";import{i as O}from"./BhYXv0ZM.js";import{g as kr,e as sa,p as ms,i as Ha,I as Zl,h as eo,X as pi,o as Ql}from"./CA6H1-bp.js";import{n as Kt,l as On,c as Xa,g as rn,s as ks,k as ss,S as Yl}from"./CxR-pcVt.js";import{s as J,f as Fe,g as hn,c as It,e as Qt,b as _n,p as Xl,S as Jl,C as ed}from"./BRCr02in.js";import{b as ea}from"./Dn334wJv.js";import{f as st,ae as to,a_ as td}from"./D-lOH49i.js";import{J as rd,O as ad,Q as Is}from"./pYdPYEfN.js";import"./x4bPxhVW.js";import"./BzXQ5SMs.js";import"./O5ZlQHf9.js";import{t as Ma,k as vi}from"./CWfjuhY2.js";import{F as Bt,a4 as zs,bg as ka,cK as ps,au as hi,aZ as _i,aK as nd,c9 as sd,a6 as os,aN as od,cN as id,cM as ld,a3 as vs,aC as is,aw as hs,I as ho,aj as dd,bu as cd,aS as ud,aX as fd,bJ as gd,ao as md,bk as bi,cC as pd,aP as _o,c0 as Ss,aI as Hn,cW as vd,cb as hd,bn as _d,b as bd,cp as yd,ag as wd,ba as Ts,cr as wn,cF as xd,az as kd,c6 as Id,d3 as Sd}from"./ChHRVjww.js";import{C as yi,A as Td,o as Cd}from"./CBbhUF1U.js";import{b as Cs,V as bo}from"./dvKmN4h6.js";import{A as wi}from"./BSCmeu0N.js";import{bZ as xi,aj as Md,j as Kn,a4 as Ws,al as ls,E as Ad,au as Zn,aP as Pd,aS as yo}from"./D5vlW2SV.js";import{t as an,o as Rd}from"./DAsc1V4f.js";import{ch as Qn,aO as qn,d3 as ki,d5 as Va,c6 as _s,q as Nd,cY as Ii,d2 as bs,d1 as Si,c$ as Ti,n as Ca,al as Ed,am as $d,aJ as Ld,z as Od,V as qd,a3 as wo,D as Ci,e5 as Dd,aF as Bd,ak as Fd,r as zd,C as Ms,ag as Wd,U as xn,e3 as Hd,ab as Ud,k as xo,u as jd,Z as Vd,v as Gd,i as Kd,g as As,f as ko,a0 as Zd,$ as Qd,a9 as Yd,x as Mi,y as Ai,l as Pi,j as Xd,s as Jd,a as ec,d6 as tc,ae as rc,e4 as ac,L as nc,F as sc,a2 as Io,bq as oc,av as ic}from"./Cq6hdiVw.js";import{JH as mt,p0 as lc,tR as Yn,nR as So,vK as Ri,vM as Ni,s2 as dc,yJ as ds,v1 as Ei,nM as $i,br as En,nZ as cc,n_ as uc,yK as fc,qA as gc,tl as mc,vD as Li,nL as pc,mP as vc,m as hc,zk as _c,zh as bc,zj as yc}from"./D0qhIm1r.js";import{a3 as wc,y as Ps,a1 as xc,O as Rs,W as kc,$ as Ic,k as Sc,p as kn,P as un,q as Tc,G as Cc,v as Mc,t as Ac,M as Ns,K as Pc,z as Rc,L as Nc,_ as An,U as Un,N as To,n as Co,E as Ec,c as Es,F as Mo,B as $c,w as Ao,J as Pn,Q as Lc,H as Oc,j as qc,R as Dc,T as Bc,A as Fc,g as zc,b as Wc,D as Hc,f as Uc,e as jc,a as Vc,C as Gc,i as Kc,d as Hs,V as Oi,a4 as Zc,u as Qc,l as Yc}from"./DdNl3Rbm.js";import{i as Xc,e as Jc}from"./BwweojP5.js";import{g as $s}from"./B5aYN90J.js";import{M as In,C as Rn}from"./CMHMpoVu.js";import{C as Po}from"./DOvLLu-_.js";import"./_fNgz67j.js";import{P as eu}from"./CNzTIPQp.js";import"./D6H34kDj.js";import{c as qi}from"./ChTqQfQN.js";import{S as tu}from"./DJWOAwhC.js";import{D as Ro,M as ru}from"./Dp6gutm7.js";import{b as au,s as en,c as cs}from"./C0yEXWZT.js";import{O as Xn,y as Ls,E as Os,B as qs,N as nu,m as su,l as ou,k as iu,d as Dn,C as No,f as lu,e as du,g as cu}from"./DhA_Bjtj.js";import{a as Di,s as Eo}from"./BsieX9dN.js";import{f as uu}from"./BdWqymET.js";import{c as na}from"./CK3fpDUl.js";import{a as fu,k as Bi,h as ro,q as Fi,l as wr}from"./C7b3vXLD.js";import{P as gu}from"./CpIcQB5T.js";import{r as Ds,q as Bs,B as $o,i as mu}from"./D1rlIs5V.js";import{R as zi,C as ys,m as pu,h as vu,g as hu,i as Lo,P as _u}from"./qB07BmZl.js";import"./DRMe5Ypb.js";import{c as bu,s as yu}from"./CRNqz-CU.js";import{h as gn}from"./2z2xJ2W_.js";import{b as wu,a as Wi}from"./BMejr7u6.js";import{P as Hi}from"./ZmAQurQV.js";import{B as xu}from"./DBy_x3yG.js";import{o as Ui,r as ku,e as Iu}from"./C2BkU_2B.js";import{o as ji}from"./CU4LG5o2.js";import{A as Jn,b as Vi}from"./B8hXRSlI.js";import{g as ao}from"./D_jEt7ej.js";import{a as Su,M as Tu}from"./Ccf5U4O_.js";import{a as Gi}from"./Tgw7Kdvt.js";import{E as Cu,n as Mu}from"./54ZDusyh.js";import{t as Tr}from"./C-BsEdGZ.js";import{c as Sn}from"./2z64ELW5.js";import{A as Au}from"./D4VyuyJv.js";import{f as Pu,d as Ru}from"./QiDikPQa.js";import{ad as Nu,P as Eu,Z as $u,L as Oo,Y as Lu,w as Ou,a0 as Ki,$ as Zi}from"./BZDblkH_.js";import{a as qu}from"./CC7to1B5.js";import{k as Du}from"./Cc0763mU.js";import{S as Bu}from"./c5wypyPV.js";import{u as Fu,a as zu,c as qo,S as Wu}from"./D9tVylVS.js";import{T as us}from"./YAuWnPYv.js";import"./lK1e5NlM.js";import{g as Hu,a as Uu}from"./DReNFETs.js";import{I as ju,R as Vu,q as Gu}from"./edvxHiJh.js";import{b as Qi}from"./BLoR6-fV.js";import{b as Do}from"./goTpbPhD.js";import{ai as Ua,n as Ku}from"./BBuvJMq5.js";import{b as Zu}from"./DU4u3RKB.js";import{r as Bo}from"./BX6cGa3P.js";function Qu(r){if(!r||typeof r!="object")return null;const t=r;if(t.type!=="script_monitor_wake"||t.source!=="system")return null;const{scriptName:a,scriptId:s,runId:o,monitorId:i,workspaceId:l,reason:u}=t;if(typeof a!="string"||typeof s!="string"||!s||typeof o!="string"||!o||typeof i!="string"||!i||typeof l!="string"||!l||u!=="finished"&&u!=="ttl-expired"&&u!=="output-match"&&u!=="line-count")return null;const h=t.trigger;return{scriptName:a,scriptId:s,runId:o,monitorId:i,workspaceId:l,reason:u,...u==="output-match"&&typeof h?.matchedLine=="string"?{matchedLine:h.matchedLine}:{}}}function Yu(r){return r?.type==="script_monitor_wake"&&!("remoteAgentId"in r)}function Xu(r,t,a,s=!1){if(!r||!t)return{edit:!1,remove:!1,sendNow:!1};const o=r.messageMetadata?.fromPrincipalId??r.author?.principalId,i=Nu(r)&&r.author?.principalId!==null&&o===t;return{edit:i,remove:i||t===a||s,sendNow:(i||s)&&!Yi(r)}}function Tn(r,t){if(t)return r.find(a=>a.editing&&a.editingMessageId?a.editingMessageId===t:a.id===t)}function Yi(r){return Yu(r.messageMetadata)&&typeof r.messageMetadata?.monitorId=="string"}function Fo(r,t=Date.now()){const a=r.messageMetadata,s=a?.fromPrincipalId,o=a&&Object.hasOwn(a,"humanAuthor")&&!(typeof s=="string"&&s.length>0),i=r.holdKind!==void 0&&Date.parse(r.holdUntil??"")>t;return!r.editing&&!i&&!o&&!Yi(r)}const Cb="pl-3.5! pr-2!";var Ju=I('<span class="tile-remove-slot svelte-d8pwpf"><!></span>'),zo=I('<span class="attachment-status svelte-d8pwpf"> </span>'),ef=I('<div class="file-image tile svelte-d8pwpf" data-kind="file"><!> <!> <div class="tile-actions svelte-d8pwpf"><!> <!></div></div>'),tf=I("<!><span> </span>",1),rf=I('<img alt="" draggable="false"/>'),af=I('<span class="summary svelte-d8pwpf" data-clip-summary=""> </span>'),nf=I('<span class="clip svelte-d8pwpf"><span class="record-dot svelte-d8pwpf" aria-hidden="true"></span><span class="duration svelte-d8pwpf"> </span><!></span>'),sf=I('<div class="tile svelte-d8pwpf"><!> <!> <div class="tile-actions svelte-d8pwpf"><!> <!></div></div>'),of=I('<div class="attachment-row svelte-d8pwpf" role="group" data-dock-media-attachments=""></div>'),lf=I("<!> <!> <!>",1),df=I('<img draggable="false" class="svelte-d8pwpf"/>'),cf=I('<video controls="" playsinline="" class="svelte-d8pwpf"></video>',2),uf=I('<div class="media-viewer svelte-d8pwpf"><!></div>'),ff=I("<!> <!>",1);function gf(r,t){if(new.target)return pt({component:gf,...r});_t(t,!0);const a=(T,me=rr,le=rr)=>{var N=Ju(),ve=V(N);st(ve,{variant:"secondary",size:"icon-sm",class:"tile-action tile-remove",get disabled(){return i()},get"aria-label"(){return le()},tooltipContentClass:"dock-chrome-tooltip",get tooltip(){return le()},onclick:()=>z(me()),children:(Le,Ae)=>{Cs(Le,{glyph:"x"})},$$slots:{default:!0}}),F(N),c(T,N)};let s=g(t,"items",7),o=g(t,"labels",7),i=g(t,"disabled",7,!1),l=g(t,"onMarkUp",7),u=g(t,"onEdit",7),h=g(t,"onRemove",7),v=g(t,"onRetry",7),x=g(t,"onCopy",7),M=g(t,"onMenu",7);const B=T=>T.owner==="attachment"?2:{image:0,clip:1,file:2}[T.kind],U=n(()=>[...s()].sort((T,me)=>B(T)-B(me)));let w=ue(null),C=ue(!1),re=ue(null),G=null;const S=n(()=>s().find(T=>T.id===e(re)));Yt(()=>{(!e(S)||e(S).kind==="image"&&!j(e(S)))&&D(C,!1)});function j(T){return T.kind==="image"&&T.status!=="placing"&&T.status!=="failed"&&T.url.trim().length>0}function L(T){return T.kind==="image"?o().image(T.markCount):T.kind==="clip"?T.summary?`${o().clip(T.duration)} ${T.summary}`:o().clip(T.duration):T.name}function ne(T,me){if(!(i()||T.kind==="file"||T.kind==="image"&&!j(T)||T.kind==="clip"&&(!T.url||T.recording))){if((T.kind==="clip"||T.kind==="image")&&u()){u()(T.id);return}G=me,D(re,T.id,!0),D(C,!0)}}async function z(T){i()||(e(re)===T&&D(C,!1),h()(T),await Ia(),(!document.activeElement||document.activeElement===document.body)&&e(w)?.querySelector("button:not(:disabled)")?.focus())}function q(T){const me=s().find(le=>le.id===T);i()||!me||!j(me)||(D(C,!1),u()?u()(T):l()(T))}function ee(T,me){T.key!=="Delete"||i()||(T.preventDefault(),T.stopPropagation(),z(me))}function R(T){return T.status==="placing"||T.status==="failed"?!1:T.kind==="image"?!!T.file||j(T):T.kind==="clip"&&!T.recording&&!!T.url}function Y(T,me){const le=rd()?T.metaKey:T.ctrlKey,N=T.key.toLowerCase();if(le&&!T.shiftKey&&!T.altKey&&(N==="c"||N==="x")){if(!x()||!R(me)||(T.preventDefault(),T.stopPropagation(),N==="x"&&i()))return;x()(me.id,N==="x");return}ee(T,me.id)}function te(T,me){!M()||!R(me)||(T.preventDefault(),M()(me.id))}var _e={get items(){return s()},set items(T){s(T),m()},get labels(){return o()},set labels(T){o(T),m()},get disabled(){return i()},set disabled(T=!1){i(T),m()},get onMarkUp(){return l()},set onMarkUp(T){l(T),m()},get onEdit(){return u()},set onEdit(T){u(T),m()},get onRemove(){return h()},set onRemove(T){h(T),m()},get onRetry(){return v()},set onRetry(T){v(T),m()},get onCopy(){return x()},set onCopy(T){x(T),m()},get onMenu(){return M()},set onMenu(T){M(T),m()},$set:vt,$on:(T,me)=>ht(t,T,me)},de=ff(),ge=fe(de);{var Pe=T=>{var me=of();kr(me,21,()=>e(U),le=>le.id,(le,N)=>{var ve=St(),Le=fe(ve);{var Ae=xe=>{var P=ef(),X=V(P);{let W=n(()=>i()||e(N).status==="placing");wi(X,{get id(){return e(N).id},get name(){return e(N).file.name},get type(){return e(N).file.imageMimeType},get imageData(){return e(N).file.imageData},get imageMimeType(){return e(N).file.imageMimeType},variant:"thumbnail",thumbnailClass:"size-full",class:"size-full",get disabled(){return e(W)},get placementStatus(){return e(N).status},get placementError(){return e(N).error}})}var ae=A(X,2);{var we=W=>{var be=zo(),Re=oe(be,!0);$(()=>{J(be,"data-failed",e(N).status==="failed"||void 0),J(be,"role",e(N).status==="failed"?"alert":"status"),J(be,"title",e(N).error),Q(Re,e(N).status==="failed"?e(N).error??o().attachmentFailed:o().attachmentPending)}),c(W,be)};O(ae,W=>{e(N).status&&W(we)})}var _=A(ae,2),Se=V(_);{var Ce=W=>{st(W,{variant:"primary",size:"icon-sm",class:"tile-action",get disabled(){return i()},get"aria-label"(){return o().retry},tooltipContentClass:"dock-chrome-tooltip",get tooltip(){return o().retry},onclick:()=>v()?.(e(N).id),children:(be,Re)=>{Bt(be,{get icon(){return zs},size:16})},$$slots:{default:!0}})};O(Se,W=>{e(N).status==="failed"&&v()&&W(Ce)})}var E=A(Se,2);{let W=n(()=>d.chat_attachmentPreview_remove_ariaLabel({name:e(N).file.name}));a(E,()=>e(N).id,()=>e(W))}F(_),F(P),$(()=>J(P,"data-attachment-id",e(N).id)),xr("keydown",P,W=>Y(W,e(N))),xr("contextmenu",P,W=>te(W,e(N))),Kt(1,P,()=>On,()=>({tier:"fast",y:3,scale:.98})),Kt(2,P,()=>Xa,()=>({tier:"fast"})),c(xe,P)},Ee=xe=>{const P=n(()=>e(N).kind==="image"&&!j(e(N))&&e(N).status!=="failed");var X=sf(),ae=V(X);{var we=ke=>{st(ke,{type:"button",variant:"ghost",wrapContent:!1,class:"open-tile file",get"aria-label"(){return e(N).name},get disabled(){return i()},onkeydown:$e=>ee($e,e(N).id),children:($e,Oe)=>{var Ue=tf(),se=fe(Ue);Bt(se,{get icon(){return ka},size:20});var Ge=A(se),yt=oe(Ge,!0);$(()=>Q(yt,e(N).name)),c($e,Ue)},$$slots:{default:!0}})},_=ke=>{{let $e=n(()=>L(e(N))),Oe=n(()=>i()||e(N).kind==="clip"&&(e(N).recording||!e(N).url));st(ke,{type:"button",variant:"ghost",wrapContent:!1,class:"open-tile",get"aria-label"(){return e($e)},get disabled(){return e(Oe)},onkeydown:Ue=>Y(Ue,e(N)),onclick:Ue=>{Ue.currentTarget instanceof HTMLElement&&ne(e(N),Ue.currentTarget)},children:(Ue,se)=>{var Ge=St(),yt=fe(Ge);{var Ft=et=>{var Ke=rf();$(()=>J(Ke,"src",e(N).url)),c(et,Ke)},er=et=>{var Ke=nf(),$t=A(V(Ke)),Tt=oe($t,!0),ut=A($t);{var ze=K=>{var y=af(),pe=oe(y,!0);$(()=>Q(pe,e(N).summary)),c(K,y)};O(ut,K=>{e(N).summary&&K(ze)})}F(Ke),$(()=>Q(Tt,e(N).duration)),c(et,Ke)};O(yt,et=>{e(N).kind==="image"?et(Ft):et(er,-1)})}c(Ue,Ge)},$$slots:{default:!0}})}},Se=n(()=>e(N).kind!=="image"||j(e(N)));O(ae,ke=>{e(N).kind==="file"?ke(we):e(Se)&&ke(_,1)})}var Ce=A(ae,2);{var E=ke=>{var $e=zo(),Oe=oe($e,!0);$(()=>{J($e,"data-failed",e(N).status==="failed"||void 0),J($e,"role",e(N).status==="failed"?"alert":"status"),J($e,"title",e(N).error),Q(Oe,e(N).status==="failed"?e(N).error??o().attachmentFailed:o().attachmentPending)}),c(ke,$e)};O(Ce,ke=>{(e(N).status||e(P))&&ke(E)})}var W=A(Ce,2),be=V(W);{var Re=ke=>{st(ke,{variant:"primary",size:"icon-sm",class:"tile-action",get disabled(){return i()},get"aria-label"(){return o().retry},tooltipContentClass:"dock-chrome-tooltip",get tooltip(){return o().retry},onclick:()=>v()?.(e(N).id),children:($e,Oe)=>{Bt($e,{get icon(){return zs},size:16})},$$slots:{default:!0}})},Ve=ke=>{{let $e=n(()=>u()?o().edit:o().markUp),Oe=n(()=>u()?o().edit:o().markUp);st(ke,{variant:"primary",size:"icon-sm",class:"tile-action",get disabled(){return i()},get"aria-label"(){return e($e)},tooltipContentClass:"dock-chrome-tooltip",get tooltip(){return e(Oe)},onclick:()=>q(e(N).id),children:(Ue,se)=>{Cs(Ue,{glyph:"pencil"})},$$slots:{default:!0}})}},De=n(()=>j(e(N))),Et=ke=>{{let $e=n(()=>u()?o().edit:o().play),Oe=n(()=>u()?o().edit:o().play);st(ke,{variant:"primary",size:"icon-sm",class:"tile-action",get disabled(){return i()},get"aria-label"(){return e($e)},tooltipContentClass:"dock-chrome-tooltip",get tooltip(){return e(Oe)},onclick:Ue=>{Ue.currentTarget instanceof HTMLElement&&ne(e(N),Ue.currentTarget)},children:(Ue,se)=>{{let Ge=n(()=>u()?"pencil":"play");Cs(Ue,{get glyph(){return e(Ge)}})}},$$slots:{default:!0}})}};O(be,ke=>{e(N).status==="failed"&&v()?ke(Re):e(De)?ke(Ve,1):e(N).kind==="clip"&&!e(N).recording&&e(N).url&&ke(Et,2)})}var ye=A(be,2);a(ye,()=>e(N).id,()=>o().remove),F(W),F(X),$(()=>{J(X,"data-kind",e(N).kind),J(X,"data-attachment-id",e(N).id),J(X,"aria-busy",e(P)||void 0)}),xr("contextmenu",X,ke=>te(ke,e(N))),Kt(1,X,()=>On,()=>({tier:"fast",y:3,scale:.98})),Kt(2,X,()=>Xa,()=>({tier:"fast"})),c(xe,X)};O(Le,xe=>{e(N).kind==="image"&&e(N).file?xe(Ae):xe(Ee,-1)})}c(le,ve)}),F(me),ea(me,le=>D(w,le),()=>e(w)),$(()=>J(me,"aria-label",o().attachments)),c(T,me)};O(ge,T=>{e(U).length&&T(Pe)})}var Ie=A(ge,2);{const T=le=>{var N=St(),ve=fe(N);{var Le=Ae=>{var Ee=lf(),xe=fe(Ee);{var P=_=>{st(_,{variant:"primary",get disabled(){return i()},onclick:()=>e(S)&&q(e(S).id),children:(Se,Ce)=>{Cr();var E=Pr();$(()=>Q(E,o().markUp)),c(Se,E)},$$slots:{default:!0}})},X=n(()=>j(e(S)));O(xe,_=>{e(X)&&_(P)})}var ae=A(xe,2);st(ae,{variant:"secondary",get disabled(){return i()},onclick:()=>e(S)&&z(e(S).id),children:(_,Se)=>{Cr();var Ce=Pr();$(()=>Q(Ce,o().remove)),c(_,Ce)},$$slots:{default:!0}});var we=A(ae,2);st(we,{variant:"ghost-light",onclick:()=>{D(C,!1)},children:(_,Se)=>{Cr();var Ce=Pr();$(()=>Q(Ce,o().done)),c(_,Ce)},$$slots:{default:!0}}),c(Ae,Ee)};O(ve,Ae=>{e(S)&&e(S).kind!=="file"&&Ae(Le)})}c(le,N)};let me=n(()=>e(S)?L(e(S)):o().attachments);yi(Ie,{get title(){return e(me)},size:"wide",showCloseButton:!1,onCloseAutoFocus:le=>{le.preventDefault(),G?.isConnected?G.focus():e(w)?.querySelector("button:not(:disabled)")?.focus()},get open(){return e(C)},set open(le){D(C,le,!0)},footer:T,children:(le,N)=>{var ve=St(),Le=fe(ve);{var Ae=Ee=>{var xe=uf(),P=V(xe);{var X=_=>{var Se=df();$(Ce=>{J(Se,"src",e(S).url),J(Se,"alt",Ce)},[()=>L(e(S))]),c(_,Se)},ae=n(()=>e(S).kind==="image"&&j(e(S))),we=_=>{var Se=cf();$(Ce=>{J(Se,"src",e(S).url),J(Se,"aria-label",Ce)},[()=>L(e(S))]),c(_,Se)};O(P,_=>{e(ae)?_(X):e(S).kind==="clip"&&e(S).url&&_(we,1)})}F(xe),c(Ee,xe)};O(Le,Ee=>{e(S)&&e(S).kind!=="file"&&Ee(Ae)})}c(le,ve)},$$slots:{footer:!0,default:!0}})}return c(r,de),bt(_e)}Ga(["keydown","contextmenu"]);var mf=I("<!> ",1),pf=I('<div class="flex flex-col gap-2 px-4 py-3 bg-muted/30 border border-border rounded-lg my-4"><div class="flex items-center justify-between gap-2"><div class="flex items-center gap-2"><div class="shrink-0 text-subtle"><!></div> <div class="font-medium text-sm"> </div></div> <div class="flex items-center gap-1"><!> <!></div></div> <div class="text-xs text-subtle"> </div> <pre class="text-xs bg-background/50 rounded p-2 overflow-x-auto max-h-40 overflow-y-auto font-mono"> </pre></div>');function Xi(r,t){if(new.target)return pt({component:Xi,...r});_t(t,!0);let a=g(t,"name",7),s=g(t,"description",7),o=g(t,"content",7),i=g(t,"onUseScript",7),l=ue(!1);function u(){navigator.clipboard.writeText(o()),D(l,!0),setTimeout(()=>{D(l,!1)},2e3)}function h(){i()?.({name:a(),description:s(),content:o()})}var v={get name(){return a()},set name(R){a(R),m()},get description(){return s()},set description(R){s(R),m()},get content(){return o()},set content(R){o(R),m()},get onUseScript(){return i()},set onUseScript(R){i(R),m()},$set:vt,$on:(R,Y)=>ht(t,R,Y)},x=pf(),M=V(x),B=V(M),U=V(B),w=V(U);Bt(w,{get icon(){return ps},size:"sm"}),F(U);var C=A(U,2),re=oe(C,!0);F(B);var G=A(B,2),S=V(G);st(S,{variant:"ghost-light",size:"sm",onclick:u,class:"h-7 px-2",children:(R,Y)=>{var te=mf(),_e=fe(te);{let ge=n(()=>e(l)?hi:_i);Bt(_e,{get icon(){return e(ge)},class:"mr-1"})}var de=A(_e);$(ge=>Q(de,` ${ge??""}`),[()=>e(l)?d.chat_shared_copied_label():d.chat_shared_copy_label()]),c(R,te)},$$slots:{default:!0}});var j=A(S,2);{var L=R=>{st(R,{variant:"ghost-light",size:"sm",onclick:h,class:"h-7 px-2",children:(Y,te)=>{Cr();var _e=Pr();$(de=>Q(_e,de),[()=>d.chat_setupScriptCard_useScript_label()]),c(Y,_e)},$$slots:{default:!0}})};O(j,R=>{i()&&R(L)})}F(G),F(M);var ne=A(M,2),z=oe(ne,!0),q=A(ne,2),ee=oe(q,!0);return F(x),$(()=>{Q(re,a()),Q(z,s()),Q(ee,o())}),c(r,x),bt(v)}const yr={toolStart:/(?:\x1B\[\d+m)?🔧\s+(?:Tool call:\s+)?(.+?)(?:\x1B\[0m)?$/,toolDetail:/(?:[└├]─\s+(.+)$|^\s{3,}(.+)$)/,toolResult:/(?:\x1B\[\d+m)?📋\s+Tool result:\s+(.+?)(?:\x1B\[0m)?$/,toolSuccess:/[✓✔✅]\s+(.+)$/,toolError:/[❌✗❎]\s+(.+)$/,sessionInfo:/[Ss]ession:\s*([a-f0-9-]+)/,resumedSession:/📂?\s*Resumed session/i,assistantMarker:/🤖/,systemMarker:/💻/,userMarker:/👤/,thinkingMarker:/🤔\s*Thinking/i,waitingMarker:/^⏳\s+Running/i,indexingProgress:/^Indexing:\s*\[.*\]\s*\d+%/,agentDigest:/<agent_digest>([\s\S]*?)<\/agent_digest>/,setupScript:/<setup_script\s+name="([^"]+)"\s+description="([^"]+)">([\s\S]*?)<\/setup_script>/};class vf{constructor(){pa(this,"buffer","");pa(this,"currentToolName",null);pa(this,"currentToolId",null);pa(this,"lastToolId",null);pa(this,"currentToolParams",[]);pa(this,"currentToolResultContent",[]);pa(this,"inToolResult",!1);pa(this,"inCodeBlock",!1);pa(this,"codeBlockLanguage","");pa(this,"codeBlockContent","");pa(this,"characterBuffer","");pa(this,"inCharacterMode",!1);pa(this,"emittedToolIds",new Set)}parseChunk(t){if(this.isMarkerLine(t.trim())){const o=[];if(this.inToolResult&&this.currentToolResultContent.length>0){const u=this.currentToolResultContent.some(v=>v.startsWith("❌")||v.startsWith("Error:")),h=this.currentToolResultContent.map(v=>v.replace(/^❌\s*/,"").replace(/^Error:\s*/,"")).join(`
|
|
1
|
+
var Ul=Object.defineProperty;var jl=(r,t,a)=>t in r?Ul(r,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):r[t]=a;var pa=(r,t,a)=>jl(r,typeof t!="symbol"?t+"":t,a);import{t as pt,bo as g,bw as vt,b as ht,bm as d,bq as Ea,bs as tr,br as Vl,bp as vn}from"./Fcr7AvC-.js";import{ai as Ga,bs as _t,ca as Yt,aD as e,bH as D,ay as fe,bS as A,a7 as St,W as c,a5 as V,bA as F,bn as bt,c9 as n,bV as ue,aA as m,b_ as $,aj as xr,aB as I,be as Cr,b$ as Pr,bO as Q,bf as rr,c0 as Ia,bl as oe,bj as ja,c6 as Gl,bo as nn,br as Zr,am as Da,ax as Ba,bk as as,aw as pn,bz as ns,cb as Fn,c5 as Mn,aC as Ir,cd as vo,bv as Kl}from"./3SdAC2_C.js";import{i as O}from"./BhYXv0ZM.js";import{g as kr,e as sa,p as ms,i as Ha,I as Zl,h as eo,X as pi,o as Ql}from"./CA6H1-bp.js";import{n as Kt,l as On,c as Xa,g as rn,s as ks,k as ss,S as Yl}from"./CxR-pcVt.js";import{s as J,f as Fe,g as hn,c as It,e as Qt,b as _n,p as Xl,S as Jl,C as ed}from"./BRCr02in.js";import{b as ea}from"./Dn334wJv.js";import{f as st,ae as to,a_ as td}from"./D-lOH49i.js";import{J as rd,O as ad,Q as Is}from"./pYdPYEfN.js";import"./x4bPxhVW.js";import"./BzXQ5SMs.js";import"./O5ZlQHf9.js";import{t as Ma,k as vi}from"./CWfjuhY2.js";import{F as Bt,a4 as zs,bg as ka,cK as ps,au as hi,aZ as _i,aK as nd,c9 as sd,a6 as os,aN as od,cN as id,cM as ld,a3 as vs,aC as is,aw as hs,I as ho,aj as dd,bu as cd,aS as ud,aX as fd,bJ as gd,ao as md,bk as bi,cC as pd,aP as _o,c0 as Ss,aI as Hn,cW as vd,cb as hd,bn as _d,b as bd,cp as yd,ag as wd,ba as Ts,cr as wn,cF as xd,az as kd,c6 as Id,d3 as Sd}from"./ChHRVjww.js";import{C as yi,A as Td,o as Cd}from"./CBbhUF1U.js";import{b as Cs,V as bo}from"./dvKmN4h6.js";import{A as wi}from"./CVhLsbHu.js";import{bZ as xi,aj as Md,j as Kn,a4 as Ws,al as ls,E as Ad,au as Zn,aP as Pd,aS as yo}from"./Db6ExzGF.js";import{t as an,o as Rd}from"./DAsc1V4f.js";import{ch as Qn,aO as qn,d3 as ki,d5 as Va,c6 as _s,q as Nd,cY as Ii,d2 as bs,d1 as Si,c$ as Ti,n as Ca,al as Ed,am as $d,aJ as Ld,z as Od,V as qd,a3 as wo,D as Ci,e5 as Dd,aF as Bd,ak as Fd,r as zd,C as Ms,ag as Wd,U as xn,e3 as Hd,ab as Ud,k as xo,u as jd,Z as Vd,v as Gd,i as Kd,g as As,f as ko,a0 as Zd,$ as Qd,a9 as Yd,x as Mi,y as Ai,l as Pi,j as Xd,s as Jd,a as ec,d6 as tc,ae as rc,e4 as ac,L as nc,F as sc,a2 as Io,bq as oc,av as ic}from"./Cq6hdiVw.js";import{JH as mt,p0 as lc,tR as Yn,nR as So,vK as Ri,vM as Ni,s2 as dc,yJ as ds,v1 as Ei,nM as $i,br as En,nZ as cc,n_ as uc,yK as fc,qA as gc,tl as mc,vD as Li,nL as pc,mP as vc,m as hc,zk as _c,zh as bc,zj as yc}from"./D0qhIm1r.js";import{a3 as wc,y as Ps,a1 as xc,O as Rs,W as kc,$ as Ic,k as Sc,p as kn,P as un,q as Tc,G as Cc,v as Mc,t as Ac,M as Ns,K as Pc,z as Rc,L as Nc,_ as An,U as Un,N as To,n as Co,E as Ec,c as Es,F as Mo,B as $c,w as Ao,J as Pn,Q as Lc,H as Oc,j as qc,R as Dc,T as Bc,A as Fc,g as zc,b as Wc,D as Hc,f as Uc,e as jc,a as Vc,C as Gc,i as Kc,d as Hs,V as Oi,a4 as Zc,u as Qc,l as Yc}from"./CBdW99Fh.js";import{i as Xc,e as Jc}from"./BwweojP5.js";import{g as $s}from"./B5aYN90J.js";import{M as In,C as Rn}from"./Cym4zMqt.js";import{C as Po}from"./DOvLLu-_.js";import"./B92LVVZl.js";import{P as eu}from"./CPCJiIPK.js";import"./D6H34kDj.js";import{c as qi}from"./ChTqQfQN.js";import{S as tu}from"./C0ZUrdOo.js";import{D as Ro,M as ru}from"./Cdwy3-nO.js";import{b as au,s as en,c as cs}from"./BhsjECB4.js";import{O as Xn,y as Ls,E as Os,B as qs,N as nu,m as su,l as ou,k as iu,d as Dn,C as No,f as lu,e as du,g as cu}from"./BvpvfHPp.js";import{a as Di,s as Eo}from"./BsieX9dN.js";import{f as uu}from"./BdWqymET.js";import{c as na}from"./CK3fpDUl.js";import{a as fu,k as Bi,h as ro,q as Fi,l as wr}from"./C7b3vXLD.js";import{P as gu}from"./CpIcQB5T.js";import{r as Ds,q as Bs,B as $o,i as mu}from"./DgClg_4p.js";import{R as zi,C as ys,m as pu,h as vu,g as hu,i as Lo,P as _u}from"./qB07BmZl.js";import"./DRMe5Ypb.js";import{c as bu,s as yu}from"./Cj92J6fP.js";import{h as gn}from"./D7rcwg4U.js";import{b as wu,a as Wi}from"./DqVocOV1.js";import{P as Hi}from"./ZmAQurQV.js";import{B as xu}from"./DBy_x3yG.js";import{o as Ui,r as ku,e as Iu}from"./DcU97JoW.js";import{o as ji}from"./PbtuJhxQ.js";import{A as Jn,b as Vi}from"./B8hXRSlI.js";import{g as ao}from"./D_jEt7ej.js";import{a as Su,M as Tu}from"./Ccf5U4O_.js";import{a as Gi}from"./Tgw7Kdvt.js";import{E as Cu,n as Mu}from"./54ZDusyh.js";import{t as Tr}from"./C-BsEdGZ.js";import{c as Sn}from"./2z64ELW5.js";import{A as Au}from"./D4VyuyJv.js";import{f as Pu,d as Ru}from"./CJtBv95U.js";import{ad as Nu,P as Eu,Z as $u,L as Oo,Y as Lu,w as Ou,a0 as Ki,$ as Zi}from"./DYo8C3ZI.js";import{a as qu}from"./CC7to1B5.js";import{k as Du}from"./Cc0763mU.js";import{S as Bu}from"./c5wypyPV.js";import{u as Fu,a as zu,c as qo,S as Wu}from"./D9tVylVS.js";import{T as us}from"./YAuWnPYv.js";import"./lK1e5NlM.js";import{g as Hu,a as Uu}from"./DReNFETs.js";import{I as ju,R as Vu,q as Gu}from"./Ce5Cs6SN.js";import{b as Qi}from"./BLoR6-fV.js";import{b as Do}from"./goTpbPhD.js";import{ai as Ua,n as Ku}from"./BBuvJMq5.js";import{b as Zu}from"./CVgSN9ZH.js";import{r as Bo}from"./1p87nGiH.js";function Qu(r){if(!r||typeof r!="object")return null;const t=r;if(t.type!=="script_monitor_wake"||t.source!=="system")return null;const{scriptName:a,scriptId:s,runId:o,monitorId:i,workspaceId:l,reason:u}=t;if(typeof a!="string"||typeof s!="string"||!s||typeof o!="string"||!o||typeof i!="string"||!i||typeof l!="string"||!l||u!=="finished"&&u!=="ttl-expired"&&u!=="output-match"&&u!=="line-count")return null;const h=t.trigger;return{scriptName:a,scriptId:s,runId:o,monitorId:i,workspaceId:l,reason:u,...u==="output-match"&&typeof h?.matchedLine=="string"?{matchedLine:h.matchedLine}:{}}}function Yu(r){return r?.type==="script_monitor_wake"&&!("remoteAgentId"in r)}function Xu(r,t,a,s=!1){if(!r||!t)return{edit:!1,remove:!1,sendNow:!1};const o=r.messageMetadata?.fromPrincipalId??r.author?.principalId,i=Nu(r)&&r.author?.principalId!==null&&o===t;return{edit:i,remove:i||t===a||s,sendNow:(i||s)&&!Yi(r)}}function Tn(r,t){if(t)return r.find(a=>a.editing&&a.editingMessageId?a.editingMessageId===t:a.id===t)}function Yi(r){return Yu(r.messageMetadata)&&typeof r.messageMetadata?.monitorId=="string"}function Fo(r,t=Date.now()){const a=r.messageMetadata,s=a?.fromPrincipalId,o=a&&Object.hasOwn(a,"humanAuthor")&&!(typeof s=="string"&&s.length>0),i=r.holdKind!==void 0&&Date.parse(r.holdUntil??"")>t;return!r.editing&&!i&&!o&&!Yi(r)}const Cb="pl-3.5! pr-2!";var Ju=I('<span class="tile-remove-slot svelte-d8pwpf"><!></span>'),zo=I('<span class="attachment-status svelte-d8pwpf"> </span>'),ef=I('<div class="file-image tile svelte-d8pwpf" data-kind="file"><!> <!> <div class="tile-actions svelte-d8pwpf"><!> <!></div></div>'),tf=I("<!><span> </span>",1),rf=I('<img alt="" draggable="false"/>'),af=I('<span class="summary svelte-d8pwpf" data-clip-summary=""> </span>'),nf=I('<span class="clip svelte-d8pwpf"><span class="record-dot svelte-d8pwpf" aria-hidden="true"></span><span class="duration svelte-d8pwpf"> </span><!></span>'),sf=I('<div class="tile svelte-d8pwpf"><!> <!> <div class="tile-actions svelte-d8pwpf"><!> <!></div></div>'),of=I('<div class="attachment-row svelte-d8pwpf" role="group" data-dock-media-attachments=""></div>'),lf=I("<!> <!> <!>",1),df=I('<img draggable="false" class="svelte-d8pwpf"/>'),cf=I('<video controls="" playsinline="" class="svelte-d8pwpf"></video>',2),uf=I('<div class="media-viewer svelte-d8pwpf"><!></div>'),ff=I("<!> <!>",1);function gf(r,t){if(new.target)return pt({component:gf,...r});_t(t,!0);const a=(T,me=rr,le=rr)=>{var N=Ju(),ve=V(N);st(ve,{variant:"secondary",size:"icon-sm",class:"tile-action tile-remove",get disabled(){return i()},get"aria-label"(){return le()},tooltipContentClass:"dock-chrome-tooltip",get tooltip(){return le()},onclick:()=>z(me()),children:(Le,Ae)=>{Cs(Le,{glyph:"x"})},$$slots:{default:!0}}),F(N),c(T,N)};let s=g(t,"items",7),o=g(t,"labels",7),i=g(t,"disabled",7,!1),l=g(t,"onMarkUp",7),u=g(t,"onEdit",7),h=g(t,"onRemove",7),v=g(t,"onRetry",7),x=g(t,"onCopy",7),M=g(t,"onMenu",7);const B=T=>T.owner==="attachment"?2:{image:0,clip:1,file:2}[T.kind],U=n(()=>[...s()].sort((T,me)=>B(T)-B(me)));let w=ue(null),C=ue(!1),re=ue(null),G=null;const S=n(()=>s().find(T=>T.id===e(re)));Yt(()=>{(!e(S)||e(S).kind==="image"&&!j(e(S)))&&D(C,!1)});function j(T){return T.kind==="image"&&T.status!=="placing"&&T.status!=="failed"&&T.url.trim().length>0}function L(T){return T.kind==="image"?o().image(T.markCount):T.kind==="clip"?T.summary?`${o().clip(T.duration)} ${T.summary}`:o().clip(T.duration):T.name}function ne(T,me){if(!(i()||T.kind==="file"||T.kind==="image"&&!j(T)||T.kind==="clip"&&(!T.url||T.recording))){if((T.kind==="clip"||T.kind==="image")&&u()){u()(T.id);return}G=me,D(re,T.id,!0),D(C,!0)}}async function z(T){i()||(e(re)===T&&D(C,!1),h()(T),await Ia(),(!document.activeElement||document.activeElement===document.body)&&e(w)?.querySelector("button:not(:disabled)")?.focus())}function q(T){const me=s().find(le=>le.id===T);i()||!me||!j(me)||(D(C,!1),u()?u()(T):l()(T))}function ee(T,me){T.key!=="Delete"||i()||(T.preventDefault(),T.stopPropagation(),z(me))}function R(T){return T.status==="placing"||T.status==="failed"?!1:T.kind==="image"?!!T.file||j(T):T.kind==="clip"&&!T.recording&&!!T.url}function Y(T,me){const le=rd()?T.metaKey:T.ctrlKey,N=T.key.toLowerCase();if(le&&!T.shiftKey&&!T.altKey&&(N==="c"||N==="x")){if(!x()||!R(me)||(T.preventDefault(),T.stopPropagation(),N==="x"&&i()))return;x()(me.id,N==="x");return}ee(T,me.id)}function te(T,me){!M()||!R(me)||(T.preventDefault(),M()(me.id))}var _e={get items(){return s()},set items(T){s(T),m()},get labels(){return o()},set labels(T){o(T),m()},get disabled(){return i()},set disabled(T=!1){i(T),m()},get onMarkUp(){return l()},set onMarkUp(T){l(T),m()},get onEdit(){return u()},set onEdit(T){u(T),m()},get onRemove(){return h()},set onRemove(T){h(T),m()},get onRetry(){return v()},set onRetry(T){v(T),m()},get onCopy(){return x()},set onCopy(T){x(T),m()},get onMenu(){return M()},set onMenu(T){M(T),m()},$set:vt,$on:(T,me)=>ht(t,T,me)},de=ff(),ge=fe(de);{var Pe=T=>{var me=of();kr(me,21,()=>e(U),le=>le.id,(le,N)=>{var ve=St(),Le=fe(ve);{var Ae=xe=>{var P=ef(),X=V(P);{let W=n(()=>i()||e(N).status==="placing");wi(X,{get id(){return e(N).id},get name(){return e(N).file.name},get type(){return e(N).file.imageMimeType},get imageData(){return e(N).file.imageData},get imageMimeType(){return e(N).file.imageMimeType},variant:"thumbnail",thumbnailClass:"size-full",class:"size-full",get disabled(){return e(W)},get placementStatus(){return e(N).status},get placementError(){return e(N).error}})}var ae=A(X,2);{var we=W=>{var be=zo(),Re=oe(be,!0);$(()=>{J(be,"data-failed",e(N).status==="failed"||void 0),J(be,"role",e(N).status==="failed"?"alert":"status"),J(be,"title",e(N).error),Q(Re,e(N).status==="failed"?e(N).error??o().attachmentFailed:o().attachmentPending)}),c(W,be)};O(ae,W=>{e(N).status&&W(we)})}var _=A(ae,2),Se=V(_);{var Ce=W=>{st(W,{variant:"primary",size:"icon-sm",class:"tile-action",get disabled(){return i()},get"aria-label"(){return o().retry},tooltipContentClass:"dock-chrome-tooltip",get tooltip(){return o().retry},onclick:()=>v()?.(e(N).id),children:(be,Re)=>{Bt(be,{get icon(){return zs},size:16})},$$slots:{default:!0}})};O(Se,W=>{e(N).status==="failed"&&v()&&W(Ce)})}var E=A(Se,2);{let W=n(()=>d.chat_attachmentPreview_remove_ariaLabel({name:e(N).file.name}));a(E,()=>e(N).id,()=>e(W))}F(_),F(P),$(()=>J(P,"data-attachment-id",e(N).id)),xr("keydown",P,W=>Y(W,e(N))),xr("contextmenu",P,W=>te(W,e(N))),Kt(1,P,()=>On,()=>({tier:"fast",y:3,scale:.98})),Kt(2,P,()=>Xa,()=>({tier:"fast"})),c(xe,P)},Ee=xe=>{const P=n(()=>e(N).kind==="image"&&!j(e(N))&&e(N).status!=="failed");var X=sf(),ae=V(X);{var we=ke=>{st(ke,{type:"button",variant:"ghost",wrapContent:!1,class:"open-tile file",get"aria-label"(){return e(N).name},get disabled(){return i()},onkeydown:$e=>ee($e,e(N).id),children:($e,Oe)=>{var Ue=tf(),se=fe(Ue);Bt(se,{get icon(){return ka},size:20});var Ge=A(se),yt=oe(Ge,!0);$(()=>Q(yt,e(N).name)),c($e,Ue)},$$slots:{default:!0}})},_=ke=>{{let $e=n(()=>L(e(N))),Oe=n(()=>i()||e(N).kind==="clip"&&(e(N).recording||!e(N).url));st(ke,{type:"button",variant:"ghost",wrapContent:!1,class:"open-tile",get"aria-label"(){return e($e)},get disabled(){return e(Oe)},onkeydown:Ue=>Y(Ue,e(N)),onclick:Ue=>{Ue.currentTarget instanceof HTMLElement&&ne(e(N),Ue.currentTarget)},children:(Ue,se)=>{var Ge=St(),yt=fe(Ge);{var Ft=et=>{var Ke=rf();$(()=>J(Ke,"src",e(N).url)),c(et,Ke)},er=et=>{var Ke=nf(),$t=A(V(Ke)),Tt=oe($t,!0),ut=A($t);{var ze=K=>{var y=af(),pe=oe(y,!0);$(()=>Q(pe,e(N).summary)),c(K,y)};O(ut,K=>{e(N).summary&&K(ze)})}F(Ke),$(()=>Q(Tt,e(N).duration)),c(et,Ke)};O(yt,et=>{e(N).kind==="image"?et(Ft):et(er,-1)})}c(Ue,Ge)},$$slots:{default:!0}})}},Se=n(()=>e(N).kind!=="image"||j(e(N)));O(ae,ke=>{e(N).kind==="file"?ke(we):e(Se)&&ke(_,1)})}var Ce=A(ae,2);{var E=ke=>{var $e=zo(),Oe=oe($e,!0);$(()=>{J($e,"data-failed",e(N).status==="failed"||void 0),J($e,"role",e(N).status==="failed"?"alert":"status"),J($e,"title",e(N).error),Q(Oe,e(N).status==="failed"?e(N).error??o().attachmentFailed:o().attachmentPending)}),c(ke,$e)};O(Ce,ke=>{(e(N).status||e(P))&&ke(E)})}var W=A(Ce,2),be=V(W);{var Re=ke=>{st(ke,{variant:"primary",size:"icon-sm",class:"tile-action",get disabled(){return i()},get"aria-label"(){return o().retry},tooltipContentClass:"dock-chrome-tooltip",get tooltip(){return o().retry},onclick:()=>v()?.(e(N).id),children:($e,Oe)=>{Bt($e,{get icon(){return zs},size:16})},$$slots:{default:!0}})},Ve=ke=>{{let $e=n(()=>u()?o().edit:o().markUp),Oe=n(()=>u()?o().edit:o().markUp);st(ke,{variant:"primary",size:"icon-sm",class:"tile-action",get disabled(){return i()},get"aria-label"(){return e($e)},tooltipContentClass:"dock-chrome-tooltip",get tooltip(){return e(Oe)},onclick:()=>q(e(N).id),children:(Ue,se)=>{Cs(Ue,{glyph:"pencil"})},$$slots:{default:!0}})}},De=n(()=>j(e(N))),Et=ke=>{{let $e=n(()=>u()?o().edit:o().play),Oe=n(()=>u()?o().edit:o().play);st(ke,{variant:"primary",size:"icon-sm",class:"tile-action",get disabled(){return i()},get"aria-label"(){return e($e)},tooltipContentClass:"dock-chrome-tooltip",get tooltip(){return e(Oe)},onclick:Ue=>{Ue.currentTarget instanceof HTMLElement&&ne(e(N),Ue.currentTarget)},children:(Ue,se)=>{{let Ge=n(()=>u()?"pencil":"play");Cs(Ue,{get glyph(){return e(Ge)}})}},$$slots:{default:!0}})}};O(be,ke=>{e(N).status==="failed"&&v()?ke(Re):e(De)?ke(Ve,1):e(N).kind==="clip"&&!e(N).recording&&e(N).url&&ke(Et,2)})}var ye=A(be,2);a(ye,()=>e(N).id,()=>o().remove),F(W),F(X),$(()=>{J(X,"data-kind",e(N).kind),J(X,"data-attachment-id",e(N).id),J(X,"aria-busy",e(P)||void 0)}),xr("contextmenu",X,ke=>te(ke,e(N))),Kt(1,X,()=>On,()=>({tier:"fast",y:3,scale:.98})),Kt(2,X,()=>Xa,()=>({tier:"fast"})),c(xe,X)};O(Le,xe=>{e(N).kind==="image"&&e(N).file?xe(Ae):xe(Ee,-1)})}c(le,ve)}),F(me),ea(me,le=>D(w,le),()=>e(w)),$(()=>J(me,"aria-label",o().attachments)),c(T,me)};O(ge,T=>{e(U).length&&T(Pe)})}var Ie=A(ge,2);{const T=le=>{var N=St(),ve=fe(N);{var Le=Ae=>{var Ee=lf(),xe=fe(Ee);{var P=_=>{st(_,{variant:"primary",get disabled(){return i()},onclick:()=>e(S)&&q(e(S).id),children:(Se,Ce)=>{Cr();var E=Pr();$(()=>Q(E,o().markUp)),c(Se,E)},$$slots:{default:!0}})},X=n(()=>j(e(S)));O(xe,_=>{e(X)&&_(P)})}var ae=A(xe,2);st(ae,{variant:"secondary",get disabled(){return i()},onclick:()=>e(S)&&z(e(S).id),children:(_,Se)=>{Cr();var Ce=Pr();$(()=>Q(Ce,o().remove)),c(_,Ce)},$$slots:{default:!0}});var we=A(ae,2);st(we,{variant:"ghost-light",onclick:()=>{D(C,!1)},children:(_,Se)=>{Cr();var Ce=Pr();$(()=>Q(Ce,o().done)),c(_,Ce)},$$slots:{default:!0}}),c(Ae,Ee)};O(ve,Ae=>{e(S)&&e(S).kind!=="file"&&Ae(Le)})}c(le,N)};let me=n(()=>e(S)?L(e(S)):o().attachments);yi(Ie,{get title(){return e(me)},size:"wide",showCloseButton:!1,onCloseAutoFocus:le=>{le.preventDefault(),G?.isConnected?G.focus():e(w)?.querySelector("button:not(:disabled)")?.focus()},get open(){return e(C)},set open(le){D(C,le,!0)},footer:T,children:(le,N)=>{var ve=St(),Le=fe(ve);{var Ae=Ee=>{var xe=uf(),P=V(xe);{var X=_=>{var Se=df();$(Ce=>{J(Se,"src",e(S).url),J(Se,"alt",Ce)},[()=>L(e(S))]),c(_,Se)},ae=n(()=>e(S).kind==="image"&&j(e(S))),we=_=>{var Se=cf();$(Ce=>{J(Se,"src",e(S).url),J(Se,"aria-label",Ce)},[()=>L(e(S))]),c(_,Se)};O(P,_=>{e(ae)?_(X):e(S).kind==="clip"&&e(S).url&&_(we,1)})}F(xe),c(Ee,xe)};O(Le,Ee=>{e(S)&&e(S).kind!=="file"&&Ee(Ae)})}c(le,ve)},$$slots:{footer:!0,default:!0}})}return c(r,de),bt(_e)}Ga(["keydown","contextmenu"]);var mf=I("<!> ",1),pf=I('<div class="flex flex-col gap-2 px-4 py-3 bg-muted/30 border border-border rounded-lg my-4"><div class="flex items-center justify-between gap-2"><div class="flex items-center gap-2"><div class="shrink-0 text-subtle"><!></div> <div class="font-medium text-sm"> </div></div> <div class="flex items-center gap-1"><!> <!></div></div> <div class="text-xs text-subtle"> </div> <pre class="text-xs bg-background/50 rounded p-2 overflow-x-auto max-h-40 overflow-y-auto font-mono"> </pre></div>');function Xi(r,t){if(new.target)return pt({component:Xi,...r});_t(t,!0);let a=g(t,"name",7),s=g(t,"description",7),o=g(t,"content",7),i=g(t,"onUseScript",7),l=ue(!1);function u(){navigator.clipboard.writeText(o()),D(l,!0),setTimeout(()=>{D(l,!1)},2e3)}function h(){i()?.({name:a(),description:s(),content:o()})}var v={get name(){return a()},set name(R){a(R),m()},get description(){return s()},set description(R){s(R),m()},get content(){return o()},set content(R){o(R),m()},get onUseScript(){return i()},set onUseScript(R){i(R),m()},$set:vt,$on:(R,Y)=>ht(t,R,Y)},x=pf(),M=V(x),B=V(M),U=V(B),w=V(U);Bt(w,{get icon(){return ps},size:"sm"}),F(U);var C=A(U,2),re=oe(C,!0);F(B);var G=A(B,2),S=V(G);st(S,{variant:"ghost-light",size:"sm",onclick:u,class:"h-7 px-2",children:(R,Y)=>{var te=mf(),_e=fe(te);{let ge=n(()=>e(l)?hi:_i);Bt(_e,{get icon(){return e(ge)},class:"mr-1"})}var de=A(_e);$(ge=>Q(de,` ${ge??""}`),[()=>e(l)?d.chat_shared_copied_label():d.chat_shared_copy_label()]),c(R,te)},$$slots:{default:!0}});var j=A(S,2);{var L=R=>{st(R,{variant:"ghost-light",size:"sm",onclick:h,class:"h-7 px-2",children:(Y,te)=>{Cr();var _e=Pr();$(de=>Q(_e,de),[()=>d.chat_setupScriptCard_useScript_label()]),c(Y,_e)},$$slots:{default:!0}})};O(j,R=>{i()&&R(L)})}F(G),F(M);var ne=A(M,2),z=oe(ne,!0),q=A(ne,2),ee=oe(q,!0);return F(x),$(()=>{Q(re,a()),Q(z,s()),Q(ee,o())}),c(r,x),bt(v)}const yr={toolStart:/(?:\x1B\[\d+m)?🔧\s+(?:Tool call:\s+)?(.+?)(?:\x1B\[0m)?$/,toolDetail:/(?:[└├]─\s+(.+)$|^\s{3,}(.+)$)/,toolResult:/(?:\x1B\[\d+m)?📋\s+Tool result:\s+(.+?)(?:\x1B\[0m)?$/,toolSuccess:/[✓✔✅]\s+(.+)$/,toolError:/[❌✗❎]\s+(.+)$/,sessionInfo:/[Ss]ession:\s*([a-f0-9-]+)/,resumedSession:/📂?\s*Resumed session/i,assistantMarker:/🤖/,systemMarker:/💻/,userMarker:/👤/,thinkingMarker:/🤔\s*Thinking/i,waitingMarker:/^⏳\s+Running/i,indexingProgress:/^Indexing:\s*\[.*\]\s*\d+%/,agentDigest:/<agent_digest>([\s\S]*?)<\/agent_digest>/,setupScript:/<setup_script\s+name="([^"]+)"\s+description="([^"]+)">([\s\S]*?)<\/setup_script>/};class vf{constructor(){pa(this,"buffer","");pa(this,"currentToolName",null);pa(this,"currentToolId",null);pa(this,"lastToolId",null);pa(this,"currentToolParams",[]);pa(this,"currentToolResultContent",[]);pa(this,"inToolResult",!1);pa(this,"inCodeBlock",!1);pa(this,"codeBlockLanguage","");pa(this,"codeBlockContent","");pa(this,"characterBuffer","");pa(this,"inCharacterMode",!1);pa(this,"emittedToolIds",new Set)}parseChunk(t){if(this.isMarkerLine(t.trim())){const o=[];if(this.inToolResult&&this.currentToolResultContent.length>0){const u=this.currentToolResultContent.some(v=>v.startsWith("❌")||v.startsWith("Error:")),h=this.currentToolResultContent.map(v=>v.replace(/^❌\s*/,"").replace(/^Error:\s*/,"")).join(`
|
|
2
2
|
`);o.push({type:"tool_result",content:h,metadata:{toolId:this.currentToolId,isError:u}}),this.lastToolId=this.currentToolId,this.currentToolId=null,this.inToolResult=!1,this.currentToolResultContent=[]}const i=t.indexOf("🤖"),l=t.substring(i+2);if(this.inCharacterMode=!0,this.characterBuffer="",l&&l.trim()&&l!==`
|
|
3
3
|
`){const u=l.replace(/^\n/,"");u&&(this.characterBuffer=u)}return o}if(this.inCharacterMode){if(t.trim()===""&&this.characterBuffer==="")return[];if(t.includes(`
|
|
4
4
|
`)&&this.characterBuffer.length>0){const o=t.substring(0,t.indexOf(`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as o,X as ot,aH as ut,aX as dt,i as yt,r as ft,z as pt,b0 as it,V as gt,a_ as kt,U as mt,aZ as wt,Y as _t,B as bt}from"./
|
|
1
|
+
import{b as o,X as ot,aH as ut,aX as dt,i as yt,r as ft,z as pt,b0 as it,V as gt,a_ as kt,U as mt,aZ as wt,Y as _t,B as bt}from"./Cdwy3-nO.js";var J=(function(){var e=o(function(T,t,s,i){for(s=s||{},i=T.length;i--;s[T[i]]=t);return s},"o"),h=[1,4],r=[1,14],a=[1,12],l=[1,13],y=[6,7,8],f=[1,20],d=[1,18],m=[1,19],u=[6,7,11],k=[1,6,13,14],g=[1,23],_=[1,24],x=[1,6,7,11,13,14],D={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"ISHIKAWA",11:"EOF",13:"SPACELIST",14:"TEXT"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:o(function(t,s,i,c,p,n,v){var w=n.length-1;switch(p){case 6:case 7:return c;case 15:c.addNode(n[w-1].length,n[w].trim());break;case 16:c.addNode(0,n[w].trim());break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:h},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:h},{6:r,7:[1,10],9:9,12:11,13:a,14:l},e(y,[2,3]),{1:[2,2]},e(y,[2,4]),e(y,[2,5]),{1:[2,6],6:r,12:15,13:a,14:l},{6:r,9:16,12:11,13:a,14:l},{6:f,7:d,10:17,11:m},e(u,[2,18],{14:[1,21]}),e(u,[2,16]),e(u,[2,17]),{6:f,7:d,10:22,11:m},{1:[2,7],6:r,12:15,13:a,14:l},e(k,[2,14],{7:g,11:_}),e(x,[2,8]),e(x,[2,9]),e(x,[2,10]),e(u,[2,15]),e(k,[2,13],{7:g,11:_}),e(x,[2,11]),e(x,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:o(function(t,s){if(s.recoverable)this.trace(t);else{var i=new Error(t);throw i.hash=s,i}},"parseError"),parse:o(function(t){var s=this,i=[0],c=[],p=[null],n=[],v=this.table,w="",I=0,$=0,L=2,A=1,V=n.slice.call(arguments,1),b=Object.create(this.lexer),S={yy:{}};for(var B in this.yy)Object.prototype.hasOwnProperty.call(this.yy,B)&&(S.yy[B]=this.yy[B]);b.setInput(t,S.yy),S.yy.lexer=b,S.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var R=b.yylloc;n.push(R);var U=b.options&&b.options.ranges;typeof S.yy.parseError=="function"?this.parseError=S.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Y(P){i.length=i.length-2*P,p.length=p.length-P,n.length=n.length-P}o(Y,"popStack");function tt(){var P;return P=c.pop()||b.lex()||A,typeof P!="number"&&(P instanceof Array&&(c=P,P=c.pop()),P=s.symbols_[P]||P),P}o(tt,"lex");for(var M,W,N,K,z={},G,C,et,X;;){if(W=i[i.length-1],this.defaultActions[W]?N=this.defaultActions[W]:((M===null||typeof M>"u")&&(M=tt()),N=v[W]&&v[W][M]),typeof N>"u"||!N.length||!N[0]){var q="";X=[];for(G in v[W])this.terminals_[G]&&G>L&&X.push("'"+this.terminals_[G]+"'");b.showPosition?q="Parse error on line "+(I+1)+`:
|
|
2
2
|
`+b.showPosition()+`
|
|
3
3
|
Expecting `+X.join(", ")+", got '"+(this.terminals_[M]||M)+"'":q="Parse error on line "+(I+1)+": Unexpected "+(M==A?"end of input":"'"+(this.terminals_[M]||M)+"'"),this.parseError(q,{text:b.match,token:this.terminals_[M]||M,line:b.yylineno,loc:R,expected:X})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+W+", token: "+M);switch(N[0]){case 1:i.push(M),p.push(b.yytext),n.push(b.yylloc),i.push(N[1]),M=null,$=b.yyleng,w=b.yytext,I=b.yylineno,R=b.yylloc;break;case 2:if(C=this.productions_[N[1]][1],z.$=p[p.length-C],z._$={first_line:n[n.length-(C||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(C||1)].first_column,last_column:n[n.length-1].last_column},U&&(z._$.range=[n[n.length-(C||1)].range[0],n[n.length-1].range[1]]),K=this.performAction.apply(z,[w,$,I,S.yy,N[1],p,n].concat(V)),typeof K<"u")return K;C&&(i=i.slice(0,-1*C*2),p=p.slice(0,-1*C),n=n.slice(0,-1*C)),i.push(this.productions_[N[1]][0]),p.push(z.$),n.push(z._$),et=v[i[i.length-2]][i[i.length-1]],i.push(et);break;case 3:return!0}}return!0},"parse")},O=(function(){var T={EOF:1,parseError:o(function(s,i){if(this.yy.parser)this.yy.parser.parseError(s,i);else throw new Error(s)},"parseError"),setInput:o(function(t,s){return this.yy=s||this.yy||{},this._input=t,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:o(function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var s=t.match(/(?:\r\n?|\n).*/g);return s?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:o(function(t){var s=t.length,i=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-s),this.offset-=s;var c=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),i.length-1&&(this.yylineno-=i.length-1);var p=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:i?(i.length===c.length?this.yylloc.first_column:0)+c[c.length-i.length].length-i[0].length:this.yylloc.first_column-s},this.options.ranges&&(this.yylloc.range=[p[0],p[0]+this.yyleng-s]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(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:o(function(t){this.unput(this.match.slice(t))},"less"),pastInput:o(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o(function(){var t=this.pastInput(),s=new Array(t.length+1).join("-");return t+this.upcomingInput()+`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as bt,bo as x,bw as wt,bq as Rt,b as It,bs as g}from"./Fcr7AvC-.js";import{bs as Pt,ca as I,aD as t,c9 as s,bn as kt,bH as E,bV as M,aA as F}from"./3SdAC2_C.js";import{b as vt}from"./Dn334wJv.js";import{JH as l,eK as Ut,eL as At,t6 as Bt,op as xt,oq as Ft,Kf as Tt,Ku as Lt,Kk as _t,ou as T}from"./D0qhIm1r.js";import{t as Dt}from"./C-BsEdGZ.js";import{g as Wt}from"./DWGXN6Nr.js";import{dI as Gt,bO as Nt,bQ as Et,bN as Mt,bS as Vt,de as Ht,m as Kt}from"./Cq6hdiVw.js";import{C as qt}from"./
|
|
1
|
+
import{t as bt,bo as x,bw as wt,bq as Rt,b as It,bs as g}from"./Fcr7AvC-.js";import{bs as Pt,ca as I,aD as t,c9 as s,bn as kt,bH as E,bV as M,aA as F}from"./3SdAC2_C.js";import{b as vt}from"./Dn334wJv.js";import{JH as l,eK as Ut,eL as At,t6 as Bt,op as xt,oq as Ft,Kf as Tt,Ku as Lt,Kk as _t,ou as T}from"./D0qhIm1r.js";import{t as Dt}from"./C-BsEdGZ.js";import{g as Wt}from"./DWGXN6Nr.js";import{dI as Gt,bO as Nt,bQ as Et,bN as Mt,bS as Vt,de as Ht,m as Kt}from"./Cq6hdiVw.js";import{C as qt}from"./M7sb2vsG.js";import{V as zt}from"./CyZe9Esu.js";import{bT as Jt,bN as Ot,b8 as Qt}from"./Db6ExzGF.js";import{i as L,n as V}from"./H2jLkRRS.js";import{af as jt}from"./MdOlpTpG.js";function Xt(_,$){if(new.target)return bt({component:Xt,..._});Pt($,!0);const H=()=>g(at,"$gitRoots$",c),y=()=>g(ot,"$workspace",c),K=()=>g(nt,"$ftCommits$",c),q=()=>g(lt,"$rootGitRoots$",c),S=()=>g(st,"$ftChanges$",c),z=()=>g(tt,"$foldUnchanged",c),J=()=>g(Z,"$lineWrapping",c),O=()=>g(et,"$diffSideBySide",c),Q=()=>g(rt,"$ftLoading$",c),j=()=>g(it,"$ftBoundarySha$",c),[c,X]=Rt(),Y=o=>{zt(o,{embedded:!0,showExpand:!0,get expanded(){return t(w)},onToggleExpand:()=>{E(w,!t(w)),t(w)?t(R)?.expandAll():t(R)?.collapseAll()},get foldEnabled(){return z()},onToggleFold:()=>l.dispatch(_t()),get wrapEnabled(){return J()},onToggleWrap:()=>l.dispatch(Lt()),get splitEnabled(){return O()},onToggleSplit:()=>l.dispatch(Tt())})},Z=Jt(),tt=Ot(),et=Qt();let P=x($,"tab",7),m=x($,"workspaceId",7),C=x($,"isActive",7);const D=Wt(),p=Dt(()=>m()),ot=Gt(p);I(()=>{const o=m();if(!(!C()||!o||t(n)))return l.dispatch(Ut(o,"all")),()=>l.dispatch(At(o,"all"))});const n=s(()=>P().data?.gitRootId||""),at=jt(p),b=s(()=>H().find(o=>o.id===t(n))),h=s(()=>y()?.worktreePath||y()?.repositoryPath||""),k=s(()=>t(b)?.path||t(h)),st=Nt(p),nt=Et(p),it=Mt(p),rt=Vt(p),dt=s(()=>K()||[]),lt=Ht(p),f=s(()=>q()[t(n)]??Kt),ct=s(()=>t(f).status),gt=s(()=>t(f).loading),mt=s(()=>t(f).commitFiles),ut=s(()=>{const o=t(b)?.registeredCommitSha,i=o?t(f).commits.findIndex(e=>e.hash===o):-1;return i>=0?t(f).commits.slice(0,i):t(f).commits});I(()=>{const o=m(),i=t(n);o&&i&&l.dispatch(Bt(o,i,t(b)?.registeredCommitSha,100))});let w=M(!0),R=M(null);const pt=s(()=>{if(t(n))return[...(t(ct)?.files??[]).map(e=>({filePath:`${t(k)}/${e.path}`,action:"modify",additions:e.additions??0,deletions:e.deletions??0,toolName:"local",toolCallId:`root-${t(n)}-${e.staged}-${e.path}`,staged:e.staged,category:e.staged?"staged":"unstaged"})),...t(ut).flatMap(e=>(t(mt)[e.hash]??[]).map(a=>({filePath:`${t(k)}/${a.path}`,action:"modify",additions:a.additions??0,deletions:a.deletions??0,toolName:"local",toolCallId:`root-commit-${e.hash}-${a.path}`,staged:!1,category:"committed",commitHash:e.hash,commitMessage:e.message})))];const o=S().filter(e=>e.stage==="unstaged"),i=S().filter(e=>e.stage==="staged");return[...o.map(e=>{const a=e.file||e.relativePath,r=a&&L(a)?a:`${t(h)}/${a}`;return{filePath:r,action:"modify",additions:e.stats?.additions||0,deletions:e.stats?.deletions||0,toolName:"local",toolCallId:`local-unstaged-${r}`,staged:!1,category:"unstaged",oldContent:e.content?.oldContent,newContent:e.content?.newContent,gitlink:e.gitlink}}),...i.map(e=>{const a=e.file||e.relativePath,r=a&&L(a)?a:`${t(h)}/${a}`;return{filePath:r,action:"modify",additions:e.stats?.additions||0,deletions:e.stats?.deletions||0,toolName:"local",toolCallId:`local-staged-${r}`,staged:!0,category:"staged",oldContent:e.content?.oldContent,newContent:e.content?.newContent,gitlink:e.gitlink}}),...t(dt).flatMap(e=>(e.files||[]).map(a=>{const r=typeof a=="string"?a:a.path||"",U=r&&L(r)?r:`${t(h)}/${r}`,A=typeof a=="string"?0:a.additions||0,B=typeof a=="string"?0:a.deletions||0;return{filePath:U,action:"modify",additions:A,deletions:B,toolName:"local",toolCallId:`commit-${e.hash}-${r}`,staged:!1,category:"committed",commitHash:e.hash,commitMessage:e.message}}))]});function v(o){if(!t(h))return o;const i=V(o),e=V(t(h));return i.startsWith(`${e}/`)?i.slice(e.length+1):o}function W(o){l.dispatch(T(m(),crypto.randomUUID(),{kind:"stage",paths:o.map(v),source:"localChanges"}))}function G(o){l.dispatch(T(m(),crypto.randomUUID(),{kind:"unstage",paths:o.map(v),source:"localChanges"}))}function ht(o){l.dispatch(T(m(),crypto.randomUUID(),{kind:"discard",paths:o.map(v),source:"localChanges"}))}I(()=>{!D||!C()||D.registerActions({display:Y})});const N=crypto.randomUUID();I(()=>{const o=m();if(!(!(C()&&t(n))||!o))return l.dispatch(xt(o,N)),()=>l.dispatch(Ft(o,N))});var ft={get tab(){return P()},set tab(o){P(o),F()},get workspaceId(){return m()},set workspaceId(o){m(o),F()},get isActive(){return C()},set isActive(o){C(o),F()},$set:wt,$on:(o,i)=>It($,o,i)};{let o=s(()=>t(n)?t(gt):Q()),i=s(()=>t(n)||void 0),e=s(()=>t(n)?t(k):void 0),a=s(()=>y()?.baseRef??null),r=s(()=>t(n)?t(b)?.registeredCommitSha||null:j()||y()?.baseCommitSha||null),U=s(()=>!t(n)),A=s(()=>t(n)?void 0:d=>void W([d])),B=s(()=>t(n)?void 0:d=>void G([d])),Ct=s(()=>t(n)?void 0:d=>void ht([d])),yt=s(()=>t(n)?void 0:()=>{const d=S().filter(u=>u.stage==="unstaged");W(d.map(u=>u.relativePath||u.file))}),St=s(()=>t(n)?void 0:()=>{const d=S().filter(u=>u.stage==="staged");G(d.map(u=>u.relativePath||u.file))});vt(qt(_,{get isLoading(){return t(o)},get changes(){return t(pt)},get gitRootId(){return t(i)},get gitRootPath(){return t(e)},get branchBaseRef(){return t(a)},get branchBaseCommitSha(){return t(r)},get showStagingControls(){return t(U)},showCategoryFilter:!0,get onStage(){return t(A)},get onUnstage(){return t(B)},get onRevert(){return t(Ct)},get onStageAll(){return t(yt)},get onUnstageAll(){return t(St)}}),d=>E(R,d,!0),()=>t(R))}var $t=kt(ft);return X(),$t}export{Xt as default};
|