local-operator-ui 0.31.5 → 0.31.6

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.
Files changed (88) hide show
  1. package/out/main/index.js +151 -9
  2. package/out/renderer/assets/{_basePickBy-BFnTyl9Q.js → _basePickBy-CGLVGNHn.js} +1 -1
  3. package/out/renderer/assets/{_baseUniq-DD9jcRtU.js → _baseUniq-6RtLbuuN.js} +1 -1
  4. package/out/renderer/assets/agent-details-page-Dq1-pmjJ.js +6 -0
  5. package/out/renderer/assets/agent-hub-page-DDslXUso.js +6 -0
  6. package/out/renderer/assets/agents-page-Cn5t3IkR.js +2 -0
  7. package/out/renderer/assets/arc-CqB6YrvF.js +1 -0
  8. package/out/renderer/assets/{architectureDiagram-IEHRJDOE-7e2mo6tq.js → architectureDiagram-IEHRJDOE-BsWj-SB2.js} +1 -1
  9. package/out/renderer/assets/{blockDiagram-JOT3LUYC-BVljD84R.js → blockDiagram-JOT3LUYC-DjuQQrO2.js} +1 -1
  10. package/out/renderer/assets/{book-open-B8nHgs3o.js → book-open-DI1UBxnn.js} +1 -1
  11. package/out/renderer/assets/browser-page-C8W7mUVJ.js +1 -0
  12. package/out/renderer/assets/{browser-webauthn-prompt-BiNyKO73.js → browser-webauthn-prompt-CpHuczqZ.js} +1 -1
  13. package/out/renderer/assets/{c4Diagram-VJAJSXHY-JwdJCFiM.js → c4Diagram-VJAJSXHY-DfqMyqGt.js} +1 -1
  14. package/out/renderer/assets/channel-DG4irCIe.js +1 -0
  15. package/out/renderer/assets/{chunk-4BMEZGHF-ysuKUzF3.js → chunk-4BMEZGHF-B7fJK-xk.js} +1 -1
  16. package/out/renderer/assets/{chunk-A2AXSNBT-DsztjjTP.js → chunk-A2AXSNBT-CYCL2Vnh.js} +1 -1
  17. package/out/renderer/assets/{chunk-AEK57VVT-pv5-Z61i.js → chunk-AEK57VVT-07JQHm7w.js} +1 -1
  18. package/out/renderer/assets/{chunk-D6G4REZN-B0HKfeJ8.js → chunk-D6G4REZN-Dk1JIt6P.js} +1 -1
  19. package/out/renderer/assets/{chunk-RZ5BOZE2-DNjaGyn6.js → chunk-RZ5BOZE2-BLq7IQcw.js} +1 -1
  20. package/out/renderer/assets/{chunk-XZIHB7SX-CB3yOZ7o.js → chunk-XZIHB7SX-sn_IP0cx.js} +1 -1
  21. package/out/renderer/assets/classDiagram-GIVACNV2-Bn3g2tY9.js +1 -0
  22. package/out/renderer/assets/classDiagram-v2-COTLJTTW-Bn3g2tY9.js +1 -0
  23. package/out/renderer/assets/clone-hlCMGtcg.js +1 -0
  24. package/out/renderer/assets/{console-mirror-BoykuSNB.js → console-mirror-CpiNswSB.js} +1 -1
  25. package/out/renderer/assets/{consoleCapture-Cujhy7_W.js → consoleCapture-Dawe559T.js} +1 -1
  26. package/out/renderer/assets/{dagre-OKDRZEBW-DscYjoQb.js → dagre-OKDRZEBW-BH1-vZrD.js} +1 -1
  27. package/out/renderer/assets/{diagram-SSKATNLV-MR2_cP2x.js → diagram-SSKATNLV-BB2zhdj2.js} +1 -1
  28. package/out/renderer/assets/{diagram-VNBRO52H-BmkFh4Vx.js → diagram-VNBRO52H-DoIDnsFj.js} +1 -1
  29. package/out/renderer/assets/{erDiagram-Q7BY3M3F-D07ZEVLp.js → erDiagram-Q7BY3M3F-CFI6DH5z.js} +1 -1
  30. package/out/renderer/assets/{error-boundary-BX3Jjofp.js → error-boundary-DtDjc7C4.js} +2 -2
  31. package/out/renderer/assets/{flowDiagram-4HSFHLVR-DvEjarQP.js → flowDiagram-4HSFHLVR-R35rZly5.js} +1 -1
  32. package/out/renderer/assets/{ganttDiagram-APWFNJXF-D5UFT4S7.js → ganttDiagram-APWFNJXF-BwH-YH2d.js} +4 -4
  33. package/out/renderer/assets/{gitGraphDiagram-7IBYFJ6S-DH2UEbHf.js → gitGraphDiagram-7IBYFJ6S-B9Ij_MPV.js} +1 -1
  34. package/out/renderer/assets/{graph-BKMaU8e_.js → graph-B6vab2kN.js} +1 -1
  35. package/out/renderer/assets/{index-BZWSvhnc.js → index-30UPLouO.js} +1 -1
  36. package/out/renderer/assets/index-CBxomwo0.js +7 -0
  37. package/out/renderer/assets/{index-DyfVjYXR.js → index-gd7H8-q6.js} +392 -387
  38. package/out/renderer/assets/index-rZRMapOd.css +1 -0
  39. package/out/renderer/assets/{infoDiagram-PH2N3AL5-BB9p2nRT.js → infoDiagram-PH2N3AL5-BoFC5xGX.js} +1 -1
  40. package/out/renderer/assets/{installer-1ycbb4_E.js → installer-DrfIP-VV.js} +1 -1
  41. package/out/renderer/assets/{journeyDiagram-U35MCT3I-Dt2T-pPF.js → journeyDiagram-U35MCT3I-D8hZEZM9.js} +1 -1
  42. package/out/renderer/assets/{kanban-definition-NDS4AKOZ-BxdASKeG.js → kanban-definition-NDS4AKOZ-CfK7CfsY.js} +1 -1
  43. package/out/renderer/assets/{layout-BOJV8F98.js → layout-9INEUX4j.js} +1 -1
  44. package/out/renderer/assets/legacy-agents-page-DYFr_Ms9.js +38 -0
  45. package/out/renderer/assets/{mermaid.core-Dm5FgUKb.js → mermaid.core-J-3igmgd.js} +19 -19
  46. package/out/renderer/assets/mesh-page-BR-tHXFg.js +1 -0
  47. package/out/renderer/assets/{mindmap-definition-ALO5MXBD-C54cCZAD.js → mindmap-definition-ALO5MXBD-BiJ-Ieo8.js} +1 -1
  48. package/out/renderer/assets/org-surface-gate-Dvz4sPXB.js +1 -0
  49. package/out/renderer/assets/{page-header-DtDPxJCD.js → page-header-B9QalVj7.js} +1 -1
  50. package/out/renderer/assets/{pieDiagram-IB7DONF6-CrhdJ9uV.js → pieDiagram-IB7DONF6-Cjt4ER3c.js} +1 -1
  51. package/out/renderer/assets/{projects-page-DRQqnIMU.js → projects-page-CMQ2URwK.js} +3 -3
  52. package/out/renderer/assets/{quadrantDiagram-7GDLP6J5-BWSQJ0gX.js → quadrantDiagram-7GDLP6J5--_022w7n.js} +1 -1
  53. package/out/renderer/assets/{radar-MK3ICKWK-CJpp5uw3.js → radar-MK3ICKWK-m7dr7eu0.js} +1 -1
  54. package/out/renderer/assets/radient-auth-buttons-BCb9PgbG.js +1 -0
  55. package/out/renderer/assets/{requirementDiagram-KVF5MWMF-B7hVsPNs.js → requirementDiagram-KVF5MWMF-BAi8whQW.js} +1 -1
  56. package/out/renderer/assets/{sankeyDiagram-QLVOVGJD-BJT1eAxQ.js → sankeyDiagram-QLVOVGJD-BuunvXYL.js} +1 -1
  57. package/out/renderer/assets/{schedules-page-Br3MWcWr.js → schedules-page-fhJg4v1A.js} +1 -1
  58. package/out/renderer/assets/{sequenceDiagram-X6HHIX6F-DxQHWkSx.js → sequenceDiagram-X6HHIX6F-DROalkBZ.js} +1 -1
  59. package/out/renderer/assets/{settings-page-Cz2ODzjH.js → settings-page-UoDbqEse.js} +14 -14
  60. package/out/renderer/assets/settings-section-BTFkBz1F.js +6 -0
  61. package/out/renderer/assets/{stateDiagram-DGXRK772-7zKxJIA5.js → stateDiagram-DGXRK772-I2ycj_Cg.js} +1 -1
  62. package/out/renderer/assets/stateDiagram-v2-YXO3MK2T-Bt6AfJJN.js +1 -0
  63. package/out/renderer/assets/{timeline-definition-BDJGKUSR-CKvl8Sf0.js → timeline-definition-BDJGKUSR-CXcA6v6z.js} +1 -1
  64. package/out/renderer/assets/use-download-agent-mutation-wvsX88DW.js +61 -0
  65. package/out/renderer/assets/use-memberships-query-7cBHUXI2.js +1 -0
  66. package/out/renderer/assets/{xychartDiagram-VJFVF3MP-B2w5N_2D.js → xychartDiagram-VJFVF3MP-TPcfOSE-.js} +3 -3
  67. package/out/renderer/console-capture.html +4 -4
  68. package/out/renderer/index.html +5 -5
  69. package/out/renderer/installer.html +4 -4
  70. package/package.json +2 -2
  71. package/out/renderer/assets/agent-details-page-G90FKyVP.js +0 -6
  72. package/out/renderer/assets/agent-hub-page-BaU9D2Uf.js +0 -6
  73. package/out/renderer/assets/agents-page-BWmJb3M1.js +0 -2
  74. package/out/renderer/assets/arc-D4G69weg.js +0 -1
  75. package/out/renderer/assets/browser-page-Dc7F-WKs.js +0 -1
  76. package/out/renderer/assets/channel-DY5WkW10.js +0 -1
  77. package/out/renderer/assets/classDiagram-GIVACNV2-mWo2wa6Q.js +0 -1
  78. package/out/renderer/assets/classDiagram-v2-COTLJTTW-mWo2wa6Q.js +0 -1
  79. package/out/renderer/assets/clone-Cbm34QyD.js +0 -1
  80. package/out/renderer/assets/compact-pagination-CEfQ3P1V.js +0 -1
  81. package/out/renderer/assets/index-D4l3Ha6i.js +0 -7
  82. package/out/renderer/assets/index-YlW7OZrX.css +0 -1
  83. package/out/renderer/assets/legacy-agents-page-DlUvUwjx.js +0 -38
  84. package/out/renderer/assets/publication-validation-Cke6xOnn.js +0 -1
  85. package/out/renderer/assets/radient-auth-buttons-DPiKAtaZ.js +0 -6
  86. package/out/renderer/assets/stateDiagram-v2-YXO3MK2T-3TyB4Xbk.js +0 -1
  87. package/out/renderer/assets/use-download-agent-mutation-yItIUILb.js +0 -61
  88. /package/out/renderer/assets/{index-hIJSZMtz.js → index-CSEVqIl1.js} +0 -0
@@ -0,0 +1,6 @@
1
+ import{c as r}from"./error-boundary-DtDjc7C4.js";import{j as e,c as i}from"./index-CSEVqIl1.js";/**
2
+ * @license lucide-react v0.507.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const l=[["path",{d:"M13.4 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7.4",key:"re6nr2"}],["path",{d:"M2 6h4",key:"aawbzj"}],["path",{d:"M2 10h4",key:"l0bgd4"}],["path",{d:"M2 14h4",key:"1gsvsf"}],["path",{d:"M2 18h4",key:"1bu2t1"}],["path",{d:"M21.378 5.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"pqwjuv"}]],k=r("notebook-pen",l),j=({title:t,description:a,icon:s,children:n,titleComponent:c,sectionRef:m,dataTourTag:o,className:x,id:d})=>e.jsxs("div",{ref:m,id:d,tabIndex:d?-1:void 0,"data-tour-tag":o,className:i("w-full",x),children:[c??e.jsxs("h2",{className:"flex items-center gap-2 text-heading text-ink",children:[s&&e.jsx(s,{size:16,className:"shrink-0 text-ink-dim"}),t]}),a&&e.jsx("p",{className:"mt-1 max-w-2xl text-body-sm text-ink-muted",children:a}),e.jsx("div",{className:"mt-4",children:n})]}),N=({label:t,value:a,className:s,valueClassName:n})=>e.jsxs("div",{className:i("min-w-0",s),children:[e.jsx("div",{className:"flex items-center gap-1.5 text-meta text-ink-dim",children:t}),e.jsx("div",{className:i("mt-0.5 break-words text-body-sm",n??"text-ink"),children:a})]}),f=({children:t,className:a})=>e.jsx("div",{className:i("grid grid-cols-[repeat(auto-fit,minmax(160px,1fr))] gap-x-6 gap-y-4",a),children:t});export{f as I,k as N,j as S,N as a};
@@ -1 +1 @@
1
- import{s as W,a as P,S as N}from"./chunk-AEK57VVT-pv5-Z61i.js";import{_ as u,c as t,d as H,l as S,e as C,k as z,u as U}from"./mermaid.core-Dm5FgUKb.js";import{G as F}from"./graph-BKMaU8e_.js";import{l as O}from"./layout-BOJV8F98.js";import{G as J,H as X}from"./index-DyfVjYXR.js";import"./chunk-RZ5BOZE2-DNjaGyn6.js";import"./index-hIJSZMtz.js";import"./_baseUniq-DD9jcRtU.js";import"./_basePickBy-BFnTyl9Q.js";import"./error-boundary-BX3Jjofp.js";import"./console-mirror-BoykuSNB.js";var L={},D=u((e,i)=>{L[e]=i},"set"),Y=u(e=>L[e],"get"),A=u(()=>Object.keys(L),"keys"),I=u(()=>A().length,"size"),$={get:Y,set:D,keys:A,size:I},j=u(e=>e.append("circle").attr("class","start-state").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit).attr("cy",t().state.padding+t().state.sizeUnit),"drawStartState"),q=u(e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",t().state.textHeight).attr("class","divider").attr("x2",t().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),Z=u((e,i)=>{const d=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+2*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),o=d.node().getBBox();return e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",o.width+2*t().state.padding).attr("height",o.height+2*t().state.padding).attr("rx",t().state.radius),d},"drawSimpleState"),K=u((e,i)=>{const d=u(function(l,B,m){const k=l.append("tspan").attr("x",2*t().state.padding).text(B);m||k.attr("dy",t().state.textHeight)},"addTspan"),n=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+1.3*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.descriptions[0]).node().getBBox(),g=n.height,x=e.append("text").attr("x",t().state.padding).attr("y",g+t().state.padding*.4+t().state.dividerMargin+t().state.textHeight).attr("class","state-description");let a=!0,s=!0;i.descriptions.forEach(function(l){a||(d(x,l,s),s=!1),a=!1});const y=e.append("line").attr("x1",t().state.padding).attr("y1",t().state.padding+g+t().state.dividerMargin/2).attr("y2",t().state.padding+g+t().state.dividerMargin/2).attr("class","descr-divider"),p=x.node().getBBox(),c=Math.max(p.width,n.width);return y.attr("x2",c+3*t().state.padding),e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",c+2*t().state.padding).attr("height",p.height+g+2*t().state.padding).attr("rx",t().state.radius),e},"drawDescrState"),Q=u((e,i,d)=>{const o=t().state.padding,n=2*t().state.padding,g=e.node().getBBox(),x=g.width,a=g.x,s=e.append("text").attr("x",0).attr("y",t().state.titleShift).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),p=s.node().getBBox().width+n;let c=Math.max(p,x);c===x&&(c=c+n);let l;const B=e.node().getBBox();i.doc,l=a-o,p>x&&(l=(x-c)/2+o),Math.abs(a-B.x)<o&&p>x&&(l=a-(p-x)/2);const m=1-t().state.textHeight;return e.insert("rect",":first-child").attr("x",l).attr("y",m).attr("class",d?"alt-composit":"composit").attr("width",c).attr("height",B.height+t().state.textHeight+t().state.titleShift+1).attr("rx","0"),s.attr("x",l+o),p<=x&&s.attr("x",a+(c-n)/2-p/2+o),e.insert("rect",":first-child").attr("x",l).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",c).attr("height",t().state.textHeight*3).attr("rx",t().state.radius),e.insert("rect",":first-child").attr("x",l).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",c).attr("height",B.height+3+2*t().state.textHeight).attr("rx",t().state.radius),e},"addTitleAndBox"),V=u(e=>(e.append("circle").attr("class","end-state-outer").attr("r",t().state.sizeUnit+t().state.miniPadding).attr("cx",t().state.padding+t().state.sizeUnit+t().state.miniPadding).attr("cy",t().state.padding+t().state.sizeUnit+t().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit+2).attr("cy",t().state.padding+t().state.sizeUnit+2)),"drawEndState"),tt=u((e,i)=>{let d=t().state.forkWidth,o=t().state.forkHeight;if(i.parentId){let n=d;d=o,o=n}return e.append("rect").style("stroke","black").style("fill","black").attr("width",d).attr("height",o).attr("x",t().state.padding).attr("y",t().state.padding)},"drawForkJoinState"),et=u((e,i,d,o)=>{let n=0;const g=o.append("text");g.style("text-anchor","start"),g.attr("class","noteText");let x=e.replace(/\r\n/g,"<br/>");x=x.replace(/\n/g,"<br/>");const a=x.split(z.lineBreakRegex);let s=1.25*t().state.noteMargin;for(const y of a){const p=y.trim();if(p.length>0){const c=g.append("tspan");if(c.text(p),s===0){const l=c.node().getBBox();s+=l.height}n+=s,c.attr("x",i+t().state.noteMargin),c.attr("y",d+n+1.25*t().state.noteMargin)}}return{textWidth:g.node().getBBox().width,textHeight:n}},"_drawLongText"),at=u((e,i)=>{i.attr("class","state-note");const d=i.append("rect").attr("x",0).attr("y",t().state.padding),o=i.append("g"),{textWidth:n,textHeight:g}=et(e,0,0,o);return d.attr("height",g+2*t().state.noteMargin),d.attr("width",n+t().state.noteMargin*2),d},"drawNote"),G=u(function(e,i){const d=i.id,o={id:d,label:i.id,width:0,height:0},n=e.append("g").attr("id",d).attr("class","stateGroup");i.type==="start"&&j(n),i.type==="end"&&V(n),(i.type==="fork"||i.type==="join")&&tt(n,i),i.type==="note"&&at(i.note.text,n),i.type==="divider"&&q(n),i.type==="default"&&i.descriptions.length===0&&Z(n,i),i.type==="default"&&i.descriptions.length>0&&K(n,i);const g=n.node().getBBox();return o.width=g.width+2*t().state.padding,o.height=g.height+2*t().state.padding,$.set(d,o),o},"drawState"),_=0,it=u(function(e,i,d){const o=u(function(s){switch(s){case N.relationType.AGGREGATION:return"aggregation";case N.relationType.EXTENSION:return"extension";case N.relationType.COMPOSITION:return"composition";case N.relationType.DEPENDENCY:return"dependency"}},"getRelationType");i.points=i.points.filter(s=>!Number.isNaN(s.y));const n=i.points,g=J().x(function(s){return s.x}).y(function(s){return s.y}).curve(X),x=e.append("path").attr("d",g(n)).attr("id","edge"+_).attr("class","transition");let a="";if(t().state.arrowMarkerAbsolute&&(a=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,a=a.replace(/\(/g,"\\("),a=a.replace(/\)/g,"\\)")),x.attr("marker-end","url("+a+"#"+o(N.relationType.DEPENDENCY)+"End)"),d.title!==void 0){const s=e.append("g").attr("class","stateLabel"),{x:y,y:p}=U.calcLabelPosition(i.points),c=z.getRows(d.title);let l=0;const B=[];let m=0,k=0;for(let f=0;f<=c.length;f++){const h=s.append("text").attr("text-anchor","middle").text(c[f]).attr("x",y).attr("y",p+l),w=h.node().getBBox();m=Math.max(m,w.width),k=Math.min(k,w.x),S.info(w.x,y,p+l),l===0&&(l=h.node().getBBox().height,S.info("Title height",l,p)),B.push(h)}let E=l*c.length;if(c.length>1){const f=(c.length-1)*l*.5;B.forEach((h,w)=>h.attr("y",p+w*l-f)),E=l*c.length}const r=s.node().getBBox();s.insert("rect",":first-child").attr("class","box").attr("x",y-m/2-t().state.padding/2).attr("y",p-E/2-t().state.padding/2-3.5).attr("width",m+t().state.padding).attr("height",E+t().state.padding),S.info(r)}_++},"drawEdge"),b,T={},rt=u(function(){},"setConf"),nt=u(function(e){e.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),st=u(function(e,i,d,o){b=t().state;const n=t().securityLevel;let g;n==="sandbox"&&(g=H("#i"+i));const x=n==="sandbox"?H(g.nodes()[0].contentDocument.body):H("body"),a=n==="sandbox"?g.nodes()[0].contentDocument:document;S.debug("Rendering diagram "+e);const s=x.select(`[id='${i}']`);nt(s);const y=o.db.getRootDoc();R(y,s,void 0,!1,x,a,o);const p=b.padding,c=s.node().getBBox(),l=c.width+p*2,B=c.height+p*2,m=l*1.75;C(s,B,m,b.useMaxWidth),s.attr("viewBox",`${c.x-b.padding} ${c.y-b.padding} `+l+" "+B)},"draw"),dt=u(e=>e?e.length*b.fontSizeFactor:1,"getLabelWidth"),R=u((e,i,d,o,n,g,x)=>{const a=new F({compound:!0,multigraph:!0});let s,y=!0;for(s=0;s<e.length;s++)if(e[s].stmt==="relation"){y=!1;break}d?a.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:y?1:b.edgeLengthFactor,nodeSep:y?1:50,isMultiGraph:!0}):a.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:y?1:b.edgeLengthFactor,nodeSep:y?1:50,ranker:"tight-tree",isMultiGraph:!0}),a.setDefaultEdgeLabel(function(){return{}});const p=x.db.getStates(),c=x.db.getRelations(),l=Object.keys(p);for(const r of l){const f=p[r];d&&(f.parentId=d);let h;if(f.doc){let w=i.append("g").attr("id",f.id).attr("class","stateGroup");h=R(f.doc,w,f.id,!o,n,g,x);{w=Q(w,f,o);let v=w.node().getBBox();h.width=v.width,h.height=v.height+b.padding/2,T[f.id]={y:b.compositTitleSize}}}else h=G(i,f,a);if(f.note){const w={descriptions:[],id:f.id+"-note",note:f.note,type:"note"},v=G(i,w,a);f.note.position==="left of"?(a.setNode(h.id+"-note",v),a.setNode(h.id,h)):(a.setNode(h.id,h),a.setNode(h.id+"-note",v)),a.setParent(h.id,h.id+"-group"),a.setParent(h.id+"-note",h.id+"-group")}else a.setNode(h.id,h)}S.debug("Count=",a.nodeCount(),a);let B=0;c.forEach(function(r){B++,S.debug("Setting edge",r),a.setEdge(r.id1,r.id2,{relation:r,width:dt(r.title),height:b.labelHeight*z.getRows(r.title).length,labelpos:"c"},"id"+B)}),O(a),S.debug("Graph after layout",a.nodes());const m=i.node();a.nodes().forEach(function(r){r!==void 0&&a.node(r)!==void 0?(S.warn("Node "+r+": "+JSON.stringify(a.node(r))),n.select("#"+m.id+" #"+r).attr("transform","translate("+(a.node(r).x-a.node(r).width/2)+","+(a.node(r).y+(T[r]?T[r].y:0)-a.node(r).height/2)+" )"),n.select("#"+m.id+" #"+r).attr("data-x-shift",a.node(r).x-a.node(r).width/2),g.querySelectorAll("#"+m.id+" #"+r+" .divider").forEach(h=>{const w=h.parentElement;let v=0,M=0;w&&(w.parentElement&&(v=w.parentElement.getBBox().width),M=parseInt(w.getAttribute("data-x-shift"),10),Number.isNaN(M)&&(M=0)),h.setAttribute("x1",0-M+8),h.setAttribute("x2",v-M-8)})):S.debug("No Node "+r+": "+JSON.stringify(a.node(r)))});let k=m.getBBox();a.edges().forEach(function(r){r!==void 0&&a.edge(r)!==void 0&&(S.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(a.edge(r))),it(i,a.edge(r),a.edge(r).relation))}),k=m.getBBox();const E={id:d||"root",label:d||"root",width:0,height:0};return E.width=k.width+2*b.padding,E.height=k.height+2*b.padding,S.debug("Doc rendered",E,a),E},"renderDoc"),ot={setConf:rt,draw:st},Bt={parser:P,get db(){return new N(1)},renderer:ot,styles:W,init:u(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};export{Bt as diagram};
1
+ import{s as W,a as P,S as N}from"./chunk-AEK57VVT-07JQHm7w.js";import{_ as u,c as t,d as H,l as S,e as C,k as z,u as F}from"./mermaid.core-J-3igmgd.js";import{G as U}from"./graph-B6vab2kN.js";import{l as O}from"./layout-9INEUX4j.js";import{F as J,G as X}from"./index-gd7H8-q6.js";import"./chunk-RZ5BOZE2-BLq7IQcw.js";import"./index-CSEVqIl1.js";import"./_baseUniq-6RtLbuuN.js";import"./_basePickBy-CGLVGNHn.js";import"./error-boundary-DtDjc7C4.js";import"./console-mirror-CpiNswSB.js";var L={},D=u((e,i)=>{L[e]=i},"set"),Y=u(e=>L[e],"get"),A=u(()=>Object.keys(L),"keys"),I=u(()=>A().length,"size"),$={get:Y,set:D,keys:A,size:I},j=u(e=>e.append("circle").attr("class","start-state").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit).attr("cy",t().state.padding+t().state.sizeUnit),"drawStartState"),q=u(e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",t().state.textHeight).attr("class","divider").attr("x2",t().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),Z=u((e,i)=>{const d=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+2*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),o=d.node().getBBox();return e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",o.width+2*t().state.padding).attr("height",o.height+2*t().state.padding).attr("rx",t().state.radius),d},"drawSimpleState"),K=u((e,i)=>{const d=u(function(l,B,m){const k=l.append("tspan").attr("x",2*t().state.padding).text(B);m||k.attr("dy",t().state.textHeight)},"addTspan"),n=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+1.3*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.descriptions[0]).node().getBBox(),g=n.height,x=e.append("text").attr("x",t().state.padding).attr("y",g+t().state.padding*.4+t().state.dividerMargin+t().state.textHeight).attr("class","state-description");let a=!0,s=!0;i.descriptions.forEach(function(l){a||(d(x,l,s),s=!1),a=!1});const y=e.append("line").attr("x1",t().state.padding).attr("y1",t().state.padding+g+t().state.dividerMargin/2).attr("y2",t().state.padding+g+t().state.dividerMargin/2).attr("class","descr-divider"),p=x.node().getBBox(),c=Math.max(p.width,n.width);return y.attr("x2",c+3*t().state.padding),e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",c+2*t().state.padding).attr("height",p.height+g+2*t().state.padding).attr("rx",t().state.radius),e},"drawDescrState"),Q=u((e,i,d)=>{const o=t().state.padding,n=2*t().state.padding,g=e.node().getBBox(),x=g.width,a=g.x,s=e.append("text").attr("x",0).attr("y",t().state.titleShift).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),p=s.node().getBBox().width+n;let c=Math.max(p,x);c===x&&(c=c+n);let l;const B=e.node().getBBox();i.doc,l=a-o,p>x&&(l=(x-c)/2+o),Math.abs(a-B.x)<o&&p>x&&(l=a-(p-x)/2);const m=1-t().state.textHeight;return e.insert("rect",":first-child").attr("x",l).attr("y",m).attr("class",d?"alt-composit":"composit").attr("width",c).attr("height",B.height+t().state.textHeight+t().state.titleShift+1).attr("rx","0"),s.attr("x",l+o),p<=x&&s.attr("x",a+(c-n)/2-p/2+o),e.insert("rect",":first-child").attr("x",l).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",c).attr("height",t().state.textHeight*3).attr("rx",t().state.radius),e.insert("rect",":first-child").attr("x",l).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",c).attr("height",B.height+3+2*t().state.textHeight).attr("rx",t().state.radius),e},"addTitleAndBox"),V=u(e=>(e.append("circle").attr("class","end-state-outer").attr("r",t().state.sizeUnit+t().state.miniPadding).attr("cx",t().state.padding+t().state.sizeUnit+t().state.miniPadding).attr("cy",t().state.padding+t().state.sizeUnit+t().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit+2).attr("cy",t().state.padding+t().state.sizeUnit+2)),"drawEndState"),tt=u((e,i)=>{let d=t().state.forkWidth,o=t().state.forkHeight;if(i.parentId){let n=d;d=o,o=n}return e.append("rect").style("stroke","black").style("fill","black").attr("width",d).attr("height",o).attr("x",t().state.padding).attr("y",t().state.padding)},"drawForkJoinState"),et=u((e,i,d,o)=>{let n=0;const g=o.append("text");g.style("text-anchor","start"),g.attr("class","noteText");let x=e.replace(/\r\n/g,"<br/>");x=x.replace(/\n/g,"<br/>");const a=x.split(z.lineBreakRegex);let s=1.25*t().state.noteMargin;for(const y of a){const p=y.trim();if(p.length>0){const c=g.append("tspan");if(c.text(p),s===0){const l=c.node().getBBox();s+=l.height}n+=s,c.attr("x",i+t().state.noteMargin),c.attr("y",d+n+1.25*t().state.noteMargin)}}return{textWidth:g.node().getBBox().width,textHeight:n}},"_drawLongText"),at=u((e,i)=>{i.attr("class","state-note");const d=i.append("rect").attr("x",0).attr("y",t().state.padding),o=i.append("g"),{textWidth:n,textHeight:g}=et(e,0,0,o);return d.attr("height",g+2*t().state.noteMargin),d.attr("width",n+t().state.noteMargin*2),d},"drawNote"),G=u(function(e,i){const d=i.id,o={id:d,label:i.id,width:0,height:0},n=e.append("g").attr("id",d).attr("class","stateGroup");i.type==="start"&&j(n),i.type==="end"&&V(n),(i.type==="fork"||i.type==="join")&&tt(n,i),i.type==="note"&&at(i.note.text,n),i.type==="divider"&&q(n),i.type==="default"&&i.descriptions.length===0&&Z(n,i),i.type==="default"&&i.descriptions.length>0&&K(n,i);const g=n.node().getBBox();return o.width=g.width+2*t().state.padding,o.height=g.height+2*t().state.padding,$.set(d,o),o},"drawState"),_=0,it=u(function(e,i,d){const o=u(function(s){switch(s){case N.relationType.AGGREGATION:return"aggregation";case N.relationType.EXTENSION:return"extension";case N.relationType.COMPOSITION:return"composition";case N.relationType.DEPENDENCY:return"dependency"}},"getRelationType");i.points=i.points.filter(s=>!Number.isNaN(s.y));const n=i.points,g=J().x(function(s){return s.x}).y(function(s){return s.y}).curve(X),x=e.append("path").attr("d",g(n)).attr("id","edge"+_).attr("class","transition");let a="";if(t().state.arrowMarkerAbsolute&&(a=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,a=a.replace(/\(/g,"\\("),a=a.replace(/\)/g,"\\)")),x.attr("marker-end","url("+a+"#"+o(N.relationType.DEPENDENCY)+"End)"),d.title!==void 0){const s=e.append("g").attr("class","stateLabel"),{x:y,y:p}=F.calcLabelPosition(i.points),c=z.getRows(d.title);let l=0;const B=[];let m=0,k=0;for(let f=0;f<=c.length;f++){const h=s.append("text").attr("text-anchor","middle").text(c[f]).attr("x",y).attr("y",p+l),w=h.node().getBBox();m=Math.max(m,w.width),k=Math.min(k,w.x),S.info(w.x,y,p+l),l===0&&(l=h.node().getBBox().height,S.info("Title height",l,p)),B.push(h)}let E=l*c.length;if(c.length>1){const f=(c.length-1)*l*.5;B.forEach((h,w)=>h.attr("y",p+w*l-f)),E=l*c.length}const r=s.node().getBBox();s.insert("rect",":first-child").attr("class","box").attr("x",y-m/2-t().state.padding/2).attr("y",p-E/2-t().state.padding/2-3.5).attr("width",m+t().state.padding).attr("height",E+t().state.padding),S.info(r)}_++},"drawEdge"),b,T={},rt=u(function(){},"setConf"),nt=u(function(e){e.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),st=u(function(e,i,d,o){b=t().state;const n=t().securityLevel;let g;n==="sandbox"&&(g=H("#i"+i));const x=n==="sandbox"?H(g.nodes()[0].contentDocument.body):H("body"),a=n==="sandbox"?g.nodes()[0].contentDocument:document;S.debug("Rendering diagram "+e);const s=x.select(`[id='${i}']`);nt(s);const y=o.db.getRootDoc();R(y,s,void 0,!1,x,a,o);const p=b.padding,c=s.node().getBBox(),l=c.width+p*2,B=c.height+p*2,m=l*1.75;C(s,B,m,b.useMaxWidth),s.attr("viewBox",`${c.x-b.padding} ${c.y-b.padding} `+l+" "+B)},"draw"),dt=u(e=>e?e.length*b.fontSizeFactor:1,"getLabelWidth"),R=u((e,i,d,o,n,g,x)=>{const a=new U({compound:!0,multigraph:!0});let s,y=!0;for(s=0;s<e.length;s++)if(e[s].stmt==="relation"){y=!1;break}d?a.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:y?1:b.edgeLengthFactor,nodeSep:y?1:50,isMultiGraph:!0}):a.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:y?1:b.edgeLengthFactor,nodeSep:y?1:50,ranker:"tight-tree",isMultiGraph:!0}),a.setDefaultEdgeLabel(function(){return{}});const p=x.db.getStates(),c=x.db.getRelations(),l=Object.keys(p);for(const r of l){const f=p[r];d&&(f.parentId=d);let h;if(f.doc){let w=i.append("g").attr("id",f.id).attr("class","stateGroup");h=R(f.doc,w,f.id,!o,n,g,x);{w=Q(w,f,o);let v=w.node().getBBox();h.width=v.width,h.height=v.height+b.padding/2,T[f.id]={y:b.compositTitleSize}}}else h=G(i,f,a);if(f.note){const w={descriptions:[],id:f.id+"-note",note:f.note,type:"note"},v=G(i,w,a);f.note.position==="left of"?(a.setNode(h.id+"-note",v),a.setNode(h.id,h)):(a.setNode(h.id,h),a.setNode(h.id+"-note",v)),a.setParent(h.id,h.id+"-group"),a.setParent(h.id+"-note",h.id+"-group")}else a.setNode(h.id,h)}S.debug("Count=",a.nodeCount(),a);let B=0;c.forEach(function(r){B++,S.debug("Setting edge",r),a.setEdge(r.id1,r.id2,{relation:r,width:dt(r.title),height:b.labelHeight*z.getRows(r.title).length,labelpos:"c"},"id"+B)}),O(a),S.debug("Graph after layout",a.nodes());const m=i.node();a.nodes().forEach(function(r){r!==void 0&&a.node(r)!==void 0?(S.warn("Node "+r+": "+JSON.stringify(a.node(r))),n.select("#"+m.id+" #"+r).attr("transform","translate("+(a.node(r).x-a.node(r).width/2)+","+(a.node(r).y+(T[r]?T[r].y:0)-a.node(r).height/2)+" )"),n.select("#"+m.id+" #"+r).attr("data-x-shift",a.node(r).x-a.node(r).width/2),g.querySelectorAll("#"+m.id+" #"+r+" .divider").forEach(h=>{const w=h.parentElement;let v=0,M=0;w&&(w.parentElement&&(v=w.parentElement.getBBox().width),M=parseInt(w.getAttribute("data-x-shift"),10),Number.isNaN(M)&&(M=0)),h.setAttribute("x1",0-M+8),h.setAttribute("x2",v-M-8)})):S.debug("No Node "+r+": "+JSON.stringify(a.node(r)))});let k=m.getBBox();a.edges().forEach(function(r){r!==void 0&&a.edge(r)!==void 0&&(S.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(a.edge(r))),it(i,a.edge(r),a.edge(r).relation))}),k=m.getBBox();const E={id:d||"root",label:d||"root",width:0,height:0};return E.width=k.width+2*b.padding,E.height=k.height+2*b.padding,S.debug("Doc rendered",E,a),E},"renderDoc"),ot={setConf:rt,draw:st},Bt={parser:P,get db(){return new N(1)},renderer:ot,styles:W,init:u(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};export{Bt as diagram};
@@ -0,0 +1 @@
1
+ import{s as r,b as e,a,S as s}from"./chunk-AEK57VVT-07JQHm7w.js";import{_ as i}from"./mermaid.core-J-3igmgd.js";import"./chunk-RZ5BOZE2-BLq7IQcw.js";import"./index-gd7H8-q6.js";import"./index-CSEVqIl1.js";import"./error-boundary-DtDjc7C4.js";import"./console-mirror-CpiNswSB.js";var n={parser:a,get db(){return new s(2)},renderer:e,styles:r,init:i(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")};export{n as diagram};
@@ -1,4 +1,4 @@
1
- import{_ as s,c as xt,l as E,d as j,V as kt,W as vt,X as _t,Y as bt,D as wt,$ as St,z as Et}from"./mermaid.core-Dm5FgUKb.js";import{d as nt}from"./arc-D4G69weg.js";import"./index-DyfVjYXR.js";import"./index-hIJSZMtz.js";import"./error-boundary-BX3Jjofp.js";import"./console-mirror-BoykuSNB.js";var Q=function(){var n=s(function(x,i,a,c){for(a=a||{},c=x.length;c--;a[x[c]]=i);return a},"o"),t=[6,8,10,11,12,14,16,17,20,21],e=[1,9],l=[1,10],r=[1,11],d=[1,12],h=[1,13],f=[1,16],m=[1,17],u={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,period_statement:18,event_statement:19,period:20,event:21,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",20:"period",21:"event"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[18,1],[19,1]],performAction:s(function(i,a,c,p,y,o,w){var v=o.length-1;switch(y){case 1:return o[v-1];case 2:this.$=[];break;case 3:o[v-1].push(o[v]),this.$=o[v-1];break;case 4:case 5:this.$=o[v];break;case 6:case 7:this.$=[];break;case 8:p.getCommonDb().setDiagramTitle(o[v].substr(6)),this.$=o[v].substr(6);break;case 9:this.$=o[v].trim(),p.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=o[v].trim(),p.getCommonDb().setAccDescription(this.$);break;case 12:p.addSection(o[v].substr(8)),this.$=o[v].substr(8);break;case 15:p.addTask(o[v],0,""),this.$=o[v];break;case 16:p.addEvent(o[v].substr(2)),this.$=o[v];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},n(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:e,12:l,14:r,16:d,17:h,18:14,19:15,20:f,21:m},n(t,[2,7],{1:[2,1]}),n(t,[2,3]),{9:18,11:e,12:l,14:r,16:d,17:h,18:14,19:15,20:f,21:m},n(t,[2,5]),n(t,[2,6]),n(t,[2,8]),{13:[1,19]},{15:[1,20]},n(t,[2,11]),n(t,[2,12]),n(t,[2,13]),n(t,[2,14]),n(t,[2,15]),n(t,[2,16]),n(t,[2,4]),n(t,[2,9]),n(t,[2,10])],defaultActions:{},parseError:s(function(i,a){if(a.recoverable)this.trace(i);else{var c=new Error(i);throw c.hash=a,c}},"parseError"),parse:s(function(i){var a=this,c=[0],p=[],y=[null],o=[],w=this.table,v="",N=0,A=0,V=2,U=1,M=o.slice.call(arguments,1),g=Object.create(this.lexer),b={yy:{}};for(var L in this.yy)Object.prototype.hasOwnProperty.call(this.yy,L)&&(b.yy[L]=this.yy[L]);g.setInput(i,b.yy),b.yy.lexer=g,b.yy.parser=this,typeof g.yylloc>"u"&&(g.yylloc={});var P=g.yylloc;o.push(P);var W=g.options&&g.options.ranges;typeof b.yy.parseError=="function"?this.parseError=b.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Z(T){c.length=c.length-2*T,y.length=y.length-T,o.length=o.length-T}s(Z,"popStack");function tt(){var T;return T=p.pop()||g.lex()||U,typeof T!="number"&&(T instanceof Array&&(p=T,T=p.pop()),T=a.symbols_[T]||T),T}s(tt,"lex");for(var S,C,I,J,R={},B,$,et,O;;){if(C=c[c.length-1],this.defaultActions[C]?I=this.defaultActions[C]:((S===null||typeof S>"u")&&(S=tt()),I=w[C]&&w[C][S]),typeof I>"u"||!I.length||!I[0]){var K="";O=[];for(B in w[C])this.terminals_[B]&&B>V&&O.push("'"+this.terminals_[B]+"'");g.showPosition?K="Parse error on line "+(N+1)+`:
1
+ import{_ as s,c as xt,l as E,d as j,V as kt,W as vt,X as _t,Y as bt,D as wt,$ as St,z as Et}from"./mermaid.core-J-3igmgd.js";import{d as nt}from"./arc-CqB6YrvF.js";import"./index-gd7H8-q6.js";import"./index-CSEVqIl1.js";import"./error-boundary-DtDjc7C4.js";import"./console-mirror-CpiNswSB.js";var Q=function(){var n=s(function(x,i,a,c){for(a=a||{},c=x.length;c--;a[x[c]]=i);return a},"o"),t=[6,8,10,11,12,14,16,17,20,21],e=[1,9],l=[1,10],r=[1,11],d=[1,12],h=[1,13],f=[1,16],m=[1,17],u={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,period_statement:18,event_statement:19,period:20,event:21,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",20:"period",21:"event"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[18,1],[19,1]],performAction:s(function(i,a,c,p,y,o,w){var v=o.length-1;switch(y){case 1:return o[v-1];case 2:this.$=[];break;case 3:o[v-1].push(o[v]),this.$=o[v-1];break;case 4:case 5:this.$=o[v];break;case 6:case 7:this.$=[];break;case 8:p.getCommonDb().setDiagramTitle(o[v].substr(6)),this.$=o[v].substr(6);break;case 9:this.$=o[v].trim(),p.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=o[v].trim(),p.getCommonDb().setAccDescription(this.$);break;case 12:p.addSection(o[v].substr(8)),this.$=o[v].substr(8);break;case 15:p.addTask(o[v],0,""),this.$=o[v];break;case 16:p.addEvent(o[v].substr(2)),this.$=o[v];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},n(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:e,12:l,14:r,16:d,17:h,18:14,19:15,20:f,21:m},n(t,[2,7],{1:[2,1]}),n(t,[2,3]),{9:18,11:e,12:l,14:r,16:d,17:h,18:14,19:15,20:f,21:m},n(t,[2,5]),n(t,[2,6]),n(t,[2,8]),{13:[1,19]},{15:[1,20]},n(t,[2,11]),n(t,[2,12]),n(t,[2,13]),n(t,[2,14]),n(t,[2,15]),n(t,[2,16]),n(t,[2,4]),n(t,[2,9]),n(t,[2,10])],defaultActions:{},parseError:s(function(i,a){if(a.recoverable)this.trace(i);else{var c=new Error(i);throw c.hash=a,c}},"parseError"),parse:s(function(i){var a=this,c=[0],p=[],y=[null],o=[],w=this.table,v="",N=0,A=0,V=2,U=1,M=o.slice.call(arguments,1),g=Object.create(this.lexer),b={yy:{}};for(var L in this.yy)Object.prototype.hasOwnProperty.call(this.yy,L)&&(b.yy[L]=this.yy[L]);g.setInput(i,b.yy),b.yy.lexer=g,b.yy.parser=this,typeof g.yylloc>"u"&&(g.yylloc={});var P=g.yylloc;o.push(P);var W=g.options&&g.options.ranges;typeof b.yy.parseError=="function"?this.parseError=b.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Z(T){c.length=c.length-2*T,y.length=y.length-T,o.length=o.length-T}s(Z,"popStack");function tt(){var T;return T=p.pop()||g.lex()||U,typeof T!="number"&&(T instanceof Array&&(p=T,T=p.pop()),T=a.symbols_[T]||T),T}s(tt,"lex");for(var S,C,I,J,R={},B,$,et,O;;){if(C=c[c.length-1],this.defaultActions[C]?I=this.defaultActions[C]:((S===null||typeof S>"u")&&(S=tt()),I=w[C]&&w[C][S]),typeof I>"u"||!I.length||!I[0]){var K="";O=[];for(B in w[C])this.terminals_[B]&&B>V&&O.push("'"+this.terminals_[B]+"'");g.showPosition?K="Parse error on line "+(N+1)+`:
2
2
  `+g.showPosition()+`
3
3
  Expecting `+O.join(", ")+", got '"+(this.terminals_[S]||S)+"'":K="Parse error on line "+(N+1)+": Unexpected "+(S==U?"end of input":"'"+(this.terminals_[S]||S)+"'"),this.parseError(K,{text:g.match,token:this.terminals_[S]||S,line:g.yylineno,loc:P,expected:O})}if(I[0]instanceof Array&&I.length>1)throw new Error("Parse Error: multiple actions possible at state: "+C+", token: "+S);switch(I[0]){case 1:c.push(S),y.push(g.yytext),o.push(g.yylloc),c.push(I[1]),S=null,A=g.yyleng,v=g.yytext,N=g.yylineno,P=g.yylloc;break;case 2:if($=this.productions_[I[1]][1],R.$=y[y.length-$],R._$={first_line:o[o.length-($||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-($||1)].first_column,last_column:o[o.length-1].last_column},W&&(R._$.range=[o[o.length-($||1)].range[0],o[o.length-1].range[1]]),J=this.performAction.apply(R,[v,A,N,b.yy,I[1],y,o].concat(M)),typeof J<"u")return J;$&&(c=c.slice(0,-1*$*2),y=y.slice(0,-1*$),o=o.slice(0,-1*$)),c.push(this.productions_[I[1]][0]),y.push(R.$),o.push(R._$),et=w[c[c.length-2]][c[c.length-1]],c.push(et);break;case 3:return!0}}return!0},"parse")},k=function(){var x={EOF:1,parseError:s(function(a,c){if(this.yy.parser)this.yy.parser.parseError(a,c);else throw new Error(a)},"parseError"),setInput:s(function(i,a){return this.yy=a||this.yy||{},this._input=i,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:s(function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var a=i.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},"input"),unput:s(function(i){var a=i.length,c=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;var p=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),c.length-1&&(this.yylineno-=c.length-1);var y=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:c?(c.length===p.length?this.yylloc.first_column:0)+p[p.length-c.length].length-c[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[y[0],y[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(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:s(function(i){this.unput(this.match.slice(i))},"less"),pastInput:s(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var i=this.pastInput(),a=new Array(i.length+1).join("-");return i+this.upcomingInput()+`
@@ -0,0 +1,61 @@
1
+ import{c as l,p as F}from"./error-boundary-DtDjc7C4.js";import{t as j,c as K,n as R,a as _,g as Q,e as U,h as z,i as N,j as S,f as v}from"./en-US-BkS8Ixxl.js";import{j as r,c as g,r as V}from"./index-CSEVqIl1.js";import{bs as q,bt as B,U as O,bu as P,bv as Y,aI as k,g as Z,f as w,aJ as b,h as W,aK as D,aV as G,bw as I,aW as C,aX as X}from"./index-gd7H8-q6.js";import{B as J}from"./book-open-DI1UBxnn.js";import{j as ee,k as te,m as ae,n as ne,o as se,q as oe,r as ie}from"./use-memberships-query-7cBHUXI2.js";/**
2
+ * @license lucide-react v0.507.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const re=[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]],ce=l("briefcase",re);/**
7
+ * @license lucide-react v0.507.0 - ISC
8
+ *
9
+ * This source code is licensed under the ISC license.
10
+ * See the LICENSE file in the root directory of this source tree.
11
+ */const le=[["line",{x1:"18",x2:"18",y1:"20",y2:"10",key:"1xfpm4"}],["line",{x1:"12",x2:"12",y1:"20",y2:"4",key:"be30l9"}],["line",{x1:"6",x2:"6",y1:"20",y2:"14",key:"1r4le6"}]],ue=l("chart-no-axes-column",le);/**
12
+ * @license lucide-react v0.507.0 - ISC
13
+ *
14
+ * This source code is licensed under the ISC license.
15
+ * See the LICENSE file in the root directory of this source tree.
16
+ */const de=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]],he=l("clipboard-list",de);/**
17
+ * @license lucide-react v0.507.0 - ISC
18
+ *
19
+ * This source code is licensed under the ISC license.
20
+ * See the LICENSE file in the root directory of this source tree.
21
+ */const me=[["path",{d:"M21.54 15H17a2 2 0 0 0-2 2v4.54",key:"1djwo0"}],["path",{d:"M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17",key:"1tzkfa"}],["path",{d:"M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05",key:"14pb5j"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],fe=l("earth",me);/**
22
+ * @license lucide-react v0.507.0 - ISC
23
+ *
24
+ * This source code is licensed under the ISC license.
25
+ * See the LICENSE file in the root directory of this source tree.
26
+ */const ye=[["path",{d:"M12 17h.01",key:"p32p05"}],["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z",key:"1mlx9k"}],["path",{d:"M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3",key:"mhlwft"}]],ge=l("file-question",ye);/**
27
+ * @license lucide-react v0.507.0 - ISC
28
+ *
29
+ * This source code is licensed under the ISC license.
30
+ * See the LICENSE file in the root directory of this source tree.
31
+ */const pe=[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2",key:"18mbvz"}],["path",{d:"M6.453 15h11.094",key:"3shlmq"}],["path",{d:"M8.5 2h7",key:"csnxdl"}]],xe=l("flask-conical",pe);/**
32
+ * @license lucide-react v0.507.0 - ISC
33
+ *
34
+ * This source code is licensed under the ISC license.
35
+ * See the LICENSE file in the root directory of this source tree.
36
+ */const ke=[["path",{d:"M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z",key:"j76jl0"}],["path",{d:"M22 10v6",key:"1lu8f3"}],["path",{d:"M6 12.5V16a6 3 0 0 0 12 0v-3.5",key:"1r8lef"}]],we=l("graduation-cap",ke);/**
37
+ * @license lucide-react v0.507.0 - ISC
38
+ *
39
+ * This source code is licensed under the ISC license.
40
+ * See the LICENSE file in the root directory of this source tree.
41
+ */const be=[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}],["path",{d:"M3.22 12H9.5l.5-1 2 4.5 2-7 1.5 3.5h5.27",key:"1uw2ng"}]],Me=l("heart-pulse",be);/**
42
+ * @license lucide-react v0.507.0 - ISC
43
+ *
44
+ * This source code is licensed under the ISC license.
45
+ * See the LICENSE file in the root directory of this source tree.
46
+ */const Ae=[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]],Qe=l("heart",Ae);/**
47
+ * @license lucide-react v0.507.0 - ISC
48
+ *
49
+ * This source code is licensed under the ISC license.
50
+ * See the LICENSE file in the root directory of this source tree.
51
+ */const je=[["path",{d:"m3 11 18-5v12L3 14v-3z",key:"n962bs"}],["path",{d:"M11.6 16.8a3 3 0 1 1-5.8-1.6",key:"1yl0tm"}]],_e=l("megaphone",je);/**
52
+ * @license lucide-react v0.507.0 - ISC
53
+ *
54
+ * This source code is licensed under the ISC license.
55
+ * See the LICENSE file in the root directory of this source tree.
56
+ */const ze=[["path",{d:"m16 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z",key:"7g6ntu"}],["path",{d:"m2 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z",key:"ijws7r"}],["path",{d:"M7 21h10",key:"1b0cd5"}],["path",{d:"M12 3v18",key:"108xh3"}],["path",{d:"M3 7h2c2 0 5-1 7-2 2 1 5 2 7 2h2",key:"3gwbw2"}]],Ne=l("scale",ze);/**
57
+ * @license lucide-react v0.507.0 - ISC
58
+ *
59
+ * This source code is licensed under the ISC license.
60
+ * See the LICENSE file in the root directory of this source tree.
61
+ */const Se=[["circle",{cx:"8",cy:"21",r:"1",key:"jimo8o"}],["circle",{cx:"19",cy:"21",r:"1",key:"13723u"}],["path",{d:"M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12",key:"9zh506"}]],ve=l("shopping-cart",Se);function De(e,t){const o=+j(e)-+j(t);return o<0?-1:o>0?1:o}function Ce(e){return K(e,Date.now())}function $e(e){return t=>{const a=(e?Math[e]:Math.trunc)(t);return a===0?0:a}}function qe(e,t,o){const a=Q(),n=o?.locale??a.locale??U,s=De(e,t);if(isNaN(s))throw new RangeError("Invalid time value");const i=Object.assign({},o,{addSuffix:o?.addSuffix,comparison:s}),[h,m]=R(o?.in,...s>0?[t,e]:[e,t]),d=$e("round"),x=m.getTime()-h.getTime(),f=x/v,H=_(m)-_(h),y=(x-H)/v,T=o?.unit;let u;if(f<1?u="second":f<60?u="minute":f<z?u="hour":y<N?u="day":y<S?u="month":u="year",u==="second"){const c=d(x/1e3);return n.formatDistance("xSeconds",c,i)}else if(u==="minute"){const c=d(f);return n.formatDistance("xMinutes",c,i)}else if(u==="hour"){const c=d(f/60);return n.formatDistance("xHours",c,i)}else if(u==="day"){const c=d(y/z);return n.formatDistance("xDays",c,i)}else if(u==="month"){const c=d(y/N);return c===12&&T!=="month"?n.formatDistance("xYears",1,i):n.formatDistance("xMonths",c,i)}else{const c=d(y/S);return n.formatDistance("xYears",c,i)}}function Ue(e,t){return qe(e,Ce(e),t)}const L={investment:{icon:r.jsx(ce,{size:14,"aria-hidden":"true"}),label:"Investment"},accounting:{icon:r.jsx(J,{size:14,"aria-hidden":"true"}),label:"Accounting"},healthcare:{icon:r.jsx(Me,{size:14,"aria-hidden":"true"}),label:"Healthcare"},legal:{icon:r.jsx(Ne,{size:14,"aria-hidden":"true"}),label:"Legal"},software:{icon:r.jsx(Y,{size:14,"aria-hidden":"true"}),label:"Software"},security:{icon:r.jsx(P,{size:14,"aria-hidden":"true"}),label:"Security"},role_play:{icon:r.jsx(O,{size:14,"aria-hidden":"true"}),label:"Role play"},personal_assistance:{icon:r.jsx(B,{size:14,"aria-hidden":"true"}),label:"Personal assistance"},education:{icon:r.jsx(we,{size:14,"aria-hidden":"true"}),label:"Education"},marketing:{icon:r.jsx(_e,{size:14,"aria-hidden":"true"}),label:"Marketing"},sales:{icon:r.jsx(ve,{size:14,"aria-hidden":"true"}),label:"Sales"},research:{icon:r.jsx(xe,{size:14,"aria-hidden":"true"}),label:"Research"},analysis:{icon:r.jsx(ue,{size:14,"aria-hidden":"true"}),label:"Analysis"},management:{icon:r.jsx(he,{size:14,"aria-hidden":"true"}),label:"Management"},social_media:{icon:r.jsx(fe,{size:14,"aria-hidden":"true"}),label:"Social media"},other:{icon:r.jsx(ge,{size:14,"aria-hidden":"true"}),label:"Other"}};function p(e){const t=e.split("_").join(" ");return t.charAt(0).toUpperCase()+t.slice(1)}const Oe=e=>L[e]??{icon:r.jsx(q,{size:14,"aria-hidden":"true"}),label:p(e)},$="inline-flex min-h-5.5 items-center rounded-full border border-hairline bg-sunken px-2 text-meta leading-none",Ve=({tags:e,categories:t,className:o})=>{if((!e||e.length===0)&&(!t||t.length===0))return null;const a=new Set((t??[]).map(s=>(L[s]?.label??p(s)).toLowerCase())),n=(e??[]).filter(s=>!a.has(p(s).toLowerCase()));return r.jsxs("div",{className:g("relative flex flex-wrap items-center gap-1.5 overflow-hidden",o),"data-testid":"agent-tags-and-categories",children:[t?.map(s=>{const i=Oe(s);return r.jsxs("span",{className:g($,"gap-1 font-medium text-ink-muted"),children:[i.icon,i.label]},s)}),n.map(s=>r.jsxs("span",{className:g($,"gap-1 font-normal text-ink-dim"),children:[r.jsx(q,{size:12,"aria-hidden":"true"}),p(s)]},s))]})},Be=({orgName:e,className:t})=>r.jsxs(F,{variant:"neutral",className:g("gap-1",t),"data-testid":"agent-org-badge",title:e?`Shared with ${e}, not the public hub`:"Shared with an organization, not the public hub",children:[r.jsx(O,{"aria-hidden":"true"}),e??"Organization"]}),M={all:["agent-statuses"],page:e=>[...M.all,"page",[...e]]},Ie=e=>[...new Set(e)].sort(),Pe=({agentIds:e,enabled:t=!0})=>{const{isAuthenticated:o}=k(),a=e.join(","),n=V.useMemo(()=>Ie(e),[a]),s=Z({queryKey:M.page(n),queryFn:async()=>(await ee(n)).result?.statuses??{},enabled:t&&o&&n.length>0,staleTime:5*60*1e3,gcTime:10*60*1e3,refetchOnWindowFocus:!1,retry:!1});return{...s,statuses:s.data??{},isKnown:s.isSuccess}},Ye=(e,t,o)=>o?e&&t[o]!==void 0:!1,E=(e,t,o)=>{e.setQueriesData({queryKey:M.all},a=>{if(!a)return a;const n=a[t]??{liked:!1,favourited:!1};return{...a,[t]:{...n,...o}}})},A=(e,{agentId:t,field:o,delta:a})=>{e.setQueriesData({queryKey:te.all},n=>{if(!n)return n;const s=n.result?.records??[];return s.some(i=>i.id===t)?{...n,result:{...n.result,records:s.map(i=>i.id===t?{...i,[o]:Math.max(0,(i[o]??0)+a)}:i)}}:n})},Ze=()=>{const e=w(),{isAuthenticated:t}=k();return b({mutationFn:async({agentId:a,isCurrentlyFavourited:n})=>{if(!t)throw new Error("Authentication required to favourite/unfavourite an agent.");if(!a)throw new Error("Agent ID is required.");return n?(await ae(a),{favourited:!1,changed:!0}):{favourited:!0,changed:(await ne(a)).result?.already_favourited!==!0}},onSuccess:({favourited:a,changed:n},s)=>{E(e,s.agentId,{favourited:a}),n&&A(e,{agentId:s.agentId,field:"favourite_count",delta:a?1:-1})}})},We=()=>{const e=w(),{isAuthenticated:t}=k();return b({mutationFn:async({agentId:a,isCurrentlyLiked:n})=>{if(!t)throw new Error("Authentication required to like/unlike an agent.");if(!a)throw new Error("Agent ID is required.");return n?(await se(a),{liked:!1,changed:!0}):{liked:!0,changed:(await oe(a)).result?.already_liked!==!0}},onSuccess:({liked:a,changed:n},s)=>{E(e,s.agentId,{liked:a}),n&&A(e,{agentId:s.agentId,field:"like_count",delta:a?1:-1})}})},Le=(e,t)=>{const o=[];for(const[,a]of e.getQueriesData({queryKey:I}))for(const n of a?.agents??[])n.id!==t&&o.push(n.name);return o},Ge=()=>{const e=w(),t=W();return b({mutationFn:async({agentId:a})=>{if(!C.baseUrl)throw new Error("Local Operator API URL is not configured.");return X.downloadAgentFromRadient(C.baseUrl,a)},onSuccess:(a,n)=>{const s=a.result,i=s?.name?.trim()||n.agentName?.trim()||"Agent",h=s?.renamed_from?.trim()||null,m=s?.id?ie(i,Le(e,s.id)):null;h?D(`Downloaded "${i}" — you already have an agent called "${h}".`):m?G(`Downloaded "${i}". You already have an agent called "${m}", so two agents now answer to that name and either may be picked. Rename one of them.`):D(`Downloaded "${i}" from the hub.`),e.invalidateQueries({queryKey:I}),A(e,{agentId:n.agentId,field:"download_count",delta:1});const d=a.result;d?.id?t(`/chat/${d.id}`):console.warn("Downloaded agent ID not found in response, cannot navigate to chat.")}})};export{Ve as A,L as C,Qe as H,Be as O,We as a,Ze as b,Ge as c,Oe as d,Ue as f,Ye as i,Pe as u};
@@ -0,0 +1 @@
1
+ import{av as T,aw as A,ax as $,ay as I,az as h,aA as R,aB as q,aC as r,g as _,aD as w,aE as L,aF as N,aG as P,aH as S,aI as k}from"./index-gd7H8-q6.js";const f={malware_or_exploitation:"Instructions to build or spread malware, or to attack systems you do not own, cannot be published.",credential_theft:"Instructions to obtain someone else's credentials or tokens cannot be published.",fraud_or_deception:"Instructions to deceive or defraud people cannot be published.",harassment_or_hate:"Instructions to harass, threaten or target people cannot be published.",sexual_content_minors:"This agent cannot be published. If you believe this is a mistake, contact support.",sexual_content:"Explicit sexual content cannot be published.",violence_or_weapons:"Instructions to build weapons or to injure people cannot be published.",drugs_or_controlled_substances:"Instructions to make or traffic illegal drugs cannot be published.",self_harm:"This agent cannot be published. If you believe this is a mistake, contact support.",mass_surveillance_or_privacy_abuse:"Instructions to surveil or profile people without their consent cannot be published.",evasion_or_abuse_tooling:"Instructions to evade or defeat safety and anti-abuse systems cannot be published.",prompt_injection:"This instruction set tries to instruct the reviewer rather than describe an agent, so it cannot be published.",unclear_dual_use:"We could not tell whether this is aimed at your own systems or someone else's. Add a sentence stating the scope and target, then publish again.",other_harmful:"This agent was rejected because its instructions would cause harm."},E=e=>{const n=e.trim();return n.length>12&&/\s/.test(n)&&!/^(not found|bad request|unauthorized|error|internal server error)\.?$/i.test(n)};function O(e){const n=e?.categories?.[0];return n&&q(n)?f[n]:f.other_harmful}function C(e,n){const t=n?.rule?` ${n.rule}`:"";switch(n?.field){case"name":return{body:`Name${t||" is not acceptable"}.`,field:"name"};case"instructions":return{body:t?`The instruction body${t}.`:`The instruction body must be between 1 and ${R} characters.`,field:"instructions"};case"description":return{body:`Description${t}.`,field:"description"};case"tools":return{body:`Tools${t}.`,field:"tools"};case"when_to_use":return{body:`When to use${t}.`,field:"when_to_use"};case"categories":return{body:`Categories${t}.`,field:"categories"};case"tags":return{body:`Tags${t}.`,field:"tags"};default:return{body:e,field:null}}}function Z(e,n){const t=n.surface==="pull",a=t?"Nothing was pulled.":"Nothing was published.",o=t?"pull again":"publish again",i=n.name.trim()||(t?"this team":"this agent");switch(e.code){case"name_taken":return e.details?.owned_by_caller===!0?{variant:"danger",headline:"You already published this agent",body:`You published "${i}" already. Update that listing instead of publishing a second one.`,note:null,actions:e.details?.existing_agent_id||n.hubAgentId?["update-listing","focus-name"]:["focus-name"]}:{variant:"danger",headline:"That name is taken",body:`"${i}" is already published on the hub by another account. Agent names are unique across the hub.`,note:null,actions:["focus-name"]};case"name_claim_in_flight":return{variant:"warning",headline:"That name is being published right now",body:`Someone is publishing an agent called "${i}" at this moment. It is not claimed — try again in a moment.`,note:null,actions:["retry"]};case"name_reserved_builtin":{const s=e.details?.builtin_name,d=s?h(s)===h(i):!1;return{variant:"danger",headline:"That name is reserved",body:s&&!d?`"${i}" is reserved by the built-in agent "${s}". Built-in names cannot be published to the hub.`:`"${s??i}" is the name of a built-in agent. Built-in names cannot be published to the hub.`,note:null,actions:["focus-name","install-builtin"]}}case"moderation_rejected":return{variant:"danger",headline:"This agent was not accepted",body:e.details?.reason?.trim()||e.message,note:O(e.details),actions:["edit-instructions"]};case"moderation_unavailable":return{variant:"warning",headline:"Review is temporarily unavailable",body:"We could not review this agent just now. Nothing was published. Try again in a minute.",note:null,actions:["retry"]};case"invalid_instruction_set":{const{body:s,field:d}=C(e.message,e.details);return{variant:"danger",headline:"The agent document is not valid",body:s,note:null,actions:d==="name"?["focus-name"]:d==="instructions"?["edit-instructions"]:["edit-agent"]}}case"payload_too_large":{const s=e.details?.limit_bytes;return{variant:"danger",headline:"This agent is too large to publish",body:s?`The instruction set is larger than ${Math.round(s/1024)} KiB. Shorten the instructions.`:"The instruction set is larger than the hub accepts. Shorten the instructions.",note:null,actions:["edit-instructions"]}}case"not_owner":return{variant:"danger",headline:"You cannot update this listing",body:"This listing belongs to another account.",note:null,actions:["publish-as-new"]};case"agent_not_found":return{variant:"danger",headline:"That listing no longer exists",body:"It may have been delisted.",note:null,actions:["publish-as-new","refresh-hub"]};case"hub_unauthorized":return{variant:"danger",headline:"The hub refused this machine's sign-in",body:`${a} Sign in to Radient again to replace the credential the hub refused, then ${o}.`,note:null,actions:["sign-in"]};case"hub_unavailable":return{variant:"warning",headline:t?"The pull did not go through":"The publication did not go through",body:E(e.message)?e.message:`${a} Try again in a moment, or update the backend if the hub has moved.`,note:null,actions:["retry"]};case"local_failure":return{variant:"warning",headline:t?"The team could not be pulled from this machine":"The agent could not be published from this machine",body:e.message,note:null,actions:["retry"]};case"team_plan_required":return{variant:"warning",headline:"That organization needs an active Team plan",body:t?"Reading an organization's teams is part of the Team plan. Ask an owner of the organization to activate it in the Radient console, then pull again.":"Sharing agents inside an organization is part of the Team plan. Ask an owner of the organization to activate it in the Radient console, then publish again.",note:null,actions:["retry"]};case"not_a_member":return{variant:"danger",headline:"You are not a member of that organization",body:`${a} Ask an owner of the organization to invite you, then ${o}.`,note:null,actions:[]};case"insufficient_role":{const s=e.details?.required;return{variant:"danger",headline:"Your organization role does not allow this",body:s?`${t?"Reading an organization's teams needs":"Publishing into an organization needs"} the ${s} role. Ask an owner of the organization to change your role, then ${o}.`:`${t?"Reading an organization's teams needs":"Publishing into an organization needs"} a higher role than yours. Ask an owner of the organization to change your role, then ${o}.`,note:null,actions:[]}}case"team_not_found":return{variant:"danger",headline:"That team is no longer published",body:"It may have been delisted since this page was loaded.",note:null,actions:["refresh-hub"]};default:return{variant:"danger",headline:"The agent could not be published",body:e.message,note:null,actions:["retry"]}}}const z=[/^(?:Download agent from Radient failed: )?(?:Error downloading agent from Radient: )?\s*/,/^Failed to download agent(?: [^\s]+)? from Radient Agent Hub(?: due to a requests error)?:\s*/,/^[A-Za-z_][\w.]*\([^)]*\):\s*/],U=/^(\d{3})\b/,F=new Set([404,410]),j=["read timed out","connection timed out","connection refused","connection aborted","connection reset","connectionerror","connecttimeout","remote end closed connection","max retries exceeded","temporary failure in name resolution","name or service not known","no route to host"],x=e=>{const n=e.toLowerCase();return j.some(t=>n.includes(t))||I(e)},B=(e,n)=>{const t=n.trim()?`"${n.trim()}"`:"That agent";if(A(e))switch(e.code){case"agent_not_found":return`${t} is no longer on the hub, so nothing was downloaded.`;case"hub_unavailable":return`The hub did not complete the download, so ${t} was not downloaded.`;default:return`${t} was not downloaded: ${e.message}`}const a=z.reduce((i,s)=>i.replace(s,""),$(e,"").trim()).trim();if(!a)return`${t} could not be downloaded.`;const o=Number(U.exec(a)?.[1]??Number.NaN);return F.has(o)?`${t} is no longer on the hub, so nothing was downloaded.`:x(a)||o===408?`The hub could not be reached, so ${t} was not downloaded.`:o===429?`The hub is busy, so ${t} was not downloaded. Try again in a moment.`:o===401||o===403?`The hub refused this machine's sign-in, so ${t} was not downloaded.`:o>=500?`The hub could not complete the download, so ${t} was not downloaded. Try again in a moment.`:o>=400?`The hub refused the download, so ${t} is not here.`:`${t} was not downloaded: ${a}`},D="The action did not complete.",J=(e,n,t)=>e==="download"?B(n,t):T(D,n),V={"focus-name":"Choose another name","update-listing":"Update the existing listing","install-builtin":"Install the built-in instead",retry:"Try again","edit-instructions":"Edit the instructions","edit-agent":"Edit the agent","publish-as-new":"Publish as a new listing","sign-in":"Sign in again","refresh-hub":"Refresh the hub"};function c(){return crypto.randomUUID()}async function K(e=1,n=20,t){const a={page:e,per_page:n};if(t)for(const[o,i]of Object.entries(t))i&&(a[o]=i);return r({operation:"agents.list",query:a})}async function ee(e){return r({operation:"agents.get",agentId:e})}async function ne(e){return r({operation:"agents.delete",agentId:e,requestId:c(),confirmed:!0})}async function te(e){return r({operation:"agents.like",agentId:e,requestId:c()})}async function ae(e){return r({operation:"agents.unlike",agentId:e,requestId:c(),confirmed:!0})}async function oe(e){return r({operation:"agents.favourite",agentId:e,requestId:c()})}async function se(e){return r({operation:"agents.unfavourite",agentId:e,requestId:c(),confirmed:!0})}async function ie(e,n){return r({operation:"comments.create",agentId:e,payload:n,requestId:c()})}async function re(e,n=1,t=20){return r({operation:"comments.list",agentId:e,query:{page:n,per_page:t}})}async function ue(e,n,t){return r({operation:"comments.update",agentId:e,commentId:n,payload:t,requestId:c()})}async function le(e,n){return r({operation:"comments.delete",agentId:e,commentId:n,requestId:c(),confirmed:!0})}async function ce(e){return r({operation:"agents.statuses",query:{agent_ids:e.join(",")}})}async function M(){return r({operation:"memberships.list"})}async function Q(e,n=1,t=20,a){const o={page:n,per_page:t};if(a)for(const[i,s]of Object.entries(a))s&&(o[i]=s);return r({operation:"org_agents.list",tenantId:e,query:o})}async function de(e){return r({operation:"org_teams.list",tenantId:e})}const W="download_count",b={all:["public-agents"],list:e=>[...b.all,"list",{page:e.page,perPage:e.perPage,categories:e.categories?.join(",")??void 0,name:e.name??void 0,description:e.description??void 0,sort:e.sort,order:e.order}]},m={all:["org-agents"],list:(e,n)=>[...m.all,"list",e,{page:n.page,perPage:n.perPage,categories:n.categories?.join(",")??void 0,name:n.name??void 0,description:n.description??void 0,sort:n.sort,order:n.order}]},Y=e=>e&&e[0]===m.all[0]?String(e[2]??""):null,he=e=>e.invalidateQueries({queryKey:b.all}),ge=(e,n)=>e.invalidateQueries({queryKey:n?[...m.all,"list",n]:m.all}),me=({page:e=1,perPage:n=20,enabled:t=!0,categories:a,name:o,description:i,sort:s=W,order:d="desc",tenantId:g}={})=>{const p={page:e,perPage:n,categories:a,name:o,description:i,sort:s,order:d},v=g?m.list(g,p):b.list(p),l=_({queryKey:v,queryFn:async()=>{const u={};return a&&a.length>0&&(u.categories=a.join(",")),o&&(u.name=o),i&&(u.description=i),u.sort=s,u.order=d,g?await Q(g,e,n,u):await K(e,n,u)},select:u=>u.result,enabled:t,retry:w,staleTime:5*60*1e3,gcTime:10*60*1e3,refetchOnWindowFocus:!1,placeholderData:(u,y)=>Y(y?.queryKey)===(g??null)?u:void 0});return{...l,agents:l.data?.records,isRefreshing:l.isFetching&&l.data!==void 0,pagination:l.data?{page:l.data.page,perPage:l.data.per_page,totalPages:l.data.total_pages,totalRecords:l.data.total_records}:void 0}},H={name:"Name",description:"Description",instructions:"The instruction body",tools:"Tools"};function be(e){const n=[],t=(a,o)=>{o&&n.push({field:a,message:`${H[a]} ${o}.`})};return t("name",L(e.name)),t("description",N(e.description)),e.instructions!==null&&t("instructions",P(e.instructions)),t("tools",S(e.tools??[])),n}function pe(e,n){const t=h(e);return n.some(a=>h(a)===t)}function ye(e){for(const n of e??[]){const t=n.indexOf(":");if(t<0||n.slice(0,t).trim().toLowerCase()!=="tools")continue;const a=n.slice(t+1).split(",").map(o=>o.trim()).filter(Boolean);return a.length>0?a:null}return null}function fe(e,n){const t=h(e);return n.find(a=>h(a)===t)??null}const G={all:["memberships"]},_e=({enabled:e=!0}={})=>{const{isAuthenticated:n}=k(),t=_({queryKey:G.all,queryFn:async()=>(await M()).result??{memberships:[]},enabled:e&&n,staleTime:5*60*1e3,gcTime:10*60*1e3,refetchOnWindowFocus:!1,retry:w});return{...t,memberships:t.data?.memberships??[]}};export{V as P,ne as a,_e as b,ie as c,le as d,J as e,de as f,ee as g,me as h,he as i,ce as j,b as k,re as l,se as m,oe as n,ae as o,Z as p,te as q,fe as r,ge as s,pe as t,ue as u,be as v,ye as w};
@@ -1,7 +1,7 @@
1
- import{_ as n,s as ii,g as ei,t as vt,q as si,a as ni,b as ai,l as Lt,K as oi,e as hi,z as ri,G as lt,F as Et,H as li,M as ci,i as ui,N as gi}from"./mermaid.core-Dm5FgUKb.js";import{F as kt,E as Tt,G as Rt}from"./index-DyfVjYXR.js";import"./index-hIJSZMtz.js";import"./error-boundary-BX3Jjofp.js";import"./console-mirror-BoykuSNB.js";var at=function(){var t=n(function(B,h,l,c){for(l=l||{},c=B.length;c--;l[B[c]]=h);return l},"o"),i=[1,10,12,14,16,18,19,21,23],e=[2,6],s=[1,3],o=[1,5],p=[1,6],g=[1,7],y=[1,5,10,12,14,16,18,19,21,23,34,35,36],T=[1,25],E=[1,26],S=[1,28],R=[1,29],I=[1,30],V=[1,31],_=[1,32],L=[1,33],f=[1,34],C=[1,35],r=[1,36],D=[1,37],N=[1,43],mt=[1,42],bt=[1,47],$=[1,50],b=[1,10,12,14,16,18,19,21,23,34,35,36],J=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],P=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],At=[1,64],tt={trace:n(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:n(function(h,l,c,u,m,a,X){var x=a.length-1;switch(m){case 5:u.setOrientation(a[x]);break;case 9:u.setDiagramTitle(a[x].text.trim());break;case 12:u.setLineData({text:"",type:"text"},a[x]);break;case 13:u.setLineData(a[x-1],a[x]);break;case 14:u.setBarData({text:"",type:"text"},a[x]);break;case 15:u.setBarData(a[x-1],a[x]);break;case 16:this.$=a[x].trim(),u.setAccTitle(this.$);break;case 17:case 18:this.$=a[x].trim(),u.setAccDescription(this.$);break;case 19:this.$=a[x-1];break;case 20:this.$=[Number(a[x-2]),...a[x]];break;case 21:this.$=[Number(a[x])];break;case 22:u.setXAxisTitle(a[x]);break;case 23:u.setXAxisTitle(a[x-1]);break;case 24:u.setXAxisTitle({type:"text",text:""});break;case 25:u.setXAxisBand(a[x]);break;case 26:u.setXAxisRangeData(Number(a[x-2]),Number(a[x]));break;case 27:this.$=a[x-1];break;case 28:this.$=[a[x-2],...a[x]];break;case 29:this.$=[a[x]];break;case 30:u.setYAxisTitle(a[x]);break;case 31:u.setYAxisTitle(a[x-1]);break;case 32:u.setYAxisTitle({type:"text",text:""});break;case 33:u.setYAxisRangeData(Number(a[x-2]),Number(a[x]));break;case 37:this.$={text:a[x],type:"text"};break;case 38:this.$={text:a[x],type:"text"};break;case 39:this.$={text:a[x],type:"markdown"};break;case 40:this.$=a[x];break;case 41:this.$=a[x-1]+""+a[x];break}},"anonymous"),table:[t(i,e,{3:1,4:2,7:4,5:s,34:o,35:p,36:g}),{1:[3]},t(i,e,{4:2,7:4,3:8,5:s,34:o,35:p,36:g}),t(i,e,{4:2,7:4,6:9,3:10,5:s,8:[1,11],34:o,35:p,36:g}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},t(y,[2,34]),t(y,[2,35]),t(y,[2,36]),{1:[2,1]},t(i,e,{4:2,7:4,3:21,5:s,34:o,35:p,36:g}),{1:[2,3]},t(y,[2,5]),t(i,[2,7],{4:22,34:o,35:p,36:g}),{11:23,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D},{11:39,13:38,24:N,27:mt,29:40,30:41,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D},{11:45,15:44,27:bt,33:46,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D},{11:49,17:48,24:$,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D},{11:52,17:51,24:$,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D},{20:[1,53]},{22:[1,54]},t(b,[2,18]),{1:[2,2]},t(b,[2,8]),t(b,[2,9]),t(J,[2,37],{40:55,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D}),t(J,[2,38]),t(J,[2,39]),t(P,[2,40]),t(P,[2,42]),t(P,[2,43]),t(P,[2,44]),t(P,[2,45]),t(P,[2,46]),t(P,[2,47]),t(P,[2,48]),t(P,[2,49]),t(P,[2,50]),t(P,[2,51]),t(b,[2,10]),t(b,[2,22],{30:41,29:56,24:N,27:mt}),t(b,[2,24]),t(b,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D},t(b,[2,11]),t(b,[2,30],{33:60,27:bt}),t(b,[2,32]),{31:[1,61]},t(b,[2,12]),{17:62,24:$},{25:63,27:At},t(b,[2,14]),{17:65,24:$},t(b,[2,16]),t(b,[2,17]),t(P,[2,41]),t(b,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},t(b,[2,31]),{27:[1,69]},t(b,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},t(b,[2,15]),t(b,[2,26]),t(b,[2,27]),{11:59,32:72,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D},t(b,[2,33]),t(b,[2,19]),{25:73,27:At},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:n(function(h,l){if(l.recoverable)this.trace(h);else{var c=new Error(h);throw c.hash=l,c}},"parseError"),parse:n(function(h){var l=this,c=[0],u=[],m=[null],a=[],X=this.table,x="",q=0,Ct=0,Kt=2,wt=1,Zt=a.slice.call(arguments,1),A=Object.create(this.lexer),W={yy:{}};for(var it in this.yy)Object.prototype.hasOwnProperty.call(this.yy,it)&&(W.yy[it]=this.yy[it]);A.setInput(h,W.yy),W.yy.lexer=A,W.yy.parser=this,typeof A.yylloc>"u"&&(A.yylloc={});var et=A.yylloc;a.push(et);var Jt=A.options&&A.options.ranges;typeof W.yy.parseError=="function"?this.parseError=W.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ti(k){c.length=c.length-2*k,m.length=m.length-k,a.length=a.length-k}n(ti,"popStack");function St(){var k;return k=u.pop()||A.lex()||wt,typeof k!="number"&&(k instanceof Array&&(u=k,k=u.pop()),k=l.symbols_[k]||k),k}n(St,"lex");for(var w,O,v,st,z={},j,M,_t,Q;;){if(O=c[c.length-1],this.defaultActions[O]?v=this.defaultActions[O]:((w===null||typeof w>"u")&&(w=St()),v=X[O]&&X[O][w]),typeof v>"u"||!v.length||!v[0]){var nt="";Q=[];for(j in X[O])this.terminals_[j]&&j>Kt&&Q.push("'"+this.terminals_[j]+"'");A.showPosition?nt="Parse error on line "+(q+1)+`:
1
+ import{_ as n,s as ii,g as ei,t as vt,q as si,a as ni,b as ai,l as Lt,K as oi,e as hi,z as ri,G as lt,F as Et,H as li,M as ci,i as ui,N as gi}from"./mermaid.core-J-3igmgd.js";import{E as kt,D as Tt,F as Rt}from"./index-gd7H8-q6.js";import"./index-CSEVqIl1.js";import"./error-boundary-DtDjc7C4.js";import"./console-mirror-CpiNswSB.js";var at=function(){var t=n(function(B,h,l,c){for(l=l||{},c=B.length;c--;l[B[c]]=h);return l},"o"),i=[1,10,12,14,16,18,19,21,23],e=[2,6],s=[1,3],o=[1,5],p=[1,6],g=[1,7],y=[1,5,10,12,14,16,18,19,21,23,34,35,36],T=[1,25],E=[1,26],S=[1,28],R=[1,29],I=[1,30],V=[1,31],_=[1,32],L=[1,33],f=[1,34],C=[1,35],r=[1,36],D=[1,37],N=[1,43],mt=[1,42],bt=[1,47],$=[1,50],b=[1,10,12,14,16,18,19,21,23,34,35,36],J=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],P=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],At=[1,64],tt={trace:n(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:n(function(h,l,c,u,m,a,X){var x=a.length-1;switch(m){case 5:u.setOrientation(a[x]);break;case 9:u.setDiagramTitle(a[x].text.trim());break;case 12:u.setLineData({text:"",type:"text"},a[x]);break;case 13:u.setLineData(a[x-1],a[x]);break;case 14:u.setBarData({text:"",type:"text"},a[x]);break;case 15:u.setBarData(a[x-1],a[x]);break;case 16:this.$=a[x].trim(),u.setAccTitle(this.$);break;case 17:case 18:this.$=a[x].trim(),u.setAccDescription(this.$);break;case 19:this.$=a[x-1];break;case 20:this.$=[Number(a[x-2]),...a[x]];break;case 21:this.$=[Number(a[x])];break;case 22:u.setXAxisTitle(a[x]);break;case 23:u.setXAxisTitle(a[x-1]);break;case 24:u.setXAxisTitle({type:"text",text:""});break;case 25:u.setXAxisBand(a[x]);break;case 26:u.setXAxisRangeData(Number(a[x-2]),Number(a[x]));break;case 27:this.$=a[x-1];break;case 28:this.$=[a[x-2],...a[x]];break;case 29:this.$=[a[x]];break;case 30:u.setYAxisTitle(a[x]);break;case 31:u.setYAxisTitle(a[x-1]);break;case 32:u.setYAxisTitle({type:"text",text:""});break;case 33:u.setYAxisRangeData(Number(a[x-2]),Number(a[x]));break;case 37:this.$={text:a[x],type:"text"};break;case 38:this.$={text:a[x],type:"text"};break;case 39:this.$={text:a[x],type:"markdown"};break;case 40:this.$=a[x];break;case 41:this.$=a[x-1]+""+a[x];break}},"anonymous"),table:[t(i,e,{3:1,4:2,7:4,5:s,34:o,35:p,36:g}),{1:[3]},t(i,e,{4:2,7:4,3:8,5:s,34:o,35:p,36:g}),t(i,e,{4:2,7:4,6:9,3:10,5:s,8:[1,11],34:o,35:p,36:g}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},t(y,[2,34]),t(y,[2,35]),t(y,[2,36]),{1:[2,1]},t(i,e,{4:2,7:4,3:21,5:s,34:o,35:p,36:g}),{1:[2,3]},t(y,[2,5]),t(i,[2,7],{4:22,34:o,35:p,36:g}),{11:23,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D},{11:39,13:38,24:N,27:mt,29:40,30:41,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D},{11:45,15:44,27:bt,33:46,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D},{11:49,17:48,24:$,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D},{11:52,17:51,24:$,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D},{20:[1,53]},{22:[1,54]},t(b,[2,18]),{1:[2,2]},t(b,[2,8]),t(b,[2,9]),t(J,[2,37],{40:55,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D}),t(J,[2,38]),t(J,[2,39]),t(P,[2,40]),t(P,[2,42]),t(P,[2,43]),t(P,[2,44]),t(P,[2,45]),t(P,[2,46]),t(P,[2,47]),t(P,[2,48]),t(P,[2,49]),t(P,[2,50]),t(P,[2,51]),t(b,[2,10]),t(b,[2,22],{30:41,29:56,24:N,27:mt}),t(b,[2,24]),t(b,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D},t(b,[2,11]),t(b,[2,30],{33:60,27:bt}),t(b,[2,32]),{31:[1,61]},t(b,[2,12]),{17:62,24:$},{25:63,27:At},t(b,[2,14]),{17:65,24:$},t(b,[2,16]),t(b,[2,17]),t(P,[2,41]),t(b,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},t(b,[2,31]),{27:[1,69]},t(b,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},t(b,[2,15]),t(b,[2,26]),t(b,[2,27]),{11:59,32:72,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D},t(b,[2,33]),t(b,[2,19]),{25:73,27:At},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:n(function(h,l){if(l.recoverable)this.trace(h);else{var c=new Error(h);throw c.hash=l,c}},"parseError"),parse:n(function(h){var l=this,c=[0],u=[],m=[null],a=[],X=this.table,x="",G=0,Ct=0,Kt=2,wt=1,Zt=a.slice.call(arguments,1),A=Object.create(this.lexer),W={yy:{}};for(var it in this.yy)Object.prototype.hasOwnProperty.call(this.yy,it)&&(W.yy[it]=this.yy[it]);A.setInput(h,W.yy),W.yy.lexer=A,W.yy.parser=this,typeof A.yylloc>"u"&&(A.yylloc={});var et=A.yylloc;a.push(et);var Jt=A.options&&A.options.ranges;typeof W.yy.parseError=="function"?this.parseError=W.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ti(k){c.length=c.length-2*k,m.length=m.length-k,a.length=a.length-k}n(ti,"popStack");function St(){var k;return k=u.pop()||A.lex()||wt,typeof k!="number"&&(k instanceof Array&&(u=k,k=u.pop()),k=l.symbols_[k]||k),k}n(St,"lex");for(var w,O,v,st,z={},j,M,_t,Q;;){if(O=c[c.length-1],this.defaultActions[O]?v=this.defaultActions[O]:((w===null||typeof w>"u")&&(w=St()),v=X[O]&&X[O][w]),typeof v>"u"||!v.length||!v[0]){var nt="";Q=[];for(j in X[O])this.terminals_[j]&&j>Kt&&Q.push("'"+this.terminals_[j]+"'");A.showPosition?nt="Parse error on line "+(G+1)+`:
2
2
  `+A.showPosition()+`
3
- Expecting `+Q.join(", ")+", got '"+(this.terminals_[w]||w)+"'":nt="Parse error on line "+(q+1)+": Unexpected "+(w==wt?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(nt,{text:A.match,token:this.terminals_[w]||w,line:A.yylineno,loc:et,expected:Q})}if(v[0]instanceof Array&&v.length>1)throw new Error("Parse Error: multiple actions possible at state: "+O+", token: "+w);switch(v[0]){case 1:c.push(w),m.push(A.yytext),a.push(A.yylloc),c.push(v[1]),w=null,Ct=A.yyleng,x=A.yytext,q=A.yylineno,et=A.yylloc;break;case 2:if(M=this.productions_[v[1]][1],z.$=m[m.length-M],z._$={first_line:a[a.length-(M||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(M||1)].first_column,last_column:a[a.length-1].last_column},Jt&&(z._$.range=[a[a.length-(M||1)].range[0],a[a.length-1].range[1]]),st=this.performAction.apply(z,[x,Ct,q,W.yy,v[1],m,a].concat(Zt)),typeof st<"u")return st;M&&(c=c.slice(0,-1*M*2),m=m.slice(0,-1*M),a=a.slice(0,-1*M)),c.push(this.productions_[v[1]][0]),m.push(z.$),a.push(z._$),_t=X[c[c.length-2]][c[c.length-1]],c.push(_t);break;case 3:return!0}}return!0},"parse")},Qt=function(){var B={EOF:1,parseError:n(function(l,c){if(this.yy.parser)this.yy.parser.parseError(l,c);else throw new Error(l)},"parseError"),setInput:n(function(h,l){return this.yy=l||this.yy||{},this._input=h,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:n(function(){var h=this._input[0];this.yytext+=h,this.yyleng++,this.offset++,this.match+=h,this.matched+=h;var l=h.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),h},"input"),unput:n(function(h){var l=h.length,c=h.split(/(?:\r\n?|\n)/g);this._input=h+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-l),this.offset-=l;var u=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),c.length-1&&(this.yylineno-=c.length-1);var m=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:c?(c.length===u.length?this.yylloc.first_column:0)+u[u.length-c.length].length-c[0].length:this.yylloc.first_column-l},this.options.ranges&&(this.yylloc.range=[m[0],m[0]+this.yyleng-l]),this.yyleng=this.yytext.length,this},"unput"),more:n(function(){return this._more=!0,this},"more"),reject:n(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).
3
+ Expecting `+Q.join(", ")+", got '"+(this.terminals_[w]||w)+"'":nt="Parse error on line "+(G+1)+": Unexpected "+(w==wt?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(nt,{text:A.match,token:this.terminals_[w]||w,line:A.yylineno,loc:et,expected:Q})}if(v[0]instanceof Array&&v.length>1)throw new Error("Parse Error: multiple actions possible at state: "+O+", token: "+w);switch(v[0]){case 1:c.push(w),m.push(A.yytext),a.push(A.yylloc),c.push(v[1]),w=null,Ct=A.yyleng,x=A.yytext,G=A.yylineno,et=A.yylloc;break;case 2:if(M=this.productions_[v[1]][1],z.$=m[m.length-M],z._$={first_line:a[a.length-(M||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(M||1)].first_column,last_column:a[a.length-1].last_column},Jt&&(z._$.range=[a[a.length-(M||1)].range[0],a[a.length-1].range[1]]),st=this.performAction.apply(z,[x,Ct,G,W.yy,v[1],m,a].concat(Zt)),typeof st<"u")return st;M&&(c=c.slice(0,-1*M*2),m=m.slice(0,-1*M),a=a.slice(0,-1*M)),c.push(this.productions_[v[1]][0]),m.push(z.$),a.push(z._$),_t=X[c[c.length-2]][c[c.length-1]],c.push(_t);break;case 3:return!0}}return!0},"parse")},Qt=function(){var B={EOF:1,parseError:n(function(l,c){if(this.yy.parser)this.yy.parser.parseError(l,c);else throw new Error(l)},"parseError"),setInput:n(function(h,l){return this.yy=l||this.yy||{},this._input=h,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:n(function(){var h=this._input[0];this.yytext+=h,this.yyleng++,this.offset++,this.match+=h,this.matched+=h;var l=h.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),h},"input"),unput:n(function(h){var l=h.length,c=h.split(/(?:\r\n?|\n)/g);this._input=h+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-l),this.offset-=l;var u=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),c.length-1&&(this.yylineno-=c.length-1);var m=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:c?(c.length===u.length?this.yylloc.first_column:0)+u[u.length-c.length].length-c[0].length:this.yylloc.first_column-l},this.options.ranges&&(this.yylloc.range=[m[0],m[0]+this.yyleng-l]),this.yyleng=this.yytext.length,this},"unput"),more:n(function(){return this._more=!0,this},"more"),reject:n(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:n(function(h){this.unput(this.match.slice(h))},"less"),pastInput:n(function(){var h=this.matched.substr(0,this.matched.length-this.match.length);return(h.length>20?"...":"")+h.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:n(function(){var h=this.match;return h.length<20&&(h+=this._input.substr(0,20-h.length)),(h.substr(0,20)+(h.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:n(function(){var h=this.pastInput(),l=new Array(h.length+1).join("-");return h+this.upcomingInput()+`
5
5
  `+l+"^"},"showPosition"),test_match:n(function(h,l){var c,u,m;if(this.options.backtrack_lexer&&(m={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(m.yylloc.range=this.yylloc.range.slice(0))),u=h[0].match(/(?:\r\n?|\n).*/g),u&&(this.yylineno+=u.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:u?u[u.length-1].length-u[u.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+h[0].length},this.yytext+=h[0],this.match+=h[0],this.matches=h,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(h[0].length),this.matched+=h[0],c=this.performAction.call(this,this.yy,this,l,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),c)return c;if(this._backtrack){for(var a in m)this[a]=m[a];return!1}return!1},"test_match"),next:n(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var h,l,c,u;this._more||(this.yytext="",this.match="");for(var m=this._currentRules(),a=0;a<m.length;a++)if(c=this._input.match(this.rules[m[a]]),c&&(!l||c[0].length>l[0].length)){if(l=c,u=a,this.options.backtrack_lexer){if(h=this.test_match(c,m[a]),h!==!1)return h;if(this._backtrack){l=!1;continue}else return!1}else if(!this.options.flex)break}return l?(h=this.test_match(l,m[u]),h!==!1?h:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
- `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:n(function(){var l=this.next();return l||this.lex()},"lex"),begin:n(function(l){this.conditionStack.push(l)},"begin"),popState:n(function(){var l=this.conditionStack.length-1;return l>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:n(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:n(function(l){return l=this.conditionStack.length-1-Math.abs(l||0),l>=0?this.conditionStack[l]:"INITIAL"},"topState"),pushState:n(function(l){this.begin(l)},"pushState"),stateStackSize:n(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:n(function(l,c,u,m){switch(u){case 0:break;case 1:break;case 2:return this.popState(),34;case 3:return this.popState(),34;case 4:return 34;case 5:break;case 6:return 10;case 7:return this.pushState("acc_title"),19;case 8:return this.popState(),"acc_title_value";case 9:return this.pushState("acc_descr"),21;case 10:return this.popState(),"acc_descr_value";case 11:this.pushState("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 5;case 15:return 8;case 16:return this.pushState("axis_data"),"X_AXIS";case 17:return this.pushState("axis_data"),"Y_AXIS";case 18:return this.pushState("axis_band_data"),24;case 19:return 31;case 20:return this.pushState("data"),16;case 21:return this.pushState("data"),18;case 22:return this.pushState("data_inner"),24;case 23:return 27;case 24:return this.popState(),26;case 25:this.popState();break;case 26:this.pushState("string");break;case 27:this.popState();break;case 28:return"STR";case 29:return 24;case 30:return 26;case 31:return 43;case 32:return"COLON";case 33:return 44;case 34:return 28;case 35:return 45;case 36:return 46;case 37:return 48;case 38:return 50;case 39:return 47;case 40:return 41;case 41:return 49;case 42:return 42;case 43:break;case 44:return 35;case 45:return 36}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\{)/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,23,24,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,20,21,22,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,24,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,23,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[27,28],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0}}};return B}();tt.lexer=Qt;function G(){this.yy={}}return n(G,"Parser"),G.prototype=tt,tt.Parser=G,new G}();at.parser=at;var xi=at;function ot(t){return t.type==="bar"}n(ot,"isBarPlot");function ct(t){return t.type==="band"}n(ct,"isBandAxisData");function F(t){return t.type==="linear"}n(F,"isLinearAxisData");var It=class{constructor(t){this.parentGroup=t}static{n(this,"TextDimensionCalculatorWithFont")}getMaxDimension(t,i){if(!this.parentGroup)return{width:t.reduce((o,p)=>Math.max(p.length,o),0)*i,height:i};const e={width:0,height:0},s=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",i);for(const o of t){const p=gi(s,1,o),g=p?p.width:o.length*i,y=p?p.height:i;e.width=Math.max(e.width,g),e.height=Math.max(e.height,y)}return s.remove(),e}},Dt=.7,Pt=.2,Vt=class{constructor(t,i,e,s){this.axisConfig=t,this.title=i,this.textDimensionCalculator=e,this.axisThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left"}static{n(this,"BaseAxis")}setRange(t){this.range=t,this.axisPosition==="left"||this.axisPosition==="right"?this.boundingRect.height=t[1]-t[0]:this.boundingRect.width=t[1]-t[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(t){this.axisPosition=t,this.setRange(this.range)}getTickDistance(){const t=this.getRange();return Math.abs(t[0]-t[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(t=>t.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){Dt*this.getTickDistance()>this.outerPadding*2&&(this.outerPadding=Math.floor(Dt*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(t){let i=t.height;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const e=this.getLabelDimension(),s=Pt*t.width;this.outerPadding=Math.min(e.width/2,s);const o=e.height+this.axisConfig.labelPadding*2;this.labelTextHeight=e.height,o<=i&&(i-=o,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const e=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),s=e.height+this.axisConfig.titlePadding*2;this.titleTextHeight=e.height,s<=i&&(i-=s,this.showTitle=!0)}this.boundingRect.width=t.width,this.boundingRect.height=t.height-i}calculateSpaceIfDrawnVertical(t){let i=t.width;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const e=this.getLabelDimension(),s=Pt*t.height;this.outerPadding=Math.min(e.height/2,s);const o=e.width+this.axisConfig.labelPadding*2;o<=i&&(i-=o,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const e=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),s=e.height+this.axisConfig.titlePadding*2;this.titleTextHeight=e.height,s<=i&&(i-=s,this.showTitle=!0)}this.boundingRect.width=t.width-i,this.boundingRect.height=t.height}calculateSpace(t){return this.axisPosition==="left"||this.axisPosition==="right"?this.calculateSpaceIfDrawnVertical(t):this.calculateSpaceIfDrawnHorizontally(t),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}getDrawableElementsForLeftAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${i},${this.boundingRect.y} L ${i},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map(i=>({text:i.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(i),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){const i=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(e=>({path:`M ${i},${this.getScaleValue(e)} L ${i-this.axisConfig.tickLength},${this.getScaleValue(e)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["left-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForBottomAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(i=>({text:i.toString(),x:this.getScaleValue(i),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){const i=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(e=>({path:`M ${this.getScaleValue(e)},${i} L ${this.getScaleValue(e)},${i+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["bottom-axis","title"],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForTopAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(i=>({text:i.toString(),x:this.getScaleValue(i),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+this.axisConfig.titlePadding*2:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){const i=this.boundingRect.y;t.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(e=>({path:`M ${this.getScaleValue(e)},${i+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(e)},${i+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["top-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElements(){if(this.axisPosition==="left")return this.getDrawableElementsForLeftAxis();if(this.axisPosition==="right")throw Error("Drawing of right axis is not implemented");return this.axisPosition==="bottom"?this.getDrawableElementsForBottomAxis():this.axisPosition==="top"?this.getDrawableElementsForTopAxis():[]}},pi=class extends Vt{static{n(this,"BandAxis")}constructor(t,i,e,s,o){super(t,s,o,i),this.categories=e,this.scale=kt().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=kt().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),Lt.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(t){return this.scale(t)??this.getRange()[0]}},di=class extends Vt{static{n(this,"LinearAxis")}constructor(t,i,e,s,o){super(t,s,o,i),this.domain=e,this.scale=Tt().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){const t=[...this.domain];this.axisPosition==="left"&&t.reverse(),this.scale=Tt().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}};function ht(t,i,e,s){const o=new It(s);return ct(t)?new pi(i,e,t.categories,t.title,o):new di(i,e,[t.min,t.max],t.title,o)}n(ht,"getAxis");var fi=class{constructor(t,i,e,s){this.textDimensionCalculator=t,this.chartConfig=i,this.chartData=e,this.chartThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{n(this,"ChartTitle")}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){const i=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),e=Math.max(i.width,t.width),s=i.height+2*this.chartConfig.titlePadding;return i.width<=e&&i.height<=s&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=e,this.boundingRect.height=s,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){const t=[];return this.showChartTitle&&t.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),t}};function Mt(t,i,e,s){const o=new It(s);return new fi(o,t,i,e)}n(Mt,"getChartTitleComponent");var yi=class{constructor(t,i,e,s,o){this.plotData=t,this.xAxis=i,this.yAxis=e,this.orientation=s,this.plotIndex=o}static{n(this,"LinePlot")}getDrawableElement(){const t=this.plotData.data.map(e=>[this.xAxis.getScaleValue(e[0]),this.yAxis.getScaleValue(e[1])]);let i;return this.orientation==="horizontal"?i=Rt().y(e=>e[0]).x(e=>e[1])(t):i=Rt().x(e=>e[0]).y(e=>e[1])(t),i?[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:i,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}]:[]}},mi=class{constructor(t,i,e,s,o,p){this.barData=t,this.boundingRect=i,this.xAxis=e,this.yAxis=s,this.orientation=o,this.plotIndex=p}static{n(this,"BarPlot")}getDrawableElement(){const t=this.barData.data.map(o=>[this.xAxis.getScaleValue(o[0]),this.yAxis.getScaleValue(o[1])]),e=Math.min(this.xAxis.getAxisOuterPadding()*2,this.xAxis.getTickDistance())*(1-.05),s=e/2;return this.orientation==="horizontal"?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(o=>({x:this.boundingRect.x,y:o[0]-s,height:e,width:o[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(o=>({x:o[0]-s,y:o[1],width:e,height:this.boundingRect.y+this.boundingRect.height-o[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},bi=class{constructor(t,i,e){this.chartConfig=t,this.chartData=i,this.chartThemeConfig=e,this.boundingRect={x:0,y:0,width:0,height:0}}static{n(this,"BasePlot")}setAxes(t,i){this.xAxis=t,this.yAxis=i}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){return this.boundingRect.width=t.width,this.boundingRect.height=t.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!(this.xAxis&&this.yAxis))throw Error("Axes must be passed to render Plots");const t=[];for(const[i,e]of this.chartData.plots.entries())switch(e.type){case"line":{const s=new yi(e,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...s.getDrawableElement())}break;case"bar":{const s=new mi(e,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...s.getDrawableElement())}break}return t}};function Bt(t,i,e){return new bi(t,i,e)}n(Bt,"getPlotComponent");var Ai=class{constructor(t,i,e,s){this.chartConfig=t,this.chartData=i,this.componentStore={title:Mt(t,i,e,s),plot:Bt(t,i,e),xAxis:ht(i.xAxis,t.xAxis,{titleColor:e.xAxisTitleColor,labelColor:e.xAxisLabelColor,tickColor:e.xAxisTickColor,axisLineColor:e.xAxisLineColor},s),yAxis:ht(i.yAxis,t.yAxis,{titleColor:e.yAxisTitleColor,labelColor:e.yAxisLabelColor,tickColor:e.yAxisTickColor,axisLineColor:e.yAxisLineColor},s)}}static{n(this,"Orchestrator")}calculateVerticalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,e=0,s=0,o=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),p=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),g=this.componentStore.plot.calculateSpace({width:o,height:p});t-=g.width,i-=g.height,g=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),s=g.height,i-=g.height,this.componentStore.xAxis.setAxisPosition("bottom"),g=this.componentStore.xAxis.calculateSpace({width:t,height:i}),i-=g.height,this.componentStore.yAxis.setAxisPosition("left"),g=this.componentStore.yAxis.calculateSpace({width:t,height:i}),e=g.width,t-=g.width,t>0&&(o+=t,t=0),i>0&&(p+=i,i=0),this.componentStore.plot.calculateSpace({width:o,height:p}),this.componentStore.plot.setBoundingBoxXY({x:e,y:s}),this.componentStore.xAxis.setRange([e,e+o]),this.componentStore.xAxis.setBoundingBoxXY({x:e,y:s+p}),this.componentStore.yAxis.setRange([s,s+p]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:s}),this.chartData.plots.some(y=>ot(y))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,e=0,s=0,o=0,p=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),g=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),y=this.componentStore.plot.calculateSpace({width:p,height:g});t-=y.width,i-=y.height,y=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),e=y.height,i-=y.height,this.componentStore.xAxis.setAxisPosition("left"),y=this.componentStore.xAxis.calculateSpace({width:t,height:i}),t-=y.width,s=y.width,this.componentStore.yAxis.setAxisPosition("top"),y=this.componentStore.yAxis.calculateSpace({width:t,height:i}),i-=y.height,o=e+y.height,t>0&&(p+=t,t=0),i>0&&(g+=i,i=0),this.componentStore.plot.calculateSpace({width:p,height:g}),this.componentStore.plot.setBoundingBoxXY({x:s,y:o}),this.componentStore.yAxis.setRange([s,s+p]),this.componentStore.yAxis.setBoundingBoxXY({x:s,y:e}),this.componentStore.xAxis.setRange([o,o+g]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:o}),this.chartData.plots.some(T=>ot(T))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){this.chartConfig.chartOrientation==="horizontal"?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();const t=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(const i of Object.values(this.componentStore))t.push(...i.getDrawableElements());return t}},Ci=class{static{n(this,"XYChartBuilder")}static build(t,i,e,s){return new Ai(t,i,e,s).getDrawableElement()}},Y=0,Wt,H=xt(),U=gt(),d=pt(),rt=U.plotColorPalette.split(",").map(t=>t.trim()),K=!1,ut=!1;function gt(){const t=ci(),i=lt();return Et(t.xyChart,i.themeVariables.xyChart)}n(gt,"getChartDefaultThemeConfig");function xt(){const t=lt();return Et(li.xyChart,t.xyChart)}n(xt,"getChartDefaultConfig");function pt(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}n(pt,"getChartDefaultData");function Z(t){const i=lt();return ui(t.trim(),i)}n(Z,"textSanitizer");function Ot(t){Wt=t}n(Ot,"setTmpSVGG");function zt(t){t==="horizontal"?H.chartOrientation="horizontal":H.chartOrientation="vertical"}n(zt,"setOrientation");function Ft(t){d.xAxis.title=Z(t.text)}n(Ft,"setXAxisTitle");function dt(t,i){d.xAxis={type:"linear",title:d.xAxis.title,min:t,max:i},K=!0}n(dt,"setXAxisRangeData");function Nt(t){d.xAxis={type:"band",title:d.xAxis.title,categories:t.map(i=>Z(i.text))},K=!0}n(Nt,"setXAxisBand");function Xt(t){d.yAxis.title=Z(t.text)}n(Xt,"setYAxisTitle");function Yt(t,i){d.yAxis={type:"linear",title:d.yAxis.title,min:t,max:i},ut=!0}n(Yt,"setYAxisRangeData");function Ht(t){const i=Math.min(...t),e=Math.max(...t),s=F(d.yAxis)?d.yAxis.min:1/0,o=F(d.yAxis)?d.yAxis.max:-1/0;d.yAxis={type:"linear",title:d.yAxis.title,min:Math.min(s,i),max:Math.max(o,e)}}n(Ht,"setYAxisRangeFromPlotData");function ft(t){let i=[];if(t.length===0)return i;if(!K){const e=F(d.xAxis)?d.xAxis.min:1/0,s=F(d.xAxis)?d.xAxis.max:-1/0;dt(Math.min(e,1),Math.max(s,t.length))}if(ut||Ht(t),ct(d.xAxis)&&(i=d.xAxis.categories.map((e,s)=>[e,t[s]])),F(d.xAxis)){const e=d.xAxis.min,s=d.xAxis.max,o=(s-e)/(t.length-1),p=[];for(let g=e;g<=s;g+=o)p.push(`${g}`);i=p.map((g,y)=>[g,t[y]])}return i}n(ft,"transformDataWithoutCategory");function yt(t){return rt[t===0?0:t%rt.length]}n(yt,"getPlotColorFromPalette");function Ut(t,i){const e=ft(i);d.plots.push({type:"line",strokeFill:yt(Y),strokeWidth:2,data:e}),Y++}n(Ut,"setLineData");function $t(t,i){const e=ft(i);d.plots.push({type:"bar",fill:yt(Y),data:e}),Y++}n($t,"setBarData");function Gt(){if(d.plots.length===0)throw Error("No Plot to render, please provide a plot with some data");return d.title=vt(),Ci.build(H,d,U,Wt)}n(Gt,"getDrawableElem");function qt(){return U}n(qt,"getChartThemeConfig");function jt(){return H}n(jt,"getChartConfig");var wi=n(function(){ri(),Y=0,H=xt(),d=pt(),U=gt(),rt=U.plotColorPalette.split(",").map(t=>t.trim()),K=!1,ut=!1},"clear"),Si={getDrawableElem:Gt,clear:wi,setAccTitle:ai,getAccTitle:ni,setDiagramTitle:si,getDiagramTitle:vt,getAccDescription:ei,setAccDescription:ii,setOrientation:zt,setXAxisTitle:Ft,setXAxisRangeData:dt,setXAxisBand:Nt,setYAxisTitle:Xt,setYAxisRangeData:Yt,setLineData:Ut,setBarData:$t,setTmpSVGG:Ot,getChartThemeConfig:qt,getChartConfig:jt},_i=n((t,i,e,s)=>{const o=s.db,p=o.getChartThemeConfig(),g=o.getChartConfig();function y(f){return f==="top"?"text-before-edge":"middle"}n(y,"getDominantBaseLine");function T(f){return f==="left"?"start":f==="right"?"end":"middle"}n(T,"getTextAnchor");function E(f){return`translate(${f.x}, ${f.y}) rotate(${f.rotation||0})`}n(E,"getTextTransformation"),Lt.debug(`Rendering xychart chart
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:n(function(){var l=this.next();return l||this.lex()},"lex"),begin:n(function(l){this.conditionStack.push(l)},"begin"),popState:n(function(){var l=this.conditionStack.length-1;return l>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:n(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:n(function(l){return l=this.conditionStack.length-1-Math.abs(l||0),l>=0?this.conditionStack[l]:"INITIAL"},"topState"),pushState:n(function(l){this.begin(l)},"pushState"),stateStackSize:n(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:n(function(l,c,u,m){switch(u){case 0:break;case 1:break;case 2:return this.popState(),34;case 3:return this.popState(),34;case 4:return 34;case 5:break;case 6:return 10;case 7:return this.pushState("acc_title"),19;case 8:return this.popState(),"acc_title_value";case 9:return this.pushState("acc_descr"),21;case 10:return this.popState(),"acc_descr_value";case 11:this.pushState("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 5;case 15:return 8;case 16:return this.pushState("axis_data"),"X_AXIS";case 17:return this.pushState("axis_data"),"Y_AXIS";case 18:return this.pushState("axis_band_data"),24;case 19:return 31;case 20:return this.pushState("data"),16;case 21:return this.pushState("data"),18;case 22:return this.pushState("data_inner"),24;case 23:return 27;case 24:return this.popState(),26;case 25:this.popState();break;case 26:this.pushState("string");break;case 27:this.popState();break;case 28:return"STR";case 29:return 24;case 30:return 26;case 31:return 43;case 32:return"COLON";case 33:return 44;case 34:return 28;case 35:return 45;case 36:return 46;case 37:return 48;case 38:return 50;case 39:return 47;case 40:return 41;case 41:return 49;case 42:return 42;case 43:break;case 44:return 35;case 45:return 36}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\{)/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,23,24,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,20,21,22,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,24,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,23,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[27,28],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0}}};return B}();tt.lexer=Qt;function q(){this.yy={}}return n(q,"Parser"),q.prototype=tt,tt.Parser=q,new q}();at.parser=at;var xi=at;function ot(t){return t.type==="bar"}n(ot,"isBarPlot");function ct(t){return t.type==="band"}n(ct,"isBandAxisData");function F(t){return t.type==="linear"}n(F,"isLinearAxisData");var It=class{constructor(t){this.parentGroup=t}static{n(this,"TextDimensionCalculatorWithFont")}getMaxDimension(t,i){if(!this.parentGroup)return{width:t.reduce((o,p)=>Math.max(p.length,o),0)*i,height:i};const e={width:0,height:0},s=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",i);for(const o of t){const p=gi(s,1,o),g=p?p.width:o.length*i,y=p?p.height:i;e.width=Math.max(e.width,g),e.height=Math.max(e.height,y)}return s.remove(),e}},Dt=.7,Pt=.2,Vt=class{constructor(t,i,e,s){this.axisConfig=t,this.title=i,this.textDimensionCalculator=e,this.axisThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left"}static{n(this,"BaseAxis")}setRange(t){this.range=t,this.axisPosition==="left"||this.axisPosition==="right"?this.boundingRect.height=t[1]-t[0]:this.boundingRect.width=t[1]-t[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(t){this.axisPosition=t,this.setRange(this.range)}getTickDistance(){const t=this.getRange();return Math.abs(t[0]-t[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(t=>t.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){Dt*this.getTickDistance()>this.outerPadding*2&&(this.outerPadding=Math.floor(Dt*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(t){let i=t.height;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const e=this.getLabelDimension(),s=Pt*t.width;this.outerPadding=Math.min(e.width/2,s);const o=e.height+this.axisConfig.labelPadding*2;this.labelTextHeight=e.height,o<=i&&(i-=o,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const e=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),s=e.height+this.axisConfig.titlePadding*2;this.titleTextHeight=e.height,s<=i&&(i-=s,this.showTitle=!0)}this.boundingRect.width=t.width,this.boundingRect.height=t.height-i}calculateSpaceIfDrawnVertical(t){let i=t.width;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const e=this.getLabelDimension(),s=Pt*t.height;this.outerPadding=Math.min(e.height/2,s);const o=e.width+this.axisConfig.labelPadding*2;o<=i&&(i-=o,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const e=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),s=e.height+this.axisConfig.titlePadding*2;this.titleTextHeight=e.height,s<=i&&(i-=s,this.showTitle=!0)}this.boundingRect.width=t.width-i,this.boundingRect.height=t.height}calculateSpace(t){return this.axisPosition==="left"||this.axisPosition==="right"?this.calculateSpaceIfDrawnVertical(t):this.calculateSpaceIfDrawnHorizontally(t),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}getDrawableElementsForLeftAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${i},${this.boundingRect.y} L ${i},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map(i=>({text:i.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(i),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){const i=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(e=>({path:`M ${i},${this.getScaleValue(e)} L ${i-this.axisConfig.tickLength},${this.getScaleValue(e)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["left-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForBottomAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(i=>({text:i.toString(),x:this.getScaleValue(i),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){const i=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(e=>({path:`M ${this.getScaleValue(e)},${i} L ${this.getScaleValue(e)},${i+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["bottom-axis","title"],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForTopAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(i=>({text:i.toString(),x:this.getScaleValue(i),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+this.axisConfig.titlePadding*2:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){const i=this.boundingRect.y;t.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(e=>({path:`M ${this.getScaleValue(e)},${i+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(e)},${i+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["top-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElements(){if(this.axisPosition==="left")return this.getDrawableElementsForLeftAxis();if(this.axisPosition==="right")throw Error("Drawing of right axis is not implemented");return this.axisPosition==="bottom"?this.getDrawableElementsForBottomAxis():this.axisPosition==="top"?this.getDrawableElementsForTopAxis():[]}},pi=class extends Vt{static{n(this,"BandAxis")}constructor(t,i,e,s,o){super(t,s,o,i),this.categories=e,this.scale=kt().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=kt().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),Lt.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(t){return this.scale(t)??this.getRange()[0]}},di=class extends Vt{static{n(this,"LinearAxis")}constructor(t,i,e,s,o){super(t,s,o,i),this.domain=e,this.scale=Tt().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){const t=[...this.domain];this.axisPosition==="left"&&t.reverse(),this.scale=Tt().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}};function ht(t,i,e,s){const o=new It(s);return ct(t)?new pi(i,e,t.categories,t.title,o):new di(i,e,[t.min,t.max],t.title,o)}n(ht,"getAxis");var fi=class{constructor(t,i,e,s){this.textDimensionCalculator=t,this.chartConfig=i,this.chartData=e,this.chartThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{n(this,"ChartTitle")}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){const i=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),e=Math.max(i.width,t.width),s=i.height+2*this.chartConfig.titlePadding;return i.width<=e&&i.height<=s&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=e,this.boundingRect.height=s,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){const t=[];return this.showChartTitle&&t.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),t}};function Mt(t,i,e,s){const o=new It(s);return new fi(o,t,i,e)}n(Mt,"getChartTitleComponent");var yi=class{constructor(t,i,e,s,o){this.plotData=t,this.xAxis=i,this.yAxis=e,this.orientation=s,this.plotIndex=o}static{n(this,"LinePlot")}getDrawableElement(){const t=this.plotData.data.map(e=>[this.xAxis.getScaleValue(e[0]),this.yAxis.getScaleValue(e[1])]);let i;return this.orientation==="horizontal"?i=Rt().y(e=>e[0]).x(e=>e[1])(t):i=Rt().x(e=>e[0]).y(e=>e[1])(t),i?[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:i,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}]:[]}},mi=class{constructor(t,i,e,s,o,p){this.barData=t,this.boundingRect=i,this.xAxis=e,this.yAxis=s,this.orientation=o,this.plotIndex=p}static{n(this,"BarPlot")}getDrawableElement(){const t=this.barData.data.map(o=>[this.xAxis.getScaleValue(o[0]),this.yAxis.getScaleValue(o[1])]),e=Math.min(this.xAxis.getAxisOuterPadding()*2,this.xAxis.getTickDistance())*(1-.05),s=e/2;return this.orientation==="horizontal"?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(o=>({x:this.boundingRect.x,y:o[0]-s,height:e,width:o[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(o=>({x:o[0]-s,y:o[1],width:e,height:this.boundingRect.y+this.boundingRect.height-o[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},bi=class{constructor(t,i,e){this.chartConfig=t,this.chartData=i,this.chartThemeConfig=e,this.boundingRect={x:0,y:0,width:0,height:0}}static{n(this,"BasePlot")}setAxes(t,i){this.xAxis=t,this.yAxis=i}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){return this.boundingRect.width=t.width,this.boundingRect.height=t.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!(this.xAxis&&this.yAxis))throw Error("Axes must be passed to render Plots");const t=[];for(const[i,e]of this.chartData.plots.entries())switch(e.type){case"line":{const s=new yi(e,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...s.getDrawableElement())}break;case"bar":{const s=new mi(e,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...s.getDrawableElement())}break}return t}};function Bt(t,i,e){return new bi(t,i,e)}n(Bt,"getPlotComponent");var Ai=class{constructor(t,i,e,s){this.chartConfig=t,this.chartData=i,this.componentStore={title:Mt(t,i,e,s),plot:Bt(t,i,e),xAxis:ht(i.xAxis,t.xAxis,{titleColor:e.xAxisTitleColor,labelColor:e.xAxisLabelColor,tickColor:e.xAxisTickColor,axisLineColor:e.xAxisLineColor},s),yAxis:ht(i.yAxis,t.yAxis,{titleColor:e.yAxisTitleColor,labelColor:e.yAxisLabelColor,tickColor:e.yAxisTickColor,axisLineColor:e.yAxisLineColor},s)}}static{n(this,"Orchestrator")}calculateVerticalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,e=0,s=0,o=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),p=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),g=this.componentStore.plot.calculateSpace({width:o,height:p});t-=g.width,i-=g.height,g=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),s=g.height,i-=g.height,this.componentStore.xAxis.setAxisPosition("bottom"),g=this.componentStore.xAxis.calculateSpace({width:t,height:i}),i-=g.height,this.componentStore.yAxis.setAxisPosition("left"),g=this.componentStore.yAxis.calculateSpace({width:t,height:i}),e=g.width,t-=g.width,t>0&&(o+=t,t=0),i>0&&(p+=i,i=0),this.componentStore.plot.calculateSpace({width:o,height:p}),this.componentStore.plot.setBoundingBoxXY({x:e,y:s}),this.componentStore.xAxis.setRange([e,e+o]),this.componentStore.xAxis.setBoundingBoxXY({x:e,y:s+p}),this.componentStore.yAxis.setRange([s,s+p]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:s}),this.chartData.plots.some(y=>ot(y))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,e=0,s=0,o=0,p=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),g=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),y=this.componentStore.plot.calculateSpace({width:p,height:g});t-=y.width,i-=y.height,y=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),e=y.height,i-=y.height,this.componentStore.xAxis.setAxisPosition("left"),y=this.componentStore.xAxis.calculateSpace({width:t,height:i}),t-=y.width,s=y.width,this.componentStore.yAxis.setAxisPosition("top"),y=this.componentStore.yAxis.calculateSpace({width:t,height:i}),i-=y.height,o=e+y.height,t>0&&(p+=t,t=0),i>0&&(g+=i,i=0),this.componentStore.plot.calculateSpace({width:p,height:g}),this.componentStore.plot.setBoundingBoxXY({x:s,y:o}),this.componentStore.yAxis.setRange([s,s+p]),this.componentStore.yAxis.setBoundingBoxXY({x:s,y:e}),this.componentStore.xAxis.setRange([o,o+g]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:o}),this.chartData.plots.some(T=>ot(T))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){this.chartConfig.chartOrientation==="horizontal"?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();const t=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(const i of Object.values(this.componentStore))t.push(...i.getDrawableElements());return t}},Ci=class{static{n(this,"XYChartBuilder")}static build(t,i,e,s){return new Ai(t,i,e,s).getDrawableElement()}},Y=0,Wt,H=xt(),U=gt(),d=pt(),rt=U.plotColorPalette.split(",").map(t=>t.trim()),K=!1,ut=!1;function gt(){const t=ci(),i=lt();return Et(t.xyChart,i.themeVariables.xyChart)}n(gt,"getChartDefaultThemeConfig");function xt(){const t=lt();return Et(li.xyChart,t.xyChart)}n(xt,"getChartDefaultConfig");function pt(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}n(pt,"getChartDefaultData");function Z(t){const i=lt();return ui(t.trim(),i)}n(Z,"textSanitizer");function Ot(t){Wt=t}n(Ot,"setTmpSVGG");function zt(t){t==="horizontal"?H.chartOrientation="horizontal":H.chartOrientation="vertical"}n(zt,"setOrientation");function Ft(t){d.xAxis.title=Z(t.text)}n(Ft,"setXAxisTitle");function dt(t,i){d.xAxis={type:"linear",title:d.xAxis.title,min:t,max:i},K=!0}n(dt,"setXAxisRangeData");function Nt(t){d.xAxis={type:"band",title:d.xAxis.title,categories:t.map(i=>Z(i.text))},K=!0}n(Nt,"setXAxisBand");function Xt(t){d.yAxis.title=Z(t.text)}n(Xt,"setYAxisTitle");function Yt(t,i){d.yAxis={type:"linear",title:d.yAxis.title,min:t,max:i},ut=!0}n(Yt,"setYAxisRangeData");function Ht(t){const i=Math.min(...t),e=Math.max(...t),s=F(d.yAxis)?d.yAxis.min:1/0,o=F(d.yAxis)?d.yAxis.max:-1/0;d.yAxis={type:"linear",title:d.yAxis.title,min:Math.min(s,i),max:Math.max(o,e)}}n(Ht,"setYAxisRangeFromPlotData");function ft(t){let i=[];if(t.length===0)return i;if(!K){const e=F(d.xAxis)?d.xAxis.min:1/0,s=F(d.xAxis)?d.xAxis.max:-1/0;dt(Math.min(e,1),Math.max(s,t.length))}if(ut||Ht(t),ct(d.xAxis)&&(i=d.xAxis.categories.map((e,s)=>[e,t[s]])),F(d.xAxis)){const e=d.xAxis.min,s=d.xAxis.max,o=(s-e)/(t.length-1),p=[];for(let g=e;g<=s;g+=o)p.push(`${g}`);i=p.map((g,y)=>[g,t[y]])}return i}n(ft,"transformDataWithoutCategory");function yt(t){return rt[t===0?0:t%rt.length]}n(yt,"getPlotColorFromPalette");function Ut(t,i){const e=ft(i);d.plots.push({type:"line",strokeFill:yt(Y),strokeWidth:2,data:e}),Y++}n(Ut,"setLineData");function $t(t,i){const e=ft(i);d.plots.push({type:"bar",fill:yt(Y),data:e}),Y++}n($t,"setBarData");function qt(){if(d.plots.length===0)throw Error("No Plot to render, please provide a plot with some data");return d.title=vt(),Ci.build(H,d,U,Wt)}n(qt,"getDrawableElem");function Gt(){return U}n(Gt,"getChartThemeConfig");function jt(){return H}n(jt,"getChartConfig");var wi=n(function(){ri(),Y=0,H=xt(),d=pt(),U=gt(),rt=U.plotColorPalette.split(",").map(t=>t.trim()),K=!1,ut=!1},"clear"),Si={getDrawableElem:qt,clear:wi,setAccTitle:ai,getAccTitle:ni,setDiagramTitle:si,getDiagramTitle:vt,getAccDescription:ei,setAccDescription:ii,setOrientation:zt,setXAxisTitle:Ft,setXAxisRangeData:dt,setXAxisBand:Nt,setYAxisTitle:Xt,setYAxisRangeData:Yt,setLineData:Ut,setBarData:$t,setTmpSVGG:Ot,getChartThemeConfig:Gt,getChartConfig:jt},_i=n((t,i,e,s)=>{const o=s.db,p=o.getChartThemeConfig(),g=o.getChartConfig();function y(f){return f==="top"?"text-before-edge":"middle"}n(y,"getDominantBaseLine");function T(f){return f==="left"?"start":f==="right"?"end":"middle"}n(T,"getTextAnchor");function E(f){return`translate(${f.x}, ${f.y}) rotate(${f.rotation||0})`}n(E,"getTextTransformation"),Lt.debug(`Rendering xychart chart
7
7
  `+t);const S=oi(i),R=S.append("g").attr("class","main"),I=R.append("rect").attr("width",g.width).attr("height",g.height).attr("class","background");hi(S,g.height,g.width,!0),S.attr("viewBox",`0 0 ${g.width} ${g.height}`),I.attr("fill",p.backgroundColor),o.setTmpSVGG(S.append("g").attr("class","mermaid-tmp-group"));const V=o.getDrawableElem(),_={};function L(f){let C=R,r="";for(const[D]of f.entries()){let N=R;D>0&&_[r]&&(N=_[r]),r+=f[D],C=_[r],C||(C=_[r]=N.append("g").attr("class",f[D]))}return C}n(L,"getGroup");for(const f of V){if(f.data.length===0)continue;const C=L(f.groupTexts);switch(f.type){case"rect":C.selectAll("rect").data(f.data).enter().append("rect").attr("x",r=>r.x).attr("y",r=>r.y).attr("width",r=>r.width).attr("height",r=>r.height).attr("fill",r=>r.fill).attr("stroke",r=>r.strokeFill).attr("stroke-width",r=>r.strokeWidth);break;case"text":C.selectAll("text").data(f.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",r=>r.fill).attr("font-size",r=>r.fontSize).attr("dominant-baseline",r=>y(r.verticalPos)).attr("text-anchor",r=>T(r.horizontalPos)).attr("transform",r=>E(r)).text(r=>r.text);break;case"path":C.selectAll("path").data(f.data).enter().append("path").attr("d",r=>r.path).attr("fill",r=>r.fill?r.fill:"none").attr("stroke",r=>r.strokeFill).attr("stroke-width",r=>r.strokeWidth);break}}},"draw"),ki={draw:_i},Li={parser:xi,db:Si,renderer:ki};export{Li as diagram};
@@ -6,10 +6,10 @@
6
6
  <title>Local Operator Console Capture</title>
7
7
  <meta http-equiv="Content-Security-Policy"
8
8
  content="default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self' data:" />
9
- <script type="module" crossorigin src="./assets/consoleCapture-Cujhy7_W.js"></script>
10
- <link rel="modulepreload" crossorigin href="./assets/index-hIJSZMtz.js">
11
- <link rel="modulepreload" crossorigin href="./assets/console-mirror-BoykuSNB.js">
12
- <link rel="stylesheet" crossorigin href="./assets/index-YlW7OZrX.css">
9
+ <script type="module" crossorigin src="./assets/consoleCapture-Dawe559T.js"></script>
10
+ <link rel="modulepreload" crossorigin href="./assets/index-CSEVqIl1.js">
11
+ <link rel="modulepreload" crossorigin href="./assets/console-mirror-CpiNswSB.js">
12
+ <link rel="stylesheet" crossorigin href="./assets/index-rZRMapOd.css">
13
13
  <link rel="stylesheet" crossorigin href="./assets/console-mirror-DOrYoP_4.css">
14
14
  </head>
15
15
 
@@ -31,11 +31,11 @@
31
31
  <meta http-equiv="Content-Security-Policy"
32
32
  content="default-src 'self'; connect-src 'self' http://localhost:1111 http://127.0.0.1:1111 http://localhost:8080 http://127.0.0.1:8080 https://api.radienthq.com https://us.i.posthog.com https://login.microsoftonline.com https://accounts.google.com; script-src 'self' https://us-assets.i.posthog.com https://accounts.google.com https://login.microsoftonline.com; style-src 'self' 'unsafe-inline' data:; img-src 'self' data: blob: http://localhost:1111 http://127.0.0.1:1111; media-src 'self' blob: http://localhost:1111 http://127.0.0.1:1111; font-src 'self' data:; frame-src 'self' data: blob: http://localhost:1111 http://127.0.0.1:1111 https://accounts.google.com https://login.microsoftonline.com" />
33
33
  <meta http-equiv="Cross-Origin-Opener-Policy" content="same-origin-allow-popups" />
34
- <script type="module" crossorigin src="./assets/index-DyfVjYXR.js"></script>
35
- <link rel="modulepreload" crossorigin href="./assets/index-hIJSZMtz.js">
36
- <link rel="modulepreload" crossorigin href="./assets/error-boundary-BX3Jjofp.js">
37
- <link rel="modulepreload" crossorigin href="./assets/console-mirror-BoykuSNB.js">
38
- <link rel="stylesheet" crossorigin href="./assets/index-YlW7OZrX.css">
34
+ <script type="module" crossorigin src="./assets/index-gd7H8-q6.js"></script>
35
+ <link rel="modulepreload" crossorigin href="./assets/index-CSEVqIl1.js">
36
+ <link rel="modulepreload" crossorigin href="./assets/error-boundary-DtDjc7C4.js">
37
+ <link rel="modulepreload" crossorigin href="./assets/console-mirror-CpiNswSB.js">
38
+ <link rel="stylesheet" crossorigin href="./assets/index-rZRMapOd.css">
39
39
  <link rel="stylesheet" crossorigin href="./assets/console-mirror-DOrYoP_4.css">
40
40
  <link rel="stylesheet" crossorigin href="./assets/index-CSPo12AE.css">
41
41
  </head>
@@ -8,10 +8,10 @@
8
8
  <!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP -->
9
9
  <meta http-equiv="Content-Security-Policy"
10
10
  content="default-src 'self'; connect-src 'self' http://localhost:1111 http://127.0.0.1:1111; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data: http://localhost:1111 http://127.0.0.1:1111; media-src 'self' http://localhost:1111 http://127.0.0.1:1111; font-src 'self' data:" />
11
- <script type="module" crossorigin src="./assets/installer-1ycbb4_E.js"></script>
12
- <link rel="modulepreload" crossorigin href="./assets/index-hIJSZMtz.js">
13
- <link rel="modulepreload" crossorigin href="./assets/error-boundary-BX3Jjofp.js">
14
- <link rel="stylesheet" crossorigin href="./assets/index-YlW7OZrX.css">
11
+ <script type="module" crossorigin src="./assets/installer-DrfIP-VV.js"></script>
12
+ <link rel="modulepreload" crossorigin href="./assets/index-CSEVqIl1.js">
13
+ <link rel="modulepreload" crossorigin href="./assets/error-boundary-DtDjc7C4.js">
14
+ <link rel="stylesheet" crossorigin href="./assets/index-rZRMapOd.css">
15
15
  </head>
16
16
 
17
17
  <body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "local-operator-ui",
3
- "version": "0.31.5",
3
+ "version": "0.31.6",
4
4
  "productName": "Local Operator",
5
5
  "description": "User interface for AI agent assistants that run Python code safely on your device through an intuitive chat interface. Supports local and cloud LLM models with built-in security features.",
6
6
  "main": "./out/main/index.js",
@@ -76,7 +76,7 @@
76
76
  "check-types": "pnpm run check-types:main && pnpm run check-types:renderer",
77
77
  "check-changed": "node scripts/ci-scope.mjs --since \"$(git merge-base origin/main HEAD)\" --run",
78
78
  "test:session-cookies": "node scripts/session-cookie-electron.test.mjs",
79
- "test:desktop": "node scripts/run-desktop-tests.mjs scripts/update-fleet-drain.test.mjs scripts/at-mentions.test.mjs scripts/directory-listing.test.mjs scripts/slash-token.test.mjs scripts/slash-rank.test.mjs scripts/slash-submit.test.mjs scripts/slash-highlight.test.mjs scripts/slash-contract.test.mjs scripts/slash-row-format.test.mjs scripts/owned-serve-lifecycle.test.mjs scripts/launcher-watch.test.mjs scripts/linux-sandbox.test.mjs scripts/capture-evidence.test.mjs scripts/desktop-contract.test.mjs scripts/transcript-reducer.test.mjs scripts/tool-compose-lifecycle.test.mjs scripts/transcript-paging.test.mjs scripts/transcript-paging-hook.test.mjs scripts/seed-placement.test.mjs scripts/seed-label-gap.test.mjs scripts/provider-state.test.mjs scripts/stale-agent.test.mjs scripts/desktop-renderer-transport.test.mjs scripts/desktop-proxy.test.mjs scripts/session-stream-token.test.mjs scripts/session-load-recovery.test.mjs scripts/provider-grid-error-copy.test.mjs scripts/provider-grid-pin.test.mjs scripts/settings-time-to-error.test.mjs scripts/backend-error-surfaces.test.mjs scripts/canonical-chat.test.mjs scripts/stale-caption.test.mjs scripts/desktop-watch-lease.test.mjs scripts/session-switch.test.mjs scripts/chat-search.test.mjs scripts/session-archive-delete.test.mjs scripts/chat-archived.test.mjs scripts/chat-archive-press.test.mjs scripts/palette-search.test.mjs scripts/palette-shortcut.test.mjs scripts/palette-contract.test.mjs scripts/palette-panel-request.test.mjs scripts/run-child-reader.test.mjs scripts/run-detail-model.test.mjs scripts/subagent-pulse.test.mjs scripts/chat-title.test.mjs scripts/clear-search.test.mjs scripts/tool-row.test.mjs scripts/working-line-clock.test.mjs scripts/attachment-url.test.mjs scripts/desktop-notifier.test.mjs scripts/launch-session.test.mjs scripts/desktop-feed.test.mjs scripts/session-status-feed.test.mjs scripts/viewer-record.test.mjs scripts/desktop-stream.test.mjs scripts/python-bytecode-cache.test.mjs scripts/preload-updater-surface.test.mjs scripts/update-affirmation.test.mjs scripts/update-global-install.test.mjs scripts/update-robustness.test.mjs scripts/merge-update-feed.test.mjs scripts/prune-bundled-resources.test.mjs scripts/bundled-runtime-layout.test.mjs scripts/verify-bundled-uv.test.mjs scripts/managed-python.test.mjs scripts/usage-view.test.mjs scripts/usage-container.test.mjs scripts/session-status.test.mjs scripts/composer-readings.test.mjs scripts/composer-queued-send.test.mjs scripts/composer-tabs.test.mjs scripts/scroll-region-to-top.test.mjs scripts/ask-options.test.mjs scripts/click-proof-expect.test.mjs scripts/window-mode.test.mjs scripts/about-panel.test.mjs scripts/evidence-manifest.test.mjs scripts/canonical-notice.test.mjs scripts/evidence-histogram-parity.test.mjs scripts/evidence-run-guard.test.mjs scripts/desktop-test-concurrency.test.mjs scripts/run-desktop-tests.test.mjs scripts/mcp-foreign-config-origin.test.mjs scripts/mentioned-files.test.mjs scripts/picker-feedback.test.mjs scripts/picker-host-selection.test.mjs scripts/panel-chart-motion.test.mjs scripts/panel-info-credentials.test.mjs scripts/panel-info-fleet.test.mjs scripts/warm-session.test.mjs scripts/submit-latency.test.mjs scripts/completion-view-ack.test.mjs scripts/echo-delivery.test.mjs scripts/check-runtime-deps.test.mjs scripts/new-chat-row.test.mjs scripts/new-chat-row-evidence.test.mjs scripts/new-chat-shortcut.test.mjs scripts/reconnect-page-gap.test.mjs scripts/browser-host.test.mjs scripts/check-vendored.test.mjs scripts/chat-session-status.test.mjs scripts/draft-selection.test.mjs scripts/toast-lifetime.test.mjs scripts/toast-close-placement.test.mjs scripts/storybook-query-fixture.test.mjs scripts/mcp-list-query.test.mjs scripts/mcp-target-resolution.test.mjs scripts/mcp-auth-surface.test.mjs scripts/mcp-failure-routing.test.mjs scripts/daemon-discovery.test.mjs scripts/daemon-health-state.test.mjs scripts/daemon-observation.test.mjs scripts/session-cookies.test.mjs scripts/move-session.test.mjs scripts/frontend-replace.test.mjs scripts/browser-chrome.test.mjs scripts/browser-queue-expiry.test.mjs scripts/dev-driver-gate.test.mjs scripts/logger-log-dir.test.mjs scripts/draft-splash.test.mjs scripts/suggestion-stack.test.mjs scripts/suggestion-stack-react.test.mjs scripts/notifications-off.test.mjs scripts/notification-launch.test.mjs scripts/notification-spawn-sites.test.mjs scripts/chrome-keychain.test.mjs scripts/interrupt-control.test.mjs scripts/interrupt-slot-hold-react.test.mjs scripts/chat-sidebar-archive.test.mjs scripts/chat-sidebar-selection.test.mjs scripts/message-quote.test.mjs scripts/panel-chart-hover.test.mjs scripts/panel-read-policy.test.mjs scripts/composer-suggestions.test.mjs scripts/composer-tip-react.test.mjs scripts/sidebar-catalogue-gate.test.mjs scripts/telemetry-launch.test.mjs scripts/telemetry-spawn-sites.test.mjs scripts/sidebar-focus-hold.test.mjs scripts/credential-capture.test.mjs scripts/soft-breaks.test.mjs scripts/credential-composer.test.mjs scripts/secret-ask.test.mjs scripts/run-panel-navigation.test.mjs scripts/backend-settings-tiers.test.mjs scripts/backend-settings-collapse.test.mjs scripts/check-build-env.test.mjs scripts/test-inventory.test.mjs scripts/conflict-markers.test.mjs scripts/compact-receipt.test.mjs scripts/chat-image-expand.test.mjs scripts/prune-python-seed.test.mjs scripts/mcp-auth-complete-no-retry.test.mjs scripts/panel-presentation.test.mjs scripts/turn-timestamp.test.mjs scripts/analytics-session-table.test.mjs scripts/theme-grid-navigation.test.mjs scripts/theme-registry-exhaustiveness.test.mjs scripts/scheduled-task-model.test.mjs scripts/backend-setting-combos.test.mjs scripts/model-setting-options.test.mjs scripts/searchable-select.test.mjs scripts/backend-settings-drafts.test.mjs scripts/typed-row-call-sites.test.mjs scripts/palette-focus.test.mjs scripts/composer-seeding.test.mjs scripts/composer-refusal.test.mjs scripts/ci-scope.test.mjs scripts/browser-tab-strip-focus.test.mjs scripts/browser-file-transfer-row.test.mjs scripts/link-targets.test.mjs scripts/link-actions.test.mjs scripts/chat-link-affordances.test.mjs scripts/transcription-failure-copy.test.mjs scripts/backend-version-drift.test.mjs scripts/live-seed-placement.test.mjs scripts/agents-publication.test.mjs scripts/agent-hub-queries.test.mjs scripts/install-builtin-batch.test.mjs scripts/install-progress.test.mjs scripts/attention-seen.test.mjs scripts/mark-all-read-control.test.mjs scripts/update-global-guard.test.mjs scripts/delivery-gate.test.mjs scripts/canvas-file-freshness.test.mjs scripts/no-websocket-plane.test.mjs scripts/update-window-report.test.mjs scripts/canvas-tab-close.test.mjs scripts/chat-sidebar-pins.test.mjs scripts/webauthn.test.mjs scripts/render-mac-entitlements.test.mjs scripts/row-state-floors.test.mjs scripts/pairing-card-copy.test.mjs scripts/update-install-copy.test.mjs scripts/update-shipit.test.mjs scripts/console-host.test.mjs scripts/console-pack.test.mjs scripts/settings-account-gate.test.mjs scripts/sidebar-split.test.mjs scripts/radient-session-issue.test.mjs scripts/console-pane.test.mjs scripts/console-mirror.test.mjs scripts/shell-path.test.mjs scripts/build-env-guard.test.mjs scripts/install-scripts-network.test.mjs scripts/console-pane-render.test.mjs scripts/settings-section-routes.test.mjs scripts/authoring-refresh.test.mjs scripts/verify-macos-artifacts.test.mjs scripts/provider-chip-verdict.test.mjs scripts/child-reader-foot-react.test.mjs scripts/backend-spawn-address.test.mjs scripts/connectivity-banner-copy.test.mjs scripts/connectivity-banner-notice.test.mjs scripts/chat-list-sections.test.mjs scripts/chat-keyboard-regions.test.mjs scripts/chat-sidebar-view.test.mjs scripts/chat-sidebar-layout.test.mjs scripts/chat-sidebar-sections.test.mjs scripts/titlebar-options.test.mjs scripts/trace-fold-model.test.mjs scripts/trace-fold-behaviour.test.mjs scripts/chat-status-strip.test.mjs scripts/chat-pane-floors.test.mjs scripts/path-utils.test.mjs scripts/window-chrome.test.mjs scripts/chat-sidebar-scope-paging.test.mjs scripts/chat-sidebar-connection-voices.test.mjs scripts/integration-model.test.mjs scripts/mcp-catalog-parity.test.mjs scripts/btw-aside.test.mjs scripts/composer-send-failure.test.mjs scripts/composer-text-authority.test.mjs scripts/analytics-rate-format.test.mjs scripts/provider-catalog.test.mjs scripts/provider-sign-in-flow.test.mjs scripts/provider-status.test.mjs scripts/evidence-sign-in-states.test.mjs scripts/provider-detail-remount.test.mjs scripts/model-select-store.test.mjs scripts/onboarding-step-block.test.mjs scripts/onboarding-default-model.test.mjs scripts/server-release-notes.test.mjs scripts/no-hardlink-write.test.mjs scripts/canvas-goals.test.mjs scripts/overlay-drag-zones.test.mjs scripts/message-surface-floors.test.mjs scripts/header-identity-model.test.mjs scripts/pane-slot-ground.test.mjs scripts/projects-tab.test.mjs",
79
+ "test:desktop": "node scripts/run-desktop-tests.mjs scripts/update-fleet-drain.test.mjs scripts/at-mentions.test.mjs scripts/directory-listing.test.mjs scripts/slash-token.test.mjs scripts/slash-rank.test.mjs scripts/slash-submit.test.mjs scripts/slash-highlight.test.mjs scripts/slash-contract.test.mjs scripts/slash-row-format.test.mjs scripts/owned-serve-lifecycle.test.mjs scripts/launcher-watch.test.mjs scripts/linux-sandbox.test.mjs scripts/capture-evidence.test.mjs scripts/desktop-contract.test.mjs scripts/transcript-reducer.test.mjs scripts/tool-compose-lifecycle.test.mjs scripts/transcript-paging.test.mjs scripts/transcript-paging-hook.test.mjs scripts/seed-placement.test.mjs scripts/seed-label-gap.test.mjs scripts/provider-state.test.mjs scripts/stale-agent.test.mjs scripts/desktop-renderer-transport.test.mjs scripts/desktop-proxy.test.mjs scripts/session-stream-token.test.mjs scripts/session-load-recovery.test.mjs scripts/provider-grid-error-copy.test.mjs scripts/provider-grid-pin.test.mjs scripts/settings-time-to-error.test.mjs scripts/backend-error-surfaces.test.mjs scripts/canonical-chat.test.mjs scripts/stale-caption.test.mjs scripts/desktop-watch-lease.test.mjs scripts/session-switch.test.mjs scripts/chat-search.test.mjs scripts/session-archive-delete.test.mjs scripts/chat-archived.test.mjs scripts/chat-archive-press.test.mjs scripts/palette-search.test.mjs scripts/palette-shortcut.test.mjs scripts/palette-contract.test.mjs scripts/palette-panel-request.test.mjs scripts/run-child-reader.test.mjs scripts/run-detail-model.test.mjs scripts/subagent-pulse.test.mjs scripts/chat-title.test.mjs scripts/clear-search.test.mjs scripts/tool-row.test.mjs scripts/working-line-clock.test.mjs scripts/attachment-url.test.mjs scripts/desktop-notifier.test.mjs scripts/launch-session.test.mjs scripts/desktop-feed.test.mjs scripts/session-status-feed.test.mjs scripts/viewer-record.test.mjs scripts/desktop-stream.test.mjs scripts/python-bytecode-cache.test.mjs scripts/preload-updater-surface.test.mjs scripts/update-affirmation.test.mjs scripts/update-global-install.test.mjs scripts/update-robustness.test.mjs scripts/merge-update-feed.test.mjs scripts/prune-bundled-resources.test.mjs scripts/bundled-runtime-layout.test.mjs scripts/verify-bundled-uv.test.mjs scripts/managed-python.test.mjs scripts/usage-view.test.mjs scripts/usage-container.test.mjs scripts/session-status.test.mjs scripts/composer-readings.test.mjs scripts/composer-queued-send.test.mjs scripts/composer-tabs.test.mjs scripts/scroll-region-to-top.test.mjs scripts/ask-options.test.mjs scripts/click-proof-expect.test.mjs scripts/window-mode.test.mjs scripts/about-panel.test.mjs scripts/evidence-manifest.test.mjs scripts/canonical-notice.test.mjs scripts/evidence-histogram-parity.test.mjs scripts/evidence-run-guard.test.mjs scripts/desktop-test-concurrency.test.mjs scripts/run-desktop-tests.test.mjs scripts/mcp-foreign-config-origin.test.mjs scripts/mentioned-files.test.mjs scripts/picker-feedback.test.mjs scripts/picker-host-selection.test.mjs scripts/panel-chart-motion.test.mjs scripts/panel-info-credentials.test.mjs scripts/panel-info-fleet.test.mjs scripts/warm-session.test.mjs scripts/submit-latency.test.mjs scripts/completion-view-ack.test.mjs scripts/echo-delivery.test.mjs scripts/check-runtime-deps.test.mjs scripts/new-chat-row.test.mjs scripts/new-chat-row-evidence.test.mjs scripts/new-chat-shortcut.test.mjs scripts/reconnect-page-gap.test.mjs scripts/browser-host.test.mjs scripts/check-vendored.test.mjs scripts/chat-session-status.test.mjs scripts/draft-selection.test.mjs scripts/toast-lifetime.test.mjs scripts/toast-close-placement.test.mjs scripts/storybook-query-fixture.test.mjs scripts/mcp-list-query.test.mjs scripts/mcp-target-resolution.test.mjs scripts/mcp-auth-surface.test.mjs scripts/mcp-failure-routing.test.mjs scripts/daemon-discovery.test.mjs scripts/daemon-health-state.test.mjs scripts/daemon-observation.test.mjs scripts/session-cookies.test.mjs scripts/move-session.test.mjs scripts/frontend-replace.test.mjs scripts/browser-chrome.test.mjs scripts/browser-queue-expiry.test.mjs scripts/dev-driver-gate.test.mjs scripts/logger-log-dir.test.mjs scripts/draft-splash.test.mjs scripts/suggestion-stack.test.mjs scripts/suggestion-stack-react.test.mjs scripts/notifications-off.test.mjs scripts/notification-launch.test.mjs scripts/notification-spawn-sites.test.mjs scripts/chrome-keychain.test.mjs scripts/interrupt-control.test.mjs scripts/interrupt-slot-hold-react.test.mjs scripts/chat-sidebar-archive.test.mjs scripts/chat-sidebar-selection.test.mjs scripts/message-quote.test.mjs scripts/panel-chart-hover.test.mjs scripts/panel-read-policy.test.mjs scripts/composer-suggestions.test.mjs scripts/composer-tip-react.test.mjs scripts/sidebar-catalogue-gate.test.mjs scripts/telemetry-launch.test.mjs scripts/telemetry-spawn-sites.test.mjs scripts/sidebar-focus-hold.test.mjs scripts/credential-capture.test.mjs scripts/soft-breaks.test.mjs scripts/credential-composer.test.mjs scripts/secret-ask.test.mjs scripts/run-panel-navigation.test.mjs scripts/backend-settings-tiers.test.mjs scripts/backend-settings-collapse.test.mjs scripts/check-build-env.test.mjs scripts/test-inventory.test.mjs scripts/conflict-markers.test.mjs scripts/compact-receipt.test.mjs scripts/chat-image-expand.test.mjs scripts/prune-python-seed.test.mjs scripts/mcp-auth-complete-no-retry.test.mjs scripts/panel-presentation.test.mjs scripts/turn-timestamp.test.mjs scripts/analytics-session-table.test.mjs scripts/theme-grid-navigation.test.mjs scripts/theme-registry-exhaustiveness.test.mjs scripts/scheduled-task-model.test.mjs scripts/backend-setting-combos.test.mjs scripts/model-setting-options.test.mjs scripts/searchable-select.test.mjs scripts/backend-settings-drafts.test.mjs scripts/typed-row-call-sites.test.mjs scripts/palette-focus.test.mjs scripts/composer-seeding.test.mjs scripts/composer-refusal.test.mjs scripts/ci-scope.test.mjs scripts/browser-tab-strip-focus.test.mjs scripts/browser-file-transfer-row.test.mjs scripts/link-targets.test.mjs scripts/link-actions.test.mjs scripts/chat-link-affordances.test.mjs scripts/transcription-failure-copy.test.mjs scripts/backend-version-drift.test.mjs scripts/live-seed-placement.test.mjs scripts/agents-publication.test.mjs scripts/agent-hub-queries.test.mjs scripts/install-builtin-batch.test.mjs scripts/install-progress.test.mjs scripts/attention-seen.test.mjs scripts/mark-all-read-control.test.mjs scripts/update-global-guard.test.mjs scripts/delivery-gate.test.mjs scripts/canvas-file-freshness.test.mjs scripts/no-websocket-plane.test.mjs scripts/update-window-report.test.mjs scripts/canvas-tab-close.test.mjs scripts/chat-sidebar-pins.test.mjs scripts/webauthn.test.mjs scripts/render-mac-entitlements.test.mjs scripts/row-state-floors.test.mjs scripts/pairing-card-copy.test.mjs scripts/update-install-copy.test.mjs scripts/update-shipit.test.mjs scripts/console-host.test.mjs scripts/console-pack.test.mjs scripts/settings-account-gate.test.mjs scripts/sidebar-split.test.mjs scripts/radient-session-issue.test.mjs scripts/console-pane.test.mjs scripts/console-mirror.test.mjs scripts/shell-path.test.mjs scripts/build-env-guard.test.mjs scripts/install-scripts-network.test.mjs scripts/console-pane-render.test.mjs scripts/settings-section-routes.test.mjs scripts/authoring-refresh.test.mjs scripts/verify-macos-artifacts.test.mjs scripts/provider-chip-verdict.test.mjs scripts/child-reader-foot-react.test.mjs scripts/backend-spawn-address.test.mjs scripts/connectivity-banner-copy.test.mjs scripts/connectivity-banner-notice.test.mjs scripts/chat-list-sections.test.mjs scripts/chat-keyboard-regions.test.mjs scripts/chat-sidebar-view.test.mjs scripts/chat-sidebar-layout.test.mjs scripts/chat-sidebar-sections.test.mjs scripts/titlebar-options.test.mjs scripts/trace-fold-model.test.mjs scripts/trace-fold-behaviour.test.mjs scripts/chat-status-strip.test.mjs scripts/chat-pane-floors.test.mjs scripts/path-utils.test.mjs scripts/window-chrome.test.mjs scripts/chat-sidebar-scope-paging.test.mjs scripts/chat-sidebar-connection-voices.test.mjs scripts/integration-model.test.mjs scripts/mcp-catalog-parity.test.mjs scripts/btw-aside.test.mjs scripts/composer-send-failure.test.mjs scripts/composer-text-authority.test.mjs scripts/analytics-rate-format.test.mjs scripts/provider-catalog.test.mjs scripts/provider-sign-in-flow.test.mjs scripts/provider-status.test.mjs scripts/evidence-sign-in-states.test.mjs scripts/provider-detail-remount.test.mjs scripts/model-select-store.test.mjs scripts/onboarding-step-block.test.mjs scripts/onboarding-default-model.test.mjs scripts/server-release-notes.test.mjs scripts/no-hardlink-write.test.mjs scripts/canvas-goals.test.mjs scripts/overlay-drag-zones.test.mjs scripts/message-surface-floors.test.mjs scripts/header-identity-model.test.mjs scripts/pane-slot-ground.test.mjs scripts/projects-tab.test.mjs scripts/agent-hub-org-sharing.test.mjs scripts/mesh-tab.test.mjs",
80
80
  "check-themes": "node scripts/generate-theme-css.mjs --check && node scripts/contrast-contract.mjs",
81
81
  "check-vendored": "node scripts/check-vendored.mjs",
82
82
  "check-evidence": "node scripts/check-evidence.mjs",
@@ -1,6 +0,0 @@
1
- import{r as D,j as e,c as V}from"./index-hIJSZMtz.js";import{a as le}from"./publication-validation-Cke6xOnn.js";import{g as te,f as L,am as b,ar as M,al as O,as as I,at as ce,au as de,av as se,h as ae,u as ue,a4 as me,aw as he,B as xe,an as ge,ao as je,ax as X,ak as fe,ay as ye,az as pe}from"./index-DyfVjYXR.js";import{c as ve,L as we,j as Z,B as l,S as z,k as ne,l as q,m as _,a as v,X as be,T as w,A as G,h as J,i as ee}from"./error-boundary-BX3Jjofp.js";import{l as Ce,g as Ne,h as Ae,j as ke,f as R,k as Se,m as De,n as Ee,e as Te,i as Fe,u as Pe,a as qe,b as _e,H as ze,A as Le}from"./use-download-agent-mutation-yItIUILb.js";import"./console-mirror-BoykuSNB.js";import"./en-US-BkS8Ixxl.js";import"./book-open-B8nHgs3o.js";/**
2
- * @license lucide-react v0.507.0 - ISC
3
- *
4
- * This source code is licensed under the ISC license.
5
- * See the LICENSE file in the root directory of this source tree.
6
- */const Me=[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]],Ie=ve("message-circle",Me),E={all:["agent-comments"],list:t=>[...E.all,"list",t]},Ke=({agentId:t,enabled:r=!0})=>te({queryKey:E.list(t||"invalid"),queryFn:async()=>{if(!t)throw new Error("Agent ID is required to fetch comments.");return(await Ce(t)).result},enabled:!!t&&r,staleTime:2*60*1e3,gcTime:5*60*1e3,refetchOnWindowFocus:!0}),Ue=()=>{const t=L(),{isAuthenticated:r}=b();return M({mutationFn:async n=>{const{agentId:i,data:s}=n;if(!r)throw new Error("Authentication required.");return Ne(i,s)},onSuccess:(n,i)=>{t.invalidateQueries({queryKey:E.list(i.agentId)}),I("Comment posted")},onError:n=>{O(`Failed to post comment: ${n.message}`)}})},Be=()=>{const t=L(),{isAuthenticated:r}=b();return M({mutationFn:async n=>{const{agentId:i,commentId:s,data:c}=n;if(!r)throw new Error("Authentication required.");return Ae(i,s,c)},onSuccess:(n,i)=>{t.invalidateQueries({queryKey:E.list(i.agentId)}),I("Comment updated")},onError:n=>{O(`Failed to update comment: ${n.message}`)}})},Qe=()=>{const t=L(),{isAuthenticated:r}=b();return M({mutationFn:async n=>{const{agentId:i,commentId:s}=n;if(!r)throw new Error("Authentication required.");return ke(i,s)},onSuccess:(n,i)=>{t.invalidateQueries({queryKey:E.list(i.agentId)}),I("Comment deleted")},onError:n=>{O(`Failed to delete comment: ${n.message}`)}})},Re=({agentId:t})=>{const{isAuthenticated:r,user:n}=b(),[i,s]=D.useState(""),[c,x]=D.useState(null),[m,C]=D.useState(""),{data:N,isLoading:T,error:A}=Ke({agentId:t}),g=N?.records??[],k=Ue(),d=Be(),j=Qe(),f=async a=>{if(a.preventDefault(),!(!i.trim()||!r||!t))try{await k.mutateAsync({agentId:t,data:{text:i}}),s("")}catch(o){console.error("Submit comment error caught in component:",o)}},K=(a,o)=>{x(a),C(o)},F=()=>{x(null),C("")},U=async()=>{if(!(!c||!m.trim()||!r||!t))try{await d.mutateAsync({agentId:t,commentId:c,data:{text:m}}),F()}catch(a){console.error("Update comment error caught in component:",a)}},y=async a=>{if(!(!r||!t)&&window.confirm("Are you sure you want to delete this comment?"))try{await j.mutateAsync({agentId:t,commentId:a})}catch(o){console.error("Delete comment error caught in component:",o)}},p=a=>r&&n?.radientUser?.account?.id===a.account_id;return e.jsxs("div",{className:"mt-6",children:[e.jsx("h2",{className:"mb-4 font-semibold text-heading text-ink",children:"Comments"}),r?e.jsxs("div",{className:"mb-4 flex flex-col gap-1.5",children:[e.jsxs(we,{htmlFor:"new-comment",children:[e.jsx(Ie,{size:14,"aria-hidden":"true"}),"Leave a comment"]}),e.jsxs("form",{onSubmit:f,className:"flex flex-col gap-3",children:[e.jsx(Z,{id:"new-comment",placeholder:"Share your thoughts...",rows:3,value:i,onChange:a=>s(a.target.value),required:!0}),e.jsx(l,{type:"submit",variant:"primary",disabled:k.isPending||!i.trim(),className:"self-end",children:k.isPending?e.jsx(z,{size:"sm",label:"Posting comment"}):"Post comment"})]})]}):e.jsx("p",{className:"mt-6 mb-4 text-body-sm text-ink-muted",children:"Sign in to leave comments."}),e.jsx(ne,{className:"my-6"}),T&&e.jsx("ul",{className:"flex flex-col",children:[...Array(3)].map((a,o)=>e.jsxs("li",{className:"flex gap-3 pb-6",children:[e.jsx(q,{children:e.jsx(_,{children:e.jsx(v,{className:"size-full"})})}),e.jsxs("div",{className:"flex w-full flex-col gap-1.5",children:[e.jsx(v,{className:"h-3.5 w-24"}),e.jsx(v,{className:"h-3 w-15"}),e.jsx(v,{className:"mt-2 h-3.5 w-full"}),e.jsx(v,{className:"h-3.5 w-4/5"})]})]},`skeleton-${o}`))}),A&&e.jsxs("p",{role:"alert",className:"my-6 text-body-sm text-danger",children:["Failed to load comments: ",A.message]}),!T&&!A&&e.jsx("ul",{className:"flex flex-col gap-6",children:g.length===0?e.jsx("li",{className:"text-body-sm text-ink-muted",children:"No comments yet. Yours would be the first."}):g.map(a=>c===a.id?e.jsxs("li",{className:"flex gap-3",children:[e.jsx(q,{children:e.jsx(_,{children:a.account_metadata?.name?.charAt(0).toUpperCase()||"?"})}),e.jsxs("div",{className:"flex w-full flex-col gap-2",children:[e.jsx(Z,{rows:3,value:m,onChange:o=>C(o.target.value),autoFocus:!0,"aria-label":"Edit comment"}),e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsxs(l,{variant:"secondary",size:"sm",onClick:F,children:[e.jsx(be,{}),"Cancel"]}),e.jsxs(l,{variant:"primary",size:"sm",onClick:U,disabled:d.isPending||!m.trim(),children:[d.isPending?e.jsx(z,{size:"xs",label:"Saving comment"}):e.jsx(ce,{}),"Save"]})]})]})]},a.id):e.jsxs("li",{className:"flex gap-3",children:[e.jsx(q,{children:e.jsx(_,{children:a.account_metadata?.name?.charAt(0).toUpperCase()||"?"})}),e.jsxs("div",{className:"w-full",children:[e.jsxs("div",{className:"flex w-full items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("p",{className:"font-medium text-body text-ink",children:a.account_metadata?.name||"Anonymous"}),e.jsxs("p",{className:"text-ink-muted text-meta",children:[R(new Date(a.created_at))," ","ago"]})]}),p(a)&&e.jsxs("div",{className:"flex gap-0.5",children:[e.jsx(w,{content:"Edit comment",children:e.jsx(l,{variant:"ghost",size:"icon-sm",onClick:()=>K(a.id,a.text),disabled:!!c,"aria-label":"Edit comment",children:e.jsx(de,{})})}),e.jsx(w,{content:"Delete comment",children:e.jsx(l,{variant:"ghost",size:"icon-sm",onClick:()=>y(a.id),disabled:!!c,"aria-label":"Delete comment",children:e.jsx(se,{})})})]})]}),e.jsx("p",{className:"mt-2 text-body-sm text-ink whitespace-pre-wrap",children:a.text})]})]},a.id))})]})},$={all:["agent-details"],detail:t=>[...$.all,t]},Oe=({agentId:t,enabled:r=!0})=>te({queryKey:$.detail(t||"invalid"),queryFn:async()=>{if(!t)throw new Error("Agent ID is required to fetch details.");return await Se(t)},select:i=>i.result,enabled:!!t&&r,staleTime:3e5,gcTime:6e5,refetchOnWindowFocus:!1}),$e=()=>{const t=L(),r=ae(),{isAuthenticated:n}=b();return M({mutationFn:async({agentId:s})=>{if(!n)throw new Error("Authentication required to delist an agent.");if(!s)throw new Error("Agent ID is required to delist.");return Ee(s)},onSuccess:(s,c)=>{I("Agent delisted"),t.invalidateQueries({queryKey:$.detail(c.agentId)}),De(t),r("/agent-hub")},onError:s=>{console.error("Delist agent error:",s)}})},We={like:"The like did not go through",favourite:"The favourite did not go through",download:"The download did not start",delist:"The agent was not delisted"},Q=({children:t})=>e.jsx("span",{className:"inline-flex h-4 min-w-5 items-center text-meta text-ink-muted",children:t}),tt=()=>{const{agentId:t}=ue(),r=ae(),{isAuthenticated:n,user:i}=b(),{data:s,isLoading:c,isFetching:x,error:m,refetch:C}=Oe({agentId:t??"",enabled:!!t}),{statuses:N,isKnown:T,isError:A,isFetching:g,refetch:k}=Te({agentIds:t?[t]:[]}),d=Fe(T,N,t),j=d&&N[t??""]?.liked===!0,f=d&&N[t??""]?.favourited===!0,K=s?.like_count??0,F=s?.favourite_count??0,U=s?.download_count??0,y=Pe(),p=qe(),a=_e(),o=$e(),[ie,P]=D.useState(!1),[h,u]=D.useState(null),B=!!i&&!!s&&i.radientUser?.account?.id===s.account_id,W=()=>{!t||!n||y.isPending||(u(null),y.mutate({agentId:t,isCurrentlyLiked:j},{onError:()=>u("like")}))},Y=()=>{!t||!n||p.isPending||(u(null),p.mutate({agentId:t,isCurrentlyFavourited:f},{onError:()=>u("favourite")}))},H=()=>{!t||!s||a.isPending||(u(null),a.mutate({agentId:s.id,agentName:s.name},{onError:()=>u("download")}))},re=()=>{!t||!B||o.isPending||(u(null),o.mutate({agentId:t},{onError:()=>u("delist")}),P(!1))},S=h?h==="like"?{action:"like",error:y.error,retry:W}:h==="favourite"?{action:"favourite",error:p.error,retry:Y}:h==="download"?{action:"download",error:a.error,retry:H}:{action:"delist",error:o.error,retry:void 0}:null,oe=()=>{r("/agent-hub")};return c?e.jsx("div",{className:"flex h-full items-center justify-center",children:e.jsx(z,{label:"Loading agent details"})}):m?e.jsx("div",{className:"flex h-full items-center justify-center p-6",children:e.jsxs(G,{variant:"danger",className:"max-w-2xl",children:[e.jsx(J,{children:"This agent could not be loaded"}),e.jsx(ee,{children:me("The Radient agent catalogue did not answer.",m)}),e.jsx("div",{className:"mt-2",children:e.jsx(l,{variant:"outline",size:"sm",onClick:()=>void C(),disabled:x,"aria-busy":x,children:x?"Trying…":"Try again"})})]})}):s?e.jsxs("div",{className:"m-6 flex flex-1 flex-col rounded-lg border border-hairline bg-surface p-8",children:[e.jsxs("div",{className:"mb-6 flex items-center justify-between gap-4",children:[e.jsxs("div",{className:"flex min-w-0 items-center gap-4",children:[e.jsx(l,{variant:"ghost",size:"icon",onClick:oe,"aria-label":"Back to Agent hub",children:e.jsx(he,{})}),e.jsx(q,{className:"size-11 shrink-0",children:e.jsx(_,{children:e.jsx(xe,{size:22,"aria-hidden":"true"})})}),e.jsx("h1",{className:"truncate text-display text-ink",children:s.name})]}),e.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[e.jsx(w,{content:"Sign in to Radient to use this feature",disabled:n,children:e.jsx("span",{children:e.jsxs(l,{variant:"ghost",size:"sm",onClick:W,disabled:!n||y.isPending||!d,"aria-label":d?j?"Unlike agent":"Like agent":"Like state unavailable",className:V(j&&"text-danger"),children:[e.jsx(ze,{fill:j?"currentColor":"none"}),e.jsx(Q,{children:K})]})})}),e.jsx(w,{content:"Sign in to Radient to use this feature",disabled:n,children:e.jsx("span",{children:e.jsxs(l,{variant:"ghost",size:"sm",onClick:Y,disabled:!n||p.isPending||!d,"aria-label":d?f?"Unfavourite agent":"Favourite agent":"Favourite state unavailable",className:V(f&&"text-warning"),children:[e.jsx(ge,{fill:f?"currentColor":"none"}),e.jsx(Q,{children:F})]})})}),e.jsx(w,{content:"Download agent to your computer",children:e.jsx("span",{children:e.jsxs(l,{variant:"ghost",size:"icon",onClick:H,disabled:a.isPending,"aria-label":"Download agent",className:"ml-1",children:[e.jsx(je,{}),e.jsx(Q,{children:a.isPending?e.jsx(v,{className:"h-3.5 w-5"}):U})]})})}),B&&e.jsx(w,{content:"Permanently delist this agent from Agent hub",children:e.jsx("span",{children:e.jsx(l,{variant:"ghost",size:"icon",onClick:()=>P(!0),disabled:o.isPending,"aria-label":"Delist agent",className:"ml-1 text-danger hover:bg-danger-wash hover:text-danger",children:e.jsx(se,{})})})})]})]}),n&&A&&!h&&e.jsxs("output",{className:"mb-6 flex flex-wrap items-center gap-2 text-meta text-warning","data-testid":"agent-details-status-unknown",children:[e.jsx("span",{children:"Your likes and favourites could not be read, so this agent's viewer state is not shown."}),e.jsx(l,{variant:"ghost",size:"sm",onClick:()=>void k(),disabled:g,"aria-busy":g,children:g?"Trying…":"Try again"})]}),S&&h&&e.jsxs(G,{variant:"danger",className:"mb-6","data-testid":"agent-details-error",children:[e.jsx(J,{children:We[h]}),e.jsx(ee,{children:le(S.action,S.error,s.name)}),S.retry&&e.jsx("div",{className:"mt-2",children:e.jsx(l,{variant:"outline",size:"sm",onClick:S.retry,children:"Try again"})})]}),e.jsx(Le,{tags:s.tags,categories:s.categories}),e.jsxs("div",{className:"mt-4 mb-6 flex flex-col gap-2 text-body-sm text-ink-muted",children:[e.jsxs("p",{children:["Created by: ",s.account_metadata?.name??"Unknown"," (",s.account_metadata?.email??"No email",")"]}),e.jsxs("p",{children:["Created: ",R(new Date(s.created_at))," ago (",X(s.created_at),")"]}),e.jsxs("p",{children:["Last modified: ",R(new Date(s.updated_at))," ","ago (",X(s.updated_at),")"]})]}),e.jsx("div",{className:"mt-2 mb-8 leading-relaxed text-body text-ink",children:s.description||"No description provided."}),e.jsx(ne,{className:"my-6"}),e.jsx(Re,{agentId:s.id}),e.jsx(fe,{open:ie,onClose:()=>P(!1),title:"Delist this agent?",maxWidth:"xs",actions:e.jsxs(e.Fragment,{children:[e.jsx(ye,{onClick:()=>P(!1),children:"Cancel"}),e.jsx(pe,{onClick:()=>{!t||!B||o.isPending||re()},disabled:o.isPending,children:o.isPending?e.jsx(z,{size:"sm",label:"Delisting agent"}):"Delist"})]}),dialogProps:{"aria-describedby":"delist-dialog-description"},children:e.jsxs("div",{id:"delist-dialog-description",className:"text-body text-ink-muted",children:['This takes "',s.name,'" off the hub straight away, and nobody will be able to download it. You can upload it again later.']})})]}):e.jsx("div",{className:"flex h-full items-center justify-center",children:e.jsx("p",{className:"text-body text-ink",children:"Agent not found."})})};export{tt as AgentDetailsPage};