@agent-link/server 0.1.514 → 0.1.516
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/web/dist/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
- package/web/dist/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
- package/web/dist/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
- package/web/dist/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
- package/web/dist/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
- package/web/dist/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
- package/web/dist/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
- package/web/dist/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
- package/web/dist/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
- package/web/dist/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
- package/web/dist/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
- package/web/dist/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
- package/web/dist/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
- package/web/dist/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
- package/web/dist/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
- package/web/dist/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
- package/web/dist/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
- package/web/dist/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
- package/web/dist/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
- package/web/dist/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
- package/web/dist/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
- package/web/dist/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
- package/web/dist/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
- package/web/dist/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
- package/web/dist/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
- package/web/dist/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
- package/web/dist/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
- package/web/dist/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
- package/web/dist/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
- package/web/dist/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
- package/web/dist/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
- package/web/dist/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
- package/web/dist/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
- package/web/dist/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
- package/web/dist/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
- package/web/dist/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
- package/web/dist/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
- package/web/dist/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
- package/web/dist/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
- package/web/dist/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
- package/web/dist/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
- package/web/dist/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
- package/web/dist/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
- package/web/dist/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
- package/web/dist/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
- package/web/dist/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
- package/web/dist/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
- package/web/dist/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
- package/web/dist/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
- package/web/dist/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
- package/web/dist/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
- package/web/dist/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
- package/web/dist/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
- package/web/dist/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
- package/web/dist/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
- package/web/dist/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
- package/web/dist/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
- package/web/dist/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
- package/web/dist/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
- package/web/dist/assets/abnfDiagram-VRR7QNED-BUjsT5Jl.js +1 -0
- package/web/dist/assets/arc-g7pWmx0C.js +1 -0
- package/web/dist/assets/architectureDiagram-ZJ3FMSHR-DdY1zStg.js +1 -0
- package/web/dist/assets/blockDiagram-677ZJIJ3-p821t5EL.js +1 -0
- package/web/dist/assets/c4Diagram-LMCZKHZV-BDxSF0rZ.js +1 -0
- package/web/dist/assets/channel-DZ15n_vn.js +1 -0
- package/web/dist/assets/chunk-2Q5K7J3B-B6At725E.js +1 -0
- package/web/dist/assets/chunk-32BRIVSS-ByOJtY8z.js +1 -0
- package/web/dist/assets/chunk-5VM5RSS4-DodNdju3.js +1 -0
- package/web/dist/assets/chunk-EX3LRPZG-BbkcflSb.js +1 -0
- package/web/dist/assets/chunk-JWPE2WC7-Cbd64bDm.js +1 -0
- package/web/dist/assets/chunk-MOJQB5TN-BCdBF-nP.js +1 -0
- package/web/dist/assets/chunk-RYQCIY6F-C25IRTcm.js +1 -0
- package/web/dist/assets/chunk-V7JOEXUC-CTFuOUPA.js +1 -0
- package/web/dist/assets/chunk-VR4S4FIN-DGfPvqRe.js +1 -0
- package/web/dist/assets/chunk-XXDRQBXY-B487xPKi.js +1 -0
- package/web/dist/assets/classDiagram-OUVF2IWQ-D4kzK_ro.js +1 -0
- package/web/dist/assets/classDiagram-v2-EOCWNBFH-D4kzK_ro.js +1 -0
- package/web/dist/assets/cose-bilkent-JH36ORCC-DUMkrDFK.js +1 -0
- package/web/dist/assets/{cssMode-BVP-lg8e.js → cssMode-CdsyJmus.js} +1 -1
- package/web/dist/assets/cynefin-VYW2F7L2-BlGVzc2_.js +15 -0
- package/web/dist/assets/cynefinDiagram-TSTJHNR4-PoQ0yMv9.js +1 -0
- package/web/dist/assets/cytoscape.esm-t-ybqhnH.js +9 -0
- package/web/dist/assets/dagre-VKFMJZFB-BWyn717Z.js +1 -0
- package/web/dist/assets/defaultLocale-BsH76t_G.js +1 -0
- package/web/dist/assets/diagram-FQU43EPY-B3lehSFh.js +1 -0
- package/web/dist/assets/diagram-G47NLZAW-CVRsDrwp.js +1 -0
- package/web/dist/assets/diagram-NH7WQ7WH-DPlGYep5.js +1 -0
- package/web/dist/assets/diagram-OA4YK3LP-DmAZvYGW.js +1 -0
- package/web/dist/assets/diagram-WEI45ONY-BKU8fuXs.js +1 -0
- package/web/dist/assets/ebnfDiagram-CCIWWBDH-DCw-gQk-.js +1 -0
- package/web/dist/assets/{editor.main-GMui43Hi.js → editor.main-BvdG8I8J.js} +3 -3
- package/web/dist/assets/erDiagram-Q63AITRT-B83I2lOG.js +1 -0
- package/web/dist/assets/flowDiagram-23GEKE2U-ntdq9hFf.js +1 -0
- package/web/dist/assets/{freemarker2-BIV1vE86.js → freemarker2-DheGgBGE.js} +1 -1
- package/web/dist/assets/ganttDiagram-NO4QXBWP-4DvbAFgY.js +1 -0
- package/web/dist/assets/gitGraphDiagram-IHSO6WYX-DpRPEjV6.js +1 -0
- package/web/dist/assets/graph-DaY0Al7L.js +1 -0
- package/web/dist/assets/{handlebars-DJpbpIyl.js → handlebars-CckrWHXt.js} +1 -1
- package/web/dist/assets/{html-Coanr1Wq.js → html-C43OYA91.js} +1 -1
- package/web/dist/assets/{htmlMode-D1FwOZyW.js → htmlMode-lFho_JTn.js} +1 -1
- package/web/dist/assets/index-CMoSnPi6.css +32 -0
- package/web/dist/assets/index-uJhfY-Ds.js +45 -0
- package/web/dist/assets/infoDiagram-FWYZ7A6U-1eJf2fJM.js +1 -0
- package/web/dist/assets/init-C0SZ43gy.js +1 -0
- package/web/dist/assets/ishikawaDiagram-FXEZZL3T-COJ6FHQU.js +1 -0
- package/web/dist/assets/{javascript-bCoiQwMM.js → javascript-BJV9A7A7.js} +1 -1
- package/web/dist/assets/journeyDiagram-5HDEW3XC-DTG6ApTa.js +1 -0
- package/web/dist/assets/{jsonMode-enM9TwR0.js → jsonMode-D4R8rHC6.js} +1 -1
- package/web/dist/assets/kanban-definition-HUTT4EX6-Ch9Vv2Ww.js +1 -0
- package/web/dist/assets/katex-0DbU9dfb.js +1 -0
- package/web/dist/assets/layout-C0UWAnD9.js +1 -0
- package/web/dist/assets/linear-BmFo1B75.js +1 -0
- package/web/dist/assets/{liquid-CszNaE-2.js → liquid-D3s3nyQz.js} +1 -1
- package/web/dist/assets/{lspLanguageFeatures-BDk6vcdq.js → lspLanguageFeatures-8aPLOpk2.js} +1 -1
- package/web/dist/assets/map-DupEyqkA.js +1 -0
- package/web/dist/assets/{mdx-kBp56vUn.js → mdx-DDTVuV3U.js} +1 -1
- package/web/dist/assets/mermaid.core-5jj-23N2.js +7 -0
- package/web/dist/assets/mindmap-definition-LN4V7U3C-DyoV-6vp.js +1 -0
- package/web/dist/assets/ordinal-CVjKTKEW.js +1 -0
- package/web/dist/assets/pegDiagram-2B236MQR-ByVdM12w.js +1 -0
- package/web/dist/assets/pieDiagram-ENE6RG2P-DWqHi0F2.js +1 -0
- package/web/dist/assets/{python-CqD2LrC5.js → python-CBtQzFsj.js} +1 -1
- package/web/dist/assets/quadrantDiagram-ABIIQ3AL-D-w-JKTm.js +1 -0
- package/web/dist/assets/railroadDiagram-RFXS5EU6-BiVVSb2K.js +1 -0
- package/web/dist/assets/{razor-CIX8et7e.js → razor-BJGBgvpK.js} +1 -1
- package/web/dist/assets/requirementDiagram-TGXJPOKE-CuLeAThk.js +1 -0
- package/web/dist/assets/sankeyDiagram-HTMAVEWB-DHKfF6mB.js +1 -0
- package/web/dist/assets/sequenceDiagram-DBY2YBRQ-Cmr2xhzm.js +1 -0
- package/web/dist/assets/sizeCapture-X5ZJPWSS-SdH7bebB.js +1 -0
- package/web/dist/assets/stateDiagram-2N3HPSRC-BLWksXfF.js +1 -0
- package/web/dist/assets/stateDiagram-v2-6OUMAXLB-gDBt9zc0.js +1 -0
- package/web/dist/assets/swimlanes-5IMT3BWC-v_nvNhJi.js +2 -0
- package/web/dist/assets/swimlanesDiagram-G3AALYLV-aCkqc0Za.js +1 -0
- package/web/dist/assets/timeline-definition-FHXFAJF6-D3qhITJm.js +1 -0
- package/web/dist/assets/{tsMode-BO5vf4Sq.js → tsMode-DxcojxIQ.js} +1 -1
- package/web/dist/assets/{typescript-DzvkAKiy.js → typescript-WJrpuPAD.js} +1 -1
- package/web/dist/assets/vennDiagram-L72KCM5P-B1aJUCUq.js +1 -0
- package/web/dist/assets/wardleyDiagram-EHGQE667-Dv9rOWSR.js +1 -0
- package/web/dist/assets/{xml-BXIbPO12.js → xml-C6uSUkGV.js} +1 -1
- package/web/dist/assets/xychartDiagram-FW5EYKEG-C_XjudM0.js +1 -0
- package/web/dist/assets/{yaml-COh21kph.js → yaml-BDwAJ4A_.js} +1 -1
- package/web/dist/index.html +2 -2
- package/web/dist/locales/en.json +7 -0
- package/web/dist/locales/zh.json +7 -0
- package/web/dist/assets/index-BYehqthn.js +0 -43
- package/web/dist/assets/index-CJbuaAi0.css +0 -32
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b3 as t,s as e,g as n,o as s,n as i,a as r,b as o,_ as a,y as l,D as c,d as h,ak as u,S as f,T as d,U as y,e as g,p as x,A as p,B as m}from"./mermaid.core-5jj-23N2.js";import"./index-uJhfY-Ds.js";const v=(e,n)=>t(e,"a",-n),b=1e-10;function I(t,e){const n=function(t){const e=[];for(let n=0;n<t.length;++n)for(let s=n+1;s<t.length;++s){const i=_(t[n],t[s]);for(const t of i)t.parentIndex=[n,s],e.push(t)}return e}(t),s=n.filter(e=>function(t,e){return e.every(e=>k(t,e)<e.radius+b)}(e,t));let i=0,r=0;const o=[];if(s.length>1){const e=S(s);for(let t=0;t<s.length;++t){const n=s[t];n.angle=Math.atan2(n.x-e.x,n.y-e.y)}s.sort((t,e)=>e.angle-t.angle);let n=s[s.length-1];for(let a=0;a<s.length;++a){const e=s[a];r+=(n.x+e.x)*(e.y-n.y);const l={x:(e.x+n.x)/2,y:(e.y+n.y)/2};let c=null;for(let s=0;s<e.parentIndex.length;++s)if(n.parentIndex.includes(e.parentIndex[s])){const i=t[e.parentIndex[s]],r=Math.atan2(e.x-i.x,e.y-i.y),o=Math.atan2(n.x-i.x,n.y-i.y);let a=o-r;a<0&&(a+=2*Math.PI);const h=o-a/2;let u=k(l,{x:i.x+i.radius*Math.sin(h),y:i.y+i.radius*Math.cos(h)});u>2*i.radius&&(u=2*i.radius),(null==c||c.width>u)&&(c={circle:i,width:u,p1:e,p2:n,large:u>i.radius,sweep:!0})}null!=c&&(o.push(c),i+=M(c.circle.radius,c.width),n=e)}}else{let e=t[0];for(let s=1;s<t.length;++s)t[s].radius<e.radius&&(e=t[s]);let n=!1;for(let s=0;s<t.length;++s)if(k(t[s],e)>Math.abs(e.radius-t[s].radius)){n=!0;break}n?i=r=0:(i=e.radius*e.radius*Math.PI,o.push({circle:e,p1:{x:e.x,y:e.y+e.radius},p2:{x:e.x-b,y:e.y+e.radius},width:2*e.radius,large:!0,sweep:!0}))}return r/=2,e&&(e.area=i+r,e.arcArea=i,e.polygonArea=r,e.arcs=o,e.innerPoints=s,e.intersectionPoints=n),i+r}function M(t,e){return t*t*Math.acos(1-e/t)-(t-e)*Math.sqrt(e*(2*t-e))}function k(t,e){return Math.sqrt((t.x-e.x)*(t.x-e.x)+(t.y-e.y)*(t.y-e.y))}function w(t,e,n){if(n>=t+e)return 0;if(n<=Math.abs(t-e))return Math.PI*Math.min(t,e)*Math.min(t,e);const s=e-(n*n-t*t+e*e)/(2*n);return M(t,t-(n*n-e*e+t*t)/(2*n))+M(e,s)}function _(t,e){const n=k(t,e),s=t.radius,i=e.radius;if(n>=s+i||n<=Math.abs(s-i))return[];const r=(s*s-i*i+n*n)/(2*n),o=Math.sqrt(s*s-r*r),a=t.x+r*(e.x-t.x)/n,l=t.y+r*(e.y-t.y)/n,c=-(e.y-t.y)*(o/n),h=-(e.x-t.x)*(o/n);return[{x:a+c,y:l-h},{x:a-c,y:l+h}]}function S(t){const e={x:0,y:0};for(const n of t)e.x+=n.x,e.y+=n.y;return e.x/=t.length,e.y/=t.length,e}function E(t){const e=new Array(t);for(let n=0;n<t;++n)e[n]=0;return e}function T(t,e){return E(t).map(()=>E(e))}function z(t,e){let n=0;for(let s=0;s<t.length;++s)n+=t[s]*e[s];return n}function A(t){return Math.sqrt(z(t,t))}function R(t,e,n){for(let s=0;s<e.length;++s)t[s]=e[s]*n}function D(t,e,n,s,i){for(let r=0;r<t.length;++r)t[r]=e*n[r]+s*i[r]}function N(t,e,n){const s=(n=n||{}).maxIterations||200*e.length,i=n.nonZeroDelta||1.05,r=n.zeroDelta||.001,o=n.minErrorDelta||1e-6,a=n.minErrorDelta||1e-5,l=void 0!==n.rho?n.rho:1,c=void 0!==n.chi?n.chi:2,h=void 0!==n.psi?n.psi:-.5,u=void 0!==n.sigma?n.sigma:.5;let f;const d=e.length,y=new Array(d+1);y[0]=e,y[0].fx=t(e),y[0].id=0;for(let I=0;I<d;++I){const n=e.slice();n[I]=n[I]?n[I]*i:r,y[I+1]=n,y[I+1].fx=t(n),y[I+1].id=I+1}function g(t){for(let e=0;e<t.length;e++)y[d][e]=t[e];y[d].fx=t.fx}const x=(t,e)=>t.fx-e.fx,p=e.slice(),m=e.slice(),v=e.slice(),b=e.slice();for(let I=0;I<s;++I){if(y.sort(x),n.history){const t=y.map(t=>{const e=t.slice();return e.fx=t.fx,e.id=t.id,e});t.sort((t,e)=>t.id-e.id),n.history.push({x:y[0].slice(),fx:y[0].fx,simplex:t})}f=0;for(let t=0;t<d;++t)f=Math.max(f,Math.abs(y[0][t]-y[1][t]));if(Math.abs(y[0].fx-y[d].fx)<o&&f<a)break;for(let t=0;t<d;++t){p[t]=0;for(let e=0;e<d;++e)p[t]+=y[e][t];p[t]/=d}const e=y[d];if(D(m,1+l,p,-l,e),m.fx=t(m),m.fx<y[0].fx)D(b,1+c,p,-c,e),b.fx=t(b),b.fx<m.fx?g(b):g(m);else if(m.fx>=y[d-1].fx){let n=!1;if(m.fx>e.fx?(D(v,1+h,p,-h,e),v.fx=t(v),v.fx<e.fx?g(v):n=!0):(D(v,1-h*l,p,h*l,e),v.fx=t(v),v.fx<m.fx?g(v):n=!0),n){if(u>=1)break;for(let e=1;e<y.length;++e)D(y[e],1-u,y[0],u,y[e]),y[e].fx=t(y[e])}}else g(m)}return y.sort(x),{fx:y[0].fx,x:y[0]}}function O(t,e,n,s,i,r,o){const a=n.fx,l=z(n.fxprime,e);let c=a,h=a,u=l,f=0;function d(h,f,d){for(let y=0;y<16;++y)if(i=(h+f)/2,D(s.x,1,n.x,i,e),c=s.fx=t(s.x,s.fxprime),u=z(s.fxprime,e),c>a+r*i*l||c>=d)f=i;else{if(Math.abs(u)<=-o*l)return i;u*(f-h)>=0&&(f=h),h=i,d=c}return 0}i=i||1,r=r||1e-6,o=o||.1;for(let y=0;y<10;++y){if(D(s.x,1,n.x,i,e),c=s.fx=t(s.x,s.fxprime),u=z(s.fxprime,e),c>a+r*i*l||y&&c>=h)return d(f,i,h);if(Math.abs(u)<=-o*l)return i;if(u>=0)return d(i,f,c);h=c,f=i,i*=2}return i}function C(t,e,n){let s={x:e.slice(),fx:0,fxprime:e.slice()},i={x:e.slice(),fx:0,fxprime:e.slice()};const r=e.slice();let o,a,l,c=1;l=(n=n||{}).maxIterations||20*e.length,s.fx=t(s.x,s.fxprime),o=s.fxprime.slice(),R(o,s.fxprime,-1);for(let h=0;h<l;++h){if(c=O(t,o,s,i,c),n.history&&n.history.push({x:s.x.slice(),fx:s.fx,fxprime:s.fxprime.slice(),alpha:c}),c){D(r,1,i.fxprime,-1,s.fxprime);const t=z(s.fxprime,s.fxprime);D(o,Math.max(0,z(r,i.fxprime)/t),o,-1,i.fxprime),a=s,s=i,i=a}else R(o,s.fxprime,-1);if(A(s.fxprime)<=1e-5)break}return n.history&&n.history.push({x:s.x.slice(),fx:s.fx,fxprime:s.fxprime.slice(),alpha:c}),s}function F(t,e={}){e.maxIterations=e.maxIterations||500;const n=e.initialLayout||P,s=e.lossFunction||L,i=function(t,e={}){const n=e.distinct,s=t.map(t=>Object.assign({},t));function i(t){return t.join(";")}if(n){const t=new Map;for(const e of s)for(let n=0;n<e.sets.length;n++){const s=String(e.sets[n]);t.set(s,e.size+(t.get(s)||0));for(let i=n+1;i<e.sets.length;i++){const n=String(e.sets[i]),r=`${s};${n}`,o=`${n};${s}`;t.set(r,e.size+(t.get(r)||0)),t.set(o,e.size+(t.get(o)||0))}}for(const e of s)e.sets.length<3&&(e.size=t.get(i(e.sets)))}const r=[],o=new Set;for(const a of s)if(1===a.sets.length)r.push(a.sets[0]);else if(2===a.sets.length){const t=a.sets[0],e=a.sets[1];o.add(i(a.sets)),o.add(i([e,t]))}r.sort((t,e)=>t===e?0:t<e?-1:1);for(let a=0;a<r.length;++a){const t=r[a];for(let e=a+1;e<r.length;++e){const n=r[e];o.has(i([t,n]))||s.push({sets:[t,n],size:0})}}return s}(t,e),r=n(i,e),o=Object.keys(r),a=[];for(const c of o)a.push(r[c].x),a.push(r[c].y);const l=N(t=>{const e={};for(let n=0;n<o.length;++n){const s=o[n];e[s]={x:t[2*n],y:t[2*n+1],radius:r[s].radius}}return s(e,i)},a,e).x;for(let c=0;c<o.length;++c){const t=o[c];r[t].x=l[2*c],r[t].y=l[2*c+1]}return r}const $=1e-10;function j(t,e,n){return Math.min(t,e)*Math.min(t,e)*Math.PI<=n+$?Math.abs(t-e):function(t,e,n,s){const i=(s=s||{}).maxIterations||100,r=s.tolerance||1e-10,o=t(e),a=t(n);let l=n-e;if(o*a>0)throw"Initial bisect points must have opposite signs";if(0===o)return e;if(0===a)return n;for(let c=0;c<i;++c){l/=2;const n=e+l,s=t(n);if(s*o>=0&&(e=n),Math.abs(l)<r||0===s)return n}return e+l}(s=>w(t,e,s)-n,0,t+e)}function P(t,e={}){let n=function(t,e){const n=e&&e.lossFunction?e.lossFunction:L,s={},i={};for(const u of t)if(1===u.sets.length){const t=u.sets[0];s[t]={x:1e10,y:1e10,rowid:s.length,size:u.size,radius:Math.sqrt(u.size/Math.PI)},i[t]=[]}t=t.filter(t=>2===t.sets.length);for(const u of t){let t=null!=u.weight?u.weight:1;const e=u.sets[0],n=u.sets[1];u.size+$>=Math.min(s[e].size,s[n].size)&&(t=0),i[e].push({set:n,size:u.size,weight:t}),i[n].push({set:e,size:u.size,weight:t})}const r=[];function o(t,e){return e.size-t.size}Object.keys(i).forEach(t=>{let e=0;for(let n=0;n<i[t].length;++n)e+=i[t][n].size*i[t][n].weight;r.push({set:t,size:e})}),r.sort(o);const a={};function l(t){return t.set in a}function c(t,e){s[e].x=t.x,s[e].y=t.y,a[e]=!0}c({x:0,y:0},r[0].set);for(let u=1;u<r.length;++u){const e=r[u].set,a=i[e].filter(l),f=s[e];if(a.sort(o),0===a.length)throw"ERROR: missing pairwise overlap information";const d=[];for(var h=0;h<a.length;++h){const t=s[a[h].set],e=j(f.radius,t.radius,a[h].size);d.push({x:t.x+e,y:t.y}),d.push({x:t.x-e,y:t.y}),d.push({y:t.y+e,x:t.x}),d.push({y:t.y-e,x:t.x});for(let n=h+1;n<a.length;++n){const i=s[a[n].set],r=j(f.radius,i.radius,a[n].size),o=_({x:t.x,y:t.y,radius:e},{x:i.x,y:i.y,radius:r});d.push(...o)}}let y=1e50,g=d[0];for(const i of d){s[e].x=i.x,s[e].y=i.y;const r=n(s,t);r<y&&(y=r,g=i)}c(g,e)}return s}(t,e);const s=e.lossFunction||L;if(t.length>=8){const i=function(t,e={}){const n=e.restarts||10,s=[],i={};for(const f of t)1===f.sets.length&&(i[f.sets[0]]=s.length,s.push(f));let{distances:r,constraints:o}=function(t,e,n){const s=T(e.length,e.length),i=T(e.length,e.length);return t.filter(t=>2===t.sets.length).forEach(t=>{const r=n[t.sets[0]],o=n[t.sets[1]],a=j(Math.sqrt(e[r].size/Math.PI),Math.sqrt(e[o].size/Math.PI),t.size);s[r][o]=s[o][r]=a;let l=0;t.size+1e-10>=Math.min(e[r].size,e[o].size)?l=1:t.size<=1e-10&&(l=-1),i[r][o]=i[o][r]=l}),{distances:s,constraints:i}}(t,s,i);const a=A(r.map(A))/r.length;r=r.map(t=>t.map(t=>t/a));const l=(t,e)=>function(t,e,n,s){for(let r=0;r<e.length;++r)e[r]=0;let i=0;for(let r=0;r<n.length;++r){const o=t[2*r],a=t[2*r+1];for(let l=r+1;l<n.length;++l){const c=t[2*l],h=t[2*l+1],u=n[r][l],f=s[r][l],d=(c-o)*(c-o)+(h-a)*(h-a),y=Math.sqrt(d),g=d-u*u;f>0&&y<=u||f<0&&y>=u||(i+=2*g*g,e[2*r]+=4*g*(o-c),e[2*r+1]+=4*g*(a-h),e[2*l]+=4*g*(c-o),e[2*l+1]+=4*g*(h-a))}}return i}(t,e,r,o);let c=null;for(let f=0;f<n;++f){const t=C(l,E(2*r.length).map(Math.random),e);(!c||t.fx<c.fx)&&(c=t)}const h=c.x,u={};for(let f=0;f<s.length;++f){const t=s[f];u[t.sets[0]]={x:h[2*f]*a,y:h[2*f+1]*a,radius:Math.sqrt(t.size/Math.PI)}}if(e.history)for(const f of e.history)R(f.x,a);return u}(t,e);s(i,t)+1e-8<s(n,t)&&(n=i)}return n}function L(t,e){let n=0;for(const s of e){if(1===s.sets.length)continue;let e;if(2===s.sets.length){const n=t[s.sets[0]],i=t[s.sets[1]];e=w(n.radius,i.radius,k(n,i))}else e=I(s.sets.map(e=>t[e]));n+=(null!=s.weight?s.weight:1)*(e-s.size)*(e-s.size)}return n}function U(t,e){let n=0;for(const s of e){if(1===s.sets.length)continue;let e;if(2===s.sets.length){const n=t[s.sets[0]],i=t[s.sets[1]];e=w(n.radius,i.radius,k(n,i))}else e=I(s.sets.map(e=>t[e]));const i=null!=s.weight?s.weight:1,r=Math.log((e+1)/(s.size+1));n+=i*r*r}return n}function q(t,e,n){if(null==n?t.sort((t,e)=>e.radius-t.radius):t.sort(n),t.length>0){const e=t[0].x,n=t[0].y;for(const s of t)s.x-=e,s.y-=n}if(2===t.length){k(t[0],t[1])<Math.abs(t[1].radius-t[0].radius)&&(t[1].x=t[0].x+t[0].radius-t[1].radius-1e-10,t[1].y=t[0].y)}if(t.length>1){const n=Math.atan2(t[1].x,t[1].y)-e,s=Math.cos(n),i=Math.sin(n);for(const e of t){const t=e.x,n=e.y;e.x=s*t-i*n,e.y=i*t+s*n}}if(t.length>2){let n=Math.atan2(t[2].x,t[2].y)-e;for(;n<0;)n+=2*Math.PI;for(;n>2*Math.PI;)n-=2*Math.PI;if(n>Math.PI){const e=t[1].y/(1e-10+t[1].x);for(const n of t){var s=(n.x+e*n.y)/(1+e*e);n.x=2*s-n.x,n.y=2*s*e-n.y}}}}function B(t){const e=e=>({max:t.reduce((t,n)=>Math.max(t,n[e]+n.radius),Number.NEGATIVE_INFINITY),min:t.reduce((t,n)=>Math.min(t,n[e]-n.radius),Number.POSITIVE_INFINITY)});return{xRange:e("x"),yRange:e("y")}}function G(t,e,n){null==e&&(e=Math.PI/2);let s=X(t).map(t=>Object.assign({},t));const i=function(t){function e(t){return t.parent!==t&&(t.parent=e(t.parent)),t.parent}function n(t,n){const s=e(t),i=e(n);s.parent=i}t.forEach(t=>{t.parent=t});for(let i=0;i<t.length;++i)for(let e=i+1;e<t.length;++e){const s=t[i].radius+t[e].radius;k(t[i],t[e])+1e-10<s&&n(t[e],t[i])}const s=new Map;for(let i=0;i<t.length;++i){const n=e(t[i]).parent.setid;s.has(n)||s.set(n,[]),s.get(n).push(t[i])}return t.forEach(t=>{delete t.parent}),Array.from(s.values())}(s);for(const c of i){q(c,e,n);const t=B(c);c.size=(t.xRange.max-t.xRange.min)*(t.yRange.max-t.yRange.min),c.bounds=t}i.sort((t,e)=>e.size-t.size),s=i[0];let r=s.bounds;const o=(r.xRange.max-r.xRange.min)/50;function a(t,e,n){if(!t)return;const i=t.bounds;let a,l;if(e)a=r.xRange.max-i.xRange.min+o;else{a=r.xRange.max-i.xRange.max;const t=(i.xRange.max-i.xRange.min)/2-(r.xRange.max-r.xRange.min)/2;t<0&&(a+=t)}if(n)l=r.yRange.max-i.yRange.min+o;else{l=r.yRange.max-i.yRange.max;const t=(i.yRange.max-i.yRange.min)/2-(r.yRange.max-r.yRange.min)/2;t<0&&(l+=t)}for(const r of t)r.x+=a,r.y+=l,s.push(r)}let l=1;for(;l<i.length;)a(i[l],!0,!1),a(i[l+1],!1,!0),a(i[l+2],!0,!0),l+=3,r=B(s);return W(s)}function V(t,e,n,s,i){const r=X(t);e-=2*s,n-=2*s;const{xRange:o,yRange:a}=B(r);if(o.max===o.min||a.max===a.min)return t;let l,c;if(i){const t=2*Math.sqrt(i/Math.PI);l=e/t,c=n/t}else l=e/(o.max-o.min),c=n/(a.max-a.min);const h=Math.min(c,l),u=(e-(o.max-o.min)*h)/2,f=(n-(a.max-a.min)*h)/2;return W(r.map(t=>({radius:h*t.radius,x:s+u+(t.x-o.min)*h,y:s+f+(t.y-a.min)*h,setid:t.setid})))}function W(t){const e={};for(const n of t)e[n.setid]=n;return e}function X(t){return Object.keys(t).map(e=>Object.assign(t[e],{setid:e}))}function Y(t={}){let e=!1,n=600,s=350,i=15,r=1e3,o=Math.PI/2,a=!0,l=null,c=!0,h=!0,u=null,f=null,d=!1,y=null,g=!(!t||!t.symmetricalTextCentre)&&t.symmetricalTextCentre,x={},p=t&&t.colourScheme?t.colourScheme:t&&t.colorScheme?t.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],m=0,v=function(t){if(t in x)return x[t];var e=x[t]=p[m];return m+=1,m>=p.length&&(m=0),e},b=F,I=L;function M(x){let p=x.datum();const m=new Set;p.forEach(t=>{0==t.size&&1==t.sets.length&&m.add(t.sets[0])}),p=p.filter(t=>!t.sets.some(t=>m.has(t)));let M={},k={};if(p.length>0){let t=b(p,{lossFunction:I,distinct:d});a&&(t=G(t,o,f)),M=V(t,n,s,i,l),k=J(M,p,g)}const w={};function _(t){return t.sets in w?w[t.sets]:1==t.sets.length?""+t.sets[0]:void 0}p.forEach(t=>{t.label&&(w[t.sets]=t.label)}),x.selectAll("svg").data([M]).enter().append("svg");const S=x.select("svg");e?S.attr("viewBox",`0 0 ${n} ${s}`):S.attr("width",n).attr("height",s);const E={};let T=!1;function z(t){return e=>et(t.sets.map(t=>{let i=E[t],r=M[t];return i||(i={x:n/2,y:s/2,radius:1}),r||(r={x:n/2,y:s/2,radius:1}),{x:i.x*(1-e)+r.x*e,y:i.y*(1-e)+r.y*e,radius:i.radius*(1-e)+r.radius*e}}),y)}S.selectAll(".venn-area path").each(function(t){const e=this.getAttribute("d");1==t.sets.length&&e&&!d&&(T=!0,E[t.sets[0]]=function(t){const e=t.split(" ");return{x:Number.parseFloat(e[1]),y:Number.parseFloat(e[2]),radius:-Number.parseFloat(e[4])}}(e))});const A=S.selectAll(".venn-area").data(p,t=>t.sets),R=A.enter().append("g").attr("class",t=>`venn-area venn-${1==t.sets.length?"circle":"intersection"}${t.colour||t.color?" venn-coloured":""}`).attr("data-venn-sets",t=>t.sets.join("_")),D=R.append("path"),N=R.append("text").attr("class","label").text(t=>_(t)).attr("text-anchor","middle").attr("dy",".35em").attr("x",n/2).attr("y",s/2);function O(t){return"function"==typeof t.transition?t.transition("venn").duration(r):t}h&&(D.style("fill-opacity","0").filter(t=>1==t.sets.length).style("fill",t=>t.colour?t.colour:t.color?t.color:v(t.sets)).style("fill-opacity",".25"),N.style("fill",e=>e.colour||e.color?"#FFF":t.textFill?t.textFill:1==e.sets.length?v(e.sets):"#444"));let C=x;T&&"function"==typeof C.transition?(C=O(x),C.selectAll("path").attrTween("d",z)):C.selectAll("path").attr("d",t=>et(t.sets.map(t=>M[t])),y);const F=C.selectAll("text").filter(t=>t.sets in k).text(t=>_(t)).attr("x",t=>Math.floor(k[t.sets].x)).attr("y",t=>Math.floor(k[t.sets].y));c&&(T?"on"in F?F.on("end",K(M,_)):F.each("end",K(M,_)):F.each(K(M,_)));const $=O(A.exit()).remove();"function"==typeof A.transition&&$.selectAll("path").attrTween("d",z);const j=$.selectAll("text").attr("x",n/2).attr("y",s/2);return null!==u&&(N.style("font-size","0px"),F.style("font-size",u),j.style("font-size","0px")),{circles:M,textCentres:k,nodes:A,enter:R,update:C,exit:$}}return M.wrap=function(t){return arguments.length?(c=t,M):c},M.useViewBox=function(){return e=!0,M},M.width=function(t){return arguments.length?(n=t,M):n},M.height=function(t){return arguments.length?(s=t,M):s},M.padding=function(t){return arguments.length?(i=t,M):i},M.distinct=function(t){return arguments.length?(d=t,M):d},M.colours=function(t){return arguments.length?(v=t,M):v},M.colors=function(t){return arguments.length?(v=t,M):v},M.fontSize=function(t){return arguments.length?(u=t,M):u},M.round=function(t){return arguments.length?(y=t,M):y},M.duration=function(t){return arguments.length?(r=t,M):r},M.layoutFunction=function(t){return arguments.length?(b=t,M):b},M.normalize=function(t){return arguments.length?(a=t,M):a},M.scaleToFit=function(t){return arguments.length?(l=t,M):l},M.styled=function(t){return arguments.length?(h=t,M):h},M.orientation=function(t){return arguments.length?(o=t,M):o},M.orientationOrder=function(t){return arguments.length?(f=t,M):f},M.lossFunction=function(t){return arguments.length?(I="default"===t?L:"logRatio"===t?U:t,M):I},M}function K(t,e){return function(n){const s=this,i=t[n.sets[0]].radius||50,r=e(n)||"",o=r.split(/\s+/).reverse(),a=(r.length+o.length)/3;let l=o.pop(),c=[l],h=0;s.textContent=null;const u=[];function f(t){const e=s.ownerDocument.createElementNS(s.namespaceURI,"tspan");return e.textContent=t,u.push(e),s.append(e),e}let d=f(l);for(;l=o.pop(),l;){c.push(l);const t=c.join(" ");d.textContent=t,t.length>a&&d.getComputedTextLength()>i&&(c.pop(),d.textContent=c.join(" "),c=[l],d=f(l),h++)}const y=.35-1.1*h/2,g=s.getAttribute("x"),x=s.getAttribute("y");u.forEach((t,e)=>{t.setAttribute("x",g),t.setAttribute("y",x),t.setAttribute("dy",`${y+1.1*e}em`)})}}function Z(t,e,n){let s=e[0].radius-k(e[0],t);for(let i=1;i<e.length;++i){const n=e[i].radius-k(e[i],t);n<=s&&(s=n)}for(let i=0;i<n.length;++i){const e=k(n[i],t)-n[i].radius;e<=s&&(s=e)}return s}function H(t,e,n){const s=[];for(const h of t)s.push({x:h.x,y:h.y}),s.push({x:h.x+h.radius/2,y:h.y}),s.push({x:h.x-h.radius/2,y:h.y}),s.push({x:h.x,y:h.y+h.radius/2}),s.push({x:h.x,y:h.y-h.radius/2});let i=s[0],r=Z(s[0],t,e);for(let h=1;h<s.length;++h){const n=Z(s[h],t,e);n>=r&&(i=s[h],r=n)}const o=N(n=>-1*Z({x:n[0],y:n[1]},t,e),[i.x,i.y],{maxIterations:500,minErrorDelta:1e-10}).x,a={x:n?0:o[0],y:o[1]};let l=!0;for(const h of t)if(k(a,h)>h.radius){l=!1;break}for(const h of e)if(k(a,h)<h.radius){l=!1;break}if(l)return a;if(1==t.length)return{x:t[0].x,y:t[0].y};const c={};return I(t,c),0===c.arcs.length?{x:0,y:-1e3,disjoint:!0}:1==c.arcs.length?{x:c.arcs[0].circle.x,y:c.arcs[0].circle.y}:e.length?H(t,[]):S(c.arcs.map(t=>t.p1))}function J(t,e,n){const s={},i=function(t){const e={},n=Object.keys(t);for(const s of n)e[s]=[];for(let s=0;s<n.length;s++){const i=n[s],r=t[i];for(let o=s+1;o<n.length;++o){const s=n[o],a=t[s],l=k(r,a);l+a.radius<=r.radius+1e-10?e[s].push(i):l+r.radius<=a.radius+1e-10&&e[i].push(s)}}return e}(t);for(let r=0;r<e.length;++r){const o=e[r].sets,a={},l={};for(let t=0;t<o.length;++t){a[o[t]]=!0;const e=i[o[t]];for(let t=0;t<e.length;++t)l[e[t]]=!0}const c=[],h=[];for(let e in t)e in a?c.push(t[e]):e in l||h.push(t[e]);const u=H(c,h,n);s[o]=u,u.disjoint&&e[r].size}return s}function Q(t){if(0===t.length)return[];const e={};return I(t,e),e.arcs}function tt(t,e){if(0===t.length)return"M 0 0";const n=Math.pow(10,e||0),s=null!=e?t=>Math.round(t*n)/n:t=>t;if(1==t.length){const e=t[0].circle;return function(t,e,n){const s=[];return s.push("\nM",t,e),s.push("\nm",-n,0),s.push("\na",n,n,0,1,0,2*n,0),s.push("\na",n,n,0,1,0,2*-n,0),s.join(" ")}(s(e.x),s(e.y),s(e.radius))}const i=["\nM",s(t[0].p2.x),s(t[0].p2.y)];for(const r of t){const t=s(r.circle.radius);i.push("\nA",t,t,0,r.large?1:0,r.sweep?1:0,s(r.p1.x),s(r.p1.y))}return i.join(" ")}function et(t,e){return tt(Q(t),e)}var nt=function(){var t=a(function(t,e,n,s){for(n=n||{},s=t.length;s--;n[t[s]]=e);return n},"o"),e=[5,8],n=[7,8,11,12,17,19,22,24],s=[1,17],i=[1,18],r=[7,8,11,12,14,15,16,17,19,20,21,22,24,27],o=[1,31],l=[1,39],c=[7,8,11,12,17,19,22,24,27],h=[1,57],u=[1,56],f=[1,58],d=[1,59],y=[1,60],g=[7,8,11,12,16,17,19,20,22,24,27,31,32,33],x={trace:a(function(){},"trace"),yy:{},symbols_:{error:2,start:3,optNewlines:4,VENN:5,document:6,EOF:7,NEWLINE:8,line:9,statement:10,TITLE:11,SET:12,identifier:13,BRACKET_LABEL:14,COLON:15,NUMERIC:16,UNION:17,identifierList:18,TEXT:19,IDENTIFIER:20,STRING:21,INDENT_TEXT:22,indentedTextTail:23,STYLE:24,stylesOpt:25,styleField:26,COMMA:27,styleValue:28,valueTokens:29,valueToken:30,HEXCOLOR:31,RGBCOLOR:32,RGBACOLOR:33,$accept:0,$end:1},terminals_:{2:"error",5:"VENN",7:"EOF",8:"NEWLINE",11:"TITLE",12:"SET",14:"BRACKET_LABEL",15:"COLON",16:"NUMERIC",17:"UNION",19:"TEXT",20:"IDENTIFIER",21:"STRING",22:"INDENT_TEXT",24:"STYLE",27:"COMMA",31:"HEXCOLOR",32:"RGBCOLOR",33:"RGBACOLOR"},productions_:[0,[3,4],[4,0],[4,2],[6,0],[6,2],[9,1],[9,1],[10,1],[10,2],[10,3],[10,4],[10,5],[10,2],[10,3],[10,4],[10,5],[10,3],[10,3],[10,3],[10,4],[10,4],[10,2],[10,3],[23,1],[23,1],[23,1],[23,2],[23,2],[25,1],[25,3],[26,3],[28,1],[28,1],[29,1],[29,2],[30,1],[30,1],[30,1],[30,1],[30,1],[18,1],[18,3],[13,1],[13,1]],performAction:a(function(t,e,n,s,i,r,o){var a=r.length-1;switch(i){case 1:return r[a-1];case 2:case 3:case 4:case 6:this.$=[];break;case 5:case 35:r[a-1].push(r[a]),this.$=r[a-1];break;case 7:case 22:case 32:case 36:case 37:case 38:case 39:case 40:case 43:case 44:this.$=r[a];break;case 8:s.setDiagramTitle(r[a].substr(6)),this.$=r[a].substr(6);break;case 9:s.addSubsetData([r[a]],void 0,void 0),s.setIndentMode&&s.setIndentMode(!0);break;case 10:s.addSubsetData([r[a-1]],r[a],void 0),s.setIndentMode&&s.setIndentMode(!0);break;case 11:s.addSubsetData([r[a-2]],void 0,parseFloat(r[a])),s.setIndentMode&&s.setIndentMode(!0);break;case 12:s.addSubsetData([r[a-3]],r[a-2],parseFloat(r[a])),s.setIndentMode&&s.setIndentMode(!0);break;case 13:if(r[a].length<2)throw new Error("union requires multiple identifiers");s.validateUnionIdentifiers&&s.validateUnionIdentifiers(r[a]),s.addSubsetData(r[a],void 0,void 0),s.setIndentMode&&s.setIndentMode(!0);break;case 14:if(r[a-1].length<2)throw new Error("union requires multiple identifiers");s.validateUnionIdentifiers&&s.validateUnionIdentifiers(r[a-1]),s.addSubsetData(r[a-1],r[a],void 0),s.setIndentMode&&s.setIndentMode(!0);break;case 15:if(r[a-2].length<2)throw new Error("union requires multiple identifiers");s.validateUnionIdentifiers&&s.validateUnionIdentifiers(r[a-2]),s.addSubsetData(r[a-2],void 0,parseFloat(r[a])),s.setIndentMode&&s.setIndentMode(!0);break;case 16:if(r[a-3].length<2)throw new Error("union requires multiple identifiers");s.validateUnionIdentifiers&&s.validateUnionIdentifiers(r[a-3]),s.addSubsetData(r[a-3],r[a-2],parseFloat(r[a])),s.setIndentMode&&s.setIndentMode(!0);break;case 17:case 18:case 19:s.addTextData(r[a-1],r[a],void 0);break;case 20:case 21:s.addTextData(r[a-2],r[a-1],r[a]);break;case 23:s.addStyleData(r[a-1],r[a]);break;case 24:case 25:case 26:if(!(l=s.getCurrentSets()))throw new Error("text requires set");s.addTextData(l,r[a],void 0);break;case 27:case 28:var l;if(!(l=s.getCurrentSets()))throw new Error("text requires set");s.addTextData(l,r[a-1],r[a]);break;case 29:case 41:case 34:this.$=[r[a]];break;case 30:case 42:this.$=[...r[a-2],r[a]];break;case 31:this.$=[r[a-2],r[a]];break;case 33:this.$=r[a].join(" ")}},"anonymous"),table:[t(e,[2,2],{3:1,4:2}),{1:[3]},{5:[1,3],8:[1,4]},t(n,[2,4],{6:5}),t(e,[2,3]),{7:[1,6],8:[1,8],9:7,10:9,11:[1,10],12:[1,11],17:[1,12],19:[1,13],22:[1,14],24:[1,15]},{1:[2,1]},t(n,[2,5]),t(n,[2,6]),t(n,[2,7]),t(n,[2,8]),{13:16,20:s,21:i},{13:20,18:19,20:s,21:i},{13:20,18:21,20:s,21:i},{16:[1,25],20:[1,23],21:[1,24],23:22},{13:20,18:26,20:s,21:i},t(n,[2,9],{14:[1,27],15:[1,28]}),t(r,[2,43]),t(r,[2,44]),t(n,[2,13],{14:[1,29],15:[1,30],27:o}),t(r,[2,41]),{16:[1,34],20:[1,32],21:[1,33],27:o},t(n,[2,22]),t(n,[2,24],{14:[1,35]}),t(n,[2,25],{14:[1,36]}),t(n,[2,26]),{20:l,25:37,26:38,27:o},t(n,[2,10],{15:[1,40]}),{16:[1,41]},t(n,[2,14],{15:[1,42]}),{16:[1,43]},{13:44,20:s,21:i},t(n,[2,17],{14:[1,45]}),t(n,[2,18],{14:[1,46]}),t(n,[2,19]),t(n,[2,27]),t(n,[2,28]),t(n,[2,23],{27:[1,47]}),t(c,[2,29]),{15:[1,48]},{16:[1,49]},t(n,[2,11]),{16:[1,50]},t(n,[2,15]),t(r,[2,42]),t(n,[2,20]),t(n,[2,21]),{20:l,26:51},{16:h,20:u,21:[1,53],28:52,29:54,30:55,31:f,32:d,33:y},t(n,[2,12]),t(n,[2,16]),t(c,[2,30]),t(c,[2,31]),t(c,[2,32]),t(c,[2,33],{30:61,16:h,20:u,31:f,32:d,33:y}),t(g,[2,34]),t(g,[2,36]),t(g,[2,37]),t(g,[2,38]),t(g,[2,39]),t(g,[2,40]),t(g,[2,35])],defaultActions:{6:[2,1]},parseError:a(function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},"parseError"),parse:a(function(t){var e=this,n=[0],s=[],i=[null],r=[],o=this.table,l="",c=0,h=0,u=r.slice.call(arguments,1),f=Object.create(this.lexer),d={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(d.yy[y]=this.yy[y]);f.setInput(t,d.yy),d.yy.lexer=f,d.yy.parser=this,void 0===f.yylloc&&(f.yylloc={});var g=f.yylloc;r.push(g);var x=f.options&&f.options.ranges;function p(){var t;return"number"!=typeof(t=s.pop()||f.lex()||1)&&(t instanceof Array&&(t=(s=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof d.yy.parseError?this.parseError=d.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,a(function(t){n.length=n.length-2*t,i.length=i.length-t,r.length=r.length-t},"popStack"),a(p,"lex");for(var m,v,b,I,M,k,w,_,S={};;){if(v=n[n.length-1],this.defaultActions[v]?b=this.defaultActions[v]:(null==m&&(m=p()),b=o[v]&&o[v][m]),void 0===b||!b.length||!b[0]){var E="";for(M in _=[],o[v])this.terminals_[M]&&M>2&&_.push("'"+this.terminals_[M]+"'");E=f.showPosition?"Parse error on line "+(c+1)+":\n"+f.showPosition()+"\nExpecting "+_.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(E,{text:f.match,token:this.terminals_[m]||m,line:f.yylineno,loc:g,expected:_})}if(b[0]instanceof Array&&b.length>1)throw new Error("Parse Error: multiple actions possible at state: "+v+", token: "+m);switch(b[0]){case 1:n.push(m),i.push(f.yytext),r.push(f.yylloc),n.push(b[1]),m=null,h=f.yyleng,l=f.yytext,c=f.yylineno,g=f.yylloc;break;case 2:if(k=this.productions_[b[1]][1],S.$=i[i.length-k],S._$={first_line:r[r.length-(k||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(k||1)].first_column,last_column:r[r.length-1].last_column},x&&(S._$.range=[r[r.length-(k||1)].range[0],r[r.length-1].range[1]]),void 0!==(I=this.performAction.apply(S,[l,h,c,d.yy,b[1],i,r].concat(u))))return I;k&&(n=n.slice(0,-1*k*2),i=i.slice(0,-1*k),r=r.slice(0,-1*k)),n.push(this.productions_[b[1]][0]),i.push(S.$),r.push(S._$),w=o[n[n.length-2]][n[n.length-1]],n.push(w);break;case 3:return!0}}return!0},"parse")},p=function(){return{EOF:1,parseError:a(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:a(function(t,e){return this.yy=e||this.yy||{},this._input=t,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:a(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:a(function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var s=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),n.length-1&&(this.yylineno-=n.length-1);var i=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:n?(n.length===s.length?this.yylloc.first_column:0)+s[s.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:a(function(t){this.unput(this.match.slice(t))},"less"),pastInput:a(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:a(function(t,e){var n,s,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),(s=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,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(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var r in i)this[r]=i[r];return!1}return!1},"test_match"),next:a(function(){if(this.done)return this.EOF;var t,e,n,s;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),r=0;r<i.length;r++)if((n=this._input.match(this.rules[i[r]]))&&(!e||n[0].length>e[0].length)){if(e=n,s=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[s]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:a(function(){var t=this.next();return t||this.lex()},"lex"),begin:a(function(t){this.conditionStack.push(t)},"begin"),popState:a(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:a(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:a(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:a(function(t){this.begin(t)},"pushState"),stateStackSize:a(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:a(function(t,e,n,s){switch(n){case 0:case 1:case 2:case 4:case 7:case 8:break;case 3:if(t.getIndentMode&&t.getIndentMode())return t.consumeIndentText=!0,this.begin("INITIAL"),22;break;case 5:t.setIndentMode&&t.setIndentMode(!1),this.begin("INITIAL"),this.unput(e.yytext);break;case 6:return this.begin("bol"),8;case 9:return 7;case 10:return 11;case 11:return 5;case 12:return 12;case 13:return 17;case 14:if(!t.consumeIndentText)return 19;t.consumeIndentText=!1;break;case 15:return 24;case 16:return e.yytext=e.yytext.slice(2,-2),14;case 17:return e.yytext=e.yytext.slice(1,-1).trim(),14;case 18:return 16;case 19:return 31;case 20:return 33;case 21:return 32;case 22:return 20;case 23:return 21;case 24:return 27;case 25:return 15}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[ \t]+(?=[\n\r]))/i,/^(?:[ \t]+(?=text\b))/i,/^(?:[ \t]+)/i,/^(?:[^ \t\n\r])/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:[ \t]+)/i,/^(?:$)/i,/^(?:title\s[^#\n;]+)/i,/^(?:venn-beta\b)/i,/^(?:set\b)/i,/^(?:union\b)/i,/^(?:text\b)/i,/^(?:style\b)/i,/^(?:\["[^\"]*"\])/i,/^(?:\[[^\]\"]+\])/i,/^(?:[+-]?(\d+(\.\d+)?|\.\d+))/i,/^(?:#[0-9a-fA-F]{3,8})/i,/^(?:rgba\(\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*\))/i,/^(?:rgb\(\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*\))/i,/^(?:[A-Za-z_][A-Za-z0-9\-_]*)/i,/^(?:"[^\"]*")/i,/^(?:,)/i,/^(?::)/i],conditions:{bol:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25],inclusive:!0},INITIAL:{rules:[0,1,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25],inclusive:!0}}}}();function m(){this.yy={}}return x.lexer=p,a(m,"Parser"),m.prototype=x,x.Parser=m,new m}();nt.parser=nt;var st,it=nt,rt=[],ot=[],at=[],lt=new Set,ct=!1,ht=a((t,e,n)=>{const s=pt(t).sort(),i=n??10/Math.pow(t.length,2);st=s,1===s.length&<.add(s[0]),rt.push({sets:s,size:i,label:e?ft(e):void 0})},"addSubsetData"),ut=a(()=>rt,"getSubsetData"),ft=a(t=>{const e=t.trim();return e.length>=2&&e.startsWith('"')&&e.endsWith('"')?e.slice(1,-1):e},"normalizeText"),dt=a(t=>t?ft(t):t,"normalizeStyleValue"),yt=a((t,e,n)=>{const s=ft(e);ot.push({sets:pt(t).sort(),id:s,label:n?ft(n):void 0})},"addTextData"),gt=a((t,e)=>{const n=pt(t).sort(),s={};for(const[i,r]of e)s[i]=dt(r)??r;at.push({targets:n,styles:s})},"addStyleData"),xt=a(()=>at,"getStyleData"),pt=a(t=>t.map(t=>ft(t)),"normalizeIdentifierList"),mt=a(t=>{const e=pt(t).filter(t=>!lt.has(t));if(e.length>0)throw new Error(`unknown set identifier: ${e.join(", ")}`)},"validateUnionIdentifiers"),vt=a(()=>ot,"getTextData"),bt=a(()=>st,"getCurrentSets"),It=a(()=>ct,"getIndentMode"),Mt=a(t=>{ct=t},"setIndentMode"),kt=m.venn;function wt(){return p(kt,l().venn)}a(wt,"getConfig");var _t={getConfig:wt,clear:a(()=>{x(),rt.length=0,ot.length=0,at.length=0,lt.clear(),st=void 0,ct=!1},"customClear"),setAccTitle:o,getAccTitle:r,setDiagramTitle:i,getDiagramTitle:s,getAccDescription:n,setAccDescription:e,addSubsetData:ht,getSubsetData:ut,addTextData:yt,addStyleData:gt,validateUnionIdentifiers:mt,getTextData:vt,getStyleData:xt,getCurrentSets:bt,getIndentMode:It,setIndentMode:Mt},St=a(t=>`\n .venn-title {\n font-size: 32px;\n fill: ${t.vennTitleTextColor};\n font-family: ${t.fontFamily};\n }\n\n .venn-circle text {\n font-size: 48px;\n font-family: ${t.fontFamily};\n }\n\n .venn-intersection text {\n font-size: 48px;\n fill: ${t.vennSetTextColor};\n font-family: ${t.fontFamily};\n }\n\n .venn-text-node {\n font-family: ${t.fontFamily};\n color: ${t.vennSetTextColor};\n }\n`,"getStyles");function Et(t){const e=new Map;for(const n of t){const t=n.targets.join("|"),s=e.get(t);s?Object.assign(s,n.styles):e.set(t,{...n.styles})}return e}a(Et,"buildStyleByKey");var Tt=a((t,e,n,s)=>{var i,r,o;const a=s.db,x=null==(i=a.getConfig)?void 0:i.call(a),{themeVariables:p,look:m,handDrawnSeed:b}=l(),I="handDrawn"===m,M=[p.venn1,p.venn2,p.venn3,p.venn4,p.venn5,p.venn6,p.venn7,p.venn8].filter(Boolean),k=null==(r=a.getDiagramTitle)?void 0:r.call(a),w=a.getSubsetData(),_=a.getTextData(),S=Et(a.getStyleData()),E=Rt(w),T=(null==x?void 0:x.width)??800,z=(null==x?void 0:x.height)??450,A=T/1600,R=k?48*A:0,D=p.primaryTextColor??p.textColor,N=c(e);N.attr("viewBox",`0 0 ${T} ${z}`),k&&N.append("text").text(k).attr("class","venn-title").attr("font-size",32*A+"px").attr("text-anchor","middle").attr("dominant-baseline","middle").attr("x","50%").attr("y",32*A).style("fill",p.vennTitleTextColor||p.titleColor);const O=h(document.createElement("div")),C=Y().width(T).height(z-R);O.datum(E).call(C);const $=I?u.svg(O.select("svg").node()):void 0,j=function(t,e={}){const{lossFunction:n,layoutFunction:s=F,normalize:i=!0,orientation:r=Math.PI/2,orientationOrder:o,width:a=600,height:l=350,padding:c=15,scaleToFit:h=!1,symmetricalTextCentre:u=!1,distinct:f,round:d=2}=e;let y=s(t,{lossFunction:"default"!==n&&n?"logRatio"===n?U:n:L,distinct:f});i&&(y=G(y,r,o));const g=V(y,a,l,c,h),x=J(g,t,u),p=new Map(Object.keys(g).map(t=>[t,{set:t,x:g[t].x,y:g[t].y,radius:g[t].radius}])),m=t.map(t=>{const e=t.sets.map(t=>p.get(t)),n=Q(e);return{circles:e,arcs:n,path:tt(n,d),area:t,has:new Set(t.sets)}});function v(t){let e="";for(const n of m)n.has.size>t.length&&t.every(t=>n.has.has(t))&&(e+=" "+n.path);return e}return m.map(({circles:t,arcs:e,path:n,area:s})=>({data:s,text:x[s.sets],circles:t,arcs:e,path:n,distinctPath:n+v(s.sets)}))}(E,{width:T,height:z-R,padding:(null==x?void 0:x.padding)??15}),P=new Map;for(const l of j){const t=zt([...l.data.sets].sort());P.set(t,l)}_.length>0&&At(x,P,O,_,A,S);const q=f(p.background||"#f4f4f4");O.selectAll(".venn-circle").each(function(t,e){var n;const s=h(this),i=zt([...t.sets].sort()),r=S.get(i),o=(null==r?void 0:r.fill)||M[e%M.length]||p.primaryColor;s.classed("venn-set-"+e%8,!0);const a=(null==r?void 0:r["fill-opacity"])??.1,l=(null==r?void 0:r.stroke)||o,c=(null==r?void 0:r["stroke-width"])||""+5*A;if(I&&$){const t=P.get(i);if(t&&t.circles.length>0){const i=t.circles[0],r=$.circle(i.x,i.y,2*i.radius,{roughness:.7,seed:b,fill:v(o,.7),fillStyle:"hachure",fillWeight:2,hachureGap:8,hachureAngle:60*e-41,stroke:l,strokeWidth:parseFloat(String(c))});s.select("path").remove(),null==(n=s.node())||n.insertBefore(r,s.select("text").node())}}else s.select("path").style("fill",o).style("fill-opacity",a).style("stroke",l).style("stroke-width",c).style("stroke-opacity",.95);const u=(null==r?void 0:r.color)||(q?d(o,30):y(o,30));s.select("text").style("font-size",48*A+"px").style("fill",u)}),I&&$?O.selectAll(".venn-intersection").each(function(t){var e;const n=h(this),s=zt([...t.sets].sort()),i=S.get(s),r=null==i?void 0:i.fill;if(r){const t=n.select("path"),s=t.attr("d");if(s){const n=$.path(s,{roughness:.7,seed:b,fill:v(r,.3),fillStyle:"cross-hatch",fillWeight:2,hachureGap:6,hachureAngle:60,stroke:"none"}),i=t.node();null==(e=null==i?void 0:i.parentNode)||e.insertBefore(n,i),t.remove()}}else n.select("path").style("fill-opacity",0);n.select("text").style("font-size",48*A+"px").style("fill",(null==i?void 0:i.color)??p.vennSetTextColor??D)}):(O.selectAll(".venn-intersection text").style("font-size",48*A+"px").style("fill",t=>{var e;const n=zt([...t.sets].sort());return(null==(e=S.get(n))?void 0:e.color)??p.vennSetTextColor??D}),O.selectAll(".venn-intersection path").style("fill-opacity",t=>{var e;const n=zt([...t.sets].sort());return(null==(e=S.get(n))?void 0:e.fill)?1:0}).style("fill",t=>{var e;const n=zt([...t.sets].sort());return(null==(e=S.get(n))?void 0:e.fill)??"transparent"}));const B=N.append("g").attr("transform",`translate(0, ${R})`),W=O.select("svg").node();if(W&&"childNodes"in W)for(const l of[...W.childNodes])null==(o=B.node())||o.appendChild(l);g(N,z,T,(null==x?void 0:x.useMaxWidth)??!0)},"draw");function zt(t){return t.join("|")}function At(t,e,n,s,i,r){var o;const a=(null==t?void 0:t.useDebugLayout)??!1,l=n.select("svg").append("g").attr("class","venn-text-nodes"),c=new Map;for(const h of s){const t=zt(h.sets),e=c.get(t);e?e.push(h):c.set(t,[h])}for(const[h,u]of c.entries()){const t=e.get(h);if(!(null==t?void 0:t.text))continue;const n=t.text.x,s=t.text.y,c=Math.min(...t.circles.map(t=>t.radius)),f=Math.min(...t.circles.map(t=>t.radius-Math.hypot(n-t.x,s-t.y)));let d=Number.isFinite(f)?Math.max(0,f):0;0===d&&Number.isFinite(c)&&(d=.6*c);const y=l.append("g").attr("class","venn-text-area").attr("font-size",40*i+"px");a&&y.append("circle").attr("class","venn-text-debug-circle").attr("cx",n).attr("cy",s).attr("r",d).attr("fill","none").attr("stroke","purple").attr("stroke-width",1.5*i).attr("stroke-dasharray",`${6*i} ${4*i}`);const g=Math.max(80*i,2*d*.95),x=Math.max(60*i,2*d*.95),p=(t.data.label&&t.data.label.length>0?Math.min(32*i,.25*d):0)+(u.length<=2?30*i:0),m=n-g/2,v=s-x/2+p,b=Math.max(1,Math.ceil(Math.sqrt(u.length))),I=g/b,M=x/Math.max(1,Math.ceil(u.length/b));for(const[e,l]of u.entries()){const t=e%b,n=Math.floor(e/b),s=m+I*(t+.5),c=v+M*(n+.5);a&&y.append("rect").attr("class","venn-text-debug-cell").attr("x",m+I*t).attr("y",v+M*n).attr("width",I).attr("height",M).attr("fill","none").attr("stroke","teal").attr("stroke-width",1*i).attr("stroke-dasharray",`${4*i} ${3*i}`);const h=.9*I,u=.9*M,f=y.append("foreignObject").attr("class","venn-text-node-fo").attr("width",h).attr("height",u).attr("x",s-h/2).attr("y",c-u/2).attr("overflow","visible"),d=null==(o=r.get(l.id))?void 0:o.color,g=f.append("xhtml:span").attr("class","venn-text-node").style("display","flex").style("width","100%").style("height","100%").style("white-space","normal").style("align-items","center").style("justify-content","center").style("text-align","center").style("overflow-wrap","normal").style("word-break","normal").text(l.label??l.id);d&&g.style("color",d)}}}function Rt(t){const e=new Set(t.map(t=>[...t.sets].sort().join("|"))),n=new Map(t.filter(t=>1===t.sets.length&&void 0!==t.size).map(t=>[t.sets[0],t.size])),s=[];for(const i of t){if(i.sets.length<3)continue;const t=[...i.sets].sort();for(let i=0;i<t.length-1;i++)for(let r=i+1;r<t.length;r++){const o=[t[i],t[r]],a=o.join("|");if(!e.has(a)){e.add(a);const t=n.get(o[0]),i=n.get(o[1]),r=void 0!==t&&void 0!==i?Math.min(t,i)/4:2.5;s.push({sets:o,size:r,label:""})}}}return s.length>0?[...t,...s]:t}a(zt,"stableSetsKey"),a(At,"renderTextNodes"),a(Rt,"ensurePairwiseSubsets");var Dt={parser:it,db:_t,renderer:{draw:Tt},styles:St};export{Dt as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var t;import{p as e}from"./chunk-JWPE2WC7-Cbd64bDm.js";import{s as a,g as r,o as n,n as o,a as i,b as s,_ as l,E as d,y as c,A as p,l as x,D as h,e as y,p as g,c as f}from"./mermaid.core-5jj-23N2.js";import{p as u}from"./cynefin-VYW2F7L2-BlGVzc2_.js";import"./index-uJhfY-Ds.js";var m=l((t,e)=>{const a=t<=1?100*t:t;if(a<0||a>100)throw new Error(`${e} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${t}`);return a},"toPercent"),w=l((t,e,a)=>({x:m(e,`${a} evolution`),y:m(t,`${a} visibility`)}),"toCoordinates"),k=l(t=>{if(t)return"+<>"===t?"bidirectional":"+<"===t?"backward":"+>"===t?"forward":void 0},"getFlowFromPort"),b=l(t=>{if(!(null==t?void 0:t.startsWith("+")))return{};const e=/^\+'([^']*)'/.exec(t),a=null==e?void 0:e[1];return t.includes("<>")?{flow:"bidirectional",label:a}:t.includes("<")?{flow:"backward",label:a}:t.includes(">")?{flow:"forward",label:a}:{label:a}},"extractFlowFromArrow"),v=l((t,a)=>{if(e(t,a),t.size&&a.setSize(t.size.width,t.size.height),t.evolution){const e=t.evolution.stages.map(t=>t.secondName?`${t.name.trim()} / ${t.secondName.trim()}`:t.name.trim()),r=t.evolution.stages.filter(t=>void 0!==t.boundary).map(t=>t.boundary);a.updateAxes({stages:e,stageBoundaries:r})}if(t.anchors.forEach(t=>{const e=w(t.visibility,t.evolution,`Anchor "${t.name}"`);a.addNode(t.name,t.name,e.x,e.y,"anchor")}),t.components.forEach(t=>{var e;const r=w(t.visibility,t.evolution,`Component "${t.name}"`),n=t.label?(t.label.negX?-1:1)*t.label.offsetX:void 0,o=t.label?(t.label.negY?-1:1)*t.label.offsetY:void 0,i=null==(e=t.decorator)?void 0:e.strategy;a.addNode(t.name,t.name,r.x,r.y,"component",n,o,t.inertia,i)}),t.notes.forEach(t=>{const e=w(t.visibility,t.evolution,`Note "${t.text}"`);a.addNote(t.text,e.x,e.y)}),t.pipelines.forEach(t=>{const e=a.getNode(t.parent);if(!e||"number"!=typeof e.y)throw new Error(`Pipeline "${t.parent}" must reference an existing component with coordinates.`);const r=e.y;a.startPipeline(t.parent),t.components.forEach(e=>{const n=`${t.parent}_${e.name}`,o=e.label?(e.label.negX?-1:1)*e.label.offsetX:void 0,i=e.label?(e.label.negY?-1:1)*e.label.offsetY:void 0,s=m(e.evolution,`Pipeline component "${e.name}" evolution`);a.addNode(n,e.name,s,r,"pipeline-component",o,i),a.addPipelineComponent(t.parent,n)})}),t.links.forEach(t=>{const e=!!t.arrow&&(t.arrow.includes("-.->")||t.arrow.includes(".-."));let r=k(t.fromPort)??k(t.toPort);const{flow:n,label:o}=b(t.arrow);!r&&n&&(r=n);const i=t.linkLabel,s=o??i;a.addLink(a.resolveNodeId(t.from),a.resolveNodeId(t.to),e,s,r)}),t.evolves.forEach(t=>{const e=a.getNode(t.component);if(void 0!==(null==e?void 0:e.y)){const r=m(t.target,`Evolve target for "${t.component}"`);a.addTrend(t.component,r,e.y)}}),t.annotations.length>0){const e=t.annotations[0],r=w(e.x,e.y,"Annotations box");a.setAnnotationsBox(r.x,r.y)}t.annotation.forEach(t=>{const e=w(t.x,t.y,`Annotation ${t.number}`);a.addAnnotation(t.number,[{x:e.x,y:e.y}],t.text)}),t.accelerators.forEach(t=>{const e=w(t.x,t.y,`Accelerator "${t.name}"`);a.addAccelerator(t.name,e.x,e.y)}),t.deaccelerators.forEach(t=>{const e=w(t.x,t.y,`Deaccelerator "${t.name}"`);a.addDeaccelerator(t.name,e.x,e.y)})},"populateDb"),$={parser:{yy:void 0},parse:l(async t=>{var e;const a=await u("wardley",t);x.debug(a);const r=null==(e=$.parser)?void 0:e.yy;if(!r||"function"!=typeof r.addNode)throw new Error("parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");v(a,r)},"parse")},S=new(l(t=class{constructor(){this.nodes=new Map,this.links=[],this.trends=new Map,this.pipelines=new Map,this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.axes={}}addNode(t){const e=this.nodes.get(t.id)??{id:t.id,label:t.label},a={...e,...t,className:t.className??e.className,labelOffsetX:t.labelOffsetX??e.labelOffsetX,labelOffsetY:t.labelOffsetY??e.labelOffsetY};this.nodes.set(t.id,a)}addLink(t){this.links.push(t)}addTrend(t){this.trends.set(t.nodeId,t)}startPipeline(t){this.pipelines.set(t,{nodeId:t,componentIds:[]});const e=this.nodes.get(t);e&&(e.isPipelineParent=!0)}addPipelineComponent(t,e){const a=this.pipelines.get(t);a&&a.componentIds.push(e);const r=this.nodes.get(e);r&&(r.inPipeline=!0)}addAnnotation(t){this.annotations.push(t)}addNote(t){this.notes.push(t)}addAccelerator(t){this.accelerators.push(t)}addDeaccelerator(t){this.deaccelerators.push(t)}setAnnotationsBox(t,e){this.annotationsBox={x:t,y:e}}setAxes(t){this.axes={...this.axes,...t}}setSize(t,e){this.size={width:t,height:e}}getNode(t){return this.nodes.get(t)}resolveNodeId(t){if(this.nodes.has(t))return t;for(const[e,a]of this.nodes)if(a.label===t)return e;return t}build(){const t=[];for(const e of this.nodes.values()){if("number"!=typeof e.x||"number"!=typeof e.y)throw new Error(`Node "${e.label}" is missing coordinates`);t.push(e)}return{nodes:t,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}},"WardleyBuilder"),t);function M(){return f()["wardley-beta"]}function C(t,e,a,r,n,o,i,s,l){S.addNode({id:t,label:e,x:a,y:r,className:n,labelOffsetX:o,labelOffsetY:i,inertia:s,sourceStrategy:l})}function P(t,e,a=!1,r,n){S.addLink({source:t,target:e,dashed:a,label:r,flow:n})}function N(t,e,a){S.addTrend({nodeId:t,targetX:e,targetY:a})}function z(t,e,a){S.addAnnotation({number:t,coordinates:e,text:a})}function L(t,e,a){S.addNote({text:t,x:e,y:a})}function T(t,e,a){S.addAccelerator({name:t,x:e,y:a})}function A(t,e,a){S.addDeaccelerator({name:t,x:e,y:a})}function E(t,e){S.setAnnotationsBox(t,e)}function I(t,e){S.setSize(t,e)}function B(t){S.startPipeline(t)}function F(t,e){S.addPipelineComponent(t,e)}function R(t){S.setAxes(t)}function Y(t){return S.getNode(t)}function X(t){return S.resolveNodeId(t)}function O(){return S.build()}function D(){S.clear(),g()}l(M,"getConfig"),l(C,"addNode"),l(P,"addLink"),l(N,"addTrend"),l(z,"addAnnotation"),l(L,"addNote"),l(T,"addAccelerator"),l(A,"addDeaccelerator"),l(E,"setAnnotationsBox"),l(I,"setSize"),l(B,"startPipeline"),l(F,"addPipelineComponent"),l(R,"updateAxes"),l(Y,"getNode"),l(X,"resolveNodeId"),l(O,"getWardleyData"),l(D,"clear");var W={getConfig:M,addNode:C,addLink:P,addTrend:N,addAnnotation:z,addNote:L,addAccelerator:T,addDeaccelerator:A,setAnnotationsBox:E,setSize:I,startPipeline:B,addPipelineComponent:F,updateAxes:R,getNode:Y,resolveNodeId:X,getWardleyData:O,clear:D,setAccTitle:s,getAccTitle:i,setDiagramTitle:o,getDiagramTitle:n,getAccDescription:r,setAccDescription:a},j=["Genesis","Custom Built","Product","Commodity"],q=l(()=>{var t,e,a,r,n,o,i,s,l,d,c,p;const{themeVariables:x}=f();return{backgroundColor:(null==(t=x.wardley)?void 0:t.backgroundColor)??x.background??"#fff",axisColor:(null==(e=x.wardley)?void 0:e.axisColor)??"#000",axisTextColor:(null==(a=x.wardley)?void 0:a.axisTextColor)??x.primaryTextColor??"#222",gridColor:(null==(r=x.wardley)?void 0:r.gridColor)??"rgba(100, 100, 100, 0.2)",componentFill:(null==(n=x.wardley)?void 0:n.componentFill)??"#fff",componentStroke:(null==(o=x.wardley)?void 0:o.componentStroke)??"#000",componentLabelColor:(null==(i=x.wardley)?void 0:i.componentLabelColor)??x.primaryTextColor??"#222",linkStroke:(null==(s=x.wardley)?void 0:s.linkStroke)??"#000",evolutionStroke:(null==(l=x.wardley)?void 0:l.evolutionStroke)??"#dc3545",annotationStroke:(null==(d=x.wardley)?void 0:d.annotationStroke)??"#000",annotationTextColor:(null==(c=x.wardley)?void 0:c.annotationTextColor)??x.primaryTextColor??"#222",annotationFill:(null==(p=x.wardley)?void 0:p.annotationFill)??x.background??"#fff"}},"getTheme"),V=l(()=>{const t=f()["wardley-beta"];return{width:(null==t?void 0:t.width)??900,height:(null==t?void 0:t.height)??600,padding:(null==t?void 0:t.padding)??48,nodeRadius:(null==t?void 0:t.nodeRadius)??6,nodeLabelOffset:(null==t?void 0:t.nodeLabelOffset)??8,axisFontSize:(null==t?void 0:t.axisFontSize)??12,labelFontSize:(null==t?void 0:t.labelFontSize)??10,showGrid:(null==t?void 0:t.showGrid)??!1,useMaxWidth:(null==t?void 0:t.useMaxWidth)??!0}},"getConfigValues"),G={parser:$,db:W,renderer:{draw:l((t,e,a,r)=>{var n,o;x.debug("Rendering Wardley map\n"+t);const i=V(),s=q(),d=1.6*i.nodeRadius,c=r.db,p=c.getWardleyData(),g=c.getDiagramTitle(),f=(null==(n=p.size)?void 0:n.width)??i.width,u=(null==(o=p.size)?void 0:o.height)??i.height,m=h(e);m.selectAll("*").remove(),y(m,u,f,i.useMaxWidth),m.attr("viewBox",`0 0 ${f} ${u}`);const w=m.append("g").attr("class","wardley-map"),k=m.append("defs");k.append("marker").attr("id",`arrow-${e}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",s.evolutionStroke).attr("stroke","none"),k.append("marker").attr("id",`link-arrow-end-${e}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",s.linkStroke).attr("stroke","none"),k.append("marker").attr("id",`link-arrow-start-${e}`).attr("viewBox","0 0 10 10").attr("refX",1).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z").attr("fill",s.linkStroke).attr("stroke","none"),w.append("rect").attr("class","wardley-background").attr("width",f).attr("height",u).attr("fill",s.backgroundColor);const b=f-2*i.padding,v=u-2*i.padding;g&&w.append("text").attr("class","wardley-title").attr("x",f/2).attr("y",i.padding/2).attr("fill",s.axisTextColor).attr("font-size",1.05*i.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("dominant-baseline","middle").text(g);const $=l(t=>i.padding+t/100*b,"projectX"),S=l(t=>u-i.padding-t/100*v,"projectY"),M=w.append("g").attr("class","wardley-axes");M.append("line").attr("x1",i.padding).attr("x2",f-i.padding).attr("y1",u-i.padding).attr("y2",u-i.padding).attr("stroke",s.axisColor).attr("stroke-width",1),M.append("line").attr("x1",i.padding).attr("x2",i.padding).attr("y1",i.padding).attr("y2",u-i.padding).attr("stroke",s.axisColor).attr("stroke-width",1);const C=p.axes.xLabel??"Evolution",P=p.axes.yLabel??"Visibility";M.append("text").attr("class","wardley-axis-label wardley-axis-label-x").attr("x",i.padding+b/2).attr("y",u-i.padding/4).attr("fill",s.axisTextColor).attr("font-size",i.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").text(C),M.append("text").attr("class","wardley-axis-label wardley-axis-label-y").attr("x",i.padding/3).attr("y",i.padding+v/2).attr("fill",s.axisTextColor).attr("font-size",i.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("transform",`rotate(-90 ${i.padding/3} ${i.padding+v/2})`).text(P);const N=p.axes.stages&&p.axes.stages.length>0?p.axes.stages:j;if(N.length>0){const t=w.append("g").attr("class","wardley-stages"),e=p.axes.stageBoundaries,a=[];if(e&&e.length===N.length){let t=0;e.forEach(e=>{a.push({start:t,end:e}),t=e})}else{const t=1/N.length;N.forEach((e,r)=>{a.push({start:r*t,end:(r+1)*t})})}N.forEach((e,r)=>{const n=a[r],o=i.padding+n.start*b,l=(o+(i.padding+n.end*b))/2;r>0&&t.append("line").attr("x1",o).attr("x2",o).attr("y1",i.padding).attr("y2",u-i.padding).attr("stroke","#000").attr("stroke-width",1).attr("stroke-dasharray","5 5").attr("opacity",.8),t.append("text").attr("class","wardley-stage-label").attr("x",l).attr("y",u-i.padding/1.5).attr("fill",s.axisTextColor).attr("font-size",i.axisFontSize-2).attr("text-anchor","middle").text(e)})}if(i.showGrid){const t=w.append("g").attr("class","wardley-grid");for(let e=1;e<4;e++){const a=e/4,r=i.padding+b*a;t.append("line").attr("x1",r).attr("x2",r).attr("y1",i.padding).attr("y2",u-i.padding).attr("stroke",s.gridColor).attr("stroke-dasharray","2 6"),t.append("line").attr("x1",i.padding).attr("x2",f-i.padding).attr("y1",u-i.padding-v*a).attr("y2",u-i.padding-v*a).attr("stroke",s.gridColor).attr("stroke-dasharray","2 6")}}const z=new Map;if(p.nodes.forEach(t=>{z.set(t.id,{x:$(t.x),y:S(t.y),node:t})}),p.pipelines.length>0){const t=w.append("g").attr("class","wardley-pipelines"),e=w.append("g").attr("class","wardley-pipeline-links");p.pipelines.forEach(a=>{if(0===a.componentIds.length)return;const r=a.componentIds.map(t=>({id:t,pos:z.get(t),node:p.nodes.find(e=>e.id===t)})).filter(t=>t.pos&&t.node).sort((t,e)=>t.node.x-e.node.x);for(let t=0;t<r.length-1;t++){const a=r[t],n=r[t+1];e.append("line").attr("class","wardley-pipeline-evolution-link").attr("x1",a.pos.x).attr("y1",a.pos.y).attr("x2",n.pos.x).attr("y2",n.pos.y).attr("stroke",s.linkStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4")}let n=1/0,o=-1/0,l=0;if(a.componentIds.forEach(t=>{const e=z.get(t);e&&(n=Math.min(n,e.x),o=Math.max(o,e.x),l=e.y)}),n!==1/0&&o!==-1/0){const e=15,r=4*i.nodeRadius,c=l-r/2,p=z.get(a.nodeId);if(p){const t=(n+o)/2;p.x=t,p.y=c-d/6}t.append("rect").attr("class","wardley-pipeline-box").attr("x",n-e).attr("y",c).attr("width",o-n+2*e).attr("height",r).attr("fill","none").attr("stroke",s.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}})}const L=w.append("g").attr("class","wardley-links"),T=new Map;p.pipelines.forEach(t=>{T.set(t.nodeId,new Set(t.componentIds))});const A=p.links.filter(t=>{if(!z.has(t.source)||!z.has(t.target))return!1;const e=T.get(t.target);return!(null==e?void 0:e.has(t.source))});L.selectAll("line").data(A).enter().append("line").attr("class",t=>"wardley-link"+(t.dashed?" wardley-link--dashed":"")).attr("x1",t=>{const e=z.get(t.source),a=z.get(t.target),r=p.nodes.find(e=>e.id===t.source).isPipelineParent?d/Math.sqrt(2):i.nodeRadius,n=a.x-e.x,o=a.y-e.y,s=Math.sqrt(n*n+o*o);return e.x+n/s*r}).attr("y1",t=>{const e=z.get(t.source),a=z.get(t.target),r=p.nodes.find(e=>e.id===t.source).isPipelineParent?d/Math.sqrt(2):i.nodeRadius,n=a.x-e.x,o=a.y-e.y,s=Math.sqrt(n*n+o*o);return e.y+o/s*r}).attr("x2",t=>{const e=z.get(t.source),a=z.get(t.target),r=p.nodes.find(e=>e.id===t.target).isPipelineParent?d/Math.sqrt(2):i.nodeRadius,n=e.x-a.x,o=e.y-a.y,s=Math.sqrt(n*n+o*o);return a.x+n/s*r}).attr("y2",t=>{const e=z.get(t.source),a=z.get(t.target),r=p.nodes.find(e=>e.id===t.target).isPipelineParent?d/Math.sqrt(2):i.nodeRadius,n=e.x-a.x,o=e.y-a.y,s=Math.sqrt(n*n+o*o);return a.y+o/s*r}).attr("stroke",s.linkStroke).attr("stroke-width",1).attr("stroke-dasharray",t=>t.dashed?"6 6":null).attr("marker-end",t=>"forward"===t.flow||"bidirectional"===t.flow?`url(#link-arrow-end-${e})`:null).attr("marker-start",t=>"backward"===t.flow||"bidirectional"===t.flow?`url(#link-arrow-start-${e})`:null),L.selectAll("text").data(A.filter(t=>t.label)).enter().append("text").attr("class","wardley-link-label").attr("x",t=>{const e=z.get(t.source),a=z.get(t.target),r=(e.x+a.x)/2,n=a.y-e.y,o=a.x-e.x;return r+8*(n/Math.sqrt(o*o+n*n))}).attr("y",t=>{const e=z.get(t.source),a=z.get(t.target),r=(e.y+a.y)/2,n=a.x-e.x,o=a.y-e.y;return r+8*(-n/Math.sqrt(n*n+o*o))}).attr("fill",s.axisTextColor).attr("font-size",i.labelFontSize).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("transform",t=>{const e=z.get(t.source),a=z.get(t.target),r=(e.x+a.x)/2,n=(e.y+a.y)/2,o=a.x-e.x,i=a.y-e.y,s=Math.sqrt(o*o+i*i),l=r+8*(i/s),d=n+8*(-o/s);let c=180*Math.atan2(i,o)/Math.PI;return(c>90||c<-90)&&(c+=180),`rotate(${c} ${l} ${d})`}).text(t=>t.label);const E=w.append("g").attr("class","wardley-trends"),I=p.trends.map(t=>{const e=z.get(t.nodeId);if(!e)return null;const a=$(t.targetX),r=S(t.targetY),n=a-e.x,o=r-e.y,s=Math.sqrt(n*n+o*o),l=i.nodeRadius+2;return{origin:e,targetX:a,targetY:r,adjustedX2:s>l?a-n/s*l:a,adjustedY2:s>l?r-o/s*l:r}}).filter(t=>null!==t);E.selectAll("line").data(I).enter().append("line").attr("class","wardley-trend").attr("x1",t=>t.origin.x).attr("y1",t=>t.origin.y).attr("x2",t=>t.adjustedX2).attr("y2",t=>t.adjustedY2).attr("stroke",s.evolutionStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4").attr("marker-end",`url(#arrow-${e})`);const B=w.append("g").attr("class","wardley-nodes").selectAll("g").data(p.nodes).enter().append("g").attr("class",t=>["wardley-node",t.className?`wardley-node--${t.className}`:""].filter(Boolean).join(" "));B.filter(t=>"outsource"===t.sourceStrategy).append("circle").attr("class","wardley-outsource-overlay").attr("cx",t=>z.get(t.id).x).attr("cy",t=>z.get(t.id).y).attr("r",2*i.nodeRadius).attr("fill","#666").attr("stroke",s.componentStroke).attr("stroke-width",1),B.filter(t=>"buy"===t.sourceStrategy).append("circle").attr("class","wardley-buy-overlay").attr("cx",t=>z.get(t.id).x).attr("cy",t=>z.get(t.id).y).attr("r",2*i.nodeRadius).attr("fill","#ccc").attr("stroke",s.componentStroke).attr("stroke-width",1),B.filter(t=>"build"===t.sourceStrategy).append("circle").attr("class","wardley-build-overlay").attr("cx",t=>z.get(t.id).x).attr("cy",t=>z.get(t.id).y).attr("r",2*i.nodeRadius).attr("fill","#eee").attr("stroke","#000").attr("stroke-width",1);const F=B.filter(t=>"market"===t.sourceStrategy);F.append("circle").attr("class","wardley-market-overlay").attr("cx",t=>z.get(t.id).x).attr("cy",t=>z.get(t.id).y).attr("r",2*i.nodeRadius).attr("fill","white").attr("stroke",s.componentStroke).attr("stroke-width",1),B.filter(t=>!t.isPipelineParent&&"market"!==t.sourceStrategy&&"anchor"!==t.className).append("circle").attr("cx",t=>z.get(t.id).x).attr("cy",t=>z.get(t.id).y).attr("r",i.nodeRadius).attr("fill",s.componentFill).attr("stroke",s.componentStroke).attr("stroke-width",1);const R=.7*i.nodeRadius,Y=1.2*i.nodeRadius;if(F.append("line").attr("class","wardley-market-line").attr("x1",t=>z.get(t.id).x).attr("y1",t=>z.get(t.id).y-Y).attr("x2",t=>z.get(t.id).x-Y*Math.cos(Math.PI/6)).attr("y2",t=>z.get(t.id).y+Y*Math.sin(Math.PI/6)).attr("stroke",s.componentStroke).attr("stroke-width",1),F.append("line").attr("class","wardley-market-line").attr("x1",t=>z.get(t.id).x-Y*Math.cos(Math.PI/6)).attr("y1",t=>z.get(t.id).y+Y*Math.sin(Math.PI/6)).attr("x2",t=>z.get(t.id).x+Y*Math.cos(Math.PI/6)).attr("y2",t=>z.get(t.id).y+Y*Math.sin(Math.PI/6)).attr("stroke",s.componentStroke).attr("stroke-width",1),F.append("line").attr("class","wardley-market-line").attr("x1",t=>z.get(t.id).x+Y*Math.cos(Math.PI/6)).attr("y1",t=>z.get(t.id).y+Y*Math.sin(Math.PI/6)).attr("x2",t=>z.get(t.id).x).attr("y2",t=>z.get(t.id).y-Y).attr("stroke",s.componentStroke).attr("stroke-width",1),F.append("circle").attr("class","wardley-market-dot").attr("cx",t=>z.get(t.id).x).attr("cy",t=>z.get(t.id).y-Y).attr("r",R).attr("fill","white").attr("stroke",s.componentStroke).attr("stroke-width",2),F.append("circle").attr("class","wardley-market-dot").attr("cx",t=>z.get(t.id).x-Y*Math.cos(Math.PI/6)).attr("cy",t=>z.get(t.id).y+Y*Math.sin(Math.PI/6)).attr("r",R).attr("fill","white").attr("stroke",s.componentStroke).attr("stroke-width",2),F.append("circle").attr("class","wardley-market-dot").attr("cx",t=>z.get(t.id).x+Y*Math.cos(Math.PI/6)).attr("cy",t=>z.get(t.id).y+Y*Math.sin(Math.PI/6)).attr("r",R).attr("fill","white").attr("stroke",s.componentStroke).attr("stroke-width",2),B.filter(t=>!0===t.isPipelineParent).append("rect").attr("x",t=>z.get(t.id).x-d/2).attr("y",t=>z.get(t.id).y-d/2).attr("width",d).attr("height",d).attr("fill",s.componentFill).attr("stroke",s.componentStroke).attr("stroke-width",1),B.filter(t=>!0===t.inertia).append("line").attr("class","wardley-inertia").attr("x1",t=>{const e=z.get(t.id);let a=t.isPipelineParent?d/2+15:i.nodeRadius+15;return t.sourceStrategy&&(a+=i.nodeRadius+10),e.x+a}).attr("y1",t=>{const e=z.get(t.id),a=t.isPipelineParent?d:2*i.nodeRadius;return e.y-a/2}).attr("x2",t=>{const e=z.get(t.id);let a=t.isPipelineParent?d/2+15:i.nodeRadius+15;return t.sourceStrategy&&(a+=i.nodeRadius+10),e.x+a}).attr("y2",t=>{const e=z.get(t.id),a=t.isPipelineParent?d:2*i.nodeRadius;return e.y+a/2}).attr("stroke",s.componentStroke).attr("stroke-width",6),B.append("text").attr("x",t=>{const e=z.get(t.id);if("anchor"===t.className)return void 0!==t.labelOffsetX?e.x+t.labelOffsetX:e.x;let a=i.nodeLabelOffset;t.sourceStrategy&&void 0===t.labelOffsetX&&(a+=10);const r=t.labelOffsetX??a;return e.x+r}).attr("y",t=>{const e=z.get(t.id);if("anchor"===t.className)return void 0!==t.labelOffsetY?e.y+t.labelOffsetY:e.y-3;let a=-i.nodeLabelOffset;t.sourceStrategy&&void 0===t.labelOffsetY&&(a-=10);const r=t.labelOffsetY??a;return e.y+r}).attr("class","wardley-node-label").attr("fill",t=>"evolved"===t.className?s.evolutionStroke:"anchor"===t.className?"#000":s.componentLabelColor).attr("font-size",i.labelFontSize).attr("font-weight",t=>"anchor"===t.className?"bold":"normal").attr("text-anchor",t=>"anchor"===t.className?"middle":"start").attr("dominant-baseline",t=>"anchor"===t.className?"middle":"auto").text(t=>t.label),p.annotations.length>0){const t=w.append("g").attr("class","wardley-annotations");if(p.annotations.forEach(e=>{const a=e.coordinates.map(t=>({x:$(t.x),y:S(t.y)}));if(a.length>1)for(let r=0;r<a.length-1;r++)t.append("line").attr("class","wardley-annotation-line").attr("x1",a[r].x).attr("y1",a[r].y).attr("x2",a[r+1].x).attr("y2",a[r+1].y).attr("stroke",s.axisColor).attr("stroke-width",1.5).attr("stroke-dasharray","4 4");a.forEach(a=>{const r=t.append("g").attr("class","wardley-annotation");r.append("circle").attr("cx",a.x).attr("cy",a.y).attr("r",10).attr("fill","white").attr("stroke",s.axisColor).attr("stroke-width",1.5),r.append("text").attr("x",a.x).attr("y",a.y).attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-size",10).attr("fill",s.axisTextColor).attr("font-weight","bold").text(e.number)})}),p.annotationsBox){let e=$(p.annotationsBox.x),a=S(p.annotationsBox.y);const r=10,n=16,o=11,l=t.append("g").attr("class","wardley-annotations-box"),d=[...p.annotations].filter(t=>t.text).sort((t,e)=>t.number-e.number),c=[];if(d.forEach((t,i)=>{const d=l.append("text").attr("x",e+r).attr("y",a+r+(i+1)*n).attr("font-size",o).attr("fill",s.axisTextColor).attr("text-anchor","start").attr("dominant-baseline","middle").text(`${t.number}. ${t.text}`);c.push(d)}),c.length>0){let t=0,o=0;c.forEach(e=>{const a=e.node(),r=a.getComputedTextLength();t=Math.max(t,r);const n=a.getBBox();o=Math.max(o,n.height)});const p=t+2*r+105,x=d.length*n+2*r+o/2,h=i.padding,y=f-i.padding-p,g=i.padding,m=u-i.padding-x;e=Math.max(h,Math.min(e,y)),a=Math.max(g,Math.min(a,m)),c.forEach((t,o)=>{t.attr("x",e+r).attr("y",a+r+(o+1)*n)}),l.insert("rect","text").attr("x",e).attr("y",a).attr("width",p).attr("height",x).attr("fill","white").attr("stroke",s.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}}}if(p.notes.length>0){const t=w.append("g").attr("class","wardley-notes");p.notes.forEach(e=>{const a=$(e.x),r=S(e.y);t.append("text").attr("x",a).attr("y",r).attr("text-anchor","start").attr("font-size",11).attr("fill",s.axisTextColor).attr("font-weight","bold").text(e.text)})}if(p.accelerators.length>0){const t=w.append("g").attr("class","wardley-accelerators");p.accelerators.forEach(e=>{const a=$(e.x),r=S(e.y),n=60,o=`\n M ${a} ${r-15}\n L ${a+n-20} ${r-15}\n L ${a+n-20} ${r-15-8}\n L ${a+n} ${r}\n L ${a+n-20} ${r+15+8}\n L ${a+n-20} ${r+15}\n L ${a} ${r+15}\n Z\n `;t.append("path").attr("d",o).attr("fill","white").attr("stroke",s.componentStroke).attr("stroke-width",1),t.append("text").attr("x",a+30).attr("y",r+15+15).attr("text-anchor","middle").attr("font-size",10).attr("fill",s.axisTextColor).attr("font-weight","bold").text(e.name)})}if(p.deaccelerators.length>0){const t=w.append("g").attr("class","wardley-deaccelerators");p.deaccelerators.forEach(e=>{const a=$(e.x),r=S(e.y),n=`\n M ${a+60} ${r-15}\n L ${a+20} ${r-15}\n L ${a+20} ${r-15-8}\n L ${a} ${r}\n L ${a+20} ${r+15+8}\n L ${a+20} ${r+15}\n L ${a+60} ${r+15}\n Z\n `;t.append("path").attr("d",n).attr("fill","white").attr("stroke",s.componentStroke).attr("stroke-width",1),t.append("text").attr("x",a+30).attr("y",r+15+15).attr("text-anchor","middle").attr("font-size",10).attr("fill",s.axisTextColor).attr("font-weight","bold").text(e.name)})}},"draw")},styles:l(({wardley:t}={})=>{const e=d(),a=c(),r=p(e,a.themeVariables),n=p(r.wardley,t);return`\n .wardley-background {\n fill: ${n.backgroundColor};\n }\n .wardley-axes line, .wardley-axes path {\n stroke: ${n.axisColor};\n }\n .wardley-axis-label {\n fill: ${n.axisTextColor};\n }\n .wardley-stage-label {\n fill: ${n.axisTextColor};\n }\n .wardley-grid line {\n stroke: ${n.gridColor};\n }\n .wardley-node circle {\n fill: ${n.componentFill};\n stroke: ${n.componentStroke};\n }\n .wardley-node-label {\n fill: ${n.componentLabelColor};\n }\n .wardley-link {\n stroke: ${n.linkStroke};\n }\n .wardley-link--dashed {\n stroke-dasharray: 4 4;\n }\n .wardley-link-label {\n fill: ${n.axisTextColor};\n }\n .wardley-trend line {\n stroke: ${n.evolutionStroke};\n }\n .wardley-annotation-line {\n stroke: ${n.annotationStroke};\n }\n .wardley-annotation circle {\n fill: ${n.annotationFill};\n stroke: ${n.annotationStroke};\n }\n .wardley-annotation text {\n fill: ${n.annotationTextColor};\n }\n .wardley-annotations-box rect {\n fill: ${n.annotationFill};\n stroke: ${n.annotationStroke};\n }\n .wardley-annotations-box text {\n fill: ${n.annotationTextColor};\n }\n .wardley-pipeline-box {\n stroke: ${n.componentStroke};\n }\n .wardley-notes text {\n fill: ${n.axisTextColor};\n }\n `},"styles")};export{G as diagram};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{l as e}from"./editor.main-
|
|
1
|
+
import{l as e}from"./editor.main-BvdG8I8J.js";import"./index-uJhfY-Ds.js";const t={comments:{blockComment:["\x3c!--","--\x3e"]},brackets:[["<",">"]],autoClosingPairs:[{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],surroundingPairs:[{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],onEnterRules:[{beforeText:new RegExp("<([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$","i"),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:new RegExp("<(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$","i"),action:{indentAction:e.IndentAction.Indent}}]},n={defaultToken:"",tokenPostfix:".xml",ignoreCase:!0,qualifiedName:/(?:[\w\.\-]+:)?[\w\.\-]+/,tokenizer:{root:[[/[^<&]+/,""],{include:"@whitespace"},[/(<)(@qualifiedName)/,[{token:"delimiter"},{token:"tag",next:"@tag"}]],[/(<\/)(@qualifiedName)(\s*)(>)/,[{token:"delimiter"},{token:"tag"},"",{token:"delimiter"}]],[/(<\?)(@qualifiedName)/,[{token:"delimiter"},{token:"metatag",next:"@tag"}]],[/(<\!)(@qualifiedName)/,[{token:"delimiter"},{token:"metatag",next:"@tag"}]],[/<\!\[CDATA\[/,{token:"delimiter.cdata",next:"@cdata"}],[/&\w+;/,"string.escape"]],cdata:[[/[^\]]+/,""],[/\]\]>/,{token:"delimiter.cdata",next:"@pop"}],[/\]/,""]],tag:[[/[ \t\r\n]+/,""],[/(@qualifiedName)(\s*=\s*)("[^"]*"|'[^']*')/,["attribute.name","","attribute.value"]],[/(@qualifiedName)(\s*=\s*)("[^">?\/]*|'[^'>?\/]*)(?=[\?\/]\>)/,["attribute.name","","attribute.value"]],[/(@qualifiedName)(\s*=\s*)("[^">]*|'[^'>]*)/,["attribute.name","","attribute.value"]],[/@qualifiedName/,"attribute.name"],[/\?>/,{token:"delimiter",next:"@pop"}],[/(\/)(>)/,[{token:"tag"},{token:"delimiter",next:"@pop"}]],[/>/,{token:"delimiter",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,""],[/<!--/,{token:"comment",next:"@comment"}]],comment:[[/[^<\-]+/,"comment.content"],[/-->/,{token:"comment",next:"@pop"}],[/<!--/,"comment.content.invalid"],[/[<\-]/,"comment.content"]]}};export{t as conf,n as language};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var t,i,e,s,a,n,o,h,r,l;import{s as c,g,o as u,n as x,a as d,b as p,_ as f,l as m,D as y,e as b,p as A,y as w,i as C,A as S,B as k,E as _,ay as R,O as T}from"./mermaid.core-5jj-23N2.js";import{i as D}from"./init-C0SZ43gy.js";import{o as L}from"./ordinal-CVjKTKEW.js";import{l as P}from"./linear-BmFo1B75.js";import"./index-uJhfY-Ds.js";import"./defaultLocale-BsH76t_G.js";function v(){var t,i,e=L().unknown(void 0),s=e.domain,a=e.range,n=0,o=1,h=!1,r=0,l=0,c=.5;function g(){var e=s().length,g=o<n,u=g?o:n,x=g?n:o;t=(x-u)/Math.max(1,e-r+2*l),h&&(t=Math.floor(t)),u+=(x-u-t*(e-r))*c,i=t*(1-r),h&&(u=Math.round(u),i=Math.round(i));var d=function(t,i,e){t=+t,i=+i,e=(a=arguments.length)<2?(i=t,t=0,1):a<3?1:+e;for(var s=-1,a=0|Math.max(0,Math.ceil((i-t)/e)),n=new Array(a);++s<a;)n[s]=t+s*e;return n}(e).map(function(i){return u+t*i});return a(g?d.reverse():d)}return delete e.unknown,e.domain=function(t){return arguments.length?(s(t),g()):s()},e.range=function(t){return arguments.length?([n,o]=t,n=+n,o=+o,g()):[n,o]},e.rangeRound=function(t){return[n,o]=t,n=+n,o=+o,h=!0,g()},e.bandwidth=function(){return i},e.step=function(){return t},e.round=function(t){return arguments.length?(h=!!t,g()):h},e.padding=function(t){return arguments.length?(r=Math.min(1,l=+t),g()):r},e.paddingInner=function(t){return arguments.length?(r=Math.min(1,t),g()):r},e.paddingOuter=function(t){return arguments.length?(l=+t,g()):l},e.align=function(t){return arguments.length?(c=Math.max(0,Math.min(1,t)),g()):c},e.copy=function(){return v(s(),[n,o]).round(h).paddingInner(r).paddingOuter(l).align(c)},D.apply(g(),arguments)}var E=function(){var t=f(function(t,i,e,s){for(e=e||{},s=t.length;s--;e[t[s]]=i);return e},"o"),i=[1,10,12,14,16,18,19,21,23],e=[2,6],s=[1,3],a=[1,5],n=[1,6],o=[1,7],h=[1,5,10,12,14,16,18,19,21,23,36,37,38],r=[1,25],l=[1,26],c=[1,28],g=[1,29],u=[1,30],x=[1,31],d=[1,32],p=[1,33],m=[1,34],y=[1,35],b=[1,36],A=[1,37],w=[1,43],C=[1,42],S=[1,47],k=[1,50],_=[1,10,12,14,16,18,19,21,23,36,37,38],R=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38],T=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38,42,43,44,45,46,47,48,49,50,51],D=[1,65],L=[26,28],P={trace:f(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,dataPoints:25,SQUARE_BRACES_END:26,dataPoint:27,COMMA:28,NUMBER_WITH_DECIMAL:29,STR:30,xAxisData:31,bandData:32,ARROW_DELIMITER:33,commaSeparatedTexts:34,yAxisData:35,NEWLINE:36,SEMI:37,EOF:38,alphaNum:39,MD_STR:40,alphaNumToken:41,AMP:42,NUM:43,ALPHA:44,PLUS:45,EQUALS:46,MULT:47,DOT:48,BRKT:49,MINUS:50,UNDERSCORE:51,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",28:"COMMA",29:"NUMBER_WITH_DECIMAL",30:"STR",33:"ARROW_DELIMITER",36:"NEWLINE",37:"SEMI",38:"EOF",40:"MD_STR",42:"AMP",43:"NUM",44:"ALPHA",45:"PLUS",46:"EQUALS",47:"MULT",48:"DOT",49:"BRKT",50:"MINUS",51:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[27,2],[27,1],[13,1],[13,2],[13,1],[31,1],[31,3],[32,3],[34,3],[34,1],[15,1],[15,2],[15,1],[35,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[39,1],[39,2],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1]],performAction:f(function(t,i,e,s,a,n,o){var h=n.length-1;switch(a){case 5:s.setOrientation(n[h]);break;case 9:s.setDiagramTitle(n[h].text.trim());break;case 12:s.setLineData({text:"",type:"text"},n[h]);break;case 13:s.setLineData(n[h-1],n[h]);break;case 14:s.setBarData({text:"",type:"text"},n[h]);break;case 15:s.setBarData(n[h-1],n[h]);break;case 16:this.$=n[h].trim(),s.setAccTitle(this.$);break;case 17:case 18:this.$=n[h].trim(),s.setAccDescription(this.$);break;case 19:case 29:this.$=n[h-1];break;case 20:case 30:this.$=[n[h-2],...n[h]];break;case 21:case 31:this.$=[n[h]];break;case 22:this.$={value:Number(n[h-1]),label:n[h]};break;case 23:this.$={value:Number(n[h]),label:""};break;case 24:s.setXAxisTitle(n[h]);break;case 25:s.setXAxisTitle(n[h-1]);break;case 26:s.setXAxisTitle({type:"text",text:""});break;case 27:s.setXAxisBand(n[h]);break;case 28:s.setXAxisRangeData(Number(n[h-2]),Number(n[h]));break;case 32:s.setYAxisTitle(n[h]);break;case 33:s.setYAxisTitle(n[h-1]);break;case 34:s.setYAxisTitle({type:"text",text:""});break;case 35:s.setYAxisRangeData(Number(n[h-2]),Number(n[h]));break;case 39:case 40:this.$={text:n[h],type:"text"};break;case 41:this.$={text:n[h],type:"markdown"};break;case 42:this.$=n[h];break;case 43:this.$=n[h-1]+""+n[h]}},"anonymous"),table:[t(i,e,{3:1,4:2,7:4,5:s,36:a,37:n,38:o}),{1:[3]},t(i,e,{4:2,7:4,3:8,5:s,36:a,37:n,38:o}),t(i,e,{4:2,7:4,6:9,3:10,5:s,8:[1,11],36:a,37:n,38:o}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},t(h,[2,36]),t(h,[2,37]),t(h,[2,38]),{1:[2,1]},t(i,e,{4:2,7:4,3:21,5:s,36:a,37:n,38:o}),{1:[2,3]},t(h,[2,5]),t(i,[2,7],{4:22,36:a,37:n,38:o}),{11:23,30:r,39:24,40:l,41:27,42:c,43:g,44:u,45:x,46:d,47:p,48:m,49:y,50:b,51:A},{11:39,13:38,24:w,29:C,30:r,31:40,32:41,39:24,40:l,41:27,42:c,43:g,44:u,45:x,46:d,47:p,48:m,49:y,50:b,51:A},{11:45,15:44,29:S,30:r,35:46,39:24,40:l,41:27,42:c,43:g,44:u,45:x,46:d,47:p,48:m,49:y,50:b,51:A},{11:49,17:48,24:k,30:r,39:24,40:l,41:27,42:c,43:g,44:u,45:x,46:d,47:p,48:m,49:y,50:b,51:A},{11:52,17:51,24:k,30:r,39:24,40:l,41:27,42:c,43:g,44:u,45:x,46:d,47:p,48:m,49:y,50:b,51:A},{20:[1,53]},{22:[1,54]},t(_,[2,18]),{1:[2,2]},t(_,[2,8]),t(_,[2,9]),t(R,[2,39],{41:55,42:c,43:g,44:u,45:x,46:d,47:p,48:m,49:y,50:b,51:A}),t(R,[2,40]),t(R,[2,41]),t(T,[2,42]),t(T,[2,44]),t(T,[2,45]),t(T,[2,46]),t(T,[2,47]),t(T,[2,48]),t(T,[2,49]),t(T,[2,50]),t(T,[2,51]),t(T,[2,52]),t(T,[2,53]),t(_,[2,10]),t(_,[2,24],{32:41,31:56,24:w,29:C}),t(_,[2,26]),t(_,[2,27]),{33:[1,57]},{11:59,30:r,34:58,39:24,40:l,41:27,42:c,43:g,44:u,45:x,46:d,47:p,48:m,49:y,50:b,51:A},t(_,[2,11]),t(_,[2,32],{35:60,29:S}),t(_,[2,34]),{33:[1,61]},t(_,[2,12]),{17:62,24:k},{25:63,27:64,29:D},t(_,[2,14]),{17:66,24:k},t(_,[2,16]),t(_,[2,17]),t(T,[2,43]),t(_,[2,25]),{29:[1,67]},{26:[1,68]},{26:[2,31],28:[1,69]},t(_,[2,33]),{29:[1,70]},t(_,[2,13]),{26:[1,71]},{26:[2,21],28:[1,72]},t(L,[2,23],{30:[1,73]}),t(_,[2,15]),t(_,[2,28]),t(_,[2,29]),{11:59,30:r,34:74,39:24,40:l,41:27,42:c,43:g,44:u,45:x,46:d,47:p,48:m,49:y,50:b,51:A},t(_,[2,35]),t(_,[2,19]),{25:75,27:64,29:D},t(L,[2,22]),{26:[2,30]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],74:[2,30],75:[2,20]},parseError:f(function(t,i){if(!i.recoverable){var e=new Error(t);throw e.hash=i,e}this.trace(t)},"parseError"),parse:f(function(t){var i=this,e=[0],s=[],a=[null],n=[],o=this.table,h="",r=0,l=0,c=n.slice.call(arguments,1),g=Object.create(this.lexer),u={yy:{}};for(var x in this.yy)Object.prototype.hasOwnProperty.call(this.yy,x)&&(u.yy[x]=this.yy[x]);g.setInput(t,u.yy),u.yy.lexer=g,u.yy.parser=this,void 0===g.yylloc&&(g.yylloc={});var d=g.yylloc;n.push(d);var p=g.options&&g.options.ranges;function m(){var t;return"number"!=typeof(t=s.pop()||g.lex()||1)&&(t instanceof Array&&(t=(s=t).pop()),t=i.symbols_[t]||t),t}"function"==typeof u.yy.parseError?this.parseError=u.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,f(function(t){e.length=e.length-2*t,a.length=a.length-t,n.length=n.length-t},"popStack"),f(m,"lex");for(var y,b,A,w,C,S,k,_,R={};;){if(b=e[e.length-1],this.defaultActions[b]?A=this.defaultActions[b]:(null==y&&(y=m()),A=o[b]&&o[b][y]),void 0===A||!A.length||!A[0]){var T="";for(C in _=[],o[b])this.terminals_[C]&&C>2&&_.push("'"+this.terminals_[C]+"'");T=g.showPosition?"Parse error on line "+(r+1)+":\n"+g.showPosition()+"\nExpecting "+_.join(", ")+", got '"+(this.terminals_[y]||y)+"'":"Parse error on line "+(r+1)+": Unexpected "+(1==y?"end of input":"'"+(this.terminals_[y]||y)+"'"),this.parseError(T,{text:g.match,token:this.terminals_[y]||y,line:g.yylineno,loc:d,expected:_})}if(A[0]instanceof Array&&A.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+y);switch(A[0]){case 1:e.push(y),a.push(g.yytext),n.push(g.yylloc),e.push(A[1]),y=null,l=g.yyleng,h=g.yytext,r=g.yylineno,d=g.yylloc;break;case 2:if(S=this.productions_[A[1]][1],R.$=a[a.length-S],R._$={first_line:n[n.length-(S||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(S||1)].first_column,last_column:n[n.length-1].last_column},p&&(R._$.range=[n[n.length-(S||1)].range[0],n[n.length-1].range[1]]),void 0!==(w=this.performAction.apply(R,[h,l,r,u.yy,A[1],a,n].concat(c))))return w;S&&(e=e.slice(0,-1*S*2),a=a.slice(0,-1*S),n=n.slice(0,-1*S)),e.push(this.productions_[A[1]][0]),a.push(R.$),n.push(R._$),k=o[e[e.length-2]][e[e.length-1]],e.push(k);break;case 3:return!0}}return!0},"parse")},v=function(){return{EOF:1,parseError:f(function(t,i){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,i)},"parseError"),setInput:f(function(t,i){return this.yy=i||this.yy||{},this._input=t,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:f(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:f(function(t){var i=t.length,e=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-i),this.offset-=i;var s=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),e.length-1&&(this.yylineno-=e.length-1);var a=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:e?(e.length===s.length?this.yylloc.first_column:0)+s[s.length-e.length].length-e[0].length:this.yylloc.first_column-i},this.options.ranges&&(this.yylloc.range=[a[0],a[0]+this.yyleng-i]),this.yyleng=this.yytext.length,this},"unput"),more:f(function(){return this._more=!0,this},"more"),reject:f(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:f(function(t){this.unput(this.match.slice(t))},"less"),pastInput:f(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:f(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:f(function(){var t=this.pastInput(),i=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+i+"^"},"showPosition"),test_match:f(function(t,i){var e,s,a;if(this.options.backtrack_lexer&&(a={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&&(a.yylloc.range=this.yylloc.range.slice(0))),(s=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,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(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,i,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e)return e;if(this._backtrack){for(var n in a)this[n]=a[n];return!1}return!1},"test_match"),next:f(function(){if(this.done)return this.EOF;var t,i,e,s;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var a=this._currentRules(),n=0;n<a.length;n++)if((e=this._input.match(this.rules[a[n]]))&&(!i||e[0].length>i[0].length)){if(i=e,s=n,this.options.backtrack_lexer){if(!1!==(t=this.test_match(e,a[n])))return t;if(this._backtrack){i=!1;continue}return!1}if(!this.options.flex)break}return i?!1!==(t=this.test_match(i,a[s]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:f(function(){var t=this.next();return t||this.lex()},"lex"),begin:f(function(t){this.conditionStack.push(t)},"begin"),popState:f(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:f(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:f(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:f(function(t){this.begin(t)},"pushState"),stateStackSize:f(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:f(function(t,i,e,s){switch(e){case 0:case 1:case 5:case 44:break;case 2:case 3:return this.popState(),36;case 4:return 36;case 6:return 10;case 7:return this.pushState("acc_title"),19;case 8:return this.popState(),"acc_title_value";case 9:return this.pushState("acc_descr"),21;case 10:return this.popState(),"acc_descr_value";case 11:this.pushState("acc_descr_multiline");break;case 12:case 26:case 28:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:case 15:return 5;case 16:return 8;case 17:return this.pushState("axis_data"),"X_AXIS";case 18:return this.pushState("axis_data"),"Y_AXIS";case 19:return this.pushState("axis_band_data"),24;case 20:return 33;case 21:return this.pushState("data"),16;case 22:return this.pushState("data"),18;case 23:return this.pushState("data_inner"),24;case 24:return 29;case 25:return this.popState(),26;case 27:this.pushState("string");break;case 29:return"STR";case 30:return 24;case 31:return 26;case 32:return 44;case 33:return"COLON";case 34:return 45;case 35:return 28;case 36:return 46;case 37:return 47;case 38:return 49;case 39:return 51;case 40:return 48;case 41:return 42;case 42:return 50;case 43:return 43;case 45:return 37;case 46:return 38}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\})/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:xychart\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,24,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,18,21,22,23,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,22,24,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[28,29],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0}}}}();function E(){this.yy={}}return P.lexer=v,f(E,"Parser"),E.prototype=P,P.Parser=E,new E}();E.parser=E;var M=E;function I(t){return"bar"===t.type}function z(t){return"band"===t.type}function $(t){return"linear"===t.type}f(I,"isBarPlot"),f(z,"isBandAxisData"),f($,"isLinearAxisData");var B=(f(t=class{constructor(t){this.parentGroup=t}getMaxDimension(t,i){if(!this.parentGroup)return{width:t.reduce((t,i)=>Math.max(i.length,t),0)*i,height:i};const e={width:0,height:0},s=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",i);for(const a of t){const t=R(s,1,a),n=t?t.width:a.length*i,o=t?t.height:i;e.width=Math.max(e.width,n),e.height=Math.max(e.height,o)}return s.remove(),e}},"TextDimensionCalculatorWithFont"),t),O=(f(i=class{constructor(t,i,e,s){this.axisConfig=t,this.title=i,this.textDimensionCalculator=e,this.axisThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.normalizedLabelRotationInRad=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.normalizedLabelRotationInRad=this.axisConfig.labelRotation>=-90&&this.axisConfig.labelRotation<=90?this.axisConfig.labelRotation*Math.PI/180:0}setRange(t){this.range=t,"left"===this.axisPosition||"right"===this.axisPosition?this.boundingRect.height=t[1]-t[0]:this.boundingRect.width=t[1]-t[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(t){this.axisPosition=t,this.setRange(this.range)}getTickDistance(){const t=this.getRange();return Math.abs(t[0]-t[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(t=>t.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){.7*this.getTickDistance()>2*this.outerPadding&&(this.outerPadding=Math.floor(.7*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(t){let i=t.height;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const e=this.getLabelDimension(),s=.2*t.width;this.outerPadding=Math.min(e.width/2,s);let a=e.height;"bottom"===this.axisPosition&&0!==this.normalizedLabelRotationInRad&&(a=Math.max(a,Math.abs(Math.sin(this.normalizedLabelRotationInRad)*e.width)+Math.abs(Math.cos(this.normalizedLabelRotationInRad)*e.height))),a+=2*this.axisConfig.labelPadding,this.labelTextHeight=e.height,a<=i&&(i-=a,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const t=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),e=t.height+2*this.axisConfig.titlePadding;this.titleTextHeight=t.height,e<=i&&(i-=e,this.showTitle=!0)}this.boundingRect.width=t.width,this.boundingRect.height=t.height-i}calculateSpaceIfDrawnVertical(t){let i=t.width;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const e=this.getLabelDimension(),s=.2*t.height;this.outerPadding=Math.min(e.height/2,s);const a=e.width+2*this.axisConfig.labelPadding;a<=i&&(i-=a,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const t=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),e=t.height+2*this.axisConfig.titlePadding;this.titleTextHeight=t.height,e<=i&&(i-=e,this.showTitle=!0)}this.boundingRect.width=t.width-i,this.boundingRect.height=t.height}calculateSpace(t){return"left"===this.axisPosition||"right"===this.axisPosition?this.calculateSpaceIfDrawnVertical(t):this.calculateSpaceIfDrawnHorizontally(t),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateOffsetByRotation(t){const i=this.normalizedLabelRotationInRad;return 0===i?0:Math.sin(i)*this.getLabelDimension()[t]/2}getDrawableElementsForLeftAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${i},${this.boundingRect.y} L ${i},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map(t=>({text:t.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(t),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){const i=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(t=>({path:`M ${i},${this.getScaleValue(t)} L ${i-this.axisConfig.tickLength},${this.getScaleValue(t)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["left-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForBottomAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(t=>({text:t.toString(),x:this.getScaleValue(t)+this.calculateOffsetByRotation("height"),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0)+Math.abs(this.calculateOffsetByRotation("width")),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:180*this.normalizedLabelRotationInRad/Math.PI,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){const i=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(t=>({path:`M ${this.getScaleValue(t)},${i} L ${this.getScaleValue(t)},${i+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["bottom-axis","title"],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForTopAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(t=>({text:t.toString(),x:this.getScaleValue(t),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+2*this.axisConfig.titlePadding:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){const i=this.boundingRect.y;t.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(t=>({path:`M ${this.getScaleValue(t)},${i+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(t)},${i+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["top-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElements(){if("left"===this.axisPosition)return this.getDrawableElementsForLeftAxis();if("right"===this.axisPosition)throw Error("Drawing of right axis is not implemented");return"bottom"===this.axisPosition?this.getDrawableElementsForBottomAxis():"top"===this.axisPosition?this.getDrawableElementsForTopAxis():[]}},"BaseAxis"),i),F=(f(e=class extends O{constructor(t,i,e,s,a){super(t,s,a,i),this.categories=e,this.scale=v().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=v().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),m.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(t){return this.scale(t)??this.getRange()[0]}},"BandAxis"),e),W=(f(s=class extends O{constructor(t,i,e,s,a){super(t,s,a,i),this.domain=e,this.scale=P().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){const t=[...this.domain];"left"===this.axisPosition&&t.reverse(),this.scale=P().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}},"LinearAxis"),s);function X(t,i,e,s){const a=new B(s);return z(t)?new F(i,e,t.categories,t.title,a):new W(i,e,[t.min,t.max],t.title,a)}f(X,"getAxis");var N=(f(a=class{constructor(t,i,e,s){this.textDimensionCalculator=t,this.chartConfig=i,this.chartData=e,this.chartThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){const i=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),e=Math.max(i.width,t.width),s=i.height+2*this.chartConfig.titlePadding;return i.width<=e&&i.height<=s&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=e,this.boundingRect.height=s,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){const t=[];return this.showChartTitle&&t.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),t}},"ChartTitle"),a);function V(t,i,e,s){const a=new B(s);return new N(a,t,i,e)}f(V,"getChartTitleComponent");var Y=(f(n=class{constructor(t,i,e,s,a){this.plotData=t,this.xAxis=i,this.yAxis=e,this.orientation=s,this.plotIndex=a}getDrawableElement(){const t=this.plotData.data.map(t=>[this.xAxis.getScaleValue(t[0]),this.yAxis.getScaleValue(t[1])]);let i;if(i="horizontal"===this.orientation?T().y(t=>t[0]).x(t=>t[1])(t):T().x(t=>t[0]).y(t=>t[1])(t),!i)return[];const e=[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:i,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}];if(this.plotData.pointLabels&&this.plotData.pointLabels.length>0){const i=10,s=12,a=[];for(const[e,[n,o]]of t.entries()){const t=this.plotData.pointLabels[e];t&&("horizontal"===this.orientation?a.push({x:o+i,y:n,text:t,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"left",fontSize:s,rotation:0}):a.push({x:n,y:o-i,text:t,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"center",fontSize:s,rotation:0}))}a.length>0&&e.push({groupTexts:["plot",`line-plot-${this.plotIndex}`,"labels"],type:"text",data:a})}return e}},"LinePlot"),n),H=(f(o=class{constructor(t,i,e,s,a,n){this.barData=t,this.boundingRect=i,this.xAxis=e,this.yAxis=s,this.orientation=a,this.plotIndex=n}getDrawableElement(){const t=this.barData.data.map(t=>[this.xAxis.getScaleValue(t[0]),this.yAxis.getScaleValue(t[1])]),i=.95*Math.min(2*this.xAxis.getAxisOuterPadding(),this.xAxis.getTickDistance()),e=i/2;return"horizontal"===this.orientation?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(t=>({x:this.boundingRect.x,y:t[0]-e,height:i,width:t[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(t=>({x:t[0]-e,y:t[1],width:i,height:this.boundingRect.y+this.boundingRect.height-t[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},"BarPlot"),o),U=(f(h=class{constructor(t,i,e){this.chartConfig=t,this.chartData=i,this.chartThemeConfig=e,this.boundingRect={x:0,y:0,width:0,height:0}}setAxes(t,i){this.xAxis=t,this.yAxis=i}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){return this.boundingRect.width=t.width,this.boundingRect.height=t.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!this.xAxis||!this.yAxis)throw Error("Axes must be passed to render Plots");const t=[];for(const[i,e]of this.chartData.plots.entries())switch(e.type){case"line":{const s=new Y(e,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...s.getDrawableElement())}break;case"bar":{const s=new H(e,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...s.getDrawableElement())}}return t}},"BasePlot"),h);function j(t,i,e){return new U(t,i,e)}f(j,"getPlotComponent");var G,Q=(f(r=class{constructor(t,i,e,s){this.chartConfig=t,this.chartData=i,this.componentStore={title:V(t,i,e,s),plot:j(t,i,e),xAxis:X(i.xAxis,t.xAxis,{titleColor:e.xAxisTitleColor,labelColor:e.xAxisLabelColor,tickColor:e.xAxisTickColor,axisLineColor:e.xAxisLineColor},s),yAxis:X(i.yAxis,t.yAxis,{titleColor:e.yAxisTitleColor,labelColor:e.yAxisLabelColor,tickColor:e.yAxisTickColor,axisLineColor:e.yAxisLineColor},s)}}calculateVerticalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,e=0,s=0,a=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),n=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),o=this.componentStore.plot.calculateSpace({width:a,height:n});t-=o.width,i-=o.height,o=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),s=o.height,i-=o.height,this.componentStore.xAxis.setAxisPosition("bottom"),o=this.componentStore.xAxis.calculateSpace({width:t,height:i}),i-=o.height,this.componentStore.yAxis.setAxisPosition("left"),o=this.componentStore.yAxis.calculateSpace({width:t,height:i}),e=o.width,t-=o.width,t>0&&(a+=t,t=0),i>0&&(n+=i,i=0),this.componentStore.plot.calculateSpace({width:a,height:n}),this.componentStore.plot.setBoundingBoxXY({x:e,y:s}),this.componentStore.xAxis.setRange([e,e+a]),this.componentStore.xAxis.setBoundingBoxXY({x:e,y:s+n}),this.componentStore.yAxis.setRange([s,s+n]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:s}),this.chartData.plots.some(t=>I(t))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,e=0,s=0,a=0,n=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),o=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),h=this.componentStore.plot.calculateSpace({width:n,height:o});t-=h.width,i-=h.height,h=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),e=h.height,i-=h.height,this.componentStore.xAxis.setAxisPosition("left"),h=this.componentStore.xAxis.calculateSpace({width:t,height:i}),t-=h.width,s=h.width,this.componentStore.yAxis.setAxisPosition("top"),h=this.componentStore.yAxis.calculateSpace({width:t,height:i}),i-=h.height,a=e+h.height,t>0&&(n+=t,t=0),i>0&&(o+=i,i=0),this.componentStore.plot.calculateSpace({width:n,height:o}),this.componentStore.plot.setBoundingBoxXY({x:s,y:a}),this.componentStore.yAxis.setRange([s,s+n]),this.componentStore.yAxis.setBoundingBoxXY({x:s,y:e}),this.componentStore.xAxis.setRange([a,a+o]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:a}),this.chartData.plots.some(t=>I(t))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){"horizontal"===this.chartConfig.chartOrientation?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();const t=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(const i of Object.values(this.componentStore))t.push(...i.getDrawableElements());return t}},"Orchestrator"),r),K=(f(l=class{static build(t,i,e,s){return new Q(t,i,e,s).getDrawableElement()}},"XYChartBuilder"),l),Z=0,q=nt(),J=at(),tt=ot(),it=J.plotColorPalette.split(",").map(t=>t.trim()),et=!1,st=!1;function at(){const t=_(),i=w();return S(t.xyChart,i.themeVariables.xyChart)}function nt(){const t=w();return S(k.xyChart,t.xyChart)}function ot(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}function ht(t){const i=w();return C(t.trim(),i)}function rt(t){G=t}function lt(t){q.chartOrientation="horizontal"===t?"horizontal":"vertical"}function ct(t){tt.xAxis.title=ht(t.text)}function gt(t,i){tt.xAxis={type:"linear",title:tt.xAxis.title,min:t,max:i},et=!0}function ut(t){tt.xAxis={type:"band",title:tt.xAxis.title,categories:t.map(t=>ht(t.text))},et=!0}function xt(t){tt.yAxis.title=ht(t.text)}function dt(t,i){tt.yAxis={type:"linear",title:tt.yAxis.title,min:t,max:i},st=!0}function pt(t){const i=Math.min(...t),e=Math.max(...t),s=$(tt.yAxis)?tt.yAxis.min:1/0,a=$(tt.yAxis)?tt.yAxis.max:-1/0;tt.yAxis={type:"linear",title:tt.yAxis.title,min:Math.min(s,i),max:Math.max(a,e)}}function ft(t){let i=[];if(0===t.length)return i;if(!et){const i=$(tt.xAxis)?tt.xAxis.min:1/0,e=$(tt.xAxis)?tt.xAxis.max:-1/0;gt(Math.min(i,1),Math.max(e,t.length))}if(z(tt.xAxis)&&t.length>tt.xAxis.categories.length&&(t=t.slice(0,tt.xAxis.categories.length)),st||pt(t),z(tt.xAxis)&&(i=tt.xAxis.categories.map((i,e)=>[i,t[e]])),$(tt.xAxis)){const e=tt.xAxis.min,s=tt.xAxis.max,a=(s-e)/(t.length-1),n=[];for(let t=e;t<=s;t+=a)n.push(`${t}`);i=n.map((i,e)=>[i,t[e]])}return i}function mt(t){return it[0===t?0:t%it.length]}function yt(t,i){const e=i.map(t=>t.value),s=i.map(t=>t.label?ht(t.label):""),a=ft(e),n=s.some(t=>""!==t);tt.plots.push({type:"line",strokeFill:mt(Z),strokeWidth:2,data:a,...n?{pointLabels:s}:{}}),Z++}function bt(t,i){const e=ft(i.map(t=>t.value));tt.plots.push({type:"bar",fill:mt(Z),data:e}),Z++}function At(){if(0===tt.plots.length)throw Error("No Plot to render, please provide a plot with some data");return tt.title=u(),K.build(q,tt,J,G)}function wt(){return J}function Ct(){return q}function St(){return tt}f(at,"getChartDefaultThemeConfig"),f(nt,"getChartDefaultConfig"),f(ot,"getChartDefaultData"),f(ht,"textSanitizer"),f(rt,"setTmpSVGG"),f(lt,"setOrientation"),f(ct,"setXAxisTitle"),f(gt,"setXAxisRangeData"),f(ut,"setXAxisBand"),f(xt,"setYAxisTitle"),f(dt,"setYAxisRangeData"),f(pt,"setYAxisRangeFromPlotData"),f(ft,"transformDataWithoutCategory"),f(mt,"getPlotColorFromPalette"),f(yt,"setLineData"),f(bt,"setBarData"),f(At,"getDrawableElem"),f(wt,"getChartThemeConfig"),f(Ct,"getChartConfig"),f(St,"getXYChartData");var kt={parser:M,db:{getDrawableElem:At,clear:f(function(){A(),Z=0,q=nt(),tt={yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]},J=at(),it=J.plotColorPalette.split(",").map(t=>t.trim()),et=!1,st=!1},"clear"),setAccTitle:p,getAccTitle:d,setDiagramTitle:x,getDiagramTitle:u,getAccDescription:g,setAccDescription:c,setOrientation:lt,setXAxisTitle:ct,setXAxisRangeData:gt,setXAxisBand:ut,setYAxisTitle:xt,setYAxisRangeData:dt,setLineData:yt,setBarData:bt,setTmpSVGG:rt,getChartThemeConfig:wt,getChartConfig:Ct,getXYChartData:St},renderer:{draw:f((t,i,e,s)=>{const a=s.db,n=a.getChartThemeConfig(),o=a.getChartConfig(),h=a.getXYChartData().plots[0].data.map(t=>t[1]);function r(t){return"top"===t?"text-before-edge":"middle"}function l(t){return"left"===t?"start":"right"===t?"end":"middle"}function c(t){return`translate(${t.x}, ${t.y}) rotate(${t.rotation||0})`}f(r,"getDominantBaseLine"),f(l,"getTextAnchor"),f(c,"getTextTransformation"),m.debug("Rendering xychart chart\n"+t);const g=y(i),u=g.append("g").attr("class","main"),x=u.append("rect").attr("width",o.width).attr("height",o.height).attr("class","background");b(g,o.height,o.width,!0),g.attr("viewBox",`0 0 ${o.width} ${o.height}`),x.attr("fill",n.backgroundColor),a.setTmpSVGG(g.append("g").attr("class","mermaid-tmp-group"));const d=a.getDrawableElem(),p={};function A(t){let i=u,e="";for(const[s]of t.entries()){let a=u;s>0&&p[e]&&(a=p[e]),e+=t[s],i=p[e],i||(i=p[e]=a.append("g").attr("class",t[s]))}return i}f(A,"getGroup");for(const m of d){if(0===m.data.length)continue;const t=A(m.groupTexts);switch(m.type){case"rect":if(t.selectAll("rect").data(m.data).enter().append("rect").attr("x",t=>t.x).attr("y",t=>t.y).attr("width",t=>t.width).attr("height",t=>t.height).attr("fill",t=>t.fill).attr("stroke",t=>t.strokeFill).attr("stroke-width",t=>t.strokeWidth),o.showDataLabel){const i=o.showDataLabelOutsideBar;if("horizontal"===o.chartOrientation){let e=function(t,i){const{data:e,label:n}=t;return i*n.length*s<=e.width-a};f(e,"fitsHorizontally");const s=.7,a=10,o=m.data.map((t,i)=>({data:t,label:h[i].toString()})).filter(t=>t.data.width>0&&t.data.height>0),r=o.map(t=>{const{data:i}=t;let s=.7*i.height;for(;!e(t,s)&&s>0;)s-=1;return s}),l=Math.floor(Math.min(...r)),c=f(t=>i?t.data.x+t.data.width+a:t.data.x+t.data.width-a,"determineLabelXPosition");t.selectAll("text").data(o).enter().append("text").attr("x",c).attr("y",t=>t.data.y+t.data.height/2).attr("text-anchor",i?"start":"end").attr("dominant-baseline","middle").attr("fill",n.dataLabelColor).attr("font-size",`${l}px`).text(t=>t.label)}else{let e=function(t,i,e){const{data:s,label:a}=t,n=i*a.length*.7,o=s.x+s.width/2,h=o+n/2,r=o-n/2>=s.x&&h<=s.x+s.width,l=s.y+e+i<=s.y+s.height;return r&&l};f(e,"fitsInBar");const s=10,a=m.data.map((t,i)=>({data:t,label:h[i].toString()})).filter(t=>t.data.width>0&&t.data.height>0),o=a.map(t=>{const{data:i,label:a}=t;let n=i.width/(.7*a.length);for(;!e(t,n,s)&&n>0;)n-=1;return n}),r=Math.floor(Math.min(...o)),l=f(t=>i?t.data.y-s:t.data.y+s,"determineLabelYPosition");t.selectAll("text").data(a).enter().append("text").attr("x",t=>t.data.x+t.data.width/2).attr("y",l).attr("text-anchor","middle").attr("dominant-baseline",i?"auto":"hanging").attr("fill",n.dataLabelColor).attr("font-size",`${r}px`).text(t=>t.label)}}break;case"text":t.selectAll("text").data(m.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",t=>t.fill).attr("font-size",t=>t.fontSize).attr("dominant-baseline",t=>r(t.verticalPos)).attr("text-anchor",t=>l(t.horizontalPos)).attr("transform",t=>c(t)).text(t=>t.text);break;case"path":t.selectAll("path").data(m.data).enter().append("path").attr("d",t=>t.path).attr("fill",t=>t.fill?t.fill:"none").attr("stroke",t=>t.strokeFill).attr("stroke-width",t=>t.strokeWidth)}}},"draw")}};export{kt as diagram};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{l as e}from"./editor.main-
|
|
1
|
+
import{l as e}from"./editor.main-BvdG8I8J.js";import"./index-uJhfY-Ds.js";const n={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{offSide:!0},onEnterRules:[{beforeText:/:\s*$/,action:{indentAction:e.IndentAction.Indent}}]},t={tokenPostfix:".yaml",brackets:[{token:"delimiter.bracket",open:"{",close:"}"},{token:"delimiter.square",open:"[",close:"]"}],keywords:["true","True","TRUE","false","False","FALSE","null","Null","Null","~"],numberInteger:/(?:0|[+-]?[0-9]+)/,numberFloat:/(?:0|[+-]?[0-9]+)(?:\.[0-9]+)?(?:e[-+][1-9][0-9]*)?/,numberOctal:/0o[0-7]+/,numberHex:/0x[0-9a-fA-F]+/,numberInfinity:/[+-]?\.(?:inf|Inf|INF)/,numberNaN:/\.(?:nan|Nan|NAN)/,numberDate:/\d{4}-\d\d-\d\d([Tt ]\d\d:\d\d:\d\d(\.\d+)?(( ?[+-]\d\d?(:\d\d)?)|Z)?)?/,escapes:/\\(?:[btnfr\\"']|[0-7][0-7]?|[0-3][0-7]{2})/,tokenizer:{root:[{include:"@whitespace"},{include:"@comment"},[/%[^ ]+.*$/,"meta.directive"],[/---/,"operators.directivesEnd"],[/\.{3}/,"operators.documentEnd"],[/[-?:](?= )/,"operators"],{include:"@anchor"},{include:"@tagHandle"},{include:"@flowCollections"},{include:"@blockStyle"},[/@numberInteger(?![ \t]*\S+)/,"number"],[/@numberFloat(?![ \t]*\S+)/,"number.float"],[/@numberOctal(?![ \t]*\S+)/,"number.octal"],[/@numberHex(?![ \t]*\S+)/,"number.hex"],[/@numberInfinity(?![ \t]*\S+)/,"number.infinity"],[/@numberNaN(?![ \t]*\S+)/,"number.nan"],[/@numberDate(?![ \t]*\S+)/,"number.date"],[/(".*?"|'.*?'|[^#'"]*?)([ \t]*)(:)( |$)/,["type","white","operators","white"]],{include:"@flowScalars"},[/.+?(?=(\s+#|$))/,{cases:{"@keywords":"keyword","@default":"string"}}]],object:[{include:"@whitespace"},{include:"@comment"},[/\}/,"@brackets","@pop"],[/,/,"delimiter.comma"],[/:(?= )/,"operators"],[/(?:".*?"|'.*?'|[^,\{\[]+?)(?=: )/,"type"],{include:"@flowCollections"},{include:"@flowScalars"},{include:"@tagHandle"},{include:"@anchor"},{include:"@flowNumber"},[/[^\},]+/,{cases:{"@keywords":"keyword","@default":"string"}}]],array:[{include:"@whitespace"},{include:"@comment"},[/\]/,"@brackets","@pop"],[/,/,"delimiter.comma"],{include:"@flowCollections"},{include:"@flowScalars"},{include:"@tagHandle"},{include:"@anchor"},{include:"@flowNumber"},[/[^\],]+/,{cases:{"@keywords":"keyword","@default":"string"}}]],multiString:[[/^( +).+$/,"string","@multiStringContinued.$1"]],multiStringContinued:[[/^( *).+$/,{cases:{"$1==$S2":"string","@default":{token:"@rematch",next:"@popall"}}}]],whitespace:[[/[ \t\r\n]+/,"white"]],comment:[[/#.*$/,"comment"]],flowCollections:[[/\[/,"@brackets","@array"],[/\{/,"@brackets","@object"]],flowScalars:[[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/'[^']*'/,"string"],[/"/,"string","@doubleQuotedString"]],doubleQuotedString:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],blockStyle:[[/[>|][0-9]*[+-]?$/,"operators","@multiString"]],flowNumber:[[/@numberInteger(?=[ \t]*[,\]\}])/,"number"],[/@numberFloat(?=[ \t]*[,\]\}])/,"number.float"],[/@numberOctal(?=[ \t]*[,\]\}])/,"number.octal"],[/@numberHex(?=[ \t]*[,\]\}])/,"number.hex"],[/@numberInfinity(?=[ \t]*[,\]\}])/,"number.infinity"],[/@numberNaN(?=[ \t]*[,\]\}])/,"number.nan"],[/@numberDate(?=[ \t]*[,\]\}])/,"number.date"]],tagHandle:[[/\![^ ]*/,"tag"]],anchor:[[/[&*][^ ]+/,"namespace"]]}};export{n as conf,t as language};
|
package/web/dist/index.html
CHANGED
|
@@ -57,8 +57,8 @@
|
|
|
57
57
|
: './vendor/github-dark.min.css';
|
|
58
58
|
})();
|
|
59
59
|
</script>
|
|
60
|
-
<script type="module" crossorigin src="./assets/index-
|
|
61
|
-
<link rel="stylesheet" crossorigin href="./assets/index-
|
|
60
|
+
<script type="module" crossorigin src="./assets/index-uJhfY-Ds.js"></script>
|
|
61
|
+
<link rel="stylesheet" crossorigin href="./assets/index-CMoSnPi6.css">
|
|
62
62
|
</head>
|
|
63
63
|
<body>
|
|
64
64
|
<div id="app"></div>
|
package/web/dist/locales/en.json
CHANGED
|
@@ -107,6 +107,13 @@
|
|
|
107
107
|
"preview.showSource": "Show source",
|
|
108
108
|
"preview.renderMarkdown": "Render markdown",
|
|
109
109
|
"preview.renderHtml": "Render HTML",
|
|
110
|
+
"preview.scriptsBlocked": "Safe preview: scripts are blocked.",
|
|
111
|
+
"preview.scriptsEnabled": "Interactive preview: scripts are running in an isolated frame.",
|
|
112
|
+
"preview.enableScripts": "Enable scripts",
|
|
113
|
+
"preview.disableScripts": "Disable scripts",
|
|
114
|
+
"preview.enableScriptsTitle": "Enable scripts in this preview?",
|
|
115
|
+
"preview.enableScriptsMessage": "Only enable scripts when you trust this HTML file.",
|
|
116
|
+
"preview.enableScriptsWarning": "Scripts stay isolated from AgentLink, but they can make network requests.",
|
|
110
117
|
|
|
111
118
|
"team.launchAgentTeam": "Launch Agent Team",
|
|
112
119
|
"team.selectTemplateDesc": "Select a template, review the lead prompt, and describe your task.",
|
package/web/dist/locales/zh.json
CHANGED
|
@@ -107,6 +107,13 @@
|
|
|
107
107
|
"preview.showSource": "显示源码",
|
|
108
108
|
"preview.renderMarkdown": "渲染 Markdown",
|
|
109
109
|
"preview.renderHtml": "渲染 HTML",
|
|
110
|
+
"preview.scriptsBlocked": "安全预览:脚本已禁用。",
|
|
111
|
+
"preview.scriptsEnabled": "交互预览:脚本正在隔离框架中运行。",
|
|
112
|
+
"preview.enableScripts": "启用脚本",
|
|
113
|
+
"preview.disableScripts": "禁用脚本",
|
|
114
|
+
"preview.enableScriptsTitle": "在此预览中启用脚本?",
|
|
115
|
+
"preview.enableScriptsMessage": "仅在信任此 HTML 文件时启用脚本。",
|
|
116
|
+
"preview.enableScriptsWarning": "脚本仍与 AgentLink 隔离,但可以发起网络请求。",
|
|
110
117
|
|
|
111
118
|
"team.launchAgentTeam": "启动代理团队",
|
|
112
119
|
"team.selectTemplateDesc": "选择模板,查看主导提示词,并描述您的任务。",
|