filecat 6.56.1 → 6.57.0
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/build/dist/1045.0e4bdc838c37771a7f50.js +1 -0
- package/build/dist/1070.f9959455a7cb92f7cc56.js +1 -0
- package/build/dist/1297.f0c54354f6a56960f66e.js +1 -0
- package/build/dist/1327.4b8e684f28cdee892e00.js +1 -0
- package/build/dist/{1472.61f2ba5f4d19329f81a5.js → 1472.04035f0f6fc522db2087.js} +1 -1
- package/build/dist/1738.b8ab2bd79df131e60051.js +1 -0
- package/build/dist/1802.e43e833638f6ba8e22d7.js +1 -0
- package/build/dist/1964.bd3d684b50aa5191b413.js +1 -0
- package/build/dist/200.bb7f6ce5543bd7ff6d97.js +1 -0
- package/build/dist/2105.e4ba1c1d506b3fe14e8e.js +1 -0
- package/build/dist/2122.bc10dcdbbfc38e0ef883.js +1 -0
- package/build/dist/2637.9c1a442f4131e029385d.js +1 -0
- package/build/dist/{4619.1f7d8bf06c69e2ce9de7.js → 2822.9417e764a14f8f5f57dc.js} +1 -1
- package/build/dist/2824.2990d63b1d3564cf19fb.js +1 -0
- package/build/dist/2994.c492be0d907fa468a9be.js +1 -0
- package/build/dist/3300.b8a3bc571293a6280ed8.js +1 -0
- package/build/dist/3509.cbcb309fbf49db53229f.js +1 -0
- package/build/dist/{4625.a6a593542f4f2ebdae0f.js → 3510.b975b8bfdee5e8518215.js} +1 -1
- package/build/dist/3608.aff9429024b740ac5cd0.js +1 -0
- package/build/dist/3990.5e16453f57b90b01d539.js +1 -0
- package/build/dist/4061.c0eb5824eeb6a59fa827.js +1 -0
- package/build/dist/4193.58d3a34cac783ff289c6.js +1 -0
- package/build/dist/4253.f6c2ea8c7314d4df9c6d.js +1 -0
- package/build/dist/4306.9618c407f36d82608325.js +1 -0
- package/build/dist/4325.15c785b84773f0605fd4.js +1 -0
- package/build/dist/4376.b022a792fb34fbe50398.js +1 -0
- package/build/dist/453.8877eb10f13258c290bc.js +1 -0
- package/build/dist/4735.838cd0f656bbf7d99ff6.js +1 -0
- package/build/dist/4806.1e68bc623f8c369611a3.js +1 -0
- package/build/dist/4830.0042c6dcd47f7dcec003.js +1 -0
- package/build/dist/4985.44cb7d829ca477e368b8.js +1 -0
- package/build/dist/5315.0a806bc186510d2d0152.js +1 -0
- package/build/dist/5332.00d54e3fd946dafee80e.js +1 -0
- package/build/dist/5526.6b4867751becda056ed8.js +1 -0
- package/build/dist/583.cef46d6b21c6fa6454cf.js +1 -0
- package/build/dist/6164.7dae9989dd129479f952.js +1 -0
- package/build/dist/629.b75b024aacc43e0d69cf.js +1 -0
- package/build/dist/{7887.2edcfdeb215d33478936.js → 6344.291e5dadc74e62739774.js} +1 -1
- package/build/dist/6459.06eb5a8b0d8c8f7d3bd0.js +1 -0
- package/build/dist/6488.4de7c86754406277783e.js +1 -0
- package/build/dist/6506.ae8f7efceae47503af40.js +1 -0
- package/build/dist/{8535.9d68b1a6589a813c5bf1.js → 6535.a5c5040e658bc76d0da8.js} +1 -1
- package/build/dist/6571.b381c44055704e3ba649.js +1 -0
- package/build/dist/6731.6763296ce5ae210bc0fe.js +1 -0
- package/build/dist/6759.f88b50c41207cb8345d1.js +1 -0
- package/build/dist/{1715.b6871d580981169bbdc4.js → 6789.34921a30c8a81f0a6407.js} +1 -1
- package/build/dist/{5135.9c0adbfd935bc46dd00d.js → 6800.ee99fd0a88b6acbaaf2c.js} +1 -1
- package/build/dist/6803.fe4297b1e51c3bfc7f50.js +1 -0
- package/build/dist/6806.9ebf089eba60f3b8e946.js +1 -0
- package/build/dist/727.45aacafb8172bc2bb662.js +1 -0
- package/build/dist/{764.7c29eaf9d7edbee8467e.js → 7483.5e26ada69b33418c31a8.js} +1 -1
- package/build/dist/{1240.8141c3584667c9b102c5.js → 7486.fe0b5f867c08b40a3360.js} +1 -1
- package/build/dist/784.48a3b71205680f427109.js +1 -0
- package/build/dist/8079.f6f2be43e5d933ae1f6f.js +1 -0
- package/build/dist/821.1cd8faa58770da7e977c.js +1 -0
- package/build/dist/8677.860320b7f36947e57d11.js +1 -0
- package/build/dist/8947.7e10e5115cc7edc7fc85.js +2 -0
- package/build/dist/8947.7e10e5115cc7edc7fc85.js.LICENSE.txt +1 -0
- package/build/dist/9269.f5e25bc611f9230a1aae.js +1 -0
- package/build/dist/9324.ef229da9b943484298ba.js +1 -0
- package/build/dist/9364.d2570d78afc50fe1b23e.js +1 -0
- package/build/dist/9463.2629a7daf4c2865b9b96.js +1 -0
- package/build/dist/index.html +1 -1
- package/build/dist/{main.ca6dbdc5e09628b186de.js → main.d6e3ba17511894d8ba05.js} +2 -2
- package/build/main.js +1 -1
- package/package.json +1 -1
- package/build/dist/1081.74d56da1eab662a9c44a.js +0 -1
- package/build/dist/124.23fa0d2699d9618dda9b.js +0 -1
- package/build/dist/125.46b0b0838cec5442fdf6.js +0 -1
- package/build/dist/1437.9e4843f2e773b659da52.js +0 -1
- package/build/dist/1730.f999109734b2ec283532.js +0 -1
- package/build/dist/1750.36c146cd44049aaf79bc.js +0 -1
- package/build/dist/1772.7868dde9477de83bca1b.js +0 -1
- package/build/dist/2204.0759becd4d57dea31cec.js +0 -1
- package/build/dist/2449.0a762cd0483921adb91b.js +0 -1
- package/build/dist/2535.15ea6ba73588f47dc278.js +0 -1
- package/build/dist/2549.d0b9ca007ebae4995c22.js +0 -1
- package/build/dist/2862.b1506f9eda52fa4f64cd.js +0 -1
- package/build/dist/2979.a1aa1f822cfc6c15f4a7.js +0 -1
- package/build/dist/3061.d9a82470493a07566afe.js +0 -1
- package/build/dist/3064.4ce45ac4307075eaf0dd.js +0 -1
- package/build/dist/3263.226e1c7bd70ab6bac6dc.js +0 -1
- package/build/dist/3382.dde3926f74eb1cd9fadc.js +0 -1
- package/build/dist/3386.cc4b0d13967d3d1ac1ac.js +0 -1
- package/build/dist/3743.847ccbdcf5b607eec417.js +0 -1
- package/build/dist/3822.7e8ba22abbc6a60e6e20.js +0 -1
- package/build/dist/3889.d7b25d2a1cef2ff805dd.js +0 -1
- package/build/dist/3975.fde79b562d1f76f82274.js +0 -1
- package/build/dist/4376.619f767deddce165b717.js +0 -1
- package/build/dist/4450.838c3bb5cfbe9e05dc24.js +0 -1
- package/build/dist/4877.c31b8c8ee069225abc0d.js +0 -1
- package/build/dist/5014.ff2b55369c42ab3cdda2.js +0 -1
- package/build/dist/5222.540853902e9c52d28220.js +0 -1
- package/build/dist/5422.2425fc0ebb9e6676d7f4.js +0 -1
- package/build/dist/5431.3a2f1f3072d7c238f213.js +0 -1
- package/build/dist/5708.d62ffec88d557ee68f7b.js +0 -1
- package/build/dist/5773.7c00b7d46d038d1cad63.js +0 -1
- package/build/dist/5919.8a2c39a0e1623d795ee5.js +0 -1
- package/build/dist/5976.67aa23f2625209b8003b.js +0 -1
- package/build/dist/6002.1c2ff6a9c94ee343dded.js +0 -1
- package/build/dist/6110.a21be9c843a97bad11d5.js +0 -1
- package/build/dist/6402.dc70cc4e1530b8f1519d.js +0 -1
- package/build/dist/6428.8ce7efc20e65f396edc3.js +0 -1
- package/build/dist/648.ca43171884d81b27c3a3.js +0 -1
- package/build/dist/6794.2fe35b73c565a07ec864.js +0 -1
- package/build/dist/697.777c6ae21433eed0b0e9.js +0 -1
- package/build/dist/7017.274f83a8995232a6a9a0.js +0 -1
- package/build/dist/736.086cd9a8f1598c9f0ac7.js +0 -1
- package/build/dist/7690.7472ffd2aecc29343f18.js +0 -1
- package/build/dist/8018.02ea29dc6f59bbfaaee0.js +0 -1
- package/build/dist/8136.dc1403b91767ca089293.js +0 -1
- package/build/dist/8220.3ddda498d174349e189c.js +0 -1
- package/build/dist/8233.6f5cd229953db8462d7d.js +0 -1
- package/build/dist/8505.393a04f6a929ad5cb458.js +0 -1
- package/build/dist/8507.f94666637b2656ec4449.js +0 -1
- package/build/dist/8947.55d1c2f1238de7f51549.js +0 -2
- package/build/dist/8947.55d1c2f1238de7f51549.js.LICENSE.txt +0 -1
- package/build/dist/9256.5d9a03011b69d1504ae4.js +0 -1
- package/build/dist/9307.2c9d7f6089fef297b1c1.js +0 -1
- package/build/dist/9352.6ebe66d0487686642ec9.js +0 -1
- package/build/dist/942.ce695621242a81c499a1.js +0 -1
- package/build/dist/9838.fdfaf3dd7ab2adca7650.js +0 -1
- /package/build/dist/{main.ca6dbdc5e09628b186de.js.LICENSE.txt → main.d6e3ba17511894d8ba05.js.LICENSE.txt} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[5135],{15135(t,n,e){e.d(n,{diagram:()=>at});var i=e(32178),r=(e(31293),e(86827)),s=e(51444);function o(t,n){let e;if(void 0===n)for(const n of t)null!=n&&(e>n||void 0===e&&n>=n)&&(e=n);else{let i=-1;for(let r of t)null!=(r=n(r,++i,t))&&(e>r||void 0===e&&r>=r)&&(e=r)}return e}function l(t){return t.target.depth}function a(t,n){return t.sourceLinks.length?t.depth:n-1}function c(t,n){let e=0;if(void 0===n)for(let n of t)(n=+n)&&(e+=n);else{let i=-1;for(let r of t)(r=+n(r,++i,t))&&(e+=r)}return e}function h(t,n){let e;if(void 0===n)for(const n of t)null!=n&&(e<n||void 0===e&&n>=n)&&(e=n);else{let i=-1;for(let r of t)null!=(r=n(r,++i,t))&&(e<r||void 0===e&&r>=r)&&(e=r)}return e}function u(t){return function(){return t}}function f(t,n){return d(t.source,n.source)||t.index-n.index}function y(t,n){return d(t.target,n.target)||t.index-n.index}function d(t,n){return t.y0-n.y0}function g(t){return t.value}function p(t){return t.index}function _(t){return t.nodes}function k(t){return t.links}function x(t,n){const e=t.get(n);if(!e)throw new Error("missing: "+n);return e}function m({nodes:t}){for(const n of t){let t=n.y0,e=t;for(const e of n.sourceLinks)e.y0=t+e.width/2,t+=e.width;for(const t of n.targetLinks)t.y1=e+t.width/2,e+=t.width}}function b(){let t,n,e,i=0,r=0,s=1,l=1,b=24,v=8,w=p,L=a,S=_,E=k,K=6;function A(){const a={nodes:S.apply(null,arguments),links:E.apply(null,arguments)};return function({nodes:t,links:n}){for(const[n,e]of t.entries())e.index=n,e.sourceLinks=[],e.targetLinks=[];const i=new Map(t.map((n,e)=>[w(n,e,t),n]));for(const[t,e]of n.entries()){e.index=t;let{source:n,target:r}=e;"object"!=typeof n&&(n=e.source=x(i,n)),"object"!=typeof r&&(r=e.target=x(i,r)),n.sourceLinks.push(e),r.targetLinks.push(e)}if(null!=e)for(const{sourceLinks:n,targetLinks:i}of t)n.sort(e),i.sort(e)}(a),function({nodes:t}){for(const n of t)n.value=void 0===n.fixedValue?Math.max(c(n.sourceLinks,g),c(n.targetLinks,g)):n.fixedValue}(a),function({nodes:t}){const n=t.length;let e=new Set(t),i=new Set,r=0;for(;e.size;){for(const t of e){t.depth=r;for(const{target:n}of t.sourceLinks)i.add(n)}if(++r>n)throw new Error("circular link");e=i,i=new Set}}(a),function({nodes:t}){const n=t.length;let e=new Set(t),i=new Set,r=0;for(;e.size;){for(const t of e){t.height=r;for(const{source:n}of t.targetLinks)i.add(n)}if(++r>n)throw new Error("circular link");e=i,i=new Set}}(a),function(e){const a=function({nodes:t}){const e=h(t,t=>t.depth)+1,r=(s-i-b)/(e-1),o=new Array(e);for(const n of t){const t=Math.max(0,Math.min(e-1,Math.floor(L.call(null,n,e))));n.layer=t,n.x0=i+t*r,n.x1=n.x0+b,o[t]?o[t].push(n):o[t]=[n]}if(n)for(const t of o)t.sort(n);return o}(e);t=Math.min(v,(l-r)/(h(a,t=>t.length)-1)),function(n){const e=o(n,n=>(l-r-(n.length-1)*t)/c(n,g));for(const i of n){let n=r;for(const r of i){r.y0=n,r.y1=n+r.value*e,n=r.y1+t;for(const t of r.sourceLinks)t.width=t.value*e}n=(l-n+t)/(i.length+1);for(let t=0;t<i.length;++t){const e=i[t];e.y0+=n*(t+1),e.y1+=n*(t+1)}$(i)}}(a);for(let t=0;t<K;++t){const n=Math.pow(.99,t),e=Math.max(1-n,(t+1)/K);I(a,n,e),M(a,n,e)}}(a),m(a),a}function M(t,e,i){for(let r=1,s=t.length;r<s;++r){const s=t[r];for(const t of s){let n=0,i=0;for(const{source:e,value:r}of t.targetLinks){let s=r*(t.layer-e.layer);n+=D(e,t)*s,i+=s}if(!(i>0))continue;let r=(n/i-t.y0)*e;t.y0+=r,t.y1+=r,P(t)}void 0===n&&s.sort(d),T(s,i)}}function I(t,e,i){for(let r=t.length-2;r>=0;--r){const s=t[r];for(const t of s){let n=0,i=0;for(const{target:e,value:r}of t.sourceLinks){let s=r*(e.layer-t.layer);n+=O(t,e)*s,i+=s}if(!(i>0))continue;let r=(n/i-t.y0)*e;t.y0+=r,t.y1+=r,P(t)}void 0===n&&s.sort(d),T(s,i)}}function T(n,e){const i=n.length>>1,s=n[i];N(n,s.y0-t,i-1,e),C(n,s.y1+t,i+1,e),N(n,l,n.length-1,e),C(n,r,0,e)}function C(n,e,i,r){for(;i<n.length;++i){const s=n[i],o=(e-s.y0)*r;o>1e-6&&(s.y0+=o,s.y1+=o),e=s.y1+t}}function N(n,e,i,r){for(;i>=0;--i){const s=n[i],o=(s.y1-e)*r;o>1e-6&&(s.y0-=o,s.y1-=o),e=s.y0-t}}function P({sourceLinks:t,targetLinks:n}){if(void 0===e){for(const{source:{sourceLinks:t}}of n)t.sort(y);for(const{target:{targetLinks:n}}of t)n.sort(f)}}function $(t){if(void 0===e)for(const{sourceLinks:n,targetLinks:e}of t)n.sort(y),e.sort(f)}function D(n,e){let i=n.y0-(n.sourceLinks.length-1)*t/2;for(const{target:r,width:s}of n.sourceLinks){if(r===e)break;i+=s+t}for(const{source:t,width:r}of e.targetLinks){if(t===n)break;i-=r}return i}function O(n,e){let i=e.y0-(e.targetLinks.length-1)*t/2;for(const{source:r,width:s}of e.targetLinks){if(r===n)break;i+=s+t}for(const{target:t,width:r}of n.sourceLinks){if(t===e)break;i-=r}return i}return A.update=function(t){return m(t),t},A.nodeId=function(t){return arguments.length?(w="function"==typeof t?t:u(t),A):w},A.nodeAlign=function(t){return arguments.length?(L="function"==typeof t?t:u(t),A):L},A.nodeSort=function(t){return arguments.length?(n=t,A):n},A.nodeWidth=function(t){return arguments.length?(b=+t,A):b},A.nodePadding=function(n){return arguments.length?(v=t=+n,A):v},A.nodes=function(t){return arguments.length?(S="function"==typeof t?t:u(t),A):S},A.links=function(t){return arguments.length?(E="function"==typeof t?t:u(t),A):E},A.linkSort=function(t){return arguments.length?(e=t,A):e},A.size=function(t){return arguments.length?(i=r=0,s=+t[0],l=+t[1],A):[s-i,l-r]},A.extent=function(t){return arguments.length?(i=+t[0][0],s=+t[1][0],r=+t[0][1],l=+t[1][1],A):[[i,r],[s,l]]},A.iterations=function(t){return arguments.length?(K=+t,A):K},A}var v=Math.PI,w=2*v,L=1e-6,S=w-L;function E(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function K(){return new E}E.prototype=K.prototype={constructor:E,moveTo:function(t,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,n){this._+="L"+(this._x1=+t)+","+(this._y1=+n)},quadraticCurveTo:function(t,n,e,i){this._+="Q"+ +t+","+ +n+","+(this._x1=+e)+","+(this._y1=+i)},bezierCurveTo:function(t,n,e,i,r,s){this._+="C"+ +t+","+ +n+","+ +e+","+ +i+","+(this._x1=+r)+","+(this._y1=+s)},arcTo:function(t,n,e,i,r){t=+t,n=+n,e=+e,i=+i,r=+r;var s=this._x1,o=this._y1,l=e-t,a=i-n,c=s-t,h=o-n,u=c*c+h*h;if(r<0)throw new Error("negative radius: "+r);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=n);else if(u>L)if(Math.abs(h*l-a*c)>L&&r){var f=e-s,y=i-o,d=l*l+a*a,g=f*f+y*y,p=Math.sqrt(d),_=Math.sqrt(u),k=r*Math.tan((v-Math.acos((d+u-g)/(2*p*_)))/2),x=k/_,m=k/p;Math.abs(x-1)>L&&(this._+="L"+(t+x*c)+","+(n+x*h)),this._+="A"+r+","+r+",0,0,"+ +(h*f>c*y)+","+(this._x1=t+m*l)+","+(this._y1=n+m*a)}else this._+="L"+(this._x1=t)+","+(this._y1=n);else;},arc:function(t,n,e,i,r,s){t=+t,n=+n,s=!!s;var o=(e=+e)*Math.cos(i),l=e*Math.sin(i),a=t+o,c=n+l,h=1^s,u=s?i-r:r-i;if(e<0)throw new Error("negative radius: "+e);null===this._x1?this._+="M"+a+","+c:(Math.abs(this._x1-a)>L||Math.abs(this._y1-c)>L)&&(this._+="L"+a+","+c),e&&(u<0&&(u=u%w+w),u>S?this._+="A"+e+","+e+",0,1,"+h+","+(t-o)+","+(n-l)+"A"+e+","+e+",0,1,"+h+","+(this._x1=a)+","+(this._y1=c):u>L&&(this._+="A"+e+","+e+",0,"+ +(u>=v)+","+h+","+(this._x1=t+e*Math.cos(r))+","+(this._y1=n+e*Math.sin(r))))},rect:function(t,n,e,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +e+"v"+ +i+"h"+-e+"Z"},toString:function(){return this._}};const A=K;var M=Array.prototype.slice;function I(t){return function(){return t}}function T(t){return t[0]}function C(t){return t[1]}function N(t){return t.source}function P(t){return t.target}function $(t){var n=N,e=P,i=T,r=C,s=null;function o(){var o,l=M.call(arguments),a=n.apply(this,l),c=e.apply(this,l);if(s||(s=o=A()),t(s,+i.apply(this,(l[0]=a,l)),+r.apply(this,l),+i.apply(this,(l[0]=c,l)),+r.apply(this,l)),o)return s=null,o+""||null}return o.source=function(t){return arguments.length?(n=t,o):n},o.target=function(t){return arguments.length?(e=t,o):e},o.x=function(t){return arguments.length?(i="function"==typeof t?t:I(+t),o):i},o.y=function(t){return arguments.length?(r="function"==typeof t?t:I(+t),o):r},o.context=function(t){return arguments.length?(s=t??null,o):s},o}function D(t,n,e,i,r){t.moveTo(n,e),t.bezierCurveTo(n=(n+i)/2,e,n,r,i,r)}function O(t){return[t.source.x1,t.y0]}function j(t){return[t.target.x0,t.y1]}function z(){return $(D).source(O).target(j)}e.dn(I),e.dn(z);var F=function(){var t=(0,r.K)(function(t,n,e,i){for(e=e||{},i=t.length;i--;e[t[i]]=n);return e},"o"),n=[1,9],e=[1,10],i=[1,5,10,12],s={trace:(0,r.K)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:(0,r.K)(function(t,n,e,i,r,s,o){var l=s.length-1;switch(r){case 7:const t=i.findOrCreateNode(s[l-4].trim().replaceAll('""','"')),n=i.findOrCreateNode(s[l-2].trim().replaceAll('""','"')),e=parseFloat(s[l].trim());i.addLink(t,n,e);break;case 8:case 9:case 11:this.$=s[l];break;case 10:this.$=s[l-1]}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:n,20:e},{1:[2,6],7:11,10:[1,12]},t(e,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(i,[2,8]),t(i,[2,9]),{19:[1,16]},t(i,[2,11]),{1:[2,1]},{1:[2,5]},t(e,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:n,20:e},{15:18,16:7,17:8,18:n,20:e},{18:[1,19]},t(e,[2,3]),{12:[1,20]},t(i,[2,10]),{15:21,16:7,17:8,18:n,20:e},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:(0,r.K)(function(t,n){if(!n.recoverable){var e=new Error(t);throw e.hash=n,e}this.trace(t)},"parseError"),parse:(0,r.K)(function(t){var n=this,e=[0],i=[],s=[null],o=[],l=this.table,a="",c=0,h=0,u=0,f=o.slice.call(arguments,1),y=Object.create(this.lexer),d={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(d.yy[g]=this.yy[g]);y.setInput(t,d.yy),d.yy.lexer=y,d.yy.parser=this,void 0===y.yylloc&&(y.yylloc={});var p=y.yylloc;o.push(p);var _=y.options&&y.options.ranges;function k(){var t;return"number"!=typeof(t=i.pop()||y.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=n.symbols_[t]||t),t}"function"==typeof d.yy.parseError?this.parseError=d.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,r.K)(function(t){e.length=e.length-2*t,s.length=s.length-t,o.length=o.length-t},"popStack"),(0,r.K)(k,"lex");for(var x,m,b,v,w,L,S,E,K,A={};;){if(b=e[e.length-1],this.defaultActions[b]?v=this.defaultActions[b]:(null==x&&(x=k()),v=l[b]&&l[b][x]),void 0===v||!v.length||!v[0]){var M="";for(L in K=[],l[b])this.terminals_[L]&&L>2&&K.push("'"+this.terminals_[L]+"'");M=y.showPosition?"Parse error on line "+(c+1)+":\n"+y.showPosition()+"\nExpecting "+K.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==x?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(M,{text:y.match,token:this.terminals_[x]||x,line:y.yylineno,loc:p,expected:K})}if(v[0]instanceof Array&&v.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+x);switch(v[0]){case 1:e.push(x),s.push(y.yytext),o.push(y.yylloc),e.push(v[1]),x=null,m?(x=m,m=null):(h=y.yyleng,a=y.yytext,c=y.yylineno,p=y.yylloc,u>0&&u--);break;case 2:if(S=this.productions_[v[1]][1],A.$=s[s.length-S],A._$={first_line:o[o.length-(S||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(S||1)].first_column,last_column:o[o.length-1].last_column},_&&(A._$.range=[o[o.length-(S||1)].range[0],o[o.length-1].range[1]]),void 0!==(w=this.performAction.apply(A,[a,h,c,d.yy,v[1],s,o].concat(f))))return w;S&&(e=e.slice(0,-1*S*2),s=s.slice(0,-1*S),o=o.slice(0,-1*S)),e.push(this.productions_[v[1]][0]),s.push(A.$),o.push(A._$),E=l[e[e.length-2]][e[e.length-1]],e.push(E);break;case 3:return!0}}return!0},"parse")},o=function(){return{EOF:1,parseError:(0,r.K)(function(t,n){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,n)},"parseError"),setInput:(0,r.K)(function(t,n){return this.yy=n||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:(0,r.K)(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:(0,r.K)(function(t){var n=t.length,e=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var i=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 r=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===i.length?this.yylloc.first_column:0)+i[i.length-e.length].length-e[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:(0,r.K)(function(){return this._more=!0,this},"more"),reject:(0,r.K)(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:(0,r.K)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,r.K)(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:(0,r.K)(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:(0,r.K)(function(){var t=this.pastInput(),n=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+n+"^"},"showPosition"),test_match:(0,r.K)(function(t,n){var e,i,r;if(this.options.backtrack_lexer&&(r={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&&(r.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.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,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e)return e;if(this._backtrack){for(var s in r)this[s]=r[s];return!1}return!1},"test_match"),next:(0,r.K)(function(){if(this.done)return this.EOF;var t,n,e,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),s=0;s<r.length;s++)if((e=this._input.match(this.rules[r[s]]))&&(!n||e[0].length>n[0].length)){if(n=e,i=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(e,r[s])))return t;if(this._backtrack){n=!1;continue}return!1}if(!this.options.flex)break}return n?!1!==(t=this.test_match(n,r[i]))&&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:(0,r.K)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,r.K)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,r.K)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,r.K)(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:(0,r.K)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,r.K)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,r.K)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,r.K)(function(t,n,e,i){switch(e){case 0:case 1:return this.pushState("csv"),4;case 2:return 10;case 3:return 5;case 4:return 12;case 5:return this.pushState("escaped_text"),18;case 6:return 20;case 7:return this.popState("escaped_text"),18;case 8:return 19}},"anonymous"),rules:[/^(?:sankey-beta\b)/i,/^(?:sankey\b)/i,/^(?:$)/i,/^(?:((\u000D\u000A)|(\u000A)))/i,/^(?:(\u002C))/i,/^(?:(\u0022))/i,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,/^(?:(\u0022)(?!(\u0022)))/i,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],conditions:{csv:{rules:[2,3,4,5,6,7,8],inclusive:!1},escaped_text:{rules:[7,8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8],inclusive:!0}}}}();function l(){this.yy={}}return s.lexer=o,(0,r.K)(l,"Parser"),l.prototype=s,s.Parser=l,new l}();F.parser=F;var U=F,W=[],G=[],V=new Map,X=(0,r.K)(()=>{W=[],G=[],V=new Map,(0,i.IU)()},"clear"),Y=class{constructor(t,n,e=0){this.source=t,this.target=n,this.value=e}static{(0,r.K)(this,"SankeyLink")}},q=(0,r.K)((t,n,e)=>{W.push(new Y(t,n,e))},"addLink"),B=class{constructor(t){this.ID=t}static{(0,r.K)(this,"SankeyNode")}},Q=(0,r.K)(t=>{t=i.Y2.sanitizeText(t,(0,i.D7)());let n=V.get(t);return void 0===n&&(n=new B(t),V.set(t,n),G.push(n)),n},"findOrCreateNode"),R=(0,r.K)(()=>G,"getNodes"),Z=(0,r.K)(()=>W,"getLinks"),H=(0,r.K)(()=>({nodes:G.map(t=>({id:t.ID})),links:W.map(t=>({source:t.source.ID,target:t.target.ID,value:t.value}))}),"getGraph"),J={nodesMap:V,getConfig:(0,r.K)(()=>(0,i.D7)().sankey,"getConfig"),getNodes:R,getLinks:Z,getGraph:H,addLink:q,findOrCreateNode:Q,getAccTitle:i.iN,setAccTitle:i.SV,getAccDescription:i.m7,setAccDescription:i.EI,getDiagramTitle:i.ab,setDiagramTitle:i.ke,clear:X},tt=class t{static{(0,r.K)(this,"Uid")}static{this.count=0}static next(n){return new t(n+ ++t.count)}constructor(t){this.id=t,this.href=`#${t}`}toString(){return"url("+this.href+")"}},nt={left:function(t){return t.depth},right:function(t,n){return n-1-t.height},center:function(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?o(t.sourceLinks,l)-1:0},justify:a},et=(0,r.K)(t=>{let n=0,e=0;for(const i of t){const t=i.value??0;t>n&&(n=t,e=i.layer??0)}return e},"findCentralNodeLayer"),it=(0,r.K)(function(t,n,e,o){const{securityLevel:l,sankey:a}=(0,i.D7)(),c=i.ME.sankey;let h;"sandbox"===l&&(h=(0,s.Ltv)("#i"+n));const u="sandbox"===l?(0,s.Ltv)(h.nodes()[0].contentDocument.body):(0,s.Ltv)("body"),f="sandbox"===l?u.select(`[id="${n}"]`):(0,s.Ltv)(`[id="${n}"]`),y=a?.width??c.width,d=a?.height??c.width,g=a?.useMaxWidth??c.useMaxWidth,p=a?.nodeAlignment??c.nodeAlignment,_=a?.prefix??c.prefix,k=a?.suffix??c.suffix,x=a?.showValues??c.showValues,m=a?.nodeWidth??c.nodeWidth??10,v=a?.nodePadding??c.nodePadding??12,w=a?.labelStyle??c.labelStyle??"legacy",L=a?.nodeColors??{},S=o.db.getGraph(),E=nt[p];b().nodeId(t=>t.id).nodeWidth(m).nodePadding(v+(x?15:0)).nodeAlign(E).extent([[0,0],[y,d]])(S);const K=et(S.nodes),A=(0,s.UMr)(s.zt),M=(0,r.K)(t=>L[t]??A(t),"getNodeColor");f.append("g").attr("class","nodes").selectAll(".node").data(S.nodes).join("g").attr("class","node").attr("id",t=>(t.uid=tt.next("node-")).id).attr("transform",function(t){return"translate("+t.x0+","+t.y0+")"}).attr("x",t=>t.x0).attr("y",t=>t.y0).append("rect").attr("height",t=>t.y1-t.y0).attr("width",t=>t.x1-t.x0).attr("fill",t=>M(t.id));const I=(0,r.K)(({id:t,value:n})=>x?`${t}\n${_}${Math.round(100*n)/100}${k}`:t,"getText"),T=(0,r.K)(t=>{if("outlined"===w){return(t.layer??0)<K?{x:t.x0-6,anchor:"end"}:{x:t.x1+6,anchor:"start"}}return t.x0<y/2?{x:t.x1+6,anchor:"start"}:{x:t.x0-6,anchor:"end"}},"getLabelPosition"),C=f.append("g").attr("class","node-labels").attr("font-size",14),N=(0,r.K)(t=>C.selectAll(t?`.${t}`:"text").data(S.nodes).join("text").attr("class",t??null).attr("x",t=>T(t).x).attr("y",t=>(t.y1+t.y0)/2).attr("dy",(x?"0":"0.35")+"em").attr("text-anchor",t=>T(t).anchor).text(I),"appendLabel");"outlined"===w?(N("sankey-label-bg"),N("sankey-label-fg")):N();const P=f.append("g").attr("class","links").attr("fill","none").attr("stroke-opacity",.5).selectAll(".link").data(S.links).join("g").attr("class","link").style("mix-blend-mode","multiply"),$=a?.linkColor??"gradient";if("gradient"===$){const t=P.append("linearGradient").attr("id",t=>(t.uid=tt.next("linearGradient-")).id).attr("gradientUnits","userSpaceOnUse").attr("x1",t=>t.source.x1).attr("x2",t=>t.target.x0);t.append("stop").attr("offset","0%").attr("stop-color",t=>M(t.source.id)),t.append("stop").attr("offset","100%").attr("stop-color",t=>M(t.target.id))}let D;switch($){case"gradient":D=(0,r.K)(t=>t.uid,"coloring");break;case"source":D=(0,r.K)(t=>M(t.source.id),"coloring");break;case"target":D=(0,r.K)(t=>M(t.target.id),"coloring");break;default:D=$}P.append("path").attr("d",z()).attr("stroke",D).attr("stroke-width",t=>Math.max(1,t.width)),(0,i.ot)(void 0,f,0,g)},"draw"),rt={draw:it},st=(0,r.K)(t=>t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,"\n").trim(),"prepareTextForParsing"),ot=(0,r.K)(t=>`.label {\n font-family: ${t.fontFamily};\n }\n\n .node-labels {\n font-family: ${t.fontFamily};\n }\n\n /* Outlined label style - background stroke for better readability */\n .sankey-label-bg {\n stroke: ${t.mainBkg||t.background||"#fff"};\n stroke-width: 4px;\n stroke-linejoin: round;\n paint-order: stroke;\n }\n\n /* Foreground label text */\n .sankey-label-fg {\n fill: ${t.textColor};\n }\n\n /* Node styling */\n .node rect {\n shape-rendering: crispEdges;\n }\n\n /* Link styling */\n .link {\n fill: none;\n stroke-opacity: 0.5;\n mix-blend-mode: multiply;\n }\n`,"getStyles"),lt=U.parse.bind(U);U.parse=t=>lt(st(t));var at={styles:ot,parser:U,db:J,renderer:rt}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[6800],{36800(t,n,e){e.d(n,{diagram:()=>at});var i=e(86535),r=(e(31293),e(86827)),s=e(51444);function o(t,n){let e;if(void 0===n)for(const n of t)null!=n&&(e>n||void 0===e&&n>=n)&&(e=n);else{let i=-1;for(let r of t)null!=(r=n(r,++i,t))&&(e>r||void 0===e&&r>=r)&&(e=r)}return e}function l(t){return t.target.depth}function a(t,n){return t.sourceLinks.length?t.depth:n-1}function c(t,n){let e=0;if(void 0===n)for(let n of t)(n=+n)&&(e+=n);else{let i=-1;for(let r of t)(r=+n(r,++i,t))&&(e+=r)}return e}function h(t,n){let e;if(void 0===n)for(const n of t)null!=n&&(e<n||void 0===e&&n>=n)&&(e=n);else{let i=-1;for(let r of t)null!=(r=n(r,++i,t))&&(e<r||void 0===e&&r>=r)&&(e=r)}return e}function u(t){return function(){return t}}function f(t,n){return d(t.source,n.source)||t.index-n.index}function y(t,n){return d(t.target,n.target)||t.index-n.index}function d(t,n){return t.y0-n.y0}function g(t){return t.value}function p(t){return t.index}function _(t){return t.nodes}function k(t){return t.links}function x(t,n){const e=t.get(n);if(!e)throw new Error("missing: "+n);return e}function m({nodes:t}){for(const n of t){let t=n.y0,e=t;for(const e of n.sourceLinks)e.y0=t+e.width/2,t+=e.width;for(const t of n.targetLinks)t.y1=e+t.width/2,e+=t.width}}function b(){let t,n,e,i=0,r=0,s=1,l=1,b=24,v=8,w=p,L=a,S=_,E=k,K=6;function A(){const a={nodes:S.apply(null,arguments),links:E.apply(null,arguments)};return function({nodes:t,links:n}){for(const[n,e]of t.entries())e.index=n,e.sourceLinks=[],e.targetLinks=[];const i=new Map(t.map((n,e)=>[w(n,e,t),n]));for(const[t,e]of n.entries()){e.index=t;let{source:n,target:r}=e;"object"!=typeof n&&(n=e.source=x(i,n)),"object"!=typeof r&&(r=e.target=x(i,r)),n.sourceLinks.push(e),r.targetLinks.push(e)}if(null!=e)for(const{sourceLinks:n,targetLinks:i}of t)n.sort(e),i.sort(e)}(a),function({nodes:t}){for(const n of t)n.value=void 0===n.fixedValue?Math.max(c(n.sourceLinks,g),c(n.targetLinks,g)):n.fixedValue}(a),function({nodes:t}){const n=t.length;let e=new Set(t),i=new Set,r=0;for(;e.size;){for(const t of e){t.depth=r;for(const{target:n}of t.sourceLinks)i.add(n)}if(++r>n)throw new Error("circular link");e=i,i=new Set}}(a),function({nodes:t}){const n=t.length;let e=new Set(t),i=new Set,r=0;for(;e.size;){for(const t of e){t.height=r;for(const{source:n}of t.targetLinks)i.add(n)}if(++r>n)throw new Error("circular link");e=i,i=new Set}}(a),function(e){const a=function({nodes:t}){const e=h(t,t=>t.depth)+1,r=(s-i-b)/(e-1),o=new Array(e);for(const n of t){const t=Math.max(0,Math.min(e-1,Math.floor(L.call(null,n,e))));n.layer=t,n.x0=i+t*r,n.x1=n.x0+b,o[t]?o[t].push(n):o[t]=[n]}if(n)for(const t of o)t.sort(n);return o}(e);t=Math.min(v,(l-r)/(h(a,t=>t.length)-1)),function(n){const e=o(n,n=>(l-r-(n.length-1)*t)/c(n,g));for(const i of n){let n=r;for(const r of i){r.y0=n,r.y1=n+r.value*e,n=r.y1+t;for(const t of r.sourceLinks)t.width=t.value*e}n=(l-n+t)/(i.length+1);for(let t=0;t<i.length;++t){const e=i[t];e.y0+=n*(t+1),e.y1+=n*(t+1)}$(i)}}(a);for(let t=0;t<K;++t){const n=Math.pow(.99,t),e=Math.max(1-n,(t+1)/K);I(a,n,e),M(a,n,e)}}(a),m(a),a}function M(t,e,i){for(let r=1,s=t.length;r<s;++r){const s=t[r];for(const t of s){let n=0,i=0;for(const{source:e,value:r}of t.targetLinks){let s=r*(t.layer-e.layer);n+=D(e,t)*s,i+=s}if(!(i>0))continue;let r=(n/i-t.y0)*e;t.y0+=r,t.y1+=r,P(t)}void 0===n&&s.sort(d),T(s,i)}}function I(t,e,i){for(let r=t.length-2;r>=0;--r){const s=t[r];for(const t of s){let n=0,i=0;for(const{target:e,value:r}of t.sourceLinks){let s=r*(e.layer-t.layer);n+=O(t,e)*s,i+=s}if(!(i>0))continue;let r=(n/i-t.y0)*e;t.y0+=r,t.y1+=r,P(t)}void 0===n&&s.sort(d),T(s,i)}}function T(n,e){const i=n.length>>1,s=n[i];N(n,s.y0-t,i-1,e),C(n,s.y1+t,i+1,e),N(n,l,n.length-1,e),C(n,r,0,e)}function C(n,e,i,r){for(;i<n.length;++i){const s=n[i],o=(e-s.y0)*r;o>1e-6&&(s.y0+=o,s.y1+=o),e=s.y1+t}}function N(n,e,i,r){for(;i>=0;--i){const s=n[i],o=(s.y1-e)*r;o>1e-6&&(s.y0-=o,s.y1-=o),e=s.y0-t}}function P({sourceLinks:t,targetLinks:n}){if(void 0===e){for(const{source:{sourceLinks:t}}of n)t.sort(y);for(const{target:{targetLinks:n}}of t)n.sort(f)}}function $(t){if(void 0===e)for(const{sourceLinks:n,targetLinks:e}of t)n.sort(y),e.sort(f)}function D(n,e){let i=n.y0-(n.sourceLinks.length-1)*t/2;for(const{target:r,width:s}of n.sourceLinks){if(r===e)break;i+=s+t}for(const{source:t,width:r}of e.targetLinks){if(t===n)break;i-=r}return i}function O(n,e){let i=e.y0-(e.targetLinks.length-1)*t/2;for(const{source:r,width:s}of e.targetLinks){if(r===n)break;i+=s+t}for(const{target:t,width:r}of n.sourceLinks){if(t===e)break;i-=r}return i}return A.update=function(t){return m(t),t},A.nodeId=function(t){return arguments.length?(w="function"==typeof t?t:u(t),A):w},A.nodeAlign=function(t){return arguments.length?(L="function"==typeof t?t:u(t),A):L},A.nodeSort=function(t){return arguments.length?(n=t,A):n},A.nodeWidth=function(t){return arguments.length?(b=+t,A):b},A.nodePadding=function(n){return arguments.length?(v=t=+n,A):v},A.nodes=function(t){return arguments.length?(S="function"==typeof t?t:u(t),A):S},A.links=function(t){return arguments.length?(E="function"==typeof t?t:u(t),A):E},A.linkSort=function(t){return arguments.length?(e=t,A):e},A.size=function(t){return arguments.length?(i=r=0,s=+t[0],l=+t[1],A):[s-i,l-r]},A.extent=function(t){return arguments.length?(i=+t[0][0],s=+t[1][0],r=+t[0][1],l=+t[1][1],A):[[i,r],[s,l]]},A.iterations=function(t){return arguments.length?(K=+t,A):K},A}var v=Math.PI,w=2*v,L=1e-6,S=w-L;function E(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function K(){return new E}E.prototype=K.prototype={constructor:E,moveTo:function(t,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,n){this._+="L"+(this._x1=+t)+","+(this._y1=+n)},quadraticCurveTo:function(t,n,e,i){this._+="Q"+ +t+","+ +n+","+(this._x1=+e)+","+(this._y1=+i)},bezierCurveTo:function(t,n,e,i,r,s){this._+="C"+ +t+","+ +n+","+ +e+","+ +i+","+(this._x1=+r)+","+(this._y1=+s)},arcTo:function(t,n,e,i,r){t=+t,n=+n,e=+e,i=+i,r=+r;var s=this._x1,o=this._y1,l=e-t,a=i-n,c=s-t,h=o-n,u=c*c+h*h;if(r<0)throw new Error("negative radius: "+r);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=n);else if(u>L)if(Math.abs(h*l-a*c)>L&&r){var f=e-s,y=i-o,d=l*l+a*a,g=f*f+y*y,p=Math.sqrt(d),_=Math.sqrt(u),k=r*Math.tan((v-Math.acos((d+u-g)/(2*p*_)))/2),x=k/_,m=k/p;Math.abs(x-1)>L&&(this._+="L"+(t+x*c)+","+(n+x*h)),this._+="A"+r+","+r+",0,0,"+ +(h*f>c*y)+","+(this._x1=t+m*l)+","+(this._y1=n+m*a)}else this._+="L"+(this._x1=t)+","+(this._y1=n);else;},arc:function(t,n,e,i,r,s){t=+t,n=+n,s=!!s;var o=(e=+e)*Math.cos(i),l=e*Math.sin(i),a=t+o,c=n+l,h=1^s,u=s?i-r:r-i;if(e<0)throw new Error("negative radius: "+e);null===this._x1?this._+="M"+a+","+c:(Math.abs(this._x1-a)>L||Math.abs(this._y1-c)>L)&&(this._+="L"+a+","+c),e&&(u<0&&(u=u%w+w),u>S?this._+="A"+e+","+e+",0,1,"+h+","+(t-o)+","+(n-l)+"A"+e+","+e+",0,1,"+h+","+(this._x1=a)+","+(this._y1=c):u>L&&(this._+="A"+e+","+e+",0,"+ +(u>=v)+","+h+","+(this._x1=t+e*Math.cos(r))+","+(this._y1=n+e*Math.sin(r))))},rect:function(t,n,e,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +e+"v"+ +i+"h"+-e+"Z"},toString:function(){return this._}};const A=K;var M=Array.prototype.slice;function I(t){return function(){return t}}function T(t){return t[0]}function C(t){return t[1]}function N(t){return t.source}function P(t){return t.target}function $(t){var n=N,e=P,i=T,r=C,s=null;function o(){var o,l=M.call(arguments),a=n.apply(this,l),c=e.apply(this,l);if(s||(s=o=A()),t(s,+i.apply(this,(l[0]=a,l)),+r.apply(this,l),+i.apply(this,(l[0]=c,l)),+r.apply(this,l)),o)return s=null,o+""||null}return o.source=function(t){return arguments.length?(n=t,o):n},o.target=function(t){return arguments.length?(e=t,o):e},o.x=function(t){return arguments.length?(i="function"==typeof t?t:I(+t),o):i},o.y=function(t){return arguments.length?(r="function"==typeof t?t:I(+t),o):r},o.context=function(t){return arguments.length?(s=t??null,o):s},o}function D(t,n,e,i,r){t.moveTo(n,e),t.bezierCurveTo(n=(n+i)/2,e,n,r,i,r)}function O(t){return[t.source.x1,t.y0]}function j(t){return[t.target.x0,t.y1]}function z(){return $(D).source(O).target(j)}e.dn(I),e.dn(z);var F=function(){var t=(0,r.K)(function(t,n,e,i){for(e=e||{},i=t.length;i--;e[t[i]]=n);return e},"o"),n=[1,9],e=[1,10],i=[1,5,10,12],s={trace:(0,r.K)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:(0,r.K)(function(t,n,e,i,r,s,o){var l=s.length-1;switch(r){case 7:const t=i.findOrCreateNode(s[l-4].trim().replaceAll('""','"')),n=i.findOrCreateNode(s[l-2].trim().replaceAll('""','"')),e=parseFloat(s[l].trim());i.addLink(t,n,e);break;case 8:case 9:case 11:this.$=s[l];break;case 10:this.$=s[l-1]}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:n,20:e},{1:[2,6],7:11,10:[1,12]},t(e,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(i,[2,8]),t(i,[2,9]),{19:[1,16]},t(i,[2,11]),{1:[2,1]},{1:[2,5]},t(e,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:n,20:e},{15:18,16:7,17:8,18:n,20:e},{18:[1,19]},t(e,[2,3]),{12:[1,20]},t(i,[2,10]),{15:21,16:7,17:8,18:n,20:e},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:(0,r.K)(function(t,n){if(!n.recoverable){var e=new Error(t);throw e.hash=n,e}this.trace(t)},"parseError"),parse:(0,r.K)(function(t){var n=this,e=[0],i=[],s=[null],o=[],l=this.table,a="",c=0,h=0,u=0,f=o.slice.call(arguments,1),y=Object.create(this.lexer),d={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(d.yy[g]=this.yy[g]);y.setInput(t,d.yy),d.yy.lexer=y,d.yy.parser=this,void 0===y.yylloc&&(y.yylloc={});var p=y.yylloc;o.push(p);var _=y.options&&y.options.ranges;function k(){var t;return"number"!=typeof(t=i.pop()||y.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=n.symbols_[t]||t),t}"function"==typeof d.yy.parseError?this.parseError=d.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,r.K)(function(t){e.length=e.length-2*t,s.length=s.length-t,o.length=o.length-t},"popStack"),(0,r.K)(k,"lex");for(var x,m,b,v,w,L,S,E,K,A={};;){if(b=e[e.length-1],this.defaultActions[b]?v=this.defaultActions[b]:(null==x&&(x=k()),v=l[b]&&l[b][x]),void 0===v||!v.length||!v[0]){var M="";for(L in K=[],l[b])this.terminals_[L]&&L>2&&K.push("'"+this.terminals_[L]+"'");M=y.showPosition?"Parse error on line "+(c+1)+":\n"+y.showPosition()+"\nExpecting "+K.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==x?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(M,{text:y.match,token:this.terminals_[x]||x,line:y.yylineno,loc:p,expected:K})}if(v[0]instanceof Array&&v.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+x);switch(v[0]){case 1:e.push(x),s.push(y.yytext),o.push(y.yylloc),e.push(v[1]),x=null,m?(x=m,m=null):(h=y.yyleng,a=y.yytext,c=y.yylineno,p=y.yylloc,u>0&&u--);break;case 2:if(S=this.productions_[v[1]][1],A.$=s[s.length-S],A._$={first_line:o[o.length-(S||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(S||1)].first_column,last_column:o[o.length-1].last_column},_&&(A._$.range=[o[o.length-(S||1)].range[0],o[o.length-1].range[1]]),void 0!==(w=this.performAction.apply(A,[a,h,c,d.yy,v[1],s,o].concat(f))))return w;S&&(e=e.slice(0,-1*S*2),s=s.slice(0,-1*S),o=o.slice(0,-1*S)),e.push(this.productions_[v[1]][0]),s.push(A.$),o.push(A._$),E=l[e[e.length-2]][e[e.length-1]],e.push(E);break;case 3:return!0}}return!0},"parse")},o=function(){return{EOF:1,parseError:(0,r.K)(function(t,n){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,n)},"parseError"),setInput:(0,r.K)(function(t,n){return this.yy=n||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:(0,r.K)(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:(0,r.K)(function(t){var n=t.length,e=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var i=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 r=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===i.length?this.yylloc.first_column:0)+i[i.length-e.length].length-e[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:(0,r.K)(function(){return this._more=!0,this},"more"),reject:(0,r.K)(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:(0,r.K)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,r.K)(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:(0,r.K)(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:(0,r.K)(function(){var t=this.pastInput(),n=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+n+"^"},"showPosition"),test_match:(0,r.K)(function(t,n){var e,i,r;if(this.options.backtrack_lexer&&(r={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&&(r.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.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,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e)return e;if(this._backtrack){for(var s in r)this[s]=r[s];return!1}return!1},"test_match"),next:(0,r.K)(function(){if(this.done)return this.EOF;var t,n,e,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),s=0;s<r.length;s++)if((e=this._input.match(this.rules[r[s]]))&&(!n||e[0].length>n[0].length)){if(n=e,i=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(e,r[s])))return t;if(this._backtrack){n=!1;continue}return!1}if(!this.options.flex)break}return n?!1!==(t=this.test_match(n,r[i]))&&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:(0,r.K)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,r.K)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,r.K)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,r.K)(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:(0,r.K)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,r.K)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,r.K)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,r.K)(function(t,n,e,i){switch(e){case 0:case 1:return this.pushState("csv"),4;case 2:return 10;case 3:return 5;case 4:return 12;case 5:return this.pushState("escaped_text"),18;case 6:return 20;case 7:return this.popState("escaped_text"),18;case 8:return 19}},"anonymous"),rules:[/^(?:sankey-beta\b)/i,/^(?:sankey\b)/i,/^(?:$)/i,/^(?:((\u000D\u000A)|(\u000A)))/i,/^(?:(\u002C))/i,/^(?:(\u0022))/i,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,/^(?:(\u0022)(?!(\u0022)))/i,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],conditions:{csv:{rules:[2,3,4,5,6,7,8],inclusive:!1},escaped_text:{rules:[7,8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8],inclusive:!0}}}}();function l(){this.yy={}}return s.lexer=o,(0,r.K)(l,"Parser"),l.prototype=s,s.Parser=l,new l}();F.parser=F;var U=F,W=[],G=[],V=new Map,X=(0,r.K)(()=>{W=[],G=[],V=new Map,(0,i.IU)()},"clear"),Y=class{constructor(t,n,e=0){this.source=t,this.target=n,this.value=e}static{(0,r.K)(this,"SankeyLink")}},q=(0,r.K)((t,n,e)=>{W.push(new Y(t,n,e))},"addLink"),B=class{constructor(t){this.ID=t}static{(0,r.K)(this,"SankeyNode")}},Q=(0,r.K)(t=>{t=i.Y2.sanitizeText(t,(0,i.D7)());let n=V.get(t);return void 0===n&&(n=new B(t),V.set(t,n),G.push(n)),n},"findOrCreateNode"),R=(0,r.K)(()=>G,"getNodes"),Z=(0,r.K)(()=>W,"getLinks"),H=(0,r.K)(()=>({nodes:G.map(t=>({id:t.ID})),links:W.map(t=>({source:t.source.ID,target:t.target.ID,value:t.value}))}),"getGraph"),J={nodesMap:V,getConfig:(0,r.K)(()=>(0,i.D7)().sankey,"getConfig"),getNodes:R,getLinks:Z,getGraph:H,addLink:q,findOrCreateNode:Q,getAccTitle:i.iN,setAccTitle:i.SV,getAccDescription:i.m7,setAccDescription:i.EI,getDiagramTitle:i.ab,setDiagramTitle:i.ke,clear:X},tt=class t{static{(0,r.K)(this,"Uid")}static{this.count=0}static next(n){return new t(n+ ++t.count)}constructor(t){this.id=t,this.href=`#${t}`}toString(){return"url("+this.href+")"}},nt={left:function(t){return t.depth},right:function(t,n){return n-1-t.height},center:function(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?o(t.sourceLinks,l)-1:0},justify:a},et=(0,r.K)(t=>{let n=0,e=0;for(const i of t){const t=i.value??0;t>n&&(n=t,e=i.layer??0)}return e},"findCentralNodeLayer"),it=(0,r.K)(function(t,n,e,o){const{securityLevel:l,sankey:a}=(0,i.D7)(),c=i.ME.sankey;let h;"sandbox"===l&&(h=(0,s.Ltv)("#i"+n));const u="sandbox"===l?(0,s.Ltv)(h.nodes()[0].contentDocument.body):(0,s.Ltv)("body"),f="sandbox"===l?u.select(`[id="${n}"]`):(0,s.Ltv)(`[id="${n}"]`),y=a?.width??c.width,d=a?.height??c.width,g=a?.useMaxWidth??c.useMaxWidth,p=a?.nodeAlignment??c.nodeAlignment,_=a?.prefix??c.prefix,k=a?.suffix??c.suffix,x=a?.showValues??c.showValues,m=a?.nodeWidth??c.nodeWidth??10,v=a?.nodePadding??c.nodePadding??12,w=a?.labelStyle??c.labelStyle??"legacy",L=a?.nodeColors??{},S=o.db.getGraph(),E=nt[p];b().nodeId(t=>t.id).nodeWidth(m).nodePadding(v+(x?15:0)).nodeAlign(E).extent([[0,0],[y,d]])(S);const K=et(S.nodes),A=(0,s.UMr)(s.zt),M=(0,r.K)(t=>L[t]??A(t),"getNodeColor");f.append("g").attr("class","nodes").selectAll(".node").data(S.nodes).join("g").attr("class","node").attr("id",t=>(t.uid=tt.next("node-")).id).attr("transform",function(t){return"translate("+t.x0+","+t.y0+")"}).attr("x",t=>t.x0).attr("y",t=>t.y0).append("rect").attr("height",t=>t.y1-t.y0).attr("width",t=>t.x1-t.x0).attr("fill",t=>M(t.id));const I=(0,r.K)(({id:t,value:n})=>x?`${t}\n${_}${Math.round(100*n)/100}${k}`:t,"getText"),T=(0,r.K)(t=>{if("outlined"===w){return(t.layer??0)<K?{x:t.x0-6,anchor:"end"}:{x:t.x1+6,anchor:"start"}}return t.x0<y/2?{x:t.x1+6,anchor:"start"}:{x:t.x0-6,anchor:"end"}},"getLabelPosition"),C=f.append("g").attr("class","node-labels").attr("font-size",14),N=(0,r.K)(t=>C.selectAll(t?`.${t}`:"text").data(S.nodes).join("text").attr("class",t??null).attr("x",t=>T(t).x).attr("y",t=>(t.y1+t.y0)/2).attr("dy",(x?"0":"0.35")+"em").attr("text-anchor",t=>T(t).anchor).text(I),"appendLabel");"outlined"===w?(N("sankey-label-bg"),N("sankey-label-fg")):N();const P=f.append("g").attr("class","links").attr("fill","none").attr("stroke-opacity",.5).selectAll(".link").data(S.links).join("g").attr("class","link").style("mix-blend-mode","multiply"),$=a?.linkColor??"gradient";if("gradient"===$){const t=P.append("linearGradient").attr("id",t=>(t.uid=tt.next("linearGradient-")).id).attr("gradientUnits","userSpaceOnUse").attr("x1",t=>t.source.x1).attr("x2",t=>t.target.x0);t.append("stop").attr("offset","0%").attr("stop-color",t=>M(t.source.id)),t.append("stop").attr("offset","100%").attr("stop-color",t=>M(t.target.id))}let D;switch($){case"gradient":D=(0,r.K)(t=>t.uid,"coloring");break;case"source":D=(0,r.K)(t=>M(t.source.id),"coloring");break;case"target":D=(0,r.K)(t=>M(t.target.id),"coloring");break;default:D=$}P.append("path").attr("d",z()).attr("stroke",D).attr("stroke-width",t=>Math.max(1,t.width)),(0,i.ot)(void 0,f,0,g)},"draw"),rt={draw:it},st=(0,r.K)(t=>t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,"\n").trim(),"prepareTextForParsing"),ot=(0,r.K)(t=>`.label {\n font-family: ${t.fontFamily};\n }\n\n .node-labels {\n font-family: ${t.fontFamily};\n }\n\n /* Outlined label style - background stroke for better readability */\n .sankey-label-bg {\n stroke: ${t.mainBkg||t.background||"#fff"};\n stroke-width: 4px;\n stroke-linejoin: round;\n paint-order: stroke;\n }\n\n /* Foreground label text */\n .sankey-label-fg {\n fill: ${t.textColor};\n }\n\n /* Node styling */\n .node rect {\n shape-rendering: crispEdges;\n }\n\n /* Link styling */\n .link {\n fill: none;\n stroke-opacity: 0.5;\n mix-blend-mode: multiply;\n }\n`,"getStyles"),lt=U.parse.bind(U);U.parse=t=>lt(st(t));var at={styles:ot,parser:U,db:J,renderer:rt}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[6803],{66803(t,e,i){i.d(e,{diagram:()=>C});var n=i(5637),s=i(12505),a=i(86535),r=(i(31293),i(86827)),h=i(61057),o=function(){var t=(0,r.K)(function(t,e,i,n){for(i=i||{},n=t.length;n--;i[t[n]]=e);return i},"o"),e=[1,4],i=[1,14],n=[1,12],s=[1,13],a=[6,7,8],h=[1,20],o=[1,18],l=[1,19],c=[6,7,11],u=[1,6,13,14],d=[1,23],y=[1,24],p=[1,6,7,11,13,14],g={trace:(0,r.K)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"ISHIKAWA",11:"EOF",13:"SPACELIST",14:"TEXT"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:(0,r.K)(function(t,e,i,n,s,a,r){var h=a.length-1;switch(s){case 6:case 7:return n;case 15:n.addNode(a[h-1].length,a[h].trim());break;case 16:n.addNode(0,a[h].trim())}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:e},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:e},{6:i,7:[1,10],9:9,12:11,13:n,14:s},t(a,[2,3]),{1:[2,2]},t(a,[2,4]),t(a,[2,5]),{1:[2,6],6:i,12:15,13:n,14:s},{6:i,9:16,12:11,13:n,14:s},{6:h,7:o,10:17,11:l},t(c,[2,18],{14:[1,21]}),t(c,[2,16]),t(c,[2,17]),{6:h,7:o,10:22,11:l},{1:[2,7],6:i,12:15,13:n,14:s},t(u,[2,14],{7:d,11:y}),t(p,[2,8]),t(p,[2,9]),t(p,[2,10]),t(c,[2,15]),t(u,[2,13],{7:d,11:y}),t(p,[2,11]),t(p,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:(0,r.K)(function(t,e){if(!e.recoverable){var i=new Error(t);throw i.hash=e,i}this.trace(t)},"parseError"),parse:(0,r.K)(function(t){var e=this,i=[0],n=[],s=[null],a=[],h=this.table,o="",l=0,c=0,u=0,d=a.slice.call(arguments,1),y=Object.create(this.lexer),p={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(p.yy[g]=this.yy[g]);y.setInput(t,p.yy),p.yy.lexer=y,p.yy.parser=this,void 0===y.yylloc&&(y.yylloc={});var f=y.yylloc;a.push(f);var k=y.options&&y.options.ranges;function m(){var t;return"number"!=typeof(t=n.pop()||y.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,r.K)(function(t){i.length=i.length-2*t,s.length=s.length-t,a.length=a.length-t},"popStack"),(0,r.K)(m,"lex");for(var w,x,b,_,v,S,K,$,I,E={};;){if(b=i[i.length-1],this.defaultActions[b]?_=this.defaultActions[b]:(null==w&&(w=m()),_=h[b]&&h[b][w]),void 0===_||!_.length||!_[0]){var A="";for(S in I=[],h[b])this.terminals_[S]&&S>2&&I.push("'"+this.terminals_[S]+"'");A=y.showPosition?"Parse error on line "+(l+1)+":\n"+y.showPosition()+"\nExpecting "+I.join(", ")+", got '"+(this.terminals_[w]||w)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==w?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(A,{text:y.match,token:this.terminals_[w]||w,line:y.yylineno,loc:f,expected:I})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+w);switch(_[0]){case 1:i.push(w),s.push(y.yytext),a.push(y.yylloc),i.push(_[1]),w=null,x?(w=x,x=null):(c=y.yyleng,o=y.yytext,l=y.yylineno,f=y.yylloc,u>0&&u--);break;case 2:if(K=this.productions_[_[1]][1],E.$=s[s.length-K],E._$={first_line:a[a.length-(K||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(K||1)].first_column,last_column:a[a.length-1].last_column},k&&(E._$.range=[a[a.length-(K||1)].range[0],a[a.length-1].range[1]]),void 0!==(v=this.performAction.apply(E,[o,c,l,p.yy,_[1],s,a].concat(d))))return v;K&&(i=i.slice(0,-1*K*2),s=s.slice(0,-1*K),a=a.slice(0,-1*K)),i.push(this.productions_[_[1]][0]),s.push(E.$),a.push(E._$),$=h[i[i.length-2]][i[i.length-1]],i.push($);break;case 3:return!0}}return!0},"parse")},f=function(){return{EOF:1,parseError:(0,r.K)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,r.K)(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:(0,r.K)(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:(0,r.K)(function(t){var e=t.length,i=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 n=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),i.length-1&&(this.yylineno-=i.length-1);var s=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:i?(i.length===n.length?this.yylloc.first_column:0)+n[n.length-i.length].length-i[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,r.K)(function(){return this._more=!0,this},"more"),reject:(0,r.K)(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:(0,r.K)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,r.K)(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:(0,r.K)(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:(0,r.K)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,r.K)(function(t,e){var i,n,s;if(this.options.backtrack_lexer&&(s={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&&(s.yylloc.range=this.yylloc.range.slice(0))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+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],i=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack){for(var a in s)this[a]=s[a];return!1}return!1},"test_match"),next:(0,r.K)(function(){if(this.done)return this.EOF;var t,e,i,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),a=0;a<s.length;a++)if((i=this._input.match(this.rules[s[a]]))&&(!e||i[0].length>e[0].length)){if(e=i,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(i,s[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[n]))&&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:(0,r.K)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,r.K)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,r.K)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,r.K)(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:(0,r.K)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,r.K)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,r.K)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,r.K)(function(t,e,i,n){switch(i){case 0:case 3:return 6;case 1:case 2:return 8;case 4:return 7;case 5:return 13;case 6:return 14;case 7:return 11}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:ishikawa-beta\b)/i,/^(?:ishikawa\b)/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:[^\n]+)/i,/^(?:$)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}}}();function k(){this.yy={}}return g.lexer=f,(0,r.K)(k,"Parser"),k.prototype=g,g.Parser=k,new k}();o.parser=o;var l=o,c=class{constructor(){this.stack=[],this.clear=this.clear.bind(this),this.addNode=this.addNode.bind(this),this.getRoot=this.getRoot.bind(this)}static{(0,r.K)(this,"IshikawaDB")}clear(){this.root=void 0,this.stack=[],this.baseLevel=void 0,(0,a.IU)()}getRoot(){return this.root}addNode(t,e){const i=a.Y2.sanitizeText(e,(0,a.D7)());if(!this.root)return this.root={text:i,children:[]},this.stack=[{level:0,node:this.root}],void(0,a.ke)(i);this.baseLevel??=t;let n=t-this.baseLevel+1;for(n<=0&&(n=1);this.stack.length>1&&this.stack[this.stack.length-1].level>=n;)this.stack.pop();const s={text:i,children:[]};this.stack[this.stack.length-1].node.children.push(s),this.stack.push({level:n,node:s})}getAccTitle(){return(0,a.iN)()}setAccTitle(t){(0,a.SV)(t)}getAccDescription(){return(0,a.m7)()}setAccDescription(t){(0,a.EI)(t)}getDiagramTitle(){return(0,a.ab)()}setDiagramTitle(t){(0,a.ke)(t)}},u=250,d=82*Math.PI/180,y=Math.cos(d),p=Math.sin(d),g=(0,r.K)((t,e,i)=>{const n=t.node().getBBox(),s=n.width+2*e,r=n.height+2*e;(0,a.a$)(t,r,s,i),t.attr("viewBox",`${n.x-e} ${n.y-e} ${s} ${r}`)},"applyPaddedViewBox"),f=(0,r.K)((t,e,i,r)=>{const o=r.db.getRoot();if(!o)return;const l=(0,a.D7)(),{look:c,handDrawnSeed:d,themeVariables:y}=l,p=(0,s.I5)(l.fontSize)[0]??14,f="handDrawn"===c,w=o.children??[],x=l.ishikawa?.diagramPadding??20,b=l.ishikawa?.useMaxWidth??!1,v=(0,n.D)(e),S=v.append("g").attr("class","ishikawa"),K=f?h.A.svg(v.node()):void 0,$=K?{roughSvg:K,seed:d??0,lineColor:y?.lineColor??"#333",fillColor:y?.mainBkg??"#fff"}:void 0,E=`ishikawa-arrow-${e}`;f||S.append("defs").append("marker").attr("id",E).attr("viewBox","0 0 10 10").attr("refX",0).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 Z").attr("class","ishikawa-arrow");let A=0,C=u;const L=f?void 0:I(S,A,C,A,C,"ishikawa-spine");if(m(S,A,C,o.text,p,$),!w.length)return f&&I(S,A,C,A,C,"ishikawa-spine",$),void g(v,x,b);A-=20;const M=w.filter((t,e)=>e%2==0),P=w.filter((t,e)=>e%2==1),T=k(M),B=k(P),D=T.total+B.total;let N=u,O=u;if(D>0){const t=500,e=75;N=Math.max(e,t*(T.total/D)),O=Math.max(e,t*(B.total/D))}const W=2*p;N=Math.max(N,T.max*W),O=Math.max(O,B.max*W),C=Math.max(N,u),L&&L.attr("y1",C).attr("y2",C),S.select(".ishikawa-head-group").attr("transform",`translate(0,${C})`);const j=Math.ceil(w.length/2);for(let t=0;t<j;t++){const e=S.append("g").attr("class","ishikawa-pair");for(const[i,n,s]of[[w[2*t],-1,N],[w[2*t+1],1,O]])i&&_(e,i,A,C,n,s,p,$);A=e.selectAll("text").nodes().reduce((t,e)=>Math.min(t,e.getBBox().x),1/0)}if(f)I(S,A,C,0,C,"ishikawa-spine",$);else{L.attr("x1",A);const t=`url(#${E})`;S.selectAll("line.ishikawa-branch, line.ishikawa-sub-branch").attr("marker-start",t)}g(v,x,b)},"draw"),k=(0,r.K)(t=>{const e=(0,r.K)(t=>t.children.reduce((t,i)=>t+1+e(i),0),"countDescendants");return t.reduce((t,i)=>{const n=e(i);return t.total+=n,t.max=Math.max(t.max,n),t},{total:0,max:0})},"sideStats"),m=(0,r.K)((t,e,i,n,s,a)=>{const r=Math.max(6,Math.floor(110/(.6*s))),h=t.append("g").attr("class","ishikawa-head-group").attr("transform",`translate(${e},${i})`),o=K(h,S(n,r),0,0,"ishikawa-head-label","start",s),l=o.node().getBBox(),c=Math.max(60,l.width+6),u=Math.max(40,2*l.height+40),d=`M 0 ${-u/2} L 0 ${u/2} Q ${2.4*c} 0 0 ${-u/2} Z`;if(a){const t=a.roughSvg.path(d,{roughness:1.5,seed:a.seed,fill:a.fillColor,fillStyle:"hachure",fillWeight:2.5,hachureGap:5,stroke:a.lineColor,strokeWidth:2});h.insert(()=>t,":first-child").attr("class","ishikawa-head")}else h.insert("path",":first-child").attr("class","ishikawa-head").attr("d",d);o.attr("transform",`translate(${(c-l.width)/2-l.x+3},${-l.y-l.height/2})`)},"drawHead"),w=(0,r.K)((t,e)=>{const i=[],n=[],s=(0,r.K)((t,a,r)=>{const h=-1===e?[...t].reverse():t;for(const t of h){const e=i.length,h=t.children??[];i.push({depth:r,text:S(t.text,15),parentIndex:a,childCount:h.length}),r%2==0?(n.push(e),h.length&&s(h,e,r+1)):(h.length&&s(h,e,r+1),n.push(e))}},"walk");return s(t,-1,2),{entries:i,yOrder:n}},"flattenTree"),x=(0,r.K)((t,e,i,n,s,a,r)=>{const h=t.append("g").attr("class","ishikawa-label-group"),o=K(h,e,i,n+11*s,"ishikawa-label cause","middle",a).node().getBBox();if(r){const t=r.roughSvg.rectangle(o.x-20,o.y-2,o.width+40,o.height+4,{roughness:1.5,seed:r.seed,fill:r.fillColor,fillStyle:"hachure",fillWeight:2.5,hachureGap:5,stroke:r.lineColor,strokeWidth:2});h.insert(()=>t,":first-child").attr("class","ishikawa-label-box")}else h.insert("rect",":first-child").attr("class","ishikawa-label-box").attr("x",o.x-20).attr("y",o.y-2).attr("width",o.width+40).attr("height",o.height+4)},"drawCauseLabel"),b=(0,r.K)((t,e,i,n,s,a)=>{const r=Math.sqrt(n*n+s*s);if(0===r)return;const h=n/r,o=s/r,l=6*-o,c=6*h,u=`M ${e} ${i} L ${e-6*h*2+l} ${i-6*o*2+c} L ${e-6*h*2-l} ${i-6*o*2-c} Z`,d=a.roughSvg.path(u,{roughness:1,seed:a.seed,fill:a.lineColor,fillStyle:"solid",stroke:a.lineColor,strokeWidth:1});t.append(()=>d)},"drawArrowMarker"),_=(0,r.K)((t,e,i,n,s,a,r,h)=>{const o=e.children??[],l=a*(o.length?1:.2),c=p*l*s,u=i+-y*l,d=n+c;if(I(t,i,n,u,d,"ishikawa-branch",h),h&&b(t,i,n,i-u,n-d,h),x(t,e.text,u,d,s,r,h),!o.length)return;const{entries:g,yOrder:f}=w(o,s),k=g.length,m=new Array(k);for(const[t,e]of f.entries())m[e]=n+c*((t+1)/(k+1));const _=new Map;_.set(-1,{x0:i,y0:n,x1:u,y1:d,childCount:o.length,childrenDrawn:0});const v=-y,S=p*s,E=s<0?"ishikawa-label up":"ishikawa-label down";for(const[e,i]of g.entries()){const n=m[e],s=_.get(i.parentIndex),a=t.append("g").attr("class","ishikawa-sub-group");let o=0,l=0,c=0;if(i.depth%2==0){const t=s.y1-s.y0;o=$(s.x0,s.x1,t?(n-s.y0)/t:.5),l=n,c=o-(i.childCount>0?60+5*i.childCount:30),I(a,o,n,c,n,"ishikawa-sub-branch",h),h&&b(a,o,n,1,0,h),K(a,i.text,c,n,"ishikawa-label align","end",r)}else{const t=s.childrenDrawn++;o=$(s.x0,s.x1,(s.childCount-t)/(s.childCount+1)),l=s.y0,c=o+v*((n-l)/S),I(a,o,l,c,n,"ishikawa-sub-branch",h),h&&b(a,o,l,o-c,l-n,h),K(a,i.text,c,n,E,"end",r)}i.childCount>0&&_.set(e,{x0:o,y0:l,x1:c,y1:n,childCount:i.childCount,childrenDrawn:0})}},"drawBranch"),v=(0,r.K)(t=>t.split(/<br\s*\/?>|\n/),"splitLines"),S=(0,r.K)((t,e)=>{if(t.length<=e)return t;const i=[];for(const n of t.split(/\s+/)){const t=i.length-1;t>=0&&i[t].length+1+n.length<=e?i[t]+=" "+n:i.push(n)}return i.join("\n")},"wrapText"),K=(0,r.K)((t,e,i,n,s,a,r)=>{const h=v(e),o=1.05*r,l=t.append("text").attr("class",s).attr("text-anchor",a).attr("x",i).attr("y",n-(h.length-1)*o/2);for(const[t,e]of h.entries())l.append("tspan").attr("x",i).attr("dy",0===t?0:o).text(e);return l},"drawMultilineText"),$=(0,r.K)((t,e,i)=>t+(e-t)*i,"lerp"),I=(0,r.K)((t,e,i,n,s,a,r)=>{if(r){const h=r.roughSvg.line(e,i,n,s,{roughness:1.5,seed:r.seed,stroke:r.lineColor,strokeWidth:2});return void t.append(()=>h).attr("class",a)}return t.append("line").attr("class",a).attr("x1",e).attr("y1",i).attr("x2",n).attr("y2",s)},"drawLine"),E={draw:f},A=(0,r.K)(t=>`\n.ishikawa .ishikawa-spine,\n.ishikawa .ishikawa-branch,\n.ishikawa .ishikawa-sub-branch {\n stroke: ${t.lineColor};\n stroke-width: 2;\n fill: none;\n}\n\n.ishikawa .ishikawa-sub-branch {\n stroke-width: 1;\n}\n\n.ishikawa .ishikawa-arrow {\n fill: ${t.lineColor};\n}\n\n.ishikawa .ishikawa-head {\n fill: ${t.mainBkg};\n stroke: ${t.lineColor};\n stroke-width: 2;\n}\n\n.ishikawa .ishikawa-label-box {\n fill: ${t.mainBkg};\n stroke: ${t.lineColor};\n stroke-width: 2;\n}\n\n.ishikawa text {\n font-family: ${t.fontFamily};\n font-size: ${t.fontSize};\n fill: ${t.textColor};\n}\n\n.ishikawa .ishikawa-head-label {\n font-weight: 600;\n text-anchor: middle;\n dominant-baseline: middle;\n font-size: 14px;\n}\n\n.ishikawa .ishikawa-label {\n text-anchor: end;\n}\n\n.ishikawa .ishikawa-label.cause {\n text-anchor: middle;\n dominant-baseline: middle;\n}\n\n.ishikawa .ishikawa-label.align {\n text-anchor: end;\n dominant-baseline: middle;\n}\n\n.ishikawa .ishikawa-label.up {\n dominant-baseline: baseline;\n}\n\n.ishikawa .ishikawa-label.down {\n dominant-baseline: hanging;\n}\n`,"getStyles"),C={parser:l,get db(){return new c},renderer:E,styles:A}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[6806],{77454(e,t,a){function i(e,t){e.accDescr&&t.setAccDescription?.(e.accDescr),e.accTitle&&t.setAccTitle?.(e.accTitle),e.title&&t.setDiagramTitle?.(e.title)}a.d(t,{S:()=>i}),(0,a(86827).K)(i,"populateCommonDb")},76806(e,t,a){a.d(t,{diagram:()=>k});var i=a(77454),n=a(5637),l=a(12505),r=a(86535),s=a(31293),o=a(86827),c=a(34376),d=a(51444),p=r.UI.pie,h={sections:new Map,showData:!1,config:p},g=h.sections,u=h.showData,f=structuredClone(p),m=(0,o.K)(()=>structuredClone(f),"getConfig"),w=(0,o.K)(()=>{g=new Map,u=h.showData,(0,r.IU)()},"clear"),S=(0,o.K)(({label:e,value:t})=>{if(t<0)throw new Error(`"${e}" has invalid value: ${t}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);g.has(e)||(g.set(e,t),s.R.debug(`added new section: ${e}, with value: ${t}`))},"addSection"),$=(0,o.K)(()=>g,"getSections"),x=(0,o.K)(e=>{u=e},"setShowData"),b=(0,o.K)(()=>u,"getShowData"),D={getConfig:m,clear:w,setDiagramTitle:r.ke,getDiagramTitle:r.ab,setAccTitle:r.SV,getAccTitle:r.iN,setAccDescription:r.EI,getAccDescription:r.m7,addSection:S,getSections:$,setShowData:x,getShowData:b},v=(0,o.K)((e,t)=>{(0,i.S)(e,t),t.setShowData(e.showData),e.sections.map(t.addSection)},"populateDb"),y={parse:(0,o.K)(async e=>{const t=await(0,c.qg)("pie",e);s.R.debug(t),v(t,D)},"parse")},C=(0,o.K)(e=>`\n .pieCircle{\n stroke: ${e.pieStrokeColor};\n stroke-width : ${e.pieStrokeWidth};\n opacity : ${e.pieOpacity};\n }\n .pieCircle.highlighted{\n scale: 1.05;\n opacity: 1;\n }\n .pieCircle.highlightedOnHover:hover{\n transition-duration: 250ms;\n scale: 1.05;\n opacity: 1;\n }\n .pieOuterCircle{\n stroke: ${e.pieOuterStrokeColor};\n stroke-width: ${e.pieOuterStrokeWidth};\n fill: none;\n }\n .pieTitleText {\n text-anchor: middle;\n font-size: ${e.pieTitleTextSize};\n fill: ${e.pieTitleTextColor};\n font-family: ${e.fontFamily};\n }\n .slice {\n font-family: ${e.fontFamily};\n fill: ${e.pieSectionTextColor};\n font-size:${e.pieSectionTextSize};\n // fill: white;\n }\n .legend text {\n fill: ${e.pieLegendTextColor};\n font-family: ${e.fontFamily};\n font-size: ${e.pieLegendTextSize};\n }\n`,"getStyles"),T=(0,o.K)(e=>{const t=[...e.values()].reduce((e,t)=>e+t,0),a=[...e.entries()].map(([e,t])=>({label:e,value:t})).filter(e=>e.value/t*100>=1);return(0,d.rLf)().value(e=>e.value).sort(null)(a)},"createPieArcs"),k={parser:y,db:D,renderer:{draw:(0,o.K)((e,t,a,i)=>{s.R.debug("rendering pie chart\n"+e);const o=i.db,c=(0,r.D7)(),p=(0,l.$t)(o.getConfig(),c.pie),h=18,g=450,u=g,f=(0,n.D)(t),m=f.append("g");m.attr("transform","translate(225,225)");const{themeVariables:w}=c;let[S]=(0,l.I5)(w.pieOuterStrokeWidth);S??=2;const $=p.legendPosition,x=p.textPosition,b=p.donutHole>0&&p.donutHole<=.9?p.donutHole:0,D=Math.min(u,g)/2-40,v=(0,d.JLW)().innerRadius(b*D).outerRadius(D),y=(0,d.JLW)().innerRadius(D*x).outerRadius(D*x),C=m.append("g");C.append("circle").attr("cx",0).attr("cy",0).attr("r",D+S/2).attr("class","pieOuterCircle");const k=o.getSections(),A=T(k),K=[w.pie1,w.pie2,w.pie3,w.pie4,w.pie5,w.pie6,w.pie7,w.pie8,w.pie9,w.pie10,w.pie11,w.pie12];let R=0;k.forEach(e=>{R+=e});const M=A.filter(e=>"0"!==(e.data.value/R*100).toFixed(0)),O=(0,d.UMr)(K).domain([...k.keys()]);C.selectAll("mySlices").data(M).enter().append("path").attr("d",v).attr("fill",e=>O(e.data.label)).attr("class",e=>{let t="pieCircle";return"hover"===p.highlightSlice?t+=" highlightedOnHover":p.highlightSlice===e.data.label&&(t+=" highlighted"),t}),C.selectAll("mySlices").data(M).enter().append("text").text(e=>(e.data.value/R*100).toFixed(0)+"%").attr("transform",e=>"translate("+y.centroid(e)+")").style("text-anchor","middle").attr("class","slice");const z=m.append("text").text(o.getDiagramTitle()).attr("x",0).attr("y",-200).attr("class","pieTitleText"),W=[...k.entries()].map(([e,t])=>({label:e,value:t})),F=m.selectAll(".legend").data(W).enter().append("g").attr("class","legend");F.append("rect").attr("width",h).attr("height",h).style("fill",e=>O(e.label)).style("stroke",e=>O(e.label)),F.append("text").attr("x",22).attr("y",14).text(e=>o.getShowData()?`${e.label} [${e.value}]`:e.label);const H=Math.max(...F.selectAll("text").nodes().map(e=>e?.getBoundingClientRect().width??0));let L=g,I=490;const B=22,E=W.length*B;switch($){case"center":F.attr("transform",(e,t)=>{const a=B*W.length/2;return"translate("+(-H/2-22)+","+(t*B-a)+")"});break;case"top":L+=E,F.attr("transform",(e,t)=>`translate(${-H/2-22}, ${t*B-D})`),C.attr("transform",()=>`translate(0, ${E+B})`);break;case"bottom":L+=E,F.attr("transform",(e,t)=>"translate("+(-H/2-22)+","+(t*B-(-D-B))+")");break;case"left":I+=22+H,F.attr("transform",(e,t)=>{const a=B*W.length/2;return"translate("+(-D-22)+","+(t*B-a)+")"}),C.attr("transform",()=>`translate(${H+h+4}, 0)`);break;default:I+=22+H,F.attr("transform",(e,t)=>{const a=B*W.length/2;return"translate(216,"+(t*B-a)+")"})}const P=z.node()?.getBoundingClientRect().width??0,U=225-P/2,J=225+P/2,N=Math.min(0,U),V=Math.max(I,J)-N;f.attr("viewBox",`${N} 0 ${V} ${L}`),(0,r.a$)(f,L,V,p.useMaxWidth)},"draw")},styles:C}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[727],{727(e,t,r){r.r(t),r.d(t,{applyDagreLayoutResult:()=>C,getEdgesToRender:()=>b,measureDagreLayout:()=>v,prepareLayoutForDagre:()=>T,render:()=>I,runDagreLayoutCore:()=>K});var a=r(35167),n=r(78771),o=r(46853),i=r(717),d=r(79515),s=(r(44505),r(69793),r(43287),r(12505),r(86535)),g=r(31293),l=r(86827),h=r(84193),p=r(697),c=(0,l.K)((e,t,r)=>Math.max(t,Math.min(r,e)),"clamp"),u=(0,l.K)((e="TB")=>{switch(e){case"BT":return"bottom";case"LR":return"right";case"RL":return"left";default:return"top"}},"getDefaultSelfLoopSide"),f=(0,l.K)(e=>"flowchart"===e||"flowchart-v2"===e||"stateDiagram"===e||"er"===e||"classDiagram"===e,"shouldMergeSelfLoopSegments"),y=["x","y","width","height","labelBBox","intersect","calcIntersect","diff","clusterNode"],m=(0,l.K)((e,t,r,a,n)=>{const o=[],i=new Set;if(r.forEach(({start:e,end:t})=>{e!==a&&i.add(e),t!==a&&i.add(t)}),i.forEach(t=>{const r=e.node(t);"number"==typeof r?.x&&"number"==typeof r?.y&&o.push(r)}),0===o.length&&r.forEach(({edge:e})=>{(e.points??[]).forEach(e=>{"number"==typeof e?.x&&"number"==typeof e?.y&&o.push(e)})}),0===o.length)return u(n);const d=o.reduce((e,t)=>({x:e.x+t.x/o.length,y:e.y+t.y/o.length}),{x:0,y:0}),s=d.x-t.x,g=d.y-t.y;return Math.abs(s)>Math.abs(g)?s>0?"right":"left":Math.abs(g)>0?g>0?"bottom":"top":u(n)},"getSelfLoopSide"),L=(0,l.K)((e,t="top",r=0,a=0)=>{const n=e.x,o=e.y-r,i=e.width/2,d=e.height/2,s=Math.max(36,Math.min(100,.8*e.width)),g=c(Math.max(a,.35*e.width),36,s),l=c(.45*Math.min(e.width,e.height),24,48);switch(t){case"bottom":{const e=o+d;return[{x:n-g/2,y:e},{x:n-g/2,y:e+l},{x:n+g/2,y:e+l},{x:n+g/2,y:e}]}case"right":{const e=n+i;return[{x:e,y:o-g/2},{x:e+l,y:o-g/2},{x:e+l,y:o+g/2},{x:e,y:o+g/2}]}case"left":{const e=n-i;return[{x:e,y:o-g/2},{x:e-l,y:o-g/2},{x:e-l,y:o+g/2},{x:e,y:o+g/2}]}default:{const e=o-d;return[{x:n-g/2,y:e},{x:n-g/2,y:e-l},{x:n+g/2,y:e-l},{x:n+g/2,y:e}]}}},"getSelfLoopPoints"),w=(0,l.K)((e,t,r="top",a=0,n={})=>{const o=e.x,i=e.y-a,d=n.width??0,s=n.height??0;switch(r){case"bottom":return{x:o,y:Math.max(...t.map(e=>e.y))+s/2+4};case"right":return{x:Math.max(...t.map(e=>e.x))+d/2+4,y:i};case"left":return{x:Math.min(...t.map(e=>e.x))-d/2-4,y:i};default:return{x:o,y:Math.min(...t.map(e=>e.y))-s/2-4}}},"getSelfLoopLabelPosition"),b=(0,l.K)((e,t=0,{mergeSelfLoops:r=!0}={})=>{const a=new Map,n=[],o=e.graph()?.rankdir;return e.edges().forEach(t=>{const o=e.edge(t);if(r&&o.selfLoop){const e=o.selfLoop.id;a.has(e)||a.set(e,[]),a.get(e).push({edge:o,start:t.v,end:t.w})}else n.push({edge:o,start:t.v,end:t.w})}),a.forEach(r=>{if(3!==r.length)return void r.forEach(e=>n.push(e));r.sort((e,t)=>e.edge.selfLoop.order-t.edge.selfLoop.order);const[a,i,d]=r,s=a.edge.originalEdge??i.edge.originalEdge??d.edge.originalEdge??i.edge,g=e.node(s.start);if(!g)return void r.forEach(e=>n.push(e));const l={width:i.edge.width,height:i.edge.height},h=m(e,g,r,s.start,o),p=L(g,h,t,l.width??0),c=w(g,p,h,t,l),u={...i.edge,...s,id:s.id,points:p,start:s.start,end:s.end,x:c.x,y:c.y,width:l.width,height:l.height,labelStyle:i.edge.labelStyle,fromCluster:a.edge.fromCluster??i.edge.fromCluster??d.edge.fromCluster,toCluster:a.edge.toCluster??i.edge.toCluster??d.edge.toCluster};delete u.selfLoop,delete u.originalEdge,n.push({edge:u,start:u.start,end:u.end})}),n},"getEdgesToRender"),x=(0,l.K)(async({element:e,graph:t,diagramType:r,id:n,parentCluster:s,siteConfig:h})=>{const p=t.graph().rankdir;g.R.trace("Dir in recursive render - dir:",p);const{clusters:c,edgePaths:u,edgeLabels:y,nodes:m,rootGroups:L}=(0,a.B)(e,{edgePathsClass:"edgePaths"});t.nodes()?g.R.info("Recursive render XXX",t.nodes()):g.R.info("No nodes found for",t),t.edges().length>0&&g.R.info("Recursive edges",t.edge(t.edges()[0]));const w=f(r);await Promise.all(t.nodes().map(async function(e){const o=t.node(e);if(void 0!==s){const r=JSON.parse(JSON.stringify(s.clusterData));g.R.trace("Setting data for parent cluster XXX\n Node.id = ",e,"\n data=",r.height,"\nParent cluster",s.height),t.setNode(s.id,r),t.parent(e)||(g.R.trace("Setting parent",e,s.id),t.setParent(e,s.id,r))}if(g.R.info("(Insert) Node XXX"+e+": "+JSON.stringify(t.node(e))),o?.clusterNode){g.R.info("Cluster identified XBX",e,o.width,t.node(e));const{ranksep:a,nodesep:s}=t.graph();o.graph.setGraph({...o.graph.graph(),ranksep:a+25,nodesep:s});const l=await D({element:m,graph:o.graph,diagramType:r,id:n,parentCluster:t.node(e),siteConfig:h}),p=l.elem;(0,d.lC)(o,p),o.diff=l.diff||0,g.R.info("New compound node after recursive render XAX",e,"width",o.width,"height",o.height),(0,i.U7)(p,o)}else t.children(e).length>0?(g.R.trace("Cluster - the non recursive path XBX",e,o.id,o,o.width,"Graph:",t),g.R.trace((0,a.dc)(o.id,t)),a.ju.set(o.id,{id:(0,a.dc)(o.id,t),node:o})):(g.R.trace("Node - the non recursive path XAX",e,m,t.node(e),p),await(0,a.sv)(m,t.node(e),{config:h,dir:p}))}));const b=(0,l.K)(async()=>{const e=t.edges().map(async function(e){const r=t.edge(e.v,e.w,e.name);if(g.R.info("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e)),g.R.info("Edge "+e.v+" -> "+e.w+": ",e," ",JSON.stringify(t.edge(e))),g.R.info("Fix",a.ju,"ids:",e.v,e.w,"Translating: ",a.ju.get(e.v),a.ju.get(e.w)),w&&r.selfLoop){if(1!==r.selfLoop.order)return;const e={...r.originalEdge,...r,id:r.selfLoop.id,startLabelLeft:r.originalEdge?.startLabelLeft??r.startLabelLeft,startLabelRight:r.originalEdge?.startLabelRight??r.startLabelRight,endLabelLeft:r.originalEdge?.endLabelLeft??r.endLabelLeft,endLabelRight:r.originalEdge?.endLabelRight??r.endLabelRight};return await(0,o.jP)(y,e),r.width=e.width,r.height=e.height,void(r.labelStyle=e.labelStyle)}await(0,o.jP)(y,r)});await Promise.all(e)},"processEdges");await b();const{subGraphTitleTotalMargin:x}=(0,i.Oi)(h);return{elem:L,graph:t,groups:{clusters:c,edgePaths:u,edgeLabels:y,nodes:m,rootGroups:L},diagramType:r,id:n,mergeSelfLoops:w,subGraphTitleTotalMargin:x}},"measureDagreGraph"),R=(0,l.K)(e=>{g.R.info("############################################# XXX"),g.R.info("### Layout ### XXX"),g.R.info("############################################# XXX"),(0,h.Zp)(e)},"runDagreGraphLayout"),E=(0,l.K)((e,t,r)=>{const a=e.node(t);if(!a)return;const n={...a};return a?.clusterNode?n.y=(a.y??0)+r:e.children(t).length>0?n.height=(a.height??0)+r:n.y=(a.y??0)+r/2,n},"normalizeDagreNode"),S=(0,l.K)((e,t)=>{y.forEach(r=>{void 0!==t[r]&&(e[r]=t[r])})},"applyDagreNodeLayout"),X=(0,l.K)((e,t,r,a)=>({...e,start:e.start??t,end:e.end??r,points:(e.points??[]).map(e=>({...e,y:"number"==typeof e.y?e.y+a:e.y}))}),"normalizeDagreEdge"),C=(0,l.K)((e,t)=>{const{graph:r,mergeSelfLoops:n,subGraphTitleTotalMargin:o=0}=t,i=new Map(e.nodes.map(e=>[e.id,e]));(0,a.sc)(r).forEach(e=>{const t=E(r,e,o);if(!t)return;S(r.node(e),t);const a=i.get(e);a&&S(a,t)});const d=o/2;return e.edges=b(r,d,{mergeSelfLoops:n}).map(({edge:e,start:t,end:r})=>X(e,t,r,d)),e},"applyDagreLayoutResult"),N=(0,l.K)(async({elem:e,graph:t,groups:{clusters:r,edgePaths:d},diagramType:s,id:l,mergeSelfLoops:h,subGraphTitleTotalMargin:p})=>{let c=0;await Promise.all((0,a.sc)(t).map(async function(e){const o=t.node(e);if(g.R.info("Position XBX => "+e+": ("+o.x,","+o.y,") width: ",o.width," height: ",o.height),o?.clusterNode)o.y+=p,g.R.info("A tainted cluster node XBX1",e,o.id,o.width,o.height,o.x,o.y,t.parent(e)),a.ju.get(o.id).node=o,(0,i.U_)(o);else if(t.children(e).length>0){g.R.info("A pure cluster node XBX1",e,o.id,o.x,o.y,o.width,o.height,t.parent(e)),o.height+=p,t.node(o.parentId);const i=o?.padding/2||0,d=o?.labelBBox?.height||0,s=d-i||0;g.R.debug("OffsetY",s,"labelHeight",d,"halfPadding",i),await(0,n.U)(r,o),a.ju.get(o.id).node=o}else{const e=t.node(o.parentId);o.y+=p/2,g.R.info("A regular node XBX1 - using the padding",o.id,"parent",o.parentId,o.width,o.height,o.x,o.y,"offsetY",o.offsetY,"parent",e,e?.offsetY,o),(0,i.U_)(o)}}));const u=p/2;return b(t,u,{mergeSelfLoops:h}).forEach(function({edge:e,start:r,end:n}){g.R.info("Edge "+r+" -> "+n+": "+JSON.stringify(e),e),e.points.forEach(e=>e.y+=u);const i=t.node(r),h=t.node(n),p=(0,o.Jo)(d,e,a.ju,s,i,h,l);(0,o.T_)(e,p)}),t.nodes().forEach(function(e){const r=t.node(e);g.R.info(e,r.type,r.diff),r.isGroup&&(c=r.diff)}),g.R.warn("Returning from recursive render XAX",e,c),{elem:e,diff:c}},"paintDagreLayoutCore"),D=(0,l.K)(async e=>{const t=await x(e);return R(t.graph),await N(t)},"renderDagreSubgraph"),T=(0,l.K)(e=>{const t=new p.T({multigraph:!0,compound:!0}).setGraph({rankdir:e.direction,nodesep:e.config?.nodeSpacing||e.nodeSpacing||e.config?.flowchart?.nodeSpacing,ranksep:e.config?.rankSpacing||e.rankSpacing||e.config?.flowchart?.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});return e.nodes.forEach(e=>{t.setNode(e.id,{...e}),e.parentId&&t.setParent(e.id,e.parentId)}),g.R.debug("Edges:",e.edges),e.edges.forEach(e=>{if(e.start===e.end){const r=e.start,a=r+"---"+r+"---1",n=r+"---"+r+"---2",o=t.node(r);t.setNode(a,{domId:a,id:a,parentId:o.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),t.setParent(a,o.parentId),t.setNode(n,{domId:n,id:n,parentId:o.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),t.setParent(n,o.parentId);const i=structuredClone(e),d=structuredClone(e),s=structuredClone(e),g=structuredClone(e);d.originalEdge=i,d.selfLoop={id:i.id,order:0},s.originalEdge=i,s.selfLoop={id:i.id,order:1},g.originalEdge=i,g.selfLoop={id:i.id,order:2},d.label="",d.arrowTypeEnd="none",d.endLabelLeft="",d.endLabelRight="",d.startLabelLeft="",d.id=r+"-cyclic-special-1",s.startLabelRight="",s.startLabelLeft="",s.endLabelLeft="",s.endLabelRight="",s.arrowTypeStart="none",s.arrowTypeEnd="none",s.id=r+"-cyclic-special-mid",g.label="",g.startLabelRight="",g.startLabelLeft="",g.arrowTypeStart="none",o.isGroup&&(d.fromCluster=r,g.toCluster=r),g.id=r+"-cyclic-special-2",g.arrowTypeStart="none",t.setEdge(r,a,d,r+"-cyclic-special-0"),t.setEdge(a,n,s,r+"-cyclic-special-1"),t.setEdge(n,r,g,r+"-cyclic-special-2")}else t.setEdge(e.start,e.end,{...e},e.id)}),(0,a.OS)(t),{graph:t}},"prepareLayoutForDagre"),v=(0,l.K)(async(e,{element:t,preparedLayout:r})=>{const a=r??T(e),n=(0,s.D7)(),o=await x({element:t,graph:a.graph,diagramType:e.type,id:e.diagramId,parentCluster:void 0,siteConfig:n});return a.measuredLayout=o,o},"measureDagreLayout"),K=(0,l.K)((e,t)=>{const r=t.preparedLayout?.measuredLayout;if(!r)throw new Error("runDagreLayoutCore requires measureDagreLayout to run first");return R(r.graph),C(e,r),r},"runDagreLayoutCore"),M=(0,l.K)((e,{measure:t})=>(0,a.sc)(t.graph).map(e=>t.graph.node(e)).filter(Boolean),"getDagrePaintNodes"),P=(0,l.K)((e,t,{measure:r})=>e?r.graph.node(e):void 0,"getDagreEdgeNode"),I=(0,a.xY)({prepareLayout:T,measureLayout:v,runLayoutCore:K,paintOptions:{clusterDb:a.ju,getNodes:M,getEdgeNode:P,skipNode:(0,l.K)((e,{measure:t})=>!t.graph.hasNode(e.id),"skipNode"),isCluster:(0,l.K)((e,{measure:t})=>t.graph.hasNode(e.id)&&(t.graph.children(e.id)??[]).length>0,"isCluster")}})}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[764],{77454(t,e,a){function r(t,e){t.accDescr&&e.setAccDescription?.(t.accDescr),t.accTitle&&e.setAccTitle?.(t.accTitle),t.title&&e.setDiagramTitle?.(t.title)}a.d(e,{S:()=>r}),(0,a(86827).K)(r,"populateCommonDb")},80764(t,e,a){a.d(e,{diagram:()=>B});var r=a(77454),n=a(22422),o=a(99087),i=a(32178),s=a(31293),l=a(86827),d=a(34376),c=(0,l.K)((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"),p=(0,l.K)((t,e,a)=>({x:c(e,`${a} evolution`),y:c(t,`${a} visibility`)}),"toCoordinates"),h=(0,l.K)(t=>{if(t)return"+<>"===t?"bidirectional":"+<"===t?"backward":"+>"===t?"forward":void 0},"getFlowFromPort"),x=(0,l.K)(t=>{if(!t?.startsWith("+"))return{};const e=/^\+'([^']*)'/.exec(t),a=e?.[1];return t.includes("<>")?{flow:"bidirectional",label:a}:t.includes("<")?{flow:"backward",label:a}:t.includes(">")?{flow:"forward",label:a}:{label:a}},"extractFlowFromArrow"),y=(0,l.K)((t,e)=>{if((0,r.S)(t,e),t.size&&e.setSize(t.size.width,t.size.height),t.evolution){const a=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);e.updateAxes({stages:a,stageBoundaries:r})}if(t.anchors.forEach(t=>{const a=p(t.visibility,t.evolution,`Anchor "${t.name}"`);e.addNode(t.name,t.name,a.x,a.y,"anchor")}),t.components.forEach(t=>{const a=p(t.visibility,t.evolution,`Component "${t.name}"`),r=t.label?(t.label.negX?-1:1)*t.label.offsetX:void 0,n=t.label?(t.label.negY?-1:1)*t.label.offsetY:void 0,o=t.decorator?.strategy;e.addNode(t.name,t.name,a.x,a.y,"component",r,n,t.inertia,o)}),t.notes.forEach(t=>{const a=p(t.visibility,t.evolution,`Note "${t.text}"`);e.addNote(t.text,a.x,a.y)}),t.pipelines.forEach(t=>{const a=e.getNode(t.parent);if(!a||"number"!=typeof a.y)throw new Error(`Pipeline "${t.parent}" must reference an existing component with coordinates.`);const r=a.y;e.startPipeline(t.parent),t.components.forEach(a=>{const n=`${t.parent}_${a.name}`,o=a.label?(a.label.negX?-1:1)*a.label.offsetX:void 0,i=a.label?(a.label.negY?-1:1)*a.label.offsetY:void 0,s=c(a.evolution,`Pipeline component "${a.name}" evolution`);e.addNode(n,a.name,s,r,"pipeline-component",o,i),e.addPipelineComponent(t.parent,n)})}),t.links.forEach(t=>{const a=!!t.arrow&&(t.arrow.includes("-.->")||t.arrow.includes(".-."));let r=h(t.fromPort)??h(t.toPort);const{flow:n,label:o}=x(t.arrow);!r&&n&&(r=n);const i=t.linkLabel,s=o??i;e.addLink(e.resolveNodeId(t.from),e.resolveNodeId(t.to),a,s,r)}),t.evolves.forEach(t=>{const a=e.getNode(t.component);if(void 0!==a?.y){const r=c(t.target,`Evolve target for "${t.component}"`);e.addTrend(t.component,r,a.y)}}),t.annotations.length>0){const a=t.annotations[0],r=p(a.x,a.y,"Annotations box");e.setAnnotationsBox(r.x,r.y)}t.annotation.forEach(t=>{const a=p(t.x,t.y,`Annotation ${t.number}`);e.addAnnotation(t.number,[{x:a.x,y:a.y}],t.text)}),t.accelerators.forEach(t=>{const a=p(t.x,t.y,`Accelerator "${t.name}"`);e.addAccelerator(t.name,a.x,a.y)}),t.deaccelerators.forEach(t=>{const a=p(t.x,t.y,`Deaccelerator "${t.name}"`);e.addDeaccelerator(t.name,a.x,a.y)})},"populateDb"),g={parser:{yy:void 0},parse:(0,l.K)(async t=>{const e=await(0,d.qg)("wardley",t);s.R.debug(e);const a=g.parser?.yy;if(!a||"function"!=typeof a.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.");y(e,a)},"parse")},f=new 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={}}static{(0,l.K)(this,"WardleyBuilder")}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}};function u(){return(0,i.D7)()["wardley-beta"]}function w(t,e,a,r,n,o,i,s,l){f.addNode({id:t,label:e,x:a,y:r,className:n,labelOffsetX:o,labelOffsetY:i,inertia:s,sourceStrategy:l})}function m(t,e,a=!1,r,n){f.addLink({source:t,target:e,dashed:a,label:r,flow:n})}function k(t,e,a){f.addTrend({nodeId:t,targetX:e,targetY:a})}function b(t,e,a){f.addAnnotation({number:t,coordinates:e,text:a})}function $(t,e,a){f.addNote({text:t,x:e,y:a})}function S(t,e,a){f.addAccelerator({name:t,x:e,y:a})}function v(t,e,a){f.addDeaccelerator({name:t,x:e,y:a})}function C(t,e){f.setAnnotationsBox(t,e)}function M(t,e){f.setSize(t,e)}function P(t){f.startPipeline(t)}function N(t,e){f.addPipelineComponent(t,e)}function T(t){f.setAxes(t)}function z(t){return f.getNode(t)}function A(t){return f.resolveNodeId(t)}function L(){return f.build()}function I(){f.clear(),(0,i.IU)()}(0,l.K)(u,"getConfig"),(0,l.K)(w,"addNode"),(0,l.K)(m,"addLink"),(0,l.K)(k,"addTrend"),(0,l.K)(b,"addAnnotation"),(0,l.K)($,"addNote"),(0,l.K)(S,"addAccelerator"),(0,l.K)(v,"addDeaccelerator"),(0,l.K)(C,"setAnnotationsBox"),(0,l.K)(M,"setSize"),(0,l.K)(P,"startPipeline"),(0,l.K)(N,"addPipelineComponent"),(0,l.K)(T,"updateAxes"),(0,l.K)(z,"getNode"),(0,l.K)(A,"resolveNodeId"),(0,l.K)(L,"getWardleyData"),(0,l.K)(I,"clear");var E={getConfig:u,addNode:w,addLink:m,addTrend:k,addAnnotation:b,addNote:$,addAccelerator:S,addDeaccelerator:v,setAnnotationsBox:C,setSize:M,startPipeline:P,addPipelineComponent:N,updateAxes:T,getNode:z,resolveNodeId:A,getWardleyData:L,clear:I,setAccTitle:i.SV,getAccTitle:i.iN,setDiagramTitle:i.ke,getDiagramTitle:i.ab,getAccDescription:i.m7,setAccDescription:i.EI},K=["Genesis","Custom Built","Product","Commodity"],R=(0,l.K)(()=>{const{themeVariables:t}=(0,i.D7)();return{backgroundColor:t.wardley?.backgroundColor??t.background??"#fff",axisColor:t.wardley?.axisColor??"#000",axisTextColor:t.wardley?.axisTextColor??t.primaryTextColor??"#222",gridColor:t.wardley?.gridColor??"rgba(100, 100, 100, 0.2)",componentFill:t.wardley?.componentFill??"#fff",componentStroke:t.wardley?.componentStroke??"#000",componentLabelColor:t.wardley?.componentLabelColor??t.primaryTextColor??"#222",linkStroke:t.wardley?.linkStroke??"#000",evolutionStroke:t.wardley?.evolutionStroke??"#dc3545",annotationStroke:t.wardley?.annotationStroke??"#000",annotationTextColor:t.wardley?.annotationTextColor??t.primaryTextColor??"#222",annotationFill:t.wardley?.annotationFill??t.background??"#fff"}},"getTheme"),D=(0,l.K)(()=>{const t=(0,i.D7)()["wardley-beta"];return{width:t?.width??900,height:t?.height??600,padding:t?.padding??48,nodeRadius:t?.nodeRadius??6,nodeLabelOffset:t?.nodeLabelOffset??8,axisFontSize:t?.axisFontSize??12,labelFontSize:t?.labelFontSize??10,showGrid:t?.showGrid??!1,useMaxWidth:t?.useMaxWidth??!0}},"getConfigValues"),B={parser:g,db:E,renderer:{draw:(0,l.K)((t,e,a,r)=>{s.R.debug("Rendering Wardley map\n"+t);const o=D(),d=R(),c=1.6*o.nodeRadius,p=r.db,h=p.getWardleyData(),x=p.getDiagramTitle(),y=h.size?.width??o.width,g=h.size?.height??o.height,f=(0,n.D)(e);f.selectAll("*").remove(),(0,i.a$)(f,g,y,o.useMaxWidth),f.attr("viewBox",`0 0 ${y} ${g}`);const u=f.append("g").attr("class","wardley-map"),w=f.append("defs");w.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",d.evolutionStroke).attr("stroke","none"),w.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",d.linkStroke).attr("stroke","none"),w.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",d.linkStroke).attr("stroke","none"),u.append("rect").attr("class","wardley-background").attr("width",y).attr("height",g).attr("fill",d.backgroundColor);const m=y-2*o.padding,k=g-2*o.padding;x&&u.append("text").attr("class","wardley-title").attr("x",y/2).attr("y",o.padding/2).attr("fill",d.axisTextColor).attr("font-size",1.05*o.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("dominant-baseline","middle").text(x);const b=(0,l.K)(t=>o.padding+t/100*m,"projectX"),$=(0,l.K)(t=>g-o.padding-t/100*k,"projectY"),S=u.append("g").attr("class","wardley-axes");S.append("line").attr("x1",o.padding).attr("x2",y-o.padding).attr("y1",g-o.padding).attr("y2",g-o.padding).attr("stroke",d.axisColor).attr("stroke-width",1),S.append("line").attr("x1",o.padding).attr("x2",o.padding).attr("y1",o.padding).attr("y2",g-o.padding).attr("stroke",d.axisColor).attr("stroke-width",1);const v=h.axes.xLabel??"Evolution",C=h.axes.yLabel??"Visibility";S.append("text").attr("class","wardley-axis-label wardley-axis-label-x").attr("x",o.padding+m/2).attr("y",g-o.padding/4).attr("fill",d.axisTextColor).attr("font-size",o.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").text(v),S.append("text").attr("class","wardley-axis-label wardley-axis-label-y").attr("x",o.padding/3).attr("y",o.padding+k/2).attr("fill",d.axisTextColor).attr("font-size",o.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("transform",`rotate(-90 ${o.padding/3} ${o.padding+k/2})`).text(C);const M=h.axes.stages&&h.axes.stages.length>0?h.axes.stages:K;if(M.length>0){const t=u.append("g").attr("class","wardley-stages"),e=h.axes.stageBoundaries,a=[];if(e&&e.length===M.length){let t=0;e.forEach(e=>{a.push({start:t,end:e}),t=e})}else{const t=1/M.length;M.forEach((e,r)=>{a.push({start:r*t,end:(r+1)*t})})}M.forEach((e,r)=>{const n=a[r],i=o.padding+n.start*m,s=(i+(o.padding+n.end*m))/2;r>0&&t.append("line").attr("x1",i).attr("x2",i).attr("y1",o.padding).attr("y2",g-o.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",s).attr("y",g-o.padding/1.5).attr("fill",d.axisTextColor).attr("font-size",o.axisFontSize-2).attr("text-anchor","middle").text(e)})}if(o.showGrid){const t=u.append("g").attr("class","wardley-grid");for(let e=1;e<4;e++){const a=e/4,r=o.padding+m*a;t.append("line").attr("x1",r).attr("x2",r).attr("y1",o.padding).attr("y2",g-o.padding).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6"),t.append("line").attr("x1",o.padding).attr("x2",y-o.padding).attr("y1",g-o.padding-k*a).attr("y2",g-o.padding-k*a).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6")}}const P=new Map;if(h.nodes.forEach(t=>{P.set(t.id,{x:b(t.x),y:$(t.y),node:t})}),h.pipelines.length>0){const t=u.append("g").attr("class","wardley-pipelines"),e=u.append("g").attr("class","wardley-pipeline-links");h.pipelines.forEach(a=>{if(0===a.componentIds.length)return;const r=a.componentIds.map(t=>({id:t,pos:P.get(t),node:h.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",d.linkStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4")}let n=1/0,i=-1/0,s=0;if(a.componentIds.forEach(t=>{const e=P.get(t);e&&(n=Math.min(n,e.x),i=Math.max(i,e.x),s=e.y)}),n!==1/0&&i!==-1/0){const e=15,r=4*o.nodeRadius,l=s-r/2,p=P.get(a.nodeId);if(p){const t=(n+i)/2;p.x=t,p.y=l-c/6}t.append("rect").attr("class","wardley-pipeline-box").attr("x",n-e).attr("y",l).attr("width",i-n+2*e).attr("height",r).attr("fill","none").attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}})}const N=u.append("g").attr("class","wardley-links"),T=new Map;h.pipelines.forEach(t=>{T.set(t.nodeId,new Set(t.componentIds))});const z=h.links.filter(t=>{if(!P.has(t.source)||!P.has(t.target))return!1;const e=T.get(t.target);return!e?.has(t.source)});N.selectAll("line").data(z).enter().append("line").attr("class",t=>"wardley-link"+(t.dashed?" wardley-link--dashed":"")).attr("x1",t=>{const e=P.get(t.source),a=P.get(t.target),r=h.nodes.find(e=>e.id===t.source).isPipelineParent?c/Math.sqrt(2):o.nodeRadius,n=a.x-e.x,i=a.y-e.y,s=Math.sqrt(n*n+i*i);return e.x+n/s*r}).attr("y1",t=>{const e=P.get(t.source),a=P.get(t.target),r=h.nodes.find(e=>e.id===t.source).isPipelineParent?c/Math.sqrt(2):o.nodeRadius,n=a.x-e.x,i=a.y-e.y,s=Math.sqrt(n*n+i*i);return e.y+i/s*r}).attr("x2",t=>{const e=P.get(t.source),a=P.get(t.target),r=h.nodes.find(e=>e.id===t.target).isPipelineParent?c/Math.sqrt(2):o.nodeRadius,n=e.x-a.x,i=e.y-a.y,s=Math.sqrt(n*n+i*i);return a.x+n/s*r}).attr("y2",t=>{const e=P.get(t.source),a=P.get(t.target),r=h.nodes.find(e=>e.id===t.target).isPipelineParent?c/Math.sqrt(2):o.nodeRadius,n=e.x-a.x,i=e.y-a.y,s=Math.sqrt(n*n+i*i);return a.y+i/s*r}).attr("stroke",d.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),N.selectAll("text").data(z.filter(t=>t.label)).enter().append("text").attr("class","wardley-link-label").attr("x",t=>{const e=P.get(t.source),a=P.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=P.get(t.source),a=P.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",d.axisTextColor).attr("font-size",o.labelFontSize).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("transform",t=>{const e=P.get(t.source),a=P.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 A=u.append("g").attr("class","wardley-trends"),L=h.trends.map(t=>{const e=P.get(t.nodeId);if(!e)return null;const a=b(t.targetX),r=$(t.targetY),n=a-e.x,i=r-e.y,s=Math.sqrt(n*n+i*i),l=o.nodeRadius+2;return{origin:e,targetX:a,targetY:r,adjustedX2:s>l?a-n/s*l:a,adjustedY2:s>l?r-i/s*l:r}}).filter(t=>null!==t);A.selectAll("line").data(L).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",d.evolutionStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4").attr("marker-end",`url(#arrow-${e})`);const I=u.append("g").attr("class","wardley-nodes").selectAll("g").data(h.nodes).enter().append("g").attr("class",t=>["wardley-node",t.className?`wardley-node--${t.className}`:""].filter(Boolean).join(" "));I.filter(t=>"outsource"===t.sourceStrategy).append("circle").attr("class","wardley-outsource-overlay").attr("cx",t=>P.get(t.id).x).attr("cy",t=>P.get(t.id).y).attr("r",2*o.nodeRadius).attr("fill","#666").attr("stroke",d.componentStroke).attr("stroke-width",1),I.filter(t=>"buy"===t.sourceStrategy).append("circle").attr("class","wardley-buy-overlay").attr("cx",t=>P.get(t.id).x).attr("cy",t=>P.get(t.id).y).attr("r",2*o.nodeRadius).attr("fill","#ccc").attr("stroke",d.componentStroke).attr("stroke-width",1),I.filter(t=>"build"===t.sourceStrategy).append("circle").attr("class","wardley-build-overlay").attr("cx",t=>P.get(t.id).x).attr("cy",t=>P.get(t.id).y).attr("r",2*o.nodeRadius).attr("fill","#eee").attr("stroke","#000").attr("stroke-width",1);const E=I.filter(t=>"market"===t.sourceStrategy);E.append("circle").attr("class","wardley-market-overlay").attr("cx",t=>P.get(t.id).x).attr("cy",t=>P.get(t.id).y).attr("r",2*o.nodeRadius).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",1),I.filter(t=>!t.isPipelineParent&&"market"!==t.sourceStrategy&&"anchor"!==t.className).append("circle").attr("cx",t=>P.get(t.id).x).attr("cy",t=>P.get(t.id).y).attr("r",o.nodeRadius).attr("fill",d.componentFill).attr("stroke",d.componentStroke).attr("stroke-width",1);const B=.7*o.nodeRadius,F=1.2*o.nodeRadius;if(E.append("line").attr("class","wardley-market-line").attr("x1",t=>P.get(t.id).x).attr("y1",t=>P.get(t.id).y-F).attr("x2",t=>P.get(t.id).x-F*Math.cos(Math.PI/6)).attr("y2",t=>P.get(t.id).y+F*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),E.append("line").attr("class","wardley-market-line").attr("x1",t=>P.get(t.id).x-F*Math.cos(Math.PI/6)).attr("y1",t=>P.get(t.id).y+F*Math.sin(Math.PI/6)).attr("x2",t=>P.get(t.id).x+F*Math.cos(Math.PI/6)).attr("y2",t=>P.get(t.id).y+F*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),E.append("line").attr("class","wardley-market-line").attr("x1",t=>P.get(t.id).x+F*Math.cos(Math.PI/6)).attr("y1",t=>P.get(t.id).y+F*Math.sin(Math.PI/6)).attr("x2",t=>P.get(t.id).x).attr("y2",t=>P.get(t.id).y-F).attr("stroke",d.componentStroke).attr("stroke-width",1),E.append("circle").attr("class","wardley-market-dot").attr("cx",t=>P.get(t.id).x).attr("cy",t=>P.get(t.id).y-F).attr("r",B).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),E.append("circle").attr("class","wardley-market-dot").attr("cx",t=>P.get(t.id).x-F*Math.cos(Math.PI/6)).attr("cy",t=>P.get(t.id).y+F*Math.sin(Math.PI/6)).attr("r",B).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),E.append("circle").attr("class","wardley-market-dot").attr("cx",t=>P.get(t.id).x+F*Math.cos(Math.PI/6)).attr("cy",t=>P.get(t.id).y+F*Math.sin(Math.PI/6)).attr("r",B).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),I.filter(t=>!0===t.isPipelineParent).append("rect").attr("x",t=>P.get(t.id).x-c/2).attr("y",t=>P.get(t.id).y-c/2).attr("width",c).attr("height",c).attr("fill",d.componentFill).attr("stroke",d.componentStroke).attr("stroke-width",1),I.filter(t=>!0===t.inertia).append("line").attr("class","wardley-inertia").attr("x1",t=>{const e=P.get(t.id);let a=t.isPipelineParent?c/2+15:o.nodeRadius+15;return t.sourceStrategy&&(a+=o.nodeRadius+10),e.x+a}).attr("y1",t=>{const e=P.get(t.id),a=t.isPipelineParent?c:2*o.nodeRadius;return e.y-a/2}).attr("x2",t=>{const e=P.get(t.id);let a=t.isPipelineParent?c/2+15:o.nodeRadius+15;return t.sourceStrategy&&(a+=o.nodeRadius+10),e.x+a}).attr("y2",t=>{const e=P.get(t.id),a=t.isPipelineParent?c:2*o.nodeRadius;return e.y+a/2}).attr("stroke",d.componentStroke).attr("stroke-width",6),I.append("text").attr("x",t=>{const e=P.get(t.id);if("anchor"===t.className)return void 0!==t.labelOffsetX?e.x+t.labelOffsetX:e.x;let a=o.nodeLabelOffset;t.sourceStrategy&&void 0===t.labelOffsetX&&(a+=10);const r=t.labelOffsetX??a;return e.x+r}).attr("y",t=>{const e=P.get(t.id);if("anchor"===t.className)return void 0!==t.labelOffsetY?e.y+t.labelOffsetY:e.y-3;let a=-o.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?d.evolutionStroke:"anchor"===t.className?"#000":d.componentLabelColor).attr("font-size",o.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),h.annotations.length>0){const t=u.append("g").attr("class","wardley-annotations");if(h.annotations.forEach(e=>{const a=e.coordinates.map(t=>({x:b(t.x),y:$(t.y)}));if(a.length>1)for(let e=0;e<a.length-1;e++)t.append("line").attr("class","wardley-annotation-line").attr("x1",a[e].x).attr("y1",a[e].y).attr("x2",a[e+1].x).attr("y2",a[e+1].y).attr("stroke",d.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",d.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",d.axisTextColor).attr("font-weight","bold").text(e.number)})}),h.annotationsBox){let e=b(h.annotationsBox.x),a=$(h.annotationsBox.y);const r=10,n=16,i=11,s=t.append("g").attr("class","wardley-annotations-box"),l=[...h.annotations].filter(t=>t.text).sort((t,e)=>t.number-e.number),c=[];if(l.forEach((t,o)=>{const l=s.append("text").attr("x",e+r).attr("y",a+r+(o+1)*n).attr("font-size",i).attr("fill",d.axisTextColor).attr("text-anchor","start").attr("dominant-baseline","middle").text(`${t.number}. ${t.text}`);c.push(l)}),c.length>0){let t=0,i=0;c.forEach(e=>{const a=e.node(),r=a.getComputedTextLength();t=Math.max(t,r);const n=a.getBBox();i=Math.max(i,n.height)});const p=t+2*r+105,h=l.length*n+2*r+i/2,x=o.padding,f=y-o.padding-p,u=o.padding,w=g-o.padding-h;e=Math.max(x,Math.min(e,f)),a=Math.max(u,Math.min(a,w)),c.forEach((t,o)=>{t.attr("x",e+r).attr("y",a+r+(o+1)*n)}),s.insert("rect","text").attr("x",e).attr("y",a).attr("width",p).attr("height",h).attr("fill","white").attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}}}if(h.notes.length>0){const t=u.append("g").attr("class","wardley-notes");h.notes.forEach(e=>{const a=b(e.x),r=$(e.y);t.append("text").attr("x",a).attr("y",r).attr("text-anchor","start").attr("font-size",11).attr("fill",d.axisTextColor).attr("font-weight","bold").text(e.text)})}if(h.accelerators.length>0){const t=u.append("g").attr("class","wardley-accelerators");h.accelerators.forEach(e=>{const a=b(e.x),r=$(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",d.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",d.axisTextColor).attr("font-weight","bold").text(e.name)})}if(h.deaccelerators.length>0){const t=u.append("g").attr("class","wardley-deaccelerators");h.deaccelerators.forEach(e=>{const a=b(e.x),r=$(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",d.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",d.axisTextColor).attr("font-weight","bold").text(e.name)})}},"draw")},styles:(0,l.K)(({wardley:t}={})=>{const e=(0,i.P$)(),a=(0,i.zj)(),r=(0,o.$t)(e,a.themeVariables),n=(0,o.$t)(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")}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[7483],{77454(t,e,a){function r(t,e){t.accDescr&&e.setAccDescription?.(t.accDescr),t.accTitle&&e.setAccTitle?.(t.accTitle),t.title&&e.setDiagramTitle?.(t.title)}a.d(e,{S:()=>r}),(0,a(86827).K)(r,"populateCommonDb")},27483(t,e,a){a.d(e,{diagram:()=>B});var r=a(77454),n=a(5637),o=a(12505),i=a(86535),s=a(31293),l=a(86827),d=a(34376),c=(0,l.K)((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"),p=(0,l.K)((t,e,a)=>({x:c(e,`${a} evolution`),y:c(t,`${a} visibility`)}),"toCoordinates"),h=(0,l.K)(t=>{if(t)return"+<>"===t?"bidirectional":"+<"===t?"backward":"+>"===t?"forward":void 0},"getFlowFromPort"),x=(0,l.K)(t=>{if(!t?.startsWith("+"))return{};const e=/^\+'([^']*)'/.exec(t),a=e?.[1];return t.includes("<>")?{flow:"bidirectional",label:a}:t.includes("<")?{flow:"backward",label:a}:t.includes(">")?{flow:"forward",label:a}:{label:a}},"extractFlowFromArrow"),y=(0,l.K)((t,e)=>{if((0,r.S)(t,e),t.size&&e.setSize(t.size.width,t.size.height),t.evolution){const a=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);e.updateAxes({stages:a,stageBoundaries:r})}if(t.anchors.forEach(t=>{const a=p(t.visibility,t.evolution,`Anchor "${t.name}"`);e.addNode(t.name,t.name,a.x,a.y,"anchor")}),t.components.forEach(t=>{const a=p(t.visibility,t.evolution,`Component "${t.name}"`),r=t.label?(t.label.negX?-1:1)*t.label.offsetX:void 0,n=t.label?(t.label.negY?-1:1)*t.label.offsetY:void 0,o=t.decorator?.strategy;e.addNode(t.name,t.name,a.x,a.y,"component",r,n,t.inertia,o)}),t.notes.forEach(t=>{const a=p(t.visibility,t.evolution,`Note "${t.text}"`);e.addNote(t.text,a.x,a.y)}),t.pipelines.forEach(t=>{const a=e.getNode(t.parent);if(!a||"number"!=typeof a.y)throw new Error(`Pipeline "${t.parent}" must reference an existing component with coordinates.`);const r=a.y;e.startPipeline(t.parent),t.components.forEach(a=>{const n=`${t.parent}_${a.name}`,o=a.label?(a.label.negX?-1:1)*a.label.offsetX:void 0,i=a.label?(a.label.negY?-1:1)*a.label.offsetY:void 0,s=c(a.evolution,`Pipeline component "${a.name}" evolution`);e.addNode(n,a.name,s,r,"pipeline-component",o,i),e.addPipelineComponent(t.parent,n)})}),t.links.forEach(t=>{const a=!!t.arrow&&(t.arrow.includes("-.->")||t.arrow.includes(".-."));let r=h(t.fromPort)??h(t.toPort);const{flow:n,label:o}=x(t.arrow);!r&&n&&(r=n);const i=t.linkLabel,s=o??i;e.addLink(e.resolveNodeId(t.from),e.resolveNodeId(t.to),a,s,r)}),t.evolves.forEach(t=>{const a=e.getNode(t.component);if(void 0!==a?.y){const r=c(t.target,`Evolve target for "${t.component}"`);e.addTrend(t.component,r,a.y)}}),t.annotations.length>0){const a=t.annotations[0],r=p(a.x,a.y,"Annotations box");e.setAnnotationsBox(r.x,r.y)}t.annotation.forEach(t=>{const a=p(t.x,t.y,`Annotation ${t.number}`);e.addAnnotation(t.number,[{x:a.x,y:a.y}],t.text)}),t.accelerators.forEach(t=>{const a=p(t.x,t.y,`Accelerator "${t.name}"`);e.addAccelerator(t.name,a.x,a.y)}),t.deaccelerators.forEach(t=>{const a=p(t.x,t.y,`Deaccelerator "${t.name}"`);e.addDeaccelerator(t.name,a.x,a.y)})},"populateDb"),g={parser:{yy:void 0},parse:(0,l.K)(async t=>{const e=await(0,d.qg)("wardley",t);s.R.debug(e);const a=g.parser?.yy;if(!a||"function"!=typeof a.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.");y(e,a)},"parse")},f=new 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={}}static{(0,l.K)(this,"WardleyBuilder")}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}};function u(){return(0,i.D7)()["wardley-beta"]}function w(t,e,a,r,n,o,i,s,l){f.addNode({id:t,label:e,x:a,y:r,className:n,labelOffsetX:o,labelOffsetY:i,inertia:s,sourceStrategy:l})}function m(t,e,a=!1,r,n){f.addLink({source:t,target:e,dashed:a,label:r,flow:n})}function k(t,e,a){f.addTrend({nodeId:t,targetX:e,targetY:a})}function b(t,e,a){f.addAnnotation({number:t,coordinates:e,text:a})}function $(t,e,a){f.addNote({text:t,x:e,y:a})}function S(t,e,a){f.addAccelerator({name:t,x:e,y:a})}function v(t,e,a){f.addDeaccelerator({name:t,x:e,y:a})}function C(t,e){f.setAnnotationsBox(t,e)}function M(t,e){f.setSize(t,e)}function P(t){f.startPipeline(t)}function N(t,e){f.addPipelineComponent(t,e)}function T(t){f.setAxes(t)}function z(t){return f.getNode(t)}function A(t){return f.resolveNodeId(t)}function L(){return f.build()}function I(){f.clear(),(0,i.IU)()}(0,l.K)(u,"getConfig"),(0,l.K)(w,"addNode"),(0,l.K)(m,"addLink"),(0,l.K)(k,"addTrend"),(0,l.K)(b,"addAnnotation"),(0,l.K)($,"addNote"),(0,l.K)(S,"addAccelerator"),(0,l.K)(v,"addDeaccelerator"),(0,l.K)(C,"setAnnotationsBox"),(0,l.K)(M,"setSize"),(0,l.K)(P,"startPipeline"),(0,l.K)(N,"addPipelineComponent"),(0,l.K)(T,"updateAxes"),(0,l.K)(z,"getNode"),(0,l.K)(A,"resolveNodeId"),(0,l.K)(L,"getWardleyData"),(0,l.K)(I,"clear");var E={getConfig:u,addNode:w,addLink:m,addTrend:k,addAnnotation:b,addNote:$,addAccelerator:S,addDeaccelerator:v,setAnnotationsBox:C,setSize:M,startPipeline:P,addPipelineComponent:N,updateAxes:T,getNode:z,resolveNodeId:A,getWardleyData:L,clear:I,setAccTitle:i.SV,getAccTitle:i.iN,setDiagramTitle:i.ke,getDiagramTitle:i.ab,getAccDescription:i.m7,setAccDescription:i.EI},K=["Genesis","Custom Built","Product","Commodity"],R=(0,l.K)(()=>{const{themeVariables:t}=(0,i.D7)();return{backgroundColor:t.wardley?.backgroundColor??t.background??"#fff",axisColor:t.wardley?.axisColor??"#000",axisTextColor:t.wardley?.axisTextColor??t.primaryTextColor??"#222",gridColor:t.wardley?.gridColor??"rgba(100, 100, 100, 0.2)",componentFill:t.wardley?.componentFill??"#fff",componentStroke:t.wardley?.componentStroke??"#000",componentLabelColor:t.wardley?.componentLabelColor??t.primaryTextColor??"#222",linkStroke:t.wardley?.linkStroke??"#000",evolutionStroke:t.wardley?.evolutionStroke??"#dc3545",annotationStroke:t.wardley?.annotationStroke??"#000",annotationTextColor:t.wardley?.annotationTextColor??t.primaryTextColor??"#222",annotationFill:t.wardley?.annotationFill??t.background??"#fff"}},"getTheme"),D=(0,l.K)(()=>{const t=(0,i.D7)()["wardley-beta"];return{width:t?.width??900,height:t?.height??600,padding:t?.padding??48,nodeRadius:t?.nodeRadius??6,nodeLabelOffset:t?.nodeLabelOffset??8,axisFontSize:t?.axisFontSize??12,labelFontSize:t?.labelFontSize??10,showGrid:t?.showGrid??!1,useMaxWidth:t?.useMaxWidth??!0}},"getConfigValues"),B={parser:g,db:E,renderer:{draw:(0,l.K)((t,e,a,r)=>{s.R.debug("Rendering Wardley map\n"+t);const o=D(),d=R(),c=1.6*o.nodeRadius,p=r.db,h=p.getWardleyData(),x=p.getDiagramTitle(),y=h.size?.width??o.width,g=h.size?.height??o.height,f=(0,n.D)(e);f.selectAll("*").remove(),(0,i.a$)(f,g,y,o.useMaxWidth),f.attr("viewBox",`0 0 ${y} ${g}`);const u=f.append("g").attr("class","wardley-map"),w=f.append("defs");w.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",d.evolutionStroke).attr("stroke","none"),w.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",d.linkStroke).attr("stroke","none"),w.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",d.linkStroke).attr("stroke","none"),u.append("rect").attr("class","wardley-background").attr("width",y).attr("height",g).attr("fill",d.backgroundColor);const m=y-2*o.padding,k=g-2*o.padding;x&&u.append("text").attr("class","wardley-title").attr("x",y/2).attr("y",o.padding/2).attr("fill",d.axisTextColor).attr("font-size",1.05*o.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("dominant-baseline","middle").text(x);const b=(0,l.K)(t=>o.padding+t/100*m,"projectX"),$=(0,l.K)(t=>g-o.padding-t/100*k,"projectY"),S=u.append("g").attr("class","wardley-axes");S.append("line").attr("x1",o.padding).attr("x2",y-o.padding).attr("y1",g-o.padding).attr("y2",g-o.padding).attr("stroke",d.axisColor).attr("stroke-width",1),S.append("line").attr("x1",o.padding).attr("x2",o.padding).attr("y1",o.padding).attr("y2",g-o.padding).attr("stroke",d.axisColor).attr("stroke-width",1);const v=h.axes.xLabel??"Evolution",C=h.axes.yLabel??"Visibility";S.append("text").attr("class","wardley-axis-label wardley-axis-label-x").attr("x",o.padding+m/2).attr("y",g-o.padding/4).attr("fill",d.axisTextColor).attr("font-size",o.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").text(v),S.append("text").attr("class","wardley-axis-label wardley-axis-label-y").attr("x",o.padding/3).attr("y",o.padding+k/2).attr("fill",d.axisTextColor).attr("font-size",o.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("transform",`rotate(-90 ${o.padding/3} ${o.padding+k/2})`).text(C);const M=h.axes.stages&&h.axes.stages.length>0?h.axes.stages:K;if(M.length>0){const t=u.append("g").attr("class","wardley-stages"),e=h.axes.stageBoundaries,a=[];if(e&&e.length===M.length){let t=0;e.forEach(e=>{a.push({start:t,end:e}),t=e})}else{const t=1/M.length;M.forEach((e,r)=>{a.push({start:r*t,end:(r+1)*t})})}M.forEach((e,r)=>{const n=a[r],i=o.padding+n.start*m,s=(i+(o.padding+n.end*m))/2;r>0&&t.append("line").attr("x1",i).attr("x2",i).attr("y1",o.padding).attr("y2",g-o.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",s).attr("y",g-o.padding/1.5).attr("fill",d.axisTextColor).attr("font-size",o.axisFontSize-2).attr("text-anchor","middle").text(e)})}if(o.showGrid){const t=u.append("g").attr("class","wardley-grid");for(let e=1;e<4;e++){const a=e/4,r=o.padding+m*a;t.append("line").attr("x1",r).attr("x2",r).attr("y1",o.padding).attr("y2",g-o.padding).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6"),t.append("line").attr("x1",o.padding).attr("x2",y-o.padding).attr("y1",g-o.padding-k*a).attr("y2",g-o.padding-k*a).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6")}}const P=new Map;if(h.nodes.forEach(t=>{P.set(t.id,{x:b(t.x),y:$(t.y),node:t})}),h.pipelines.length>0){const t=u.append("g").attr("class","wardley-pipelines"),e=u.append("g").attr("class","wardley-pipeline-links");h.pipelines.forEach(a=>{if(0===a.componentIds.length)return;const r=a.componentIds.map(t=>({id:t,pos:P.get(t),node:h.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",d.linkStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4")}let n=1/0,i=-1/0,s=0;if(a.componentIds.forEach(t=>{const e=P.get(t);e&&(n=Math.min(n,e.x),i=Math.max(i,e.x),s=e.y)}),n!==1/0&&i!==-1/0){const e=15,r=4*o.nodeRadius,l=s-r/2,p=P.get(a.nodeId);if(p){const t=(n+i)/2;p.x=t,p.y=l-c/6}t.append("rect").attr("class","wardley-pipeline-box").attr("x",n-e).attr("y",l).attr("width",i-n+2*e).attr("height",r).attr("fill","none").attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}})}const N=u.append("g").attr("class","wardley-links"),T=new Map;h.pipelines.forEach(t=>{T.set(t.nodeId,new Set(t.componentIds))});const z=h.links.filter(t=>{if(!P.has(t.source)||!P.has(t.target))return!1;const e=T.get(t.target);return!e?.has(t.source)});N.selectAll("line").data(z).enter().append("line").attr("class",t=>"wardley-link"+(t.dashed?" wardley-link--dashed":"")).attr("x1",t=>{const e=P.get(t.source),a=P.get(t.target),r=h.nodes.find(e=>e.id===t.source).isPipelineParent?c/Math.sqrt(2):o.nodeRadius,n=a.x-e.x,i=a.y-e.y,s=Math.sqrt(n*n+i*i);return e.x+n/s*r}).attr("y1",t=>{const e=P.get(t.source),a=P.get(t.target),r=h.nodes.find(e=>e.id===t.source).isPipelineParent?c/Math.sqrt(2):o.nodeRadius,n=a.x-e.x,i=a.y-e.y,s=Math.sqrt(n*n+i*i);return e.y+i/s*r}).attr("x2",t=>{const e=P.get(t.source),a=P.get(t.target),r=h.nodes.find(e=>e.id===t.target).isPipelineParent?c/Math.sqrt(2):o.nodeRadius,n=e.x-a.x,i=e.y-a.y,s=Math.sqrt(n*n+i*i);return a.x+n/s*r}).attr("y2",t=>{const e=P.get(t.source),a=P.get(t.target),r=h.nodes.find(e=>e.id===t.target).isPipelineParent?c/Math.sqrt(2):o.nodeRadius,n=e.x-a.x,i=e.y-a.y,s=Math.sqrt(n*n+i*i);return a.y+i/s*r}).attr("stroke",d.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),N.selectAll("text").data(z.filter(t=>t.label)).enter().append("text").attr("class","wardley-link-label").attr("x",t=>{const e=P.get(t.source),a=P.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=P.get(t.source),a=P.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",d.axisTextColor).attr("font-size",o.labelFontSize).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("transform",t=>{const e=P.get(t.source),a=P.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 A=u.append("g").attr("class","wardley-trends"),L=h.trends.map(t=>{const e=P.get(t.nodeId);if(!e)return null;const a=b(t.targetX),r=$(t.targetY),n=a-e.x,i=r-e.y,s=Math.sqrt(n*n+i*i),l=o.nodeRadius+2;return{origin:e,targetX:a,targetY:r,adjustedX2:s>l?a-n/s*l:a,adjustedY2:s>l?r-i/s*l:r}}).filter(t=>null!==t);A.selectAll("line").data(L).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",d.evolutionStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4").attr("marker-end",`url(#arrow-${e})`);const I=u.append("g").attr("class","wardley-nodes").selectAll("g").data(h.nodes).enter().append("g").attr("class",t=>["wardley-node",t.className?`wardley-node--${t.className}`:""].filter(Boolean).join(" "));I.filter(t=>"outsource"===t.sourceStrategy).append("circle").attr("class","wardley-outsource-overlay").attr("cx",t=>P.get(t.id).x).attr("cy",t=>P.get(t.id).y).attr("r",2*o.nodeRadius).attr("fill","#666").attr("stroke",d.componentStroke).attr("stroke-width",1),I.filter(t=>"buy"===t.sourceStrategy).append("circle").attr("class","wardley-buy-overlay").attr("cx",t=>P.get(t.id).x).attr("cy",t=>P.get(t.id).y).attr("r",2*o.nodeRadius).attr("fill","#ccc").attr("stroke",d.componentStroke).attr("stroke-width",1),I.filter(t=>"build"===t.sourceStrategy).append("circle").attr("class","wardley-build-overlay").attr("cx",t=>P.get(t.id).x).attr("cy",t=>P.get(t.id).y).attr("r",2*o.nodeRadius).attr("fill","#eee").attr("stroke","#000").attr("stroke-width",1);const E=I.filter(t=>"market"===t.sourceStrategy);E.append("circle").attr("class","wardley-market-overlay").attr("cx",t=>P.get(t.id).x).attr("cy",t=>P.get(t.id).y).attr("r",2*o.nodeRadius).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",1),I.filter(t=>!t.isPipelineParent&&"market"!==t.sourceStrategy&&"anchor"!==t.className).append("circle").attr("cx",t=>P.get(t.id).x).attr("cy",t=>P.get(t.id).y).attr("r",o.nodeRadius).attr("fill",d.componentFill).attr("stroke",d.componentStroke).attr("stroke-width",1);const B=.7*o.nodeRadius,F=1.2*o.nodeRadius;if(E.append("line").attr("class","wardley-market-line").attr("x1",t=>P.get(t.id).x).attr("y1",t=>P.get(t.id).y-F).attr("x2",t=>P.get(t.id).x-F*Math.cos(Math.PI/6)).attr("y2",t=>P.get(t.id).y+F*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),E.append("line").attr("class","wardley-market-line").attr("x1",t=>P.get(t.id).x-F*Math.cos(Math.PI/6)).attr("y1",t=>P.get(t.id).y+F*Math.sin(Math.PI/6)).attr("x2",t=>P.get(t.id).x+F*Math.cos(Math.PI/6)).attr("y2",t=>P.get(t.id).y+F*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),E.append("line").attr("class","wardley-market-line").attr("x1",t=>P.get(t.id).x+F*Math.cos(Math.PI/6)).attr("y1",t=>P.get(t.id).y+F*Math.sin(Math.PI/6)).attr("x2",t=>P.get(t.id).x).attr("y2",t=>P.get(t.id).y-F).attr("stroke",d.componentStroke).attr("stroke-width",1),E.append("circle").attr("class","wardley-market-dot").attr("cx",t=>P.get(t.id).x).attr("cy",t=>P.get(t.id).y-F).attr("r",B).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),E.append("circle").attr("class","wardley-market-dot").attr("cx",t=>P.get(t.id).x-F*Math.cos(Math.PI/6)).attr("cy",t=>P.get(t.id).y+F*Math.sin(Math.PI/6)).attr("r",B).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),E.append("circle").attr("class","wardley-market-dot").attr("cx",t=>P.get(t.id).x+F*Math.cos(Math.PI/6)).attr("cy",t=>P.get(t.id).y+F*Math.sin(Math.PI/6)).attr("r",B).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),I.filter(t=>!0===t.isPipelineParent).append("rect").attr("x",t=>P.get(t.id).x-c/2).attr("y",t=>P.get(t.id).y-c/2).attr("width",c).attr("height",c).attr("fill",d.componentFill).attr("stroke",d.componentStroke).attr("stroke-width",1),I.filter(t=>!0===t.inertia).append("line").attr("class","wardley-inertia").attr("x1",t=>{const e=P.get(t.id);let a=t.isPipelineParent?c/2+15:o.nodeRadius+15;return t.sourceStrategy&&(a+=o.nodeRadius+10),e.x+a}).attr("y1",t=>{const e=P.get(t.id),a=t.isPipelineParent?c:2*o.nodeRadius;return e.y-a/2}).attr("x2",t=>{const e=P.get(t.id);let a=t.isPipelineParent?c/2+15:o.nodeRadius+15;return t.sourceStrategy&&(a+=o.nodeRadius+10),e.x+a}).attr("y2",t=>{const e=P.get(t.id),a=t.isPipelineParent?c:2*o.nodeRadius;return e.y+a/2}).attr("stroke",d.componentStroke).attr("stroke-width",6),I.append("text").attr("x",t=>{const e=P.get(t.id);if("anchor"===t.className)return void 0!==t.labelOffsetX?e.x+t.labelOffsetX:e.x;let a=o.nodeLabelOffset;t.sourceStrategy&&void 0===t.labelOffsetX&&(a+=10);const r=t.labelOffsetX??a;return e.x+r}).attr("y",t=>{const e=P.get(t.id);if("anchor"===t.className)return void 0!==t.labelOffsetY?e.y+t.labelOffsetY:e.y-3;let a=-o.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?d.evolutionStroke:"anchor"===t.className?"#000":d.componentLabelColor).attr("font-size",o.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),h.annotations.length>0){const t=u.append("g").attr("class","wardley-annotations");if(h.annotations.forEach(e=>{const a=e.coordinates.map(t=>({x:b(t.x),y:$(t.y)}));if(a.length>1)for(let e=0;e<a.length-1;e++)t.append("line").attr("class","wardley-annotation-line").attr("x1",a[e].x).attr("y1",a[e].y).attr("x2",a[e+1].x).attr("y2",a[e+1].y).attr("stroke",d.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",d.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",d.axisTextColor).attr("font-weight","bold").text(e.number)})}),h.annotationsBox){let e=b(h.annotationsBox.x),a=$(h.annotationsBox.y);const r=10,n=16,i=11,s=t.append("g").attr("class","wardley-annotations-box"),l=[...h.annotations].filter(t=>t.text).sort((t,e)=>t.number-e.number),c=[];if(l.forEach((t,o)=>{const l=s.append("text").attr("x",e+r).attr("y",a+r+(o+1)*n).attr("font-size",i).attr("fill",d.axisTextColor).attr("text-anchor","start").attr("dominant-baseline","middle").text(`${t.number}. ${t.text}`);c.push(l)}),c.length>0){let t=0,i=0;c.forEach(e=>{const a=e.node(),r=a.getComputedTextLength();t=Math.max(t,r);const n=a.getBBox();i=Math.max(i,n.height)});const p=t+2*r+105,h=l.length*n+2*r+i/2,x=o.padding,f=y-o.padding-p,u=o.padding,w=g-o.padding-h;e=Math.max(x,Math.min(e,f)),a=Math.max(u,Math.min(a,w)),c.forEach((t,o)=>{t.attr("x",e+r).attr("y",a+r+(o+1)*n)}),s.insert("rect","text").attr("x",e).attr("y",a).attr("width",p).attr("height",h).attr("fill","white").attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}}}if(h.notes.length>0){const t=u.append("g").attr("class","wardley-notes");h.notes.forEach(e=>{const a=b(e.x),r=$(e.y);t.append("text").attr("x",a).attr("y",r).attr("text-anchor","start").attr("font-size",11).attr("fill",d.axisTextColor).attr("font-weight","bold").text(e.text)})}if(h.accelerators.length>0){const t=u.append("g").attr("class","wardley-accelerators");h.accelerators.forEach(e=>{const a=b(e.x),r=$(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",d.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",d.axisTextColor).attr("font-weight","bold").text(e.name)})}if(h.deaccelerators.length>0){const t=u.append("g").attr("class","wardley-deaccelerators");h.deaccelerators.forEach(e=>{const a=b(e.x),r=$(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",d.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",d.axisTextColor).attr("font-weight","bold").text(e.name)})}},"draw")},styles:(0,l.K)(({wardley:t}={})=>{const e=(0,i.P$)(),a=(0,i.zj)(),r=(0,o.$t)(e,a.themeVariables),n=(0,o.$t)(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")}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[1240],{91240(t,e,i){i.d(e,{diagram:()=>I});var a=i(32178),n=i(31293),s=i(86827),r=i(51444),o=function(){var t=(0,s.K)(function(t,e,i,a){for(i=i||{},a=t.length;a--;i[t[a]]=e);return i},"o"),e=[1,3],i=[1,4],a=[1,5],n=[1,6],r=[1,7],o=[1,4,5,10,12,13,14,15,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],l=[1,4,5,10,12,13,14,15,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],h=[55,56,57],c=[2,36],d=[1,37],u=[1,36],x=[1,38],g=[1,35],f=[1,43],p=[1,41],y=[1,45],T=[1,14],m=[1,23],q=[1,18],A=[1,19],_=[1,20],b=[1,21],S=[1,22],k=[1,24],F=[1,25],P=[1,26],C=[1,27],L=[1,28],v=[1,29],I=[1,32],E=[1,33],D=[1,34],z=[1,39],w=[1,40],K=[1,42],U=[1,44],N=[1,63],R=[1,62],B=[4,5,8,10,12,13,14,15,18,44,47,49,55,56,57,63,64,65,66,67],W=[1,66],$=[1,67],Q=[1,68],O=[1,69],X=[1,70],H=[1,71],M=[1,72],Y=[1,73],j=[1,74],G=[1,75],V=[1,76],Z=[1,77],J=[4,5,6,7,8,9,10,11,12,13,14,15,18],tt=[1,91],et=[1,92],it=[1,93],at=[1,100],nt=[1,94],st=[1,97],rt=[1,95],ot=[1,96],lt=[1,98],ht=[1,99],ct=[1,103],dt=[10,55,56,57],ut=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],xt={trace:(0,s.K)(function(){},"trace"),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:"error",4:"ALPHA",5:"NUM",6:"NODE_STRING",7:"DOWN",8:"MINUS",9:"DEFAULT",10:"COMMA",11:"COLON",12:"AMP",13:"BRKT",14:"MULT",15:"UNICODE_TEXT",17:"UNIT",18:"SPACE",19:"STYLE",20:"PCT",25:"CLASSDEF",28:"QUADRANT",35:"title",36:"title_value",37:"acc_title",38:"acc_title_value",39:"acc_descr",40:"acc_descr_value",41:"acc_descr_multiline_value",42:"section",44:"point_start",45:"point_x",46:"point_y",47:"class_name",48:"X-AXIS",49:"AXIS-TEXT-DELIMITER",50:"Y-AXIS",51:"QUADRANT_1",52:"QUADRANT_2",53:"QUADRANT_3",54:"QUADRANT_4",55:"NEWLINE",56:"SEMI",57:"EOF",60:"STR",61:"MD_STR",63:"PUNCTUATION",64:"PLUS",65:"EQUALS",66:"DOT",67:"UNDERSCORE"},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:(0,s.K)(function(t,e,i,a,n,s,r){var o=s.length-1;switch(n){case 23:case 68:this.$=s[o];break;case 24:case 69:this.$=s[o-1]+""+s[o];break;case 26:this.$=s[o-1]+s[o];break;case 27:this.$=[s[o].trim()];break;case 28:s[o-2].push(s[o].trim()),this.$=s[o-2];break;case 29:this.$=s[o-4],a.addClass(s[o-2],s[o]);break;case 37:this.$=[];break;case 42:this.$=s[o].trim(),a.setDiagramTitle(this.$);break;case 43:this.$=s[o].trim(),a.setAccTitle(this.$);break;case 44:case 45:this.$=s[o].trim(),a.setAccDescription(this.$);break;case 46:a.addSection(s[o].substr(8)),this.$=s[o].substr(8);break;case 47:a.addPoint(s[o-3],"",s[o-1],s[o],[]);break;case 48:a.addPoint(s[o-4],s[o-3],s[o-1],s[o],[]);break;case 49:a.addPoint(s[o-4],"",s[o-2],s[o-1],s[o]);break;case 50:a.addPoint(s[o-5],s[o-4],s[o-2],s[o-1],s[o]);break;case 51:a.setXAxisLeftText(s[o-2]),a.setXAxisRightText(s[o]);break;case 52:s[o-1].text+=" ⟶ ",a.setXAxisLeftText(s[o-1]);break;case 53:a.setXAxisLeftText(s[o]);break;case 54:a.setYAxisBottomText(s[o-2]),a.setYAxisTopText(s[o]);break;case 55:s[o-1].text+=" ⟶ ",a.setYAxisBottomText(s[o-1]);break;case 56:a.setYAxisBottomText(s[o]);break;case 57:a.setQuadrant1Text(s[o]);break;case 58:a.setQuadrant2Text(s[o]);break;case 59:a.setQuadrant3Text(s[o]);break;case 60:a.setQuadrant4Text(s[o]);break;case 64:case 66:this.$={text:s[o],type:"text"};break;case 65:this.$={text:s[o-1].text+""+s[o],type:s[o-1].type};break;case 67:this.$={text:s[o],type:"markdown"}}},"anonymous"),table:[{18:e,26:1,27:2,28:i,55:a,56:n,57:r},{1:[3]},{18:e,26:8,27:2,28:i,55:a,56:n,57:r},{18:e,26:9,27:2,28:i,55:a,56:n,57:r},t(o,[2,33],{29:10}),t(l,[2,61]),t(l,[2,62]),t(l,[2,63]),{1:[2,30]},{1:[2,31]},t(h,c,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:d,5:u,10:x,12:g,13:f,14:p,15:y,18:T,25:m,35:q,37:A,39:_,41:b,42:S,48:k,50:F,51:P,52:C,53:L,54:v,60:I,61:E,63:D,64:z,65:w,66:K,67:U}),t(o,[2,34]),{27:46,55:a,56:n,57:r},t(h,[2,37]),t(h,c,{24:13,32:15,33:16,34:17,43:30,58:31,31:47,4:d,5:u,10:x,12:g,13:f,14:p,15:y,18:T,25:m,35:q,37:A,39:_,41:b,42:S,48:k,50:F,51:P,52:C,53:L,54:v,60:I,61:E,63:D,64:z,65:w,66:K,67:U}),t(h,[2,39]),t(h,[2,40]),t(h,[2,41]),{36:[1,48]},{38:[1,49]},{40:[1,50]},t(h,[2,45]),t(h,[2,46]),{18:[1,51]},{4:d,5:u,10:x,12:g,13:f,14:p,15:y,43:52,58:31,60:I,61:E,63:D,64:z,65:w,66:K,67:U},{4:d,5:u,10:x,12:g,13:f,14:p,15:y,43:53,58:31,60:I,61:E,63:D,64:z,65:w,66:K,67:U},{4:d,5:u,10:x,12:g,13:f,14:p,15:y,43:54,58:31,60:I,61:E,63:D,64:z,65:w,66:K,67:U},{4:d,5:u,10:x,12:g,13:f,14:p,15:y,43:55,58:31,60:I,61:E,63:D,64:z,65:w,66:K,67:U},{4:d,5:u,10:x,12:g,13:f,14:p,15:y,43:56,58:31,60:I,61:E,63:D,64:z,65:w,66:K,67:U},{4:d,5:u,10:x,12:g,13:f,14:p,15:y,43:57,58:31,60:I,61:E,63:D,64:z,65:w,66:K,67:U},{4:d,5:u,8:N,10:x,12:g,13:f,14:p,15:y,18:R,44:[1,58],47:[1,59],58:61,59:60,63:D,64:z,65:w,66:K,67:U},t(B,[2,64]),t(B,[2,66]),t(B,[2,67]),t(B,[2,70]),t(B,[2,71]),t(B,[2,72]),t(B,[2,73]),t(B,[2,74]),t(B,[2,75]),t(B,[2,76]),t(B,[2,77]),t(B,[2,78]),t(B,[2,79]),t(B,[2,80]),t(B,[2,81]),t(o,[2,35]),t(h,[2,38]),t(h,[2,42]),t(h,[2,43]),t(h,[2,44]),{3:65,4:W,5:$,6:Q,7:O,8:X,9:H,10:M,11:Y,12:j,13:G,14:V,15:Z,21:64},t(h,[2,53],{59:60,58:61,4:d,5:u,8:N,10:x,12:g,13:f,14:p,15:y,18:R,49:[1,78],63:D,64:z,65:w,66:K,67:U}),t(h,[2,56],{59:60,58:61,4:d,5:u,8:N,10:x,12:g,13:f,14:p,15:y,18:R,49:[1,79],63:D,64:z,65:w,66:K,67:U}),t(h,[2,57],{59:60,58:61,4:d,5:u,8:N,10:x,12:g,13:f,14:p,15:y,18:R,63:D,64:z,65:w,66:K,67:U}),t(h,[2,58],{59:60,58:61,4:d,5:u,8:N,10:x,12:g,13:f,14:p,15:y,18:R,63:D,64:z,65:w,66:K,67:U}),t(h,[2,59],{59:60,58:61,4:d,5:u,8:N,10:x,12:g,13:f,14:p,15:y,18:R,63:D,64:z,65:w,66:K,67:U}),t(h,[2,60],{59:60,58:61,4:d,5:u,8:N,10:x,12:g,13:f,14:p,15:y,18:R,63:D,64:z,65:w,66:K,67:U}),{45:[1,80]},{44:[1,81]},t(B,[2,65]),t(B,[2,82]),t(B,[2,83]),t(B,[2,84]),{3:83,4:W,5:$,6:Q,7:O,8:X,9:H,10:M,11:Y,12:j,13:G,14:V,15:Z,18:[1,82]},t(J,[2,23]),t(J,[2,1]),t(J,[2,2]),t(J,[2,3]),t(J,[2,4]),t(J,[2,5]),t(J,[2,6]),t(J,[2,7]),t(J,[2,8]),t(J,[2,9]),t(J,[2,10]),t(J,[2,11]),t(J,[2,12]),t(h,[2,52],{58:31,43:84,4:d,5:u,10:x,12:g,13:f,14:p,15:y,60:I,61:E,63:D,64:z,65:w,66:K,67:U}),t(h,[2,55],{58:31,43:85,4:d,5:u,10:x,12:g,13:f,14:p,15:y,60:I,61:E,63:D,64:z,65:w,66:K,67:U}),{46:[1,86]},{45:[1,87]},{4:tt,5:et,6:it,8:at,11:nt,13:st,16:90,17:rt,18:ot,19:lt,20:ht,22:89,23:88},t(J,[2,24]),t(h,[2,51],{59:60,58:61,4:d,5:u,8:N,10:x,12:g,13:f,14:p,15:y,18:R,63:D,64:z,65:w,66:K,67:U}),t(h,[2,54],{59:60,58:61,4:d,5:u,8:N,10:x,12:g,13:f,14:p,15:y,18:R,63:D,64:z,65:w,66:K,67:U}),t(h,[2,47],{22:89,16:90,23:101,4:tt,5:et,6:it,8:at,11:nt,13:st,17:rt,18:ot,19:lt,20:ht}),{46:[1,102]},t(h,[2,29],{10:ct}),t(dt,[2,27],{16:104,4:tt,5:et,6:it,8:at,11:nt,13:st,17:rt,18:ot,19:lt,20:ht}),t(ut,[2,25]),t(ut,[2,13]),t(ut,[2,14]),t(ut,[2,15]),t(ut,[2,16]),t(ut,[2,17]),t(ut,[2,18]),t(ut,[2,19]),t(ut,[2,20]),t(ut,[2,21]),t(ut,[2,22]),t(h,[2,49],{10:ct}),t(h,[2,48],{22:89,16:90,23:105,4:tt,5:et,6:it,8:at,11:nt,13:st,17:rt,18:ot,19:lt,20:ht}),{4:tt,5:et,6:it,8:at,11:nt,13:st,16:90,17:rt,18:ot,19:lt,20:ht,22:106},t(ut,[2,26]),t(h,[2,50],{10:ct}),t(dt,[2,28],{16:104,4:tt,5:et,6:it,8:at,11:nt,13:st,17:rt,18:ot,19:lt,20:ht})],defaultActions:{8:[2,30],9:[2,31]},parseError:(0,s.K)(function(t,e){if(!e.recoverable){var i=new Error(t);throw i.hash=e,i}this.trace(t)},"parseError"),parse:(0,s.K)(function(t){var e=this,i=[0],a=[],n=[null],r=[],o=this.table,l="",h=0,c=0,d=0,u=r.slice.call(arguments,1),x=Object.create(this.lexer),g={yy:{}};for(var f in this.yy)Object.prototype.hasOwnProperty.call(this.yy,f)&&(g.yy[f]=this.yy[f]);x.setInput(t,g.yy),g.yy.lexer=x,g.yy.parser=this,void 0===x.yylloc&&(x.yylloc={});var p=x.yylloc;r.push(p);var y=x.options&&x.options.ranges;function T(){var t;return"number"!=typeof(t=a.pop()||x.lex()||1)&&(t instanceof Array&&(t=(a=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,s.K)(function(t){i.length=i.length-2*t,n.length=n.length-t,r.length=r.length-t},"popStack"),(0,s.K)(T,"lex");for(var m,q,A,_,b,S,k,F,P,C={};;){if(A=i[i.length-1],this.defaultActions[A]?_=this.defaultActions[A]:(null==m&&(m=T()),_=o[A]&&o[A][m]),void 0===_||!_.length||!_[0]){var L="";for(S in P=[],o[A])this.terminals_[S]&&S>2&&P.push("'"+this.terminals_[S]+"'");L=x.showPosition?"Parse error on line "+(h+1)+":\n"+x.showPosition()+"\nExpecting "+P.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(h+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(L,{text:x.match,token:this.terminals_[m]||m,line:x.yylineno,loc:p,expected:P})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+A+", token: "+m);switch(_[0]){case 1:i.push(m),n.push(x.yytext),r.push(x.yylloc),i.push(_[1]),m=null,q?(m=q,q=null):(c=x.yyleng,l=x.yytext,h=x.yylineno,p=x.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[_[1]][1],C.$=n[n.length-k],C._$={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},y&&(C._$.range=[r[r.length-(k||1)].range[0],r[r.length-1].range[1]]),void 0!==(b=this.performAction.apply(C,[l,c,h,g.yy,_[1],n,r].concat(u))))return b;k&&(i=i.slice(0,-1*k*2),n=n.slice(0,-1*k),r=r.slice(0,-1*k)),i.push(this.productions_[_[1]][0]),n.push(C.$),r.push(C._$),F=o[i[i.length-2]][i[i.length-1]],i.push(F);break;case 3:return!0}}return!0},"parse")},gt=function(){return{EOF:1,parseError:(0,s.K)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,s.K)(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:(0,s.K)(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:(0,s.K)(function(t){var e=t.length,i=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 a=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),i.length-1&&(this.yylineno-=i.length-1);var n=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:i?(i.length===a.length?this.yylloc.first_column:0)+a[a.length-i.length].length-i[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,s.K)(function(){return this._more=!0,this},"more"),reject:(0,s.K)(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:(0,s.K)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,s.K)(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:(0,s.K)(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:(0,s.K)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,s.K)(function(t,e){var i,a,n;if(this.options.backtrack_lexer&&(n={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&&(n.yylloc.range=this.yylloc.range.slice(0))),(a=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=a.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:a?a[a.length-1].length-a[a.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],i=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack){for(var s in n)this[s]=n[s];return!1}return!1},"test_match"),next:(0,s.K)(function(){if(this.done)return this.EOF;var t,e,i,a;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),s=0;s<n.length;s++)if((i=this._input.match(this.rules[n[s]]))&&(!e||i[0].length>e[0].length)){if(e=i,a=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(i,n[s])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[a]))&&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:(0,s.K)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,s.K)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,s.K)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,s.K)(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:(0,s.K)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,s.K)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,s.K)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,s.K)(function(t,e,i,a){switch(i){case 0:case 1:case 3:break;case 2:return 55;case 4:return this.begin("title"),35;case 5:return this.popState(),"title_value";case 6:return this.begin("acc_title"),37;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),39;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:case 23:case 25:case 31:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 48;case 14:return 50;case 15:return 49;case 16:return 51;case 17:return 52;case 18:return 53;case 19:return 54;case 20:return 25;case 21:this.begin("md_string");break;case 22:return"MD_STR";case 24:this.begin("string");break;case 26:return"STR";case 27:this.begin("class_name");break;case 28:return this.popState(),47;case 29:return this.begin("point_start"),44;case 30:return this.begin("point_x"),45;case 32:this.popState(),this.begin("point_y");break;case 33:return this.popState(),46;case 34:return 28;case 35:return 4;case 36:return 15;case 37:return 11;case 38:return 64;case 39:return 10;case 40:case 41:return 65;case 42:return 14;case 43:return 13;case 44:return 67;case 45:return 66;case 46:return 12;case 47:return 8;case 48:return 5;case 49:return 18;case 50:return 56;case 51:return 63;case 52:return 57}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?: *x-axis *)/i,/^(?: *y-axis *)/i,/^(?: *--+> *)/i,/^(?: *quadrant-1 *)/i,/^(?: *quadrant-2 *)/i,/^(?: *quadrant-3 *)/i,/^(?: *quadrant-4 *)/i,/^(?:classDef\b)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?::::)/i,/^(?:^\w+)/i,/^(?:\s*:\s*\[\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?:\s*\] *)/i,/^(?:\s*,\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?: *quadrantChart *)/i,/^(?:[A-Za-z]+)/i,/^(?:[^\x00-\x7F]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s)/i,/^(?:;)/i,/^(?:[!"#$%&'*+,-.`?\\_/])/i,/^(?:$)/i],conditions:{class_name:{rules:[28],inclusive:!1},point_y:{rules:[33],inclusive:!1},point_x:{rules:[32],inclusive:!1},point_start:{rules:[30,31],inclusive:!1},acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},title:{rules:[5],inclusive:!1},md_string:{rules:[22,23],inclusive:!1},string:{rules:[25,26],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,6,8,10,13,14,15,16,17,18,19,20,21,24,27,29,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],inclusive:!0}}}}();function ft(){this.yy={}}return xt.lexer=gt,(0,s.K)(ft,"Parser"),ft.prototype=xt,xt.Parser=ft,new ft}();o.parser=o;var l=o,h=(0,a.P$)(),c=class{constructor(){this.classes=new Map,this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}static{(0,s.K)(this,"QuadrantBuilder")}getDefaultData(){return{titleText:"",quadrant1Text:"",quadrant2Text:"",quadrant3Text:"",quadrant4Text:"",xAxisLeftText:"",xAxisRightText:"",yAxisBottomText:"",yAxisTopText:"",points:[]}}getDefaultConfig(){return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:a.UI.quadrantChart?.chartWidth||500,chartWidth:a.UI.quadrantChart?.chartHeight||500,titlePadding:a.UI.quadrantChart?.titlePadding||10,titleFontSize:a.UI.quadrantChart?.titleFontSize||20,quadrantPadding:a.UI.quadrantChart?.quadrantPadding||5,xAxisLabelPadding:a.UI.quadrantChart?.xAxisLabelPadding||5,yAxisLabelPadding:a.UI.quadrantChart?.yAxisLabelPadding||5,xAxisLabelFontSize:a.UI.quadrantChart?.xAxisLabelFontSize||16,yAxisLabelFontSize:a.UI.quadrantChart?.yAxisLabelFontSize||16,quadrantLabelFontSize:a.UI.quadrantChart?.quadrantLabelFontSize||16,quadrantTextTopPadding:a.UI.quadrantChart?.quadrantTextTopPadding||5,pointTextPadding:a.UI.quadrantChart?.pointTextPadding||5,pointLabelFontSize:a.UI.quadrantChart?.pointLabelFontSize||12,pointRadius:a.UI.quadrantChart?.pointRadius||5,xAxisPosition:a.UI.quadrantChart?.xAxisPosition||"top",yAxisPosition:a.UI.quadrantChart?.yAxisPosition||"left",quadrantInternalBorderStrokeWidth:a.UI.quadrantChart?.quadrantInternalBorderStrokeWidth||1,quadrantExternalBorderStrokeWidth:a.UI.quadrantChart?.quadrantExternalBorderStrokeWidth||2}}getDefaultThemeConfig(){return{quadrant1Fill:h.quadrant1Fill,quadrant2Fill:h.quadrant2Fill,quadrant3Fill:h.quadrant3Fill,quadrant4Fill:h.quadrant4Fill,quadrant1TextFill:h.quadrant1TextFill,quadrant2TextFill:h.quadrant2TextFill,quadrant3TextFill:h.quadrant3TextFill,quadrant4TextFill:h.quadrant4TextFill,quadrantPointFill:h.quadrantPointFill,quadrantPointTextFill:h.quadrantPointTextFill,quadrantXAxisTextFill:h.quadrantXAxisTextFill,quadrantYAxisTextFill:h.quadrantYAxisTextFill,quadrantTitleFill:h.quadrantTitleFill,quadrantInternalBorderStrokeFill:h.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:h.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,n.R.info("clear called")}setData(t){this.data={...this.data,...t}}addPoints(t){this.data.points=[...t,...this.data.points]}addClass(t,e){this.classes.set(t,e)}setConfig(t){n.R.trace("setConfig called with: ",t),this.config={...this.config,...t}}setThemeConfig(t){n.R.trace("setThemeConfig called with: ",t),this.themeConfig={...this.themeConfig,...t}}calculateSpace(t,e,i,a){const n=2*this.config.xAxisLabelPadding+this.config.xAxisLabelFontSize,s={top:"top"===t&&e?n:0,bottom:"bottom"===t&&e?n:0},r=2*this.config.yAxisLabelPadding+this.config.yAxisLabelFontSize,o={left:"left"===this.config.yAxisPosition&&i?r:0,right:"right"===this.config.yAxisPosition&&i?r:0},l=this.config.titleFontSize+2*this.config.titlePadding,h={top:a?l:0},c=this.config.quadrantPadding+o.left,d=this.config.quadrantPadding+s.top+h.top,u=this.config.chartWidth-2*this.config.quadrantPadding-o.left-o.right,x=this.config.chartHeight-2*this.config.quadrantPadding-s.top-s.bottom-h.top;return{xAxisSpace:s,yAxisSpace:o,titleSpace:h,quadrantSpace:{quadrantLeft:c,quadrantTop:d,quadrantWidth:u,quadrantHalfWidth:u/2,quadrantHeight:x,quadrantHalfHeight:x/2}}}getAxisLabels(t,e,i,a){const{quadrantSpace:n,titleSpace:s}=a,{quadrantHalfHeight:r,quadrantHeight:o,quadrantLeft:l,quadrantHalfWidth:h,quadrantTop:c,quadrantWidth:d}=n,u=Boolean(this.data.xAxisRightText),x=Boolean(this.data.yAxisTopText),g=[];return this.data.xAxisLeftText&&e&&g.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:l+(u?h/2:0),y:"top"===t?this.config.xAxisLabelPadding+s.top:this.config.xAxisLabelPadding+c+o+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:u?"center":"left",horizontalPos:"top",rotation:0}),this.data.xAxisRightText&&e&&g.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:l+h+(u?h/2:0),y:"top"===t?this.config.xAxisLabelPadding+s.top:this.config.xAxisLabelPadding+c+o+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:u?"center":"left",horizontalPos:"top",rotation:0}),this.data.yAxisBottomText&&i&&g.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:"left"===this.config.yAxisPosition?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+l+d+this.config.quadrantPadding,y:c+o-(x?r/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:x?"center":"left",horizontalPos:"top",rotation:-90}),this.data.yAxisTopText&&i&&g.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:"left"===this.config.yAxisPosition?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+l+d+this.config.quadrantPadding,y:c+r-(x?r/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:x?"center":"left",horizontalPos:"top",rotation:-90}),g}getQuadrants(t){const{quadrantSpace:e}=t,{quadrantHalfHeight:i,quadrantLeft:a,quadrantHalfWidth:n,quadrantTop:s}=e,r=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:a+n,y:s,width:n,height:i,fill:this.themeConfig.quadrant1Fill},{text:{text:this.data.quadrant2Text,fill:this.themeConfig.quadrant2TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:a,y:s,width:n,height:i,fill:this.themeConfig.quadrant2Fill},{text:{text:this.data.quadrant3Text,fill:this.themeConfig.quadrant3TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:a,y:s+i,width:n,height:i,fill:this.themeConfig.quadrant3Fill},{text:{text:this.data.quadrant4Text,fill:this.themeConfig.quadrant4TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:a+n,y:s+i,width:n,height:i,fill:this.themeConfig.quadrant4Fill}];for(const t of r)t.text.x=t.x+t.width/2,0===this.data.points.length?(t.text.y=t.y+t.height/2,t.text.horizontalPos="middle"):(t.text.y=t.y+this.config.quadrantTextTopPadding,t.text.horizontalPos="top");return r}getQuadrantPoints(t){const{quadrantSpace:e}=t,{quadrantHeight:i,quadrantLeft:a,quadrantTop:n,quadrantWidth:s}=e,o=(0,r.m4Y)().domain([0,1]).range([a,s+a]),l=(0,r.m4Y)().domain([0,1]).range([i+n,n]);return this.data.points.map(t=>{const e=this.classes.get(t.className);e&&(t={...e,...t});return{x:o(t.x),y:l(t.y),fill:t.color??this.themeConfig.quadrantPointFill,radius:t.radius??this.config.pointRadius,text:{text:t.text,fill:this.themeConfig.quadrantPointTextFill,x:o(t.x),y:l(t.y)+this.config.pointTextPadding,verticalPos:"center",horizontalPos:"top",fontSize:this.config.pointLabelFontSize,rotation:0},strokeColor:t.strokeColor??this.themeConfig.quadrantPointFill,strokeWidth:t.strokeWidth??"0px"}})}getBorders(t){const e=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantSpace:i}=t,{quadrantHalfHeight:a,quadrantHeight:n,quadrantLeft:s,quadrantHalfWidth:r,quadrantTop:o,quadrantWidth:l}=i;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:s-e,y1:o,x2:s+l+e,y2:o},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:s+l,y1:o+e,x2:s+l,y2:o+n-e},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:s-e,y1:o+n,x2:s+l+e,y2:o+n},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:s,y1:o+e,x2:s,y2:o+n-e},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:s+r,y1:o+e,x2:s+r,y2:o+n-e},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:s+e,y1:o+a,x2:s+l-e,y2:o+a}]}getTitle(t){if(t)return{text:this.data.titleText,fill:this.themeConfig.quadrantTitleFill,fontSize:this.config.titleFontSize,horizontalPos:"top",verticalPos:"center",rotation:0,y:this.config.titlePadding,x:this.config.chartWidth/2}}build(){const t=this.config.showXAxis&&!(!this.data.xAxisLeftText&&!this.data.xAxisRightText),e=this.config.showYAxis&&!(!this.data.yAxisTopText&&!this.data.yAxisBottomText),i=this.config.showTitle&&!!this.data.titleText,a=this.data.points.length>0?"bottom":this.config.xAxisPosition,n=this.calculateSpace(a,t,e,i);return{points:this.getQuadrantPoints(n),quadrants:this.getQuadrants(n),axisLabels:this.getAxisLabels(a,t,e,n),borderLines:this.getBorders(n),title:this.getTitle(i)}}},d=class extends Error{static{(0,s.K)(this,"InvalidStyleError")}constructor(t,e,i){super(`value for ${t} ${e} is invalid, please use a valid ${i}`),this.name="InvalidStyleError"}};function u(t){return!/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(t)}function x(t){return!/^\d+$/.test(t)}function g(t){return!/^\d+px$/.test(t)}function f(t){return(0,a.jZ)(t.trim(),(0,a.D7)())}(0,s.K)(u,"validateHexCode"),(0,s.K)(x,"validateNumber"),(0,s.K)(g,"validateSizeInPixels"),(0,s.K)(f,"textSanitizer");var p=new c;function y(t){p.setData({quadrant1Text:f(t.text)})}function T(t){p.setData({quadrant2Text:f(t.text)})}function m(t){p.setData({quadrant3Text:f(t.text)})}function q(t){p.setData({quadrant4Text:f(t.text)})}function A(t){p.setData({xAxisLeftText:f(t.text)})}function _(t){p.setData({xAxisRightText:f(t.text)})}function b(t){p.setData({yAxisTopText:f(t.text)})}function S(t){p.setData({yAxisBottomText:f(t.text)})}function k(t){const e={};for(const i of t){const[t,a]=i.trim().split(/\s*:\s*/);if("radius"===t){if(x(a))throw new d(t,a,"number");e.radius=parseInt(a)}else if("color"===t){if(u(a))throw new d(t,a,"hex code");e.color=a}else if("stroke-color"===t){if(u(a))throw new d(t,a,"hex code");e.strokeColor=a}else{if("stroke-width"!==t)throw new Error(`style named ${t} is not supported.`);if(g(a))throw new d(t,a,"number of pixels (eg. 10px)");e.strokeWidth=a}}return e}function F(t,e,i,a,n){const s=k(n);p.addPoints([{x:i,y:a,text:f(t.text),className:e,...s}])}function P(t,e){p.addClass(t,k(e))}function C(t){p.setConfig({chartWidth:t})}function L(t){p.setConfig({chartHeight:t})}function v(){const t=(0,a.D7)(),{themeVariables:e,quadrantChart:i}=t;return i&&p.setConfig(i),p.setThemeConfig({quadrant1Fill:e.quadrant1Fill,quadrant2Fill:e.quadrant2Fill,quadrant3Fill:e.quadrant3Fill,quadrant4Fill:e.quadrant4Fill,quadrant1TextFill:e.quadrant1TextFill,quadrant2TextFill:e.quadrant2TextFill,quadrant3TextFill:e.quadrant3TextFill,quadrant4TextFill:e.quadrant4TextFill,quadrantPointFill:e.quadrantPointFill,quadrantPointTextFill:e.quadrantPointTextFill,quadrantXAxisTextFill:e.quadrantXAxisTextFill,quadrantYAxisTextFill:e.quadrantYAxisTextFill,quadrantExternalBorderStrokeFill:e.quadrantExternalBorderStrokeFill,quadrantInternalBorderStrokeFill:e.quadrantInternalBorderStrokeFill,quadrantTitleFill:e.quadrantTitleFill}),p.setData({titleText:(0,a.ab)()}),p.build()}(0,s.K)(y,"setQuadrant1Text"),(0,s.K)(T,"setQuadrant2Text"),(0,s.K)(m,"setQuadrant3Text"),(0,s.K)(q,"setQuadrant4Text"),(0,s.K)(A,"setXAxisLeftText"),(0,s.K)(_,"setXAxisRightText"),(0,s.K)(b,"setYAxisTopText"),(0,s.K)(S,"setYAxisBottomText"),(0,s.K)(k,"parseStyles"),(0,s.K)(F,"addPoint"),(0,s.K)(P,"addClass"),(0,s.K)(C,"setWidth"),(0,s.K)(L,"setHeight"),(0,s.K)(v,"getQuadrantData");var I={parser:l,db:{setWidth:C,setHeight:L,setQuadrant1Text:y,setQuadrant2Text:T,setQuadrant3Text:m,setQuadrant4Text:q,setXAxisLeftText:A,setXAxisRightText:_,setYAxisTopText:b,setYAxisBottomText:S,parseStyles:k,addPoint:F,addClass:P,getQuadrantData:v,clear:(0,s.K)(function(){p.clear(),(0,a.IU)()},"clear"),setAccTitle:a.SV,getAccTitle:a.iN,setDiagramTitle:a.ke,getDiagramTitle:a.ab,getAccDescription:a.m7,setAccDescription:a.EI},renderer:{draw:(0,s.K)((t,e,i,o)=>{function l(t){return"top"===t?"hanging":"middle"}function h(t){return"left"===t?"start":"middle"}function c(t){return`translate(${t.x}, ${t.y}) rotate(${t.rotation||0})`}(0,s.K)(l,"getDominantBaseLine"),(0,s.K)(h,"getTextAnchor"),(0,s.K)(c,"getTransformation");const d=(0,a.D7)();n.R.debug("Rendering quadrant chart\n"+t);const u=d.securityLevel;let x;"sandbox"===u&&(x=(0,r.Ltv)("#i"+e));const g=("sandbox"===u?(0,r.Ltv)(x.nodes()[0].contentDocument.body):(0,r.Ltv)("body")).select(`[id="${e}"]`),f=g.append("g").attr("class","main"),p=d.quadrantChart?.chartWidth??500,y=d.quadrantChart?.chartHeight??500;(0,a.a$)(g,y,p,d.quadrantChart?.useMaxWidth??!0),g.attr("viewBox","0 0 "+p+" "+y),o.db.setHeight(y),o.db.setWidth(p);const T=o.db.getQuadrantData(),m=f.append("g").attr("class","quadrants"),q=f.append("g").attr("class","border"),A=f.append("g").attr("class","data-points"),_=f.append("g").attr("class","labels"),b=f.append("g").attr("class","title");T.title&&b.append("text").attr("x",0).attr("y",0).attr("fill",T.title.fill).attr("font-size",T.title.fontSize).attr("dominant-baseline",l(T.title.horizontalPos)).attr("text-anchor",h(T.title.verticalPos)).attr("transform",c(T.title)).text(T.title.text),T.borderLines&&q.selectAll("line").data(T.borderLines).enter().append("line").attr("x1",t=>t.x1).attr("y1",t=>t.y1).attr("x2",t=>t.x2).attr("y2",t=>t.y2).style("stroke",t=>t.strokeFill).style("stroke-width",t=>t.strokeWidth);const S=m.selectAll("g.quadrant").data(T.quadrants).enter().append("g").attr("class","quadrant");S.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),S.append("text").attr("x",0).attr("y",0).attr("fill",t=>t.text.fill).attr("font-size",t=>t.text.fontSize).attr("dominant-baseline",t=>l(t.text.horizontalPos)).attr("text-anchor",t=>h(t.text.verticalPos)).attr("transform",t=>c(t.text)).text(t=>t.text.text);_.selectAll("g.label").data(T.axisLabels).enter().append("g").attr("class","label").append("text").attr("x",0).attr("y",0).text(t=>t.text).attr("fill",t=>t.fill).attr("font-size",t=>t.fontSize).attr("dominant-baseline",t=>l(t.horizontalPos)).attr("text-anchor",t=>h(t.verticalPos)).attr("transform",t=>c(t));const k=A.selectAll("g.data-point").data(T.points).enter().append("g").attr("class","data-point");k.append("circle").attr("cx",t=>t.x).attr("cy",t=>t.y).attr("r",t=>t.radius).attr("fill",t=>t.fill).attr("stroke",t=>t.strokeColor).attr("stroke-width",t=>t.strokeWidth),k.append("text").attr("x",0).attr("y",0).text(t=>t.text.text).attr("fill",t=>t.text.fill).attr("font-size",t=>t.text.fontSize).attr("dominant-baseline",t=>l(t.text.horizontalPos)).attr("text-anchor",t=>h(t.text.verticalPos)).attr("transform",t=>c(t.text))},"draw")},styles:(0,s.K)(()=>"","styles")}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[7486],{87486(t,e,i){i.d(e,{diagram:()=>I});var a=i(86535),n=i(31293),s=i(86827),r=i(51444),o=function(){var t=(0,s.K)(function(t,e,i,a){for(i=i||{},a=t.length;a--;i[t[a]]=e);return i},"o"),e=[1,3],i=[1,4],a=[1,5],n=[1,6],r=[1,7],o=[1,4,5,10,12,13,14,15,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],l=[1,4,5,10,12,13,14,15,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],h=[55,56,57],c=[2,36],d=[1,37],u=[1,36],x=[1,38],g=[1,35],f=[1,43],p=[1,41],y=[1,45],T=[1,14],m=[1,23],q=[1,18],A=[1,19],_=[1,20],b=[1,21],S=[1,22],k=[1,24],F=[1,25],P=[1,26],C=[1,27],L=[1,28],v=[1,29],I=[1,32],E=[1,33],D=[1,34],z=[1,39],w=[1,40],K=[1,42],U=[1,44],N=[1,63],R=[1,62],B=[4,5,8,10,12,13,14,15,18,44,47,49,55,56,57,63,64,65,66,67],W=[1,66],$=[1,67],Q=[1,68],O=[1,69],X=[1,70],H=[1,71],M=[1,72],Y=[1,73],j=[1,74],G=[1,75],V=[1,76],Z=[1,77],J=[4,5,6,7,8,9,10,11,12,13,14,15,18],tt=[1,91],et=[1,92],it=[1,93],at=[1,100],nt=[1,94],st=[1,97],rt=[1,95],ot=[1,96],lt=[1,98],ht=[1,99],ct=[1,103],dt=[10,55,56,57],ut=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],xt={trace:(0,s.K)(function(){},"trace"),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:"error",4:"ALPHA",5:"NUM",6:"NODE_STRING",7:"DOWN",8:"MINUS",9:"DEFAULT",10:"COMMA",11:"COLON",12:"AMP",13:"BRKT",14:"MULT",15:"UNICODE_TEXT",17:"UNIT",18:"SPACE",19:"STYLE",20:"PCT",25:"CLASSDEF",28:"QUADRANT",35:"title",36:"title_value",37:"acc_title",38:"acc_title_value",39:"acc_descr",40:"acc_descr_value",41:"acc_descr_multiline_value",42:"section",44:"point_start",45:"point_x",46:"point_y",47:"class_name",48:"X-AXIS",49:"AXIS-TEXT-DELIMITER",50:"Y-AXIS",51:"QUADRANT_1",52:"QUADRANT_2",53:"QUADRANT_3",54:"QUADRANT_4",55:"NEWLINE",56:"SEMI",57:"EOF",60:"STR",61:"MD_STR",63:"PUNCTUATION",64:"PLUS",65:"EQUALS",66:"DOT",67:"UNDERSCORE"},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:(0,s.K)(function(t,e,i,a,n,s,r){var o=s.length-1;switch(n){case 23:case 68:this.$=s[o];break;case 24:case 69:this.$=s[o-1]+""+s[o];break;case 26:this.$=s[o-1]+s[o];break;case 27:this.$=[s[o].trim()];break;case 28:s[o-2].push(s[o].trim()),this.$=s[o-2];break;case 29:this.$=s[o-4],a.addClass(s[o-2],s[o]);break;case 37:this.$=[];break;case 42:this.$=s[o].trim(),a.setDiagramTitle(this.$);break;case 43:this.$=s[o].trim(),a.setAccTitle(this.$);break;case 44:case 45:this.$=s[o].trim(),a.setAccDescription(this.$);break;case 46:a.addSection(s[o].substr(8)),this.$=s[o].substr(8);break;case 47:a.addPoint(s[o-3],"",s[o-1],s[o],[]);break;case 48:a.addPoint(s[o-4],s[o-3],s[o-1],s[o],[]);break;case 49:a.addPoint(s[o-4],"",s[o-2],s[o-1],s[o]);break;case 50:a.addPoint(s[o-5],s[o-4],s[o-2],s[o-1],s[o]);break;case 51:a.setXAxisLeftText(s[o-2]),a.setXAxisRightText(s[o]);break;case 52:s[o-1].text+=" ⟶ ",a.setXAxisLeftText(s[o-1]);break;case 53:a.setXAxisLeftText(s[o]);break;case 54:a.setYAxisBottomText(s[o-2]),a.setYAxisTopText(s[o]);break;case 55:s[o-1].text+=" ⟶ ",a.setYAxisBottomText(s[o-1]);break;case 56:a.setYAxisBottomText(s[o]);break;case 57:a.setQuadrant1Text(s[o]);break;case 58:a.setQuadrant2Text(s[o]);break;case 59:a.setQuadrant3Text(s[o]);break;case 60:a.setQuadrant4Text(s[o]);break;case 64:case 66:this.$={text:s[o],type:"text"};break;case 65:this.$={text:s[o-1].text+""+s[o],type:s[o-1].type};break;case 67:this.$={text:s[o],type:"markdown"}}},"anonymous"),table:[{18:e,26:1,27:2,28:i,55:a,56:n,57:r},{1:[3]},{18:e,26:8,27:2,28:i,55:a,56:n,57:r},{18:e,26:9,27:2,28:i,55:a,56:n,57:r},t(o,[2,33],{29:10}),t(l,[2,61]),t(l,[2,62]),t(l,[2,63]),{1:[2,30]},{1:[2,31]},t(h,c,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:d,5:u,10:x,12:g,13:f,14:p,15:y,18:T,25:m,35:q,37:A,39:_,41:b,42:S,48:k,50:F,51:P,52:C,53:L,54:v,60:I,61:E,63:D,64:z,65:w,66:K,67:U}),t(o,[2,34]),{27:46,55:a,56:n,57:r},t(h,[2,37]),t(h,c,{24:13,32:15,33:16,34:17,43:30,58:31,31:47,4:d,5:u,10:x,12:g,13:f,14:p,15:y,18:T,25:m,35:q,37:A,39:_,41:b,42:S,48:k,50:F,51:P,52:C,53:L,54:v,60:I,61:E,63:D,64:z,65:w,66:K,67:U}),t(h,[2,39]),t(h,[2,40]),t(h,[2,41]),{36:[1,48]},{38:[1,49]},{40:[1,50]},t(h,[2,45]),t(h,[2,46]),{18:[1,51]},{4:d,5:u,10:x,12:g,13:f,14:p,15:y,43:52,58:31,60:I,61:E,63:D,64:z,65:w,66:K,67:U},{4:d,5:u,10:x,12:g,13:f,14:p,15:y,43:53,58:31,60:I,61:E,63:D,64:z,65:w,66:K,67:U},{4:d,5:u,10:x,12:g,13:f,14:p,15:y,43:54,58:31,60:I,61:E,63:D,64:z,65:w,66:K,67:U},{4:d,5:u,10:x,12:g,13:f,14:p,15:y,43:55,58:31,60:I,61:E,63:D,64:z,65:w,66:K,67:U},{4:d,5:u,10:x,12:g,13:f,14:p,15:y,43:56,58:31,60:I,61:E,63:D,64:z,65:w,66:K,67:U},{4:d,5:u,10:x,12:g,13:f,14:p,15:y,43:57,58:31,60:I,61:E,63:D,64:z,65:w,66:K,67:U},{4:d,5:u,8:N,10:x,12:g,13:f,14:p,15:y,18:R,44:[1,58],47:[1,59],58:61,59:60,63:D,64:z,65:w,66:K,67:U},t(B,[2,64]),t(B,[2,66]),t(B,[2,67]),t(B,[2,70]),t(B,[2,71]),t(B,[2,72]),t(B,[2,73]),t(B,[2,74]),t(B,[2,75]),t(B,[2,76]),t(B,[2,77]),t(B,[2,78]),t(B,[2,79]),t(B,[2,80]),t(B,[2,81]),t(o,[2,35]),t(h,[2,38]),t(h,[2,42]),t(h,[2,43]),t(h,[2,44]),{3:65,4:W,5:$,6:Q,7:O,8:X,9:H,10:M,11:Y,12:j,13:G,14:V,15:Z,21:64},t(h,[2,53],{59:60,58:61,4:d,5:u,8:N,10:x,12:g,13:f,14:p,15:y,18:R,49:[1,78],63:D,64:z,65:w,66:K,67:U}),t(h,[2,56],{59:60,58:61,4:d,5:u,8:N,10:x,12:g,13:f,14:p,15:y,18:R,49:[1,79],63:D,64:z,65:w,66:K,67:U}),t(h,[2,57],{59:60,58:61,4:d,5:u,8:N,10:x,12:g,13:f,14:p,15:y,18:R,63:D,64:z,65:w,66:K,67:U}),t(h,[2,58],{59:60,58:61,4:d,5:u,8:N,10:x,12:g,13:f,14:p,15:y,18:R,63:D,64:z,65:w,66:K,67:U}),t(h,[2,59],{59:60,58:61,4:d,5:u,8:N,10:x,12:g,13:f,14:p,15:y,18:R,63:D,64:z,65:w,66:K,67:U}),t(h,[2,60],{59:60,58:61,4:d,5:u,8:N,10:x,12:g,13:f,14:p,15:y,18:R,63:D,64:z,65:w,66:K,67:U}),{45:[1,80]},{44:[1,81]},t(B,[2,65]),t(B,[2,82]),t(B,[2,83]),t(B,[2,84]),{3:83,4:W,5:$,6:Q,7:O,8:X,9:H,10:M,11:Y,12:j,13:G,14:V,15:Z,18:[1,82]},t(J,[2,23]),t(J,[2,1]),t(J,[2,2]),t(J,[2,3]),t(J,[2,4]),t(J,[2,5]),t(J,[2,6]),t(J,[2,7]),t(J,[2,8]),t(J,[2,9]),t(J,[2,10]),t(J,[2,11]),t(J,[2,12]),t(h,[2,52],{58:31,43:84,4:d,5:u,10:x,12:g,13:f,14:p,15:y,60:I,61:E,63:D,64:z,65:w,66:K,67:U}),t(h,[2,55],{58:31,43:85,4:d,5:u,10:x,12:g,13:f,14:p,15:y,60:I,61:E,63:D,64:z,65:w,66:K,67:U}),{46:[1,86]},{45:[1,87]},{4:tt,5:et,6:it,8:at,11:nt,13:st,16:90,17:rt,18:ot,19:lt,20:ht,22:89,23:88},t(J,[2,24]),t(h,[2,51],{59:60,58:61,4:d,5:u,8:N,10:x,12:g,13:f,14:p,15:y,18:R,63:D,64:z,65:w,66:K,67:U}),t(h,[2,54],{59:60,58:61,4:d,5:u,8:N,10:x,12:g,13:f,14:p,15:y,18:R,63:D,64:z,65:w,66:K,67:U}),t(h,[2,47],{22:89,16:90,23:101,4:tt,5:et,6:it,8:at,11:nt,13:st,17:rt,18:ot,19:lt,20:ht}),{46:[1,102]},t(h,[2,29],{10:ct}),t(dt,[2,27],{16:104,4:tt,5:et,6:it,8:at,11:nt,13:st,17:rt,18:ot,19:lt,20:ht}),t(ut,[2,25]),t(ut,[2,13]),t(ut,[2,14]),t(ut,[2,15]),t(ut,[2,16]),t(ut,[2,17]),t(ut,[2,18]),t(ut,[2,19]),t(ut,[2,20]),t(ut,[2,21]),t(ut,[2,22]),t(h,[2,49],{10:ct}),t(h,[2,48],{22:89,16:90,23:105,4:tt,5:et,6:it,8:at,11:nt,13:st,17:rt,18:ot,19:lt,20:ht}),{4:tt,5:et,6:it,8:at,11:nt,13:st,16:90,17:rt,18:ot,19:lt,20:ht,22:106},t(ut,[2,26]),t(h,[2,50],{10:ct}),t(dt,[2,28],{16:104,4:tt,5:et,6:it,8:at,11:nt,13:st,17:rt,18:ot,19:lt,20:ht})],defaultActions:{8:[2,30],9:[2,31]},parseError:(0,s.K)(function(t,e){if(!e.recoverable){var i=new Error(t);throw i.hash=e,i}this.trace(t)},"parseError"),parse:(0,s.K)(function(t){var e=this,i=[0],a=[],n=[null],r=[],o=this.table,l="",h=0,c=0,d=0,u=r.slice.call(arguments,1),x=Object.create(this.lexer),g={yy:{}};for(var f in this.yy)Object.prototype.hasOwnProperty.call(this.yy,f)&&(g.yy[f]=this.yy[f]);x.setInput(t,g.yy),g.yy.lexer=x,g.yy.parser=this,void 0===x.yylloc&&(x.yylloc={});var p=x.yylloc;r.push(p);var y=x.options&&x.options.ranges;function T(){var t;return"number"!=typeof(t=a.pop()||x.lex()||1)&&(t instanceof Array&&(t=(a=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,s.K)(function(t){i.length=i.length-2*t,n.length=n.length-t,r.length=r.length-t},"popStack"),(0,s.K)(T,"lex");for(var m,q,A,_,b,S,k,F,P,C={};;){if(A=i[i.length-1],this.defaultActions[A]?_=this.defaultActions[A]:(null==m&&(m=T()),_=o[A]&&o[A][m]),void 0===_||!_.length||!_[0]){var L="";for(S in P=[],o[A])this.terminals_[S]&&S>2&&P.push("'"+this.terminals_[S]+"'");L=x.showPosition?"Parse error on line "+(h+1)+":\n"+x.showPosition()+"\nExpecting "+P.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(h+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(L,{text:x.match,token:this.terminals_[m]||m,line:x.yylineno,loc:p,expected:P})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+A+", token: "+m);switch(_[0]){case 1:i.push(m),n.push(x.yytext),r.push(x.yylloc),i.push(_[1]),m=null,q?(m=q,q=null):(c=x.yyleng,l=x.yytext,h=x.yylineno,p=x.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[_[1]][1],C.$=n[n.length-k],C._$={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},y&&(C._$.range=[r[r.length-(k||1)].range[0],r[r.length-1].range[1]]),void 0!==(b=this.performAction.apply(C,[l,c,h,g.yy,_[1],n,r].concat(u))))return b;k&&(i=i.slice(0,-1*k*2),n=n.slice(0,-1*k),r=r.slice(0,-1*k)),i.push(this.productions_[_[1]][0]),n.push(C.$),r.push(C._$),F=o[i[i.length-2]][i[i.length-1]],i.push(F);break;case 3:return!0}}return!0},"parse")},gt=function(){return{EOF:1,parseError:(0,s.K)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,s.K)(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:(0,s.K)(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:(0,s.K)(function(t){var e=t.length,i=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 a=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),i.length-1&&(this.yylineno-=i.length-1);var n=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:i?(i.length===a.length?this.yylloc.first_column:0)+a[a.length-i.length].length-i[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,s.K)(function(){return this._more=!0,this},"more"),reject:(0,s.K)(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:(0,s.K)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,s.K)(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:(0,s.K)(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:(0,s.K)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,s.K)(function(t,e){var i,a,n;if(this.options.backtrack_lexer&&(n={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&&(n.yylloc.range=this.yylloc.range.slice(0))),(a=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=a.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:a?a[a.length-1].length-a[a.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],i=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack){for(var s in n)this[s]=n[s];return!1}return!1},"test_match"),next:(0,s.K)(function(){if(this.done)return this.EOF;var t,e,i,a;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),s=0;s<n.length;s++)if((i=this._input.match(this.rules[n[s]]))&&(!e||i[0].length>e[0].length)){if(e=i,a=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(i,n[s])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[a]))&&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:(0,s.K)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,s.K)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,s.K)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,s.K)(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:(0,s.K)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,s.K)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,s.K)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,s.K)(function(t,e,i,a){switch(i){case 0:case 1:case 3:break;case 2:return 55;case 4:return this.begin("title"),35;case 5:return this.popState(),"title_value";case 6:return this.begin("acc_title"),37;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),39;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:case 23:case 25:case 31:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 48;case 14:return 50;case 15:return 49;case 16:return 51;case 17:return 52;case 18:return 53;case 19:return 54;case 20:return 25;case 21:this.begin("md_string");break;case 22:return"MD_STR";case 24:this.begin("string");break;case 26:return"STR";case 27:this.begin("class_name");break;case 28:return this.popState(),47;case 29:return this.begin("point_start"),44;case 30:return this.begin("point_x"),45;case 32:this.popState(),this.begin("point_y");break;case 33:return this.popState(),46;case 34:return 28;case 35:return 4;case 36:return 15;case 37:return 11;case 38:return 64;case 39:return 10;case 40:case 41:return 65;case 42:return 14;case 43:return 13;case 44:return 67;case 45:return 66;case 46:return 12;case 47:return 8;case 48:return 5;case 49:return 18;case 50:return 56;case 51:return 63;case 52:return 57}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?: *x-axis *)/i,/^(?: *y-axis *)/i,/^(?: *--+> *)/i,/^(?: *quadrant-1 *)/i,/^(?: *quadrant-2 *)/i,/^(?: *quadrant-3 *)/i,/^(?: *quadrant-4 *)/i,/^(?:classDef\b)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?::::)/i,/^(?:^\w+)/i,/^(?:\s*:\s*\[\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?:\s*\] *)/i,/^(?:\s*,\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?: *quadrantChart *)/i,/^(?:[A-Za-z]+)/i,/^(?:[^\x00-\x7F]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s)/i,/^(?:;)/i,/^(?:[!"#$%&'*+,-.`?\\_/])/i,/^(?:$)/i],conditions:{class_name:{rules:[28],inclusive:!1},point_y:{rules:[33],inclusive:!1},point_x:{rules:[32],inclusive:!1},point_start:{rules:[30,31],inclusive:!1},acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},title:{rules:[5],inclusive:!1},md_string:{rules:[22,23],inclusive:!1},string:{rules:[25,26],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,6,8,10,13,14,15,16,17,18,19,20,21,24,27,29,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],inclusive:!0}}}}();function ft(){this.yy={}}return xt.lexer=gt,(0,s.K)(ft,"Parser"),ft.prototype=xt,xt.Parser=ft,new ft}();o.parser=o;var l=o,h=(0,a.P$)(),c=class{constructor(){this.classes=new Map,this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}static{(0,s.K)(this,"QuadrantBuilder")}getDefaultData(){return{titleText:"",quadrant1Text:"",quadrant2Text:"",quadrant3Text:"",quadrant4Text:"",xAxisLeftText:"",xAxisRightText:"",yAxisBottomText:"",yAxisTopText:"",points:[]}}getDefaultConfig(){return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:a.UI.quadrantChart?.chartWidth||500,chartWidth:a.UI.quadrantChart?.chartHeight||500,titlePadding:a.UI.quadrantChart?.titlePadding||10,titleFontSize:a.UI.quadrantChart?.titleFontSize||20,quadrantPadding:a.UI.quadrantChart?.quadrantPadding||5,xAxisLabelPadding:a.UI.quadrantChart?.xAxisLabelPadding||5,yAxisLabelPadding:a.UI.quadrantChart?.yAxisLabelPadding||5,xAxisLabelFontSize:a.UI.quadrantChart?.xAxisLabelFontSize||16,yAxisLabelFontSize:a.UI.quadrantChart?.yAxisLabelFontSize||16,quadrantLabelFontSize:a.UI.quadrantChart?.quadrantLabelFontSize||16,quadrantTextTopPadding:a.UI.quadrantChart?.quadrantTextTopPadding||5,pointTextPadding:a.UI.quadrantChart?.pointTextPadding||5,pointLabelFontSize:a.UI.quadrantChart?.pointLabelFontSize||12,pointRadius:a.UI.quadrantChart?.pointRadius||5,xAxisPosition:a.UI.quadrantChart?.xAxisPosition||"top",yAxisPosition:a.UI.quadrantChart?.yAxisPosition||"left",quadrantInternalBorderStrokeWidth:a.UI.quadrantChart?.quadrantInternalBorderStrokeWidth||1,quadrantExternalBorderStrokeWidth:a.UI.quadrantChart?.quadrantExternalBorderStrokeWidth||2}}getDefaultThemeConfig(){return{quadrant1Fill:h.quadrant1Fill,quadrant2Fill:h.quadrant2Fill,quadrant3Fill:h.quadrant3Fill,quadrant4Fill:h.quadrant4Fill,quadrant1TextFill:h.quadrant1TextFill,quadrant2TextFill:h.quadrant2TextFill,quadrant3TextFill:h.quadrant3TextFill,quadrant4TextFill:h.quadrant4TextFill,quadrantPointFill:h.quadrantPointFill,quadrantPointTextFill:h.quadrantPointTextFill,quadrantXAxisTextFill:h.quadrantXAxisTextFill,quadrantYAxisTextFill:h.quadrantYAxisTextFill,quadrantTitleFill:h.quadrantTitleFill,quadrantInternalBorderStrokeFill:h.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:h.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,n.R.info("clear called")}setData(t){this.data={...this.data,...t}}addPoints(t){this.data.points=[...t,...this.data.points]}addClass(t,e){this.classes.set(t,e)}setConfig(t){n.R.trace("setConfig called with: ",t),this.config={...this.config,...t}}setThemeConfig(t){n.R.trace("setThemeConfig called with: ",t),this.themeConfig={...this.themeConfig,...t}}calculateSpace(t,e,i,a){const n=2*this.config.xAxisLabelPadding+this.config.xAxisLabelFontSize,s={top:"top"===t&&e?n:0,bottom:"bottom"===t&&e?n:0},r=2*this.config.yAxisLabelPadding+this.config.yAxisLabelFontSize,o={left:"left"===this.config.yAxisPosition&&i?r:0,right:"right"===this.config.yAxisPosition&&i?r:0},l=this.config.titleFontSize+2*this.config.titlePadding,h={top:a?l:0},c=this.config.quadrantPadding+o.left,d=this.config.quadrantPadding+s.top+h.top,u=this.config.chartWidth-2*this.config.quadrantPadding-o.left-o.right,x=this.config.chartHeight-2*this.config.quadrantPadding-s.top-s.bottom-h.top;return{xAxisSpace:s,yAxisSpace:o,titleSpace:h,quadrantSpace:{quadrantLeft:c,quadrantTop:d,quadrantWidth:u,quadrantHalfWidth:u/2,quadrantHeight:x,quadrantHalfHeight:x/2}}}getAxisLabels(t,e,i,a){const{quadrantSpace:n,titleSpace:s}=a,{quadrantHalfHeight:r,quadrantHeight:o,quadrantLeft:l,quadrantHalfWidth:h,quadrantTop:c,quadrantWidth:d}=n,u=Boolean(this.data.xAxisRightText),x=Boolean(this.data.yAxisTopText),g=[];return this.data.xAxisLeftText&&e&&g.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:l+(u?h/2:0),y:"top"===t?this.config.xAxisLabelPadding+s.top:this.config.xAxisLabelPadding+c+o+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:u?"center":"left",horizontalPos:"top",rotation:0}),this.data.xAxisRightText&&e&&g.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:l+h+(u?h/2:0),y:"top"===t?this.config.xAxisLabelPadding+s.top:this.config.xAxisLabelPadding+c+o+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:u?"center":"left",horizontalPos:"top",rotation:0}),this.data.yAxisBottomText&&i&&g.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:"left"===this.config.yAxisPosition?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+l+d+this.config.quadrantPadding,y:c+o-(x?r/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:x?"center":"left",horizontalPos:"top",rotation:-90}),this.data.yAxisTopText&&i&&g.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:"left"===this.config.yAxisPosition?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+l+d+this.config.quadrantPadding,y:c+r-(x?r/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:x?"center":"left",horizontalPos:"top",rotation:-90}),g}getQuadrants(t){const{quadrantSpace:e}=t,{quadrantHalfHeight:i,quadrantLeft:a,quadrantHalfWidth:n,quadrantTop:s}=e,r=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:a+n,y:s,width:n,height:i,fill:this.themeConfig.quadrant1Fill},{text:{text:this.data.quadrant2Text,fill:this.themeConfig.quadrant2TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:a,y:s,width:n,height:i,fill:this.themeConfig.quadrant2Fill},{text:{text:this.data.quadrant3Text,fill:this.themeConfig.quadrant3TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:a,y:s+i,width:n,height:i,fill:this.themeConfig.quadrant3Fill},{text:{text:this.data.quadrant4Text,fill:this.themeConfig.quadrant4TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:a+n,y:s+i,width:n,height:i,fill:this.themeConfig.quadrant4Fill}];for(const t of r)t.text.x=t.x+t.width/2,0===this.data.points.length?(t.text.y=t.y+t.height/2,t.text.horizontalPos="middle"):(t.text.y=t.y+this.config.quadrantTextTopPadding,t.text.horizontalPos="top");return r}getQuadrantPoints(t){const{quadrantSpace:e}=t,{quadrantHeight:i,quadrantLeft:a,quadrantTop:n,quadrantWidth:s}=e,o=(0,r.m4Y)().domain([0,1]).range([a,s+a]),l=(0,r.m4Y)().domain([0,1]).range([i+n,n]);return this.data.points.map(t=>{const e=this.classes.get(t.className);e&&(t={...e,...t});return{x:o(t.x),y:l(t.y),fill:t.color??this.themeConfig.quadrantPointFill,radius:t.radius??this.config.pointRadius,text:{text:t.text,fill:this.themeConfig.quadrantPointTextFill,x:o(t.x),y:l(t.y)+this.config.pointTextPadding,verticalPos:"center",horizontalPos:"top",fontSize:this.config.pointLabelFontSize,rotation:0},strokeColor:t.strokeColor??this.themeConfig.quadrantPointFill,strokeWidth:t.strokeWidth??"0px"}})}getBorders(t){const e=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantSpace:i}=t,{quadrantHalfHeight:a,quadrantHeight:n,quadrantLeft:s,quadrantHalfWidth:r,quadrantTop:o,quadrantWidth:l}=i;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:s-e,y1:o,x2:s+l+e,y2:o},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:s+l,y1:o+e,x2:s+l,y2:o+n-e},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:s-e,y1:o+n,x2:s+l+e,y2:o+n},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:s,y1:o+e,x2:s,y2:o+n-e},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:s+r,y1:o+e,x2:s+r,y2:o+n-e},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:s+e,y1:o+a,x2:s+l-e,y2:o+a}]}getTitle(t){if(t)return{text:this.data.titleText,fill:this.themeConfig.quadrantTitleFill,fontSize:this.config.titleFontSize,horizontalPos:"top",verticalPos:"center",rotation:0,y:this.config.titlePadding,x:this.config.chartWidth/2}}build(){const t=this.config.showXAxis&&!(!this.data.xAxisLeftText&&!this.data.xAxisRightText),e=this.config.showYAxis&&!(!this.data.yAxisTopText&&!this.data.yAxisBottomText),i=this.config.showTitle&&!!this.data.titleText,a=this.data.points.length>0?"bottom":this.config.xAxisPosition,n=this.calculateSpace(a,t,e,i);return{points:this.getQuadrantPoints(n),quadrants:this.getQuadrants(n),axisLabels:this.getAxisLabels(a,t,e,n),borderLines:this.getBorders(n),title:this.getTitle(i)}}},d=class extends Error{static{(0,s.K)(this,"InvalidStyleError")}constructor(t,e,i){super(`value for ${t} ${e} is invalid, please use a valid ${i}`),this.name="InvalidStyleError"}};function u(t){return!/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(t)}function x(t){return!/^\d+$/.test(t)}function g(t){return!/^\d+px$/.test(t)}function f(t){return(0,a.jZ)(t.trim(),(0,a.D7)())}(0,s.K)(u,"validateHexCode"),(0,s.K)(x,"validateNumber"),(0,s.K)(g,"validateSizeInPixels"),(0,s.K)(f,"textSanitizer");var p=new c;function y(t){p.setData({quadrant1Text:f(t.text)})}function T(t){p.setData({quadrant2Text:f(t.text)})}function m(t){p.setData({quadrant3Text:f(t.text)})}function q(t){p.setData({quadrant4Text:f(t.text)})}function A(t){p.setData({xAxisLeftText:f(t.text)})}function _(t){p.setData({xAxisRightText:f(t.text)})}function b(t){p.setData({yAxisTopText:f(t.text)})}function S(t){p.setData({yAxisBottomText:f(t.text)})}function k(t){const e={};for(const i of t){const[t,a]=i.trim().split(/\s*:\s*/);if("radius"===t){if(x(a))throw new d(t,a,"number");e.radius=parseInt(a)}else if("color"===t){if(u(a))throw new d(t,a,"hex code");e.color=a}else if("stroke-color"===t){if(u(a))throw new d(t,a,"hex code");e.strokeColor=a}else{if("stroke-width"!==t)throw new Error(`style named ${t} is not supported.`);if(g(a))throw new d(t,a,"number of pixels (eg. 10px)");e.strokeWidth=a}}return e}function F(t,e,i,a,n){const s=k(n);p.addPoints([{x:i,y:a,text:f(t.text),className:e,...s}])}function P(t,e){p.addClass(t,k(e))}function C(t){p.setConfig({chartWidth:t})}function L(t){p.setConfig({chartHeight:t})}function v(){const t=(0,a.D7)(),{themeVariables:e,quadrantChart:i}=t;return i&&p.setConfig(i),p.setThemeConfig({quadrant1Fill:e.quadrant1Fill,quadrant2Fill:e.quadrant2Fill,quadrant3Fill:e.quadrant3Fill,quadrant4Fill:e.quadrant4Fill,quadrant1TextFill:e.quadrant1TextFill,quadrant2TextFill:e.quadrant2TextFill,quadrant3TextFill:e.quadrant3TextFill,quadrant4TextFill:e.quadrant4TextFill,quadrantPointFill:e.quadrantPointFill,quadrantPointTextFill:e.quadrantPointTextFill,quadrantXAxisTextFill:e.quadrantXAxisTextFill,quadrantYAxisTextFill:e.quadrantYAxisTextFill,quadrantExternalBorderStrokeFill:e.quadrantExternalBorderStrokeFill,quadrantInternalBorderStrokeFill:e.quadrantInternalBorderStrokeFill,quadrantTitleFill:e.quadrantTitleFill}),p.setData({titleText:(0,a.ab)()}),p.build()}(0,s.K)(y,"setQuadrant1Text"),(0,s.K)(T,"setQuadrant2Text"),(0,s.K)(m,"setQuadrant3Text"),(0,s.K)(q,"setQuadrant4Text"),(0,s.K)(A,"setXAxisLeftText"),(0,s.K)(_,"setXAxisRightText"),(0,s.K)(b,"setYAxisTopText"),(0,s.K)(S,"setYAxisBottomText"),(0,s.K)(k,"parseStyles"),(0,s.K)(F,"addPoint"),(0,s.K)(P,"addClass"),(0,s.K)(C,"setWidth"),(0,s.K)(L,"setHeight"),(0,s.K)(v,"getQuadrantData");var I={parser:l,db:{setWidth:C,setHeight:L,setQuadrant1Text:y,setQuadrant2Text:T,setQuadrant3Text:m,setQuadrant4Text:q,setXAxisLeftText:A,setXAxisRightText:_,setYAxisTopText:b,setYAxisBottomText:S,parseStyles:k,addPoint:F,addClass:P,getQuadrantData:v,clear:(0,s.K)(function(){p.clear(),(0,a.IU)()},"clear"),setAccTitle:a.SV,getAccTitle:a.iN,setDiagramTitle:a.ke,getDiagramTitle:a.ab,getAccDescription:a.m7,setAccDescription:a.EI},renderer:{draw:(0,s.K)((t,e,i,o)=>{function l(t){return"top"===t?"hanging":"middle"}function h(t){return"left"===t?"start":"middle"}function c(t){return`translate(${t.x}, ${t.y}) rotate(${t.rotation||0})`}(0,s.K)(l,"getDominantBaseLine"),(0,s.K)(h,"getTextAnchor"),(0,s.K)(c,"getTransformation");const d=(0,a.D7)();n.R.debug("Rendering quadrant chart\n"+t);const u=d.securityLevel;let x;"sandbox"===u&&(x=(0,r.Ltv)("#i"+e));const g=("sandbox"===u?(0,r.Ltv)(x.nodes()[0].contentDocument.body):(0,r.Ltv)("body")).select(`[id="${e}"]`),f=g.append("g").attr("class","main"),p=d.quadrantChart?.chartWidth??500,y=d.quadrantChart?.chartHeight??500;(0,a.a$)(g,y,p,d.quadrantChart?.useMaxWidth??!0),g.attr("viewBox","0 0 "+p+" "+y),o.db.setHeight(y),o.db.setWidth(p);const T=o.db.getQuadrantData(),m=f.append("g").attr("class","quadrants"),q=f.append("g").attr("class","border"),A=f.append("g").attr("class","data-points"),_=f.append("g").attr("class","labels"),b=f.append("g").attr("class","title");T.title&&b.append("text").attr("x",0).attr("y",0).attr("fill",T.title.fill).attr("font-size",T.title.fontSize).attr("dominant-baseline",l(T.title.horizontalPos)).attr("text-anchor",h(T.title.verticalPos)).attr("transform",c(T.title)).text(T.title.text),T.borderLines&&q.selectAll("line").data(T.borderLines).enter().append("line").attr("x1",t=>t.x1).attr("y1",t=>t.y1).attr("x2",t=>t.x2).attr("y2",t=>t.y2).style("stroke",t=>t.strokeFill).style("stroke-width",t=>t.strokeWidth);const S=m.selectAll("g.quadrant").data(T.quadrants).enter().append("g").attr("class","quadrant");S.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),S.append("text").attr("x",0).attr("y",0).attr("fill",t=>t.text.fill).attr("font-size",t=>t.text.fontSize).attr("dominant-baseline",t=>l(t.text.horizontalPos)).attr("text-anchor",t=>h(t.text.verticalPos)).attr("transform",t=>c(t.text)).text(t=>t.text.text);_.selectAll("g.label").data(T.axisLabels).enter().append("g").attr("class","label").append("text").attr("x",0).attr("y",0).text(t=>t.text).attr("fill",t=>t.fill).attr("font-size",t=>t.fontSize).attr("dominant-baseline",t=>l(t.horizontalPos)).attr("text-anchor",t=>h(t.verticalPos)).attr("transform",t=>c(t));const k=A.selectAll("g.data-point").data(T.points).enter().append("g").attr("class","data-point");k.append("circle").attr("cx",t=>t.x).attr("cy",t=>t.y).attr("r",t=>t.radius).attr("fill",t=>t.fill).attr("stroke",t=>t.strokeColor).attr("stroke-width",t=>t.strokeWidth),k.append("text").attr("x",0).attr("y",0).text(t=>t.text.text).attr("fill",t=>t.text.fill).attr("font-size",t=>t.text.fontSize).attr("dominant-baseline",t=>l(t.text.horizontalPos)).attr("text-anchor",t=>h(t.text.verticalPos)).attr("transform",t=>c(t.text))},"draw")},styles:(0,s.K)(()=>"","styles")}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[784],{20784(e,a,c){c.d(a,{createRailroadEbnfServices:()=>s.W});var s=c(84803);c(80369)}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[8079],{28079(e,a,c){c.d(a,{createTreemapServices:()=>s.d});var s=c(80016);c(80369)}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[821],{40821(e,r,s){s.d(r,{diagram:()=>l});var a=s(2824),t=(s(64918),s(96755),s(1672),s(9417),s(338),s(78771),s(46853),s(717),s(79515),s(44505),s(69793),s(43287),s(12505),s(86535),s(31293),s(86827)),l={parser:a._$,get db(){return new a.NM},renderer:a.Lh,styles:a.tM,init:(0,t.K)(e=>{e.class||(e.class={}),e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")}}}]);
|