@bkm016/basalt 0.1.5 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (202) hide show
  1. package/README.md +12 -10
  2. package/{chunk-gw05p4g3.js → chunk-053vb71h.js} +1 -1
  3. package/{chunk-3c330qna.js → chunk-063vbmtp.js} +2 -2
  4. package/{chunk-bgkegf0k.js → chunk-0javrjcm.js} +4 -4
  5. package/{chunk-pjr91g6k.js → chunk-10p3mb40.js} +1 -1
  6. package/{chunk-mkp28k1x.js → chunk-39vwrg8n.js} +2 -2
  7. package/{chunk-dddsrff6.js → chunk-654cny9a.js} +123 -121
  8. package/{chunk-8xb636vr.js → chunk-6kdgk70p.js} +2 -2
  9. package/{chunk-9z7sdh5e.js → chunk-6ptv4g5e.js} +1 -1
  10. package/{chunk-zzwjt7fp.js → chunk-75434aay.js} +1 -1
  11. package/{chunk-ar3dbfp9.js → chunk-7hr6zw2m.js} +1 -1
  12. package/{chunk-h1rypb99.js → chunk-8gw5bvh3.js} +4 -4
  13. package/{chunk-a4b75ekk.js → chunk-8saewt61.js} +2 -2
  14. package/{chunk-sqaam5ak.js → chunk-8wj32837.js} +1 -1
  15. package/{chunk-539ekagy.js → chunk-8wv5t0w6.js} +5 -5
  16. package/{chunk-aw65h276.js → chunk-8x21n7y9.js} +1 -1
  17. package/{chunk-0n99m9m4.js → chunk-a0c989ky.js} +1 -1
  18. package/{chunk-srjgvdvs.js → chunk-a5apjjcn.js} +6 -6
  19. package/chunk-a81p46j7.js +2 -0
  20. package/chunk-agsfy9w7.js +2 -0
  21. package/{chunk-2qcpq99g.js → chunk-arcqjt91.js} +1 -1
  22. package/{chunk-rxj6tct8.js → chunk-bdy4jksd.js} +1 -1
  23. package/{chunk-zrkh5dw7.js → chunk-benrzwea.js} +1 -1
  24. package/chunk-bpw6q7g0.js +3 -0
  25. package/{chunk-36cqq0ga.js → chunk-c7rcw9fb.js} +5 -5
  26. package/{chunk-x89em726.js → chunk-ca982n62.js} +1 -1
  27. package/chunk-d20p02ny.js +2 -0
  28. package/{chunk-5v4g21rw.js → chunk-d6p2hgxh.js} +1 -1
  29. package/{chunk-t7sc0wwc.js → chunk-dnx91jrd.js} +2 -2
  30. package/{chunk-mat08ab1.js → chunk-dpz4hwqb.js} +2 -2
  31. package/{chunk-zn0g0859.js → chunk-ebpyvs1d.js} +2 -2
  32. package/{chunk-00gwse5r.js → chunk-ecf896fz.js} +1 -1
  33. package/{chunk-0stvywr8.js → chunk-ejsneb6f.js} +1 -1
  34. package/{chunk-7as47pcw.js → chunk-ey15ye2h.js} +1 -1
  35. package/{chunk-v4k3qmdm.js → chunk-f156y565.js} +1 -1
  36. package/{chunk-7tgqhveh.js → chunk-f544p9rh.js} +1 -1
  37. package/chunk-fmq3zwzk.js +2 -0
  38. package/{chunk-ebzkckyw.js → chunk-fx7f4m3c.js} +1 -1
  39. package/{chunk-3k7ejpkc.js → chunk-g0t9c3gv.js} +1 -1
  40. package/{chunk-7w0mefgk.js → chunk-gv7wqkey.js} +2 -2
  41. package/{chunk-1xa7d5mh.js → chunk-j7yvh0ae.js} +1 -1
  42. package/{chunk-0j0qggej.js → chunk-n85qs7cs.js} +1 -1
  43. package/{chunk-7qq99360.js → chunk-n981vx1t.js} +4 -4
  44. package/{chunk-0fwdxd45.js → chunk-peja51xv.js} +1 -1
  45. package/{chunk-6dsq0fns.js → chunk-pg5nkf1y.js} +1 -1
  46. package/{chunk-jyrwk08p.js → chunk-prgm07j4.js} +1 -1
  47. package/{chunk-jvwg4rn1.js → chunk-q9dd6fhj.js} +4 -4
  48. package/{chunk-nxkmd29x.js → chunk-r8vvcp6c.js} +1 -1
  49. package/{chunk-stj493dn.js → chunk-r9aatvwm.js} +2 -2
  50. package/chunk-rfb85nj7.js +2 -0
  51. package/{chunk-980drajf.js → chunk-rfdt992v.js} +12 -12
  52. package/{chunk-e63c1186.js → chunk-s6dejhfj.js} +1 -1
  53. package/{chunk-wfyrfvfn.js → chunk-s7skpgm2.js} +1 -1
  54. package/{chunk-2nkfxhef.js → chunk-sjjtxpg2.js} +247 -230
  55. package/{chunk-r0jc8e7t.js → chunk-w67dvqtb.js} +2 -2
  56. package/{chunk-b9fqretv.js → chunk-whj87h4r.js} +2 -2
  57. package/{chunk-vt1anydc.js → chunk-y8dkfpmj.js} +3 -3
  58. package/{chunk-nx3jnbv8.js → chunk-z02sj1je.js} +2 -2
  59. package/{chunk-hq5ke1yp.js → chunk-zxkq9m8e.js} +1 -1
  60. package/compiled.js +3 -3
  61. package/package.json +1 -1
  62. package/ui-test-worker.js +27 -27
  63. package/web/{chunk-7znyd1mj.js → chunk-079091ar.js} +1 -1
  64. package/web/{chunk-65nwc4cf.js → chunk-083r4f80.js} +1 -1
  65. package/web/{chunk-h2ag4kvz.js → chunk-0cng7r2x.js} +1 -1
  66. package/web/chunk-0k0ande6.js +1 -0
  67. package/web/{chunk-14bad871.js → chunk-14deqqhr.js} +1 -1
  68. package/web/{chunk-pyg1mr80.js → chunk-1s53190z.js} +20 -20
  69. package/web/{chunk-1pasbxwh.js → chunk-2b63adsj.js} +1 -1
  70. package/web/{chunk-zc1mk10n.js → chunk-2cem4sv7.js} +2 -2
  71. package/web/{chunk-y7jq61nv.js → chunk-30b33r2w.js} +2 -2
  72. package/web/{chunk-xsrvw7dt.js → chunk-3baypnwn.js} +3 -3
  73. package/web/{chunk-s24qs1bn.js → chunk-4067nwjp.js} +6 -6
  74. package/web/{chunk-paywgcf7.js → chunk-4fm55fgb.js} +2 -2
  75. package/web/{chunk-yvgs6bm3.js → chunk-4q7wf0wd.js} +1 -1
  76. package/web/{chunk-g5jxwkdh.js → chunk-4sve9xrj.js} +1 -1
  77. package/web/{chunk-56krfj3b.js → chunk-4vjnrz87.js} +1 -1
  78. package/web/chunk-59678wmg.js +1 -0
  79. package/web/chunk-5k8sv4f5.js +1 -0
  80. package/web/{chunk-tcp77cp2.js → chunk-5vjhvw1m.js} +1 -1
  81. package/web/{chunk-f9k3xrwb.js → chunk-5wbnjjhg.js} +1 -1
  82. package/web/chunk-6ft5pz3c.js +1 -0
  83. package/web/chunk-7c8rwqtx.js +1 -0
  84. package/web/chunk-7qzz025k.js +1 -0
  85. package/web/chunk-7xbaqqd7.css +1 -0
  86. package/web/chunk-80eyv2mk.js +1 -0
  87. package/web/chunk-89paytbk.js +4 -0
  88. package/web/chunk-8ceej2g7.js +1 -0
  89. package/web/chunk-8nyhy122.js +1 -0
  90. package/web/{chunk-01hcjafh.js → chunk-989jq2h8.js} +1 -1
  91. package/web/{chunk-bnb9xhgw.js → chunk-aangfjqc.js} +6 -6
  92. package/web/{chunk-1cfh0e2e.js → chunk-bdydzbqk.js} +7 -7
  93. package/web/chunk-cpwtt6ny.js +1 -0
  94. package/web/{chunk-dzg1pv80.js → chunk-czjk218p.js} +3 -3
  95. package/web/{chunk-m8knte9z.js → chunk-dg3p8db5.js} +1 -1
  96. package/web/chunk-dsw5t58p.js +1 -0
  97. package/web/{chunk-j34q5jn6.js → chunk-dv72fat3.js} +1 -1
  98. package/web/{chunk-affear07.js → chunk-dvvs1jjq.js} +1 -1
  99. package/web/{chunk-g9sqbafw.js → chunk-e131rg6p.js} +1 -1
  100. package/web/{chunk-4m3zdd41.js → chunk-e8yj05t1.js} +1 -1
  101. package/web/chunk-ekw54h1q.js +1 -0
  102. package/web/{chunk-0k9aec1s.js → chunk-femhej5w.js} +3 -3
  103. package/web/chunk-fmthkpff.js +1 -0
  104. package/web/{chunk-d60dpf69.js → chunk-geh05ghh.js} +1 -1
  105. package/web/{chunk-892nf39p.js → chunk-gksf7cek.js} +7 -7
  106. package/web/{chunk-abhad4zj.js → chunk-ht4mx2dt.js} +4 -4
  107. package/web/chunk-hwsvhst3.js +1 -0
  108. package/web/{chunk-d6ddkh6e.js → chunk-k02b36g1.js} +1 -1
  109. package/web/{chunk-2nht58dc.js → chunk-kjacapzd.js} +1 -1
  110. package/web/{chunk-zz397b0v.js → chunk-kkfrs7d1.js} +1 -1
  111. package/web/{chunk-aqt7kc3s.js → chunk-kkyn8yhj.js} +1 -1
  112. package/web/chunk-mh4rx5cf.js +1 -0
  113. package/web/{chunk-4a4j030b.js → chunk-n448vaba.js} +1 -1
  114. package/web/{chunk-k67v6dyg.js → chunk-n754s8xd.js} +2 -2
  115. package/web/chunk-n8j88qxy.js +1 -0
  116. package/web/{chunk-kza0t0gj.js → chunk-nfvqjzz5.js} +1 -1
  117. package/web/chunk-nmpbsvwb.js +2 -0
  118. package/web/chunk-nws1s56b.js +1 -0
  119. package/web/{chunk-12z7d0hp.js → chunk-p7126wwy.js} +2 -2
  120. package/web/chunk-phnqnhj9.js +1 -0
  121. package/web/{chunk-5shygfgb.js → chunk-pjz30xcp.js} +2 -2
  122. package/web/{chunk-vhzys0rr.js → chunk-q3jevm51.js} +1 -1
  123. package/web/{chunk-advfpyb9.js → chunk-q97hn4j5.js} +4 -4
  124. package/web/chunk-qg31p6cn.js +1 -0
  125. package/web/{chunk-jcdw85mv.js → chunk-qhm3cfq9.js} +1 -1
  126. package/web/chunk-qsd595b9.js +1 -0
  127. package/web/{chunk-9xgspn75.js → chunk-r7frwjqx.js} +2 -2
  128. package/web/chunk-rddft5ce.js +1139 -0
  129. package/web/{chunk-x7sb3bwf.js → chunk-rgbdf2m9.js} +22 -22
  130. package/web/{chunk-fnnrrzqa.js → chunk-rsbkbg6x.js} +1 -1
  131. package/web/chunk-s2bs5vxh.js +2 -0
  132. package/web/{chunk-sd22cnjy.js → chunk-sgwccs54.js} +1 -1
  133. package/web/{chunk-c53xmf48.js → chunk-sjh8gtm9.js} +1 -1
  134. package/web/{chunk-zqht0jzx.js → chunk-sn3tkwme.js} +1 -1
  135. package/web/{chunk-gcv91974.js → chunk-svh4n157.js} +1 -1
  136. package/web/{chunk-7a3c137d.js → chunk-sy7e4dmq.js} +1 -1
  137. package/web/{chunk-vttgyb5v.js → chunk-t3658ehb.js} +1 -1
  138. package/web/{chunk-h6gh63xj.js → chunk-t6sq85s6.js} +1 -1
  139. package/web/{chunk-z4aj066q.js → chunk-t81p4wqc.js} +1 -1
  140. package/web/{chunk-qq5gh5zr.js → chunk-tewmsd7t.js} +1 -1
  141. package/web/chunk-tf57s7ry.js +1 -0
  142. package/web/{chunk-gxqaa4sv.js → chunk-tfn0rqg9.js} +5 -5
  143. package/web/{chunk-0qr891eq.js → chunk-tmndcktk.js} +1 -1
  144. package/web/chunk-tqr80b5w.js +2 -0
  145. package/web/{chunk-mnzramhc.js → chunk-twdy2f67.js} +1 -1
  146. package/web/chunk-tz4twwmw.js +2 -0
  147. package/web/{chunk-crzseqbx.js → chunk-v282r683.js} +1 -1
  148. package/web/chunk-v4vjjtn7.js +1 -0
  149. package/web/chunk-vbwdwcdp.js +1 -0
  150. package/web/{chunk-6enn8p66.js → chunk-vjngfh0q.js} +1 -1
  151. package/web/{chunk-g8kkc6vz.js → chunk-wbgkwxrc.js} +1 -1
  152. package/web/{chunk-ybw6vgf6.js → chunk-wjbk50hn.js} +1 -1
  153. package/web/chunk-wjy848e2.js +1 -0
  154. package/web/{chunk-3hkgdw6f.js → chunk-wqsczy57.js} +3 -3
  155. package/web/chunk-wvfmmw1v.js +8 -0
  156. package/web/chunk-x1jm4zsg.js +1 -0
  157. package/web/{chunk-26bwh1sb.js → chunk-xbpc6x9m.js} +6 -6
  158. package/web/{chunk-xk1t58c4.js → chunk-xckxtfp8.js} +4 -4
  159. package/web/{chunk-qrdh9j62.js → chunk-xmsb2g71.js} +1 -1
  160. package/web/{chunk-ka7c5rhx.js → chunk-y99ed8rd.js} +6 -6
  161. package/web/{chunk-0p1nmj5n.js → chunk-z1geewdf.js} +1 -1
  162. package/web/index.html +1 -1
  163. package/worker.js +1 -1
  164. package/chunk-2nb3d92s.js +0 -2
  165. package/chunk-2pa1z37c.js +0 -2
  166. package/chunk-4g5f43ea.js +0 -3
  167. package/chunk-eegztdzb.js +0 -2
  168. package/chunk-wd3z74av.js +0 -2
  169. package/chunk-yna8bwqc.js +0 -2
  170. package/web/chunk-0ytga215.js +0 -1
  171. package/web/chunk-1amzv4ha.js +0 -1
  172. package/web/chunk-1s2hp6h1.js +0 -1
  173. package/web/chunk-2y0rc1fe.js +0 -1
  174. package/web/chunk-4w298aqs.js +0 -1
  175. package/web/chunk-6stt9d18.js +0 -1
  176. package/web/chunk-7e47b1sn.js +0 -1
  177. package/web/chunk-7pypx5h8.js +0 -2
  178. package/web/chunk-9dy7z3ej.js +0 -2
  179. package/web/chunk-9mq2cdtq.js +0 -1
  180. package/web/chunk-b5hah4mf.js +0 -1
  181. package/web/chunk-b8tfetd8.js +0 -1
  182. package/web/chunk-ckgpy4r4.js +0 -1
  183. package/web/chunk-dbnrfxt1.js +0 -8
  184. package/web/chunk-ddxf8e84.js +0 -1
  185. package/web/chunk-e8h45nyr.js +0 -1
  186. package/web/chunk-ej9vb61c.js +0 -1
  187. package/web/chunk-fjag6yg8.js +0 -2
  188. package/web/chunk-gxsb5tx3.js +0 -1
  189. package/web/chunk-jg6fmz2d.js +0 -1
  190. package/web/chunk-mpfgr049.js +0 -1
  191. package/web/chunk-mz1dabxh.js +0 -1
  192. package/web/chunk-p53n0hwr.js +0 -1
  193. package/web/chunk-pfcnr9tw.js +0 -1
  194. package/web/chunk-q7xkscc5.js +0 -1
  195. package/web/chunk-qmbgb79a.js +0 -1139
  196. package/web/chunk-sfq6cw45.js +0 -2
  197. package/web/chunk-svqj4az8.js +0 -1
  198. package/web/chunk-t7jwyvvr.js +0 -1
  199. package/web/chunk-tf18d2dk.css +0 -1
  200. package/web/chunk-v0g4cqc1.js +0 -4
  201. package/web/chunk-vqfz99ff.js +0 -1
  202. package/web/chunk-zazs8p6c.js +0 -1
@@ -1,2 +0,0 @@
1
- import{e,a,b,l,M,P,Tt,Et,yo,gt,tn,vo,Yn,Pe,bo,Wi,At,Gi,nn,Xn}from"./chunk-pyg1mr80.js";import{J}from"./chunk-fjag6yg8.js";import{x}from"./chunk-qmbgb79a.js";function la(t,{edgePathsClass:r="edges edgePaths"}={}){let n=t.insert("g").attr("class","root"),i=n.insert("g").attr("class","clusters"),s=n.insert("g").attr("class",r),o=n.insert("g").attr("class","edgeLabels"),u=n.insert("g").attr("class","nodes");return{clusters:i,edgePaths:s,edgeLabels:o,nodes:u,rootGroups:n}}e(la,"createLayoutElementGroups");async function D(t,r,n){if(r.label){let{shapeSvg:i,bbox:s}=await P(t,n===void 0?r:{...r,width:n});r.labelBBox={width:s.width,height:s.height},i.remove()}else r.labelBBox={width:0,height:0}}e(D,"measureGroupLabel");async function ca(t,r,n){let i=await Et(t,r,n),s=i.node()?.getBBox()??{width:0,height:0};return r.width=s.width,r.height=s.height,i}e(ca,"insertMeasuredNode");function S(t,r,n){let i=t,s=new Set;while(i){if(i.dir)return i.dir;if(!i.parentId||s.has(i.parentId))break;s.add(i.parentId),i=r.get(i.parentId)}return n}e(S,"resolveNodeDir");async function k(t,r,n={}){let i=new J({multigraph:!0,compound:!0}),s=[...r.edges],o=l(),u=la(t),{edgeLabels:d,nodes:c}=u,g=new Map,h=new Map(r.nodes.map((f)=>[f.id,f])),C=r.direction,w=t.node()!=null;await Promise.all(r.nodes.map(async(f)=>{if(f.isGroup){if(w){let p=n.unwrapGroupLabels&&f.labelType!=="markdown";await D(c,f,p?Number.POSITIVE_INFINITY:void 0)}i.setNode(f.id,{...f})}else{if(w){let p=await ca(c,f,{config:o,dir:S(f,h,C)});g.set(f.id,p)}i.setNode(f.id,{...f})}}));for(let f of s){if(w&&Wi(f))await At(d,f);if(i.setEdge(f.start,f.end,{...f},f.id),!r.edges.some((E)=>E.id===f.id))r.edges.push(f)}if(globalThis.mermaidCaptureSizes){let{captureNodeSizes:f}=await (x("qq5gh5zr"),import("./chunk-qq5gh5zr.js"));f(t,r)}return{graph:i,groups:u,nodeElements:g}}e(k,"createGraphWithElements");var W=new Map,m=new Map,R=new Map,Z=e(()=>{m.clear(),R.clear(),W.clear()},"clear"),v=e((t,r)=>{let n=m.get(r)||[];return a.trace("In isDescendant",r," ",t," = ",n.includes(t)),n.includes(t)},"isDescendant"),I=e((t,r)=>{let n=m.get(r)||[];if(a.info("Descendants of ",r," is ",n),a.info("Edge is ",t),t.v===r||t.w===r)return!1;if(!n)return a.debug("Tilt, ",r,",not in descendants"),!1;return n.includes(t.v)||v(t.v,r)||v(t.w,r)||n.includes(t.w)},"edgeInCluster"),T=e((t,r,n,i)=>{a.debug("Copying children of ",t,"root",i,"data",r.node(t),i);let s=r.children(t)||[];if(t!==i)s.push(t);a.debug("Copying (nodes) clusterId",t,"nodes",s),s.forEach((o)=>{if(r.children(o).length>0)T(o,r,n,i);else{let u=r.node(o);if(a.info("cp ",o," to ",i," with parent ",t),n.setNode(o,u),i!==r.parent(o))a.debug("Setting parent",o,r.parent(o)),n.setParent(o,r.parent(o));if(t!==i&&o!==t)a.debug("Setting parent",o,t),n.setParent(o,t);else a.info("In copy ",t,"root",i,"data",r.node(t),i),a.debug("Not Setting parent for node=",o,"cluster!==rootId",t!==i,"node!==clusterId",o!==t);let d=r.edges(o);a.debug("Copying Edges",d),d.forEach((c)=>{a.info("Edge",c);let g=r.edge(c.v,c.w,c.name);a.info("Edge data",g,i);try{if(I(c,i))a.info("Copying as ",c.v,c.w,g,c.name),n.setEdge(c.v,c.w,g,c.name),a.info("newGraph edges ",n.edges(),n.edge(n.edges()[0]));else a.info("Skipping copy of edge ",c.v,"-->",c.w," rootId: ",i," clusterId:",t)}catch(h){a.error(h)}})}a.debug("Removing node",o),r.removeNode(o)})},"copy"),B=e((t,r)=>{let n=r.children(t),i=[...n];for(let s of n)R.set(s,t),i=[...i,...B(s,r)];return i},"extractDescendants"),ee=e((t,r,n)=>{let i=t.edges().filter((c)=>c.v===r||c.w===r),s=t.edges().filter((c)=>c.v===n||c.w===n),o=i.map((c)=>({v:c.v===r?n:c.v,w:c.w===r?r:c.w})),u=s.map((c)=>({v:c.v,w:c.w}));return o.filter((c)=>u.some((g)=>c.v===g.v&&c.w===g.w))},"findCommonEdges"),Fn=e((t,r,n)=>{let i=r.children(t);if(a.trace("Searching children of id ",t,i),i.length<1)return t;let s;for(let o of i){let u=Fn(o,r,n),d=ee(r,n,u);if(u)if(d.length>0)s=u;else return u}return s},"findNonClusterChild"),L=e((t)=>{if(!W.has(t))return t;if(!W.get(t).externalConnections)return t;if(W.has(t))return W.get(t).id;return t},"getAnchorId"),to=e((t,r)=>{if(!t||r>10){a.debug("Opting out, no graph ");return}else a.debug("Opting in, graph ");t.nodes().forEach(function(n){if(t.children(n).length>0)a.debug("Cluster identified",n," Replacement id in edges: ",Fn(n,t,n)),m.set(n,B(n,t)),W.set(n,{id:Fn(n,t,n),clusterData:t.node(n)})}),t.nodes().forEach(function(n){let i=t.children(n),s=t.edges();if(i.length>0)a.debug("Cluster identified",n,m),s.forEach((o)=>{let u=v(o.v,n),d=v(o.w,n);if(u^d)a.debug("Edge: ",o," leaves cluster ",n),a.debug("Descendants of XXX ",n,": ",m.get(n)),W.get(n).externalConnections=!0});else a.debug("Not a cluster ",n,m)});for(let n of W.keys()){let i=W.get(n).id,s=t.parent(i);if(s!==n&&W.has(s)&&!W.get(s).externalConnections)W.get(n).id=s;let o=t.edges().some((u)=>u.v===n);if(i&&W.get(n)?.externalConnections&&o&&_(t,i,n)){let u=te(t,n,t.parent(i));if(u)W.get(n).id=u}}t.edges().forEach(function(n){let i=t.edge(n);a.debug("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(n)),a.debug("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(t.edge(n)));let{v:s,w:o}=n;if(a.debug("Fix XXX",W,"ids:",n.v,n.w,"Translating: ",W.get(n.v)," --- ",W.get(n.w)),W.get(n.v)||W.get(n.w)){if(a.debug("Fixing and trying - removing XXX",n.v,n.w,n.name),s=L(n.v),o=L(n.w),t.removeEdge(n.v,n.w,n.name),s!==n.v){let u=t.parent(s);W.get(u).externalConnections=!0,i.fromCluster=n.v}if(o!==n.w){let u=t.parent(o);W.get(u).externalConnections=!0,i.toCluster=n.w}a.debug("Fix Replacing with XXX",s,o,n.name),t.setEdge(s,o,i,n.name)}}),A(t,0),a.trace(W)},"adjustClustersAndEdges"),A=e((t,r)=>{if(r>10){a.error("Bailing out");return}let n=t.nodes(),i=!1;for(let s of n){let o=t.children(s);i=i||o.length>0}if(!i){a.debug("Done, no node has children",t.nodes());return}a.debug("Nodes = ",n,r);for(let s of n)if(a.debug("Extracting node",s,W,W.has(s)&&!W.get(s).externalConnections,!t.parent(s),t.node(s),t.children("D")," Depth ",r),!W.has(s))a.debug("Not a cluster",s,r);else if(!W.get(s).externalConnections&&t.children(s)&&t.children(s).length>0){a.debug("Cluster without external connections, without a parent and with children",s,r);let u=t.graph().rankdir==="TB"?"LR":"TB";if(W.get(s)?.clusterData?.dir)u=W.get(s).clusterData.dir,a.debug("Fixing dir",W.get(s).clusterData.dir,u);let d=new J({multigraph:!0,compound:!0}).setGraph({rankdir:u,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});T(s,t,d,s),t.setNode(s,{clusterNode:!0,id:s,clusterData:W.get(s).clusterData,label:W.get(s).label,graph:d})}else a.debug("Cluster ** ",s," **not meeting the criteria !externalConnections:",!W.get(s).externalConnections," no parent: ",!t.parent(s)," children ",t.children(s)&&t.children(s).length>0,t.children("D"),r),a.debug(W);n=t.nodes(),a.debug("New list of nodes",n);for(let s of n){let o=t.node(s);if(a.debug(" Now next level",s,o),o?.clusterNode)A(o.graph,r+1)}},"extractor"),X=e((t,r)=>{if(r.length===0)return[];let n=Object.assign([],r);return r.forEach((i)=>{let s=t.children(i),o=X(t,s);n=[...n,...o]}),n},"sorter"),ua=e((t)=>X(t,t.children()),"sortNodesByHierarchy"),_=e((t,r,n)=>{let i=t.parent(r);while(i&&i!==n){let s=W.get(i);if(s&&!s.externalConnections)return!0;i=t.parent(i)}return!1},"isNodeInExtractableCluster"),te=e((t,r,n)=>{let i=t.children(r)??[];for(let s of i){if(s===n||v(s,n))continue;let o=Fn(s,t,r);if(!o)continue;if(!_(t,o,r))return o}return null},"findSafeAnchorNode");function cr({prepareLayout:t,measureLayout:r,runLayoutCore:n,paintLayout:i,afterPaint:s,paintOptions:o}){let u=r??O;return e(async function(c,g,h,C){let w=g.select("g");(h?.insertMarkers??Xn)(w,c.markers,c.type,c.diagramId),G();let f={element:w,helpers:h,options:C};f.preparedLayout=await t?.(c,f);let p=await u(c,f),E=await n(c,f),N={...f,measure:p};if(i)await i(c,N,E);else await F(c,N,o);await s?.(c,N,E)},"render")}e(cr,"createCommonLayoutRenderer");function G(){yo(),bo(),vo(),Z()}e(G,"clearLayoutRenderState");async function O(t,{element:r},n){return await k(r,t,n)}e(O,"defaultMeasureLayout");async function F(t,r,n={}){let{measure:i}=r,{groups:s}=i;for(let u of n.getNodes?.(t,r)??t.nodes){if(n.skipNode?.(u,r))continue;await j(s,u,r,n)}let o=z(t.nodes);for(let u of t.edges){if(V(u,n))continue;await Y(s,u,o,t,n,r)}}e(F,"paintLayoutData");async function j(t,r,n,i){if(r.clusterNode)gt(r);else if(H(r,n,i))await tn(t.clusters,r);else gt(r)}e(j,"paintLayoutNode");function H(t,r,n){return t.isGroup===!0&&(n.isCluster?.(t,r)??!0)}e(H,"shouldPaintAsCluster");function z(t){let r=new Map;for(let n of t)if(n?.id)r.set(n.id,n);return r}e(z,"buildNodeLookup");function V(t,r){return t.isLayoutOnly||Boolean(r.skipEdge?.(t))}e(V,"shouldSkipPaintEdge");async function Y(t,r,n,i,s,o){let u=nn(t.edgePaths,{...r},s.clusterDb??new Map,i.type,y(r.start,r,n,o,s),y(r.end,r,n,o,s),i.diagramId,q(r,s),i.layoutAlgorithm);if(Wi(r)){if(!Yn.has(r.id))await At(t.edgeLabels,r);K(r,u)}}e(Y,"paintLayoutEdge");function y(t,r,n,i,s){return s.getEdgeNode?.(t,r,i)??(t?n.get(t)??{}:{})}e(y,"getRenderedNode");function q(t,r){return typeof r.skipIntersect==="function"?r.skipIntersect(t):r.skipIntersect??!1}e(q,"shouldSkipIntersect");function K(t,r){let n=r?.updatedPath??r?.originalPath,i=b(),{subGraphTitleTotalMargin:s}=Tt({flowchart:i.flowchart??{}});if(t.label){let o=Yn.get(t.id),{x:u,y:d}=Gi(t,r);o.attr("transform",`translate(${u}, ${d+s/2})`)}for(let[o,u]of[["startLeft",t.startLabelLeft],["startRight",t.startLabelRight],["endLeft",t.endLabelLeft],["endRight",t.endLabelRight]])if(u){let{x:d,y:c}=Q(t,o,n);Pe.get(t.id)[o].attr("transform",`translate(${d}, ${c})`)}}e(K,"positionRenderedEdgeLabel");var ne={startLeft:"start_left",startRight:"start_right",endLeft:"end_left",endRight:"end_right"};function Q(t,r,n){let i=t.terminalLabelCenters?.[r];if(i)return{...i};if(!n)return{x:t.x,y:t.y};let s=r.startsWith("start")?t.arrowTypeStart:t.arrowTypeEnd;return M.calcTerminalLabelPosition(s?10:0,ne[r],n)}e(Q,"terminalLabelTranslate");
2
- export{la,ca,W,Fn,to,ua,cr};
@@ -1,2 +0,0 @@
1
- import{z,Me}from"./chunk-pyg1mr80.js";var n=(r,o)=>z.lang.round(Me.parse(r)[o]),Bt=n;
2
- export{Bt};
@@ -1 +0,0 @@
1
- import"./chunk-pyg1mr80.js";import"./chunk-fjag6yg8.js";import"./chunk-7pypx5h8.js";import{eo}from"./chunk-v0g4cqc1.js";export{eo as render};
@@ -1 +0,0 @@
1
- import"./chunk-pyg1mr80.js";import"./chunk-tcp77cp2.js";import{Co}from"./chunk-0k9aec1s.js";import"./chunk-m8knte9z.js";import"./chunk-9dy7z3ej.js";import"./chunk-9xgspn75.js";import"./chunk-01hcjafh.js";export{Co as diagram};
@@ -1 +0,0 @@
1
- import{_i}from"./chunk-zc1mk10n.js";export{_i as createGitGraphServices};
@@ -1 +0,0 @@
1
- import{xi}from"./chunk-zc1mk10n.js";export{xi as createCynefinServices};
@@ -1,8 +0,0 @@
1
- import{e}from"./chunk-pyg1mr80.js";import"./chunk-tcp77cp2.js";import{Ai,Li}from"./chunk-0k9aec1s.js";import"./chunk-m8knte9z.js";import"./chunk-9dy7z3ej.js";import"./chunk-9xgspn75.js";import"./chunk-01hcjafh.js";var r=e((t)=>`${Ai(t)}
2
- .swimlane.cluster:not([data-color-id]) rect {
3
- stroke: ${t.clusterBorder} !important;
4
- }
5
- [data-look="neo"].cluster rect {
6
- filter: none;
7
- }
8
- `,"getStyles"),o=r,D=Li({styles:o});export{D as diagram};
@@ -1 +0,0 @@
1
- import{Qn}from"./chunk-0p1nmj5n.js";export{Qn as default};
@@ -1 +0,0 @@
1
- import{o,ne,i,r,y,t,n,_,Z,ae,rt,bt}from"./chunk-qmbgb79a.js";import{vn}from"./chunk-vttgyb5v.js";var U=[{id:"exa",name:"Exa",description:"免密钥 · 综合搜索"},{id:"tavily",name:"Tavily",description:"免密钥 · 支持域名筛选"},{id:"parallel",name:"Parallel",description:"免密钥 · 网页搜索"},{id:"firecrawl",name:"Firecrawl",description:"免密钥 · 网页内容"},{id:"tinyfish",name:"TinyFish",description:"免密钥 · 搜索摘要"},{id:"searxng",name:"SearXNG",description:"免密钥 · 需自建服务"},{id:"brave",name:"Brave",description:"需密钥 · 独立搜索引擎"}];function R(e){return{enabled:e.search.provider!=="off",provider:e.search.provider==="off"?"auto":e.search.provider,searxngUrl:e.search.searxngUrl??"",proxy:e.proxy??"",acceptLanguage:e.acceptLanguage??""}}function A(e,d){return{search:{provider:e.enabled?e.provider:"off",searxngUrl:e.searxngUrl},keys:{...d},proxy:e.proxy,acceptLanguage:e.acceptLanguage}}function z(e,d,x){let g=R(e);if(d.enabled!==g.enabled)return!0;if(d.enabled&&d.provider!==g.provider)return!0;return d.searxngUrl!==g.searxngUrl||d.proxy!==g.proxy||d.acceptLanguage!==g.acceptLanguage||Object.keys(x).length>0}function B({notice:e}){let{cn:d}=_();if(!e)return null;let x=e.type==="success"?vn:Z;return n("div",{role:e.type==="error"?"alert":"status",className:d("flex items-start gap-2 text-xs",e.type==="success"?"text-success":"text-danger"),children:[t(x,{className:"mt-0.5 size-4 shrink-0","aria-hidden":"true"}),t("span",{className:"min-w-0 break-words",children:e.text})]})}function F(e){let{Button:d,Input:x,Switch:g,Select:W,StatusChip:p,SettingGroup:h,SettingRow:C,cn:w}=_(),f=ne(),c=e.busy!==void 0;return n("form",{className:"min-w-0 space-y-6",onSubmit:async(s)=>{s.preventDefault(),await e.onSave()},children:[n(h,{title:"联网搜索",children:[t(C,{title:"启用搜索",description:"查询会发送至所选搜索服务。",children:n("div",{className:"flex items-center gap-3",children:[t("span",{className:"text-xs text-dim",children:e.draft.enabled?"已开启":"已关闭"}),t(g,{label:"启用联网搜索",disabled:c,checked:e.draft.enabled,onCheckedChange:(s)=>e.onDraft({...e.draft,enabled:s})})]})}),n("div",{className:"space-y-4 p-4",children:[n("div",{children:[t("label",{htmlFor:`${f}-provider`,className:"mb-1.5 block text-[13px] font-medium text-dim",children:"搜索渠道"}),t(W,{id:`${f}-provider`,value:e.draft.provider,disabled:c||!e.draft.enabled,className:"min-w-0",groups:[{options:[{value:"auto",label:"自动",description:"失败时依次切换渠道"},...U.map((s)=>({value:s.id,label:s.name}))]}],onValueChange:(s)=>{let a=s==="auto"?s:U.find((k)=>k.id===s)?.id;if(a)e.onDraft({...e.draft,provider:a})}}),t("p",{className:"mt-1.5 text-xs leading-5 text-faint",children:"自动:Exa → Tavily → Parallel → Firecrawl → TinyFish"})]}),(e.draft.provider==="searxng"||e.draft.searxngUrl)&&n("div",{children:[t("label",{htmlFor:`${f}-searxng`,className:"mb-1.5 block text-[13px] font-medium text-dim",children:"自建 SearXNG 地址"}),t(x,{id:`${f}-searxng`,type:"url",maxLength:2000,disabled:c||!e.draft.enabled,value:e.draft.searxngUrl,placeholder:"https://search.example.com",onChange:(s)=>e.onDraft({...e.draft,searxngUrl:s.target.value})})]})]})]}),t(h,{title:"渠道与密钥",description:"检测使用已保存配置,按下列顺序执行。",action:n(d,{type:"button",size:"sm",variant:"ghost",disabled:c,onClick:async()=>await e.onCheck("all"),children:[t(ae,{className:w("size-3.5",e.checking==="all"&&"animate-spin"),"aria-hidden":"true"}),e.checking==="all"?"正在检测…":"检测全部渠道"]}),children:U.map((s)=>{let a=s.id,k=a==="searxng"?void 0:e.saved.keys[a],N=k?.source==="environment",D=a==="searxng"?void 0:e.keys[a],K=D==="",v=e.checks[a],m=e.checking==="all"||e.checking===a,S=k?.configured?"已配置密钥":"未配置";if(a==="searxng")S=e.saved.search.searxngUrl?"已配置地址":"未配置地址";if(N)S="来自环境变量";if(K)S="待移除";if(D)S="待保存密钥";return n("div",{className:"min-w-0 p-4",children:[n("div",{className:"flex min-w-0 flex-wrap items-center justify-between gap-x-3 gap-y-2",children:[n("div",{className:"min-w-0 flex-1 basis-28",children:[t("div",{className:"text-sm font-medium text-ink",children:s.name}),t("p",{className:"mt-0.5 text-xs text-faint",children:s.description})]}),n("div",{className:"flex max-w-full flex-wrap items-center justify-end gap-2",children:[t(p,{tone:D!==void 0?"warning":"neutral",children:S}),v&&!m&&t(p,{tone:v.ok?"success":"danger",children:v.ok?`可用 ${v.elapsedMs} ms`:"不可用"}),m&&t(p,{tone:"neutral",pulse:!0,children:"检测中"}),a!=="searxng"&&!N&&n(y,{children:[t(d,{type:"button",size:"sm",variant:"ghost",disabled:c,"aria-label":`${k?.configured?"更换":"设置"} ${s.name} 密钥`,"aria-expanded":e.editingKey===a,"aria-controls":`${f}-${a}-key-editor`,onClick:()=>e.onEditKey(e.editingKey===a?void 0:a),children:k?.configured?"更换":"设置密钥"}),k?.configured&&!K&&t(d,{type:"button",size:"sm",variant:"ghost",disabled:c,"aria-label":`移除 ${s.name} 密钥`,onClick:()=>{e.onKeys({...e.keys,[a]:""}),e.onEditKey(void 0)},children:"移除"})]}),t(d,{type:"button",size:"sm",variant:"ghost",disabled:c,"aria-label":`检测 ${s.name}`,onClick:async()=>await e.onCheck(a),children:"检测"})]})]}),N&&t("p",{className:"mt-1 text-xs text-faint",children:"请在服务端环境变量中更换或移除。"}),a!=="searxng"&&e.editingKey===a&&n("div",{id:`${f}-${a}-key-editor`,className:"mt-3 space-y-2",children:[n("label",{htmlFor:`${f}-${a}-key`,className:"block text-xs font-medium text-dim",children:[s.name," API 密钥"]}),t(x,{id:`${f}-${a}-key`,type:"password",autoComplete:"new-password",maxLength:4000,disabled:c,value:e.keys[a]??"",placeholder:"输入新密钥,保存后生效",onChange:(P)=>{let b={...e.keys};if(P.target.value.trim())b[a]=P.target.value;else delete b[a];e.onKeys(b)}}),n("div",{className:"flex items-center justify-between gap-2",children:[t("p",{className:"min-w-0 text-xs text-faint",children:"密钥只写入,不回显。"}),t(d,{type:"button",size:"sm",variant:"ghost",disabled:c,onClick:()=>{let P={...e.keys};delete P[a],e.onKeys(P),e.onEditKey(void 0)},children:"取消"})]})]}),v&&!v.ok&&!m&&t("p",{role:"status",className:"mt-2 break-words text-xs leading-5 text-danger",children:v.error??(v.kind==="search"?v.meta?.failed[0]?.error:v.meta?.error)??"检测失败,请检查配置。"})]},a)})}),n(h,{title:"网络",children:[n("div",{className:"p-4",children:[t("label",{htmlFor:`${f}-proxy`,className:"mb-1.5 block text-[13px] font-medium text-dim",children:"代理 URL"}),t(x,{id:`${f}-proxy`,type:"url",maxLength:2000,disabled:c,value:e.draft.proxy,placeholder:"http://127.0.0.1:7890",onChange:(s)=>e.onDraft({...e.draft,proxy:s.target.value})}),t("p",{className:"mt-1.5 text-xs text-faint",children:"留空使用服务端环境代理。"})]}),n("div",{className:"p-4",children:[t("label",{htmlFor:`${f}-language`,className:"mb-1.5 block text-[13px] font-medium text-dim",children:"Accept-Language"}),t(x,{id:`${f}-language`,maxLength:200,disabled:c,value:e.draft.acceptLanguage,placeholder:"en-US,en;q=0.9",onChange:(s)=>e.onDraft({...e.draft,acceptLanguage:s.target.value})})]})]}),n("div",{className:"mt-4 flex flex-wrap items-center justify-between gap-3 px-0.5",children:[t("div",{className:"min-w-0 flex-1",children:t(B,{notice:e.notice})}),n("div",{className:"flex flex-wrap items-center gap-2",children:[e.dirty&&n(d,{type:"button",size:"sm",variant:"ghost",disabled:c,onClick:e.onRestore,children:[t(rt,{className:"size-3.5","aria-hidden":"true"}),"重置"]}),n(d,{type:"submit",size:"sm",variant:"primary",disabled:c||!e.dirty,children:[t(bt,{className:"size-3.5","aria-hidden":"true"}),e.busy==="save"?"保存中…":"保存"]}),e.onClose&&t(d,{type:"button",size:"sm",variant:"secondary",onClick:e.onClose,children:"关闭"})]})]})]})}function q({connection:e,onClose:d}){let{Button:x}=_(),[g,W]=r(),[p,h]=r(),[C,w]=r({}),[f,c]=r(),[s,a]=r("load"),[k,N]=r(),[D,K]=r({}),[v,m]=r(),[S,P]=r(0),b=i(void 0);o(()=>{let l=new AbortController;return b.current=l,a("load"),m(void 0),W(void 0),h(void 0),w({}),c(void 0),K({}),e.request("/api/plugins/webfetch/settings",{signal:l.signal,cache:S>0?"reload":"default"}).then((u)=>{if(l.signal.aborted)return;W(u),h(R(u))}).catch((u)=>{if(!l.signal.aborted)m({type:"error",text:u instanceof Error?u.message:"加载设置失败,请重试。"})}).finally(()=>{if(!l.signal.aborted)b.current=void 0,a(void 0)}),()=>{l.abort(),b.current?.abort(),b.current=void 0}},[e,S]);async function G(){if(b.current||!g||!p||!z(g,p,C))return;let l=new AbortController;b.current=l,a("save"),m(void 0);try{let u=await e.request("/api/plugins/webfetch/settings",{method:"PATCH",signal:l.signal,headers:{"Content-Type":"application/json"},body:JSON.stringify(A(p,C))});if(l.signal.aborted)return;W(u),h(R(u)),w({}),c(void 0),K({}),m({type:"success",text:"设置已保存。"})}catch(u){if(!l.signal.aborted)m({type:"error",text:u instanceof Error?u.message:"保存失败,请重试。"})}finally{if(!l.signal.aborted)b.current=void 0,a(void 0)}}async function I(l){if(b.current||!g)return;let u=new AbortController;b.current=u,a("test"),N(l),m(void 0);try{let L=await e.request(`/api/plugins/webfetch/test?provider=${l}`,{method:"POST",signal:u.signal});if(u.signal.aborted)return;K((j)=>{let T={...j};for(let E of L.checks)if(E.kind==="search"&&E.provider)T[E.provider]=E;return T})}catch(L){if(!u.signal.aborted)m({type:"error",text:L instanceof Error?L.message:"检测失败,请重试。"})}finally{if(!u.signal.aborted)b.current=void 0,a(void 0),N(void 0)}}if(!g||!p)return n("div",{className:"min-w-0 space-y-3",children:[s==="load"&&t("p",{role:"status",className:"text-sm text-dim",children:"正在加载设置…"}),t(B,{notice:v}),d&&t(x,{type:"button",size:"sm",variant:"secondary",onClick:d,children:"关闭"}),s!=="load"&&t(x,{type:"button",size:"sm",variant:"ghost",onClick:()=>P(S+1),children:"重新加载"})]});return t(F,{saved:g,draft:p,keys:C,editingKey:f,dirty:z(g,p,C),busy:s==="load"?void 0:s,checking:k,checks:D,notice:v,onDraft:(l)=>{h(l),m(void 0)},onKeys:(l)=>{w(l),m(void 0)},onEditKey:c,onClose:d,onSave:G,onCheck:I,onRestore:()=>{h(R(g)),w({}),c(void 0),m(void 0)}})}export{F as SettingsForm,q as default};
@@ -1 +0,0 @@
1
- import{yi}from"./chunk-zc1mk10n.js";export{yi as createTreemapServices};
@@ -1,2 +0,0 @@
1
- import{Rt}from"./chunk-qmbgb79a.js";var Z={};Rt(Z,{default:()=>St});var V={};Rt(V,{default:()=>Yt});var Kr=typeof global=="object"&&global&&global.Object===Object&&global,q=Kr;var Hr=typeof self=="object"&&self&&self.Object===Object&&self,qr=q||Hr||Function("return this")(),xe=qr;var $r=xe.Symbol,Oe=$r;var wt=Object.prototype,{hasOwnProperty:kr,toString:Yr}=wt,G=Oe?Oe.toStringTag:void 0;function Xr(t){var e=kr.call(t,G),r=t[G];try{t[G]=void 0;var o=!0}catch(i){}var a=Yr.call(t);if(o)if(e)t[G]=r;else delete t[G];return a}var Pt=Xr;var Zr=Object.prototype,Jr=Zr.toString;function Qr(t){return Jr.call(t)}var Et=Qr;var Vr="[object Null]",to="[object Undefined]",It=Oe?Oe.toStringTag:void 0;function eo(t){if(t==null)return t===void 0?to:Vr;return It&&It in Object(t)?Pt(t):Et(t)}var Qe=eo;function ro(t){return t!=null&&typeof t=="object"}var Ee=ro;var oo="[object Symbol]";function ao(t){return typeof t=="symbol"||Ee(t)&&Qe(t)==oo}var ut=ao;function fo(t,e){var r=-1,o=t==null?0:t.length,a=Array(o);while(++r<o)a[r]=e(t[r],r,t);return a}var Gt=fo;var io=Array.isArray,H=io;var no=1/0,Lt=Oe?Oe.prototype:void 0,jt=Lt?Lt.toString:void 0;function Mt(t){if(typeof t=="string")return t;if(H(t))return Gt(t,Mt)+"";if(ut(t))return jt?jt.call(t):"";var e=t+"";return e=="0"&&1/t==-no?"-0":e}var Nt=Mt;function so(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var fe=so;function po(t){return t}var at=po;var uo="[object AsyncFunction]",mo="[object Function]",lo="[object GeneratorFunction]",xo="[object Proxy]";function ho(t){if(!fe(t))return!1;var e=Qe(t);return e==mo||e==lo||e==uo||e==xo}var Ht=ho;var co=xe["__core-js_shared__"],k=co;var Dt=function(){var t=/[^.]+$/.exec(k&&k.keys&&k.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function go(t){return!!Dt&&Dt in t}var Bt=go;var yo=Function.prototype,_o=yo.toString;function bo(t){if(t!=null){try{return _o.call(t)}catch(e){}try{return t+""}catch(e){}}return""}var _=bo;var vo=/[\\^$.*+?()[\]{}|]/g,Oo=/^\[object .+?Constructor\]$/,Ao=Function.prototype,To=Object.prototype,wo=Ao.toString,So=To.hasOwnProperty,Po=RegExp("^"+wo.call(So).replace(vo,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Co(t){if(!fe(t)||Bt(t))return!1;var e=Ht(t)?Po:Oo;return e.test(_(t))}var Ut=Co;function Eo(t,e){return t==null?void 0:t[e]}var zt=Eo;function Io(t,e){var r=zt(t,e);return Ut(r)?r:void 0}var h=Io;var Lo=h(xe,"WeakMap"),Y=Lo;function jo(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}var Wt=jo;function Mo(){}var qt=Mo;var No=800,Do=16,Ro=Date.now;function Fo(t){var e=0,r=0;return function(){var o=Ro(),a=Do-(o-r);if(r=o,a>0){if(++e>=No)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var $t=Fo;function Bo(t){return function(){return t}}var it=Bo;var Go=function(){try{var t=h(Object,"defineProperty");return t({},"",{}),t}catch(e){}}(),ur=Go;var Uo=!ur?at:function(t,e){return ur(t,"toString",{configurable:!0,enumerable:!1,value:it(e),writable:!0})},kt=Uo;var zo=$t(kt),da=zo;function Wo(t,e){var r=-1,o=t==null?0:t.length;while(++r<o)if(e(t[r],r,t)===!1)break;return t}var pa=Wo;function Ko(t,e,r,o){var a=t.length,i=r+(o?1:-1);while(o?i--:++i<a)if(e(t[i],i,t))return i;return-1}var ma=Ko;function Ho(t){return t!==t}var Jt=Ho;function qo(t,e,r){var o=r-1,a=t.length;while(++o<a)if(t[o]===e)return o;return-1}var Qt=qo;function $o(t,e,r){return e===e?Qt(t,e,r):ma(t,Jt,r)}var Vt=$o;function ko(t,e){var r=t==null?0:t.length;return!!r&&Vt(t,e,0)>-1}var te=ko;var Yo=9007199254740991,Xo=/^(?:0|[1-9]\d*)$/;function Zo(t,e){var r=typeof t;return e=e==null?Yo:e,!!e&&(r=="number"||r!="symbol"&&Xo.test(t))&&(t>-1&&t%1==0&&t<e)}var bn=Zo;function Jo(t,e){return t===e||t!==t&&e!==e}var Ct=Jo;var ee=Math.max;function Qo(t,e,r){return e=ee(e===void 0?t.length-1:e,0),function(){var o=arguments,a=-1,i=ee(o.length-e,0),n=Array(i);while(++a<i)n[a]=o[e+a];a=-1;var s=Array(e+1);while(++a<e)s[a]=o[a];return s[e]=r(n),Wt(t,this,s)}}var fa=Qo;function Vo(t,e){return da(fa(t,e,at),t+"")}var xn=Vo;var ta=9007199254740991;function ea(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=ta}var j=ea;function ra(t){return t!=null&&j(t.length)&&!Ht(t)}var $e=ra;var oa=Object.prototype;function aa(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||oa;return t===r}var _n=aa;function ia(t,e){var r=-1,o=Array(t);while(++r<t)o[r]=e(r);return o}var re=ia;var na="[object Arguments]";function sa(t){return Ee(t)&&Qe(t)==na}var gt=sa;var oe=Object.prototype,{hasOwnProperty:ua,propertyIsEnumerable:la}=oe,ca=gt(function(){return arguments}())?gt:function(t){return Ee(t)&&ua.call(t,"callee")&&!la.call(t,"callee")},Ft=ca;function Oa(){return!1}var ae=Oa;var se=typeof Z=="object"&&Z&&!Z.nodeType&&Z,ie=se&&typeof X=="object"&&X&&!X.nodeType&&X,Aa=ie&&ie.exports===se,ne=Aa?xe.Buffer:void 0,Ta=ne?ne.isBuffer:void 0,Sa=Ta||ae,St=Sa;var Pa="[object Arguments]",Ca="[object Array]",Ea="[object Boolean]",Ia="[object Date]",La="[object Error]",ja="[object Function]",Ma="[object Map]",Na="[object Number]",Da="[object Object]",Ra="[object RegExp]",Fa="[object Set]",Ba="[object String]",Ga="[object WeakMap]",Ua="[object ArrayBuffer]",za="[object DataView]",Wa="[object Float32Array]",Ka="[object Float64Array]",Ha="[object Int8Array]",qa="[object Int16Array]",$a="[object Int32Array]",Ya="[object Uint8Array]",Xa="[object Uint8ClampedArray]",Za="[object Uint16Array]",Ja="[object Uint32Array]",m={};m[Wa]=m[Ka]=m[Ha]=m[qa]=m[$a]=m[Ya]=m[Xa]=m[Za]=m[Ja]=!0;m[Pa]=m[Ca]=m[Ua]=m[Ea]=m[za]=m[Ia]=m[La]=m[ja]=m[Ma]=m[Na]=m[Da]=m[Ra]=m[Fa]=m[Ba]=m[Ga]=!1;function Qa(t){return Ee(t)&&j(t.length)&&!!m[Qe(t)]}var pe=Qa;function Va(t){return function(e){return t(e)}}var wn=Va;var ue=typeof V=="object"&&V&&!V.nodeType&&V,U=ue&&typeof Q=="object"&&Q&&!Q.nodeType&&Q,tf=U&&U.exports===ue,yt=tf&&q.process,ef=function(){try{var t=U&&U.require&&U.require("util").types;if(t)return t;return yt&&yt.binding&&yt.binding("util")}catch(e){}}(),Yt=ef;var me=Yt&&Yt.isTypedArray,rf=me?wn(me):pe,kn=rf;var of=Object.prototype,af=of.hasOwnProperty;function ff(t,e){var r=H(t),o=!r&&Ft(t),a=!r&&!o&&St(t),i=!r&&!o&&!a&&kn(t),n=r||o||a||i,s=n?re(t.length,String):[],p=s.length;for(var u in t)if((e||af.call(t,u))&&!(n&&(u=="length"||a&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||bn(u,p))))s.push(u);return s}var ha=ff;function nf(t,e){return function(r){return t(e(r))}}var ga=nf;var sf=ga(Object.keys,Object),le=sf;var pf=Object.prototype,uf=pf.hasOwnProperty;function mf(t){if(!_n(t))return le(t);var e=[];for(var r in Object(t))if(uf.call(t,r)&&r!="constructor")e.push(r);return e}var dr=mf;function lf(t){return $e(t)?ha(t):dr(t)}var _e=lf;var df=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,xf=/^\w*$/;function hf(t,e){if(H(t))return!1;var r=typeof t;if(r=="number"||r=="symbol"||r=="boolean"||t==null||ut(t))return!0;return xf.test(t)||!df.test(t)||e!=null&&t in Object(e)}var M=hf;var cf=h(Object,"create"),b=cf;function gf(){this.__data__=b?b(null):{},this.size=0}var de=gf;function yf(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var he=yf;var _f="__lodash_hash_undefined__",bf=Object.prototype,vf=bf.hasOwnProperty;function Of(t){var e=this.__data__;if(b){var r=e[t];return r===_f?void 0:r}return vf.call(e,t)?e[t]:void 0}var ce=Of;var Af=Object.prototype,Tf=Af.hasOwnProperty;function wf(t){var e=this.__data__;return b?e[t]!==void 0:Tf.call(e,t)}var ge=wf;var Sf="__lodash_hash_undefined__";function Pf(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=b&&e===void 0?Sf:e,this}var ye=Pf;function N(t){var e=-1,r=t==null?0:t.length;this.clear();while(++e<r){var o=t[e];this.set(o[0],o[1])}}N.prototype.clear=de;N.prototype.delete=he;N.prototype.get=ce;N.prototype.has=ge;N.prototype.set=ye;var _t=N;function Cf(){this.__data__=[],this.size=0}var be=Cf;function Ef(t,e){var r=t.length;while(r--)if(Ct(t[r][0],e))return r;return-1}var O=Ef;var If=Array.prototype,Lf=If.splice;function jf(t){var e=this.__data__,r=O(e,t);if(r<0)return!1;var o=e.length-1;if(r==o)e.pop();else Lf.call(e,r,1);return--this.size,!0}var ve=jf;function Mf(t){var e=this.__data__,r=O(e,t);return r<0?void 0:e[r][1]}var Ae=Mf;function Nf(t){return O(this.__data__,t)>-1}var Te=Nf;function Df(t,e){var r=this.__data__,o=O(r,t);if(o<0)++this.size,r.push([t,e]);else r[o][1]=e;return this}var Se=Df;function D(t){var e=-1,r=t==null?0:t.length;this.clear();while(++e<r){var o=t[e];this.set(o[0],o[1])}}D.prototype.clear=be;D.prototype.delete=ve;D.prototype.get=Ae;D.prototype.has=Te;D.prototype.set=Se;var A=D;var Rf=h(xe,"Map"),T=Rf;function Ff(){this.size=0,this.__data__={hash:new _t,map:new(T||A),string:new _t}}var Pe=Ff;function Bf(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var Ce=Bf;function Gf(t,e){var r=t.__data__;return Ce(e)?r[typeof e=="string"?"string":"hash"]:r.map}var w=Gf;function Uf(t){var e=w(this,t).delete(t);return this.size-=e?1:0,e}var Ie=Uf;function zf(t){return w(this,t).get(t)}var Le=zf;function Wf(t){return w(this,t).has(t)}var je=Wf;function Kf(t,e){var r=w(this,t),o=r.size;return r.set(t,e),this.size+=r.size==o?0:1,this}var Me=Kf;function R(t){var e=-1,r=t==null?0:t.length;this.clear();while(++e<r){var o=t[e];this.set(o[0],o[1])}}R.prototype.clear=Pe;R.prototype.delete=Ie;R.prototype.get=Le;R.prototype.has=je;R.prototype.set=Me;var E=R;var Hf="Expected a function";function bt(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw TypeError(Hf);var r=function(){var o=arguments,a=e?e.apply(this,o):o[0],i=r.cache;if(i.has(a))return i.get(a);var n=t.apply(this,o);return r.cache=i.set(a,n)||i,n};return r.cache=new(bt.Cache||E),r}bt.Cache=E;var Ne=bt;var qf=500;function $f(t){var e=Ne(t,function(o){if(r.size===qf)r.clear();return o}),r=e.cache;return e}var De=$f;var kf=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Yf=/\\(\\)?/g,Xf=De(function(t){var e=[];if(t.charCodeAt(0)===46)e.push("");return t.replace(kf,function(r,o,a,i){e.push(a?i.replace(Yf,"$1"):o||r)}),e}),Re=Xf;function Zf(t){return t==null?"":Nt(t)}var ya=Zf;function Jf(t,e){if(H(t))return t;return M(t,e)?[t]:Re(ya(t))}var Cn=Jf;var Qf=1/0;function Vf(t){if(typeof t=="string"||ut(t))return t;var e=t+"";return e=="0"&&1/t==-Qf?"-0":e}var Zt=Vf;function ti(t,e){e=Cn(e,t);var r=0,o=e.length;while(t!=null&&r<o)t=t[Zt(e[r++])];return r&&r==o?t:void 0}var Sn=ti;function ei(t,e,r){var o=t==null?void 0:Sn(t,e);return o===void 0?r:o}var Fe=ei;function ri(t,e){var r=-1,o=e.length,a=t.length;while(++r<o)t[a+r]=e[r];return t}var pr=ri;var Be=Oe?Oe.isConcatSpreadable:void 0;function oi(t){return H(t)||Ft(t)||!!(Be&&t&&t[Be])}var Ue=oi;function ze(t,e,r,o,a){var i=-1,n=t.length;r||(r=Ue),a||(a=[]);while(++i<n){var s=t[i];if(e>0&&r(s))if(e>1)ze(s,e-1,r,o,a);else pr(a,s);else if(!o)a[a.length]=s}return a}var mr=ze;function ai(t,e,r,o){var a=-1,i=t==null?0:t.length;if(o&&i)r=t[++a];while(++a<i)r=e(r,t[a],a,t);return r}var We=ai;function fi(){this.__data__=new A,this.size=0}var Ke=fi;function ii(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}var He=ii;function ni(t){return this.__data__.get(t)}var qe=ni;function si(t){return this.__data__.has(t)}var ke=si;var pi=200;function ui(t,e){var r=this.__data__;if(r instanceof A){var o=r.__data__;if(!T||o.length<pi-1)return o.push([t,e]),this.size=++r.size,this;r=this.__data__=new E(o)}return r.set(t,e),this.size=r.size,this}var Ye=ui;function F(t){var e=this.__data__=new A(t);this.size=e.size}F.prototype.clear=Ke;F.prototype.delete=He;F.prototype.get=qe;F.prototype.has=ke;F.prototype.set=Ye;var Xt=F;function mi(t,e){var r=-1,o=t==null?0:t.length,a=0,i=[];while(++r<o){var n=t[r];if(e(n,r,t))i[a++]=n}return i}var tt=mi;function li(){return[]}var va=li;var di=Object.prototype,xi=di.propertyIsEnumerable,Xe=Object.getOwnPropertySymbols,hi=!Xe?va:function(t){if(t==null)return[];return t=Object(t),tt(Xe(t),function(e){return xi.call(t,e)})},fr=hi;function ci(t,e,r){var o=e(t);return H(t)?o:pr(o,r(t))}var ba=ci;function gi(t){return ba(t,_e,fr)}var Ur=gi;var yi=h(xe,"DataView"),et=yi;var _i=h(xe,"Promise"),rt=_i;var bi=h(xe,"Set"),S=bi;var Ze="[object Map]",vi="[object Object]",Ve="[object Promise]",tr="[object Set]",er="[object WeakMap]",rr="[object DataView]",Oi=_(et),Ai=_(T),Ti=_(rt),wi=_(S),Si=_(Y),I=Qe;if(et&&I(new et(new ArrayBuffer(1)))!=rr||T&&I(new T)!=Ze||rt&&I(rt.resolve())!=Ve||S&&I(new S)!=tr||Y&&I(new Y)!=er)I=function(t){var e=Qe(t),r=e==vi?t.constructor:void 0,o=r?_(r):"";if(o)switch(o){case Oi:return rr;case Ai:return Ze;case Ti:return Ve;case wi:return tr;case Si:return er}return e};var dt=I;var Pi=xe.Uint8Array,hr=Pi;var Ci="__lodash_hash_undefined__";function Ei(t){return this.__data__.set(t,Ci),this}var or=Ei;function Ii(t){return this.__data__.has(t)}var ar=Ii;function ot(t){var e=-1,r=t==null?0:t.length;this.__data__=new E;while(++e<r)this.add(t[e])}ot.prototype.add=ot.prototype.push=or;ot.prototype.has=ar;var ft=ot;function Li(t,e){var r=-1,o=t==null?0:t.length;while(++r<o)if(e(t[r],r,t))return!0;return!1}var ir=Li;function ji(t,e){return t.has(e)}var nt=ji;var Mi=1,Ni=2;function Di(t,e,r,o,a,i){var n=r&Mi,s=t.length,p=e.length;if(s!=p&&!(n&&p>s))return!1;var u=i.get(t),x=i.get(e);if(u&&x)return u==e&&x==t;var d=-1,l=!0,y=r&Ni?new ft:void 0;i.set(t,e),i.set(e,t);while(++d<s){var c=t[d],g=e[d];if(o)var v=n?o(g,c,d,e,t,i):o(c,g,d,t,e,i);if(v!==void 0){if(v)continue;l=!1;break}if(y){if(!ir(e,function(P,C){if(!nt(y,C)&&(c===P||a(c,P,r,o,i)))return y.push(C)})){l=!1;break}}else if(!(c===g||a(c,g,r,o,i))){l=!1;break}}return i.delete(t),i.delete(e),l}var st=Di;function Ri(t){var e=-1,r=Array(t.size);return t.forEach(function(o,a){r[++e]=[a,o]}),r}var nr=Ri;function Fi(t){var e=-1,r=Array(t.size);return t.forEach(function(o){r[++e]=o}),r}var B=Fi;var Bi=1,Gi=2,Ui="[object Boolean]",zi="[object Date]",Wi="[object Error]",Ki="[object Map]",Hi="[object Number]",qi="[object RegExp]",$i="[object Set]",ki="[object String]",Yi="[object Symbol]",Xi="[object ArrayBuffer]",Zi="[object DataView]",sr=Oe?Oe.prototype:void 0,vt=sr?sr.valueOf:void 0;function Ji(t,e,r,o,a,i,n){switch(r){case Zi:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case Xi:if(t.byteLength!=e.byteLength||!i(new hr(t),new hr(e)))return!1;return!0;case Ui:case zi:case Hi:return Ct(+t,+e);case Wi:return t.name==e.name&&t.message==e.message;case qi:case ki:return t==e+"";case Ki:var s=nr;case $i:var p=o&Bi;if(s||(s=B),t.size!=e.size&&!p)return!1;var u=n.get(t);if(u)return u==e;o|=Gi,n.set(t,e);var x=st(s(t),s(e),o,a,i,n);return n.delete(t),x;case Yi:if(vt)return vt.call(t)==vt.call(e)}return!1}var lr=Ji;var Qi=1,Vi=Object.prototype,tn=Vi.hasOwnProperty;function en(t,e,r,o,a,i){var n=r&Qi,s=Ur(t),p=s.length,u=Ur(e),x=u.length;if(p!=x&&!n)return!1;var d=p;while(d--){var l=s[d];if(!(n?l in e:tn.call(e,l)))return!1}var y=i.get(t),c=i.get(e);if(y&&c)return y==e&&c==t;var g=!0;i.set(t,e),i.set(e,t);var v=n;while(++d<p){l=s[d];var P=t[l],C=e[l];if(o)var Tt=n?o(C,P,l,e,t,i):o(P,C,l,t,e,i);if(!(Tt===void 0?P===C||a(P,C,r,o,i):Tt)){g=!1;break}v||(v=l=="constructor")}if(g&&!v){var W=t.constructor,K=e.constructor;if(W!=K&&(("constructor"in t)&&("constructor"in e))&&!(typeof W=="function"&&W instanceof W&&typeof K=="function"&&K instanceof K))g=!1}return i.delete(t),i.delete(e),g}var xr=en;var rn=1,cr="[object Arguments]",_r="[object Array]",mt="[object Object]",on=Object.prototype,br=on.hasOwnProperty;function an(t,e,r,o,a,i){var n=H(t),s=H(e),p=n?_r:dt(t),u=s?_r:dt(e);p=p==cr?mt:p,u=u==cr?mt:u;var x=p==mt,d=u==mt,l=p==u;if(l&&St(t)){if(!St(e))return!1;n=!0,x=!1}if(l&&!x)return i||(i=new Xt),n||kn(t)?st(t,e,r,o,a,i):lr(t,e,p,r,o,a,i);if(!(r&rn)){var y=x&&br.call(t,"__wrapped__"),c=d&&br.call(e,"__wrapped__");if(y||c){var g=y?t.value():t,v=c?e.value():e;return i||(i=new Xt),a(g,v,r,o,i)}}if(!l)return!1;return i||(i=new Xt),xr(t,e,r,o,a,i)}var Or=an;function Ar(t,e,r,o,a){if(t===e)return!0;if(t==null||e==null||!Ee(t)&&!Ee(e))return t!==t&&e!==e;return Or(t,e,r,o,Ar,a)}var lt=Ar;var fn=1,nn=2;function sn(t,e,r,o){var a=r.length,i=a,n=!o;if(t==null)return!i;t=Object(t);while(a--){var s=r[a];if(n&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}while(++a<i){s=r[a];var p=s[0],u=t[p],x=s[1];if(n&&s[2]){if(u===void 0&&!(p in t))return!1}else{var d=new Xt;if(o)var l=o(u,x,p,t,e,d);if(!(l===void 0?lt(x,u,fn|nn,o,d):l))return!1}}return!0}var Tr=sn;function pn(t){return t===t&&!fe(t)}var xt=pn;function un(t){var e=_e(t),r=e.length;while(r--){var o=e[r],a=t[o];e[r]=[o,a,xt(a)]}return e}var wr=un;function mn(t,e){return function(r){if(r==null)return!1;return r[t]===e&&(e!==void 0||(t in Object(r)))}}var ht=mn;function ln(t){var e=wr(t);if(e.length==1&&e[0][2])return ht(e[0][0],e[0][1]);return function(r){return r===t||Tr(r,t,e)}}var Sr=ln;function dn(t,e){return t!=null&&e in Object(t)}var Pr=dn;function hn(t,e,r){e=Cn(e,t);var o=-1,a=e.length,i=!1;while(++o<a){var n=Zt(e[o]);if(!(i=t!=null&&r(t,n)))break;t=t[n]}if(i||++o!=a)return i;return a=t==null?0:t.length,!!a&&j(a)&&bn(n,a)&&(H(t)||Ft(t))}var xa=hn;function cn(t,e){return t!=null&&xa(t,e,Pr)}var _a=cn;var gn=1,yn=2;function vn(t,e){if(M(t)&&xt(e))return ht(Zt(t),e);return function(r){var o=Fe(r,t);return o===void 0&&o===e?_a(r,t):lt(e,o,gn|yn)}}var Cr=vn;function On(t){return function(e){return e==null?void 0:e[t]}}var wa=On;function An(t){return function(e){return Sn(e,t)}}var Er=An;function Pn(t){return M(t)?wa(Zt(t)):Er(t)}var Ir=Pn;function En(t){if(typeof t=="function")return t;if(t==null)return at;if(typeof t=="object")return H(t)?Cr(t[0],t[1]):Sr(t);return Ir(t)}var Ge=En;function In(t){return function(e,r,o){var a=-1,i=Object(e),n=o(e),s=n.length;while(s--){var p=n[t?s:++a];if(r(i[p],p,i)===!1)break}return e}}var Lr=In;var Ln=Lr(),gr=Ln;function jn(t,e){return t&&gr(t,e,_e)}var yr=jn;function Mn(t,e){return function(r,o){if(r==null)return r;if(!$e(r))return t(r,o);var a=r.length,i=e?a:-1,n=Object(r);while(e?i--:++i<a)if(o(n[i],i,n)===!1)break;return r}}var jr=Mn;var Nn=jr(yr),Tn=Nn;function Dn(t){return Ee(t)&&$e(t)}var ka=Dn;function Rn(t,e,r){var o=-1,a=t==null?0:t.length;while(++o<a)if(r(e,t[o]))return!0;return!1}var Mr=Rn;function Fn(t){return typeof t=="function"?t:at}var vr=Fn;function Bn(t,e){var r=H(t)?pa:Tn;return r(t,vr(e))}var f=Bn;function Gn(t,e){var r=[];return Tn(t,function(o,a,i){if(e(o,a,i))r.push(o)}),r}var Nr=Gn;function Un(t,e){var r=H(t)?tt:Nr;return r(t,Ge(e,3))}var Je=Un;function zn(t,e){return Gt(e,function(r){return t[r]})}var Dr=zn;function Wn(t){return t==null?[]:Dr(t,_e(t))}var pt=Wn;var Kn="[object Map]",Hn="[object Set]",qn=Object.prototype,$n=qn.hasOwnProperty;function Yn(t){if(t==null)return!0;if($e(t)&&(H(t)||typeof t=="string"||typeof t.splice=="function"||St(t)||kn(t)||Ft(t)))return!t.length;var e=dt(t);if(e==Kn||e==Hn)return!t.size;if(_n(t))return!dr(t).length;for(var r in t)if($n.call(t,r))return!1;return!0}var ct=Yn;function Xn(t){return t===void 0}var we=Xn;function Zn(t,e,r,o,a){return a(t,function(i,n,s){r=o?(o=!1,i):e(r,i,n,s)}),r}var Rr=Zn;function Jn(t,e,r){var o=H(t)?We:Rr,a=arguments.length<3;return o(t,Ge(e,4),r,a,Tn)}var Kt=Jn;var Qn=1/0,Vn=!(S&&1/B(new S([,-0]))[1]==Qn)?qt:function(t){return new S(t)},Fr=Vn;var ts=200;function es(t,e,r){var o=-1,a=te,i=t.length,n=!0,s=[],p=s;if(r)n=!1,a=Mr;else if(i>=ts){var u=e?null:Fr(t);if(u)return B(u);n=!1,a=nt,p=new ft}else p=e?[]:s;t:while(++o<i){var x=t[o],d=e?e(x):x;if(x=r||x!==0?x:0,n&&d===d){var l=p.length;while(l--)if(p[l]===d)continue t;if(e)p.push(d);s.push(x)}else if(!a(p,d,r)){if(p!==s)p.push(d);s.push(x)}}return s}var Br=es;var rs=xn(function(t){return Br(mr(t,1,ka,!0))}),Ot=rs;var as="\x00",L="\x00",Gr="\x01";class J{constructor(t={}){if(this._isDirected=Object.prototype.hasOwnProperty.call(t,"directed")?t.directed:!0,this._isMultigraph=Object.prototype.hasOwnProperty.call(t,"multigraph")?t.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(t,"compound")?t.compound:!1,this._label=void 0,this._defaultNodeLabelFn=it(void 0),this._defaultEdgeLabelFn=it(void 0),this._nodes={},this._isCompound)this._parent={},this._children={},this._children[L]={};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(t){return this._label=t,this}graph(){return this._label}setDefaultNodeLabel(t){if(!Ht(t))t=it(t);return this._defaultNodeLabelFn=t,this}nodeCount(){return this._nodeCount}nodes(){return _e(this._nodes)}sources(){var t=this;return Je(this.nodes(),function(e){return ct(t._in[e])})}sinks(){var t=this;return Je(this.nodes(),function(e){return ct(t._out[e])})}setNodes(t,e){var r=arguments,o=this;return f(t,function(a){if(r.length>1)o.setNode(a,e);else o.setNode(a)}),this}setNode(t,e){if(Object.prototype.hasOwnProperty.call(this._nodes,t)){if(arguments.length>1)this._nodes[t]=e;return this}if(this._nodes[t]=arguments.length>1?e:this._defaultNodeLabelFn(t),this._isCompound)this._parent[t]=L,this._children[t]={},this._children[L][t]=!0;return this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this}node(t){return this._nodes[t]}hasNode(t){return Object.prototype.hasOwnProperty.call(this._nodes,t)}removeNode(t){if(Object.prototype.hasOwnProperty.call(this._nodes,t)){var e=(r)=>this.removeEdge(this._edgeObjs[r]);if(delete this._nodes[t],this._isCompound)this._removeFromParentsChildList(t),delete this._parent[t],f(this.children(t),(r)=>{this.setParent(r)}),delete this._children[t];f(_e(this._in[t]),e),delete this._in[t],delete this._preds[t],f(_e(this._out[t]),e),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this}setParent(t,e){if(!this._isCompound)throw Error("Cannot set parent in a non-compound graph");if(we(e))e=L;else{e+="";for(var r=e;!we(r);r=this.parent(r))if(r===t)throw Error("Setting "+e+" as parent of "+t+" would create a cycle");this.setNode(e)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=e,this._children[e][t]=!0,this}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}parent(t){if(this._isCompound){var e=this._parent[t];if(e!==L)return e}}children(t){if(we(t))t=L;if(this._isCompound){var e=this._children[t];if(e)return _e(e)}else if(t===L)return this.nodes();else if(this.hasNode(t))return[]}predecessors(t){var e=this._preds[t];if(e)return _e(e)}successors(t){var e=this._sucs[t];if(e)return _e(e)}neighbors(t){var e=this.predecessors(t);if(e)return Ot(e,this.successors(t))}isLeaf(t){var e;if(this.isDirected())e=this.successors(t);else e=this.neighbors(t);return e.length===0}filterNodes(t){var e=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});e.setGraph(this.graph());var r=this;f(this._nodes,function(i,n){if(t(n))e.setNode(n,i)}),f(this._edgeObjs,function(i){if(e.hasNode(i.v)&&e.hasNode(i.w))e.setEdge(i,r.edge(i))});var o={};function a(i){var n=r.parent(i);if(n===void 0||e.hasNode(n))return o[i]=n,n;else if(n in o)return o[n];else return a(n)}if(this._isCompound)f(e.nodes(),function(i){e.setParent(i,a(i))});return e}setDefaultEdgeLabel(t){if(!Ht(t))t=it(t);return this._defaultEdgeLabelFn=t,this}edgeCount(){return this._edgeCount}edges(){return pt(this._edgeObjs)}setPath(t,e){var r=this,o=arguments;return Kt(t,function(a,i){if(o.length>1)r.setEdge(a,i,e);else r.setEdge(a,i);return i}),this}setEdge(){var t,e,r,o,a=!1,i=arguments[0];if(typeof i==="object"&&i!==null&&"v"in i){if(t=i.v,e=i.w,r=i.name,arguments.length===2)o=arguments[1],a=!0}else if(t=i,e=arguments[1],r=arguments[3],arguments.length>2)o=arguments[2],a=!0;if(t=""+t,e=""+e,!we(r))r=""+r;var n=z(this._isDirected,t,e,r);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,n)){if(a)this._edgeLabels[n]=o;return this}if(!we(r)&&!this._isMultigraph)throw Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(e),this._edgeLabels[n]=a?o:this._defaultEdgeLabelFn(t,e,r);var s=fs(this._isDirected,t,e,r);return t=s.v,e=s.w,Object.freeze(s),this._edgeObjs[n]=s,zr(this._preds[e],t),zr(this._sucs[t],e),this._in[e][n]=s,this._out[t][n]=s,this._edgeCount++,this}edge(t,e,r){var o=arguments.length===1?At(this._isDirected,arguments[0]):z(this._isDirected,t,e,r);return this._edgeLabels[o]}hasEdge(t,e,r){var o=arguments.length===1?At(this._isDirected,arguments[0]):z(this._isDirected,t,e,r);return Object.prototype.hasOwnProperty.call(this._edgeLabels,o)}removeEdge(t,e,r){var o=arguments.length===1?At(this._isDirected,arguments[0]):z(this._isDirected,t,e,r),a=this._edgeObjs[o];if(a)t=a.v,e=a.w,delete this._edgeLabels[o],delete this._edgeObjs[o],Wr(this._preds[e],t),Wr(this._sucs[t],e),delete this._in[e][o],delete this._out[t][o],this._edgeCount--;return this}inEdges(t,e){var r=this._in[t];if(r){var o=pt(r);if(!e)return o;return Je(o,function(a){return a.v===e})}}outEdges(t,e){var r=this._out[t];if(r){var o=pt(r);if(!e)return o;return Je(o,function(a){return a.w===e})}}nodeEdges(t,e){var r=this.inEdges(t,e);if(r)return r.concat(this.outEdges(t,e))}}J.prototype._nodeCount=0;J.prototype._edgeCount=0;function zr(t,e){if(t[e])t[e]++;else t[e]=1}function Wr(t,e){if(!--t[e])delete t[e]}function z(t,e,r,o){var a=""+e,i=""+r;if(!t&&a>i){var n=a;a=i,i=n}return a+Gr+i+Gr+(we(o)?as:o)}function fs(t,e,r,o){var a=""+e,i=""+r;if(!t&&a>i){var n=a;a=i,i=n}var s={v:a,w:i};if(o)s.name=o;return s}function At(t,e){return z(t,e.v,e.w,e.name)}
2
- export{xe,Oe,Qe,Ee,ut,Gt,H,fe,at,Ht,it,ur,da,pa,ma,bn,Ct,fa,xn,$e,_n,Ft,St,wn,Yt,kn,ha,ga,dr,_e,ya,Cn,Zt,Sn,pr,mr,Xt,va,fr,ba,Ur,dt,hr,xa,_a,wa,Ge,gr,yr,Tn,ka,vr,f,Je,pt,we,Kt,J};
@@ -1 +0,0 @@
1
- import{Ci}from"./chunk-zc1mk10n.js";export{Ci as createPieServices};
@@ -1 +0,0 @@
1
- import{Ei}from"./chunk-zc1mk10n.js";export{Ei as createEventModelingServices};
@@ -1 +0,0 @@
1
- import{h,o,i,r,y,t,n,_,yt,ae,de}from"./chunk-qmbgb79a.js";var H={global:"全局",project:"项目",custom:"自定义",builtin:"内置"};function O({skill:s,issue:x,connection:v}){let{Button:P,CopyButton:f,style:w,useTheme:S}=_();S();let[m,L]=r(),[j,g]=r(),[I,D]=r(0);return o(()=>{let c=!0;g(void 0),L(void 0);let p=new URLSearchParams;if(s.projectID)p.set("projectID",s.projectID);if(s.location)p.set("location",s.location);let b=p.toString()?`?${p.toString()}`:"";return Promise.all([v.request(`/api/skills/${encodeURIComponent(s.name)}/content${b}`),v.request(`/api/skills/${encodeURIComponent(s.name)}/files${b}`)]).then(([u,N])=>{if(c)L({text:u.text,files:N.files})}).catch((u)=>{if(c)g(u instanceof Error?u.message:"读取失败")}),()=>{c=!1}},[v,s.name,s.projectID,s.location,I]),n("div",{className:"min-w-0 space-y-5 text-sm text-ink",children:[t("p",{className:"whitespace-pre-wrap break-words [overflow-wrap:anywhere] text-dim",children:s.description||"暂无描述"}),n("div",{children:[n("p",{className:"break-all text-xs text-dim",children:[H[s.scope],s.projectName?` · ${s.projectName}`:""]}),n("div",{className:"mt-1 flex min-w-0 items-center gap-2",children:[t("code",{className:w("markdown.inlineCode","min-w-0 flex-1 break-all text-xs"),children:s.location}),t(f,{text:s.location,label:"复制完整路径",className:"size-10"})]})]}),n("ul",{className:"space-y-1 break-words text-xs text-dim",children:[t("li",{children:"启用状态按名称生效,影响所有同名技能的新会话可用性。"}),s.disableModelInvocation&&t("li",{children:"仅手动:可由用户调用,不向模型自动提供。"}),s.platforms&&n("li",{children:["平台限制:",s.platforms.join("、")]}),s.disabled&&t("li",{children:"已禁用:不会提供给新会话。"}),x?.overriddenBy&&n("li",{className:"break-all",children:["被覆盖:同名技能优先使用 ",x.overriddenBy]})]}),s.commands?.length?n("div",{children:[t("h3",{className:"font-medium",children:"bin 命令"}),t("p",{className:"mt-1 text-xs text-dim",children:"技能目录中的可执行命令。"}),t("ul",{className:"mt-2 space-y-1 font-mono text-xs",children:s.commands.map((c)=>t("li",{className:"break-all",children:c},c))})]}):null,j?n("div",{role:"alert",className:"space-y-2",children:[n("p",{className:"break-words text-danger",children:["读取失败:",j]}),t(P,{className:"h-10",onClick:()=>D(I+1),children:"重试"})]}):!m?t("p",{role:"status",className:"text-dim",children:"正在读取文件…"}):n(y,{children:[n("section",{children:[n("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[t("h3",{className:"font-medium",children:"SKILL.md 原文"}),t(f,{text:m.text,label:"复制 SKILL.md 原文",className:"size-10"})]}),n("p",{className:"mb-2 text-xs text-faint",children:[m.text.length.toLocaleString()," 字符 · 约 ",Math.ceil(m.text.length/4).toLocaleString()," ","tokens(估算)"]}),t("pre",{className:w("surface.subtle",w("chat.toolOutput"),"rounded-lg bg-raised p-3 text-xs leading-5 break-all"),children:m.text})]}),n("section",{children:[n("h3",{className:"font-medium",children:["目录文件 · ",m.files.length,m.files.length===200?"(最多显示 200 个)":""]}),t("ul",{className:"mt-2 space-y-1 font-mono text-xs text-dim",children:m.files.map((c)=>t("li",{className:"break-all",children:c},c))})]})]})]})}var J="size-4 cursor-pointer rounded border-line text-accent accent-accent focus-visible:outline-2 focus-visible:outline-accent";function se({connection:s}){let{Button:x,Input:v,Dialog:P,style:f,useTheme:w}=_();w();let[S,m]=r([]),[L,j]=r([]),[g,I]=r(),[D,c]=r(""),[p,b]=r(),[u,N]=r(!0),[q,B]=r(),[z,A]=r(),d=i(0),k=i(!1),C=h(async(e=!1)=>{let l=++d.current;k.current=!0,N(!0);try{if(e)await s.request("/api/skills/rescan",{method:"POST"});let[a,T]=await Promise.all([s.request("/api/skills?all=true"),s.request("/api/skills/settings")]);if(l!==d.current)return;m(a.skills),j(a.issues),I(T),A(new Date),B(void 0)}catch(a){if(l===d.current)B(a instanceof Error?a.message:"读取失败")}finally{if(l===d.current)k.current=!1,N(!1)}},[s]);o(()=>(C(),()=>{d.current++}),[C]);async function K(e){if(k.current)return;k.current=!0;let l=++d.current;N(!0);try{let a=await s.request("/api/skills/settings",{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify(e)});if(l!==d.current)return;I(a),await C()}catch(a){if(l!==d.current)return;B(a instanceof Error?a.message:"保存设置失败"),k.current=!1,N(!1)}}let W=D.trim().toLocaleLowerCase(),E=S.filter((e)=>`${e.name} ${e.description??""}`.toLocaleLowerCase().includes(W)),R=(e)=>L.find((l)=>l.kind==="overridden"&&(l.path==="<built-in>"?e.scope==="builtin":l.path.replace(/\\/g,"/")===`${e.location.replace(/\\/g,"/")}/SKILL.md`));return n("div",{className:"min-w-0 space-y-6",children:[n("section",{className:"min-w-0",children:[n("div",{className:"mb-2.5 flex flex-wrap items-end justify-between gap-3 px-0.5",children:[n("div",{className:"min-w-0 flex-1 basis-48",children:[t("h2",{className:f("settings.groupTitle"),children:"技能"}),t("p",{"aria-live":"polite",className:f("settings.groupDesc"),children:z&&`找到 ${S.length} 个 · ${z.toLocaleTimeString("zh-CN",{hour12:!1})}`})]}),n(x,{variant:"ghost",disabled:u,onClick:()=>C(!0),className:"h-9 px-2.5 text-xs",children:[t(ae,{className:`size-3.5 ${u?"animate-spin":""}`}),t("span",{className:"ml-1",children:"重新扫描"})]})]}),q&&n("div",{role:"alert",className:"mb-3 flex flex-wrap items-center gap-2 rounded-xl border border-line p-3",children:[n("p",{className:"min-w-0 flex-1 break-words text-sm text-danger",children:["无法更新技能:",q]}),t(x,{disabled:u,onClick:()=>C(),children:"重试"})]}),n("div",{className:"relative mb-3 min-w-0",children:[t(de,{"aria-hidden":!0,className:"pointer-events-none absolute top-3 left-3 size-4 text-faint"}),t(v,{type:"search","aria-label":"搜索技能",placeholder:"搜索技能",value:D,onChange:(e)=>c(e.target.value),className:"h-10 min-w-0 pl-9"})]}),t("div",{className:f("settings.groupBox"),children:u&&!S.length?t("div",{role:"status","aria-label":"正在加载",className:"divide-y divide-line",children:[0,1,2].map((e)=>n("div",{className:"h-16 space-y-2 px-4 py-3",children:[t("div",{className:"h-3 w-24 animate-pulse rounded bg-raised"}),t("div",{className:"h-3 w-2/3 animate-pulse rounded bg-raised"})]},e))}):E.length===0?t("p",{className:"p-4 text-sm text-dim",children:"没有找到匹配的技能"}):t("ul",{className:"divide-y divide-line",children:E.map((e)=>{let l=R(e),a=e.disabled;return n("li",{className:`flex min-w-0 items-center justify-between gap-3 px-4 py-2.5 transition-colors hover:bg-raised/40 ${a?"opacity-55":""}`,children:[n("button",{type:"button",className:"group flex min-h-12 min-w-0 flex-1 cursor-pointer items-center gap-3 py-1 text-left focus-visible:outline-2 focus-visible:outline-accent","aria-label":`查看技能 ${e.name}`,onClick:()=>b(e),children:[n("span",{className:"min-w-0 flex-1",children:[n("span",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[t("span",{className:"truncate text-sm font-medium text-ink",title:e.name,children:e.name}),l&&n("span",{className:"flex shrink-0 items-center gap-1 text-xs text-warning",children:[t(yt,{className:"size-3.5"}),"被覆盖"]})]}),e.description&&t("span",{className:"mt-0.5 block truncate text-xs text-dim",title:e.description,children:e.description})]}),t("span",{className:f("control.badge","shrink-0 text-[11px] text-dim"),children:e.scope==="project"?"项目":e.scope==="builtin"?"built-in":"全局"})]}),t("span",{className:"relative flex size-10 shrink-0 items-center justify-center",children:t("input",{type:"checkbox","aria-label":`启用技能 ${e.name}`,className:J,disabled:u,checked:!a,onChange:(T)=>{if(!g)return;let U=g.disabled??[],M=T.target.checked?U.filter((F)=>F!==e.name):[...U,e.name];K({...g,disabled:M})}})})]},`${e.scope}:${e.projectID??""}:${e.name}`)})})})]}),t(P,{open:Boolean(p),onOpenChange:(e)=>{if(!e)b(void 0)},title:p?.name??"",size:"lg",footer:t("div",{className:"flex w-full justify-end",children:t(x,{variant:"primary",onClick:()=>b(void 0),children:"关闭"})}),children:p&&t(O,{skill:p,issue:R(p),connection:s})})]})}export{se as SkillsSection};
@@ -1 +0,0 @@
1
- import{or}from"./chunk-zc1mk10n.js";export{or as createRailroadAbnfServices};
@@ -1 +0,0 @@
1
- import{Ti}from"./chunk-zc1mk10n.js";export{Ti as createArchitectureServices};
@@ -1 +0,0 @@
1
- import{bi}from"./chunk-zc1mk10n.js";export{bi as createWardleyServices};
@@ -1 +0,0 @@
1
- import{wi}from"./chunk-zc1mk10n.js";export{wi as createInfoServices};