@bkm016/basalt 0.1.1 → 0.1.3

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 (196) hide show
  1. package/README.md +16 -22
  2. package/chunk-06hdzq5n.js +2 -0
  3. package/chunk-09rj27b2.js +2 -0
  4. package/{chunk-qnr1f5pj.js → chunk-0y7ne3d0.js} +2 -2
  5. package/{chunk-vgvq3q12.js → chunk-10xzzn07.js} +2 -2
  6. package/{chunk-6qertm2t.js → chunk-1qpces5a.js} +1 -1
  7. package/{chunk-nt2gntad.js → chunk-1zdwrgd4.js} +1 -1
  8. package/{chunk-sh74qzvt.js → chunk-27gntzs5.js} +4 -4
  9. package/{chunk-1v7st27a.js → chunk-2esbgxps.js} +14 -14
  10. package/{chunk-exnn1867.js → chunk-362g64pd.js} +1 -1
  11. package/{chunk-1aspj1hn.js → chunk-3cjsd292.js} +2 -2
  12. package/chunk-5c9j8qe4.js +478 -0
  13. package/{chunk-8dxzqwq3.js → chunk-5j1krv9v.js} +1 -1
  14. package/{chunk-vkkj4awb.js → chunk-6hssbcgj.js} +1 -1
  15. package/{chunk-1b7gbe8g.js → chunk-75m78j7x.js} +2 -2
  16. package/{chunk-kfq8wyd3.js → chunk-8296hw9m.js} +1 -1
  17. package/{chunk-szat3vp4.js → chunk-8d46jtbj.js} +2 -2
  18. package/{chunk-qczbfccb.js → chunk-8tjad3r0.js} +4 -4
  19. package/{chunk-agntrqs9.js → chunk-97rzj7f6.js} +1 -1
  20. package/{chunk-k7w7ac9q.js → chunk-981f9dw8.js} +8 -8
  21. package/{chunk-xysny0ve.js → chunk-aefadsy6.js} +2 -2
  22. package/{chunk-jhd54p1b.js → chunk-bannb9xm.js} +1 -1
  23. package/{chunk-0qqb6v41.js → chunk-bxn5kmpz.js} +120 -120
  24. package/{chunk-a3tqx584.js → chunk-c7x1zq39.js} +1 -1
  25. package/{chunk-rv06x0kn.js → chunk-cjc90f84.js} +1 -1
  26. package/{chunk-x3dnb9sz.js → chunk-d2j735sd.js} +2 -2
  27. package/{chunk-yskm0hsy.js → chunk-d8gtbw9g.js} +1 -1
  28. package/{chunk-rm3kcxq9.js → chunk-fjtvjrkg.js} +13 -13
  29. package/{chunk-h6sw8fbt.js → chunk-fm0k0qtz.js} +1 -1
  30. package/{chunk-1yzt0qm0.js → chunk-fw2bpqmw.js} +1 -1
  31. package/{chunk-45cz26ap.js → chunk-gp7y0fja.js} +13 -13
  32. package/{chunk-2bb01ddq.js → chunk-gzxnene8.js} +1 -1
  33. package/{chunk-a8nyk4k9.js → chunk-hwr56pfj.js} +1 -1
  34. package/{chunk-0hbjv3y6.js → chunk-jwdb0ccj.js} +3 -3
  35. package/{chunk-kf8hq21a.js → chunk-k23t7vhs.js} +5 -5
  36. package/{chunk-bhqyxyap.js → chunk-k506w58v.js} +1 -1
  37. package/{chunk-44ek81ad.js → chunk-k6w6y71k.js} +2 -2
  38. package/chunk-m40gxwq4.js +5 -0
  39. package/chunk-m8vkwdgr.js +5 -0
  40. package/{chunk-f7egr55n.js → chunk-mvfsxdx6.js} +13 -13
  41. package/{chunk-pvncysbb.js → chunk-nbb9trwz.js} +1 -1
  42. package/{chunk-0szjy61m.js → chunk-pbcy6zdt.js} +1 -1
  43. package/chunk-pmqtkqsf.js +2 -0
  44. package/{chunk-hat3s3pr.js → chunk-pxsrqrd0.js} +1 -1
  45. package/{chunk-xsbxykr4.js → chunk-qe0teyn1.js} +1 -1
  46. package/{chunk-2zqny2sy.js → chunk-r7fpkb49.js} +1 -1
  47. package/{chunk-3m7qwfm3.js → chunk-rtzqqngy.js} +3 -3
  48. package/{chunk-6e49xsf5.js → chunk-shadcb9z.js} +2 -2
  49. package/{chunk-cv5wsd9m.js → chunk-t6zs4kw0.js} +2 -2
  50. package/{chunk-hcn9cf6v.js → chunk-v258nxcz.js} +1 -1
  51. package/{chunk-a6r4z44b.js → chunk-vk1gxk1t.js} +1 -1
  52. package/{chunk-s37s3k24.js → chunk-x1xss1d7.js} +2 -2
  53. package/{chunk-dakrpbe6.js → chunk-x4874m8e.js} +2 -2
  54. package/{chunk-wx7kdf0b.js → chunk-xfvvh1s5.js} +1 -1
  55. package/{chunk-0yytz0r1.js → chunk-y0m980k3.js} +5 -5
  56. package/{chunk-dhm42y04.js → chunk-y58ygzn9.js} +3 -3
  57. package/{chunk-2wkaw73s.js → chunk-y648fzx0.js} +5 -5
  58. package/{chunk-32at88hc.js → chunk-y7nma9rk.js} +1 -1
  59. package/{chunk-pmc3y1z8.js → chunk-ykens1hy.js} +1 -1
  60. package/{chunk-q8zx3kt6.js → chunk-z55bmysw.js} +1 -1
  61. package/{chunk-qx0m82rw.js → chunk-zmsgwr3s.js} +1 -1
  62. package/{chunk-501zkf9b.js → chunk-ztsjgssj.js} +1 -1
  63. package/compiled.js +5 -5
  64. package/package.json +1 -1
  65. package/ui-test-worker.js +63 -63
  66. package/web/{chunk-b4wbk7vc.js → chunk-0xc2c540.js} +3 -3
  67. package/web/{chunk-dt462hk9.js → chunk-0z0jycs8.js} +1 -1
  68. package/web/chunk-166qe5j6.js +2 -0
  69. package/web/chunk-1c95wfvq.js +1 -0
  70. package/web/{chunk-qnaqf0cr.js → chunk-23c1df7e.js} +1 -1
  71. package/web/{chunk-jrcyc9s9.js → chunk-24h1rfje.js} +1 -1
  72. package/web/{chunk-fscafg24.js → chunk-2hd1pe9w.js} +5 -5
  73. package/web/chunk-329rtxa9.js +1 -0
  74. package/web/{chunk-9yakxvjb.js → chunk-33qwz9bc.js} +2 -2
  75. package/web/{chunk-qd8bxxdj.js → chunk-3qjnwsph.js} +1 -1
  76. package/web/{chunk-p3b9crsa.js → chunk-47q4hmfp.js} +2 -2
  77. package/web/{chunk-y49fhfda.js → chunk-4fzj0azw.js} +1 -1
  78. package/web/{chunk-22a4ety5.js → chunk-5b2nw6j1.js} +1 -1
  79. package/web/{chunk-bgnnrpna.js → chunk-5hmfk69r.js} +4 -4
  80. package/web/{chunk-tqmwd9qp.js → chunk-5qqw2e0t.js} +1 -1
  81. package/web/{chunk-3jhyzmnf.js → chunk-61jahh35.js} +3 -3
  82. package/web/chunk-6gxf3vsg.js +1 -0
  83. package/web/{chunk-qefasa1j.js → chunk-6parf7sy.js} +1 -1
  84. package/web/{chunk-2m12wyrb.js → chunk-7520nrbb.js} +1 -1
  85. package/web/{chunk-9p12mgs6.js → chunk-7ba8vrfc.js} +1 -1
  86. package/web/{chunk-fm2ybfj5.js → chunk-7qxhk1kz.js} +4 -4
  87. package/web/{chunk-w880psmw.js → chunk-7v5rxabp.js} +1 -1
  88. package/web/{chunk-kdyjnwdx.js → chunk-7xk0ntav.js} +2 -2
  89. package/web/{chunk-q0p5xqe1.js → chunk-7yc083xj.js} +4 -4
  90. package/web/{chunk-b1pe46zz.js → chunk-89fkdgbp.js} +1 -1
  91. package/web/{chunk-v28fx2nd.js → chunk-8qgpfxkz.js} +1 -1
  92. package/web/{chunk-2ps6mepk.js → chunk-90xqeczk.js} +3 -3
  93. package/web/{chunk-fz06t6km.js → chunk-97b62pvb.js} +1 -1
  94. package/web/{chunk-a1z5qx1r.js → chunk-9a3q0jsh.js} +3 -3
  95. package/web/{chunk-xjxv8dg8.js → chunk-9bgey148.js} +4 -4
  96. package/web/{chunk-70qwwwak.js → chunk-9xh96b33.js} +1 -1
  97. package/web/{chunk-e6jxqbv7.js → chunk-a5sg33w2.js} +1 -1
  98. package/web/chunk-a91vxtx4.js +1 -0
  99. package/web/{chunk-pf2ab8p8.js → chunk-acybsx44.js} +1 -1
  100. package/web/chunk-agec7jj4.js +1 -0
  101. package/web/{chunk-e53wfgb8.js → chunk-axkyft9f.js} +1 -1
  102. package/web/{chunk-bc78qf1m.js → chunk-b0a8nbj0.js} +5 -5
  103. package/web/chunk-c516cghj.js +1 -0
  104. package/web/chunk-cqp1d4p0.js +1 -0
  105. package/web/{chunk-05w4fyzc.js → chunk-cwtdnacf.js} +1 -1
  106. package/web/chunk-dg1vas6z.js +8 -0
  107. package/web/{chunk-0mrkjnte.js → chunk-ds7srg4p.js} +1 -1
  108. package/web/{chunk-bjkc94mv.js → chunk-ep37qp12.js} +1 -1
  109. package/web/{chunk-90kp4pnz.js → chunk-eqsd8zta.js} +1 -1
  110. package/web/{chunk-ss1bcb0n.js → chunk-es28k2t7.js} +2 -2
  111. package/web/chunk-fc0nx23g.js +1 -0
  112. package/web/chunk-fhnypcrm.js +1139 -0
  113. package/web/{chunk-2scce33n.js → chunk-fv60p68p.js} +1 -1
  114. package/web/{chunk-rpmpttbk.js → chunk-g46f421r.js} +1 -1
  115. package/web/{chunk-2msj52w6.js → chunk-h18tnrf2.js} +1 -1
  116. package/web/{chunk-a5x2zveg.js → chunk-h288yd5w.js} +1 -1
  117. package/web/{chunk-8p4tc9f4.js → chunk-hszjc2ny.js} +3 -3
  118. package/web/{chunk-4ks96e4r.js → chunk-j0bwwc1g.js} +1 -1
  119. package/web/{chunk-9dxjafp2.js → chunk-jqa39f8t.js} +2 -2
  120. package/web/chunk-jvbbrnpa.js +1 -0
  121. package/web/{chunk-wptv8atc.js → chunk-jzfd7cyh.js} +1 -1
  122. package/web/chunk-ka9ak8wr.js +1 -0
  123. package/web/{chunk-9an7cjd9.js → chunk-mb4qx9hy.js} +2 -2
  124. package/web/chunk-mnjd59jk.js +1 -0
  125. package/web/{chunk-xbty0rv7.js → chunk-mwj9tpkz.js} +1 -1
  126. package/web/{chunk-taynqrgq.js → chunk-n8gfjj9a.js} +2 -2
  127. package/web/{chunk-20q90epj.js → chunk-n8sky2q6.js} +1 -1
  128. package/web/chunk-ng0nbfhh.js +1 -0
  129. package/web/chunk-nz9nxk48.js +1 -0
  130. package/web/{chunk-0vt9fg48.js → chunk-p9hsd3rn.js} +2 -2
  131. package/web/chunk-phw908hn.js +1 -0
  132. package/web/chunk-pjmmma1k.js +1 -0
  133. package/web/chunk-q7yn4m3t.js +1 -0
  134. package/web/chunk-qh15dxav.css +1 -0
  135. package/web/chunk-qnhqexe0.js +1 -0
  136. package/web/{chunk-bj90t5gh.js → chunk-rcx1aee5.js} +4 -4
  137. package/web/chunk-rjqj6ffe.js +1 -0
  138. package/web/{chunk-g4azyef7.js → chunk-rks7ksv3.js} +1 -1
  139. package/web/{chunk-q5ke7a33.js → chunk-sb1cjpq8.js} +1 -1
  140. package/web/{chunk-e32y85kx.js → chunk-sgvp8vge.js} +1 -1
  141. package/web/chunk-sjjwte12.js +1 -0
  142. package/web/{chunk-xrxne80b.js → chunk-sn9ecfvy.js} +1 -1
  143. package/web/{chunk-z7dcbxws.js → chunk-t7bwsdbr.js} +1 -1
  144. package/web/{chunk-fk0dh93x.js → chunk-tse9gvyq.js} +5 -5
  145. package/web/{chunk-a3verqw9.js → chunk-tx8240k4.js} +5 -5
  146. package/web/{chunk-dzwxgqgm.js → chunk-vd6y2pcm.js} +2 -2
  147. package/web/{chunk-5vw9rs4r.js → chunk-vpa55vje.js} +3 -3
  148. package/web/{chunk-y0m8hrwz.js → chunk-vymqrpm3.js} +77 -77
  149. package/web/{chunk-tmvakq7n.js → chunk-w7snhcyg.js} +4 -4
  150. package/web/{chunk-qh7265qw.js → chunk-wdtnhpd6.js} +2 -2
  151. package/web/{chunk-3ee04tmm.js → chunk-wmvd6j0b.js} +5 -5
  152. package/web/{chunk-yd46jhqv.js → chunk-xnq41dgs.js} +1 -1
  153. package/web/{chunk-45fzdcgz.js → chunk-xvsmtetz.js} +5 -5
  154. package/web/{chunk-ca682sm6.js → chunk-y3ajqthy.js} +14 -14
  155. package/web/{chunk-f26smjjf.js → chunk-yd1ez3wd.js} +1 -1
  156. package/web/chunk-yfbxtg5p.js +1 -0
  157. package/web/{chunk-4v8en1yw.js → chunk-ywp4s71k.js} +1 -1
  158. package/web/{chunk-gqw3f02j.js → chunk-z4x331rx.js} +5 -5
  159. package/web/{chunk-jwzd9tzk.js → chunk-z6bpamwq.js} +2 -2
  160. package/web/{chunk-hev4hq89.js → chunk-zmdnxn6m.js} +2 -2
  161. package/web/{icon-yx2p2pye.svg → icon-1wgy7kzy.svg} +13 -13
  162. package/web/icon.svg +13 -13
  163. package/web/index.html +2 -2
  164. package/web/install.sh +0 -0
  165. package/web/sw.js +9 -0
  166. package/worker.js +1 -1
  167. package/chunk-09vr609h.js +0 -2
  168. package/chunk-58vz2qsq.js +0 -2
  169. package/chunk-c25s4w6a.js +0 -5
  170. package/chunk-t057xfrt.js +0 -5
  171. package/chunk-wjd9fr23.js +0 -2
  172. package/chunk-zef13k3h.js +0 -471
  173. package/web/chunk-2pver6r4.js +0 -1
  174. package/web/chunk-37ajk6zg.js +0 -2
  175. package/web/chunk-4wkm9fda.js +0 -1
  176. package/web/chunk-amzgyy1k.js +0 -1
  177. package/web/chunk-cff5hcm8.js +0 -8
  178. package/web/chunk-esp1mmgr.js +0 -1
  179. package/web/chunk-ew3cgdtd.js +0 -1
  180. package/web/chunk-gjq1pxw3.js +0 -1
  181. package/web/chunk-h5ejbf6e.js +0 -1
  182. package/web/chunk-jjh5jvva.js +0 -1
  183. package/web/chunk-k5btcvbg.js +0 -1
  184. package/web/chunk-kpvgecwy.js +0 -1
  185. package/web/chunk-kq40ss39.js +0 -1
  186. package/web/chunk-q7dsnvpf.js +0 -1
  187. package/web/chunk-rg426vkf.js +0 -1
  188. package/web/chunk-ry9256r7.js +0 -1
  189. package/web/chunk-scpwc9ev.js +0 -1
  190. package/web/chunk-ssy07dd2.js +0 -1
  191. package/web/chunk-tgpbhzn9.js +0 -1
  192. package/web/chunk-vt40e1kp.js +0 -1136
  193. package/web/chunk-w53rba6g.js +0 -1
  194. package/web/chunk-w86n42dy.js +0 -1
  195. package/web/chunk-wtawdeej.css +0 -1
  196. package/web/chunk-zde7mj43.js +0 -1
@@ -1,2 +1,2 @@
1
- import{At}from"./chunk-vt40e1kp.js";var Z={};At(Z,{default:()=>kt});var V={};At(V,{default:()=>Vt});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")(),be=qr;var $r=be.Symbol,Pe=$r;var Ct=Object.prototype,{hasOwnProperty:kr,toString:Yr}=Ct,G=Pe?Pe.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 Et=Xr;var Zr=Object.prototype,Jr=Zr.toString;function Qr(t){return Jr.call(t)}var It=Qr;var Vr="[object Null]",to="[object Undefined]",Lt=Pe?Pe.toStringTag:void 0;function eo(t){if(t==null)return t===void 0?to:Vr;return Lt&&Lt in Object(t)?Et(t):It(t)}var Qe=eo;function ro(t){return t!=null&&typeof t=="object"}var Te=ro;var oo="[object Symbol]";function ao(t){return typeof t=="symbol"||Te(t)&&Qe(t)==oo}var ct=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 jt=fo;var io=Array.isArray,H=io;var no=1/0,Mt=Pe?Pe.prototype:void 0,Nt=Mt?Mt.toString:void 0;function Dt(t){if(typeof t=="string")return t;if(H(t))return jt(t,Dt)+"";if(ct(t))return Nt?Nt.call(t):"";var e=t+"";return e=="0"&&1/t==-no?"-0":e}var Rt=Dt;function so(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var pe=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(!pe(t))return!1;var e=Qe(t);return e==mo||e==lo||e==uo||e==xo}var qt=ho;var co=be["__core-js_shared__"],k=co;var Ft=function(){var t=/[^.]+$/.exec(k&&k.keys&&k.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function go(t){return!!Ft&&Ft 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(!pe(t)||Bt(t))return!1;var e=qt(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(be,"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 Kt=jo;function Mo(){}var $t=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 Yt=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){}}(),cr=Go;var Uo=!cr?at:function(t,e){return cr(t,"toString",{configurable:!0,enumerable:!1,value:it(e),writable:!0})},Xt=Uo;var zo=Yt(Xt),ua=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 da=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 pa=Ko;function Ho(t){return t!==t}var Zt=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 Jt=qo;function $o(t,e,r){return e===e?Jt(t,e,r):pa(t,Zt,r)}var Qt=$o;function ko(t,e){var r=t==null?0:t.length;return!!r&&Qt(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 yn=Zo;function Jo(t,e){return t===e||t!==t&&e!==e}var wt=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),Kt(t,this,s)}}var ma=Qo;function Vo(t,e){return ua(ma(t,e,at),t+"")}var vn=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)&&!qt(t)}var Oe=ra;var oa=Object.prototype;function aa(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||oa;return t===r}var bn=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 Te(t)&&Qe(t)==na}var gt=sa;var oe=Object.prototype,{hasOwnProperty:la,propertyIsEnumerable:ca}=oe,Oa=gt(function(){return arguments}())?gt:function(t){return Te(t)&&la.call(t,"callee")&&!ca.call(t,"callee")},Ot=Oa;function Aa(){return!1}var ae=Aa;var ne=typeof Z=="object"&&Z&&!Z.nodeType&&Z,fe=ne&&typeof X=="object"&&X&&!X.nodeType&&X,Ta=fe&&fe.exports===ne,ie=Ta?be.Buffer:void 0,Sa=ie?ie.isBuffer:void 0,Pa=Sa||ae,kt=Pa;var Ca="[object Arguments]",Ea="[object Array]",Ia="[object Boolean]",La="[object Date]",ja="[object Error]",Ma="[object Function]",Na="[object Map]",Da="[object Number]",Ra="[object Object]",Fa="[object RegExp]",Ba="[object Set]",Ga="[object String]",Ua="[object WeakMap]",za="[object ArrayBuffer]",Wa="[object DataView]",Ka="[object Float32Array]",Ha="[object Float64Array]",qa="[object Int8Array]",$a="[object Int16Array]",ka="[object Int32Array]",Ya="[object Uint8Array]",Xa="[object Uint8ClampedArray]",Za="[object Uint16Array]",Ja="[object Uint32Array]",m={};m[Ka]=m[Ha]=m[qa]=m[$a]=m[ka]=m[Ya]=m[Xa]=m[Za]=m[Ja]=!0;m[Ca]=m[Ea]=m[za]=m[Ia]=m[Wa]=m[La]=m[ja]=m[Ma]=m[Na]=m[Da]=m[Ra]=m[Fa]=m[Ba]=m[Ga]=m[Ua]=!1;function Qa(t){return Te(t)&&j(t.length)&&!!m[Qe(t)]}var se=Qa;function Va(t){return function(e){return t(e)}}var xn=Va;var ue=typeof V=="object"&&V&&!V.nodeType&&V,U=ue&&typeof J=="object"&&J&&!J.nodeType&&J,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){}}(),Vt=ef;var me=Vt&&Vt.isTypedArray,rf=me?xn(me):se,_n=rf;var of=Object.prototype,af=of.hasOwnProperty;function ff(t,e){var r=H(t),o=!r&&Ot(t),a=!r&&!o&&kt(t),i=!r&&!o&&!a&&_n(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")||yn(u,p))))s.push(u);return s}var fa=ff;function nf(t,e){return function(r){return t(e(r))}}var ha=nf;var sf=ha(Object.keys,Object),le=sf;var pf=Object.prototype,uf=pf.hasOwnProperty;function mf(t){if(!bn(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 ur=mf;function lf(t){return Oe(t)?fa(t):ur(t)}var xe=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||ct(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 ve=Cf;function Ef(t,e){var r=t.length;while(r--)if(wt(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 Ae=jf;function Mf(t){var e=this.__data__,r=O(e,t);return r<0?void 0:e[r][1]}var we=Mf;function Nf(t){return O(this.__data__,t)>-1}var Se=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 Ce=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=ve;D.prototype.delete=Ae;D.prototype.get=we;D.prototype.has=Se;D.prototype.set=Ce;var A=D;var Rf=h(be,"Map"),T=Rf;function Ff(){this.size=0,this.__data__={hash:new _t,map:new(T||A),string:new _t}}var Ee=Ff;function Bf(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var Ie=Bf;function Gf(t,e){var r=t.__data__;return Ie(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 Le=Uf;function zf(t){return w(this,t).get(t)}var je=zf;function Wf(t){return w(this,t).has(t)}var Me=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 Ne=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=Ee;R.prototype.delete=Le;R.prototype.get=je;R.prototype.has=Me;R.prototype.set=Ne;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 De=bt;var qf=500;function $f(t){var e=De(t,function(o){if(r.size===qf)r.clear();return o}),r=e.cache;return e}var Re=$f;var kf=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Yf=/\\(\\)?/g,Xf=Re(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}),Fe=Xf;function Zf(t){return t==null?"":Rt(t)}var ga=Zf;function Jf(t,e){if(H(t))return t;return M(t,e)?[t]:Fe(ga(t))}var wn=Jf;var Qf=1/0;function Vf(t){if(typeof t=="string"||ct(t))return t;var e=t+"";return e=="0"&&1/t==-Qf?"-0":e}var Gt=Vf;function ti(t,e){e=wn(e,t);var r=0,o=e.length;while(t!=null&&r<o)t=t[Gt(e[r++])];return r&&r==o?t:void 0}var kn=ti;function ei(t,e,r){var o=t==null?void 0:kn(t,e);return o===void 0?r:o}var Be=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 dr=ri;var Ge=Pe?Pe.isConcatSpreadable:void 0;function oi(t){return H(t)||Ot(t)||!!(Ge&&t&&t[Ge])}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 dr(a,s);else if(!o)a[a.length]=s}return a}var pr=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 Ke=ai;function fi(){this.__data__=new A,this.size=0}var He=fi;function ii(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}var qe=ii;function ni(t){return this.__data__.get(t)}var $e=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=He;F.prototype.delete=qe;F.prototype.get=$e;F.prototype.has=ke;F.prototype.set=Ye;var Wt=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 ya=li;var di=Object.prototype,xi=di.propertyIsEnumerable,Xe=Object.getOwnPropertySymbols,hi=!Xe?ya:function(t){if(t==null)return[];return t=Object(t),tt(Xe(t),function(e){return xi.call(t,e)})},mr=hi;function ci(t,e,r){var o=e(t);return H(t)?o:dr(o,r(t))}var va=ci;function gi(t){return va(t,xe,mr)}var zr=gi;var yi=h(be,"DataView"),et=yi;var _i=h(be,"Promise"),rt=_i;var bi=h(be,"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 ut=I;var Pi=be.Uint8Array,fr=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=Pe?Pe.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 fr(t),new fr(e)))return!1;return!0;case Ui:case zi:case Hi:return wt(+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=zr(t),p=s.length,u=zr(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 Pt=n?o(C,P,l,e,t,i):o(P,C,l,t,e,i);if(!(Pt===void 0?P===C||a(P,C,r,o,i):Pt)){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,_r="[object Arguments]",br="[object Array]",pt="[object Object]",on=Object.prototype,vr=on.hasOwnProperty;function an(t,e,r,o,a,i){var n=H(t),s=H(e),p=n?br:ut(t),u=s?br:ut(e);p=p==_r?pt:p,u=u==_r?pt:u;var x=p==pt,d=u==pt,l=p==u;if(l&&kt(t)){if(!kt(e))return!1;n=!0,x=!1}if(l&&!x)return i||(i=new Wt),n||_n(t)?st(t,e,r,o,a,i):lr(t,e,p,r,o,a,i);if(!(r&rn)){var y=x&&vr.call(t,"__wrapped__"),c=d&&vr.call(e,"__wrapped__");if(y||c){var g=y?t.value():t,v=c?e.value():e;return i||(i=new Wt),a(g,v,r,o,i)}}if(!l)return!1;return i||(i=new Wt),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||!Te(t)&&!Te(e))return t!==t&&e!==e;return Or(t,e,r,o,Ar,a)}var mt=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 Wt;if(o)var l=o(u,x,p,t,e,d);if(!(l===void 0?mt(x,u,fn|nn,o,d):l))return!1}}return!0}var Tr=sn;function pn(t){return t===t&&!pe(t)}var lt=pn;function un(t){var e=xe(t),r=e.length;while(r--){var o=e[r],a=t[o];e[r]=[o,a,lt(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 xt=mn;function ln(t){var e=wr(t);if(e.length==1&&e[0][2])return xt(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=wn(e,t);var o=-1,a=e.length,i=!1;while(++o<a){var n=Gt(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)&&yn(n,a)&&(H(t)||Ot(t))}var ba=hn;function cn(t,e){return t!=null&&ba(t,e,Pr)}var xa=cn;var gn=1,On=2;function An(t,e){if(M(t)&&lt(e))return xt(Gt(t),e);return function(r){var o=Be(r,t);return o===void 0&&o===e?xa(r,t):mt(e,o,gn|On)}}var Cr=An;function Tn(t){return function(e){return e==null?void 0:e[t]}}var _a=Tn;function Sn(t){return function(e){return kn(e,t)}}var Er=Sn;function Pn(t){return M(t)?_a(Gt(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 We=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(),hr=Ln;function jn(t,e){return t&&hr(t,e,xe)}var gr=jn;function Mn(t,e){return function(r,o){if(r==null)return r;if(!Oe(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(gr),Cn=Nn;function Dn(t){return Te(t)&&Oe(t)}var wa=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 yr=Fn;function Bn(t,e){var r=H(t)?da:Cn;return r(t,yr(e))}var f=Bn;function Gn(t,e){var r=[];return Cn(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,We(e,3))}var Je=Un;function zn(t,e){return jt(e,function(r){return t[r]})}var Dr=zn;function Wn(t){return t==null?[]:Dr(t,xe(t))}var dt=Wn;var Kn="[object Map]",Hn="[object Set]",qn=Object.prototype,$n=qn.hasOwnProperty;function Yn(t){if(t==null)return!0;if(Oe(t)&&(H(t)||typeof t=="string"||typeof t.splice=="function"||kt(t)||_n(t)||Ot(t)))return!t.length;var e=ut(t);if(e==Kn||e==Hn)return!t.size;if(bn(t))return!ur(t).length;for(var r in t)if($n.call(t,r))return!1;return!0}var ht=Yn;function Xn(t){return t===void 0}var _e=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)?Ke:Rr,a=arguments.length<3;return o(t,We(e,4),r,a,Cn)}var Ht=Jn;var Qn=1/0,Vn=!(S&&1/B(new S([,-0]))[1]==Qn)?$t: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=vn(function(t){return Br(pr(t,1,wa,!0))}),Tt=rs;var as="\x00",L="\x00",Gr="\x01";class Q{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(!qt(t))t=it(t);return this._defaultNodeLabelFn=t,this}nodeCount(){return this._nodeCount}nodes(){return xe(this._nodes)}sources(){var t=this;return Je(this.nodes(),function(e){return ht(t._in[e])})}sinks(){var t=this;return Je(this.nodes(),function(e){return ht(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(xe(this._in[t]),e),delete this._in[t],delete this._preds[t],f(xe(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(_e(e))e=L;else{e+="";for(var r=e;!_e(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(_e(t))t=L;if(this._isCompound){var e=this._children[t];if(e)return xe(e)}else if(t===L)return this.nodes();else if(this.hasNode(t))return[]}predecessors(t){var e=this._preds[t];if(e)return xe(e)}successors(t){var e=this._sucs[t];if(e)return xe(e)}neighbors(t){var e=this.predecessors(t);if(e)return Tt(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(!qt(t))t=it(t);return this._defaultEdgeLabelFn=t,this}edgeCount(){return this._edgeCount}edges(){return dt(this._edgeObjs)}setPath(t,e){var r=this,o=arguments;return Ht(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,!_e(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(!_e(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,Ur(this._preds[e],t),Ur(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?St(this._isDirected,arguments[0]):z(this._isDirected,t,e,r);return this._edgeLabels[o]}hasEdge(t,e,r){var o=arguments.length===1?St(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?St(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=dt(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=dt(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))}}Q.prototype._nodeCount=0;Q.prototype._edgeCount=0;function Ur(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+(_e(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 St(t,e){return z(t,e.v,e.w,e.name)}
2
- export{be,Pe,Qe,Te,ct,jt,H,pe,at,qt,it,cr,ua,da,pa,yn,wt,ma,vn,Oe,bn,Ot,kt,xn,Vt,_n,fa,ha,ur,xe,ga,wn,Gt,kn,dr,pr,Wt,ya,mr,va,zr,ut,fr,ba,xa,_a,We,hr,gr,Cn,wa,yr,f,Je,dt,_e,Ht,Q};
1
+ import{At}from"./chunk-fhnypcrm.js";var Z={};At(Z,{default:()=>kt});var V={};At(V,{default:()=>Gt});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")(),be=qr;var $r=be.Symbol,Pe=$r;var Pt=Object.prototype,{hasOwnProperty:kr,toString:Yr}=Pt,G=Pe?Pe.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 Ct=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=Pe?Pe.toStringTag:void 0;function eo(t){if(t==null)return t===void 0?to:Vr;return It&&It in Object(t)?Ct(t):Et(t)}var Qe=eo;function ro(t){return t!=null&&typeof t=="object"}var Te=ro;var oo="[object Symbol]";function ao(t){return typeof t=="symbol"||Te(t)&&Qe(t)==oo}var ct=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 qt=fo;var io=Array.isArray,H=io;var no=1/0,Lt=Pe?Pe.prototype:void 0,jt=Lt?Lt.toString:void 0;function Mt(t){if(typeof t=="string")return t;if(H(t))return qt(t,Mt)+"";if(ct(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 me=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(!me(t))return!1;var e=Qe(t);return e==mo||e==lo||e==uo||e==xo}var Vt=ho;var co=be["__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 Rt=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(!me(t)||Rt(t))return!1;var e=Vt(t)?Po:Oo;return e.test(_(t))}var Ft=Co;function Eo(t,e){return t==null?void 0:t[e]}var Bt=Eo;function Io(t,e){var r=Bt(t,e);return Ft(r)?r:void 0}var h=Io;var Lo=h(be,"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 Ut=jo;function Mo(){}var zt=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 Kt=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){}}(),cr=Go;var Uo=!cr?at:function(t,e){return cr(t,"toString",{configurable:!0,enumerable:!1,value:it(e),writable:!0})},Xt=Uo;var zo=Kt(Xt),ua=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 da=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 pa=Ko;function Ho(t){return t!==t}var Zt=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 Jt=qo;function $o(t,e,r){return e===e?Jt(t,e,r):pa(t,Zt,r)}var Qt=$o;function ko(t,e){var r=t==null?0:t.length;return!!r&&Qt(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 yn=Zo;function Jo(t,e){return t===e||t!==t&&e!==e}var wt=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),Ut(t,this,s)}}var ma=Qo;function Vo(t,e){return ua(ma(t,e,at),t+"")}var vn=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)&&!Vt(t)}var Oe=ra;var oa=Object.prototype;function aa(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||oa;return t===r}var bn=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 Te(t)&&Qe(t)==na}var gt=sa;var oe=Object.prototype,{hasOwnProperty:la,propertyIsEnumerable:ca}=oe,Oa=gt(function(){return arguments}())?gt:function(t){return Te(t)&&la.call(t,"callee")&&!ca.call(t,"callee")},$t=Oa;function Aa(){return!1}var ae=Aa;var ne=typeof Z=="object"&&Z&&!Z.nodeType&&Z,fe=ne&&typeof X=="object"&&X&&!X.nodeType&&X,Ta=fe&&fe.exports===ne,ie=Ta?be.Buffer:void 0,Sa=ie?ie.isBuffer:void 0,Pa=Sa||ae,kt=Pa;var Ca="[object Arguments]",Ea="[object Array]",Ia="[object Boolean]",La="[object Date]",ja="[object Error]",Ma="[object Function]",Na="[object Map]",Da="[object Number]",Ra="[object Object]",Fa="[object RegExp]",Ba="[object Set]",Ga="[object String]",Ua="[object WeakMap]",za="[object ArrayBuffer]",Wa="[object DataView]",Ka="[object Float32Array]",Ha="[object Float64Array]",qa="[object Int8Array]",$a="[object Int16Array]",ka="[object Int32Array]",Ya="[object Uint8Array]",Xa="[object Uint8ClampedArray]",Za="[object Uint16Array]",Ja="[object Uint32Array]",m={};m[Ka]=m[Ha]=m[qa]=m[$a]=m[ka]=m[Ya]=m[Xa]=m[Za]=m[Ja]=!0;m[Ca]=m[Ea]=m[za]=m[Ia]=m[Wa]=m[La]=m[ja]=m[Ma]=m[Na]=m[Da]=m[Ra]=m[Fa]=m[Ba]=m[Ga]=m[Ua]=!1;function Qa(t){return Te(t)&&j(t.length)&&!!m[Qe(t)]}var se=Qa;function Va(t){return function(e){return t(e)}}var xn=Va;var pe=typeof V=="object"&&V&&!V.nodeType&&V,U=pe&&typeof J=="object"&&J&&!J.nodeType&&J,tf=U&&U.exports===pe,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){}}(),Gt=ef;var ue=Gt&&Gt.isTypedArray,rf=ue?xn(ue):se,_n=rf;var of=Object.prototype,af=of.hasOwnProperty;function ff(t,e){var r=H(t),o=!r&&$t(t),a=!r&&!o&&kt(t),i=!r&&!o&&!a&&_n(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")||yn(u,p))))s.push(u);return s}var fa=ff;function nf(t,e){return function(r){return t(e(r))}}var ha=nf;var sf=ha(Object.keys,Object),le=sf;var pf=Object.prototype,uf=pf.hasOwnProperty;function mf(t){if(!bn(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 ur=mf;function lf(t){return Oe(t)?fa(t):ur(t)}var xe=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||ct(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 ve=Cf;function Ef(t,e){var r=t.length;while(r--)if(wt(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 Ae=jf;function Mf(t){var e=this.__data__,r=O(e,t);return r<0?void 0:e[r][1]}var we=Mf;function Nf(t){return O(this.__data__,t)>-1}var Se=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 Ce=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=ve;D.prototype.delete=Ae;D.prototype.get=we;D.prototype.has=Se;D.prototype.set=Ce;var A=D;var Rf=h(be,"Map"),T=Rf;function Ff(){this.size=0,this.__data__={hash:new _t,map:new(T||A),string:new _t}}var Ee=Ff;function Bf(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var Ie=Bf;function Gf(t,e){var r=t.__data__;return Ie(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 Le=Uf;function zf(t){return w(this,t).get(t)}var je=zf;function Wf(t){return w(this,t).has(t)}var Me=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 Ne=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=Ee;R.prototype.delete=Le;R.prototype.get=je;R.prototype.has=Me;R.prototype.set=Ne;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 De=bt;var qf=500;function $f(t){var e=De(t,function(o){if(r.size===qf)r.clear();return o}),r=e.cache;return e}var Re=$f;var kf=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Yf=/\\(\\)?/g,Xf=Re(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}),Fe=Xf;function Zf(t){return t==null?"":Nt(t)}var ga=Zf;function Jf(t,e){if(H(t))return t;return M(t,e)?[t]:Fe(ga(t))}var wn=Jf;var Qf=1/0;function Vf(t){if(typeof t=="string"||ct(t))return t;var e=t+"";return e=="0"&&1/t==-Qf?"-0":e}var Wt=Vf;function ti(t,e){e=wn(e,t);var r=0,o=e.length;while(t!=null&&r<o)t=t[Wt(e[r++])];return r&&r==o?t:void 0}var kn=ti;function ei(t,e,r){var o=t==null?void 0:kn(t,e);return o===void 0?r:o}var Be=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 dr=ri;var Ge=Pe?Pe.isConcatSpreadable:void 0;function oi(t){return H(t)||$t(t)||!!(Ge&&t&&t[Ge])}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 dr(a,s);else if(!o)a[a.length]=s}return a}var pr=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 Ke=ai;function fi(){this.__data__=new A,this.size=0}var He=fi;function ii(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}var qe=ii;function ni(t){return this.__data__.get(t)}var $e=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=He;F.prototype.delete=qe;F.prototype.get=$e;F.prototype.has=ke;F.prototype.set=Ye;var Ht=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 ya=li;var di=Object.prototype,xi=di.propertyIsEnumerable,Xe=Object.getOwnPropertySymbols,hi=!Xe?ya:function(t){if(t==null)return[];return t=Object(t),tt(Xe(t),function(e){return xi.call(t,e)})},mr=hi;function ci(t,e,r){var o=e(t);return H(t)?o:dr(o,r(t))}var va=ci;function gi(t){return va(t,xe,mr)}var zr=gi;var yi=h(be,"DataView"),et=yi;var _i=h(be,"Promise"),rt=_i;var bi=h(be,"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 ut=I;var Pi=be.Uint8Array,fr=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=Pe?Pe.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 fr(t),new fr(e)))return!1;return!0;case Ui:case zi:case Hi:return wt(+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=zr(t),p=s.length,u=zr(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 St=n?o(C,P,l,e,t,i):o(P,C,l,t,e,i);if(!(St===void 0?P===C||a(P,C,r,o,i):St)){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,_r="[object Arguments]",br="[object Array]",pt="[object Object]",on=Object.prototype,vr=on.hasOwnProperty;function an(t,e,r,o,a,i){var n=H(t),s=H(e),p=n?br:ut(t),u=s?br:ut(e);p=p==_r?pt:p,u=u==_r?pt:u;var x=p==pt,d=u==pt,l=p==u;if(l&&kt(t)){if(!kt(e))return!1;n=!0,x=!1}if(l&&!x)return i||(i=new Ht),n||_n(t)?st(t,e,r,o,a,i):lr(t,e,p,r,o,a,i);if(!(r&rn)){var y=x&&vr.call(t,"__wrapped__"),c=d&&vr.call(e,"__wrapped__");if(y||c){var g=y?t.value():t,v=c?e.value():e;return i||(i=new Ht),a(g,v,r,o,i)}}if(!l)return!1;return i||(i=new Ht),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||!Te(t)&&!Te(e))return t!==t&&e!==e;return Or(t,e,r,o,Ar,a)}var mt=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 Ht;if(o)var l=o(u,x,p,t,e,d);if(!(l===void 0?mt(x,u,fn|nn,o,d):l))return!1}}return!0}var Tr=sn;function pn(t){return t===t&&!me(t)}var lt=pn;function un(t){var e=xe(t),r=e.length;while(r--){var o=e[r],a=t[o];e[r]=[o,a,lt(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 xt=mn;function ln(t){var e=wr(t);if(e.length==1&&e[0][2])return xt(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=wn(e,t);var o=-1,a=e.length,i=!1;while(++o<a){var n=Wt(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)&&yn(n,a)&&(H(t)||$t(t))}var ba=hn;function cn(t,e){return t!=null&&ba(t,e,Pr)}var xa=cn;var gn=1,On=2;function An(t,e){if(M(t)&&lt(e))return xt(Wt(t),e);return function(r){var o=Be(r,t);return o===void 0&&o===e?xa(r,t):mt(e,o,gn|On)}}var Cr=An;function Tn(t){return function(e){return e==null?void 0:e[t]}}var _a=Tn;function Sn(t){return function(e){return kn(e,t)}}var Er=Sn;function Pn(t){return M(t)?_a(Wt(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 We=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(),hr=Ln;function jn(t,e){return t&&hr(t,e,xe)}var gr=jn;function Mn(t,e){return function(r,o){if(r==null)return r;if(!Oe(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(gr),Cn=Nn;function Dn(t){return Te(t)&&Oe(t)}var wa=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 yr=Fn;function Bn(t,e){var r=H(t)?da:Cn;return r(t,yr(e))}var f=Bn;function Gn(t,e){var r=[];return Cn(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,We(e,3))}var Je=Un;function zn(t,e){return qt(e,function(r){return t[r]})}var Dr=zn;function Wn(t){return t==null?[]:Dr(t,xe(t))}var dt=Wn;var Kn="[object Map]",Hn="[object Set]",qn=Object.prototype,$n=qn.hasOwnProperty;function Yn(t){if(t==null)return!0;if(Oe(t)&&(H(t)||typeof t=="string"||typeof t.splice=="function"||kt(t)||_n(t)||$t(t)))return!t.length;var e=ut(t);if(e==Kn||e==Hn)return!t.size;if(bn(t))return!ur(t).length;for(var r in t)if($n.call(t,r))return!1;return!0}var ht=Yn;function Xn(t){return t===void 0}var _e=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)?Ke:Rr,a=arguments.length<3;return o(t,We(e,4),r,a,Cn)}var Yt=Jn;var Qn=1/0,Vn=!(S&&1/B(new S([,-0]))[1]==Qn)?zt: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=vn(function(t){return Br(pr(t,1,wa,!0))}),Ot=rs;var as="\x00",L="\x00",Gr="\x01";class Q{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(!Vt(t))t=it(t);return this._defaultNodeLabelFn=t,this}nodeCount(){return this._nodeCount}nodes(){return xe(this._nodes)}sources(){var t=this;return Je(this.nodes(),function(e){return ht(t._in[e])})}sinks(){var t=this;return Je(this.nodes(),function(e){return ht(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(xe(this._in[t]),e),delete this._in[t],delete this._preds[t],f(xe(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(_e(e))e=L;else{e+="";for(var r=e;!_e(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(_e(t))t=L;if(this._isCompound){var e=this._children[t];if(e)return xe(e)}else if(t===L)return this.nodes();else if(this.hasNode(t))return[]}predecessors(t){var e=this._preds[t];if(e)return xe(e)}successors(t){var e=this._sucs[t];if(e)return xe(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(!Vt(t))t=it(t);return this._defaultEdgeLabelFn=t,this}edgeCount(){return this._edgeCount}edges(){return dt(this._edgeObjs)}setPath(t,e){var r=this,o=arguments;return Yt(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,!_e(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(!_e(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,Ur(this._preds[e],t),Ur(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?Tt(this._isDirected,arguments[0]):z(this._isDirected,t,e,r);return this._edgeLabels[o]}hasEdge(t,e,r){var o=arguments.length===1?Tt(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?Tt(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=dt(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=dt(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))}}Q.prototype._nodeCount=0;Q.prototype._edgeCount=0;function Ur(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+(_e(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 Tt(t,e){return z(t,e.v,e.w,e.name)}
2
+ export{be,Pe,Qe,Te,ct,qt,H,me,at,Vt,it,cr,ua,da,pa,yn,wt,ma,vn,Oe,bn,$t,kt,xn,Gt,_n,fa,ha,ur,xe,ga,wn,Wt,kn,dr,pr,Ht,ya,mr,va,zr,ut,fr,ba,xa,_a,We,hr,gr,Cn,wa,yr,f,Je,dt,_e,Yt,Q};
@@ -1,9 +1,9 @@
1
- import{e,Yt,r,b,C,S,E,T,A,I,L,s,N,le,ae,ie,ft,he,ge}from"./chunk-y0m8hrwz.js";import{fe}from"./chunk-ss1bcb0n.js";import{oe}from"./chunk-hev4hq89.js";var He=function(){var t=e(function(X,l,o,h){for(o=o||{},h=X.length;h--;o[X[h]]=l);return o},"o"),d=[1,3],f=[1,4],m=[1,5],a=[1,6],u=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],q=[1,22],w=[2,7],R=[1,26],V=[1,27],v=[1,28],F=[1,29],P=[1,33],U=[1,34],Y=[1,35],B=[1,36],Q=[1,37],H=[1,38],K=[1,24],W=[1,31],j=[1,32],G=[1,30],g=[1,39],y=[1,40],k=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],J=[1,61],pe=[89,90],Ke=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],xe=[27,29],We=[1,70],je=[1,71],Ge=[1,72],ze=[1,73],Xe=[1,74],Je=[1,75],Ze=[1,76],be=[1,83],Z=[1,80],Re=[1,84],ke=[1,85],ye=[1,86],_e=[1,87],Se=[1,88],Ie=[1,89],Te=[1,90],Ne=[1,91],qe=[1,92],we=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],ee=[63,64],et=[1,101],tt=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],D=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],te=[1,110],se=[1,106],re=[1,107],ne=[1,108],ce=[1,109],ue=[1,111],Ce=[1,116],Ae=[1,117],Ve=[1,114],ve=[1,115],$e={trace:e(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",21:"direction_tb",22:"direction_bt",23:"direction_rl",24:"direction_lr",27:"STRUCT_START",29:"STYLE_SEPARATOR",31:"ID",32:"COLONSEP",34:"TEXT",36:"RISK",38:"VERIFYMTHD",40:"STRUCT_STOP",41:"REQUIREMENT",42:"FUNCTIONAL_REQUIREMENT",43:"INTERFACE_REQUIREMENT",44:"PERFORMANCE_REQUIREMENT",45:"PHYSICAL_REQUIREMENT",46:"DESIGN_CONSTRAINT",47:"LOW_RISK",48:"MED_RISK",49:"HIGH_RISK",50:"VERIFY_ANALYSIS",51:"VERIFY_DEMONSTRATION",52:"VERIFY_INSPECTION",53:"VERIFY_TEST",54:"ELEMENT",57:"TYPE",59:"DOCREF",61:"END_ARROW_L",63:"LINE",64:"END_ARROW_R",65:"CONTAINS",66:"COPIES",67:"DERIVES",68:"SATISFIES",69:"VERIFIES",70:"REFINES",71:"TRACES",72:"CLASSDEF",74:"CLASS",75:"ALPHA",76:"COMMA",77:"STYLE",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",86:"MINUS",87:"LABEL",88:"SEMICOLON",89:"unqString",90:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:e(function(l,o,h,n,p,i,Le){var c=i.length-1;switch(p){case 4:this.$=i[c].trim(),n.setAccTitle(this.$);break;case 5:case 6:this.$=i[c].trim(),n.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:n.setDirection("TB");break;case 18:n.setDirection("BT");break;case 19:n.setDirection("RL");break;case 20:n.setDirection("LR");break;case 21:n.addRequirement(i[c-3],i[c-4]);break;case 22:n.addRequirement(i[c-5],i[c-6]),n.setClass([i[c-5]],i[c-3]);break;case 23:n.setNewReqId(i[c-2]);break;case 24:n.setNewReqText(i[c-2]);break;case 25:n.setNewReqRisk(i[c-2]);break;case 26:n.setNewReqVerifyMethod(i[c-2]);break;case 29:this.$=n.RequirementType.REQUIREMENT;break;case 30:this.$=n.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=n.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=n.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=n.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=n.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=n.RiskLevel.LOW_RISK;break;case 36:this.$=n.RiskLevel.MED_RISK;break;case 37:this.$=n.RiskLevel.HIGH_RISK;break;case 38:this.$=n.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=n.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=n.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=n.VerifyType.VERIFY_TEST;break;case 42:n.addElement(i[c-3]);break;case 43:n.addElement(i[c-5]),n.setClass([i[c-5]],i[c-3]);break;case 44:n.setNewElementType(i[c-2]);break;case 45:n.setNewElementDocRef(i[c-2]);break;case 48:n.addRelationship(i[c-2],i[c],i[c-4]);break;case 49:n.addRelationship(i[c-2],i[c-4],i[c]);break;case 50:this.$=n.Relationships.CONTAINS;break;case 51:this.$=n.Relationships.COPIES;break;case 52:this.$=n.Relationships.DERIVES;break;case 53:this.$=n.Relationships.SATISFIES;break;case 54:this.$=n.Relationships.VERIFIES;break;case 55:this.$=n.Relationships.REFINES;break;case 56:this.$=n.Relationships.TRACES;break;case 57:this.$=i[c-2],n.defineClass(i[c-1],i[c]);break;case 58:n.setClass(i[c-1],i[c]);break;case 59:n.setClass([i[c-2]],i[c]);break;case 60:case 62:this.$=[i[c]];break;case 61:case 63:this.$=i[c-2].concat([i[c]]);break;case 64:this.$=i[c-2],n.setCssStyle(i[c-1],i[c]);break;case 65:this.$=[i[c]];break;case 66:i[c-2].push(i[c]),this.$=i[c-2];break;case 68:this.$=i[c-1]+i[c];break}},"anonymous"),table:[{3:1,4:2,6:d,9:f,11:m,13:a},{1:[3]},{3:8,4:2,5:[1,7],6:d,9:f,11:m,13:a},{5:[1,9]},{10:[1,10]},{12:[1,11]},t(u,[2,6]),{3:12,4:2,6:d,9:f,11:m,13:a},{1:[2,2]},{4:17,5:q,7:13,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},t(u,[2,4]),t(u,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:q,7:42,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:q,7:43,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:q,7:44,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:q,7:45,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:q,7:46,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:q,7:47,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:q,7:48,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:q,7:49,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:q,7:50,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},t(k,[2,17]),t(k,[2,18]),t(k,[2,19]),t(k,[2,20]),{30:60,33:62,75:J,89:g,90:y},{30:63,33:62,75:J,89:g,90:y},{30:64,33:62,75:J,89:g,90:y},t(pe,[2,29]),t(pe,[2,30]),t(pe,[2,31]),t(pe,[2,32]),t(pe,[2,33]),t(pe,[2,34]),t(Ke,[2,81]),t(Ke,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},t(xe,[2,79]),t(xe,[2,80]),{27:[1,67],29:[1,68]},t(xe,[2,85]),t(xe,[2,86]),{62:69,65:We,66:je,67:Ge,68:ze,69:Xe,70:Je,71:Ze},{62:77,65:We,66:je,67:Ge,68:ze,69:Xe,70:Je,71:Ze},{30:78,33:62,75:J,89:g,90:y},{73:79,75:be,76:Z,78:81,79:82,80:Re,81:ke,82:ye,83:_e,84:Se,85:Ie,86:Te,87:Ne,88:qe},t(we,[2,60]),t(we,[2,62]),{73:93,75:be,76:Z,78:81,79:82,80:Re,81:ke,82:ye,83:_e,84:Se,85:Ie,86:Te,87:Ne,88:qe},{30:94,33:62,75:J,76:Z,89:g,90:y},{5:[1,95]},{30:96,33:62,75:J,89:g,90:y},{5:[1,97]},{30:98,33:62,75:J,89:g,90:y},{63:[1,99]},t(ee,[2,50]),t(ee,[2,51]),t(ee,[2,52]),t(ee,[2,53]),t(ee,[2,54]),t(ee,[2,55]),t(ee,[2,56]),{64:[1,100]},t(k,[2,59],{76:Z}),t(k,[2,64],{76:et}),{33:103,75:[1,102],89:g,90:y},t(tt,[2,65],{79:104,75:be,80:Re,81:ke,82:ye,83:_e,84:Se,85:Ie,86:Te,87:Ne,88:qe}),t(D,[2,67]),t(D,[2,69]),t(D,[2,70]),t(D,[2,71]),t(D,[2,72]),t(D,[2,73]),t(D,[2,74]),t(D,[2,75]),t(D,[2,76]),t(D,[2,77]),t(D,[2,78]),t(k,[2,57],{76:et}),t(k,[2,58],{76:Z}),{5:te,28:105,31:se,34:re,36:ne,38:ce,40:ue},{27:[1,112],76:Z},{5:Ce,40:Ae,56:113,57:Ve,59:ve},{27:[1,118],76:Z},{33:119,89:g,90:y},{33:120,89:g,90:y},{75:be,78:121,79:82,80:Re,81:ke,82:ye,83:_e,84:Se,85:Ie,86:Te,87:Ne,88:qe},t(we,[2,61]),t(we,[2,63]),t(D,[2,68]),t(k,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:te,28:126,31:se,34:re,36:ne,38:ce,40:ue},t(k,[2,28]),{5:[1,127]},t(k,[2,42]),{32:[1,128]},{32:[1,129]},{5:Ce,40:Ae,56:130,57:Ve,59:ve},t(k,[2,47]),{5:[1,131]},t(k,[2,48]),t(k,[2,49]),t(tt,[2,66],{79:104,75:be,80:Re,81:ke,82:ye,83:_e,84:Se,85:Ie,86:Te,87:Ne,88:qe}),{33:132,89:g,90:y},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},t(k,[2,27]),{5:te,28:145,31:se,34:re,36:ne,38:ce,40:ue},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},t(k,[2,46]),{5:Ce,40:Ae,56:152,57:Ve,59:ve},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},t(k,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},t(k,[2,43]),{5:te,28:159,31:se,34:re,36:ne,38:ce,40:ue},{5:te,28:160,31:se,34:re,36:ne,38:ce,40:ue},{5:te,28:161,31:se,34:re,36:ne,38:ce,40:ue},{5:te,28:162,31:se,34:re,36:ne,38:ce,40:ue},{5:Ce,40:Ae,56:163,57:Ve,59:ve},{5:Ce,40:Ae,56:164,57:Ve,59:ve},t(k,[2,23]),t(k,[2,24]),t(k,[2,25]),t(k,[2,26]),t(k,[2,44]),t(k,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:e(function(l,o){if(o.recoverable)this.trace(l);else{var h=Error(l);throw h.hash=o,h}},"parseError"),parse:e(function(l){var o=this,h=[0],n=[],p=[null],i=[],Le=this.table,c="",Oe=0,st=0,it=0,ct=2,rt=1,ht=i.slice.call(arguments,1),_=Object.create(this.lexer),me={yy:{}};for(var Pe in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,Pe))me.yy[Pe]=this.yy[Pe];if(_.setInput(l,me.yy),me.yy.lexer=_,me.yy.parser=this,typeof _.yylloc>"u")_.yylloc={};var Ue=_.yylloc;i.push(Ue);var ut=_.options&&_.options.ranges;if(typeof me.yy.parseError==="function")this.parseError=me.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function mt(M){h.length=h.length-2*M,p.length=p.length-M,i.length=i.length-M}e(mt,"popStack");function nt(){var M=n.pop()||_.lex()||rt;if(typeof M!=="number"){if(M instanceof Array)n=M,M=n.pop();M=o.symbols_[M]||M}return M}e(nt,"lex");var x,Ye,de,O,gt,Be,Ee={},Me,z,at,Fe;while(!0){if(de=h[h.length-1],this.defaultActions[de])O=this.defaultActions[de];else{if(x===null||typeof x>"u")x=nt();O=Le[de]&&Le[de][x]}if(typeof O>"u"||!O.length||!O[0]){var Qe="";Fe=[];for(Me in Le[de])if(this.terminals_[Me]&&Me>ct)Fe.push("'"+this.terminals_[Me]+"'");if(_.showPosition)Qe="Parse error on line "+(Oe+1)+`:
1
+ import{e,Zt,r,b,C,S,E,T,A,I,L,s,N,ce,ae,ie,ft,ge,ye}from"./chunk-vymqrpm3.js";import{he}from"./chunk-es28k2t7.js";import{se}from"./chunk-zmdnxn6m.js";var He=function(){var t=e(function(X,l,o,h){for(o=o||{},h=X.length;h--;o[X[h]]=l);return o},"o"),d=[1,3],f=[1,4],m=[1,5],a=[1,6],u=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],q=[1,22],w=[2,7],R=[1,26],V=[1,27],v=[1,28],F=[1,29],P=[1,33],U=[1,34],Y=[1,35],B=[1,36],Q=[1,37],H=[1,38],K=[1,24],W=[1,31],j=[1,32],G=[1,30],g=[1,39],y=[1,40],k=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],J=[1,61],de=[89,90],Ke=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],xe=[27,29],We=[1,70],je=[1,71],Ge=[1,72],ze=[1,73],Xe=[1,74],Je=[1,75],Ze=[1,76],Ee=[1,83],Z=[1,80],be=[1,84],Re=[1,85],ke=[1,86],_e=[1,87],Se=[1,88],Ie=[1,89],Te=[1,90],Ne=[1,91],qe=[1,92],we=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],ee=[63,64],et=[1,101],tt=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],D=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],te=[1,110],re=[1,106],ne=[1,107],le=[1,108],oe=[1,109],ue=[1,111],Ce=[1,116],Ae=[1,117],Ve=[1,114],ve=[1,115],$e={trace:e(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",21:"direction_tb",22:"direction_bt",23:"direction_rl",24:"direction_lr",27:"STRUCT_START",29:"STYLE_SEPARATOR",31:"ID",32:"COLONSEP",34:"TEXT",36:"RISK",38:"VERIFYMTHD",40:"STRUCT_STOP",41:"REQUIREMENT",42:"FUNCTIONAL_REQUIREMENT",43:"INTERFACE_REQUIREMENT",44:"PERFORMANCE_REQUIREMENT",45:"PHYSICAL_REQUIREMENT",46:"DESIGN_CONSTRAINT",47:"LOW_RISK",48:"MED_RISK",49:"HIGH_RISK",50:"VERIFY_ANALYSIS",51:"VERIFY_DEMONSTRATION",52:"VERIFY_INSPECTION",53:"VERIFY_TEST",54:"ELEMENT",57:"TYPE",59:"DOCREF",61:"END_ARROW_L",63:"LINE",64:"END_ARROW_R",65:"CONTAINS",66:"COPIES",67:"DERIVES",68:"SATISFIES",69:"VERIFIES",70:"REFINES",71:"TRACES",72:"CLASSDEF",74:"CLASS",75:"ALPHA",76:"COMMA",77:"STYLE",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",86:"MINUS",87:"LABEL",88:"SEMICOLON",89:"unqString",90:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:e(function(l,o,h,n,p,i,Le){var c=i.length-1;switch(p){case 4:this.$=i[c].trim(),n.setAccTitle(this.$);break;case 5:case 6:this.$=i[c].trim(),n.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:n.setDirection("TB");break;case 18:n.setDirection("BT");break;case 19:n.setDirection("RL");break;case 20:n.setDirection("LR");break;case 21:n.addRequirement(i[c-3],i[c-4]);break;case 22:n.addRequirement(i[c-5],i[c-6]),n.setClass([i[c-5]],i[c-3]);break;case 23:n.setNewReqId(i[c-2]);break;case 24:n.setNewReqText(i[c-2]);break;case 25:n.setNewReqRisk(i[c-2]);break;case 26:n.setNewReqVerifyMethod(i[c-2]);break;case 29:this.$=n.RequirementType.REQUIREMENT;break;case 30:this.$=n.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=n.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=n.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=n.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=n.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=n.RiskLevel.LOW_RISK;break;case 36:this.$=n.RiskLevel.MED_RISK;break;case 37:this.$=n.RiskLevel.HIGH_RISK;break;case 38:this.$=n.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=n.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=n.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=n.VerifyType.VERIFY_TEST;break;case 42:n.addElement(i[c-3]);break;case 43:n.addElement(i[c-5]),n.setClass([i[c-5]],i[c-3]);break;case 44:n.setNewElementType(i[c-2]);break;case 45:n.setNewElementDocRef(i[c-2]);break;case 48:n.addRelationship(i[c-2],i[c],i[c-4]);break;case 49:n.addRelationship(i[c-2],i[c-4],i[c]);break;case 50:this.$=n.Relationships.CONTAINS;break;case 51:this.$=n.Relationships.COPIES;break;case 52:this.$=n.Relationships.DERIVES;break;case 53:this.$=n.Relationships.SATISFIES;break;case 54:this.$=n.Relationships.VERIFIES;break;case 55:this.$=n.Relationships.REFINES;break;case 56:this.$=n.Relationships.TRACES;break;case 57:this.$=i[c-2],n.defineClass(i[c-1],i[c]);break;case 58:n.setClass(i[c-1],i[c]);break;case 59:n.setClass([i[c-2]],i[c]);break;case 60:case 62:this.$=[i[c]];break;case 61:case 63:this.$=i[c-2].concat([i[c]]);break;case 64:this.$=i[c-2],n.setCssStyle(i[c-1],i[c]);break;case 65:this.$=[i[c]];break;case 66:i[c-2].push(i[c]),this.$=i[c-2];break;case 68:this.$=i[c-1]+i[c];break}},"anonymous"),table:[{3:1,4:2,6:d,9:f,11:m,13:a},{1:[3]},{3:8,4:2,5:[1,7],6:d,9:f,11:m,13:a},{5:[1,9]},{10:[1,10]},{12:[1,11]},t(u,[2,6]),{3:12,4:2,6:d,9:f,11:m,13:a},{1:[2,2]},{4:17,5:q,7:13,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},t(u,[2,4]),t(u,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:q,7:42,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:q,7:43,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:q,7:44,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:q,7:45,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:q,7:46,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:q,7:47,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:q,7:48,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:q,7:49,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:q,7:50,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},t(k,[2,17]),t(k,[2,18]),t(k,[2,19]),t(k,[2,20]),{30:60,33:62,75:J,89:g,90:y},{30:63,33:62,75:J,89:g,90:y},{30:64,33:62,75:J,89:g,90:y},t(de,[2,29]),t(de,[2,30]),t(de,[2,31]),t(de,[2,32]),t(de,[2,33]),t(de,[2,34]),t(Ke,[2,81]),t(Ke,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},t(xe,[2,79]),t(xe,[2,80]),{27:[1,67],29:[1,68]},t(xe,[2,85]),t(xe,[2,86]),{62:69,65:We,66:je,67:Ge,68:ze,69:Xe,70:Je,71:Ze},{62:77,65:We,66:je,67:Ge,68:ze,69:Xe,70:Je,71:Ze},{30:78,33:62,75:J,89:g,90:y},{73:79,75:Ee,76:Z,78:81,79:82,80:be,81:Re,82:ke,83:_e,84:Se,85:Ie,86:Te,87:Ne,88:qe},t(we,[2,60]),t(we,[2,62]),{73:93,75:Ee,76:Z,78:81,79:82,80:be,81:Re,82:ke,83:_e,84:Se,85:Ie,86:Te,87:Ne,88:qe},{30:94,33:62,75:J,76:Z,89:g,90:y},{5:[1,95]},{30:96,33:62,75:J,89:g,90:y},{5:[1,97]},{30:98,33:62,75:J,89:g,90:y},{63:[1,99]},t(ee,[2,50]),t(ee,[2,51]),t(ee,[2,52]),t(ee,[2,53]),t(ee,[2,54]),t(ee,[2,55]),t(ee,[2,56]),{64:[1,100]},t(k,[2,59],{76:Z}),t(k,[2,64],{76:et}),{33:103,75:[1,102],89:g,90:y},t(tt,[2,65],{79:104,75:Ee,80:be,81:Re,82:ke,83:_e,84:Se,85:Ie,86:Te,87:Ne,88:qe}),t(D,[2,67]),t(D,[2,69]),t(D,[2,70]),t(D,[2,71]),t(D,[2,72]),t(D,[2,73]),t(D,[2,74]),t(D,[2,75]),t(D,[2,76]),t(D,[2,77]),t(D,[2,78]),t(k,[2,57],{76:et}),t(k,[2,58],{76:Z}),{5:te,28:105,31:re,34:ne,36:le,38:oe,40:ue},{27:[1,112],76:Z},{5:Ce,40:Ae,56:113,57:Ve,59:ve},{27:[1,118],76:Z},{33:119,89:g,90:y},{33:120,89:g,90:y},{75:Ee,78:121,79:82,80:be,81:Re,82:ke,83:_e,84:Se,85:Ie,86:Te,87:Ne,88:qe},t(we,[2,61]),t(we,[2,63]),t(D,[2,68]),t(k,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:te,28:126,31:re,34:ne,36:le,38:oe,40:ue},t(k,[2,28]),{5:[1,127]},t(k,[2,42]),{32:[1,128]},{32:[1,129]},{5:Ce,40:Ae,56:130,57:Ve,59:ve},t(k,[2,47]),{5:[1,131]},t(k,[2,48]),t(k,[2,49]),t(tt,[2,66],{79:104,75:Ee,80:be,81:Re,82:ke,83:_e,84:Se,85:Ie,86:Te,87:Ne,88:qe}),{33:132,89:g,90:y},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},t(k,[2,27]),{5:te,28:145,31:re,34:ne,36:le,38:oe,40:ue},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},t(k,[2,46]),{5:Ce,40:Ae,56:152,57:Ve,59:ve},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},t(k,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},t(k,[2,43]),{5:te,28:159,31:re,34:ne,36:le,38:oe,40:ue},{5:te,28:160,31:re,34:ne,36:le,38:oe,40:ue},{5:te,28:161,31:re,34:ne,36:le,38:oe,40:ue},{5:te,28:162,31:re,34:ne,36:le,38:oe,40:ue},{5:Ce,40:Ae,56:163,57:Ve,59:ve},{5:Ce,40:Ae,56:164,57:Ve,59:ve},t(k,[2,23]),t(k,[2,24]),t(k,[2,25]),t(k,[2,26]),t(k,[2,44]),t(k,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:e(function(l,o){if(o.recoverable)this.trace(l);else{var h=Error(l);throw h.hash=o,h}},"parseError"),parse:e(function(l){var o=this,h=[0],n=[],p=[null],i=[],Le=this.table,c="",Oe=0,st=0,it=0,ct=2,rt=1,ht=i.slice.call(arguments,1),_=Object.create(this.lexer),me={yy:{}};for(var Pe in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,Pe))me.yy[Pe]=this.yy[Pe];if(_.setInput(l,me.yy),me.yy.lexer=_,me.yy.parser=this,typeof _.yylloc>"u")_.yylloc={};var Ue=_.yylloc;i.push(Ue);var ut=_.options&&_.options.ranges;if(typeof me.yy.parseError==="function")this.parseError=me.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function mt(M){h.length=h.length-2*M,p.length=p.length-M,i.length=i.length-M}e(mt,"popStack");function nt(){var M=n.pop()||_.lex()||rt;if(typeof M!=="number"){if(M instanceof Array)n=M,M=n.pop();M=o.symbols_[M]||M}return M}e(nt,"lex");var x,Ye,fe,O,gt,Be,pe={},Me,z,at,Fe;while(!0){if(fe=h[h.length-1],this.defaultActions[fe])O=this.defaultActions[fe];else{if(x===null||typeof x>"u")x=nt();O=Le[fe]&&Le[fe][x]}if(typeof O>"u"||!O.length||!O[0]){var Qe="";Fe=[];for(Me in Le[fe])if(this.terminals_[Me]&&Me>ct)Fe.push("'"+this.terminals_[Me]+"'");if(_.showPosition)Qe="Parse error on line "+(Oe+1)+`:
2
2
  `+_.showPosition()+`
3
- Expecting `+Fe.join(", ")+", got '"+(this.terminals_[x]||x)+"'";else Qe="Parse error on line "+(Oe+1)+": Unexpected "+(x==rt?"end of input":"'"+(this.terminals_[x]||x)+"'");this.parseError(Qe,{text:_.match,token:this.terminals_[x]||x,line:_.yylineno,loc:Ue,expected:Fe})}if(O[0]instanceof Array&&O.length>1)throw Error("Parse Error: multiple actions possible at state: "+de+", token: "+x);switch(O[0]){case 1:if(h.push(x),p.push(_.yytext),i.push(_.yylloc),h.push(O[1]),x=null,!Ye){if(st=_.yyleng,c=_.yytext,Oe=_.yylineno,Ue=_.yylloc,it>0)it--}else x=Ye,Ye=null;break;case 2:if(z=this.productions_[O[1]][1],Ee.$=p[p.length-z],Ee._$={first_line:i[i.length-(z||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(z||1)].first_column,last_column:i[i.length-1].last_column},ut)Ee._$.range=[i[i.length-(z||1)].range[0],i[i.length-1].range[1]];if(Be=this.performAction.apply(Ee,[c,st,Oe,me.yy,O[1],p,i].concat(ht)),typeof Be<"u")return Be;if(z)h=h.slice(0,-1*z*2),p=p.slice(0,-1*z),i=i.slice(0,-1*z);h.push(this.productions_[O[1]][0]),p.push(Ee.$),i.push(Ee._$),at=Le[h[h.length-2]][h[h.length-1]],h.push(at);break;case 3:return!0}}return!0},"parse")},ot=function(){var X={EOF:1,parseError:e(function(o,h){if(this.yy.parser)this.yy.parser.parseError(o,h);else throw Error(o)},"parseError"),setInput:e(function(l,o){if(this.yy=o||this.yy||{},this._input=l,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges)this.yylloc.range=[0,0];return this.offset=0,this},"setInput"),input:e(function(){var l=this._input[0];this.yytext+=l,this.yyleng++,this.offset++,this.match+=l,this.matched+=l;var o=l.match(/(?:\r\n?|\n).*/g);if(o)this.yylineno++,this.yylloc.last_line++;else this.yylloc.last_column++;if(this.options.ranges)this.yylloc.range[1]++;return this._input=this._input.slice(1),l},"input"),unput:e(function(l){var o=l.length,h=l.split(/(?:\r\n?|\n)/g);this._input=l+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-o),this.offset-=o;var n=this.match.split(/(?:\r\n?|\n)/g);if(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),h.length-1)this.yylineno-=h.length-1;var p=this.yylloc.range;if(this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:h?(h.length===n.length?this.yylloc.first_column:0)+n[n.length-h.length].length-h[0].length:this.yylloc.first_column-o},this.options.ranges)this.yylloc.range=[p[0],p[0]+this.yyleng-o];return this.yyleng=this.yytext.length,this},"unput"),more:e(function(){return this._more=!0,this},"more"),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
3
+ Expecting `+Fe.join(", ")+", got '"+(this.terminals_[x]||x)+"'";else Qe="Parse error on line "+(Oe+1)+": Unexpected "+(x==rt?"end of input":"'"+(this.terminals_[x]||x)+"'");this.parseError(Qe,{text:_.match,token:this.terminals_[x]||x,line:_.yylineno,loc:Ue,expected:Fe})}if(O[0]instanceof Array&&O.length>1)throw Error("Parse Error: multiple actions possible at state: "+fe+", token: "+x);switch(O[0]){case 1:if(h.push(x),p.push(_.yytext),i.push(_.yylloc),h.push(O[1]),x=null,!Ye){if(st=_.yyleng,c=_.yytext,Oe=_.yylineno,Ue=_.yylloc,it>0)it--}else x=Ye,Ye=null;break;case 2:if(z=this.productions_[O[1]][1],pe.$=p[p.length-z],pe._$={first_line:i[i.length-(z||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(z||1)].first_column,last_column:i[i.length-1].last_column},ut)pe._$.range=[i[i.length-(z||1)].range[0],i[i.length-1].range[1]];if(Be=this.performAction.apply(pe,[c,st,Oe,me.yy,O[1],p,i].concat(ht)),typeof Be<"u")return Be;if(z)h=h.slice(0,-1*z*2),p=p.slice(0,-1*z),i=i.slice(0,-1*z);h.push(this.productions_[O[1]][0]),p.push(pe.$),i.push(pe._$),at=Le[h[h.length-2]][h[h.length-1]],h.push(at);break;case 3:return!0}}return!0},"parse")},ot=function(){var X={EOF:1,parseError:e(function(o,h){if(this.yy.parser)this.yy.parser.parseError(o,h);else throw Error(o)},"parseError"),setInput:e(function(l,o){if(this.yy=o||this.yy||{},this._input=l,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges)this.yylloc.range=[0,0];return this.offset=0,this},"setInput"),input:e(function(){var l=this._input[0];this.yytext+=l,this.yyleng++,this.offset++,this.match+=l,this.matched+=l;var o=l.match(/(?:\r\n?|\n).*/g);if(o)this.yylineno++,this.yylloc.last_line++;else this.yylloc.last_column++;if(this.options.ranges)this.yylloc.range[1]++;return this._input=this._input.slice(1),l},"input"),unput:e(function(l){var o=l.length,h=l.split(/(?:\r\n?|\n)/g);this._input=l+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-o),this.offset-=o;var n=this.match.split(/(?:\r\n?|\n)/g);if(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),h.length-1)this.yylineno-=h.length-1;var p=this.yylloc.range;if(this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:h?(h.length===n.length?this.yylloc.first_column:0)+n[n.length-h.length].length-h[0].length:this.yylloc.first_column-o},this.options.ranges)this.yylloc.range=[p[0],p[0]+this.yyleng-o];return this.yyleng=this.yytext.length,this},"unput"),more:e(function(){return this._more=!0,this},"more"),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:e(function(l){this.unput(this.match.slice(l))},"less"),pastInput:e(function(){var l=this.matched.substr(0,this.matched.length-this.match.length);return(l.length>20?"...":"")+l.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:e(function(){var l=this.match;if(l.length<20)l+=this._input.substr(0,20-l.length);return(l.substr(0,20)+(l.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:e(function(){var l=this.pastInput(),o=Array(l.length+1).join("-");return l+this.upcomingInput()+`
5
5
  `+o+"^"},"showPosition"),test_match:e(function(l,o){var h,n,p;if(this.options.backtrack_lexer){if(p={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)p.yylloc.range=this.yylloc.range.slice(0)}if(n=l[0].match(/(?:\r\n?|\n).*/g),n)this.yylineno+=n.length;if(this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+l[0].length},this.yytext+=l[0],this.match+=l[0],this.matches=l,this.yyleng=this.yytext.length,this.options.ranges)this.yylloc.range=[this.offset,this.offset+=this.yyleng];if(this._more=!1,this._backtrack=!1,this._input=this._input.slice(l[0].length),this.matched+=l[0],h=this.performAction.call(this,this.yy,this,o,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input)this.done=!1;if(h)return h;else if(this._backtrack){for(var i in p)this[i]=p[i];return!1}return!1},"test_match"),next:e(function(){if(this.done)return this.EOF;if(!this._input)this.done=!0;var l,o,h,n;if(!this._more)this.yytext="",this.match="";var p=this._currentRules();for(var i=0;i<p.length;i++)if(h=this._input.match(this.rules[p[i]]),h&&(!o||h[0].length>o[0].length)){if(o=h,n=i,this.options.backtrack_lexer)if(l=this.test_match(h,p[i]),l!==!1)return l;else if(this._backtrack){o=!1;continue}else return!1;else if(!this.options.flex)break}if(o){if(l=this.test_match(o,p[n]),l!==!1)return l;return!1}if(this._input==="")return this.EOF;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
- `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:e(function(){var o=this.next();if(o)return o;else return this.lex()},"lex"),begin:e(function(o){this.conditionStack.push(o)},"begin"),popState:e(function(){var o=this.conditionStack.length-1;if(o>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:e(function(){if(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1])return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;else return this.conditions.INITIAL.rules},"_currentRules"),topState:e(function(o){if(o=this.conditionStack.length-1-Math.abs(o||0),o>=0)return this.conditionStack[o];else return"INITIAL"},"topState"),pushState:e(function(o){this.begin(o)},"pushState"),stateStackSize:e(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:e(function(o,h,n,p){var i=p;switch(n){case 0:return"title";case 1:return this.begin("acc_title"),9;break;case 2:return this.popState(),"acc_title_value";break;case 3:return this.begin("acc_descr"),11;break;case 4:return this.popState(),"acc_descr_value";break;case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:return 21;case 9:return 22;case 10:return 23;case 11:return 24;case 12:return 5;case 13:break;case 14:break;case 15:break;case 16:return 8;case 17:return 6;case 18:return 27;case 19:return 40;case 20:return 29;case 21:return 32;case 22:return 31;case 23:return 34;case 24:return 36;case 25:return 38;case 26:return 41;case 27:return 42;case 28:return 43;case 29:return 44;case 30:return 45;case 31:return 46;case 32:return 47;case 33:return 48;case 34:return 49;case 35:return 50;case 36:return 51;case 37:return 52;case 38:return 53;case 39:return 54;case 40:return 65;case 41:return 66;case 42:return 67;case 43:return 68;case 44:return 69;case 45:return 70;case 46:return 71;case 47:return 57;case 48:return 59;case 49:return this.begin("style"),77;break;case 50:return 75;case 51:return 81;case 52:return 88;case 53:return"PERCENT";case 54:return 86;case 55:return 84;case 56:break;case 57:this.begin("string");break;case 58:this.popState();break;case 59:return this.begin("style"),72;break;case 60:return this.begin("style"),74;break;case 61:return 61;case 62:return 64;case 63:return 63;case 64:this.begin("string");break;case 65:this.popState();break;case 66:return"qString";case 67:return h.yytext=h.yytext.trim(),89;break;case 68:return 75;case 69:return 80;case 70:return 76}},"anonymous"),rules:[/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::{3})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:style\b)/i,/^(?:\w+)/i,/^(?::)/i,/^(?:;)/i,/^(?:%)/i,/^(?:-)/i,/^(?:#)/i,/^(?: )/i,/^(?:["])/i,/^(?:\n)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^:,\r\n\{\<\>\-\=]*)/i,/^(?:\w+)/i,/^(?:[0-9]+)/i,/^(?:,)/i],conditions:{acc_descr_multiline:{rules:[6,7,68,69,70],inclusive:!1},acc_descr:{rules:[4,68,69,70],inclusive:!1},acc_title:{rules:[2,68,69,70],inclusive:!1},style:{rules:[50,51,52,53,54,55,56,57,58,68,69,70],inclusive:!1},unqString:{rules:[68,69,70],inclusive:!1},token:{rules:[68,69,70],inclusive:!1},string:{rules:[65,66,68,69,70],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,59,60,61,62,63,64,67,68,69,70],inclusive:!0}}};return X}();$e.lexer=ot;function De(){this.yy={}}return e(De,"Parser"),De.prototype=$e,$e.Parser=De,new De}();He.parser=He;var dt=He,pt=class{constructor(){this.relations=[],this.latestRequirement=this.getInitialRequirement(),this.requirements=new Map,this.latestElement=this.getInitialElement(),this.elements=new Map,this.classes=new Map,this.direction="TB",this.RequirementType={REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},this.RiskLevel={LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},this.VerifyType={VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},this.Relationships={CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},this.setAccTitle=S,this.getAccTitle=E,this.setAccDescription=T,this.getAccDescription=A,this.setDiagramTitle=I,this.getDiagramTitle=L,this.getConfig=e(()=>s().requirement,"getConfig"),this.clear(),this.setDirection=this.setDirection.bind(this),this.addRequirement=this.addRequirement.bind(this),this.setNewReqId=this.setNewReqId.bind(this),this.setNewReqRisk=this.setNewReqRisk.bind(this),this.setNewReqText=this.setNewReqText.bind(this),this.setNewReqVerifyMethod=this.setNewReqVerifyMethod.bind(this),this.addElement=this.addElement.bind(this),this.setNewElementType=this.setNewElementType.bind(this),this.setNewElementDocRef=this.setNewElementDocRef.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setCssStyle=this.setCssStyle.bind(this),this.setClass=this.setClass.bind(this),this.defineClass=this.defineClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}static{e(this,"RequirementDB")}getDirection(){return this.direction}setDirection(t){this.direction=t}resetLatestRequirement(){this.latestRequirement=this.getInitialRequirement()}resetLatestElement(){this.latestElement=this.getInitialElement()}getInitialRequirement(){return{requirementId:"",text:"",risk:"",verifyMethod:"",name:"",type:"",cssStyles:[],classes:["default"]}}getInitialElement(){return{name:"",type:"",docRef:"",cssStyles:[],classes:["default"]}}addRequirement(t,d){if(!this.requirements.has(t))this.requirements.set(t,{name:t,type:d,requirementId:this.latestRequirement.requirementId,text:this.latestRequirement.text,risk:this.latestRequirement.risk,verifyMethod:this.latestRequirement.verifyMethod,cssStyles:[],classes:["default"]});return this.resetLatestRequirement(),this.requirements.get(t)}getRequirements(){return this.requirements}setNewReqId(t){if(this.latestRequirement!==void 0)this.latestRequirement.requirementId=t}setNewReqText(t){if(this.latestRequirement!==void 0)this.latestRequirement.text=t}setNewReqRisk(t){if(this.latestRequirement!==void 0)this.latestRequirement.risk=t}setNewReqVerifyMethod(t){if(this.latestRequirement!==void 0)this.latestRequirement.verifyMethod=t}addElement(t){if(!this.elements.has(t))this.elements.set(t,{name:t,type:this.latestElement.type,docRef:this.latestElement.docRef,cssStyles:[],classes:["default"]}),r.info("Added new element: ",t);return this.resetLatestElement(),this.elements.get(t)}getElements(){return this.elements}setNewElementType(t){if(this.latestElement!==void 0)this.latestElement.type=t}setNewElementDocRef(t){if(this.latestElement!==void 0)this.latestElement.docRef=t}addRelationship(t,d,f){this.relations.push({type:t,src:d,dst:f})}getRelationships(){return this.relations}clear(){this.relations=[],this.resetLatestRequirement(),this.requirements=new Map,this.resetLatestElement(),this.elements=new Map,this.classes=new Map,C()}setCssStyle(t,d){for(let f of t){let m=this.requirements.get(f)??this.elements.get(f);if(!d||!m)return;for(let a of d)if(a.includes(","))m.cssStyles.push(...a.split(","));else m.cssStyles.push(a)}}setClass(t,d){for(let f of t){let m=this.requirements.get(f)??this.elements.get(f);if(m)for(let a of d){m.classes.push(a);let u=this.classes.get(a)?.styles;if(u)m.cssStyles.push(...u)}}}defineClass(t,d){for(let f of t){let m=this.classes.get(f);if(m===void 0)m={id:f,styles:[],textStyles:[]},this.classes.set(f,m);if(d)d.forEach(function(a){if(/color/.exec(a)){let u=a.replace("fill","bgFill");m.textStyles.push(u)}m.styles.push(a)});this.requirements.forEach((a)=>{if(a.classes.includes(f))a.cssStyles.push(...d.flatMap((u)=>u.split(",")))}),this.elements.forEach((a)=>{if(a.classes.includes(f))a.cssStyles.push(...d.flatMap((u)=>u.split(",")))})}}getClasses(){return this.classes}getData(){let t=s(),d=[],f=[];for(let a of this.requirements.values()){let u=a;u.id=a.name,u.cssStyles=a.cssStyles,u.cssClasses=a.classes.join(" "),u.shape="requirementBox",u.look=t.look,u.colorIndex=d.length,d.push(u)}for(let a of this.elements.values()){let u=a;u.shape="requirementBox",u.look=t.look,u.id=a.name,u.cssStyles=a.cssStyles,u.cssClasses=a.classes.join(" "),u.colorIndex=d.length,d.push(u)}let m=0;for(let a of this.relations){let u=a.type===this.Relationships.CONTAINS,q={id:`${a.src}-${a.dst}-${m++}`,start:this.requirements.get(a.src)?.name??this.elements.get(a.src)?.name,end:this.requirements.get(a.dst)?.name??this.elements.get(a.dst)?.name,label:`&lt;&lt;${a.type}&gt;&gt;`,classes:"relationshipLine",style:["fill:none",u?"":"stroke-dasharray: 10,7"],labelpos:"c",thickness:"normal",type:"normal",pattern:u?"normal":"dashed",arrowTypeStart:u?"requirement_contains":"",arrowTypeEnd:u?"":"requirement_arrow",look:t.look,labelType:"markdown"};f.push(q)}return{nodes:d,edges:f,other:{},config:t,direction:this.getDirection()}}},Et=e(()=>{let t=b(),{theme:d,themeVariables:f}=t,{bkgColorArray:m,borderColorArray:a}=f;if(!ae(d,a))return"";let u=ie(t.look),q="",w=le(m);for(let R=0;R<ft(a);R++){let V=a[R],v=w?`fill: ${m[R%m.length]};`:"";q+=`
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:e(function(){var o=this.next();if(o)return o;else return this.lex()},"lex"),begin:e(function(o){this.conditionStack.push(o)},"begin"),popState:e(function(){var o=this.conditionStack.length-1;if(o>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:e(function(){if(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1])return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;else return this.conditions.INITIAL.rules},"_currentRules"),topState:e(function(o){if(o=this.conditionStack.length-1-Math.abs(o||0),o>=0)return this.conditionStack[o];else return"INITIAL"},"topState"),pushState:e(function(o){this.begin(o)},"pushState"),stateStackSize:e(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:e(function(o,h,n,p){var i=p;switch(n){case 0:return"title";case 1:return this.begin("acc_title"),9;break;case 2:return this.popState(),"acc_title_value";break;case 3:return this.begin("acc_descr"),11;break;case 4:return this.popState(),"acc_descr_value";break;case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:return 21;case 9:return 22;case 10:return 23;case 11:return 24;case 12:return 5;case 13:break;case 14:break;case 15:break;case 16:return 8;case 17:return 6;case 18:return 27;case 19:return 40;case 20:return 29;case 21:return 32;case 22:return 31;case 23:return 34;case 24:return 36;case 25:return 38;case 26:return 41;case 27:return 42;case 28:return 43;case 29:return 44;case 30:return 45;case 31:return 46;case 32:return 47;case 33:return 48;case 34:return 49;case 35:return 50;case 36:return 51;case 37:return 52;case 38:return 53;case 39:return 54;case 40:return 65;case 41:return 66;case 42:return 67;case 43:return 68;case 44:return 69;case 45:return 70;case 46:return 71;case 47:return 57;case 48:return 59;case 49:return this.begin("style"),77;break;case 50:return 75;case 51:return 81;case 52:return 88;case 53:return"PERCENT";case 54:return 86;case 55:return 84;case 56:break;case 57:this.begin("string");break;case 58:this.popState();break;case 59:return this.begin("style"),72;break;case 60:return this.begin("style"),74;break;case 61:return 61;case 62:return 64;case 63:return 63;case 64:this.begin("string");break;case 65:this.popState();break;case 66:return"qString";case 67:return h.yytext=h.yytext.trim(),89;break;case 68:return 75;case 69:return 80;case 70:return 76}},"anonymous"),rules:[/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::{3})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:style\b)/i,/^(?:\w+)/i,/^(?::)/i,/^(?:;)/i,/^(?:%)/i,/^(?:-)/i,/^(?:#)/i,/^(?: )/i,/^(?:["])/i,/^(?:\n)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^:,\r\n\{\<\>\-\=]*)/i,/^(?:\w+)/i,/^(?:[0-9]+)/i,/^(?:,)/i],conditions:{acc_descr_multiline:{rules:[6,7,68,69,70],inclusive:!1},acc_descr:{rules:[4,68,69,70],inclusive:!1},acc_title:{rules:[2,68,69,70],inclusive:!1},style:{rules:[50,51,52,53,54,55,56,57,58,68,69,70],inclusive:!1},unqString:{rules:[68,69,70],inclusive:!1},token:{rules:[68,69,70],inclusive:!1},string:{rules:[65,66,68,69,70],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,59,60,61,62,63,64,67,68,69,70],inclusive:!0}}};return X}();$e.lexer=ot;function De(){this.yy={}}return e(De,"Parser"),De.prototype=$e,$e.Parser=De,new De}();He.parser=He;var dt=He,pt=class{constructor(){this.relations=[],this.latestRequirement=this.getInitialRequirement(),this.requirements=new Map,this.latestElement=this.getInitialElement(),this.elements=new Map,this.classes=new Map,this.direction="TB",this.RequirementType={REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},this.RiskLevel={LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},this.VerifyType={VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},this.Relationships={CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},this.setAccTitle=S,this.getAccTitle=E,this.setAccDescription=T,this.getAccDescription=A,this.setDiagramTitle=I,this.getDiagramTitle=L,this.getConfig=e(()=>s().requirement,"getConfig"),this.clear(),this.setDirection=this.setDirection.bind(this),this.addRequirement=this.addRequirement.bind(this),this.setNewReqId=this.setNewReqId.bind(this),this.setNewReqRisk=this.setNewReqRisk.bind(this),this.setNewReqText=this.setNewReqText.bind(this),this.setNewReqVerifyMethod=this.setNewReqVerifyMethod.bind(this),this.addElement=this.addElement.bind(this),this.setNewElementType=this.setNewElementType.bind(this),this.setNewElementDocRef=this.setNewElementDocRef.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setCssStyle=this.setCssStyle.bind(this),this.setClass=this.setClass.bind(this),this.defineClass=this.defineClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}static{e(this,"RequirementDB")}getDirection(){return this.direction}setDirection(t){this.direction=t}resetLatestRequirement(){this.latestRequirement=this.getInitialRequirement()}resetLatestElement(){this.latestElement=this.getInitialElement()}getInitialRequirement(){return{requirementId:"",text:"",risk:"",verifyMethod:"",name:"",type:"",cssStyles:[],classes:["default"]}}getInitialElement(){return{name:"",type:"",docRef:"",cssStyles:[],classes:["default"]}}addRequirement(t,d){if(!this.requirements.has(t))this.requirements.set(t,{name:t,type:d,requirementId:this.latestRequirement.requirementId,text:this.latestRequirement.text,risk:this.latestRequirement.risk,verifyMethod:this.latestRequirement.verifyMethod,cssStyles:[],classes:["default"]});return this.resetLatestRequirement(),this.requirements.get(t)}getRequirements(){return this.requirements}setNewReqId(t){if(this.latestRequirement!==void 0)this.latestRequirement.requirementId=t}setNewReqText(t){if(this.latestRequirement!==void 0)this.latestRequirement.text=t}setNewReqRisk(t){if(this.latestRequirement!==void 0)this.latestRequirement.risk=t}setNewReqVerifyMethod(t){if(this.latestRequirement!==void 0)this.latestRequirement.verifyMethod=t}addElement(t){if(!this.elements.has(t))this.elements.set(t,{name:t,type:this.latestElement.type,docRef:this.latestElement.docRef,cssStyles:[],classes:["default"]}),r.info("Added new element: ",t);return this.resetLatestElement(),this.elements.get(t)}getElements(){return this.elements}setNewElementType(t){if(this.latestElement!==void 0)this.latestElement.type=t}setNewElementDocRef(t){if(this.latestElement!==void 0)this.latestElement.docRef=t}addRelationship(t,d,f){this.relations.push({type:t,src:d,dst:f})}getRelationships(){return this.relations}clear(){this.relations=[],this.resetLatestRequirement(),this.requirements=new Map,this.resetLatestElement(),this.elements=new Map,this.classes=new Map,C()}setCssStyle(t,d){for(let f of t){let m=this.requirements.get(f)??this.elements.get(f);if(!d||!m)return;for(let a of d)if(a.includes(","))m.cssStyles.push(...a.split(","));else m.cssStyles.push(a)}}setClass(t,d){for(let f of t){let m=this.requirements.get(f)??this.elements.get(f);if(m)for(let a of d){m.classes.push(a);let u=this.classes.get(a)?.styles;if(u)m.cssStyles.push(...u)}}}defineClass(t,d){for(let f of t){let m=this.classes.get(f);if(m===void 0)m={id:f,styles:[],textStyles:[]},this.classes.set(f,m);if(d)d.forEach(function(a){if(/color/.exec(a)){let u=a.replace("fill","bgFill");m.textStyles.push(u)}m.styles.push(a)});this.requirements.forEach((a)=>{if(a.classes.includes(f))a.cssStyles.push(...d.flatMap((u)=>u.split(",")))}),this.elements.forEach((a)=>{if(a.classes.includes(f))a.cssStyles.push(...d.flatMap((u)=>u.split(",")))})}}getClasses(){return this.classes}getData(){let t=s(),d=[],f=[];for(let a of this.requirements.values()){let u=a;u.id=a.name,u.cssStyles=a.cssStyles,u.cssClasses=a.classes.join(" "),u.shape="requirementBox",u.look=t.look,u.colorIndex=d.length,d.push(u)}for(let a of this.elements.values()){let u=a;u.shape="requirementBox",u.look=t.look,u.id=a.name,u.cssStyles=a.cssStyles,u.cssClasses=a.classes.join(" "),u.colorIndex=d.length,d.push(u)}let m=0;for(let a of this.relations){let u=a.type===this.Relationships.CONTAINS,q={id:`${a.src}-${a.dst}-${m++}`,start:this.requirements.get(a.src)?.name??this.elements.get(a.src)?.name,end:this.requirements.get(a.dst)?.name??this.elements.get(a.dst)?.name,label:`&lt;&lt;${a.type}&gt;&gt;`,classes:"relationshipLine",style:["fill:none",u?"":"stroke-dasharray: 10,7"],labelpos:"c",thickness:"normal",type:"normal",pattern:u?"normal":"dashed",arrowTypeStart:u?"requirement_contains":"",arrowTypeEnd:u?"":"requirement_arrow",look:t.look,labelType:"markdown"};f.push(q)}return{nodes:d,edges:f,other:{},config:t,direction:this.getDirection()}}},Et=e(()=>{let t=b(),{theme:d,themeVariables:f}=t,{bkgColorArray:m,borderColorArray:a}=f;if(!ae(d,a))return"";let u=ie(t.look),q="",w=ce(m);for(let R=0;R<ft(a);R++){let V=a[R],v=w?`fill: ${m[R%m.length]};`:"";q+=`
7
7
 
8
8
  [data-look="${u}"][data-color-id="color-${R}"].node path {
9
9
  stroke: ${V};
@@ -81,4 +81,4 @@ Expecting `+Fe.join(", ")+", got '"+(this.terminals_[x]||x)+"'";else Qe="Parse e
81
81
  background-color: ${a??t.edgeLabelBackground};
82
82
  }
83
83
 
84
- `},"getStyles"),Rt=bt,lt={};Yt(lt,{draw:()=>kt});var kt=e(async function(t,d,f,m){r.info("REF0:"),r.info("Drawing requirement diagram (unified)",d);let{securityLevel:a,state:u,layout:q,look:w}=s(),R=m.db.getData(),V=fe(d,a);R.type=m.type,R.layoutAlgorithm=ge(q),R.nodeSpacing=u?.nodeSpacing??50,R.rankSpacing=u?.rankSpacing??50,R.markers=w==="neo"?["requirement_contains_neo","requirement_arrow_neo"]:["requirement_contains","requirement_arrow"],R.diagramId=d,await he(R,V);let v=8;N.insertTitle(V,"requirementDiagramTitleText",u?.titleTopMargin??25,m.db.getDiagramTitle()),oe(V,v,"requirementDiagram",u?.useMaxWidth??!0)},"draw"),Mt={parser:dt,get db(){return new pt},renderer:lt,styles:Rt};export{Mt as diagram};
84
+ `},"getStyles"),Rt=bt,lt={};Zt(lt,{draw:()=>kt});var kt=e(async function(t,d,f,m){r.info("REF0:"),r.info("Drawing requirement diagram (unified)",d);let{securityLevel:a,state:u,layout:q,look:w}=s(),R=m.db.getData(),V=he(d,a);R.type=m.type,R.layoutAlgorithm=ye(q),R.nodeSpacing=u?.nodeSpacing??50,R.rankSpacing=u?.rankSpacing??50,R.markers=w==="neo"?["requirement_contains_neo","requirement_arrow_neo"]:["requirement_contains","requirement_arrow"],R.diagramId=d,await ge(R,V);let v=8;N.insertTitle(V,"requirementDiagramTitleText",u?.titleTopMargin??25,m.db.getDiagramTitle()),se(V,v,"requirementDiagram",u?.useMaxWidth??!0)},"draw"),Mt={parser:dt,get db(){return new pt},renderer:lt,styles:Rt};export{Mt as diagram};
@@ -1,2 +1,2 @@
1
- import{e}from"./chunk-y0m8hrwz.js";function W(c,i){if(c.accDescr)i.setAccDescription?.(c.accDescr);if(c.accTitle)i.setAccTitle?.(c.accTitle);if(c.title)i.setDiagramTitle?.(c.title)}e(W,"populateCommonDb");
1
+ import{e}from"./chunk-vymqrpm3.js";function W(c,i){if(c.accDescr)i.setAccDescription?.(c.accDescr);if(c.accTitle)i.setAccTitle?.(c.accTitle);if(c.title)i.setDiagramTitle?.(c.title)}e(W,"populateCommonDb");
2
2
  export{W};
@@ -1 +1 @@
1
- import{h,o,i,a,v,t,n,_,l,Z,gt,yt,un,ye,Re,te,ue,Ut,ot,re,tn,ve}from"./chunk-vt40e1kp.js";var Se=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]],pe=l("key-round",Se);function fe(e){let d=[],g="",y,N=!1;for(let u=0;u<e.length;u++){let c=e[u];if(y)if(c===y)y=void 0;else if(c==="\\"&&y==='"'&&u+1<e.length)g+=e[++u];else g+=c;else if(c==='"'||c==="'")y=c,N=!0;else if(c==="\\"&&u+1<e.length)g+=e[++u],N=!0;else if(/\s/.test(c)){if(N||g)d.push(g);g="",N=!1}else g+=c,N=!0}if(N||g)d.push(g);return d}function ie(e){return e.map((d)=>d===""||/[\s"'\\]/.test(d)?`"${d.replace(/(["\\])/g,"\\$1")}"`:d).join(" ")}var ge="size-4 cursor-pointer rounded border-line text-accent accent-accent focus-visible:outline-2 focus-visible:outline-accent",je={connected:{label:"已连接",dot:"bg-success"},idle:{label:"待连接",dot:"bg-faint"},disabled:{label:"已停用",dot:"bg-faint"},failed:{label:"连接失败",dot:"bg-danger"},needs_auth:{label:"需要认证",dot:"bg-warning"}};function X(e){return e.type==="local"?ie(e.command):e.url}function xe({info:e,tools:d=!1}){let g=je[e.status.status];return n("span",{className:"inline-flex shrink-0 items-center gap-1.5 text-xs text-dim",children:[t("span",{"aria-hidden":!0,className:`size-1.5 shrink-0 rounded-full ${g.dot}`}),t("span",{className:d?void 0:"hidden @md/panel:inline",children:g.label}),d&&e.status.status==="connected"&&n("span",{className:"text-faint",children:["· ",e.toolCount," 个工具"]})]})}function Te(e){if(typeof e!=="object"||e===null||!("type"in e))return"any";let d=e.type;if(typeof d==="string")return d;if(Array.isArray(d))return d.filter((g)=>typeof g==="string").join(" | ")||"any";return"any"}function he(e){let{Button:d,CopyButton:g,Dialog:y,StatusChip:N,confirm:u,style:c,useTheme:k}=_();k();let{info:s,connection:I}=e,[m,q]=a(),[G,K]=a(),[S,j]=a(!1),W=s.status.status==="connected",z=s.status.status==="needs_auth",V=s.status.status==="failed",A=s.config.type==="remote"&&Boolean(s.config.oauth);o(()=>{function p(x){if(x&&x!==s.name)return;let J=s.projectID?`?projectID=${encodeURIComponent(s.projectID)}`:"";I.request(`/api/mcp/${encodeURIComponent(s.name)}/connect${J}`,{method:"POST"}).then((ee)=>e.onChanged(ee)).catch(()=>{})}function f(x){if(x.data?.type==="mcp-oauth-success")p(x.data.name)}function D(x){if(x.key==="basalt-mcp-oauth-event"&&x.newValue)try{let J=JSON.parse(x.newValue);p(J.name)}catch(J){}}window.addEventListener("message",f),window.addEventListener("storage",D);let R;if("BroadcastChannel"in window)R=new BroadcastChannel("basalt-mcp-oauth"),R.onmessage=(x)=>{if(x.data?.type==="mcp-oauth-success")p(x.data.name)};return()=>{window.removeEventListener("message",f),window.removeEventListener("storage",D),R?.close()}},[I,s.name,s.projectID,e]),o(()=>{if(s.status.status!=="connected")return;let p=s.projectID?`?projectID=${encodeURIComponent(s.projectID)}`:"";I.request(`/api/mcp/${encodeURIComponent(s.name)}/tools${p}`).then((f)=>{if(Array.isArray(f))q(f),K(void 0)}).catch((f)=>{K(f instanceof Error?f.message:"获取工具失败")})},[I,s.name,s.projectID,s.status.status]);async function O(p){j(!0);try{let f=s.projectID?`?projectID=${encodeURIComponent(s.projectID)}`:"",D=await I.request(`/api/mcp/${encodeURIComponent(s.name)}/${p}${f}`,{method:"POST"});e.onChanged(D)}catch{}finally{j(!1)}}async function U(){j(!0);try{let p=s.projectID?`?projectID=${encodeURIComponent(s.projectID)}`:"",f=s.status.status==="needs_auth"?s.status.authorizationUrl:void 0;if(!f)f=(await I.request(`/api/mcp/${encodeURIComponent(s.name)}/oauth/authorize${p}`,{method:"POST"})).authorizationUrl;if(f)window.open(f,"_blank","width=600,height=700")}catch(p){K(p instanceof Error?p.message:"获取授权链接失败")}finally{j(!1)}}async function Y(){j(!0);try{let p=s.projectID?`?projectID=${encodeURIComponent(s.projectID)}`:"",f=await I.request(`/api/mcp/${encodeURIComponent(s.name)}/oauth/clear${p}`,{method:"POST"});e.onChanged(f)}finally{j(!1)}}async function E(){if(!await u({title:`删除 ${s.name}?`,description:"删除后将断开连接并不再向会话提供其工具。",action:"删除",danger:!0}))return;j(!0);try{let f=s.projectID?`?projectID=${encodeURIComponent(s.projectID)}`:"";await I.request(`/api/mcp/${encodeURIComponent(s.name)}${f}`,{method:"DELETE"}),e.onChanged(),e.onClose()}finally{j(!1)}}let T=s.config,r=X(T),C="error"in s.status?s.status.error:void 0,M=m?.length??s.toolCount??0;return t(y,{open:!0,className:"bg-panel shadow-float",onOpenChange:(p)=>{if(!p&&!S)e.onClose()},title:n("div",{className:"flex flex-wrap items-center gap-3",children:[t("div",{className:"flex size-8 items-center justify-center rounded-[10px] border border-accent/20 bg-accent-soft text-accent",children:T.type==="local"?t(ot,{className:"size-4"}):t(ye,{className:"size-4"})}),t("span",{className:"font-serif text-lg font-semibold tracking-tight text-ink",children:s.name}),W?t(N,{tone:"success",pulse:!0,children:"已连接"}):z?t(N,{tone:"warning",pulse:!0,children:"需要授权"}):V?t(N,{tone:"danger",children:"连接失败"}):s.status.status==="disabled"?t(N,{tone:"neutral",children:"已停用"}):t(N,{tone:"neutral",children:"未连接"})]}),description:n("div",{className:"mt-2 flex min-w-0 flex-wrap items-center gap-1.5 text-xs",children:[n("span",{className:"flex min-w-0 max-w-full items-center gap-1 rounded-lg border border-line bg-raised/60 py-0.5 pr-1 pl-2.5 font-mono text-[11.5px] text-ink",children:[t("span",{className:"min-w-0 truncate",title:r,children:r}),t(g,{text:r,label:"复制地址",size:"icon-xs",className:"shrink-0 text-dim hover:text-ink"})]}),t("span",{className:"rounded-lg border border-line px-2 py-1 text-[11px] leading-none text-dim",children:T.type==="local"?"本地命令":"远程 HTTP"}),A&&n("span",{className:c("control.badgeAccent","gap-1 rounded-lg border border-accent/25 px-2 py-1"),children:[t(Ut,{className:"size-3"}),"OAuth 2.0"]})]}),size:"lg",footer:n("div",{className:"flex w-full items-center justify-between gap-2 max-sm:flex-col",children:[n("div",{className:"flex items-center gap-1 max-sm:w-full",children:[A&&t(d,{type:"button",variant:"ghost",onClick:Y,disabled:S,title:"清除已保存的 OAuth 凭据",children:"清除凭据"}),t(d,{type:"button",variant:"danger-ghost",size:"icon-sm","aria-label":"删除服务器",onClick:E,disabled:S,title:"删除服务器",children:t(re,{className:"size-4"})})]}),n("div",{className:"flex items-center gap-2 max-sm:w-full max-sm:justify-end",children:[t(d,{type:"button",variant:"ghost",onClick:e.onEdit,disabled:S,children:"编辑配置"}),!z&&t(d,{type:"button",variant:"secondary",onClick:()=>O(W?"disconnect":"connect"),disabled:S,children:S?"处理中...":W?"断开连接":"立即连接"}),t(d,{type:"button",variant:"primary",onClick:e.onClose,children:"完成"})]})]}),children:n("div",{className:"space-y-6 pt-1",children:[z&&t("div",{className:"relative overflow-hidden rounded-2xl border border-warning/30 bg-[radial-gradient(120%_140%_at_0%_0%,color-mix(in_oklch,var(--color-warning)_16%,transparent),transparent_65%)] p-5",children:n("div",{className:"flex items-start gap-4 max-sm:flex-col",children:[t("div",{className:"relative flex size-11 shrink-0 items-center justify-center rounded-xl border border-warning/30 bg-panel text-warning shadow-[0_0_28px_-4px_color-mix(in_oklch,var(--color-warning)_55%,transparent)]",children:t(pe,{className:"size-5"})}),n("div",{className:"min-w-0 flex-1 space-y-1.5",children:[t("h4",{className:"text-sm font-semibold text-ink",children:"授权后即可使用此服务器"}),t("p",{className:"text-[13px] leading-relaxed text-dim",children:"该端点要求 OAuth 2.0 身份许可。在浏览器中完成授权后,令牌会自动保存并载入全部工具。"}),C&&t("p",{className:"line-clamp-2 break-words font-mono text-[11.5px] text-faint",title:C,children:C})]}),n(d,{type:"button",variant:"primary",onClick:U,disabled:S,className:"shrink-0",children:[t(un,{className:"mr-1.5 size-3.5"}),S?"正在拉起授权...":"前往授权"]})]})}),V&&n("div",{className:c("callout.base",c("callout.danger"),"gap-3 rounded-2xl p-4"),children:[t(gt,{className:"mt-0.5 size-4 shrink-0 text-danger"}),n("div",{className:"min-w-0 space-y-1",children:[t("h4",{className:"text-sm font-medium text-ink",children:"连接失败"}),t("p",{className:"font-mono text-[11.5px] leading-relaxed break-words text-dim",children:C})]})]}),n("section",{className:"space-y-3",children:[n("div",{className:"flex items-baseline justify-between gap-3 px-0.5",children:[n("h4",{className:"flex items-center gap-2 text-[13px] font-medium text-ink",children:["可用工具",t("span",{className:"rounded-full bg-raised px-1.5 py-0.5 font-mono text-[11px] leading-none text-dim",children:M})]}),t("span",{className:"text-[11.5px] text-faint",children:"对所有会话可用"})]}),G?t("div",{className:c("callout.base",c("callout.danger"),"text-xs leading-relaxed break-words"),children:G}):!W?n("div",{className:c("surface.emptyDashed","gap-2 py-10"),children:[t("div",{className:"flex size-10 items-center justify-center rounded-full bg-raised text-faint",children:t(tn,{className:"size-4.5"})}),t("p",{className:"text-[13px] font-medium text-dim",children:z?"等待授权":"尚未连接"}),t("p",{className:"max-w-xs text-xs leading-relaxed text-faint",children:z?"授权完成后会自动连接并列出工具。":"连接服务器后,这里会列出它提供的全部工具。"})]}):!m?t("div",{role:"status","aria-label":"正在获取工具列表",className:"grid gap-2",children:[0,1,2].map((p)=>n("div",{className:"animate-pulse space-y-2.5 rounded-xl border border-line p-3.5",children:[t("div",{className:"h-3.5 w-32 rounded bg-raised"}),t("div",{className:"h-3 w-4/5 rounded bg-raised/70"})]},p))}):m.length===0?n("div",{className:c("surface.emptyDashed","gap-2 py-10"),children:[t("div",{className:"flex size-10 items-center justify-center rounded-full bg-raised text-faint",children:t(tn,{className:"size-4.5"})}),t("p",{className:"text-[13px] font-medium text-dim",children:"没有可用工具"}),t("p",{className:"max-w-xs text-xs leading-relaxed text-faint",children:"已连接成功,但该服务器没有声明任何工具。"})]}):t("ul",{className:"grid gap-2",children:m.map((p)=>{let f=p.inputSchema?.properties??{},D=p.inputSchema?.required??[],R=Object.entries(f);return n("li",{className:c("surface.subtle","border-line bg-raised/30 p-3.5 transition-colors hover:border-line-strong hover:bg-raised/60"),children:[t("span",{className:"font-mono text-[13px] font-medium break-all text-accent",children:p.name}),p.description&&t("p",{className:"mt-1.5 text-[13px] leading-relaxed break-words text-dim",children:p.description}),R.length>0&&t("div",{className:"mt-3 flex flex-wrap gap-1.5",children:R.map(([x,J])=>n("span",{title:D.includes(x)?"必填参数":"可选参数",className:"inline-flex items-center gap-1 rounded-md border border-line bg-panel px-1.5 py-1 font-mono text-[11px] leading-none",children:[t("span",{className:"text-ink",children:x}),D.includes(x)&&t("span",{className:"text-warning",children:"*"}),t("span",{className:"text-faint",children:Te(J)})]},x))})]},p.name)})})]})]})})}var $e=/^[A-Za-z0-9_-]{1,64}$/;function H(e){return t("span",{className:"truncate text-xs text-faint",children:e.children})}function be(e){let{pairs:d,onChange:g,InputComponent:y}=e,N=(u,c)=>g(d.map((k,s)=>s===u?{...k,...c}:k));return n("div",{className:"space-y-2",children:[n("div",{className:"flex min-h-7 items-center gap-2",children:[t("span",{className:"shrink-0 text-[13px] font-medium text-dim",children:e.label}),t(H,{children:e.tip}),n("button",{type:"button",className:"ml-auto inline-flex h-7 shrink-0 cursor-pointer items-center gap-1 rounded-lg px-2 text-xs font-medium text-dim transition-colors hover:bg-raised hover:text-ink",onClick:()=>g([...d,{key:"",value:"",saved:!1}]),children:[t(Re,{className:"size-3.5"}),"添加"]})]}),d.map((u,c)=>n("div",{className:"flex min-w-0 items-center gap-1.5",children:[t(y,{"aria-label":`${e.keyLabel} ${c+1}`,placeholder:e.keyLabel,value:u.key,readOnly:u.saved,onChange:(k)=>N(c,{key:k.target.value}),className:"min-w-0 flex-[2] font-mono text-xs"}),t(y,{"aria-label":`${e.keyLabel} ${u.key||c+1} 的值`,type:"password",autoComplete:"off",placeholder:u.saved?"已保存,留空保持不变":"值",value:u.value,onChange:(k)=>N(c,{value:k.target.value}),className:"min-w-0 flex-[3] font-mono text-xs"}),t("button",{type:"button","aria-label":`删除 ${u.key||"该项"}`,className:"flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-lg text-faint transition-colors hover:bg-danger/10 hover:text-danger",onClick:()=>g(d.filter((k,s)=>s!==c)),children:t(ve,{className:"size-4"})})]},c))]})}function Ne(e){return Object.keys(e??{}).map((d)=>({key:d,value:"",saved:!0}))}function Ce(e){let{Button:d,Segmented:g,Dialog:y,Form:N,Field:u,Input:c,Switch:k,style:s,useTheme:I}=_();I();let{existing:m}=e,[q,G]=a(m?.config.type??"local"),[K,S]=a(m?.name??""),[j,W]=a(m?.config.type==="local"?ie(m.config.command):""),[z,V]=a(m?.config.type==="remote"?m.config.url:""),[A,O]=a(Ne(m?.config.type==="local"?m.config.environment:void 0)),[U,Y]=a(Ne(m?.config.type==="remote"?m.config.headers:void 0)),E=m?.config.type==="remote"?m.config.oauth:void 0,[T,r]=a(Boolean(E)),[C,M]=a(typeof E==="object"&&E.clientId?E.clientId:""),[p,f]=a(""),[D,R]=a(typeof E==="object"&&E.scope?E.scope:""),[x,J]=a(m?.config.defer??"default"),[ee,we]=a(m?.config.timeout!==void 0?String(m.config.timeout):""),[se,ke]=a(m?.config.defer!==void 0||m?.config.timeout!==void 0),[ce,Q]=a(),[oe,de]=a(!1);async function Ie(b){b.preventDefault(),Q(void 0);let w=K.trim();if(!m&&!$e.test(w)){Q("名称只能包含英文字母、数字、下划线与中划线,长度 1-64");return}if(!m&&e.taken.includes(w)){Q("同名服务器已存在");return}let ne=ee.trim()?Number.parseInt(ee.trim(),10):void 0;if(ne!==void 0&&(!Number.isFinite(ne)||ne<=0)){Q("超时时间须为大于 0 的毫秒数");return}let le;if(q==="local"){let L=fe(j.trim());if(!L.length){Q("请输入启动命令");return}let F={};for(let B of A){let P=B.key.trim();if(!P)continue;if(!B.saved||B.value)F[P]=B.value}le={type:"local",command:L,environment:Object.keys(F).length?F:void 0,enabled:m?m.config.enabled:!0,defer:x==="default"?void 0:x,timeout:ne}}else{let L=z.trim();try{let P=new URL(L);if(P.protocol!=="http:"&&P.protocol!=="https:")throw Error("bad protocol")}catch{Q("请输入合法的 HTTP 或 HTTPS 地址");return}let F={};for(let P of U){let ae=P.key.trim();if(!ae)continue;if(!P.saved||P.value)F[ae]=P.value}let B;if(T){let P=C.trim(),ae=p.trim(),me=D.trim();if(P||ae||me)B={clientId:P||void 0,clientSecret:ae||void 0,scope:me||void 0};else B=!0}else B=!1;le={type:"remote",url:L,headers:Object.keys(F).length?F:void 0,oauth:B,enabled:m?m.config.enabled:!0,defer:x==="default"?void 0:x,timeout:ne}}de(!0);try{let L=m?.name??w,F=m?m.projectID:e.projectID,B=F?`?projectID=${encodeURIComponent(F)}`:"";await e.connection.request(`/api/mcp/${encodeURIComponent(L)}${B}`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(le)}),e.onSaved()}catch(L){Q(L instanceof Error?L.message:"保存失败")}finally{de(!1)}}return t(y,{open:!0,onOpenChange:(b)=>{if(!b&&!oe)e.onClose()},title:m?`编辑 ${m.name}`:"添加 MCP 服务器",size:"lg",footer:n("div",{className:"flex w-full justify-end gap-2.5",children:[t(d,{type:"button",variant:"ghost",onClick:e.onClose,disabled:oe,className:"min-w-20",children:"取消"}),t(d,{type:"submit",form:"mcp-server-form",variant:"primary",disabled:oe,className:"min-w-24",children:oe?"保存中...":"保存"})]}),children:n(N,{id:"mcp-server-form",onSubmit:Ie,children:[t(g,{value:q,onChange:(b)=>G(b),className:"w-full [&>button]:flex-1",options:[{value:"local",label:"本地(标准输入输出)"},{value:"remote",label:"远程(HTTP / SSE)"}]}),!m&&t(u,{label:"名称",aside:t(H,{children:"唯一标识,如 postgres"}),children:(b)=>t(c,{id:b,value:K,onChange:(w)=>S(w.target.value),placeholder:"postgres",className:"font-mono text-xs"})}),q==="local"?n(v,{children:[t(u,{label:"启动命令",aside:t(H,{children:"完整命令及参数"}),children:(b)=>t(c,{id:b,value:j,onChange:(w)=>W(w.target.value),placeholder:"npx -y @modelcontextprotocol/server-postgres ...",className:"font-mono text-xs"})}),t(be,{label:"环境变量",tip:"启动进程时注入",keyLabel:"变量名",pairs:A,onChange:O,InputComponent:c})]}):n(v,{children:[t(u,{label:"服务地址",aside:t(H,{children:"HTTP / HTTPS 端点"}),children:(b)=>t(c,{id:b,value:z,onChange:(w)=>V(w.target.value),placeholder:"https://example.com/mcp",className:"font-mono text-xs"})}),t(be,{label:"请求头",tip:"随每次请求发送",keyLabel:"头字段",pairs:U,onChange:Y,InputComponent:c}),n("div",{className:"flex items-center justify-between gap-4",children:[n("div",{className:"min-w-0",children:[t("span",{className:"block text-[13px] font-medium text-dim",children:"OAuth 2.0 认证"}),t("span",{className:"block truncate text-xs text-faint",children:"自动发现授权端点,使用 PKCE 并刷新令牌"})]}),t(k,{checked:T,onCheckedChange:r,label:"启用 OAuth 2.0"})]}),T&&n(v,{children:[t(u,{label:"Client ID",aside:t(H,{children:"留空自动动态注册(DCR)"}),children:(b)=>t(c,{id:b,value:C,onChange:(w)=>M(w.target.value),placeholder:"留空自动动态注册",className:"font-mono text-xs"})}),t(u,{label:"Client Secret",aside:t(H,{children:"留空保持不变"}),children:(b)=>t(c,{id:b,type:"password",autoComplete:"off",value:p,onChange:(w)=>f(w.target.value),placeholder:"••••••••",className:"font-mono text-xs"})}),t(u,{label:"Scope",aside:t(H,{children:"选填授权范围"}),children:(b)=>t(c,{id:b,value:D,onChange:(w)=>R(w.target.value),placeholder:"repo read:org",className:"font-mono text-xs"})})]})]}),n("div",{className:"space-y-3 border-t border-line/60 pt-3",children:[n("button",{type:"button","aria-expanded":se,className:"flex w-full cursor-pointer items-center gap-1.5 text-[13px] font-medium text-dim transition-colors hover:text-ink",onClick:()=>ke(!se),children:[t(yt,{className:`size-3.5 transition-transform ${se?"rotate-90":""}`}),"高级设置",t("span",{className:"truncate text-xs font-normal text-faint",children:"加载时机、超时"})]}),se&&n("div",{className:"grid grid-cols-2 gap-3 max-sm:grid-cols-1",children:[t(u,{label:"加载时机",aside:t(H,{children:"延迟 = 按需加载"}),children:()=>t(g,{value:x,onChange:(b)=>J(b),className:"w-full [&>button]:flex-1",options:[{value:"default",label:"默认"},{value:"defer",label:"延迟"},{value:"always",label:"常驻"}]})}),t(u,{label:"超时(毫秒)",aside:t(H,{children:"留空用默认"}),children:(b)=>t(c,{id:b,value:ee,onChange:(w)=>we(w.target.value),placeholder:"默认",className:"font-mono text-xs"})})]})]}),ce&&n("div",{role:"alert",className:s("callout.base",s("callout.danger"),"px-3 py-2.5 text-xs"),children:[t(Z,{className:"mt-0.5 size-3.5 shrink-0"}),t("span",{className:"min-w-0 break-words",children:ce})]})]})})}function tt({connection:e}){let{Button:d,Input:g,style:y,useTheme:N}=_();N();let[u,c]=a(""),[k,s]=a(),[I,m]=a(),[q,G]=a(!1),[K,S]=a(),[j,W]=a(!1),z=i(!1),[V,A]=a(),O=i(0),U=h(async()=>{let r=++O.current;G(!0);try{let C=await e.request("/api/mcp");if(r!==O.current)return;s(C),m(void 0)}catch(C){if(r===O.current)m(C instanceof Error?C.message:"读取失败")}finally{if(r===O.current)G(!1)}},[e]);o(()=>(U(),()=>{O.current++}),[U]);async function Y(r,C){if(z.current)return;z.current=!0,W(!0);let M=O.current;try{let p=r.projectID?`?projectID=${encodeURIComponent(r.projectID)}`:"",f=await e.request(`/api/mcp/${encodeURIComponent(r.name)}${p}`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({...r.config,enabled:C})});if(M===O.current)s((D)=>D?.map((R)=>R.name===f.name&&R.projectID===f.projectID?f:R))}finally{z.current=!1,W(!1)}}let E=k?.filter((r)=>`${r.name} ${X(r.config)}`.toLowerCase().includes(u.trim().toLowerCase())),T=k?.find((r)=>r.name===K);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:y("settings.groupTitle"),children:"MCP 服务器"}),t("p",{className:y("settings.groupDesc"),children:"外部工具与数据源管理"})]}),n("div",{className:"flex gap-2",children:[t(d,{variant:"ghost",disabled:q,onClick:U,className:"h-9 px-2.5 text-xs",children:t(te,{className:`size-3.5 ${q?"animate-spin":""}`})}),n(d,{variant:"secondary",onClick:()=>A({}),className:"h-9 px-2.5 text-xs",children:[t(Re,{className:"size-3.5 mr-1"}),"添加服务器"]})]})]}),I&&n("div",{role:"alert",className:y("callout.base",y("callout.danger"),"mb-3 flex-wrap items-center justify-between"),children:[n("p",{className:"min-w-0 flex-1 break-words text-sm text-danger",children:["无法读取 MCP 服务器:",I]}),t(d,{disabled:q,onClick:U,children:"重试"})]}),n("div",{className:"relative mb-3 min-w-0",children:[t(ue,{"aria-hidden":!0,className:"pointer-events-none absolute top-3 left-3 size-4 text-faint"}),t(g,{type:"search","aria-label":"搜索 MCP 服务器",placeholder:"搜索服务器",value:u,onChange:(r)=>c(r.target.value),className:"h-10 min-w-0 pl-9"})]}),t("div",{className:y("settings.groupBox"),children:!k?t("div",{role:"status","aria-label":"正在加载",className:"divide-y divide-line",children:[0,1,2].map((r)=>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"})]},r))}):E?.length===0?t("p",{className:"p-4 text-sm text-dim",children:"没有匹配的 MCP 服务器"}):t("ul",{className:"divide-y divide-line",children:E?.map((r)=>{let C=r.config.enabled===!1,M=r.scope==="file";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 ${C?"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":`查看 ${r.name}`,disabled:M,title:M?"来自项目的 .mcp.json,只读":void 0,onClick:()=>S(r.name),children:[t("span",{"aria-hidden":!0,className:"flex size-9 shrink-0 items-center justify-center rounded-lg bg-raised text-dim",children:r.config.type==="local"?t(ot,{className:"size-4"}):t(ye,{className:"size-4"})}),n("span",{className:"min-w-0 flex-1",children:[t("span",{className:"block truncate text-sm font-medium text-ink",title:r.name,children:r.name}),t("span",{className:"mt-0.5 block truncate font-mono text-xs text-dim",title:X(r.config),children:X(r.config)})]}),t("span",{className:y("control.badge","shrink-0 text-[11px] text-dim"),children:r.scope==="project"?"项目":r.scope==="file"?".mcp.json":"全局"}),t(xe,{info:r})]}),t("span",{className:"relative flex size-10 shrink-0 items-center justify-center",children:!M&&t("input",{type:"checkbox","aria-label":`启用服务器 ${r.name}`,className:ge,disabled:j||q,checked:!C,onChange:(p)=>Y(r,p.target.checked)})})]},r.name)})})})]}),T&&!V&&t(he,{connection:e,info:T,onClose:()=>S(void 0),onEdit:()=>A({info:T}),onChanged:(r)=>r?s((C)=>C?.map((M)=>M.name===r.name?r:M)):U()},`${T.projectID}:${T.name}`),V&&t(Ce,{connection:e,existing:V.info,taken:(k??[]).map((r)=>r.name),onClose:()=>A(void 0),onSaved:()=>{A(void 0),U()}})]})}export{tt as McpSection};
1
+ import{h,o,i,a,v,t,n,_,l,Z,gt,yt,un,ve,Re,te,de,jt,ot,re,tn,oe}from"./chunk-fhnypcrm.js";var Se=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]],fe=l("key-round",Se);function ge(e){let d=[],g="",y,N=!1;for(let u=0;u<e.length;u++){let c=e[u];if(y)if(c===y)y=void 0;else if(c==="\\"&&y==='"'&&u+1<e.length)g+=e[++u];else g+=c;else if(c==='"'||c==="'")y=c,N=!0;else if(c==="\\"&&u+1<e.length)g+=e[++u],N=!0;else if(/\s/.test(c)){if(N||g)d.push(g);g="",N=!1}else g+=c,N=!0}if(N||g)d.push(g);return d}function le(e){return e.map((d)=>d===""||/[\s"'\\]/.test(d)?`"${d.replace(/(["\\])/g,"\\$1")}"`:d).join(" ")}var xe="size-4 cursor-pointer rounded border-line text-accent accent-accent focus-visible:outline-2 focus-visible:outline-accent",je={connected:{label:"已连接",dot:"bg-success"},idle:{label:"待连接",dot:"bg-faint"},disabled:{label:"已停用",dot:"bg-faint"},failed:{label:"连接失败",dot:"bg-danger"},needs_auth:{label:"需要认证",dot:"bg-warning"}};function X(e){return e.type==="local"?le(e.command):e.url}function he({info:e,tools:d=!1}){let g=je[e.status.status];return n("span",{className:"inline-flex shrink-0 items-center gap-1.5 text-xs text-dim",children:[t("span",{"aria-hidden":!0,className:`size-1.5 shrink-0 rounded-full ${g.dot}`}),t("span",{className:d?void 0:"hidden @md/panel:inline",children:g.label}),d&&e.status.status==="connected"&&n("span",{className:"text-faint",children:["· ",e.toolCount," 个工具"]})]})}function Te(e){if(typeof e!=="object"||e===null||!("type"in e))return"any";let d=e.type;if(typeof d==="string")return d;if(Array.isArray(d))return d.filter((g)=>typeof g==="string").join(" | ")||"any";return"any"}function be(e){let{Button:d,CopyButton:g,Dialog:y,StatusChip:N,confirm:u,style:c,useTheme:k}=_();k();let{info:s,connection:I}=e,[m,q]=a(),[G,K]=a(),[S,j]=a(!1),W=s.status.status==="connected",z=s.status.status==="needs_auth",V=s.status.status==="failed",A=s.config.type==="remote"&&Boolean(s.config.oauth);o(()=>{function p(x){if(x&&x!==s.name)return;let J=s.projectID?`?projectID=${encodeURIComponent(s.projectID)}`:"";I.request(`/api/mcp/${encodeURIComponent(s.name)}/connect${J}`,{method:"POST"}).then((ee)=>e.onChanged(ee)).catch(()=>{})}function f(x){if(x.data?.type==="mcp-oauth-success")p(x.data.name)}function D(x){if(x.key==="basalt-mcp-oauth-event"&&x.newValue)try{let J=JSON.parse(x.newValue);p(J.name)}catch(J){}}window.addEventListener("message",f),window.addEventListener("storage",D);let R;if("BroadcastChannel"in window)R=new BroadcastChannel("basalt-mcp-oauth"),R.onmessage=(x)=>{if(x.data?.type==="mcp-oauth-success")p(x.data.name)};return()=>{window.removeEventListener("message",f),window.removeEventListener("storage",D),R?.close()}},[I,s.name,s.projectID,e]),o(()=>{if(s.status.status!=="connected")return;let p=s.projectID?`?projectID=${encodeURIComponent(s.projectID)}`:"";I.request(`/api/mcp/${encodeURIComponent(s.name)}/tools${p}`).then((f)=>{if(Array.isArray(f))q(f),K(void 0)}).catch((f)=>{K(f instanceof Error?f.message:"获取工具失败")})},[I,s.name,s.projectID,s.status.status]);async function O(p){j(!0);try{let f=s.projectID?`?projectID=${encodeURIComponent(s.projectID)}`:"",D=await I.request(`/api/mcp/${encodeURIComponent(s.name)}/${p}${f}`,{method:"POST"});e.onChanged(D)}catch{}finally{j(!1)}}async function U(){j(!0);try{let p=s.projectID?`?projectID=${encodeURIComponent(s.projectID)}`:"",f=s.status.status==="needs_auth"?s.status.authorizationUrl:void 0;if(!f)f=(await I.request(`/api/mcp/${encodeURIComponent(s.name)}/oauth/authorize${p}`,{method:"POST"})).authorizationUrl;if(f)window.open(f,"_blank","width=600,height=700")}catch(p){K(p instanceof Error?p.message:"获取授权链接失败")}finally{j(!1)}}async function Y(){j(!0);try{let p=s.projectID?`?projectID=${encodeURIComponent(s.projectID)}`:"",f=await I.request(`/api/mcp/${encodeURIComponent(s.name)}/oauth/clear${p}`,{method:"POST"});e.onChanged(f)}finally{j(!1)}}async function E(){if(!await u({title:`删除 ${s.name}?`,description:"删除后将断开连接并不再向会话提供其工具。",action:"删除",danger:!0}))return;j(!0);try{let f=s.projectID?`?projectID=${encodeURIComponent(s.projectID)}`:"";await I.request(`/api/mcp/${encodeURIComponent(s.name)}${f}`,{method:"DELETE"}),e.onChanged(),e.onClose()}finally{j(!1)}}let T=s.config,r=X(T),C="error"in s.status?s.status.error:void 0,M=m?.length??s.toolCount??0;return t(y,{open:!0,className:"bg-panel shadow-float",onOpenChange:(p)=>{if(!p&&!S)e.onClose()},title:n("div",{className:"flex flex-wrap items-center gap-3",children:[t("div",{className:"flex size-8 items-center justify-center rounded-[10px] border border-accent/20 bg-accent-soft text-accent",children:T.type==="local"?t(ot,{className:"size-4"}):t(ve,{className:"size-4"})}),t("span",{className:"font-serif text-lg font-semibold tracking-tight text-ink",children:s.name}),W?t(N,{tone:"success",pulse:!0,children:"已连接"}):z?t(N,{tone:"warning",pulse:!0,children:"需要授权"}):V?t(N,{tone:"danger",children:"连接失败"}):s.status.status==="disabled"?t(N,{tone:"neutral",children:"已停用"}):t(N,{tone:"neutral",children:"未连接"})]}),description:n("div",{className:"mt-2 flex min-w-0 flex-wrap items-center gap-1.5 text-xs",children:[n("span",{className:"flex min-w-0 max-w-full items-center gap-1 rounded-lg border border-line bg-raised/60 py-0.5 pr-1 pl-2.5 font-mono text-[11.5px] text-ink",children:[t("span",{className:"min-w-0 truncate",title:r,children:r}),t(g,{text:r,label:"复制地址",size:"icon-xs",className:"shrink-0 text-dim hover:text-ink"})]}),t("span",{className:"rounded-lg border border-line px-2 py-1 text-[11px] leading-none text-dim",children:T.type==="local"?"本地命令":"远程 HTTP"}),A&&n("span",{className:c("control.badgeAccent","gap-1 rounded-lg border border-accent/25 px-2 py-1"),children:[t(jt,{className:"size-3"}),"OAuth 2.0"]})]}),size:"lg",footer:n("div",{className:"flex w-full items-center justify-between gap-2 max-sm:flex-col",children:[n("div",{className:"flex items-center gap-1 max-sm:w-full",children:[A&&t(d,{type:"button",variant:"ghost",onClick:Y,disabled:S,title:"清除已保存的 OAuth 凭据",children:"清除凭据"}),t(d,{type:"button",variant:"danger-ghost",size:"icon-sm","aria-label":"删除服务器",onClick:E,disabled:S,title:"删除服务器",children:t(re,{className:"size-4"})})]}),n("div",{className:"flex items-center gap-2 max-sm:w-full max-sm:justify-end",children:[t(d,{type:"button",variant:"ghost",onClick:e.onEdit,disabled:S,children:"编辑配置"}),!z&&t(d,{type:"button",variant:"secondary",onClick:()=>O(W?"disconnect":"connect"),disabled:S,children:S?"处理中...":W?"断开连接":"立即连接"}),t(d,{type:"button",variant:"primary",onClick:e.onClose,children:"完成"})]})]}),children:n("div",{className:"space-y-6 pt-1",children:[z&&t("div",{className:"relative overflow-hidden rounded-2xl border border-warning/30 bg-[radial-gradient(120%_140%_at_0%_0%,color-mix(in_oklch,var(--color-warning)_16%,transparent),transparent_65%)] p-5",children:n("div",{className:"flex items-start gap-4 max-sm:flex-col",children:[t("div",{className:"relative flex size-11 shrink-0 items-center justify-center rounded-xl border border-warning/30 bg-panel text-warning shadow-[0_0_28px_-4px_color-mix(in_oklch,var(--color-warning)_55%,transparent)]",children:t(fe,{className:"size-5"})}),n("div",{className:"min-w-0 flex-1 space-y-1.5",children:[t("h4",{className:"text-sm font-semibold text-ink",children:"授权后即可使用此服务器"}),t("p",{className:"text-[13px] leading-relaxed text-dim",children:"该端点要求 OAuth 2.0 身份许可。在浏览器中完成授权后,令牌会自动保存并载入全部工具。"}),C&&t("p",{className:"line-clamp-2 break-words font-mono text-[11.5px] text-faint",title:C,children:C})]}),n(d,{type:"button",variant:"primary",onClick:U,disabled:S,className:"shrink-0",children:[t(un,{className:"mr-1.5 size-3.5"}),S?"正在拉起授权...":"前往授权"]})]})}),V&&n("div",{className:c("callout.base",c("callout.danger"),"gap-3 rounded-2xl p-4"),children:[t(gt,{className:"mt-0.5 size-4 shrink-0 text-danger"}),n("div",{className:"min-w-0 space-y-1",children:[t("h4",{className:"text-sm font-medium text-ink",children:"连接失败"}),t("p",{className:"font-mono text-[11.5px] leading-relaxed break-words text-dim",children:C})]})]}),n("section",{className:"space-y-3",children:[n("div",{className:"flex items-baseline justify-between gap-3 px-0.5",children:[n("h4",{className:"flex items-center gap-2 text-[13px] font-medium text-ink",children:["可用工具",t("span",{className:"rounded-full bg-raised px-1.5 py-0.5 font-mono text-[11px] leading-none text-dim",children:M})]}),t("span",{className:"text-[11.5px] text-faint",children:"对所有会话可用"})]}),G?t("div",{className:c("callout.base",c("callout.danger"),"text-xs leading-relaxed break-words"),children:G}):!W?n("div",{className:c("surface.emptyDashed","gap-2 py-10"),children:[t("div",{className:"flex size-10 items-center justify-center rounded-full bg-raised text-faint",children:t(tn,{className:"size-4.5"})}),t("p",{className:"text-[13px] font-medium text-dim",children:z?"等待授权":"尚未连接"}),t("p",{className:"max-w-xs text-xs leading-relaxed text-faint",children:z?"授权完成后会自动连接并列出工具。":"连接服务器后,这里会列出它提供的全部工具。"})]}):!m?t("div",{role:"status","aria-label":"正在获取工具列表",className:"grid gap-2",children:[0,1,2].map((p)=>n("div",{className:"animate-pulse space-y-2.5 rounded-xl border border-line p-3.5",children:[t("div",{className:"h-3.5 w-32 rounded bg-raised"}),t("div",{className:"h-3 w-4/5 rounded bg-raised/70"})]},p))}):m.length===0?n("div",{className:c("surface.emptyDashed","gap-2 py-10"),children:[t("div",{className:"flex size-10 items-center justify-center rounded-full bg-raised text-faint",children:t(tn,{className:"size-4.5"})}),t("p",{className:"text-[13px] font-medium text-dim",children:"没有可用工具"}),t("p",{className:"max-w-xs text-xs leading-relaxed text-faint",children:"已连接成功,但该服务器没有声明任何工具。"})]}):t("ul",{className:"grid gap-2",children:m.map((p)=>{let f=p.inputSchema?.properties??{},D=p.inputSchema?.required??[],R=Object.entries(f);return n("li",{className:c("surface.subtle","border-line bg-raised/30 p-3.5 transition-colors hover:border-line-strong hover:bg-raised/60"),children:[t("span",{className:"font-mono text-[13px] font-medium break-all text-accent",children:p.name}),p.description&&t("p",{className:"mt-1.5 text-[13px] leading-relaxed break-words text-dim",children:p.description}),R.length>0&&t("div",{className:"mt-3 flex flex-wrap gap-1.5",children:R.map(([x,J])=>n("span",{title:D.includes(x)?"必填参数":"可选参数",className:"inline-flex items-center gap-1 rounded-md border border-line bg-panel px-1.5 py-1 font-mono text-[11px] leading-none",children:[t("span",{className:"text-ink",children:x}),D.includes(x)&&t("span",{className:"text-warning",children:"*"}),t("span",{className:"text-faint",children:Te(J)})]},x))})]},p.name)})})]})]})})}var $e=/^[A-Za-z0-9_-]{1,64}$/;function H(e){return t("span",{className:"truncate text-xs text-faint",children:e.children})}function ye(e){let{pairs:d,onChange:g,InputComponent:y}=e,N=(u,c)=>g(d.map((k,s)=>s===u?{...k,...c}:k));return n("div",{className:"space-y-2",children:[n("div",{className:"flex min-h-7 items-center gap-2",children:[t("span",{className:"shrink-0 text-[13px] font-medium text-dim",children:e.label}),t(H,{children:e.tip}),n("button",{type:"button",className:"ml-auto inline-flex h-7 shrink-0 cursor-pointer items-center gap-1 rounded-lg px-2 text-xs font-medium text-dim transition-colors hover:bg-raised hover:text-ink",onClick:()=>g([...d,{key:"",value:"",saved:!1}]),children:[t(Re,{className:"size-3.5"}),"添加"]})]}),d.map((u,c)=>n("div",{className:"flex min-w-0 items-center gap-1.5",children:[t(y,{"aria-label":`${e.keyLabel} ${c+1}`,placeholder:e.keyLabel,value:u.key,readOnly:u.saved,onChange:(k)=>N(c,{key:k.target.value}),className:"min-w-0 flex-[2] font-mono text-xs"}),t(y,{"aria-label":`${e.keyLabel} ${u.key||c+1} 的值`,type:"password",autoComplete:"off",placeholder:u.saved?"已保存,留空保持不变":"值",value:u.value,onChange:(k)=>N(c,{value:k.target.value}),className:"min-w-0 flex-[3] font-mono text-xs"}),t("button",{type:"button","aria-label":`删除 ${u.key||"该项"}`,className:"flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-lg text-faint transition-colors hover:bg-danger/10 hover:text-danger",onClick:()=>g(d.filter((k,s)=>s!==c)),children:t(oe,{className:"size-4"})})]},c))]})}function Ne(e){return Object.keys(e??{}).map((d)=>({key:d,value:"",saved:!0}))}function Ce(e){let{Button:d,Segmented:g,Dialog:y,Form:N,Field:u,Input:c,Switch:k,style:s,useTheme:I}=_();I();let{existing:m}=e,[q,G]=a(m?.config.type??"local"),[K,S]=a(m?.name??""),[j,W]=a(m?.config.type==="local"?le(m.config.command):""),[z,V]=a(m?.config.type==="remote"?m.config.url:""),[A,O]=a(Ne(m?.config.type==="local"?m.config.environment:void 0)),[U,Y]=a(Ne(m?.config.type==="remote"?m.config.headers:void 0)),E=m?.config.type==="remote"?m.config.oauth:void 0,[T,r]=a(Boolean(E)),[C,M]=a(typeof E==="object"&&E.clientId?E.clientId:""),[p,f]=a(""),[D,R]=a(typeof E==="object"&&E.scope?E.scope:""),[x,J]=a(m?.config.defer??"default"),[ee,we]=a(m?.config.timeout!==void 0?String(m.config.timeout):""),[se,ke]=a(m?.config.defer!==void 0||m?.config.timeout!==void 0),[me,Q]=a(),[ie,pe]=a(!1);async function Ie(b){b.preventDefault(),Q(void 0);let w=K.trim();if(!m&&!$e.test(w)){Q("名称只能包含英文字母、数字、下划线与中划线,长度 1-64");return}if(!m&&e.taken.includes(w)){Q("同名服务器已存在");return}let ne=ee.trim()?Number.parseInt(ee.trim(),10):void 0;if(ne!==void 0&&(!Number.isFinite(ne)||ne<=0)){Q("超时时间须为大于 0 的毫秒数");return}let ce;if(q==="local"){let L=ge(j.trim());if(!L.length){Q("请输入启动命令");return}let F={};for(let B of A){let P=B.key.trim();if(!P)continue;if(!B.saved||B.value)F[P]=B.value}ce={type:"local",command:L,environment:Object.keys(F).length?F:void 0,enabled:m?m.config.enabled:!0,defer:x==="default"?void 0:x,timeout:ne}}else{let L=z.trim();try{let P=new URL(L);if(P.protocol!=="http:"&&P.protocol!=="https:")throw Error("bad protocol")}catch{Q("请输入合法的 HTTP 或 HTTPS 地址");return}let F={};for(let P of U){let ae=P.key.trim();if(!ae)continue;if(!P.saved||P.value)F[ae]=P.value}let B;if(T){let P=C.trim(),ae=p.trim(),ue=D.trim();if(P||ae||ue)B={clientId:P||void 0,clientSecret:ae||void 0,scope:ue||void 0};else B=!0}else B=!1;ce={type:"remote",url:L,headers:Object.keys(F).length?F:void 0,oauth:B,enabled:m?m.config.enabled:!0,defer:x==="default"?void 0:x,timeout:ne}}pe(!0);try{let L=m?.name??w,F=m?m.projectID:e.projectID,B=F?`?projectID=${encodeURIComponent(F)}`:"";await e.connection.request(`/api/mcp/${encodeURIComponent(L)}${B}`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(ce)}),e.onSaved()}catch(L){Q(L instanceof Error?L.message:"保存失败")}finally{pe(!1)}}return t(y,{open:!0,onOpenChange:(b)=>{if(!b&&!ie)e.onClose()},title:m?`编辑 ${m.name}`:"添加 MCP 服务器",size:"lg",footer:n("div",{className:"flex w-full justify-end gap-2.5",children:[t(d,{type:"button",variant:"ghost",onClick:e.onClose,disabled:ie,className:"min-w-20",children:"取消"}),t(d,{type:"submit",form:"mcp-server-form",variant:"primary",disabled:ie,className:"min-w-24",children:ie?"保存中...":"保存"})]}),children:n(N,{id:"mcp-server-form",onSubmit:Ie,children:[t(g,{value:q,onChange:(b)=>G(b),className:"w-full [&>button]:flex-1",options:[{value:"local",label:"本地(标准输入输出)"},{value:"remote",label:"远程(HTTP / SSE)"}]}),!m&&t(u,{label:"名称",aside:t(H,{children:"唯一标识,如 postgres"}),children:(b)=>t(c,{id:b,value:K,onChange:(w)=>S(w.target.value),placeholder:"postgres",className:"font-mono text-xs"})}),q==="local"?n(v,{children:[t(u,{label:"启动命令",aside:t(H,{children:"完整命令及参数"}),children:(b)=>t(c,{id:b,value:j,onChange:(w)=>W(w.target.value),placeholder:"npx -y @modelcontextprotocol/server-postgres ...",className:"font-mono text-xs"})}),t(ye,{label:"环境变量",tip:"启动进程时注入",keyLabel:"变量名",pairs:A,onChange:O,InputComponent:c})]}):n(v,{children:[t(u,{label:"服务地址",aside:t(H,{children:"HTTP / HTTPS 端点"}),children:(b)=>t(c,{id:b,value:z,onChange:(w)=>V(w.target.value),placeholder:"https://example.com/mcp",className:"font-mono text-xs"})}),t(ye,{label:"请求头",tip:"随每次请求发送",keyLabel:"头字段",pairs:U,onChange:Y,InputComponent:c}),n("div",{className:"flex items-center justify-between gap-4",children:[n("div",{className:"min-w-0",children:[t("span",{className:"block text-[13px] font-medium text-dim",children:"OAuth 2.0 认证"}),t("span",{className:"block truncate text-xs text-faint",children:"自动发现授权端点,使用 PKCE 并刷新令牌"})]}),t(k,{checked:T,onCheckedChange:r,label:"启用 OAuth 2.0"})]}),T&&n(v,{children:[t(u,{label:"Client ID",aside:t(H,{children:"留空自动动态注册(DCR)"}),children:(b)=>t(c,{id:b,value:C,onChange:(w)=>M(w.target.value),placeholder:"留空自动动态注册",className:"font-mono text-xs"})}),t(u,{label:"Client Secret",aside:t(H,{children:"留空保持不变"}),children:(b)=>t(c,{id:b,type:"password",autoComplete:"off",value:p,onChange:(w)=>f(w.target.value),placeholder:"••••••••",className:"font-mono text-xs"})}),t(u,{label:"Scope",aside:t(H,{children:"选填授权范围"}),children:(b)=>t(c,{id:b,value:D,onChange:(w)=>R(w.target.value),placeholder:"repo read:org",className:"font-mono text-xs"})})]})]}),n("div",{className:"space-y-3 border-t border-line/60 pt-3",children:[n("button",{type:"button","aria-expanded":se,className:"flex w-full cursor-pointer items-center gap-1.5 text-[13px] font-medium text-dim transition-colors hover:text-ink",onClick:()=>ke(!se),children:[t(yt,{className:`size-3.5 transition-transform ${se?"rotate-90":""}`}),"高级设置",t("span",{className:"truncate text-xs font-normal text-faint",children:"加载时机、超时"})]}),se&&n("div",{className:"grid grid-cols-2 gap-3 max-sm:grid-cols-1",children:[t(u,{label:"加载时机",aside:t(H,{children:"延迟 = 按需加载"}),children:()=>t(g,{value:x,onChange:(b)=>J(b),className:"w-full [&>button]:flex-1",options:[{value:"default",label:"默认"},{value:"defer",label:"延迟"},{value:"always",label:"常驻"}]})}),t(u,{label:"超时(毫秒)",aside:t(H,{children:"留空用默认"}),children:(b)=>t(c,{id:b,value:ee,onChange:(w)=>we(w.target.value),placeholder:"默认",className:"font-mono text-xs"})})]})]}),me&&n("div",{role:"alert",className:s("callout.base",s("callout.danger"),"px-3 py-2.5 text-xs"),children:[t(Z,{className:"mt-0.5 size-3.5 shrink-0"}),t("span",{className:"min-w-0 break-words",children:me})]})]})})}function tt({connection:e}){let{Button:d,Input:g,style:y,useTheme:N}=_();N();let[u,c]=a(""),[k,s]=a(),[I,m]=a(),[q,G]=a(!1),[K,S]=a(),[j,W]=a(!1),z=i(!1),[V,A]=a(),O=i(0),U=h(async()=>{let r=++O.current;G(!0);try{let C=await e.request("/api/mcp");if(r!==O.current)return;s(C),m(void 0)}catch(C){if(r===O.current)m(C instanceof Error?C.message:"读取失败")}finally{if(r===O.current)G(!1)}},[e]);o(()=>(U(),()=>{O.current++}),[U]);async function Y(r,C){if(z.current)return;z.current=!0,W(!0);let M=O.current;try{let p=r.projectID?`?projectID=${encodeURIComponent(r.projectID)}`:"",f=await e.request(`/api/mcp/${encodeURIComponent(r.name)}${p}`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({...r.config,enabled:C})});if(M===O.current)s((D)=>D?.map((R)=>R.name===f.name&&R.projectID===f.projectID?f:R))}finally{z.current=!1,W(!1)}}let E=k?.filter((r)=>`${r.name} ${X(r.config)}`.toLowerCase().includes(u.trim().toLowerCase())),T=k?.find((r)=>r.name===K);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:y("settings.groupTitle"),children:"MCP 服务器"}),t("p",{className:y("settings.groupDesc"),children:"外部工具与数据源管理"})]}),n("div",{className:"flex gap-2",children:[t(d,{variant:"ghost",disabled:q,onClick:U,className:"h-9 px-2.5 text-xs",children:t(te,{className:`size-3.5 ${q?"animate-spin":""}`})}),n(d,{variant:"secondary",onClick:()=>A({}),className:"h-9 px-2.5 text-xs",children:[t(Re,{className:"size-3.5 mr-1"}),"添加服务器"]})]})]}),I&&n("div",{role:"alert",className:y("callout.base",y("callout.danger"),"mb-3 flex-wrap items-center justify-between"),children:[n("p",{className:"min-w-0 flex-1 break-words text-sm text-danger",children:["无法读取 MCP 服务器:",I]}),t(d,{disabled:q,onClick:U,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(g,{type:"search","aria-label":"搜索 MCP 服务器",placeholder:"搜索服务器",value:u,onChange:(r)=>c(r.target.value),className:"h-10 min-w-0 pl-9"})]}),t("div",{className:y("settings.groupBox"),children:!k?t("div",{role:"status","aria-label":"正在加载",className:"divide-y divide-line",children:[0,1,2].map((r)=>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"})]},r))}):E?.length===0?t("p",{className:"p-4 text-sm text-dim",children:"没有匹配的 MCP 服务器"}):t("ul",{className:"divide-y divide-line",children:E?.map((r)=>{let C=r.config.enabled===!1,M=r.scope==="file";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 ${C?"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":`查看 ${r.name}`,disabled:M,title:M?"来自项目的 .mcp.json,只读":void 0,onClick:()=>S(r.name),children:[t("span",{"aria-hidden":!0,className:"flex size-9 shrink-0 items-center justify-center rounded-lg bg-raised text-dim",children:r.config.type==="local"?t(ot,{className:"size-4"}):t(ve,{className:"size-4"})}),n("span",{className:"min-w-0 flex-1",children:[t("span",{className:"block truncate text-sm font-medium text-ink",title:r.name,children:r.name}),t("span",{className:"mt-0.5 block truncate font-mono text-xs text-dim",title:X(r.config),children:X(r.config)})]}),t("span",{className:y("control.badge","shrink-0 text-[11px] text-dim"),children:r.scope==="project"?"项目":r.scope==="file"?".mcp.json":"全局"}),t(he,{info:r})]}),t("span",{className:"relative flex size-10 shrink-0 items-center justify-center",children:!M&&t("input",{type:"checkbox","aria-label":`启用服务器 ${r.name}`,className:xe,disabled:j||q,checked:!C,onChange:(p)=>Y(r,p.target.checked)})})]},r.name)})})})]}),T&&!V&&t(be,{connection:e,info:T,onClose:()=>S(void 0),onEdit:()=>A({info:T}),onChanged:(r)=>r?s((C)=>C?.map((M)=>M.name===r.name?r:M)):U()},`${T.projectID}:${T.name}`),V&&t(Ce,{connection:e,existing:V.info,taken:(k??[]).map((r)=>r.name),onClose:()=>A(void 0),onSaved:()=>{A(void 0),U()}})]})}export{tt as McpSection};