turtlecode 0.3.27 → 0.3.29
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/assets/assets/{_basePickBy-Dseor5mu.js → _basePickBy-B_iojEAt.js} +1 -1
- package/assets/assets/{_baseUniq-Bh4-EzYg.js → _baseUniq-U_Pc1B-R.js} +1 -1
- package/assets/assets/{arc-DDkUJ-vf.js → arc-y7TA3kL0.js} +1 -1
- package/assets/assets/{architectureDiagram-2XIMDMQ5-Cu_GwT11.js → architectureDiagram-2XIMDMQ5-BtuBr_8D.js} +1 -1
- package/assets/assets/{auth-callback-DM_zJivD.js → auth-callback-D6fEUSOP.js} +1 -1
- package/assets/assets/{blockDiagram-WCTKOSBZ-Ds4_MC0T.js → blockDiagram-WCTKOSBZ-DPpbARm_.js} +1 -1
- package/assets/assets/{c4Diagram-IC4MRINW-C1os6NTb.js → c4Diagram-IC4MRINW-DT82jRyc.js} +1 -1
- package/assets/assets/channel-B5ZdBKid.js +1 -0
- package/assets/assets/{chunk-4BX2VUAB-CzOSrGqV.js → chunk-4BX2VUAB-DT9Cii3i.js} +1 -1
- package/assets/assets/{chunk-55IACEB6-B1ttgmiW.js → chunk-55IACEB6-k-YCbdfk.js} +1 -1
- package/assets/assets/{chunk-FMBD7UC4-B499Kca1.js → chunk-FMBD7UC4-B8vZVids.js} +1 -1
- package/assets/assets/{chunk-JSJVCQXG-DrDqUScK.js → chunk-JSJVCQXG-P9SBgzjq.js} +1 -1
- package/assets/assets/{chunk-KX2RTZJC-DoPKMzaO.js → chunk-KX2RTZJC-BVt0fO5A.js} +1 -1
- package/assets/assets/{chunk-NQ4KR5QH-BjJ1jZNF.js → chunk-NQ4KR5QH-B-xqpclb.js} +1 -1
- package/assets/assets/{chunk-QZHKN3VN-gDsChDdu.js → chunk-QZHKN3VN-8OzF2T1z.js} +1 -1
- package/assets/assets/{chunk-WL4C6EOR-C5oC_TBi.js → chunk-WL4C6EOR-CYQPYawR.js} +1 -1
- package/assets/assets/classDiagram-VBA2DB6C-B_GKGoPY.js +1 -0
- package/assets/assets/classDiagram-v2-RAHNMMFH-B_GKGoPY.js +1 -0
- package/assets/assets/clone-Dq4a-r80.js +1 -0
- package/assets/assets/{cose-bilkent-S5V4N54A-ik_5VCSt.js → cose-bilkent-S5V4N54A-CWWJH6JP.js} +1 -1
- package/assets/assets/{cssMode-mb36Grza.js → cssMode-5IvXkP6K.js} +1 -1
- package/assets/assets/{dagre-KLK3FWXG-8P1fIO85.js → dagre-KLK3FWXG-DJuf5yL5.js} +1 -1
- package/assets/assets/{design-panel-6tFmW_B_.js → design-panel-DGxOeM2o.js} +1 -1
- package/assets/assets/{diagram-E7M64L7V-BLOJFu6-.js → diagram-E7M64L7V-E4hkPMxk.js} +1 -1
- package/assets/assets/{diagram-IFDJBPK2-OV42IA4f.js → diagram-IFDJBPK2-TFQC2GU2.js} +1 -1
- package/assets/assets/{diagram-P4PSJMXO-CaMvBW1Z.js → diagram-P4PSJMXO-DeTjCOyW.js} +1 -1
- package/assets/assets/{dialog-clone-project-w2gsbuNI.js → dialog-clone-project-CAfI0lHh.js} +1 -1
- package/assets/assets/{dialog-connect-provider-DdYA-iVa.js → dialog-connect-provider-B0LPEC99.js} +2 -2
- package/assets/assets/{dialog-create-project-Dw9WU914.js → dialog-create-project-DgZYKQLe.js} +1 -1
- package/assets/assets/{dialog-edit-project-5fEpR5ot.js → dialog-edit-project-DDzRssw5.js} +1 -1
- package/assets/assets/{dialog-fork-SsSEd7Gd.js → dialog-fork-D2bQrrpP.js} +1 -1
- package/assets/assets/{dialog-manage-models-BGCaMX3K.js → dialog-manage-models-tJeOYGFh.js} +1 -1
- package/assets/assets/{dialog-select-directory-BmhGo7hs.js → dialog-select-directory-CjI5IZBg.js} +3 -3
- package/assets/assets/{dialog-select-file-BAlD1Ycx.js → dialog-select-file-COsv0m3J.js} +1 -1
- package/assets/assets/{dialog-select-mcp-zSO7yt3A.js → dialog-select-mcp-B96RaTdf.js} +1 -1
- package/assets/assets/{dialog-select-model-unpaid-CzFXK3Wy.js → dialog-select-model-unpaid-DEY-u5MJ.js} +2 -2
- package/assets/assets/{dialog-select-provider-B1pJlMg-.js → dialog-select-provider-DpwHcs_z.js} +1 -1
- package/assets/assets/{dialog-select-server-COPMeCxW.js → dialog-select-server-uqL2WKd-.js} +1 -1
- package/assets/assets/dialog-settings-CXEAJdw0.js +1 -0
- package/assets/assets/{erDiagram-INFDFZHY-DmuZ1S1z.js → erDiagram-INFDFZHY-9Hmz-EGm.js} +1 -1
- package/assets/assets/{flowDiagram-PKNHOUZH-DKoU7L24.js → flowDiagram-PKNHOUZH-4kZKRPZR.js} +1 -1
- package/assets/assets/{freemarker2-DLqz4_VA.js → freemarker2-SvgbhnJ2.js} +1 -1
- package/assets/assets/{ganttDiagram-A5KZAMGK-DbIBL0_R.js → ganttDiagram-A5KZAMGK-DAqQvIYI.js} +1 -1
- package/assets/assets/{ghostty-web-DFI9ftn5.js → ghostty-web-DZbVeO6H.js} +1 -1
- package/assets/assets/{gitGraphDiagram-K3NZZRJ6-CQqTl59q.js → gitGraphDiagram-K3NZZRJ6-wnUF9rfV.js} +1 -1
- package/assets/assets/{graph-CrTunjeA.js → graph-k_yNWxmC.js} +1 -1
- package/assets/assets/{handlebars-BDL8K3Y_.js → handlebars-B2ONVutZ.js} +1 -1
- package/assets/assets/{home-D7OQgy6F.js → home-M9U5I_mN.js} +1 -1
- package/assets/assets/{html-8dPmOEoE.js → html-DmnoTn9a.js} +1 -1
- package/assets/assets/{htmlMode-Bhhem-U-.js → htmlMode-COQ2FePW.js} +1 -1
- package/assets/assets/{index-b2zsFxHN.css → index-9S5eLovl.css} +1 -1
- package/assets/assets/{index-Cl9Gy4vs.js → index-Ck426Hvx.js} +324 -324
- package/assets/assets/{infoDiagram-LFFYTUFH-BiTkmEo0.js → infoDiagram-LFFYTUFH-Cq59-9s7.js} +1 -1
- package/assets/assets/{ishikawaDiagram-PHBUUO56-DFiA_QyF.js → ishikawaDiagram-PHBUUO56-BohmBc5G.js} +1 -1
- package/assets/assets/{javascript-DqYKby0P.js → javascript-0JqfZ-ZK.js} +1 -1
- package/assets/assets/{journeyDiagram-4ABVD52K-Dvm95U5p.js → journeyDiagram-4ABVD52K-CPHl3wPm.js} +1 -1
- package/assets/assets/{jsonMode-DNVxNWJA.js → jsonMode-BZ4_MoUH.js} +1 -1
- package/assets/assets/{kanban-definition-K7BYSVSG-Bg07LtOy.js → kanban-definition-K7BYSVSG-DUTAJe6Q.js} +1 -1
- package/assets/assets/{layout-BO4GaxHC.js → layout-BvYQlcGB.js} +1 -1
- package/assets/assets/{liquid-Bi6CZ4qd.js → liquid-DL0F7vFb.js} +1 -1
- package/assets/assets/{list-CbLd2QpP.js → list-ChIlMjYm.js} +1 -1
- package/assets/assets/{mdx-DB3BLyJY.js → mdx-BTXLl_TQ.js} +1 -1
- package/assets/assets/{mermaid.core-DekouHcR.js → mermaid.core-8TjZbLRD.js} +5 -5
- package/assets/assets/{mindmap-definition-YRQLILUH-CPS4QuqT.js → mindmap-definition-YRQLILUH-C6lKdbbb.js} +1 -1
- package/assets/assets/{model-viewer-OosROonL.js → model-viewer-CeIucdad.js} +1 -1
- package/assets/assets/{pieDiagram-SKSYHLDU-zz3NxaCg.js → pieDiagram-SKSYHLDU-DozGYWW7.js} +1 -1
- package/assets/assets/{python-dfHvjKmx.js → python-BTFINbZn.js} +1 -1
- package/assets/assets/{quadrantDiagram-337W2JSQ-Brh_f_kd.js → quadrantDiagram-337W2JSQ-dUO9Q20A.js} +1 -1
- package/assets/assets/{razor-DF4OOi_x.js → razor-BvR9Hnqa.js} +1 -1
- package/assets/assets/{requirementDiagram-Z7DCOOCP-kQXvpU2f.js → requirementDiagram-Z7DCOOCP-K8_TdzHK.js} +1 -1
- package/assets/assets/{sankeyDiagram-WA2Y5GQK-7a0tOx42.js → sankeyDiagram-WA2Y5GQK-BstnZ38B.js} +1 -1
- package/assets/assets/{select-yT_m8Opa.js → select-D2r3Hs22.js} +1 -1
- package/assets/assets/{sequenceDiagram-2WXFIKYE-CfqOEUPe.js → sequenceDiagram-2WXFIKYE-Cn6skN5F.js} +1 -1
- package/assets/assets/{server-row-gThwY27P.js → server-row-BwUYMVVB.js} +1 -1
- package/assets/assets/{session-C1WGvWnQ.js → session-CU929GsB.js} +26 -26
- package/assets/assets/{stateDiagram-RAJIS63D-C2rvyf8y.js → stateDiagram-RAJIS63D-B-iHRuam.js} +1 -1
- package/assets/assets/stateDiagram-v2-FVOUBMTO-DBUaNCVy.js +1 -0
- package/assets/assets/{status-popover-body-nrXdjhgo.js → status-popover-body-CHGxemen.js} +2 -2
- package/assets/assets/{switch-DnfWoh_i.js → switch-mNVnqcUl.js} +1 -1
- package/assets/assets/{tag-CzzNjHnn.js → tag-3NQn3mEK.js} +1 -1
- package/assets/assets/{timeline-definition-YZTLITO2-gBwlsZuH.js → timeline-definition-YZTLITO2-C3Q6oQ9i.js} +1 -1
- package/assets/assets/{treemap-KZPCXAKY-CkeXn87D.js → treemap-KZPCXAKY-D3fK9Jyz.js} +1 -1
- package/assets/assets/{trellis-badge-demo-B_CUPFto.js → trellis-badge-demo-CNkMd4YG.js} +1 -1
- package/assets/assets/{tsMode-BScrNcq4.js → tsMode-CxEfAf9Z.js} +1 -1
- package/assets/assets/{typescript-BVCwsEpW.js → typescript-I4Xe9fRj.js} +1 -1
- package/assets/assets/{vennDiagram-LZ73GAT5-DggLRdTn.js → vennDiagram-LZ73GAT5-Cx1RzW9o.js} +1 -1
- package/assets/assets/{xlsx-editor-slR-Oj8_.js → xlsx-editor-BURweVsy.js} +1 -1
- package/assets/assets/{xml-B3C8PLq5.js → xml-Z8-6vgF3.js} +1 -1
- package/assets/assets/{xychartDiagram-JWTSCODW-DGguDmaO.js → xychartDiagram-JWTSCODW-BWNqIjxZ.js} +1 -1
- package/assets/assets/{yaml-7L4M4RJ2.js → yaml-CfXlO5Lk.js} +1 -1
- package/assets/index.html +2 -2
- package/package.json +13 -13
- package/assets/assets/channel-BAzJXAXH.js +0 -1
- package/assets/assets/classDiagram-VBA2DB6C-zr3CTQn1.js +0 -1
- package/assets/assets/classDiagram-v2-RAHNMMFH-zr3CTQn1.js +0 -1
- package/assets/assets/clone-CPL09VTv.js +0 -1
- package/assets/assets/dialog-settings-CXlKXQA5.js +0 -1
- package/assets/assets/stateDiagram-v2-FVOUBMTO-Bygu4WaE.js +0 -1
package/assets/assets/{gitGraphDiagram-K3NZZRJ6-CQqTl59q.js → gitGraphDiagram-K3NZZRJ6-wnUF9rfV.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{p as Y}from"./chunk-4BX2VUAB-CzOSrGqV.js";import{I as K}from"./chunk-QZHKN3VN-gDsChDdu.js";import{q as U,p as V,s as X,g as J,a as Q,b as Z,_ as l,l as m,u as rr,D as er,y as tr,j as v,E as ar,F as sr,G as nr,H as or}from"./mermaid.core-DekouHcR.js";import{p as cr}from"./treemap-KZPCXAKY-CkeXn87D.js";import{s as ir}from"./transform-BwXaE9hv.js";import"./index-Cl9Gy4vs.js";import"./_baseUniq-Bh4-EzYg.js";import"./_basePickBy-Dseor5mu.js";import"./clone-CPL09VTv.js";var p={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},dr=sr.gitGraph,M=l(()=>ar({...dr,...nr().gitGraph}),"getConfig"),c=new K(()=>{const t=M(),r=t.mainBranchName,a=t.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:a}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function H(){return or({length:7})}l(H,"getID");function D(t,r){const a=Object.create(null);return t.reduce((n,e)=>{const s=r(e);return a[s]||(a[s]=!0,n.push(e)),n},[])}l(D,"uniqBy");var hr=l(function(t){c.records.direction=t},"setDirection"),lr=l(function(t){m.debug("options str",t),t=t?.trim(),t=t||"{}";try{c.records.options=JSON.parse(t)}catch(r){m.error("error while parsing gitGraph options",r.message)}},"setOptions"),$r=l(function(){return c.records.options},"getOptions"),fr=l(function(t){let r=t.msg,a=t.id;const n=t.type;let e=t.tags;m.info("commit",r,a,n,e),m.debug("Entering commit:",r,a,n,e);const s=M();a=v.sanitizeText(a,s),r=v.sanitizeText(r,s),e=e?.map(d=>v.sanitizeText(d,s));const h={id:a||c.records.seq+"-"+H(),message:r,seq:c.records.seq++,type:n??p.NORMAL,tags:e??[],parents:c.records.head==null?[]:[c.records.head.id],branch:c.records.currBranch};c.records.head=h,m.info("main branch",s.mainBranchName),c.records.commits.has(h.id)&&m.warn(`Commit ID ${h.id} already exists`),c.records.commits.set(h.id,h),c.records.branches.set(c.records.currBranch,h.id),m.debug("in pushCommit "+h.id)},"commit"),gr=l(function(t){let r=t.name;const a=t.order;if(r=v.sanitizeText(r,M()),c.records.branches.has(r))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);c.records.branches.set(r,c.records.head!=null?c.records.head.id:null),c.records.branchConfig.set(r,{name:r,order:a}),F(r),m.debug("in createBranch")},"branch"),yr=l(t=>{let r=t.branch,a=t.id;const n=t.type,e=t.tags,s=M();r=v.sanitizeText(r,s),a&&(a=v.sanitizeText(a,s));const h=c.records.branches.get(c.records.currBranch),d=c.records.branches.get(r),o=h?c.records.commits.get(h):void 0,$=d?c.records.commits.get(d):void 0;if(o&&$&&o.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(c.records.currBranch===r){const i=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw i.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},i}if(o===void 0||!o){const i=new Error(`Incorrect usage of "merge". Current branch (${c.records.currBranch})has no commits`);throw i.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},i}if(!c.records.branches.has(r)){const i=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw i.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},i}if($===void 0||!$){const i=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw i.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},i}if(o===$){const i=new Error('Incorrect usage of "merge". Both branches have same head');throw i.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},i}if(a&&c.records.commits.has(a)){const i=new Error('Incorrect usage of "merge". Commit with id:'+a+" already exists, use different custom id");throw i.hash={text:`merge ${r} ${a} ${n} ${e?.join(" ")}`,token:`merge ${r} ${a} ${n} ${e?.join(" ")}`,expected:[`merge ${r} ${a}_UNIQUE ${n} ${e?.join(" ")}`]},i}const f=d||"",y={id:a||`${c.records.seq}-${H()}`,message:`merged branch ${r} into ${c.records.currBranch}`,seq:c.records.seq++,parents:c.records.head==null?[]:[c.records.head.id,f],branch:c.records.currBranch,type:p.MERGE,customType:n,customId:!!a,tags:e??[]};c.records.head=y,c.records.commits.set(y.id,y),c.records.branches.set(c.records.currBranch,y.id),m.debug(c.records.branches),m.debug("in mergeBranch")},"merge"),ur=l(function(t){let r=t.id,a=t.targetId,n=t.tags,e=t.parent;m.debug("Entering cherryPick:",r,a,n);const s=M();if(r=v.sanitizeText(r,s),a=v.sanitizeText(a,s),n=n?.map(o=>v.sanitizeText(o,s)),e=v.sanitizeText(e,s),!r||!c.records.commits.has(r)){const o=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw o.hash={text:`cherryPick ${r} ${a}`,token:`cherryPick ${r} ${a}`,expected:["cherry-pick abc"]},o}const h=c.records.commits.get(r);if(h===void 0||!h)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(e&&!(Array.isArray(h.parents)&&h.parents.includes(e)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const d=h.branch;if(h.type===p.MERGE&&!e)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!a||!c.records.commits.has(a)){if(d===c.records.currBranch){const y=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw y.hash={text:`cherryPick ${r} ${a}`,token:`cherryPick ${r} ${a}`,expected:["cherry-pick abc"]},y}const o=c.records.branches.get(c.records.currBranch);if(o===void 0||!o){const y=new Error(`Incorrect usage of "cherry-pick". Current branch (${c.records.currBranch})has no commits`);throw y.hash={text:`cherryPick ${r} ${a}`,token:`cherryPick ${r} ${a}`,expected:["cherry-pick abc"]},y}const $=c.records.commits.get(o);if($===void 0||!$){const y=new Error(`Incorrect usage of "cherry-pick". Current branch (${c.records.currBranch})has no commits`);throw y.hash={text:`cherryPick ${r} ${a}`,token:`cherryPick ${r} ${a}`,expected:["cherry-pick abc"]},y}const f={id:c.records.seq+"-"+H(),message:`cherry-picked ${h?.message} into ${c.records.currBranch}`,seq:c.records.seq++,parents:c.records.head==null?[]:[c.records.head.id,h.id],branch:c.records.currBranch,type:p.CHERRY_PICK,tags:n?n.filter(Boolean):[`cherry-pick:${h.id}${h.type===p.MERGE?`|parent:${e}`:""}`]};c.records.head=f,c.records.commits.set(f.id,f),c.records.branches.set(c.records.currBranch,f.id),m.debug(c.records.branches),m.debug("in cherryPick")}},"cherryPick"),F=l(function(t){if(t=v.sanitizeText(t,M()),c.records.branches.has(t)){c.records.currBranch=t;const r=c.records.branches.get(c.records.currBranch);r===void 0||!r?c.records.head=null:c.records.head=c.records.commits.get(r)??null}else{const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${t}")`);throw r.hash={text:`checkout ${t}`,token:`checkout ${t}`,expected:[`branch ${t}`]},r}},"checkout");function P(t,r,a){const n=t.indexOf(r);n===-1?t.push(a):t.splice(n,1,a)}l(P,"upsert");function _(t){const r=t.reduce((e,s)=>e.seq>s.seq?e:s,t[0]);let a="";t.forEach(function(e){e===r?a+=" *":a+=" |"});const n=[a,r.id,r.seq];for(const e in c.records.branches)c.records.branches.get(e)===r.id&&n.push(e);if(m.debug(n.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){const e=c.records.commits.get(r.parents[0]);P(t,r,e),r.parents[1]&&t.push(c.records.commits.get(r.parents[1]))}else{if(r.parents.length==0)return;if(r.parents[0]){const e=c.records.commits.get(r.parents[0]);P(t,r,e)}}t=D(t,e=>e.id),_(t)}l(_,"prettyPrintCommitHistory");var xr=l(function(){m.debug(c.records.commits);const t=N()[0];_([t])},"prettyPrint"),pr=l(function(){c.reset(),tr()},"clear"),mr=l(function(){return[...c.records.branchConfig.values()].map((r,a)=>r.order!==null&&r.order!==void 0?r:{...r,order:parseFloat(`0.${a}`)}).sort((r,a)=>(r.order??0)-(a.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),br=l(function(){return c.records.branches},"getBranches"),wr=l(function(){return c.records.commits},"getCommits"),N=l(function(){const t=[...c.records.commits.values()];return t.forEach(function(r){m.debug(r.id)}),t.sort((r,a)=>r.seq-a.seq),t},"getCommitsArray"),vr=l(function(){return c.records.currBranch},"getCurrentBranch"),Cr=l(function(){return c.records.direction},"getDirection"),Er=l(function(){return c.records.head},"getHead"),S={commitType:p,getConfig:M,setDirection:hr,setOptions:lr,getOptions:$r,commit:fr,branch:gr,merge:yr,cherryPick:ur,checkout:F,prettyPrint:xr,clear:pr,getBranchesAsObjArray:mr,getBranches:br,getCommits:wr,getCommitsArray:N,getCurrentBranch:vr,getDirection:Cr,getHead:Er,setAccTitle:Z,getAccTitle:Q,getAccDescription:J,setAccDescription:X,setDiagramTitle:V,getDiagramTitle:U},Tr=l((t,r)=>{Y(t,r),t.dir&&r.setDirection(t.dir);for(const a of t.statements)Br(a,r)},"populate"),Br=l((t,r)=>{const n={Commit:l(e=>r.commit(Lr(e)),"Commit"),Branch:l(e=>r.branch(kr(e)),"Branch"),Merge:l(e=>r.merge(Mr(e)),"Merge"),Checkout:l(e=>r.checkout(Ir(e)),"Checkout"),CherryPicking:l(e=>r.cherryPick(Rr(e)),"CherryPicking")}[t.$type];n?n(t):m.error(`Unknown statement type: ${t.$type}`)},"parseStatement"),Lr=l(t=>({id:t.id,msg:t.message??"",type:t.type!==void 0?p[t.type]:p.NORMAL,tags:t.tags??void 0}),"parseCommit"),kr=l(t=>({name:t.name,order:t.order??0}),"parseBranch"),Mr=l(t=>({branch:t.branch,id:t.id??"",type:t.type!==void 0?p[t.type]:void 0,tags:t.tags??void 0}),"parseMerge"),Ir=l(t=>t.branch,"parseCheckout"),Rr=l(t=>({id:t.id,targetId:"",tags:t.tags?.length===0?void 0:t.tags,parent:t.parent}),"parseCherryPicking"),Gr={parse:l(async t=>{const r=await cr("gitGraph",t);m.debug(r),Tr(r,S)},"parse")},B=10,L=40,C=4,E=2,k=8,b=new Map,w=new Map,O=30,I=new Map,q=[],T=0,x="LR",Or=l(()=>{b.clear(),w.clear(),I.clear(),T=0,q=[],x="LR"},"clear"),W=l(t=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof t=="string"?t.split(/\\n|\n|<br\s*\/?>/gi):t).forEach(n=>{const e=document.createElementNS("http://www.w3.org/2000/svg","tspan");e.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),e.setAttribute("dy","1em"),e.setAttribute("x","0"),e.setAttribute("class","row"),e.textContent=n.trim(),r.appendChild(e)}),r},"drawText"),j=l(t=>{let r,a,n;return x==="BT"?(a=l((e,s)=>e<=s,"comparisonFunc"),n=1/0):(a=l((e,s)=>e>=s,"comparisonFunc"),n=0),t.forEach(e=>{const s=x==="TB"||x=="BT"?w.get(e)?.y:w.get(e)?.x;s!==void 0&&a(s,n)&&(r=e,n=s)}),r},"findClosestParent"),qr=l(t=>{let r="",a=1/0;return t.forEach(n=>{const e=w.get(n).y;e<=a&&(r=n,a=e)}),r||void 0},"findClosestParentBT"),Hr=l((t,r,a)=>{let n=a,e=a;const s=[];t.forEach(h=>{const d=r.get(h);if(!d)throw new Error(`Commit not found for key ${h}`);d.parents.length?(n=Pr(d),e=Math.max(n,e)):s.push(d),_r(d,n)}),n=e,s.forEach(h=>{zr(h,n,a)}),t.forEach(h=>{const d=r.get(h);if(d?.parents.length){const o=qr(d.parents);n=w.get(o).y-L,n<=e&&(e=n);const $=b.get(d.branch).pos,f=n-B;w.set(d.id,{x:$,y:f})}})},"setParallelBTPos"),Ar=l(t=>{const r=j(t.parents.filter(n=>n!==null));if(!r)throw new Error(`Closest parent not found for commit ${t.id}`);const a=w.get(r)?.y;if(a===void 0)throw new Error(`Closest parent position not found for commit ${t.id}`);return a},"findClosestParentPos"),Pr=l(t=>Ar(t)+L,"calculateCommitPosition"),_r=l((t,r)=>{const a=b.get(t.branch);if(!a)throw new Error(`Branch not found for commit ${t.id}`);const n=a.pos,e=r+B;return w.set(t.id,{x:n,y:e}),{x:n,y:e}},"setCommitPosition"),zr=l((t,r,a)=>{const n=b.get(t.branch);if(!n)throw new Error(`Branch not found for commit ${t.id}`);const e=r+a,s=n.pos;w.set(t.id,{x:s,y:e})},"setRootPosition"),Dr=l((t,r,a,n,e,s)=>{if(s===p.HIGHLIGHT)t.append("rect").attr("x",a.x-10).attr("y",a.y-10).attr("width",20).attr("height",20).attr("class",`commit ${r.id} commit-highlight${e%k} ${n}-outer`),t.append("rect").attr("x",a.x-6).attr("y",a.y-6).attr("width",12).attr("height",12).attr("class",`commit ${r.id} commit${e%k} ${n}-inner`);else if(s===p.CHERRY_PICK)t.append("circle").attr("cx",a.x).attr("cy",a.y).attr("r",10).attr("class",`commit ${r.id} ${n}`),t.append("circle").attr("cx",a.x-3).attr("cy",a.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${r.id} ${n}`),t.append("circle").attr("cx",a.x+3).attr("cy",a.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${r.id} ${n}`),t.append("line").attr("x1",a.x+3).attr("y1",a.y+1).attr("x2",a.x).attr("y2",a.y-5).attr("stroke","#fff").attr("class",`commit ${r.id} ${n}`),t.append("line").attr("x1",a.x-3).attr("y1",a.y+1).attr("x2",a.x).attr("y2",a.y-5).attr("stroke","#fff").attr("class",`commit ${r.id} ${n}`);else{const h=t.append("circle");if(h.attr("cx",a.x),h.attr("cy",a.y),h.attr("r",r.type===p.MERGE?9:10),h.attr("class",`commit ${r.id} commit${e%k}`),s===p.MERGE){const d=t.append("circle");d.attr("cx",a.x),d.attr("cy",a.y),d.attr("r",6),d.attr("class",`commit ${n} ${r.id} commit${e%k}`)}s===p.REVERSE&&t.append("path").attr("d",`M ${a.x-5},${a.y-5}L${a.x+5},${a.y+5}M${a.x-5},${a.y+5}L${a.x+5},${a.y-5}`).attr("class",`commit ${n} ${r.id} commit${e%k}`)}},"drawCommitBullet"),Fr=l((t,r,a,n,e)=>{if(r.type!==p.CHERRY_PICK&&(r.customId&&r.type===p.MERGE||r.type!==p.MERGE)&&e.showCommitLabel){const s=t.append("g"),h=s.insert("rect").attr("class","commit-label-bkg"),d=s.append("text").attr("x",n).attr("y",a.y+25).attr("class","commit-label").text(r.id),o=d.node()?.getBBox();if(o&&(h.attr("x",a.posWithOffset-o.width/2-E).attr("y",a.y+13.5).attr("width",o.width+2*E).attr("height",o.height+2*E),x==="TB"||x==="BT"?(h.attr("x",a.x-(o.width+4*C+5)).attr("y",a.y-12),d.attr("x",a.x-(o.width+4*C)).attr("y",a.y+o.height-12)):d.attr("x",a.posWithOffset-o.width/2),e.rotateCommitLabel))if(x==="TB"||x==="BT")d.attr("transform","rotate(-45, "+a.x+", "+a.y+")"),h.attr("transform","rotate(-45, "+a.x+", "+a.y+")");else{const $=-7.5-(o.width+10)/25*9.5,f=10+o.width/25*8.5;s.attr("transform","translate("+$+", "+f+") rotate(-45, "+n+", "+a.y+")")}}},"drawCommitLabel"),Nr=l((t,r,a,n)=>{if(r.tags.length>0){let e=0,s=0,h=0;const d=[];for(const o of r.tags.reverse()){const $=t.insert("polygon"),f=t.append("circle"),y=t.append("text").attr("y",a.y-16-e).attr("class","tag-label").text(o),i=y.node()?.getBBox();if(!i)throw new Error("Tag bbox not found");s=Math.max(s,i.width),h=Math.max(h,i.height),y.attr("x",a.posWithOffset-i.width/2),d.push({tag:y,hole:f,rect:$,yOffset:e}),e+=20}for(const{tag:o,hole:$,rect:f,yOffset:y}of d){const i=h/2,u=a.y-19.2-y;if(f.attr("class","tag-label-bkg").attr("points",`
|
|
1
|
+
import{p as Y}from"./chunk-4BX2VUAB-DT9Cii3i.js";import{I as K}from"./chunk-QZHKN3VN-8OzF2T1z.js";import{q as U,p as V,s as X,g as J,a as Q,b as Z,_ as l,l as m,u as rr,D as er,y as tr,j as v,E as ar,F as sr,G as nr,H as or}from"./mermaid.core-8TjZbLRD.js";import{p as cr}from"./treemap-KZPCXAKY-D3fK9Jyz.js";import{s as ir}from"./transform-BwXaE9hv.js";import"./index-Ck426Hvx.js";import"./_baseUniq-U_Pc1B-R.js";import"./_basePickBy-B_iojEAt.js";import"./clone-Dq4a-r80.js";var p={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},dr=sr.gitGraph,M=l(()=>ar({...dr,...nr().gitGraph}),"getConfig"),c=new K(()=>{const t=M(),r=t.mainBranchName,a=t.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:a}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function H(){return or({length:7})}l(H,"getID");function D(t,r){const a=Object.create(null);return t.reduce((n,e)=>{const s=r(e);return a[s]||(a[s]=!0,n.push(e)),n},[])}l(D,"uniqBy");var hr=l(function(t){c.records.direction=t},"setDirection"),lr=l(function(t){m.debug("options str",t),t=t?.trim(),t=t||"{}";try{c.records.options=JSON.parse(t)}catch(r){m.error("error while parsing gitGraph options",r.message)}},"setOptions"),$r=l(function(){return c.records.options},"getOptions"),fr=l(function(t){let r=t.msg,a=t.id;const n=t.type;let e=t.tags;m.info("commit",r,a,n,e),m.debug("Entering commit:",r,a,n,e);const s=M();a=v.sanitizeText(a,s),r=v.sanitizeText(r,s),e=e?.map(d=>v.sanitizeText(d,s));const h={id:a||c.records.seq+"-"+H(),message:r,seq:c.records.seq++,type:n??p.NORMAL,tags:e??[],parents:c.records.head==null?[]:[c.records.head.id],branch:c.records.currBranch};c.records.head=h,m.info("main branch",s.mainBranchName),c.records.commits.has(h.id)&&m.warn(`Commit ID ${h.id} already exists`),c.records.commits.set(h.id,h),c.records.branches.set(c.records.currBranch,h.id),m.debug("in pushCommit "+h.id)},"commit"),gr=l(function(t){let r=t.name;const a=t.order;if(r=v.sanitizeText(r,M()),c.records.branches.has(r))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);c.records.branches.set(r,c.records.head!=null?c.records.head.id:null),c.records.branchConfig.set(r,{name:r,order:a}),F(r),m.debug("in createBranch")},"branch"),yr=l(t=>{let r=t.branch,a=t.id;const n=t.type,e=t.tags,s=M();r=v.sanitizeText(r,s),a&&(a=v.sanitizeText(a,s));const h=c.records.branches.get(c.records.currBranch),d=c.records.branches.get(r),o=h?c.records.commits.get(h):void 0,$=d?c.records.commits.get(d):void 0;if(o&&$&&o.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(c.records.currBranch===r){const i=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw i.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},i}if(o===void 0||!o){const i=new Error(`Incorrect usage of "merge". Current branch (${c.records.currBranch})has no commits`);throw i.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},i}if(!c.records.branches.has(r)){const i=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw i.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},i}if($===void 0||!$){const i=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw i.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},i}if(o===$){const i=new Error('Incorrect usage of "merge". Both branches have same head');throw i.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},i}if(a&&c.records.commits.has(a)){const i=new Error('Incorrect usage of "merge". Commit with id:'+a+" already exists, use different custom id");throw i.hash={text:`merge ${r} ${a} ${n} ${e?.join(" ")}`,token:`merge ${r} ${a} ${n} ${e?.join(" ")}`,expected:[`merge ${r} ${a}_UNIQUE ${n} ${e?.join(" ")}`]},i}const f=d||"",y={id:a||`${c.records.seq}-${H()}`,message:`merged branch ${r} into ${c.records.currBranch}`,seq:c.records.seq++,parents:c.records.head==null?[]:[c.records.head.id,f],branch:c.records.currBranch,type:p.MERGE,customType:n,customId:!!a,tags:e??[]};c.records.head=y,c.records.commits.set(y.id,y),c.records.branches.set(c.records.currBranch,y.id),m.debug(c.records.branches),m.debug("in mergeBranch")},"merge"),ur=l(function(t){let r=t.id,a=t.targetId,n=t.tags,e=t.parent;m.debug("Entering cherryPick:",r,a,n);const s=M();if(r=v.sanitizeText(r,s),a=v.sanitizeText(a,s),n=n?.map(o=>v.sanitizeText(o,s)),e=v.sanitizeText(e,s),!r||!c.records.commits.has(r)){const o=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw o.hash={text:`cherryPick ${r} ${a}`,token:`cherryPick ${r} ${a}`,expected:["cherry-pick abc"]},o}const h=c.records.commits.get(r);if(h===void 0||!h)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(e&&!(Array.isArray(h.parents)&&h.parents.includes(e)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const d=h.branch;if(h.type===p.MERGE&&!e)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!a||!c.records.commits.has(a)){if(d===c.records.currBranch){const y=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw y.hash={text:`cherryPick ${r} ${a}`,token:`cherryPick ${r} ${a}`,expected:["cherry-pick abc"]},y}const o=c.records.branches.get(c.records.currBranch);if(o===void 0||!o){const y=new Error(`Incorrect usage of "cherry-pick". Current branch (${c.records.currBranch})has no commits`);throw y.hash={text:`cherryPick ${r} ${a}`,token:`cherryPick ${r} ${a}`,expected:["cherry-pick abc"]},y}const $=c.records.commits.get(o);if($===void 0||!$){const y=new Error(`Incorrect usage of "cherry-pick". Current branch (${c.records.currBranch})has no commits`);throw y.hash={text:`cherryPick ${r} ${a}`,token:`cherryPick ${r} ${a}`,expected:["cherry-pick abc"]},y}const f={id:c.records.seq+"-"+H(),message:`cherry-picked ${h?.message} into ${c.records.currBranch}`,seq:c.records.seq++,parents:c.records.head==null?[]:[c.records.head.id,h.id],branch:c.records.currBranch,type:p.CHERRY_PICK,tags:n?n.filter(Boolean):[`cherry-pick:${h.id}${h.type===p.MERGE?`|parent:${e}`:""}`]};c.records.head=f,c.records.commits.set(f.id,f),c.records.branches.set(c.records.currBranch,f.id),m.debug(c.records.branches),m.debug("in cherryPick")}},"cherryPick"),F=l(function(t){if(t=v.sanitizeText(t,M()),c.records.branches.has(t)){c.records.currBranch=t;const r=c.records.branches.get(c.records.currBranch);r===void 0||!r?c.records.head=null:c.records.head=c.records.commits.get(r)??null}else{const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${t}")`);throw r.hash={text:`checkout ${t}`,token:`checkout ${t}`,expected:[`branch ${t}`]},r}},"checkout");function P(t,r,a){const n=t.indexOf(r);n===-1?t.push(a):t.splice(n,1,a)}l(P,"upsert");function _(t){const r=t.reduce((e,s)=>e.seq>s.seq?e:s,t[0]);let a="";t.forEach(function(e){e===r?a+=" *":a+=" |"});const n=[a,r.id,r.seq];for(const e in c.records.branches)c.records.branches.get(e)===r.id&&n.push(e);if(m.debug(n.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){const e=c.records.commits.get(r.parents[0]);P(t,r,e),r.parents[1]&&t.push(c.records.commits.get(r.parents[1]))}else{if(r.parents.length==0)return;if(r.parents[0]){const e=c.records.commits.get(r.parents[0]);P(t,r,e)}}t=D(t,e=>e.id),_(t)}l(_,"prettyPrintCommitHistory");var xr=l(function(){m.debug(c.records.commits);const t=N()[0];_([t])},"prettyPrint"),pr=l(function(){c.reset(),tr()},"clear"),mr=l(function(){return[...c.records.branchConfig.values()].map((r,a)=>r.order!==null&&r.order!==void 0?r:{...r,order:parseFloat(`0.${a}`)}).sort((r,a)=>(r.order??0)-(a.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),br=l(function(){return c.records.branches},"getBranches"),wr=l(function(){return c.records.commits},"getCommits"),N=l(function(){const t=[...c.records.commits.values()];return t.forEach(function(r){m.debug(r.id)}),t.sort((r,a)=>r.seq-a.seq),t},"getCommitsArray"),vr=l(function(){return c.records.currBranch},"getCurrentBranch"),Cr=l(function(){return c.records.direction},"getDirection"),Er=l(function(){return c.records.head},"getHead"),S={commitType:p,getConfig:M,setDirection:hr,setOptions:lr,getOptions:$r,commit:fr,branch:gr,merge:yr,cherryPick:ur,checkout:F,prettyPrint:xr,clear:pr,getBranchesAsObjArray:mr,getBranches:br,getCommits:wr,getCommitsArray:N,getCurrentBranch:vr,getDirection:Cr,getHead:Er,setAccTitle:Z,getAccTitle:Q,getAccDescription:J,setAccDescription:X,setDiagramTitle:V,getDiagramTitle:U},Tr=l((t,r)=>{Y(t,r),t.dir&&r.setDirection(t.dir);for(const a of t.statements)Br(a,r)},"populate"),Br=l((t,r)=>{const n={Commit:l(e=>r.commit(Lr(e)),"Commit"),Branch:l(e=>r.branch(kr(e)),"Branch"),Merge:l(e=>r.merge(Mr(e)),"Merge"),Checkout:l(e=>r.checkout(Ir(e)),"Checkout"),CherryPicking:l(e=>r.cherryPick(Rr(e)),"CherryPicking")}[t.$type];n?n(t):m.error(`Unknown statement type: ${t.$type}`)},"parseStatement"),Lr=l(t=>({id:t.id,msg:t.message??"",type:t.type!==void 0?p[t.type]:p.NORMAL,tags:t.tags??void 0}),"parseCommit"),kr=l(t=>({name:t.name,order:t.order??0}),"parseBranch"),Mr=l(t=>({branch:t.branch,id:t.id??"",type:t.type!==void 0?p[t.type]:void 0,tags:t.tags??void 0}),"parseMerge"),Ir=l(t=>t.branch,"parseCheckout"),Rr=l(t=>({id:t.id,targetId:"",tags:t.tags?.length===0?void 0:t.tags,parent:t.parent}),"parseCherryPicking"),Gr={parse:l(async t=>{const r=await cr("gitGraph",t);m.debug(r),Tr(r,S)},"parse")},B=10,L=40,C=4,E=2,k=8,b=new Map,w=new Map,O=30,I=new Map,q=[],T=0,x="LR",Or=l(()=>{b.clear(),w.clear(),I.clear(),T=0,q=[],x="LR"},"clear"),W=l(t=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof t=="string"?t.split(/\\n|\n|<br\s*\/?>/gi):t).forEach(n=>{const e=document.createElementNS("http://www.w3.org/2000/svg","tspan");e.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),e.setAttribute("dy","1em"),e.setAttribute("x","0"),e.setAttribute("class","row"),e.textContent=n.trim(),r.appendChild(e)}),r},"drawText"),j=l(t=>{let r,a,n;return x==="BT"?(a=l((e,s)=>e<=s,"comparisonFunc"),n=1/0):(a=l((e,s)=>e>=s,"comparisonFunc"),n=0),t.forEach(e=>{const s=x==="TB"||x=="BT"?w.get(e)?.y:w.get(e)?.x;s!==void 0&&a(s,n)&&(r=e,n=s)}),r},"findClosestParent"),qr=l(t=>{let r="",a=1/0;return t.forEach(n=>{const e=w.get(n).y;e<=a&&(r=n,a=e)}),r||void 0},"findClosestParentBT"),Hr=l((t,r,a)=>{let n=a,e=a;const s=[];t.forEach(h=>{const d=r.get(h);if(!d)throw new Error(`Commit not found for key ${h}`);d.parents.length?(n=Pr(d),e=Math.max(n,e)):s.push(d),_r(d,n)}),n=e,s.forEach(h=>{zr(h,n,a)}),t.forEach(h=>{const d=r.get(h);if(d?.parents.length){const o=qr(d.parents);n=w.get(o).y-L,n<=e&&(e=n);const $=b.get(d.branch).pos,f=n-B;w.set(d.id,{x:$,y:f})}})},"setParallelBTPos"),Ar=l(t=>{const r=j(t.parents.filter(n=>n!==null));if(!r)throw new Error(`Closest parent not found for commit ${t.id}`);const a=w.get(r)?.y;if(a===void 0)throw new Error(`Closest parent position not found for commit ${t.id}`);return a},"findClosestParentPos"),Pr=l(t=>Ar(t)+L,"calculateCommitPosition"),_r=l((t,r)=>{const a=b.get(t.branch);if(!a)throw new Error(`Branch not found for commit ${t.id}`);const n=a.pos,e=r+B;return w.set(t.id,{x:n,y:e}),{x:n,y:e}},"setCommitPosition"),zr=l((t,r,a)=>{const n=b.get(t.branch);if(!n)throw new Error(`Branch not found for commit ${t.id}`);const e=r+a,s=n.pos;w.set(t.id,{x:s,y:e})},"setRootPosition"),Dr=l((t,r,a,n,e,s)=>{if(s===p.HIGHLIGHT)t.append("rect").attr("x",a.x-10).attr("y",a.y-10).attr("width",20).attr("height",20).attr("class",`commit ${r.id} commit-highlight${e%k} ${n}-outer`),t.append("rect").attr("x",a.x-6).attr("y",a.y-6).attr("width",12).attr("height",12).attr("class",`commit ${r.id} commit${e%k} ${n}-inner`);else if(s===p.CHERRY_PICK)t.append("circle").attr("cx",a.x).attr("cy",a.y).attr("r",10).attr("class",`commit ${r.id} ${n}`),t.append("circle").attr("cx",a.x-3).attr("cy",a.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${r.id} ${n}`),t.append("circle").attr("cx",a.x+3).attr("cy",a.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${r.id} ${n}`),t.append("line").attr("x1",a.x+3).attr("y1",a.y+1).attr("x2",a.x).attr("y2",a.y-5).attr("stroke","#fff").attr("class",`commit ${r.id} ${n}`),t.append("line").attr("x1",a.x-3).attr("y1",a.y+1).attr("x2",a.x).attr("y2",a.y-5).attr("stroke","#fff").attr("class",`commit ${r.id} ${n}`);else{const h=t.append("circle");if(h.attr("cx",a.x),h.attr("cy",a.y),h.attr("r",r.type===p.MERGE?9:10),h.attr("class",`commit ${r.id} commit${e%k}`),s===p.MERGE){const d=t.append("circle");d.attr("cx",a.x),d.attr("cy",a.y),d.attr("r",6),d.attr("class",`commit ${n} ${r.id} commit${e%k}`)}s===p.REVERSE&&t.append("path").attr("d",`M ${a.x-5},${a.y-5}L${a.x+5},${a.y+5}M${a.x-5},${a.y+5}L${a.x+5},${a.y-5}`).attr("class",`commit ${n} ${r.id} commit${e%k}`)}},"drawCommitBullet"),Fr=l((t,r,a,n,e)=>{if(r.type!==p.CHERRY_PICK&&(r.customId&&r.type===p.MERGE||r.type!==p.MERGE)&&e.showCommitLabel){const s=t.append("g"),h=s.insert("rect").attr("class","commit-label-bkg"),d=s.append("text").attr("x",n).attr("y",a.y+25).attr("class","commit-label").text(r.id),o=d.node()?.getBBox();if(o&&(h.attr("x",a.posWithOffset-o.width/2-E).attr("y",a.y+13.5).attr("width",o.width+2*E).attr("height",o.height+2*E),x==="TB"||x==="BT"?(h.attr("x",a.x-(o.width+4*C+5)).attr("y",a.y-12),d.attr("x",a.x-(o.width+4*C)).attr("y",a.y+o.height-12)):d.attr("x",a.posWithOffset-o.width/2),e.rotateCommitLabel))if(x==="TB"||x==="BT")d.attr("transform","rotate(-45, "+a.x+", "+a.y+")"),h.attr("transform","rotate(-45, "+a.x+", "+a.y+")");else{const $=-7.5-(o.width+10)/25*9.5,f=10+o.width/25*8.5;s.attr("transform","translate("+$+", "+f+") rotate(-45, "+n+", "+a.y+")")}}},"drawCommitLabel"),Nr=l((t,r,a,n)=>{if(r.tags.length>0){let e=0,s=0,h=0;const d=[];for(const o of r.tags.reverse()){const $=t.insert("polygon"),f=t.append("circle"),y=t.append("text").attr("y",a.y-16-e).attr("class","tag-label").text(o),i=y.node()?.getBBox();if(!i)throw new Error("Tag bbox not found");s=Math.max(s,i.width),h=Math.max(h,i.height),y.attr("x",a.posWithOffset-i.width/2),d.push({tag:y,hole:f,rect:$,yOffset:e}),e+=20}for(const{tag:o,hole:$,rect:f,yOffset:y}of d){const i=h/2,u=a.y-19.2-y;if(f.attr("class","tag-label-bkg").attr("points",`
|
|
2
2
|
${n-s/2-C/2},${u+E}
|
|
3
3
|
${n-s/2-C/2},${u-E}
|
|
4
4
|
${a.posWithOffset-s/2-C},${u-i-E}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ar as N,as as v,at as f,au as b,av as E}from"./mermaid.core-
|
|
1
|
+
import{ar as N,as as v,at as f,au as b,av as E}from"./mermaid.core-8TjZbLRD.js";import{a as j,c as P,k as _,f as g,d,i as l,v as p,r as D}from"./_baseUniq-U_Pc1B-R.js";var w=N(function(o){return j(P(o,1,v,!0))}),F="\0",a="\0",O="";class L{constructor(e={}){this._isDirected=Object.prototype.hasOwnProperty.call(e,"directed")?e.directed:!0,this._isMultigraph=Object.prototype.hasOwnProperty.call(e,"multigraph")?e.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(e,"compound")?e.compound:!1,this._label=void 0,this._defaultNodeLabelFn=f(void 0),this._defaultEdgeLabelFn=f(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[a]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return b(e)||(e=f(e)),this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return _(this._nodes)}sources(){var e=this;return g(this.nodes(),function(t){return E(e._in[t])})}sinks(){var e=this;return g(this.nodes(),function(t){return E(e._out[t])})}setNodes(e,t){var s=arguments,i=this;return d(e,function(r){s.length>1?i.setNode(r,t):i.setNode(r)}),this}setNode(e,t){return Object.prototype.hasOwnProperty.call(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=a,this._children[e]={},this._children[a][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return Object.prototype.hasOwnProperty.call(this._nodes,e)}removeNode(e){if(Object.prototype.hasOwnProperty.call(this._nodes,e)){var t=s=>this.removeEdge(this._edgeObjs[s]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],d(this.children(e),s=>{this.setParent(s)}),delete this._children[e]),d(_(this._in[e]),t),delete this._in[e],delete this._preds[e],d(_(this._out[e]),t),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(l(t))t=a;else{t+="";for(var s=t;!l(s);s=this.parent(s))if(s===e)throw new Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var t=this._parent[e];if(t!==a)return t}}children(e){if(l(e)&&(e=a),this._isCompound){var t=this._children[e];if(t)return _(t)}else{if(e===a)return this.nodes();if(this.hasNode(e))return[]}}predecessors(e){var t=this._preds[e];if(t)return _(t)}successors(e){var t=this._sucs[e];if(t)return _(t)}neighbors(e){var t=this.predecessors(e);if(t)return w(t,this.successors(e))}isLeaf(e){var t;return this.isDirected()?t=this.successors(e):t=this.neighbors(e),t.length===0}filterNodes(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var s=this;d(this._nodes,function(n,h){e(h)&&t.setNode(h,n)}),d(this._edgeObjs,function(n){t.hasNode(n.v)&&t.hasNode(n.w)&&t.setEdge(n,s.edge(n))});var i={};function r(n){var h=s.parent(n);return h===void 0||t.hasNode(h)?(i[n]=h,h):h in i?i[h]:r(h)}return this._isCompound&&d(t.nodes(),function(n){t.setParent(n,r(n))}),t}setDefaultEdgeLabel(e){return b(e)||(e=f(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return p(this._edgeObjs)}setPath(e,t){var s=this,i=arguments;return D(e,function(r,n){return i.length>1?s.setEdge(r,n,t):s.setEdge(r,n),n}),this}setEdge(){var e,t,s,i,r=!1,n=arguments[0];typeof n=="object"&&n!==null&&"v"in n?(e=n.v,t=n.w,s=n.name,arguments.length===2&&(i=arguments[1],r=!0)):(e=n,t=arguments[1],s=arguments[3],arguments.length>2&&(i=arguments[2],r=!0)),e=""+e,t=""+t,l(s)||(s=""+s);var h=c(this._isDirected,e,t,s);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,h))return r&&(this._edgeLabels[h]=i),this;if(!l(s)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(t),this._edgeLabels[h]=r?i:this._defaultEdgeLabelFn(e,t,s);var u=M(this._isDirected,e,t,s);return e=u.v,t=u.w,Object.freeze(u),this._edgeObjs[h]=u,y(this._preds[t],e),y(this._sucs[e],t),this._in[t][h]=u,this._out[e][h]=u,this._edgeCount++,this}edge(e,t,s){var i=arguments.length===1?m(this._isDirected,arguments[0]):c(this._isDirected,e,t,s);return this._edgeLabels[i]}hasEdge(e,t,s){var i=arguments.length===1?m(this._isDirected,arguments[0]):c(this._isDirected,e,t,s);return Object.prototype.hasOwnProperty.call(this._edgeLabels,i)}removeEdge(e,t,s){var i=arguments.length===1?m(this._isDirected,arguments[0]):c(this._isDirected,e,t,s),r=this._edgeObjs[i];return r&&(e=r.v,t=r.w,delete this._edgeLabels[i],delete this._edgeObjs[i],C(this._preds[t],e),C(this._sucs[e],t),delete this._in[t][i],delete this._out[e][i],this._edgeCount--),this}inEdges(e,t){var s=this._in[e];if(s){var i=p(s);return t?g(i,function(r){return r.v===t}):i}}outEdges(e,t){var s=this._out[e];if(s){var i=p(s);return t?g(i,function(r){return r.w===t}):i}}nodeEdges(e,t){var s=this.inEdges(e,t);if(s)return s.concat(this.outEdges(e,t))}}L.prototype._nodeCount=0;L.prototype._edgeCount=0;function y(o,e){o[e]?o[e]++:o[e]=1}function C(o,e){--o[e]||delete o[e]}function c(o,e,t,s){var i=""+e,r=""+t;if(!o&&i>r){var n=i;i=r,r=n}return i+O+r+O+(l(s)?F:s)}function M(o,e,t,s){var i=""+e,r=""+t;if(!o&&i>r){var n=i;i=r,r=n}var h={v:i,w:r};return s&&(h.name=s),h}function m(o,e){return c(o,e.v,e.w,e.name)}export{L as G};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a3 as l}from"./index-
|
|
1
|
+
import{a3 as l}from"./index-Ck426Hvx.js";/*!-----------------------------------------------------------------------------
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
3
|
* Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
|
|
4
4
|
* Released under the MIT license
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as K,a as N,b as H,c as O,d as U,e as J,f as Q,g as V,h as W,i as D,o as X,j as Y,k as Z,l,m as r,T as ee,n as te,S as E,p as le,I as re,B as w,F as ae,D as se,q as ie,s as ne,r as oe,t as $,v as ce}from"./index-
|
|
1
|
+
import{u as K,a as N,b as H,c as O,d as U,e as J,f as Q,g as V,h as W,i as D,o as X,j as Y,k as Z,l,m as r,T as ee,n as te,S as E,p as le,I as re,B as w,F as ae,D as se,q as ie,s as ne,r as oe,t as $,v as ce}from"./index-Ck426Hvx.js";import{DialogSelectDirectory as ue}from"./dialog-select-directory-CjI5IZBg.js";import{DialogCreateProject as de}from"./dialog-create-project-DgZYKQLe.js";import"./list-ChIlMjYm.js";var fe=$('<div class="flex items-center gap-2 text-12-regular text-text-weak"><div class="size-1.5 rounded-full bg-icon-success-base"></div><button class="text-text-weak hover:text-text-base transition-colors ml-1">Sign out'),pe=$('<div class="w-full max-w-5xl mx-auto px-6 pb-8"><div class="text-12-medium text-text-weak mb-4"></div><div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3">'),ge=$('<div class="flex flex-col min-h-[calc(100vh-80px)] w-full"><div class="flex-1 flex flex-col items-center justify-center px-4 pb-8"><div class="w-full max-w-2xl flex flex-col items-center gap-8"><div class="flex flex-col items-center gap-2"></div><div class=w-full><div class=relative><button class="absolute bottom-3 right-3 p-2 text-text-weak hover:text-text-base transition-colors"></button></div></div><div class="flex flex-wrap items-center justify-center gap-2">'),me=$('<button class="flex flex-col rounded-10 border border-border-weak-base overflow-hidden hover:border-border-strong-base transition-colors text-left group"><div class="h-28 w-full flex items-center justify-center"><span class="text-20-medium text-white/60 select-none"></span></div><div class="px-3 py-2.5 flex flex-col gap-0.5"><span class="text-13-medium text-text-base truncate group-hover:text-text-strong transition-colors"></span><span class="text-11-regular text-text-weak">');function he(i){return i.split("/").filter(Boolean).pop()??i}function I(i){let o=0;for(let c=0;c<i.length;c++)o=i.charCodeAt(c)+((o<<5)-o);return`hsl(${Math.abs(o)%360}, 40%, 25%)`}function ke(){const i=K(),o=N(),k=H(),c=O(),R=U(),P=J(),j=Q(),a=V(),[p,z]=W("");D(()=>i.data.path.home);const u=D(()=>i.data.project.slice().sort((e,t)=>(t.time.updated??t.time.created)-(e.time.updated??e.time.created)));X(()=>{const e=a.pendingPrompt();e&&(z(e),a.clearPendingPrompt())});function n(e){o.projects.open(e),P.projects.touch(e),R(`/${oe(e)}`)}async function y(){function e(t){if(Array.isArray(t))for(const f of t)n(f);else t&&n(t)}if(k.openDirectoryPickerDialog&&P.isLocal()){const t=await k.openDirectoryPickerDialog?.({title:j.t("command.project.open"),multiple:!0});e(t)}else c.show(()=>r(ue,{multiple:!0,onSelect:e}),()=>e(null))}function d(e){if(a.isAuthRequired()&&!a.isAuthenticated()){a.login(p());return}e()}async function T(e){e.key==="Enter"&&!e.shiftKey&&(e.preventDefault(),p().trim()&&d(()=>{u().length>0?n(u()[0].worktree):y()}))}function g(e){switch(e){case"new":d(()=>{c.show(()=>r(de,{onSelect:t=>{if(Array.isArray(t))for(const f of t)n(f);else t&&n(t)}}),()=>{})});break;case"open":d(()=>y());break;case"clone":d(()=>{});break;case"template":d(()=>{});break}}return(()=>{var e=ge(),t=e.firstChild,f=t.firstChild,_=f.firstChild,q=_.nextSibling,F=q.firstChild,C=F.firstChild,m=q.nextSibling;return Y(s=>requestAnimationFrame(()=>Z(s,{opacity:[0,1],y:[4,0]},{type:"spring",stiffness:400,damping:30})),e),l(f,r(ee,{class:"mx-auto"}),_),l(_,r(E,{get when(){return te(()=>!!a.isAuthRequired())()&&a.isAuthenticated()},get children(){var s=fe(),h=s.firstChild,x=h.nextSibling;return l(s,()=>a.user()?.email,x),x.$$click=()=>a.logout(),s}})),l(F,r(le,{multiline:!0,get value(){return p()},onChange:z,onKeyDown:T,placeholder:"Make anything...",class:"w-full min-h-[120px] p-4 pr-12 text-16-regular bg-surface-base border border-border-weak-base rounded-12 resize-none focus:outline-none focus:border-border-strong-base transition-colors"}),C),C.$$click=()=>{p().trim()&&d(()=>{u().length>0?n(u()[0].worktree):y()})},l(C,r(re,{name:"arrow-up",size:"small"})),l(m,r(w,{variant:"ghost",size:"normal",icon:"plus",class:"text-12-regular",onClick:()=>g("new"),children:"New project"}),null),l(m,r(w,{variant:"ghost",size:"normal",icon:"folder-add-left",class:"text-12-regular",onClick:()=>g("open"),children:"Open local dir"}),null),l(m,r(w,{variant:"ghost",size:"normal",icon:"github",class:"text-12-regular",onClick:()=>g("clone"),children:"Clone git repo"}),null),l(m,r(w,{variant:"ghost",size:"normal",icon:"fork",class:"text-12-regular",onClick:()=>g("template"),children:"Start with template"}),null),l(e,r(E,{get when(){return u().length>0},get children(){var s=pe(),h=s.firstChild,x=h.nextSibling;return l(h,()=>j.t("home.recentProjects")),l(x,r(ae,{get each(){return u()},children:v=>{const b=D(()=>he(v.worktree));return(()=>{var S=me(),A=S.firstChild,B=A.firstChild,L=A.nextSibling,M=L.firstChild,G=M.nextSibling;return S.$$click=()=>n(v.worktree),l(B,()=>b().charAt(0).toUpperCase()),l(M,b),l(G,()=>se.fromMillis(v.time.updated??v.time.created).toRelative()),ie(xe=>ne(A,"background",`linear-gradient(135deg, ${I(b())}, ${I(b()+"x")})`)),S})()}})),s}}),null),e})()}ce(["click"]);export{ke as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a3 as s}from"./index-
|
|
1
|
+
import{a3 as s}from"./index-Ck426Hvx.js";/*!-----------------------------------------------------------------------------
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
3
|
* Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
|
|
4
4
|
* Released under the MIT license
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a3 as lt}from"./index-
|
|
1
|
+
import{a3 as lt}from"./index-Ck426Hvx.js";/*!-----------------------------------------------------------------------------
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
3
|
* Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
|
|
4
4
|
* Released under the MIT license
|