PageSourceSearch

https://www.lighthouseacademy.ai/_next/static/chunks/7806.d7ecaf28ef69a618.js

js lighthouseacademy.ai collected 2026-10-04 23:39:41 UTC 46,109 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7806],{83084:function(e,t,n){var i,r,o;e.exports=(i=n(89218),r={658:e=>{e.exports=null!=Object.assign?Object.assign.bind(Object):function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return n.forEach(function(t){Object.keys(t).forEach(function(n){return e[n]=t[n]})}),e}},548:(e,t,n)=>{var i=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);i=!0);}catch(e){r=!0,o=e}finally{try{!i&&s.return&&s.return()}finally{if(r)throw o}}return n}(e,t);throw TypeError("Invalid attempt to destructure non-iterable instance")},r=n(140).layoutBase.LinkedList,o={};o.getTopMostNodes=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].id()]=!0;return e.filter(function(e,n){"number"==typeof e&&(e=n);for(var i=e.parent()[0];null!=i;){if(t[i.id()])return!1;i=i.parent()[0]}return!0})},o.connectComponents=function(e,t,n,i){var o=new r,a=new Set,s=[],l=void 0,d=void 0,c=void 0,f=!1,h=1,u=[],g=[];do!function(){var i=e.collection();g.push(i);var r=n[0],p=e.collection();for(p.merge(r).merge(r.descendants().intersection(t)),s.push(r),p.forEach(function(e){o.push(e),a.add(e),i.merge(e)});0!=o.length;)!function(){r=o.shift();var d=e.collection();r.neighborhood().nodes().forEach(function(e){t.intersection(r.edgesWith(e)).length>0&&d.merge(e)});for(var c=0;c<d.length;c++){var f=d[c];null==(l=n.intersection(f.union(f.ancestors())))||a.has(l[0])||l.union(l.descendants()).forEach(function(e){o.push(e),a.add(e),i.merge(e),n.has(e)&&s.push(e)})}}();if(i.forEach(function(e){t.intersection(e.connectedEdges()).forEach(function(e){i.has(e.source())&&i.has(e.target())&&i.merge(e)})}),s.length==n.length&&(f=!0),!f||f&&h>1){c=(d=s[0]).connectedEdges().length,s.forEach(function(e){e.connectedEdges().length<c&&(c=e.connectedEdges().length,d=e)}),u.push(d.id());var y=e.collection();y.merge(s[0]),s.forEach(function(e){y.merge(e)}),s=[],n=n.difference(y),h++}}();while(!f);return i&&u.length>0&&i.set("dummy"+(i.size+1),u),g},o.relocateComponent=function(e,t,n){if(!n.fixedNodeConstraint){var r=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY,a=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY;if("draft"==n.quality){var l=!0,d=!1,c=void 0;try{for(var f,h=t.nodeIndexes[Symbol.iterator]();!(l=(f=h.next()).done);l=!0){var u=f.value,g=i(u,2),p=g[0],y=g[1],m=n.cy.getElementById(p);if(m){var v=m.boundingBox(),E=t.xCoords[y]-v.w/2,x=t.xCoords[y]+v.w/2,T=t.yCoords[y]-v.h/2,C=t.yCoords[y]+v.h/2;E<r&&(r=E),x>o&&(o=x),T<a&&(a=T),C>s&&(s=C)}}}catch(e){d=!0,c=e}finally{try{!l&&h.return&&h.return()}finally{if(d)throw c}}var w=e.x-(o+r)/2,b=e.y-(s+a)/2;t.xCoords=t.xCoords.map(function(e){return e+w}),t.yCoords=t.yCoords.map(function(e){return e+b})}else{Object.keys(t).forEach(function(e){var n=t[e],i=n.getRect().x,l=n.getRect().x+n.getRect().width,d=n.getRect().y,c=n.getRect().y+n.getRect().height;i<r&&(r=i),l>o&&(o=l),d<a&&(a=d),c>s&&(s=c)});var N=e.x-(o+r)/2,I=e.y-(s+a)/2;Object.keys(t).forEach(function(e){var n=t[e];n.setCenter(n.getCenterX()+N,n.getCenterY()+I)})}}},o.calcBoundingBox=function(e,t,n,i){for(var r=Number.MAX_SAFE_INTEGER,o=Number.MIN_SAFE_INTEGER,a=Number.MAX_SAFE_INTEGER,s=Number.MIN_SAFE_INTEGER,l=void 0,d=void 0,c=void 0,f=void 0,h=e.descendants().not(":parent"),u=h.length,g=0;g<u;g++){var p=h[g];l=t[i.get(p.id())]-p.width()/2,d=t[i.get(p.id())]+p.width()/2,c=n[i.get(p.id())]-p.height()/2,f=n[i.get(p.id())]+p.height()/2,r>l&&(r=l),o<d&&(o=d),a>c&&(a=c),s<f&&(s=f)}var y={};return y.topLeftX=r,y.topLeftY=a,y.width=o-r,y.height=s-a,y},o.calcParentsWithoutChildren=function(e,t){var n=e.collection();return t.nodes(":parent").forEach(function(e){var t=!1;
1e.children().forEach(function(e){"none"!=e.css("display")&&(t=!0)}),t||n.merge(e)}),n},e.exports=o},816:(e,t,n)=>{var i=n(548),r=n(140).CoSELayout,o=n(140).CoSENode,a=n(140).layoutBase.PointD,s=n(140).layoutBase.DimensionD,l=n(140).layoutBase.LayoutConstants,d=n(140).layoutBase.FDLayoutConstants,c=n(140).CoSEConstants;e.exports={coseLayout:function(e,t){var n=e.cy,f=e.eles,h=f.nodes(),u=f.edges(),g=void 0,p=void 0,y=void 0,m={};e.randomize&&(g=t.nodeIndexes,p=t.xCoords,y=t.yCoords);var v=function(e){return"function"==typeof e},E=function(e,t){return v(e)?e(t):e},x=i.calcParentsWithoutChildren(n,f);null!=e.nestingFactor&&(c.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=d.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=e.nestingFactor),null!=e.gravity&&(c.DEFAULT_GRAVITY_STRENGTH=d.DEFAULT_GRAVITY_STRENGTH=e.gravity),null!=e.numIter&&(c.MAX_ITERATIONS=d.MAX_ITERATIONS=e.numIter),null!=e.gravityRange&&(c.DEFAULT_GRAVITY_RANGE_FACTOR=d.DEFAULT_GRAVITY_RANGE_FACTOR=e.gravityRange),null!=e.gravityCompound&&(c.DEFAULT_COMPOUND_GRAVITY_STRENGTH=d.DEFAULT_COMPOUND_GRAVITY_STRENGTH=e.gravityCompound),null!=e.gravityRangeCompound&&(c.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=d.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=e.gravityRangeCompound),null!=e.initialEnergyOnIncremental&&(c.DEFAULT_COOLING_FACTOR_INCREMENTAL=d.DEFAULT_COOLING_FACTOR_INCREMENTAL=e.initialEnergyOnIncremental),null!=e.tilingCompareBy&&(c.TILING_COMPARE_BY=e.tilingCompareBy),"proof"==e.quality?l.QUALITY=2:l.QUALITY=0,c.NODE_DIMENSIONS_INCLUDE_LABELS=d.NODE_DIMENSIONS_INCLUDE_LABELS=l.NODE_DIMENSIONS_INCLUDE_LABELS=e.nodeDimensionsIncludeLabels,c.DEFAULT_INCREMENTAL=d.DEFAULT_INCREMENTAL=l.DEFAULT_INCREMENTAL=!e.randomize,c.ANIMATE=d.ANIMATE=l.ANIMATE=e.animate,c.TILE=e.tile,c.TILING_PADDING_VERTICAL="function"==typeof e.tilingPaddingVertical?e.tilingPaddingVertical.call():e.tilingPaddingVertical,c.TILING_PADDING_HORIZONTAL="function"==typeof e.tilingPaddingHorizontal?e.tilingPaddingHorizontal.call():e.tilingPaddingHorizontal,c.DEFAULT_INCREMENTAL=d.DEFAULT_INCREMENTAL=l.DEFAULT_INCREMENTAL=!0,c.PURE_INCREMENTAL=!e.randomize,l.DEFAULT_UNIFORM_LEAF_NODE_SIZES=e.uniformNodeDimensions,"transformed"==e.step&&(c.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,c.ENFORCE_CONSTRAINTS=!1,c.APPLY_LAYOUT=!1),"enforced"==e.step&&(c.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,c.ENFORCE_CONSTRAINTS=!0,c.APPLY_LAYOUT=!1),"cose"==e.step&&(c.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,c.ENFORCE_CONSTRAINTS=!1,c.APPLY_LAYOUT=!0),"all"==e.step&&(e.randomize?c.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:c.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,c.ENFORCE_CONSTRAINTS=!0,c.APPLY_LAYOUT=!0),e.fixedNodeConstraint||e.alignmentConstraint||e.relativePlacementConstraint?c.TREE_REDUCTION_ON_INCREMENTAL=!1:c.TREE_REDUCTION_ON_INCREMENTAL=!0;var T=new r,C=T.newGraphManager();return function e(t,n,r,l){for(var d=n.length,c=0;c<d;c++){var f=n[c],h=null;0==f.intersection(x).length&&(h=f.children());var u=void 0,v=f.layoutDimensions({nodeDimensionsIncludeLabels:l.nodeDimensionsIncludeLabels});if(null!=f.outerWidth()&&null!=f.outerHeight()){if(l.randomize){if(f.isParent()){var T=i.calcBoundingBox(f,p,y,g);u=0==f.intersection(x).length?t.add(new o(r.graphManager,new a(T.topLeftX,T.topLeftY),new s(T.width,T.height))):t.add(new o(r.graphManager,new a(T.topLeftX,T.topLeftY),new s(parseFloat(v.w),parseFloat(v.h))))}else u=t.add(new o(r.graphManager,new a(p[g.get(f.id())]-v.w/2,y[g.get(f.id())]-v.h/2),new s(parseFloat(v.w),parseFloat(v.h))))}else u=t.add(new o(r.graphManager,new a(f.position("x")-v.w/2,f.position("y")-v.h/2),new s(parseFloat(v.w),parseFloat(v.h))))}else u=t.add(new o(this.graphManager));u.id=f.data("id"),u.nodeRepulsion=E(l.nodeRepulsion,f),u.paddingLeft=parseInt(f.css("padding")),u.paddingTop=parseInt(f.css("padding")),u.paddingRight=parseInt(f.css("padding")),u.paddingBottom=parseInt(f.css("padding")),l.nodeDimensionsIncludeLabels&&(u.labelWidth=f.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,u.labelHeight=f.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,u.labelPosVertical=f.css("text-valign"),u.labelPosHorizontal=f.css("text-halign")),m[f.data("id")]=u,isNaN(u.rect.x)&&(u.rect.x=0),isNaN(u.rect.y
1)&&(u.rect.y=0),null!=h&&h.length>0&&e(r.getGraphManager().add(r.newGraph(),u),h,r,l)}}(C.addRoot(),i.getTopMostNodes(h),T,e),function(t,n,i){for(var r=0,o=0,a=0;a<i.length;a++){var s=i[a],l=m[s.data("source")],f=m[s.data("target")];if(l&&f&&l!==f&&0==l.getEdgesBetween(f).length){var h=n.add(t.newEdge(),l,f);h.id=s.id(),h.idealLength=E(e.idealEdgeLength,s),h.edgeElasticity=E(e.edgeElasticity,s),r+=h.idealLength,o++}}null!=e.idealEdgeLength&&(o>0?c.DEFAULT_EDGE_LENGTH=d.DEFAULT_EDGE_LENGTH=r/o:v(e.idealEdgeLength)?c.DEFAULT_EDGE_LENGTH=d.DEFAULT_EDGE_LENGTH=50:c.DEFAULT_EDGE_LENGTH=d.DEFAULT_EDGE_LENGTH=e.idealEdgeLength,c.MIN_REPULSION_DIST=d.MIN_REPULSION_DIST=d.DEFAULT_EDGE_LENGTH/10,c.DEFAULT_RADIAL_SEPARATION=d.DEFAULT_EDGE_LENGTH)}(T,C,u),e.fixedNodeConstraint&&(T.constraints.fixedNodeConstraint=e.fixedNodeConstraint),e.alignmentConstraint&&(T.constraints.alignmentConstraint=e.alignmentConstraint),e.relativePlacementConstraint&&(T.constraints.relativePlacementConstraint=e.relativePlacementConstraint),T.runLayout(),m}}},212:(e,t,n)=>{var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=n(658),o=n(548),a=n(657).spectralLayout,s=n(816).coseLayout,l=Object.freeze({quality:"default",randomize:!0,animate:!0,animationDuration:1e3,animationEasing:void 0,fit:!0,padding:30,nodeDimensionsIncludeLabels:!1,uniformNodeDimensions:!1,packComponents:!0,step:"all",samplingType:!0,sampleSize:25,nodeSeparation:75,piTol:1e-7,nodeRepulsion:function(e){return 4500},idealEdgeLength:function(e){return 50},edgeElasticity:function(e){return .45},nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,tilingCompareBy:void 0,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.3,fixedNodeConstraint:void 0,alignmentConstraint:void 0,relativePlacementConstraint:void 0,ready:function(){},stop:function(){}}),d=function(){function e(t){(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")})(this,e),this.options=r({},l,t)}return i(e,[{key:"run",value:function(){var e=this.options,t=e.cy,n=e.eles,i=[],r=[],l=void 0,d=[];e.fixedNodeConstraint&&(!Array.isArray(e.fixedNodeConstraint)||0==e.fixedNodeConstraint.length)&&(e.fixedNodeConstraint=void 0),e.alignmentConstraint&&(e.alignmentConstraint.vertical&&(!Array.isArray(e.alignmentConstraint.vertical)||0==e.alignmentConstraint.vertical.length)&&(e.alignmentConstraint.vertical=void 0),e.alignmentConstraint.horizontal&&(!Array.isArray(e.alignmentConstraint.horizontal)||0==e.alignmentConstraint.horizontal.length)&&(e.alignmentConstraint.horizontal=void 0)),e.relativePlacementConstraint&&(!Array.isArray(e.relativePlacementConstraint)||0==e.relativePlacementConstraint.length)&&(e.relativePlacementConstraint=void 0),(e.fixedNodeConstraint||e.alignmentConstraint||e.relativePlacementConstraint)&&(e.tile=!1,e.packComponents=!1);var c=void 0,f=!1;if(t.layoutUtilities&&e.packComponents&&((c=t.layoutUtilities("get"))||(c=t.layoutUtilities()),f=!0),n.nodes().length>0){if(f){var h=o.getTopMostNodes(e.eles.nodes());if((l=o.connectComponents(t,e.eles,h)).forEach(function(e){var t=e.boundingBox();d.push({x:t.x1+t.w/2,y:t.y1+t.h/2})}),e.randomize&&l.forEach(function(t){e.eles=t,i.push(a(e))}),"default"==e.quality||"proof"==e.quality){var u=t.collection();if(e.tile){var g=new Map,p=0,y={nodeIndexes:g,xCoords:[],yCoords:[]},m=[];if(l.forEach(function(e,t){0==e.edges().length&&(e.nodes().forEach(function(t,n){u.merge(e.nodes()[n]),t.isParent()||(y.nodeIndexes.set(e.nodes()[n].id(),p++),y.xCoords.push(e.nodes()[0].position().x),y.yCoords.push(e.nodes()[0].position().y))}),m.push(t))}),u.length>1){var v=u.boundingBox();d.push({x:v.x1+v.w/2,y:v.y1+v.h/2}),l.push(u),i.push(y);for(var E=m.length-1;E>=0;E--)l.splice(m[E],1),i.splice(m[E],1),d.splice(m[E],1)}}l.forEach(function(t,n){e.eles=t,r.push(s(e,i[n])),o.relocateComponent(d[n],r[n],e)})}else l.forEach(function(t,n){o.relocateComponent(d[n],i[n],e)});var x=new Set;if(l.length>1){var T=[],C=n.filter(function(e){return"none"==e.css("display")});l.forEach(function(t,n){var a=void 0;if("draft"==e.quality&&(a=i[n].nodeIndexes),t.nodes().not(C).length>0){var s={};s.edges=[],s.nodes=[];var l=void 0;
1t.nodes().not(C).forEach(function(t){if("draft"==e.quality){if(t.isParent()){var d=o.calcBoundingBox(t,i[n].xCoords,i[n].yCoords,a);s.nodes.push({x:d.topLeftX,y:d.topLeftY,width:d.width,height:d.height})}else l=a.get(t.id()),s.nodes.push({x:i[n].xCoords[l]-t.boundingbox().w/2,y:i[n].yCoords[l]-t.boundingbox().h/2,width:t.boundingbox().w,height:t.boundingbox().h})}else r[n][t.id()]&&s.nodes.push({x:r[n][t.id()].getLeft(),y:r[n][t.id()].getTop(),width:r[n][t.id()].getWidth(),height:r[n][t.id()].getHeight()})}),t.edges().forEach(function(t){var l=t.source(),d=t.target();if("none"!=l.css("display")&&"none"!=d.css("display")){if("draft"==e.quality){var c=a.get(l.id()),f=a.get(d.id()),h=[],u=[];if(l.isParent()){var g=o.calcBoundingBox(l,i[n].xCoords,i[n].yCoords,a);h.push(g.topLeftX+g.width/2),h.push(g.topLeftY+g.height/2)}else h.push(i[n].xCoords[c]),h.push(i[n].yCoords[c]);if(d.isParent()){var p=o.calcBoundingBox(d,i[n].xCoords,i[n].yCoords,a);u.push(p.topLeftX+p.width/2),u.push(p.topLeftY+p.height/2)}else u.push(i[n].xCoords[f]),u.push(i[n].yCoords[f]);s.edges.push({startX:h[0],startY:h[1],endX:u[0],endY:u[1]})}else r[n][l.id()]&&r[n][d.id()]&&s.edges.push({startX:r[n][l.id()].getCenterX(),startY:r[n][l.id()].getCenterY(),endX:r[n][d.id()].getCenterX(),endY:r[n][d.id()].getCenterY()})}}),s.nodes.length>
10&&(T.push(s),x.add(n))}});var w=c.packComponents(T,e.randomize).shifts;if("draft"==e.quality)i.forEach(function(e,t){var n=e.xCoords.map(function(e){return e+w[t].dx}),i=e.yCoords.map(function(e){return e+w[t].dy});e.xCoords=n,e.yCoords=i});else{var b=0;x.forEach(function(e){Object.keys(r[e]).forEach(function(t){var n=r[e][t];n.setCenter(n.getCenterX()+w[b].dx,n.getCenterY()+w[b].dy)}),b++})}}}else{var N=e.eles.boundingBox();if(d.push({x:N.x1+N.w/2,y:N.y1+N.h/2}),e.randomize){var I=a(e);i.push(I)}"default"==e.quality||"proof"==e.quality?(r.push(s(e,i[0])),o.relocateComponent(d[0],r[0],e)):o.relocateComponent(d[0],i[0],e)}}var L=function(t,n){if("default"==e.quality||"proof"==e.quality){"number"==typeof t&&(t=n);var o=void 0,a=void 0,s=t.data("id");return r.forEach(function(e){s in e&&(o={x:e[s].getRect().getCenterX(),y:e[s].getRect().getCenterY()},a=e[s])}),e.nodeDimensionsIncludeLabels&&(a.labelWidth&&("left"==a.labelPosHorizontal?o.x+=a.labelWidth/2:"right"==a.labelPosHorizontal&&(o.x-=a.labelWidth/2)),a.labelHeight&&("top"==a.labelPosVertical?o.y+=a.labelHeight/2:"bottom"==a.labelPosVertical&&(o.y-=a.labelHeight/2))),void 0==o&&(o={x:t.position("x"),y:t.position("y")}),{x:o.x,y:o.y}}var l=void 0;return i.forEach(function(e){var n=e.nodeIndexes.get(t.id());void 0!=n&&(l={x:e.xCoords[n],y:e.yCoords[n]})}),void 0==l&&(l={x:t.position("x"),y:t.position("y")}),{x:l.x,y:l.y}};if("default"==e.quality||"proof"==e.quality||e.randomize){var A=o.calcParentsWithoutChildren(t,n),k=n.filter(function(e){return"none"==e.css("display")});e.eles=n.not(k),n.nodes().not(":parent").not(k).layoutPositions(this,e,L),A.length>0&&A.forEach(function(e){e.position(L(e))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),e}();e.exports=d},657:(e,t,n)=>{var i=n(548),r=n(140).layoutBase.Matrix,o=n(140).layoutBase.SVD;e.exports={spectralLayout:function(e){var t=e.cy,n=e.eles,a=n.nodes(),s=n.nodes(":parent"),l=new Map,d=new Map,c=new Map,f=[],h=[],u=[],g=[],p=[],y=[],m=[],v=[],E=void 0,x=e.piTol,T=e.samplingType,C=e.nodeSeparation,w=void 0,b=function(){for(var e=0,t=0,n=!1;t<w;){e=Math.floor(Math.random()*E),n=!1;for(var i=0;i<t;i++)if(g[i]==e){n=!0;break}!n&&(g[t]=e,t++)}},N=function(e,t,n){for(var i=[],r=0,o=0,a=0,s=void 0,l=[],c=0,h=1,u=0;u<E;u++)l[u]=1e8;for(i[o]=e,l[e]=0;o>=r;){for(var g=f[a=i[r++]],m=0;m<g.length;m++)1e8==l[s=d.get(g[m])]&&(l[s]=l[a]+1,i[++o]=s);y[a][t]=l[a]*C}if(n){for(var v=0;v<E;v++)y[v][t]<p[v]&&(p[v]=y[v][t]);for(var x=0;x<E;x++)p[x]>c&&(c=p[x],h=x)}return h};i.connectComponents(t,n,i.getTopMostNodes(a),l),s.forEach(function(e){i.connectComponents(t,n,i.getTopMostNodes(e.descendants().intersection(n)),l)});for(var I=0,L=0;L<a.length;L++)a[L].isParent()||d.set(a[L].id(),I++);var A=!0,k=!1,_=void 0;try{for(var D,R=l.keys()[Symbol.iterator]();!(A=(D=R.next()).done);A=!0){var O=D.value;d.set(O,I++)}}catch(e){k=!0,_=e}finally{try{!A&&R.return&&R.return()}finally{if(k)throw _}}for(var S=0;S<d.size;S++)f[S]=[];s.forEach(function(e){for(var t=e.children().intersection(n);0==t.nodes(":childless").length;)t=t.nodes()[0].children().intersection(n);var i=0,r=t.nodes(":childless")[0].connectedEdges().length;t.nodes(":childless").forEach(function(e,t){e.connectedEdges().length<r&&(r=e.connectedEdges().length,i=t)}),c.set(e.id(),t.nodes(":childless")[i].id())}),a.forEach(function(e){var t=void 0;t=e.isParent()?d.get(c.get(e.id())):d.get(e.id()),e.neighborhood().nodes().forEach(function(i){n.intersection(e.edgesWith(i)).length>0&&(i.isParent()?f[t].push(c.get(i.id())):f[t].push(i.id()))})});var F=function(e){var n=d.get(e),i=void 0;l.get(e).forEach(function(r){i=t.getElementById(r).isParent()?c.get(r):r,f[n].push(i),f[d.get(i)].push(e)})},M=!0,P=!1,B=void 0;try{for(var G,W=l.keys()[Symbol.iterator]();!(M=(G=W.next()).done);M=!0){var z=G.value;F(z)}}catch(e){P=!0,B=e}finally{try{!M&&W.return&&W.return()}finally{if(P)throw B}}E=d.size;if(E>2){w=E<e.sampleSize?E:e.sampleSize;for(var U=0;U<E;U++)y[U]=[];for(var Y=0;Y<w;Y++)v[Y]=[];return"draft"==e.quality||"all"==e.step?(function(e){var t=void 0;if(e){t=Math.floor(Math.random()*E);for(var n=0;n<E;n++)p[n]=1e8;for(var i=0;i<w;i++)g[i]=t,t=N(t,i,e)}else{b();for(var r=0;r<w;r++)N(g[r],r,e,!1)}for(var o=0;o<E;o++)for(var a=0;a<w;a++)y[o][a]*=y[o][a];for(var s=0;s<w;s++)m[s]=[];for(var l=0;l<w;l++)for(var d=0;d<w;d++)m[l][d]=y[g[d]][l]}(T),function(){for(var e=o.svd(m),t=e.S,n=e.U,i=e.V,a=t[0]*t[0]*t[0],s=[],l=0;l<w;l++){s[l]=[];for(var d=0;d<w;d++)s[l][d]=0,l==d&&(s[l][d]=t[l]/(t[l]*t[l]+a/(t[l]*t[l])))}v=r.multMat(r.multMat(i,s),r.transpose(n))}(),function(){for(var e=void 0,t=void 0,n=[],i=[],o=[],a=[],s=0;s<E;s++)n[s]=Math.random(),i[s]=Math.random();n=r.normalize(n),i=r.normalize(i);for(var l=0,d=1e-9,c=1e-9,f=void 0;;){l++;for(var g=0;g<E;g++)o[g]=n[g];if(n=r.multGamma(r.multL(r.multGamma(o),y,v)),e=r.dotProduct(o,n),n=r.normalize(n),(f=Math.abs((d=r.dotProduct(o,n))/c))<=1+x&&f>=1)break;c=d}for(var p=0;p<E;p++)o[p]=n[p];for(l=0,c=1e-9;;){l++;for(var m=0;m<E;m++)a[m]=i[m];if(a=r.minusOp(a,r.multCons(o,r.dotProduct(o,a))),i=r.multGamma(r.multL(r.multGamma(a),y,v)),t=r.dotProduct(a,i),i=r.normalize(i),(f=Math.abs((d=r.dotProduct(a,i))/c))<=1+x&&f>=1)break;c=d}for(var T=0;T<E;T++)a[T]=i[T];h=r.multCons(o,Math.sqrt(Math.abs(e))),u=r.multCons(a,Math.sqrt(Math.abs(t)))}
1()):d.forEach(function(e,n){h.push(t.getElementById(n).position("x")),u.push(t.getElementById(n).position("y"))}),{nodeIndexes:d,xCoords:h,yCoords:u}}var j=d.keys(),H=t.getElementById(j.next().value),V=H.position(),X=H.outerWidth();if(h.push(V.x),u.push(V.y),2==E){var q=t.getElementById(j.next().value).outerWidth();h.push(V.x+X/2+q/2+e.idealEdgeLength),u.push(V.y)}return{nodeIndexes:d,xCoords:h,yCoords:u}}}},579:(e,t,n)=>{var i=n(212),r=function(e){e&&e("layout","fcose",i)};"undefined"!=typeof cytoscape&&r(cytoscape),e.exports=r},140:e=>{e.exports=i}},o={},function e(t){var n=o[t];if(void 0!==n)return n.exports;var i=o[t]={exports:{}};return r[t](i,i.exports,e),i.exports}(579))},7806:function(e,t,n){n.d(t,{diagram:function(){return Q}});var i,r=n(66462),o=n(6045),a=n(57038),s=n(42877),l=n(66764),d=n(99573),c=n(18442),f=n(8088),h=n(83084),u=n(53082),g={L:"left",R:"right",T:"top",B:"bottom"},p={L:(0,d.eW)(e=>"".concat(e,",").concat(e/2," 0,").concat(e," 0,0"),"L"),R:(0,d.eW)(e=>"0,".concat(e/2," ").concat(e,",0 ").concat(e,",").concat(e),"R"),T:(0,d.eW)(e=>"0,0 ".concat(e,",0 ").concat(e/2,",").concat(e),"T"),B:(0,d.eW)(e=>"".concat(e/2,",0 ").concat(e,",").concat(e," 0,").concat(e),"B")},y={L:(0,d.eW)((e,t)=>e-t+2,"L"),R:(0,d.eW)((e,t)=>e-2,"R"),T:(0,d.eW)((e,t)=>e-t+2,"T"),B:(0,d.eW)((e,t)=>e-2,"B")},m=(0,d.eW)(function(e){return E(e)?"L"===e?"R":"L":"T"===e?"B":"T"},"getOppositeArchitectureDirection"),v=(0,d.eW)(function(e){return"L"===e||"R"===e||"T"===e||"B"===e},"isArchitectureDirection"),E=(0,d.eW)(function(e){return"L"===e||"R"===e},"isArchitectureDirectionX"),x=(0,d.eW)(function(e){return"T"===e||"B"===e},"isArchitectureDirectionY"),T=(0,d.eW)(function(e,t){let n=E(e)&&x(t),i=x(e)&&E(t);return n||i},"isArchitectureDirectionXY"),C=(0,d.eW)(function(e){let t=e[0],n=e[1],i=E(t)&&x(n),r=x(t)&&E(n);return i||r},"isArchitecturePairXY"),w=(0,d.eW)(function(e){return"LL"!==e&&"RR"!==e&&"TT"!==e&&"BB"!==e},"isValidArchitectureDirectionPair"),b=(0,d.eW)(function(e,t){let n="".concat(e).concat(t);return w(n)?n:void 0},"getArchitectureDirectionPair"),N=(0,d.eW)(function(e,t){let[n,i]=e,r=t[0],o=t[1];return E(r)?x(o)?[n+("L"===r?-1:1),i+("T"===o?1:-1)]:[n+("L"===r?-1:1),i]:E(o)?[n+("L"===o?1:-1),i+("T"===r?1:-1)]:[n,i+("T"===r?1:-1)]},"shiftPositionByArchitectureDirectionPair"),I=(0,d.eW)(function(e){return"LT"===e||"TL"===e?[1,1]:"BL"===e||"LB"===e?[1,-1]:"BR"===e||"RB"===e?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),L=(0,d.eW)(function(e,t){return T(e,t)?"bend":E(e)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),A=(0,d.eW)(function(e){return"service"===e.type},"isArchitectureService"),k=(0,d.eW)(function(e){return"junction"===e.type},"isArchitectureJunction"),_=(0,d.eW)(e=>e.data(),"edgeData"),D=(0,d.eW)(e=>e.data(),"nodeData"),R=l.vZ.architecture,O=(i=class{setDiagramId(e){this.diagramId=e}getDiagramId(){return this.diagramId}clear(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},this.diagramId="",(0,l.ZH)()}addService(e){let{id:t,icon:n,in:i,title:r,iconText:o}=e;if(void 0!==this.registeredIds[t])throw Error("The service id [".concat(t,"] is already in use by another ").concat(this.registeredIds[t]));if(void 0!==i){if(t===i)throw Error("The service [".concat(t,"] cannot be placed within itself"));if(void 0===this.registeredIds[i])throw Error("The service [".concat(t,"]'s parent does not exist. Please make sure the parent is created before this service"));if("node"===this.registeredIds[i])throw Error("The service [".concat(t,"]'s parent is not a group"))}this.registeredIds[t]="node",this.nodes[t]={id:t,type:"service",icon:n,iconText:o,title:r,edges:[],in:i}}getServices(){return Object.values(this.nodes).filter(A)}addJunction(e){let{id:t,in:n}=e;if(void 0!==this.registeredIds[t])throw Error("The junction id [".concat(t,"] is already in use by another ").concat(this.registeredIds[t]));if(void 0!==n){if(t===n)throw Error("The junction [".concat(t,"] cannot be placed within itself"));if(void 0===this.registeredIds[n])throw Error("The junction [".concat(t,"]'s parent does not exist. Please make sure the parent is created before this junction"));if("node"===this.registeredIds[n])throw Error("The junction [".concat(t,"]'s parent is not a group"))}this.registeredIds[t]="node",this.nodes[t]={id:t,type:"junction",edges:[],in:n}}getJunctions(){return Object.values(this.nodes).filter(k)}getNodes(){return Object.values(this.nodes)}getNode(e){var t;return null!==(t=this.nodes[e])&&void 0!==t?t:null}addGroup(e){var t,n,i;let{id:r,icon:o,in:a,title:s}=e;if((null===(t=this.registeredIds)||void 0===t?void 0:t[r])!==void 0)throw Error("The group id [".concat(r,"] is already in use by another ").concat(this.registeredIds[r]));if(void 0!==a){if(r===a)throw Error("The group [".concat(r,"] cannot be placed within itself"));if((null===(n=this.registeredIds)||void 0===n?void 0:n[a])===void 0)throw Error("The group [".concat(r,"]'s parent does not exist. Please make sure the parent is created before this group"));if((null===(i=this.registeredIds)||void 0===i?void 0:i[a])==="node")throw Error("The group [".concat(r,"]'s parent is not a group"))}this.registeredIds[r]="group",this.groups[r]={id:r,icon:o,title:s,in:a}}getGroups(){return Object.values(this.groups)}addEdge(e){let{lhsId:t,rhsId:n,lhsDir:i,rhsDir:r,lhsInto:o,rhsInto:a,lhsGroup:s,rhsGroup:l,title:d}=e;if(!v(i))throw Error("Invalid direction given for left hand side of edge ".concat(t,"--").concat(n,". Expected (L,R,T,B) got ").concat(String(i)));if(!v(r))throw Error("Invalid direction given for right hand side of edge ".concat(t,"--").concat(n,". Expected (L,R,T,B) got ").concat(String(r)));if(void 0===this.nodes[t]&&void 0===this.groups[t])throw Error("The left-hand id [".concat(t,"] does not yet exist. Please create the service/group before declaring an edge to it."));if(void 0===this.nodes[n]&&void 0===this.groups[n])throw Error("The right-hand id [".concat(n,"] does not yet exist. Please create the service/group before declaring an edge to it."));let c=this.nodes[t].in,f=this.nodes[n].in;if(s&&c&&f&&c==f)throw Error("The left-hand id [".concat(t,"] is modified to traverse the group boundary, but the edge does not pass through two groups."));if(l&&c&&f&&c==f)throw Error("The right-hand id [".concat(n,"] is modified to traverse the group boundary, but the edge does not pass through two groups."));this.edges.push({lhsId:t,lhsDir:i,lhsInto:o,lhsGroup:s,rhsId:n,rhsDir:r,rhsInto:a,rhsGroup:l,title:d}),this.nodes[t]&&this.nodes[n]&&(this.nodes[t].edges.push(this.edges[this.edges.length-1]),this.nodes[n].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}getDataStructures(){if(void 0===this.dataStructures){let e={},t=Object.entries(this.nodes).reduce((t,n)=>{let[i,r]=n;return t[i]=r.edges.reduce((t,n)=>{var r,o,a,s;let l=null===(r=this.getNode(n.lhsId))||void 0===r?void 0:r.in,d=null===(o=this.getNode(n.rhsId))||void 0===o?void 0:o.in;if(l&&d&&l!==d){let t=L(n.lhsDir,n.rhsDir);"bend"!==t&&(null!==(a=e[l])&&void 0!==a||(e[l]={}),e[l][d]=t,null!==(s=e[d])&&void 0!==s||(e[d]={}),e[d][l]=t)}if(n.lhsId===i){let e=b(n.lhsDir,n.rhsDir);e&&(t[e]=n.rhsId)}else{let e=b(n.rhsDir,n.lhsDir);e&&(t[e]=n.lhsId)}return t},{}),t},{}
1),n=Object.keys(t)[0],i={[n]:1},r=Object.keys(t).reduce((e,t)=>t===n?e:{...e,[t]:1},{}),o=(0,d.eW)(e=>{let n={[e]:[0,0]},o=[e];for(;o.length>0;){let e=o.shift();if(e){i[e]=1,delete r[e];let a=t[e],[s,l]=n[e];Object.entries(a).forEach(e=>{let[t,r]=e;i[r]||(n[r]=N([s,l],t),o.push(r))})}}return n},"BFS"),a=[o(n)];for(;Object.keys(r).length>0;)a.push(o(Object.keys(r)[0]));this.dataStructures={adjList:t,spatialMaps:a,groupAlignments:e}}return this.dataStructures}setElementForId(e,t){this.elements[e]=t}getElementById(e){return this.elements[e]}getConfig(){return(0,s.Rb)({...R,...(0,l.iE)().architecture})}getConfigField(e){return this.getConfig()[e]}constructor(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.elements={},this.diagramId="",this.setAccTitle=l.GN,this.getAccTitle=l.eu,this.setDiagramTitle=l.g2,this.getDiagramTitle=l.Kr,this.getAccDescription=l.Mx,this.setAccDescription=l.U$,this.clear()}},(0,d.eW)(i,"ArchitectureDB"),i),S=(0,d.eW)((e,t)=>{(0,a.A)(e,t),e.groups.map(e=>t.addGroup(e)),e.services.map(e=>t.addService({...e,type:"service"})),e.junctions.map(e=>t.addJunction({...e,type:"junction"})),e.edges.map(e=>t.addEdge(e))},"populateDb"),F={parser:{yy:void 0},parse:(0,d.eW)(async e=>{var t;let n=await (0,c.Qc)("architecture",e);d.cM.debug(n);let i=null===(t=F.parser)||void 0===t?void 0:t.yy;if(!(i instanceof O))throw Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");S(n,i)},"parse")},M=(0,d.eW)(e=>"\n  .edge {\n    stroke-width: ".concat(e.archEdgeWidth,";\n    stroke: ").concat(e.archEdgeColor,";\n    fill: none;\n  }\n\n  .arrow {\n    fill: ").concat(e.archEdgeArrowColor,";\n  }\n\n  .node-bkg {\n    fill: none;\n    stroke: ").concat(e.archGroupBorderColor,";\n    stroke-width: ").concat(e.archGroupBorderWidth,";\n    stroke-dasharray: 8;\n  }\n  .node-icon-text {\n    display: flex; \n    align-items: center;\n  }\n  \n  .node-icon-text > div {\n    color: #fff;\n    margin: 1px;\n    height: fit-content;\n    text-align: center;\n    overflow: hidden;\n    display: -webkit-box;\n    -webkit-box-orient: vertical;\n  }\n"),"getStyles"),P=(0,d.eW)(e=>'<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/>'.concat(e,"</g>"),"wrapIcon"),B={prefix:"mermaid-architecture",height:80,width:80,icons:{database:{body:P('<path id="b" data-name="4" d="m20,57.86c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path id="c" data-name="3" d="m20,45.95c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path id="d" data-name="2" d="m20,34.05c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse id="e" data-name="1" cx="40" cy="22.14" rx="20" ry="7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="20" y1="57.86" x2="20" y2="22.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="60" y1="57.86" x2="60" y2="22.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>')},server:{body:P('<rect x="17.5" y="17.5" width="45" height="45" rx="2" ry="2" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="32.5" x2="62.5" y2="32.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="47.5" x2="62.5" y2="47.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><g><path d="m56.25,25c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,25c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><path d="m56.25,40c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,40c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><path d="m56.25,55c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,55c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g>')},disk:{body:P('<rect x="20" y="15" width="40" height="50" rx="1" ry="1" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="24" cy="19.17" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="56" cy="19.17" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="24" cy="60.83" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="56" cy="60.83" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="40" cy="33.75" rx="14" ry="14.58" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="40" cy="33.75" rx="4" ry="4.17" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m37.51,42.52l-4.83,13.22c-.26.71-1.1,1.02-1.76.64l-4.18-2.42c-.66-.38-.81-1.26-.33-1.84l9.01-10.8c.88-1.05,2.56-.08,2.09,1.2Z" style="fill: #fff; stroke-width: 0px;"/>')},internet:{body:P('<circle cx="40" cy="40" r="22.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="40" y1="17.5" x2="40" y2="62.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="40" x2="62.5" y2="40" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m39.99,17.51c-15.28,11.1-15.28,33.88,0,44.98" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m40.01,17.51c15.28,11.1,15.28,33.88,0,44.98" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="19.75" y1="30.1" x2="60.25" y2="30.1" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="19.75" y1="49.9" x2="60.25" y2="49.9" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>')},cloud:{body:P('<path d="m65,47.5c0,2.76-2.24,5-5,5H20c-2.76,0-5-2.24-5-5,0-1.87,1.03-3.51,2.56-4.36-.04-.21-.06-.42-.06-.64,0-2.6,2.48-4.74,5.65-4.97,1.65-4.51,6.34-7.76,11.85-7.76.86,0,1.69.08,2.5.23,2.09-1.57,4.69-2.5,7.5-2.5,6.1,0,11.19,4.38,12.28,10.17,2.14.56,3.72,2.51,3.72,4.83,0,.03,0,.07-.01.1,2.29.46,4.01,2.48,4.01,4.9Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>')},unknown:o.cN,blank:{body:P("")}}},G=(0,d.eW)(async function(e,t,n,i){let r=n.getConfigField("padding"),a=n.getConfigField("iconSize"),d=a/2,c=a/6,f=c/2;await Promise.all(t.edges().map(async t=>{var a,h;let{source:u,sourceDir:g,sourceArrow:m,sourceGroup:v,target:w,targetDir:N,targetArrow:L,targetGroup:A,label:k}=_(t),{x:D,y:R}=t[0].sourceEndpoint(),{x:O,y:S}=t[0].midpoint(),{x:F,y:M}=t[0].targetEndpoint(),P=r+4;if(v&&(E(g)?D+="L"===g?-P:P:R+="T"===g?-P:P+18),A&&(E(N)?F+="L"===N?-P:P:M+="T"===N?-P:P+18),v||(null===(a=n.getNode(u))||void 0===a?void 0:a.type)!=="junction"||(E(g)?D+="L"===g?d:-d:R+="T"===g?d:-d),A||(null===(h=n.getNode(w))||void 0===h?void 0:h.type)!=="junction"||(E(N)?F+="L"===N?d:-d:M+="T"===N?d:-d),t[0]._private.rscratch){let t=e.insert("g");if(t.insert("path").attr("d","M ".concat(D,",").concat(R," L ").concat(O,",").concat(S," L").concat(F,",").concat(M," ")).attr("class","edge").attr("id","".concat(i,"-").concat((0,s.Ln)(u,w,{prefix:"L"}))),m){let e=E(g)?y[g](D,c):D-f,n=x(g)?y[g](R,c):R-f;t.insert("polygon").attr("points",p[g](c)).attr("transform","translate(".concat(e,",").concat(n,")")).attr("class","arrow")}
1if(L){let e=E(N)?y[N](F,c):F-f,n=x(N)?y[N](M,c):M-f;t.insert("polygon").attr("points",p[N](c)).attr("transform","translate(".concat(e,",").concat(n,")")).attr("class","arrow")}if(k){let e=T(g,N)?"XY":E(g)?"X":"Y",n=0;n="X"===e?Math.abs(D-F):"Y"===e?Math.abs(R-M)/1.5:Math.abs(D-F)/2;let i=t.append("g");if(await (0,o.rw)(i,k,{useHtmlLabels:!1,width:n,classes:"architecture-service-label"},(0,l.nV)()),i.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),"X"===e)i.attr("transform","translate("+O+", "+S+")");else if("Y"===e)i.attr("transform","translate("+O+", "+S+") rotate(-90)");else if("XY"===e){let e=b(g,N);if(e&&C(e)){let t=i.node().getBoundingClientRect(),[n,r]=I(e);i.attr("dominant-baseline","auto").attr("transform","rotate(".concat(-1*n*r*45,")"));let o=i.node().getBoundingClientRect();i.attr("transform","\n                translate(".concat(O,", ").concat(S-t.height/2,")\n                translate(").concat(n*o.width/2,", ").concat(r*o.height/2,")\n                rotate(").concat(-1*n*r*45,", 0, ").concat(t.height/2,")\n              "))}}}}}))},"drawEdges"),W=(0,d.eW)(async function(e,t,n,i){let r=.75*n.getConfigField("padding"),a=n.getConfigField("fontSize"),s=n.getConfigField("iconSize")/2;await Promise.all(t.nodes().map(async t=>{let d=D(t);if("group"===d.type){let{h:c,w:f,x1:h,y1:u}=t.boundingBox(),g=e.append("rect");g.attr("id","".concat(i,"-group-").concat(d.id)).attr("x",h+s).attr("y",u+s).attr("width",f).attr("height",c).attr("class","node-bkg");let p=e.append("g"),y=h,m=u;if(d.icon){let e=p.append("g");e.html("<g>".concat(await (0,o.s4)(d.icon,{height:r,width:r,fallbackPrefix:B.prefix}),"</g>")),e.attr("transform","translate("+(y+s+1)+", "+(m+s+1)+")"),y+=r,m+=a/2-1-2}if(d.label){let e=p.append("g");await (0,o.rw)(e,d.label,{useHtmlLabels:!1,width:f,classes:"architecture-service-label"},(0,l.nV)()),e.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),e.attr("transform","translate("+(y+s+4)+", "+(m+s+2)+")")}n.setElementForId(d.id,g)}}))},"drawGroups"),z=(0,d.eW)(async function(e,t,n,i){let r=(0,l.nV)();for(let s of n){let n=t.append("g"),d=e.getConfigField("iconSize");if(s.title){let e=n.append("g");await (0,o.rw)(e,s.title,{useHtmlLabels:!1,width:1.5*d,classes:"architecture-service-label"},r),e.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),e.attr("transform","translate("+d/2+", "+d+")")}let c=n.append("g");if(s.icon)c.html("<g>".concat(await (0,o.s4)(s.icon,{height:d,width:d,fallbackPrefix:B.prefix}),"</g>"));else if(s.iconText){var a;c.html("<g>".concat(await (0,o.s4)("blank",{height:d,width:d,fallbackPrefix:B.prefix}),"</g>"));let e=c.append("g").append("foreignObject").attr("width",d).attr("height",d).append("div").attr("class","node-icon-text").attr("style","height: ".concat(d,"px;")).append("div").html((0,l.oO)(s.iconText,r)),t=null!==(a=parseInt(window.getComputedStyle(e.node(),null).getPropertyValue("font-size").replace(/\D/g,"")))&&void 0!==a?a:16;e.attr("style","-webkit-line-clamp: ".concat(Math.floor((d-2)/t),";"))}else c.append("path").attr("class","node-bkg").attr("id","".concat(i,"-node-").concat(s.id)).attr("d","M0,".concat(d," V5 Q0,0 5,0 H").concat(d-5," Q").concat(d,",0 ").concat(d,",5 V").concat(d," Z"));n.attr("id","".concat(i,"-service-").concat(s.id)).attr("class","architecture-service");let{width:f,height:h}=n.node().getBBox();s.width=f,s.height=h,e.setElementForId(s.id,n)}return 0},"drawServices"),U=(0,d.eW)(function(e,t,n,i){n.forEach(n=>{let r=t.append("g"),o=e.getConfigField("iconSize");r.append("g").append("rect").attr("id","".concat(i,"-node-").concat(n.id)).attr("fill-opacity","0").attr("width",o).attr("height",o),r.attr("class","architecture-junction");let{width:a,height:s}=r._groups[0][0].getBBox();r.width=a,r.height=s,e.setElementForId(n.id,r)})},"drawJunctions");function Y(e,t,n){e.forEach(e=>{t.add({group:"nodes",data:{type:"service",id:e.id,icon:e.icon,label:e.title,parent:e.in,width:n.getConfigField("iconSize"),height:n.getConfigField("iconSize")},classes:"node-service"})})}
1function j(e,t,n){e.forEach(e=>{t.add({group:"nodes",data:{type:"junction",id:e.id,parent:e.in,width:n.getConfigField("iconSize"),height:n.getConfigField("iconSize")},classes:"node-junction"})})}function H(e,t){t.nodes().map(t=>{let n=D(t);"group"!==n.type&&(n.x=t.position().x,n.y=t.position().y,e.getElementById(n.id).attr("transform","translate("+(n.x||0)+","+(n.y||0)+")"))})}function V(e,t){e.forEach(e=>{t.add({group:"nodes",data:{type:"group",id:e.id,icon:e.icon,label:e.title,parent:e.in},classes:"node-group"})})}function X(e,t){e.forEach(e=>{let{lhsId:n,rhsId:i,lhsInto:r,lhsGroup:o,rhsInto:a,lhsDir:s,rhsDir:l,rhsGroup:d,title:c}=e,f=T(e.lhsDir,e.rhsDir)?"segments":"straight",h={id:"".concat(n,"-").concat(i),label:c,source:n,sourceDir:s,sourceArrow:r,sourceGroup:o,sourceEndpoint:"L"===s?"0 50%":"R"===s?"100% 50%":"T"===s?"50% 0":"50% 100%",target:i,targetDir:l,targetArrow:a,targetGroup:d,targetEndpoint:"L"===l?"0 50%":"R"===l?"100% 50%":"T"===l?"50% 0":"50% 100%"};t.add({group:"edges",data:h,classes:f})})}function q(e,t,n){let i=(0,d.eW)((e,t)=>Object.entries(e).reduce((e,i)=>{let[r,o]=i,a=0,s=Object.entries(o);if(1===s.length)return e[r]=s[0][1],e;for(let i=0;i<s.length-1;i++)for(let o=i+1;o<s.length;o++){var l,d,c;let[f,h]=s[i],[u,g]=s[o];(null===(l=n[f])||void 0===l?void 0:l[u])===t?(null!==(d=e[r])&&void 0!==d||(e[r]=[]),e[r]=[...e[r],...h,...g]):"default"===f||"default"===u?(null!==(c=e[r])&&void 0!==c||(e[r]=[]),e[r]=[...e[r],...h,...g]):(e["".concat(r,"-").concat(a++)]=h,e["".concat(r,"-").concat(a++)]=g)}return e},{}),"flattenAlignments"),[r,o]=t.map(t=>{let n={},r={};return Object.entries(t).forEach(t=>{var i,o,a,s,l,d,c,f;let[h,[u,g]]=t,p=null!==(s=null===(i=e.getNode(h))||void 0===i?void 0:i.in)&&void 0!==s?s:"default";null!==(l=n[g])&&void 0!==l||(n[g]={}),null!==(d=(o=n[g])[p])&&void 0!==d||(o[p]=[]),n[g][p].push(h),null!==(c=r[u])&&void 0!==c||(r[u]={}),null!==(f=(a=r[u])[p])&&void 0!==f||(a[p]=[]),r[u][p].push(h)}),{horiz:Object.values(i(n,"horizontal")).filter(e=>e.length>1),vert:Object.values(i(r,"vertical")).filter(e=>e.length>1)}}).reduce((e,t)=>{let[n,i]=e,{horiz:r,vert:o}=t;return[[...n,...r],[...i,...o]]},[[],[]]);return{horizontal:r,vertical:o}}function Z(e,t){let n=[],i=(0,d.eW)(e=>"".concat(e[0],",").concat(e[1]),"posToStr"),r=(0,d.eW)(e=>e.split(",").map(e=>parseInt(e)),"strToPos");return e.forEach(e=>{let o=Object.fromEntries(Object.entries(e).map(e=>{let[t,n]=e;return[i(n),t]})),a=[i([0,0])],s={},l={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};for(;a.length>0;){let e=a.shift();if(e){s[e]=1;let d=o[e];if(d){let c=r(e);Object.entries(l).forEach(e=>{let[r,l]=e,f=i([c[0]+l[0],c[1]+l[1]]),h=o[f];h&&!s[f]&&(a.push(f),n.push({[g[r]]:h,[g[m(r)]]:d,gap:1.5*t.getConfigField("iconSize")}))})}}}}),n}function J(e,t,n,i,r,o){let{spatialMaps:a,groupAlignments:s}=o;return new Promise(o=>{let l=(0,u.Ys)("body").append("div").attr("id","cy").attr("style","display:none"),c=(0,f.Z)({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"straight","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"edge[label]",style:{label:"data(label)"}},{selector:"edge.segments",style:{"curve-style":"segments","segment-weights":"0","segment-distances":[.5],"edge-distances":"endpoints","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"node",style:{"compound-sizing-wrt-labels":"include"}},{selector:"node[label]",style:{"text-valign":"bottom","text-halign":"center","font-size":"".concat(r.getConfigField("fontSize"),"px")}},{selector:".node-service",style:{label:"data(label)",width:"data(width)",height:"data(height)"}},{selector:".node-junction",style:{width:"data(width)",height:"data(height)"}},{selector:".node-group",style:{padding:"".concat(r.getConfigField("padding"),"px")}}],layout:{name:"grid",boundingBox:{x1:0,x2:100,y1:0,y2:100}}});l.remove(),V(n,c),Y(e,c,r),j(t,c,r),X(i,c);let h=q(r,a,s),g=Z(a,r),p=c.layout({name:"fcose",quality:"proof",randomize:r.getConfigField("randomize"),styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(e){let[t,n]=e.connectedNodes(),{parent:i}=D(t),{parent:o}=D(n);return i===o?1.5*r.getConfigField("iconSize"):.5*r.getConfigField("iconSize")},edgeElasticity(e){let[t,n]=e.connectedNodes(),{parent:i}=D(t),{parent:r}=D(n);return i===r?.45:.001},alignmentConstraint:h,relativePlacementConstraint:g});p.one("layoutstop",()=>{function e(e,t,n,i){let r,o;let{x:a,y:s}=e,{x:l,y:d}=t;o=(i-s+(a-n)*(s-d)/(a-l))/Math.sqrt(1+Math.pow((s-d)/(a-l),2)),r=Math.sqrt(Math.pow(i-s,2)+Math.pow(n-a,2)-Math.pow(o,2))/Math.sqrt(Math.pow(l-a,2)+Math.pow(d-s,2));
1let c=(l-a)*(i-s)-(d-s)*(n-a);switch(!0){case c>=0:c=1;break;case c<0:c=-1}let f=(l-a)*(n-a)+(d-s)*(i-s);switch(!0){case f>=0:f=1;break;case f<0:f=-1}return{distances:o=Math.abs(o)*c,weights:r*=f}}for(let n of((0,d.eW)(e,"getSegmentWeights"),c.startBatch(),Object.values(c.edges()))){var t;if(null===(t=n.data)||void 0===t?void 0:t.call(n)){let{x:t,y:i}=n.source().position(),{x:r,y:o}=n.target().position();if(t!==r&&i!==o){let t=n.sourceEndpoint(),i=n.targetEndpoint(),{sourceDir:r}=_(n),[o,a]=x(r)?[t.x,i.y]:[i.x,t.y],{weights:s,distances:l}=e(t,i,o,a);n.style("segment-distances",l),n.style("segment-weights",s)}}}c.endBatch(),p.run()}),p.run(),c.ready(e=>{d.cM.info("Ready",e),o(c)})})}(0,o.ef)([{name:B.prefix,icons:B}]),f.Z.use(h),(0,d.eW)(Y,"addServices"),(0,d.eW)(j,"addJunctions"),(0,d.eW)(H,"positionNodes"),(0,d.eW)(V,"addGroups"),(0,d.eW)(X,"addEdges"),(0,d.eW)(q,"getAlignments"),(0,d.eW)(Z,"getRelativeConstraints"),(0,d.eW)(J,"layoutArchitecture");var Q={parser:F,get db(){return new O},renderer:{draw:(0,d.eW)(async(e,t,n,i)=>{let o=i.db;o.setDiagramId(t);let a=o.getServices(),s=o.getJunctions(),d=o.getGroups(),c=o.getEdges(),f=o.getDataStructures(),h=(0,r.P)(t),u=h.append("g");u.attr("class","architecture-edges");let g=h.append("g");g.attr("class","architecture-services");let p=h.append("g");p.attr("class","architecture-groups"),await z(o,g,a,t),U(o,g,s,t);let y=await J(a,s,d,c,o,f);await G(u,y,o,t),await W(p,y,o,t),H(o,y),(0,l.j7)(void 0,h,o.getConfigField("padding"),o.getConfigField("useMaxWidth"))},"draw")},styles:M}},57038:function(e,t,n){function i(e,t){var n,i,r;e.accDescr&&(null===(n=t.setAccDescription)||void 0===n||n.call(t,e.accDescr)),e.accTitle&&(null===(i=t.setAccTitle)||void 0===i||i.call(t,e.accTitle)),e.title&&(null===(r=t.setDiagramTitle)||void 0===r||r.call(t,e.title))}n.d(t,{A:function(){return i}}),(0,n(99573).eW)(i,"populateCommonDb")}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.