dimcode 0.0.6-beta.2 → 0.0.6-beta.21

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 (88) hide show
  1. package/README.md +6 -0
  2. package/assets/gui/200.html +12 -0
  3. package/assets/gui/404.html +12 -0
  4. package/assets/gui/_nuxt/0OuYuFdd.js +1 -0
  5. package/assets/gui/_nuxt/1fcVKlQD.js +1 -0
  6. package/assets/gui/_nuxt/4latAK5N.js +68 -0
  7. package/assets/gui/_nuxt/5J0xJHOV.js +321 -0
  8. package/assets/gui/_nuxt/5tCQ9P9x.js +1 -0
  9. package/assets/gui/_nuxt/B-QRPBiU.js +220 -0
  10. package/assets/gui/_nuxt/B-ocCvqj.js +4 -0
  11. package/assets/gui/_nuxt/B41oyhUX.js +139 -0
  12. package/assets/gui/_nuxt/BAsEomiL.js +61 -0
  13. package/assets/gui/_nuxt/BB51-bYG.js +1 -0
  14. package/assets/gui/_nuxt/BCdCHJrs.js +22 -0
  15. package/assets/gui/_nuxt/BHBA7_9A.js +24 -0
  16. package/assets/gui/_nuxt/BHmwI27Q.js +7 -0
  17. package/assets/gui/_nuxt/BIK3UA9H.js +1 -0
  18. package/assets/gui/_nuxt/BJgShMaj.js +122 -0
  19. package/assets/gui/_nuxt/BMPUUilT.js +60 -0
  20. package/assets/gui/_nuxt/Be9sogz8.js +1 -0
  21. package/assets/gui/_nuxt/BojRNRsE.js +1 -0
  22. package/assets/gui/_nuxt/BtytU9Nc.js +65 -0
  23. package/assets/gui/_nuxt/C2r5gH2d.js +1 -0
  24. package/assets/gui/_nuxt/C5QU6AII.js +267 -0
  25. package/assets/gui/_nuxt/CM2Ru5jE.js +128 -0
  26. package/assets/gui/_nuxt/CR-veSvi.js +1 -0
  27. package/assets/gui/_nuxt/CRt9G2a3.js +1 -0
  28. package/assets/gui/_nuxt/CW5-BTm0.js +1 -0
  29. package/assets/gui/_nuxt/CYh22N6Z.js +15 -0
  30. package/assets/gui/_nuxt/C_nwuZOL.js +17 -0
  31. package/assets/gui/_nuxt/CctfDgzL.js +1 -0
  32. package/assets/gui/_nuxt/CgCvTYUb.js +1 -0
  33. package/assets/gui/_nuxt/CjaZXJmO.js +1 -0
  34. package/assets/gui/_nuxt/CvBv_9Ii.js +43 -0
  35. package/assets/gui/_nuxt/Cx8lgPkP.js +162 -0
  36. package/assets/gui/_nuxt/CxrwCJPS.js +1 -0
  37. package/assets/gui/_nuxt/DCBWnvUv.js +1 -0
  38. package/assets/gui/_nuxt/DDwo0uwT.js +1 -0
  39. package/assets/gui/_nuxt/DGBBJ9Xx.js +1 -0
  40. package/assets/gui/_nuxt/DJ0FGiPu.js +1 -0
  41. package/assets/gui/_nuxt/DLps5vLc.js +1 -0
  42. package/assets/gui/_nuxt/DNM2C9RQ.js +1 -0
  43. package/assets/gui/_nuxt/DQcJWYOz.js +10 -0
  44. package/assets/gui/_nuxt/DYanJOYX.js +1 -0
  45. package/assets/gui/_nuxt/Dgtmkgv6.js +145 -0
  46. package/assets/gui/_nuxt/DhXJpUyf.js +261 -0
  47. package/assets/gui/_nuxt/DhgdKvf3.js +4 -0
  48. package/assets/gui/_nuxt/DlAUqK2U.js +1 -0
  49. package/assets/gui/_nuxt/DoSvhc5U.js +1 -0
  50. package/assets/gui/_nuxt/Dr-RzAtV.js +1 -0
  51. package/assets/gui/_nuxt/DuPuI2eK.js +10 -0
  52. package/assets/gui/_nuxt/DvJDa2y1.js +1 -0
  53. package/assets/gui/_nuxt/FdVDP1dJ.js +350 -0
  54. package/assets/gui/_nuxt/Fi3JZ7gi.js +1 -0
  55. package/assets/gui/_nuxt/FmGx3-yC.js +1 -0
  56. package/assets/gui/_nuxt/Gi6I4Gst.js +1 -0
  57. package/assets/gui/_nuxt/I4qJV1od.js +89 -0
  58. package/assets/gui/_nuxt/JhHowHQY.js +64 -0
  59. package/assets/gui/_nuxt/QrFbBF0x.js +36 -0
  60. package/assets/gui/_nuxt/VvxifOG2.js +250 -0
  61. package/assets/gui/_nuxt/WbTodJZi.js +2 -0
  62. package/assets/gui/_nuxt/XbL3y5x-.js +261 -0
  63. package/assets/gui/_nuxt/a4I2nS0P.js +165 -0
  64. package/assets/gui/_nuxt/builds/latest.json +1 -0
  65. package/assets/gui/_nuxt/builds/meta/61e794b6-fdf7-4843-93ff-0e0358069cb4.json +1 -0
  66. package/assets/gui/_nuxt/eM4IBQGT.js +1 -0
  67. package/assets/gui/_nuxt/entry.DKEE1mdx.css +1 -0
  68. package/assets/gui/_nuxt/error-404.BAwq3L4-.css +1 -0
  69. package/assets/gui/_nuxt/error-500.DFXMopWe.css +1 -0
  70. package/assets/gui/_nuxt/fGWXVeDl.js +7 -0
  71. package/assets/gui/_nuxt/gw8YJBUN.js +1 -0
  72. package/assets/gui/_nuxt/index.CeD9Flb2.css +1 -0
  73. package/assets/gui/_nuxt/m1p94B0o.js +24 -0
  74. package/assets/gui/_nuxt/moIhOSp_.js +30 -0
  75. package/assets/gui/_nuxt/waGmH_zw.js +1 -0
  76. package/assets/gui/_nuxt/yG4UzpsV.js +1 -0
  77. package/assets/gui/_nuxt/zPZrJS7V.js +1 -0
  78. package/assets/gui/favicon.ico +0 -0
  79. package/assets/gui/index.html +12 -0
  80. package/assets/gui/robots.txt +2 -0
  81. package/dist/cli.mjs +1278 -970
  82. package/dist/models/aihubmix.json +19601 -0
  83. package/dist/models/openrouter.json +7848 -0
  84. package/dist/models/siliconflow-com.json +2130 -0
  85. package/dist/models/siliconflow.json +3560 -0
  86. package/dist/models/zenmux.json +2337 -0
  87. package/package.json +13 -7
  88. package/scripts/postinstall.mjs +3 -1
@@ -0,0 +1 @@
1
+ import{b as Ve,G as g,i as m,v as E}from"./FmGx3-yC.js";import{i as z,c as C,k as Ye,o as $e,p as ve,q as pe,t as De,u as we,v as qe,w as be,d as V,x as We,b as ze,y as Xe,n as f,m as I,r as B}from"./1fcVKlQD.js";import{f as O,b as me,a as He,c as Ue,m as w,d as P}from"./BIK3UA9H.js";import{aZ as M,bw as Ze,bx as Je,b4 as ge,by as S,aQ as ye,bp as Ke,aD as Qe,bu as en,bz as nn,aF as xe,bt as rn,b3 as Ee,aE as ke,aX as tn,b6 as an,bA as X}from"./VvxifOG2.js";var on=/\s/;function un(e){for(var n=e.length;n--&&on.test(e.charAt(n)););return n}var dn=/^\s+/;function sn(e){return e&&e.slice(0,un(e)+1).replace(dn,"")}var re=NaN,fn=/^[-+]0x[0-9a-f]+$/i,cn=/^0b[01]+$/i,ln=/^0o[0-7]+$/i,hn=parseInt;function vn(e){if(typeof e=="number")return e;if(z(e))return re;if(M(e)){var n=typeof e.valueOf=="function"?e.valueOf():e;e=M(n)?n+"":n}if(typeof e!="string")return e===0?e:+e;e=sn(e);var r=cn.test(e);return r||ln.test(e)?hn(e.slice(2),r?2:8):fn.test(e)?re:+e}var te=1/0,pn=17976931348623157e292;function T(e){if(!e)return e===0?e:0;if(e=vn(e),e===te||e===-te){var n=e<0?-1:1;return n*pn}return e===e?e:0}function wn(e){var n=T(e),r=n%1;return n===n?r?n-r:n:0}function bn(e){return Ze(Je(e,void 0,O),e+"")}var mn=1,gn=4;function yn(e){return Ve(e,mn|gn)}var Oe=Object.prototype,xn=Oe.hasOwnProperty,En=ge(function(e,n){e=Object(e);var r=-1,t=n.length,i=t>2?n[2]:void 0;for(i&&S(n[0],n[1],i)&&(t=1);++r<t;)for(var o=n[r],a=ye(o),u=-1,d=a.length;++u<d;){var s=a[u],c=e[s];(c===void 0||Ke(c,Oe[s])&&!xn.call(e,s))&&(e[s]=o[s])}return e});function F(e){var n=e==null?0:e.length;return n?e[n-1]:void 0}function kn(e){return function(n,r,t){var i=Object(n);if(!Qe(n)){var o=C(r);n=Ye(n),r=function(u){return o(i[u],u,i)}}var a=e(n,r,t);return a>-1?i[o?n[a]:a]:void 0}}var On=Math.max;function Nn(e,n,r){var t=e==null?0:e.length;if(!t)return-1;var i=r==null?0:wn(r);return i<0&&(i=On(t+i,0)),$e(e,C(n),i)}var U=kn(Nn);function Ln(e,n){return e==null?e:en(e,ve(n),ye)}function Pn(e,n){return e&&pe(e,ve(n))}function _n(e,n){return e>n}var Cn=Object.prototype,In=Cn.hasOwnProperty;function Rn(e,n){return e!=null&&In.call(e,n)}function Ne(e,n){return e!=null&&De(e,n,Rn)}function j(e,n){var r={};return n=C(n),pe(e,function(t,i,o){nn(r,i,n(t,i,o))}),r}function y(e){return e&&e.length?me(e,xe,_n):void 0}function Z(e,n){return e&&e.length?me(e,C(n),He):void 0}function Tn(e,n,r,t){if(!M(e))return e;n=we(n,e);for(var i=-1,o=n.length,a=o-1,u=e;u!=null&&++i<o;){var d=qe(n[i]),s=r;if(d==="__proto__"||d==="constructor"||d==="prototype")return e;if(i!=a){var c=u[d];s=void 0,s===void 0&&(s=M(c)?c:rn(n[i+1])?[]:{})}Ee(u,d,s),u=u[d]}return e}function Mn(e,n,r){for(var t=-1,i=n.length,o={};++t<i;){var a=n[t],u=be(e,a);r(u,a)&&Tn(o,we(a,e),u)}return o}function Sn(e,n){var r=e.length;for(e.sort(n);r--;)e[r]=e[r].value;return e}function Fn(e,n){if(e!==n){var r=e!==void 0,t=e===null,i=e===e,o=z(e),a=n!==void 0,u=n===null,d=n===n,s=z(n);if(!u&&!s&&!o&&e>n||o&&a&&d&&!u&&!s||t&&a&&d||!r&&d||!i)return 1;if(!t&&!o&&!s&&e<n||s&&r&&i&&!t&&!o||u&&r&&i||!a&&i||!d)return-1}return 0}function An(e,n,r){for(var t=-1,i=e.criteria,o=n.criteria,a=i.length,u=r.length;++t<a;){var d=Fn(i[t],o[t]);if(d){if(t>=u)return d;var s=r[t];return d*(s=="desc"?-1:1)}}return e.index-n.index}function Bn(e,n,r){n.length?n=V(n,function(o){return ke(o)?function(a){return be(a,o.length===1?o[0]:o)}:o}):n=[xe];var t=-1;n=V(n,tn(C));var i=Ue(e,function(o,a,u){var d=V(n,function(s){return s(o)});return{criteria:d,index:++t,value:o}});return Sn(i,function(o,a){return An(o,a,r)})}function jn(e,n){return Mn(e,n,function(r,t){return We(e,t)})}var A=bn(function(e,n){return e==null?{}:jn(e,n)}),Gn=Math.ceil,Vn=Math.max;function Yn(e,n,r,t){for(var i=-1,o=Vn(Gn((n-e)/(r||1)),0),a=Array(o);o--;)a[++i]=e,e+=r;return a}function $n(e){return function(n,r,t){return t&&typeof t!="number"&&S(n,r,t)&&(r=t=void 0),n=T(n),r===void 0?(r=n,n=0):r=T(r),t=t===void 0?n<r?1:-1:T(t),Yn(n,r,t)}}var k=$n(),R=ge(function(e,n){if(e==null)return[];var r=n.length;return r>1&&S(e,n[0],n[1])?n=[]:r>2&&S(n[0],n[1],n[2])&&(n=[n[0]]),Bn(e,ze(n),[])}),Dn=0;function J(e){var n=++Dn;return Xe(e)+n}function qn(e,n,r){for(var t=-1,i=e.length,o=n.length,a={};++t<i;){var u=t<o?n[t]:void 0;r(a,e[t],u)}return a}function Wn(e,n){return qn(e||[],n||[],Ee)}class zn{constructor(){var n={};n._next=n._prev=n,this._sentinel=n}dequeue(){var n=this._sentinel,r=n._prev;if(r!==n)return ie(r),r}enqueue(n){var r=this._sentinel;n._prev&&n._next&&ie(n),n._next=r._next,r._next._prev=n,r._next=n,n._prev=r}toString(){for(var n=[],r=this._sentinel,t=r._prev;t!==r;)n.push(JSON.stringify(t,Xn)),t=t._prev;return"["+n.join(", ")+"]"}}function ie(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function Xn(e,n){if(e!=="_next"&&e!=="_prev")return n}var Hn=an(1);function Un(e,n){if(e.nodeCount()<=1)return[];var r=Jn(e,n||Hn),t=Zn(r.graph,r.buckets,r.zeroIdx);return O(w(t,function(i){return e.outEdges(i.v,i.w)}))}function Zn(e,n,r){for(var t=[],i=n[n.length-1],o=n[0],a;e.nodeCount();){for(;a=o.dequeue();)Y(e,n,r,a);for(;a=i.dequeue();)Y(e,n,r,a);if(e.nodeCount()){for(var u=n.length-2;u>0;--u)if(a=n[u].dequeue(),a){t=t.concat(Y(e,n,r,a,!0));break}}}return t}function Y(e,n,r,t,i){var o=i?[]:void 0;return f(e.inEdges(t.v),function(a){var u=e.edge(a),d=e.node(a.v);i&&o.push({v:a.v,w:a.w}),d.out-=u,H(n,r,d)}),f(e.outEdges(t.v),function(a){var u=e.edge(a),d=a.w,s=e.node(d);s.in-=u,H(n,r,s)}),e.removeNode(t.v),o}function Jn(e,n){var r=new g,t=0,i=0;f(e.nodes(),function(u){r.setNode(u,{v:u,in:0,out:0})}),f(e.edges(),function(u){var d=r.edge(u.v,u.w)||0,s=n(u),c=d+s;r.setEdge(u.v,u.w,c),i=Math.max(i,r.node(u.v).out+=s),t=Math.max(t,r.node(u.w).in+=s)});var o=k(i+t+3).map(function(){return new zn}),a=t+1;return f(r.nodes(),function(u){H(o,a,r.node(u))}),{graph:r,buckets:o,zeroIdx:a}}function H(e,n,r){r.out?r.in?e[r.out-r.in+n].enqueue(r):e[e.length-1].enqueue(r):e[0].enqueue(r)}function Kn(e){var n=e.graph().acyclicer==="greedy"?Un(e,r(e)):Qn(e);f(n,function(t){var i=e.edge(t);e.removeEdge(t),i.forwardName=t.name,i.reversed=!0,e.setEdge(t.w,t.v,i,J("rev"))});function r(t){return function(i){return t.edge(i).weight}}}function Qn(e){var n=[],r={},t={};function i(o){Object.prototype.hasOwnProperty.call(t,o)||(t[o]=!0,r[o]=!0,f(e.outEdges(o),function(a){Object.prototype.hasOwnProperty.call(r,a.w)?n.push(a):i(a.w)}),delete r[o])}return f(e.nodes(),i),n}function er(e){f(e.edges(),function(n){var r=e.edge(n);if(r.reversed){e.removeEdge(n);var t=r.forwardName;delete r.reversed,delete r.forwardName,e.setEdge(n.w,n.v,r,t)}})}function N(e,n,r,t){var i;do i=J(t);while(e.hasNode(i));return r.dummy=n,e.setNode(i,r),i}function nr(e){var n=new g().setGraph(e.graph());return f(e.nodes(),function(r){n.setNode(r,e.node(r))}),f(e.edges(),function(r){var t=n.edge(r.v,r.w)||{weight:0,minlen:1},i=e.edge(r);n.setEdge(r.v,r.w,{weight:t.weight+i.weight,minlen:Math.max(t.minlen,i.minlen)})}),n}function Le(e){var n=new g({multigraph:e.isMultigraph()}).setGraph(e.graph());return f(e.nodes(),function(r){e.children(r).length||n.setNode(r,e.node(r))}),f(e.edges(),function(r){n.setEdge(r,e.edge(r))}),n}function ae(e,n){var r=e.x,t=e.y,i=n.x-r,o=n.y-t,a=e.width/2,u=e.height/2;if(!i&&!o)throw new Error("Not possible to find intersection inside of the rectangle");var d,s;return Math.abs(o)*a>Math.abs(i)*u?(o<0&&(u=-u),d=u*i/o,s=u):(i<0&&(a=-a),d=a,s=a*o/i),{x:r+d,y:t+s}}function G(e){var n=w(k(Pe(e)+1),function(){return[]});return f(e.nodes(),function(r){var t=e.node(r),i=t.rank;m(i)||(n[i][t.order]=r)}),n}function rr(e){var n=P(w(e.nodes(),function(r){return e.node(r).rank}));f(e.nodes(),function(r){var t=e.node(r);Ne(t,"rank")&&(t.rank-=n)})}function tr(e){var n=P(w(e.nodes(),function(o){return e.node(o).rank})),r=[];f(e.nodes(),function(o){var a=e.node(o).rank-n;r[a]||(r[a]=[]),r[a].push(o)});var t=0,i=e.graph().nodeRankFactor;f(r,function(o,a){m(o)&&a%i!==0?--t:t&&f(o,function(u){e.node(u).rank+=t})})}function oe(e,n,r,t){var i={width:0,height:0};return arguments.length>=4&&(i.rank=r,i.order=t),N(e,"border",i,n)}function Pe(e){return y(w(e.nodes(),function(n){var r=e.node(n).rank;if(!m(r))return r}))}function ir(e,n){var r={lhs:[],rhs:[]};return f(e,function(t){n(t)?r.lhs.push(t):r.rhs.push(t)}),r}function ar(e,n){return n()}function or(e){function n(r){var t=e.children(r),i=e.node(r);if(t.length&&f(t,n),Object.prototype.hasOwnProperty.call(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var o=i.minRank,a=i.maxRank+1;o<a;++o)ue(e,"borderLeft","_bl",r,i,o),ue(e,"borderRight","_br",r,i,o)}}f(e.children(),n)}function ue(e,n,r,t,i,o){var a={width:0,height:0,rank:o,borderType:n},u=i[n][o-1],d=N(e,"border",a,r);i[n][o]=d,e.setParent(d,t),u&&e.setEdge(u,d,{weight:1})}function ur(e){var n=e.graph().rankdir.toLowerCase();(n==="lr"||n==="rl")&&_e(e)}function dr(e){var n=e.graph().rankdir.toLowerCase();(n==="bt"||n==="rl")&&sr(e),(n==="lr"||n==="rl")&&(fr(e),_e(e))}function _e(e){f(e.nodes(),function(n){de(e.node(n))}),f(e.edges(),function(n){de(e.edge(n))})}function de(e){var n=e.width;e.width=e.height,e.height=n}function sr(e){f(e.nodes(),function(n){$(e.node(n))}),f(e.edges(),function(n){var r=e.edge(n);f(r.points,$),Object.prototype.hasOwnProperty.call(r,"y")&&$(r)})}function $(e){e.y=-e.y}function fr(e){f(e.nodes(),function(n){D(e.node(n))}),f(e.edges(),function(n){var r=e.edge(n);f(r.points,D),Object.prototype.hasOwnProperty.call(r,"x")&&D(r)})}function D(e){var n=e.x;e.x=e.y,e.y=n}function cr(e){e.graph().dummyChains=[],f(e.edges(),function(n){lr(e,n)})}function lr(e,n){var r=n.v,t=e.node(r).rank,i=n.w,o=e.node(i).rank,a=n.name,u=e.edge(n),d=u.labelRank;if(o!==t+1){e.removeEdge(n);var s=void 0,c,l;for(l=0,++t;t<o;++l,++t)u.points=[],s={width:0,height:0,edgeLabel:u,edgeObj:n,rank:t},c=N(e,"edge",s,"_d"),t===d&&(s.width=u.width,s.height=u.height,s.dummy="edge-label",s.labelpos=u.labelpos),e.setEdge(r,c,{weight:u.weight},a),l===0&&e.graph().dummyChains.push(c),r=c;e.setEdge(r,i,{weight:u.weight},a)}}function hr(e){f(e.graph().dummyChains,function(n){var r=e.node(n),t=r.edgeLabel,i;for(e.setEdge(r.edgeObj,t);r.dummy;)i=e.successors(n)[0],e.removeNode(n),t.points.push({x:r.x,y:r.y}),r.dummy==="edge-label"&&(t.x=r.x,t.y=r.y,t.width=r.width,t.height=r.height),n=i,r=e.node(n)})}function K(e){var n={};function r(t){var i=e.node(t);if(Object.prototype.hasOwnProperty.call(n,t))return i.rank;n[t]=!0;var o=P(w(e.outEdges(t),function(a){return r(a.w)-e.edge(a).minlen}));return(o===Number.POSITIVE_INFINITY||o===void 0||o===null)&&(o=0),i.rank=o}f(e.sources(),r)}function _(e,n){return e.node(n.w).rank-e.node(n.v).rank-e.edge(n).minlen}function Ce(e){var n=new g({directed:!1}),r=e.nodes()[0],t=e.nodeCount();n.setNode(r,{});for(var i,o;vr(n,e)<t;)i=pr(n,e),o=n.hasNode(i.v)?_(e,i):-_(e,i),wr(n,e,o);return n}function vr(e,n){function r(t){f(n.nodeEdges(t),function(i){var o=i.v,a=t===o?i.w:o;!e.hasNode(a)&&!_(n,i)&&(e.setNode(a,{}),e.setEdge(t,a,{}),r(a))})}return f(e.nodes(),r),e.nodeCount()}function pr(e,n){return Z(n.edges(),function(r){if(e.hasNode(r.v)!==e.hasNode(r.w))return _(n,r)})}function wr(e,n,r){f(e.nodes(),function(t){n.node(t).rank+=r})}function br(){}br.prototype=new Error;function Ie(e,n,r){ke(n)||(n=[n]);var t=(e.isDirected()?e.successors:e.neighbors).bind(e),i=[],o={};return f(n,function(a){if(!e.hasNode(a))throw new Error("Graph does not have node: "+a);Re(e,a,r==="post",o,t,i)}),i}function Re(e,n,r,t,i,o){Object.prototype.hasOwnProperty.call(t,n)||(t[n]=!0,r||o.push(n),f(i(n),function(a){Re(e,a,r,t,i,o)}),r&&o.push(n))}function mr(e,n){return Ie(e,n,"post")}function gr(e,n){return Ie(e,n,"pre")}x.initLowLimValues=ee;x.initCutValues=Q;x.calcCutValue=Te;x.leaveEdge=Se;x.enterEdge=Fe;x.exchangeEdges=Ae;function x(e){e=nr(e),K(e);var n=Ce(e);ee(n),Q(n,e);for(var r,t;r=Se(n);)t=Fe(n,e,r),Ae(n,e,r,t)}function Q(e,n){var r=mr(e,e.nodes());r=r.slice(0,r.length-1),f(r,function(t){yr(e,n,t)})}function yr(e,n,r){var t=e.node(r),i=t.parent;e.edge(r,i).cutvalue=Te(e,n,r)}function Te(e,n,r){var t=e.node(r),i=t.parent,o=!0,a=n.edge(r,i),u=0;return a||(o=!1,a=n.edge(i,r)),u=a.weight,f(n.nodeEdges(r),function(d){var s=d.v===r,c=s?d.w:d.v;if(c!==i){var l=s===o,h=n.edge(d).weight;if(u+=l?h:-h,Er(e,r,c)){var v=e.edge(r,c).cutvalue;u+=l?-v:v}}}),u}function ee(e,n){arguments.length<2&&(n=e.nodes()[0]),Me(e,{},1,n)}function Me(e,n,r,t,i){var o=r,a=e.node(t);return n[t]=!0,f(e.neighbors(t),function(u){Object.prototype.hasOwnProperty.call(n,u)||(r=Me(e,n,r,u,t))}),a.low=o,a.lim=r++,i?a.parent=i:delete a.parent,r}function Se(e){return U(e.edges(),function(n){return e.edge(n).cutvalue<0})}function Fe(e,n,r){var t=r.v,i=r.w;n.hasEdge(t,i)||(t=r.w,i=r.v);var o=e.node(t),a=e.node(i),u=o,d=!1;o.lim>a.lim&&(u=a,d=!0);var s=I(n.edges(),function(c){return d===se(e,e.node(c.v),u)&&d!==se(e,e.node(c.w),u)});return Z(s,function(c){return _(n,c)})}function Ae(e,n,r,t){var i=r.v,o=r.w;e.removeEdge(i,o),e.setEdge(t.v,t.w,{}),ee(e),Q(e,n),xr(e,n)}function xr(e,n){var r=U(e.nodes(),function(i){return!n.node(i).parent}),t=gr(e,r);t=t.slice(1),f(t,function(i){var o=e.node(i).parent,a=n.edge(i,o),u=!1;a||(a=n.edge(o,i),u=!0),n.node(i).rank=n.node(o).rank+(u?a.minlen:-a.minlen)})}function Er(e,n,r){return e.hasEdge(n,r)}function se(e,n,r){return r.low<=n.lim&&n.lim<=r.lim}function kr(e){switch(e.graph().ranker){case"network-simplex":fe(e);break;case"tight-tree":Nr(e);break;case"longest-path":Or(e);break;default:fe(e)}}var Or=K;function Nr(e){K(e),Ce(e)}function fe(e){x(e)}function Lr(e){var n=N(e,"root",{},"_root"),r=Pr(e),t=y(E(r))-1,i=2*t+1;e.graph().nestingRoot=n,f(e.edges(),function(a){e.edge(a).minlen*=i});var o=_r(e)+1;f(e.children(),function(a){Be(e,n,i,o,t,r,a)}),e.graph().nodeRankFactor=i}function Be(e,n,r,t,i,o,a){var u=e.children(a);if(!u.length){a!==n&&e.setEdge(n,a,{weight:0,minlen:r});return}var d=oe(e,"_bt"),s=oe(e,"_bb"),c=e.node(a);e.setParent(d,a),c.borderTop=d,e.setParent(s,a),c.borderBottom=s,f(u,function(l){Be(e,n,r,t,i,o,l);var h=e.node(l),v=h.borderTop?h.borderTop:l,p=h.borderBottom?h.borderBottom:l,b=h.borderTop?t:2*t,L=v!==p?1:i-o[a]+1;e.setEdge(d,v,{weight:b,minlen:L,nestingEdge:!0}),e.setEdge(p,s,{weight:b,minlen:L,nestingEdge:!0})}),e.parent(a)||e.setEdge(n,d,{weight:0,minlen:i+o[a]})}function Pr(e){var n={};function r(t,i){var o=e.children(t);o&&o.length&&f(o,function(a){r(a,i+1)}),n[t]=i}return f(e.children(),function(t){r(t,1)}),n}function _r(e){return B(e.edges(),function(n,r){return n+e.edge(r).weight},0)}function Cr(e){var n=e.graph();e.removeNode(n.nestingRoot),delete n.nestingRoot,f(e.edges(),function(r){var t=e.edge(r);t.nestingEdge&&e.removeEdge(r)})}function Ir(e,n,r){var t={},i;f(r,function(o){for(var a=e.parent(o),u,d;a;){if(u=e.parent(a),u?(d=t[u],t[u]=a):(d=i,i=a),d&&d!==a){n.setEdge(d,a);return}a=u}})}function Rr(e,n,r){var t=Tr(e),i=new g({compound:!0}).setGraph({root:t}).setDefaultNodeLabel(function(o){return e.node(o)});return f(e.nodes(),function(o){var a=e.node(o),u=e.parent(o);(a.rank===n||a.minRank<=n&&n<=a.maxRank)&&(i.setNode(o),i.setParent(o,u||t),f(e[r](o),function(d){var s=d.v===o?d.w:d.v,c=i.edge(s,o),l=m(c)?0:c.weight;i.setEdge(s,o,{weight:e.edge(d).weight+l})}),Object.prototype.hasOwnProperty.call(a,"minRank")&&i.setNode(o,{borderLeft:a.borderLeft[n],borderRight:a.borderRight[n]}))}),i}function Tr(e){for(var n;e.hasNode(n=J("_root")););return n}function Mr(e,n){for(var r=0,t=1;t<n.length;++t)r+=Sr(e,n[t-1],n[t]);return r}function Sr(e,n,r){for(var t=Wn(r,w(r,function(s,c){return c})),i=O(w(n,function(s){return R(w(e.outEdges(s),function(c){return{pos:t[c.w],weight:e.edge(c).weight}}),"pos")})),o=1;o<r.length;)o<<=1;var a=2*o-1;o-=1;var u=w(new Array(a),function(){return 0}),d=0;return f(i.forEach(function(s){var c=s.pos+o;u[c]+=s.weight;for(var l=0;c>0;)c%2&&(l+=u[c+1]),c=c-1>>1,u[c]+=s.weight;d+=s.weight*l})),d}function Fr(e){var n={},r=I(e.nodes(),function(u){return!e.children(u).length}),t=y(w(r,function(u){return e.node(u).rank})),i=w(k(t+1),function(){return[]});function o(u){if(!Ne(n,u)){n[u]=!0;var d=e.node(u);i[d.rank].push(u),f(e.successors(u),o)}}var a=R(r,function(u){return e.node(u).rank});return f(a,o),i}function Ar(e,n){return w(n,function(r){var t=e.inEdges(r);if(t.length){var i=B(t,function(o,a){var u=e.edge(a),d=e.node(a.v);return{sum:o.sum+u.weight*d.order,weight:o.weight+u.weight}},{sum:0,weight:0});return{v:r,barycenter:i.sum/i.weight,weight:i.weight}}else return{v:r}})}function Br(e,n){var r={};f(e,function(i,o){var a=r[i.v]={indegree:0,in:[],out:[],vs:[i.v],i:o};m(i.barycenter)||(a.barycenter=i.barycenter,a.weight=i.weight)}),f(n.edges(),function(i){var o=r[i.v],a=r[i.w];!m(o)&&!m(a)&&(a.indegree++,o.out.push(r[i.w]))});var t=I(r,function(i){return!i.indegree});return jr(t)}function jr(e){var n=[];function r(o){return function(a){a.merged||(m(a.barycenter)||m(o.barycenter)||a.barycenter>=o.barycenter)&&Gr(o,a)}}function t(o){return function(a){a.in.push(o),--a.indegree===0&&e.push(a)}}for(;e.length;){var i=e.pop();n.push(i),f(i.in.reverse(),r(i)),f(i.out,t(i))}return w(I(n,function(o){return!o.merged}),function(o){return A(o,["vs","i","barycenter","weight"])})}function Gr(e,n){var r=0,t=0;e.weight&&(r+=e.barycenter*e.weight,t+=e.weight),n.weight&&(r+=n.barycenter*n.weight,t+=n.weight),e.vs=n.vs.concat(e.vs),e.barycenter=r/t,e.weight=t,e.i=Math.min(n.i,e.i),n.merged=!0}function Vr(e,n){var r=ir(e,function(c){return Object.prototype.hasOwnProperty.call(c,"barycenter")}),t=r.lhs,i=R(r.rhs,function(c){return-c.i}),o=[],a=0,u=0,d=0;t.sort(Yr(!!n)),d=ce(o,i,d),f(t,function(c){d+=c.vs.length,o.push(c.vs),a+=c.barycenter*c.weight,u+=c.weight,d=ce(o,i,d)});var s={vs:O(o)};return u&&(s.barycenter=a/u,s.weight=u),s}function ce(e,n,r){for(var t;n.length&&(t=F(n)).i<=r;)n.pop(),e.push(t.vs),r++;return r}function Yr(e){return function(n,r){return n.barycenter<r.barycenter?-1:n.barycenter>r.barycenter?1:e?r.i-n.i:n.i-r.i}}function je(e,n,r,t){var i=e.children(n),o=e.node(n),a=o?o.borderLeft:void 0,u=o?o.borderRight:void 0,d={};a&&(i=I(i,function(p){return p!==a&&p!==u}));var s=Ar(e,i);f(s,function(p){if(e.children(p.v).length){var b=je(e,p.v,r,t);d[p.v]=b,Object.prototype.hasOwnProperty.call(b,"barycenter")&&Dr(p,b)}});var c=Br(s,r);$r(c,d);var l=Vr(c,t);if(a&&(l.vs=O([a,l.vs,u]),e.predecessors(a).length)){var h=e.node(e.predecessors(a)[0]),v=e.node(e.predecessors(u)[0]);Object.prototype.hasOwnProperty.call(l,"barycenter")||(l.barycenter=0,l.weight=0),l.barycenter=(l.barycenter*l.weight+h.order+v.order)/(l.weight+2),l.weight+=2}return l}function $r(e,n){f(e,function(r){r.vs=O(r.vs.map(function(t){return n[t]?n[t].vs:t}))})}function Dr(e,n){m(e.barycenter)?(e.barycenter=n.barycenter,e.weight=n.weight):(e.barycenter=(e.barycenter*e.weight+n.barycenter*n.weight)/(e.weight+n.weight),e.weight+=n.weight)}function qr(e){var n=Pe(e),r=le(e,k(1,n+1),"inEdges"),t=le(e,k(n-1,-1,-1),"outEdges"),i=Fr(e);he(e,i);for(var o=Number.POSITIVE_INFINITY,a,u=0,d=0;d<4;++u,++d){Wr(u%2?r:t,u%4>=2),i=G(e);var s=Mr(e,i);s<o&&(d=0,a=yn(i),o=s)}he(e,a)}function le(e,n,r){return w(n,function(t){return Rr(e,t,r)})}function Wr(e,n){var r=new g;f(e,function(t){var i=t.graph().root,o=je(t,i,r,n);f(o.vs,function(a,u){t.node(a).order=u}),Ir(t,r,o.vs)})}function he(e,n){f(n,function(r){f(r,function(t,i){e.node(t).order=i})})}function zr(e){var n=Hr(e);f(e.graph().dummyChains,function(r){for(var t=e.node(r),i=t.edgeObj,o=Xr(e,n,i.v,i.w),a=o.path,u=o.lca,d=0,s=a[d],c=!0;r!==i.w;){if(t=e.node(r),c){for(;(s=a[d])!==u&&e.node(s).maxRank<t.rank;)d++;s===u&&(c=!1)}if(!c){for(;d<a.length-1&&e.node(s=a[d+1]).minRank<=t.rank;)d++;s=a[d]}e.setParent(r,s),r=e.successors(r)[0]}})}function Xr(e,n,r,t){var i=[],o=[],a=Math.min(n[r].low,n[t].low),u=Math.max(n[r].lim,n[t].lim),d,s;d=r;do d=e.parent(d),i.push(d);while(d&&(n[d].low>a||u>n[d].lim));for(s=d,d=t;(d=e.parent(d))!==s;)o.push(d);return{path:i.concat(o.reverse()),lca:s}}function Hr(e){var n={},r=0;function t(i){var o=r;f(e.children(i),t),n[i]={low:o,lim:r++}}return f(e.children(),t),n}function Ur(e,n){var r={};function t(i,o){var a=0,u=0,d=i.length,s=F(o);return f(o,function(c,l){var h=Jr(e,c),v=h?e.node(h).order:d;(h||c===s)&&(f(o.slice(u,l+1),function(p){f(e.predecessors(p),function(b){var L=e.node(b),ne=L.order;(ne<a||v<ne)&&!(L.dummy&&e.node(p).dummy)&&Ge(r,b,p)})}),u=l+1,a=v)}),o}return B(n,t),r}function Zr(e,n){var r={};function t(o,a,u,d,s){var c;f(k(a,u),function(l){c=o[l],e.node(c).dummy&&f(e.predecessors(c),function(h){var v=e.node(h);v.dummy&&(v.order<d||v.order>s)&&Ge(r,h,c)})})}function i(o,a){var u=-1,d,s=0;return f(a,function(c,l){if(e.node(c).dummy==="border"){var h=e.predecessors(c);h.length&&(d=e.node(h[0]).order,t(a,s,l,u,d),s=l,u=d)}t(a,s,a.length,d,o.length)}),a}return B(n,i),r}function Jr(e,n){if(e.node(n).dummy)return U(e.predecessors(n),function(r){return e.node(r).dummy})}function Ge(e,n,r){if(n>r){var t=n;n=r,r=t}Object.prototype.hasOwnProperty.call(e,n)||Object.defineProperty(e,n,{enumerable:!0,configurable:!0,value:{},writable:!0});var i=e[n];Object.defineProperty(i,r,{enumerable:!0,configurable:!0,value:!0,writable:!0})}function Kr(e,n,r){if(n>r){var t=n;n=r,r=t}return!!e[n]&&Object.prototype.hasOwnProperty.call(e[n],r)}function Qr(e,n,r,t){var i={},o={},a={};return f(n,function(u){f(u,function(d,s){i[d]=d,o[d]=d,a[d]=s})}),f(n,function(u){var d=-1;f(u,function(s){var c=t(s);if(c.length){c=R(c,function(b){return a[b]});for(var l=(c.length-1)/2,h=Math.floor(l),v=Math.ceil(l);h<=v;++h){var p=c[h];o[s]===s&&d<a[p]&&!Kr(r,s,p)&&(o[p]=s,o[s]=i[s]=i[p],d=a[p])}}})}),{root:i,align:o}}function et(e,n,r,t,i){var o={},a=nt(e,n,r,i),u=i?"borderLeft":"borderRight";function d(l,h){for(var v=a.nodes(),p=v.pop(),b={};p;)b[p]?l(p):(b[p]=!0,v.push(p),v=v.concat(h(p))),p=v.pop()}function s(l){o[l]=a.inEdges(l).reduce(function(h,v){return Math.max(h,o[v.v]+a.edge(v))},0)}function c(l){var h=a.outEdges(l).reduce(function(p,b){return Math.min(p,o[b.w]-a.edge(b))},Number.POSITIVE_INFINITY),v=e.node(l);h!==Number.POSITIVE_INFINITY&&v.borderType!==u&&(o[l]=Math.max(o[l],h))}return d(s,a.predecessors.bind(a)),d(c,a.successors.bind(a)),f(t,function(l){o[l]=o[r[l]]}),o}function nt(e,n,r,t){var i=new g,o=e.graph(),a=ot(o.nodesep,o.edgesep,t);return f(n,function(u){var d;f(u,function(s){var c=r[s];if(i.setNode(c),d){var l=r[d],h=i.edge(l,c);i.setEdge(l,c,Math.max(a(e,s,d),h||0))}d=s})}),i}function rt(e,n){return Z(E(n),function(r){var t=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;return Ln(r,function(o,a){var u=ut(e,a)/2;t=Math.max(o+u,t),i=Math.min(o-u,i)}),t-i})}function tt(e,n){var r=E(n),t=P(r),i=y(r);f(["u","d"],function(o){f(["l","r"],function(a){var u=o+a,d=e[u],s;if(d!==n){var c=E(d);s=a==="l"?t-P(c):i-y(c),s&&(e[u]=j(d,function(l){return l+s}))}})})}function it(e,n){return j(e.ul,function(r,t){if(n)return e[n.toLowerCase()][t];var i=R(w(e,t));return(i[1]+i[2])/2})}function at(e){var n=G(e),r=X(Ur(e,n),Zr(e,n)),t={},i;f(["u","d"],function(a){i=a==="u"?n:E(n).reverse(),f(["l","r"],function(u){u==="r"&&(i=w(i,function(l){return E(l).reverse()}));var d=(a==="u"?e.predecessors:e.successors).bind(e),s=Qr(e,i,r,d),c=et(e,i,s.root,s.align,u==="r");u==="r"&&(c=j(c,function(l){return-l})),t[a+u]=c})});var o=rt(e,t);return tt(t,o),it(t,e.graph().align)}function ot(e,n,r){return function(t,i,o){var a=t.node(i),u=t.node(o),d=0,s;if(d+=a.width/2,Object.prototype.hasOwnProperty.call(a,"labelpos"))switch(a.labelpos.toLowerCase()){case"l":s=-a.width/2;break;case"r":s=a.width/2;break}if(s&&(d+=r?s:-s),s=0,d+=(a.dummy?n:e)/2,d+=(u.dummy?n:e)/2,d+=u.width/2,Object.prototype.hasOwnProperty.call(u,"labelpos"))switch(u.labelpos.toLowerCase()){case"l":s=u.width/2;break;case"r":s=-u.width/2;break}return s&&(d+=r?s:-s),s=0,d}}function ut(e,n){return e.node(n).width}function dt(e){e=Le(e),st(e),Pn(at(e),function(n,r){e.node(r).x=n})}function st(e){var n=G(e),r=e.graph().ranksep,t=0;f(n,function(i){var o=y(w(i,function(a){return e.node(a).height}));f(i,function(a){e.node(a).y=t+o/2}),t+=o+r})}function Bt(e,n){var r=ar;r("layout",()=>{var t=r(" buildLayoutGraph",()=>yt(e));r(" runLayout",()=>ft(t,r)),r(" updateInputGraph",()=>ct(e,t))})}function ft(e,n){n(" makeSpaceForEdgeLabels",()=>xt(e)),n(" removeSelfEdges",()=>It(e)),n(" acyclic",()=>Kn(e)),n(" nestingGraph.run",()=>Lr(e)),n(" rank",()=>kr(Le(e))),n(" injectEdgeLabelProxies",()=>Et(e)),n(" removeEmptyRanks",()=>tr(e)),n(" nestingGraph.cleanup",()=>Cr(e)),n(" normalizeRanks",()=>rr(e)),n(" assignRankMinMax",()=>kt(e)),n(" removeEdgeLabelProxies",()=>Ot(e)),n(" normalize.run",()=>cr(e)),n(" parentDummyChains",()=>zr(e)),n(" addBorderSegments",()=>or(e)),n(" order",()=>qr(e)),n(" insertSelfEdges",()=>Rt(e)),n(" adjustCoordinateSystem",()=>ur(e)),n(" position",()=>dt(e)),n(" positionSelfEdges",()=>Tt(e)),n(" removeBorderNodes",()=>Ct(e)),n(" normalize.undo",()=>hr(e)),n(" fixupEdgeLabelCoords",()=>Pt(e)),n(" undoCoordinateSystem",()=>dr(e)),n(" translateGraph",()=>Nt(e)),n(" assignNodeIntersects",()=>Lt(e)),n(" reversePoints",()=>_t(e)),n(" acyclic.undo",()=>er(e))}function ct(e,n){f(e.nodes(),function(r){var t=e.node(r),i=n.node(r);t&&(t.x=i.x,t.y=i.y,n.children(r).length&&(t.width=i.width,t.height=i.height))}),f(e.edges(),function(r){var t=e.edge(r),i=n.edge(r);t.points=i.points,Object.prototype.hasOwnProperty.call(i,"x")&&(t.x=i.x,t.y=i.y)}),e.graph().width=n.graph().width,e.graph().height=n.graph().height}var lt=["nodesep","edgesep","ranksep","marginx","marginy"],ht={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},vt=["acyclicer","ranker","rankdir","align"],pt=["width","height"],wt={width:0,height:0},bt=["minlen","weight","width","height","labeloffset"],mt={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},gt=["labelpos"];function yt(e){var n=new g({multigraph:!0,compound:!0}),r=W(e.graph());return n.setGraph(X({},ht,q(r,lt),A(r,vt))),f(e.nodes(),function(t){var i=W(e.node(t));n.setNode(t,En(q(i,pt),wt)),n.setParent(t,e.parent(t))}),f(e.edges(),function(t){var i=W(e.edge(t));n.setEdge(t,X({},mt,q(i,bt),A(i,gt)))}),n}function xt(e){var n=e.graph();n.ranksep/=2,f(e.edges(),function(r){var t=e.edge(r);t.minlen*=2,t.labelpos.toLowerCase()!=="c"&&(n.rankdir==="TB"||n.rankdir==="BT"?t.width+=t.labeloffset:t.height+=t.labeloffset)})}function Et(e){f(e.edges(),function(n){var r=e.edge(n);if(r.width&&r.height){var t=e.node(n.v),i=e.node(n.w),o={rank:(i.rank-t.rank)/2+t.rank,e:n};N(e,"edge-proxy",o,"_ep")}})}function kt(e){var n=0;f(e.nodes(),function(r){var t=e.node(r);t.borderTop&&(t.minRank=e.node(t.borderTop).rank,t.maxRank=e.node(t.borderBottom).rank,n=y(n,t.maxRank))}),e.graph().maxRank=n}function Ot(e){f(e.nodes(),function(n){var r=e.node(n);r.dummy==="edge-proxy"&&(e.edge(r.e).labelRank=r.rank,e.removeNode(n))})}function Nt(e){var n=Number.POSITIVE_INFINITY,r=0,t=Number.POSITIVE_INFINITY,i=0,o=e.graph(),a=o.marginx||0,u=o.marginy||0;function d(s){var c=s.x,l=s.y,h=s.width,v=s.height;n=Math.min(n,c-h/2),r=Math.max(r,c+h/2),t=Math.min(t,l-v/2),i=Math.max(i,l+v/2)}f(e.nodes(),function(s){d(e.node(s))}),f(e.edges(),function(s){var c=e.edge(s);Object.prototype.hasOwnProperty.call(c,"x")&&d(c)}),n-=a,t-=u,f(e.nodes(),function(s){var c=e.node(s);c.x-=n,c.y-=t}),f(e.edges(),function(s){var c=e.edge(s);f(c.points,function(l){l.x-=n,l.y-=t}),Object.prototype.hasOwnProperty.call(c,"x")&&(c.x-=n),Object.prototype.hasOwnProperty.call(c,"y")&&(c.y-=t)}),o.width=r-n+a,o.height=i-t+u}function Lt(e){f(e.edges(),function(n){var r=e.edge(n),t=e.node(n.v),i=e.node(n.w),o,a;r.points?(o=r.points[0],a=r.points[r.points.length-1]):(r.points=[],o=i,a=t),r.points.unshift(ae(t,o)),r.points.push(ae(i,a))})}function Pt(e){f(e.edges(),function(n){var r=e.edge(n);if(Object.prototype.hasOwnProperty.call(r,"x"))switch((r.labelpos==="l"||r.labelpos==="r")&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset;break}})}function _t(e){f(e.edges(),function(n){var r=e.edge(n);r.reversed&&r.points.reverse()})}function Ct(e){f(e.nodes(),function(n){if(e.children(n).length){var r=e.node(n),t=e.node(r.borderTop),i=e.node(r.borderBottom),o=e.node(F(r.borderLeft)),a=e.node(F(r.borderRight));r.width=Math.abs(a.x-o.x),r.height=Math.abs(i.y-t.y),r.x=o.x+r.width/2,r.y=t.y+r.height/2}}),f(e.nodes(),function(n){e.node(n).dummy==="border"&&e.removeNode(n)})}function It(e){f(e.edges(),function(n){if(n.v===n.w){var r=e.node(n.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:n,label:e.edge(n)}),e.removeEdge(n)}})}function Rt(e){var n=G(e);f(n,function(r){var t=0;f(r,function(i,o){var a=e.node(i);a.order=o+t,f(a.selfEdges,function(u){N(e,"selfedge",{width:u.label.width,height:u.label.height,rank:a.rank,order:o+ ++t,e:u.e,label:u.label},"_se")}),delete a.selfEdges})})}function Tt(e){f(e.nodes(),function(n){var r=e.node(n);if(r.dummy==="selfedge"){var t=e.node(r.e.v),i=t.x+t.width/2,o=t.y,a=r.x-i,u=t.height/2;e.setEdge(r.e,r.label),e.removeNode(n),r.label.points=[{x:i+2*a/3,y:o-u},{x:i+5*a/6,y:o-u},{x:i+a,y:o},{x:i+5*a/6,y:o+u},{x:i+2*a/3,y:o+u}],r.label.x=r.x,r.label.y=r.y}})}function q(e,n){return j(A(e,n),Number)}function W(e){var n={};return f(e,function(r,t){n[t.toLowerCase()]=r}),n}export{Bt as l};
@@ -0,0 +1 @@
1
+ import{_ as s}from"./VvxifOG2.js";var t,e=(t=class{constructor(i){this.init=i,this.records=this.init()}reset(){this.records=this.init()}},s(t,"ImperativeState"),t);export{e as I};
@@ -0,0 +1 @@
1
+ import{e as R,d as B,c as C,w as b,o as M,f as I,g as _,j as E,y as O,n as N,l as T,p as V,T as A,z as K,q as p,s as L,t as z,B as D,x as H}from"./FdVDP1dJ.js";var g=(d,e,r)=>new Promise((l,u)=>{var v=t=>{try{a(r.next(t))}catch(n){u(n)}},i=t=>{try{a(r.throw(t))}catch(n){u(n)}},a=t=>t.done?l(t.value):Promise.resolve(t.value).then(v,i);a((r=r.apply(d,e)).next())});const P={key:0,class:"math-loading-overlay"},w=R(B({__name:"MathBlockNode",props:{node:{}},setup(d){const e=d,r=p(null),l=p(null);let u=!1,v=0,i=!1,a=null;const t=C();let n=null;const s=p(!0);function y(){return g(this,null,function*(){if(!l.value||i)return;if(!e.node.content)return s.value=!1,l.value.textContent=e.node.raw,void(u=!0);if(!u)try{!n&&r.value&&(n=t(r.value)),yield n?.whenVisible}catch{}a&&(a.abort(),a=null);const c=++v,f=new AbortController;a=f,L(e.node.content,!0,{timeout:3e3,waitTimeout:2e3,maxRetries:1,signal:f.signal}).then(o=>{i||c!==v||l.value&&(l.value.innerHTML=o,u=!0,s.value=!1)}).catch(o=>g(null,null,function*(){if(i||c!==v||!l.value)return;const m=o?.code||o?.name,k=m==="KATEX_DISABLED";if(m==="WORKER_INIT_ERROR"||o?.fallbackToRenderer||m===z||m==="WORKER_TIMEOUT"){const x=yield D();if(x){try{const h=x.renderToString(e.node.content,{throwOnError:e.node.loading,displayMode:!0});l.value.innerHTML=h,u=!0,s.value=!1,H(e.node.content,!0,h)}catch{}return}}if(k)return s.value=!1,void(l.value.textContent=e.node.raw);u||(s.value=!0),e.node.loading||(s.value=!1,l.value.textContent=e.node.raw)}))})}return b(()=>e.node.content,()=>{y()}),M(()=>{y()}),I(()=>{var c;i=!0,a&&(a.abort(),a=null),(c=n?.destroy)==null||c.call(n),n=null}),(c,f)=>(_(),E("div",{ref_key:"containerEl",ref:r,class:"math-block text-center overflow-x-auto relative min-h-[40px]"},[O(A,{name:"math-fade"},{default:N(()=>[s.value?(_(),E("div",P,[...f[0]||(f[0]=[T("div",{class:"math-loading-spinner"},null,-1)])])):V("",!0)]),_:1}),T("div",{ref_key:"mathBlockElement",ref:l,class:K({"math-rendering":s.value})},null,2)],512))}}),[["__scopeId","data-v-f432e706"]]);w.install=d=>{d.component(w.__name,w)};export{w as default};
@@ -0,0 +1 @@
1
+ import{i as a}from"./Gi6I4Gst.js";class o extends Map{constructor(n,t=h){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),n!=null)for(const[r,s]of n)this.set(r,s)}get(n){return super.get(c(this,n))}has(n){return super.has(c(this,n))}set(n,t){return super.set(p(this,n),t)}delete(n){return super.delete(g(this,n))}}function c({_intern:e,_key:n},t){const r=n(t);return e.has(r)?e.get(r):t}function p({_intern:e,_key:n},t){const r=n(t);return e.has(r)?e.get(r):(e.set(r,t),t)}function g({_intern:e,_key:n},t){const r=n(t);return e.has(r)&&(t=e.get(t),e.delete(r)),t}function h(e){return e!==null&&typeof e=="object"?e.valueOf():e}const f=Symbol("implicit");function l(){var e=new o,n=[],t=[],r=f;function s(i){let u=e.get(i);if(u===void 0){if(r!==f)return r;e.set(i,u=n.push(i)-1)}return t[u%t.length]}return s.domain=function(i){if(!arguments.length)return n.slice();n=[],e=new o;for(const u of i)e.has(u)||e.set(u,n.push(u)-1);return s},s.range=function(i){return arguments.length?(t=Array.from(i),s):t.slice()},s.unknown=function(i){return arguments.length?(r=i,s):r},s.copy=function(){return l(n,t).unknown(r)},a.apply(s,arguments),s}export{l as o};
@@ -0,0 +1 @@
1
+ import{_ as a,d as o}from"./VvxifOG2.js";var d=a((t,e)=>{let n;return e==="sandbox"&&(n=o("#i"+t)),(e==="sandbox"?o(n.nodes()[0].contentDocument.body):o("body")).select(`[id="${t}"]`)},"getDiagramElement");export{d as g};
@@ -0,0 +1 @@
1
+ import{_ as o}from"./DlAUqK2U.js";import{u as s}from"./CctfDgzL.js";import{g as a,j as i,l as t,F as r}from"./FdVDP1dJ.js";const u={class:"antialiased bg-white dark:bg-[#020420] dark:text-white font-sans grid min-h-screen overflow-hidden place-content-center text-[#020420] tracking-wide"},l={class:"max-w-520px text-center"},c=["textContent"],d=["textContent"],p=["textContent"],f={__name:"error-500",props:{appName:{type:String,default:"Nuxt"},status:{type:Number,default:500},statusText:{type:String,default:"Internal server error"},description:{type:String,default:"This page is temporarily unavailable."},refresh:{type:String,default:"Refresh this page"}},setup(e){const n=e;return s({title:`${n.status} - ${n.statusText} | ${n.appName}`,script:[{innerHTML:`!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))r(e);new MutationObserver(e=>{for(const o of e)if("childList"===o.type)for(const e of o.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&r(e)}).observe(document,{childList:!0,subtree:!0})}function r(e){if(e.ep)return;e.ep=!0;const r=function(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?r.credentials="include":"anonymous"===e.crossOrigin?r.credentials="omit":r.credentials="same-origin",r}(e);fetch(e.href,r)}}();`}],style:[{innerHTML:'*,:after,:before{border-color:var(--un-default-border-color,#e5e7eb);border-style:solid;border-width:0;box-sizing:border-box}:after,:before{--un-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}h1,h2{font-size:inherit;font-weight:inherit}h1,h2,p{margin:0}*,:after,:before{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 transparent;--un-ring-shadow:0 0 transparent;--un-shadow-inset: ;--un-shadow:0 0 transparent;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }'}]}),(m,h)=>(a(),i("div",u,[t("div",l,[t("h1",{class:"font-semibold leading-none mb-4 sm:text-[110px] tabular-nums text-[80px]",textContent:r(e.status)},null,8,c),t("h2",{class:"font-semibold mb-2 sm:text-3xl text-2xl",textContent:r(e.statusText)},null,8,d),t("p",{class:"mb-4 px-2 text-[#64748B] text-md",textContent:r(e.description)},null,8,p)])]))}},y=o(f,[["__scopeId","data-v-fd7d7560"]]);export{y as default};
@@ -0,0 +1 @@
1
+ function J(n){return Math.abs(n=Math.round(n))>=1e21?n.toLocaleString("en").replace(/,/g,""):n.toString(10)}function j(n,t){if(!isFinite(n)||n===0)return null;var e=(n=t?n.toExponential(t-1):n.toExponential()).indexOf("e"),i=n.slice(0,e);return[i.length>1?i[0]+i.slice(2):i,+n.slice(e+1)]}function K(n){return n=j(Math.abs(n)),n?n[1]:NaN}function Q(n,t){return function(e,i){for(var o=e.length,a=[],c=0,h=n[0],M=0;o>0&&h>0&&(M+h+1>i&&(h=Math.max(1,i-M)),a.push(e.substring(o-=h,o+h)),!((M+=h+1)>i));)h=n[c=(c+1)%n.length];return a.reverse().join(t)}}function V(n){return function(t){return t.replace(/[0-9]/g,function(e){return n[+e]})}}var W=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function $(n){if(!(t=W.exec(n)))throw new Error("invalid format: "+n);var t;return new L({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}$.prototype=L.prototype;function L(n){this.fill=n.fill===void 0?" ":n.fill+"",this.align=n.align===void 0?">":n.align+"",this.sign=n.sign===void 0?"-":n.sign+"",this.symbol=n.symbol===void 0?"":n.symbol+"",this.zero=!!n.zero,this.width=n.width===void 0?void 0:+n.width,this.comma=!!n.comma,this.precision=n.precision===void 0?void 0:+n.precision,this.trim=!!n.trim,this.type=n.type===void 0?"":n.type+""}L.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function _(n){n:for(var t=n.length,e=1,i=-1,o;e<t;++e)switch(n[e]){case".":i=o=e;break;case"0":i===0&&(i=e),o=e;break;default:if(!+n[e])break n;i>0&&(i=0);break}return i>0?n.slice(0,i)+n.slice(o+1):n}var N;function v(n,t){var e=j(n,t);if(!e)return N=void 0,n.toPrecision(t);var i=e[0],o=e[1],a=o-(N=Math.max(-8,Math.min(8,Math.floor(o/3)))*3)+1,c=i.length;return a===c?i:a>c?i+new Array(a-c+1).join("0"):a>0?i.slice(0,a)+"."+i.slice(a):"0."+new Array(1-a).join("0")+j(n,Math.max(0,t+a-1))[0]}function X(n,t){var e=j(n,t);if(!e)return n+"";var i=e[0],o=e[1];return o<0?"0."+new Array(-o).join("0")+i:i.length>o+1?i.slice(0,o+1)+"."+i.slice(o+1):i+new Array(o-i.length+2).join("0")}const O={"%":(n,t)=>(n*100).toFixed(t),b:n=>Math.round(n).toString(2),c:n=>n+"",d:J,e:(n,t)=>n.toExponential(t),f:(n,t)=>n.toFixed(t),g:(n,t)=>n.toPrecision(t),o:n=>Math.round(n).toString(8),p:(n,t)=>X(n*100,t),r:X,s:v,X:n=>Math.round(n).toString(16).toUpperCase(),x:n=>Math.round(n).toString(16)};function R(n){return n}var U=Array.prototype.map,Y=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function nn(n){var t=n.grouping===void 0||n.thousands===void 0?R:Q(U.call(n.grouping,Number),n.thousands+""),e=n.currency===void 0?"":n.currency[0]+"",i=n.currency===void 0?"":n.currency[1]+"",o=n.decimal===void 0?".":n.decimal+"",a=n.numerals===void 0?R:V(U.call(n.numerals,String)),c=n.percent===void 0?"%":n.percent+"",h=n.minus===void 0?"−":n.minus+"",M=n.nan===void 0?"NaN":n.nan+"";function T(f,l){f=$(f);var b=f.fill,p=f.align,m=f.sign,w=f.symbol,S=f.zero,E=f.width,F=f.comma,g=f.precision,C=f.trim,d=f.type;d==="n"?(F=!0,d="g"):O[d]||(g===void 0&&(g=12),C=!0,d="g"),(S||b==="0"&&p==="=")&&(S=!0,b="0",p="=");var q=(l?.prefix!==void 0?l.prefix:"")+(w==="$"?e:w==="#"&&/[boxX]/.test(d)?"0"+d.toLowerCase():""),B=(w==="$"?i:/[%p]/.test(d)?c:"")+(l?.suffix!==void 0?l.suffix:""),D=O[d],H=/[defgprs%]/.test(d);g=g===void 0?6:/[gprs]/.test(d)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g));function G(r){var y=q,u=B,x,I,k;if(d==="c")u=D(r)+u,r="";else{r=+r;var P=r<0||1/r<0;if(r=isNaN(r)?M:D(Math.abs(r),g),C&&(r=_(r)),P&&+r==0&&m!=="+"&&(P=!1),y=(P?m==="("?m:h:m==="-"||m==="("?"":m)+y,u=(d==="s"&&!isNaN(r)&&N!==void 0?Y[8+N/3]:"")+u+(P&&m==="("?")":""),H){for(x=-1,I=r.length;++x<I;)if(k=r.charCodeAt(x),48>k||k>57){u=(k===46?o+r.slice(x+1):r.slice(x))+u,r=r.slice(0,x);break}}}F&&!S&&(r=t(r,1/0));var z=y.length+r.length+u.length,s=z<E?new Array(E-z+1).join(b):"";switch(F&&S&&(r=t(s+r,s.length?E-u.length:1/0),s=""),p){case"<":r=y+r+u+s;break;case"=":r=y+s+r+u;break;case"^":r=s.slice(0,z=s.length>>1)+y+r+u+s.slice(z);break;default:r=s+y+r+u;break}return a(r)}return G.toString=function(){return f+""},G}function Z(f,l){var b=Math.max(-8,Math.min(8,Math.floor(K(l)/3)))*3,p=Math.pow(10,-b),m=T((f=$(f),f.type="f",f),{suffix:Y[8+b/3]});return function(w){return m(p*w)}}return{format:T,formatPrefix:Z}}var A,tn,rn;en({thousands:",",grouping:[3],currency:["$",""]});function en(n){return A=nn(n),tn=A.format,rn=A.formatPrefix,A}export{rn as a,tn as b,K as e,$ as f};
@@ -0,0 +1,10 @@
1
+ import{p as _t,q as xt,s as vt,g as bt,b as wt,a as St,_ as g,c as lt,z as Lt,d as H,ac as Et,y as At,k as Tt}from"./VvxifOG2.js";import{o as Mt}from"./DGBBJ9Xx.js";import"./FdVDP1dJ.js";import"./Gi6I4Gst.js";function Nt(t){for(var e=t.length/6|0,i=new Array(e),a=0;a<e;)i[a]="#"+t.slice(a*6,++a*6);return i}const It=Nt("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function ct(t,e){let i;if(e===void 0)for(const a of t)a!=null&&(i<a||i===void 0&&a>=a)&&(i=a);else{let a=-1;for(let h of t)(h=e(h,++a,t))!=null&&(i<h||i===void 0&&h>=h)&&(i=h)}return i}function pt(t,e){let i;if(e===void 0)for(const a of t)a!=null&&(i>a||i===void 0&&a>=a)&&(i=a);else{let a=-1;for(let h of t)(h=e(h,++a,t))!=null&&(i>h||i===void 0&&h>=h)&&(i=h)}return i}function nt(t,e){let i=0;if(e===void 0)for(let a of t)(a=+a)&&(i+=a);else{let a=-1;for(let h of t)(h=+e(h,++a,t))&&(i+=h)}return i}function Pt(t){return t.target.depth}function Ct(t){return t.depth}function Ot(t,e){return e-1-t.height}function mt(t,e){return t.sourceLinks.length?t.depth:e-1}function zt(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?pt(t.sourceLinks,Pt)-1:0}function X(t){return function(){return t}}function ut(t,e){return Q(t.source,e.source)||t.index-e.index}function ht(t,e){return Q(t.target,e.target)||t.index-e.index}function Q(t,e){return t.y0-e.y0}function it(t){return t.value}function Dt(t){return t.index}function $t(t){return t.nodes}function jt(t){return t.links}function ft(t,e){const i=t.get(e);if(!i)throw new Error("missing: "+e);return i}function yt({nodes:t}){for(const e of t){let i=e.y0,a=i;for(const h of e.sourceLinks)h.y0=i+h.width/2,i+=h.width;for(const h of e.targetLinks)h.y1=a+h.width/2,a+=h.width}}function Bt(){let t=0,e=0,i=1,a=1,h=24,b=8,p,k=Dt,s=mt,o,l,_=$t,x=jt,y=6;function v(){const n={nodes:_.apply(null,arguments),links:x.apply(null,arguments)};return M(n),T(n),N(n),C(n),S(n),yt(n),n}v.update=function(n){return yt(n),n},v.nodeId=function(n){return arguments.length?(k=typeof n=="function"?n:X(n),v):k},v.nodeAlign=function(n){return arguments.length?(s=typeof n=="function"?n:X(n),v):s},v.nodeSort=function(n){return arguments.length?(o=n,v):o},v.nodeWidth=function(n){return arguments.length?(h=+n,v):h},v.nodePadding=function(n){return arguments.length?(b=p=+n,v):b},v.nodes=function(n){return arguments.length?(_=typeof n=="function"?n:X(n),v):_},v.links=function(n){return arguments.length?(x=typeof n=="function"?n:X(n),v):x},v.linkSort=function(n){return arguments.length?(l=n,v):l},v.size=function(n){return arguments.length?(t=e=0,i=+n[0],a=+n[1],v):[i-t,a-e]},v.extent=function(n){return arguments.length?(t=+n[0][0],i=+n[1][0],e=+n[0][1],a=+n[1][1],v):[[t,e],[i,a]]},v.iterations=function(n){return arguments.length?(y=+n,v):y};function M({nodes:n,links:f}){for(const[c,r]of n.entries())r.index=c,r.sourceLinks=[],r.targetLinks=[];const u=new Map(n.map((c,r)=>[k(c,r,n),c]));for(const[c,r]of f.entries()){r.index=c;let{source:m,target:w}=r;typeof m!="object"&&(m=r.source=ft(u,m)),typeof w!="object"&&(w=r.target=ft(u,w)),m.sourceLinks.push(r),w.targetLinks.push(r)}if(l!=null)for(const{sourceLinks:c,targetLinks:r}of n)c.sort(l),r.sort(l)}function T({nodes:n}){for(const f of n)f.value=f.fixedValue===void 0?Math.max(nt(f.sourceLinks,it),nt(f.targetLinks,it)):f.fixedValue}function N({nodes:n}){const f=n.length;let u=new Set(n),c=new Set,r=0;for(;u.size;){for(const m of u){m.depth=r;for(const{target:w}of m.sourceLinks)c.add(w)}if(++r>f)throw new Error("circular link");u=c,c=new Set}}function C({nodes:n}){const f=n.length;let u=new Set(n),c=new Set,r=0;for(;u.size;){for(const m of u){m.height=r;for(const{source:w}of m.targetLinks)c.add(w)}if(++r>f)throw new Error("circular link");u=c,c=new Set}}function D({nodes:n}){const f=ct(n,r=>r.depth)+1,u=(i-t-h)/(f-1),c=new Array(f);for(const r of n){const m=Math.max(0,Math.min(f-1,Math.floor(s.call(null,r,f))));r.layer=m,r.x0=t+m*u,r.x1=r.x0+h,c[m]?c[m].push(r):c[m]=[r]}if(o)for(const r of c)r.sort(o);return c}function R(n){const f=pt(n,u=>(a-e-(u.length-1)*p)/nt(u,it));for(const u of n){let c=e;for(const r of u){r.y0=c,r.y1=c+r.value*f,c=r.y1+p;for(const m of r.sourceLinks)m.width=m.value*f}c=(a-c+p)/(u.length+1);for(let r=0;r<u.length;++r){const m=u[r];m.y0+=c*(r+1),m.y1+=c*(r+1)}A(u)}}function S(n){const f=D(n);p=Math.min(b,(a-e)/(ct(f,u=>u.length)-1)),R(f);for(let u=0;u<y;++u){const c=Math.pow(.99,u),r=Math.max(1-c,(u+1)/y);B(f,c,r),P(f,c,r)}}function P(n,f,u){for(let c=1,r=n.length;c<r;++c){const m=n[c];for(const w of m){let L=0,F=0;for(const{source:Y,value:et}of w.targetLinks){let q=et*(w.layer-Y.layer);L+=$(Y,w)*q,F+=q}if(!(F>0))continue;let G=(L/F-w.y0)*f;w.y0+=G,w.y1+=G,E(w)}o===void 0&&m.sort(Q),O(m,u)}}function B(n,f,u){for(let c=n.length,r=c-2;r>=0;--r){const m=n[r];for(const w of m){let L=0,F=0;for(const{target:Y,value:et}of w.sourceLinks){let q=et*(Y.layer-w.layer);L+=I(w,Y)*q,F+=q}if(!(F>0))continue;let G=(L/F-w.y0)*f;w.y0+=G,w.y1+=G,E(w)}o===void 0&&m.sort(Q),O(m,u)}}function O(n,f){const u=n.length>>1,c=n[u];d(n,c.y0-p,u-1,f),z(n,c.y1+p,u+1,f),d(n,a,n.length-1,f),z(n,e,0,f)}function z(n,f,u,c){for(;u<n.length;++u){const r=n[u],m=(f-r.y0)*c;m>1e-6&&(r.y0+=m,r.y1+=m),f=r.y1+p}}function d(n,f,u,c){for(;u>=0;--u){const r=n[u],m=(r.y1-f)*c;m>1e-6&&(r.y0-=m,r.y1-=m),f=r.y0-p}}function E({sourceLinks:n,targetLinks:f}){if(l===void 0){for(const{source:{sourceLinks:u}}of f)u.sort(ht);for(const{target:{targetLinks:u}}of n)u.sort(ut)}}function A(n){if(l===void 0)for(const{sourceLinks:f,targetLinks:u}of n)f.sort(ht),u.sort(ut)}function $(n,f){let u=n.y0-(n.sourceLinks.length-1)*p/2;for(const{target:c,width:r}of n.sourceLinks){if(c===f)break;u+=r+p}for(const{source:c,width:r}of f.targetLinks){if(c===n)break;u-=r}return u}function I(n,f){let u=f.y0-(f.targetLinks.length-1)*p/2;for(const{source:c,width:r}of f.targetLinks){if(c===n)break;u+=r+p}for(const{target:c,width:r}of n.sourceLinks){if(c===f)break;u-=r}return u}return v}var st=Math.PI,rt=2*st,V=1e-6,Rt=rt-V;function ot(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function kt(){return new ot}ot.prototype=kt.prototype={constructor:ot,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,i,a){this._+="Q"+ +t+","+ +e+","+(this._x1=+i)+","+(this._y1=+a)},bezierCurveTo:function(t,e,i,a,h,b){this._+="C"+ +t+","+ +e+","+ +i+","+ +a+","+(this._x1=+h)+","+(this._y1=+b)},arcTo:function(t,e,i,a,h){t=+t,e=+e,i=+i,a=+a,h=+h;var b=this._x1,p=this._y1,k=i-t,s=a-e,o=b-t,l=p-e,_=o*o+l*l;if(h<0)throw new Error("negative radius: "+h);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(_>V)if(!(Math.abs(l*k-s*o)>V)||!h)this._+="L"+(this._x1=t)+","+(this._y1=e);else{var x=i-b,y=a-p,v=k*k+s*s,M=x*x+y*y,T=Math.sqrt(v),N=Math.sqrt(_),C=h*Math.tan((st-Math.acos((v+_-M)/(2*T*N)))/2),D=C/N,R=C/T;Math.abs(D-1)>V&&(this._+="L"+(t+D*o)+","+(e+D*l)),this._+="A"+h+","+h+",0,0,"+ +(l*x>o*y)+","+(this._x1=t+R*k)+","+(this._y1=e+R*s)}},arc:function(t,e,i,a,h,b){t=+t,e=+e,i=+i,b=!!b;var p=i*Math.cos(a),k=i*Math.sin(a),s=t+p,o=e+k,l=1^b,_=b?a-h:h-a;if(i<0)throw new Error("negative radius: "+i);this._x1===null?this._+="M"+s+","+o:(Math.abs(this._x1-s)>V||Math.abs(this._y1-o)>V)&&(this._+="L"+s+","+o),i&&(_<0&&(_=_%rt+rt),_>Rt?this._+="A"+i+","+i+",0,1,"+l+","+(t-p)+","+(e-k)+"A"+i+","+i+",0,1,"+l+","+(this._x1=s)+","+(this._y1=o):_>V&&(this._+="A"+i+","+i+",0,"+ +(_>=st)+","+l+","+(this._x1=t+i*Math.cos(h))+","+(this._y1=e+i*Math.sin(h))))},rect:function(t,e,i,a){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +i+"v"+ +a+"h"+-i+"Z"},toString:function(){return this._}};function dt(t){return function(){return t}}function Ft(t){return t[0]}function Vt(t){return t[1]}var Wt=Array.prototype.slice;function Ut(t){return t.source}function Gt(t){return t.target}function Yt(t){var e=Ut,i=Gt,a=Ft,h=Vt,b=null;function p(){var k,s=Wt.call(arguments),o=e.apply(this,s),l=i.apply(this,s);if(b||(b=k=kt()),t(b,+a.apply(this,(s[0]=o,s)),+h.apply(this,s),+a.apply(this,(s[0]=l,s)),+h.apply(this,s)),k)return b=null,k+""||null}return p.source=function(k){return arguments.length?(e=k,p):e},p.target=function(k){return arguments.length?(i=k,p):i},p.x=function(k){return arguments.length?(a=typeof k=="function"?k:dt(+k),p):a},p.y=function(k){return arguments.length?(h=typeof k=="function"?k:dt(+k),p):h},p.context=function(k){return arguments.length?(b=k??null,p):b},p}function qt(t,e,i,a,h){t.moveTo(e,i),t.bezierCurveTo(e=(e+a)/2,i,e,h,a,h)}function Ht(){return Yt(qt)}function Xt(t){return[t.source.x1,t.y0]}function Qt(t){return[t.target.x0,t.y1]}function Kt(){return Ht().source(Xt).target(Qt)}var at=(function(){var t=g(function(k,s,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=s);return o},"o"),e=[1,9],i=[1,10],a=[1,5,10,12],h={trace:g(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:g(function(s,o,l,_,x,y,v){var M=y.length-1;switch(x){case 7:const T=_.findOrCreateNode(y[M-4].trim().replaceAll('""','"')),N=_.findOrCreateNode(y[M-2].trim().replaceAll('""','"')),C=parseFloat(y[M].trim());_.addLink(T,N,C);break;case 8:case 9:case 11:this.$=y[M];break;case 10:this.$=y[M-1];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:e,20:i},{1:[2,6],7:11,10:[1,12]},t(i,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(a,[2,8]),t(a,[2,9]),{19:[1,16]},t(a,[2,11]),{1:[2,1]},{1:[2,5]},t(i,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:e,20:i},{15:18,16:7,17:8,18:e,20:i},{18:[1,19]},t(i,[2,3]),{12:[1,20]},t(a,[2,10]),{15:21,16:7,17:8,18:e,20:i},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:g(function(s,o){if(o.recoverable)this.trace(s);else{var l=new Error(s);throw l.hash=o,l}},"parseError"),parse:g(function(s){var o=this,l=[0],_=[],x=[null],y=[],v=this.table,M="",T=0,N=0,C=2,D=1,R=y.slice.call(arguments,1),S=Object.create(this.lexer),P={yy:{}};for(var B in this.yy)Object.prototype.hasOwnProperty.call(this.yy,B)&&(P.yy[B]=this.yy[B]);S.setInput(s,P.yy),P.yy.lexer=S,P.yy.parser=this,typeof S.yylloc>"u"&&(S.yylloc={});var O=S.yylloc;y.push(O);var z=S.options&&S.options.ranges;typeof P.yy.parseError=="function"?this.parseError=P.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function d(L){l.length=l.length-2*L,x.length=x.length-L,y.length=y.length-L}g(d,"popStack");function E(){var L;return L=_.pop()||S.lex()||D,typeof L!="number"&&(L instanceof Array&&(_=L,L=_.pop()),L=o.symbols_[L]||L),L}g(E,"lex");for(var A,$,I,n,f={},u,c,r,m;;){if($=l[l.length-1],this.defaultActions[$]?I=this.defaultActions[$]:((A===null||typeof A>"u")&&(A=E()),I=v[$]&&v[$][A]),typeof I>"u"||!I.length||!I[0]){var w="";m=[];for(u in v[$])this.terminals_[u]&&u>C&&m.push("'"+this.terminals_[u]+"'");S.showPosition?w="Parse error on line "+(T+1)+`:
2
+ `+S.showPosition()+`
3
+ Expecting `+m.join(", ")+", got '"+(this.terminals_[A]||A)+"'":w="Parse error on line "+(T+1)+": Unexpected "+(A==D?"end of input":"'"+(this.terminals_[A]||A)+"'"),this.parseError(w,{text:S.match,token:this.terminals_[A]||A,line:S.yylineno,loc:O,expected:m})}if(I[0]instanceof Array&&I.length>1)throw new Error("Parse Error: multiple actions possible at state: "+$+", token: "+A);switch(I[0]){case 1:l.push(A),x.push(S.yytext),y.push(S.yylloc),l.push(I[1]),A=null,N=S.yyleng,M=S.yytext,T=S.yylineno,O=S.yylloc;break;case 2:if(c=this.productions_[I[1]][1],f.$=x[x.length-c],f._$={first_line:y[y.length-(c||1)].first_line,last_line:y[y.length-1].last_line,first_column:y[y.length-(c||1)].first_column,last_column:y[y.length-1].last_column},z&&(f._$.range=[y[y.length-(c||1)].range[0],y[y.length-1].range[1]]),n=this.performAction.apply(f,[M,N,T,P.yy,I[1],x,y].concat(R)),typeof n<"u")return n;c&&(l=l.slice(0,-1*c*2),x=x.slice(0,-1*c),y=y.slice(0,-1*c)),l.push(this.productions_[I[1]][0]),x.push(f.$),y.push(f._$),r=v[l[l.length-2]][l[l.length-1]],l.push(r);break;case 3:return!0}}return!0},"parse")},b=(function(){var k={EOF:1,parseError:g(function(o,l){if(this.yy.parser)this.yy.parser.parseError(o,l);else throw new Error(o)},"parseError"),setInput:g(function(s,o){return this.yy=o||this.yy||{},this._input=s,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:g(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var o=s.match(/(?:\r\n?|\n).*/g);return o?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},"input"),unput:g(function(s){var o=s.length,l=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-o),this.offset-=o;var _=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),l.length-1&&(this.yylineno-=l.length-1);var x=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:l?(l.length===_.length?this.yylloc.first_column:0)+_[_.length-l.length].length-l[0].length:this.yylloc.first_column-o},this.options.ranges&&(this.yylloc.range=[x[0],x[0]+this.yyleng-o]),this.yyleng=this.yytext.length,this},"unput"),more:g(function(){return this._more=!0,this},"more"),reject:g(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
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:g(function(s){this.unput(this.match.slice(s))},"less"),pastInput:g(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:g(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:g(function(){var s=this.pastInput(),o=new Array(s.length+1).join("-");return s+this.upcomingInput()+`
5
+ `+o+"^"},"showPosition"),test_match:g(function(s,o){var l,_,x;if(this.options.backtrack_lexer&&(x={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&&(x.yylloc.range=this.yylloc.range.slice(0))),_=s[0].match(/(?:\r\n?|\n).*/g),_&&(this.yylineno+=_.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:_?_[_.length-1].length-_[_.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+s[0].length},this.yytext+=s[0],this.match+=s[0],this.matches=s,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(s[0].length),this.matched+=s[0],l=this.performAction.call(this,this.yy,this,o,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),l)return l;if(this._backtrack){for(var y in x)this[y]=x[y];return!1}return!1},"test_match"),next:g(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var s,o,l,_;this._more||(this.yytext="",this.match="");for(var x=this._currentRules(),y=0;y<x.length;y++)if(l=this._input.match(this.rules[x[y]]),l&&(!o||l[0].length>o[0].length)){if(o=l,_=y,this.options.backtrack_lexer){if(s=this.test_match(l,x[y]),s!==!1)return s;if(this._backtrack){o=!1;continue}else return!1}else if(!this.options.flex)break}return o?(s=this.test_match(o,x[_]),s!==!1?s:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:g(function(){var o=this.next();return o||this.lex()},"lex"),begin:g(function(o){this.conditionStack.push(o)},"begin"),popState:g(function(){var o=this.conditionStack.length-1;return o>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:g(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:g(function(o){return o=this.conditionStack.length-1-Math.abs(o||0),o>=0?this.conditionStack[o]:"INITIAL"},"topState"),pushState:g(function(o){this.begin(o)},"pushState"),stateStackSize:g(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:g(function(o,l,_,x){switch(_){case 0:return this.pushState("csv"),4;case 1:return this.pushState("csv"),4;case 2:return 10;case 3:return 5;case 4:return 12;case 5:return this.pushState("escaped_text"),18;case 6:return 20;case 7:return this.popState("escaped_text"),18;case 8:return 19}},"anonymous"),rules:[/^(?:sankey-beta\b)/i,/^(?:sankey\b)/i,/^(?:$)/i,/^(?:((\u000D\u000A)|(\u000A)))/i,/^(?:(\u002C))/i,/^(?:(\u0022))/i,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,/^(?:(\u0022)(?!(\u0022)))/i,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],conditions:{csv:{rules:[2,3,4,5,6,7,8],inclusive:!1},escaped_text:{rules:[7,8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8],inclusive:!0}}};return k})();h.lexer=b;function p(){this.yy={}}return g(p,"Parser"),p.prototype=h,h.Parser=p,new p})();at.parser=at;var K=at,J=[],tt=[],Z=new Map,Zt=g(()=>{J=[],tt=[],Z=new Map,At()},"clear"),W,Jt=(W=class{constructor(e,i,a=0){this.source=e,this.target=i,this.value=a}},g(W,"SankeyLink"),W),te=g((t,e,i)=>{J.push(new Jt(t,e,i))},"addLink"),U,ee=(U=class{constructor(e){this.ID=e}},g(U,"SankeyNode"),U),ne=g(t=>{t=Tt.sanitizeText(t,lt());let e=Z.get(t);return e===void 0&&(e=new ee(t),Z.set(t,e),tt.push(e)),e},"findOrCreateNode"),ie=g(()=>tt,"getNodes"),se=g(()=>J,"getLinks"),re=g(()=>({nodes:tt.map(t=>({id:t.ID})),links:J.map(t=>({source:t.source.ID,target:t.target.ID,value:t.value}))}),"getGraph"),oe={nodesMap:Z,getConfig:g(()=>lt().sankey,"getConfig"),getNodes:ie,getLinks:se,getGraph:re,addLink:te,findOrCreateNode:ne,getAccTitle:St,setAccTitle:wt,getAccDescription:bt,setAccDescription:vt,getDiagramTitle:xt,setDiagramTitle:_t,clear:Zt},j,gt=(j=class{static next(e){return new j(e+ ++j.count)}constructor(e){this.id=e,this.href=`#${e}`}toString(){return"url("+this.href+")"}},g(j,"Uid"),j.count=0,j),ae={left:Ct,right:Ot,center:zt,justify:mt},le=g(function(t,e,i,a){const{securityLevel:h,sankey:b}=lt(),p=Lt.sankey;let k;h==="sandbox"&&(k=H("#i"+e));const s=h==="sandbox"?H(k.nodes()[0].contentDocument.body):H("body"),o=h==="sandbox"?s.select(`[id="${e}"]`):H(`[id="${e}"]`),l=b?.width??p.width,_=b?.height??p.width,x=b?.useMaxWidth??p.useMaxWidth,y=b?.nodeAlignment??p.nodeAlignment,v=b?.prefix??p.prefix,M=b?.suffix??p.suffix,T=b?.showValues??p.showValues,N=a.db.getGraph(),C=ae[y];Bt().nodeId(d=>d.id).nodeWidth(10).nodePadding(10+(T?15:0)).nodeAlign(C).extent([[0,0],[l,_]])(N);const S=Mt(It);o.append("g").attr("class","nodes").selectAll(".node").data(N.nodes).join("g").attr("class","node").attr("id",d=>(d.uid=gt.next("node-")).id).attr("transform",function(d){return"translate("+d.x0+","+d.y0+")"}).attr("x",d=>d.x0).attr("y",d=>d.y0).append("rect").attr("height",d=>d.y1-d.y0).attr("width",d=>d.x1-d.x0).attr("fill",d=>S(d.id));const P=g(({id:d,value:E})=>T?`${d}
7
+ ${v}${Math.round(E*100)/100}${M}`:d,"getText");o.append("g").attr("class","node-labels").attr("font-size",14).selectAll("text").data(N.nodes).join("text").attr("x",d=>d.x0<l/2?d.x1+6:d.x0-6).attr("y",d=>(d.y1+d.y0)/2).attr("dy",`${T?"0":"0.35"}em`).attr("text-anchor",d=>d.x0<l/2?"start":"end").text(P);const B=o.append("g").attr("class","links").attr("fill","none").attr("stroke-opacity",.5).selectAll(".link").data(N.links).join("g").attr("class","link").style("mix-blend-mode","multiply"),O=b?.linkColor??"gradient";if(O==="gradient"){const d=B.append("linearGradient").attr("id",E=>(E.uid=gt.next("linearGradient-")).id).attr("gradientUnits","userSpaceOnUse").attr("x1",E=>E.source.x1).attr("x2",E=>E.target.x0);d.append("stop").attr("offset","0%").attr("stop-color",E=>S(E.source.id)),d.append("stop").attr("offset","100%").attr("stop-color",E=>S(E.target.id))}let z;switch(O){case"gradient":z=g(d=>d.uid,"coloring");break;case"source":z=g(d=>S(d.source.id),"coloring");break;case"target":z=g(d=>S(d.target.id),"coloring");break;default:z=O}B.append("path").attr("d",Kt()).attr("stroke",z).attr("stroke-width",d=>Math.max(1,d.width)),Et(void 0,o,0,x)},"draw"),ce={draw:le},ue=g(t=>t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,`
8
+ `).trim(),"prepareTextForParsing"),he=g(t=>`.label {
9
+ font-family: ${t.fontFamily};
10
+ }`,"getStyles"),fe=he,ye=K.parse.bind(K);K.parse=t=>ye(ue(t));var ke={styles:fe,parser:K,db:oe,renderer:ce};export{ke as diagram};
@@ -0,0 +1 @@
1
+ import{e as c2,d as d2,A as h2,w as X,R as j,o as v2,f as g2,g as s,j as c,z as a,r as q,l as o,D as i,F as z,p as k,H as G,k as w2,v as m2,m as p2,y as x2,n as y2,O as C2,T as f2,P as k2,q as m,J as R,L as l2,M as b2,_ as M2}from"./FdVDP1dJ.js";var Y=(E,Q,r)=>new Promise((l,b)=>{var v=y=>{try{w(r.next(y))}catch(p){b(p)}},g=y=>{try{w(r.throw(y))}catch(p){b(p)}},w=y=>y.done?l(y.value):Promise.resolve(y.value).then(v,g);w((r=r.apply(E,Q)).next())});const a2=()=>M2(()=>import("./yG4UzpsV.js"),[],import.meta.url);let U=null,B2=a2;const D2={key:0},F2={key:1,class:"flex items-center gap-x-2 overflow-hidden"},T2=["src"],j2={key:2},E2={class:"flex items-center gap-x-1"},$2={class:"flex items-center gap-x-1"},z2={key:4},L2={key:5,class:"flex items-center gap-x-1"},_2=["aria-pressed"],P2={key:0,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"w-3 h-3"},Z2={key:1,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"w-3 h-3"},H2=["disabled"],I2=["disabled"],S2={key:0,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"0.75rem",height:"0.75rem",viewBox:"0 0 24 24"},V2={key:1,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"0.75rem",height:"0.75rem",viewBox:"0 0 24 24"},O2={key:1,class:"relative"},X2={key:0,class:"absolute top-2 right-2 z-10 rounded-lg"},R2={class:"flex items-center gap-2 backdrop-blur rounded-lg"},Y2={class:"markstream-vue"},U2={class:"absolute top-6 right-6 z-50 flex items-center gap-2"},J=c2(d2({__name:"InfographicBlockNode",props:{node:{},maxHeight:{default:"500px"},loading:{type:Boolean,default:!0},isDark:{type:Boolean},showHeader:{type:Boolean,default:!0},showModeToggle:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showExportButton:{type:Boolean,default:!0},showFullscreenButton:{type:Boolean,default:!0},showZoomControls:{type:Boolean,default:!0}},emits:["copy","export","openModal"],setup(E,{emit:Q}){const r=E,{t:l}=h2(),b=m(!1),v=m(!1),g=m(),w=m(!1),y=m("360px"),p=m(!1),M=m(),L=m(null),f=m(1),B=m(0),D=m(0),F=m(!1),_=m({x:0,y:0}),P=R(()=>r.node.code);function K(t){return!t||t.disabled}function h(t,e,n="top"){if(K(t.currentTarget))return;const u=t,x=u?.clientX!=null&&u?.clientY!=null?{x:u.clientX,y:u.clientY}:void 0;l2(t.currentTarget,e,n,!1,x,r.isDark)}function d(){b2()}function W(t){if(K(t.currentTarget))return;const e=b.value?l("common.copied")||"Copied":l("common.copy")||"Copy",n=t,u=n?.clientX!=null&&n?.clientY!=null?{x:n.clientX,y:n.clientY}:void 0;l2(t.currentTarget,e,"top",!1,u,r.isDark)}function i2(){return Y(this,null,function*(){try{const t=P.value;typeof navigator<"u"&&navigator.clipboard&&typeof navigator.clipboard.writeText=="function"&&(yield navigator.clipboard.writeText(t)),b.value=!0,setTimeout(()=>{b.value=!1},1e3)}catch(t){console.error("Failed to copy:",t)}})}function e2(t){w.value=t==="source"}function s2(){var t;const e=(t=g.value)==null?void 0:t.querySelector("svg");e?(function(n){Y(this,null,function*(){try{const u=new XMLSerializer().serializeToString(n),x=new Blob([u],{type:"image/svg+xml;charset=utf-8"}),O=URL.createObjectURL(x);if(typeof document<"u"){const $=document.createElement("a");$.href=O,$.download=`infographic-${Date.now()}.svg`;try{document.body.appendChild($),$.click(),document.body.removeChild($)}catch{}URL.revokeObjectURL(O)}}catch(u){console.error("Failed to export SVG:",u)}})})(e):console.error("SVG element not found")}function N(t){t.key==="Escape"&&p.value&&A()}function A(){if(p.value=!1,M.value&&(M.value.innerHTML=""),L.value=null,typeof document<"u")try{document.body.style.overflow=""}catch{}if(typeof window<"u")try{window.removeEventListener("keydown",N)}catch{}}function u2(){(function(){if(p.value=!0,typeof document<"u")try{document.body.style.overflow="hidden"}catch{}if(typeof window<"u")try{window.addEventListener("keydown",N)}catch{}j(()=>{if(g.value&&M.value){M.value.innerHTML="";const t=document.createElement("div");t.style.transition="transform 0.1s ease",t.style.transformOrigin="center center",t.style.width="100%",t.style.height="100%",t.style.display="flex",t.style.alignItems="center",t.style.justifyContent="center";const e=g.value.cloneNode(!0);e.classList.add("fullscreen"),e.style.height="auto",t.appendChild(e),M.value.appendChild(t),L.value=t,t.style.transform=`translate(${B.value}px, ${D.value}px) scale(${f.value})`}})})()}function t2(){f.value<3&&(f.value+=.1)}function o2(){f.value>.5&&(f.value-=.1)}function n2(){f.value=1,B.value=0,D.value=0}function Z(t){F.value=!0,t instanceof MouseEvent?_.value={x:t.clientX-B.value,y:t.clientY-D.value}:_.value={x:t.touches[0].clientX-B.value,y:t.touches[0].clientY-D.value}}function H(t){if(!F.value)return;let e,n;t instanceof MouseEvent?(e=t.clientX,n=t.clientY):(e=t.touches[0].clientX,n=t.touches[0].clientY),B.value=e-_.value.x,D.value=n-_.value.y}function T(){F.value=!1}let C=null;function I(){return Y(this,null,function*(){var t;if(g.value)try{const e=yield(function(){return Y(this,null,function*(){if(U)return U;const n=B2;if(!n)return null;let u;try{u=yield n()}catch(O){throw n===a2?new Error('Optional dependency "@antv/infographic" is not installed. Please install it to enable infographic diagrams.'):O}if(!u)return null;const x=u&&u.default?u.default:u;return U=typeof x=="function"&&x.prototype&&x.prototype.render?x:u.Infographic?u.Infographic:x&&x.Infographic?x.Infographic:x,U})})();if(!e)return void console.warn("Infographic library failed to load.");C&&((t=C.destroy)==null||t.call(C),C=null),g.value.innerHTML="",C=new e({container:g.value,width:"100%",height:"100%"}),C.render(P.value),j(()=>{if(g.value){const n=g.value.scrollHeight;n>0&&(y.value=`${Math.min(n,800)}px`)}})}catch(e){console.error("Failed to render infographic:",e),g.value&&(g.value.innerHTML=`<div class="text-red-500 p-4">Failed to render infographic: ${e instanceof Error?e.message:"Unknown error"}</div>`)}})}X(()=>P.value,()=>{w.value||v.value||j(()=>{I()})}),X(()=>w.value,t=>{t||v.value||j(()=>{I()})}),X(()=>v.value,t=>{t||w.value||j(()=>{I()})}),v2(()=>{w.value||v.value||j(()=>{I()})}),g2(()=>{var t;if(C&&((t=C.destroy)==null||t.call(C),C=null),typeof window<"u")try{window.removeEventListener("keydown",N)}catch{}});const S=R(()=>r.isDark?"infographic-action-btn p-2 text-xs rounded text-gray-400 hover:bg-gray-700 hover:text-gray-200":"infographic-action-btn p-2 text-xs rounded text-gray-600 hover:bg-gray-200 hover:text-gray-700"),V=R(()=>w.value||v.value),r2=R(()=>({transform:`translate(${B.value}px, ${D.value}px) scale(${f.value})`}));return X(r2,t=>{p.value&&L.value&&(L.value.style.transform=t.transform)}),(t,e)=>(s(),c("div",{class:a(["my-4 rounded-lg border overflow-hidden shadow-sm",[r.isDark?"border-gray-700/30":"border-gray-200",{"is-rendering":r.loading}]])},[r.showHeader?(s(),c("div",{key:0,class:a(["infographic-block-header flex justify-between items-center px-4 py-2.5 border-b",r.isDark?"bg-gray-800 border-gray-700/30":"bg-gray-50 border-gray-200"])},[t.$slots["header-left"]?(s(),c("div",D2,[q(t.$slots,"header-left",{},void 0,!0)])):(s(),c("div",F2,[o("img",{src:i("data:image/svg+xml,%3csvg%20width='15.52'%20height='16'%20viewBox='0%200%20291%20300'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%3e%3cpath%20d='M140.904%20239.376C128.83%20239.683%20119.675%20239.299%20115.448%20243.843C110.902%20248.07%20111.288%20257.227%20110.979%20269.302C111.118%20274.675%20111.118%20279.478%20111.472%20283.52C111.662%20285.638%20111.95%20287.547%20112.406%20289.224C112.411%20289.243%20112.416%20289.259%20112.422%20289.28C112.462%20289.419%20112.496%20289.558%20112.539%20289.691C113.168%20291.787%20114.088%20293.491%20115.446%20294.758C116.662%20296.064%20118.283%20296.963%20120.264%20297.59C120.36%20297.614%20120.464%20297.646%20120.555%20297.675C120.56%20297.68%20120.56%20297.68%20120.566%20297.68C120.848%20297.768%20121.142%20297.846%20121.443%20297.923C121.454%20297.923%20121.464%20297.928%20121.478%20297.934C122.875%20298.272%20124.424%20298.507%20126.11%20298.678C126.326%20298.696%20126.542%20298.718%20126.763%20298.739C130.79%20299.086%20135.558%20299.088%20140.904%20299.222C152.974%20298.912%20162.128%20299.302%20166.36%20294.758C170.904%20290.526%20170.515%20281.371%20170.824%20269.302C170.515%20257.227%20170.907%20248.07%20166.36%20243.843C162.131%20239.299%20152.974%20239.683%20140.904%20239.376Z'%20fill='%23FF6376'%3e%3c/path%3e%3cpath%20d='M21.2155%20128.398C12.6555%20128.616%206.16484%20128.339%203.16751%20131.56C-0.0538222%20134.56%200.218178%20141.054%20-0.000488281%20149.608C0.218178%20158.168%20-0.0538222%20164.659%203.16751%20167.656C6.16484%20170.878%2012.6555%20170.606%2021.2155%20170.824C25.0262%20170.726%2028.4288%20170.726%2031.2955%20170.475C32.7968%20170.342%2034.1488%20170.136%2035.3382%20169.814C35.3542%20169.811%2035.3648%20169.806%2035.3782%20169.803C35.4768%20169.774%2035.5755%20169.747%2035.6688%20169.718C37.1568%20169.272%2038.3648%20168.622%2039.2635%20167.656C40.1915%20166.795%2040.8262%20165.646%2041.2715%20164.243C41.2875%20164.174%2041.3115%20164.102%2041.3328%20164.035C41.3328%20164.035%2041.3355%20164.032%2041.3355%20164.027C41.3968%20163.827%2041.4529%20163.622%2041.5062%20163.406C41.5062%20163.398%2041.5115%20163.392%2041.5142%20163.382C41.7542%20162.392%2041.9222%20161.294%2042.0422%20160.096C42.0555%20159.944%2042.0715%20159.792%2042.0848%20159.635C42.3328%20156.779%2042.3328%20153.398%2042.4262%20149.608C42.2075%20141.054%2042.4848%20134.56%2039.2635%20131.56C36.2635%20128.339%2029.7728%20128.616%2021.2155%20128.398Z'%20fill='%23FFCCCC'%3e%3c/path%3e%3cpath%20d='M81.0595%20184.171C70.8568%20184.433%2063.1208%20184.102%2059.5475%20187.942C55.7075%20191.518%2056.0328%20199.254%2055.7742%20209.454C56.0328%20219.657%2055.7075%20227.393%2059.5475%20230.963C63.1208%20234.803%2070.8568%20234.478%2081.0595%20234.739C85.6008%20234.622%2089.6595%20234.622%2093.0728%20234.323C94.8648%20234.163%2096.4755%20233.921%2097.8942%20233.534C97.9102%20233.529%2097.9235%20233.526%2097.9422%20233.521C98.0568%20233.486%2098.1742%20233.457%2098.2888%20233.422C100.06%20232.889%20101.5%20232.113%20102.569%20230.963C103.676%20229.937%20104.433%20228.566%20104.964%20226.894C104.985%20226.811%20105.012%20226.726%20105.036%20226.646C105.041%20226.643%20105.041%20226.643%20105.041%20226.638C105.116%20226.401%20105.18%20226.153%20105.244%20225.897C105.244%20225.889%20105.249%20225.881%20105.254%20225.867C105.54%20224.689%20105.74%20223.379%20105.881%20221.953C105.9%20221.771%20105.916%20221.59%20105.934%20221.403C106.228%20218.001%20106.228%20213.969%20106.342%20209.454C106.081%20199.254%20106.412%20191.518%20102.572%20187.942C98.9955%20184.102%2091.2568%20184.433%2081.0595%20184.171Z'%20fill='%23FF939F'%3e%3c/path%3e%3cpath%20d='M260.591%20151.87C215.652%20151.87%20203.02%20164.523%20203.02%20209.462H198.476C198.476%20164.523%20185.836%20151.881%20140.895%20151.881V147.337C185.836%20147.337%20198.487%20134.705%20198.487%2089.7659H203.02C203.02%20134.705%20215.652%20147.337%20260.591%20147.337V151.87ZM286.052%20124.158C281.82%20119.614%20272.66%20120.001%20260.591%20119.689C248.521%20119.385%20239.361%20119.771%20235.129%20115.227C230.585%20110.995%20230.983%20101.846%20230.671%2089.7659C230.513%2083.7312%20230.535%2078.4272%20230.023%2074.1019C229.513%2069.7659%20228.481%2066.4219%20226.209%2064.3046C221.967%2059.7606%20212.817%2060.1472%20200.748%2059.8459C188.681%2060.1472%20179.519%2059.7606%20175.287%2064.3046C170.753%2068.5366%20171.129%2077.6966%20170.828%2089.7659C170.516%20101.835%20170.9%20110.995%20166.356%20115.227C162.124%20119.771%20152.985%20119.374%20140.905%20119.689C138.873%20119.739%20136.924%20119.771%20135.071%20119.811C119.313%20118.697%20106.337%20112.318%20106.337%2089.7659C106.212%2084.6699%20106.233%2080.1792%20105.807%2076.5206C105.367%2072.8726%20104.492%2070.0379%20102.575%2068.2566C99.0013%2064.4112%2091.2573%2064.7446%2081.0653%2064.4832C70.86%2064.7446%2063.1186%2064.4112%2059.5533%2068.2566C55.708%2071.8299%2056.0306%2079.5632%2055.7693%2089.7659C56.0306%2099.9686%2055.708%20107.702%2059.5533%20111.278C63.1186%20115.113%2070.86%20114.79%2081.0653%20115.049C103.617%20115.049%20109.996%20128.035%20111.1%20143.803C111.068%20145.659%20111.028%20147.587%20110.975%20149.619C111.121%20154.987%20111.121%20159.79%20111.476%20163.835C111.663%20165.95%20111.945%20167.857%20112.404%20169.534C112.412%20169.555%20112.412%20169.566%20112.423%20169.598C112.465%20169.734%20112.497%20169.867%20112.537%20170.003C113.164%20172.099%20114.092%20173.809%20115.447%20175.07C116.665%20176.371%20118.281%20177.278%20120.271%20177.905C120.364%20177.934%20120.46%20177.955%20120.564%20177.987C120.855%20178.081%20121.145%20178.153%20121.439%20178.238C121.46%20178.238%20121.471%20178.238%20121.479%20178.249C122.876%20178.582%20124.42%20178.822%20126.108%20178.987C126.327%20179.009%20126.545%20179.03%20126.764%20179.051C130.788%20179.395%20135.559%20179.395%20140.905%20179.529C152.975%20179.843%20162.124%20179.457%20166.356%20184.001C170.9%20188.233%20170.516%20197.371%20170.828%20209.451C171.129%20221.529%20170.743%20230.681%20175.287%20234.91C179.519%20239.454%20188.681%20239.07%20200.748%20239.371C206.127%20239.235%20210.921%20239.235%20214.975%20238.881C217.079%20238.694%20218.985%20238.403%20220.676%20237.955C220.695%20237.945%20220.705%20237.934%20220.727%20237.934C220.873%20237.891%20220.999%20237.859%20221.135%20237.819C223.228%20237.193%20224.937%20236.265%20226.209%20234.91C227.511%20233.691%20228.409%20232.065%20229.044%20230.097C229.065%20230.003%20229.095%20229.899%20229.127%20229.803V229.793C229.22%20229.513%20229.295%20229.222%20229.367%20228.918C229.367%20228.897%20229.377%20228.897%20229.377%20228.878C229.721%20227.481%20229.951%20225.937%20230.127%20224.249C230.137%20224.03%20230.169%20223.811%20230.191%20223.593C230.535%20219.571%20230.535%20214.798%20230.671%20209.451C230.972%20197.371%20230.585%20188.233%20235.129%20184.001C239.361%20179.457%20248.511%20179.843%20260.591%20179.529C272.66%20179.227%20281.82%20179.614%20286.052%20175.07C290.596%20170.838%20290.209%20161.689%20290.511%20149.619C290.209%20137.539%20290.596%20128.379%20286.052%20124.158Z'%20fill='%23FF356A'%3e%3c/path%3e%3cpath%20d='M112.405%2049.848C112.411%2049.8694%20112.416%2049.8827%20112.421%2049.904C112.461%2050.0427%20112.499%2050.1814%20112.539%2050.3147C113.171%2052.4134%20114.088%2054.1147%20115.448%2055.384C116.661%2056.6907%20118.283%2057.5894%20120.264%2058.2134C120.36%2058.24%20120.464%2058.2694%20120.555%2058.3014C120.56%2058.3067%20120.56%2058.3067%20120.565%2058.3067C120.848%2058.3947%20121.141%2058.4694%20121.443%2058.5467C121.453%2058.5467%20121.464%2058.552%20121.48%2058.5574C122.875%2058.896%20124.424%2059.1334%20126.112%2059.3014C126.325%2059.3227%20126.541%2059.3414%20126.763%2059.3627C130.789%2059.712%20135.56%2059.712%20140.904%2059.8454C152.973%2059.5387%20162.128%2059.928%20166.36%2055.384C170.907%2051.152%20170.515%2041.9947%20170.824%2029.9254C170.517%2017.8507%20170.907%208.69602%20166.363%204.46935C162.131%20-0.0746511%20152.973%200.309349%20140.904%201.52588e-05C128.829%200.309349%20119.675%20-0.0746511%20115.448%204.46935C110.904%208.69602%20111.288%2017.8507%20110.979%2029.9254C111.117%2035.3014%20111.117%2040.1014%20111.472%2044.144C111.661%2046.2614%20111.949%2048.1707%20112.405%2049.848Z'%20fill='%23FF6376'%3e%3c/path%3e%3c/g%3e%3c/svg%3e"),class:"w-4 h-4 my-0",alt:"Infographic"},null,8,T2),o("span",{class:a(["text-sm font-medium font-mono truncate",r.isDark?"text-gray-400":"text-gray-600"])},"Infographic",2)])),t.$slots["header-center"]?(s(),c("div",j2,[q(t.$slots,"header-center",{},void 0,!0)])):r.showModeToggle?(s(),c("div",{key:3,class:a(["flex items-center gap-x-1 rounded-md p-0.5",r.isDark?"bg-gray-700":"bg-gray-100"])},[o("button",{class:a(["px-2.5 py-1 text-xs rounded transition-colors",[w.value?r.isDark?"text-gray-400 hover:text-gray-200":"text-gray-500 hover:text-gray-700":r.isDark?"bg-gray-600 text-gray-200 shadow-sm":"bg-white text-gray-700 shadow-sm"]]),onClick:e[0]||(e[0]=()=>e2("preview")),onMouseenter:e[1]||(e[1]=n=>h(n,i(l)("common.preview")||"Preview")),onFocus:e[2]||(e[2]=n=>h(n,i(l)("common.preview")||"Preview")),onMouseleave:d,onBlur:d},[o("div",E2,[e[21]||(e[21]=o("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"w-3 h-3"},[o("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[o("path",{d:"M2.062 12.348a1 1 0 0 1 0-.696a10.75 10.75 0 0 1 19.876 0a1 1 0 0 1 0 .696a10.75 10.75 0 0 1-19.876 0"}),o("circle",{cx:"12",cy:"12",r:"3"})])],-1)),o("span",null,z(i(l)("common.preview")||"Preview"),1)])],34),o("button",{class:a(["px-2.5 py-1 text-xs rounded transition-colors",[w.value?r.isDark?"bg-gray-600 text-gray-200 shadow-sm":"bg-white text-gray-700 shadow-sm":r.isDark?"text-gray-400 hover:text-gray-200":"text-gray-500 hover:text-gray-700"]]),onClick:e[3]||(e[3]=()=>e2("source")),onMouseenter:e[4]||(e[4]=n=>h(n,i(l)("common.source")||"Source")),onFocus:e[5]||(e[5]=n=>h(n,i(l)("common.source")||"Source")),onMouseleave:d,onBlur:d},[o("div",$2,[e[22]||(e[22]=o("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"w-3 h-3"},[o("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m16 18l6-6l-6-6M8 6l-6 6l6 6"})],-1)),o("span",null,z(i(l)("common.source")||"Source"),1)])],34)],2)):k("",!0),t.$slots["header-right"]?(s(),c("div",z2,[q(t.$slots,"header-right",{},void 0,!0)])):(s(),c("div",L2,[r.showCollapseButton?(s(),c("button",{key:0,class:a(S.value),"aria-pressed":v.value,onClick:e[6]||(e[6]=n=>v.value=!v.value),onMouseenter:e[7]||(e[7]=n=>h(n,v.value?i(l)("common.expand")||"Expand":i(l)("common.collapse")||"Collapse")),onFocus:e[8]||(e[8]=n=>h(n,v.value?i(l)("common.expand")||"Expand":i(l)("common.collapse")||"Collapse")),onMouseleave:d,onBlur:d},[(s(),c("svg",{style:G({rotate:v.value?"0deg":"90deg"}),xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"w-3 h-3"},[...e[23]||(e[23]=[o("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18l6-6l-6-6"},null,-1)])],4))],42,_2)):k("",!0),r.showCopyButton?(s(),c("button",{key:1,class:a(S.value),onClick:i2,onMouseenter:e[9]||(e[9]=n=>W(n)),onFocus:e[10]||(e[10]=n=>W(n)),onMouseleave:d,onBlur:d},[b.value?(s(),c("svg",Z2,[...e[25]||(e[25]=[o("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"},null,-1)])])):(s(),c("svg",P2,[...e[24]||(e[24]=[o("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[o("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}),o("path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"})],-1)])]))],34)):k("",!0),r.showExportButton?(s(),c("button",{key:2,class:a(`${S.value} ${V.value?"opacity-50 cursor-not-allowed":""}`),disabled:V.value,onClick:s2,onMouseenter:e[11]||(e[11]=n=>h(n,i(l)("common.export")||"Export")),onFocus:e[12]||(e[12]=n=>h(n,i(l)("common.export")||"Export")),onMouseleave:d,onBlur:d},[...e[26]||(e[26]=[o("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"w-3 h-3"},[o("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[o("path",{d:"M12 15V3m9 12v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),o("path",{d:"m7 10l5 5l5-5"})])],-1)])],42,H2)):k("",!0),r.showFullscreenButton?(s(),c("button",{key:3,class:a(`${S.value} ${V.value?"opacity-50 cursor-not-allowed":""}`),disabled:V.value,onClick:u2,onMouseenter:e[13]||(e[13]=n=>h(n,p.value?i(l)("common.minimize")||"Minimize":i(l)("common.open")||"Open")),onFocus:e[14]||(e[14]=n=>h(n,p.value?i(l)("common.minimize")||"Minimize":i(l)("common.open")||"Open")),onMouseleave:d,onBlur:d},[p.value?(s(),c("svg",V2,[...e[28]||(e[28]=[o("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m14 10l7-7m-1 7h-6V4M3 21l7-7m-6 0h6v6"},null,-1)])])):(s(),c("svg",S2,[...e[27]||(e[27]=[o("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6"},null,-1)])]))],42,I2)):k("",!0)]))],2)):k("",!0),w2(o("div",null,[w.value?(s(),c("div",{key:0,class:a(["p-4",r.isDark?"bg-gray-900":"bg-gray-50"])},[o("pre",{class:a(["text-sm font-mono whitespace-pre-wrap",r.isDark?"text-gray-300":"text-gray-700"])},z(P.value),3)],2)):(s(),c("div",O2,[r.showZoomControls?(s(),c("div",X2,[o("div",R2,[o("button",{class:a(["p-2 text-xs rounded transition-colors",[r.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"]]),onClick:t2,onMouseenter:e[15]||(e[15]=n=>h(n,i(l)("common.zoomIn")||"Zoom in")),onFocus:e[16]||(e[16]=n=>h(n,i(l)("common.zoomIn")||"Zoom in")),onMouseleave:d,onBlur:d},[...e[29]||(e[29]=[o("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"w-3 h-3"},[o("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[o("circle",{cx:"11",cy:"11",r:"8"}),o("path",{d:"m21 21l-4.35-4.35M11 8v6m-3-3h6"})])],-1)])],34),o("button",{class:a(["p-2 text-xs rounded transition-colors",[r.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"]]),onClick:o2,onMouseenter:e[17]||(e[17]=n=>h(n,i(l)("common.zoomOut")||"Zoom out")),onFocus:e[18]||(e[18]=n=>h(n,i(l)("common.zoomOut")||"Zoom out")),onMouseleave:d,onBlur:d},[...e[30]||(e[30]=[o("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"w-3 h-3"},[o("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[o("circle",{cx:"11",cy:"11",r:"8"}),o("path",{d:"m21 21l-4.35-4.35M8 11h6"})])],-1)])],34),o("button",{class:a(["p-2 text-xs rounded transition-colors",[r.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"]]),onClick:n2,onMouseenter:e[19]||(e[19]=n=>h(n,i(l)("common.resetZoom")||"Reset zoom")),onFocus:e[20]||(e[20]=n=>h(n,i(l)("common.resetZoom")||"Reset zoom")),onMouseleave:d,onBlur:d},z(Math.round(100*f.value))+"% ",35)])])):k("",!0),o("div",{class:a(["min-h-[360px] relative transition-all duration-100 overflow-hidden block",r.isDark?"bg-gray-900":"bg-gray-50"]),style:G({height:y.value}),onMousedown:Z,onMousemove:H,onMouseup:T,onMouseleave:T,onTouchstartPassive:Z,onTouchmovePassive:H,onTouchendPassive:T},[o("div",{class:a(["absolute inset-0 cursor-grab",{"cursor-grabbing":F.value}]),style:G(r2.value)},[o("div",{ref_key:"infographicContainer",ref:g,class:"w-full text-center flex items-center justify-center min-h-full"},null,512)],6)],38)]))],512),[[m2,!v.value]]),(s(),p2(k2,{to:"body"},[o("div",Y2,[x2(f2,{name:"infographic-dialog",appear:""},{default:y2(()=>[p.value?(s(),c("div",{key:0,class:"fixed inset-0 z-50 flex items-center justify-center bg-black/70 p-4",onClick:C2(A,["self"])},[o("div",{class:a(["dialog-panel relative w-full h-full max-w-full max-h-full rounded shadow-lg overflow-hidden",r.isDark?"bg-gray-900":"bg-white"])},[o("div",U2,[o("button",{class:a(["p-2 text-xs rounded transition-colors",[r.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"]]),onClick:t2},[...e[31]||(e[31]=[o("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"w-3 h-3"},[o("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[o("circle",{cx:"11",cy:"11",r:"8"}),o("path",{d:"m21 21l-4.35-4.35M11 8v6m-3-3h6"})])],-1)])],2),o("button",{class:a(["p-2 text-xs rounded transition-colors",[r.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"]]),onClick:o2},[...e[32]||(e[32]=[o("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"w-3 h-3"},[o("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[o("circle",{cx:"11",cy:"11",r:"8"}),o("path",{d:"m21 21l-4.35-4.35M8 11h6"})])],-1)])],2),o("button",{class:a(["p-2 text-xs rounded transition-colors",[r.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"]]),onClick:n2},z(Math.round(100*f.value))+"% ",3),o("button",{class:a(["inline-flex items-center justify-center p-2 rounded transition-colors",[r.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"]]),onClick:A},[...e[33]||(e[33]=[o("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"w-3 h-3"},[o("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M18 6L6 18M6 6l12 12"})],-1)])],2)]),o("div",{ref_key:"modalContent",ref:M,class:a(["w-full h-full flex items-center justify-center p-4 overflow-hidden",{"cursor-grab":!F.value,"cursor-grabbing":F.value}]),onMousedown:Z,onMousemove:H,onMouseup:T,onMouseleave:T,onTouchstartPassive:Z,onTouchmovePassive:H,onTouchendPassive:T},null,34)],2)])):k("",!0)]),_:1})])]))],2))}}),[["__scopeId","data-v-811a9bef"]]);J.install=E=>{E.component(J.__name,J)};export{J as default};