zen-gitsync 2.15.11 → 2.15.12
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 +3 -3
- package/src/gitCommit.js +475 -475
- package/src/ui/public/assets/AppVersionBadge-BaXEI9Aq.js +2 -0
- package/src/ui/public/assets/BranchSelector-DJhEF0y9.js +1 -0
- package/src/ui/public/assets/CommitForm-BfpcK-bz.js +6 -0
- package/src/ui/public/assets/ConsoleView-D838O0O6.js +17 -0
- package/src/ui/public/assets/CustomCommandManager-BcCK46df.js +1 -0
- package/src/ui/public/assets/EditorView-DnnqYNGF.js +0 -0
- package/src/ui/public/assets/{FlowExecutionViewer-CJgoxffE.js → FlowExecutionViewer-CSlMmcDS.js} +1 -1
- package/src/ui/public/assets/FlowOrchestrationWorkspace-UgHpZ3FR.js +21 -0
- package/src/ui/public/assets/LogList-uUgskwwp.js +7 -0
- package/src/ui/public/assets/MindmapView-CCmFMiHR.js +1 -0
- package/src/ui/public/assets/MonitorView-BxoqeX70.js +1 -0
- package/src/ui/public/assets/ProjectStartupButton-C3AwivIB.js +1 -0
- package/src/ui/public/assets/{RemoteRepoCard-CKQguRWi.js → RemoteRepoCard-BbxeVpje.js} +1 -1
- package/src/ui/public/assets/SourceMapView-DKv-Y6t_.js +3 -0
- package/src/ui/public/assets/{SvgIcon-DOkE0Qie.js → SvgIcon-sMM8XFgm.js} +1 -1
- package/src/ui/public/assets/TemplateManager-Dzj8rXVw.js +1 -0
- package/src/ui/public/assets/UserInputNode-BU7Trzq-.js +1 -0
- package/src/ui/public/assets/WorkbenchView-DTgRoOkv.js +12 -0
- package/src/ui/public/assets/{_plugin-vue_export-helper-DvV-QrsM.js → _plugin-vue_export-helper-8ryIYVvs.js} +1 -1
- package/src/ui/public/assets/{configStore-BRR4SloR.js → configStore-D77uNk8X.js} +1 -1
- package/src/ui/public/assets/element-plus-D8SQiesr.js +17 -0
- package/src/ui/public/assets/element-plus-DB_sOyH_.css +1 -0
- package/src/ui/public/assets/{flow-mindmap-BMvnvRl8.js → flow-mindmap-BLa-kSA7.js} +1 -1
- package/src/ui/public/assets/index-CpFreGqX.js +23 -0
- package/src/ui/public/assets/{socket-io-C2w3MxRu.js → socket-io-B1foIbJS.js} +1 -1
- package/src/ui/public/assets/{vendor--LaaJk9m.js → vendor-B9orL8iU.js} +37 -37
- package/src/ui/public/assets/vendor-Dm_yd-By.css +1 -0
- package/src/ui/public/assets/{vue-flow-MtbKS8yD.js → vue-flow-BY7LODit.js} +1 -1
- package/src/ui/public/favicon.svg +75 -75
- package/src/ui/public/index.html +27 -27
- package/src/ui/public/logo.svg +74 -74
- package/src/ui/server/middleware/requestLogger.js +53 -53
- package/src/ui/server/routes/branchStatus.js +105 -105
- package/src/ui/server/routes/fileOpen.js +309 -309
- package/src/ui/server/routes/fs.js +791 -791
- package/src/ui/server/routes/git/diff.js +426 -426
- package/src/ui/server/routes/git/diffUtils.js +149 -149
- package/src/ui/server/routes/git/stash.js +550 -550
- package/src/ui/server/routes/git/tags.js +176 -176
- package/src/ui/server/routes/git.js +181 -181
- package/src/ui/server/routes/gitOps.js +1211 -1211
- package/src/ui/server/routes/process.js +86 -86
- package/src/ui/server/routes/status.js +67 -67
- package/src/ui/server/utils/createSavePortToFile.js +48 -48
- package/src/ui/server/utils/instanceRegistry.js +282 -282
- package/src/ui/server/utils/startServerOnAvailablePort.js +116 -116
- package/src/utils/index.js +1168 -1168
- package/src/ui/public/assets/AppVersionBadge-CEhrATQo.js +0 -2
- package/src/ui/public/assets/BranchSelector-xLl3O-4I.js +0 -1
- package/src/ui/public/assets/CommitForm--izGtr_x.js +0 -6
- package/src/ui/public/assets/ConsoleView-BLYfnXAy.js +0 -17
- package/src/ui/public/assets/CustomCommandManager-D8Qd3b9m.js +0 -1
- package/src/ui/public/assets/EditorView-DG8tqp3L.js +0 -0
- package/src/ui/public/assets/FlowOrchestrationWorkspace-BAIqeASp.js +0 -21
- package/src/ui/public/assets/LogList-DjuL8nWB.js +0 -7
- package/src/ui/public/assets/MindmapView-DPomtQsu.js +0 -1
- package/src/ui/public/assets/MonitorView-gZhz528u.js +0 -1
- package/src/ui/public/assets/ProjectStartupButton-C8nDEd8N.js +0 -1
- package/src/ui/public/assets/SourceMapView-DfSRy6lc.js +0 -3
- package/src/ui/public/assets/TemplateManager-BJZloJIO.js +0 -1
- package/src/ui/public/assets/UserInputNode-DpRNQzrz.js +0 -1
- package/src/ui/public/assets/WorkbenchView-vaZsec5Z.js +0 -12
- package/src/ui/public/assets/element-plus-CL7fBdM_.js +0 -24
- package/src/ui/public/assets/element-plus-Cu9Y2raX.css +0 -1
- package/src/ui/public/assets/index-BAFCDhj2.js +0 -23
- package/src/ui/public/assets/vendor-CCbwTgrE.css +0 -1
- package/src/ui/server/.claude/codediff.txt +0 -8
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Cn as e,Fn as t,Hn as n,Jn as r,Ln as i,Mn as a,Sn as o,Tn as s,Un as c,Vn as l,Xn as u,Zn as d,_n as f,_r as p,ar as m,cn as h,gn as g,gr as _,hn as v,ln as y,mn as b,mr as x,on as S,pr as C,sn as w,sr as T,tn as E,un as D,vn as O,xn as k,zn as A}from"./element-plus-CL7fBdM_.js";var j=Object.defineProperty,M=(e,t,n)=>t in e?j(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,N=(e,t,n)=>M(e,typeof t==`symbol`?t:t+``,n),P=[`width`,`height`,`stroke-width`],ee={key:4,points:`6 9 12 15 18 9`},te={key:5,points:`9 6 15 12 9 18`},F=s({__name:`Icon`,props:{name:{},size:{},stroke:{}},setup(e){return(t,n)=>(A(),O(`svg`,{width:e.size??16,height:e.size??16,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":e.stroke??1.8,"stroke-linecap":`round`,"stroke-linejoin":`round`,"aria-hidden":`true`},[e.name===`add`?(A(),O(D,{key:0},[n[0]||=v(`circle`,{cx:`12`,cy:`12`,r:`9`},null,-1),n[1]||=v(`line`,{x1:`12`,y1:`8`,x2:`12`,y2:`16`},null,-1),n[2]||=v(`line`,{x1:`8`,y1:`12`,x2:`16`,y2:`12`},null,-1)],64)):e.name===`minus`?(A(),O(D,{key:1},[n[3]||=v(`circle`,{cx:`12`,cy:`12`,r:`9`},null,-1),n[4]||=v(`line`,{x1:`8`,y1:`12`,x2:`16`,y2:`12`},null,-1)],64)):e.name===`delete`?(A(),O(D,{key:2},[n[5]||=k(`<polyline points="4 7 20 7"></polyline><path d="M9 7 V5 a1 1 0 0 1 1 -1 h4 a1 1 0 0 1 1 1 V7"></path><path d="M6 7 l1 12 a1 1 0 0 0 1 1 h8 a1 1 0 0 0 1 -1 l1 -12"></path><line x1="10" y1="11" x2="10" y2="18"></line><line x1="14" y1="11" x2="14" y2="18"></line>`,5)],64)):e.name===`edit`?(A(),O(D,{key:3},[n[6]||=v(`path`,{d:`M4 20 l4 -1 11 -11 -3 -3 -11 11 z`},null,-1),n[7]||=v(`line`,{x1:`14`,y1:`6`,x2:`18`,y2:`10`},null,-1)],64)):e.name===`collapse`?(A(),O(`polyline`,ee)):e.name===`expand`?(A(),O(`polyline`,te)):e.name===`collapse-all`?(A(),O(D,{key:6},[n[8]||=k(`<line x1="4" y1="4" x2="10" y2="10"></line><polyline points="6 10 10 10 10 6"></polyline><line x1="20" y1="4" x2="14" y2="10"></line><polyline points="14 6 14 10 18 10"></polyline><line x1="20" y1="20" x2="14" y2="14"></line><polyline points="14 18 14 14 18 14"></polyline><line x1="4" y1="20" x2="10" y2="14"></line><polyline points="6 14 10 14 10 18"></polyline>`,8)],64)):e.name===`expand-all`?(A(),O(D,{key:7},[n[9]||=k(`<line x1="10" y1="10" x2="4" y2="4"></line><polyline points="4 6 4 4 6 4"></polyline><line x1="14" y1="10" x2="20" y2="4"></line><polyline points="20 6 20 4 18 4"></polyline><line x1="14" y1="14" x2="20" y2="20"></line><polyline points="20 18 20 20 18 20"></polyline><line x1="10" y1="14" x2="4" y2="20"></line><polyline points="4 18 4 20 6 20"></polyline>`,8)],64)):e.name===`expand-level-1`?(A(),O(D,{key:8},[n[10]||=k(`<circle cx="12" cy="5" r="1.8" fill="currentColor" stroke="none"></circle><line x1="12" y1="7" x2="12" y2="11"></line><line x1="12" y1="11" x2="5" y2="17"></line><line x1="12" y1="11" x2="12" y2="17"></line><line x1="12" y1="11" x2="19" y2="17"></line><circle cx="5" cy="19" r="1.8" fill="currentColor" stroke="none"></circle><circle cx="12" cy="19" r="1.8" fill="currentColor" stroke="none"></circle><circle cx="19" cy="19" r="1.8" fill="currentColor" stroke="none"></circle>`,8)],64)):e.name===`expand-level-2`?(A(),O(D,{key:9},[n[11]||=k(`<circle cx="12" cy="3" r="1.4" fill="currentColor" stroke="none"></circle><line x1="12" y1="4.5" x2="12" y2="7"></line><line x1="12" y1="7" x2="5" y2="11"></line><line x1="12" y1="7" x2="12" y2="11"></line><line x1="12" y1="7" x2="19" y2="11"></line><line x1="5" y1="11" x2="3" y2="16"></line><line x1="5" y1="11" x2="7" y2="16"></line><line x1="12" y1="11" x2="10" y2="16"></line><line x1="12" y1="11" x2="14" y2="16"></line><line x1="19" y1="11" x2="17" y2="16"></line><line x1="19" y1="11" x2="21" y2="16"></line><circle cx="5" cy="11" r="1.4" fill="currentColor" stroke="none"></circle><circle cx="12" cy="11" r="1.4" fill="currentColor" stroke="none"></circle><circle cx="19" cy="11" r="1.4" fill="currentColor" stroke="none"></circle><circle cx="3" cy="18" r="1.4" fill="currentColor" stroke="none"></circle><circle cx="7" cy="18" r="1.4" fill="currentColor" stroke="none"></circle><circle cx="10" cy="18" r="1.4" fill="currentColor" stroke="none"></circle><circle cx="14" cy="18" r="1.4" fill="currentColor" stroke="none"></circle><circle cx="17" cy="18" r="1.4" fill="currentColor" stroke="none"></circle><circle cx="21" cy="18" r="1.4" fill="currentColor" stroke="none"></circle>`,20)],64)):e.name===`zoom-in`?(A(),O(D,{key:10},[n[12]||=v(`circle`,{cx:`11`,cy:`11`,r:`7`},null,-1),n[13]||=v(`line`,{x1:`11`,y1:`8`,x2:`11`,y2:`14`},null,-1),n[14]||=v(`line`,{x1:`8`,y1:`11`,x2:`14`,y2:`11`},null,-1),n[15]||=v(`line`,{x1:`16`,y1:`16`,x2:`21`,y2:`21`},null,-1)],64)):e.name===`zoom-out`?(A(),O(D,{key:11},[n[16]||=v(`circle`,{cx:`11`,cy:`11`,r:`7`},null,-1),n[17]||=v(`line`,{x1:`8`,y1:`11`,x2:`14`,y2:`11`},null,-1),n[18]||=v(`line`,{x1:`16`,y1:`16`,x2:`21`,y2:`21`},null,-1)],64)):e.name===`reset`?(A(),O(D,{key:12},[n[19]||=v(`polyline`,{points:`4 9 4 4 9 4`},null,-1),n[20]||=v(`polyline`,{points:`15 4 20 4 20 9`},null,-1),n[21]||=v(`polyline`,{points:`20 15 20 20 15 20`},null,-1),n[22]||=v(`polyline`,{points:`9 20 4 20 4 15`},null,-1)],64)):e.name===`database`?(A(),O(D,{key:13},[n[23]||=v(`ellipse`,{cx:`12`,cy:`6`,rx:`7`,ry:`2.5`},null,-1),n[24]||=v(`path`,{d:`M5 6 V18 C5 19.4 8 20.5 12 20.5 C16 20.5 19 19.4 19 18 V6`},null,-1),n[25]||=v(`path`,{d:`M5 12 C5 13.4 8 14.5 12 14.5 C16 14.5 19 13.4 19 12`},null,-1)],64)):e.name===`settings`?(A(),O(D,{key:14},[n[26]||=v(`path`,{d:`M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z`},null,-1),n[27]||=v(`circle`,{cx:`12`,cy:`12`,r:`3`},null,-1)],64)):e.name===`markdown`?(A(),O(D,{key:15},[n[28]||=v(`rect`,{x:`2`,y:`5`,width:`20`,height:`14`,rx:`2`},null,-1),n[29]||=v(`path`,{d:`M6 15 V9 L9 12 L12 9 V15`},null,-1),n[30]||=v(`path`,{d:`M15 15 V9 L18 12 V9 M15 12 L18 15`},null,-1)],64)):e.name===`txt`?(A(),O(D,{key:16},[n[31]||=v(`rect`,{x:`5`,y:`3`,width:`14`,height:`18`,rx:`1.5`},null,-1),n[32]||=v(`line`,{x1:`8`,y1:`8`,x2:`16`,y2:`8`},null,-1),n[33]||=v(`line`,{x1:`8`,y1:`12`,x2:`16`,y2:`12`},null,-1),n[34]||=v(`line`,{x1:`8`,y1:`16`,x2:`13`,y2:`16`},null,-1)],64)):e.name===`eye`?(A(),O(D,{key:17},[n[35]||=v(`path`,{d:`M2 12 C4 6 8 3 12 3 C16 3 20 6 22 12 C20 18 16 21 12 21 C8 21 4 18 2 12 Z`},null,-1),n[36]||=v(`circle`,{cx:`12`,cy:`12`,r:`3.2`},null,-1)],64)):e.name===`eye-off`?(A(),O(D,{key:18},[n[37]||=v(`path`,{d:`M3 3 L21 21`},null,-1),n[38]||=v(`path`,{d:`M10.5 6.2 C11 6.1 11.5 6 12 6 C16 6 19.5 8.5 21 12 C20.4 13.2 19.6 14.3 18.7 15.2`},null,-1),n[39]||=v(`path`,{d:`M6.6 6.6 C4 8.2 2.7 10.2 2 12 C3 14.5 5.2 16.8 8 18.3 C9.2 19 10.6 19.4 12 19.4 C13.5 19.4 14.9 19 16.2 18.3`},null,-1),n[40]||=v(`path`,{d:`M9.5 9.5 C9.1 10.2 9 11.1 9 12 C9 13.7 9.8 15.2 11 16.1`},null,-1)],64)):e.name===`outline`?(A(),O(D,{key:19},[n[41]||=v(`rect`,{x:`4`,y:`3`,width:`16`,height:`18`,rx:`2`},null,-1),n[42]||=v(`line`,{x1:`8`,y1:`8`,x2:`16`,y2:`8`},null,-1),n[43]||=v(`line`,{x1:`8`,y1:`12`,x2:`16`,y2:`12`},null,-1),n[44]||=v(`line`,{x1:`8`,y1:`16`,x2:`13`,y2:`16`},null,-1)],64)):e.name===`logo`?(A(),O(D,{key:20},[n[45]||=k(`<circle cx="12" cy="12" r="2.2"></circle><circle cx="4" cy="5" r="1.6"></circle><circle cx="20" cy="5" r="1.6"></circle><circle cx="4" cy="19" r="1.6"></circle><circle cx="20" cy="19" r="1.6"></circle><line x1="10.5" y1="10.8" x2="5.2" y2="6.4"></line><line x1="13.5" y1="10.8" x2="18.8" y2="6.4"></line><line x1="10.5" y1="13.2" x2="5.2" y2="17.6"></line><line x1="13.5" y1="13.2" x2="18.8" y2="17.6"></line>`,9)],64)):e.name===`import`?(A(),O(D,{key:21},[n[46]||=v(`path`,{d:`M12 4 V15`},null,-1),n[47]||=v(`polyline`,{points:`7 10 12 15 17 10`},null,-1),n[48]||=v(`path`,{d:`M4 19 H20`},null,-1)],64)):e.name===`export`?(A(),O(D,{key:22},[n[49]||=v(`path`,{d:`M12 15 V4`},null,-1),n[50]||=v(`polyline`,{points:`7 9 12 4 17 9`},null,-1),n[51]||=v(`path`,{d:`M4 19 H20`},null,-1)],64)):e.name===`balance`?(A(),O(D,{key:23},[n[52]||=k(`<line x1="3" y1="6" x2="21" y2="6"></line><line x1="3" y1="12" x2="21" y2="12"></line><line x1="3" y1="18" x2="21" y2="18"></line><polyline points="9 4 5 6 9 8"></polyline><polyline points="15 4 19 6 15 8"></polyline><polyline points="9 10 5 12 9 14"></polyline><polyline points="15 10 19 12 15 14"></polyline><polyline points="9 16 5 18 9 20"></polyline><polyline points="15 16 19 18 15 20"></polyline>`,9)],64)):e.name===`mindmap`?(A(),O(D,{key:24},[n[53]||=k(`<circle cx="12" cy="12" r="2.4" fill="currentColor" stroke="none"></circle><line x1="13.4" y1="10.6" x2="18.5" y2="5.5"></line><line x1="13.4" y1="13.4" x2="18.5" y2="18.5"></line><line x1="10.6" y1="10.6" x2="5.5" y2="5.5"></line><line x1="10.6" y1="13.4" x2="5.5" y2="18.5"></line><circle cx="19.5" cy="4.5" r="1.8" fill="currentColor" stroke="none"></circle><circle cx="19.5" cy="19.5" r="1.8" fill="currentColor" stroke="none"></circle><circle cx="4.5" cy="4.5" r="1.8" fill="currentColor" stroke="none"></circle><circle cx="4.5" cy="19.5" r="1.8" fill="currentColor" stroke="none"></circle>`,9)],64)):e.name===`tree`?(A(),O(D,{key:25},[n[54]||=k(`<circle cx="5" cy="12" r="2" fill="currentColor" stroke="none"></circle><circle cx="19" cy="5" r="2" fill="currentColor" stroke="none"></circle><circle cx="19" cy="12" r="2" fill="currentColor" stroke="none"></circle><circle cx="19" cy="19" r="2" fill="currentColor" stroke="none"></circle><line x1="7" y1="12" x2="12" y2="12"></line><line x1="12" y1="12" x2="12" y2="5"></line><line x1="12" y1="12" x2="12" y2="19"></line><line x1="12" y1="5" x2="17" y2="5"></line><line x1="12" y1="19" x2="17" y2="19"></line>`,9)],64)):e.name===`org`?(A(),O(D,{key:26},[n[55]||=k(`<circle cx="12" cy="5" r="2" fill="currentColor" stroke="none"></circle><circle cx="6" cy="19" r="2" fill="currentColor" stroke="none"></circle><circle cx="12" cy="19" r="2" fill="currentColor" stroke="none"></circle><circle cx="18" cy="19" r="2" fill="currentColor" stroke="none"></circle><line x1="12" y1="7" x2="12" y2="13"></line><line x1="6" y1="13" x2="18" y2="13"></line><line x1="6" y1="13" x2="6" y2="17"></line><line x1="12" y1="13" x2="12" y2="17"></line><line x1="18" y1="13" x2="18" y2="17"></line>`,9)],64)):e.name===`image`?(A(),O(D,{key:27},[n[56]||=v(`rect`,{x:`3`,y:`5`,width:`18`,height:`14`,rx:`2`},null,-1),n[57]||=v(`circle`,{cx:`9`,cy:`11`,r:`1.6`},null,-1),n[58]||=v(`polyline`,{points:`3 17 9 12 13 15 16 13 21 17`},null,-1)],64)):e.name===`x`?(A(),O(D,{key:28},[n[59]||=v(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`},null,-1),n[60]||=v(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`},null,-1)],64)):e.name===`link`?(A(),O(D,{key:29},[n[61]||=v(`path`,{d:`M10 13 a4 4 0 0 0 5.66 0 l3 -3 a4 4 0 1 0 -5.66 -5.66 l-1 1`},null,-1),n[62]||=v(`path`,{d:`M14 11 a4 4 0 0 0 -5.66 0 l-3 3 a4 4 0 1 0 5.66 5.66 l1 -1`},null,-1)],64)):e.name===`note`?(A(),O(D,{key:30},[n[63]||=v(`path`,{d:`M6 4 h9 l3 3 v13 a1 1 0 0 1 -1 1 h-11 a1 1 0 0 1 -1 -1 v-15 a1 1 0 0 1 1 -1 z`},null,-1),n[64]||=v(`line`,{x1:`8`,y1:`10`,x2:`16`,y2:`10`},null,-1),n[65]||=v(`line`,{x1:`8`,y1:`13`,x2:`16`,y2:`13`},null,-1),n[66]||=v(`line`,{x1:`8`,y1:`16`,x2:`13`,y2:`16`},null,-1)],64)):f(``,!0)],8,P))}}),ne=`data:image/svg+xml,%3csvg%20t='1780822312364'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='7459'%20width='200'%20height='200'%3e%3cpath%20d='M329.16%20292.571h658.286V512H329.16zM329.16%200h658.286v219.429H329.16z'%20fill='%239AA1A2'%20p-id='7460'%3e%3c/path%3e%3cpath%20d='M44.927%20146.286a46.519%2046.519%200%200%201%2038.107-73.143h319.269v73.143H109.73V791.99l-48.713%205.705-24.43-651.41h8.339z'%20fill='%239AA1A2'%20p-id='7461'%3e%3c/path%3e%3cpath%20d='M363.83%20877.714H179.51c-78.775%200-142.921-66.12-142.921-147.31V112.787c0-21.943%2017.188-39.643%2038.473-39.643%2021.211%200%2033.5%2017.774%2033.5%2039.643v617.619c0%2037.522%2028.013%2076.58%2064.438%2076.58h190.903c21.211%200%2038.766%2013.97%2038.766%2035.84%200%2021.943-17.555%2034.89-38.766%2034.89z'%20fill='%239AA1A2'%20p-id='7462'%3e%3c/path%3e%3cpath%20d='M432.95%20438.857H179.51c-78.775%200-81.043-18.578-81.043-62.903l10.094-90.624c0%2020.48%2013.458%2080.677%2049.884%2080.677h210.139c21.211%200%20120.613%204.023%20120.613%2016.018%200%2011.922-35.036%2056.832-56.32%2056.832zM640.017%20749.714V640a54.857%2054.857%200%200%201%20109.714%200v109.714h109.715a54.857%2054.857%200%200%201%200%20109.715H749.73v109.714a54.857%2054.857%200%200%201-109.714%200V859.429H530.303a54.857%2054.857%200%200%201%200-109.715h109.714z'%20fill='%239AA1A2'%20p-id='7463'%3e%3c/path%3e%3c/svg%3e`,re=`data:image/svg+xml,%3csvg%20t='1780822464335'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='8457'%20width='200'%20height='200'%3e%3cpath%20d='M512%20804.571h512V1024H512V804.571zM0%200h658.286v219.429H0V0z'%20fill='%239AA1A2'%20p-id='8458'%3e%3c/path%3e%3cpath%20d='M619.813%20950.857h-184.32c-78.775%200-142.922-66.121-142.922-147.31V185.93c0-21.943%2017.189-39.643%2038.474-39.643%2021.211%200%2033.353%2017.773%2033.353%2039.643v617.618c0%2037.523%2034.743%2073.728%2071.095%2073.728h184.32c21.211%200%2038.473%2012.069%2038.473%2033.939%200%2021.943-17.189%2039.643-38.473%2039.643z'%20fill='%239AA1A2'%20p-id='8459'%3e%3c/path%3e%3cpath%20d='M676.571%20457.143V347.429a54.857%2054.857%200%200%201%20109.715%200v109.714H896a54.857%2054.857%200%200%201%200%20109.714H786.286v109.714a54.857%2054.857%200%200%201-109.715%200V566.857H566.857a54.857%2054.857%200%200%201%200-109.714h109.714z'%20fill='%239AA1A2'%20p-id='8460'%3e%3c/path%3e%3c/svg%3e`,ie=[18,15,13,12],I=[700,600,500,400],ae=[52,40,32,28],L=[120,80,60,44],oe=[.8,.8,.8,.8],R=ie.length-1;function z(e,t){return Math.round(ce(e,t)*oe[se(e)])}function se(e){return Math.min(R,Math.max(0,e))}function ce(e,t=14){return Math.round(ie[se(e)]*t/14*10)/10}function le(e,t=14){return Math.round(ae[se(e)]*t/14)}var ue=60,de=14,fe=24,pe=null;function me(){if(pe)return pe;let e=typeof document<`u`?document.createElement(`canvas`).getContext(`2d`):null;return e?(pe=e,e):{font:``,measureText:()=>({width:0})}}var he=new Map;function ge(e,t,n){let r=`${n}|${t}|${e}`,i=he.get(r);if(i!==void 0)return i;let a=me();a.font=`${n} ${t}px "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif`;let o=a.measureText(e).width;return he.set(r,o),o}var _e=24,ve=400,ye=8,be=16,xe=4,Se=200;function Ce(e,t,n){return Math.min(n,Math.max(t,e))}function we(e,t,n,r,i){let a=se(t),o=ce(t,n),s=Math.min(ge(e.text||``,o,I[a]),Se),c=z(t,n),l=Math.ceil(s+c*2),u=e.richContent&&(e.richContent.kind===`code`||e.richContent.kind===`table`)?Math.ceil(o*1.2)+6:le(t,n),d=0;if(e.link&&(d+=be),e.note&&(d+=be),d>0){let t=+!!e.link+ +!!e.note;d+=xe*t}let f=l+d,p=(()=>{let t=Math.round(L[a]*n/14);if(e.richContent&&(e.richContent.kind===`code`||e.richContent.kind===`table`)){let n=i?.[e.id];return Math.max(t,n??240)}return t})(),m=!!(e.richContent&&(e.richContent.kind===`code`||e.richContent.kind===`table`)),h=r?.[e.id],g=m?Math.max(24,h??Math.max(70,Math.ceil(o*5))):0,_=g>0?10:0;if(!e.image)return{w:Math.max(p,f),h:Math.ceil(u+_+g)};let v=Ce(e.image.width,_e,ve);return{w:Math.max(p,f,Math.ceil(v+c*2)),h:Math.ceil(e.image.height+ye+u+_+g)}}function Te(e,t={}){let n=t.mode??`mindmap`,r=t.preservePositions===!0,i=De(e,0,null,1,`right`,t.baseFontSize??14,t.richHeights,t.richWidths);return Oe(i),Ee(i,n,r),i.x=0,i.y=0,ke(i,r)}function Ee(e,t,n=!1){if(t===`mindmap`){let t=e.children;if(t.length!==0)if(t.length===1)t[0]._dir=`right`,t[0].side=1,t[0]._dirRight=1;else{let e=t.reduce((e,t)=>e+t._subtreeH,0),n=1,r=Math.abs(t[0]._subtreeH-(e-t[0]._subtreeH)),i=0;for(let a=0;a<t.length-1;a++){i+=t[a]._subtreeH;let o=Math.abs(i-(e-i));o<r&&(r=o,n=a+1)}for(let e=0;e<n;e++)t[e]._dir=`right`,t[e].side=1,t[e]._dirRight=1;for(let e=n;e<t.length;e++)t[e]._dir=`left`,t[e].side=-1,t[e]._dirRight=-1}let r=e.children.filter(e=>e.side===1),i=e.children.filter(e=>e.side===-1),a=(e,t)=>{let n=t===`right`?1:-1;e._dir=t,e.side=n,e._dirRight=n;for(let n of e.children)a(n,t)};for(let e of r)a(e,`right`);for(let e of i)a(e,`left`);r.length>0&&B({...e,children:r},`right`,ue,!0,n),i.length>0&&B({...e,children:i},`left`,ue,!0,n)}else if(t===`tree`){let t=e=>{e.side=1,e._dir=`right`;for(let n of e.children)t(n)};for(let t of e.children)t._dir=`right`;B(e,`right`,ue,!0,n),t(e)}else{for(let t of e.children)t._dir=`down`;V(e,ue,n)}}function B(e,t,n,r,i=!1){if(e.children.length===0)return;let a=e.children.reduce((e,t,n)=>e+t._subtreeH+(n>0?de:0),0),o=t===`right`?1:-1,s=r?o:1,c=e.y-s*a/2;e.children.forEach(r=>{i||(r.x=e.x+o*(e.width/2+n+r.width/2),r.y=c+s*r._subtreeH/2),r._dir=t,c+=s*(r._subtreeH+de),B(r,t,n,!1,i)})}function V(e,t,n=!1){if(e.children.length===0)return;let r=e.children.reduce((e,t,n)=>e+t._subtreeW+(n>0?de*2:0),0),i=e.x-r/2;e.children.forEach(r=>{n||(r.x=i+r._subtreeW/2,r.y=e.y+e.height/2+t+r.height/2),r._dir=`down`,i+=r._subtreeW+de*2,V(r,t,n)})}function De(e,t,n,r,i,a,o,s){let c=we(e,t,a,o,s),l={id:e.id,text:e.text,depth:t,x:e._x??0,y:e._y??0,width:c.w,height:c.h,fontSize:ce(t,a),isRoot:t===0,collapsed:e.collapsed,side:r,_dir:i,_dirRight:r,_subtreeH:c.h,_subtreeW:c.w,image:e.image?{...e.image}:void 0,link:e.link?{url:e.link.url}:void 0,note:e.note?{text:e.note.text}:void 0,richContent:e.richContent?{kind:e.richContent.kind,raw:e.richContent.raw,lang:e.richContent.lang}:void 0,children:[],parent:n};if(e.collapsed)return l;let u=e.children.length,d=Math.ceil(u/2);return l.children=e.children.map((e,n)=>{let c=t===0?n<d?1:-1:r;return De(e,t+1,l,c,i,a,o,s)}),l}function Oe(e){let t=[e];for(let e=0;e<t.length;e++){let n=t[e];for(let e of n.children)t.push(e)}for(let e=t.length-1;e>=0;e--){let n=t[e];if(n.collapsed||n.children.length===0){n._subtreeH=n.height,n._subtreeW=n.width;continue}let r=0,i=0;for(let e of n.children)r+=e._subtreeH,i+=e._subtreeW;n.children.length>1&&(r+=de*(n.children.length-1),i+=de*2*(n.children.length-1)),n._subtreeH=Math.max(n.height,r),n._subtreeW=Math.max(n.width,i)}}function ke(e,t=!1){let n=[e],r=1/0,i=-1/0,a=1/0,o=-1/0;for(;n.length;){let e=n.pop(),t=e.width/2,s=e.height/2;e.x-t<r&&(r=e.x-t),e.x+t>i&&(i=e.x+t),e.y-s<a&&(a=e.y-s),e.y+s>o&&(o=e.y+s),n.push(...e.children)}if(t)return{root:e,width:i-r+fe*2,height:o-a+fe*2,vbX:r-fe,vbY:a-fe,vbW:i-r+fe*2,vbH:o-a+fe*2};let s=fe-a,c=[e];for(;c.length;){let e=c.pop();e.y+=s,c.push(...e.children)}return a+=s,o+=s,{root:e,width:i-r+fe*2,height:o+fe,vbX:r-fe,vbY:0,vbW:i-r+fe*2,vbH:o+fe}}var Ae=[{id:`default`,name:`默认`,colors:[`#f87171`,`#fb923c`,`#fbbf24`,`#a3e635`,`#34d399`,`#22d3ee`,`#818cf8`,`#c084fc`]},{id:`classic`,name:`经典`,colors:[`#ef4444`,`#f59e0b`,`#10b981`,`#3b82f6`,`#6366f1`,`#8b5cf6`,`#ec4899`,`#14b8a6`]},{id:`vivid`,name:`活力`,colors:[`#dc2626`,`#ea580c`,`#ca8a04`,`#16a34a`,`#0891b2`,`#2563eb`,`#7c3aed`,`#db2777`]},{id:`dev`,name:`代码`,colors:[`#f472b6`,`#a78bfa`,`#60a5fa`,`#38bdf8`,`#22d3ee`,`#34d399`,`#facc15`,`#fb923c`]},{id:`mint`,name:`薄荷`,colors:[`#5eead4`,`#67e8f9`,`#93c5fd`,`#c4b5fd`,`#fbcfe8`,`#fde68a`,`#a7f3d0`,`#bae6fd`]}];function je(e,t=[]){return[...Ae,...t].find(t=>t.id===e)??Ae[0]}function Me(e,t=8){let n=[],r=new Set,i=/#[0-9a-fA-F]{3,8}\b|rgba?\([^)]+\)|[A-Za-z][A-Za-z0-9_-]{2,30}/g,a;for(;(a=i.exec(e))!==null;){let e=a[0],i=null;if(i=e.startsWith(`#`)?Ne(e):e.startsWith(`rgb`)?Pe(e):Fe[e.toLowerCase()]??null,!i)continue;let o=i.toLowerCase();if(!r.has(o)&&(r.add(o),n.push(o),n.length>=t))break}return n}function Ne(e){let t=e.startsWith(`#`)?e.slice(1):e;if(!/^[0-9a-fA-F]+$/.test(t))return null;let n;if(t.length===3)n=t.split(``).map(e=>e+e).join(``);else if(t.length===4)n=t.slice(0,3).split(``).map(e=>e+e).join(``);else if(t.length===6)n=t;else if(t.length===8)n=t.slice(0,6);else return null;return`#`+n.toLowerCase()}function Pe(e){let t=e.match(/^rgba?\(\s*([^)]+?)\s*\)$/i);if(!t)return null;let n=t[1].split(/\s*,\s*/);if(n.length<3)return null;let r=[];for(let e=0;e<3;e++){let t=n[e];if(t.endsWith(`%`)){let e=parseFloat(t);if(!isFinite(e))return null;r.push(Math.round(e/100*255))}else{let e=parseInt(t,10);if(!isFinite(e)||e<0||e>255)return null;r.push(e)}}return`#`+r.map(e=>e.toString(16).padStart(2,`0`)).join(``).toLowerCase()}var Fe={black:`#000000`,white:`#ffffff`,red:`#ff0000`,green:`#008000`,blue:`#0000ff`,yellow:`#ffff00`,cyan:`#00ffff`,magenta:`#ff00ff`,gray:`#808080`,grey:`#808080`,silver:`#c0c0c0`,maroon:`#800000`,olive:`#808000`,lime:`#00ff00`,aqua:`#00ffff`,teal:`#008080`,navy:`#000080`,fuchsia:`#ff00ff`,purple:`#800080`,orange:`#ffa500`,pink:`#ffc0cb`,brown:`#a52a2a`,gold:`#ffd700`,coral:`#ff7f50`,tomato:`#ff6347`,salmon:`#fa8072`,khaki:`#f0e68c`,violet:`#ee82ee`,indigo:`#4b0082`,turquoise:`#40e0d0`,chocolate:`#d2691e`,crimson:`#dc143c`,darkred:`#8b0000`,darkblue:`#00008b`,darkgreen:`#006400`,darkgray:`#a9a9a9`,darkgrey:`#a9a9a9`,lightgray:`#d3d3d3`,lightgrey:`#d3d3d3`,lightblue:`#add8e6`,lightgreen:`#90ee90`,lightyellow:`#ffffe0`,lightpink:`#ffb6c1`,skyblue:`#87ceeb`,forestgreen:`#228b22`,royalblue:`#4169e1`,steelblue:`#4682b4`,hotpink:`#ff69b4`,deeppink:`#ff1493`,orangered:`#ff4500`,goldenrod:`#daa520`,mediumpurple:`#9370db`};function Ie(){return`n_`+Math.random().toString(36).slice(2,10)+Date.now().toString(36).slice(-4)}function Le(e){return JSON.parse(JSON.stringify(e))}function H(e,t){if(e.id===t)return e;for(let n of e.children){let e=H(n,t);if(e)return e}return null}function Re(e,t,n=null){if(e.id===t)return n;for(let n of e.children){let r=Re(n,t,e);if(r!==null)return r}return null}function ze(e,t){let n=e.children.findIndex(e=>e.id===t);if(n>=0)return e.children.splice(n,1),!0;for(let n of e.children)if(ze(n,t))return!0;return!1}function Be(e,t,n){let r=H(e,t);return!r||r.text===n?!1:(r.text=n,!0)}function Ve(e,t,n,r){if(!Re(e,t)||t===n||H(H(e,t),n))return!1;let i=Re(e,t),a=i.children.findIndex(e=>e.id===t);if(a<0)return!1;let[o]=i.children.splice(a,1);if(r===`child`){let t=H(e,n);return t?(t.children.push(o),!0):(i.children.splice(a,0,o),!1)}let s=Re(e,n);if(!s)return i.children.splice(a,0,o),!1;let c=s.children.findIndex(e=>e.id===n);return c<0?(i.children.splice(a,0,o),!1):(r===`after`&&(c+=1),s.children.splice(c,0,o),!0)}function U(e){let t=/^新节点(?:\s+(\d+))?$/,n=0,r=!1;for(let i of e.children){let e=i.text.match(t);if(e)if(e[1]){let t=parseInt(e[1],10);t>n&&(n=t)}else r=!0}return n===0&&!r?Je:n>0?`新节点 ${n+1}`:`新节点 2`}function He(e,t,n){let r=H(e,t);if(!r)return null;let i={id:Ie(),text:n??U(r),children:[]};return r.children.push(i),i}function Ue(e,t,n){let r=Re(e,t);if(!r)return null;let i=r.children.findIndex(e=>e.id===t);if(i<0)return null;let a={id:Ie(),text:n??U(r),children:[]};return r.children.splice(i+1,0,a),a}function We(e,t,n){let r=Re(e,t);if(!r)return null;let i=r.children.findIndex(e=>e.id===t);if(i<0)return null;let a={id:Ie(),text:n,children:[]};return r.children.splice(i,0,a),a}function Ge(e,t){let n=Re(e,t);if(!n)return null;let r=n.children.findIndex(e=>e.id===t);if(r<0)return null;let i=n.children[r],a=Le(i);return Ke(a),n.children.splice(r+1,0,a),a}function Ke(e){e.id=Ie();for(let t of e.children)Ke(t)}function qe(e,t){let n=H(e,t);if(!n||n.id===e.id)return null;let r=Le(n);return Ke(r),r}var Je=`新节点`;function Ye(e,t=`导入的导图`){let n=e.split(/\r?\n/),r={id:Ie(),text:t,children:[]},i=[r],a=[-1/0],o=[],s=/^(#{1,6})\s+(.+?)\s*#*\s*$/,c=/^!\[([^\]]*)\]\((\S+?)(?:\s+"[^"]*")?\)\s*$/,l=/^\[([^\]]+)\]\((\S+?)(?:\s+"[^"]*")?\)\s*$/,u=/^(`{3,}|~{3,})\s*(\S+)?\s*$/,d=!1,f=[],p=null;function m(e){f.push(e)}function h(){if(p&&f.length>0){for(;f.length>0&&f[0].trim()===``;)f.shift();for(;f.length>0&&f[f.length-1].trim()===``;)f.pop();let e=f.join(`
|
|
1
|
+
import{Cn as e,Fn as t,Hn as n,Jn as r,Ln as i,Mn as a,Sn as o,Tn as s,Un as c,Vn as l,Xn as u,Zn as d,_n as f,_r as p,ar as m,cn as h,gn as g,gr as _,hn as v,ln as y,mn as b,mr as x,on as S,pr as C,sn as w,sr as T,tn as E,un as D,vn as O,xn as k,zn as A}from"./element-plus-D8SQiesr.js";var j=Object.defineProperty,M=(e,t,n)=>t in e?j(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,N=(e,t,n)=>M(e,typeof t==`symbol`?t:t+``,n),P=[`width`,`height`,`stroke-width`],ee={key:4,points:`6 9 12 15 18 9`},te={key:5,points:`9 6 15 12 9 18`},F=s({__name:`Icon`,props:{name:{},size:{},stroke:{}},setup(e){return(t,n)=>(A(),O(`svg`,{width:e.size??16,height:e.size??16,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":e.stroke??1.8,"stroke-linecap":`round`,"stroke-linejoin":`round`,"aria-hidden":`true`},[e.name===`add`?(A(),O(D,{key:0},[n[0]||=v(`circle`,{cx:`12`,cy:`12`,r:`9`},null,-1),n[1]||=v(`line`,{x1:`12`,y1:`8`,x2:`12`,y2:`16`},null,-1),n[2]||=v(`line`,{x1:`8`,y1:`12`,x2:`16`,y2:`12`},null,-1)],64)):e.name===`minus`?(A(),O(D,{key:1},[n[3]||=v(`circle`,{cx:`12`,cy:`12`,r:`9`},null,-1),n[4]||=v(`line`,{x1:`8`,y1:`12`,x2:`16`,y2:`12`},null,-1)],64)):e.name===`delete`?(A(),O(D,{key:2},[n[5]||=k(`<polyline points="4 7 20 7"></polyline><path d="M9 7 V5 a1 1 0 0 1 1 -1 h4 a1 1 0 0 1 1 1 V7"></path><path d="M6 7 l1 12 a1 1 0 0 0 1 1 h8 a1 1 0 0 0 1 -1 l1 -12"></path><line x1="10" y1="11" x2="10" y2="18"></line><line x1="14" y1="11" x2="14" y2="18"></line>`,5)],64)):e.name===`edit`?(A(),O(D,{key:3},[n[6]||=v(`path`,{d:`M4 20 l4 -1 11 -11 -3 -3 -11 11 z`},null,-1),n[7]||=v(`line`,{x1:`14`,y1:`6`,x2:`18`,y2:`10`},null,-1)],64)):e.name===`collapse`?(A(),O(`polyline`,ee)):e.name===`expand`?(A(),O(`polyline`,te)):e.name===`collapse-all`?(A(),O(D,{key:6},[n[8]||=k(`<line x1="4" y1="4" x2="10" y2="10"></line><polyline points="6 10 10 10 10 6"></polyline><line x1="20" y1="4" x2="14" y2="10"></line><polyline points="14 6 14 10 18 10"></polyline><line x1="20" y1="20" x2="14" y2="14"></line><polyline points="14 18 14 14 18 14"></polyline><line x1="4" y1="20" x2="10" y2="14"></line><polyline points="6 14 10 14 10 18"></polyline>`,8)],64)):e.name===`expand-all`?(A(),O(D,{key:7},[n[9]||=k(`<line x1="10" y1="10" x2="4" y2="4"></line><polyline points="4 6 4 4 6 4"></polyline><line x1="14" y1="10" x2="20" y2="4"></line><polyline points="20 6 20 4 18 4"></polyline><line x1="14" y1="14" x2="20" y2="20"></line><polyline points="20 18 20 20 18 20"></polyline><line x1="10" y1="14" x2="4" y2="20"></line><polyline points="4 18 4 20 6 20"></polyline>`,8)],64)):e.name===`expand-level-1`?(A(),O(D,{key:8},[n[10]||=k(`<circle cx="12" cy="5" r="1.8" fill="currentColor" stroke="none"></circle><line x1="12" y1="7" x2="12" y2="11"></line><line x1="12" y1="11" x2="5" y2="17"></line><line x1="12" y1="11" x2="12" y2="17"></line><line x1="12" y1="11" x2="19" y2="17"></line><circle cx="5" cy="19" r="1.8" fill="currentColor" stroke="none"></circle><circle cx="12" cy="19" r="1.8" fill="currentColor" stroke="none"></circle><circle cx="19" cy="19" r="1.8" fill="currentColor" stroke="none"></circle>`,8)],64)):e.name===`expand-level-2`?(A(),O(D,{key:9},[n[11]||=k(`<circle cx="12" cy="3" r="1.4" fill="currentColor" stroke="none"></circle><line x1="12" y1="4.5" x2="12" y2="7"></line><line x1="12" y1="7" x2="5" y2="11"></line><line x1="12" y1="7" x2="12" y2="11"></line><line x1="12" y1="7" x2="19" y2="11"></line><line x1="5" y1="11" x2="3" y2="16"></line><line x1="5" y1="11" x2="7" y2="16"></line><line x1="12" y1="11" x2="10" y2="16"></line><line x1="12" y1="11" x2="14" y2="16"></line><line x1="19" y1="11" x2="17" y2="16"></line><line x1="19" y1="11" x2="21" y2="16"></line><circle cx="5" cy="11" r="1.4" fill="currentColor" stroke="none"></circle><circle cx="12" cy="11" r="1.4" fill="currentColor" stroke="none"></circle><circle cx="19" cy="11" r="1.4" fill="currentColor" stroke="none"></circle><circle cx="3" cy="18" r="1.4" fill="currentColor" stroke="none"></circle><circle cx="7" cy="18" r="1.4" fill="currentColor" stroke="none"></circle><circle cx="10" cy="18" r="1.4" fill="currentColor" stroke="none"></circle><circle cx="14" cy="18" r="1.4" fill="currentColor" stroke="none"></circle><circle cx="17" cy="18" r="1.4" fill="currentColor" stroke="none"></circle><circle cx="21" cy="18" r="1.4" fill="currentColor" stroke="none"></circle>`,20)],64)):e.name===`zoom-in`?(A(),O(D,{key:10},[n[12]||=v(`circle`,{cx:`11`,cy:`11`,r:`7`},null,-1),n[13]||=v(`line`,{x1:`11`,y1:`8`,x2:`11`,y2:`14`},null,-1),n[14]||=v(`line`,{x1:`8`,y1:`11`,x2:`14`,y2:`11`},null,-1),n[15]||=v(`line`,{x1:`16`,y1:`16`,x2:`21`,y2:`21`},null,-1)],64)):e.name===`zoom-out`?(A(),O(D,{key:11},[n[16]||=v(`circle`,{cx:`11`,cy:`11`,r:`7`},null,-1),n[17]||=v(`line`,{x1:`8`,y1:`11`,x2:`14`,y2:`11`},null,-1),n[18]||=v(`line`,{x1:`16`,y1:`16`,x2:`21`,y2:`21`},null,-1)],64)):e.name===`reset`?(A(),O(D,{key:12},[n[19]||=v(`polyline`,{points:`4 9 4 4 9 4`},null,-1),n[20]||=v(`polyline`,{points:`15 4 20 4 20 9`},null,-1),n[21]||=v(`polyline`,{points:`20 15 20 20 15 20`},null,-1),n[22]||=v(`polyline`,{points:`9 20 4 20 4 15`},null,-1)],64)):e.name===`database`?(A(),O(D,{key:13},[n[23]||=v(`ellipse`,{cx:`12`,cy:`6`,rx:`7`,ry:`2.5`},null,-1),n[24]||=v(`path`,{d:`M5 6 V18 C5 19.4 8 20.5 12 20.5 C16 20.5 19 19.4 19 18 V6`},null,-1),n[25]||=v(`path`,{d:`M5 12 C5 13.4 8 14.5 12 14.5 C16 14.5 19 13.4 19 12`},null,-1)],64)):e.name===`settings`?(A(),O(D,{key:14},[n[26]||=v(`path`,{d:`M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z`},null,-1),n[27]||=v(`circle`,{cx:`12`,cy:`12`,r:`3`},null,-1)],64)):e.name===`markdown`?(A(),O(D,{key:15},[n[28]||=v(`rect`,{x:`2`,y:`5`,width:`20`,height:`14`,rx:`2`},null,-1),n[29]||=v(`path`,{d:`M6 15 V9 L9 12 L12 9 V15`},null,-1),n[30]||=v(`path`,{d:`M15 15 V9 L18 12 V9 M15 12 L18 15`},null,-1)],64)):e.name===`txt`?(A(),O(D,{key:16},[n[31]||=v(`rect`,{x:`5`,y:`3`,width:`14`,height:`18`,rx:`1.5`},null,-1),n[32]||=v(`line`,{x1:`8`,y1:`8`,x2:`16`,y2:`8`},null,-1),n[33]||=v(`line`,{x1:`8`,y1:`12`,x2:`16`,y2:`12`},null,-1),n[34]||=v(`line`,{x1:`8`,y1:`16`,x2:`13`,y2:`16`},null,-1)],64)):e.name===`eye`?(A(),O(D,{key:17},[n[35]||=v(`path`,{d:`M2 12 C4 6 8 3 12 3 C16 3 20 6 22 12 C20 18 16 21 12 21 C8 21 4 18 2 12 Z`},null,-1),n[36]||=v(`circle`,{cx:`12`,cy:`12`,r:`3.2`},null,-1)],64)):e.name===`eye-off`?(A(),O(D,{key:18},[n[37]||=v(`path`,{d:`M3 3 L21 21`},null,-1),n[38]||=v(`path`,{d:`M10.5 6.2 C11 6.1 11.5 6 12 6 C16 6 19.5 8.5 21 12 C20.4 13.2 19.6 14.3 18.7 15.2`},null,-1),n[39]||=v(`path`,{d:`M6.6 6.6 C4 8.2 2.7 10.2 2 12 C3 14.5 5.2 16.8 8 18.3 C9.2 19 10.6 19.4 12 19.4 C13.5 19.4 14.9 19 16.2 18.3`},null,-1),n[40]||=v(`path`,{d:`M9.5 9.5 C9.1 10.2 9 11.1 9 12 C9 13.7 9.8 15.2 11 16.1`},null,-1)],64)):e.name===`outline`?(A(),O(D,{key:19},[n[41]||=v(`rect`,{x:`4`,y:`3`,width:`16`,height:`18`,rx:`2`},null,-1),n[42]||=v(`line`,{x1:`8`,y1:`8`,x2:`16`,y2:`8`},null,-1),n[43]||=v(`line`,{x1:`8`,y1:`12`,x2:`16`,y2:`12`},null,-1),n[44]||=v(`line`,{x1:`8`,y1:`16`,x2:`13`,y2:`16`},null,-1)],64)):e.name===`logo`?(A(),O(D,{key:20},[n[45]||=k(`<circle cx="12" cy="12" r="2.2"></circle><circle cx="4" cy="5" r="1.6"></circle><circle cx="20" cy="5" r="1.6"></circle><circle cx="4" cy="19" r="1.6"></circle><circle cx="20" cy="19" r="1.6"></circle><line x1="10.5" y1="10.8" x2="5.2" y2="6.4"></line><line x1="13.5" y1="10.8" x2="18.8" y2="6.4"></line><line x1="10.5" y1="13.2" x2="5.2" y2="17.6"></line><line x1="13.5" y1="13.2" x2="18.8" y2="17.6"></line>`,9)],64)):e.name===`import`?(A(),O(D,{key:21},[n[46]||=v(`path`,{d:`M12 4 V15`},null,-1),n[47]||=v(`polyline`,{points:`7 10 12 15 17 10`},null,-1),n[48]||=v(`path`,{d:`M4 19 H20`},null,-1)],64)):e.name===`export`?(A(),O(D,{key:22},[n[49]||=v(`path`,{d:`M12 15 V4`},null,-1),n[50]||=v(`polyline`,{points:`7 9 12 4 17 9`},null,-1),n[51]||=v(`path`,{d:`M4 19 H20`},null,-1)],64)):e.name===`balance`?(A(),O(D,{key:23},[n[52]||=k(`<line x1="3" y1="6" x2="21" y2="6"></line><line x1="3" y1="12" x2="21" y2="12"></line><line x1="3" y1="18" x2="21" y2="18"></line><polyline points="9 4 5 6 9 8"></polyline><polyline points="15 4 19 6 15 8"></polyline><polyline points="9 10 5 12 9 14"></polyline><polyline points="15 10 19 12 15 14"></polyline><polyline points="9 16 5 18 9 20"></polyline><polyline points="15 16 19 18 15 20"></polyline>`,9)],64)):e.name===`mindmap`?(A(),O(D,{key:24},[n[53]||=k(`<circle cx="12" cy="12" r="2.4" fill="currentColor" stroke="none"></circle><line x1="13.4" y1="10.6" x2="18.5" y2="5.5"></line><line x1="13.4" y1="13.4" x2="18.5" y2="18.5"></line><line x1="10.6" y1="10.6" x2="5.5" y2="5.5"></line><line x1="10.6" y1="13.4" x2="5.5" y2="18.5"></line><circle cx="19.5" cy="4.5" r="1.8" fill="currentColor" stroke="none"></circle><circle cx="19.5" cy="19.5" r="1.8" fill="currentColor" stroke="none"></circle><circle cx="4.5" cy="4.5" r="1.8" fill="currentColor" stroke="none"></circle><circle cx="4.5" cy="19.5" r="1.8" fill="currentColor" stroke="none"></circle>`,9)],64)):e.name===`tree`?(A(),O(D,{key:25},[n[54]||=k(`<circle cx="5" cy="12" r="2" fill="currentColor" stroke="none"></circle><circle cx="19" cy="5" r="2" fill="currentColor" stroke="none"></circle><circle cx="19" cy="12" r="2" fill="currentColor" stroke="none"></circle><circle cx="19" cy="19" r="2" fill="currentColor" stroke="none"></circle><line x1="7" y1="12" x2="12" y2="12"></line><line x1="12" y1="12" x2="12" y2="5"></line><line x1="12" y1="12" x2="12" y2="19"></line><line x1="12" y1="5" x2="17" y2="5"></line><line x1="12" y1="19" x2="17" y2="19"></line>`,9)],64)):e.name===`org`?(A(),O(D,{key:26},[n[55]||=k(`<circle cx="12" cy="5" r="2" fill="currentColor" stroke="none"></circle><circle cx="6" cy="19" r="2" fill="currentColor" stroke="none"></circle><circle cx="12" cy="19" r="2" fill="currentColor" stroke="none"></circle><circle cx="18" cy="19" r="2" fill="currentColor" stroke="none"></circle><line x1="12" y1="7" x2="12" y2="13"></line><line x1="6" y1="13" x2="18" y2="13"></line><line x1="6" y1="13" x2="6" y2="17"></line><line x1="12" y1="13" x2="12" y2="17"></line><line x1="18" y1="13" x2="18" y2="17"></line>`,9)],64)):e.name===`image`?(A(),O(D,{key:27},[n[56]||=v(`rect`,{x:`3`,y:`5`,width:`18`,height:`14`,rx:`2`},null,-1),n[57]||=v(`circle`,{cx:`9`,cy:`11`,r:`1.6`},null,-1),n[58]||=v(`polyline`,{points:`3 17 9 12 13 15 16 13 21 17`},null,-1)],64)):e.name===`x`?(A(),O(D,{key:28},[n[59]||=v(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`},null,-1),n[60]||=v(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`},null,-1)],64)):e.name===`link`?(A(),O(D,{key:29},[n[61]||=v(`path`,{d:`M10 13 a4 4 0 0 0 5.66 0 l3 -3 a4 4 0 1 0 -5.66 -5.66 l-1 1`},null,-1),n[62]||=v(`path`,{d:`M14 11 a4 4 0 0 0 -5.66 0 l-3 3 a4 4 0 1 0 5.66 5.66 l1 -1`},null,-1)],64)):e.name===`note`?(A(),O(D,{key:30},[n[63]||=v(`path`,{d:`M6 4 h9 l3 3 v13 a1 1 0 0 1 -1 1 h-11 a1 1 0 0 1 -1 -1 v-15 a1 1 0 0 1 1 -1 z`},null,-1),n[64]||=v(`line`,{x1:`8`,y1:`10`,x2:`16`,y2:`10`},null,-1),n[65]||=v(`line`,{x1:`8`,y1:`13`,x2:`16`,y2:`13`},null,-1),n[66]||=v(`line`,{x1:`8`,y1:`16`,x2:`13`,y2:`16`},null,-1)],64)):f(``,!0)],8,P))}}),ne=`data:image/svg+xml,%3csvg%20t='1780822312364'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='7459'%20width='200'%20height='200'%3e%3cpath%20d='M329.16%20292.571h658.286V512H329.16zM329.16%200h658.286v219.429H329.16z'%20fill='%239AA1A2'%20p-id='7460'%3e%3c/path%3e%3cpath%20d='M44.927%20146.286a46.519%2046.519%200%200%201%2038.107-73.143h319.269v73.143H109.73V791.99l-48.713%205.705-24.43-651.41h8.339z'%20fill='%239AA1A2'%20p-id='7461'%3e%3c/path%3e%3cpath%20d='M363.83%20877.714H179.51c-78.775%200-142.921-66.12-142.921-147.31V112.787c0-21.943%2017.188-39.643%2038.473-39.643%2021.211%200%2033.5%2017.774%2033.5%2039.643v617.619c0%2037.522%2028.013%2076.58%2064.438%2076.58h190.903c21.211%200%2038.766%2013.97%2038.766%2035.84%200%2021.943-17.555%2034.89-38.766%2034.89z'%20fill='%239AA1A2'%20p-id='7462'%3e%3c/path%3e%3cpath%20d='M432.95%20438.857H179.51c-78.775%200-81.043-18.578-81.043-62.903l10.094-90.624c0%2020.48%2013.458%2080.677%2049.884%2080.677h210.139c21.211%200%20120.613%204.023%20120.613%2016.018%200%2011.922-35.036%2056.832-56.32%2056.832zM640.017%20749.714V640a54.857%2054.857%200%200%201%20109.714%200v109.714h109.715a54.857%2054.857%200%200%201%200%20109.715H749.73v109.714a54.857%2054.857%200%200%201-109.714%200V859.429H530.303a54.857%2054.857%200%200%201%200-109.715h109.714z'%20fill='%239AA1A2'%20p-id='7463'%3e%3c/path%3e%3c/svg%3e`,re=`data:image/svg+xml,%3csvg%20t='1780822464335'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='8457'%20width='200'%20height='200'%3e%3cpath%20d='M512%20804.571h512V1024H512V804.571zM0%200h658.286v219.429H0V0z'%20fill='%239AA1A2'%20p-id='8458'%3e%3c/path%3e%3cpath%20d='M619.813%20950.857h-184.32c-78.775%200-142.922-66.121-142.922-147.31V185.93c0-21.943%2017.189-39.643%2038.474-39.643%2021.211%200%2033.353%2017.773%2033.353%2039.643v617.618c0%2037.523%2034.743%2073.728%2071.095%2073.728h184.32c21.211%200%2038.473%2012.069%2038.473%2033.939%200%2021.943-17.189%2039.643-38.473%2039.643z'%20fill='%239AA1A2'%20p-id='8459'%3e%3c/path%3e%3cpath%20d='M676.571%20457.143V347.429a54.857%2054.857%200%200%201%20109.715%200v109.714H896a54.857%2054.857%200%200%201%200%20109.714H786.286v109.714a54.857%2054.857%200%200%201-109.715%200V566.857H566.857a54.857%2054.857%200%200%201%200-109.714h109.714z'%20fill='%239AA1A2'%20p-id='8460'%3e%3c/path%3e%3c/svg%3e`,ie=[18,15,13,12],I=[700,600,500,400],ae=[52,40,32,28],L=[120,80,60,44],oe=[.8,.8,.8,.8],R=ie.length-1;function z(e,t){return Math.round(ce(e,t)*oe[se(e)])}function se(e){return Math.min(R,Math.max(0,e))}function ce(e,t=14){return Math.round(ie[se(e)]*t/14*10)/10}function le(e,t=14){return Math.round(ae[se(e)]*t/14)}var ue=60,de=14,fe=24,pe=null;function me(){if(pe)return pe;let e=typeof document<`u`?document.createElement(`canvas`).getContext(`2d`):null;return e?(pe=e,e):{font:``,measureText:()=>({width:0})}}var he=new Map;function ge(e,t,n){let r=`${n}|${t}|${e}`,i=he.get(r);if(i!==void 0)return i;let a=me();a.font=`${n} ${t}px "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif`;let o=a.measureText(e).width;return he.set(r,o),o}var _e=24,ve=400,ye=8,be=16,xe=4,Se=200;function Ce(e,t,n){return Math.min(n,Math.max(t,e))}function we(e,t,n,r,i){let a=se(t),o=ce(t,n),s=Math.min(ge(e.text||``,o,I[a]),Se),c=z(t,n),l=Math.ceil(s+c*2),u=e.richContent&&(e.richContent.kind===`code`||e.richContent.kind===`table`)?Math.ceil(o*1.2)+6:le(t,n),d=0;if(e.link&&(d+=be),e.note&&(d+=be),d>0){let t=+!!e.link+ +!!e.note;d+=xe*t}let f=l+d,p=(()=>{let t=Math.round(L[a]*n/14);if(e.richContent&&(e.richContent.kind===`code`||e.richContent.kind===`table`)){let n=i?.[e.id];return Math.max(t,n??240)}return t})(),m=!!(e.richContent&&(e.richContent.kind===`code`||e.richContent.kind===`table`)),h=r?.[e.id],g=m?Math.max(24,h??Math.max(70,Math.ceil(o*5))):0,_=g>0?10:0;if(!e.image)return{w:Math.max(p,f),h:Math.ceil(u+_+g)};let v=Ce(e.image.width,_e,ve);return{w:Math.max(p,f,Math.ceil(v+c*2)),h:Math.ceil(e.image.height+ye+u+_+g)}}function Te(e,t={}){let n=t.mode??`mindmap`,r=t.preservePositions===!0,i=De(e,0,null,1,`right`,t.baseFontSize??14,t.richHeights,t.richWidths);return Oe(i),Ee(i,n,r),i.x=0,i.y=0,ke(i,r)}function Ee(e,t,n=!1){if(t===`mindmap`){let t=e.children;if(t.length!==0)if(t.length===1)t[0]._dir=`right`,t[0].side=1,t[0]._dirRight=1;else{let e=t.reduce((e,t)=>e+t._subtreeH,0),n=1,r=Math.abs(t[0]._subtreeH-(e-t[0]._subtreeH)),i=0;for(let a=0;a<t.length-1;a++){i+=t[a]._subtreeH;let o=Math.abs(i-(e-i));o<r&&(r=o,n=a+1)}for(let e=0;e<n;e++)t[e]._dir=`right`,t[e].side=1,t[e]._dirRight=1;for(let e=n;e<t.length;e++)t[e]._dir=`left`,t[e].side=-1,t[e]._dirRight=-1}let r=e.children.filter(e=>e.side===1),i=e.children.filter(e=>e.side===-1),a=(e,t)=>{let n=t===`right`?1:-1;e._dir=t,e.side=n,e._dirRight=n;for(let n of e.children)a(n,t)};for(let e of r)a(e,`right`);for(let e of i)a(e,`left`);r.length>0&&B({...e,children:r},`right`,ue,!0,n),i.length>0&&B({...e,children:i},`left`,ue,!0,n)}else if(t===`tree`){let t=e=>{e.side=1,e._dir=`right`;for(let n of e.children)t(n)};for(let t of e.children)t._dir=`right`;B(e,`right`,ue,!0,n),t(e)}else{for(let t of e.children)t._dir=`down`;V(e,ue,n)}}function B(e,t,n,r,i=!1){if(e.children.length===0)return;let a=e.children.reduce((e,t,n)=>e+t._subtreeH+(n>0?de:0),0),o=t===`right`?1:-1,s=r?o:1,c=e.y-s*a/2;e.children.forEach(r=>{i||(r.x=e.x+o*(e.width/2+n+r.width/2),r.y=c+s*r._subtreeH/2),r._dir=t,c+=s*(r._subtreeH+de),B(r,t,n,!1,i)})}function V(e,t,n=!1){if(e.children.length===0)return;let r=e.children.reduce((e,t,n)=>e+t._subtreeW+(n>0?de*2:0),0),i=e.x-r/2;e.children.forEach(r=>{n||(r.x=i+r._subtreeW/2,r.y=e.y+e.height/2+t+r.height/2),r._dir=`down`,i+=r._subtreeW+de*2,V(r,t,n)})}function De(e,t,n,r,i,a,o,s){let c=we(e,t,a,o,s),l={id:e.id,text:e.text,depth:t,x:e._x??0,y:e._y??0,width:c.w,height:c.h,fontSize:ce(t,a),isRoot:t===0,collapsed:e.collapsed,side:r,_dir:i,_dirRight:r,_subtreeH:c.h,_subtreeW:c.w,image:e.image?{...e.image}:void 0,link:e.link?{url:e.link.url}:void 0,note:e.note?{text:e.note.text}:void 0,richContent:e.richContent?{kind:e.richContent.kind,raw:e.richContent.raw,lang:e.richContent.lang}:void 0,children:[],parent:n};if(e.collapsed)return l;let u=e.children.length,d=Math.ceil(u/2);return l.children=e.children.map((e,n)=>{let c=t===0?n<d?1:-1:r;return De(e,t+1,l,c,i,a,o,s)}),l}function Oe(e){let t=[e];for(let e=0;e<t.length;e++){let n=t[e];for(let e of n.children)t.push(e)}for(let e=t.length-1;e>=0;e--){let n=t[e];if(n.collapsed||n.children.length===0){n._subtreeH=n.height,n._subtreeW=n.width;continue}let r=0,i=0;for(let e of n.children)r+=e._subtreeH,i+=e._subtreeW;n.children.length>1&&(r+=de*(n.children.length-1),i+=de*2*(n.children.length-1)),n._subtreeH=Math.max(n.height,r),n._subtreeW=Math.max(n.width,i)}}function ke(e,t=!1){let n=[e],r=1/0,i=-1/0,a=1/0,o=-1/0;for(;n.length;){let e=n.pop(),t=e.width/2,s=e.height/2;e.x-t<r&&(r=e.x-t),e.x+t>i&&(i=e.x+t),e.y-s<a&&(a=e.y-s),e.y+s>o&&(o=e.y+s),n.push(...e.children)}if(t)return{root:e,width:i-r+fe*2,height:o-a+fe*2,vbX:r-fe,vbY:a-fe,vbW:i-r+fe*2,vbH:o-a+fe*2};let s=fe-a,c=[e];for(;c.length;){let e=c.pop();e.y+=s,c.push(...e.children)}return a+=s,o+=s,{root:e,width:i-r+fe*2,height:o+fe,vbX:r-fe,vbY:0,vbW:i-r+fe*2,vbH:o+fe}}var Ae=[{id:`default`,name:`默认`,colors:[`#f87171`,`#fb923c`,`#fbbf24`,`#a3e635`,`#34d399`,`#22d3ee`,`#818cf8`,`#c084fc`]},{id:`classic`,name:`经典`,colors:[`#ef4444`,`#f59e0b`,`#10b981`,`#3b82f6`,`#6366f1`,`#8b5cf6`,`#ec4899`,`#14b8a6`]},{id:`vivid`,name:`活力`,colors:[`#dc2626`,`#ea580c`,`#ca8a04`,`#16a34a`,`#0891b2`,`#2563eb`,`#7c3aed`,`#db2777`]},{id:`dev`,name:`代码`,colors:[`#f472b6`,`#a78bfa`,`#60a5fa`,`#38bdf8`,`#22d3ee`,`#34d399`,`#facc15`,`#fb923c`]},{id:`mint`,name:`薄荷`,colors:[`#5eead4`,`#67e8f9`,`#93c5fd`,`#c4b5fd`,`#fbcfe8`,`#fde68a`,`#a7f3d0`,`#bae6fd`]}];function je(e,t=[]){return[...Ae,...t].find(t=>t.id===e)??Ae[0]}function Me(e,t=8){let n=[],r=new Set,i=/#[0-9a-fA-F]{3,8}\b|rgba?\([^)]+\)|[A-Za-z][A-Za-z0-9_-]{2,30}/g,a;for(;(a=i.exec(e))!==null;){let e=a[0],i=null;if(i=e.startsWith(`#`)?Ne(e):e.startsWith(`rgb`)?Pe(e):Fe[e.toLowerCase()]??null,!i)continue;let o=i.toLowerCase();if(!r.has(o)&&(r.add(o),n.push(o),n.length>=t))break}return n}function Ne(e){let t=e.startsWith(`#`)?e.slice(1):e;if(!/^[0-9a-fA-F]+$/.test(t))return null;let n;if(t.length===3)n=t.split(``).map(e=>e+e).join(``);else if(t.length===4)n=t.slice(0,3).split(``).map(e=>e+e).join(``);else if(t.length===6)n=t;else if(t.length===8)n=t.slice(0,6);else return null;return`#`+n.toLowerCase()}function Pe(e){let t=e.match(/^rgba?\(\s*([^)]+?)\s*\)$/i);if(!t)return null;let n=t[1].split(/\s*,\s*/);if(n.length<3)return null;let r=[];for(let e=0;e<3;e++){let t=n[e];if(t.endsWith(`%`)){let e=parseFloat(t);if(!isFinite(e))return null;r.push(Math.round(e/100*255))}else{let e=parseInt(t,10);if(!isFinite(e)||e<0||e>255)return null;r.push(e)}}return`#`+r.map(e=>e.toString(16).padStart(2,`0`)).join(``).toLowerCase()}var Fe={black:`#000000`,white:`#ffffff`,red:`#ff0000`,green:`#008000`,blue:`#0000ff`,yellow:`#ffff00`,cyan:`#00ffff`,magenta:`#ff00ff`,gray:`#808080`,grey:`#808080`,silver:`#c0c0c0`,maroon:`#800000`,olive:`#808000`,lime:`#00ff00`,aqua:`#00ffff`,teal:`#008080`,navy:`#000080`,fuchsia:`#ff00ff`,purple:`#800080`,orange:`#ffa500`,pink:`#ffc0cb`,brown:`#a52a2a`,gold:`#ffd700`,coral:`#ff7f50`,tomato:`#ff6347`,salmon:`#fa8072`,khaki:`#f0e68c`,violet:`#ee82ee`,indigo:`#4b0082`,turquoise:`#40e0d0`,chocolate:`#d2691e`,crimson:`#dc143c`,darkred:`#8b0000`,darkblue:`#00008b`,darkgreen:`#006400`,darkgray:`#a9a9a9`,darkgrey:`#a9a9a9`,lightgray:`#d3d3d3`,lightgrey:`#d3d3d3`,lightblue:`#add8e6`,lightgreen:`#90ee90`,lightyellow:`#ffffe0`,lightpink:`#ffb6c1`,skyblue:`#87ceeb`,forestgreen:`#228b22`,royalblue:`#4169e1`,steelblue:`#4682b4`,hotpink:`#ff69b4`,deeppink:`#ff1493`,orangered:`#ff4500`,goldenrod:`#daa520`,mediumpurple:`#9370db`};function Ie(){return`n_`+Math.random().toString(36).slice(2,10)+Date.now().toString(36).slice(-4)}function Le(e){return JSON.parse(JSON.stringify(e))}function H(e,t){if(e.id===t)return e;for(let n of e.children){let e=H(n,t);if(e)return e}return null}function Re(e,t,n=null){if(e.id===t)return n;for(let n of e.children){let r=Re(n,t,e);if(r!==null)return r}return null}function ze(e,t){let n=e.children.findIndex(e=>e.id===t);if(n>=0)return e.children.splice(n,1),!0;for(let n of e.children)if(ze(n,t))return!0;return!1}function Be(e,t,n){let r=H(e,t);return!r||r.text===n?!1:(r.text=n,!0)}function Ve(e,t,n,r){if(!Re(e,t)||t===n||H(H(e,t),n))return!1;let i=Re(e,t),a=i.children.findIndex(e=>e.id===t);if(a<0)return!1;let[o]=i.children.splice(a,1);if(r===`child`){let t=H(e,n);return t?(t.children.push(o),!0):(i.children.splice(a,0,o),!1)}let s=Re(e,n);if(!s)return i.children.splice(a,0,o),!1;let c=s.children.findIndex(e=>e.id===n);return c<0?(i.children.splice(a,0,o),!1):(r===`after`&&(c+=1),s.children.splice(c,0,o),!0)}function U(e){let t=/^新节点(?:\s+(\d+))?$/,n=0,r=!1;for(let i of e.children){let e=i.text.match(t);if(e)if(e[1]){let t=parseInt(e[1],10);t>n&&(n=t)}else r=!0}return n===0&&!r?Je:n>0?`新节点 ${n+1}`:`新节点 2`}function He(e,t,n){let r=H(e,t);if(!r)return null;let i={id:Ie(),text:n??U(r),children:[]};return r.children.push(i),i}function Ue(e,t,n){let r=Re(e,t);if(!r)return null;let i=r.children.findIndex(e=>e.id===t);if(i<0)return null;let a={id:Ie(),text:n??U(r),children:[]};return r.children.splice(i+1,0,a),a}function We(e,t,n){let r=Re(e,t);if(!r)return null;let i=r.children.findIndex(e=>e.id===t);if(i<0)return null;let a={id:Ie(),text:n,children:[]};return r.children.splice(i,0,a),a}function Ge(e,t){let n=Re(e,t);if(!n)return null;let r=n.children.findIndex(e=>e.id===t);if(r<0)return null;let i=n.children[r],a=Le(i);return Ke(a),n.children.splice(r+1,0,a),a}function Ke(e){e.id=Ie();for(let t of e.children)Ke(t)}function qe(e,t){let n=H(e,t);if(!n||n.id===e.id)return null;let r=Le(n);return Ke(r),r}var Je=`新节点`;function Ye(e,t=`导入的导图`){let n=e.split(/\r?\n/),r={id:Ie(),text:t,children:[]},i=[r],a=[-1/0],o=[],s=/^(#{1,6})\s+(.+?)\s*#*\s*$/,c=/^!\[([^\]]*)\]\((\S+?)(?:\s+"[^"]*")?\)\s*$/,l=/^\[([^\]]+)\]\((\S+?)(?:\s+"[^"]*")?\)\s*$/,u=/^(`{3,}|~{3,})\s*(\S+)?\s*$/,d=!1,f=[],p=null;function m(e){f.push(e)}function h(){if(p&&f.length>0){for(;f.length>0&&f[0].trim()===``;)f.shift();for(;f.length>0&&f[f.length-1].trim()===``;)f.pop();let e=f.join(`
|
|
2
2
|
`);e&&(p.note={text:e})}d=!1,f=[]}for(let e of n){if(d){let t=e.match(u);if(t&&t[1][0]==="`"){h();continue}m(e);continue}let t=e.match(s);if(t){let e=t[1].length,n=t[2].trim();o.push({level:e,text:n,body:``}),p=o[o.length-1];continue}let n=e.match(u);if(n&&n[2]===`note`){d=!0,f=[];continue}let r=e.match(c);if(r&&p){let e=r[2];p.image={src:e,naturalW:160,naturalH:120,width:160,height:120};continue}let i=e.match(l);if(i&&p){p.link={url:i[2]},p.text=i[1];continue}if(e.trim().length>0&&p){let t=e.trim();p.body=p.body?p.body+`
|
|
3
3
|
`+t:t}}d&&h();function g(e){for(;i.length>1;){let t=a[i.length-1];if(t!==void 0&&t<e.level)break;i.pop(),a.pop()}let t=i[i.length-1],n=e.text,r={id:Ie(),text:n,children:[]};e.image&&(r.image={...e.image}),e.link&&(r.link={url:e.link.url}),e.note&&(r.note={text:e.note.text}),e.body&&(r.note={text:e.body}),t.children.push(r),i.push(r),a.push(e.level)}for(let e of o)g(e);if(o.length>0&&o[0].level===1){let e=r.children[0];e&&(r.text=e.text,r.id=e.id,e.image&&(r.image={...e.image}),e.link&&(r.link={url:e.link.url}),e.note&&(r.note={text:e.note.text}),r.children=e.children)}return r}function Xe(e,t=1){let n=`#`.repeat(t)+` `+(e.text||``)+`
|
|
4
4
|
`;e.link&&(n+=`[${e.text||`link`}](${e.link.url})
|