@intent-hq/web 2.342.6 → 2.342.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/web/app/immutable/chunks/{DuHPqQGE.js → -2bHDplp.js} +1 -1
- package/web/app/immutable/chunks/{BPJT_jmR.js → 0tj_yJAd.js} +1 -1
- package/web/app/immutable/chunks/{B8esy8Vu.js → 3_J6fjhO.js} +1 -1
- package/web/app/immutable/chunks/{r7GEgyab.js → 72kV58Ql.js} +2 -2
- package/web/app/immutable/chunks/{D6mwmUlO.js → 762lAjev.js} +6 -6
- package/web/app/immutable/chunks/{iSPSrAXS.js → 8_7J_rxm.js} +1 -1
- package/web/app/immutable/chunks/{Coekp85l.js → 8dcwmYMD.js} +1 -1
- package/web/app/immutable/chunks/{F3N2tbK9.js → B0Eu_1Zr.js} +1 -1
- package/web/app/immutable/chunks/{BqJU57xs.js → B5QVp6A0.js} +1 -1
- package/web/app/immutable/chunks/{BDaNM4HC.js → B6UkjkkG.js} +1 -1
- package/web/app/immutable/chunks/{CQx6ZF60.js → B82-1O1e.js} +1 -1
- package/web/app/immutable/chunks/{BfRwjOCA.js → B87Opa04.js} +1 -1
- package/web/app/immutable/chunks/{DCdtmpaz.js → BAr6DP2S.js} +1 -1
- package/web/app/immutable/chunks/{D5Ky76z6.js → BGKHyW3m.js} +1 -1
- package/web/app/immutable/chunks/{BJL3vZfi.js → BHOPo_9A.js} +1 -1
- package/web/app/immutable/chunks/{CCRKTTsT.js → BI40CZU_.js} +1 -1
- package/web/app/immutable/chunks/{Bxcfvdut.js → BKZOB6N7.js} +1 -1
- package/web/app/immutable/chunks/{Cdb-RlPf.js → BKrFdF0K.js} +1 -1
- package/web/app/immutable/chunks/{DBkwUnB3.js → BM2TfFMT.js} +1 -1
- package/web/app/immutable/chunks/{DJtGLOxa.js → BOhFt8_6.js} +1 -1
- package/web/app/immutable/chunks/{BFEnkdqB.js → BQ-M1wvC.js} +1 -1
- package/web/app/immutable/chunks/{DqmXJyxa.js → BTRr_gVO.js} +4 -4
- package/web/app/immutable/chunks/{ZuHjZPjN.js → BVX8qLeE.js} +1 -1
- package/web/app/immutable/chunks/{u9XHqibz.js → BXtYtFFm.js} +1 -1
- package/web/app/immutable/chunks/{Dcv7OLYk.js → BYOZsc06.js} +1 -1
- package/web/app/immutable/chunks/{COFMFdMU.js → BYR3hbm1.js} +1 -1
- package/web/app/immutable/chunks/{_MlFNRUP.js → BZRAoPBg.js} +1 -1
- package/web/app/immutable/chunks/{BLvT7caV.js → B_FQfWfg.js} +1 -1
- package/web/app/immutable/chunks/{BywpJ9Jr.js → B_gooRw3.js} +1 -1
- package/web/app/immutable/chunks/{DtLFy1HX.js → BbiotSng.js} +1 -1
- package/web/app/immutable/chunks/{DEwhJbS-.js → BbpzcJJv.js} +1 -1
- package/web/app/immutable/chunks/{DA09cdDe.js → BhR1rUz4.js} +4 -4
- package/web/app/immutable/chunks/{DqN3eEdL.js → Bip3iRY7.js} +4 -4
- package/web/app/immutable/chunks/{BnOitAd5.js → BlJpnECK.js} +3 -3
- package/web/app/immutable/chunks/{BYcqhPVA.js → BqUo6Ktu.js} +2 -2
- package/web/app/immutable/chunks/{Ye026sG_.js → Br4sh5Vb.js} +1 -1
- package/web/app/immutable/chunks/{H3AlxZF2.js → C62uwcSa.js} +1 -1
- package/web/app/immutable/chunks/{Xd2ADnnE.js → C6ijr8RP.js} +1 -1
- package/web/app/immutable/chunks/{BmZEWeMm.js → CCguRiXg.js} +1 -1
- package/web/app/immutable/chunks/{Dqm94Bm7.js → CEQ56sKb.js} +1 -1
- package/web/app/immutable/chunks/{BiJM57Y-.js → CEcvV5G3.js} +1 -1
- package/web/app/immutable/chunks/{BAGnnBCG.js → CK9cQMVJ.js} +1 -1
- package/web/app/immutable/chunks/{Cxon-xet.js → CPNo3Wxe.js} +1 -1
- package/web/app/immutable/chunks/{zzo-K1GZ.js → CSVFP6Jt.js} +1 -1
- package/web/app/immutable/chunks/{XIVGG58R.js → CUfXGQXK.js} +1 -1
- package/web/app/immutable/chunks/{1cBRNdrT.js → CVWq5h5S.js} +1 -1
- package/web/app/immutable/chunks/{BAq1pHdg.js → CVimJ6Rz.js} +1 -1
- package/web/app/immutable/chunks/{DKpqyoHF.js → CVnjH67L.js} +1 -1
- package/web/app/immutable/chunks/{C4EYhr_S.js → CVoHD481.js} +1 -1
- package/web/app/immutable/chunks/{rqpOGBN5.js → CYrZeetF.js} +1 -1
- package/web/app/immutable/chunks/{DI_OiaCT.js → CZ4naQ1D.js} +1 -1
- package/web/app/immutable/chunks/{BAKJw_70.js → C_MoDXbz.js} +1 -1
- package/web/app/immutable/chunks/{3UFVWcav.js → C_YySiHw.js} +1 -1
- package/web/app/immutable/chunks/{C9QANngy.js → CbGy5L3Y.js} +1 -1
- package/web/app/immutable/chunks/{DVjUIntK.js → CdwWwIxc.js} +1 -1
- package/web/app/immutable/chunks/{DxWaTKL0.js → CfcPGi-s.js} +3 -3
- package/web/app/immutable/chunks/{BjxSeDhE.js → ChCEEi91.js} +2 -2
- package/web/app/immutable/chunks/{CH88el2F.js → CiJxgZE6.js} +1 -1
- package/web/app/immutable/chunks/{DU6dXL8V.js → Cj0F5ihH.js} +1 -1
- package/web/app/immutable/chunks/{CvYPF82-.js → Cn2QoVqR.js} +4 -4
- package/web/app/immutable/chunks/{Dgglyxba.js → Cnv943xM.js} +1 -1
- package/web/app/immutable/chunks/{fwxl4rBI.js → CqAUygYd.js} +1 -1
- package/web/app/immutable/chunks/{wMidnPXT.js → CqOHERUX.js} +3 -3
- package/web/app/immutable/chunks/{CjN3bu3h.js → Crf8zlEl.js} +1 -1
- package/web/app/immutable/chunks/{BKSBgVEt.js → CsZ8CKOb.js} +1 -1
- package/web/app/immutable/chunks/{cf3hShp0.js → CwkZa8IK.js} +1 -1
- package/web/app/immutable/chunks/{DS-PgUc7.js → CxR88OSV.js} +1 -1
- package/web/app/immutable/chunks/{D9piAIpK.js → D1Ne8i3Y.js} +1 -1
- package/web/app/immutable/chunks/{_RTfq0v6.js → D3bgZo3Z.js} +2 -2
- package/web/app/immutable/chunks/{dF445d6n.js → D6AnRuxJ.js} +1 -1
- package/web/app/immutable/chunks/{D4BOXNo3.js → D8kRzVzM.js} +3 -3
- package/web/app/immutable/chunks/{CO4Qh4-v.js → DARBmEKl.js} +1 -1
- package/web/app/immutable/chunks/{D1IC4eoI.js → DAy_opbr.js} +1 -1
- package/web/app/immutable/chunks/{Co1GOV8m.js → DBwzp-5d.js} +1 -1
- package/web/app/immutable/chunks/{QFw_XNQ-.js → DCWQ8q2B.js} +1 -1
- package/web/app/immutable/chunks/{CgAIgZYS.js → DE1Y_Mqg.js} +1 -1
- package/web/app/immutable/chunks/{8GRPg7Be.js → DGLoeWwC.js} +1 -1
- package/web/app/immutable/chunks/{BmLaJ9xx.js → DKyOFl-H.js} +1 -1
- package/web/app/immutable/chunks/{k5gd82i4.js → DODWySkx.js} +1 -1
- package/web/app/immutable/chunks/{gLnFSVct.js → DP9aVWvY.js} +2 -2
- package/web/app/immutable/chunks/{DVBxlkFp.js → DPULIKQk.js} +1 -1
- package/web/app/immutable/chunks/{DbPC6tLA.js → DQJZrn_X.js} +1 -1
- package/web/app/immutable/chunks/{CBZtJT-n.js → DSWsYH8C.js} +1 -1
- package/web/app/immutable/chunks/{o3OBOoSf.js → DTQGk7-p.js} +1 -1
- package/web/app/immutable/chunks/{iZrGkeHG.js → DUMC5ag4.js} +1 -1
- package/web/app/immutable/chunks/{DzGcLQsv.js → DUfPBqyv.js} +1 -1
- package/web/app/immutable/chunks/{CZfVnA69.js → DWfKl2G1.js} +2 -2
- package/web/app/immutable/chunks/{mO0YX6Up.js → DZIpsGdM.js} +1 -1
- package/web/app/immutable/chunks/{Ck2rWFI2.js → D_cxHEqU.js} +12 -12
- package/web/app/immutable/chunks/{BPnWvR4U.js → Db-yEKas.js} +1 -1
- package/web/app/immutable/chunks/{DH9p1XHN.js → Db9BDdTM.js} +1 -1
- package/web/app/immutable/chunks/{DsnPbcrG.js → DbZTkkyC.js} +1 -1
- package/web/app/immutable/chunks/{G9eRzhXv.js → DbaSDcEd.js} +1 -1
- package/web/app/immutable/chunks/{CQ4I_Mdn.js → DdjKmyFb.js} +1 -1
- package/web/app/immutable/chunks/{VlZpY_zn.js → DdroO4BP.js} +1 -1
- package/web/app/immutable/chunks/{D7Rp1YzU.js → Dfs3_YYJ.js} +1 -1
- package/web/app/immutable/chunks/{CJXKaPZY.js → DiLL3u8G.js} +1 -1
- package/web/app/immutable/chunks/{BY6vo3uD.js → DksiAt8J.js} +1 -1
- package/web/app/immutable/chunks/{BfqGTcOP.js → Dm9UWIDS.js} +1 -1
- package/web/app/immutable/chunks/{CJ6UQw63.js → Dnnm3rWT.js} +1 -1
- package/web/app/immutable/chunks/{jJxI_UAc.js → DorrRHA9.js} +1 -1
- package/web/app/immutable/chunks/{DHOmmgcl.js → DqyPPCyO.js} +2 -2
- package/web/app/immutable/chunks/{DGu3KEOd.js → DtsUKbfD.js} +1 -1
- package/web/app/immutable/chunks/{BokY6u4h.js → DzBSnte5.js} +1 -1
- package/web/app/immutable/chunks/{F9fxsiNO.js → H1fgmcwF.js} +1 -1
- package/web/app/immutable/chunks/{34EP1V4U.js → NAs2sQwc.js} +1 -1
- package/web/app/immutable/chunks/{D6fq3jd3.js → Pvi3xCgN.js} +1 -1
- package/web/app/immutable/chunks/{jpkdFrp6.js → QroQeT1R.js} +1 -1
- package/web/app/immutable/chunks/{DK7bkBKS.js → TpcWfRK3.js} +1 -1
- package/web/app/immutable/chunks/{BQPPEUu1.js → TudrisM3.js} +1 -1
- package/web/app/immutable/chunks/{Dng3CYSh.js → W4n-ioby.js} +1 -1
- package/web/app/immutable/chunks/{DerHBx5w.js → Zz2ufh_s.js} +1 -1
- package/web/app/immutable/chunks/{DQzntlzl.js → b6oXDh_T.js} +3 -3
- package/web/app/immutable/chunks/{BlxdQMTv.js → eHnFo4lI.js} +1 -1
- package/web/app/immutable/chunks/{BTQOjzCX.js → eqoPYRQw.js} +1 -1
- package/web/app/immutable/chunks/{O5gmiwkz.js → h1qD8ry7.js} +1 -1
- package/web/app/immutable/chunks/{b31Z8LKe.js → hC1Rd2xp.js} +1 -1
- package/web/app/immutable/chunks/{C44zP9aX.js → hPM-hpF1.js} +1 -1
- package/web/app/immutable/chunks/{BdINg18V.js → l0-9ftmB.js} +1 -1
- package/web/app/immutable/chunks/{1XQU3Y04.js → m-4S75UZ.js} +1 -1
- package/web/app/immutable/chunks/{ftrEOorZ.js → ob_UjBCd.js} +2 -2
- package/web/app/immutable/chunks/{q8sNwmKq.js → olZe0-nS.js} +1 -1
- package/web/app/immutable/chunks/{BNPwBixc.js → teiHBTP_.js} +1 -1
- package/web/app/immutable/chunks/{CwVL3hLj.js → zFLt0HSh.js} +1 -1
- package/web/app/immutable/entry/{app.F7HSlLyZ.js → app.PZ5Y9PBf.js} +2 -2
- package/web/app/immutable/entry/start.BY0gUtqa.js +1 -0
- package/web/app/immutable/nodes/{0.Bl0xo6es.js → 0.NhRN4wpn.js} +1 -1
- package/web/app/immutable/nodes/{1.BIjEngSs.js → 1.rxmnWftv.js} +1 -1
- package/web/app/immutable/nodes/{10.CxhXAvUx.js → 10.B5uqPVYd.js} +1 -1
- package/web/app/immutable/nodes/{14.CgIrR2xa.js → 14.BNz2Qn0-.js} +1 -1
- package/web/app/immutable/nodes/{17.B_Cve8Oj.js → 17.DmFoGT2O.js} +2 -2
- package/web/app/immutable/nodes/{2.Lo576kSK.js → 2.BewlISWX.js} +4 -4
- package/web/app/immutable/nodes/{3.KCA5aN-y.js → 3.Dh75TGTq.js} +1 -1
- package/web/app/immutable/nodes/{4.BA93tNs_.js → 4.D_lzUIO2.js} +1 -1
- package/web/app/immutable/nodes/{5.CK2zLy3y.js → 5.D-mFbexK.js} +1 -1
- package/web/app/immutable/nodes/{6.Cv46jHXT.js → 6.Cgb9LGMD.js} +1 -1
- package/web/app/immutable/nodes/{7.Cy3olq8_.js → 7.CEKTuRJF.js} +1 -1
- package/web/app/immutable/nodes/{8.DzgEjwaM.js → 8.Dwn9d0dT.js} +4 -4
- package/web/app/immutable/nodes/{9.Ddzgkod6.js → 9.JcoFlsdV.js} +4 -4
- package/web/app/version.json +1 -1
- package/web/index.html +9 -9
- package/web/app/immutable/entry/start.CUFDKLDi.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as i}from"./
|
|
1
|
+
import{b as i}from"./Cn2QoVqR.js";function t(c,e){c.accDescr&&e.setAccDescription?.(c.accDescr),c.accTitle&&e.setAccTitle?.(c.accTitle),c.title&&e.setDiagramTitle?.(c.title)}i(t,"populateCommonDb");export{t as p};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{p as Mt}from"./
|
|
1
|
+
import{p as Mt}from"./B0Eu_1Zr.js";import{aZ as Nt,U as zt,Y as Lt,b0 as Tt,V as Xt,a_ as At,b as u,a6 as Et,W as Yt,q as J,ay as Q,aX as It,B as Bt,r as Ft,X as V}from"./Cn2QoVqR.js";import{p as Rt}from"./2gme4FSl.js";var G=u((o,r)=>{const e=o<=1?o*100:o;if(e<0||e>100)throw new Error(`${r} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${o}`);return e},"toPercent"),X=u((o,r,e)=>({x:G(r,`${e} evolution`),y:G(o,`${e} visibility`)}),"toCoordinates"),K=u(o=>{if(o){if(o==="+<>")return"bidirectional";if(o==="+<")return"backward";if(o==="+>")return"forward"}},"getFlowFromPort"),Ot=u(o=>{if(!o?.startsWith("+"))return{};const e=/^\+'([^']*)'/.exec(o)?.[1];return o.includes("<>")?{flow:"bidirectional",label:e}:o.includes("<")?{flow:"backward",label:e}:o.includes(">")?{flow:"forward",label:e}:{label:e}},"extractFlowFromArrow"),Wt=u((o,r)=>{if(Mt(o,r),o.size&&r.setSize(o.size.width,o.size.height),o.evolution){const e=o.evolution.stages.map(a=>a.secondName?`${a.name.trim()} / ${a.secondName.trim()}`:a.name.trim()),h=o.evolution.stages.filter(a=>a.boundary!==void 0).map(a=>a.boundary);r.updateAxes({stages:e,stageBoundaries:h})}if(o.anchors.forEach(e=>{const h=X(e.visibility,e.evolution,`Anchor "${e.name}"`);r.addNode(e.name,e.name,h.x,h.y,"anchor")}),o.components.forEach(e=>{const h=X(e.visibility,e.evolution,`Component "${e.name}"`),a=e.label?(e.label.negX?-1:1)*e.label.offsetX:void 0,d=e.label?(e.label.negY?-1:1)*e.label.offsetY:void 0,w=e.decorator?.strategy;r.addNode(e.name,e.name,h.x,h.y,"component",a,d,e.inertia,w)}),o.notes.forEach(e=>{const h=X(e.visibility,e.evolution,`Note "${e.text}"`);r.addNote(e.text,h.x,h.y)}),o.pipelines.forEach(e=>{const h=r.getNode(e.parent);if(!h||typeof h.y!="number")throw new Error(`Pipeline "${e.parent}" must reference an existing component with coordinates.`);const a=h.y;r.startPipeline(e.parent),e.components.forEach(d=>{const w=`${e.parent}_${d.name}`,C=d.label?(d.label.negX?-1:1)*d.label.offsetX:void 0,g=d.label?(d.label.negY?-1:1)*d.label.offsetY:void 0,R=G(d.evolution,`Pipeline component "${d.name}" evolution`);r.addNode(w,d.name,R,a,"pipeline-component",C,g),r.addPipelineComponent(e.parent,w)})}),o.links.forEach(e=>{const h=!!e.arrow&&(e.arrow.includes("-.->")||e.arrow.includes(".-."));let a=K(e.fromPort)??K(e.toPort);const{flow:d,label:w}=Ot(e.arrow);!a&&d&&(a=d);const C=e.linkLabel,g=w??C;r.addLink(r.resolveNodeId(e.from),r.resolveNodeId(e.to),h,g,a)}),o.evolves.forEach(e=>{const h=r.getNode(e.component);if(h?.y!==void 0){const a=G(e.target,`Evolve target for "${e.component}"`);r.addTrend(e.component,a,h.y)}}),o.annotations.length>0){const e=o.annotations[0],h=X(e.x,e.y,"Annotations box");r.setAnnotationsBox(h.x,h.y)}o.annotation.forEach(e=>{const h=X(e.x,e.y,`Annotation ${e.number}`);r.addAnnotation(e.number,[{x:h.x,y:h.y}],e.text)}),o.accelerators.forEach(e=>{const h=X(e.x,e.y,`Accelerator "${e.name}"`);r.addAccelerator(e.name,h.x,h.y)}),o.deaccelerators.forEach(e=>{const h=X(e.x,e.y,`Deaccelerator "${e.name}"`);r.addDeaccelerator(e.name,h.x,h.y)})},"populateDb"),tt={parser:{yy:void 0},parse:u(async o=>{const r=await Rt("wardley",o);Q.debug(r);const e=tt.parser?.yy;if(!e||typeof e.addNode!="function")throw new Error("parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Wt(r,e)},"parse")},E,Dt=(E=class{constructor(){this.nodes=new Map,this.links=[],this.trends=new Map,this.pipelines=new Map,this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.axes={}}addNode(r){const e=this.nodes.get(r.id)??{id:r.id,label:r.label},h={...e,...r,className:r.className??e.className,labelOffsetX:r.labelOffsetX??e.labelOffsetX,labelOffsetY:r.labelOffsetY??e.labelOffsetY};this.nodes.set(r.id,h)}addLink(r){this.links.push(r)}addTrend(r){this.trends.set(r.nodeId,r)}startPipeline(r){this.pipelines.set(r,{nodeId:r,componentIds:[]});const e=this.nodes.get(r);e&&(e.isPipelineParent=!0)}addPipelineComponent(r,e){const h=this.pipelines.get(r);h&&h.componentIds.push(e);const a=this.nodes.get(e);a&&(a.inPipeline=!0)}addAnnotation(r){this.annotations.push(r)}addNote(r){this.notes.push(r)}addAccelerator(r){this.accelerators.push(r)}addDeaccelerator(r){this.deaccelerators.push(r)}setAnnotationsBox(r,e){this.annotationsBox={x:r,y:e}}setAxes(r){this.axes={...this.axes,...r}}setSize(r,e){this.size={width:r,height:e}}getNode(r){return this.nodes.get(r)}resolveNodeId(r){if(this.nodes.has(r))return r;for(const[e,h]of this.nodes)if(h.label===r)return e;return r}build(){const r=[];for(const e of this.nodes.values()){if(typeof e.x!="number"||typeof e.y!="number")throw new Error(`Node "${e.label}" is missing coordinates`);r.push(e)}return{nodes:r,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}},u(E,"WardleyBuilder"),E),k=new Dt;function et(){return V()["wardley-beta"]}u(et,"getConfig");function at(o,r,e,h,a,d,w,C,g){k.addNode({id:o,label:r,x:e,y:h,className:a,labelOffsetX:d,labelOffsetY:w,inertia:C,sourceStrategy:g})}u(at,"addNode");function rt(o,r,e=!1,h,a){k.addLink({source:o,target:r,dashed:e,label:h,flow:a})}u(rt,"addLink");function ot(o,r,e){k.addTrend({nodeId:o,targetX:r,targetY:e})}u(ot,"addTrend");function nt(o,r,e){k.addAnnotation({number:o,coordinates:r,text:e})}u(nt,"addAnnotation");function st(o,r,e){k.addNote({text:o,x:r,y:e})}u(st,"addNote");function it(o,r,e){k.addAccelerator({name:o,x:r,y:e})}u(it,"addAccelerator");function dt(o,r,e){k.addDeaccelerator({name:o,x:r,y:e})}u(dt,"addDeaccelerator");function lt(o,r){k.setAnnotationsBox(o,r)}u(lt,"setAnnotationsBox");function ct(o,r){k.setSize(o,r)}u(ct,"setSize");function pt(o){k.startPipeline(o)}u(pt,"startPipeline");function ft(o,r){k.addPipelineComponent(o,r)}u(ft,"addPipelineComponent");function ht(o){k.setAxes(o)}u(ht,"updateAxes");function xt(o){return k.getNode(o)}u(xt,"getNode");function gt(o){return k.resolveNodeId(o)}u(gt,"resolveNodeId");function yt(){return k.build()}u(yt,"getWardleyData");function ut(){k.clear(),Ft()}u(ut,"clear");var Gt={getConfig:et,addNode:at,addLink:rt,addTrend:ot,addAnnotation:nt,addNote:st,addAccelerator:it,addDeaccelerator:dt,setAnnotationsBox:lt,setSize:ct,startPipeline:pt,addPipelineComponent:ft,updateAxes:ht,getNode:xt,resolveNodeId:gt,getWardleyData:yt,clear:ut,setAccTitle:At,getAccTitle:Xt,setDiagramTitle:Tt,getDiagramTitle:Lt,getAccDescription:zt,setAccDescription:Nt},qt=["Genesis","Custom Built","Product","Commodity"],Ht=u(()=>{const{themeVariables:o}=V();return{backgroundColor:o.wardley?.backgroundColor??o.background??"#fff",axisColor:o.wardley?.axisColor??"#000",axisTextColor:o.wardley?.axisTextColor??o.primaryTextColor??"#222",gridColor:o.wardley?.gridColor??"rgba(100, 100, 100, 0.2)",componentFill:o.wardley?.componentFill??"#fff",componentStroke:o.wardley?.componentStroke??"#000",componentLabelColor:o.wardley?.componentLabelColor??o.primaryTextColor??"#222",linkStroke:o.wardley?.linkStroke??"#000",evolutionStroke:o.wardley?.evolutionStroke??"#dc3545",annotationStroke:o.wardley?.annotationStroke??"#000",annotationTextColor:o.wardley?.annotationTextColor??o.primaryTextColor??"#222",annotationFill:o.wardley?.annotationFill??o.background??"#fff"}},"getTheme"),jt=u(()=>{const o=V()["wardley-beta"];return{width:o?.width??900,height:o?.height??600,padding:o?.padding??48,nodeRadius:o?.nodeRadius??6,nodeLabelOffset:o?.nodeLabelOffset??8,axisFontSize:o?.axisFontSize??12,labelFontSize:o?.labelFontSize??10,showGrid:o?.showGrid??!1,useMaxWidth:o?.useMaxWidth??!0}},"getConfigValues"),Vt=u((o,r,e,h)=>{Q.debug(`Rendering Wardley map
|
|
2
2
|
`+o);const a=jt(),d=Ht(),w=a.nodeRadius*1.6,C=h.db,g=C.getWardleyData(),R=C.getDiagramTitle(),S=g.size?.width??a.width,b=g.size?.height??a.height,Y=It(r);Y.selectAll("*").remove(),Bt(Y,b,S,a.useMaxWidth),Y.attr("viewBox",`0 0 ${S} ${b}`);const v=Y.append("g").attr("class","wardley-map"),q=Y.append("defs");q.append("marker").attr("id",`arrow-${r}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",d.evolutionStroke).attr("stroke","none"),q.append("marker").attr("id",`link-arrow-end-${r}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",d.linkStroke).attr("stroke","none"),q.append("marker").attr("id",`link-arrow-start-${r}`).attr("viewBox","0 0 10 10").attr("refX",1).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z").attr("fill",d.linkStroke).attr("stroke","none"),v.append("rect").attr("class","wardley-background").attr("width",S).attr("height",b).attr("fill",d.backgroundColor);const I=S-a.padding*2,B=b-a.padding*2;R&&v.append("text").attr("class","wardley-title").attr("x",S/2).attr("y",a.padding/2).attr("fill",d.axisTextColor).attr("font-size",a.axisFontSize*1.05).attr("font-weight","bold").attr("text-anchor","middle").attr("dominant-baseline","middle").text(R);const z=u(t=>a.padding+t/100*I,"projectX"),L=u(t=>b-a.padding-t/100*B,"projectY"),O=v.append("g").attr("class","wardley-axes");O.append("line").attr("x1",a.padding).attr("x2",S-a.padding).attr("y1",b-a.padding).attr("y2",b-a.padding).attr("stroke",d.axisColor).attr("stroke-width",1),O.append("line").attr("x1",a.padding).attr("x2",a.padding).attr("y1",a.padding).attr("y2",b-a.padding).attr("stroke",d.axisColor).attr("stroke-width",1);const wt=g.axes.xLabel??"Evolution",mt=g.axes.yLabel??"Visibility";O.append("text").attr("class","wardley-axis-label wardley-axis-label-x").attr("x",a.padding+I/2).attr("y",b-a.padding/4).attr("fill",d.axisTextColor).attr("font-size",a.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").text(wt),O.append("text").attr("class","wardley-axis-label wardley-axis-label-y").attr("x",a.padding/3).attr("y",a.padding+B/2).attr("fill",d.axisTextColor).attr("font-size",a.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("transform",`rotate(-90 ${a.padding/3} ${a.padding+B/2})`).text(mt);const F=g.axes.stages&&g.axes.stages.length>0?g.axes.stages:qt;if(F.length>0){const t=v.append("g").attr("class","wardley-stages"),s=g.axes.stageBoundaries,n=[];if(s&&s.length===F.length){let i=0;s.forEach(p=>{n.push({start:i,end:p}),i=p})}else{const i=1/F.length;F.forEach((p,l)=>{n.push({start:l*i,end:(l+1)*i})})}F.forEach((i,p)=>{const l=n[p],f=a.padding+l.start*I,x=a.padding+l.end*I,y=(f+x)/2;p>0&&t.append("line").attr("x1",f).attr("x2",f).attr("y1",a.padding).attr("y2",b-a.padding).attr("stroke","#000").attr("stroke-width",1).attr("stroke-dasharray","5 5").attr("opacity",.8),t.append("text").attr("class","wardley-stage-label").attr("x",y).attr("y",b-a.padding/1.5).attr("fill",d.axisTextColor).attr("font-size",a.axisFontSize-2).attr("text-anchor","middle").text(i)})}if(a.showGrid){const t=v.append("g").attr("class","wardley-grid");for(let s=1;s<4;s++){const n=s/4,i=a.padding+I*n;t.append("line").attr("x1",i).attr("x2",i).attr("y1",a.padding).attr("y2",b-a.padding).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6"),t.append("line").attr("x1",a.padding).attr("x2",S-a.padding).attr("y1",b-a.padding-B*n).attr("y2",b-a.padding-B*n).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6")}}const c=new Map;if(g.nodes.forEach(t=>{c.set(t.id,{x:z(t.x),y:L(t.y),node:t})}),g.pipelines.length>0){const t=v.append("g").attr("class","wardley-pipelines"),s=v.append("g").attr("class","wardley-pipeline-links");g.pipelines.forEach(n=>{if(n.componentIds.length===0)return;const i=n.componentIds.map(x=>({id:x,pos:c.get(x),node:g.nodes.find(y=>y.id===x)})).filter(x=>x.pos&&x.node).sort((x,y)=>x.node.x-y.node.x);for(let x=0;x<i.length-1;x++){const y=i[x],m=i[x+1];s.append("line").attr("class","wardley-pipeline-evolution-link").attr("x1",y.pos.x).attr("y1",y.pos.y).attr("x2",m.pos.x).attr("y2",m.pos.y).attr("stroke",d.linkStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4")}let p=1/0,l=-1/0,f=0;if(n.componentIds.forEach(x=>{const y=c.get(x);y&&(p=Math.min(p,y.x),l=Math.max(l,y.x),f=y.y)}),p!==1/0&&l!==-1/0){const y=a.nodeRadius*4,m=f-y/2,P=c.get(n.nodeId);if(P){const N=(p+l)/2;P.x=N,P.y=m-w/6}t.append("rect").attr("class","wardley-pipeline-box").attr("x",p-15).attr("y",m).attr("width",l-p+30).attr("height",y).attr("fill","none").attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}})}const _=v.append("g").attr("class","wardley-links"),Z=new Map;g.pipelines.forEach(t=>{Z.set(t.nodeId,new Set(t.componentIds))});const U=g.links.filter(t=>!(!c.has(t.source)||!c.has(t.target)||Z.get(t.target)?.has(t.source)));_.selectAll("line").data(U).enter().append("line").attr("class",t=>`wardley-link${t.dashed?" wardley-link--dashed":""}`).attr("x1",t=>{const s=c.get(t.source),n=c.get(t.target),p=g.nodes.find(y=>y.id===t.source).isPipelineParent?w/Math.sqrt(2):a.nodeRadius,l=n.x-s.x,f=n.y-s.y,x=Math.sqrt(l*l+f*f);return s.x+l/x*p}).attr("y1",t=>{const s=c.get(t.source),n=c.get(t.target),p=g.nodes.find(y=>y.id===t.source).isPipelineParent?w/Math.sqrt(2):a.nodeRadius,l=n.x-s.x,f=n.y-s.y,x=Math.sqrt(l*l+f*f);return s.y+f/x*p}).attr("x2",t=>{const s=c.get(t.source),n=c.get(t.target),p=g.nodes.find(y=>y.id===t.target).isPipelineParent?w/Math.sqrt(2):a.nodeRadius,l=s.x-n.x,f=s.y-n.y,x=Math.sqrt(l*l+f*f);return n.x+l/x*p}).attr("y2",t=>{const s=c.get(t.source),n=c.get(t.target),p=g.nodes.find(y=>y.id===t.target).isPipelineParent?w/Math.sqrt(2):a.nodeRadius,l=s.x-n.x,f=s.y-n.y,x=Math.sqrt(l*l+f*f);return n.y+f/x*p}).attr("stroke",d.linkStroke).attr("stroke-width",1).attr("stroke-dasharray",t=>t.dashed?"6 6":null).attr("marker-end",t=>t.flow==="forward"||t.flow==="bidirectional"?`url(#link-arrow-end-${r})`:null).attr("marker-start",t=>t.flow==="backward"||t.flow==="bidirectional"?`url(#link-arrow-start-${r})`:null),_.selectAll("text").data(U.filter(t=>t.label)).enter().append("text").attr("class","wardley-link-label").attr("x",t=>{const s=c.get(t.source),n=c.get(t.target),i=(s.x+n.x)/2,p=n.y-s.y,l=n.x-s.x,f=Math.sqrt(l*l+p*p),x=8,y=p/f;return i+y*x}).attr("y",t=>{const s=c.get(t.source),n=c.get(t.target),i=(s.y+n.y)/2,p=n.x-s.x,l=n.y-s.y,f=Math.sqrt(p*p+l*l),x=8,y=-p/f;return i+y*x}).attr("fill",d.axisTextColor).attr("font-size",a.labelFontSize).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("transform",t=>{const s=c.get(t.source),n=c.get(t.target),i=(s.x+n.x)/2,p=(s.y+n.y)/2,l=n.x-s.x,f=n.y-s.y,x=Math.sqrt(l*l+f*f),y=8,m=f/x,P=-l/x,N=i+m*y,W=p+P*y;let A=Math.atan2(f,l)*180/Math.PI;return(A>90||A<-90)&&(A+=180),`rotate(${A} ${N} ${W})`}).text(t=>t.label);const kt=v.append("g").attr("class","wardley-trends"),bt=g.trends.map(t=>{const s=c.get(t.nodeId);if(!s)return null;const n=z(t.targetX),i=L(t.targetY),p=n-s.x,l=i-s.y,f=Math.sqrt(p*p+l*l),x=a.nodeRadius+2,y=f>x?n-p/f*x:n,m=f>x?i-l/f*x:i;return{origin:s,targetX:n,targetY:i,adjustedX2:y,adjustedY2:m}}).filter(t=>t!==null);kt.selectAll("line").data(bt).enter().append("line").attr("class","wardley-trend").attr("x1",t=>t.origin.x).attr("y1",t=>t.origin.y).attr("x2",t=>t.adjustedX2).attr("y2",t=>t.adjustedY2).attr("stroke",d.evolutionStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4").attr("marker-end",`url(#arrow-${r})`);const M=v.append("g").attr("class","wardley-nodes").selectAll("g").data(g.nodes).enter().append("g").attr("class",t=>["wardley-node",t.className?`wardley-node--${t.className}`:""].filter(Boolean).join(" "));M.filter(t=>t.sourceStrategy==="outsource").append("circle").attr("class","wardley-outsource-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",a.nodeRadius*2).attr("fill","#666").attr("stroke",d.componentStroke).attr("stroke-width",1),M.filter(t=>t.sourceStrategy==="buy").append("circle").attr("class","wardley-buy-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",a.nodeRadius*2).attr("fill","#ccc").attr("stroke",d.componentStroke).attr("stroke-width",1),M.filter(t=>t.sourceStrategy==="build").append("circle").attr("class","wardley-build-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",a.nodeRadius*2).attr("fill","#eee").attr("stroke","#000").attr("stroke-width",1);const T=M.filter(t=>t.sourceStrategy==="market");T.append("circle").attr("class","wardley-market-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",a.nodeRadius*2).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",1),M.filter(t=>!t.isPipelineParent&&t.sourceStrategy!=="market"&&t.className!=="anchor").append("circle").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",a.nodeRadius).attr("fill",d.componentFill).attr("stroke",d.componentStroke).attr("stroke-width",1);const H=a.nodeRadius*.7,$=a.nodeRadius*1.2;if(T.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x).attr("y1",t=>c.get(t.id).y-$).attr("x2",t=>c.get(t.id).x-$*Math.cos(Math.PI/6)).attr("y2",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),T.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x-$*Math.cos(Math.PI/6)).attr("y1",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("x2",t=>c.get(t.id).x+$*Math.cos(Math.PI/6)).attr("y2",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),T.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x+$*Math.cos(Math.PI/6)).attr("y1",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("x2",t=>c.get(t.id).x).attr("y2",t=>c.get(t.id).y-$).attr("stroke",d.componentStroke).attr("stroke-width",1),T.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y-$).attr("r",H).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),T.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x-$*Math.cos(Math.PI/6)).attr("cy",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("r",H).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),T.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x+$*Math.cos(Math.PI/6)).attr("cy",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("r",H).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),M.filter(t=>t.isPipelineParent===!0).append("rect").attr("x",t=>c.get(t.id).x-w/2).attr("y",t=>c.get(t.id).y-w/2).attr("width",w).attr("height",w).attr("fill",d.componentFill).attr("stroke",d.componentStroke).attr("stroke-width",1),M.filter(t=>t.inertia===!0).append("line").attr("class","wardley-inertia").attr("x1",t=>{const s=c.get(t.id);let n=t.isPipelineParent?w/2+15:a.nodeRadius+15;return t.sourceStrategy&&(n+=a.nodeRadius+10),s.x+n}).attr("y1",t=>{const s=c.get(t.id),n=t.isPipelineParent?w:a.nodeRadius*2;return s.y-n/2}).attr("x2",t=>{const s=c.get(t.id);let n=t.isPipelineParent?w/2+15:a.nodeRadius+15;return t.sourceStrategy&&(n+=a.nodeRadius+10),s.x+n}).attr("y2",t=>{const s=c.get(t.id),n=t.isPipelineParent?w:a.nodeRadius*2;return s.y+n/2}).attr("stroke",d.componentStroke).attr("stroke-width",6),M.append("text").attr("x",t=>{const s=c.get(t.id);if(t.className==="anchor")return t.labelOffsetX!==void 0?s.x+t.labelOffsetX:s.x;let n=a.nodeLabelOffset;t.sourceStrategy&&t.labelOffsetX===void 0&&(n+=10);const i=t.labelOffsetX??n;return s.x+i}).attr("y",t=>{const s=c.get(t.id);if(t.className==="anchor")return t.labelOffsetY!==void 0?s.y+t.labelOffsetY:s.y-3;let n=-a.nodeLabelOffset;t.sourceStrategy&&t.labelOffsetY===void 0&&(n-=10);const i=t.labelOffsetY??n;return s.y+i}).attr("class","wardley-node-label").attr("fill",t=>t.className==="evolved"?d.evolutionStroke:t.className==="anchor"?"#000":d.componentLabelColor).attr("font-size",a.labelFontSize).attr("font-weight",t=>t.className==="anchor"?"bold":"normal").attr("text-anchor",t=>t.className==="anchor"?"middle":"start").attr("dominant-baseline",t=>t.className==="anchor"?"middle":"auto").text(t=>t.label),g.annotations.length>0){const t=v.append("g").attr("class","wardley-annotations");if(g.annotations.forEach(s=>{const n=s.coordinates.map(i=>({x:z(i.x),y:L(i.y)}));if(n.length>1)for(let i=0;i<n.length-1;i++)t.append("line").attr("class","wardley-annotation-line").attr("x1",n[i].x).attr("y1",n[i].y).attr("x2",n[i+1].x).attr("y2",n[i+1].y).attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("stroke-dasharray","4 4");n.forEach(i=>{const p=t.append("g").attr("class","wardley-annotation");p.append("circle").attr("cx",i.x).attr("cy",i.y).attr("r",10).attr("fill","white").attr("stroke",d.axisColor).attr("stroke-width",1.5),p.append("text").attr("x",i.x).attr("y",i.y).attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-size",10).attr("fill",d.axisTextColor).attr("font-weight","bold").text(s.number)})}),g.annotationsBox){let s=z(g.annotationsBox.x),n=L(g.annotationsBox.y);const i=10,p=16,l=11,f=t.append("g").attr("class","wardley-annotations-box"),x=[...g.annotations].filter(m=>m.text).sort((m,P)=>m.number-P.number),y=[];if(x.forEach((m,P)=>{const N=f.append("text").attr("x",s+i).attr("y",n+i+(P+1)*p).attr("font-size",l).attr("fill",d.axisTextColor).attr("text-anchor","start").attr("dominant-baseline","middle").text(`${m.number}. ${m.text}`);y.push(N)}),y.length>0){let m=0,P=0;y.forEach(j=>{const D=j.node(),Ct=D.getComputedTextLength();m=Math.max(m,Ct);const St=D.getBBox();P=Math.max(P,St.height)});const N=m+i*2+105,W=x.length*p+i*2+P/2,A=a.padding,$t=S-a.padding-N,vt=a.padding,Pt=b-a.padding-W;s=Math.max(A,Math.min(s,$t)),n=Math.max(vt,Math.min(n,Pt)),y.forEach((j,D)=>{j.attr("x",s+i).attr("y",n+i+(D+1)*p)}),f.insert("rect","text").attr("x",s).attr("y",n).attr("width",N).attr("height",W).attr("fill","white").attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}}}if(g.notes.length>0){const t=v.append("g").attr("class","wardley-notes");g.notes.forEach(s=>{const n=z(s.x),i=L(s.y);t.append("text").attr("x",n).attr("y",i).attr("text-anchor","start").attr("font-size",11).attr("fill",d.axisTextColor).attr("font-weight","bold").text(s.text)})}if(g.accelerators.length>0){const t=v.append("g").attr("class","wardley-accelerators");g.accelerators.forEach(s=>{const n=z(s.x),i=L(s.y),p=60,l=30,f=20,x=`
|
|
3
3
|
M ${n} ${i-l/2}
|
|
4
4
|
L ${n+p-f} ${i-l/2}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as St,br as x,bz as Rt,bt as wt,b as It,bv as g}from"./DXyyWeag.js";import{bs as Pt,ca as I,aD as t,c9 as s,bn as kt,bH as M,bV as V,aA as F}from"./DYhIMPy1.js";import{b as vt}from"./BaIAhI85.js";import{Iy as l,eu as Ut,ev as At,ss as Bt,nZ as xt,n_ as Ft,J3 as _t,Jk as Lt,J8 as Tt,o2 as _}from"./D5ej8a-y.js";import{b7 as Dt}from"./
|
|
1
|
+
import{t as St,br as x,bz as Rt,bt as wt,b as It,bv as g}from"./DXyyWeag.js";import{bs as Pt,ca as I,aD as t,c9 as s,bn as kt,bH as M,bV as V,aA as F}from"./DYhIMPy1.js";import{b as vt}from"./BaIAhI85.js";import{Iy as l,eu as Ut,ev as At,ss as Bt,nZ as xt,n_ as Ft,J3 as _t,Jk as Lt,J8 as Tt,o2 as _}from"./D5ej8a-y.js";import{b7 as Dt}from"./Bip3iRY7.js";import{g as Wt}from"./DfN8_dcw.js";import{dr as Et,bA as Gt,bC as Mt,bz as Vt,bE as zt,c$ as Nt,f as Ht}from"./D3QcPFoL.js";import{C as Jt}from"./0tj_yJAd.js";import{V as qt}from"./D11z_ckk.js";import{bR as Zt,bL as jt,b6 as Kt}from"./CqAUygYd.js";import{i as L,n as z}from"./H2jLkRRS.js";import{ae as Ot}from"./CfcPGi-s.js";function Qt(T,$){if(new.target)return St({component:Qt,...T});Pt($,!0);const N=()=>g(at,"$gitRoots$",c),y=()=>g(ot,"$workspace",c),H=()=>g(nt,"$ftCommits$",c),J=()=>g(lt,"$rootGitRoots$",c),b=()=>g(st,"$ftChanges$",c),q=()=>g(tt,"$foldUnchanged",c),Z=()=>g(Y,"$lineWrapping",c),j=()=>g(et,"$diffSideBySide",c),K=()=>g(rt,"$ftLoading$",c),O=()=>g(it,"$ftBoundarySha$",c),[c,Q]=wt(),X=o=>{qt(o,{embedded:!0,showExpand:!0,get expanded(){return t(R)},onToggleExpand:()=>{M(R,!t(R)),t(R)?t(w)?.expandAll():t(w)?.collapseAll()},get foldEnabled(){return q()},onToggleFold:()=>l.dispatch(Tt()),get wrapEnabled(){return Z()},onToggleWrap:()=>l.dispatch(Lt()),get splitEnabled(){return j()},onToggleSplit:()=>l.dispatch(_t())})},Y=Zt(),tt=jt(),et=Kt();let P=x($,"tab",7),m=x($,"workspaceId",7),C=x($,"isActive",7);const D=Wt(),p=Dt(()=>m()),ot=Et(p);I(()=>{const o=m();if(!(!C()||!o||t(n)))return l.dispatch(Ut(o,"all")),()=>l.dispatch(At(o,"all"))});const n=s(()=>P().data?.gitRootId||""),at=Ot(p),S=s(()=>N().find(o=>o.id===t(n))),h=s(()=>y()?.worktreePath||y()?.repositoryPath||""),k=s(()=>t(S)?.path||t(h)),st=Gt(p),nt=Mt(p),it=Vt(p),rt=zt(p),dt=s(()=>H()||[]),lt=Nt(p),f=s(()=>J()[t(n)]??Ht),ct=s(()=>t(f).status),gt=s(()=>t(f).loading),mt=s(()=>t(f).commitFiles),ut=s(()=>{const o=t(S)?.registeredCommitSha,i=o?t(f).commits.findIndex(e=>e.hash===o):-1;return i>=0?t(f).commits.slice(0,i):t(f).commits});I(()=>{const o=m(),i=t(n);o&&i&&l.dispatch(Bt(o,i,t(S)?.registeredCommitSha,100))});let R=V(!0),w=V(null);const pt=s(()=>{if(t(n))return[...(t(ct)?.files??[]).map(e=>({filePath:`${t(k)}/${e.path}`,action:"modify",additions:e.additions??0,deletions:e.deletions??0,toolName:"local",toolCallId:`root-${t(n)}-${e.staged}-${e.path}`,staged:e.staged,category:e.staged?"staged":"unstaged"})),...t(ut).flatMap(e=>(t(mt)[e.hash]??[]).map(a=>({filePath:`${t(k)}/${a.path}`,action:"modify",additions:a.additions??0,deletions:a.deletions??0,toolName:"local",toolCallId:`root-commit-${e.hash}-${a.path}`,staged:!1,category:"committed",commitHash:e.hash,commitMessage:e.message})))];const o=b().filter(e=>e.stage==="unstaged"),i=b().filter(e=>e.stage==="staged");return[...o.map(e=>{const a=e.file||e.relativePath,r=a&&L(a)?a:`${t(h)}/${a}`;return{filePath:r,action:"modify",additions:e.stats?.additions||0,deletions:e.stats?.deletions||0,toolName:"local",toolCallId:`local-unstaged-${r}`,staged:!1,category:"unstaged",oldContent:e.content?.oldContent,newContent:e.content?.newContent,gitlink:e.gitlink}}),...i.map(e=>{const a=e.file||e.relativePath,r=a&&L(a)?a:`${t(h)}/${a}`;return{filePath:r,action:"modify",additions:e.stats?.additions||0,deletions:e.stats?.deletions||0,toolName:"local",toolCallId:`local-staged-${r}`,staged:!0,category:"staged",oldContent:e.content?.oldContent,newContent:e.content?.newContent,gitlink:e.gitlink}}),...t(dt).flatMap(e=>(e.files||[]).map(a=>{const r=typeof a=="string"?a:a.path||"",U=r&&L(r)?r:`${t(h)}/${r}`,A=typeof a=="string"?0:a.additions||0,B=typeof a=="string"?0:a.deletions||0;return{filePath:U,action:"modify",additions:A,deletions:B,toolName:"local",toolCallId:`commit-${e.hash}-${r}`,staged:!1,category:"committed",commitHash:e.hash,commitMessage:e.message}}))]});function v(o){if(!t(h))return o;const i=z(o),e=z(t(h));return i.startsWith(`${e}/`)?i.slice(e.length+1):o}function W(o){l.dispatch(_(m(),crypto.randomUUID(),{kind:"stage",paths:o.map(v),source:"localChanges"}))}function E(o){l.dispatch(_(m(),crypto.randomUUID(),{kind:"unstage",paths:o.map(v),source:"localChanges"}))}function ht(o){l.dispatch(_(m(),crypto.randomUUID(),{kind:"discard",paths:o.map(v),source:"localChanges"}))}I(()=>{!D||!C()||D.registerActions({display:X})});const G=crypto.randomUUID();I(()=>{const o=m();if(!(!(C()&&t(n))||!o))return l.dispatch(xt(o,G)),()=>l.dispatch(Ft(o,G))});var ft={get tab(){return P()},set tab(o){P(o),F()},get workspaceId(){return m()},set workspaceId(o){m(o),F()},get isActive(){return C()},set isActive(o){C(o),F()},$set:Rt,$on:(o,i)=>It($,o,i)};{let o=s(()=>t(n)?t(gt):K()),i=s(()=>t(n)||void 0),e=s(()=>t(n)?t(k):void 0),a=s(()=>y()?.baseRef??null),r=s(()=>t(n)?t(S)?.registeredCommitSha||null:O()||y()?.baseCommitSha||null),U=s(()=>!t(n)),A=s(()=>t(n)?void 0:d=>void W([d])),B=s(()=>t(n)?void 0:d=>void E([d])),Ct=s(()=>t(n)?void 0:d=>void ht([d])),yt=s(()=>t(n)?void 0:()=>{const d=b().filter(u=>u.stage==="unstaged");W(d.map(u=>u.relativePath||u.file))}),bt=s(()=>t(n)?void 0:()=>{const d=b().filter(u=>u.stage==="staged");E(d.map(u=>u.relativePath||u.file))});vt(Jt(T,{get isLoading(){return t(o)},get changes(){return t(pt)},get gitRootId(){return t(i)},get gitRootPath(){return t(e)},get branchBaseRef(){return t(a)},get branchBaseCommitSha(){return t(r)},get showStagingControls(){return t(U)},showCategoryFilter:!0,get onStage(){return t(A)},get onUnstage(){return t(B)},get onRevert(){return t(Ct)},get onStageAll(){return t(yt)},get onUnstageAll(){return t(bt)}}),d=>M(w,d,!0),()=>t(w))}var $t=kt(ft);return Q(),$t}export{Qt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as Fe,br as X,a_ as K,bp as M,bz as je,b as Ge,bv as ze,bt as rt,bu as kt}from"./DXyyWeag.js";import{bs as Ne,bj as bt,a5 as u,bA as c,b_ as k,W as a,bn as qe,aA as J,ay as R,bS as n,aD as e,aB as m,c9 as $,c5 as Be,ca as yt,bk as st,bH as Pe,bV as Oe,a7 as fe,be as $e,b$ as xe,bO as O,bl as Ae}from"./DYhIMPy1.js";import{G as ot}from"./DyvrH0mm.js";import{u as Ee,v as Je,j as Qe,n as Ie,i as Ye}from"./CjaOLL1c.js";import{c as P}from"./CnVt0JNG.js";import{P as He,h as Me,i as Se,g as We}from"./DT4bpJWb.js";import{B as At,t as T,E as Ze,d as Pt}from"./CX_KiszT.js";import{f as Ce}from"./Bfr1QjPr.js";import{C as Tt}from"./Dqm94Bm7.js";import"./B0gQeWRk.js";import{Iy as ke,fi as Rt,Eu as nt,CU as it,px as It}from"./D5ej8a-y.js";import{aO as lt,aL as zt,aM as Dt,dt as Lt}from"./D3QcPFoL.js";import{d as Et,r as Ht}from"./Bl3ku6zY.js";import{M as Mt}from"./BnOitAd5.js";import{k as St}from"./DqN3eEdL.js";import{e as et}from"./_RTfq0v6.js";import{T as Wt,e as Ct}from"./BLvT7caV.js";import{o as Bt}from"./DI_OiaCT.js";import{S as De}from"./4NMrKcis.js";import{F as Le,_ as Ot,c_ as Ft,as as jt,bj as Gt}from"./BTdkHPOB.js";var Nt=m('<div class="space-y-3"><!> <!></div>'),qt=m('<div class="space-y-3"><!> <!></div> <!>',1),Ut=m('<div class="space-y-3 rounded-xl border border-border p-4 shadow-xs"><div class="flex items-center gap-3"><!><!></div> <!> <div class="flex items-center justify-between pt-1"><!><!></div></div>'),Vt=m('<div class="min-w-0 space-y-3"><div class="flex h-10 items-center px-2"><!></div> <!></div>'),Kt=m('<div class="grid grid-cols-[repeat(auto-fit,minmax(min(100%,10rem),1fr))] gap-3 px-1"></div>'),Xt=m('<div class="flex h-10 items-center px-3"><!></div>'),Jt=m("<div><!> <!> <!> <!></div>"),Qt=m("<!> <!>",1),Yt=m('<div role="status" class="min-h-0 min-w-0 flex-1 overflow-hidden svelte-kmeefs" data-home-loading=""><div aria-hidden="true"><!></div></div>');function dt(b,l){if(new.target)return Fe({component:dt,...b});Ne(l,!0);const Q=At();bt(Q.cleanup);let D=X(l,"detail",7,!1),F=X(l,"count",7,5),Y=X(l,"view",7,"list"),Z=X(l,"grouped",7,!1),s=X(l,"rows",7,"workspace");var L={get detail(){return D()},set detail(i=!1){D(i),J()},get count(){return F()},set count(i=5){F(i),J()},get view(){return Y()},set view(i="list"){Y(i),J()},get grouped(){return Z()},set grouped(i=!1){Z(i),J()},get rows(){return s()},set rows(i="workspace"){s(i),J()},$set:je,$on:(i,I)=>Ge(l,i,I)},y=Yt(),ie=u(y),be=u(ie);{var le=i=>{var I=qt(),g=R(I),ee=u(g);T(ee,{class:"h-6 w-4/5"});var S=n(ee,2);T(S,{class:"h-4 w-1/2"}),c(g);var d=n(g,2);Ie(d,16,()=>[0,1],h=>h,(h,A)=>{var x=Nt(),te=u(x);T(te,{class:"h-3 w-full"});var j=n(te,2);T(j,{class:"h-3 w-5/6"}),c(x),a(h,x)}),a(i,I)},Te=i=>{var I=Kt();Ie(I,20,()=>[0,1,2],g=>g,(g,ee)=>{var S=Vt(),d=u(S),h=u(d);T(h,{class:"h-3 w-20"}),c(d);var A=n(d,2);Ie(A,16,()=>[0,1,2],x=>x,(x,te)=>{var j=Ut(),de=u(j),ae=u(de);T(ae,{class:"h-4 flex-1"});var ce=n(ae);T(ce,{class:"size-3 rounded-full"}),c(de);var t=n(de,2);T(t,{class:"h-3 w-full"});var o=n(t,2),w=u(o);T(w,{class:"size-4 rounded-sm"});var G=n(w);T(G,{class:"h-3 w-6"}),c(o),c(j),a(x,j)}),c(S),a(g,S)}),c(I),a(i,I)},_e=i=>{var I=Qt(),g=R(I);{var ee=d=>{var h=Xt(),A=u(h);T(A,{class:"h-3 w-20"}),c(h),a(d,h)};K(g,d=>{Z()&&d(ee)})}var S=n(g,2);Ie(S,16,()=>Array.from({length:F()},(d,h)=>h),d=>d,(d,h)=>{var A=Jt(),x=u(A);T(x,{class:"size-4 shrink-0 rounded-sm"});var te=n(x,2);T(te,{class:"h-4 min-w-0 flex-1"});var j=n(te,2);{var de=o=>{T(o,{class:"size-3 shrink-0 rounded-full"})},ae=o=>{T(o,{class:"size-5 shrink-0 rounded-full"})};K(j,o=>{s()==="workspace"?o(de):s()==="integration"&&o(ae,1)})}var ce=n(j,2);{var t=o=>{{let w=$(()=>s()==="workspace"?"h-3 w-8 shrink-0":"h-3 w-6 shrink-0");T(o,{get class(){return e(w)}})}};K(ce,o=>{s()!=="compact"&&o(t)})}c(A),k(()=>Je(A,1,Qe(s()==="compact"?"flex min-h-6 items-center gap-2 py-1":`flex h-12 items-center gap-3 border-b border-border ${s()==="integration"?"px-2":"px-3"}`))),a(d,A)}),a(i,I)};K(be,i=>{D()?i(le):Y()==="board"?i(Te,1):i(_e,-1)})}return c(ie),c(y),k(i=>{Ee(y,"aria-label",i),Ee(y,"data-reduced",Q.current),Je(ie,1,Qe(D()?"space-y-6 py-3":s()==="compact"?"":"px-5 pb-4"))},[()=>M.home_integrations_loading()]),a(b,y),qe(L)}function ct(b){return b.filter(Et)}function Zt(){let b=null;return(l,Q)=>{const D=b?l.find(Y=>Y.id===b):void 0;if(D)return D;const F=Ht(l);return b=Q&&F?String(F.id):null,F}}function ea(b,l,Q){return l&&b.find(D=>D.id===l)||Q}var ta=m('<div class="p-4"><!></div>'),aa=m('<div class="flex h-full min-h-0 min-w-0 flex-col" data-home-workspace-chat=""><!></div>');function vt(b,l){if(new.target)return Fe({component:vt,...b});Ne(l,!0);const Q=()=>ze(ie,"$agents$",F),D=()=>ze(be,"$loaded$",F),[F,Y]=rt();let Z=X(l,"workspace",7),s=X(l,"preview",7,!1),L=X(l,"agent",7);const y=Be(()=>Z().id),ie=lt(y),be=zt(y),le=$(()=>ct(Q())),Te=$(()=>s()?void 0:L()?.id);yt(()=>{const t=e(Te);if(!t)return;const o=Date.now();return()=>{Date.now()-o<Mt||setTimeout(()=>ke.dispatch(Rt(t)),0)}});let _e=Oe(void 0),i=0;function I(t,o){s()||!e(le).some(w=>w.id===t)||(Pe(_e,{agentId:t,questionMessageId:o,requestId:++i},!0),ke.dispatch(nt(y,t)),ke.dispatch(it(y,t)))}let g=Oe(!1),ee;function S(){s()||(Pe(g,!1),clearTimeout(ee),ke.dispatch(It(y)),ee=setTimeout(()=>{Pe(g,!0)},15e3))}st(()=>(s()||S(),()=>clearTimeout(ee)));var d={focusAttention:I,get workspace(){return Z()},set workspace(t){Z(t),J()},get preview(){return s()},set preview(t=!1){s(t),J()},get agent(){return L()},set agent(t){L(t),J()},$set:je,$on:(t,o)=>Ge(l,t,o)},h=aa(),A=u(h);{var x=t=>{Ze(t,{density:"compact",title:w=>{$e();var G=xe();k(re=>O(G,re),[()=>M.agentOverview_hierarchyGraph_noAgents_title()]),a(w,G)},$$slots:{title:!0}})},te=t=>{var o=fe(),w=R(o);ot(w,()=>L().id,G=>{{let re=$(()=>e(_e)?.agentId===L().id?e(_e):void 0);Tt(G,{get workspace(){return Z()},get agentId(){return L().id},get agentName(){return L().name},autoFocus:!1,get attentionFocusRequest(){return e(re)},isInitialWorkspaceAgent:!1})}}),a(t,o)},j=t=>{var o=ta(),w=u(o);dt(w,{detail:!0}),c(o),a(t,o)},de=t=>{{const o=G=>{$e();var re=xe();k(ye=>O(re,ye),[()=>M.home_detail_unavailable()]),a(G,re)};let w=$(()=>M.home_retry());Pt(t,{density:"compact",get retryLabel(){return e(w)},onRetry:S,message:o,$$slots:{message:!0}})}},ae=t=>{{const o=G=>{$e();var re=xe();k(ye=>O(re,ye),[()=>M.agentOverview_hierarchyGraph_noAgents_title()]),a(G,re)};let w=$(()=>M.home_retry());Ze(t,{density:"compact",get actionLabel(){return e(w)},onAction:S,title:o,$$slots:{title:!0}})}};K(A,t=>{s()?t(x):L()?t(te,1):!D()&&!e(g)?t(j,2):D()?t(ae,-1):t(de,3)})}c(h),k(()=>Ee(h,"data-workspace-link-target",Z().id)),a(b,h);var ce=qe(d);return Y(),ce}var ra=m('<span class="min-w-0 line-clamp-2 [overflow-wrap:anywhere]"> </span> <!>',1),tt=m("<!> <!>",1),sa=m('<div class="shrink-0"><!></div>'),oa=m('<div><!> <span class="home-detail-repository-name truncate"> </span></div>'),at=m("<!><!>",1),na=m("<p> </p>"),ia=m('<!> <span class="min-w-0 truncate text-left"> </span> <!>',1),la=m('<span class="flex min-w-0 items-center gap-2"><!> <span class="truncate"> </span></span>'),da=m('<div class="shrink-0 min-w-0 px-1 py-2" data-home-agent-switcher=""><!></div>'),ca=m('<div class="flex items-center gap-2 px-4 py-2 type-caption text-muted-foreground" role="status"><p> </p> <!></div>'),va=m('<section class="flex h-full min-h-0 min-w-0 flex-col" data-home-detail=""><header class="shrink-0 border-b border-border px-4 py-2"><div class="flex min-w-0 items-center gap-3"><h2 class="-ml-2 min-w-0 flex-1"><!></h2> <!></div> <!> <!></header> <!> <!> <div class="min-h-0 min-w-0 flex-1"><!></div></section>');function ua(b,l){if(new.target)return Fe({component:ua,...b});Ne(l,!0);const Q=()=>ze(_e,"$readRevision$",Y),D=()=>ze(Te,"$agents$",Y),F=()=>ze(I,"$pickedId$",Y),[Y,Z]=rt();let s=X(l,"workspace",7),L=X(l,"onclose",7),y=X(l,"preview",7,!1),ie=X(l,"showBackToList",7,!0);const be=$(()=>s().title.trim()?s().title:M.workspace_links_untitled_label()),le=Be(()=>s().id),Te=lt(le),_e=Dt(le),i=Be(()=>Q()),I=Wt(le),g=$(()=>ct(D())),ee=Zt(),S=$(()=>ee(e(g),Q()>i)),d=$(()=>ea(e(g),F(),e(S)));function h(r){ke.dispatch(nt(le,r)),ke.dispatch(it(le,r))}const A=$(()=>[s().repositoryOwner,s().repositoryName].filter(Boolean).join("/")||s().repositoryPath);let x=Oe(!1);async function te(){Pe(x,!1);try{await Ct(s().id),Pe(x,!Lt.select(ke.state,s().id))}catch{Pe(x,!0)}}st(()=>{y()||te()});function j(){Bt(s().id)}var de={get workspace(){return s()},set workspace(r){s(r),J()},get onclose(){return L()},set onclose(r){L(r),J()},get preview(){return y()},set preview(r=!1){y(r),J()},get showBackToList(){return ie()},set showBackToList(r=!0){ie(r),J()},$set:je,$on:(r,f)=>Ge(l,r,f)},ae=va(),ce=u(ae),t=u(ce),o=u(t),w=u(o);P(w,()=>He,(r,f)=>{f(r,{children:(N,oe)=>{var q=fe(),W=R(q);P(W,()=>Me,(ve,E)=>{E(ve,{children:(U,ge)=>{var me=tt(),ne=R(me);{const C=(H,B)=>{let z=()=>(B?.()).props;{let v=$(()=>M.home_open_workspace());Ce(H,kt(z,{variant:"ghost",class:"type-title h-auto min-w-0 max-w-full shrink gap-2 justify-start whitespace-normal px-2 py-1 text-left font-medium leading-snug",wrapContent:!1,get"aria-label"(){return e(v)},onclick:j,children:(p,V)=>{var _=ra(),se=R(_),ue=Ae(se,!0),we=n(se,2);Le(we,{get icon(){return Ot},class:"shrink-0 text-muted-foreground",size:"sm"}),k(()=>O(ue,e(be))),a(p,_)},$$slots:{default:!0}}))}};P(ne,()=>Se,(H,B)=>{B(H,{child:C,$$slots:{child:!0}})})}var he=n(ne,2);P(he,()=>We,(C,H)=>{H(C,{children:(B,z)=>{$e();var v=xe();k(()=>O(v,e(be))),a(B,v)},$$slots:{default:!0}})}),a(U,me)},$$slots:{default:!0}})}),a(N,q)},$$slots:{default:!0}})}),c(o);var G=n(o,2);{var re=r=>{var f=sa(),N=u(f);{let oe=$(()=>M.home_close_preview()),q=$(()=>M.home_close_preview());Ce(N,{variant:"ghost",size:"icon-sm",get"aria-label"(){return e(oe)},get tooltip(){return e(q)},get onclick(){return L()},children:(W,ve)=>{Le(W,{get icon(){return Ft}})},$$slots:{default:!0}})}c(f),a(r,f)};K(G,r=>{ie()&&r(re)})}c(t);var ye=n(t,2);{var ut=r=>{var f=fe(),N=R(f);P(N,()=>He,(oe,q)=>{q(oe,{children:(W,ve)=>{var E=fe(),U=R(E);P(U,()=>Me,(ge,me)=>{me(ge,{children:(ne,he)=>{var C=at(),H=R(C);{const z=(v,p)=>{let V=()=>(p?.()).props;var _=oa();Ye(_,()=>({...V(),class:"mb-1 flex min-w-0 max-w-[min(100%,16rem)] items-center gap-1.5 type-caption text-muted-foreground","data-home-detail-repository":!0,"aria-label":e(A)}));var se=u(_);{var ue=pe=>{St(pe,{get identity(){return s().repositoryOwner},size:16,class:"shrink-0 rounded-sm"})},we=pe=>{Le(pe,{get icon(){return Gt}})};K(se,pe=>{s().repositoryOwner?pe(ue):pe(we,-1)})}var Xe=n(se,2),Re=Ae(Xe,!0);c(_),k(()=>O(Re,e(A))),a(v,_)};P(H,()=>Se,(v,p)=>{p(v,{child:z,$$slots:{child:!0}})})}var B=n(H);P(B,()=>We,(z,v)=>{v(z,{children:(p,V)=>{$e();var _=xe();k(()=>O(_,e(A))),a(p,_)},$$slots:{default:!0}})}),a(ne,C)},$$slots:{default:!0}})}),a(W,E)},$$slots:{default:!0}})}),a(r,f)};K(ye,r=>{e(A)&&r(ut)})}var pt=n(ye,2);{var mt=r=>{var f=fe(),N=R(f);P(N,()=>He,(oe,q)=>{q(oe,{children:(W,ve)=>{var E=fe(),U=R(E);P(U,()=>Me,(ge,me)=>{me(ge,{children:(ne,he)=>{var C=at(),H=R(C);{const z=(v,p)=>{let V=()=>(p?.()).props;var _=na();Ye(_,()=>({...V(),class:"type-caption line-clamp-2 break-words leading-snug text-muted-foreground"}));var se=Ae(_,!0);k(()=>O(se,s().statusMessage)),a(v,_)};P(H,()=>Se,(v,p)=>{p(v,{child:z,$$slots:{child:!0}})})}var B=n(H);P(B,()=>We,(z,v)=>{v(z,{children:(p,V)=>{$e();var _=xe();k(()=>O(_,s().statusMessage)),a(p,_)},$$slots:{default:!0}})}),a(ne,C)},$$slots:{default:!0}})}),a(W,E)},$$slots:{default:!0}})}),a(r,f)};K(pt,r=>{s().statusMessage&&r(mt)})}c(ce);var Ue=n(ce,2);{var ft=r=>{var f=da(),N=u(f);{let oe=$(()=>e(d)?.id??"");P(N,()=>De.Root,(q,W)=>{W(q,{get value(){return e(oe)},onchange:ve=>{const E=e(g).find(U=>U.id===ve);E&&h(E.id)},children:(ve,E)=>{var U=tt(),ge=R(U);{let ne=$(()=>M.home_agents());P(ge,()=>De.Trigger,(he,C)=>{C(he,{variant:"ghost",class:"h-8 w-fit max-w-full justify-start",get"aria-label"(){return e(ne)},children:(H,B)=>{var z=ia(),v=R(z);{var p=ue=>{{let we=$(()=>e(d).metadata?.specialist??e(d).agentMetadata?.specialist);et(ue,{get agentId(){return e(d).id},get specialist(){return e(we)},variant:"emphasized"})}};K(v,ue=>{e(d)&&ue(p)})}var V=n(v,2),_=Ae(V,!0),se=n(V,2);Le(se,{get icon(){return jt},class:"shrink-0 text-muted-foreground"}),k(()=>O(_,e(d)?.name)),a(H,z)},$$slots:{default:!0}})})}var me=n(ge,2);P(me,()=>De.Content,(ne,he)=>{he(ne,{portal:!0,children:(C,H)=>{var B=fe(),z=R(B);Ie(z,17,()=>e(g),v=>v.id,(v,p)=>{var V=fe(),_=R(V);P(_,()=>De.Item,(se,ue)=>{ue(se,{get value(){return e(p).id},get label(){return e(p).name},children:(we,Xe)=>{var Re=la(),pe=u(Re);{let xt=$(()=>e(p).metadata?.specialist??e(p).agentMetadata?.specialist);et(pe,{get agentId(){return e(p).id},get specialist(){return e(xt)},variant:"emphasized"})}var wt=n(pe,2),$t=Ae(wt,!0);c(Re),k(()=>O($t,e(p).name)),a(we,Re)},$$slots:{default:!0}})}),a(v,V)}),a(C,B)},$$slots:{default:!0}})}),a(ve,U)},$$slots:{default:!0}})})}c(f),a(r,f)};K(Ue,r=>{e(g).length&&r(ft)})}var Ve=n(Ue,2);{var _t=r=>{var f=ca(),N=u(f),oe=Ae(N,!0),q=n(N,2);Ce(q,{variant:"outline",size:"sm",onclick:te,children:(W,ve)=>{$e();var E=xe();k(U=>O(E,U),[()=>M.home_retry()]),a(W,E)},$$slots:{default:!0}}),c(f),k(W=>O(oe,W),[()=>M.home_detail_unavailable()]),a(r,f)};K(Ve,r=>{e(x)&&r(_t)})}var Ke=n(Ve,2),gt=u(Ke);ot(gt,()=>s().id,r=>{vt(r,{get workspace(){return s()},get preview(){return y()},get agent(){return e(d)}})}),c(Ke),c(ae),k(r=>Ee(ae,"aria-label",r),[()=>M.home_workspace_details()]),a(b,ae);var ht=qe(de);return Z(),ht}export{dt as H,ua as a};
|
|
1
|
+
import{t as Fe,br as X,a_ as K,bp as M,bz as je,b as Ge,bv as ze,bt as rt,bu as kt}from"./DXyyWeag.js";import{bs as Ne,bj as bt,a5 as u,bA as c,b_ as k,W as a,bn as qe,aA as J,ay as R,bS as n,aD as e,aB as m,c9 as $,c5 as Be,ca as yt,bk as st,bH as Pe,bV as Oe,a7 as fe,be as $e,b$ as xe,bO as O,bl as Ae}from"./DYhIMPy1.js";import{G as ot}from"./DyvrH0mm.js";import{u as Ee,v as Je,j as Qe,n as Ie,i as Ye}from"./CjaOLL1c.js";import{c as P}from"./CnVt0JNG.js";import{P as He,h as Me,i as Se,g as We}from"./DT4bpJWb.js";import{B as At,t as T,E as Ze,d as Pt}from"./CX_KiszT.js";import{f as Ce}from"./Bfr1QjPr.js";import{C as Tt}from"./CEQ56sKb.js";import"./B0gQeWRk.js";import{Iy as ke,fi as Rt,Eu as nt,CU as it,px as It}from"./D5ej8a-y.js";import{aO as lt,aL as zt,aM as Dt,dt as Lt}from"./D3QcPFoL.js";import{d as Et,r as Ht}from"./Bl3ku6zY.js";import{M as Mt}from"./BlJpnECK.js";import{k as St}from"./Bip3iRY7.js";import{e as et}from"./D3bgZo3Z.js";import{T as Wt,e as Ct}from"./B_FQfWfg.js";import{o as Bt}from"./CZ4naQ1D.js";import{S as De}from"./4NMrKcis.js";import{F as Le,_ as Ot,c_ as Ft,as as jt,bj as Gt}from"./BTdkHPOB.js";var Nt=m('<div class="space-y-3"><!> <!></div>'),qt=m('<div class="space-y-3"><!> <!></div> <!>',1),Ut=m('<div class="space-y-3 rounded-xl border border-border p-4 shadow-xs"><div class="flex items-center gap-3"><!><!></div> <!> <div class="flex items-center justify-between pt-1"><!><!></div></div>'),Vt=m('<div class="min-w-0 space-y-3"><div class="flex h-10 items-center px-2"><!></div> <!></div>'),Kt=m('<div class="grid grid-cols-[repeat(auto-fit,minmax(min(100%,10rem),1fr))] gap-3 px-1"></div>'),Xt=m('<div class="flex h-10 items-center px-3"><!></div>'),Jt=m("<div><!> <!> <!> <!></div>"),Qt=m("<!> <!>",1),Yt=m('<div role="status" class="min-h-0 min-w-0 flex-1 overflow-hidden svelte-kmeefs" data-home-loading=""><div aria-hidden="true"><!></div></div>');function dt(b,l){if(new.target)return Fe({component:dt,...b});Ne(l,!0);const Q=At();bt(Q.cleanup);let D=X(l,"detail",7,!1),F=X(l,"count",7,5),Y=X(l,"view",7,"list"),Z=X(l,"grouped",7,!1),s=X(l,"rows",7,"workspace");var L={get detail(){return D()},set detail(i=!1){D(i),J()},get count(){return F()},set count(i=5){F(i),J()},get view(){return Y()},set view(i="list"){Y(i),J()},get grouped(){return Z()},set grouped(i=!1){Z(i),J()},get rows(){return s()},set rows(i="workspace"){s(i),J()},$set:je,$on:(i,I)=>Ge(l,i,I)},y=Yt(),ie=u(y),be=u(ie);{var le=i=>{var I=qt(),g=R(I),ee=u(g);T(ee,{class:"h-6 w-4/5"});var S=n(ee,2);T(S,{class:"h-4 w-1/2"}),c(g);var d=n(g,2);Ie(d,16,()=>[0,1],h=>h,(h,A)=>{var x=Nt(),te=u(x);T(te,{class:"h-3 w-full"});var j=n(te,2);T(j,{class:"h-3 w-5/6"}),c(x),a(h,x)}),a(i,I)},Te=i=>{var I=Kt();Ie(I,20,()=>[0,1,2],g=>g,(g,ee)=>{var S=Vt(),d=u(S),h=u(d);T(h,{class:"h-3 w-20"}),c(d);var A=n(d,2);Ie(A,16,()=>[0,1,2],x=>x,(x,te)=>{var j=Ut(),de=u(j),ae=u(de);T(ae,{class:"h-4 flex-1"});var ce=n(ae);T(ce,{class:"size-3 rounded-full"}),c(de);var t=n(de,2);T(t,{class:"h-3 w-full"});var o=n(t,2),w=u(o);T(w,{class:"size-4 rounded-sm"});var G=n(w);T(G,{class:"h-3 w-6"}),c(o),c(j),a(x,j)}),c(S),a(g,S)}),c(I),a(i,I)},_e=i=>{var I=Qt(),g=R(I);{var ee=d=>{var h=Xt(),A=u(h);T(A,{class:"h-3 w-20"}),c(h),a(d,h)};K(g,d=>{Z()&&d(ee)})}var S=n(g,2);Ie(S,16,()=>Array.from({length:F()},(d,h)=>h),d=>d,(d,h)=>{var A=Jt(),x=u(A);T(x,{class:"size-4 shrink-0 rounded-sm"});var te=n(x,2);T(te,{class:"h-4 min-w-0 flex-1"});var j=n(te,2);{var de=o=>{T(o,{class:"size-3 shrink-0 rounded-full"})},ae=o=>{T(o,{class:"size-5 shrink-0 rounded-full"})};K(j,o=>{s()==="workspace"?o(de):s()==="integration"&&o(ae,1)})}var ce=n(j,2);{var t=o=>{{let w=$(()=>s()==="workspace"?"h-3 w-8 shrink-0":"h-3 w-6 shrink-0");T(o,{get class(){return e(w)}})}};K(ce,o=>{s()!=="compact"&&o(t)})}c(A),k(()=>Je(A,1,Qe(s()==="compact"?"flex min-h-6 items-center gap-2 py-1":`flex h-12 items-center gap-3 border-b border-border ${s()==="integration"?"px-2":"px-3"}`))),a(d,A)}),a(i,I)};K(be,i=>{D()?i(le):Y()==="board"?i(Te,1):i(_e,-1)})}return c(ie),c(y),k(i=>{Ee(y,"aria-label",i),Ee(y,"data-reduced",Q.current),Je(ie,1,Qe(D()?"space-y-6 py-3":s()==="compact"?"":"px-5 pb-4"))},[()=>M.home_integrations_loading()]),a(b,y),qe(L)}function ct(b){return b.filter(Et)}function Zt(){let b=null;return(l,Q)=>{const D=b?l.find(Y=>Y.id===b):void 0;if(D)return D;const F=Ht(l);return b=Q&&F?String(F.id):null,F}}function ea(b,l,Q){return l&&b.find(D=>D.id===l)||Q}var ta=m('<div class="p-4"><!></div>'),aa=m('<div class="flex h-full min-h-0 min-w-0 flex-col" data-home-workspace-chat=""><!></div>');function vt(b,l){if(new.target)return Fe({component:vt,...b});Ne(l,!0);const Q=()=>ze(ie,"$agents$",F),D=()=>ze(be,"$loaded$",F),[F,Y]=rt();let Z=X(l,"workspace",7),s=X(l,"preview",7,!1),L=X(l,"agent",7);const y=Be(()=>Z().id),ie=lt(y),be=zt(y),le=$(()=>ct(Q())),Te=$(()=>s()?void 0:L()?.id);yt(()=>{const t=e(Te);if(!t)return;const o=Date.now();return()=>{Date.now()-o<Mt||setTimeout(()=>ke.dispatch(Rt(t)),0)}});let _e=Oe(void 0),i=0;function I(t,o){s()||!e(le).some(w=>w.id===t)||(Pe(_e,{agentId:t,questionMessageId:o,requestId:++i},!0),ke.dispatch(nt(y,t)),ke.dispatch(it(y,t)))}let g=Oe(!1),ee;function S(){s()||(Pe(g,!1),clearTimeout(ee),ke.dispatch(It(y)),ee=setTimeout(()=>{Pe(g,!0)},15e3))}st(()=>(s()||S(),()=>clearTimeout(ee)));var d={focusAttention:I,get workspace(){return Z()},set workspace(t){Z(t),J()},get preview(){return s()},set preview(t=!1){s(t),J()},get agent(){return L()},set agent(t){L(t),J()},$set:je,$on:(t,o)=>Ge(l,t,o)},h=aa(),A=u(h);{var x=t=>{Ze(t,{density:"compact",title:w=>{$e();var G=xe();k(re=>O(G,re),[()=>M.agentOverview_hierarchyGraph_noAgents_title()]),a(w,G)},$$slots:{title:!0}})},te=t=>{var o=fe(),w=R(o);ot(w,()=>L().id,G=>{{let re=$(()=>e(_e)?.agentId===L().id?e(_e):void 0);Tt(G,{get workspace(){return Z()},get agentId(){return L().id},get agentName(){return L().name},autoFocus:!1,get attentionFocusRequest(){return e(re)},isInitialWorkspaceAgent:!1})}}),a(t,o)},j=t=>{var o=ta(),w=u(o);dt(w,{detail:!0}),c(o),a(t,o)},de=t=>{{const o=G=>{$e();var re=xe();k(ye=>O(re,ye),[()=>M.home_detail_unavailable()]),a(G,re)};let w=$(()=>M.home_retry());Pt(t,{density:"compact",get retryLabel(){return e(w)},onRetry:S,message:o,$$slots:{message:!0}})}},ae=t=>{{const o=G=>{$e();var re=xe();k(ye=>O(re,ye),[()=>M.agentOverview_hierarchyGraph_noAgents_title()]),a(G,re)};let w=$(()=>M.home_retry());Ze(t,{density:"compact",get actionLabel(){return e(w)},onAction:S,title:o,$$slots:{title:!0}})}};K(A,t=>{s()?t(x):L()?t(te,1):!D()&&!e(g)?t(j,2):D()?t(ae,-1):t(de,3)})}c(h),k(()=>Ee(h,"data-workspace-link-target",Z().id)),a(b,h);var ce=qe(d);return Y(),ce}var ra=m('<span class="min-w-0 line-clamp-2 [overflow-wrap:anywhere]"> </span> <!>',1),tt=m("<!> <!>",1),sa=m('<div class="shrink-0"><!></div>'),oa=m('<div><!> <span class="home-detail-repository-name truncate"> </span></div>'),at=m("<!><!>",1),na=m("<p> </p>"),ia=m('<!> <span class="min-w-0 truncate text-left"> </span> <!>',1),la=m('<span class="flex min-w-0 items-center gap-2"><!> <span class="truncate"> </span></span>'),da=m('<div class="shrink-0 min-w-0 px-1 py-2" data-home-agent-switcher=""><!></div>'),ca=m('<div class="flex items-center gap-2 px-4 py-2 type-caption text-muted-foreground" role="status"><p> </p> <!></div>'),va=m('<section class="flex h-full min-h-0 min-w-0 flex-col" data-home-detail=""><header class="shrink-0 border-b border-border px-4 py-2"><div class="flex min-w-0 items-center gap-3"><h2 class="-ml-2 min-w-0 flex-1"><!></h2> <!></div> <!> <!></header> <!> <!> <div class="min-h-0 min-w-0 flex-1"><!></div></section>');function ua(b,l){if(new.target)return Fe({component:ua,...b});Ne(l,!0);const Q=()=>ze(_e,"$readRevision$",Y),D=()=>ze(Te,"$agents$",Y),F=()=>ze(I,"$pickedId$",Y),[Y,Z]=rt();let s=X(l,"workspace",7),L=X(l,"onclose",7),y=X(l,"preview",7,!1),ie=X(l,"showBackToList",7,!0);const be=$(()=>s().title.trim()?s().title:M.workspace_links_untitled_label()),le=Be(()=>s().id),Te=lt(le),_e=Dt(le),i=Be(()=>Q()),I=Wt(le),g=$(()=>ct(D())),ee=Zt(),S=$(()=>ee(e(g),Q()>i)),d=$(()=>ea(e(g),F(),e(S)));function h(r){ke.dispatch(nt(le,r)),ke.dispatch(it(le,r))}const A=$(()=>[s().repositoryOwner,s().repositoryName].filter(Boolean).join("/")||s().repositoryPath);let x=Oe(!1);async function te(){Pe(x,!1);try{await Ct(s().id),Pe(x,!Lt.select(ke.state,s().id))}catch{Pe(x,!0)}}st(()=>{y()||te()});function j(){Bt(s().id)}var de={get workspace(){return s()},set workspace(r){s(r),J()},get onclose(){return L()},set onclose(r){L(r),J()},get preview(){return y()},set preview(r=!1){y(r),J()},get showBackToList(){return ie()},set showBackToList(r=!0){ie(r),J()},$set:je,$on:(r,f)=>Ge(l,r,f)},ae=va(),ce=u(ae),t=u(ce),o=u(t),w=u(o);P(w,()=>He,(r,f)=>{f(r,{children:(N,oe)=>{var q=fe(),W=R(q);P(W,()=>Me,(ve,E)=>{E(ve,{children:(U,ge)=>{var me=tt(),ne=R(me);{const C=(H,B)=>{let z=()=>(B?.()).props;{let v=$(()=>M.home_open_workspace());Ce(H,kt(z,{variant:"ghost",class:"type-title h-auto min-w-0 max-w-full shrink gap-2 justify-start whitespace-normal px-2 py-1 text-left font-medium leading-snug",wrapContent:!1,get"aria-label"(){return e(v)},onclick:j,children:(p,V)=>{var _=ra(),se=R(_),ue=Ae(se,!0),we=n(se,2);Le(we,{get icon(){return Ot},class:"shrink-0 text-muted-foreground",size:"sm"}),k(()=>O(ue,e(be))),a(p,_)},$$slots:{default:!0}}))}};P(ne,()=>Se,(H,B)=>{B(H,{child:C,$$slots:{child:!0}})})}var he=n(ne,2);P(he,()=>We,(C,H)=>{H(C,{children:(B,z)=>{$e();var v=xe();k(()=>O(v,e(be))),a(B,v)},$$slots:{default:!0}})}),a(U,me)},$$slots:{default:!0}})}),a(N,q)},$$slots:{default:!0}})}),c(o);var G=n(o,2);{var re=r=>{var f=sa(),N=u(f);{let oe=$(()=>M.home_close_preview()),q=$(()=>M.home_close_preview());Ce(N,{variant:"ghost",size:"icon-sm",get"aria-label"(){return e(oe)},get tooltip(){return e(q)},get onclick(){return L()},children:(W,ve)=>{Le(W,{get icon(){return Ft}})},$$slots:{default:!0}})}c(f),a(r,f)};K(G,r=>{ie()&&r(re)})}c(t);var ye=n(t,2);{var ut=r=>{var f=fe(),N=R(f);P(N,()=>He,(oe,q)=>{q(oe,{children:(W,ve)=>{var E=fe(),U=R(E);P(U,()=>Me,(ge,me)=>{me(ge,{children:(ne,he)=>{var C=at(),H=R(C);{const z=(v,p)=>{let V=()=>(p?.()).props;var _=oa();Ye(_,()=>({...V(),class:"mb-1 flex min-w-0 max-w-[min(100%,16rem)] items-center gap-1.5 type-caption text-muted-foreground","data-home-detail-repository":!0,"aria-label":e(A)}));var se=u(_);{var ue=pe=>{St(pe,{get identity(){return s().repositoryOwner},size:16,class:"shrink-0 rounded-sm"})},we=pe=>{Le(pe,{get icon(){return Gt}})};K(se,pe=>{s().repositoryOwner?pe(ue):pe(we,-1)})}var Xe=n(se,2),Re=Ae(Xe,!0);c(_),k(()=>O(Re,e(A))),a(v,_)};P(H,()=>Se,(v,p)=>{p(v,{child:z,$$slots:{child:!0}})})}var B=n(H);P(B,()=>We,(z,v)=>{v(z,{children:(p,V)=>{$e();var _=xe();k(()=>O(_,e(A))),a(p,_)},$$slots:{default:!0}})}),a(ne,C)},$$slots:{default:!0}})}),a(W,E)},$$slots:{default:!0}})}),a(r,f)};K(ye,r=>{e(A)&&r(ut)})}var pt=n(ye,2);{var mt=r=>{var f=fe(),N=R(f);P(N,()=>He,(oe,q)=>{q(oe,{children:(W,ve)=>{var E=fe(),U=R(E);P(U,()=>Me,(ge,me)=>{me(ge,{children:(ne,he)=>{var C=at(),H=R(C);{const z=(v,p)=>{let V=()=>(p?.()).props;var _=na();Ye(_,()=>({...V(),class:"type-caption line-clamp-2 break-words leading-snug text-muted-foreground"}));var se=Ae(_,!0);k(()=>O(se,s().statusMessage)),a(v,_)};P(H,()=>Se,(v,p)=>{p(v,{child:z,$$slots:{child:!0}})})}var B=n(H);P(B,()=>We,(z,v)=>{v(z,{children:(p,V)=>{$e();var _=xe();k(()=>O(_,s().statusMessage)),a(p,_)},$$slots:{default:!0}})}),a(ne,C)},$$slots:{default:!0}})}),a(W,E)},$$slots:{default:!0}})}),a(r,f)};K(pt,r=>{s().statusMessage&&r(mt)})}c(ce);var Ue=n(ce,2);{var ft=r=>{var f=da(),N=u(f);{let oe=$(()=>e(d)?.id??"");P(N,()=>De.Root,(q,W)=>{W(q,{get value(){return e(oe)},onchange:ve=>{const E=e(g).find(U=>U.id===ve);E&&h(E.id)},children:(ve,E)=>{var U=tt(),ge=R(U);{let ne=$(()=>M.home_agents());P(ge,()=>De.Trigger,(he,C)=>{C(he,{variant:"ghost",class:"h-8 w-fit max-w-full justify-start",get"aria-label"(){return e(ne)},children:(H,B)=>{var z=ia(),v=R(z);{var p=ue=>{{let we=$(()=>e(d).metadata?.specialist??e(d).agentMetadata?.specialist);et(ue,{get agentId(){return e(d).id},get specialist(){return e(we)},variant:"emphasized"})}};K(v,ue=>{e(d)&&ue(p)})}var V=n(v,2),_=Ae(V,!0),se=n(V,2);Le(se,{get icon(){return jt},class:"shrink-0 text-muted-foreground"}),k(()=>O(_,e(d)?.name)),a(H,z)},$$slots:{default:!0}})})}var me=n(ge,2);P(me,()=>De.Content,(ne,he)=>{he(ne,{portal:!0,children:(C,H)=>{var B=fe(),z=R(B);Ie(z,17,()=>e(g),v=>v.id,(v,p)=>{var V=fe(),_=R(V);P(_,()=>De.Item,(se,ue)=>{ue(se,{get value(){return e(p).id},get label(){return e(p).name},children:(we,Xe)=>{var Re=la(),pe=u(Re);{let xt=$(()=>e(p).metadata?.specialist??e(p).agentMetadata?.specialist);et(pe,{get agentId(){return e(p).id},get specialist(){return e(xt)},variant:"emphasized"})}var wt=n(pe,2),$t=Ae(wt,!0);c(Re),k(()=>O($t,e(p).name)),a(we,Re)},$$slots:{default:!0}})}),a(v,V)}),a(C,B)},$$slots:{default:!0}})}),a(ve,U)},$$slots:{default:!0}})})}c(f),a(r,f)};K(Ue,r=>{e(g).length&&r(ft)})}var Ve=n(Ue,2);{var _t=r=>{var f=ca(),N=u(f),oe=Ae(N,!0),q=n(N,2);Ce(q,{variant:"outline",size:"sm",onclick:te,children:(W,ve)=>{$e();var E=xe();k(U=>O(E,U),[()=>M.home_retry()]),a(W,E)},$$slots:{default:!0}}),c(f),k(W=>O(oe,W),[()=>M.home_detail_unavailable()]),a(r,f)};K(Ve,r=>{e(x)&&r(_t)})}var Ke=n(Ve,2),gt=u(Ke);ot(gt,()=>s().id,r=>{vt(r,{get workspace(){return s()},get preview(){return y()},get agent(){return e(d)}})}),c(Ke),c(ae),k(r=>Ee(ae,"aria-label",r),[()=>M.home_workspace_details()]),a(b,ae);var ht=qe(de);return Z(),ht}export{dt as H,ua as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as Ni}from"./
|
|
1
|
+
import{g as Ni}from"./DSWsYH8C.js";import{s as Ci}from"./m-4S75UZ.js";import{U as Zs,aZ as jt,V as Qs,a_ as Gt,Y as bi,b0 as vi,b as h,aU as je,ay as _i,X as en,a1 as xi,aP as Mi,bh as wi,aV as Ui,r as Pi,O as Di,am as Fi,W as Bi,ab as $i,aG as ji,aA as Gi,aW as Wi}from"./Cn2QoVqR.js";function Wt(s){console&&console.error&&console.error(`Error: ${s}`)}function tn(s){console&&console.warn&&console.warn(`Warning: ${s}`)}function sn(s){const e=new Date().getTime(),t=s();return{time:new Date().getTime()-e,value:t}}function nn(s){function e(){}e.prototype=s;const t=new e;function n(){return typeof t.bar}return n(),n(),s}function Ki(s){return Vi(s)?s.LABEL:s.name}function Vi(s){return typeof s.LABEL=="string"&&s.LABEL!==""}class te{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){this._definition=e}accept(e){e.visit(this),this.definition.forEach(t=>{t.accept(e)})}}class K extends te{constructor(e){super([]),this.idx=1,Object.assign(this,ie(e))}set definition(e){}get definition(){return this.referencedRule!==void 0?this.referencedRule.definition:[]}accept(e){e.visit(this)}}class _e extends te{constructor(e){super(e.definition),this.orgText="",Object.assign(this,ie(e))}}class W extends te{constructor(e){super(e.definition),this.ignoreAmbiguities=!1,Object.assign(this,ie(e))}}class G extends te{constructor(e){super(e.definition),this.idx=1,Object.assign(this,ie(e))}}class se extends te{constructor(e){super(e.definition),this.idx=1,Object.assign(this,ie(e))}}class ne extends te{constructor(e){super(e.definition),this.idx=1,Object.assign(this,ie(e))}}class M extends te{constructor(e){super(e.definition),this.idx=1,Object.assign(this,ie(e))}}class q extends te{constructor(e){super(e.definition),this.idx=1,Object.assign(this,ie(e))}}class Z extends te{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){super(e.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,Object.assign(this,ie(e))}}class k{constructor(e){this.idx=1,Object.assign(this,ie(e))}accept(e){e.visit(this)}}function zi(s){return s.map(at)}function at(s){function e(t){return t.map(at)}if(s instanceof K){const t={type:"NonTerminal",name:s.nonTerminalName,idx:s.idx};return typeof s.label=="string"&&(t.label=s.label),t}else{if(s instanceof W)return{type:"Alternative",definition:e(s.definition)};if(s instanceof G)return{type:"Option",idx:s.idx,definition:e(s.definition)};if(s instanceof se)return{type:"RepetitionMandatory",idx:s.idx,definition:e(s.definition)};if(s instanceof ne)return{type:"RepetitionMandatoryWithSeparator",idx:s.idx,separator:at(new k({terminalType:s.separator})),definition:e(s.definition)};if(s instanceof q)return{type:"RepetitionWithSeparator",idx:s.idx,separator:at(new k({terminalType:s.separator})),definition:e(s.definition)};if(s instanceof M)return{type:"Repetition",idx:s.idx,definition:e(s.definition)};if(s instanceof Z)return{type:"Alternation",idx:s.idx,definition:e(s.definition)};if(s instanceof k){const t={type:"Terminal",name:s.terminalType.name,label:Ki(s.terminalType),idx:s.idx};typeof s.label=="string"&&(t.terminalLabel=s.label);const n=s.terminalType.PATTERN;return s.terminalType.PATTERN&&(t.pattern=n instanceof RegExp?n.source:n),t}else{if(s instanceof _e)return{type:"Rule",name:s.name,orgText:s.orgText,definition:e(s.definition)};throw Error("non exhaustive match")}}}function ie(s){return Object.fromEntries(Object.entries(s).filter(([,e])=>e!==void 0))}class xe{visit(e){const t=e;switch(t.constructor){case K:return this.visitNonTerminal(t);case W:return this.visitAlternative(t);case G:return this.visitOption(t);case se:return this.visitRepetitionMandatory(t);case ne:return this.visitRepetitionMandatoryWithSeparator(t);case q:return this.visitRepetitionWithSeparator(t);case M:return this.visitRepetition(t);case Z:return this.visitAlternation(t);case k:return this.visitTerminal(t);case _e:return this.visitRule(t);default:throw Error("non exhaustive match")}}visitNonTerminal(e){}visitAlternative(e){}visitOption(e){}visitRepetition(e){}visitRepetitionMandatory(e){}visitRepetitionMandatoryWithSeparator(e){}visitRepetitionWithSeparator(e){}visitAlternation(e){}visitTerminal(e){}visitRule(e){}}function Hi(s){return s instanceof W||s instanceof G||s instanceof M||s instanceof se||s instanceof ne||s instanceof q||s instanceof k||s instanceof _e}function Tt(s,e=[]){return s instanceof G||s instanceof M||s instanceof q?!0:s instanceof Z?s.definition.some(n=>Tt(n,e)):s instanceof K&&e.includes(s)?!1:s instanceof te?(s instanceof K&&e.push(s),s.definition.every(n=>Tt(n,e))):!1}function Xi(s){return s instanceof Z}function ee(s){if(s instanceof K)return"SUBRULE";if(s instanceof G)return"OPTION";if(s instanceof Z)return"OR";if(s instanceof se)return"AT_LEAST_ONE";if(s instanceof ne)return"AT_LEAST_ONE_SEP";if(s instanceof q)return"MANY_SEP";if(s instanceof M)return"MANY";if(s instanceof k)return"CONSUME";throw Error("non exhaustive match")}class kt{walk(e,t=[]){e.definition.forEach((n,i)=>{const a=e.definition.slice(i+1);if(n instanceof K)this.walkProdRef(n,a,t);else if(n instanceof k)this.walkTerminal(n,a,t);else if(n instanceof W)this.walkFlat(n,a,t);else if(n instanceof G)this.walkOption(n,a,t);else if(n instanceof se)this.walkAtLeastOne(n,a,t);else if(n instanceof ne)this.walkAtLeastOneSep(n,a,t);else if(n instanceof q)this.walkManySep(n,a,t);else if(n instanceof M)this.walkMany(n,a,t);else if(n instanceof Z)this.walkOr(n,a,t);else throw Error("non exhaustive match")})}walkTerminal(e,t,n){}walkProdRef(e,t,n){}walkFlat(e,t,n){const i=t.concat(n);this.walk(e,i)}walkOption(e,t,n){const i=t.concat(n);this.walk(e,i)}walkAtLeastOne(e,t,n){const i=[new G({definition:e.definition})].concat(t,n);this.walk(e,i)}walkAtLeastOneSep(e,t,n){const i=ys(e,t,n);this.walk(e,i)}walkMany(e,t,n){const i=[new G({definition:e.definition})].concat(t,n);this.walk(e,i)}walkManySep(e,t,n){const i=ys(e,t,n);this.walk(e,i)}walkOr(e,t,n){const i=t.concat(n);e.definition.forEach(a=>{const r=new W({definition:[a]});this.walk(r,i)})}}function ys(s,e,t){return[new G({definition:[new k({terminalType:s.separator})].concat(s.definition)})].concat(e,t)}function Je(s){if(s instanceof K)return Je(s.referencedRule);if(s instanceof k)return qi(s);if(Hi(s))return Yi(s);if(Xi(s))return Ji(s);throw Error("non exhaustive match")}function Yi(s){let e=[];const t=s.definition;let n=0,i=t.length>n,a,r=!0;for(;i&&r;)a=t[n],r=Tt(a),e=e.concat(Je(a)),n=n+1,i=t.length>n;return[...new Set(e)]}function Ji(s){const e=s.definition.map(t=>Je(t));return[...new Set(e.flat())]}function qi(s){return[s.terminalType]}const an="_~IN~_";class Zi extends kt{constructor(e){super(),this.topProd=e,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(e,t,n){}walkProdRef(e,t,n){const i=ea(e.referencedRule,e.idx)+this.topProd.name,a=t.concat(n),r=new W({definition:a}),l=Je(r);this.follows[i]=l}}function Qi(s){const e={};return s.forEach(t=>{const n=new Zi(t).startWalking();Object.assign(e,n)}),e}function ea(s,e){return s.name+e+an}function S(s){return s.charCodeAt(0)}function Pt(s,e){Array.isArray(s)?s.forEach(function(t){e.push(t)}):e.push(s)}function Fe(s,e){if(s[e]===!0)throw"duplicate flag "+e;s[e],s[e]=!0}function Se(s){if(s===void 0)throw Error("Internal Error - Should never get here!");return!0}function ta(){throw Error("Internal Error - Should never get here!")}function Rs(s){return s.type==="Character"}const gt=[];for(let s=S("0");s<=S("9");s++)gt.push(s);const At=[S("_")].concat(gt);for(let s=S("a");s<=S("z");s++)At.push(s);for(let s=S("A");s<=S("Z");s++)At.push(s);const Os=[S(" "),S("\f"),S(`
|
|
2
2
|
`),S("\r"),S(" "),S("\v"),S(" "),S(" "),S(" "),S(" "),S(" "),S(" "),S(" "),S(" "),S(" "),S(" "),S(" "),S(" "),S(" "),S(" "),S("\u2028"),S("\u2029"),S(" "),S(" "),S(" "),S("\uFEFF")],sa=/[0-9a-fA-F]/,tt=/[0-9]/,na=/[1-9]/;class ia{constructor(){this.idx=0,this.input="",this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(e){this.idx=e.idx,this.input=e.input,this.groupIdx=e.groupIdx}pattern(e){this.idx=0,this.input=e,this.groupIdx=0,this.consumeChar("/");const t=this.disjunction();this.consumeChar("/");const n={type:"Flags",loc:{begin:this.idx,end:e.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};for(;this.isRegExpFlag();)switch(this.popChar()){case"g":Fe(n,"global");break;case"i":Fe(n,"ignoreCase");break;case"m":Fe(n,"multiLine");break;case"u":Fe(n,"unicode");break;case"y":Fe(n,"sticky");break}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:n,value:t,loc:this.loc(0)}}disjunction(){const e=[],t=this.idx;for(e.push(this.alternative());this.peekChar()==="|";)this.consumeChar("|"),e.push(this.alternative());return{type:"Disjunction",value:e,loc:this.loc(t)}}alternative(){const e=[],t=this.idx;for(;this.isTerm();)e.push(this.term());return{type:"Alternative",value:e,loc:this.loc(t)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){const e=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(e)};case"$":return{type:"EndAnchor",loc:this.loc(e)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(e)};case"B":return{type:"NonWordBoundary",loc:this.loc(e)}}throw Error("Invalid Assertion Escape");case"(":this.consumeChar("?");let t;switch(this.popChar()){case"=":t="Lookahead";break;case"!":t="NegativeLookahead";break;case"<":{switch(this.popChar()){case"=":t="Lookbehind";break;case"!":t="NegativeLookbehind"}break}}Se(t);const n=this.disjunction();return this.consumeChar(")"),{type:t,value:n,loc:this.loc(e)}}return ta()}quantifier(e=!1){let t;const n=this.idx;switch(this.popChar()){case"*":t={atLeast:0,atMost:1/0};break;case"+":t={atLeast:1,atMost:1/0};break;case"?":t={atLeast:0,atMost:1};break;case"{":const i=this.integerIncludingZero();switch(this.popChar()){case"}":t={atLeast:i,atMost:i};break;case",":let a;this.isDigit()?(a=this.integerIncludingZero(),t={atLeast:i,atMost:a}):t={atLeast:i,atMost:1/0},this.consumeChar("}");break}if(e===!0&&t===void 0)return;Se(t);break}if(!(e===!0&&t===void 0)&&Se(t))return this.peekChar(0)==="?"?(this.consumeChar("?"),t.greedy=!1):t.greedy=!0,t.type="Quantifier",t.loc=this.loc(n),t}atom(){let e;const t=this.idx;switch(this.peekChar()){case".":e=this.dotAll();break;case"\\":e=this.atomEscape();break;case"[":e=this.characterClass();break;case"(":e=this.group();break}if(e===void 0&&this.isPatternCharacter()&&(e=this.patternCharacter()),Se(e))return e.loc=this.loc(t),this.isQuantifier()&&(e.quantifier=this.quantifier()),e}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[S(`
|
|
3
3
|
`),S("\r"),S("\u2028"),S("\u2029")]}}atomEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:"GroupBackReference",value:this.positiveInteger()}}characterClassEscape(){let e,t=!1;switch(this.popChar()){case"d":e=gt;break;case"D":e=gt,t=!0;break;case"s":e=Os;break;case"S":e=Os,t=!0;break;case"w":e=At;break;case"W":e=At,t=!0;break}if(Se(e))return{type:"Set",value:e,complement:t}}controlEscapeAtom(){let e;switch(this.popChar()){case"f":e=S("\f");break;case"n":e=S(`
|
|
4
4
|
`);break;case"r":e=S("\r");break;case"t":e=S(" ");break;case"v":e=S("\v");break}if(Se(e))return{type:"Character",value:e}}controlLetterEscapeAtom(){this.consumeChar("c");const e=this.popChar();if(/[a-zA-Z]/.test(e)===!1)throw Error("Invalid ");return{type:"Character",value:e.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar("0"),{type:"Character",value:S("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){const e=this.popChar();return{type:"Character",value:S(e)}}classPatternCharacterAtom(){switch(this.peekChar()){case`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as o,X as ot,aH as ut,aX as dt,i as yt,r as ft,z as pt,b0 as it,V as gt,a_ as kt,U as mt,aZ as wt,Y as _t,B as bt}from"./
|
|
1
|
+
import{b as o,X as ot,aH as ut,aX as dt,i as yt,r as ft,z as pt,b0 as it,V as gt,a_ as kt,U as mt,aZ as wt,Y as _t,B as bt}from"./Cn2QoVqR.js";var J=(function(){var e=o(function(T,t,s,i){for(s=s||{},i=T.length;i--;s[T[i]]=t);return s},"o"),h=[1,4],r=[1,14],a=[1,12],l=[1,13],y=[6,7,8],f=[1,20],d=[1,18],m=[1,19],u=[6,7,11],k=[1,6,13,14],g=[1,23],_=[1,24],x=[1,6,7,11,13,14],D={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"ISHIKAWA",11:"EOF",13:"SPACELIST",14:"TEXT"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:o(function(t,s,i,c,p,n,v){var w=n.length-1;switch(p){case 6:case 7:return c;case 15:c.addNode(n[w-1].length,n[w].trim());break;case 16:c.addNode(0,n[w].trim());break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:h},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:h},{6:r,7:[1,10],9:9,12:11,13:a,14:l},e(y,[2,3]),{1:[2,2]},e(y,[2,4]),e(y,[2,5]),{1:[2,6],6:r,12:15,13:a,14:l},{6:r,9:16,12:11,13:a,14:l},{6:f,7:d,10:17,11:m},e(u,[2,18],{14:[1,21]}),e(u,[2,16]),e(u,[2,17]),{6:f,7:d,10:22,11:m},{1:[2,7],6:r,12:15,13:a,14:l},e(k,[2,14],{7:g,11:_}),e(x,[2,8]),e(x,[2,9]),e(x,[2,10]),e(u,[2,15]),e(k,[2,13],{7:g,11:_}),e(x,[2,11]),e(x,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:o(function(t,s){if(s.recoverable)this.trace(t);else{var i=new Error(t);throw i.hash=s,i}},"parseError"),parse:o(function(t){var s=this,i=[0],c=[],p=[null],n=[],v=this.table,w="",I=0,$=0,L=2,A=1,V=n.slice.call(arguments,1),b=Object.create(this.lexer),S={yy:{}};for(var B in this.yy)Object.prototype.hasOwnProperty.call(this.yy,B)&&(S.yy[B]=this.yy[B]);b.setInput(t,S.yy),S.yy.lexer=b,S.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var R=b.yylloc;n.push(R);var U=b.options&&b.options.ranges;typeof S.yy.parseError=="function"?this.parseError=S.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Y(P){i.length=i.length-2*P,p.length=p.length-P,n.length=n.length-P}o(Y,"popStack");function tt(){var P;return P=c.pop()||b.lex()||A,typeof P!="number"&&(P instanceof Array&&(c=P,P=c.pop()),P=s.symbols_[P]||P),P}o(tt,"lex");for(var M,W,N,K,z={},G,C,et,X;;){if(W=i[i.length-1],this.defaultActions[W]?N=this.defaultActions[W]:((M===null||typeof M>"u")&&(M=tt()),N=v[W]&&v[W][M]),typeof N>"u"||!N.length||!N[0]){var q="";X=[];for(G in v[W])this.terminals_[G]&&G>L&&X.push("'"+this.terminals_[G]+"'");b.showPosition?q="Parse error on line "+(I+1)+`:
|
|
2
2
|
`+b.showPosition()+`
|
|
3
3
|
Expecting `+X.join(", ")+", got '"+(this.terminals_[M]||M)+"'":q="Parse error on line "+(I+1)+": Unexpected "+(M==A?"end of input":"'"+(this.terminals_[M]||M)+"'"),this.parseError(q,{text:b.match,token:this.terminals_[M]||M,line:b.yylineno,loc:R,expected:X})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+W+", token: "+M);switch(N[0]){case 1:i.push(M),p.push(b.yytext),n.push(b.yylloc),i.push(N[1]),M=null,$=b.yyleng,w=b.yytext,I=b.yylineno,R=b.yylloc;break;case 2:if(C=this.productions_[N[1]][1],z.$=p[p.length-C],z._$={first_line:n[n.length-(C||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(C||1)].first_column,last_column:n[n.length-1].last_column},U&&(z._$.range=[n[n.length-(C||1)].range[0],n[n.length-1].range[1]]),K=this.performAction.apply(z,[w,$,I,S.yy,N[1],p,n].concat(V)),typeof K<"u")return K;C&&(i=i.slice(0,-1*C*2),p=p.slice(0,-1*C),n=n.slice(0,-1*C)),i.push(this.productions_[N[1]][0]),p.push(z.$),n.push(z._$),et=v[i[i.length-2]][i[i.length-1]],i.push(et);break;case 3:return!0}}return!0},"parse")},O=(function(){var T={EOF:1,parseError:o(function(s,i){if(this.yy.parser)this.yy.parser.parseError(s,i);else throw new Error(s)},"parseError"),setInput:o(function(t,s){return this.yy=s||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:o(function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var s=t.match(/(?:\r\n?|\n).*/g);return s?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:o(function(t){var s=t.length,i=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-s),this.offset-=s;var c=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var p=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===c.length?this.yylloc.first_column:0)+c[c.length-i.length].length-i[0].length:this.yylloc.first_column-s},this.options.ranges&&(this.yylloc.range=[p[0],p[0]+this.yyleng-s]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:o(function(t){this.unput(this.match.slice(t))},"less"),pastInput:o(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o(function(){var t=this.pastInput(),s=new Array(t.length+1).join("-");return t+this.upcomingInput()+`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as k}from"./BboIV5H5.js";import{bp as a}from"./DXyyWeag.js";import{Iy as r,nx as i}from"./D5ej8a-y.js";import{bT as _,aO as g}from"./D3QcPFoL.js";import{bQ as H}from"./
|
|
1
|
+
import{p as k}from"./BboIV5H5.js";import{bp as a}from"./DXyyWeag.js";import{Iy as r,nx as i}from"./D5ej8a-y.js";import{bT as _,aO as g}from"./D3QcPFoL.js";import{bQ as H}from"./hPM-hpF1.js";import{ap as d,x as f,y as b}from"./B_FQfWfg.js";function c(e){return e.lastBackupAt?k(e.lastBackupAt):""}function l(e){if(e.starting)return a.workspaceHome_starting_label();if(e.state==="moving")return a.workspaceHome_banner_moving();if(e.unknownState)return a.workspaceHome_banner_detachedNoBackup({name:e.name});const o=c(e);return o?a.workspaceHome_banner_detached({name:e.name,time:o}):a.workspaceHome_banner_detachedNoBackup({name:e.name})}function T(e){return e?.unavailable?l(e):null}function O(e){if(e.banner==="detached"||e.banner==="moving")return l(e);if(e.banner!=="backupWarning")return"";const o=c(e);return o?a.workspaceHome_banner_backupWarning({name:e.name,time:o}):a.workspaceHome_banner_backupWarningNoBackup({name:e.name})}function x(e){return e==="detached"?a.workspaceHome_marker_detached():a.workspaceHome_marker_moving()}function y(e){const o=c(e);return o?a.workspaceHome_header_lastBackup({time:o}):null}function N(e){if(!e.moveWarning)return null;const o=c(e);return o?a.workspaceHome_moveDialog_warning({name:e.name,time:o}):a.workspaceHome_moveDialog_warningNoBackup({name:e.name})}function E(e){switch(e.code){case"forbidden":return a.workspaceHome_moveError_forbidden();case"homes-unsupported":return a.workspaceHome_moveError_homesUnsupported();case"home-moving":return a.workspaceHome_moveError_homeMoving();case"home-target-unavailable":return a.workspaceHome_moveError_targetUnavailable();case"machine-update-required":return a.workspaceHome_moveError_updateRequired();default:return a.workspaceHome_moveError_failed({message:e.message})}}const p=new WeakMap,R=r.createSelector((e,o)=>{const n=i(e.workspace.workspaces,o),t=n?.home;if(!t)return null;const s=p.get(t);if(s)return s;const m=d(n);return m&&p.set(t,m),m}),A=r.createSelector((e,o)=>f(i(e.workspace.workspaces,o),!_.select(e,o))),D=r.createSelector((e,o)=>e.workspaceHome.waiting[o]===!0),F=r.createSelector(e=>e.workspaceHome.dialogWorkspaceId),L=r.createSelector(e=>e.workspaceHome.moveStatus==="submitting"),U=r.createSelector(e=>e.workspaceHome.moveFailure),h=[],u=new Map,V=r.createSelector((e,o)=>{if(!o)return h;const n=b({agents:g.select(e,o),machineRows:H.select(e)}),t=JSON.stringify(n),s=u.get(o);return s?.key===t?s.options:(u.set(o,{key:t,options:n}),n)}),q=r.createSelector((e,o)=>i(e.workspace.workspaces,o)!==void 0);export{y as a,x as b,N as c,T as d,l as e,D as f,F as g,O as h,U as i,V as j,L as k,R as l,E as m,q as n,A as s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as pt,br as S,a_ as q,bz as bt,bt as Pt,b as Ct,bp as vt,bv as h}from"./DXyyWeag.js";import{bs as kt,ca as E,aD as n,c9 as i,a7 as J,ay as _,W as w,bn as $t,bS as yt,aA as B,aB as St}from"./DYhIMPy1.js";import{G as _t}from"./DyvrH0mm.js";import{c as wt}from"./CnVt0JNG.js";import{b7 as Bt}from"./
|
|
1
|
+
import{t as pt,br as S,a_ as q,bz as bt,bt as Pt,b as Ct,bp as vt,bv as h}from"./DXyyWeag.js";import{bs as kt,ca as E,aD as n,c9 as i,a7 as J,ay as _,W as w,bn as $t,bS as yt,aA as B,aB as St}from"./DYhIMPy1.js";import{G as _t}from"./DyvrH0mm.js";import{c as wt}from"./CnVt0JNG.js";import{b7 as Bt}from"./Bip3iRY7.js";import{Iy as u,eu as It,ev as Wt,J3 as Rt,Jk as Ut,J8 as Tt,uS as Dt,o2 as V}from"./D5ej8a-y.js";import{g as At}from"./DfN8_dcw.js";import{bA as Ft,bC as Ht,dr as Mt}from"./D3QcPFoL.js";import{C as f}from"./DypB-Dwi.js";import"./BXtYtFFm.js";import"./CjaOLL1c.js";import"./Cuqq8bL5.js";import{bc as xt}from"./BTdkHPOB.js";import"./Bfr1QjPr.js";import"./D3bgZo3Z.js";import{T as Nt}from"./hC1Rd2xp.js";import"./D6bHtnlF.js";import{M as Lt}from"./CGnwT0iY.js";import{V as qt}from"./D11z_ckk.js";import{O as Et}from"./CVnjH67L.js";import{bR as Jt,bL as Vt,b6 as Gt}from"./CqAUygYd.js";import{i as Kt}from"./H2jLkRRS.js";var Ot=St("<!> <!>",1);function zt(I,p){if(new.target)return pt({component:zt,...I});kt(p,!0);const W=()=>h(et,"$workspace",m),P=()=>h(Y,"$ftChanges$",m),G=()=>h(Z,"$ftCommits$",m),R=()=>h(Q,"$foldUnchanged",m),U=()=>h(j,"$lineWrapping",m),T=()=>h(X,"$diffSideBySide",m),[m,K]=Pt(),O=t=>{qt(t,{embedded:!0,get foldEnabled(){return R()},onToggleFold:()=>u.dispatch(Tt()),get wrapEnabled(){return U()},onToggleWrap:()=>u.dispatch(Ut()),get splitEnabled(){return T()},onToggleSplit:()=>u.dispatch(Rt())})},z=t=>{var e=Ot(),r=_(e);{let l=i(()=>vt.layout_diffHeader_goToFile_tooltip());wt(r,()=>Lt,(y,ht)=>{ht(y,{get icon(){return xt},get label(){return n(l)},onclick:jt=>ft()})})}var s=yt(r,2);{var d=l=>{Et(l,{get filePath(){return n(k)},get workspaceId(){return o()},isDirectory:!1,embedded:!0,get workspaceFolderPath(){return n(v)}})};q(s,l=>{n(k)&&l(d)})}w(t,e)},j=Jt(),Q=Vt(),X=Gt();let a=S(p,"tab",7),o=S(p,"workspaceId",7),b=S(p,"isActive",7);const C=Bt(()=>o()),Y=Ft(C),Z=Ht(C),tt=new Set([f.Committed,f.Pushed,f.PullRequest,f.Merged,f.Trunk]),D=At(),et=Mt(C),nt=i(()=>W()?.worktreePath||W()?.repositoryPath||void 0);E(()=>{const t=o();if(!(!b()||!t||n(c)))return u.dispatch(It(t,"all")),()=>u.dispatch(Wt(t,"all"))});const c=i(()=>a().data?.gitRootId),A=i(()=>a().data?.gitRootPath),v=i(()=>n(A)||n(nt)),k=i(()=>a().diffPath&&n(v)?Kt(a().diffPath)?a().diffPath:`${n(v)}/${a().diffPath}`:null);function F(t,e){return!!(t.file===e||t.relativePath===e||t.relativePath&&e.endsWith("/"+t.relativePath)||t.file&&e.endsWith("/"+t.file)||t.relativePath&&t.relativePath.endsWith("/"+e)||t.file&&t.file.endsWith("/"+e))}function H(t){return!t||n(c)?null:P().find(e=>F(e,t)&&(e.stage==="staged"||e.stage==="unstaged"))??null}function at(t){if(!t||n(c))return null;let e=null,r=-1/0;for(const s of P()){if(!F(s,t)||!tt.has(s.stage)||!s.commitHash)continue;const d=s.attribution?.timestamp??0;d>=r&&(e=s,r=d)}return e}function it(t,e){return!!(t===e||e.endsWith("/"+t)||t.endsWith("/"+e))}function rt(t){if(!t||n(c))return null;for(const e of G())if(e?.hash&&e.files?.some(r=>r?.path&&it(r.path,t)))return{id:`diff-${t}-${e.hash}`,file:t,relativePath:t,status:"modified",stage:f.Committed,commitHash:e.hash,stats:{additions:0,deletions:0},attribution:{timestamp:e.timestamp??Date.now()}};return null}const M=i(()=>a().diffPath?H(a().diffPath):null),st=i(()=>{if(!a().diffPath)return 0;const t=H(a().diffPath),e=P().length;if(t){const r=t.stage==="staged"?1:t.stage==="unstaged"?2:3,s=(t.stats?.additions||0)+(t.stats?.deletions||0),d=t.attribution?.timestamp?t.attribution.timestamp%1e5:0;return r*1e6+s*1e3+d+e}return e}),g=i(()=>a().data?.change),x=i(()=>a().data?.branchBaseRef),N=i(()=>a().data?.branchBaseCommitSha),ot=i(()=>!!(n(x)||n(N))),$=i(()=>{if(n(g)?.commitHash)return n(g);if(n(M))return n(M);if(n(ot)&&n(g))return n(g);const t=at(a().diffPath??null);if(t)return t;const e=rt(a().diffPath??null);return e||(n(g)?n(g):{id:`diff-${a().diffPath}`,file:a().diffPath||"",relativePath:a().diffPath||"",status:"modified",stage:f.Unstaged,stats:{additions:0,deletions:0},attribution:{timestamp:Date.now()}})});function ft(t){if(!a().diffPath)return;const r={type:"file",title:a().diffPath.split("/").pop()||a().diffPath,closable:!0,filePath:n(k)||a().diffPath,workspaceId:o()};u.dispatch(Dt(o(),r))}E(()=>{!D||!b()||D.registerActions({display:O,actions:z})});function dt(t,e){u.dispatch(V(o(),crypto.randomUUID(),{kind:"stageHunk",filePath:t,hunkPatch:e,source:"diff"}))}function ut(t,e){u.dispatch(V(o(),crypto.randomUUID(),{kind:"unstageHunk",filePath:t,hunkPatch:e,source:"diff"}))}var ct={get tab(){return a()},set tab(t){a(t),B()},get workspaceId(){return o()},set workspaceId(t){o(t),B()},get isActive(){return b()},set isActive(t){b(t),B()},$set:bt,$on:(t,e)=>Ct(p,t,e)},L=J(),lt=_(L);{var mt=t=>{var e=J(),r=_(e);_t(r,()=>a().diffPath,s=>{{let d=i(()=>T()?"split":"unified"),l=i(()=>!n(c)&&n($).stage===f.Unstaged?dt:void 0),y=i(()=>!n(c)&&n($).stage===f.Staged?ut:void 0);Nt(s,{get active(){return b()},get change(){return n($)},get workspaceId(){return o()},get viewMode(){return n(d)},get foldUnchanged(){return R()},get lineWrapping(){return U()},get refreshKey(){return n(st)},get branchBaseRef(){return n(x)},get branchBaseCommitSha(){return n(N)},get gitRootId(){return n(c)},get gitRootPath(){return n(A)},get onStageHunk(){return n(l)},get onUnstageHunk(){return n(y)}})}}),w(t,e)};q(lt,t=>{a().diffPath&&t(mt)})}w(I,L);var gt=$t(ct);return K(),gt}export{zt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as p}from"./ChkzKl5W.js";import{J as s,H as l}from"./
|
|
1
|
+
import{d as p}from"./ChkzKl5W.js";import{J as s,H as l}from"./B_FQfWfg.js";import{selectScriptOutput as o,selectScriptById as f,selectCanReadScriptDefinition as m}from"./CCguRiXg.js";async function a(i,t,e,r=100){const n=s(o.select(i,t,e)).slice(-r);if(!t||!e)return n;const u=f.select(i,t,e);if(!m.select(i,t,u))return[];try{const c=l(await p.scripts.output(t,e,r));return c.length>0?c.slice(-r):n}catch{return n}}export{a as readScriptContextOutputLines};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as Gt,aZ as Kt,U as Ht,Y as Yt,b0 as Xt,V as Zt,a_ as Jt,b as w,W as wt,aX as Qt,aW as ot,i as $t,an as te,au as ee,H as ne,B as se,r as ie,q as oe,O as re}from"./CvYPF82-.js";const kt=(t,n)=>Gt(t,"a",-n),_t=1e-10;function st(t,n){const s=le(t),e=s.filter(l=>ae(l,t));let i=0,o=0;const r=[];if(e.length>1){const l=Et(e);for(let u=0;u<e.length;++u){const a=e[u];a.angle=Math.atan2(a.x-l.x,a.y-l.y)}e.sort((u,a)=>a.angle-u.angle);let f=e[e.length-1];for(let u=0;u<e.length;++u){const a=e[u];o+=(f.x+a.x)*(a.y-f.y);const y={x:(a.x+f.x)/2,y:(a.y+f.y)/2};let h=null;for(let b=0;b<a.parentIndex.length;++b)if(f.parentIndex.includes(a.parentIndex[b])){const p=t[a.parentIndex[b]],M=Math.atan2(a.x-p.x,a.y-p.y),E=Math.atan2(f.x-p.x,f.y-p.y);let _=E-M;_<0&&(_+=2*Math.PI);const S=E-_/2;let g=q(y,{x:p.x+p.radius*Math.sin(S),y:p.y+p.radius*Math.cos(S)});g>p.radius*2&&(g=p.radius*2),(h==null||h.width>g)&&(h={circle:p,width:g,p1:a,p2:f,large:g>p.radius,sweep:!0})}h!=null&&(r.push(h),i+=lt(h.circle.radius,h.width),f=a)}}else{let l=t[0];for(let u=1;u<t.length;++u)t[u].radius<l.radius&&(l=t[u]);let f=!1;for(let u=0;u<t.length;++u)if(q(t[u],l)>Math.abs(l.radius-t[u].radius)){f=!0;break}f?i=o=0:(i=l.radius*l.radius*Math.PI,r.push({circle:l,p1:{x:l.x,y:l.y+l.radius},p2:{x:l.x-_t,y:l.y+l.radius},width:l.radius*2,large:!0,sweep:!0}))}return o/=2,n&&(n.area=i+o,n.arcArea=i,n.polygonArea=o,n.arcs=r,n.innerPoints=e,n.intersectionPoints=s),i+o}function ae(t,n){return n.every(s=>q(t,s)<s.radius+_t)}function le(t){const n=[];for(let s=0;s<t.length;++s)for(let e=s+1;e<t.length;++e){const i=Tt(t[s],t[e]);for(const o of i)o.parentIndex=[s,e],n.push(o)}return n}function lt(t,n){return t*t*Math.acos(1-n/t)-(t-n)*Math.sqrt(n*(2*t-n))}function q(t,n){return Math.sqrt((t.x-n.x)*(t.x-n.x)+(t.y-n.y)*(t.y-n.y))}function xt(t,n,s){if(s>=t+n)return 0;if(s<=Math.abs(t-n))return Math.PI*Math.min(t,n)*Math.min(t,n);const e=t-(s*s-n*n+t*t)/(2*s),i=n-(s*s-t*t+n*n)/(2*s);return lt(t,e)+lt(n,i)}function Tt(t,n){const s=q(t,n),e=t.radius,i=n.radius;if(s>=e+i||s<=Math.abs(e-i))return[];const o=(e*e-i*i+s*s)/(2*s),r=Math.sqrt(e*e-o*o),l=t.x+o*(n.x-t.x)/s,f=t.y+o*(n.y-t.y)/s,u=-(n.y-t.y)*(r/s),a=-(n.x-t.x)*(r/s);return[{x:l+u,y:f-a},{x:l-u,y:f+a}]}function Et(t){const n={x:0,y:0};for(const s of t)n.x+=s.x,n.y+=s.y;return n.x/=t.length,n.y/=t.length,n}function ce(t,n,s,e){e=e||{};const i=e.maxIterations||100,o=e.tolerance||1e-10,r=t(n),l=t(s);let f=s-n;if(r*l>0)throw"Initial bisect points must have opposite signs";if(r===0)return n;if(l===0)return s;for(let u=0;u<i;++u){f/=2;const a=n+f,y=t(a);if(y*r>=0&&(n=a),Math.abs(f)<o||y===0)return a}return n+f}function ct(t){const n=new Array(t);for(let s=0;s<t;++s)n[s]=0;return n}function Mt(t,n){return ct(t).map(()=>ct(n))}function $(t,n){let s=0;for(let e=0;e<t.length;++e)s+=t[e]*n[e];return s}function ut(t){return Math.sqrt($(t,t))}function ft(t,n,s){for(let e=0;e<n.length;++e)t[e]=n[e]*s}function Z(t,n,s,e,i){for(let o=0;o<t.length;++o)t[o]=n*s[o]+e*i[o]}function zt(t,n,s){s=s||{};const e=s.maxIterations||n.length*200,i=s.nonZeroDelta||1.05,o=s.zeroDelta||.001,r=s.minErrorDelta||1e-6,l=s.minErrorDelta||1e-5,f=s.rho!==void 0?s.rho:1,u=s.chi!==void 0?s.chi:2,a=s.psi!==void 0?s.psi:-.5,y=s.sigma!==void 0?s.sigma:.5;let h;const b=n.length,p=new Array(b+1);p[0]=n,p[0].fx=t(n),p[0].id=0;for(let v=0;v<b;++v){const c=n.slice();c[v]=c[v]?c[v]*i:o,p[v+1]=c,p[v+1].fx=t(c),p[v+1].id=v+1}function M(v){for(let c=0;c<v.length;c++)p[b][c]=v[c];p[b].fx=v.fx}const E=(v,c)=>v.fx-c.fx,_=n.slice(),S=n.slice(),g=n.slice(),m=n.slice();for(let v=0;v<e;++v){if(p.sort(E),s.history){const x=p.map(d=>{const C=d.slice();return C.fx=d.fx,C.id=d.id,C});x.sort((d,C)=>d.id-C.id),s.history.push({x:p[0].slice(),fx:p[0].fx,simplex:x})}h=0;for(let x=0;x<b;++x)h=Math.max(h,Math.abs(p[0][x]-p[1][x]));if(Math.abs(p[0].fx-p[b].fx)<r&&h<l)break;for(let x=0;x<b;++x){_[x]=0;for(let d=0;d<b;++d)_[x]+=p[d][x];_[x]/=b}const c=p[b];if(Z(S,1+f,_,-f,c),S.fx=t(S),S.fx<p[0].fx)Z(m,1+u,_,-u,c),m.fx=t(m),m.fx<S.fx?M(m):M(S);else if(S.fx>=p[b-1].fx){let x=!1;if(S.fx>c.fx?(Z(g,1+a,_,-a,c),g.fx=t(g),g.fx<c.fx?M(g):x=!0):(Z(g,1-a*f,_,a*f,c),g.fx=t(g),g.fx<S.fx?M(g):x=!0),x){if(y>=1)break;for(let d=1;d<p.length;++d)Z(p[d],1-y,p[0],y,p[d]),p[d].fx=t(p[d])}}else M(S)}return p.sort(E),{fx:p[0].fx,x:p[0]}}function ue(t,n,s,e,i,o,r){const l=s.fx,f=$(s.fxprime,n);let u=l,a=l,y=f,h=0;i=i||1,o=o||1e-6,r=r||.1;function b(p,M,E){for(let _=0;_<16;++_)if(i=(p+M)/2,Z(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),y=$(e.fxprime,n),u>l+o*i*f||u>=E)M=i;else{if(Math.abs(y)<=-r*f)return i;y*(M-p)>=0&&(M=p),p=i,E=u}return 0}for(let p=0;p<10;++p){if(Z(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),y=$(e.fxprime,n),u>l+o*i*f||p&&u>=a)return b(h,i,a);if(Math.abs(y)<=-r*f)return i;if(y>=0)return b(i,h,u);a=u,h=i,i*=2}return i}function fe(t,n,s){let e={x:n.slice(),fx:0,fxprime:n.slice()},i={x:n.slice(),fx:0,fxprime:n.slice()};const o=n.slice();let r,l,f=1,u;s=s||{},u=s.maxIterations||n.length*20,e.fx=t(e.x,e.fxprime),r=e.fxprime.slice(),ft(r,e.fxprime,-1);for(let a=0;a<u;++a){if(f=ue(t,r,e,i,f),s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:f}),!f)ft(r,e.fxprime,-1);else{Z(o,1,i.fxprime,-1,e.fxprime);const y=$(e.fxprime,e.fxprime),h=Math.max(0,$(o,i.fxprime)/y);Z(r,h,r,-1,i.fxprime),l=e,e=i,i=l}if(ut(e.fxprime)<=1e-5)break}return s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:f}),e}function At(t,n={}){n.maxIterations=n.maxIterations||500;const s=n.initialLayout||xe,e=n.lossFunction||tt,i=he(t,n),o=s(i,n),r=Object.keys(o),l=[];for(const a of r)l.push(o[a].x),l.push(o[a].y);const u=zt(a=>{const y={};for(let h=0;h<r.length;++h){const b=r[h];y[b]={x:a[2*h],y:a[2*h+1],radius:o[b].radius}}return e(y,i)},l,n).x;for(let a=0;a<r.length;++a){const y=r[a];o[y].x=u[2*a],o[y].y=u[2*a+1]}return o}const Rt=1e-10;function ht(t,n,s){return Math.min(t,n)*Math.min(t,n)*Math.PI<=s+Rt?Math.abs(t-n):ce(e=>xt(t,n,e)-s,0,t+n)}function he(t,n={}){const s=n.distinct,e=t.map(l=>Object.assign({},l));function i(l){return l.join(";")}if(s){const l=new Map;for(const f of e)for(let u=0;u<f.sets.length;u++){const a=String(f.sets[u]);l.set(a,f.size+(l.get(a)||0));for(let y=u+1;y<f.sets.length;y++){const h=String(f.sets[y]),b=`${a};${h}`,p=`${h};${a}`;l.set(b,f.size+(l.get(b)||0)),l.set(p,f.size+(l.get(p)||0))}}for(const f of e)f.sets.length<3&&(f.size=l.get(i(f.sets)))}const o=[],r=new Set;for(const l of e)if(l.sets.length===1)o.push(l.sets[0]);else if(l.sets.length===2){const f=l.sets[0],u=l.sets[1];r.add(i(l.sets)),r.add(i([u,f]))}o.sort((l,f)=>l===f?0:l<f?-1:1);for(let l=0;l<o.length;++l){const f=o[l];for(let u=l+1;u<o.length;++u){const a=o[u];r.has(i([f,a]))||e.push({sets:[f,a],size:0})}}return e}function de(t,n,s){const e=Mt(n.length,n.length),i=Mt(n.length,n.length);return t.filter(o=>o.sets.length===2).forEach(o=>{const r=s[o.sets[0]],l=s[o.sets[1]],f=Math.sqrt(n[r].size/Math.PI),u=Math.sqrt(n[l].size/Math.PI),a=ht(f,u,o.size);e[r][l]=e[l][r]=a;let y=0;o.size+1e-10>=Math.min(n[r].size,n[l].size)?y=1:o.size<=1e-10&&(y=-1),i[r][l]=i[l][r]=y}),{distances:e,constraints:i}}function ge(t,n,s,e){for(let o=0;o<n.length;++o)n[o]=0;let i=0;for(let o=0;o<s.length;++o){const r=t[2*o],l=t[2*o+1];for(let f=o+1;f<s.length;++f){const u=t[2*f],a=t[2*f+1],y=s[o][f],h=e[o][f],b=(u-r)*(u-r)+(a-l)*(a-l),p=Math.sqrt(b),M=b-y*y;h>0&&p<=y||h<0&&p>=y||(i+=2*M*M,n[2*o]+=4*M*(r-u),n[2*o+1]+=4*M*(l-a),n[2*f]+=4*M*(u-r),n[2*f+1]+=4*M*(a-l))}}return i}function xe(t,n={}){let s=pe(t,n);const e=n.lossFunction||tt;if(t.length>=8){const i=ye(t,n),o=e(i,t),r=e(s,t);o+1e-8<r&&(s=i)}return s}function ye(t,n={}){const s=n.restarts||10,e=[],i={};for(const h of t)h.sets.length===1&&(i[h.sets[0]]=e.length,e.push(h));let{distances:o,constraints:r}=de(t,e,i);const l=ut(o.map(ut))/o.length;o=o.map(h=>h.map(b=>b/l));const f=(h,b)=>ge(h,b,o,r);let u=null;for(let h=0;h<s;++h){const b=ct(o.length*2).map(Math.random),p=fe(f,b,n);(!u||p.fx<u.fx)&&(u=p)}const a=u.x,y={};for(let h=0;h<e.length;++h){const b=e[h];y[b.sets[0]]={x:a[2*h]*l,y:a[2*h+1]*l,radius:Math.sqrt(b.size/Math.PI)}}if(n.history)for(const h of n.history)ft(h.x,l);return y}function pe(t,n){const s=n&&n.lossFunction?n.lossFunction:tt,e={},i={};for(const y of t)if(y.sets.length===1){const h=y.sets[0];e[h]={x:1e10,y:1e10,rowid:e.length,size:y.size,radius:Math.sqrt(y.size/Math.PI)},i[h]=[]}t=t.filter(y=>y.sets.length===2);for(const y of t){let h=y.weight!=null?y.weight:1;const b=y.sets[0],p=y.sets[1];y.size+Rt>=Math.min(e[b].size,e[p].size)&&(h=0),i[b].push({set:p,size:y.size,weight:h}),i[p].push({set:b,size:y.size,weight:h})}const o=[];Object.keys(i).forEach(y=>{let h=0;for(let b=0;b<i[y].length;++b)h+=i[y][b].size*i[y][b].weight;o.push({set:y,size:h})});function r(y,h){return h.size-y.size}o.sort(r);const l={};function f(y){return y.set in l}function u(y,h){e[h].x=y.x,e[h].y=y.y,l[h]=!0}u({x:0,y:0},o[0].set);for(let y=1;y<o.length;++y){const h=o[y].set,b=i[h].filter(f),p=e[h];if(b.sort(r),b.length===0)throw"ERROR: missing pairwise overlap information";const M=[];for(var a=0;a<b.length;++a){const S=e[b[a].set],g=ht(p.radius,S.radius,b[a].size);M.push({x:S.x+g,y:S.y}),M.push({x:S.x-g,y:S.y}),M.push({y:S.y+g,x:S.x}),M.push({y:S.y-g,x:S.x});for(let m=a+1;m<b.length;++m){const v=e[b[m].set],c=ht(p.radius,v.radius,b[m].size),x=Tt({x:S.x,y:S.y,radius:g},{x:v.x,y:v.y,radius:c});M.push(...x)}}let E=1e50,_=M[0];for(const S of M){e[h].x=S.x,e[h].y=S.y;const g=s(e,t);g<E&&(E=g,_=S)}u(_,h)}return e}function tt(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const r=t[e.sets[0]],l=t[e.sets[1]];i=xt(r.radius,l.radius,q(r,l))}else i=st(e.sets.map(r=>t[r]));const o=e.weight!=null?e.weight:1;s+=o*(i-e.size)*(i-e.size)}return s}function Ct(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const l=t[e.sets[0]],f=t[e.sets[1]];i=xt(l.radius,f.radius,q(l,f))}else i=st(e.sets.map(l=>t[l]));const o=e.weight!=null?e.weight:1,r=Math.log((i+1)/(e.size+1));s+=o*r*r}return s}function me(t,n,s){if(s==null?t.sort((i,o)=>o.radius-i.radius):t.sort(s),t.length>0){const i=t[0].x,o=t[0].y;for(const r of t)r.x-=i,r.y-=o}if(t.length===2&&q(t[0],t[1])<Math.abs(t[1].radius-t[0].radius)&&(t[1].x=t[0].x+t[0].radius-t[1].radius-1e-10,t[1].y=t[0].y),t.length>1){const i=Math.atan2(t[1].x,t[1].y)-n,o=Math.cos(i),r=Math.sin(i);for(const l of t){const f=l.x,u=l.y;l.x=o*f-r*u,l.y=r*f+o*u}}if(t.length>2){let i=Math.atan2(t[2].x,t[2].y)-n;for(;i<0;)i+=2*Math.PI;for(;i>2*Math.PI;)i-=2*Math.PI;if(i>Math.PI){const o=t[1].y/(1e-10+t[1].x);for(const r of t){var e=(r.x+o*r.y)/(1+o*o);r.x=2*e-r.x,r.y=2*e*o-r.y}}}}function be(t){t.forEach(i=>{i.parent=i});function n(i){return i.parent!==i&&(i.parent=n(i.parent)),i.parent}function s(i,o){const r=n(i),l=n(o);r.parent=l}for(let i=0;i<t.length;++i)for(let o=i+1;o<t.length;++o){const r=t[i].radius+t[o].radius;q(t[i],t[o])+1e-10<r&&s(t[o],t[i])}const e=new Map;for(let i=0;i<t.length;++i){const o=n(t[i]).parent.setid;e.has(o)||e.set(o,[]),e.get(o).push(t[i])}return t.forEach(i=>{delete i.parent}),Array.from(e.values())}function dt(t){const n=s=>{const e=t.reduce((o,r)=>Math.max(o,r[s]+r.radius),Number.NEGATIVE_INFINITY),i=t.reduce((o,r)=>Math.min(o,r[s]-r.radius),Number.POSITIVE_INFINITY);return{max:e,min:i}};return{xRange:n("x"),yRange:n("y")}}function Dt(t,n,s){n==null&&(n=Math.PI/2);let e=Ft(t).map(u=>Object.assign({},u));const i=be(e);for(const u of i){me(u,n,s);const a=dt(u);u.size=(a.xRange.max-a.xRange.min)*(a.yRange.max-a.yRange.min),u.bounds=a}i.sort((u,a)=>a.size-u.size),e=i[0];let o=e.bounds;const r=(o.xRange.max-o.xRange.min)/50;function l(u,a,y){if(!u)return;const h=u.bounds;let b,p;if(a)b=o.xRange.max-h.xRange.min+r;else{b=o.xRange.max-h.xRange.max;const M=(h.xRange.max-h.xRange.min)/2-(o.xRange.max-o.xRange.min)/2;M<0&&(b+=M)}if(y)p=o.yRange.max-h.yRange.min+r;else{p=o.yRange.max-h.yRange.max;const M=(h.yRange.max-h.yRange.min)/2-(o.yRange.max-o.yRange.min)/2;M<0&&(p+=M)}for(const M of u)M.x+=b,M.y+=p,e.push(M)}let f=1;for(;f<i.length;)l(i[f],!0,!1),l(i[f+1],!1,!0),l(i[f+2],!0,!0),f+=3,o=dt(e);return Nt(e)}function Ot(t,n,s,e,i){const o=Ft(t);n-=2*e,s-=2*e;const{xRange:r,yRange:l}=dt(o);if(r.max===r.min||l.max===l.min)return console.log("not scaling solution: zero size detected"),t;let f,u;if(i){const b=Math.sqrt(i/Math.PI)*2;f=n/b,u=s/b}else f=n/(r.max-r.min),u=s/(l.max-l.min);const a=Math.min(u,f),y=(n-(r.max-r.min)*a)/2,h=(s-(l.max-l.min)*a)/2;return Nt(o.map(b=>({radius:a*b.radius,x:e+y+(b.x-r.min)*a,y:e+h+(b.y-l.min)*a,setid:b.setid})))}function Nt(t){const n={};for(const s of t)n[s.setid]=s;return n}function Ft(t){return Object.keys(t).map(s=>Object.assign(t[s],{setid:s}))}function ve(t={}){let n=!1,s=600,e=350,i=15,o=1e3,r=Math.PI/2,l=!0,f=null,u=!0,a=!0,y=null,h=null,b=!1,p=null,M=t&&t.symmetricalTextCentre?t.symmetricalTextCentre:!1,E={},_=t&&t.colourScheme?t.colourScheme:t&&t.colorScheme?t.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],S=0,g=function(x){if(x in E)return E[x];var d=E[x]=_[S];return S+=1,S>=_.length&&(S=0),d},m=At,v=tt;function c(x){let d=x.datum();const C=new Set;d.forEach(k=>{k.size==0&&k.sets.length==1&&C.add(k.sets[0])}),d=d.filter(k=>!k.sets.some(O=>C.has(O)));let I={},D={};if(d.length>0){let k=m(d,{lossFunction:v,distinct:b});l&&(k=Dt(k,r,h)),I=Ot(k,s,e,i,f),D=Lt(I,d,M)}const U={};d.forEach(k=>{k.label&&(U[k.sets]=k.label)});function V(k){if(k.sets in U)return U[k.sets];if(k.sets.length==1)return""+k.sets[0]}x.selectAll("svg").data([I]).enter().append("svg");const F=x.select("svg");n?F.attr("viewBox",`0 0 ${s} ${e}`):F.attr("width",s).attr("height",e);const R={};let T=!1;F.selectAll(".venn-area path").each(function(k){const O=this.getAttribute("d");k.sets.length==1&&O&&!b&&(T=!0,R[k.sets[0]]=Me(O))});function A(k){return O=>{const K=k.sets.map(et=>{let Y=R[et],X=I[et];return Y||(Y={x:s/2,y:e/2,radius:1}),X||(X={x:s/2,y:e/2,radius:1}),{x:Y.x*(1-O)+X.x*O,y:Y.y*(1-O)+X.y*O,radius:Y.radius*(1-O)+X.radius*O}});return St(K,p)}}const W=F.selectAll(".venn-area").data(d,k=>k.sets),P=W.enter().append("g").attr("class",k=>`venn-area venn-${k.sets.length==1?"circle":"intersection"}${k.colour||k.color?" venn-coloured":""}`).attr("data-venn-sets",k=>k.sets.join("_")),B=P.append("path"),G=P.append("text").attr("class","label").text(k=>V(k)).attr("text-anchor","middle").attr("dy",".35em").attr("x",s/2).attr("y",e/2);a&&(B.style("fill-opacity","0").filter(k=>k.sets.length==1).style("fill",k=>k.colour?k.colour:k.color?k.color:g(k.sets)).style("fill-opacity",".25"),G.style("fill",k=>k.colour||k.color?"#FFF":t.textFill?t.textFill:k.sets.length==1?g(k.sets):"#444"));function L(k){return typeof k.transition=="function"?k.transition("venn").duration(o):k}let z=x;T&&typeof z.transition=="function"?(z=L(x),z.selectAll("path").attrTween("d",A)):z.selectAll("path").attr("d",k=>St(k.sets.map(O=>I[O])),p);const N=z.selectAll("text").filter(k=>k.sets in D).text(k=>V(k)).attr("x",k=>Math.floor(D[k.sets].x)).attr("y",k=>Math.floor(D[k.sets].y));u&&(T?"on"in N?N.on("end",rt(I,V)):N.each("end",rt(I,V)):N.each(rt(I,V)));const j=L(W.exit()).remove();typeof W.transition=="function"&&j.selectAll("path").attrTween("d",A);const Q=j.selectAll("text").attr("x",s/2).attr("y",e/2);return y!==null&&(G.style("font-size","0px"),N.style("font-size",y),Q.style("font-size","0px")),{circles:I,textCentres:D,nodes:W,enter:P,update:z,exit:j}}return c.wrap=function(x){return arguments.length?(u=x,c):u},c.useViewBox=function(){return n=!0,c},c.width=function(x){return arguments.length?(s=x,c):s},c.height=function(x){return arguments.length?(e=x,c):e},c.padding=function(x){return arguments.length?(i=x,c):i},c.distinct=function(x){return arguments.length?(b=x,c):b},c.colours=function(x){return arguments.length?(g=x,c):g},c.colors=function(x){return arguments.length?(g=x,c):g},c.fontSize=function(x){return arguments.length?(y=x,c):y},c.round=function(x){return arguments.length?(p=x,c):p},c.duration=function(x){return arguments.length?(o=x,c):o},c.layoutFunction=function(x){return arguments.length?(m=x,c):m},c.normalize=function(x){return arguments.length?(l=x,c):l},c.scaleToFit=function(x){return arguments.length?(f=x,c):f},c.styled=function(x){return arguments.length?(a=x,c):a},c.orientation=function(x){return arguments.length?(r=x,c):r},c.orientationOrder=function(x){return arguments.length?(h=x,c):h},c.lossFunction=function(x){return arguments.length?(v=x==="default"?tt:x==="logRatio"?Ct:x,c):v},c}function rt(t,n){return function(s){const e=this,i=t[s.sets[0]].radius||50,o=n(s)||"",r=o.split(/\s+/).reverse(),f=(o.length+r.length)/3;let u=r.pop(),a=[u],y=0;const h=1.1;e.textContent=null;const b=[];function p(g){const m=e.ownerDocument.createElementNS(e.namespaceURI,"tspan");return m.textContent=g,b.push(m),e.append(m),m}let M=p(u);for(;u=r.pop(),!!u;){a.push(u);const g=a.join(" ");M.textContent=g,g.length>f&&M.getComputedTextLength()>i&&(a.pop(),M.textContent=a.join(" "),a=[u],M=p(u),y++)}const E=.35-y*h/2,_=e.getAttribute("x"),S=e.getAttribute("y");b.forEach((g,m)=>{g.setAttribute("x",_),g.setAttribute("y",S),g.setAttribute("dy",`${E+m*h}em`)})}}function at(t,n,s){let e=n[0].radius-q(n[0],t);for(let i=1;i<n.length;++i){const o=n[i].radius-q(n[i],t);o<=e&&(e=o)}for(let i=0;i<s.length;++i){const o=q(s[i],t)-s[i].radius;o<=e&&(e=o)}return e}function jt(t,n,s){const e=[];for(const a of t)e.push({x:a.x,y:a.y}),e.push({x:a.x+a.radius/2,y:a.y}),e.push({x:a.x-a.radius/2,y:a.y}),e.push({x:a.x,y:a.y+a.radius/2}),e.push({x:a.x,y:a.y-a.radius/2});let i=e[0],o=at(e[0],t,n);for(let a=1;a<e.length;++a){const y=at(e[a],t,n);y>=o&&(i=e[a],o=y)}const r=zt(a=>-1*at({x:a[0],y:a[1]},t,n),[i.x,i.y],{maxIterations:500,minErrorDelta:1e-10}).x,l={x:s?0:r[0],y:r[1]};let f=!0;for(const a of t)if(q(l,a)>a.radius){f=!1;break}for(const a of n)if(q(l,a)<a.radius){f=!1;break}if(f)return l;if(t.length==1)return{x:t[0].x,y:t[0].y};const u={};return st(t,u),u.arcs.length===0?{x:0,y:-1e3,disjoint:!0}:u.arcs.length==1?{x:u.arcs[0].circle.x,y:u.arcs[0].circle.y}:n.length?jt(t,[]):Et(u.arcs.map(a=>a.p1))}function Ie(t){const n={},s=Object.keys(t);for(const e of s)n[e]=[];for(let e=0;e<s.length;e++){const i=s[e],o=t[i];for(let r=e+1;r<s.length;++r){const l=s[r],f=t[l],u=q(o,f);u+f.radius<=o.radius+1e-10?n[l].push(i):u+o.radius<=f.radius+1e-10&&n[i].push(l)}}return n}function Lt(t,n,s){const e={},i=Ie(t);for(let o=0;o<n.length;++o){const r=n[o].sets,l={},f={};for(let h=0;h<r.length;++h){l[r[h]]=!0;const b=i[r[h]];for(let p=0;p<b.length;++p)f[b[p]]=!0}const u=[],a=[];for(let h in t)h in l?u.push(t[h]):h in f||a.push(t[h]);const y=jt(u,a,s);e[r]=y,y.disjoint&&n[o].size>0&&console.log("WARNING: area "+r+" not represented on screen")}return e}function ke(t,n,s){const e=[];return e.push(`
|
|
1
|
+
import{c as Gt,aZ as Kt,U as Ht,Y as Yt,b0 as Xt,V as Zt,a_ as Jt,b as w,W as wt,aX as Qt,aW as ot,i as $t,an as te,au as ee,H as ne,B as se,r as ie,q as oe,O as re}from"./Cn2QoVqR.js";const kt=(t,n)=>Gt(t,"a",-n),_t=1e-10;function st(t,n){const s=le(t),e=s.filter(l=>ae(l,t));let i=0,o=0;const r=[];if(e.length>1){const l=Et(e);for(let u=0;u<e.length;++u){const a=e[u];a.angle=Math.atan2(a.x-l.x,a.y-l.y)}e.sort((u,a)=>a.angle-u.angle);let f=e[e.length-1];for(let u=0;u<e.length;++u){const a=e[u];o+=(f.x+a.x)*(a.y-f.y);const y={x:(a.x+f.x)/2,y:(a.y+f.y)/2};let h=null;for(let b=0;b<a.parentIndex.length;++b)if(f.parentIndex.includes(a.parentIndex[b])){const p=t[a.parentIndex[b]],M=Math.atan2(a.x-p.x,a.y-p.y),E=Math.atan2(f.x-p.x,f.y-p.y);let _=E-M;_<0&&(_+=2*Math.PI);const S=E-_/2;let g=q(y,{x:p.x+p.radius*Math.sin(S),y:p.y+p.radius*Math.cos(S)});g>p.radius*2&&(g=p.radius*2),(h==null||h.width>g)&&(h={circle:p,width:g,p1:a,p2:f,large:g>p.radius,sweep:!0})}h!=null&&(r.push(h),i+=lt(h.circle.radius,h.width),f=a)}}else{let l=t[0];for(let u=1;u<t.length;++u)t[u].radius<l.radius&&(l=t[u]);let f=!1;for(let u=0;u<t.length;++u)if(q(t[u],l)>Math.abs(l.radius-t[u].radius)){f=!0;break}f?i=o=0:(i=l.radius*l.radius*Math.PI,r.push({circle:l,p1:{x:l.x,y:l.y+l.radius},p2:{x:l.x-_t,y:l.y+l.radius},width:l.radius*2,large:!0,sweep:!0}))}return o/=2,n&&(n.area=i+o,n.arcArea=i,n.polygonArea=o,n.arcs=r,n.innerPoints=e,n.intersectionPoints=s),i+o}function ae(t,n){return n.every(s=>q(t,s)<s.radius+_t)}function le(t){const n=[];for(let s=0;s<t.length;++s)for(let e=s+1;e<t.length;++e){const i=Tt(t[s],t[e]);for(const o of i)o.parentIndex=[s,e],n.push(o)}return n}function lt(t,n){return t*t*Math.acos(1-n/t)-(t-n)*Math.sqrt(n*(2*t-n))}function q(t,n){return Math.sqrt((t.x-n.x)*(t.x-n.x)+(t.y-n.y)*(t.y-n.y))}function xt(t,n,s){if(s>=t+n)return 0;if(s<=Math.abs(t-n))return Math.PI*Math.min(t,n)*Math.min(t,n);const e=t-(s*s-n*n+t*t)/(2*s),i=n-(s*s-t*t+n*n)/(2*s);return lt(t,e)+lt(n,i)}function Tt(t,n){const s=q(t,n),e=t.radius,i=n.radius;if(s>=e+i||s<=Math.abs(e-i))return[];const o=(e*e-i*i+s*s)/(2*s),r=Math.sqrt(e*e-o*o),l=t.x+o*(n.x-t.x)/s,f=t.y+o*(n.y-t.y)/s,u=-(n.y-t.y)*(r/s),a=-(n.x-t.x)*(r/s);return[{x:l+u,y:f-a},{x:l-u,y:f+a}]}function Et(t){const n={x:0,y:0};for(const s of t)n.x+=s.x,n.y+=s.y;return n.x/=t.length,n.y/=t.length,n}function ce(t,n,s,e){e=e||{};const i=e.maxIterations||100,o=e.tolerance||1e-10,r=t(n),l=t(s);let f=s-n;if(r*l>0)throw"Initial bisect points must have opposite signs";if(r===0)return n;if(l===0)return s;for(let u=0;u<i;++u){f/=2;const a=n+f,y=t(a);if(y*r>=0&&(n=a),Math.abs(f)<o||y===0)return a}return n+f}function ct(t){const n=new Array(t);for(let s=0;s<t;++s)n[s]=0;return n}function Mt(t,n){return ct(t).map(()=>ct(n))}function $(t,n){let s=0;for(let e=0;e<t.length;++e)s+=t[e]*n[e];return s}function ut(t){return Math.sqrt($(t,t))}function ft(t,n,s){for(let e=0;e<n.length;++e)t[e]=n[e]*s}function Z(t,n,s,e,i){for(let o=0;o<t.length;++o)t[o]=n*s[o]+e*i[o]}function zt(t,n,s){s=s||{};const e=s.maxIterations||n.length*200,i=s.nonZeroDelta||1.05,o=s.zeroDelta||.001,r=s.minErrorDelta||1e-6,l=s.minErrorDelta||1e-5,f=s.rho!==void 0?s.rho:1,u=s.chi!==void 0?s.chi:2,a=s.psi!==void 0?s.psi:-.5,y=s.sigma!==void 0?s.sigma:.5;let h;const b=n.length,p=new Array(b+1);p[0]=n,p[0].fx=t(n),p[0].id=0;for(let v=0;v<b;++v){const c=n.slice();c[v]=c[v]?c[v]*i:o,p[v+1]=c,p[v+1].fx=t(c),p[v+1].id=v+1}function M(v){for(let c=0;c<v.length;c++)p[b][c]=v[c];p[b].fx=v.fx}const E=(v,c)=>v.fx-c.fx,_=n.slice(),S=n.slice(),g=n.slice(),m=n.slice();for(let v=0;v<e;++v){if(p.sort(E),s.history){const x=p.map(d=>{const C=d.slice();return C.fx=d.fx,C.id=d.id,C});x.sort((d,C)=>d.id-C.id),s.history.push({x:p[0].slice(),fx:p[0].fx,simplex:x})}h=0;for(let x=0;x<b;++x)h=Math.max(h,Math.abs(p[0][x]-p[1][x]));if(Math.abs(p[0].fx-p[b].fx)<r&&h<l)break;for(let x=0;x<b;++x){_[x]=0;for(let d=0;d<b;++d)_[x]+=p[d][x];_[x]/=b}const c=p[b];if(Z(S,1+f,_,-f,c),S.fx=t(S),S.fx<p[0].fx)Z(m,1+u,_,-u,c),m.fx=t(m),m.fx<S.fx?M(m):M(S);else if(S.fx>=p[b-1].fx){let x=!1;if(S.fx>c.fx?(Z(g,1+a,_,-a,c),g.fx=t(g),g.fx<c.fx?M(g):x=!0):(Z(g,1-a*f,_,a*f,c),g.fx=t(g),g.fx<S.fx?M(g):x=!0),x){if(y>=1)break;for(let d=1;d<p.length;++d)Z(p[d],1-y,p[0],y,p[d]),p[d].fx=t(p[d])}}else M(S)}return p.sort(E),{fx:p[0].fx,x:p[0]}}function ue(t,n,s,e,i,o,r){const l=s.fx,f=$(s.fxprime,n);let u=l,a=l,y=f,h=0;i=i||1,o=o||1e-6,r=r||.1;function b(p,M,E){for(let _=0;_<16;++_)if(i=(p+M)/2,Z(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),y=$(e.fxprime,n),u>l+o*i*f||u>=E)M=i;else{if(Math.abs(y)<=-r*f)return i;y*(M-p)>=0&&(M=p),p=i,E=u}return 0}for(let p=0;p<10;++p){if(Z(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),y=$(e.fxprime,n),u>l+o*i*f||p&&u>=a)return b(h,i,a);if(Math.abs(y)<=-r*f)return i;if(y>=0)return b(i,h,u);a=u,h=i,i*=2}return i}function fe(t,n,s){let e={x:n.slice(),fx:0,fxprime:n.slice()},i={x:n.slice(),fx:0,fxprime:n.slice()};const o=n.slice();let r,l,f=1,u;s=s||{},u=s.maxIterations||n.length*20,e.fx=t(e.x,e.fxprime),r=e.fxprime.slice(),ft(r,e.fxprime,-1);for(let a=0;a<u;++a){if(f=ue(t,r,e,i,f),s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:f}),!f)ft(r,e.fxprime,-1);else{Z(o,1,i.fxprime,-1,e.fxprime);const y=$(e.fxprime,e.fxprime),h=Math.max(0,$(o,i.fxprime)/y);Z(r,h,r,-1,i.fxprime),l=e,e=i,i=l}if(ut(e.fxprime)<=1e-5)break}return s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:f}),e}function At(t,n={}){n.maxIterations=n.maxIterations||500;const s=n.initialLayout||xe,e=n.lossFunction||tt,i=he(t,n),o=s(i,n),r=Object.keys(o),l=[];for(const a of r)l.push(o[a].x),l.push(o[a].y);const u=zt(a=>{const y={};for(let h=0;h<r.length;++h){const b=r[h];y[b]={x:a[2*h],y:a[2*h+1],radius:o[b].radius}}return e(y,i)},l,n).x;for(let a=0;a<r.length;++a){const y=r[a];o[y].x=u[2*a],o[y].y=u[2*a+1]}return o}const Rt=1e-10;function ht(t,n,s){return Math.min(t,n)*Math.min(t,n)*Math.PI<=s+Rt?Math.abs(t-n):ce(e=>xt(t,n,e)-s,0,t+n)}function he(t,n={}){const s=n.distinct,e=t.map(l=>Object.assign({},l));function i(l){return l.join(";")}if(s){const l=new Map;for(const f of e)for(let u=0;u<f.sets.length;u++){const a=String(f.sets[u]);l.set(a,f.size+(l.get(a)||0));for(let y=u+1;y<f.sets.length;y++){const h=String(f.sets[y]),b=`${a};${h}`,p=`${h};${a}`;l.set(b,f.size+(l.get(b)||0)),l.set(p,f.size+(l.get(p)||0))}}for(const f of e)f.sets.length<3&&(f.size=l.get(i(f.sets)))}const o=[],r=new Set;for(const l of e)if(l.sets.length===1)o.push(l.sets[0]);else if(l.sets.length===2){const f=l.sets[0],u=l.sets[1];r.add(i(l.sets)),r.add(i([u,f]))}o.sort((l,f)=>l===f?0:l<f?-1:1);for(let l=0;l<o.length;++l){const f=o[l];for(let u=l+1;u<o.length;++u){const a=o[u];r.has(i([f,a]))||e.push({sets:[f,a],size:0})}}return e}function de(t,n,s){const e=Mt(n.length,n.length),i=Mt(n.length,n.length);return t.filter(o=>o.sets.length===2).forEach(o=>{const r=s[o.sets[0]],l=s[o.sets[1]],f=Math.sqrt(n[r].size/Math.PI),u=Math.sqrt(n[l].size/Math.PI),a=ht(f,u,o.size);e[r][l]=e[l][r]=a;let y=0;o.size+1e-10>=Math.min(n[r].size,n[l].size)?y=1:o.size<=1e-10&&(y=-1),i[r][l]=i[l][r]=y}),{distances:e,constraints:i}}function ge(t,n,s,e){for(let o=0;o<n.length;++o)n[o]=0;let i=0;for(let o=0;o<s.length;++o){const r=t[2*o],l=t[2*o+1];for(let f=o+1;f<s.length;++f){const u=t[2*f],a=t[2*f+1],y=s[o][f],h=e[o][f],b=(u-r)*(u-r)+(a-l)*(a-l),p=Math.sqrt(b),M=b-y*y;h>0&&p<=y||h<0&&p>=y||(i+=2*M*M,n[2*o]+=4*M*(r-u),n[2*o+1]+=4*M*(l-a),n[2*f]+=4*M*(u-r),n[2*f+1]+=4*M*(a-l))}}return i}function xe(t,n={}){let s=pe(t,n);const e=n.lossFunction||tt;if(t.length>=8){const i=ye(t,n),o=e(i,t),r=e(s,t);o+1e-8<r&&(s=i)}return s}function ye(t,n={}){const s=n.restarts||10,e=[],i={};for(const h of t)h.sets.length===1&&(i[h.sets[0]]=e.length,e.push(h));let{distances:o,constraints:r}=de(t,e,i);const l=ut(o.map(ut))/o.length;o=o.map(h=>h.map(b=>b/l));const f=(h,b)=>ge(h,b,o,r);let u=null;for(let h=0;h<s;++h){const b=ct(o.length*2).map(Math.random),p=fe(f,b,n);(!u||p.fx<u.fx)&&(u=p)}const a=u.x,y={};for(let h=0;h<e.length;++h){const b=e[h];y[b.sets[0]]={x:a[2*h]*l,y:a[2*h+1]*l,radius:Math.sqrt(b.size/Math.PI)}}if(n.history)for(const h of n.history)ft(h.x,l);return y}function pe(t,n){const s=n&&n.lossFunction?n.lossFunction:tt,e={},i={};for(const y of t)if(y.sets.length===1){const h=y.sets[0];e[h]={x:1e10,y:1e10,rowid:e.length,size:y.size,radius:Math.sqrt(y.size/Math.PI)},i[h]=[]}t=t.filter(y=>y.sets.length===2);for(const y of t){let h=y.weight!=null?y.weight:1;const b=y.sets[0],p=y.sets[1];y.size+Rt>=Math.min(e[b].size,e[p].size)&&(h=0),i[b].push({set:p,size:y.size,weight:h}),i[p].push({set:b,size:y.size,weight:h})}const o=[];Object.keys(i).forEach(y=>{let h=0;for(let b=0;b<i[y].length;++b)h+=i[y][b].size*i[y][b].weight;o.push({set:y,size:h})});function r(y,h){return h.size-y.size}o.sort(r);const l={};function f(y){return y.set in l}function u(y,h){e[h].x=y.x,e[h].y=y.y,l[h]=!0}u({x:0,y:0},o[0].set);for(let y=1;y<o.length;++y){const h=o[y].set,b=i[h].filter(f),p=e[h];if(b.sort(r),b.length===0)throw"ERROR: missing pairwise overlap information";const M=[];for(var a=0;a<b.length;++a){const S=e[b[a].set],g=ht(p.radius,S.radius,b[a].size);M.push({x:S.x+g,y:S.y}),M.push({x:S.x-g,y:S.y}),M.push({y:S.y+g,x:S.x}),M.push({y:S.y-g,x:S.x});for(let m=a+1;m<b.length;++m){const v=e[b[m].set],c=ht(p.radius,v.radius,b[m].size),x=Tt({x:S.x,y:S.y,radius:g},{x:v.x,y:v.y,radius:c});M.push(...x)}}let E=1e50,_=M[0];for(const S of M){e[h].x=S.x,e[h].y=S.y;const g=s(e,t);g<E&&(E=g,_=S)}u(_,h)}return e}function tt(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const r=t[e.sets[0]],l=t[e.sets[1]];i=xt(r.radius,l.radius,q(r,l))}else i=st(e.sets.map(r=>t[r]));const o=e.weight!=null?e.weight:1;s+=o*(i-e.size)*(i-e.size)}return s}function Ct(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const l=t[e.sets[0]],f=t[e.sets[1]];i=xt(l.radius,f.radius,q(l,f))}else i=st(e.sets.map(l=>t[l]));const o=e.weight!=null?e.weight:1,r=Math.log((i+1)/(e.size+1));s+=o*r*r}return s}function me(t,n,s){if(s==null?t.sort((i,o)=>o.radius-i.radius):t.sort(s),t.length>0){const i=t[0].x,o=t[0].y;for(const r of t)r.x-=i,r.y-=o}if(t.length===2&&q(t[0],t[1])<Math.abs(t[1].radius-t[0].radius)&&(t[1].x=t[0].x+t[0].radius-t[1].radius-1e-10,t[1].y=t[0].y),t.length>1){const i=Math.atan2(t[1].x,t[1].y)-n,o=Math.cos(i),r=Math.sin(i);for(const l of t){const f=l.x,u=l.y;l.x=o*f-r*u,l.y=r*f+o*u}}if(t.length>2){let i=Math.atan2(t[2].x,t[2].y)-n;for(;i<0;)i+=2*Math.PI;for(;i>2*Math.PI;)i-=2*Math.PI;if(i>Math.PI){const o=t[1].y/(1e-10+t[1].x);for(const r of t){var e=(r.x+o*r.y)/(1+o*o);r.x=2*e-r.x,r.y=2*e*o-r.y}}}}function be(t){t.forEach(i=>{i.parent=i});function n(i){return i.parent!==i&&(i.parent=n(i.parent)),i.parent}function s(i,o){const r=n(i),l=n(o);r.parent=l}for(let i=0;i<t.length;++i)for(let o=i+1;o<t.length;++o){const r=t[i].radius+t[o].radius;q(t[i],t[o])+1e-10<r&&s(t[o],t[i])}const e=new Map;for(let i=0;i<t.length;++i){const o=n(t[i]).parent.setid;e.has(o)||e.set(o,[]),e.get(o).push(t[i])}return t.forEach(i=>{delete i.parent}),Array.from(e.values())}function dt(t){const n=s=>{const e=t.reduce((o,r)=>Math.max(o,r[s]+r.radius),Number.NEGATIVE_INFINITY),i=t.reduce((o,r)=>Math.min(o,r[s]-r.radius),Number.POSITIVE_INFINITY);return{max:e,min:i}};return{xRange:n("x"),yRange:n("y")}}function Dt(t,n,s){n==null&&(n=Math.PI/2);let e=Ft(t).map(u=>Object.assign({},u));const i=be(e);for(const u of i){me(u,n,s);const a=dt(u);u.size=(a.xRange.max-a.xRange.min)*(a.yRange.max-a.yRange.min),u.bounds=a}i.sort((u,a)=>a.size-u.size),e=i[0];let o=e.bounds;const r=(o.xRange.max-o.xRange.min)/50;function l(u,a,y){if(!u)return;const h=u.bounds;let b,p;if(a)b=o.xRange.max-h.xRange.min+r;else{b=o.xRange.max-h.xRange.max;const M=(h.xRange.max-h.xRange.min)/2-(o.xRange.max-o.xRange.min)/2;M<0&&(b+=M)}if(y)p=o.yRange.max-h.yRange.min+r;else{p=o.yRange.max-h.yRange.max;const M=(h.yRange.max-h.yRange.min)/2-(o.yRange.max-o.yRange.min)/2;M<0&&(p+=M)}for(const M of u)M.x+=b,M.y+=p,e.push(M)}let f=1;for(;f<i.length;)l(i[f],!0,!1),l(i[f+1],!1,!0),l(i[f+2],!0,!0),f+=3,o=dt(e);return Nt(e)}function Ot(t,n,s,e,i){const o=Ft(t);n-=2*e,s-=2*e;const{xRange:r,yRange:l}=dt(o);if(r.max===r.min||l.max===l.min)return console.log("not scaling solution: zero size detected"),t;let f,u;if(i){const b=Math.sqrt(i/Math.PI)*2;f=n/b,u=s/b}else f=n/(r.max-r.min),u=s/(l.max-l.min);const a=Math.min(u,f),y=(n-(r.max-r.min)*a)/2,h=(s-(l.max-l.min)*a)/2;return Nt(o.map(b=>({radius:a*b.radius,x:e+y+(b.x-r.min)*a,y:e+h+(b.y-l.min)*a,setid:b.setid})))}function Nt(t){const n={};for(const s of t)n[s.setid]=s;return n}function Ft(t){return Object.keys(t).map(s=>Object.assign(t[s],{setid:s}))}function ve(t={}){let n=!1,s=600,e=350,i=15,o=1e3,r=Math.PI/2,l=!0,f=null,u=!0,a=!0,y=null,h=null,b=!1,p=null,M=t&&t.symmetricalTextCentre?t.symmetricalTextCentre:!1,E={},_=t&&t.colourScheme?t.colourScheme:t&&t.colorScheme?t.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],S=0,g=function(x){if(x in E)return E[x];var d=E[x]=_[S];return S+=1,S>=_.length&&(S=0),d},m=At,v=tt;function c(x){let d=x.datum();const C=new Set;d.forEach(k=>{k.size==0&&k.sets.length==1&&C.add(k.sets[0])}),d=d.filter(k=>!k.sets.some(O=>C.has(O)));let I={},D={};if(d.length>0){let k=m(d,{lossFunction:v,distinct:b});l&&(k=Dt(k,r,h)),I=Ot(k,s,e,i,f),D=Lt(I,d,M)}const U={};d.forEach(k=>{k.label&&(U[k.sets]=k.label)});function V(k){if(k.sets in U)return U[k.sets];if(k.sets.length==1)return""+k.sets[0]}x.selectAll("svg").data([I]).enter().append("svg");const F=x.select("svg");n?F.attr("viewBox",`0 0 ${s} ${e}`):F.attr("width",s).attr("height",e);const R={};let T=!1;F.selectAll(".venn-area path").each(function(k){const O=this.getAttribute("d");k.sets.length==1&&O&&!b&&(T=!0,R[k.sets[0]]=Me(O))});function A(k){return O=>{const K=k.sets.map(et=>{let Y=R[et],X=I[et];return Y||(Y={x:s/2,y:e/2,radius:1}),X||(X={x:s/2,y:e/2,radius:1}),{x:Y.x*(1-O)+X.x*O,y:Y.y*(1-O)+X.y*O,radius:Y.radius*(1-O)+X.radius*O}});return St(K,p)}}const W=F.selectAll(".venn-area").data(d,k=>k.sets),P=W.enter().append("g").attr("class",k=>`venn-area venn-${k.sets.length==1?"circle":"intersection"}${k.colour||k.color?" venn-coloured":""}`).attr("data-venn-sets",k=>k.sets.join("_")),B=P.append("path"),G=P.append("text").attr("class","label").text(k=>V(k)).attr("text-anchor","middle").attr("dy",".35em").attr("x",s/2).attr("y",e/2);a&&(B.style("fill-opacity","0").filter(k=>k.sets.length==1).style("fill",k=>k.colour?k.colour:k.color?k.color:g(k.sets)).style("fill-opacity",".25"),G.style("fill",k=>k.colour||k.color?"#FFF":t.textFill?t.textFill:k.sets.length==1?g(k.sets):"#444"));function L(k){return typeof k.transition=="function"?k.transition("venn").duration(o):k}let z=x;T&&typeof z.transition=="function"?(z=L(x),z.selectAll("path").attrTween("d",A)):z.selectAll("path").attr("d",k=>St(k.sets.map(O=>I[O])),p);const N=z.selectAll("text").filter(k=>k.sets in D).text(k=>V(k)).attr("x",k=>Math.floor(D[k.sets].x)).attr("y",k=>Math.floor(D[k.sets].y));u&&(T?"on"in N?N.on("end",rt(I,V)):N.each("end",rt(I,V)):N.each(rt(I,V)));const j=L(W.exit()).remove();typeof W.transition=="function"&&j.selectAll("path").attrTween("d",A);const Q=j.selectAll("text").attr("x",s/2).attr("y",e/2);return y!==null&&(G.style("font-size","0px"),N.style("font-size",y),Q.style("font-size","0px")),{circles:I,textCentres:D,nodes:W,enter:P,update:z,exit:j}}return c.wrap=function(x){return arguments.length?(u=x,c):u},c.useViewBox=function(){return n=!0,c},c.width=function(x){return arguments.length?(s=x,c):s},c.height=function(x){return arguments.length?(e=x,c):e},c.padding=function(x){return arguments.length?(i=x,c):i},c.distinct=function(x){return arguments.length?(b=x,c):b},c.colours=function(x){return arguments.length?(g=x,c):g},c.colors=function(x){return arguments.length?(g=x,c):g},c.fontSize=function(x){return arguments.length?(y=x,c):y},c.round=function(x){return arguments.length?(p=x,c):p},c.duration=function(x){return arguments.length?(o=x,c):o},c.layoutFunction=function(x){return arguments.length?(m=x,c):m},c.normalize=function(x){return arguments.length?(l=x,c):l},c.scaleToFit=function(x){return arguments.length?(f=x,c):f},c.styled=function(x){return arguments.length?(a=x,c):a},c.orientation=function(x){return arguments.length?(r=x,c):r},c.orientationOrder=function(x){return arguments.length?(h=x,c):h},c.lossFunction=function(x){return arguments.length?(v=x==="default"?tt:x==="logRatio"?Ct:x,c):v},c}function rt(t,n){return function(s){const e=this,i=t[s.sets[0]].radius||50,o=n(s)||"",r=o.split(/\s+/).reverse(),f=(o.length+r.length)/3;let u=r.pop(),a=[u],y=0;const h=1.1;e.textContent=null;const b=[];function p(g){const m=e.ownerDocument.createElementNS(e.namespaceURI,"tspan");return m.textContent=g,b.push(m),e.append(m),m}let M=p(u);for(;u=r.pop(),!!u;){a.push(u);const g=a.join(" ");M.textContent=g,g.length>f&&M.getComputedTextLength()>i&&(a.pop(),M.textContent=a.join(" "),a=[u],M=p(u),y++)}const E=.35-y*h/2,_=e.getAttribute("x"),S=e.getAttribute("y");b.forEach((g,m)=>{g.setAttribute("x",_),g.setAttribute("y",S),g.setAttribute("dy",`${E+m*h}em`)})}}function at(t,n,s){let e=n[0].radius-q(n[0],t);for(let i=1;i<n.length;++i){const o=n[i].radius-q(n[i],t);o<=e&&(e=o)}for(let i=0;i<s.length;++i){const o=q(s[i],t)-s[i].radius;o<=e&&(e=o)}return e}function jt(t,n,s){const e=[];for(const a of t)e.push({x:a.x,y:a.y}),e.push({x:a.x+a.radius/2,y:a.y}),e.push({x:a.x-a.radius/2,y:a.y}),e.push({x:a.x,y:a.y+a.radius/2}),e.push({x:a.x,y:a.y-a.radius/2});let i=e[0],o=at(e[0],t,n);for(let a=1;a<e.length;++a){const y=at(e[a],t,n);y>=o&&(i=e[a],o=y)}const r=zt(a=>-1*at({x:a[0],y:a[1]},t,n),[i.x,i.y],{maxIterations:500,minErrorDelta:1e-10}).x,l={x:s?0:r[0],y:r[1]};let f=!0;for(const a of t)if(q(l,a)>a.radius){f=!1;break}for(const a of n)if(q(l,a)<a.radius){f=!1;break}if(f)return l;if(t.length==1)return{x:t[0].x,y:t[0].y};const u={};return st(t,u),u.arcs.length===0?{x:0,y:-1e3,disjoint:!0}:u.arcs.length==1?{x:u.arcs[0].circle.x,y:u.arcs[0].circle.y}:n.length?jt(t,[]):Et(u.arcs.map(a=>a.p1))}function Ie(t){const n={},s=Object.keys(t);for(const e of s)n[e]=[];for(let e=0;e<s.length;e++){const i=s[e],o=t[i];for(let r=e+1;r<s.length;++r){const l=s[r],f=t[l],u=q(o,f);u+f.radius<=o.radius+1e-10?n[l].push(i):u+o.radius<=f.radius+1e-10&&n[i].push(l)}}return n}function Lt(t,n,s){const e={},i=Ie(t);for(let o=0;o<n.length;++o){const r=n[o].sets,l={},f={};for(let h=0;h<r.length;++h){l[r[h]]=!0;const b=i[r[h]];for(let p=0;p<b.length;++p)f[b[p]]=!0}const u=[],a=[];for(let h in t)h in l?u.push(t[h]):h in f||a.push(t[h]);const y=jt(u,a,s);e[r]=y,y.disjoint&&n[o].size>0&&console.log("WARNING: area "+r+" not represented on screen")}return e}function ke(t,n,s){const e=[];return e.push(`
|
|
2
2
|
M`,t,n),e.push(`
|
|
3
3
|
m`,-s,0),e.push(`
|
|
4
4
|
a`,s,s,0,1,0,s*2,0),e.push(`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as ht,br as E,bz as $t,bt as It,b as bt,bv as d}from"./DXyyWeag.js";import{bs as yt,ca as k,aD as t,c9 as s,a7 as Ct,ay as Rt,W as kt,bn as wt,bH as H,bV as N,aA as U}from"./DYhIMPy1.js";import{G as At}from"./DyvrH0mm.js";import{b as Dt}from"./BaIAhI85.js";import{Iy as a,eu as Pt,ev as St,nV as Et,zf as Ut,nZ as _t,n_ as Ft,J3 as Tt,Jk as vt,J8 as xt,v4 as Wt,ul as Lt}from"./D5ej8a-y.js";import{b7 as Ht}from"./
|
|
1
|
+
import{t as ht,br as E,bz as $t,bt as It,b as bt,bv as d}from"./DXyyWeag.js";import{bs as yt,ca as k,aD as t,c9 as s,a7 as Ct,ay as Rt,W as kt,bn as wt,bH as H,bV as N,aA as U}from"./DYhIMPy1.js";import{G as At}from"./DyvrH0mm.js";import{b as Dt}from"./BaIAhI85.js";import{Iy as a,eu as Pt,ev as St,nV as Et,zf as Ut,nZ as _t,n_ as Ft,J3 as Tt,Jk as vt,J8 as xt,v4 as Wt,ul as Lt}from"./D5ej8a-y.js";import{b7 as Ht}from"./Bip3iRY7.js";import{g as Nt}from"./DfN8_dcw.js";import{dr as Ot,bN as qt,bC as Bt,bG as Gt,bE as Mt}from"./D3QcPFoL.js";import{ae as Jt}from"./CfcPGi-s.js";import{C as Kt}from"./0tj_yJAd.js";import{V as Vt}from"./D11z_ckk.js";import{bR as jt,bL as zt,b6 as Zt}from"./CqAUygYd.js";import{i as Qt}from"./H2jLkRRS.js";function Xt(_,f){if(new.target)return ht({component:Xt,..._});yt(f,!0);const O=()=>d(Y,"$gitRoots$",n),F=()=>d(X,"$workspace",n),q=()=>d(st,"$ftCommits$",n),B=()=>d(ot,"$ftOlderCommits$",n),y=()=>d(tt,"$commitRead$",n),G=()=>d(Z,"$foldUnchanged",n),M=()=>d(z,"$lineWrapping",n),J=()=>d(Q,"$diffSideBySide",n),K=()=>d(at,"$ftLoading$",n),[n,V]=It(),j=e=>{Vt(e,{embedded:!0,showExpand:!0,get expanded(){return t(C)},onToggleExpand:()=>{H(C,!t(C)),t(C)?t(R)?.expandAll():t(R)?.collapseAll()},get foldEnabled(){return G()},onToggleFold:()=>a.dispatch(xt()),get wrapEnabled(){return M()},onToggleWrap:()=>a.dispatch(vt()),get splitEnabled(){return J()},onToggleSplit:()=>a.dispatch(Tt())})},z=jt(),Z=zt(),Q=Zt();let h=E(f,"tab",7),i=E(f,"workspaceId",7),$=E(f,"isActive",7);const T=Nt(),g=Ht(()=>i()),X=Ot(g),Y=Jt(g),w=crypto.randomUUID(),tt=qt(g,w),c=s(()=>h().data?.commitHash||""),v=s(()=>h().data?.commitMessage||"");k(()=>{const e=i();if(!(!$()||!e||t(r)))return a.dispatch(Pt(e,"history")),()=>a.dispatch(St(e,"history"))});const r=s(()=>h().data?.gitRootId||""),x=s(()=>t(r)&&O().find(e=>e.id===t(r))?.path||""),et=s(()=>t(x)||F()?.worktreePath||F()?.repositoryPath||""),st=Bt(g),ot=Gt(g),at=Mt(g),nt=s(()=>q()||[]),it=s(()=>B()||[]),p=s(()=>t(r)?void 0:t(nt).find(e=>e.hash===t(c))||t(it).find(e=>e.hash===t(c))),A=s(()=>t(p)?.files||[]),D=s(()=>y()?.request.kind==="commitDetails"&&y().request.commitHash===t(c)&&(y().request.gitRootId??"")===t(r)?y():void 0),l=s(()=>t(D)?.result?.kind==="commitDetails"?t(D).result.details:null),rt=s(()=>t(l)?t(l).fileDetails.length>0?t(l).fileDetails:t(l).files.map(e=>({path:e,additions:0,deletions:0})):[]),dt=s(()=>t(D)?.loading??!1);k(()=>{const e=t(c),o=i(),I=t(r);if(!e||!o||t(A).length>0)return;const u=crypto.randomUUID();return a.dispatch(Et(o,w,u,{kind:"commitDetails",commitHash:e,gitRootId:I||void 0})),()=>a.dispatch(Ut(o,w,u))});const ct=s(()=>t(A).length>0?t(A):t(rt));let C=N(!0),R=N(null);const lt=s(()=>t(ct).map(e=>{const o=typeof e=="string"?e:e.path||"",I=typeof e=="string"?0:e.additions||0,u=typeof e=="string"?0:e.deletions||0;return{filePath:Qt(o)?o:`${t(et)}/${o}`,action:"modify",additions:I,deletions:u,toolName:"local",toolCallId:`commit-${t(c)}-${o}`,staged:!1,category:"committed",commitHash:t(c),commitMessage:t(v)}}));k(()=>{!T||!$()||T.registerActions({display:j})});const W=crypto.randomUUID();k(()=>{const e=i();if(!(!($()&&t(r))||!e))return a.dispatch(_t(e,W)),()=>a.dispatch(Ft(e,W))});var mt={get tab(){return h()},set tab(e){h(e),U()},get workspaceId(){return i()},set workspaceId(e){i(e),U()},get isActive(){return $()},set isActive(e){$(e),U()},$set:$t,$on:(e,o)=>bt(f,e,o)},L=Ct(),gt=Rt(L);At(gt,()=>JSON.stringify([i(),t(r),t(c)]),e=>{{let o=s(()=>K()||t(dt)),I=s(()=>t(r)||void 0),u=s(()=>t(x)||void 0),ut=s(()=>({hash:t(c),message:t(v),author:t(p)?.author||t(l)?.author,authorEmail:t(p)?.authorEmail||t(l)?.authorEmail,date:t(p)?.date||t(l)?.date,agentId:t(p)?.agentId,linkedNoteId:t(p)?.linkedNoteId}));Dt(Kt(e,{get isLoading(){return t(o)},get changes(){return t(lt)},get gitRootId(){return t(I)},get gitRootPath(){return t(u)},get commitInfo(){return t(ut)},onOpenAgent:(b,m)=>{const P=m?.metaKey||m?.ctrlKey||!1,S=m?.target?.closest("[data-panel-id]")?.getAttribute("data-panel-id")??void 0;a.dispatch(Lt(i(),{agentId:b,openInAdjacentPanel:P,sourcePanelId:S}))},onOpenNote:(b,m)=>{const P=m?.metaKey||m?.ctrlKey||!1,S=m?.target?.closest("[data-panel-id]")?.getAttribute("data-panel-id")??void 0;a.dispatch(Wt(i(),b,{openInAdjacentPanel:P,sourcePanelId:S}))}}),b=>H(R,b,!0),()=>t(R))}}),kt(_,L);var pt=wt(mt);return V(),pt}export{Xt as default};
|