mio-previewer 0.2.81 → 0.2.83
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/dist/{_basePickBy-4DeI7Sd9.js → _basePickBy-B_fUHBq7.js} +1 -1
- package/dist/{_basePickBy-fK38Is48.cjs → _basePickBy-Dqo5imhM.cjs} +1 -1
- package/dist/{_baseUniq-DbG7pvUV.cjs → _baseUniq-CGg_yy3w.cjs} +1 -1
- package/dist/{_baseUniq-BiOfy4Zq.js → _baseUniq-D_yJ2cWz.js} +1 -1
- package/dist/architecture-O4VJ6CD3-BS1qaWrP.js +2 -0
- package/dist/architecture-O4VJ6CD3-pWor6yxt.cjs +1 -0
- package/dist/{architectureDiagram-VXUJARFQ-XQiXCJ1R.cjs → architectureDiagram-VXUJARFQ-CLwpMJT5.cjs} +1 -1
- package/dist/{architectureDiagram-VXUJARFQ-BjO8TT3C.js → architectureDiagram-VXUJARFQ-DcNHf7VL.js} +2 -2
- package/dist/{blockDiagram-VD42YOAC-3797lmee.cjs → blockDiagram-VD42YOAC-BLLCnii-.cjs} +1 -1
- package/dist/{blockDiagram-VD42YOAC-kn2a-098.js → blockDiagram-VD42YOAC-Btz-ItbV.js} +2 -2
- package/dist/{chunk-B4BG7PRW-BtJEjwS8.cjs → chunk-B4BG7PRW-Ci2sdKF-.cjs} +1 -1
- package/dist/{chunk-B4BG7PRW-DHY7VtDV.js → chunk-B4BG7PRW-ZQiq1R0I.js} +1 -1
- package/dist/{chunk-DI55MBZ5-4e69XZPR.js → chunk-DI55MBZ5-D-GpYXKH.js} +1 -1
- package/dist/{chunk-DI55MBZ5-DprPlFVg.cjs → chunk-DI55MBZ5-XEFwozWD.cjs} +1 -1
- package/dist/{classDiagram-2ON5EDUG-CGQPb_Ub.js → classDiagram-2ON5EDUG-D6DuGzSf.js} +2 -2
- package/dist/{classDiagram-2ON5EDUG-1aO8MRfO.cjs → classDiagram-2ON5EDUG-DkRQ5GOj.cjs} +1 -1
- package/dist/{classDiagram-v2-WZHVMYZB-BfB0DYeF.js → classDiagram-v2-WZHVMYZB-Ah0fVcwK.js} +2 -2
- package/dist/{classDiagram-v2-WZHVMYZB-1aO8MRfO.cjs → classDiagram-v2-WZHVMYZB-DkRQ5GOj.cjs} +1 -1
- package/dist/{clone-B7ysxKje.js → clone-6W0bDM--.js} +1 -1
- package/dist/clone-BzPrn9vX.cjs +1 -0
- package/dist/{custom-zFYvYngn.js → custom-BEVHZhjn.js} +1057 -1059
- package/dist/{custom-CTbYnXJM.cjs → custom-CFJtq50-.cjs} +9 -9
- package/dist/{dagre-6UL2VRFP-BaHUY8Hb.js → dagre-6UL2VRFP-C3Ipvs60.js} +5 -5
- package/dist/{dagre-6UL2VRFP-htRqTf-w.cjs → dagre-6UL2VRFP-CjL-Aopb.cjs} +1 -1
- package/dist/{dagre-BsYISGks.js → dagre-C8kEqhY-.js} +4 -4
- package/dist/{dagre-LrmDlPcx.cjs → dagre-CKZi16ud.cjs} +1 -1
- package/dist/{diagram-PSM6KHXK-DNvQqRSW.cjs → diagram-PSM6KHXK-DMa_Nrh3.cjs} +1 -1
- package/dist/{diagram-PSM6KHXK-DgowxSOD.js → diagram-PSM6KHXK-DpWcqYnH.js} +2 -2
- package/dist/{diagram-QEK2KX5R-I5j0P1Gg.cjs → diagram-QEK2KX5R-C1I_WFRU.cjs} +1 -1
- package/dist/{diagram-QEK2KX5R-wbcwN2OH.js → diagram-QEK2KX5R-meoSBUIM.js} +2 -2
- package/dist/{diagram-S2PKOQOG-R3_EPZ4Z.js → diagram-S2PKOQOG-CT-b436r.js} +2 -2
- package/dist/{diagram-S2PKOQOG-DK84ClRy.cjs → diagram-S2PKOQOG-DhWT3-d3.cjs} +1 -1
- package/dist/{erDiagram-Q2GNP2WA-D67CXTUo.cjs → erDiagram-Q2GNP2WA-BcI48E73.cjs} +1 -1
- package/dist/{erDiagram-Q2GNP2WA-3muHSADM.js → erDiagram-Q2GNP2WA-DTb2sgR_.js} +1 -1
- package/dist/{flowDiagram-NV44I4VS-JmA5InDJ.cjs → flowDiagram-NV44I4VS-CojdaEhH.cjs} +1 -1
- package/dist/{flowDiagram-NV44I4VS-CXF2rH58.js → flowDiagram-NV44I4VS-DW3pSjNx.js} +1 -1
- package/dist/gitGraph-ZV4HHKMB-BbcJrvYt.js +2 -0
- package/dist/gitGraph-ZV4HHKMB-DXFDUL4o.cjs +1 -0
- package/dist/{gitGraphDiagram-NY62KEGX-DnaSfz6O.js → gitGraphDiagram-NY62KEGX-DfMVgHMj.js} +1 -1
- package/dist/{gitGraphDiagram-NY62KEGX-Cky6DbTs.cjs → gitGraphDiagram-NY62KEGX-Do6avzMz.cjs} +1 -1
- package/dist/{graphlib-BDSGIwy5.js → graphlib-DZdg5a0e.js} +2 -2
- package/dist/{graphlib-COlsWh5G.cjs → graphlib-DlDIM8qv.cjs} +1 -1
- package/dist/info-63CPKGFF-BF1W-kBt.js +2 -0
- package/dist/info-63CPKGFF-OqKEIkyb.cjs +1 -0
- package/dist/{infoDiagram-F6ZHWCRC-CowQBjpH.cjs → infoDiagram-F6ZHWCRC-D83iIi2o.cjs} +1 -1
- package/dist/{infoDiagram-F6ZHWCRC-C-2JvOQj.js → infoDiagram-F6ZHWCRC-DkHDmcca.js} +2 -2
- package/dist/{kanban-definition-3W4ZIXB7-DFwQurcd.cjs → kanban-definition-3W4ZIXB7-BjUoDDjG.cjs} +1 -1
- package/dist/{kanban-definition-3W4ZIXB7-BA-P9_O1.js → kanban-definition-3W4ZIXB7-CRenxDOa.js} +1 -1
- package/dist/{mermaid-parser.core-CaUKRbWB.cjs → mermaid-parser.core-BY0bWKp5.cjs} +2 -2
- package/dist/{mermaid-parser.core-C0stGw3M.js → mermaid-parser.core-CTjeJcfH.js} +11 -11
- package/dist/{mindmap-definition-VGOIOE7T-JxzPkyHv.cjs → mindmap-definition-VGOIOE7T-BLEOQkZC.cjs} +1 -1
- package/dist/{mindmap-definition-VGOIOE7T-Bqx5iev5.js → mindmap-definition-VGOIOE7T-BeJDmJ4f.js} +1 -1
- package/dist/mio-previewer.cjs.js +2 -2
- package/dist/mio-previewer.css +1 -1
- package/dist/mio-previewer.es.js +85 -48
- package/dist/packet-HUATNLJX-BVdybaXv.js +2 -0
- package/dist/packet-HUATNLJX-DS1ZaMFj.cjs +1 -0
- package/dist/pie-WTHONI2E-DIWIyQKf.js +2 -0
- package/dist/pie-WTHONI2E-DY813YuK.cjs +1 -0
- package/dist/{pieDiagram-ADFJNKIX-i8x87zyM.cjs → pieDiagram-ADFJNKIX-89MFsDom.cjs} +1 -1
- package/dist/{pieDiagram-ADFJNKIX-CqeByC3c.js → pieDiagram-ADFJNKIX-DjW2gwan.js} +2 -2
- package/dist/plugins/custom.cjs.js +1 -1
- package/dist/plugins/custom.es.js +1 -1
- package/dist/radar-NJJJXTRR-DRgjWYOi.cjs +1 -0
- package/dist/radar-NJJJXTRR-qBj3iw7X.js +2 -0
- package/dist/{requirementDiagram-UZGBJVZJ-CHV5QyaU.js → requirementDiagram-UZGBJVZJ-CZw8XwAQ.js} +1 -1
- package/dist/{requirementDiagram-UZGBJVZJ-CkcmHGky.cjs → requirementDiagram-UZGBJVZJ-DUGy8FaZ.cjs} +1 -1
- package/dist/{sequenceDiagram-WL72ISMW-C6ZHiCkW.cjs → sequenceDiagram-WL72ISMW-CaEuUrMX.cjs} +1 -1
- package/dist/{sequenceDiagram-WL72ISMW-BrXwkh9-.js → sequenceDiagram-WL72ISMW-D_npYx8y.js} +1 -1
- package/dist/{stateDiagram-FKZM4ZOC-BexHjwuY.cjs → stateDiagram-FKZM4ZOC-B0OX9oAF.cjs} +1 -1
- package/dist/{stateDiagram-FKZM4ZOC-BNKd7Zjp.js → stateDiagram-FKZM4ZOC-CybCdeuK.js} +4 -4
- package/dist/{stateDiagram-v2-4FDKWEC3-BV5hZe8g.cjs → stateDiagram-v2-4FDKWEC3-B_aDvBm0.cjs} +1 -1
- package/dist/{stateDiagram-v2-4FDKWEC3-BBQ_35IT.js → stateDiagram-v2-4FDKWEC3-BhgHpXjD.js} +2 -2
- package/dist/treemap-75Q7IDZK-CN96qMnk.cjs +1 -0
- package/dist/treemap-75Q7IDZK-DW1QHTpM.js +2 -0
- package/dist/{xychartDiagram-PRI3JC2R-Sign6lKR.js → xychartDiagram-PRI3JC2R-C4S1jDTS.js} +1 -1
- package/dist/{xychartDiagram-PRI3JC2R-Uuh1GI7r.cjs → xychartDiagram-PRI3JC2R-nUj0lqZ0.cjs} +1 -1
- package/package.json +1 -1
- package/dist/architecture-O4VJ6CD3-Br6wckiC.js +0 -2
- package/dist/architecture-O4VJ6CD3-DW6Y0DyO.cjs +0 -1
- package/dist/clone-Cigigie7.cjs +0 -1
- package/dist/gitGraph-ZV4HHKMB-Bd0sDnQF.js +0 -2
- package/dist/gitGraph-ZV4HHKMB-Dw6oOGGz.cjs +0 -1
- package/dist/info-63CPKGFF-C1ouGYsz.js +0 -2
- package/dist/info-63CPKGFF-DXINRvni.cjs +0 -1
- package/dist/packet-HUATNLJX-BKMh2g_W.js +0 -2
- package/dist/packet-HUATNLJX-s8JssPJD.cjs +0 -1
- package/dist/pie-WTHONI2E-Cx-MoId6.cjs +0 -1
- package/dist/pie-WTHONI2E-DOIqNUp0.js +0 -2
- package/dist/radar-NJJJXTRR-B4jjqv__.js +0 -2
- package/dist/radar-NJJJXTRR-CEg_Sqsk.cjs +0 -1
- package/dist/treemap-75Q7IDZK-BsMDB8ct.cjs +0 -1
- package/dist/treemap-75Q7IDZK-sGAH33Jt.js +0 -2
|
@@ -7,11 +7,11 @@ import "./chunk-ATLVNIR6-DHlCNWnJ.js";
|
|
|
7
7
|
import "./chunk-JA3XYJ7Z-CpKHrbOX.js";
|
|
8
8
|
import { a as i, c as a, i as o, l as s, n as c, t as l, u } from "./chunk-JZLCHNYA-CYo7ykJf.js";
|
|
9
9
|
import { a as d, i as f, n as p, r as m, t as h } from "./chunk-QXUST7PY-CxCAwQqP.js";
|
|
10
|
-
import { r as g } from "./_baseUniq-
|
|
11
|
-
import { s as _ } from "./_basePickBy-
|
|
12
|
-
import { t as v } from "./dagre-
|
|
13
|
-
import { t as y } from "./clone-
|
|
14
|
-
import { t as b } from "./graphlib-
|
|
10
|
+
import { r as g } from "./_baseUniq-D_yJ2cWz.js";
|
|
11
|
+
import { s as _ } from "./_basePickBy-B_fUHBq7.js";
|
|
12
|
+
import { t as v } from "./dagre-C8kEqhY-.js";
|
|
13
|
+
import { t as y } from "./clone-6W0bDM--.js";
|
|
14
|
+
import { t as b } from "./graphlib-DZdg5a0e.js";
|
|
15
15
|
//#region node_modules/.pnpm/dagre-d3-es@7.0.11/node_modules/dagre-d3-es/src/graphlib/json.js
|
|
16
16
|
function x(e) {
|
|
17
17
|
var t = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const e=require("./src-BMjps4Ui.cjs"),t=require("./chunk-ABZYJK2D-CbIYYZa_.cjs");require("./chunk-S3R3BYOJ-B2ozcJNg.cjs"),require("./chunk-HN2XXSSU-BwmRMa2r.cjs");const n=require("./chunk-CVBHYZKI-CLVcv_xh.cjs");require("./chunk-ATLVNIR6-shAOudT0.cjs"),require("./chunk-JA3XYJ7Z-BaAdjYEy.cjs");const r=require("./chunk-JZLCHNYA-CvPIQFXP.cjs"),i=require("./chunk-QXUST7PY-CnnfdJrM.cjs"),a=require("./_baseUniq-
|
|
1
|
+
const e=require("./src-BMjps4Ui.cjs"),t=require("./chunk-ABZYJK2D-CbIYYZa_.cjs");require("./chunk-S3R3BYOJ-B2ozcJNg.cjs"),require("./chunk-HN2XXSSU-BwmRMa2r.cjs");const n=require("./chunk-CVBHYZKI-CLVcv_xh.cjs");require("./chunk-ATLVNIR6-shAOudT0.cjs"),require("./chunk-JA3XYJ7Z-BaAdjYEy.cjs");const r=require("./chunk-JZLCHNYA-CvPIQFXP.cjs"),i=require("./chunk-QXUST7PY-CnnfdJrM.cjs"),a=require("./_baseUniq-CGg_yy3w.cjs"),o=require("./_basePickBy-Dqo5imhM.cjs"),s=require("./dagre-CKZi16ud.cjs"),c=require("./clone-BzPrn9vX.cjs"),l=require("./graphlib-DlDIM8qv.cjs");function u(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:d(e),edges:f(e)};return a.r(e.graph())||(t.value=c.t(e.graph())),t}function d(e){return o.s(e.nodes(),function(t){var n=e.node(t),r=e.parent(t),i={v:t};return a.r(n)||(i.value=n),a.r(r)||(i.parent=r),i})}function f(e){return o.s(e.edges(),function(t){var n=e.edge(t),r={v:t.v,w:t.w};return a.r(t.name)||(r.name=t.name),a.r(n)||(r.value=n),r})}var p=new Map,m=new Map,h=new Map,g=e.h(()=>{m.clear(),h.clear(),p.clear()},`clear`),_=e.h((t,n)=>{let r=m.get(n)||[];return e.g.trace(`In isDescendant`,n,` `,t,` = `,r.includes(t)),r.includes(t)},`isDescendant`),v=e.h((t,n)=>{let r=m.get(n)||[];return e.g.info(`Descendants of `,n,` is `,r),e.g.info(`Edge is `,t),t.v===n||t.w===n?!1:r?r.includes(t.v)||_(t.v,n)||_(t.w,n)||r.includes(t.w):(e.g.debug(`Tilt, `,n,`,not in descendants`),!1)},`edgeInCluster`),y=e.h((t,n,r,i)=>{e.g.warn(`Copying children of `,t,`root`,i,`data`,n.node(t),i);let a=n.children(t)||[];t!==i&&a.push(t),e.g.warn(`Copying (nodes) clusterId`,t,`nodes`,a),a.forEach(a=>{if(n.children(a).length>0)y(a,n,r,i);else{let o=n.node(a);e.g.info(`cp `,a,` to `,i,` with parent `,t),r.setNode(a,o),i!==n.parent(a)&&(e.g.warn(`Setting parent`,a,n.parent(a)),r.setParent(a,n.parent(a))),t!==i&&a!==t?(e.g.debug(`Setting parent`,a,t),r.setParent(a,t)):(e.g.info(`In copy `,t,`root`,i,`data`,n.node(t),i),e.g.debug(`Not Setting parent for node=`,a,`cluster!==rootId`,t!==i,`node!==clusterId`,a!==t));let s=n.edges(a);e.g.debug(`Copying Edges`,s),s.forEach(a=>{e.g.info(`Edge`,a);let o=n.edge(a.v,a.w,a.name);e.g.info(`Edge data`,o,i);try{v(a,i)?(e.g.info(`Copying as `,a.v,a.w,o,a.name),r.setEdge(a.v,a.w,o,a.name),e.g.info(`newGraph edges `,r.edges(),r.edge(r.edges()[0]))):e.g.info(`Skipping copy of edge `,a.v,`-->`,a.w,` rootId: `,i,` clusterId:`,t)}catch(t){e.g.error(t)}})}e.g.debug(`Removing node`,a),n.removeNode(a)})},`copy`),b=e.h((e,t)=>{let n=t.children(e),r=[...n];for(let i of n)h.set(i,e),r=[...r,...b(i,t)];return r},`extractDescendants`),x=e.h((e,t,n)=>{let r=e.edges().filter(e=>e.v===t||e.w===t),i=e.edges().filter(e=>e.v===n||e.w===n),a=r.map(e=>({v:e.v===t?n:e.v,w:e.w===t?t:e.w})),o=i.map(e=>({v:e.v,w:e.w}));return a.filter(e=>o.some(t=>e.v===t.v&&e.w===t.w))},`findCommonEdges`),S=e.h((t,n,r)=>{let i=n.children(t);if(e.g.trace(`Searching children of id `,t,i),i.length<1)return t;let a;for(let e of i){let t=S(e,n,r),i=x(n,r,t);if(t)if(i.length>0)a=t;else return t}return a},`findNonClusterChild`),C=e.h(e=>!p.has(e)||!p.get(e).externalConnections?e:p.has(e)?p.get(e).id:e,`getAnchorId`),w=e.h((t,n)=>{if(!t||n>10){e.g.debug(`Opting out, no graph `);return}else e.g.debug(`Opting in, graph `);t.nodes().forEach(function(n){t.children(n).length>0&&(e.g.warn(`Cluster identified`,n,` Replacement id in edges: `,S(n,t,n)),m.set(n,b(n,t)),p.set(n,{id:S(n,t,n),clusterData:t.node(n)}))}),t.nodes().forEach(function(n){let r=t.children(n),i=t.edges();r.length>0?(e.g.debug(`Cluster identified`,n,m),i.forEach(t=>{_(t.v,n)^_(t.w,n)&&(e.g.warn(`Edge: `,t,` leaves cluster `,n),e.g.warn(`Descendants of XXX `,n,`: `,m.get(n)),p.get(n).externalConnections=!0)})):e.g.debug(`Not a cluster `,n,m)});for(let e of p.keys()){let n=p.get(e).id,r=t.parent(n);r!==e&&p.has(r)&&!p.get(r).externalConnections&&(p.get(e).id=r)}t.edges().forEach(function(n){let r=t.edge(n);e.g.warn(`Edge `+n.v+` -> `+n.w+`: `+JSON.stringify(n)),e.g.warn(`Edge `+n.v+` -> `+n.w+`: `+JSON.stringify(t.edge(n)));let i=n.v,a=n.w;if(e.g.warn(`Fix XXX`,p,`ids:`,n.v,n.w,`Translating: `,p.get(n.v),` --- `,p.get(n.w)),p.get(n.v)||p.get(n.w)){if(e.g.warn(`Fixing and trying - removing XXX`,n.v,n.w,n.name),i=C(n.v),a=C(n.w),t.removeEdge(n.v,n.w,n.name),i!==n.v){let e=t.parent(i);p.get(e).externalConnections=!0,r.fromCluster=n.v}if(a!==n.w){let e=t.parent(a);p.get(e).externalConnections=!0,r.toCluster=n.w}e.g.warn(`Fix Replacing with XXX`,i,a,n.name),t.setEdge(i,a,r,n.name)}}),e.g.warn(`Adjusted Graph`,u(t)),T(t,0),e.g.trace(p)},`adjustClustersAndEdges`),T=e.h((t,n)=>{if(e.g.warn(`extractor - `,n,u(t),t.children(`D`)),n>10){e.g.error(`Bailing out`);return}let r=t.nodes(),i=!1;for(let e of r){let n=t.children(e);i||=n.length>0}if(!i){e.g.debug(`Done, no node has children`,t.nodes());return}e.g.debug(`Nodes = `,r,n);for(let i of r)if(e.g.debug(`Extracting node`,i,p,p.has(i)&&!p.get(i).externalConnections,!t.parent(i),t.node(i),t.children(`D`),` Depth `,n),!p.has(i))e.g.debug(`Not a cluster`,i,n);else if(!p.get(i).externalConnections&&t.children(i)&&t.children(i).length>0){e.g.warn(`Cluster without external connections, without a parent and with children`,i,n);let r=t.graph().rankdir===`TB`?`LR`:`TB`;p.get(i)?.clusterData?.dir&&(r=p.get(i).clusterData.dir,e.g.warn(`Fixing dir`,p.get(i).clusterData.dir,r));let a=new l.t({multigraph:!0,compound:!0}).setGraph({rankdir:r,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});e.g.warn(`Old graph before copy`,u(t)),y(i,t,a,i),t.setNode(i,{clusterNode:!0,id:i,clusterData:p.get(i).clusterData,label:p.get(i).label,graph:a}),e.g.warn(`New graph after copy node: (`,i,`)`,u(a)),e.g.debug(`Old graph after copy`,u(t))}else e.g.warn(`Cluster ** `,i,` **not meeting the criteria !externalConnections:`,!p.get(i).externalConnections,` no parent: `,!t.parent(i),` children `,t.children(i)&&t.children(i).length>0,t.children(`D`),n),e.g.debug(p);r=t.nodes(),e.g.warn(`New list of nodes`,r);for(let i of r){let r=t.node(i);e.g.warn(` Now next level`,i,r),r?.clusterNode&&T(r.graph,n+1)}},`extractor`),E=e.h((e,t)=>{if(t.length===0)return[];let n=Object.assign([],t);return t.forEach(t=>{let r=E(e,e.children(t));n=[...n,...r]}),n},`sorter`),D=e.h(e=>E(e,e.children()),`sortNodesByHierarchy`),O=e.h(async(t,a,o,c,l,d)=>{e.g.warn(`Graph in recursive render:XAX`,u(a),l);let f=a.graph().rankdir;e.g.trace(`Dir in recursive render - dir:`,f);let m=t.insert(`g`).attr(`class`,`root`);a.nodes()?e.g.info(`Recursive render XXX`,a.nodes()):e.g.info(`No nodes found for`,a),a.edges().length>0&&e.g.info(`Recursive edges`,a.edge(a.edges()[0]));let h=m.insert(`g`).attr(`class`,`clusters`),g=m.insert(`g`).attr(`class`,`edgePaths`),_=m.insert(`g`).attr(`class`,`edgeLabels`),v=m.insert(`g`).attr(`class`,`nodes`);await Promise.all(a.nodes().map(async function(t){let n=a.node(t);if(l!==void 0){let n=JSON.parse(JSON.stringify(l.clusterData));e.g.trace(`Setting data for parent cluster XXX
|
|
2
2
|
Node.id = `,t,`
|
|
3
3
|
data=`,n.height,`
|
|
4
4
|
Parent cluster`,l.height),a.setNode(l.id,n),a.parent(t)||(e.g.trace(`Setting parent`,t,l.id),a.setParent(t,l.id,n))}if(e.g.info(`(Insert) Node XXX`+t+`: `+JSON.stringify(a.node(t))),n?.clusterNode){e.g.info(`Cluster identified XBX`,t,n.width,a.node(t));let{ranksep:i,nodesep:s}=a.graph();n.graph.setGraph({...n.graph.graph(),ranksep:i+25,nodesep:s});let l=await O(v,n.graph,o,c,a.node(t),d),u=l.elem;r.u(n,u),n.diff=l.diff||0,e.g.info(`New compound node after recursive render XAX`,t,`width`,n.width,`height`,n.height),r.l(u,n)}else a.children(t).length>0?(e.g.trace(`Cluster - the non recursive path XBX`,t,n.id,n,n.width,`Graph:`,a),e.g.trace(S(n.id,a)),p.set(n.id,{id:S(n.id,a),node:n})):(e.g.trace(`Node - the non recursive path XAX`,t,v,a.node(t),f),await r.a(v,a.node(t),{config:d,dir:f}))})),await e.h(async()=>{let t=a.edges().map(async function(t){let n=a.edge(t.v,t.w,t.name);e.g.info(`Edge `+t.v+` -> `+t.w+`: `+JSON.stringify(t)),e.g.info(`Edge `+t.v+` -> `+t.w+`: `,t,` `,JSON.stringify(a.edge(t))),e.g.info(`Fix`,p,`ids:`,t.v,t.w,`Translating: `,p.get(t.v),p.get(t.w)),await i.r(_,n)});await Promise.all(t)},`processEdges`)(),e.g.info(`Graph before layout:`,JSON.stringify(u(a))),e.g.info(`############################################# XXX`),e.g.info(`### Layout ### XXX`),e.g.info(`############################################# XXX`),s.t(a),e.g.info(`Graph after layout:`,JSON.stringify(u(a)));let y=0,{subGraphTitleTotalMargin:b}=n.t(d);return await Promise.all(D(a).map(async function(t){let n=a.node(t);if(e.g.info(`Position XBX => `+t+`: (`+n.x,`,`+n.y,`) width: `,n.width,` height: `,n.height),n?.clusterNode)n.y+=b,e.g.info(`A tainted cluster node XBX1`,t,n.id,n.width,n.height,n.x,n.y,a.parent(t)),p.get(n.id).node=n,r.c(n);else if(a.children(t).length>0){e.g.info(`A pure cluster node XBX1`,t,n.id,n.x,n.y,n.width,n.height,a.parent(t)),n.height+=b,a.node(n.parentId);let i=n?.padding/2||0,o=n?.labelBBox?.height||0,s=o-i||0;e.g.debug(`OffsetY`,s,`labelHeight`,o,`halfPadding`,i),await r.i(h,n),p.get(n.id).node=n}else{let t=a.node(n.parentId);n.y+=b/2,e.g.info(`A regular node XBX1 - using the padding`,n.id,`parent`,n.parentId,n.width,n.height,n.x,n.y,`offsetY`,n.offsetY,`parent`,t,t?.offsetY,n),r.c(n)}})),a.edges().forEach(function(t){let n=a.edge(t);e.g.info(`Edge `+t.v+` -> `+t.w+`: `+JSON.stringify(n),n),n.points.forEach(e=>e.y+=b/2),i.a(n,i.n(g,n,p,o,a.node(t.v),a.node(t.w),c))}),a.nodes().forEach(function(t){let n=a.node(t);e.g.info(t,n.type,n.diff),n.isGroup&&(y=n.diff)}),e.g.warn(`Returning from recursive render XAX`,m,y),{elem:m,diff:y}},`recursiveRender`),k=e.h(async(n,a)=>{let o=new l.t({multigraph:!0,compound:!0}).setGraph({rankdir:n.direction,nodesep:n.config?.nodeSpacing||n.config?.flowchart?.nodeSpacing||n.nodeSpacing,ranksep:n.config?.rankSpacing||n.config?.flowchart?.rankSpacing||n.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),s=a.select(`g`);i.i(s,n.markers,n.type,n.diagramId),r.n(),i.t(),r.t(),g(),n.nodes.forEach(e=>{o.setNode(e.id,{...e}),e.parentId&&o.setParent(e.id,e.parentId)}),e.g.debug(`Edges:`,n.edges),n.edges.forEach(e=>{if(e.start===e.end){let t=e.start,n=t+`---`+t+`---1`,r=t+`---`+t+`---2`,i=o.node(t);o.setNode(n,{domId:n,id:n,parentId:i.parentId,labelStyle:``,label:``,padding:0,shape:`labelRect`,style:``,width:10,height:10}),o.setParent(n,i.parentId),o.setNode(r,{domId:r,id:r,parentId:i.parentId,labelStyle:``,padding:0,shape:`labelRect`,label:``,style:``,width:10,height:10}),o.setParent(r,i.parentId);let a=structuredClone(e),s=structuredClone(e),c=structuredClone(e);a.label=``,a.arrowTypeEnd=`none`,a.id=t+`-cyclic-special-1`,s.arrowTypeStart=`none`,s.arrowTypeEnd=`none`,s.id=t+`-cyclic-special-mid`,c.label=``,i.isGroup&&(a.fromCluster=t,c.toCluster=t),c.id=t+`-cyclic-special-2`,c.arrowTypeStart=`none`,o.setEdge(t,n,a,t+`-cyclic-special-0`),o.setEdge(n,r,s,t+`-cyclic-special-1`),o.setEdge(r,t,c,t+`-cyc<lic-special-2`)}else o.setEdge(e.start,e.end,{...e},e.id)}),e.g.warn(`Graph at first:`,JSON.stringify(u(o))),w(o),e.g.warn(`Graph after XAX:`,JSON.stringify(u(o)));let c=t.b();await O(s,o,n.type,n.diagramId,void 0,c)},`render`);exports.render=k;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { a as e, s as t } from "./custom-
|
|
1
|
+
import { a as e, s as t } from "./custom-BEVHZhjn.js";
|
|
2
2
|
import { _ as n } from "./chunk-S3R3BYOJ-CG6GoSCd.js";
|
|
3
3
|
import { G as r, M as i, N as a, a as o, b as s, c, f as l, h as u, i as d, n as f, o as p, r as m, s as ee, v as te } from "./_createAssigner-IEX8lwxm.js";
|
|
4
|
-
import { C as ne, E as re, M as h, N as g, S as ie, a as _, c as ae, d as oe, f as v, i as y, m as se, n as b, p as ce, r as x, s as S, y as le } from "./_baseUniq-
|
|
5
|
-
import { a as ue, c as de, d as fe, f as C, i as pe, l as w, m as T, n as E, o as me, r as he, s as D, t as ge, u as O } from "./_basePickBy-
|
|
6
|
-
import { t as k } from "./graphlib-
|
|
4
|
+
import { C as ne, E as re, M as h, N as g, S as ie, a as _, c as ae, d as oe, f as v, i as y, m as se, n as b, p as ce, r as x, s as S, y as le } from "./_baseUniq-D_yJ2cWz.js";
|
|
5
|
+
import { a as ue, c as de, d as fe, f as C, i as pe, l as w, m as T, n as E, o as me, r as he, s as D, t as ge, u as O } from "./_basePickBy-B_fUHBq7.js";
|
|
6
|
+
import { t as k } from "./graphlib-DZdg5a0e.js";
|
|
7
7
|
//#region node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_flatRest.js
|
|
8
8
|
function _e(e) {
|
|
9
9
|
return d(p(e, void 0, C), e + "");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./custom-CTbYnXJM.cjs"),t=require("./chunk-S3R3BYOJ-B2ozcJNg.cjs"),n=require("./_createAssigner-DqH64jc7.cjs"),r=require("./_baseUniq-DbG7pvUV.cjs"),i=require("./_basePickBy-fK38Is48.cjs"),a=require("./graphlib-COlsWh5G.cjs");function o(e){return n.i(n.o(e,void 0,i.f),e+``)}var s=RegExp(`[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]`);function c(e){return s.test(e)}var l=1,u=4;function d(e){return r.y(e,l|u)}var f=function(){return n.G.Date.now()};function p(e,t){return e==null?e:n.M(e,r.c(t),n.c)}function m(e,t){return e&&r.d(e,r.c(t))}function h(e,t){return e>t}function g(e,t){var i={};return t=r.f(t,3),r.d(e,function(e,r,a){n.N(i,r,t(e,r,a))}),i}function _(e){return e&&e.length?i.r(e,n.s,h):void 0}function v(e,t){return e&&e.length?i.r(e,r.f(t,2),i.i):void 0}function ee(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}function te(e,t){if(e!==t){var n=e!==void 0,i=e===null,a=e===e,o=r.N(e),s=t!==void 0,c=t===null,l=t===t,u=r.N(t);if(!c&&!u&&!o&&e>t||o&&s&&l&&!c&&!u||i&&s&&l||!n&&l||!a)return 1;if(!i&&!o&&!u&&e<t||u&&n&&a&&!i&&!o||c&&n&&a||!s&&a||!l)return-1}return 0}function ne(e,t,n){for(var r=-1,i=e.criteria,a=t.criteria,o=i.length,s=n.length;++r<o;){var c=te(i[r],a[r]);if(c)return r>=s?c:c*(n[r]==`desc`?-1:1)}return e.index-t.index}function re(e,t,a){t=t.length?r.M(t,function(e){return n.b(e)?function(t){return r.C(t,e.length===1?e[0]:e)}:e}):[n.s];var o=-1;return t=r.M(t,n.h(r.f)),ee(i.c(e,function(e,n,i){return{criteria:r.M(t,function(t){return t(e)}),index:++o,value:e}}),function(e,t){return ne(e,t,a)})}var ie=r.p(`length`),ae=`\\ud800-\\udfff`,oe=`\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff`,se=`\\ufe0e\\ufe0f`,ce=`[`+ae+`]`,y=`[`+oe+`]`,b=`\\ud83c[\\udffb-\\udfff]`,le=`(?:`+y+`|`+b+`)`,ue=`[^`+ae+`]`,de=`(?:\\ud83c[\\udde6-\\uddff]){2}`,x=`[\\ud800-\\udbff][\\udc00-\\udfff]`,fe=`\\u200d`,S=le+`?`,C=`[`+se+`]?`,pe=`(?:`+fe+`(?:`+[ue,de,x].join(`|`)+`)`+C+S+`)*`,me=C+S+pe,he=`(?:`+[ue+y+`?`,y,de,x,ce].join(`|`)+`)`,w=RegExp(b+`(?=`+b+`)|`+he+me,`g`);function ge(e){for(var t=w.lastIndex=0;w.test(e);)++t;return t}function _e(e){return c(e)?ge(e):ie(e)}function ve(e,t){return i.t(e,t,function(t,n){return r.m(e,n)})}var T=o(function(e,t){return e==null?{}:ve(e,t)}),ye=Math.ceil,be=Math.max;function xe(e,t,n,r){for(var i=-1,a=be(ye((t-e)/(n||1)),0),o=Array(a);a--;)o[r?a:++i]=e,e+=n;return o}function Se(e){return function(t,r,a){return a&&typeof a!=`number`&&n.n(t,r,a)&&(r=a=void 0),t=i.m(t),r===void 0?(r=t,t=0):r=i.m(r),a=a===void 0?t<r?1:-1:i.m(a),xe(t,r,a,e)}}var E=Se(),Ce=`[object Map]`,we=`[object Set]`;function Te(t){if(t==null)return 0;if(n.v(t))return i.a(t)?_e(t):t.length;var r=e.a(t);return r==Ce||r==we?t.size:e.s(t).length}var D=n.r(function(e,t){if(e==null)return[];var i=t.length;return i>1&&n.n(e,t[0],t[1])?t=[]:i>2&&n.n(t[0],t[1],t[2])&&(t=[t[0]]),re(e,r.S(t,1),[])}),Ee=0;function O(e){var t=++Ee;return r.E(e)+t}function De(e,t,n){for(var r=-1,i=e.length,a=t.length,o={};++r<i;){var s=r<a?t[r]:void 0;n(o,e[r],s)}return o}function Oe(e,t){return De(e||[],t||[],n.f)}var ke=class{constructor(){var e={};e._next=e._prev=e,this._sentinel=e}dequeue(){var e=this._sentinel,t=e._prev;if(t!==e)return Ae(t),t}enqueue(e){var t=this._sentinel;e._prev&&e._next&&Ae(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t}toString(){for(var e=[],t=this._sentinel,n=t._prev;n!==t;)e.push(JSON.stringify(n,je)),n=n._prev;return`[`+e.join(`, `)+`]`}};function Ae(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function je(e,t){if(e!==`_next`&&e!==`_prev`)return t}var Me=n.a(1);function Ne(e,t){if(e.nodeCount()<=1)return[];var n=Fe(e,t||Me),r=Pe(n.graph,n.buckets,n.zeroIdx);return i.f(i.s(r,function(t){return e.outEdges(t.v,t.w)}))}function Pe(e,t,n){for(var r=[],i=t[t.length-1],a=t[0],o;e.nodeCount();){for(;o=a.dequeue();)k(e,t,n,o);for(;o=i.dequeue();)k(e,t,n,o);if(e.nodeCount()){for(var s=t.length-2;s>0;--s)if(o=t[s].dequeue(),o){r=r.concat(k(e,t,n,o,!0));break}}}return r}function k(e,t,n,i,a){var o=a?[]:void 0;return r.s(e.inEdges(i.v),function(r){var i=e.edge(r),s=e.node(r.v);a&&o.push({v:r.v,w:r.w}),s.out-=i,A(t,n,s)}),r.s(e.outEdges(i.v),function(r){var i=e.edge(r),a=r.w,o=e.node(a);o.in-=i,A(t,n,o)}),e.removeNode(i.v),o}function Fe(e,t){var n=new a.t,i=0,o=0;r.s(e.nodes(),function(e){n.setNode(e,{v:e,in:0,out:0})}),r.s(e.edges(),function(e){var r=n.edge(e.v,e.w)||0,a=t(e),s=r+a;n.setEdge(e.v,e.w,s),o=Math.max(o,n.node(e.v).out+=a),i=Math.max(i,n.node(e.w).in+=a)});var s=E(o+i+3).map(function(){return new ke}),c=i+1;return r.s(n.nodes(),function(e){A(s,c,n.node(e))}),{graph:n,buckets:s,zeroIdx:c}}function A(e,t,n){n.out?n.in?e[n.out-n.in+t].enqueue(n):e[e.length-1].enqueue(n):e[0].enqueue(n)}function Ie(e){var t=e.graph().acyclicer===`greedy`?Ne(e,n(e)):Le(e);r.s(t,function(t){var n=e.edge(t);e.removeEdge(t),n.forwardName=t.name,n.reversed=!0,e.setEdge(t.w,t.v,n,O(`rev`))});function n(e){return function(t){return e.edge(t).weight}}}function Le(e){var t=[],n={},i={};function a(o){Object.prototype.hasOwnProperty.call(i,o)||(i[o]=!0,n[o]=!0,r.s(e.outEdges(o),function(e){Object.prototype.hasOwnProperty.call(n,e.w)?t.push(e):a(e.w)}),delete n[o])}return r.s(e.nodes(),a),t}function Re(e){r.s(e.edges(),function(t){var n=e.edge(t);if(n.reversed){e.removeEdge(t);var r=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,r)}})}function j(e,t,n,r){var i;do i=O(r);while(e.hasNode(i));return n.dummy=t,e.setNode(i,n),i}function ze(e){var t=new a.t().setGraph(e.graph());return r.s(e.nodes(),function(n){t.setNode(n,e.node(n))}),r.s(e.edges(),function(n){var r=t.edge(n.v,n.w)||{weight:0,minlen:1},i=e.edge(n);t.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})}),t}function M(e){var t=new a.t({multigraph:e.isMultigraph()}).setGraph(e.graph());return r.s(e.nodes(),function(n){e.children(n).length||t.setNode(n,e.node(n))}),r.s(e.edges(),function(n){t.setEdge(n,e.edge(n))}),t}function N(e,t){var n=e.x,r=e.y,i=t.x-n,a=t.y-r,o=e.width/2,s=e.height/2;if(!i&&!a)throw Error(`Not possible to find intersection inside of the rectangle`);var c,l;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),c=s*i/a,l=s):(i<0&&(o=-o),c=o,l=o*a/i),{x:n+c,y:r+l}}function P(e){var t=i.s(E(I(e)+1),function(){return[]});return r.s(e.nodes(),function(n){var i=e.node(n),a=i.rank;r.r(a)||(t[a][i.order]=n)}),t}function Be(e){var t=i.n(i.s(e.nodes(),function(t){return e.node(t).rank}));r.s(e.nodes(),function(n){var r=e.node(n);i.o(r,`rank`)&&(r.rank-=t)})}function Ve(e){var t=i.n(i.s(e.nodes(),function(t){return e.node(t).rank})),n=[];r.s(e.nodes(),function(r){var i=e.node(r).rank-t;n[i]||(n[i]=[]),n[i].push(r)});var a=0,o=e.graph().nodeRankFactor;r.s(n,function(t,n){r.r(t)&&n%o!==0?--a:a&&r.s(t,function(t){e.node(t).rank+=a})})}function F(e,t,n,r){var i={width:0,height:0};return arguments.length>=4&&(i.rank=n,i.order=r),j(e,`border`,i,t)}function I(e){return _(i.s(e.nodes(),function(t){var n=e.node(t).rank;if(!r.r(n))return n}))}function He(e,t){var n={lhs:[],rhs:[]};return r.s(e,function(e){t(e)?n.lhs.push(e):n.rhs.push(e)}),n}function Ue(e,t){var n=f();try{return t()}finally{console.log(e+` time: `+(f()-n)+`ms`)}}function We(e,t){return t()}function Ge(e){function t(n){var i=e.children(n),a=e.node(n);if(i.length&&r.s(i,t),Object.prototype.hasOwnProperty.call(a,`minRank`)){a.borderLeft=[],a.borderRight=[];for(var o=a.minRank,s=a.maxRank+1;o<s;++o)L(e,`borderLeft`,`_bl`,n,a,o),L(e,`borderRight`,`_br`,n,a,o)}}r.s(e.children(),t)}function L(e,t,n,r,i,a){var o={width:0,height:0,rank:a,borderType:t},s=i[t][a-1],c=j(e,`border`,o,n);i[t][a]=c,e.setParent(c,r),s&&e.setEdge(s,c,{weight:1})}function Ke(e){var t=e.graph().rankdir.toLowerCase();(t===`lr`||t===`rl`)&&R(e)}function qe(e){var t=e.graph().rankdir.toLowerCase();(t===`bt`||t===`rl`)&&Je(e),(t===`lr`||t===`rl`)&&(Ye(e),R(e))}function R(e){r.s(e.nodes(),function(t){z(e.node(t))}),r.s(e.edges(),function(t){z(e.edge(t))})}function z(e){var t=e.width;e.width=e.height,e.height=t}function Je(e){r.s(e.nodes(),function(t){B(e.node(t))}),r.s(e.edges(),function(t){var n=e.edge(t);r.s(n.points,B),Object.prototype.hasOwnProperty.call(n,`y`)&&B(n)})}function B(e){e.y=-e.y}function Ye(e){r.s(e.nodes(),function(t){V(e.node(t))}),r.s(e.edges(),function(t){var n=e.edge(t);r.s(n.points,V),Object.prototype.hasOwnProperty.call(n,`x`)&&V(n)})}function V(e){var t=e.x;e.x=e.y,e.y=t}function Xe(e){e.graph().dummyChains=[],r.s(e.edges(),function(t){Ze(e,t)})}function Ze(e,t){var n=t.v,r=e.node(n).rank,i=t.w,a=e.node(i).rank,o=t.name,s=e.edge(t),c=s.labelRank;if(a!==r+1){e.removeEdge(t);var l=void 0,u,d;for(d=0,++r;r<a;++d,++r)s.points=[],l={width:0,height:0,edgeLabel:s,edgeObj:t,rank:r},u=j(e,`edge`,l,`_d`),r===c&&(l.width=s.width,l.height=s.height,l.dummy=`edge-label`,l.labelpos=s.labelpos),e.setEdge(n,u,{weight:s.weight},o),d===0&&e.graph().dummyChains.push(u),n=u;e.setEdge(n,i,{weight:s.weight},o)}}function Qe(e){r.s(e.graph().dummyChains,function(t){var n=e.node(t),r=n.edgeLabel,i;for(e.setEdge(n.edgeObj,r);n.dummy;)i=e.successors(t)[0],e.removeNode(t),r.points.push({x:n.x,y:n.y}),n.dummy===`edge-label`&&(r.x=n.x,r.y=n.y,r.width=n.width,r.height=n.height),t=i,n=e.node(t)})}function H(e){var t={};function n(r){var a=e.node(r);if(Object.prototype.hasOwnProperty.call(t,r))return a.rank;t[r]=!0;var o=i.n(i.s(e.outEdges(r),function(t){return n(t.w)-e.edge(t).minlen}));return(o===1/0||o==null)&&(o=0),a.rank=o}r.s(e.sources(),n)}function U(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}function W(e){var t=new a.t({directed:!1}),n=e.nodes()[0],r=e.nodeCount();t.setNode(n,{});for(var i,o;$e(t,e)<r;)i=et(t,e),o=t.hasNode(i.v)?U(e,i):-U(e,i),tt(t,e,o);return t}function $e(e,t){function n(i){r.s(t.nodeEdges(i),function(r){var a=r.v,o=i===a?r.w:a;!e.hasNode(o)&&!U(t,r)&&(e.setNode(o,{}),e.setEdge(i,o,{}),n(o))})}return r.s(e.nodes(),n),e.nodeCount()}function et(e,t){return v(t.edges(),function(n){if(e.hasNode(n.v)!==e.hasNode(n.w))return U(t,n)})}function tt(e,t,n){r.s(e.nodes(),function(e){t.node(e).rank+=n})}n.a(1),n.a(1),nt.CycleException=G;function nt(e){var t={},n={},i=[];function a(o){if(Object.prototype.hasOwnProperty.call(n,o))throw new G;Object.prototype.hasOwnProperty.call(t,o)||(n[o]=!0,t[o]=!0,r.s(e.predecessors(o),a),delete n[o],i.push(o))}if(r.s(e.sinks(),a),Te(t)!==e.nodeCount())throw new G;return i}function G(){}G.prototype=Error();function K(e,t,i){n.b(t)||(t=[t]);var a=(e.isDirected()?e.successors:e.neighbors).bind(e),o=[],s={};return r.s(t,function(t){if(!e.hasNode(t))throw Error(`Graph does not have node: `+t);q(e,t,i===`post`,s,a,o)}),o}function q(e,t,n,i,a,o){Object.prototype.hasOwnProperty.call(i,t)||(i[t]=!0,n||o.push(t),r.s(a(t),function(t){q(e,t,n,i,a,o)}),n&&o.push(t))}function rt(e,t){return K(e,t,`post`)}function it(e,t){return K(e,t,`pre`)}J.initLowLimValues=X,J.initCutValues=Y,J.calcCutValue=ot,J.leaveEdge=ct,J.enterEdge=lt,J.exchangeEdges=ut;function J(e){e=ze(e),H(e);var t=W(e);X(t),Y(t,e);for(var n,r;n=ct(t);)r=lt(t,e,n),ut(t,e,n,r)}function Y(e,t){var n=rt(e,e.nodes());n=n.slice(0,n.length-1),r.s(n,function(n){at(e,t,n)})}function at(e,t,n){var r=e.node(n).parent;e.edge(n,r).cutvalue=ot(e,t,n)}function ot(e,t,n){var i=e.node(n).parent,a=!0,o=t.edge(n,i),s=0;return o||=(a=!1,t.edge(i,n)),s=o.weight,r.s(t.nodeEdges(n),function(r){var o=r.v===n,c=o?r.w:r.v;if(c!==i){var l=o===a,u=t.edge(r).weight;if(s+=l?u:-u,ft(e,n,c)){var d=e.edge(n,c).cutvalue;s+=l?-d:d}}}),s}function X(e,t){arguments.length<2&&(t=e.nodes()[0]),st(e,{},1,t)}function st(e,t,n,i,a){var o=n,s=e.node(i);return t[i]=!0,r.s(e.neighbors(i),function(r){Object.prototype.hasOwnProperty.call(t,r)||(n=st(e,t,n,r,i))}),s.low=o,s.lim=n++,a?s.parent=a:delete s.parent,n}function ct(e){return i.l(e.edges(),function(t){return e.edge(t).cutvalue<0})}function lt(e,t,n){var i=n.v,a=n.w;t.hasEdge(i,a)||(i=n.w,a=n.v);var o=e.node(i),s=e.node(a),c=o,l=!1;return o.lim>s.lim&&(c=s,l=!0),v(r.a(t.edges(),function(t){return l===Z(e,e.node(t.v),c)&&l!==Z(e,e.node(t.w),c)}),function(e){return U(t,e)})}function ut(e,t,n,r){var i=n.v,a=n.w;e.removeEdge(i,a),e.setEdge(r.v,r.w,{}),X(e),Y(e,t),dt(e,t)}function dt(e,t){var n=it(e,i.l(e.nodes(),function(e){return!t.node(e).parent}));n=n.slice(1),r.s(n,function(n){var r=e.node(n).parent,i=t.edge(n,r),a=!1;i||(i=t.edge(r,n),a=!0),t.node(n).rank=t.node(r).rank+(a?i.minlen:-i.minlen)})}function ft(e,t,n){return e.hasEdge(t,n)}function Z(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}function pt(e){switch(e.graph().ranker){case`network-simplex`:gt(e);break;case`tight-tree`:ht(e);break;case`longest-path`:mt(e);break;default:gt(e)}}var mt=H;function ht(e){H(e),W(e)}function gt(e){J(e)}function _t(e){var t=j(e,`root`,{},`_root`),n=yt(e),i=_(r.i(n))-1,a=2*i+1;e.graph().nestingRoot=t,r.s(e.edges(),function(t){e.edge(t).minlen*=a});var o=bt(e)+1;r.s(e.children(),function(r){vt(e,t,a,o,i,n,r)}),e.graph().nodeRankFactor=a}function vt(e,t,n,i,a,o,s){var c=e.children(s);if(!c.length){s!==t&&e.setEdge(t,s,{weight:0,minlen:n});return}var l=F(e,`_bt`),u=F(e,`_bb`),d=e.node(s);e.setParent(l,s),d.borderTop=l,e.setParent(u,s),d.borderBottom=u,r.s(c,function(r){vt(e,t,n,i,a,o,r);var c=e.node(r),d=c.borderTop?c.borderTop:r,f=c.borderBottom?c.borderBottom:r,p=c.borderTop?i:2*i,m=d===f?a-o[s]+1:1;e.setEdge(l,d,{weight:p,minlen:m,nestingEdge:!0}),e.setEdge(f,u,{weight:p,minlen:m,nestingEdge:!0})}),e.parent(s)||e.setEdge(t,l,{weight:0,minlen:a+o[s]})}function yt(e){var t={};function n(i,a){var o=e.children(i);o&&o.length&&r.s(o,function(e){n(e,a+1)}),t[i]=a}return r.s(e.children(),function(e){n(e,1)}),t}function bt(e){return r.n(e.edges(),function(t,n){return t+e.edge(n).weight},0)}function xt(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,r.s(e.edges(),function(t){e.edge(t).nestingEdge&&e.removeEdge(t)})}function St(e,t,n){var i={},a;r.s(n,function(n){for(var r=e.parent(n),o,s;r;){if(o=e.parent(r),o?(s=i[o],i[o]=r):(s=a,a=r),s&&s!==r){t.setEdge(s,r);return}r=o}})}function Ct(e,t,n){var i=wt(e),o=new a.t({compound:!0}).setGraph({root:i}).setDefaultNodeLabel(function(t){return e.node(t)});return r.s(e.nodes(),function(a){var s=e.node(a),c=e.parent(a);(s.rank===t||s.minRank<=t&&t<=s.maxRank)&&(o.setNode(a),o.setParent(a,c||i),r.s(e[n](a),function(t){var n=t.v===a?t.w:t.v,i=o.edge(n,a),s=r.r(i)?0:i.weight;o.setEdge(n,a,{weight:e.edge(t).weight+s})}),Object.prototype.hasOwnProperty.call(s,`minRank`)&&o.setNode(a,{borderLeft:s.borderLeft[t],borderRight:s.borderRight[t]}))}),o}function wt(e){for(var t;e.hasNode(t=O(`_root`)););return t}function Tt(e,t){for(var n=0,r=1;r<t.length;++r)n+=Et(e,t[r-1],t[r]);return n}function Et(e,t,n){for(var a=Oe(n,i.s(n,function(e,t){return t})),o=i.f(i.s(t,function(t){return D(i.s(e.outEdges(t),function(t){return{pos:a[t.w],weight:e.edge(t).weight}}),`pos`)})),s=1;s<n.length;)s<<=1;var c=2*s-1;--s;var l=i.s(Array(c),function(){return 0}),u=0;return r.s(o.forEach(function(e){var t=e.pos+s;l[t]+=e.weight;for(var n=0;t>0;)t%2&&(n+=l[t+1]),t=t-1>>1,l[t]+=e.weight;u+=e.weight*n})),u}function Dt(e){var t={},n=r.a(e.nodes(),function(t){return!e.children(t).length}),a=_(i.s(n,function(t){return e.node(t).rank})),o=i.s(E(a+1),function(){return[]});function s(n){i.o(t,n)||(t[n]=!0,o[e.node(n).rank].push(n),r.s(e.successors(n),s))}var c=D(n,function(t){return e.node(t).rank});return r.s(c,s),o}function Ot(e,t){return i.s(t,function(t){var n=e.inEdges(t);if(n.length){var i=r.n(n,function(t,n){var r=e.edge(n),i=e.node(n.v);return{sum:t.sum+r.weight*i.order,weight:t.weight+r.weight}},{sum:0,weight:0});return{v:t,barycenter:i.sum/i.weight,weight:i.weight}}else return{v:t}})}function kt(e,t){var n={};return r.s(e,function(e,t){var i=n[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:t};r.r(e.barycenter)||(i.barycenter=e.barycenter,i.weight=e.weight)}),r.s(t.edges(),function(e){var t=n[e.v],i=n[e.w];!r.r(t)&&!r.r(i)&&(i.indegree++,t.out.push(n[e.w]))}),At(r.a(n,function(e){return!e.indegree}))}function At(e){var t=[];function n(e){return function(t){t.merged||(r.r(t.barycenter)||r.r(e.barycenter)||t.barycenter>=e.barycenter)&&jt(e,t)}}function a(t){return function(n){n.in.push(t),--n.indegree===0&&e.push(n)}}for(;e.length;){var o=e.pop();t.push(o),r.s(o.in.reverse(),n(o)),r.s(o.out,a(o))}return i.s(r.a(t,function(e){return!e.merged}),function(e){return T(e,[`vs`,`i`,`barycenter`,`weight`])})}function jt(e,t){var n=0,r=0;e.weight&&(n+=e.barycenter*e.weight,r+=e.weight),t.weight&&(n+=t.barycenter*t.weight,r+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=n/r,e.weight=r,e.i=Math.min(t.i,e.i),t.merged=!0}function Mt(e,t){var n=He(e,function(e){return Object.prototype.hasOwnProperty.call(e,`barycenter`)}),a=n.lhs,o=D(n.rhs,function(e){return-e.i}),s=[],c=0,l=0,u=0;a.sort(Pt(!!t)),u=Nt(s,o,u),r.s(a,function(e){u+=e.vs.length,s.push(e.vs),c+=e.barycenter*e.weight,l+=e.weight,u=Nt(s,o,u)});var d={vs:i.f(s)};return l&&(d.barycenter=c/l,d.weight=l),d}function Nt(e,t,n){for(var r;t.length&&(r=i.u(t)).i<=n;)t.pop(),e.push(r.vs),n++;return n}function Pt(e){return function(t,n){return t.barycenter<n.barycenter?-1:t.barycenter>n.barycenter?1:e?n.i-t.i:t.i-n.i}}function Ft(e,t,n,a){var o=e.children(t),s=e.node(t),c=s?s.borderLeft:void 0,l=s?s.borderRight:void 0,u={};c&&(o=r.a(o,function(e){return e!==c&&e!==l}));var d=Ot(e,o);r.s(d,function(t){if(e.children(t.v).length){var r=Ft(e,t.v,n,a);u[t.v]=r,Object.prototype.hasOwnProperty.call(r,`barycenter`)&&Lt(t,r)}});var f=kt(d,n);It(f,u);var p=Mt(f,a);if(c&&(p.vs=i.f([c,p.vs,l]),e.predecessors(c).length)){var m=e.node(e.predecessors(c)[0]),h=e.node(e.predecessors(l)[0]);Object.prototype.hasOwnProperty.call(p,`barycenter`)||(p.barycenter=0,p.weight=0),p.barycenter=(p.barycenter*p.weight+m.order+h.order)/(p.weight+2),p.weight+=2}return p}function It(e,t){r.s(e,function(e){e.vs=i.f(e.vs.map(function(e){return t[e]?t[e].vs:e}))})}function Lt(e,t){r.r(e.barycenter)?(e.barycenter=t.barycenter,e.weight=t.weight):(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight)}function Rt(e){var t=I(e),n=zt(e,E(1,t+1),`inEdges`),r=zt(e,E(t-1,-1,-1),`outEdges`),i=Dt(e);Vt(e,i);for(var a=1/0,o,s=0,c=0;c<4;++s,++c){Bt(s%2?n:r,s%4>=2),i=P(e);var l=Tt(e,i);l<a&&(c=0,o=d(i),a=l)}Vt(e,o)}function zt(e,t,n){return i.s(t,function(t){return Ct(e,t,n)})}function Bt(e,t){var n=new a.t;r.s(e,function(e){var i=e.graph().root,a=Ft(e,i,n,t);r.s(a.vs,function(t,n){e.node(t).order=n}),St(e,n,a.vs)})}function Vt(e,t){r.s(t,function(t){r.s(t,function(t,n){e.node(t).order=n})})}function Ht(e){var t=Wt(e);r.s(e.graph().dummyChains,function(n){for(var r=e.node(n),i=r.edgeObj,a=Ut(e,t,i.v,i.w),o=a.path,s=a.lca,c=0,l=o[c],u=!0;n!==i.w;){if(r=e.node(n),u){for(;(l=o[c])!==s&&e.node(l).maxRank<r.rank;)c++;l===s&&(u=!1)}if(!u){for(;c<o.length-1&&e.node(l=o[c+1]).minRank<=r.rank;)c++;l=o[c]}e.setParent(n,l),n=e.successors(n)[0]}})}function Ut(e,t,n,r){var i=[],a=[],o=Math.min(t[n].low,t[r].low),s=Math.max(t[n].lim,t[r].lim),c=n,l;do c=e.parent(c),i.push(c);while(c&&(t[c].low>o||s>t[c].lim));for(l=c,c=r;(c=e.parent(c))!==l;)a.push(c);return{path:i.concat(a.reverse()),lca:l}}function Wt(e){var t={},n=0;function i(a){var o=n;r.s(e.children(a),i),t[a]={low:o,lim:n++}}return r.s(e.children(),i),t}function Gt(e,t){var n={};function a(t,a){var o=0,s=0,c=t.length,l=i.u(a);return r.s(a,function(t,i){var u=qt(e,t),d=u?e.node(u).order:c;(u||t===l)&&(r.s(a.slice(s,i+1),function(t){r.s(e.predecessors(t),function(r){var i=e.node(r),a=i.order;(a<o||d<a)&&!(i.dummy&&e.node(t).dummy)&&Jt(n,r,t)})}),s=i+1,o=d)}),a}return r.n(t,a),n}function Kt(e,t){var n={};function i(t,i,a,o,s){var c;r.s(E(i,a),function(i){c=t[i],e.node(c).dummy&&r.s(e.predecessors(c),function(t){var r=e.node(t);r.dummy&&(r.order<o||r.order>s)&&Jt(n,t,c)})})}function a(t,n){var a=-1,o,s=0;return r.s(n,function(r,c){if(e.node(r).dummy===`border`){var l=e.predecessors(r);l.length&&(o=e.node(l[0]).order,i(n,s,c,a,o),s=c,a=o)}i(n,s,n.length,o,t.length)}),n}return r.n(t,a),n}function qt(e,t){if(e.node(t).dummy)return i.l(e.predecessors(t),function(t){return e.node(t).dummy})}function Jt(e,t,n){if(t>n){var r=t;t=n,n=r}var i=e[t];i||(e[t]=i={}),i[n]=!0}function Yt(e,t,n){if(t>n){var r=t;t=n,n=r}return!!e[t]&&Object.prototype.hasOwnProperty.call(e[t],n)}function Xt(e,t,n,i){var a={},o={},s={};return r.s(t,function(e){r.s(e,function(e,t){a[e]=e,o[e]=e,s[e]=t})}),r.s(t,function(e){var t=-1;r.s(e,function(e){var r=i(e);if(r.length){r=D(r,function(e){return s[e]});for(var c=(r.length-1)/2,l=Math.floor(c),u=Math.ceil(c);l<=u;++l){var d=r[l];o[e]===e&&t<s[d]&&!Yt(n,e,d)&&(o[d]=e,o[e]=a[e]=a[d],t=s[d])}}})}),{root:a,align:o}}function Zt(e,t,n,i,a){var o={},s=Qt(e,t,n,a),c=a?`borderLeft`:`borderRight`;function l(e,t){for(var n=s.nodes(),r=n.pop(),i={};r;)i[r]?e(r):(i[r]=!0,n.push(r),n=n.concat(t(r))),r=n.pop()}function u(e){o[e]=s.inEdges(e).reduce(function(e,t){return Math.max(e,o[t.v]+s.edge(t))},0)}function d(t){var n=s.outEdges(t).reduce(function(e,t){return Math.min(e,o[t.w]-s.edge(t))},1/0),r=e.node(t);n!==1/0&&r.borderType!==c&&(o[t]=Math.max(o[t],n))}return l(u,s.predecessors.bind(s)),l(d,s.successors.bind(s)),r.s(i,function(e){o[e]=o[n[e]]}),o}function Qt(e,t,n,i){var o=new a.t,s=e.graph(),c=rn(s.nodesep,s.edgesep,i);return r.s(t,function(t){var i;r.s(t,function(t){var r=n[t];if(o.setNode(r),i){var a=n[i],s=o.edge(a,r);o.setEdge(a,r,Math.max(c(e,t,i),s||0))}i=t})}),o}function $t(e,t){return v(r.i(t),function(t){var n=-1/0,r=1/0;return p(t,function(t,i){var a=an(e,i)/2;n=Math.max(t+a,n),r=Math.min(t-a,r)}),n-r})}function en(e,t){var n=r.i(t),a=i.n(n),o=_(n);r.s([`u`,`d`],function(n){r.s([`l`,`r`],function(s){var c=n+s,l=e[c],u;if(l!==t){var d=r.i(l);u=s===`l`?a-i.n(d):o-_(d),u&&(e[c]=g(l,function(e){return e+u}))}})})}function tn(e,t){return g(e.ul,function(n,r){if(t)return e[t.toLowerCase()][r];var a=D(i.s(e,r));return(a[1]+a[2])/2})}function nn(e){var n=P(e),a=t._(Gt(e,n),Kt(e,n)),o={},s;return r.s([`u`,`d`],function(t){s=t===`u`?n:r.i(n).reverse(),r.s([`l`,`r`],function(n){n===`r`&&(s=i.s(s,function(e){return r.i(e).reverse()}));var c=(t===`u`?e.predecessors:e.successors).bind(e),l=Xt(e,s,a,c),u=Zt(e,s,l.root,l.align,n===`r`);n===`r`&&(u=g(u,function(e){return-e})),o[t+n]=u})}),en(o,$t(e,o)),tn(o,e.graph().align)}function rn(e,t,n){return function(r,i,a){var o=r.node(i),s=r.node(a),c=0,l;if(c+=o.width/2,Object.prototype.hasOwnProperty.call(o,`labelpos`))switch(o.labelpos.toLowerCase()){case`l`:l=-o.width/2;break;case`r`:l=o.width/2;break}if(l&&(c+=n?l:-l),l=0,c+=(o.dummy?t:e)/2,c+=(s.dummy?t:e)/2,c+=s.width/2,Object.prototype.hasOwnProperty.call(s,`labelpos`))switch(s.labelpos.toLowerCase()){case`l`:l=s.width/2;break;case`r`:l=-s.width/2;break}return l&&(c+=n?l:-l),l=0,c}}function an(e,t){return e.node(t).width}function on(e){e=M(e),sn(e),m(nn(e),function(t,n){e.node(n).x=t})}function sn(e){var t=P(e),n=e.graph().ranksep,a=0;r.s(t,function(t){var o=_(i.s(t,function(t){return e.node(t).height}));r.s(t,function(t){e.node(t).y=a+o/2}),a+=o+n})}function cn(e,t){var n=t&&t.debugTiming?Ue:We;n(`layout`,()=>{var t=n(` buildLayoutGraph`,()=>yn(e));n(` runLayout`,()=>ln(t,n)),n(` updateInputGraph`,()=>un(e,t))})}function ln(e,t){t(` makeSpaceForEdgeLabels`,()=>bn(e)),t(` removeSelfEdges`,()=>kn(e)),t(` acyclic`,()=>Ie(e)),t(` nestingGraph.run`,()=>_t(e)),t(` rank`,()=>pt(M(e))),t(` injectEdgeLabelProxies`,()=>xn(e)),t(` removeEmptyRanks`,()=>Ve(e)),t(` nestingGraph.cleanup`,()=>xt(e)),t(` normalizeRanks`,()=>Be(e)),t(` assignRankMinMax`,()=>Sn(e)),t(` removeEdgeLabelProxies`,()=>Cn(e)),t(` normalize.run`,()=>Xe(e)),t(` parentDummyChains`,()=>Ht(e)),t(` addBorderSegments`,()=>Ge(e)),t(` order`,()=>Rt(e)),t(` insertSelfEdges`,()=>An(e)),t(` adjustCoordinateSystem`,()=>Ke(e)),t(` position`,()=>on(e)),t(` positionSelfEdges`,()=>jn(e)),t(` removeBorderNodes`,()=>On(e)),t(` normalize.undo`,()=>Qe(e)),t(` fixupEdgeLabelCoords`,()=>En(e)),t(` undoCoordinateSystem`,()=>qe(e)),t(` translateGraph`,()=>wn(e)),t(` assignNodeIntersects`,()=>Tn(e)),t(` reversePoints`,()=>Dn(e)),t(` acyclic.undo`,()=>Re(e))}function un(e,t){r.s(e.nodes(),function(n){var r=e.node(n),i=t.node(n);r&&(r.x=i.x,r.y=i.y,t.children(n).length&&(r.width=i.width,r.height=i.height))}),r.s(e.edges(),function(n){var r=e.edge(n),i=t.edge(n);r.points=i.points,Object.prototype.hasOwnProperty.call(i,`x`)&&(r.x=i.x,r.y=i.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}var dn=[`nodesep`,`edgesep`,`ranksep`,`marginx`,`marginy`],fn={ranksep:50,edgesep:20,nodesep:50,rankdir:`tb`},pn=[`acyclicer`,`ranker`,`rankdir`,`align`],mn=[`width`,`height`],hn={width:0,height:0},gn=[`minlen`,`weight`,`width`,`height`,`labeloffset`],_n={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:`r`},vn=[`labelpos`];function yn(e){var n=new a.t({multigraph:!0,compound:!0}),o=$(e.graph());return n.setGraph(t._({},fn,Q(o,dn),T(o,pn))),r.s(e.nodes(),function(t){var r=$(e.node(t));n.setNode(t,i.d(Q(r,mn),hn)),n.setParent(t,e.parent(t))}),r.s(e.edges(),function(r){var i=$(e.edge(r));n.setEdge(r,t._({},_n,Q(i,gn),T(i,vn)))}),n}function bn(e){var t=e.graph();t.ranksep/=2,r.s(e.edges(),function(n){var r=e.edge(n);r.minlen*=2,r.labelpos.toLowerCase()!==`c`&&(t.rankdir===`TB`||t.rankdir===`BT`?r.width+=r.labeloffset:r.height+=r.labeloffset)})}function xn(e){r.s(e.edges(),function(t){var n=e.edge(t);if(n.width&&n.height){var r=e.node(t.v);j(e,`edge-proxy`,{rank:(e.node(t.w).rank-r.rank)/2+r.rank,e:t},`_ep`)}})}function Sn(e){var t=0;r.s(e.nodes(),function(n){var r=e.node(n);r.borderTop&&(r.minRank=e.node(r.borderTop).rank,r.maxRank=e.node(r.borderBottom).rank,t=_(t,r.maxRank))}),e.graph().maxRank=t}function Cn(e){r.s(e.nodes(),function(t){var n=e.node(t);n.dummy===`edge-proxy`&&(e.edge(n.e).labelRank=n.rank,e.removeNode(t))})}function wn(e){var t=1/0,n=0,i=1/0,a=0,o=e.graph(),s=o.marginx||0,c=o.marginy||0;function l(e){var r=e.x,o=e.y,s=e.width,c=e.height;t=Math.min(t,r-s/2),n=Math.max(n,r+s/2),i=Math.min(i,o-c/2),a=Math.max(a,o+c/2)}r.s(e.nodes(),function(t){l(e.node(t))}),r.s(e.edges(),function(t){var n=e.edge(t);Object.prototype.hasOwnProperty.call(n,`x`)&&l(n)}),t-=s,i-=c,r.s(e.nodes(),function(n){var r=e.node(n);r.x-=t,r.y-=i}),r.s(e.edges(),function(n){var a=e.edge(n);r.s(a.points,function(e){e.x-=t,e.y-=i}),Object.prototype.hasOwnProperty.call(a,`x`)&&(a.x-=t),Object.prototype.hasOwnProperty.call(a,`y`)&&(a.y-=i)}),o.width=n-t+s,o.height=a-i+c}function Tn(e){r.s(e.edges(),function(t){var n=e.edge(t),r=e.node(t.v),i=e.node(t.w),a,o;n.points?(a=n.points[0],o=n.points[n.points.length-1]):(n.points=[],a=i,o=r),n.points.unshift(N(r,a)),n.points.push(N(i,o))})}function En(e){r.s(e.edges(),function(t){var n=e.edge(t);if(Object.prototype.hasOwnProperty.call(n,`x`))switch((n.labelpos===`l`||n.labelpos===`r`)&&(n.width-=n.labeloffset),n.labelpos){case`l`:n.x-=n.width/2+n.labeloffset;break;case`r`:n.x+=n.width/2+n.labeloffset;break}})}function Dn(e){r.s(e.edges(),function(t){var n=e.edge(t);n.reversed&&n.points.reverse()})}function On(e){r.s(e.nodes(),function(t){if(e.children(t).length){var n=e.node(t),r=e.node(n.borderTop),a=e.node(n.borderBottom),o=e.node(i.u(n.borderLeft)),s=e.node(i.u(n.borderRight));n.width=Math.abs(s.x-o.x),n.height=Math.abs(a.y-r.y),n.x=o.x+n.width/2,n.y=r.y+n.height/2}}),r.s(e.nodes(),function(t){e.node(t).dummy===`border`&&e.removeNode(t)})}function kn(e){r.s(e.edges(),function(t){if(t.v===t.w){var n=e.node(t.v);n.selfEdges||=[],n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}function An(e){var t=P(e);r.s(t,function(t){var n=0;r.s(t,function(t,i){var a=e.node(t);a.order=i+n,r.s(a.selfEdges,function(t){j(e,`selfedge`,{width:t.label.width,height:t.label.height,rank:a.rank,order:i+ ++n,e:t.e,label:t.label},`_se`)}),delete a.selfEdges})})}function jn(e){r.s(e.nodes(),function(t){var n=e.node(t);if(n.dummy===`selfedge`){var r=e.node(n.e.v),i=r.x+r.width/2,a=r.y,o=n.x-i,s=r.height/2;e.setEdge(n.e,n.label),e.removeNode(t),n.label.points=[{x:i+2*o/3,y:a-s},{x:i+5*o/6,y:a-s},{x:i+o,y:a},{x:i+5*o/6,y:a+s},{x:i+2*o/3,y:a+s}],n.label.x=n.x,n.label.y=n.y}})}function Q(e,t){return g(T(e,t),Number)}function $(e){var t={};return r.s(e,function(e,n){t[n.toLowerCase()]=e}),t}Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return cn}});
|
|
1
|
+
const e=require("./custom-CFJtq50-.cjs"),t=require("./chunk-S3R3BYOJ-B2ozcJNg.cjs"),n=require("./_createAssigner-DqH64jc7.cjs"),r=require("./_baseUniq-CGg_yy3w.cjs"),i=require("./_basePickBy-Dqo5imhM.cjs"),a=require("./graphlib-DlDIM8qv.cjs");function o(e){return n.i(n.o(e,void 0,i.f),e+``)}var s=RegExp(`[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]`);function c(e){return s.test(e)}var l=1,u=4;function d(e){return r.y(e,l|u)}var f=function(){return n.G.Date.now()};function p(e,t){return e==null?e:n.M(e,r.c(t),n.c)}function m(e,t){return e&&r.d(e,r.c(t))}function h(e,t){return e>t}function g(e,t){var i={};return t=r.f(t,3),r.d(e,function(e,r,a){n.N(i,r,t(e,r,a))}),i}function _(e){return e&&e.length?i.r(e,n.s,h):void 0}function v(e,t){return e&&e.length?i.r(e,r.f(t,2),i.i):void 0}function ee(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}function te(e,t){if(e!==t){var n=e!==void 0,i=e===null,a=e===e,o=r.N(e),s=t!==void 0,c=t===null,l=t===t,u=r.N(t);if(!c&&!u&&!o&&e>t||o&&s&&l&&!c&&!u||i&&s&&l||!n&&l||!a)return 1;if(!i&&!o&&!u&&e<t||u&&n&&a&&!i&&!o||c&&n&&a||!s&&a||!l)return-1}return 0}function ne(e,t,n){for(var r=-1,i=e.criteria,a=t.criteria,o=i.length,s=n.length;++r<o;){var c=te(i[r],a[r]);if(c)return r>=s?c:c*(n[r]==`desc`?-1:1)}return e.index-t.index}function re(e,t,a){t=t.length?r.M(t,function(e){return n.b(e)?function(t){return r.C(t,e.length===1?e[0]:e)}:e}):[n.s];var o=-1;return t=r.M(t,n.h(r.f)),ee(i.c(e,function(e,n,i){return{criteria:r.M(t,function(t){return t(e)}),index:++o,value:e}}),function(e,t){return ne(e,t,a)})}var ie=r.p(`length`),ae=`\\ud800-\\udfff`,oe=`\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff`,se=`\\ufe0e\\ufe0f`,ce=`[`+ae+`]`,y=`[`+oe+`]`,b=`\\ud83c[\\udffb-\\udfff]`,le=`(?:`+y+`|`+b+`)`,ue=`[^`+ae+`]`,de=`(?:\\ud83c[\\udde6-\\uddff]){2}`,x=`[\\ud800-\\udbff][\\udc00-\\udfff]`,fe=`\\u200d`,S=le+`?`,C=`[`+se+`]?`,pe=`(?:`+fe+`(?:`+[ue,de,x].join(`|`)+`)`+C+S+`)*`,me=C+S+pe,he=`(?:`+[ue+y+`?`,y,de,x,ce].join(`|`)+`)`,w=RegExp(b+`(?=`+b+`)|`+he+me,`g`);function ge(e){for(var t=w.lastIndex=0;w.test(e);)++t;return t}function _e(e){return c(e)?ge(e):ie(e)}function ve(e,t){return i.t(e,t,function(t,n){return r.m(e,n)})}var T=o(function(e,t){return e==null?{}:ve(e,t)}),ye=Math.ceil,be=Math.max;function xe(e,t,n,r){for(var i=-1,a=be(ye((t-e)/(n||1)),0),o=Array(a);a--;)o[r?a:++i]=e,e+=n;return o}function Se(e){return function(t,r,a){return a&&typeof a!=`number`&&n.n(t,r,a)&&(r=a=void 0),t=i.m(t),r===void 0?(r=t,t=0):r=i.m(r),a=a===void 0?t<r?1:-1:i.m(a),xe(t,r,a,e)}}var E=Se(),Ce=`[object Map]`,we=`[object Set]`;function Te(t){if(t==null)return 0;if(n.v(t))return i.a(t)?_e(t):t.length;var r=e.a(t);return r==Ce||r==we?t.size:e.s(t).length}var D=n.r(function(e,t){if(e==null)return[];var i=t.length;return i>1&&n.n(e,t[0],t[1])?t=[]:i>2&&n.n(t[0],t[1],t[2])&&(t=[t[0]]),re(e,r.S(t,1),[])}),Ee=0;function O(e){var t=++Ee;return r.E(e)+t}function De(e,t,n){for(var r=-1,i=e.length,a=t.length,o={};++r<i;){var s=r<a?t[r]:void 0;n(o,e[r],s)}return o}function Oe(e,t){return De(e||[],t||[],n.f)}var ke=class{constructor(){var e={};e._next=e._prev=e,this._sentinel=e}dequeue(){var e=this._sentinel,t=e._prev;if(t!==e)return Ae(t),t}enqueue(e){var t=this._sentinel;e._prev&&e._next&&Ae(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t}toString(){for(var e=[],t=this._sentinel,n=t._prev;n!==t;)e.push(JSON.stringify(n,je)),n=n._prev;return`[`+e.join(`, `)+`]`}};function Ae(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function je(e,t){if(e!==`_next`&&e!==`_prev`)return t}var Me=n.a(1);function Ne(e,t){if(e.nodeCount()<=1)return[];var n=Fe(e,t||Me),r=Pe(n.graph,n.buckets,n.zeroIdx);return i.f(i.s(r,function(t){return e.outEdges(t.v,t.w)}))}function Pe(e,t,n){for(var r=[],i=t[t.length-1],a=t[0],o;e.nodeCount();){for(;o=a.dequeue();)k(e,t,n,o);for(;o=i.dequeue();)k(e,t,n,o);if(e.nodeCount()){for(var s=t.length-2;s>0;--s)if(o=t[s].dequeue(),o){r=r.concat(k(e,t,n,o,!0));break}}}return r}function k(e,t,n,i,a){var o=a?[]:void 0;return r.s(e.inEdges(i.v),function(r){var i=e.edge(r),s=e.node(r.v);a&&o.push({v:r.v,w:r.w}),s.out-=i,A(t,n,s)}),r.s(e.outEdges(i.v),function(r){var i=e.edge(r),a=r.w,o=e.node(a);o.in-=i,A(t,n,o)}),e.removeNode(i.v),o}function Fe(e,t){var n=new a.t,i=0,o=0;r.s(e.nodes(),function(e){n.setNode(e,{v:e,in:0,out:0})}),r.s(e.edges(),function(e){var r=n.edge(e.v,e.w)||0,a=t(e),s=r+a;n.setEdge(e.v,e.w,s),o=Math.max(o,n.node(e.v).out+=a),i=Math.max(i,n.node(e.w).in+=a)});var s=E(o+i+3).map(function(){return new ke}),c=i+1;return r.s(n.nodes(),function(e){A(s,c,n.node(e))}),{graph:n,buckets:s,zeroIdx:c}}function A(e,t,n){n.out?n.in?e[n.out-n.in+t].enqueue(n):e[e.length-1].enqueue(n):e[0].enqueue(n)}function Ie(e){var t=e.graph().acyclicer===`greedy`?Ne(e,n(e)):Le(e);r.s(t,function(t){var n=e.edge(t);e.removeEdge(t),n.forwardName=t.name,n.reversed=!0,e.setEdge(t.w,t.v,n,O(`rev`))});function n(e){return function(t){return e.edge(t).weight}}}function Le(e){var t=[],n={},i={};function a(o){Object.prototype.hasOwnProperty.call(i,o)||(i[o]=!0,n[o]=!0,r.s(e.outEdges(o),function(e){Object.prototype.hasOwnProperty.call(n,e.w)?t.push(e):a(e.w)}),delete n[o])}return r.s(e.nodes(),a),t}function Re(e){r.s(e.edges(),function(t){var n=e.edge(t);if(n.reversed){e.removeEdge(t);var r=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,r)}})}function j(e,t,n,r){var i;do i=O(r);while(e.hasNode(i));return n.dummy=t,e.setNode(i,n),i}function ze(e){var t=new a.t().setGraph(e.graph());return r.s(e.nodes(),function(n){t.setNode(n,e.node(n))}),r.s(e.edges(),function(n){var r=t.edge(n.v,n.w)||{weight:0,minlen:1},i=e.edge(n);t.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})}),t}function M(e){var t=new a.t({multigraph:e.isMultigraph()}).setGraph(e.graph());return r.s(e.nodes(),function(n){e.children(n).length||t.setNode(n,e.node(n))}),r.s(e.edges(),function(n){t.setEdge(n,e.edge(n))}),t}function N(e,t){var n=e.x,r=e.y,i=t.x-n,a=t.y-r,o=e.width/2,s=e.height/2;if(!i&&!a)throw Error(`Not possible to find intersection inside of the rectangle`);var c,l;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),c=s*i/a,l=s):(i<0&&(o=-o),c=o,l=o*a/i),{x:n+c,y:r+l}}function P(e){var t=i.s(E(I(e)+1),function(){return[]});return r.s(e.nodes(),function(n){var i=e.node(n),a=i.rank;r.r(a)||(t[a][i.order]=n)}),t}function Be(e){var t=i.n(i.s(e.nodes(),function(t){return e.node(t).rank}));r.s(e.nodes(),function(n){var r=e.node(n);i.o(r,`rank`)&&(r.rank-=t)})}function Ve(e){var t=i.n(i.s(e.nodes(),function(t){return e.node(t).rank})),n=[];r.s(e.nodes(),function(r){var i=e.node(r).rank-t;n[i]||(n[i]=[]),n[i].push(r)});var a=0,o=e.graph().nodeRankFactor;r.s(n,function(t,n){r.r(t)&&n%o!==0?--a:a&&r.s(t,function(t){e.node(t).rank+=a})})}function F(e,t,n,r){var i={width:0,height:0};return arguments.length>=4&&(i.rank=n,i.order=r),j(e,`border`,i,t)}function I(e){return _(i.s(e.nodes(),function(t){var n=e.node(t).rank;if(!r.r(n))return n}))}function He(e,t){var n={lhs:[],rhs:[]};return r.s(e,function(e){t(e)?n.lhs.push(e):n.rhs.push(e)}),n}function Ue(e,t){var n=f();try{return t()}finally{console.log(e+` time: `+(f()-n)+`ms`)}}function We(e,t){return t()}function Ge(e){function t(n){var i=e.children(n),a=e.node(n);if(i.length&&r.s(i,t),Object.prototype.hasOwnProperty.call(a,`minRank`)){a.borderLeft=[],a.borderRight=[];for(var o=a.minRank,s=a.maxRank+1;o<s;++o)L(e,`borderLeft`,`_bl`,n,a,o),L(e,`borderRight`,`_br`,n,a,o)}}r.s(e.children(),t)}function L(e,t,n,r,i,a){var o={width:0,height:0,rank:a,borderType:t},s=i[t][a-1],c=j(e,`border`,o,n);i[t][a]=c,e.setParent(c,r),s&&e.setEdge(s,c,{weight:1})}function Ke(e){var t=e.graph().rankdir.toLowerCase();(t===`lr`||t===`rl`)&&R(e)}function qe(e){var t=e.graph().rankdir.toLowerCase();(t===`bt`||t===`rl`)&&Je(e),(t===`lr`||t===`rl`)&&(Ye(e),R(e))}function R(e){r.s(e.nodes(),function(t){z(e.node(t))}),r.s(e.edges(),function(t){z(e.edge(t))})}function z(e){var t=e.width;e.width=e.height,e.height=t}function Je(e){r.s(e.nodes(),function(t){B(e.node(t))}),r.s(e.edges(),function(t){var n=e.edge(t);r.s(n.points,B),Object.prototype.hasOwnProperty.call(n,`y`)&&B(n)})}function B(e){e.y=-e.y}function Ye(e){r.s(e.nodes(),function(t){V(e.node(t))}),r.s(e.edges(),function(t){var n=e.edge(t);r.s(n.points,V),Object.prototype.hasOwnProperty.call(n,`x`)&&V(n)})}function V(e){var t=e.x;e.x=e.y,e.y=t}function Xe(e){e.graph().dummyChains=[],r.s(e.edges(),function(t){Ze(e,t)})}function Ze(e,t){var n=t.v,r=e.node(n).rank,i=t.w,a=e.node(i).rank,o=t.name,s=e.edge(t),c=s.labelRank;if(a!==r+1){e.removeEdge(t);var l=void 0,u,d;for(d=0,++r;r<a;++d,++r)s.points=[],l={width:0,height:0,edgeLabel:s,edgeObj:t,rank:r},u=j(e,`edge`,l,`_d`),r===c&&(l.width=s.width,l.height=s.height,l.dummy=`edge-label`,l.labelpos=s.labelpos),e.setEdge(n,u,{weight:s.weight},o),d===0&&e.graph().dummyChains.push(u),n=u;e.setEdge(n,i,{weight:s.weight},o)}}function Qe(e){r.s(e.graph().dummyChains,function(t){var n=e.node(t),r=n.edgeLabel,i;for(e.setEdge(n.edgeObj,r);n.dummy;)i=e.successors(t)[0],e.removeNode(t),r.points.push({x:n.x,y:n.y}),n.dummy===`edge-label`&&(r.x=n.x,r.y=n.y,r.width=n.width,r.height=n.height),t=i,n=e.node(t)})}function H(e){var t={};function n(r){var a=e.node(r);if(Object.prototype.hasOwnProperty.call(t,r))return a.rank;t[r]=!0;var o=i.n(i.s(e.outEdges(r),function(t){return n(t.w)-e.edge(t).minlen}));return(o===1/0||o==null)&&(o=0),a.rank=o}r.s(e.sources(),n)}function U(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}function W(e){var t=new a.t({directed:!1}),n=e.nodes()[0],r=e.nodeCount();t.setNode(n,{});for(var i,o;$e(t,e)<r;)i=et(t,e),o=t.hasNode(i.v)?U(e,i):-U(e,i),tt(t,e,o);return t}function $e(e,t){function n(i){r.s(t.nodeEdges(i),function(r){var a=r.v,o=i===a?r.w:a;!e.hasNode(o)&&!U(t,r)&&(e.setNode(o,{}),e.setEdge(i,o,{}),n(o))})}return r.s(e.nodes(),n),e.nodeCount()}function et(e,t){return v(t.edges(),function(n){if(e.hasNode(n.v)!==e.hasNode(n.w))return U(t,n)})}function tt(e,t,n){r.s(e.nodes(),function(e){t.node(e).rank+=n})}n.a(1),n.a(1),nt.CycleException=G;function nt(e){var t={},n={},i=[];function a(o){if(Object.prototype.hasOwnProperty.call(n,o))throw new G;Object.prototype.hasOwnProperty.call(t,o)||(n[o]=!0,t[o]=!0,r.s(e.predecessors(o),a),delete n[o],i.push(o))}if(r.s(e.sinks(),a),Te(t)!==e.nodeCount())throw new G;return i}function G(){}G.prototype=Error();function K(e,t,i){n.b(t)||(t=[t]);var a=(e.isDirected()?e.successors:e.neighbors).bind(e),o=[],s={};return r.s(t,function(t){if(!e.hasNode(t))throw Error(`Graph does not have node: `+t);q(e,t,i===`post`,s,a,o)}),o}function q(e,t,n,i,a,o){Object.prototype.hasOwnProperty.call(i,t)||(i[t]=!0,n||o.push(t),r.s(a(t),function(t){q(e,t,n,i,a,o)}),n&&o.push(t))}function rt(e,t){return K(e,t,`post`)}function it(e,t){return K(e,t,`pre`)}J.initLowLimValues=X,J.initCutValues=Y,J.calcCutValue=ot,J.leaveEdge=ct,J.enterEdge=lt,J.exchangeEdges=ut;function J(e){e=ze(e),H(e);var t=W(e);X(t),Y(t,e);for(var n,r;n=ct(t);)r=lt(t,e,n),ut(t,e,n,r)}function Y(e,t){var n=rt(e,e.nodes());n=n.slice(0,n.length-1),r.s(n,function(n){at(e,t,n)})}function at(e,t,n){var r=e.node(n).parent;e.edge(n,r).cutvalue=ot(e,t,n)}function ot(e,t,n){var i=e.node(n).parent,a=!0,o=t.edge(n,i),s=0;return o||=(a=!1,t.edge(i,n)),s=o.weight,r.s(t.nodeEdges(n),function(r){var o=r.v===n,c=o?r.w:r.v;if(c!==i){var l=o===a,u=t.edge(r).weight;if(s+=l?u:-u,ft(e,n,c)){var d=e.edge(n,c).cutvalue;s+=l?-d:d}}}),s}function X(e,t){arguments.length<2&&(t=e.nodes()[0]),st(e,{},1,t)}function st(e,t,n,i,a){var o=n,s=e.node(i);return t[i]=!0,r.s(e.neighbors(i),function(r){Object.prototype.hasOwnProperty.call(t,r)||(n=st(e,t,n,r,i))}),s.low=o,s.lim=n++,a?s.parent=a:delete s.parent,n}function ct(e){return i.l(e.edges(),function(t){return e.edge(t).cutvalue<0})}function lt(e,t,n){var i=n.v,a=n.w;t.hasEdge(i,a)||(i=n.w,a=n.v);var o=e.node(i),s=e.node(a),c=o,l=!1;return o.lim>s.lim&&(c=s,l=!0),v(r.a(t.edges(),function(t){return l===Z(e,e.node(t.v),c)&&l!==Z(e,e.node(t.w),c)}),function(e){return U(t,e)})}function ut(e,t,n,r){var i=n.v,a=n.w;e.removeEdge(i,a),e.setEdge(r.v,r.w,{}),X(e),Y(e,t),dt(e,t)}function dt(e,t){var n=it(e,i.l(e.nodes(),function(e){return!t.node(e).parent}));n=n.slice(1),r.s(n,function(n){var r=e.node(n).parent,i=t.edge(n,r),a=!1;i||(i=t.edge(r,n),a=!0),t.node(n).rank=t.node(r).rank+(a?i.minlen:-i.minlen)})}function ft(e,t,n){return e.hasEdge(t,n)}function Z(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}function pt(e){switch(e.graph().ranker){case`network-simplex`:gt(e);break;case`tight-tree`:ht(e);break;case`longest-path`:mt(e);break;default:gt(e)}}var mt=H;function ht(e){H(e),W(e)}function gt(e){J(e)}function _t(e){var t=j(e,`root`,{},`_root`),n=yt(e),i=_(r.i(n))-1,a=2*i+1;e.graph().nestingRoot=t,r.s(e.edges(),function(t){e.edge(t).minlen*=a});var o=bt(e)+1;r.s(e.children(),function(r){vt(e,t,a,o,i,n,r)}),e.graph().nodeRankFactor=a}function vt(e,t,n,i,a,o,s){var c=e.children(s);if(!c.length){s!==t&&e.setEdge(t,s,{weight:0,minlen:n});return}var l=F(e,`_bt`),u=F(e,`_bb`),d=e.node(s);e.setParent(l,s),d.borderTop=l,e.setParent(u,s),d.borderBottom=u,r.s(c,function(r){vt(e,t,n,i,a,o,r);var c=e.node(r),d=c.borderTop?c.borderTop:r,f=c.borderBottom?c.borderBottom:r,p=c.borderTop?i:2*i,m=d===f?a-o[s]+1:1;e.setEdge(l,d,{weight:p,minlen:m,nestingEdge:!0}),e.setEdge(f,u,{weight:p,minlen:m,nestingEdge:!0})}),e.parent(s)||e.setEdge(t,l,{weight:0,minlen:a+o[s]})}function yt(e){var t={};function n(i,a){var o=e.children(i);o&&o.length&&r.s(o,function(e){n(e,a+1)}),t[i]=a}return r.s(e.children(),function(e){n(e,1)}),t}function bt(e){return r.n(e.edges(),function(t,n){return t+e.edge(n).weight},0)}function xt(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,r.s(e.edges(),function(t){e.edge(t).nestingEdge&&e.removeEdge(t)})}function St(e,t,n){var i={},a;r.s(n,function(n){for(var r=e.parent(n),o,s;r;){if(o=e.parent(r),o?(s=i[o],i[o]=r):(s=a,a=r),s&&s!==r){t.setEdge(s,r);return}r=o}})}function Ct(e,t,n){var i=wt(e),o=new a.t({compound:!0}).setGraph({root:i}).setDefaultNodeLabel(function(t){return e.node(t)});return r.s(e.nodes(),function(a){var s=e.node(a),c=e.parent(a);(s.rank===t||s.minRank<=t&&t<=s.maxRank)&&(o.setNode(a),o.setParent(a,c||i),r.s(e[n](a),function(t){var n=t.v===a?t.w:t.v,i=o.edge(n,a),s=r.r(i)?0:i.weight;o.setEdge(n,a,{weight:e.edge(t).weight+s})}),Object.prototype.hasOwnProperty.call(s,`minRank`)&&o.setNode(a,{borderLeft:s.borderLeft[t],borderRight:s.borderRight[t]}))}),o}function wt(e){for(var t;e.hasNode(t=O(`_root`)););return t}function Tt(e,t){for(var n=0,r=1;r<t.length;++r)n+=Et(e,t[r-1],t[r]);return n}function Et(e,t,n){for(var a=Oe(n,i.s(n,function(e,t){return t})),o=i.f(i.s(t,function(t){return D(i.s(e.outEdges(t),function(t){return{pos:a[t.w],weight:e.edge(t).weight}}),`pos`)})),s=1;s<n.length;)s<<=1;var c=2*s-1;--s;var l=i.s(Array(c),function(){return 0}),u=0;return r.s(o.forEach(function(e){var t=e.pos+s;l[t]+=e.weight;for(var n=0;t>0;)t%2&&(n+=l[t+1]),t=t-1>>1,l[t]+=e.weight;u+=e.weight*n})),u}function Dt(e){var t={},n=r.a(e.nodes(),function(t){return!e.children(t).length}),a=_(i.s(n,function(t){return e.node(t).rank})),o=i.s(E(a+1),function(){return[]});function s(n){i.o(t,n)||(t[n]=!0,o[e.node(n).rank].push(n),r.s(e.successors(n),s))}var c=D(n,function(t){return e.node(t).rank});return r.s(c,s),o}function Ot(e,t){return i.s(t,function(t){var n=e.inEdges(t);if(n.length){var i=r.n(n,function(t,n){var r=e.edge(n),i=e.node(n.v);return{sum:t.sum+r.weight*i.order,weight:t.weight+r.weight}},{sum:0,weight:0});return{v:t,barycenter:i.sum/i.weight,weight:i.weight}}else return{v:t}})}function kt(e,t){var n={};return r.s(e,function(e,t){var i=n[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:t};r.r(e.barycenter)||(i.barycenter=e.barycenter,i.weight=e.weight)}),r.s(t.edges(),function(e){var t=n[e.v],i=n[e.w];!r.r(t)&&!r.r(i)&&(i.indegree++,t.out.push(n[e.w]))}),At(r.a(n,function(e){return!e.indegree}))}function At(e){var t=[];function n(e){return function(t){t.merged||(r.r(t.barycenter)||r.r(e.barycenter)||t.barycenter>=e.barycenter)&&jt(e,t)}}function a(t){return function(n){n.in.push(t),--n.indegree===0&&e.push(n)}}for(;e.length;){var o=e.pop();t.push(o),r.s(o.in.reverse(),n(o)),r.s(o.out,a(o))}return i.s(r.a(t,function(e){return!e.merged}),function(e){return T(e,[`vs`,`i`,`barycenter`,`weight`])})}function jt(e,t){var n=0,r=0;e.weight&&(n+=e.barycenter*e.weight,r+=e.weight),t.weight&&(n+=t.barycenter*t.weight,r+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=n/r,e.weight=r,e.i=Math.min(t.i,e.i),t.merged=!0}function Mt(e,t){var n=He(e,function(e){return Object.prototype.hasOwnProperty.call(e,`barycenter`)}),a=n.lhs,o=D(n.rhs,function(e){return-e.i}),s=[],c=0,l=0,u=0;a.sort(Pt(!!t)),u=Nt(s,o,u),r.s(a,function(e){u+=e.vs.length,s.push(e.vs),c+=e.barycenter*e.weight,l+=e.weight,u=Nt(s,o,u)});var d={vs:i.f(s)};return l&&(d.barycenter=c/l,d.weight=l),d}function Nt(e,t,n){for(var r;t.length&&(r=i.u(t)).i<=n;)t.pop(),e.push(r.vs),n++;return n}function Pt(e){return function(t,n){return t.barycenter<n.barycenter?-1:t.barycenter>n.barycenter?1:e?n.i-t.i:t.i-n.i}}function Ft(e,t,n,a){var o=e.children(t),s=e.node(t),c=s?s.borderLeft:void 0,l=s?s.borderRight:void 0,u={};c&&(o=r.a(o,function(e){return e!==c&&e!==l}));var d=Ot(e,o);r.s(d,function(t){if(e.children(t.v).length){var r=Ft(e,t.v,n,a);u[t.v]=r,Object.prototype.hasOwnProperty.call(r,`barycenter`)&&Lt(t,r)}});var f=kt(d,n);It(f,u);var p=Mt(f,a);if(c&&(p.vs=i.f([c,p.vs,l]),e.predecessors(c).length)){var m=e.node(e.predecessors(c)[0]),h=e.node(e.predecessors(l)[0]);Object.prototype.hasOwnProperty.call(p,`barycenter`)||(p.barycenter=0,p.weight=0),p.barycenter=(p.barycenter*p.weight+m.order+h.order)/(p.weight+2),p.weight+=2}return p}function It(e,t){r.s(e,function(e){e.vs=i.f(e.vs.map(function(e){return t[e]?t[e].vs:e}))})}function Lt(e,t){r.r(e.barycenter)?(e.barycenter=t.barycenter,e.weight=t.weight):(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight)}function Rt(e){var t=I(e),n=zt(e,E(1,t+1),`inEdges`),r=zt(e,E(t-1,-1,-1),`outEdges`),i=Dt(e);Vt(e,i);for(var a=1/0,o,s=0,c=0;c<4;++s,++c){Bt(s%2?n:r,s%4>=2),i=P(e);var l=Tt(e,i);l<a&&(c=0,o=d(i),a=l)}Vt(e,o)}function zt(e,t,n){return i.s(t,function(t){return Ct(e,t,n)})}function Bt(e,t){var n=new a.t;r.s(e,function(e){var i=e.graph().root,a=Ft(e,i,n,t);r.s(a.vs,function(t,n){e.node(t).order=n}),St(e,n,a.vs)})}function Vt(e,t){r.s(t,function(t){r.s(t,function(t,n){e.node(t).order=n})})}function Ht(e){var t=Wt(e);r.s(e.graph().dummyChains,function(n){for(var r=e.node(n),i=r.edgeObj,a=Ut(e,t,i.v,i.w),o=a.path,s=a.lca,c=0,l=o[c],u=!0;n!==i.w;){if(r=e.node(n),u){for(;(l=o[c])!==s&&e.node(l).maxRank<r.rank;)c++;l===s&&(u=!1)}if(!u){for(;c<o.length-1&&e.node(l=o[c+1]).minRank<=r.rank;)c++;l=o[c]}e.setParent(n,l),n=e.successors(n)[0]}})}function Ut(e,t,n,r){var i=[],a=[],o=Math.min(t[n].low,t[r].low),s=Math.max(t[n].lim,t[r].lim),c=n,l;do c=e.parent(c),i.push(c);while(c&&(t[c].low>o||s>t[c].lim));for(l=c,c=r;(c=e.parent(c))!==l;)a.push(c);return{path:i.concat(a.reverse()),lca:l}}function Wt(e){var t={},n=0;function i(a){var o=n;r.s(e.children(a),i),t[a]={low:o,lim:n++}}return r.s(e.children(),i),t}function Gt(e,t){var n={};function a(t,a){var o=0,s=0,c=t.length,l=i.u(a);return r.s(a,function(t,i){var u=qt(e,t),d=u?e.node(u).order:c;(u||t===l)&&(r.s(a.slice(s,i+1),function(t){r.s(e.predecessors(t),function(r){var i=e.node(r),a=i.order;(a<o||d<a)&&!(i.dummy&&e.node(t).dummy)&&Jt(n,r,t)})}),s=i+1,o=d)}),a}return r.n(t,a),n}function Kt(e,t){var n={};function i(t,i,a,o,s){var c;r.s(E(i,a),function(i){c=t[i],e.node(c).dummy&&r.s(e.predecessors(c),function(t){var r=e.node(t);r.dummy&&(r.order<o||r.order>s)&&Jt(n,t,c)})})}function a(t,n){var a=-1,o,s=0;return r.s(n,function(r,c){if(e.node(r).dummy===`border`){var l=e.predecessors(r);l.length&&(o=e.node(l[0]).order,i(n,s,c,a,o),s=c,a=o)}i(n,s,n.length,o,t.length)}),n}return r.n(t,a),n}function qt(e,t){if(e.node(t).dummy)return i.l(e.predecessors(t),function(t){return e.node(t).dummy})}function Jt(e,t,n){if(t>n){var r=t;t=n,n=r}var i=e[t];i||(e[t]=i={}),i[n]=!0}function Yt(e,t,n){if(t>n){var r=t;t=n,n=r}return!!e[t]&&Object.prototype.hasOwnProperty.call(e[t],n)}function Xt(e,t,n,i){var a={},o={},s={};return r.s(t,function(e){r.s(e,function(e,t){a[e]=e,o[e]=e,s[e]=t})}),r.s(t,function(e){var t=-1;r.s(e,function(e){var r=i(e);if(r.length){r=D(r,function(e){return s[e]});for(var c=(r.length-1)/2,l=Math.floor(c),u=Math.ceil(c);l<=u;++l){var d=r[l];o[e]===e&&t<s[d]&&!Yt(n,e,d)&&(o[d]=e,o[e]=a[e]=a[d],t=s[d])}}})}),{root:a,align:o}}function Zt(e,t,n,i,a){var o={},s=Qt(e,t,n,a),c=a?`borderLeft`:`borderRight`;function l(e,t){for(var n=s.nodes(),r=n.pop(),i={};r;)i[r]?e(r):(i[r]=!0,n.push(r),n=n.concat(t(r))),r=n.pop()}function u(e){o[e]=s.inEdges(e).reduce(function(e,t){return Math.max(e,o[t.v]+s.edge(t))},0)}function d(t){var n=s.outEdges(t).reduce(function(e,t){return Math.min(e,o[t.w]-s.edge(t))},1/0),r=e.node(t);n!==1/0&&r.borderType!==c&&(o[t]=Math.max(o[t],n))}return l(u,s.predecessors.bind(s)),l(d,s.successors.bind(s)),r.s(i,function(e){o[e]=o[n[e]]}),o}function Qt(e,t,n,i){var o=new a.t,s=e.graph(),c=rn(s.nodesep,s.edgesep,i);return r.s(t,function(t){var i;r.s(t,function(t){var r=n[t];if(o.setNode(r),i){var a=n[i],s=o.edge(a,r);o.setEdge(a,r,Math.max(c(e,t,i),s||0))}i=t})}),o}function $t(e,t){return v(r.i(t),function(t){var n=-1/0,r=1/0;return p(t,function(t,i){var a=an(e,i)/2;n=Math.max(t+a,n),r=Math.min(t-a,r)}),n-r})}function en(e,t){var n=r.i(t),a=i.n(n),o=_(n);r.s([`u`,`d`],function(n){r.s([`l`,`r`],function(s){var c=n+s,l=e[c],u;if(l!==t){var d=r.i(l);u=s===`l`?a-i.n(d):o-_(d),u&&(e[c]=g(l,function(e){return e+u}))}})})}function tn(e,t){return g(e.ul,function(n,r){if(t)return e[t.toLowerCase()][r];var a=D(i.s(e,r));return(a[1]+a[2])/2})}function nn(e){var n=P(e),a=t._(Gt(e,n),Kt(e,n)),o={},s;return r.s([`u`,`d`],function(t){s=t===`u`?n:r.i(n).reverse(),r.s([`l`,`r`],function(n){n===`r`&&(s=i.s(s,function(e){return r.i(e).reverse()}));var c=(t===`u`?e.predecessors:e.successors).bind(e),l=Xt(e,s,a,c),u=Zt(e,s,l.root,l.align,n===`r`);n===`r`&&(u=g(u,function(e){return-e})),o[t+n]=u})}),en(o,$t(e,o)),tn(o,e.graph().align)}function rn(e,t,n){return function(r,i,a){var o=r.node(i),s=r.node(a),c=0,l;if(c+=o.width/2,Object.prototype.hasOwnProperty.call(o,`labelpos`))switch(o.labelpos.toLowerCase()){case`l`:l=-o.width/2;break;case`r`:l=o.width/2;break}if(l&&(c+=n?l:-l),l=0,c+=(o.dummy?t:e)/2,c+=(s.dummy?t:e)/2,c+=s.width/2,Object.prototype.hasOwnProperty.call(s,`labelpos`))switch(s.labelpos.toLowerCase()){case`l`:l=s.width/2;break;case`r`:l=-s.width/2;break}return l&&(c+=n?l:-l),l=0,c}}function an(e,t){return e.node(t).width}function on(e){e=M(e),sn(e),m(nn(e),function(t,n){e.node(n).x=t})}function sn(e){var t=P(e),n=e.graph().ranksep,a=0;r.s(t,function(t){var o=_(i.s(t,function(t){return e.node(t).height}));r.s(t,function(t){e.node(t).y=a+o/2}),a+=o+n})}function cn(e,t){var n=t&&t.debugTiming?Ue:We;n(`layout`,()=>{var t=n(` buildLayoutGraph`,()=>yn(e));n(` runLayout`,()=>ln(t,n)),n(` updateInputGraph`,()=>un(e,t))})}function ln(e,t){t(` makeSpaceForEdgeLabels`,()=>bn(e)),t(` removeSelfEdges`,()=>kn(e)),t(` acyclic`,()=>Ie(e)),t(` nestingGraph.run`,()=>_t(e)),t(` rank`,()=>pt(M(e))),t(` injectEdgeLabelProxies`,()=>xn(e)),t(` removeEmptyRanks`,()=>Ve(e)),t(` nestingGraph.cleanup`,()=>xt(e)),t(` normalizeRanks`,()=>Be(e)),t(` assignRankMinMax`,()=>Sn(e)),t(` removeEdgeLabelProxies`,()=>Cn(e)),t(` normalize.run`,()=>Xe(e)),t(` parentDummyChains`,()=>Ht(e)),t(` addBorderSegments`,()=>Ge(e)),t(` order`,()=>Rt(e)),t(` insertSelfEdges`,()=>An(e)),t(` adjustCoordinateSystem`,()=>Ke(e)),t(` position`,()=>on(e)),t(` positionSelfEdges`,()=>jn(e)),t(` removeBorderNodes`,()=>On(e)),t(` normalize.undo`,()=>Qe(e)),t(` fixupEdgeLabelCoords`,()=>En(e)),t(` undoCoordinateSystem`,()=>qe(e)),t(` translateGraph`,()=>wn(e)),t(` assignNodeIntersects`,()=>Tn(e)),t(` reversePoints`,()=>Dn(e)),t(` acyclic.undo`,()=>Re(e))}function un(e,t){r.s(e.nodes(),function(n){var r=e.node(n),i=t.node(n);r&&(r.x=i.x,r.y=i.y,t.children(n).length&&(r.width=i.width,r.height=i.height))}),r.s(e.edges(),function(n){var r=e.edge(n),i=t.edge(n);r.points=i.points,Object.prototype.hasOwnProperty.call(i,`x`)&&(r.x=i.x,r.y=i.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}var dn=[`nodesep`,`edgesep`,`ranksep`,`marginx`,`marginy`],fn={ranksep:50,edgesep:20,nodesep:50,rankdir:`tb`},pn=[`acyclicer`,`ranker`,`rankdir`,`align`],mn=[`width`,`height`],hn={width:0,height:0},gn=[`minlen`,`weight`,`width`,`height`,`labeloffset`],_n={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:`r`},vn=[`labelpos`];function yn(e){var n=new a.t({multigraph:!0,compound:!0}),o=$(e.graph());return n.setGraph(t._({},fn,Q(o,dn),T(o,pn))),r.s(e.nodes(),function(t){var r=$(e.node(t));n.setNode(t,i.d(Q(r,mn),hn)),n.setParent(t,e.parent(t))}),r.s(e.edges(),function(r){var i=$(e.edge(r));n.setEdge(r,t._({},_n,Q(i,gn),T(i,vn)))}),n}function bn(e){var t=e.graph();t.ranksep/=2,r.s(e.edges(),function(n){var r=e.edge(n);r.minlen*=2,r.labelpos.toLowerCase()!==`c`&&(t.rankdir===`TB`||t.rankdir===`BT`?r.width+=r.labeloffset:r.height+=r.labeloffset)})}function xn(e){r.s(e.edges(),function(t){var n=e.edge(t);if(n.width&&n.height){var r=e.node(t.v);j(e,`edge-proxy`,{rank:(e.node(t.w).rank-r.rank)/2+r.rank,e:t},`_ep`)}})}function Sn(e){var t=0;r.s(e.nodes(),function(n){var r=e.node(n);r.borderTop&&(r.minRank=e.node(r.borderTop).rank,r.maxRank=e.node(r.borderBottom).rank,t=_(t,r.maxRank))}),e.graph().maxRank=t}function Cn(e){r.s(e.nodes(),function(t){var n=e.node(t);n.dummy===`edge-proxy`&&(e.edge(n.e).labelRank=n.rank,e.removeNode(t))})}function wn(e){var t=1/0,n=0,i=1/0,a=0,o=e.graph(),s=o.marginx||0,c=o.marginy||0;function l(e){var r=e.x,o=e.y,s=e.width,c=e.height;t=Math.min(t,r-s/2),n=Math.max(n,r+s/2),i=Math.min(i,o-c/2),a=Math.max(a,o+c/2)}r.s(e.nodes(),function(t){l(e.node(t))}),r.s(e.edges(),function(t){var n=e.edge(t);Object.prototype.hasOwnProperty.call(n,`x`)&&l(n)}),t-=s,i-=c,r.s(e.nodes(),function(n){var r=e.node(n);r.x-=t,r.y-=i}),r.s(e.edges(),function(n){var a=e.edge(n);r.s(a.points,function(e){e.x-=t,e.y-=i}),Object.prototype.hasOwnProperty.call(a,`x`)&&(a.x-=t),Object.prototype.hasOwnProperty.call(a,`y`)&&(a.y-=i)}),o.width=n-t+s,o.height=a-i+c}function Tn(e){r.s(e.edges(),function(t){var n=e.edge(t),r=e.node(t.v),i=e.node(t.w),a,o;n.points?(a=n.points[0],o=n.points[n.points.length-1]):(n.points=[],a=i,o=r),n.points.unshift(N(r,a)),n.points.push(N(i,o))})}function En(e){r.s(e.edges(),function(t){var n=e.edge(t);if(Object.prototype.hasOwnProperty.call(n,`x`))switch((n.labelpos===`l`||n.labelpos===`r`)&&(n.width-=n.labeloffset),n.labelpos){case`l`:n.x-=n.width/2+n.labeloffset;break;case`r`:n.x+=n.width/2+n.labeloffset;break}})}function Dn(e){r.s(e.edges(),function(t){var n=e.edge(t);n.reversed&&n.points.reverse()})}function On(e){r.s(e.nodes(),function(t){if(e.children(t).length){var n=e.node(t),r=e.node(n.borderTop),a=e.node(n.borderBottom),o=e.node(i.u(n.borderLeft)),s=e.node(i.u(n.borderRight));n.width=Math.abs(s.x-o.x),n.height=Math.abs(a.y-r.y),n.x=o.x+n.width/2,n.y=r.y+n.height/2}}),r.s(e.nodes(),function(t){e.node(t).dummy===`border`&&e.removeNode(t)})}function kn(e){r.s(e.edges(),function(t){if(t.v===t.w){var n=e.node(t.v);n.selfEdges||=[],n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}function An(e){var t=P(e);r.s(t,function(t){var n=0;r.s(t,function(t,i){var a=e.node(t);a.order=i+n,r.s(a.selfEdges,function(t){j(e,`selfedge`,{width:t.label.width,height:t.label.height,rank:a.rank,order:i+ ++n,e:t.e,label:t.label},`_se`)}),delete a.selfEdges})})}function jn(e){r.s(e.nodes(),function(t){var n=e.node(t);if(n.dummy===`selfedge`){var r=e.node(n.e.v),i=r.x+r.width/2,a=r.y,o=n.x-i,s=r.height/2;e.setEdge(n.e,n.label),e.removeNode(t),n.label.points=[{x:i+2*o/3,y:a-s},{x:i+5*o/6,y:a-s},{x:i+o,y:a},{x:i+5*o/6,y:a+s},{x:i+2*o/3,y:a+s}],n.label.x=n.x,n.label.y=n.y}})}function Q(e,t){return g(T(e,t),Number)}function $(e){var t={};return r.s(e,function(e,n){t[n.toLowerCase()]=e}),t}Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return cn}});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const e=require("./custom-CTbYnXJM.cjs"),t=require("./src-BMjps4Ui.cjs"),n=require("./chunk-ABZYJK2D-CbIYYZa_.cjs"),r=require("./ordinal-CUPR-p0T.cjs"),i=require("./defaultLocale-G0HsdRIB.cjs"),a=require("./chunk-S3R3BYOJ-B2ozcJNg.cjs"),o=require("./chunk-ATLVNIR6-shAOudT0.cjs"),s=require("./mermaid-parser.core-CaUKRbWB.cjs"),c=require("./chunk-4BX2VUAB-HXFjpyQg.cjs"),l=require("./chunk-QN33PNHL-Cu0FHarG.cjs");function u(e){var t=0,n=e.children,r=n&&n.length;if(!r)t=1;else for(;--r>=0;)t+=n[r].value;e.value=t}function d(){return this.eachAfter(u)}function f(e,t){let n=-1;for(let r of this)e.call(t,r,++n,this);return this}function p(e,t){for(var n=this,r=[n],i,a,o=-1;n=r.pop();)if(e.call(t,n,++o,this),i=n.children)for(a=i.length-1;a>=0;--a)r.push(i[a]);return this}function m(e,t){for(var n=this,r=[n],i=[],a,o,s,c=-1;n=r.pop();)if(i.push(n),a=n.children)for(o=0,s=a.length;o<s;++o)r.push(a[o]);for(;n=i.pop();)e.call(t,n,++c,this);return this}function h(e,t){let n=-1;for(let r of this)if(e.call(t,r,++n,this))return r}function g(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n})}function _(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function v(e){for(var t=this,n=y(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r}function y(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}function b(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function x(){return Array.from(this)}function S(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function C(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*w(){var e=this,t,n=[e],r,i,a;do for(t=n.reverse(),n=[];e=t.pop();)if(yield e,r=e.children)for(i=0,a=r.length;i<a;++i)n.push(r[i]);while(n.length)}function T(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=O)):t===void 0&&(t=D);for(var n=new j(e),r,i=[n],a,o,s,c;r=i.pop();)if((o=t(r.data))&&(c=(o=Array.from(o)).length))for(r.children=o,s=c-1;s>=0;--s)i.push(a=o[s]=new j(o[s])),a.parent=r,a.depth=r.depth+1;return n.eachBefore(A)}function E(){return T(this).eachBefore(k)}function D(e){return e.children}function O(e){return Array.isArray(e)?e[1]:null}function k(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function A(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function j(e){this.data=e,this.depth=this.height=0,this.parent=null}j.prototype=T.prototype={constructor:j,count:d,each:f,eachAfter:m,eachBefore:p,find:h,sum:g,sort:_,path:v,ancestors:b,descendants:x,leaves:S,links:C,copy:E,[Symbol.iterator]:w};function M(e){if(typeof e!=`function`)throw Error();return e}function N(){return 0}function P(e){return function(){return e}}function F(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function I(e,t,n,r,i){for(var a=e.children,o,s=-1,c=a.length,l=e.value&&(r-t)/e.value;++s<c;)o=a[s],o.y0=n,o.y1=i,o.x0=t,o.x1=t+=o.value*l}function L(e,t,n,r,i){for(var a=e.children,o,s=-1,c=a.length,l=e.value&&(i-n)/e.value;++s<c;)o=a[s],o.x0=t,o.x1=r,o.y0=n,o.y1=n+=o.value*l}var R=(1+Math.sqrt(5))/2;function z(e,t,n,r,i,a){for(var o=[],s=t.children,c,l,u=0,d=0,f=s.length,p,m,h=t.value,g,_,v,y,b,x,S;u<f;){p=i-n,m=a-r;do g=s[d++].value;while(!g&&d<f);for(_=v=g,x=Math.max(m/p,p/m)/(h*e),S=g*g*x,b=Math.max(v/S,S/_);d<f;++d){if(g+=l=s[d].value,l<_&&(_=l),l>v&&(v=l),S=g*g*x,y=Math.max(v/S,S/_),y>b){g-=l;break}b=y}o.push(c={value:g,dice:p<m,children:s.slice(u,d)}),c.dice?I(c,n,r,i,h?r+=m*g/h:a):L(c,n,r,h?n+=p*g/h:i,a),h-=g,u=d}return o}var B=(function e(t){function n(e,n,r,i,a){z(t,e,n,r,i,a)}return n.ratio=function(t){return e((t=+t)>1?t:1)},n})(R);function V(){var e=B,t=!1,n=1,r=1,i=[0],a=N,o=N,s=N,c=N,l=N;function u(e){return e.x0=e.y0=0,e.x1=n,e.y1=r,e.eachBefore(d),i=[0],t&&e.eachBefore(F),e}function d(t){var n=i[t.depth],r=t.x0+n,u=t.y0+n,d=t.x1-n,f=t.y1-n;d<r&&(r=d=(r+d)/2),f<u&&(u=f=(u+f)/2),t.x0=r,t.y0=u,t.x1=d,t.y1=f,t.children&&(n=i[t.depth+1]=a(t)/2,r+=l(t)-n,u+=o(t)-n,d-=s(t)-n,f-=c(t)-n,d<r&&(r=d=(r+d)/2),f<u&&(u=f=(u+f)/2),e(t,r,u,d,f))}return u.round=function(e){return arguments.length?(t=!!e,u):t},u.size=function(e){return arguments.length?(n=+e[0],r=+e[1],u):[n,r]},u.tile=function(t){return arguments.length?(e=M(t),u):e},u.padding=function(e){return arguments.length?u.paddingInner(e).paddingOuter(e):u.paddingInner()},u.paddingInner=function(e){return arguments.length?(a=typeof e==`function`?e:P(+e),u):a},u.paddingOuter=function(e){return arguments.length?u.paddingTop(e).paddingRight(e).paddingBottom(e).paddingLeft(e):u.paddingTop()},u.paddingTop=function(e){return arguments.length?(o=typeof e==`function`?e:P(+e),u):o},u.paddingRight=function(e){return arguments.length?(s=typeof e==`function`?e:P(+e),u):s},u.paddingBottom=function(e){return arguments.length?(c=typeof e==`function`?e:P(+e),u):c},u.paddingLeft=function(e){return arguments.length?(l=typeof e==`function`?e:P(+e),u):l},u}var H=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=n.B,this.getAccTitle=n.v,this.setDiagramTitle=n.U,this.getDiagramTitle=n.C,this.getAccDescription=n._,this.setAccDescription=n.z}static{t.h(this,`TreeMapDB`)}getNodes(){return this.nodes}getConfig(){let e=n.d,t=n.y();return a.r({...e.treemap,...t.treemap??{}})}addNode(e,t){this.nodes.push(e),this.levels.set(e,t),t===0&&(this.outerNodes.push(e),this.root??=e)}getRoot(){return{name:``,children:this.outerNodes}}addClass(e,t){let n=this.classes.get(e)??{id:e,styles:[],textStyles:[]},r=t.replace(/\\,/g,`§§§`).replace(/,/g,`;`).replace(/§§§/g,`,`).split(`;`);r&&r.forEach(e=>{o.n(e)&&(n?.textStyles?n.textStyles.push(e):n.textStyles=[e]),n?.styles?n.styles.push(e):n.styles=[e]}),this.classes.set(e,n)}getClasses(){return this.classes}getStylesForClass(e){return this.classes.get(e)?.styles??[]}clear(){n.a(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function U(e){if(!e.length)return[];let t=[],n=[];return e.forEach(e=>{let r={name:e.name,children:e.type===`Leaf`?void 0:[]};for(r.classSelector=e?.classSelector,e?.cssCompiledStyles&&(r.cssCompiledStyles=[e.cssCompiledStyles]),e.type===`Leaf`&&e.value!==void 0&&(r.value=e.value);n.length>0&&n[n.length-1].level>=e.level;)n.pop();if(n.length===0)t.push(r);else{let e=n[n.length-1].node;e.children?e.children.push(r):e.children=[r]}e.type!==`Leaf`&&n.push({node:r,level:e.level})}),t}t.h(U,`buildHierarchy`);var W=t.h((e,n)=>{c.t(e,n);let r=[];for(let t of e.TreemapRows??[])t.$type===`ClassDefStatement`&&n.addClass(t.className??``,t.styleText??``);for(let t of e.TreemapRows??[]){let e=t.item;if(!e)continue;let i=t.indent?parseInt(t.indent):0,a=G(e),o=e.classSelector?n.getStylesForClass(e.classSelector):[],s=o.length>0?o.join(`;`):void 0,c={level:i,name:a,type:e.$type,value:e.value,classSelector:e.classSelector,cssCompiledStyles:s};r.push(c)}let i=U(r),a=t.h((e,t)=>{for(let r of e)n.addNode(r,t),r.children&&r.children.length>0&&a(r.children,t+1)},`addNodesRecursively`);a(i,0)},`populate`),G=t.h(e=>e.name?String(e.name):``,`getItemName`),K={parser:{yy:void 0},parse:t.h(async e=>{try{let n=await s.t(`treemap`,e);t.g.debug(`Treemap AST:`,n);let r=K.parser?.yy;if(!(r instanceof H))throw Error(`parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.`);W(n,r)}catch(e){throw t.g.error(`Error parsing treemap:`,e),e}},`parse`)},q=10,J=10,Y=25,X={draw:t.h((a,s,c,u)=>{let d=u.db,f=d.getConfig(),p=f.padding??q,m=d.getDiagramTitle(),h=d.getRoot(),{themeVariables:g}=n.y();if(!h)return;let _=m?30:0,v=e.f(s),y=f.nodeWidth?f.nodeWidth*J:960,b=f.nodeHeight?f.nodeHeight*J:500,x=y,S=b+_;v.attr(`viewBox`,`0 0 ${x} ${S}`),n.c(v,S,x,f.useMaxWidth);let C;try{let e=f.valueFormat||`,`;if(e===`$0,0`)C=t.h(e=>`$`+i.t(`,`)(e),`valueFormat`);else if(e.startsWith(`$`)&&e.includes(`,`)){let n=/\.\d+/.exec(e),r=n?n[0]:``;C=t.h(e=>`$`+i.t(`,`+r)(e),`valueFormat`)}else if(e.startsWith(`$`)){let n=e.substring(1);C=t.h(e=>`$`+i.t(n||``)(e),`valueFormat`)}else C=i.t(e)}catch(e){t.g.error(`Error creating format function:`,e),C=i.t(`,`)}let w=r.t().range([`transparent`,g.cScale0,g.cScale1,g.cScale2,g.cScale3,g.cScale4,g.cScale5,g.cScale6,g.cScale7,g.cScale8,g.cScale9,g.cScale10,g.cScale11]),E=r.t().range([`transparent`,g.cScalePeer0,g.cScalePeer1,g.cScalePeer2,g.cScalePeer3,g.cScalePeer4,g.cScalePeer5,g.cScalePeer6,g.cScalePeer7,g.cScalePeer8,g.cScalePeer9,g.cScalePeer10,g.cScalePeer11]),D=r.t().range([g.cScaleLabel0,g.cScaleLabel1,g.cScaleLabel2,g.cScaleLabel3,g.cScaleLabel4,g.cScaleLabel5,g.cScaleLabel6,g.cScaleLabel7,g.cScaleLabel8,g.cScaleLabel9,g.cScaleLabel10,g.cScaleLabel11]);m&&v.append(`text`).attr(`x`,x/2).attr(`y`,_/2).attr(`class`,`treemapTitle`).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(m);let O=v.append(`g`).attr(`transform`,`translate(0, ${_})`).attr(`class`,`treemapContainer`),k=T(h).sum(e=>e.value??0).sort((e,t)=>(t.value??0)-(e.value??0)),A=V().size([y,b]).paddingTop(e=>e.children&&e.children.length>0?Y+J:0).paddingInner(p).paddingLeft(e=>e.children&&e.children.length>0?J:0).paddingRight(e=>e.children&&e.children.length>0?J:0).paddingBottom(e=>e.children&&e.children.length>0?J:0).round(!0)(k),j=A.descendants().filter(e=>e.children&&e.children.length>0),M=O.selectAll(`.treemapSection`).data(j).enter().append(`g`).attr(`class`,`treemapSection`).attr(`transform`,e=>`translate(${e.x0},${e.y0})`);M.append(`rect`).attr(`width`,e=>e.x1-e.x0).attr(`height`,Y).attr(`class`,`treemapSectionHeader`).attr(`fill`,`none`).attr(`fill-opacity`,.6).attr(`stroke-width`,.6).attr(`style`,e=>e.depth===0?`display: none;`:``),M.append(`clipPath`).attr(`id`,(e,t)=>`clip-section-${s}-${t}`).append(`rect`).attr(`width`,e=>Math.max(0,e.x1-e.x0-12)).attr(`height`,Y),M.append(`rect`).attr(`width`,e=>e.x1-e.x0).attr(`height`,e=>e.y1-e.y0).attr(`class`,(e,t)=>`treemapSection section${t}`).attr(`fill`,e=>w(e.data.name)).attr(`fill-opacity`,.6).attr(`stroke`,e=>E(e.data.name)).attr(`stroke-width`,2).attr(`stroke-opacity`,.4).attr(`style`,e=>{if(e.depth===0)return`display: none;`;let t=o.i({cssCompiledStyles:e.data.cssCompiledStyles});return t.nodeStyles+`;`+t.borderStyles.join(`;`)}),M.append(`text`).attr(`class`,`treemapSectionLabel`).attr(`x`,6).attr(`y`,Y/2).attr(`dominant-baseline`,`middle`).text(e=>e.depth===0?``:e.data.name).attr(`font-weight`,`bold`).attr(`style`,e=>e.depth===0?`display: none;`:`dominant-baseline: middle; font-size: 12px; fill:`+D(e.data.name)+`; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;`+o.i({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`)).each(function(e){if(e.depth===0)return;let n=t.p(this),r=e.data.name;n.text(r);let i=e.x1-e.x0,a;a=f.showValues!==!1&&e.value?i-10-30-10-6:i-6-6;let o=Math.max(15,a),s=n.node();if(s.getComputedTextLength()>o){let e=r;for(;e.length>0;){if(e=r.substring(0,e.length-1),e.length===0){n.text(`...`),s.getComputedTextLength()>o&&n.text(``);break}if(n.text(e+`...`),s.getComputedTextLength()<=o)break}}}),f.showValues!==!1&&M.append(`text`).attr(`class`,`treemapSectionValue`).attr(`x`,e=>e.x1-e.x0-10).attr(`y`,Y/2).attr(`text-anchor`,`end`).attr(`dominant-baseline`,`middle`).text(e=>e.value?C(e.value):``).attr(`font-style`,`italic`).attr(`style`,e=>e.depth===0?`display: none;`:`text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:`+D(e.data.name)+`; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;`+o.i({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`));let N=A.leaves(),P=O.selectAll(`.treemapLeafGroup`).data(N).enter().append(`g`).attr(`class`,(e,t)=>`treemapNode treemapLeafGroup leaf${t}${e.data.classSelector?` ${e.data.classSelector}`:``}x`).attr(`transform`,e=>`translate(${e.x0},${e.y0})`);P.append(`rect`).attr(`width`,e=>e.x1-e.x0).attr(`height`,e=>e.y1-e.y0).attr(`class`,`treemapLeaf`).attr(`fill`,e=>e.parent?w(e.parent.data.name):w(e.data.name)).attr(`style`,e=>o.i({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr(`fill-opacity`,.3).attr(`stroke`,e=>e.parent?w(e.parent.data.name):w(e.data.name)).attr(`stroke-width`,3),P.append(`clipPath`).attr(`id`,(e,t)=>`clip-${s}-${t}`).append(`rect`).attr(`width`,e=>Math.max(0,e.x1-e.x0-4)).attr(`height`,e=>Math.max(0,e.y1-e.y0-4)),P.append(`text`).attr(`class`,`treemapLabel`).attr(`x`,e=>(e.x1-e.x0)/2).attr(`y`,e=>(e.y1-e.y0)/2).attr(`style`,e=>`text-anchor: middle; dominant-baseline: middle; font-size: 38px;fill:`+D(e.data.name)+`;`+o.i({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`)).attr(`clip-path`,(e,t)=>`url(#clip-${s}-${t})`).text(e=>e.data.name).each(function(e){let n=t.p(this),r=e.x1-e.x0,i=e.y1-e.y0,a=n.node(),o=r-8,s=i-8;if(o<10||s<10){n.style(`display`,`none`);return}let c=parseInt(n.style(`font-size`),10),l=.6;for(;a.getComputedTextLength()>o&&c>8;)c--,n.style(`font-size`,`${c}px`);let u=Math.max(6,Math.min(28,Math.round(c*l))),d=c+2+u;for(;d>s&&c>8&&(c--,u=Math.max(6,Math.min(28,Math.round(c*l))),!(u<6&&c===8));)n.style(`font-size`,`${c}px`),d=c+2+u;n.style(`font-size`,`${c}px`),(a.getComputedTextLength()>o||c<8||s<c)&&n.style(`display`,`none`)}),f.showValues!==!1&&P.append(`text`).attr(`class`,`treemapValue`).attr(`x`,e=>(e.x1-e.x0)/2).attr(`y`,function(e){return(e.y1-e.y0)/2}).attr(`style`,e=>`text-anchor: middle; dominant-baseline: hanging; font-size: 28px;fill:`+D(e.data.name)+`;`+o.i({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`)).attr(`clip-path`,(e,t)=>`url(#clip-${s}-${t})`).text(e=>e.value?C(e.value):``).each(function(e){let n=t.p(this),r=this.parentNode;if(!r){n.style(`display`,`none`);return}let i=t.p(r).select(`.treemapLabel`);if(i.empty()||i.style(`display`)===`none`){n.style(`display`,`none`);return}let a=parseFloat(i.style(`font-size`)),o=Math.max(6,Math.min(28,Math.round(a*.6)));n.style(`font-size`,`${o}px`);let s=(e.y1-e.y0)/2+a/2+2;n.attr(`y`,s);let c=e.x1-e.x0,l=e.y1-e.y0-4,u=c-8;n.node().getComputedTextLength()>u||s+o>l||o<6?n.style(`display`,`none`):n.style(`display`,null)}),l.t(v,f.diagramPadding??8,`flowchart`,f?.useMaxWidth||!1)},`draw`),getClasses:t.h(function(e,t){return t.db.getClasses()},`getClasses`)},Z={sectionStrokeColor:`black`,sectionStrokeWidth:`1`,sectionFillColor:`#efefef`,leafStrokeColor:`black`,leafStrokeWidth:`1`,leafFillColor:`#efefef`,labelColor:`black`,labelFontSize:`12px`,valueFontSize:`10px`,valueColor:`black`,titleColor:`black`,titleFontSize:`14px`},Q={parser:K,get db(){return new H},renderer:X,styles:t.h(({treemap:e}={})=>{let t=a.r(Z,e);return`
|
|
1
|
+
const e=require("./custom-CFJtq50-.cjs"),t=require("./src-BMjps4Ui.cjs"),n=require("./chunk-ABZYJK2D-CbIYYZa_.cjs"),r=require("./ordinal-CUPR-p0T.cjs"),i=require("./defaultLocale-G0HsdRIB.cjs"),a=require("./chunk-S3R3BYOJ-B2ozcJNg.cjs"),o=require("./chunk-ATLVNIR6-shAOudT0.cjs"),s=require("./mermaid-parser.core-BY0bWKp5.cjs"),c=require("./chunk-4BX2VUAB-HXFjpyQg.cjs"),l=require("./chunk-QN33PNHL-Cu0FHarG.cjs");function u(e){var t=0,n=e.children,r=n&&n.length;if(!r)t=1;else for(;--r>=0;)t+=n[r].value;e.value=t}function d(){return this.eachAfter(u)}function f(e,t){let n=-1;for(let r of this)e.call(t,r,++n,this);return this}function p(e,t){for(var n=this,r=[n],i,a,o=-1;n=r.pop();)if(e.call(t,n,++o,this),i=n.children)for(a=i.length-1;a>=0;--a)r.push(i[a]);return this}function m(e,t){for(var n=this,r=[n],i=[],a,o,s,c=-1;n=r.pop();)if(i.push(n),a=n.children)for(o=0,s=a.length;o<s;++o)r.push(a[o]);for(;n=i.pop();)e.call(t,n,++c,this);return this}function h(e,t){let n=-1;for(let r of this)if(e.call(t,r,++n,this))return r}function g(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n})}function _(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function v(e){for(var t=this,n=y(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r}function y(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}function b(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function x(){return Array.from(this)}function S(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function C(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*w(){var e=this,t,n=[e],r,i,a;do for(t=n.reverse(),n=[];e=t.pop();)if(yield e,r=e.children)for(i=0,a=r.length;i<a;++i)n.push(r[i]);while(n.length)}function T(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=O)):t===void 0&&(t=D);for(var n=new j(e),r,i=[n],a,o,s,c;r=i.pop();)if((o=t(r.data))&&(c=(o=Array.from(o)).length))for(r.children=o,s=c-1;s>=0;--s)i.push(a=o[s]=new j(o[s])),a.parent=r,a.depth=r.depth+1;return n.eachBefore(A)}function E(){return T(this).eachBefore(k)}function D(e){return e.children}function O(e){return Array.isArray(e)?e[1]:null}function k(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function A(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function j(e){this.data=e,this.depth=this.height=0,this.parent=null}j.prototype=T.prototype={constructor:j,count:d,each:f,eachAfter:m,eachBefore:p,find:h,sum:g,sort:_,path:v,ancestors:b,descendants:x,leaves:S,links:C,copy:E,[Symbol.iterator]:w};function M(e){if(typeof e!=`function`)throw Error();return e}function N(){return 0}function P(e){return function(){return e}}function F(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function I(e,t,n,r,i){for(var a=e.children,o,s=-1,c=a.length,l=e.value&&(r-t)/e.value;++s<c;)o=a[s],o.y0=n,o.y1=i,o.x0=t,o.x1=t+=o.value*l}function L(e,t,n,r,i){for(var a=e.children,o,s=-1,c=a.length,l=e.value&&(i-n)/e.value;++s<c;)o=a[s],o.x0=t,o.x1=r,o.y0=n,o.y1=n+=o.value*l}var R=(1+Math.sqrt(5))/2;function z(e,t,n,r,i,a){for(var o=[],s=t.children,c,l,u=0,d=0,f=s.length,p,m,h=t.value,g,_,v,y,b,x,S;u<f;){p=i-n,m=a-r;do g=s[d++].value;while(!g&&d<f);for(_=v=g,x=Math.max(m/p,p/m)/(h*e),S=g*g*x,b=Math.max(v/S,S/_);d<f;++d){if(g+=l=s[d].value,l<_&&(_=l),l>v&&(v=l),S=g*g*x,y=Math.max(v/S,S/_),y>b){g-=l;break}b=y}o.push(c={value:g,dice:p<m,children:s.slice(u,d)}),c.dice?I(c,n,r,i,h?r+=m*g/h:a):L(c,n,r,h?n+=p*g/h:i,a),h-=g,u=d}return o}var B=(function e(t){function n(e,n,r,i,a){z(t,e,n,r,i,a)}return n.ratio=function(t){return e((t=+t)>1?t:1)},n})(R);function V(){var e=B,t=!1,n=1,r=1,i=[0],a=N,o=N,s=N,c=N,l=N;function u(e){return e.x0=e.y0=0,e.x1=n,e.y1=r,e.eachBefore(d),i=[0],t&&e.eachBefore(F),e}function d(t){var n=i[t.depth],r=t.x0+n,u=t.y0+n,d=t.x1-n,f=t.y1-n;d<r&&(r=d=(r+d)/2),f<u&&(u=f=(u+f)/2),t.x0=r,t.y0=u,t.x1=d,t.y1=f,t.children&&(n=i[t.depth+1]=a(t)/2,r+=l(t)-n,u+=o(t)-n,d-=s(t)-n,f-=c(t)-n,d<r&&(r=d=(r+d)/2),f<u&&(u=f=(u+f)/2),e(t,r,u,d,f))}return u.round=function(e){return arguments.length?(t=!!e,u):t},u.size=function(e){return arguments.length?(n=+e[0],r=+e[1],u):[n,r]},u.tile=function(t){return arguments.length?(e=M(t),u):e},u.padding=function(e){return arguments.length?u.paddingInner(e).paddingOuter(e):u.paddingInner()},u.paddingInner=function(e){return arguments.length?(a=typeof e==`function`?e:P(+e),u):a},u.paddingOuter=function(e){return arguments.length?u.paddingTop(e).paddingRight(e).paddingBottom(e).paddingLeft(e):u.paddingTop()},u.paddingTop=function(e){return arguments.length?(o=typeof e==`function`?e:P(+e),u):o},u.paddingRight=function(e){return arguments.length?(s=typeof e==`function`?e:P(+e),u):s},u.paddingBottom=function(e){return arguments.length?(c=typeof e==`function`?e:P(+e),u):c},u.paddingLeft=function(e){return arguments.length?(l=typeof e==`function`?e:P(+e),u):l},u}var H=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=n.B,this.getAccTitle=n.v,this.setDiagramTitle=n.U,this.getDiagramTitle=n.C,this.getAccDescription=n._,this.setAccDescription=n.z}static{t.h(this,`TreeMapDB`)}getNodes(){return this.nodes}getConfig(){let e=n.d,t=n.y();return a.r({...e.treemap,...t.treemap??{}})}addNode(e,t){this.nodes.push(e),this.levels.set(e,t),t===0&&(this.outerNodes.push(e),this.root??=e)}getRoot(){return{name:``,children:this.outerNodes}}addClass(e,t){let n=this.classes.get(e)??{id:e,styles:[],textStyles:[]},r=t.replace(/\\,/g,`§§§`).replace(/,/g,`;`).replace(/§§§/g,`,`).split(`;`);r&&r.forEach(e=>{o.n(e)&&(n?.textStyles?n.textStyles.push(e):n.textStyles=[e]),n?.styles?n.styles.push(e):n.styles=[e]}),this.classes.set(e,n)}getClasses(){return this.classes}getStylesForClass(e){return this.classes.get(e)?.styles??[]}clear(){n.a(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function U(e){if(!e.length)return[];let t=[],n=[];return e.forEach(e=>{let r={name:e.name,children:e.type===`Leaf`?void 0:[]};for(r.classSelector=e?.classSelector,e?.cssCompiledStyles&&(r.cssCompiledStyles=[e.cssCompiledStyles]),e.type===`Leaf`&&e.value!==void 0&&(r.value=e.value);n.length>0&&n[n.length-1].level>=e.level;)n.pop();if(n.length===0)t.push(r);else{let e=n[n.length-1].node;e.children?e.children.push(r):e.children=[r]}e.type!==`Leaf`&&n.push({node:r,level:e.level})}),t}t.h(U,`buildHierarchy`);var W=t.h((e,n)=>{c.t(e,n);let r=[];for(let t of e.TreemapRows??[])t.$type===`ClassDefStatement`&&n.addClass(t.className??``,t.styleText??``);for(let t of e.TreemapRows??[]){let e=t.item;if(!e)continue;let i=t.indent?parseInt(t.indent):0,a=G(e),o=e.classSelector?n.getStylesForClass(e.classSelector):[],s=o.length>0?o.join(`;`):void 0,c={level:i,name:a,type:e.$type,value:e.value,classSelector:e.classSelector,cssCompiledStyles:s};r.push(c)}let i=U(r),a=t.h((e,t)=>{for(let r of e)n.addNode(r,t),r.children&&r.children.length>0&&a(r.children,t+1)},`addNodesRecursively`);a(i,0)},`populate`),G=t.h(e=>e.name?String(e.name):``,`getItemName`),K={parser:{yy:void 0},parse:t.h(async e=>{try{let n=await s.t(`treemap`,e);t.g.debug(`Treemap AST:`,n);let r=K.parser?.yy;if(!(r instanceof H))throw Error(`parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.`);W(n,r)}catch(e){throw t.g.error(`Error parsing treemap:`,e),e}},`parse`)},q=10,J=10,Y=25,X={draw:t.h((a,s,c,u)=>{let d=u.db,f=d.getConfig(),p=f.padding??q,m=d.getDiagramTitle(),h=d.getRoot(),{themeVariables:g}=n.y();if(!h)return;let _=m?30:0,v=e.f(s),y=f.nodeWidth?f.nodeWidth*J:960,b=f.nodeHeight?f.nodeHeight*J:500,x=y,S=b+_;v.attr(`viewBox`,`0 0 ${x} ${S}`),n.c(v,S,x,f.useMaxWidth);let C;try{let e=f.valueFormat||`,`;if(e===`$0,0`)C=t.h(e=>`$`+i.t(`,`)(e),`valueFormat`);else if(e.startsWith(`$`)&&e.includes(`,`)){let n=/\.\d+/.exec(e),r=n?n[0]:``;C=t.h(e=>`$`+i.t(`,`+r)(e),`valueFormat`)}else if(e.startsWith(`$`)){let n=e.substring(1);C=t.h(e=>`$`+i.t(n||``)(e),`valueFormat`)}else C=i.t(e)}catch(e){t.g.error(`Error creating format function:`,e),C=i.t(`,`)}let w=r.t().range([`transparent`,g.cScale0,g.cScale1,g.cScale2,g.cScale3,g.cScale4,g.cScale5,g.cScale6,g.cScale7,g.cScale8,g.cScale9,g.cScale10,g.cScale11]),E=r.t().range([`transparent`,g.cScalePeer0,g.cScalePeer1,g.cScalePeer2,g.cScalePeer3,g.cScalePeer4,g.cScalePeer5,g.cScalePeer6,g.cScalePeer7,g.cScalePeer8,g.cScalePeer9,g.cScalePeer10,g.cScalePeer11]),D=r.t().range([g.cScaleLabel0,g.cScaleLabel1,g.cScaleLabel2,g.cScaleLabel3,g.cScaleLabel4,g.cScaleLabel5,g.cScaleLabel6,g.cScaleLabel7,g.cScaleLabel8,g.cScaleLabel9,g.cScaleLabel10,g.cScaleLabel11]);m&&v.append(`text`).attr(`x`,x/2).attr(`y`,_/2).attr(`class`,`treemapTitle`).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(m);let O=v.append(`g`).attr(`transform`,`translate(0, ${_})`).attr(`class`,`treemapContainer`),k=T(h).sum(e=>e.value??0).sort((e,t)=>(t.value??0)-(e.value??0)),A=V().size([y,b]).paddingTop(e=>e.children&&e.children.length>0?Y+J:0).paddingInner(p).paddingLeft(e=>e.children&&e.children.length>0?J:0).paddingRight(e=>e.children&&e.children.length>0?J:0).paddingBottom(e=>e.children&&e.children.length>0?J:0).round(!0)(k),j=A.descendants().filter(e=>e.children&&e.children.length>0),M=O.selectAll(`.treemapSection`).data(j).enter().append(`g`).attr(`class`,`treemapSection`).attr(`transform`,e=>`translate(${e.x0},${e.y0})`);M.append(`rect`).attr(`width`,e=>e.x1-e.x0).attr(`height`,Y).attr(`class`,`treemapSectionHeader`).attr(`fill`,`none`).attr(`fill-opacity`,.6).attr(`stroke-width`,.6).attr(`style`,e=>e.depth===0?`display: none;`:``),M.append(`clipPath`).attr(`id`,(e,t)=>`clip-section-${s}-${t}`).append(`rect`).attr(`width`,e=>Math.max(0,e.x1-e.x0-12)).attr(`height`,Y),M.append(`rect`).attr(`width`,e=>e.x1-e.x0).attr(`height`,e=>e.y1-e.y0).attr(`class`,(e,t)=>`treemapSection section${t}`).attr(`fill`,e=>w(e.data.name)).attr(`fill-opacity`,.6).attr(`stroke`,e=>E(e.data.name)).attr(`stroke-width`,2).attr(`stroke-opacity`,.4).attr(`style`,e=>{if(e.depth===0)return`display: none;`;let t=o.i({cssCompiledStyles:e.data.cssCompiledStyles});return t.nodeStyles+`;`+t.borderStyles.join(`;`)}),M.append(`text`).attr(`class`,`treemapSectionLabel`).attr(`x`,6).attr(`y`,Y/2).attr(`dominant-baseline`,`middle`).text(e=>e.depth===0?``:e.data.name).attr(`font-weight`,`bold`).attr(`style`,e=>e.depth===0?`display: none;`:`dominant-baseline: middle; font-size: 12px; fill:`+D(e.data.name)+`; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;`+o.i({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`)).each(function(e){if(e.depth===0)return;let n=t.p(this),r=e.data.name;n.text(r);let i=e.x1-e.x0,a;a=f.showValues!==!1&&e.value?i-10-30-10-6:i-6-6;let o=Math.max(15,a),s=n.node();if(s.getComputedTextLength()>o){let e=r;for(;e.length>0;){if(e=r.substring(0,e.length-1),e.length===0){n.text(`...`),s.getComputedTextLength()>o&&n.text(``);break}if(n.text(e+`...`),s.getComputedTextLength()<=o)break}}}),f.showValues!==!1&&M.append(`text`).attr(`class`,`treemapSectionValue`).attr(`x`,e=>e.x1-e.x0-10).attr(`y`,Y/2).attr(`text-anchor`,`end`).attr(`dominant-baseline`,`middle`).text(e=>e.value?C(e.value):``).attr(`font-style`,`italic`).attr(`style`,e=>e.depth===0?`display: none;`:`text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:`+D(e.data.name)+`; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;`+o.i({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`));let N=A.leaves(),P=O.selectAll(`.treemapLeafGroup`).data(N).enter().append(`g`).attr(`class`,(e,t)=>`treemapNode treemapLeafGroup leaf${t}${e.data.classSelector?` ${e.data.classSelector}`:``}x`).attr(`transform`,e=>`translate(${e.x0},${e.y0})`);P.append(`rect`).attr(`width`,e=>e.x1-e.x0).attr(`height`,e=>e.y1-e.y0).attr(`class`,`treemapLeaf`).attr(`fill`,e=>e.parent?w(e.parent.data.name):w(e.data.name)).attr(`style`,e=>o.i({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr(`fill-opacity`,.3).attr(`stroke`,e=>e.parent?w(e.parent.data.name):w(e.data.name)).attr(`stroke-width`,3),P.append(`clipPath`).attr(`id`,(e,t)=>`clip-${s}-${t}`).append(`rect`).attr(`width`,e=>Math.max(0,e.x1-e.x0-4)).attr(`height`,e=>Math.max(0,e.y1-e.y0-4)),P.append(`text`).attr(`class`,`treemapLabel`).attr(`x`,e=>(e.x1-e.x0)/2).attr(`y`,e=>(e.y1-e.y0)/2).attr(`style`,e=>`text-anchor: middle; dominant-baseline: middle; font-size: 38px;fill:`+D(e.data.name)+`;`+o.i({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`)).attr(`clip-path`,(e,t)=>`url(#clip-${s}-${t})`).text(e=>e.data.name).each(function(e){let n=t.p(this),r=e.x1-e.x0,i=e.y1-e.y0,a=n.node(),o=r-8,s=i-8;if(o<10||s<10){n.style(`display`,`none`);return}let c=parseInt(n.style(`font-size`),10),l=.6;for(;a.getComputedTextLength()>o&&c>8;)c--,n.style(`font-size`,`${c}px`);let u=Math.max(6,Math.min(28,Math.round(c*l))),d=c+2+u;for(;d>s&&c>8&&(c--,u=Math.max(6,Math.min(28,Math.round(c*l))),!(u<6&&c===8));)n.style(`font-size`,`${c}px`),d=c+2+u;n.style(`font-size`,`${c}px`),(a.getComputedTextLength()>o||c<8||s<c)&&n.style(`display`,`none`)}),f.showValues!==!1&&P.append(`text`).attr(`class`,`treemapValue`).attr(`x`,e=>(e.x1-e.x0)/2).attr(`y`,function(e){return(e.y1-e.y0)/2}).attr(`style`,e=>`text-anchor: middle; dominant-baseline: hanging; font-size: 28px;fill:`+D(e.data.name)+`;`+o.i({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`)).attr(`clip-path`,(e,t)=>`url(#clip-${s}-${t})`).text(e=>e.value?C(e.value):``).each(function(e){let n=t.p(this),r=this.parentNode;if(!r){n.style(`display`,`none`);return}let i=t.p(r).select(`.treemapLabel`);if(i.empty()||i.style(`display`)===`none`){n.style(`display`,`none`);return}let a=parseFloat(i.style(`font-size`)),o=Math.max(6,Math.min(28,Math.round(a*.6)));n.style(`font-size`,`${o}px`);let s=(e.y1-e.y0)/2+a/2+2;n.attr(`y`,s);let c=e.x1-e.x0,l=e.y1-e.y0-4,u=c-8;n.node().getComputedTextLength()>u||s+o>l||o<6?n.style(`display`,`none`):n.style(`display`,null)}),l.t(v,f.diagramPadding??8,`flowchart`,f?.useMaxWidth||!1)},`draw`),getClasses:t.h(function(e,t){return t.db.getClasses()},`getClasses`)},Z={sectionStrokeColor:`black`,sectionStrokeWidth:`1`,sectionFillColor:`#efefef`,leafStrokeColor:`black`,leafStrokeWidth:`1`,leafFillColor:`#efefef`,labelColor:`black`,labelFontSize:`12px`,valueFontSize:`10px`,valueColor:`black`,titleColor:`black`,titleFontSize:`14px`},Q={parser:K,get db(){return new H},renderer:X,styles:t.h(({treemap:e}={})=>{let t=a.r(Z,e);return`
|
|
2
2
|
.treemapNode.section {
|
|
3
3
|
stroke: ${t.sectionStrokeColor};
|
|
4
4
|
stroke-width: ${t.sectionStrokeWidth};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { f as e } from "./custom-
|
|
1
|
+
import { f as e } from "./custom-BEVHZhjn.js";
|
|
2
2
|
import { g as t, h as n, p as r } from "./src-BuisGndr.js";
|
|
3
3
|
import { B as i, C as a, U as o, _ as s, a as c, c as l, d as u, v as d, y as f, z as p } from "./chunk-ABZYJK2D-DDrmE3Q7.js";
|
|
4
4
|
import { t as m } from "./ordinal-C55HfHHp.js";
|
|
5
5
|
import { t as h } from "./defaultLocale-B5dSAwiC.js";
|
|
6
6
|
import { r as g } from "./chunk-S3R3BYOJ-CG6GoSCd.js";
|
|
7
7
|
import { i as _, n as v } from "./chunk-ATLVNIR6-DHlCNWnJ.js";
|
|
8
|
-
import { t as y } from "./mermaid-parser.core-
|
|
8
|
+
import { t as y } from "./mermaid-parser.core-CTjeJcfH.js";
|
|
9
9
|
import { t as b } from "./chunk-4BX2VUAB-BZTgbbzC.js";
|
|
10
10
|
import { t as x } from "./chunk-QN33PNHL-BFbXAWI4.js";
|
|
11
11
|
//#region node_modules/.pnpm/d3-hierarchy@3.1.2/node_modules/d3-hierarchy/src/hierarchy/count.js
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const e=require("./custom-
|
|
1
|
+
const e=require("./custom-CFJtq50-.cjs"),t=require("./src-BMjps4Ui.cjs"),n=require("./chunk-ABZYJK2D-CbIYYZa_.cjs"),r=require("./chunk-S3R3BYOJ-B2ozcJNg.cjs"),i=require("./mermaid-parser.core-BY0bWKp5.cjs"),a=require("./chunk-4BX2VUAB-HXFjpyQg.cjs");var o={showLegend:!0,ticks:5,max:null,min:0,graticule:`circle`},s={axes:[],curves:[],options:o},c=structuredClone(s),l=n.d.radar,u=t.h(()=>r.r({...l,...n.y().radar}),`getConfig`),d=t.h(()=>c.axes,`getAxes`),f=t.h(()=>c.curves,`getCurves`),p=t.h(()=>c.options,`getOptions`),m=t.h(e=>{c.axes=e.map(e=>({name:e.name,label:e.label??e.name}))},`setAxes`),h=t.h(e=>{c.curves=e.map(e=>({name:e.name,label:e.label??e.name,entries:g(e.entries)}))},`setCurves`),g=t.h(e=>{if(e[0].axis==null)return e.map(e=>e.value);let t=d();if(t.length===0)throw Error(`Axes must be populated before curves for reference entries`);return t.map(t=>{let n=e.find(e=>e.axis?.$refText===t.name);if(n===void 0)throw Error(`Missing entry for axis `+t.label);return n.value})},`computeCurveEntries`),_={getAxes:d,getCurves:f,getOptions:p,setAxes:m,setCurves:h,setOptions:t.h(e=>{let t=e.reduce((e,t)=>(e[t.name]=t,e),{});c.options={showLegend:t.showLegend?.value??o.showLegend,ticks:t.ticks?.value??o.ticks,max:t.max?.value??o.max,min:t.min?.value??o.min,graticule:t.graticule?.value??o.graticule}},`setOptions`),getConfig:u,clear:t.h(()=>{n.a(),c=structuredClone(s)},`clear`),setAccTitle:n.B,getAccTitle:n.v,setDiagramTitle:n.U,getDiagramTitle:n.C,getAccDescription:n._,setAccDescription:n.z},v=t.h(e=>{a.t(e,_);let{axes:t,curves:n,options:r}=e;_.setAxes(t),_.setCurves(n),_.setOptions(r)},`populate`),y={parse:t.h(async e=>{let n=await i.t(`radar`,e);t.g.debug(n),v(n)},`parse`)},b=t.h((t,n,r,i)=>{let a=i.db,o=a.getAxes(),s=a.getCurves(),c=a.getOptions(),l=a.getConfig(),u=a.getDiagramTitle(),d=x(e.f(n),l),f=c.max??Math.max(...s.map(e=>Math.max(...e.entries))),p=c.min,m=Math.min(l.width,l.height)/2;S(d,o,m,c.ticks,c.graticule),C(d,o,m,l),w(d,o,s,p,f,c.graticule,l),D(d,s,c.showLegend,l),d.append(`text`).attr(`class`,`radarTitle`).text(u).attr(`x`,0).attr(`y`,-l.height/2-l.marginTop)},`draw`),x=t.h((e,t)=>{let n=t.width+t.marginLeft+t.marginRight,r=t.height+t.marginTop+t.marginBottom,i={x:t.marginLeft+t.width/2,y:t.marginTop+t.height/2};return e.attr(`viewbox`,`0 0 ${n} ${r}`).attr(`width`,n).attr(`height`,r),e.append(`g`).attr(`transform`,`translate(${i.x}, ${i.y})`)},`drawFrame`),S=t.h((e,t,n,r,i)=>{if(i===`circle`)for(let t=0;t<r;t++){let i=n*(t+1)/r;e.append(`circle`).attr(`r`,i).attr(`class`,`radarGraticule`)}else if(i===`polygon`){let i=t.length;for(let a=0;a<r;a++){let o=n*(a+1)/r,s=t.map((e,t)=>{let n=2*t*Math.PI/i-Math.PI/2;return`${o*Math.cos(n)},${o*Math.sin(n)}`}).join(` `);e.append(`polygon`).attr(`points`,s).attr(`class`,`radarGraticule`)}}},`drawGraticule`),C=t.h((e,t,n,r)=>{let i=t.length;for(let a=0;a<i;a++){let o=t[a].label,s=2*a*Math.PI/i-Math.PI/2;e.append(`line`).attr(`x1`,0).attr(`y1`,0).attr(`x2`,n*r.axisScaleFactor*Math.cos(s)).attr(`y2`,n*r.axisScaleFactor*Math.sin(s)).attr(`class`,`radarAxisLine`),e.append(`text`).text(o).attr(`x`,n*r.axisLabelFactor*Math.cos(s)).attr(`y`,n*r.axisLabelFactor*Math.sin(s)).attr(`class`,`radarAxisLabel`)}},`drawAxes`);function w(e,t,n,r,i,a,o){let s=t.length,c=Math.min(o.width,o.height)/2;n.forEach((t,n)=>{if(t.entries.length!==s)return;let l=t.entries.map((e,t)=>{let n=2*Math.PI*t/s-Math.PI/2,a=T(e,r,i,c);return{x:a*Math.cos(n),y:a*Math.sin(n)}});a===`circle`?e.append(`path`).attr(`d`,E(l,o.curveTension)).attr(`class`,`radarCurve-${n}`):a===`polygon`&&e.append(`polygon`).attr(`points`,l.map(e=>`${e.x},${e.y}`).join(` `)).attr(`class`,`radarCurve-${n}`)})}t.h(w,`drawCurves`);function T(e,t,n,r){return r*(Math.min(Math.max(e,t),n)-t)/(n-t)}t.h(T,`relativeRadius`);function E(e,t){let n=e.length,r=`M${e[0].x},${e[0].y}`;for(let i=0;i<n;i++){let a=e[(i-1+n)%n],o=e[i],s=e[(i+1)%n],c=e[(i+2)%n],l={x:o.x+(s.x-a.x)*t,y:o.y+(s.y-a.y)*t},u={x:s.x-(c.x-o.x)*t,y:s.y-(c.y-o.y)*t};r+=` C${l.x},${l.y} ${u.x},${u.y} ${s.x},${s.y}`}return`${r} Z`}t.h(E,`closedRoundCurve`);function D(e,t,n,r){if(!n)return;let i=(r.width/2+r.marginRight)*3/4,a=-(r.height/2+r.marginTop)*3/4;t.forEach((t,n)=>{let r=e.append(`g`).attr(`transform`,`translate(${i}, ${a+n*20})`);r.append(`rect`).attr(`width`,12).attr(`height`,12).attr(`class`,`radarLegendBox-${n}`),r.append(`text`).attr(`x`,16).attr(`y`,0).attr(`class`,`radarLegendText`).text(t.label)})}t.h(D,`drawLegend`);var O={draw:b},k=t.h((e,t)=>{let n=``;for(let r=0;r<e.THEME_COLOR_LIMIT;r++){let i=e[`cScale${r}`];n+=`
|
|
2
2
|
.radarCurve-${r} {
|
|
3
3
|
color: ${i};
|
|
4
4
|
fill: ${i};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { f as e } from "./custom-
|
|
1
|
+
import { f as e } from "./custom-BEVHZhjn.js";
|
|
2
2
|
import { g as t, h as n } from "./src-BuisGndr.js";
|
|
3
3
|
import { B as r, C as i, T as a, U as o, _ as s, a as c, d as l, v as u, y as d, z as f } from "./chunk-ABZYJK2D-DDrmE3Q7.js";
|
|
4
4
|
import { r as p } from "./chunk-S3R3BYOJ-CG6GoSCd.js";
|
|
5
|
-
import { t as m } from "./mermaid-parser.core-
|
|
5
|
+
import { t as m } from "./mermaid-parser.core-CTjeJcfH.js";
|
|
6
6
|
import { t as h } from "./chunk-4BX2VUAB-BZTgbbzC.js";
|
|
7
7
|
//#region node_modules/.pnpm/mermaid@11.12.0/node_modules/mermaid/dist/chunks/mermaid.core/diagram-QEK2KX5R.mjs
|
|
8
8
|
var g = {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { f as e } from "./custom-
|
|
1
|
+
import { f as e } from "./custom-BEVHZhjn.js";
|
|
2
2
|
import { g as t, h as n } from "./src-BuisGndr.js";
|
|
3
3
|
import { B as r, C as i, U as a, _ as o, a as s, c, d as l, v as u, y as d, z as f } from "./chunk-ABZYJK2D-DDrmE3Q7.js";
|
|
4
4
|
import { r as p } from "./chunk-S3R3BYOJ-CG6GoSCd.js";
|
|
5
|
-
import { t as m } from "./mermaid-parser.core-
|
|
5
|
+
import { t as m } from "./mermaid-parser.core-CTjeJcfH.js";
|
|
6
6
|
import { t as h } from "./chunk-4BX2VUAB-BZTgbbzC.js";
|
|
7
7
|
//#region node_modules/.pnpm/mermaid@11.12.0/node_modules/mermaid/dist/chunks/mermaid.core/diagram-S2PKOQOG.mjs
|
|
8
8
|
var g = l.packet, _ = class {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const e=require("./custom-
|
|
1
|
+
const e=require("./custom-CFJtq50-.cjs"),t=require("./src-BMjps4Ui.cjs"),n=require("./chunk-ABZYJK2D-CbIYYZa_.cjs"),r=require("./chunk-S3R3BYOJ-B2ozcJNg.cjs"),i=require("./mermaid-parser.core-BY0bWKp5.cjs"),a=require("./chunk-4BX2VUAB-HXFjpyQg.cjs");var o=n.d.packet,s=class{constructor(){this.packet=[],this.setAccTitle=n.B,this.getAccTitle=n.v,this.setDiagramTitle=n.U,this.getDiagramTitle=n.C,this.getAccDescription=n._,this.setAccDescription=n.z}static{t.h(this,`PacketDB`)}getConfig(){let e=r.r({...o,...n.y().packet});return e.showBits&&(e.paddingY+=10),e}getPacket(){return this.packet}pushWord(e){e.length>0&&this.packet.push(e)}clear(){n.a(),this.packet=[]}},c=1e4,l=t.h((e,n)=>{a.t(e,n);let r=-1,i=[],o=1,{bitsPerRow:s}=n.getConfig();for(let{start:a,end:l,bits:d,label:f}of e.blocks){if(a!==void 0&&l!==void 0&&l<a)throw Error(`Packet block ${a} - ${l} is invalid. End must be greater than start.`);if(a??=r+1,a!==r+1)throw Error(`Packet block ${a} - ${l??a} is not contiguous. It should start from ${r+1}.`);if(d===0)throw Error(`Packet block ${a} is invalid. Cannot have a zero bit field.`);for(l??=a+(d??1)-1,d??=l-a+1,r=l,t.g.debug(`Packet block ${a} - ${r} with label ${f}`);i.length<=s+1&&n.getPacket().length<c;){let[e,t]=u({start:a,end:l,bits:d,label:f},o,s);if(i.push(e),e.end+1===o*s&&(n.pushWord(i),i=[],o++),!t)break;({start:a,end:l,bits:d,label:f}=t)}}n.pushWord(i)},`populate`),u=t.h((e,t,n)=>{if(e.start===void 0)throw Error(`start should have been set during first phase`);if(e.end===void 0)throw Error(`end should have been set during first phase`);if(e.start>e.end)throw Error(`Block start ${e.start} is greater than block end ${e.end}.`);if(e.end+1<=t*n)return[e,void 0];let r=t*n-1,i=t*n;return[{start:e.start,end:r,label:e.label,bits:r-e.start},{start:i,end:e.end,label:e.label,bits:e.end-i}]},`getNextFittingBlock`),d={parser:{yy:void 0},parse:t.h(async e=>{let n=await i.t(`packet`,e),r=d.parser?.yy;if(!(r instanceof s))throw Error(`parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.`);t.g.debug(n),l(n,r)},`parse`)},f=t.h((t,r,i,a)=>{let o=a.db,s=o.getConfig(),{rowHeight:c,paddingY:l,bitWidth:u,bitsPerRow:d}=s,f=o.getPacket(),m=o.getDiagramTitle(),h=c+l,g=h*(f.length+1)-(m?0:c),_=u*d+2,v=e.f(r);v.attr(`viewbox`,`0 0 ${_} ${g}`),n.c(v,g,_,s.useMaxWidth);for(let[e,t]of f.entries())p(v,t,e,s);v.append(`text`).text(m).attr(`x`,_/2).attr(`y`,g-h/2).attr(`dominant-baseline`,`middle`).attr(`text-anchor`,`middle`).attr(`class`,`packetTitle`)},`draw`),p=t.h((e,t,n,{rowHeight:r,paddingX:i,paddingY:a,bitWidth:o,bitsPerRow:s,showBits:c})=>{let l=e.append(`g`),u=n*(r+a)+a;for(let e of t){let t=e.start%s*o+1,n=(e.end-e.start+1)*o-i;if(l.append(`rect`).attr(`x`,t).attr(`y`,u).attr(`width`,n).attr(`height`,r).attr(`class`,`packetBlock`),l.append(`text`).attr(`x`,t+n/2).attr(`y`,u+r/2).attr(`class`,`packetLabel`).attr(`dominant-baseline`,`middle`).attr(`text-anchor`,`middle`).text(e.label),!c)continue;let a=e.end===e.start,d=u-2;l.append(`text`).attr(`x`,t+(a?n/2:0)).attr(`y`,d).attr(`class`,`packetByte start`).attr(`dominant-baseline`,`auto`).attr(`text-anchor`,a?`middle`:`start`).text(e.start),a||l.append(`text`).attr(`x`,t+n).attr(`y`,d).attr(`class`,`packetByte end`).attr(`dominant-baseline`,`auto`).attr(`text-anchor`,`end`).text(e.end)}},`drawWord`),m={draw:f},h={byteFontSize:`10px`,startByteColor:`black`,endByteColor:`black`,labelColor:`black`,labelFontSize:`12px`,titleColor:`black`,titleFontSize:`14px`,blockStrokeColor:`black`,blockStrokeWidth:`1`,blockFillColor:`#efefef`},g={parser:d,get db(){return new s},renderer:m,styles:t.h(({packet:e}={})=>{let t=r.r(h,e);return`
|
|
2
2
|
.packetByte {
|
|
3
3
|
font-size: ${t.byteFontSize};
|
|
4
4
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const e=require("./custom-CTbYnXJM.cjs"),t=require("./src-BMjps4Ui.cjs"),n=require("./chunk-ABZYJK2D-CbIYYZa_.cjs"),r=require("./channel-BWHkpgVD.cjs"),i=require("./chunk-S3R3BYOJ-B2ozcJNg.cjs");require("./chunk-HN2XXSSU-BwmRMa2r.cjs"),require("./chunk-CVBHYZKI-CLVcv_xh.cjs"),require("./chunk-ATLVNIR6-shAOudT0.cjs"),require("./chunk-JA3XYJ7Z-BaAdjYEy.cjs"),require("./chunk-JZLCHNYA-CvPIQFXP.cjs"),require("./chunk-QXUST7PY-CnnfdJrM.cjs");const a=require("./chunk-55IACEB6-Hy_THNUs.cjs"),o=require("./chunk-QN33PNHL-Cu0FHarG.cjs");var s=(function(){var e=t.h(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,50],r=[1,10],i=[1,11],a=[1,12],o=[1,13],s=[1,20],c=[1,21],l=[1,22],u=[1,23],d=[1,24],f=[1,19],p=[1,25],m=[1,26],h=[1,18],g=[1,33],_=[1,34],v=[1,35],y=[1,36],b=[1,37],x=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,50,63,64,65,66,67],S=[1,42],C=[1,43],w=[1,52],T=[40,50,68,69],E=[1,63],D=[1,61],O=[1,58],k=[1,62],A=[1,64],j=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,63,64,65,66,67],M=[63,64,65,66,67],N=[1,81],P=[1,80],F=[1,78],I=[1,79],L=[6,10,42,47],R=[6,10,13,41,42,47,48,49],z=[1,89],B=[1,88],V=[1,87],H=[19,56],U=[1,98],W=[1,97],G=[19,56,58,60],K={trace:t.h(function(){},`trace`),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,COLON:13,role:14,STYLE_SEPARATOR:15,idList:16,BLOCK_START:17,attributes:18,BLOCK_STOP:19,SQS:20,SQE:21,title:22,title_value:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,direction:29,classDefStatement:30,classStatement:31,styleStatement:32,direction_tb:33,direction_bt:34,direction_rl:35,direction_lr:36,CLASSDEF:37,stylesOpt:38,separator:39,UNICODE_TEXT:40,STYLE_TEXT:41,COMMA:42,CLASS:43,STYLE:44,style:45,styleComponent:46,SEMI:47,NUM:48,BRKT:49,ENTITY_NAME:50,attribute:51,attributeType:52,attributeName:53,attributeKeyTypeList:54,attributeComment:55,ATTRIBUTE_WORD:56,attributeKeyType:57,",":58,ATTRIBUTE_KEY:59,COMMENT:60,cardinality:61,relType:62,ZERO_OR_ONE:63,ZERO_OR_MORE:64,ONE_OR_MORE:65,ONLY_ONE:66,MD_PARENT:67,NON_IDENTIFYING:68,IDENTIFYING:69,WORD:70,$accept:0,$end:1},terminals_:{2:`error`,4:`ER_DIAGRAM`,6:`EOF`,8:`SPACE`,10:`NEWLINE`,13:`COLON`,15:`STYLE_SEPARATOR`,17:`BLOCK_START`,19:`BLOCK_STOP`,20:`SQS`,21:`SQE`,22:`title`,23:`title_value`,24:`acc_title`,25:`acc_title_value`,26:`acc_descr`,27:`acc_descr_value`,28:`acc_descr_multiline_value`,33:`direction_tb`,34:`direction_bt`,35:`direction_rl`,36:`direction_lr`,37:`CLASSDEF`,40:`UNICODE_TEXT`,41:`STYLE_TEXT`,42:`COMMA`,43:`CLASS`,44:`STYLE`,47:`SEMI`,48:`NUM`,49:`BRKT`,50:`ENTITY_NAME`,56:`ATTRIBUTE_WORD`,58:`,`,59:`ATTRIBUTE_KEY`,60:`COMMENT`,63:`ZERO_OR_ONE`,64:`ZERO_OR_MORE`,65:`ONE_OR_MORE`,66:`ONLY_ONE`,67:`MD_PARENT`,68:`NON_IDENTIFYING`,69:`IDENTIFYING`,70:`WORD`},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,9],[9,7],[9,7],[9,4],[9,6],[9,3],[9,5],[9,1],[9,3],[9,7],[9,9],[9,6],[9,8],[9,4],[9,6],[9,2],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[9,1],[29,1],[29,1],[29,1],[29,1],[30,4],[16,1],[16,1],[16,3],[16,3],[31,3],[32,4],[38,1],[38,3],[45,1],[45,2],[39,1],[39,1],[39,1],[46,1],[46,1],[46,1],[46,1],[11,1],[11,1],[18,1],[18,2],[51,2],[51,3],[51,3],[51,4],[52,1],[53,1],[54,1],[54,3],[57,1],[55,1],[12,3],[61,1],[61,1],[61,1],[61,1],[61,1],[62,1],[62,1],[14,1],[14,1],[14,1]],performAction:t.h(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:break;case 2:this.$=[];break;case 3:a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 5:this.$=a[s];break;case 6:case 7:this.$=[];break;case 8:r.addEntity(a[s-4]),r.addEntity(a[s-2]),r.addRelationship(a[s-4],a[s],a[s-2],a[s-3]);break;case 9:r.addEntity(a[s-8]),r.addEntity(a[s-4]),r.addRelationship(a[s-8],a[s],a[s-4],a[s-5]),r.setClass([a[s-8]],a[s-6]),r.setClass([a[s-4]],a[s-2]);break;case 10:r.addEntity(a[s-6]),r.addEntity(a[s-2]),r.addRelationship(a[s-6],a[s],a[s-2],a[s-3]),r.setClass([a[s-6]],a[s-4]);break;case 11:r.addEntity(a[s-6]),r.addEntity(a[s-4]),r.addRelationship(a[s-6],a[s],a[s-4],a[s-5]),r.setClass([a[s-4]],a[s-2]);break;case 12:r.addEntity(a[s-3]),r.addAttributes(a[s-3],a[s-1]);break;case 13:r.addEntity(a[s-5]),r.addAttributes(a[s-5],a[s-1]),r.setClass([a[s-5]],a[s-3]);break;case 14:r.addEntity(a[s-2]);break;case 15:r.addEntity(a[s-4]),r.setClass([a[s-4]],a[s-2]);break;case 16:r.addEntity(a[s]);break;case 17:r.addEntity(a[s-2]),r.setClass([a[s-2]],a[s]);break;case 18:r.addEntity(a[s-6],a[s-4]),r.addAttributes(a[s-6],a[s-1]);break;case 19:r.addEntity(a[s-8],a[s-6]),r.addAttributes(a[s-8],a[s-1]),r.setClass([a[s-8]],a[s-3]);break;case 20:r.addEntity(a[s-5],a[s-3]);break;case 21:r.addEntity(a[s-7],a[s-5]),r.setClass([a[s-7]],a[s-2]);break;case 22:r.addEntity(a[s-3],a[s-1]);break;case 23:r.addEntity(a[s-5],a[s-3]),r.setClass([a[s-5]],a[s]);break;case 24:case 25:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 26:case 27:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 32:r.setDirection(`TB`);break;case 33:r.setDirection(`BT`);break;case 34:r.setDirection(`RL`);break;case 35:r.setDirection(`LR`);break;case 36:this.$=a[s-3],r.addClass(a[s-2],a[s-1]);break;case 37:case 38:case 56:case 64:this.$=[a[s]];break;case 39:case 40:this.$=a[s-2].concat([a[s]]);break;case 41:this.$=a[s-2],r.setClass(a[s-1],a[s]);break;case 42:this.$=a[s-3],r.addCssStyles(a[s-2],a[s-1]);break;case 43:this.$=[a[s]];break;case 44:a[s-2].push(a[s]),this.$=a[s-2];break;case 46:this.$=a[s-1]+a[s];break;case 54:case 76:case 77:this.$=a[s].replace(/"/g,``);break;case 55:case 78:this.$=a[s];break;case 57:a[s].push(a[s-1]),this.$=a[s];break;case 58:this.$={type:a[s-1],name:a[s]};break;case 59:this.$={type:a[s-2],name:a[s-1],keys:a[s]};break;case 60:this.$={type:a[s-2],name:a[s-1],comment:a[s]};break;case 61:this.$={type:a[s-3],name:a[s-2],keys:a[s-1],comment:a[s]};break;case 62:case 63:case 66:this.$=a[s];break;case 65:a[s-2].push(a[s]),this.$=a[s-2];break;case 67:this.$=a[s].replace(/"/g,``);break;case 68:this.$={cardA:a[s],relType:a[s-1],cardB:a[s-2]};break;case 69:this.$=r.Cardinality.ZERO_OR_ONE;break;case 70:this.$=r.Cardinality.ZERO_OR_MORE;break;case 71:this.$=r.Cardinality.ONE_OR_MORE;break;case 72:this.$=r.Cardinality.ONLY_ONE;break;case 73:this.$=r.Cardinality.MD_PARENT;break;case 74:this.$=r.Identification.NON_IDENTIFYING;break;case 75:this.$=r.Identification.IDENTIFYING;break}},`anonymous`),table:[{3:1,4:[1,2]},{1:[3]},e(n,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:r,24:i,26:a,28:o,29:14,30:15,31:16,32:17,33:s,34:c,35:l,36:u,37:d,40:f,43:p,44:m,50:h},e(n,[2,7],{1:[2,1]}),e(n,[2,3]),{9:27,11:9,22:r,24:i,26:a,28:o,29:14,30:15,31:16,32:17,33:s,34:c,35:l,36:u,37:d,40:f,43:p,44:m,50:h},e(n,[2,5]),e(n,[2,6]),e(n,[2,16],{12:28,61:32,15:[1,29],17:[1,30],20:[1,31],63:g,64:_,65:v,66:y,67:b}),{23:[1,38]},{25:[1,39]},{27:[1,40]},e(n,[2,27]),e(n,[2,28]),e(n,[2,29]),e(n,[2,30]),e(n,[2,31]),e(x,[2,54]),e(x,[2,55]),e(n,[2,32]),e(n,[2,33]),e(n,[2,34]),e(n,[2,35]),{16:41,40:S,41:C},{16:44,40:S,41:C},{16:45,40:S,41:C},e(n,[2,4]),{11:46,40:f,50:h},{16:47,40:S,41:C},{18:48,19:[1,49],51:50,52:51,56:w},{11:53,40:f,50:h},{62:54,68:[1,55],69:[1,56]},e(T,[2,69]),e(T,[2,70]),e(T,[2,71]),e(T,[2,72]),e(T,[2,73]),e(n,[2,24]),e(n,[2,25]),e(n,[2,26]),{13:E,38:57,41:D,42:O,45:59,46:60,48:k,49:A},e(j,[2,37]),e(j,[2,38]),{16:65,40:S,41:C,42:O},{13:E,38:66,41:D,42:O,45:59,46:60,48:k,49:A},{13:[1,67],15:[1,68]},e(n,[2,17],{61:32,12:69,17:[1,70],42:O,63:g,64:_,65:v,66:y,67:b}),{19:[1,71]},e(n,[2,14]),{18:72,19:[2,56],51:50,52:51,56:w},{53:73,56:[1,74]},{56:[2,62]},{21:[1,75]},{61:76,63:g,64:_,65:v,66:y,67:b},e(M,[2,74]),e(M,[2,75]),{6:N,10:P,39:77,42:F,47:I},{40:[1,82],41:[1,83]},e(L,[2,43],{46:84,13:E,41:D,48:k,49:A}),e(R,[2,45]),e(R,[2,50]),e(R,[2,51]),e(R,[2,52]),e(R,[2,53]),e(n,[2,41],{42:O}),{6:N,10:P,39:85,42:F,47:I},{14:86,40:z,50:B,70:V},{16:90,40:S,41:C},{11:91,40:f,50:h},{18:92,19:[1,93],51:50,52:51,56:w},e(n,[2,12]),{19:[2,57]},e(H,[2,58],{54:94,55:95,57:96,59:U,60:W}),e([19,56,59,60],[2,63]),e(n,[2,22],{15:[1,100],17:[1,99]}),e([40,50],[2,68]),e(n,[2,36]),{13:E,41:D,45:101,46:60,48:k,49:A},e(n,[2,47]),e(n,[2,48]),e(n,[2,49]),e(j,[2,39]),e(j,[2,40]),e(R,[2,46]),e(n,[2,42]),e(n,[2,8]),e(n,[2,76]),e(n,[2,77]),e(n,[2,78]),{13:[1,102],42:O},{13:[1,104],15:[1,103]},{19:[1,105]},e(n,[2,15]),e(H,[2,59],{55:106,58:[1,107],60:W}),e(H,[2,60]),e(G,[2,64]),e(H,[2,67]),e(G,[2,66]),{18:108,19:[1,109],51:50,52:51,56:w},{16:110,40:S,41:C},e(L,[2,44],{46:84,13:E,41:D,48:k,49:A}),{14:111,40:z,50:B,70:V},{16:112,40:S,41:C},{14:113,40:z,50:B,70:V},e(n,[2,13]),e(H,[2,61]),{57:114,59:U},{19:[1,115]},e(n,[2,20]),e(n,[2,23],{17:[1,116],42:O}),e(n,[2,11]),{13:[1,117],42:O},e(n,[2,10]),e(G,[2,65]),e(n,[2,18]),{18:118,19:[1,119],51:50,52:51,56:w},{14:120,40:z,50:B,70:V},{19:[1,121]},e(n,[2,21]),e(n,[2,9]),e(n,[2,19])],defaultActions:{52:[2,62],72:[2,57]},parseError:t.h(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:t.h(function(e){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}t.h(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}t.h(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
|
|
1
|
+
const e=require("./custom-CFJtq50-.cjs"),t=require("./src-BMjps4Ui.cjs"),n=require("./chunk-ABZYJK2D-CbIYYZa_.cjs"),r=require("./channel-BWHkpgVD.cjs"),i=require("./chunk-S3R3BYOJ-B2ozcJNg.cjs");require("./chunk-HN2XXSSU-BwmRMa2r.cjs"),require("./chunk-CVBHYZKI-CLVcv_xh.cjs"),require("./chunk-ATLVNIR6-shAOudT0.cjs"),require("./chunk-JA3XYJ7Z-BaAdjYEy.cjs"),require("./chunk-JZLCHNYA-CvPIQFXP.cjs"),require("./chunk-QXUST7PY-CnnfdJrM.cjs");const a=require("./chunk-55IACEB6-Hy_THNUs.cjs"),o=require("./chunk-QN33PNHL-Cu0FHarG.cjs");var s=(function(){var e=t.h(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,50],r=[1,10],i=[1,11],a=[1,12],o=[1,13],s=[1,20],c=[1,21],l=[1,22],u=[1,23],d=[1,24],f=[1,19],p=[1,25],m=[1,26],h=[1,18],g=[1,33],_=[1,34],v=[1,35],y=[1,36],b=[1,37],x=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,50,63,64,65,66,67],S=[1,42],C=[1,43],w=[1,52],T=[40,50,68,69],E=[1,63],D=[1,61],O=[1,58],k=[1,62],A=[1,64],j=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,63,64,65,66,67],M=[63,64,65,66,67],N=[1,81],P=[1,80],F=[1,78],I=[1,79],L=[6,10,42,47],R=[6,10,13,41,42,47,48,49],z=[1,89],B=[1,88],V=[1,87],H=[19,56],U=[1,98],W=[1,97],G=[19,56,58,60],K={trace:t.h(function(){},`trace`),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,COLON:13,role:14,STYLE_SEPARATOR:15,idList:16,BLOCK_START:17,attributes:18,BLOCK_STOP:19,SQS:20,SQE:21,title:22,title_value:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,direction:29,classDefStatement:30,classStatement:31,styleStatement:32,direction_tb:33,direction_bt:34,direction_rl:35,direction_lr:36,CLASSDEF:37,stylesOpt:38,separator:39,UNICODE_TEXT:40,STYLE_TEXT:41,COMMA:42,CLASS:43,STYLE:44,style:45,styleComponent:46,SEMI:47,NUM:48,BRKT:49,ENTITY_NAME:50,attribute:51,attributeType:52,attributeName:53,attributeKeyTypeList:54,attributeComment:55,ATTRIBUTE_WORD:56,attributeKeyType:57,",":58,ATTRIBUTE_KEY:59,COMMENT:60,cardinality:61,relType:62,ZERO_OR_ONE:63,ZERO_OR_MORE:64,ONE_OR_MORE:65,ONLY_ONE:66,MD_PARENT:67,NON_IDENTIFYING:68,IDENTIFYING:69,WORD:70,$accept:0,$end:1},terminals_:{2:`error`,4:`ER_DIAGRAM`,6:`EOF`,8:`SPACE`,10:`NEWLINE`,13:`COLON`,15:`STYLE_SEPARATOR`,17:`BLOCK_START`,19:`BLOCK_STOP`,20:`SQS`,21:`SQE`,22:`title`,23:`title_value`,24:`acc_title`,25:`acc_title_value`,26:`acc_descr`,27:`acc_descr_value`,28:`acc_descr_multiline_value`,33:`direction_tb`,34:`direction_bt`,35:`direction_rl`,36:`direction_lr`,37:`CLASSDEF`,40:`UNICODE_TEXT`,41:`STYLE_TEXT`,42:`COMMA`,43:`CLASS`,44:`STYLE`,47:`SEMI`,48:`NUM`,49:`BRKT`,50:`ENTITY_NAME`,56:`ATTRIBUTE_WORD`,58:`,`,59:`ATTRIBUTE_KEY`,60:`COMMENT`,63:`ZERO_OR_ONE`,64:`ZERO_OR_MORE`,65:`ONE_OR_MORE`,66:`ONLY_ONE`,67:`MD_PARENT`,68:`NON_IDENTIFYING`,69:`IDENTIFYING`,70:`WORD`},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,9],[9,7],[9,7],[9,4],[9,6],[9,3],[9,5],[9,1],[9,3],[9,7],[9,9],[9,6],[9,8],[9,4],[9,6],[9,2],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[9,1],[29,1],[29,1],[29,1],[29,1],[30,4],[16,1],[16,1],[16,3],[16,3],[31,3],[32,4],[38,1],[38,3],[45,1],[45,2],[39,1],[39,1],[39,1],[46,1],[46,1],[46,1],[46,1],[11,1],[11,1],[18,1],[18,2],[51,2],[51,3],[51,3],[51,4],[52,1],[53,1],[54,1],[54,3],[57,1],[55,1],[12,3],[61,1],[61,1],[61,1],[61,1],[61,1],[62,1],[62,1],[14,1],[14,1],[14,1]],performAction:t.h(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:break;case 2:this.$=[];break;case 3:a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 5:this.$=a[s];break;case 6:case 7:this.$=[];break;case 8:r.addEntity(a[s-4]),r.addEntity(a[s-2]),r.addRelationship(a[s-4],a[s],a[s-2],a[s-3]);break;case 9:r.addEntity(a[s-8]),r.addEntity(a[s-4]),r.addRelationship(a[s-8],a[s],a[s-4],a[s-5]),r.setClass([a[s-8]],a[s-6]),r.setClass([a[s-4]],a[s-2]);break;case 10:r.addEntity(a[s-6]),r.addEntity(a[s-2]),r.addRelationship(a[s-6],a[s],a[s-2],a[s-3]),r.setClass([a[s-6]],a[s-4]);break;case 11:r.addEntity(a[s-6]),r.addEntity(a[s-4]),r.addRelationship(a[s-6],a[s],a[s-4],a[s-5]),r.setClass([a[s-4]],a[s-2]);break;case 12:r.addEntity(a[s-3]),r.addAttributes(a[s-3],a[s-1]);break;case 13:r.addEntity(a[s-5]),r.addAttributes(a[s-5],a[s-1]),r.setClass([a[s-5]],a[s-3]);break;case 14:r.addEntity(a[s-2]);break;case 15:r.addEntity(a[s-4]),r.setClass([a[s-4]],a[s-2]);break;case 16:r.addEntity(a[s]);break;case 17:r.addEntity(a[s-2]),r.setClass([a[s-2]],a[s]);break;case 18:r.addEntity(a[s-6],a[s-4]),r.addAttributes(a[s-6],a[s-1]);break;case 19:r.addEntity(a[s-8],a[s-6]),r.addAttributes(a[s-8],a[s-1]),r.setClass([a[s-8]],a[s-3]);break;case 20:r.addEntity(a[s-5],a[s-3]);break;case 21:r.addEntity(a[s-7],a[s-5]),r.setClass([a[s-7]],a[s-2]);break;case 22:r.addEntity(a[s-3],a[s-1]);break;case 23:r.addEntity(a[s-5],a[s-3]),r.setClass([a[s-5]],a[s]);break;case 24:case 25:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 26:case 27:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 32:r.setDirection(`TB`);break;case 33:r.setDirection(`BT`);break;case 34:r.setDirection(`RL`);break;case 35:r.setDirection(`LR`);break;case 36:this.$=a[s-3],r.addClass(a[s-2],a[s-1]);break;case 37:case 38:case 56:case 64:this.$=[a[s]];break;case 39:case 40:this.$=a[s-2].concat([a[s]]);break;case 41:this.$=a[s-2],r.setClass(a[s-1],a[s]);break;case 42:this.$=a[s-3],r.addCssStyles(a[s-2],a[s-1]);break;case 43:this.$=[a[s]];break;case 44:a[s-2].push(a[s]),this.$=a[s-2];break;case 46:this.$=a[s-1]+a[s];break;case 54:case 76:case 77:this.$=a[s].replace(/"/g,``);break;case 55:case 78:this.$=a[s];break;case 57:a[s].push(a[s-1]),this.$=a[s];break;case 58:this.$={type:a[s-1],name:a[s]};break;case 59:this.$={type:a[s-2],name:a[s-1],keys:a[s]};break;case 60:this.$={type:a[s-2],name:a[s-1],comment:a[s]};break;case 61:this.$={type:a[s-3],name:a[s-2],keys:a[s-1],comment:a[s]};break;case 62:case 63:case 66:this.$=a[s];break;case 65:a[s-2].push(a[s]),this.$=a[s-2];break;case 67:this.$=a[s].replace(/"/g,``);break;case 68:this.$={cardA:a[s],relType:a[s-1],cardB:a[s-2]};break;case 69:this.$=r.Cardinality.ZERO_OR_ONE;break;case 70:this.$=r.Cardinality.ZERO_OR_MORE;break;case 71:this.$=r.Cardinality.ONE_OR_MORE;break;case 72:this.$=r.Cardinality.ONLY_ONE;break;case 73:this.$=r.Cardinality.MD_PARENT;break;case 74:this.$=r.Identification.NON_IDENTIFYING;break;case 75:this.$=r.Identification.IDENTIFYING;break}},`anonymous`),table:[{3:1,4:[1,2]},{1:[3]},e(n,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:r,24:i,26:a,28:o,29:14,30:15,31:16,32:17,33:s,34:c,35:l,36:u,37:d,40:f,43:p,44:m,50:h},e(n,[2,7],{1:[2,1]}),e(n,[2,3]),{9:27,11:9,22:r,24:i,26:a,28:o,29:14,30:15,31:16,32:17,33:s,34:c,35:l,36:u,37:d,40:f,43:p,44:m,50:h},e(n,[2,5]),e(n,[2,6]),e(n,[2,16],{12:28,61:32,15:[1,29],17:[1,30],20:[1,31],63:g,64:_,65:v,66:y,67:b}),{23:[1,38]},{25:[1,39]},{27:[1,40]},e(n,[2,27]),e(n,[2,28]),e(n,[2,29]),e(n,[2,30]),e(n,[2,31]),e(x,[2,54]),e(x,[2,55]),e(n,[2,32]),e(n,[2,33]),e(n,[2,34]),e(n,[2,35]),{16:41,40:S,41:C},{16:44,40:S,41:C},{16:45,40:S,41:C},e(n,[2,4]),{11:46,40:f,50:h},{16:47,40:S,41:C},{18:48,19:[1,49],51:50,52:51,56:w},{11:53,40:f,50:h},{62:54,68:[1,55],69:[1,56]},e(T,[2,69]),e(T,[2,70]),e(T,[2,71]),e(T,[2,72]),e(T,[2,73]),e(n,[2,24]),e(n,[2,25]),e(n,[2,26]),{13:E,38:57,41:D,42:O,45:59,46:60,48:k,49:A},e(j,[2,37]),e(j,[2,38]),{16:65,40:S,41:C,42:O},{13:E,38:66,41:D,42:O,45:59,46:60,48:k,49:A},{13:[1,67],15:[1,68]},e(n,[2,17],{61:32,12:69,17:[1,70],42:O,63:g,64:_,65:v,66:y,67:b}),{19:[1,71]},e(n,[2,14]),{18:72,19:[2,56],51:50,52:51,56:w},{53:73,56:[1,74]},{56:[2,62]},{21:[1,75]},{61:76,63:g,64:_,65:v,66:y,67:b},e(M,[2,74]),e(M,[2,75]),{6:N,10:P,39:77,42:F,47:I},{40:[1,82],41:[1,83]},e(L,[2,43],{46:84,13:E,41:D,48:k,49:A}),e(R,[2,45]),e(R,[2,50]),e(R,[2,51]),e(R,[2,52]),e(R,[2,53]),e(n,[2,41],{42:O}),{6:N,10:P,39:85,42:F,47:I},{14:86,40:z,50:B,70:V},{16:90,40:S,41:C},{11:91,40:f,50:h},{18:92,19:[1,93],51:50,52:51,56:w},e(n,[2,12]),{19:[2,57]},e(H,[2,58],{54:94,55:95,57:96,59:U,60:W}),e([19,56,59,60],[2,63]),e(n,[2,22],{15:[1,100],17:[1,99]}),e([40,50],[2,68]),e(n,[2,36]),{13:E,41:D,45:101,46:60,48:k,49:A},e(n,[2,47]),e(n,[2,48]),e(n,[2,49]),e(j,[2,39]),e(j,[2,40]),e(R,[2,46]),e(n,[2,42]),e(n,[2,8]),e(n,[2,76]),e(n,[2,77]),e(n,[2,78]),{13:[1,102],42:O},{13:[1,104],15:[1,103]},{19:[1,105]},e(n,[2,15]),e(H,[2,59],{55:106,58:[1,107],60:W}),e(H,[2,60]),e(G,[2,64]),e(H,[2,67]),e(G,[2,66]),{18:108,19:[1,109],51:50,52:51,56:w},{16:110,40:S,41:C},e(L,[2,44],{46:84,13:E,41:D,48:k,49:A}),{14:111,40:z,50:B,70:V},{16:112,40:S,41:C},{14:113,40:z,50:B,70:V},e(n,[2,13]),e(H,[2,61]),{57:114,59:U},{19:[1,115]},e(n,[2,20]),e(n,[2,23],{17:[1,116],42:O}),e(n,[2,11]),{13:[1,117],42:O},e(n,[2,10]),e(G,[2,65]),e(n,[2,18]),{18:118,19:[1,119],51:50,52:51,56:w},{14:120,40:z,50:B,70:V},{19:[1,121]},e(n,[2,21]),e(n,[2,9]),e(n,[2,19])],defaultActions:{52:[2,62],72:[2,57]},parseError:t.h(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:t.h(function(e){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}t.h(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}t.h(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
|
|
2
2
|
`+h.showPosition()+`
|
|
3
3
|
Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};K.lexer=(function(){return{EOF:1,parseError:t.h(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:t.h(function(e,t){return this.yy=t||this.yy||{},this._input=e,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:t.h(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.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),e},`input`),unput:t.h(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:t.h(function(){return this._more=!0,this},`more`),reject:t.h(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:t.h(function(e){this.unput(this.match.slice(e))},`less`),pastInput:t.h(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:t.h(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:t.h(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as e, l as t } from "./custom-
|
|
1
|
+
import { c as e, l as t } from "./custom-BEVHZhjn.js";
|
|
2
2
|
import { g as n, h as r, m as i, p as a } from "./src-BuisGndr.js";
|
|
3
3
|
import { B as o, C as s, U as c, _ as l, a as u, b as d, et as f, v as p, z as m } from "./chunk-ABZYJK2D-DDrmE3Q7.js";
|
|
4
4
|
import { t as h } from "./channel-JT7eWw2w.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const e=require("./custom-
|
|
1
|
+
const e=require("./custom-CFJtq50-.cjs"),t=require("./src-BMjps4Ui.cjs"),n=require("./chunk-ABZYJK2D-CbIYYZa_.cjs"),r=require("./channel-BWHkpgVD.cjs"),i=require("./chunk-S3R3BYOJ-B2ozcJNg.cjs");require("./chunk-HN2XXSSU-BwmRMa2r.cjs"),require("./chunk-CVBHYZKI-CLVcv_xh.cjs"),require("./chunk-ATLVNIR6-shAOudT0.cjs"),require("./chunk-JA3XYJ7Z-BaAdjYEy.cjs");const a=require("./chunk-JZLCHNYA-CvPIQFXP.cjs");require("./chunk-QXUST7PY-CnnfdJrM.cjs");const o=require("./chunk-FMBD7UC4-DWMVCXKq.cjs"),s=require("./chunk-55IACEB6-Hy_THNUs.cjs"),c=require("./chunk-QN33PNHL-Cu0FHarG.cjs");var l=`flowchart-`,u=class{constructor(){this.vertexCounter=0,this.config=n.b(),this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=n.B,this.setAccDescription=n.z,this.setDiagramTitle=n.U,this.getAccTitle=n.v,this.getAccDescription=n._,this.getDiagramTitle=n.C,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen(`gen-2`)}static{t.h(this,`FlowDB`)}sanitizeText(e){return n.s.sanitizeText(e,this.config)}lookUpDomId(e){for(let t of this.vertices.values())if(t.id===e)return t.domId;return e}addVertex(t,r,i,o,s,c,u={},d){if(!t||t.trim().length===0)return;let f;if(d!==void 0){let t;t=d.includes(`
|
|
2
2
|
`)?d+`
|
|
3
3
|
`:`{
|
|
4
4
|
`+d+`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as e, d as t, l as n, u as r } from "./custom-
|
|
1
|
+
import { c as e, d as t, l as n, u as r } from "./custom-BEVHZhjn.js";
|
|
2
2
|
import { g as i, h as a, p as o } from "./src-BuisGndr.js";
|
|
3
3
|
import { B as s, C as c, H as l, U as u, _ as d, a as f, b as p, et as m, s as h, u as g, v as _, z as v } from "./chunk-ABZYJK2D-DDrmE3Q7.js";
|
|
4
4
|
import { t as ee } from "./channel-JT7eWw2w.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./mermaid-parser.core-BY0bWKp5.cjs");exports.createGitGraphServices=e.p;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { g as e, h as t, p as n } from "./src-BuisGndr.js";
|
|
2
2
|
import { B as r, C as i, K as a, U as o, _ as s, a as c, b as l, d as u, s as d, v as f, y as p, z as ee } from "./chunk-ABZYJK2D-DDrmE3Q7.js";
|
|
3
3
|
import { h as m, p as h, r as g } from "./chunk-S3R3BYOJ-CG6GoSCd.js";
|
|
4
|
-
import { t as _ } from "./mermaid-parser.core-
|
|
4
|
+
import { t as _ } from "./mermaid-parser.core-CTjeJcfH.js";
|
|
5
5
|
import { t as te } from "./chunk-4BX2VUAB-BZTgbbzC.js";
|
|
6
6
|
import { t as ne } from "./chunk-QZHKN3VN-Dal4kx9B.js";
|
|
7
7
|
//#region node_modules/.pnpm/mermaid@11.12.0/node_modules/mermaid/dist/chunks/mermaid.core/gitGraphDiagram-NY62KEGX.mjs
|
package/dist/{gitGraphDiagram-NY62KEGX-Cky6DbTs.cjs → gitGraphDiagram-NY62KEGX-Do6avzMz.cjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const e=require("./src-BMjps4Ui.cjs"),t=require("./chunk-ABZYJK2D-CbIYYZa_.cjs"),n=require("./chunk-S3R3BYOJ-B2ozcJNg.cjs"),r=require("./mermaid-parser.core-CaUKRbWB.cjs"),i=require("./chunk-4BX2VUAB-HXFjpyQg.cjs"),a=require("./chunk-QZHKN3VN-2e6nJr8c.cjs");var o={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},s=t.d.gitGraph,c=e.h(()=>n.r({...s,...t.y().gitGraph}),`getConfig`),l=new a.t(()=>{let e=c(),t=e.mainBranchName,n=e.mainBranchOrder;return{mainBranchName:t,commits:new Map,head:null,branchConfig:new Map([[t,{name:t,order:n}]]),branches:new Map([[t,null]]),currBranch:t,direction:`LR`,seq:0,options:{}}});function u(){return n.p({length:7})}e.h(u,`getID`);function d(e,t){let n=Object.create(null);return e.reduce((e,r)=>{let i=t(r);return n[i]||(n[i]=!0,e.push(r)),e},[])}e.h(d,`uniqBy`);var f=e.h(function(e){l.records.direction=e},`setDirection`),p=e.h(function(t){e.g.debug(`options str`,t),t=t?.trim(),t||=`{}`;try{l.records.options=JSON.parse(t)}catch(t){e.g.error(`error while parsing gitGraph options`,t.message)}},`setOptions`),m=e.h(function(){return l.records.options},`getOptions`),h=e.h(function(n){let r=n.msg,i=n.id,a=n.type,s=n.tags;e.g.info(`commit`,r,i,a,s),e.g.debug(`Entering commit:`,r,i,a,s);let d=c();i=t.s.sanitizeText(i,d),r=t.s.sanitizeText(r,d),s=s?.map(e=>t.s.sanitizeText(e,d));let f={id:i||l.records.seq+`-`+u(),message:r,seq:l.records.seq++,type:a??o.NORMAL,tags:s??[],parents:l.records.head==null?[]:[l.records.head.id],branch:l.records.currBranch};l.records.head=f,e.g.info(`main branch`,d.mainBranchName),l.records.commits.has(f.id)&&e.g.warn(`Commit ID ${f.id} already exists`),l.records.commits.set(f.id,f),l.records.branches.set(l.records.currBranch,f.id),e.g.debug(`in pushCommit `+f.id)},`commit`),g=e.h(function(n){let r=n.name,i=n.order;if(r=t.s.sanitizeText(r,c()),l.records.branches.has(r))throw Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);l.records.branches.set(r,l.records.head==null?null:l.records.head.id),l.records.branchConfig.set(r,{name:r,order:i}),y(r),e.g.debug(`in createBranch`)},`branch`),_=e.h(n=>{let r=n.branch,i=n.id,a=n.type,s=n.tags,d=c();r=t.s.sanitizeText(r,d),i&&=t.s.sanitizeText(i,d);let f=l.records.branches.get(l.records.currBranch),p=l.records.branches.get(r),m=f?l.records.commits.get(f):void 0,h=p?l.records.commits.get(p):void 0;if(m&&h&&m.branch===r)throw Error(`Cannot merge branch '${r}' into itself.`);if(l.records.currBranch===r){let e=Error(`Incorrect usage of "merge". Cannot merge a branch to itself`);throw e.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch abc`]},e}if(m===void 0||!m){let e=Error(`Incorrect usage of "merge". Current branch (${l.records.currBranch})has no commits`);throw e.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`commit`]},e}if(!l.records.branches.has(r)){let e=Error(`Incorrect usage of "merge". Branch to be merged (`+r+`) does not exist`);throw e.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},e}if(h===void 0||!h){let e=Error(`Incorrect usage of "merge". Branch to be merged (`+r+`) has no commits`);throw e.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`"commit"`]},e}if(m===h){let e=Error(`Incorrect usage of "merge". Both branches have same head`);throw e.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch abc`]},e}if(i&&l.records.commits.has(i)){let e=Error(`Incorrect usage of "merge". Commit with id:`+i+` already exists, use different custom id`);throw e.hash={text:`merge ${r} ${i} ${a} ${s?.join(` `)}`,token:`merge ${r} ${i} ${a} ${s?.join(` `)}`,expected:[`merge ${r} ${i}_UNIQUE ${a} ${s?.join(` `)}`]},e}let g=p||``,_={id:i||`${l.records.seq}-${u()}`,message:`merged branch ${r} into ${l.records.currBranch}`,seq:l.records.seq++,parents:l.records.head==null?[]:[l.records.head.id,g],branch:l.records.currBranch,type:o.MERGE,customType:a,customId:!!i,tags:s??[]};l.records.head=_,l.records.commits.set(_.id,_),l.records.branches.set(l.records.currBranch,_.id),e.g.debug(l.records.branches),e.g.debug(`in mergeBranch`)},`merge`),v=e.h(function(n){let r=n.id,i=n.targetId,a=n.tags,s=n.parent;e.g.debug(`Entering cherryPick:`,r,i,a);let d=c();if(r=t.s.sanitizeText(r,d),i=t.s.sanitizeText(i,d),a=a?.map(e=>t.s.sanitizeText(e,d)),s=t.s.sanitizeText(s,d),!r||!l.records.commits.has(r)){let e=Error(`Incorrect usage of "cherryPick". Source commit id should exist and provided`);throw e.hash={text:`cherryPick ${r} ${i}`,token:`cherryPick ${r} ${i}`,expected:[`cherry-pick abc`]},e}let f=l.records.commits.get(r);if(f===void 0||!f)throw Error(`Incorrect usage of "cherryPick". Source commit id should exist and provided`);if(s&&!(Array.isArray(f.parents)&&f.parents.includes(s)))throw Error(`Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.`);let p=f.branch;if(f.type===o.MERGE&&!s)throw Error(`Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.`);if(!i||!l.records.commits.has(i)){if(p===l.records.currBranch){let e=Error(`Incorrect usage of "cherryPick". Source commit is already on current branch`);throw e.hash={text:`cherryPick ${r} ${i}`,token:`cherryPick ${r} ${i}`,expected:[`cherry-pick abc`]},e}let t=l.records.branches.get(l.records.currBranch);if(t===void 0||!t){let e=Error(`Incorrect usage of "cherry-pick". Current branch (${l.records.currBranch})has no commits`);throw e.hash={text:`cherryPick ${r} ${i}`,token:`cherryPick ${r} ${i}`,expected:[`cherry-pick abc`]},e}let n=l.records.commits.get(t);if(n===void 0||!n){let e=Error(`Incorrect usage of "cherry-pick". Current branch (${l.records.currBranch})has no commits`);throw e.hash={text:`cherryPick ${r} ${i}`,token:`cherryPick ${r} ${i}`,expected:[`cherry-pick abc`]},e}let c={id:l.records.seq+`-`+u(),message:`cherry-picked ${f?.message} into ${l.records.currBranch}`,seq:l.records.seq++,parents:l.records.head==null?[]:[l.records.head.id,f.id],branch:l.records.currBranch,type:o.CHERRY_PICK,tags:a?a.filter(Boolean):[`cherry-pick:${f.id}${f.type===o.MERGE?`|parent:${s}`:``}`]};l.records.head=c,l.records.commits.set(c.id,c),l.records.branches.set(l.records.currBranch,c.id),e.g.debug(l.records.branches),e.g.debug(`in cherryPick`)}},`cherryPick`),y=e.h(function(e){if(e=t.s.sanitizeText(e,c()),l.records.branches.has(e)){l.records.currBranch=e;let t=l.records.branches.get(l.records.currBranch);t===void 0||!t?l.records.head=null:l.records.head=l.records.commits.get(t)??null}else{let t=Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw t.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},t}},`checkout`);function b(e,t,n){let r=e.indexOf(t);r===-1?e.push(n):e.splice(r,1,n)}e.h(b,`upsert`);function x(t){let n=t.reduce((e,t)=>e.seq>t.seq?e:t,t[0]),r=``;t.forEach(function(e){e===n?r+=` *`:r+=` |`});let i=[r,n.id,n.seq];for(let e in l.records.branches)l.records.branches.get(e)===n.id&&i.push(e);if(e.g.debug(i.join(` `)),n.parents&&n.parents.length==2&&n.parents[0]&&n.parents[1]){let e=l.records.commits.get(n.parents[0]);b(t,n,e),n.parents[1]&&t.push(l.records.commits.get(n.parents[1]))}else if(n.parents.length==0)return;else if(n.parents[0]){let e=l.records.commits.get(n.parents[0]);b(t,n,e)}t=d(t,e=>e.id),x(t)}e.h(x,`prettyPrintCommitHistory`);var S=e.h(function(){e.g.debug(l.records.commits);let t=E()[0];x([t])},`prettyPrint`),C=e.h(function(){l.reset(),t.a()},`clear`),w=e.h(function(){return[...l.records.branchConfig.values()].map((e,t)=>e.order!==null&&e.order!==void 0?e:{...e,order:parseFloat(`0.${t}`)}).sort((e,t)=>(e.order??0)-(t.order??0)).map(({name:e})=>({name:e}))},`getBranchesAsObjArray`),T=e.h(function(){return l.records.branches},`getBranches`),ee=e.h(function(){return l.records.commits},`getCommits`),E=e.h(function(){let t=[...l.records.commits.values()];return t.forEach(function(t){e.g.debug(t.id)}),t.sort((e,t)=>e.seq-t.seq),t},`getCommitsArray`),D={commitType:o,getConfig:c,setDirection:f,setOptions:p,getOptions:m,commit:h,branch:g,merge:_,cherryPick:v,checkout:y,prettyPrint:S,clear:C,getBranchesAsObjArray:w,getBranches:T,getCommits:ee,getCommitsArray:E,getCurrentBranch:e.h(function(){return l.records.currBranch},`getCurrentBranch`),getDirection:e.h(function(){return l.records.direction},`getDirection`),getHead:e.h(function(){return l.records.head},`getHead`),setAccTitle:t.B,getAccTitle:t.v,getAccDescription:t._,setAccDescription:t.z,setDiagramTitle:t.U,getDiagramTitle:t.C},O=e.h((e,t)=>{i.t(e,t),e.dir&&t.setDirection(e.dir);for(let n of e.statements)k(n,t)},`populate`),k=e.h((t,n)=>{let r={Commit:e.h(e=>n.commit(A(e)),`Commit`),Branch:e.h(e=>n.branch(j(e)),`Branch`),Merge:e.h(e=>n.merge(te(e)),`Merge`),Checkout:e.h(e=>n.checkout(M(e)),`Checkout`),CherryPicking:e.h(e=>n.cherryPick(N(e)),`CherryPicking`)}[t.$type];r?r(t):e.g.error(`Unknown statement type: ${t.$type}`)},`parseStatement`),A=e.h(e=>({id:e.id,msg:e.message??``,type:e.type===void 0?o.NORMAL:o[e.type],tags:e.tags??void 0}),`parseCommit`),j=e.h(e=>({name:e.name,order:e.order??0}),`parseBranch`),te=e.h(e=>({branch:e.branch,id:e.id??``,type:e.type===void 0?void 0:o[e.type],tags:e.tags??void 0}),`parseMerge`),M=e.h(e=>e.branch,`parseCheckout`),N=e.h(e=>({id:e.id,targetId:``,tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),`parseCherryPicking`),P={parse:e.h(async t=>{let n=await r.t(`gitGraph`,t);e.g.debug(n),O(n,D)},`parse`)},F=t.b()?.gitGraph,I=10,L=40,R=4,z=2,B=8,V=new Map,H=new Map,U=30,W=new Map,G=[],K=0,q=`LR`,J=e.h(()=>{V.clear(),H.clear(),W.clear(),K=0,G=[],q=`LR`},`clear`),Y=e.h(e=>{let t=document.createElementNS(`http://www.w3.org/2000/svg`,`text`);return(typeof e==`string`?e.split(/\\n|\n|<br\s*\/?>/gi):e).forEach(e=>{let n=document.createElementNS(`http://www.w3.org/2000/svg`,`tspan`);n.setAttributeNS(`http://www.w3.org/XML/1998/namespace`,`xml:space`,`preserve`),n.setAttribute(`dy`,`1em`),n.setAttribute(`x`,`0`),n.setAttribute(`class`,`row`),n.textContent=e.trim(),t.appendChild(n)}),t},`drawText`),X=e.h(t=>{let n,r,i;return q===`BT`?(r=e.h((e,t)=>e<=t,`comparisonFunc`),i=1/0):(r=e.h((e,t)=>e>=t,`comparisonFunc`),i=0),t.forEach(e=>{let t=q===`TB`||q==`BT`?H.get(e)?.y:H.get(e)?.x;t!==void 0&&r(t,i)&&(n=e,i=t)}),n},`findClosestParent`),Z=e.h(e=>{let t=``,n=1/0;return e.forEach(e=>{let r=H.get(e).y;r<=n&&(t=e,n=r)}),t||void 0},`findClosestParentBT`),ne=e.h((e,t,n)=>{let r=n,i=n,a=[];e.forEach(e=>{let n=t.get(e);if(!n)throw Error(`Commit not found for key ${e}`);n.parents.length?(r=ie(n),i=Math.max(r,i)):a.push(n),ae(n,r)}),r=i,a.forEach(e=>{oe(e,r,n)}),e.forEach(e=>{let n=t.get(e);if(n?.parents.length){let e=Z(n.parents);r=H.get(e).y-L,r<=i&&(i=r);let t=V.get(n.branch).pos,a=r-I;H.set(n.id,{x:t,y:a})}})},`setParallelBTPos`),re=e.h(e=>{let t=X(e.parents.filter(e=>e!==null));if(!t)throw Error(`Closest parent not found for commit ${e.id}`);let n=H.get(t)?.y;if(n===void 0)throw Error(`Closest parent position not found for commit ${e.id}`);return n},`findClosestParentPos`),ie=e.h(e=>re(e)+L,`calculateCommitPosition`),ae=e.h((e,t)=>{let n=V.get(e.branch);if(!n)throw Error(`Branch not found for commit ${e.id}`);let r=n.pos,i=t+I;return H.set(e.id,{x:r,y:i}),{x:r,y:i}},`setCommitPosition`),oe=e.h((e,t,n)=>{let r=V.get(e.branch);if(!r)throw Error(`Branch not found for commit ${e.id}`);let i=t+n,a=r.pos;H.set(e.id,{x:a,y:i})},`setRootPosition`),se=e.h((e,t,n,r,i,a)=>{if(a===o.HIGHLIGHT)e.append(`rect`).attr(`x`,n.x-10).attr(`y`,n.y-10).attr(`width`,20).attr(`height`,20).attr(`class`,`commit ${t.id} commit-highlight${i%B} ${r}-outer`),e.append(`rect`).attr(`x`,n.x-6).attr(`y`,n.y-6).attr(`width`,12).attr(`height`,12).attr(`class`,`commit ${t.id} commit${i%B} ${r}-inner`);else if(a===o.CHERRY_PICK)e.append(`circle`).attr(`cx`,n.x).attr(`cy`,n.y).attr(`r`,10).attr(`class`,`commit ${t.id} ${r}`),e.append(`circle`).attr(`cx`,n.x-3).attr(`cy`,n.y+2).attr(`r`,2.75).attr(`fill`,`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`circle`).attr(`cx`,n.x+3).attr(`cy`,n.y+2).attr(`r`,2.75).attr(`fill`,`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`line`).attr(`x1`,n.x+3).attr(`y1`,n.y+1).attr(`x2`,n.x).attr(`y2`,n.y-5).attr(`stroke`,`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`line`).attr(`x1`,n.x-3).attr(`y1`,n.y+1).attr(`x2`,n.x).attr(`y2`,n.y-5).attr(`stroke`,`#fff`).attr(`class`,`commit ${t.id} ${r}`);else{let s=e.append(`circle`);if(s.attr(`cx`,n.x),s.attr(`cy`,n.y),s.attr(`r`,t.type===o.MERGE?9:10),s.attr(`class`,`commit ${t.id} commit${i%B}`),a===o.MERGE){let a=e.append(`circle`);a.attr(`cx`,n.x),a.attr(`cy`,n.y),a.attr(`r`,6),a.attr(`class`,`commit ${r} ${t.id} commit${i%B}`)}a===o.REVERSE&&e.append(`path`).attr(`d`,`M ${n.x-5},${n.y-5}L${n.x+5},${n.y+5}M${n.x-5},${n.y+5}L${n.x+5},${n.y-5}`).attr(`class`,`commit ${r} ${t.id} commit${i%B}`)}},`drawCommitBullet`),ce=e.h((e,t,n,r)=>{if(t.type!==o.CHERRY_PICK&&(t.customId&&t.type===o.MERGE||t.type!==o.MERGE)&&F?.showCommitLabel){let i=e.append(`g`),a=i.insert(`rect`).attr(`class`,`commit-label-bkg`),o=i.append(`text`).attr(`x`,r).attr(`y`,n.y+25).attr(`class`,`commit-label`).text(t.id),s=o.node()?.getBBox();if(s&&(a.attr(`x`,n.posWithOffset-s.width/2-z).attr(`y`,n.y+13.5).attr(`width`,s.width+2*z).attr(`height`,s.height+2*z),q===`TB`||q===`BT`?(a.attr(`x`,n.x-(s.width+4*R+5)).attr(`y`,n.y-12),o.attr(`x`,n.x-(s.width+4*R)).attr(`y`,n.y+s.height-12)):o.attr(`x`,n.posWithOffset-s.width/2),F.rotateCommitLabel))if(q===`TB`||q===`BT`)o.attr(`transform`,`rotate(-45, `+n.x+`, `+n.y+`)`),a.attr(`transform`,`rotate(-45, `+n.x+`, `+n.y+`)`);else{let e=-7.5-(s.width+10)/25*9.5,t=10+s.width/25*8.5;i.attr(`transform`,`translate(`+e+`, `+t+`) rotate(-45, `+r+`, `+n.y+`)`)}}},`drawCommitLabel`),le=e.h((e,t,n,r)=>{if(t.tags.length>0){let i=0,a=0,o=0,s=[];for(let r of t.tags.reverse()){let t=e.insert(`polygon`),c=e.append(`circle`),l=e.append(`text`).attr(`y`,n.y-16-i).attr(`class`,`tag-label`).text(r),u=l.node()?.getBBox();if(!u)throw Error(`Tag bbox not found`);a=Math.max(a,u.width),o=Math.max(o,u.height),l.attr(`x`,n.posWithOffset-u.width/2),s.push({tag:l,hole:c,rect:t,yOffset:i}),i+=20}for(let{tag:e,hole:t,rect:i,yOffset:c}of s){let s=o/2,l=n.y-19.2-c;if(i.attr(`class`,`tag-label-bkg`).attr(`points`,`
|
|
1
|
+
const e=require("./src-BMjps4Ui.cjs"),t=require("./chunk-ABZYJK2D-CbIYYZa_.cjs"),n=require("./chunk-S3R3BYOJ-B2ozcJNg.cjs"),r=require("./mermaid-parser.core-BY0bWKp5.cjs"),i=require("./chunk-4BX2VUAB-HXFjpyQg.cjs"),a=require("./chunk-QZHKN3VN-2e6nJr8c.cjs");var o={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},s=t.d.gitGraph,c=e.h(()=>n.r({...s,...t.y().gitGraph}),`getConfig`),l=new a.t(()=>{let e=c(),t=e.mainBranchName,n=e.mainBranchOrder;return{mainBranchName:t,commits:new Map,head:null,branchConfig:new Map([[t,{name:t,order:n}]]),branches:new Map([[t,null]]),currBranch:t,direction:`LR`,seq:0,options:{}}});function u(){return n.p({length:7})}e.h(u,`getID`);function d(e,t){let n=Object.create(null);return e.reduce((e,r)=>{let i=t(r);return n[i]||(n[i]=!0,e.push(r)),e},[])}e.h(d,`uniqBy`);var f=e.h(function(e){l.records.direction=e},`setDirection`),p=e.h(function(t){e.g.debug(`options str`,t),t=t?.trim(),t||=`{}`;try{l.records.options=JSON.parse(t)}catch(t){e.g.error(`error while parsing gitGraph options`,t.message)}},`setOptions`),m=e.h(function(){return l.records.options},`getOptions`),h=e.h(function(n){let r=n.msg,i=n.id,a=n.type,s=n.tags;e.g.info(`commit`,r,i,a,s),e.g.debug(`Entering commit:`,r,i,a,s);let d=c();i=t.s.sanitizeText(i,d),r=t.s.sanitizeText(r,d),s=s?.map(e=>t.s.sanitizeText(e,d));let f={id:i||l.records.seq+`-`+u(),message:r,seq:l.records.seq++,type:a??o.NORMAL,tags:s??[],parents:l.records.head==null?[]:[l.records.head.id],branch:l.records.currBranch};l.records.head=f,e.g.info(`main branch`,d.mainBranchName),l.records.commits.has(f.id)&&e.g.warn(`Commit ID ${f.id} already exists`),l.records.commits.set(f.id,f),l.records.branches.set(l.records.currBranch,f.id),e.g.debug(`in pushCommit `+f.id)},`commit`),g=e.h(function(n){let r=n.name,i=n.order;if(r=t.s.sanitizeText(r,c()),l.records.branches.has(r))throw Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);l.records.branches.set(r,l.records.head==null?null:l.records.head.id),l.records.branchConfig.set(r,{name:r,order:i}),y(r),e.g.debug(`in createBranch`)},`branch`),_=e.h(n=>{let r=n.branch,i=n.id,a=n.type,s=n.tags,d=c();r=t.s.sanitizeText(r,d),i&&=t.s.sanitizeText(i,d);let f=l.records.branches.get(l.records.currBranch),p=l.records.branches.get(r),m=f?l.records.commits.get(f):void 0,h=p?l.records.commits.get(p):void 0;if(m&&h&&m.branch===r)throw Error(`Cannot merge branch '${r}' into itself.`);if(l.records.currBranch===r){let e=Error(`Incorrect usage of "merge". Cannot merge a branch to itself`);throw e.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch abc`]},e}if(m===void 0||!m){let e=Error(`Incorrect usage of "merge". Current branch (${l.records.currBranch})has no commits`);throw e.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`commit`]},e}if(!l.records.branches.has(r)){let e=Error(`Incorrect usage of "merge". Branch to be merged (`+r+`) does not exist`);throw e.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},e}if(h===void 0||!h){let e=Error(`Incorrect usage of "merge". Branch to be merged (`+r+`) has no commits`);throw e.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`"commit"`]},e}if(m===h){let e=Error(`Incorrect usage of "merge". Both branches have same head`);throw e.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch abc`]},e}if(i&&l.records.commits.has(i)){let e=Error(`Incorrect usage of "merge". Commit with id:`+i+` already exists, use different custom id`);throw e.hash={text:`merge ${r} ${i} ${a} ${s?.join(` `)}`,token:`merge ${r} ${i} ${a} ${s?.join(` `)}`,expected:[`merge ${r} ${i}_UNIQUE ${a} ${s?.join(` `)}`]},e}let g=p||``,_={id:i||`${l.records.seq}-${u()}`,message:`merged branch ${r} into ${l.records.currBranch}`,seq:l.records.seq++,parents:l.records.head==null?[]:[l.records.head.id,g],branch:l.records.currBranch,type:o.MERGE,customType:a,customId:!!i,tags:s??[]};l.records.head=_,l.records.commits.set(_.id,_),l.records.branches.set(l.records.currBranch,_.id),e.g.debug(l.records.branches),e.g.debug(`in mergeBranch`)},`merge`),v=e.h(function(n){let r=n.id,i=n.targetId,a=n.tags,s=n.parent;e.g.debug(`Entering cherryPick:`,r,i,a);let d=c();if(r=t.s.sanitizeText(r,d),i=t.s.sanitizeText(i,d),a=a?.map(e=>t.s.sanitizeText(e,d)),s=t.s.sanitizeText(s,d),!r||!l.records.commits.has(r)){let e=Error(`Incorrect usage of "cherryPick". Source commit id should exist and provided`);throw e.hash={text:`cherryPick ${r} ${i}`,token:`cherryPick ${r} ${i}`,expected:[`cherry-pick abc`]},e}let f=l.records.commits.get(r);if(f===void 0||!f)throw Error(`Incorrect usage of "cherryPick". Source commit id should exist and provided`);if(s&&!(Array.isArray(f.parents)&&f.parents.includes(s)))throw Error(`Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.`);let p=f.branch;if(f.type===o.MERGE&&!s)throw Error(`Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.`);if(!i||!l.records.commits.has(i)){if(p===l.records.currBranch){let e=Error(`Incorrect usage of "cherryPick". Source commit is already on current branch`);throw e.hash={text:`cherryPick ${r} ${i}`,token:`cherryPick ${r} ${i}`,expected:[`cherry-pick abc`]},e}let t=l.records.branches.get(l.records.currBranch);if(t===void 0||!t){let e=Error(`Incorrect usage of "cherry-pick". Current branch (${l.records.currBranch})has no commits`);throw e.hash={text:`cherryPick ${r} ${i}`,token:`cherryPick ${r} ${i}`,expected:[`cherry-pick abc`]},e}let n=l.records.commits.get(t);if(n===void 0||!n){let e=Error(`Incorrect usage of "cherry-pick". Current branch (${l.records.currBranch})has no commits`);throw e.hash={text:`cherryPick ${r} ${i}`,token:`cherryPick ${r} ${i}`,expected:[`cherry-pick abc`]},e}let c={id:l.records.seq+`-`+u(),message:`cherry-picked ${f?.message} into ${l.records.currBranch}`,seq:l.records.seq++,parents:l.records.head==null?[]:[l.records.head.id,f.id],branch:l.records.currBranch,type:o.CHERRY_PICK,tags:a?a.filter(Boolean):[`cherry-pick:${f.id}${f.type===o.MERGE?`|parent:${s}`:``}`]};l.records.head=c,l.records.commits.set(c.id,c),l.records.branches.set(l.records.currBranch,c.id),e.g.debug(l.records.branches),e.g.debug(`in cherryPick`)}},`cherryPick`),y=e.h(function(e){if(e=t.s.sanitizeText(e,c()),l.records.branches.has(e)){l.records.currBranch=e;let t=l.records.branches.get(l.records.currBranch);t===void 0||!t?l.records.head=null:l.records.head=l.records.commits.get(t)??null}else{let t=Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw t.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},t}},`checkout`);function b(e,t,n){let r=e.indexOf(t);r===-1?e.push(n):e.splice(r,1,n)}e.h(b,`upsert`);function x(t){let n=t.reduce((e,t)=>e.seq>t.seq?e:t,t[0]),r=``;t.forEach(function(e){e===n?r+=` *`:r+=` |`});let i=[r,n.id,n.seq];for(let e in l.records.branches)l.records.branches.get(e)===n.id&&i.push(e);if(e.g.debug(i.join(` `)),n.parents&&n.parents.length==2&&n.parents[0]&&n.parents[1]){let e=l.records.commits.get(n.parents[0]);b(t,n,e),n.parents[1]&&t.push(l.records.commits.get(n.parents[1]))}else if(n.parents.length==0)return;else if(n.parents[0]){let e=l.records.commits.get(n.parents[0]);b(t,n,e)}t=d(t,e=>e.id),x(t)}e.h(x,`prettyPrintCommitHistory`);var S=e.h(function(){e.g.debug(l.records.commits);let t=E()[0];x([t])},`prettyPrint`),C=e.h(function(){l.reset(),t.a()},`clear`),w=e.h(function(){return[...l.records.branchConfig.values()].map((e,t)=>e.order!==null&&e.order!==void 0?e:{...e,order:parseFloat(`0.${t}`)}).sort((e,t)=>(e.order??0)-(t.order??0)).map(({name:e})=>({name:e}))},`getBranchesAsObjArray`),T=e.h(function(){return l.records.branches},`getBranches`),ee=e.h(function(){return l.records.commits},`getCommits`),E=e.h(function(){let t=[...l.records.commits.values()];return t.forEach(function(t){e.g.debug(t.id)}),t.sort((e,t)=>e.seq-t.seq),t},`getCommitsArray`),D={commitType:o,getConfig:c,setDirection:f,setOptions:p,getOptions:m,commit:h,branch:g,merge:_,cherryPick:v,checkout:y,prettyPrint:S,clear:C,getBranchesAsObjArray:w,getBranches:T,getCommits:ee,getCommitsArray:E,getCurrentBranch:e.h(function(){return l.records.currBranch},`getCurrentBranch`),getDirection:e.h(function(){return l.records.direction},`getDirection`),getHead:e.h(function(){return l.records.head},`getHead`),setAccTitle:t.B,getAccTitle:t.v,getAccDescription:t._,setAccDescription:t.z,setDiagramTitle:t.U,getDiagramTitle:t.C},O=e.h((e,t)=>{i.t(e,t),e.dir&&t.setDirection(e.dir);for(let n of e.statements)k(n,t)},`populate`),k=e.h((t,n)=>{let r={Commit:e.h(e=>n.commit(A(e)),`Commit`),Branch:e.h(e=>n.branch(j(e)),`Branch`),Merge:e.h(e=>n.merge(te(e)),`Merge`),Checkout:e.h(e=>n.checkout(M(e)),`Checkout`),CherryPicking:e.h(e=>n.cherryPick(N(e)),`CherryPicking`)}[t.$type];r?r(t):e.g.error(`Unknown statement type: ${t.$type}`)},`parseStatement`),A=e.h(e=>({id:e.id,msg:e.message??``,type:e.type===void 0?o.NORMAL:o[e.type],tags:e.tags??void 0}),`parseCommit`),j=e.h(e=>({name:e.name,order:e.order??0}),`parseBranch`),te=e.h(e=>({branch:e.branch,id:e.id??``,type:e.type===void 0?void 0:o[e.type],tags:e.tags??void 0}),`parseMerge`),M=e.h(e=>e.branch,`parseCheckout`),N=e.h(e=>({id:e.id,targetId:``,tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),`parseCherryPicking`),P={parse:e.h(async t=>{let n=await r.t(`gitGraph`,t);e.g.debug(n),O(n,D)},`parse`)},F=t.b()?.gitGraph,I=10,L=40,R=4,z=2,B=8,V=new Map,H=new Map,U=30,W=new Map,G=[],K=0,q=`LR`,J=e.h(()=>{V.clear(),H.clear(),W.clear(),K=0,G=[],q=`LR`},`clear`),Y=e.h(e=>{let t=document.createElementNS(`http://www.w3.org/2000/svg`,`text`);return(typeof e==`string`?e.split(/\\n|\n|<br\s*\/?>/gi):e).forEach(e=>{let n=document.createElementNS(`http://www.w3.org/2000/svg`,`tspan`);n.setAttributeNS(`http://www.w3.org/XML/1998/namespace`,`xml:space`,`preserve`),n.setAttribute(`dy`,`1em`),n.setAttribute(`x`,`0`),n.setAttribute(`class`,`row`),n.textContent=e.trim(),t.appendChild(n)}),t},`drawText`),X=e.h(t=>{let n,r,i;return q===`BT`?(r=e.h((e,t)=>e<=t,`comparisonFunc`),i=1/0):(r=e.h((e,t)=>e>=t,`comparisonFunc`),i=0),t.forEach(e=>{let t=q===`TB`||q==`BT`?H.get(e)?.y:H.get(e)?.x;t!==void 0&&r(t,i)&&(n=e,i=t)}),n},`findClosestParent`),Z=e.h(e=>{let t=``,n=1/0;return e.forEach(e=>{let r=H.get(e).y;r<=n&&(t=e,n=r)}),t||void 0},`findClosestParentBT`),ne=e.h((e,t,n)=>{let r=n,i=n,a=[];e.forEach(e=>{let n=t.get(e);if(!n)throw Error(`Commit not found for key ${e}`);n.parents.length?(r=ie(n),i=Math.max(r,i)):a.push(n),ae(n,r)}),r=i,a.forEach(e=>{oe(e,r,n)}),e.forEach(e=>{let n=t.get(e);if(n?.parents.length){let e=Z(n.parents);r=H.get(e).y-L,r<=i&&(i=r);let t=V.get(n.branch).pos,a=r-I;H.set(n.id,{x:t,y:a})}})},`setParallelBTPos`),re=e.h(e=>{let t=X(e.parents.filter(e=>e!==null));if(!t)throw Error(`Closest parent not found for commit ${e.id}`);let n=H.get(t)?.y;if(n===void 0)throw Error(`Closest parent position not found for commit ${e.id}`);return n},`findClosestParentPos`),ie=e.h(e=>re(e)+L,`calculateCommitPosition`),ae=e.h((e,t)=>{let n=V.get(e.branch);if(!n)throw Error(`Branch not found for commit ${e.id}`);let r=n.pos,i=t+I;return H.set(e.id,{x:r,y:i}),{x:r,y:i}},`setCommitPosition`),oe=e.h((e,t,n)=>{let r=V.get(e.branch);if(!r)throw Error(`Branch not found for commit ${e.id}`);let i=t+n,a=r.pos;H.set(e.id,{x:a,y:i})},`setRootPosition`),se=e.h((e,t,n,r,i,a)=>{if(a===o.HIGHLIGHT)e.append(`rect`).attr(`x`,n.x-10).attr(`y`,n.y-10).attr(`width`,20).attr(`height`,20).attr(`class`,`commit ${t.id} commit-highlight${i%B} ${r}-outer`),e.append(`rect`).attr(`x`,n.x-6).attr(`y`,n.y-6).attr(`width`,12).attr(`height`,12).attr(`class`,`commit ${t.id} commit${i%B} ${r}-inner`);else if(a===o.CHERRY_PICK)e.append(`circle`).attr(`cx`,n.x).attr(`cy`,n.y).attr(`r`,10).attr(`class`,`commit ${t.id} ${r}`),e.append(`circle`).attr(`cx`,n.x-3).attr(`cy`,n.y+2).attr(`r`,2.75).attr(`fill`,`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`circle`).attr(`cx`,n.x+3).attr(`cy`,n.y+2).attr(`r`,2.75).attr(`fill`,`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`line`).attr(`x1`,n.x+3).attr(`y1`,n.y+1).attr(`x2`,n.x).attr(`y2`,n.y-5).attr(`stroke`,`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`line`).attr(`x1`,n.x-3).attr(`y1`,n.y+1).attr(`x2`,n.x).attr(`y2`,n.y-5).attr(`stroke`,`#fff`).attr(`class`,`commit ${t.id} ${r}`);else{let s=e.append(`circle`);if(s.attr(`cx`,n.x),s.attr(`cy`,n.y),s.attr(`r`,t.type===o.MERGE?9:10),s.attr(`class`,`commit ${t.id} commit${i%B}`),a===o.MERGE){let a=e.append(`circle`);a.attr(`cx`,n.x),a.attr(`cy`,n.y),a.attr(`r`,6),a.attr(`class`,`commit ${r} ${t.id} commit${i%B}`)}a===o.REVERSE&&e.append(`path`).attr(`d`,`M ${n.x-5},${n.y-5}L${n.x+5},${n.y+5}M${n.x-5},${n.y+5}L${n.x+5},${n.y-5}`).attr(`class`,`commit ${r} ${t.id} commit${i%B}`)}},`drawCommitBullet`),ce=e.h((e,t,n,r)=>{if(t.type!==o.CHERRY_PICK&&(t.customId&&t.type===o.MERGE||t.type!==o.MERGE)&&F?.showCommitLabel){let i=e.append(`g`),a=i.insert(`rect`).attr(`class`,`commit-label-bkg`),o=i.append(`text`).attr(`x`,r).attr(`y`,n.y+25).attr(`class`,`commit-label`).text(t.id),s=o.node()?.getBBox();if(s&&(a.attr(`x`,n.posWithOffset-s.width/2-z).attr(`y`,n.y+13.5).attr(`width`,s.width+2*z).attr(`height`,s.height+2*z),q===`TB`||q===`BT`?(a.attr(`x`,n.x-(s.width+4*R+5)).attr(`y`,n.y-12),o.attr(`x`,n.x-(s.width+4*R)).attr(`y`,n.y+s.height-12)):o.attr(`x`,n.posWithOffset-s.width/2),F.rotateCommitLabel))if(q===`TB`||q===`BT`)o.attr(`transform`,`rotate(-45, `+n.x+`, `+n.y+`)`),a.attr(`transform`,`rotate(-45, `+n.x+`, `+n.y+`)`);else{let e=-7.5-(s.width+10)/25*9.5,t=10+s.width/25*8.5;i.attr(`transform`,`translate(`+e+`, `+t+`) rotate(-45, `+r+`, `+n.y+`)`)}}},`drawCommitLabel`),le=e.h((e,t,n,r)=>{if(t.tags.length>0){let i=0,a=0,o=0,s=[];for(let r of t.tags.reverse()){let t=e.insert(`polygon`),c=e.append(`circle`),l=e.append(`text`).attr(`y`,n.y-16-i).attr(`class`,`tag-label`).text(r),u=l.node()?.getBBox();if(!u)throw Error(`Tag bbox not found`);a=Math.max(a,u.width),o=Math.max(o,u.height),l.attr(`x`,n.posWithOffset-u.width/2),s.push({tag:l,hole:c,rect:t,yOffset:i}),i+=20}for(let{tag:e,hole:t,rect:i,yOffset:c}of s){let s=o/2,l=n.y-19.2-c;if(i.attr(`class`,`tag-label-bkg`).attr(`points`,`
|
|
2
2
|
${r-a/2-R/2},${l+z}
|
|
3
3
|
${r-a/2-R/2},${l-z}
|
|
4
4
|
${n.posWithOffset-a/2-R},${l-s-z}
|