@diagc/cli 0.5.0 → 0.5.1

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.
@@ -40,7 +40,7 @@ Error generating stack: `+e.message+`
40
40
  `),i.length!=2)throw k(new q_(`Exactly two numbers are expected, `+i.length+` were found.`));try{this.a=tH(bH(i[0])),this.b=tH(bH(i[1]))}catch(e){throw e=PI(e),F(e,131)?(n=e,k(new q_(Qst+n))):k(e)}},Q.Ib=function(){return`(`+this.a+`,`+this.b+`)`},Q.a=0,Q.b=0;var T6=B(qJ,`KVector`,8);Y(79,66,{3:1,4:1,20:1,31:1,56:1,18:1,66:1,16:1,79:1,414:1},n_,ay,Yue),Q.Nc=function(){return NRe(this)},Q.ag=function(e){var t,n,r=kW(e,`,|;|\\(|\\)|\\[|\\]|\\{|\\}| | |
41
41
  `),i,a,o;lA(this);try{for(n=0,a=0,i=0,o=0;n<r.length;)r[n]!=null&&bH(r[n]).length>0&&(a%2==0?i=tH(r[n]):o=tH(r[n]),a>0&&a%2!=0&&VD(this,new N(i,o)),++a),++n}catch(e){throw e=PI(e),F(e,131)?(t=e,k(new q_(`The given string does not match the expected format for vectors.`+t))):k(e)}},Q.Ib=function(){for(var e=new XT(`(`),t=Xz(this,0),n;t.b!=t.d.c;)n=L(zj(t),8),UC(e,n.a+`,`+n.b),t.b!=t.d.c&&(e.a+=`; `);return(e.a+=`)`,e).a};var LIt=B(qJ,`KVectorChain`,79);Y(256,24,{3:1,35:1,24:1,256:1},FS);var RIt,E6,D6,O6,k6,A6,zIt=qP(CX,`Alignment`,256,fQ,QAe,lhe),BIt;Y(976,1,cJ,vf),Q.tf=function(e){e7e(e)};var VIt,HIt,UIt,WIt,GIt,KIt,qIt,JIt,YIt,XIt,ZIt,QIt;B(CX,`BoxLayouterOptions`,976),Y(977,1,{},Nc),Q.uf=function(){var e;return e=new Ic,e},Q.vf=function(e){},B(CX,`BoxLayouterOptions/BoxFactory`,977),Y(299,24,{3:1,35:1,24:1,299:1},IS);var j6,$It,M6,N6,P6,eLt,tLt=qP(CX,`ContentAlignment`,299,fQ,tje,uhe),nLt;Y(689,1,cJ,_f),Q.tf=function(e){HR(e,new fH(ey($v(ty(qv(Qv(Yv(Xv(new Mc,Nft),``),`Layout Algorithm`),`Select a specific layout algorithm.`),(pH(),C6)),OQ),RR((Jz(),m6))))),HR(e,new fH(ey($v(ty(qv(Qv(Yv(Xv(new Mc,Pft),``),`Resolved Layout Algorithm`),`Meta data associated with the selected algorithm.`),S6),kIt),RR(m6)))),HR(e,new fH(ey($v(ty(Jv(qv(Qv(Yv(Xv(new Mc,gut),``),`Alignment`),`Alignment of the selected node relative to other nodes; the exact meaning depends on the used algorithm.`),iLt),y6),zIt),RR(p6)))),HR(e,new fH(ey($v(ty(qv(Qv(Yv(Xv(new Mc,mJ),``),`Aspect Ratio`),`The desired aspect ratio of the drawing, that is the quotient of width by height.`),v6),CQ),RR(m6)))),HR(e,new fH(ey($v(ty(qv(Qv(Yv(Xv(new Mc,Fft),``),`Bend Points`),`A fixed list of bend points for the edge. This is used by the 'Fixed Layout' algorithm to specify a pre-defined routing for an edge. The vector chain must include the source point, any bend points, and the target point, so it must have at least two points.`),S6),LIt),RR(d6)))),HR(e,new fH(ey($v(ty(Jv(qv(Qv(Yv(Xv(new Mc,NY),``),`Content Alignment`),`Specifies how the content of a node are aligned. Each node can individually control the alignment of its contents. I.e. if a node should be aligned top left in its parent node, the parent node should specify that option.`),lLt),b6),tLt),RR(m6)))),HR(e,new fH(ey($v(ty(Jv(qv(Qv(Yv(Xv(new Mc,MY),``),`Debug Mode`),`Whether additional debug information shall be generated.`),($T(),!1)),_6),bQ),RR(m6)))),HR(e,new fH(ey($v(ty(Jv(qv(Qv(Yv(Xv(new Mc,yut),``),`Direction`),`Overall direction of edges: horizontal (right / left) or vertical (down / up).`),uLt),y6),C8),RR(m6)))),HR(e,new fH(ey($v(ty(Jv(qv(Qv(Yv(Xv(new Mc,OY),``),`Edge Routing`),`What kind of edge routing style should be applied for the content of a parent node. Algorithms may also set this option to single edges in order to mark them as splines. The bend point list of edges with this option set to SPLINES must be interpreted as control points for a piecewise cubic spline.`),mLt),y6),kRt),RR(m6)))),HR(e,new fH(ey($v(ty(Jv(qv(Qv(Yv(Xv(new Mc,jft),``),`Expand Nodes`),`If active, nodes are expanded to fill the area of their parent.`),!1),_6),bQ),RR(m6)))),HR(e,new fH(ey($v(ty(Jv(qv(Qv(Yv(Xv(new Mc,DY),``),`Hierarchy Handling`),"Determines whether separate layout runs are triggered for different compound nodes in a hierarchical graph. Setting a node's hierarchy handling to `INCLUDE_CHILDREN` will lay out that node and all of its descendants in a single layout run, until a descendant is encountered which has its hierarchy handling set to `SEPARATE_CHILDREN`. In general, `SEPARATE_CHILDREN` will ensure that a new layout run is triggered for a node with that setting. Including multiple levels of hierarchy in a single layout run may allow cross-hierarchical edges to be laid out properly. If the root node is set to `INHERIT` (or not set at all), the default behavior is `SEPARATE_CHILDREN`."),vLt),y6),GRt),hO(m6,G(j(g6,1),Z,160,0,[p6]))))),HR(e,new fH(ey($v(ty(Jv(qv(Qv(Yv(Xv(new Mc,_J),``),`Padding`),`The padding to be left to a parent element's border when placing child elements. This can also serve as an output option of a layout algorithm if node size calculation is setup appropriately.`),PLt),S6),Zbt),hO(m6,G(j(g6,1),Z,160,0,[p6]))))),HR(e,new fH(ey($v(ty(Jv(qv(Qv(Yv(Xv(new Mc,vJ),``),`Interactive`),`Whether the algorithm should be run in interactive mode for the content of a parent node. What this means exactly depends on how the specific algorithm interprets this option. Usually in the interactive mode algorithms try to modify the current layout as little as possible.`),!1),_6),bQ),RR(m6)))),HR(e,new fH(ey($v(ty(Jv(qv(Qv(Yv(Xv(new Mc,FY),``),`interactive Layout`),`Whether the graph should be changeable interactively and by setting constraints`),!1),_6),bQ),RR(m6)))),HR(e,new fH(ey($v(ty(Jv(qv(Qv(Yv(Xv(new Mc,bJ),``),`Omit Node Micro Layout`),`Node micro layout comprises the computation of node dimensions (if requested), the placement of ports and their labels, and the placement of node labels. The functionality is implemented independent of any specific layout algorithm and shouldn't have any negative impact on the layout algorithm's performance itself. Yet, if any unforeseen behavior occurs, this option allows to deactivate the micro layout.`),!1),_6),bQ),RR(m6)))),HR(e,new fH(ey($v(ty(Jv(qv(Qv(Yv(Xv(new Mc,Mst),``),`Port Constraints`),`Defines constraints of the position of the ports of a node.`),KLt),y6),ezt),RR(p6)))),HR(e,new fH(ey($v(ty(qv(Qv(Yv(Xv(new Mc,PY),``),`Position`),`The position of a node, port, or label. This is used by the 'Fixed Layout' algorithm to specify a pre-defined position.`),S6),T6),hO(p6,G(j(g6,1),Z,160,0,[h6,f6]))))),HR(e,new fH(ey($v(ty(qv(Qv(Yv(Xv(new Mc,fJ),``),`Priority`),`Defines the priority of an object; its meaning depends on the specific layout algorithm and the context where it is used.`),x6),TQ),hO(p6,G(j(g6,1),Z,160,0,[d6]))))),HR(e,new fH(ey($v(ty(qv(Qv(Yv(Xv(new Mc,hJ),``),`Randomization Seed`),`Seed used for pseudo-random number generators to control the layout algorithm. If the value is 0, the seed shall be determined pseudo-randomly (e.g. from the system time).`),x6),TQ),RR(m6)))),HR(e,new fH(ey($v(ty(qv(Qv(Yv(Xv(new Mc,gJ),``),`Separate Connected Components`),`Whether each connected component should be processed separately.`),_6),bQ),RR(m6)))),HR(e,new fH(ey($v(ty(Jv(qv(Qv(Yv(Xv(new Mc,Out),``),`Junction Points`),`This option is not used as option, but as output of the layout algorithms. It is attached to edges and determines the points where junction symbols should be drawn in order to represent hyperedges with orthogonal routing. Whether such points are computed depends on the chosen layout algorithm and edge routing style. The points are put into the vector chain with no specific order.`),ELt),S6),LIt),RR(d6)))),HR(e,new fH(ey($v(ty(Jv(qv(Qv(Yv(Xv(new Mc,Mut),``),`Comment Box`),`Whether the node should be regarded as a comment box instead of a regular node. In that case its placement should be similar to how labels are handled. Any edges incident to a comment box specify to which graph elements the comment is related.`),!1),_6),bQ),RR(p6)))),HR(e,new fH(ey($v(ty(Jv(qv(Qv(Yv(Xv(new Mc,Nut),``),`Hypernode`),`Whether the node should be handled as a hypernode.`),!1),_6),bQ),RR(p6)))),HR(e,new fH(ey($v(ty(qv(Qv(Yv(Xv(new Mc,Ift),``),`Label Manager`),`Label managers can shorten labels upon a layout algorithm's request.`),S6),sHt),hO(m6,G(j(g6,1),Z,160,0,[f6]))))),HR(e,new fH(ey($v(ty(Jv(qv(Qv(Yv(Xv(new Mc,Lft),``),`Softwrapping Fuzziness`),`Determines the amount of fuzziness to be used when performing softwrapping on labels. The value expresses the percent of overhang that is permitted for each line. If the next line would take up less space than this threshold, it is appended to the current line instead of being placed in a new line.`),0),v6),CQ),RR(f6)))),HR(e,new fH(ey($v(ty(Jv(qv(Qv(Yv(Xv(new Mc,Lut),``),`Margins`),`Margins define additional space around the actual bounds of a graph element. For instance, ports or labels being placed on the outside of a node's border might introduce such a margin. The margin is used to guarantee non-overlap of other graph elements with those ports or labels.`),DLt),S6),Jbt),RR(p6)))),HR(e,new fH(ey($v(ty(Jv(qv(Qv(Yv(Xv(new Mc,mut),``),`No Layout`),`No layout is done for the associated element. This is used to mark parts of a diagram to avoid their inclusion in the layout graph, or to mark parts of the layout graph to prevent layout engines from processing them. If you wish to exclude the contents of a compound node from automatic layout, while the node itself is still considered on its own layer, use the 'Fixed Layout' algorithm for that node.`),!1),_6),bQ),hO(p6,G(j(g6,1),Z,160,0,[d6,h6,f6]))))),HR(e,new fH(ey($v(ty(Jv(qv(Qv(Yv(Xv(new Mc,Rft),``),`Scale Factor`),`The scaling factor to be applied to the corresponding node in recursive layout. It causes the corresponding node's size to be adjusted, and its ports and labels to be sized and placed accordingly after the layout of that node has been determined (and before the node itself and its siblings are arranged). The scaling is not reverted afterwards, so the resulting layout graph contains the adjusted size and position data. This option is currently not supported if 'Layout Hierarchy' is set.`),1),v6),CQ),RR(p6)))),HR(e,new fH(ey($v(ty(qv(Qv(Yv(Xv(new Mc,zft),``),`Child Area Width`),`The width of the area occupied by the laid out children of a node.`),v6),CQ),RR(m6)))),HR(e,new fH(ey($v(ty(qv(Qv(Yv(Xv(new Mc,Bft),``),`Child Area Height`),`The height of the area occupied by the laid out children of a node.`),v6),CQ),RR(m6)))),HR(e,new fH(ey($v(ty(Jv(qv(Qv(Yv(Xv(new Mc,EJ),``),wft),`Turns topdown layout on and off. If this option is enabled, hierarchical layout will be computed first for the root node and then for its children recursively. Layouts are then scaled down to fit the area provided by their parents. Graphs must follow a certain structure for topdown layout to work properly. {@link TopdownNodeTypes.PARALLEL_NODE} nodes must have children of type {@link TopdownNodeTypes.HIERARCHICAL_NODE} and must define {@link topdown.hierarchicalNodeWidth} and {@link topdown.hierarchicalNodeAspectRatio} for their children. Furthermore they need to be laid out using an algorithm that is a {@link TopdownLayoutProvider}. Hierarchical nodes can also be parents of other hierarchical nodes and can optionally use a {@link TopdownSizeApproximator} to dynamically set sizes during topdown layout. In this case {@link topdown.hierarchicalNodeWidth} and {@link topdown.hierarchicalNodeAspectRatio} should be set on the node itself rather than the parent. The values are then used by the size approximator as base values. Hierarchical nodes require the layout option {@link nodeSize.fixedGraphSize} to be true to prevent the algorithm used there from resizing the hierarchical node. This option is not supported if 'Hierarchy Handling' is set to 'INCLUDE_CHILDREN'`),!1),_6),bQ),RR(m6)))),Tj(e,EJ,AJ,null),HR(e,new fH(ey($v(ty(Jv(qv(Qv(Yv(Xv(new Mc,Vft),``),`Animate`),`Whether the shift from the old layout to the new computed layout shall be animated.`),!0),_6),bQ),RR(m6)))),HR(e,new fH(ey($v(ty(Jv(qv(Qv(Yv(Xv(new Mc,Hft),``),`Animation Time Factor`),`Factor for computation of animation time. The higher the value, the longer the animation time. If the value is 0, the resulting time is always equal to the minimum defined by 'Minimal Animation Time'.`),q(100)),x6),TQ),RR(m6)))),HR(e,new fH(ey($v(ty(Jv(qv(Qv(Yv(Xv(new Mc,Uft),``),`Layout Ancestors`),`Whether the hierarchy levels on the path from the selected element to the root of the diagram shall be included in the layout process.`),!1),_6),bQ),RR(m6)))),HR(e,new fH(ey($v(ty(Jv(qv(Qv(Yv(Xv(new Mc,Wft),``),`Maximal Animation Time`),`The maximal time for animations, in milliseconds.`),q(4e3)),x6),TQ),RR(m6)))),HR(e,new fH(ey($v(ty(Jv(qv(Qv(Yv(Xv(new Mc,Gft),``),`Minimal Animation Time`),`The minimal time for animations, in milliseconds.`),q(400)),x6),TQ),RR(m6)))),HR(e,new fH(ey($v(ty(Jv(qv(Qv(Yv(Xv(new Mc,Kft),``),`Progress Bar`),`Whether a progress bar shall be displayed during layout computations.`),!1),_6),bQ),RR(m6)))),HR(e,new fH(ey($v(ty(Jv(qv(Qv(Yv(Xv(new Mc,qft),``),`Validate Graph`),`Whether the graph shall be validated before any layout algorithm is applied. If this option is enabled and at least one error is found, the layout process is aborted and a message is shown to the user.`),!1),_6),bQ),RR(m6)))),HR(e,new fH(ey($v(ty(Jv(qv(Qv(Yv(Xv(new Mc,Jft),``),`Validate Options`),`Whether layout options shall be validated before any layout algorithm is applied. If this option is enabled and at least one error is found, the layout process is aborted and a message is shown to the user.`),!0),_6),bQ),RR(m6)))),HR(e,new fH(ey($v(ty(Jv(qv(Qv(Yv(Xv(new Mc,Yft),``),`Zoom to Fit`),`Whether the zoom level shall be set to view the whole diagram after layout.`),!1),_6),bQ),RR(m6)))),HR(e,new fH(ey($v(ty(Jv(qv(Qv(Yv(Xv(new Mc,Mft),`box`),`Box Layout Mode`),`Configures the packing mode used by the {@link BoxLayoutProvider}. If SIMPLE is not required (neither priorities are used nor the interactive mode), GROUP_DEC can improve the packing and decrease the area. GROUP_MIXED and GROUP_INC may, in very specific scenarios, work better.`),sLt),y6),kzt),RR(m6)))),HR(e,new fH(ey($v(ty(Jv(qv(Qv(Yv(Xv(new Mc,Xft),`json`),`Shape Coords`),`For layouts transferred into JSON graphs, specify the coordinate system to be used for nodes, ports, and labels of nodes and ports.`),TLt),y6),dzt),RR(m6)))),HR(e,new fH(ey($v(ty(Jv(qv(Qv(Yv(Xv(new Mc,Zft),`json`),`Edge Coords`),`For layouts transferred into JSON graphs, specify the coordinate system to be used for edge route points and edge labels.`),CLt),y6),wRt),RR(m6)))),HR(e,new fH(ey($v(ty(Jv(qv(Qv(Yv(Xv(new Mc,tut),kY),`Comment Comment Spacing`),`Spacing to be preserved between a comment box and other comment boxes connected to the same node. The space left between comment boxes of different nodes is controlled by the node-node spacing.`),10),v6),CQ),RR(m6)))),HR(e,new fH(ey($v(ty(Jv(qv(Qv(Yv(Xv(new Mc,nut),kY),`Comment Node Spacing`),`Spacing to be preserved between a node and its connected comment boxes. The space left between a node and the comments of another node is controlled by the node-node spacing.`),10),v6),CQ),RR(m6)))),HR(e,new fH(ey($v(ty(Jv(qv(Qv(Yv(Xv(new Mc,rut),kY),`Components Spacing`),`Spacing to be preserved between pairs of connected components. This option is only relevant if 'separateConnectedComponents' is activated.`),20),v6),CQ),RR(m6)))),HR(e,new fH(ey($v(ty(Jv(qv(Qv(Yv(Xv(new Mc,iut),kY),`Edge Spacing`),`Spacing to be preserved between any two edges. Note that while this can somewhat easily be satisfied for the segments of orthogonally drawn edges, it is harder for general polylines or splines.`),10),v6),CQ),RR(m6)))),HR(e,new fH(ey($v(ty(Jv(qv(Qv(Yv(Xv(new Mc,jst),kY),`Edge Label Spacing`),`The minimal distance to be preserved between a label and the edge it is associated with. Note that the placement of a label is influenced by the 'edgelabels.placement' option.`),2),v6),CQ),RR(m6)))),HR(e,new fH(ey($v(ty(Jv(qv(Qv(Yv(Xv(new Mc,aut),kY),`Edge Node Spacing`),`Spacing to be preserved between nodes and edges.`),10),v6),CQ),RR(m6)))),HR(e,new fH(ey($v(ty(Jv(qv(Qv(Yv(Xv(new Mc,out),kY),`Label Spacing`),`Determines the amount of space to be left between two labels of the same graph element.`),0),v6),CQ),RR(m6)))),HR(e,new fH(ey($v(ty(Jv(qv(Qv(Yv(Xv(new Mc,lut),kY),`Label Node Spacing`),`Spacing to be preserved between labels and the border of node they are associated with. Note that the placement of a label is influenced by the 'nodelabels.placement' option.`),5),v6),CQ),RR(m6)))),HR(e,new fH(ey($v(ty(Jv(qv(Qv(Yv(Xv(new Mc,sut),kY),`Horizontal spacing between Label and Port`),`Horizontal spacing to be preserved between labels and the ports they are associated with. Note that the placement of a label is influenced by the 'portlabels.placement' option.`),1),v6),CQ),RR(m6)))),HR(e,new fH(ey($v(ty(Jv(qv(Qv(Yv(Xv(new Mc,cut),kY),`Vertical spacing between Label and Port`),`Vertical spacing to be preserved between labels and the ports they are associated with. Note that the placement of a label is influenced by the 'portlabels.placement' option.`),1),v6),CQ),RR(m6)))),HR(e,new fH(ey($v(ty(Jv(qv(Qv(Yv(Xv(new Mc,pJ),kY),`Node Spacing`),`The minimal distance to be preserved between each two nodes.`),20),v6),CQ),RR(m6)))),HR(e,new fH(ey($v(ty(Jv(qv(Qv(Yv(Xv(new Mc,uut),kY),`Node Self Loop Spacing`),`Spacing to be preserved between a node and its self loops.`),10),v6),CQ),RR(m6)))),HR(e,new fH(ey($v(ty(Jv(qv(Qv(Yv(Xv(new Mc,dut),kY),`Port Spacing`),`Spacing between pairs of ports of the same node.`),10),v6),CQ),hO(m6,G(j(g6,1),Z,160,0,[p6]))))),HR(e,new fH(ey($v(ty(qv(Qv(Yv(Xv(new Mc,fut),kY),`Individual Spacing`),`Allows to specify individual spacing values for graph elements that shall be different from the value specified for the element's parent.`),S6),jzt),hO(p6,G(j(g6,1),Z,160,0,[d6,h6,f6]))))),HR(e,new fH(ey($v(ty(Jv(qv(Qv(Yv(Xv(new Mc,Rut),kY),`Additional Port Space`),`Additional space around the sets of ports on each node side. For each side of a node, this option can reserve additional space before and after the ports on each side. For example, a top spacing of 20 makes sure that the first port on the western and eastern side is 20 units away from the northern border.`),fRt),S6),Jbt),RR(m6)))),HR(e,new fH(ey($v(ty(qv(Qv(Yv(Xv(new Mc,Iut),apt),`Layout Partition`),`Partition to which the node belongs. This requires Layout Partitioning to be active. Nodes with lower partition IDs will appear to the left of nodes with higher partition IDs (assuming a left-to-right layout direction).`),x6),TQ),hO(m6,G(j(g6,1),Z,160,0,[p6]))))),Tj(e,Iut,Fut,RLt),HR(e,new fH(ey($v(ty(Jv(qv(Qv(Yv(Xv(new Mc,Fut),apt),`Layout Partitioning`),`Whether to activate partitioned layout. This will allow to group nodes through the Layout Partition option. a pair of nodes with different partition indices is then placed such that the node with lower index is placed to the left of the other node (with left-to-right layout direction). Depending on the layout algorithm, this may only be guaranteed to work if all nodes have a layout partition configured, or at least if edges that cross partitions are not part of a partition-crossing cycle.`),ILt),_6),bQ),RR(m6)))),HR(e,new fH(ey($v(ty(Jv(qv(Qv(Yv(Xv(new Mc,but),opt),`Node Label Padding`),`Define padding for node labels that are placed inside of a node.`),kLt),S6),Zbt),RR(m6)))),HR(e,new fH(ey($v(ty(Jv(qv(Qv(Yv(Xv(new Mc,wJ),opt),`Node Label Placement`),`Hints for where node labels are to be placed; if empty, the node label's position is not modified.`),ALt),b6),Y8),hO(p6,G(j(g6,1),Z,160,0,[f6]))))),HR(e,new fH(ey($v(ty(Jv(qv(Qv(Yv(Xv(new Mc,Cut),TX),`Port Alignment`),`Defines the default port distribution for a node. May be overridden for each side individually.`),BLt),y6),$8),RR(p6)))),HR(e,new fH(ey($v(ty(qv(Qv(Yv(Xv(new Mc,wut),TX),`Port Alignment (North)`),`Defines how ports on the northern side are placed, overriding the node's general port alignment.`),y6),$8),RR(p6)))),HR(e,new fH(ey($v(ty(qv(Qv(Yv(Xv(new Mc,Tut),TX),`Port Alignment (South)`),`Defines how ports on the southern side are placed, overriding the node's general port alignment.`),y6),$8),RR(p6)))),HR(e,new fH(ey($v(ty(qv(Qv(Yv(Xv(new Mc,Eut),TX),`Port Alignment (West)`),`Defines how ports on the western side are placed, overriding the node's general port alignment.`),y6),$8),RR(p6)))),HR(e,new fH(ey($v(ty(qv(Qv(Yv(Xv(new Mc,Dut),TX),`Port Alignment (East)`),`Defines how ports on the eastern side are placed, overriding the node's general port alignment.`),y6),$8),RR(p6)))),HR(e,new fH(ey($v(ty(Jv(qv(Qv(Yv(Xv(new Mc,CJ),spt),`Node Size Constraints`),`What should be taken into account when calculating a node's size. Empty size constraints specify that a node's size is already fixed and should not be changed.`),jLt),b6),B5),RR(p6)))),HR(e,new fH(ey($v(ty(Jv(qv(Qv(Yv(Xv(new Mc,SJ),spt),`Node Size Options`),`Options modifying the behavior of the size constraints set on a node. Each member of the set specifies something that should be taken into account when calculating node sizes. The empty set corresponds to no further modifications.`),NLt),b6),hzt),RR(p6)))),HR(e,new fH(ey($v(ty(Jv(qv(Qv(Yv(Xv(new Mc,MJ),spt),`Node Size Minimum`),`The minimal size to which a node can be reduced.`),MLt),S6),T6),RR(p6)))),HR(e,new fH(ey($v(ty(Jv(qv(Qv(Yv(Xv(new Mc,xJ),spt),`Fixed Graph Size`),`By default, the fixed layout provider will enlarge a graph until it is large enough to contain its children. If this option is set, it won't do so.`),!1),_6),bQ),RR(m6)))),HR(e,new fH(ey($v(ty(Jv(qv(Qv(Yv(Xv(new Mc,Aut),$lt),`Edge Label Placement`),`Gives a hint on where to put edge labels.`),fLt),y6),ERt),RR(f6)))),HR(e,new fH(ey($v(ty(Jv(qv(Qv(Yv(Xv(new Mc,yJ),$lt),`Inline Edge Labels`),`If true, an edge label is placed directly on its edge. May only apply to center edge labels. This kind of label placement is only advisable if the label's rendering is such that it is not crossed by its edge and thus stays legible.`),!1),_6),bQ),RR(f6)))),HR(e,new fH(ey($v(ty(qv(Qv(Yv(Xv(new Mc,Qft),`font`),`Font Name`),`Font name used for a label.`),C6),OQ),RR(f6)))),HR(e,new fH(ey($v(ty(qv(Qv(Yv(Xv(new Mc,$ft),`font`),`Font Size`),`Font size used for a label.`),x6),TQ),RR(f6)))),HR(e,new fH(ey($v(ty(qv(Qv(Yv(Xv(new Mc,Put),cpt),`Port Anchor Offset`),`The offset to the port position where connections shall be attached.`),S6),T6),RR(h6)))),HR(e,new fH(ey($v(ty(qv(Qv(Yv(Xv(new Mc,jut),cpt),`Port Index`),`The index of a port in the fixed order around a node. The order is assumed as clockwise, starting with the leftmost port on the top side. This option must be set if 'Port Constraints' is set to FIXED_ORDER and no specific positions are given for the ports. Additionally, the option 'Port Side' must be defined in this case.`),x6),TQ),RR(h6)))),HR(e,new fH(ey($v(ty(Jv(qv(Qv(Yv(Xv(new Mc,hut),cpt),`Port Side`),`The side of a node on which a port is situated. This option must be set if 'Port Constraints' is set to FIXED_SIDE or FIXED_ORDER and no specific positions are given for the ports.`),ZLt),y6),P5),RR(h6)))),HR(e,new fH(ey($v(ty(qv(Qv(Yv(Xv(new Mc,put),cpt),`Port Border Offset`),`The offset of ports on the node border. With a positive offset the port is moved outside of the node, while with a negative offset the port is moved towards the inside. An offset of 0 means that the port is placed directly on the node border, i.e. if the port side is north, the port's south border touches the nodes's north border; if the port side is east, the port's west border touches the nodes's east border; if the port side is south, the port's north border touches the node's south border; if the port side is west, the port's east border touches the node's west border.`),v6),CQ),RR(h6)))),HR(e,new fH(ey($v(ty(Jv(qv(Qv(Yv(Xv(new Mc,TJ),lpt),`Port Label Placement`),`Decides on a placement method for port labels; if empty, the node label's position is not modified.`),YLt),b6),f5),RR(p6)))),HR(e,new fH(ey($v(ty(Jv(qv(Qv(Yv(Xv(new Mc,xut),lpt),`Port Labels Next to Port`),`Use 'portLabels.placement': NEXT_TO_PORT_OF_POSSIBLE.`),!1),_6),bQ),RR(p6)))),HR(e,new fH(ey($v(ty(Jv(qv(Qv(Yv(Xv(new Mc,Sut),lpt),`Treat Port Labels as Group`),`If this option is true (default), the labels of a port will be treated as a group when it comes to centering them next to their port. If this option is false, only the first label will be centered next to the port, with the others being placed below. This only applies to labels of eastern and western ports and will have no effect if labels are not placed next to their port.`),!0),_6),bQ),RR(p6)))),HR(e,new fH(ey($v(ty(Jv(qv(Qv(Yv(Xv(new Mc,ept),EX),`Number of size categories`),`Defines the number of categories to use for the FIXED_INTEGER_RATIO_BOXES size approximator.`),q(3)),x6),TQ),RR(m6)))),Tj(e,ept,npt,yRt),HR(e,new fH(ey($v(ty(Jv(qv(Qv(Yv(Xv(new Mc,tpt),EX),`Weight of a node containing children for determining the graph size`),`When determining the graph size for the size categorisation, this value determines how many times a node containing children is weighted more than a simple node. For example setting this value to four would result in a graph containing a simple node and a hierarchical node to be counted as having a size of five.`),q(4)),x6),TQ),RR(m6)))),Tj(e,tpt,ept,null),HR(e,new fH(ey($v(ty(Jv(qv(Qv(Yv(Xv(new Mc,DJ),EX),`Topdown Scale Factor`),`The scaling factor to be applied to the nodes laid out within the node in recursive topdown layout. The difference to 'Scale Factor' is that the node itself is not scaled. This value has to be set on hierarchical nodes.`),1),v6),CQ),RR(m6)))),Tj(e,DJ,AJ,gRt),HR(e,new fH(ey($v(ty(Jv(qv(Qv(Yv(Xv(new Mc,npt),EX),`Topdown Size Approximator`),`The size approximator to be used to set sizes of hierarchical nodes during topdown layout. The default value is null, which results in nodes keeping whatever size is defined for them e.g. through parent parallel node or by manually setting the size.`),null),S6),qRt),RR(p6)))),Tj(e,npt,AJ,_Rt),HR(e,new fH(ey($v(ty(Jv(qv(Qv(Yv(Xv(new Mc,OJ),EX),`Topdown Hierarchical Node Width`),`The fixed size of a hierarchical node when using topdown layout. If this value is set on a parallel node it applies to its children, when set on a hierarchical node it applies to the node itself.`),150),v6),CQ),hO(m6,G(j(g6,1),Z,160,0,[p6]))))),Tj(e,OJ,AJ,null),HR(e,new fH(ey($v(ty(Jv(qv(Qv(Yv(Xv(new Mc,kJ),EX),`Topdown Hierarchical Node Aspect Ratio`),`The fixed aspect ratio of a hierarchical node when using topdown layout. Default is 1/sqrt(2). If this value is set on a parallel node it applies to its children, when set on a hierarchical node it applies to the node itself.`),1.414),v6),CQ),hO(m6,G(j(g6,1),Z,160,0,[p6]))))),Tj(e,kJ,AJ,null),HR(e,new fH(ey($v(ty(Jv(qv(Qv(Yv(Xv(new Mc,AJ),EX),`Topdown Node Type`),`The different node types used for topdown layout. If the node type is set to {@link TopdownNodeTypes.PARALLEL_NODE} the algorithm must be set to a {@link TopdownLayoutProvider} such as {@link TopdownPacking}. The {@link nodeSize.fixedGraphSize} option is technically only required for hierarchical nodes.`),null),y6),vzt),RR(p6)))),Tj(e,AJ,xJ,null),HR(e,new fH(ey($v(ty(Jv(qv(Qv(Yv(Xv(new Mc,rpt),EX),`Topdown Scale Cap`),`Determines the upper limit for the topdown scale factor. The default value is 1.0 which ensures that nested children never end up appearing larger than their parents in terms of unit sizes such as the font size. If the limit is larger, nodes will fully utilize the available space, but it is counteriniuitive for inner nodes to have a larger scale than outer nodes.`),1),v6),CQ),RR(m6)))),Tj(e,rpt,AJ,hRt),HR(e,new fH(ey($v(ty(Jv(qv(Qv(Yv(Xv(new Mc,_ut),upt),`Activate Inside Self Loops`),`Whether this node allows to route self loops inside of it instead of around it. If set to true, this will make the node a compound node if it isn't already, and will require the layout algorithm to support compound nodes with hierarchical ports.`),!1),_6),bQ),RR(p6)))),HR(e,new fH(ey($v(ty(Jv(qv(Qv(Yv(Xv(new Mc,vut),upt),`Inside Self Loop`),`Whether a self loop should be routed inside a node instead of around that node.`),!1),_6),bQ),RR(d6)))),HR(e,new fH(ey($v(ty(Jv(qv(Qv(Yv(Xv(new Mc,kut),`edge`),`Edge Thickness`),`The thickness of an edge. This is a hint on the line width used to draw an edge, possibly requiring more space to be reserved for it.`),1),v6),CQ),RR(d6)))),HR(e,new fH(ey($v(ty(Jv(qv(Qv(Yv(Xv(new Mc,ipt),`edge`),`Edge Type`),`The type of an edge. This is usually used for UML class diagrams, where associations must be handled differently from generalizations.`),gLt),y6),LRt),RR(d6)))),Db(e,new rj(Wv(Kv(Gv(new uc,Sq),`Layered`),`The layer-based method was introduced by Sugiyama, Tagawa and Toda in 1981. It emphasizes the direction of edges by pointing as many edges as possible into the same direction. The nodes are arranged in layers, which are sometimes called "hierarchies", and then reordered such that the number of edge crossings is minimized. Afterwards, concrete coordinates are computed for the nodes and edge bend points.`))),Db(e,new rj(Wv(Kv(Gv(new uc,`org.eclipse.elk.orthogonal`),`Orthogonal`),`Orthogonal methods that follow the "topology-shape-metrics" approach by Batini, Nardelli and Tamassia '86. The first phase determines the topology of the drawing by applying a planarization technique, which results in a planar representation of the graph. The orthogonal shape is computed in the second phase, which aims at minimizing the number of edge bends, and is called orthogonalization. The third phase leads to concrete coordinates for nodes and edge bend points by applying a compaction method, thus defining the metrics.`))),Db(e,new rj(Wv(Kv(Gv(new uc,dJ),`Force`),`Layout algorithms that follow physical analogies by simulating a system of attractive and repulsive forces. The first successful method of this kind was proposed by Eades in 1984.`))),Db(e,new rj(Wv(Kv(Gv(new uc,`org.eclipse.elk.circle`),`Circle`),`Circular layout algorithms emphasize cycles or biconnected components of a graph by arranging them in circles. This is useful if a drawing is desired where such components are clearly grouped, or where cycles are shown as prominent OPTIONS of the graph.`))),Db(e,new rj(Wv(Kv(Gv(new uc,mdt),`Tree`),`Specialized layout methods for trees, i.e. acyclic graphs. The regular structure of graphs that have no undirected cycles can be emphasized using an algorithm of this type.`))),Db(e,new rj(Wv(Kv(Gv(new uc,`org.eclipse.elk.planar`),`Planar`),`Algorithms that require a planar or upward planar graph. Most of these algorithms are theoretically interesting, but not practically usable.`))),Db(e,new rj(Wv(Kv(Gv(new uc,sX),`Radial`),`Radial layout algorithms usually position the nodes of the graph on concentric circles.`))),I8e((new yf,e)),e7e((new vf,e)),d6e((new bf,e))};var F6,rLt,iLt,I6,aLt,oLt,sLt,L6,R6,cLt,z6,lLt,B6,V6,uLt,H6,dLt,fLt,pLt,mLt,hLt,gLt,_Lt,U6,vLt,yLt,W6,bLt,G6,xLt,SLt,CLt,wLt,TLt,K6,ELt,q6,DLt,OLt,kLt,J6,ALt,Y6,jLt,X6,Z6,MLt,Q6,NLt,$6,e8,t8,PLt,FLt,ILt,LLt,RLt,zLt,BLt,VLt,HLt,ULt,WLt,GLt,n8,r8,KLt,qLt,JLt,i8,YLt,XLt,a8,ZLt,o8,s8,QLt,c8,$Lt,eRt,tRt,nRt,rRt,iRt,aRt,oRt,l8,sRt,u8,cRt,lRt,d8,uRt,dRt,fRt,pRt,f8,p8,m8,h8,mRt,hRt,g8,gRt,_8,_Rt,vRt,yRt,bRt;B(CX,`CoreOptions`,689),Y(86,24,{3:1,35:1,24:1,86:1},LS);var v8,y8,b8,x8,S8,C8=qP(CX,`Direction`,86,fQ,zOe,dhe),xRt;Y(278,24,{3:1,35:1,24:1,278:1},RS);var w8,T8,SRt,CRt,wRt=qP(CX,`EdgeCoords`,278,fQ,ADe,fhe),TRt;Y(279,24,{3:1,35:1,24:1,279:1},zS);var E8,D8,O8,ERt=qP(CX,`EdgeLabelPlacement`,279,fQ,mTe,phe),DRt;Y(222,24,{3:1,35:1,24:1,222:1},BS);var k8,A8,j8,ORt,kRt=qP(CX,`EdgeRouting`,222,fQ,NDe,mhe),ARt;Y(328,24,{3:1,35:1,24:1,328:1},VS);var jRt,MRt,NRt,PRt,FRt,IRt,LRt=qP(CX,`EdgeType`,328,fQ,nje,hhe),RRt;Y(974,1,cJ,yf),Q.tf=function(e){I8e(e)};var zRt,BRt,VRt,HRt,URt,WRt,M8;B(CX,`FixedLayouterOptions`,974),Y(975,1,{},Pc),Q.uf=function(){var e;return e=new zc,e},Q.vf=function(e){},B(CX,`FixedLayouterOptions/FixedFactory`,975),Y(347,24,{3:1,35:1,24:1,347:1},HS);var N8,P8,F8,GRt=qP(CX,`HierarchyHandling`,347,fQ,hTe,ghe),KRt,qRt=$D(CX,`ITopdownSizeApproximator`);Y(292,24,{3:1,35:1,24:1,292:1},US);var I8,L8,R8,z8,JRt=qP(CX,`LabelSide`,292,fQ,PDe,_he),YRt;Y(96,24,{3:1,35:1,24:1,96:1},WS);var B8,V8,H8,U8,W8,G8,K8,q8,J8,Y8=qP(CX,`NodeLabelPlacement`,96,fQ,YNe,vhe),XRt;Y(257,24,{3:1,35:1,24:1,257:1},GS);var ZRt,X8,Z8,QRt,Q8,$8=qP(CX,`PortAlignment`,257,fQ,ske,yhe),$Rt;Y(102,24,{3:1,35:1,24:1,102:1},KS);var e5,t5,n5,r5,i5,a5,ezt=qP(CX,`PortConstraints`,102,fQ,$Ae,bhe),tzt;Y(280,24,{3:1,35:1,24:1,280:1},qS);var o5,s5,c5,l5,u5,d5,f5=qP(CX,`PortLabelPlacement`,280,fQ,eje,xhe),nzt;Y(64,24,{3:1,35:1,24:1,64:1},YS);var p5,m5,h5,g5,_5,v5,y5,b5,x5,S5,C5,w5,T5,E5,D5,O5,k5,A5,j5,M5,N5,P5=qP(CX,`PortSide`,64,fQ,BOe,She),rzt;Y(978,1,cJ,bf),Q.tf=function(e){d6e(e)};var izt,azt,ozt,szt,czt;B(CX,`RandomLayouterOptions`,978),Y(979,1,{},Fc),Q.uf=function(){var e;return e=new Kc,e},Q.vf=function(e){},B(CX,`RandomLayouterOptions/RandomFactory`,979),Y(300,24,{3:1,35:1,24:1,300:1},JS);var F5,lzt,uzt,dzt=qP(CX,`ShapeCoords`,300,fQ,gTe,Che),fzt;Y(380,24,{3:1,35:1,24:1,380:1},M);var I5,L5,R5,z5,B5=qP(CX,`SizeConstraint`,380,fQ,MDe,whe),pzt;Y(266,24,{3:1,35:1,24:1,266:1},XS);var V5,H5,U5,mzt,W5,G5,K5,q5,J5,hzt=qP(CX,`SizeOptions`,266,fQ,EPe,The),gzt;Y(281,24,{3:1,35:1,24:1,281:1},ZS);var Y5,_zt,X5,vzt=qP(CX,`TopdownNodeTypes`,281,fQ,_Te,Ehe),yzt;Y(288,24,kX);var bzt,xzt,Szt,Czt,Z5=qP(CX,`TopdownSizeApproximator`,288,fQ,jDe,Dhe);Y(970,288,kX,o_e),Q.Sg=function(e){return DWe(e)},qP(CX,`TopdownSizeApproximator/1`,970,Z5,null,null),Y(971,288,kX,Cve),Q.Sg=function(e){var t=L(QH(e,(UG(),c8)),144),n,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C=(cy(),m=new e_,m),w,T,E;for(xU(C,e),w=new Hh,o=new UT((!e.a&&(e.a=new R(p7,e,10,11)),e.a));o.e!=o.i.gc();)i=L($z(o),26),y=(p=new e_,p),bU(y,C),xU(y,i),E=DWe(i),Iw(y,r.Math.max(i.g,E.a),r.Math.max(i.f,E.b)),CH(w.f,i,y);for(a=new UT((!e.a&&(e.a=new R(p7,e,10,11)),e.a));a.e!=a.i.gc();)for(i=L($z(a),26),d=new UT((!i.e&&(i.e=new sD(i7,i,7,4)),i.e));d.e!=d.i.gc();)u=L($z(d),85),x=L(kC(_O(w.f,i)),26),S=L(gk(w,W((!u.c&&(u.c=new sD(r7,u,5,8)),u.c),0)),26),b=(f=new Yc,f),aN((!b.b&&(b.b=new sD(r7,b,4,7)),b.b),x),aN((!b.c&&(b.c=new sD(r7,b,5,8)),b.c),S),_U(b,GA(x)),xU(b,u);g=L(OA(t.f),214);try{g.kf(C,new Hc),Jbe(t.f,g)}catch(e){throw e=PI(e),F(e,101)?(h=e,k(h)):k(e)}return $M(C,R6)||$M(C,L6)||PG(C),l=A(I(QH(C,R6))),c=A(I(QH(C,L6))),s=l/c,n=A(I(QH(C,p8)))*r.Math.sqrt((!C.a&&(C.a=new R(p7,C,10,11)),C.a).i),T=L(QH(C,t8),104),v=T.b+T.c+1,_=T.d+T.a+1,new N(r.Math.max(v,n),r.Math.max(_,n/s))},qP(CX,`TopdownSizeApproximator/2`,971,Z5,null,null),Y(972,288,kX,yCe),Q.Sg=function(e){var t,n=A(I(QH(e,(UG(),p8)))),r,i,a,o;return t=n/A(I(QH(e,f8))),r=K7e(e),a=L(QH(e,t8),104),i=A(I(Qz(d8))),GA(e)&&(i=A(I(QH(GA(e),d8)))),o=FT(new N(n,t),r),rD(o,new N(-(a.b+a.c)-i,-(a.d+a.a)-i))},qP(CX,`TopdownSizeApproximator/3`,972,Z5,null,null),Y(973,288,kX,Qve),Q.Sg=function(e){var t,n,i,a,o,s,c,l,u,d;for(s=new UT((!e.a&&(e.a=new R(p7,e,10,11)),e.a));s.e!=s.i.gc();)o=L($z(s),26),QH(o,(UG(),_8))!=null&&(!o.a&&(o.a=new R(p7,o,10,11)),o.a)&&(!o.a&&(o.a=new R(p7,o,10,11)),o.a).i>0?(n=L(QH(o,_8),522),d=n.Sg(o),u=L(QH(o,t8),104),Iw(o,r.Math.max(o.g,d.a+u.b+u.c),r.Math.max(o.f,d.b+u.d+u.a))):(!o.a&&(o.a=new R(p7,o,10,11)),o.a).i!=0&&Iw(o,A(I(QH(o,p8))),A(I(QH(o,p8)))/A(I(QH(o,f8))));t=L(QH(e,(UG(),c8)),144),l=L(OA(t.f),214);try{l.kf(e,new Hc),Jbe(t.f,l)}catch(e){throw e=PI(e),F(e,101)?(c=e,k(c)):k(e)}return sB(e,F6,DX),uOe(e),PG(e),a=A(I(QH(e,R6))),i=A(I(QH(e,L6))),new N(a,i)},qP(CX,`TopdownSizeApproximator/4`,973,Z5,null,null);var wzt;Y(345,1,{853:1},__),Q.Tg=function(e,t){return dYe(this,e,t)},Q.Ug=function(){YXe(this)},Q.Vg=function(){return this.q},Q.Wg=function(){return this.f?hA(this.f):null},Q.Xg=function(){return hA(this.a)},Q.Yg=function(){return this.p},Q.Zg=function(){return!1},Q.$g=function(){return this.n},Q._g=function(){return this.p!=null&&!this.b},Q.ah=function(e){var t;this.n&&(t=e,IT(this.f,t))},Q.bh=function(e,t){var n,r;this.n&&e&&WTe(this,(n=new Wye,r=gW(n,e),Jnt(n),r),(SL(),Nzt))},Q.dh=function(e){var t;return this.b?null:(t=lNe(this,this.g),VD(this.a,t),t.i=this,this.d=e,t)},Q.eh=function(e){e>0&&!this.b&&RPe(this,e)},Q.b=!1,Q.c=0,Q.d=-1,Q.e=null,Q.f=null,Q.g=-1,Q.j=!1,Q.k=!1,Q.n=!1,Q.o=0,Q.q=0,Q.r=0,B(IY,`BasicProgressMonitor`,345),Y(706,214,tJ,Ic),Q.kf=function(e,t){H7e(e,t)},B(IY,`BoxLayoutProvider`,706),Y(966,1,zq,vne),Q.Le=function(e,t){return s4e(this,L(e,26),L(t,26))},Q.Fb=function(e){return this===e},Q.Me=function(){return new am(this)},Q.a=!1,B(IY,`BoxLayoutProvider/1`,966),Y(167,1,{167:1},xP,Jue),Q.Ib=function(){return this.c?m8e(this.c):ZV(this.b)},B(IY,`BoxLayoutProvider/Group`,167),Y(327,24,{3:1,35:1,24:1,327:1},$S);var Tzt,Ezt,Dzt,Ozt,kzt=qP(IY,`BoxLayoutProvider/PackingMode`,327,fQ,FDe,Ohe),Azt;Y(967,1,zq,Uc),Q.Le=function(e,t){return uSe(L(e,167),L(t,167))},Q.Fb=function(e){return this===e},Q.Me=function(){return new am(this)},B(IY,`BoxLayoutProvider/lambda$0$Type`,967),Y(968,1,zq,Wc),Q.Le=function(e,t){return Gxe(L(e,167),L(t,167))},Q.Fb=function(e){return this===e},Q.Me=function(){return new am(this)},B(IY,`BoxLayoutProvider/lambda$1$Type`,968),Y(969,1,zq,Gc),Q.Le=function(e,t){return Kxe(L(e,167),L(t,167))},Q.Fb=function(e){return this===e},Q.Me=function(){return new am(this)},B(IY,`BoxLayoutProvider/lambda$2$Type`,969),Y(1339,1,{830:1},lee),Q.Lg=function(e,t){return bb(),!F(t,174)||sae((UI(),L(e,174)),t)},B(IY,`ElkSpacings/AbstractSpacingsBuilder/lambda$0$Type`,1339),Y(1340,1,SK,yne),Q.Ad=function(e){JRe(this.a,L(e,147))},B(IY,`ElkSpacings/AbstractSpacingsBuilder/lambda$1$Type`,1340),Y(1341,1,SK,uee),Q.Ad=function(e){L(e,105),bb()},B(IY,`ElkSpacings/AbstractSpacingsBuilder/lambda$2$Type`,1341),Y(1345,1,SK,bne),Q.Ad=function(e){dFe(this.a,L(e,105))},B(IY,`ElkSpacings/AbstractSpacingsBuilder/lambda$3$Type`,1345),Y(1343,1,zK,Dse),Q.Mb=function(e){return nRe(this.a,this.b,L(e,147))},B(IY,`ElkSpacings/AbstractSpacingsBuilder/lambda$4$Type`,1343),Y(1342,1,zK,Ose),Q.Mb=function(e){return Bue(this.a,this.b,L(e,830))},B(IY,`ElkSpacings/AbstractSpacingsBuilder/lambda$5$Type`,1342),Y(1344,1,SK,eC),Q.Ad=function(e){Vve(this.a,this.b,L(e,147))},B(IY,`ElkSpacings/AbstractSpacingsBuilder/lambda$6$Type`,1344),Y(931,1,{},Rc),Q.Kb=function(e){return Ew(e)},Q.Fb=function(e){return this===e},B(IY,`ElkUtil/lambda$0$Type`,931),Y(932,1,SK,tC),Q.Ad=function(e){M$e(this.a,this.b,L(e,85))},Q.a=0,Q.b=0,B(IY,`ElkUtil/lambda$1$Type`,932),Y(933,1,SK,nC),Q.Ad=function(e){L_(this.a,this.b,L(e,170))},Q.a=0,Q.b=0,B(IY,`ElkUtil/lambda$2$Type`,933),Y(934,1,SK,rC),Q.Ad=function(e){Ece(this.a,this.b,L(e,157))},Q.a=0,Q.b=0,B(IY,`ElkUtil/lambda$3$Type`,934),Y(935,1,SK,xne),Q.Ad=function(e){n_e(this.a,L(e,372))},B(IY,`ElkUtil/lambda$4$Type`,935),Y(331,1,{35:1,331:1},Bh),Q.Dd=function(e){return ple(this,L(e,242))},Q.Fb=function(e){var t;return F(e,331)?(t=L(e,331),this.a==t.a):!1},Q.Hb=function(){return PA(this.a)},Q.Ib=function(){return this.a+` (exclusive)`},Q.a=0,B(IY,`ExclusiveBounds/ExclusiveLowerBound`,331),Y(1089,214,tJ,zc),Q.kf=function(e,t){var n,i,a,o,s,c,l,u,d,p,m,h,g,_,v,y,b,x,S,C,w,T,E;for(t.Tg(`Fixed Layout`,1),o=L(QH(e,(UG(),pLt)),222),p=0,m=0,b=new UT((!e.a&&(e.a=new R(p7,e,10,11)),e.a));b.e!=b.i.gc();){for(v=L($z(b),26),E=L(QH(v,(_L(),M8)),8),E&&(Lw(v,E.a,E.b),L(QH(v,BRt),182).Gc((bz(),I5))&&(h=L(QH(v,HRt),8),h.a>0&&h.b>0&&kG(v,h.a,h.b,!0,!0))),p=r.Math.max(p,v.i+v.g),m=r.Math.max(m,v.j+v.f),u=new UT((!v.n&&(v.n=new R(f7,v,1,7)),v.n));u.e!=u.i.gc();)c=L($z(u),157),E=L(QH(c,M8),8),E&&Lw(c,E.a,E.b),p=r.Math.max(p,v.i+c.i+c.g),m=r.Math.max(m,v.j+c.j+c.f);for(C=new UT((!v.c&&(v.c=new R(m7,v,9,9)),v.c));C.e!=C.i.gc();)for(S=L($z(C),125),E=L(QH(S,M8),8),E&&Lw(S,E.a,E.b),w=v.i+S.i,T=v.j+S.j,p=r.Math.max(p,w+S.g),m=r.Math.max(m,T+S.f),l=new UT((!S.n&&(S.n=new R(f7,S,1,7)),S.n));l.e!=l.i.gc();)c=L($z(l),157),E=L(QH(c,M8),8),E&&Lw(c,E.a,E.b),p=r.Math.max(p,w+c.i+c.g),m=r.Math.max(m,T+c.j+c.f);for(a=new DO(KT(dU(v).a.Jc(),new f));ZH(a);)n=L(TM(a),85),d=eit(n),p=r.Math.max(p,d.a),m=r.Math.max(m,d.b);for(i=new DO(KT(uU(v).a.Jc(),new f));ZH(i);)n=L(TM(i),85),GA(XV(n))!=e&&(d=eit(n),p=r.Math.max(p,d.a),m=r.Math.max(m,d.b))}if(o==(pR(),k8))for(y=new UT((!e.a&&(e.a=new R(p7,e,10,11)),e.a));y.e!=y.i.gc();)for(v=L($z(y),26),i=new DO(KT(dU(v).a.Jc(),new f));ZH(i);)n=L(TM(i),85),s=m7e(n),s.b==0?sB(n,K6,null):sB(n,K6,s);X_(FE(QH(e,(_L(),VRt))))||(x=L(QH(e,URt),104),_=p+x.b+x.c,g=m+x.d+x.a,kG(e,_,g,!0,!0)),t.Ug()},B(IY,`FixedLayoutProvider`,1089),Y(379,150,{3:1,414:1,379:1,105:1,150:1},Bc,yMe),Q.ag=function(e){var t,n,r,i,a,o,s,c,l;if(e)try{for(c=kW(e,`;,;`),a=c,o=0,s=a.length;o<s;++o){if(i=a[o],n=kW(i,`\\:`),r=qtt(ZP(),n[0]),!r)throw k(new q_(`Invalid option id: `+n[0]));if(l=Mtt(r,n[1]),l==null)throw k(new q_(`Invalid option value: `+n[1]));l==null?(!this.q&&(this.q=new Hh),NM(this.q,r)):(!this.q&&(this.q=new Hh),Rk(this.q,r,l))}}catch(e){throw e=PI(e),F(e,101)?(t=e,k(new BRe(t))):k(e)}},Q.Ib=function(){return IE(cM(Xk((this.q?this.q:(oA(),oA(),LQ)).vc().Mc(),new Lc),aMe(new Sge,new Se,new ge,new ye,G(j(UQ,1),Z,130,0,[]))))};var jzt=B(IY,`IndividualSpacings`,379);Y(965,1,{},Lc),Q.Kb=function(e){return lSe(L(e,45))},B(IY,`IndividualSpacings/lambda$0$Type`,965),Y(708,1,{},V_e),Q.c=0,B(IY,`InstancePool`,708),Y(1819,1,{},Vc),B(IY,`LoggedGraph`,1819),Y(407,24,{3:1,35:1,24:1,407:1},aC);var Mzt,Nzt,Pzt,Fzt,Izt=qP(IY,`LoggedGraph/Type`,407,fQ,IDe,khe),Lzt;Y(615,1,{853:1},Hc),Q.Tg=function(e,t){return!1},Q.Ug=function(){},Q.Vg=function(){return 0},Q.Wg=function(){return null},Q.Xg=function(){return null},Q.Yg=function(){return null},Q.Zg=function(){return!1},Q.$g=function(){return!1},Q._g=function(){return!1},Q.ah=function(e){},Q.bh=function(e,t){},Q.dh=function(e){return this},Q.eh=function(e){},B(IY,`NullElkProgressMonitor`,615),Y(49,1,{20:1,49:1},iC),Q.Ic=function(e){mM(this,e)},Q.Fb=function(e){var t,n,r;return F(e,49)?(n=L(e,49),t=this.a==null?n.a==null:$L(this.a,n.a),r=this.b==null?n.b==null:$L(this.b,n.b),t&&r):!1},Q.Hb=function(){var e,t,n=this.a==null?0:OF(this.a),r,i,a;return e=n&YK,t=n&-65536,a=this.b==null?0:OF(this.b),r=a&YK,i=a&-65536,e^i>>16&YK|t^r<<16},Q.Jc=function(){return new Sne(this)},Q.Ib=function(){return this.a==null&&this.b==null?`pair(null,null)`:this.a==null?`pair(null,`+WR(this.b)+`)`:this.b==null?`pair(`+WR(this.a)+`,null)`:`pair(`+WR(this.a)+`,`+WR(this.b)+`)`},B(IY,`Pair`,49),Y(980,1,dK,Sne),Q.Nb=function(e){KO(this,e)},Q.Ob=function(){return!this.c&&(!this.b&&this.a.a!=null||this.a.b!=null)},Q.Pb=function(){if(!this.c&&!this.b&&this.a.a!=null)return this.b=!0,this.a.a;if(!this.c&&this.a.b!=null)return this.c=!0,this.a.b;throw k(new mg)},Q.Qb=function(){throw this.c&&this.a.b!=null?this.a.b=null:this.b&&this.a.a!=null&&(this.a.a=null),k(new dg)},Q.b=!1,Q.c=!1,B(IY,`Pair/1`,980),Y(1079,214,tJ,Kc),Q.kf=function(e,t){var n,r,i,a,o;if(t.Tg(`Random Layout`,1),(!e.a&&(e.a=new R(p7,e,10,11)),e.a).i==0){t.Ug();return}a=L(QH(e,(pHe(),szt)),15),i=a&&a.a!=0?new sM(a.a):new BR,n=Z_(I(QH(e,izt))),o=Z_(I(QH(e,czt))),r=L(QH(e,azt),104),Srt(e,i,n,o,r),t.Ug()},B(IY,`RandomLayoutProvider`,1079),Y(240,1,{240:1},Lhe),Q.Fb=function(e){return zk(this.a,L(e,240).a)&&zk(this.b,L(e,240).b)&&zk(this.c,L(e,240).c)},Q.Hb=function(){return kL(G(j(sQ,1),aK,1,5,[this.a,this.b,this.c]))},Q.Ib=function(){return`(`+this.a+iK+this.b+iK+this.c+`)`},B(IY,`Triple`,240);var Rzt;Y(551,1,{}),Q.Jf=function(){return new N(this.f.i,this.f.j)},Q.mf=function(e){return BSe(e,(UG(),n8))?QH(this.f,zzt):QH(this.f,e)},Q.Kf=function(){return new N(this.f.g,this.f.f)},Q.Lf=function(){return this.g},Q.nf=function(e){return $M(this.f,e)},Q.Mf=function(e){LP(this.f,e.a),RP(this.f,e.b)},Q.Nf=function(e){IP(this.f,e.a),jP(this.f,e.b)},Q.Of=function(e){this.g=e},Q.g=0;var zzt;B(AX,`ElkGraphAdapters/AbstractElkGraphElementAdapter`,551),Y(553,1,{838:1},xh),Q.Pf=function(){var e,t;if(!this.b)for(this.b=Oj(axe(this.a).i),t=new UT(axe(this.a));t.e!=t.i.gc();)e=L($z(t),157),IT(this.b,new W_(e));return this.b},Q.b=null,B(AX,`ElkGraphAdapters/ElkEdgeAdapter`,553),Y(260,551,{},G_),Q.Qf=function(){return AGe(this)},Q.a=null,B(AX,`ElkGraphAdapters/ElkGraphAdapter`,260),Y(631,551,{187:1},W_),B(AX,`ElkGraphAdapters/ElkLabelAdapter`,631),Y(552,551,{685:1},lE),Q.Pf=function(){return OGe(this)},Q.Tf=function(){var e;return e=L(QH(this.f,(UG(),q6)),140),!e&&(e=new Gg),e},Q.Vf=function(){return kGe(this)},Q.Xf=function(e){var t=new Ipe(e);sB(this.f,(UG(),q6),t)},Q.Yf=function(e){sB(this.f,(UG(),t8),new Fpe(e))},Q.Rf=function(){return this.d},Q.Sf=function(){var e,t;if(!this.a)for(this.a=new Vh,t=new DO(KT(uU(L(this.f,26)).a.Jc(),new f));ZH(t);)e=L(TM(t),85),IT(this.a,new xh(e));return this.a},Q.Uf=function(){var e,t;if(!this.c)for(this.c=new Vh,t=new DO(KT(dU(L(this.f,26)).a.Jc(),new f));ZH(t);)e=L(TM(t),85),IT(this.c,new xh(e));return this.c},Q.Wf=function(){return fA(L(this.f,26)).i!=0||X_(FE(L(this.f,26).mf((UG(),W6))))},Q.Zf=function(){mMe(this,(kb(),Rzt))},Q.a=null,Q.b=null,Q.c=null,Q.d=null,Q.e=null,B(AX,`ElkGraphAdapters/ElkNodeAdapter`,552),Y(1251,551,{837:1},Gne),Q.Pf=function(){return VGe(this)},Q.Sf=function(){var e,t;if(!this.a)for(this.a=gE(L(this.f,125).gh().i),t=new UT(L(this.f,125).gh());t.e!=t.i.gc();)e=L($z(t),85),IT(this.a,new xh(e));return this.a},Q.Uf=function(){var e,t;if(!this.c)for(this.c=gE(L(this.f,125).hh().i),t=new UT(L(this.f,125).hh());t.e!=t.i.gc();)e=L($z(t),85),IT(this.c,new xh(e));return this.c},Q.$f=function(){return L(L(this.f,125).mf((UG(),a8)),64)},Q._f=function(){var e,t,n,r=HA(L(this.f,125)),i,a,o,s;for(n=new UT(L(this.f,125).hh());n.e!=n.i.gc();)for(e=L($z(n),85),s=new UT((!e.c&&(e.c=new sD(r7,e,5,8)),e.c));s.e!=s.i.gc();)if(o=L($z(s),84),gP(FV(o),r)||FV(o)==r&&X_(FE(QH(e,(UG(),bLt)))))return!0;for(t=new UT(L(this.f,125).gh());t.e!=t.i.gc();)for(e=L($z(t),85),a=new UT((!e.b&&(e.b=new sD(r7,e,4,7)),e.b));a.e!=a.i.gc();)if(i=L($z(a),84),gP(FV(i),r))return!0;return!1},Q.a=null,Q.b=null,Q.c=null,B(AX,`ElkGraphAdapters/ElkPortAdapter`,1251),Y(1252,1,zq,qc),Q.Le=function(e,t){return p8e(L(e,125),L(t,125))},Q.Fb=function(e){return this===e},Q.Me=function(){return new am(this)},B(AX,`ElkGraphAdapters/PortComparator`,1252);var Q5=$D(jX,`EObject`),$5=$D(MX,mpt),e7=$D(MX,hpt),t7=$D(MX,gpt),n7=$D(MX,`ElkShape`),r7=$D(MX,_pt),i7=$D(MX,vpt),a7=$D(MX,ypt),o7=$D(jX,bpt),s7=$D(jX,`EFactory`),Bzt,Vzt=$D(jX,xpt),c7=$D(jX,`EPackage`),l7,Hzt,Uzt,Wzt,u7,Gzt,Kzt,qzt,Jzt,d7,Yzt,Xzt,f7=$D(MX,Spt),p7=$D(MX,Cpt),m7=$D(MX,wpt);Y(93,1,Tpt),Q.qh=function(){return this.rh(),null},Q.rh=function(){return null},Q.sh=function(){return this.rh(),!1},Q.th=function(){return!1},Q.uh=function(e){nI(this,e)},B(NX,`BasicNotifierImpl`,93),Y(100,93,Apt),Q.Vh=function(){return Dw(this)},Q.vh=function(e,t){return e},Q.wh=function(){throw k(new pg)},Q.xh=function(e){var t;return t=CB(L(lP(this.Ah(),this.Ch()),19)),this.Mh().Qh(this,t.n,t.f,e)},Q.yh=function(e,t){throw k(new pg)},Q.zh=function(e,t,n){return bW(this,e,t,n)},Q.Ah=function(){var e;return this.wh()&&(e=this.wh().Lk(),e)?e:this.fi()},Q.Bh=function(){return YH(this)},Q.Ch=function(){throw k(new pg)},Q.Dh=function(){var e,t=this.Xh().Mk();return!t&&this.wh().Rk(t=(Mb(),e=mCe(MW(this.Ah())),e==null?JBt:new uE(this,e))),t},Q.Eh=function(e,t){return e},Q.Fh=function(e){return e.nk()?e.Jj():iz(this.Ah(),e)},Q.Gh=function(){var e=this.wh();return e?e.Ok():null},Q.Hh=function(){return this.wh()?this.wh().Lk():null},Q.Ih=function(e,t,n){return uB(this,e,t,n)},Q.Jh=function(e){return mN(this,e)},Q.Kh=function(e,t){return OM(this,e,t)},Q.Lh=function(){var e=this.wh();return!!e&&e.Pk()},Q.Mh=function(){throw k(new pg)},Q.Nh=function(){return Lz(this)},Q.Oh=function(e,t,n,r){return oB(this,e,t,r)},Q.Ph=function(e,t,n){var r;return r=L(lP(this.Ah(),t),69),r.uk().xk(this,this.ei(),t-this.gi(),e,n)},Q.Qh=function(e,t,n,r){return DA(this,e,t,r)},Q.Rh=function(e,t,n){var r;return r=L(lP(this.Ah(),t),69),r.uk().yk(this,this.ei(),t-this.gi(),e,n)},Q.Sh=function(){return!!this.wh()&&!!this.wh().Nk()},Q.Th=function(e){return Zz(this,e)},Q.Uh=function(e){return UCe(this,e)},Q.Wh=function(e){return Fnt(this,e)},Q.Xh=function(){throw k(new pg)},Q.Yh=function(){return this.wh()?this.wh().Nk():null},Q.Zh=function(){return Lz(this)},Q.$h=function(e,t){TH(this,e,t)},Q._h=function(e){this.Xh().Qk(e)},Q.ai=function(e){this.Xh().Tk(e)},Q.bi=function(e){this.Xh().Sk(e)},Q.ci=function(e,t){var n,r,i,a=this.Gh();return a&&e&&(t=lB(a.Cl(),this,t),a.Gl(this)),r=this.Mh(),r&&((cW(this,this.Mh(),this.Ch()).Bb&Cq)==0?(t=(n=this.Ch(),n>=0?this.xh(t):this.Mh().Qh(this,-1-n,null,t)),t=this.zh(null,-1,t)):(i=r.Nh(),i&&(e?!a&&i.Gl(this):i.Fl(this)))),this.ai(e),t},Q.di=function(e){var t,n=this.Ah(),r,i,a=iz(n,e),o,s,c;if(t=this.gi(),a>=t)return L(e,69).uk().Bk(this,this.ei(),a-t);if(a<=-1)if(o=mG((hH(),p9),n,e),o){if(Fb(),L(o,69).vk()||(o=pj(FN(p9,o))),i=(r=this.Fh(o),L(r>=0?this.Ih(r,!0,!0):VH(this,o,!0),163)),c=o.Gk(),c>1||c==-1)return L(L(i,219).Ql(e,!1),78)}else throw k(new q_(PX+e.ve()+Dpt));else if(e.Hk())return r=this.Fh(e),L(r>=0?this.Ih(r,!1,!0):VH(this,e,!1),78);return s=new Pse(this,e),s},Q.ei=function(){return fMe(this)},Q.fi=function(){return(ck(),K7).S},Q.gi=function(){return lk(this.fi())},Q.hi=function(e){dH(this,e)},Q.Ib=function(){return rU(this)},B(LX,`BasicEObjectImpl`,100);var Zzt;Y(117,100,{109:1,94:1,93:1,57:1,114:1,52:1,100:1,117:1}),Q.ii=function(e){return pMe(this)[e]},Q.ji=function(e,t){hk(pMe(this),e,t)},Q.ki=function(e){hk(pMe(this),e,null)},Q.qh=function(){return L(uI(this,4),129)},Q.rh=function(){throw k(new pg)},Q.sh=function(){return(this.Db&4)!=0},Q.wh=function(){throw k(new pg)},Q.li=function(e){Nz(this,2,e)},Q.yh=function(e,t){this.Db=t<<16|this.Db&255,this.li(e)},Q.Ah=function(){return TA(this)},Q.Ch=function(){return this.Db>>16},Q.Dh=function(){var e,t;return Mb(),t=mCe(MW((e=L(uI(this,16),29),e||this.fi()))),t==null?JBt:new uE(this,t)},Q.th=function(){return(this.Db&1)==0},Q.Gh=function(){return L(uI(this,128),1999)},Q.Hh=function(){return L(uI(this,16),29)},Q.Lh=function(){return(this.Db&32)!=0},Q.Mh=function(){return L(uI(this,2),52)},Q.Sh=function(){return(this.Db&64)!=0},Q.Xh=function(){throw k(new pg)},Q.Yh=function(){return L(uI(this,64),290)},Q._h=function(e){Nz(this,16,e)},Q.ai=function(e){Nz(this,128,e)},Q.bi=function(e){Nz(this,64,e)},Q.ei=function(){return Mz(this)},Q.Db=0,B(LX,`MinimalEObjectImpl`,117),Y(118,117,{109:1,94:1,93:1,57:1,114:1,52:1,100:1,117:1,118:1}),Q.li=function(e){this.Cb=e},Q.Mh=function(){return this.Cb},B(LX,`MinimalEObjectImpl/Container`,118),Y(RX,118,{109:1,343:1,105:1,94:1,93:1,57:1,114:1,52:1,100:1,117:1,118:1}),Q.Ih=function(e,t,n){return UGe(this,e,t,n)},Q.Rh=function(e,t,n){return _Xe(this,e,t,n)},Q.Th=function(e){return XTe(this,e)},Q.$h=function(e,t){iRe(this,e,t)},Q.fi=function(){return FG(),Xzt},Q.hi=function(e){mLe(this,e)},Q.lf=function(){return BUe(this)},Q.fh=function(){return!this.o&&(this.o=new lN((FG(),d7),g7,this,0)),this.o},Q.mf=function(e){return QH(this,e)},Q.nf=function(e){return $M(this,e)},Q.of=function(e,t){return sB(this,e,t)},B(zX,`EMapPropertyHolderImpl`,RX),Y(559,118,{109:1,372:1,94:1,93:1,57:1,114:1,52:1,100:1,117:1,118:1},Xc),Q.Ih=function(e,t,n){switch(e){case 0:return this.a;case 1:return this.b}return uB(this,e,t,n)},Q.Th=function(e){switch(e){case 0:return this.a!=0;case 1:return this.b!=0}return Zz(this,e)},Q.$h=function(e,t){switch(e){case 0:MP(this,A(I(t)));return;case 1:NP(this,A(I(t)));return}TH(this,e,t)},Q.fi=function(){return FG(),Hzt},Q.hi=function(e){switch(e){case 0:MP(this,0);return;case 1:NP(this,0);return}dH(this,e)},Q.Ib=function(){var e;return this.Db&64?rU(this):(e=new YT(rU(this)),e.a+=` (x: `,my(e,this.a),e.a+=`, y: `,my(e,this.b),e.a+=`)`,e.a)},Q.a=0,Q.b=0,B(zX,`ElkBendPointImpl`,559),Y(727,RX,{109:1,343:1,174:1,105:1,94:1,93:1,57:1,114:1,52:1,100:1,117:1,118:1}),Q.Ih=function(e,t,n){return nBe(this,e,t,n)},Q.Ph=function(e,t,n){return RV(this,e,t,n)},Q.Rh=function(e,t,n){return AI(this,e,t,n)},Q.Th=function(e){return EIe(this,e)},Q.$h=function(e,t){Bqe(this,e,t)},Q.fi=function(){return FG(),Gzt},Q.hi=function(e){Fze(this,e)},Q.ih=function(){return this.k},Q.jh=function(){return axe(this)},Q.Ib=function(){return OR(this)},Q.k=null,B(zX,`ElkGraphElementImpl`,727),Y(728,727,{109:1,343:1,174:1,276:1,105:1,94:1,93:1,57:1,114:1,52:1,100:1,117:1,118:1}),Q.Ih=function(e,t,n){return cVe(this,e,t,n)},Q.Th=function(e){return OVe(this,e)},Q.$h=function(e,t){Vqe(this,e,t)},Q.fi=function(){return FG(),Yzt},Q.hi=function(e){JVe(this,e)},Q.kh=function(){return this.f},Q.lh=function(){return this.g},Q.mh=function(){return this.i},Q.nh=function(){return this.j},Q.oh=function(e,t){Iw(this,e,t)},Q.ph=function(e,t){Lw(this,e,t)},Q.Ib=function(){return rH(this)},Q.f=0,Q.g=0,Q.i=0,Q.j=0,B(zX,`ElkShapeImpl`,728),Y(729,728,{109:1,343:1,84:1,174:1,276:1,105:1,94:1,93:1,57:1,114:1,52:1,100:1,117:1,118:1}),Q.Ih=function(e,t,n){return LWe(this,e,t,n)},Q.Ph=function(e,t,n){return vqe(this,e,t,n)},Q.Rh=function(e,t,n){return yqe(this,e,t,n)},Q.Th=function(e){return QLe(this,e)},Q.$h=function(e,t){Y1e(this,e,t)},Q.fi=function(){return FG(),Uzt},Q.hi=function(e){tWe(this,e)},Q.gh=function(){return!this.d&&(this.d=new sD(i7,this,8,5)),this.d},Q.hh=function(){return!this.e&&(this.e=new sD(i7,this,7,4)),this.e},B(zX,`ElkConnectableShapeImpl`,729),Y(271,727,{109:1,343:1,85:1,174:1,271:1,105:1,94:1,93:1,57:1,114:1,52:1,100:1,117:1,118:1},Yc),Q.xh=function(e){return DKe(this,e)},Q.Ih=function(e,t,n){switch(e){case 3:return VA(this);case 4:return!this.b&&(this.b=new sD(r7,this,4,7)),this.b;case 5:return!this.c&&(this.c=new sD(r7,this,5,8)),this.c;case 6:return!this.a&&(this.a=new R(a7,this,6,6)),this.a;case 7:return $T(),!this.b&&(this.b=new sD(r7,this,4,7)),!(this.b.i<=1&&(!this.c&&(this.c=new sD(r7,this,5,8)),this.c.i<=1));case 8:return $T(),!!qH(this);case 9:return $T(),!!LH(this);case 10:return $T(),!this.b&&(this.b=new sD(r7,this,4,7)),this.b.i!=0&&(!this.c&&(this.c=new sD(r7,this,5,8)),this.c.i!=0)}return nBe(this,e,t,n)},Q.Ph=function(e,t,n){var r;switch(t){case 3:return this.Cb&&(n=(r=this.Db>>16,r>=0?DKe(this,n):this.Cb.Qh(this,-1-r,null,n))),zde(this,L(e,26),n);case 4:return!this.b&&(this.b=new sD(r7,this,4,7)),dz(this.b,e,n);case 5:return!this.c&&(this.c=new sD(r7,this,5,8)),dz(this.c,e,n);case 6:return!this.a&&(this.a=new R(a7,this,6,6)),dz(this.a,e,n)}return RV(this,e,t,n)},Q.Rh=function(e,t,n){switch(t){case 3:return zde(this,null,n);case 4:return!this.b&&(this.b=new sD(r7,this,4,7)),lB(this.b,e,n);case 5:return!this.c&&(this.c=new sD(r7,this,5,8)),lB(this.c,e,n);case 6:return!this.a&&(this.a=new R(a7,this,6,6)),lB(this.a,e,n)}return AI(this,e,t,n)},Q.Th=function(e){switch(e){case 3:return!!VA(this);case 4:return!!this.b&&this.b.i!=0;case 5:return!!this.c&&this.c.i!=0;case 6:return!!this.a&&this.a.i!=0;case 7:return!this.b&&(this.b=new sD(r7,this,4,7)),!(this.b.i<=1&&(!this.c&&(this.c=new sD(r7,this,5,8)),this.c.i<=1));case 8:return qH(this);case 9:return LH(this);case 10:return!this.b&&(this.b=new sD(r7,this,4,7)),this.b.i!=0&&(!this.c&&(this.c=new sD(r7,this,5,8)),this.c.i!=0)}return EIe(this,e)},Q.$h=function(e,t){switch(e){case 3:_U(this,L(t,26));return;case 4:!this.b&&(this.b=new sD(r7,this,4,7)),uG(this.b),!this.b&&(this.b=new sD(r7,this,4,7)),uk(this.b,L(t,18));return;case 5:!this.c&&(this.c=new sD(r7,this,5,8)),uG(this.c),!this.c&&(this.c=new sD(r7,this,5,8)),uk(this.c,L(t,18));return;case 6:!this.a&&(this.a=new R(a7,this,6,6)),uG(this.a),!this.a&&(this.a=new R(a7,this,6,6)),uk(this.a,L(t,18));return}Bqe(this,e,t)},Q.fi=function(){return FG(),Wzt},Q.hi=function(e){switch(e){case 3:_U(this,null);return;case 4:!this.b&&(this.b=new sD(r7,this,4,7)),uG(this.b);return;case 5:!this.c&&(this.c=new sD(r7,this,5,8)),uG(this.c);return;case 6:!this.a&&(this.a=new R(a7,this,6,6)),uG(this.a);return}Fze(this,e)},Q.Ib=function(){return Q9e(this)},B(zX,`ElkEdgeImpl`,271),Y(443,RX,{109:1,343:1,170:1,443:1,105:1,94:1,93:1,57:1,114:1,52:1,100:1,117:1,118:1},Zc),Q.xh=function(e){return xKe(this,e)},Q.Ih=function(e,t,n){switch(e){case 1:return this.j;case 2:return this.k;case 3:return this.b;case 4:return this.c;case 5:return!this.a&&(this.a=new zT(e7,this,5)),this.a;case 6:return HCe(this);case 7:return t?SB(this):this.i;case 8:return t?xB(this):this.f;case 9:return!this.g&&(this.g=new sD(a7,this,9,10)),this.g;case 10:return!this.e&&(this.e=new sD(a7,this,10,9)),this.e;case 11:return this.d}return UGe(this,e,t,n)},Q.Ph=function(e,t,n){var r,i,a;switch(t){case 6:return this.Cb&&(n=(i=this.Db>>16,i>=0?xKe(this,n):this.Cb.Qh(this,-1-i,null,n))),Bde(this,L(e,85),n);case 9:return!this.g&&(this.g=new sD(a7,this,9,10)),dz(this.g,e,n);case 10:return!this.e&&(this.e=new sD(a7,this,10,9)),dz(this.e,e,n)}return a=L(lP((r=L(uI(this,16),29),r||(FG(),u7)),t),69),a.uk().xk(this,Mz(this),t-lk((FG(),u7)),e,n)},Q.Rh=function(e,t,n){switch(t){case 5:return!this.a&&(this.a=new zT(e7,this,5)),lB(this.a,e,n);case 6:return Bde(this,null,n);case 9:return!this.g&&(this.g=new sD(a7,this,9,10)),lB(this.g,e,n);case 10:return!this.e&&(this.e=new sD(a7,this,10,9)),lB(this.e,e,n)}return _Xe(this,e,t,n)},Q.Th=function(e){switch(e){case 1:return this.j!=0;case 2:return this.k!=0;case 3:return this.b!=0;case 4:return this.c!=0;case 5:return!!this.a&&this.a.i!=0;case 6:return!!HCe(this);case 7:return!!this.i;case 8:return!!this.f;case 9:return!!this.g&&this.g.i!=0;case 10:return!!this.e&&this.e.i!=0;case 11:return this.d!=null}return XTe(this,e)},Q.$h=function(e,t){switch(e){case 1:zP(this,A(I(t)));return;case 2:BP(this,A(I(t)));return;case 3:PP(this,A(I(t)));return;case 4:FP(this,A(I(t)));return;case 5:!this.a&&(this.a=new zT(e7,this,5)),uG(this.a),!this.a&&(this.a=new zT(e7,this,5)),uk(this.a,L(t,18));return;case 6:H2e(this,L(t,85));return;case 7:pF(this,L(t,84));return;case 8:fF(this,L(t,84));return;case 9:!this.g&&(this.g=new sD(a7,this,9,10)),uG(this.g),!this.g&&(this.g=new sD(a7,this,9,10)),uk(this.g,L(t,18));return;case 10:!this.e&&(this.e=new sD(a7,this,10,9)),uG(this.e),!this.e&&(this.e=new sD(a7,this,10,9)),uk(this.e,L(t,18));return;case 11:XPe(this,IE(t));return}iRe(this,e,t)},Q.fi=function(){return FG(),u7},Q.hi=function(e){switch(e){case 1:zP(this,0);return;case 2:BP(this,0);return;case 3:PP(this,0);return;case 4:FP(this,0);return;case 5:!this.a&&(this.a=new zT(e7,this,5)),uG(this.a);return;case 6:H2e(this,null);return;case 7:pF(this,null);return;case 8:fF(this,null);return;case 9:!this.g&&(this.g=new sD(a7,this,9,10)),uG(this.g);return;case 10:!this.e&&(this.e=new sD(a7,this,10,9)),uG(this.e);return;case 11:XPe(this,null);return}mLe(this,e)},Q.Ib=function(){return l1e(this)},Q.b=0,Q.c=0,Q.d=null,Q.j=0,Q.k=0,B(zX,`ElkEdgeSectionImpl`,443),Y(161,118,{109:1,94:1,93:1,158:1,57:1,114:1,52:1,100:1,161:1,117:1,118:1}),Q.Ih=function(e,t,n){var r;return e==0?(!this.Ab&&(this.Ab=new R(j7,this,0,3)),this.Ab):vN(this,e-lk(this.fi()),lP((r=L(uI(this,16),29),r||this.fi()),e),t,n)},Q.Ph=function(e,t,n){var r,i;return t==0?(!this.Ab&&(this.Ab=new R(j7,this,0,3)),dz(this.Ab,e,n)):(i=L(lP((r=L(uI(this,16),29),r||this.fi()),t),69),i.uk().xk(this,Mz(this),t-lk(this.fi()),e,n))},Q.Rh=function(e,t,n){var r,i;return t==0?(!this.Ab&&(this.Ab=new R(j7,this,0,3)),lB(this.Ab,e,n)):(i=L(lP((r=L(uI(this,16),29),r||this.fi()),t),69),i.uk().yk(this,Mz(this),t-lk(this.fi()),e,n))},Q.Th=function(e){var t;return e==0?!!this.Ab&&this.Ab.i!=0:Hj(this,e-lk(this.fi()),lP((t=L(uI(this,16),29),t||this.fi()),e))},Q.Wh=function(e){return Jrt(this,e)},Q.$h=function(e,t){var n;switch(e){case 0:!this.Ab&&(this.Ab=new R(j7,this,0,3)),uG(this.Ab),!this.Ab&&(this.Ab=new R(j7,this,0,3)),uk(this.Ab,L(t,18));return}UR(this,e-lk(this.fi()),lP((n=L(uI(this,16),29),n||this.fi()),e),t)},Q.ai=function(e){Nz(this,128,e)},Q.fi=function(){return qG(),LBt},Q.hi=function(e){var t;switch(e){case 0:!this.Ab&&(this.Ab=new R(j7,this,0,3)),uG(this.Ab);return}tR(this,e-lk(this.fi()),lP((t=L(uI(this,16),29),t||this.fi()),e))},Q.mi=function(){this.Bb|=1},Q.ni=function(e){return xW(this,e)},Q.Bb=0,B(LX,`EModelElementImpl`,161),Y(710,161,{109:1,94:1,93:1,469:1,158:1,57:1,114:1,52:1,100:1,161:1,117:1,118:1},xf),Q.oi=function(e,t){return _nt(this,e,t)},Q.pi=function(e){var t,n,r,i,a;if(this.a!=DP(e)||e.Bb&256)throw k(new q_(Mpt+e.zb+HX));for(r=wA(e);Qj(r.a).i!=0;){if(n=L(_G(r,0,(t=L(W(Qj(r.a),0),87),a=t.c,F(a,88)?L(a,29):(qG(),t9))),29),UB(n))return i=DP(n).ti().pi(n),L(i,52)._h(e),i;r=wA(n)}return(e.D==null?e.B:e.D)==`java.util.Map$Entry`?new a_e(e):new wge(e)},Q.qi=function(e,t){return IG(this,e,t)},Q.Ih=function(e,t,n){var r;switch(e){case 0:return!this.Ab&&(this.Ab=new R(j7,this,0,3)),this.Ab;case 1:return this.a}return vN(this,e-lk((qG(),Q7)),lP((r=L(uI(this,16),29),r||Q7),e),t,n)},Q.Ph=function(e,t,n){var r,i;switch(t){case 0:return!this.Ab&&(this.Ab=new R(j7,this,0,3)),dz(this.Ab,e,n);case 1:return this.a&&(n=L(this.a,52).Qh(this,4,c7,n)),Sze(this,L(e,241),n)}return i=L(lP((r=L(uI(this,16),29),r||(qG(),Q7)),t),69),i.uk().xk(this,Mz(this),t-lk((qG(),Q7)),e,n)},Q.Rh=function(e,t,n){var r,i;switch(t){case 0:return!this.Ab&&(this.Ab=new R(j7,this,0,3)),lB(this.Ab,e,n);case 1:return Sze(this,null,n)}return i=L(lP((r=L(uI(this,16),29),r||(qG(),Q7)),t),69),i.uk().yk(this,Mz(this),t-lk((qG(),Q7)),e,n)},Q.Th=function(e){var t;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return!!this.a}return Hj(this,e-lk((qG(),Q7)),lP((t=L(uI(this,16),29),t||Q7),e))},Q.$h=function(e,t){var n;switch(e){case 0:!this.Ab&&(this.Ab=new R(j7,this,0,3)),uG(this.Ab),!this.Ab&&(this.Ab=new R(j7,this,0,3)),uk(this.Ab,L(t,18));return;case 1:nXe(this,L(t,241));return}UR(this,e-lk((qG(),Q7)),lP((n=L(uI(this,16),29),n||Q7),e),t)},Q.fi=function(){return qG(),Q7},Q.hi=function(e){var t;switch(e){case 0:!this.Ab&&(this.Ab=new R(j7,this,0,3)),uG(this.Ab);return;case 1:nXe(this,null);return}tR(this,e-lk((qG(),Q7)),lP((t=L(uI(this,16),29),t||Q7),e))};var h7,Qzt,$zt;B(LX,`EFactoryImpl`,710),Y(1019,710,{109:1,2078:1,94:1,93:1,469:1,158:1,57:1,114:1,52:1,100:1,161:1,117:1,118:1},Qc),Q.oi=function(e,t){switch(e.fk()){case 12:return L(t,147).Og();case 13:return WR(t);default:throw k(new q_(VX+e.ve()+HX))}},Q.pi=function(e){var t,n,r,i,a,o,s,c;switch(e.G==-1&&(e.G=(t=DP(e),t?gB(t.si(),e):-1)),e.G){case 4:return a=new $c,a;case 6:return o=new e_,o;case 7:return s=new t_,s;case 8:return r=new Yc,r;case 9:return n=new Xc,n;case 10:return i=new Zc,i;case 11:return c=new el,c;default:throw k(new q_(Mpt+e.zb+HX))}},Q.qi=function(e,t){switch(e.fk()){case 13:case 12:return null;default:throw k(new q_(VX+e.ve()+HX))}},B(zX,`ElkGraphFactoryImpl`,1019),Y(439,161,{109:1,94:1,93:1,158:1,197:1,57:1,114:1,52:1,100:1,161:1,117:1,118:1}),Q.Dh=function(){var e,t=(e=L(uI(this,16),29),mCe(MW(e||this.fi())));return t==null?(Mb(),Mb(),JBt):new Zue(this,t)},Q.Ih=function(e,t,n){var r;switch(e){case 0:return!this.Ab&&(this.Ab=new R(j7,this,0,3)),this.Ab;case 1:return this.ve()}return vN(this,e-lk(this.fi()),lP((r=L(uI(this,16),29),r||this.fi()),e),t,n)},Q.Th=function(e){var t;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null}return Hj(this,e-lk(this.fi()),lP((t=L(uI(this,16),29),t||this.fi()),e))},Q.$h=function(e,t){var n;switch(e){case 0:!this.Ab&&(this.Ab=new R(j7,this,0,3)),uG(this.Ab),!this.Ab&&(this.Ab=new R(j7,this,0,3)),uk(this.Ab,L(t,18));return;case 1:this.ri(IE(t));return}UR(this,e-lk(this.fi()),lP((n=L(uI(this,16),29),n||this.fi()),e),t)},Q.fi=function(){return qG(),RBt},Q.hi=function(e){var t;switch(e){case 0:!this.Ab&&(this.Ab=new R(j7,this,0,3)),uG(this.Ab);return;case 1:this.ri(null);return}tR(this,e-lk(this.fi()),lP((t=L(uI(this,16),29),t||this.fi()),e))},Q.ve=function(){return this.zb},Q.ri=function(e){AF(this,e)},Q.Ib=function(){return YL(this)},Q.zb=null,B(LX,`ENamedElementImpl`,439),Y(184,439,{109:1,94:1,93:1,158:1,197:1,57:1,241:1,114:1,52:1,100:1,161:1,184:1,117:1,118:1,680:1},hSe),Q.xh=function(e){return TKe(this,e)},Q.Ih=function(e,t,n){var r;switch(e){case 0:return!this.Ab&&(this.Ab=new R(j7,this,0,3)),this.Ab;case 1:return this.zb;case 2:return this.yb;case 3:return this.xb;case 4:return this.sb;case 5:return!this.rb&&(this.rb=new LO(this,F7,this)),this.rb;case 6:return!this.vb&&(this.vb=new aD(c7,this,6,7)),this.vb;case 7:return t?this.Db>>16==7?L(this.Cb,241):null:rwe(this)}return vN(this,e-lk((qG(),r9)),lP((r=L(uI(this,16),29),r||r9),e),t,n)},Q.Ph=function(e,t,n){var r,i,a;switch(t){case 0:return!this.Ab&&(this.Ab=new R(j7,this,0,3)),dz(this.Ab,e,n);case 4:return this.sb&&(n=L(this.sb,52).Qh(this,1,s7,n)),Kze(this,L(e,469),n);case 5:return!this.rb&&(this.rb=new LO(this,F7,this)),dz(this.rb,e,n);case 6:return!this.vb&&(this.vb=new aD(c7,this,6,7)),dz(this.vb,e,n);case 7:return this.Cb&&(n=(i=this.Db>>16,i>=0?TKe(this,n):this.Cb.Qh(this,-1-i,null,n))),bW(this,e,7,n)}return a=L(lP((r=L(uI(this,16),29),r||(qG(),r9)),t),69),a.uk().xk(this,Mz(this),t-lk((qG(),r9)),e,n)},Q.Rh=function(e,t,n){var r,i;switch(t){case 0:return!this.Ab&&(this.Ab=new R(j7,this,0,3)),lB(this.Ab,e,n);case 4:return Kze(this,null,n);case 5:return!this.rb&&(this.rb=new LO(this,F7,this)),lB(this.rb,e,n);case 6:return!this.vb&&(this.vb=new aD(c7,this,6,7)),lB(this.vb,e,n);case 7:return bW(this,null,7,n)}return i=L(lP((r=L(uI(this,16),29),r||(qG(),r9)),t),69),i.uk().yk(this,Mz(this),t-lk((qG(),r9)),e,n)},Q.Th=function(e){var t;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.yb!=null;case 3:return this.xb!=null;case 4:return!!this.sb;case 5:return!!this.rb&&this.rb.i!=0;case 6:return!!this.vb&&this.vb.i!=0;case 7:return!!rwe(this)}return Hj(this,e-lk((qG(),r9)),lP((t=L(uI(this,16),29),t||r9),e))},Q.Wh=function(e){return C4e(this,e)||Jrt(this,e)},Q.$h=function(e,t){var n;switch(e){case 0:!this.Ab&&(this.Ab=new R(j7,this,0,3)),uG(this.Ab),!this.Ab&&(this.Ab=new R(j7,this,0,3)),uk(this.Ab,L(t,18));return;case 1:AF(this,IE(t));return;case 2:PF(this,IE(t));return;case 3:NF(this,IE(t));return;case 4:eH(this,L(t,469));return;case 5:!this.rb&&(this.rb=new LO(this,F7,this)),uG(this.rb),!this.rb&&(this.rb=new LO(this,F7,this)),uk(this.rb,L(t,18));return;case 6:!this.vb&&(this.vb=new aD(c7,this,6,7)),uG(this.vb),!this.vb&&(this.vb=new aD(c7,this,6,7)),uk(this.vb,L(t,18));return}UR(this,e-lk((qG(),r9)),lP((n=L(uI(this,16),29),n||r9),e),t)},Q.bi=function(e){var t,n;if(e&&this.rb)for(n=new UT(this.rb);n.e!=n.i.gc();)t=$z(n),F(t,360)&&(L(t,360).w=null);Nz(this,64,e)},Q.fi=function(){return qG(),r9},Q.hi=function(e){var t;switch(e){case 0:!this.Ab&&(this.Ab=new R(j7,this,0,3)),uG(this.Ab);return;case 1:AF(this,null);return;case 2:PF(this,null);return;case 3:NF(this,null);return;case 4:eH(this,null);return;case 5:!this.rb&&(this.rb=new LO(this,F7,this)),uG(this.rb);return;case 6:!this.vb&&(this.vb=new aD(c7,this,6,7)),uG(this.vb);return}tR(this,e-lk((qG(),r9)),lP((t=L(uI(this,16),29),t||r9),e))},Q.mi=function(){YB(this)},Q.si=function(){return!this.rb&&(this.rb=new LO(this,F7,this)),this.rb},Q.ti=function(){return this.sb},Q.ui=function(){return this.ub},Q.vi=function(){return this.xb},Q.wi=function(){return this.yb},Q.xi=function(e){this.ub=e},Q.Ib=function(){var e;return this.Db&64?YL(this):(e=new YT(YL(this)),e.a+=` (nsURI: `,BC(e,this.yb),e.a+=`, nsPrefix: `,BC(e,this.xb),e.a+=`)`,e.a)},Q.xb=null,Q.yb=null;var eBt;B(LX,`EPackageImpl`,184),Y(556,184,{109:1,2080:1,556:1,94:1,93:1,158:1,197:1,57:1,241:1,114:1,52:1,100:1,161:1,184:1,117:1,118:1,680:1},A1e),Q.q=!1,Q.r=!1;var tBt=!1;B(zX,`ElkGraphPackageImpl`,556),Y(362,728,{109:1,343:1,174:1,157:1,276:1,362:1,105:1,94:1,93:1,57:1,114:1,52:1,100:1,117:1,118:1},$c),Q.xh=function(e){return SKe(this,e)},Q.Ih=function(e,t,n){switch(e){case 7:return iwe(this);case 8:return this.a}return cVe(this,e,t,n)},Q.Ph=function(e,t,n){var r;switch(t){case 7:return this.Cb&&(n=(r=this.Db>>16,r>=0?SKe(this,n):this.Cb.Qh(this,-1-r,null,n))),ive(this,L(e,174),n)}return RV(this,e,t,n)},Q.Rh=function(e,t,n){return t==7?ive(this,null,n):AI(this,e,t,n)},Q.Th=function(e){switch(e){case 7:return!!iwe(this);case 8:return!lD(``,this.a)}return OVe(this,e)},Q.$h=function(e,t){switch(e){case 7:x4e(this,L(t,174));return;case 8:HPe(this,IE(t));return}Vqe(this,e,t)},Q.fi=function(){return FG(),Kzt},Q.hi=function(e){switch(e){case 7:x4e(this,null);return;case 8:HPe(this,``);return}JVe(this,e)},Q.Ib=function(){return pZe(this)},Q.a=``,B(zX,`ElkLabelImpl`,362),Y(206,729,{109:1,343:1,84:1,174:1,26:1,276:1,206:1,105:1,94:1,93:1,57:1,114:1,52:1,100:1,117:1,118:1},e_),Q.xh=function(e){return VKe(this,e)},Q.Ih=function(e,t,n){switch(e){case 9:return!this.c&&(this.c=new R(m7,this,9,9)),this.c;case 10:return!this.a&&(this.a=new R(p7,this,10,11)),this.a;case 11:return GA(this);case 12:return!this.b&&(this.b=new R(i7,this,12,3)),this.b;case 13:return $T(),!this.a&&(this.a=new R(p7,this,10,11)),this.a.i>0}return LWe(this,e,t,n)},Q.Ph=function(e,t,n){var r;switch(t){case 9:return!this.c&&(this.c=new R(m7,this,9,9)),dz(this.c,e,n);case 10:return!this.a&&(this.a=new R(p7,this,10,11)),dz(this.a,e,n);case 11:return this.Cb&&(n=(r=this.Db>>16,r>=0?VKe(this,n):this.Cb.Qh(this,-1-r,null,n))),Sfe(this,L(e,26),n);case 12:return!this.b&&(this.b=new R(i7,this,12,3)),dz(this.b,e,n)}return vqe(this,e,t,n)},Q.Rh=function(e,t,n){switch(t){case 9:return!this.c&&(this.c=new R(m7,this,9,9)),lB(this.c,e,n);case 10:return!this.a&&(this.a=new R(p7,this,10,11)),lB(this.a,e,n);case 11:return Sfe(this,null,n);case 12:return!this.b&&(this.b=new R(i7,this,12,3)),lB(this.b,e,n)}return yqe(this,e,t,n)},Q.Th=function(e){switch(e){case 9:return!!this.c&&this.c.i!=0;case 10:return!!this.a&&this.a.i!=0;case 11:return!!GA(this);case 12:return!!this.b&&this.b.i!=0;case 13:return!this.a&&(this.a=new R(p7,this,10,11)),this.a.i>0}return QLe(this,e)},Q.$h=function(e,t){switch(e){case 9:!this.c&&(this.c=new R(m7,this,9,9)),uG(this.c),!this.c&&(this.c=new R(m7,this,9,9)),uk(this.c,L(t,18));return;case 10:!this.a&&(this.a=new R(p7,this,10,11)),uG(this.a),!this.a&&(this.a=new R(p7,this,10,11)),uk(this.a,L(t,18));return;case 11:bU(this,L(t,26));return;case 12:!this.b&&(this.b=new R(i7,this,12,3)),uG(this.b),!this.b&&(this.b=new R(i7,this,12,3)),uk(this.b,L(t,18));return}Y1e(this,e,t)},Q.fi=function(){return FG(),qzt},Q.hi=function(e){switch(e){case 9:!this.c&&(this.c=new R(m7,this,9,9)),uG(this.c);return;case 10:!this.a&&(this.a=new R(p7,this,10,11)),uG(this.a);return;case 11:bU(this,null);return;case 12:!this.b&&(this.b=new R(i7,this,12,3)),uG(this.b);return}tWe(this,e)},Q.Ib=function(){return m8e(this)},B(zX,`ElkNodeImpl`,206),Y(193,729,{109:1,343:1,84:1,174:1,125:1,276:1,193:1,105:1,94:1,93:1,57:1,114:1,52:1,100:1,117:1,118:1},t_),Q.xh=function(e){return CKe(this,e)},Q.Ih=function(e,t,n){return e==9?HA(this):LWe(this,e,t,n)},Q.Ph=function(e,t,n){var r;switch(t){case 9:return this.Cb&&(n=(r=this.Db>>16,r>=0?CKe(this,n):this.Cb.Qh(this,-1-r,null,n))),Vde(this,L(e,26),n)}return vqe(this,e,t,n)},Q.Rh=function(e,t,n){return t==9?Vde(this,null,n):yqe(this,e,t,n)},Q.Th=function(e){return e==9?!!HA(this):QLe(this,e)},Q.$h=function(e,t){switch(e){case 9:U2e(this,L(t,26));return}Y1e(this,e,t)},Q.fi=function(){return FG(),Jzt},Q.hi=function(e){switch(e){case 9:U2e(this,null);return}tWe(this,e)},Q.Ib=function(){return h8e(this)},B(zX,`ElkPortImpl`,193);var nBt=$D(qX,`BasicEMap/Entry`);Y(1092,118,{109:1,45:1,94:1,93:1,136:1,57:1,114:1,52:1,100:1,117:1,118:1},el),Q.Fb=function(e){return this===e},Q.jd=function(){return this.b},Q.Hb=function(){return iE(this)},Q.Ai=function(e){UPe(this,L(e,147))},Q.Ih=function(e,t,n){switch(e){case 0:return this.b;case 1:return this.c}return uB(this,e,t,n)},Q.Th=function(e){switch(e){case 0:return!!this.b;case 1:return this.c!=null}return Zz(this,e)},Q.$h=function(e,t){switch(e){case 0:UPe(this,L(t,147));return;case 1:zPe(this,t);return}TH(this,e,t)},Q.fi=function(){return FG(),d7},Q.hi=function(e){switch(e){case 0:UPe(this,null);return;case 1:zPe(this,null);return}dH(this,e)},Q.yi=function(){var e;return this.a==-1&&(e=this.b,this.a=e?OF(e):0),this.a},Q.kd=function(){return this.c},Q.zi=function(e){this.a=e},Q.ld=function(e){var t=this.c;return zPe(this,e),t},Q.Ib=function(){var e;return this.Db&64?rU(this):(e=new xv,UC(UC(UC(e,this.b?this.b.Og():oK),Kst),JT(this.c)),e.a)},Q.a=-1,Q.c=null;var g7=B(zX,`ElkPropertyToValueMapEntryImpl`,1092);Y(981,1,{},tl),B(YX,`JsonAdapter`,981),Y(215,63,UK,sv),B(YX,`JsonImportException`,215),Y(851,1,{},m1e),B(YX,`JsonImporter`,851),Y(885,1,{},oC),Q.Bi=function(e){bqe(this.a,this.b,L(e,139))},B(YX,`JsonImporter/lambda$0$Type`,885),Y(886,1,{},sC),Q.Bi=function(e){y$e(this.a,this.b,L(e,139))},B(YX,`JsonImporter/lambda$1$Type`,886),Y(894,1,{},Cne),Q.Bi=function(e){uxe(this.a,L(e,149))},B(YX,`JsonImporter/lambda$10$Type`,894),Y(896,1,{},cC),Q.Bi=function(e){VQe(this.a,this.b,L(e,139))},B(YX,`JsonImporter/lambda$11$Type`,896),Y(897,1,{},lC),Q.Bi=function(e){HQe(this.a,this.b,L(e,139))},B(YX,`JsonImporter/lambda$12$Type`,897),Y(903,1,{},Bxe),Q.Bi=function(e){ZXe(this.a,this.b,this.c,this.d,L(e,139))},B(YX,`JsonImporter/lambda$13$Type`,903),Y(902,1,{},Vxe),Q.Bi=function(e){q5e(this.a,this.b,this.c,this.d,L(e,149))},B(YX,`JsonImporter/lambda$14$Type`,902),Y(898,1,{},uC),Q.Bi=function(e){Cfe(this.a,this.b,IE(e))},B(YX,`JsonImporter/lambda$15$Type`,898),Y(899,1,{},dC),Q.Bi=function(e){wfe(this.a,this.b,IE(e))},B(YX,`JsonImporter/lambda$16$Type`,899),Y(900,1,{},fC),Q.Bi=function(e){nKe(this.b,this.a,L(e,139))},B(YX,`JsonImporter/lambda$17$Type`,900),Y(901,1,{},pC),Q.Bi=function(e){rKe(this.b,this.a,L(e,139))},B(YX,`JsonImporter/lambda$18$Type`,901),Y(906,1,{},wne),Q.Bi=function(e){yXe(this.a,L(e,149))},B(YX,`JsonImporter/lambda$19$Type`,906),Y(887,1,{},Tne),Q.Bi=function(e){WKe(this.a,L(e,139))},B(YX,`JsonImporter/lambda$2$Type`,887),Y(904,1,{},Ene),Q.Bi=function(e){zP(this.a,A(I(e)))},B(YX,`JsonImporter/lambda$20$Type`,904),Y(905,1,{},Dne),Q.Bi=function(e){BP(this.a,A(I(e)))},B(YX,`JsonImporter/lambda$21$Type`,905),Y(909,1,{},One),Q.Bi=function(e){vXe(this.a,L(e,149))},B(YX,`JsonImporter/lambda$22$Type`,909),Y(907,1,{},kne),Q.Bi=function(e){PP(this.a,A(I(e)))},B(YX,`JsonImporter/lambda$23$Type`,907),Y(908,1,{},Ane),Q.Bi=function(e){FP(this.a,A(I(e)))},B(YX,`JsonImporter/lambda$24$Type`,908),Y(911,1,{},jne),Q.Bi=function(e){vJe(this.a,L(e,139))},B(YX,`JsonImporter/lambda$25$Type`,911),Y(910,1,{},Mne),Q.Bi=function(e){dxe(this.a,L(e,149))},B(YX,`JsonImporter/lambda$26$Type`,910),Y(912,1,SK,mC),Q.Ad=function(e){cje(this.b,this.a,IE(e))},B(YX,`JsonImporter/lambda$27$Type`,912),Y(913,1,SK,hC),Q.Ad=function(e){lje(this.b,this.a,IE(e))},B(YX,`JsonImporter/lambda$28$Type`,913),Y(914,1,{},kse),Q.Bi=function(e){l0e(this.a,this.b,L(e,139))},B(YX,`JsonImporter/lambda$29$Type`,914),Y(890,1,{},Sh),Q.Bi=function(e){UVe(this.a,L(e,149))},B(YX,`JsonImporter/lambda$3$Type`,890),Y(915,1,{},Ase),Q.Bi=function(e){A2e(this.a,this.b,L(e,139))},B(YX,`JsonImporter/lambda$30$Type`,915),Y(916,1,{},Ch),Q.Bi=function(e){hMe(this.a,I(e))},B(YX,`JsonImporter/lambda$31$Type`,916),Y(917,1,{},wh),Q.Bi=function(e){vMe(this.a,I(e))},B(YX,`JsonImporter/lambda$32$Type`,917),Y(918,1,{},Th),Q.Bi=function(e){gMe(this.a,I(e))},B(YX,`JsonImporter/lambda$33$Type`,918),Y(919,1,{},Eh),Q.Bi=function(e){_Me(this.a,I(e))},B(YX,`JsonImporter/lambda$34$Type`,919),Y(920,1,{},Nne),Q.Bi=function(e){XYe(this.a,L(e,57))},B(YX,`JsonImporter/lambda$35$Type`,920),Y(921,1,{},Pne),Q.Bi=function(e){ZYe(this.a,L(e,57))},B(YX,`JsonImporter/lambda$36$Type`,921),Y(925,1,{},zxe),B(YX,`JsonImporter/lambda$37$Type`,925),Y(922,1,SK,Nhe),Q.Ad=function(e){AFe(this.a,this.c,this.b,L(e,372))},B(YX,`JsonImporter/lambda$38$Type`,922),Y(923,1,SK,gC),Q.Ad=function(e){Use(this.a,this.b,L(e,170))},B(YX,`JsonImporter/lambda$39$Type`,923),Y(888,1,{},Fne),Q.Bi=function(e){zP(this.a,A(I(e)))},B(YX,`JsonImporter/lambda$4$Type`,888),Y(924,1,SK,jse),Q.Ad=function(e){MC(this.a,this.b,L(e,170))},B(YX,`JsonImporter/lambda$40$Type`,924),Y(926,1,SK,Phe),Q.Ad=function(e){jFe(this.a,this.b,this.c,L(e,8))},B(YX,`JsonImporter/lambda$41$Type`,926),Y(889,1,{},Ine),Q.Bi=function(e){BP(this.a,A(I(e)))},B(YX,`JsonImporter/lambda$5$Type`,889),Y(893,1,{},Lne),Q.Bi=function(e){WVe(this.a,L(e,149))},B(YX,`JsonImporter/lambda$6$Type`,893),Y(891,1,{},Rne),Q.Bi=function(e){PP(this.a,A(I(e)))},B(YX,`JsonImporter/lambda$7$Type`,891),Y(892,1,{},zne),Q.Bi=function(e){FP(this.a,A(I(e)))},B(YX,`JsonImporter/lambda$8$Type`,892),Y(895,1,{},Bne),Q.Bi=function(e){yJe(this.a,L(e,139))},B(YX,`JsonImporter/lambda$9$Type`,895),Y(945,1,SK,Vne),Q.Ad=function(e){vk(this.a,new yk(IE(e)))},B(YX,`JsonMetaDataConverter/lambda$0$Type`,945),Y(946,1,SK,Hne),Q.Ad=function(e){Lye(this.a,L(e,244))},B(YX,`JsonMetaDataConverter/lambda$1$Type`,946),Y(947,1,SK,Une),Q.Ad=function(e){zwe(this.a,L(e,144))},B(YX,`JsonMetaDataConverter/lambda$2$Type`,947),Y(948,1,SK,Wne),Q.Ad=function(e){Rye(this.a,L(e,160))},B(YX,`JsonMetaDataConverter/lambda$3$Type`,948),Y(244,24,{3:1,35:1,24:1,244:1},_C);var _7,v7,rBt,y7,b7,x7,iBt,aBt,S7=qP(rJ,`GraphFeature`,244,fQ,aNe,Yhe),oBt;Y(11,1,{35:1,147:1},Oh,$E,QC,Yw),Q.Dd=function(e){return mle(this,L(e,147))},Q.Fb=function(e){return BSe(this,e)},Q.Rg=function(){return Qz(this)},Q.Og=function(){return this.b},Q.Hb=function(){return sL(this.b)},Q.Ib=function(){return this.b},B(rJ,`Property`,11),Y(657,1,zq,Dh),Q.Le=function(e,t){return RBe(this,L(e,105),L(t,105))},Q.Fb=function(e){return this===e},Q.Me=function(){return new am(this)},B(rJ,`PropertyHolderComparator`,657),Y(698,1,dK,Kne),Q.Nb=function(e){KO(this,e)},Q.Pb=function(){return fje(this)},Q.Qb=function(){Yie()},Q.Ob=function(){return!!this.a},B(eZ,`ElkGraphUtil/AncestorIterator`,698);var sBt=$D(qX,`EList`);Y(71,56,{20:1,31:1,56:1,18:1,16:1,71:1,61:1}),Q._c=function(e,t){oR(this,e,t)},Q.Ec=function(e){return aN(this,e)},Q.ad=function(e,t){return SLe(this,e,t)},Q.Fc=function(e){return uk(this,e)},Q.Gi=function(){return new pE(this)},Q.Hi=function(){return new mE(this)},Q.Ii=function(e){return tF(this,e)},Q.Ji=function(){return!0},Q.Ki=function(e,t){},Q.Li=function(){},Q.Mi=function(e,t){QM(this,e,t)},Q.Ni=function(e,t,n){},Q.Oi=function(e,t){},Q.Pi=function(e,t,n){},Q.Fb=function(e){return S6e(this,e)},Q.Hb=function(){return tLe(this)},Q.Qi=function(){return!1},Q.Jc=function(){return new UT(this)},Q.cd=function(){return new fE(this)},Q.dd=function(e){var t=this.gc();if(e<0||e>t)throw k(new cD(e,t));return new bye(this,e)},Q.Si=function(e,t){this.Ri(e,this.bd(t))},Q.Kc=function(e){return qN(this,e)},Q.Ui=function(e,t){return t},Q.fd=function(e,t){return hB(this,e,t)},Q.Ib=function(){return SVe(this)},Q.Wi=function(){return!0},Q.Xi=function(e,t){return cL(this,t)},B(qX,`AbstractEList`,71),Y(67,71,rZ,nl,hP,XFe),Q.Ci=function(e,t){return zV(this,e,t)},Q.Di=function(e){return eGe(this,e)},Q.Ei=function(e,t){ZL(this,e,t)},Q.Fi=function(e){MM(this,e)},Q.Yi=function(e){return _je(this,e)},Q.$b=function(){jM(this)},Q.Gc=function(e){return hV(this,e)},Q.Xb=function(e){return W(this,e)},Q.Zi=function(e){var t,n,r;++this.j,n=this.g==null?0:this.g.length,e>n&&(r=this.g,t=n+(n/2|0)+4,t<e&&(t=e),this.g=this.$i(t),r!=null&&OW(r,0,this.g,0,this.i))},Q.bd=function(e){return uKe(this,e)},Q.dc=function(){return this.i==0},Q.Ri=function(e,t){return RH(this,e,t)},Q.$i=function(e){return U(sQ,aK,1,e,5,1)},Q.Ti=function(e){return this.g[e]},Q.ed=function(e){return $B(this,e)},Q.Vi=function(e,t){return KN(this,e,t)},Q.gc=function(){return this.i},Q.Nc=function(){return VDe(this)},Q.Oc=function(e){return ZVe(this,e)},Q.i=0;var cBt=B(qX,`BasicEList`,67),lBt=$D(qX,`TreeIterator`);Y(697,67,lmt),Q.Nb=function(e){KO(this,e)},Q.Ob=function(){return this.g==null&&!this.c?$Ce(this):this.g==null||this.i!=0&&L(this.g[this.i-1],50).Ob()},Q.Pb=function(){return sU(this)},Q.Qb=function(){if(!this.e)throw k(new J_(`There is no valid object to remove.`));this.e.Qb()},Q.c=!1,B(qX,`AbstractTreeIterator`,697),Y(605,697,lmt,Vw),Q._i=function(e){var t=L(e,57).Dh().Jc();return F(t,287)&&L(t,287).ul(new rl),t},B(eZ,`ElkGraphUtil/PropertiesSkippingTreeIterator`,605),Y(949,1,{},rl),B(eZ,`ElkGraphUtil/PropertiesSkippingTreeIterator/1`,949);var C7,uBt,w7=B(eZ,`ElkReflect`,null);Y(883,1,bX,il),Q.Qg=function(e){return ej(),ATe(L(e,182))},B(eZ,`ElkReflect/lambda$0$Type`,883);var T7;$D(qX,`ResourceLocator`),Y(1046,1,{}),B(qX,`DelegatingResourceLocator`,1046),Y(1047,1046,{}),B(`org.eclipse.emf.common`,`EMFPlugin`,1047);var dBt=$D(Wmt,`Adapter`),fBt=$D(Wmt,`Notification`);Y(1144,1,Gmt),Q.aj=function(){return this.d},Q.bj=function(e){},Q.cj=function(e){this.d=e},Q.dj=function(e){this.d==e&&(this.d=null)},Q.d=null,B(NX,`AdapterImpl`,1144),Y(2058,71,Kmt),Q.Ci=function(e,t){return BVe(this,e,t)},Q.Di=function(e){var t,n,r;if(++this.j,e.dc())return!1;for(t=this.Cj(),r=e.Jc();r.Ob();)n=r.Pb(),this.pj(this.Xi(t,n)),++t;return!0},Q.Ei=function(e,t){Hde(this,e,t)},Q.Fi=function(e){mbe(this,e)},Q.nj=function(){return this.qj()},Q.$b=function(){HE(this,this.Cj(),this.Dj())},Q.Gc=function(e){return this.sj(e)},Q.Hc=function(e){return this.tj(e)},Q.oj=function(e,t){this.zj().Sm()},Q.pj=function(e){this.zj().Sm()},Q.qj=function(){return this.zj()},Q.rj=function(){this.zj().Sm()},Q.sj=function(e){return this.zj().Sm()},Q.tj=function(e){return this.zj().Sm()},Q.uj=function(e){return this.zj().Sm()},Q.vj=function(e){return this.zj().Sm()},Q.wj=function(){return this.zj().Sm()},Q.xj=function(e){return this.zj().Sm()},Q.yj=function(){return this.zj().Sm()},Q.Aj=function(e){return this.zj().Sm()},Q.Bj=function(e,t){return this.zj().Sm()},Q.Cj=function(){return this.zj().Sm()},Q.Dj=function(){return this.zj().Sm()},Q.Ej=function(e){return this.zj().Sm()},Q.Fj=function(){return this.zj().Sm()},Q.Fb=function(e){return this.uj(e)},Q.Xb=function(e){return this.Ui(e,this.vj(e))},Q.Hb=function(){return this.wj()},Q.bd=function(e){return this.xj(e)},Q.dc=function(){return this.yj()},Q.Ri=function(e,t){return $Ye(this,e,t)},Q.Ti=function(e){return this.vj(e)},Q.ed=function(e){return JD(this,e)},Q.Kc=function(e){var t=this.bd(e);return t>=0?(this.ed(t),!0):!1},Q.Vi=function(e,t){return this.Bj(e,this.Xi(e,t))},Q.gc=function(){return this.Cj()},Q.Nc=function(){return this.Dj()},Q.Oc=function(e){return this.Ej(e)},Q.Ib=function(){return this.Fj()},B(qX,`DelegatingEList`,2058),Y(2059,2058,Kmt),Q.Ci=function(e,t){return g7e(this,e,t)},Q.Di=function(e){return this.Ci(this.Cj(),e)},Q.Ei=function(e,t){j1e(this,e,t)},Q.Fi=function(e){a1e(this,e)},Q.Ji=function(){return!this.Kj()},Q.$b=function(){dG(this)},Q.Gj=function(e,t,n,r,i){return new RSe(this,e,t,n,r,i)},Q.Hj=function(e){nI(this.hj(),e)},Q.Ij=function(){return null},Q.Jj=function(){return-1},Q.hj=function(){return null},Q.Kj=function(){return!1},Q.Lj=function(e,t){return t},Q.Mj=function(e,t){return t},Q.Nj=function(){return!1},Q.Oj=function(){return!this.yj()},Q.Ri=function(e,t){var n,r;return this.Nj()?(r=this.Oj(),n=$Ye(this,e,t),this.Hj(this.Gj(7,q(t),n,e,r)),n):$Ye(this,e,t)},Q.ed=function(e){var t,n,r,i;return this.Nj()?(n=null,r=this.Oj(),t=this.Gj(4,i=JD(this,e),null,e,r),this.Kj()&&i&&(n=this.Mj(i,n)),n?(n.lj(t),n.mj()):this.Hj(t),i):(i=JD(this,e),this.Kj()&&i&&(n=this.Mj(i,null),n&&n.mj()),i)},Q.Vi=function(e,t){return _7e(this,e,t)},B(NX,`DelegatingNotifyingListImpl`,2059),Y(151,1,uZ),Q.lj=function(e){return TJe(this,e)},Q.mj=function(){DN(this)},Q.ej=function(){return this.d},Q.Ij=function(){return null},Q.Pj=function(){return null},Q.fj=function(e){return-1},Q.gj=function(){return b3e(this)},Q.hj=function(){return null},Q.ij=function(){return x3e(this)},Q.jj=function(){return this.o<0?this.o<-2?-2-this.o-1:-1:this.o},Q.Qj=function(){return!1},Q.kj=function(e){var t,n,r,i,a,o,s,c,l,u,d;switch(this.d){case 1:case 2:switch(i=e.ej(),i){case 1:case 2:if(a=e.hj(),P(a)===P(this.hj())&&this.fj(null)==e.fj(null))return this.g=e.gj(),e.ej()==1&&(this.d=1),!0}case 4:switch(i=e.ej(),i){case 4:if(a=e.hj(),P(a)===P(this.hj())&&this.fj(null)==e.fj(null))return l=Ntt(this),c=this.o<0?this.o<-2?-2-this.o-1:-1:this.o,o=e.jj(),this.d=6,d=new hP(2),c<=o?(aN(d,this.n),aN(d,e.ij()),this.g=G(j(q9,1),cq,30,15,[this.o=c,o+1])):(aN(d,e.ij()),aN(d,this.n),this.g=G(j(q9,1),cq,30,15,[this.o=o,c])),this.n=d,l||(this.o=-2-this.o-1),!0;break}break;case 6:switch(i=e.ej(),i){case 4:if(a=e.hj(),P(a)===P(this.hj())&&this.fj(null)==e.fj(null)){for(l=Ntt(this),o=e.jj(),u=L(this.g,54),r=U(q9,cq,30,u.length+1,15,1),t=0;t<u.length&&(s=u[t],s<=o);)r[t++]=s,++o;for(n=L(this.n,16),n._c(t,e.ij()),r[t]=o;++t<r.length;)r[t]=u[t-1];return this.g=r,l||(this.o=-2-r[0]),!0}break}break}return!1},Q.Ib=function(){var e,t,n,r=new YT(vy(this.Pm)+`@`+(t=OF(this)>>>0,t.toString(16)));switch(r.a+=` (eventType: `,this.d){case 1:r.a+=`SET`;break;case 2:r.a+=`UNSET`;break;case 3:r.a+=`ADD`;break;case 5:r.a+=`ADD_MANY`;break;case 4:r.a+=`REMOVE`;break;case 6:r.a+=`REMOVE_MANY`;break;case 7:r.a+=`MOVE`;break;case 8:r.a+=`REMOVING_ADAPTER`;break;case 9:r.a+=`RESOLVE`;break;default:hy(r,this.d);break}if(M8e(this)&&(r.a+=`, touch: true`),r.a+=`, position: `,hy(r,this.o<0?this.o<-2?-2-this.o-1:-1:this.o),r.a+=`, notifier: `,zC(r,this.hj()),r.a+=`, feature: `,zC(r,this.Ij()),r.a+=`, oldValue: `,zC(r,x3e(this)),r.a+=`, newValue: `,this.d==6&&F(this.g,54)){for(n=L(this.g,54),r.a+=`[`,e=0;e<n.length;)r.a+=n[e],++e<n.length&&(r.a+=iK);r.a+=`]`}else zC(r,b3e(this));return r.a+=`, isTouch: `,gy(r,M8e(this)),r.a+=`, wasSet: `,gy(r,Ntt(this)),r.a+=`)`,r.a},Q.d=0,Q.e=0,Q.f=0,Q.j=0,Q.k=0,Q.o=0,Q.p=0,B(NX,`NotificationImpl`,151),Y(1158,151,uZ,RSe),Q.Ij=function(){return this.a.Ij()},Q.fj=function(e){return this.a.Jj()},Q.hj=function(){return this.a.hj()},B(NX,`DelegatingNotifyingListImpl/1`,1158),Y(252,67,rZ,al,oy),Q.Ec=function(e){return VVe(this,L(e,373))},Q.lj=function(e){return VVe(this,e)},Q.mj=function(){var e,t,n;for(e=0;e<this.i;++e)t=L(this.g[e],373),n=t.hj(),n!=null&&t.ej()!=-1&&L(n,94).uh(t)},Q.$i=function(e){return U(fBt,aK,373,e,0,1)},B(NX,`NotificationChainImpl`,252),Y(1486,93,Tpt),Q.rh=function(){return this.e},Q.th=function(){return(this.f&1)!=0},Q.f=1,B(NX,`NotifierImpl`,1486),Y(2056,67,rZ),Q.Ci=function(e,t){return DW(this,e,t)},Q.Di=function(e){return this.Ci(this.i,e)},Q.Ei=function(e,t){o1e(this,e,t)},Q.Fi=function(e){JH(this,e)},Q.Ji=function(){return!this.Kj()},Q.$b=function(){uG(this)},Q.Gj=function(e,t,n,r,i){return new zSe(this,e,t,n,r,i)},Q.Hj=function(e){nI(this.hj(),e)},Q.Ij=function(){return null},Q.Jj=function(){return-1},Q.hj=function(){return null},Q.Kj=function(){return!1},Q.Rj=function(){return!1},Q.Lj=function(e,t){return t},Q.Mj=function(e,t){return t},Q.Nj=function(){return!1},Q.Oj=function(){return this.i!=0},Q.Ri=function(e,t){return gR(this,e,t)},Q.ed=function(e){return zU(this,e)},Q.Vi=function(e,t){return _9e(this,e,t)},Q.Sj=function(e,t){return t},Q.Tj=function(e,t){return t},Q.Uj=function(e,t,n){return n},B(NX,`NotifyingListImpl`,2056),Y(1157,151,uZ,zSe),Q.Ij=function(){return this.a.Ij()},Q.fj=function(e){return this.a.Jj()},Q.hj=function(){return this.a.hj()},B(NX,`NotifyingListImpl/1`,1157),Y(950,67,rZ,Wde),Q.Gc=function(e){return this.i>10?((!this.b||this.c.j!=this.a)&&(this.b=new nO(this),this.a=this.j),Zy(this.b,e)):hV(this,e)},Q.Wi=function(){return!0},Q.a=0,B(qX,`AbstractEList/1`,950),Y(306,99,_q,cD),B(qX,`AbstractEList/BasicIndexOutOfBoundsException`,306),Y(42,1,dK,UT),Q.Nb=function(e){KO(this,e)},Q.Vj=function(){if(this.i.j!=this.f)throw k(new cg)},Q.Wj=function(){return $z(this)},Q.Ob=function(){return this.e!=this.i.gc()},Q.Pb=function(){return this.Wj()},Q.Qb=function(){xV(this)},Q.e=0,Q.f=0,Q.g=-1,B(qX,`AbstractEList/EIterator`,42),Y(286,42,_K,fE,bye),Q.Qb=function(){xV(this)},Q.Rb=function(e){fHe(this,e)},Q.Xj=function(){var e;try{return e=this.d.Xb(--this.e),this.Vj(),this.g=this.e,e}catch(e){throw e=PI(e),F(e,99)?(this.Vj(),k(new mg)):k(e)}},Q.Yj=function(e){uGe(this,e)},Q.Sb=function(){return this.e!=0},Q.Tb=function(){return this.e},Q.Ub=function(){return this.Xj()},Q.Vb=function(){return this.e-1},Q.Wb=function(e){this.Yj(e)},B(qX,`AbstractEList/EListIterator`,286),Y(355,42,dK,pE),Q.Wj=function(){return eB(this)},Q.Qb=function(){throw k(new pg)},B(qX,`AbstractEList/NonResolvingEIterator`,355),Y(391,286,_K,mE,npe),Q.Rb=function(e){throw k(new pg)},Q.Wj=function(){var e;try{return e=this.c.Ti(this.e),this.Vj(),this.g=this.e++,e}catch(e){throw e=PI(e),F(e,99)?(this.Vj(),k(new mg)):k(e)}},Q.Xj=function(){var e;try{return e=this.c.Ti(--this.e),this.Vj(),this.g=this.e,e}catch(e){throw e=PI(e),F(e,99)?(this.Vj(),k(new mg)):k(e)}},Q.Qb=function(){throw k(new pg)},Q.Wb=function(e){throw k(new pg)},B(qX,`AbstractEList/NonResolvingEListIterator`,391),Y(2045,71,Jmt),Q.Ci=function(e,t){var n,r,i=t.gc(),a,o,s,c,l,u,d,f;if(i!=0){for(l=L(uI(this.a,4),129),u=l==null?0:l.length,f=u+i,r=mL(this,f),d=u-e,d>0&&OW(l,e,r,e+i,d),c=t.Jc(),o=0;o<i;++o)s=c.Pb(),n=e+o,$w(r,n,cL(this,s));for(rB(this,r),a=0;a<i;++a)s=r[e],this.Ki(e,s),++e;return!0}else return++this.j,!1},Q.Di=function(e){var t,n,r=e.gc(),i,a,o,s,c,l;if(r!=0){for(c=(n=L(uI(this.a,4),129),n==null?0:n.length),l=c+r,t=mL(this,l),s=e.Jc(),a=c;a<l;++a)o=s.Pb(),$w(t,a,cL(this,o));for(rB(this,t),i=c;i<l;++i)o=t[i],this.Ki(i,o);return!0}else return++this.j,!1},Q.Ei=function(e,t){var n,r=L(uI(this.a,4),129),i=r==null?0:r.length,a;n=mL(this,i+1),a=cL(this,t),e!=i&&OW(r,e,n,e+1,i-e),hk(n,e,a),rB(this,n),this.Ki(e,t)},Q.Fi=function(e){var t,n,r=(n=L(uI(this.a,4),129),n==null?0:n.length);t=mL(this,r+1),$w(t,r,cL(this,e)),rB(this,t),this.Ki(r,e)},Q.Gi=function(){return new fke(this)},Q.Hi=function(){return new Xve(this)},Q.Ii=function(e){var t,n=(t=L(uI(this.a,4),129),t==null?0:t.length);if(e<0||e>n)throw k(new cD(e,n));return new Wbe(this,e)},Q.$b=function(){var e,t;++this.j,e=L(uI(this.a,4),129),t=e==null?0:e.length,rB(this,null),QM(this,t,e)},Q.Gc=function(e){var t=L(uI(this.a,4),129),n,r,i,a;if(t!=null){if(e!=null){for(r=t,i=0,a=r.length;i<a;++i)if(n=r[i],$L(e,n))return!0}else for(r=t,i=0,a=r.length;i<a;++i)if(n=r[i],P(n)===P(e))return!0}return!1},Q.Xb=function(e){var t=L(uI(this.a,4),129),n=t==null?0:t.length;if(e>=n)throw k(new cD(e,n));return t[e]},Q.bd=function(e){var t=L(uI(this.a,4),129),n,r;if(t!=null){if(e!=null){for(n=0,r=t.length;n<r;++n)if($L(e,t[n]))return n}else for(n=0,r=t.length;n<r;++n)if(P(t[n])===P(e))return n}return-1},Q.dc=function(){return L(uI(this.a,4),129)==null},Q.Jc=function(){return new dke(this)},Q.cd=function(){return new Yve(this)},Q.dd=function(e){var t,n=(t=L(uI(this.a,4),129),t==null?0:t.length);if(e<0||e>n)throw k(new cD(e,n));return new Ube(this,e)},Q.Ri=function(e,t){var n=EHe(this),r,i=n==null?0:n.length;if(e>=i)throw k(new V_(smt+e+nZ+i));if(t>=i)throw k(new V_(cmt+t+nZ+i));return r=n[t],e!=t&&(e<t?OW(n,e,n,e+1,t-e):OW(n,t+1,n,t,e-t),hk(n,e,r),rB(this,n)),r},Q.Ti=function(e){return L(uI(this.a,4),129)[e]},Q.ed=function(e){return J$e(this,e)},Q.Vi=function(e,t){var n=EHe(this),r=n[e];return $w(n,e,cL(this,t)),rB(this,n),r},Q.gc=function(){var e;return e=L(uI(this.a,4),129),e==null?0:e.length},Q.Nc=function(){var e=L(uI(this.a,4),129),t,n=e==null?0:e.length;return t=U(dBt,qmt,415,n,0,1),n>0&&OW(e,0,t,0,n),t},Q.Oc=function(e){var t=L(uI(this.a,4),129),n,r=t==null?0:t.length;return r>0&&(e.length<r&&(n=GP(hL(e).c,r),e=n),OW(t,0,e,0,r)),e.length>r&&hk(e,r,null),e};var pBt;B(qX,`ArrayDelegatingEList`,2045),Y(1033,42,dK,dke),Q.Vj=function(){if(this.b.j!=this.f||P(L(uI(this.b.a,4),129))!==P(this.a))throw k(new cg)},Q.Qb=function(){xV(this),this.a=L(uI(this.b.a,4),129)},B(qX,`ArrayDelegatingEList/EIterator`,1033),Y(712,286,_K,Yve,Ube),Q.Vj=function(){if(this.b.j!=this.f||P(L(uI(this.b.a,4),129))!==P(this.a))throw k(new cg)},Q.Yj=function(e){uGe(this,e),this.a=L(uI(this.b.a,4),129)},Q.Qb=function(){xV(this),this.a=L(uI(this.b.a,4),129)},B(qX,`ArrayDelegatingEList/EListIterator`,712),Y(1034,355,dK,fke),Q.Vj=function(){if(this.b.j!=this.f||P(L(uI(this.b.a,4),129))!==P(this.a))throw k(new cg)},B(qX,`ArrayDelegatingEList/NonResolvingEIterator`,1034),Y(713,391,_K,Xve,Wbe),Q.Vj=function(){if(this.b.j!=this.f||P(L(uI(this.b.a,4),129))!==P(this.a))throw k(new cg)},B(qX,`ArrayDelegatingEList/NonResolvingEListIterator`,713),Y(606,306,_q,$C),B(qX,`BasicEList/BasicIndexOutOfBoundsException`,606),Y(699,67,rZ,xC),Q._c=function(e,t){throw k(new pg)},Q.Ec=function(e){throw k(new pg)},Q.ad=function(e,t){throw k(new pg)},Q.Fc=function(e){throw k(new pg)},Q.$b=function(){throw k(new pg)},Q.Zi=function(e){throw k(new pg)},Q.Jc=function(){return this.Gi()},Q.cd=function(){return this.Hi()},Q.dd=function(e){return this.Ii(e)},Q.Ri=function(e,t){throw k(new pg)},Q.Si=function(e,t){throw k(new pg)},Q.ed=function(e){throw k(new pg)},Q.Kc=function(e){throw k(new pg)},Q.fd=function(e,t){throw k(new pg)},B(qX,`BasicEList/UnmodifiableEList`,699),Y(711,1,{3:1,20:1,18:1,16:1,61:1,587:1}),Q._c=function(e,t){Xce(this,e,L(t,45))},Q.Ec=function(e){return tde(this,L(e,45))},Q.Ic=function(e){mM(this,e)},Q.Xb=function(e){return L(W(this.c,e),136)},Q.Ri=function(e,t){return L(this.c.Ri(e,t),45)},Q.Si=function(e,t){Zce(this,e,L(t,45))},Q.ed=function(e){return L(this.c.ed(e),45)},Q.fd=function(e,t){return Pye(this,e,L(t,45))},Q.gd=function(e){FF(this,e)},Q.Lc=function(){return new cj(this,16)},Q.Mc=function(){return new rO(null,new cj(this,16))},Q.ad=function(e,t){return this.c.ad(e,t)},Q.Fc=function(e){return this.c.Fc(e)},Q.$b=function(){this.c.$b()},Q.Gc=function(e){return this.c.Gc(e)},Q.Hc=function(e){return NI(this.c,e)},Q.Zj=function(){var e,t,n;if(this.d==null){for(this.d=U(cBt,Ymt,67,2*this.f+1,0,1),n=this.e,this.f=0,t=this.c.Jc();t.e!=t.i.gc();)e=L(t.Wj(),136),wB(this,e);this.e=n}},Q.Fb=function(e){return mpe(this,e)},Q.Hb=function(){return tLe(this.c)},Q.bd=function(e){return this.c.bd(e)},Q.$j=function(){this.c=new qne(this)},Q.dc=function(){return this.f==0},Q.Jc=function(){return this.c.Jc()},Q.cd=function(){return this.c.cd()},Q.dd=function(e){return this.c.dd(e)},Q._j=function(){return XM(this)},Q.ak=function(e,t,n){return new Rhe(e,t,n)},Q.bk=function(){return new cl},Q.Kc=function(e){return fPe(this,e)},Q.gc=function(){return this.f},Q.hd=function(e,t){return new sj(this.c,e,t)},Q.Nc=function(){return this.c.Nc()},Q.Oc=function(e){return this.c.Oc(e)},Q.Ib=function(){return SVe(this.c)},Q.e=0,Q.f=0,B(qX,`BasicEMap`,711),Y(1028,67,rZ,qne),Q.Ki=function(e,t){yre(this,L(t,136))},Q.Ni=function(e,t,n){var r;++(r=this,L(t,136),r).a.e},Q.Oi=function(e,t){bre(this,L(t,136))},Q.Pi=function(e,t,n){yue(this,L(t,136),L(n,136))},Q.Mi=function(e,t){_Ie(this.a)},B(qX,`BasicEMap/1`,1028),Y(1029,67,rZ,cl),Q.$i=function(e){return U(mBt,Xmt,612,e,0,1)},B(qX,`BasicEMap/2`,1029),Y(1030,hK,gK,kh),Q.$b=function(){this.a.c.$b()},Q.Gc=function(e){return cz(this.a,e)},Q.Jc=function(){return this.a.f==0?(WE(),E7.a):new sy(this.a)},Q.Kc=function(e){var t=this.a.f;return Az(this.a,e),this.a.f!=t},Q.gc=function(){return this.a.f},B(qX,`BasicEMap/3`,1030),Y(1031,31,mK,Jne),Q.$b=function(){this.a.c.$b()},Q.Gc=function(e){return C6e(this.a,e)},Q.Jc=function(){return this.a.f==0?(WE(),E7.a):new Bie(this.a)},Q.gc=function(){return this.a.f},B(qX,`BasicEMap/4`,1031),Y(1032,hK,gK,Yne),Q.$b=function(){this.a.c.$b()},Q.Gc=function(e){var t,n,r,i,a,o,s,c,l;if(this.a.f>0&&F(e,45)&&(this.a.Zj(),c=L(e,45),s=c.jd(),i=s==null?0:OF(s),a=Qde(this.a,i),t=this.a.d[a],t)){for(n=L(t.g,374),l=t.i,o=0;o<l;++o)if(r=n[o],r.yi()==i&&r.Fb(c))return!0}return!1},Q.Jc=function(){return this.a.f==0?(WE(),E7.a):new Lxe(this.a)},Q.Kc=function(e){return G1e(this,e)},Q.gc=function(){return this.a.f},B(qX,`BasicEMap/5`,1032),Y(613,1,dK,Lxe),Q.Nb=function(e){KO(this,e)},Q.Ob=function(){return this.b!=-1},Q.Pb=function(){var e;if(this.f.e!=this.c)throw k(new cg);if(this.b==-1)throw k(new mg);return this.d=this.a,this.e=this.b,pqe(this),e=L(this.f.d[this.d].g[this.e],136),this.ck(e)},Q.Qb=function(){if(this.f.e!=this.c)throw k(new cg);if(this.e==-1)throw k(new dg);this.f.c.Kc(W(this.f.d[this.d],this.e)),this.c=this.f.e,this.e=-1,this.a==this.d&&this.b!=-1&&--this.b},Q.ck=function(e){return e},Q.a=0,Q.b=-1,Q.c=0,Q.d=0,Q.e=0,B(qX,`BasicEMap/BasicEMapIterator`,613),Y(1026,613,dK,sy),Q.ck=function(e){return e.jd()},B(qX,`BasicEMap/BasicEMapKeyIterator`,1026),Y(1027,613,dK,Bie),Q.ck=function(e){return e.kd()},B(qX,`BasicEMap/BasicEMapValueIterator`,1027),Y(1025,1,pK,Xne),Q.wc=function(e){ZF(this,e)},Q.$b=function(){this.a.c.$b()},Q._b=function(e){return Bse(this,e)},Q.uc=function(e){return C6e(this.a,e)},Q.vc=function(){return MAe(this.a)},Q.Fb=function(e){return mpe(this.a,e)},Q.xc=function(e){return fz(this.a,e)},Q.Hb=function(){return tLe(this.a.c)},Q.dc=function(){return this.a.f==0},Q.ec=function(){return NAe(this.a)},Q.yc=function(e,t){return mV(this.a,e,t)},Q.Ac=function(e){return Az(this.a,e)},Q.gc=function(){return this.a.f},Q.Ib=function(){return SVe(this.a.c)},Q.Bc=function(){return PAe(this.a)},B(qX,`BasicEMap/DelegatingMap`,1025),Y(612,1,{45:1,136:1,612:1},Rhe),Q.Fb=function(e){var t;return F(e,45)?(t=L(e,45),(this.b==null?P(this.b)===P(t.jd()):$L(this.b,t.jd()))&&(this.c==null?P(this.c)===P(t.kd()):$L(this.c,t.kd()))):!1},Q.yi=function(){return this.a},Q.jd=function(){return this.b},Q.kd=function(){return this.c},Q.Hb=function(){return this.a^(this.c==null?0:OF(this.c))},Q.zi=function(e){this.a=e},Q.Ai=function(e){throw k(new Yh)},Q.ld=function(e){var t=this.c;return this.c=e,t},Q.Ib=function(){return this.b+`->`+this.c},Q.a=0;var mBt=B(qX,`BasicEMap/EntryImpl`,612);Y(535,1,{},ol),B(qX,`BasicEMap/View`,535);var E7;Y(770,1,{}),Q.Fb=function(e){return X1e((oA(),IQ),e)},Q.Hb=function(){return YLe((oA(),IQ))},Q.Ib=function(){return ZV((oA(),IQ))},B(qX,`ECollections/BasicEmptyUnmodifiableEList`,770),Y(1303,1,_K,sl),Q.Nb=function(e){KO(this,e)},Q.Rb=function(e){throw k(new pg)},Q.Ob=function(){return!1},Q.Sb=function(){return!1},Q.Pb=function(){throw k(new mg)},Q.Tb=function(){return 0},Q.Ub=function(){throw k(new mg)},Q.Vb=function(){return-1},Q.Qb=function(){throw k(new pg)},Q.Wb=function(e){throw k(new pg)},B(qX,`ECollections/BasicEmptyUnmodifiableEList/1`,1303),Y(1301,770,{20:1,18:1,16:1,61:1},jre),Q._c=function(e,t){mae()},Q.Ec=function(e){return pae()},Q.ad=function(e,t){return hae()},Q.Fc=function(e){return gae()},Q.$b=function(){_ae()},Q.Gc=function(e){return!1},Q.Hc=function(e){return!1},Q.Ic=function(e){mM(this,e)},Q.Xb=function(e){return WC((oA(),e)),null},Q.bd=function(e){return-1},Q.dc=function(){return!0},Q.Jc=function(){return this.a},Q.cd=function(){return this.a},Q.dd=function(e){return this.a},Q.Ri=function(e,t){return vae()},Q.Si=function(e,t){Ay()},Q.ed=function(e){return yae()},Q.Kc=function(e){return bae()},Q.fd=function(e,t){return jy()},Q.gc=function(){return 0},Q.gd=function(e){FF(this,e)},Q.Lc=function(){return new cj(this,16)},Q.Mc=function(){return new rO(null,new cj(this,16))},Q.hd=function(e,t){return oA(),new sj(IQ,e,t)},Q.Nc=function(){return bve((oA(),IQ))},Q.Oc=function(e){return oA(),PB(IQ,e)},B(qX,`ECollections/EmptyUnmodifiableEList`,1301),Y(1302,770,{20:1,18:1,16:1,61:1,587:1},r_),Q._c=function(e,t){mae()},Q.Ec=function(e){return pae()},Q.ad=function(e,t){return hae()},Q.Fc=function(e){return gae()},Q.$b=function(){_ae()},Q.Gc=function(e){return!1},Q.Hc=function(e){return!1},Q.Ic=function(e){mM(this,e)},Q.Xb=function(e){return WC((oA(),e)),null},Q.bd=function(e){return-1},Q.dc=function(){return!0},Q.Jc=function(){return this.a},Q.cd=function(){return this.a},Q.dd=function(e){return this.a},Q.Ri=function(e,t){return vae()},Q.Si=function(e,t){Ay()},Q.ed=function(e){return yae()},Q.Kc=function(e){return bae()},Q.fd=function(e,t){return jy()},Q.gc=function(){return 0},Q.gd=function(e){FF(this,e)},Q.Lc=function(){return new cj(this,16)},Q.Mc=function(){return new rO(null,new cj(this,16))},Q.hd=function(e,t){return oA(),new sj(IQ,e,t)},Q.Nc=function(){return bve((oA(),IQ))},Q.Oc=function(e){return oA(),PB(IQ,e)},Q._j=function(){return oA(),oA(),LQ},B(qX,`ECollections/EmptyUnmodifiableEMap`,1302);var hBt=$D(qX,`Enumerator`),D7;Y(290,1,{290:1},JU),Q.Fb=function(e){var t;return this===e?!0:F(e,290)?(t=L(e,290),this.f==t.f&&B_e(this.i,t.i)&&z_e(this.a,this.f&256?t.f&256?t.a:null:t.f&256?null:t.a)&&z_e(this.d,t.d)&&z_e(this.g,t.g)&&z_e(this.e,t.e)&&ZUe(this,t)):!1},Q.Hb=function(){return this.f},Q.Ib=function(){return B5e(this)},Q.f=0;var gBt=0,_Bt=0,vBt=0,yBt=0,bBt=0,xBt=0,SBt=0,CBt=0,wBt=0,TBt,O7=0,k7=0,EBt=0,DBt=0,A7,OBt;B(qX,`URI`,290),Y(1091,44,Aq,Mre),Q.yc=function(e,t){return L(ZA(this,IE(e),L(t,290)),290)},B(qX,`URI/URICache`,1091),Y(492,67,rZ,ll,uO),Q.Qi=function(){return!0},B(qX,`UniqueEList`,492),Y(579,63,UK,BN),B(qX,`WrappedException`,579);var j7=$D(jX,$mt),M7=$D(jX,eht),N7=$D(jX,tht),P7=$D(jX,nht),F7=$D(jX,rht),I7=$D(jX,`EClass`),kBt=$D(jX,`EDataType`),ABt;Y(1199,44,Aq,i_),Q.xc=function(e){return DC(e)?NA(this,e):kC(_O(this.f,e))},B(jX,`EDataType/Internal/ConversionDelegate/Factory/Registry/Impl`,1199);var L7=$D(jX,`EEnum`),R7=$D(jX,iht),z7=$D(jX,aht),B7=$D(jX,oht),V7,H7=$D(jX,sht),U7=$D(jX,cht);Y(fZ,1,{},ul),Q.Ib=function(){return`NIL`},B(jX,`EStructuralFeature/Internal/DynamicValueHolder/1`,fZ);var jBt;Y(1023,44,Aq,a_),Q.xc=function(e){return DC(e)?NA(this,e):kC(_O(this.f,e))},B(jX,`EStructuralFeature/Internal/SettingDelegate/Factory/Registry/Impl`,1023);var W7=$D(jX,lht),G7=$D(jX,`EValidator/PatternMatcher`),MBt,NBt,K7,q7,J7,Y7,PBt,FBt,IBt,X7,Z7,Q7,$7,e9,LBt,RBt,t9,n9,zBt,r9,i9,a9,o9,BBt,VBt,s9,c9=$D(pZ,`FeatureMap/Entry`);Y(534,1,{75:1},bC),Q.Jk=function(){return this.a},Q.kd=function(){return this.b},B(LX,`BasicEObjectImpl/1`,534),Y(1022,1,uht,Pse),Q.Dk=function(e){return OM(this.a,this.b,e)},Q.Oj=function(){return UCe(this.a,this.b)},Q.Wb=function(e){jCe(this.a,this.b,e)},Q.Ek=function(){Mbe(this.a,this.b)},B(LX,`BasicEObjectImpl/4`,1022),Y(2046,1,{114:1}),Q.Kk=function(e){this.e=e==0?HBt:U(sQ,aK,1,e,5,1)},Q.ii=function(e){return this.e[e]},Q.ji=function(e,t){this.e[e]=t},Q.ki=function(e){this.e[e]=null},Q.Lk=function(){return this.c},Q.Mk=function(){throw k(new pg)},Q.Nk=function(){throw k(new pg)},Q.Ok=function(){return this.d},Q.Pk=function(){return this.e!=null},Q.Qk=function(e){this.c=e},Q.Rk=function(e){throw k(new pg)},Q.Sk=function(e){throw k(new pg)},Q.Tk=function(e){this.d=e};var HBt;B(LX,`BasicEObjectImpl/EPropertiesHolderBaseImpl`,2046),Y(192,2046,{114:1},Cf),Q.Mk=function(){return this.a},Q.Nk=function(){return this.b},Q.Rk=function(e){this.a=e},Q.Sk=function(e){this.b=e},B(LX,`BasicEObjectImpl/EPropertiesHolderImpl`,192),Y(502,100,Apt,dl),Q.rh=function(){return this.f},Q.wh=function(){return this.k},Q.yh=function(e,t){this.g=e,this.i=t},Q.Ah=function(){return this.j&2?this.Xh().Lk():this.fi()},Q.Ch=function(){return this.i},Q.th=function(){return(this.j&1)!=0},Q.Mh=function(){return this.g},Q.Sh=function(){return(this.j&4)!=0},Q.Xh=function(){return!this.k&&(this.k=new Cf),this.k},Q._h=function(e){this.Xh().Qk(e),e?this.j|=2:this.j&=-3},Q.bi=function(e){this.Xh().Sk(e),e?this.j|=4:this.j&=-5},Q.fi=function(){return(ck(),K7).S},Q.i=0,Q.j=1,B(LX,`EObjectImpl`,502),Y(786,502,{109:1,94:1,93:1,57:1,114:1,52:1,100:1},wge),Q.ii=function(e){return this.e[e]},Q.ji=function(e,t){this.e[e]=t},Q.ki=function(e){this.e[e]=null},Q.Ah=function(){return this.d},Q.Fh=function(e){return iz(this.d,e)},Q.Hh=function(){return this.d},Q.Lh=function(){return this.e!=null},Q.Xh=function(){return!this.k&&(this.k=new fl),this.k},Q._h=function(e){this.d=e},Q.ei=function(){var e;return this.e??=(e=lk(this.d),e==0?UBt:U(sQ,aK,1,e,5,1)),this},Q.gi=function(){return 0};var UBt;B(LX,`DynamicEObjectImpl`,786),Y(1484,786,{109:1,45:1,94:1,93:1,136:1,57:1,114:1,52:1,100:1},a_e),Q.Fb=function(e){return this===e},Q.Hb=function(){return iE(this)},Q._h=function(e){this.d=e,this.b=TU(e,`key`),this.c=TU(e,GX)},Q.yi=function(){var e;return this.a==-1&&(e=GN(this,this.b),this.a=e==null?0:OF(e)),this.a},Q.jd=function(){return GN(this,this.b)},Q.kd=function(){return GN(this,this.c)},Q.zi=function(e){this.a=e},Q.Ai=function(e){jCe(this,this.b,e)},Q.ld=function(e){var t=GN(this,this.c);return jCe(this,this.c,e),t},Q.a=0,B(LX,`DynamicEObjectImpl/BasicEMapEntry`,1484),Y(1485,1,{114:1},fl),Q.Kk=function(e){throw k(new pg)},Q.ii=function(e){throw k(new pg)},Q.ji=function(e,t){throw k(new pg)},Q.ki=function(e){throw k(new pg)},Q.Lk=function(){throw k(new pg)},Q.Mk=function(){return this.a},Q.Nk=function(){return this.b},Q.Ok=function(){return this.c},Q.Pk=function(){throw k(new pg)},Q.Qk=function(e){throw k(new pg)},Q.Rk=function(e){this.a=e},Q.Sk=function(e){this.b=e},Q.Tk=function(e){this.c=e},B(LX,`DynamicEObjectImpl/DynamicEPropertiesHolderImpl`,1485),Y(505,161,{109:1,94:1,93:1,588:1,158:1,57:1,114:1,52:1,100:1,505:1,161:1,117:1,118:1},pl),Q.xh=function(e){return EKe(this,e)},Q.Ih=function(e,t,n){var r;switch(e){case 0:return!this.Ab&&(this.Ab=new R(j7,this,0,3)),this.Ab;case 1:return this.d;case 2:return n?(!this.b&&(this.b=new jE((qG(),o9),d9,this)),this.b):(!this.b&&(this.b=new jE((qG(),o9),d9,this)),XM(this.b));case 3:return awe(this);case 4:return!this.a&&(this.a=new zT(Q5,this,4)),this.a;case 5:return!this.c&&(this.c=new VT(Q5,this,5)),this.c}return vN(this,e-lk((qG(),q7)),lP((r=L(uI(this,16),29),r||q7),e),t,n)},Q.Ph=function(e,t,n){var r,i,a;switch(t){case 0:return!this.Ab&&(this.Ab=new R(j7,this,0,3)),dz(this.Ab,e,n);case 3:return this.Cb&&(n=(i=this.Db>>16,i>=0?EKe(this,n):this.Cb.Qh(this,-1-i,null,n))),ave(this,L(e,158),n)}return a=L(lP((r=L(uI(this,16),29),r||(qG(),q7)),t),69),a.uk().xk(this,Mz(this),t-lk((qG(),q7)),e,n)},Q.Rh=function(e,t,n){var r,i;switch(t){case 0:return!this.Ab&&(this.Ab=new R(j7,this,0,3)),lB(this.Ab,e,n);case 2:return!this.b&&(this.b=new jE((qG(),o9),d9,this)),dD(this.b,e,n);case 3:return ave(this,null,n);case 4:return!this.a&&(this.a=new zT(Q5,this,4)),lB(this.a,e,n)}return i=L(lP((r=L(uI(this,16),29),r||(qG(),q7)),t),69),i.uk().yk(this,Mz(this),t-lk((qG(),q7)),e,n)},Q.Th=function(e){var t;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.d!=null;case 2:return!!this.b&&this.b.f!=0;case 3:return!!awe(this);case 4:return!!this.a&&this.a.i!=0;case 5:return!!this.c&&this.c.i!=0}return Hj(this,e-lk((qG(),q7)),lP((t=L(uI(this,16),29),t||q7),e))},Q.$h=function(e,t){var n;switch(e){case 0:!this.Ab&&(this.Ab=new R(j7,this,0,3)),uG(this.Ab),!this.Ab&&(this.Ab=new R(j7,this,0,3)),uk(this.Ab,L(t,18));return;case 1:__e(this,IE(t));return;case 2:!this.b&&(this.b=new jE((qG(),o9),d9,this)),XF(this.b,t);return;case 3:S4e(this,L(t,158));return;case 4:!this.a&&(this.a=new zT(Q5,this,4)),uG(this.a),!this.a&&(this.a=new zT(Q5,this,4)),uk(this.a,L(t,18));return;case 5:!this.c&&(this.c=new VT(Q5,this,5)),uG(this.c),!this.c&&(this.c=new VT(Q5,this,5)),uk(this.c,L(t,18));return}UR(this,e-lk((qG(),q7)),lP((n=L(uI(this,16),29),n||q7),e),t)},Q.fi=function(){return qG(),q7},Q.hi=function(e){var t;switch(e){case 0:!this.Ab&&(this.Ab=new R(j7,this,0,3)),uG(this.Ab);return;case 1:VPe(this,null);return;case 2:!this.b&&(this.b=new jE((qG(),o9),d9,this)),this.b.c.$b();return;case 3:S4e(this,null);return;case 4:!this.a&&(this.a=new zT(Q5,this,4)),uG(this.a);return;case 5:!this.c&&(this.c=new VT(Q5,this,5)),uG(this.c);return}tR(this,e-lk((qG(),q7)),lP((t=L(uI(this,16),29),t||q7),e))},Q.Ib=function(){return oBe(this)},Q.d=null,B(LX,`EAnnotationImpl`,505),Y(142,711,dht,lN),Q.Ei=function(e,t){Qw(this,e,L(t,45))},Q.Uk=function(e,t){return lpe(this,L(e,45),t)},Q.Yi=function(e){return L(L(this.c,72).Yi(e),136)},Q.Gi=function(){return L(this.c,72).Gi()},Q.Hi=function(){return L(this.c,72).Hi()},Q.Ii=function(e){return L(this.c,72).Ii(e)},Q.Vk=function(e,t){return dD(this,e,t)},Q.Dk=function(e){return L(this.c,78).Dk(e)},Q.$j=function(){},Q.Oj=function(){return L(this.c,78).Oj()},Q.ak=function(e,t,n){var r=L(DP(this.b).ti().pi(this.b),136);return r.zi(e),r.Ai(t),r.ld(n),r},Q.bk=function(){return new rre(this)},Q.Wb=function(e){XF(this,e)},Q.Ek=function(){L(this.c,78).Ek()},B(pZ,`EcoreEMap`,142),Y(169,142,dht,jE),Q.Zj=function(){var e,t,n,r,i,a;if(this.d==null){for(a=U(cBt,Ymt,67,2*this.f+1,0,1),n=this.c.Jc();n.e!=n.i.gc();)t=L(n.Wj(),136),r=t.yi(),i=(r&eK)%a.length,e=a[i],!e&&(e=a[i]=new rre(this)),e.Ec(t);this.d=a}},B(LX,`EAnnotationImpl/1`,169),Y(293,439,{109:1,94:1,93:1,158:1,197:1,57:1,114:1,470:1,52:1,100:1,161:1,293:1,117:1,118:1}),Q.Ih=function(e,t,n){var r,i;switch(e){case 0:return!this.Ab&&(this.Ab=new R(j7,this,0,3)),this.Ab;case 1:return this.zb;case 2:return $T(),!!(this.Bb&256);case 3:return $T(),!!(this.Bb&512);case 4:return q(this.s);case 5:return q(this.t);case 6:return $T(),!!this.Hk();case 7:return $T(),i=this.s,i>=1;case 8:return t?cV(this):this.r;case 9:return this.q}return vN(this,e-lk(this.fi()),lP((r=L(uI(this,16),29),r||this.fi()),e),t,n)},Q.Rh=function(e,t,n){var r,i;switch(t){case 0:return!this.Ab&&(this.Ab=new R(j7,this,0,3)),lB(this.Ab,e,n);case 9:return zye(this,n)}return i=L(lP((r=L(uI(this,16),29),r||this.fi()),t),69),i.uk().yk(this,Mz(this),t-lk(this.fi()),e,n)},Q.Th=function(e){var t,n;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return(this.Bb&256)==0;case 3:return(this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return this.Hk();case 7:return n=this.s,n>=1;case 8:return!!this.r&&!this.q.e&&bk(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&bk(this.q).i==0)}return Hj(this,e-lk(this.fi()),lP((t=L(uI(this,16),29),t||this.fi()),e))},Q.$h=function(e,t){var n,r;switch(e){case 0:!this.Ab&&(this.Ab=new R(j7,this,0,3)),uG(this.Ab),!this.Ab&&(this.Ab=new R(j7,this,0,3)),uk(this.Ab,L(t,18));return;case 1:this.ri(IE(t));return;case 2:nR(this,X_(FE(t)));return;case 3:rR(this,X_(FE(t)));return;case 4:HP(this,L(t,15).a);return;case 5:this.Xk(L(t,15).a);return;case 8:PL(this,L(t,143));return;case 9:r=BV(this,L(t,87),null),r&&r.mj();return}UR(this,e-lk(this.fi()),lP((n=L(uI(this,16),29),n||this.fi()),e),t)},Q.fi=function(){return qG(),VBt},Q.hi=function(e){var t,n;switch(e){case 0:!this.Ab&&(this.Ab=new R(j7,this,0,3)),uG(this.Ab);return;case 1:this.ri(null);return;case 2:nR(this,!0);return;case 3:rR(this,!0);return;case 4:HP(this,0);return;case 5:this.Xk(1);return;case 8:PL(this,null);return;case 9:n=BV(this,null,null),n&&n.mj();return}tR(this,e-lk(this.fi()),lP((t=L(uI(this,16),29),t||this.fi()),e))},Q.mi=function(){cV(this),this.Bb|=1},Q.Fk=function(){return cV(this)},Q.Gk=function(){return this.t},Q.Hk=function(){var e;return e=this.t,e>1||e==-1},Q.Qi=function(){return(this.Bb&512)!=0},Q.Wk=function(e,t){return Jze(this,e,t)},Q.Xk=function(e){UP(this,e)},Q.Ib=function(){return u1e(this)},Q.s=0,Q.t=1,B(LX,`ETypedElementImpl`,293),Y(451,293,{109:1,94:1,93:1,158:1,197:1,57:1,179:1,69:1,114:1,470:1,52:1,100:1,161:1,451:1,293:1,117:1,118:1,682:1}),Q.xh=function(e){return YGe(this,e)},Q.Ih=function(e,t,n){var r,i;switch(e){case 0:return!this.Ab&&(this.Ab=new R(j7,this,0,3)),this.Ab;case 1:return this.zb;case 2:return $T(),!!(this.Bb&256);case 3:return $T(),!!(this.Bb&512);case 4:return q(this.s);case 5:return q(this.t);case 6:return $T(),!!this.Hk();case 7:return $T(),i=this.s,i>=1;case 8:return t?cV(this):this.r;case 9:return this.q;case 10:return $T(),(this.Bb&fZ)!=0;case 11:return $T(),(this.Bb&RX)!=0;case 12:return $T(),(this.Bb&xq)!=0;case 13:return this.j;case 14:return vU(this);case 15:return $T(),(this.Bb&mZ)!=0;case 16:return $T(),(this.Bb&bK)!=0;case 17:return KA(this)}return vN(this,e-lk(this.fi()),lP((r=L(uI(this,16),29),r||this.fi()),e),t,n)},Q.Ph=function(e,t,n){var r,i,a;switch(t){case 0:return!this.Ab&&(this.Ab=new R(j7,this,0,3)),dz(this.Ab,e,n);case 17:return this.Cb&&(n=(i=this.Db>>16,i>=0?YGe(this,n):this.Cb.Qh(this,-1-i,null,n))),bW(this,e,17,n)}return a=L(lP((r=L(uI(this,16),29),r||this.fi()),t),69),a.uk().xk(this,Mz(this),t-lk(this.fi()),e,n)},Q.Rh=function(e,t,n){var r,i;switch(t){case 0:return!this.Ab&&(this.Ab=new R(j7,this,0,3)),lB(this.Ab,e,n);case 9:return zye(this,n);case 17:return bW(this,null,17,n)}return i=L(lP((r=L(uI(this,16),29),r||this.fi()),t),69),i.uk().yk(this,Mz(this),t-lk(this.fi()),e,n)},Q.Th=function(e){var t,n;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return(this.Bb&256)==0;case 3:return(this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return this.Hk();case 7:return n=this.s,n>=1;case 8:return!!this.r&&!this.q.e&&bk(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&bk(this.q).i==0);case 10:return(this.Bb&fZ)==0;case 11:return(this.Bb&RX)!=0;case 12:return(this.Bb&xq)!=0;case 13:return this.j!=null;case 14:return vU(this)!=null;case 15:return(this.Bb&mZ)!=0;case 16:return(this.Bb&bK)!=0;case 17:return!!KA(this)}return Hj(this,e-lk(this.fi()),lP((t=L(uI(this,16),29),t||this.fi()),e))},Q.$h=function(e,t){var n,r;switch(e){case 0:!this.Ab&&(this.Ab=new R(j7,this,0,3)),uG(this.Ab),!this.Ab&&(this.Ab=new R(j7,this,0,3)),uk(this.Ab,L(t,18));return;case 1:Owe(this,IE(t));return;case 2:nR(this,X_(FE(t)));return;case 3:rR(this,X_(FE(t)));return;case 4:HP(this,L(t,15).a);return;case 5:this.Xk(L(t,15).a);return;case 8:PL(this,L(t,143));return;case 9:r=BV(this,L(t,87),null),r&&r.mj();return;case 10:yR(this,X_(FE(t)));return;case 11:xR(this,X_(FE(t)));return;case 12:bR(this,X_(FE(t)));return;case 13:CC(this,IE(t));return;case 15:vR(this,X_(FE(t)));return;case 16:IR(this,X_(FE(t)));return}UR(this,e-lk(this.fi()),lP((n=L(uI(this,16),29),n||this.fi()),e),t)},Q.fi=function(){return qG(),BBt},Q.hi=function(e){var t,n;switch(e){case 0:!this.Ab&&(this.Ab=new R(j7,this,0,3)),uG(this.Ab);return;case 1:F(this.Cb,88)&&EH(xM(L(this.Cb,88)),4),AF(this,null);return;case 2:nR(this,!0);return;case 3:rR(this,!0);return;case 4:HP(this,0);return;case 5:this.Xk(1);return;case 8:PL(this,null);return;case 9:n=BV(this,null,null),n&&n.mj();return;case 10:yR(this,!0);return;case 11:xR(this,!1);return;case 12:bR(this,!1);return;case 13:this.i=null,mF(this,null);return;case 15:vR(this,!1);return;case 16:IR(this,!1);return}tR(this,e-lk(this.fi()),lP((t=L(uI(this,16),29),t||this.fi()),e))},Q.mi=function(){Kk(FN((hH(),p9),this)),cV(this),this.Bb|=1},Q.nk=function(){return this.f},Q.gk=function(){return vU(this)},Q.ok=function(){return KA(this)},Q.sk=function(){return null},Q.Yk=function(){return this.k},Q.Jj=function(){return this.n},Q.tk=function(){return TV(this)},Q.uk=function(){var e,t,n,r,i,a,o,s,c;return this.p||(n=KA(this),(n.i??MW(n),n.i).length,r=this.sk(),r&&lk(KA(r)),i=cV(this),o=i.ik(),e=o?o.i&1?o==J9?bQ:o==q9?TQ:o==Q9?wQ:o==Z9?CQ:o==Y9?EQ:o==$9?DQ:o==X9?xQ:SQ:o:null,t=vU(this),s=i.gk(),ZBe(this),(this.Bb&bK)!=0&&((a=xqe((hH(),p9),n))&&a!=this||(a=pj(FN(p9,this))))?this.p=new Ise(this,a):this.Hk()?this.$k()?r?(this.Bb&mZ)==0?e?this._k()?this.p=new iA(49,e,this,r):this.p=new iA(7,e,this,r):this._k()?this.p=new tM(48,this,r):this.p=new tM(6,this,r):e?this._k()?this.p=new iA(47,e,this,r):this.p=new iA(5,e,this,r):this._k()?this.p=new tM(46,this,r):this.p=new tM(4,this,r):(this.Bb&mZ)==0?e?e==dQ?this.p=new OD(41,nBt,this):this._k()?this.p=new OD(45,e,this):this.p=new OD(3,e,this):this._k()?this.p=new yA(44,this):this.p=new yA(2,this):e?e==dQ?this.p=new OD(50,nBt,this):this._k()?this.p=new OD(43,e,this):this.p=new OD(1,e,this):this._k()?this.p=new yA(42,this):this.p=new yA(0,this):F(i,159)?e==c9?this.p=new yA(40,this):this.Bb&512?(this.Bb&mZ)==0?e?this.p=new OD(11,e,this):this.p=new yA(10,this):e?this.p=new OD(9,e,this):this.p=new yA(8,this):(this.Bb&mZ)==0?e?this.p=new OD(15,e,this):this.p=new yA(14,this):e?this.p=new OD(13,e,this):this.p=new yA(12,this):r?(c=r.t,c>1||c==-1?this._k()?(this.Bb&mZ)==0?e?this.p=new iA(27,e,this,r):this.p=new tM(26,this,r):e?this.p=new iA(25,e,this,r):this.p=new tM(24,this,r):(this.Bb&mZ)==0?e?this.p=new iA(31,e,this,r):this.p=new tM(30,this,r):e?this.p=new iA(29,e,this,r):this.p=new tM(28,this,r):this._k()?(this.Bb&mZ)==0?e?this.p=new iA(35,e,this,r):this.p=new tM(34,this,r):e?this.p=new iA(33,e,this,r):this.p=new tM(32,this,r):(this.Bb&mZ)==0?e?this.p=new iA(39,e,this,r):this.p=new tM(38,this,r):e?this.p=new iA(37,e,this,r):this.p=new tM(36,this,r)):this._k()?(this.Bb&mZ)==0?e?this.p=new OD(19,e,this):this.p=new yA(18,this):e?this.p=new OD(17,e,this):this.p=new yA(16,this):(this.Bb&mZ)==0?e?this.p=new OD(23,e,this):this.p=new yA(22,this):e?this.p=new OD(21,e,this):this.p=new yA(20,this):this.Zk()?this._k()?this.p=new Bhe(L(i,29),this,r):this.p=new _Ce(L(i,29),this,r):F(i,159)?e==c9?this.p=new yA(40,this):(this.Bb&mZ)==0?e?this.p=new cve(t,s,this,(vz(),o==q9?tVt:o==J9?XBt:o==Y9?nVt:o==Q9?eVt:o==Z9?$Bt:o==$9?iVt:o==X9?ZBt:o==K9?QBt:rVt)):this.p=new Hxe(L(i,159),t,s,this):e?this.p=new lve(t,s,this,(vz(),o==q9?tVt:o==J9?XBt:o==Y9?nVt:o==Q9?eVt:o==Z9?$Bt:o==$9?iVt:o==X9?ZBt:o==K9?QBt:rVt)):this.p=new Uxe(L(i,159),t,s,this):this.$k()?r?(this.Bb&mZ)==0?this._k()?this.p=new Whe(L(i,29),this,r):this.p=new Vhe(L(i,29),this,r):this._k()?this.p=new Khe(L(i,29),this,r):this.p=new Ghe(L(i,29),this,r):(this.Bb&mZ)==0?this._k()?this.p=new cde(L(i,29),this):this.p=new ME(L(i,29),this):this._k()?this.p=new ude(L(i,29),this):this.p=new lde(L(i,29),this):this._k()?r?(this.Bb&mZ)==0?this.p=new Hhe(L(i,29),this,r):this.p=new qhe(L(i,29),this,r):(this.Bb&mZ)==0?this.p=new ode(L(i,29),this):this.p=new dde(L(i,29),this):r?(this.Bb&mZ)==0?this.p=new Uhe(L(i,29),this,r):this.p=new Jhe(L(i,29),this,r):(this.Bb&mZ)==0?this.p=new lO(L(i,29),this):this.p=new sde(L(i,29),this)),this.p},Q.pk=function(){return(this.Bb&fZ)!=0},Q.Zk=function(){return!1},Q.$k=function(){return!1},Q.qk=function(){return(this.Bb&bK)!=0},Q.vk=function(){return JN(this)},Q._k=function(){return!1},Q.rk=function(){return(this.Bb&mZ)!=0},Q.al=function(e){this.k=e},Q.ri=function(e){Owe(this,e)},Q.Ib=function(){return ZU(this)},Q.e=!1,Q.n=0,B(LX,`EStructuralFeatureImpl`,451),Y(335,451,{109:1,94:1,93:1,38:1,158:1,197:1,57:1,179:1,69:1,114:1,470:1,52:1,100:1,335:1,161:1,451:1,293:1,117:1,118:1,682:1},o_),Q.Ih=function(e,t,n){var r,i;switch(e){case 0:return!this.Ab&&(this.Ab=new R(j7,this,0,3)),this.Ab;case 1:return this.zb;case 2:return $T(),!!(this.Bb&256);case 3:return $T(),!!(this.Bb&512);case 4:return q(this.s);case 5:return q(this.t);case 6:return $T(),!!b$e(this);case 7:return $T(),i=this.s,i>=1;case 8:return t?cV(this):this.r;case 9:return this.q;case 10:return $T(),(this.Bb&fZ)!=0;case 11:return $T(),(this.Bb&RX)!=0;case 12:return $T(),(this.Bb&xq)!=0;case 13:return this.j;case 14:return vU(this);case 15:return $T(),(this.Bb&mZ)!=0;case 16:return $T(),(this.Bb&bK)!=0;case 17:return KA(this);case 18:return $T(),(this.Bb&IX)!=0;case 19:return t?OI(this):Xke(this)}return vN(this,e-lk((qG(),J7)),lP((r=L(uI(this,16),29),r||J7),e),t,n)},Q.Th=function(e){var t,n;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return(this.Bb&256)==0;case 3:return(this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return b$e(this);case 7:return n=this.s,n>=1;case 8:return!!this.r&&!this.q.e&&bk(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&bk(this.q).i==0);case 10:return(this.Bb&fZ)==0;case 11:return(this.Bb&RX)!=0;case 12:return(this.Bb&xq)!=0;case 13:return this.j!=null;case 14:return vU(this)!=null;case 15:return(this.Bb&mZ)!=0;case 16:return(this.Bb&bK)!=0;case 17:return!!KA(this);case 18:return(this.Bb&IX)!=0;case 19:return!!Xke(this)}return Hj(this,e-lk((qG(),J7)),lP((t=L(uI(this,16),29),t||J7),e))},Q.$h=function(e,t){var n,r;switch(e){case 0:!this.Ab&&(this.Ab=new R(j7,this,0,3)),uG(this.Ab),!this.Ab&&(this.Ab=new R(j7,this,0,3)),uk(this.Ab,L(t,18));return;case 1:Owe(this,IE(t));return;case 2:nR(this,X_(FE(t)));return;case 3:rR(this,X_(FE(t)));return;case 4:HP(this,L(t,15).a);return;case 5:qie(this,L(t,15).a);return;case 8:PL(this,L(t,143));return;case 9:r=BV(this,L(t,87),null),r&&r.mj();return;case 10:yR(this,X_(FE(t)));return;case 11:xR(this,X_(FE(t)));return;case 12:bR(this,X_(FE(t)));return;case 13:CC(this,IE(t));return;case 15:vR(this,X_(FE(t)));return;case 16:IR(this,X_(FE(t)));return;case 18:LR(this,X_(FE(t)));return}UR(this,e-lk((qG(),J7)),lP((n=L(uI(this,16),29),n||J7),e),t)},Q.fi=function(){return qG(),J7},Q.hi=function(e){var t,n;switch(e){case 0:!this.Ab&&(this.Ab=new R(j7,this,0,3)),uG(this.Ab);return;case 1:F(this.Cb,88)&&EH(xM(L(this.Cb,88)),4),AF(this,null);return;case 2:nR(this,!0);return;case 3:rR(this,!0);return;case 4:HP(this,0);return;case 5:this.b=0,UP(this,1);return;case 8:PL(this,null);return;case 9:n=BV(this,null,null),n&&n.mj();return;case 10:yR(this,!0);return;case 11:xR(this,!1);return;case 12:bR(this,!1);return;case 13:this.i=null,mF(this,null);return;case 15:vR(this,!1);return;case 16:IR(this,!1);return;case 18:LR(this,!1);return}tR(this,e-lk((qG(),J7)),lP((t=L(uI(this,16),29),t||J7),e))},Q.mi=function(){OI(this),Kk(FN((hH(),p9),this)),cV(this),this.Bb|=1},Q.Hk=function(){return b$e(this)},Q.Wk=function(e,t){return this.b=0,this.a=null,Jze(this,e,t)},Q.Xk=function(e){qie(this,e)},Q.Ib=function(){var e;return this.Db&64?ZU(this):(e=new YT(ZU(this)),e.a+=` (iD: `,gy(e,(this.Bb&IX)!=0),e.a+=`)`,e.a)},Q.b=0,B(LX,`EAttributeImpl`,335),Y(360,439,{109:1,94:1,93:1,143:1,158:1,197:1,57:1,114:1,52:1,100:1,360:1,161:1,117:1,118:1,681:1}),Q.bl=function(e){return e.Ah()==this},Q.xh=function(e){return KB(this,e)},Q.yh=function(e,t){this.w=null,this.Db=t<<16|this.Db&255,this.Cb=e},Q.Ih=function(e,t,n){var r;switch(e){case 0:return!this.Ab&&(this.Ab=new R(j7,this,0,3)),this.Ab;case 1:return this.zb;case 2:return this.D==null?this.B:this.D;case 3:return UB(this);case 4:return this.gk();case 5:return this.F;case 6:return t?DP(this):WA(this);case 7:return!this.A&&(this.A=new BT(W7,this,7)),this.A}return vN(this,e-lk(this.fi()),lP((r=L(uI(this,16),29),r||this.fi()),e),t,n)},Q.Ph=function(e,t,n){var r,i,a;switch(t){case 0:return!this.Ab&&(this.Ab=new R(j7,this,0,3)),dz(this.Ab,e,n);case 6:return this.Cb&&(n=(i=this.Db>>16,i>=0?KB(this,n):this.Cb.Qh(this,-1-i,null,n))),bW(this,e,6,n)}return a=L(lP((r=L(uI(this,16),29),r||this.fi()),t),69),a.uk().xk(this,Mz(this),t-lk(this.fi()),e,n)},Q.Rh=function(e,t,n){var r,i;switch(t){case 0:return!this.Ab&&(this.Ab=new R(j7,this,0,3)),lB(this.Ab,e,n);case 6:return bW(this,null,6,n);case 7:return!this.A&&(this.A=new BT(W7,this,7)),lB(this.A,e,n)}return i=L(lP((r=L(uI(this,16),29),r||this.fi()),t),69),i.uk().yk(this,Mz(this),t-lk(this.fi()),e,n)},Q.Th=function(e){var t;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.D!=null&&this.D==this.F;case 3:return!!UB(this);case 4:return this.gk()!=null;case 5:return this.F!=null&&this.F!=this.D&&this.F!=this.B;case 6:return!!WA(this);case 7:return!!this.A&&this.A.i!=0}return Hj(this,e-lk(this.fi()),lP((t=L(uI(this,16),29),t||this.fi()),e))},Q.$h=function(e,t){var n;switch(e){case 0:!this.Ab&&(this.Ab=new R(j7,this,0,3)),uG(this.Ab),!this.Ab&&(this.Ab=new R(j7,this,0,3)),uk(this.Ab,L(t,18));return;case 1:ij(this,IE(t));return;case 2:Bw(this,IE(t));return;case 5:yG(this,IE(t));return;case 7:!this.A&&(this.A=new BT(W7,this,7)),uG(this.A),!this.A&&(this.A=new BT(W7,this,7)),uk(this.A,L(t,18));return}UR(this,e-lk(this.fi()),lP((n=L(uI(this,16),29),n||this.fi()),e),t)},Q.fi=function(){return qG(),PBt},Q.hi=function(e){var t;switch(e){case 0:!this.Ab&&(this.Ab=new R(j7,this,0,3)),uG(this.Ab);return;case 1:F(this.Cb,184)&&(L(this.Cb,184).tb=null),AF(this,null);return;case 2:EL(this,null),WP(this,this.D);return;case 5:yG(this,null);return;case 7:!this.A&&(this.A=new BT(W7,this,7)),uG(this.A);return}tR(this,e-lk(this.fi()),lP((t=L(uI(this,16),29),t||this.fi()),e))},Q.fk=function(){var e;return this.G==-1&&(this.G=(e=DP(this),e?gB(e.si(),this):-1)),this.G},Q.gk=function(){return null},Q.hk=function(){return DP(this)},Q.cl=function(){return this.v},Q.ik=function(){return UB(this)},Q.jk=function(){return this.D==null?this.B:this.D},Q.kk=function(){return this.F},Q.dk=function(e){return TW(this,e)},Q.dl=function(e){this.v=e},Q.el=function(e){bFe(this,e)},Q.fl=function(e){this.C=e},Q.ri=function(e){ij(this,e)},Q.Ib=function(){return oz(this)},Q.C=null,Q.D=null,Q.G=-1,B(LX,`EClassifierImpl`,360),Y(88,360,{109:1,94:1,93:1,29:1,143:1,158:1,197:1,57:1,114:1,52:1,100:1,88:1,360:1,161:1,471:1,117:1,118:1,681:1},Sf),Q.bl=function(e){return Bfe(this,e.Ah())},Q.Ih=function(e,t,n){var r;switch(e){case 0:return!this.Ab&&(this.Ab=new R(j7,this,0,3)),this.Ab;case 1:return this.zb;case 2:return this.D==null?this.B:this.D;case 3:return UB(this);case 4:return null;case 5:return this.F;case 6:return t?DP(this):WA(this);case 7:return!this.A&&(this.A=new BT(W7,this,7)),this.A;case 8:return $T(),!!(this.Bb&256);case 9:return $T(),!!(this.Bb&512);case 10:return wA(this);case 11:return!this.q&&(this.q=new R(B7,this,11,10)),this.q;case 12:return KW(this);case 13:return HW(this);case 14:return HW(this),this.r;case 15:return KW(this),this.k;case 16:return qZe(this);case 17:return RW(this);case 18:return MW(this);case 19:return mU(this);case 20:return KW(this),this.o;case 21:return!this.s&&(this.s=new R(N7,this,21,17)),this.s;case 22:return Qj(this);case 23:return GU(this)}return vN(this,e-lk((qG(),Y7)),lP((r=L(uI(this,16),29),r||Y7),e),t,n)},Q.Ph=function(e,t,n){var r,i,a;switch(t){case 0:return!this.Ab&&(this.Ab=new R(j7,this,0,3)),dz(this.Ab,e,n);case 6:return this.Cb&&(n=(i=this.Db>>16,i>=0?KB(this,n):this.Cb.Qh(this,-1-i,null,n))),bW(this,e,6,n);case 11:return!this.q&&(this.q=new R(B7,this,11,10)),dz(this.q,e,n);case 21:return!this.s&&(this.s=new R(N7,this,21,17)),dz(this.s,e,n)}return a=L(lP((r=L(uI(this,16),29),r||(qG(),Y7)),t),69),a.uk().xk(this,Mz(this),t-lk((qG(),Y7)),e,n)},Q.Rh=function(e,t,n){var r,i;switch(t){case 0:return!this.Ab&&(this.Ab=new R(j7,this,0,3)),lB(this.Ab,e,n);case 6:return bW(this,null,6,n);case 7:return!this.A&&(this.A=new BT(W7,this,7)),lB(this.A,e,n);case 11:return!this.q&&(this.q=new R(B7,this,11,10)),lB(this.q,e,n);case 21:return!this.s&&(this.s=new R(N7,this,21,17)),lB(this.s,e,n);case 22:return lB(Qj(this),e,n)}return i=L(lP((r=L(uI(this,16),29),r||(qG(),Y7)),t),69),i.uk().yk(this,Mz(this),t-lk((qG(),Y7)),e,n)},Q.Th=function(e){var t;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.D!=null&&this.D==this.F;case 3:return!!UB(this);case 4:return!1;case 5:return this.F!=null&&this.F!=this.D&&this.F!=this.B;case 6:return!!WA(this);case 7:return!!this.A&&this.A.i!=0;case 8:return(this.Bb&256)!=0;case 9:return(this.Bb&512)!=0;case 10:return!!this.u&&Qj(this.u.a).i!=0&&!(this.n&&DB(this.n));case 11:return!!this.q&&this.q.i!=0;case 12:return KW(this).i!=0;case 13:return HW(this).i!=0;case 14:return HW(this),this.r.i!=0;case 15:return KW(this),this.k.i!=0;case 16:return qZe(this).i!=0;case 17:return RW(this).i!=0;case 18:return MW(this).i!=0;case 19:return mU(this).i!=0;case 20:return KW(this),!!this.o;case 21:return!!this.s&&this.s.i!=0;case 22:return!!this.n&&DB(this.n);case 23:return GU(this).i!=0}return Hj(this,e-lk((qG(),Y7)),lP((t=L(uI(this,16),29),t||Y7),e))},Q.Wh=function(e){return(this.i==null||this.q&&this.q.i!=0?null:TU(this,e))||Jrt(this,e)},Q.$h=function(e,t){var n;switch(e){case 0:!this.Ab&&(this.Ab=new R(j7,this,0,3)),uG(this.Ab),!this.Ab&&(this.Ab=new R(j7,this,0,3)),uk(this.Ab,L(t,18));return;case 1:ij(this,IE(t));return;case 2:Bw(this,IE(t));return;case 5:yG(this,IE(t));return;case 7:!this.A&&(this.A=new BT(W7,this,7)),uG(this.A),!this.A&&(this.A=new BT(W7,this,7)),uk(this.A,L(t,18));return;case 8:iBe(this,X_(FE(t)));return;case 9:aBe(this,X_(FE(t)));return;case 10:dG(wA(this)),uk(wA(this),L(t,18));return;case 11:!this.q&&(this.q=new R(B7,this,11,10)),uG(this.q),!this.q&&(this.q=new R(B7,this,11,10)),uk(this.q,L(t,18));return;case 21:!this.s&&(this.s=new R(N7,this,21,17)),uG(this.s),!this.s&&(this.s=new R(N7,this,21,17)),uk(this.s,L(t,18));return;case 22:uG(Qj(this)),uk(Qj(this),L(t,18));return}UR(this,e-lk((qG(),Y7)),lP((n=L(uI(this,16),29),n||Y7),e),t)},Q.fi=function(){return qG(),Y7},Q.hi=function(e){var t;switch(e){case 0:!this.Ab&&(this.Ab=new R(j7,this,0,3)),uG(this.Ab);return;case 1:F(this.Cb,184)&&(L(this.Cb,184).tb=null),AF(this,null);return;case 2:EL(this,null),WP(this,this.D);return;case 5:yG(this,null);return;case 7:!this.A&&(this.A=new BT(W7,this,7)),uG(this.A);return;case 8:iBe(this,!1);return;case 9:aBe(this,!1);return;case 10:this.u&&dG(this.u);return;case 11:!this.q&&(this.q=new R(B7,this,11,10)),uG(this.q);return;case 21:!this.s&&(this.s=new R(N7,this,21,17)),uG(this.s);return;case 22:this.n&&uG(this.n);return}tR(this,e-lk((qG(),Y7)),lP((t=L(uI(this,16),29),t||Y7),e))},Q.mi=function(){var e,t;if(KW(this),HW(this),qZe(this),RW(this),MW(this),mU(this),GU(this),jM(nge(xM(this))),this.s)for(e=0,t=this.s.i;e<t;++e)LE(W(this.s,e));if(this.q)for(e=0,t=this.q.i;e<t;++e)LE(W(this.q,e));XL((hH(),p9),this).ve(),this.Bb|=1},Q.Ib=function(){return oJe(this)},Q.k=null,Q.r=null;var l9,WBt,GBt;B(LX,`EClassImpl`,88),Y(2057,2056,hht),Q.Ci=function(e,t){return DW(this,e,t)},Q.Di=function(e){return DW(this,this.i,e)},Q.Ei=function(e,t){o1e(this,e,t)},Q.Fi=function(e){JH(this,e)},Q.Uk=function(e,t){return dz(this,e,t)},Q.Yi=function(e){return _je(this,e)},Q.Vk=function(e,t){return lB(this,e,t)},Q.Vi=function(e,t){return _9e(this,e,t)},Q.Gi=function(){return new pE(this)},Q.Hi=function(){return new mE(this)},Q.Ii=function(e){return tF(this,e)},B(pZ,`NotifyingInternalEListImpl`,2057),Y(624,2057,CZ),Q.Gc=function(e){return Zet(this,e)},Q.Gj=function(e,t,n,r,i){return QA(this,e,t,n,r,i)},Q.Hj=function(e){xg(this,e)},Q.Dk=function(e){return this},Q.Jk=function(){return lP(this.e.Ah(),this.Jj())},Q.Ij=function(){return this.Jk()},Q.Jj=function(){return iz(this.e.Ah(),this.Jk())},Q.gl=function(){return L(this.Jk().Fk(),29).ik()},Q.hl=function(){return CB(L(this.Jk(),19)).n},Q.hj=function(){return this.e},Q.il=function(){return!0},Q.jl=function(){return!1},Q.kl=function(){return!1},Q.ll=function(){return!1},Q.bd=function(e){return gB(this,e)},Q.Lj=function(e,t){var n;return n=L(e,52),this.kl()?this.il()?n.Oh(this.e,this.hl(),this.gl(),t):n.Oh(this.e,iz(n.Ah(),CB(L(this.Jk(),19))),null,t):n.Oh(this.e,-1-this.Jj(),null,t)},Q.Mj=function(e,t){var n;return n=L(e,52),this.kl()?this.il()?n.Qh(this.e,this.hl(),this.gl(),t):n.Qh(this.e,iz(n.Ah(),CB(L(this.Jk(),19))),null,t):n.Qh(this.e,-1-this.Jj(),null,t)},Q.$k=function(){return!1},Q.ml=function(){return!0},Q.dk=function(e){return UDe(this.d,e)},Q.Nj=function(){return Dw(this.e)},Q.Oj=function(){return this.i!=0},Q.$i=function(e){return GP(this.d,e)},Q.Ui=function(e,t){return this.ml()&&this.ll()?KH(this,e,L(t,57)):t},Q.nl=function(e){return e.Sh()?WL(this.e,L(e,52)):e},Q.Wb=function(e){Qce(this,e)},Q.Nc=function(){return vje(this)},Q.Oc=function(e){var t;if(this.ll())for(t=this.i-1;t>=0;--t)W(this,t);return ZVe(this,e)},Q.Ek=function(){uG(this)},Q.Xi=function(e,t){return uPe(this,e,t)},B(pZ,`EcoreEList`,624),Y(491,624,CZ,RD),Q.Ji=function(){return!1},Q.Jj=function(){return this.c},Q.Kj=function(){return!1},Q.ml=function(){return!0},Q.Qi=function(){return!0},Q.Ui=function(e,t){return t},Q.Wi=function(){return!1},Q.c=0,B(pZ,`EObjectEList`,491),Y(81,491,CZ,zT),Q.Kj=function(){return!0},Q.kl=function(){return!1},Q.$k=function(){return!0},B(pZ,`EObjectContainmentEList`,81),Y(544,81,CZ,RT),Q.Li=function(){this.b=!0},Q.Oj=function(){return this.b},Q.Ek=function(){var e;uG(this),Dw(this.e)?(e=this.b,this.b=!1,nI(this.e,new CM(this.e,2,this.c,e,!1))):this.b=!1},Q.b=!1,B(pZ,`EObjectContainmentEList/Unsettable`,544),Y(1131,544,CZ,ove),Q.Ri=function(e,t){var n,r;return n=L(gR(this,e,t),87),Dw(this.e)&&xg(this,new dN(this.a,7,(qG(),FBt),q(t),(r=n.c,F(r,88)?L(r,29):t9),e)),n},Q.Sj=function(e,t){return aHe(this,L(e,87),t)},Q.Tj=function(e,t){return iHe(this,L(e,87),t)},Q.Uj=function(e,t,n){return Iqe(this,L(e,87),L(t,87),n)},Q.Gj=function(e,t,n,r,i){switch(e){case 3:return QA(this,e,t,n,r,this.i>1);case 5:return QA(this,e,t,n,r,this.i-L(n,16).gc()>0);default:return new VN(this.e,e,this.c,t,n,r,!0)}},Q.Rj=function(){return!0},Q.Oj=function(){return DB(this)},Q.Ek=function(){uG(this)},B(LX,`EClassImpl/1`,1131),Y(1145,1144,Gmt),Q.bj=function(e){var t,n=e.ej(),r,i,a,o,s;if(n!=8){if(r=jUe(e),r==0)switch(n){case 1:case 9:s=e.ij(),s!=null&&(t=xM(L(s,471)),!t.c&&(t.c=new Ml),qN(t.c,e.hj())),o=e.gj(),o!=null&&(i=L(o,471),i.Bb&1||(t=xM(i),!t.c&&(t.c=new Ml),aN(t.c,L(e.hj(),29))));break;case 3:o=e.gj(),o!=null&&(i=L(o,471),i.Bb&1||(t=xM(i),!t.c&&(t.c=new Ml),aN(t.c,L(e.hj(),29))));break;case 5:if(o=e.gj(),o!=null)for(a=L(o,18).Jc();a.Ob();)i=L(a.Pb(),471),i.Bb&1||(t=xM(i),!t.c&&(t.c=new Ml),aN(t.c,L(e.hj(),29)));break;case 4:s=e.ij(),s!=null&&(i=L(s,471),i.Bb&1||(t=xM(i),!t.c&&(t.c=new Ml),qN(t.c,e.hj())));break;case 6:if(s=e.ij(),s!=null)for(a=L(s,18).Jc();a.Ob();)i=L(a.Pb(),471),i.Bb&1||(t=xM(i),!t.c&&(t.c=new Ml),qN(t.c,e.hj()));break}this.ol(r)}},Q.ol=function(e){V6e(this,e)},Q.b=63,B(LX,`ESuperAdapter`,1145),Y(1146,1145,Gmt,Zne),Q.ol=function(e){EH(this,e)},B(LX,`EClassImpl/10`,1146),Y(1135,699,CZ),Q.Ci=function(e,t){return zV(this,e,t)},Q.Di=function(e){return eGe(this,e)},Q.Ei=function(e,t){ZL(this,e,t)},Q.Fi=function(e){MM(this,e)},Q.Yi=function(e){return _je(this,e)},Q.Vi=function(e,t){return KN(this,e,t)},Q.Uk=function(e,t){throw k(new pg)},Q.Gi=function(){return new pE(this)},Q.Hi=function(){return new mE(this)},Q.Ii=function(e){return tF(this,e)},Q.Vk=function(e,t){throw k(new pg)},Q.Dk=function(e){return this},Q.Oj=function(){return this.i!=0},Q.Wb=function(e){throw k(new pg)},Q.Ek=function(){throw k(new pg)},B(pZ,`EcoreEList/UnmodifiableEList`,1135),Y(333,1135,CZ,ew),Q.Wi=function(){return!1},B(pZ,`EcoreEList/UnmodifiableEList/FastCompare`,333),Y(1138,333,CZ,LLe),Q.bd=function(e){var t,n,r;if(F(e,179)&&(t=L(e,179),n=t.Jj(),n!=-1)){for(r=this.i;n<r;++n)if(P(this.g[n])===P(e))return n}return-1},B(LX,`EClassImpl/1EAllStructuralFeaturesList`,1138),Y(1132,492,rZ,ml),Q.$i=function(e){return U(z7,ght,87,e,0,1)},Q.Wi=function(){return!1},B(LX,`EClassImpl/1EGenericSuperTypeEList`,1132),Y(625,492,rZ,hl),Q.$i=function(e){return U(N7,SZ,179,e,0,1)},Q.Wi=function(){return!1},B(LX,`EClassImpl/1EStructuralFeatureUniqueEList`,625),Y(743,492,rZ,gl),Q.$i=function(e){return U(U7,SZ,19,e,0,1)},Q.Wi=function(){return!1},B(LX,`EClassImpl/1ReferenceList`,743),Y(1133,492,rZ,Qne),Q.Ki=function(e,t){uve(this,L(t,38))},Q.$i=function(e){return U(P7,SZ,38,e,0,1)},Q.Wi=function(){return!1},B(LX,`EClassImpl/2`,1133),Y(1134,492,rZ,_l),Q.$i=function(e){return U(P7,SZ,38,e,0,1)},Q.Wi=function(){return!1},B(LX,`EClassImpl/3`,1134),Y(1136,333,CZ,Tge),Q.Ec=function(e){return pOe(this,L(e,38))},Q.Fi=function(e){Hae(this,L(e,38))},B(LX,`EClassImpl/4`,1136),Y(1137,333,CZ,Ege),Q.Ec=function(e){return mOe(this,L(e,19))},Q.Fi=function(e){Uae(this,L(e,19))},B(LX,`EClassImpl/5`,1137),Y(1139,492,rZ,vl),Q.$i=function(e){return U(B7,mht,62,e,0,1)},Q.Wi=function(){return!1},B(LX,`EClassImpl/6`,1139),Y(1140,492,rZ,yl),Q.$i=function(e){return U(U7,SZ,19,e,0,1)},Q.Wi=function(){return!1},B(LX,`EClassImpl/7`,1140),Y(2060,2059,{3:1,4:1,20:1,31:1,56:1,18:1,16:1,71:1,61:1,72:1}),Q.Ci=function(e,t){return g7e(this,e,t)},Q.Di=function(e){return g7e(this,this.Cj(),e)},Q.Ei=function(e,t){j1e(this,e,t)},Q.Fi=function(e){a1e(this,e)},Q.Uk=function(e,t){return tGe(this,e,t)},Q.Vk=function(e,t){return lWe(this,e,t)},Q.Vi=function(e,t){return _7e(this,e,t)},Q.Yi=function(e){return this.vj(e)},Q.Gi=function(){return new pE(this)},Q.nj=function(){return this.qj()},Q.Hi=function(){return new mE(this)},Q.Ii=function(e){return tF(this,e)},B(pZ,`DelegatingNotifyingInternalEListImpl`,2060),Y(744,2060,_ht),Q.Ji=function(){var e=lP(TA(this.b),this.Jj()).Fk();return F(e,159)&&!F(e,459)&&(e.ik().i&1)==0},Q.Gc=function(e){var t,n,r,i,a,o,s,c;if(this.ml()){if(c=this.Cj(),c>4)if(this.dk(e)){if(this.$k()){if(r=L(e,52),n=r.Bh(),s=n==this.b&&(this.kl()?r.vh(r.Ch(),L(lP(TA(this.b),this.Jj()).Fk(),29).ik())==CB(L(lP(TA(this.b),this.Jj()),19)).n:-1-r.Ch()==this.Jj()),this.ll()&&!s&&!n&&r.Gh()){for(i=0;i<c;++i)if(t=tye(this,this.vj(i)),P(t)===P(e))return!0}return s}else if(this.kl()&&!this.jl()){if(a=L(e,57).Jh(CB(L(lP(TA(this.b),this.Jj()),19))),P(a)===P(this.b))return!0;if(a==null||!L(a,57).Sh())return!1}}else return!1;if(o=this.sj(e),this.ll()&&!o){for(i=0;i<c;++i)if(r=tye(this,this.vj(i)),P(r)===P(e))return!0}return o}else return this.sj(e)},Q.Gj=function(e,t,n,r,i){return new VN(this.b,e,this.Jj(),t,n,r,i)},Q.Hj=function(e){nI(this.b,e)},Q.Dk=function(e){return this},Q.Ij=function(){return lP(TA(this.b),this.Jj())},Q.Jj=function(){return iz(TA(this.b),lP(TA(this.b),this.Jj()))},Q.hj=function(){return this.b},Q.il=function(){return!!lP(TA(this.b),this.Jj()).Fk().ik()},Q.Kj=function(){var e,t=lP(TA(this.b),this.Jj());return F(t,103)?(e=L(t,19),(e.Bb&IX)!=0||!!CB(L(t,19))):!1},Q.jl=function(){var e,t=lP(TA(this.b),this.Jj()),n,r;return F(t,103)?(e=L(t,19),n=CB(e),!!n&&(r=n.t,r>1||r==-1)):!1},Q.kl=function(){var e,t=lP(TA(this.b),this.Jj()),n;return F(t,103)?(e=L(t,19),n=CB(e),!!n):!1},Q.ll=function(){var e,t=lP(TA(this.b),this.Jj());return F(t,103)?(e=L(t,19),(e.Bb&Cq)!=0):!1},Q.bd=function(e){var t,n,r=this.xj(e),i;if(r>=0)return r;if(this.ml()){for(n=0,i=this.Cj();n<i;++n)if(t=tye(this,this.vj(n)),P(t)===P(e))return n}return-1},Q.Lj=function(e,t){var n;return n=L(e,52),this.kl()?this.il()?n.Oh(this.b,CB(L(lP(TA(this.b),this.Jj()),19)).n,L(lP(TA(this.b),this.Jj()).Fk(),29).ik(),t):n.Oh(this.b,iz(n.Ah(),CB(L(lP(TA(this.b),this.Jj()),19))),null,t):n.Oh(this.b,-1-this.Jj(),null,t)},Q.Mj=function(e,t){var n;return n=L(e,52),this.kl()?this.il()?n.Qh(this.b,CB(L(lP(TA(this.b),this.Jj()),19)).n,L(lP(TA(this.b),this.Jj()).Fk(),29).ik(),t):n.Qh(this.b,iz(n.Ah(),CB(L(lP(TA(this.b),this.Jj()),19))),null,t):n.Qh(this.b,-1-this.Jj(),null,t)},Q.$k=function(){var e,t=lP(TA(this.b),this.Jj());return F(t,103)?(e=L(t,19),(e.Bb&IX)!=0):!1},Q.ml=function(){return F(lP(TA(this.b),this.Jj()).Fk(),88)},Q.dk=function(e){return lP(TA(this.b),this.Jj()).Fk().dk(e)},Q.Nj=function(){return Dw(this.b)},Q.Oj=function(){return!this.yj()},Q.Qi=function(){return lP(TA(this.b),this.Jj()).Qi()},Q.Ui=function(e,t){return _G(this,e,t)},Q.Wb=function(e){dG(this),uk(this,L(e,16))},Q.Nc=function(){var e;if(this.ll())for(e=this.Cj()-1;e>=0;--e)_G(this,e,this.vj(e));return this.Dj()},Q.Oc=function(e){var t;if(this.ll())for(t=this.Cj()-1;t>=0;--t)_G(this,t,this.vj(t));return this.Ej(e)},Q.Ek=function(){dG(this)},Q.Xi=function(e,t){return Eje(this,e,t)},B(pZ,`DelegatingEcoreEList`,744),Y(1141,744,_ht,Gde),Q.oj=function(e,t){ade(this,e,L(t,29))},Q.pj=function(e){Tce(this,L(e,29))},Q.vj=function(e){var t,n;return t=L(W(Qj(this.a),e),87),n=t.c,F(n,88)?L(n,29):(qG(),t9)},Q.Aj=function(e){var t,n;return t=L(zU(Qj(this.a),e),87),n=t.c,F(n,88)?L(n,29):(qG(),t9)},Q.Bj=function(e,t){return nGe(this,e,L(t,29))},Q.Ji=function(){return!1},Q.Gj=function(e,t,n,r,i){return null},Q.qj=function(){return new $ne(this)},Q.rj=function(){uG(Qj(this.a))},Q.sj=function(e){return cBe(this,e)},Q.tj=function(e){var t,n;for(n=e.Jc();n.Ob();)if(t=n.Pb(),!cBe(this,t))return!1;return!0},Q.uj=function(e){var t,n,r;if(F(e,16)&&(r=L(e,16),r.gc()==Qj(this.a).i)){for(t=r.Jc(),n=new UT(this);t.Ob();)if(P(t.Pb())!==P($z(n)))return!1;return!0}return!1},Q.wj=function(){var e,t,n=1,r,i;for(t=new UT(Qj(this.a));t.e!=t.i.gc();)e=L($z(t),87),r=(i=e.c,F(i,88)?L(i,29):(qG(),t9)),n=31*n+(r?iE(r):0);return n},Q.xj=function(e){var t,n,r=0,i;for(n=new UT(Qj(this.a));n.e!=n.i.gc();){if(t=L($z(n),87),P(e)===P((i=t.c,F(i,88)?L(i,29):(qG(),t9))))return r;++r}return-1},Q.yj=function(){return Qj(this.a).i==0},Q.zj=function(){return null},Q.Cj=function(){return Qj(this.a).i},Q.Dj=function(){var e,t,n,r,i,a=Qj(this.a).i;for(i=U(sQ,aK,1,a,5,1),n=0,t=new UT(Qj(this.a));t.e!=t.i.gc();)e=L($z(t),87),i[n++]=(r=e.c,F(r,88)?L(r,29):(qG(),t9));return i},Q.Ej=function(e){var t,n,r,i,a,o,s=Qj(this.a).i;for(e.length<s&&(i=GP(hL(e).c,s),e=i),e.length>s&&hk(e,s,null),r=0,n=new UT(Qj(this.a));n.e!=n.i.gc();)t=L($z(n),87),a=(o=t.c,F(o,88)?L(o,29):(qG(),t9)),hk(e,r++,a);return e},Q.Fj=function(){var e,t,n,r,i=new yv;for(i.a+=`[`,e=Qj(this.a),t=0,r=Qj(this.a).i;t<r;)BC(i,JT((n=L(W(e,t),87).c,F(n,88)?L(n,29):(qG(),t9)))),++t<r&&(i.a+=iK);return i.a+=`]`,i.a},Q.Hj=function(e){},Q.Jj=function(){return 10},Q.il=function(){return!0},Q.Kj=function(){return!1},Q.jl=function(){return!1},Q.kl=function(){return!1},Q.ll=function(){return!0},Q.$k=function(){return!1},Q.ml=function(){return!0},Q.dk=function(e){return F(e,88)},Q.Oj=function(){return YTe(this.a)},Q.Qi=function(){return!0},Q.Wi=function(){return!0},B(LX,`EClassImpl/8`,1141),Y(1142,2027,LK,$ne),Q.dd=function(e){return tF(this.a,e)},Q.gc=function(){return Qj(this.a.a).i},B(LX,`EClassImpl/8/1`,1142),Y(1143,492,rZ,bl),Q.$i=function(e){return U(F7,aK,143,e,0,1)},Q.Wi=function(){return!1},B(LX,`EClassImpl/9`,1143),Y(1130,48,jot,Nre),B(LX,`EClassImpl/MyHashSet`,1130),Y(563,360,{109:1,94:1,93:1,143:1,159:1,832:1,158:1,197:1,57:1,114:1,52:1,100:1,360:1,161:1,117:1,118:1,681:1},hg),Q.Ih=function(e,t,n){var r;switch(e){case 0:return!this.Ab&&(this.Ab=new R(j7,this,0,3)),this.Ab;case 1:return this.zb;case 2:return this.D==null?this.B:this.D;case 3:return UB(this);case 4:return this.gk();case 5:return this.F;case 6:return t?DP(this):WA(this);case 7:return!this.A&&(this.A=new BT(W7,this,7)),this.A;case 8:return $T(),!!(this.Bb&256)}return vN(this,e-lk(this.fi()),lP((r=L(uI(this,16),29),r||this.fi()),e),t,n)},Q.Th=function(e){var t;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.D!=null&&this.D==this.F;case 3:return!!UB(this);case 4:return this.gk()!=null;case 5:return this.F!=null&&this.F!=this.D&&this.F!=this.B;case 6:return!!WA(this);case 7:return!!this.A&&this.A.i!=0;case 8:return(this.Bb&256)==0}return Hj(this,e-lk(this.fi()),lP((t=L(uI(this,16),29),t||this.fi()),e))},Q.$h=function(e,t){var n;switch(e){case 0:!this.Ab&&(this.Ab=new R(j7,this,0,3)),uG(this.Ab),!this.Ab&&(this.Ab=new R(j7,this,0,3)),uk(this.Ab,L(t,18));return;case 1:ij(this,IE(t));return;case 2:Bw(this,IE(t));return;case 5:yG(this,IE(t));return;case 7:!this.A&&(this.A=new BT(W7,this,7)),uG(this.A),!this.A&&(this.A=new BT(W7,this,7)),uk(this.A,L(t,18));return;case 8:iR(this,X_(FE(t)));return}UR(this,e-lk(this.fi()),lP((n=L(uI(this,16),29),n||this.fi()),e),t)},Q.fi=function(){return qG(),IBt},Q.hi=function(e){var t;switch(e){case 0:!this.Ab&&(this.Ab=new R(j7,this,0,3)),uG(this.Ab);return;case 1:F(this.Cb,184)&&(L(this.Cb,184).tb=null),AF(this,null);return;case 2:EL(this,null),WP(this,this.D);return;case 5:yG(this,null);return;case 7:!this.A&&(this.A=new BT(W7,this,7)),uG(this.A);return;case 8:iR(this,!0);return}tR(this,e-lk(this.fi()),lP((t=L(uI(this,16),29),t||this.fi()),e))},Q.mi=function(){XL((hH(),p9),this).ve(),this.Bb|=1},Q.mk=function(){var e,t,n;if(!this.c&&(e=P0e(DP(this)),!e.dc()))for(n=e.Jc();n.Ob();)t=IE(n.Pb()),xW(this,t)&&ABe(this);return this.b},Q.gk=function(){var e;if(!this.e){e=null;try{e=UB(this)}catch(e){if(e=PI(e),!F(e,101))throw k(e)}this.d=null,e&&e.i&1&&(e==J9?this.d=($T(),vQ):e==q9?this.d=q(0):e==Q9?this.d=new Gp(0):e==Z9?this.d=0:e==Y9?this.d=Fz(0):e==$9?this.d=KL(0):e==X9?this.d=WN(0):this.d=fI(0)),this.e=!0}return this.d},Q.lk=function(){return(this.Bb&256)!=0},Q.pl=function(e){e&&(this.D=`org.eclipse.emf.common.util.AbstractEnumerator`)},Q.el=function(e){bFe(this,e),this.pl(e)},Q.fl=function(e){this.C=e,this.e=!1},Q.Ib=function(){var e;return this.Db&64?oz(this):(e=new YT(oz(this)),e.a+=` (serializable: `,gy(e,(this.Bb&256)!=0),e.a+=`)`,e.a)},Q.c=!1,Q.d=null,Q.e=!1,B(LX,`EDataTypeImpl`,563),Y(459,563,{109:1,94:1,93:1,143:1,159:1,832:1,675:1,158:1,197:1,57:1,114:1,52:1,100:1,360:1,459:1,161:1,117:1,118:1,681:1},Pre),Q.Ih=function(e,t,n){var r;switch(e){case 0:return!this.Ab&&(this.Ab=new R(j7,this,0,3)),this.Ab;case 1:return this.zb;case 2:return this.D==null?this.B:this.D;case 3:return UB(this);case 4:return KRe(this);case 5:return this.F;case 6:return t?DP(this):WA(this);case 7:return!this.A&&(this.A=new BT(W7,this,7)),this.A;case 8:return $T(),!!(this.Bb&256);case 9:return!this.a&&(this.a=new R(R7,this,9,5)),this.a}return vN(this,e-lk((qG(),X7)),lP((r=L(uI(this,16),29),r||X7),e),t,n)},Q.Ph=function(e,t,n){var r,i,a;switch(t){case 0:return!this.Ab&&(this.Ab=new R(j7,this,0,3)),dz(this.Ab,e,n);case 6:return this.Cb&&(n=(i=this.Db>>16,i>=0?KB(this,n):this.Cb.Qh(this,-1-i,null,n))),bW(this,e,6,n);case 9:return!this.a&&(this.a=new R(R7,this,9,5)),dz(this.a,e,n)}return a=L(lP((r=L(uI(this,16),29),r||(qG(),X7)),t),69),a.uk().xk(this,Mz(this),t-lk((qG(),X7)),e,n)},Q.Rh=function(e,t,n){var r,i;switch(t){case 0:return!this.Ab&&(this.Ab=new R(j7,this,0,3)),lB(this.Ab,e,n);case 6:return bW(this,null,6,n);case 7:return!this.A&&(this.A=new BT(W7,this,7)),lB(this.A,e,n);case 9:return!this.a&&(this.a=new R(R7,this,9,5)),lB(this.a,e,n)}return i=L(lP((r=L(uI(this,16),29),r||(qG(),X7)),t),69),i.uk().yk(this,Mz(this),t-lk((qG(),X7)),e,n)},Q.Th=function(e){var t;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.D!=null&&this.D==this.F;case 3:return!!UB(this);case 4:return!!KRe(this);case 5:return this.F!=null&&this.F!=this.D&&this.F!=this.B;case 6:return!!WA(this);case 7:return!!this.A&&this.A.i!=0;case 8:return(this.Bb&256)==0;case 9:return!!this.a&&this.a.i!=0}return Hj(this,e-lk((qG(),X7)),lP((t=L(uI(this,16),29),t||X7),e))},Q.$h=function(e,t){var n;switch(e){case 0:!this.Ab&&(this.Ab=new R(j7,this,0,3)),uG(this.Ab),!this.Ab&&(this.Ab=new R(j7,this,0,3)),uk(this.Ab,L(t,18));return;case 1:ij(this,IE(t));return;case 2:Bw(this,IE(t));return;case 5:yG(this,IE(t));return;case 7:!this.A&&(this.A=new BT(W7,this,7)),uG(this.A),!this.A&&(this.A=new BT(W7,this,7)),uk(this.A,L(t,18));return;case 8:iR(this,X_(FE(t)));return;case 9:!this.a&&(this.a=new R(R7,this,9,5)),uG(this.a),!this.a&&(this.a=new R(R7,this,9,5)),uk(this.a,L(t,18));return}UR(this,e-lk((qG(),X7)),lP((n=L(uI(this,16),29),n||X7),e),t)},Q.fi=function(){return qG(),X7},Q.hi=function(e){var t;switch(e){case 0:!this.Ab&&(this.Ab=new R(j7,this,0,3)),uG(this.Ab);return;case 1:F(this.Cb,184)&&(L(this.Cb,184).tb=null),AF(this,null);return;case 2:EL(this,null),WP(this,this.D);return;case 5:yG(this,null);return;case 7:!this.A&&(this.A=new BT(W7,this,7)),uG(this.A);return;case 8:iR(this,!0);return;case 9:!this.a&&(this.a=new R(R7,this,9,5)),uG(this.a);return}tR(this,e-lk((qG(),X7)),lP((t=L(uI(this,16),29),t||X7),e))},Q.mi=function(){var e,t;if(this.a)for(e=0,t=this.a.i;e<t;++e)LE(W(this.a,e));XL((hH(),p9),this).ve(),this.Bb|=1},Q.gk=function(){return KRe(this)},Q.dk=function(e){return e!=null},Q.pl=function(e){},B(LX,`EEnumImpl`,459),Y(568,439,{109:1,94:1,93:1,2004:1,684:1,158:1,197:1,57:1,114:1,52:1,100:1,568:1,161:1,117:1,118:1},fre),Q.ve=function(){return this.zb},Q.xh=function(e){return wKe(this,e)},Q.Ih=function(e,t,n){var r,i;switch(e){case 0:return!this.Ab&&(this.Ab=new R(j7,this,0,3)),this.Ab;case 1:return this.zb;case 2:return q(this.d);case 3:return this.b?this.b:this.a;case 4:return i=this.c,i??this.zb;case 5:return this.Db>>16==5?L(this.Cb,675):null}return vN(this,e-lk((qG(),Z7)),lP((r=L(uI(this,16),29),r||Z7),e),t,n)},Q.Ph=function(e,t,n){var r,i,a;switch(t){case 0:return!this.Ab&&(this.Ab=new R(j7,this,0,3)),dz(this.Ab,e,n);case 5:return this.Cb&&(n=(i=this.Db>>16,i>=0?wKe(this,n):this.Cb.Qh(this,-1-i,null,n))),bW(this,e,5,n)}return a=L(lP((r=L(uI(this,16),29),r||(qG(),Z7)),t),69),a.uk().xk(this,Mz(this),t-lk((qG(),Z7)),e,n)},Q.Rh=function(e,t,n){var r,i;switch(t){case 0:return!this.Ab&&(this.Ab=new R(j7,this,0,3)),lB(this.Ab,e,n);case 5:return bW(this,null,5,n)}return i=L(lP((r=L(uI(this,16),29),r||(qG(),Z7)),t),69),i.uk().yk(this,Mz(this),t-lk((qG(),Z7)),e,n)},Q.Th=function(e){var t;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.d!=0;case 3:return!!this.b;case 4:return this.c!=null;case 5:return!!(this.Db>>16==5&&L(this.Cb,675))}return Hj(this,e-lk((qG(),Z7)),lP((t=L(uI(this,16),29),t||Z7),e))},Q.$h=function(e,t){var n;switch(e){case 0:!this.Ab&&(this.Ab=new R(j7,this,0,3)),uG(this.Ab),!this.Ab&&(this.Ab=new R(j7,this,0,3)),uk(this.Ab,L(t,18));return;case 1:AF(this,IE(t));return;case 2:VP(this,L(t,15).a);return;case 3:W$e(this,L(t,2004));return;case 4:lF(this,IE(t));return}UR(this,e-lk((qG(),Z7)),lP((n=L(uI(this,16),29),n||Z7),e),t)},Q.fi=function(){return qG(),Z7},Q.hi=function(e){var t;switch(e){case 0:!this.Ab&&(this.Ab=new R(j7,this,0,3)),uG(this.Ab);return;case 1:AF(this,null);return;case 2:VP(this,0);return;case 3:W$e(this,null);return;case 4:lF(this,null);return}tR(this,e-lk((qG(),Z7)),lP((t=L(uI(this,16),29),t||Z7),e))},Q.Ib=function(){var e;return e=this.c,e??this.zb},Q.b=null,Q.c=null,Q.d=0,B(LX,`EEnumLiteralImpl`,568);var KBt=$D(LX,`EFactoryImpl/InternalEDateTimeFormat`);Y(485,1,{2079:1},Ah),B(LX,`EFactoryImpl/1ClientInternalEDateTimeFormat`,485),Y(248,118,{109:1,94:1,93:1,87:1,57:1,114:1,52:1,100:1,248:1,117:1,118:1},Gh),Q.zh=function(e,t,n){var r;return n=bW(this,e,t,n),this.e&&F(e,179)&&(r=pU(this,this.e),r!=this.c&&(n=bG(this,r,n))),n},Q.Ih=function(e,t,n){var r;switch(e){case 0:return this.f;case 1:return!this.d&&(this.d=new zT(z7,this,1)),this.d;case 2:return t?wW(this):this.c;case 3:return this.b;case 4:return this.e;case 5:return t?AB(this):this.a}return vN(this,e-lk((qG(),$7)),lP((r=L(uI(this,16),29),r||$7),e),t,n)},Q.Rh=function(e,t,n){var r,i;switch(t){case 0:return wze(this,null,n);case 1:return!this.d&&(this.d=new zT(z7,this,1)),lB(this.d,e,n);case 3:return Cze(this,null,n)}return i=L(lP((r=L(uI(this,16),29),r||(qG(),$7)),t),69),i.uk().yk(this,Mz(this),t-lk((qG(),$7)),e,n)},Q.Th=function(e){var t;switch(e){case 0:return!!this.f;case 1:return!!this.d&&this.d.i!=0;case 2:return!!this.c;case 3:return!!this.b;case 4:return!!this.e;case 5:return!!this.a}return Hj(this,e-lk((qG(),$7)),lP((t=L(uI(this,16),29),t||$7),e))},Q.$h=function(e,t){var n;switch(e){case 0:dJe(this,L(t,87));return;case 1:!this.d&&(this.d=new zT(z7,this,1)),uG(this.d),!this.d&&(this.d=new zT(z7,this,1)),uk(this.d,L(t,18));return;case 3:uJe(this,L(t,87));return;case 4:rXe(this,L(t,835));return;case 5:EP(this,L(t,143));return}UR(this,e-lk((qG(),$7)),lP((n=L(uI(this,16),29),n||$7),e),t)},Q.fi=function(){return qG(),$7},Q.hi=function(e){var t;switch(e){case 0:dJe(this,null);return;case 1:!this.d&&(this.d=new zT(z7,this,1)),uG(this.d);return;case 3:uJe(this,null);return;case 4:rXe(this,null);return;case 5:EP(this,null);return}tR(this,e-lk((qG(),$7)),lP((t=L(uI(this,16),29),t||$7),e))},Q.Ib=function(){var e=new XT(rU(this));return e.a+=` (expression: `,tG(this,e),e.a+=`)`,e.a};var qBt;B(LX,`EGenericTypeImpl`,248),Y(2032,2027,DZ),Q.Ei=function(e,t){Ude(this,e,t)},Q.Uk=function(e,t){return Ude(this,this.gc(),e),t},Q.Yi=function(e){return cB(this.nj(),e)},Q.Gi=function(){return this.Hi()},Q.nj=function(){return new nre(this)},Q.Hi=function(){return this.Ii(0)},Q.Ii=function(e){return this.nj().dd(e)},Q.Vk=function(e,t){return rz(this,e,!0),t},Q.Ri=function(e,t){var n,r=rV(this,t);return n=this.dd(e),n.Rb(r),r},Q.Si=function(e,t){var n;rz(this,t,!0),n=this.dd(e),n.Rb(t)},B(pZ,`AbstractSequentialInternalEList`,2032),Y(482,2032,DZ,uE),Q.Yi=function(e){return cB(this.nj(),e)},Q.Gi=function(){return this.b==null?(Nb(),Nb(),u9):this.ql()},Q.nj=function(){return new tw(this.a,this.b)},Q.Hi=function(){return this.b==null?(Nb(),Nb(),u9):this.ql()},Q.Ii=function(e){var t,n;if(this.b==null){if(e<0||e>1)throw k(new V_(dZ+e+`, size=0`));return Nb(),Nb(),u9}for(n=this.ql(),t=0;t<e;++t)dI(n);return n},Q.dc=function(){var e,t,n,r,i,a;if(this.b!=null){for(n=0;n<this.b.length;++n)if(e=this.b[n],!this.tl()||this.a.Uh(e)){if(a=this.a.Kh(e,!1),Fb(),L(e,69).vk()){for(t=L(a,163),r=0,i=t.gc();r<i;++r)if(Ebe(t.Rl(r))&&t.Sl(r)!=null)return!1}else if(e.Hk()){if(!L(a,18).dc())return!1}else if(a!=null)return!1}}return!0},Q.Jc=function(){return tFe(this)},Q.dd=function(e){var t,n;if(this.b==null){if(e!=0)throw k(new V_(dZ+e+`, size=0`));return Nb(),Nb(),u9}for(n=this.sl()?this.rl():this.ql(),t=0;t<e;++t)dI(n);return n},Q.Ri=function(e,t){throw k(new pg)},Q.Si=function(e,t){throw k(new pg)},Q.ql=function(){return new dE(this.a,this.b)},Q.rl=function(){return new Que(this.a,this.b)},Q.sl=function(){return!0},Q.gc=function(){var e,t,n,r,i=0,a,o;if(this.b!=null){for(n=0;n<this.b.length;++n)if(e=this.b[n],!this.tl()||this.a.Uh(e))if(o=this.a.Kh(e,!1),Fb(),L(e,69).vk())for(t=L(o,163),r=0,a=t.gc();r<a;++r)Ebe(t.Rl(r))&&t.Sl(r)!=null&&++i;else e.Hk()?i+=L(o,18).gc():o!=null&&++i}return i},Q.tl=function(){return!0};var JBt;B(pZ,`EContentsEList`,482),Y(1147,482,DZ,Zue),Q.ql=function(){return new $ue(this.a,this.b)},Q.rl=function(){return new ede(this.a,this.b)},Q.tl=function(){return!1},B(LX,`ENamedElementImpl/1`,1147),Y(287,1,OZ,dE),Q.Nb=function(e){KO(this,e)},Q.Rb=function(e){throw k(new pg)},Q.ul=function(e){if(this.g!=0||this.e)throw k(new J_(`Iterator already in use or already filtered`));this.e=e},Q.Ob=function(){var e,t,n,r,i,a;switch(this.g){case 3:case 2:return!0;case 1:return!1;case-3:this.p?this.p.Pb():++this.n;default:if(!this.k||(this.p?!AZe(this,this.p):!Y$e(this))){for(;this.d<this.c.length;)if(t=this.c[this.d++],(!this.e||t.nk()!=$5||t.Jj()!=0)&&(!this.tl()||this.b.Uh(t))){if(a=this.b.Kh(t,this.sl()),this.f=(Fb(),L(t,69).vk()),this.f||t.Hk()){if(this.sl()?(r=L(a,16),this.k=r):(r=L(a,72),this.k=this.j=r),F(this.k,59)?(this.p=null,this.o=this.k.gc(),this.n=0):this.p=this.j?this.j.Hi():this.k.cd(),this.p?AZe(this,this.p):Y$e(this))return i=this.p?this.p.Pb():this.j?this.j.Yi(this.n++):this.k.Xb(this.n++),this.f?(e=L(i,75),e.Jk(),n=e.kd(),this.i=n):(n=i,this.i=n),this.g=3,!0}else if(a!=null)return this.k=null,this.p=null,n=a,this.i=n,this.g=2,!0}return this.k=null,this.p=null,this.f=!1,this.g=1,!1}else return i=this.p?this.p.Pb():this.j?this.j.Yi(this.n++):this.k.Xb(this.n++),this.f?(e=L(i,75),e.Jk(),n=e.kd(),this.i=n):(n=i,this.i=n),this.g=3,!0}},Q.Sb=function(){var e,t,n,r,i,a;switch(this.g){case-3:case-2:return!0;case-1:return!1;case 3:this.p?this.p.Ub():--this.n;default:if(!this.k||(this.p?!jZe(this,this.p):!mQe(this))){for(;this.d>0;)if(t=this.c[--this.d],(!this.e||t.nk()!=$5||t.Jj()!=0)&&(!this.tl()||this.b.Uh(t))){if(a=this.b.Kh(t,this.sl()),this.f=(Fb(),L(t,69).vk()),this.f||t.Hk()){if(this.sl()?(r=L(a,16),this.k=r):(r=L(a,72),this.k=this.j=r),F(this.k,59)?(this.o=this.k.gc(),this.n=this.o):this.p=this.j?this.j.Ii(this.k.gc()):this.k.dd(this.k.gc()),this.p?jZe(this,this.p):mQe(this))return i=this.p?this.p.Ub():this.j?this.j.Yi(--this.n):this.k.Xb(--this.n),this.f?(e=L(i,75),e.Jk(),n=e.kd(),this.i=n):(n=i,this.i=n),this.g=-3,!0}else if(a!=null)return this.k=null,this.p=null,n=a,this.i=n,this.g=-2,!0}return this.k=null,this.p=null,this.g=-1,!1}else return i=this.p?this.p.Ub():this.j?this.j.Yi(--this.n):this.k.Xb(--this.n),this.f?(e=L(i,75),e.Jk(),n=e.kd(),this.i=n):(n=i,this.i=n),this.g=-3,!0}},Q.Pb=function(){return dI(this)},Q.Tb=function(){return this.a},Q.Ub=function(){var e;if(this.g<-1||this.Sb())return--this.a,this.g=0,e=this.i,this.Sb(),e;throw k(new mg)},Q.Vb=function(){return this.a-1},Q.Qb=function(){throw k(new pg)},Q.sl=function(){return!1},Q.Wb=function(e){throw k(new pg)},Q.tl=function(){return!0},Q.a=0,Q.d=0,Q.f=!1,Q.g=0,Q.n=0,Q.o=0;var u9;B(pZ,`EContentsEList/FeatureIteratorImpl`,287),Y(700,287,OZ,Que),Q.sl=function(){return!0},B(pZ,`EContentsEList/ResolvingFeatureIteratorImpl`,700),Y(1148,700,OZ,ede),Q.tl=function(){return!1},B(LX,`ENamedElementImpl/1/1`,1148),Y(1149,287,OZ,$ue),Q.tl=function(){return!1},B(LX,`ENamedElementImpl/1/2`,1149),Y(39,151,uZ,rM,iM,RO,uN,VN,CM,$Ne,rEe,ePe,iEe,hke,aEe,rPe,oEe,mke,sEe,tPe,cEe,zO,dN,vSe,nPe,lEe,pke,nEe),Q.Ij=function(){return rje(this)},Q.Pj=function(){var e=rje(this);return e?e.gk():null},Q.fj=function(e){return this.b==-1&&this.a&&(this.b=this.c.Eh(this.a.Jj(),this.a.nk())),this.c.vh(this.b,e)},Q.hj=function(){return this.c},Q.Qj=function(){var e=rje(this);return e?e.rk():!1},Q.b=-1,B(LX,`ENotificationImpl`,39),Y(403,293,{109:1,94:1,93:1,158:1,197:1,57:1,62:1,114:1,470:1,52:1,100:1,161:1,403:1,293:1,117:1,118:1},s_),Q.xh=function(e){return HKe(this,e)},Q.Ih=function(e,t,n){var r,i,a;switch(e){case 0:return!this.Ab&&(this.Ab=new R(j7,this,0,3)),this.Ab;case 1:return this.zb;case 2:return $T(),!!(this.Bb&256);case 3:return $T(),!!(this.Bb&512);case 4:return q(this.s);case 5:return q(this.t);case 6:return $T(),a=this.t,a>1||a==-1;case 7:return $T(),i=this.s,i>=1;case 8:return t?cV(this):this.r;case 9:return this.q;case 10:return this.Db>>16==10?L(this.Cb,29):null;case 11:return!this.d&&(this.d=new BT(W7,this,11)),this.d;case 12:return!this.c&&(this.c=new R(H7,this,12,10)),this.c;case 13:return!this.a&&(this.a=new UE(this,this)),this.a;case 14:return LN(this)}return vN(this,e-lk((qG(),n9)),lP((r=L(uI(this,16),29),r||n9),e),t,n)},Q.Ph=function(e,t,n){var r,i,a;switch(t){case 0:return!this.Ab&&(this.Ab=new R(j7,this,0,3)),dz(this.Ab,e,n);case 10:return this.Cb&&(n=(i=this.Db>>16,i>=0?HKe(this,n):this.Cb.Qh(this,-1-i,null,n))),bW(this,e,10,n);case 12:return!this.c&&(this.c=new R(H7,this,12,10)),dz(this.c,e,n)}return a=L(lP((r=L(uI(this,16),29),r||(qG(),n9)),t),69),a.uk().xk(this,Mz(this),t-lk((qG(),n9)),e,n)},Q.Rh=function(e,t,n){var r,i;switch(t){case 0:return!this.Ab&&(this.Ab=new R(j7,this,0,3)),lB(this.Ab,e,n);case 9:return zye(this,n);case 10:return bW(this,null,10,n);case 11:return!this.d&&(this.d=new BT(W7,this,11)),lB(this.d,e,n);case 12:return!this.c&&(this.c=new R(H7,this,12,10)),lB(this.c,e,n);case 14:return lB(LN(this),e,n)}return i=L(lP((r=L(uI(this,16),29),r||(qG(),n9)),t),69),i.uk().yk(this,Mz(this),t-lk((qG(),n9)),e,n)},Q.Th=function(e){var t,n,r;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return(this.Bb&256)==0;case 3:return(this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return r=this.t,r>1||r==-1;case 7:return n=this.s,n>=1;case 8:return!!this.r&&!this.q.e&&bk(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&bk(this.q).i==0);case 10:return!!(this.Db>>16==10&&L(this.Cb,29));case 11:return!!this.d&&this.d.i!=0;case 12:return!!this.c&&this.c.i!=0;case 13:return!!this.a&&LN(this.a.a).i!=0&&!(this.b&&OB(this.b));case 14:return!!this.b&&OB(this.b)}return Hj(this,e-lk((qG(),n9)),lP((t=L(uI(this,16),29),t||n9),e))},Q.$h=function(e,t){var n,r;switch(e){case 0:!this.Ab&&(this.Ab=new R(j7,this,0,3)),uG(this.Ab),!this.Ab&&(this.Ab=new R(j7,this,0,3)),uk(this.Ab,L(t,18));return;case 1:AF(this,IE(t));return;case 2:nR(this,X_(FE(t)));return;case 3:rR(this,X_(FE(t)));return;case 4:HP(this,L(t,15).a);return;case 5:UP(this,L(t,15).a);return;case 8:PL(this,L(t,143));return;case 9:r=BV(this,L(t,87),null),r&&r.mj();return;case 11:!this.d&&(this.d=new BT(W7,this,11)),uG(this.d),!this.d&&(this.d=new BT(W7,this,11)),uk(this.d,L(t,18));return;case 12:!this.c&&(this.c=new R(H7,this,12,10)),uG(this.c),!this.c&&(this.c=new R(H7,this,12,10)),uk(this.c,L(t,18));return;case 13:!this.a&&(this.a=new UE(this,this)),dG(this.a),!this.a&&(this.a=new UE(this,this)),uk(this.a,L(t,18));return;case 14:uG(LN(this)),uk(LN(this),L(t,18));return}UR(this,e-lk((qG(),n9)),lP((n=L(uI(this,16),29),n||n9),e),t)},Q.fi=function(){return qG(),n9},Q.hi=function(e){var t,n;switch(e){case 0:!this.Ab&&(this.Ab=new R(j7,this,0,3)),uG(this.Ab);return;case 1:AF(this,null);return;case 2:nR(this,!0);return;case 3:rR(this,!0);return;case 4:HP(this,0);return;case 5:UP(this,1);return;case 8:PL(this,null);return;case 9:n=BV(this,null,null),n&&n.mj();return;case 11:!this.d&&(this.d=new BT(W7,this,11)),uG(this.d);return;case 12:!this.c&&(this.c=new R(H7,this,12,10)),uG(this.c);return;case 13:this.a&&dG(this.a);return;case 14:this.b&&uG(this.b);return}tR(this,e-lk((qG(),n9)),lP((t=L(uI(this,16),29),t||n9),e))},Q.mi=function(){var e,t;if(this.c)for(e=0,t=this.c.i;e<t;++e)LE(W(this.c,e));cV(this),this.Bb|=1},B(LX,`EOperationImpl`,403),Y(500,744,_ht,UE),Q.oj=function(e,t){ide(this,e,L(t,143))},Q.pj=function(e){Xw(this,L(e,143))},Q.vj=function(e){var t,n;return t=L(W(LN(this.a),e),87),n=t.c,n||(qG(),e9)},Q.Aj=function(e){var t,n;return t=L(zU(LN(this.a),e),87),n=t.c,n||(qG(),e9)},Q.Bj=function(e,t){return QHe(this,e,L(t,143))},Q.Ji=function(){return!1},Q.Gj=function(e,t,n,r,i){return null},Q.qj=function(){return new jh(this)},Q.rj=function(){uG(LN(this.a))},Q.sj=function(e){return hBe(this,e)},Q.tj=function(e){var t,n;for(n=e.Jc();n.Ob();)if(t=n.Pb(),!hBe(this,t))return!1;return!0},Q.uj=function(e){var t,n,r;if(F(e,16)&&(r=L(e,16),r.gc()==LN(this.a).i)){for(t=r.Jc(),n=new UT(this);t.Ob();)if(P(t.Pb())!==P($z(n)))return!1;return!0}return!1},Q.wj=function(){var e,t,n=1,r,i;for(t=new UT(LN(this.a));t.e!=t.i.gc();)e=L($z(t),87),r=(i=e.c,i||(qG(),e9)),n=31*n+(r?OF(r):0);return n},Q.xj=function(e){var t,n,r=0,i;for(n=new UT(LN(this.a));n.e!=n.i.gc();){if(t=L($z(n),87),P(e)===P((i=t.c,i||(qG(),e9))))return r;++r}return-1},Q.yj=function(){return LN(this.a).i==0},Q.zj=function(){return null},Q.Cj=function(){return LN(this.a).i},Q.Dj=function(){var e,t,n,r,i,a=LN(this.a).i;for(i=U(sQ,aK,1,a,5,1),n=0,t=new UT(LN(this.a));t.e!=t.i.gc();)e=L($z(t),87),i[n++]=(r=e.c,r||(qG(),e9));return i},Q.Ej=function(e){var t,n,r,i,a,o,s=LN(this.a).i;for(e.length<s&&(i=GP(hL(e).c,s),e=i),e.length>s&&hk(e,s,null),r=0,n=new UT(LN(this.a));n.e!=n.i.gc();)t=L($z(n),87),a=(o=t.c,o||(qG(),e9)),hk(e,r++,a);return e},Q.Fj=function(){var e,t,n,r,i=new yv;for(i.a+=`[`,e=LN(this.a),t=0,r=LN(this.a).i;t<r;)BC(i,JT((n=L(W(e,t),87).c,n||(qG(),e9)))),++t<r&&(i.a+=iK);return i.a+=`]`,i.a},Q.Hj=function(e){},Q.Jj=function(){return 13},Q.il=function(){return!0},Q.Kj=function(){return!1},Q.jl=function(){return!1},Q.kl=function(){return!1},Q.ll=function(){return!0},Q.$k=function(){return!1},Q.ml=function(){return!0},Q.dk=function(e){return F(e,143)},Q.Oj=function(){return _Ee(this.a)},Q.Qi=function(){return!0},Q.Wi=function(){return!0},B(LX,`EOperationImpl/1`,500),Y(1331,2027,LK,jh),Q.dd=function(e){return tF(this.a,e)},Q.gc=function(){return LN(this.a.a).i},B(LX,`EOperationImpl/1/1`,1331),Y(1332,544,CZ,sve),Q.Ri=function(e,t){var n,r;return n=L(gR(this,e,t),87),Dw(this.e)&&xg(this,new dN(this.a,7,(qG(),zBt),q(t),(r=n.c,r||e9),e)),n},Q.Sj=function(e,t){return Xze(this,L(e,87),t)},Q.Tj=function(e,t){return Yze(this,L(e,87),t)},Q.Uj=function(e,t,n){return EUe(this,L(e,87),L(t,87),n)},Q.Gj=function(e,t,n,r,i){switch(e){case 3:return QA(this,e,t,n,r,this.i>1);case 5:return QA(this,e,t,n,r,this.i-L(n,16).gc()>0);default:return new VN(this.e,e,this.c,t,n,r,!0)}},Q.Rj=function(){return!0},Q.Oj=function(){return OB(this)},Q.Ek=function(){uG(this)},B(LX,`EOperationImpl/2`,1332),Y(493,1,{2002:1,493:1},Fse),B(LX,`EPackageImpl/1`,493),Y(14,81,CZ,R),Q.gl=function(){return this.d},Q.hl=function(){return this.b},Q.kl=function(){return!0},Q.b=0,B(pZ,`EObjectContainmentWithInverseEList`,14),Y(361,14,CZ,aD),Q.ll=function(){return!0},Q.Ui=function(e,t){return KH(this,e,L(t,57))},B(pZ,`EObjectContainmentWithInverseEList/Resolving`,361),Y(313,361,CZ,LO),Q.Li=function(){this.a.tb=null},B(LX,`EPackageImpl/2`,313),Y(1244,1,{},xl),B(LX,`EPackageImpl/3`,1244),Y(721,44,Aq,c_),Q._b=function(e){return DC(e)?DSe(this,e):!!_O(this.f,e)},B(LX,`EPackageRegistryImpl`,721),Y(504,293,{109:1,94:1,93:1,158:1,197:1,57:1,2081:1,114:1,470:1,52:1,100:1,161:1,504:1,293:1,117:1,118:1},l_),Q.xh=function(e){return UKe(this,e)},Q.Ih=function(e,t,n){var r,i,a;switch(e){case 0:return!this.Ab&&(this.Ab=new R(j7,this,0,3)),this.Ab;case 1:return this.zb;case 2:return $T(),!!(this.Bb&256);case 3:return $T(),!!(this.Bb&512);case 4:return q(this.s);case 5:return q(this.t);case 6:return $T(),a=this.t,a>1||a==-1;case 7:return $T(),i=this.s,i>=1;case 8:return t?cV(this):this.r;case 9:return this.q;case 10:return this.Db>>16==10?L(this.Cb,62):null}return vN(this,e-lk((qG(),i9)),lP((r=L(uI(this,16),29),r||i9),e),t,n)},Q.Ph=function(e,t,n){var r,i,a;switch(t){case 0:return!this.Ab&&(this.Ab=new R(j7,this,0,3)),dz(this.Ab,e,n);case 10:return this.Cb&&(n=(i=this.Db>>16,i>=0?UKe(this,n):this.Cb.Qh(this,-1-i,null,n))),bW(this,e,10,n)}return a=L(lP((r=L(uI(this,16),29),r||(qG(),i9)),t),69),a.uk().xk(this,Mz(this),t-lk((qG(),i9)),e,n)},Q.Rh=function(e,t,n){var r,i;switch(t){case 0:return!this.Ab&&(this.Ab=new R(j7,this,0,3)),lB(this.Ab,e,n);case 9:return zye(this,n);case 10:return bW(this,null,10,n)}return i=L(lP((r=L(uI(this,16),29),r||(qG(),i9)),t),69),i.uk().yk(this,Mz(this),t-lk((qG(),i9)),e,n)},Q.Th=function(e){var t,n,r;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return(this.Bb&256)==0;case 3:return(this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return r=this.t,r>1||r==-1;case 7:return n=this.s,n>=1;case 8:return!!this.r&&!this.q.e&&bk(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&bk(this.q).i==0);case 10:return!!(this.Db>>16==10&&L(this.Cb,62))}return Hj(this,e-lk((qG(),i9)),lP((t=L(uI(this,16),29),t||i9),e))},Q.fi=function(){return qG(),i9},B(LX,`EParameterImpl`,504),Y(103,451,{109:1,94:1,93:1,158:1,197:1,57:1,19:1,179:1,69:1,114:1,470:1,52:1,100:1,161:1,103:1,451:1,293:1,117:1,118:1,682:1},bde),Q.Ih=function(e,t,n){var r,i,a,o;switch(e){case 0:return!this.Ab&&(this.Ab=new R(j7,this,0,3)),this.Ab;case 1:return this.zb;case 2:return $T(),!!(this.Bb&256);case 3:return $T(),!!(this.Bb&512);case 4:return q(this.s);case 5:return q(this.t);case 6:return $T(),o=this.t,o>1||o==-1;case 7:return $T(),i=this.s,i>=1;case 8:return t?cV(this):this.r;case 9:return this.q;case 10:return $T(),(this.Bb&fZ)!=0;case 11:return $T(),(this.Bb&RX)!=0;case 12:return $T(),(this.Bb&xq)!=0;case 13:return this.j;case 14:return vU(this);case 15:return $T(),(this.Bb&mZ)!=0;case 16:return $T(),(this.Bb&bK)!=0;case 17:return KA(this);case 18:return $T(),(this.Bb&IX)!=0;case 19:return $T(),a=CB(this),!!(a&&(a.Bb&IX)!=0);case 20:return $T(),(this.Bb&Cq)!=0;case 21:return t?CB(this):this.b;case 22:return t?jLe(this):uke(this);case 23:return!this.a&&(this.a=new VT(P7,this,23)),this.a}return vN(this,e-lk((qG(),a9)),lP((r=L(uI(this,16),29),r||a9),e),t,n)},Q.Th=function(e){var t,n,r,i;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return(this.Bb&256)==0;case 3:return(this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return i=this.t,i>1||i==-1;case 7:return n=this.s,n>=1;case 8:return!!this.r&&!this.q.e&&bk(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&bk(this.q).i==0);case 10:return(this.Bb&fZ)==0;case 11:return(this.Bb&RX)!=0;case 12:return(this.Bb&xq)!=0;case 13:return this.j!=null;case 14:return vU(this)!=null;case 15:return(this.Bb&mZ)!=0;case 16:return(this.Bb&bK)!=0;case 17:return!!KA(this);case 18:return(this.Bb&IX)!=0;case 19:return r=CB(this),!!r&&(r.Bb&IX)!=0;case 20:return(this.Bb&Cq)==0;case 21:return!!this.b;case 22:return!!uke(this);case 23:return!!this.a&&this.a.i!=0}return Hj(this,e-lk((qG(),a9)),lP((t=L(uI(this,16),29),t||a9),e))},Q.$h=function(e,t){var n,r;switch(e){case 0:!this.Ab&&(this.Ab=new R(j7,this,0,3)),uG(this.Ab),!this.Ab&&(this.Ab=new R(j7,this,0,3)),uk(this.Ab,L(t,18));return;case 1:Owe(this,IE(t));return;case 2:nR(this,X_(FE(t)));return;case 3:rR(this,X_(FE(t)));return;case 4:HP(this,L(t,15).a);return;case 5:UP(this,L(t,15).a);return;case 8:PL(this,L(t,143));return;case 9:r=BV(this,L(t,87),null),r&&r.mj();return;case 10:yR(this,X_(FE(t)));return;case 11:xR(this,X_(FE(t)));return;case 12:bR(this,X_(FE(t)));return;case 13:CC(this,IE(t));return;case 15:vR(this,X_(FE(t)));return;case 16:IR(this,X_(FE(t)));return;case 18:Dwe(this,X_(FE(t)));return;case 20:JBe(this,X_(FE(t)));return;case 21:iFe(this,L(t,19));return;case 23:!this.a&&(this.a=new VT(P7,this,23)),uG(this.a),!this.a&&(this.a=new VT(P7,this,23)),uk(this.a,L(t,18));return}UR(this,e-lk((qG(),a9)),lP((n=L(uI(this,16),29),n||a9),e),t)},Q.fi=function(){return qG(),a9},Q.hi=function(e){var t,n;switch(e){case 0:!this.Ab&&(this.Ab=new R(j7,this,0,3)),uG(this.Ab);return;case 1:F(this.Cb,88)&&EH(xM(L(this.Cb,88)),4),AF(this,null);return;case 2:nR(this,!0);return;case 3:rR(this,!0);return;case 4:HP(this,0);return;case 5:UP(this,1);return;case 8:PL(this,null);return;case 9:n=BV(this,null,null),n&&n.mj();return;case 10:yR(this,!0);return;case 11:xR(this,!1);return;case 12:bR(this,!1);return;case 13:this.i=null,mF(this,null);return;case 15:vR(this,!1);return;case 16:IR(this,!1);return;case 18:qBe(this,!1),F(this.Cb,88)&&EH(xM(L(this.Cb,88)),2);return;case 20:JBe(this,!0);return;case 21:iFe(this,null);return;case 23:!this.a&&(this.a=new VT(P7,this,23)),uG(this.a);return}tR(this,e-lk((qG(),a9)),lP((t=L(uI(this,16),29),t||a9),e))},Q.mi=function(){jLe(this),Kk(FN((hH(),p9),this)),cV(this),this.Bb|=1},Q.sk=function(){return CB(this)},Q.Zk=function(){var e;return e=CB(this),!!e&&(e.Bb&IX)!=0},Q.$k=function(){return(this.Bb&IX)!=0},Q._k=function(){return(this.Bb&Cq)!=0},Q.Wk=function(e,t){return this.c=null,Jze(this,e,t)},Q.Ib=function(){var e;return this.Db&64?ZU(this):(e=new YT(ZU(this)),e.a+=` (containment: `,gy(e,(this.Bb&IX)!=0),e.a+=`, resolveProxies: `,gy(e,(this.Bb&Cq)!=0),e.a+=`)`,e.a)},B(LX,`EReferenceImpl`,103),Y(550,118,{109:1,45:1,94:1,93:1,136:1,57:1,114:1,52:1,100:1,550:1,117:1,118:1},Sl),Q.Fb=function(e){return this===e},Q.jd=function(){return this.b},Q.kd=function(){return this.c},Q.Hb=function(){return iE(this)},Q.Ai=function(e){v_e(this,IE(e))},Q.ld=function(e){return Nge(this,IE(e))},Q.Ih=function(e,t,n){var r;switch(e){case 0:return this.b;case 1:return this.c}return vN(this,e-lk((qG(),o9)),lP((r=L(uI(this,16),29),r||o9),e),t,n)},Q.Th=function(e){var t;switch(e){case 0:return this.b!=null;case 1:return this.c!=null}return Hj(this,e-lk((qG(),o9)),lP((t=L(uI(this,16),29),t||o9),e))},Q.$h=function(e,t){var n;switch(e){case 0:y_e(this,IE(t));return;case 1:BPe(this,IE(t));return}UR(this,e-lk((qG(),o9)),lP((n=L(uI(this,16),29),n||o9),e),t)},Q.fi=function(){return qG(),o9},Q.hi=function(e){var t;switch(e){case 0:WPe(this,null);return;case 1:BPe(this,null);return}tR(this,e-lk((qG(),o9)),lP((t=L(uI(this,16),29),t||o9),e))},Q.yi=function(){var e;return this.a==-1&&(e=this.b,this.a=e==null?0:sL(e)),this.a},Q.zi=function(e){this.a=e},Q.Ib=function(){var e;return this.Db&64?rU(this):(e=new YT(rU(this)),e.a+=` (key: `,BC(e,this.b),e.a+=`, value: `,BC(e,this.c),e.a+=`)`,e.a)},Q.a=-1,Q.b=null,Q.c=null;var d9=B(LX,`EStringToStringMapEntryImpl`,550),YBt=$D(pZ,`FeatureMap/Entry/Internal`);Y(562,1,kZ),Q.vl=function(e){return this.wl(L(e,52))},Q.wl=function(e){return this.vl(e)},Q.Fb=function(e){var t,n;return this===e?!0:F(e,75)?(t=L(e,75),t.Jk()==this.c?(n=this.kd(),n==null?t.kd()==null:$L(n,t.kd())):!1):!1},Q.Jk=function(){return this.c},Q.Hb=function(){var e=this.kd();return OF(this.c)^(e==null?0:OF(e))},Q.Ib=function(){var e=this.c,t=DP(e.ok()).vi();return e.ve(),(t!=null&&t.length!=0?t+`:`+e.ve():e.ve())+`=`+this.kd()},B(LX,`EStructuralFeatureImpl/BasicFeatureMapEntry`,562),Y(778,562,kZ,lfe),Q.wl=function(e){return new lfe(this.c,e)},Q.kd=function(){return this.a},Q.xl=function(e,t,n){return KFe(this,e,this.a,t,n)},Q.yl=function(e,t,n){return qFe(this,e,this.a,t,n)},B(LX,`EStructuralFeatureImpl/ContainmentUpdatingFeatureMapEntry`,778),Y(1305,1,{},Ise),Q.wk=function(e,t,n,r,i){return L(mN(e,this.b),219).Wl(this.a).Dk(r)},Q.xk=function(e,t,n,r,i){return L(mN(e,this.b),219).Nl(this.a,r,i)},Q.yk=function(e,t,n,r,i){return L(mN(e,this.b),219).Ol(this.a,r,i)},Q.zk=function(e,t,n){return L(mN(e,this.b),219).Wl(this.a).Oj()},Q.Ak=function(e,t,n,r){L(mN(e,this.b),219).Wl(this.a).Wb(r)},Q.Bk=function(e,t,n){return L(mN(e,this.b),219).Wl(this.a)},Q.Ck=function(e,t,n){L(mN(e,this.b),219).Wl(this.a).Ek()},B(LX,`EStructuralFeatureImpl/InternalSettingDelegateFeatureMapDelegator`,1305),Y(89,1,{},OD,iA,yA,tM),Q.wk=function(e,t,n,r,i){var a=t.ii(n);if(a??t.ji(n,a=HG(this,e)),!i)switch(this.e){case 50:case 41:return L(a,587)._j();case 40:return L(a,219).Tl()}return a},Q.xk=function(e,t,n,r,i){var a,o=t.ii(n);return o??t.ji(n,o=HG(this,e)),a=L(o,72).Uk(r,i),a},Q.yk=function(e,t,n,r,i){var a=t.ii(n);return a!=null&&(i=L(a,72).Vk(r,i)),i},Q.zk=function(e,t,n){var r=t.ii(n);return r!=null&&L(r,78).Oj()},Q.Ak=function(e,t,n,r){var i=L(t.ii(n),78);!i&&t.ji(n,i=HG(this,e)),i.Wb(r)},Q.Bk=function(e,t,n){var r,i=t.ii(n);return i??t.ji(n,i=HG(this,e)),F(i,78)?L(i,78):(r=L(t.ii(n),16),new ere(r))},Q.Ck=function(e,t,n){var r=L(t.ii(n),78);!r&&t.ji(n,r=HG(this,e)),r.Ek()},Q.b=0,Q.e=0,B(LX,`EStructuralFeatureImpl/InternalSettingDelegateMany`,89),Y(499,1,{}),Q.xk=function(e,t,n,r,i){throw k(new pg)},Q.yk=function(e,t,n,r,i){throw k(new pg)},Q.Bk=function(e,t,n){return new Rxe(this,e,t,n)};var f9;B(LX,`EStructuralFeatureImpl/InternalSettingDelegateSingle`,499),Y(1322,1,uht,Rxe),Q.Dk=function(e){return this.a.wk(this.c,this.d,this.b,e,!0)},Q.Oj=function(){return this.a.zk(this.c,this.d,this.b)},Q.Wb=function(e){this.a.Ak(this.c,this.d,this.b,e)},Q.Ek=function(){this.a.Ck(this.c,this.d,this.b)},Q.b=0,B(LX,`EStructuralFeatureImpl/InternalSettingDelegateSingle/1`,1322),Y(771,499,{},_Ce),Q.wk=function(e,t,n,r,i){return cW(e,e.Mh(),e.Ch())==this.b?this._k()&&r?YH(e):e.Mh():null},Q.xk=function(e,t,n,r,i){var a,o;return e.Mh()&&(i=(a=e.Ch(),a>=0?e.xh(i):e.Mh().Qh(e,-1-a,null,i))),o=iz(e.Ah(),this.e),e.zh(r,o,i)},Q.yk=function(e,t,n,r,i){var a=iz(e.Ah(),this.e);return e.zh(null,a,i)},Q.zk=function(e,t,n){var r=iz(e.Ah(),this.e);return!!e.Mh()&&e.Ch()==r},Q.Ak=function(e,t,n,r){var i,a,o,s,c;if(r!=null&&!TW(this.a,r))throw k(new K_(AZ+(F(r,57)?oJe(L(r,57).Ah()):PNe(hL(r)))+jZ+this.a+`'`));if(i=e.Mh(),o=iz(e.Ah(),this.e),P(r)!==P(i)||e.Ch()!=o&&r!=null){if(oV(e,L(r,57)))throw k(new q_(BX+e.Ib()));c=null,i&&(c=(a=e.Ch(),a>=0?e.xh(c):e.Mh().Qh(e,-1-a,null,c))),s=L(r,52),s&&(c=s.Oh(e,iz(s.Ah(),this.b),null,c)),c=e.zh(s,o,c),c&&c.mj()}else e.sh()&&e.th()&&nI(e,new RO(e,1,o,r,r))},Q.Ck=function(e,t,n){var r=e.Mh(),i,a,o;r?(o=(i=e.Ch(),i>=0?e.xh(null):e.Mh().Qh(e,-1-i,null,null)),a=iz(e.Ah(),this.e),o=e.zh(null,a,o),o&&o.mj()):e.sh()&&e.th()&&nI(e,new zO(e,1,this.e,null,null))},Q._k=function(){return!1},B(LX,`EStructuralFeatureImpl/InternalSettingDelegateSingleContainer`,771),Y(1306,771,{},Bhe),Q._k=function(){return!0},B(LX,`EStructuralFeatureImpl/InternalSettingDelegateSingleContainerResolving`,1306),Y(560,499,{}),Q.wk=function(e,t,n,r,i){var a;return a=t.ii(n),a==null?this.b:P(a)===P(f9)?null:a},Q.zk=function(e,t,n){var r=t.ii(n);return r!=null&&(P(r)===P(f9)||!$L(r,this.b))},Q.Ak=function(e,t,n,r){var i,a;e.sh()&&e.th()?(i=(a=t.ii(n),a==null?this.b:P(a)===P(f9)?null:a),r==null?this.c==null?this.b==null?t.ji(n,null):t.ji(n,f9):(t.ji(n,null),r=this.b):(this.zl(r),t.ji(n,r)),nI(e,this.d.Al(e,1,this.e,i,r))):r==null?this.c==null?this.b==null?t.ji(n,null):t.ji(n,f9):t.ji(n,null):(this.zl(r),t.ji(n,r))},Q.Ck=function(e,t,n){var r,i;e.sh()&&e.th()?(r=(i=t.ii(n),i==null?this.b:P(i)===P(f9)?null:i),t.ki(n),nI(e,this.d.Al(e,1,this.e,r,this.b))):t.ki(n)},Q.zl=function(e){throw k(new gre)},B(LX,`EStructuralFeatureImpl/InternalSettingDelegateSingleData`,560),Y(MZ,1,{},Cl),Q.Al=function(e,t,n,r,i){return new zO(e,t,n,r,i)},Q.Bl=function(e,t,n,r,i,a){return new vSe(e,t,n,r,i,a)};var XBt,ZBt,QBt,$Bt,eVt,tVt,nVt,rVt,iVt;B(LX,`EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator`,MZ),Y(1323,MZ,{},wl),Q.Al=function(e,t,n,r,i){return new pke(e,t,n,X_(FE(r)),X_(FE(i)))},Q.Bl=function(e,t,n,r,i,a){return new nEe(e,t,n,X_(FE(r)),X_(FE(i)),a)},B(LX,`EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/1`,1323),Y(1324,MZ,{},Tl),Q.Al=function(e,t,n,r,i){return new $Ne(e,t,n,L(r,221).a,L(i,221).a)},Q.Bl=function(e,t,n,r,i,a){return new rEe(e,t,n,L(r,221).a,L(i,221).a,a)},B(LX,`EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/2`,1324),Y(1325,MZ,{},El),Q.Al=function(e,t,n,r,i){return new ePe(e,t,n,L(r,180).a,L(i,180).a)},Q.Bl=function(e,t,n,r,i,a){return new iEe(e,t,n,L(r,180).a,L(i,180).a,a)},B(LX,`EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/3`,1325),Y(1326,MZ,{},Dl),Q.Al=function(e,t,n,r,i){return new hke(e,t,n,A(I(r)),A(I(i)))},Q.Bl=function(e,t,n,r,i,a){return new aEe(e,t,n,A(I(r)),A(I(i)),a)},B(LX,`EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/4`,1326),Y(1327,MZ,{},Ol),Q.Al=function(e,t,n,r,i){return new rPe(e,t,n,L(r,164).a,L(i,164).a)},Q.Bl=function(e,t,n,r,i,a){return new oEe(e,t,n,L(r,164).a,L(i,164).a,a)},B(LX,`EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/5`,1327),Y(1328,MZ,{},kl),Q.Al=function(e,t,n,r,i){return new mke(e,t,n,L(r,15).a,L(i,15).a)},Q.Bl=function(e,t,n,r,i,a){return new sEe(e,t,n,L(r,15).a,L(i,15).a,a)},B(LX,`EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/6`,1328),Y(1329,MZ,{},Al),Q.Al=function(e,t,n,r,i){return new tPe(e,t,n,L(r,190).a,L(i,190).a)},Q.Bl=function(e,t,n,r,i,a){return new cEe(e,t,n,L(r,190).a,L(i,190).a,a)},B(LX,`EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/7`,1329),Y(1330,MZ,{},jl),Q.Al=function(e,t,n,r,i){return new nPe(e,t,n,L(r,191).a,L(i,191).a)},Q.Bl=function(e,t,n,r,i,a){return new lEe(e,t,n,L(r,191).a,L(i,191).a,a)},B(LX,`EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/8`,1330),Y(1308,560,{},Hxe),Q.zl=function(e){if(!this.a.dk(e))throw k(new K_(AZ+hL(e)+jZ+this.a+`'`))},B(LX,`EStructuralFeatureImpl/InternalSettingDelegateSingleDataDynamic`,1308),Y(1309,560,{},cve),Q.zl=function(e){},B(LX,`EStructuralFeatureImpl/InternalSettingDelegateSingleDataStatic`,1309),Y(772,560,{}),Q.zk=function(e,t,n){return t.ii(n)!=null},Q.Ak=function(e,t,n,r){var i,a;e.sh()&&e.th()?(i=!0,a=t.ii(n),a==null?(i=!1,a=this.b):P(a)===P(f9)&&(a=null),r==null?this.c==null?t.ji(n,f9):(t.ji(n,null),r=this.b):(this.zl(r),t.ji(n,r)),nI(e,this.d.Bl(e,1,this.e,a,r,!i))):r==null?this.c==null?t.ji(n,f9):t.ji(n,null):(this.zl(r),t.ji(n,r))},Q.Ck=function(e,t,n){var r,i;e.sh()&&e.th()?(r=!0,i=t.ii(n),i==null?(r=!1,i=this.b):P(i)===P(f9)&&(i=null),t.ki(n),nI(e,this.d.Bl(e,2,this.e,i,this.b,r))):t.ki(n)},B(LX,`EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettable`,772),Y(1310,772,{},Uxe),Q.zl=function(e){if(!this.a.dk(e))throw k(new K_(AZ+hL(e)+jZ+this.a+`'`))},B(LX,`EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettableDynamic`,1310),Y(1311,772,{},lve),Q.zl=function(e){},B(LX,`EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettableStatic`,1311),Y(402,499,{},lO),Q.wk=function(e,t,n,r,i){var a,o,s,c,l=t.ii(n);if(this.rk()&&P(l)===P(f9))return null;if(this._k()&&r&&l!=null){if(s=L(l,52),s.Sh()&&(c=WL(e,s),s!=c)){if(!TW(this.a,c))throw k(new K_(AZ+hL(c)+jZ+this.a+`'`));t.ji(n,l=c),this.$k()&&(a=L(c,52),o=s.Qh(e,this.b?iz(s.Ah(),this.b):-1-iz(e.Ah(),this.e),null,null),!a.Mh()&&(o=a.Oh(e,this.b?iz(a.Ah(),this.b):-1-iz(e.Ah(),this.e),null,o)),o&&o.mj()),e.sh()&&e.th()&&nI(e,new zO(e,9,this.e,s,c))}return l}else return l},Q.xk=function(e,t,n,r,i){var a,o=t.ii(n);return P(o)===P(f9)&&(o=null),t.ji(n,r),this.Kj()?P(o)!==P(r)&&o!=null&&(a=L(o,52),i=a.Qh(e,iz(a.Ah(),this.b),null,i)):this.$k()&&o!=null&&(i=L(o,52).Qh(e,-1-iz(e.Ah(),this.e),null,i)),e.sh()&&e.th()&&(!i&&(i=new oy(4)),i.lj(new zO(e,1,this.e,o,r))),i},Q.yk=function(e,t,n,r,i){var a=t.ii(n);return P(a)===P(f9)&&(a=null),t.ki(n),e.sh()&&e.th()&&(!i&&(i=new oy(4)),this.rk()?i.lj(new zO(e,2,this.e,a,null)):i.lj(new zO(e,1,this.e,a,null))),i},Q.zk=function(e,t,n){return t.ii(n)!=null},Q.Ak=function(e,t,n,r){var i,a,o,s,c;if(r!=null&&!TW(this.a,r))throw k(new K_(AZ+(F(r,57)?oJe(L(r,57).Ah()):PNe(hL(r)))+jZ+this.a+`'`));c=t.ii(n),s=c!=null,this.rk()&&P(c)===P(f9)&&(c=null),o=null,this.Kj()?P(c)!==P(r)&&(c!=null&&(i=L(c,52),o=i.Qh(e,iz(i.Ah(),this.b),null,o)),r!=null&&(i=L(r,52),o=i.Oh(e,iz(i.Ah(),this.b),null,o))):this.$k()&&P(c)!==P(r)&&(c!=null&&(o=L(c,52).Qh(e,-1-iz(e.Ah(),this.e),null,o)),r!=null&&(o=L(r,52).Oh(e,-1-iz(e.Ah(),this.e),null,o))),r==null&&this.rk()?t.ji(n,f9):t.ji(n,r),e.sh()&&e.th()?(a=new vSe(e,1,this.e,c,r,this.rk()&&!s),o?(o.lj(a),o.mj()):nI(e,a)):o&&o.mj()},Q.Ck=function(e,t,n){var r,i,a,o,s=t.ii(n);o=s!=null,this.rk()&&P(s)===P(f9)&&(s=null),a=null,s!=null&&(this.Kj()?(r=L(s,52),a=r.Qh(e,iz(r.Ah(),this.b),null,a)):this.$k()&&(a=L(s,52).Qh(e,-1-iz(e.Ah(),this.e),null,a))),t.ki(n),e.sh()&&e.th()?(i=new vSe(e,this.rk()?2:1,this.e,s,null,o),a?(a.lj(i),a.mj()):nI(e,i)):a&&a.mj()},Q.Kj=function(){return!1},Q.$k=function(){return!1},Q._k=function(){return!1},Q.rk=function(){return!1},B(LX,`EStructuralFeatureImpl/InternalSettingDelegateSingleEObject`,402),Y(561,402,{},ME),Q.$k=function(){return!0},B(LX,`EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainment`,561),Y(1314,561,{},cde),Q._k=function(){return!0},B(LX,`EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentResolving`,1314),Y(774,561,{},lde),Q.rk=function(){return!0},B(LX,`EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentUnsettable`,774),Y(1316,774,{},ude),Q._k=function(){return!0},B(LX,`EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentUnsettableResolving`,1316),Y(639,561,{},Vhe),Q.Kj=function(){return!0},B(LX,`EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverse`,639),Y(1315,639,{},Whe),Q._k=function(){return!0},B(LX,`EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseResolving`,1315),Y(775,639,{},Ghe),Q.rk=function(){return!0},B(LX,`EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseUnsettable`,775),Y(1317,775,{},Khe),Q._k=function(){return!0},B(LX,`EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseUnsettableResolving`,1317),Y(640,402,{},ode),Q._k=function(){return!0},B(LX,`EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolving`,640),Y(1318,640,{},dde),Q.rk=function(){return!0},B(LX,`EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingUnsettable`,1318),Y(776,640,{},Hhe),Q.Kj=function(){return!0},B(LX,`EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingWithInverse`,776),Y(1319,776,{},qhe),Q.rk=function(){return!0},B(LX,`EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingWithInverseUnsettable`,1319),Y(1312,402,{},sde),Q.rk=function(){return!0},B(LX,`EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectUnsettable`,1312),Y(773,402,{},Uhe),Q.Kj=function(){return!0},B(LX,`EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectWithInverse`,773),Y(1313,773,{},Jhe),Q.rk=function(){return!0},B(LX,`EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectWithInverseUnsettable`,1313),Y(777,562,kZ,_be),Q.wl=function(e){return new _be(this.a,this.c,e)},Q.kd=function(){return this.b},Q.xl=function(e,t,n){return FAe(this,e,this.b,n)},Q.yl=function(e,t,n){return IAe(this,e,this.b,n)},B(LX,`EStructuralFeatureImpl/InverseUpdatingFeatureMapEntry`,777),Y(1320,1,uht,ere),Q.Dk=function(e){return this.a},Q.Oj=function(){return F(this.a,98)?L(this.a,98).Oj():!this.a.dc()},Q.Wb=function(e){this.a.$b(),this.a.Fc(L(e,16))},Q.Ek=function(){F(this.a,98)?L(this.a,98).Ek():this.a.$b()},B(LX,`EStructuralFeatureImpl/SettingMany`,1320),Y(1321,562,kZ,hOe),Q.vl=function(e){return new eD((hG(),A9),this.b.oi(this.a,e))},Q.kd=function(){return null},Q.xl=function(e,t,n){return n},Q.yl=function(e,t,n){return n},B(LX,`EStructuralFeatureImpl/SimpleContentFeatureMapEntry`,1321),Y(641,562,kZ,eD),Q.vl=function(e){return new eD(this.c,e)},Q.kd=function(){return this.a},Q.xl=function(e,t,n){return n},Q.yl=function(e,t,n){return n},B(LX,`EStructuralFeatureImpl/SimpleFeatureMapEntry`,641),Y(396,492,rZ,Ml),Q.$i=function(e){return U(I7,aK,29,e,0,1)},Q.Wi=function(){return!1},B(LX,`ESuperAdapter/1`,396),Y(446,439,{109:1,94:1,93:1,158:1,197:1,57:1,114:1,835:1,52:1,100:1,161:1,446:1,117:1,118:1},Nl),Q.Ih=function(e,t,n){var r;switch(e){case 0:return!this.Ab&&(this.Ab=new R(j7,this,0,3)),this.Ab;case 1:return this.zb;case 2:return!this.a&&(this.a=new dO(this,z7,this)),this.a}return vN(this,e-lk((qG(),s9)),lP((r=L(uI(this,16),29),r||s9),e),t,n)},Q.Rh=function(e,t,n){var r,i;switch(t){case 0:return!this.Ab&&(this.Ab=new R(j7,this,0,3)),lB(this.Ab,e,n);case 2:return!this.a&&(this.a=new dO(this,z7,this)),lB(this.a,e,n)}return i=L(lP((r=L(uI(this,16),29),r||(qG(),s9)),t),69),i.uk().yk(this,Mz(this),t-lk((qG(),s9)),e,n)},Q.Th=function(e){var t;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return!!this.a&&this.a.i!=0}return Hj(this,e-lk((qG(),s9)),lP((t=L(uI(this,16),29),t||s9),e))},Q.$h=function(e,t){var n;switch(e){case 0:!this.Ab&&(this.Ab=new R(j7,this,0,3)),uG(this.Ab),!this.Ab&&(this.Ab=new R(j7,this,0,3)),uk(this.Ab,L(t,18));return;case 1:AF(this,IE(t));return;case 2:!this.a&&(this.a=new dO(this,z7,this)),uG(this.a),!this.a&&(this.a=new dO(this,z7,this)),uk(this.a,L(t,18));return}UR(this,e-lk((qG(),s9)),lP((n=L(uI(this,16),29),n||s9),e),t)},Q.fi=function(){return qG(),s9},Q.hi=function(e){var t;switch(e){case 0:!this.Ab&&(this.Ab=new R(j7,this,0,3)),uG(this.Ab);return;case 1:AF(this,null);return;case 2:!this.a&&(this.a=new dO(this,z7,this)),uG(this.a);return}tR(this,e-lk((qG(),s9)),lP((t=L(uI(this,16),29),t||s9),e))},B(LX,`ETypeParameterImpl`,446),Y(447,81,CZ,dO),Q.Lj=function(e,t){return mYe(this,L(e,87),t)},Q.Mj=function(e,t){return hYe(this,L(e,87),t)},B(LX,`ETypeParameterImpl/1`,447),Y(638,44,Aq,u_),Q.ec=function(){return new Mh(this)},B(LX,`ETypeParameterImpl/2`,638),Y(557,hK,gK,Mh),Q.Ec=function(e){return Ufe(this,L(e,87))},Q.Fc=function(e){var t,n,r=!1;for(n=e.Jc();n.Ob();)t=L(n.Pb(),87),Rk(this.a,t,``)??(r=!0);return r},Q.$b=function(){ZO(this.a)},Q.Gc=function(e){return WO(this.a,e)},Q.Jc=function(){var e;return e=new $F(new Zp(this.a).a),new Nh(e)},Q.Kc=function(e){return Gke(this,e)},Q.gc=function(){return Xy(this.a)},B(LX,`ETypeParameterImpl/2/1`,557),Y(558,1,dK,Nh),Q.Nb=function(e){KO(this,e)},Q.Pb=function(){return L(hF(this.a).jd(),87)},Q.Ob=function(){return this.a.b},Q.Qb=function(){dMe(this.a)},B(LX,`ETypeParameterImpl/2/1/1`,558),Y(1282,44,Aq,Fre),Q._b=function(e){return DC(e)?DSe(this,e):!!_O(this.f,e)},Q.xc=function(e){var t=DC(e)?NA(this,e):kC(_O(this.f,e)),n;return F(t,836)?(n=L(t,836),t=n.Ik(),Rk(this,L(e,241),t),t):t??(e==null?(Pb(),fVt):null)},B(LX,`EValidatorRegistryImpl`,1282),Y(1304,710,{109:1,94:1,93:1,469:1,158:1,57:1,114:1,2005:1,52:1,100:1,161:1,117:1,118:1},Pl),Q.oi=function(e,t){switch(e.fk()){case 21:case 22:case 23:case 24:case 26:case 31:case 32:case 37:case 38:case 39:case 40:case 43:case 44:case 48:case 49:case 20:return t==null?null:WR(t);case 25:return jNe(t);case 27:return xje(t);case 28:return Sje(t);case 29:return t==null?null:Kce(h7[0],L(t,205));case 41:return t==null?``:vy(L(t,298));case 42:return WR(t);case 50:return IE(t);default:throw k(new q_(VX+e.ve()+HX))}},Q.pi=function(e){var t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g;switch(e.G==-1&&(e.G=(f=DP(e),f?gB(f.si(),e):-1)),e.G){case 0:return n=new o_,n;case 1:return t=new pl,t;case 2:return r=new Sf,r;case 4:return i=new hg,i;case 5:return a=new Pre,a;case 6:return o=new fre,o;case 7:return s=new xf,s;case 10:return l=new dl,l;case 11:return u=new s_,u;case 12:return d=new hSe,d;case 13:return p=new l_,p;case 14:return m=new bde,m;case 17:return h=new Sl,h;case 18:return c=new Gh,c;case 19:return g=new Nl,g;default:throw k(new q_(Mpt+e.zb+HX))}},Q.qi=function(e,t){switch(e.fk()){case 20:return t==null?null:new yy(t);case 21:return t==null?null:new Uw(t);case 23:case 22:return t==null?null:qHe(t);case 26:case 24:return t==null?null:WN(_W(t,-128,127)<<24>>24);case 25:return E0e(t);case 27:return WGe(t);case 28:return GGe(t);case 29:return GYe(t);case 32:case 31:return t==null?null:tH(t);case 38:case 37:return t==null?null:new Cg(t);case 40:case 39:return t==null?null:q(_W(t,HK,eK));case 41:return null;case 42:return null;case 44:case 43:return t==null?null:Fz(AG(t));case 49:case 48:return t==null?null:KL(_W(t,PZ,32767)<<16>>16);case 50:return t;default:throw k(new q_(VX+e.ve()+HX))}},B(LX,`EcoreFactoryImpl`,1304),Y(549,184,{109:1,94:1,93:1,158:1,197:1,57:1,241:1,114:1,2003:1,52:1,100:1,161:1,184:1,549:1,117:1,118:1,680:1},Gbe),Q.gb=!1,Q.hb=!1;var aVt,oVt=!1;B(LX,`EcorePackageImpl`,549),Y(1200,1,{836:1},Fl),Q.Ik=function(){return Ale(),pVt},B(LX,`EcorePackageImpl/1`,1200),Y(1209,1,RZ,Il),Q.dk=function(e){return F(e,158)},Q.ek=function(e){return U(o7,aK,158,e,0,1)},B(LX,`EcorePackageImpl/10`,1209),Y(1210,1,RZ,Ll),Q.dk=function(e){return F(e,197)},Q.ek=function(e){return U(Vzt,aK,197,e,0,1)},B(LX,`EcorePackageImpl/11`,1210),Y(1211,1,RZ,Rl),Q.dk=function(e){return F(e,57)},Q.ek=function(e){return U(Q5,aK,57,e,0,1)},B(LX,`EcorePackageImpl/12`,1211),Y(1212,1,RZ,zl),Q.dk=function(e){return F(e,403)},Q.ek=function(e){return U(B7,mht,62,e,0,1)},B(LX,`EcorePackageImpl/13`,1212),Y(1213,1,RZ,Bl),Q.dk=function(e){return F(e,241)},Q.ek=function(e){return U(c7,aK,241,e,0,1)},B(LX,`EcorePackageImpl/14`,1213),Y(1214,1,RZ,Vl),Q.dk=function(e){return F(e,504)},Q.ek=function(e){return U(H7,aK,2081,e,0,1)},B(LX,`EcorePackageImpl/15`,1214),Y(1215,1,RZ,Hl),Q.dk=function(e){return F(e,103)},Q.ek=function(e){return U(U7,SZ,19,e,0,1)},B(LX,`EcorePackageImpl/16`,1215),Y(1216,1,RZ,Ul),Q.dk=function(e){return F(e,179)},Q.ek=function(e){return U(N7,SZ,179,e,0,1)},B(LX,`EcorePackageImpl/17`,1216),Y(1217,1,RZ,Wl),Q.dk=function(e){return F(e,470)},Q.ek=function(e){return U(M7,aK,470,e,0,1)},B(LX,`EcorePackageImpl/18`,1217),Y(1218,1,RZ,Gl),Q.dk=function(e){return F(e,550)},Q.ek=function(e){return U(d9,Xmt,550,e,0,1)},B(LX,`EcorePackageImpl/19`,1218),Y(1201,1,RZ,Kl),Q.dk=function(e){return F(e,335)},Q.ek=function(e){return U(P7,SZ,38,e,0,1)},B(LX,`EcorePackageImpl/2`,1201),Y(1219,1,RZ,ql),Q.dk=function(e){return F(e,248)},Q.ek=function(e){return U(z7,ght,87,e,0,1)},B(LX,`EcorePackageImpl/20`,1219),Y(1220,1,RZ,Jl),Q.dk=function(e){return F(e,446)},Q.ek=function(e){return U(W7,aK,835,e,0,1)},B(LX,`EcorePackageImpl/21`,1220),Y(1221,1,RZ,Yl),Q.dk=function(e){return TC(e)},Q.ek=function(e){return U(bQ,yK,473,e,8,1)},B(LX,`EcorePackageImpl/22`,1221),Y(1222,1,RZ,Xl),Q.dk=function(e){return F(e,195)},Q.ek=function(e){return U(X9,yK,195,e,0,2)},B(LX,`EcorePackageImpl/23`,1222),Y(1223,1,RZ,Zl),Q.dk=function(e){return F(e,221)},Q.ek=function(e){return U(xQ,yK,221,e,0,1)},B(LX,`EcorePackageImpl/24`,1223),Y(1224,1,RZ,Ql),Q.dk=function(e){return F(e,180)},Q.ek=function(e){return U(SQ,yK,180,e,0,1)},B(LX,`EcorePackageImpl/25`,1224),Y(1225,1,RZ,$l),Q.dk=function(e){return F(e,205)},Q.ek=function(e){return U(gQ,yK,205,e,0,1)},B(LX,`EcorePackageImpl/26`,1225),Y(1226,1,RZ,eu),Q.dk=function(e){return!1},Q.ek=function(e){return U(cHt,aK,2177,e,0,1)},B(LX,`EcorePackageImpl/27`,1226),Y(1227,1,RZ,tu),Q.dk=function(e){return EC(e)},Q.ek=function(e){return U(CQ,yK,346,e,7,1)},B(LX,`EcorePackageImpl/28`,1227),Y(1228,1,RZ,nu),Q.dk=function(e){return F(e,61)},Q.ek=function(e){return U(sBt,eJ,61,e,0,1)},B(LX,`EcorePackageImpl/29`,1228),Y(1202,1,RZ,ru),Q.dk=function(e){return F(e,505)},Q.ek=function(e){return U(j7,{3:1,4:1,5:1,1998:1},588,e,0,1)},B(LX,`EcorePackageImpl/3`,1202),Y(1229,1,RZ,iu),Q.dk=function(e){return F(e,568)},Q.ek=function(e){return U(hBt,aK,2004,e,0,1)},B(LX,`EcorePackageImpl/30`,1229),Y(1230,1,RZ,au),Q.dk=function(e){return F(e,163)},Q.ek=function(e){return U(dVt,eJ,163,e,0,1)},B(LX,`EcorePackageImpl/31`,1230),Y(1231,1,RZ,ou),Q.dk=function(e){return F(e,75)},Q.ek=function(e){return U(c9,Dht,75,e,0,1)},B(LX,`EcorePackageImpl/32`,1231),Y(1232,1,RZ,su),Q.dk=function(e){return F(e,164)},Q.ek=function(e){return U(wQ,yK,164,e,0,1)},B(LX,`EcorePackageImpl/33`,1232),Y(1233,1,RZ,cu),Q.dk=function(e){return F(e,15)},Q.ek=function(e){return U(TQ,yK,15,e,0,1)},B(LX,`EcorePackageImpl/34`,1233),Y(1234,1,RZ,lu),Q.dk=function(e){return F(e,298)},Q.ek=function(e){return U(Agt,aK,298,e,0,1)},B(LX,`EcorePackageImpl/35`,1234),Y(1235,1,RZ,uu),Q.dk=function(e){return F(e,190)},Q.ek=function(e){return U(EQ,yK,190,e,0,1)},B(LX,`EcorePackageImpl/36`,1235),Y(1236,1,RZ,du),Q.dk=function(e){return F(e,92)},Q.ek=function(e){return U(Ngt,aK,92,e,0,1)},B(LX,`EcorePackageImpl/37`,1236),Y(1237,1,RZ,fu),Q.dk=function(e){return F(e,589)},Q.ek=function(e){return U(sVt,aK,589,e,0,1)},B(LX,`EcorePackageImpl/38`,1237),Y(1238,1,RZ,pu),Q.dk=function(e){return!1},Q.ek=function(e){return U(lHt,aK,2178,e,0,1)},B(LX,`EcorePackageImpl/39`,1238),Y(1203,1,RZ,mu),Q.dk=function(e){return F(e,88)},Q.ek=function(e){return U(I7,aK,29,e,0,1)},B(LX,`EcorePackageImpl/4`,1203),Y(1239,1,RZ,hu),Q.dk=function(e){return F(e,191)},Q.ek=function(e){return U(DQ,yK,191,e,0,1)},B(LX,`EcorePackageImpl/40`,1239),Y(1240,1,RZ,gu),Q.dk=function(e){return DC(e)},Q.ek=function(e){return U(OQ,yK,2,e,6,1)},B(LX,`EcorePackageImpl/41`,1240),Y(1241,1,RZ,_u),Q.dk=function(e){return F(e,586)},Q.ek=function(e){return U(lBt,aK,586,e,0,1)},B(LX,`EcorePackageImpl/42`,1241),Y(1242,1,RZ,vu),Q.dk=function(e){return!1},Q.ek=function(e){return U(uHt,yK,2179,e,0,1)},B(LX,`EcorePackageImpl/43`,1242),Y(1243,1,RZ,yu),Q.dk=function(e){return F(e,45)},Q.ek=function(e){return U(dQ,OK,45,e,0,1)},B(LX,`EcorePackageImpl/44`,1243),Y(1204,1,RZ,bu),Q.dk=function(e){return F(e,143)},Q.ek=function(e){return U(F7,aK,143,e,0,1)},B(LX,`EcorePackageImpl/5`,1204),Y(1205,1,RZ,xu),Q.dk=function(e){return F(e,159)},Q.ek=function(e){return U(kBt,aK,159,e,0,1)},B(LX,`EcorePackageImpl/6`,1205),Y(1206,1,RZ,Su),Q.dk=function(e){return F(e,459)},Q.ek=function(e){return U(L7,aK,675,e,0,1)},B(LX,`EcorePackageImpl/7`,1206),Y(1207,1,RZ,Cu),Q.dk=function(e){return F(e,568)},Q.ek=function(e){return U(R7,aK,684,e,0,1)},B(LX,`EcorePackageImpl/8`,1207),Y(1208,1,RZ,wu),Q.dk=function(e){return F(e,469)},Q.ek=function(e){return U(s7,aK,469,e,0,1)},B(LX,`EcorePackageImpl/9`,1208),Y(1020,2045,Jmt,rie),Q.Ki=function(e,t){Qze(this,L(t,415))},Q.Oi=function(e,t){ZZe(this,e,L(t,415))},B(LX,`MinimalEObjectImpl/1ArrayDelegatingAdapterList`,1020),Y(1021,151,uZ,vbe),Q.hj=function(){return this.a.a},B(LX,`MinimalEObjectImpl/1ArrayDelegatingAdapterList/1`,1021),Y(1048,1047,{},Oce),B(`org.eclipse.emf.ecore.plugin`,`EcorePlugin`,1048);var sVt=$D(Oht,`Resource`);Y(787,1486,kht),Q.Fl=function(e){},Q.Gl=function(e){},Q.Cl=function(){return!this.a&&(this.a=new Lh(this)),this.a},Q.Dl=function(e){var t,n,r=e.length,i,a;if(r>0)if(uj(0,e.length),e.charCodeAt(0)==47){for(a=new rN(4),i=1,t=1;t<r;++t)uj(t,e.length),e.charCodeAt(t)==47&&(IT(a,i==t?``:(eN(i,t,e.length),e.substr(i,t-i))),i=t+1);return IT(a,(uj(i,e.length+1),e.substr(i))),mqe(this,a)}else uj(r-1,e.length),e.charCodeAt(r-1)==63&&(n=Vfe(e,HV(63),r-2),n>0&&(e=(eN(0,n,e.length),e.substr(0,n))));return s$e(this,e)},Q.El=function(){return this.c},Q.Ib=function(){var e;return vy(this.Pm)+`@`+(e=OF(this)>>>0,e.toString(16))+` uri='`+this.d+`'`},Q.b=!1,B(Aht,`ResourceImpl`,787),Y(1487,787,kht,tre),B(Aht,`BinaryResourceImpl`,1487),Y(1160,697,lmt),Q._i=function(e){return F(e,57)?VSe(this,L(e,57)):F(e,589)?new UT(L(e,589).Cl()):P(e)===P(this.f)?L(e,18).Jc():(WE(),E7.a)},Q.Ob=function(){return H$e(this)},Q.a=!1,B(pZ,`EcoreUtil/ContentTreeIterator`,1160),Y(1488,1160,lmt,Zve),Q._i=function(e){return P(e)===P(this.f)?L(e,16).Jc():new ZEe(L(e,57))},B(Aht,`ResourceImpl/5`,1488),Y(648,2057,hht,Lh),Q.Gc=function(e){return this.i<=4?hV(this,e):F(e,52)&&L(e,52).Gh()==this.a},Q.Ki=function(e,t){e==this.i-1&&(this.a.b||(this.a.b=!0))},Q.Mi=function(e,t){e==0?this.a.b||(this.a.b=!0):QM(this,e,t)},Q.Oi=function(e,t){},Q.Pi=function(e,t,n){},Q.Jj=function(){return 2},Q.hj=function(){return this.a},Q.Kj=function(){return!0},Q.Lj=function(e,t){return t=L(e,52).ci(this.a,t),t},Q.Mj=function(e,t){return L(e,52).ci(null,t)},Q.Nj=function(){return!1},Q.Qi=function(){return!0},Q.$i=function(e){return U(Q5,aK,57,e,0,1)},Q.Wi=function(){return!1},B(Aht,`ResourceImpl/ContentsEList`,648),Y(954,2027,LK,nre),Q.dd=function(e){return this.a.Ii(e)},Q.gc=function(){return this.a.gc()},B(pZ,`AbstractSequentialInternalEList/1`,954);var cVt,lVt,p9,uVt;Y(626,1,{},Dge);var m9,h9;B(pZ,`BasicExtendedMetaData`,626),Y(1151,1,{},Lse),Q.Hl=function(){return null},Q.Il=function(){return this.a==-2&&Hp(this,NYe(this.d,this.b)),this.a},Q.Jl=function(){return null},Q.Kl=function(){return oA(),oA(),IQ},Q.ve=function(){return this.c==qZ&&Up(this,uUe(this.d,this.b)),this.c},Q.Ll=function(){return 0},Q.a=-2,Q.c=qZ,B(pZ,`BasicExtendedMetaData/EClassExtendedMetaDataImpl`,1151),Y(1152,1,{},dEe),Q.Hl=function(){return this.a==(VM(),m9)&&wee(this,Z6e(this.f,this.b)),this.a},Q.Il=function(){return 0},Q.Jl=function(){return this.c==(VM(),m9)&&Eee(this,Q6e(this.f,this.b)),this.c},Q.Kl=function(){return!this.d&&Oee(this,Q7e(this.f,this.b)),this.d},Q.ve=function(){return this.e==qZ&&Aee(this,uUe(this.f,this.b)),this.e},Q.Ll=function(){return this.g==-2&&Mee(this,RJe(this.f,this.b)),this.g},Q.e=qZ,Q.g=-2,B(pZ,`BasicExtendedMetaData/EDataTypeExtendedMetaDataImpl`,1152),Y(1150,1,{},Rse),Q.b=!1,Q.c=!1,B(pZ,`BasicExtendedMetaData/EPackageExtendedMetaDataImpl`,1150),Y(1153,1,{},fEe),Q.c=-2,Q.e=qZ,Q.f=qZ,B(pZ,`BasicExtendedMetaData/EStructuralFeatureExtendedMetaDataImpl`,1153),Y(582,624,CZ,zD),Q.Jj=function(){return this.c},Q.ml=function(){return!1},Q.Ui=function(e,t){return t},Q.c=0,B(pZ,`EDataTypeEList`,582);var dVt=$D(pZ,`FeatureMap`);Y(76,582,{3:1,4:1,20:1,31:1,56:1,18:1,16:1,59:1,71:1,67:1,61:1,78:1,163:1,219:1,2001:1,72:1,98:1},QF),Q._c=function(e,t){l4e(this,e,L(t,75))},Q.Ec=function(e){return f2e(this,L(e,75))},Q.Fi=function(e){Vye(this,L(e,75))},Q.Lj=function(e,t){return upe(this,L(e,75),t)},Q.Mj=function(e,t){return dpe(this,L(e,75),t)},Q.Ri=function(e,t){return x5e(this,e,t)},Q.Ui=function(e,t){return Vtt(this,e,L(t,75))},Q.fd=function(e,t){return f3e(this,e,L(t,75))},Q.Sj=function(e,t){return fpe(this,L(e,75),t)},Q.Tj=function(e,t){return ppe(this,L(e,75),t)},Q.Uj=function(e,t,n){return fJe(this,L(e,75),L(t,75),n)},Q.Xi=function(e,t){return NV(this,e,L(t,75))},Q.Ml=function(e,t){return e5e(this,e,t)},Q.ad=function(e,t){var n,r,i,a,o,s,c,l=new hP(t.gc()),u;for(i=t.Jc();i.Ob();)if(r=L(i.Pb(),75),a=r.Jk(),FU(this.e,a))(!a.Qi()||!qj(this,a,r.kd())&&!hV(l,r))&&aN(l,r);else{for(u=MU(this.e.Ah(),a),n=L(this.g,122),o=!0,s=0;s<this.i;++s)if(c=n[s],u.$l(c.Jk())){L(hB(this,s,r),75),o=!1;break}o&&aN(l,r)}return SLe(this,e,l)},Q.Fc=function(e){var t,n,r,i,a,o,s,c=new hP(e.gc()),l;for(r=e.Jc();r.Ob();)if(n=L(r.Pb(),75),i=n.Jk(),FU(this.e,i))(!i.Qi()||!qj(this,i,n.kd())&&!hV(c,n))&&aN(c,n);else{for(l=MU(this.e.Ah(),i),t=L(this.g,122),a=!0,o=0;o<this.i;++o)if(s=t[o],l.$l(s.Jk())){L(hB(this,o,n),75),a=!1;break}a&&aN(c,n)}return uk(this,c)},Q.Di=function(e){return this.j=-1,DW(this,this.i,e)},Q.Nl=function(e,t,n){return r8e(this,e,t,n)},Q.Vk=function(e,t){return dW(this,e,t)},Q.Ol=function(e,t,n){return W9e(this,e,t,n)},Q.Pl=function(){return this},Q.Ql=function(e,t){return JW(this,e,t)},Q.Rl=function(e){return L(W(this,e),75).Jk()},Q.Sl=function(e){return L(W(this,e),75).kd()},Q.Tl=function(){return this.b},Q.Kj=function(){return!0},Q.Rj=function(){return!0},Q.Ul=function(e){return!lz(this,e)},Q.$i=function(e){return U(YBt,Dht,344,e,0,1)},Q.nl=function(e){return NE(this,e)},Q.Wb=function(e){tk(this,e)},Q.Vl=function(e,t){eG(this,e,t)},Q.Wl=function(e){return KPe(this,e)},Q.Xl=function(e){vGe(this,e)},B(pZ,`BasicFeatureMap`,76),Y(1925,1,_K),Q.Nb=function(e){KO(this,e)},Q.Rb=function(e){if(this.g==-1)throw k(new dg);wO(this);try{S3e(this.e,this.b,this.a,e),this.d=this.e.j,fB(this)}catch(e){throw e=PI(e),F(e,99)?k(new cg):k(e)}},Q.Ob=function(){return pL(this)},Q.Sb=function(){return ERe(this)},Q.Pb=function(){return fB(this)},Q.Tb=function(){return this.a},Q.Ub=function(){var e;if(ERe(this))return wO(this),this.g=--this.a,this.sl()&&(e=PH(this.e,this.b,this.c,this.a,this.j),this.j=e),this.i=0,this.j;throw k(new mg)},Q.Vb=function(){return this.a-1},Q.Qb=function(){if(this.g==-1)throw k(new dg);wO(this);try{mZe(this.e,this.b,this.g),this.d=this.e.j,this.g<this.a&&(--this.a,--this.c),--this.g}catch(e){throw e=PI(e),F(e,99)?k(new cg):k(e)}},Q.sl=function(){return!1},Q.Wb=function(e){if(this.g==-1)throw k(new dg);wO(this);try{r9e(this.e,this.b,this.g,e),this.d=this.e.j}catch(e){throw e=PI(e),F(e,99)?k(new cg):k(e)}},Q.a=0,Q.c=0,Q.d=0,Q.f=!1,Q.g=0,Q.i=0,B(pZ,`FeatureMapUtil/BasicFeatureEIterator`,1925),Y(412,1925,_K,gI),Q.Yl=function(){var e,t,n=this.e.i;for(e=L(this.e.g,122);this.c<n;){if(t=e[this.c],this.k.$l(t.Jk()))return this.j=this.f?t:t.kd(),this.i=2,!0;++this.c}return this.i=1,this.g=-1,!1},Q.Zl=function(){for(var e=L(this.e.g,122),t;--this.c>=0;)if(t=e[this.c],this.k.$l(t.Jk()))return this.j=this.f?t:t.kd(),this.i=-2,!0;return this.i=-1,this.g=-1,!1},B(pZ,`BasicFeatureMap/FeatureEIterator`,412),Y(666,412,_K,nw),Q.sl=function(){return!0},B(pZ,`BasicFeatureMap/ResolvingFeatureEIterator`,666),Y(952,482,DZ,ele),Q.nj=function(){return this},B(pZ,`EContentsEList/1`,952),Y(953,482,DZ,tw),Q.sl=function(){return!1},B(pZ,`EContentsEList/2`,953),Y(951,287,OZ,tle),Q.ul=function(e){},Q.Ob=function(){return!1},Q.Sb=function(){return!1},B(pZ,`EContentsEList/FeatureIteratorImpl/1`,951),Y(825,582,CZ,yle),Q.Li=function(){this.a=!0},Q.Oj=function(){return this.a},Q.Ek=function(){var e;uG(this),Dw(this.e)?(e=this.a,this.a=!1,nI(this.e,new CM(this.e,2,this.c,e,!1))):this.a=!1},Q.a=!1,B(pZ,`EDataTypeEList/Unsettable`,825),Y(1923,582,CZ,ble),Q.Qi=function(){return!0},B(pZ,`EDataTypeUniqueEList`,1923),Y(1924,825,CZ,xle),Q.Qi=function(){return!0},B(pZ,`EDataTypeUniqueEList/Unsettable`,1924),Y(145,81,CZ,BT),Q.ll=function(){return!0},Q.Ui=function(e,t){return KH(this,e,L(t,57))},B(pZ,`EObjectContainmentEList/Resolving`,145),Y(1154,544,CZ,Sle),Q.ll=function(){return!0},Q.Ui=function(e,t){return KH(this,e,L(t,57))},B(pZ,`EObjectContainmentEList/Unsettable/Resolving`,1154),Y(753,14,CZ,Efe),Q.Li=function(){this.a=!0},Q.Oj=function(){return this.a},Q.Ek=function(){var e;uG(this),Dw(this.e)?(e=this.a,this.a=!1,nI(this.e,new CM(this.e,2,this.c,e,!1))):this.a=!1},Q.a=!1,B(pZ,`EObjectContainmentWithInverseEList/Unsettable`,753),Y(1188,753,CZ,Dfe),Q.ll=function(){return!0},Q.Ui=function(e,t){return KH(this,e,L(t,57))},B(pZ,`EObjectContainmentWithInverseEList/Unsettable/Resolving`,1188),Y(745,491,CZ,Cle),Q.Li=function(){this.a=!0},Q.Oj=function(){return this.a},Q.Ek=function(){var e;uG(this),Dw(this.e)?(e=this.a,this.a=!1,nI(this.e,new CM(this.e,2,this.c,e,!1))):this.a=!1},Q.a=!1,B(pZ,`EObjectEList/Unsettable`,745),Y(339,491,CZ,VT),Q.ll=function(){return!0},Q.Ui=function(e,t){return KH(this,e,L(t,57))},B(pZ,`EObjectResolvingEList`,339),Y(1828,745,CZ,wle),Q.ll=function(){return!0},Q.Ui=function(e,t){return KH(this,e,L(t,57))},B(pZ,`EObjectResolvingEList/Unsettable`,1828),Y(1489,1,{},Tu);var fVt;B(pZ,`EObjectValidator`,1489),Y(548,491,CZ,BO),Q.gl=function(){return this.d},Q.hl=function(){return this.b},Q.Kj=function(){return!0},Q.kl=function(){return!0},Q.b=0,B(pZ,`EObjectWithInverseEList`,548),Y(1191,548,CZ,Ofe),Q.jl=function(){return!0},B(pZ,`EObjectWithInverseEList/ManyInverse`,1191),Y(627,548,CZ,oD),Q.Li=function(){this.a=!0},Q.Oj=function(){return this.a},Q.Ek=function(){var e;uG(this),Dw(this.e)?(e=this.a,this.a=!1,nI(this.e,new CM(this.e,2,this.c,e,!1))):this.a=!1},Q.a=!1,B(pZ,`EObjectWithInverseEList/Unsettable`,627),Y(1190,627,CZ,kfe),Q.jl=function(){return!0},B(pZ,`EObjectWithInverseEList/Unsettable/ManyInverse`,1190),Y(754,548,CZ,Afe),Q.ll=function(){return!0},Q.Ui=function(e,t){return KH(this,e,L(t,57))},B(pZ,`EObjectWithInverseResolvingEList`,754),Y(33,754,CZ,sD),Q.jl=function(){return!0},B(pZ,`EObjectWithInverseResolvingEList/ManyInverse`,33),Y(755,627,CZ,jfe),Q.ll=function(){return!0},Q.Ui=function(e,t){return KH(this,e,L(t,57))},B(pZ,`EObjectWithInverseResolvingEList/Unsettable`,755),Y(1189,755,CZ,Mfe),Q.jl=function(){return!0},B(pZ,`EObjectWithInverseResolvingEList/Unsettable/ManyInverse`,1189),Y(1155,624,CZ),Q.Ji=function(){return(this.b&1792)==0},Q.Li=function(){this.b|=1},Q.il=function(){return(this.b&4)!=0},Q.Kj=function(){return(this.b&40)!=0},Q.jl=function(){return(this.b&16)!=0},Q.kl=function(){return(this.b&8)!=0},Q.ll=function(){return(this.b&RX)!=0},Q.$k=function(){return(this.b&32)!=0},Q.ml=function(){return(this.b&fZ)!=0},Q.dk=function(e){return this.d?UDe(this.d,e):this.Jk().Fk().dk(e)},Q.Oj=function(){return this.b&2?(this.b&1)!=0:this.i!=0},Q.Qi=function(){return(this.b&128)!=0},Q.Ek=function(){var e;uG(this),this.b&2&&(Dw(this.e)?(e=(this.b&1)!=0,this.b&=-2,xg(this,new CM(this.e,2,iz(this.e.Ah(),this.Jk()),e,!1))):this.b&=-2)},Q.Wi=function(){return(this.b&1536)==0},Q.b=0,B(pZ,`EcoreEList/Generic`,1155),Y(1156,1155,CZ,_Se),Q.Jk=function(){return this.a},B(pZ,`EcoreEList/Dynamic`,1156),Y(752,67,rZ,rre),Q.$i=function(e){return GP(this.a.a,e)},B(pZ,`EcoreEMap/1`,752),Y(751,81,CZ,$ve),Q.Ki=function(e,t){wB(this.b,L(t,136))},Q.Mi=function(e,t){_Ie(this.b)},Q.Ni=function(e,t,n){var r;++(r=this.b,L(t,136),r).e},Q.Oi=function(e,t){_R(this.b,L(t,136))},Q.Pi=function(e,t,n){_R(this.b,L(n,136)),P(n)===P(t)&&L(n,136).zi(wce(L(t,136).jd())),wB(this.b,L(t,136))},B(pZ,`EcoreEMap/DelegateEObjectContainmentEList`,751),Y(1186,142,dht,pPe),B(pZ,`EcoreEMap/Unsettable`,1186),Y(1187,751,CZ,Nfe),Q.Li=function(){this.a=!0},Q.Oj=function(){return this.a},Q.Ek=function(){var e;uG(this),Dw(this.e)?(e=this.a,this.a=!1,nI(this.e,new CM(this.e,2,this.c,e,!1))):this.a=!1},Q.a=!1,B(pZ,`EcoreEMap/Unsettable/UnsettableDelegateEObjectContainmentEList`,1187),Y(1159,223,Aq,Wye),Q.a=!1,Q.b=!1,B(pZ,`EcoreUtil/Copier`,1159),Y(747,1,dK,ZEe),Q.Nb=function(e){KO(this,e)},Q.Ob=function(){return hHe(this)},Q.Pb=function(){var e;return hHe(this),e=this.b,this.b=null,e},Q.Qb=function(){this.a.Qb()},B(pZ,`EcoreUtil/ProperContentIterator`,747),Y(1490,1489,{},wf);var pVt;B(pZ,`EcoreValidator`,1490);var mVt;$D(pZ,`FeatureMapUtil/Validator`),Y(1260,1,{2006:1},Eu),Q.$l=function(e){return!0},B(pZ,`FeatureMapUtil/1`,1260),Y(760,1,{2006:1},wrt),Q.$l=function(e){var t;return this.c==e?!0:(t=FE(gk(this.a,e)),t==null?s8e(this,e)?(Eke(this.a,e,($T(),yQ)),!0):(Eke(this.a,e,($T(),vQ)),!1):t==($T(),yQ))},Q.e=!1;var hVt;B(pZ,`FeatureMapUtil/BasicValidator`,760),Y(761,44,Aq,ale),B(pZ,`FeatureMapUtil/BasicValidator/Cache`,761),Y(495,56,{20:1,31:1,56:1,18:1,16:1,61:1,78:1,72:1,98:1},PC),Q._c=function(e,t){S3e(this.c,this.b,e,t)},Q.Ec=function(e){return e5e(this.c,this.b,e)},Q.ad=function(e,t){return fet(this.c,this.b,e,t)},Q.Fc=function(e){return wT(this,e)},Q.Ei=function(e,t){hNe(this.c,this.b,e,t)},Q.Uk=function(e,t){return r8e(this.c,this.b,e,t)},Q.Yi=function(e){return YW(this.c,this.b,e,!1)},Q.Gi=function(){return Nw(this.c,this.b)},Q.Hi=function(){return Pw(this.c,this.b)},Q.Ii=function(e){return LAe(this.c,this.b,e)},Q.Vk=function(e,t){return $de(this,e,t)},Q.$b=function(){Sg(this)},Q.Gc=function(e){return qj(this.c,this.b,e)},Q.Hc=function(e){return WFe(this.c,this.b,e)},Q.Xb=function(e){return YW(this.c,this.b,e,!0)},Q.Dk=function(e){return this},Q.bd=function(e){return nOe(this.c,this.b,e)},Q.dc=function(){return wC(this)},Q.Oj=function(){return!lz(this.c,this.b)},Q.Jc=function(){return CMe(this.c,this.b)},Q.cd=function(){return wMe(this.c,this.b)},Q.dd=function(e){return MBe(this.c,this.b,e)},Q.Ri=function(e,t){return T7e(this.c,this.b,e,t)},Q.Si=function(e,t){HAe(this.c,this.b,e,t)},Q.ed=function(e){return mZe(this.c,this.b,e)},Q.Kc=function(e){return K8e(this.c,this.b,e)},Q.fd=function(e,t){return r9e(this.c,this.b,e,t)},Q.Wb=function(e){GH(this.c,this.b),wT(this,L(e,16))},Q.gc=function(){return NBe(this.c,this.b)},Q.Nc=function(){return mEe(this.c,this.b)},Q.Oc=function(e){return rOe(this.c,this.b,e)},Q.Ib=function(){var e,t=new yv;for(t.a+=`[`,e=Nw(this.c,this.b);pL(e);)BC(t,JT(fB(e))),pL(e)&&(t.a+=iK);return t.a+=`]`,t.a},Q.Ek=function(){GH(this.c,this.b)},B(pZ,`FeatureMapUtil/FeatureEList`,495),Y(635,39,uZ,aM),Q.fj=function(e){return aR(this,e)},Q.kj=function(e){var t,n,r,i,a,o,s;switch(this.d){case 1:case 2:if(a=e.hj(),P(a)===P(this.c)&&aR(this,null)==e.fj(null))return this.g=e.gj(),e.ej()==1&&(this.d=1),!0;break;case 3:switch(i=e.ej(),i){case 3:if(a=e.hj(),P(a)===P(this.c)&&aR(this,null)==e.fj(null))return this.d=5,t=new hP(2),aN(t,this.g),aN(t,e.gj()),this.g=t,!0;break}break;case 5:switch(i=e.ej(),i){case 3:if(a=e.hj(),P(a)===P(this.c)&&aR(this,null)==e.fj(null))return n=L(this.g,18),n.Ec(e.gj()),!0;break}break;case 4:switch(i=e.ej(),i){case 3:if(a=e.hj(),P(a)===P(this.c)&&aR(this,null)==e.fj(null))return this.d=1,this.g=e.gj(),!0;break;case 4:if(a=e.hj(),P(a)===P(this.c)&&aR(this,null)==e.fj(null))return this.d=6,s=new hP(2),aN(s,this.n),aN(s,e.ij()),this.n=s,o=G(j(q9,1),cq,30,15,[this.o,e.jj()]),this.g=o,!0;break}break;case 6:switch(i=e.ej(),i){case 4:if(a=e.hj(),P(a)===P(this.c)&&aR(this,null)==e.fj(null))return n=L(this.n,18),n.Ec(e.ij()),o=L(this.g,54),r=U(q9,cq,30,o.length+1,15,1),OW(o,0,r,0,o.length),r[o.length]=e.jj(),this.g=r,!0;break}break}return!1},B(pZ,`FeatureMapUtil/FeatureENotificationImpl`,635),Y(554,495,{20:1,31:1,56:1,18:1,16:1,61:1,78:1,163:1,219:1,2001:1,72:1,98:1},XD),Q.Ml=function(e,t){return e5e(this.c,e,t)},Q.Nl=function(e,t,n){return r8e(this.c,e,t,n)},Q.Ol=function(e,t,n){return W9e(this.c,e,t,n)},Q.Pl=function(){return this},Q.Ql=function(e,t){return JW(this.c,e,t)},Q.Rl=function(e){return L(YW(this.c,this.b,e,!1),75).Jk()},Q.Sl=function(e){return L(YW(this.c,this.b,e,!1),75).kd()},Q.Tl=function(){return this.a},Q.Ul=function(e){return!lz(this.c,e)},Q.Vl=function(e,t){eG(this.c,e,t)},Q.Wl=function(e){return KPe(this.c,e)},Q.Xl=function(e){vGe(this.c,e)},B(pZ,`FeatureMapUtil/FeatureFeatureMap`,554),Y(1259,1,uht,NC),Q.Dk=function(e){return YW(this.b,this.a,-1,e)},Q.Oj=function(){return!lz(this.b,this.a)},Q.Wb=function(e){eG(this.b,this.a,e)},Q.Ek=function(){GH(this.b,this.a)},B(pZ,`FeatureMapUtil/FeatureValue`,1259);var g9,gVt,_Vt,_9,vVt,v9=$D(YZ,`AnyType`);Y(670,63,UK,lv),B(YZ,`InvalidDatatypeValueException`,670);var y9=$D(YZ,Lht),b9=$D(YZ,Rht),yVt=$D(YZ,zht),bVt,x9,xVt,S9,SVt,CVt,wVt,TVt,EVt,DVt,OVt,kVt,AVt,jVt,MVt,C9,NVt,w9,T9,PVt,E9,D9,O9,FVt,k9,A9;Y(829,502,{109:1,94:1,93:1,57:1,52:1,100:1,842:1},d_),Q.Ih=function(e,t,n){switch(e){case 0:return n?(!this.c&&(this.c=new QF(this,0)),this.c):(!this.c&&(this.c=new QF(this,0)),this.c.b);case 1:return n?(!this.c&&(this.c=new QF(this,0)),L(oj(this.c,(hG(),S9)),163)):(!this.c&&(this.c=new QF(this,0)),L(L(oj(this.c,(hG(),S9)),163),219)).Tl();case 2:return n?(!this.b&&(this.b=new QF(this,2)),this.b):(!this.b&&(this.b=new QF(this,2)),this.b.b)}return vN(this,e-lk(this.fi()),lP(this.j&2?(!this.k&&(this.k=new Cf),this.k).Lk():this.fi(),e),t,n)},Q.Rh=function(e,t,n){var r;switch(t){case 0:return!this.c&&(this.c=new QF(this,0)),dW(this.c,e,n);case 1:return(!this.c&&(this.c=new QF(this,0)),L(L(oj(this.c,(hG(),S9)),163),72)).Vk(e,n);case 2:return!this.b&&(this.b=new QF(this,2)),dW(this.b,e,n)}return r=L(lP(this.j&2?(!this.k&&(this.k=new Cf),this.k).Lk():this.fi(),t),69),r.uk().yk(this,fMe(this),t-lk(this.fi()),e,n)},Q.Th=function(e){switch(e){case 0:return!!this.c&&this.c.i!=0;case 1:return!(!this.c&&(this.c=new QF(this,0)),L(oj(this.c,(hG(),S9)),163)).dc();case 2:return!!this.b&&this.b.i!=0}return Hj(this,e-lk(this.fi()),lP(this.j&2?(!this.k&&(this.k=new Cf),this.k).Lk():this.fi(),e))},Q.$h=function(e,t){switch(e){case 0:!this.c&&(this.c=new QF(this,0)),tk(this.c,t);return;case 1:(!this.c&&(this.c=new QF(this,0)),L(L(oj(this.c,(hG(),S9)),163),219)).Wb(t);return;case 2:!this.b&&(this.b=new QF(this,2)),tk(this.b,t);return}UR(this,e-lk(this.fi()),lP(this.j&2?(!this.k&&(this.k=new Cf),this.k).Lk():this.fi(),e),t)},Q.fi=function(){return hG(),xVt},Q.hi=function(e){switch(e){case 0:!this.c&&(this.c=new QF(this,0)),uG(this.c);return;case 1:(!this.c&&(this.c=new QF(this,0)),L(oj(this.c,(hG(),S9)),163)).$b();return;case 2:!this.b&&(this.b=new QF(this,2)),uG(this.b);return}tR(this,e-lk(this.fi()),lP(this.j&2?(!this.k&&(this.k=new Cf),this.k).Lk():this.fi(),e))},Q.Ib=function(){var e;return this.j&4?rU(this):(e=new YT(rU(this)),e.a+=` (mixed: `,zC(e,this.c),e.a+=`, anyAttribute: `,zC(e,this.b),e.a+=`)`,e.a)},B(XZ,`AnyTypeImpl`,829),Y(671,502,{109:1,94:1,93:1,57:1,52:1,100:1,2084:1,671:1},Mu),Q.Ih=function(e,t,n){switch(e){case 0:return this.a;case 1:return this.b}return vN(this,e-lk((hG(),C9)),lP(this.j&2?(!this.k&&(this.k=new Cf),this.k).Lk():C9,e),t,n)},Q.Th=function(e){switch(e){case 0:return this.a!=null;case 1:return this.b!=null}return Hj(this,e-lk((hG(),C9)),lP(this.j&2?(!this.k&&(this.k=new Cf),this.k).Lk():C9,e))},Q.$h=function(e,t){switch(e){case 0:Fee(this,IE(t));return;case 1:Lee(this,IE(t));return}UR(this,e-lk((hG(),C9)),lP(this.j&2?(!this.k&&(this.k=new Cf),this.k).Lk():C9,e),t)},Q.fi=function(){return hG(),C9},Q.hi=function(e){switch(e){case 0:this.a=null;return;case 1:this.b=null;return}tR(this,e-lk((hG(),C9)),lP(this.j&2?(!this.k&&(this.k=new Cf),this.k).Lk():C9,e))},Q.Ib=function(){var e;return this.j&4?rU(this):(e=new YT(rU(this)),e.a+=` (data: `,BC(e,this.a),e.a+=`, target: `,BC(e,this.b),e.a+=`)`,e.a)},Q.a=null,Q.b=null,B(XZ,`ProcessingInstructionImpl`,671),Y(672,829,{109:1,94:1,93:1,57:1,52:1,100:1,842:1,2085:1,672:1},f_),Q.Ih=function(e,t,n){switch(e){case 0:return n?(!this.c&&(this.c=new QF(this,0)),this.c):(!this.c&&(this.c=new QF(this,0)),this.c.b);case 1:return n?(!this.c&&(this.c=new QF(this,0)),L(oj(this.c,(hG(),S9)),163)):(!this.c&&(this.c=new QF(this,0)),L(L(oj(this.c,(hG(),S9)),163),219)).Tl();case 2:return n?(!this.b&&(this.b=new QF(this,2)),this.b):(!this.b&&(this.b=new QF(this,2)),this.b.b);case 3:return!this.c&&(this.c=new QF(this,0)),IE(JW(this.c,(hG(),T9),!0));case 4:return Ife(this.a,(!this.c&&(this.c=new QF(this,0)),IE(JW(this.c,(hG(),T9),!0))));case 5:return this.a}return vN(this,e-lk((hG(),w9)),lP(this.j&2?(!this.k&&(this.k=new Cf),this.k).Lk():w9,e),t,n)},Q.Th=function(e){switch(e){case 0:return!!this.c&&this.c.i!=0;case 1:return!(!this.c&&(this.c=new QF(this,0)),L(oj(this.c,(hG(),S9)),163)).dc();case 2:return!!this.b&&this.b.i!=0;case 3:return!this.c&&(this.c=new QF(this,0)),IE(JW(this.c,(hG(),T9),!0))!=null;case 4:return Ife(this.a,(!this.c&&(this.c=new QF(this,0)),IE(JW(this.c,(hG(),T9),!0))))!=null;case 5:return!!this.a}return Hj(this,e-lk((hG(),w9)),lP(this.j&2?(!this.k&&(this.k=new Cf),this.k).Lk():w9,e))},Q.$h=function(e,t){switch(e){case 0:!this.c&&(this.c=new QF(this,0)),tk(this.c,t);return;case 1:(!this.c&&(this.c=new QF(this,0)),L(L(oj(this.c,(hG(),S9)),163),219)).Wb(t);return;case 2:!this.b&&(this.b=new QF(this,2)),tk(this.b,t);return;case 3:pEe(this,IE(t));return;case 4:pEe(this,Ffe(this.a,t));return;case 5:Iee(this,L(t,159));return}UR(this,e-lk((hG(),w9)),lP(this.j&2?(!this.k&&(this.k=new Cf),this.k).Lk():w9,e),t)},Q.fi=function(){return hG(),w9},Q.hi=function(e){switch(e){case 0:!this.c&&(this.c=new QF(this,0)),uG(this.c);return;case 1:(!this.c&&(this.c=new QF(this,0)),L(oj(this.c,(hG(),S9)),163)).$b();return;case 2:!this.b&&(this.b=new QF(this,2)),uG(this.b);return;case 3:!this.c&&(this.c=new QF(this,0)),eG(this.c,(hG(),T9),null);return;case 4:pEe(this,Ffe(this.a,null));return;case 5:this.a=null;return}tR(this,e-lk((hG(),w9)),lP(this.j&2?(!this.k&&(this.k=new Cf),this.k).Lk():w9,e))},B(XZ,`SimpleAnyTypeImpl`,672),Y(673,502,{109:1,94:1,93:1,57:1,52:1,100:1,2086:1,673:1},Ire),Q.Ih=function(e,t,n){switch(e){case 0:return n?(!this.a&&(this.a=new QF(this,0)),this.a):(!this.a&&(this.a=new QF(this,0)),this.a.b);case 1:return n?(!this.b&&(this.b=new lN((qG(),o9),d9,this,1)),this.b):(!this.b&&(this.b=new lN((qG(),o9),d9,this,1)),XM(this.b));case 2:return n?(!this.c&&(this.c=new lN((qG(),o9),d9,this,2)),this.c):(!this.c&&(this.c=new lN((qG(),o9),d9,this,2)),XM(this.c));case 3:return!this.a&&(this.a=new QF(this,0)),oj(this.a,(hG(),D9));case 4:return!this.a&&(this.a=new QF(this,0)),oj(this.a,(hG(),O9));case 5:return!this.a&&(this.a=new QF(this,0)),oj(this.a,(hG(),k9));case 6:return!this.a&&(this.a=new QF(this,0)),oj(this.a,(hG(),A9))}return vN(this,e-lk((hG(),E9)),lP(this.j&2?(!this.k&&(this.k=new Cf),this.k).Lk():E9,e),t,n)},Q.Rh=function(e,t,n){var r;switch(t){case 0:return!this.a&&(this.a=new QF(this,0)),dW(this.a,e,n);case 1:return!this.b&&(this.b=new lN((qG(),o9),d9,this,1)),dD(this.b,e,n);case 2:return!this.c&&(this.c=new lN((qG(),o9),d9,this,2)),dD(this.c,e,n);case 5:return!this.a&&(this.a=new QF(this,0)),$de(oj(this.a,(hG(),k9)),e,n)}return r=L(lP(this.j&2?(!this.k&&(this.k=new Cf),this.k).Lk():(hG(),E9),t),69),r.uk().yk(this,fMe(this),t-lk((hG(),E9)),e,n)},Q.Th=function(e){switch(e){case 0:return!!this.a&&this.a.i!=0;case 1:return!!this.b&&this.b.f!=0;case 2:return!!this.c&&this.c.f!=0;case 3:return!this.a&&(this.a=new QF(this,0)),!wC(oj(this.a,(hG(),D9)));case 4:return!this.a&&(this.a=new QF(this,0)),!wC(oj(this.a,(hG(),O9)));case 5:return!this.a&&(this.a=new QF(this,0)),!wC(oj(this.a,(hG(),k9)));case 6:return!this.a&&(this.a=new QF(this,0)),!wC(oj(this.a,(hG(),A9)))}return Hj(this,e-lk((hG(),E9)),lP(this.j&2?(!this.k&&(this.k=new Cf),this.k).Lk():E9,e))},Q.$h=function(e,t){switch(e){case 0:!this.a&&(this.a=new QF(this,0)),tk(this.a,t);return;case 1:!this.b&&(this.b=new lN((qG(),o9),d9,this,1)),XF(this.b,t);return;case 2:!this.c&&(this.c=new lN((qG(),o9),d9,this,2)),XF(this.c,t);return;case 3:!this.a&&(this.a=new QF(this,0)),Sg(oj(this.a,(hG(),D9))),!this.a&&(this.a=new QF(this,0)),wT(oj(this.a,D9),L(t,18));return;case 4:!this.a&&(this.a=new QF(this,0)),Sg(oj(this.a,(hG(),O9))),!this.a&&(this.a=new QF(this,0)),wT(oj(this.a,O9),L(t,18));return;case 5:!this.a&&(this.a=new QF(this,0)),Sg(oj(this.a,(hG(),k9))),!this.a&&(this.a=new QF(this,0)),wT(oj(this.a,k9),L(t,18));return;case 6:!this.a&&(this.a=new QF(this,0)),Sg(oj(this.a,(hG(),A9))),!this.a&&(this.a=new QF(this,0)),wT(oj(this.a,A9),L(t,18));return}UR(this,e-lk((hG(),E9)),lP(this.j&2?(!this.k&&(this.k=new Cf),this.k).Lk():E9,e),t)},Q.fi=function(){return hG(),E9},Q.hi=function(e){switch(e){case 0:!this.a&&(this.a=new QF(this,0)),uG(this.a);return;case 1:!this.b&&(this.b=new lN((qG(),o9),d9,this,1)),this.b.c.$b();return;case 2:!this.c&&(this.c=new lN((qG(),o9),d9,this,2)),this.c.c.$b();return;case 3:!this.a&&(this.a=new QF(this,0)),Sg(oj(this.a,(hG(),D9)));return;case 4:!this.a&&(this.a=new QF(this,0)),Sg(oj(this.a,(hG(),O9)));return;case 5:!this.a&&(this.a=new QF(this,0)),Sg(oj(this.a,(hG(),k9)));return;case 6:!this.a&&(this.a=new QF(this,0)),Sg(oj(this.a,(hG(),A9)));return}tR(this,e-lk((hG(),E9)),lP(this.j&2?(!this.k&&(this.k=new Cf),this.k).Lk():E9,e))},Q.Ib=function(){var e;return this.j&4?rU(this):(e=new YT(rU(this)),e.a+=` (mixed: `,zC(e,this.a),e.a+=`)`,e.a)},B(XZ,`XMLTypeDocumentRootImpl`,673),Y(1993,710,{109:1,94:1,93:1,469:1,158:1,57:1,114:1,52:1,100:1,161:1,117:1,118:1,2087:1},Du),Q.oi=function(e,t){switch(e.fk()){case 7:case 8:case 9:case 10:case 16:case 22:case 23:case 24:case 25:case 26:case 32:case 33:case 34:case 36:case 37:case 44:case 45:case 50:case 51:case 53:case 55:case 56:case 57:case 58:case 60:case 61:case 4:return t==null?null:WR(t);case 19:case 28:case 29:case 35:case 38:case 39:case 41:case 46:case 52:case 54:case 5:return IE(t);case 6:return vde(L(t,195));case 12:case 47:case 49:case 11:return _nt(this,e,t);case 13:return t==null?null:yet(L(t,247));case 15:case 14:return t==null?null:wye(A(I(t)));case 17:return pJe((hG(),t));case 18:return pJe(t);case 21:case 20:return t==null?null:Tye(L(t,164).a);case 27:return yde(L(t,195));case 30:return yGe((hG(),L(t,16)));case 31:return yGe(L(t,16));case 40:return _de((hG(),t));case 42:return mJe((hG(),t));case 43:return mJe(t);case 59:case 48:return gde((hG(),t));default:throw k(new q_(VX+e.ve()+HX))}},Q.pi=function(e){var t,n,r,i,a;switch(e.G==-1&&(e.G=(n=DP(e),n?gB(n.si(),e):-1)),e.G){case 0:return t=new d_,t;case 1:return r=new Mu,r;case 2:return i=new f_,i;case 3:return a=new Ire,a;default:throw k(new q_(Mpt+e.zb+HX))}},Q.qi=function(e,t){var n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_;switch(e.fk()){case 5:case 52:case 4:return t;case 6:return VUe(t);case 8:case 7:return t==null?null:DJe(t);case 9:return t==null?null:WN(_W((r=QW(t,!0),r.length>0&&(uj(0,r.length),r.charCodeAt(0)==43)?(uj(1,r.length+1),r.substr(1)):r),-128,127)<<24>>24);case 10:return t==null?null:WN(_W((i=QW(t,!0),i.length>0&&(uj(0,i.length),i.charCodeAt(0)==43)?(uj(1,i.length+1),i.substr(1)):i),-128,127)<<24>>24);case 11:return IE(IG(this,(hG(),wVt),t));case 12:return IE(IG(this,(hG(),TVt),t));case 13:return t==null?null:new yy(QW(t,!0));case 15:case 14:return _2e(t);case 16:return IE(IG(this,(hG(),EVt),t));case 17:return DHe((hG(),t));case 18:return DHe(t);case 28:case 29:case 35:case 38:case 39:case 41:case 54:case 19:return QW(t,!0);case 21:case 20:return j2e(t);case 22:return IE(IG(this,(hG(),DVt),t));case 23:return IE(IG(this,(hG(),OVt),t));case 24:return IE(IG(this,(hG(),kVt),t));case 25:return IE(IG(this,(hG(),AVt),t));case 26:return IE(IG(this,(hG(),jVt),t));case 27:return DUe(t);case 30:return OHe((hG(),t));case 31:return OHe(t);case 32:return t==null?null:q(_W((u=QW(t,!0),u.length>0&&(uj(0,u.length),u.charCodeAt(0)==43)?(uj(1,u.length+1),u.substr(1)):u),HK,eK));case 33:return t==null?null:new Uw((d=QW(t,!0),d.length>0&&(uj(0,d.length),d.charCodeAt(0)==43)?(uj(1,d.length+1),d.substr(1)):d));case 34:return t==null?null:q(_W((f=QW(t,!0),f.length>0&&(uj(0,f.length),f.charCodeAt(0)==43)?(uj(1,f.length+1),f.substr(1)):f),HK,eK));case 36:return t==null?null:Fz(AG((p=QW(t,!0),p.length>0&&(uj(0,p.length),p.charCodeAt(0)==43)?(uj(1,p.length+1),p.substr(1)):p)));case 37:return t==null?null:Fz(AG((m=QW(t,!0),m.length>0&&(uj(0,m.length),m.charCodeAt(0)==43)?(uj(1,m.length+1),m.substr(1)):m)));case 40:return iGe((hG(),t));case 42:return kHe((hG(),t));case 43:return kHe(t);case 44:return t==null?null:new Uw((h=QW(t,!0),h.length>0&&(uj(0,h.length),h.charCodeAt(0)==43)?(uj(1,h.length+1),h.substr(1)):h));case 45:return t==null?null:new Uw((g=QW(t,!0),g.length>0&&(uj(0,g.length),g.charCodeAt(0)==43)?(uj(1,g.length+1),g.substr(1)):g));case 46:return QW(t,!1);case 47:return IE(IG(this,(hG(),MVt),t));case 59:case 48:return rGe((hG(),t));case 49:return IE(IG(this,(hG(),NVt),t));case 50:return t==null?null:KL(_W((_=QW(t,!0),_.length>0&&(uj(0,_.length),_.charCodeAt(0)==43)?(uj(1,_.length+1),_.substr(1)):_),PZ,32767)<<16>>16);case 51:return t==null?null:KL(_W((a=QW(t,!0),a.length>0&&(uj(0,a.length),a.charCodeAt(0)==43)?(uj(1,a.length+1),a.substr(1)):a),PZ,32767)<<16>>16);case 53:return IE(IG(this,(hG(),PVt),t));case 55:return t==null?null:KL(_W((o=QW(t,!0),o.length>0&&(uj(0,o.length),o.charCodeAt(0)==43)?(uj(1,o.length+1),o.substr(1)):o),PZ,32767)<<16>>16);case 56:return t==null?null:KL(_W((s=QW(t,!0),s.length>0&&(uj(0,s.length),s.charCodeAt(0)==43)?(uj(1,s.length+1),s.substr(1)):s),PZ,32767)<<16>>16);case 57:return t==null?null:Fz(AG((c=QW(t,!0),c.length>0&&(uj(0,c.length),c.charCodeAt(0)==43)?(uj(1,c.length+1),c.substr(1)):c)));case 58:return t==null?null:Fz(AG((l=QW(t,!0),l.length>0&&(uj(0,l.length),l.charCodeAt(0)==43)?(uj(1,l.length+1),l.substr(1)):l)));case 60:return t==null?null:q(_W((n=QW(t,!0),n.length>0&&(uj(0,n.length),n.charCodeAt(0)==43)?(uj(1,n.length+1),n.substr(1)):n),HK,eK));case 61:return t==null?null:q(_W(QW(t,!0),HK,eK));default:throw k(new q_(VX+e.ve()+HX))}};var IVt,LVt,RVt,zVt;B(XZ,`XMLTypeFactoryImpl`,1993),Y(583,184,{109:1,94:1,93:1,158:1,197:1,57:1,241:1,114:1,52:1,100:1,161:1,184:1,117:1,118:1,680:1,2009:1,583:1},Kbe),Q.N=!1,Q.O=!1;var BVt=!1;B(XZ,`XMLTypePackageImpl`,583),Y(1926,1,{836:1},Ou),Q.Ik=function(){return x7e(),oHt},B(XZ,`XMLTypePackageImpl/1`,1926),Y(1935,1,RZ,ku),Q.dk=function(e){return DC(e)},Q.ek=function(e){return U(OQ,yK,2,e,6,1)},B(XZ,`XMLTypePackageImpl/10`,1935),Y(1936,1,RZ,Au),Q.dk=function(e){return DC(e)},Q.ek=function(e){return U(OQ,yK,2,e,6,1)},B(XZ,`XMLTypePackageImpl/11`,1936),Y(1937,1,RZ,ju),Q.dk=function(e){return DC(e)},Q.ek=function(e){return U(OQ,yK,2,e,6,1)},B(XZ,`XMLTypePackageImpl/12`,1937),Y(1938,1,RZ,Nu),Q.dk=function(e){return EC(e)},Q.ek=function(e){return U(CQ,yK,346,e,7,1)},B(XZ,`XMLTypePackageImpl/13`,1938),Y(1939,1,RZ,Pu),Q.dk=function(e){return DC(e)},Q.ek=function(e){return U(OQ,yK,2,e,6,1)},B(XZ,`XMLTypePackageImpl/14`,1939),Y(1940,1,RZ,Fu),Q.dk=function(e){return F(e,16)},Q.ek=function(e){return U(uQ,eJ,16,e,0,1)},B(XZ,`XMLTypePackageImpl/15`,1940),Y(1941,1,RZ,Iu),Q.dk=function(e){return F(e,16)},Q.ek=function(e){return U(uQ,eJ,16,e,0,1)},B(XZ,`XMLTypePackageImpl/16`,1941),Y(1942,1,RZ,Lu),Q.dk=function(e){return DC(e)},Q.ek=function(e){return U(OQ,yK,2,e,6,1)},B(XZ,`XMLTypePackageImpl/17`,1942),Y(1943,1,RZ,Ru),Q.dk=function(e){return F(e,164)},Q.ek=function(e){return U(wQ,yK,164,e,0,1)},B(XZ,`XMLTypePackageImpl/18`,1943),Y(1944,1,RZ,zu),Q.dk=function(e){return DC(e)},Q.ek=function(e){return U(OQ,yK,2,e,6,1)},B(XZ,`XMLTypePackageImpl/19`,1944),Y(1927,1,RZ,Bu),Q.dk=function(e){return F(e,842)},Q.ek=function(e){return U(v9,aK,842,e,0,1)},B(XZ,`XMLTypePackageImpl/2`,1927),Y(1945,1,RZ,Vu),Q.dk=function(e){return DC(e)},Q.ek=function(e){return U(OQ,yK,2,e,6,1)},B(XZ,`XMLTypePackageImpl/20`,1945),Y(1946,1,RZ,Hu),Q.dk=function(e){return DC(e)},Q.ek=function(e){return U(OQ,yK,2,e,6,1)},B(XZ,`XMLTypePackageImpl/21`,1946),Y(1947,1,RZ,Uu),Q.dk=function(e){return DC(e)},Q.ek=function(e){return U(OQ,yK,2,e,6,1)},B(XZ,`XMLTypePackageImpl/22`,1947),Y(1948,1,RZ,Wu),Q.dk=function(e){return DC(e)},Q.ek=function(e){return U(OQ,yK,2,e,6,1)},B(XZ,`XMLTypePackageImpl/23`,1948),Y(1949,1,RZ,Gu),Q.dk=function(e){return F(e,195)},Q.ek=function(e){return U(X9,yK,195,e,0,2)},B(XZ,`XMLTypePackageImpl/24`,1949),Y(1950,1,RZ,Ku),Q.dk=function(e){return DC(e)},Q.ek=function(e){return U(OQ,yK,2,e,6,1)},B(XZ,`XMLTypePackageImpl/25`,1950),Y(1951,1,RZ,qu),Q.dk=function(e){return DC(e)},Q.ek=function(e){return U(OQ,yK,2,e,6,1)},B(XZ,`XMLTypePackageImpl/26`,1951),Y(1952,1,RZ,Ju),Q.dk=function(e){return F(e,16)},Q.ek=function(e){return U(uQ,eJ,16,e,0,1)},B(XZ,`XMLTypePackageImpl/27`,1952),Y(1953,1,RZ,Yu),Q.dk=function(e){return F(e,16)},Q.ek=function(e){return U(uQ,eJ,16,e,0,1)},B(XZ,`XMLTypePackageImpl/28`,1953),Y(1954,1,RZ,Xu),Q.dk=function(e){return DC(e)},Q.ek=function(e){return U(OQ,yK,2,e,6,1)},B(XZ,`XMLTypePackageImpl/29`,1954),Y(1928,1,RZ,Zu),Q.dk=function(e){return F(e,671)},Q.ek=function(e){return U(y9,aK,2084,e,0,1)},B(XZ,`XMLTypePackageImpl/3`,1928),Y(1955,1,RZ,Qu),Q.dk=function(e){return F(e,15)},Q.ek=function(e){return U(TQ,yK,15,e,0,1)},B(XZ,`XMLTypePackageImpl/30`,1955),Y(1956,1,RZ,$u),Q.dk=function(e){return DC(e)},Q.ek=function(e){return U(OQ,yK,2,e,6,1)},B(XZ,`XMLTypePackageImpl/31`,1956),Y(1957,1,RZ,ed),Q.dk=function(e){return F(e,190)},Q.ek=function(e){return U(EQ,yK,190,e,0,1)},B(XZ,`XMLTypePackageImpl/32`,1957),Y(1958,1,RZ,td),Q.dk=function(e){return DC(e)},Q.ek=function(e){return U(OQ,yK,2,e,6,1)},B(XZ,`XMLTypePackageImpl/33`,1958),Y(1959,1,RZ,nd),Q.dk=function(e){return DC(e)},Q.ek=function(e){return U(OQ,yK,2,e,6,1)},B(XZ,`XMLTypePackageImpl/34`,1959),Y(1960,1,RZ,rd),Q.dk=function(e){return DC(e)},Q.ek=function(e){return U(OQ,yK,2,e,6,1)},B(XZ,`XMLTypePackageImpl/35`,1960),Y(1961,1,RZ,id),Q.dk=function(e){return DC(e)},Q.ek=function(e){return U(OQ,yK,2,e,6,1)},B(XZ,`XMLTypePackageImpl/36`,1961),Y(1962,1,RZ,ad),Q.dk=function(e){return F(e,16)},Q.ek=function(e){return U(uQ,eJ,16,e,0,1)},B(XZ,`XMLTypePackageImpl/37`,1962),Y(1963,1,RZ,od),Q.dk=function(e){return F(e,16)},Q.ek=function(e){return U(uQ,eJ,16,e,0,1)},B(XZ,`XMLTypePackageImpl/38`,1963),Y(1964,1,RZ,dee),Q.dk=function(e){return DC(e)},Q.ek=function(e){return U(OQ,yK,2,e,6,1)},B(XZ,`XMLTypePackageImpl/39`,1964),Y(1929,1,RZ,sd),Q.dk=function(e){return F(e,672)},Q.ek=function(e){return U(b9,aK,2085,e,0,1)},B(XZ,`XMLTypePackageImpl/4`,1929),Y(1965,1,RZ,fee),Q.dk=function(e){return DC(e)},Q.ek=function(e){return U(OQ,yK,2,e,6,1)},B(XZ,`XMLTypePackageImpl/40`,1965),Y(1966,1,RZ,cd),Q.dk=function(e){return DC(e)},Q.ek=function(e){return U(OQ,yK,2,e,6,1)},B(XZ,`XMLTypePackageImpl/41`,1966),Y(1967,1,RZ,ld),Q.dk=function(e){return DC(e)},Q.ek=function(e){return U(OQ,yK,2,e,6,1)},B(XZ,`XMLTypePackageImpl/42`,1967),Y(1968,1,RZ,ud),Q.dk=function(e){return DC(e)},Q.ek=function(e){return U(OQ,yK,2,e,6,1)},B(XZ,`XMLTypePackageImpl/43`,1968),Y(1969,1,RZ,dd),Q.dk=function(e){return DC(e)},Q.ek=function(e){return U(OQ,yK,2,e,6,1)},B(XZ,`XMLTypePackageImpl/44`,1969),Y(1970,1,RZ,fd),Q.dk=function(e){return F(e,191)},Q.ek=function(e){return U(DQ,yK,191,e,0,1)},B(XZ,`XMLTypePackageImpl/45`,1970),Y(1971,1,RZ,pd),Q.dk=function(e){return DC(e)},Q.ek=function(e){return U(OQ,yK,2,e,6,1)},B(XZ,`XMLTypePackageImpl/46`,1971),Y(1972,1,RZ,md),Q.dk=function(e){return DC(e)},Q.ek=function(e){return U(OQ,yK,2,e,6,1)},B(XZ,`XMLTypePackageImpl/47`,1972),Y(1973,1,RZ,hd),Q.dk=function(e){return DC(e)},Q.ek=function(e){return U(OQ,yK,2,e,6,1)},B(XZ,`XMLTypePackageImpl/48`,1973),Y(1974,1,RZ,gd),Q.dk=function(e){return F(e,191)},Q.ek=function(e){return U(DQ,yK,191,e,0,1)},B(XZ,`XMLTypePackageImpl/49`,1974),Y(1930,1,RZ,_d),Q.dk=function(e){return F(e,673)},Q.ek=function(e){return U(yVt,aK,2086,e,0,1)},B(XZ,`XMLTypePackageImpl/5`,1930),Y(1975,1,RZ,vd),Q.dk=function(e){return F(e,190)},Q.ek=function(e){return U(EQ,yK,190,e,0,1)},B(XZ,`XMLTypePackageImpl/50`,1975),Y(1976,1,RZ,yd),Q.dk=function(e){return DC(e)},Q.ek=function(e){return U(OQ,yK,2,e,6,1)},B(XZ,`XMLTypePackageImpl/51`,1976),Y(1977,1,RZ,bd),Q.dk=function(e){return F(e,15)},Q.ek=function(e){return U(TQ,yK,15,e,0,1)},B(XZ,`XMLTypePackageImpl/52`,1977),Y(1931,1,RZ,xd),Q.dk=function(e){return DC(e)},Q.ek=function(e){return U(OQ,yK,2,e,6,1)},B(XZ,`XMLTypePackageImpl/6`,1931),Y(1932,1,RZ,Sd),Q.dk=function(e){return F(e,195)},Q.ek=function(e){return U(X9,yK,195,e,0,2)},B(XZ,`XMLTypePackageImpl/7`,1932),Y(1933,1,RZ,Cd),Q.dk=function(e){return TC(e)},Q.ek=function(e){return U(bQ,yK,473,e,8,1)},B(XZ,`XMLTypePackageImpl/8`,1933),Y(1934,1,RZ,wd),Q.dk=function(e){return F(e,221)},Q.ek=function(e){return U(xQ,yK,221,e,0,1)},B(XZ,`XMLTypePackageImpl/9`,1934);var j9,M9,N9,P9,$;Y(53,63,UK,cv),B(tQ,`RegEx/ParseException`,53),Y(821,1,{},Td),Q._l=function(e){return e<this.j&&Lk(this.i,e)==63},Q.am=function(){var e,t,n,r,i;if(this.c!=10)throw k(new cv(YG((iT(),aZ))));switch(e=this.a,e){case 101:e=27;break;case 102:e=12;break;case 110:e=10;break;case 114:e=13;break;case 116:e=9;break;case 120:if(zG(this),this.c!=0)throw k(new cv(YG((iT(),cZ))));if(this.a==123){i=0,n=0;do{if(zG(this),this.c!=0)throw k(new cv(YG((iT(),cZ))));if((i=jB(this.a))<0)break;if(n>n*16)throw k(new cv(YG((iT(),Fmt))));n=n*16+i}while(!0);if(this.a!=125)throw k(new cv(YG((iT(),Imt))));if(n>nQ)throw k(new cv(YG((iT(),Lmt))));e=n}else{if(i=0,this.c!=0||(i=jB(this.a))<0||(n=i,zG(this),this.c!=0||(i=jB(this.a))<0))throw k(new cv(YG((iT(),cZ))));n=n*16+i,e=n}break;case 117:if(r=0,zG(this),this.c!=0||(r=jB(this.a))<0||(t=r,zG(this),this.c!=0||(r=jB(this.a))<0)||(t=t*16+r,zG(this),this.c!=0||(r=jB(this.a))<0)||(t=t*16+r,zG(this),this.c!=0||(r=jB(this.a))<0))throw k(new cv(YG((iT(),cZ))));t=t*16+r,e=t;break;case 118:if(zG(this),this.c!=0||(r=jB(this.a))<0||(t=r,zG(this),this.c!=0||(r=jB(this.a))<0)||(t=t*16+r,zG(this),this.c!=0||(r=jB(this.a))<0)||(t=t*16+r,zG(this),this.c!=0||(r=jB(this.a))<0)||(t=t*16+r,zG(this),this.c!=0||(r=jB(this.a))<0)||(t=t*16+r,zG(this),this.c!=0||(r=jB(this.a))<0))throw k(new cv(YG((iT(),cZ))));if(t=t*16+r,t>nQ)throw k(new cv(YG((iT(),`parser.descappe.4`))));e=t;break;case 65:case 90:case 122:throw k(new cv(YG((iT(),Rmt))))}return e},Q.bm=function(e){var t,n;switch(e){case 100:n=(this.e&32)==32?jG(`Nd`,!0):(GG(),B9);break;case 68:n=(this.e&32)==32?jG(`Nd`,!1):(GG(),YVt);break;case 119:n=(this.e&32)==32?jG(`IsWord`,!0):(GG(),U9);break;case 87:n=(this.e&32)==32?jG(`IsWord`,!1):(GG(),ZVt);break;case 115:n=(this.e&32)==32?jG(`IsSpace`,!0):(GG(),H9);break;case 83:n=(this.e&32)==32?jG(`IsSpace`,!1):(GG(),XVt);break;default:throw k(new M_((t=e,sgt+t.toString(16))))}return n},Q.cm=function(e){var t,n,r,i,a,o,s,c,l,u,d,f;for(this.b=1,zG(this),t=null,this.c==0&&this.a==94?(zG(this),e?u=(GG(),GG(),++W9,new _j(5)):(t=(GG(),GG(),++W9,new _j(4)),LU(t,0,nQ),u=(++W9,new _j(4)))):u=(GG(),GG(),++W9,new _j(4)),i=!0;(f=this.c)!=1&&!(f==0&&this.a==93&&!i);){if(i=!1,n=this.a,r=!1,f==10)switch(n){case 100:case 68:case 119:case 87:case 115:case 83:$W(u,this.bm(n)),r=!0;break;case 105:case 73:case 99:case 67:n=this.sm(u,n),n<0&&(r=!0);break;case 112:case 80:if(d=x$e(this,n),!d)throw k(new cv(YG((iT(),Tmt))));$W(u,d),r=!0;break;default:n=this.am()}else if(f==20){if(o=_E(this.i,58,this.d),o<0)throw k(new cv(YG((iT(),Emt))));if(s=!0,Lk(this.i,this.d)==94&&(++this.d,s=!1),a=xA(this.i,this.d,o),c=ije(a,s,(this.e&512)==512),!c)throw k(new cv(YG((iT(),Dmt))));if($W(u,c),r=!0,o+1>=this.j||Lk(this.i,o+1)!=93)throw k(new cv(YG((iT(),Emt))));this.d=o+2}if(zG(this),!r)if(this.c!=0||this.a!=45)LU(u,n,n);else{if(zG(this),(f=this.c)==1)throw k(new cv(YG((iT(),sZ))));f==0&&this.a==93?(LU(u,n,n),LU(u,45,45)):(l=this.a,f==10&&(l=this.am()),zG(this),LU(u,n,l))}(this.e&fZ)==fZ&&this.c==0&&this.a==44&&zG(this)}if(this.c==1)throw k(new cv(YG((iT(),sZ))));return t&&(vG(t,u),u=t),nU(u),sG(u),this.b=0,zG(this),u},Q.dm=function(){for(var e,t,n=this.cm(!1),r;(r=this.c)!=7;)if(e=this.a,r==0&&(e==45||e==38)||r==4){if(zG(this),this.c!=9)throw k(new cv(YG((iT(),Mmt))));if(t=this.cm(!1),r==4)$W(n,t);else if(e==45)vG(n,t);else if(e==38)int(n,t);else throw k(new M_(`ASSERT`))}else throw k(new cv(YG((iT(),Nmt))));return zG(this),n},Q.em=function(){var e=this.a-48,t=(GG(),GG(),++W9,new vCe(12,null,e));return!this.g&&(this.g=new Tg),vg(this.g,new Rh(e)),zG(this),t},Q.fm=function(){return zG(this),GG(),$Vt},Q.gm=function(){return zG(this),GG(),QVt},Q.hm=function(){throw k(new cv(YG((iT(),lZ))))},Q.im=function(){throw k(new cv(YG((iT(),lZ))))},Q.jm=function(){return zG(this),dRe()},Q.km=function(){return zG(this),GG(),tHt},Q.lm=function(){return zG(this),GG(),rHt},Q.mm=function(){var e;if(this.d>=this.j||((e=Lk(this.i,this.d++))&65504)!=64)throw k(new cv(YG((iT(),xmt))));return zG(this),GG(),GG(),++W9,new cO(0,e-64)},Q.nm=function(){return zG(this),W7e()},Q.om=function(){return zG(this),GG(),iHt},Q.pm=function(){var e=(GG(),GG(),++W9,new cO(0,105));return zG(this),e},Q.qm=function(){return zG(this),GG(),nHt},Q.rm=function(){return zG(this),GG(),eHt},Q.sm=function(e,t){return this.am()},Q.tm=function(){return zG(this),GG(),qVt},Q.um=function(){var e,t,n,r,i;if(this.d+1>=this.j)throw k(new cv(YG((iT(),vmt))));if(r=-1,t=null,e=Lk(this.i,this.d),49<=e&&e<=57){if(r=e-48,!this.g&&(this.g=new Tg),vg(this.g,new Rh(r)),++this.d,Lk(this.i,this.d)!=41)throw k(new cv(YG((iT(),oZ))));++this.d}else switch(e==63&&--this.d,zG(this),t=Yit(this),t.e){case 20:case 21:case 22:case 23:break;case 8:if(this.c!=7)throw k(new cv(YG((iT(),oZ))));break;default:throw k(new cv(YG((iT(),ymt))))}if(zG(this),i=kz(this),n=null,i.e==2){if(i.Nm()!=2)throw k(new cv(YG((iT(),bmt))));n=i.Jm(1),i=i.Jm(0)}if(this.c!=7)throw k(new cv(YG((iT(),oZ))));return zG(this),GG(),GG(),++W9,new QMe(r,t,i,n)},Q.vm=function(){return zG(this),GG(),JVt},Q.wm=function(){var e;if(zG(this),e=GO(24,kz(this)),this.c!=7)throw k(new cv(YG((iT(),oZ))));return zG(this),e},Q.xm=function(){var e;if(zG(this),e=GO(20,kz(this)),this.c!=7)throw k(new cv(YG((iT(),oZ))));return zG(this),e},Q.ym=function(){var e;if(zG(this),e=GO(22,kz(this)),this.c!=7)throw k(new cv(YG((iT(),oZ))));return zG(this),e},Q.zm=function(){var e=0,t,n=0,r,i;for(t=-1;this.d<this.j&&(t=Lk(this.i,this.d),i=v1e(t),i!=0);)e|=i,++this.d;if(this.d>=this.j)throw k(new cv(YG((iT(),gmt))));if(t==45){for(++this.d;this.d<this.j&&(t=Lk(this.i,this.d),i=v1e(t),i!=0);)n|=i,++this.d;if(this.d>=this.j)throw k(new cv(YG((iT(),gmt))))}if(t==58){if(++this.d,zG(this),r=Bye(kz(this),e,n),this.c!=7)throw k(new cv(YG((iT(),oZ))));zG(this)}else if(t==41)++this.d,zG(this),r=Bye(kz(this),e,n);else throw k(new cv(YG((iT(),_mt))));return r},Q.Am=function(){var e;if(zG(this),e=GO(21,kz(this)),this.c!=7)throw k(new cv(YG((iT(),oZ))));return zG(this),e},Q.Bm=function(){var e;if(zG(this),e=GO(23,kz(this)),this.c!=7)throw k(new cv(YG((iT(),oZ))));return zG(this),e},Q.Cm=function(){var e,t;if(zG(this),e=this.f++,t=aye(kz(this),e),this.c!=7)throw k(new cv(YG((iT(),oZ))));return zG(this),t},Q.Dm=function(){var e;if(zG(this),e=aye(kz(this),0),this.c!=7)throw k(new cv(YG((iT(),oZ))));return zG(this),e},Q.Em=function(e){return zG(this),this.c==5?(zG(this),sO(e,(GG(),GG(),++W9,new Xj(9,e)))):sO(e,(GG(),GG(),++W9,new Xj(3,e)))},Q.Fm=function(e){var t;return zG(this),t=(GG(),GG(),++W9,new oT(2)),this.c==5?(zG(this),lG(t,V9),lG(t,e)):(lG(t,e),lG(t,V9)),t},Q.Gm=function(e){return zG(this),this.c==5?(zG(this),GG(),GG(),++W9,new Xj(9,e)):(GG(),GG(),++W9,new Xj(3,e))},Q.a=0,Q.b=0,Q.c=0,Q.d=0,Q.e=0,Q.f=1,Q.g=null,Q.j=0,B(tQ,`RegEx/RegexParser`,821),Y(1913,821,{},p_),Q._l=function(e){return!1},Q.am=function(){return g6e(this)},Q.bm=function(e){return vW(e)},Q.cm=function(e){return mat(this)},Q.dm=function(){throw k(new cv(YG((iT(),lZ))))},Q.em=function(){throw k(new cv(YG((iT(),lZ))))},Q.fm=function(){throw k(new cv(YG((iT(),lZ))))},Q.gm=function(){throw k(new cv(YG((iT(),lZ))))},Q.hm=function(){return zG(this),vW(67)},Q.im=function(){return zG(this),vW(73)},Q.jm=function(){throw k(new cv(YG((iT(),lZ))))},Q.km=function(){throw k(new cv(YG((iT(),lZ))))},Q.lm=function(){throw k(new cv(YG((iT(),lZ))))},Q.mm=function(){return zG(this),vW(99)},Q.nm=function(){throw k(new cv(YG((iT(),lZ))))},Q.om=function(){throw k(new cv(YG((iT(),lZ))))},Q.pm=function(){return zG(this),vW(105)},Q.qm=function(){throw k(new cv(YG((iT(),lZ))))},Q.rm=function(){throw k(new cv(YG((iT(),lZ))))},Q.sm=function(e,t){return $W(e,vW(t)),-1},Q.tm=function(){return zG(this),GG(),GG(),++W9,new cO(0,94)},Q.um=function(){throw k(new cv(YG((iT(),lZ))))},Q.vm=function(){return zG(this),GG(),GG(),++W9,new cO(0,36)},Q.wm=function(){throw k(new cv(YG((iT(),lZ))))},Q.xm=function(){throw k(new cv(YG((iT(),lZ))))},Q.ym=function(){throw k(new cv(YG((iT(),lZ))))},Q.zm=function(){throw k(new cv(YG((iT(),lZ))))},Q.Am=function(){throw k(new cv(YG((iT(),lZ))))},Q.Bm=function(){throw k(new cv(YG((iT(),lZ))))},Q.Cm=function(){var e;if(zG(this),e=aye(kz(this),0),this.c!=7)throw k(new cv(YG((iT(),oZ))));return zG(this),e},Q.Dm=function(){throw k(new cv(YG((iT(),lZ))))},Q.Em=function(e){return zG(this),sO(e,(GG(),GG(),++W9,new Xj(3,e)))},Q.Fm=function(e){var t;return zG(this),t=(GG(),GG(),++W9,new oT(2)),lG(t,e),lG(t,V9),t},Q.Gm=function(e){return zG(this),GG(),GG(),++W9,new Xj(3,e)};var F9=null,I9=null;B(tQ,`RegEx/ParserForXMLSchema`,1913),Y(121,1,iQ,zh),Q.Hm=function(e){throw k(new M_(`Not supported.`))},Q.Im=function(){return-1},Q.Jm=function(e){return null},Q.Km=function(){return null},Q.Lm=function(e){},Q.Mm=function(e){},Q.Nm=function(){return 0},Q.Ib=function(){return this.Om(0)},Q.Om=function(e){return this.e==11?`.`:``},Q.e=0;var VVt,L9,R9,HVt,UVt,z9=null,B9,WVt=null,GVt,V9,KVt=null,qVt,JVt,YVt,XVt,ZVt,QVt,H9,$Vt,eHt,tHt,nHt,U9,rHt,iHt,W9=0,aHt=B(tQ,`RegEx/Token`,121);Y(137,121,{3:1,137:1,121:1},_j),Q.Om=function(e){var t,n,r;if(this.e==4)if(this==GVt)n=`.`;else if(this==B9)n=`\\d`;else if(this==U9)n=`\\w`;else if(this==H9)n=`\\s`;else{for(r=new yv,r.a+=`[`,t=0;t<this.b.length;t+=2)(e&fZ)!=0&&t>0&&(r.a+=`,`),this.b[t]===this.b[t+1]?BC(r,IW(this.b[t])):(BC(r,IW(this.b[t])),r.a+=`-`,BC(r,IW(this.b[t+1])));r.a+=`]`,n=r.a}else if(this==YVt)n=`\\D`;else if(this==ZVt)n=`\\W`;else if(this==XVt)n=`\\S`;else{for(r=new yv,r.a+=`[^`,t=0;t<this.b.length;t+=2)(e&fZ)!=0&&t>0&&(r.a+=`,`),this.b[t]===this.b[t+1]?BC(r,IW(this.b[t])):(BC(r,IW(this.b[t])),r.a+=`-`,BC(r,IW(this.b[t+1])));r.a+=`]`,n=r.a}return n},Q.a=!1,Q.c=!1,B(tQ,`RegEx/RangeToken`,137),Y(581,1,{581:1},Rh),Q.a=0,B(tQ,`RegEx/RegexParser/ReferencePosition`,581),Y(580,1,{3:1,580:1},Jy),Q.Fb=function(e){var t;return e==null||!F(e,580)?!1:(t=L(e,580),lD(this.b,t.b)&&this.a==t.a)},Q.Hb=function(){return sL(this.b+`/`+V4e(this.a))},Q.Ib=function(){return this.c.Om(this.a)},Q.a=0,B(tQ,`RegEx/RegularExpression`,580),Y(228,121,iQ,cO),Q.Im=function(){return this.a},Q.Om=function(e){var t,n,r;switch(this.e){case 0:switch(this.a){case 124:case 42:case 43:case 63:case 40:case 41:case 46:case 91:case 123:case 92:r=`\\`+YE(this.a&YK);break;case 12:r=`\\f`;break;case 10:r=`\\n`;break;case 13:r=`\\r`;break;case 9:r=`\\t`;break;case 27:r=`\\e`;break;default:this.a>=Cq?(n=(t=this.a>>>0,`0`+t.toString(16)),r=`\\v`+xA(n,n.length-6,n.length)):r=``+YE(this.a&YK)}break;case 8:r=this==qVt||this==JVt?``+YE(this.a&YK):`\\`+YE(this.a&YK);break;default:r=null}return r},Q.a=0,B(tQ,`RegEx/Token/CharToken`,228),Y(323,121,iQ,Xj),Q.Jm=function(e){return this.a},Q.Lm=function(e){this.b=e},Q.Mm=function(e){this.c=e},Q.Nm=function(){return 1},Q.Om=function(e){var t;if(this.e==3)if(this.c<0&&this.b<0)t=this.a.Om(e)+`*`;else if(this.c==this.b)t=this.a.Om(e)+`{`+this.c+`}`;else if(this.c>=0&&this.b>=0)t=this.a.Om(e)+`{`+this.c+`,`+this.b+`}`;else if(this.c>=0&&this.b<0)t=this.a.Om(e)+`{`+this.c+`,}`;else throw k(new M_(`Token#toString(): CLOSURE `+this.c+iK+this.b));else if(this.c<0&&this.b<0)t=this.a.Om(e)+`*?`;else if(this.c==this.b)t=this.a.Om(e)+`{`+this.c+`}?`;else if(this.c>=0&&this.b>=0)t=this.a.Om(e)+`{`+this.c+`,`+this.b+`}?`;else if(this.c>=0&&this.b<0)t=this.a.Om(e)+`{`+this.c+`,}?`;else throw k(new M_(`Token#toString(): NONGREEDYCLOSURE `+this.c+iK+this.b));return t},Q.b=0,Q.c=0,B(tQ,`RegEx/Token/ClosureToken`,323),Y(822,121,iQ,xye),Q.Jm=function(e){return e==0?this.a:this.b},Q.Nm=function(){return 2},Q.Om=function(e){return this.b.e==3&&this.b.Jm(0)==this.a?this.a.Om(e)+`+`:this.b.e==9&&this.b.Jm(0)==this.a?this.a.Om(e)+`+?`:this.a.Om(e)+(``+this.b.Om(e))},B(tQ,`RegEx/Token/ConcatToken`,822),Y(1911,121,iQ,QMe),Q.Jm=function(e){if(e==0)return this.d;if(e==1)return this.b;throw k(new M_(`Internal Error: `+e))},Q.Nm=function(){return this.b?2:1},Q.Om=function(e){var t=this.c>0?`(?(`+this.c+`)`:this.a.e==8?`(?(`+this.a+`)`:`(?`+this.a;return this.b?t+=this.d+`|`+this.b+`)`:t+=this.d+`)`,t},Q.c=0,B(tQ,`RegEx/Token/ConditionToken`,1911),Y(1912,121,iQ,PTe),Q.Jm=function(e){return this.b},Q.Nm=function(){return 1},Q.Om=function(e){return`(?`+(this.a==0?``:V4e(this.a))+(this.c==0?``:V4e(this.c))+`:`+this.b.Om(e)+`)`},Q.a=0,Q.c=0,B(tQ,`RegEx/Token/ModifierToken`,1912),Y(823,121,iQ,xbe),Q.Jm=function(e){return this.a},Q.Nm=function(){return 1},Q.Om=function(e){var t=null;switch(this.e){case 6:t=this.b==0?`(?:`+this.a.Om(e)+`)`:`(`+this.a.Om(e)+`)`;break;case 20:t=`(?=`+this.a.Om(e)+`)`;break;case 21:t=`(?!`+this.a.Om(e)+`)`;break;case 22:t=`(?<=`+this.a.Om(e)+`)`;break;case 23:t=`(?<!`+this.a.Om(e)+`)`;break;case 24:t=`(?>`+this.a.Om(e)+`)`}return t},Q.b=0,B(tQ,`RegEx/Token/ParenToken`,823),Y(518,121,{3:1,121:1,518:1},vCe),Q.Km=function(){return this.b},Q.Om=function(e){return this.e==12?`\\`+this.a:Y0e(this.b)},Q.a=0,B(tQ,`RegEx/Token/StringToken`,518),Y(466,121,iQ,oT),Q.Hm=function(e){lG(this,e)},Q.Jm=function(e){return L(Ek(this.a,e),121)},Q.Nm=function(){return this.a?this.a.a.c.length:0},Q.Om=function(e){var t,n,r,i,a;if(this.e==1){if(this.a.a.c.length==2)t=L(Ek(this.a,0),121),n=L(Ek(this.a,1),121),i=n.e==3&&n.Jm(0)==t?t.Om(e)+`+`:n.e==9&&n.Jm(0)==t?t.Om(e)+`+?`:t.Om(e)+(``+n.Om(e));else{for(a=new yv,r=0;r<this.a.a.c.length;r++)BC(a,L(Ek(this.a,r),121).Om(e));i=a.a}return i}if(this.a.a.c.length==2&&L(Ek(this.a,1),121).e==7)i=L(Ek(this.a,0),121).Om(e)+`?`;else if(this.a.a.c.length==2&&L(Ek(this.a,0),121).e==7)i=L(Ek(this.a,1),121).Om(e)+`??`;else{for(a=new yv,BC(a,L(Ek(this.a,0),121).Om(e)),r=1;r<this.a.a.c.length;r++)a.a+=`|`,BC(a,L(Ek(this.a,r),121).Om(e));i=a.a}return i},B(tQ,`RegEx/Token/UnionToken`,466),Y(515,1,{590:1},Ny),Q.Ib=function(){return this.a.b},B(vgt,`XMLTypeUtil/PatternMatcherImpl`,515),Y(1676,1489,{},Ed);var oHt;B(vgt,`XMLTypeValidator`,1676),Y(270,1,EK,SO),Q.Ic=function(e){mM(this,e)},Q.Jc=function(){return(this.b-this.a)*this.c<0?G9:new HT(this)},Q.a=0,Q.b=0,Q.c=0;var G9;B(ygt,`ExclusiveRange`,270),Y(1055,1,_K,Dd),Q.Rb=function(e){L(e,15),Ace()},Q.Nb=function(e){KO(this,e)},Q.Pb=function(){return xae()},Q.Ub=function(){return My()},Q.Wb=function(e){L(e,15),kce()},Q.Ob=function(){return!1},Q.Sb=function(){return!1},Q.Tb=function(){return-1},Q.Vb=function(){return-1},Q.Qb=function(){throw k(new iv(Sgt))},B(ygt,`ExclusiveRange/1`,1055),Y(259,1,_K,HT),Q.Rb=function(e){L(e,15),jce()},Q.Nb=function(e){KO(this,e)},Q.Pb=function(){return pze(this)},Q.Ub=function(){return pje(this)},Q.Wb=function(e){L(e,15),aT()},Q.Ob=function(){return this.c.c<0?this.a>=this.c.b:this.a<=this.c.b},Q.Sb=function(){return this.b>0},Q.Tb=function(){return this.b},Q.Vb=function(){return this.b-1},Q.Qb=function(){throw k(new iv(Sgt))},Q.a=0,Q.b=0,B(ygt,`ExclusiveRange/RangeIterator`,259);var K9=Fk(gZ,`C`),q9=Fk(yZ,`I`),J9=Fk(ZG,`Z`),Y9=Fk(bZ,`J`),X9=Fk(hZ,`B`),Z9=Fk(_Z,`D`),Q9=Fk(vZ,`F`),$9=Fk(xZ,`S`),sHt=$D(`org.eclipse.elk.core.labels`,`ILabelManager`),cHt=$D(qX,`DiagnosticChain`),lHt=$D(Oht,`ResourceSet`),uHt=B(qX,`InvocationTargetException`,null),dHt=(vv(),cke),fHt=fHt=$qe;yPe(hre),xFe(`permProps`,[[[`locale`,`default`],[Cgt,`gecko1_8`]],[[`locale`,`default`],[Cgt,`safari`]]]),fHt(null,`elk`,null)}).call(this)}).call(this,typeof global<`u`?global:typeof self<`u`?self:typeof window<`u`?window:{})},{}],3:[function(e,t,n){function r(e){"@babel/helpers - typeof";return r=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},r(e)}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,o(r.key),r)}}function a(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function o(e){var t=s(e,`string`);return r(t)==`symbol`?t:t+``}function s(e,t){if(r(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,t||`default`);if(r(i)!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function c(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function l(e,t,n){return t=p(t),u(e,f()?Reflect.construct(t,n||[],p(e).constructor):t.apply(e,n))}function u(e,t){if(t&&(r(t)==`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return d(e)}function d(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function f(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(f=function(){return!!e})()}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}function m(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}var g=function(t){function n(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};c(this,n);var r=Object.assign({},t),i=!1;try{e.resolve(`web-worker`),i=!0}catch{}if(t.workerUrl)if(i){var a=e("web-worker");r.workerFactory=function(e){return new a(e)}}else console.warn(`Web worker requested but 'web-worker' package not installed.
42
42
  Consider installing the package or pass your own 'workerFactory' to ELK's constructor.
43
- ... Falling back to non-web worker version.`);if(!r.workerFactory){var o=e("./elk-worker.min.js").Worker;r.workerFactory=function(e){return new o(e)}}return l(this,n,[r])}return m(n,t),a(n)}(e("./elk-api.js").default);Object.defineProperty(t.exports,"__esModule",{value:!0}),t.exports=g,g.default=g},{"./elk-api.js":1,"./elk-worker.min.js":2,"web-worker":4}],4:[function(e,t,n){t.exports=typeof Worker<`u`?Worker:void 0},{}]},{},[3])(3)})}))(),1),L_={TITLE_STRIP_W:28,LANE_STRIP_W:28,LANE_MIN_W:320,LANE_MIN_H:120,PAD:24};function Zre(e,t,n,r){if(!n.nodes.some(e=>e.type===`activity-frame`))return e;let i=new Map(n.nodes.map(e=>[e.id,e.type])),a=new Map(e),o=L_,s=e=>{let t=e.children.filter(e=>i.get(e.id)===`activity-lane`&&a.has(e.id));if(t.length===0){let t=a.get(e.id);a.set(e.id,{...t,width:Math.max(t.width,o.TITLE_STRIP_W+o.LANE_MIN_W),height:Math.max(t.height,o.LANE_MIN_H)});return}let n=[],s=o.LANE_MIN_W;for(let e of t){let t=0,i=0;for(let n of e.children){let e=a.get(n.id);e!==void 0&&(t=Math.max(t,e.x+e.width),i=Math.max(i,e.y+e.height))}let c=r?.[e.id];n.push(Math.max(o.LANE_MIN_H,i+o.PAD,c?.h??0)),s=Math.max(s,t+o.PAD,c?.w??0)}let c=0;t.forEach((e,t)=>{let r=a.get(e.id);a.set(e.id,{...r,x:o.TITLE_STRIP_W,y:c,width:s,height:n[t]}),c+=n[t]});let l=a.get(e.id);a.set(e.id,{...l,width:o.TITLE_STRIP_W+s,height:c})},c=e=>{i.get(e.id)===`activity-frame`&&a.has(e.id)&&s(e),e.children.forEach(c)};return t.roots.forEach(c),a}var R_={width:200,height:88};function Qre(e){return{width:e.width,height:e.height+(e.reserveBottom??0)}}var z_=`layered`,$re=new Set([`force`,`stress`,`mrtree`,`radial`]);function eie(e){return $re.has(e?.algorithm??`layered`)}function tie(e){let t=e?.algorithm??`layered`,n=e?.spacing,r=n===void 0?`40`:String(n),i=r,a={"elk.algorithm":t,"elk.direction":e?.direction??`DOWN`,"elk.spacing.nodeNode":r,"elk.spacing.edgeNode":`20`,"elk.spacing.edgeEdge":`12`,"elk.spacing.componentComponent":`48`,"elk.spacing.edgeLabel":`6`,"elk.separateConnectedComponents":`true`,...eie(e)?{}:{"elk.hierarchyHandling":`INCLUDE_CHILDREN`}};return t===`layered`&&(a[`elk.layered.spacing.nodeNodeBetweenLayers`]=i,a[`elk.layered.thoroughness`]=`10`,a[`elk.layered.crossingMinimization.strategy`]=`LAYER_SWEEP`,a[`elk.layered.nodePlacement.strategy`]=`BRANDES_KOEPF`,a[`elk.layered.nodePlacement.bk.fixedAlignment`]=`BALANCED`,e?.aspectRatio!==void 0&&(a[`elk.layered.wrapping.strategy`]=`MULTI_EDGE`,a[`elk.aspectRatio`]=String(e.aspectRatio))),t===`stress`&&(a[`elk.stress.desiredEdgeLength`]=`240`),(t===`layered`||e?.edgeRouting===`orthogonal`)&&(a[`elk.edgeRouting`]=`ORTHOGONAL`),a}function B_(e){let t=new Map,n=(e,r)=>{t.set(e.id,r),e.children.forEach(t=>n(t,e.id))};e.roots.forEach(e=>n(e,null));let r=e=>{let n=[],r=e;for(;r!=null;)n.push(r),r=t.get(r);return n.reverse()},i=new Map;for(let t of e.layoutEdges){let e=r(t.from),n=r(t.to);if(e.length===0||n.length===0)continue;let a=0;for(;a<e.length&&a<n.length&&e[a]===n[a];)a++;let o=a===0?null:e[a-1],s=e[a],c=n[a];if(s===void 0||c===void 0||s===c)continue;let l=i.get(o)??[];l.push({id:t.id,sources:[s],targets:[c]}),i.set(o,l)}return i}var V_={top:36,left:16,bottom:16,right:16},nie={top:L_.PAD,left:L_.LANE_STRIP_W+L_.PAD,bottom:L_.PAD,right:L_.PAD},H_={top:0,left:L_.TITLE_STRIP_W,bottom:0,right:0};function U_(e){return e.node.type===`activity-lane`?nie:e.node.type===`activity-frame`?H_:V_}var W_=e=>`[top=${e.top}.0,left=${e.left}.0,bottom=${e.bottom}.0,right=${e.right}.0]`,G_=W_({top:0,left:0,bottom:0,right:0});function rie(e,t){let n=e?.spacing??40;return t?n:Math.round(n*1.2)}function K_(e){return Object.fromEntries(Object.entries(e).filter(([e])=>e.includes(`.spacing.`)))}var q_=6,J_=12,iie=18;function Y_(e){return e.labels!==void 0&&e.labels.length>0?e.labels.reduce((e,t)=>t.text.length>e.length?t.text:e,``):e.label??``}var X_={"elk.edgeLabels.inline":`true`};function A(e){let t=e.trim();if(t===``)return;let n=Math.min([...t].length,24);return{width:Math.round(n*q_+J_),height:iie}}var Z_=`activity-start`,Q_=`note-link`;function aie(e){let t=e=>e.node.type===Z_||e.children.some(t);return e.roots.some(t)}function $_(e,t,n,r){let i=r?.substitute,a=r?.partitions!==void 0&&r.partitions.size>0?r.partitions:void 0,o={...tie(n),...i===void 0?{}:{"elk.padding":G_},...a===void 0?{}:{"elk.partitioning.activate":`true`}},s=(n?.algorithm??`layered`)===`layered`&&aie(e),c=s?{"elk.layered.cycleBreaking.strategy":`DEPTH_FIRST`}:{};Object.assign(o,c);let l=eie(n)&&r?.flat!==!0,u=l?B_(e):void 0,d=l?o:{...K_(o),...c},f=e=>({...d,"elk.padding":W_(U_(e))}),p=!1,m=new Set,h=e=>{m.add(e.id);let n=i?.prelaid.get(e.id);if(n!==void 0)return{id:e.id,width:n.width,height:n.height};let r=i?.packs.get(e.id);if(r!==void 0)return{id:e.id,children:[...e.children.filter(e=>!r.members.has(e.id)).map(h),{id:r.id,width:r.width,height:r.height}],layoutOptions:f(e)};if(e.state===`expanded`){let t=u?.get(e.id),n=t!==void 0&&t.length>0;return n&&(p=!0),{id:e.id,children:e.children.map(h),layoutOptions:f(e),...n?{edges:t}:{}}}if(e.state===`collapsed`){let n=t?.get(e.id)??R_;return{id:e.id,width:n.width,height:n.height}}return{id:e.id,...Qre(t?.get(e.id)??Or),...s&&e.node.type===Z_?{layoutOptions:{"elk.layered.layering.layerConstraint":`FIRST`}}:{}}},g=e=>{let t=a?.get(e.id);return t===void 0?e:{...e,layoutOptions:{...e.layoutOptions,"elk.partitioning.partition":String(t)}}},_=(i?.roots??e.roots).map(e=>g(h(e))),v=new Set,y=l?u?.get(null)??[]:e.layoutEdges.filter(e=>e.from!==e.to&&(i===void 0||m.has(e.from)&&m.has(e.to))).map(e=>{let t=Y_(e).trim(),n=A(t),r=s&&e.kind===Q_;return r&&v.add(e.id),{id:e.id,sources:[r?e.to:e.from],targets:[r?e.from:e.to],...n===void 0?{}:{labels:[{...n,text:t,layoutOptions:X_}]}}}),b=p||l&&(()=>{let t=new Map(e.layoutEdges.map(e=>[e.id,e]));return y.some(e=>{let n=t.get(e.id);return n===void 0||e.sources[0]!==n.from||e.targets[0]!==n.to})})();return{graph:{id:ae,layoutOptions:o,children:_,edges:y},lifted:b,reversed:v}}var ev=Symbol(`outside`);function oie(e){let t=new Map,n=(e,r)=>{let i=[...r,e.id];t.set(e.id,i),e.state===`expanded`&&e.children.forEach(e=>n(e,i))};e.roots.forEach(e=>n(e,[]));let r=new Map,i=(e,t,n)=>{let i=r.get(e)??[];i.push([t,n]),r.set(e,i)};for(let n of e.layoutEdges){let e=t.get(n.from),r=t.get(n.to);if(e===void 0||r===void 0||n.from===n.to)continue;let a=0;for(;a<e.length&&a<r.length&&e[a]===r[a];)a++;let o=a<e.length&&a<r.length;o&&i(a===0?null:e[a-1],e[a],r[a]);let s=o?a:a-1;for(let t of[e,r])for(let e=s;e<t.length-1;e++)i(t[e],t[e+1],ev)}let a=new Map,o=(e,t)=>{if(t.length>=2){let n=new Map,i=e=>{let t=e;for(;n.get(t)!==void 0&&n.get(t)!==t;)t=n.get(t);return t};for(let[t,a]of r.get(e)??[])n.set(i(t),i(a));let o=i(ev),s=[],c=new Map;for(let e of t){let t=i(e.id);t===o?s.push(e):c.set(t,[...c.get(t)??[],e])}c.size>=2&&a.set(e,{attached:s,detached:[...c.values()]})}for(let e of t)e.state===`expanded`&&o(e.id,e.children)};return o(null,e.roots),{levels:a}}var sie=.35,tv=1.25;function nv(e,t,n,r){let i=Array(e.length),a=0,o=0,s=0,c;for(let l of t){let t=e[l];if(c!==void 0&&t.width<=c.width&&c.used+n+t.height<=o){i[l]={x:c.x,y:a+c.used+n,...t},c.used+=n+t.height;continue}let u=c===void 0?0:c.x+c.width+n;c!==void 0&&u+t.width>r&&(a+=o+n,o=0,u=0),i[l]={x:u,y:a,...t},c={x:u,width:t.width,used:t.height},o=Math.max(o,t.height),s=Math.max(s,u+t.width)}return{boxes:i,width:s,height:a+o}}function rv(e,t,n){let r=Array.from({length:n},(t,r)=>Math.max(...e.filter((e,t)=>t%n===r).map(e=>e.width))),i=r.map((e,n)=>r.slice(0,n).reduce((e,n)=>e+n+t,0)),a=[],o=0;for(let s=0;s*n<e.length;s++){let c=e.slice(s*n,(s+1)*n);c.forEach((e,t)=>a.push({x:i[t]+(r[t]-e.width)/2,y:o,...e})),o+=Math.max(...c.map(e=>e.height))+t}return{boxes:a,width:i[n-1]+r[n-1],height:o-t}}function iv(e,t){if(e.length===0)return{boxes:[],width:0,height:0};let n=t.aspect??.75,r=e=>Math.abs(Math.log(e.width/e.height/n));if(Math.max(...e.map(e=>e.height))<=Math.min(...e.map(e=>e.height))*tv){let n;for(let i=1;i<=e.length;i++){let a=rv(e,t.gap,i),o=r(a)+(e.length%i===0?0:sie);(n===void 0||o<n.score-1e-9)&&(n={...a,score:o})}return{boxes:n.boxes,width:n.width,height:n.height}}let i=e.map((e,t)=>t).sort((t,n)=>e[n].height-e[t].height||t-n),a=e.map(e=>e.width),o=Math.max(...a),s=new Set,c=0;for(let n of i)c+=(c===0?0:t.gap)+e[n].width,s.add(Math.max(c,o));let l;for(let n of s){let a=nv(e,i,t.gap,n),o=r(a);(l===void 0||o<l.score-1e-9||Math.abs(o-l.score)<=1e-9&&a.width*a.height<l.width*l.height)&&(l={boxes:a.boxes,width:a.width,height:a.height,score:o})}return{boxes:l.boxes,width:l.width,height:l.height}}var av=200,ov=.5;function sv(e,t){let n=!1;for(let r=0;r<av;r++){let r=!1;for(let n=0;n<e.length;n++)for(let i=n+1;i<e.length;i++){let a=e[n],o=e[i],s=Math.min(a.x+a.width,o.x+o.width)+t-Math.max(a.x,o.x),c=Math.min(a.y+a.height,o.y+o.height)+t-Math.max(a.y,o.y);if(!(s<=ov||c<=ov))if(r=!0,s<=c){let e=a.x+a.width/2<=o.x+o.width/2?1:-1;a.x-=e*s/2,o.x+=e*s/2}else{let e=a.y+a.height/2<=o.y+o.height/2?1:-1;a.y-=e*c/2,o.y+=e*c/2}}if(!r)break;n=!0}return n}function cv(e,t,n){let r=e=>{let a=!1;for(let t of e)t.children.length>0&&r(t.children)&&(i(t),a=!0);return sv(e.map(e=>t.get(e.id)).filter(e=>e!==void 0),n)||a},i=e=>{let n=t.get(e.id),r=e.children.map(e=>t.get(e.id)).filter(e=>e!==void 0);if(n===void 0||r.length===0)return;let i=U_(e),a=Math.min(...r.map(e=>e.x)),o=Math.min(...r.map(e=>e.y));for(let e of r)e.x+=i.left-a,e.y+=i.top-o;n.width=Math.max(n.width,Math.max(...r.map(e=>e.x+e.width))+i.right),n.height=Math.max(n.height,Math.max(...r.map(e=>e.y+e.height))+i.bottom)};return r(e.roots)}var lv=e=>{let t=e?.direction??`DOWN`;return t===`RIGHT`||t===`LEFT`};function uv(e,t){if(!lv(t))return;let n=new Map,r=new Set,i=e=>e.node.type===`activity-frame`&&e.state===`expanded`&&e.children.length>0&&e.children.every(e=>e.node.type===`activity-lane`&&e.state!==`collapsed`),a=e=>i(e)?(n.set(e.id,{lanes:e.children.map(e=>({id:e.id,members:e.children.map(e=>e.id)}))}),e.children.forEach(e=>r.add(e.id)),{...e,children:e.children.flatMap(e=>e.children.map(a))}):e.children.length===0?e:{...e,children:e.children.map(a)},o=e.roots.map(a);if(n.size===0)return;let s=new Set,c=(e,t)=>{let r=t||n.has(e.id);r&&s.add(e.id),e.children.forEach(e=>c(e,r))};e.roots.forEach(e=>c(e,!1));let l=new Set(e.layoutEdges.filter(e=>s.has(e.from)||s.has(e.to)).map(e=>e.id)),u=e=>!r.has(e.from)&&!r.has(e.to);return{view:{...e,roots:o,edges:e.edges.filter(u),layoutEdges:e.layoutEdges.filter(u)},frames:n,touched:l}}function dv(e,t,n,r){let i=new Map,a=L_,o=new Map,s=e=>{o.set(e.id,e),e.children.forEach(s)};n.roots.forEach(s);for(let[n,s]of t.frames){let t=e.get(n);if(t===void 0)continue;let c=s.lanes.flatMap(e=>e.members).filter(t=>e.has(t)),l=Math.min(...c.map(t=>e.get(t).x)),u=a.LANE_MIN_W,d=s.lanes.map(t=>{let n=o.get(t.id),i=n===void 0?{top:a.PAD,left:a.LANE_STRIP_W+a.PAD,bottom:a.PAD,right:a.PAD}:U_(n),s=new Map,c=t.members.filter(t=>e.has(t)).sort((t,n)=>e.get(t).y-e.get(n).y),d=c.length>0?e.get(c[0]).y:0,f=-1/0,p=0,m=0;for(let t of c){let n=e.get(t);f!==-1/0&&n.y>f+r&&(d+=n.y-f-r),f=Math.max(f,n.y+n.height);let a=n.x-l+i.left,o=n.y-d+i.top;s.set(t,{x:a,y:o}),p=Math.max(p,o+n.height),m=Math.max(m,a+n.width)}return u=Math.max(u,m+i.right),{lane:t,placed:s,height:Math.max(a.LANE_MIN_H,p+i.bottom)}}),f=0;for(let n of d){for(let[t,r]of n.placed){let n=e.get(t);i.set(t,{dx:a.TITLE_STRIP_W+r.x-n.x,dy:f+r.y-n.y}),e.set(t,{...n,x:r.x,y:r.y})}let r=e.get(n.lane.id);e.set(n.lane.id,{...r??t,x:a.TITLE_STRIP_W,y:f,width:u,height:n.height}),f+=n.height}e.set(n,{...t,width:a.TITLE_STRIP_W+u,height:f})}return i}function fv(e,t,n){let r=n.x+1,i=n.y+1,a=n.x+n.width-1,o=n.y+n.height-1;if(a<=r||o<=i)return!1;let s=0,c=1,l=t.x-e.x,u=t.y-e.y,d=[[-l,e.x-r],[l,a-e.x],[-u,e.y-i],[u,o-e.y]];for(let[e,t]of d){if(e===0){if(t<0)return!1;continue}let n=t/e;if(e<0?s=Math.max(s,n):c=Math.min(c,n),s>c)return!1}return!0}function cie(e,t,n,r,i,a){let o=new Map,s=(e,t)=>{o.set(e.id,t),e.children.forEach(t=>s(t,e.id))};r.roots.forEach(e=>s(e,null));let c=e=>{for(let t=e;t!=null;t=o.get(t))if(a.has(t))return t},l=e=>{let t=c(e);return t===void 0?{dx:0,dy:0}:a.get(t)},u=[],d=(e,t,r,a)=>{let o=i.get(e.id);if(o===void 0)return;let s=t+o.x,c=r+o.y,l=a||n.frames.has(e.id);l&&e.state!==`expanded`&&u.push({id:e.id,box:{x:s,y:c,width:o.width,height:o.height}}),e.children.forEach(e=>d(e,s,c,l))};r.roots.forEach(e=>d(e,0,0,!1));let f=new Map(r.layoutEdges.map(e=>[e.id,e]));for(let r of n.touched){let n=e.get(r),i=f.get(r);if(n===void 0||i===void 0)continue;let a=l(i.from),o=l(i.to),s=n.map(e=>({x:e.x+a.dx,y:e.y+a.dy}));if(a.dx!==o.dx||a.dy!==o.dy||u.some(({id:e,box:t})=>e!==i.from&&e!==i.to&&s.some((e,n)=>n>0&&fv(s[n-1],e,t)))){e.delete(r),t.delete(r);continue}e.set(r,s);let c=t.get(r);c!==void 0&&t.set(r,{x:c.x+a.dx,y:c.y+a.dy})}}var pv=new I_.default,mv=new Map,lie=50;function uie(e){return e===void 0?``:`!${[e.algorithm??``,e.direction??``,e.spacing??``,e.edgeRouting??``,e.aspectRatio??``].join(`,`)}`}function die(e,t,n,r){let i=[],a=e=>{i.push(`${e.id}:${e.state}`),e.children.forEach(a)};e.roots.forEach(a);let o=e.layoutEdges.map(e=>{let t=Y_(e).trim();return t===``?e.id:`${e.id}~${t.length}`}).join(`|`),s=t===void 0||t.size===0?``:`@${[...t.entries()].sort(([e],[t])=>e.localeCompare(t)).map(([e,t])=>`${e}:${t.width}x${t.height}${t.reserveBottom===void 0?``:`+${t.reserveBottom}`}`).join(`|`)}`,c=r===void 0||r.size===0?``:`%${[...r.entries()].sort(([e],[t])=>e.localeCompare(t)).map(([e,t])=>`${e}:${t}`).join(`|`)}`;return`${i.join(`|`)}#${o}${s}${uie(n)}${c}`}async function fie(e,t,n,r){let i=r?.partitions!==void 0&&r.partitions.size>0?r.partitions:void 0,a=die(e,t,n,i),o=mv.get(a);if(o)return o;let s=uv(e,n),c=s?.view??e,l=(i===void 0?await yv(c,t,n):void 0)??await Tv(c,t,n,i);if(hv(c,t,l.geometry),s!==void 0){let t=dv(l.geometry,s,e,n?.spacing??40);cie(l.routes,l.labelSpots,s,e,l.geometry,t)}if(mv.size>=lie){let e=mv.keys().next().value;e!==void 0&&mv.delete(e)}return mv.set(a,l),l}function hv(e,t,n){if(t===void 0)return;let r=e=>{let i=e.state===`leaf`?t.get(e.id)?.reserveBottom:void 0,a=n.get(e.id);i!==void 0&&a!==void 0&&n.set(e.id,{...a,height:a.height-i}),e.children.forEach(r)};e.roots.forEach(r)}function gv(e,t,n,r){let i=new Map,a=new Map,o=new Map,s=new Map,c=[],l=(e,r,a)=>{let o=r+(e.x??0),u=a+(e.y??0);if(s.set(e.id,{x:o,y:u}),e.id!==`__root__`&&n?.has(e.id)!==!0&&i.set(e.id,{x:e.x??0,y:e.y??0,width:e.width??0,height:e.height??0}),t&&e.edges!==void 0)for(let t of e.edges)c.push({e:t,ownX:o,ownY:u});e.children?.forEach(e=>l(e,o,u))};l(e,0,0);for(let{e,ownX:t,ownY:n}of c){let i=e.sections?.[0];if(i===void 0)continue;let c=(e.container===void 0?void 0:s.get(e.container))??{x:t,y:n},l=[i.startPoint,...i.bendPoints??[],i.endPoint].map(e=>({x:c.x+e.x,y:c.y+e.y}));a.set(e.id,r?.has(e.id)===!0?l.reverse():l);let u=e.labels?.[0];u?.x!==void 0&&u.y!==void 0&&o.set(e.id,{x:c.x+u.x+(u.width??0)/2,y:c.y+u.y+(u.height??0)/2})}return{geometry:i,routes:a,labelSpots:o,origins:s}}var _v=class extends Error{};function pie(e,t,n){for(let r of e.top){let i=e.geometry.get(r);i!==void 0&&e.geometry.set(r,{...i,x:i.x+t,y:i.y+n})}for(let[r,i]of e.routes)e.routes.set(r,i.map(e=>({x:e.x+t,y:e.y+n})));for(let[r,i]of e.labelSpots)e.labelSpots.set(r,{x:i.x+t,y:i.y+n})}function vv(e,t,n){for(let[r,i]of t.geometry)e.geometry.set(r,t.top.includes(r)?{...i,x:i.x+n.dx,y:i.y+n.dy}:i);for(let[r,i]of t.routes)e.routes.set(r,i.map(e=>({x:e.x+n.absX,y:e.y+n.absY})));for(let[r,i]of t.labelSpots)e.labelSpots.set(r,{x:i.x+n.absX,y:i.y+n.absY})}async function yv(e,t,n){if((n?.algorithm??`layered`)!==`layered`)return;let r=oie(e);if(r.levels.size===0)return;let i=new Set,a=e=>{i.add(e.id),e.children.forEach(a)};e.roots.forEach(a);let o={view:e,sizes:t,settings:n,plan:r,taken:i};try{let t=r.levels.get(null),n=t===void 0?await Cv(e.roots,o):await Sv(t,o);return{geometry:n.geometry,routes:n.routes,labelSpots:n.labelSpots,algorithm:z_}}catch(e){if(e instanceof _v)return;throw e}}var bv=4,xv=.4;async function Sv(e,t){let n=[];for(let r of e.detached)n.push(await Cv(r,t));let r=e.detached.every(e=>e.length===1&&e[0].state!==`expanded`),i=t.settings?.direction??`DOWN`,a=e.attached.length>0?i===`DOWN`||i===`UP`?bv:xv:t.settings?.aspectRatio,o=iv(n,{gap:rie(t.settings,r),...a===void 0?{}:{aspect:a}}),s={width:o.width,height:o.height,top:[],geometry:new Map,routes:new Map,labelSpots:new Map};return n.forEach((e,t)=>{let n=o.boxes[t];pie(e,n.x,n.y);for(let[t,n]of e.geometry)s.geometry.set(t,n);for(let[t,n]of e.routes)s.routes.set(t,n);for(let[t,n]of e.labelSpots)s.labelSpots.set(t,n);s.top.push(...e.top)}),s}async function Cv(e,t){let n=new Map,r=new Map,i=new Map,a=new Map,o=async e=>{if(e.state!==`expanded`)return;let s=t.plan.levels.get(e.id);if(s===void 0){for(let t of e.children)await o(t);return}let c=await Sv(s,t);if(s.attached.length===0){let t=U_(e);n.set(e.id,{width:c.width+t.left+t.right,height:c.height+t.top+t.bottom}),a.set(e.id,t),i.set(e.id,c);return}let l=`${ae}pack:${e.id}`;for(;t.taken.has(l);)l+=`_`;t.taken.add(l),r.set(e.id,{id:l,width:c.width,height:c.height,members:new Set(c.top)}),i.set(l,c);for(let e of s.attached)await o(e)};for(let t of e)await o(t);if(e.length===1&&(e[0].state!==`expanded`||n.has(e[0].id))){let r=e[0],o=t.sizes?.get(r.id),s=n.get(r.id)??(r.state===`collapsed`?o??R_:Qre(o??Or)),c={width:s.width,height:s.height,top:[r.id],geometry:new Map([[r.id,{x:0,y:0,width:s.width,height:s.height}]]),routes:new Map,labelSpots:new Map},l=i.get(r.id),u=a.get(r.id);return l!==void 0&&u!==void 0&&vv(c,l,{dx:u.left,dy:u.top,absX:u.left,absY:u.top}),c}let s={roots:e,prelaid:n,packs:r},c=$_(t.view,t.sizes,t.settings,{substitute:s}),l;try{l=await pv.layout(c.graph)}catch(e){throw new _v(String(e))}let u=new Set([...r.values()].map(e=>e.id)),{geometry:d,routes:f,labelSpots:p,origins:m}=gv(l,!c.lifted,u,c.reversed),h={width:l.width??0,height:l.height??0,top:e.map(e=>e.id),geometry:d,routes:f,labelSpots:p};for(let[e,t]of i){let n=m.get(e)??{x:0,y:0},r=a.get(e);if(r!==void 0)vv(h,t,{dx:r.left,dy:r.top,absX:n.x+r.left,absY:n.y+r.top});else{let r=wv(l,e);vv(h,t,{dx:r?.x??0,dy:r?.y??0,absX:n.x,absY:n.y})}}return h}function wv(e,t){if(e.id===t)return e;for(let n of e.children??[]){let e=wv(n,t);if(e!==void 0)return e}}async function Tv(e,t,n,r){let i=n?.algorithm??`layered`,a={...n};delete a.algorithm;let o=[{settings:n,flat:!1,algorithm:i},{settings:n,flat:!0,algorithm:i}];i!==`layered`&&o.push({settings:a,flat:!1,algorithm:z_});let s,c=!1,l=new Set,u=i,d;for(let n of o){let i=$_(e,t,n.settings,{...n.flat?{flat:!0}:{},...r===void 0?{}:{partitions:r}});try{s=await pv.layout(i.graph),c=i.lifted,l=i.reversed,u=n.algorithm;break}catch(e){d=e}}if(s===void 0)throw d;let f=!c&&(u===`layered`||n?.edgeRouting===`orthogonal`),{geometry:p,routes:m,labelSpots:h}=gv(s,f,void 0,l);return u===`stress`&&cv(e,p,n?.spacing??40)&&(m.clear(),h.clear()),{geometry:p,routes:m,labelSpots:h,algorithm:u}}function Ev(e,t,n){let r=Et(e,t),i=new Set;for(let e of n){let t=[...r.parentsOf.get(e)??[]];for(;t.length>0;){let e=t.pop();e===void 0||i.has(e)||(i.add(e),t.push(...r.parentsOf.get(e)??[]))}}return[...i]}var Dv={id:`clean`,label:`Clean`},Ov=[Dv,{id:`sketch`,label:`Sketch`,rough:{roughness:1.15,bowing:1,strokeWidth:1.5,fillStyle:`solid`},fontFamily:`'Kalam', system-ui, sans-serif`,colorMix:{fill:14,stroke:100}},{id:`hand-drawn`,label:`Hand-drawn`,rough:{roughness:.9,bowing:.8,strokeWidth:1.2,fillStyle:`hachure`,fillWeight:.8,hachureGap:5,hatchOpacity:.45},cornerRadius:14,fontFamily:`'Caveat', 'Kalam', cursive`,colorMix:{fill:22,stroke:85}},{id:`pencil`,label:`Pencil`,rough:{roughness:.3,bowing:.1,strokeWidth:1.4,fillStyle:`hachure`,fillWeight:.55,hachureGap:5,hatchOpacity:.5},cornerRadius:16,fontFamily:`'Caveat', 'Kalam', cursive`,colorMix:{fill:22,stroke:85}},{id:`blueprint`,label:`Blueprint`,fontFamily:`ui-monospace, 'Cascadia Mono', 'Source Code Pro', monospace`,cssVars:{"--dg-canvas-bg":`#0d2740`,"--dg-surface":`#0d2740`,"--dg-node-fill":`#103052`,"--dg-node-stroke":`#9ec8e8`,"--dg-group-fill":`#0f2c4a`,"--dg-group-stroke":`#5f8ab0`,"--dg-text":`#e4f1fb`,"--dg-text-muted":`#8fb3cf`,"--dg-border":`#2a4a6b`,"--dg-edge":`#9ec8e8`,"--dg-edge-label-bg":`#103052`}},{id:`marker`,label:`Marker`,rough:{roughness:1.6,bowing:1.2,strokeWidth:2.5,fillStyle:`zigzag`,fillWeight:1.8,hachureGap:7,hatchOpacity:.25},cornerRadius:8,fontFamily:`'Kalam', system-ui, sans-serif`,colorMix:{fill:28,stroke:100}}],mie=e=>Ov.find(t=>t.id===e)??Dv,hie=e=>Ov.some(t=>t.id===e);function kv(e){let t;for(let n of e){if(n===void 0)return;if(t===void 0)t=n;else if(t!==n)return}return t}function gie(e){let t=new Map;for(let n of e){let e=`${n.from}\0${n.to}`,r=t.get(e);if(r===void 0){t.set(e,{from:n.from,to:n.to,polarity:n.polarity,edgeIds:[n.id]});continue}r.edgeIds.push(n.id),r.polarity=kv([r.polarity,n.polarity])}return t}function _ie(e){let t=0;for(let n of e){if(n.polarity===void 0)return`unknown`;n.polarity===`-`&&t++}return t%2==0?`R`:`B`}function vie(e,t){return{key:e.join(`→`),nodes:[...e],edgeIds:t.flatMap(e=>e.edgeIds),kind:_ie(t)}}var Av=(e,t)=>e<t?-1:+(e>t);function j(e,t){let n=t?.maxLength??20,r=t?.maxLoops??50,i=t?.budget??2e5,a=[...gie(e).values()],o=new Set;for(let e of a)o.add(e.from),o.add(e.to);let s=[...o].sort(Av),c=new Map(s.map((e,t)=>[e,t])),l=s.length,u=Array.from({length:l},()=>[]),d=[];for(let e of a){if(e.from===e.to){d.push(e);continue}let t=c.get(e.from),n=c.get(e.to);t===void 0||n===void 0||u[t]?.push({to:n,arc:e})}for(let e of u)e.sort((e,t)=>e.to-t.to);d.sort((e,t)=>Av(e.from,t.from));let f=[],p=0,m=!1;for(let e of d)f.push(vie([e.from],[e]));let h=[],g=[],_=new Set;function v(e,t){if(m)return;let r=u[t];if(r!==void 0)for(let{to:t,arc:a}of r){if(p>=i){m=!0;return}if(p++,t===e){h.length>=2&&f.push(vie(h,[...g,a]));continue}if(t>e&&!_.has(t)&&h.length<n){let n=s[t];if(n===void 0)continue;if(_.add(t),h.push(n),g.push(a),v(e,t),g.pop(),h.pop(),_.delete(t),m)return}}}for(let e=0;e<l&&!m;e++){let t=s[e];t!==void 0&&(h.length=0,g.length=0,_.clear(),h.push(t),_.add(e),v(e,e))}return f.sort((e,t)=>e.nodes.length-t.nodes.length||Av(e.key,t.key)),{loops:f.slice(0,r),truncated:m||f.length>r}}var yie=e=>({x:e.x+e.width/2,y:e.y+e.height/2}),bie=6;function xie(e,t,n){let r=[{x:e,y:t}],i=Math.max(24,n);for(let n=1;n<=bie;n++){let a=n*i,o=Math.max(4,Math.floor(2*Math.PI*a/i));for(let n=0;n<o;n++){let i=-Math.PI/2+2*Math.PI*n/o;r.push({x:e+Math.cos(i)*a,y:t+Math.sin(i)*a})}}return r}function Sie(e,t,n){let r=Math.max(n.x,Math.min(e.x,n.x+n.width)),i=Math.max(n.y,Math.min(e.y,n.y+n.height)),a=e.x-r,o=e.y-i;return a*a+o*o<t*t}var Cie=1e-6;function wie(e){if(e.length<3)return`none`;let t=0;for(let n=0;n<e.length;n++){let r=e[n],i=e[(n+1)%e.length];r===void 0||i===void 0||(t+=r.x*i.y-i.x*r.y)}return t/=2,Math.abs(t)<Cie?`none`:t>0?`cw`:`ccw`}function Tie(e,t,n){let r=n?.labelRadius??15,i=n?.minLabelGap??36,a=n?.nodeMargin??8,o=n?.obstacles??[...t.values()],s=r+a,c=i*i,l=[...e.filter(e=>e.nodes.every(e=>t.has(e)))].sort((e,t)=>e.nodes.length-t.nodes.length||Av(e.key,t.key)),u=[],d=[];for(let e of l){let n=e.nodes.map(e=>t.get(e)).filter(e=>e!==void 0),a=n.map(yie),l=n[0];if(l===void 0)continue;let f=l.x+l.width+r+6,p=l.y-r-6,m=wie(a),h={x:f,y:p};for(let e of xie(f,p,i))if(!o.some(t=>Sie(e,s,t))&&!d.some(t=>{let n=t.x-e.x,r=t.y-e.y;return n*n+r*r<c})){h=e;break}d.push(h),u.push({key:e.key,kind:e.kind,x:h.x,y:h.y,direction:m})}return u}function jv(e){let t=new Map(e.map(e=>[e.id,e])),n=new Set;function r(e){let i=t.get(e);if(i===void 0)return{x:0,y:0};if(i.parentId===void 0||n.has(e))return i.position;n.add(e);let a=r(i.parentId);return n.delete(e),{x:i.position.x+a.x,y:i.position.y+a.y}}let i=new Map;for(let t of e){let e=t.measured?.width,n=t.measured?.height;if(e===void 0||n===void 0)continue;let a=r(t.id);i.set(t.id,{x:a.x,y:a.y,width:e,height:n})}return i}var Mv=48,Nv=Mv/2,Pv=15,Eie=`M ${Nv} ${Nv-Pv} A ${Pv} ${Pv} 0 1 1 ${Nv-Pv} ${Nv}`;function Fv({placement:e,rough:t,active:n,dimmed:r,onSelect:i}){let a=(0,v.useMemo)(()=>t===void 0?null:wg(Nv,Nv,Pv*2,yg(e.key),t),[e.key,t]),o=e.kind===`unknown`?`?`:e.kind,s=e.kind!==`unknown`&&e.direction!==`none`,c=`dg-loop-arrow-${e.key.replace(/[^a-zA-Z0-9_-]/g,`_`)}`;return(0,D.jsx)(`div`,{className:`dg-loop-badge${n?` active`:``}${r?` dimmed`:``}`,"data-kind":e.kind,role:`button`,"aria-pressed":n,title:`Highlight this loop`,onClick:e=>{e.stopPropagation(),i?.()},style:{position:`absolute`,transform:`translate(${e.x-Nv}px, ${e.y-Nv}px)`,pointerEvents:`auto`},children:(0,D.jsxs)(`svg`,{width:Mv,height:Mv,viewBox:`0 0 ${Mv} ${Mv}`,"aria-hidden":`true`,children:[s&&(0,D.jsx)(`defs`,{children:(0,D.jsx)(`marker`,{id:c,viewBox:`0 0 10 10`,refX:`5`,refY:`5`,markerWidth:`6`,markerHeight:`6`,orient:`auto-start-reverse`,children:(0,D.jsx)(`path`,{d:`M0,0 L10,5 L0,10 z`,fill:`var(--dg-text-muted)`})})}),a===null?(0,D.jsx)(`circle`,{className:`dg-loop-badge-circle`,cx:Nv,cy:Nv,r:Pv}):(0,D.jsxs)(D.Fragment,{children:[a.fill===``?(0,D.jsx)(`circle`,{className:`dg-loop-badge-fill`,cx:Nv,cy:Nv,r:Pv}):(0,D.jsx)(`path`,{className:`dg-loop-badge-fill`,d:a.fill}),(0,D.jsx)(`path`,{className:`dg-loop-badge-circle`,d:a.stroke})]}),s&&(0,D.jsx)(`path`,{className:`dg-loop-badge-arc`,d:Eie,markerEnd:`url(#${c})`,...e.direction===`ccw`?{style:{transform:`scale(-1,1)`,transformOrigin:`${Nv}px ${Nv}px`}}:{}}),(0,D.jsx)(`text`,{x:Nv,y:Nv,textAnchor:`middle`,dominantBaseline:`central`,children:o})]})})}function Die({edges:e,rough:t,nodeFilter:n}){let{loops:r}=(0,v.useMemo)(()=>j(e),[e]),i=(0,v.useMemo)(()=>n==null?r:r.filter(e=>e.nodes.includes(n)),[r,n]),a=(0,v.useMemo)(()=>new Map(i.map(e=>[e.key,e])),[i]),o=(0,v.useContext)(ah),s=Km(),c=(0,v.useMemo)(()=>jv(s),[s]),l=(0,v.useMemo)(()=>s.filter(e=>e.data.state!==`expanded`).map(e=>c.get(e.id)).filter(e=>e!==void 0),[s,c]);return(0,D.jsx)(Gm,{children:(0,D.jsx)(`div`,{className:`dg-loop-layer`,children:(0,v.useMemo)(()=>Tie(i,c,{obstacles:l,labelRadius:Nv,minLabelGap:56}),[i,c,l]).map(e=>{let n=a.get(e.key);return(0,D.jsx)(Fv,{placement:e,rough:t,active:o.activeKey===e.key,dimmed:o.active&&o.activeKey!==e.key,...n===void 0?{}:{onSelect:()=>o.toggle(e.key,n.nodes,n.edgeIds)}},e.key)})})})}var Oie=4;function kie({model:e,plane:t}){let n=Km(),r=(0,v.useMemo)(()=>jv(n),[n]);return(0,D.jsx)(Gm,{children:(0,D.jsx)(`svg`,{className:`dg-git-lanes`,"aria-hidden":`true`,children:(0,v.useMemo)(()=>{let n=yh(e,t),i=bh(e,t),{MARGIN:a,LABEL_W:o}=_h,s=[];for(let t of n.lanes){let c=It(n,t.id),l=r.get(t.id);if(c===void 0||l===void 0||Nt(e,c.id))continue;let u=r.get(c.id);if(u===void 0)continue;let d=u.x+u.width+Oie,f=l.x+l.width-a-o;f<=d||s.push({id:t.id,x1:d,x2:f,y:u.y+u.height/2,color:i.get(t.id)})}return s},[e,t,r]).map(e=>(0,D.jsx)(`line`,{className:`dg-git-tail`,x1:e.x1,y1:e.y,x2:e.x2,y2:e.y,stroke:e.color??`var(--dg-edge)`},e.id))})})}var Aie=[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],jie=3,Iv=e=>((e+4)%7+7)%7,Lv=e=>Number(Mn(e).slice(0,4)),Mie=e=>Number(Mn(e).slice(5,7))-1,Nie=e=>Date.parse(`${e}T00:00:00Z`)/864e5;function Pie(e){let t=e+(3-(Iv(e)+6)%7),n=Lv(t),r=Nie(`${String(n)}-01-04`),i=r-(Iv(r)+6)%7;return Math.floor((t-i)/7)+1}var Fie=e=>{let t=Lv(e),n=Mie(e);return Nie(n===11?`${String(t+1)}-01-01`:`${String(t)}-${String(n+2).padStart(2,`0`)}-01`)};function Iie(e,t){let n=e.start-7,r=e.end+8,i=e=>Zr(e,t),a=[];for(let e=n;e<r;e=Fie(e)){let t=Math.min(Fie(e),r);a.push({x:i(e),width:i(t)-i(e),label:`${Aie[Mie(e)]} ${String(Lv(e))}`})}let o=[];for(let e=n;e<r;){let t=e+((8-Iv(e))%7||7),n=Math.min(t,r),a=n-e;o.push({x:i(e),width:a*qr.DAY,label:a>=jie?`W${String(Pie(e)).padStart(2,`0`)}`:``}),e=n}return{x0:i(n),x1:i(r),months:a,weeks:o}}function Rv(e=new Date){let t=e=>String(e).padStart(2,`0`);return`${String(e.getFullYear())}-${t(e.getMonth()+1)}-${t(e.getDate())}`}function zv(e){let t=new Map;for(let n of e){let e=`${n.from}\0${n.to}`,r=t.get(e);if(r===void 0){t.set(e,{from:n.from,to:n.to,polarity:n.polarity,edgeIds:[n.id]});continue}r.edgeIds.push(n.id),r.polarity=kv([r.polarity,n.polarity])}return[...t.values()]}function Bv(e,t){return e===void 0||t===`unknown`?`unknown`:e===`+`?t:t===`+`?`-`:`+`}function Vv(e){let t=e.has(`+`),n=e.has(`-`);return t&&n?`mixed`:e.has(`unknown`)?`unknown`:t?`+`:`-`}function Hv(e,t){let n=new Map;for(let t of e){let e=n.get(t.to);e===void 0?n.set(t.to,[t]):e.push(t)}let r=new Map([[t,0]]),i=new Map([[t,new Set([`+`])]]),a=new Map,o=[t];for(;o.length>0;){let e=[];for(let s of o){let o=r.get(s),c=i.get(s);for(let l of n.get(s)??[]){let n=l.from;if(n===t)continue;let u=o+1,d=r.get(n),f=new Set;for(let e of c)f.add(Bv(l.polarity,e));if(d===void 0||u<d)r.set(n,u),i.set(n,f),a.set(n,{node:s,edgeIds:l.edgeIds}),e.push(n);else if(u===d){let e=i.get(n);for(let t of f)e.add(t)}}}o=e}return{dist:r,signs:i,pathTo:e=>{let n=[e],r=[],i=e;for(;i!==t;){let e=a.get(i);if(e===void 0)break;r.push(...e.edgeIds),n.push(e.node),i=e.node}return{nodes:n,edgeIds:r}}}}function Uv(e,t){let n=zv(e),r=j(e).loops.filter(e=>e.nodes.includes(t)).map(e=>({key:e.key,kind:e.kind,length:e.nodes.length,nodes:e.nodes,edgeIds:e.edgeIds})).sort((e,t)=>e.length-t.length||(e.key<t.key?-1:+(e.key>t.key))),i=new Map;for(let e of r)for(let t of e.nodes)i.set(t,(i.get(t)??0)+1);let{dist:a,signs:o,pathTo:s}=Hv(n,t);return{target:t,loops:r,drivers:[...a.keys()].filter(e=>e!==t).map(e=>({id:e,distance:a.get(e),sign:Vv(o.get(e)),loopCount:i.get(e)??0,path:s(e)})).sort((e,t)=>e.distance-t.distance||t.loopCount-e.loopCount||(e.id<t.id?-1:+(e.id>t.id))),hubs:[...i.entries()].filter(([e])=>e!==t).map(([e,t])=>({id:e,loopCount:t,sign:o.has(e)?Vv(o.get(e)):`unknown`})).sort((e,t)=>t.loopCount-e.loopCount||(e.id<t.id?-1:+(e.id>t.id)))}}function Wv(e,t,n){if(t===n)return{exists:!1,sign:`unknown`,distance:0,path:{nodes:[],edgeIds:[]}};let{dist:r,signs:i,pathTo:a}=Hv(e,n);return r.has(t)?{exists:!0,sign:Vv(i.get(t)),distance:r.get(t),path:a(t)}:{exists:!1,sign:`unknown`,distance:0,path:{nodes:[],edgeIds:[]}}}function Gv(e,t){return e===`mixed`||t===`mixed`||e===`unknown`||t===`unknown`?`unknown`:(+(e===`-`)+ +(t===`-`))%2==0?`R`:`B`}function Kv(e,t,n){let r=zv(e),i=Wv(r,t,n),a=Wv(r,n,t);return{from:t,to:n,forward:i,backward:a,loop:i.exists&&a.exists?Gv(i.sign,a.sign):null}}var qv={"+":`+`,"-":`−`,mixed:`±`,unknown:`?`},Jv={"+":`dg-lev-pos`,"-":`dg-lev-neg`,mixed:`dg-lev-mixed`,unknown:`dg-lev-unknown`},Yv=e=>e===`R`?`amplifier`:e===`B`?`brake`:`unknown`,Xv=e=>e===`R`?`reinforcing`:e===`B`?`balancing`:`unclear`,Zv=10,Qv=8,$v=8;function ey({model:e,edges:t,target:n,activeFocusKey:r,onFocus:i,onClose:a,compareId:o,onClearCompare:s}){let c=(0,v.useMemo)(()=>Uv(t,n),[t,n]),l=(0,v.useMemo)(()=>o!=null&&o!==n?Kv(t,n,o):null,[t,n,o]),u=e=>e===1?`direct`:`${e} hops`,d=t=>e.nodes.find(e=>e.id===t)?.name??t,f=e=>i(r===e.key?null:e),p=e=>{let t=new Set,n=new Set;for(let r of c.loops)r.nodes.includes(e)&&(r.nodes.forEach(e=>t.add(e)),r.edgeIds.forEach(e=>n.add(e)));return{key:`hub:${e}`,nodes:[...t],edges:[...n]}},m=({focus:e,children:t})=>(0,D.jsx)(`button`,{type:`button`,className:`dg-lev-row${r===e.key?` active`:``}`,"data-focus":e.key,onClick:()=>f(e),children:t});return(0,D.jsxs)(`aside`,{className:`dg-leverage`,"aria-label":`Leverage`,children:[(0,D.jsxs)(`div`,{className:`dg-lev-head`,children:[(0,D.jsx)(`h2`,{children:`Leverage`}),(0,D.jsx)(`button`,{type:`button`,className:`dg-lev-close`,"aria-label":`Close panel`,title:`Close`,onClick:a,children:`✕`})]}),(0,D.jsx)(`p`,{className:`dg-lev-muted`,children:(0,D.jsx)(`b`,{children:d(n)})}),l!==null&&(0,D.jsxs)(`section`,{className:`dg-lev-section`,children:[(0,D.jsxs)(`div`,{className:`dg-lev-head`,children:[(0,D.jsx)(`h3`,{children:`Dependency`}),(0,D.jsx)(`button`,{type:`button`,className:`dg-lev-close`,"aria-label":`Clear comparison`,title:`Clear comparison`,onClick:s,children:`✕`})]}),(0,D.jsxs)(`p`,{className:`dg-lev-muted`,children:[(0,D.jsx)(`b`,{children:d(n)}),` ⇄ `,(0,D.jsx)(`b`,{children:d(o)})]}),!l.forward.exists&&!l.backward.exists?(0,D.jsx)(`p`,{className:`dg-lev-muted`,children:`No causal path between them.`}):(0,D.jsxs)(`div`,{className:`dg-lev-list`,children:[l.forward.exists&&(0,D.jsxs)(m,{focus:{key:`dep:fwd`,nodes:l.forward.path.nodes,edges:l.forward.path.edgeIds},children:[(0,D.jsx)(`span`,{className:`dg-lev-sign ${Jv[l.forward.sign]}`,children:qv[l.forward.sign]}),` `,d(n),` → `,d(o),` `,(0,D.jsxs)(`span`,{className:`dg-lev-muted`,children:[`· `,u(l.forward.distance)]})]}),l.backward.exists&&(0,D.jsxs)(m,{focus:{key:`dep:bwd`,nodes:l.backward.path.nodes,edges:l.backward.path.edgeIds},children:[(0,D.jsx)(`span`,{className:`dg-lev-sign ${Jv[l.backward.sign]}`,children:qv[l.backward.sign]}),` `,d(o),` → `,d(n),` `,(0,D.jsxs)(`span`,{className:`dg-lev-muted`,children:[`· `,u(l.backward.distance)]})]}),l.loop!==null&&(0,D.jsxs)(`p`,{className:`dg-lev-muted dg-lev-hint`,children:[`Together they form a`,l.loop===`unknown`?`n`:``,` `,Xv(l.loop),` loop`,l.loop===`unknown`?``:` (${l.loop})`,`.`]})]})]}),(0,D.jsxs)(`section`,{className:`dg-lev-section`,children:[(0,D.jsxs)(`h3`,{children:[`Feedback loops`,c.loops.length>0?` (${c.loops.length})`:``]}),c.loops.length===0?(0,D.jsx)(`p`,{className:`dg-lev-muted`,children:`Not part of any feedback loop.`}):(0,D.jsxs)(`div`,{className:`dg-lev-list`,children:[c.loops.slice(0,Zv).map(e=>(0,D.jsxs)(m,{focus:{key:`loop:${e.key}`,nodes:e.nodes,edges:e.edgeIds},children:[(0,D.jsx)(`span`,{className:`dg-lev-kind dg-lev-kind-${e.kind}`,children:e.kind}),` `,Yv(e.kind),` `,(0,D.jsxs)(`span`,{className:`dg-lev-muted`,children:[`· `,e.length,` vars`]})]},e.key)),c.loops.length>Zv&&(0,D.jsxs)(`p`,{className:`dg-lev-muted`,children:[`+`,c.loops.length-Zv,` more (shortest shown)`]})]})]}),(0,D.jsxs)(`section`,{className:`dg-lev-section`,children:[(0,D.jsx)(`h3`,{children:`Drivers (upstream)`}),c.drivers.length===0?(0,D.jsx)(`p`,{className:`dg-lev-muted`,children:`No upstream causes — this variable is a driver, not driven.`}):(0,D.jsxs)(`div`,{className:`dg-lev-list`,children:[c.drivers.slice(0,Qv).map(e=>(0,D.jsxs)(m,{focus:{key:`drv:${e.id}`,nodes:e.path.nodes,edges:e.path.edgeIds},children:[(0,D.jsx)(`span`,{className:`dg-lev-sign ${Jv[e.sign]}`,children:qv[e.sign]}),` `,d(e.id),` `,(0,D.jsxs)(`span`,{className:`dg-lev-muted`,children:[`· `,u(e.distance),e.loopCount>0?` · in ${e.loopCount} loop${e.loopCount>1?`s`:``}`:``]})]},e.id)),c.drivers.length>Qv&&(0,D.jsxs)(`p`,{className:`dg-lev-muted`,children:[`+`,c.drivers.length-Qv,` more`]})]})]}),c.hubs.length>0&&(0,D.jsxs)(`section`,{className:`dg-lev-section`,children:[(0,D.jsx)(`h3`,{children:`Leverage points`}),(0,D.jsx)(`p`,{className:`dg-lev-muted dg-lev-hint`,children:`Variables recurring across this one's loops — change one, move many.`}),(0,D.jsx)(`div`,{className:`dg-lev-list`,children:c.hubs.slice(0,$v).map(e=>(0,D.jsxs)(m,{focus:p(e.id),children:[(0,D.jsx)(`span`,{className:`dg-lev-sign ${Jv[e.sign]}`,children:qv[e.sign]}),` `,d(e.id),` `,(0,D.jsxs)(`span`,{className:`dg-lev-muted`,children:[`· in `,e.loopCount,` of `,d(n),`'s loops`]})]},e.id))})]})]})}var ty=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),Lie=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),Rie=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),ny=e=>{let t=Rie(e);return t.charAt(0).toUpperCase()+t.slice(1)},ry={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},zie=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},iy=(0,v.createContext)({}),ay=()=>(0,v.useContext)(iy),oy=(0,v.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>{let{size:l=24,strokeWidth:u=2,absoluteStrokeWidth:d=!1,color:f=`currentColor`,className:p=``}=ay()??{},m=r??d?Number(n??u)*24/Number(t??l):n??u;return(0,v.createElement)(`svg`,{ref:c,...ry,width:t??l??ry.width,height:t??l??ry.height,stroke:e??f,strokeWidth:m,className:ty(`lucide`,p,i),...!a&&!zie(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,v.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),sy=(e,t)=>{let n=(0,v.forwardRef)(({className:n,...r},i)=>(0,v.createElement)(oy,{ref:i,iconNode:t,className:ty(`lucide-${Lie(ny(e))}`,`lucide-${e}`,n),...r}));return n.displayName=ny(e),n},Bie=sy(`app-window`,[[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}],[`path`,{d:`M10 4v4`,key:`pp8u80`}],[`path`,{d:`M2 8h20`,key:`d11cs7`}],[`path`,{d:`M6 4v4`,key:`1svtjw`}]]),Vie=sy(`archive`,[[`rect`,{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`,key:`1wp1u1`}],[`path`,{d:`M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8`,key:`1s80jp`}],[`path`,{d:`M10 12h4`,key:`a56b0p`}]]),Hie=sy(`blocks`,[[`path`,{d:`M10 22V7a1 1 0 0 0-1-1H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-5a1 1 0 0 0-1-1H2`,key:`1ah6g2`}],[`rect`,{x:`14`,y:`2`,width:`8`,height:`8`,rx:`1`,key:`88lufb`}]]),cy=sy(`box`,[[`path`,{d:`M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z`,key:`hh9hay`}],[`path`,{d:`m3.3 7 8.7 5 8.7-5`,key:`g66t2b`}],[`path`,{d:`M12 22V12`,key:`d0xqtd`}]]),Uie=sy(`boxes`,[[`path`,{d:`M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z`,key:`lc1i9w`}],[`path`,{d:`m7 16.5-4.74-2.85`,key:`1o9zyk`}],[`path`,{d:`m7 16.5 5-3`,key:`va8pkn`}],[`path`,{d:`M7 16.5v5.17`,key:`jnp8gn`}],[`path`,{d:`M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z`,key:`8zsnat`}],[`path`,{d:`m17 16.5-5-3`,key:`8arw3v`}],[`path`,{d:`m17 16.5 4.74-2.85`,key:`8rfmw`}],[`path`,{d:`M17 16.5v5.17`,key:`k6z78m`}],[`path`,{d:`M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z`,key:`1xygjf`}],[`path`,{d:`M12 8 7.26 5.15`,key:`1vbdud`}],[`path`,{d:`m12 8 4.74-2.85`,key:`3rx089`}],[`path`,{d:`M12 13.5V8`,key:`1io7kd`}]]),ly=sy(`braces`,[[`path`,{d:`M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1`,key:`ezmyqa`}],[`path`,{d:`M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1`,key:`e1hn23`}]]),uy=sy(`brick-wall`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M12 9v6`,key:`199k2o`}],[`path`,{d:`M16 15v6`,key:`8rj2es`}],[`path`,{d:`M16 3v6`,key:`1j6rpj`}],[`path`,{d:`M3 15h18`,key:`5xshup`}],[`path`,{d:`M3 9h18`,key:`1pudct`}],[`path`,{d:`M8 15v6`,key:`1stoo3`}],[`path`,{d:`M8 3v6`,key:`vlvjmk`}]]),Wie=sy(`circle-dot`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}]]),dy=sy(`cloud`,[[`path`,{d:`M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z`,key:`p7xjir`}]]),fy=sy(`component`,[[`path`,{d:`M15.536 11.293a1 1 0 0 0 0 1.414l2.376 2.377a1 1 0 0 0 1.414 0l2.377-2.377a1 1 0 0 0 0-1.414l-2.377-2.377a1 1 0 0 0-1.414 0z`,key:`1uwlt4`}],[`path`,{d:`M2.297 11.293a1 1 0 0 0 0 1.414l2.377 2.377a1 1 0 0 0 1.414 0l2.377-2.377a1 1 0 0 0 0-1.414L6.088 8.916a1 1 0 0 0-1.414 0z`,key:`10291m`}],[`path`,{d:`M8.916 17.912a1 1 0 0 0 0 1.415l2.377 2.376a1 1 0 0 0 1.414 0l2.377-2.376a1 1 0 0 0 0-1.415l-2.377-2.376a1 1 0 0 0-1.414 0z`,key:`1tqoq1`}],[`path`,{d:`M8.916 4.674a1 1 0 0 0 0 1.414l2.377 2.376a1 1 0 0 0 1.414 0l2.377-2.376a1 1 0 0 0 0-1.414l-2.377-2.377a1 1 0 0 0-1.414 0z`,key:`1x6lto`}]]),Gie=sy(`container`,[[`path`,{d:`M22 7.7c0-.6-.4-1.2-.8-1.5l-6.3-3.9a1.72 1.72 0 0 0-1.7 0l-10.3 6c-.5.2-.9.8-.9 1.4v6.6c0 .5.4 1.2.8 1.5l6.3 3.9a1.72 1.72 0 0 0 1.7 0l10.3-6c.5-.3.9-1 .9-1.5Z`,key:`1t2lqe`}],[`path`,{d:`M10 21.9V14L2.1 9.1`,key:`o7czzq`}],[`path`,{d:`m10 14 11.9-6.9`,key:`zm5e20`}],[`path`,{d:`M14 19.8v-8.1`,key:`159ecu`}],[`path`,{d:`M18 17.5V9.4`,key:`11uown`}]]),Kie=sy(`cpu`,[[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M17 20v2`,key:`1rnc9c`}],[`path`,{d:`M17 2v2`,key:`11trls`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M2 17h2`,key:`7oei6x`}],[`path`,{d:`M2 7h2`,key:`asdhe0`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`M20 17h2`,key:`1fpfkl`}],[`path`,{d:`M20 7h2`,key:`1o8tra`}],[`path`,{d:`M7 20v2`,key:`4gnj0m`}],[`path`,{d:`M7 2v2`,key:`1i4yhu`}],[`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`2`,key:`1vbyd7`}],[`rect`,{x:`8`,y:`8`,width:`8`,height:`8`,rx:`1`,key:`z9xiuo`}]]),py=sy(`database`,[[`ellipse`,{cx:`12`,cy:`5`,rx:`9`,ry:`3`,key:`msslwz`}],[`path`,{d:`M3 5V19A9 3 0 0 0 21 19V5`,key:`1wlel7`}],[`path`,{d:`M3 12A9 3 0 0 0 21 12`,key:`mv7ke4`}]]),qie=sy(`door-open`,[[`path`,{d:`M11 20H2`,key:`nlcfvz`}],[`path`,{d:`M11 4.562v16.157a1 1 0 0 0 1.242.97L19 20V5.562a2 2 0 0 0-1.515-1.94l-4-1A2 2 0 0 0 11 4.561z`,key:`au4z13`}],[`path`,{d:`M11 4H8a2 2 0 0 0-2 2v14`,key:`74r1mk`}],[`path`,{d:`M14 12h.01`,key:`1jfl7z`}],[`path`,{d:`M22 20h-3`,key:`vhrsz`}]]),Jie=sy(`git-fork`,[[`circle`,{cx:`12`,cy:`18`,r:`3`,key:`1mpf1b`}],[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`path`,{d:`M18 9v2c0 .6-.4 1-1 1H7c-.6 0-1-.4-1-1V9`,key:`1uq4wg`}],[`path`,{d:`M12 12v3`,key:`158kv8`}]]),my=sy(`globe`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]),hy=sy(`grid-2x2`,[[`path`,{d:`M12 3v18`,key:`108xh3`}],[`path`,{d:`M3 12h18`,key:`1i2n21`}],[`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,key:`h1oib`}]]),gy=sy(`hard-drive`,[[`path`,{d:`M10 16h.01`,key:`1bzywj`}],[`path`,{d:`M2.212 11.577a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z`,key:`18tbho`}],[`path`,{d:`M21.946 12.013H2.054`,key:`zqlbp7`}],[`path`,{d:`M6 16h.01`,key:`1pmjb7`}]]),_y=sy(`layers`,[[`path`,{d:`M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z`,key:`zw3jo`}],[`path`,{d:`M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12`,key:`1wduqc`}],[`path`,{d:`M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17`,key:`kqbvx6`}]]),vy=sy(`list-ordered`,[[`path`,{d:`M11 5h10`,key:`1cz7ny`}],[`path`,{d:`M11 12h10`,key:`1438ji`}],[`path`,{d:`M11 19h10`,key:`11t30w`}],[`path`,{d:`M4 4h1v5`,key:`10yrso`}],[`path`,{d:`M4 9h2`,key:`r1h2o0`}],[`path`,{d:`M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02`,key:`xtkcd5`}]]),yy=sy(`lock-open`,[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 9.9-1`,key:`1mm8w8`}]]),Yie=sy(`lock`,[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]),Xie=sy(`mail`,[[`path`,{d:`m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7`,key:`132q7q`}],[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}]]),Zie=sy(`map-pin`,[[`path`,{d:`M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0`,key:`1r0f0z`}],[`circle`,{cx:`12`,cy:`10`,r:`3`,key:`ilqhr7`}]]),Qie=sy(`message-square`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]),$ie=sy(`minus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]),eae=sy(`monitor`,[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`,key:`1svkeh`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`,key:`vw1qmm`}]]),by=sy(`network`,[[`rect`,{x:`16`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`4q2zg0`}],[`rect`,{x:`2`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`8cvhb9`}],[`rect`,{x:`9`,y:`2`,width:`6`,height:`6`,rx:`1`,key:`1egb70`}],[`path`,{d:`M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3`,key:`1jsf9p`}],[`path`,{d:`M12 12V8`,key:`2874zd`}]]),xy=sy(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),Sy=sy(`puzzle`,[[`path`,{d:`M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z`,key:`w46dr5`}]]),Cy=sy(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),tae=sy(`server`,[[`rect`,{width:`20`,height:`8`,x:`2`,y:`2`,rx:`2`,ry:`2`,key:`ngkwjq`}],[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,ry:`2`,key:`iecqi9`}],[`line`,{x1:`6`,x2:`6.01`,y1:`6`,y2:`6`,key:`16zg32`}],[`line`,{x1:`6`,x2:`6.01`,y1:`18`,y2:`18`,key:`nzw8ys`}]]),wy=sy(`smartphone`,[[`rect`,{width:`14`,height:`20`,x:`5`,y:`2`,rx:`2`,ry:`2`,key:`1yt0o3`}],[`path`,{d:`M12 18h.01`,key:`mhygvu`}]]),nae=sy(`split`,[[`path`,{d:`M16 3h5v5`,key:`1806ms`}],[`path`,{d:`M8 3H3v5`,key:`15dfkv`}],[`path`,{d:`M12 22v-8.3a4 4 0 0 0-1.172-2.872L3 3`,key:`1qrqzj`}],[`path`,{d:`m15 9 6-6`,key:`ko1vev`}]]),rae=sy(`square-function`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`path`,{d:`M9 17c2 0 2.8-1 2.8-2.8V10c0-2 1-3.3 3.2-3`,key:`m1af9g`}],[`path`,{d:`M9 11.2h5.7`,key:`3zgcl2`}]]),Ty=sy(`table-2`,[[`path`,{d:`M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18`,key:`gugj83`}]]),iae=sy(`terminal`,[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]),Ey={database:py,postgres:py,table:Ty,user:sy(`user`,[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`,key:`975kel`}],[`circle`,{cx:`12`,cy:`7`,r:`4`,key:`17ys0d`}]]),users:sy(`users`,[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`path`,{d:`M16 3.128a4 4 0 0 1 0 7.744`,key:`16gr8j`}],[`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.87`,key:`kshegd`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]),cloud:dy,mail:Xie,service:cy,system:Uie,queue:vy,server:tae,kubernetes:Gie,infra:gy,comment:Qie,browser:my,spa:Bie,mobile:wy,desktop:eae,api:sy(`webhook`,[[`path`,{d:`M18 16.98h-5.99c-1.1 0-1.95.94-2.48 1.9A4 4 0 0 1 2 17c.01-.7.2-1.4.57-2`,key:`q3hayz`}],[`path`,{d:`m6 17 3.13-5.78c.53-.97.1-2.18-.5-3.1a4 4 0 1 1 6.89-4.06`,key:`1go1hn`}],[`path`,{d:`m12 6 3.13 5.73C15.66 12.7 16.9 13 18 13a4 4 0 0 1 0 8`,key:`qlwsc0`}]]),function:rae,cli:iae,blob:Vie,search:Cy,component:fy,interface:Sy,class:ly,node:Kie,instance:Hie,plus:xy,minus:$ie,dot:Wie,decision:Jie,environment:_y,region:Zie,zone:hy,network:by,"subnet-public":yy,"subnet-private":Yie,"load-balancer":nae,gateway:qie,firewall:uy,internet:my},aae=Object.keys(Ey);function oae(e){let t=new Map(Object.entries({...Ey,...e}));return{resolve:e=>t.get(e),register:(e,n)=>{t.set(e,n)}}}function sae({path:e,nameOf:t,onCrumb:n}){return e.length===0?null:(0,D.jsx)(Jf,{position:`top-left`,className:`dg-breadcrumbs`,children:(0,D.jsxs)(`nav`,{className:`dg-breadcrumbs-nav`,"aria-label":`Nested zoom breadcrumb`,children:[(0,D.jsx)(`button`,{type:`button`,className:`dg-crumb dg-crumb-home`,title:`Zoom out to the bird’s-eye view`,onClick:()=>n(null),children:`⌂`}),e.map((r,i)=>{let a=i===e.length-1;return(0,D.jsxs)(`span`,{className:`dg-crumb-item`,children:[(0,D.jsx)(`span`,{className:`dg-crumb-sep`,"aria-hidden":`true`,children:`›`}),(0,D.jsx)(`button`,{type:`button`,className:`dg-crumb${a?` dg-crumb-current`:``}`,...a?{"aria-current":`page`}:{},onClick:()=>n(r),children:t(r)})]},r)})]})})}function Dy(e){let t=e.filter(e=>e!==void 0);if(t.length===0)return;let n=Math.min(...t.map(e=>e.x)),r=Math.min(...t.map(e=>e.y));return{x:n,y:r,width:Math.max(...t.map(e=>e.x+e.width))-n,height:Math.max(...t.map(e=>e.y+e.height))-r}}var cae=`.react-flow__edge, .react-flow__edgelabel-renderer > *, .dg-loop-badge, .dg-image-caption, .dg-order-band-header, .dg-time-axis-frame`;function lae(e,t){if(e==null)return;let n=[];for(let r of e.querySelectorAll(cae)){let e=r.getBoundingClientRect();if(e.width===0&&e.height===0)continue;let i=t({x:e.left,y:e.top}),a=t({x:e.right,y:e.bottom});n.push({x:i.x,y:i.y,width:a.x-i.x,height:a.y-i.y})}return Dy(n)}function Oy(e,t){if(e.node.color!==void 0)return e.node.color;let n=t.nodeColors?.get(e.id);if(n!==void 0)return n;let r=t.typeColors;if(r!==void 0)return(e.node.type===void 0?void 0:r[e.node.type])??r[`*`]}function uae(e,t){let n=t.metaKeys.map(t=>e.node.metadata?.[t]).filter(e=>e!=null).map(String),r=hn(e.node.threats),i=e.node.comments?.length??0,a=e.node.links?.length??0,o=i>0||a>0?{comments:i,links:a}:void 0;return{label:e.node.name,state:e.state,promoted:e.promoted,sharedMembers:e.sharedMembers,hiddenCount:t.hiddenCounts.get(e.id)??0,metaBadges:n,typeRegistry:t.typeRegistry,icons:t.icons,...e.node.type===void 0?{}:{typeId:e.node.type},...e.node.icon===void 0?{}:{icon:e.node.icon},...Oy(e,t)===void 0?{}:{color:Oy(e,t)},...e.node.textColor===void 0?{}:{textColor:e.node.textColor},...e.node.technology===void 0?{}:{technology:e.node.technology},...e.node.rich===void 0?{}:{rich:e.node.rich},...e.node.textAlign===void 0?{}:{textAlign:e.node.textAlign},...e.node.fontScale===void 0?{}:{fontScale:e.node.fontScale},...t.onToggleExpand===void 0?{}:{onToggleExpand:t.onToggleExpand},...e.state===`leaf`?{}:{onEnterNode:t.onEnterNode},...e.external===void 0?{}:{external:!0},...t.labelEditingId===e.id?{labelEditing:!0,onLabelCommit:n=>{t.endLabelEdit?.();let r=n?.trim()??``;r!==``&&r!==e.node.name&&t.onRenameNode?.(e.id,r)},onRichCommit:n=>{t.endLabelEdit?.(),n!==null&&me(n).trim()!==``&&t.onSetNodeRich?.(e.id,n)}}:{},...e.node.image===void 0?{}:{image:e.node.image,...t.assetBase===void 0?{}:{assetBase:t.assetBase},...t.libraryBase===void 0?{}:{libraryBase:t.libraryBase},...t.editing&&t.onResize!==void 0?{onResize:t.onResize}:{}},...e.node.shape===void 0?{}:{shape:e.node.shape,...t.assetBase===void 0?{}:{assetBase:t.assetBase},...t.libraryBase===void 0?{}:{libraryBase:t.libraryBase}},...e.node.link===void 0?{}:{link:e.node.link,...t.onOpenLink===void 0?{}:{onOpenLink:t.onOpenLink}},...e.node.columns===void 0?{}:{columns:e.columns??e.node.columns},...t.editing&&e.node.type===`db-table`&&t.onSetTableColumns!==void 0?{onColumnsChange:n=>{let r=e.node.columns??[];t.onSetTableColumns?.(e.id,hr(r,e.columns??r,n))}}:{},...t.editing&&t.quickAdd!==void 0?{quickAdd:t.quickAdd}:{},...t.editing&&t.onSetRole!==void 0?{onSetRole:t.onSetRole}:{},...t.editing&&t.onAddThreat!==void 0?{onAddThreat:t.onAddThreat}:{},...t.stylePreset===void 0?{}:{stylePreset:t.stylePreset},...t.notation===void 0?{}:{notation:t.notation},...r.total>0?{threats:r}:{},...o===void 0?{}:{annotations:o},...t.nodeBadges?.get(e.id)===void 0?{}:{badges:t.nodeBadges.get(e.id)},...t.editing&&t.onResize!==void 0&&t.resizable?.(e.node)===`x`?{resizeAxis:`x`,onResize:t.onResize}:{}}}function dae(e,t){let n=e.labels??[],r=e.constituents.length===1?t?.[e.constituents[0].id]:void 0;return r===void 0?n:n.map(e=>{let t=r[e.id];if(t===void 0)return e;let{side:n,...i}=e;return{...i,t:t.t,...t.side===void 0?{}:{side:t.side}}})}function fae(e,t){let n=t.edgeColors?.get(e.id),r=e.constituents.reduce((e,t)=>{let n=hn(t.threats);return{open:e.open+n.open,total:e.total+n.total}},{open:0,total:0}),i=e.constituents.reduce((e,t)=>e+(t.comments?.length??0),0),a=i>0?{comments:i,links:0}:void 0,o={kind:e.kind,constituentCount:e.constituents.length,kindRegistry:t.kindRegistry,...e.label===void 0?{}:{label:e.label},...e.labels===void 0?{}:{labels:dae(e,t.labelMoves)},...e.tint===void 0?{}:{tint:e.tint},...e.style===void 0?{}:{relStyle:e.style},...t.stylePreset===void 0?{}:{stylePreset:t.stylePreset},...t.notation===void 0?{}:{notation:t.notation},...e.polarity===void 0?{}:{polarity:e.polarity},...e.delay===void 0?{}:{delay:e.delay},...n===void 0?{}:{notationColor:n},...r.total>0?{threats:r}:{},...a===void 0?{}:{annotations:a}},s=e.constituents.length===1?e.constituents[0]:void 0;if(s!==void 0&&(o.threatRelation=s.id),s?.fromColumn!==void 0&&(o.fromColumn=s.fromColumn),s?.toColumn!==void 0&&(o.toColumn=s.toColumn),t.editing&&s!==void 0&&(o.editableLabels=!0,o.onAddLabel=(e,n,r)=>t.onAddEdgeLabel?.(s.id,e,n,r),o.onEditLabel=(e,n)=>t.onEditEdgeLabel?.(s.id,e,n),o.onMoveLabel=(e,n,r)=>t.onMoveEdgeLabel?.(s.id,e,n,r),t.onAddThreat!==void 0)){let e=t.onAddThreat;o.onAddThreat=()=>e({relation:s.id})}if(!t.editing&&s!==void 0&&t.onViewMoveEdgeLabel!==void 0&&(o.movableLabels=!0,o.onMoveLabel=(e,n,r)=>t.onViewMoveEdgeLabel?.(s.id,e,n,r)),t.editing&&s!==void 0&&t.onSetEdgeSide!==void 0&&(o.onSetSide=(e,n)=>t.onSetEdgeSide?.(s.id,e,n),s.id===t.pinEdgeRel&&(o.pinsActive=!0)),t.editing&&s!==void 0&&t.pendingAdd?.edgeId===e.id&&(o.pendingAdd={x:t.pendingAdd.x,y:t.pendingAdd.y},o.onPendingAddConsumed=t.onPendingAddConsumed),t.routing!==void 0){let n=t.routes.get(e.id),r=t.laidAt.get(e.from),i=t.laidAt.get(e.to);if(n!==void 0&&n.length>=2&&r!==void 0&&i!==void 0){o.route=n,o.routeCorner=t.routing.corner,o.routeFrom=r,o.routeTo=i;let a=t.labelSpots.get(e.id);a!==void 0&&(o.labelSpot=a)}}return o}var ky=new WeakMap,pae=new WeakMap;function mae(e,t){return e.metaKeys===t.metaKeys&&e.hiddenCounts===t.hiddenCounts&&e.typeRegistry===t.typeRegistry&&e.icons===t.icons&&e.onOpenLink===t.onOpenLink&&e.onToggleExpand===t.onToggleExpand&&e.onEnterNode===t.onEnterNode&&e.editing===t.editing&&e.labelEditingId===t.labelEditingId&&e.endLabelEdit===t.endLabelEdit&&e.onRenameNode===t.onRenameNode&&e.onSetNodeRich===t.onSetNodeRich&&e.assetBase===t.assetBase&&e.libraryBase===t.libraryBase&&e.onResize===t.onResize&&e.onSetTableColumns===t.onSetTableColumns&&e.quickAdd===t.quickAdd&&e.onSetRole===t.onSetRole&&e.onAddThreat===t.onAddThreat&&e.stylePreset===t.stylePreset&&e.notation===t.notation&&e.nodeColors===t.nodeColors&&e.nodeBadges===t.nodeBadges&&e.resizable===t.resizable}function hae(e,t){return e.kindRegistry===t.kindRegistry&&e.editing===t.editing&&e.onAddEdgeLabel===t.onAddEdgeLabel&&e.onEditEdgeLabel===t.onEditEdgeLabel&&e.onMoveEdgeLabel===t.onMoveEdgeLabel&&e.onSetEdgeSide===t.onSetEdgeSide&&e.onAddThreat===t.onAddThreat&&e.pinEdgeRel===t.pinEdgeRel&&e.pendingAdd===t.pendingAdd&&e.onPendingAddConsumed===t.onPendingAddConsumed&&e.stylePreset===t.stylePreset&&e.notation===t.notation&&e.routing===t.routing&&e.routes===t.routes&&e.laidAt===t.laidAt&&e.labelSpots===t.labelSpots&&e.labelMoves===t.labelMoves&&e.onViewMoveEdgeLabel===t.onViewMoveEdgeLabel&&e.edgeColors===t.edgeColors}function gae(e,t){let n=ky.get(e);if(n!==void 0&&mae(n.ctx,t))return n.data;let r=uae(e,t);return ky.set(e,{ctx:t,data:r}),r}function _ae(e,t){let n=pae.get(e);if(n!==void 0&&hae(n.ctx,t))return n.data;let r=fae(e,t);return pae.set(e,{ctx:t,data:r}),r}var vae={open:`open`,mitigated:`mitigated`,accepted:`accepted`,"not-applicable":`n/a`},Ay=24,yae=240,bae=[0,20,40,60,80,100,120],jy=8,xae=28,My=2;function Ny(e,t){switch(t){case`ellipse`:return{x:e.x+16+9,y:e.y+8+9};case`group`:return{x:e.x+e.width-48-9,y:e.y+4+9};default:return{x:e.x-6+9,y:e.y-6+9}}}function Py(e){let t=[];for(let{rect:n,kind:r}of e){if(r===`box`){t.push(n);continue}let{x:e,y:i,width:a,height:o}=n;t.push({x:e,y:i,width:a,height:xae}),t.push({x:e,y:i+o-My,width:a,height:My}),t.push({x:e,y:i,width:My,height:o}),t.push({x:e+a-My,y:i,width:My,height:o})}return t}function Sae(e){return e.map(e=>({x:e.x-jy/2,y:e.y-jy/2,width:jy,height:jy}))}var Fy=(e,t)=>{let n=Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x),r=Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y);return n>0&&r>0?n*r:0},Cae=(e,t)=>{let n=Math.max(t.x-e.x,0,e.x-(t.x+t.width)),r=Math.max(t.y-e.y,0,e.y-(t.y+t.height));return Math.hypot(n,r)};function wae(e,t,n,r,i){let a=t??{x:e.x-9,y:e.y-9,width:18,height:18},{width:o,height:s}=n,c=a.y-14-s,l=a.y+a.height+14,u=a.x-14-o,d=a.x+a.width+14,f={x:0,y:-1},p={x:0,y:1},m={x:-1,y:0},h={x:1,y:0},g=[{at:{x:e.x+Ay-o,y:c},out:f},{at:{x:e.x-Ay,y:c},out:f},{at:{x:u,y:e.y-Ay},out:m},{at:{x:d,y:e.y-Ay},out:h},{at:{x:e.x+Ay-o,y:l},out:p},{at:{x:e.x-Ay,y:l},out:p},{at:{x:u,y:e.y+Ay-s},out:m},{at:{x:d,y:e.y+Ay-s},out:h}],_=[g];if(i!==void 0){let t=t=>(t.at.x+o/2-e.x)*i.x+(t.at.y+s/2-e.y)*i.y;_=[g.filter(e=>t(e)>0),g.filter(e=>t(e)<=0)]}let v,y=1/0;for(let t of _)for(let n of bae)for(let i of t){let t={x:i.at.x+i.out.x*n,y:i.at.y+i.out.y*n},a={...t,width:o,height:s};if(Cae(e,a)>yae)continue;let c=0;for(let e of r)c+=Fy(a,e);if(c===0)return t;c<y&&(v=t,y=c)}return v??g[0].at}var Tae=16,Eae=10,Iy=16,Dae=6,Oae=5,kae=24,Ly=6.2,Ry=5.6,Aae=162,zy=47,By=12,jae=22,Mae=26,Nae=13;function Pae(e,t,n,r=[],i=[]){let a=(e,t,n)=>Math.max(1,Math.ceil(e.length*n/t)),o=Tae+a(e,Aae,Ly)*Iy+Dae;for(let e of t){let t=vae[e.status??`open`],r=n||(e.description??``)!==``||(e.mitigation??``)!==``,i=220-zy-(By+t.length*Ry)-(r?jae:0);o+=a(e.title,i,Ly)*Iy+Oae}if(r.length>0){o+=Mae;for(let e of r)o+=a(e.text,220-2*Eae,Ly)*Iy+(e.by!==void 0||e.at!==void 0?Nae:0)+Oae}return i.length>0&&(o+=Mae+i.length*21),n&&(o+=kae),o}var Vy=7,Hy=12,Uy=2,Wy=11,Fae=4;function Iae(e,t){let{width:n,height:r}=t,i=[{side:`top`,gap:-e.y},{side:`bottom`,gap:e.y-r},{side:`left`,gap:-e.x},{side:`right`,gap:e.x-n}],a=i[0];for(let e of i)e.gap>a.gap&&(a=e);if(a.gap<=0)return null;let o=(e,t)=>Math.min(Math.max(t,19),e-Hy-Vy),s,c;switch(a.side){case`top`:{let t=o(n,e.x);s=[{x:t-Vy,y:Uy},{x:t+Vy,y:Uy}],c={x:t,y:Uy};break}case`bottom`:{let t=o(n,e.x);s=[{x:t-Vy,y:r-Uy},{x:t+Vy,y:r-Uy}],c={x:t,y:r-Uy};break}case`left`:{let t=o(r,e.y);s=[{x:Uy,y:t-Vy},{x:Uy,y:t+Vy}],c={x:Uy,y:t};break}default:{let t=o(r,e.y);s=[{x:n-Uy,y:t-Vy},{x:n-Uy,y:t+Vy}],c={x:n-Uy,y:t}}}let l=e.x-c.x,u=e.y-c.y,d=Math.hypot(l,u);if(d-Wy<Fae)return null;let f={x:e.x-l/d*Wy,y:e.y-u/d*Wy};return{side:a.side,base:s,tip:f}}var Gy=e=>e.stopPropagation();function Lae({data:e,positionAbsoluteX:t,positionAbsoluteY:n,width:r,height:i}){let[a,o]=(0,v.useState)(null),s=e.editing?a??e.editingId:void 0,[c,l]=(0,v.useState)(()=>new Set);(0,v.useEffect)(()=>{e.editing||o(null)},[e.editing]);let u=e.threats.filter(on).length,d=Bg({open:u,total:e.threats.length}),f=()=>{o(null),e.onEndEdit?.()},p=e=>l(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}),m=r!==void 0&&i!==void 0&&r>0&&i>0?Iae({x:e.badge.x-(t??0),y:e.badge.y-(n??0)},{width:r,height:i}):null;return(0,D.jsxs)(`div`,{className:`dg-note`,"data-target":nn(e.target),style:{width:220},children:[m!==null&&(0,D.jsx)(`svg`,{className:`dg-note-tail`,"data-side":m.side,"aria-hidden":`true`,children:(0,D.jsx)(`path`,{d:`M${m.base[0].x} ${m.base[0].y} L${m.tip.x} ${m.tip.y} L${m.base[1].x} ${m.base[1].y}`})}),(0,D.jsxs)(`div`,{className:`dg-note-head`,children:[(0,D.jsx)(`span`,{className:`dg-note-name`,children:e.name}),e.threats.length>0&&(0,D.jsx)(`span`,{className:`dg-note-count`,"data-state":d.state,title:d.title,children:`${u} / ${e.threats.length}`})]}),e.threats.length>0&&(0,D.jsx)(`ul`,{className:`dg-note-rows`,children:e.threats.map(t=>{let n=t.status??`open`,r=vae[n],i=(t.description??``)!==``||(t.mitigation??``)!==``,a=c.has(t.id)&&(e.editing||i);return(0,D.jsxs)(`li`,{className:`dg-note-row`,"data-open":on(t)?`true`:`false`,children:[(0,D.jsxs)(`div`,{className:`dg-note-line`,children:[(0,D.jsx)(`span`,{className:`dg-stride`,"data-category":t.category,title:en[t.category],children:t.category}),s===t.id?(0,D.jsx)(`span`,{className:`nodrag nopan`,onMouseDown:Gy,onPointerDown:Gy,children:(0,D.jsx)(Kg,{label:t.title,ariaLabel:`Rename threat`,onCommit:n=>{e.onRetitleThreat?.(e.target,t.id,n===null?``:n.trim()),f()}})}):(0,D.jsx)(`span`,{className:`dg-note-title`,onDoubleClick:e.editing?e=>{e.stopPropagation(),o(t.id)}:void 0,children:t.title}),e.editing&&e.onSetThreatStatus!==void 0?(0,D.jsx)(`button`,{type:`button`,className:`dg-note-status nodrag nopan`,"data-status":n,"aria-label":`Set status`,title:`Status: ${r} — click to change`,onMouseDown:Gy,onPointerDown:Gy,onClick:n=>{n.stopPropagation(),e.onSetThreatStatus?.(e.target,t.id,gn(t))},children:r}):(0,D.jsx)(`span`,{className:`dg-note-status`,"data-status":n,children:r}),(e.editing||i)&&(0,D.jsx)(`button`,{type:`button`,className:`dg-note-expand nodrag nopan`,"aria-expanded":a,"aria-label":a?`Hide details`:`Show details`,onMouseDown:Gy,onPointerDown:Gy,onClick:e=>{e.stopPropagation(),p(t.id)},children:a?`▾`:`▸`})]}),a&&(0,D.jsx)(`div`,{className:`dg-note-details`,children:e.editing&&e.onEditThreatText!==void 0?(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(Rae,{label:`Description`,value:t.description??``,onCommit:n=>e.onEditThreatText?.(e.target,t.id,`description`,n)}),(0,D.jsx)(Rae,{label:`Mitigation`,value:t.mitigation??``,onCommit:n=>e.onEditThreatText?.(e.target,t.id,`mitigation`,n)})]}):(0,D.jsxs)(D.Fragment,{children:[(t.description??``)!==``&&(0,D.jsx)(`p`,{className:`dg-note-text`,children:t.description}),(t.mitigation??``)!==``&&(0,D.jsxs)(`p`,{className:`dg-note-text`,children:[(0,D.jsx)(`span`,{className:`dg-note-text-label`,children:`Mitigation`}),` `,t.mitigation]})]})})]},t.id)})}),e.comments.length>0&&(0,D.jsxs)(`section`,{className:`dg-note-section`,"aria-label":`Comments`,children:[(0,D.jsx)(`h4`,{className:`dg-note-section-title`,children:`Comments`}),(0,D.jsx)(`ul`,{className:`dg-note-comments`,children:e.comments.map(e=>(0,D.jsxs)(`li`,{className:`dg-note-comment`,children:[(0,D.jsx)(`p`,{className:`dg-note-text`,children:e.text}),(e.by!==void 0||e.at!==void 0)&&(0,D.jsx)(`span`,{className:`dg-note-meta`,children:[e.by,e.at].filter(e=>e!==void 0).join(` · `)})]},e.id))})]}),e.links.length>0&&(0,D.jsxs)(`section`,{className:`dg-note-section`,"aria-label":`Links`,children:[(0,D.jsx)(`h4`,{className:`dg-note-section-title`,children:`Links`}),(0,D.jsx)(`ul`,{className:`dg-note-links`,children:e.links.map(t=>(0,D.jsx)(`li`,{children:(0,D.jsx)(`a`,{className:`dg-note-link nodrag nopan`,.../^https?:/.test(t.url)?{href:t.url,target:`_blank`,rel:`noopener noreferrer`}:{},onMouseDown:Gy,onPointerDown:Gy,onClick:n=>{n.stopPropagation(),e.onOpenLink!==void 0&&(n.preventDefault(),e.onOpenLink(t.url))},children:t.label})},`${t.label}\u0000${t.url}`))})]}),e.editing&&e.onAddThreat!==void 0&&(0,D.jsx)(`button`,{type:`button`,className:`dg-note-add nodrag nopan`,"aria-label":`Add a threat`,title:`Add a threat`,onMouseDown:Gy,onPointerDown:Gy,onClick:t=>{t.stopPropagation(),e.onAddThreat?.(e.target)},children:`+`})]})}function Rae({label:e,value:t,onCommit:n}){let[r,i]=(0,v.useState)(t);(0,v.useEffect)(()=>{i(t)},[t]);let a=(0,v.useRef)(!1);return(0,D.jsx)(`textarea`,{className:`dg-note-field nodrag nopan`,"aria-label":e,placeholder:e,rows:2,value:r,onMouseDown:Gy,onPointerDown:Gy,onChange:e=>i(e.target.value),onKeyDown:e=>{e.key===`Escape`&&(i(t),a.current=!0,e.target.blur())},onBlur:()=>{if(a.current){a.current=!1;return}let e=r.trim();e!==t.trim()&&n(e)}})}var zae={diagram:Are,note:Lae},Bae={diagram:Jre};function Vae(e){return{id:e.id,type:`diagram`,position:e.position,data:e.data,...e.parentId===void 0?{}:{parentId:e.parentId},...e.extent===void 0?{}:{extent:e.extent},...e.expandParent===void 0?{}:{expandParent:e.expandParent},...e.style===void 0?{}:{style:e.style},...e.zIndex===void 0?{}:{zIndex:e.zIndex},...e.draggable===void 0?{}:{draggable:e.draggable},...e.className===void 0?{}:{className:e.className}}}function Ky(e){return{id:e.id,type:`note`,position:e.position,data:e.data,...e.parentId===void 0?{}:{parentId:e.parentId},draggable:e.draggable,selectable:!1,zIndex:2}}function qy(e){return{id:e.id,source:e.source,target:e.target,type:`diagram`,...e.reconnectable===void 0?{}:{reconnectable:e.reconnectable},data:e.data}}function Jy(e){let t=e.length/2;if(t===0)return``;let n=t=>e[2*t],r=t=>e[2*t+1];if(t===1)return`M ${n(0)} ${r(0)} L ${n(0)} ${r(0)}`;if(t===2)return`M ${n(0)} ${r(0)} L ${n(1)} ${r(1)}`;let i=[`M ${n(0)} ${r(0)}`];for(let e=1;e<t-1;e++)i.push(`Q ${n(e)} ${r(e)} ${(n(e)+n(e+1))/2} ${(r(e)+r(e+1))/2}`);return i.push(`L ${n(t-1)} ${r(t-1)}`),i.join(` `)}function Hae(e,t=.75){let n=e.length/2;if(n<=2)return e;let r=Array(n).fill(!1);r[0]=!0,r[n-1]=!0;let i=[[0,n-1]];for(;i.length>0;){let[n,a]=i.pop(),o=e[2*n],s=e[2*n+1],c=e[2*a],l=e[2*a+1],u=c-o,d=l-s,f=Math.hypot(u,d),p=-1,m=t;for(let t=n+1;t<a;t++){let n=e[2*t],r=e[2*t+1],i=f===0?Math.hypot(n-o,r-s):Math.abs(d*n-u*r+c*s-l*o)/f;i>m&&(p=t,m=i)}p!==-1&&(r[p]=!0,i.push([n,p],[p,a]))}let a=[];for(let t=0;t<n;t++)r[t]&&a.push(e[2*t],e[2*t+1]);return a}function Uae(e){let t=1/0,n=1/0,r=-1/0,i=-1/0;for(let a of e){let e=(a.width??3)/2;for(let o=0;o<a.points.length;o+=2){let s=a.points[o],c=a.points[o+1];t=Math.min(t,s-e),r=Math.max(r,s+e),n=Math.min(n,c-e),i=Math.max(i,c+e)}}if(t!==1/0)return{x:t,y:n,width:r-t,height:i-n}}function Wae(e,t){let n=[],r={};for(let i of e){let e=t.get(i.id)??i.position;if(i.type!==`note`){r[i.id]=e;continue}let a=i.data;a.target===void 0||a.anchor===void 0||n.push({target:a.target,offset:{dx:Math.round(e.x-a.anchor.x),dy:Math.round(e.y-a.anchor.y)}})}return{notes:n,boxes:r}}var Yy=12;function Gae({strokes:e,live:t,visible:n,erasing:r,onErase:i}){let{x:a,y:o,zoom:s}=qm();return(0,D.jsx)(`svg`,{className:`dg-drawings`,"aria-hidden":`true`,style:n?void 0:{display:`none`},children:(0,D.jsxs)(`g`,{transform:`translate(${a} ${o}) scale(${s})`,children:[e.map(e=>(0,D.jsx)(`path`,{className:`dg-stroke`,"data-stroke-id":e.id,d:Jy(e.points),stroke:e.color??`var(--dg-ink)`,strokeWidth:e.width??3},e.id)),r&&e.map(e=>(0,D.jsx)(`path`,{className:`dg-stroke-hit`,"data-stroke-id":e.id,d:Jy(e.points),strokeWidth:Math.max(e.width??3,Yy/s),onClick:()=>i?.(e.id)},`hit-${e.id}`)),t!=null&&t.points.length>=2&&(0,D.jsx)(`path`,{className:`dg-stroke dg-stroke-live`,d:Jy(t.points),stroke:t.color??`var(--dg-ink)`,strokeWidth:t.width})]})})}var Kae=e=>e.type===`dimensions`&&e.setAttributes===!0&&e.resizing===void 0;function qae(e,t){return t||!e.some(Kae)?e:e.filter(e=>!Kae(e)&&e.type!==`position`)}var Jae=new Map,Yae=.5;function Xy(e,t,n,r=()=>!1){let i,a,o=t=>(i??e).get(t),s=(t,n)=>{i??=new Map(e),i.set(t,n)},c=e=>{if(e.children.forEach(c),e.state!==`expanded`||r(e))return;let t=o(e.id);if(t===void 0)return;let i=e.children.map(e=>o(e.id)).filter(e=>e!==void 0);if(i.length===0)return;let l=n(e),u=Math.min(...i.map(e=>e.x))-l.left,d=Math.min(...i.map(e=>e.y))-l.top,f=u<-.5?u:0,p=d<-.5?d:0;if(f!==0||p!==0){for(let t of e.children){let e=o(t.id);e!==void 0&&s(t.id,{...e,x:e.x-f,y:e.y-p})}(a??=new Map).set(e.id,{dx:f,dy:p})}let m=(e,t)=>t>e+Yae?t:e,h=m(t.width-f,Math.max(...i.map(e=>e.x+e.width))-f+l.right),g=m(t.height-p,Math.max(...i.map(e=>e.y+e.height))-p+l.bottom);(f!==0||p!==0||h!==t.width||g!==t.height)&&s(e.id,{...t,x:t.x+f,y:t.y+p,width:h,height:g})};return t.forEach(c),{geometry:i??e,shifts:a??Jae}}function Zy(e,t,n,r){return{x:e.x+(t.x-n.x)-(r?.dx??0),y:e.y+(t.y-n.y)-(r?.dy??0)}}var Qy={x:0,y:0};function $y(e,t,n,r,i=()=>!1){let a=new Map(t.map(e=>[e.id,e])),o=e=>{let t=e===void 0?void 0:a.get(e);if(t===void 0)return Qy;let n=o(t.parentId);return{x:n.x+t.position.x,y:n.y+t.position.y}},s={};for(let[t,c]of Object.entries(e)){let e=a.get(t)?.parentId,l=o(e),u=Zy(c,l,(e===void 0?void 0:n.get(e))??l,r.get(t));s[t]=e!==void 0&&i(e)?{x:Math.max(0,u.x),y:Math.max(0,u.y)}:u}return s}var eb=new Set([`left`,`centerX`,`right`]),tb=(e,t)=>{switch(t){case`left`:return e.x;case`centerX`:return e.x+e.w/2;case`right`:return e.x+e.w;case`top`:return e.y;case`middle`:return e.y+e.h/2;case`bottom`:return e.y+e.h}};function nb(e,t){if(e.length<2)return{};let n=e.map(e=>tb(e,t)),r=t===`left`||t===`top`?Math.min(...n):t===`right`||t===`bottom`?Math.max(...n):n.reduce((e,t)=>e+t,0)/n.length,i={};return e.forEach((e,a)=>{let o=r-n[a];o!==0&&(i[e.id]=eb.has(t)?{dx:o,dy:0}:{dx:0,dy:o})}),i}function rb(e,t){if(e.length<3)return{};let n=e=>t===`x`?e.x:e.y,r=e=>t===`x`?e.w:e.h,i=[...e].sort((e,t)=>n(e)-n(t)),a=i[0],o=i[i.length-1],s=(n(o)+r(o)-n(a)-i.reduce((e,t)=>e+r(t),0))/(i.length-1),c={},l=n(a)+r(a)+s;for(let e of i.slice(1,-1)){let i=l-n(e);i!==0&&(c[e.id]=t===`x`?{dx:i,dy:0}:{dx:0,dy:i}),l+=r(e)+s}return c}function ib(e,t){let n=new Set(e);return e.filter(e=>{for(let r=t(e);r!==void 0;r=t(r))if(n.has(r))return!1;return!0})}var ab={dx:0,dy:0,lines:[]};function Xae(e,t,n){let r=(e,t)=>t===`x`?[e.x,e.x+e.w/2,e.x+e.w]:[e.y,e.y+e.h/2,e.y+e.h],i=i=>{let a=r(e,i),o;for(let s of t)if(s.id!==e.id)for(let e of r(s,i))for(let t of a){let r=e-t;Math.abs(r)<=n&&(o===void 0||Math.abs(r)<Math.abs(o.d))&&(o={d:r,at:e,other:s})}return o},a=i(`x`),o=i(`y`);if(a===void 0&&o===void 0)return ab;let s=a?.d??0,c=o?.d??0,l=[];return a!==void 0&&l.push({axis:`x`,at:a.at,from:Math.min(e.y+c,a.other.y),to:Math.max(e.y+c+e.h,a.other.y+a.other.h)}),o!==void 0&&l.push({axis:`y`,at:o.at,from:Math.min(e.x+s,o.other.x),to:Math.max(e.x+s+e.w,o.other.x+o.other.w)}),{dx:s,dy:c,lines:l}}var Zae=e=>{if(e===void 0)return;let t=e.measured?.width??(typeof e.style?.width==`number`?e.style.width:void 0),n=e.measured?.height??(typeof e.style?.height==`number`?e.style.height:void 0);return t!==void 0&&n!==void 0?{width:t,height:n}:void 0};function ob(e,t,n){let r={changes:e,lines:[]},i=e.filter(e=>e.type===`position`&&e.dragging===!0&&e.position!==void 0);if(i.length!==1)return r;let a=i[0],o=t.nodes.find(e=>e.id===a.id),s=Zae(o);if(o===void 0||s===void 0||a.position===void 0)return r;let c=o.parentId===void 0?{x:0,y:0}:t.absoluteOf(o.parentId);if(c===void 0)return r;let l={id:o.id,x:c.x+a.position.x,y:c.y+a.position.y,w:s.width,h:s.height},u=[];for(let e of t.nodes){if(e.id===o.id||e.parentId!==o.parentId)continue;let n=Zae(e),r=t.absoluteOf(e.id);n===void 0||r===void 0||u.push({id:e.id,x:r.x,y:r.y,w:n.width,h:n.height})}let d=Xae(l,u,n);return d.lines.length===0?r:(a.position.x+=d.dx,a.position.y+=d.dy,a.positionAbsolute!==void 0&&(a.positionAbsolute.x+=d.dx,a.positionAbsolute.y+=d.dy),{changes:e,lines:d.lines})}function Qae(e,t,n,r){let i=e=>e.type===`position`&&e.position!==void 0,a=r.current;if(a!==null){let t=e.find(e=>i(e)&&e.dragging!==!0&&e.id===a.id);if(t?.position!==void 0)return r.current=null,t.position.x===a.x&&t.position.y===a.y&&(t.position={x:a.x+a.dx,y:a.y+a.dy}),{changes:e,lines:[]}}let o=e.filter(e=>i(e)&&e.dragging===!0),s=o.length===1?{id:o[0].id,...o[0].position}:void 0,c=ob(e,t,n),l=o.length===1?o[0].position:void 0;return r.current=s!==void 0&&l!==void 0&&c.lines.length>0?{...s,dx:l.x-s.x,dy:l.y-s.y}:null,c}function $ae({lines:e}){let{zoom:t}=qm();if(e.length===0)return null;let n=1/t,r=`${4/t} ${3/t}`;return(0,D.jsx)(Gm,{children:(0,D.jsx)(`svg`,{className:`dg-guides`,"aria-hidden":`true`,children:e.map((e,t)=>e.axis===`x`?(0,D.jsx)(`line`,{className:`dg-guide`,x1:e.at,x2:e.at,y1:e.from,y2:e.to,strokeWidth:n,strokeDasharray:r},t):(0,D.jsx)(`line`,{className:`dg-guide`,y1:e.at,y2:e.at,x1:e.from,x2:e.to,strokeWidth:n,strokeDasharray:r},t))})})}var sb=[{mode:`left`,glyph:`⇤`,label:`Align left`},{mode:`centerX`,glyph:`⇹`,label:`Align centre`},{mode:`right`,glyph:`⇥`,label:`Align right`},{mode:`top`,glyph:`⤒`,label:`Align top`},{mode:`middle`,glyph:`⇳`,label:`Align middle`},{mode:`bottom`,glyph:`⤓`,label:`Align bottom`}];function cb({ids:e,onAlign:t,onDistribute:n}){if(e.length<2)return null;let r=e.length>=3;return(0,D.jsxs)(Jf,{position:`top-center`,className:`dg-selection-toolbar`,"aria-label":`Arrange selection`,children:[sb.map(e=>(0,D.jsx)(`button`,{type:`button`,className:`dg-arrange-btn`,title:e.label,"aria-label":e.label,onClick:()=>t(e.mode),children:e.glyph},e.mode)),(0,D.jsx)(`span`,{className:`dg-arrange-sep`}),(0,D.jsx)(`button`,{type:`button`,className:`dg-arrange-btn`,title:`Distribute horizontally (3+ nodes)`,"aria-label":`Distribute horizontally`,disabled:!r,onClick:()=>n(`x`),children:`⋯`}),(0,D.jsx)(`button`,{type:`button`,className:`dg-arrange-btn`,title:`Distribute vertically (3+ nodes)`,"aria-label":`Distribute vertically`,disabled:!r,onClick:()=>n(`y`),children:`⋮`})]})}var eoe={layers:`Layers`,kinds:`Connections`,types:`Elements`,marks:`Marks`,items:`Notes`},toe=[`layers`,`kinds`,`types`,`marks`,`items`],lb=`var(--dg-node-stroke, var(--dg-border))`,ub=.75;function noe({name:e,at:t,x:n,color:r}){let i=T_[e];return i===void 0?null:(0,D.jsx)(`g`,{transform:`translate(${n} 6) scale(${t===`start`?-.75:ub} ${ub}) translate(${-i.refX} -5)`,...E_.has(e)?{stroke:r,strokeWidth:1.25,vectorEffect:`non-scaling-stroke`,fill:`none`}:{fill:r},children:i.el})}function roe({style:e,color:t}){let n=e.width??1.5,r=e.dashed===!0||e.animated===!0?`6 4`:void 0,i=e.endMarker??`arrow`,a=T_[i];return(0,D.jsxs)(`svg`,{className:`dg-legend-swatch`,viewBox:`0 0 24 12`,width:`24`,height:`12`,"aria-hidden":`true`,children:[(0,D.jsx)(`line`,{x1:`1`,y1:`6`,x2:a!==void 0&&!E_.has(i)?23-(a.refX-2)*ub:23,y2:`6`,stroke:t,strokeWidth:n,...r===void 0?{}:{strokeDasharray:r}}),e.zigzag===!0&&(0,D.jsx)(`polyline`,{points:`8,9 12.5,4.5 10.5,7.5 15,3`,fill:`none`,stroke:t,strokeWidth:1.25}),e.startMarker!==void 0&&(0,D.jsx)(noe,{name:e.startMarker,at:`start`,x:1,color:t}),(0,D.jsx)(noe,{name:i,at:`end`,x:23,color:t})]})}function ioe({s:e,stroke:t}){let n={fill:`var(--dg-surface)`,stroke:t,...e.dashed===!0?{strokeDasharray:`4 3`}:{}};switch(e.shape){case`cylinder`:return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(`ellipse`,{cx:`12`,cy:`4`,rx:`8`,ry:`3`,fill:`var(--dg-surface)`,stroke:t}),(0,D.jsx)(`path`,{d:`M4 4 v8 a8 3 0 0 0 16 0 v-8`,fill:`var(--dg-surface)`,stroke:t})]});case`pill`:return(0,D.jsx)(`rect`,{x:`2`,y:`3`,width:`20`,height:`10`,rx:`5`,...n});case`rounded`:return(0,D.jsx)(`rect`,{x:`2`,y:`3`,width:`20`,height:`10`,rx:`4.5`,...n});case`hexagon`:return(0,D.jsx)(`polygon`,{points:`6,3 18,3 22,8 18,13 6,13 2,8`,fill:`var(--dg-surface)`,stroke:t});case`bubble`:return(0,D.jsx)(`path`,{d:`M 4 3 L 20 3 Q 22 3 22 5 L 22 11 Q 22 13 20 13 L 10 13 L 6 16 L 6 13 L 4 13 Q 2 13 2 11 L 2 5 Q 2 3 4 3 Z`,...n});case`person`:return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(`path`,{d:`M5 15 v-3 a4 4 0 0 1 4 -4 h6 a4 4 0 0 1 4 4 v3 z`,...n}),(0,D.jsx)(`circle`,{cx:`12`,cy:`4.5`,r:`3`,...n})]});case`table`:return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(`rect`,{x:`2`,y:`2`,width:`20`,height:`12`,rx:`1.5`,...n}),(0,D.jsx)(`path`,{d:`M2 6.5 h20 M2 10.25 h20`,fill:`none`,stroke:t})]});case`circle`:return(0,D.jsx)(`circle`,{cx:`12`,cy:`8`,r:`5.5`,...n});case`ellipse`:return(0,D.jsx)(`ellipse`,{cx:`12`,cy:`8`,rx:`10`,ry:`5.5`,...n});case`diamond`:return(0,D.jsx)(`polygon`,{points:`12,1.5 20,8 12,14.5 4,8`,...n});case`bar`:return(0,D.jsx)(`rect`,{x:`10.5`,y:`1`,width:`3`,height:`14`,rx:`1`,fill:t});case`start-dot`:return(0,D.jsx)(`circle`,{cx:`12`,cy:`8`,r:`5`,fill:t});case`end-bullseye`:return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(`circle`,{cx:`12`,cy:`8`,r:`6`,fill:`var(--dg-surface)`,stroke:t}),(0,D.jsx)(`circle`,{cx:`12`,cy:`8`,r:`3.25`,fill:t})]});case`send-signal`:return(0,D.jsx)(`polygon`,{points:`2,3 17,3 22,8 17,13 2,13`,...n});case`receive-signal`:return(0,D.jsx)(`polygon`,{points:`2,3 22,3 22,13 2,13 7,8`,...n});case`note`:return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(`polygon`,{points:`2,2 17,2 22,7 22,14 2,14`,...n}),(0,D.jsx)(`path`,{d:`M17 2 v5 h5`,fill:`none`,stroke:t})]});case`store`:return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(`line`,{x1:`2`,y1:`3.5`,x2:`22`,y2:`3.5`,stroke:t}),(0,D.jsx)(`line`,{x1:`2`,y1:`12.5`,x2:`22`,y2:`12.5`,stroke:t})]});case`box`:return(0,D.jsx)(`rect`,{x:`2`,y:`3`,width:`20`,height:`10`,rx:`2`,...n})}}function aoe({mark:e}){let t=e===`threat-open`?Bg({open:1,total:1}):e===`threat-handled`?Bg({open:0,total:1}):void 0;return(0,D.jsx)(`span`,{className:`dg-legend-swatch dg-legend-mark`,"data-mark":e,"aria-hidden":`true`,children:t===void 0?(0,D.jsx)(`span`,{className:`dg-table-key`,children:e===`pk`?`🔑`:`FK`}):(0,D.jsx)(`span`,{className:`dg-legend-badge`,"data-state":t.state,children:t.text})})}function ooe({swatch:e,icons:t}){if(e===void 0)return(0,D.jsx)(`span`,{className:`dg-legend-swatch`,"aria-hidden":`true`});if(e.draw===`chip`)return(0,D.jsx)(`span`,{className:`dg-legend-swatch dg-legend-chip`,style:{background:e.color},"aria-hidden":`true`});if(e.draw===`mark`)return(0,D.jsx)(aoe,{mark:e.mark});if(e.draw===`line`)return(0,D.jsx)(roe,{style:e.style,color:e.color??`var(--dg-edge)`});let n=e.icon===void 0?void 0:t?.resolve(e.icon);return(0,D.jsxs)(`span`,{className:`dg-legend-swatch dg-legend-shape`,children:[(0,D.jsx)(`svg`,{viewBox:`0 0 24 16`,width:`24`,height:`16`,"aria-hidden":`true`,children:(0,D.jsx)(ioe,{s:e.style,stroke:e.color??lb})}),n!==void 0&&(0,D.jsx)(n,{size:9,className:`dg-legend-icon`})]})}function db({rows:e,title:t=`Legend`,interactive:n,onToggleLayer:r,onToggleDrawings:i,icons:a,onMeasure:o}){let[s,c]=(0,v.useState)(!1),l=(0,v.useRef)(null),u=(0,v.useRef)(null);if((0,v.useEffect)(()=>{if(o===void 0||l.current===null)return;let{width:e,height:t}=l.current.getBoundingClientRect(),n={width:Math.ceil(e),height:Math.ceil(t)},r=u.current;r!==null&&r.width===n.width&&r.height===n.height||(u.current=n,o(n))},[o,e,s]),e.length===0)return null;let d=toe.map(t=>[t,e.filter(e=>e.section===t)]).filter(([,e])=>e.length>0);return(0,D.jsxs)(`div`,{className:`dg-legend`,ref:l,children:[(0,D.jsxs)(`div`,{className:`dg-legend-head`,children:[(0,D.jsx)(`span`,{className:`dg-legend-title`,children:t}),n&&(0,D.jsx)(`button`,{type:`button`,className:`dg-legend-collapse`,"aria-label":s?`Expand legend`:`Collapse legend`,"aria-expanded":!s,onClick:()=>c(e=>!e),children:(0,D.jsx)(`span`,{"aria-hidden":`true`,children:s?`▸`:`▾`})})]}),!s&&(0,D.jsx)(`div`,{className:`dg-legend-body`,children:d.map(([e,t])=>(0,D.jsxs)(`div`,{className:`dg-legend-section`,children:[(0,D.jsx)(`div`,{className:`dg-legend-section-title`,children:eoe[e]}),t.map(e=>{let t=(0,D.jsx)(ooe,{...e.swatch===void 0?{}:{swatch:e.swatch},...a===void 0?{}:{icons:a}}),n=e.layer;return e.drawings===!0&&i!==void 0?(0,D.jsxs)(`button`,{type:`button`,className:`dg-legend-row dg-legend-toggle${e.active===!0?``:` dg-legend-off`}`,"aria-pressed":e.active===!0,onClick:i,children:[t,(0,D.jsx)(`span`,{className:`dg-legend-label`,children:e.label})]},e.id):n!==void 0&&r!==void 0?(0,D.jsxs)(`button`,{type:`button`,className:`dg-legend-row dg-legend-toggle${e.active===!0?``:` dg-legend-off`}`,"aria-pressed":e.active===!0,onClick:()=>r(n),children:[t,(0,D.jsx)(`span`,{className:`dg-legend-label`,children:e.label})]},e.id):(0,D.jsxs)(`div`,{className:`dg-legend-row${(n!==void 0||e.drawings===!0)&&e.active!==!0?` dg-legend-off`:``}`,children:[t,(0,D.jsx)(`span`,{className:`dg-legend-label`,children:e.label})]},e.id)})]},e))})]})}var fb=8,pb=[`th`,`st`,`nd`,`rd`];function mb(e){let t=e%100;return`${e}${t>=11&&t<=13?`th`:pb[e%10]??`th`}`}var hb=(e,t)=>e===0?t>1?`Decisions`:`Decision`:`${mb(e)} order`;function soe(e,t,n){let r=n===`DOWN`||n===`UP`,i=new Map,a=1/0,o=-1/0;for(let[n,s]of t){let t=e.get(n);if(t===void 0)continue;let c=r?t.y:t.x,l=r?t.y+t.height:t.x+t.width,u=i.get(s);i.set(s,u===void 0?{lo:c,hi:l}:{lo:Math.min(u.lo,c),hi:Math.max(u.hi,l)}),a=Math.min(a,r?t.x:t.y),o=Math.max(o,r?t.x+t.width:t.y+t.height)}let s=a-20-(r?96:28),c=o+20-s;return[...i.entries()].sort(([e],[t])=>e-t).map(([e,{lo:t,hi:n}])=>{let i=t-20,a=n-t+40,o=r?{x:s,y:i,width:c,height:a}:{x:i,y:s,width:a,height:c};return{order:e,...o,header:{x:o.x+fb,y:o.y+fb}}})}function gb({model:e,direction:t}){let n=Km(),r=(0,v.useMemo)(()=>Gt(e).orders,[e]),i=(0,v.useMemo)(()=>e.nodes.filter(e=>e.type===`so-decision`&&r.get(e.id)===0).length,[e,r]),a=(0,v.useMemo)(()=>soe(jv(n),r,t),[n,r,t]);return a.length===0?null:(0,D.jsx)(Gm,{children:(0,D.jsx)(`svg`,{className:`dg-order-bands`,"aria-hidden":`true`,children:a.map((e,t)=>(0,D.jsxs)(`g`,{children:[(0,D.jsx)(`rect`,{className:`dg-order-band${t%2==1?` dg-order-band-alt`:``}`,x:e.x,y:e.y,width:e.width,height:e.height,rx:6}),(0,D.jsx)(`text`,{className:`dg-order-band-header`,x:e.header.x,y:e.header.y,dominantBaseline:`hanging`,children:hb(e.order,i)})]},e.order))})})}function coe(e,t,n){let r;for(let i of t)n.has(i.id)||e.x<i.x||e.x>i.x+i.w||e.y<i.y||e.y>i.y+i.h||(r===void 0||i.w*i.h<r.w*r.h)&&(r=i);return r?.id}var _b=qr.HEADER_H/2;function loe({model:e,plane:t,today:n}){let r=Km(),i=(0,v.useMemo)(()=>jv(r),[r]),a=Xr(e,t),o=(0,v.useMemo)(()=>a.range!==void 0&&a.origin!==void 0?Iie(a.range,a.origin):void 0,[a]);if(o===void 0||a.origin===void 0||a.range===void 0)return null;let{DAY:s,HEADER_H:c,PAD:l}=qr,u=a.origin,d=0;for(let e of i.values())d=Math.max(d,e.y+e.height);d+=l;let f=new Map(e.nodes.map(e=>[e.id,e])),p=a.events.filter(e=>!a.parent.has(e)&&En(f.get(e))),m=n==null?void 0:jn(n),h=m!==void 0&&m>=a.range.start-7&&m<a.range.end+8?Zr(m,u)+s/2:void 0;return(0,D.jsx)(Gm,{children:(0,D.jsxs)(`svg`,{className:`dg-time-axis`,"aria-hidden":`true`,children:[(0,D.jsx)(`rect`,{className:`dg-time-axis-frame`,x:o.x0,y:-c,width:o.x1-o.x0,height:c}),o.months.map(e=>(0,D.jsxs)(`g`,{children:[(0,D.jsx)(`line`,{className:`dg-time-axis-tick`,x1:e.x,y1:-c,x2:e.x,y2:0}),(0,D.jsx)(`text`,{className:`dg-time-axis-month`,x:e.x+6,y:-c+_b/2,dominantBaseline:`middle`,children:e.label})]},e.x)),o.weeks.map(e=>(0,D.jsxs)(`g`,{children:[(0,D.jsx)(`line`,{className:`dg-time-axis-tick`,x1:e.x,y1:-_b,x2:e.x,y2:0}),(0,D.jsx)(`line`,{className:`dg-time-axis-grid`,x1:e.x,y1:0,x2:e.x,y2:d}),e.label!==``&&(0,D.jsx)(`text`,{className:`dg-time-axis-week`,x:e.x+4,y:-_b/2,dominantBaseline:`middle`,children:e.label})]},e.x)),p.map(e=>{let t=Pn(f.get(e));if(t===void 0)return null;let n=Zr(t,u)+s/2;return(0,D.jsx)(`line`,{className:`dg-time-axis-event`,x1:n,y1:0,x2:n,y2:d},e)}),h!==void 0&&(0,D.jsxs)(`g`,{children:[(0,D.jsx)(`line`,{className:`dg-time-axis-today`,x1:h,y1:-_b,x2:h,y2:d}),(0,D.jsx)(`text`,{className:`dg-time-axis-today-label`,x:h+4,y:-_b/2,dominantBaseline:`middle`,children:`today`})]})]})})}function uoe({enabled:e,toFlow:t,onStroke:n,simplify:r=!0}){let[i,a]=(0,v.useState)(null),o=(0,v.useRef)(null),s=(0,v.useRef)(null),c=(0,v.useCallback)(e=>{let n=o.current;if(n===null)return;let r=e.nativeEvent,i=typeof r.getCoalescedEvents==`function`?r.getCoalescedEvents():[];for(let e of i.length>0?i:[r]){let r=t({x:e.clientX,y:e.clientY});n.push(r.x,r.y)}a([...n])},[t]),l=(0,v.useCallback)(n=>{if(!e||n.button!==0||n.target?.closest?.(`.react-flow__panel`)!==null)return;if(s.current!==null){n.stopPropagation(),n.preventDefault();return}n.stopPropagation(),n.preventDefault(),n.currentTarget.setPointerCapture?.(n.pointerId),s.current=n.pointerId;let r=t({x:n.clientX,y:n.clientY});o.current=[r.x,r.y],a([r.x,r.y])},[e,t]),u=(0,v.useCallback)(e=>{s.current===e.pointerId&&(e.stopPropagation(),c(e))},[c]),d=(0,v.useCallback)((e,t)=>{if(s.current!==e.pointerId)return;e.stopPropagation();let i=o.current;if(o.current=null,s.current=null,a(null),t&&i!==null){let e=i.map(e=>Math.round(e));n(r?Hae(e):e)}},[n,r]);return{live:i,handlers:{onPointerDownCapture:l,onPointerMoveCapture:u,onPointerUpCapture:(0,v.useCallback)(e=>d(e,!0),[d]),onPointerCancelCapture:(0,v.useCallback)(e=>d(e,!1),[d])}}}var doe=1e3;function foe({enabled:e,toFlow:t}){let[n,r]=(0,v.useState)([]),i=(0,v.useRef)(0),a=(0,v.useRef)(new Set),o=(0,v.useCallback)(e=>{let t=i.current++;r(n=>[...n,{id:t,points:e}]);let n=setTimeout(()=>{a.current.delete(n),r(e=>e.filter(e=>e.id!==t))},doe);a.current.add(n)},[]);(0,v.useEffect)(()=>{let e=a.current;return()=>{for(let t of e)clearTimeout(t);e.clear()}},[]);let s=uoe({enabled:e,toFlow:t,onStroke:o,simplify:!1});return{live:s.live,trails:n,handlers:s.handlers}}function vb(e){let[t,n]=(0,v.useState)(!1),r=e.editing&&e.tool===`pen`&&e.drillRoot===void 0&&!t,i=e.editing&&e.tool===`eraser`&&e.drillRoot===void 0&&!t,a=r||t;(0,v.useEffect)(()=>{n(!1)},[e.modelId]),(0,v.useEffect)(()=>{if(e.chromeless)return;let t=t=>{let r=t.target,i=r?.tagName;i===`INPUT`||i===`TEXTAREA`||i===`SELECT`||r?.isContentEditable===!0||t.metaKey||t.ctrlKey||t.altKey||(t.key===`Escape`?n(!1):e.builtinKeys&&t.key.toLowerCase()===`l`&&!t.repeat&&(t.preventDefault(),n(e=>!e)))};return window.addEventListener(`keydown`,t),()=>window.removeEventListener(`keydown`,t)},[e.chromeless,e.builtinKeys]);let o=uoe({enabled:r&&e.onAddStroke!==void 0,toFlow:e.toFlow,onStroke:t=>e.onAddStroke?.({points:t,...e.pen?.color===void 0?{}:{color:e.pen.color},width:e.pen?.width??3})}),s=foe({enabled:t,toFlow:e.toFlow});return{laserOn:t,setLaserOn:n,penActive:r,eraserActive:i,gestureCaptured:a,pen:o,laser:s,gestureHandlers:(0,v.useMemo)(()=>{let e=e=>t=>{s.handlers[e](t),o.handlers[e](t)};return{onPointerDownCapture:e(`onPointerDownCapture`),onPointerMoveCapture:e(`onPointerMoveCapture`),onPointerUpCapture:e(`onPointerUpCapture`),onPointerCancelCapture:e(`onPointerCancelCapture`)}},[s.handlers,o.handlers])}}var yb=500,poe=40;function bb(){let e=(0,v.useRef)(null),t=(0,v.useRef)(null),n=(e,t)=>e!==null&&Date.now()-e.at<yb&&Math.hypot(t.clientX-e.clientX,t.clientY-e.clientY)<poe,r=(e,t,n)=>{e.current={id:t,clientX:n.clientX,clientY:n.clientY,at:Date.now()}};return{recordNodeClick:(t,n)=>r(e,t,n),clearNodeClick:()=>{e.current=null},consumeNodeDrill:(t,r,i)=>{let a=e.current;return a!==null&&a.id===t&&i>=2&&n(a,r)?(e.current=null,!0):!1},takePaneNodeDrill:(t,r)=>{let i=e.current;return i!==null&&r>=2&&n(i,t)?(e.current=null,i.id):null},recordEdgeClick:(e,n)=>r(t,e,n),clearEdgeClick:()=>{t.current=null},consumeEdgeAdd:(e,r)=>{let i=t.current;return i!==null&&i.id===e&&n(i,r)?(t.current=null,!0):!1},takePaneEdgeAdd:e=>{let r=t.current;return r!==null&&n(r,e)?(t.current=null,r.id):null},clearAll:()=>{e.current=null,t.current=null}}}function xb(e,t,n=[]){if(!e.has(t))return[];let r=new Set(n),i=[t],a=new Set([t]),o=t;for(;;){let t=e.get(o)??[],n=t.find(e=>r.has(e))??t[0];if(n===void 0||a.has(n))break;i.unshift(n),a.add(n),o=n}return i}function Sb(e,t){let n=e.indexOf(t);return n<0?[]:e.slice(0,n+1)}function Cb(e,t){let n=new Set(t.nodes.map(e=>e.id)),r=e.findIndex(e=>!n.has(e));return r<0?e:e.slice(0,r)}function wb(e,t){let n=t.next;return e.seen.modelId===n.modelId?e.seen.plane===n.plane?e.seen.model===n.model?e.seen.enteredPathProp===n.enteredPathProp?{seen:n,transition:`none`}:{seen:n,transition:`entered-path`}:{seen:n,transition:`model-edit`}:{seen:n,transition:`plane-switch`}:{seen:n,transition:`model-switch`}}function Tb(e){let[t,n]=(0,v.useState)([]),[r,i]=(0,v.useState)(()=>e.enteredPathProp===void 0?[]:Cb(e.enteredPathProp,e.model)),a=(0,v.useRef)([]);a.current=r;let{onEnteredPathChange:o}=e;(0,v.useEffect)(()=>{o?.(r)},[r,o]);let s=(0,v.useRef)(null),c=()=>({modelId:e.model.id,model:e.model,plane:e.plane,enteredPathProp:e.enteredPathProp}),[l,u]=(0,v.useReducer)(wb,void 0,()=>({seen:c(),transition:`none`})),d=r;if(l.seen.modelId===e.model.id?l.seen.plane===e.plane?l.seen.model!==e.model&&(u({type:`sync`,next:c()}),i(t=>Cb(t,e.model)),d=Cb(r,e.model)):(u({type:`sync`,next:c()}),n(Ev(e.model,e.plane,e.visibleRef.current)),i([]),d=[],e.onPlaneSwitch()):(u({type:`sync`,next:c()}),e.visibleRef.current=[],n([]),i([]),d=[],s.current=`jump`),l.seen.enteredPathProp!==e.enteredPathProp&&(u({type:`sync`,next:c()}),e.enteredPathProp!==void 0)){let t=Cb(e.enteredPathProp,e.model);(t.length!==d.length||t.some((e,t)=>e!==d[t]))&&(s.current??=`glide`,i(t),n([]))}let f=(0,v.useMemo)(()=>Et(e.model,e.plane),[e.model,e.plane]),p=r.length>0?r[r.length-1]:void 0,{isAlwaysExpanded:m}=e;return{enteredPath:r,drillRoot:p,focus:t,enterNode:(0,v.useCallback)(e=>{if(m(e))return;let t=xb(f.parentsOf,e,a.current);t.length!==0&&(s.current=`glide`,i(t),n([]))},[f,m]),exitTo:e=>{let t=e===null?[]:Sb(r,e);s.current=`glide`,i(t),n([])},pendingRootFitRef:s}}var moe=[`layers`,`kinds`,`marks`],hoe=new Set([`bar`,`start-dot`,`end-bullseye`]);function goe(e,t){let n=new Map(t.map((e,t)=>[e,t]));return[...e].sort((e,t)=>{let r=n.get(e),i=n.get(t);return r!==void 0&&i!==void 0?r-i:r===void 0?i===void 0?e.localeCompare(t):1:-1})}function _oe(e){let t=e.model,n=Et(t,e.plane?.id);if(e.root!==void 0&&n.childrenOf.has(e.root)){let{model:r}=Cr(t,n,e.root);return{nodes:r.nodes,relations:r.relations}}let r=new Set(n.childrenOf.keys());return{nodes:t.nodes.filter(e=>r.has(e.id)),relations:t.relations.filter(e=>r.has(e.from)&&r.has(e.to))}}function voe(e){let{nodes:t,relations:n}=_oe(e),r=new Set;for(let e of t){e.layer!==void 0&&r.add(e.layer);for(let t of e.columns??[])t.layer!==void 0&&r.add(t.layer)}for(let t of n){let n=vr(e.model,t);n!==void 0&&r.add(n)}return r}function yoe(e){let t=voe(e),n=new Set(e.activeLayers??e.plane?.layers??[]),r=[];for(let i of e.model.layers){if(!t.has(i.id))continue;let a=n.has(i.id);!a&&!e.canToggleLayers||r.push({id:`layers:${i.id}`,section:`layers`,label:i.name,swatch:{draw:`chip`,color:i.tint??`var(--dg-edge)`},layer:i.id,active:a})}return r}function Eb(e){let t=new Map,n=[];for(let r of e.compiled.edges)t.has(r.kind)?t.get(r.kind)!==r.tint&&t.set(r.kind,void 0):(n.push(r.kind),t.set(r.kind,r.tint));return goe(n,Object.keys(ei)).map(n=>{let r=t.get(n),i=e.kindRegistry.resolve(n);return{id:`kinds:${n}`,section:`kinds`,label:i.legendLabel??n,swatch:{draw:`line`,style:i,...r===void 0?{}:{color:r}},...i.legendLabel===void 0?{}:{vocabulary:!0}}})}function Db(e){let t=new Map,n={...e.nodeColors===void 0?{}:{nodeColors:e.nodeColors},...e.model.typeColors===void 0?{}:{typeColors:e.model.typeColors}},r=e=>{for(let i of e){let e=i.node.type;if(e!==void 0){let r=Oy(i,n);t.has(e)?t.get(e)!==r&&t.set(e,void 0):t.set(e,r)}r(i.children)}};return r(e.compiled.roots),goe([...t.keys()],Object.keys($r)).map(n=>{let r=e.typeRegistry.resolve(n),i=hoe.has(r.shape)?void 0:t.get(n),a=r.label;return{id:`types:${n}`,section:`types`,label:r.legendLabel??(a===void 0||a===``?n:a),swatch:{draw:`shape`,style:r,...i===void 0?{}:{color:i},...r.icon===void 0?{}:{icon:r.icon}},...r.legendLabel===void 0?{}:{vocabulary:!0}}})}function Ob(e){let t=new Set,n=e=>{e.total!==0&&t.add(e.open>0?`threat-open`:`threat-handled`)},r=e=>{for(let i of e){n(hn(i.node.threats));for(let e of i.columns??i.node.columns??[])e.pk===!0?t.add(`pk`):e.fk===!0&&t.add(`fk`);r(i.children)}};r(e.compiled.roots);for(let t of e.compiled.edges)n(t.constituents.reduce((e,t)=>{let n=hn(t.threats);return{open:e.open+n.open,total:e.total+n.total}},{open:0,total:0}));let i={"threat-open":`Open threats`,"threat-handled":`All threats handled`,pk:`Primary key`,fk:`Foreign key column`};return Object.keys(i).filter(e=>t.has(e)).map(e=>({id:`marks:${e}`,section:`marks`,label:i[e],swatch:{draw:`mark`,mark:e},vocabulary:!0}))}function kb(e,t){if(e.kind!==void 0)return{draw:`line`,style:t.kindRegistry.resolve(e.kind),...e.color===void 0?{}:{color:e.color}};if(e.type!==void 0){let n=t.typeRegistry.resolve(e.type),r=e.icon??n.icon;return{draw:`shape`,style:n,...e.color===void 0?{}:{color:e.color},...r===void 0?{}:{icon:r}}}if(e.color!==void 0)return{draw:`chip`,color:e.color}}function boe(e){return e.drawings===void 0?[]:[{id:`layers:$drawings`,section:`layers`,label:`Drawings`,swatch:{draw:`line`,style:{width:2.5},color:`var(--dg-ink)`},drawings:!0,active:e.drawings.active}]}function xoe(e){let t=e.config.show??moe,n=t.includes(`types`)?Db(e):e.config.show===void 0?Db(e).filter(e=>e.vocabulary===!0):[],r=[...t.includes(`layers`)?[...yoe(e),...boe(e)]:[],...t.includes(`kinds`)?Eb(e):[],...n,...t.includes(`marks`)?Ob(e):[]],i=[];return(e.config.items??[]).forEach((t,n)=>{let a=t.kind===void 0?t.type===void 0?void 0:`types:${t.type}`:`kinds:${t.kind}`,o=a===void 0?void 0:r.find(e=>e.id===a);if(o!==void 0){o.label=t.label,t.color!==void 0&&(o.swatch?.draw===`line`||o.swatch?.draw===`shape`)&&(o.swatch={...o.swatch,color:t.color}),t.icon!==void 0&&o.swatch!==void 0&&o.swatch.draw===`shape`&&(o.swatch={...o.swatch,icon:t.icon});return}let s=kb(t,e);i.push({id:`items:${n}`,section:`items`,label:t.label,...s===void 0?{}:{swatch:s}})}),[...r,...i]}var Soe={};function Ab(e){let[t,n]=(0,v.useState)(e.model.legend!==void 0),[r,i]=(0,v.useState)(null),a=e.model.legend;(0,v.useEffect)(()=>{n(a!==void 0)},[e.model.id,a]);let o=(0,v.useMemo)(()=>e.model.planes.find(t=>t.id===(e.plane??e.model.planes[0]?.id)),[e.model.planes,e.plane]),s=(0,v.useMemo)(()=>{let t=xoe({model:e.model,compiled:e.compiled,...o===void 0?{}:{plane:o},...e.drillRoot===void 0?{}:{root:e.drillRoot},...e.activeLayers===void 0?{}:{activeLayers:e.activeLayers},...e.nodeColors===void 0?{}:{nodeColors:e.nodeColors},typeRegistry:e.typeRegistry,kindRegistry:e.kindRegistry,config:a??Soe,canToggleLayers:e.canToggleLayers,...e.strokes.length>0?{drawings:{active:e.drawingsVisible}}:{}});return a!==void 0||t.some(e=>e.vocabulary===!0)?t:[]},[a,e.model,e.compiled,o,e.drillRoot,e.activeLayers,e.typeRegistry,e.kindRegistry,e.canToggleLayers,e.strokes,e.drawingsVisible,e.nodeColors]),c=(0,v.useRef)(null);return(0,v.useEffect)(()=>{let e=a?.position??`bottom-right`;c.current=!t||r===null||s.length===0?null:{side:e.startsWith(`top`)?`top`:`bottom`,px:r.height+16}},[t,r,s,a]),{legendConfig:a,showLegend:t,setShowLegend:n,setLegendSize:i,legendRowList:s,legendReserveRef:c}}function Coe(e){let t=e.profile.overlay===`loop-labels`,n=(0,v.useMemo)(()=>t?e.compiled.edges.map(e=>{let t=kv(e.constituents.map(e=>e.polarity));return{id:e.id,from:e.from,to:e.to,...t===void 0?{}:{polarity:t}}}):null,[e.compiled,t]),{onCldEdges:r}=e;(0,v.useEffect)(()=>{r?.(n??[])},[n,r]);let[i,a]=(0,v.useState)(!0),[o,s]=(0,v.useState)(null),[c,l]=(0,v.useState)(!0),[u,d]=(0,v.useState)(null),f=e.externalHighlight,{profile:p,model:m,plane:h}=e,g=(0,v.useMemo)(()=>{if(!c||o===null)return null;let t=new Set([o]),n=new Set;for(let r of e.compiled.edges)r.from===o?(t.add(r.to),n.add(r.id)):r.to===o&&(t.add(r.from),n.add(r.id));for(let e of p.related?.(m,h,o)??[])t.add(e);return{nodes:t,edges:n}},[c,o,e.compiled.edges,p,m,h]),_=(0,v.useMemo)(()=>{let e=f==null?u===null?null:{nodes:u.nodes,edges:u.edges}:{nodes:new Set(f.nodes),edges:new Set(f.edges)},t=e??g;return{nodes:t?.nodes??ih,edges:t?.edges??ih,active:t!==null,variant:e===null?`focus`:`loop`,activeKey:u?.key??null,focusId:o,toggle:(e,t,n)=>d(r=>r?.key===e?null:{key:e,nodes:new Set(t),edges:new Set(n)}),clear:()=>d(null)}},[u,f,g,o]);return(0,v.useEffect)(()=>{d(null),s(null)},[e.compiled]),{cld:t,loopEdges:n,showLoops:i,setShowLoops:a,selectedNode:o,setSelectedNode:s,focusConnected:c,setFocusConnected:l,loopHighlight:_}}var jb={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},woe=e=>{let t=e?.tagName;return t===`INPUT`||t===`TEXTAREA`||t===`SELECT`||e?.isContentEditable===!0};function Mb(e){let t=(0,v.useRef)({}),n=(0,v.useRef)(null),r=(0,v.useRef)(e);r.current=e;let i=(0,v.useCallback)(()=>{n.current!==null&&(clearTimeout(n.current),n.current=null);let e=t.current;Object.keys(e).length!==0&&(t.current={},r.current.commit(e))},[]),a=(0,v.useCallback)(e=>{let{enabled:a,step:o,nodesRef:s,applyMoves:c}=r.current,l=jb[e.key];if(!a||l===void 0)return;let u=e.target;if(woe(u)||(u?.closest(`.react-flow__node, .react-flow__nodesselection-rect`)??null)===null)return;let d=s.current.filter(e=>e.selected===!0&&e.draggable!==!1);if(d.length===0)return;if(e.metaKey||e.ctrlKey||e.altKey){e.stopPropagation();return}e.preventDefault(),e.stopPropagation();let f=o*(e.shiftKey?4:1),p={};for(let e of d){let n=t.current[e.id]??e.position;p[e.id]={x:n.x+l.x*f,y:n.y+l.y*f}}t.current={...t.current,...p},c(p),n.current!==null&&clearTimeout(n.current),n.current=setTimeout(i,300)},[i]),o=(0,v.useCallback)(e=>{(e.target?.closest(`.react-flow__node`)??null)!==null&&i()},[i]);return(0,v.useEffect)(()=>i,[i]),{onKeyDownCapture:a,onBlurCapture:o,flush:i,pendingRef:t}}function Nb(e,t){if(Object.keys(t).length===0)return e;let n=new Map(e);for(let[e,r]of Object.entries(t)){let t=n.get(e);t!==void 0&&n.set(e,{...t,x:r.x,y:r.y})}return n}var Pb=new Map,Fb=new Map,Ib=new Set;function Lb(e,t){return t.size===0||!Object.keys(e).some(e=>t.has(e))?e:Object.fromEntries(Object.entries(e).filter(([e])=>!t.has(e)))}function Rb(e,t,n){return t.size===0||!Object.keys(e).some(e=>t.has(e))?e:Object.fromEntries(Object.entries(e).map(([e,r])=>{let i=t.has(e)?n.get(e):void 0;return[e,i===void 0?r:{x:i.x,y:r.y}]}))}function zb(e){let t=(0,v.useMemo)(()=>{let t=new Map;for(let n of e.model.nodes){let r=e.profile.node?.leafSize?.(n);r!==void 0&&t.set(n.id,r)}for(let n of e.model.nodes){if(n.type===void 0)continue;let r=e.typeRegistry.resolve(n.type).defaultSize;if(r===void 0)continue;let i=e.layout?.sizes?.[n.id];t.set(n.id,i===void 0?r:{width:i.w,height:i.h})}for(let n of e.model.nodes){if(n.image===void 0||n.type!==void 0&&e.typeRegistry.resolve(n.type).cornerBadge===!0)continue;let r=e.layout?.sizes?.[n.id],i=r===void 0?{width:ie.w,height:ie.h}:{width:r.w,height:r.h},a=n.name??n.id;t.set(n.id,{...i,width:Math.max(i.width,Bre(a)),...a===``?{}:{reserveBottom:20}})}for(let n of e.model.nodes){if(n.shape===void 0)continue;let r=e.layout?.sizes?.[n.id];r!==void 0&&t.set(n.id,{width:r.w,height:r.h})}for(let n of e.model.nodes){if(n.image!==void 0||n.shape!==void 0)continue;let r=n.rich===void 0?n.name:me(n.rich);n.rich===void 0&&!r.includes(`
43
+ ... Falling back to non-web worker version.`);if(!r.workerFactory){var o=e("./elk-worker.min.js").Worker;r.workerFactory=function(e){return new o(e)}}return l(this,n,[r])}return m(n,t),a(n)}(e("./elk-api.js").default);Object.defineProperty(t.exports,"__esModule",{value:!0}),t.exports=g,g.default=g},{"./elk-api.js":1,"./elk-worker.min.js":2,"web-worker":4}],4:[function(e,t,n){t.exports=typeof Worker<`u`?Worker:void 0},{}]},{},[3])(3)})}))(),1),L_={TITLE_STRIP_W:28,LANE_STRIP_W:28,LANE_MIN_W:320,LANE_MIN_H:120,PAD:24};function Zre(e,t,n,r){if(!n.nodes.some(e=>e.type===`activity-frame`))return e;let i=new Map(n.nodes.map(e=>[e.id,e.type])),a=new Map(e),o=L_,s=e=>{let t=e.children.filter(e=>i.get(e.id)===`activity-lane`&&a.has(e.id));if(t.length===0){let t=a.get(e.id);a.set(e.id,{...t,width:Math.max(t.width,o.TITLE_STRIP_W+o.LANE_MIN_W),height:Math.max(t.height,o.LANE_MIN_H)});return}let n=[],s=o.LANE_MIN_W;for(let e of t){let t=0,i=0;for(let n of e.children){let e=a.get(n.id);e!==void 0&&(t=Math.max(t,e.x+e.width),i=Math.max(i,e.y+e.height))}let c=r?.[e.id];n.push(Math.max(o.LANE_MIN_H,i+o.PAD,c?.h??0)),s=Math.max(s,t+o.PAD,c?.w??0)}let c=0;t.forEach((e,t)=>{let r=a.get(e.id);a.set(e.id,{...r,x:o.TITLE_STRIP_W,y:c,width:s,height:n[t]}),c+=n[t]});let l=a.get(e.id);a.set(e.id,{...l,width:o.TITLE_STRIP_W+s,height:c})},c=e=>{i.get(e.id)===`activity-frame`&&a.has(e.id)&&s(e),e.children.forEach(c)};return t.roots.forEach(c),a}var R_={width:200,height:88};function Qre(e){return{width:e.width,height:e.height+(e.reserveBottom??0)}}var z_=`layered`,$re=new Set([`force`,`stress`,`mrtree`,`radial`]);function eie(e){return $re.has(e?.algorithm??`layered`)}function tie(e){let t=e?.algorithm??`layered`,n=e?.spacing,r=n===void 0?`40`:String(n),i=r,a={"elk.algorithm":t,"elk.direction":e?.direction??`DOWN`,"elk.spacing.nodeNode":r,"elk.spacing.edgeNode":`20`,"elk.spacing.edgeEdge":`12`,"elk.spacing.componentComponent":`48`,"elk.spacing.edgeLabel":`6`,"elk.separateConnectedComponents":`true`,...eie(e)?{}:{"elk.hierarchyHandling":`INCLUDE_CHILDREN`}};return t===`layered`&&(a[`elk.layered.spacing.nodeNodeBetweenLayers`]=i,a[`elk.layered.thoroughness`]=`10`,a[`elk.layered.crossingMinimization.strategy`]=`LAYER_SWEEP`,a[`elk.layered.nodePlacement.strategy`]=`BRANDES_KOEPF`,a[`elk.layered.nodePlacement.bk.fixedAlignment`]=`BALANCED`,e?.aspectRatio!==void 0&&(a[`elk.layered.wrapping.strategy`]=`MULTI_EDGE`,a[`elk.aspectRatio`]=String(e.aspectRatio))),t===`stress`&&(a[`elk.stress.desiredEdgeLength`]=`240`),(t===`layered`||e?.edgeRouting===`orthogonal`)&&(a[`elk.edgeRouting`]=`ORTHOGONAL`),a}function B_(e){let t=new Map,n=(e,r)=>{t.set(e.id,r),e.children.forEach(t=>n(t,e.id))};e.roots.forEach(e=>n(e,null));let r=e=>{let n=[],r=e;for(;r!=null;)n.push(r),r=t.get(r);return n.reverse()},i=new Map;for(let t of e.layoutEdges){let e=r(t.from),n=r(t.to);if(e.length===0||n.length===0)continue;let a=0;for(;a<e.length&&a<n.length&&e[a]===n[a];)a++;let o=a===0?null:e[a-1],s=e[a],c=n[a];if(s===void 0||c===void 0||s===c)continue;let l=i.get(o)??[];l.push({id:t.id,sources:[s],targets:[c]}),i.set(o,l)}return i}var V_={top:36,left:16,bottom:16,right:16},nie={top:L_.PAD,left:L_.LANE_STRIP_W+L_.PAD,bottom:L_.PAD,right:L_.PAD},H_={top:0,left:L_.TITLE_STRIP_W,bottom:0,right:0};function U_(e){return e.node.type===`activity-lane`?nie:e.node.type===`activity-frame`?H_:V_}var W_=e=>`[top=${e.top}.0,left=${e.left}.0,bottom=${e.bottom}.0,right=${e.right}.0]`,G_=W_({top:0,left:0,bottom:0,right:0});function rie(e,t){let n=e?.spacing??40;return t?n:Math.round(n*1.2)}function K_(e){return Object.fromEntries(Object.entries(e).filter(([e])=>e.includes(`.spacing.`)))}var q_=6,J_=12,iie=18;function Y_(e){return e.labels!==void 0&&e.labels.length>0?e.labels.reduce((e,t)=>t.text.length>e.length?t.text:e,``):e.label??``}var X_={"elk.edgeLabels.inline":`true`};function A(e){let t=e.trim();if(t===``)return;let n=Math.min([...t].length,24);return{width:Math.round(n*q_+J_),height:iie}}var Z_=`activity-start`,Q_=`note-link`;function aie(e){let t=e=>e.node.type===Z_||e.children.some(t);return e.roots.some(t)}function $_(e,t,n,r){let i=r?.substitute,a=r?.partitions!==void 0&&r.partitions.size>0?r.partitions:void 0,o={...tie(n),...i===void 0?{}:{"elk.padding":G_},...a===void 0?{}:{"elk.partitioning.activate":`true`}},s=(n?.algorithm??`layered`)===`layered`&&aie(e),c=s?{"elk.layered.cycleBreaking.strategy":`DEPTH_FIRST`}:{};Object.assign(o,c);let l=eie(n)&&r?.flat!==!0,u=l?B_(e):void 0,d=l?o:{...K_(o),...c},f=e=>({...d,"elk.padding":W_(U_(e))}),p=!1,m=new Set,h=e=>{m.add(e.id);let n=i?.prelaid.get(e.id);if(n!==void 0)return{id:e.id,width:n.width,height:n.height};let r=i?.packs.get(e.id);if(r!==void 0)return{id:e.id,children:[...e.children.filter(e=>!r.members.has(e.id)).map(h),{id:r.id,width:r.width,height:r.height}],layoutOptions:f(e)};if(e.state===`expanded`){let t=u?.get(e.id),n=t!==void 0&&t.length>0;return n&&(p=!0),{id:e.id,children:e.children.map(h),layoutOptions:f(e),...n?{edges:t}:{}}}if(e.state===`collapsed`){let n=t?.get(e.id)??R_;return{id:e.id,width:n.width,height:n.height}}return{id:e.id,...Qre(t?.get(e.id)??Or),...s&&e.node.type===Z_?{layoutOptions:{"elk.layered.layering.layerConstraint":`FIRST`}}:{}}},g=e=>{let t=a?.get(e.id);return t===void 0?e:{...e,layoutOptions:{...e.layoutOptions,"elk.partitioning.partition":String(t)}}},_=(i?.roots??e.roots).map(e=>g(h(e))),v=new Set,y=l?u?.get(null)??[]:e.layoutEdges.filter(e=>e.from!==e.to&&(i===void 0||m.has(e.from)&&m.has(e.to))).map(e=>{let t=Y_(e).trim(),n=A(t),r=s&&e.kind===Q_;return r&&v.add(e.id),{id:e.id,sources:[r?e.to:e.from],targets:[r?e.from:e.to],...n===void 0?{}:{labels:[{...n,text:t,layoutOptions:X_}]}}}),b=p||l&&(()=>{let t=new Map(e.layoutEdges.map(e=>[e.id,e]));return y.some(e=>{let n=t.get(e.id);return n===void 0||e.sources[0]!==n.from||e.targets[0]!==n.to})})();return{graph:{id:ae,layoutOptions:o,children:_,edges:y},lifted:b,reversed:v}}var ev=Symbol(`outside`);function oie(e){let t=new Map,n=(e,r)=>{let i=[...r,e.id];t.set(e.id,i),e.state===`expanded`&&e.children.forEach(e=>n(e,i))};e.roots.forEach(e=>n(e,[]));let r=new Map,i=(e,t,n)=>{let i=r.get(e)??[];i.push([t,n]),r.set(e,i)};for(let n of e.layoutEdges){let e=t.get(n.from),r=t.get(n.to);if(e===void 0||r===void 0||n.from===n.to)continue;let a=0;for(;a<e.length&&a<r.length&&e[a]===r[a];)a++;let o=a<e.length&&a<r.length;o&&i(a===0?null:e[a-1],e[a],r[a]);let s=o?a:a-1;for(let t of[e,r])for(let e=s;e<t.length-1;e++)i(t[e],t[e+1],ev)}let a=new Map,o=(e,t)=>{if(t.length>=2){let n=new Map,i=e=>{let t=e;for(;n.get(t)!==void 0&&n.get(t)!==t;)t=n.get(t);return t};for(let[t,a]of r.get(e)??[])n.set(i(t),i(a));let o=i(ev),s=[],c=new Map;for(let e of t){let t=i(e.id);t===o?s.push(e):c.set(t,[...c.get(t)??[],e])}c.size>=2&&a.set(e,{attached:s,detached:[...c.values()]})}for(let e of t)e.state===`expanded`&&o(e.id,e.children)};return o(null,e.roots),{levels:a}}var sie=.35,tv=1.25;function nv(e,t,n,r){let i=Array(e.length),a=0,o=0,s=0,c;for(let l of t){let t=e[l];if(c!==void 0&&t.width<=c.width&&c.used+n+t.height<=o){i[l]={x:c.x,y:a+c.used+n,...t},c.used+=n+t.height;continue}let u=c===void 0?0:c.x+c.width+n;c!==void 0&&u+t.width>r&&(a+=o+n,o=0,u=0),i[l]={x:u,y:a,...t},c={x:u,width:t.width,used:t.height},o=Math.max(o,t.height),s=Math.max(s,u+t.width)}return{boxes:i,width:s,height:a+o}}function rv(e,t,n){let r=Array.from({length:n},(t,r)=>Math.max(...e.filter((e,t)=>t%n===r).map(e=>e.width))),i=r.map((e,n)=>r.slice(0,n).reduce((e,n)=>e+n+t,0)),a=[],o=0;for(let s=0;s*n<e.length;s++){let c=e.slice(s*n,(s+1)*n);c.forEach((e,t)=>a.push({x:i[t]+(r[t]-e.width)/2,y:o,...e})),o+=Math.max(...c.map(e=>e.height))+t}return{boxes:a,width:i[n-1]+r[n-1],height:o-t}}function iv(e,t){if(e.length===0)return{boxes:[],width:0,height:0};let n=t.aspect??.75,r=e=>Math.abs(Math.log(e.width/e.height/n));if(Math.max(...e.map(e=>e.height))<=Math.min(...e.map(e=>e.height))*tv){let n;for(let i=1;i<=e.length;i++){let a=rv(e,t.gap,i),o=r(a)+(e.length%i===0?0:sie);(n===void 0||o<n.score-1e-9)&&(n={...a,score:o})}return{boxes:n.boxes,width:n.width,height:n.height}}let i=e.map((e,t)=>t).sort((t,n)=>e[n].height-e[t].height||t-n),a=e.map(e=>e.width),o=Math.max(...a),s=new Set,c=0;for(let n of i)c+=(c===0?0:t.gap)+e[n].width,s.add(Math.max(c,o));let l;for(let n of s){let a=nv(e,i,t.gap,n),o=r(a);(l===void 0||o<l.score-1e-9||Math.abs(o-l.score)<=1e-9&&a.width*a.height<l.width*l.height)&&(l={boxes:a.boxes,width:a.width,height:a.height,score:o})}return{boxes:l.boxes,width:l.width,height:l.height}}var av=200,ov=.5;function sv(e,t){let n=!1;for(let r=0;r<av;r++){let r=!1;for(let n=0;n<e.length;n++)for(let i=n+1;i<e.length;i++){let a=e[n],o=e[i],s=Math.min(a.x+a.width,o.x+o.width)+t-Math.max(a.x,o.x),c=Math.min(a.y+a.height,o.y+o.height)+t-Math.max(a.y,o.y);if(!(s<=ov||c<=ov))if(r=!0,s<=c){let e=a.x+a.width/2<=o.x+o.width/2?1:-1;a.x-=e*s/2,o.x+=e*s/2}else{let e=a.y+a.height/2<=o.y+o.height/2?1:-1;a.y-=e*c/2,o.y+=e*c/2}}if(!r)break;n=!0}return n}function cv(e,t,n){let r=e=>{let a=!1;for(let t of e)t.children.length>0&&r(t.children)&&(i(t),a=!0);return sv(e.map(e=>t.get(e.id)).filter(e=>e!==void 0),n)||a},i=e=>{let n=t.get(e.id),r=e.children.map(e=>t.get(e.id)).filter(e=>e!==void 0);if(n===void 0||r.length===0)return;let i=U_(e),a=Math.min(...r.map(e=>e.x)),o=Math.min(...r.map(e=>e.y));for(let e of r)e.x+=i.left-a,e.y+=i.top-o;n.width=Math.max(n.width,Math.max(...r.map(e=>e.x+e.width))+i.right),n.height=Math.max(n.height,Math.max(...r.map(e=>e.y+e.height))+i.bottom)};return r(e.roots)}var lv=e=>{let t=e?.direction??`DOWN`;return t===`RIGHT`||t===`LEFT`};function uv(e,t){if(!lv(t))return;let n=new Map,r=new Set,i=e=>e.node.type===`activity-frame`&&e.state===`expanded`&&e.children.length>0&&e.children.every(e=>e.node.type===`activity-lane`&&e.state!==`collapsed`),a=e=>i(e)?(n.set(e.id,{lanes:e.children.map(e=>({id:e.id,members:e.children.map(e=>e.id)}))}),e.children.forEach(e=>r.add(e.id)),{...e,children:e.children.flatMap(e=>e.children.map(a))}):e.children.length===0?e:{...e,children:e.children.map(a)},o=e.roots.map(a);if(n.size===0)return;let s=new Set,c=(e,t)=>{let r=t||n.has(e.id);r&&s.add(e.id),e.children.forEach(e=>c(e,r))};e.roots.forEach(e=>c(e,!1));let l=new Set(e.layoutEdges.filter(e=>s.has(e.from)||s.has(e.to)).map(e=>e.id)),u=e=>!r.has(e.from)&&!r.has(e.to);return{view:{...e,roots:o,edges:e.edges.filter(u),layoutEdges:e.layoutEdges.filter(u)},frames:n,touched:l}}function dv(e,t,n,r){let i=new Map,a=L_,o=new Map,s=e=>{o.set(e.id,e),e.children.forEach(s)};n.roots.forEach(s);for(let[n,s]of t.frames){let t=e.get(n);if(t===void 0)continue;let c=s.lanes.flatMap(e=>e.members).filter(t=>e.has(t)),l=Math.min(...c.map(t=>e.get(t).x)),u=a.LANE_MIN_W,d=s.lanes.map(t=>{let n=o.get(t.id),i=n===void 0?{top:a.PAD,left:a.LANE_STRIP_W+a.PAD,bottom:a.PAD,right:a.PAD}:U_(n),s=new Map,c=t.members.filter(t=>e.has(t)).sort((t,n)=>e.get(t).y-e.get(n).y),d=c.length>0?e.get(c[0]).y:0,f=-1/0,p=0,m=0;for(let t of c){let n=e.get(t);f!==-1/0&&n.y>f+r&&(d+=n.y-f-r),f=Math.max(f,n.y+n.height);let a=n.x-l+i.left,o=n.y-d+i.top;s.set(t,{x:a,y:o}),p=Math.max(p,o+n.height),m=Math.max(m,a+n.width)}return u=Math.max(u,m+i.right),{lane:t,placed:s,height:Math.max(a.LANE_MIN_H,p+i.bottom)}}),f=0;for(let n of d){for(let[t,r]of n.placed){let n=e.get(t);i.set(t,{dx:a.TITLE_STRIP_W+r.x-n.x,dy:f+r.y-n.y}),e.set(t,{...n,x:r.x,y:r.y})}let r=e.get(n.lane.id);e.set(n.lane.id,{...r??t,x:a.TITLE_STRIP_W,y:f,width:u,height:n.height}),f+=n.height}e.set(n,{...t,width:a.TITLE_STRIP_W+u,height:f})}return i}function fv(e,t,n){let r=n.x+1,i=n.y+1,a=n.x+n.width-1,o=n.y+n.height-1;if(a<=r||o<=i)return!1;let s=0,c=1,l=t.x-e.x,u=t.y-e.y,d=[[-l,e.x-r],[l,a-e.x],[-u,e.y-i],[u,o-e.y]];for(let[e,t]of d){if(e===0){if(t<0)return!1;continue}let n=t/e;if(e<0?s=Math.max(s,n):c=Math.min(c,n),s>c)return!1}return!0}function cie(e,t,n,r,i,a){let o=new Map,s=(e,t)=>{o.set(e.id,t),e.children.forEach(t=>s(t,e.id))};r.roots.forEach(e=>s(e,null));let c=e=>{for(let t=e;t!=null;t=o.get(t))if(a.has(t))return t},l=e=>{let t=c(e);return t===void 0?{dx:0,dy:0}:a.get(t)},u=[],d=(e,t,r,a)=>{let o=i.get(e.id);if(o===void 0)return;let s=t+o.x,c=r+o.y,l=a||n.frames.has(e.id);l&&e.state!==`expanded`&&u.push({id:e.id,box:{x:s,y:c,width:o.width,height:o.height}}),e.children.forEach(e=>d(e,s,c,l))};r.roots.forEach(e=>d(e,0,0,!1));let f=new Map(r.layoutEdges.map(e=>[e.id,e]));for(let r of n.touched){let n=e.get(r),i=f.get(r);if(n===void 0||i===void 0)continue;let a=l(i.from),o=l(i.to),s=n.map(e=>({x:e.x+a.dx,y:e.y+a.dy}));if(a.dx!==o.dx||a.dy!==o.dy||u.some(({id:e,box:t})=>e!==i.from&&e!==i.to&&s.some((e,n)=>n>0&&fv(s[n-1],e,t)))){e.delete(r),t.delete(r);continue}e.set(r,s);let c=t.get(r);c!==void 0&&t.set(r,{x:c.x+a.dx,y:c.y+a.dy})}}var pv=new I_.default,mv=new Map,lie=50;function uie(e){return e===void 0?``:`!${[e.algorithm??``,e.direction??``,e.spacing??``,e.edgeRouting??``,e.aspectRatio??``].join(`,`)}`}function die(e,t,n,r){let i=[],a=e=>{i.push(`${e.id}:${e.state}`),e.children.forEach(a)};e.roots.forEach(a);let o=e.layoutEdges.map(e=>{let t=Y_(e).trim();return t===``?e.id:`${e.id}~${t.length}`}).join(`|`),s=t===void 0||t.size===0?``:`@${[...t.entries()].sort(([e],[t])=>e.localeCompare(t)).map(([e,t])=>`${e}:${t.width}x${t.height}${t.reserveBottom===void 0?``:`+${t.reserveBottom}`}`).join(`|`)}`,c=r===void 0||r.size===0?``:`%${[...r.entries()].sort(([e],[t])=>e.localeCompare(t)).map(([e,t])=>`${e}:${t}`).join(`|`)}`;return`${i.join(`|`)}#${o}${s}${uie(n)}${c}`}async function fie(e,t,n,r){let i=r?.partitions!==void 0&&r.partitions.size>0?r.partitions:void 0,a=die(e,t,n,i),o=mv.get(a);if(o)return o;let s=uv(e,n),c=s?.view??e,l=(i===void 0?await yv(c,t,n):void 0)??await Tv(c,t,n,i);if(hv(c,t,l.geometry),s!==void 0){let t=dv(l.geometry,s,e,n?.spacing??40);cie(l.routes,l.labelSpots,s,e,l.geometry,t)}if(mv.size>=lie){let e=mv.keys().next().value;e!==void 0&&mv.delete(e)}return mv.set(a,l),l}function hv(e,t,n){if(t===void 0)return;let r=e=>{let i=e.state===`leaf`?t.get(e.id)?.reserveBottom:void 0,a=n.get(e.id);i!==void 0&&a!==void 0&&n.set(e.id,{...a,height:a.height-i}),e.children.forEach(r)};e.roots.forEach(r)}function gv(e,t,n,r){let i=new Map,a=new Map,o=new Map,s=new Map,c=[],l=(e,r,a)=>{let o=r+(e.x??0),u=a+(e.y??0);if(s.set(e.id,{x:o,y:u}),e.id!==`__root__`&&n?.has(e.id)!==!0&&i.set(e.id,{x:e.x??0,y:e.y??0,width:e.width??0,height:e.height??0}),t&&e.edges!==void 0)for(let t of e.edges)c.push({e:t,ownX:o,ownY:u});e.children?.forEach(e=>l(e,o,u))};l(e,0,0);for(let{e,ownX:t,ownY:n}of c){let i=e.sections?.[0];if(i===void 0)continue;let c=(e.container===void 0?void 0:s.get(e.container))??{x:t,y:n},l=[i.startPoint,...i.bendPoints??[],i.endPoint].map(e=>({x:c.x+e.x,y:c.y+e.y}));a.set(e.id,r?.has(e.id)===!0?l.reverse():l);let u=e.labels?.[0];u?.x!==void 0&&u.y!==void 0&&o.set(e.id,{x:c.x+u.x+(u.width??0)/2,y:c.y+u.y+(u.height??0)/2})}return{geometry:i,routes:a,labelSpots:o,origins:s}}var _v=class extends Error{};function pie(e,t,n){for(let r of e.top){let i=e.geometry.get(r);i!==void 0&&e.geometry.set(r,{...i,x:i.x+t,y:i.y+n})}for(let[r,i]of e.routes)e.routes.set(r,i.map(e=>({x:e.x+t,y:e.y+n})));for(let[r,i]of e.labelSpots)e.labelSpots.set(r,{x:i.x+t,y:i.y+n})}function vv(e,t,n){for(let[r,i]of t.geometry)e.geometry.set(r,t.top.includes(r)?{...i,x:i.x+n.dx,y:i.y+n.dy}:i);for(let[r,i]of t.routes)e.routes.set(r,i.map(e=>({x:e.x+n.absX,y:e.y+n.absY})));for(let[r,i]of t.labelSpots)e.labelSpots.set(r,{x:i.x+n.absX,y:i.y+n.absY})}async function yv(e,t,n){if((n?.algorithm??`layered`)!==`layered`)return;let r=oie(e);if(r.levels.size===0)return;let i=new Set,a=e=>{i.add(e.id),e.children.forEach(a)};e.roots.forEach(a);let o={view:e,sizes:t,settings:n,plan:r,taken:i};try{let t=r.levels.get(null),n=t===void 0?await Cv(e.roots,o):await Sv(t,o);return{geometry:n.geometry,routes:n.routes,labelSpots:n.labelSpots,algorithm:z_}}catch(e){if(e instanceof _v)return;throw e}}var bv=4,xv=.4;async function Sv(e,t){let n=[];for(let r of e.detached)n.push(await Cv(r,t));let r=e.detached.every(e=>e.length===1&&e[0].state!==`expanded`),i=t.settings?.direction??`DOWN`,a=e.attached.length>0?i===`DOWN`||i===`UP`?bv:xv:t.settings?.aspectRatio,o=iv(n,{gap:rie(t.settings,r),...a===void 0?{}:{aspect:a}}),s={width:o.width,height:o.height,top:[],geometry:new Map,routes:new Map,labelSpots:new Map};return n.forEach((e,t)=>{let n=o.boxes[t];pie(e,n.x,n.y);for(let[t,n]of e.geometry)s.geometry.set(t,n);for(let[t,n]of e.routes)s.routes.set(t,n);for(let[t,n]of e.labelSpots)s.labelSpots.set(t,n);s.top.push(...e.top)}),s}async function Cv(e,t){let n=new Map,r=new Map,i=new Map,a=new Map,o=async e=>{if(e.state!==`expanded`)return;let s=t.plan.levels.get(e.id);if(s===void 0){for(let t of e.children)await o(t);return}let c=await Sv(s,t);if(s.attached.length===0){let t=U_(e);n.set(e.id,{width:c.width+t.left+t.right,height:c.height+t.top+t.bottom}),a.set(e.id,t),i.set(e.id,c);return}let l=`${ae}pack:${e.id}`;for(;t.taken.has(l);)l+=`_`;t.taken.add(l),r.set(e.id,{id:l,width:c.width,height:c.height,members:new Set(c.top)}),i.set(l,c);for(let e of s.attached)await o(e)};for(let t of e)await o(t);if(e.length===1&&(e[0].state!==`expanded`||n.has(e[0].id))){let r=e[0],o=t.sizes?.get(r.id),s=n.get(r.id)??(r.state===`collapsed`?o??R_:Qre(o??Or)),c={width:s.width,height:s.height,top:[r.id],geometry:new Map([[r.id,{x:0,y:0,width:s.width,height:s.height}]]),routes:new Map,labelSpots:new Map},l=i.get(r.id),u=a.get(r.id);return l!==void 0&&u!==void 0&&vv(c,l,{dx:u.left,dy:u.top,absX:u.left,absY:u.top}),c}let s={roots:e,prelaid:n,packs:r},c=$_(t.view,t.sizes,t.settings,{substitute:s}),l;try{l=await pv.layout(c.graph)}catch(e){throw new _v(String(e))}let u=new Set([...r.values()].map(e=>e.id)),{geometry:d,routes:f,labelSpots:p,origins:m}=gv(l,!c.lifted,u,c.reversed),h={width:l.width??0,height:l.height??0,top:e.map(e=>e.id),geometry:d,routes:f,labelSpots:p};for(let[e,t]of i){let n=m.get(e)??{x:0,y:0},r=a.get(e);if(r!==void 0)vv(h,t,{dx:r.left,dy:r.top,absX:n.x+r.left,absY:n.y+r.top});else{let r=wv(l,e);vv(h,t,{dx:r?.x??0,dy:r?.y??0,absX:n.x,absY:n.y})}}return h}function wv(e,t){if(e.id===t)return e;for(let n of e.children??[]){let e=wv(n,t);if(e!==void 0)return e}}async function Tv(e,t,n,r){let i=n?.algorithm??`layered`,a={...n};delete a.algorithm;let o=[{settings:n,flat:!1,algorithm:i},{settings:n,flat:!0,algorithm:i}];i!==`layered`&&o.push({settings:a,flat:!1,algorithm:z_});let s,c=!1,l=new Set,u=i,d;for(let n of o){let i=$_(e,t,n.settings,{...n.flat?{flat:!0}:{},...r===void 0?{}:{partitions:r}});try{s=await pv.layout(i.graph),c=i.lifted,l=i.reversed,u=n.algorithm;break}catch(e){d=e}}if(s===void 0)throw d;let f=!c&&(u===`layered`||n?.edgeRouting===`orthogonal`),{geometry:p,routes:m,labelSpots:h}=gv(s,f,void 0,l);return u===`stress`&&cv(e,p,n?.spacing??40)&&(m.clear(),h.clear()),{geometry:p,routes:m,labelSpots:h,algorithm:u}}function Ev(e,t,n){let r=Et(e,t),i=new Set;for(let e of n){let t=[...r.parentsOf.get(e)??[]];for(;t.length>0;){let e=t.pop();e===void 0||i.has(e)||(i.add(e),t.push(...r.parentsOf.get(e)??[]))}}return[...i]}var Dv={id:`clean`,label:`Clean`},Ov=[Dv,{id:`sketch`,label:`Sketch`,rough:{roughness:1.15,bowing:1,strokeWidth:1.5,fillStyle:`solid`},fontFamily:`'Kalam', system-ui, sans-serif`,colorMix:{fill:14,stroke:100}},{id:`hand-drawn`,label:`Hand-drawn`,rough:{roughness:.9,bowing:.8,strokeWidth:1.2,fillStyle:`hachure`,fillWeight:.8,hachureGap:5,hatchOpacity:.45},cornerRadius:14,fontFamily:`'Caveat', 'Kalam', cursive`,colorMix:{fill:22,stroke:85}},{id:`pencil`,label:`Pencil`,rough:{roughness:.3,bowing:.1,strokeWidth:1.4,fillStyle:`hachure`,fillWeight:.55,hachureGap:5,hatchOpacity:.5},cornerRadius:16,fontFamily:`'Caveat', 'Kalam', cursive`,colorMix:{fill:22,stroke:85}},{id:`blueprint`,label:`Blueprint`,fontFamily:`ui-monospace, 'Cascadia Mono', 'Source Code Pro', monospace`,cssVars:{"--dg-canvas-bg":`#0d2740`,"--dg-surface":`#0d2740`,"--dg-node-fill":`#103052`,"--dg-node-stroke":`#9ec8e8`,"--dg-group-fill":`#0f2c4a`,"--dg-group-stroke":`#5f8ab0`,"--dg-text":`#e4f1fb`,"--dg-text-muted":`#8fb3cf`,"--dg-border":`#2a4a6b`,"--dg-edge":`#9ec8e8`,"--dg-edge-label-bg":`#103052`}},{id:`marker`,label:`Marker`,rough:{roughness:1.6,bowing:1.2,strokeWidth:2.5,fillStyle:`zigzag`,fillWeight:1.8,hachureGap:7,hatchOpacity:.25},cornerRadius:8,fontFamily:`'Kalam', system-ui, sans-serif`,colorMix:{fill:28,stroke:100}}],mie=e=>Ov.find(t=>t.id===e)??Dv,hie=e=>Ov.some(t=>t.id===e);function kv(e){let t;for(let n of e){if(n===void 0)return;if(t===void 0)t=n;else if(t!==n)return}return t}function gie(e){let t=new Map;for(let n of e){let e=`${n.from}\0${n.to}`,r=t.get(e);if(r===void 0){t.set(e,{from:n.from,to:n.to,polarity:n.polarity,edgeIds:[n.id]});continue}r.edgeIds.push(n.id),r.polarity=kv([r.polarity,n.polarity])}return t}function _ie(e){let t=0;for(let n of e){if(n.polarity===void 0)return`unknown`;n.polarity===`-`&&t++}return t%2==0?`R`:`B`}function vie(e,t){return{key:e.join(`→`),nodes:[...e],edgeIds:t.flatMap(e=>e.edgeIds),kind:_ie(t)}}var Av=(e,t)=>e<t?-1:+(e>t);function j(e,t){let n=t?.maxLength??20,r=t?.maxLoops??50,i=t?.budget??2e5,a=[...gie(e).values()],o=new Set;for(let e of a)o.add(e.from),o.add(e.to);let s=[...o].sort(Av),c=new Map(s.map((e,t)=>[e,t])),l=s.length,u=Array.from({length:l},()=>[]),d=[];for(let e of a){if(e.from===e.to){d.push(e);continue}let t=c.get(e.from),n=c.get(e.to);t===void 0||n===void 0||u[t]?.push({to:n,arc:e})}for(let e of u)e.sort((e,t)=>e.to-t.to);d.sort((e,t)=>Av(e.from,t.from));let f=[],p=0,m=!1;for(let e of d)f.push(vie([e.from],[e]));let h=[],g=[],_=new Set;function v(e,t){if(m)return;let r=u[t];if(r!==void 0)for(let{to:t,arc:a}of r){if(p>=i){m=!0;return}if(p++,t===e){h.length>=2&&f.push(vie(h,[...g,a]));continue}if(t>e&&!_.has(t)&&h.length<n){let n=s[t];if(n===void 0)continue;if(_.add(t),h.push(n),g.push(a),v(e,t),g.pop(),h.pop(),_.delete(t),m)return}}}for(let e=0;e<l&&!m;e++){let t=s[e];t!==void 0&&(h.length=0,g.length=0,_.clear(),h.push(t),_.add(e),v(e,e))}return f.sort((e,t)=>e.nodes.length-t.nodes.length||Av(e.key,t.key)),{loops:f.slice(0,r),truncated:m||f.length>r}}var yie=e=>({x:e.x+e.width/2,y:e.y+e.height/2}),bie=6;function xie(e,t,n){let r=[{x:e,y:t}],i=Math.max(24,n);for(let n=1;n<=bie;n++){let a=n*i,o=Math.max(4,Math.floor(2*Math.PI*a/i));for(let n=0;n<o;n++){let i=-Math.PI/2+2*Math.PI*n/o;r.push({x:e+Math.cos(i)*a,y:t+Math.sin(i)*a})}}return r}function Sie(e,t,n){let r=Math.max(n.x,Math.min(e.x,n.x+n.width)),i=Math.max(n.y,Math.min(e.y,n.y+n.height)),a=e.x-r,o=e.y-i;return a*a+o*o<t*t}var Cie=1e-6;function wie(e){if(e.length<3)return`none`;let t=0;for(let n=0;n<e.length;n++){let r=e[n],i=e[(n+1)%e.length];r===void 0||i===void 0||(t+=r.x*i.y-i.x*r.y)}return t/=2,Math.abs(t)<Cie?`none`:t>0?`cw`:`ccw`}function Tie(e,t,n){let r=n?.labelRadius??15,i=n?.minLabelGap??36,a=n?.nodeMargin??8,o=n?.obstacles??[...t.values()],s=r+a,c=i*i,l=[...e.filter(e=>e.nodes.every(e=>t.has(e)))].sort((e,t)=>e.nodes.length-t.nodes.length||Av(e.key,t.key)),u=[],d=[];for(let e of l){let n=e.nodes.map(e=>t.get(e)).filter(e=>e!==void 0).map(yie);if(n.length===0)continue;let r=n.reduce((e,t)=>e+t.x,0)/n.length,a=n.reduce((e,t)=>e+t.y,0)/n.length,l=wie(n),f={x:r,y:a};for(let e of xie(r,a,i))if(!o.some(t=>Sie(e,s,t))&&!d.some(t=>{let n=t.x-e.x,r=t.y-e.y;return n*n+r*r<c})){f=e;break}d.push(f),u.push({key:e.key,kind:e.kind,x:f.x,y:f.y,direction:l})}return u}function jv(e){let t=new Map(e.map(e=>[e.id,e])),n=new Set;function r(e){let i=t.get(e);if(i===void 0)return{x:0,y:0};if(i.parentId===void 0||n.has(e))return i.position;n.add(e);let a=r(i.parentId);return n.delete(e),{x:i.position.x+a.x,y:i.position.y+a.y}}let i=new Map;for(let t of e){let e=t.measured?.width,n=t.measured?.height;if(e===void 0||n===void 0)continue;let a=r(t.id);i.set(t.id,{x:a.x,y:a.y,width:e,height:n})}return i}var Mv=48,Nv=Mv/2,Pv=15,Eie=`M ${Nv} ${Nv-Pv} A ${Pv} ${Pv} 0 1 1 ${Nv-Pv} ${Nv}`;function Fv({placement:e,rough:t,active:n,dimmed:r,onSelect:i}){let a=(0,v.useMemo)(()=>t===void 0?null:wg(Nv,Nv,Pv*2,yg(e.key),t),[e.key,t]),o=e.kind===`unknown`?`?`:e.kind,s=e.kind!==`unknown`&&e.direction!==`none`,c=`dg-loop-arrow-${e.key.replace(/[^a-zA-Z0-9_-]/g,`_`)}`;return(0,D.jsx)(`div`,{className:`dg-loop-badge${n?` active`:``}${r?` dimmed`:``}`,"data-kind":e.kind,role:`button`,"aria-pressed":n,title:`Highlight this loop`,onClick:e=>{e.stopPropagation(),i?.()},style:{position:`absolute`,transform:`translate(${e.x-Nv}px, ${e.y-Nv}px)`,pointerEvents:`auto`},children:(0,D.jsxs)(`svg`,{width:Mv,height:Mv,viewBox:`0 0 ${Mv} ${Mv}`,"aria-hidden":`true`,children:[s&&(0,D.jsx)(`defs`,{children:(0,D.jsx)(`marker`,{id:c,viewBox:`0 0 10 10`,refX:`5`,refY:`5`,markerWidth:`6`,markerHeight:`6`,orient:`auto-start-reverse`,children:(0,D.jsx)(`path`,{d:`M0,0 L10,5 L0,10 z`,fill:`var(--dg-text-muted)`})})}),a===null?(0,D.jsx)(`circle`,{className:`dg-loop-badge-circle`,cx:Nv,cy:Nv,r:Pv}):(0,D.jsxs)(D.Fragment,{children:[a.fill===``?(0,D.jsx)(`circle`,{className:`dg-loop-badge-fill`,cx:Nv,cy:Nv,r:Pv}):(0,D.jsx)(`path`,{className:`dg-loop-badge-fill`,d:a.fill}),(0,D.jsx)(`path`,{className:`dg-loop-badge-circle`,d:a.stroke})]}),s&&(0,D.jsx)(`path`,{className:`dg-loop-badge-arc`,d:Eie,markerEnd:`url(#${c})`,...e.direction===`ccw`?{style:{transform:`scale(-1,1)`,transformOrigin:`${Nv}px ${Nv}px`}}:{}}),(0,D.jsx)(`text`,{x:Nv,y:Nv,textAnchor:`middle`,dominantBaseline:`central`,children:o})]})})}function Die({edges:e,rough:t,nodeFilter:n}){let{loops:r}=(0,v.useMemo)(()=>j(e),[e]),i=(0,v.useMemo)(()=>n==null?r:r.filter(e=>e.nodes.includes(n)),[r,n]),a=(0,v.useMemo)(()=>new Map(i.map(e=>[e.key,e])),[i]),o=(0,v.useContext)(ah),s=Km(),c=(0,v.useMemo)(()=>jv(s),[s]),l=(0,v.useMemo)(()=>s.filter(e=>e.data.state!==`expanded`).map(e=>c.get(e.id)).filter(e=>e!==void 0),[s,c]);return(0,D.jsx)(Gm,{children:(0,D.jsx)(`div`,{className:`dg-loop-layer`,children:(0,v.useMemo)(()=>Tie(i,c,{obstacles:l,labelRadius:Nv,minLabelGap:56}),[i,c,l]).map(e=>{let n=a.get(e.key);return(0,D.jsx)(Fv,{placement:e,rough:t,active:o.activeKey===e.key,dimmed:o.active&&o.activeKey!==e.key,...n===void 0?{}:{onSelect:()=>o.toggle(e.key,n.nodes,n.edgeIds)}},e.key)})})})}var Oie=4;function kie({model:e,plane:t}){let n=Km(),r=(0,v.useMemo)(()=>jv(n),[n]);return(0,D.jsx)(Gm,{children:(0,D.jsx)(`svg`,{className:`dg-git-lanes`,"aria-hidden":`true`,children:(0,v.useMemo)(()=>{let n=yh(e,t),i=bh(e,t),{MARGIN:a,LABEL_W:o}=_h,s=[];for(let t of n.lanes){let c=It(n,t.id),l=r.get(t.id);if(c===void 0||l===void 0||Nt(e,c.id))continue;let u=r.get(c.id);if(u===void 0)continue;let d=u.x+u.width+Oie,f=l.x+l.width-a-o;f<=d||s.push({id:t.id,x1:d,x2:f,y:u.y+u.height/2,color:i.get(t.id)})}return s},[e,t,r]).map(e=>(0,D.jsx)(`line`,{className:`dg-git-tail`,x1:e.x1,y1:e.y,x2:e.x2,y2:e.y,stroke:e.color??`var(--dg-edge)`},e.id))})})}var Aie=[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],jie=3,Iv=e=>((e+4)%7+7)%7,Lv=e=>Number(Mn(e).slice(0,4)),Mie=e=>Number(Mn(e).slice(5,7))-1,Nie=e=>Date.parse(`${e}T00:00:00Z`)/864e5;function Pie(e){let t=e+(3-(Iv(e)+6)%7),n=Lv(t),r=Nie(`${String(n)}-01-04`),i=r-(Iv(r)+6)%7;return Math.floor((t-i)/7)+1}var Fie=e=>{let t=Lv(e),n=Mie(e);return Nie(n===11?`${String(t+1)}-01-01`:`${String(t)}-${String(n+2).padStart(2,`0`)}-01`)};function Iie(e,t){let n=e.start-7,r=e.end+8,i=e=>Zr(e,t),a=[];for(let e=n;e<r;e=Fie(e)){let t=Math.min(Fie(e),r);a.push({x:i(e),width:i(t)-i(e),label:`${Aie[Mie(e)]} ${String(Lv(e))}`})}let o=[];for(let e=n;e<r;){let t=e+((8-Iv(e))%7||7),n=Math.min(t,r),a=n-e;o.push({x:i(e),width:a*qr.DAY,label:a>=jie?`W${String(Pie(e)).padStart(2,`0`)}`:``}),e=n}return{x0:i(n),x1:i(r),months:a,weeks:o}}function Rv(e=new Date){let t=e=>String(e).padStart(2,`0`);return`${String(e.getFullYear())}-${t(e.getMonth()+1)}-${t(e.getDate())}`}function zv(e){let t=new Map;for(let n of e){let e=`${n.from}\0${n.to}`,r=t.get(e);if(r===void 0){t.set(e,{from:n.from,to:n.to,polarity:n.polarity,edgeIds:[n.id]});continue}r.edgeIds.push(n.id),r.polarity=kv([r.polarity,n.polarity])}return[...t.values()]}function Bv(e,t){return e===void 0||t===`unknown`?`unknown`:e===`+`?t:t===`+`?`-`:`+`}function Vv(e){let t=e.has(`+`),n=e.has(`-`);return t&&n?`mixed`:e.has(`unknown`)?`unknown`:t?`+`:`-`}function Hv(e,t){let n=new Map;for(let t of e){let e=n.get(t.to);e===void 0?n.set(t.to,[t]):e.push(t)}let r=new Map([[t,0]]),i=new Map([[t,new Set([`+`])]]),a=new Map,o=[t];for(;o.length>0;){let e=[];for(let s of o){let o=r.get(s),c=i.get(s);for(let l of n.get(s)??[]){let n=l.from;if(n===t)continue;let u=o+1,d=r.get(n),f=new Set;for(let e of c)f.add(Bv(l.polarity,e));if(d===void 0||u<d)r.set(n,u),i.set(n,f),a.set(n,{node:s,edgeIds:l.edgeIds}),e.push(n);else if(u===d){let e=i.get(n);for(let t of f)e.add(t)}}}o=e}return{dist:r,signs:i,pathTo:e=>{let n=[e],r=[],i=e;for(;i!==t;){let e=a.get(i);if(e===void 0)break;r.push(...e.edgeIds),n.push(e.node),i=e.node}return{nodes:n,edgeIds:r}}}}function Uv(e,t){let n=zv(e),r=j(e).loops.filter(e=>e.nodes.includes(t)).map(e=>({key:e.key,kind:e.kind,length:e.nodes.length,nodes:e.nodes,edgeIds:e.edgeIds})).sort((e,t)=>e.length-t.length||(e.key<t.key?-1:+(e.key>t.key))),i=new Map;for(let e of r)for(let t of e.nodes)i.set(t,(i.get(t)??0)+1);let{dist:a,signs:o,pathTo:s}=Hv(n,t);return{target:t,loops:r,drivers:[...a.keys()].filter(e=>e!==t).map(e=>({id:e,distance:a.get(e),sign:Vv(o.get(e)),loopCount:i.get(e)??0,path:s(e)})).sort((e,t)=>e.distance-t.distance||t.loopCount-e.loopCount||(e.id<t.id?-1:+(e.id>t.id))),hubs:[...i.entries()].filter(([e])=>e!==t).map(([e,t])=>({id:e,loopCount:t,sign:o.has(e)?Vv(o.get(e)):`unknown`})).sort((e,t)=>t.loopCount-e.loopCount||(e.id<t.id?-1:+(e.id>t.id)))}}function Wv(e,t,n){if(t===n)return{exists:!1,sign:`unknown`,distance:0,path:{nodes:[],edgeIds:[]}};let{dist:r,signs:i,pathTo:a}=Hv(e,n);return r.has(t)?{exists:!0,sign:Vv(i.get(t)),distance:r.get(t),path:a(t)}:{exists:!1,sign:`unknown`,distance:0,path:{nodes:[],edgeIds:[]}}}function Gv(e,t){return e===`mixed`||t===`mixed`||e===`unknown`||t===`unknown`?`unknown`:(+(e===`-`)+ +(t===`-`))%2==0?`R`:`B`}function Kv(e,t,n){let r=zv(e),i=Wv(r,t,n),a=Wv(r,n,t);return{from:t,to:n,forward:i,backward:a,loop:i.exists&&a.exists?Gv(i.sign,a.sign):null}}var qv={"+":`+`,"-":`−`,mixed:`±`,unknown:`?`},Jv={"+":`dg-lev-pos`,"-":`dg-lev-neg`,mixed:`dg-lev-mixed`,unknown:`dg-lev-unknown`},Yv=e=>e===`R`?`amplifier`:e===`B`?`brake`:`unknown`,Xv=e=>e===`R`?`reinforcing`:e===`B`?`balancing`:`unclear`,Zv=10,Qv=8,$v=8;function ey({model:e,edges:t,target:n,activeFocusKey:r,onFocus:i,onClose:a,compareId:o,onClearCompare:s}){let c=(0,v.useMemo)(()=>Uv(t,n),[t,n]),l=(0,v.useMemo)(()=>o!=null&&o!==n?Kv(t,n,o):null,[t,n,o]),u=e=>e===1?`direct`:`${e} hops`,d=t=>e.nodes.find(e=>e.id===t)?.name??t,f=e=>i(r===e.key?null:e),p=e=>{let t=new Set,n=new Set;for(let r of c.loops)r.nodes.includes(e)&&(r.nodes.forEach(e=>t.add(e)),r.edgeIds.forEach(e=>n.add(e)));return{key:`hub:${e}`,nodes:[...t],edges:[...n]}},m=({focus:e,children:t})=>(0,D.jsx)(`button`,{type:`button`,className:`dg-lev-row${r===e.key?` active`:``}`,"data-focus":e.key,onClick:()=>f(e),children:t});return(0,D.jsxs)(`aside`,{className:`dg-leverage`,"aria-label":`Leverage`,children:[(0,D.jsxs)(`div`,{className:`dg-lev-head`,children:[(0,D.jsx)(`h2`,{children:`Leverage`}),(0,D.jsx)(`button`,{type:`button`,className:`dg-lev-close`,"aria-label":`Close panel`,title:`Close`,onClick:a,children:`✕`})]}),(0,D.jsx)(`p`,{className:`dg-lev-muted`,children:(0,D.jsx)(`b`,{children:d(n)})}),l!==null&&(0,D.jsxs)(`section`,{className:`dg-lev-section`,children:[(0,D.jsxs)(`div`,{className:`dg-lev-head`,children:[(0,D.jsx)(`h3`,{children:`Dependency`}),(0,D.jsx)(`button`,{type:`button`,className:`dg-lev-close`,"aria-label":`Clear comparison`,title:`Clear comparison`,onClick:s,children:`✕`})]}),(0,D.jsxs)(`p`,{className:`dg-lev-muted`,children:[(0,D.jsx)(`b`,{children:d(n)}),` ⇄ `,(0,D.jsx)(`b`,{children:d(o)})]}),!l.forward.exists&&!l.backward.exists?(0,D.jsx)(`p`,{className:`dg-lev-muted`,children:`No causal path between them.`}):(0,D.jsxs)(`div`,{className:`dg-lev-list`,children:[l.forward.exists&&(0,D.jsxs)(m,{focus:{key:`dep:fwd`,nodes:l.forward.path.nodes,edges:l.forward.path.edgeIds},children:[(0,D.jsx)(`span`,{className:`dg-lev-sign ${Jv[l.forward.sign]}`,children:qv[l.forward.sign]}),` `,d(n),` → `,d(o),` `,(0,D.jsxs)(`span`,{className:`dg-lev-muted`,children:[`· `,u(l.forward.distance)]})]}),l.backward.exists&&(0,D.jsxs)(m,{focus:{key:`dep:bwd`,nodes:l.backward.path.nodes,edges:l.backward.path.edgeIds},children:[(0,D.jsx)(`span`,{className:`dg-lev-sign ${Jv[l.backward.sign]}`,children:qv[l.backward.sign]}),` `,d(o),` → `,d(n),` `,(0,D.jsxs)(`span`,{className:`dg-lev-muted`,children:[`· `,u(l.backward.distance)]})]}),l.loop!==null&&(0,D.jsxs)(`p`,{className:`dg-lev-muted dg-lev-hint`,children:[`Together they form a`,l.loop===`unknown`?`n`:``,` `,Xv(l.loop),` loop`,l.loop===`unknown`?``:` (${l.loop})`,`.`]})]})]}),(0,D.jsxs)(`section`,{className:`dg-lev-section`,children:[(0,D.jsxs)(`h3`,{children:[`Feedback loops`,c.loops.length>0?` (${c.loops.length})`:``]}),c.loops.length===0?(0,D.jsx)(`p`,{className:`dg-lev-muted`,children:`Not part of any feedback loop.`}):(0,D.jsxs)(`div`,{className:`dg-lev-list`,children:[c.loops.slice(0,Zv).map(e=>(0,D.jsxs)(m,{focus:{key:`loop:${e.key}`,nodes:e.nodes,edges:e.edgeIds},children:[(0,D.jsx)(`span`,{className:`dg-lev-kind dg-lev-kind-${e.kind}`,children:e.kind}),` `,Yv(e.kind),` `,(0,D.jsxs)(`span`,{className:`dg-lev-muted`,children:[`· `,e.length,` vars`]})]},e.key)),c.loops.length>Zv&&(0,D.jsxs)(`p`,{className:`dg-lev-muted`,children:[`+`,c.loops.length-Zv,` more (shortest shown)`]})]})]}),(0,D.jsxs)(`section`,{className:`dg-lev-section`,children:[(0,D.jsx)(`h3`,{children:`Drivers (upstream)`}),c.drivers.length===0?(0,D.jsx)(`p`,{className:`dg-lev-muted`,children:`No upstream causes — this variable is a driver, not driven.`}):(0,D.jsxs)(`div`,{className:`dg-lev-list`,children:[c.drivers.slice(0,Qv).map(e=>(0,D.jsxs)(m,{focus:{key:`drv:${e.id}`,nodes:e.path.nodes,edges:e.path.edgeIds},children:[(0,D.jsx)(`span`,{className:`dg-lev-sign ${Jv[e.sign]}`,children:qv[e.sign]}),` `,d(e.id),` `,(0,D.jsxs)(`span`,{className:`dg-lev-muted`,children:[`· `,u(e.distance),e.loopCount>0?` · in ${e.loopCount} loop${e.loopCount>1?`s`:``}`:``]})]},e.id)),c.drivers.length>Qv&&(0,D.jsxs)(`p`,{className:`dg-lev-muted`,children:[`+`,c.drivers.length-Qv,` more`]})]})]}),c.hubs.length>0&&(0,D.jsxs)(`section`,{className:`dg-lev-section`,children:[(0,D.jsx)(`h3`,{children:`Leverage points`}),(0,D.jsx)(`p`,{className:`dg-lev-muted dg-lev-hint`,children:`Variables recurring across this one's loops — change one, move many.`}),(0,D.jsx)(`div`,{className:`dg-lev-list`,children:c.hubs.slice(0,$v).map(e=>(0,D.jsxs)(m,{focus:p(e.id),children:[(0,D.jsx)(`span`,{className:`dg-lev-sign ${Jv[e.sign]}`,children:qv[e.sign]}),` `,d(e.id),` `,(0,D.jsxs)(`span`,{className:`dg-lev-muted`,children:[`· in `,e.loopCount,` of `,d(n),`'s loops`]})]},e.id))})]})]})}var ty=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),Lie=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),Rie=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),ny=e=>{let t=Rie(e);return t.charAt(0).toUpperCase()+t.slice(1)},ry={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},zie=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},iy=(0,v.createContext)({}),ay=()=>(0,v.useContext)(iy),oy=(0,v.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>{let{size:l=24,strokeWidth:u=2,absoluteStrokeWidth:d=!1,color:f=`currentColor`,className:p=``}=ay()??{},m=r??d?Number(n??u)*24/Number(t??l):n??u;return(0,v.createElement)(`svg`,{ref:c,...ry,width:t??l??ry.width,height:t??l??ry.height,stroke:e??f,strokeWidth:m,className:ty(`lucide`,p,i),...!a&&!zie(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,v.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),sy=(e,t)=>{let n=(0,v.forwardRef)(({className:n,...r},i)=>(0,v.createElement)(oy,{ref:i,iconNode:t,className:ty(`lucide-${Lie(ny(e))}`,`lucide-${e}`,n),...r}));return n.displayName=ny(e),n},Bie=sy(`app-window`,[[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}],[`path`,{d:`M10 4v4`,key:`pp8u80`}],[`path`,{d:`M2 8h20`,key:`d11cs7`}],[`path`,{d:`M6 4v4`,key:`1svtjw`}]]),Vie=sy(`archive`,[[`rect`,{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`,key:`1wp1u1`}],[`path`,{d:`M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8`,key:`1s80jp`}],[`path`,{d:`M10 12h4`,key:`a56b0p`}]]),Hie=sy(`blocks`,[[`path`,{d:`M10 22V7a1 1 0 0 0-1-1H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-5a1 1 0 0 0-1-1H2`,key:`1ah6g2`}],[`rect`,{x:`14`,y:`2`,width:`8`,height:`8`,rx:`1`,key:`88lufb`}]]),cy=sy(`box`,[[`path`,{d:`M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z`,key:`hh9hay`}],[`path`,{d:`m3.3 7 8.7 5 8.7-5`,key:`g66t2b`}],[`path`,{d:`M12 22V12`,key:`d0xqtd`}]]),Uie=sy(`boxes`,[[`path`,{d:`M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z`,key:`lc1i9w`}],[`path`,{d:`m7 16.5-4.74-2.85`,key:`1o9zyk`}],[`path`,{d:`m7 16.5 5-3`,key:`va8pkn`}],[`path`,{d:`M7 16.5v5.17`,key:`jnp8gn`}],[`path`,{d:`M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z`,key:`8zsnat`}],[`path`,{d:`m17 16.5-5-3`,key:`8arw3v`}],[`path`,{d:`m17 16.5 4.74-2.85`,key:`8rfmw`}],[`path`,{d:`M17 16.5v5.17`,key:`k6z78m`}],[`path`,{d:`M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z`,key:`1xygjf`}],[`path`,{d:`M12 8 7.26 5.15`,key:`1vbdud`}],[`path`,{d:`m12 8 4.74-2.85`,key:`3rx089`}],[`path`,{d:`M12 13.5V8`,key:`1io7kd`}]]),ly=sy(`braces`,[[`path`,{d:`M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1`,key:`ezmyqa`}],[`path`,{d:`M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1`,key:`e1hn23`}]]),uy=sy(`brick-wall`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M12 9v6`,key:`199k2o`}],[`path`,{d:`M16 15v6`,key:`8rj2es`}],[`path`,{d:`M16 3v6`,key:`1j6rpj`}],[`path`,{d:`M3 15h18`,key:`5xshup`}],[`path`,{d:`M3 9h18`,key:`1pudct`}],[`path`,{d:`M8 15v6`,key:`1stoo3`}],[`path`,{d:`M8 3v6`,key:`vlvjmk`}]]),Wie=sy(`circle-dot`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}]]),dy=sy(`cloud`,[[`path`,{d:`M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z`,key:`p7xjir`}]]),fy=sy(`component`,[[`path`,{d:`M15.536 11.293a1 1 0 0 0 0 1.414l2.376 2.377a1 1 0 0 0 1.414 0l2.377-2.377a1 1 0 0 0 0-1.414l-2.377-2.377a1 1 0 0 0-1.414 0z`,key:`1uwlt4`}],[`path`,{d:`M2.297 11.293a1 1 0 0 0 0 1.414l2.377 2.377a1 1 0 0 0 1.414 0l2.377-2.377a1 1 0 0 0 0-1.414L6.088 8.916a1 1 0 0 0-1.414 0z`,key:`10291m`}],[`path`,{d:`M8.916 17.912a1 1 0 0 0 0 1.415l2.377 2.376a1 1 0 0 0 1.414 0l2.377-2.376a1 1 0 0 0 0-1.415l-2.377-2.376a1 1 0 0 0-1.414 0z`,key:`1tqoq1`}],[`path`,{d:`M8.916 4.674a1 1 0 0 0 0 1.414l2.377 2.376a1 1 0 0 0 1.414 0l2.377-2.376a1 1 0 0 0 0-1.414l-2.377-2.377a1 1 0 0 0-1.414 0z`,key:`1x6lto`}]]),Gie=sy(`container`,[[`path`,{d:`M22 7.7c0-.6-.4-1.2-.8-1.5l-6.3-3.9a1.72 1.72 0 0 0-1.7 0l-10.3 6c-.5.2-.9.8-.9 1.4v6.6c0 .5.4 1.2.8 1.5l6.3 3.9a1.72 1.72 0 0 0 1.7 0l10.3-6c.5-.3.9-1 .9-1.5Z`,key:`1t2lqe`}],[`path`,{d:`M10 21.9V14L2.1 9.1`,key:`o7czzq`}],[`path`,{d:`m10 14 11.9-6.9`,key:`zm5e20`}],[`path`,{d:`M14 19.8v-8.1`,key:`159ecu`}],[`path`,{d:`M18 17.5V9.4`,key:`11uown`}]]),Kie=sy(`cpu`,[[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M17 20v2`,key:`1rnc9c`}],[`path`,{d:`M17 2v2`,key:`11trls`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M2 17h2`,key:`7oei6x`}],[`path`,{d:`M2 7h2`,key:`asdhe0`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`M20 17h2`,key:`1fpfkl`}],[`path`,{d:`M20 7h2`,key:`1o8tra`}],[`path`,{d:`M7 20v2`,key:`4gnj0m`}],[`path`,{d:`M7 2v2`,key:`1i4yhu`}],[`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`2`,key:`1vbyd7`}],[`rect`,{x:`8`,y:`8`,width:`8`,height:`8`,rx:`1`,key:`z9xiuo`}]]),py=sy(`database`,[[`ellipse`,{cx:`12`,cy:`5`,rx:`9`,ry:`3`,key:`msslwz`}],[`path`,{d:`M3 5V19A9 3 0 0 0 21 19V5`,key:`1wlel7`}],[`path`,{d:`M3 12A9 3 0 0 0 21 12`,key:`mv7ke4`}]]),qie=sy(`door-open`,[[`path`,{d:`M11 20H2`,key:`nlcfvz`}],[`path`,{d:`M11 4.562v16.157a1 1 0 0 0 1.242.97L19 20V5.562a2 2 0 0 0-1.515-1.94l-4-1A2 2 0 0 0 11 4.561z`,key:`au4z13`}],[`path`,{d:`M11 4H8a2 2 0 0 0-2 2v14`,key:`74r1mk`}],[`path`,{d:`M14 12h.01`,key:`1jfl7z`}],[`path`,{d:`M22 20h-3`,key:`vhrsz`}]]),Jie=sy(`git-fork`,[[`circle`,{cx:`12`,cy:`18`,r:`3`,key:`1mpf1b`}],[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`path`,{d:`M18 9v2c0 .6-.4 1-1 1H7c-.6 0-1-.4-1-1V9`,key:`1uq4wg`}],[`path`,{d:`M12 12v3`,key:`158kv8`}]]),my=sy(`globe`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]),hy=sy(`grid-2x2`,[[`path`,{d:`M12 3v18`,key:`108xh3`}],[`path`,{d:`M3 12h18`,key:`1i2n21`}],[`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,key:`h1oib`}]]),gy=sy(`hard-drive`,[[`path`,{d:`M10 16h.01`,key:`1bzywj`}],[`path`,{d:`M2.212 11.577a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z`,key:`18tbho`}],[`path`,{d:`M21.946 12.013H2.054`,key:`zqlbp7`}],[`path`,{d:`M6 16h.01`,key:`1pmjb7`}]]),_y=sy(`layers`,[[`path`,{d:`M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z`,key:`zw3jo`}],[`path`,{d:`M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12`,key:`1wduqc`}],[`path`,{d:`M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17`,key:`kqbvx6`}]]),vy=sy(`list-ordered`,[[`path`,{d:`M11 5h10`,key:`1cz7ny`}],[`path`,{d:`M11 12h10`,key:`1438ji`}],[`path`,{d:`M11 19h10`,key:`11t30w`}],[`path`,{d:`M4 4h1v5`,key:`10yrso`}],[`path`,{d:`M4 9h2`,key:`r1h2o0`}],[`path`,{d:`M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02`,key:`xtkcd5`}]]),yy=sy(`lock-open`,[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 9.9-1`,key:`1mm8w8`}]]),Yie=sy(`lock`,[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]),Xie=sy(`mail`,[[`path`,{d:`m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7`,key:`132q7q`}],[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}]]),Zie=sy(`map-pin`,[[`path`,{d:`M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0`,key:`1r0f0z`}],[`circle`,{cx:`12`,cy:`10`,r:`3`,key:`ilqhr7`}]]),Qie=sy(`message-square`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]),$ie=sy(`minus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]),eae=sy(`monitor`,[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`,key:`1svkeh`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`,key:`vw1qmm`}]]),by=sy(`network`,[[`rect`,{x:`16`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`4q2zg0`}],[`rect`,{x:`2`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`8cvhb9`}],[`rect`,{x:`9`,y:`2`,width:`6`,height:`6`,rx:`1`,key:`1egb70`}],[`path`,{d:`M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3`,key:`1jsf9p`}],[`path`,{d:`M12 12V8`,key:`2874zd`}]]),xy=sy(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),Sy=sy(`puzzle`,[[`path`,{d:`M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z`,key:`w46dr5`}]]),Cy=sy(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),tae=sy(`server`,[[`rect`,{width:`20`,height:`8`,x:`2`,y:`2`,rx:`2`,ry:`2`,key:`ngkwjq`}],[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,ry:`2`,key:`iecqi9`}],[`line`,{x1:`6`,x2:`6.01`,y1:`6`,y2:`6`,key:`16zg32`}],[`line`,{x1:`6`,x2:`6.01`,y1:`18`,y2:`18`,key:`nzw8ys`}]]),wy=sy(`smartphone`,[[`rect`,{width:`14`,height:`20`,x:`5`,y:`2`,rx:`2`,ry:`2`,key:`1yt0o3`}],[`path`,{d:`M12 18h.01`,key:`mhygvu`}]]),nae=sy(`split`,[[`path`,{d:`M16 3h5v5`,key:`1806ms`}],[`path`,{d:`M8 3H3v5`,key:`15dfkv`}],[`path`,{d:`M12 22v-8.3a4 4 0 0 0-1.172-2.872L3 3`,key:`1qrqzj`}],[`path`,{d:`m15 9 6-6`,key:`ko1vev`}]]),rae=sy(`square-function`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`path`,{d:`M9 17c2 0 2.8-1 2.8-2.8V10c0-2 1-3.3 3.2-3`,key:`m1af9g`}],[`path`,{d:`M9 11.2h5.7`,key:`3zgcl2`}]]),Ty=sy(`table-2`,[[`path`,{d:`M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18`,key:`gugj83`}]]),iae=sy(`terminal`,[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]),Ey={database:py,postgres:py,table:Ty,user:sy(`user`,[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`,key:`975kel`}],[`circle`,{cx:`12`,cy:`7`,r:`4`,key:`17ys0d`}]]),users:sy(`users`,[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`path`,{d:`M16 3.128a4 4 0 0 1 0 7.744`,key:`16gr8j`}],[`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.87`,key:`kshegd`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]),cloud:dy,mail:Xie,service:cy,system:Uie,queue:vy,server:tae,kubernetes:Gie,infra:gy,comment:Qie,browser:my,spa:Bie,mobile:wy,desktop:eae,api:sy(`webhook`,[[`path`,{d:`M18 16.98h-5.99c-1.1 0-1.95.94-2.48 1.9A4 4 0 0 1 2 17c.01-.7.2-1.4.57-2`,key:`q3hayz`}],[`path`,{d:`m6 17 3.13-5.78c.53-.97.1-2.18-.5-3.1a4 4 0 1 1 6.89-4.06`,key:`1go1hn`}],[`path`,{d:`m12 6 3.13 5.73C15.66 12.7 16.9 13 18 13a4 4 0 0 1 0 8`,key:`qlwsc0`}]]),function:rae,cli:iae,blob:Vie,search:Cy,component:fy,interface:Sy,class:ly,node:Kie,instance:Hie,plus:xy,minus:$ie,dot:Wie,decision:Jie,environment:_y,region:Zie,zone:hy,network:by,"subnet-public":yy,"subnet-private":Yie,"load-balancer":nae,gateway:qie,firewall:uy,internet:my},aae=Object.keys(Ey);function oae(e){let t=new Map(Object.entries({...Ey,...e}));return{resolve:e=>t.get(e),register:(e,n)=>{t.set(e,n)}}}function sae({path:e,nameOf:t,onCrumb:n}){return e.length===0?null:(0,D.jsx)(Jf,{position:`top-left`,className:`dg-breadcrumbs`,children:(0,D.jsxs)(`nav`,{className:`dg-breadcrumbs-nav`,"aria-label":`Nested zoom breadcrumb`,children:[(0,D.jsx)(`button`,{type:`button`,className:`dg-crumb dg-crumb-home`,title:`Zoom out to the bird’s-eye view`,onClick:()=>n(null),children:`⌂`}),e.map((r,i)=>{let a=i===e.length-1;return(0,D.jsxs)(`span`,{className:`dg-crumb-item`,children:[(0,D.jsx)(`span`,{className:`dg-crumb-sep`,"aria-hidden":`true`,children:`›`}),(0,D.jsx)(`button`,{type:`button`,className:`dg-crumb${a?` dg-crumb-current`:``}`,...a?{"aria-current":`page`}:{},onClick:()=>n(r),children:t(r)})]},r)})]})})}function Dy(e){let t=e.filter(e=>e!==void 0);if(t.length===0)return;let n=Math.min(...t.map(e=>e.x)),r=Math.min(...t.map(e=>e.y));return{x:n,y:r,width:Math.max(...t.map(e=>e.x+e.width))-n,height:Math.max(...t.map(e=>e.y+e.height))-r}}var cae=`.react-flow__edge, .react-flow__edgelabel-renderer > *, .dg-loop-badge, .dg-image-caption, .dg-order-band-header, .dg-time-axis-frame`;function lae(e,t){if(e==null)return;let n=[];for(let r of e.querySelectorAll(cae)){let e=r.getBoundingClientRect();if(e.width===0&&e.height===0)continue;let i=t({x:e.left,y:e.top}),a=t({x:e.right,y:e.bottom});n.push({x:i.x,y:i.y,width:a.x-i.x,height:a.y-i.y})}return Dy(n)}function Oy(e,t){if(e.node.color!==void 0)return e.node.color;let n=t.nodeColors?.get(e.id);if(n!==void 0)return n;let r=t.typeColors;if(r!==void 0)return(e.node.type===void 0?void 0:r[e.node.type])??r[`*`]}function uae(e,t){let n=t.metaKeys.map(t=>e.node.metadata?.[t]).filter(e=>e!=null).map(String),r=hn(e.node.threats),i=e.node.comments?.length??0,a=e.node.links?.length??0,o=i>0||a>0?{comments:i,links:a}:void 0;return{label:e.node.name,state:e.state,promoted:e.promoted,sharedMembers:e.sharedMembers,hiddenCount:t.hiddenCounts.get(e.id)??0,metaBadges:n,typeRegistry:t.typeRegistry,icons:t.icons,...e.node.type===void 0?{}:{typeId:e.node.type},...e.node.icon===void 0?{}:{icon:e.node.icon},...Oy(e,t)===void 0?{}:{color:Oy(e,t)},...e.node.textColor===void 0?{}:{textColor:e.node.textColor},...e.node.technology===void 0?{}:{technology:e.node.technology},...e.node.rich===void 0?{}:{rich:e.node.rich},...e.node.textAlign===void 0?{}:{textAlign:e.node.textAlign},...e.node.fontScale===void 0?{}:{fontScale:e.node.fontScale},...t.onToggleExpand===void 0?{}:{onToggleExpand:t.onToggleExpand},...e.state===`leaf`?{}:{onEnterNode:t.onEnterNode},...e.external===void 0?{}:{external:!0},...t.labelEditingId===e.id?{labelEditing:!0,onLabelCommit:n=>{t.endLabelEdit?.();let r=n?.trim()??``;r!==``&&r!==e.node.name&&t.onRenameNode?.(e.id,r)},onRichCommit:n=>{t.endLabelEdit?.(),n!==null&&me(n).trim()!==``&&t.onSetNodeRich?.(e.id,n)}}:{},...e.node.image===void 0?{}:{image:e.node.image,...t.assetBase===void 0?{}:{assetBase:t.assetBase},...t.libraryBase===void 0?{}:{libraryBase:t.libraryBase},...t.editing&&t.onResize!==void 0?{onResize:t.onResize}:{}},...e.node.shape===void 0?{}:{shape:e.node.shape,...t.assetBase===void 0?{}:{assetBase:t.assetBase},...t.libraryBase===void 0?{}:{libraryBase:t.libraryBase}},...e.node.link===void 0?{}:{link:e.node.link,...t.onOpenLink===void 0?{}:{onOpenLink:t.onOpenLink}},...e.node.columns===void 0?{}:{columns:e.columns??e.node.columns},...t.editing&&e.node.type===`db-table`&&t.onSetTableColumns!==void 0?{onColumnsChange:n=>{let r=e.node.columns??[];t.onSetTableColumns?.(e.id,hr(r,e.columns??r,n))}}:{},...t.editing&&t.quickAdd!==void 0?{quickAdd:t.quickAdd}:{},...t.editing&&t.onSetRole!==void 0?{onSetRole:t.onSetRole}:{},...t.editing&&t.onAddThreat!==void 0?{onAddThreat:t.onAddThreat}:{},...t.stylePreset===void 0?{}:{stylePreset:t.stylePreset},...t.notation===void 0?{}:{notation:t.notation},...r.total>0?{threats:r}:{},...o===void 0?{}:{annotations:o},...t.nodeBadges?.get(e.id)===void 0?{}:{badges:t.nodeBadges.get(e.id)},...t.editing&&t.onResize!==void 0&&t.resizable?.(e.node)===`x`?{resizeAxis:`x`,onResize:t.onResize}:{}}}function dae(e,t){let n=e.labels??[],r=e.constituents.length===1?t?.[e.constituents[0].id]:void 0;return r===void 0?n:n.map(e=>{let t=r[e.id];if(t===void 0)return e;let{side:n,...i}=e;return{...i,t:t.t,...t.side===void 0?{}:{side:t.side}}})}function fae(e,t){let n=t.edgeColors?.get(e.id),r=e.constituents.reduce((e,t)=>{let n=hn(t.threats);return{open:e.open+n.open,total:e.total+n.total}},{open:0,total:0}),i=e.constituents.reduce((e,t)=>e+(t.comments?.length??0),0),a=i>0?{comments:i,links:0}:void 0,o={kind:e.kind,constituentCount:e.constituents.length,kindRegistry:t.kindRegistry,...e.label===void 0?{}:{label:e.label},...e.labels===void 0?{}:{labels:dae(e,t.labelMoves)},...e.tint===void 0?{}:{tint:e.tint},...e.style===void 0?{}:{relStyle:e.style},...t.stylePreset===void 0?{}:{stylePreset:t.stylePreset},...t.notation===void 0?{}:{notation:t.notation},...e.polarity===void 0?{}:{polarity:e.polarity},...e.delay===void 0?{}:{delay:e.delay},...n===void 0?{}:{notationColor:n},...r.total>0?{threats:r}:{},...a===void 0?{}:{annotations:a}},s=e.constituents.length===1?e.constituents[0]:void 0;if(s!==void 0&&(o.threatRelation=s.id),s?.fromColumn!==void 0&&(o.fromColumn=s.fromColumn),s?.toColumn!==void 0&&(o.toColumn=s.toColumn),t.editing&&s!==void 0&&(o.editableLabels=!0,o.onAddLabel=(e,n,r)=>t.onAddEdgeLabel?.(s.id,e,n,r),o.onEditLabel=(e,n)=>t.onEditEdgeLabel?.(s.id,e,n),o.onMoveLabel=(e,n,r)=>t.onMoveEdgeLabel?.(s.id,e,n,r),t.onAddThreat!==void 0)){let e=t.onAddThreat;o.onAddThreat=()=>e({relation:s.id})}if(!t.editing&&s!==void 0&&t.onViewMoveEdgeLabel!==void 0&&(o.movableLabels=!0,o.onMoveLabel=(e,n,r)=>t.onViewMoveEdgeLabel?.(s.id,e,n,r)),t.editing&&s!==void 0&&t.onSetEdgeSide!==void 0&&(o.onSetSide=(e,n)=>t.onSetEdgeSide?.(s.id,e,n),s.id===t.pinEdgeRel&&(o.pinsActive=!0)),t.editing&&s!==void 0&&t.pendingAdd?.edgeId===e.id&&(o.pendingAdd={x:t.pendingAdd.x,y:t.pendingAdd.y},o.onPendingAddConsumed=t.onPendingAddConsumed),t.routing!==void 0){let n=t.routes.get(e.id),r=t.laidAt.get(e.from),i=t.laidAt.get(e.to);if(n!==void 0&&n.length>=2&&r!==void 0&&i!==void 0){o.route=n,o.routeCorner=t.routing.corner,o.routeFrom=r,o.routeTo=i;let a=t.labelSpots.get(e.id);a!==void 0&&(o.labelSpot=a)}}return o}var ky=new WeakMap,pae=new WeakMap;function mae(e,t){return e.metaKeys===t.metaKeys&&e.hiddenCounts===t.hiddenCounts&&e.typeRegistry===t.typeRegistry&&e.icons===t.icons&&e.onOpenLink===t.onOpenLink&&e.onToggleExpand===t.onToggleExpand&&e.onEnterNode===t.onEnterNode&&e.editing===t.editing&&e.labelEditingId===t.labelEditingId&&e.endLabelEdit===t.endLabelEdit&&e.onRenameNode===t.onRenameNode&&e.onSetNodeRich===t.onSetNodeRich&&e.assetBase===t.assetBase&&e.libraryBase===t.libraryBase&&e.onResize===t.onResize&&e.onSetTableColumns===t.onSetTableColumns&&e.quickAdd===t.quickAdd&&e.onSetRole===t.onSetRole&&e.onAddThreat===t.onAddThreat&&e.stylePreset===t.stylePreset&&e.notation===t.notation&&e.nodeColors===t.nodeColors&&e.nodeBadges===t.nodeBadges&&e.resizable===t.resizable}function hae(e,t){return e.kindRegistry===t.kindRegistry&&e.editing===t.editing&&e.onAddEdgeLabel===t.onAddEdgeLabel&&e.onEditEdgeLabel===t.onEditEdgeLabel&&e.onMoveEdgeLabel===t.onMoveEdgeLabel&&e.onSetEdgeSide===t.onSetEdgeSide&&e.onAddThreat===t.onAddThreat&&e.pinEdgeRel===t.pinEdgeRel&&e.pendingAdd===t.pendingAdd&&e.onPendingAddConsumed===t.onPendingAddConsumed&&e.stylePreset===t.stylePreset&&e.notation===t.notation&&e.routing===t.routing&&e.routes===t.routes&&e.laidAt===t.laidAt&&e.labelSpots===t.labelSpots&&e.labelMoves===t.labelMoves&&e.onViewMoveEdgeLabel===t.onViewMoveEdgeLabel&&e.edgeColors===t.edgeColors}function gae(e,t){let n=ky.get(e);if(n!==void 0&&mae(n.ctx,t))return n.data;let r=uae(e,t);return ky.set(e,{ctx:t,data:r}),r}function _ae(e,t){let n=pae.get(e);if(n!==void 0&&hae(n.ctx,t))return n.data;let r=fae(e,t);return pae.set(e,{ctx:t,data:r}),r}var vae={open:`open`,mitigated:`mitigated`,accepted:`accepted`,"not-applicable":`n/a`},Ay=24,yae=240,bae=[0,20,40,60,80,100,120],jy=8,xae=28,My=2;function Ny(e,t){switch(t){case`ellipse`:return{x:e.x+16+9,y:e.y+8+9};case`group`:return{x:e.x+e.width-48-9,y:e.y+4+9};default:return{x:e.x-6+9,y:e.y-6+9}}}function Py(e){let t=[];for(let{rect:n,kind:r}of e){if(r===`box`){t.push(n);continue}let{x:e,y:i,width:a,height:o}=n;t.push({x:e,y:i,width:a,height:xae}),t.push({x:e,y:i+o-My,width:a,height:My}),t.push({x:e,y:i,width:My,height:o}),t.push({x:e+a-My,y:i,width:My,height:o})}return t}function Sae(e){return e.map(e=>({x:e.x-jy/2,y:e.y-jy/2,width:jy,height:jy}))}var Fy=(e,t)=>{let n=Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x),r=Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y);return n>0&&r>0?n*r:0},Cae=(e,t)=>{let n=Math.max(t.x-e.x,0,e.x-(t.x+t.width)),r=Math.max(t.y-e.y,0,e.y-(t.y+t.height));return Math.hypot(n,r)};function wae(e,t,n,r,i){let a=t??{x:e.x-9,y:e.y-9,width:18,height:18},{width:o,height:s}=n,c=a.y-14-s,l=a.y+a.height+14,u=a.x-14-o,d=a.x+a.width+14,f={x:0,y:-1},p={x:0,y:1},m={x:-1,y:0},h={x:1,y:0},g=[{at:{x:e.x+Ay-o,y:c},out:f},{at:{x:e.x-Ay,y:c},out:f},{at:{x:u,y:e.y-Ay},out:m},{at:{x:d,y:e.y-Ay},out:h},{at:{x:e.x+Ay-o,y:l},out:p},{at:{x:e.x-Ay,y:l},out:p},{at:{x:u,y:e.y+Ay-s},out:m},{at:{x:d,y:e.y+Ay-s},out:h}],_=[g];if(i!==void 0){let t=t=>(t.at.x+o/2-e.x)*i.x+(t.at.y+s/2-e.y)*i.y;_=[g.filter(e=>t(e)>0),g.filter(e=>t(e)<=0)]}let v,y=1/0;for(let t of _)for(let n of bae)for(let i of t){let t={x:i.at.x+i.out.x*n,y:i.at.y+i.out.y*n},a={...t,width:o,height:s};if(Cae(e,a)>yae)continue;let c=0;for(let e of r)c+=Fy(a,e);if(c===0)return t;c<y&&(v=t,y=c)}return v??g[0].at}var Tae=16,Eae=10,Iy=16,Dae=6,Oae=5,kae=24,Ly=6.2,Ry=5.6,Aae=162,zy=47,By=12,jae=22,Mae=26,Nae=13;function Pae(e,t,n,r=[],i=[]){let a=(e,t,n)=>Math.max(1,Math.ceil(e.length*n/t)),o=Tae+a(e,Aae,Ly)*Iy+Dae;for(let e of t){let t=vae[e.status??`open`],r=n||(e.description??``)!==``||(e.mitigation??``)!==``,i=220-zy-(By+t.length*Ry)-(r?jae:0);o+=a(e.title,i,Ly)*Iy+Oae}if(r.length>0){o+=Mae;for(let e of r)o+=a(e.text,220-2*Eae,Ly)*Iy+(e.by!==void 0||e.at!==void 0?Nae:0)+Oae}return i.length>0&&(o+=Mae+i.length*21),n&&(o+=kae),o}var Vy=7,Hy=12,Uy=2,Wy=11,Fae=4;function Iae(e,t){let{width:n,height:r}=t,i=[{side:`top`,gap:-e.y},{side:`bottom`,gap:e.y-r},{side:`left`,gap:-e.x},{side:`right`,gap:e.x-n}],a=i[0];for(let e of i)e.gap>a.gap&&(a=e);if(a.gap<=0)return null;let o=(e,t)=>Math.min(Math.max(t,19),e-Hy-Vy),s,c;switch(a.side){case`top`:{let t=o(n,e.x);s=[{x:t-Vy,y:Uy},{x:t+Vy,y:Uy}],c={x:t,y:Uy};break}case`bottom`:{let t=o(n,e.x);s=[{x:t-Vy,y:r-Uy},{x:t+Vy,y:r-Uy}],c={x:t,y:r-Uy};break}case`left`:{let t=o(r,e.y);s=[{x:Uy,y:t-Vy},{x:Uy,y:t+Vy}],c={x:Uy,y:t};break}default:{let t=o(r,e.y);s=[{x:n-Uy,y:t-Vy},{x:n-Uy,y:t+Vy}],c={x:n-Uy,y:t}}}let l=e.x-c.x,u=e.y-c.y,d=Math.hypot(l,u);if(d-Wy<Fae)return null;let f={x:e.x-l/d*Wy,y:e.y-u/d*Wy};return{side:a.side,base:s,tip:f}}var Gy=e=>e.stopPropagation();function Lae({data:e,positionAbsoluteX:t,positionAbsoluteY:n,width:r,height:i}){let[a,o]=(0,v.useState)(null),s=e.editing?a??e.editingId:void 0,[c,l]=(0,v.useState)(()=>new Set);(0,v.useEffect)(()=>{e.editing||o(null)},[e.editing]);let u=e.threats.filter(on).length,d=Bg({open:u,total:e.threats.length}),f=()=>{o(null),e.onEndEdit?.()},p=e=>l(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}),m=r!==void 0&&i!==void 0&&r>0&&i>0?Iae({x:e.badge.x-(t??0),y:e.badge.y-(n??0)},{width:r,height:i}):null;return(0,D.jsxs)(`div`,{className:`dg-note`,"data-target":nn(e.target),style:{width:220},children:[m!==null&&(0,D.jsx)(`svg`,{className:`dg-note-tail`,"data-side":m.side,"aria-hidden":`true`,children:(0,D.jsx)(`path`,{d:`M${m.base[0].x} ${m.base[0].y} L${m.tip.x} ${m.tip.y} L${m.base[1].x} ${m.base[1].y}`})}),(0,D.jsxs)(`div`,{className:`dg-note-head`,children:[(0,D.jsx)(`span`,{className:`dg-note-name`,children:e.name}),e.threats.length>0&&(0,D.jsx)(`span`,{className:`dg-note-count`,"data-state":d.state,title:d.title,children:`${u} / ${e.threats.length}`})]}),e.threats.length>0&&(0,D.jsx)(`ul`,{className:`dg-note-rows`,children:e.threats.map(t=>{let n=t.status??`open`,r=vae[n],i=(t.description??``)!==``||(t.mitigation??``)!==``,a=c.has(t.id)&&(e.editing||i);return(0,D.jsxs)(`li`,{className:`dg-note-row`,"data-open":on(t)?`true`:`false`,children:[(0,D.jsxs)(`div`,{className:`dg-note-line`,children:[(0,D.jsx)(`span`,{className:`dg-stride`,"data-category":t.category,title:en[t.category],children:t.category}),s===t.id?(0,D.jsx)(`span`,{className:`nodrag nopan`,onMouseDown:Gy,onPointerDown:Gy,children:(0,D.jsx)(Kg,{label:t.title,ariaLabel:`Rename threat`,onCommit:n=>{e.onRetitleThreat?.(e.target,t.id,n===null?``:n.trim()),f()}})}):(0,D.jsx)(`span`,{className:`dg-note-title`,onDoubleClick:e.editing?e=>{e.stopPropagation(),o(t.id)}:void 0,children:t.title}),e.editing&&e.onSetThreatStatus!==void 0?(0,D.jsx)(`button`,{type:`button`,className:`dg-note-status nodrag nopan`,"data-status":n,"aria-label":`Set status`,title:`Status: ${r} — click to change`,onMouseDown:Gy,onPointerDown:Gy,onClick:n=>{n.stopPropagation(),e.onSetThreatStatus?.(e.target,t.id,gn(t))},children:r}):(0,D.jsx)(`span`,{className:`dg-note-status`,"data-status":n,children:r}),(e.editing||i)&&(0,D.jsx)(`button`,{type:`button`,className:`dg-note-expand nodrag nopan`,"aria-expanded":a,"aria-label":a?`Hide details`:`Show details`,onMouseDown:Gy,onPointerDown:Gy,onClick:e=>{e.stopPropagation(),p(t.id)},children:a?`▾`:`▸`})]}),a&&(0,D.jsx)(`div`,{className:`dg-note-details`,children:e.editing&&e.onEditThreatText!==void 0?(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(Rae,{label:`Description`,value:t.description??``,onCommit:n=>e.onEditThreatText?.(e.target,t.id,`description`,n)}),(0,D.jsx)(Rae,{label:`Mitigation`,value:t.mitigation??``,onCommit:n=>e.onEditThreatText?.(e.target,t.id,`mitigation`,n)})]}):(0,D.jsxs)(D.Fragment,{children:[(t.description??``)!==``&&(0,D.jsx)(`p`,{className:`dg-note-text`,children:t.description}),(t.mitigation??``)!==``&&(0,D.jsxs)(`p`,{className:`dg-note-text`,children:[(0,D.jsx)(`span`,{className:`dg-note-text-label`,children:`Mitigation`}),` `,t.mitigation]})]})})]},t.id)})}),e.comments.length>0&&(0,D.jsxs)(`section`,{className:`dg-note-section`,"aria-label":`Comments`,children:[(0,D.jsx)(`h4`,{className:`dg-note-section-title`,children:`Comments`}),(0,D.jsx)(`ul`,{className:`dg-note-comments`,children:e.comments.map(e=>(0,D.jsxs)(`li`,{className:`dg-note-comment`,children:[(0,D.jsx)(`p`,{className:`dg-note-text`,children:e.text}),(e.by!==void 0||e.at!==void 0)&&(0,D.jsx)(`span`,{className:`dg-note-meta`,children:[e.by,e.at].filter(e=>e!==void 0).join(` · `)})]},e.id))})]}),e.links.length>0&&(0,D.jsxs)(`section`,{className:`dg-note-section`,"aria-label":`Links`,children:[(0,D.jsx)(`h4`,{className:`dg-note-section-title`,children:`Links`}),(0,D.jsx)(`ul`,{className:`dg-note-links`,children:e.links.map(t=>(0,D.jsx)(`li`,{children:(0,D.jsx)(`a`,{className:`dg-note-link nodrag nopan`,.../^https?:/.test(t.url)?{href:t.url,target:`_blank`,rel:`noopener noreferrer`}:{},onMouseDown:Gy,onPointerDown:Gy,onClick:n=>{n.stopPropagation(),e.onOpenLink!==void 0&&(n.preventDefault(),e.onOpenLink(t.url))},children:t.label})},`${t.label}\u0000${t.url}`))})]}),e.editing&&e.onAddThreat!==void 0&&(0,D.jsx)(`button`,{type:`button`,className:`dg-note-add nodrag nopan`,"aria-label":`Add a threat`,title:`Add a threat`,onMouseDown:Gy,onPointerDown:Gy,onClick:t=>{t.stopPropagation(),e.onAddThreat?.(e.target)},children:`+`})]})}function Rae({label:e,value:t,onCommit:n}){let[r,i]=(0,v.useState)(t);(0,v.useEffect)(()=>{i(t)},[t]);let a=(0,v.useRef)(!1);return(0,D.jsx)(`textarea`,{className:`dg-note-field nodrag nopan`,"aria-label":e,placeholder:e,rows:2,value:r,onMouseDown:Gy,onPointerDown:Gy,onChange:e=>i(e.target.value),onKeyDown:e=>{e.key===`Escape`&&(i(t),a.current=!0,e.target.blur())},onBlur:()=>{if(a.current){a.current=!1;return}let e=r.trim();e!==t.trim()&&n(e)}})}var zae={diagram:Are,note:Lae},Bae={diagram:Jre};function Vae(e){return{id:e.id,type:`diagram`,position:e.position,data:e.data,...e.parentId===void 0?{}:{parentId:e.parentId},...e.extent===void 0?{}:{extent:e.extent},...e.expandParent===void 0?{}:{expandParent:e.expandParent},...e.style===void 0?{}:{style:e.style},...e.zIndex===void 0?{}:{zIndex:e.zIndex},...e.draggable===void 0?{}:{draggable:e.draggable},...e.className===void 0?{}:{className:e.className}}}function Ky(e){return{id:e.id,type:`note`,position:e.position,data:e.data,...e.parentId===void 0?{}:{parentId:e.parentId},draggable:e.draggable,selectable:!1,zIndex:2}}function qy(e){return{id:e.id,source:e.source,target:e.target,type:`diagram`,...e.reconnectable===void 0?{}:{reconnectable:e.reconnectable},data:e.data}}function Jy(e){let t=e.length/2;if(t===0)return``;let n=t=>e[2*t],r=t=>e[2*t+1];if(t===1)return`M ${n(0)} ${r(0)} L ${n(0)} ${r(0)}`;if(t===2)return`M ${n(0)} ${r(0)} L ${n(1)} ${r(1)}`;let i=[`M ${n(0)} ${r(0)}`];for(let e=1;e<t-1;e++)i.push(`Q ${n(e)} ${r(e)} ${(n(e)+n(e+1))/2} ${(r(e)+r(e+1))/2}`);return i.push(`L ${n(t-1)} ${r(t-1)}`),i.join(` `)}function Hae(e,t=.75){let n=e.length/2;if(n<=2)return e;let r=Array(n).fill(!1);r[0]=!0,r[n-1]=!0;let i=[[0,n-1]];for(;i.length>0;){let[n,a]=i.pop(),o=e[2*n],s=e[2*n+1],c=e[2*a],l=e[2*a+1],u=c-o,d=l-s,f=Math.hypot(u,d),p=-1,m=t;for(let t=n+1;t<a;t++){let n=e[2*t],r=e[2*t+1],i=f===0?Math.hypot(n-o,r-s):Math.abs(d*n-u*r+c*s-l*o)/f;i>m&&(p=t,m=i)}p!==-1&&(r[p]=!0,i.push([n,p],[p,a]))}let a=[];for(let t=0;t<n;t++)r[t]&&a.push(e[2*t],e[2*t+1]);return a}function Uae(e){let t=1/0,n=1/0,r=-1/0,i=-1/0;for(let a of e){let e=(a.width??3)/2;for(let o=0;o<a.points.length;o+=2){let s=a.points[o],c=a.points[o+1];t=Math.min(t,s-e),r=Math.max(r,s+e),n=Math.min(n,c-e),i=Math.max(i,c+e)}}if(t!==1/0)return{x:t,y:n,width:r-t,height:i-n}}function Wae(e,t){let n=[],r={};for(let i of e){let e=t.get(i.id)??i.position;if(i.type!==`note`){r[i.id]=e;continue}let a=i.data;a.target===void 0||a.anchor===void 0||n.push({target:a.target,offset:{dx:Math.round(e.x-a.anchor.x),dy:Math.round(e.y-a.anchor.y)}})}return{notes:n,boxes:r}}var Yy=12;function Gae({strokes:e,live:t,visible:n,erasing:r,onErase:i}){let{x:a,y:o,zoom:s}=qm();return(0,D.jsx)(`svg`,{className:`dg-drawings`,"aria-hidden":`true`,style:n?void 0:{display:`none`},children:(0,D.jsxs)(`g`,{transform:`translate(${a} ${o}) scale(${s})`,children:[e.map(e=>(0,D.jsx)(`path`,{className:`dg-stroke`,"data-stroke-id":e.id,d:Jy(e.points),stroke:e.color??`var(--dg-ink)`,strokeWidth:e.width??3},e.id)),r&&e.map(e=>(0,D.jsx)(`path`,{className:`dg-stroke-hit`,"data-stroke-id":e.id,d:Jy(e.points),strokeWidth:Math.max(e.width??3,Yy/s),onClick:()=>i?.(e.id)},`hit-${e.id}`)),t!=null&&t.points.length>=2&&(0,D.jsx)(`path`,{className:`dg-stroke dg-stroke-live`,d:Jy(t.points),stroke:t.color??`var(--dg-ink)`,strokeWidth:t.width})]})})}var Kae=e=>e.type===`dimensions`&&e.setAttributes===!0&&e.resizing===void 0;function qae(e,t){return t||!e.some(Kae)?e:e.filter(e=>!Kae(e)&&e.type!==`position`)}var Jae=new Map,Yae=.5;function Xy(e,t,n,r=()=>!1){let i,a,o=t=>(i??e).get(t),s=(t,n)=>{i??=new Map(e),i.set(t,n)},c=e=>{if(e.children.forEach(c),e.state!==`expanded`||r(e))return;let t=o(e.id);if(t===void 0)return;let i=e.children.map(e=>o(e.id)).filter(e=>e!==void 0);if(i.length===0)return;let l=n(e),u=Math.min(...i.map(e=>e.x))-l.left,d=Math.min(...i.map(e=>e.y))-l.top,f=u<-.5?u:0,p=d<-.5?d:0;if(f!==0||p!==0){for(let t of e.children){let e=o(t.id);e!==void 0&&s(t.id,{...e,x:e.x-f,y:e.y-p})}(a??=new Map).set(e.id,{dx:f,dy:p})}let m=(e,t)=>t>e+Yae?t:e,h=m(t.width-f,Math.max(...i.map(e=>e.x+e.width))-f+l.right),g=m(t.height-p,Math.max(...i.map(e=>e.y+e.height))-p+l.bottom);(f!==0||p!==0||h!==t.width||g!==t.height)&&s(e.id,{...t,x:t.x+f,y:t.y+p,width:h,height:g})};return t.forEach(c),{geometry:i??e,shifts:a??Jae}}function Zy(e,t,n,r){return{x:e.x+(t.x-n.x)-(r?.dx??0),y:e.y+(t.y-n.y)-(r?.dy??0)}}var Qy={x:0,y:0};function $y(e,t,n,r,i=()=>!1){let a=new Map(t.map(e=>[e.id,e])),o=e=>{let t=e===void 0?void 0:a.get(e);if(t===void 0)return Qy;let n=o(t.parentId);return{x:n.x+t.position.x,y:n.y+t.position.y}},s={};for(let[t,c]of Object.entries(e)){let e=a.get(t)?.parentId,l=o(e),u=Zy(c,l,(e===void 0?void 0:n.get(e))??l,r.get(t));s[t]=e!==void 0&&i(e)?{x:Math.max(0,u.x),y:Math.max(0,u.y)}:u}return s}var eb=new Set([`left`,`centerX`,`right`]),tb=(e,t)=>{switch(t){case`left`:return e.x;case`centerX`:return e.x+e.w/2;case`right`:return e.x+e.w;case`top`:return e.y;case`middle`:return e.y+e.h/2;case`bottom`:return e.y+e.h}};function nb(e,t){if(e.length<2)return{};let n=e.map(e=>tb(e,t)),r=t===`left`||t===`top`?Math.min(...n):t===`right`||t===`bottom`?Math.max(...n):n.reduce((e,t)=>e+t,0)/n.length,i={};return e.forEach((e,a)=>{let o=r-n[a];o!==0&&(i[e.id]=eb.has(t)?{dx:o,dy:0}:{dx:0,dy:o})}),i}function rb(e,t){if(e.length<3)return{};let n=e=>t===`x`?e.x:e.y,r=e=>t===`x`?e.w:e.h,i=[...e].sort((e,t)=>n(e)-n(t)),a=i[0],o=i[i.length-1],s=(n(o)+r(o)-n(a)-i.reduce((e,t)=>e+r(t),0))/(i.length-1),c={},l=n(a)+r(a)+s;for(let e of i.slice(1,-1)){let i=l-n(e);i!==0&&(c[e.id]=t===`x`?{dx:i,dy:0}:{dx:0,dy:i}),l+=r(e)+s}return c}function ib(e,t){let n=new Set(e);return e.filter(e=>{for(let r=t(e);r!==void 0;r=t(r))if(n.has(r))return!1;return!0})}var ab={dx:0,dy:0,lines:[]};function Xae(e,t,n){let r=(e,t)=>t===`x`?[e.x,e.x+e.w/2,e.x+e.w]:[e.y,e.y+e.h/2,e.y+e.h],i=i=>{let a=r(e,i),o;for(let s of t)if(s.id!==e.id)for(let e of r(s,i))for(let t of a){let r=e-t;Math.abs(r)<=n&&(o===void 0||Math.abs(r)<Math.abs(o.d))&&(o={d:r,at:e,other:s})}return o},a=i(`x`),o=i(`y`);if(a===void 0&&o===void 0)return ab;let s=a?.d??0,c=o?.d??0,l=[];return a!==void 0&&l.push({axis:`x`,at:a.at,from:Math.min(e.y+c,a.other.y),to:Math.max(e.y+c+e.h,a.other.y+a.other.h)}),o!==void 0&&l.push({axis:`y`,at:o.at,from:Math.min(e.x+s,o.other.x),to:Math.max(e.x+s+e.w,o.other.x+o.other.w)}),{dx:s,dy:c,lines:l}}var Zae=e=>{if(e===void 0)return;let t=e.measured?.width??(typeof e.style?.width==`number`?e.style.width:void 0),n=e.measured?.height??(typeof e.style?.height==`number`?e.style.height:void 0);return t!==void 0&&n!==void 0?{width:t,height:n}:void 0};function ob(e,t,n){let r={changes:e,lines:[]},i=e.filter(e=>e.type===`position`&&e.dragging===!0&&e.position!==void 0);if(i.length!==1)return r;let a=i[0],o=t.nodes.find(e=>e.id===a.id),s=Zae(o);if(o===void 0||s===void 0||a.position===void 0)return r;let c=o.parentId===void 0?{x:0,y:0}:t.absoluteOf(o.parentId);if(c===void 0)return r;let l={id:o.id,x:c.x+a.position.x,y:c.y+a.position.y,w:s.width,h:s.height},u=[];for(let e of t.nodes){if(e.id===o.id||e.parentId!==o.parentId)continue;let n=Zae(e),r=t.absoluteOf(e.id);n===void 0||r===void 0||u.push({id:e.id,x:r.x,y:r.y,w:n.width,h:n.height})}let d=Xae(l,u,n);return d.lines.length===0?r:(a.position.x+=d.dx,a.position.y+=d.dy,a.positionAbsolute!==void 0&&(a.positionAbsolute.x+=d.dx,a.positionAbsolute.y+=d.dy),{changes:e,lines:d.lines})}function Qae(e,t,n,r){let i=e=>e.type===`position`&&e.position!==void 0,a=r.current;if(a!==null){let t=e.find(e=>i(e)&&e.dragging!==!0&&e.id===a.id);if(t?.position!==void 0)return r.current=null,t.position.x===a.x&&t.position.y===a.y&&(t.position={x:a.x+a.dx,y:a.y+a.dy}),{changes:e,lines:[]}}let o=e.filter(e=>i(e)&&e.dragging===!0),s=o.length===1?{id:o[0].id,...o[0].position}:void 0,c=ob(e,t,n),l=o.length===1?o[0].position:void 0;return r.current=s!==void 0&&l!==void 0&&c.lines.length>0?{...s,dx:l.x-s.x,dy:l.y-s.y}:null,c}function $ae({lines:e}){let{zoom:t}=qm();if(e.length===0)return null;let n=1/t,r=`${4/t} ${3/t}`;return(0,D.jsx)(Gm,{children:(0,D.jsx)(`svg`,{className:`dg-guides`,"aria-hidden":`true`,children:e.map((e,t)=>e.axis===`x`?(0,D.jsx)(`line`,{className:`dg-guide`,x1:e.at,x2:e.at,y1:e.from,y2:e.to,strokeWidth:n,strokeDasharray:r},t):(0,D.jsx)(`line`,{className:`dg-guide`,y1:e.at,y2:e.at,x1:e.from,x2:e.to,strokeWidth:n,strokeDasharray:r},t))})})}var sb=[{mode:`left`,glyph:`⇤`,label:`Align left`},{mode:`centerX`,glyph:`⇹`,label:`Align centre`},{mode:`right`,glyph:`⇥`,label:`Align right`},{mode:`top`,glyph:`⤒`,label:`Align top`},{mode:`middle`,glyph:`⇳`,label:`Align middle`},{mode:`bottom`,glyph:`⤓`,label:`Align bottom`}];function cb({ids:e,onAlign:t,onDistribute:n}){if(e.length<2)return null;let r=e.length>=3;return(0,D.jsxs)(Jf,{position:`top-center`,className:`dg-selection-toolbar`,"aria-label":`Arrange selection`,children:[sb.map(e=>(0,D.jsx)(`button`,{type:`button`,className:`dg-arrange-btn`,title:e.label,"aria-label":e.label,onClick:()=>t(e.mode),children:e.glyph},e.mode)),(0,D.jsx)(`span`,{className:`dg-arrange-sep`}),(0,D.jsx)(`button`,{type:`button`,className:`dg-arrange-btn`,title:`Distribute horizontally (3+ nodes)`,"aria-label":`Distribute horizontally`,disabled:!r,onClick:()=>n(`x`),children:`⋯`}),(0,D.jsx)(`button`,{type:`button`,className:`dg-arrange-btn`,title:`Distribute vertically (3+ nodes)`,"aria-label":`Distribute vertically`,disabled:!r,onClick:()=>n(`y`),children:`⋮`})]})}var eoe={layers:`Layers`,kinds:`Connections`,types:`Elements`,marks:`Marks`,items:`Notes`},toe=[`layers`,`kinds`,`types`,`marks`,`items`],lb=`var(--dg-node-stroke, var(--dg-border))`,ub=.75;function noe({name:e,at:t,x:n,color:r}){let i=T_[e];return i===void 0?null:(0,D.jsx)(`g`,{transform:`translate(${n} 6) scale(${t===`start`?-.75:ub} ${ub}) translate(${-i.refX} -5)`,...E_.has(e)?{stroke:r,strokeWidth:1.25,vectorEffect:`non-scaling-stroke`,fill:`none`}:{fill:r},children:i.el})}function roe({style:e,color:t}){let n=e.width??1.5,r=e.dashed===!0||e.animated===!0?`6 4`:void 0,i=e.endMarker??`arrow`,a=T_[i];return(0,D.jsxs)(`svg`,{className:`dg-legend-swatch`,viewBox:`0 0 24 12`,width:`24`,height:`12`,"aria-hidden":`true`,children:[(0,D.jsx)(`line`,{x1:`1`,y1:`6`,x2:a!==void 0&&!E_.has(i)?23-(a.refX-2)*ub:23,y2:`6`,stroke:t,strokeWidth:n,...r===void 0?{}:{strokeDasharray:r}}),e.zigzag===!0&&(0,D.jsx)(`polyline`,{points:`8,9 12.5,4.5 10.5,7.5 15,3`,fill:`none`,stroke:t,strokeWidth:1.25}),e.startMarker!==void 0&&(0,D.jsx)(noe,{name:e.startMarker,at:`start`,x:1,color:t}),(0,D.jsx)(noe,{name:i,at:`end`,x:23,color:t})]})}function ioe({s:e,stroke:t}){let n={fill:`var(--dg-surface)`,stroke:t,...e.dashed===!0?{strokeDasharray:`4 3`}:{}};switch(e.shape){case`cylinder`:return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(`ellipse`,{cx:`12`,cy:`4`,rx:`8`,ry:`3`,fill:`var(--dg-surface)`,stroke:t}),(0,D.jsx)(`path`,{d:`M4 4 v8 a8 3 0 0 0 16 0 v-8`,fill:`var(--dg-surface)`,stroke:t})]});case`pill`:return(0,D.jsx)(`rect`,{x:`2`,y:`3`,width:`20`,height:`10`,rx:`5`,...n});case`rounded`:return(0,D.jsx)(`rect`,{x:`2`,y:`3`,width:`20`,height:`10`,rx:`4.5`,...n});case`hexagon`:return(0,D.jsx)(`polygon`,{points:`6,3 18,3 22,8 18,13 6,13 2,8`,fill:`var(--dg-surface)`,stroke:t});case`bubble`:return(0,D.jsx)(`path`,{d:`M 4 3 L 20 3 Q 22 3 22 5 L 22 11 Q 22 13 20 13 L 10 13 L 6 16 L 6 13 L 4 13 Q 2 13 2 11 L 2 5 Q 2 3 4 3 Z`,...n});case`person`:return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(`path`,{d:`M5 15 v-3 a4 4 0 0 1 4 -4 h6 a4 4 0 0 1 4 4 v3 z`,...n}),(0,D.jsx)(`circle`,{cx:`12`,cy:`4.5`,r:`3`,...n})]});case`table`:return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(`rect`,{x:`2`,y:`2`,width:`20`,height:`12`,rx:`1.5`,...n}),(0,D.jsx)(`path`,{d:`M2 6.5 h20 M2 10.25 h20`,fill:`none`,stroke:t})]});case`circle`:return(0,D.jsx)(`circle`,{cx:`12`,cy:`8`,r:`5.5`,...n});case`ellipse`:return(0,D.jsx)(`ellipse`,{cx:`12`,cy:`8`,rx:`10`,ry:`5.5`,...n});case`diamond`:return(0,D.jsx)(`polygon`,{points:`12,1.5 20,8 12,14.5 4,8`,...n});case`bar`:return(0,D.jsx)(`rect`,{x:`10.5`,y:`1`,width:`3`,height:`14`,rx:`1`,fill:t});case`start-dot`:return(0,D.jsx)(`circle`,{cx:`12`,cy:`8`,r:`5`,fill:t});case`end-bullseye`:return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(`circle`,{cx:`12`,cy:`8`,r:`6`,fill:`var(--dg-surface)`,stroke:t}),(0,D.jsx)(`circle`,{cx:`12`,cy:`8`,r:`3.25`,fill:t})]});case`send-signal`:return(0,D.jsx)(`polygon`,{points:`2,3 17,3 22,8 17,13 2,13`,...n});case`receive-signal`:return(0,D.jsx)(`polygon`,{points:`2,3 22,3 22,13 2,13 7,8`,...n});case`note`:return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(`polygon`,{points:`2,2 17,2 22,7 22,14 2,14`,...n}),(0,D.jsx)(`path`,{d:`M17 2 v5 h5`,fill:`none`,stroke:t})]});case`store`:return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(`line`,{x1:`2`,y1:`3.5`,x2:`22`,y2:`3.5`,stroke:t}),(0,D.jsx)(`line`,{x1:`2`,y1:`12.5`,x2:`22`,y2:`12.5`,stroke:t})]});case`box`:return(0,D.jsx)(`rect`,{x:`2`,y:`3`,width:`20`,height:`10`,rx:`2`,...n})}}function aoe({mark:e}){let t=e===`threat-open`?Bg({open:1,total:1}):e===`threat-handled`?Bg({open:0,total:1}):void 0;return(0,D.jsx)(`span`,{className:`dg-legend-swatch dg-legend-mark`,"data-mark":e,"aria-hidden":`true`,children:t===void 0?(0,D.jsx)(`span`,{className:`dg-table-key`,children:e===`pk`?`🔑`:`FK`}):(0,D.jsx)(`span`,{className:`dg-legend-badge`,"data-state":t.state,children:t.text})})}function ooe({swatch:e,icons:t}){if(e===void 0)return(0,D.jsx)(`span`,{className:`dg-legend-swatch`,"aria-hidden":`true`});if(e.draw===`chip`)return(0,D.jsx)(`span`,{className:`dg-legend-swatch dg-legend-chip`,style:{background:e.color},"aria-hidden":`true`});if(e.draw===`mark`)return(0,D.jsx)(aoe,{mark:e.mark});if(e.draw===`line`)return(0,D.jsx)(roe,{style:e.style,color:e.color??`var(--dg-edge)`});let n=e.icon===void 0?void 0:t?.resolve(e.icon);return(0,D.jsxs)(`span`,{className:`dg-legend-swatch dg-legend-shape`,children:[(0,D.jsx)(`svg`,{viewBox:`0 0 24 16`,width:`24`,height:`16`,"aria-hidden":`true`,children:(0,D.jsx)(ioe,{s:e.style,stroke:e.color??lb})}),n!==void 0&&(0,D.jsx)(n,{size:9,className:`dg-legend-icon`})]})}function db({rows:e,title:t=`Legend`,interactive:n,onToggleLayer:r,onToggleDrawings:i,icons:a,onMeasure:o}){let[s,c]=(0,v.useState)(!1),l=(0,v.useRef)(null),u=(0,v.useRef)(null);if((0,v.useEffect)(()=>{if(o===void 0||l.current===null)return;let{width:e,height:t}=l.current.getBoundingClientRect(),n={width:Math.ceil(e),height:Math.ceil(t)},r=u.current;r!==null&&r.width===n.width&&r.height===n.height||(u.current=n,o(n))},[o,e,s]),e.length===0)return null;let d=toe.map(t=>[t,e.filter(e=>e.section===t)]).filter(([,e])=>e.length>0);return(0,D.jsxs)(`div`,{className:`dg-legend`,ref:l,children:[(0,D.jsxs)(`div`,{className:`dg-legend-head`,children:[(0,D.jsx)(`span`,{className:`dg-legend-title`,children:t}),n&&(0,D.jsx)(`button`,{type:`button`,className:`dg-legend-collapse`,"aria-label":s?`Expand legend`:`Collapse legend`,"aria-expanded":!s,onClick:()=>c(e=>!e),children:(0,D.jsx)(`span`,{"aria-hidden":`true`,children:s?`▸`:`▾`})})]}),!s&&(0,D.jsx)(`div`,{className:`dg-legend-body`,children:d.map(([e,t])=>(0,D.jsxs)(`div`,{className:`dg-legend-section`,children:[(0,D.jsx)(`div`,{className:`dg-legend-section-title`,children:eoe[e]}),t.map(e=>{let t=(0,D.jsx)(ooe,{...e.swatch===void 0?{}:{swatch:e.swatch},...a===void 0?{}:{icons:a}}),n=e.layer;return e.drawings===!0&&i!==void 0?(0,D.jsxs)(`button`,{type:`button`,className:`dg-legend-row dg-legend-toggle${e.active===!0?``:` dg-legend-off`}`,"aria-pressed":e.active===!0,onClick:i,children:[t,(0,D.jsx)(`span`,{className:`dg-legend-label`,children:e.label})]},e.id):n!==void 0&&r!==void 0?(0,D.jsxs)(`button`,{type:`button`,className:`dg-legend-row dg-legend-toggle${e.active===!0?``:` dg-legend-off`}`,"aria-pressed":e.active===!0,onClick:()=>r(n),children:[t,(0,D.jsx)(`span`,{className:`dg-legend-label`,children:e.label})]},e.id):(0,D.jsxs)(`div`,{className:`dg-legend-row${(n!==void 0||e.drawings===!0)&&e.active!==!0?` dg-legend-off`:``}`,children:[t,(0,D.jsx)(`span`,{className:`dg-legend-label`,children:e.label})]},e.id)})]},e))})]})}var fb=8,pb=[`th`,`st`,`nd`,`rd`];function mb(e){let t=e%100;return`${e}${t>=11&&t<=13?`th`:pb[e%10]??`th`}`}var hb=(e,t)=>e===0?t>1?`Decisions`:`Decision`:`${mb(e)} order`;function soe(e,t,n){let r=n===`DOWN`||n===`UP`,i=new Map,a=1/0,o=-1/0;for(let[n,s]of t){let t=e.get(n);if(t===void 0)continue;let c=r?t.y:t.x,l=r?t.y+t.height:t.x+t.width,u=i.get(s);i.set(s,u===void 0?{lo:c,hi:l}:{lo:Math.min(u.lo,c),hi:Math.max(u.hi,l)}),a=Math.min(a,r?t.x:t.y),o=Math.max(o,r?t.x+t.width:t.y+t.height)}let s=a-20-(r?96:28),c=o+20-s;return[...i.entries()].sort(([e],[t])=>e-t).map(([e,{lo:t,hi:n}])=>{let i=t-20,a=n-t+40,o=r?{x:s,y:i,width:c,height:a}:{x:i,y:s,width:a,height:c};return{order:e,...o,header:{x:o.x+fb,y:o.y+fb}}})}function gb({model:e,direction:t}){let n=Km(),r=(0,v.useMemo)(()=>Gt(e).orders,[e]),i=(0,v.useMemo)(()=>e.nodes.filter(e=>e.type===`so-decision`&&r.get(e.id)===0).length,[e,r]),a=(0,v.useMemo)(()=>soe(jv(n),r,t),[n,r,t]);return a.length===0?null:(0,D.jsx)(Gm,{children:(0,D.jsx)(`svg`,{className:`dg-order-bands`,"aria-hidden":`true`,children:a.map((e,t)=>(0,D.jsxs)(`g`,{children:[(0,D.jsx)(`rect`,{className:`dg-order-band${t%2==1?` dg-order-band-alt`:``}`,x:e.x,y:e.y,width:e.width,height:e.height,rx:6}),(0,D.jsx)(`text`,{className:`dg-order-band-header`,x:e.header.x,y:e.header.y,dominantBaseline:`hanging`,children:hb(e.order,i)})]},e.order))})})}function coe(e,t,n){let r;for(let i of t)n.has(i.id)||e.x<i.x||e.x>i.x+i.w||e.y<i.y||e.y>i.y+i.h||(r===void 0||i.w*i.h<r.w*r.h)&&(r=i);return r?.id}var _b=qr.HEADER_H/2;function loe({model:e,plane:t,today:n}){let r=Km(),i=(0,v.useMemo)(()=>jv(r),[r]),a=Xr(e,t),o=(0,v.useMemo)(()=>a.range!==void 0&&a.origin!==void 0?Iie(a.range,a.origin):void 0,[a]);if(o===void 0||a.origin===void 0||a.range===void 0)return null;let{DAY:s,HEADER_H:c,PAD:l}=qr,u=a.origin,d=0;for(let e of i.values())d=Math.max(d,e.y+e.height);d+=l;let f=new Map(e.nodes.map(e=>[e.id,e])),p=a.events.filter(e=>!a.parent.has(e)&&En(f.get(e))),m=n==null?void 0:jn(n),h=m!==void 0&&m>=a.range.start-7&&m<a.range.end+8?Zr(m,u)+s/2:void 0;return(0,D.jsx)(Gm,{children:(0,D.jsxs)(`svg`,{className:`dg-time-axis`,"aria-hidden":`true`,children:[(0,D.jsx)(`rect`,{className:`dg-time-axis-frame`,x:o.x0,y:-c,width:o.x1-o.x0,height:c}),o.months.map(e=>(0,D.jsxs)(`g`,{children:[(0,D.jsx)(`line`,{className:`dg-time-axis-tick`,x1:e.x,y1:-c,x2:e.x,y2:0}),(0,D.jsx)(`text`,{className:`dg-time-axis-month`,x:e.x+6,y:-c+_b/2,dominantBaseline:`middle`,children:e.label})]},e.x)),o.weeks.map(e=>(0,D.jsxs)(`g`,{children:[(0,D.jsx)(`line`,{className:`dg-time-axis-tick`,x1:e.x,y1:-_b,x2:e.x,y2:0}),(0,D.jsx)(`line`,{className:`dg-time-axis-grid`,x1:e.x,y1:0,x2:e.x,y2:d}),e.label!==``&&(0,D.jsx)(`text`,{className:`dg-time-axis-week`,x:e.x+4,y:-_b/2,dominantBaseline:`middle`,children:e.label})]},e.x)),p.map(e=>{let t=Pn(f.get(e));if(t===void 0)return null;let n=Zr(t,u)+s/2;return(0,D.jsx)(`line`,{className:`dg-time-axis-event`,x1:n,y1:0,x2:n,y2:d},e)}),h!==void 0&&(0,D.jsxs)(`g`,{children:[(0,D.jsx)(`line`,{className:`dg-time-axis-today`,x1:h,y1:-_b,x2:h,y2:d}),(0,D.jsx)(`text`,{className:`dg-time-axis-today-label`,x:h+4,y:-_b/2,dominantBaseline:`middle`,children:`today`})]})]})})}function uoe({enabled:e,toFlow:t,onStroke:n,simplify:r=!0}){let[i,a]=(0,v.useState)(null),o=(0,v.useRef)(null),s=(0,v.useRef)(null),c=(0,v.useCallback)(e=>{let n=o.current;if(n===null)return;let r=e.nativeEvent,i=typeof r.getCoalescedEvents==`function`?r.getCoalescedEvents():[];for(let e of i.length>0?i:[r]){let r=t({x:e.clientX,y:e.clientY});n.push(r.x,r.y)}a([...n])},[t]),l=(0,v.useCallback)(n=>{if(!e||n.button!==0||n.target?.closest?.(`.react-flow__panel`)!==null)return;if(s.current!==null){n.stopPropagation(),n.preventDefault();return}n.stopPropagation(),n.preventDefault(),n.currentTarget.setPointerCapture?.(n.pointerId),s.current=n.pointerId;let r=t({x:n.clientX,y:n.clientY});o.current=[r.x,r.y],a([r.x,r.y])},[e,t]),u=(0,v.useCallback)(e=>{s.current===e.pointerId&&(e.stopPropagation(),c(e))},[c]),d=(0,v.useCallback)((e,t)=>{if(s.current!==e.pointerId)return;e.stopPropagation();let i=o.current;if(o.current=null,s.current=null,a(null),t&&i!==null){let e=i.map(e=>Math.round(e));n(r?Hae(e):e)}},[n,r]);return{live:i,handlers:{onPointerDownCapture:l,onPointerMoveCapture:u,onPointerUpCapture:(0,v.useCallback)(e=>d(e,!0),[d]),onPointerCancelCapture:(0,v.useCallback)(e=>d(e,!1),[d])}}}var doe=1e3;function foe({enabled:e,toFlow:t}){let[n,r]=(0,v.useState)([]),i=(0,v.useRef)(0),a=(0,v.useRef)(new Set),o=(0,v.useCallback)(e=>{let t=i.current++;r(n=>[...n,{id:t,points:e}]);let n=setTimeout(()=>{a.current.delete(n),r(e=>e.filter(e=>e.id!==t))},doe);a.current.add(n)},[]);(0,v.useEffect)(()=>{let e=a.current;return()=>{for(let t of e)clearTimeout(t);e.clear()}},[]);let s=uoe({enabled:e,toFlow:t,onStroke:o,simplify:!1});return{live:s.live,trails:n,handlers:s.handlers}}function vb(e){let[t,n]=(0,v.useState)(!1),r=e.editing&&e.tool===`pen`&&e.drillRoot===void 0&&!t,i=e.editing&&e.tool===`eraser`&&e.drillRoot===void 0&&!t,a=r||t;(0,v.useEffect)(()=>{n(!1)},[e.modelId]),(0,v.useEffect)(()=>{if(e.chromeless)return;let t=t=>{let r=t.target,i=r?.tagName;i===`INPUT`||i===`TEXTAREA`||i===`SELECT`||r?.isContentEditable===!0||t.metaKey||t.ctrlKey||t.altKey||(t.key===`Escape`?n(!1):e.builtinKeys&&t.key.toLowerCase()===`l`&&!t.repeat&&(t.preventDefault(),n(e=>!e)))};return window.addEventListener(`keydown`,t),()=>window.removeEventListener(`keydown`,t)},[e.chromeless,e.builtinKeys]);let o=uoe({enabled:r&&e.onAddStroke!==void 0,toFlow:e.toFlow,onStroke:t=>e.onAddStroke?.({points:t,...e.pen?.color===void 0?{}:{color:e.pen.color},width:e.pen?.width??3})}),s=foe({enabled:t,toFlow:e.toFlow});return{laserOn:t,setLaserOn:n,penActive:r,eraserActive:i,gestureCaptured:a,pen:o,laser:s,gestureHandlers:(0,v.useMemo)(()=>{let e=e=>t=>{s.handlers[e](t),o.handlers[e](t)};return{onPointerDownCapture:e(`onPointerDownCapture`),onPointerMoveCapture:e(`onPointerMoveCapture`),onPointerUpCapture:e(`onPointerUpCapture`),onPointerCancelCapture:e(`onPointerCancelCapture`)}},[s.handlers,o.handlers])}}var yb=500,poe=40;function bb(){let e=(0,v.useRef)(null),t=(0,v.useRef)(null),n=(e,t)=>e!==null&&Date.now()-e.at<yb&&Math.hypot(t.clientX-e.clientX,t.clientY-e.clientY)<poe,r=(e,t,n)=>{e.current={id:t,clientX:n.clientX,clientY:n.clientY,at:Date.now()}};return{recordNodeClick:(t,n)=>r(e,t,n),clearNodeClick:()=>{e.current=null},consumeNodeDrill:(t,r,i)=>{let a=e.current;return a!==null&&a.id===t&&i>=2&&n(a,r)?(e.current=null,!0):!1},takePaneNodeDrill:(t,r)=>{let i=e.current;return i!==null&&r>=2&&n(i,t)?(e.current=null,i.id):null},recordEdgeClick:(e,n)=>r(t,e,n),clearEdgeClick:()=>{t.current=null},consumeEdgeAdd:(e,r)=>{let i=t.current;return i!==null&&i.id===e&&n(i,r)?(t.current=null,!0):!1},takePaneEdgeAdd:e=>{let r=t.current;return r!==null&&n(r,e)?(t.current=null,r.id):null},clearAll:()=>{e.current=null,t.current=null}}}function xb(e,t,n=[]){if(!e.has(t))return[];let r=new Set(n),i=[t],a=new Set([t]),o=t;for(;;){let t=e.get(o)??[],n=t.find(e=>r.has(e))??t[0];if(n===void 0||a.has(n))break;i.unshift(n),a.add(n),o=n}return i}function Sb(e,t){let n=e.indexOf(t);return n<0?[]:e.slice(0,n+1)}function Cb(e,t){let n=new Set(t.nodes.map(e=>e.id)),r=e.findIndex(e=>!n.has(e));return r<0?e:e.slice(0,r)}function wb(e,t){let n=t.next;return e.seen.modelId===n.modelId?e.seen.plane===n.plane?e.seen.model===n.model?e.seen.enteredPathProp===n.enteredPathProp?{seen:n,transition:`none`}:{seen:n,transition:`entered-path`}:{seen:n,transition:`model-edit`}:{seen:n,transition:`plane-switch`}:{seen:n,transition:`model-switch`}}function Tb(e){let[t,n]=(0,v.useState)([]),[r,i]=(0,v.useState)(()=>e.enteredPathProp===void 0?[]:Cb(e.enteredPathProp,e.model)),a=(0,v.useRef)([]);a.current=r;let{onEnteredPathChange:o}=e;(0,v.useEffect)(()=>{o?.(r)},[r,o]);let s=(0,v.useRef)(null),c=()=>({modelId:e.model.id,model:e.model,plane:e.plane,enteredPathProp:e.enteredPathProp}),[l,u]=(0,v.useReducer)(wb,void 0,()=>({seen:c(),transition:`none`})),d=r;if(l.seen.modelId===e.model.id?l.seen.plane===e.plane?l.seen.model!==e.model&&(u({type:`sync`,next:c()}),i(t=>Cb(t,e.model)),d=Cb(r,e.model)):(u({type:`sync`,next:c()}),n(Ev(e.model,e.plane,e.visibleRef.current)),i([]),d=[],e.onPlaneSwitch()):(u({type:`sync`,next:c()}),e.visibleRef.current=[],n([]),i([]),d=[],s.current=`jump`),l.seen.enteredPathProp!==e.enteredPathProp&&(u({type:`sync`,next:c()}),e.enteredPathProp!==void 0)){let t=Cb(e.enteredPathProp,e.model);(t.length!==d.length||t.some((e,t)=>e!==d[t]))&&(s.current??=`glide`,i(t),n([]))}let f=(0,v.useMemo)(()=>Et(e.model,e.plane),[e.model,e.plane]),p=r.length>0?r[r.length-1]:void 0,{isAlwaysExpanded:m}=e;return{enteredPath:r,drillRoot:p,focus:t,enterNode:(0,v.useCallback)(e=>{if(m(e))return;let t=xb(f.parentsOf,e,a.current);t.length!==0&&(s.current=`glide`,i(t),n([]))},[f,m]),exitTo:e=>{let t=e===null?[]:Sb(r,e);s.current=`glide`,i(t),n([])},pendingRootFitRef:s}}var moe=[`layers`,`kinds`,`marks`],hoe=new Set([`bar`,`start-dot`,`end-bullseye`]);function goe(e,t){let n=new Map(t.map((e,t)=>[e,t]));return[...e].sort((e,t)=>{let r=n.get(e),i=n.get(t);return r!==void 0&&i!==void 0?r-i:r===void 0?i===void 0?e.localeCompare(t):1:-1})}function _oe(e){let t=e.model,n=Et(t,e.plane?.id);if(e.root!==void 0&&n.childrenOf.has(e.root)){let{model:r}=Cr(t,n,e.root);return{nodes:r.nodes,relations:r.relations}}let r=new Set(n.childrenOf.keys());return{nodes:t.nodes.filter(e=>r.has(e.id)),relations:t.relations.filter(e=>r.has(e.from)&&r.has(e.to))}}function voe(e){let{nodes:t,relations:n}=_oe(e),r=new Set;for(let e of t){e.layer!==void 0&&r.add(e.layer);for(let t of e.columns??[])t.layer!==void 0&&r.add(t.layer)}for(let t of n){let n=vr(e.model,t);n!==void 0&&r.add(n)}return r}function yoe(e){let t=voe(e),n=new Set(e.activeLayers??e.plane?.layers??[]),r=[];for(let i of e.model.layers){if(!t.has(i.id))continue;let a=n.has(i.id);!a&&!e.canToggleLayers||r.push({id:`layers:${i.id}`,section:`layers`,label:i.name,swatch:{draw:`chip`,color:i.tint??`var(--dg-edge)`},layer:i.id,active:a})}return r}function Eb(e){let t=new Map,n=[];for(let r of e.compiled.edges)t.has(r.kind)?t.get(r.kind)!==r.tint&&t.set(r.kind,void 0):(n.push(r.kind),t.set(r.kind,r.tint));return goe(n,Object.keys(ei)).map(n=>{let r=t.get(n),i=e.kindRegistry.resolve(n);return{id:`kinds:${n}`,section:`kinds`,label:i.legendLabel??n,swatch:{draw:`line`,style:i,...r===void 0?{}:{color:r}},...i.legendLabel===void 0?{}:{vocabulary:!0}}})}function Db(e){let t=new Map,n={...e.nodeColors===void 0?{}:{nodeColors:e.nodeColors},...e.model.typeColors===void 0?{}:{typeColors:e.model.typeColors}},r=e=>{for(let i of e){let e=i.node.type;if(e!==void 0){let r=Oy(i,n);t.has(e)?t.get(e)!==r&&t.set(e,void 0):t.set(e,r)}r(i.children)}};return r(e.compiled.roots),goe([...t.keys()],Object.keys($r)).map(n=>{let r=e.typeRegistry.resolve(n),i=hoe.has(r.shape)?void 0:t.get(n),a=r.label;return{id:`types:${n}`,section:`types`,label:r.legendLabel??(a===void 0||a===``?n:a),swatch:{draw:`shape`,style:r,...i===void 0?{}:{color:i},...r.icon===void 0?{}:{icon:r.icon}},...r.legendLabel===void 0?{}:{vocabulary:!0}}})}function Ob(e){let t=new Set,n=e=>{e.total!==0&&t.add(e.open>0?`threat-open`:`threat-handled`)},r=e=>{for(let i of e){n(hn(i.node.threats));for(let e of i.columns??i.node.columns??[])e.pk===!0?t.add(`pk`):e.fk===!0&&t.add(`fk`);r(i.children)}};r(e.compiled.roots);for(let t of e.compiled.edges)n(t.constituents.reduce((e,t)=>{let n=hn(t.threats);return{open:e.open+n.open,total:e.total+n.total}},{open:0,total:0}));let i={"threat-open":`Open threats`,"threat-handled":`All threats handled`,pk:`Primary key`,fk:`Foreign key column`};return Object.keys(i).filter(e=>t.has(e)).map(e=>({id:`marks:${e}`,section:`marks`,label:i[e],swatch:{draw:`mark`,mark:e},vocabulary:!0}))}function kb(e,t){if(e.kind!==void 0)return{draw:`line`,style:t.kindRegistry.resolve(e.kind),...e.color===void 0?{}:{color:e.color}};if(e.type!==void 0){let n=t.typeRegistry.resolve(e.type),r=e.icon??n.icon;return{draw:`shape`,style:n,...e.color===void 0?{}:{color:e.color},...r===void 0?{}:{icon:r}}}if(e.color!==void 0)return{draw:`chip`,color:e.color}}function boe(e){return e.drawings===void 0?[]:[{id:`layers:$drawings`,section:`layers`,label:`Drawings`,swatch:{draw:`line`,style:{width:2.5},color:`var(--dg-ink)`},drawings:!0,active:e.drawings.active}]}function xoe(e){let t=e.config.show??moe,n=t.includes(`types`)?Db(e):e.config.show===void 0?Db(e).filter(e=>e.vocabulary===!0):[],r=[...t.includes(`layers`)?[...yoe(e),...boe(e)]:[],...t.includes(`kinds`)?Eb(e):[],...n,...t.includes(`marks`)?Ob(e):[]],i=[];return(e.config.items??[]).forEach((t,n)=>{let a=t.kind===void 0?t.type===void 0?void 0:`types:${t.type}`:`kinds:${t.kind}`,o=a===void 0?void 0:r.find(e=>e.id===a);if(o!==void 0){o.label=t.label,t.color!==void 0&&(o.swatch?.draw===`line`||o.swatch?.draw===`shape`)&&(o.swatch={...o.swatch,color:t.color}),t.icon!==void 0&&o.swatch!==void 0&&o.swatch.draw===`shape`&&(o.swatch={...o.swatch,icon:t.icon});return}let s=kb(t,e);i.push({id:`items:${n}`,section:`items`,label:t.label,...s===void 0?{}:{swatch:s}})}),[...r,...i]}var Soe={};function Ab(e){let[t,n]=(0,v.useState)(e.model.legend!==void 0),[r,i]=(0,v.useState)(null),a=e.model.legend;(0,v.useEffect)(()=>{n(a!==void 0)},[e.model.id,a]);let o=(0,v.useMemo)(()=>e.model.planes.find(t=>t.id===(e.plane??e.model.planes[0]?.id)),[e.model.planes,e.plane]),s=(0,v.useMemo)(()=>{let t=xoe({model:e.model,compiled:e.compiled,...o===void 0?{}:{plane:o},...e.drillRoot===void 0?{}:{root:e.drillRoot},...e.activeLayers===void 0?{}:{activeLayers:e.activeLayers},...e.nodeColors===void 0?{}:{nodeColors:e.nodeColors},typeRegistry:e.typeRegistry,kindRegistry:e.kindRegistry,config:a??Soe,canToggleLayers:e.canToggleLayers,...e.strokes.length>0?{drawings:{active:e.drawingsVisible}}:{}});return a!==void 0||t.some(e=>e.vocabulary===!0)?t:[]},[a,e.model,e.compiled,o,e.drillRoot,e.activeLayers,e.typeRegistry,e.kindRegistry,e.canToggleLayers,e.strokes,e.drawingsVisible,e.nodeColors]),c=(0,v.useRef)(null);return(0,v.useEffect)(()=>{let e=a?.position??`bottom-right`;c.current=!t||r===null||s.length===0?null:{side:e.startsWith(`top`)?`top`:`bottom`,px:r.height+16}},[t,r,s,a]),{legendConfig:a,showLegend:t,setShowLegend:n,setLegendSize:i,legendRowList:s,legendReserveRef:c}}function Coe(e){let t=e.profile.overlay===`loop-labels`,n=(0,v.useMemo)(()=>t?e.compiled.edges.map(e=>{let t=kv(e.constituents.map(e=>e.polarity));return{id:e.id,from:e.from,to:e.to,...t===void 0?{}:{polarity:t}}}):null,[e.compiled,t]),{onCldEdges:r}=e;(0,v.useEffect)(()=>{r?.(n??[])},[n,r]);let[i,a]=(0,v.useState)(!0),[o,s]=(0,v.useState)(null),[c,l]=(0,v.useState)(!0),[u,d]=(0,v.useState)(null),f=e.externalHighlight,{profile:p,model:m,plane:h}=e,g=(0,v.useMemo)(()=>{if(!c||o===null)return null;let t=new Set([o]),n=new Set;for(let r of e.compiled.edges)r.from===o?(t.add(r.to),n.add(r.id)):r.to===o&&(t.add(r.from),n.add(r.id));for(let e of p.related?.(m,h,o)??[])t.add(e);return{nodes:t,edges:n}},[c,o,e.compiled.edges,p,m,h]),_=(0,v.useMemo)(()=>{let e=f==null?u===null?null:{nodes:u.nodes,edges:u.edges}:{nodes:new Set(f.nodes),edges:new Set(f.edges)},t=e??g;return{nodes:t?.nodes??ih,edges:t?.edges??ih,active:t!==null,variant:e===null?`focus`:`loop`,activeKey:u?.key??null,focusId:o,toggle:(e,t,n)=>d(r=>r?.key===e?null:{key:e,nodes:new Set(t),edges:new Set(n)}),clear:()=>d(null)}},[u,f,g,o]);return(0,v.useEffect)(()=>{d(null),s(null)},[e.compiled]),{cld:t,loopEdges:n,showLoops:i,setShowLoops:a,selectedNode:o,setSelectedNode:s,focusConnected:c,setFocusConnected:l,loopHighlight:_}}var jb={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},woe=e=>{let t=e?.tagName;return t===`INPUT`||t===`TEXTAREA`||t===`SELECT`||e?.isContentEditable===!0};function Mb(e){let t=(0,v.useRef)({}),n=(0,v.useRef)(null),r=(0,v.useRef)(e);r.current=e;let i=(0,v.useCallback)(()=>{n.current!==null&&(clearTimeout(n.current),n.current=null);let e=t.current;Object.keys(e).length!==0&&(t.current={},r.current.commit(e))},[]),a=(0,v.useCallback)(e=>{let{enabled:a,step:o,nodesRef:s,applyMoves:c}=r.current,l=jb[e.key];if(!a||l===void 0)return;let u=e.target;if(woe(u)||(u?.closest(`.react-flow__node, .react-flow__nodesselection-rect`)??null)===null)return;let d=s.current.filter(e=>e.selected===!0&&e.draggable!==!1);if(d.length===0)return;if(e.metaKey||e.ctrlKey||e.altKey){e.stopPropagation();return}e.preventDefault(),e.stopPropagation();let f=o*(e.shiftKey?4:1),p={};for(let e of d){let n=t.current[e.id]??e.position;p[e.id]={x:n.x+l.x*f,y:n.y+l.y*f}}t.current={...t.current,...p},c(p),n.current!==null&&clearTimeout(n.current),n.current=setTimeout(i,300)},[i]),o=(0,v.useCallback)(e=>{(e.target?.closest(`.react-flow__node`)??null)!==null&&i()},[i]);return(0,v.useEffect)(()=>i,[i]),{onKeyDownCapture:a,onBlurCapture:o,flush:i,pendingRef:t}}function Nb(e,t){if(Object.keys(t).length===0)return e;let n=new Map(e);for(let[e,r]of Object.entries(t)){let t=n.get(e);t!==void 0&&n.set(e,{...t,x:r.x,y:r.y})}return n}var Pb=new Map,Fb=new Map,Ib=new Set;function Lb(e,t){return t.size===0||!Object.keys(e).some(e=>t.has(e))?e:Object.fromEntries(Object.entries(e).filter(([e])=>!t.has(e)))}function Rb(e,t,n){return t.size===0||!Object.keys(e).some(e=>t.has(e))?e:Object.fromEntries(Object.entries(e).map(([e,r])=>{let i=t.has(e)?n.get(e):void 0;return[e,i===void 0?r:{x:i.x,y:r.y}]}))}function zb(e){let t=(0,v.useMemo)(()=>{let t=new Map;for(let n of e.model.nodes){let r=e.profile.node?.leafSize?.(n);r!==void 0&&t.set(n.id,r)}for(let n of e.model.nodes){if(n.type===void 0)continue;let r=e.typeRegistry.resolve(n.type).defaultSize;if(r===void 0)continue;let i=e.layout?.sizes?.[n.id];t.set(n.id,i===void 0?r:{width:i.w,height:i.h})}for(let n of e.model.nodes){if(n.image===void 0||n.type!==void 0&&e.typeRegistry.resolve(n.type).cornerBadge===!0)continue;let r=e.layout?.sizes?.[n.id],i=r===void 0?{width:ie.w,height:ie.h}:{width:r.w,height:r.h},a=n.name??n.id;t.set(n.id,{...i,width:Math.max(i.width,Bre(a)),...a===``?{}:{reserveBottom:20}})}for(let n of e.model.nodes){if(n.shape===void 0)continue;let r=e.layout?.sizes?.[n.id];r!==void 0&&t.set(n.id,{width:r.w,height:r.h})}for(let n of e.model.nodes){if(n.image!==void 0||n.shape!==void 0)continue;let r=n.rich===void 0?n.name:me(n.rich);n.rich===void 0&&!r.includes(`
44
44
  `)||e.layout?.sizes?.[n.id]===void 0&&t.set(n.id,w_(r,n.fontScale))}for(let n of e.model.nodes)n.type!==`db-table`||n.columns===void 0||e.layout?.sizes?.[n.id]===void 0&&t.set(n.id,Pg(n.columns,n.name));return t},[e.model,e.layout,e.profile,e.typeRegistry]),n=e.metaKeys.join(`\0`),r=e.layout?.sizes,i=(0,v.useMemo)(()=>Cre(e.compiled.roots,e.profile.layout===void 0?hne(e.compiled.roots,t,{typeRegistry:e.typeRegistry,metaKeys:e.metaKeys,hiddenCounts:e.hiddenCounts,...e.profile.node?.leafSize===void 0?{}:{leafSize:e.profile.node.leafSize}}):t,r),[t,e.compiled,e.profile,e.typeRegistry,n,e.hiddenCounts,r]),a=(0,v.useMemo)(()=>e.layout?.settings?.[Ar(e.model,e.plane)],[e.layout,e.model,e.plane]),o=ft(e.model),s=e.profile.partitionOf!==void 0,c=e.profile.defaultAlgorithm,l=(0,v.useMemo)(()=>{let e=a?.direction!==void 0||o===`DOWN`?a:{...a,direction:o},t=c===void 0||e?.algorithm!==void 0?e:{...e,algorithm:c};if(!s||t?.algorithm===void 0)return t;let{algorithm:n,...r}=t;return r},[a,o,s,c]),u=(0,v.useMemo)(()=>e.profile.partitionOf?.(e.model,e.plane),[e.profile,e.model,e.plane]),d=(0,v.useMemo)(()=>{if(!e.editing&&e.ignoreSavedPositions===!0)return{};let t=Ar(e.model,e.plane);return e.layout?.planes[t]??{}},[e.layout,e.model,e.plane,e.ignoreSavedPositions,e.editing]),f=(0,v.useMemo)(()=>e.profile.layoutReadsPositions===!0?d:void 0,[e.profile,d]),[p,m]=(0,v.useState)(null),h=(0,v.useRef)(null);h.current=p;let[g,_]=(0,v.useState)(()=>new Map),[y,b]=(0,v.useState)(Fb),[x,S]=(0,v.useState)(Ib),[C,w]=(0,v.useState)(Ib),[T,E]=(0,v.useState)(null);(0,v.useEffect)(()=>{let t=!0,n=e.profile.layout;return(n===void 0?fie(e.compiled,i,l,u===void 0?void 0:{partitions:u}):Promise.resolve().then(()=>n(e.compiled,e.model,e.plane,i,f))).then(n=>{t&&(m(e=>e===n.geometry?e:n.geometry),_(n.routes),b(n.labelSpots),S(n.fixed??Ib),w(n.lockedX??Ib),E(e.compiled))}).catch(n=>{t&&(console.error(`layout failed; keeping the previous arrangement`,n),E(e.compiled))}),()=>{t=!1}},[e.compiled,i,l,e.profile,e.model,e.plane,u,f]);let ee=(0,v.useMemo)(()=>{if(p===null)return p;let t=Nb(p,Rb(Lb(d,x),C,p));return e.editing?t:Nb(t,Rb(Lb(e.viewPositions,x),C,p))},[p,x,C,d,e.editing,e.viewPositions]),te=(0,v.useMemo)(()=>ee===null?null:e.profile.layout===void 0?Xy(ee,e.compiled.roots,U_,e=>e.node.type===`activity-lane`||e.node.type===`activity-frame`):{geometry:ee,shifts:Pb},[ee,e.compiled,e.profile]),ne=(0,v.useMemo)(()=>te===null?null:Zre(te.geometry,e.compiled,e.model,e.layout?.sizes),[te,e.compiled,e.model,e.layout]),re=(0,v.useMemo)(()=>{let t=new Map;if(p===null)return t;let n=(e,r,i)=>{let a=p.get(e.id);a!==void 0&&(t.set(e.id,{x:r+a.x,y:i+a.y}),e.children.forEach(e=>n(e,r+a.x,i+a.y)))};return e.compiled.roots.forEach(e=>n(e,0,0)),t},[p,e.compiled]),ae=(0,v.useMemo)(()=>{if(e.profile.layout!==void 0||a?.edgeRouting===`orthogonal`)return{corner:8};if(e.profile.edge?.bowed!==!0)return(l?.algorithm??`layered`)===`layered`?{corner:28}:void 0},[e.profile,a,l]);return{geometry:p,geometryRef:h,routes:g,placedGeometry:ee,arrangedGeometry:ne,containerShifts:te?.shifts??Pb,routing:ae,laidAt:re,labelSpots:y,fixed:x,lockedX:C,settledFor:T,layoutSettings:a,flowDirection:l?.direction??`DOWN`}}function Toe({trails:e,live:t}){let{x:n,y:r,zoom:i}=qm(),a=(e,t,n)=>{let r=Jy(t);return(0,D.jsxs)(`g`,{className:`dg-laser-trail ${n?`dg-laser-fade`:`dg-laser-live`}`,children:[(0,D.jsx)(`path`,{className:`dg-laser-halo`,d:r,vectorEffect:`non-scaling-stroke`}),(0,D.jsx)(`path`,{className:`dg-laser-core`,d:r,vectorEffect:`non-scaling-stroke`})]},e)};return(0,D.jsx)(`svg`,{className:`dg-laser`,"aria-hidden":`true`,children:(0,D.jsxs)(`g`,{transform:`translate(${n} ${r}) scale(${i})`,children:[e.map(e=>a(e.id,e.points,!0)),t!==null&&t.length>=2&&a(`live`,t,!1)]})})}var Eoe=`application/x-dg-library-entry`,Doe=[`framework`,`language`,`tool`],Ooe=.02,koe=4,Aoe=e=>[...e??[]].filter(e=>e.type.startsWith(`image/`)),Bb=e=>document.elementFromPoint(e.clientX,e.clientY)?.closest(`.react-flow__node`)?.getAttribute(`data-id`)??void 0,Vb=(e,t)=>e.map(e=>e.selected===!0==(e.id===t)?e:{...e,selected:e.id===t}),joe=e=>e.map(e=>e.selected===!0?{...e,selected:!1}:e),Hb=(e,t)=>e.map(e=>{let n=e.data.dropTarget===!0,r=e.id===t;return n===r?e:{...e,data:{...e.data,dropTarget:r}}}),Moe=e=>`clientX`in e?{x:e.clientX,y:e.clientY}:{x:e.touches[0]?.clientX??0,y:e.touches[0]?.clientY??0},Noe=`note:`,Ub=e=>e.startsWith(Noe);function Poe(e){let t=Np(),n=e.edit,r=(0,v.useMemo)(()=>mie(e.styleId),[e.styleId]),i=(0,v.useMemo)(()=>kh(e.notation),[e.notation]),a=(0,v.useMemo)(()=>e.typeRegistry??ni(i.typeStyles),[e.typeRegistry,i]),o=(0,v.useMemo)(()=>e.kindRegistry??ri(i.kindStyles),[e.kindRegistry,i]),s=(0,v.useMemo)(()=>e.icons??oae(),[e.icons]),c=(0,v.useRef)(null),[l,u]=(0,v.useState)(null),[d,f]=(0,v.useState)(null),[p,m]=(0,v.useState)(()=>new Map),[h,g]=(0,v.useState)(()=>new Map),_=(0,v.useCallback)((e,t,n,r)=>{g(i=>{let a=i.get(e);return a!==void 0&&a.at.x===t.x&&a.at.y===t.y&&a.away.x===n.x&&a.away.y===n.y&&a.line.length===r.length&&a.line.every((e,t)=>e.x===r[t].x&&e.y===r[t].y)?i:new Map(i).set(e,{at:t,away:n,line:r})})},[]),y=(0,v.useRef)([]),b=(0,v.useRef)(null),[x,S]=(0,v.useState)(null),C=bb(),[w,T]=(0,v.useState)(null),E=(e,n)=>{let r=t.screenToFlowPosition({x:n.clientX,y:n.clientY});T({edgeId:e,x:r.x,y:r.y})},ee=(0,v.useCallback)(t=>{let n=e.model.nodes.find(e=>e.id===t);return n!==void 0&&(i.node?.alwaysExpanded?.(n)===!0||n.type!==void 0&&a.resolve(n.type).alwaysExpanded===!0)},[e.model.nodes,i,a]),{enteredPath:te,drillRoot:ne,focus:re,enterNode:ie,exitTo:ae,pendingRootFitRef:oe}=Tb({model:e.model,plane:e.plane,enteredPathProp:e.enteredPath,onEnteredPathChange:e.onEnteredPathChange,visibleRef:y,onPlaneSwitch:()=>{u(null),f(null),m(new Map)},isAlwaysExpanded:ee}),se=e.mode===`edit`;(0,v.useEffect)(()=>{se&&m(new Map)},[se]),(0,v.useEffect)(()=>{m(new Map)},[e.model.id]);let ce=n?.editLabelRequest,le=(0,v.useRef)(void 0),ue=(0,v.useRef)(null);(0,v.useEffect)(()=>{!se||ce===void 0||ce.nonce===le.current||(le.current=ce.nonce,u({kind:`node`,id:ce.id}),Dt.some(e=>e.id===ce.id)?Rt(e=>Vb(e,ce.id)):ue.current=ce.id)},[ce?.nonce]);let de=n?.editThreatRequest,fe=(0,v.useRef)(void 0);(0,v.useEffect)(()=>{!se||de===void 0||de.nonce===fe.current||(fe.current=de.nonce,f({key:nn(de.target),id:de.id}))},[de?.nonce]);let pe=(0,v.useMemo)(()=>new Map(e.model.nodes.map(e=>[e.id,e.name])),[e.model]),me=(0,v.useMemo)(()=>e.drawings?.planes[Ar(e.model,e.plane)]??[],[e.drawings,e.model,e.plane]),he=(0,v.useRef)([]);he.current=me;let[ge,ve]=(0,v.useState)(!0);(0,v.useEffect)(()=>{ve(!0)},[e.model.id]);let ye=e.chrome===!1,{pen:be}=e,{laserOn:xe,setLaserOn:Se,penActive:Ce,eraserActive:we,gestureCaptured:Te,pen:Ee,laser:De,gestureHandlers:Oe}=vb({editing:se,tool:e.tool,drillRoot:ne,chromeless:ye,builtinKeys:e.builtinKeys!==!1,modelId:e.model.id,pen:e.pen,onAddStroke:n?.onAddStroke,toFlow:t.screenToFlowPosition}),ke=(0,v.useMemo)(()=>{let t=i.node?.alwaysExpanded,n=e=>e.type!==void 0&&a.resolve(e.type).alwaysExpanded===!0,r=e.model.nodes.filter(e=>t?.(e)===!0||n(e));if(r.length===0)return e.pins;let o={...e.pins??{}};for(let e of r)o[e.id]=`expanded`;return o},[i,e.pins,e.model.nodes,a]),Ae=(0,v.useMemo)(()=>{let t=aee(e.model,{focus:ne===void 0?re:void 0,pins:ke,activeLayers:e.activeLayers,...e.plane===void 0?{}:{plane:e.plane},...ne===void 0?{}:{root:ne}}),n=i.edge?.hidden;return n===void 0||!t.edges.some(e=>n(e.kind))?t:{...t,edges:t.edges.filter(e=>!n(e.kind))}},[e.model,e.plane,re,ne,ke,e.activeLayers,i]),je=(0,v.useRef)(Ae);je.current=Ae,(0,v.useEffect)(()=>{let e=[],t=n=>{e.push(n.id),n.children.forEach(t)};Ae.roots.forEach(t),y.current=e},[Ae]);let Me=(0,v.useMemo)(()=>i.node?.colorOf?.(e.model,e.plane),[i,e.model,e.plane]),Ne=(0,v.useMemo)(()=>i.node?.badges?.(e.model,e.plane),[i,e.model,e.plane]),{legendConfig:Pe,showLegend:Fe,setShowLegend:Ie,setLegendSize:Le,legendRowList:Re,legendReserveRef:ze}=Ab({model:e.model,plane:e.plane,compiled:Ae,drillRoot:ne,activeLayers:e.activeLayers,typeRegistry:a,kindRegistry:o,canToggleLayers:e.onToggleLayer!==void 0,strokes:me,drawingsVisible:ge,...Me===void 0?{}:{nodeColors:Me}}),[Be,Ve]=(0,v.useState)(!1);(0,v.useEffect)(()=>{let e=e=>{e.key===`Alt`&&Ve(!0)},t=e=>{e.key===`Alt`&&Ve(!1)},n=()=>Ve(!1);return window.addEventListener(`keydown`,e),window.addEventListener(`keyup`,t),window.addEventListener(`blur`,n),()=>{window.removeEventListener(`keydown`,e),window.removeEventListener(`keyup`,t),window.removeEventListener(`blur`,n)}},[]);let[He,Ue]=(0,v.useState)({});(0,v.useEffect)(()=>{Ue({})},[e.model,e.plane,se]);let[We,Ge]=(0,v.useState)({});(0,v.useEffect)(()=>{Ge({})},[e.model,e.plane,se]);let{onViewLabelMovesChange:Ke}=e;(0,v.useEffect)(()=>{Ke?.(We)},[We,Ke]);let qe=(0,v.useCallback)((e,t,n,r)=>Ge(i=>({...i,[e]:{...i[e],[t]:r===`center`?{t:n}:{t:n,side:r}}})),[]),Je=(0,v.useMemo)(()=>{let t=!se&&e.ignoreSavedPositions===!0?void 0:e.layout?.edgeLabels?.[Ar(e.model,e.plane)];if(se||Object.keys(We).length===0)return t;let n={...t};for(let[e,t]of Object.entries(We))n[e]={...n[e],...t};return n},[se,e.ignoreSavedPositions,e.layout,e.model,e.plane,We]),Ye=(0,v.useRef)(e.onMultiSelect);Ye.current=e.onMultiSelect;let Xe=(0,v.useRef)([]),Ze=(0,v.useCallback)(({nodes:e})=>{let t=e.map(e=>e.id),n=Xe.current;t.length===n.length&&t.every((e,t)=>e===n[t])||(Xe.current=t,ue.current=null,Ye.current?.(t))},[]),[Qe,$e]=(0,v.useState)([]),et=(0,v.useRef)(null),[tt,nt]=(0,v.useState)(!1),rt=(0,v.useRef)(!1),it=(0,v.useRef)(void 0),{onViewPositionsChange:at}=e;(0,v.useEffect)(()=>{at?.(He)},[He,at]);let ot=(0,v.useMemo)(()=>_e(e.model,Ae),[e.model,Ae]),st=e.onNodeMetaKeys??Doe,{geometryRef:ct,routes:ut,placedGeometry:dt,arrangedGeometry:ft,containerShifts:pt,routing:mt,laidAt:ht,labelSpots:gt,fixed:_t,settledFor:vt,flowDirection:yt}=zb({model:e.model,plane:e.plane,layout:e.layout,compiled:Ae,profile:i,typeRegistry:a,metaKeys:st,hiddenCounts:ot,editing:se,ignoreSavedPositions:e.ignoreSavedPositions,viewPositions:He}),bt=(0,v.useRef)(ft);bt.current=ft;let xt=(0,v.useMemo)(()=>{let e=new Map;if(ft===null)return e;let t=(n,r,i)=>{let a=ft.get(n.id);if(a===void 0)return;let o=r+a.x,s=i+a.y;if(n.children.length===0)return;let c=pt.get(n.id);e.set(n.id,{x:o-(c?.dx??0),y:s-(c?.dy??0)}),n.children.forEach(e=>t(e,o,s))};return Ae.roots.forEach(e=>t(e,0,0)),e},[Ae,ft,pt]),St=(0,v.useRef)(xt);St.current=xt;let Ct=(0,v.useRef)(pt);Ct.current=pt,(0,v.useEffect)(()=>{let e=oe.current;e===null||ft===null||vt!==Ae||(oe.current=null,t.fitView(e===`glide`?{padding:.15,duration:500}:void 0))},[Ae,ft,vt,t]);let wt=n?.onImageFiles;(0,v.useEffect)(()=>{if(!se||wt===void 0)return;let e=e=>{let n=e.target?.tagName;if(n===`INPUT`||n===`TEXTAREA`||n===`SELECT`)return;let r=Aoe(e.clipboardData?.files);if(r.length===0)return;e.preventDefault();let i=c.current?.getBoundingClientRect(),a=i===void 0?void 0:t.screenToFlowPosition({x:i.left+i.width/2,y:i.top+i.height/2});wt(r,a)};return window.addEventListener(`paste`,e),()=>window.removeEventListener(`paste`,e)},[se,wt,t]);let Tt=(0,v.useMemo)(()=>{let t=i.edge?.colorOf;if(t===void 0)return;let n=new Map;for(let r of Ae.edges){let i=t(r,e.model,e.plane);i!==void 0&&n.set(r.id,i)}return n},[i,Ae,e.model,e.plane]),Et=(0,v.useMemo)(()=>({metaKeys:st,hiddenCounts:ot,typeRegistry:a,icons:s,...e.model.typeColors===void 0?{}:{typeColors:e.model.typeColors},onOpenLink:e.onOpenLink,onToggleExpand:e.onToggleExpand,onEnterNode:ie,editing:se,labelEditingId:l?.kind===`node`?l.id:void 0,endLabelEdit:()=>u(null),onRenameNode:n?.onRenameNode,onSetNodeRich:n?.onSetNodeRich,assetBase:e.assetBase,libraryBase:e.libraryBase,onResize:n?.onResize,onSetTableColumns:n?.onSetTableColumns,quickAdd:n?.quickAdd,onSetRole:n?.onSetRole,onAddThreat:n?.onAddThreat,stylePreset:r.rough===void 0?void 0:r,notation:e.notation,...Me===void 0?{}:{nodeColors:Me},...Ne===void 0?{}:{nodeBadges:Ne},...i.node?.resizable===void 0?{}:{resizable:i.node.resizable}}),[st,ot,a,s,e.model.typeColors,e.onOpenLink,e.onToggleExpand,ie,se,l,n?.onRenameNode,n?.onSetNodeRich,e.assetBase,e.libraryBase,n?.onResize,n?.onSetTableColumns,n?.quickAdd,n?.onSetRole,n?.onAddThreat,r,e.notation,Me,Ne,i]),Dt=(0,v.useMemo)(()=>{if(ft===null)return[];let e=[],t=(n,r)=>{let o=ft.get(n.id);if(o===void 0)return;let s=gae(n,Et);e.push(Vae({id:n.id,position:{x:o.x,y:o.y},data:s,...r===void 0?{}:{parentId:r},..._t.has(n.id)&&i.node?.draggableWhenFixed?.(n.node)!==!0?{draggable:!1,...se?{className:`nopan`}:{}}:{},...r===void 0||i.node?.dropTarget!==void 0&&i.node?.canDrop?.(n.node)===!0?{}:i.layout===void 0?{expandParent:!0}:se?{extent:`parent`}:{},...n.state===`expanded`?{style:{width:o.width,height:o.height},zIndex:-1}:n.node.type===`git-stage`?{style:{width:o.width,height:o.height},zIndex:-2}:(n.node.image!==void 0||n.node.shape!==void 0)&&n.state===`leaf`||n.state===`leaf`&&n.node.type!==void 0&&(ch.has(a.resolve(n.node.type).shape)||lh.has(n.node.type)||Qte.has(n.node.type)||i.id===`git-graph`&&n.node.type===`branch`)?{style:{width:o.width,height:o.height}}:i.layout===void 0&&!(i.node?.typelessAsText===!0&&n.node.type===void 0)?{style:{minWidth:o.width}}:{}})),n.children.forEach(e=>t(e,n.id))};return Ae.roots.forEach(e=>t(e)),e},[Ae,ft,Et,se,a,i,_t]),Ot=Ar(e.model,e.plane),kt=e.notes===!1,At=e.layout?.notes?.[Ot],jt=(0,v.useMemo)(()=>{let e=new Set;for(let[t,n]of Object.entries(At??{}))n.open===!0&&e.add(t);for(let[t,n]of p)n?e.add(t):e.delete(t);return e},[At,p]),Mt=n?.onToggleNote,Nt=(0,v.useMemo)(()=>kt?null:{isOpen:e=>jt.has(e),toggle:e=>{let t=nn(e),n=!jt.has(t);se&&Mt!==void 0?Mt(e,n):m(e=>new Map(e).set(t,n))},placeChip:_},[kt,jt,se,Mt,_]),Pt=(0,v.useMemo)(()=>{if(kt||jt.size===0||ft===null)return[];let t=new Map,r=[],i=(e,n,a)=>{let o=ft.get(e.id);if(o===void 0)return;let s={x:o.x+n,y:o.y+a,width:o.width,height:o.height};t.set(e.id,s),r.push(...Py([{rect:s,kind:e.state===`expanded`?`group`:`box`}])),e.children.forEach(e=>i(e,o.x+n,o.y+a))};Ae.roots.forEach(e=>i(e,0,0));for(let e of Ae.edges){let t=e.constituents.length===1?e.constituents[0]:void 0,n=t===void 0?void 0:h.get(t.id);n!==void 0&&r.push(...Sae(n.line))}let o=[],s=(i,a,s,c,l,u,p,m,h)=>{let g=nn(i);if(!jt.has(g))return;let _=se&&(s.length>0||e.notation===`threat-model`),v={width:220,height:Pae(a,s,_,c,l)},y=At?.[g],b=y!==void 0&&(y.dx!==0||y.dy!==0)?{x:u.x+y.dx,y:u.y+y.dy}:wae(u,p,v,r,h);r.push({...b,...v});let x=(m===void 0?void 0:t.get(m))??{x:0,y:0},S={target:i,name:a,threats:s,comments:c,links:l,anchor:{x:u.x-x.x,y:u.y-x.y},badge:u,editing:se,...d!==null&&d.key===g?{editingId:d.id}:{},..._&&n?.onAddThreat!==void 0?{onAddThreat:n.onAddThreat}:{},...se&&n?.onRetitleThreat!==void 0?{onRetitleThreat:n.onRetitleThreat}:{},...se&&n?.onSetThreatStatus!==void 0?{onSetThreatStatus:n.onSetThreatStatus}:{},...se&&n?.onEditThreatText!==void 0?{onEditThreatText:n.onEditThreatText}:{},...e.onOpenLink===void 0?{}:{onOpenLink:e.onOpenLink},onEndEdit:()=>f(null)};o.push(Ky({id:Noe+g,position:{x:b.x-x.x,y:b.y-x.y},data:S,...m===void 0?{}:{parentId:m},draggable:se}))},c=e=>e.state===`expanded`?`group`:(e.node.type===void 0?void 0:a.resolve(e.node.type).shape)===`ellipse`?`ellipse`:`box`,l=(e,n)=>{let r=t.get(e.id);if(r===void 0)return;let i=e.node.threats??[],a=e.node.comments??[],o=e.node.links??[];e.external===void 0&&lt(e.node)&&s({node:e.id},e.node.name,i,a,o,Ny(r,c(e)),r,n),e.children.forEach(t=>l(t,e.id))};Ae.roots.forEach(e=>l(e));for(let e of Ae.edges){let n=e.constituents.length===1?e.constituents[0]:void 0;if(n===void 0||!lt(n))continue;let r=t.get(e.from),i=t.get(e.to);if(r===void 0||i===void 0)continue;let a=h.get(n.id),o=a?.at??{x:(r.x+r.width/2+i.x+i.width/2)/2,y:(r.y+r.height/2+i.y+i.height/2)/2},c=n.label!==void 0&&n.label!==``?` (${n.label})`:``;s({relation:n.id},`${pe.get(n.from)??n.from} → ${pe.get(n.to)??n.to}${c}`,n.threats??[],n.comments??[],[],o,null,void 0,a?.away)}return o},[kt,jt,ft,Ae,At,h,se,n?.onAddThreat,n?.onRetitleThreat,n?.onSetThreatStatus,n?.onEditThreatText,e.onOpenLink,e.notation,d,pe,a]),Ft=(0,v.useMemo)(()=>Pt.length===0?Dt:[...Dt,...Pt],[Dt,Pt]),It=(0,v.useRef)(Ft);It.current=Ft;let[Lt,Rt]=(0,v.useState)([]),zt=(0,v.useRef)([]);zt.current=Lt;let Bt=(0,v.useCallback)(e=>{if(Object.keys(e).length===0)return;let t=e=>zt.current.find(t=>t.id===e)?.data?.typeId,r=$y(e,zt.current,St.current,Ct.current,e=>t(e)===`activity-lane`||t(e)===`activity-frame`),i=bt.current,a=Object.fromEntries(Object.entries(r).map(([e,t])=>{let n=i?.get(e);return[e,n===void 0?{dx:0,dy:0}:{dx:t.x-n.x,dy:t.y-n.y}]}));if(se)if(n?.onNodesMoved!==void 0)n.onNodesMoved(r,a);else for(let[e,t]of Object.entries(r))n?.onNodeMoved?.(e,t);else Ue(e=>({...e,...r}))},[se,n]),Vt=(n,r)=>{let a=i.node?.dropTarget;if(a===void 0)return;let o=e.model.nodes.find(e=>e.id===n);if(o===void 0||i.node?.canDrop?.(o)!==!0)return;let s=zt.current,c=new Set([n]),l=s.find(e=>e.id===n)?.parentId;l!==void 0&&c.add(l);let u=new Map;for(let e of s)e.parentId!==void 0&&u.set(e.parentId,[...u.get(e.parentId)??[],e.id]);let d=[...u.get(n)??[]];for(let e=0;e<d.length;e++){let t=d[e];c.has(t)||(c.add(t),d.push(...u.get(t)??[]))}for(let t of i.related?.(e.model,e.plane,n)??[])c.add(t);let f=[];for(let n of e.model.nodes){if(!a(n))continue;let e=t.getInternalNode(n.id),r=e?.internals.positionAbsolute,i=e?.measured?.width,o=e?.measured?.height;r===void 0||i===void 0||o===void 0||f.push({id:n.id,x:r.x,y:r.y,w:i,h:o})}return coe(r,f,c)},Ht=se&&n?.onDropInto!==void 0&&i.node?.dropTarget!==void 0,Ut=(e,n,r)=>{let i=r.length===1?Vt(n.id,t.screenToFlowPosition(Moe(e))):void 0;i!==it.current&&(it.current=i,Rt(e=>Hb(e,i)))},Wt=Mb({enabled:!ye&&!Te,step:e.snapGrid??5,nodesRef:zt,applyMoves:e=>Rt(t=>gp(Object.entries(e).map(([e,t])=>({type:`position`,id:e,position:t})),t)),commit:Bt}),Gt=(0,v.useMemo)(()=>Lt.filter(e=>e.selected===!0&&e.draggable!==!1).map(e=>e.id),[Lt]),Kt=!ye&&!Te&&(se||e.onViewPositionsChange!==void 0),qt=e=>{Wt.flush();let n=new Map(zt.current.map(e=>[e.id,e])),r=ib(Gt,e=>n.get(e)?.parentId),i=[];for(let e of r){let r=n.get(e),a=t.getInternalNode(e)?.internals.positionAbsolute,o=r?.measured?.width,s=r?.measured?.height;r===void 0||a===void 0||o===void 0||s===void 0||i.push({id:e,x:a.x,y:a.y,w:o,h:s})}let a={};for(let[t,r]of Object.entries(e(i))){let e=n.get(t);a[t]={x:e.position.x+r.dx,y:e.position.y+r.dy}}Object.keys(a).length!==0&&(Rt(e=>gp(Object.entries(a).map(([e,t])=>({type:`position`,id:e,position:t})),e)),Bt(a))};(0,v.useLayoutEffect)(()=>{let e=ue.current,t=e!==null&&Dt.some(t=>t.id===e)?e:null;t!==null&&(ue.current=null),Rt(e=>{let n=t===null?new Set(e.filter(e=>e.selected===!0).map(e=>e.id)):new Set([t]),r=Wt.pendingRef.current;return n.size===0&&Object.keys(r).length===0?Ft:Ft.map(e=>{let t=r[e.id],i=n.has(e.id);return!i&&t===void 0?e:{...e,...i?{selected:!0}:{},...t===void 0?{}:{position:t}}})})},[Ft]),(0,v.useEffect)(()=>{let n=e.layoutApiRef;if(n!==void 0)return n.current={snapshotPositions:()=>Object.fromEntries(zt.current.filter(e=>!(je.current.externals?.has(e.id)??!1)&&!Ub(e.id)).map(e=>[e.id,{x:e.position.x,y:e.position.y}])),autoPositions:()=>ct.current===null?{}:Object.fromEntries([...ct.current].map(([e,t])=>[e,{x:t.x,y:t.y}])),viewportCenter:()=>{let e=c.current?.getBoundingClientRect();return e===void 0?void 0:t.screenToFlowPosition({x:e.left+e.width/2,y:e.top+e.height/2})},nodeBounds:e=>{let n=t.getInternalNode(e);if(n!==void 0)return{...n.internals.positionAbsolute,width:n.measured.width??0,height:n.measured.height??0}},contentBounds:()=>{let e=t.getNodes();return Dy([e.length===0?void 0:t.getNodesBounds(e),Uae(he.current),lae(c.current,e=>t.screenToFlowPosition(e,{snapToGrid:!1}))])},fitView:(e=.06)=>{let r=typeof e==`number`?e:Object.fromEntries(Object.entries(e).map(([e,t])=>[e,`${t}px`])),i=n.current?.contentBounds(),a=c.current?.getBoundingClientRect();if(i!==void 0&&a!==void 0&&a.width>0&&a.height>0){t.setViewport(Mu(i,a.width,a.height,Ooe,koe,r));return}t.fitView({padding:r})},legendReserve:()=>ze.current},()=>{n.current=null}},[e.layoutApiRef,t]);let Jt=(0,v.useMemo)(()=>({kindRegistry:o,editing:se,onAddEdgeLabel:n?.onAddEdgeLabel,onEditEdgeLabel:n?.onEditEdgeLabel,onMoveEdgeLabel:n?.onMoveEdgeLabel,onSetEdgeSide:n?.onSetEdgeSide,onAddThreat:n?.onAddThreat,pinEdgeRel:x,pendingAdd:w,onPendingAddConsumed:()=>T(null),stylePreset:r.rough===void 0?void 0:r,notation:e.notation,...mt===void 0?{}:{routing:mt},routes:ut,laidAt:ht,labelSpots:gt,...Je===void 0?{}:{labelMoves:Je},...!se&&e.onViewLabelMovesChange!==void 0?{onViewMoveEdgeLabel:qe}:{},...Tt===void 0?{}:{edgeColors:Tt}}),[o,se,n?.onAddEdgeLabel,n?.onEditEdgeLabel,n?.onMoveEdgeLabel,n?.onSetEdgeSide,n?.onAddThreat,x,w,r,e.notation,mt,ut,ht,gt,Je,e.onViewLabelMovesChange,qe,Tt]),Yt=(0,v.useMemo)(()=>dt===null?[]:Ae.edges.map(e=>{let t=_ae(e,Jt),n=e.constituents.length===1?e.constituents[0]:void 0;return qy({id:e.id,source:e.from,target:e.to,data:t,reconnectable:se&&n!==void 0})}),[Ae,dt,Jt,se]),{cld:Xt,loopEdges:Zt,showLoops:Qt,setShowLoops:$t,selectedNode:en,setSelectedNode:tn,focusConnected:rn,setFocusConnected:an,loopHighlight:on}=Coe({profile:i,compiled:Ae,model:e.model,plane:e.plane,externalHighlight:e.externalHighlight,onCldEdges:e.onCldEdges}),sn={toggleLaser:()=>(Se(e=>!e),!0),toggleDim:()=>(an(e=>!e),!0),toggleLegend:()=>Re.length===0?!1:(Ie(e=>!e),!0),toggleDrawings:()=>me.length===0||ne!==void 0?!1:(ve(e=>!e),!0),toggleLoops:()=>Xt?(Qt&&on.clear(),$t(e=>!e),!0):!1,zoomIn:()=>(t.zoomIn(),!0),zoomOut:()=>(t.zoomOut(),!0),fitView:()=>{let n=e.layoutApiRef?.current;return n==null?t.fitView():n.fitView(),!0},align:e=>!Kt||Gt.length<2?!1:(qt(t=>nb(t,e)),!0),distribute:e=>!Kt||Gt.length<3?!1:(qt(t=>rb(t,e)),!0)};(0,v.useEffect)(()=>{let t=e.canvasCommandsRef;if(t!==void 0)return t.current=sn,()=>{t.current=null}});let cn=t=>{let n=e.keyHints?.[t]??(t===`laser`&&e.builtinKeys!==!1?`L`:void 0);return n!==void 0&&n!==``?` (${n})`:``};return(0,D.jsx)(ah.Provider,{value:on,children:(0,D.jsx)(oh.Provider,{value:Nt,children:(0,D.jsx)(`div`,{ref:c,className:`dg-canvas${e.chrome===!1?` dg-no-chrome`:``}${se?` dg-mode-edit`:``}${!se&&Be?` dg-alt-move`:``}${tt?` dg-dragging`:``}${r.id===`clean`?``:` dg-style-${r.id}`}${r.rough===void 0?``:` dg-style-rough`}${r.fontFamily===void 0?``:` dg-style-font`}${i.className===void 0?``:` `+i.className}${Ce?` dg-tool-pen`:``}${we?` dg-tool-eraser`:``}${xe?` dg-tool-laser`:``}`,style:{width:`100%`,height:`100%`,...r.fontFamily===void 0?{}:{"--dg-style-font":r.fontFamily},...r.cssVars??{}},onDragOver:e=>{if(!se)return;let t=n?.onDropLibraryEntry!==void 0&&e.dataTransfer.types.includes(`application/x-dg-library-entry`);(n?.onImageFiles!==void 0||t)&&e.preventDefault()},onDrop:e=>{if(!se)return;let r=n?.onDropLibraryEntry!==void 0&&typeof e.dataTransfer?.getData==`function`?e.dataTransfer.getData(Eoe):``;if(r!==void 0&&r!==``){e.preventDefault();let i=Bb(e),a=i!==void 0&&Ub(i)?void 0:i;n?.onDropLibraryEntry?.(r,t.screenToFlowPosition({x:e.clientX,y:e.clientY}),a);return}if(n?.onImageFiles===void 0)return;e.preventDefault();let i=Aoe(e.dataTransfer?.files);i.length!==0&&n.onImageFiles(i,t.screenToFlowPosition({x:e.clientX,y:e.clientY}))},onKeyDownCapture:Wt.onKeyDownCapture,onBlurCapture:Wt.onBlurCapture,...Oe,children:(0,D.jsxs)(Um,{nodes:Lt,edges:Yt,nodeTypes:zae,edgeTypes:Bae,colorMode:e.colorMode??`light`,connectionMode:Ul.Loose,onNodeClick:(t,n)=>{if(S(null),C.clearEdgeClick(),n.type===`note`){C.clearNodeClick();let t=n.data.target;if(`node`in t)tn(t.node),Rt(e=>Vb(e,t.node)),e.onSelect?.({kind:`node`,id:t.node});else{let n=Ae.edges.find(e=>e.constituents.length===1&&e.constituents[0]?.id===t.relation);n!==void 0&&(se&&S(t.relation),tn(null),Rt(joe),e.onSelect?.({kind:`edge`,id:n.id,constituentIds:[t.relation]}))}return}let r=Ae.externals?.get(n.id);if(r!==void 0){C.clearNodeClick(),ie(r);return}if(!se&&(t.ctrlKey||t.metaKey)&&e.onCompareSelect!==void 0){C.clearNodeClick(),e.onCompareSelect(n.id);return}tn(n.id),e.onSelect?.({kind:`node`,id:n.id}),se||t.shiftKey?C.clearNodeClick():C.consumeNodeDrill(n.id,t,t.detail)?ie(n.id):C.recordNodeClick(n.id,t)},onNodeDoubleClick:(e,t)=>{se&&t.type!==`note`&&u({kind:`node`,id:t.id})},onReconnectStart:(e,t,n)=>{b.current=n},onReconnect:(e,t)=>{if(!se||t.source===null||t.target===null)return;let r=Ae.edges.find(t=>t.id===e.id),i=r?.constituents.length===1?r.constituents[0]:void 0;if(i===void 0)return;let a=Lre(b.current,{source:t.source,target:t.target,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle},i);n?.onReconnect?.(i.id,t.source,t.target,a)},onReconnectEnd:()=>{b.current=null},onNodesChange:e=>{let n=Qae(e,{nodes:zt.current,absoluteOf:e=>t.getInternalNode(e)?.internals.positionAbsolute},8/t.getZoom(),et);$e(e=>e.length===0&&n.lines.length===0?e:n.lines);let r=qae(n.changes,rt.current).filter(e=>e.type!==`remove`);zt.current=gp(r,zt.current),Rt(e=>gp(r,e))},onNodeDragStart:()=>{Wt.flush(),rt.current=!0,nt(!0)},...Ht?{onNodeDrag:Ut}:{},onNodeDragStop:(r,a,o)=>{rt.current=!1,nt(!1),it.current!==void 0&&(it.current=void 0,zt.current=Hb(zt.current,void 0),Rt(e=>Hb(e,void 0)));let{notes:s,boxes:c}=Wae(o,new Map(zt.current.map(e=>[e.id,e.position])));for(let e of s)n?.onNoteMoved?.(e.target,e.offset);let l=new Set,u=Object.keys(c);if(u.length===1&&n?.onDropInto!==void 0&&i.node?.dropTarget!==void 0){let e=u[0],i=Vt(e,t.screenToFlowPosition(Moe(r))),a=i===void 0?void 0:t.getInternalNode(e)?.internals.positionAbsolute,o=i===void 0?void 0:t.getInternalNode(i)?.internals.positionAbsolute;i!==void 0&&a!==void 0&&o!==void 0&&(n.onDropInto(e,i,{x:a.x-o.x,y:a.y-o.y}),l.add(e))}let d=i.node?.snapsBack;if(d!==void 0){let t={};for(let n of u){let r=e.model.nodes.find(e=>e.id===n);if(r===void 0||!d(r))continue;l.add(n);let i=It.current.find(e=>e.id===n)?.position;i!==void 0&&(t[n]=i)}if(Object.keys(t).length>0){let e=Object.entries(t).map(([e,t])=>({type:`position`,id:e,position:t}));zt.current=gp(e,zt.current),Rt(t=>gp(e,t))}}Bt(l.size===0?c:Object.fromEntries(Object.entries(c).filter(([e])=>!l.has(e))))},onConnect:e=>{e.source!==null&&e.target!==null&&n?.onConnect?.(e.source,e.target,e.sourceHandle,e.targetHandle)},onEdgeClick:(t,n)=>{let r=Ae.edges.find(e=>e.id===n.id),i=r?.constituents.length===1?r.constituents[0]?.id:void 0;S(se&&i!==void 0?i:null),tn(null),C.clearNodeClick(),e.onSelect?.({kind:`edge`,id:n.id,...r===void 0?{}:{constituentIds:r.constituents.map(e=>e.id)}}),se&&i!==void 0?C.consumeEdgeAdd(n.id,t)?E(n.id,t):C.recordEdgeClick(n.id,t):C.clearEdgeClick()},onPaneClick:r=>{if(se){let e=C.takePaneEdgeAdd(r);if(e!==null){E(e,r);return}}let i=se?null:C.takePaneNodeDrill(r,r.detail);if(i!==null){ie(i);return}if(r.detail===2)if(se&&n?.onCreateAt!==void 0){let e=n.onCreateAt(t.screenToFlowPosition({x:r.clientX,y:r.clientY}));typeof e==`string`&&u({kind:`node`,id:e})}else t.fitView({padding:.1,duration:500});else S(null),C.clearAll(),tn(null),e.onSelect?.(null),on.clear()},deleteKeyCode:se&&n?.onDeleteSelection!==void 0?[`Backspace`,`Delete`]:null,onDelete:({nodes:e,edges:t})=>{let r=e.map(e=>e.id),i=t.filter(e=>e.selected===!0).flatMap(e=>Ae.edges.find(t=>t.id===e.id)?.constituents.map(e=>e.id)??[]);(r.length>0||i.length>0)&&n?.onDeleteSelection?.({nodeIds:r,relationIds:i})},fitView:!0,minZoom:Ooe,maxZoom:koe,zoomOnScroll:!1,zoomOnDoubleClick:!1,...e.snapGrid===void 0?{}:{snapToGrid:!0,snapGrid:[e.snapGrid,e.snapGrid]},multiSelectionKeyCode:Te?null:`Shift`,selectionKeyCode:Te?null:`Shift`,onSelectionChange:Ze,panOnScroll:!0,panOnDrag:!Te,elementsSelectable:!Te,nodesDraggable:(se||Be)&&!Te,nodesConnectable:se&&!Te,proOptions:{hideAttribution:!0},children:[(0,D.jsx)(Ete,{...e.snapGrid===void 0?{}:{gap:e.snapGrid,className:`dg-grid-on`}}),(0,D.jsx)(Gae,{strokes:me,live:Ee.live===null?null:{points:Ee.live,width:be?.width??3,...be?.color===void 0?{}:{color:be.color}},visible:ge&&ne===void 0,erasing:we,onErase:e=>n?.onDeleteStroke?.(e)}),(0,D.jsx)(Toe,{trails:De.trails,live:De.live}),(0,D.jsx)($ae,{lines:Qe}),Kt&&(0,D.jsx)(cb,{ids:Gt,onAlign:e=>qt(t=>nb(t,e)),onDistribute:e=>qt(t=>rb(t,e))}),(0,D.jsx)(sae,{path:te,nameOf:e=>pe.get(e)??e,onCrumb:ae}),Fe&&Re.length>0&&(0,D.jsx)(Jf,{position:Pe?.position??`bottom-right`,children:(0,D.jsx)(db,{rows:Re,...Pe?.title===void 0?{}:{title:Pe.title},interactive:e.chrome!==!1,...e.onToggleLayer===void 0?{}:{onToggleLayer:e.onToggleLayer},...e.chrome===!1?{}:{onToggleDrawings:()=>ve(e=>!e)},icons:s,onMeasure:Le})}),e.chrome!==!1&&(0,D.jsxs)(Nte,{children:[(0,D.jsx)(Zm,{className:`dg-focus-toggle${rn?``:` dg-focus-toggle-off`}`,title:`${rn?`Stop dimming unconnected on select`:`Dim unconnected on select`}${cn(`dim`)}`,"aria-label":rn?`Stop dimming unconnected on select`:`Dim unconnected on select`,"aria-pressed":rn,onClick:()=>an(e=>!e),children:`◎`}),(0,D.jsx)(Zm,{className:`dg-laser-toggle${xe?` dg-laser-toggle-on`:``}`,title:`${xe?`Laser pointer off`:`Laser pointer`}${cn(`laser`)}`,"aria-label":`Laser pointer`,"aria-pressed":xe,onClick:()=>Se(e=>!e),children:`◉`}),me.length>0&&ne===void 0&&(0,D.jsx)(Zm,{className:`dg-drawings-toggle${ge?``:` dg-drawings-toggle-off`}`,title:`${ge?`Hide drawings`:`Show drawings`}${cn(`drawings`)}`,"aria-label":ge?`Hide drawings`:`Show drawings`,"aria-pressed":ge,onClick:()=>ve(e=>!e),children:`✎`}),Re.length>0&&(0,D.jsx)(Zm,{className:`dg-legend-toggle-btn${Fe?``:` dg-legend-toggle-btn-off`}`,title:`${Fe?`Hide legend`:`Show legend`}${cn(`legend`)}`,"aria-label":Fe?`Hide legend`:`Show legend`,"aria-pressed":Fe,onClick:()=>Ie(e=>!e),children:`▤`}),Xt&&(0,D.jsx)(Zm,{className:`dg-loop-toggle${Qt?``:` dg-loop-toggle-off`}`,title:`${Qt?`Hide loop badges`:`Show loop badges`}${cn(`loops`)}`,"aria-label":Qt?`Hide loop badges`:`Show loop badges`,"aria-pressed":Qt,onClick:()=>{Qt&&on.clear(),$t(e=>!e)},children:`↻`})]}),Qt&&Zt!==null&&dt!==null&&(0,D.jsx)(Die,{edges:Zt,...r.rough===void 0?{}:{rough:r.rough},nodeFilter:se?null:en}),i.overlay===`git-lanes`&&dt!==null&&(0,D.jsx)(kie,{model:e.model,plane:e.plane}),i.overlay===`order-bands`&&dt!==null&&(0,D.jsx)(gb,{model:e.model,direction:yt}),i.overlay===`time-axis`&&dt!==null&&(0,D.jsx)(loe,{model:e.model,plane:e.plane,today:e.today})]})})})})}function Foe(e){return(0,D.jsx)(Hm,{children:(0,D.jsx)(Poe,{...e})})}var Ioe={apiFetch:(e,t)=>window.fetch(e,t),urlState:{get:()=>window.location.hash,set:(e,t)=>{t?window.history.replaceState(null,``,e):window.location.hash=e},subscribe:e=>(window.addEventListener(`hashchange`,e),()=>window.removeEventListener(`hashchange`,e))},openLink:e=>{/^https?:/.test(e)&&window.open(e,`_blank`,`noopener`)},assetBase:`/api/assets/`,promptText:async(e,t)=>window.prompt(e,t),confirmDialog:async e=>window.confirm(e),notify:e=>window.alert(e)},Wb=()=>Ioe;function Gb(e,t={},n={}){let r={};for(let i of e){let e=t[i.name],a=cr(e)?e:void 0,o=a===void 0?{}:{layout:a},s=n[i.name],c=lr(s)?{drawings:s}:{};if(i.model===null||i.model.version!==1){r[i.name]={name:i.name,issues:i.issues.length>0?i.issues:[{message:`Not a version-1 diagram model`}],...o,...c};continue}let l=rr(i.model);r[i.name]=l.length>0?{name:i.name,issues:l,...o,...c}:{name:i.name,model:i.model,issues:[],...o,...c}}return r}function Loe(){let[e,t]=(0,v.useState)({}),[n,r]=(0,v.useState)({}),[i,a]=(0,v.useState)({}),o=(0,v.useMemo)(()=>({...e,...n,...i}),[e,n,i]),s=(0,v.useMemo)(()=>Object.keys(o).sort(),[o]),[c,l]=(0,v.useState)(!1),[u,d]=(0,v.useState)(new Set),[f,p]=(0,v.useState)(!1);return(0,v.useEffect)(()=>{let e=!0;return(async()=>{try{let n=Wb(),[r,i,a]=await Promise.all([n.apiFetch(`/api/diagrams`),n.apiFetch(`/api/layouts`),n.apiFetch(`/api/drawings`)]);if(!r.ok)return;let{diagrams:o=[]}=await r.json(),{layouts:s={}}=i.ok?await i.json():{layouts:{}},{drawings:c={}}=a.ok?await a.json():{drawings:{}};if(!e)return;t(Gb(o,s,c)),d(new Set(o.filter(e=>e.editable).map(e=>e.name))),p(!0)}catch{}finally{e&&l(!0)}})(),()=>{e=!1}},[]),{loaded:e,setLoaded:t,sources:n,setSources:r,drafts:i,setDrafts:a,artifacts:o,names:s,booted:c,ownedNames:u,setOwnedNames:d,canDesign:f}}function Kb(e){if(!e.startsWith(`#/`))return null;let t;try{t=e.slice(2).split(`/`).map(decodeURIComponent)}catch{return null}let[n,...r]=t;return n===void 0||n===``?null:{diagram:n,path:r.filter(e=>e!==``)}}function Roe(e,t){return`#/${[e,...t].map(encodeURIComponent).join(`/`)}`}function qb(e,t,n,r=String){let[i,a]=(0,v.useState)(()=>{let r=()=>typeof t==`function`?t():t;try{return n?.(localStorage.getItem(e))??r()}catch{return r()}});return(0,v.useEffect)(()=>{try{localStorage.setItem(e,r(i))}catch{}},[e,i]),[i,a]}var zoe=`diagc.selected`,Jb=(e,t)=>e.length===t.length&&e.every((e,n)=>e===t[n]),Boe=(e,t)=>e.length<t.length&&e.every((e,n)=>e===t[n]);function Voe({names:e,booted:t,leaveEditRef:n}){let[r]=(0,v.useState)(()=>Kb(Wb().urlState.get())),[i,a]=qb(zoe,``,e=>r?.diagram??e),[o,s]=(0,v.useState)(()=>r?.path??[]),c=(0,v.useRef)(r),l=(0,v.useRef)({selected:i,enteredPath:o});l.current={selected:i,enteredPath:o};let u=(0,v.useCallback)(e=>{let t=c.current;t!==null&&(Jb(e,t.path)?c.current=null:Boe(e,t.path)||(c.current=null)),s(e)},[]);return(0,v.useEffect)(()=>{t&&!e.includes(i)&&(a(e[0]??``),s([]))},[t,e,i,a,s]),(0,v.useEffect)(()=>{if(!t||i===``||!e.includes(i))return;let n=Roe(i,o);if(Wb().urlState.get()===n)return;let r=Kb(Wb().urlState.get()),a=c.current,s=r===null||!e.includes(r.diagram)||a!==null&&a.diagram===i&&Boe(o,a.path);c.current=null,Wb().urlState.set(n,s)},[t,i,o,e]),(0,v.useEffect)(()=>Wb().urlState.subscribe(()=>{let e=Kb(Wb().urlState.get());if(e===null)return;let t=l.current;e.diagram!==t.selected&&!n.current()||((e.diagram!==t.selected||!Jb(e.path,t.enteredPath))&&(c.current=e),a(e.diagram),s(e.path))}),[n,a,s]),{selected:i,setSelected:a,enteredPath:o,setEnteredPath:s,handleEnteredPathChange:u}}function Hoe(e,t){return{name:e,state:t,savedState:t,past:[],future:[]}}var Uoe=e=>e.state!==e.savedState;function Woe(e,t){if(t.type===`batch`&&t.commands.length===0)return e;try{let n=(e.state.model.planes??[]).length>0,{state:r,relationId:i}=Wr(e.state,t),a=r,o=r.model.planes??[];if(!n&&o.length===1){let e=o[0].id,t=r.layout.planes.default;if(t!==void 0){let{default:n,...i}=r.layout.planes;a={...a,layout:{...r.layout,planes:{...i,[e]:t}}}}let n=r.drawings.planes.default;if(n!==void 0){let{default:t,...i}=r.drawings.planes;a={...a,drawings:{...r.drawings,planes:{...i,[e]:n}}}}}let s=[...e.past,{command:t,stateBefore:e.state}].slice(-100),c=t.type===`add-relation`;return{...e,state:a,past:s,future:[],...c&&i!==void 0?{lastRelationId:i}:{},error:void 0}}catch(t){if(t instanceof be)return{...e,error:t.message};throw t}}function Yb(e){let t=e.past.at(-1);return t===void 0?e:{...e,state:t.stateBefore,past:e.past.slice(0,-1),future:[...e.future,{command:t.command,stateBefore:e.state}],error:void 0}}function Xb(e){let t=e.future.at(-1);return t===void 0?e:{...e,state:t.stateBefore,past:[...e.past,{command:t.command,stateBefore:e.state}].slice(-100),future:e.future.slice(0,-1),error:void 0}}function Zb(){let[e,t]=(0,v.useState)(null),n=(0,v.useRef)(null),r=(0,v.useCallback)(e=>{n.current=e,t(e)},[]),i=(0,v.useCallback)(e=>{let t=n.current;t!==null&&r(e(t))},[r]),a=(0,v.useCallback)(async()=>{let e=n.current;if(e===null)return{ok:!1,issues:[{message:`No editing session`}]};let t=rr(e.state.model);if(t.length>0)return{ok:!1,issues:t};let i=async(t,n)=>{let r=await Wb().apiFetch(`/api/${t}/${e.name}`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(n)});return r.ok?null:await r.json()},a=await i(`diagrams`,e.state.model);if(a!==null)return{ok:!1,issues:a.issues??[{message:`Save failed`}]};let o=await i(`layouts`,e.state.layout);if(o!==null)return{ok:!1,issues:o.issues??[{message:`Layout save failed`}]};if(e.state.drawings!==e.savedState.drawings){let t=await i(`drawings`,e.state.drawings);if(t!==null)return{ok:!1,issues:t.issues??[{message:`Drawings save failed`}]}}let s=n.current;return s!==null&&r({...s,savedState:e.state}),{ok:!0}},[r]);return{session:e,peek:()=>n.current,start:(e,t)=>r(Hoe(e,t)),stop:()=>r(null),dispatch:e=>i(t=>Woe(t,e)),undo:()=>i(e=>Yb(e)),redo:()=>i(e=>Xb(e)),canUndo:(e?.past.length??0)>0,canRedo:(e?.future.length??0)>0,dirty:e!==null&&Uoe(e),save:a}}function Qb({setDrafts:e,resetInspector:t,leaveEditRef:n}){let[r,i]=(0,v.useState)(!1),[a,o]=(0,v.useState)(null),[s,c]=(0,v.useState)(!1),l=Zb(),u=(0,v.useRef)(!1),d=(0,v.useRef)(()=>{}),f=(0,v.useRef)(null),p=(0,v.useRef)(!1),m=l.session,h=async t=>{try{let n=await Wb().apiFetch(`/api/diagrams/${t}/composed`);if(!n.ok)return;let{model:r}=await n.json();e(e=>{let n=e[t];return n===void 0?e:{...e,[t]:{...n,model:r}}})}catch{}},g=async()=>{if(!l.dirty||u.current)return!1;u.current=!0,c(!0);let t=l.session;try{let n=await l.save();if(!n.ok)return o(n.issues??[{message:`Save failed`}]),!1;if(o(null),t!==null){let{name:n,state:r}=t;e(e=>({...e,[n]:{name:n,model:r.model,layout:r.layout,drawings:r.drawings,issues:[]}})),p.current=!0}return!0}catch(e){return o([{message:pr(e)}]),!1}finally{u.current=!1,c(!1)}};d.current=()=>void g();let _=()=>{if(!r)return!0;let n=l.session,a=n!==null&&n.state.model.nodes.some(e=>e.include!==void 0);return l.dirty&&n!==null?(e(e=>({...e,[n.name]:{name:n.name,model:n.state.model,layout:n.state.layout,drawings:n.state.drawings,issues:[]}})),g().then(e=>{e&&a&&h(n.name)})):a&&p.current&&n!==null&&h(n.name),l.stop(),i(!1),t(),o(null),!0};return n.current=_,(0,v.useEffect)(()=>{if(!r||!l.dirty)return;let e=setTimeout(()=>d.current(),300);return()=>clearTimeout(e)},[r,m,l.dirty]),{editing:r,setEditing:i,editor:l,layoutApiRef:f,saveIssues:a,setSaveIssues:o,saving:s,doSave:g,enterEdit:(e,t,n,r)=>{t!==void 0&&(p.current=!1,l.start(e,{model:t,layout:n,drawings:r}),o(null),i(!0))},leaveEdit:_}}var $b=new Set([`activity-lane`,`activity-region`]),ex=new Set([`activity-frame`,...$b]),tx=(e,t)=>{let n=wr(e,t),r=wr(e,void 0);return e.containment.filter(e=>(e.plane??r)===n)};function nx(e,t,n,r,i){if(n===void 0)return;let a=t=>e.nodes.find(e=>e.id===t)?.type,o=a(n);if(o===void 0||!o.startsWith(`activity-`))return n;let s=tx(e,t);if(o===`activity-frame`){let e=s.filter(e=>e.parent===n&&a(e.child)===`activity-lane`).map(e=>e.child);if(e.length===0)return;if(r===void 0||i===void 0)return e[0];for(let t of e){let e=i(t);if(e!==void 0&&r.y<e.y+e.height)return t}return e[e.length-1]}if(ex.has(o))return n;let c=s.find(e=>e.child===n)?.parent;return c!==void 0&&$b.has(a(c)??``)?c:n}function Goe(e,t,n,r,i){if(t===void 0)return;let a=e.nodes.find(e=>e.id===t)?.type;if(a===void 0||!$b.has(a))return;let o=i(t);if(o===void 0)return;let s=a===`activity-lane`?L_.LANE_STRIP_W:0;return{x:Math.max(s,Math.round(n.x-o.x-r.width/2)),y:Math.max(0,Math.round(n.y-o.y-r.height/2))}}var Koe=`diagc/clipboard@1`,qoe=new Set([`activity-frame`,`activity-lane`,`activity-region`]);function rx(e,t){let n=wr(e,t),r=wr(e,void 0);return e.containment.filter(e=>(e.plane??r)===n)}function ix(e,t,n,r,i={}){let a=new Map(e.nodes.map(e=>[e.id,e])),o=rx(e,n),s=new Map(o.map(e=>[e.child,e.parent])),c=ge(o),l=new Set,u=r.filter(e=>a.has(e));for(let e=u.pop();e!==void 0;e=u.pop())l.has(e)||(l.add(e),u.push(...c.get(e)??[]));if(l.size===0)return null;let d=e.nodes.filter(e=>l.has(e.id)),f=t?.planes[Ar(e,n)]??{},p={},m={};for(let e of d){let n=f[e.id]??i[e.id];n!==void 0&&(p[e.id]={x:n.x,y:n.y});let r=t?.sizes?.[e.id];r!==void 0&&(m[e.id]={w:r.w,h:r.h})}return{format:Koe,nodes:d,containment:o.filter(e=>l.has(e.parent)&&l.has(e.child)).map(({parent:e,child:t})=>({parent:e,child:t})),roots:d.filter(e=>!l.has(s.get(e.id)??``)).map(e=>{let t=s.get(e.id);return t===void 0?{id:e.id}:{id:e.id,parent:t}}),relations:e.relations.filter(e=>l.has(e.from)&&l.has(e.to)),positions:p,sizes:m}}var ax=e=>JSON.stringify(e);function Joe(e){if(!e.includes(`diagc/clipboard@1`))return null;try{let t=JSON.parse(e);return t.format===`diagc/clipboard@1`&&Array.isArray(t.nodes)&&Array.isArray(t.roots)?t:null}catch{return null}}function ox(e,t,n){if(t.nodes.length===0)return null;let r=t=>t===void 0?void 0:e.nodes.find(e=>e.id===t)?.type,i=t=>t!==void 0&&e.nodes.some(e=>e.id===t),a=rx(e,n.plane),o=e=>a.find(t=>t.child===e)?.parent,s=new Set(t.nodes.map(e=>e.id)),c=i(n.selected)?n.selected:void 0,l=e=>a.some(t=>t.parent===e)||qoe.has(r(e)??``),u=e=>c!==void 0&&!s.has(c)?l(c)?c:o(c):c===void 0?i(e.parent)?e.parent:void 0:o(c),d=e=>{for(let t=e,n=0;t!==void 0&&n<64;t=o(t),n++)if(r(t)===`activity-frame`)return t},f={...e,nodes:[...e.nodes]},p=new Map;for(let e of t.nodes){let t=Se(f,e.id);p.set(e.id,t),f.nodes.push({id:t,name:``})}let m=new Set(e.layers.map(e=>e.id)),h=n.plane!==void 0&&!n.borrowsContainment?n.plane:void 0,g=n.plane===void 0?{}:{plane:n.plane},_=e=>{let{key:t,plane:r,layer:i,...a}=e,o=i!==void 0&&m.has(i)?i:n.penLayer??void 0;return{...a,id:p.get(e.id),...h===void 0?{}:{plane:h},...o===void 0?{}:{layer:o}}},v=[],y=new Set(t.roots.map(e=>e.id)),b=new Map;for(let r of t.roots){let i=u(r),a=t.nodes.find(e=>e.id===r.id)?.type;b.set(r.id,a===`activity-lane`?d(i):nx(e,n.plane,i))}let x=new Map(t.containment.map(e=>[e.child,e.parent]));for(let e of t.nodes)v.push({type:`add-node`,node:_(e)});for(let e of t.nodes){let t=y.has(e.id)?b.get(e.id):p.get(x.get(e.id)??``);t!==void 0&&v.push({type:`add-containment`,parent:t,child:p.get(e.id),...g})}let S=24*(n.repeat+1);for(let e of t.nodes){let n=t.positions[e.id];if(n!==void 0){let t=y.has(e.id)?S:0;v.push({type:`set-position`,nodeId:p.get(e.id),x:n.x+t,y:n.y+t,...g})}let r=t.sizes[e.id];r!==void 0&&v.push({type:`set-size`,nodeId:p.get(e.id),w:r.w,h:r.h})}let C=new Map;for(let e of t.relations){let t=p.get(e.from),r=p.get(e.to),i=C.get(`${t}->${r}`)??0;C.set(`${t}->${r}`,i+1);let a=e.layer!==void 0&&m.has(e.layer)?e.layer:n.penLayer??void 0;v.push({type:`add-relation`,from:t,to:r,opts:{kind:e.kind,...e.label===void 0?{}:{label:e.label},...a===void 0?{}:{layer:a},...e.description===void 0?{}:{description:e.description},...e.style===void 0?{}:{style:e.style},...e.polarity===void 0?{}:{polarity:e.polarity},...e.delay===void 0?{}:{delay:e.delay},...e.fromColumn===void 0?{}:{fromColumn:e.fromColumn},...e.toColumn===void 0?{}:{toColumn:e.toColumn}}}),e.labels!==void 0&&v.push({type:`update-relation`,id:`${t}->${r}#${i}`,patch:{labels:e.labels}})}return{command:{type:`batch`,commands:v},roots:t.roots.map(e=>p.get(e.id))}}function sx(e){if(e instanceof HTMLElement&&(e.isContentEditable||e.closest(`input, textarea, select, [contenteditable]`)!==null))return!0;let t=typeof window.getSelection==`function`?window.getSelection():null;return t!==null&&!t.isCollapsed&&t.toString()!==``}function cx(e){let t=(0,v.useRef)(e);t.current=e;let n=(0,v.useRef)(null);(0,v.useEffect)(()=>{if(!e.editing)return;let r=e=>{let r=t.current;if(e.clipboardData===null||sx(e.target))return;let i=r.editor.peek()?.state.model;if(i===void 0)return;let a=r.multiSelection.length>0?r.multiSelection:r.selection?.kind===`node`?[r.selection.id]:[],o=r.activePlaneManual?r.layoutApiRef.current?.snapshotPositions()??{}:{},s=ix(i,r.editor.peek()?.state.layout,r.activePlane,a,o);if(s===null)return;let c=ax(s);e.clipboardData.setData(`text/plain`,c),e.preventDefault(),n.current={text:c,count:0,roots:[]}},i=e=>{let r=t.current;if(e.clipboardData===null||sx(e.target))return;let i=e.clipboardData.getData(`text/plain`),a=Joe(i),o=r.editor.peek()?.state.model;if(a===null||o===void 0)return;e.preventDefault();let s=n.current?.text===i?n.current:null,c=s?.count??0,l=r.selection?.kind===`node`?r.selection.id:void 0,u=ox(o,a,{plane:r.activePlane,borrowsContainment:r.activePlaneBorrowsContainment,penLayer:r.penLayer,selected:l!==void 0&&s?.roots.includes(l)===!0?void 0:l,repeat:c});if(u===null)return;r.editor.dispatch(u.command),n.current={text:i,count:c+1,roots:u.roots};let d=u.roots[0];d!==void 0&&r.select({kind:`node`,id:d})};return document.addEventListener(`copy`,r),document.addEventListener(`paste`,i),()=>{document.removeEventListener(`copy`,r),document.removeEventListener(`paste`,i)}},[e.editing])}async function lx(e){let t=await Wb().apiFetch(`/api/assets`,{method:`POST`,headers:{"content-type":e.type},body:e});if(!t.ok){let e=await t.json().catch(()=>null);throw Error(e?.issues?.[0]?.message??`Image upload failed (${t.status})`)}return(await t.json()).name}async function ux(e){if(typeof createImageBitmap!=`function`)return null;try{let t=await createImageBitmap(e),n={w:t.width,h:t.height};if(t.close(),n.w<=0||n.h<=0)return null;let r=Math.max(n.w,n.h),i=r>240?240/r:r<40?40/r:1;return{w:Math.max(1,Math.round(n.w*i)),h:Math.max(1,Math.round(n.h*i))}}catch{return null}}var{DAY:dx,TITLE_H:fx}=qr,px=(e,t,n)=>Math.max(t,Math.min(n,e)),mx=e=>e===void 0?{}:{plane:e};function hx(e,t,n){let r=e.parent.get(n);return r===void 0?void 0:Nn(t.get(r))}function Yoe(e,t,n){let r=e.children.get(n);if(r===void 0)return;let i,a=e=>{i=i===void 0?e:{start:Math.min(i.start,e.start),end:Math.max(i.end,e.end)}};for(let e of r.zones){let n=Nn(t.get(e));n!==void 0&&a(n)}for(let e of r.events){let n=Pn(t.get(e));n!==void 0&&a({start:n,end:n})}return i}var Xoe=(e,t,n)=>({type:`set-plan-dates`,id:e,dates:{start:Mn(t.start+n),end:Mn(t.end+n)}}),Zoe=(e,t,n)=>({type:`set-plan-dates`,id:e,dates:{at:Mn(t+n)}});function Qoe(e,t,n,r){let i=In(e,t),a=new Map(e.nodes.map(e=>[e.id,e])),o=i.origin??0,s=[],c=new Set,l=Object.keys(n).sort((e,t)=>Ln(i,t).length-Ln(i,e).length);for(let e of l){let l=a.get(e),u=n[e],d=r[e];if(l===void 0||u===void 0||d===void 0||c.has(e))continue;let f=hx(i,a,e);if(Tn(l)){let n=Nn(l);if(n===void 0){let n=(f?.start??o)+Math.round(u.x/dx),r=n+14-1;f!==void 0&&(n=px(n,f.start,f.end),r=px(r,f.start,f.end)),s.push({type:`set-plan-dates`,id:e,dates:{start:Mn(n),end:Mn(r)}}),i.parent.has(e)||s.push({type:`set-position`,nodeId:e,x:Zr(n,o),y:Math.max(0,u.y),...mx(t)});continue}let r=Math.round(d.dx/dx);if(f!==void 0&&(r=px(r,f.start-n.start,f.end-n.end)),r!==0)for(let t of Ln(i,e)){let e=a.get(t),n=Nn(e),i=Pn(e);n===void 0?i!==void 0&&s.push(Zoe(t,i,r)):s.push(Xoe(t,n,r)),c.add(t)}i.parent.has(e)||s.push({type:`set-position`,nodeId:e,x:Zr(n.start+r,o),y:Math.max(0,u.y),...mx(t)})}else if(En(l)){let t=Pn(l);if(t===void 0)continue;let n=Math.round(d.dx/dx);f!==void 0&&(n=px(n,f.start-t,f.end-t)),n!==0&&s.push(Zoe(e,t,n))}else if(!Dn(l)){let n=i.parent.has(e);s.push({type:`set-position`,nodeId:e,x:n?Math.max(0,u.x):u.x,y:n?Math.max(fx,u.y):u.y,...mx(t)})}}return s.length===0?void 0:{type:`batch`,commands:s}}function $oe(e,t,n,r,i){let a=In(e,t),o=new Map(e.nodes.map(e=>[e.id,e])),s=o.get(n);if(s===void 0||!Tn(s))return;let c=Nn(s);if(c===void 0)return;let l=hx(a,o,n),u=Yoe(a,o,n),d=(l?.start??a.origin??0)+Math.round(r/dx);if(d!==c.start){let e=px(d,l?.start??-1/0,Math.min(u?.start??c.end,c.end));return e===c.start?void 0:{type:`set-plan-dates`,id:n,dates:{start:Mn(e)}}}let f=px(c.start+Math.round(i/dx)-1,Math.max(u?.end??c.start,c.start),l?.end??1/0);return f===c.end?void 0:{type:`set-plan-dates`,id:n,dates:{end:Mn(f)}}}function ese(e,t){let n=t===void 0?void 0:e.nodes.find(e=>e.id===t);return n!==void 0&&Tn(n)?n:void 0}function tse(e,t,n){let r=Se(e,`zone`),i=ese(e,n.selected),a=i===void 0?void 0:Nn(i),o=a?.start??jn(n.today),s=Math.min(o+14-1,a?.end??1/0);return{id:r,command:{type:`add-node`,node:{id:r,name:`Zone`,type:yn,...mx(t),metadata:{start:Mn(o),end:Mn(s)}},...i===void 0?{}:{parent:{id:i.id,...mx(t)}}}}}function nse(e,t,n){let r=Se(e,`event`),i=ese(e,n.selected),a=i===void 0?void 0:Nn(i),o=jn(n.today),s=a===void 0?o:px(o,a.start,a.end);return{id:r,command:{type:`add-node`,node:{id:r,name:`Event`,type:bn,...mx(t),metadata:{at:Mn(s)}},...i===void 0?{}:{parent:{id:i.id,...mx(t)}}}}}function rse(e,t,n,r){let i=Se(e,r);return{id:i,command:{type:`add-node`,node:{id:i,name:r,type:n,...mx(t)}}}}function ise(e,t,n,r){let i=e.relations.filter(e=>e.to===t&&e.kind===n).map(e=>({type:`delete-relation`,id:e.id}));return r!==null&&i.push({type:`add-relation`,from:r,to:t,opts:{kind:n}}),{type:`batch`,commands:i}}function ase(e,t,n,r){let i=e.relations.filter(e=>e.from===n&&e.to===t&&kn(e.kind));if(i.length===0||r!==null&&i.length===1&&i[0].kind===r)return;let[a,...o]=i,s=[r===null?{type:`delete-relation`,id:a.id}:{type:`update-relation`,id:a.id,patch:{kind:r}},...o.map(e=>({type:`delete-relation`,id:e.id}))];return s.length===1?s[0]:{type:`batch`,commands:s}}function ose(e,t,n){return Et(e,t).parentsOf.get(n)??[]}function sse(e,t,n,r,i){let a=new Map(e.nodes.map(e=>[e.id,e])),o=a.get(n),s=a.get(r);if(o===void 0||s===void 0||!Tn(s)||Tn(o)||En(o))return;if(Dn(o))return e.relations.some(e=>e.from===n&&e.to===r&&kn(e.kind))?void 0:{type:`add-relation`,from:n,to:r,opts:{kind:`executes`}};let c=ose(e,t,n);if(c.includes(r))return;let l=[];for(let e of c)l.push({type:`remove-containment`,parent:e,child:n,...mx(t)});return l.push({type:`add-containment`,parent:r,child:n,...mx(t)}),l.push({type:`set-position`,nodeId:n,x:Math.max(0,i.x),y:Math.max(fx,i.y),...mx(t)}),{type:`batch`,commands:l}}function cse(e,t,n,r,i){if(n!==`plan-zone`&&n!==`plan-event`)return;let a=In(e,t),o=ese(e,r.parentId),s=o===void 0?void 0:Nn(o),c=s===void 0?r.x!==void 0&&a.origin!==void 0?a.origin+Math.floor(r.x/dx):jn(i):s.start;return n===`plan-event`?{at:Mn(c)}:{start:Mn(c),end:Mn(Math.min(c+14-1,s?.end??1/0))}}function lse(e,t,n,r,i){if(r!==`plan-zone`&&r!==`plan-event`)return;let a=e.nodes.find(e=>e.id===n);if(a===void 0||(r===`plan-zone`?Nn({...a,type:r})!==void 0:Pn({...a,type:r})!==void 0))return;let o=cse(e,t,r,{parentId:In(e,t).parent.get(n)},i);return o===void 0?void 0:{type:`set-plan-dates`,id:n,dates:o}}function use(e,t,n){let r=e.template;return{id:t,name:e.name,...r.type===void 0?{}:{type:r.type},...r.color===void 0?{}:{color:r.color},...r.image===void 0?{}:{image:r.image},...r.shape===void 0?{}:{shape:r.shape},...r.columns===void 0?{}:{columns:r.columns},...n?.plane===void 0?{}:{plane:n.plane},...n?.layer===void 0?{}:{layer:n.layer}}}function dse(e){let t=e.template;return{type:t.type??null,color:t.color??null,image:t.image??null,shape:t.shape??null}}function fse(e,t){let n=t.trim().toLowerCase();if(n===``)return e.entries;let r=new Map(e.categories.map(e=>[e.id,`${e.name} ${e.group??``}`.toLowerCase()]));return e.entries.filter(e=>[e.name,...e.keywords??[],r.get(e.category)??``].join(` `).toLowerCase().includes(n))}function gx(e,t){let n=new Set(e.categories.map(e=>e.id)),r=new Set(e.entries.map(e=>e.id)),i=[...e.categories,...t.categories.filter(e=>!n.has(e.id))],a=new Set(i.map(e=>e.id));return{categories:i,entries:[...e.entries,...t.entries.filter(e=>!r.has(e.id)&&a.has(e.category))]}}function _x(e,t,n){let r=e.toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``)||n;if(!t.has(r))return r;let i=2;for(;t.has(`${r}-${i}`);)i++;return`${r}-${i}`}function vx(e,t){return e?.kind===`node`?e.id:t}function yx(e,t){let n=t.plane!==void 0&&!t.borrowsContainment;return{id:Se(e,t.kind),parent:t.parentId===void 0?void 0:{id:t.parentId,...t.plane===void 0?{}:{plane:t.plane}},scopedPlane:n?t.plane:void 0}}function bx(e,t){return{...e.scopedPlane===void 0?{}:{plane:e.scopedPlane},...t===null?{}:{layer:t}}}function xx({editor:e,layoutApiRef:t,setSelection:n,setRenameId:r,setLeftTab:i,requestLabelEdit:a,setSaveIssues:o,activePlane:s,activePlaneBorrowsContainment:c,activePlaneManual:l,penLayer:u,selection:d,drillRoot:f,model:p,lib:m,notation:h,today:g}){let _=()=>{let a=e.session?.state.model;if(a===void 0)return;let o=yx(a,{kind:`node`,plane:s,borrowsContainment:c,parentId:vx(d,f)});if(e.dispatch({type:`add-node`,node:{id:o.id,name:o.id,...bx(o,u)},...o.parent===void 0?{}:{parent:o.parent}}),l&&o.parent===void 0){let n=t.current?.viewportCenter();n!==void 0&&e.dispatch({type:`set-position`,nodeId:o.id,x:n.x-Or.width/2,y:n.y-Or.height/2,...s===void 0?{}:{plane:s}})}i(`properties`),n({kind:`node`,id:o.id}),r(o.id)},v=t=>{let r=e.session?.state.model;if(r===void 0)return;let i=yx(r,{kind:`node`,plane:s,borrowsContainment:c,parentId:vx(null,f)});return e.dispatch({type:`add-node`,node:{id:i.id,name:i.id,...bx(i,u)},...i.parent===void 0?{}:{parent:i.parent}}),i.parent===void 0&&e.dispatch({type:`set-position`,nodeId:i.id,x:t.x-Or.width/2,y:t.y-Or.height/2,...s===void 0?{}:{plane:s}}),n({kind:`node`,id:i.id}),i.id},y=(r,i)=>{let o=e.session?.state.model;if(o===void 0)return;let l=r.template.image!==void 0||r.template.shape!==void 0?`icon`:`node`,p=e=>t.current?.nodeBounds(e),m=nx(o,s,i?.parentId??(i?.position===void 0?vx(d,f):f),i?.position,p),_=yx(o,{kind:l,plane:s,borrowsContainment:c,parentId:m}),v=h===`plan`?cse(o,s,r.template.type,{...i?.position===void 0?{}:{x:i.position.x},...m===void 0?{}:{parentId:m}},g):void 0,y={...use(r,_.id,bx(_,u)),...v===void 0?{}:{metadata:v}},b={type:`add-node`,node:y,..._.parent===void 0?{}:{parent:_.parent}};if(y.type===`activity-frame`){let t={id:Se(o,`Lane 1`),name:`Lane 1`,type:`activity-lane`,...bx(_,u)},n=s===void 0?{}:{plane:s};e.dispatch({type:`batch`,commands:[b,{type:`add-node`,node:t,parent:{id:_.id,...n}}]})}else e.dispatch(b);r.template.width!==void 0&&r.template.height!==void 0&&e.dispatch({type:`set-size`,nodeId:_.id,w:r.template.width,h:r.template.height});let x=r.template.width??Or.width,S=r.template.height??Or.height,C=i?.position===void 0?void 0:Goe(o,_.parent?.id,i.position,{width:x,height:S},p);C!==void 0&&e.dispatch({type:`set-position`,nodeId:_.id,...C,...s===void 0?{}:{plane:s}}),_.parent===void 0&&i?.position!==void 0&&e.dispatch({type:`set-position`,nodeId:_.id,x:i.position.x-x/2,y:i.position.y-S/2,...s===void 0?{}:{plane:s}}),n({kind:`node`,id:_.id}),a(_.id)};return{addNode:_,createAt:v,placeFromLibrary:y,applyFromLibrary:t=>{if(d?.kind!==`node`)return;let n=d.id,r=dse(t),i={type:`set-node-details`,id:n,details:r},a=p!==void 0&&typeof r.type==`string`?lse(p,s,n,r.type,g):void 0;e.dispatch(a===void 0?i:{type:`batch`,commands:[i,a]}),t.template.width!==void 0&&t.template.height!==void 0&&e.dispatch({type:`set-size`,nodeId:n,w:t.template.width,h:t.template.height});let o=p?.nodes.find(e=>e.id===n);t.template.columns!==void 0&&(o?.columns===void 0||o.columns.length===0)&&e.dispatch({type:`set-table-columns`,id:n,columns:t.template.columns})},dropLibraryEntry:(e,t,n)=>{let r=m.library.entries.find(t=>t.id===e);r!==void 0&&y(r,{position:t,...n===void 0?{}:{parentId:n}})},addImages:async(t,r)=>{let i=[];for(let a of t)try{let t=await lx(a),i=await ux(a)??ie,o=e.peek()?.state.model;if(o===void 0)break;let l=yx(o,{kind:`image`,plane:s,borrowsContainment:c,parentId:void 0});e.dispatch({type:`add-node`,node:{id:l.id,name:a.name.replace(/\.[^.]*$/,``)||l.id,type:`image`,image:t,...bx(l,u)}}),e.dispatch({type:`set-size`,nodeId:l.id,w:i.w,h:i.h}),r!==void 0&&e.dispatch({type:`set-position`,nodeId:l.id,x:r.x-i.w/2,y:r.y-i.h/2,...s===void 0?{}:{plane:s}}),n({kind:`node`,id:l.id})}catch(e){i.push({message:pr(e)})}i.length>0&&o(i)}}}var Sx=/-copy(-\d+)?$/;function Cx(e,t){let n=e.replace(Sx,``);for(let e=1;;e++){let r=e===1?`${n}-copy`:`${n}-copy-${e}`;if(!t.has(r))return r}}function wx(e){let t=e.lastIndexOf(`/`);return t===-1?``:e.slice(0,t)}function Tx(e){return e.slice(e.lastIndexOf(`/`)+1)}function Ex(e){return e.split(`/`).join(` / `)}function Dx(e,t=``){let n=t.toLowerCase().split(/\s+/).filter(Boolean),r=new Map;for(let t of e){let e=t.toLowerCase();if(!n.every(t=>e.includes(t)))continue;let i=wx(t),a=r.get(i);a===void 0?r.set(i,[t]):a.push(t)}return[...r.keys()].sort().map(e=>({group:e,names:r.get(e).sort()}))}var Ox=e=>({version:1,id:e,name:e,nodes:[],containment:[],relations:[],layers:[],planes:[]});function kx({editing:e,selected:t,current:n,names:r,ownedNames:i,setOwnedNames:a,setDrafts:o,setLoaded:s,setSources:c,setSelected:l,setEnteredPath:u,setEditing:d,leaveEdit:f,resetView:p,editor:m}){return{newDiagram:async()=>{if(!f())return;let e=wx(t),n=e===``?``:`${e}/`,s=(await Wb().promptText(`New diagram name (lowercase, digits, - or /):`,n))?.trim();if(s===void 0||s===``||s.endsWith(`/`))return;if(r.includes(s)||i.has(s)){Wb().notify(`A diagram named '${s}' already exists.`);return}let c=Ox(s);if(!(await Wb().apiFetch(`/api/diagrams/${s}`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(c)})).ok){Wb().notify(`Could not create '${s}'`);return}o(e=>({...e,[s]:{name:s,model:c,issues:[]}})),a(e=>new Set(e).add(s)),l(s),u([]),p(),m.start(s,{model:c,layout:kr(),drawings:ur()}),d(!0)},renameDiagram:async()=>{if(e)return;let n=(await Wb().promptText(`Rename diagram to (lowercase, digits, - or /):`,t))?.trim();if(n===void 0||n===``||n===t)return;if(r.includes(n)||i.has(n)){Wb().notify(`A diagram named '${n}' already exists.`);return}if(!(await Wb().apiFetch(`/api/diagrams/${t}/rename`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({to:n})})).ok){Wb().notify(`Could not rename '${t}'`);return}let d=e=>{let r=e[t];if(r===void 0)return e;let{[t]:i,...a}=e;return{...a,[n]:{...r,name:n,...r.model===void 0?{}:{model:{...r.model,id:n,name:n}}}}};s(d),c(d),o(d),a(e=>{let r=new Set(e);return r.delete(t),r.add(n),r}),l(n),u(e=>[...e])},duplicateDiagram:async()=>{if(!f())return;let e=n?.model,s=n?.layout,c=n?.drawings;if(i.has(t)){let n=await Wb().apiFetch(`/api/diagrams/${t}`);if(!n.ok){Wb().notify(`Could not copy '${t}'`);return}let r=await n.json();e=r.model,s=r.layout,c=r.drawings}if(e===void 0)return;let h=Cx(t,new Set([...r,...i])),g={...e,id:h,name:h},_=(e,t)=>Wb().apiFetch(`/api/${e}/${h}`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(t)});if(!(await _(`diagrams`,g)).ok){Wb().notify(`Could not copy '${t}'`);return}let v=s??kr(),y=c??ur();s!==void 0&&await _(`layouts`,v),c!==void 0&&await _(`drawings`,y),o(e=>({...e,[h]:{name:h,model:g,layout:v,drawings:y,issues:[]}})),a(e=>new Set(e).add(h)),l(h),u([]),p(),m.start(h,{model:g,layout:v,drawings:y}),d(!0)},ejectDiagram:async()=>{if(!e&&await Wb().confirmDialog(`Eject '${t}' to TypeScript? The JSON source is replaced by a generated .diagram.ts and the diagram becomes read-only in the studio.`)){if(!(await Wb().apiFetch(`/api/diagrams/${t}/eject`,{method:`POST`})).ok){Wb().notify(`Could not eject '${t}'`);return}a(e=>{let n=new Set(e);return n.delete(t),n})}}}}function Ax(e,t,n){let r=new Set(t);return e.some(e=>r.has(e))?n===void 0?e.filter(e=>!r.has(e)):[...new Set(e.map(e=>r.has(e)?n:e))]:e}function jx(e,t,n,r,i,a={}){let o=Ar(t,n),s=e??{version:1,planes:{}},c=Fr(Object.keys(r).length===0?s:{...s,planes:{...s.planes,[o]:{...s.planes[o],...r}}},o,a);return i===void 0?c:Pr(c,o,i)}var Mx=e=>Object.entries(e).filter(([,e])=>e===`expanded`).map(([e])=>e).sort();function Nx(e,t,n,r,i,a={}){let o=Ar(t,n),s=e??{version:1,planes:{}},{manual:c={},...l}=s;if(r===null){let{[o]:e,...t}=c;return Object.keys(t).length>0?{...l,manual:t}:l}let u=Fr({...l,planes:{...s.planes,[o]:{...s.planes[o],...r}},manual:{...c,[o]:!0}},o,a);return i===void 0?u:Pr(u,o,i)}function Px({editor:e,model:t,layout:n,pins:r,selection:i,groupSel:a,editing:o,notation:s,activePlane:c,activePlaneBorrowsContainment:l,planes:u,activeLayer:d,activeLayers:f,setSelection:p,setRenameId:m,setLeverageFocus:h,setCompareId:g,setPlane:_,setPins:v,setLayoutPreview:y,setActiveLayers:b,setActiveLayer:x}){let S=e=>{p(e),h(null),g(null),m(t=>t!==null&&e?.kind===`node`&&e.id===t?t:null)};return{select:S,compareSelect:e=>{o||s!==`causal-loop`||i?.kind!==`node`||e===i.id||(h(null),g(t=>t===e?null:e))},groupSelected:async()=>{if(a.length<2||t===void 0)return;let n=(await Wb().promptText(`Group name:`,`group`))?.trim();if(n===void 0||n===``)return;let r=Se(t,n),i=c!==void 0&&!l;e.dispatch({type:`group-nodes`,node:{id:r,name:n,...i?{plane:c}:{}},memberIds:a,...i?{plane:c}:{}}),p({kind:`node`,id:r})},switchPlane:e=>{_(e),v(t===void 0?{}:jr(n,t,e)),S(null),b(Tr(u,e)),x(null)},activateLayer:e=>{x(e),e!==null&&b(t=>t.includes(e)?t:[...t,e])},mergeSelectedLayers:(t,n)=>{e.dispatch({type:`merge-layers`,sources:t,target:n});let r=new Set(t);d!==null&&r.has(d)&&x(n??null),b(e=>Ax(e,t,n))},toggleExpand:(t,n)=>{v(e=>({...e,[t]:n})),o&&e.dispatch({type:`set-unfolded`,ids:Mx({...r,[t]:n}),...c===void 0?{}:{plane:c}})},toggleLayer:e=>{d===e&&f.includes(e)&&x(null),b(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},resetView:()=>{_(void 0),v(t===void 0?{}:jr(n,t,void 0)),y({}),b(Tr(u,void 0)),x(null),S(null)}}}function Fx(e,t){let n=e.relations.find(e=>e.id===t);return n===void 0?null:dt(n)}function Ix(e){let t=1;for(;e.some(e=>e.id===`l${t}`);)t++;return`l${t}`}function Lx(e,t,n,r){return[...e,{id:Ix(e),text:t,t:n,side:r}]}function Rx(e,t,n){let r=n.trim()===``?e.filter(e=>e.id!==t):e.map(e=>e.id===t?{...e,text:n}:e);return r.length>0?r:null}function zx(e,t,n,r){return e.map(e=>e.id===t?{...e,t:n,side:r}:e)}function Bx(e,t,n){if(t===null)return null;if(t.kind===`node`){let r=e.nodes.find(e=>e.id===t.id);return r===void 0?null:{value:r.color??``,onChange:e=>n({type:`set-node-details`,id:r.id,details:{color:e===``?null:e}})}}let r=t.constituentIds??[t.id];if(r.length!==1)return null;let i=e.relations.find(e=>e.id===r[0]);return i===void 0?null:{value:i.style?.color??``,onChange:e=>{let t={...i.style??{}};e===``?delete t.color:t.color=e,n({type:`update-relation`,id:i.id,patch:{style:Object.keys(t).length>0?t:null}})}}}var Vx=new Set([`Shift`,`Control`,`Alt`,`Meta`,`AltGraph`,`CapsLock`,`OS`,`Dead`,`Unidentified`,``]),Hx={Slash:[`/`,`?`],Equal:[`=`,`+`],Minus:[`-`,`_`],BracketLeft:[`[`,`{`],BracketRight:[`]`,`}`],Backslash:[`\\`,`|`],Semicolon:[`;`,`:`],Quote:[`'`,`"`],Comma:[`,`,`<`],Period:[`.`,`>`],Backquote:["`",`~`]},Ux=`)!@#$%^&*(`;function Wx(e){let t=e.key;if(Vx.has(t))return null;if(t===` `)return{key:`Space`,shiftSpent:!1};if(t.length>1)return{key:t,shiftSpent:!1};if(/^[a-zA-Z]$/.test(t))return{key:t.toUpperCase(),shiftSpent:!1};if(t.charCodeAt(0)<128)return{key:t,shiftSpent:!0};let n=/^Key([A-Z])$/.exec(e.code);if(n!==null)return{key:n[1],shiftSpent:!1};let r=/^Digit(\d)$/.exec(e.code);if(r!==null)return e.shiftKey?{key:Ux[Number(r[1])],shiftSpent:!0}:{key:r[1],shiftSpent:!1};let i=Hx[e.code];return i===void 0?null:{key:e.shiftKey?i[1]:i[0],shiftSpent:!0}}function Gx(e,t){let n=Wx(e);if(n===null)return null;let r=[];return(t?e.metaKey:e.ctrlKey)&&r.push(`Mod`),(t?e.ctrlKey:e.metaKey)&&r.push(t?`Ctrl`:`Meta`),e.altKey&&r.push(`Alt`),e.shiftKey&&!n.shiftSpent&&r.push(`Shift`),r.push(n.key),r.join(`+`)}function Kx(e){if(e===`+`)return{mods:[],key:`+`};if(e.endsWith(`++`))return{mods:e.slice(0,-2).split(`+`),key:`+`};let t=e.split(`+`);return{mods:t.slice(0,-1),key:t[t.length-1]??``}}var qx={Escape:`Esc`,ArrowUp:`↑`,ArrowDown:`↓`,ArrowLeft:`←`,ArrowRight:`→`},Jx={Ctrl:`⌃`,Alt:`⌥`,Shift:`⇧`,Mod:`⌘`},Yx=[`Ctrl`,`Alt`,`Shift`,`Mod`];function Xx(e,t){let{mods:n,key:r}=Kx(e),i=qx[r]??r;return t?Yx.filter(e=>n.includes(e)).map(e=>Jx[e]).join(``)+i:[...n.map(e=>e===`Mod`?`Ctrl`:e),i].join(`+`)}var Zx=()=>typeof navigator<`u`&&/Mac|iPhone|iPad/.test(navigator.platform),Qx=[`Diagram`,`Editing`,`Tools`,`Canvas`,`Arrange`,`Window`],$x=[{id:`diagram.picker`,label:`Open diagram picker`,group:`Diagram`,scope:`both`,defaults:[`Mod+K`],inFields:!0},{id:`diagram.toggle-edit`,label:`Edit / Done`,group:`Diagram`,scope:`both`,defaults:[`Mod+Enter`]},{id:`diagram.rename`,label:`Rename diagram`,group:`Diagram`,scope:`view`,defaults:[`F2`]},{id:`diagram.new`,label:`New diagram`,group:`Diagram`,scope:`both`,defaults:[]},{id:`diagram.duplicate`,label:`Duplicate diagram`,group:`Diagram`,scope:`view`,defaults:[]},{id:`diagram.eject`,label:`Eject to TypeScript`,group:`Diagram`,scope:`view`,defaults:[]},{id:`edit.add-node`,label:`Add node`,group:`Editing`,scope:`edit`,defaults:[`N`]},{id:`edit.add-child`,label:`Add the expected child`,group:`Editing`,scope:`edit`,defaults:[`Tab`]},{id:`edit.undo`,label:`Undo`,group:`Editing`,scope:`edit`,defaults:[`Mod+Z`],repeat:!0},{id:`edit.redo`,label:`Redo`,group:`Editing`,scope:`edit`,defaults:[`Mod+Shift+Z`,`Mod+Y`],repeat:!0},{id:`edit.save`,label:`Save`,group:`Editing`,scope:`edit`,defaults:[`Mod+S`]},{id:`edit.group`,label:`Group selection`,group:`Editing`,scope:`edit`,defaults:[`Mod+G`]},{id:`edit.relayout`,label:`Re-layout`,group:`Editing`,scope:`edit`,defaults:[]},{id:`edit.toggle-auto-layout`,label:`Auto-layout on/off`,group:`Editing`,scope:`edit`,defaults:[]},{id:`edit.toggle-notes`,label:`Open/close all threat notes`,group:`Editing`,scope:`edit`,defaults:[]},{id:`tool.select`,label:`Select`,group:`Tools`,scope:`edit`,defaults:[`V`]},{id:`tool.pen`,label:`Pen`,group:`Tools`,scope:`edit`,defaults:[`P`]},{id:`tool.eraser`,label:`Eraser`,group:`Tools`,scope:`edit`,defaults:[`E`]},{id:`pen.thin`,label:`Pen width: thin`,group:`Tools`,scope:`edit`,defaults:[]},{id:`pen.medium`,label:`Pen width: medium`,group:`Tools`,scope:`edit`,defaults:[]},{id:`pen.thick`,label:`Pen width: thick`,group:`Tools`,scope:`edit`,defaults:[]},{id:`canvas.fit`,label:`Fit view`,group:`Canvas`,scope:`both`,defaults:[`F`]},{id:`canvas.zoom-in`,label:`Zoom in`,group:`Canvas`,scope:`both`,defaults:[`=`,`+`],repeat:!0},{id:`canvas.zoom-out`,label:`Zoom out`,group:`Canvas`,scope:`both`,defaults:[`-`],repeat:!0},{id:`canvas.laser`,label:`Laser pointer`,group:`Canvas`,scope:`both`,defaults:[`L`]},{id:`canvas.legend`,label:`Show/hide legend`,group:`Canvas`,scope:`both`,defaults:[`Shift+L`]},{id:`canvas.dim`,label:`Dim unconnected on select`,group:`Canvas`,scope:`both`,defaults:[]},{id:`canvas.drawings`,label:`Show/hide drawings`,group:`Canvas`,scope:`both`,defaults:[]},{id:`canvas.loops`,label:`Show/hide loop badges`,group:`Canvas`,scope:`both`,defaults:[]},{id:`view.freeze`,label:`Freeze / unfreeze layout`,group:`Canvas`,scope:`view`,defaults:[]},{id:`view.save-positions`,label:`Save positions`,group:`Canvas`,scope:`view`,defaults:[]},{id:`view.auto-arrange`,label:`Auto-arrange`,group:`Canvas`,scope:`view`,defaults:[]},{id:`arrange.align-left`,label:`Align left`,group:`Arrange`,scope:`both`,defaults:[]},{id:`arrange.align-center`,label:`Align centre`,group:`Arrange`,scope:`both`,defaults:[]},{id:`arrange.align-right`,label:`Align right`,group:`Arrange`,scope:`both`,defaults:[]},{id:`arrange.align-top`,label:`Align top`,group:`Arrange`,scope:`both`,defaults:[]},{id:`arrange.align-middle`,label:`Align middle`,group:`Arrange`,scope:`both`,defaults:[]},{id:`arrange.align-bottom`,label:`Align bottom`,group:`Arrange`,scope:`both`,defaults:[]},{id:`arrange.distribute-x`,label:`Distribute horizontally`,group:`Arrange`,scope:`both`,defaults:[]},{id:`arrange.distribute-y`,label:`Distribute vertically`,group:`Arrange`,scope:`both`,defaults:[]},{id:`window.left-dock`,label:`Show/hide left panel`,group:`Window`,scope:`both`,defaults:[`[`]},{id:`window.right-dock`,label:`Show/hide right panel`,group:`Window`,scope:`both`,defaults:[`]`]},{id:`window.inspector-properties`,label:`Inspector: Properties`,group:`Window`,scope:`edit`,defaults:[]},{id:`window.inspector-library`,label:`Inspector: Library`,group:`Window`,scope:`edit`,defaults:[]},{id:`window.theme`,label:`Light / dark`,group:`Window`,scope:`both`,defaults:[`Shift+T`]},{id:`window.snap`,label:`Snap to grid`,group:`Window`,scope:`both`,defaults:[`Shift+S`]},{id:`window.hotkeys`,label:`Keyboard shortcuts`,group:`Window`,scope:`both`,defaults:[`?`]}],pse=new Map($x.map(e=>[e.id,e])),eS=e=>pse.get(e),tS=[{label:`Back to Select, laser off, cancel`,keys:`Esc`},{label:`Delete the selection (edit mode)`,keys:`Delete / Backspace`},{label:`Copy / paste the selection (edit mode)`,keys:`Ctrl/Cmd + C / V`},{label:`Nudge the selection`,keys:`Arrows (Shift = ×4)`},{label:`Add to the selection, marquee-select`,keys:`Shift + click / drag`},{label:`Move a box or an edge label in view mode`,keys:`Alt + drag`},{label:`Commit / cancel a name being typed`,keys:`Enter / Esc`},{label:`Bold / italic in a label`,keys:`Ctrl/Cmd + B / I`}],nS=`diagc.hotkeys`;function rS(e){return Object.fromEntries($x.map(t=>[t.id,e[t.id]??t.defaults]))}var mse={Escape:{id:`tool.select`,mode:`edit`}},iS=(e,t)=>e===`both`||e===t;function hse(e,t,n){let r=mse[t];return r===void 0?$x.find(r=>iS(r.scope,n)&&e[r.id].includes(t))?.id:r.mode===n?r.id:void 0}var aS=(e,t)=>e===`both`||t===`both`||e===t;function oS(e,t,n){let r=eS(t).scope;return $x.filter(i=>i.id!==t&&aS(i.scope,r)&&e[i.id].includes(n)).map(e=>e.id)}var gse=/^(Shift\+)?(Escape|Delete|Backspace|ArrowUp|ArrowDown|ArrowLeft|ArrowRight)$/,_se=new Set([`Mod+C`,`Mod+V`]),vse=new Set([`Enter`,`Space`]),yse=new Set([`Mod+N`,`Mod+T`,`Mod+W`,`Mod+Shift+N`,`Mod+Shift+T`,`Mod+Shift+W`,`Mod+Tab`,`Mod+Shift+Tab`,`Mod+Q`,`F11`]);function bse(e){return gse.test(e)||_se.has(e)?`This key has a fixed meaning in the studio.`:vse.has(e)?`Enter and Space press the focused button, so the action would run twice.`:yse.has(e)?`The browser keeps this key for itself.`:null}function sS(e,t,n){let r={...e},i=eS(t).defaults;return n.length===i.length&&n.every((e,t)=>e===i[t])?delete r[t]:r[t]=[...n],r}var cS=new Set($x.map(e=>e.id));function lS(e){if(e===null)return null;try{let t=JSON.parse(e);if(typeof t!=`object`||!t||Array.isArray(t))return null;let n={};for(let[e,r]of Object.entries(t))cS.has(e)&&Array.isArray(r)&&r.every(e=>typeof e==`string`)&&(n[e]=r);return n}catch{return null}}var uS=(0,v.createContext)({keymap:rS({}),mac:!1}),dS=(e,t,n)=>{let r=e[t][0];return r===void 0?``:Xx(r,n)},fS=(e,t,n)=>{let r=dS(e,t,n);return r===``?``:` (${r})`};function pS(){let{keymap:e,mac:t}=(0,v.useContext)(uS);return n=>fS(e,n,t)}var xse=`diagc.pickerCollapsed`;function Sse(e){if(e===null)return null;try{let t=JSON.parse(e);return Array.isArray(t)&&t.every(e=>typeof e==`string`)?t:null}catch{return null}}function mS({names:e,selected:t,onSelect:n,toggleRef:r}){let[i,a]=(0,v.useState)(!1),[o,s]=(0,v.useState)(``),[c,l]=(0,v.useState)(null),[u,d]=qb(xse,[],Sse,JSON.stringify),f=(0,v.useRef)(null),p=(0,v.useRef)(null),m=(0,v.useRef)(null),h=(0,v.useRef)(null),g=(0,v.useId)(),_=o.trim()!==``,y=Dx(e,o),b=e=>!_&&e!==``&&u.includes(e),x=y.flatMap(e=>b(e.group)?[]:e.names),S=c!==null&&x.includes(c)?c:x[0],C=e=>`${g}-opt-${e}`,w=()=>{s(``),l(t);let e=wx(t);d(t=>t.includes(e)?t.filter(t=>t!==e):t),a(!0)},T=e=>{a(!1),e&&p.current?.focus()},E=e=>{T(!0),e!==t&&n(e)};r!==void 0&&(r.current=()=>i?T(!0):w());let ee=pS();(0,v.useEffect)(()=>{if(!i)return;m.current?.focus();let e=e=>{f.current?.contains(e.target)||T(!1)};return document.addEventListener(`mousedown`,e,!0),()=>document.removeEventListener(`mousedown`,e,!0)},[i]),(0,v.useEffect)(()=>{!i||S===void 0||h.current?.querySelector(`[data-active="true"]`)?.scrollIntoView?.({block:`nearest`})},[i,S]);let te=e=>{if(e.key===`Escape`)e.preventDefault(),T(!0);else if(e.key===`Enter`)e.preventDefault(),S!==void 0&&E(S);else if(e.key===`ArrowDown`||e.key===`ArrowUp`){if(e.preventDefault(),S===void 0)return;let t=x.indexOf(S)+(e.key===`ArrowDown`?1:-1);l(x[Math.min(x.length-1,Math.max(0,t))])}},ne=e=>d(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e]),re=wx(t);return(0,D.jsxs)(`div`,{className:`diagram-picker`,ref:f,children:[(0,D.jsxs)(`button`,{ref:p,type:`button`,className:`diagram-picker-trigger`,"aria-label":`Diagram: ${t===``?`none`:t}`,"aria-haspopup":`listbox`,"aria-expanded":i,title:`Switch diagram${ee(`diagram.picker`)}`,onClick:()=>i?T(!1):w(),children:[re!==``&&(0,D.jsxs)(`span`,{className:`diagram-picker-folder`,children:[Ex(re),` / `]}),t===``?(0,D.jsx)(`span`,{className:`diagram-picker-folder`,children:`No diagram`}):(0,D.jsx)(`span`,{className:`diagram-picker-name`,children:Tx(t)}),(0,D.jsx)(`span`,{className:`diagram-picker-caret`,"aria-hidden":`true`,children:`▾`})]}),i&&(0,D.jsxs)(`div`,{className:`diagram-picker-pop`,children:[(0,D.jsx)(`input`,{ref:m,className:`diagram-picker-search`,role:`combobox`,"aria-label":`Search diagrams`,"aria-expanded":`true`,"aria-controls":`${g}-list`,"aria-autocomplete":`list`,...S===void 0?{}:{"aria-activedescendant":C(S)},placeholder:`Search diagrams…`,value:o,onChange:e=>{s(e.target.value),l(null)},onKeyDown:te}),(0,D.jsxs)(`div`,{className:`diagram-picker-list`,role:`listbox`,id:`${g}-list`,"aria-label":`Diagrams`,ref:h,children:[y.length===0&&(0,D.jsx)(`div`,{className:`diagram-picker-empty`,children:`No diagrams match`}),y.map(e=>{let n=`${g}-grp-${e.group}`,r=b(e.group);return(0,D.jsxs)(`div`,{role:`group`,...e.group===``?{"aria-label":`Ungrouped`}:{"aria-labelledby":n},children:[e.group!==``&&(0,D.jsxs)(`button`,{type:`button`,id:n,className:`diagram-picker-group`,"aria-expanded":!r,onMouseDown:e=>e.preventDefault(),onClick:()=>ne(e.group),children:[(0,D.jsx)(`span`,{className:`diagram-picker-caret`,"aria-hidden":`true`,children:r?`▸`:`▾`}),Ex(e.group),(0,D.jsx)(`span`,{className:`diagram-picker-count`,"aria-hidden":`true`,children:e.names.length})]}),!r&&e.names.map(n=>(0,D.jsx)(`div`,{id:C(n),role:`option`,"aria-selected":n===t,"data-name":n,"data-active":n===S,className:`diagram-picker-row${e.group===``?``:` nested`}`,onMouseDown:e=>e.preventDefault(),onMouseMove:()=>l(n),onClick:()=>E(n),children:Tx(n)},n))]},e.group)})]})]})]})}var hS=[[`#efb0b0`,`#e05d5d`,`#b83d3d`],[`#f0cfa3`,`#e0a75d`,`#b87c33`],[`#f2e39a`,`#e5c945`,`#b89a1f`],[`#a8dcab`,`#66bb6a`,`#3f8f43`],[`#a0d0f9`,`#42a5f5`,`#1f78c8`],[`#d3a3dd`,`#ab47bc`,`#7e2f8e`],[`#c2c2c2`,`#8d8d8d`,`#5c5c5c`]],gS=hS.map(e=>e[1]),_S=[0,1,2].flatMap(e=>hS.map(t=>t[e]));function vS({label:e,value:t,options:n,onChange:r}){return(0,D.jsxs)(`div`,{className:`field`,children:[(0,D.jsx)(`span`,{children:e}),(0,D.jsx)(`div`,{className:`picker-row`,role:`group`,"aria-label":e,children:n.map(e=>(0,D.jsx)(`button`,{type:`button`,className:`picker-btn${t===e.value?` active`:``}`,title:e.title,"aria-label":e.title,"aria-pressed":t===e.value,onClick:()=>r(e.value),children:e.glyph},e.value===``?`(default)`:e.value))})]})}function yS({label:e=`Color`,value:t,onChange:n}){let[r,i]=(0,v.useState)(t);(0,v.useEffect)(()=>{i(t)},[t]);let a=()=>{let e=r.trim();e!==t&&n(e)};return(0,D.jsxs)(`div`,{className:`field`,children:[(0,D.jsx)(`span`,{children:e}),(0,D.jsxs)(`div`,{role:`group`,"aria-label":e,children:[(0,D.jsxs)(`div`,{className:`picker-row`,children:[(0,D.jsx)(`button`,{type:`button`,className:`picker-btn${t===``?` active`:``}`,title:`Auto (default color)`,"aria-label":`Auto ${e.toLowerCase()}`,"aria-pressed":t===``,onClick:()=>n(``),children:`∅`}),(0,D.jsx)(`input`,{className:`swatch-text`,"aria-label":`${e} value`,placeholder:`#hex`,value:r,onChange:e=>i(e.target.value),onBlur:a,onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),a())}})]}),(0,D.jsx)(`div`,{className:`swatch-grid`,children:_S.map(r=>(0,D.jsx)(`button`,{type:`button`,className:`picker-btn swatch${t===r?` active`:``}`,style:{background:r},title:r,"aria-label":`${e} ${r}`,"aria-pressed":t===r,onClick:()=>n(r)},r))})]})]})}function bS({label:e,autoTitle:t,value:n,onChange:r}){return(0,D.jsxs)(`span`,{className:`picker-row toolbar-colors`,role:`group`,"aria-label":e,children:[(0,D.jsx)(`button`,{type:`button`,className:`picker-btn${n===``?` active`:``}`,title:t,"aria-pressed":n===``,onClick:()=>r(``),children:`∅`}),gS.map(e=>(0,D.jsx)(`button`,{type:`button`,className:`picker-btn swatch${n===e?` active`:``}`,style:{background:e},title:e,"aria-label":`Color ${e}`,"aria-pressed":n===e,onClick:()=>r(e)},e))]})}function xS({editor:e,onExit:t,onSave:n,saving:r=!1,saveIssues:i,selectionColor:a,tool:o,onSetTool:s,pen:c,onSetPen:l,drawingDisabled:u}){let d=e.session?.error,f=pS();return(0,D.jsxs)(`div`,{className:`editor-toolbar`,role:`toolbar`,"aria-label":`Editor`,children:[(0,D.jsx)(`button`,{className:`chip`,onClick:t,title:`Leave edit mode${f(`diagram.toggle-edit`)}`,children:`Done`}),(0,D.jsx)(`span`,{className:`sep`}),(0,D.jsx)(`span`,{className:`tool-group`,role:`group`,"aria-label":`Canvas tool`,children:[[`select`,`Select`,`Select and move${f(`tool.select`)} — Esc also gets you here`],[`pen`,`Pen`,u?`Drawings are shown at the top level only — leave the drilled view to draw`:`Draw freehand${f(`tool.pen`)}`],[`eraser`,`Eraser`,u?`Drawings are shown at the top level only — leave the drilled view to erase`:`Click a stroke to erase it${f(`tool.eraser`)}`]].map(([e,t,n])=>(0,D.jsx)(`button`,{type:`button`,className:`chip${o===e?` active`:``}`,"aria-pressed":o===e,title:n,disabled:e!==`select`&&u,onClick:()=>s(e),children:t},e))}),o===`pen`&&(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(bS,{label:`Pen color`,autoTitle:`Auto (theme ink)`,value:c.color,onChange:e=>l({color:e})}),(0,D.jsx)(`span`,{className:`tool-group`,role:`group`,"aria-label":`Pen width`,children:[[2,`Thin`],[3,`Medium`],[6,`Thick`]].map(([e,t])=>(0,D.jsx)(`button`,{type:`button`,className:`chip${c.width===e?` active`:``}`,"aria-pressed":c.width===e,onClick:()=>l({width:e}),children:t},e))})]}),(0,D.jsx)(`span`,{className:`sep`}),(0,D.jsx)(`button`,{className:`chip`,onClick:()=>e.undo(),disabled:!e.canUndo,title:`Undo${f(`edit.undo`)}`,children:`Undo`}),(0,D.jsx)(`button`,{className:`chip`,onClick:()=>e.redo(),disabled:!e.canRedo,title:`Redo${f(`edit.redo`)}`,children:`Redo`}),(0,D.jsx)(`button`,{className:`chip primary`,onClick:n,disabled:!e.dirty||r,title:`Save${f(`edit.save`)}`,children:`Save`}),(0,D.jsx)(`span`,{className:`save-status`,"aria-live":`polite`,children:r?`Saving…`:e.dirty?`Unsaved…`:`Saved`}),a!==null&&(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(`span`,{className:`sep`}),(0,D.jsx)(bS,{label:`Selection color`,autoTitle:`Auto (default color)`,value:a.value,onChange:a.onChange})]}),(0,D.jsx)(`span`,{className:`spacer`}),d!==void 0&&(0,D.jsx)(`span`,{className:`toolbar-error`,children:d}),i!==null&&i.length>0&&(0,D.jsx)(`span`,{className:`toolbar-error`,children:i.map(e=>e.message).join(`; `)})]})}async function SS(e,t){let n=t.activePlane===void 0?{}:{plane:t.activePlane};if(t.autoLayout){if(!await Wb().confirmDialog(`Clear all pinned positions on this plane and re-layout?`))return;e.dispatch({type:`clear-positions`,...n})}else{if(!await Wb().confirmDialog(`Re-arrange this plane and re-pin every node?`))return;e.dispatch({type:`set-positions`,positions:t.getAutoPositions(),...n})}}function CS({editor:e,onToggleAutoLayout:t,...n}){let r=pS();return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(`button`,{className:`chip`,onClick:()=>void SS(e,n),title:`Re-layout${r(`edit.relayout`)}`,children:`Re-layout`}),(0,D.jsx)(`button`,{type:`button`,className:`chip${n.autoLayout?` active`:``}`,"aria-pressed":n.autoLayout,title:`${n.autoLayout?`Automatic layout is ON — connecting nodes can re-arrange the diagram. Click to freeze positions.`:`Manual layout — nodes stay where you put them. Click to re-enable automatic layout.`}${r(`edit.toggle-auto-layout`)}`,onClick:t,children:`Auto-layout`})]})}function wS({id:e,title:t,label:n,className:r,children:i}){let[a,o]=qb(`diagc.dockSection.${e}`,!1,e=>e===null?null:e===`collapsed`,e=>e?`collapsed`:`expanded`),s=(0,v.useId)(),c=`${s}-header`,l=`${s}-panel`;return(0,D.jsxs)(`section`,{className:`dock-section${a?` folded`:``}`,children:[(0,D.jsx)(`h2`,{className:`dock-section-title`,children:(0,D.jsxs)(`button`,{type:`button`,id:c,"aria-expanded":!a,...a?{}:{"aria-controls":l},onClick:()=>o(e=>!e),children:[(0,D.jsx)(`span`,{className:`dock-section-caret`,"aria-hidden":`true`,children:a?`▸`:`▾`}),t]})}),!a&&(0,D.jsx)(`aside`,{id:l,className:r,...n===void 0?{"aria-labelledby":c}:{"aria-label":n},children:i})]})}var TS=[{value:`layered`,label:`Layered`},{value:`force`,label:`Force`},{value:`mrtree`,label:`Tree`},{value:`rectpacking`,label:`Packed`}],ES={stress:`Stress`},DS=[{value:`DOWN`,label:`Down ↓`},{value:`RIGHT`,label:`Right →`},{value:`LEFT`,label:`Left ←`},{value:`UP`,label:`Up ↑`}],OS=[{value:``,label:`Off`},{value:`1`,label:`Square`},{value:`1.6`,label:`Screen`},{value:`2`,label:`Wide`}];function kS({settings:e,onChange:t,defaultDirection:n=`DOWN`,algorithmLocked:r,defaultAlgorithm:i=`layered`}){let a=r===!0?`layered`:e.algorithm??i,o=e.direction??n,s=e.edgeRouting??`curved`,c=e.aspectRatio===void 0?``:String(e.aspectRatio),l=OS.some(e=>e.value===c)?OS:[...OS,{value:c,label:`${c} (custom)`}],u=TS.some(e=>e.value===i)?TS:[...TS,{value:i,label:ES[i]??i}],d=u.some(e=>e.value===a)?u:[...u,{value:a,label:`${a} (withdrawn)`}];return(0,D.jsxs)(D.Fragment,{children:[r!==!0&&(0,D.jsxs)(`label`,{className:`layout-row`,children:[(0,D.jsx)(`span`,{children:`Algorithm`}),(0,D.jsx)(`select`,{className:`chip-select`,"aria-label":`Layout algorithm`,title:`Layout algorithm`,value:a,onChange:e=>t({algorithm:e.target.value===i?void 0:e.target.value}),children:d.map(e=>(0,D.jsx)(`option`,{value:e.value,children:e.label},e.value))})]}),a===`layered`&&(0,D.jsxs)(`label`,{className:`layout-row`,children:[(0,D.jsx)(`span`,{children:`Direction`}),(0,D.jsx)(`select`,{className:`chip-select`,"aria-label":`Layout direction`,title:`Layout direction`,value:o,onChange:e=>t({direction:e.target.value===n?void 0:e.target.value}),children:DS.map(e=>(0,D.jsx)(`option`,{value:e.value,children:e.label},e.value))})]}),a===`layered`&&(0,D.jsxs)(`label`,{className:`layout-row`,children:[(0,D.jsx)(`span`,{children:`Wrap`}),(0,D.jsx)(`select`,{className:`chip-select`,"aria-label":`Wrap`,title:`Wrap long chains onto several rows, aiming at this width÷height`,value:c,onChange:e=>t({aspectRatio:e.target.value===``?void 0:Number(e.target.value)}),children:l.map(e=>(0,D.jsx)(`option`,{value:e.value,children:e.label},e.value))})]}),(0,D.jsxs)(`label`,{className:`layout-row`,children:[(0,D.jsx)(`span`,{children:`Spacing`}),(0,D.jsx)(`input`,{type:`number`,className:`chip-num`,"aria-label":`Node spacing`,title:`Node spacing in px (blank = default)`,min:8,max:200,step:4,placeholder:`40`,value:e.spacing??``,onChange:e=>{let n=e.target.value.trim();t({spacing:n===``?void 0:Number(n)})}})]}),(0,D.jsxs)(`label`,{className:`layout-row`,children:[(0,D.jsx)(`span`,{children:`Edges`}),(0,D.jsxs)(`select`,{className:`chip-select`,"aria-label":`Edge routing`,title:`How routed edges turn their corners. Both follow the layout's route around boxes; an edge to a hand-placed box floats as a curve either way.`,value:s,onChange:e=>t({edgeRouting:e.target.value===`curved`?void 0:e.target.value}),children:[(0,D.jsx)(`option`,{value:`curved`,children:`Rounded`}),(0,D.jsx)(`option`,{value:`orthogonal`,children:`Square`})]})]})]})}function AS({controls:e,styleControl:t,children:n}){return(0,D.jsxs)(wS,{id:`layout`,title:`Layout & style`,className:`sidebar layout-panel`,children:[e!==null&&(0,D.jsx)(kS,{...e}),(0,D.jsxs)(`label`,{className:`layout-row`,children:[(0,D.jsx)(`span`,{children:`Style`}),t]}),jS(n)&&(0,D.jsx)(`div`,{className:`layout-actions`,children:n})]})}var jS=e=>Array.isArray(e)?e.some(jS):e!=null&&e!==!1&&e!==``;function Cse({label:e,items:t,children:n}){let[r,i]=(0,v.useState)(!1),a=(0,v.useRef)(null),o=(0,v.useRef)(null),s=(0,v.useRef)(null),c=(0,v.useId)(),l=e=>{i(!1),e&&o.current?.focus()};if((0,v.useEffect)(()=>{if(!r)return;s.current?.querySelector(`[role="menuitem"]`)?.focus();let e=e=>{a.current?.contains(e.target)||l(!1)};return document.addEventListener(`mousedown`,e,!0),()=>document.removeEventListener(`mousedown`,e,!0)},[r]),t.length===0)return null;let u=e=>{if(e.key===`Escape`)e.preventDefault(),l(!0);else if(e.key===`Tab`)l(!1);else if(e.key===`ArrowDown`||e.key===`ArrowUp`){e.preventDefault();let t=[...s.current?.querySelectorAll(`[role="menuitem"]`)??[]];t[(t.indexOf(document.activeElement)+(e.key===`ArrowDown`?1:-1)+t.length)%t.length]?.focus()}};return(0,D.jsxs)(`div`,{className:`menu-button`,ref:a,children:[(0,D.jsx)(`button`,{ref:o,type:`button`,className:`chip icon`,"aria-label":e,title:e,"aria-haspopup":`menu`,"aria-expanded":r,...r?{"aria-controls":c}:{},onClick:()=>r?l(!0):i(!0),children:n}),r&&(0,D.jsx)(`div`,{id:c,ref:s,className:`menu-button-pop`,role:`menu`,"aria-label":e,onKeyDown:u,children:t.map(e=>(0,D.jsx)(`button`,{type:`button`,role:`menuitem`,className:`menu-button-item`,...e.title===void 0?{}:{title:e.title},onClick:()=>{l(!0),e.onSelect()},children:e.label},e.id))})]})}function wse(e,t,n){let r={...e[t]};for(let[e,t]of Object.entries(n))t===void 0?delete r[e]:r[e]=t;let i={...e};return Object.keys(r).length===0?delete i[t]:i[t]=r,i}function MS(e,t,n,r){if(t===void 0)return e;let i=Ar(t,n),a=r[i];if(a===void 0||Object.keys(a).length===0)return e;let o=e??{version:1,planes:{}};return{...o,settings:{...o.settings,[i]:{...o.settings?.[i],...a}}}}function Tse({target:e,comment:t,onCommand:n}){let r=r=>n({type:`update-comment`,target:e,id:t.id,patch:r}),[i,a]=(0,v.useState)(t.text);(0,v.useEffect)(()=>a(t.text),[t.text]);let[o,s]=(0,v.useState)(t.by??``);return(0,v.useEffect)(()=>s(t.by??``),[t.by]),(0,D.jsxs)(`div`,{className:`comment`,children:[(0,D.jsx)(`textarea`,{"aria-label":`Comment ${t.id} text`,rows:2,value:i,onChange:e=>a(e.target.value),onBlur:()=>{let e=i.trim();if(e===``){a(t.text);return}e!==t.text&&r({text:e})}}),(0,D.jsxs)(`div`,{className:`comment-row`,children:[(0,D.jsx)(`input`,{"aria-label":`Comment ${t.id} author`,placeholder:`Author`,value:o,onChange:e=>s(e.target.value),onBlur:()=>{let e=o.trim();e!==(t.by??``)&&r({by:e===``?null:e})}}),(0,D.jsx)(`input`,{type:`date`,"aria-label":`Comment ${t.id} date`,value:t.at??``,onChange:e=>r({at:e.target.value===``?null:e.target.value})}),(0,D.jsx)(`button`,{type:`button`,className:`chip icon-btn`,"aria-label":`Remove comment ${t.id}`,title:`Remove comment`,onClick:()=>n({type:`remove-comment`,target:e,id:t.id}),children:`Remove`})]})]})}function Ese({target:e,comments:t,onCommand:n}){let[r,i]=(0,v.useState)(``);return(0,D.jsxs)(`section`,{className:`panel-section comments`,"aria-label":`Comments`,children:[(0,D.jsxs)(`h3`,{children:[`Comments `,(0,D.jsx)(`span`,{className:`so-hint`,children:t.length})]}),t.map(t=>(0,D.jsx)(Tse,{target:e,comment:t,onCommand:n},t.id)),(0,D.jsxs)(`div`,{className:`comment-add`,children:[(0,D.jsx)(`textarea`,{"aria-label":`New comment`,placeholder:`Comment`,rows:2,value:r,onChange:e=>i(e.target.value)}),(0,D.jsx)(`button`,{type:`button`,className:`chip`,"aria-label":`Add comment`,onClick:()=>{let a=r.trim();a!==``&&(n({type:`add-comment`,target:e,comment:{id:ut(t),text:a}}),i(``))},disabled:r.trim()===``,children:`Add`})]})]})}function NS({index:e,link:t,onChange:n,onRemove:r}){let[i,a]=(0,v.useState)(t.label);(0,v.useEffect)(()=>a(t.label),[t.label]);let[o,s]=(0,v.useState)(t.url);(0,v.useEffect)(()=>s(t.url),[t.url]);let c=()=>{let e={label:i.trim(),url:o.trim()};if(e.label===``||e.url===``){a(t.label),s(t.url);return}(e.label!==t.label||e.url!==t.url)&&n(e)};return(0,D.jsxs)(`div`,{className:`link-row`,children:[(0,D.jsx)(`input`,{"aria-label":`Link ${e} label`,value:i,onChange:e=>a(e.target.value),onBlur:c}),(0,D.jsx)(`input`,{"aria-label":`Link ${e} url`,value:o,onChange:e=>s(e.target.value),onBlur:c}),(0,D.jsx)(`button`,{type:`button`,className:`chip icon-btn`,"aria-label":`Remove link ${e}`,title:`Remove link`,onClick:r,children:`Remove`})]})}function PS({nodeId:e,links:t,onCommand:n}){let[r,i]=(0,v.useState)(``),[a,o]=(0,v.useState)(``),s=t=>n({type:`set-node-details`,id:e,details:{links:t.length===0?null:t}});return(0,D.jsxs)(`section`,{className:`panel-section links`,"aria-label":`Links`,children:[(0,D.jsx)(`h3`,{children:`Links`}),t.map((e,n)=>(0,D.jsx)(NS,{index:n+1,link:e,onChange:e=>s(t.map((t,r)=>r===n?e:t)),onRemove:()=>s(t.filter((e,t)=>t!==n))},n)),(0,D.jsxs)(`div`,{className:`link-add`,children:[(0,D.jsx)(`input`,{"aria-label":`New link label`,placeholder:`Label`,value:r,onChange:e=>i(e.target.value)}),(0,D.jsx)(`input`,{"aria-label":`New link url`,placeholder:`https://…`,value:a,onChange:e=>o(e.target.value)}),(0,D.jsx)(`button`,{type:`button`,className:`chip`,"aria-label":`Add link`,onClick:()=>{let e={label:r.trim(),url:a.trim()};e.label===``||e.url===``||(s([...t,e]),i(``),o(``))},disabled:r.trim()===``||a.trim()===``,children:`Add`})]})]})}var FS={owns:`Owner`,executes:`Executor`,checks:`Checker`};function IS(e){let t=e.nodes.filter(e=>!Dn(e)&&!Tn(e)&&!En(e));return[...e.nodes.filter(e=>Dn(e)),...t]}function LS({model:e,zoneId:t,candidates:n,suffix:r,onCommand:i}){let a=Fn(e,t);return(0,D.jsx)(D.Fragment,{children:On.map(o=>(0,D.jsxs)(`select`,{"aria-label":r===void 0?FS[o]:`${FS[o]} ${r}`,title:FS[o],value:a[o][0]??``,onChange:n=>i(ise(e,t,o,n.target.value===``?null:n.target.value)),children:[(0,D.jsx)(`option`,{value:``,children:`—`}),n.map(e=>(0,D.jsx)(`option`,{value:e.id,children:e.name},e.id))]},o))})}function RS({label:e,value:t,onChange:n}){return(0,D.jsx)(`input`,{type:`date`,"aria-label":e,value:t,onChange:e=>{e.target.value!==``&&n(e.target.value)}})}var zS=e=>typeof e==`string`?e:``;function BS({model:e,node:t,onCommand:n}){let r=(0,v.useMemo)(()=>IS(e),[e]),i=e=>n({type:`set-plan-dates`,id:t.id,dates:e});return(0,D.jsxs)(`section`,{className:`panel-section`,children:[(0,D.jsx)(`h3`,{children:`Plan`}),Tn(t)&&(0,D.jsxs)(D.Fragment,{children:[(0,D.jsxs)(`div`,{className:`field-row`,children:[(0,D.jsx)(RS,{label:`Start`,value:zS(t.metadata?.start),onChange:e=>i({start:e})}),(0,D.jsx)(RS,{label:`End`,value:zS(t.metadata?.end),onChange:e=>i({end:e})})]}),(0,D.jsx)(`div`,{className:`field-row`,children:(0,D.jsx)(LS,{model:e,zoneId:t.id,candidates:r,onCommand:n})})]}),En(t)&&(0,D.jsx)(RS,{label:`At`,value:zS(t.metadata?.at),onChange:e=>i({at:e})})]})}var VS=e=>`${e} · ${en[e]}`,HS=(e,t)=>{e.key===`Enter`&&(e.preventDefault(),t())};function US({applicable:e}){let t=ce.filter(t=>!e.includes(t));return(0,D.jsxs)(D.Fragment,{children:[e.map(e=>(0,D.jsx)(`option`,{value:e,children:VS(e)},e)),t.length>0&&(0,D.jsx)(`option`,{disabled:!0,children:`──`}),t.map(e=>(0,D.jsx)(`option`,{value:e,children:VS(e)},e))]})}function WS({target:e,threat:t,applicable:n,onCommand:r}){let[i,a]=(0,v.useState)(!1),o=(t.description??``)!==``||(t.mitigation??``)!==``,s=n=>r({type:`update-threat`,target:e,id:t.id,patch:n}),[c,l]=(0,v.useState)(t.title);(0,v.useEffect)(()=>l(t.title),[t.title]);let[u,d]=(0,v.useState)(t.description??``);(0,v.useEffect)(()=>d(t.description??``),[t.description]);let[f,p]=(0,v.useState)(t.mitigation??``);(0,v.useEffect)(()=>p(t.mitigation??``),[t.mitigation]);let m=()=>{let e=c.trim();if(e===``){l(t.title);return}e!==t.title&&s({title:e})},h=(e,n)=>{let r=e.trim();if(r===(t[n]??``))return;let i=r===``?null:r;s(n===`description`?{description:i}:{mitigation:i})};return(0,D.jsxs)(`div`,{className:`threat`,children:[(0,D.jsxs)(`div`,{className:`threat-row`,children:[(0,D.jsx)(`select`,{"aria-label":`Threat ${t.id} category`,value:t.category,onChange:e=>s({category:e.target.value}),children:(0,D.jsx)(US,{applicable:n})}),(0,D.jsx)(`input`,{"aria-label":`Threat ${t.id} title`,value:c,onChange:e=>l(e.target.value),onBlur:m,onKeyDown:e=>HS(e,m)}),(0,D.jsxs)(`select`,{"aria-label":`Threat ${t.id} severity`,value:t.severity??``,onChange:e=>s({severity:e.target.value===``?null:e.target.value}),children:[(0,D.jsx)(`option`,{value:``,children:`—`}),ue.map(e=>(0,D.jsx)(`option`,{value:e,children:e},e))]}),(0,D.jsx)(`select`,{"aria-label":`Threat ${t.id} status`,value:t.status??`open`,onChange:e=>s({status:e.target.value}),children:le.map(e=>(0,D.jsx)(`option`,{value:e,children:e},e))}),(0,D.jsx)(`button`,{type:`button`,className:`chip`,"aria-label":`Threat ${t.id} details`,"aria-expanded":i,onClick:()=>a(!i),children:i?`▾ details`:o?`▸ details •`:`▸ details`}),(0,D.jsx)(`button`,{type:`button`,className:`chip icon-btn`,"aria-label":`Remove threat ${t.id}`,title:`Remove threat`,onClick:()=>r({type:`remove-threat`,target:e,id:t.id}),children:`Remove`})]}),i&&(0,D.jsxs)(`div`,{className:`threat-details`,children:[(0,D.jsx)(`textarea`,{"aria-label":`Threat ${t.id} description`,rows:2,placeholder:`Description`,value:u,onChange:e=>d(e.target.value),onBlur:()=>h(u,`description`)}),(0,D.jsx)(`textarea`,{"aria-label":`Threat ${t.id} mitigation`,rows:2,placeholder:`Mitigation`,value:f,onChange:e=>p(e.target.value),onBlur:()=>h(f,`mitigation`)})]})]})}function GS({target:e,threats:t,applicable:n,crossing:r,onCommand:i}){let{open:a,total:o}=hn(t),[s,c]=(0,v.useState)(n[0]??ce[0]),[l,u]=(0,v.useState)(``),d=()=>{let n=l.trim();n!==``&&(i({type:`add-threat`,target:e,threat:{id:an(t),category:s,title:n}}),u(``))};return(0,D.jsxs)(`section`,{className:`panel-section threats`,"aria-label":`Threats`,children:[(0,D.jsxs)(`h3`,{children:[`Threats `,(0,D.jsxs)(`span`,{className:`so-hint`,children:[a,` / `,o]})]}),r!==void 0&&(0,D.jsxs)(`p`,{className:`so-hint`,children:[`Crosses: `,r.fromName??`outside`,` → `,r.toName??`outside`]}),t.map(t=>(0,D.jsx)(WS,{target:e,threat:t,applicable:n,onCommand:i},t.id)),(0,D.jsxs)(`div`,{className:`threat-add`,children:[(0,D.jsx)(`select`,{"aria-label":`New threat category`,value:s,onChange:e=>c(e.target.value),children:(0,D.jsx)(US,{applicable:n})}),(0,D.jsx)(`input`,{"aria-label":`New threat`,placeholder:`Threat`,value:l,onChange:e=>u(e.target.value),onKeyDown:e=>HS(e,d)}),(0,D.jsx)(`button`,{type:`button`,className:`chip`,"aria-label":`Add threat`,onClick:d,disabled:l.trim()===``,children:`Add`})]})]})}var KS=(e,t,n,r)=>({id:e,category:`activity`,name:t,keywords:n,template:{type:e,...r===void 0?{}:r}}),qS={categories:[{id:`activity`,name:`UML · Activity`,builtin:!0}],entries:[KS(`activity-frame`,`Activity frame`,[`uml`,`activity`,`swimlane`,`frame`]),KS(`activity-action`,`Action`,[`uml`,`activity`,`action`,`step`,`task`]),KS(`activity-decision`,`Decision`,[`uml`,`decision`,`merge`,`diamond`,`branch`],{width:48,height:48}),KS(`activity-bar`,`Fork/join bar`,[`uml`,`fork`,`join`,`synchronise`,`parallel`],{width:8,height:100}),KS(`activity-start`,`Start`,[`uml`,`initial`,`start`],{width:24,height:24}),KS(`activity-end`,`End`,[`uml`,`final`,`end`],{width:28,height:28}),KS(`activity-send`,`Send signal`,[`uml`,`send`,`signal`,`event`],{width:140,height:44}),KS(`activity-receive`,`Receive signal`,[`uml`,`receive`,`signal`,`event`],{width:140,height:44}),KS(`activity-object`,`Object`,[`uml`,`object`,`artifact`,`data`]),KS(`activity-note`,`Note`,[`uml`,`note`,`comment`,`annotation`],{width:140,height:64})]},JS=(e,t,n=``)=>(r,i,a,o)=>({id:`${n}${i}`,category:`aws-${r}`,name:a,...o===void 0?{}:{keywords:o},template:{type:`image`,image:`/library/${e}/${i}.svg`,width:t,height:t}}),YS=JS(`aws`,64),M=JS(`aws-resources`,48,`aws-res-`),XS=JS(`aws-groups`,64,`aws-group-`),ZS=JS(`aws-categories`,64,`aws-cat-`),QS={categories:[{id:`aws-analytics`,name:`Analytics`,group:`AWS`,builtin:!0},{id:`aws-application-integration`,name:`Application Integration`,group:`AWS`,builtin:!0},{id:`aws-artificial-intelligence`,name:`Artificial Intelligence`,group:`AWS`,builtin:!0},{id:`aws-blockchain`,name:`Blockchain`,group:`AWS`,builtin:!0},{id:`aws-business-applications`,name:`Business Applications`,group:`AWS`,builtin:!0},{id:`aws-cloud-financial-management`,name:`Cloud Financial Management`,group:`AWS`,builtin:!0},{id:`aws-compute`,name:`Compute`,group:`AWS`,builtin:!0},{id:`aws-containers`,name:`Containers`,group:`AWS`,builtin:!0},{id:`aws-customer-enablement`,name:`Customer Enablement`,group:`AWS`,builtin:!0},{id:`aws-databases`,name:`Databases`,group:`AWS`,builtin:!0},{id:`aws-developer-tools`,name:`Developer Tools`,group:`AWS`,builtin:!0},{id:`aws-end-user-computing`,name:`End User Computing`,group:`AWS`,builtin:!0},{id:`aws-front-end-web-mobile`,name:`Front End Web Mobile`,group:`AWS`,builtin:!0},{id:`aws-games`,name:`Games`,group:`AWS`,builtin:!0},{id:`aws-general-icons`,name:`General Icons`,group:`AWS`,builtin:!0},{id:`aws-internet-of-things`,name:`Internet Of Things`,group:`AWS`,builtin:!0},{id:`aws-management-tools`,name:`Management Tools`,group:`AWS`,builtin:!0},{id:`aws-media-services`,name:`Media Services`,group:`AWS`,builtin:!0},{id:`aws-migration-modernization`,name:`Migration Modernization`,group:`AWS`,builtin:!0},{id:`aws-networking-content-delivery`,name:`Networking Content Delivery`,group:`AWS`,builtin:!0},{id:`aws-quantum-technologies`,name:`Quantum Technologies`,group:`AWS`,builtin:!0},{id:`aws-satellite`,name:`Satellite`,group:`AWS`,builtin:!0},{id:`aws-security-identity`,name:`Security Identity`,group:`AWS`,builtin:!0},{id:`aws-storage`,name:`Storage`,group:`AWS`,builtin:!0},{id:`aws-groups`,name:`Groups`,group:`AWS`,builtin:!0},{id:`aws-categories`,name:`Category icons`,group:`AWS`,builtin:!0}],entries:[YS(`analytics`,`amazon-athena`,`Amazon Athena`,[`sql`,`query`,`presto`,`trino`]),YS(`analytics`,`amazon-cloudsearch`,`Amazon CloudSearch`),YS(`analytics`,`amazon-data-firehose`,`Amazon Data Firehose`),YS(`analytics`,`amazon-datazone`,`Amazon DataZone`),YS(`analytics`,`amazon-emr`,`Amazon EMR`),YS(`analytics`,`amazon-finspace`,`Amazon FinSpace`),YS(`analytics`,`amazon-kinesis`,`Amazon Kinesis`,[`streaming`,`stream`]),YS(`analytics`,`amazon-kinesis-data-streams`,`Amazon Kinesis Data Streams`),YS(`analytics`,`amazon-kinesis-video-streams`,`Amazon Kinesis Video Streams`),YS(`analytics`,`amazon-managed-service-for-apache-flink`,`Amazon Managed Service for Apache Flink`),YS(`analytics`,`amazon-managed-streaming-for-apache-kafka`,`Amazon Managed Streaming for Apache Kafka`,[`msk`,`kafka`,`streaming`]),YS(`analytics`,`amazon-opensearch-service`,`Amazon OpenSearch Service`,[`elasticsearch`,`search`,`logs`,`kibana`]),YS(`analytics`,`amazon-redshift`,`Amazon Redshift`,[`warehouse`,`olap`,`analytics`,`sql`]),YS(`analytics`,`amazon-sagemaker`,`Amazon SageMaker`),YS(`analytics`,`aws-clean-rooms`,`AWS Clean Rooms`),YS(`analytics`,`aws-data-exchange`,`AWS Data Exchange`),YS(`analytics`,`aws-entity-resolution`,`AWS Entity Resolution`),YS(`analytics`,`aws-glue`,`AWS Glue`,[`etl`,`catalog`,`data pipeline`]),YS(`analytics`,`aws-glue-databrew`,`AWS Glue DataBrew`),YS(`analytics`,`aws-lake-formation`,`AWS Lake Formation`),YS(`application-integration`,`amazon-appflow`,`Amazon AppFlow`),YS(`application-integration`,`amazon-eventbridge`,`Amazon EventBridge`,[`events`,`event bus`,`cloudwatch events`]),YS(`application-integration`,`amazon-managed-workflows-for-apache-airflow`,`Amazon Managed Workflows for Apache Airflow`),YS(`application-integration`,`amazon-mq`,`Amazon MQ`,[`rabbitmq`,`activemq`,`broker`,`queue`]),YS(`application-integration`,`amazon-simple-notification-service`,`Amazon Simple Notification Service`,[`sns`,`pubsub`,`topic`,`notification`]),YS(`application-integration`,`amazon-simple-queue-service`,`Amazon Simple Queue Service`,[`sqs`,`queue`,`message`]),YS(`application-integration`,`aws-appsync`,`AWS AppSync`,[`graphql`,`api`,`realtime`]),YS(`application-integration`,`aws-b2b-data-interchange`,`AWS B2B Data Interchange`),YS(`application-integration`,`aws-express-workflows`,`AWS Express Workflows`),YS(`application-integration`,`aws-step-functions`,`AWS Step Functions`,[`sfn`,`workflow`,`state machine`,`orchestration`]),YS(`artificial-intelligence`,`amazon-augmented-ai-a2i`,`Amazon Augmented AI A2I`),YS(`artificial-intelligence`,`amazon-bedrock`,`Amazon Bedrock`,[`llm`,`genai`,`foundation model`,`ai`]),YS(`artificial-intelligence`,`amazon-bedrock-agentcore`,`Amazon Bedrock AgentCore`),YS(`artificial-intelligence`,`amazon-codeguru`,`Amazon CodeGuru`),YS(`artificial-intelligence`,`amazon-codewhisperer`,`Amazon CodeWhisperer`),YS(`artificial-intelligence`,`amazon-comprehend`,`Amazon Comprehend`),YS(`artificial-intelligence`,`amazon-comprehend-medical`,`Amazon Comprehend Medical`),YS(`artificial-intelligence`,`amazon-devops-guru`,`Amazon DevOps Guru`),YS(`artificial-intelligence`,`amazon-elastic-inference`,`Amazon Elastic Inference`),YS(`artificial-intelligence`,`amazon-forecast`,`Amazon Forecast`),YS(`artificial-intelligence`,`amazon-fraud-detector`,`Amazon Fraud Detector`),YS(`artificial-intelligence`,`amazon-kendra`,`Amazon Kendra`),YS(`artificial-intelligence`,`amazon-lex`,`Amazon Lex`),YS(`artificial-intelligence`,`amazon-lookout-for-equipment`,`Amazon Lookout for Equipment`),YS(`artificial-intelligence`,`amazon-lookout-for-vision`,`Amazon Lookout for Vision`),YS(`artificial-intelligence`,`amazon-monitron`,`Amazon Monitron`),YS(`artificial-intelligence`,`amazon-nova`,`Amazon Nova`),YS(`artificial-intelligence`,`amazon-personalize`,`Amazon Personalize`),YS(`artificial-intelligence`,`amazon-polly`,`Amazon Polly`),YS(`artificial-intelligence`,`amazon-q`,`Amazon Q`),YS(`artificial-intelligence`,`amazon-rekognition`,`Amazon Rekognition`),YS(`artificial-intelligence`,`amazon-sagemaker-ai`,`Amazon SageMaker AI`,[`ml`,`machine learning`,`training`,`notebook`]),YS(`artificial-intelligence`,`amazon-sagemaker-ground-truth`,`Amazon SageMaker Ground Truth`),YS(`artificial-intelligence`,`amazon-sagemaker-studio-lab`,`Amazon SageMaker Studio Lab`),YS(`artificial-intelligence`,`amazon-textract`,`Amazon Textract`),YS(`artificial-intelligence`,`amazon-transcribe`,`Amazon Transcribe`),YS(`artificial-intelligence`,`amazon-translate`,`Amazon Translate`),YS(`artificial-intelligence`,`apache-mxnet-on-aws`,`Apache MXNet on AWS`),YS(`artificial-intelligence`,`aws-app-studio`,`AWS App Studio`),YS(`artificial-intelligence`,`aws-deep-learning-amis`,`AWS Deep Learning AMIs`),YS(`artificial-intelligence`,`aws-deep-learning-containers`,`AWS Deep Learning Containers`),YS(`artificial-intelligence`,`aws-deepracer`,`AWS DeepRacer`),YS(`artificial-intelligence`,`aws-elemental-inference`,`AWS Elemental Inference`),YS(`artificial-intelligence`,`aws-healthimaging`,`AWS HealthImaging`),YS(`artificial-intelligence`,`aws-healthlake`,`AWS HealthLake`),YS(`artificial-intelligence`,`aws-healthomics`,`AWS HealthOmics`),YS(`artificial-intelligence`,`aws-healthscribe`,`AWS HealthScribe`),YS(`artificial-intelligence`,`aws-neuron`,`AWS Neuron`),YS(`artificial-intelligence`,`aws-panorama`,`AWS Panorama`),YS(`artificial-intelligence`,`pytorch-on-aws`,`PyTorch on AWS`),YS(`artificial-intelligence`,`tensorflow-on-aws`,`TensorFlow on AWS`),YS(`blockchain`,`amazon-managed-blockchain`,`Amazon Managed Blockchain`),YS(`business-applications`,`amazon-chime`,`Amazon Chime`),YS(`business-applications`,`amazon-chime-sdk`,`Amazon Chime SDK`),YS(`business-applications`,`amazon-connect`,`Amazon Connect`),YS(`business-applications`,`amazon-pinpoint`,`Amazon Pinpoint`),YS(`business-applications`,`amazon-pinpoint-apis`,`Amazon Pinpoint APIs`),YS(`business-applications`,`amazon-quick`,`Amazon Quick`),YS(`business-applications`,`amazon-simple-email-service`,`Amazon Simple Email Service`,[`ses`,`email`,`smtp`]),YS(`business-applications`,`amazon-workdocs`,`Amazon WorkDocs`),YS(`business-applications`,`amazon-workdocs-sdk`,`Amazon WorkDocs SDK`),YS(`business-applications`,`amazon-workmail`,`Amazon WorkMail`),YS(`business-applications`,`aws-appfabric`,`AWS AppFabric`),YS(`business-applications`,`aws-end-user-messaging`,`AWS End User Messaging`),YS(`business-applications`,`aws-supply-chain`,`AWS Supply Chain`),YS(`business-applications`,`aws-wickr`,`AWS Wickr`),YS(`cloud-financial-management`,`aws-billing-conductor`,`AWS Billing Conductor`),YS(`cloud-financial-management`,`aws-budgets`,`AWS Budgets`),YS(`cloud-financial-management`,`aws-cost-and-usage-report`,`AWS Cost and Usage Report`),YS(`cloud-financial-management`,`aws-cost-explorer`,`AWS Cost Explorer`),YS(`cloud-financial-management`,`aws-finops-agent`,`AWS FinOps Agent`),YS(`cloud-financial-management`,`reserved-instance-reporting`,`Reserved Instance Reporting`),YS(`cloud-financial-management`,`savings-plans`,`Savings Plans`),YS(`compute`,`amazon-dcv`,`Amazon DCV`),YS(`compute`,`amazon-ec2`,`Amazon EC2`,[`ec2`,`vm`,`instance`,`compute`,`server`]),YS(`compute`,`amazon-ec2-auto-scaling`,`Amazon EC2 Auto Scaling`),YS(`compute`,`amazon-ec2-image-builder`,`Amazon EC2 Image Builder`),YS(`compute`,`amazon-elastic-vmware-service`,`Amazon Elastic VMware Service`),YS(`compute`,`amazon-lightsail`,`Amazon Lightsail`),YS(`compute`,`amazon-lightsail-for-research`,`Amazon Lightsail for Research`),YS(`compute`,`aws-app-runner`,`AWS App Runner`,[`containers`,`paas`]),YS(`compute`,`aws-batch`,`AWS Batch`,[`jobs`,`batch processing`]),YS(`compute`,`aws-compute-optimizer`,`AWS Compute Optimizer`),YS(`compute`,`aws-elastic-beanstalk`,`AWS Elastic Beanstalk`),YS(`compute`,`aws-lambda`,`AWS Lambda`,[`faas`,`function`,`serverless`]),YS(`compute`,`aws-local-zones`,`AWS Local Zones`),YS(`compute`,`aws-nitro-enclaves`,`AWS Nitro Enclaves`),YS(`compute`,`aws-outposts-family`,`AWS Outposts family`,[`hybrid`,`on premises`,`rack`]),YS(`compute`,`aws-outposts-rack`,`AWS Outposts rack`),YS(`compute`,`aws-outposts-servers`,`AWS Outposts servers`),YS(`compute`,`aws-parallel-cluster`,`AWS Parallel Cluster`),YS(`compute`,`aws-parallel-computing-service`,`AWS Parallel Computing Service`),YS(`compute`,`aws-serverless-application-repository`,`AWS Serverless Application Repository`),YS(`compute`,`aws-simspace-weaver`,`AWS SimSpace Weaver`),YS(`compute`,`aws-wavelength`,`AWS Wavelength`),YS(`compute`,`bottlerocket`,`Bottlerocket`),YS(`compute`,`elastic-fabric-adapter`,`Elastic Fabric Adapter`),YS(`containers`,`amazon-ecs-anywhere`,`Amazon ECS Anywhere`,[`ecs`,`hybrid`]),YS(`containers`,`amazon-eks-anywhere`,`Amazon EKS Anywhere`,[`eks`,`k8s`,`hybrid`]),YS(`containers`,`amazon-eks-distro`,`Amazon EKS Distro`),YS(`containers`,`amazon-elastic-container-registry`,`Amazon Elastic Container Registry`,[`ecr`,`registry`,`images`]),YS(`containers`,`amazon-elastic-container-service`,`Amazon Elastic Container Service`,[`ecs`,`containers`]),YS(`containers`,`amazon-elastic-kubernetes-service`,`Amazon Elastic Kubernetes Service`,[`eks`,`k8s`,`kubernetes`]),YS(`containers`,`aws-fargate`,`AWS Fargate`,[`serverless containers`,`ecs`,`eks`]),YS(`containers`,`red-hat-openshift-service-on-aws`,`Red Hat OpenShift Service on AWS`),YS(`customer-enablement`,`aws-activate`,`AWS Activate`),YS(`customer-enablement`,`aws-iq`,`AWS IQ`),YS(`customer-enablement`,`aws-managed-services`,`AWS Managed Services`),YS(`customer-enablement`,`aws-professional-services`,`AWS Professional Services`),YS(`customer-enablement`,`aws-repost`,`AWS rePost`),YS(`customer-enablement`,`aws-repost-private`,`AWS rePost Private`),YS(`customer-enablement`,`aws-support`,`AWS Support`),YS(`customer-enablement`,`aws-training-certification`,`AWS Training Certification`),YS(`databases`,`amazon-aurora`,`Amazon Aurora`,[`postgres`,`mysql`,`sql`,`database`]),YS(`databases`,`amazon-documentdb`,`Amazon DocumentDB`,[`mongodb`,`document`,`nosql`]),YS(`databases`,`amazon-dynamodb`,`Amazon DynamoDB`,[`nosql`,`key value`,`table`]),YS(`databases`,`amazon-elasticache`,`Amazon ElastiCache`,[`redis`,`memcached`,`cache`]),YS(`databases`,`amazon-keyspaces`,`Amazon Keyspaces`),YS(`databases`,`amazon-memorydb`,`Amazon MemoryDB`,[`redis`,`cache`,`in memory`]),YS(`databases`,`amazon-neptune`,`Amazon Neptune`,[`graph`,`gremlin`,`sparql`]),YS(`databases`,`amazon-rds`,`Amazon RDS`),YS(`databases`,`amazon-timestream`,`Amazon Timestream`),YS(`databases`,`aws-database-migration-service`,`AWS Database Migration Service`,[`dms`,`migration`,`replication`,`cdc`]),YS(`databases`,`oracle-database-at-aws`,`Oracle Database at AWS`),YS(`developer-tools`,`amazon-codecatalyst`,`Amazon CodeCatalyst`),YS(`developer-tools`,`amazon-corretto`,`Amazon Corretto`),YS(`developer-tools`,`aws-cloud-control-api`,`AWS Cloud Control API`),YS(`developer-tools`,`aws-cloud-development-kit`,`AWS Cloud Development Kit`),YS(`developer-tools`,`aws-cloud9`,`AWS Cloud9`),YS(`developer-tools`,`aws-cloudshell`,`AWS CloudShell`),YS(`developer-tools`,`aws-codeartifact`,`AWS CodeArtifact`),YS(`developer-tools`,`aws-codebuild`,`AWS CodeBuild`,[`ci`,`build`,`pipeline`]),YS(`developer-tools`,`aws-codecommit`,`AWS CodeCommit`),YS(`developer-tools`,`aws-codedeploy`,`AWS CodeDeploy`,[`deployment`,`release`]),YS(`developer-tools`,`aws-codepipeline`,`AWS CodePipeline`,[`cd`,`pipeline`,`deployment`]),YS(`developer-tools`,`aws-command-line-interface`,`AWS Command Line Interface`),YS(`developer-tools`,`aws-fault-injection-service`,`AWS Fault Injection Service`),YS(`developer-tools`,`aws-infrastructure-composer`,`AWS Infrastructure Composer`),YS(`developer-tools`,`aws-tools-and-sdks`,`AWS Tools and SDKs`),YS(`developer-tools`,`aws-x-ray`,`AWS X Ray`),YS(`end-user-computing`,`amazon-workspaces`,`Amazon WorkSpaces`),YS(`front-end-web-mobile`,`amazon-location-service`,`Amazon Location Service`),YS(`front-end-web-mobile`,`aws-amplify`,`AWS Amplify`,[`frontend`,`hosting`,`mobile`]),YS(`front-end-web-mobile`,`aws-device-farm`,`AWS Device Farm`),YS(`games`,`amazon-gamelift-servers`,`Amazon GameLift Servers`),YS(`games`,`amazon-gamelift-streams`,`Amazon GameLift Streams`),YS(`games`,`open-3d-engine`,`Open 3D Engine`),YS(`general-icons`,`aws-marketplace-dark`,`AWS Marketplace_Dark`),YS(`general-icons`,`aws-marketplace-light`,`AWS Marketplace_Light`),YS(`internet-of-things`,`aws-iot-core`,`AWS IoT Core`),YS(`internet-of-things`,`aws-iot-device-defender`,`AWS IoT Device Defender`),YS(`internet-of-things`,`aws-iot-device-management`,`AWS IoT Device Management`),YS(`internet-of-things`,`aws-iot-events`,`AWS IoT Events`),YS(`internet-of-things`,`aws-iot-expresslink`,`AWS IoT ExpressLink`),YS(`internet-of-things`,`aws-iot-fleetwise`,`AWS IoT FleetWise`),YS(`internet-of-things`,`aws-iot-greengrass`,`AWS IoT Greengrass`),YS(`internet-of-things`,`aws-iot-sitewise`,`AWS IoT SiteWise`),YS(`internet-of-things`,`aws-iot-twinmaker`,`AWS IoT TwinMaker`),YS(`internet-of-things`,`freertos`,`FreeRTOS`),YS(`management-tools`,`amazon-cloudwatch`,`Amazon CloudWatch`,[`logs`,`metrics`,`alarm`,`monitoring`,`observability`]),YS(`management-tools`,`amazon-managed-grafana`,`Amazon Managed Grafana`),YS(`management-tools`,`amazon-managed-service-for-prometheus`,`Amazon Managed Service for Prometheus`),YS(`management-tools`,`aws-appconfig`,`AWS AppConfig`),YS(`management-tools`,`aws-application-auto-scaling`,`AWS Application Auto Scaling`),YS(`management-tools`,`aws-auto-scaling`,`AWS Auto Scaling`),YS(`management-tools`,`aws-backint-agent`,`AWS Backint Agent`),YS(`management-tools`,`aws-chatbot`,`AWS Chatbot`),YS(`management-tools`,`aws-cloudformation`,`AWS CloudFormation`,[`iac`,`stack`,`template`,`infrastructure as code`]),YS(`management-tools`,`aws-cloudtrail`,`AWS CloudTrail`,[`audit`,`api log`,`compliance`]),YS(`management-tools`,`aws-config`,`AWS Config`),YS(`management-tools`,`aws-console-mobile-application`,`AWS Console Mobile Application`),YS(`management-tools`,`aws-control-tower`,`AWS Control Tower`,[`landing zone`,`governance`,`multi account`]),YS(`management-tools`,`aws-devops-agent`,`AWS DevOps Agent`),YS(`management-tools`,`aws-distro-for-opentelemetry`,`AWS Distro for OpenTelemetry`),YS(`management-tools`,`aws-health-dashboard`,`AWS Health Dashboard`),YS(`management-tools`,`aws-launch-wizard`,`AWS Launch Wizard`),YS(`management-tools`,`aws-license-manager`,`AWS License Manager`),YS(`management-tools`,`aws-management-console`,`AWS Management Console`),YS(`management-tools`,`aws-organizations`,`AWS Organizations`,[`accounts`,`ou`,`multi account`]),YS(`management-tools`,`aws-partner-central`,`AWS Partner Central`),YS(`management-tools`,`aws-proton`,`AWS Proton`),YS(`management-tools`,`aws-resilience-hub`,`AWS Resilience Hub`),YS(`management-tools`,`aws-resource-explorer`,`AWS Resource Explorer`),YS(`management-tools`,`aws-service-catalog`,`AWS Service Catalog`),YS(`management-tools`,`aws-service-management-connector`,`AWS Service Management Connector`),YS(`management-tools`,`aws-sustainability`,`AWS Sustainability`),YS(`management-tools`,`aws-systems-manager`,`AWS Systems Manager`,[`ssm`,`parameter store`,`patching`]),YS(`management-tools`,`aws-telco-network-builder`,`AWS Telco Network Builder`),YS(`management-tools`,`aws-trusted-advisor`,`AWS Trusted Advisor`),YS(`management-tools`,`aws-user-notifications`,`AWS User Notifications`),YS(`management-tools`,`aws-well-architected-tool`,`AWS Well Architected Tool`),YS(`media-services`,`amazon-interactive-video-service`,`Amazon Interactive Video Service`),YS(`media-services`,`aws-deadline-cloud`,`AWS Deadline Cloud`),YS(`media-services`,`aws-elemental-appliances-and-software`,`AWS Elemental Appliances & Software`),YS(`media-services`,`aws-elemental-conductor`,`AWS Elemental Conductor`),YS(`media-services`,`aws-elemental-delta`,`AWS Elemental Delta`),YS(`media-services`,`aws-elemental-link`,`AWS Elemental Link`),YS(`media-services`,`aws-elemental-live`,`AWS Elemental Live`),YS(`media-services`,`aws-elemental-mediaconnect`,`AWS Elemental MediaConnect`),YS(`media-services`,`aws-elemental-mediaconvert`,`AWS Elemental MediaConvert`),YS(`media-services`,`aws-elemental-medialive`,`AWS Elemental MediaLive`),YS(`media-services`,`aws-elemental-mediapackage`,`AWS Elemental MediaPackage`),YS(`media-services`,`aws-elemental-mediastore`,`AWS Elemental MediaStore`),YS(`media-services`,`aws-elemental-mediatailor`,`AWS Elemental MediaTailor`),YS(`media-services`,`aws-elemental-server`,`AWS Elemental Server`),YS(`media-services`,`aws-thinkbox-deadline`,`AWS Thinkbox Deadline`),YS(`media-services`,`aws-thinkbox-frost`,`AWS Thinkbox Frost`),YS(`media-services`,`aws-thinkbox-krakatoa`,`AWS Thinkbox Krakatoa`),YS(`media-services`,`aws-thinkbox-stoke`,`AWS Thinkbox Stoke`),YS(`media-services`,`aws-thinkbox-xmesh`,`AWS Thinkbox XMesh`),YS(`migration-modernization`,`aws-application-discovery-service`,`AWS Application Discovery Service`),YS(`migration-modernization`,`aws-application-migration-service`,`AWS Application Migration Service`),YS(`migration-modernization`,`aws-data-transfer-terminal`,`AWS Data Transfer Terminal`),YS(`migration-modernization`,`aws-datasync`,`AWS DataSync`),YS(`migration-modernization`,`aws-mainframe-modernization`,`AWS Mainframe Modernization`),YS(`migration-modernization`,`aws-migration-evaluator`,`AWS Migration Evaluator`),YS(`migration-modernization`,`aws-transfer-family`,`AWS Transfer Family`),YS(`migration-modernization`,`aws-transform`,`AWS Transform`),YS(`networking-content-delivery`,`amazon-api-gateway`,`Amazon API Gateway`,[`apigw`,`rest`,`http`,`api`]),YS(`networking-content-delivery`,`amazon-application-recovery-controller`,`Amazon Application Recovery Controller`),YS(`networking-content-delivery`,`amazon-cloudfront`,`Amazon CloudFront`,[`cdn`,`edge`,`cache`]),YS(`networking-content-delivery`,`amazon-route-53`,`Amazon Route 53`,[`dns`,`domain`,`route53`]),YS(`networking-content-delivery`,`amazon-virtual-private-cloud`,`Amazon Virtual Private Cloud`,[`vpc`,`network`,`subnet`]),YS(`networking-content-delivery`,`amazon-vpc-lattice`,`Amazon VPC Lattice`),YS(`networking-content-delivery`,`aws-app-mesh`,`AWS App Mesh`),YS(`networking-content-delivery`,`aws-client-vpn`,`AWS Client VPN`),YS(`networking-content-delivery`,`aws-cloud-map`,`AWS Cloud Map`),YS(`networking-content-delivery`,`aws-cloud-wan`,`AWS Cloud WAN`),YS(`networking-content-delivery`,`aws-direct-connect`,`AWS Direct Connect`,[`dx`,`private link`,`network`]),YS(`networking-content-delivery`,`aws-global-accelerator`,`AWS Global Accelerator`),YS(`networking-content-delivery`,`aws-interconnect`,`AWS Interconnect`),YS(`networking-content-delivery`,`aws-privatelink`,`AWS PrivateLink`,[`vpc endpoint`,`private`,`network`]),YS(`networking-content-delivery`,`aws-rtb-fabric`,`AWS RTB Fabric`),YS(`networking-content-delivery`,`aws-site-to-site-vpn`,`AWS Site to Site VPN`),YS(`networking-content-delivery`,`aws-transit-gateway`,`AWS Transit Gateway`,[`tgw`,`network`,`routing`]),YS(`networking-content-delivery`,`aws-verified-access`,`AWS Verified Access`),YS(`networking-content-delivery`,`elastic-load-balancing`,`Elastic Load Balancing`,[`elb`,`alb`,`nlb`,`load balancer`]),YS(`quantum-technologies`,`amazon-braket`,`Amazon Braket`),YS(`satellite`,`aws-ground-station`,`AWS Ground Station`),YS(`security-identity`,`amazon-cloud-directory`,`Amazon Cloud Directory`),YS(`security-identity`,`amazon-cognito`,`Amazon Cognito`,[`auth`,`login`,`oauth`,`users`,`jwt`]),YS(`security-identity`,`amazon-detective`,`Amazon Detective`),YS(`security-identity`,`amazon-guardduty`,`Amazon GuardDuty`,[`threat detection`,`security`]),YS(`security-identity`,`amazon-inspector`,`Amazon Inspector`,[`vulnerability`,`scanning`,`security`]),YS(`security-identity`,`amazon-macie`,`Amazon Macie`),YS(`security-identity`,`amazon-security-lake`,`Amazon Security Lake`),YS(`security-identity`,`amazon-verified-permissions`,`Amazon Verified Permissions`),YS(`security-identity`,`aws-artifact`,`AWS Artifact`),YS(`security-identity`,`aws-audit-manager`,`AWS Audit Manager`),YS(`security-identity`,`aws-certificate-manager`,`AWS Certificate Manager`,[`acm`,`tls`,`ssl`,`certificate`]),YS(`security-identity`,`aws-cloudhsm`,`AWS CloudHSM`),YS(`security-identity`,`aws-directory-service`,`AWS Directory Service`),YS(`security-identity`,`aws-firewall-manager`,`AWS Firewall Manager`),YS(`security-identity`,`aws-iam-identity-center`,`AWS IAM Identity Center`),YS(`security-identity`,`aws-identity-and-access-management`,`AWS Identity and Access Management`,[`iam`,`auth`,`policy`,`role`,`permissions`]),YS(`security-identity`,`aws-key-management-service`,`AWS Key Management Service`,[`kms`,`encryption`,`keys`]),YS(`security-identity`,`aws-network-firewall`,`AWS Network Firewall`),YS(`security-identity`,`aws-payment-cryptography`,`AWS Payment Cryptography`),YS(`security-identity`,`aws-private-certificate-authority`,`AWS Private Certificate Authority`),YS(`security-identity`,`aws-resource-access-manager`,`AWS Resource Access Manager`),YS(`security-identity`,`aws-secrets-manager`,`AWS Secrets Manager`,[`secrets`,`credentials`,`vault`]),YS(`security-identity`,`aws-security-agent`,`AWS Security Agent`),YS(`security-identity`,`aws-security-hub`,`AWS Security Hub`),YS(`security-identity`,`aws-security-incident-response`,`AWS Security Incident Response`),YS(`security-identity`,`aws-shield`,`AWS Shield`,[`ddos`,`protection`,`security`]),YS(`security-identity`,`aws-signer`,`AWS Signer`),YS(`security-identity`,`aws-waf`,`AWS WAF`,[`firewall`,`web application firewall`,`security`]),YS(`storage`,`amazon-efs`,`Amazon EFS`),YS(`storage`,`amazon-elastic-block-store`,`Amazon Elastic Block Store`,[`ebs`,`volume`,`disk`]),YS(`storage`,`amazon-file-cache`,`Amazon File Cache`),YS(`storage`,`amazon-fsx`,`Amazon FSx`),YS(`storage`,`amazon-fsx-for-lustre`,`Amazon FSx for Lustre`),YS(`storage`,`amazon-fsx-for-netapp-ontap`,`Amazon FSx for NetApp ONTAP`),YS(`storage`,`amazon-fsx-for-openzfs`,`Amazon FSx for OpenZFS`),YS(`storage`,`amazon-fsx-for-wfs`,`Amazon FSx for WFS`),YS(`storage`,`amazon-s3-on-outposts`,`Amazon S3 on Outposts`),YS(`storage`,`amazon-simple-storage-service`,`Amazon Simple Storage Service`,[`s3`,`bucket`,`object storage`]),YS(`storage`,`amazon-simple-storage-service-glacier`,`Amazon Simple Storage Service Glacier`,[`s3 glacier`,`archive`,`cold storage`]),YS(`storage`,`aws-backup`,`AWS Backup`,[`snapshot`,`restore`,`disaster recovery`]),YS(`storage`,`aws-elastic-disaster-recovery`,`AWS Elastic Disaster Recovery`),YS(`storage`,`aws-snowball`,`AWS Snowball`),YS(`storage`,`aws-snowball-edge`,`AWS Snowball Edge`),YS(`storage`,`aws-storage-gateway`,`AWS Storage Gateway`,[`hybrid storage`,`nfs`,`smb`]),M(`analytics`,`amazon-athena-data-source-connectors`,`Amazon Athena Data Source Connectors`,[`sql`,`query`,`presto`,`trino`]),M(`analytics`,`amazon-cloudsearch-search-documents`,`Amazon CloudSearch Search Documents`),M(`analytics`,`amazon-datazone-business-data-catalog`,`Amazon DataZone Business Data Catalog`),M(`analytics`,`amazon-datazone-data-portal`,`Amazon DataZone Data Portal`),M(`analytics`,`amazon-datazone-data-projects`,`Amazon DataZone Data Projects`),M(`analytics`,`amazon-emr-cluster`,`Amazon EMR Cluster`),M(`analytics`,`amazon-emr-emr-engine`,`Amazon EMR EMR Engine`),M(`analytics`,`amazon-emr-hdfs-cluster`,`Amazon EMR HDFS Cluster`),M(`analytics`,`amazon-msk-amazon-msk-connect`,`Amazon MSK Amazon MSK Connect`),M(`analytics`,`amazon-opensearch-service-cluster-administrator-node`,`Amazon OpenSearch Service Cluster Administrator Node`,[`elasticsearch`,`search`,`logs`,`kibana`]),M(`analytics`,`amazon-opensearch-service-data-node`,`Amazon OpenSearch Service Data Node`,[`elasticsearch`,`search`,`logs`,`kibana`]),M(`analytics`,`amazon-opensearch-service-index`,`Amazon OpenSearch Service Index`,[`elasticsearch`,`search`,`logs`,`kibana`]),M(`analytics`,`amazon-opensearch-service-observability`,`Amazon OpenSearch Service Observability`,[`elasticsearch`,`search`,`logs`,`kibana`]),M(`analytics`,`amazon-opensearch-service-opensearch-dashboards`,`Amazon OpenSearch Service OpenSearch Dashboards`,[`elasticsearch`,`search`,`logs`,`kibana`]),M(`analytics`,`amazon-opensearch-service-opensearch-ingestion`,`Amazon OpenSearch Service OpenSearch Ingestion`,[`elasticsearch`,`search`,`logs`,`kibana`]),M(`analytics`,`amazon-opensearch-service-traces`,`Amazon OpenSearch Service Traces`,[`elasticsearch`,`search`,`logs`,`kibana`]),M(`analytics`,`amazon-opensearch-service-ultrawarm-node`,`Amazon OpenSearch Service UltraWarm Node`,[`elasticsearch`,`search`,`logs`,`kibana`]),M(`analytics`,`amazon-redshift-auto-copy`,`Amazon Redshift Auto copy`,[`warehouse`,`olap`,`analytics`,`sql`]),M(`analytics`,`amazon-redshift-data-sharing-governance`,`Amazon Redshift Data Sharing Governance`,[`warehouse`,`olap`,`analytics`,`sql`]),M(`analytics`,`amazon-redshift-dense-compute-node`,`Amazon Redshift Dense Compute Node`,[`warehouse`,`olap`,`analytics`,`sql`]),M(`analytics`,`amazon-redshift-dense-storage-node`,`Amazon Redshift Dense Storage Node`,[`warehouse`,`olap`,`analytics`,`sql`]),M(`analytics`,`amazon-redshift-ml`,`Amazon Redshift ML`,[`warehouse`,`olap`,`analytics`,`sql`]),M(`analytics`,`amazon-redshift-query-editor-v2-0`,`Amazon Redshift Query Editor v2.0`,[`warehouse`,`olap`,`analytics`,`sql`]),M(`analytics`,`amazon-redshift-ra3`,`Amazon Redshift RA3`,[`warehouse`,`olap`,`analytics`,`sql`]),M(`analytics`,`amazon-redshift-streaming-ingestion`,`Amazon Redshift Streaming Ingestion`,[`warehouse`,`olap`,`analytics`,`sql`]),M(`analytics`,`aws-data-exchange-for-apis`,`AWS Data Exchange for APIs`),M(`analytics`,`aws-glue-aws-glue-for-ray`,`AWS Glue AWS Glue for Ray`,[`etl`,`catalog`,`data pipeline`]),M(`analytics`,`aws-glue-crawler`,`AWS Glue Crawler`,[`etl`,`catalog`,`data pipeline`]),M(`analytics`,`aws-glue-data-catalog`,`AWS Glue Data Catalog`,[`etl`,`catalog`,`data pipeline`]),M(`analytics`,`aws-glue-data-quality`,`AWS Glue Data Quality`,[`etl`,`catalog`,`data pipeline`]),M(`analytics`,`aws-lake-formation-data-lake`,`AWS Lake Formation Data Lake`),M(`application-integration`,`amazon-eventbridge-custom-event-bus`,`Amazon EventBridge Custom Event Bus`,[`events`,`event bus`,`cloudwatch events`]),M(`application-integration`,`amazon-eventbridge-default-event-bus`,`Amazon EventBridge Default Event Bus`,[`events`,`event bus`,`cloudwatch events`]),M(`application-integration`,`amazon-eventbridge-event`,`Amazon EventBridge Event`),M(`application-integration`,`amazon-eventbridge-pipes`,`Amazon EventBridge Pipes`,[`events`,`event bus`,`cloudwatch events`]),M(`application-integration`,`amazon-eventbridge-rule`,`Amazon EventBridge Rule`,[`events`,`event bus`,`cloudwatch events`]),M(`application-integration`,`amazon-eventbridge-saas-partner-event`,`Amazon EventBridge Saas Partner Event`,[`events`,`event bus`,`cloudwatch events`]),M(`application-integration`,`amazon-eventbridge-scheduler`,`Amazon EventBridge Scheduler`,[`events`,`event bus`,`cloudwatch events`]),M(`application-integration`,`amazon-eventbridge-schema`,`Amazon EventBridge Schema`,[`events`,`event bus`,`cloudwatch events`]),M(`application-integration`,`amazon-eventbridge-schema-registry`,`Amazon EventBridge Schema Registry`,[`events`,`event bus`,`cloudwatch events`]),M(`application-integration`,`amazon-mq-broker`,`Amazon MQ Broker`,[`rabbitmq`,`activemq`,`broker`,`queue`]),M(`application-integration`,`amazon-simple-notification-service-email-notification`,`Amazon Simple Notification Service Email Notification`,[`sns`,`pubsub`,`topic`,`notification`]),M(`application-integration`,`amazon-simple-notification-service-http-notification`,`Amazon Simple Notification Service HTTP Notification`,[`sns`,`pubsub`,`topic`,`notification`]),M(`application-integration`,`amazon-simple-notification-service-topic`,`Amazon Simple Notification Service Topic`,[`sns`,`pubsub`,`topic`,`notification`]),M(`application-integration`,`amazon-simple-queue-service-message`,`Amazon Simple Queue Service Message`,[`sqs`,`queue`,`message`]),M(`application-integration`,`amazon-simple-queue-service-queue`,`Amazon Simple Queue Service Queue`,[`sqs`,`queue`,`message`]),M(`artificial-intelligence`,`amazon-devops-guru-insights`,`Amazon DevOps Guru Insights`),M(`artificial-intelligence`,`amazon-rekognition-image`,`Amazon Rekognition Image`),M(`artificial-intelligence`,`amazon-rekognition-video`,`Amazon Rekognition Video`),M(`artificial-intelligence`,`amazon-sagemaker-ai-canvas`,`Amazon SageMaker AI Canvas`,[`ml`,`machine learning`,`training`,`notebook`]),M(`artificial-intelligence`,`amazon-sagemaker-ai-geospatial-ml`,`Amazon SageMaker AI Geospatial ML`,[`ml`,`machine learning`,`training`,`notebook`]),M(`artificial-intelligence`,`amazon-sagemaker-ai-model`,`Amazon SageMaker AI Model`,[`ml`,`machine learning`,`training`,`notebook`]),M(`artificial-intelligence`,`amazon-sagemaker-ai-notebook`,`Amazon SageMaker AI Notebook`,[`ml`,`machine learning`,`training`,`notebook`]),M(`artificial-intelligence`,`amazon-sagemaker-ai-shadow-testing`,`Amazon SageMaker AI Shadow Testing`,[`ml`,`machine learning`,`training`,`notebook`]),M(`artificial-intelligence`,`amazon-sagemaker-ai-train`,`Amazon SageMaker AI Train`,[`ml`,`machine learning`,`training`,`notebook`]),M(`artificial-intelligence`,`amazon-textract-analyze-lending`,`Amazon Textract Analyze Lending`),M(`blockchain`,`amazon-managed-blockchain-blockchain`,`Amazon Managed Blockchain Blockchain`),M(`business-applications`,`amazon-pinpoint-journey`,`Amazon Pinpoint Journey`),M(`business-applications`,`amazon-simple-email-service-email`,`Amazon Simple Email Service Email`,[`ses`,`email`,`smtp`]),M(`compute`,`amazon-ec2-ami`,`Amazon EC2 AMI`,[`ec2`,`vm`,`instance`,`compute`,`server`]),M(`compute`,`amazon-ec2-auto-scaling`,`Amazon EC2 Auto Scaling`,[`ec2`,`vm`,`instance`,`compute`,`server`]),M(`compute`,`amazon-ec2-aws-microservice-extractor-for-net`,`Amazon EC2 AWS Microservice Extractor for .NET`,[`ec2`,`vm`,`instance`,`compute`,`server`]),M(`compute`,`amazon-ec2-db-instance`,`Amazon EC2 DB Instance`,[`ec2`,`vm`,`instance`,`compute`,`server`]),M(`compute`,`amazon-ec2-elastic-ip-address`,`Amazon EC2 Elastic IP Address`,[`ec2`,`vm`,`instance`,`compute`,`server`]),M(`compute`,`amazon-ec2-instance`,`Amazon EC2 Instance`,[`ec2`,`vm`,`instance`,`compute`,`server`]),M(`compute`,`amazon-ec2-instance-with-cloudwatch`,`Amazon EC2 Instance with CloudWatch`,[`ec2`,`vm`,`instance`,`compute`,`server`]),M(`compute`,`amazon-ec2-instances`,`Amazon EC2 Instances`,[`ec2`,`vm`,`instance`,`compute`,`server`]),M(`compute`,`amazon-ec2-rescue`,`Amazon EC2 Rescue`,[`ec2`,`vm`,`instance`,`compute`,`server`]),M(`compute`,`amazon-ec2-spot-instance`,`Amazon EC2 Spot Instance`,[`ec2`,`vm`,`instance`,`compute`,`server`]),M(`compute`,`aws-elastic-beanstalk-application`,`AWS Elastic Beanstalk Application`),M(`compute`,`aws-elastic-beanstalk-deployment`,`AWS Elastic Beanstalk Deployment`),M(`compute`,`aws-lambda-lambda-function`,`AWS Lambda Lambda Function`,[`faas`,`function`,`serverless`]),M(`containers`,`amazon-elastic-container-registry-image`,`Amazon Elastic Container Registry Image`,[`ecr`,`registry`,`images`]),M(`containers`,`amazon-elastic-container-registry-registry`,`Amazon Elastic Container Registry Registry`,[`ecr`,`registry`,`images`]),M(`containers`,`amazon-elastic-container-service-container-1`,`Amazon Elastic Container Service Container 1`,[`ecs`,`containers`]),M(`containers`,`amazon-elastic-container-service-container-2`,`Amazon Elastic Container Service Container 2`,[`ecs`,`containers`]),M(`containers`,`amazon-elastic-container-service-container-3`,`Amazon Elastic Container Service Container 3`,[`ecs`,`containers`]),M(`containers`,`amazon-elastic-container-service-copiiot-cli`,`Amazon Elastic Container Service CopiIoT CLI`,[`ecs`,`containers`]),M(`containers`,`amazon-elastic-container-service-ecs-service-connect`,`Amazon Elastic Container Service ECS Service Connect`,[`ecs`,`containers`]),M(`containers`,`amazon-elastic-container-service-service`,`Amazon Elastic Container Service Service`,[`ecs`,`containers`]),M(`containers`,`amazon-elastic-container-service-task`,`Amazon Elastic Container Service Task`,[`ecs`,`containers`]),M(`containers`,`amazon-elastic-kubernetes-service-eks-on-outposts`,`Amazon Elastic Kubernetes Service EKS on Outposts`,[`eks`,`k8s`,`kubernetes`]),M(`databases`,`amazon-aurora-amazon-aurora-instance-alternate`,`Amazon Aurora Amazon Aurora Instance alternate`,[`postgres`,`mysql`,`sql`,`database`]),M(`databases`,`amazon-aurora-amazon-rds-instance`,`Amazon Aurora Amazon RDS Instance`,[`postgres`,`mysql`,`sql`,`database`]),M(`databases`,`amazon-aurora-amazon-rds-instance-aternate`,`Amazon Aurora Amazon RDS Instance Aternate`,[`postgres`,`mysql`,`sql`,`database`]),M(`databases`,`amazon-aurora-instance`,`Amazon Aurora Instance`),M(`databases`,`amazon-aurora-mariadb-instance`,`Amazon Aurora MariaDB Instance`),M(`databases`,`amazon-aurora-mariadb-instance-alternate`,`Amazon Aurora MariaDB Instance Alternate`),M(`databases`,`amazon-aurora-mysql-instance`,`Amazon Aurora MySQL Instance`),M(`databases`,`amazon-aurora-mysql-instance-alternate`,`Amazon Aurora MySQL Instance Alternate`),M(`databases`,`amazon-aurora-oracle-instance`,`Amazon Aurora Oracle Instance`),M(`databases`,`amazon-aurora-oracle-instance-alternate`,`Amazon Aurora Oracle Instance Alternate`),M(`databases`,`amazon-aurora-piops-instance`,`Amazon Aurora PIOPS Instance`),M(`databases`,`amazon-aurora-postgresql-instance`,`Amazon Aurora PostgreSQL Instance`),M(`databases`,`amazon-aurora-postgresql-instance-alternate`,`Amazon Aurora PostgreSQL Instance Alternate`),M(`databases`,`amazon-aurora-sql-server-instance`,`Amazon Aurora SQL Server Instance`),M(`databases`,`amazon-aurora-sql-server-instance-alternate`,`Amazon Aurora SQL Server Instance Alternate`),M(`databases`,`amazon-aurora-trusted-language-extensions-for-postgresql`,`Amazon Aurora Trusted Language Extensions for PostgreSQL`,[`postgres`,`mysql`,`sql`,`database`]),M(`databases`,`amazon-documentdb-elastic-clusters`,`Amazon DocumentDB Elastic Clusters`,[`mongodb`,`document`,`nosql`]),M(`databases`,`amazon-dynamodb-amazon-dynamodb-accelerator`,`Amazon DynamoDB Amazon DynamoDB Accelerator`,[`nosql`,`key value`,`table`]),M(`databases`,`amazon-dynamodb-attribute`,`Amazon DynamoDB Attribute`,[`nosql`,`key value`,`table`]),M(`databases`,`amazon-dynamodb-attributes`,`Amazon DynamoDB Attributes`,[`nosql`,`key value`,`table`]),M(`databases`,`amazon-dynamodb-global-secondary-index`,`Amazon DynamoDB Global secondary index`,[`nosql`,`key value`,`table`]),M(`databases`,`amazon-dynamodb-item`,`Amazon DynamoDB Item`,[`nosql`,`key value`,`table`]),M(`databases`,`amazon-dynamodb-items`,`Amazon DynamoDB Items`,[`nosql`,`key value`,`table`]),M(`databases`,`amazon-dynamodb-standard-access-table-class`,`Amazon DynamoDB Standard Access Table Class`,[`nosql`,`key value`,`table`]),M(`databases`,`amazon-dynamodb-standard-infrequent-access-table-class`,`Amazon DynamoDB Standard Infrequent Access Table Class`,[`nosql`,`key value`,`table`]),M(`databases`,`amazon-dynamodb-stream`,`Amazon DynamoDB Stream`,[`nosql`,`key value`,`table`]),M(`databases`,`amazon-dynamodb-table`,`Amazon DynamoDB Table`,[`nosql`,`key value`,`table`]),M(`databases`,`amazon-elasticache-cache-node`,`Amazon ElastiCache Cache Node`,[`redis`,`memcached`,`cache`]),M(`databases`,`amazon-elasticache-elasticache-for-memcached`,`Amazon ElastiCache ElastiCache for Memcached`,[`redis`,`memcached`,`cache`]),M(`databases`,`amazon-elasticache-elasticache-for-redis`,`Amazon ElastiCache ElastiCache for Redis`,[`redis`,`memcached`,`cache`]),M(`databases`,`amazon-elasticache-elasticache-for-valkey`,`Amazon ElastiCache ElastiCache for Valkey`,[`redis`,`memcached`,`cache`]),M(`databases`,`amazon-rds-blue-green-deployments`,`Amazon RDS Blue Green Deployments`),M(`databases`,`amazon-rds-multi-az`,`Amazon RDS Multi AZ`),M(`databases`,`amazon-rds-multi-az-db-cluster`,`Amazon RDS Multi AZ DB Cluster`),M(`databases`,`amazon-rds-optimized-writes`,`Amazon RDS Optimized Writes`),M(`databases`,`amazon-rds-proxy-instance`,`Amazon RDS Proxy Instance`),M(`databases`,`amazon-rds-proxy-instance-alternate`,`Amazon RDS Proxy Instance Alternate`),M(`databases`,`amazon-rds-trusted-language-extensions-for-postgresql`,`Amazon RDS Trusted Language Extensions for PostgreSQL`),M(`databases`,`aws-database-migration-service-database-migration-workflow-or-job`,`AWS Database Migration Service Database migration workflow or job`,[`dms`,`migration`,`replication`,`cdc`]),M(`developer-tools`,`aws-cloud9-cloud9`,`AWS Cloud9 Cloud9`),M(`front-end-web-mobile`,`amazon-location-service-geofence`,`Amazon Location Service Geofence`),M(`front-end-web-mobile`,`amazon-location-service-map`,`Amazon Location Service Map`),M(`front-end-web-mobile`,`amazon-location-service-place`,`Amazon Location Service Place`),M(`front-end-web-mobile`,`amazon-location-service-routes`,`Amazon Location Service Routes`),M(`front-end-web-mobile`,`amazon-location-service-track`,`Amazon Location Service Track`),M(`front-end-web-mobile`,`aws-amplify-aws-amplify-studio`,`AWS Amplify AWS Amplify Studio`,[`frontend`,`hosting`,`mobile`]),M(`internet-of-things`,`aws-iot-action`,`AWS IoT Action`),M(`internet-of-things`,`aws-iot-actuator`,`AWS IoT Actuator`),M(`internet-of-things`,`aws-iot-alexa-enabled-device`,`AWS IoT Alexa Enabled Device`),M(`internet-of-things`,`aws-iot-alexa-skill`,`AWS IoT Alexa Skill`),M(`internet-of-things`,`aws-iot-alexa-voice-service`,`AWS IoT Alexa Voice Service`),M(`internet-of-things`,`aws-iot-certificate`,`AWS IoT Certificate`),M(`internet-of-things`,`aws-iot-core-device-advisor`,`AWS IoT Core Device Advisor`),M(`internet-of-things`,`aws-iot-core-device-location`,`AWS IoT Core Device Location`),M(`internet-of-things`,`aws-iot-desired-state`,`AWS IoT Desired State`),M(`internet-of-things`,`aws-iot-device-defender-iot-device-jobs`,`AWS IoT Device Defender IoT Device Jobs`),M(`internet-of-things`,`aws-iot-device-gateway`,`AWS IoT Device Gateway`),M(`internet-of-things`,`aws-iot-device-management-fleet-hub`,`AWS IoT Device Management Fleet Hub`),M(`internet-of-things`,`aws-iot-device-tester`,`AWS IoT Device Tester`),M(`internet-of-things`,`aws-iot-echo`,`AWS IoT Echo`),M(`internet-of-things`,`aws-iot-fire-tv`,`AWS IoT Fire TV`),M(`internet-of-things`,`aws-iot-fire-tv-stick`,`AWS IoT Fire TV Stick`),M(`internet-of-things`,`aws-iot-greengrass-artifact`,`AWS IoT Greengrass Artifact`),M(`internet-of-things`,`aws-iot-greengrass-component`,`AWS IoT Greengrass Component`),M(`internet-of-things`,`aws-iot-greengrass-component-machine-learning`,`AWS IoT Greengrass Component Machine Learning`),M(`internet-of-things`,`aws-iot-greengrass-component-nucleus`,`AWS IoT Greengrass Component Nucleus`),M(`internet-of-things`,`aws-iot-greengrass-component-private`,`AWS IoT Greengrass Component Private`),M(`internet-of-things`,`aws-iot-greengrass-component-public`,`AWS IoT Greengrass Component Public`),M(`internet-of-things`,`aws-iot-greengrass-connector`,`AWS IoT Greengrass Connector`),M(`internet-of-things`,`aws-iot-greengrass-interprocess-communication`,`AWS IoT Greengrass Interprocess Communication`),M(`internet-of-things`,`aws-iot-greengrass-protocol`,`AWS IoT Greengrass Protocol`),M(`internet-of-things`,`aws-iot-greengrass-recipe`,`AWS IoT Greengrass Recipe`),M(`internet-of-things`,`aws-iot-greengrass-stream-manager`,`AWS IoT Greengrass Stream Manager`),M(`internet-of-things`,`aws-iot-hardware-board`,`AWS IoT Hardware Board`),M(`internet-of-things`,`aws-iot-http-protocol`,`AWS IoT HTTP Protocol`),M(`internet-of-things`,`aws-iot-http2-protocol`,`AWS IoT HTTP2 Protocol`),M(`internet-of-things`,`aws-iot-lambda-function`,`AWS IoT Lambda Function`),M(`internet-of-things`,`aws-iot-lorawan-protocol`,`AWS IoT LoRaWAN Protocol`),M(`internet-of-things`,`aws-iot-mqtt-protocol`,`AWS IoT MQTT Protocol`),M(`internet-of-things`,`aws-iot-over-air-update`,`AWS IoT Over Air Update`),M(`internet-of-things`,`aws-iot-policy`,`AWS IoT Policy`),M(`internet-of-things`,`aws-iot-reported-state`,`AWS IoT Reported State`),M(`internet-of-things`,`aws-iot-rule`,`AWS IoT Rule`),M(`internet-of-things`,`aws-iot-sailboat`,`AWS IoT Sailboat`),M(`internet-of-things`,`aws-iot-sensor`,`AWS IoT Sensor`),M(`internet-of-things`,`aws-iot-servo`,`AWS IoT Servo`),M(`internet-of-things`,`aws-iot-shadow`,`AWS IoT Shadow`),M(`internet-of-things`,`aws-iot-simulator`,`AWS IoT Simulator`),M(`internet-of-things`,`aws-iot-sitewise-asset`,`AWS IoT SiteWise Asset`),M(`internet-of-things`,`aws-iot-sitewise-asset-hierarchy`,`AWS IoT SiteWise Asset Hierarchy`),M(`internet-of-things`,`aws-iot-sitewise-asset-model`,`AWS IoT SiteWise Asset Model`),M(`internet-of-things`,`aws-iot-sitewise-asset-properties`,`AWS IoT SiteWise Asset Properties`),M(`internet-of-things`,`aws-iot-sitewise-data-streams`,`AWS IoT SiteWise Data Streams`),M(`internet-of-things`,`aws-iot-thing-bank`,`AWS IoT Thing Bank`),M(`internet-of-things`,`aws-iot-thing-bicycle`,`AWS IoT Thing Bicycle`),M(`internet-of-things`,`aws-iot-thing-camera`,`AWS IoT Thing Camera`),M(`internet-of-things`,`aws-iot-thing-car`,`AWS IoT Thing Car`),M(`internet-of-things`,`aws-iot-thing-cart`,`AWS IoT Thing Cart`),M(`internet-of-things`,`aws-iot-thing-coffee-pot`,`AWS IoT Thing Coffee Pot`),M(`internet-of-things`,`aws-iot-thing-door-lock`,`AWS IoT Thing Door Lock`),M(`internet-of-things`,`aws-iot-thing-factory`,`AWS IoT Thing Factory`),M(`internet-of-things`,`aws-iot-thing-freertos-device`,`AWS IoT Thing FreeRTOS Device`),M(`internet-of-things`,`aws-iot-thing-generic`,`AWS IoT Thing Generic`),M(`internet-of-things`,`aws-iot-thing-house`,`AWS IoT Thing House`),M(`internet-of-things`,`aws-iot-thing-humidity-sensor`,`AWS IoT Thing Humidity Sensor`),M(`internet-of-things`,`aws-iot-thing-industrial-pc`,`AWS IoT Thing Industrial PC`),M(`internet-of-things`,`aws-iot-thing-lightbulb`,`AWS IoT Thing Lightbulb`),M(`internet-of-things`,`aws-iot-thing-medical-emergency`,`AWS IoT Thing Medical Emergency`),M(`internet-of-things`,`aws-iot-thing-plc`,`AWS IoT Thing PLC`),M(`internet-of-things`,`aws-iot-thing-police-emergency`,`AWS IoT Thing Police Emergency`),M(`internet-of-things`,`aws-iot-thing-relay`,`AWS IoT Thing Relay`),M(`internet-of-things`,`aws-iot-thing-stacklight`,`AWS IoT Thing Stacklight`),M(`internet-of-things`,`aws-iot-thing-temperature-humidity-sensor`,`AWS IoT Thing Temperature Humidity Sensor`),M(`internet-of-things`,`aws-iot-thing-temperature-sensor`,`AWS IoT Thing Temperature Sensor`),M(`internet-of-things`,`aws-iot-thing-temperature-vibration-sensor`,`AWS IoT Thing Temperature Vibration Sensor`),M(`internet-of-things`,`aws-iot-thing-thermostat`,`AWS IoT Thing Thermostat`),M(`internet-of-things`,`aws-iot-thing-travel`,`AWS IoT Thing Travel`),M(`internet-of-things`,`aws-iot-thing-utility`,`AWS IoT Thing Utility`),M(`internet-of-things`,`aws-iot-thing-vibration-sensor`,`AWS IoT Thing Vibration Sensor`),M(`internet-of-things`,`aws-iot-thing-windfarm`,`AWS IoT Thing Windfarm`),M(`internet-of-things`,`aws-iot-topic`,`AWS IoT Topic`),M(`management-tools`,`amazon-cloudwatch-alarm`,`Amazon CloudWatch Alarm`,[`logs`,`metrics`,`alarm`,`monitoring`,`observability`]),M(`management-tools`,`amazon-cloudwatch-cross-account-observability`,`Amazon CloudWatch Cross account Observability`,[`logs`,`metrics`,`alarm`,`monitoring`,`observability`]),M(`management-tools`,`amazon-cloudwatch-data-protection`,`Amazon CloudWatch Data Protection`,[`logs`,`metrics`,`alarm`,`monitoring`,`observability`]),M(`management-tools`,`amazon-cloudwatch-event-event-based`,`Amazon CloudWatch Event Event Based`,[`logs`,`metrics`,`alarm`,`monitoring`,`observability`]),M(`management-tools`,`amazon-cloudwatch-event-time-based`,`Amazon CloudWatch Event Time Based`,[`logs`,`metrics`,`alarm`,`monitoring`,`observability`]),M(`management-tools`,`amazon-cloudwatch-evidently`,`Amazon CloudWatch Evidently`,[`logs`,`metrics`,`alarm`,`monitoring`,`observability`]),M(`management-tools`,`amazon-cloudwatch-logs`,`Amazon CloudWatch Logs`,[`logs`,`metrics`,`alarm`,`monitoring`,`observability`]),M(`management-tools`,`amazon-cloudwatch-metrics-insights`,`Amazon CloudWatch Metrics Insights`,[`logs`,`metrics`,`alarm`,`monitoring`,`observability`]),M(`management-tools`,`amazon-cloudwatch-rule`,`Amazon CloudWatch Rule`,[`logs`,`metrics`,`alarm`,`monitoring`,`observability`]),M(`management-tools`,`amazon-cloudwatch-rum`,`Amazon CloudWatch RUM`,[`logs`,`metrics`,`alarm`,`monitoring`,`observability`]),M(`management-tools`,`amazon-cloudwatch-synthetics`,`Amazon CloudWatch Synthetics`,[`logs`,`metrics`,`alarm`,`monitoring`,`observability`]),M(`management-tools`,`aws-cloudformation-change-set`,`AWS CloudFormation Change Set`,[`iac`,`stack`,`template`,`infrastructure as code`]),M(`management-tools`,`aws-cloudformation-stack`,`AWS CloudFormation Stack`,[`iac`,`stack`,`template`,`infrastructure as code`]),M(`management-tools`,`aws-cloudformation-template`,`AWS CloudFormation Template`,[`iac`,`stack`,`template`,`infrastructure as code`]),M(`management-tools`,`aws-cloudtrail-cloudtrail-lake`,`AWS CloudTrail CloudTrail Lake`,[`audit`,`api log`,`compliance`]),M(`management-tools`,`aws-license-manager-application-discovery`,`AWS License Manager Application Discovery`),M(`management-tools`,`aws-license-manager-license-blending`,`AWS License Manager License Blending`),M(`management-tools`,`aws-organizations-account`,`AWS Organizations Account`,[`accounts`,`ou`,`multi account`]),M(`management-tools`,`aws-organizations-management-account`,`AWS Organizations Management Account`,[`accounts`,`ou`,`multi account`]),M(`management-tools`,`aws-organizations-organizational-unit`,`AWS Organizations Organizational Unit`,[`accounts`,`ou`,`multi account`]),M(`management-tools`,`aws-systems-manager-application-manager`,`AWS Systems Manager Application Manager`,[`ssm`,`parameter store`,`patching`]),M(`management-tools`,`aws-systems-manager-automation`,`AWS Systems Manager Automation`,[`ssm`,`parameter store`,`patching`]),M(`management-tools`,`aws-systems-manager-change-calendar`,`AWS Systems Manager Change Calendar`,[`ssm`,`parameter store`,`patching`]),M(`management-tools`,`aws-systems-manager-change-manager`,`AWS Systems Manager Change Manager`,[`ssm`,`parameter store`,`patching`]),M(`management-tools`,`aws-systems-manager-compliance`,`AWS Systems Manager Compliance`,[`ssm`,`parameter store`,`patching`]),M(`management-tools`,`aws-systems-manager-distributor`,`AWS Systems Manager Distributor`,[`ssm`,`parameter store`,`patching`]),M(`management-tools`,`aws-systems-manager-documents`,`AWS Systems Manager Documents`,[`ssm`,`parameter store`,`patching`]),M(`management-tools`,`aws-systems-manager-incident-manager`,`AWS Systems Manager Incident Manager`,[`ssm`,`parameter store`,`patching`]),M(`management-tools`,`aws-systems-manager-inventory`,`AWS Systems Manager Inventory`,[`ssm`,`parameter store`,`patching`]),M(`management-tools`,`aws-systems-manager-maintenance-windows`,`AWS Systems Manager Maintenance Windows`,[`ssm`,`parameter store`,`patching`]),M(`management-tools`,`aws-systems-manager-opscenter`,`AWS Systems Manager OpsCenter`,[`ssm`,`parameter store`,`patching`]),M(`management-tools`,`aws-systems-manager-parameter-store`,`AWS Systems Manager Parameter Store`,[`ssm`,`parameter store`,`patching`]),M(`management-tools`,`aws-systems-manager-patch-manager`,`AWS Systems Manager Patch Manager`,[`ssm`,`parameter store`,`patching`]),M(`management-tools`,`aws-systems-manager-run-command`,`AWS Systems Manager Run Command`,[`ssm`,`parameter store`,`patching`]),M(`management-tools`,`aws-systems-manager-session-manager`,`AWS Systems Manager Session Manager`,[`ssm`,`parameter store`,`patching`]),M(`management-tools`,`aws-systems-manager-state-manager`,`AWS Systems Manager State Manager`,[`ssm`,`parameter store`,`patching`]),M(`management-tools`,`aws-trusted-advisor-checklist`,`AWS Trusted Advisor Checklist`),M(`management-tools`,`aws-trusted-advisor-checklist-cost`,`AWS Trusted Advisor Checklist Cost`),M(`management-tools`,`aws-trusted-advisor-checklist-fault-tolerant`,`AWS Trusted Advisor Checklist Fault Tolerant`),M(`management-tools`,`aws-trusted-advisor-checklist-performance`,`AWS Trusted Advisor Checklist Performance`),M(`management-tools`,`aws-trusted-advisor-checklist-security`,`AWS Trusted Advisor Checklist Security`),M(`media-services`,`aws-cloud-digital-interface`,`AWS Cloud Digital Interface`),M(`media-services`,`aws-elemental-mediaconnect-mediaconnect-gateway`,`AWS Elemental MediaConnect MediaConnect Gateway`),M(`migration-modernization`,`aws-application-discovery-service-aws-agentless-collector`,`AWS Application Discovery Service AWS Agentless Collector`),M(`migration-modernization`,`aws-application-discovery-service-aws-discovery-agent`,`AWS Application Discovery Service AWS Discovery Agent`),M(`migration-modernization`,`aws-application-discovery-service-migration-evaluator-collector`,`AWS Application Discovery Service Migration Evaluator Collector`),M(`migration-modernization`,`aws-datasync-agent`,`AWS Datasync Agent`),M(`migration-modernization`,`aws-datasync-discovery`,`AWS DataSync Discovery`),M(`migration-modernization`,`aws-mainframe-modernization-analyzer`,`AWS Mainframe Modernization Analyzer`),M(`migration-modernization`,`aws-mainframe-modernization-compiler`,`AWS Mainframe Modernization Compiler`),M(`migration-modernization`,`aws-mainframe-modernization-converter`,`AWS Mainframe Modernization Converter`),M(`migration-modernization`,`aws-mainframe-modernization-developer`,`AWS Mainframe Modernization Developer`),M(`migration-modernization`,`aws-mainframe-modernization-runtime`,`AWS Mainframe Modernization Runtime`),M(`migration-modernization`,`aws-transfer-family-aws-as2`,`AWS Transfer Family AWS AS2`),M(`migration-modernization`,`aws-transfer-family-aws-ftp`,`AWS Transfer Family AWS FTP`),M(`migration-modernization`,`aws-transfer-family-aws-ftps`,`AWS Transfer Family AWS FTPS`),M(`migration-modernization`,`aws-transfer-family-aws-sftp`,`AWS Transfer Family AWS SFTP`),M(`networking-content-delivery`,`amazon-api-gateway-endpoint`,`Amazon API Gateway Endpoint`,[`apigw`,`rest`,`http`,`api`]),M(`networking-content-delivery`,`amazon-cloudfront-download-distribution`,`Amazon CloudFront Download Distribution`,[`cdn`,`edge`,`cache`]),M(`networking-content-delivery`,`amazon-cloudfront-edge-location`,`Amazon CloudFront Edge Location`,[`cdn`,`edge`,`cache`]),M(`networking-content-delivery`,`amazon-cloudfront-functions`,`Amazon CloudFront Functions`,[`cdn`,`edge`,`cache`]),M(`networking-content-delivery`,`amazon-cloudfront-streaming-distribution`,`Amazon CloudFront Streaming Distribution`,[`cdn`,`edge`,`cache`]),M(`networking-content-delivery`,`amazon-route-53-hosted-zone`,`Amazon Route 53 Hosted Zone`),M(`networking-content-delivery`,`amazon-route-53-readiness-checks`,`Amazon Route 53 Readiness Checks`,[`dns`,`domain`,`route53`]),M(`networking-content-delivery`,`amazon-route-53-resolver`,`Amazon Route 53 Resolver`,[`dns`,`domain`,`route53`]),M(`networking-content-delivery`,`amazon-route-53-resolver-dns-firewall`,`Amazon Route 53 Resolver DNS Firewall`,[`dns`,`domain`,`route53`]),M(`networking-content-delivery`,`amazon-route-53-resolver-query-logging`,`Amazon Route 53 Resolver Query Logging`,[`dns`,`domain`,`route53`]),M(`networking-content-delivery`,`amazon-route-53-route-table`,`Amazon Route 53 Route Table`,[`dns`,`domain`,`route53`]),M(`networking-content-delivery`,`amazon-route-53-routing-controls`,`Amazon Route 53 Routing Controls`,[`dns`,`domain`,`route53`]),M(`networking-content-delivery`,`amazon-vpc-carrier-gateway`,`Amazon VPC Carrier Gateway`),M(`networking-content-delivery`,`amazon-vpc-customer-gateway`,`Amazon VPC Customer Gateway`),M(`networking-content-delivery`,`amazon-vpc-elastic-network-adapter`,`Amazon VPC Elastic Network Adapter`),M(`networking-content-delivery`,`amazon-vpc-elastic-network-interface`,`Amazon VPC Elastic Network Interface`),M(`networking-content-delivery`,`amazon-vpc-endpoints`,`Amazon VPC Endpoints`),M(`networking-content-delivery`,`amazon-vpc-flow-logs`,`Amazon VPC Flow Logs`),M(`networking-content-delivery`,`amazon-vpc-internet-gateway`,`Amazon VPC Internet Gateway`),M(`networking-content-delivery`,`amazon-vpc-nat-gateway`,`Amazon VPC NAT Gateway`),M(`networking-content-delivery`,`amazon-vpc-network-access-analyzer`,`Amazon VPC Network Access Analyzer`),M(`networking-content-delivery`,`amazon-vpc-network-access-control-list`,`Amazon VPC Network Access Control List`),M(`networking-content-delivery`,`amazon-vpc-peering-connection`,`Amazon VPC Peering Connection`),M(`networking-content-delivery`,`amazon-vpc-reachability-analyzer`,`Amazon VPC Reachability Analyzer`),M(`networking-content-delivery`,`amazon-vpc-router`,`Amazon VPC Router`),M(`networking-content-delivery`,`amazon-vpc-traffic-mirroring`,`Amazon VPC Traffic Mirroring`),M(`networking-content-delivery`,`amazon-vpc-virtual-private-cloud-vpc`,`Amazon VPC Virtual private cloud VPC`),M(`networking-content-delivery`,`amazon-vpc-vpn-connection`,`Amazon VPC VPN Connection`),M(`networking-content-delivery`,`amazon-vpc-vpn-gateway`,`Amazon VPC VPN Gateway`),M(`networking-content-delivery`,`aws-app-mesh-mesh`,`AWS App Mesh Mesh`),M(`networking-content-delivery`,`aws-app-mesh-virtual-gateway`,`AWS App Mesh Virtual Gateway`),M(`networking-content-delivery`,`aws-app-mesh-virtual-node`,`AWS App Mesh Virtual Node`),M(`networking-content-delivery`,`aws-app-mesh-virtual-router`,`AWS App Mesh Virtual Router`),M(`networking-content-delivery`,`aws-app-mesh-virtual-service`,`AWS App Mesh Virtual Service`),M(`networking-content-delivery`,`aws-cloud-map-namespace`,`AWS Cloud Map Namespace`),M(`networking-content-delivery`,`aws-cloud-map-resource`,`AWS Cloud Map Resource`),M(`networking-content-delivery`,`aws-cloud-map-service`,`AWS Cloud Map Service`),M(`networking-content-delivery`,`aws-cloud-wan-core-network-edge`,`AWS Cloud WAN Core Network Edge`),M(`networking-content-delivery`,`aws-cloud-wan-segment-network`,`AWS Cloud WAN Segment Network`),M(`networking-content-delivery`,`aws-cloud-wan-transit-gateway-route-table-attachment`,`AWS Cloud WAN Transit Gateway Route Table Attachment`),M(`networking-content-delivery`,`aws-direct-connect-gateway`,`AWS Direct Connect Gateway`,[`dx`,`private link`,`network`]),M(`networking-content-delivery`,`aws-transit-gateway-attachment`,`AWS Transit Gateway Attachment`,[`tgw`,`network`,`routing`]),M(`networking-content-delivery`,`elastic-load-balancing-application-load-balancer`,`Elastic Load Balancing Application Load Balancer`,[`elb`,`alb`,`nlb`,`load balancer`]),M(`networking-content-delivery`,`elastic-load-balancing-classic-load-balancer`,`Elastic Load Balancing Classic Load Balancer`,[`elb`,`alb`,`nlb`,`load balancer`]),M(`networking-content-delivery`,`elastic-load-balancing-gateway-load-balancer`,`Elastic Load Balancing Gateway Load Balancer`,[`elb`,`alb`,`nlb`,`load balancer`]),M(`networking-content-delivery`,`elastic-load-balancing-network-load-balancer`,`Elastic Load Balancing Network Load Balancer`,[`elb`,`alb`,`nlb`,`load balancer`]),M(`quantum-technologies`,`amazon-braket-chandelier`,`Amazon Braket Chandelier`),M(`quantum-technologies`,`amazon-braket-chip`,`Amazon Braket Chip`),M(`quantum-technologies`,`amazon-braket-embedded-simulator`,`Amazon Braket Embedded Simulator`),M(`quantum-technologies`,`amazon-braket-managed-simulator`,`Amazon Braket Managed Simulator`),M(`quantum-technologies`,`amazon-braket-noise-simulator`,`Amazon Braket Noise Simulator`),M(`quantum-technologies`,`amazon-braket-qpu`,`Amazon Braket QPU`),M(`quantum-technologies`,`amazon-braket-simulator`,`Amazon Braket Simulator`),M(`quantum-technologies`,`amazon-braket-simulator-1`,`Amazon Braket Simulator 1`),M(`quantum-technologies`,`amazon-braket-simulator-2`,`Amazon Braket Simulator 2`),M(`quantum-technologies`,`amazon-braket-simulator-3`,`Amazon Braket Simulator 3`),M(`quantum-technologies`,`amazon-braket-simulator-4`,`Amazon Braket Simulator 4`),M(`quantum-technologies`,`amazon-braket-state-vector`,`Amazon Braket State Vector`),M(`quantum-technologies`,`amazon-braket-tensor-network`,`Amazon Braket Tensor Network`),M(`security-identity`,`amazon-inspector-agent`,`Amazon Inspector Agent`,[`vulnerability`,`scanning`,`security`]),M(`security-identity`,`aws-certificate-manager-certificate-authority`,`AWS Certificate Manager Certificate Authority`,[`acm`,`tls`,`ssl`,`certificate`]),M(`security-identity`,`aws-directory-service-ad-connector`,`AWS Directory Service AD Connector`),M(`security-identity`,`aws-directory-service-aws-managed-microsoft-ad`,`AWS Directory Service AWS Managed Microsoft AD`),M(`security-identity`,`aws-directory-service-simple-ad`,`AWS Directory Service Simple AD`),M(`security-identity`,`aws-identity-access-management-add-on`,`AWS Identity Access Management Add on`),M(`security-identity`,`aws-identity-access-management-aws-sts`,`AWS Identity Access Management AWS STS`),M(`security-identity`,`aws-identity-access-management-aws-sts-alternate`,`AWS Identity Access Management AWS STS Alternate`),M(`security-identity`,`aws-identity-access-management-data-encryption-key`,`AWS Identity Access Management Data Encryption Key`),M(`security-identity`,`aws-identity-access-management-encrypted-data`,`AWS Identity Access Management Encrypted Data`),M(`security-identity`,`aws-identity-access-management-iam-access-analyzer`,`AWS Identity Access Management IAM Access Analyzer`),M(`security-identity`,`aws-identity-access-management-iam-roles-anywhere`,`AWS Identity Access Management IAM Roles Anywhere`),M(`security-identity`,`aws-identity-access-management-long-term-security-credential`,`AWS Identity Access Management Long Term Security Credential`),M(`security-identity`,`aws-identity-access-management-mfa-token`,`AWS Identity Access Management MFA Token`),M(`security-identity`,`aws-identity-access-management-permissions`,`AWS Identity Access Management Permissions`),M(`security-identity`,`aws-identity-access-management-role`,`AWS Identity Access Management Role`),M(`security-identity`,`aws-identity-access-management-temporary-security-credential`,`AWS Identity Access Management Temporary Security Credential`),M(`security-identity`,`aws-key-management-service-external-key-store`,`AWS Key Management Service External Key Store`,[`kms`,`encryption`,`keys`]),M(`security-identity`,`aws-network-firewall-endpoints`,`AWS Network Firewall Endpoints`),M(`security-identity`,`aws-security-hub-finding`,`AWS Security Hub Finding`),M(`security-identity`,`aws-shield-aws-shield-advanced`,`AWS Shield AWS Shield Advanced`,[`ddos`,`protection`,`security`]),M(`security-identity`,`aws-waf-bad-bot`,`AWS WAF Bad Bot`,[`firewall`,`web application firewall`,`security`]),M(`security-identity`,`aws-waf-bot`,`AWS WAF Bot`,[`firewall`,`web application firewall`,`security`]),M(`security-identity`,`aws-waf-bot-control`,`AWS WAF Bot Control`,[`firewall`,`web application firewall`,`security`]),M(`security-identity`,`aws-waf-filtering-rule`,`AWS WAF Filtering Rule`,[`firewall`,`web application firewall`,`security`]),M(`security-identity`,`aws-waf-labels`,`AWS WAF Labels`,[`firewall`,`web application firewall`,`security`]),M(`security-identity`,`aws-waf-managed-rule`,`AWS WAF Managed Rule`,[`firewall`,`web application firewall`,`security`]),M(`security-identity`,`aws-waf-rule`,`AWS WAF Rule`,[`firewall`,`web application firewall`,`security`]),M(`storage`,`amazon-elastic-block-store-amazon-data-lifecycle-manager`,`Amazon Elastic Block Store Amazon Data Lifecycle Manager`,[`ebs`,`volume`,`disk`]),M(`storage`,`amazon-elastic-block-store-multiple-volumes`,`Amazon Elastic Block Store Multiple Volumes`,[`ebs`,`volume`,`disk`]),M(`storage`,`amazon-elastic-block-store-snapshot`,`Amazon Elastic Block Store Snapshot`,[`ebs`,`volume`,`disk`]),M(`storage`,`amazon-elastic-block-store-volume`,`Amazon Elastic Block Store Volume`,[`ebs`,`volume`,`disk`]),M(`storage`,`amazon-elastic-block-store-volume-gp3`,`Amazon Elastic Block Store Volume gp3`,[`ebs`,`volume`,`disk`]),M(`storage`,`amazon-elastic-file-system-efs-intelligent-tiering`,`Amazon Elastic File System EFS Intelligent Tiering`,[`efs`,`nfs`,`shared filesystem`]),M(`storage`,`amazon-elastic-file-system-efs-one-zone`,`Amazon Elastic File System EFS One Zone`,[`efs`,`nfs`,`shared filesystem`]),M(`storage`,`amazon-elastic-file-system-efs-one-zone-infrequent-access`,`Amazon Elastic File System EFS One Zone Infrequent Access`,[`efs`,`nfs`,`shared filesystem`]),M(`storage`,`amazon-elastic-file-system-efs-standard`,`Amazon Elastic File System EFS Standard`,[`efs`,`nfs`,`shared filesystem`]),M(`storage`,`amazon-elastic-file-system-efs-standard-infrequent-access`,`Amazon Elastic File System EFS Standard Infrequent Access`,[`efs`,`nfs`,`shared filesystem`]),M(`storage`,`amazon-elastic-file-system-elastic-throughput`,`Amazon Elastic File System Elastic Throughput`,[`efs`,`nfs`,`shared filesystem`]),M(`storage`,`amazon-elastic-file-system-file-system`,`Amazon Elastic File System File System`,[`efs`,`nfs`,`shared filesystem`]),M(`storage`,`amazon-file-cache-hybrid-nfs-linked-datasets`,`Amazon File Cache Hybrid NFS linked datasets`),M(`storage`,`amazon-file-cache-on-premises-nfs-linked-datasets`,`Amazon File Cache On premises NFS linked datasets`),M(`storage`,`amazon-file-cache-s3-linked-datasets`,`Amazon File Cache S3 linked datasets`),M(`storage`,`amazon-simple-storage-service-bucket`,`Amazon Simple Storage Service Bucket`,[`s3`,`bucket`,`object storage`]),M(`storage`,`amazon-simple-storage-service-bucket-with-objects`,`Amazon Simple Storage Service Bucket With Objects`,[`s3`,`bucket`,`object storage`]),M(`storage`,`amazon-simple-storage-service-directory-bucket`,`Amazon Simple Storage Service Directory bucket`,[`s3`,`bucket`,`object storage`]),M(`storage`,`amazon-simple-storage-service-general-access-points`,`Amazon Simple Storage Service General Access Points`,[`s3`,`bucket`,`object storage`]),M(`storage`,`amazon-simple-storage-service-glacier-archive`,`Amazon Simple Storage Service Glacier Archive`,[`s3 glacier`,`archive`,`cold storage`]),M(`storage`,`amazon-simple-storage-service-glacier-vault`,`Amazon Simple Storage Service Glacier Vault`,[`s3 glacier`,`archive`,`cold storage`]),M(`storage`,`amazon-simple-storage-service-object`,`Amazon Simple Storage Service Object`,[`s3`,`bucket`,`object storage`]),M(`storage`,`amazon-simple-storage-service-s3-batch-operations`,`Amazon Simple Storage Service S3 Batch Operations`,[`s3`,`bucket`,`object storage`]),M(`storage`,`amazon-simple-storage-service-s3-express-one-zone`,`Amazon Simple Storage Service S3 Express One Zone`,[`s3`,`bucket`,`object storage`]),M(`storage`,`amazon-simple-storage-service-s3-files`,`Amazon Simple Storage Service S3 Files`,[`s3`,`bucket`,`object storage`]),M(`storage`,`amazon-simple-storage-service-s3-glacier-deep-archive`,`Amazon Simple Storage Service S3 Glacier Deep Archive`,[`s3`,`bucket`,`object storage`]),M(`storage`,`amazon-simple-storage-service-s3-glacier-flexible-retrieval`,`Amazon Simple Storage Service S3 Glacier Flexible Retrieval`,[`s3`,`bucket`,`object storage`]),M(`storage`,`amazon-simple-storage-service-s3-glacier-instant-retrieval`,`Amazon Simple Storage Service S3 Glacier Instant Retrieval`,[`s3`,`bucket`,`object storage`]),M(`storage`,`amazon-simple-storage-service-s3-intelligent-tiering`,`Amazon Simple Storage Service S3 Intelligent Tiering`,[`s3`,`bucket`,`object storage`]),M(`storage`,`amazon-simple-storage-service-s3-multi-region-access-points`,`Amazon Simple Storage Service S3 Multi Region Access Points`,[`s3`,`bucket`,`object storage`]),M(`storage`,`amazon-simple-storage-service-s3-object-lambda`,`Amazon Simple Storage Service S3 Object Lambda`,[`s3`,`bucket`,`object storage`]),M(`storage`,`amazon-simple-storage-service-s3-object-lambda-access-points`,`Amazon Simple Storage Service S3 Object Lambda Access Points`,[`s3`,`bucket`,`object storage`]),M(`storage`,`amazon-simple-storage-service-s3-object-lock`,`Amazon Simple Storage Service S3 Object Lock`,[`s3`,`bucket`,`object storage`]),M(`storage`,`amazon-simple-storage-service-s3-on-outposts`,`Amazon Simple Storage Service S3 On Outposts`,[`s3`,`bucket`,`object storage`]),M(`storage`,`amazon-simple-storage-service-s3-one-zone-ia`,`Amazon Simple Storage Service S3 One Zone IA`,[`s3`,`bucket`,`object storage`]),M(`storage`,`amazon-simple-storage-service-s3-replication`,`Amazon Simple Storage Service S3 Replication`,[`s3`,`bucket`,`object storage`]),M(`storage`,`amazon-simple-storage-service-s3-replication-time-control`,`Amazon Simple Storage Service S3 Replication Time Control`,[`s3`,`bucket`,`object storage`]),M(`storage`,`amazon-simple-storage-service-s3-select`,`Amazon Simple Storage Service S3 Select`,[`s3`,`bucket`,`object storage`]),M(`storage`,`amazon-simple-storage-service-s3-standard`,`Amazon Simple Storage Service S3 Standard`,[`s3`,`bucket`,`object storage`]),M(`storage`,`amazon-simple-storage-service-s3-standard-ia`,`Amazon Simple Storage Service S3 Standard IA`,[`s3`,`bucket`,`object storage`]),M(`storage`,`amazon-simple-storage-service-s3-storage-lens`,`Amazon Simple Storage Service S3 Storage Lens`,[`s3`,`bucket`,`object storage`]),M(`storage`,`amazon-simple-storage-service-s3-tables`,`Amazon Simple Storage Service S3 Tables`,[`s3`,`bucket`,`object storage`]),M(`storage`,`amazon-simple-storage-service-s3-vectors`,`Amazon Simple Storage Service S3 Vectors`,[`s3`,`bucket`,`object storage`]),M(`storage`,`amazon-simple-storage-service-vpc-access-points`,`Amazon Simple Storage Service VPC Access Points`,[`s3`,`bucket`,`object storage`]),M(`storage`,`aws-backup-audit-manager`,`AWS Backup Audit Manager`,[`snapshot`,`restore`,`disaster recovery`]),M(`storage`,`aws-backup-aws-backup-for-aws-cloudformation`,`AWS Backup AWS Backup for AWS CloudFormation`,[`snapshot`,`restore`,`disaster recovery`]),M(`storage`,`aws-backup-aws-backup-support-for-amazon-fsx-for-netapp-ontap`,`AWS Backup AWS Backup support for Amazon FSx for NetApp ONTAP`,[`snapshot`,`restore`,`disaster recovery`]),M(`storage`,`aws-backup-aws-backup-support-for-amazon-s3`,`AWS Backup AWS Backup support for Amazon S3`,[`snapshot`,`restore`,`disaster recovery`]),M(`storage`,`aws-backup-aws-backup-support-for-vmware-workloads`,`AWS Backup AWS Backup Support for VMware Workloads`,[`snapshot`,`restore`,`disaster recovery`]),M(`storage`,`aws-backup-backup-plan`,`AWS Backup Backup Plan`,[`snapshot`,`restore`,`disaster recovery`]),M(`storage`,`aws-backup-backup-restore`,`AWS Backup Backup Restore`,[`snapshot`,`restore`,`disaster recovery`]),M(`storage`,`aws-backup-backup-vault`,`AWS Backup Backup Vault`,[`snapshot`,`restore`,`disaster recovery`]),M(`storage`,`aws-backup-compliance-reporting`,`AWS Backup Compliance Reporting`,[`snapshot`,`restore`,`disaster recovery`]),M(`storage`,`aws-backup-compute`,`AWS Backup Compute`,[`snapshot`,`restore`,`disaster recovery`]),M(`storage`,`aws-backup-database`,`AWS Backup Database`,[`snapshot`,`restore`,`disaster recovery`]),M(`storage`,`aws-backup-gateway`,`AWS Backup Gateway`,[`snapshot`,`restore`,`disaster recovery`]),M(`storage`,`aws-backup-legal-hold`,`AWS Backup Legal Hold`,[`snapshot`,`restore`,`disaster recovery`]),M(`storage`,`aws-backup-recovery-point-objective`,`AWS Backup Recovery Point Objective`,[`snapshot`,`restore`,`disaster recovery`]),M(`storage`,`aws-backup-recovery-time-objective`,`AWS Backup Recovery Time Objective`,[`snapshot`,`restore`,`disaster recovery`]),M(`storage`,`aws-backup-storage`,`AWS Backup Storage`,[`snapshot`,`restore`,`disaster recovery`]),M(`storage`,`aws-backup-vault-lock`,`AWS Backup Vault Lock`,[`snapshot`,`restore`,`disaster recovery`]),M(`storage`,`aws-backup-virtual-machine`,`AWS Backup Virtual Machine`,[`snapshot`,`restore`,`disaster recovery`]),M(`storage`,`aws-backup-virtual-machine-monitor`,`AWS Backup Virtual Machine Monitor`,[`snapshot`,`restore`,`disaster recovery`]),M(`storage`,`aws-snowball-snowball-import-export`,`AWS Snowball Snowball Import Export`),M(`storage`,`aws-storage-gateway-amazon-fsx-file-gateway`,`AWS Storage Gateway Amazon FSx File Gateway`,[`hybrid storage`,`nfs`,`smb`]),M(`storage`,`aws-storage-gateway-amazon-s3-file-gateway`,`AWS Storage Gateway Amazon S3 File Gateway`,[`hybrid storage`,`nfs`,`smb`]),M(`storage`,`aws-storage-gateway-cached-volume`,`AWS Storage Gateway Cached Volume`,[`hybrid storage`,`nfs`,`smb`]),M(`storage`,`aws-storage-gateway-file-gateway`,`AWS Storage Gateway File Gateway`,[`hybrid storage`,`nfs`,`smb`]),M(`storage`,`aws-storage-gateway-noncached-volume`,`AWS Storage Gateway Noncached Volume`,[`hybrid storage`,`nfs`,`smb`]),M(`storage`,`aws-storage-gateway-tape-gateway`,`AWS Storage Gateway Tape Gateway`,[`hybrid storage`,`nfs`,`smb`]),M(`storage`,`aws-storage-gateway-virtual-tape-library`,`AWS Storage Gateway Virtual Tape Library`,[`hybrid storage`,`nfs`,`smb`]),M(`storage`,`aws-storage-gateway-volume-gateway`,`AWS Storage Gateway Volume Gateway`,[`hybrid storage`,`nfs`,`smb`]),XS(`groups`,`auto-scaling-group`,`Auto Scaling group`,[`group`,`boundary`,`container`]),XS(`groups`,`aws-account`,`AWS Account`,[`group`,`boundary`,`container`]),XS(`groups`,`aws-cloud`,`AWS Cloud`,[`group`,`boundary`,`container`]),XS(`groups`,`aws-cloud-dark`,`AWS Cloud (dark)`,[`group`,`boundary`,`container`]),XS(`groups`,`aws-cloud-logo`,`AWS Cloud logo`,[`group`,`boundary`,`container`]),XS(`groups`,`aws-cloud-logo-dark`,`AWS Cloud logo (dark)`,[`group`,`boundary`,`container`]),XS(`groups`,`aws-iot-greengrass-deployment`,`AWS IoT Greengrass Deployment`,[`group`,`boundary`,`container`]),XS(`groups`,`corporate-data-center`,`Corporate data center`,[`group`,`boundary`,`container`]),XS(`groups`,`ec2-instance-contents`,`EC2 instance contents`,[`group`,`boundary`,`container`]),XS(`groups`,`private-subnet`,`Private subnet`,[`group`,`boundary`,`container`]),XS(`groups`,`public-subnet`,`Public subnet`,[`group`,`boundary`,`container`]),XS(`groups`,`region`,`Region`,[`group`,`boundary`,`container`]),XS(`groups`,`server-contents`,`Server contents`,[`group`,`boundary`,`container`]),XS(`groups`,`spot-fleet`,`Spot Fleet`,[`group`,`boundary`,`container`]),XS(`groups`,`virtual-private-cloud-vpc`,`Virtual private cloud VPC`,[`group`,`boundary`,`container`]),ZS(`categories`,`analytics`,`Analytics`,[`category`]),ZS(`categories`,`application-integration`,`Application Integration`,[`category`]),ZS(`categories`,`artificial-intelligence`,`Artificial Intelligence`,[`category`]),ZS(`categories`,`blockchain`,`Blockchain`,[`category`]),ZS(`categories`,`business-applications`,`Business Applications`,[`category`]),ZS(`categories`,`cloud-financial-management`,`Cloud Financial Management`,[`category`]),ZS(`categories`,`compute`,`Compute`,[`category`]),ZS(`categories`,`containers`,`Containers`,[`category`]),ZS(`categories`,`customer-enablement`,`Customer Enablement`,[`category`]),ZS(`categories`,`customer-experience`,`Customer Experience`,[`category`]),ZS(`categories`,`databases`,`Databases`,[`category`]),ZS(`categories`,`developer-tools`,`Developer Tools`,[`category`]),ZS(`categories`,`end-user-computing`,`End User Computing`,[`category`]),ZS(`categories`,`front-end-web-mobile`,`Front End Web Mobile`,[`category`]),ZS(`categories`,`games`,`Games`,[`category`]),ZS(`categories`,`internet-of-things`,`Internet of Things`,[`category`]),ZS(`categories`,`management-tools`,`Management Tools`,[`category`]),ZS(`categories`,`media-services`,`Media Services`,[`category`]),ZS(`categories`,`migration-modernization`,`Migration Modernization`,[`category`]),ZS(`categories`,`multicloud-and-hybrid`,`Multicloud and Hybrid`,[`category`]),ZS(`categories`,`networking-content-delivery`,`Networking Content Delivery`,[`category`]),ZS(`categories`,`quantum-technologies`,`Quantum Technologies`,[`category`]),ZS(`categories`,`satellite`,`Satellite`,[`category`]),ZS(`categories`,`security-identity`,`Security Identity`,[`category`]),ZS(`categories`,`serverless`,`Serverless`,[`category`]),ZS(`categories`,`storage`,`Storage`,[`category`])]},$S=(e,t,n,r,i,a=[])=>({id:`aws-ctr-${e}`,category:`aws-groups`,name:t,keywords:[`group`,`boundary`,`container`,...a],template:{type:n,color:r,...i===void 0?{}:{image:`/library/aws-groups/${i}.svg`}}}),Dse=[$S(`cloud`,`AWS Cloud container`,`aws-cloud`,`#242F3E`,`aws-cloud`),$S(`account`,`AWS Account container`,`aws-account`,`#E7157B`,`aws-account`),$S(`region`,`Region container`,`aws-region`,`#00A4A6`,`region`),$S(`az`,`Availability Zone container`,`aws-az`,`#00A4A6`,void 0,[`az`]),$S(`vpc`,`VPC container`,`aws-vpc`,`#8C4FFF`,`virtual-private-cloud-vpc`,[`virtual private cloud`]),$S(`subnet-public`,`Public Subnet container`,`aws-subnet-public`,`#7AA116`,`public-subnet`,[`subnet`]),$S(`subnet-private`,`Private Subnet container`,`aws-subnet-private`,`#00A4A6`,`private-subnet`,[`subnet`]),$S(`auto-scaling`,`Auto Scaling Group container`,`aws-auto-scaling-group`,`#ED7100`,`auto-scaling-group`,[`asg`]),$S(`generic`,`Generic Group container`,`aws-group`,`#7D8998`)],Ose=`/library/shapes/person.svg`,eC={person:`#08427b`,personExternal:`#686868`,system:`#1168bd`,systemExternal:`#999999`,container:`#438dd5`,containerExternal:`#b3b3b3`,component:`#85bbf0`,componentExternal:`#cccccc`,boundary:`#444444`,group:`#888888`,node:`#666666`},N=(e,t,n,r,i)=>({id:t,category:e,name:n,keywords:i,template:{type:t,color:r}}),tC=(e,t,n,r)=>({id:e,category:`c4`,name:t,keywords:r,template:{type:e,color:n,shape:Ose,width:90,height:110}}),nC={categories:[{id:`c4`,name:`Context`,group:`C4 model`,builtin:!0},{id:`c4-containers`,name:`Container`,group:`C4 model`,builtin:!0},{id:`c4-components`,name:`Component`,group:`C4 model`,builtin:!0},{id:`c4-deployment`,name:`Deployment`,group:`C4 model`,builtin:!0},{id:`c4-code`,name:`Code`,group:`C4 model`,builtin:!0}],entries:[tC(`c4-person`,`Person`,eC.person,[`actor`,`user`,`role`,`customer`]),tC(`c4-person-external`,`External Person`,eC.personExternal,[`actor`,`user`,`third party`,`outside`]),N(`c4`,`c4-system`,`Software System`,eC.system,[`system`,`app`,`product`]),N(`c4`,`c4-system-external`,`External Software System`,eC.systemExternal,[`system`,`third party`,`saas`,`outside`]),N(`c4`,`c4-enterprise-boundary`,`Enterprise Boundary`,eC.boundary,[`boundary`,`organisation`,`organization`,`landscape`]),N(`c4`,`c4-system-boundary`,`System Boundary`,eC.boundary,[`boundary`,`scope`,`context`]),N(`c4`,`c4-group`,`Group`,eC.group,[`boundary`,`grouping`,`domain`,`team`]),N(`c4-containers`,`c4-container`,`Container`,eC.container,[`service`,`app`,`process`,`deployable`]),N(`c4-containers`,`c4-container-external`,`External Container`,eC.containerExternal,[`service`,`third party`,`outside`]),N(`c4-containers`,`c4-container-web`,`Web Application`,eC.container,[`web`,`server`,`ssr`,`website`]),N(`c4-containers`,`c4-container-spa`,`Single-Page Application`,eC.container,[`spa`,`browser`,`frontend`,`react`]),N(`c4-containers`,`c4-container-mobile`,`Mobile App`,eC.container,[`ios`,`android`,`phone`,`client`]),N(`c4-containers`,`c4-container-desktop`,`Desktop App`,eC.container,[`client`,`native`,`electron`]),N(`c4-containers`,`c4-container-api`,`API Application`,eC.container,[`api`,`rest`,`graphql`,`backend`]),N(`c4-containers`,`c4-container-function`,`Serverless Function`,eC.container,[`lambda`,`faas`,`serverless`]),N(`c4-containers`,`c4-container-cli`,`Console / CLI`,eC.container,[`cli`,`terminal`,`job`,`script`]),N(`c4-containers`,`c4-container-db`,`Database`,eC.container,[`sql`,`postgres`,`store`,`rdbms`]),N(`c4-containers`,`c4-container-blob`,`Blob Store`,eC.container,[`object storage`,`files`,`s3`,`bucket`]),N(`c4-containers`,`c4-container-search`,`Search Index`,eC.container,[`elasticsearch`,`opensearch`,`lucene`]),N(`c4-containers`,`c4-container-queue`,`Message Bus`,eC.container,[`queue`,`topic`,`kafka`,`events`]),N(`c4-containers`,`c4-container-boundary`,`Container Boundary`,eC.boundary,[`boundary`,`scope`]),N(`c4-components`,`c4-component`,`Component`,eC.component,[`module`,`class`,`package`]),N(`c4-components`,`c4-component-external`,`External Component`,eC.componentExternal,[`module`,`library`,`third party`]),N(`c4-components`,`c4-component-db`,`Component Database`,eC.component,[`repository`,`dao`,`store`]),N(`c4-components`,`c4-component-queue`,`Component Queue`,eC.component,[`buffer`,`channel`,`events`]),N(`c4-deployment`,`c4-deployment-node`,`Deployment Node`,eC.node,[`environment`,`region`,`cluster`,`host`,`vm`]),N(`c4-deployment`,`c4-infrastructure-node`,`Infrastructure Node`,eC.container,[`load balancer`,`firewall`,`dns`,`router`]),N(`c4-deployment`,`c4-container-instance`,`Container Instance`,eC.container,[`replica`,`pod`,`deployed`,`runtime`]),N(`c4-code`,`c4-class`,`Class`,eC.component,[`type`,`object`,`uml`]),N(`c4-code`,`c4-interface`,`Interface`,eC.component,[`protocol`,`contract`,`uml`]),N(`c4-code`,`c4-enum`,`Enumeration`,eC.component,[`enum`,`constants`,`uml`])]},rC={categories:[{id:`data`,name:`Data`,builtin:!0}],entries:[{id:`data-table`,category:`data`,name:`Table`,keywords:[`db`,`sql`,`entity`,`erd`,`schema`,`postgres`],template:{type:`db-table`,columns:[{name:`id`,type:`int`,pk:!0}]}}]},iC=(e,t,n)=>({id:e,category:`second-order`,name:t,keywords:n,template:{type:e}}),aC={categories:[{id:`second-order`,name:`Second-order thinking`,builtin:!0}],entries:[iC(`so-decision`,`Decision`,[`decision`,`choice`,`option`,`second order`]),iC(`so-consequence-positive`,`Good consequence`,[`consequence`,`effect`,`good`,`positive`,`upside`]),iC(`so-consequence-negative`,`Bad consequence`,[`consequence`,`effect`,`bad`,`negative`,`downside`,`risk`]),iC(`so-consequence-neutral`,`Neutral consequence`,[`consequence`,`effect`,`neutral`,`and then what`])]},oC=(e,t,n)=>({id:e,category:`fishbone`,name:t,keywords:n,template:{type:e}}),sC={categories:[{id:`fishbone`,name:`Fishbone`,builtin:!0}],entries:[oC(`fb-effect`,`Effect`,[`effect`,`problem`,`head`,`fishbone`,`ishikawa`]),oC(`fb-category`,`Category`,[`category`,`bone`,`fishbone`,`ishikawa`]),oC(`fb-cause`,`Cause`,[`cause`,`sub-cause`,`root cause`,`fishbone`,`ishikawa`])]},cC=(e,t,n,r)=>({id:e,category:`plan`,name:n,keywords:r,template:{type:t}}),lC={categories:[{id:`plan`,name:`Plan`,builtin:!0}],entries:[cC(`plan-zone`,`plan-zone`,`Zone`,[`zone`,`phase`,`bar`,`gantt`,`schedule`,`plan`,`task`]),cC(`plan-event`,`plan-event`,`Event`,[`event`,`milestone`,`date`,`diamond`,`plan`]),cC(`plan-person`,`person`,`Person`,[`person`,`owner`,`executor`,`checker`,`role`,`plan`]),cC(`plan-team`,`team`,`Team`,[`team`,`group`,`owner`,`executor`,`checker`,`role`,`plan`])]},uC={width:320,height:220},dC=(e,t,n,r)=>({id:e,category:`deployment`,name:t,keywords:[...n,`deployment`,`infrastructure`],template:{type:e,...r??{}}}),fC={categories:[{id:`deployment`,name:`Deployment`,builtin:!0}],entries:[dC(`deploy-environment`,`Environment`,[`production`,`staging`,`stage`],uC),dC(`deploy-region`,`Region`,[`data centre`,`data center`,`location`,`cloud`],uC),dC(`deploy-zone`,`Availability zone`,[`az`,`zone`,`failure domain`,`rack`],uC),dC(`deploy-network`,`Network`,[`vpc`,`vnet`,`lan`,`cidr`],uC),dC(`deploy-subnet-public`,`Public subnet`,[`subnet`,`dmz`,`public`,`internet-facing`],uC),dC(`deploy-subnet-private`,`Private subnet`,[`subnet`,`private`,`internal`],uC),dC(`deploy-cluster`,`Cluster`,[`kubernetes`,`k8s`,`ecs`,`nomad`,`auto scaling group`],uC),dC(`deploy-host`,`Host`,[`server`,`vm`,`machine`,`instance`,`node`]),dC(`deploy-service`,`Service`,[`app`,`process`,`container`,`pod`,`workload`]),dC(`deploy-database`,`Database`,[`db`,`sql`,`postgres`,`mysql`,`rds`]),dC(`deploy-queue`,`Queue`,[`broker`,`kafka`,`sqs`,`rabbitmq`,`events`]),dC(`deploy-storage`,`Storage`,[`bucket`,`s3`,`blob`,`disk`,`volume`]),dC(`deploy-load-balancer`,`Load balancer`,[`lb`,`alb`,`nlb`,`proxy`,`ingress`]),dC(`deploy-gateway`,`Gateway`,[`api gateway`,`nat`,`vpn`,`egress`]),dC(`deploy-firewall`,`Firewall`,[`waf`,`security group`,`acl`]),dC(`deploy-internet`,`External network`,[`internet`,`public`,`users`,`wan`])]},pC=(e,t,n,r)=>({id:e,category:`threat-model`,name:t,keywords:n,template:{type:e,...r??{}}}),mC={categories:[{id:`threat-model`,name:`Threat model`,builtin:!0}],entries:[pC(`tm-entity`,`External entity`,[`entity`,`actor`,`user`,`external`,`dfd`,`stride`,`threat`]),pC(`tm-process`,`Process`,[`process`,`service`,`dfd`,`stride`,`threat`],{width:150,height:90}),pC(`tm-store`,`Data store`,[`store`,`database`,`file`,`dfd`,`stride`,`threat`],{width:150,height:56}),pC(`tm-boundary`,`Trust boundary`,[`boundary`,`trust`,`zone`,`dfd`,`stride`,`threat`],{width:320,height:220})]},hC=(e,t,n,r)=>({id:`basic-${e}`,category:`basics`,name:n,keywords:r,template:t===void 0?{}:{type:t}}),kse=[{id:`basics`,name:`Basics`,builtin:!0}],Ase=[hC(`box`,void 0,`Box`,[`plain`,`node`,`generic`,`empty`,`blank`]),hC(`service`,`service`,`Service`,[`component`,`microservice`,`app`,`application`]),hC(`system`,`system`,`System`,[`boundary`,`context`,`dashed`]),hC(`platform`,`platform`,`Platform`,[`boundary`,`group`,`dashed`]),hC(`database`,`database`,`Database`,[`db`,`sql`,`store`,`storage`,`cylinder`]),hC(`queue`,`queue`,`Queue`,[`message`,`topic`,`bus`,`broker`,`pill`]),hC(`infra`,`infra`,`Infrastructure`,[`server`,`host`,`hexagon`,`machine`]),hC(`comment`,`comment`,`Comment`,[`note`,`remark`,`aside`,`bubble`])],gC=(e,t,n)=>({id:`tech-${e}`,category:`tech`,name:t,keywords:n,template:{type:`image`,image:`/library/tech/${e}.svg`,width:64,height:64}}),jse=[{id:`tech`,name:`Tech`,builtin:!0}],_C=[gC(`temporal`,`Temporal`,[`workflow`,`durable execution`,`orchestration`,`saga`,`activity`]),gC(`nats`,`NATS`,[`messaging`,`pubsub`,`queue`,`jetstream`,`broker`,`events`]),gC(`starrocks`,`StarRocks`,[`olap`,`analytics`,`warehouse`,`database`,`sql`,`mpp`]),gC(`cloudflare`,`Cloudflare`,[`cdn`,`dns`,`ddos`,`proxy`,`waf`,`edge`]),gC(`github`,`GitHub`,[`git`,`repo`,`repository`,`source`,`vcs`]),gC(`github-actions`,`GitHub Actions`,[`ci`,`cd`,`pipeline`,`workflow`,`build`,`deploy`]),gC(`auth0`,`Auth0`,[`auth`,`authentication`,`identity`,`idp`,`oauth`,`sso`]),gC(`sendgrid`,`SendGrid`,[`email`,`mail`,`smtp`,`twilio`,`notifications`]),gC(`new-relic`,`New Relic`,[`monitoring`,`observability`,`apm`,`telemetry`,`alerting`]),gC(`clickhouse`,`ClickHouse`,[`olap`,`analytics`,`warehouse`,`database`,`columnar`,`sql`]),gC(`redis`,`Redis`,[`cache`,`kv`,`key-value`,`store`,`pubsub`,`memory`]),gC(`rabbitmq`,`RabbitMQ`,[`messaging`,`queue`,`amqp`,`broker`,`events`]),gC(`postgresql`,`PostgreSQL`,[`database`,`sql`,`relational`,`postgres`,`rdbms`]),gC(`helm`,`Helm`,[`kubernetes`,`chart`,`package`,`deploy`,`chartmuseum`]),gC(`jupyter`,`Jupyter`,[`notebook`,`python`,`data science`,`analysis`]),gC(`kubernetes`,`Kubernetes`,[`k8s`,`cluster`,`container`,`orchestration`])],vC=(e,t,n,r,i)=>({id:`shape-${e}`,category:`shapes`,name:t,keywords:i,template:{shape:`/library/shapes/${e}.svg`,width:n,height:r}}),Mse=[{id:`shapes`,name:`Shapes`,builtin:!0}],Nse=[vC(`person`,`Person`,52,62,[`user`,`actor`,`human`]),vC(`users`,`Users`,84,62,[`users`,`people`,`group`,`actors`,`clients`]),vC(`internet`,`Internet`,64,52,[`internet`,`cloud`,`www`,`network`,`external`])],yC=(e,t,n)=>({id:`k8s-${e}`,category:`k8s`,name:t,keywords:[`kubernetes`,`k8s`,...n],template:{type:`image`,image:`/library/k8s/${e}.svg`,width:64,height:64}}),bC=[{id:`k8s`,name:`Kubernetes`,builtin:!0}],Pse=[yC(`pod`,`Pod`,[`pod`,`container`,`workload`]),yC(`svc`,`Service`,[`service`,`svc`,`cluster ip`,`load balancer`]),yC(`deploy`,`Deployment`,[`deployment`,`deploy`,`replicaset`,`rollout`]),yC(`ing`,`Ingress`,[`ingress`,`ing`,`route`,`http`,`gateway`]),yC(`secret`,`Secret`,[`secret`,`credentials`,`config`]),yC(`node`,`Node`,[`node`,`worker`,`machine`,`node pool`])],xC={categories:[...kse,...nC.categories,...qS.categories,...aC.categories,...sC.categories,...mC.categories,...fC.categories,...lC.categories,...rC.categories,...Mse,...jse,...bC,...QS.categories],entries:[...Ase,...nC.entries,...qS.entries,...aC.entries,...sC.entries,...mC.entries,...fC.entries,...lC.entries,...rC.entries,...Nse,..._C,...Pse,...Dse,...QS.entries]},SC=Object.keys($r),Fse=[...aae],Ise=[...new Set(xC.entries.map(e=>e.template.shape).filter(e=>e!==void 0))],Lse=[{value:``,title:`Left (default)`,glyph:`⇤`},{value:`center`,title:`Center`,glyph:`≡`},{value:`right`,title:`Right`,glyph:`⇥`}],Rse=[{value:`sm`,title:`Small`,glyph:`S`},{value:``,title:`Normal (default)`,glyph:`M`},{value:`lg`,title:`Large`,glyph:`L`}],CC=(e,t)=>{e.key===`Enter`&&(e.preventDefault(),t())},zse=e=>{let t={};for(let n of e){let e=n.key.trim(),r=e===``?n.originalKey:e;r===void 0||r===``||(t[r]=n.value)}return t},Bse=(e,t)=>{let n=Object.keys(e);return n.length===Object.keys(t).length&&n.every(n=>n in t&&String(t[n])===e[n])};function wC({model:e,nodeId:t,activePlane:n,hasPin:r=!1,pinned:i,live:a,autoFocusName:o=!1,notation:s,today:c,onCommand:l,onClose:u,onDeleted:d}){let f=e.nodes.find(e=>e.id===t),p=t=>e.nodes.find(e=>e.id===t)?.name??t,m=t=>t===void 0?`default`:e.planes.find(e=>e.id===t)?.name??t,[h,g]=(0,v.useState)(f?.name??``),[_,y]=(0,v.useState)(f?.type??``),[b,x]=(0,v.useState)(f?.icon??``),[S,C]=(0,v.useState)(f?.shape??``),[w,T]=(0,v.useState)(f?.technology??``),[E,ee]=(0,v.useState)(f?.link??``),[te,ne]=(0,v.useState)(f?.description??``),re=(0,v.useRef)(0),ie=e=>Object.entries(e??{}).map(([e,t])=>({id:re.current++,key:e,value:String(t),originalKey:e})),[ae,se]=(0,v.useState)(()=>ie(f?.metadata)),[ce,le]=(0,v.useState)(``),[ue,de]=(0,v.useState)(``),[fe,pe]=(0,v.useState)(``),[me,he]=(0,v.useState)(``),[ge,_e]=(0,v.useState)(i===void 0?``:String(i.x)),[ve,ye]=(0,v.useState)(i===void 0?``:String(i.y));(0,v.useEffect)(()=>{_e(i===void 0?``:String(i.x)),ye(i===void 0?``:String(i.y))},[i?.x,i?.y]);let be=(0,v.useRef)(null);(0,v.useEffect)(()=>{o&&(be.current?.focus(),be.current?.select())},[]);let xe=f?.name,Se=f?.type,Ce=f?.icon,we=f?.shape,Te=f?.technology,Ee=f?.link,De=f?.description,Oe=f?.metadata;if((0,v.useEffect)(()=>{xe!==void 0&&g(xe)},[xe]),(0,v.useEffect)(()=>{y(Se??``)},[Se]),(0,v.useEffect)(()=>{x(Ce??``)},[Ce]),(0,v.useEffect)(()=>{C(we??``)},[we]),(0,v.useEffect)(()=>{T(Te??``)},[Te]),(0,v.useEffect)(()=>{ee(Ee??``)},[Ee]),(0,v.useEffect)(()=>{ne(De??``)},[De]),(0,v.useEffect)(()=>{se(ie(Oe))},[Oe]),f===void 0)return(0,D.jsx)(`aside`,{className:`sidebar muted`,children:`Node not found.`});let ke=e.containment.filter(e=>e.child===t),Ae=e.nodes.filter(e=>e.id!==t),je=e.containment.some(e=>e.parent===t),Me=()=>{let e=h.trim();if(e===``){g(f.name);return}e!==f.name&&l({type:`rename-node`,id:t,name:e})},Ne=()=>{let r=_.trim();if(r===(f.type??``))return;let i={type:`set-node-details`,id:t,details:{type:r===``?null:r}},a=c===void 0?void 0:lse(e,n,t,r,c);l(a===void 0?i:{type:`batch`,commands:[i,a]})},Pe=()=>{b!==(f.icon??``)&&l({type:`set-node-details`,id:t,details:{icon:b===``?null:b}})},Fe=()=>{let e=S.trim();if(e!==(f.shape??``)){if(e!==``&&!Rn.test(e)&&!zn.test(e)){C(f.shape??``);return}l({type:`set-node-details`,id:t,details:{shape:e===``?null:e}})}},Ie=()=>{w!==(f.technology??``)&&l({type:`set-node-details`,id:t,details:{technology:w===``?null:w}})},Le=()=>{E!==(f.link??``)&&l({type:`set-node-details`,id:t,details:{link:E.trim()===``?null:E.trim()}})},Re=()=>{te!==(f.description??``)&&l({type:`set-node-details`,id:t,details:{description:te===``?null:te}})},ze=e=>{let n=zse(e);Bse(n,f.metadata??{})||l({type:`set-node-details`,id:t,details:{metadata:Object.keys(n).length>0?n:null}})},Be=(e,t)=>se(n=>n.map(n=>n.id===e?{...n,...t}:n)),Ve=e=>{let t=ae.filter(t=>t.id!==e);se(t),ze(t)},He=()=>{if(ce.trim()===``)return;let e=[...ae,{id:re.current++,key:ce.trim(),value:ue}];se(e),le(``),de(``),ze(e)},Ue=(e,n)=>l({type:`remove-containment`,parent:e,child:t,...n===void 0?{}:{plane:n}}),We=()=>{fe!==``&&(l({type:`add-containment`,parent:fe,child:t,...me===``?{}:{plane:me}}),pe(``),he(``))},Ge=()=>{l({type:`delete-node`,id:t,...oe.includes(f.type??``)?{cascade:!0}:{}}),d()},Ke=()=>{l({type:`delete-node`,id:t}),d()},qe=()=>l({type:`clear-position`,nodeId:t,...n===void 0?{}:{plane:n}}),Je=()=>{if(ge.trim()===``||ve.trim()===``)return;let e=Number(ge),r=Number(ve);!Number.isFinite(e)||!Number.isFinite(r)||i!==void 0&&i.x===e&&i.y===r||l({type:`set-position`,nodeId:t,x:e,y:r,...n===void 0?{}:{plane:n}})};return(0,D.jsxs)(`aside`,{className:`sidebar node-panel`,children:[(0,D.jsxs)(`div`,{className:`panel-head`,children:[(0,D.jsx)(`h2`,{children:`Edit node`}),(0,D.jsx)(`button`,{className:`chip icon-btn`,"aria-label":`Close panel`,title:`Close`,onClick:u,children:`✕`})]}),(0,D.jsxs)(`p`,{className:`muted`,children:[(0,D.jsx)(`code`,{children:f.id}),` · plane `,(0,D.jsx)(`code`,{children:m(n)})]}),(0,D.jsxs)(`label`,{className:`field`,children:[(0,D.jsx)(`span`,{children:`Name`}),(0,D.jsx)(`textarea`,{ref:be,className:`name-input`,"aria-label":`Name`,rows:Math.max(1,h.split(`
45
45
  `).length),value:h,onChange:e=>g(e.target.value),onBlur:Me})]}),(0,D.jsxs)(`label`,{className:`field`,children:[(0,D.jsx)(`span`,{children:`Type`}),(0,D.jsx)(`input`,{"aria-label":`Type`,list:`node-type-suggestions`,value:_,onChange:e=>y(e.target.value),onBlur:Ne,onKeyDown:e=>CC(e,Ne)}),(0,D.jsx)(`datalist`,{id:`node-type-suggestions`,children:SC.map(e=>(0,D.jsx)(`option`,{value:e},e))})]}),e.layers.length>0&&(0,D.jsxs)(`label`,{className:`field`,children:[(0,D.jsx)(`span`,{children:`Layer`}),(0,D.jsxs)(`select`,{"aria-label":`Layer`,value:f.layer??``,onChange:e=>l({type:`set-node-details`,id:t,details:{layer:e.target.value===``?null:e.target.value}}),children:[(0,D.jsx)(`option`,{value:``,children:`base sheet`}),e.layers.map(e=>(0,D.jsx)(`option`,{value:e.id,children:e.name},e.id))]})]}),n!==void 0&&e.planes.find(e=>e.id===n)?.containmentOf===void 0&&(0,D.jsxs)(D.Fragment,{children:[(0,D.jsxs)(`label`,{className:`field`,children:[(0,D.jsx)(`span`,{children:`Scope`}),(0,D.jsxs)(`select`,{"aria-label":`Scope`,value:f.plane===n?`local`:`shared`,onChange:e=>l({type:`set-node-details`,id:t,details:{plane:e.target.value===`local`?n:null}}),children:[(0,D.jsx)(`option`,{value:`shared`,children:`Shared (all planes)`}),(0,D.jsx)(`option`,{value:`local`,children:`This plane only`})]})]}),f.plane===void 0&&(0,D.jsxs)(`label`,{className:`field`,children:[(0,D.jsx)(`span`,{children:`Hidden here`}),(0,D.jsx)(`input`,{type:`checkbox`,"aria-label":`Hidden here`,checked:(e.planes.find(e=>e.id===n)?.hides??[]).includes(t),onChange:e=>l({type:`set-node-plane-hidden`,nodeId:t,plane:n,hidden:e.target.checked})})]})]}),(0,D.jsx)(yS,{value:f.color??``,onChange:e=>l({type:`set-node-details`,id:t,details:{color:e===``?null:e}})}),(0,D.jsx)(yS,{label:`Text color`,value:f.textColor??``,onChange:e=>l({type:`set-node-details`,id:t,details:{textColor:e===``?null:e}})}),(0,D.jsx)(vS,{label:`Align`,value:f.textAlign??``,options:Lse,onChange:e=>l({type:`set-node-details`,id:t,details:{textAlign:e===``?null:e}})}),(0,D.jsx)(vS,{label:`Size`,value:f.fontScale??``,options:Rse,onChange:e=>l({type:`set-node-details`,id:t,details:{fontScale:e===``?null:e}})}),(0,D.jsxs)(`label`,{className:`field`,children:[(0,D.jsx)(`span`,{children:`Icon`}),(0,D.jsx)(`input`,{"aria-label":`Icon`,list:`node-icon-suggestions`,value:b,onChange:e=>x(e.target.value),onBlur:Pe,onKeyDown:e=>CC(e,Pe)}),(0,D.jsx)(`datalist`,{id:`node-icon-suggestions`,children:Fse.map(e=>(0,D.jsx)(`option`,{value:e},e))})]}),(0,D.jsxs)(`label`,{className:`field`,children:[(0,D.jsx)(`span`,{children:`Shape`}),(0,D.jsx)(`input`,{"aria-label":`Shape`,list:`node-shape-suggestions`,value:S,onChange:e=>C(e.target.value),onBlur:Fe,onKeyDown:e=>CC(e,Fe)}),(0,D.jsx)(`datalist`,{id:`node-shape-suggestions`,children:Ise.map(e=>(0,D.jsx)(`option`,{value:e},e))})]}),(0,D.jsxs)(`label`,{className:`field`,children:[(0,D.jsx)(`span`,{children:`Technology`}),(0,D.jsx)(`input`,{"aria-label":`Technology`,value:w,onChange:e=>T(e.target.value),onBlur:Ie,onKeyDown:e=>CC(e,Ie)})]}),(0,D.jsxs)(`label`,{className:`field`,children:[(0,D.jsx)(`span`,{children:`Link`}),(0,D.jsx)(`input`,{"aria-label":`Link`,placeholder:`https://… or [[Note]]`,value:E,onChange:e=>ee(e.target.value),onBlur:Le,onKeyDown:e=>CC(e,Le)})]}),(0,D.jsxs)(`label`,{className:`field`,children:[(0,D.jsx)(`span`,{children:`Description`}),(0,D.jsx)(`textarea`,{"aria-label":`Description`,rows:3,value:te,onChange:e=>ne(e.target.value),onBlur:Re})]}),(0,D.jsx)(PS,{nodeId:f.id,links:f.links??[],onCommand:l}),(0,D.jsxs)(`section`,{className:`panel-section`,children:[(0,D.jsx)(`h3`,{children:`Position`}),(0,D.jsxs)(`div`,{className:`member-row`,children:[(0,D.jsxs)(`label`,{className:`field`,children:[(0,D.jsx)(`span`,{children:`X`}),(0,D.jsx)(`input`,{type:`number`,"aria-label":`X`,step:`any`,value:ge,placeholder:a===void 0?`auto`:String(Math.round(a.x)),onChange:e=>_e(e.target.value),onBlur:Je,onKeyDown:e=>CC(e,Je)})]}),(0,D.jsxs)(`label`,{className:`field`,children:[(0,D.jsx)(`span`,{children:`Y`}),(0,D.jsx)(`input`,{type:`number`,"aria-label":`Y`,step:`any`,value:ve,placeholder:a===void 0?`auto`:String(Math.round(a.y)),onChange:e=>ye(e.target.value),onBlur:Je,onKeyDown:e=>CC(e,Je)})]}),r&&(0,D.jsx)(`button`,{className:`chip`,onClick:qe,children:`Clear pinned position`})]}),(0,D.jsx)(`p`,{className:`muted`,children:`Parent-relative px. Empty = placed by the layout algorithm.`})]}),(0,D.jsxs)(`section`,{className:`panel-section`,children:[(0,D.jsx)(`h3`,{children:`Metadata`}),ae.map((e,t)=>(0,D.jsxs)(`div`,{className:`kv-row`,children:[(0,D.jsx)(`input`,{"aria-label":`Metadata key ${t+1}`,className:`kv-key`,value:e.key,onChange:t=>Be(e.id,{key:t.target.value}),onBlur:()=>ze(ae),onKeyDown:e=>CC(e,()=>ze(ae))}),(0,D.jsx)(`input`,{"aria-label":`Metadata value ${t+1}`,className:`kv-value`,value:e.value,onChange:t=>Be(e.id,{value:t.target.value}),onBlur:()=>ze(ae),onKeyDown:e=>CC(e,()=>ze(ae))}),(0,D.jsx)(`button`,{className:`chip icon-btn`,"aria-label":`Remove metadata ${e.key}`,onClick:()=>Ve(e.id),children:`✕`})]},e.id)),(0,D.jsxs)(`div`,{className:`kv-row`,children:[(0,D.jsx)(`input`,{"aria-label":`New metadata key`,className:`kv-key`,placeholder:`key`,value:ce,onChange:e=>le(e.target.value),onKeyDown:e=>CC(e,He)}),(0,D.jsx)(`input`,{"aria-label":`New metadata value`,className:`kv-value`,placeholder:`value`,value:ue,onChange:e=>de(e.target.value),onKeyDown:e=>CC(e,He)}),(0,D.jsx)(`button`,{className:`chip`,onClick:He,children:`Add metadata`})]})]}),(s===`threat-model`||(f.threats?.length??0)>0)&&(0,D.jsx)(GS,{target:{node:f.id},threats:f.threats??[],applicable:cn(f.type),onCommand:l}),(0,D.jsx)(Ese,{target:{node:f.id},comments:f.comments??[],onCommand:l}),(s===`plan`||f.metadata?.start!==void 0||f.metadata?.end!==void 0||f.metadata?.at!==void 0)&&Cn.has(f.type??``)&&(0,D.jsx)(BS,{model:e,node:f,onCommand:l}),(0,D.jsxs)(`section`,{className:`panel-section`,children:[(0,D.jsx)(`h3`,{children:`Memberships`}),ke.length===0&&(0,D.jsx)(`p`,{className:`muted`,children:`No containers.`}),ke.map(e=>(0,D.jsxs)(`div`,{className:`member-row`,children:[(0,D.jsxs)(`span`,{children:[p(e.parent),` `,(0,D.jsxs)(`span`,{className:`muted`,children:[`(`,m(e.plane),`)`]})]}),(0,D.jsx)(`button`,{className:`chip icon-btn`,"aria-label":`Remove from ${p(e.parent)}`,onClick:()=>Ue(e.parent,e.plane),children:`✕`})]},`${e.parent}:${e.plane??``}`)),(0,D.jsxs)(`div`,{className:`member-row add-member`,children:[(0,D.jsxs)(`select`,{"aria-label":`Add parent`,value:fe,onChange:e=>pe(e.target.value),children:[(0,D.jsx)(`option`,{value:``,children:`Choose parent…`}),Ae.map(e=>(0,D.jsx)(`option`,{value:e.id,children:e.name},e.id))]}),(0,D.jsxs)(`select`,{"aria-label":`Add plane`,value:me,onChange:e=>he(e.target.value),children:[(0,D.jsx)(`option`,{value:``,children:`default`}),e.planes.map(e=>(0,D.jsx)(`option`,{value:e.id,children:e.name},e.id))]}),(0,D.jsx)(`button`,{className:`chip`,onClick:We,disabled:fe===``,children:`Add`})]})]}),(0,D.jsxs)(`section`,{className:`panel-section`,children:[je&&(0,D.jsx)(`button`,{className:`chip`,onClick:Ke,children:`Ungroup`}),(0,D.jsx)(`button`,{className:`chip danger`,onClick:Ge,children:`Delete node`})]})]})}var TC=e=>{let t=1;for(;e.some(e=>e.id===`l${t}`);)t++;return`l${t}`},EC=[{value:`top`,title:`top`,glyph:`↑`},{value:`center`,title:`center`,glyph:`⊙`},{value:`bottom`,title:`bottom`,glyph:`↓`}],DC=[`sync`,`async`,`reads`,`writes`,`hosted-on`,`flow`],P=[{value:``,title:`auto (facing side)`,glyph:`⊙`},{value:`top`,title:`top`,glyph:`↑`},{value:`right`,title:`right`,glyph:`→`},{value:`bottom`,title:`bottom`,glyph:`↓`},{value:`left`,title:`left`,glyph:`←`}],OC=(e,t)=>{e.key===`Enter`&&(e.preventDefault(),t())};function kC({relationId:e,labels:t,label:n,index:r,onCommand:i}){let[a,o]=(0,v.useState)(n.text);(0,v.useEffect)(()=>o(n.text),[n.text]);let s=t=>i({type:`update-relation`,id:e,patch:{labels:t.length>0?t:null}}),c=()=>{a!==n.text&&s(a.trim()===``?t.filter(e=>e.id!==n.id):t.map(e=>e.id===n.id?{...e,text:a}:e))},l=e=>s(t.map(t=>t.id===n.id?{...t,side:e}:t)),u=()=>s(t.filter(e=>e.id!==n.id)),d=r+1;return(0,D.jsxs)(`div`,{className:`edge-label-row`,children:[(0,D.jsx)(`input`,{"aria-label":`Label ${d} text`,value:a,onChange:e=>o(e.target.value),onBlur:c,onKeyDown:e=>OC(e,c)}),(0,D.jsx)(vS,{label:`Label ${d} side`,value:n.side??`center`,options:EC,onChange:e=>{e!==``&&l(e)}}),(0,D.jsx)(`button`,{type:`button`,className:`chip icon-btn`,"aria-label":`Remove label ${d}`,title:`Remove label`,onClick:u,children:`✕`})]})}function Vse({model:e,relationId:t,onCommand:n,onBack:r,onClose:i,notation:a,activePlane:o}){let s=e.relations.find(e=>e.id===t),c=t=>e.nodes.find(e=>e.id===t)?.name??t,l=a===`causal-loop`,u=(0,v.useMemo)(()=>dn(e,o),[e,o]),[d,f]=(0,v.useState)(s?.kind??``),[p,m]=(0,v.useState)(s?.layer??``),[h,g]=(0,v.useState)(s?.description??``),[_,y]=(0,v.useState)(null),b=s?.kind,x=s?.layer,S=s?.description;if((0,v.useEffect)(()=>{b!==void 0&&f(b)},[b]),(0,v.useEffect)(()=>{m(x??``)},[x]),(0,v.useEffect)(()=>{g(S??``)},[S]),s===void 0)return(0,D.jsx)(`p`,{className:`muted`,children:`Relation not found.`});let C=dt(s),w=()=>{let e=(_??``).trim();e!==``&&n({type:`update-relation`,id:t,patch:{labels:[...C,{id:TC(C),text:e,t:.5,side:`center`}]}}),y(null)},T=()=>{let e=d.trim();if(e===``){f(s.kind);return}e!==s.kind&&n({type:`update-relation`,id:t,patch:{kind:e}})},E=e=>{m(e),e!==(s.layer??``)&&n({type:`update-relation`,id:t,patch:{layer:e===``?null:e}})},ee=e=>n({type:`update-relation`,id:t,patch:{polarity:e===``?null:e}}),te=e=>n({type:`update-relation`,id:t,patch:{delay:e!==``||null}}),ne=()=>{h!==(s.description??``)&&n({type:`update-relation`,id:t,patch:{description:h===``?null:h}})},re=async()=>{await Wb().confirmDialog(`Delete relation '${c(s.from)} → ${c(s.to)}'?`)&&(n({type:`delete-relation`,id:t}),(r??i)())},ie=u.get(t),ae=ie===void 0?void 0:{...ie.from===void 0?{}:{fromName:c(ie.from)},...ie.to===void 0?{}:{toName:c(ie.to)}},oe=s.style??{},se=e=>{let r={...oe};for(let[t,n]of Object.entries(e))n===void 0?delete r[t]:r[t]=n;n({type:`update-relation`,id:t,patch:{style:Object.keys(r).length>0?r:null}})};return(0,D.jsxs)(D.Fragment,{children:[r!==void 0&&(0,D.jsx)(`button`,{className:`link-btn`,onClick:r,children:`← All relations`}),(0,D.jsxs)(`p`,{className:`muted`,children:[(0,D.jsx)(`code`,{children:c(s.from)}),` → `,(0,D.jsx)(`code`,{children:c(s.to)})]}),(0,D.jsxs)(`label`,{className:`field`,children:[(0,D.jsx)(`span`,{children:`Kind`}),(0,D.jsx)(`input`,{"aria-label":`Kind`,list:`relation-kind-suggestions`,value:d,onChange:e=>f(e.target.value),onBlur:T,onKeyDown:e=>OC(e,T)}),(0,D.jsx)(`datalist`,{id:`relation-kind-suggestions`,children:DC.map(e=>(0,D.jsx)(`option`,{value:e},e))})]}),(0,D.jsxs)(`section`,{className:`panel-section edge-labels`,children:[(0,D.jsx)(`h3`,{children:`Labels`}),C.map((e,r)=>(0,D.jsx)(kC,{relationId:t,labels:C,label:e,index:r,onCommand:n},e.id)),_!==null&&(0,D.jsx)(`div`,{className:`edge-label-row`,children:(0,D.jsx)(`input`,{"aria-label":`New label text`,value:_,onChange:e=>y(e.target.value),onBlur:w,onKeyDown:e=>OC(e,w)})}),(0,D.jsx)(`button`,{type:`button`,className:`chip`,onClick:()=>y(``),children:`Add label`})]}),(a===`threat-model`||(s.threats?.length??0)>0)&&(0,D.jsx)(GS,{target:{relation:t},threats:s.threats??[],applicable:cn(s.kind),...ae===void 0?{}:{crossing:ae},onCommand:n}),(0,D.jsx)(Ese,{target:{relation:t},comments:s.comments??[],onCommand:n}),(0,D.jsxs)(`label`,{className:`field`,children:[(0,D.jsx)(`span`,{children:`Layer`}),(0,D.jsxs)(`select`,{"aria-label":`Layer`,value:p,onChange:e=>E(e.target.value),children:[(0,D.jsx)(`option`,{value:``,children:`none`}),e.layers.map(e=>(0,D.jsx)(`option`,{value:e.id,children:e.name},e.id))]})]}),l&&(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(vS,{label:`Polarity`,value:s.polarity??``,options:[{value:``,title:`∅`,glyph:`∅`},{value:`+`,title:`+`,glyph:`+`},{value:`-`,title:`−`,glyph:`−`}],onChange:ee}),(0,D.jsx)(vS,{label:`Delay`,value:s.delay===!0?`on`:``,options:[{value:``,title:`·`,glyph:`·`},{value:`on`,title:`‖`,glyph:`‖`}],onChange:te})]}),(0,D.jsxs)(`section`,{className:`panel-section`,children:[(0,D.jsx)(`h3`,{children:`Style`}),(0,D.jsx)(vS,{label:`Shape`,value:oe.shape??``,options:[{value:``,title:`curved (default)`,glyph:`⌒`},{value:`straight`,title:`straight`,glyph:`╱`},{value:`step`,title:`step`,glyph:`𝖫`}],onChange:e=>se({shape:e===``?void 0:e})}),l&&(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(vS,{label:`Curvature`,value:oe.curvature===void 0?``:String(oe.curvature),options:[{value:``,title:`default`,glyph:`⌒`},{value:`0.4`,title:`0.4`,glyph:`0.4`},{value:`0.8`,title:`0.8`,glyph:`0.8`}],onChange:e=>se({curvature:e===``?void 0:Number(e)})}),(0,D.jsxs)(`div`,{className:`field`,children:[(0,D.jsx)(`span`,{children:`Curve`}),(0,D.jsx)(`button`,{type:`button`,className:`chip${oe.bow===`right`?` active`:``}`,"aria-pressed":oe.bow===`right`,title:`Flip which side the arc bulges (arrow direction unchanged)`,onClick:()=>se({bow:oe.bow===`right`?void 0:`right`}),children:`Flip curve`})]})]}),(0,D.jsx)(yS,{value:oe.color??``,onChange:e=>se({color:e===``?void 0:e})}),(0,D.jsx)(vS,{label:`Thickness`,value:oe.width===void 0?``:String(oe.width),options:[{value:``,title:`default`,glyph:(0,D.jsx)(`span`,{className:`w-line`,style:{height:1.5}})},{value:`1`,title:`thin`,glyph:(0,D.jsx)(`span`,{className:`w-line`,style:{height:1}})},{value:`2.5`,title:`bold`,glyph:(0,D.jsx)(`span`,{className:`w-line`,style:{height:3}})},{value:`4`,title:`heavy`,glyph:(0,D.jsx)(`span`,{className:`w-line`,style:{height:5}})}],onChange:e=>se({width:e===``?void 0:Number(e)})}),(0,D.jsx)(vS,{label:`Line`,value:oe.line??``,options:[{value:``,title:`default`,glyph:`—`},{value:`solid`,title:`solid`,glyph:`━`},{value:`dashed`,title:`dashed`,glyph:`╌`},{value:`dotted`,title:`dotted`,glyph:`⋯`}],onChange:e=>se({line:e===``?void 0:e})}),(0,D.jsx)(vS,{label:`Arrow end`,value:oe.end??``,options:[{value:``,title:`arrow (default)`,glyph:`➤`},{value:`dot`,title:`dot`,glyph:`●`},{value:`square`,title:`square`,glyph:`■`},{value:`diamond`,title:`diamond`,glyph:`◆`},{value:`none`,title:`none`,glyph:`∅`}],onChange:e=>se({end:e===``?void 0:e})}),(0,D.jsx)(vS,{label:`From side`,value:oe.fromSide??``,options:P,onChange:e=>se({fromSide:e===``?void 0:e})}),(0,D.jsx)(vS,{label:`To side`,value:oe.toSide??``,options:P,onChange:e=>se({toSide:e===``?void 0:e})}),(0,D.jsx)(vS,{label:`Animated`,value:oe.animated===void 0?``:oe.animated?`on`:`off`,options:[{value:``,title:`default`,glyph:`·`},{value:`on`,title:`on`,glyph:`▶`},{value:`off`,title:`off`,glyph:`■`}],onChange:e=>se({animated:e===``?void 0:e===`on`})})]}),(0,D.jsxs)(`label`,{className:`field`,children:[(0,D.jsx)(`span`,{children:`Description`}),(0,D.jsx)(`textarea`,{"aria-label":`Description`,rows:3,value:h,onChange:e=>g(e.target.value),onBlur:ne})]}),(0,D.jsx)(`section`,{className:`panel-section`,children:(0,D.jsx)(`button`,{className:`chip danger`,onClick:()=>void re(),children:`Delete relation`})})]})}function AC({model:e,constituentIds:t,onCommand:n,onClose:r,notation:i,activePlane:a}){let o=t=>e.nodes.find(e=>e.id===t)?.name??t,s=e.relations.filter(e=>t.includes(e.id)),c=t.length===1,[l,u]=(0,v.useState)(null),d=c?t[0]??null:l;return(0,D.jsxs)(`aside`,{className:`sidebar edge-panel`,children:[(0,D.jsxs)(`div`,{className:`panel-head`,children:[(0,D.jsx)(`h2`,{children:`Edit edge`}),(0,D.jsx)(`button`,{className:`chip icon-btn`,"aria-label":`Close panel`,title:`Close`,onClick:r,children:`✕`})]}),d===null?s.length===0?(0,D.jsx)(`p`,{className:`muted`,children:`No relations.`}):(0,D.jsx)(`div`,{className:`edge-list`,children:s.map(e=>(0,D.jsxs)(`button`,{className:`edge-row`,"aria-label":`Edit relation ${e.id}`,onClick:()=>u(e.id),children:[(0,D.jsx)(`b`,{children:e.kind}),e.label===void 0?``:` — ${e.label}`,(0,D.jsxs)(`span`,{className:`muted`,children:[` `,o(e.from),` → `,o(e.to)]})]},e.id))}):(0,D.jsx)(Vse,{model:e,relationId:d,onCommand:n,onClose:r,...i===void 0?{}:{notation:i},...a===void 0?{}:{activePlane:a},...c?{}:{onBack:()=>u(null)}},d)]})}function jC({planes:e,activePlane:t,onSelect:n}){return e.length===0?null:(0,D.jsxs)(`div`,{className:`lp-planes`,role:`group`,"aria-label":`Active plane`,children:[(0,D.jsx)(`button`,{type:`button`,className:`chip plane${t===void 0?` active`:``}`,onClick:()=>n(void 0),title:`Base view — no plane overlay`,children:`Default`}),e.map(e=>(0,D.jsx)(`button`,{type:`button`,className:`chip plane${t===e.id?` active`:``}`,onClick:()=>n(e.id),children:e.name},e.id))]})}var Hse={"second-order":`Second-order thinking`,fishbone:`Fishbone (cause and effect)`,[Kt]:`Threat model (STRIDE)`,[vn]:`Plan (schedule)`},Use=e=>Hse[e]??e.charAt(0).toUpperCase()+e.slice(1).replace(/-/g,` `),MC=(e,t)=>{e.key===`Enter`&&(e.preventDefault(),t())},Wse=(e,t)=>e.toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``)||t,NC=(e,t,n)=>{let r=Wse(e,n);if(!t.has(r))return r;for(let e=2;;e++)if(!t.has(`${r}-${e}`))return`${r}-${e}`},PC=(e,t)=>e.length===t.length&&[...e].sort().join(`\0`)===[...t].sort().join(`\0`),FC=e=>e.map(e=>({id:e.id,name:e.name,tint:e.tint??``})),IC=e=>e.map(e=>({id:e.id,name:e.name,containmentOf:e.containmentOf??``,baseRelations:e.baseRelations!==!1,layers:e.layers??[],notation:e.notation??``}));function LC({model:e,onCommand:t,mode:n=`edit`,activeLayer:r=null,onActivateLayer:i,activePlane:a,onSelectPlane:o,activeLayers:s=[],onToggleLayer:c,onMergeLayers:l}){let[u,d]=(0,v.useState)(()=>FC(e.layers)),[f,p]=(0,v.useState)(()=>IC(e.planes)),[m,h]=(0,v.useState)(``),[g,_]=(0,v.useState)(``),[y,b]=(0,v.useState)([]),[x,S]=(0,v.useState)(!1),C=new Set(e.layers.map(e=>e.id)),w=y.filter(e=>C.has(e)),T=new Set(w),E=e.layers.filter(e=>!T.has(e.id)),ee=w.length>=1,te=(e,t)=>{(e.ctrlKey||e.metaKey)&&(e.preventDefault(),b(e=>e.includes(t)?e.filter(e=>e!==t):[...e,t]))},ne=async t=>{let n=w.map(t=>`'${e.layers.find(e=>e.id===t)?.name??t}'`).join(`, `),r=t===void 0?`base sheet`:`'${t.name}'`;await Wb().confirmDialog(`Merge ${n} into ${r}?`)&&(l?.(w,t?.id),b([]),S(!1))};(0,v.useEffect)(()=>{d(FC(e.layers))},[e.layers]),(0,v.useEffect)(()=>{p(IC(e.planes))},[e.planes]);let re=(e,t)=>d(n=>n.map(n=>n.id===e?{...n,...t}:n)),ie=(e,t)=>p(n=>n.map(n=>n.id===e?{...n,...t}:n)),ae=n=>{let r=e.layers.find(e=>e.id===n.id);if(r===void 0)return;let i=n.name.trim();if(i===``){re(n.id,{name:r.name});return}let a={id:n.id,name:i,...n.tint===``?{}:{tint:n.tint}};a.name===r.name&&a.tint===r.tint||t({type:`upsert-layer`,layer:a})},oe=e=>({id:e.id,name:e.name.trim(),...e.containmentOf===``?{}:{containmentOf:e.containmentOf},...e.layers.length>0?{layers:e.layers}:{},...e.baseRelations?{}:{baseRelations:!1},...e.notation===``?{}:{notation:e.notation}}),se=(e,t)=>e.name===t.name&&(e.containmentOf??``)===(t.containmentOf??``)&&e.baseRelations!==!1==(t.baseRelations!==!1)&&PC(e.layers??[],t.layers??[])&&(e.notation??``)===(t.notation??``),ce=n=>{let r=e.planes.find(e=>e.id===n.id);if(r===void 0)return;if(n.name.trim()===``){ie(n.id,{name:r.name});return}let i=oe(n);se(i,r)||t({type:`upsert-plane`,plane:i})},le=()=>{let n=m.trim();n!==``&&(t({type:`upsert-layer`,layer:{id:NC(n,new Set(e.layers.map(e=>e.id)),`layer`),name:n}}),h(``))},ue=()=>{let n=g.trim();n!==``&&(t({type:`upsert-plane`,plane:{id:NC(n,new Set(e.planes.map(e=>e.id)),`plane`),name:n}}),_(``))},de=async(e,n)=>{await Wb().confirmDialog(`Delete layer '${n}' and everything on it?`)&&t({type:`delete-layer`,id:e})},fe=async(e,n)=>{await Wb().confirmDialog(`Delete plane '${n}'?`)&&t({type:`delete-plane`,id:e})},me=(e,t,n)=>{let r=n?[...e.layers,t]:e.layers.filter(e=>e!==t),i={...e,layers:r};ie(e.id,{layers:r}),ce(i)};return(0,D.jsxs)(wS,{id:`layers-planes`,title:`Layers & planes`,className:`sidebar lp-panel`,children:[o!==void 0&&(0,D.jsx)(jC,{planes:e.planes,activePlane:a,onSelect:o}),n===`edit`&&(0,D.jsxs)(`div`,{className:`panel-section`,children:[(0,D.jsxs)(`label`,{className:`field`,children:[(0,D.jsx)(`span`,{children:`Notation`}),(0,D.jsxs)(`select`,{"aria-label":`Notation`,value:e.notation??``,onChange:e=>t({type:`set-diagram-notation`,notation:e.target.value===``?null:e.target.value}),children:[(0,D.jsx)(`option`,{value:``,children:`default look`}),pe.map(e=>(0,D.jsx)(`option`,{value:e,children:Use(e)},e))]})]}),(0,D.jsxs)(`label`,{className:`lp-check`,children:[(0,D.jsx)(`input`,{type:`checkbox`,checked:e.legend!==void 0,onChange:e=>t({type:`set-diagram-legend`,legend:e.target.checked?{}:null})}),`Legend`]})]}),(0,D.jsxs)(`section`,{className:`panel-section`,children:[(0,D.jsx)(`h3`,{children:`Layers`}),n===`view`?e.layers.length===0?(0,D.jsx)(`p`,{className:`lp-caption`,children:`No layers`}):(0,D.jsx)(`div`,{className:`lp-planes`,children:e.layers.map(e=>(0,D.jsx)(`button`,{type:`button`,className:`chip${s.includes(e.id)?` active`:``}`,style:e.tint===void 0?void 0:{borderColor:e.tint},onClick:()=>c?.(e.id),title:`Toggle sheet visibility`,children:e.name},e.id))}):(0,D.jsxs)(D.Fragment,{children:[i!==void 0&&(0,D.jsx)(`p`,{className:`lp-caption`,children:`Draw on — new nodes & edges land on the active sheet`}),i!==void 0&&(0,D.jsxs)(`label`,{className:`lp-check lp-draw`,children:[(0,D.jsx)(`input`,{type:`radio`,name:`active-layer`,"aria-label":`Draw on base sheet`,checked:r===null,onChange:()=>i(null)}),(0,D.jsx)(`span`,{children:`Base sheet`})]}),u.map(e=>(0,D.jsxs)(`div`,{className:`lp-row${T.has(e.id)?` selected`:``}`,onClick:t=>te(t,e.id),children:[i!==void 0&&(0,D.jsx)(`input`,{type:`radio`,name:`active-layer`,className:`lp-pen`,"aria-label":`Draw on ${e.name}`,title:`Draw on this sheet`,checked:r===e.id,onChange:()=>i(e.id)}),c!==void 0&&(0,D.jsx)(`button`,{type:`button`,className:`chip icon-btn lp-eye${s.includes(e.id)?` active`:``}`,"aria-label":`Toggle visibility of ${e.name}`,"aria-pressed":s.includes(e.id),title:`Show / hide this sheet`,onClick:()=>c(e.id),children:`👁`}),(0,D.jsx)(`input`,{"aria-label":`Layer name ${e.id}`,className:`lp-name`,value:e.name,onChange:t=>re(e.id,{name:t.target.value}),onBlur:()=>ae(e),onKeyDown:t=>MC(t,()=>ae(e))}),(0,D.jsx)(`input`,{type:`color`,"aria-label":`Layer tint ${e.id}`,className:`lp-tint`,value:e.tint===``?`#888888`:e.tint,onChange:t=>{let n={...e,tint:t.target.value};re(e.id,{tint:t.target.value}),ae(n)}}),(0,D.jsx)(`button`,{className:`chip icon-btn`,"aria-label":`Remove layer ${e.name}`,onClick:()=>void de(e.id,e.name),children:`✕`})]},e.id)),l!==void 0&&e.layers.length>0&&(0,D.jsxs)(`div`,{className:`lp-merge`,children:[(0,D.jsx)(`button`,{type:`button`,className:`chip`,disabled:!ee,"aria-label":`Merge selected layers into another`,onClick:()=>S(e=>!e),children:`Merge into ▾`}),x&&ee&&(0,D.jsxs)(`div`,{className:`lp-merge-menu`,children:[(0,D.jsx)(`button`,{type:`button`,className:`chip`,"aria-label":`Merge into base sheet`,onClick:()=>void ne(void 0),children:`Base sheet`}),E.map(e=>(0,D.jsx)(`button`,{type:`button`,className:`chip`,"aria-label":`Merge into ${e.name}`,onClick:()=>void ne(e),children:e.name},e.id))]})]}),(0,D.jsxs)(`div`,{className:`lp-row`,children:[(0,D.jsx)(`input`,{"aria-label":`New layer name`,className:`lp-name`,placeholder:`Layer name`,value:m,onChange:e=>h(e.target.value),onKeyDown:e=>MC(e,le)}),(0,D.jsx)(`button`,{className:`chip`,onClick:le,children:`Add layer`})]})]})]}),n===`edit`&&(0,D.jsxs)(`section`,{className:`panel-section`,children:[(0,D.jsx)(`h3`,{children:`Planes`}),f.map(t=>(0,D.jsxs)(`div`,{className:`lp-plane`,children:[(0,D.jsxs)(`div`,{className:`lp-row`,children:[(0,D.jsx)(`input`,{"aria-label":`Plane name ${t.id}`,className:`lp-name`,value:t.name,onChange:e=>ie(t.id,{name:e.target.value}),onBlur:()=>ce(t),onKeyDown:e=>MC(e,()=>ce(t))}),(0,D.jsx)(`button`,{className:`chip icon-btn`,"aria-label":`Remove plane ${t.name}`,onClick:()=>void fe(t.id,t.name),children:`✕`})]}),(0,D.jsxs)(`label`,{className:`field lp-sub`,children:[(0,D.jsx)(`span`,{children:`Containment of`}),(0,D.jsxs)(`select`,{"aria-label":`Containment of ${t.name}`,value:t.containmentOf,onChange:e=>{let n={...t,containmentOf:e.target.value};ie(t.id,{containmentOf:e.target.value}),ce(n)},children:[(0,D.jsx)(`option`,{value:``,children:`own containment`}),f.filter(e=>e.id!==t.id).map(e=>(0,D.jsx)(`option`,{value:e.id,children:e.name},e.id))]})]}),(0,D.jsxs)(`label`,{className:`field lp-sub`,children:[(0,D.jsx)(`span`,{children:`Notation`}),(0,D.jsxs)(`select`,{"aria-label":`Notation ${t.name}`,value:t.notation,onChange:e=>{let n={...t,notation:e.target.value};ie(t.id,{notation:e.target.value}),ce(n)},children:[(0,D.jsx)(`option`,{value:``,children:`default look`}),pe.map(e=>(0,D.jsx)(`option`,{value:e,children:Use(e)},e))]})]}),(0,D.jsxs)(`label`,{className:`lp-check`,children:[(0,D.jsx)(`input`,{type:`checkbox`,"aria-label":`Base relations in ${t.name}`,checked:t.baseRelations,onChange:e=>{let n={...t,baseRelations:e.target.checked};ie(t.id,{baseRelations:e.target.checked}),ce(n)}}),(0,D.jsx)(`span`,{children:`Show base relations`})]}),e.layers.length>0&&(0,D.jsxs)(`div`,{className:`lp-sub`,children:[(0,D.jsx)(`span`,{className:`lp-caption`,children:`Default layers`}),e.layers.map(e=>(0,D.jsxs)(`label`,{className:`lp-check`,children:[(0,D.jsx)(`input`,{type:`checkbox`,"aria-label":`Layer ${e.name} in ${t.name}`,checked:t.layers.includes(e.id),onChange:n=>me(t,e.id,n.target.checked)}),(0,D.jsx)(`span`,{children:e.name})]},e.id))]})]},t.id)),(0,D.jsxs)(`div`,{className:`lp-row`,children:[(0,D.jsx)(`input`,{"aria-label":`New plane name`,className:`lp-name`,placeholder:`Plane name`,value:g,onChange:e=>_(e.target.value),onKeyDown:e=>MC(e,ue)}),(0,D.jsx)(`button`,{className:`chip`,onClick:ue,children:`Add plane`})]})]})]})}function RC(e,t,n,r={}){let i=Ft(e,n),a=It(Pt(e,t),n),o=t??e.planes[0]?.id,s=r.gap??0;return{id:i,command:{type:`batch`,commands:[{type:`add-node`,node:{id:i,name:r.tag??``,type:`commit`,...s>0?{metadata:{gap:s}}:{}},parent:{id:n,...o===void 0?{}:{plane:o}}},...a===void 0?[]:[{type:`add-relation`,from:a.id,to:i,opts:{kind:`commit`}}]]}}}var Gse=e=>{let t=Number(e);return Number.isInteger(t)&&t>0?t:0};function Kse({model:e,plane:t,selection:n,onCommand:r,onSelect:i}){let a=Pt(e,t),o=t??e.planes[0]?.id,s=e=>({id:e,...o===void 0?{}:{plane:o}}),[c,l]=(0,v.useState)(``),[u,d]=(0,v.useState)(``),[f,p]=(0,v.useState)(``),[m,h]=(0,v.useState)(``),[g,_]=(0,v.useState)(`0`),[y,b]=(0,v.useState)(``),[x,S]=(0,v.useState)(``),[C,w]=(0,v.useState)(``),T=n?.kind===`node`?e.nodes.find(e=>e.id===n.id&&e.type===`commit`):void 0,E=T===void 0?void 0:a.laneOf.get(T.id),ee=f===``?E??a.lanes[0]?.id??``:f,te=a.lanes.filter(e=>e.id!==E),ne=(e,t,n)=>({id:e,name:t,type:`commit`,...n>0?{metadata:{gap:n}}:{}}),re=()=>{let t=c.trim();t!==``&&(r({type:`add-node`,node:{id:Se(e,t),name:t,type:`branch`,...u===``?{}:{color:u}}}),l(``))},ie=()=>{if(ee===``)return;let{id:n,command:a}=RC(e,t,ee,{tag:m.trim(),gap:Gse(g)});r(a),h(``),_(`0`),i(n)},ae=()=>{let t=y===``?te[0]?.id:y;if(T===void 0||t===void 0)return;let n=Ft(e,t);r({type:`batch`,commands:[{type:`add-node`,node:ne(n,``,0),parent:s(t)},{type:`add-relation`,from:T.id,to:n,opts:{kind:`branch`}}]}),b(``),i(n)},oe=()=>{let t=x===``?te[0]?.id:x;if(T===void 0||t===void 0)return;let n=Ft(e,t),o=It(a,t);r({type:`batch`,commands:[{type:`add-node`,node:ne(n,C.trim(),0),parent:s(t)},{type:`add-relation`,from:T.id,to:n,opts:{kind:`merge`}},...o===void 0?[]:[{type:`add-relation`,from:o.id,to:n,opts:{kind:`commit`}}]]}),w(``),S(``),i(n)},se=e=>{if(T===void 0)return;let{gap:t,...n}=T.metadata??{},i=Gse(e),a=i>0?{...n,gap:i}:n;r({type:`set-node-details`,id:T.id,details:{metadata:Object.keys(a).length>0?a:null}})};return(0,D.jsxs)(wS,{id:`git`,title:`Git`,label:`Git graph`,className:`sidebar git-panel`,children:[(0,D.jsxs)(`section`,{className:`panel-section`,children:[(0,D.jsx)(`h3`,{children:`Lanes`}),a.lanes.length===0?(0,D.jsx)(`p`,{className:`lp-caption`,children:`No lanes yet`}):null,(0,D.jsx)(`ul`,{className:`git-lanes`,children:a.lanes.map(e=>(0,D.jsx)(`li`,{children:e.node.name},e.id))}),(0,D.jsx)(`input`,{"aria-label":`New lane name`,value:c,onChange:e=>l(e.target.value),placeholder:`Lane name`}),(0,D.jsx)(yS,{label:`Lane color`,value:u,onChange:d}),(0,D.jsx)(`button`,{type:`button`,className:`chip`,onClick:re,disabled:c.trim()===``,children:`Add lane`})]}),(0,D.jsxs)(`section`,{className:`panel-section`,children:[(0,D.jsx)(`h3`,{children:`Commit`}),(0,D.jsx)(`select`,{"aria-label":`Lane`,value:ee,onChange:e=>p(e.target.value),children:a.lanes.map(e=>(0,D.jsx)(`option`,{value:e.id,children:e.node.name},e.id))}),(0,D.jsx)(`input`,{"aria-label":`Tag`,value:m,onChange:e=>h(e.target.value),placeholder:`Tag (optional)`}),(0,D.jsx)(`input`,{"aria-label":`Gap`,type:`number`,min:0,step:1,value:g,onChange:e=>_(e.target.value)}),(0,D.jsx)(`button`,{type:`button`,className:`chip`,onClick:ie,disabled:ee===``,children:`Add commit`})]}),T!==void 0&&(0,D.jsxs)(`section`,{className:`panel-section`,children:[(0,D.jsxs)(`h3`,{children:[`Selected commit`,T.name===``?``:` ${T.name}`]}),(0,D.jsx)(`select`,{"aria-label":`Branch into lane`,value:y===``?te[0]?.id??``:y,onChange:e=>b(e.target.value),children:te.map(e=>(0,D.jsx)(`option`,{value:e.id,children:e.node.name},e.id))}),(0,D.jsx)(`button`,{type:`button`,className:`chip`,onClick:ae,disabled:te.length===0,children:`Branch`}),(0,D.jsx)(`select`,{"aria-label":`Merge into lane`,value:x===``?te[0]?.id??``:x,onChange:e=>S(e.target.value),children:te.map(e=>(0,D.jsx)(`option`,{value:e.id,children:e.node.name},e.id))}),(0,D.jsx)(`input`,{"aria-label":`Merge tag`,value:C,onChange:e=>w(e.target.value),placeholder:`Tag (optional)`}),(0,D.jsx)(`button`,{type:`button`,className:`chip`,onClick:oe,disabled:te.length===0,children:`Merge`}),(0,D.jsxs)(`label`,{className:`lp-check`,children:[`Gap`,(0,D.jsx)(`input`,{"aria-label":`Commit gap`,type:`number`,min:0,step:1,defaultValue:String(Mt(T)),onChange:e=>se(e.target.value)},T.id)]})]})]})}var zC=new Set([`activity-frame`,`activity-lane`,`activity-region`]),BC=[{type:`activity-action`,label:`Add action`,defaultName:`Action`},{type:`activity-decision`,label:`Add decision`,defaultName:``},{type:`activity-bar`,label:`Add bar`,defaultName:``},{type:`activity-start`,label:`Add start`,defaultName:``},{type:`activity-end`,label:`Add end`,defaultName:``},{type:`activity-send`,label:`Add send signal`,defaultName:`Signal`},{type:`activity-receive`,label:`Add receive signal`,defaultName:`Signal`},{type:`activity-object`,label:`Add object`,defaultName:`Object`},{type:`activity-note`,label:`Add note`,defaultName:`Note`}];function VC(e,t){if(t?.kind!==`node`)return;let n=e.nodes.find(e=>e.id===t.id);return n!==void 0&&n.type!==void 0&&zC.has(n.type)?n:void 0}function HC({model:e,plane:t,selection:n,onCommand:r,onSelect:i}){let[a,o]=(0,v.useState)(``),[s,c]=(0,v.useState)(``),[l,u]=(0,v.useState)(``),d=VC(e,n);if(d===void 0)return null;let f=wr(e,t),p=f===void 0?{}:{plane:f},m=e.containment.filter(t=>(t.plane??wr(e,void 0))===f),h=L_,g=e=>{let t=m.filter(t=>t.parent===e).length;return{x:h.LANE_STRIP_W+h.PAD+24*t,y:h.PAD+16*t}},_=d.type===`activity-frame`?d.id:d.type===`activity-lane`?m.find(e=>e.child===d.id)?.parent:void 0,y=(e,t=d.id)=>{let n=g(t);r({type:`batch`,commands:[{type:`add-node`,node:e,parent:{id:t,...p}},{type:`set-position`,nodeId:e.id,x:n.x,y:n.y,...p}]}),i(e.id)},b=()=>{let t=a.trim();t===``||_===void 0||(y({id:Se(e,t),name:t,type:`activity-lane`,...s===``?{}:{color:s}},_),o(``))},x=(t,n)=>{let r=l.trim()===``?n:l.trim(),i=r===``?t.replace(`activity-`,``):r;y({id:Se(e,i),name:r,type:t}),u(``)};return(0,D.jsxs)(wS,{id:`activity`,title:`Activity`,label:`Activity diagram`,className:`sidebar git-panel`,children:[_!==void 0&&(0,D.jsxs)(`section`,{className:`panel-section`,children:[(0,D.jsx)(`h3`,{children:`Lanes`}),(0,D.jsx)(`input`,{"aria-label":`New lane name`,value:a,onChange:e=>o(e.target.value),placeholder:`Lane name`}),(0,D.jsx)(yS,{label:`Lane color`,value:s,onChange:c}),(0,D.jsx)(`button`,{type:`button`,className:`chip`,onClick:b,disabled:a.trim()===``,children:`Add lane`})]}),d.type!==`activity-frame`&&(0,D.jsxs)(`section`,{className:`panel-section`,children:[(0,D.jsx)(`h3`,{children:`Elements`}),(0,D.jsx)(`input`,{"aria-label":`Element name`,value:l,onChange:e=>u(e.target.value),placeholder:`Name (optional)`}),BC.map(e=>(0,D.jsx)(`button`,{type:`button`,className:`chip`,onClick:()=>x(e.type,e.defaultName),children:e.label},e.type)),d.type===`activity-lane`&&(0,D.jsx)(`button`,{type:`button`,className:`chip`,onClick:()=>x(`activity-region`,`Region`),children:`Add region`})]})]})}function UC(e,t,n){let r=e.nodes.find(e=>e.id===t);if(r===void 0||!Wt(r))return null;let i=Se(e,`consequence`);return{id:i,command:{type:`batch`,commands:[{type:`add-node`,node:{id:i,name:``,type:Ht(n),...r.plane===void 0?{}:{plane:r.plane}}},{type:`add-relation`,from:t,to:i,opts:{kind:Bt}}]}}}function WC(e,t){let n=Se(e,`decision`);return{id:n,command:{type:`add-node`,node:{id:n,name:``,type:zt,...t===void 0?{}:{plane:t}}}}}var qse=[{valence:`+`,label:`Good consequence`},{valence:`-`,label:`Bad consequence`},{valence:`0`,label:`Neutral consequence`}];function Jse({model:e,selection:t,plane:n,onCommand:r,onSelect:i,onCreated:a}){let o=t?.kind===`node`?e.nodes.find(e=>e.id===t.id&&Wt(e)):void 0,s=(0,v.useMemo)(()=>rr(e).filter(e=>e.code.startsWith(`so-`)),[e]),c=e=>{e!==null&&(r(e.command),i(e.id),a(e.id))};return(0,D.jsxs)(wS,{id:`second-order`,title:`And then what?`,label:`Second-order thinking`,className:`sidebar so-panel`,children:[(0,D.jsx)(`p`,{className:`so-hint`,children:o===void 0?`Select a decision or a consequence.`:`What follows from “${o.name===``?o.id:o.name}”?`}),(0,D.jsx)(`div`,{className:`so-answers`,children:qse.map(t=>(0,D.jsx)(`button`,{type:`button`,disabled:o===void 0,onClick:()=>o!==void 0&&c(UC(e,o.id,t.valence)),children:t.label},t.valence))}),(0,D.jsx)(`p`,{className:`so-hint`,children:`Tab adds a neutral consequence to the selection.`}),(0,D.jsx)(`button`,{type:`button`,onClick:()=>c(WC(e,n)),children:`Add a decision`}),s.length>0&&(0,D.jsx)(`ul`,{className:`so-issues`,children:s.map(t=>{let n=t.ref;return(0,D.jsx)(`li`,{children:n!==void 0&&e.nodes.some(e=>e.id===n)&&n!==void 0?(0,D.jsx)(`button`,{type:`button`,onClick:()=>i(n),children:t.message}):(0,D.jsx)(`span`,{children:t.message})},`${t.code}:${n??``}`)})})]})}function GC(e,t){return e.categories.some(e=>e.causes.some(e=>e.subs.includes(t)))}function KC(e,t){let n=Se(e,`effect`);return{id:n,command:{type:`add-node`,node:{id:n,name:``,type:mt,...t===void 0?{}:{plane:t}}}}}function qC(e,t){let n=e.nodes.find(e=>e.id===t);if(n===void 0||!yt(n)||n.type===`fb-cause`&&GC(wt(e),t))return null;let r=n.type===`fb-effect`?ht:gt,i=Se(e,r===`fb-category`?`category`:`cause`);return{id:i,command:{type:`batch`,commands:[{type:`add-node`,node:{id:i,name:``,type:r,...n.plane===void 0?{}:{plane:n.plane}}},{type:`add-relation`,from:i,to:t,opts:{kind:vt}}]}}}function Yse(e,t,n){let r=e.nodes.find(e=>e.id===t);if(r===void 0||r.type!==`fb-effect`)return null;let i=[],a=[],o=e.nodes;for(let s of bt[n]){let n=Se({...e,nodes:o},St(s));o=[...o,{id:n,name:s}],a.push(n),i.push({type:`add-node`,node:{id:n,name:s,type:ht,...r.plane===void 0?{}:{plane:r.plane}}}),i.push({type:`add-relation`,from:n,to:t,opts:{kind:vt}})}return{ids:a,command:{type:`batch`,commands:i}}}var Xse=`A sub-cause takes nothing: three levels below the effect is the limit.`;function Zse({model:e,selection:t,plane:n,onCommand:r,onSelect:i,onCreated:a}){let o=(0,v.useMemo)(()=>wt(e),[e]),s=(0,v.useMemo)(()=>[...rr(e),...ir(e)].filter(e=>e.code.startsWith(`fb-`)),[e]),c=t?.kind===`node`?e.nodes.find(e=>e.id===t.id&&yt(e)):void 0,l=c===void 0?o.effect:c.id,u=c?.type===`fb-cause`&&GC(o,c.id),d=c===void 0||c.type===`fb-effect`?`Add a category`:`Add a cause`,f=e=>{e!==null&&(r(e.command),i(e.id),a(e.id))};return(0,D.jsxs)(wS,{id:`fishbone`,title:`Fishbone`,className:`sidebar so-panel`,children:[o.effect===void 0?(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(`p`,{className:`so-hint`,children:`Every fish starts with the effect at its head.`}),(0,D.jsx)(`button`,{type:`button`,onClick:()=>f(KC(e,n)),children:`Add an effect`})]}):(0,D.jsxs)(D.Fragment,{children:[o.categories.length===0&&(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(`p`,{className:`so-hint`,children:`Start from a standard set of bones, or add your own.`}),(0,D.jsx)(`div`,{className:`so-answers`,children:xt.map(t=>(0,D.jsx)(`button`,{type:`button`,onClick:()=>{let n=o.effect===void 0?null:Yse(e,o.effect,t);n!==null&&r(n.command)},children:t},t))})]}),(0,D.jsx)(`p`,{className:`so-hint`,children:u?Xse:c===void 0?`Adds a category to the effect.`:`Under “${c.name===``?c.id:c.name}”:`}),(0,D.jsx)(`button`,{type:`button`,disabled:u||l===void 0,onClick:()=>l!==void 0&&f(qC(e,l)),children:d}),(0,D.jsx)(`p`,{className:`so-hint`,children:c===void 0?`Select a bone or a cause, and the button (or Tab) hangs something on it instead.`:`Tab does the same for the selection.`})]}),s.length>0&&(0,D.jsx)(`ul`,{className:`so-issues`,children:s.map(t=>{let n=t.ref;return(0,D.jsx)(`li`,{children:n!==void 0&&e.nodes.some(e=>e.id===n)&&n!==void 0?(0,D.jsx)(`button`,{type:`button`,onClick:()=>i(n),children:t.message}):(0,D.jsx)(`span`,{children:t.message})},`${t.code}:${n??``}`)})})]})}var Qse=e=>`node`in e?{kind:`node`,id:e.node}:{kind:`edge`,id:e.relation},$se=e=>[`[${e.category}] ${e.title}`,...e.severity===void 0?[]:[e.severity],e.status??`open`].join(` · `);function ece({model:e,plane:t,onSelect:n}){let r=(0,v.useMemo)(()=>dn(e,t),[e,t]),i=(0,v.useMemo)(()=>e.relations.filter(e=>r.has(e.id)&&hn(e.threats).total===0),[e,r]),a=(0,v.useMemo)(()=>{let t=new Map;for(let n of mn(e)){let e=JSON.stringify(n.target),r=t.get(e)??{key:e,name:n.name,selection:Qse(n.target),threats:[]};r.threats.push(n.threat),t.set(e,r)}return[...t.values()]},[e]),o=(0,v.useMemo)(()=>rr(e).filter(e=>e.code.startsWith(`threat-`)||e.code.startsWith(`tm-`)||e.code===`invalid-threats`),[e]),s=t=>e.nodes.find(e=>e.id===t)?.name??t;return(0,D.jsxs)(wS,{id:`threat-model`,title:`Threat model`,className:`sidebar so-panel`,children:[(0,D.jsxs)(`section`,{className:`panel-section`,"aria-label":`Crossings to review`,children:[(0,D.jsx)(`h4`,{children:`Crossings to review`}),i.length===0?(0,D.jsx)(`p`,{className:`so-hint`,children:`Every boundary-crossing flow has at least one threat.`}):(0,D.jsx)(`div`,{className:`so-answers tm-list`,children:i.map(t=>(0,D.jsxs)(`button`,{type:`button`,onClick:()=>n({kind:`edge`,id:t.id}),children:[`${s(t.from)} → ${s(t.to)}`,(0,D.jsx)(`span`,{className:`so-hint tm-sub`,children:pn(e,r.get(t.id)??{})})]},t.id))})]}),(0,D.jsxs)(`section`,{className:`panel-section`,"aria-label":`Register`,children:[(0,D.jsx)(`h4`,{children:`Register`}),a.length===0?(0,D.jsx)(`p`,{className:`so-hint`,children:`Select an element and add a threat in the Threats section.`}):a.map(e=>{let{open:t,total:r}=hn(e.threats);return(0,D.jsxs)(`div`,{className:`tm-group`,children:[(0,D.jsx)(`div`,{className:`so-answers tm-list`,children:(0,D.jsxs)(`button`,{type:`button`,onClick:()=>n(e.selection),children:[e.name,` `,(0,D.jsxs)(`span`,{className:`so-hint`,children:[t,` / `,r]})]})}),(0,D.jsx)(`ul`,{className:`tm-threats`,children:e.threats.map((e,t)=>(0,D.jsx)(`li`,{title:en[e.category],children:$se(e)},`${e.id}:${t}`))})]},e.key)})]}),o.length>0&&(0,D.jsx)(`ul`,{className:`so-issues`,"aria-label":`Issues`,children:o.map((t,r)=>{let i=t.ref,a=i===void 0?void 0:e.nodes.some(e=>e.id===i)?{kind:`node`,id:i}:e.relations.some(e=>e.id===i)?{kind:`edge`,id:i}:void 0;return(0,D.jsx)(`li`,{children:a===void 0?(0,D.jsx)(`span`,{children:t.message}):(0,D.jsx)(`button`,{type:`button`,onClick:()=>n(a),children:t.message})},`${t.code}:${i??``}:${r}`)})})]})}var JC=e=>typeof e==`string`?e:``;function tce({model:e,plane:t,selection:n,onCommand:r,onSelect:i,today:a}){let o=Xr(e,t),s=(0,v.useMemo)(()=>IS(e),[e]),c=new Map(e.nodes.map(e=>[e.id,e])),[l,u]=(0,v.useState)(``),d=n?.kind===`node`&&c.get(n.id)?.type===`plan-zone`?n.id:void 0,f=[],p=(e,t)=>{f.push({id:e,depth:t});for(let n of o.children.get(e)?.zones??[])p(n,t+1)};for(let e of o.zones)o.parent.has(e)||p(e,0);let m=(e,t)=>r({type:`set-plan-dates`,id:e,dates:t}),h=e=>{r(e.command),i(e.id)};return(0,D.jsxs)(wS,{id:`plan`,title:`Plan`,label:`Plan`,className:`sidebar plan-panel`,children:[(0,D.jsxs)(`section`,{className:`panel-section`,children:[(0,D.jsx)(`h3`,{children:`Zones`}),f.length===0?(0,D.jsx)(`p`,{className:`lp-caption`,children:`No zones yet`}):null,(0,D.jsx)(`ul`,{className:`plan-rows`,children:f.map(({id:t,depth:n})=>{let a=c.get(t);return(0,D.jsxs)(`li`,{style:{paddingLeft:`${n*12}px`},children:[(0,D.jsx)(`button`,{type:`button`,className:`link-btn`,"aria-label":`Select ${a.name}`,onClick:()=>i(t),children:a.name}),(0,D.jsx)(RS,{label:`Start ${a.name}`,value:JC(a.metadata?.start),onChange:e=>m(t,{start:e})}),(0,D.jsx)(RS,{label:`End ${a.name}`,value:JC(a.metadata?.end),onChange:e=>m(t,{end:e})}),(0,D.jsx)(LS,{model:e,zoneId:t,candidates:s,suffix:a.name,onCommand:r})]},t)})}),(0,D.jsx)(`button`,{type:`button`,className:`chip`,onClick:()=>h(tse(e,t,{...d===void 0?{}:{selected:d},today:a})),children:`Add zone`})]}),(0,D.jsxs)(`section`,{className:`panel-section`,children:[(0,D.jsx)(`h3`,{children:`Events`}),o.events.length===0?(0,D.jsx)(`p`,{className:`lp-caption`,children:`No events yet`}):null,(0,D.jsx)(`ul`,{className:`plan-rows`,children:o.events.map(e=>{let t=c.get(e);return(0,D.jsxs)(`li`,{children:[(0,D.jsx)(`button`,{type:`button`,className:`link-btn`,"aria-label":`Select ${t.name}`,onClick:()=>i(e),children:t.name}),(0,D.jsx)(RS,{label:`At ${t.name}`,value:JC(t.metadata?.at),onChange:t=>m(e,{at:t})})]},e)})}),(0,D.jsx)(`button`,{type:`button`,className:`chip`,onClick:()=>h(nse(e,t,{...d===void 0?{}:{selected:d},today:a})),children:`Add event`})]}),(0,D.jsxs)(`section`,{className:`panel-section`,children:[(0,D.jsx)(`h3`,{children:`People & teams`}),(0,D.jsx)(`input`,{"aria-label":`New actor name`,value:l,onChange:e=>u(e.target.value),placeholder:`Name`}),(0,D.jsxs)(`div`,{className:`field-row`,children:[(0,D.jsx)(`button`,{type:`button`,className:`chip`,disabled:l.trim()===``,onClick:()=>{h(rse(e,t,xn,l.trim())),u(``)},children:`Add person`}),(0,D.jsx)(`button`,{type:`button`,className:`chip`,disabled:l.trim()===``,onClick:()=>{h(rse(e,t,Sn,l.trim())),u(``)},children:`Add team`})]})]})]})}function YC(e,t,n,r){if(e!==`threat-model`)return`sync`;let i=e=>t?.nodes.find(t=>t.id===e)?.type===Xt;return i(n)||i(r)?`sync`:Zt}var XC={"fb-category":`Add a category`,"fb-cause":`Add a cause`,"so-then":`And then what?`,"tm-flow":`Add a flow to a new process`,"tm-inside":`Add a process inside`,"git-commit":`Add a commit`,"lane-above":`Add a lane above`,"lane-below":`Add a lane below`,sibling:`Add a connected node`};function ZC(e,t){return e===`plan-next`?Tn(t)?`Add the next zone`:`Add the next event`:XC[e]}var QC=new Set([`activity-lane`,`activity-frame`,`activity-region`]);function $C(e,t,n,r){if(t.type===`activity-lane`){let i=nw(e,n.plane,t.id);return i===void 0||e.nodes.find(e=>e.id===i)?.type!==`activity-frame`?void 0:r===`before`?`lane-above`:`lane-below`}if(r===void 0)switch(n.notation){case`fishbone`:return yt(t)?t.type===`fb-effect`?`fb-category`:t.type===`fb-cause`&&GC(wt(e),t.id)?void 0:`fb-cause`:void 0;case`second-order`:return Wt(t)?`so-then`:void 0;case`git-graph`:return ew(e,t,n.plane)===void 0?void 0:`git-commit`;case Kt:return t.type===`tm-boundary`?`tm-inside`:$t(t)?`tm-flow`:`sibling`;case vn:return Tn(t)?Nn(t)===void 0?void 0:`plan-next`:En(t)?Pn(t)===void 0?void 0:`plan-next`:`sibling`;default:return t.type!==void 0&&QC.has(t.type)||n.notation===`causal-loop`&&ge(tw(e,n.plane)).has(t.id)?void 0:`sibling`}}function ew(e,t,n){if(t.type===`branch`)return t.id;if(t.type!==`commit`)return;let r=Pt(e,n),i=r.laneOf.get(t.id);return i!==void 0&&It(r,i)?.id===t.id?i:void 0}function tw(e,t){let n=wr(e,t),r=e.planes?.[0]?.id;return e.containment.filter(e=>(e.plane??r)===n)}function nw(e,t,n){return tw(e,t).find(e=>e.child===n)?.parent}function rw(e,t,n,r){let i=e.nodes.find(e=>e.id===t);if(i===void 0)return;let a=$C(e,i,n,r);return a===void 0?void 0:ZC(a,i)}function nce(e,t,n,r){let i=e.nodes.find(e=>e.id===t);if(i===void 0)return;let a=$C(e,i,n,r);if(a===void 0)return;let o=ZC(a,i);switch(a){case`fb-category`:case`fb-cause`:{let n=qC(e,t);return n===null?void 0:{label:o,beside:!1,...n}}case`so-then`:{let n=UC(e,t,`0`);return n===null?void 0:{label:o,beside:!1,...n}}case`git-commit`:{let t=ew(e,i,n.plane);return t===void 0?void 0:{label:o,beside:!1,...RC(e,n.plane,t)}}case`lane-above`:case`lane-below`:{let r=nw(e,n.plane,t),i=yx(e,{kind:`lane`,plane:n.plane,borrowsContainment:n.borrowsContainment,parentId:r}),s={id:i.id,name:``,type:`activity-lane`,...bx(i,n.penLayer)},c=a===`lane-above`?{before:t}:{after:t};return{label:o,id:i.id,beside:!1,command:{type:`batch`,commands:[{type:`add-node`,node:s,parent:{...i.parent,...c}}]}}}case`tm-inside`:{let r=yx(e,{kind:`process`,plane:n.plane,borrowsContainment:n.borrowsContainment,parentId:t}),i={id:r.id,name:``,type:Jt,...bx(r,n.penLayer)};return{label:o,id:r.id,beside:!1,command:{type:`batch`,commands:[{type:`add-node`,node:i,...r.parent===void 0?{}:{parent:r.parent}}]}}}case`plan-next`:{let r=nw(e,n.plane,t),a=r===void 0?void 0:Nn(e.nodes.find(e=>e.id===r)),s=Tn(i),c=s?(()=>{let e=Nn(i),t=e.end-e.start+1,n=a===void 0?e.end+1:Math.min(e.end+1,a.end),r=a===void 0?n+t-1:Math.min(n+t-1,a.end);return{start:Mn(n),end:Mn(r)}})():(()=>{let e=Pn(i)+7;return{at:Mn(a===void 0?e:Math.min(e,a.end))}})(),l=yx(e,{kind:s?`zone`:`event`,plane:n.plane,borrowsContainment:n.borrowsContainment,parentId:r}),u={...i.color===void 0?{}:{color:i.color},...i.shape===void 0?{}:{shape:i.shape},...i.image===void 0?{}:{image:i.image},...i.icon===void 0?{}:{icon:i.icon},...i.textColor===void 0?{}:{textColor:i.textColor}},d={id:l.id,name:``,type:s?yn:bn,...u,metadata:c,...bx(l,n.penLayer)};return{label:o,id:l.id,beside:!0,command:{type:`batch`,commands:[{type:`add-node`,node:d,...l.parent===void 0?{}:{parent:l.parent}},{type:`add-relation`,from:t,to:l.id,opts:{kind:YC(n.notation,e,t,l.id),...n.penLayer===null?{}:{layer:n.penLayer}}}]}}}case`tm-flow`:case`sibling`:{let r=yx(e,{kind:a===`tm-flow`?`process`:`node`,plane:n.plane,borrowsContainment:n.borrowsContainment,parentId:nw(e,n.plane,t)}),s=a===`tm-flow`?Jt:i.type,c=a===`sibling`?{...i.color===void 0?{}:{color:i.color},...i.shape===void 0?{}:{shape:i.shape},...i.image===void 0?{}:{image:i.image},...i.icon===void 0?{}:{icon:i.icon},...i.textColor===void 0?{}:{textColor:i.textColor}}:{},l={id:r.id,name:``,...s===void 0?{}:{type:s},...c,...bx(r,n.penLayer)},u=a===`tm-flow`?Zt:YC(n.notation,e,t,r.id);return{label:o,id:r.id,beside:!0,command:{type:`batch`,commands:[{type:`add-node`,node:l,...r.parent===void 0?{}:{parent:r.parent}},{type:`add-relation`,from:t,to:r.id,opts:{kind:u,...n.penLayer===null?{}:{layer:n.penLayer}}}]}}}}}function iw(e,t){let n=[];return e.beside&&t.pinned&&t.source!==void 0&&n.push({type:`set-position`,nodeId:e.id,x:t.source.x+t.width+40,y:t.source.y,...t.plane===void 0?{}:{plane:t.plane}}),e.beside&&t.size!==void 0&&n.push({type:`set-size`,nodeId:e.id,w:t.size.w,h:t.size.h}),n.length===0?e.command:{type:`batch`,commands:[...e.command.type===`batch`?e.command.commands:[e.command],...n]}}function rce({activeTab:e,onTabChange:t,properties:n,library:r}){return(0,D.jsxs)(`div`,{className:`inspector`,children:[(0,D.jsx)(`div`,{className:`inspector-tabs`,role:`tablist`,"aria-label":`Inspector`,children:[`properties`,`library`].map(n=>(0,D.jsx)(`button`,{type:`button`,role:`tab`,id:`inspector-tab-${n}`,"aria-controls":`inspector-panel-${n}`,"aria-selected":e===n,className:`inspector-tab${e===n?` active`:``}`,onClick:()=>t(n),children:n===`properties`?`Properties`:`Library`},n))}),(0,D.jsx)(`div`,{className:`inspector-body`,role:`tabpanel`,id:`inspector-panel-${e}`,"aria-labelledby":`inspector-tab-${e}`,children:e===`properties`?n:r})]})}function ice(e,t,n){return Number.isFinite(e)?Math.min(n,Math.max(t,e)):t}function aw({side:e,collapsed:t,onToggle:n,hasContent:r,width:i,minWidth:a=200,maxWidth:o=560,onWidthChange:s,children:c}){let l=(0,v.useRef)(null),u=(0,v.useRef)(i??a),d=t=>{if(i===void 0||s===void 0)return;t.preventDefault();let n=t.clientX,r=i,c=document.body.style.userSelect;document.body.style.userSelect=`none`;let d=t=>{let i=t.clientX-n,s=ice(e===`left`?r+i:r-i,a,o);u.current=s,l.current&&(l.current.style.width=`${s}px`)},f=()=>{window.removeEventListener(`pointermove`,d),window.removeEventListener(`pointerup`,f),document.body.style.userSelect=c,s(u.current)};window.addEventListener(`pointermove`,d),window.addEventListener(`pointerup`,f)},f=(0,D.jsxs)(`button`,{type:`button`,className:`dock-toggle`,"aria-label":t?`Expand panel`:`Collapse panel`,"aria-expanded":!t,title:t?`Expand panel`:`Collapse panel`,onClick:n,children:[(0,D.jsx)(`span`,{"aria-hidden":`true`,children:t?e===`right`?`⟨`:`⟩`:e===`right`?`⟩`:`⟨`}),t&&r&&(0,D.jsx)(`span`,{className:`dock-dot`,"aria-hidden":`true`})]}),p=!t&&i!==void 0&&s!==void 0?(0,D.jsx)(`div`,{className:`dock-resize`,role:`separator`,"aria-orientation":`vertical`,"aria-label":`Resize panel`,onPointerDown:d}):null,m=!t&&(0,D.jsx)(`div`,{className:`dock-body`,ref:l,style:i===void 0?void 0:{width:i},children:c});return(0,D.jsxs)(`div`,{className:`dock dock-${e}${t?` collapsed`:``}`,children:[e===`left`&&m,e===`right`&&p,f,e===`left`&&p,e===`right`&&m]})}function ow(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var sw=ow();function ace(e){sw=e}var cw={exec:()=>null};function lw(e){let t=[];return n=>{let r=Math.max(0,Math.min(3,n-1)),i=t[r];return i||(i=e(r),t[r]=i),i}}function uw(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(dw.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var oce=((e=``)=>{try{return!!RegExp(`(?<=1)(?<!1)`+e)}catch{return!1}})(),dw={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:lw(e=>RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:lw(e=>RegExp(`^ {0,${e}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),fencesBeginRegex:lw(e=>RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),headingBeginRegex:lw(e=>RegExp(`^ {0,${e}}#`)),htmlBeginRegex:lw(e=>RegExp(`^ {0,${e}}<(?:[a-z].*>|!--)`,`i`)),blockquoteBeginRegex:lw(e=>RegExp(`^ {0,${e}}>`))},sce=/^(?:[ \t]*(?:\n|$))+/,cce=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,fw=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,pw=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,lce=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,mw=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,hw=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,gw=uw(hw).replace(/bull/g,mw).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,``).getRegex(),uce=uw(hw).replace(/bull/g,mw).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),_w=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,dce=/^[^\n]+/,vw=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,fce=uw(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,vw).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),yw=uw(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,mw).getRegex(),bw=`address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul`,xw=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Sw=uw(`^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n+|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n+|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n+|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))`,`i`).replace(`comment`,xw).replace(`tag`,bw).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Cw=e=>uw(_w).replace(`hr`,pw).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,e).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,bw).getRegex(),pce=Cw(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),ww=Cw(/ {0,3}(?:[*+-]|\d{1,9}[.)])[ \t]+[^ \t\n]/),Tw={blockquote:uw(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,ww).getRegex(),code:cce,def:fce,fences:fw,heading:lce,hr:pw,html:Sw,lheading:gw,list:yw,newline:sce,paragraph:pce,table:cw,text:dce},Ew=uw(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,pw).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`blockquote`,` {0,3}>`).replace(`code`,`(?: {4}| {0,3} )[^\\n]`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,bw).getRegex(),Dw={...Tw,lheading:uce,table:Ew,paragraph:uw(_w).replace(`hr`,pw).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,Ew).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,bw).getRegex()},Ow={...Tw,html:uw(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,xw).replace(/tag/g,`(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b`).getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:cw,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:uw(_w).replace(`hr`,pw).replace(`heading`,` *#{1,6} *[^
46
46
  ]`).replace(`lheading`,gw).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).replace(`|tag`,``).getRegex()},kw=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Aw=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,jw=/^( {2,}|\\)\n(?!\s*$)/,mce=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Mw=/[\p{P}\p{S}]/u,Nw=/[\s\p{P}\p{S}]/u,Pw=/[^\s\p{P}\p{S}]/u,Fw=uw(/^((?![*_])punctSpace)/,`u`).replace(/punctSpace/g,Nw).getRegex(),Iw=/(?!~)[\p{P}\p{S}]/u,Lw=/(?!~)[\s\p{P}\p{S}]/u,Rw=/(?:[^\s\p{P}\p{S}]|~)/u,zw=uw(/link|precode-code|html/,`g`).replace(`link`,/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace(`precode-`,oce?"(?<!`)()":"(^^|[^`])").replace(`code`,/(?<b>`+)[^`]+\k<b>(?!`)/).replace(`html`,/<(?! )[^<>]*?>/).getRegex(),Bw=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,Vw=uw(Bw,`u`).replace(/punct/g,Mw).getRegex(),hce=uw(Bw,`u`).replace(/punct/g,Iw).getRegex(),Hw=`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)`,gce=uw(Hw,`gu`).replace(/notPunctSpace/g,Pw).replace(/punctSpace/g,Nw).replace(/punct/g,Mw).getRegex(),Uw=uw(Hw,`gu`).replace(/notPunctSpace/g,Rw).replace(/punctSpace/g,Lw).replace(/punct/g,Iw).getRegex(),Ww=uw(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)`,`gu`).replace(/notPunctSpace/g,Pw).replace(/punctSpace/g,Nw).replace(/punct/g,Mw).getRegex(),Gw=uw(/^~~?(?:((?!~)punct)|[^\s~])/,`u`).replace(/punct/g,Mw).getRegex(),_ce=uw(`^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,Pw).replace(/punctSpace/g,Nw).replace(/punct/g,Mw).getRegex(),Kw=uw(/\\(punct)/,`gu`).replace(/punct/g,Mw).getRegex(),vce=uw(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace(`scheme`,/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace(`email`,/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),yce=uw(xw).replace(`(?:-->|$)`,`-->`).getRegex(),bce=uw(`^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>`).replace(`comment`,yce).replace(`attribute`,/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),qw=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,xce=uw(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace(`label`,qw).replace(`href`,/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace(`title`,/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Sce=uw(/^!?\[(label)\]\[(ref)\]/).replace(`label`,qw).replace(`ref`,vw).getRegex(),Cce=uw(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,vw).getRegex(),Jw=uw(`reflink|nolink(?!\\()`,`g`).replace(`reflink`,Sce).replace(`nolink`,Cce).getRegex(),wce=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Yw={_backpedal:cw,anyPunctuation:Kw,autolink:vce,blockSkip:zw,br:jw,code:Aw,del:cw,delLDelim:cw,delRDelim:cw,emStrongLDelim:Vw,emStrongRDelimAst:gce,emStrongRDelimUnd:Ww,escape:kw,link:xce,nolink:Cce,punctuation:Fw,reflink:Sce,reflinkSearch:Jw,tag:bce,text:mce,url:cw},Tce={...Yw,link:uw(/^!?\[(label)\]\((.*?)\)/).replace(`label`,qw).getRegex(),reflink:uw(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,qw).getRegex()},Xw={...Yw,emStrongRDelimAst:Uw,emStrongLDelim:hce,delLDelim:Gw,delRDelim:_ce,url:uw(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace(`protocol`,wce).replace(`email`,/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:uw(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace(`protocol`,wce).getRegex()},Ece={...Xw,br:uw(jw).replace(`{2,}`,`*`).getRegex(),text:uw(Xw.text).replace(`\\b_`,`\\b_| {2,}\\n`).replace(/\{2,\}/g,`*`).getRegex()},Zw={normal:Tw,gfm:Dw,pedantic:Ow},Qw={normal:Yw,gfm:Xw,breaks:Ece,pedantic:Tce},$w={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`},Dce=e=>$w[e];function eT(e,t){if(t){if(dw.escapeTest.test(e))return e.replace(dw.escapeReplace,Dce)}else if(dw.escapeTestNoEncode.test(e))return e.replace(dw.escapeReplaceNoEncode,Dce);return e}function tT(e){try{e=encodeURI(e).replace(dw.percentDecode,`%`)}catch{return null}return e}function nT(e,t){let n=e.replace(dw.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&n[i]===`\\`;)r=!r;return r?`|`:` |`}).split(dw.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push(``);for(;r<n.length;r++)n[r]=n[r].trim().replace(dw.slashPipe,`|`);return n}function rT(e,t,n){let r=e.length;if(r===0)return``;let i=0;for(;i<r;){let a=e.charAt(r-i-1);if(a===t&&!n)i++;else if(a!==t&&n)i++;else break}return e.slice(0,r-i)}function iT(e){let t=e.split(`