yarramate 1.4.0 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -351,7 +351,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
351
351
  `),i.length!=2)throw A(new rv(`Exactly two numbers are expected, `+i.length+` were found.`));try{this.a=kz(Jz(i[0])),this.b=kz(Jz(i[1]))}catch(e){throw e=SP(e),F(e,130)?(n=e,A(new rv(Xft+n))):A(e)}},Q.Ib=function(){return`(`+this.a+`,`+this.b+`)`},Q.a=0,Q.b=0;var A6=B(sK,`KVector`,8);J(75,67,{3:1,4:1,20:1,31:1,56:1,16:1,67:1,15:1,75:1,423:1},y_,dy,Ppe),Q.Pc=function(){return iHe(this)},Q.cg=function(e){var t,n,r=MV(e,`,|;|\\(|\\)|\\[|\\]|\\{|\\}| | |
352
352
  `),i,a,o;TO(this);try{for(n=0,a=0,i=0,o=0;n<r.length;)r[n]!=null&&Jz(r[n]).length>0&&(a%2==0?i=kz(r[n]):o=kz(r[n]),a>0&&a%2!=0&&WT(this,new N(i,o)),++a),++n}catch(e){throw e=SP(e),F(e,130)?(t=e,A(new rv(`The given string does not match the expected format for vectors.`+t))):A(e)}},Q.Ib=function(){for(var e=new ZC(`(`),t=xL(this,0),n;t.b!=t.d.c;)n=L(rA(t),8),MS(e,n.a+`,`+n.b),t.b!=t.d.c&&(e.a+=`; `);return(e.a+=`)`,e).a};var nRt=B(sK,`KVectorChain`,75);J(255,22,{3:1,34:1,22:1,255:1},Xx);var rRt,j6,M6,N6,P6,F6,iRt=GM(NJ,`Alignment`,255,yX,ZNe,rve),aRt;J(991,1,UW,If),Q.hf=function(e){knt(e)};var oRt,sRt,cRt,lRt,uRt,dRt,fRt,pRt,mRt,hRt,gRt,_Rt;B(NJ,`BoxLayouterOptions`,991),J(992,1,{},Kc),Q.sf=function(){var e;return e=new Yc,e},Q.tf=function(e){},B(NJ,`BoxLayouterOptions/BoxFactory`,992),J(298,22,{3:1,34:1,22:1,298:1},$x);var I6,vRt,L6,R6,z6,yRt,bRt=GM(NJ,`ContentAlignment`,298,yX,QNe,ive),xRt;J(699,1,UW,Lf),Q.hf=function(e){wI(e,new Bz(sy(oy(cy(ey(ay(ny(ry(new Gc,ugt),``),`Layout Algorithm`),`Select a specific layout algorithm.`),(Hz(),O6)),FX),aI((bL(),y6))))),wI(e,new Bz(sy(oy(cy(ey(ay(ny(ry(new Gc,dgt),``),`Resolved Layout Algorithm`),`Meta data associated with the selected algorithm.`),D6),JLt),aI(y6)))),wI(e,new Bz(sy(oy(cy(ty(ey(ay(ny(ry(new Gc,Cmt),``),`Alignment`),`Alignment of the selected node relative to other nodes; the exact meaning depends on the used algorithm.`),CRt),w6),iRt),aI(v6)))),wI(e,new Bz(sy(oy(cy(ey(ay(ny(ry(new Gc,dG),``),`Aspect Ratio`),`The desired aspect ratio of the drawing, that is the quotient of width by height.`),C6),AX),aI(y6)))),wI(e,new Bz(sy(oy(cy(ey(ay(ny(ry(new Gc,fgt),``),`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.`),D6),nRt),aI(g6)))),wI(e,new Bz(sy(oy(cy(ty(ey(ay(ny(ry(new Gc,xq),``),`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.`),ORt),T6),bRt),aI(y6)))),wI(e,new Bz(sy(oy(cy(ty(ey(ay(ny(ry(new Gc,yq),``),`Debug Mode`),`Whether additional debug information shall be generated.`),(cw(),!1)),S6),DX),aI(y6)))),wI(e,new Bz(sy(oy(cy(ty(ey(ay(ny(ry(new Gc,bq),``),aft),`Overall direction of edges: horizontal (right / left) or vertical (down / up).`),kRt),w6),E8),aI(y6)))),wI(e,new Bz(sy(oy(cy(ty(ey(ay(ny(ry(new Gc,mq),``),`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.`),PRt),w6),zzt),aI(y6)))),wI(e,new Bz(sy(oy(cy(ty(ey(ay(ny(ry(new Gc,cgt),``),`Expand Nodes`),`If active, nodes are expanded to fill the area of their parent.`),!1),S6),DX),aI(y6)))),wI(e,new Bz(sy(oy(cy(ty(ey(ay(ny(ry(new Gc,pq),``),`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`."),RRt),w6),tBt),CE(y6,G(M(x6,1),Z,170,0,[v6]))))),wI(e,new Bz(sy(oy(cy(ty(ey(ay(ny(ry(new Gc,fG),``),`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.`),XRt),D6),Vwt),CE(y6,G(M(x6,1),Z,170,0,[v6]))))),wI(e,new Bz(sy(oy(cy(ty(ey(ay(ny(ry(new Gc,AG),``),`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),S6),DX),aI(y6)))),wI(e,new Bz(sy(oy(cy(ty(ey(ay(ny(ry(new Gc,Tq),``),`interactive Layout`),`Whether the graph should be changeable interactively and by setting constraints`),!1),S6),DX),aI(y6)))),wI(e,new Bz(sy(oy(cy(ty(ey(ay(ny(ry(new Gc,NG),``),`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),S6),DX),aI(y6)))),wI(e,new Bz(sy(oy(cy(ty(ey(ay(ny(ry(new Gc,jG),``),`Port Constraints`),`Defines constraints of the position of the ports of a node.`),czt),w6),lBt),aI(v6)))),wI(e,new Bz(sy(oy(cy(ey(ay(ny(ry(new Gc,wq),``),`Position`),`The position of a node, port, or label. This is used by the 'Fixed Layout' algorithm to specify a pre-defined position.`),D6),A6),CE(v6,G(M(x6,1),Z,170,0,[b6,_6]))))),wI(e,new Bz(sy(oy(cy(ey(ay(ny(ry(new Gc,TG),``),`Priority`),`Defines the priority of an object; its meaning depends on the specific layout algorithm and the context where it is used.`),E6),MX),CE(v6,G(M(x6,1),Z,170,0,[g6]))))),wI(e,new Bz(sy(oy(cy(ey(ay(ny(ry(new Gc,OG),``),`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).`),E6),MX),aI(y6)))),wI(e,new Bz(sy(oy(cy(ey(ay(ny(ry(new Gc,kG),``),`Separate Connected Components`),`Whether each connected component should be processed separately.`),S6),DX),aI(y6)))),wI(e,new Bz(sy(oy(cy(ty(ey(ay(ny(ry(new Gc,Pmt),``),`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.`),HRt),D6),nRt),aI(g6)))),wI(e,new Bz(sy(oy(cy(ty(ey(ay(ny(ry(new Gc,Lmt),``),`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),S6),DX),aI(v6)))),wI(e,new Bz(sy(oy(cy(ty(ey(ay(ny(ry(new Gc,Rmt),``),`Hypernode`),`Whether the node should be handled as a hypernode.`),!1),S6),DX),aI(v6)))),wI(e,new Bz(sy(oy(cy(ey(ay(ny(ry(new Gc,pgt),``),`Label Manager`),`Label managers can shorten labels upon a layout algorithm's request.`),D6),uUt),CE(y6,G(M(x6,1),Z,170,0,[_6]))))),wI(e,new Bz(sy(oy(cy(ty(ey(ay(ny(ry(new Gc,Bmt),``),`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.`),URt),D6),zwt),aI(v6)))),wI(e,new Bz(sy(oy(cy(ty(ey(ay(ny(ry(new Gc,xmt),``),`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),S6),DX),CE(v6,G(M(x6,1),Z,170,0,[g6,b6,_6]))))),wI(e,new Bz(sy(oy(cy(ty(ey(ay(ny(ry(new Gc,mgt),``),`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),C6),AX),aI(v6)))),wI(e,new Bz(sy(oy(cy(ey(ay(ny(ry(new Gc,hgt),``),`Child Area Width`),`The width of the area occupied by the laid out children of a node.`),C6),AX),aI(y6)))),wI(e,new Bz(sy(oy(cy(ey(ay(ny(ry(new Gc,ggt),``),`Child Area Height`),`The height of the area occupied by the laid out children of a node.`),C6),AX),aI(y6)))),wI(e,new Bz(sy(oy(cy(ty(ey(ay(ny(ry(new Gc,zG),``),ngt),`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),S6),DX),aI(y6)))),Wk(e,zG,UG,null),wI(e,new Bz(sy(oy(cy(ty(ey(ay(ny(ry(new Gc,_gt),``),`Animate`),`Whether the shift from the old layout to the new computed layout shall be animated.`),!0),S6),DX),aI(y6)))),wI(e,new Bz(sy(oy(cy(ty(ey(ay(ny(ry(new Gc,vgt),``),`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'.`),kF(100)),E6),MX),aI(y6)))),wI(e,new Bz(sy(oy(cy(ty(ey(ay(ny(ry(new Gc,ygt),``),`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),S6),DX),aI(y6)))),wI(e,new Bz(sy(oy(cy(ty(ey(ay(ny(ry(new Gc,bgt),``),`Maximal Animation Time`),`The maximal time for animations, in milliseconds.`),kF(4e3)),E6),MX),aI(y6)))),wI(e,new Bz(sy(oy(cy(ty(ey(ay(ny(ry(new Gc,xgt),``),`Minimal Animation Time`),`The minimal time for animations, in milliseconds.`),kF(400)),E6),MX),aI(y6)))),wI(e,new Bz(sy(oy(cy(ty(ey(ay(ny(ry(new Gc,Sgt),``),`Progress Bar`),`Whether a progress bar shall be displayed during layout computations.`),!1),S6),DX),aI(y6)))),wI(e,new Bz(sy(oy(cy(ty(ey(ay(ny(ry(new Gc,Cgt),``),`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),S6),DX),aI(y6)))),wI(e,new Bz(sy(oy(cy(ty(ey(ay(ny(ry(new Gc,wgt),``),`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),S6),DX),aI(y6)))),wI(e,new Bz(sy(oy(cy(ty(ey(ay(ny(ry(new Gc,Tgt),``),`Zoom to Fit`),`Whether the zoom level shall be set to view the whole diagram after layout.`),!1),S6),DX),aI(y6)))),wI(e,new Bz(sy(oy(cy(ty(ey(ay(ny(ry(new Gc,lgt),`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.`),ERt),w6),MBt),aI(y6)))),wI(e,new Bz(sy(oy(cy(ty(ey(ay(ny(ry(new Gc,umt),hq),`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),C6),AX),aI(y6)))),wI(e,new Bz(sy(oy(cy(ty(ey(ay(ny(ry(new Gc,dmt),hq),`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),C6),AX),aI(y6)))),wI(e,new Bz(sy(oy(cy(ty(ey(ay(ny(ry(new Gc,xft),hq),`Components Spacing`),`Spacing to be preserved between pairs of connected components. This option is only relevant if 'separateConnectedComponents' is activated.`),20),C6),AX),aI(y6)))),wI(e,new Bz(sy(oy(cy(ty(ey(ay(ny(ry(new Gc,fmt),hq),`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),C6),AX),aI(y6)))),wI(e,new Bz(sy(oy(cy(ty(ey(ay(ny(ry(new Gc,DG),hq),`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),C6),AX),aI(y6)))),wI(e,new Bz(sy(oy(cy(ty(ey(ay(ny(ry(new Gc,vq),hq),`Edge Node Spacing`),`Spacing to be preserved between nodes and edges.`),10),C6),AX),aI(y6)))),wI(e,new Bz(sy(oy(cy(ty(ey(ay(ny(ry(new Gc,pmt),hq),`Label Spacing`),`Determines the amount of space to be left between two labels of the same graph element.`),0),C6),AX),aI(y6)))),wI(e,new Bz(sy(oy(cy(ty(ey(ay(ny(ry(new Gc,gmt),hq),`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),C6),AX),aI(y6)))),wI(e,new Bz(sy(oy(cy(ty(ey(ay(ny(ry(new Gc,mmt),hq),`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),C6),AX),aI(y6)))),wI(e,new Bz(sy(oy(cy(ty(ey(ay(ny(ry(new Gc,hmt),hq),`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),C6),AX),aI(y6)))),wI(e,new Bz(sy(oy(cy(ty(ey(ay(ny(ry(new Gc,EG),hq),`Node Spacing`),`The minimal distance to be preserved between each two nodes.`),20),C6),AX),aI(y6)))),wI(e,new Bz(sy(oy(cy(ty(ey(ay(ny(ry(new Gc,_mt),hq),`Node Self Loop Spacing`),`Spacing to be preserved between a node and its self loops.`),10),C6),AX),aI(y6)))),wI(e,new Bz(sy(oy(cy(ty(ey(ay(ny(ry(new Gc,vmt),hq),`Port Spacing`),`Spacing between pairs of ports of the same node.`),10),C6),AX),CE(y6,G(M(x6,1),Z,170,0,[v6]))))),wI(e,new Bz(sy(oy(cy(ey(ay(ny(ry(new Gc,ymt),hq),`Individual Spacing`),`Allows to specify individual spacing values for graph elements that shall be different from the value specified for the element's parent.`),D6),PBt),CE(v6,G(M(x6,1),Z,170,0,[g6,b6,_6]))))),wI(e,new Bz(sy(oy(cy(ty(ey(ay(ny(ry(new Gc,Vmt),hq),`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.`),Ozt),D6),zwt),aI(y6)))),wI(e,new Bz(sy(oy(cy(ey(ay(ny(ry(new Gc,Cq),jgt),`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).`),E6),MX),CE(y6,G(M(x6,1),Z,170,0,[v6]))))),Wk(e,Cq,Sq,ezt),wI(e,new Bz(sy(oy(cy(ty(ey(ay(ny(ry(new Gc,Sq),jgt),`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.`),QRt),S6),DX),aI(y6)))),wI(e,new Bz(sy(oy(cy(ty(ey(ay(ny(ry(new Gc,Emt),Mgt),`Node Label Padding`),`Define padding for node labels that are placed inside of a node.`),GRt),D6),Vwt),aI(y6)))),wI(e,new Bz(sy(oy(cy(ty(ey(ay(ny(ry(new Gc,LG),Mgt),`Node Label Placement`),`Hints for where node labels are to be placed; if empty, the node label's position is not modified.`),KRt),T6),X8),CE(v6,G(M(x6,1),Z,170,0,[_6]))))),wI(e,new Bz(sy(oy(cy(ty(ey(ay(ny(ry(new Gc,kmt),FJ),`Port Alignment`),`Defines the default port distribution for a node. May be overridden for each side individually.`),nzt),w6),e5),aI(v6)))),wI(e,new Bz(sy(oy(cy(ey(ay(ny(ry(new Gc,Amt),FJ),`Port Alignment (North)`),`Defines how ports on the northern side are placed, overriding the node's general port alignment.`),w6),e5),aI(v6)))),wI(e,new Bz(sy(oy(cy(ey(ay(ny(ry(new Gc,jmt),FJ),`Port Alignment (South)`),`Defines how ports on the southern side are placed, overriding the node's general port alignment.`),w6),e5),aI(v6)))),wI(e,new Bz(sy(oy(cy(ey(ay(ny(ry(new Gc,Mmt),FJ),`Port Alignment (West)`),`Defines how ports on the western side are placed, overriding the node's general port alignment.`),w6),e5),aI(v6)))),wI(e,new Bz(sy(oy(cy(ey(ay(ny(ry(new Gc,Nmt),FJ),`Port Alignment (East)`),`Defines how ports on the eastern side are placed, overriding the node's general port alignment.`),w6),e5),aI(v6)))),wI(e,new Bz(sy(oy(cy(ty(ey(ay(ny(ry(new Gc,IG),Ngt),`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.`),qRt),T6),B5),aI(v6)))),wI(e,new Bz(sy(oy(cy(ty(ey(ay(ny(ry(new Gc,FG),Ngt),`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.`),YRt),T6),bBt),aI(v6)))),wI(e,new Bz(sy(oy(cy(ty(ey(ay(ny(ry(new Gc,GG),Ngt),`Node Size Minimum`),`The minimal size to which a node can be reduced.`),JRt),D6),A6),aI(v6)))),wI(e,new Bz(sy(oy(cy(ty(ey(ay(ny(ry(new Gc,PG),Ngt),`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),S6),DX),aI(y6)))),wI(e,new Bz(sy(oy(cy(ty(ey(ay(ny(ry(new Gc,Fmt),gq),`Edge Label Placement`),`Gives a hint on where to put edge labels.`),MRt),w6),Izt),aI(_6)))),wI(e,new Bz(sy(oy(cy(ty(ey(ay(ny(ry(new Gc,MG),gq),`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),S6),DX),aI(_6)))),wI(e,new Bz(sy(oy(cy(ey(ay(ny(ry(new Gc,Egt),`font`),`Font Name`),`Font name used for a label.`),O6),FX),aI(_6)))),wI(e,new Bz(sy(oy(cy(ey(ay(ny(ry(new Gc,Dgt),`font`),`Font Size`),`Font size used for a label.`),E6),MX),aI(_6)))),wI(e,new Bz(sy(oy(cy(ey(ay(ny(ry(new Gc,zmt),Pgt),`Port Anchor Offset`),`The offset to the port position where connections shall be attached.`),D6),A6),aI(b6)))),wI(e,new Bz(sy(oy(cy(ey(ay(ny(ry(new Gc,Imt),Pgt),`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.`),E6),MX),aI(b6)))),wI(e,new Bz(sy(oy(cy(ty(ey(ay(ny(ry(new Gc,Smt),Pgt),`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.`),pzt),w6),F5),aI(b6)))),wI(e,new Bz(sy(oy(cy(ey(ay(ny(ry(new Gc,bmt),Pgt),`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.`),C6),AX),aI(b6)))),wI(e,new Bz(sy(oy(cy(ty(ey(ay(ny(ry(new Gc,RG),Fgt),`Port Label Placement`),`Decides on a placement method for port labels; if empty, the node label's position is not modified.`),dzt),T6),p5),aI(v6)))),wI(e,new Bz(sy(oy(cy(ty(ey(ay(ny(ry(new Gc,Dmt),Fgt),`Port Labels Next to Port`),`Use 'portLabels.placement': NEXT_TO_PORT_OF_POSSIBLE.`),!1),S6),DX),aI(v6)))),wI(e,new Bz(sy(oy(cy(ty(ey(ay(ny(ry(new Gc,Omt),Fgt),`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),S6),DX),aI(v6)))),wI(e,new Bz(sy(oy(cy(ty(ey(ay(ny(ry(new Gc,BG),IJ),`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),C6),AX),aI(y6)))),Wk(e,BG,UG,Mzt),wI(e,new Bz(sy(oy(cy(ty(ey(ay(ny(ry(new Gc,Ogt),IJ),`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),w6),Z5),aI(v6)))),Wk(e,Ogt,UG,Pzt),wI(e,new Bz(sy(oy(cy(ty(ey(ay(ny(ry(new Gc,VG),IJ),`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),C6),AX),CE(y6,G(M(x6,1),Z,170,0,[v6]))))),Wk(e,VG,UG,null),wI(e,new Bz(sy(oy(cy(ty(ey(ay(ny(ry(new Gc,HG),IJ),`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),C6),AX),CE(y6,G(M(x6,1),Z,170,0,[v6]))))),Wk(e,HG,UG,null),wI(e,new Bz(sy(oy(cy(ty(ey(ay(ny(ry(new Gc,UG),IJ),`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),w6),CBt),aI(v6)))),Wk(e,UG,PG,null),wI(e,new Bz(sy(oy(cy(ty(ey(ay(ny(ry(new Gc,kgt),IJ),`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),C6),AX),aI(y6)))),Wk(e,kgt,UG,jzt),wI(e,new Bz(sy(oy(cy(ty(ey(ay(ny(ry(new Gc,wmt),Igt),`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),S6),DX),aI(v6)))),wI(e,new Bz(sy(oy(cy(ty(ey(ay(ny(ry(new Gc,Tmt),Igt),`Inside Self Loop`),`Whether a self loop should be routed inside a node instead of around that node.`),!1),S6),DX),aI(g6)))),wI(e,new Bz(sy(oy(cy(ty(ey(ay(ny(ry(new Gc,Sft),`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),C6),AX),aI(g6)))),wI(e,new Bz(sy(oy(cy(ty(ey(ay(ny(ry(new Gc,Agt),`edge`),`Edge Type`),`The type of an edge. This is usually used for UML class diagrams, where associations must be handled differently from generalizations.`),IRt),w6),qzt),aI(g6)))),Db(e,new wk(Zv($v(Qv(new Tc,SW),`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 wk(Zv($v(Qv(new Tc,`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 wk(Zv($v(Qv(new Tc,wG),`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 wk(Zv($v(Qv(new Tc,`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 wk(Zv($v(Qv(new Tc,cht),`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 wk(Zv($v(Qv(new Tc,`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 wk(Zv($v(Qv(new Tc,sJ),`Radial`),`Radial layout algorithms usually position the nodes of the graph on concentric circles.`))),ltt((new Rf,e)),knt((new If,e)),k9e((new zf,e))};var B6,SRt,CRt,V6,wRt,TRt,ERt,H6,U6,DRt,W6,ORt,G6,K6,kRt,ARt,jRt,MRt,NRt,PRt,FRt,IRt,LRt,q6,RRt,zRt,J6,BRt,Y6,VRt,X6,HRt,Z6,URt,WRt,GRt,Q6,KRt,$6,qRt,e8,t8,JRt,n8,YRt,r8,i8,a8,XRt,ZRt,QRt,$Rt,ezt,tzt,nzt,rzt,izt,azt,ozt,szt,o8,s8,czt,lzt,uzt,c8,dzt,fzt,l8,pzt,u8,d8,mzt,f8,hzt,gzt,_zt,vzt,yzt,bzt,xzt,Szt,p8,Czt,m8,wzt,Tzt,h8,Ezt,Dzt,Ozt,kzt,g8,_8,v8,y8,Azt,jzt,b8,Mzt,Nzt,Pzt;B(NJ,`CoreOptions`,699),J(88,22,{3:1,34:1,22:1,88:1},eS);var x8,S8,C8,w8,T8,E8=GM(NJ,aft,88,yX,Eje,ave),Fzt;J(278,22,{3:1,34:1,22:1,278:1},Kce);var D8,O8,k8,Izt=GM(NJ,`EdgeLabelPlacement`,278,yX,eOe,ove),Lzt;J(223,22,{3:1,34:1,22:1,223:1},tS);var A8,j8,M8,Rzt,zzt=GM(NJ,`EdgeRouting`,223,yX,uAe,sve),Bzt;J(321,22,{3:1,34:1,22:1,321:1},nS);var Vzt,Hzt,Uzt,Wzt,Gzt,Kzt,qzt=GM(NJ,`EdgeType`,321,yX,XNe,cve),Jzt;J(989,1,UW,Rf),Q.hf=function(e){ltt(e)};var Yzt,Xzt,Zzt,Qzt,$zt,eBt,N8;B(NJ,`FixedLayouterOptions`,989),J(990,1,{},qc),Q.sf=function(){var e;return e=new il,e},Q.tf=function(e){},B(NJ,`FixedLayouterOptions/FixedFactory`,990),J(346,22,{3:1,34:1,22:1,346:1},qce);var P8,F8,I8,tBt=GM(NJ,`HierarchyHandling`,346,yX,QDe,lve),nBt;J(291,22,{3:1,34:1,22:1,291:1},rS);var L8,R8,z8,B8,rBt=GM(NJ,`LabelSide`,291,yX,lAe,uve),iBt;J(95,22,{3:1,34:1,22:1,95:1},iS);var V8,H8,U8,W8,G8,K8,q8,J8,Y8,X8=GM(NJ,`NodeLabelPlacement`,95,yX,JIe,dve),aBt;J(256,22,{3:1,34:1,22:1,256:1},aS);var oBt,Z8,Q8,sBt,$8,e5=GM(NJ,`PortAlignment`,256,yX,Jje,fve),cBt;J(101,22,{3:1,34:1,22:1,101:1},oS);var t5,n5,r5,i5,a5,o5,lBt=GM(NJ,`PortConstraints`,101,yX,YNe,pve),uBt;J(279,22,{3:1,34:1,22:1,279:1},sS);var s5,c5,l5,u5,d5,f5,p5=GM(NJ,`PortLabelPlacement`,279,yX,JNe,mve),dBt;J(64,22,{3:1,34:1,22:1,64:1},cS);var m5,h5,g5,_5,v5,y5,b5,x5,S5,C5,w5,T5,E5,D5,O5,k5,A5,j5,M5,N5,P5,F5=GM(NJ,`PortSide`,64,yX,Dje,hve),fBt;J(993,1,UW,zf),Q.hf=function(e){k9e(e)};var pBt,mBt,hBt,gBt,_Bt;B(NJ,`RandomLayouterOptions`,993),J(994,1,{},Jc),Q.sf=function(){var e;return e=new tl,e},Q.tf=function(e){},B(NJ,`RandomLayouterOptions/RandomFactory`,994),J(386,22,{3:1,34:1,22:1,386:1},lS);var I5,L5,R5,z5,B5=GM(NJ,`SizeConstraint`,386,yX,cAe,gve),vBt;J(264,22,{3:1,34:1,22:1,264:1},uS);var V5,H5,U5,yBt,W5,G5,K5,q5,J5,bBt=GM(NJ,`SizeOptions`,264,yX,wLe,_ve),xBt;J(280,22,{3:1,34:1,22:1,280:1},Jce);var Y5,SBt,X5,CBt=GM(NJ,`TopdownNodeTypes`,280,yX,tOe,vve),wBt;J(347,22,Lgt);var TBt,EBt,Z5=GM(NJ,`TopdownSizeApproximator`,347,yX,JTe,bve);J(987,347,Lgt,Jye),Q.Tg=function(e){return bJe(e)},GM(NJ,`TopdownSizeApproximator/1`,987,Z5,null,null),J(988,347,Lgt,Nxe),Q.Tg=function(e){var t=L(Y(e,(PH(),f8)),143),n,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C=(_y(),m=new __,m),w,T,E;for(LB(C,e),w=new ig,o=new UC((!e.a&&(e.a=new R(p7,e,10,11)),e.a));o.e!=o.i.gc();)i=L(TL(o),27),y=(p=new __,p),IB(y,C),LB(y,i),E=bJe(i),aC(y,r.Math.max(i.g,E.a),r.Math.max(i.f,E.b)),Zz(w.f,i,y);for(a=new UC((!e.a&&(e.a=new R(p7,e,10,11)),e.a));a.e!=a.i.gc();)for(i=L(TL(a),27),d=new UC((!i.e&&(i.e=new $w(i7,i,7,4)),i.e));d.e!=d.i.gc();)u=L(TL(d),74),x=L(vS(vE(w.f,i)),27),S=L(ND(w,W((!u.c&&(u.c=new $w(r7,u,5,8)),u.c),0)),27),b=(f=new dl,f),uj((!b.b&&(b.b=new $w(r7,b,4,7)),b.b),x),uj((!b.c&&(b.c=new $w(r7,b,5,8)),b.c),S),NB(b,uk(x)),LB(b,u);g=L(qO(t.f),205);try{g.rf(C,new cl),pCe(t.f,g)}catch(e){throw e=SP(e),F(e,103)?(h=e,A(h)):A(e)}return oj(C,U6)||oj(C,H6)||wlt(C),l=j(I(Y(C,U6))),c=j(I(Y(C,H6))),s=l/c,n=j(I(Y(C,_8)))*r.Math.sqrt((!C.a&&(C.a=new R(p7,C,10,11)),C.a).i),T=L(Y(C,a8),107),v=T.b+T.c+1,_=T.d+T.a+1,new N(r.Math.max(v,n),r.Math.max(_,n/s))},GM(NJ,`TopdownSizeApproximator/2`,988,Z5,null,null);var DBt;J(344,1,{871:1},O_),Q.Ug=function(e,t){return d$e(this,e,t)},Q.Vg=function(){X1e(this)},Q.Wg=function(){return this.q},Q.Xg=function(){return this.f?nTe(this.f):null},Q.Yg=function(){return nTe(this.a)},Q.Zg=function(){return this.p},Q.$g=function(){return!1},Q._g=function(){return this.n},Q.ah=function(){return this.p!=null&&!this.b},Q.bh=function(e){var t;this.n&&(t=e,FC(this.f,t))},Q.dh=function(e,t){var n,r;this.n&&e&&EOe(this,(n=new CSe,r=Utt(n,e),Dst(n),r),(qP(),IBt))},Q.eh=function(e){var t;return this.b?null:(t=iIe(this,this.g),WT(this.a,t),t.i=this,this.d=e,t)},Q.fh=function(e){e>0&&!this.b&&VLe(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(Eq,`BasicProgressMonitor`,344),J(717,205,sG,Yc),Q.rf=function(e,t){yrt(e,t)},B(Eq,`BoxLayoutProvider`,717),J(983,1,zW,Zne),Q.Ne=function(e,t){return x5e(this,L(e,27),L(t,27))},Q.Fb=function(e){return this===e},Q.Oe=function(){return new bm(this)},Q.a=!1,B(Eq,`BoxLayoutProvider/1`,983),J(163,1,{163:1},SM,Wpe),Q.Ib=function(){return this.c?Het(this.c):wz(this.b)},B(Eq,`BoxLayoutProvider/Group`,163),J(320,22,{3:1,34:1,22:1,320:1},dS);var OBt,kBt,ABt,jBt,MBt=GM(Eq,`BoxLayoutProvider/PackingMode`,320,yX,dAe,xve),NBt;J(984,1,zW,Xc),Q.Ne=function(e,t){return Uwe(L(e,163),L(t,163))},Q.Fb=function(e){return this===e},Q.Oe=function(){return new bm(this)},B(Eq,`BoxLayoutProvider/lambda$0$Type`,984),J(985,1,zW,Zc),Q.Ne=function(e,t){return Awe(L(e,163),L(t,163))},Q.Fb=function(e){return this===e},Q.Oe=function(){return new bm(this)},B(Eq,`BoxLayoutProvider/lambda$1$Type`,985),J(986,1,zW,Qc),Q.Ne=function(e,t){return jwe(L(e,163),L(t,163))},Q.Fb=function(e){return this===e},Q.Oe=function(){return new bm(this)},B(Eq,`BoxLayoutProvider/lambda$2$Type`,986),J(1384,1,{845:1},$c),Q.Mg=function(e,t){return Cb(),!F(t,167)||Mae((AP(),L(e,167)),t)},B(Eq,`ElkSpacings/AbstractSpacingsBuilder/lambda$0$Type`,1384),J(1385,1,dU,Qne),Q.Cd=function(e){lHe(this.a,L(e,149))},B(Eq,`ElkSpacings/AbstractSpacingsBuilder/lambda$1$Type`,1385),J(1386,1,dU,nl),Q.Cd=function(e){L(e,96),Cb()},B(Eq,`ElkSpacings/AbstractSpacingsBuilder/lambda$2$Type`,1386),J(1390,1,dU,_h),Q.Cd=function(e){xRe(this.a,L(e,96))},B(Eq,`ElkSpacings/AbstractSpacingsBuilder/lambda$3$Type`,1390),J(1388,1,kU,Xce),Q.Mb=function(e){return TVe(this.a,this.b,L(e,149))},B(Eq,`ElkSpacings/AbstractSpacingsBuilder/lambda$4$Type`,1388),J(1387,1,kU,Zce),Q.Mb=function(e){return xpe(this.a,this.b,L(e,845))},B(Eq,`ElkSpacings/AbstractSpacingsBuilder/lambda$5$Type`,1387),J(1389,1,dU,Qce),Q.Cd=function(e){Dxe(this.a,this.b,L(e,149))},B(Eq,`ElkSpacings/AbstractSpacingsBuilder/lambda$6$Type`,1389),J(947,1,{},rl),Q.Kb=function(e){return Eue(e)},Q.Fb=function(e){return this===e},B(Eq,`ElkUtil/lambda$0$Type`,947),J(948,1,dU,$ce),Q.Cd=function(e){G4e(this.a,this.b,L(e,74))},Q.a=0,Q.b=0,B(Eq,`ElkUtil/lambda$1$Type`,948),J(949,1,dU,ele),Q.Cd=function(e){kie(this.a,this.b,L(e,166))},Q.a=0,Q.b=0,B(Eq,`ElkUtil/lambda$2$Type`,949),J(950,1,dU,tle),Q.Cd=function(e){Jue(this.a,this.b,L(e,135))},Q.a=0,Q.b=0,B(Eq,`ElkUtil/lambda$3$Type`,950),J(951,1,dU,$ne),Q.Cd=function(e){Yye(this.a,L(e,377))},B(Eq,`ElkUtil/lambda$4$Type`,951),J(325,1,{34:1,325:1},rg),Q.Fd=function(e){return Zde(this,L(e,242))},Q.Fb=function(e){var t;return F(e,325)?(t=L(e,325),this.a==t.a):!1},Q.Hb=function(){return $O(this.a)},Q.Ib=function(){return this.a+` (exclusive)`},Q.a=0,B(Eq,`ExclusiveBounds/ExclusiveLowerBound`,325),J(1119,205,sG,il),Q.rf=function(e,t){var n,i,a,o,s,c,l,u,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E;for(t.Ug(`Fixed Layout`,1),o=L(Y(e,(PH(),NRt)),223),p=0,m=0,b=new UC((!e.a&&(e.a=new R(p7,e,10,11)),e.a));b.e!=b.i.gc();){for(v=L(TL(b),27),E=L(Y(v,(ZP(),N8)),8),E&&(oC(v,E.a,E.b),L(Y(v,Xzt),181).Hc((ZI(),I5))&&(h=L(Y(v,Qzt),8),h.a>0&&h.b>0&&wH(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 UC((!v.n&&(v.n=new R(f7,v,1,7)),v.n));u.e!=u.i.gc();)c=L(TL(u),135),E=L(Y(c,N8),8),E&&oC(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 UC((!v.c&&(v.c=new R(m7,v,9,9)),v.c));C.e!=C.i.gc();)for(S=L(TL(C),123),E=L(Y(S,N8),8),E&&oC(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 UC((!S.n&&(S.n=new R(f7,S,1,7)),S.n));l.e!=l.i.gc();)c=L(TL(l),135),E=L(Y(c,N8),8),E&&oC(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 zE(qC(OB(v).a.Kc(),new d));vB(a);)n=L(IA(a),74),f=Ict(n),p=r.Math.max(p,f.a),m=r.Math.max(m,f.b);for(i=new zE(qC(DB(v).a.Kc(),new d));vB(i);)n=L(IA(i),74),uk(Sz(n))!=e&&(f=Ict(n),p=r.Math.max(p,f.a),m=r.Math.max(m,f.b))}if(o==(_I(),A8))for(y=new UC((!e.a&&(e.a=new R(p7,e,10,11)),e.a));y.e!=y.i.gc();)for(v=L(TL(y),27),i=new zE(qC(OB(v).a.Kc(),new d));vB(i);)n=L(IA(i),74),s=Unt(n),s.b==0?FL(n,X6,null):FL(n,X6,s);Y_(Dw(Y(e,(ZP(),Zzt))))||(x=L(Y(e,$zt),107),_=p+x.b+x.c,g=m+x.d+x.a,wH(e,_,g,!0,!0)),t.Vg()},B(Eq,`FixedLayoutProvider`,1119),J(385,137,{3:1,423:1,385:1,96:1,137:1},al,lFe),Q.cg=function(e){var t,n,r,i,a,o,s,c,l;if(e)try{for(c=MV(e,`;,;`),a=c,o=0,s=a.length;o<s;++o){if(i=a[o],n=MV(i,`\\:`),r=Dot(ZM(),n[0]),!r)throw A(new rv(`Invalid option id: `+n[0]));if(l=fot(r,n[1]),l==null)throw A(new rv(`Invalid option value: `+n[1]));l==null?(!this.q&&(this.q=new ig),GA(this.q,r)):(!this.q&&(this.q=new ig),eO(this.q,r,l))}}catch(e){throw e=SP(e),F(e,103)?(t=e,A(new nHe(t))):A(e)}},Q.Ib=function(){return Ow(CA(mO((this.q?this.q:(OO(),OO(),WX)).vc().Oc(),new ol),Aj(new Jve,new Te,new ve,new ye,G(M(iZ,1),Z,108,0,[]))))};var PBt=B(Eq,`IndividualSpacings`,385);J(982,1,{},ol),Q.Kb=function(e){return Wwe(L(e,44))},B(Eq,`IndividualSpacings/lambda$0$Type`,982),J(718,1,{},Mbe),Q.c=0,B(Eq,`InstancePool`,718),J(1835,1,{},sl),B(Eq,`LoggedGraph`,1835),J(415,22,{3:1,34:1,22:1,415:1},pS);var FBt,IBt,LBt,RBt,zBt=GM(Eq,`LoggedGraph/Type`,415,yX,fAe,Sve),BBt;J(1063,1,{871:1},cl),Q.Ug=function(e,t){return!1},Q.Vg=function(){},Q.Wg=function(){return 0},Q.Xg=function(){return null},Q.Yg=function(){return null},Q.Zg=function(){return null},Q.$g=function(){return!1},Q._g=function(){return!1},Q.ah=function(){return!1},Q.bh=function(e){},Q.dh=function(e,t){},Q.eh=function(e){return this},Q.fh=function(e){},B(Eq,`NullElkProgressMonitor`,1063),J(42,1,{20:1,42:1},fS),Q.Jc=function(e){EA(this,e)},Q.Fb=function(e){var t,n,r;return F(e,42)?(n=L(e,42),t=this.a==null?n.a==null:RF(this.a,n.a),r=this.b==null?n.b==null:RF(this.b,n.b),t&&r):!1},Q.Hb=function(){var e,t,n=this.a==null?0:DN(this.a),r,i,a;return e=n&zU,t=n&-65536,a=this.b==null?0:DN(this.b),r=a&zU,i=a&-65536,e^i>>16&zU|t^r<<16},Q.Kc=function(){return new vh(this)},Q.Ib=function(){return this.a==null&&this.b==null?`pair(null,null)`:this.a==null?`pair(null,`+EI(this.b)+`)`:this.b==null?`pair(`+EI(this.a)+`,null)`:`pair(`+EI(this.a)+`,`+EI(this.b)+`)`},B(Eq,`Pair`,42),J(995,1,eU,vh),Q.Nb=function(e){eD(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 A(new Ig)},Q.Qb=function(){throw this.c&&this.a.b!=null?this.a.b=null:this.b&&this.a.a!=null&&(this.a.a=null),A(new jg)},Q.b=!1,Q.c=!1,B(Eq,`Pair/1`,995),J(455,1,{455:1},dwe),Q.Fb=function(e){return iO(this.a,L(e,455).a)&&iO(this.c,L(e,455).c)&&iO(this.d,L(e,455).d)&&iO(this.b,L(e,455).b)},Q.Hb=function(){return gF(G(M(mX,1),JH,1,5,[this.a,this.c,this.d,this.b]))},Q.Ib=function(){return`(`+this.a+qH+this.c+qH+this.d+qH+this.b+`)`},B(Eq,`Quadruple`,455),J(1108,205,sG,tl),Q.rf=function(e,t){var n,r,i,a,o;if(t.Ug(`Random Layout`,1),(!e.a&&(e.a=new R(p7,e,10,11)),e.a).i==0){t.Vg();return}a=L(Y(e,(iKe(),gBt)),17),i=a&&a.a!=0?new TA(a.a):new PI,n=X_(I(Y(e,pBt))),o=X_(I(Y(e,_Bt))),r=L(Y(e,mBt),107),nct(e,i,n,o,r),t.Vg()},B(Eq,`RandomLayoutProvider`,1108),J(240,1,{240:1},CT),Q.Fb=function(e){return iO(this.a,L(e,240).a)&&iO(this.b,L(e,240).b)&&iO(this.c,L(e,240).c)},Q.Hb=function(){return gF(G(M(mX,1),JH,1,5,[this.a,this.b,this.c]))},Q.Ib=function(){return`(`+this.a+qH+this.b+qH+this.c+`)`},B(Eq,`Triple`,240);var VBt;J(562,1,{}),Q.Lf=function(){return new N(this.f.i,this.f.j)},Q.of=function(e){return bTe(e,(PH(),o8))?Y(this.f,HBt):Y(this.f,e)},Q.Mf=function(){return new N(this.f.g,this.f.f)},Q.Nf=function(){return this.g},Q.pf=function(e){return oj(this.f,e)},Q.Of=function(e){MM(this.f,e.a),NM(this.f,e.b)},Q.Pf=function(e){jM(this.f,e.a),AM(this.f,e.b)},Q.Qf=function(e){this.g=e},Q.g=0;var HBt;B(zJ,`ElkGraphAdapters/AbstractElkGraphElementAdapter`,562),J(563,1,{853:1},yh),Q.Rf=function(){var e,t;if(!this.b)for(this.b=Xk(oO(this.a).i),t=new UC(oO(this.a));t.e!=t.i.gc();)e=L(TL(t),135),FC(this.b,new K_(e));return this.b},Q.b=null,B(zJ,`ElkGraphAdapters/ElkEdgeAdapter`,563),J(289,562,{},G_),Q.Sf=function(){return DYe(this)},Q.a=null,B(zJ,`ElkGraphAdapters/ElkGraphAdapter`,289),J(640,562,{187:1},K_),B(zJ,`ElkGraphAdapters/ElkLabelAdapter`,640),J(639,562,{695:1},epe),Q.Rf=function(){return TYe(this)},Q.Vf=function(){var e;return e=L(Y(this.f,(PH(),Z6)),140),!e&&(e=new f_),e},Q.Xf=function(){return EYe(this)},Q.Zf=function(e){var t=new ET(e);FL(this.f,(PH(),Z6),t)},Q.$f=function(e){FL(this.f,(PH(),a8),new Lve(e))},Q.Tf=function(){return this.d},Q.Uf=function(){var e,t;if(!this.a)for(this.a=new ag,t=new zE(qC(DB(L(this.f,27)).a.Kc(),new d));vB(t);)e=L(IA(t),74),FC(this.a,new yh(e));return this.a},Q.Wf=function(){var e,t;if(!this.c)for(this.c=new ag,t=new zE(qC(OB(L(this.f,27)).a.Kc(),new d));vB(t);)e=L(IA(t),74),FC(this.c,new yh(e));return this.c},Q.Yf=function(){return jO(L(this.f,27)).i!=0||Y_(Dw(L(this.f,27).of((PH(),J6))))},Q._f=function(){uFe(this,(Ab(),VBt))},Q.a=null,Q.b=null,Q.c=null,Q.d=null,Q.e=null,B(zJ,`ElkGraphAdapters/ElkNodeAdapter`,639),J(1284,562,{852:1},bh),Q.Rf=function(){return BYe(this)},Q.Uf=function(){var e,t;if(!this.a)for(this.a=hw(L(this.f,123).hh().i),t=new UC(L(this.f,123).hh());t.e!=t.i.gc();)e=L(TL(t),74),FC(this.a,new yh(e));return this.a},Q.Wf=function(){var e,t;if(!this.c)for(this.c=hw(L(this.f,123).ih().i),t=new UC(L(this.f,123).ih());t.e!=t.i.gc();)e=L(TL(t),74),FC(this.c,new yh(e));return this.c},Q.ag=function(){return L(L(this.f,123).of((PH(),l8)),64)},Q.bg=function(){var e,t,n,r=nk(L(this.f,123)),i,a,o,s;for(n=new UC(L(this.f,123).ih());n.e!=n.i.gc();)for(e=L(TL(n),74),s=new UC((!e.c&&(e.c=new $w(r7,e,5,8)),e.c));s.e!=s.i.gc();)if(o=L(TL(s),84),hM(lz(o),r)||lz(o)==r&&Y_(Dw(Y(e,(PH(),BRt)))))return!0;for(t=new UC(L(this.f,123).hh());t.e!=t.i.gc();)for(e=L(TL(t),74),a=new UC((!e.b&&(e.b=new $w(r7,e,4,7)),e.b));a.e!=a.i.gc();)if(i=L(TL(a),84),hM(lz(i),r))return!0;return!1},Q.a=null,Q.b=null,Q.c=null,B(zJ,`ElkGraphAdapters/ElkPortAdapter`,1284),J(1285,1,zW,el),Q.Ne=function(e,t){return Vet(L(e,123),L(t,123))},Q.Fb=function(e){return this===e},Q.Oe=function(){return new bm(this)},B(zJ,`ElkGraphAdapters/PortComparator`,1285);var Q5=YT(BJ,`EObject`),$5=YT(VJ,Bgt),e7=YT(VJ,Vgt),t7=YT(VJ,Hgt),n7=YT(VJ,`ElkShape`),r7=YT(VJ,Ugt),i7=YT(VJ,Wgt),a7=YT(VJ,Ggt),o7=YT(BJ,Kgt),s7=YT(BJ,`EFactory`),UBt,WBt=YT(BJ,qgt),c7=YT(BJ,`EPackage`),l7,GBt,KBt,qBt,u7,JBt,YBt,XBt,ZBt,d7,QBt,$Bt,f7=YT(VJ,Jgt),p7=YT(VJ,Ygt),m7=YT(VJ,Xgt);J(93,1,Zgt),Q.th=function(){return this.uh(),null},Q.uh=function(){return null},Q.vh=function(){return this.uh(),!1},Q.wh=function(){return!1},Q.xh=function(e){tP(this,e)},B(HJ,`BasicNotifierImpl`,93),J(99,93,n_t),Q.Yh=function(){return $S(this)},Q.yh=function(e,t){return e},Q.zh=function(){throw A(new Ng)},Q.Ah=function(e){var t;return t=ZL(L(sM(this.Dh(),this.Fh()),19)),this.Ph().Th(this,t.n,t.f,e)},Q.Bh=function(e,t){throw A(new Ng)},Q.Ch=function(e,t,n){return TV(this,e,t,n)},Q.Dh=function(){var e;return this.zh()&&(e=this.zh().Nk(),e)?e:this.ii()},Q.Eh=function(){return z3e(this)},Q.Fh=function(){throw A(new Ng)},Q.Gh=function(){var e,t=this.$h().Ok();return!t&&this.zh().Tk(t=(Nb(),e=ZTe(PV(this.Dh())),e==null?ZVt:new uw(this,e))),t},Q.Hh=function(e,t){return e},Q.Ih=function(e){return e.pk()?e.Lj():RI(this.Dh(),e)},Q.Jh=function(){var e=this.zh();return e?e.Qk():null},Q.Kh=function(){return this.zh()?this.zh().Nk():null},Q.Lh=function(e,t,n){return RL(this,e,t,n)},Q.Mh=function(e){return bj(this,e)},Q.Nh=function(e,t){return hMe(this,e,t)},Q.Oh=function(){var e=this.zh();return!!e&&e.Rk()},Q.Ph=function(){throw A(new Ng)},Q.Qh=function(){return uL(this)},Q.Rh=function(e,t,n,r){return PL(this,e,t,r)},Q.Sh=function(e,t,n){var r;return r=L(sM(this.Dh(),t),69),r.wk().zk(this,this.hi(),t-this.ji(),e,n)},Q.Th=function(e,t,n,r){return KO(this,e,t,r)},Q.Uh=function(e,t,n){var r;return r=L(sM(this.Dh(),t),69),r.wk().Ak(this,this.hi(),t-this.ji(),e,n)},Q.Vh=function(){return!!this.zh()&&!!this.zh().Pk()},Q.Wh=function(e){return jqe(this,e)},Q.Xh=function(e){return TEe(this,e)},Q.Zh=function(e){return mst(this,e)},Q.$h=function(){throw A(new Ng)},Q._h=function(){return this.zh()?this.zh().Pk():null},Q.ai=function(){return uL(this)},Q.bi=function(e,t){h2e(this,e,t)},Q.ci=function(e){this.$h().Sk(e)},Q.di=function(e){this.$h().Vk(e)},Q.ei=function(e){this.$h().Uk(e)},Q.fi=function(e,t){var n,r,i,a=this.Jh();return a&&e&&(t=LL(a.El(),this,t),a.Il(this)),r=this.Ph(),r&&((mtt(this,this.Ph(),this.Fh()).Bb&CW)==0?(t=(n=this.Fh(),n>=0?this.Ah(t):this.Ph().Th(this,-1-n,null,t)),t=this.Ch(null,-1,t)):(i=r.Qh(),i&&(e?!a&&i.Il(this):i.Hl(this)))),this.di(e),t},Q.gi=function(e){var t,n=this.Dh(),r,i,a=RI(n,e),o,s,c;if(t=this.ji(),a>=t)return L(e,69).wk().Dk(this,this.hi(),a-t);if(a<=-1){if(o=uH((Wz(),p9),n,e),o){if(Fb(),L(o,69).xk()||(o=Ik(Rj(p9,o))),i=(r=this.Ih(o),L(r>=0?this.Lh(r,!0,!0):dB(this,o,!0),160)),c=o.Ik(),c>1||c==-1)return L(L(i,220).Sl(e,!1),79)}else throw A(new rv(UJ+e.xe()+$gt))}else if(e.Jk())return r=this.Ih(e),L(r>=0?this.Lh(r,!1,!0):dB(this,e,!1),79);return s=new Dle(this,e),s},Q.hi=function(){return pFe(this)},Q.ii=function(){return(AD(),K7).S},Q.ji=function(){return MD(this.ii())},Q.ki=function(e){Vz(this,e)},Q.Ib=function(){return SB(this)},B(KJ,`BasicEObjectImpl`,99);var eVt;J(119,99,{110:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1}),Q.li=function(e){return fFe(this)[e]},Q.mi=function(e,t){PD(fFe(this),e,t)},Q.ni=function(e){PD(fFe(this),e,null)},Q.th=function(){return L(iP(this,4),129)},Q.uh=function(){throw A(new Ng)},Q.vh=function(){return!!(this.Db&4)},Q.zh=function(){throw A(new Ng)},Q.oi=function(e){lL(this,2,e)},Q.Bh=function(e,t){this.Db=t<<16|this.Db&255,this.oi(e)},Q.Dh=function(){return UO(this)},Q.Fh=function(){return this.Db>>16},Q.Gh=function(){var e,t;return Nb(),t=ZTe(PV((e=L(iP(this,16),29),e||this.ii()))),t==null?ZVt:new uw(this,t)},Q.wh=function(){return!(this.Db&1)},Q.Jh=function(){return L(iP(this,128),2034)},Q.Kh=function(){return L(iP(this,16),29)},Q.Oh=function(){return!!(this.Db&32)},Q.Ph=function(){return L(iP(this,2),54)},Q.Vh=function(){return!!(this.Db&64)},Q.$h=function(){throw A(new Ng)},Q._h=function(){return L(iP(this,64),288)},Q.ci=function(e){lL(this,16,e)},Q.di=function(e){lL(this,128,e)},Q.ei=function(e){lL(this,64,e)},Q.hi=function(){return cL(this)},Q.Db=0,B(KJ,`MinimalEObjectImpl`,119),J(120,119,{110:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1,120:1}),Q.oi=function(e){this.Cb=e},Q.Ph=function(){return this.Cb},B(KJ,`MinimalEObjectImpl/Container`,120),J(2083,120,{110:1,342:1,96:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1,120:1}),Q.Lh=function(e,t,n){return HYe(this,e,t,n)},Q.Uh=function(e,t,n){return y1e(this,e,t,n)},Q.Wh=function(e){return XOe(this,e)},Q.bi=function(e,t){OVe(this,e,t)},Q.ii=function(){return kH(),$Bt},Q.ki=function(e){zBe(this,e)},Q.nf=function(){return Mqe(this)},Q.gh=function(){return!this.o&&(this.o=new hj((kH(),d7),g7,this,0)),this.o},Q.of=function(e){return Y(this,e)},Q.pf=function(e){return oj(this,e)},Q.qf=function(e,t){return FL(this,e,t)},B(qJ,`EMapPropertyHolderImpl`,2083),J(572,120,{110:1,377:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1,120:1},ll),Q.Lh=function(e,t,n){switch(e){case 0:return this.a;case 1:return this.b}return RL(this,e,t,n)},Q.Wh=function(e){switch(e){case 0:return this.a!=0;case 1:return this.b!=0}return jqe(this,e)},Q.bi=function(e,t){switch(e){case 0:LM(this,j(I(t)));return;case 1:OM(this,j(I(t)));return}h2e(this,e,t)},Q.ii=function(){return kH(),GBt},Q.ki=function(e){switch(e){case 0:LM(this,0);return;case 1:OM(this,0);return}Vz(this,e)},Q.Ib=function(){var e;return this.Db&64?SB(this):(e=new XC(SB(this)),e.a+=` (x: `,Oy(e,this.a),e.a+=`, y: `,Oy(e,this.b),e.a+=`)`,e.a)},Q.a=0,Q.b=0,B(qJ,`ElkBendPointImpl`,572),J(739,2083,{110:1,342:1,167:1,96:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1,120:1}),Q.Lh=function(e,t,n){return tWe(this,e,t,n)},Q.Sh=function(e,t,n){return dz(this,e,t,n)},Q.Uh=function(e,t,n){return aBe(this,e,t,n)},Q.Wh=function(e){return Bze(this,e)},Q.bi=function(e,t){zZe(this,e,t)},Q.ii=function(){return kH(),JBt},Q.ki=function(e){uUe(this,e)},Q.jh=function(){return this.k},Q.kh=function(){return oO(this)},Q.Ib=function(){return lI(this)},Q.k=null,B(qJ,`ElkGraphElementImpl`,739),J(740,739,{110:1,342:1,167:1,422:1,96:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1,120:1}),Q.Lh=function(e,t,n){return HWe(this,e,t,n)},Q.Wh=function(e){return uGe(this,e)},Q.bi=function(e,t){BZe(this,e,t)},Q.ii=function(){return kH(),QBt},Q.ki=function(e){VGe(this,e)},Q.lh=function(){return this.f},Q.mh=function(){return this.g},Q.nh=function(){return this.i},Q.oh=function(){return this.j},Q.ph=function(e,t){aC(this,e,t)},Q.qh=function(e,t){oC(this,e,t)},Q.rh=function(e){MM(this,e)},Q.sh=function(e){NM(this,e)},Q.Ib=function(){return jz(this)},Q.f=0,Q.g=0,Q.i=0,Q.j=0,B(qJ,`ElkShapeImpl`,740),J(741,740,{110:1,342:1,84:1,167:1,422:1,96:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1,120:1}),Q.Lh=function(e,t,n){return OJe(this,e,t,n)},Q.Sh=function(e,t,n){return vZe(this,e,t,n)},Q.Uh=function(e,t,n){return yZe(this,e,t,n)},Q.Wh=function(e){return xVe(this,e)},Q.bi=function(e,t){d6e(this,e,t)},Q.ii=function(){return kH(),KBt},Q.ki=function(e){Kqe(this,e)},Q.hh=function(){return!this.d&&(this.d=new $w(i7,this,8,5)),this.d},Q.ih=function(){return!this.e&&(this.e=new $w(i7,this,7,4)),this.e},B(qJ,`ElkConnectableShapeImpl`,741),J(326,739,{110:1,342:1,74:1,167:1,326:1,96:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1,120:1},dl),Q.Ah=function(e){return MXe(this,e)},Q.Lh=function(e,t,n){switch(e){case 3:return tk(this);case 4:return!this.b&&(this.b=new $w(r7,this,4,7)),this.b;case 5:return!this.c&&(this.c=new $w(r7,this,5,8)),this.c;case 6:return!this.a&&(this.a=new R(a7,this,6,6)),this.a;case 7:return cw(),!this.b&&(this.b=new $w(r7,this,4,7)),!(this.b.i<=1&&(!this.c&&(this.c=new $w(r7,this,5,8)),this.c.i<=1));case 8:return cw(),!!gB(this);case 9:return cw(),!!cB(this);case 10:return cw(),!this.b&&(this.b=new $w(r7,this,4,7)),this.b.i!=0&&(!this.c&&(this.c=new $w(r7,this,5,8)),this.c.i!=0)}return tWe(this,e,t,n)},Q.Sh=function(e,t,n){var r;switch(t){case 3:return this.Cb&&(n=(r=this.Db>>16,r>=0?MXe(this,n):this.Cb.Th(this,-1-r,null,n))),jme(this,L(e,27),n);case 4:return!this.b&&(this.b=new $w(r7,this,4,7)),KI(this.b,e,n);case 5:return!this.c&&(this.c=new $w(r7,this,5,8)),KI(this.c,e,n);case 6:return!this.a&&(this.a=new R(a7,this,6,6)),KI(this.a,e,n)}return dz(this,e,t,n)},Q.Uh=function(e,t,n){switch(t){case 3:return jme(this,null,n);case 4:return!this.b&&(this.b=new $w(r7,this,4,7)),LL(this.b,e,n);case 5:return!this.c&&(this.c=new $w(r7,this,5,8)),LL(this.c,e,n);case 6:return!this.a&&(this.a=new R(a7,this,6,6)),LL(this.a,e,n)}return aBe(this,e,t,n)},Q.Wh=function(e){switch(e){case 3:return!!tk(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 $w(r7,this,4,7)),!(this.b.i<=1&&(!this.c&&(this.c=new $w(r7,this,5,8)),this.c.i<=1));case 8:return gB(this);case 9:return cB(this);case 10:return!this.b&&(this.b=new $w(r7,this,4,7)),this.b.i!=0&&(!this.c&&(this.c=new $w(r7,this,5,8)),this.c.i!=0)}return Bze(this,e)},Q.bi=function(e,t){switch(e){case 3:NB(this,L(t,27));return;case 4:!this.b&&(this.b=new $w(r7,this,4,7)),sH(this.b),!this.b&&(this.b=new $w(r7,this,4,7)),CD(this.b,L(t,16));return;case 5:!this.c&&(this.c=new $w(r7,this,5,8)),sH(this.c),!this.c&&(this.c=new $w(r7,this,5,8)),CD(this.c,L(t,16));return;case 6:!this.a&&(this.a=new R(a7,this,6,6)),sH(this.a),!this.a&&(this.a=new R(a7,this,6,6)),CD(this.a,L(t,16));return}zZe(this,e,t)},Q.ii=function(){return kH(),qBt},Q.ki=function(e){switch(e){case 3:NB(this,null);return;case 4:!this.b&&(this.b=new $w(r7,this,4,7)),sH(this.b);return;case 5:!this.c&&(this.c=new $w(r7,this,5,8)),sH(this.c);return;case 6:!this.a&&(this.a=new R(a7,this,6,6)),sH(this.a);return}uUe(this,e)},Q.Ib=function(){return Nit(this)},B(qJ,`ElkEdgeImpl`,326),J(452,2083,{110:1,342:1,166:1,452:1,96:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1,120:1},fl),Q.Ah=function(e){return vXe(this,e)},Q.Lh=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 LC(e7,this,5)),this.a;case 6:return yEe(this);case 7:return t?XL(this):this.i;case 8:return t?YL(this):this.f;case 9:return!this.g&&(this.g=new $w(a7,this,9,10)),this.g;case 10:return!this.e&&(this.e=new $w(a7,this,10,9)),this.e;case 11:return this.d}return HYe(this,e,t,n)},Q.Sh=function(e,t,n){var r,i,a;switch(t){case 6:return this.Cb&&(n=(i=this.Db>>16,i>=0?vXe(this,n):this.Cb.Th(this,-1-i,null,n))),Ame(this,L(e,74),n);case 9:return!this.g&&(this.g=new $w(a7,this,9,10)),KI(this.g,e,n);case 10:return!this.e&&(this.e=new $w(a7,this,10,9)),KI(this.e,e,n)}return a=L(sM((r=L(iP(this,16),29),r||(kH(),u7)),t),69),a.wk().zk(this,cL(this),t-MD((kH(),u7)),e,n)},Q.Uh=function(e,t,n){switch(t){case 5:return!this.a&&(this.a=new LC(e7,this,5)),LL(this.a,e,n);case 6:return Ame(this,null,n);case 9:return!this.g&&(this.g=new $w(a7,this,9,10)),LL(this.g,e,n);case 10:return!this.e&&(this.e=new $w(a7,this,10,9)),LL(this.e,e,n)}return y1e(this,e,t,n)},Q.Wh=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!!yEe(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 XOe(this,e)},Q.bi=function(e,t){switch(e){case 1:PM(this,j(I(t)));return;case 2:IM(this,j(I(t)));return;case 3:kM(this,j(I(t)));return;case 4:FM(this,j(I(t)));return;case 5:!this.a&&(this.a=new LC(e7,this,5)),sH(this.a),!this.a&&(this.a=new LC(e7,this,5)),CD(this.a,L(t,16));return;case 6:e5e(this,L(t,74));return;case 7:fN(this,L(t,84));return;case 8:dN(this,L(t,84));return;case 9:!this.g&&(this.g=new $w(a7,this,9,10)),sH(this.g),!this.g&&(this.g=new $w(a7,this,9,10)),CD(this.g,L(t,16));return;case 10:!this.e&&(this.e=new $w(a7,this,10,9)),sH(this.e),!this.e&&(this.e=new $w(a7,this,10,9)),CD(this.e,L(t,16));return;case 11:aRe(this,Ow(t));return}OVe(this,e,t)},Q.ii=function(){return kH(),u7},Q.ki=function(e){switch(e){case 1:PM(this,0);return;case 2:IM(this,0);return;case 3:kM(this,0);return;case 4:FM(this,0);return;case 5:!this.a&&(this.a=new LC(e7,this,5)),sH(this.a);return;case 6:e5e(this,null);return;case 7:fN(this,null);return;case 8:dN(this,null);return;case 9:!this.g&&(this.g=new $w(a7,this,9,10)),sH(this.g);return;case 10:!this.e&&(this.e=new $w(a7,this,10,9)),sH(this.e);return;case 11:aRe(this,null);return}zBe(this,e)},Q.Ib=function(){return x3e(this)},Q.b=0,Q.c=0,Q.d=null,Q.j=0,Q.k=0,B(qJ,`ElkEdgeSectionImpl`,452),J(158,120,{110:1,94:1,93:1,155:1,58:1,114:1,54:1,99:1,158:1,119:1,120:1}),Q.Lh=function(e,t,n){var r;return e==0?(!this.Ab&&(this.Ab=new R(j7,this,0,3)),this.Ab):Tj(this,e-MD(this.ii()),sM((r=L(iP(this,16),29),r||this.ii()),e),t,n)},Q.Sh=function(e,t,n){var r,i;return t==0?(!this.Ab&&(this.Ab=new R(j7,this,0,3)),KI(this.Ab,e,n)):(i=L(sM((r=L(iP(this,16),29),r||this.ii()),t),69),i.wk().zk(this,cL(this),t-MD(this.ii()),e,n))},Q.Uh=function(e,t,n){var r,i;return t==0?(!this.Ab&&(this.Ab=new R(j7,this,0,3)),LL(this.Ab,e,n)):(i=L(sM((r=L(iP(this,16),29),r||this.ii()),t),69),i.wk().Ak(this,cL(this),t-MD(this.ii()),e,n))},Q.Wh=function(e){var t;return e==0?!!this.Ab&&this.Ab.i!=0:cA(this,e-MD(this.ii()),sM((t=L(iP(this,16),29),t||this.ii()),e))},Q.Zh=function(e){return kct(this,e)},Q.bi=function(e,t){var n;if(e===0){!this.Ab&&(this.Ab=new R(j7,this,0,3)),sH(this.Ab),!this.Ab&&(this.Ab=new R(j7,this,0,3)),CD(this.Ab,L(t,16));return}OI(this,e-MD(this.ii()),sM((n=L(iP(this,16),29),n||this.ii()),e),t)},Q.di=function(e){lL(this,128,e)},Q.ii=function(){return RH(),BVt},Q.ki=function(e){var t;if(e===0){!this.Ab&&(this.Ab=new R(j7,this,0,3)),sH(this.Ab);return}zF(this,e-MD(this.ii()),sM((t=L(iP(this,16),29),t||this.ii()),e))},Q.pi=function(){this.Bb|=1},Q.qi=function(e){return EV(this,e)},Q.Bb=0,B(KJ,`EModelElementImpl`,158),J(720,158,{110:1,94:1,93:1,480:1,155:1,58:1,114:1,54:1,99:1,158:1,119:1,120:1},Vf),Q.ri=function(e,t){return Zot(this,e,t)},Q.si=function(e){var t,n,r,i,a;if(this.a!=bM(e)||e.Bb&256)throw A(new rv(i_t+e.zb+XJ));for(r=HO(e);mA(r.a).i!=0;){if(n=L(fH(r,0,(t=L(W(mA(r.a),0),89),a=t.c,F(a,90)?L(a,29):(RH(),t9))),29),vR(n))return i=bM(n).wi().si(n),L(i,54).ci(e),i;r=HO(n)}return(e.D==null?e.B:e.D)==`java.util.Map$Entry`?new Kye(e):new _ye(e)},Q.ti=function(e,t){return AH(this,e,t)},Q.Lh=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 Tj(this,e-MD((RH(),Q7)),sM((r=L(iP(this,16),29),r||Q7),e),t,n)},Q.Sh=function(e,t,n){var r,i;switch(t){case 0:return!this.Ab&&(this.Ab=new R(j7,this,0,3)),KI(this.Ab,e,n);case 1:return this.a&&(n=L(this.a,54).Th(this,4,c7,n)),rUe(this,L(e,241),n)}return i=L(sM((r=L(iP(this,16),29),r||(RH(),Q7)),t),69),i.wk().zk(this,cL(this),t-MD((RH(),Q7)),e,n)},Q.Uh=function(e,t,n){var r,i;switch(t){case 0:return!this.Ab&&(this.Ab=new R(j7,this,0,3)),LL(this.Ab,e,n);case 1:return rUe(this,null,n)}return i=L(sM((r=L(iP(this,16),29),r||(RH(),Q7)),t),69),i.wk().Ak(this,cL(this),t-MD((RH(),Q7)),e,n)},Q.Wh=function(e){var t;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return!!this.a}return cA(this,e-MD((RH(),Q7)),sM((t=L(iP(this,16),29),t||Q7),e))},Q.bi=function(e,t){var n;switch(e){case 0:!this.Ab&&(this.Ab=new R(j7,this,0,3)),sH(this.Ab),!this.Ab&&(this.Ab=new R(j7,this,0,3)),CD(this.Ab,L(t,16));return;case 1:t1e(this,L(t,241));return}OI(this,e-MD((RH(),Q7)),sM((n=L(iP(this,16),29),n||Q7),e),t)},Q.ii=function(){return RH(),Q7},Q.ki=function(e){var t;switch(e){case 0:!this.Ab&&(this.Ab=new R(j7,this,0,3)),sH(this.Ab);return;case 1:t1e(this,null);return}zF(this,e-MD((RH(),Q7)),sM((t=L(iP(this,16),29),t||Q7),e))};var h7,tVt,nVt;B(KJ,`EFactoryImpl`,720),J(1037,720,{110:1,2113:1,94:1,93:1,480:1,155:1,58:1,114:1,54:1,99:1,158:1,119:1,120:1},pl),Q.ri=function(e,t){switch(e.hk()){case 12:return L(t,149).Pg();case 13:return EI(t);default:throw A(new rv(YJ+e.xe()+XJ))}},Q.si=function(e){var t,n,r,i,a,o,s,c;switch(e.G==-1&&(e.G=(t=bM(e),t?BL(t.vi(),e):-1)),e.G){case 4:return a=new ml,a;case 6:return o=new __,o;case 7:return s=new v_,s;case 8:return r=new dl,r;case 9:return n=new ll,n;case 10:return i=new fl,i;case 11:return c=new hl,c;default:throw A(new rv(i_t+e.zb+XJ))}},Q.ti=function(e,t){switch(e.hk()){case 13:case 12:return null;default:throw A(new rv(YJ+e.xe()+XJ))}},B(qJ,`ElkGraphFactoryImpl`,1037),J(448,158,{110:1,94:1,93:1,155:1,197:1,58:1,114:1,54:1,99:1,158:1,119:1,120:1}),Q.Gh=function(){var e,t=(e=L(iP(this,16),29),ZTe(PV(e||this.ii())));return t==null?(Nb(),Nb(),ZVt):new Rpe(this,t)},Q.Lh=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.xe()}return Tj(this,e-MD(this.ii()),sM((r=L(iP(this,16),29),r||this.ii()),e),t,n)},Q.Wh=function(e){var t;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null}return cA(this,e-MD(this.ii()),sM((t=L(iP(this,16),29),t||this.ii()),e))},Q.bi=function(e,t){var n;switch(e){case 0:!this.Ab&&(this.Ab=new R(j7,this,0,3)),sH(this.Ab),!this.Ab&&(this.Ab=new R(j7,this,0,3)),CD(this.Ab,L(t,16));return;case 1:this.ui(Ow(t));return}OI(this,e-MD(this.ii()),sM((n=L(iP(this,16),29),n||this.ii()),e),t)},Q.ii=function(){return RH(),VVt},Q.ki=function(e){var t;switch(e){case 0:!this.Ab&&(this.Ab=new R(j7,this,0,3)),sH(this.Ab);return;case 1:this.ui(null);return}zF(this,e-MD(this.ii()),sM((t=L(iP(this,16),29),t||this.ii()),e))},Q.xe=function(){return this.zb},Q.ui=function(e){ON(this,e)},Q.Ib=function(){return PF(this)},Q.zb=null,B(KJ,`ENamedElementImpl`,448),J(184,448,{110:1,94:1,93:1,155:1,197:1,58:1,241:1,114:1,54:1,99:1,158:1,184:1,119:1,120:1,690:1},Gwe),Q.Ah=function(e){return SXe(this,e)},Q.Lh=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 ZE(this,F7,this)),this.rb;case 6:return!this.vb&&(this.vb=new Zw(c7,this,6,7)),this.vb;case 7:return t?this.Db>>16==7?L(this.Cb,241):null:IEe(this)}return Tj(this,e-MD((RH(),r9)),sM((r=L(iP(this,16),29),r||r9),e),t,n)},Q.Sh=function(e,t,n){var r,i,a;switch(t){case 0:return!this.Ab&&(this.Ab=new R(j7,this,0,3)),KI(this.Ab,e,n);case 4:return this.sb&&(n=L(this.sb,54).Th(this,1,s7,n)),SUe(this,L(e,480),n);case 5:return!this.rb&&(this.rb=new ZE(this,F7,this)),KI(this.rb,e,n);case 6:return!this.vb&&(this.vb=new Zw(c7,this,6,7)),KI(this.vb,e,n);case 7:return this.Cb&&(n=(i=this.Db>>16,i>=0?SXe(this,n):this.Cb.Th(this,-1-i,null,n))),TV(this,e,7,n)}return a=L(sM((r=L(iP(this,16),29),r||(RH(),r9)),t),69),a.wk().zk(this,cL(this),t-MD((RH(),r9)),e,n)},Q.Uh=function(e,t,n){var r,i;switch(t){case 0:return!this.Ab&&(this.Ab=new R(j7,this,0,3)),LL(this.Ab,e,n);case 4:return SUe(this,null,n);case 5:return!this.rb&&(this.rb=new ZE(this,F7,this)),LL(this.rb,e,n);case 6:return!this.vb&&(this.vb=new Zw(c7,this,6,7)),LL(this.vb,e,n);case 7:return TV(this,null,7,n)}return i=L(sM((r=L(iP(this,16),29),r||(RH(),r9)),t),69),i.wk().Ak(this,cL(this),t-MD((RH(),r9)),e,n)},Q.Wh=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!!IEe(this)}return cA(this,e-MD((RH(),r9)),sM((t=L(iP(this,16),29),t||r9),e))},Q.Zh=function(e){return B5e(this,e)||kct(this,e)},Q.bi=function(e,t){var n;switch(e){case 0:!this.Ab&&(this.Ab=new R(j7,this,0,3)),sH(this.Ab),!this.Ab&&(this.Ab=new R(j7,this,0,3)),CD(this.Ab,L(t,16));return;case 1:ON(this,Ow(t));return;case 2:AN(this,Ow(t));return;case 3:kN(this,Ow(t));return;case 4:Dz(this,L(t,480));return;case 5:!this.rb&&(this.rb=new ZE(this,F7,this)),sH(this.rb),!this.rb&&(this.rb=new ZE(this,F7,this)),CD(this.rb,L(t,16));return;case 6:!this.vb&&(this.vb=new Zw(c7,this,6,7)),sH(this.vb),!this.vb&&(this.vb=new Zw(c7,this,6,7)),CD(this.vb,L(t,16));return}OI(this,e-MD((RH(),r9)),sM((n=L(iP(this,16),29),n||r9),e),t)},Q.ei=function(e){var t,n;if(e&&this.rb)for(n=new UC(this.rb);n.e!=n.i.gc();)t=TL(n),F(t,364)&&(L(t,364).w=null);lL(this,64,e)},Q.ii=function(){return RH(),r9},Q.ki=function(e){var t;switch(e){case 0:!this.Ab&&(this.Ab=new R(j7,this,0,3)),sH(this.Ab);return;case 1:ON(this,null);return;case 2:AN(this,null);return;case 3:kN(this,null);return;case 4:Dz(this,null);return;case 5:!this.rb&&(this.rb=new ZE(this,F7,this)),sH(this.rb);return;case 6:!this.vb&&(this.vb=new Zw(c7,this,6,7)),sH(this.vb);return}zF(this,e-MD((RH(),r9)),sM((t=L(iP(this,16),29),t||r9),e))},Q.pi=function(){wR(this)},Q.vi=function(){return!this.rb&&(this.rb=new ZE(this,F7,this)),this.rb},Q.wi=function(){return this.sb},Q.xi=function(){return this.ub},Q.yi=function(){return this.xb},Q.zi=function(){return this.yb},Q.Ai=function(e){this.ub=e},Q.Ib=function(){var e;return this.Db&64?PF(this):(e=new XC(PF(this)),e.a+=` (nsURI: `,kS(e,this.yb),e.a+=`, nsPrefix: `,kS(e,this.xb),e.a+=`)`,e.a)},Q.xb=null,Q.yb=null;var rVt;B(KJ,`EPackageImpl`,184),J(569,184,{110:1,2115:1,569:1,94:1,93:1,155:1,197:1,58:1,241:1,114:1,54:1,99:1,158:1,184:1,119:1,120:1,690:1},G3e),Q.q=!1,Q.r=!1;var iVt=!1;B(qJ,`ElkGraphPackageImpl`,569),J(366,740,{110:1,342:1,167:1,135:1,422:1,366:1,96:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1,120:1},ml),Q.Ah=function(e){return yXe(this,e)},Q.Lh=function(e,t,n){switch(e){case 7:return LEe(this);case 8:return this.a}return HWe(this,e,t,n)},Q.Sh=function(e,t,n){var r;return t===7?(this.Cb&&(n=(r=this.Db>>16,r>=0?yXe(this,n):this.Cb.Th(this,-1-r,null,n))),nxe(this,L(e,167),n)):dz(this,e,t,n)},Q.Uh=function(e,t,n){return t==7?nxe(this,null,n):aBe(this,e,t,n)},Q.Wh=function(e){switch(e){case 7:return!!LEe(this);case 8:return!tT(``,this.a)}return uGe(this,e)},Q.bi=function(e,t){switch(e){case 7:I5e(this,L(t,167));return;case 8:ULe(this,Ow(t));return}BZe(this,e,t)},Q.ii=function(){return kH(),YBt},Q.ki=function(e){switch(e){case 7:I5e(this,null);return;case 8:ULe(this,``);return}VGe(this,e)},Q.Ib=function(){return p0e(this)},Q.a=``,B(qJ,`ElkLabelImpl`,366),J(207,741,{110:1,342:1,84:1,167:1,27:1,422:1,207:1,96:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1,120:1},__),Q.Ah=function(e){return NXe(this,e)},Q.Lh=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 uk(this);case 12:return!this.b&&(this.b=new R(i7,this,12,3)),this.b;case 13:return cw(),!this.a&&(this.a=new R(p7,this,10,11)),this.a.i>0}return OJe(this,e,t,n)},Q.Sh=function(e,t,n){var r;switch(t){case 9:return!this.c&&(this.c=new R(m7,this,9,9)),KI(this.c,e,n);case 10:return!this.a&&(this.a=new R(p7,this,10,11)),KI(this.a,e,n);case 11:return this.Cb&&(n=(r=this.Db>>16,r>=0?NXe(this,n):this.Cb.Th(this,-1-r,null,n))),yhe(this,L(e,27),n);case 12:return!this.b&&(this.b=new R(i7,this,12,3)),KI(this.b,e,n)}return vZe(this,e,t,n)},Q.Uh=function(e,t,n){switch(t){case 9:return!this.c&&(this.c=new R(m7,this,9,9)),LL(this.c,e,n);case 10:return!this.a&&(this.a=new R(p7,this,10,11)),LL(this.a,e,n);case 11:return yhe(this,null,n);case 12:return!this.b&&(this.b=new R(i7,this,12,3)),LL(this.b,e,n)}return yZe(this,e,t,n)},Q.Wh=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!!uk(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 xVe(this,e)},Q.bi=function(e,t){switch(e){case 9:!this.c&&(this.c=new R(m7,this,9,9)),sH(this.c),!this.c&&(this.c=new R(m7,this,9,9)),CD(this.c,L(t,16));return;case 10:!this.a&&(this.a=new R(p7,this,10,11)),sH(this.a),!this.a&&(this.a=new R(p7,this,10,11)),CD(this.a,L(t,16));return;case 11:IB(this,L(t,27));return;case 12:!this.b&&(this.b=new R(i7,this,12,3)),sH(this.b),!this.b&&(this.b=new R(i7,this,12,3)),CD(this.b,L(t,16));return}d6e(this,e,t)},Q.ii=function(){return kH(),XBt},Q.ki=function(e){switch(e){case 9:!this.c&&(this.c=new R(m7,this,9,9)),sH(this.c);return;case 10:!this.a&&(this.a=new R(p7,this,10,11)),sH(this.a);return;case 11:IB(this,null);return;case 12:!this.b&&(this.b=new R(i7,this,12,3)),sH(this.b);return}Kqe(this,e)},Q.Ib=function(){return Het(this)},B(qJ,`ElkNodeImpl`,207),J(193,741,{110:1,342:1,84:1,167:1,123:1,422:1,193:1,96:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1,120:1},v_),Q.Ah=function(e){return bXe(this,e)},Q.Lh=function(e,t,n){return e==9?nk(this):OJe(this,e,t,n)},Q.Sh=function(e,t,n){var r;return t===9?(this.Cb&&(n=(r=this.Db>>16,r>=0?bXe(this,n):this.Cb.Th(this,-1-r,null,n))),Mme(this,L(e,27),n)):vZe(this,e,t,n)},Q.Uh=function(e,t,n){return t==9?Mme(this,null,n):yZe(this,e,t,n)},Q.Wh=function(e){return e==9?!!nk(this):xVe(this,e)},Q.bi=function(e,t){if(e===9){t5e(this,L(t,27));return}d6e(this,e,t)},Q.ii=function(){return kH(),ZBt},Q.ki=function(e){if(e===9){t5e(this,null);return}Kqe(this,e)},Q.Ib=function(){return Uet(this)},B(qJ,`ElkPortImpl`,193);var aVt=YT(tY,`BasicEMap/Entry`);J(1122,120,{110:1,44:1,94:1,93:1,136:1,58:1,114:1,54:1,99:1,119:1,120:1},hl),Q.Fb=function(e){return this===e},Q.ld=function(){return this.b},Q.Hb=function(){return ow(this)},Q.Di=function(e){WLe(this,L(e,149))},Q.Lh=function(e,t,n){switch(e){case 0:return this.b;case 1:return this.c}return RL(this,e,t,n)},Q.Wh=function(e){switch(e){case 0:return!!this.b;case 1:return this.c!=null}return jqe(this,e)},Q.bi=function(e,t){switch(e){case 0:WLe(this,L(t,149));return;case 1:HLe(this,t);return}h2e(this,e,t)},Q.ii=function(){return kH(),d7},Q.ki=function(e){switch(e){case 0:WLe(this,null);return;case 1:HLe(this,null);return}Vz(this,e)},Q.Bi=function(){var e;return this.a==-1&&(e=this.b,this.a=e?DN(e):0),this.a},Q.md=function(){return this.c},Q.Ci=function(e){this.a=e},Q.nd=function(e){var t=this.c;return HLe(this,e),t},Q.Ib=function(){var e;return this.Db&64?SB(this):(e=new Ov,MS(MS(MS(e,this.b?this.b.Pg():YH),iK),YC(this.c)),e.a)},Q.a=-1,Q.c=null;var g7=B(qJ,`ElkPropertyToValueMapEntryImpl`,1122);J(996,1,{},vl),B(rY,`JsonAdapter`,996),J(216,63,NU,lv),B(rY,`JsonImportException`,216),J(868,1,{},wXe),B(rY,`JsonImporter`,868),J(903,1,{},nle),B(rY,`JsonImporter/lambda$0$Type`,903),J(904,1,{},rle),B(rY,`JsonImporter/lambda$1$Type`,904),J(912,1,{},ere),B(rY,`JsonImporter/lambda$10$Type`,912),J(914,1,{},ile),B(rY,`JsonImporter/lambda$11$Type`,914),J(915,1,{},ale),B(rY,`JsonImporter/lambda$12$Type`,915),J(921,1,{},_we),B(rY,`JsonImporter/lambda$13$Type`,921),J(920,1,{},vwe),B(rY,`JsonImporter/lambda$14$Type`,920),J(916,1,{},ole),B(rY,`JsonImporter/lambda$15$Type`,916),J(917,1,{},sle),B(rY,`JsonImporter/lambda$16$Type`,917),J(918,1,{},cle),B(rY,`JsonImporter/lambda$17$Type`,918),J(919,1,{},lle),B(rY,`JsonImporter/lambda$18$Type`,919),J(924,1,{},tre),B(rY,`JsonImporter/lambda$19$Type`,924),J(905,1,{},nre),B(rY,`JsonImporter/lambda$2$Type`,905),J(922,1,{},rre),B(rY,`JsonImporter/lambda$20$Type`,922),J(923,1,{},ire),B(rY,`JsonImporter/lambda$21$Type`,923),J(927,1,{},are),B(rY,`JsonImporter/lambda$22$Type`,927),J(925,1,{},ore),B(rY,`JsonImporter/lambda$23$Type`,925),J(926,1,{},xh),B(rY,`JsonImporter/lambda$24$Type`,926),J(929,1,{},Sh),B(rY,`JsonImporter/lambda$25$Type`,929),J(928,1,{},Ch),B(rY,`JsonImporter/lambda$26$Type`,928),J(930,1,dU,ule),Q.Cd=function(e){oPe(this.b,this.a,Ow(e))},B(rY,`JsonImporter/lambda$27$Type`,930),J(931,1,dU,dle),Q.Cd=function(e){sPe(this.b,this.a,Ow(e))},B(rY,`JsonImporter/lambda$28$Type`,931),J(932,1,{},fle),B(rY,`JsonImporter/lambda$29$Type`,932),J(908,1,{},wh),B(rY,`JsonImporter/lambda$3$Type`,908),J(933,1,{},ple),B(rY,`JsonImporter/lambda$30$Type`,933),J(934,1,{},Th),B(rY,`JsonImporter/lambda$31$Type`,934),J(935,1,{},Eh),B(rY,`JsonImporter/lambda$32$Type`,935),J(936,1,{},Dh),B(rY,`JsonImporter/lambda$33$Type`,936),J(937,1,{},Oh),B(rY,`JsonImporter/lambda$34$Type`,937),J(870,1,{},kh),B(rY,`JsonImporter/lambda$35$Type`,870),J(941,1,{},Dve),B(rY,`JsonImporter/lambda$36$Type`,941),J(938,1,dU,Ah),Q.Cd=function(e){jje(this.a,L(e,377))},B(rY,`JsonImporter/lambda$37$Type`,938),J(939,1,dU,mle),Q.Cd=function(e){Cle(this.a,this.b,L(e,166))},B(rY,`JsonImporter/lambda$38$Type`,939),J(940,1,dU,hle),Q.Cd=function(e){wle(this.a,this.b,L(e,166))},B(rY,`JsonImporter/lambda$39$Type`,940),J(906,1,{},jh),B(rY,`JsonImporter/lambda$4$Type`,906),J(942,1,dU,Mh),Q.Cd=function(e){Mje(this.a,L(e,8))},B(rY,`JsonImporter/lambda$40$Type`,942),J(907,1,{},Nh),B(rY,`JsonImporter/lambda$5$Type`,907),J(911,1,{},Ph),B(rY,`JsonImporter/lambda$6$Type`,911),J(909,1,{},Fh),B(rY,`JsonImporter/lambda$7$Type`,909),J(910,1,{},Ih),B(rY,`JsonImporter/lambda$8$Type`,910),J(913,1,{},Lh),B(rY,`JsonImporter/lambda$9$Type`,913),J(961,1,dU,sre),Q.Cd=function(e){ID(this.a,new OD(Ow(e)))},B(rY,`JsonMetaDataConverter/lambda$0$Type`,961),J(962,1,dU,Rh),Q.Cd=function(e){gSe(this.a,L(e,245))},B(rY,`JsonMetaDataConverter/lambda$1$Type`,962),J(963,1,dU,zh),Q.Cd=function(e){cDe(this.a,L(e,143))},B(rY,`JsonMetaDataConverter/lambda$2$Type`,963),J(964,1,dU,Bh),Q.Cd=function(e){_Se(this.a,L(e,170))},B(rY,`JsonMetaDataConverter/lambda$3$Type`,964),J(245,22,{3:1,34:1,22:1,245:1},mS);var _7,v7,oVt,y7,b7,x7,sVt,cVt,S7=GM(aG,`GraphFeature`,245,yX,dIe,zve),lVt;J(11,1,{34:1,149:1},Hh,Vw,RS,fC),Q.Fd=function(e){return Qde(this,L(e,149))},Q.Fb=function(e){return bTe(this,e)},Q.Sg=function(){return wL(this)},Q.Pg=function(){return this.b},Q.Hb=function(){return KP(this.b)},Q.Ib=function(){return this.b},B(aG,`Property`,11),J(671,1,zW,Vh),Q.Ne=function(e,t){return hWe(this,L(e,96),L(t,96))},Q.Fb=function(e){return this===e},Q.Oe=function(){return new bm(this)},B(aG,`PropertyHolderComparator`,671),J(709,1,eU,cre),Q.Nb=function(e){eD(this,e)},Q.Pb=function(){return uPe(this)},Q.Qb=function(){Sae()},Q.Ob=function(){return!!this.a},B(sY,`ElkGraphUtil/AncestorIterator`,709);var uVt=YT(tY,`EList`);J(70,56,{20:1,31:1,56:1,16:1,15:1,70:1,61:1}),Q.bd=function(e,t){KF(this,e,t)},Q.Fc=function(e){return uj(this,e)},Q.cd=function(e,t){return VBe(this,e,t)},Q.Gc=function(e){return CD(this,e)},Q.Ii=function(){return new pw(this)},Q.Ji=function(){return new mw(this)},Q.Ki=function(e){return eN(this,e)},Q.Li=function(){return!0},Q.Mi=function(e,t){},Q.Ni=function(){},Q.Oi=function(e,t){MNe(this,e,t)},Q.Pi=function(e,t,n){},Q.Qi=function(e,t){},Q.Ri=function(e,t,n){},Q.Fb=function(e){return H9e(this,e)},Q.Hb=function(){return wBe(this)},Q.Si=function(){return!1},Q.Kc=function(){return new UC(this)},Q.ed=function(){return new fw(this)},Q.fd=function(e){var t=this.gc();if(e<0||e>t)throw A(new eT(e,t));return new pD(this,e)},Q.Ui=function(e,t){this.Ti(e,this.dd(t))},Q.Mc=function(e){return Xj(this,e)},Q.Wi=function(e,t){return t},Q.hd=function(e,t){return VL(this,e,t)},Q.Ib=function(){return QWe(this)},Q.Yi=function(){return!0},Q.Zi=function(e,t){return GP(this,t)},B(tY,`AbstractEList`,70),J(66,70,uY,xl,vM,oze),Q.Ei=function(e,t){return fz(this,e,t)},Q.Fi=function(e){return JJe(this,e)},Q.Gi=function(e,t){IF(this,e,t)},Q.Hi=function(e){RA(this,e)},Q.$i=function(e){return hPe(this,e)},Q.$b=function(){zA(this)},Q.Hc=function(e){return WR(this,e)},Q.Xb=function(e){return W(this,e)},Q._i=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.aj(t),r!=null&&jV(r,0,this.g,0,this.i))},Q.dd=function(e){return sXe(this,e)},Q.dc=function(){return this.i==0},Q.Ti=function(e,t){return R4e(this,e,t)},Q.aj=function(e){return U(mX,JH,1,e,5,1)},Q.Vi=function(e){return this.g[e]},Q.gd=function(e){return OR(this,e)},Q.Xi=function(e,t){return gFe(this,e,t)},Q.gc=function(){return this.i},Q.Pc=function(){return _Ae(this)},Q.Qc=function(e){return LGe(this,e)},Q.i=0;var dVt=B(tY,`BasicEList`,66),fVt=YT(tY,`TreeIterator`);J(708,66,I_t),Q.Nb=function(e){eD(this,e)},Q.Ob=function(){return this.g==null&&!this.c?MEe(this):this.g==null||this.i!=0&&L(this.g[this.i-1],51).Ob()},Q.Pb=function(){return EB(this)},Q.Qb=function(){if(!this.e)throw A(new iv(`There is no valid object to remove.`));this.e.Qb()},Q.c=!1,B(tY,`AbstractTreeIterator`,708),J(700,708,I_t,Nue),Q.bj=function(e){var t=L(e,58).Gh().Kc();return F(t,287)&&L(t,287).wl(new yl),t},B(sY,`ElkGraphUtil/PropertiesSkippingTreeIterator`,700),J(965,1,{},yl),B(sY,`ElkGraphUtil/PropertiesSkippingTreeIterator/1`,965);var C7,pVt,w7=B(sY,`ElkReflect`,null);J(901,1,kJ,bl),Q.Rg=function(e){return fk(),pDe(L(e,181))},B(sY,`ElkReflect/lambda$0$Type`,901);var T7;YT(tY,`ResourceLocator`),J(1065,1,{}),B(tY,`DelegatingResourceLocator`,1065),J(1066,1065,{}),B(`org.eclipse.emf.common`,`EMFPlugin`,1066);var mVt=YT(_vt,`Adapter`),hVt=YT(_vt,`Notification`);J(1174,1,vvt),Q.cj=function(){return this.d},Q.dj=function(e){},Q.ej=function(e){this.d=e},Q.fj=function(e){this.d==e&&(this.d=null)},Q.d=null,B(HJ,`AdapterImpl`,1174),J(2093,70,yvt),Q.Ei=function(e,t){return SGe(this,e,t)},Q.Fi=function(e){var t,n,r;if(++this.j,e.dc())return!1;for(t=this.Ej(),r=e.Kc();r.Ob();)n=r.Pb(),this.rj(this.Zi(t,n)),++t;return!0},Q.Gi=function(e,t){Ome(this,e,t)},Q.Hi=function(e){JSe(this,e)},Q.pj=function(){return this.sj()},Q.$b=function(){Rw(this,this.Ej(),this.Fj())},Q.Hc=function(e){return this.uj(e)},Q.Ic=function(e){return this.vj(e)},Q.qj=function(e,t){this.Bj().Um()},Q.rj=function(e){this.Bj().Um()},Q.sj=function(){return this.Bj()},Q.tj=function(){this.Bj().Um()},Q.uj=function(e){return this.Bj().Um()},Q.vj=function(e){return this.Bj().Um()},Q.wj=function(e){return this.Bj().Um()},Q.xj=function(e){return this.Bj().Um()},Q.yj=function(){return this.Bj().Um()},Q.zj=function(e){return this.Bj().Um()},Q.Aj=function(){return this.Bj().Um()},Q.Cj=function(e){return this.Bj().Um()},Q.Dj=function(e,t){return this.Bj().Um()},Q.Ej=function(){return this.Bj().Um()},Q.Fj=function(){return this.Bj().Um()},Q.Gj=function(e){return this.Bj().Um()},Q.Hj=function(){return this.Bj().Um()},Q.Fb=function(e){return this.wj(e)},Q.Xb=function(e){return this.Wi(e,this.xj(e))},Q.Hb=function(){return this.yj()},Q.dd=function(e){return this.zj(e)},Q.dc=function(){return this.Aj()},Q.Ti=function(e,t){return Q$e(this,e,t)},Q.Vi=function(e){return this.xj(e)},Q.gd=function(e){return XT(this,e)},Q.Mc=function(e){var t=this.dd(e);return t>=0&&(this.gd(t),!0)},Q.Xi=function(e,t){return this.Dj(e,this.Zi(e,t))},Q.gc=function(){return this.Ej()},Q.Pc=function(){return this.Fj()},Q.Qc=function(e){return this.Gj(e)},Q.Ib=function(){return this.Hj()},B(tY,`DelegatingEList`,2093),J(2094,2093,yvt),Q.Ei=function(e,t){return Gnt(this,e,t)},Q.Fi=function(e){return this.Ei(this.Ej(),e)},Q.Gi=function(e,t){K3e(this,e,t)},Q.Hi=function(e){_3e(this,e)},Q.Li=function(){return!this.Mj()},Q.$b=function(){cH(this)},Q.Ij=function(e,t,n,r,i){return new vTe(this,e,t,n,r,i)},Q.Jj=function(e){tP(this.jj(),e)},Q.Kj=function(){return null},Q.Lj=function(){return-1},Q.jj=function(){return null},Q.Mj=function(){return!1},Q.Nj=function(e,t){return t},Q.Oj=function(e,t){return t},Q.Pj=function(){return!1},Q.Qj=function(){return!this.Aj()},Q.Ti=function(e,t){var n,r;return this.Pj()?(r=this.Qj(),n=Q$e(this,e,t),this.Jj(this.Ij(7,kF(t),n,e,r)),n):Q$e(this,e,t)},Q.gd=function(e){var t,n,r,i;return this.Pj()?(n=null,r=this.Qj(),t=this.Ij(4,i=XT(this,e),null,e,r),this.Mj()&&i&&(n=this.Oj(i,n)),n?(n.nj(t),n.oj()):this.Jj(t),i):(i=XT(this,e),this.Mj()&&i&&(n=this.Oj(i,null),n&&n.oj()),i)},Q.Xi=function(e,t){return Knt(this,e,t)},B(HJ,`DelegatingNotifyingListImpl`,2094),J(152,1,_Y),Q.nj=function(e){return CQe(this,e)},Q.oj=function(){nFe(this)},Q.gj=function(){return this.d},Q.Kj=function(){return null},Q.Rj=function(){return null},Q.hj=function(e){return-1},Q.ij=function(){return R7e(this)},Q.jj=function(){return null},Q.kj=function(){return z7e(this)},Q.lj=function(){return this.o<0?this.o<-2?-2-this.o-1:-1:this.o},Q.Sj=function(){return!1},Q.mj=function(e){var t,n,r,i,a,o,s,c,l,u,d;switch(this.d){case 1:case 2:switch(i=e.gj(),i){case 1:case 2:if(a=e.jj(),P(a)===P(this.jj())&&this.hj(null)==e.hj(null))return this.g=e.ij(),e.gj()==1&&(this.d=1),!0}case 4:if(i=e.gj(),i===4&&(a=e.jj(),P(a)===P(this.jj())&&this.hj(null)==e.hj(null)))return l=pot(this),c=this.o<0?this.o<-2?-2-this.o-1:-1:this.o,o=e.lj(),this.d=6,d=new vM(2),c<=o?(uj(d,this.n),uj(d,e.kj()),this.g=G(M(q9,1),$U,28,15,[this.o=c,o+1])):(uj(d,e.kj()),uj(d,this.n),this.g=G(M(q9,1),$U,28,15,[this.o=o,c])),this.n=d,l||(this.o=-2-this.o-1),!0;break;case 6:if(i=e.gj(),i===4&&(a=e.jj(),P(a)===P(this.jj())&&this.hj(null)==e.hj(null))){for(l=pot(this),o=e.lj(),u=L(this.g,53),r=U(q9,$U,28,u.length+1,15,1),t=0;t<u.length&&(s=u[t],s<=o);)r[t++]=s,++o;for(n=L(this.n,15),n.bd(t,e.kj()),r[t]=o;++t<r.length;)r[t]=u[t-1];return this.g=r,l||(this.o=-2-r[0]),!0}}return!1},Q.Ib=function(){var e,t,n,r=new XC(Dy(this.Rm)+`@`+(t=DN(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:ky(r,this.d)}if(ott(this)&&(r.a+=`, touch: true`),r.a+=`, position: `,ky(r,this.o<0?this.o<-2?-2-this.o-1:-1:this.o),r.a+=`, notifier: `,OS(r,this.jj()),r.a+=`, feature: `,OS(r,this.Kj()),r.a+=`, oldValue: `,OS(r,z7e(this)),r.a+=`, newValue: `,this.d==6&&F(this.g,53)){for(n=L(this.g,53),r.a+=`[`,e=0;e<n.length;)r.a+=n[e],++e<n.length&&(r.a+=qH);r.a+=`]`}else OS(r,R7e(this));return r.a+=`, isTouch: `,Ay(r,ott(this)),r.a+=`, wasSet: `,Ay(r,pot(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(HJ,`NotificationImpl`,152),J(1188,152,_Y,vTe),Q.Kj=function(){return this.a.Kj()},Q.hj=function(e){return this.a.Lj()},Q.jj=function(){return this.a.jj()},B(HJ,`DelegatingNotifyingListImpl/1`,1188),J(251,66,uY,Sl,hy),Q.Fc=function(e){return xGe(this,L(e,378))},Q.nj=function(e){return xGe(this,e)},Q.oj=function(){var e,t,n;for(e=0;e<this.i;++e)t=L(this.g[e],378),n=t.jj(),n!=null&&t.gj()!=-1&&L(n,94).xh(t)},Q.aj=function(e){return U(hVt,JH,378,e,0,1)},B(HJ,`NotificationChainImpl`,251),J(1524,93,Zgt),Q.uh=function(){return this.e},Q.wh=function(){return!!(this.f&1)},Q.f=1,B(HJ,`NotifierImpl`,1524),J(2091,66,uY),Q.Ei=function(e,t){return hrt(this,e,t)},Q.Fi=function(e){return this.Ei(this.i,e)},Q.Gi=function(e,t){v3e(this,e,t)},Q.Hi=function(e){I3e(this,e)},Q.Li=function(){return!this.Mj()},Q.$b=function(){sH(this)},Q.Ij=function(e,t,n,r,i){return new _Te(this,e,t,n,r,i)},Q.Jj=function(e){tP(this.jj(),e)},Q.Kj=function(){return null},Q.Lj=function(){return-1},Q.jj=function(){return null},Q.Mj=function(){return!1},Q.Tj=function(){return!1},Q.Nj=function(e,t){return t},Q.Oj=function(e,t){return t},Q.Pj=function(){return!1},Q.Qj=function(){return this.i!=0},Q.Ti=function(e,t){return ZF(this,e,t)},Q.gd=function(e){return QB(this,e)},Q.Xi=function(e,t){return qrt(this,e,t)},Q.Uj=function(e,t){return t},Q.Vj=function(e,t){return t},Q.Wj=function(e,t,n){return n},B(HJ,`NotifyingListImpl`,2091),J(1187,152,_Y,_Te),Q.Kj=function(){return this.a.Kj()},Q.hj=function(e){return this.a.Lj()},Q.jj=function(){return this.a.jj()},B(HJ,`NotifyingListImpl/1`,1187),J(966,66,uY,Fme),Q.Hc=function(e){return this.i>10?((!this.b||this.c.j!=this.a)&&(this.b=new iE(this),this.a=this.j),eb(this.b,e)):WR(this,e)},Q.Yi=function(){return!0},Q.a=0,B(tY,`AbstractEList/1`,966),J(302,77,gW,eT),B(tY,`AbstractEList/BasicIndexOutOfBoundsException`,302),J(37,1,eU,UC),Q.Nb=function(e){eD(this,e)},Q.Xj=function(){if(this.i.j!=this.f)throw A(new Pg)},Q.Yj=function(){return TL(this)},Q.Ob=function(){return this.e!=this.i.gc()},Q.Pb=function(){return this.Yj()},Q.Qb=function(){XR(this)},Q.e=0,Q.f=0,Q.g=-1,B(tY,`AbstractEList/EIterator`,37),J(286,37,oU,fw,pD),Q.Qb=function(){XR(this)},Q.Rb=function(e){UGe(this,e)},Q.Zj=function(){var e;try{return e=this.d.Xb(--this.e),this.Xj(),this.g=this.e,e}catch(e){throw e=SP(e),F(e,77)?(this.Xj(),A(new Ig)):A(e)}},Q.$j=function(e){nYe(this,e)},Q.Sb=function(){return this.e!=0},Q.Tb=function(){return this.e},Q.Ub=function(){return this.Zj()},Q.Vb=function(){return this.e-1},Q.Wb=function(e){this.$j(e)},B(tY,`AbstractEList/EListIterator`,286),J(355,37,eU,pw),Q.Yj=function(){return Pqe(this)},Q.Qb=function(){throw A(new Ng)},B(tY,`AbstractEList/NonResolvingEIterator`,355),J(398,286,oU,mw,Khe),Q.Rb=function(e){throw A(new Ng)},Q.Yj=function(){var e;try{return e=this.c.Vi(this.e),this.Xj(),this.g=this.e++,e}catch(e){throw e=SP(e),F(e,77)?(this.Xj(),A(new Ig)):A(e)}},Q.Zj=function(){var e;try{return e=this.c.Vi(--this.e),this.Xj(),this.g=this.e,e}catch(e){throw e=SP(e),F(e,77)?(this.Xj(),A(new Ig)):A(e)}},Q.Qb=function(){throw A(new Ng)},Q.Wb=function(e){throw A(new Ng)},B(tY,`AbstractEList/NonResolvingEListIterator`,398),J(2080,70,xvt),Q.Ei=function(e,t){var n,r,i=t.gc(),a,o,s,c,l,u,d,f;if(i!=0){for(l=L(iP(this.a,4),129),u=l==null?0:l.length,f=u+i,r=rF(this,f),d=u-e,d>0&&jV(l,e,r,e+i,d),c=t.Kc(),o=0;o<i;++o)s=c.Pb(),n=e+o,pC(r,n,GP(this,s));for(gL(this,r),a=0;a<i;++a)s=r[e],this.Mi(e,s),++e;return!0}return++this.j,!1},Q.Fi=function(e){var t,n,r=e.gc(),i,a,o,s,c,l;if(r!=0){for(c=(n=L(iP(this.a,4),129),n==null?0:n.length),l=c+r,t=rF(this,l),s=e.Kc(),a=c;a<l;++a)o=s.Pb(),pC(t,a,GP(this,o));for(gL(this,t),i=c;i<l;++i)o=t[i],this.Mi(i,o);return!0}return++this.j,!1},Q.Gi=function(e,t){var n,r=L(iP(this.a,4),129),i=r==null?0:r.length,a;n=rF(this,i+1),a=GP(this,t),e!=i&&jV(r,e,n,e+1,i-e),PD(n,e,a),gL(this,n),this.Mi(e,t)},Q.Hi=function(e){var t,n,r=(n=L(iP(this.a,4),129),n==null?0:n.length);t=rF(this,r+1),pC(t,r,GP(this,e)),gL(this,t),this.Mi(r,e)},Q.Ii=function(){return new Qje(this)},Q.Ji=function(){return new Fxe(this)},Q.Ki=function(e){var t,n=(t=L(iP(this.a,4),129),t==null?0:t.length);if(e<0||e>n)throw A(new eT(e,n));return new KCe(this,e)},Q.$b=function(){var e,t;++this.j,e=L(iP(this.a,4),129),t=e==null?0:e.length,gL(this,null),MNe(this,t,e)},Q.Hc=function(e){var t=L(iP(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],RF(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(iP(this.a,4),129),n=t==null?0:t.length;if(e>=n)throw A(new eT(e,n));return t[e]},Q.dd=function(e){var t=L(iP(this.a,4),129),n,r;if(t!=null){if(e!=null){for(n=0,r=t.length;n<r;++n)if(RF(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(iP(this.a,4),129)==null},Q.Kc=function(){return new Zje(this)},Q.ed=function(){return new Pxe(this)},Q.fd=function(e){var t,n=(t=L(iP(this.a,4),129),t==null?0:t.length);if(e<0||e>n)throw A(new eT(e,n));return new GCe(this,e)},Q.Ti=function(e,t){var n=_Ke(this),r,i=n==null?0:n.length;if(e>=i)throw A(new $_(P_t+e+lY+i));if(t>=i)throw A(new $_(F_t+t+lY+i));return r=n[t],e!=t&&(e<t?jV(n,e,n,e+1,t-e):jV(n,t+1,n,t,e-t),PD(n,e,r),gL(this,n)),r},Q.Vi=function(e){return L(iP(this.a,4),129)[e]},Q.gd=function(e){return c3e(this,e)},Q.Xi=function(e,t){var n=_Ke(this),r=n[e];return pC(n,e,GP(this,t)),gL(this,n),r},Q.gc=function(){var e;return e=L(iP(this.a,4),129),e==null?0:e.length},Q.Pc=function(){var e=L(iP(this.a,4),129),t,n=e==null?0:e.length;return t=U(mVt,bvt,424,n,0,1),n>0&&jV(e,0,t,0,n),t},Q.Qc=function(e){var t=L(iP(this.a,4),129),n,r=t==null?0:t.length;return r>0&&(e.length<r&&(n=VM(mF(e).c,r),e=n),jV(t,0,e,0,r)),e.length>r&&PD(e,r,null),e};var gVt;B(tY,`ArrayDelegatingEList`,2080),J(1051,37,eU,Zje),Q.Xj=function(){if(this.b.j!=this.f||P(L(iP(this.b.a,4),129))!==P(this.a))throw A(new Pg)},Q.Qb=function(){XR(this),this.a=L(iP(this.b.a,4),129)},B(tY,`ArrayDelegatingEList/EIterator`,1051),J(722,286,oU,Pxe,GCe),Q.Xj=function(){if(this.b.j!=this.f||P(L(iP(this.b.a,4),129))!==P(this.a))throw A(new Pg)},Q.$j=function(e){nYe(this,e),this.a=L(iP(this.b.a,4),129)},Q.Qb=function(){XR(this),this.a=L(iP(this.b.a,4),129)},B(tY,`ArrayDelegatingEList/EListIterator`,722),J(1052,355,eU,Qje),Q.Xj=function(){if(this.b.j!=this.f||P(L(iP(this.b.a,4),129))!==P(this.a))throw A(new Pg)},B(tY,`ArrayDelegatingEList/NonResolvingEIterator`,1052),J(723,398,oU,Fxe,KCe),Q.Xj=function(){if(this.b.j!=this.f||P(L(iP(this.b.a,4),129))!==P(this.a))throw A(new Pg)},B(tY,`ArrayDelegatingEList/NonResolvingEListIterator`,723),J(615,302,gW,LS),B(tY,`BasicEList/BasicIndexOutOfBoundsException`,615),J(710,66,uY,Nle),Q.bd=function(e,t){throw A(new Ng)},Q.Fc=function(e){throw A(new Ng)},Q.cd=function(e,t){throw A(new Ng)},Q.Gc=function(e){throw A(new Ng)},Q.$b=function(){throw A(new Ng)},Q._i=function(e){throw A(new Ng)},Q.Kc=function(){return this.Ii()},Q.ed=function(){return this.Ji()},Q.fd=function(e){return this.Ki(e)},Q.Ti=function(e,t){throw A(new Ng)},Q.Ui=function(e,t){throw A(new Ng)},Q.gd=function(e){throw A(new Ng)},Q.Mc=function(e){throw A(new Ng)},Q.hd=function(e,t){throw A(new Ng)},B(tY,`BasicEList/UnmodifiableEList`,710),J(721,1,{3:1,20:1,16:1,15:1,61:1,597:1}),Q.bd=function(e,t){Rde(this,e,L(t,44))},Q.Fc=function(e){return Hpe(this,L(e,44))},Q.Jc=function(e){EA(this,e)},Q.Xb=function(e){return L(W(this.c,e),136)},Q.Ti=function(e,t){return L(this.c.Ti(e,t),44)},Q.Ui=function(e,t){zde(this,e,L(t,44))},Q.Lc=function(){return new aE(null,new jk(this,16))},Q.gd=function(e){return L(this.c.gd(e),44)},Q.hd=function(e,t){return hSe(this,e,L(t,44))},Q.jd=function(e){wN(this,e)},Q.Nc=function(){return new jk(this,16)},Q.Oc=function(){return new aE(null,new jk(this,16))},Q.cd=function(e,t){return this.c.cd(e,t)},Q.Gc=function(e){return this.c.Gc(e)},Q.$b=function(){this.c.$b()},Q.Hc=function(e){return this.c.Hc(e)},Q.Ic=function(e){return xP(this.c,e)},Q._j=function(){var e,t,n;if(this.d==null){for(this.d=U(dVt,Svt,66,2*this.f+1,0,1),n=this.e,this.f=0,t=this.c.Kc();t.e!=t.i.gc();)e=L(t.Yj(),136),QL(this,e);this.e=n}},Q.Fb=function(e){return ege(this,e)},Q.Hb=function(){return wBe(this.c)},Q.dd=function(e){return this.c.dd(e)},Q.ak=function(){this.c=new lre(this)},Q.dc=function(){return this.f==0},Q.Kc=function(){return this.c.Kc()},Q.ed=function(){return this.c.ed()},Q.fd=function(e){return this.c.fd(e)},Q.bk=function(){return sj(this)},Q.ck=function(e,t,n){return new Ove(e,t,n)},Q.dk=function(){return new Cl},Q.Mc=function(e){return _Le(this,e)},Q.gc=function(){return this.f},Q.kd=function(e,t){return new Ck(this.c,e,t)},Q.Pc=function(){return this.c.Pc()},Q.Qc=function(e){return this.c.Qc(e)},Q.Ib=function(){return QWe(this.c)},Q.e=0,Q.f=0,B(tY,`BasicEMap`,721),J(1046,66,uY,lre),Q.Mi=function(e,t){kre(this,L(t,136))},Q.Pi=function(e,t,n){var r;++(r=this,L(t,136),r).a.e},Q.Qi=function(e,t){Are(this,L(t,136))},Q.Ri=function(e,t,n){upe(this,L(t,136),L(n,136))},Q.Oi=function(e,t){Pze(this.a)},B(tY,`BasicEMap/1`,1046),J(1047,66,uY,Cl),Q.aj=function(e){return U(_Vt,Cvt,621,e,0,1)},B(tY,`BasicEMap/2`,1047),J(1048,iU,aU,ure),Q.$b=function(){this.a.c.$b()},Q.Hc=function(e){return zGe(this.a,e)},Q.Kc=function(){return this.a.f==0?(Mw(),E7.a):new uae(this.a)},Q.Mc=function(e){var t=this.a.f;return oL(this.a,e),this.a.f!=t},Q.gc=function(){return this.a.f},B(tY,`BasicEMap/3`,1048),J(1049,31,rU,Uh),Q.$b=function(){this.a.c.$b()},Q.Hc=function(e){return U9e(this.a,e)},Q.Kc=function(){return this.a.f==0?(Mw(),E7.a):new dae(this.a)},Q.gc=function(){return this.a.f},B(tY,`BasicEMap/4`,1049),J(1050,iU,aU,dre),Q.$b=function(){this.a.c.$b()},Q.Hc=function(e){var t,n,r,i,a,o,s,c,l;if(this.a.f>0&&F(e,44)&&(this.a._j(),c=L(e,44),s=c.ld(),i=s==null?0:DN(s),a=Nme(this.a,i),t=this.a.d[a],t)){for(n=L(t.g,379),l=t.i,o=0;o<l;++o)if(r=n[o],r.Bi()==i&&r.Fb(c))return!0}return!1},Q.Kc=function(){return this.a.f==0?(Mw(),E7.a):new Owe(this.a)},Q.Mc=function(e){return s6e(this,e)},Q.gc=function(){return this.a.f},B(tY,`BasicEMap/5`,1050),J(622,1,eU,Owe),Q.Nb=function(e){eD(this,e)},Q.Ob=function(){return this.b!=-1},Q.Pb=function(){var e;if(this.f.e!=this.c)throw A(new Pg);if(this.b==-1)throw A(new Ig);return this.d=this.a,this.e=this.b,lZe(this),e=L(this.f.d[this.d].g[this.e],136),this.ek(e)},Q.Qb=function(){if(this.f.e!=this.c)throw A(new Pg);if(this.e==-1)throw A(new jg);this.f.c.Mc(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.ek=function(e){return e},Q.a=0,Q.b=-1,Q.c=0,Q.d=0,Q.e=0,B(tY,`BasicEMap/BasicEMapIterator`,622),J(1044,622,eU,uae),Q.ek=function(e){return e.ld()},B(tY,`BasicEMap/BasicEMapKeyIterator`,1044),J(1045,622,eU,dae),Q.ek=function(e){return e.md()},B(tY,`BasicEMap/BasicEMapValueIterator`,1045),J(1043,1,nU,fre),Q.wc=function(e){qN(this,e)},Q.yc=function(e,t,n){return CI(this,e,t,n)},Q.$b=function(){this.a.c.$b()},Q._b=function(e){return yle(this,e)},Q.uc=function(e){return U9e(this.a,e)},Q.vc=function(){return DNe(this.a)},Q.Fb=function(e){return ege(this.a,e)},Q.xc=function(e){return GI(this.a,e)},Q.Hb=function(){return wBe(this.a.c)},Q.dc=function(){return this.a.f==0},Q.ec=function(){return TNe(this.a)},Q.zc=function(e,t){return UR(this.a,e,t)},Q.Bc=function(e){return oL(this.a,e)},Q.gc=function(){return this.a.f},Q.Ib=function(){return QWe(this.a.c)},Q.Cc=function(){return ENe(this.a)},B(tY,`BasicEMap/DelegatingMap`,1043),J(621,1,{44:1,136:1,621:1},Ove),Q.Fb=function(e){var t;return F(e,44)?(t=L(e,44),(this.b==null?P(this.b)===P(t.ld()):RF(this.b,t.ld()))&&(this.c==null?P(this.c)===P(t.md()):RF(this.c,t.md()))):!1},Q.Bi=function(){return this.a},Q.ld=function(){return this.b},Q.md=function(){return this.c},Q.Hb=function(){return this.a^(this.c==null?0:DN(this.c))},Q.Ci=function(e){this.a=e},Q.Di=function(e){throw A(new Eg)},Q.nd=function(e){var t=this.c;return this.c=e,t},Q.Ib=function(){return this.b+`->`+this.c},Q.a=0;var _Vt=B(tY,`BasicEMap/EntryImpl`,621);J(546,1,{},wl),B(tY,`BasicEMap/View`,546);var E7;J(783,1,{}),Q.Fb=function(e){return f6e((OO(),UX),e)},Q.Hb=function(){return _Ve((OO(),UX))},Q.Ib=function(){return wz((OO(),UX))},B(tY,`ECollections/BasicEmptyUnmodifiableEList`,783),J(1348,1,oU,Tl),Q.Nb=function(e){eD(this,e)},Q.Rb=function(e){throw A(new Ng)},Q.Ob=function(){return!1},Q.Sb=function(){return!1},Q.Pb=function(){throw A(new Ig)},Q.Tb=function(){return 0},Q.Ub=function(){throw A(new Ig)},Q.Vb=function(){return-1},Q.Qb=function(){throw A(new Ng)},Q.Wb=function(e){throw A(new Ng)},B(tY,`ECollections/BasicEmptyUnmodifiableEList/1`,1348),J(1346,783,{20:1,16:1,15:1,61:1},Kre),Q.bd=function(e,t){Fae()},Q.Fc=function(e){return Iae()},Q.cd=function(e,t){return Lae()},Q.Gc=function(e){return Rae()},Q.$b=function(){zae()},Q.Hc=function(e){return!1},Q.Ic=function(e){return!1},Q.Jc=function(e){EA(this,e)},Q.Xb=function(e){return Ule((OO(),e)),null},Q.dd=function(e){return-1},Q.dc=function(){return!0},Q.Kc=function(){return this.a},Q.ed=function(){return this.a},Q.fd=function(e){return this.a},Q.Ti=function(e,t){return Bae()},Q.Ui=function(e,t){Vae()},Q.Lc=function(){return new aE(null,new jk(this,16))},Q.gd=function(e){return Hae()},Q.Mc=function(e){return Uae()},Q.hd=function(e,t){return Wae()},Q.gc=function(){return 0},Q.jd=function(e){wN(this,e)},Q.Nc=function(){return new jk(this,16)},Q.Oc=function(){return new aE(null,new jk(this,16))},Q.kd=function(e,t){return OO(),new Ck(UX,e,t)},Q.Pc=function(){return sxe((OO(),UX))},Q.Qc=function(e){return OO(),lR(UX,e)},B(tY,`ECollections/EmptyUnmodifiableEList`,1346),J(1347,783,{20:1,16:1,15:1,61:1,597:1},qre),Q.bd=function(e,t){Fae()},Q.Fc=function(e){return Iae()},Q.cd=function(e,t){return Lae()},Q.Gc=function(e){return Rae()},Q.$b=function(){zae()},Q.Hc=function(e){return!1},Q.Ic=function(e){return!1},Q.Jc=function(e){EA(this,e)},Q.Xb=function(e){return Ule((OO(),e)),null},Q.dd=function(e){return-1},Q.dc=function(){return!0},Q.Kc=function(){return this.a},Q.ed=function(){return this.a},Q.fd=function(e){return this.a},Q.Ti=function(e,t){return Bae()},Q.Ui=function(e,t){Vae()},Q.Lc=function(){return new aE(null,new jk(this,16))},Q.gd=function(e){return Hae()},Q.Mc=function(e){return Uae()},Q.hd=function(e,t){return Wae()},Q.gc=function(){return 0},Q.jd=function(e){wN(this,e)},Q.Nc=function(){return new jk(this,16)},Q.Oc=function(){return new aE(null,new jk(this,16))},Q.kd=function(e,t){return OO(),new Ck(UX,e,t)},Q.Pc=function(){return sxe((OO(),UX))},Q.Qc=function(e){return OO(),lR(UX,e)},Q.bk=function(){return OO(),OO(),WX},B(tY,`ECollections/EmptyUnmodifiableEMap`,1347);var vVt=YT(tY,`Enumerator`),D7;J(288,1,{288:1},X9e),Q.Fb=function(e){var t;return this===e?!0:F(e,288)?(t=L(e,288),this.f==t.f&&Dbe(this.i,t.i)&&cE(this.a,this.f&256?t.f&256?t.a:null:t.f&256?null:t.a)&&cE(this.d,t.d)&&cE(this.g,t.g)&&cE(this.e,t.e)&&Nqe(this,t)):!1},Q.Hb=function(){return this.f},Q.Ib=function(){return mnt(this)},Q.f=0;var yVt=0,bVt=0,xVt=0,SVt=0,CVt=0,wVt=0,TVt=0,EVt=0,DVt=0,OVt,O7=0,k7=0,kVt=0,AVt=0,A7,jVt;B(tY,`URI`,288),J(1121,45,AW,Jre),Q.zc=function(e,t){return L(hk(this,Ow(e),L(t,288)),288)},B(tY,`URI/URICache`,1121),J(506,66,uY,_l,hE),Q.Si=function(){return!0},B(tY,`UniqueEList`,506),J(590,63,NU,Pj),B(tY,`WrappedException`,590);var j7=YT(BJ,Evt),M7=YT(BJ,Dvt),N7=YT(BJ,Ovt),P7=YT(BJ,kvt),F7=YT(BJ,Avt),I7=YT(BJ,`EClass`),MVt=YT(BJ,`EDataType`),NVt;J(1233,45,AW,Yre),Q.xc=function(e){return yS(e)?YO(this,e):vS(vE(this.f,e))},B(BJ,`EDataType/Internal/ConversionDelegate/Factory/Registry/Impl`,1233);var L7=YT(BJ,`EEnum`),R7=YT(BJ,jvt),z7=YT(BJ,Mvt),B7=YT(BJ,Nvt),V7,H7=YT(BJ,Pvt),U7=YT(BJ,Fvt);J(1042,1,{},gl),Q.Ib=function(){return`NIL`},B(BJ,`EStructuralFeature/Internal/DynamicValueHolder/1`,1042);var PVt;J(1041,45,AW,Xre),Q.xc=function(e){return yS(e)?YO(this,e):vS(vE(this.f,e))},B(BJ,`EStructuralFeature/Internal/SettingDelegate/Factory/Registry/Impl`,1041);var W7=YT(BJ,Ivt),G7=YT(BJ,`EValidator/PatternMatcher`),FVt,IVt,K7,q7,J7,Y7,LVt,RVt,zVt,X7,Z7,Q7,$7,e9,BVt,VVt,t9,n9,HVt,r9,i9,a9,o9,UVt,WVt,s9,c9=YT(yY,`FeatureMap/Entry`);J(545,1,{76:1},hS),Q.Lk=function(){return this.a},Q.md=function(){return this.b},B(KJ,`BasicEObjectImpl/1`,545),J(1040,1,Lvt,Dle),Q.Fk=function(e){return hMe(this.a,this.b,e)},Q.Qj=function(){return TEe(this.a,this.b)},Q.Wb=function(e){wEe(this.a,this.b,e)},Q.Gk=function(){fCe(this.a,this.b)},B(KJ,`BasicEObjectImpl/4`,1040),J(2081,1,{114:1}),Q.Mk=function(e){this.e=e==0?GVt:U(mX,JH,1,e,5,1)},Q.li=function(e){return this.e[e]},Q.mi=function(e,t){this.e[e]=t},Q.ni=function(e){this.e[e]=null},Q.Nk=function(){return this.c},Q.Ok=function(){throw A(new Ng)},Q.Pk=function(){throw A(new Ng)},Q.Qk=function(){return this.d},Q.Rk=function(){return this.e!=null},Q.Sk=function(e){this.c=e},Q.Tk=function(e){throw A(new Ng)},Q.Uk=function(e){throw A(new Ng)},Q.Vk=function(e){this.d=e};var GVt;B(KJ,`BasicEObjectImpl/EPropertiesHolderBaseImpl`,2081),J(192,2081,{114:1},Pf),Q.Ok=function(){return this.a},Q.Pk=function(){return this.b},Q.Tk=function(e){this.a=e},Q.Uk=function(e){this.b=e},B(KJ,`BasicEObjectImpl/EPropertiesHolderImpl`,192),J(516,99,n_t,El),Q.uh=function(){return this.f},Q.zh=function(){return this.k},Q.Bh=function(e,t){this.g=e,this.i=t},Q.Dh=function(){return this.j&2?this.$h().Nk():this.ii()},Q.Fh=function(){return this.i},Q.wh=function(){return!!(this.j&1)},Q.Ph=function(){return this.g},Q.Vh=function(){return!!(this.j&4)},Q.$h=function(){return!this.k&&(this.k=new Pf),this.k},Q.ci=function(e){this.$h().Sk(e),e?this.j|=2:this.j&=-3},Q.ei=function(e){this.$h().Uk(e),e?this.j|=4:this.j&=-5},Q.ii=function(){return(AD(),K7).S},Q.i=0,Q.j=1,B(KJ,`EObjectImpl`,516),J(798,516,{110:1,94:1,93:1,58:1,114:1,54:1,99:1},_ye),Q.li=function(e){return this.e[e]},Q.mi=function(e,t){this.e[e]=t},Q.ni=function(e){this.e[e]=null},Q.Dh=function(){return this.d},Q.Ih=function(e){return RI(this.d,e)},Q.Kh=function(){return this.d},Q.Oh=function(){return this.e!=null},Q.$h=function(){return!this.k&&(this.k=new Dl),this.k},Q.ci=function(e){this.d=e},Q.hi=function(){var e;return this.e??=(e=MD(this.d),e==0?KVt:U(mX,JH,1,e,5,1)),this},Q.ji=function(){return 0};var KVt;B(KJ,`DynamicEObjectImpl`,798),J(1522,798,{110:1,44:1,94:1,93:1,136:1,58:1,114:1,54:1,99:1},Kye),Q.Fb=function(e){return this===e},Q.Hb=function(){return ow(this)},Q.ci=function(e){this.d=e,this.b=VB(e,`key`),this.c=VB(e,$J)},Q.Bi=function(){var e;return this.a==-1&&(e=dFe(this,this.b),this.a=e==null?0:DN(e)),this.a},Q.ld=function(){return dFe(this,this.b)},Q.md=function(){return dFe(this,this.c)},Q.Ci=function(e){this.a=e},Q.Di=function(e){wEe(this,this.b,e)},Q.nd=function(e){var t=dFe(this,this.c);return wEe(this,this.c,e),t},Q.a=0,B(KJ,`DynamicEObjectImpl/BasicEMapEntry`,1522),J(1523,1,{114:1},Dl),Q.Mk=function(e){throw A(new Ng)},Q.li=function(e){throw A(new Ng)},Q.mi=function(e,t){throw A(new Ng)},Q.ni=function(e){throw A(new Ng)},Q.Nk=function(){throw A(new Ng)},Q.Ok=function(){return this.a},Q.Pk=function(){return this.b},Q.Qk=function(){return this.c},Q.Rk=function(){throw A(new Ng)},Q.Sk=function(e){throw A(new Ng)},Q.Tk=function(e){this.a=e},Q.Uk=function(e){this.b=e},Q.Vk=function(e){this.c=e},B(KJ,`DynamicEObjectImpl/DynamicEPropertiesHolderImpl`,1523),J(519,158,{110:1,94:1,93:1,598:1,155:1,58:1,114:1,54:1,99:1,519:1,158:1,119:1,120:1},Ol),Q.Ah=function(e){return CXe(this,e)},Q.Lh=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 Ew((RH(),o9),d9,this)),this.b):(!this.b&&(this.b=new Ew((RH(),o9),d9,this)),sj(this.b));case 3:return REe(this);case 4:return!this.a&&(this.a=new LC(Q5,this,4)),this.a;case 5:return!this.c&&(this.c=new BC(Q5,this,5)),this.c}return Tj(this,e-MD((RH(),q7)),sM((r=L(iP(this,16),29),r||q7),e),t,n)},Q.Sh=function(e,t,n){var r,i,a;switch(t){case 0:return!this.Ab&&(this.Ab=new R(j7,this,0,3)),KI(this.Ab,e,n);case 3:return this.Cb&&(n=(i=this.Db>>16,i>=0?CXe(this,n):this.Cb.Th(this,-1-i,null,n))),rxe(this,L(e,155),n)}return a=L(sM((r=L(iP(this,16),29),r||(RH(),q7)),t),69),a.wk().zk(this,cL(this),t-MD((RH(),q7)),e,n)},Q.Uh=function(e,t,n){var r,i;switch(t){case 0:return!this.Ab&&(this.Ab=new R(j7,this,0,3)),LL(this.Ab,e,n);case 2:return!this.b&&(this.b=new Ew((RH(),o9),d9,this)),iT(this.b,e,n);case 3:return rxe(this,null,n);case 4:return!this.a&&(this.a=new LC(Q5,this,4)),LL(this.a,e,n)}return i=L(sM((r=L(iP(this,16),29),r||(RH(),q7)),t),69),i.wk().Ak(this,cL(this),t-MD((RH(),q7)),e,n)},Q.Wh=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!!REe(this);case 4:return!!this.a&&this.a.i!=0;case 5:return!!this.c&&this.c.i!=0}return cA(this,e-MD((RH(),q7)),sM((t=L(iP(this,16),29),t||q7),e))},Q.bi=function(e,t){var n;switch(e){case 0:!this.Ab&&(this.Ab=new R(j7,this,0,3)),sH(this.Ab),!this.Ab&&(this.Ab=new R(j7,this,0,3)),CD(this.Ab,L(t,16));return;case 1:Qye(this,Ow(t));return;case 2:!this.b&&(this.b=new Ew((RH(),o9),d9,this)),KN(this.b,t);return;case 3:L5e(this,L(t,155));return;case 4:!this.a&&(this.a=new LC(Q5,this,4)),sH(this.a),!this.a&&(this.a=new LC(Q5,this,4)),CD(this.a,L(t,16));return;case 5:!this.c&&(this.c=new BC(Q5,this,5)),sH(this.c),!this.c&&(this.c=new BC(Q5,this,5)),CD(this.c,L(t,16));return}OI(this,e-MD((RH(),q7)),sM((n=L(iP(this,16),29),n||q7),e),t)},Q.ii=function(){return RH(),q7},Q.ki=function(e){var t;switch(e){case 0:!this.Ab&&(this.Ab=new R(j7,this,0,3)),sH(this.Ab);return;case 1:qLe(this,null);return;case 2:!this.b&&(this.b=new Ew((RH(),o9),d9,this)),this.b.c.$b();return;case 3:L5e(this,null);return;case 4:!this.a&&(this.a=new LC(Q5,this,4)),sH(this.a);return;case 5:!this.c&&(this.c=new BC(Q5,this,5)),sH(this.c);return}zF(this,e-MD((RH(),q7)),sM((t=L(iP(this,16),29),t||q7),e))},Q.Ib=function(){return jUe(this)},Q.d=null,B(KJ,`EAnnotationImpl`,519),J(141,721,Rvt,hj),Q.Gi=function(e,t){Xue(this,e,L(t,44))},Q.Wk=function(e,t){return tge(this,L(e,44),t)},Q.$i=function(e){return L(L(this.c,71).$i(e),136)},Q.Ii=function(){return L(this.c,71).Ii()},Q.Ji=function(){return L(this.c,71).Ji()},Q.Ki=function(e){return L(this.c,71).Ki(e)},Q.Xk=function(e,t){return iT(this,e,t)},Q.Fk=function(e){return L(this.c,79).Fk(e)},Q.ak=function(){},Q.Qj=function(){return L(this.c,79).Qj()},Q.ck=function(e,t,n){var r=L(bM(this.b).wi().si(this.b),136);return r.Ci(e),r.Di(t),r.nd(n),r},Q.dk=function(){return new tg(this)},Q.Wb=function(e){KN(this,e)},Q.Gk=function(){L(this.c,79).Gk()},B(yY,`EcoreEMap`,141),J(165,141,Rvt,Ew),Q._j=function(){var e,t,n,r,i,a;if(this.d==null){for(a=U(dVt,Svt,66,2*this.f+1,0,1),n=this.c.Kc();n.e!=n.i.gc();)t=L(n.Yj(),136),r=t.Bi(),i=(r&UH)%a.length,e=a[i],!e&&(e=a[i]=new tg(this)),e.Fc(t);this.d=a}},B(KJ,`EAnnotationImpl/1`,165),J(292,448,{110:1,94:1,93:1,155:1,197:1,58:1,114:1,481:1,54:1,99:1,158:1,292:1,119:1,120:1}),Q.Lh=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 cw(),!!(this.Bb&256);case 3:return cw(),!!(this.Bb&512);case 4:return kF(this.s);case 5:return kF(this.t);case 6:return cw(),!!this.Jk();case 7:return cw(),i=this.s,i>=1;case 8:return t?LR(this):this.r;case 9:return this.q}return Tj(this,e-MD(this.ii()),sM((r=L(iP(this,16),29),r||this.ii()),e),t,n)},Q.Uh=function(e,t,n){var r,i;switch(t){case 0:return!this.Ab&&(this.Ab=new R(j7,this,0,3)),LL(this.Ab,e,n);case 9:return vSe(this,n)}return i=L(sM((r=L(iP(this,16),29),r||this.ii()),t),69),i.wk().Ak(this,cL(this),t-MD(this.ii()),e,n)},Q.Wh=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);case 3:return!(this.Bb&512);case 4:return this.s!=0;case 5:return this.t!=1;case 6:return this.Jk();case 7:return n=this.s,n>=1;case 8:return!!this.r&&!this.q.e&&LD(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&LD(this.q).i==0)}return cA(this,e-MD(this.ii()),sM((t=L(iP(this,16),29),t||this.ii()),e))},Q.bi=function(e,t){var n,r;switch(e){case 0:!this.Ab&&(this.Ab=new R(j7,this,0,3)),sH(this.Ab),!this.Ab&&(this.Ab=new R(j7,this,0,3)),CD(this.Ab,L(t,16));return;case 1:this.ui(Ow(t));return;case 2:BF(this,Y_(Dw(t)));return;case 3:HF(this,Y_(Dw(t)));return;case 4:RM(this,L(t,17).a);return;case 5:this.Zk(L(t,17).a);return;case 8:yF(this,L(t,142));return;case 9:r=pz(this,L(t,89),null),r&&r.oj();return}OI(this,e-MD(this.ii()),sM((n=L(iP(this,16),29),n||this.ii()),e),t)},Q.ii=function(){return RH(),WVt},Q.ki=function(e){var t,n;switch(e){case 0:!this.Ab&&(this.Ab=new R(j7,this,0,3)),sH(this.Ab);return;case 1:this.ui(null);return;case 2:BF(this,!0);return;case 3:HF(this,!0);return;case 4:RM(this,0);return;case 5:this.Zk(1);return;case 8:yF(this,null);return;case 9:n=pz(this,null,null),n&&n.oj();return}zF(this,e-MD(this.ii()),sM((t=L(iP(this,16),29),t||this.ii()),e))},Q.pi=function(){LR(this),this.Bb|=1},Q.Hk=function(){return LR(this)},Q.Ik=function(){return this.t},Q.Jk=function(){var e;return e=this.t,e>1||e==-1},Q.Si=function(){return!!(this.Bb&512)},Q.Yk=function(e,t){return CUe(this,e,t)},Q.Zk=function(e){zM(this,e)},Q.Ib=function(){return S3e(this)},Q.s=0,Q.t=1,B(KJ,`ETypedElementImpl`,292),J(462,292,{110:1,94:1,93:1,155:1,197:1,58:1,179:1,69:1,114:1,481:1,54:1,99:1,158:1,462:1,292:1,119:1,120:1,692:1}),Q.Ah=function(e){return JYe(this,e)},Q.Lh=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 cw(),!!(this.Bb&256);case 3:return cw(),!!(this.Bb&512);case 4:return kF(this.s);case 5:return kF(this.t);case 6:return cw(),!!this.Jk();case 7:return cw(),i=this.s,i>=1;case 8:return t?LR(this):this.r;case 9:return this.q;case 10:return cw(),(this.Bb&wU)!=0;case 11:return cw(),(this.Bb&xY)!=0;case 12:return cw(),(this.Bb&bW)!=0;case 13:return this.j;case 14:return PB(this);case 15:return cw(),(this.Bb&bY)!=0;case 16:return cw(),(this.Bb&lU)!=0;case 17:return dk(this)}return Tj(this,e-MD(this.ii()),sM((r=L(iP(this,16),29),r||this.ii()),e),t,n)},Q.Sh=function(e,t,n){var r,i,a;switch(t){case 0:return!this.Ab&&(this.Ab=new R(j7,this,0,3)),KI(this.Ab,e,n);case 17:return this.Cb&&(n=(i=this.Db>>16,i>=0?JYe(this,n):this.Cb.Th(this,-1-i,null,n))),TV(this,e,17,n)}return a=L(sM((r=L(iP(this,16),29),r||this.ii()),t),69),a.wk().zk(this,cL(this),t-MD(this.ii()),e,n)},Q.Uh=function(e,t,n){var r,i;switch(t){case 0:return!this.Ab&&(this.Ab=new R(j7,this,0,3)),LL(this.Ab,e,n);case 9:return vSe(this,n);case 17:return TV(this,null,17,n)}return i=L(sM((r=L(iP(this,16),29),r||this.ii()),t),69),i.wk().Ak(this,cL(this),t-MD(this.ii()),e,n)},Q.Wh=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);case 3:return!(this.Bb&512);case 4:return this.s!=0;case 5:return this.t!=1;case 6:return this.Jk();case 7:return n=this.s,n>=1;case 8:return!!this.r&&!this.q.e&&LD(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&LD(this.q).i==0);case 10:return(this.Bb&wU)==0;case 11:return(this.Bb&xY)!=0;case 12:return(this.Bb&bW)!=0;case 13:return this.j!=null;case 14:return PB(this)!=null;case 15:return(this.Bb&bY)!=0;case 16:return(this.Bb&lU)!=0;case 17:return!!dk(this)}return cA(this,e-MD(this.ii()),sM((t=L(iP(this,16),29),t||this.ii()),e))},Q.bi=function(e,t){var n,r;switch(e){case 0:!this.Ab&&(this.Ab=new R(j7,this,0,3)),sH(this.Ab),!this.Ab&&(this.Ab=new R(j7,this,0,3)),CD(this.Ab,L(t,16));return;case 1:oDe(this,Ow(t));return;case 2:BF(this,Y_(Dw(t)));return;case 3:HF(this,Y_(Dw(t)));return;case 4:RM(this,L(t,17).a);return;case 5:this.Zk(L(t,17).a);return;case 8:yF(this,L(t,142));return;case 9:r=pz(this,L(t,89),null),r&&r.oj();return;case 10:$F(this,Y_(Dw(t)));return;case 11:nI(this,Y_(Dw(t)));return;case 12:eI(this,Y_(Dw(t)));return;case 13:Sle(this,Ow(t));return;case 15:tI(this,Y_(Dw(t)));return;case 16:dI(this,Y_(Dw(t)));return}OI(this,e-MD(this.ii()),sM((n=L(iP(this,16),29),n||this.ii()),e),t)},Q.ii=function(){return RH(),UVt},Q.ki=function(e){var t,n;switch(e){case 0:!this.Ab&&(this.Ab=new R(j7,this,0,3)),sH(this.Ab);return;case 1:F(this.Cb,90)&&$z(PA(L(this.Cb,90)),4),ON(this,null);return;case 2:BF(this,!0);return;case 3:HF(this,!0);return;case 4:RM(this,0);return;case 5:this.Zk(1);return;case 8:yF(this,null);return;case 9:n=pz(this,null,null),n&&n.oj();return;case 10:$F(this,!0);return;case 11:nI(this,!1);return;case 12:eI(this,!1);return;case 13:this.i=null,mN(this,null);return;case 15:tI(this,!1);return;case 16:dI(this,!1);return}zF(this,e-MD(this.ii()),sM((t=L(iP(this,16),29),t||this.ii()),e))},Q.pi=function(){cO(Rj((Wz(),p9),this)),LR(this),this.Bb|=1},Q.pk=function(){return this.f},Q.ik=function(){return PB(this)},Q.qk=function(){return dk(this)},Q.uk=function(){return null},Q.$k=function(){return this.k},Q.Lj=function(){return this.n},Q.vk=function(){return ez(this)},Q.wk=function(){var e,t,n,r,i,a,o,s,c;return this.p||(n=dk(this),(n.i??PV(n),n.i).length,r=this.uk(),r&&MD(dk(r)),i=LR(this),o=i.kk(),e=o?o.i&1?o==J9?DX:o==q9?MX:o==Q9?jX:o==Z9?AX:o==Y9?NX:o==$9?PX:o==X9?OX:kX:o:null,t=PB(this),s=i.ik(),MWe(this),(this.Bb&lU)!=0&&((a=xZe((Wz(),p9),n))&&a!=this||(a=Ik(Rj(p9,this))))?this.p=new kle(this,a):this.Jk()?this.al()?this.p=r?(this.Bb&bY)==0?e?this.bl()?new xO(49,e,this,r):new xO(7,e,this,r):this.bl()?new yA(48,this,r):new yA(6,this,r):e?this.bl()?new xO(47,e,this,r):new xO(5,e,this,r):this.bl()?new yA(46,this,r):new yA(4,this,r):(this.Bb&bY)==0?e?e==vX?new wT(41,aVt,this):this.bl()?new wT(45,e,this):new wT(3,e,this):this.bl()?new RO(44,this):new RO(2,this):e?e==vX?new wT(50,aVt,this):this.bl()?new wT(43,e,this):new wT(1,e,this):this.bl()?new RO(42,this):new RO(0,this):F(i,156)?this.p=e==c9?new RO(40,this):this.Bb&512?(this.Bb&bY)==0?e?new wT(11,e,this):new RO(10,this):e?new wT(9,e,this):new RO(8,this):(this.Bb&bY)==0?e?new wT(15,e,this):new RO(14,this):e?new wT(13,e,this):new RO(12,this):r?(c=r.t,this.p=c>1||c==-1?this.bl()?(this.Bb&bY)==0?e?new xO(27,e,this,r):new yA(26,this,r):e?new xO(25,e,this,r):new yA(24,this,r):(this.Bb&bY)==0?e?new xO(31,e,this,r):new yA(30,this,r):e?new xO(29,e,this,r):new yA(28,this,r):this.bl()?(this.Bb&bY)==0?e?new xO(35,e,this,r):new yA(34,this,r):e?new xO(33,e,this,r):new yA(32,this,r):(this.Bb&bY)==0?e?new xO(39,e,this,r):new yA(38,this,r):e?new xO(37,e,this,r):new yA(36,this,r)):this.p=this.bl()?(this.Bb&bY)==0?e?new wT(19,e,this):new RO(18,this):e?new wT(17,e,this):new RO(16,this):(this.Bb&bY)==0?e?new wT(23,e,this):new RO(22,this):e?new wT(21,e,this):new RO(20,this):this.p=this._k()?this.bl()?new kve(L(i,29),this,r):new nEe(L(i,29),this,r):F(i,156)?e==c9?new RO(40,this):(this.Bb&bY)==0?e?new exe(t,s,this,(WGe(),o==q9?iHt:o==J9?$Vt:o==Y9?aHt:o==Q9?rHt:o==Z9?nHt:o==$9?sHt:o==X9?eHt:o==K9?tHt:oHt)):new bwe(L(i,156),t,s,this):e?new txe(t,s,this,(WGe(),o==q9?iHt:o==J9?$Vt:o==Y9?aHt:o==Q9?rHt:o==Z9?nHt:o==$9?sHt:o==X9?eHt:o==K9?tHt:oHt)):new xwe(L(i,156),t,s,this):this.al()?r?(this.Bb&bY)==0?this.bl()?new Mve(L(i,29),this,r):new TT(L(i,29),this,r):this.bl()?new Pve(L(i,29),this,r):new Nve(L(i,29),this,r):(this.Bb&bY)==0?this.bl()?new Kpe(L(i,29),this):new Gpe(L(i,29),this):this.bl()?new Ype(L(i,29),this):new qpe(L(i,29),this):this.bl()?r?(this.Bb&bY)==0?new Ave(L(i,29),this,r):new Fve(L(i,29),this,r):(this.Bb&bY)==0?new Jpe(L(i,29),this):new Xpe(L(i,29),this):r?(this.Bb&bY)==0?new jve(L(i,29),this,r):new Ive(L(i,29),this,r):(this.Bb&bY)==0?new pE(L(i,29),this):new Zpe(L(i,29),this)),this.p},Q.rk=function(){return(this.Bb&wU)!=0},Q._k=function(){return!1},Q.al=function(){return!1},Q.sk=function(){return(this.Bb&lU)!=0},Q.xk=function(){return hFe(this)},Q.bl=function(){return!1},Q.tk=function(){return(this.Bb&bY)!=0},Q.cl=function(e){this.k=e},Q.ui=function(e){oDe(this,e)},Q.Ib=function(){return sV(this)},Q.e=!1,Q.n=0,B(KJ,`EStructuralFeatureImpl`,462),J(331,462,{110:1,94:1,93:1,35:1,155:1,197:1,58:1,179:1,69:1,114:1,481:1,54:1,99:1,331:1,158:1,462:1,292:1,119:1,120:1,692:1},b_),Q.Lh=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 cw(),!!(this.Bb&256);case 3:return cw(),!!(this.Bb&512);case 4:return kF(this.s);case 5:return kF(this.t);case 6:return cw(),!!T4e(this);case 7:return cw(),i=this.s,i>=1;case 8:return t?LR(this):this.r;case 9:return this.q;case 10:return cw(),(this.Bb&wU)!=0;case 11:return cw(),(this.Bb&xY)!=0;case 12:return cw(),(this.Bb&bW)!=0;case 13:return this.j;case 14:return PB(this);case 15:return cw(),(this.Bb&bY)!=0;case 16:return cw(),(this.Bb&lU)!=0;case 17:return dk(this);case 18:return cw(),(this.Bb&GJ)!=0;case 19:return t?sBe(this):BMe(this)}return Tj(this,e-MD((RH(),J7)),sM((r=L(iP(this,16),29),r||J7),e),t,n)},Q.Wh=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);case 3:return!(this.Bb&512);case 4:return this.s!=0;case 5:return this.t!=1;case 6:return T4e(this);case 7:return n=this.s,n>=1;case 8:return!!this.r&&!this.q.e&&LD(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&LD(this.q).i==0);case 10:return(this.Bb&wU)==0;case 11:return(this.Bb&xY)!=0;case 12:return(this.Bb&bW)!=0;case 13:return this.j!=null;case 14:return PB(this)!=null;case 15:return(this.Bb&bY)!=0;case 16:return(this.Bb&lU)!=0;case 17:return!!dk(this);case 18:return(this.Bb&GJ)!=0;case 19:return!!BMe(this)}return cA(this,e-MD((RH(),J7)),sM((t=L(iP(this,16),29),t||J7),e))},Q.bi=function(e,t){var n,r;switch(e){case 0:!this.Ab&&(this.Ab=new R(j7,this,0,3)),sH(this.Ab),!this.Ab&&(this.Ab=new R(j7,this,0,3)),CD(this.Ab,L(t,16));return;case 1:oDe(this,Ow(t));return;case 2:BF(this,Y_(Dw(t)));return;case 3:HF(this,Y_(Dw(t)));return;case 4:RM(this,L(t,17).a);return;case 5:mae(this,L(t,17).a);return;case 8:yF(this,L(t,142));return;case 9:r=pz(this,L(t,89),null),r&&r.oj();return;case 10:$F(this,Y_(Dw(t)));return;case 11:nI(this,Y_(Dw(t)));return;case 12:eI(this,Y_(Dw(t)));return;case 13:Sle(this,Ow(t));return;case 15:tI(this,Y_(Dw(t)));return;case 16:dI(this,Y_(Dw(t)));return;case 18:uI(this,Y_(Dw(t)));return}OI(this,e-MD((RH(),J7)),sM((n=L(iP(this,16),29),n||J7),e),t)},Q.ii=function(){return RH(),J7},Q.ki=function(e){var t,n;switch(e){case 0:!this.Ab&&(this.Ab=new R(j7,this,0,3)),sH(this.Ab);return;case 1:F(this.Cb,90)&&$z(PA(L(this.Cb,90)),4),ON(this,null);return;case 2:BF(this,!0);return;case 3:HF(this,!0);return;case 4:RM(this,0);return;case 5:this.b=0,zM(this,1);return;case 8:yF(this,null);return;case 9:n=pz(this,null,null),n&&n.oj();return;case 10:$F(this,!0);return;case 11:nI(this,!1);return;case 12:eI(this,!1);return;case 13:this.i=null,mN(this,null);return;case 15:tI(this,!1);return;case 16:dI(this,!1);return;case 18:uI(this,!1);return}zF(this,e-MD((RH(),J7)),sM((t=L(iP(this,16),29),t||J7),e))},Q.pi=function(){sBe(this),cO(Rj((Wz(),p9),this)),LR(this),this.Bb|=1},Q.Jk=function(){return T4e(this)},Q.Yk=function(e,t){return this.b=0,this.a=null,CUe(this,e,t)},Q.Zk=function(e){mae(this,e)},Q.Ib=function(){var e;return this.Db&64?sV(this):(e=new XC(sV(this)),e.a+=` (iD: `,Ay(e,(this.Bb&GJ)!=0),e.a+=`)`,e.a)},Q.b=0,B(KJ,`EAttributeImpl`,331),J(364,448,{110:1,94:1,93:1,142:1,155:1,197:1,58:1,114:1,54:1,99:1,364:1,158:1,119:1,120:1,691:1}),Q.dl=function(e){return e.Dh()==this},Q.Ah=function(e){return xR(this,e)},Q.Bh=function(e,t){this.w=null,this.Db=t<<16|this.Db&255,this.Cb=e},Q.Lh=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 vR(this);case 4:return this.ik();case 5:return this.F;case 6:return t?bM(this):lk(this);case 7:return!this.A&&(this.A=new zC(W7,this,7)),this.A}return Tj(this,e-MD(this.ii()),sM((r=L(iP(this,16),29),r||this.ii()),e),t,n)},Q.Sh=function(e,t,n){var r,i,a;switch(t){case 0:return!this.Ab&&(this.Ab=new R(j7,this,0,3)),KI(this.Ab,e,n);case 6:return this.Cb&&(n=(i=this.Db>>16,i>=0?xR(this,n):this.Cb.Th(this,-1-i,null,n))),TV(this,e,6,n)}return a=L(sM((r=L(iP(this,16),29),r||this.ii()),t),69),a.wk().zk(this,cL(this),t-MD(this.ii()),e,n)},Q.Uh=function(e,t,n){var r,i;switch(t){case 0:return!this.Ab&&(this.Ab=new R(j7,this,0,3)),LL(this.Ab,e,n);case 6:return TV(this,null,6,n);case 7:return!this.A&&(this.A=new zC(W7,this,7)),LL(this.A,e,n)}return i=L(sM((r=L(iP(this,16),29),r||this.ii()),t),69),i.wk().Ak(this,cL(this),t-MD(this.ii()),e,n)},Q.Wh=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!!vR(this);case 4:return this.ik()!=null;case 5:return this.F!=null&&this.F!=this.D&&this.F!=this.B;case 6:return!!lk(this);case 7:return!!this.A&&this.A.i!=0}return cA(this,e-MD(this.ii()),sM((t=L(iP(this,16),29),t||this.ii()),e))},Q.bi=function(e,t){var n;switch(e){case 0:!this.Ab&&(this.Ab=new R(j7,this,0,3)),sH(this.Ab),!this.Ab&&(this.Ab=new R(j7,this,0,3)),CD(this.Ab,L(t,16));return;case 1:bk(this,Ow(t));return;case 2:rC(this,Ow(t));return;case 5:mH(this,Ow(t));return;case 7:!this.A&&(this.A=new zC(W7,this,7)),sH(this.A),!this.A&&(this.A=new zC(W7,this,7)),CD(this.A,L(t,16));return}OI(this,e-MD(this.ii()),sM((n=L(iP(this,16),29),n||this.ii()),e),t)},Q.ii=function(){return RH(),LVt},Q.ki=function(e){var t;switch(e){case 0:!this.Ab&&(this.Ab=new R(j7,this,0,3)),sH(this.Ab);return;case 1:F(this.Cb,184)&&(L(this.Cb,184).tb=null),ON(this,null);return;case 2:oF(this,null),BM(this,this.D);return;case 5:mH(this,null);return;case 7:!this.A&&(this.A=new zC(W7,this,7)),sH(this.A);return}zF(this,e-MD(this.ii()),sM((t=L(iP(this,16),29),t||this.ii()),e))},Q.hk=function(){var e;return this.G==-1&&(this.G=(e=bM(this),e?BL(e.vi(),this):-1)),this.G},Q.ik=function(){return null},Q.jk=function(){return bM(this)},Q.el=function(){return this.v},Q.kk=function(){return vR(this)},Q.lk=function(){return this.D==null?this.B:this.D},Q.mk=function(){return this.F},Q.fk=function(e){return srt(this,e)},Q.fl=function(e){this.v=e},Q.gl=function(e){ORe(this,e)},Q.hl=function(e){this.C=e},Q.ui=function(e){bk(this,e)},Q.Ib=function(){return zI(this)},Q.C=null,Q.D=null,Q.G=-1,B(KJ,`EClassifierImpl`,364),J(90,364,{110:1,94:1,93:1,29:1,142:1,155:1,197:1,58:1,114:1,54:1,99:1,90:1,364:1,158:1,482:1,119:1,120:1,691:1},Bf),Q.dl=function(e){return hhe(this,e.Dh())},Q.Lh=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 vR(this);case 4:return null;case 5:return this.F;case 6:return t?bM(this):lk(this);case 7:return!this.A&&(this.A=new zC(W7,this,7)),this.A;case 8:return cw(),!!(this.Bb&256);case 9:return cw(),!!(this.Bb&512);case 10:return HO(this);case 11:return!this.q&&(this.q=new R(B7,this,11,10)),this.q;case 12:return qV(this);case 13:return UV(this);case 14:return UV(this),this.r;case 15:return qV(this),this.k;case 16:return J0e(this);case 17:return $rt(this);case 18:return PV(this);case 19:return jB(this);case 20:return qV(this),this.o;case 21:return!this.s&&(this.s=new R(N7,this,21,17)),this.s;case 22:return mA(this);case 23:return P9e(this)}return Tj(this,e-MD((RH(),Y7)),sM((r=L(iP(this,16),29),r||Y7),e),t,n)},Q.Sh=function(e,t,n){var r,i,a;switch(t){case 0:return!this.Ab&&(this.Ab=new R(j7,this,0,3)),KI(this.Ab,e,n);case 6:return this.Cb&&(n=(i=this.Db>>16,i>=0?xR(this,n):this.Cb.Th(this,-1-i,null,n))),TV(this,e,6,n);case 11:return!this.q&&(this.q=new R(B7,this,11,10)),KI(this.q,e,n);case 21:return!this.s&&(this.s=new R(N7,this,21,17)),KI(this.s,e,n)}return a=L(sM((r=L(iP(this,16),29),r||(RH(),Y7)),t),69),a.wk().zk(this,cL(this),t-MD((RH(),Y7)),e,n)},Q.Uh=function(e,t,n){var r,i;switch(t){case 0:return!this.Ab&&(this.Ab=new R(j7,this,0,3)),LL(this.Ab,e,n);case 6:return TV(this,null,6,n);case 7:return!this.A&&(this.A=new zC(W7,this,7)),LL(this.A,e,n);case 11:return!this.q&&(this.q=new R(B7,this,11,10)),LL(this.q,e,n);case 21:return!this.s&&(this.s=new R(N7,this,21,17)),LL(this.s,e,n);case 22:return LL(mA(this),e,n)}return i=L(sM((r=L(iP(this,16),29),r||(RH(),Y7)),t),69),i.wk().Ak(this,cL(this),t-MD((RH(),Y7)),e,n)},Q.Wh=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!!vR(this);case 4:return!1;case 5:return this.F!=null&&this.F!=this.D&&this.F!=this.B;case 6:return!!lk(this);case 7:return!!this.A&&this.A.i!=0;case 8:return!!(this.Bb&256);case 9:return!!(this.Bb&512);case 10:return!!this.u&&mA(this.u.a).i!=0&&!(this.n&&tR(this.n));case 11:return!!this.q&&this.q.i!=0;case 12:return qV(this).i!=0;case 13:return UV(this).i!=0;case 14:return UV(this),this.r.i!=0;case 15:return qV(this),this.k.i!=0;case 16:return J0e(this).i!=0;case 17:return $rt(this).i!=0;case 18:return PV(this).i!=0;case 19:return jB(this).i!=0;case 20:return qV(this),!!this.o;case 21:return!!this.s&&this.s.i!=0;case 22:return!!this.n&&tR(this.n);case 23:return P9e(this).i!=0}return cA(this,e-MD((RH(),Y7)),sM((t=L(iP(this,16),29),t||Y7),e))},Q.Zh=function(e){return(this.i==null||this.q&&this.q.i!=0?null:VB(this,e))||kct(this,e)},Q.bi=function(e,t){var n;switch(e){case 0:!this.Ab&&(this.Ab=new R(j7,this,0,3)),sH(this.Ab),!this.Ab&&(this.Ab=new R(j7,this,0,3)),CD(this.Ab,L(t,16));return;case 1:bk(this,Ow(t));return;case 2:rC(this,Ow(t));return;case 5:mH(this,Ow(t));return;case 7:!this.A&&(this.A=new zC(W7,this,7)),sH(this.A),!this.A&&(this.A=new zC(W7,this,7)),CD(this.A,L(t,16));return;case 8:FUe(this,Y_(Dw(t)));return;case 9:IUe(this,Y_(Dw(t)));return;case 10:cH(HO(this)),CD(HO(this),L(t,16));return;case 11:!this.q&&(this.q=new R(B7,this,11,10)),sH(this.q),!this.q&&(this.q=new R(B7,this,11,10)),CD(this.q,L(t,16));return;case 21:!this.s&&(this.s=new R(N7,this,21,17)),sH(this.s),!this.s&&(this.s=new R(N7,this,21,17)),CD(this.s,L(t,16));return;case 22:sH(mA(this)),CD(mA(this),L(t,16));return}OI(this,e-MD((RH(),Y7)),sM((n=L(iP(this,16),29),n||Y7),e),t)},Q.ii=function(){return RH(),Y7},Q.ki=function(e){var t;switch(e){case 0:!this.Ab&&(this.Ab=new R(j7,this,0,3)),sH(this.Ab);return;case 1:F(this.Cb,184)&&(L(this.Cb,184).tb=null),ON(this,null);return;case 2:oF(this,null),BM(this,this.D);return;case 5:mH(this,null);return;case 7:!this.A&&(this.A=new zC(W7,this,7)),sH(this.A);return;case 8:FUe(this,!1);return;case 9:IUe(this,!1);return;case 10:this.u&&cH(this.u);return;case 11:!this.q&&(this.q=new R(B7,this,11,10)),sH(this.q);return;case 21:!this.s&&(this.s=new R(N7,this,21,17)),sH(this.s);return;case 22:this.n&&sH(this.n);return}zF(this,e-MD((RH(),Y7)),sM((t=L(iP(this,16),29),t||Y7),e))},Q.pi=function(){var e,t;if(qV(this),UV(this),J0e(this),$rt(this),PV(this),jB(this),P9e(this),zA(Uve(PA(this))),this.s)for(e=0,t=this.s.i;e<t;++e)vw(W(this.s,e));if(this.q)for(e=0,t=this.q.i;e<t;++e)vw(W(this.q,e));FF((Wz(),p9),this).xe(),this.Bb|=1},Q.Ib=function(){return iQe(this)},Q.k=null,Q.r=null;var l9,qVt,JVt;B(KJ,`EClassImpl`,90),J(2092,2091,Hvt),Q.Ei=function(e,t){return hrt(this,e,t)},Q.Fi=function(e){return hrt(this,this.i,e)},Q.Gi=function(e,t){v3e(this,e,t)},Q.Hi=function(e){I3e(this,e)},Q.Wk=function(e,t){return KI(this,e,t)},Q.$i=function(e){return hPe(this,e)},Q.Xk=function(e,t){return LL(this,e,t)},Q.Xi=function(e,t){return qrt(this,e,t)},Q.Ii=function(){return new pw(this)},Q.Ji=function(){return new mw(this)},Q.Ki=function(e){return eN(this,e)},B(yY,`NotifyingInternalEListImpl`,2092),J(632,2092,AY),Q.Hc=function(e){return kat(this,e)},Q.Ij=function(e,t,n,r,i){return mk(this,e,t,n,r,i)},Q.Jj=function(e){Ug(this,e)},Q.Fk=function(e){return this},Q.Lk=function(){return sM(this.e.Dh(),this.Lj())},Q.Kj=function(){return this.Lk()},Q.Lj=function(){return RI(this.e.Dh(),this.Lk())},Q.il=function(){return L(this.Lk().Hk(),29).kk()},Q.jl=function(){return ZL(L(this.Lk(),19)).n},Q.jj=function(){return this.e},Q.kl=function(){return!0},Q.ll=function(){return!1},Q.ml=function(){return!1},Q.nl=function(){return!1},Q.dd=function(e){return BL(this,e)},Q.Nj=function(e,t){var n;return n=L(e,54),this.ml()?this.kl()?n.Rh(this.e,this.jl(),this.il(),t):n.Rh(this.e,RI(n.Dh(),ZL(L(this.Lk(),19))),null,t):n.Rh(this.e,-1-this.Lj(),null,t)},Q.Oj=function(e,t){var n;return n=L(e,54),this.ml()?this.kl()?n.Th(this.e,this.jl(),this.il(),t):n.Th(this.e,RI(n.Dh(),ZL(L(this.Lk(),19))),null,t):n.Th(this.e,-1-this.Lj(),null,t)},Q.al=function(){return!1},Q.ol=function(){return!0},Q.fk=function(e){return bAe(this.d,e)},Q.Pj=function(){return $S(this.e)},Q.Qj=function(){return this.i!=0},Q.aj=function(e){return VM(this.d,e)},Q.Wi=function(e,t){return this.ol()&&this.nl()?hB(this,e,L(t,58)):t},Q.pl=function(e){return e.Vh()?CF(this.e,L(e,54)):e},Q.Wb=function(e){Lde(this,e)},Q.Pc=function(){return jPe(this)},Q.Qc=function(e){var t;if(this.nl())for(t=this.i-1;t>=0;--t)W(this,t);return LGe(this,e)},Q.Gk=function(){sH(this)},Q.Zi=function(e,t){return eLe(this,e,t)},B(yY,`EcoreEList`,632),J(505,632,AY,LT),Q.Li=function(){return!1},Q.Lj=function(){return this.c},Q.Mj=function(){return!1},Q.ol=function(){return!0},Q.Si=function(){return!0},Q.Wi=function(e,t){return t},Q.Yi=function(){return!1},Q.c=0,B(yY,`EObjectEList`,505),J(83,505,AY,LC),Q.Mj=function(){return!0},Q.ml=function(){return!1},Q.al=function(){return!0},B(yY,`EObjectContainmentEList`,83),J(555,83,AY,RC),Q.Ni=function(){this.b=!0},Q.Qj=function(){return this.b},Q.Gk=function(){var e;sH(this),$S(this.e)?(e=this.b,this.b=!1,tP(this.e,new FA(this.e,2,this.c,e,!1))):this.b=!1},Q.b=!1,B(yY,`EObjectContainmentEList/Unsettable`,555),J(1161,555,AY,Qbe),Q.Ti=function(e,t){var n,r;return n=L(ZF(this,e,t),89),$S(this.e)&&Ug(this,new _j(this.a,7,(RH(),RVt),kF(t),(r=n.c,F(r,90)?L(r,29):t9),e)),n},Q.Uj=function(e,t){return JGe(this,L(e,89),t)},Q.Vj=function(e,t){return qGe(this,L(e,89),t)},Q.Wj=function(e,t,n){return FZe(this,L(e,89),L(t,89),n)},Q.Ij=function(e,t,n,r,i){switch(e){case 3:return mk(this,e,t,n,r,this.i>1);case 5:return mk(this,e,t,n,r,this.i-L(n,15).gc()>0);default:return new Vj(this.e,e,this.c,t,n,r,!0)}},Q.Tj=function(){return!0},Q.Qj=function(){return tR(this)},Q.Gk=function(){sH(this)},B(KJ,`EClassImpl/1`,1161),J(1175,1174,vvt),Q.dj=function(e){var t,n=e.gj(),r,i,a,o,s;if(n!=8){if(r=Sqe(e),r==0)switch(n){case 1:case 9:s=e.kj(),s!=null&&(t=PA(L(s,482)),!t.c&&(t.c=new ql),Xj(t.c,e.jj())),o=e.ij(),o!=null&&(i=L(o,482),i.Bb&1||(t=PA(i),!t.c&&(t.c=new ql),uj(t.c,L(e.jj(),29))));break;case 3:o=e.ij(),o!=null&&(i=L(o,482),i.Bb&1||(t=PA(i),!t.c&&(t.c=new ql),uj(t.c,L(e.jj(),29))));break;case 5:if(o=e.ij(),o!=null)for(a=L(o,16).Kc();a.Ob();)i=L(a.Pb(),482),i.Bb&1||(t=PA(i),!t.c&&(t.c=new ql),uj(t.c,L(e.jj(),29)));break;case 4:s=e.kj(),s!=null&&(i=L(s,482),i.Bb&1||(t=PA(i),!t.c&&(t.c=new ql),Xj(t.c,e.jj())));break;case 6:if(s=e.kj(),s!=null)for(a=L(s,16).Kc();a.Ob();)i=L(a.Pb(),482),i.Bb&1||(t=PA(i),!t.c&&(t.c=new ql),Xj(t.c,e.jj()))}this.ql(r)}},Q.ql=function(e){uet(this,e)},Q.b=63,B(KJ,`ESuperAdapter`,1175),J(1176,1175,vvt,pre),Q.ql=function(e){$z(this,e)},B(KJ,`EClassImpl/10`,1176),J(1165,710,AY),Q.Ei=function(e,t){return fz(this,e,t)},Q.Fi=function(e){return JJe(this,e)},Q.Gi=function(e,t){IF(this,e,t)},Q.Hi=function(e){RA(this,e)},Q.$i=function(e){return hPe(this,e)},Q.Xi=function(e,t){return gFe(this,e,t)},Q.Wk=function(e,t){throw A(new Ng)},Q.Ii=function(){return new pw(this)},Q.Ji=function(){return new mw(this)},Q.Ki=function(e){return eN(this,e)},Q.Xk=function(e,t){throw A(new Ng)},Q.Fk=function(e){return this},Q.Qj=function(){return this.i!=0},Q.Wb=function(e){throw A(new Ng)},Q.Gk=function(){throw A(new Ng)},B(yY,`EcoreEList/UnmodifiableEList`,1165),J(328,1165,AY,zS),Q.Yi=function(){return!1},B(yY,`EcoreEList/UnmodifiableEList/FastCompare`,328),J(1168,328,AY,$Be),Q.dd=function(e){var t,n,r;if(F(e,179)&&(t=L(e,179),n=t.Lj(),n!=-1)){for(r=this.i;n<r;++n)if(P(this.g[n])===P(e))return n}return-1},B(KJ,`EClassImpl/1EAllStructuralFeaturesList`,1168),J(1162,506,uY,kl),Q.aj=function(e){return U(z7,Uvt,89,e,0,1)},Q.Yi=function(){return!1},B(KJ,`EClassImpl/1EGenericSuperTypeEList`,1162),J(633,506,uY,Al),Q.aj=function(e){return U(N7,kY,179,e,0,1)},Q.Yi=function(){return!1},B(KJ,`EClassImpl/1EStructuralFeatureUniqueEList`,633),J(755,506,uY,jl),Q.aj=function(e){return U(U7,kY,19,e,0,1)},Q.Yi=function(){return!1},B(KJ,`EClassImpl/1ReferenceList`,755),J(1163,506,uY,mre),Q.Mi=function(e,t){Txe(this,L(t,35))},Q.aj=function(e){return U(P7,kY,35,e,0,1)},Q.Yi=function(){return!1},B(KJ,`EClassImpl/2`,1163),J(1164,506,uY,Ml),Q.aj=function(e){return U(P7,kY,35,e,0,1)},Q.Yi=function(){return!1},B(KJ,`EClassImpl/3`,1164),J(1166,328,AY,Eye),Q.Fc=function(e){return KAe(this,L(e,35))},Q.Hi=function(e){Foe(this,L(e,35))},B(KJ,`EClassImpl/4`,1166),J(1167,328,AY,Tye),Q.Fc=function(e){return qAe(this,L(e,19))},Q.Hi=function(e){Ioe(this,L(e,19))},B(KJ,`EClassImpl/5`,1167),J(1169,506,uY,Nl),Q.aj=function(e){return U(B7,Vvt,62,e,0,1)},Q.Yi=function(){return!1},B(KJ,`EClassImpl/6`,1169),J(1170,506,uY,Pl),Q.aj=function(e){return U(U7,kY,19,e,0,1)},Q.Yi=function(){return!1},B(KJ,`EClassImpl/7`,1170),J(2095,2094,{3:1,4:1,20:1,31:1,56:1,16:1,15:1,70:1,61:1,71:1}),Q.Ei=function(e,t){return Gnt(this,e,t)},Q.Fi=function(e){return Gnt(this,this.Ej(),e)},Q.Gi=function(e,t){K3e(this,e,t)},Q.Hi=function(e){_3e(this,e)},Q.Wk=function(e,t){return YJe(this,e,t)},Q.Xk=function(e,t){return tJe(this,e,t)},Q.Xi=function(e,t){return Knt(this,e,t)},Q.$i=function(e){return this.xj(e)},Q.Ii=function(){return new pw(this)},Q.pj=function(){return this.sj()},Q.Ji=function(){return new mw(this)},Q.Ki=function(e){return eN(this,e)},B(yY,`DelegatingNotifyingInternalEListImpl`,2095),J(756,2095,Wvt),Q.Li=function(){var e=sM(UO(this.b),this.Lj()).Hk();return F(e,156)&&!F(e,469)&&!(e.kk().i&1)},Q.Hc=function(e){var t,n,r,i,a,o,s,c;if(this.ol()){if(c=this.Ej(),c>4){if(this.fk(e)){if(this.al()){if(r=L(e,54),n=r.Eh(),s=n==this.b&&(this.ml()?r.yh(r.Fh(),L(sM(UO(this.b),this.Lj()).Hk(),29).kk())==ZL(L(sM(UO(this.b),this.Lj()),19)).n:-1-r.Fh()==this.Lj()),this.nl()&&!s&&!n&&r.Jh()){for(i=0;i<c;++i)if(t=nD(this,this.xj(i)),P(t)===P(e))return!0}return s}if(this.ml()&&!this.ll()){if(a=L(e,58).Mh(ZL(L(sM(UO(this.b),this.Lj()),19))),P(a)===P(this.b))return!0;if(a==null||!L(a,58).Vh())return!1}}else return!1}if(o=this.uj(e),this.nl()&&!o){for(i=0;i<c;++i)if(r=nD(this,this.xj(i)),P(r)===P(e))return!0}return o}return this.uj(e)},Q.Ij=function(e,t,n,r,i){return new Vj(this.b,e,this.Lj(),t,n,r,i)},Q.Jj=function(e){tP(this.b,e)},Q.Fk=function(e){return this},Q.Kj=function(){return sM(UO(this.b),this.Lj())},Q.Lj=function(){return RI(UO(this.b),sM(UO(this.b),this.Lj()))},Q.jj=function(){return this.b},Q.kl=function(){return!!sM(UO(this.b),this.Lj()).Hk().kk()},Q.Mj=function(){var e,t=sM(UO(this.b),this.Lj());return F(t,102)?(e=L(t,19),(e.Bb&GJ)!=0||!!ZL(L(t,19))):!1},Q.ll=function(){var e,t=sM(UO(this.b),this.Lj()),n,r;return F(t,102)?(e=L(t,19),n=ZL(e),!!n&&(r=n.t,r>1||r==-1)):!1},Q.ml=function(){var e,t=sM(UO(this.b),this.Lj()),n;return F(t,102)?(e=L(t,19),n=ZL(e),!!n):!1},Q.nl=function(){var e,t=sM(UO(this.b),this.Lj());return F(t,102)?(e=L(t,19),(e.Bb&CW)!=0):!1},Q.dd=function(e){var t,n,r=this.zj(e),i;if(r>=0)return r;if(this.ol()){for(n=0,i=this.Ej();n<i;++n)if(t=nD(this,this.xj(n)),P(t)===P(e))return n}return-1},Q.Nj=function(e,t){var n;return n=L(e,54),this.ml()?this.kl()?n.Rh(this.b,ZL(L(sM(UO(this.b),this.Lj()),19)).n,L(sM(UO(this.b),this.Lj()).Hk(),29).kk(),t):n.Rh(this.b,RI(n.Dh(),ZL(L(sM(UO(this.b),this.Lj()),19))),null,t):n.Rh(this.b,-1-this.Lj(),null,t)},Q.Oj=function(e,t){var n;return n=L(e,54),this.ml()?this.kl()?n.Th(this.b,ZL(L(sM(UO(this.b),this.Lj()),19)).n,L(sM(UO(this.b),this.Lj()).Hk(),29).kk(),t):n.Th(this.b,RI(n.Dh(),ZL(L(sM(UO(this.b),this.Lj()),19))),null,t):n.Th(this.b,-1-this.Lj(),null,t)},Q.al=function(){var e,t=sM(UO(this.b),this.Lj());return F(t,102)?(e=L(t,19),(e.Bb&GJ)!=0):!1},Q.ol=function(){return F(sM(UO(this.b),this.Lj()).Hk(),90)},Q.fk=function(e){return sM(UO(this.b),this.Lj()).Hk().fk(e)},Q.Pj=function(){return $S(this.b)},Q.Qj=function(){return!this.Aj()},Q.Si=function(){return sM(UO(this.b),this.Lj()).Si()},Q.Wi=function(e,t){return fH(this,e,t)},Q.Wb=function(e){cH(this),CD(this,L(e,15))},Q.Pc=function(){var e;if(this.nl())for(e=this.Ej()-1;e>=0;--e)fH(this,e,this.xj(e));return this.Fj()},Q.Qc=function(e){var t;if(this.nl())for(t=this.Ej()-1;t>=0;--t)fH(this,t,this.xj(t));return this.Gj(e)},Q.Gk=function(){cH(this)},Q.Zi=function(e,t){return gPe(this,e,t)},B(yY,`DelegatingEcoreEList`,756),J(1171,756,Wvt,Ime),Q.qj=function(e,t){Lpe(this,e,L(t,29))},Q.rj=function(e){Kue(this,L(e,29))},Q.xj=function(e){var t,n;return t=L(W(mA(this.a),e),89),n=t.c,F(n,90)?L(n,29):(RH(),t9)},Q.Cj=function(e){var t,n;return t=L(QB(mA(this.a),e),89),n=t.c,F(n,90)?L(n,29):(RH(),t9)},Q.Dj=function(e,t){return XJe(this,e,L(t,29))},Q.Li=function(){return!1},Q.Ij=function(e,t,n,r,i){return null},Q.sj=function(){return new Gh(this)},Q.tj=function(){sH(mA(this.a))},Q.uj=function(e){return RUe(this,e)},Q.vj=function(e){var t,n;for(n=e.Kc();n.Ob();)if(t=n.Pb(),!RUe(this,t))return!1;return!0},Q.wj=function(e){var t,n,r;if(F(e,15)&&(r=L(e,15),r.gc()==mA(this.a).i)){for(t=r.Kc(),n=new UC(this);t.Ob();)if(P(t.Pb())!==P(TL(n)))return!1;return!0}return!1},Q.yj=function(){var e,t,n=1,r,i;for(t=new UC(mA(this.a));t.e!=t.i.gc();)e=L(TL(t),89),r=(i=e.c,F(i,90)?L(i,29):(RH(),t9)),n=31*n+(r?ow(r):0);return n},Q.zj=function(e){var t,n,r=0,i;for(n=new UC(mA(this.a));n.e!=n.i.gc();){if(t=L(TL(n),89),P(e)===P((i=t.c,F(i,90)?L(i,29):(RH(),t9))))return r;++r}return-1},Q.Aj=function(){return mA(this.a).i==0},Q.Bj=function(){return null},Q.Ej=function(){return mA(this.a).i},Q.Fj=function(){var e,t,n,r,i,a=mA(this.a).i;for(i=U(mX,JH,1,a,5,1),n=0,t=new UC(mA(this.a));t.e!=t.i.gc();)e=L(TL(t),89),i[n++]=(r=e.c,F(r,90)?L(r,29):(RH(),t9));return i},Q.Gj=function(e){var t,n,r,i,a,o,s=mA(this.a).i;for(e.length<s&&(i=VM(mF(e).c,s),e=i),e.length>s&&PD(e,s,null),r=0,n=new UC(mA(this.a));n.e!=n.i.gc();)t=L(TL(n),89),a=(o=t.c,F(o,90)?L(o,29):(RH(),t9)),PD(e,r++,a);return e},Q.Hj=function(){var e,t,n,r,i=new Ev;for(i.a+=`[`,e=mA(this.a),t=0,r=mA(this.a).i;t<r;)kS(i,YC((n=L(W(e,t),89).c,F(n,90)?L(n,29):(RH(),t9)))),++t<r&&(i.a+=qH);return i.a+=`]`,i.a},Q.Jj=function(e){},Q.Lj=function(){return 10},Q.kl=function(){return!0},Q.Mj=function(){return!1},Q.ll=function(){return!1},Q.ml=function(){return!1},Q.nl=function(){return!0},Q.al=function(){return!1},Q.ol=function(){return!0},Q.fk=function(e){return F(e,90)},Q.Qj=function(){return JOe(this.a)},Q.Si=function(){return!0},Q.Yi=function(){return!0},B(KJ,`EClassImpl/8`,1171),J(1172,2062,DU,Gh),Q.fd=function(e){return eN(this.a,e)},Q.gc=function(){return mA(this.a.a).i},B(KJ,`EClassImpl/8/1`,1172),J(1173,506,uY,Fl),Q.aj=function(e){return U(F7,JH,142,e,0,1)},Q.Yi=function(){return!1},B(KJ,`EClassImpl/9`,1173),J(1160,49,cdt,Zre),B(KJ,`EClassImpl/MyHashSet`,1160),J(577,364,{110:1,94:1,93:1,142:1,156:1,847:1,155:1,197:1,58:1,114:1,54:1,99:1,364:1,158:1,119:1,120:1,691:1},zg),Q.Lh=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 vR(this);case 4:return this.ik();case 5:return this.F;case 6:return t?bM(this):lk(this);case 7:return!this.A&&(this.A=new zC(W7,this,7)),this.A;case 8:return cw(),!!(this.Bb&256)}return Tj(this,e-MD(this.ii()),sM((r=L(iP(this,16),29),r||this.ii()),e),t,n)},Q.Wh=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!!vR(this);case 4:return this.ik()!=null;case 5:return this.F!=null&&this.F!=this.D&&this.F!=this.B;case 6:return!!lk(this);case 7:return!!this.A&&this.A.i!=0;case 8:return!(this.Bb&256)}return cA(this,e-MD(this.ii()),sM((t=L(iP(this,16),29),t||this.ii()),e))},Q.bi=function(e,t){var n;switch(e){case 0:!this.Ab&&(this.Ab=new R(j7,this,0,3)),sH(this.Ab),!this.Ab&&(this.Ab=new R(j7,this,0,3)),CD(this.Ab,L(t,16));return;case 1:bk(this,Ow(t));return;case 2:rC(this,Ow(t));return;case 5:mH(this,Ow(t));return;case 7:!this.A&&(this.A=new zC(W7,this,7)),sH(this.A),!this.A&&(this.A=new zC(W7,this,7)),CD(this.A,L(t,16));return;case 8:VF(this,Y_(Dw(t)));return}OI(this,e-MD(this.ii()),sM((n=L(iP(this,16),29),n||this.ii()),e),t)},Q.ii=function(){return RH(),zVt},Q.ki=function(e){var t;switch(e){case 0:!this.Ab&&(this.Ab=new R(j7,this,0,3)),sH(this.Ab);return;case 1:F(this.Cb,184)&&(L(this.Cb,184).tb=null),ON(this,null);return;case 2:oF(this,null),BM(this,this.D);return;case 5:mH(this,null);return;case 7:!this.A&&(this.A=new zC(W7,this,7)),sH(this.A);return;case 8:VF(this,!0);return}zF(this,e-MD(this.ii()),sM((t=L(iP(this,16),29),t||this.ii()),e))},Q.pi=function(){FF((Wz(),p9),this).xe(),this.Bb|=1},Q.ok=function(){var e,t,n;if(!this.c&&(e=X6e(bM(this)),!e.dc()))for(n=e.Kc();n.Ob();)t=Ow(n.Pb()),EV(this,t)&&aWe(this);return this.b},Q.ik=function(){var e;if(!this.e){e=null;try{e=vR(this)}catch(e){if(e=SP(e),!F(e,103))throw A(e)}this.d=null,e&&e.i&1&&(this.d=e==J9?(cw(),TX):e==q9?kF(0):e==Q9?new um(0):e==Z9?0:e==Y9?fL(0):e==$9?AF(0):e==X9?Wj(0):lP(0)),this.e=!0}return this.d},Q.nk=function(){return!!(this.Bb&256)},Q.rl=function(e){e&&(this.D=`org.eclipse.emf.common.util.AbstractEnumerator`)},Q.gl=function(e){ORe(this,e),this.rl(e)},Q.hl=function(e){this.C=e,this.e=!1},Q.Ib=function(){var e;return this.Db&64?zI(this):(e=new XC(zI(this)),e.a+=` (serializable: `,Ay(e,!!(this.Bb&256)),e.a+=`)`,e.a)},Q.c=!1,Q.d=null,Q.e=!1,B(KJ,`EDataTypeImpl`,577),J(469,577,{110:1,94:1,93:1,142:1,156:1,847:1,685:1,155:1,197:1,58:1,114:1,54:1,99:1,364:1,469:1,158:1,119:1,120:1,691:1},Qre),Q.Lh=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 vR(this);case 4:return pHe(this);case 5:return this.F;case 6:return t?bM(this):lk(this);case 7:return!this.A&&(this.A=new zC(W7,this,7)),this.A;case 8:return cw(),!!(this.Bb&256);case 9:return!this.a&&(this.a=new R(R7,this,9,5)),this.a}return Tj(this,e-MD((RH(),X7)),sM((r=L(iP(this,16),29),r||X7),e),t,n)},Q.Sh=function(e,t,n){var r,i,a;switch(t){case 0:return!this.Ab&&(this.Ab=new R(j7,this,0,3)),KI(this.Ab,e,n);case 6:return this.Cb&&(n=(i=this.Db>>16,i>=0?xR(this,n):this.Cb.Th(this,-1-i,null,n))),TV(this,e,6,n);case 9:return!this.a&&(this.a=new R(R7,this,9,5)),KI(this.a,e,n)}return a=L(sM((r=L(iP(this,16),29),r||(RH(),X7)),t),69),a.wk().zk(this,cL(this),t-MD((RH(),X7)),e,n)},Q.Uh=function(e,t,n){var r,i;switch(t){case 0:return!this.Ab&&(this.Ab=new R(j7,this,0,3)),LL(this.Ab,e,n);case 6:return TV(this,null,6,n);case 7:return!this.A&&(this.A=new zC(W7,this,7)),LL(this.A,e,n);case 9:return!this.a&&(this.a=new R(R7,this,9,5)),LL(this.a,e,n)}return i=L(sM((r=L(iP(this,16),29),r||(RH(),X7)),t),69),i.wk().Ak(this,cL(this),t-MD((RH(),X7)),e,n)},Q.Wh=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!!vR(this);case 4:return!!pHe(this);case 5:return this.F!=null&&this.F!=this.D&&this.F!=this.B;case 6:return!!lk(this);case 7:return!!this.A&&this.A.i!=0;case 8:return!(this.Bb&256);case 9:return!!this.a&&this.a.i!=0}return cA(this,e-MD((RH(),X7)),sM((t=L(iP(this,16),29),t||X7),e))},Q.bi=function(e,t){var n;switch(e){case 0:!this.Ab&&(this.Ab=new R(j7,this,0,3)),sH(this.Ab),!this.Ab&&(this.Ab=new R(j7,this,0,3)),CD(this.Ab,L(t,16));return;case 1:bk(this,Ow(t));return;case 2:rC(this,Ow(t));return;case 5:mH(this,Ow(t));return;case 7:!this.A&&(this.A=new zC(W7,this,7)),sH(this.A),!this.A&&(this.A=new zC(W7,this,7)),CD(this.A,L(t,16));return;case 8:VF(this,Y_(Dw(t)));return;case 9:!this.a&&(this.a=new R(R7,this,9,5)),sH(this.a),!this.a&&(this.a=new R(R7,this,9,5)),CD(this.a,L(t,16));return}OI(this,e-MD((RH(),X7)),sM((n=L(iP(this,16),29),n||X7),e),t)},Q.ii=function(){return RH(),X7},Q.ki=function(e){var t;switch(e){case 0:!this.Ab&&(this.Ab=new R(j7,this,0,3)),sH(this.Ab);return;case 1:F(this.Cb,184)&&(L(this.Cb,184).tb=null),ON(this,null);return;case 2:oF(this,null),BM(this,this.D);return;case 5:mH(this,null);return;case 7:!this.A&&(this.A=new zC(W7,this,7)),sH(this.A);return;case 8:VF(this,!0);return;case 9:!this.a&&(this.a=new R(R7,this,9,5)),sH(this.a);return}zF(this,e-MD((RH(),X7)),sM((t=L(iP(this,16),29),t||X7),e))},Q.pi=function(){var e,t;if(this.a)for(e=0,t=this.a.i;e<t;++e)vw(W(this.a,e));FF((Wz(),p9),this).xe(),this.Bb|=1},Q.ik=function(){return pHe(this)},Q.fk=function(e){return e!=null},Q.rl=function(e){},B(KJ,`EEnumImpl`,469),J(582,448,{110:1,94:1,93:1,2039:1,694:1,155:1,197:1,58:1,114:1,54:1,99:1,582:1,158:1,119:1,120:1},Rg),Q.xe=function(){return this.zb},Q.Ah=function(e){return xXe(this,e)},Q.Lh=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 kF(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,685):null}return Tj(this,e-MD((RH(),Z7)),sM((r=L(iP(this,16),29),r||Z7),e),t,n)},Q.Sh=function(e,t,n){var r,i,a;switch(t){case 0:return!this.Ab&&(this.Ab=new R(j7,this,0,3)),KI(this.Ab,e,n);case 5:return this.Cb&&(n=(i=this.Db>>16,i>=0?xXe(this,n):this.Cb.Th(this,-1-i,null,n))),TV(this,e,5,n)}return a=L(sM((r=L(iP(this,16),29),r||(RH(),Z7)),t),69),a.wk().zk(this,cL(this),t-MD((RH(),Z7)),e,n)},Q.Uh=function(e,t,n){var r,i;switch(t){case 0:return!this.Ab&&(this.Ab=new R(j7,this,0,3)),LL(this.Ab,e,n);case 5:return TV(this,null,5,n)}return i=L(sM((r=L(iP(this,16),29),r||(RH(),Z7)),t),69),i.wk().Ak(this,cL(this),t-MD((RH(),Z7)),e,n)},Q.Wh=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,685))}return cA(this,e-MD((RH(),Z7)),sM((t=L(iP(this,16),29),t||Z7),e))},Q.bi=function(e,t){var n;switch(e){case 0:!this.Ab&&(this.Ab=new R(j7,this,0,3)),sH(this.Ab),!this.Ab&&(this.Ab=new R(j7,this,0,3)),CD(this.Ab,L(t,16));return;case 1:ON(this,Ow(t));return;case 2:ZIe(this,L(t,17).a);return;case 3:n3e(this,L(t,2039));return;case 4:cN(this,Ow(t));return}OI(this,e-MD((RH(),Z7)),sM((n=L(iP(this,16),29),n||Z7),e),t)},Q.ii=function(){return RH(),Z7},Q.ki=function(e){var t;switch(e){case 0:!this.Ab&&(this.Ab=new R(j7,this,0,3)),sH(this.Ab);return;case 1:ON(this,null);return;case 2:ZIe(this,0);return;case 3:n3e(this,null);return;case 4:cN(this,null);return}zF(this,e-MD((RH(),Z7)),sM((t=L(iP(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(KJ,`EEnumLiteralImpl`,582);var YVt=YT(KJ,`EFactoryImpl/InternalEDateTimeFormat`);J(499,1,{2114:1},Kh),B(KJ,`EFactoryImpl/1ClientInternalEDateTimeFormat`,499),J(248,120,{110:1,94:1,93:1,89:1,58:1,114:1,54:1,99:1,248:1,119:1,120:1},cg),Q.Ch=function(e,t,n){var r;return n=TV(this,e,t,n),this.e&&F(e,179)&&(r=AB(this,this.e),r!=this.c&&(n=hH(this,r,n))),n},Q.Lh=function(e,t,n){var r;switch(e){case 0:return this.f;case 1:return!this.d&&(this.d=new LC(z7,this,1)),this.d;case 2:return t?kV(this):this.c;case 3:return this.b;case 4:return this.e;case 5:return t?iR(this):this.a}return Tj(this,e-MD((RH(),$7)),sM((r=L(iP(this,16),29),r||$7),e),t,n)},Q.Uh=function(e,t,n){var r,i;switch(t){case 0:return tUe(this,null,n);case 1:return!this.d&&(this.d=new LC(z7,this,1)),LL(this.d,e,n);case 3:return nUe(this,null,n)}return i=L(sM((r=L(iP(this,16),29),r||(RH(),$7)),t),69),i.wk().Ak(this,cL(this),t-MD((RH(),$7)),e,n)},Q.Wh=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 cA(this,e-MD((RH(),$7)),sM((t=L(iP(this,16),29),t||$7),e))},Q.bi=function(e,t){var n;switch(e){case 0:lQe(this,L(t,89));return;case 1:!this.d&&(this.d=new LC(z7,this,1)),sH(this.d),!this.d&&(this.d=new LC(z7,this,1)),CD(this.d,L(t,16));return;case 3:cQe(this,L(t,89));return;case 4:n1e(this,L(t,850));return;case 5:xM(this,L(t,142));return}OI(this,e-MD((RH(),$7)),sM((n=L(iP(this,16),29),n||$7),e),t)},Q.ii=function(){return RH(),$7},Q.ki=function(e){var t;switch(e){case 0:lQe(this,null);return;case 1:!this.d&&(this.d=new LC(z7,this,1)),sH(this.d);return;case 3:cQe(this,null);return;case 4:n1e(this,null);return;case 5:xM(this,null);return}zF(this,e-MD((RH(),$7)),sM((t=L(iP(this,16),29),t||$7),e))},Q.Ib=function(){var e=new ZC(SB(this));return e.a+=` (expression: `,$V(this,e),e.a+=`)`,e.a};var XVt;B(KJ,`EGenericTypeImpl`,248),J(2067,2062,PY),Q.Gi=function(e,t){kme(this,e,t)},Q.Wk=function(e,t){return kme(this,this.gc(),e),t},Q.$i=function(e){return AL(this.pj(),e)},Q.Ii=function(){return this.Ji()},Q.pj=function(){return new eg(this)},Q.Ji=function(){return this.Ki(0)},Q.Ki=function(e){return this.pj().fd(e)},Q.Xk=function(e,t){return LI(this,e,!0),t},Q.Ti=function(e,t){var n,r=NR(this,t);return n=this.fd(e),n.Rb(r),r},Q.Ui=function(e,t){var n;LI(this,t,!0),n=this.fd(e),n.Rb(t)},B(yY,`AbstractSequentialInternalEList`,2067),J(496,2067,PY,uw),Q.$i=function(e){return AL(this.pj(),e)},Q.Ii=function(){return this.b==null?(Pb(),Pb(),u9):this.sl()},Q.pj=function(){return new Qle(this.a,this.b)},Q.Ji=function(){return this.b==null?(Pb(),Pb(),u9):this.sl()},Q.Ki=function(e){var t,n;if(this.b==null){if(e<0||e>1)throw A(new $_(vY+e+`, size=0`));return Pb(),Pb(),u9}for(n=this.sl(),t=0;t<e;++t)sP(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.vl()||this.a.Xh(e)){if(a=this.a.Nh(e,!1),Fb(),L(e,69).xk()){for(t=L(a,160),r=0,i=t.gc();r<i;++r)if(iCe(t.Tl(r))&&t.Ul(r)!=null)return!1}else if(e.Jk()){if(!L(a,16).dc())return!1}else if(a!=null)return!1}}return!0},Q.Kc=function(){return lRe(this)},Q.fd=function(e){var t,n;if(this.b==null){if(e!=0)throw A(new $_(vY+e+`, size=0`));return Pb(),Pb(),u9}for(n=this.ul()?this.tl():this.sl(),t=0;t<e;++t)sP(n);return n},Q.Ti=function(e,t){throw A(new Ng)},Q.Ui=function(e,t){throw A(new Ng)},Q.sl=function(){return new dw(this.a,this.b)},Q.tl=function(){return new zpe(this.a,this.b)},Q.ul=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.vl()||this.a.Xh(e)){if(o=this.a.Nh(e,!1),Fb(),L(e,69).xk())for(t=L(o,160),r=0,a=t.gc();r<a;++r)iCe(t.Tl(r))&&t.Ul(r)!=null&&++i;else e.Jk()?i+=L(o,16).gc():o!=null&&++i}}return i},Q.vl=function(){return!0};var ZVt;B(yY,`EContentsEList`,496),J(1177,496,PY,Rpe),Q.sl=function(){return new Vpe(this.a,this.b)},Q.tl=function(){return new Bpe(this.a,this.b)},Q.vl=function(){return!1},B(KJ,`ENamedElementImpl/1`,1177),J(287,1,FY,dw),Q.Nb=function(e){eD(this,e)},Q.Rb=function(e){throw A(new Ng)},Q.wl=function(e){if(this.g!=0||this.e)throw A(new iv(`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?!k0e(this,this.p):!l3e(this))){for(;this.d<this.c.length;)if(t=this.c[this.d++],(!this.e||t.pk()!=$5||t.Lj()!=0)&&(!this.vl()||this.b.Xh(t))){if(a=this.b.Nh(t,this.ul()),this.f=(Fb(),L(t,69).xk()),this.f||t.Jk()){if(this.ul()?(r=L(a,15),this.k=r):(r=L(a,71),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.Ji():this.k.ed(),this.p?k0e(this,this.p):l3e(this))return i=this.p?this.p.Pb():this.j?this.j.$i(this.n++):this.k.Xb(this.n++),this.f?(e=L(i,76),e.Lk(),n=e.md(),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}return i=this.p?this.p.Pb():this.j?this.j.$i(this.n++):this.k.Xb(this.n++),this.f?(e=L(i,76),e.Lk(),n=e.md(),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?!A0e(this,this.p):!g2e(this))){for(;this.d>0;)if(t=this.c[--this.d],(!this.e||t.pk()!=$5||t.Lj()!=0)&&(!this.vl()||this.b.Xh(t))){if(a=this.b.Nh(t,this.ul()),this.f=(Fb(),L(t,69).xk()),this.f||t.Jk()){if(this.ul()?(r=L(a,15),this.k=r):(r=L(a,71),this.k=this.j=r),F(this.k,59)?(this.o=this.k.gc(),this.n=this.o):this.p=this.j?this.j.Ki(this.k.gc()):this.k.fd(this.k.gc()),this.p?A0e(this,this.p):g2e(this))return i=this.p?this.p.Ub():this.j?this.j.$i(--this.n):this.k.Xb(--this.n),this.f?(e=L(i,76),e.Lk(),n=e.md(),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}return i=this.p?this.p.Ub():this.j?this.j.$i(--this.n):this.k.Xb(--this.n),this.f?(e=L(i,76),e.Lk(),n=e.md(),this.i=n):(n=i,this.i=n),this.g=-3,!0}},Q.Pb=function(){return sP(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 A(new Ig)},Q.Vb=function(){return this.a-1},Q.Qb=function(){throw A(new Ng)},Q.ul=function(){return!1},Q.Wb=function(e){throw A(new Ng)},Q.vl=function(){return!0},Q.a=0,Q.d=0,Q.f=!1,Q.g=0,Q.n=0,Q.o=0;var u9;B(yY,`EContentsEList/FeatureIteratorImpl`,287),J(711,287,FY,zpe),Q.ul=function(){return!0},B(yY,`EContentsEList/ResolvingFeatureIteratorImpl`,711),J(1178,711,FY,Bpe),Q.vl=function(){return!1},B(KJ,`ENamedElementImpl/1/1`,1178),J(1179,287,FY,Vpe),Q.vl=function(){return!1},B(KJ,`ENamedElementImpl/1/2`,1179),J(39,152,_Y,_A,JAe,JE,gj,Vj,FA,rLe,NOe,iLe,POe,$je,FOe,sLe,IOe,eMe,LOe,aLe,ROe,YE,_j,Zwe,oLe,zOe,tMe,BOe),Q.Kj=function(){return $Ne(this)},Q.Rj=function(){var e=$Ne(this);return e?e.ik():null},Q.hj=function(e){return this.b==-1&&this.a&&(this.b=this.c.Hh(this.a.Lj(),this.a.pk())),this.c.yh(this.b,e)},Q.jj=function(){return this.c},Q.Sj=function(){var e=$Ne(this);return e?e.tk():!1},Q.b=-1,B(KJ,`ENotificationImpl`,39),J(411,292,{110:1,94:1,93:1,155:1,197:1,58:1,62:1,114:1,481:1,54:1,99:1,158:1,411:1,292:1,119:1,120:1},x_),Q.Ah=function(e){return PXe(this,e)},Q.Lh=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 cw(),!!(this.Bb&256);case 3:return cw(),!!(this.Bb&512);case 4:return kF(this.s);case 5:return kF(this.t);case 6:return cw(),a=this.t,a>1||a==-1;case 7:return cw(),i=this.s,i>=1;case 8:return t?LR(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 zC(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 Bw(this,this)),this.a;case 14:return Ij(this)}return Tj(this,e-MD((RH(),n9)),sM((r=L(iP(this,16),29),r||n9),e),t,n)},Q.Sh=function(e,t,n){var r,i,a;switch(t){case 0:return!this.Ab&&(this.Ab=new R(j7,this,0,3)),KI(this.Ab,e,n);case 10:return this.Cb&&(n=(i=this.Db>>16,i>=0?PXe(this,n):this.Cb.Th(this,-1-i,null,n))),TV(this,e,10,n);case 12:return!this.c&&(this.c=new R(H7,this,12,10)),KI(this.c,e,n)}return a=L(sM((r=L(iP(this,16),29),r||(RH(),n9)),t),69),a.wk().zk(this,cL(this),t-MD((RH(),n9)),e,n)},Q.Uh=function(e,t,n){var r,i;switch(t){case 0:return!this.Ab&&(this.Ab=new R(j7,this,0,3)),LL(this.Ab,e,n);case 9:return vSe(this,n);case 10:return TV(this,null,10,n);case 11:return!this.d&&(this.d=new zC(W7,this,11)),LL(this.d,e,n);case 12:return!this.c&&(this.c=new R(H7,this,12,10)),LL(this.c,e,n);case 14:return LL(Ij(this),e,n)}return i=L(sM((r=L(iP(this,16),29),r||(RH(),n9)),t),69),i.wk().Ak(this,cL(this),t-MD((RH(),n9)),e,n)},Q.Wh=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);case 3:return!(this.Bb&512);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&&LD(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&LD(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&&Ij(this.a.a).i!=0&&!(this.b&&nR(this.b));case 14:return!!this.b&&nR(this.b)}return cA(this,e-MD((RH(),n9)),sM((t=L(iP(this,16),29),t||n9),e))},Q.bi=function(e,t){var n,r;switch(e){case 0:!this.Ab&&(this.Ab=new R(j7,this,0,3)),sH(this.Ab),!this.Ab&&(this.Ab=new R(j7,this,0,3)),CD(this.Ab,L(t,16));return;case 1:ON(this,Ow(t));return;case 2:BF(this,Y_(Dw(t)));return;case 3:HF(this,Y_(Dw(t)));return;case 4:RM(this,L(t,17).a);return;case 5:zM(this,L(t,17).a);return;case 8:yF(this,L(t,142));return;case 9:r=pz(this,L(t,89),null),r&&r.oj();return;case 11:!this.d&&(this.d=new zC(W7,this,11)),sH(this.d),!this.d&&(this.d=new zC(W7,this,11)),CD(this.d,L(t,16));return;case 12:!this.c&&(this.c=new R(H7,this,12,10)),sH(this.c),!this.c&&(this.c=new R(H7,this,12,10)),CD(this.c,L(t,16));return;case 13:!this.a&&(this.a=new Bw(this,this)),cH(this.a),!this.a&&(this.a=new Bw(this,this)),CD(this.a,L(t,16));return;case 14:sH(Ij(this)),CD(Ij(this),L(t,16));return}OI(this,e-MD((RH(),n9)),sM((n=L(iP(this,16),29),n||n9),e),t)},Q.ii=function(){return RH(),n9},Q.ki=function(e){var t,n;switch(e){case 0:!this.Ab&&(this.Ab=new R(j7,this,0,3)),sH(this.Ab);return;case 1:ON(this,null);return;case 2:BF(this,!0);return;case 3:HF(this,!0);return;case 4:RM(this,0);return;case 5:zM(this,1);return;case 8:yF(this,null);return;case 9:n=pz(this,null,null),n&&n.oj();return;case 11:!this.d&&(this.d=new zC(W7,this,11)),sH(this.d);return;case 12:!this.c&&(this.c=new R(H7,this,12,10)),sH(this.c);return;case 13:this.a&&cH(this.a);return;case 14:this.b&&sH(this.b);return}zF(this,e-MD((RH(),n9)),sM((t=L(iP(this,16),29),t||n9),e))},Q.pi=function(){var e,t;if(this.c)for(e=0,t=this.c.i;e<t;++e)vw(W(this.c,e));LR(this),this.Bb|=1},B(KJ,`EOperationImpl`,411),J(513,756,Wvt,Bw),Q.qj=function(e,t){Upe(this,e,L(t,142))},Q.rj=function(e){que(this,L(e,142))},Q.xj=function(e){var t,n;return t=L(W(Ij(this.a),e),89),n=t.c,n||(RH(),e9)},Q.Cj=function(e){var t,n;return t=L(QB(Ij(this.a),e),89),n=t.c,n||(RH(),e9)},Q.Dj=function(e,t){return HKe(this,e,L(t,142))},Q.Li=function(){return!1},Q.Ij=function(e,t,n,r,i){return null},Q.sj=function(){return new hre(this)},Q.tj=function(){sH(Ij(this.a))},Q.uj=function(e){return WUe(this,e)},Q.vj=function(e){var t,n;for(n=e.Kc();n.Ob();)if(t=n.Pb(),!WUe(this,t))return!1;return!0},Q.wj=function(e){var t,n,r;if(F(e,15)&&(r=L(e,15),r.gc()==Ij(this.a).i)){for(t=r.Kc(),n=new UC(this);t.Ob();)if(P(t.Pb())!==P(TL(n)))return!1;return!0}return!1},Q.yj=function(){var e,t,n=1,r,i;for(t=new UC(Ij(this.a));t.e!=t.i.gc();)e=L(TL(t),89),r=(i=e.c,i||(RH(),e9)),n=31*n+(r?DN(r):0);return n},Q.zj=function(e){var t,n,r=0,i;for(n=new UC(Ij(this.a));n.e!=n.i.gc();){if(t=L(TL(n),89),P(e)===P((i=t.c,i||(RH(),e9))))return r;++r}return-1},Q.Aj=function(){return Ij(this.a).i==0},Q.Bj=function(){return null},Q.Ej=function(){return Ij(this.a).i},Q.Fj=function(){var e,t,n,r,i,a=Ij(this.a).i;for(i=U(mX,JH,1,a,5,1),n=0,t=new UC(Ij(this.a));t.e!=t.i.gc();)e=L(TL(t),89),i[n++]=(r=e.c,r||(RH(),e9));return i},Q.Gj=function(e){var t,n,r,i,a,o,s=Ij(this.a).i;for(e.length<s&&(i=VM(mF(e).c,s),e=i),e.length>s&&PD(e,s,null),r=0,n=new UC(Ij(this.a));n.e!=n.i.gc();)t=L(TL(n),89),a=(o=t.c,o||(RH(),e9)),PD(e,r++,a);return e},Q.Hj=function(){var e,t,n,r,i=new Ev;for(i.a+=`[`,e=Ij(this.a),t=0,r=Ij(this.a).i;t<r;)kS(i,YC((n=L(W(e,t),89).c,n||(RH(),e9)))),++t<r&&(i.a+=qH);return i.a+=`]`,i.a},Q.Jj=function(e){},Q.Lj=function(){return 13},Q.kl=function(){return!0},Q.Mj=function(){return!1},Q.ll=function(){return!1},Q.ml=function(){return!1},Q.nl=function(){return!0},Q.al=function(){return!1},Q.ol=function(){return!0},Q.fk=function(e){return F(e,142)},Q.Qj=function(){return YOe(this.a)},Q.Si=function(){return!0},Q.Yi=function(){return!0},B(KJ,`EOperationImpl/1`,513),J(1376,2062,DU,hre),Q.fd=function(e){return eN(this.a,e)},Q.gc=function(){return Ij(this.a.a).i},B(KJ,`EOperationImpl/1/1`,1376),J(1377,555,AY,$be),Q.Ti=function(e,t){var n,r;return n=L(ZF(this,e,t),89),$S(this.e)&&Ug(this,new _j(this.a,7,(RH(),HVt),kF(t),(r=n.c,r||e9),e)),n},Q.Uj=function(e,t){return TUe(this,L(e,89),t)},Q.Vj=function(e,t){return wUe(this,L(e,89),t)},Q.Wj=function(e,t,n){return yqe(this,L(e,89),L(t,89),n)},Q.Ij=function(e,t,n,r,i){switch(e){case 3:return mk(this,e,t,n,r,this.i>1);case 5:return mk(this,e,t,n,r,this.i-L(n,15).gc()>0);default:return new Vj(this.e,e,this.c,t,n,r,!0)}},Q.Tj=function(){return!0},Q.Qj=function(){return nR(this)},Q.Gk=function(){sH(this)},B(KJ,`EOperationImpl/2`,1377),J(507,1,{2037:1,507:1},Ole),B(KJ,`EPackageImpl/1`,507),J(14,83,AY,R),Q.il=function(){return this.d},Q.jl=function(){return this.b},Q.ml=function(){return!0},Q.b=0,B(yY,`EObjectContainmentWithInverseEList`,14),J(365,14,AY,Zw),Q.nl=function(){return!0},Q.Wi=function(e,t){return hB(this,e,L(t,58))},B(yY,`EObjectContainmentWithInverseEList/Resolving`,365),J(308,365,AY,ZE),Q.Ni=function(){this.a.tb=null},B(KJ,`EPackageImpl/2`,308),J(1278,1,{},Il),B(KJ,`EPackageImpl/3`,1278),J(733,45,AW,S_),Q._b=function(e){return yS(e)?oTe(this,e):!!vE(this.f,e)},B(KJ,`EPackageRegistryImpl`,733),J(518,292,{110:1,94:1,93:1,155:1,197:1,58:1,2116:1,114:1,481:1,54:1,99:1,158:1,518:1,292:1,119:1,120:1},C_),Q.Ah=function(e){return FXe(this,e)},Q.Lh=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 cw(),!!(this.Bb&256);case 3:return cw(),!!(this.Bb&512);case 4:return kF(this.s);case 5:return kF(this.t);case 6:return cw(),a=this.t,a>1||a==-1;case 7:return cw(),i=this.s,i>=1;case 8:return t?LR(this):this.r;case 9:return this.q;case 10:return this.Db>>16==10?L(this.Cb,62):null}return Tj(this,e-MD((RH(),i9)),sM((r=L(iP(this,16),29),r||i9),e),t,n)},Q.Sh=function(e,t,n){var r,i,a;switch(t){case 0:return!this.Ab&&(this.Ab=new R(j7,this,0,3)),KI(this.Ab,e,n);case 10:return this.Cb&&(n=(i=this.Db>>16,i>=0?FXe(this,n):this.Cb.Th(this,-1-i,null,n))),TV(this,e,10,n)}return a=L(sM((r=L(iP(this,16),29),r||(RH(),i9)),t),69),a.wk().zk(this,cL(this),t-MD((RH(),i9)),e,n)},Q.Uh=function(e,t,n){var r,i;switch(t){case 0:return!this.Ab&&(this.Ab=new R(j7,this,0,3)),LL(this.Ab,e,n);case 9:return vSe(this,n);case 10:return TV(this,null,10,n)}return i=L(sM((r=L(iP(this,16),29),r||(RH(),i9)),t),69),i.wk().Ak(this,cL(this),t-MD((RH(),i9)),e,n)},Q.Wh=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);case 3:return!(this.Bb&512);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&&LD(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&LD(this.q).i==0);case 10:return!!(this.Db>>16==10&&L(this.Cb,62))}return cA(this,e-MD((RH(),i9)),sM((t=L(iP(this,16),29),t||i9),e))},Q.ii=function(){return RH(),i9},B(KJ,`EParameterImpl`,518),J(102,462,{110:1,94:1,93:1,155:1,197:1,58:1,19:1,179:1,69:1,114:1,481:1,54:1,99:1,158:1,102:1,462:1,292:1,119:1,120:1,692:1},lme),Q.Lh=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 cw(),!!(this.Bb&256);case 3:return cw(),!!(this.Bb&512);case 4:return kF(this.s);case 5:return kF(this.t);case 6:return cw(),o=this.t,o>1||o==-1;case 7:return cw(),i=this.s,i>=1;case 8:return t?LR(this):this.r;case 9:return this.q;case 10:return cw(),(this.Bb&wU)!=0;case 11:return cw(),(this.Bb&xY)!=0;case 12:return cw(),(this.Bb&bW)!=0;case 13:return this.j;case 14:return PB(this);case 15:return cw(),(this.Bb&bY)!=0;case 16:return cw(),(this.Bb&lU)!=0;case 17:return dk(this);case 18:return cw(),(this.Bb&GJ)!=0;case 19:return cw(),a=ZL(this),!!(a&&(a.Bb&GJ)!=0);case 20:return cw(),(this.Bb&CW)!=0;case 21:return t?ZL(this):this.b;case 22:return t?oVe(this):lMe(this);case 23:return!this.a&&(this.a=new BC(P7,this,23)),this.a}return Tj(this,e-MD((RH(),a9)),sM((r=L(iP(this,16),29),r||a9),e),t,n)},Q.Wh=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);case 3:return!(this.Bb&512);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&&LD(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&LD(this.q).i==0);case 10:return(this.Bb&wU)==0;case 11:return(this.Bb&xY)!=0;case 12:return(this.Bb&bW)!=0;case 13:return this.j!=null;case 14:return PB(this)!=null;case 15:return(this.Bb&bY)!=0;case 16:return(this.Bb&lU)!=0;case 17:return!!dk(this);case 18:return(this.Bb&GJ)!=0;case 19:return r=ZL(this),!!r&&(r.Bb&GJ)!=0;case 20:return(this.Bb&CW)==0;case 21:return!!this.b;case 22:return!!lMe(this);case 23:return!!this.a&&this.a.i!=0}return cA(this,e-MD((RH(),a9)),sM((t=L(iP(this,16),29),t||a9),e))},Q.bi=function(e,t){var n,r;switch(e){case 0:!this.Ab&&(this.Ab=new R(j7,this,0,3)),sH(this.Ab),!this.Ab&&(this.Ab=new R(j7,this,0,3)),CD(this.Ab,L(t,16));return;case 1:oDe(this,Ow(t));return;case 2:BF(this,Y_(Dw(t)));return;case 3:HF(this,Y_(Dw(t)));return;case 4:RM(this,L(t,17).a);return;case 5:zM(this,L(t,17).a);return;case 8:yF(this,L(t,142));return;case 9:r=pz(this,L(t,89),null),r&&r.oj();return;case 10:$F(this,Y_(Dw(t)));return;case 11:nI(this,Y_(Dw(t)));return;case 12:eI(this,Y_(Dw(t)));return;case 13:Sle(this,Ow(t));return;case 15:tI(this,Y_(Dw(t)));return;case 16:dI(this,Y_(Dw(t)));return;case 18:sDe(this,Y_(Dw(t)));return;case 20:CWe(this,Y_(Dw(t)));return;case 21:oRe(this,L(t,19));return;case 23:!this.a&&(this.a=new BC(P7,this,23)),sH(this.a),!this.a&&(this.a=new BC(P7,this,23)),CD(this.a,L(t,16));return}OI(this,e-MD((RH(),a9)),sM((n=L(iP(this,16),29),n||a9),e),t)},Q.ii=function(){return RH(),a9},Q.ki=function(e){var t,n;switch(e){case 0:!this.Ab&&(this.Ab=new R(j7,this,0,3)),sH(this.Ab);return;case 1:F(this.Cb,90)&&$z(PA(L(this.Cb,90)),4),ON(this,null);return;case 2:BF(this,!0);return;case 3:HF(this,!0);return;case 4:RM(this,0);return;case 5:zM(this,1);return;case 8:yF(this,null);return;case 9:n=pz(this,null,null),n&&n.oj();return;case 10:$F(this,!0);return;case 11:nI(this,!1);return;case 12:eI(this,!1);return;case 13:this.i=null,mN(this,null);return;case 15:tI(this,!1);return;case 16:dI(this,!1);return;case 18:SWe(this,!1),F(this.Cb,90)&&$z(PA(L(this.Cb,90)),2);return;case 20:CWe(this,!0);return;case 21:oRe(this,null);return;case 23:!this.a&&(this.a=new BC(P7,this,23)),sH(this.a);return}zF(this,e-MD((RH(),a9)),sM((t=L(iP(this,16),29),t||a9),e))},Q.pi=function(){oVe(this),cO(Rj((Wz(),p9),this)),LR(this),this.Bb|=1},Q.uk=function(){return ZL(this)},Q._k=function(){var e;return e=ZL(this),!!e&&(e.Bb&GJ)!=0},Q.al=function(){return(this.Bb&GJ)!=0},Q.bl=function(){return(this.Bb&CW)!=0},Q.Yk=function(e,t){return this.c=null,CUe(this,e,t)},Q.Ib=function(){var e;return this.Db&64?sV(this):(e=new XC(sV(this)),e.a+=` (containment: `,Ay(e,(this.Bb&GJ)!=0),e.a+=`, resolveProxies: `,Ay(e,(this.Bb&CW)!=0),e.a+=`)`,e.a)},B(KJ,`EReferenceImpl`,102),J(561,120,{110:1,44:1,94:1,93:1,136:1,58:1,114:1,54:1,99:1,561:1,119:1,120:1},Ll),Q.Fb=function(e){return this===e},Q.ld=function(){return this.b},Q.md=function(){return this.c},Q.Hb=function(){return ow(this)},Q.Di=function(e){$ye(this,Ow(e))},Q.nd=function(e){return mye(this,Ow(e))},Q.Lh=function(e,t,n){var r;switch(e){case 0:return this.b;case 1:return this.c}return Tj(this,e-MD((RH(),o9)),sM((r=L(iP(this,16),29),r||o9),e),t,n)},Q.Wh=function(e){var t;switch(e){case 0:return this.b!=null;case 1:return this.c!=null}return cA(this,e-MD((RH(),o9)),sM((t=L(iP(this,16),29),t||o9),e))},Q.bi=function(e,t){var n;switch(e){case 0:ebe(this,Ow(t));return;case 1:KLe(this,Ow(t));return}OI(this,e-MD((RH(),o9)),sM((n=L(iP(this,16),29),n||o9),e),t)},Q.ii=function(){return RH(),o9},Q.ki=function(e){var t;switch(e){case 0:GLe(this,null);return;case 1:KLe(this,null);return}zF(this,e-MD((RH(),o9)),sM((t=L(iP(this,16),29),t||o9),e))},Q.Bi=function(){var e;return this.a==-1&&(e=this.b,this.a=e==null?0:KP(e)),this.a},Q.Ci=function(e){this.a=e},Q.Ib=function(){var e;return this.Db&64?SB(this):(e=new XC(SB(this)),e.a+=` (key: `,kS(e,this.b),e.a+=`, value: `,kS(e,this.c),e.a+=`)`,e.a)},Q.a=-1,Q.b=null,Q.c=null;var d9=B(KJ,`EStringToStringMapEntryImpl`,561),QVt=YT(yY,`FeatureMap/Entry/Internal`);J(576,1,IY),Q.xl=function(e){return this.yl(L(e,54))},Q.yl=function(e){return this.xl(e)},Q.Fb=function(e){var t,n;return this===e?!0:F(e,76)?(t=L(e,76),t.Lk()==this.c&&(n=this.md(),n==null?t.md()==null:RF(n,t.md()))):!1},Q.Lk=function(){return this.c},Q.Hb=function(){var e=this.md();return DN(this.c)^(e==null?0:DN(e))},Q.Ib=function(){var e=this.c,t=bM(e.qk()).yi();return e.xe(),(t!=null&&t.length!=0?t+`:`+e.xe():e.xe())+`=`+this.md()},B(KJ,`EStructuralFeatureImpl/BasicFeatureMapEntry`,576),J(791,576,IY,Lme),Q.yl=function(e){return new Lme(this.c,e)},Q.md=function(){return this.a},Q.zl=function(e,t,n){return nze(this,e,this.a,t,n)},Q.Al=function(e,t,n){return rze(this,e,this.a,t,n)},B(KJ,`EStructuralFeatureImpl/ContainmentUpdatingFeatureMapEntry`,791),J(1350,1,{},kle),Q.yk=function(e,t,n,r,i){return L(bj(e,this.b),220).Yl(this.a).Fk(r)},Q.zk=function(e,t,n,r,i){return L(bj(e,this.b),220).Pl(this.a,r,i)},Q.Ak=function(e,t,n,r,i){return L(bj(e,this.b),220).Ql(this.a,r,i)},Q.Bk=function(e,t,n){return L(bj(e,this.b),220).Yl(this.a).Qj()},Q.Ck=function(e,t,n,r){L(bj(e,this.b),220).Yl(this.a).Wb(r)},Q.Dk=function(e,t,n){return L(bj(e,this.b),220).Yl(this.a)},Q.Ek=function(e,t,n){L(bj(e,this.b),220).Yl(this.a).Gk()},B(KJ,`EStructuralFeatureImpl/InternalSettingDelegateFeatureMapDelegator`,1350),J(91,1,{},wT,xO,RO,yA),Q.yk=function(e,t,n,r,i){var a=t.li(n);if(a??t.mi(n,a=NH(this,e)),!i)switch(this.e){case 50:case 41:return L(a,597).bk();case 40:return L(a,220).Vl()}return a},Q.zk=function(e,t,n,r,i){var a,o=t.li(n);return o??t.mi(n,o=NH(this,e)),a=L(o,71).Wk(r,i),a},Q.Ak=function(e,t,n,r,i){var a=t.li(n);return a!=null&&(i=L(a,71).Xk(r,i)),i},Q.Bk=function(e,t,n){var r=t.li(n);return r!=null&&L(r,79).Qj()},Q.Ck=function(e,t,n,r){var i=L(t.li(n),79);!i&&t.mi(n,i=NH(this,e)),i.Wb(r)},Q.Dk=function(e,t,n){var r,i=t.li(n);return i??t.mi(n,i=NH(this,e)),F(i,79)?L(i,79):(r=L(t.li(n),15),new qh(r))},Q.Ek=function(e,t,n){var r=L(t.li(n),79);!r&&t.mi(n,r=NH(this,e)),r.Gk()},Q.b=0,Q.e=0,B(KJ,`EStructuralFeatureImpl/InternalSettingDelegateMany`,91),J(512,1,{}),Q.zk=function(e,t,n,r,i){throw A(new Ng)},Q.Ak=function(e,t,n,r,i){throw A(new Ng)},Q.Dk=function(e,t,n){return new ywe(this,e,t,n)};var f9;B(KJ,`EStructuralFeatureImpl/InternalSettingDelegateSingle`,512),J(1367,1,Lvt,ywe),Q.Fk=function(e){return this.a.yk(this.c,this.d,this.b,e,!0)},Q.Qj=function(){return this.a.Bk(this.c,this.d,this.b)},Q.Wb=function(e){this.a.Ck(this.c,this.d,this.b,e)},Q.Gk=function(){this.a.Ek(this.c,this.d,this.b)},Q.b=0,B(KJ,`EStructuralFeatureImpl/InternalSettingDelegateSingle/1`,1367),J(784,512,{},nEe),Q.yk=function(e,t,n,r,i){return mtt(e,e.Ph(),e.Fh())==this.b?this.bl()&&r?z3e(e):e.Ph():null},Q.zk=function(e,t,n,r,i){var a,o;return e.Ph()&&(i=(a=e.Fh(),a>=0?e.Ah(i):e.Ph().Th(e,-1-a,null,i))),o=RI(e.Dh(),this.e),e.Ch(r,o,i)},Q.Ak=function(e,t,n,r,i){var a=RI(e.Dh(),this.e);return e.Ch(null,a,i)},Q.Bk=function(e,t,n){var r=RI(e.Dh(),this.e);return!!e.Ph()&&e.Fh()==r},Q.Ck=function(e,t,n,r){var i,a,o,s,c;if(r!=null&&!srt(this.a,r))throw A(new nv(LY+(F(r,58)?iQe(L(r,58).Dh()):aIe(mF(r)))+RY+this.a+`'`));if(i=e.Ph(),o=RI(e.Dh(),this.e),P(r)!==P(i)||e.Fh()!=o&&r!=null){if(FR(e,L(r,58)))throw A(new rv(JJ+e.Ib()));c=null,i&&(c=(a=e.Fh(),a>=0?e.Ah(c):e.Ph().Th(e,-1-a,null,c))),s=L(r,54),s&&(c=s.Rh(e,RI(s.Dh(),this.b),null,c)),c=e.Ch(s,o,c),c&&c.oj()}else e.vh()&&e.wh()&&tP(e,new JE(e,1,o,r,r))},Q.Ek=function(e,t,n){var r=e.Ph(),i,a,o;r?(o=(i=e.Fh(),i>=0?e.Ah(null):e.Ph().Th(e,-1-i,null,null)),a=RI(e.Dh(),this.e),o=e.Ch(null,a,o),o&&o.oj()):e.vh()&&e.wh()&&tP(e,new YE(e,1,this.e,null,null))},Q.bl=function(){return!1},B(KJ,`EStructuralFeatureImpl/InternalSettingDelegateSingleContainer`,784),J(1351,784,{},kve),Q.bl=function(){return!0},B(KJ,`EStructuralFeatureImpl/InternalSettingDelegateSingleContainerResolving`,1351),J(574,512,{}),Q.yk=function(e,t,n,r,i){var a;return a=t.li(n),a==null?this.b:P(a)===P(f9)?null:a},Q.Bk=function(e,t,n){var r=t.li(n);return r!=null&&(P(r)===P(f9)||!RF(r,this.b))},Q.Ck=function(e,t,n,r){var i,a;e.vh()&&e.wh()?(i=(a=t.li(n),a==null?this.b:P(a)===P(f9)?null:a),r==null?this.c==null?this.b==null?t.mi(n,null):t.mi(n,f9):(t.mi(n,null),r=this.b):(this.Bl(r),t.mi(n,r)),tP(e,this.d.Cl(e,1,this.e,i,r))):r==null?this.c==null?this.b==null?t.mi(n,null):t.mi(n,f9):t.mi(n,null):(this.Bl(r),t.mi(n,r))},Q.Ek=function(e,t,n){var r,i;e.vh()&&e.wh()?(r=(i=t.li(n),i==null?this.b:P(i)===P(f9)?null:i),t.ni(n),tP(e,this.d.Cl(e,1,this.e,r,this.b))):t.ni(n)},Q.Bl=function(e){throw A(new kg)},B(KJ,`EStructuralFeatureImpl/InternalSettingDelegateSingleData`,574),J(zY,1,{},Rl),Q.Cl=function(e,t,n,r,i){return new YE(e,t,n,r,i)},Q.Dl=function(e,t,n,r,i,a){return new Zwe(e,t,n,r,i,a)};var $Vt,eHt,tHt,nHt,rHt,iHt,aHt,oHt,sHt;B(KJ,`EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator`,zY),J(1368,zY,{},zl),Q.Cl=function(e,t,n,r,i){return new tMe(e,t,n,Y_(Dw(r)),Y_(Dw(i)))},Q.Dl=function(e,t,n,r,i,a){return new BOe(e,t,n,Y_(Dw(r)),Y_(Dw(i)),a)},B(KJ,`EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/1`,1368),J(1369,zY,{},Bl),Q.Cl=function(e,t,n,r,i){return new rLe(e,t,n,L(r,222).a,L(i,222).a)},Q.Dl=function(e,t,n,r,i,a){return new NOe(e,t,n,L(r,222).a,L(i,222).a,a)},B(KJ,`EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/2`,1369),J(1370,zY,{},Vl),Q.Cl=function(e,t,n,r,i){return new iLe(e,t,n,L(r,180).a,L(i,180).a)},Q.Dl=function(e,t,n,r,i,a){return new POe(e,t,n,L(r,180).a,L(i,180).a,a)},B(KJ,`EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/3`,1370),J(1371,zY,{},Hl),Q.Cl=function(e,t,n,r,i){return new $je(e,t,n,j(I(r)),j(I(i)))},Q.Dl=function(e,t,n,r,i,a){return new FOe(e,t,n,j(I(r)),j(I(i)),a)},B(KJ,`EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/4`,1371),J(1372,zY,{},Ul),Q.Cl=function(e,t,n,r,i){return new sLe(e,t,n,L(r,161).a,L(i,161).a)},Q.Dl=function(e,t,n,r,i,a){return new IOe(e,t,n,L(r,161).a,L(i,161).a,a)},B(KJ,`EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/5`,1372),J(1373,zY,{},Wl),Q.Cl=function(e,t,n,r,i){return new eMe(e,t,n,L(r,17).a,L(i,17).a)},Q.Dl=function(e,t,n,r,i,a){return new LOe(e,t,n,L(r,17).a,L(i,17).a,a)},B(KJ,`EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/6`,1373),J(1374,zY,{},Gl),Q.Cl=function(e,t,n,r,i){return new aLe(e,t,n,L(r,168).a,L(i,168).a)},Q.Dl=function(e,t,n,r,i,a){return new ROe(e,t,n,L(r,168).a,L(i,168).a,a)},B(KJ,`EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/7`,1374),J(1375,zY,{},Kl),Q.Cl=function(e,t,n,r,i){return new oLe(e,t,n,L(r,191).a,L(i,191).a)},Q.Dl=function(e,t,n,r,i,a){return new zOe(e,t,n,L(r,191).a,L(i,191).a,a)},B(KJ,`EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/8`,1375),J(1353,574,{},bwe),Q.Bl=function(e){if(!this.a.fk(e))throw A(new nv(LY+mF(e)+RY+this.a+`'`))},B(KJ,`EStructuralFeatureImpl/InternalSettingDelegateSingleDataDynamic`,1353),J(1354,574,{},exe),Q.Bl=function(e){},B(KJ,`EStructuralFeatureImpl/InternalSettingDelegateSingleDataStatic`,1354),J(785,574,{}),Q.Bk=function(e,t,n){return t.li(n)!=null},Q.Ck=function(e,t,n,r){var i,a;e.vh()&&e.wh()?(i=!0,a=t.li(n),a==null?(i=!1,a=this.b):P(a)===P(f9)&&(a=null),r==null?this.c==null?t.mi(n,f9):(t.mi(n,null),r=this.b):(this.Bl(r),t.mi(n,r)),tP(e,this.d.Dl(e,1,this.e,a,r,!i))):r==null?this.c==null?t.mi(n,f9):t.mi(n,null):(this.Bl(r),t.mi(n,r))},Q.Ek=function(e,t,n){var r,i;e.vh()&&e.wh()?(r=!0,i=t.li(n),i==null?(r=!1,i=this.b):P(i)===P(f9)&&(i=null),t.ni(n),tP(e,this.d.Dl(e,2,this.e,i,this.b,r))):t.ni(n)},B(KJ,`EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettable`,785),J(1355,785,{},xwe),Q.Bl=function(e){if(!this.a.fk(e))throw A(new nv(LY+mF(e)+RY+this.a+`'`))},B(KJ,`EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettableDynamic`,1355),J(1356,785,{},txe),Q.Bl=function(e){},B(KJ,`EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettableStatic`,1356),J(410,512,{},pE),Q.yk=function(e,t,n,r,i){var a,o,s,c,l=t.li(n);if(this.tk()&&P(l)===P(f9))return null;if(this.bl()&&r&&l!=null){if(s=L(l,54),s.Vh()&&(c=CF(e,s),s!=c)){if(!srt(this.a,c))throw A(new nv(LY+mF(c)+RY+this.a+`'`));t.mi(n,l=c),this.al()&&(a=L(c,54),o=s.Th(e,this.b?RI(s.Dh(),this.b):-1-RI(e.Dh(),this.e),null,null),!a.Ph()&&(o=a.Rh(e,this.b?RI(a.Dh(),this.b):-1-RI(e.Dh(),this.e),null,o)),o&&o.oj()),e.vh()&&e.wh()&&tP(e,new YE(e,9,this.e,s,c))}return l}return l},Q.zk=function(e,t,n,r,i){var a,o=t.li(n);return P(o)===P(f9)&&(o=null),t.mi(n,r),this.Mj()?P(o)!==P(r)&&o!=null&&(a=L(o,54),i=a.Th(e,RI(a.Dh(),this.b),null,i)):this.al()&&o!=null&&(i=L(o,54).Th(e,-1-RI(e.Dh(),this.e),null,i)),e.vh()&&e.wh()&&(!i&&(i=new hy(4)),i.nj(new YE(e,1,this.e,o,r))),i},Q.Ak=function(e,t,n,r,i){var a=t.li(n);return P(a)===P(f9)&&(a=null),t.ni(n),e.vh()&&e.wh()&&(!i&&(i=new hy(4)),this.tk()?i.nj(new YE(e,2,this.e,a,null)):i.nj(new YE(e,1,this.e,a,null))),i},Q.Bk=function(e,t,n){return t.li(n)!=null},Q.Ck=function(e,t,n,r){var i,a,o,s,c;if(r!=null&&!srt(this.a,r))throw A(new nv(LY+(F(r,58)?iQe(L(r,58).Dh()):aIe(mF(r)))+RY+this.a+`'`));c=t.li(n),s=c!=null,this.tk()&&P(c)===P(f9)&&(c=null),o=null,this.Mj()?P(c)!==P(r)&&(c!=null&&(i=L(c,54),o=i.Th(e,RI(i.Dh(),this.b),null,o)),r!=null&&(i=L(r,54),o=i.Rh(e,RI(i.Dh(),this.b),null,o))):this.al()&&P(c)!==P(r)&&(c!=null&&(o=L(c,54).Th(e,-1-RI(e.Dh(),this.e),null,o)),r!=null&&(o=L(r,54).Rh(e,-1-RI(e.Dh(),this.e),null,o))),r==null&&this.tk()?t.mi(n,f9):t.mi(n,r),e.vh()&&e.wh()?(a=new Zwe(e,1,this.e,c,r,this.tk()&&!s),o?(o.nj(a),o.oj()):tP(e,a)):o&&o.oj()},Q.Ek=function(e,t,n){var r,i,a,o,s=t.li(n);o=s!=null,this.tk()&&P(s)===P(f9)&&(s=null),a=null,s!=null&&(this.Mj()?(r=L(s,54),a=r.Th(e,RI(r.Dh(),this.b),null,a)):this.al()&&(a=L(s,54).Th(e,-1-RI(e.Dh(),this.e),null,a))),t.ni(n),e.vh()&&e.wh()?(i=new Zwe(e,this.tk()?2:1,this.e,s,null,o),a?(a.nj(i),a.oj()):tP(e,i)):a&&a.oj()},Q.Mj=function(){return!1},Q.al=function(){return!1},Q.bl=function(){return!1},Q.tk=function(){return!1},B(KJ,`EStructuralFeatureImpl/InternalSettingDelegateSingleEObject`,410),J(575,410,{},Gpe),Q.al=function(){return!0},B(KJ,`EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainment`,575),J(1359,575,{},Kpe),Q.bl=function(){return!0},B(KJ,`EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentResolving`,1359),J(787,575,{},qpe),Q.tk=function(){return!0},B(KJ,`EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentUnsettable`,787),J(1361,787,{},Ype),Q.bl=function(){return!0},B(KJ,`EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentUnsettableResolving`,1361),J(650,575,{},TT),Q.Mj=function(){return!0},B(KJ,`EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverse`,650),J(1360,650,{},Mve),Q.bl=function(){return!0},B(KJ,`EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseResolving`,1360),J(788,650,{},Nve),Q.tk=function(){return!0},B(KJ,`EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseUnsettable`,788),J(1362,788,{},Pve),Q.bl=function(){return!0},B(KJ,`EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseUnsettableResolving`,1362),J(651,410,{},Jpe),Q.bl=function(){return!0},B(KJ,`EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolving`,651),J(1363,651,{},Xpe),Q.tk=function(){return!0},B(KJ,`EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingUnsettable`,1363),J(789,651,{},Ave),Q.Mj=function(){return!0},B(KJ,`EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingWithInverse`,789),J(1364,789,{},Fve),Q.tk=function(){return!0},B(KJ,`EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingWithInverseUnsettable`,1364),J(1357,410,{},Zpe),Q.tk=function(){return!0},B(KJ,`EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectUnsettable`,1357),J(786,410,{},jve),Q.Mj=function(){return!0},B(KJ,`EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectWithInverse`,786),J(1358,786,{},Ive),Q.tk=function(){return!0},B(KJ,`EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectWithInverseUnsettable`,1358),J(790,576,IY,ZSe),Q.yl=function(e){return new ZSe(this.a,this.c,e)},Q.md=function(){return this.b},Q.zl=function(e,t,n){return ONe(this,e,this.b,n)},Q.Al=function(e,t,n){return kNe(this,e,this.b,n)},B(KJ,`EStructuralFeatureImpl/InverseUpdatingFeatureMapEntry`,790),J(1365,1,Lvt,qh),Q.Fk=function(e){return this.a},Q.Qj=function(){return F(this.a,97)?L(this.a,97).Qj():!this.a.dc()},Q.Wb=function(e){this.a.$b(),this.a.Gc(L(e,15))},Q.Gk=function(){F(this.a,97)?L(this.a,97).Gk():this.a.$b()},B(KJ,`EStructuralFeatureImpl/SettingMany`,1365),J(1366,576,IY,XAe),Q.xl=function(e){return new Hw((dH(),A9),this.b.ri(this.a,e))},Q.md=function(){return null},Q.zl=function(e,t,n){return n},Q.Al=function(e,t,n){return n},B(KJ,`EStructuralFeatureImpl/SimpleContentFeatureMapEntry`,1366),J(652,576,IY,Hw),Q.xl=function(e){return new Hw(this.c,e)},Q.md=function(){return this.a},Q.zl=function(e,t,n){return n},Q.Al=function(e,t,n){return n},B(KJ,`EStructuralFeatureImpl/SimpleFeatureMapEntry`,652),J(403,506,uY,ql),Q.aj=function(e){return U(I7,JH,29,e,0,1)},Q.Yi=function(){return!1},B(KJ,`ESuperAdapter/1`,403),J(457,448,{110:1,94:1,93:1,155:1,197:1,58:1,114:1,850:1,54:1,99:1,158:1,457:1,119:1,120:1},Jl),Q.Lh=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 mE(this,z7,this)),this.a}return Tj(this,e-MD((RH(),s9)),sM((r=L(iP(this,16),29),r||s9),e),t,n)},Q.Uh=function(e,t,n){var r,i;switch(t){case 0:return!this.Ab&&(this.Ab=new R(j7,this,0,3)),LL(this.Ab,e,n);case 2:return!this.a&&(this.a=new mE(this,z7,this)),LL(this.a,e,n)}return i=L(sM((r=L(iP(this,16),29),r||(RH(),s9)),t),69),i.wk().Ak(this,cL(this),t-MD((RH(),s9)),e,n)},Q.Wh=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 cA(this,e-MD((RH(),s9)),sM((t=L(iP(this,16),29),t||s9),e))},Q.bi=function(e,t){var n;switch(e){case 0:!this.Ab&&(this.Ab=new R(j7,this,0,3)),sH(this.Ab),!this.Ab&&(this.Ab=new R(j7,this,0,3)),CD(this.Ab,L(t,16));return;case 1:ON(this,Ow(t));return;case 2:!this.a&&(this.a=new mE(this,z7,this)),sH(this.a),!this.a&&(this.a=new mE(this,z7,this)),CD(this.a,L(t,16));return}OI(this,e-MD((RH(),s9)),sM((n=L(iP(this,16),29),n||s9),e),t)},Q.ii=function(){return RH(),s9},Q.ki=function(e){var t;switch(e){case 0:!this.Ab&&(this.Ab=new R(j7,this,0,3)),sH(this.Ab);return;case 1:ON(this,null);return;case 2:!this.a&&(this.a=new mE(this,z7,this)),sH(this.a);return}zF(this,e-MD((RH(),s9)),sM((t=L(iP(this,16),29),t||s9),e))},B(KJ,`ETypeParameterImpl`,457),J(458,83,AY,mE),Q.Nj=function(e,t){return m$e(this,L(e,89),t)},Q.Oj=function(e,t){return h$e(this,L(e,89),t)},B(KJ,`ETypeParameterImpl/1`,458),J(647,45,AW,w_),Q.ec=function(){return new Xh(this)},B(KJ,`ETypeParameterImpl/2`,647),J(570,iU,aU,Xh),Q.Fc=function(e){return ghe(this,L(e,89))},Q.Gc=function(e){var t,n,r=!1;for(n=e.Kc();n.Ob();)t=L(n.Pb(),89),eO(this.a,t,``)??(r=!0);return r},Q.$b=function(){oD(this.a)},Q.Hc=function(e){return tD(this.a,e)},Q.Kc=function(){var e;return e=new QN(new cm(this.a).a),new Zh(e)},Q.Mc=function(e){return UMe(this,e)},Q.gc=function(){return tb(this.a)},B(KJ,`ETypeParameterImpl/2/1`,570),J(571,1,eU,Zh),Q.Nb=function(e){eD(this,e)},Q.Pb=function(){return L(vN(this.a).ld(),89)},Q.Ob=function(){return this.a.b},Q.Qb=function(){rFe(this.a)},B(KJ,`ETypeParameterImpl/2/1/1`,571),J(1329,45,AW,$re),Q._b=function(e){return yS(e)?oTe(this,e):!!vE(this.f,e)},Q.xc=function(e){var t=yS(e)?YO(this,e):vS(vE(this.f,e)),n;return F(t,851)?(n=L(t,851),t=n.Kk(),eO(this,L(e,241),t),t):t??(e==null?(dse(),hHt):null)},B(KJ,`EValidatorRegistryImpl`,1329),J(1349,720,{110:1,94:1,93:1,480:1,155:1,58:1,114:1,2040:1,54:1,99:1,158:1,119:1,120:1},Yl),Q.ri=function(e,t){switch(e.hk()){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:EI(t);case 25:return NIe(t);case 27:return PPe(t);case 28:return FPe(t);case 29:return t==null?null:wde(h7[0],L(t,206));case 41:return t==null?``:Dy(L(t,297));case 42:return EI(t);case 50:return Ow(t);default:throw A(new rv(YJ+e.xe()+XJ))}},Q.si=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=bM(e),f?BL(f.vi(),e):-1)),e.G){case 0:return n=new b_,n;case 1:return t=new Ol,t;case 2:return r=new Bf,r;case 4:return i=new zg,i;case 5:return a=new Qre,a;case 6:return o=new Rg,o;case 7:return s=new Vf,s;case 10:return l=new El,l;case 11:return u=new x_,u;case 12:return d=new Gwe,d;case 13:return p=new C_,p;case 14:return m=new lme,m;case 17:return h=new Ll,h;case 18:return c=new cg,c;case 19:return g=new Jl,g;default:throw A(new rv(i_t+e.zb+XJ))}},Q.ti=function(e,t){switch(e.hk()){case 20:return t==null?null:new Ly(t);case 21:return t==null?null:new lC(t);case 23:case 22:return t==null?null:kKe(t);case 26:case 24:return t==null?null:Wj(CV(t,-128,127)<<24>>24);case 25:return H6e(t);case 27:return UYe(t);case 28:return WYe(t);case 29:return G$e(t);case 32:case 31:return t==null?null:kz(t);case 38:case 37:return t==null?null:new Kg(t);case 40:case 39:return t==null?null:kF(CV(t,MU,UH));case 41:return null;case 42:return null;case 44:case 43:return t==null?null:fL(TH(t));case 49:case 48:return t==null?null:AF(CV(t,VY,32767)<<16>>16);case 50:return t;default:throw A(new rv(YJ+e.xe()+XJ))}},B(KJ,`EcoreFactoryImpl`,1349),J(560,184,{110:1,94:1,93:1,155:1,197:1,58:1,241:1,114:1,2038:1,54:1,99:1,158:1,184:1,560:1,119:1,120:1,690:1},DCe),Q.gb=!1,Q.hb=!1;var cHt,lHt=!1;B(KJ,`EcorePackageImpl`,560),J(1234,1,{851:1},Xl),Q.Kk=function(){return pfe(),gHt},B(KJ,`EcorePackageImpl/1`,1234),J(1243,1,GY,Zl),Q.fk=function(e){return F(e,155)},Q.gk=function(e){return U(o7,JH,155,e,0,1)},B(KJ,`EcorePackageImpl/10`,1243),J(1244,1,GY,Ql),Q.fk=function(e){return F(e,197)},Q.gk=function(e){return U(WBt,JH,197,e,0,1)},B(KJ,`EcorePackageImpl/11`,1244),J(1245,1,GY,$l),Q.fk=function(e){return F(e,58)},Q.gk=function(e){return U(Q5,JH,58,e,0,1)},B(KJ,`EcorePackageImpl/12`,1245),J(1246,1,GY,eu),Q.fk=function(e){return F(e,411)},Q.gk=function(e){return U(B7,Vvt,62,e,0,1)},B(KJ,`EcorePackageImpl/13`,1246),J(1247,1,GY,tu),Q.fk=function(e){return F(e,241)},Q.gk=function(e){return U(c7,JH,241,e,0,1)},B(KJ,`EcorePackageImpl/14`,1247),J(1248,1,GY,nu),Q.fk=function(e){return F(e,518)},Q.gk=function(e){return U(H7,JH,2116,e,0,1)},B(KJ,`EcorePackageImpl/15`,1248),J(1249,1,GY,ru),Q.fk=function(e){return F(e,102)},Q.gk=function(e){return U(U7,kY,19,e,0,1)},B(KJ,`EcorePackageImpl/16`,1249),J(1250,1,GY,iu),Q.fk=function(e){return F(e,179)},Q.gk=function(e){return U(N7,kY,179,e,0,1)},B(KJ,`EcorePackageImpl/17`,1250),J(1251,1,GY,au),Q.fk=function(e){return F(e,481)},Q.gk=function(e){return U(M7,JH,481,e,0,1)},B(KJ,`EcorePackageImpl/18`,1251),J(1252,1,GY,ou),Q.fk=function(e){return F(e,561)},Q.gk=function(e){return U(d9,Cvt,561,e,0,1)},B(KJ,`EcorePackageImpl/19`,1252),J(1235,1,GY,su),Q.fk=function(e){return F(e,331)},Q.gk=function(e){return U(P7,kY,35,e,0,1)},B(KJ,`EcorePackageImpl/2`,1235),J(1253,1,GY,cu),Q.fk=function(e){return F(e,248)},Q.gk=function(e){return U(z7,Uvt,89,e,0,1)},B(KJ,`EcorePackageImpl/20`,1253),J(1254,1,GY,lu),Q.fk=function(e){return F(e,457)},Q.gk=function(e){return U(W7,JH,850,e,0,1)},B(KJ,`EcorePackageImpl/21`,1254),J(1255,1,GY,uu),Q.fk=function(e){return bS(e)},Q.gk=function(e){return U(DX,cU,485,e,8,1)},B(KJ,`EcorePackageImpl/22`,1255),J(1256,1,GY,du),Q.fk=function(e){return F(e,195)},Q.gk=function(e){return U(X9,cU,195,e,0,2)},B(KJ,`EcorePackageImpl/23`,1256),J(1257,1,GY,fu),Q.fk=function(e){return F(e,222)},Q.gk=function(e){return U(OX,cU,222,e,0,1)},B(KJ,`EcorePackageImpl/24`,1257),J(1258,1,GY,pu),Q.fk=function(e){return F(e,180)},Q.gk=function(e){return U(kX,cU,180,e,0,1)},B(KJ,`EcorePackageImpl/25`,1258),J(1259,1,GY,mu),Q.fk=function(e){return F(e,206)},Q.gk=function(e){return U(CX,cU,206,e,0,1)},B(KJ,`EcorePackageImpl/26`,1259),J(1260,1,GY,hu),Q.fk=function(e){return!1},Q.gk=function(e){return U(dUt,JH,2215,e,0,1)},B(KJ,`EcorePackageImpl/27`,1260),J(1261,1,GY,gu),Q.fk=function(e){return xS(e)},Q.gk=function(e){return U(AX,cU,345,e,7,1)},B(KJ,`EcorePackageImpl/28`,1261),J(1262,1,GY,_u),Q.fk=function(e){return F(e,61)},Q.gk=function(e){return U(uVt,hG,61,e,0,1)},B(KJ,`EcorePackageImpl/29`,1262),J(1236,1,GY,vu),Q.fk=function(e){return F(e,519)},Q.gk=function(e){return U(j7,{3:1,4:1,5:1,2033:1},598,e,0,1)},B(KJ,`EcorePackageImpl/3`,1236),J(1263,1,GY,yu),Q.fk=function(e){return F(e,582)},Q.gk=function(e){return U(vVt,JH,2039,e,0,1)},B(KJ,`EcorePackageImpl/30`,1263),J(1264,1,GY,bu),Q.fk=function(e){return F(e,160)},Q.gk=function(e){return U(mHt,hG,160,e,0,1)},B(KJ,`EcorePackageImpl/31`,1264),J(1265,1,GY,xu),Q.fk=function(e){return F(e,76)},Q.gk=function(e){return U(c9,eyt,76,e,0,1)},B(KJ,`EcorePackageImpl/32`,1265),J(1266,1,GY,Su),Q.fk=function(e){return F(e,161)},Q.gk=function(e){return U(jX,cU,161,e,0,1)},B(KJ,`EcorePackageImpl/33`,1266),J(1267,1,GY,Cu),Q.fk=function(e){return F(e,17)},Q.gk=function(e){return U(MX,cU,17,e,0,1)},B(KJ,`EcorePackageImpl/34`,1267),J(1268,1,GY,wu),Q.fk=function(e){return F(e,297)},Q.gk=function(e){return U(rbt,JH,297,e,0,1)},B(KJ,`EcorePackageImpl/35`,1268),J(1269,1,GY,Tu),Q.fk=function(e){return F(e,168)},Q.gk=function(e){return U(NX,cU,168,e,0,1)},B(KJ,`EcorePackageImpl/36`,1269),J(1270,1,GY,Eu),Q.fk=function(e){return F(e,85)},Q.gk=function(e){return U(obt,JH,85,e,0,1)},B(KJ,`EcorePackageImpl/37`,1270),J(1271,1,GY,Du),Q.fk=function(e){return F(e,599)},Q.gk=function(e){return U(uHt,JH,599,e,0,1)},B(KJ,`EcorePackageImpl/38`,1271),J(1272,1,GY,Ou),Q.fk=function(e){return!1},Q.gk=function(e){return U(fUt,JH,2216,e,0,1)},B(KJ,`EcorePackageImpl/39`,1272),J(1237,1,GY,ku),Q.fk=function(e){return F(e,90)},Q.gk=function(e){return U(I7,JH,29,e,0,1)},B(KJ,`EcorePackageImpl/4`,1237),J(1273,1,GY,Au),Q.fk=function(e){return F(e,191)},Q.gk=function(e){return U(PX,cU,191,e,0,1)},B(KJ,`EcorePackageImpl/40`,1273),J(1274,1,GY,ju),Q.fk=function(e){return yS(e)},Q.gk=function(e){return U(FX,cU,2,e,6,1)},B(KJ,`EcorePackageImpl/41`,1274),J(1275,1,GY,Mu),Q.fk=function(e){return F(e,596)},Q.gk=function(e){return U(fVt,JH,596,e,0,1)},B(KJ,`EcorePackageImpl/42`,1275),J(1276,1,GY,Nu),Q.fk=function(e){return!1},Q.gk=function(e){return U(pUt,cU,2217,e,0,1)},B(KJ,`EcorePackageImpl/43`,1276),J(1277,1,GY,Pu),Q.fk=function(e){return F(e,44)},Q.gk=function(e){return U(vX,_U,44,e,0,1)},B(KJ,`EcorePackageImpl/44`,1277),J(1238,1,GY,Fu),Q.fk=function(e){return F(e,142)},Q.gk=function(e){return U(F7,JH,142,e,0,1)},B(KJ,`EcorePackageImpl/5`,1238),J(1239,1,GY,Iu),Q.fk=function(e){return F(e,156)},Q.gk=function(e){return U(MVt,JH,156,e,0,1)},B(KJ,`EcorePackageImpl/6`,1239),J(1240,1,GY,Lu),Q.fk=function(e){return F(e,469)},Q.gk=function(e){return U(L7,JH,685,e,0,1)},B(KJ,`EcorePackageImpl/7`,1240),J(1241,1,GY,Ru),Q.fk=function(e){return F(e,582)},Q.gk=function(e){return U(R7,JH,694,e,0,1)},B(KJ,`EcorePackageImpl/8`,1241),J(1242,1,GY,zu),Q.fk=function(e){return F(e,480)},Q.gk=function(e){return U(s7,JH,480,e,0,1)},B(KJ,`EcorePackageImpl/9`,1242),J(1038,2080,xvt,Tie),Q.Mi=function(e,t){PUe(this,L(t,424))},Q.Qi=function(e,t){Q0e(this,e,L(t,424))},B(KJ,`MinimalEObjectImpl/1ArrayDelegatingAdapterList`,1038),J(1039,152,_Y,QSe),Q.jj=function(){return this.a.a},B(KJ,`MinimalEObjectImpl/1ArrayDelegatingAdapterList/1`,1039),J(1067,1066,{},tde),B(`org.eclipse.emf.ecore.plugin`,`EcorePlugin`,1067);var uHt=YT(tyt,`Resource`);J(799,1524,nyt),Q.Hl=function(e){},Q.Il=function(e){},Q.El=function(){return!this.a&&(this.a=new Qh(this)),this.a},Q.Fl=function(e){var t,n,r=e.length,i,a;if(r>0){if(Ak(0,e.length),e.charCodeAt(0)==47){for(a=new tj(4),i=1,t=1;t<r;++t)Ak(t,e.length),e.charCodeAt(t)==47&&(FC(a,i==t?``:(cj(i,t,e.length),e.substr(i,t-i))),i=t+1);return FC(a,(Ak(i,e.length+1),e.substr(i))),uZe(this,a)}Ak(r-1,e.length),e.charCodeAt(r-1)==63&&(n=Lhe(e,hz(63),r-2),n>0&&(e=(cj(0,n,e.length),e.substr(0,n))))}return p4e(this,e)},Q.Gl=function(){return this.c},Q.Ib=function(){var e;return Dy(this.Rm)+`@`+(e=DN(this)>>>0,e.toString(16))+` uri='`+this.d+`'`},Q.b=!1,B(ryt,`ResourceImpl`,799),J(1525,799,nyt,$h),B(ryt,`BinaryResourceImpl`,1525),J(1190,708,I_t),Q.bj=function(e){return F(e,58)?xTe(this,L(e,58)):F(e,599)?new UC(L(e,599).El()):P(e)===P(this.f)?L(e,16).Kc():(Mw(),E7.a)},Q.Ob=function(){return e3e(this)},Q.a=!1,B(yY,`EcoreUtil/ContentTreeIterator`,1190),J(1526,1190,I_t,Mxe),Q.bj=function(e){return P(e)===P(this.f)?L(e,15).Kc():new Lke(L(e,58))},B(ryt,`ResourceImpl/5`,1526),J(658,2092,Hvt,Qh),Q.Hc=function(e){return this.i<=4?WR(this,e):F(e,54)&&L(e,54).Jh()==this.a},Q.Mi=function(e,t){e==this.i-1&&(this.a.b||(this.a.b=!0))},Q.Oi=function(e,t){e==0?this.a.b||(this.a.b=!0):MNe(this,e,t)},Q.Qi=function(e,t){},Q.Ri=function(e,t,n){},Q.Lj=function(){return 2},Q.jj=function(){return this.a},Q.Mj=function(){return!0},Q.Nj=function(e,t){return t=L(e,54).fi(this.a,t),t},Q.Oj=function(e,t){return L(e,54).fi(null,t)},Q.Pj=function(){return!1},Q.Si=function(){return!0},Q.aj=function(e){return U(Q5,JH,58,e,0,1)},Q.Yi=function(){return!1},B(ryt,`ResourceImpl/ContentsEList`,658),J(970,2062,DU,eg),Q.fd=function(e){return this.a.Ki(e)},Q.gc=function(){return this.a.gc()},B(yY,`AbstractSequentialInternalEList/1`,970);var dHt,fHt,p9,pHt;J(634,1,{},vye);var m9,h9;B(yY,`BasicExtendedMetaData`,634),J(1181,1,{},jle),Q.Jl=function(){return null},Q.Kl=function(){return this.a==-2&&Fee(this,N$e(this.d,this.b)),this.a},Q.Ll=function(){return null},Q.Ml=function(){return OO(),OO(),UX},Q.xe=function(){return this.c==eX&&Iee(this,XKe(this.d,this.b)),this.c},Q.Nl=function(){return 0},Q.a=-2,Q.c=eX,B(yY,`BasicExtendedMetaData/EClassExtendedMetaDataImpl`,1181),J(1182,1,{},HOe),Q.Jl=function(){return this.a==($A(),m9)&&zee(this,yet(this.f,this.b)),this.a},Q.Kl=function(){return 0},Q.Ll=function(){return this.c==($A(),m9)&&Lee(this,bet(this.f,this.b)),this.c},Q.Ml=function(){return!this.d&&tm(this,Drt(this.f,this.b)),this.d},Q.xe=function(){return this.e==eX&&Hee(this,XKe(this.f,this.b)),this.e},Q.Nl=function(){return this.g==-2&&Wee(this,IQe(this.f,this.b)),this.g},Q.e=eX,Q.g=-2,B(yY,`BasicExtendedMetaData/EDataTypeExtendedMetaDataImpl`,1182),J(1180,1,{},Mle),Q.b=!1,Q.c=!1,B(yY,`BasicExtendedMetaData/EPackageExtendedMetaDataImpl`,1180),J(1183,1,{},UOe),Q.c=-2,Q.e=eX,Q.f=eX,B(yY,`BasicExtendedMetaData/EStructuralFeatureExtendedMetaDataImpl`,1183),J(593,632,AY,RT),Q.Lj=function(){return this.c},Q.ol=function(){return!1},Q.Wi=function(e,t){return t},Q.c=0,B(yY,`EDataTypeEList`,593);var mHt=YT(yY,`FeatureMap`);J(78,593,{3:1,4:1,20:1,31:1,56:1,16:1,15:1,59:1,70:1,66:1,61:1,79:1,160:1,220:1,2036:1,71:1,97:1},$N),Q.bd=function(e,t){C5e(this,e,L(t,76))},Q.Fc=function(e){return E8e(this,L(e,76))},Q.Hi=function(e){ySe(this,L(e,76))},Q.Nj=function(e,t){return nge(this,L(e,76),t)},Q.Oj=function(e,t){return rge(this,L(e,76),t)},Q.Ti=function(e,t){return Jtt(this,e,t)},Q.Wi=function(e,t){return xot(this,e,L(t,76))},Q.hd=function(e,t){return k7e(this,e,L(t,76))},Q.Uj=function(e,t){return ige(this,L(e,76),t)},Q.Vj=function(e,t){return age(this,L(e,76),t)},Q.Wj=function(e,t,n){return uQe(this,L(e,76),L(t,76),n)},Q.Zi=function(e,t){return oz(this,e,L(t,76))},Q.Ol=function(e,t){return Dtt(this,e,t)},Q.cd=function(e,t){var n,r,i,a,o,s,c,l=new vM(t.gc()),u;for(i=t.Kc();i.Ob();)if(r=L(i.Pb(),76),a=r.Lk(),JB(this.e,a))(!a.Si()||!fA(this,a,r.md())&&!WR(l,r))&&uj(l,r);else{for(u=GB(this.e.Dh(),a),n=L(this.g,124),o=!0,s=0;s<this.i;++s)if(c=n[s],u.am(c.Lk())){L(VL(this,s,r),76),o=!1;break}o&&uj(l,r)}return VBe(this,e,l)},Q.Gc=function(e){var t,n,r,i,a,o,s,c=new vM(e.gc()),l;for(r=e.Kc();r.Ob();)if(n=L(r.Pb(),76),i=n.Lk(),JB(this.e,i))(!i.Si()||!fA(this,i,n.md())&&!WR(c,n))&&uj(c,n);else{for(l=GB(this.e.Dh(),i),t=L(this.g,124),a=!0,o=0;o<this.i;++o)if(s=t[o],l.am(s.Lk())){L(VL(this,o,n),76),a=!1;break}a&&uj(c,n)}return CD(this,c)},Q.Fi=function(e){return this.j=-1,hrt(this,this.i,e)},Q.Pl=function(e,t,n){return Det(this,e,t,n)},Q.Xk=function(e,t){return yV(this,e,t)},Q.Ql=function(e,t,n){return Sit(this,e,t,n)},Q.Rl=function(){return this},Q.Sl=function(e,t){return JV(this,e,t)},Q.Tl=function(e){return L(W(this,e),76).Lk()},Q.Ul=function(e){return L(W(this,e),76).md()},Q.Vl=function(){return this.b},Q.Mj=function(){return!0},Q.Tj=function(){return!0},Q.Wl=function(e){return!VI(this,e)},Q.aj=function(e){return U(QVt,eyt,343,e,0,1)},Q.pl=function(e){return tme(this,e)},Q.Wb=function(e){_D(this,e)},Q.Xl=function(e,t){QV(this,e,t)},Q.Yl=function(e){return YLe(this,e)},Q.Zl=function(e){gYe(this,e)},B(yY,`BasicFeatureMap`,78),J(1960,1,oU),Q.Nb=function(e){eD(this,e)},Q.Rb=function(e){if(this.g==-1)throw A(new jg);AE(this);try{B7e(this.e,this.b,this.a,e),this.d=this.e.j,zL(this)}catch(e){throw e=SP(e),F(e,77)?A(new Pg):A(e)}},Q.Ob=function(){return iF(this)},Q.Sb=function(){return tHe(this)},Q.Pb=function(){return zL(this)},Q.Tb=function(){return this.a},Q.Ub=function(){var e;if(tHe(this))return AE(this),this.g=--this.a,this.ul()&&(e=oB(this.e,this.b,this.c,this.a,this.j),this.j=e),this.i=0,this.j;throw A(new Ig)},Q.Vb=function(){return this.a-1},Q.Qb=function(){if(this.g==-1)throw A(new jg);AE(this);try{m0e(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=SP(e),F(e,77)?A(new Pg):A(e)}},Q.ul=function(){return!1},Q.Wb=function(e){if(this.g==-1)throw A(new jg);AE(this);try{Mrt(this.e,this.b,this.g,e),this.d=this.e.j}catch(e){throw e=SP(e),F(e,77)?A(new Pg):A(e)}},Q.a=0,Q.c=0,Q.d=0,Q.f=!1,Q.g=0,Q.i=0,B(yY,`FeatureMapUtil/BasicFeatureEIterator`,1960),J(420,1960,oU,hP),Q.$l=function(){var e,t,n=this.e.i;for(e=L(this.e.g,124);this.c<n;){if(t=e[this.c],this.k.am(t.Lk()))return this.j=this.f?t:t.md(),this.i=2,!0;++this.c}return this.i=1,this.g=-1,!1},Q._l=function(){for(var e=L(this.e.g,124),t;--this.c>=0;)if(t=e[this.c],this.k.am(t.Lk()))return this.j=this.f?t:t.md(),this.i=-2,!0;return this.i=-1,this.g=-1,!1},B(yY,`BasicFeatureMap/FeatureEIterator`,420),J(676,420,oU,BS),Q.ul=function(){return!0},B(yY,`BasicFeatureMap/ResolvingFeatureEIterator`,676),J(968,496,PY,Ade),Q.pj=function(){return this},B(yY,`EContentsEList/1`,968),J(969,496,PY,Qle),Q.ul=function(){return!1},B(yY,`EContentsEList/2`,969),J(967,287,FY,jde),Q.wl=function(e){},Q.Ob=function(){return!1},Q.Sb=function(){return!1},B(yY,`EContentsEList/FeatureIteratorImpl/1`,967),J(840,593,AY,nfe),Q.Ni=function(){this.a=!0},Q.Qj=function(){return this.a},Q.Gk=function(){var e;sH(this),$S(this.e)?(e=this.a,this.a=!1,tP(this.e,new FA(this.e,2,this.c,e,!1))):this.a=!1},Q.a=!1,B(yY,`EDataTypeEList/Unsettable`,840),J(1958,593,AY,rfe),Q.Si=function(){return!0},B(yY,`EDataTypeUniqueEList`,1958),J(1959,840,AY,ife),Q.Si=function(){return!0},B(yY,`EDataTypeUniqueEList/Unsettable`,1959),J(147,83,AY,zC),Q.nl=function(){return!0},Q.Wi=function(e,t){return hB(this,e,L(t,58))},B(yY,`EObjectContainmentEList/Resolving`,147),J(1184,555,AY,afe),Q.nl=function(){return!0},Q.Wi=function(e,t){return hB(this,e,L(t,58))},B(yY,`EObjectContainmentEList/Unsettable/Resolving`,1184),J(766,14,AY,She),Q.Ni=function(){this.a=!0},Q.Qj=function(){return this.a},Q.Gk=function(){var e;sH(this),$S(this.e)?(e=this.a,this.a=!1,tP(this.e,new FA(this.e,2,this.c,e,!1))):this.a=!1},Q.a=!1,B(yY,`EObjectContainmentWithInverseEList/Unsettable`,766),J(1222,766,AY,Che),Q.nl=function(){return!0},Q.Wi=function(e,t){return hB(this,e,L(t,58))},B(yY,`EObjectContainmentWithInverseEList/Unsettable/Resolving`,1222),J(757,505,AY,ofe),Q.Ni=function(){this.a=!0},Q.Qj=function(){return this.a},Q.Gk=function(){var e;sH(this),$S(this.e)?(e=this.a,this.a=!1,tP(this.e,new FA(this.e,2,this.c,e,!1))):this.a=!1},Q.a=!1,B(yY,`EObjectEList/Unsettable`,757),J(338,505,AY,BC),Q.nl=function(){return!0},Q.Wi=function(e,t){return hB(this,e,L(t,58))},B(yY,`EObjectResolvingEList`,338),J(1844,757,AY,sfe),Q.nl=function(){return!0},Q.Wi=function(e,t){return hB(this,e,L(t,58))},B(yY,`EObjectResolvingEList/Unsettable`,1844),J(1527,1,{},Bu);var hHt;B(yY,`EObjectValidator`,1527),J(559,505,AY,XE),Q.il=function(){return this.d},Q.jl=function(){return this.b},Q.Mj=function(){return!0},Q.ml=function(){return!0},Q.b=0,B(yY,`EObjectWithInverseEList`,559),J(1225,559,AY,whe),Q.ll=function(){return!0},B(yY,`EObjectWithInverseEList/ManyInverse`,1225),J(635,559,AY,Qw),Q.Ni=function(){this.a=!0},Q.Qj=function(){return this.a},Q.Gk=function(){var e;sH(this),$S(this.e)?(e=this.a,this.a=!1,tP(this.e,new FA(this.e,2,this.c,e,!1))):this.a=!1},Q.a=!1,B(yY,`EObjectWithInverseEList/Unsettable`,635),J(1224,635,AY,Ehe),Q.ll=function(){return!0},B(yY,`EObjectWithInverseEList/Unsettable/ManyInverse`,1224),J(767,559,AY,The),Q.nl=function(){return!0},Q.Wi=function(e,t){return hB(this,e,L(t,58))},B(yY,`EObjectWithInverseResolvingEList`,767),J(32,767,AY,$w),Q.ll=function(){return!0},B(yY,`EObjectWithInverseResolvingEList/ManyInverse`,32),J(768,635,AY,Dhe),Q.nl=function(){return!0},Q.Wi=function(e,t){return hB(this,e,L(t,58))},B(yY,`EObjectWithInverseResolvingEList/Unsettable`,768),J(1223,768,AY,Ohe),Q.ll=function(){return!0},B(yY,`EObjectWithInverseResolvingEList/Unsettable/ManyInverse`,1223),J(1185,632,AY),Q.Li=function(){return!(this.b&1792)},Q.Ni=function(){this.b|=1},Q.kl=function(){return!!(this.b&4)},Q.Mj=function(){return!!(this.b&40)},Q.ll=function(){return!!(this.b&16)},Q.ml=function(){return!!(this.b&8)},Q.nl=function(){return(this.b&xY)!=0},Q.al=function(){return!!(this.b&32)},Q.ol=function(){return(this.b&wU)!=0},Q.fk=function(e){return this.d?bAe(this.d,e):this.Lk().Hk().fk(e)},Q.Qj=function(){return this.b&2?!!(this.b&1):this.i!=0},Q.Si=function(){return!!(this.b&128)},Q.Gk=function(){var e;sH(this),this.b&2&&($S(this.e)?(e=!!(this.b&1),this.b&=-2,Ug(this,new FA(this.e,2,RI(this.e.Dh(),this.Lk()),e,!1))):this.b&=-2)},Q.Yi=function(){return!(this.b&1536)},Q.b=0,B(yY,`EcoreEList/Generic`,1185),J(1186,1185,AY,Qwe),Q.Lk=function(){return this.a},B(yY,`EcoreEList/Dynamic`,1186),J(765,66,uY,tg),Q.aj=function(e){return VM(this.a.a,e)},B(yY,`EcoreEMap/1`,765),J(764,83,AY,Ixe),Q.Mi=function(e,t){QL(this.b,L(t,136))},Q.Oi=function(e,t){Pze(this.b)},Q.Pi=function(e,t,n){var r;++(r=this.b,L(t,136),r).e},Q.Qi=function(e,t){QF(this.b,L(t,136))},Q.Ri=function(e,t,n){QF(this.b,L(n,136)),P(n)===P(t)&&L(n,136).Ci(Que(L(t,136).ld())),QL(this.b,L(t,136))},B(yY,`EcoreEMap/DelegateEObjectContainmentEList`,764),J(1220,141,Rvt,LLe),B(yY,`EcoreEMap/Unsettable`,1220),J(1221,764,AY,khe),Q.Ni=function(){this.a=!0},Q.Qj=function(){return this.a},Q.Gk=function(){var e;sH(this),$S(this.e)?(e=this.a,this.a=!1,tP(this.e,new FA(this.e,2,this.c,e,!1))):this.a=!1},Q.a=!1,B(yY,`EcoreEMap/Unsettable/UnsettableDelegateEObjectContainmentEList`,1221),J(1189,215,AW,CSe),Q.a=!1,Q.b=!1,B(yY,`EcoreUtil/Copier`,1189),J(759,1,eU,Lke),Q.Nb=function(e){eD(this,e)},Q.Ob=function(){return aKe(this)},Q.Pb=function(){var e;return aKe(this),e=this.b,this.b=null,e},Q.Qb=function(){this.a.Qb()},B(yY,`EcoreUtil/ProperContentIterator`,759),J(1528,1527,{},Hf);var gHt;B(yY,`EcoreValidator`,1528);var _Ht;YT(yY,`FeatureMapUtil/Validator`),J(1295,1,{2041:1},Vu),Q.am=function(e){return!0},B(yY,`FeatureMapUtil/1`,1295),J(773,1,{2041:1},ict),Q.am=function(e){var t;return this.c==e||(t=Dw(ND(this.a,e)),t==null?jet(this,e)?(yMe(this.a,e,(cw(),EX)),!0):(yMe(this.a,e,(cw(),TX)),!1):t==(cw(),EX))},Q.e=!1;var vHt;B(yY,`FeatureMapUtil/BasicValidator`,773),J(774,45,AW,kde),B(yY,`FeatureMapUtil/BasicValidator/Cache`,774),J(509,56,{20:1,31:1,56:1,16:1,15:1,61:1,79:1,71:1,97:1},gS),Q.bd=function(e,t){B7e(this.c,this.b,e,t)},Q.Fc=function(e){return Dtt(this.c,this.b,e)},Q.cd=function(e,t){return qit(this.c,this.b,e,t)},Q.Gc=function(e){return OC(this,e)},Q.Gi=function(e,t){cIe(this.c,this.b,e,t)},Q.Wk=function(e,t){return Det(this.c,this.b,e,t)},Q.$i=function(e){return YV(this.c,this.b,e,!1)},Q.Ii=function(){return kue(this.c,this.b)},Q.Ji=function(){return Aue(this.c,this.b)},Q.Ki=function(e){return jNe(this.c,this.b,e)},Q.Xk=function(e,t){return Pme(this,e,t)},Q.$b=function(){Wg(this)},Q.Hc=function(e){return fA(this.c,this.b,e)},Q.Ic=function(e){return tze(this.c,this.b,e)},Q.Xb=function(e){return YV(this.c,this.b,e,!0)},Q.Fk=function(e){return this},Q.dd=function(e){return BAe(this.c,this.b,e)},Q.dc=function(){return _S(this)},Q.Qj=function(){return!VI(this.c,this.b)},Q.Kc=function(){return kFe(this.c,this.b)},Q.ed=function(){return AFe(this.c,this.b)},Q.fd=function(e){return pWe(this.c,this.b,e)},Q.Ti=function(e,t){return ert(this.c,this.b,e,t)},Q.Ui=function(e,t){LNe(this.c,this.b,e,t)},Q.gd=function(e){return m0e(this.c,this.b,e)},Q.Mc=function(e){return ytt(this.c,this.b,e)},Q.hd=function(e,t){return Mrt(this.c,this.b,e,t)},Q.Wb=function(e){mB(this.c,this.b),OC(this,L(e,15))},Q.gc=function(){return fWe(this.c,this.b)},Q.Pc=function(){return GOe(this.c,this.b)},Q.Qc=function(e){return VAe(this.c,this.b,e)},Q.Ib=function(){var e,t=new Ev;for(t.a+=`[`,e=kue(this.c,this.b);iF(e);)kS(t,YC(zL(e))),iF(e)&&(t.a+=qH);return t.a+=`]`,t.a},Q.Gk=function(){mB(this.c,this.b)},B(yY,`FeatureMapUtil/FeatureEList`,509),J(644,39,_Y,vA),Q.hj=function(e){return UF(this,e)},Q.mj=function(e){var t,n,r,i,a,o,s;switch(this.d){case 1:case 2:if(a=e.jj(),P(a)===P(this.c)&&UF(this,null)==e.hj(null))return this.g=e.ij(),e.gj()==1&&(this.d=1),!0;break;case 3:if(i=e.gj(),i===3&&(a=e.jj(),P(a)===P(this.c)&&UF(this,null)==e.hj(null)))return this.d=5,t=new vM(2),uj(t,this.g),uj(t,e.ij()),this.g=t,!0;break;case 5:if(i=e.gj(),i===3&&(a=e.jj(),P(a)===P(this.c)&&UF(this,null)==e.hj(null)))return n=L(this.g,16),n.Fc(e.ij()),!0;break;case 4:switch(i=e.gj(),i){case 3:if(a=e.jj(),P(a)===P(this.c)&&UF(this,null)==e.hj(null))return this.d=1,this.g=e.ij(),!0;break;case 4:if(a=e.jj(),P(a)===P(this.c)&&UF(this,null)==e.hj(null))return this.d=6,s=new vM(2),uj(s,this.n),uj(s,e.kj()),this.n=s,o=G(M(q9,1),$U,28,15,[this.o,e.lj()]),this.g=o,!0}break;case 6:if(i=e.gj(),i===4&&(a=e.jj(),P(a)===P(this.c)&&UF(this,null)==e.hj(null)))return n=L(this.n,16),n.Fc(e.kj()),o=L(this.g,53),r=U(q9,$U,28,o.length+1,15,1),jV(o,0,r,0,o.length),r[o.length]=e.lj(),this.g=r,!0}return!1},B(yY,`FeatureMapUtil/FeatureENotificationImpl`,644),J(564,509,{20:1,31:1,56:1,16:1,15:1,61:1,79:1,160:1,220:1,2036:1,71:1,97:1},JT),Q.Ol=function(e,t){return Dtt(this.c,e,t)},Q.Pl=function(e,t,n){return Det(this.c,e,t,n)},Q.Ql=function(e,t,n){return Sit(this.c,e,t,n)},Q.Rl=function(){return this},Q.Sl=function(e,t){return JV(this.c,e,t)},Q.Tl=function(e){return L(YV(this.c,this.b,e,!1),76).Lk()},Q.Ul=function(e){return L(YV(this.c,this.b,e,!1),76).md()},Q.Vl=function(){return this.a},Q.Wl=function(e){return!VI(this.c,e)},Q.Xl=function(e,t){QV(this.c,e,t)},Q.Yl=function(e){return YLe(this.c,e)},Q.Zl=function(e){gYe(this.c,e)},B(yY,`FeatureMapUtil/FeatureFeatureMap`,564),J(1294,1,Lvt,Ale),Q.Fk=function(e){return YV(this.b,this.a,-1,e)},Q.Qj=function(){return!VI(this.b,this.a)},Q.Wb=function(e){QV(this.b,this.a,e)},Q.Gk=function(){mB(this.b,this.a)},B(yY,`FeatureMapUtil/FeatureValue`,1294);var g9,yHt,bHt,_9,xHt,v9=YT(nX,`AnyType`);J(680,63,NU,uv),B(nX,`InvalidDatatypeValueException`,680);var y9=YT(nX,uyt),b9=YT(nX,dyt),SHt=YT(nX,fyt),CHt,x9,wHt,S9,THt,EHt,DHt,OHt,kHt,AHt,jHt,MHt,NHt,PHt,FHt,C9,IHt,w9,T9,LHt,E9,D9,O9,RHt,k9,A9;J(844,516,{110:1,94:1,93:1,58:1,54:1,99:1,857:1},T_),Q.Lh=function(e,t,n){switch(e){case 0:return n?(!this.c&&(this.c=new $N(this,0)),this.c):(!this.c&&(this.c=new $N(this,0)),this.c.b);case 1:return n?(!this.c&&(this.c=new $N(this,0)),L(xk(this.c,(dH(),S9)),160)):(!this.c&&(this.c=new $N(this,0)),L(L(xk(this.c,(dH(),S9)),160),220)).Vl();case 2:return n?(!this.b&&(this.b=new $N(this,2)),this.b):(!this.b&&(this.b=new $N(this,2)),this.b.b)}return Tj(this,e-MD(this.ii()),sM(this.j&2?(!this.k&&(this.k=new Pf),this.k).Nk():this.ii(),e),t,n)},Q.Uh=function(e,t,n){var r;switch(t){case 0:return!this.c&&(this.c=new $N(this,0)),yV(this.c,e,n);case 1:return(!this.c&&(this.c=new $N(this,0)),L(L(xk(this.c,(dH(),S9)),160),71)).Xk(e,n);case 2:return!this.b&&(this.b=new $N(this,2)),yV(this.b,e,n)}return r=L(sM(this.j&2?(!this.k&&(this.k=new Pf),this.k).Nk():this.ii(),t),69),r.wk().Ak(this,pFe(this),t-MD(this.ii()),e,n)},Q.Wh=function(e){switch(e){case 0:return!!this.c&&this.c.i!=0;case 1:return!(!this.c&&(this.c=new $N(this,0)),L(xk(this.c,(dH(),S9)),160)).dc();case 2:return!!this.b&&this.b.i!=0}return cA(this,e-MD(this.ii()),sM(this.j&2?(!this.k&&(this.k=new Pf),this.k).Nk():this.ii(),e))},Q.bi=function(e,t){switch(e){case 0:!this.c&&(this.c=new $N(this,0)),_D(this.c,t);return;case 1:(!this.c&&(this.c=new $N(this,0)),L(L(xk(this.c,(dH(),S9)),160),220)).Wb(t);return;case 2:!this.b&&(this.b=new $N(this,2)),_D(this.b,t);return}OI(this,e-MD(this.ii()),sM(this.j&2?(!this.k&&(this.k=new Pf),this.k).Nk():this.ii(),e),t)},Q.ii=function(){return dH(),wHt},Q.ki=function(e){switch(e){case 0:!this.c&&(this.c=new $N(this,0)),sH(this.c);return;case 1:(!this.c&&(this.c=new $N(this,0)),L(xk(this.c,(dH(),S9)),160)).$b();return;case 2:!this.b&&(this.b=new $N(this,2)),sH(this.b);return}zF(this,e-MD(this.ii()),sM(this.j&2?(!this.k&&(this.k=new Pf),this.k).Nk():this.ii(),e))},Q.Ib=function(){var e;return this.j&4?SB(this):(e=new XC(SB(this)),e.a+=` (mixed: `,OS(e,this.c),e.a+=`, anyAttribute: `,OS(e,this.b),e.a+=`)`,e.a)},B(rX,`AnyTypeImpl`,844),J(681,516,{110:1,94:1,93:1,58:1,54:1,99:1,2119:1,681:1},Qu),Q.Lh=function(e,t,n){switch(e){case 0:return this.a;case 1:return this.b}return Tj(this,e-MD((dH(),C9)),sM(this.j&2?(!this.k&&(this.k=new Pf),this.k).Nk():C9,e),t,n)},Q.Wh=function(e){switch(e){case 0:return this.a!=null;case 1:return this.b!=null}return cA(this,e-MD((dH(),C9)),sM(this.j&2?(!this.k&&(this.k=new Pf),this.k).Nk():C9,e))},Q.bi=function(e,t){switch(e){case 0:nm(this,Ow(t));return;case 1:Jee(this,Ow(t));return}OI(this,e-MD((dH(),C9)),sM(this.j&2?(!this.k&&(this.k=new Pf),this.k).Nk():C9,e),t)},Q.ii=function(){return dH(),C9},Q.ki=function(e){switch(e){case 0:this.a=null;return;case 1:this.b=null;return}zF(this,e-MD((dH(),C9)),sM(this.j&2?(!this.k&&(this.k=new Pf),this.k).Nk():C9,e))},Q.Ib=function(){var e;return this.j&4?SB(this):(e=new XC(SB(this)),e.a+=` (data: `,kS(e,this.a),e.a+=`, target: `,kS(e,this.b),e.a+=`)`,e.a)},Q.a=null,Q.b=null,B(rX,`ProcessingInstructionImpl`,681),J(682,844,{110:1,94:1,93:1,58:1,54:1,99:1,857:1,2120:1,682:1},eie),Q.Lh=function(e,t,n){switch(e){case 0:return n?(!this.c&&(this.c=new $N(this,0)),this.c):(!this.c&&(this.c=new $N(this,0)),this.c.b);case 1:return n?(!this.c&&(this.c=new $N(this,0)),L(xk(this.c,(dH(),S9)),160)):(!this.c&&(this.c=new $N(this,0)),L(L(xk(this.c,(dH(),S9)),160),220)).Vl();case 2:return n?(!this.b&&(this.b=new $N(this,2)),this.b):(!this.b&&(this.b=new $N(this,2)),this.b.b);case 3:return!this.c&&(this.c=new $N(this,0)),Ow(JV(this.c,(dH(),T9),!0));case 4:return jhe(this.a,(!this.c&&(this.c=new $N(this,0)),Ow(JV(this.c,(dH(),T9),!0))));case 5:return this.a}return Tj(this,e-MD((dH(),w9)),sM(this.j&2?(!this.k&&(this.k=new Pf),this.k).Nk():w9,e),t,n)},Q.Wh=function(e){switch(e){case 0:return!!this.c&&this.c.i!=0;case 1:return!(!this.c&&(this.c=new $N(this,0)),L(xk(this.c,(dH(),S9)),160)).dc();case 2:return!!this.b&&this.b.i!=0;case 3:return!this.c&&(this.c=new $N(this,0)),Ow(JV(this.c,(dH(),T9),!0))!=null;case 4:return jhe(this.a,(!this.c&&(this.c=new $N(this,0)),Ow(JV(this.c,(dH(),T9),!0))))!=null;case 5:return!!this.a}return cA(this,e-MD((dH(),w9)),sM(this.j&2?(!this.k&&(this.k=new Pf),this.k).Nk():w9,e))},Q.bi=function(e,t){switch(e){case 0:!this.c&&(this.c=new $N(this,0)),_D(this.c,t);return;case 1:(!this.c&&(this.c=new $N(this,0)),L(L(xk(this.c,(dH(),S9)),160),220)).Wb(t);return;case 2:!this.b&&(this.b=new $N(this,2)),_D(this.b,t);return;case 3:WOe(this,Ow(t));return;case 4:WOe(this,Ahe(this.a,t));return;case 5:qee(this,L(t,156));return}OI(this,e-MD((dH(),w9)),sM(this.j&2?(!this.k&&(this.k=new Pf),this.k).Nk():w9,e),t)},Q.ii=function(){return dH(),w9},Q.ki=function(e){switch(e){case 0:!this.c&&(this.c=new $N(this,0)),sH(this.c);return;case 1:(!this.c&&(this.c=new $N(this,0)),L(xk(this.c,(dH(),S9)),160)).$b();return;case 2:!this.b&&(this.b=new $N(this,2)),sH(this.b);return;case 3:!this.c&&(this.c=new $N(this,0)),QV(this.c,(dH(),T9),null);return;case 4:WOe(this,Ahe(this.a,null));return;case 5:this.a=null;return}zF(this,e-MD((dH(),w9)),sM(this.j&2?(!this.k&&(this.k=new Pf),this.k).Nk():w9,e))},B(rX,`SimpleAnyTypeImpl`,682),J(683,516,{110:1,94:1,93:1,58:1,54:1,99:1,2121:1,683:1},E_),Q.Lh=function(e,t,n){switch(e){case 0:return n?(!this.a&&(this.a=new $N(this,0)),this.a):(!this.a&&(this.a=new $N(this,0)),this.a.b);case 1:return n?(!this.b&&(this.b=new hj((RH(),o9),d9,this,1)),this.b):(!this.b&&(this.b=new hj((RH(),o9),d9,this,1)),sj(this.b));case 2:return n?(!this.c&&(this.c=new hj((RH(),o9),d9,this,2)),this.c):(!this.c&&(this.c=new hj((RH(),o9),d9,this,2)),sj(this.c));case 3:return!this.a&&(this.a=new $N(this,0)),xk(this.a,(dH(),D9));case 4:return!this.a&&(this.a=new $N(this,0)),xk(this.a,(dH(),O9));case 5:return!this.a&&(this.a=new $N(this,0)),xk(this.a,(dH(),k9));case 6:return!this.a&&(this.a=new $N(this,0)),xk(this.a,(dH(),A9))}return Tj(this,e-MD((dH(),E9)),sM(this.j&2?(!this.k&&(this.k=new Pf),this.k).Nk():E9,e),t,n)},Q.Uh=function(e,t,n){var r;switch(t){case 0:return!this.a&&(this.a=new $N(this,0)),yV(this.a,e,n);case 1:return!this.b&&(this.b=new hj((RH(),o9),d9,this,1)),iT(this.b,e,n);case 2:return!this.c&&(this.c=new hj((RH(),o9),d9,this,2)),iT(this.c,e,n);case 5:return!this.a&&(this.a=new $N(this,0)),Pme(xk(this.a,(dH(),k9)),e,n)}return r=L(sM(this.j&2?(!this.k&&(this.k=new Pf),this.k).Nk():(dH(),E9),t),69),r.wk().Ak(this,pFe(this),t-MD((dH(),E9)),e,n)},Q.Wh=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 $N(this,0)),!_S(xk(this.a,(dH(),D9)));case 4:return!this.a&&(this.a=new $N(this,0)),!_S(xk(this.a,(dH(),O9)));case 5:return!this.a&&(this.a=new $N(this,0)),!_S(xk(this.a,(dH(),k9)));case 6:return!this.a&&(this.a=new $N(this,0)),!_S(xk(this.a,(dH(),A9)))}return cA(this,e-MD((dH(),E9)),sM(this.j&2?(!this.k&&(this.k=new Pf),this.k).Nk():E9,e))},Q.bi=function(e,t){switch(e){case 0:!this.a&&(this.a=new $N(this,0)),_D(this.a,t);return;case 1:!this.b&&(this.b=new hj((RH(),o9),d9,this,1)),KN(this.b,t);return;case 2:!this.c&&(this.c=new hj((RH(),o9),d9,this,2)),KN(this.c,t);return;case 3:!this.a&&(this.a=new $N(this,0)),Wg(xk(this.a,(dH(),D9))),!this.a&&(this.a=new $N(this,0)),OC(xk(this.a,D9),L(t,16));return;case 4:!this.a&&(this.a=new $N(this,0)),Wg(xk(this.a,(dH(),O9))),!this.a&&(this.a=new $N(this,0)),OC(xk(this.a,O9),L(t,16));return;case 5:!this.a&&(this.a=new $N(this,0)),Wg(xk(this.a,(dH(),k9))),!this.a&&(this.a=new $N(this,0)),OC(xk(this.a,k9),L(t,16));return;case 6:!this.a&&(this.a=new $N(this,0)),Wg(xk(this.a,(dH(),A9))),!this.a&&(this.a=new $N(this,0)),OC(xk(this.a,A9),L(t,16));return}OI(this,e-MD((dH(),E9)),sM(this.j&2?(!this.k&&(this.k=new Pf),this.k).Nk():E9,e),t)},Q.ii=function(){return dH(),E9},Q.ki=function(e){switch(e){case 0:!this.a&&(this.a=new $N(this,0)),sH(this.a);return;case 1:!this.b&&(this.b=new hj((RH(),o9),d9,this,1)),this.b.c.$b();return;case 2:!this.c&&(this.c=new hj((RH(),o9),d9,this,2)),this.c.c.$b();return;case 3:!this.a&&(this.a=new $N(this,0)),Wg(xk(this.a,(dH(),D9)));return;case 4:!this.a&&(this.a=new $N(this,0)),Wg(xk(this.a,(dH(),O9)));return;case 5:!this.a&&(this.a=new $N(this,0)),Wg(xk(this.a,(dH(),k9)));return;case 6:!this.a&&(this.a=new $N(this,0)),Wg(xk(this.a,(dH(),A9)));return}zF(this,e-MD((dH(),E9)),sM(this.j&2?(!this.k&&(this.k=new Pf),this.k).Nk():E9,e))},Q.Ib=function(){var e;return this.j&4?SB(this):(e=new XC(SB(this)),e.a+=` (mixed: `,OS(e,this.a),e.a+=`)`,e.a)},B(rX,`XMLTypeDocumentRootImpl`,683),J(2028,720,{110:1,94:1,93:1,480:1,155:1,58:1,114:1,54:1,99:1,158:1,119:1,120:1,2122:1},Hu),Q.ri=function(e,t){switch(e.hk()){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:EI(t);case 19:case 28:case 29:case 35:case 38:case 39:case 41:case 46:case 52:case 54:case 5:return Ow(t);case 6:return nme(L(t,195));case 12:case 47:case 49:case 11:return Zot(this,e,t);case 13:return t==null?null:Qit(L(t,247));case 15:case 14:return t==null?null:fSe(j(I(t)));case 17:return dQe((dH(),t));case 18:return dQe(t);case 21:case 20:return t==null?null:pSe(L(t,161).a);case 27:return rme(L(t,195));case 30:return _Ye((dH(),L(t,15)));case 31:return _Ye(L(t,15));case 40:return ame((dH(),t));case 42:return fQe((dH(),t));case 43:return fQe(t);case 59:case 48:return ime((dH(),t));default:throw A(new rv(YJ+e.xe()+XJ))}},Q.si=function(e){var t,n,r,i,a;switch(e.G==-1&&(e.G=(n=bM(e),n?BL(n.vi(),e):-1)),e.G){case 0:return t=new T_,t;case 1:return r=new Qu,r;case 2:return i=new eie,i;case 3:return a=new E_,a;default:throw A(new rv(i_t+e.zb+XJ))}},Q.ti=function(e,t){var n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_;switch(e.hk()){case 5:case 52:case 4:return t;case 6:return zqe(t);case 8:case 7:return t==null?null:TQe(t);case 9:return t==null?null:Wj(CV((r=XV(t,!0),r.length>0&&(Ak(0,r.length),r.charCodeAt(0)==43)?(Ak(1,r.length+1),r.substr(1)):r),-128,127)<<24>>24);case 10:return t==null?null:Wj(CV((i=XV(t,!0),i.length>0&&(Ak(0,i.length),i.charCodeAt(0)==43)?(Ak(1,i.length+1),i.substr(1)):i),-128,127)<<24>>24);case 11:return Ow(AH(this,(dH(),DHt),t));case 12:return Ow(AH(this,(dH(),OHt),t));case 13:return t==null?null:new Ly(XV(t,!0));case 15:case 14:return j8e(t);case 16:return Ow(AH(this,(dH(),kHt),t));case 17:return vKe((dH(),t));case 18:return vKe(t);case 28:case 29:case 35:case 38:case 39:case 41:case 54:case 19:return XV(t,!0);case 21:case 20:return W8e(t);case 22:return Ow(AH(this,(dH(),AHt),t));case 23:return Ow(AH(this,(dH(),jHt),t));case 24:return Ow(AH(this,(dH(),MHt),t));case 25:return Ow(AH(this,(dH(),NHt),t));case 26:return Ow(AH(this,(dH(),PHt),t));case 27:return _qe(t);case 30:return yKe((dH(),t));case 31:return yKe(t);case 32:return t==null?null:kF(CV((u=XV(t,!0),u.length>0&&(Ak(0,u.length),u.charCodeAt(0)==43)?(Ak(1,u.length+1),u.substr(1)):u),MU,UH));case 33:return t==null?null:new lC((d=XV(t,!0),d.length>0&&(Ak(0,d.length),d.charCodeAt(0)==43)?(Ak(1,d.length+1),d.substr(1)):d));case 34:return t==null?null:kF(CV((f=XV(t,!0),f.length>0&&(Ak(0,f.length),f.charCodeAt(0)==43)?(Ak(1,f.length+1),f.substr(1)):f),MU,UH));case 36:return t==null?null:fL(TH((p=XV(t,!0),p.length>0&&(Ak(0,p.length),p.charCodeAt(0)==43)?(Ak(1,p.length+1),p.substr(1)):p)));case 37:return t==null?null:fL(TH((m=XV(t,!0),m.length>0&&(Ak(0,m.length),m.charCodeAt(0)==43)?(Ak(1,m.length+1),m.substr(1)):m)));case 40:return QJe((dH(),t));case 42:return bKe((dH(),t));case 43:return bKe(t);case 44:return t==null?null:new lC((h=XV(t,!0),h.length>0&&(Ak(0,h.length),h.charCodeAt(0)==43)?(Ak(1,h.length+1),h.substr(1)):h));case 45:return t==null?null:new lC((g=XV(t,!0),g.length>0&&(Ak(0,g.length),g.charCodeAt(0)==43)?(Ak(1,g.length+1),g.substr(1)):g));case 46:return XV(t,!1);case 47:return Ow(AH(this,(dH(),FHt),t));case 59:case 48:return ZJe((dH(),t));case 49:return Ow(AH(this,(dH(),IHt),t));case 50:return t==null?null:AF(CV((_=XV(t,!0),_.length>0&&(Ak(0,_.length),_.charCodeAt(0)==43)?(Ak(1,_.length+1),_.substr(1)):_),VY,32767)<<16>>16);case 51:return t==null?null:AF(CV((a=XV(t,!0),a.length>0&&(Ak(0,a.length),a.charCodeAt(0)==43)?(Ak(1,a.length+1),a.substr(1)):a),VY,32767)<<16>>16);case 53:return Ow(AH(this,(dH(),LHt),t));case 55:return t==null?null:AF(CV((o=XV(t,!0),o.length>0&&(Ak(0,o.length),o.charCodeAt(0)==43)?(Ak(1,o.length+1),o.substr(1)):o),VY,32767)<<16>>16);case 56:return t==null?null:AF(CV((s=XV(t,!0),s.length>0&&(Ak(0,s.length),s.charCodeAt(0)==43)?(Ak(1,s.length+1),s.substr(1)):s),VY,32767)<<16>>16);case 57:return t==null?null:fL(TH((c=XV(t,!0),c.length>0&&(Ak(0,c.length),c.charCodeAt(0)==43)?(Ak(1,c.length+1),c.substr(1)):c)));case 58:return t==null?null:fL(TH((l=XV(t,!0),l.length>0&&(Ak(0,l.length),l.charCodeAt(0)==43)?(Ak(1,l.length+1),l.substr(1)):l)));case 60:return t==null?null:kF(CV((n=XV(t,!0),n.length>0&&(Ak(0,n.length),n.charCodeAt(0)==43)?(Ak(1,n.length+1),n.substr(1)):n),MU,UH));case 61:return t==null?null:kF(CV(XV(t,!0),MU,UH));default:throw A(new rv(YJ+e.xe()+XJ))}};var zHt,BHt,VHt,HHt;B(rX,`XMLTypeFactoryImpl`,2028),J(594,184,{110:1,94:1,93:1,155:1,197:1,58:1,241:1,114:1,54:1,99:1,158:1,184:1,119:1,120:1,690:1,2044:1,594:1},OCe),Q.N=!1,Q.O=!1;var UHt=!1;B(rX,`XMLTypePackageImpl`,594),J(1961,1,{851:1},Uu),Q.Kk=function(){return Ynt(),lUt},B(rX,`XMLTypePackageImpl/1`,1961),J(1970,1,GY,Wu),Q.fk=function(e){return yS(e)},Q.gk=function(e){return U(FX,cU,2,e,6,1)},B(rX,`XMLTypePackageImpl/10`,1970),J(1971,1,GY,Gu),Q.fk=function(e){return yS(e)},Q.gk=function(e){return U(FX,cU,2,e,6,1)},B(rX,`XMLTypePackageImpl/11`,1971),J(1972,1,GY,Ku),Q.fk=function(e){return yS(e)},Q.gk=function(e){return U(FX,cU,2,e,6,1)},B(rX,`XMLTypePackageImpl/12`,1972),J(1973,1,GY,qu),Q.fk=function(e){return xS(e)},Q.gk=function(e){return U(AX,cU,345,e,7,1)},B(rX,`XMLTypePackageImpl/13`,1973),J(1974,1,GY,Ju),Q.fk=function(e){return yS(e)},Q.gk=function(e){return U(FX,cU,2,e,6,1)},B(rX,`XMLTypePackageImpl/14`,1974),J(1975,1,GY,Yu),Q.fk=function(e){return F(e,15)},Q.gk=function(e){return U(_X,hG,15,e,0,1)},B(rX,`XMLTypePackageImpl/15`,1975),J(1976,1,GY,Xu),Q.fk=function(e){return F(e,15)},Q.gk=function(e){return U(_X,hG,15,e,0,1)},B(rX,`XMLTypePackageImpl/16`,1976),J(1977,1,GY,Zu),Q.fk=function(e){return yS(e)},Q.gk=function(e){return U(FX,cU,2,e,6,1)},B(rX,`XMLTypePackageImpl/17`,1977),J(1978,1,GY,$u),Q.fk=function(e){return F(e,161)},Q.gk=function(e){return U(jX,cU,161,e,0,1)},B(rX,`XMLTypePackageImpl/18`,1978),J(1979,1,GY,ed),Q.fk=function(e){return yS(e)},Q.gk=function(e){return U(FX,cU,2,e,6,1)},B(rX,`XMLTypePackageImpl/19`,1979),J(1962,1,GY,td),Q.fk=function(e){return F(e,857)},Q.gk=function(e){return U(v9,JH,857,e,0,1)},B(rX,`XMLTypePackageImpl/2`,1962),J(1980,1,GY,nd),Q.fk=function(e){return yS(e)},Q.gk=function(e){return U(FX,cU,2,e,6,1)},B(rX,`XMLTypePackageImpl/20`,1980),J(1981,1,GY,rd),Q.fk=function(e){return yS(e)},Q.gk=function(e){return U(FX,cU,2,e,6,1)},B(rX,`XMLTypePackageImpl/21`,1981),J(1982,1,GY,id),Q.fk=function(e){return yS(e)},Q.gk=function(e){return U(FX,cU,2,e,6,1)},B(rX,`XMLTypePackageImpl/22`,1982),J(1983,1,GY,ad),Q.fk=function(e){return yS(e)},Q.gk=function(e){return U(FX,cU,2,e,6,1)},B(rX,`XMLTypePackageImpl/23`,1983),J(1984,1,GY,od),Q.fk=function(e){return F(e,195)},Q.gk=function(e){return U(X9,cU,195,e,0,2)},B(rX,`XMLTypePackageImpl/24`,1984),J(1985,1,GY,sd),Q.fk=function(e){return yS(e)},Q.gk=function(e){return U(FX,cU,2,e,6,1)},B(rX,`XMLTypePackageImpl/25`,1985),J(1986,1,GY,cd),Q.fk=function(e){return yS(e)},Q.gk=function(e){return U(FX,cU,2,e,6,1)},B(rX,`XMLTypePackageImpl/26`,1986),J(1987,1,GY,ld),Q.fk=function(e){return F(e,15)},Q.gk=function(e){return U(_X,hG,15,e,0,1)},B(rX,`XMLTypePackageImpl/27`,1987),J(1988,1,GY,ud),Q.fk=function(e){return F(e,15)},Q.gk=function(e){return U(_X,hG,15,e,0,1)},B(rX,`XMLTypePackageImpl/28`,1988),J(1989,1,GY,dd),Q.fk=function(e){return yS(e)},Q.gk=function(e){return U(FX,cU,2,e,6,1)},B(rX,`XMLTypePackageImpl/29`,1989),J(1963,1,GY,fd),Q.fk=function(e){return F(e,681)},Q.gk=function(e){return U(y9,JH,2119,e,0,1)},B(rX,`XMLTypePackageImpl/3`,1963),J(1990,1,GY,pd),Q.fk=function(e){return F(e,17)},Q.gk=function(e){return U(MX,cU,17,e,0,1)},B(rX,`XMLTypePackageImpl/30`,1990),J(1991,1,GY,md),Q.fk=function(e){return yS(e)},Q.gk=function(e){return U(FX,cU,2,e,6,1)},B(rX,`XMLTypePackageImpl/31`,1991),J(1992,1,GY,hd),Q.fk=function(e){return F(e,168)},Q.gk=function(e){return U(NX,cU,168,e,0,1)},B(rX,`XMLTypePackageImpl/32`,1992),J(1993,1,GY,gd),Q.fk=function(e){return yS(e)},Q.gk=function(e){return U(FX,cU,2,e,6,1)},B(rX,`XMLTypePackageImpl/33`,1993),J(1994,1,GY,_d),Q.fk=function(e){return yS(e)},Q.gk=function(e){return U(FX,cU,2,e,6,1)},B(rX,`XMLTypePackageImpl/34`,1994),J(1995,1,GY,vd),Q.fk=function(e){return yS(e)},Q.gk=function(e){return U(FX,cU,2,e,6,1)},B(rX,`XMLTypePackageImpl/35`,1995),J(1996,1,GY,yd),Q.fk=function(e){return yS(e)},Q.gk=function(e){return U(FX,cU,2,e,6,1)},B(rX,`XMLTypePackageImpl/36`,1996),J(1997,1,GY,bd),Q.fk=function(e){return F(e,15)},Q.gk=function(e){return U(_X,hG,15,e,0,1)},B(rX,`XMLTypePackageImpl/37`,1997),J(1998,1,GY,xd),Q.fk=function(e){return F(e,15)},Q.gk=function(e){return U(_X,hG,15,e,0,1)},B(rX,`XMLTypePackageImpl/38`,1998),J(1999,1,GY,Sd),Q.fk=function(e){return yS(e)},Q.gk=function(e){return U(FX,cU,2,e,6,1)},B(rX,`XMLTypePackageImpl/39`,1999),J(1964,1,GY,Cd),Q.fk=function(e){return F(e,682)},Q.gk=function(e){return U(b9,JH,2120,e,0,1)},B(rX,`XMLTypePackageImpl/4`,1964),J(2e3,1,GY,wd),Q.fk=function(e){return yS(e)},Q.gk=function(e){return U(FX,cU,2,e,6,1)},B(rX,`XMLTypePackageImpl/40`,2e3),J(2001,1,GY,Td),Q.fk=function(e){return yS(e)},Q.gk=function(e){return U(FX,cU,2,e,6,1)},B(rX,`XMLTypePackageImpl/41`,2001),J(2002,1,GY,Ed),Q.fk=function(e){return yS(e)},Q.gk=function(e){return U(FX,cU,2,e,6,1)},B(rX,`XMLTypePackageImpl/42`,2002),J(2003,1,GY,Dd),Q.fk=function(e){return yS(e)},Q.gk=function(e){return U(FX,cU,2,e,6,1)},B(rX,`XMLTypePackageImpl/43`,2003),J(2004,1,GY,Od),Q.fk=function(e){return yS(e)},Q.gk=function(e){return U(FX,cU,2,e,6,1)},B(rX,`XMLTypePackageImpl/44`,2004),J(2005,1,GY,kd),Q.fk=function(e){return F(e,191)},Q.gk=function(e){return U(PX,cU,191,e,0,1)},B(rX,`XMLTypePackageImpl/45`,2005),J(2006,1,GY,Ad),Q.fk=function(e){return yS(e)},Q.gk=function(e){return U(FX,cU,2,e,6,1)},B(rX,`XMLTypePackageImpl/46`,2006),J(2007,1,GY,jd),Q.fk=function(e){return yS(e)},Q.gk=function(e){return U(FX,cU,2,e,6,1)},B(rX,`XMLTypePackageImpl/47`,2007),J(2008,1,GY,Md),Q.fk=function(e){return yS(e)},Q.gk=function(e){return U(FX,cU,2,e,6,1)},B(rX,`XMLTypePackageImpl/48`,2008),J(2009,1,GY,Nd),Q.fk=function(e){return F(e,191)},Q.gk=function(e){return U(PX,cU,191,e,0,1)},B(rX,`XMLTypePackageImpl/49`,2009),J(1965,1,GY,Pd),Q.fk=function(e){return F(e,683)},Q.gk=function(e){return U(SHt,JH,2121,e,0,1)},B(rX,`XMLTypePackageImpl/5`,1965),J(2010,1,GY,Fd),Q.fk=function(e){return F(e,168)},Q.gk=function(e){return U(NX,cU,168,e,0,1)},B(rX,`XMLTypePackageImpl/50`,2010),J(2011,1,GY,Id),Q.fk=function(e){return yS(e)},Q.gk=function(e){return U(FX,cU,2,e,6,1)},B(rX,`XMLTypePackageImpl/51`,2011),J(2012,1,GY,Ld),Q.fk=function(e){return F(e,17)},Q.gk=function(e){return U(MX,cU,17,e,0,1)},B(rX,`XMLTypePackageImpl/52`,2012),J(1966,1,GY,Rd),Q.fk=function(e){return yS(e)},Q.gk=function(e){return U(FX,cU,2,e,6,1)},B(rX,`XMLTypePackageImpl/6`,1966),J(1967,1,GY,zd),Q.fk=function(e){return F(e,195)},Q.gk=function(e){return U(X9,cU,195,e,0,2)},B(rX,`XMLTypePackageImpl/7`,1967),J(1968,1,GY,Bd),Q.fk=function(e){return bS(e)},Q.gk=function(e){return U(DX,cU,485,e,8,1)},B(rX,`XMLTypePackageImpl/8`,1968),J(1969,1,GY,Vd),Q.fk=function(e){return F(e,222)},Q.gk=function(e){return U(OX,cU,222,e,0,1)},B(rX,`XMLTypePackageImpl/9`,1969);var j9,M9,N9,P9,$;J(55,63,NU,dv),B(cX,`RegEx/ParseException`,55),J(836,1,{},Hd),Q.bm=function(e){return e<this.j&&fO(this.i,e)==63},Q.cm=function(){var e,t,n,r,i;if(this.c!=10)throw A(new dv(BH((vC(),fY))));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(MH(this),this.c!=0)throw A(new dv(BH((vC(),hY))));if(this.a==123){i=0,n=0;do{if(MH(this),this.c!=0)throw A(new dv(BH((vC(),hY))));if((i=aR(this.a))<0)break;if(n>n*16)throw A(new dv(BH((vC(),cvt))));n=n*16+i}while(!0);if(this.a!=125)throw A(new dv(BH((vC(),lvt))));if(n>lX)throw A(new dv(BH((vC(),uvt))));e=n}else{if(i=0,this.c!=0||(i=aR(this.a))<0||(n=i,MH(this),this.c!=0||(i=aR(this.a))<0))throw A(new dv(BH((vC(),hY))));n=n*16+i,e=n}break;case 117:if(r=0,MH(this),this.c!=0||(r=aR(this.a))<0||(t=r,MH(this),this.c!=0||(r=aR(this.a))<0)||(t=t*16+r,MH(this),this.c!=0||(r=aR(this.a))<0)||(t=t*16+r,MH(this),this.c!=0||(r=aR(this.a))<0))throw A(new dv(BH((vC(),hY))));t=t*16+r,e=t;break;case 118:if(MH(this),this.c!=0||(r=aR(this.a))<0||(t=r,MH(this),this.c!=0||(r=aR(this.a))<0)||(t=t*16+r,MH(this),this.c!=0||(r=aR(this.a))<0)||(t=t*16+r,MH(this),this.c!=0||(r=aR(this.a))<0)||(t=t*16+r,MH(this),this.c!=0||(r=aR(this.a))<0)||(t=t*16+r,MH(this),this.c!=0||(r=aR(this.a))<0))throw A(new dv(BH((vC(),hY))));if(t=t*16+r,t>lX)throw A(new dv(BH((vC(),`parser.descappe.4`))));e=t;break;case 65:case 90:case 122:throw A(new dv(BH((vC(),dvt))))}return e},Q.dm=function(e){var t,n;switch(e){case 100:n=(this.e&32)==32?EH(`Nd`,!0):(IH(),B9);break;case 68:n=(this.e&32)==32?EH(`Nd`,!1):(IH(),QHt);break;case 119:n=(this.e&32)==32?EH(`IsWord`,!0):(IH(),U9);break;case 87:n=(this.e&32)==32?EH(`IsWord`,!1):(IH(),eUt);break;case 115:n=(this.e&32)==32?EH(`IsSpace`,!0):(IH(),H9);break;case 83:n=(this.e&32)==32?EH(`IsSpace`,!1):(IH(),$Ht);break;default:throw A(new z_((t=e,Pyt+t.toString(16))))}return n},Q.em=function(e){var t,n,r,i,a,o,s,c,l,u,d,f;for(this.b=1,MH(this),t=null,this.c==0&&this.a==94?(MH(this),e?u=(IH(),IH(),++W9,new Fk(5)):(t=(IH(),IH(),++W9,new Fk(4)),YB(t,0,lX),u=(++W9,new Fk(4)))):u=(IH(),IH(),++W9,new Fk(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:ZV(u,this.dm(n)),r=!0;break;case 105:case 73:case 99:case 67:n=this.um(u,n),n<0&&(r=!0);break;case 112:case 80:if(d=E4e(this,n),!d)throw A(new dv(BH((vC(),Q_t))));ZV(u,d),r=!0;break;default:n=this.cm()}else if(f==20){if(o=gw(this.i,58,this.d),o<0)throw A(new dv(BH((vC(),$_t))));if(s=!0,fO(this.i,this.d)==94&&(++this.d,s=!1),a=GO(this.i,this.d,o),c=ePe(a,s,(this.e&512)==512),!c)throw A(new dv(BH((vC(),evt))));if(ZV(u,c),r=!0,o+1>=this.j||fO(this.i,o+1)!=93)throw A(new dv(BH((vC(),$_t))));this.d=o+2}if(MH(this),!r){if(this.c!=0||this.a!=45)YB(u,n,n);else{if(MH(this),(f=this.c)==1)throw A(new dv(BH((vC(),mY))));f==0&&this.a==93?(YB(u,n,n),YB(u,45,45)):(l=this.a,f==10&&(l=this.cm()),MH(this),YB(u,n,l))}}(this.e&wU)==wU&&this.c==0&&this.a==44&&MH(this)}if(this.c==1)throw A(new dv(BH((vC(),mY))));return t&&(pH(t,u),u=t),xB(u),aH(u),this.b=0,MH(this),u},Q.fm=function(){for(var e,t,n=this.em(!1),r;(r=this.c)!=7;)if(e=this.a,r==0&&(e==45||e==38)||r==4){if(MH(this),this.c!=9)throw A(new dv(BH((vC(),avt))));if(t=this.em(!1),r==4)ZV(n,t);else if(e==45)pH(n,t);else if(e==38)Iot(n,t);else throw A(new z_(`ASSERT`))}else throw A(new dv(BH((vC(),ovt))));return MH(this),n},Q.gm=function(){var e=this.a-48,t=(IH(),IH(),++W9,new tEe(12,null,e));return!this.g&&(this.g=new Xg),Hg(this.g,new gre(e)),MH(this),t},Q.hm=function(){return MH(this),IH(),nUt},Q.im=function(){return MH(this),IH(),tUt},Q.jm=function(){throw A(new dv(BH((vC(),gY))))},Q.km=function(){throw A(new dv(BH((vC(),gY))))},Q.lm=function(){return MH(this),LVe()},Q.mm=function(){return MH(this),IH(),iUt},Q.nm=function(){return MH(this),IH(),oUt},Q.om=function(){var e;if(this.d>=this.j||((e=fO(this.i,this.d++))&65504)!=64)throw A(new dv(BH((vC(),J_t))));return MH(this),IH(),IH(),++W9,new fE(0,e-64)},Q.pm=function(){return MH(this),xrt()},Q.qm=function(){return MH(this),IH(),sUt},Q.rm=function(){var e=(IH(),IH(),++W9,new fE(0,105));return MH(this),e},Q.sm=function(){return MH(this),IH(),aUt},Q.tm=function(){return MH(this),IH(),rUt},Q.um=function(e,t){return this.cm()},Q.vm=function(){return MH(this),IH(),XHt},Q.wm=function(){var e,t,n,r,i;if(this.d+1>=this.j)throw A(new dv(BH((vC(),G_t))));if(r=-1,t=null,e=fO(this.i,this.d),49<=e&&e<=57){if(r=e-48,!this.g&&(this.g=new Xg),Hg(this.g,new gre(r)),++this.d,fO(this.i,this.d)!=41)throw A(new dv(BH((vC(),pY))));++this.d}else switch(e==63&&--this.d,MH(this),t=jlt(this),t.e){case 20:case 21:case 22:case 23:break;case 8:if(this.c!=7)throw A(new dv(BH((vC(),pY))));break;default:throw A(new dv(BH((vC(),K_t))))}if(MH(this),i=aL(this),n=null,i.e==2){if(i.Pm()!=2)throw A(new dv(BH((vC(),q_t))));n=i.Lm(1),i=i.Lm(0)}if(this.c!=7)throw A(new dv(BH((vC(),pY))));return MH(this),IH(),IH(),++W9,new SFe(r,t,i,n)},Q.xm=function(){return MH(this),IH(),ZHt},Q.ym=function(){var e;if(MH(this),e=QE(24,aL(this)),this.c!=7)throw A(new dv(BH((vC(),pY))));return MH(this),e},Q.zm=function(){var e;if(MH(this),e=QE(20,aL(this)),this.c!=7)throw A(new dv(BH((vC(),pY))));return MH(this),e},Q.Am=function(){var e;if(MH(this),e=QE(22,aL(this)),this.c!=7)throw A(new dv(BH((vC(),pY))));return MH(this),e},Q.Bm=function(){var e=0,t,n=0,r,i;for(t=-1;this.d<this.j&&(t=fO(this.i,this.d),i=M3e(t),i!=0);)e|=i,++this.d;if(this.d>=this.j)throw A(new dv(BH((vC(),U_t))));if(t==45){for(++this.d;this.d<this.j&&(t=fO(this.i,this.d),i=M3e(t),i!=0);)n|=i,++this.d;if(this.d>=this.j)throw A(new dv(BH((vC(),U_t))))}if(t==58){if(++this.d,MH(this),r=ASe(aL(this),e,n),this.c!=7)throw A(new dv(BH((vC(),pY))));MH(this)}else if(t==41)++this.d,MH(this),r=ASe(aL(this),e,n);else throw A(new dv(BH((vC(),W_t))));return r},Q.Cm=function(){var e;if(MH(this),e=QE(21,aL(this)),this.c!=7)throw A(new dv(BH((vC(),pY))));return MH(this),e},Q.Dm=function(){var e;if(MH(this),e=QE(23,aL(this)),this.c!=7)throw A(new dv(BH((vC(),pY))));return MH(this),e},Q.Em=function(){var e,t;if(MH(this),e=this.f++,t=$E(aL(this),e),this.c!=7)throw A(new dv(BH((vC(),pY))));return MH(this),t},Q.Fm=function(){var e;if(MH(this),e=$E(aL(this),0),this.c!=7)throw A(new dv(BH((vC(),pY))));return MH(this),e},Q.Gm=function(e){return MH(this),this.c==5?(MH(this),dE(e,(IH(),IH(),++W9,new gA(9,e)))):dE(e,(IH(),IH(),++W9,new gA(3,e)))},Q.Hm=function(e){var t;return MH(this),t=(IH(),IH(),++W9,new hC(2)),this.c==5?(MH(this),oH(t,V9),oH(t,e)):(oH(t,e),oH(t,V9)),t},Q.Im=function(e){return MH(this),this.c==5?(MH(this),IH(),IH(),++W9,new gA(9,e)):(IH(),IH(),++W9,new gA(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(cX,`RegEx/RegexParser`,836),J(1947,836,{},tie),Q.bm=function(e){return!1},Q.cm=function(){return F9e(this)},Q.dm=function(e){return wV(e)},Q.em=function(e){return $lt(this)},Q.fm=function(){throw A(new dv(BH((vC(),gY))))},Q.gm=function(){throw A(new dv(BH((vC(),gY))))},Q.hm=function(){throw A(new dv(BH((vC(),gY))))},Q.im=function(){throw A(new dv(BH((vC(),gY))))},Q.jm=function(){return MH(this),wV(67)},Q.km=function(){return MH(this),wV(73)},Q.lm=function(){throw A(new dv(BH((vC(),gY))))},Q.mm=function(){throw A(new dv(BH((vC(),gY))))},Q.nm=function(){throw A(new dv(BH((vC(),gY))))},Q.om=function(){return MH(this),wV(99)},Q.pm=function(){throw A(new dv(BH((vC(),gY))))},Q.qm=function(){throw A(new dv(BH((vC(),gY))))},Q.rm=function(){return MH(this),wV(105)},Q.sm=function(){throw A(new dv(BH((vC(),gY))))},Q.tm=function(){throw A(new dv(BH((vC(),gY))))},Q.um=function(e,t){return ZV(e,wV(t)),-1},Q.vm=function(){return MH(this),IH(),IH(),++W9,new fE(0,94)},Q.wm=function(){throw A(new dv(BH((vC(),gY))))},Q.xm=function(){return MH(this),IH(),IH(),++W9,new fE(0,36)},Q.ym=function(){throw A(new dv(BH((vC(),gY))))},Q.zm=function(){throw A(new dv(BH((vC(),gY))))},Q.Am=function(){throw A(new dv(BH((vC(),gY))))},Q.Bm=function(){throw A(new dv(BH((vC(),gY))))},Q.Cm=function(){throw A(new dv(BH((vC(),gY))))},Q.Dm=function(){throw A(new dv(BH((vC(),gY))))},Q.Em=function(){var e;if(MH(this),e=$E(aL(this),0),this.c!=7)throw A(new dv(BH((vC(),pY))));return MH(this),e},Q.Fm=function(){throw A(new dv(BH((vC(),gY))))},Q.Gm=function(e){return MH(this),dE(e,(IH(),IH(),++W9,new gA(3,e)))},Q.Hm=function(e){var t;return MH(this),t=(IH(),IH(),++W9,new hC(2)),oH(t,e),oH(t,V9),t},Q.Im=function(e){return MH(this),IH(),IH(),++W9,new gA(3,e)};var F9=null,I9=null;B(cX,`RegEx/ParserForXMLSchema`,1947),J(122,1,dX,ng),Q.Jm=function(e){throw A(new z_(`Not supported.`))},Q.Km=function(){return-1},Q.Lm=function(e){return null},Q.Mm=function(){return null},Q.Nm=function(e){},Q.Om=function(e){},Q.Pm=function(){return 0},Q.Ib=function(){return this.Qm(0)},Q.Qm=function(e){return this.e==11?`.`:``},Q.e=0;var WHt,L9,R9,GHt,KHt,z9=null,B9,qHt=null,JHt,V9,YHt=null,XHt,ZHt,QHt,$Ht,eUt,tUt,H9,nUt,rUt,iUt,aUt,U9,oUt,sUt,W9=0,cUt=B(cX,`RegEx/Token`,122);J(138,122,{3:1,138:1,122:1},Fk),Q.Qm=function(e){var t,n,r;if(this.e==4){if(this==JHt)n=`.`;else if(this==B9)n=`\\d`;else if(this==U9)n=`\\w`;else if(this==H9)n=`\\s`;else{for(r=new Ev,r.a+=`[`,t=0;t<this.b.length;t+=2)(e&wU)!=0&&t>0&&(r.a+=`,`),this.b[t]===this.b[t+1]?kS(r,RV(this.b[t])):(kS(r,RV(this.b[t])),r.a+=`-`,kS(r,RV(this.b[t+1])));r.a+=`]`,n=r.a}}else if(this==QHt)n=`\\D`;else if(this==eUt)n=`\\W`;else if(this==$Ht)n=`\\S`;else{for(r=new Ev,r.a+=`[^`,t=0;t<this.b.length;t+=2)(e&wU)!=0&&t>0&&(r.a+=`,`),this.b[t]===this.b[t+1]?kS(r,RV(this.b[t])):(kS(r,RV(this.b[t])),r.a+=`-`,kS(r,RV(this.b[t+1])));r.a+=`]`,n=r.a}return n},Q.a=!1,Q.c=!1,B(cX,`RegEx/RangeToken`,138),J(592,1,{592:1},gre),Q.a=0,B(cX,`RegEx/RegexParser/ReferencePosition`,592),J(591,1,{3:1,591:1},qae),Q.Fb=function(e){var t;return e==null||!F(e,591)?!1:(t=L(e,591),tT(this.b,t.b)&&this.a==t.a)},Q.Hb=function(){return KP(this.b+`/`+i7e(this.a))},Q.Ib=function(){return this.c.Qm(this.a)},Q.a=0,B(cX,`RegEx/RegularExpression`,591),J(228,122,dX,fE),Q.Km=function(){return this.a},Q.Qm=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=`\\`+qw(this.a&zU);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>=CW?(n=(t=this.a>>>0,`0`+t.toString(16)),r=`\\v`+GO(n,n.length-6,n.length)):r=``+qw(this.a&zU)}break;case 8:r=this==XHt||this==ZHt?``+qw(this.a&zU):`\\`+qw(this.a&zU);break;default:r=null}return r},Q.a=0,B(cX,`RegEx/Token/CharToken`,228),J(318,122,dX,gA),Q.Lm=function(e){return this.a},Q.Nm=function(e){this.b=e},Q.Om=function(e){this.c=e},Q.Pm=function(){return 1},Q.Qm=function(e){var t;if(this.e==3){if(this.c<0&&this.b<0)t=this.a.Qm(e)+`*`;else if(this.c==this.b)t=this.a.Qm(e)+`{`+this.c+`}`;else if(this.c>=0&&this.b>=0)t=this.a.Qm(e)+`{`+this.c+`,`+this.b+`}`;else if(this.c>=0&&this.b<0)t=this.a.Qm(e)+`{`+this.c+`,}`;else throw A(new z_(`Token#toString(): CLOSURE `+this.c+qH+this.b))}else if(this.c<0&&this.b<0)t=this.a.Qm(e)+`*?`;else if(this.c==this.b)t=this.a.Qm(e)+`{`+this.c+`}?`;else if(this.c>=0&&this.b>=0)t=this.a.Qm(e)+`{`+this.c+`,`+this.b+`}?`;else if(this.c>=0&&this.b<0)t=this.a.Qm(e)+`{`+this.c+`,}?`;else throw A(new z_(`Token#toString(): NONGREEDYCLOSURE `+this.c+qH+this.b));return t},Q.b=0,Q.c=0,B(cX,`RegEx/Token/ClosureToken`,318),J(837,122,dX,Qxe),Q.Lm=function(e){return e==0?this.a:this.b},Q.Pm=function(){return 2},Q.Qm=function(e){return this.b.e==3&&this.b.Lm(0)==this.a?this.a.Qm(e)+`+`:this.b.e==9&&this.b.Lm(0)==this.a?this.a.Qm(e)+`+?`:this.a.Qm(e)+(``+this.b.Qm(e))},B(cX,`RegEx/Token/ConcatToken`,837),J(1945,122,dX,SFe),Q.Lm=function(e){if(e==0)return this.d;if(e==1)return this.b;throw A(new z_(`Internal Error: `+e))},Q.Pm=function(){return this.b?2:1},Q.Qm=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(cX,`RegEx/Token/ConditionToken`,1945),J(1946,122,dX,fOe),Q.Lm=function(e){return this.b},Q.Pm=function(){return 1},Q.Qm=function(e){return`(?`+(this.a==0?``:i7e(this.a))+(this.c==0?``:i7e(this.c))+`:`+this.b.Qm(e)+`)`},Q.a=0,Q.c=0,B(cX,`RegEx/Token/ModifierToken`,1946),J(838,122,dX,$Se),Q.Lm=function(e){return this.a},Q.Pm=function(){return 1},Q.Qm=function(e){var t=null;switch(this.e){case 6:t=this.b==0?`(?:`+this.a.Qm(e)+`)`:`(`+this.a.Qm(e)+`)`;break;case 20:t=`(?=`+this.a.Qm(e)+`)`;break;case 21:t=`(?!`+this.a.Qm(e)+`)`;break;case 22:t=`(?<=`+this.a.Qm(e)+`)`;break;case 23:t=`(?<!`+this.a.Qm(e)+`)`;break;case 24:t=`(?>`+this.a.Qm(e)+`)`}return t},Q.b=0,B(cX,`RegEx/Token/ParenToken`,838),J(530,122,{3:1,122:1,530:1},tEe),Q.Mm=function(){return this.b},Q.Qm=function(e){return this.e==12?`\\`+this.a:d8e(this.b)},Q.a=0,B(cX,`RegEx/Token/StringToken`,530),J(477,122,dX,hC),Q.Jm=function(e){oH(this,e)},Q.Lm=function(e){return L(UD(this.a,e),122)},Q.Pm=function(){return this.a?this.a.a.c.length:0},Q.Qm=function(e){var t,n,r,i,a;if(this.e==1){if(this.a.a.c.length==2)t=L(UD(this.a,0),122),n=L(UD(this.a,1),122),i=n.e==3&&n.Lm(0)==t?t.Qm(e)+`+`:n.e==9&&n.Lm(0)==t?t.Qm(e)+`+?`:t.Qm(e)+(``+n.Qm(e));else{for(a=new Ev,r=0;r<this.a.a.c.length;r++)kS(a,L(UD(this.a,r),122).Qm(e));i=a.a}return i}if(this.a.a.c.length==2&&L(UD(this.a,1),122).e==7)i=L(UD(this.a,0),122).Qm(e)+`?`;else if(this.a.a.c.length==2&&L(UD(this.a,0),122).e==7)i=L(UD(this.a,1),122).Qm(e)+`??`;else{for(a=new Ev,kS(a,L(UD(this.a,0),122).Qm(e)),r=1;r<this.a.a.c.length;r++)a.a+=`|`,kS(a,L(UD(this.a,r),122).Qm(e));i=a.a}return i},B(cX,`RegEx/Token/UnionToken`,477),J(527,1,{600:1},Hy),Q.Ib=function(){return this.a.b},B(Gyt,`XMLTypeUtil/PatternMatcherImpl`,527),J(1707,1527,{},Ud);var lUt;B(Gyt,`XMLTypeValidator`,1707),J(270,1,hU,VE),Q.Jc=function(e){EA(this,e)},Q.Kc=function(){return(this.b-this.a)*this.c<0?G9:new WC(this)},Q.a=0,Q.b=0,Q.c=0;var G9;B(Kyt,`ExclusiveRange`,270),J(1084,1,oU,Wd),Q.Rb=function(e){L(e,17),nde()},Q.Nb=function(e){eD(this,e)},Q.Pb=function(){return Gae()},Q.Ub=function(){return Kae()},Q.Wb=function(e){L(e,17),ide()},Q.Ob=function(){return!1},Q.Sb=function(){return!1},Q.Tb=function(){return-1},Q.Vb=function(){return-1},Q.Qb=function(){throw A(new ov(Yyt))},B(Kyt,`ExclusiveRange/1`,1084),J(258,1,oU,WC),Q.Rb=function(e){L(e,17),rde()},Q.Nb=function(e){eD(this,e)},Q.Pb=function(){return WHe(this)},Q.Ub=function(){return lPe(this)},Q.Wb=function(e){L(e,17),ade()},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 A(new ov(Yyt))},Q.a=0,Q.b=0,B(Kyt,`ExclusiveRange/RangeIterator`,258);var K9=ZD(CY,`C`),q9=ZD(EY,`I`),J9=ZD(HH,`Z`),Y9=ZD(DY,`J`),X9=ZD(SY,`B`),Z9=ZD(wY,`D`),Q9=ZD(TY,`F`),$9=ZD(OY,`S`),uUt=YT(`org.eclipse.elk.core.labels`,`ILabelManager`),dUt=YT(tY,`DiagnosticChain`),fUt=YT(tyt,`ResourceSet`),pUt=B(tY,`InvocationTargetException`,null),mUt=(Tv(),Yje),hUt=hUt=QZe;PLe(yre),SLe(`permProps`,[[[`locale`,`default`],[Xyt,`gecko1_8`]],[[`locale`,`default`],[Xyt,`safari`]]]),hUt(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,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function i(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function a(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=function(t){a(n,t);function n(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};r(this,n);var a=Object.assign({},t),o=!1;try{e.resolve(`web-worker`),o=!0}catch{}if(t.workerUrl){if(o){var s=e("web-worker");a.workerFactory=function(e){return new s(e)}}else console.warn(`Web worker requested but 'web-worker' package not installed.
353
353
  Consider installing the package or pass your own 'workerFactory' to ELK's constructor.
354
- ... Falling back to non-web worker version.`)}if(!a.workerFactory){var c=e("./elk-worker.min.js").Worker;a.workerFactory=function(e){return new c(e)}}return i(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,a))}return n}(e("./elk-api.js").default);Object.defineProperty(t.exports,"__esModule",{value:!0}),t.exports=o,o.default=o},{"./elk-api.js":1,"./elk-worker.min.js":2,"web-worker":4}],4:[function(e,t,n){t.exports=Worker},{}]},{},[3])(3)})})),Ute=c(o(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r(Hte()):typeof define==`function`&&define.amd?define([`elkjs`],r):typeof e==`object`?e.cytoscapeElk=r(Hte()):n.cytoscapeElk=r(n.ELK)})(e,function(e){return(function(){var t={632:(function(t){t.exports=e})},n={};function r(e){var i=n[e];if(i!==void 0)return i.exports;var a=n[e]={exports:{}};return t[e](a,a.exports,r),a.exports}(function(){r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t}})(),(function(){r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}})(),(function(){r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}})();var i={};return(function(){r.d(i,{default:function(){return _}});var e=r(632),t=r.n(e);function n(e){return[...arguments].slice(1).forEach(function(t){Object.keys(t).forEach(function(n){return e[n]=t[n]})}),e}var a=Object.assign==null?n:Object.assign.bind(Object),o={nodeDimensionsIncludeLabels:!1,fit:!0,padding:20,animate:!1,animateFilter:function(){return!0},animationDuration:500,animationEasing:void 0,transform:function(e,t){return t},ready:void 0,stop:void 0,nodeLayoutOptions:void 0,elk:{algorithm:void 0},priority:function(){return null}};function s(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function c(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,r.key,r)}}function l(e,t,n){return t&&c(e.prototype,t),n&&c(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var u={},d=function(e,t){for(var n=e.layoutDimensions(t),r=e.parent(),i=e.scratch(`elk`),a={x:i.x,y:i.y};r.nonempty();){var o=r.scratch(`elk`);a.x+=o.x,a.y+=o.y,r=r.parent()}return a.x+=n.w/2,a.y+=n.h/2,a},f=function(e,t){var n={_cyEle:e,id:e.id()};if(t.nodeLayoutOptions&&(n.layoutOptions=t.nodeLayoutOptions(e)),!e.isParent()){var r=e.layoutDimensions(t),i=e.position();n.x=i.x-r.w/2,n.y=i.y-r.h/2,n.width=r.w,n.height=r.h}return e.scratch(`elk`,n),n},p=function(e){var t={_cyEle:e,id:e.id(),source:e.data(`source`),target:e.data(`target`)};return e.scratch(`elk`,t),t},m=function(e,t,n){for(var r=[],i=[],a={},o={id:`root`,children:[],edges:[]},s=0;s<e.length;s++){var c=e[s],l=f(c,n);r.push(l),a[c.id()]=l}for(var u=0;u<t.length;u++){var d=t[u],m=p(d,n);i.push(m),a[d.id()]=m}for(var h=0;h<r.length;h++){var g=r[h],_=g._cyEle;if(!_.isChild())o.children.push(g);else{var v=a[_.parent().id()];(v.children=v.children||[]).push(g)}}for(var y=0;y<i.length;y++){var b=i[y];o.edges.push(b)}return o},h=function(){function e(t){s(this,e);var n=t.elk,r=t.cy;this.options=a({},o,t),this.options.elk=a({aspectRatio:r.width()/r.height()},o.elk,n,u)}return l(e,[{key:`run`,value:function(){var e=this,n=this.options,r=n.eles,i=r.nodes(),a=r.edges(),o=new(t()),s=m(i,a,n);return s.layoutOptions=n.elk,o.layout(s).then(function(){i.filter(function(e){return!e.isParent()}).layoutPositions(e,n,function(e){return d(e,n)})}),this}},{key:`stop`,value:function(){return this}},{key:`destroy`,value:function(){return this}}]),e}(),g=function(e){e&&e(`layout`,`elk`,h)};typeof cytoscape<`u`&&g(cytoscape);var _=g})(),i=i.default,i})()})}))(),1);function Wte(e){return e===`planned`||e===`current`||e===`retired`}var Gte=`#182228`,Kte=`#416f65`,qte=`#a3403a`,Jte=`#5f686d`,Yte=[Kte,`#8c4d18`,`#2457a6`,Gte],Xte=12;function th(e){return`data:image/svg+xml;utf8,${encodeURIComponent(e)}`}function nh(e){return`<svg xmlns="http://www.w3.org/2000/svg" width="${Xte}" height="${Xte}" viewBox="0 0 12 12">${e}</svg>`}var rh={planned:nh(`<circle cx="6" cy="6" r="4" fill="none" stroke="${Jte}" stroke-width="2"/>`),current:nh(`<circle cx="6" cy="6" r="5" fill="${Kte}"/>`),retired:nh(`<circle cx="6" cy="6" r="5" fill="${qte}"/>`)},Zte={planned:th(rh.planned),current:th(rh.current),retired:th(rh.retired)},Qte=th(nh(`<circle cx="6" cy="6" r="5" fill="${Gte}"/><path d="M3.2 6.2 L5.2 8.2 L8.8 4.2" fill="none" stroke="#ffffff" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"/>`));function $te(e){let t=2166136261;for(let n=0;n<e.length;n++)t=Math.imul(t^e.charCodeAt(n),16777619);return t}function ene(e){if(e===null)return null;let t=$te(e);return Yte[Math.abs(t)%Yte.length]}function tne(e,t){return nh(`<circle cx="6" cy="6" r="5" fill="${ene(e)}"/><text x="6" y="7.5" font-size="8" font-weight="bold" fill="#ffffff" text-anchor="middle" dominant-baseline="middle">${t}</text>`)}function nne(e,t){return th(tne(e,t))}function rne(e){let t=e>9?`9+`:String(e);return nh(`<circle cx="6" cy="6" r="5" fill="${Jte}"/><text x="6" y="7.5" font-size="${t.length>1?6.5:8}" font-weight="bold" fill="#ffffff" text-anchor="middle" dominant-baseline="middle">${t}</text>`)}function ine(e){return th(rne(e))}function ane(e){if(e===null)return null;let t=(e.includes(`#`)?e.slice(e.indexOf(`#`)+1):e).split(/[-_\s]+/).filter(e=>e.length>0);if(t.length===0)return null;let n=t.slice(0,2).map(e=>e[0].toUpperCase()).join(``);return n.length>0?n:null}var one=[`motivation`,`strategy`,`business`,`application`,`technology`,`physical`,`implementation`,`composite`],ih=(e,t,n)=>n.map(([n,r,i])=>({id:n,name:r,layer:e,aspect:t,...i===void 0?{}:{rigidity:i},inspiredBy:`archimate:${r}`})),ah=[...ih(`motivation`,`motivation`,[[`stakeholder`,`Stakeholder`,`anti-rigid`],[`driver`,`Driver`],[`assessment`,`Assessment`],[`goal`,`Goal`],[`outcome`,`Outcome`],[`principle`,`Principle`],[`requirement`,`Requirement`],[`constraint`,`Constraint`],[`meaning`,`Meaning`],[`value`,`Value`]]),...ih(`strategy`,`active-structure`,[[`resource`,`Resource`]]),...ih(`strategy`,`behavior`,[[`capability`,`Capability`],[`valueStream`,`Value stream`],[`courseOfAction`,`Course of action`]]),...ih(`business`,`active-structure`,[[`businessActor`,`Business actor`],[`businessRole`,`Business role`,`anti-rigid`],[`businessCollaboration`,`Business collaboration`,`anti-rigid`],[`businessInterface`,`Business interface`]]),...ih(`business`,`behavior`,[[`businessProcess`,`Business process`],[`businessFunction`,`Business function`],[`businessInteraction`,`Business interaction`],[`businessEvent`,`Business event`],[`businessService`,`Business service`]]),...ih(`business`,`passive-structure`,[[`businessObject`,`Business object`],[`contract`,`Contract`],[`representation`,`Representation`]]),...ih(`business`,`composite`,[[`product`,`Product`]]),...ih(`application`,`active-structure`,[[`applicationComponent`,`Application component`],[`applicationCollaboration`,`Application collaboration`,`anti-rigid`],[`applicationInterface`,`Application interface`]]),...ih(`application`,`behavior`,[[`applicationFunction`,`Application function`],[`applicationInteraction`,`Application interaction`],[`applicationProcess`,`Application process`],[`applicationEvent`,`Application event`],[`applicationService`,`Application service`]]),...ih(`application`,`passive-structure`,[[`dataObject`,`Data object`]]),...ih(`technology`,`active-structure`,[[`node`,`Node`],[`device`,`Device`],[`systemSoftware`,`System software`],[`technologyCollaboration`,`Technology collaboration`,`anti-rigid`],[`technologyInterface`,`Technology interface`],[`path`,`Path`],[`communicationNetwork`,`Communication network`]]),...ih(`technology`,`behavior`,[[`technologyFunction`,`Technology function`],[`technologyProcess`,`Technology process`],[`technologyInteraction`,`Technology interaction`],[`technologyEvent`,`Technology event`],[`technologyService`,`Technology service`]]),...ih(`technology`,`passive-structure`,[[`artifact`,`Artifact`]]),...ih(`physical`,`active-structure`,[[`equipment`,`Equipment`],[`facility`,`Facility`],[`distributionNetwork`,`Distribution network`]]),...ih(`physical`,`passive-structure`,[[`material`,`Material`]]),...ih(`implementation`,`behavior`,[[`workPackage`,`Work package`],[`implementationEvent`,`Implementation event`]]),...ih(`implementation`,`passive-structure`,[[`deliverable`,`Deliverable`]]),...ih(`implementation`,`composite`,[[`plateau`,`Plateau`],[`gap`,`Gap`]]),...ih(`composite`,`composite`,[[`grouping`,`Grouping`],[`location`,`Location`],[`andJunction`,`AND junction`],[`orJunction`,`OR junction`]])],sne=[`composition`,`aggregation`,`assignment`,`realization`,`serving`,`access`,`influence`,`association`,`triggering`,`flow`,`specialization`],cne=`#182228`,oh={motivation:{fill:`#CCCCFF`,border:`#8F8FE0`},strategy:{fill:`#F5DEAA`,border:`#C9A355`},business:{fill:`#FFFF99`,border:`#C9C355`},application:{fill:`#CCFFFF`,border:`#4FB8B8`},technology:{fill:`#CCFFCC`,border:`#5FAE5F`},implementation:{fill:`#FFE0E0`,border:`#D89999`},physical:{fill:`#F0F0F0`,border:`#999999`},composite:{fill:`#F0F0F0`,border:`#999999`}},lne={motivation:{shape:`octagon`},"active-structure":{shape:`rectangle`},behavior:{shape:`round-rectangle`},"passive-structure":{shape:`rectangle`,accent:`top-band`},composite:{shape:`rectangle`}},une={grouping:{borderStyle:`dashed`}};function dne(e){return`<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 14 14"><g fill="none" stroke="${cne}" stroke-width="1" stroke-linecap="round" stroke-linejoin="round">${e}</g></svg>`}function fne(e){return`data:image/svg+xml;utf8,${encodeURIComponent(e)}`}var pne={andJunction:`<circle cx="7" cy="7" r="2.6" fill="#182228"/>`,applicationCollaboration:`<circle cx="5.5" cy="7" r="4"/><circle cx="8.5" cy="7" r="4"/>`,applicationComponent:`<rect x="3" y="2" width="9" height="10"/><rect x="1" y="4" width="2.5" height="1.5"/><rect x="1" y="8" width="2.5" height="1.5"/>`,applicationEvent:`<path d="M3 3 H8 L11 7 L8 11 H3 Z"/>`,applicationFunction:`<rect x="2" y="3" width="10" height="8" rx="2"/><path d="M5.5 5 L8 7 L5.5 9"/>`,applicationInteraction:`<path d="M2 5 H9 M9 5 L7 3 M9 5 L7 7"/><path d="M12 9 H5 M5 9 L7 7 M5 9 L7 11"/>`,applicationInterface:`<line x1="1.5" y1="7" x2="6" y2="7"/><circle cx="9" cy="7" r="3"/>`,applicationProcess:`<path d="M2 7 H10 M10 7 L7.5 4.5 M10 7 L7.5 9.5"/>`,applicationService:`<rect x="1.5" y="4" width="11" height="6" rx="3"/>`,artifact:`<path d="M3 1.5 H9 L11 3.5 V12.5 H3 Z"/><path d="M9 1.5 V3.5 H11"/>`,assessment:`<circle cx="6" cy="6" r="3.5"/><path d="M8.5 8.5 L12 12"/>`,businessActor:`<circle cx="7" cy="3.5" r="1.8"/><path d="M7 5.3 V9 M4 7 H10 M7 9 L4.5 12.5 M7 9 L9.5 12.5"/>`,businessCollaboration:`<circle cx="5.5" cy="7" r="4"/><circle cx="8.5" cy="7" r="4"/>`,businessEvent:`<path d="M3 3 H8 L11 7 L8 11 H3 Z"/>`,businessFunction:`<rect x="2" y="3" width="10" height="8" rx="2"/><path d="M5 8 L7 5.5 L9 8"/>`,businessInteraction:`<path d="M2 5 H9 M9 5 L7 3 M9 5 L7 7"/><path d="M12 9 H5 M5 9 L7 7 M5 9 L7 11"/>`,businessInterface:`<line x1="1.5" y1="7" x2="6" y2="7"/><circle cx="9" cy="7" r="3"/>`,businessObject:`<rect x="2" y="3" width="10" height="8"/>`,businessProcess:`<path d="M2 7 H10 M10 7 L7.5 4.5 M10 7 L7.5 9.5"/>`,businessRole:`<circle cx="7" cy="6" r="4"/><path d="M5 9.5 L4 12.5 L7 11 L10 12.5 L9 9.5"/>`,businessService:`<rect x="1.5" y="4" width="11" height="6" rx="3"/>`,capability:`<rect x="2" y="2" width="10" height="10" rx="1"/><path d="M5 9 L9 5 M9 5 H6.5 M9 5 V7.5"/>`,communicationNetwork:`<circle cx="3.5" cy="4" r="1.2"/><circle cx="11" cy="4" r="1.2"/><circle cx="7" cy="10.5" r="1.2"/><path d="M3.5 4 L11 4 M3.5 4 L7 10.5 M11 4 L7 10.5"/>`,constraint:`<rect x="4" y="6.5" width="6" height="5.5" rx="0.5"/><path d="M5.2 6.5 V4.7 A1.8 1.8 0 0 1 8.8 4.7 V6.5"/>`,contract:`<rect x="2" y="2" width="10" height="10"/><path d="M2 4.5 H12 M2 6.5 H12"/>`,courseOfAction:`<path d="M7 2 V12.5"/><path d="M7 4 H11 L9.5 5.5 L11 7 H7 Z"/><path d="M7 8 H4 L5.5 9.5 L4 11 H7 Z"/>`,dataObject:`<rect x="2" y="2" width="10" height="10"/><path d="M2 5.5 H12"/>`,deliverable:`<path d="M3 1.5 H8 L11 4.5 V12.5 H3 Z"/><path d="M8 1.5 V4.5 H11"/><path d="M5 9.5 L7 12.5 L9 9.5"/>`,device:`<rect x="2" y="3" width="10" height="6" rx="0.5"/><path d="M4.5 9 V11 M9.5 9 V11 M3.5 11 H6 M8 11 H10.5"/>`,distributionNetwork:`<path d="M2 11 Q4 11 5 8 Q6 5 7 5 Q8 5 9 8 Q10 11 12 11"/><circle cx="2" cy="11" r="1"/><circle cx="12" cy="11" r="1"/><circle cx="7" cy="5" r="1"/>`,driver:`<circle cx="7" cy="7" r="5"/><path d="M7 2 V5 M7 9 V12 M2 7 H5 M9 7 H12"/>`,equipment:`<rect x="2" y="3" width="10" height="8"/><path d="M2 3 L7 6 L12 3 M7 6 V11"/>`,facility:`<path d="M2 12.5 V6 L7 2.5 L12 6 V12.5 Z"/><path d="M5.5 12.5 V8.5 H8.5 V12.5"/>`,gap:`<path d="M2 4 H6 M2 10 H6"/><path d="M8 4 H12 M8 10 H12"/><path d="M7 3 V11" stroke-dasharray="1.4 1.3"/>`,goal:`<circle cx="7" cy="7" r="5"/><circle cx="7" cy="7" r="2.2"/>`,grouping:`<rect x="2" y="2" width="10" height="10" rx="1" stroke-dasharray="2 1.4"/>`,implementationEvent:`<path d="M3 3 H8 L11 7 L8 11 H3 Z"/>`,location:`<path d="M7 12.5 C7 12.5 3 8 3 5.5 A4 4 0 0 1 11 5.5 C11 8 7 12.5 7 12.5 Z"/><circle cx="7" cy="5.5" r="1.3"/>`,material:`<rect x="2" y="8" width="4" height="4"/><rect x="6.5" y="6" width="4" height="6"/><rect x="4" y="2.5" width="4" height="4"/>`,meaning:`<path d="M2 3 H12 V9 H6 L4 11 V9 H2 Z"/><path d="M4.5 6 H9.5"/>`,node:`<path d="M2 5 L7 2.5 L12 5 L12 10 L7 12.5 L2 10 Z"/><path d="M2 5 L7 7.5 L12 5 M7 7.5 V12.5"/>`,orJunction:`<circle cx="7" cy="7" r="2.6"/>`,outcome:`<path d="M3 1.5 V12.5"/><path d="M3 2 H9 L7 4 L9 6 H3 Z"/>`,path:`<circle cx="3" cy="7" r="1.3"/><circle cx="11" cy="7" r="1.3"/><path d="M4.5 7 H9.5" stroke-dasharray="1.6 1.4"/>`,plateau:`<path d="M2 11 L4.5 4 H9.5 L12 11 Z"/><path d="M2 11 H12"/>`,principle:`<path d="M3 2.5 H11 V9 L7 11.5 L3 9 Z"/><path d="M5 6 L6.5 7.5 L9.5 4.5"/>`,product:`<rect x="2" y="5" width="10" height="7"/><path d="M2 5 L7 1.5 L12 5"/>`,representation:`<path d="M3 2 H11 V9 Q9.5 11 8 9.5 Q6.5 8 5 9.5 Q3.5 11 3 9 Z"/>`,requirement:`<path d="M3 2.5 H11 V9 L7 11.5 L3 9 Z"/><path d="M3 5 H11"/>`,resource:`<rect x="2" y="4.5" width="9" height="5" rx="1"/><rect x="11" y="6" width="1.5" height="2"/><path d="M4 6 V8 M6.5 6 V8 M9 6 V8"/>`,stakeholder:`<circle cx="7" cy="5" r="2.2"/><path d="M2.5 12.5 Q2.5 8 7 8 Q11.5 8 11.5 12.5"/>`,systemSoftware:`<rect x="2" y="2" width="10" height="10"/><rect x="4" y="4" width="4" height="3"/>`,technologyCollaboration:`<circle cx="5.5" cy="7" r="4"/><circle cx="8.5" cy="7" r="4"/>`,technologyEvent:`<path d="M3 3 H8 L11 7 L8 11 H3 Z"/>`,technologyFunction:`<circle cx="7" cy="7" r="4"/><path d="M7 2 V3.2 M7 10.8 V12 M2 7 H3.2 M10.8 7 H12 M3.5 3.5 L4.3 4.3 M9.7 9.7 L10.5 10.5 M3.5 10.5 L4.3 9.7 M9.7 4.3 L10.5 3.5"/>`,technologyInteraction:`<path d="M2 5 H9 M9 5 L7 3 M9 5 L7 7"/><path d="M12 9 H5 M5 9 L7 7 M5 9 L7 11"/>`,technologyInterface:`<line x1="1.5" y1="7" x2="6" y2="7"/><circle cx="9" cy="7" r="3"/>`,technologyProcess:`<path d="M2 7 H10 M10 7 L7.5 4.5 M10 7 L7.5 9.5"/>`,technologyService:`<rect x="1.5" y="4" width="11" height="6" rx="3"/>`,value:`<path d="M7 2 L11.5 7 L7 12 L2.5 7 Z"/>`,valueStream:`<path d="M2 5 H8 V3.5 L12 7 L8 10.5 V9 H2 Z"/>`,workPackage:`<rect x="2" y="5" width="10" height="7"/><path d="M5 5 V3.5 A1 1 0 0 1 6 2.5 H8 A1 1 0 0 1 9 3.5 V5"/>`},mne=ah.map(e=>({id:e.id,notation:e.name,layer:e.layer,aspect:e.aspect,...lne[e.aspect],...une[e.id],glyph:pne[e.id]??null,colors:oh[e.layer]})),hne=Object.fromEntries(mne.map(e=>[e.id,e]));function gne(e){let t=hne[e]?.glyph;return t==null?null:fne(dne(t))}var _ne={composition:{lineStyle:`solid`,sourceArrow:{shape:`diamond`,fill:`filled`},targetArrow:{shape:`none`}},aggregation:{lineStyle:`solid`,sourceArrow:{shape:`diamond`,fill:`hollow`},targetArrow:{shape:`none`}},assignment:{lineStyle:`solid`,sourceArrow:{shape:`circle`,fill:`filled`},targetArrow:{shape:`triangle`,fill:`filled`}},realization:{lineStyle:`dotted`,sourceArrow:{shape:`none`},targetArrow:{shape:`triangle`,fill:`hollow`}},specialization:{lineStyle:`solid`,sourceArrow:{shape:`none`},targetArrow:{shape:`triangle`,fill:`hollow`}},serving:{lineStyle:`solid`,sourceArrow:{shape:`none`},targetArrow:{shape:`vee`}},access:{lineStyle:`dotted`,sourceArrow:{shape:`none`},targetArrow:{shape:`vee`}},influence:{lineStyle:`dashed`,sourceArrow:{shape:`none`},targetArrow:{shape:`vee`}},triggering:{lineStyle:`solid`,sourceArrow:{shape:`none`},targetArrow:{shape:`triangle`,fill:`filled`}},flow:{lineStyle:`dashed`,sourceArrow:{shape:`none`},targetArrow:{shape:`triangle`,fill:`filled`}},association:{lineStyle:`solid`,sourceArrow:{shape:`none`},targetArrow:{shape:`none`}}},vne=sne.map(e=>({id:e,..._ne[e]}));Object.fromEntries(vne.map(e=>[e.id,e]));var yne={"compiler-module":`applicationComponent`,"repository-file":`artifact`};function sh(e){let t=yne[e];return gne(t===void 0?e:t)}var bne=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),k=o(((e,t)=>{t.exports=bne()}))(),xne=`application/x-yarramate-kind`,Sne=`unlayered`,Cne=new Map(ah.map(e=>[e.id,e.layer])),wne=e=>{let t=new Map;for(let n of e){let e=Cne.get(n.coreLabel)??Sne,r=t.get(e);r===void 0?t.set(e,[n]):r.push(n)}return[...one,Sne].flatMap(e=>{let n=t.get(e);return n===void 0?[]:[{layer:e,kinds:n}]})},Tne=({kinds:e,onPick:t})=>(0,k.jsx)(`div`,{className:`kind-palette`,children:wne(e).map(e=>(0,k.jsxs)(`div`,{className:`kind-palette-layer`,children:[(0,k.jsx)(`p`,{className:`kind-palette-layer-name`,children:e.layer}),(0,k.jsx)(`ul`,{className:`kind-palette-rows`,children:e.kinds.map(e=>{let n=sh(e.label)??sh(e.coreLabel);return(0,k.jsx)(`li`,{children:(0,k.jsxs)(`button`,{type:`button`,className:`kind-palette-row`,draggable:!0,"data-kind":e.label,onDragStart:t=>{t.dataTransfer.setData(xne,e.label),t.dataTransfer.effectAllowed=`copy`},onClick:()=>t(e.label),children:[n===null?null:(0,k.jsx)(`img`,{src:n,alt:``,width:14,height:14}),(0,k.jsx)(`span`,{children:e.label})]})},e.id)})})]},e.layer))}),ch=e=>e.trim().toLowerCase();function lh(e,t,n,r){return e===``||t.toLowerCase().includes(e)||typeof n==`string`&&n.toLowerCase().includes(e)?!0:typeof r==`string`&&r.toLowerCase().includes(e)}var Ene=(e,t)=>{let n=ch(t);return e.filter(e=>lh(n,e.id,e.name,e.kindLabel)).length},Dne=!1;Dne||=(eh.use(Ute.default),!0);var One=`#F0F0F0`,kne=`#999999`,Ane=170,jne=50,Mne=150,Nne=110,Pne=`​`;function uh(e){return e.replace(/([/._-])/g,`$1${Pne}`)}var dh=30,Fne=20,Ine=1.25,Lne=.02,Rne=10;function zne(e,t){let n=t===1?e*Ine:e/Ine;return Math.min(Rne,Math.max(Lne,n))}var fh={"elk.spacing.nodeNode":60,"elk.layered.spacing.nodeNodeBetweenLayers":100,"elk.spacing.edgeNode":30,"elk.layered.spacing.edgeNodeBetweenLayers":30,"elk.spacing.edgeEdge":20,"elk.layered.spacing.edgeEdgeBetweenLayers":20,"elk.spacing.componentComponent":80,"elk.padding":`[top=52,left=${dh},bottom=${dh},right=${dh}]`},Bne=2.5,Vne={"top-down":`DOWN`,"left-right":`RIGHT`};function Hne(e){return{name:`elk`,elk:{algorithm:`layered`,"elk.direction":Vne[e],"elk.layered.nodePlacement.strategy":`NETWORK_SIMPLEX`,aspectRatio:Bne,...fh},nodeLayoutOptions:e=>e.isParent()?fh:void 0}}var ph=12;function Une(e,t,n,r,i){let a=[],o=sh(String(e.data(`kindLabel`)));o!==null&&a.push({image:o,positionX:`0%`,positionY:`0%`,size:14});let s=e.data(`status`);t&&Wte(s)&&a.push({image:Zte[s],positionX:`100%`,positionY:`0%`,size:ph}),n&&e.data(`hasAttestations`)===!0&&a.push({image:Qte,positionX:`0%`,positionY:`100%`,size:ph});let c=e.data(`owner`),l=e.data(`ownerInitials`),u=r&&c!==null&&l!==null;u&&a.push({image:nne(c,l),positionX:`100%`,positionY:`100%`,size:ph});let d=e.data(`openQuestions`);return i&&typeof d==`number`&&d>0&&a.push({image:ine(d),positionX:u?`84%`:`96%`,positionY:u?`100%`:`88%`,size:ph}),a}var Wne=[`added`,`removed`,`changed`],mh=e=>`deco-${e}`,Gne=Wne.map(mh).join(` `),hh={added:`#416F65`,removed:`#677074`,changed:`#8C4D18`};function Kne(e,t){e.elements().removeClass(Gne);for(let[n,r]of Object.entries(t)){let t=e.getElementById(n);t.nonempty()&&t.addClass(mh(r))}}function gh(e,t,n,r){let i=new Map,a=a=>{let o=`${String(a.data(`status`))}\u0000${String(a.data(`hasAttestations`))}\u0000${String(a.data(`owner`))}\u0000${String(a.data(`ownerInitials`))}\u0000${String(a.data(`kindLabel`))}\u0000${String(a.data(`openQuestions`))}`,s=i.get(o);if(s!==void 0)return s;let c=Une(a,e,t,n,r),l={images:c.map(e=>e.image),positionsX:c.map(e=>e.positionX),positionsY:c.map(e=>e.positionY),sizes:c.map(e=>e.size),containments:c.map(()=>`over`),clips:c.map(()=>`none`)};return i.set(o,l),l},o=[{selector:`node`,style:{"background-color":One,"border-color":kne,"border-width":2,shape:`roundrectangle`,width:Ane,height:jne,padding:`8px`,label:`data(wrapLabel)`,"font-size":12,"text-wrap":`wrap`,"text-max-width":`${Mne}px`,"text-halign":`center`,"text-valign":`center`,color:`#333333`}},{selector:`node`,style:{"background-image":e=>a(e).images,"background-position-x":e=>a(e).positionsX,"background-position-y":e=>a(e).positionsY,"background-width":e=>a(e).sizes,"background-height":e=>a(e).sizes,"background-image-containment":e=>a(e).containments,"background-clip":e=>a(e).clips}},...Object.entries(oh).map(([e,t])=>({selector:`node[layer = "${e}"]`,style:{"background-color":t.fill,"border-color":t.border}})),{selector:`node:parent`,style:{shape:`roundrectangle`,"background-opacity":.25,"border-width":2,"border-style":`dashed`,padding:`${dh}px`,label:`data(wrapLabel)`,"font-size":13,"font-weight":`bold`,"text-halign":`center`,"text-valign":`top`,"text-margin-y":-8,color:`#333333`}},{selector:`node.selected`,style:{"border-color":`#FF6B6B`,"border-width":4}},{selector:`edge`,style:{"line-color":`#999999`,width:1.5,"curve-style":`round-taxi`,"taxi-radius":25,"target-arrow-shape":`triangle`,"target-arrow-color":`#999999`,label:`data(wrapLabel)`,"font-size":10,"text-wrap":`wrap`,"text-max-width":`${Nne}px`,"text-background-color":`#FFFFFF`,"text-background-padding":`3px`,"text-background-opacity":1}},{selector:`edge.parallel`,style:{"curve-style":`bezier`,"control-point-step-size":40}},{selector:`edge.selected`,style:{"line-color":`#FF6B6B`,"target-arrow-color":`#FF6B6B`,width:2.5}}],s=Object.entries(lne).map(([e,t])=>{let n={shape:t.shape};return t.accent===`top-band`&&(n[`background-fill`]=`linear-gradient`,n[`background-gradient-direction`]=`to-bottom`,n[`background-gradient-stop-colors`]=[kne,One],n[`background-gradient-stop-positions`]=[`0%`,`20%`]),t.borderStyle===`dashed`&&(n[`border-style`]=`dashed`),{selector:`node[aspect = "${e}"]:childless`,style:n}}),c=vne.map(e=>{let t={"line-style":e.lineStyle,"source-arrow-shape":e.sourceArrow.shape,"target-arrow-shape":e.targetArrow.shape};return e.sourceArrow.fill!==void 0&&(t[`source-arrow-fill`]=e.sourceArrow.fill),e.targetArrow.fill!==void 0&&(t[`target-arrow-fill`]=e.targetArrow.fill),{selector:`edge[coreKindLabel = "${e.id}"]`,style:t}}),l=[{selector:`node.deco-added, edge.deco-added`,style:{"border-color":hh.added,"border-width":3,"line-color":hh.added,"target-arrow-color":hh.added}},{selector:`node.deco-removed, edge.deco-removed`,style:{"border-color":hh.removed,"border-width":3,"border-style":`dashed`,"line-color":hh.removed,"target-arrow-color":hh.removed,"line-style":`dashed`}},{selector:`node.deco-changed, edge.deco-changed`,style:{"border-color":hh.changed,"border-width":3,"line-color":hh.changed,"target-arrow-color":hh.changed}},{selector:`node.faulted, edge.faulted`,style:{"border-color":`#A3403A`,"border-width":4,"line-color":`#A3403A`,"target-arrow-color":`#A3403A`}}];return[...o,...s,...c,...l]}var qne=`yarramate/core@0.1#composition`,Jne=`yarramate/core@0.1#assignment`,Yne={composition:qne,assignment:Jne},Xne=(e,t)=>!t(e.to).endsWith(`Service`);function Zne(e,t,n){let r=new Map(t.map((e,t)=>[Yne[e],t])),i=e.filter(e=>r.has(e.kind)&&(e.kind!==Jne||Xne(e,n))),a=new Map;for(let e of i){let t=a.get(e.to);t===void 0?a.set(e.to,[e]):t.push(e)}let o=new Map;for(let[e,t]of a){let n=Math.min(...t.map(e=>r.get(e.kind))),i=t.filter(e=>r.get(e.kind)===n),a=new Set(i.map(e=>e.from));a.size===1?o.set(e,i[0].from):console.warn(`Nesting conflict: "${e}" is claimed by ${a.size} different parents at the same precedence (${i.map(e=>`${e.kindLabel} from ${e.from}`).join(`, `)}) - rendering it unnested; every claim stays drawn as a regular edge.`)}let s=new Set;for(let e of o.keys()){let t=[],n=new Map,r=e;for(;r!==void 0;){let e=n.get(r);if(e!==void 0){for(let n of t.slice(e))s.add(n);break}n.set(r,t.length),t.push(r),r=o.get(r)}}if(s.size>0){console.warn(`Nesting cycle detected among: ${[...s].join(`, `)} - rendering them unnested.`);for(let e of s)o.delete(e)}let c=new Set;for(let e of i)o.get(e.to)===e.from&&c.add(e.id);return{parentOf:o,consumedEdgeIds:c}}function Qne(e,t,n){let r=new Map(e.nodes.map(e=>[e.id,e.kind])),{parentOf:i,consumedEdgeIds:a}=Zne(e.edges,t,e=>r.get(e)??``),o=e.nodes.map(e=>{let t=i.get(e.id);return{data:{id:e.id,label:e.name,wrapLabel:uh(e.name),kind:e.kind,kindLabel:e.kindLabel,aspect:e.aspect,layer:e.layer,status:e.status,hasAttestations:e.attestations.length>0,owner:e.owner,ownerInitials:ane(e.owner),openQuestions:n.get(e.id)??0,...t===void 0?{}:{parent:t,compositionParent:t}},group:`nodes`}}),s=e.edges.filter(e=>!a.has(e.id)),c=new Map,l=e=>e.from<e.to?`${e.from}\u0000${e.to}`:`${e.to}\u0000${e.from}`;for(let e of s){let t=l(e);c.set(t,(c.get(t)??0)+1)}let u=s.map(e=>({data:{id:e.id,source:e.from,target:e.to,label:e.name??e.kindLabel,wrapLabel:uh(e.name??e.kindLabel),coreKindLabel:e.coreKindLabel},group:`edges`,...c.get(l(e))>1?{classes:`parallel`}:{}}));return[...o,...u]}function _h(e,t,n){let r=n.trim().toLowerCase(),i=t===null?null:new Set(t);return e.filter(e=>(i===null||i.has(e.id))&&lh(r,e.id,e.name,e.kindLabel)).length}function $ne(e,t,n){let r=n.trim().toLowerCase(),i=t===null?e.nodes().map(e=>e.id()):t,a=new Set(r===``?i:i.filter(t=>{let n=e.getElementById(t);return lh(r,t,n.data(`label`),n.data(`kindLabel`))})),o=t=>{let n=e.getElementById(t).data(`compositionParent`);return typeof n==`string`?n:void 0};for(let e of[...a]){let t=new Set([e]),n=o(e);for(;n!==void 0&&!t.has(n);)t.add(n),a.add(n),n=o(n)}let s=[];for(let t of e.nodes()){let e=o(t.id());if(e===void 0)continue;let n=a.has(t.id())&&a.has(e)?e:null;(t.parent().nonempty()?t.parent().first().id():null)!==n&&s.push({node:t.id(),parent:n})}for(let{node:t,parent:n}of s)e.getElementById(t).move({parent:n});let c=new Set(a);for(let t of e.edges()){let e=t.data(`source`),n=t.data(`target`);a.has(e)&&a.has(n)&&c.add(t.id())}e.elements().style(`display`,`none`),e.elements().filter(e=>c.has(e.id())).style(`display`,`element`)}function vh(e,t){e.layout(Hne(t)).run()}function yh(e,t){vh(e.elements(`:visible`),t)}function bh(e){let t=e.elements(`:visible`);return!t.empty()&&(e.fit(t,Fne),!0)}function ere(e){let t={};return e.forEach(e=>{let{x:n,y:r}=e.position();t[e.id()]={x:n,y:r}}),t}function tre(e,t){t!==void 0&&e.nodes().forEach(e=>{if(!e.visible())return;let n=t[e.id()];n!==void 0&&e.position(n)})}function nre(e,t,n){return n.has(t)?void 0:e}function rre(e,t,n){return e!==void 0&&(n??t).some(t=>e[t]!==void 0)}function ire(e,t,n){return{x:(e.x-t.x)/n,y:(e.y-t.y)/n}}function are(e,t,n){let r=null,i=()=>{r!==null&&(clearTimeout(r),r=null)},a=()=>{i(),r=setTimeout(()=>{r=null;let i=t();i!==``&&n({projectionId:i,positions:ere(e.nodes())})},500)};return e.on(`dragfree`,`node`,a),{cancelPending:i,dispose:()=>{e.off(`dragfree`,`node`,a),i()}}}function ore({graph:e,selectedId:t,onSelect:n,onContextMenu:r,matchedIds:i,quickFilterText:a,nesting:o,faultedIds:s,decorations:c,activeViewId:l,direction:u,savedPositions:d,onSaveLayout:f,onKindDrop:p,onCanvasReady:m,showLifecycle:h,showEvidence:g,showOwnership:_,showNudges:y,openQuestionCounts:b}){let x=(0,v.useRef)(null),S=(0,v.useRef)(null),[C,w]=(0,v.useState)(()=>new Set),T=nre(d,l,C),E=(0,v.useRef)(n),D=(0,v.useRef)(m);D.current=m;let ee=(0,v.useRef)(p);ee.current=p;let te=(0,v.useRef)(r),ne=(0,v.useRef)(!0),re=(0,v.useRef)(!0),ie=(0,v.useRef)(l),ae=(0,v.useRef)(u),oe=(0,v.useRef)(!1),se=(0,v.useRef)(i),ce=(0,v.useRef)(a),le=(0,v.useRef)(f),ue=(0,v.useRef)(T),de=(0,v.useRef)(null),fe=(0,v.useRef)(null);(0,v.useEffect)(()=>{E.current=n},[n]),(0,v.useEffect)(()=>{te.current=r},[r]),(0,v.useEffect)(()=>{le.current=f},[f]),(0,v.useEffect)(()=>{ue.current=T},[T]),(0,v.useEffect)(()=>{de.current?.cancelPending()},[l]),(0,v.useEffect)(()=>{if(!x.current)return;let t=eh({container:x.current,elements:Qne(e,o,b),style:gh(h,g,_,y),wheelSensitivity:.1,layout:{name:`null`}});S.current=t,D.current?.(()=>t.png({full:!0,scale:2,bg:`#ffffff`})),t.on(`tap`,`node`,e=>{let t=e.target.id();E.current(t,`node`)}),t.on(`tap`,`edge`,e=>{let t=e.target.id();E.current(t,`edge`)});let n=e=>{let n=e.originalEvent;if(n!=null)return{x:n.clientX,y:n.clientY};let r=t.container()?.getBoundingClientRect(),i=e.renderedPosition;return{x:(r?.left??0)+(i?.x??0),y:(r?.top??0)+(i?.y??0)}};t.on(`cxttap`,`node`,e=>{te.current({type:`node`,id:e.target.id()},n(e))}),t.on(`cxttap`,`edge`,e=>{te.current({type:`edge`,id:e.target.id()},n(e))}),t.on(`cxttap`,e=>{e.target===t&&te.current({type:`canvas`,id:null},n(e))}),de.current=are(t,()=>ie.current,e=>{w(t=>{if(!t.has(e.projectionId))return t;let n=new Set(t);return n.delete(e.projectionId),n}),le.current(e)});let r=()=>{fe.current={zoom:t.zoom(),pan:{...t.pan()}}};t.on(`layoutstop`,()=>{tre(t,ue.current),r()});let i=x.current,a=0,s=new ResizeObserver(()=>{cancelAnimationFrame(a),a=requestAnimationFrame(()=>{t.resize();let e=fe.current;if(e===null)return;let n=t.pan();if(!(Math.abs(t.zoom()-e.zoom)<1e-6&&Math.abs(n.x-e.pan.x)<.5&&Math.abs(n.y-e.pan.y)<.5))return;let i=t.elements(`:visible`);i.empty()||(t.fit(i,Fne),r())})});return s.observe(i),()=>{cancelAnimationFrame(a),s.disconnect(),de.current?.dispose(),D.current?.(null),t.destroy(),S.current=null}},[]),(0,v.useEffect)(()=>{if(S.current){if(re.current){re.current=!1;return}S.current.style(gh(h,g,_,y))}},[h,g,_,y]),(0,v.useEffect)(()=>{if(S.current){if(ne.current)ne.current=!1;else{let t=Qne(e,o,b);S.current.elements().remove(),S.current.add(t)}vh(S.current,u)}},[e,b]),(0,v.useEffect)(()=>{if(S.current){S.current.elements().removeClass(`faulted`);for(let e of s){let t=S.current.getElementById(e);t.nonempty()&&t.addClass(`faulted`)}}},[s,e]),(0,v.useEffect)(()=>{S.current&&Kne(S.current,c)},[c,e]),(0,v.useEffect)(()=>{if(S.current&&(S.current.elements().removeClass(`selected`),t)){let e=S.current.getElementById(t);e.nonempty()&&e.addClass(`selected`)}},[t,e]),(0,v.useEffect)(()=>{(l!==ie.current||u!==ae.current)&&(ie.current=l,ae.current=u,oe.current=!0)},[l,u]),(0,v.useEffect)(()=>{if(!S.current)return;$ne(S.current,i,a);let e=i!==se.current;se.current=i;let t=a!==ce.current;ce.current=a,oe.current||e?(oe.current=!1,yh(S.current,u)):t&&bh(S.current)&&(fe.current={zoom:S.current.zoom(),pan:{...S.current.pan()}})},[i,a,e,u]);let pe=()=>{w(e=>new Set(e).add(l)),ue.current=void 0,de.current?.cancelPending(),S.current!==null&&yh(S.current,u)},me=e=>{let t=S.current;t!==null&&t.zoom({level:zne(t.zoom(),e),renderedPosition:{x:t.width()/2,y:t.height()/2}})},he=()=>{let e=S.current;e!==null&&bh(e)&&(fe.current={zoom:e.zoom(),pan:{...e.pan()}})},ge=rre(T,e.nodes.map(e=>e.id),i);return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(`div`,{ref:x,style:{width:`100%`,height:`100%`},onContextMenu:e=>e.preventDefault(),onDragOver:e=>{ee.current!==void 0&&e.dataTransfer.types.includes(`application/x-yarramate-kind`)&&e.preventDefault()},onDrop:e=>{let t=e.dataTransfer.getData(xne);if(t===``||ee.current===void 0)return;e.preventDefault();let n=e.currentTarget.getBoundingClientRect(),r=S.current;ee.current(t,ire({x:e.clientX-n.left,y:e.clientY-n.top},r?.pan()??{x:0,y:0},r?.zoom()??1))}}),ge?(0,k.jsxs)(`div`,{className:`saved-layout-pill`,role:`status`,children:[(0,k.jsx)(`span`,{children:`Saved layout in force`}),(0,k.jsx)(`button`,{type:`button`,onClick:pe,children:`Discard`})]}):null,(0,k.jsxs)(`div`,{className:`zoom-controls`,role:`group`,"aria-label":`Zoom controls`,children:[(0,k.jsx)(`button`,{type:`button`,"aria-label":`Zoom in`,onClick:()=>me(1),children:`+`}),(0,k.jsx)(`button`,{type:`button`,"aria-label":`Zoom out`,onClick:()=>me(-1),children:`−`}),(0,k.jsx)(`button`,{type:`button`,"aria-label":`Fit diagram`,onClick:he,children:`Fit`})]})]})}var xh=Symbol.for(`yaml.alias`),Sh=Symbol.for(`yaml.document`),Ch=Symbol.for(`yaml.map`),wh=Symbol.for(`yaml.pair`),Th=Symbol.for(`yaml.scalar`),Eh=Symbol.for(`yaml.seq`),Dh=Symbol.for(`yaml.node.type`),Oh=e=>!!e&&typeof e==`object`&&e[Dh]===xh,kh=e=>!!e&&typeof e==`object`&&e[Dh]===Sh,Ah=e=>!!e&&typeof e==`object`&&e[Dh]===Ch,jh=e=>!!e&&typeof e==`object`&&e[Dh]===wh,Mh=e=>!!e&&typeof e==`object`&&e[Dh]===Th,Nh=e=>!!e&&typeof e==`object`&&e[Dh]===Eh;function Ph(e){if(e&&typeof e==`object`)switch(e[Dh]){case Ch:case Eh:return!0}return!1}function Fh(e){if(e&&typeof e==`object`)switch(e[Dh]){case xh:case Ch:case Th:case Eh:return!0}return!1}var Ih=e=>(Mh(e)||Ph(e))&&!!e.anchor,Lh=Symbol(`break visit`),sre=Symbol(`skip children`),Rh=Symbol(`remove node`);function zh(e,t){let n=Vh(t);kh(e)?Bh(null,e.contents,n,Object.freeze([e]))===Rh&&(e.contents=null):Bh(null,e,n,Object.freeze([]))}zh.BREAK=Lh,zh.SKIP=sre,zh.REMOVE=Rh;function Bh(e,t,n,r){let i=cre(e,t,n,r);if(Fh(i)||jh(i))return Hh(e,r,i),Bh(e,i,n,r);if(typeof i!=`symbol`){if(Ph(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){let i=Bh(e,t.items[e],n,r);if(typeof i==`number`)e=i-1;else if(i===Lh)return Lh;else i===Rh&&(t.items.splice(e,1),--e)}}else if(jh(t)){r=Object.freeze(r.concat(t));let e=Bh(`key`,t.key,n,r);if(e===Lh)return Lh;e===Rh&&(t.key=null);let i=Bh(`value`,t.value,n,r);if(i===Lh)return Lh;i===Rh&&(t.value=null)}}return i}function Vh(e){return typeof e==`object`&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function cre(e,t,n,r){if(typeof n==`function`)return n(e,t,r);if(Ah(t))return n.Map?.(e,t,r);if(Nh(t))return n.Seq?.(e,t,r);if(jh(t))return n.Pair?.(e,t,r);if(Mh(t))return n.Scalar?.(e,t,r);if(Oh(t))return n.Alias?.(e,t,r)}function Hh(e,t,n){let r=t[t.length-1];if(Ph(r))r.items[e]=n;else if(jh(r))e===`key`?r.key=n:r.value=n;else if(kh(r))r.contents=n;else{let e=Oh(r)?`alias`:`scalar`;throw Error(`Cannot replace node with ${e} parent`)}}var lre={"!":`%21`,",":`%2C`,"[":`%5B`,"]":`%5D`,"{":`%7B`,"}":`%7D`},ure=e=>e.replace(/[!,[\]{}]/g,e=>lre[e]),Uh=class e{constructor(t,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},e.defaultYaml,t),this.tags=Object.assign({},e.defaultTags,n)}clone(){let t=new e(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){let t=new e(this.yaml,this.tags);switch(this.yaml.version){case`1.1`:this.atNextDocument=!0;break;case`1.2`:this.atNextDocument=!1,this.yaml={explicit:e.defaultYaml.explicit,version:`1.2`},this.tags=Object.assign({},e.defaultTags)}return t}add(t,n){this.atNextDocument&&=(this.yaml={explicit:e.defaultYaml.explicit,version:`1.1`},this.tags=Object.assign({},e.defaultTags),!1);let r=t.trim().split(/[ \t]+/),i=r.shift();switch(i){case`%TAG`:{if(r.length!==2&&(n(0,`%TAG directive should contain exactly two parts`),r.length<2))return!1;let[e,t]=r;return this.tags[e]=t,!0}case`%YAML`:{if(this.yaml.explicit=!0,r.length!==1)return n(0,`%YAML directive should contain exactly one part`),!1;let[e]=r;if(e===`1.1`||e===`1.2`)return this.yaml.version=e,!0;{let t=/^\d+\.\d+$/.test(e);return n(6,`Unsupported YAML version ${e}`,t),!1}}default:return n(0,`Unknown directive ${i}`,!0),!1}}tagName(e,t){if(e===`!`)return`!`;if(e[0]!==`!`)return t(`Not a valid tag: ${e}`),null;if(e[1]===`<`){let n=e.slice(2,-1);return n===`!`||n===`!!`?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==`>`&&t(`Verbatim tags must end with a >`),n)}let[,n,r]=e.match(/^(.*!)([^!]*)$/s);r||t(`The ${e} tag has no suffix`);let i=this.tags[n];if(i)try{return i+decodeURIComponent(r)}catch(e){return t(String(e)),null}return n===`!`?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+ure(e.substring(n.length));return e[0]===`!`?e:`!<${e}>`}toString(e){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||`1.2`}`]:[],n=Object.entries(this.tags),r;if(e&&n.length>0&&Fh(e.contents)){let t={};zh(e.contents,(e,n)=>{Fh(n)&&n.tag&&(t[n.tag]=!0)}),r=Object.keys(t)}else r=[];for(let[i,a]of n)(i!==`!!`||a!==`tag:yaml.org,2002:`)&&(!e||r.some(e=>e.startsWith(a)))&&t.push(`%TAG ${i} ${a}`);return t.join(`
354
+ ... Falling back to non-web worker version.`)}if(!a.workerFactory){var c=e("./elk-worker.min.js").Worker;a.workerFactory=function(e){return new c(e)}}return i(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,a))}return n}(e("./elk-api.js").default);Object.defineProperty(t.exports,"__esModule",{value:!0}),t.exports=o,o.default=o},{"./elk-api.js":1,"./elk-worker.min.js":2,"web-worker":4}],4:[function(e,t,n){t.exports=Worker},{}]},{},[3])(3)})})),Ute=c(o(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r(Hte()):typeof define==`function`&&define.amd?define([`elkjs`],r):typeof e==`object`?e.cytoscapeElk=r(Hte()):n.cytoscapeElk=r(n.ELK)})(e,function(e){return(function(){var t={632:(function(t){t.exports=e})},n={};function r(e){var i=n[e];if(i!==void 0)return i.exports;var a=n[e]={exports:{}};return t[e](a,a.exports,r),a.exports}(function(){r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t}})(),(function(){r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}})(),(function(){r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}})();var i={};return(function(){r.d(i,{default:function(){return _}});var e=r(632),t=r.n(e);function n(e){return[...arguments].slice(1).forEach(function(t){Object.keys(t).forEach(function(n){return e[n]=t[n]})}),e}var a=Object.assign==null?n:Object.assign.bind(Object),o={nodeDimensionsIncludeLabels:!1,fit:!0,padding:20,animate:!1,animateFilter:function(){return!0},animationDuration:500,animationEasing:void 0,transform:function(e,t){return t},ready:void 0,stop:void 0,nodeLayoutOptions:void 0,elk:{algorithm:void 0},priority:function(){return null}};function s(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function c(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,r.key,r)}}function l(e,t,n){return t&&c(e.prototype,t),n&&c(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var u={},d=function(e,t){for(var n=e.layoutDimensions(t),r=e.parent(),i=e.scratch(`elk`),a={x:i.x,y:i.y};r.nonempty();){var o=r.scratch(`elk`);a.x+=o.x,a.y+=o.y,r=r.parent()}return a.x+=n.w/2,a.y+=n.h/2,a},f=function(e,t){var n={_cyEle:e,id:e.id()};if(t.nodeLayoutOptions&&(n.layoutOptions=t.nodeLayoutOptions(e)),!e.isParent()){var r=e.layoutDimensions(t),i=e.position();n.x=i.x-r.w/2,n.y=i.y-r.h/2,n.width=r.w,n.height=r.h}return e.scratch(`elk`,n),n},p=function(e){var t={_cyEle:e,id:e.id(),source:e.data(`source`),target:e.data(`target`)};return e.scratch(`elk`,t),t},m=function(e,t,n){for(var r=[],i=[],a={},o={id:`root`,children:[],edges:[]},s=0;s<e.length;s++){var c=e[s],l=f(c,n);r.push(l),a[c.id()]=l}for(var u=0;u<t.length;u++){var d=t[u],m=p(d,n);i.push(m),a[d.id()]=m}for(var h=0;h<r.length;h++){var g=r[h],_=g._cyEle;if(!_.isChild())o.children.push(g);else{var v=a[_.parent().id()];(v.children=v.children||[]).push(g)}}for(var y=0;y<i.length;y++){var b=i[y];o.edges.push(b)}return o},h=function(){function e(t){s(this,e);var n=t.elk,r=t.cy;this.options=a({},o,t),this.options.elk=a({aspectRatio:r.width()/r.height()},o.elk,n,u)}return l(e,[{key:`run`,value:function(){var e=this,n=this.options,r=n.eles,i=r.nodes(),a=r.edges(),o=new(t()),s=m(i,a,n);return s.layoutOptions=n.elk,o.layout(s).then(function(){i.filter(function(e){return!e.isParent()}).layoutPositions(e,n,function(e){return d(e,n)})}),this}},{key:`stop`,value:function(){return this}},{key:`destroy`,value:function(){return this}}]),e}(),g=function(e){e&&e(`layout`,`elk`,h)};typeof cytoscape<`u`&&g(cytoscape);var _=g})(),i=i.default,i})()})}))(),1);function Wte(e){return e===`planned`||e===`current`||e===`retired`}var Gte=`#182228`,Kte=`#416f65`,qte=`#a3403a`,Jte=`#5f686d`,Yte=[Kte,`#8c4d18`,`#2457a6`,Gte],Xte=12;function th(e){return`data:image/svg+xml;utf8,${encodeURIComponent(e)}`}function nh(e){return`<svg xmlns="http://www.w3.org/2000/svg" width="${Xte}" height="${Xte}" viewBox="0 0 12 12">${e}</svg>`}var rh={planned:nh(`<circle cx="6" cy="6" r="4" fill="none" stroke="${Jte}" stroke-width="2"/>`),current:nh(`<circle cx="6" cy="6" r="5" fill="${Kte}"/>`),retired:nh(`<circle cx="6" cy="6" r="5" fill="${qte}"/>`)},Zte={planned:th(rh.planned),current:th(rh.current),retired:th(rh.retired)},Qte=th(nh(`<circle cx="6" cy="6" r="5" fill="${Gte}"/><path d="M3.2 6.2 L5.2 8.2 L8.8 4.2" fill="none" stroke="#ffffff" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"/>`));function $te(e){let t=2166136261;for(let n=0;n<e.length;n++)t=Math.imul(t^e.charCodeAt(n),16777619);return t}function ene(e){if(e===null)return null;let t=$te(e);return Yte[Math.abs(t)%Yte.length]}function tne(e,t){return nh(`<circle cx="6" cy="6" r="5" fill="${ene(e)}"/><text x="6" y="7.5" font-size="8" font-weight="bold" fill="#ffffff" text-anchor="middle" dominant-baseline="middle">${t}</text>`)}function nne(e,t){return th(tne(e,t))}function rne(e){let t=e>9?`9+`:String(e);return nh(`<circle cx="6" cy="6" r="5" fill="${Jte}"/><text x="6" y="7.5" font-size="${t.length>1?6.5:8}" font-weight="bold" fill="#ffffff" text-anchor="middle" dominant-baseline="middle">${t}</text>`)}function ine(e){return th(rne(e))}function ane(e){if(e===null)return null;let t=(e.includes(`#`)?e.slice(e.indexOf(`#`)+1):e).split(/[-_\s]+/).filter(e=>e.length>0);if(t.length===0)return null;let n=t.slice(0,2).map(e=>e[0].toUpperCase()).join(``);return n.length>0?n:null}var one=[`motivation`,`strategy`,`business`,`application`,`technology`,`physical`,`implementation`,`composite`],ih=(e,t,n)=>n.map(([n,r,i])=>({id:n,name:r,layer:e,aspect:t,...i===void 0?{}:{rigidity:i},inspiredBy:`archimate:${r}`})),ah=[...ih(`motivation`,`motivation`,[[`stakeholder`,`Stakeholder`,`anti-rigid`],[`driver`,`Driver`],[`assessment`,`Assessment`],[`goal`,`Goal`],[`outcome`,`Outcome`],[`principle`,`Principle`],[`requirement`,`Requirement`],[`constraint`,`Constraint`],[`meaning`,`Meaning`],[`value`,`Value`]]),...ih(`strategy`,`active-structure`,[[`resource`,`Resource`]]),...ih(`strategy`,`behavior`,[[`capability`,`Capability`],[`valueStream`,`Value stream`],[`courseOfAction`,`Course of action`]]),...ih(`business`,`active-structure`,[[`businessActor`,`Business actor`],[`businessRole`,`Business role`,`anti-rigid`],[`businessCollaboration`,`Business collaboration`,`anti-rigid`],[`businessInterface`,`Business interface`]]),...ih(`business`,`behavior`,[[`businessProcess`,`Business process`],[`businessFunction`,`Business function`],[`businessInteraction`,`Business interaction`],[`businessEvent`,`Business event`],[`businessService`,`Business service`]]),...ih(`business`,`passive-structure`,[[`businessObject`,`Business object`],[`contract`,`Contract`],[`representation`,`Representation`]]),...ih(`business`,`composite`,[[`product`,`Product`]]),...ih(`application`,`active-structure`,[[`applicationComponent`,`Application component`],[`applicationCollaboration`,`Application collaboration`,`anti-rigid`],[`applicationInterface`,`Application interface`]]),...ih(`application`,`behavior`,[[`applicationFunction`,`Application function`],[`applicationInteraction`,`Application interaction`],[`applicationProcess`,`Application process`],[`applicationEvent`,`Application event`],[`applicationService`,`Application service`]]),...ih(`application`,`passive-structure`,[[`dataObject`,`Data object`]]),...ih(`technology`,`active-structure`,[[`node`,`Node`],[`device`,`Device`],[`systemSoftware`,`System software`],[`technologyCollaboration`,`Technology collaboration`,`anti-rigid`],[`technologyInterface`,`Technology interface`],[`path`,`Path`],[`communicationNetwork`,`Communication network`]]),...ih(`technology`,`behavior`,[[`technologyFunction`,`Technology function`],[`technologyProcess`,`Technology process`],[`technologyInteraction`,`Technology interaction`],[`technologyEvent`,`Technology event`],[`technologyService`,`Technology service`]]),...ih(`technology`,`passive-structure`,[[`artifact`,`Artifact`]]),...ih(`physical`,`active-structure`,[[`equipment`,`Equipment`],[`facility`,`Facility`],[`distributionNetwork`,`Distribution network`]]),...ih(`physical`,`passive-structure`,[[`material`,`Material`]]),...ih(`implementation`,`behavior`,[[`workPackage`,`Work package`],[`implementationEvent`,`Implementation event`]]),...ih(`implementation`,`passive-structure`,[[`deliverable`,`Deliverable`]]),...ih(`implementation`,`composite`,[[`plateau`,`Plateau`],[`gap`,`Gap`]]),...ih(`composite`,`composite`,[[`grouping`,`Grouping`],[`location`,`Location`],[`andJunction`,`AND junction`],[`orJunction`,`OR junction`]])],sne=[`composition`,`aggregation`,`assignment`,`realization`,`serving`,`access`,`influence`,`association`,`triggering`,`flow`,`specialization`],cne=`#182228`,oh={motivation:{fill:`#CCCCFF`,border:`#8F8FE0`},strategy:{fill:`#F5DEAA`,border:`#C9A355`},business:{fill:`#FFFF99`,border:`#C9C355`},application:{fill:`#CCFFFF`,border:`#4FB8B8`},technology:{fill:`#CCFFCC`,border:`#5FAE5F`},implementation:{fill:`#FFE0E0`,border:`#D89999`},physical:{fill:`#F0F0F0`,border:`#999999`},composite:{fill:`#F0F0F0`,border:`#999999`}},lne={motivation:{shape:`octagon`},"active-structure":{shape:`rectangle`},behavior:{shape:`round-rectangle`},"passive-structure":{shape:`rectangle`,accent:`top-band`},composite:{shape:`rectangle`}},une={grouping:{borderStyle:`dashed`}};function dne(e){return`<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 14 14"><g fill="none" stroke="${cne}" stroke-width="1" stroke-linecap="round" stroke-linejoin="round">${e}</g></svg>`}function fne(e){return`data:image/svg+xml;utf8,${encodeURIComponent(e)}`}var pne={andJunction:`<circle cx="7" cy="7" r="2.6" fill="#182228"/>`,applicationCollaboration:`<circle cx="5.5" cy="7" r="4"/><circle cx="8.5" cy="7" r="4"/>`,applicationComponent:`<rect x="3" y="2" width="9" height="10"/><rect x="1" y="4" width="2.5" height="1.5"/><rect x="1" y="8" width="2.5" height="1.5"/>`,applicationEvent:`<path d="M3 3 H8 L11 7 L8 11 H3 Z"/>`,applicationFunction:`<rect x="2" y="3" width="10" height="8" rx="2"/><path d="M5.5 5 L8 7 L5.5 9"/>`,applicationInteraction:`<path d="M2 5 H9 M9 5 L7 3 M9 5 L7 7"/><path d="M12 9 H5 M5 9 L7 7 M5 9 L7 11"/>`,applicationInterface:`<line x1="1.5" y1="7" x2="6" y2="7"/><circle cx="9" cy="7" r="3"/>`,applicationProcess:`<path d="M2 7 H10 M10 7 L7.5 4.5 M10 7 L7.5 9.5"/>`,applicationService:`<rect x="1.5" y="4" width="11" height="6" rx="3"/>`,artifact:`<path d="M3 1.5 H9 L11 3.5 V12.5 H3 Z"/><path d="M9 1.5 V3.5 H11"/>`,assessment:`<circle cx="6" cy="6" r="3.5"/><path d="M8.5 8.5 L12 12"/>`,businessActor:`<circle cx="7" cy="3.5" r="1.8"/><path d="M7 5.3 V9 M4 7 H10 M7 9 L4.5 12.5 M7 9 L9.5 12.5"/>`,businessCollaboration:`<circle cx="5.5" cy="7" r="4"/><circle cx="8.5" cy="7" r="4"/>`,businessEvent:`<path d="M3 3 H8 L11 7 L8 11 H3 Z"/>`,businessFunction:`<rect x="2" y="3" width="10" height="8" rx="2"/><path d="M5 8 L7 5.5 L9 8"/>`,businessInteraction:`<path d="M2 5 H9 M9 5 L7 3 M9 5 L7 7"/><path d="M12 9 H5 M5 9 L7 7 M5 9 L7 11"/>`,businessInterface:`<line x1="1.5" y1="7" x2="6" y2="7"/><circle cx="9" cy="7" r="3"/>`,businessObject:`<rect x="2" y="3" width="10" height="8"/>`,businessProcess:`<path d="M2 7 H10 M10 7 L7.5 4.5 M10 7 L7.5 9.5"/>`,businessRole:`<circle cx="7" cy="6" r="4"/><path d="M5 9.5 L4 12.5 L7 11 L10 12.5 L9 9.5"/>`,businessService:`<rect x="1.5" y="4" width="11" height="6" rx="3"/>`,capability:`<rect x="2" y="2" width="10" height="10" rx="1"/><path d="M5 9 L9 5 M9 5 H6.5 M9 5 V7.5"/>`,communicationNetwork:`<circle cx="3.5" cy="4" r="1.2"/><circle cx="11" cy="4" r="1.2"/><circle cx="7" cy="10.5" r="1.2"/><path d="M3.5 4 L11 4 M3.5 4 L7 10.5 M11 4 L7 10.5"/>`,constraint:`<rect x="4" y="6.5" width="6" height="5.5" rx="0.5"/><path d="M5.2 6.5 V4.7 A1.8 1.8 0 0 1 8.8 4.7 V6.5"/>`,contract:`<rect x="2" y="2" width="10" height="10"/><path d="M2 4.5 H12 M2 6.5 H12"/>`,courseOfAction:`<path d="M7 2 V12.5"/><path d="M7 4 H11 L9.5 5.5 L11 7 H7 Z"/><path d="M7 8 H4 L5.5 9.5 L4 11 H7 Z"/>`,dataObject:`<rect x="2" y="2" width="10" height="10"/><path d="M2 5.5 H12"/>`,deliverable:`<path d="M3 1.5 H8 L11 4.5 V12.5 H3 Z"/><path d="M8 1.5 V4.5 H11"/><path d="M5 9.5 L7 12.5 L9 9.5"/>`,device:`<rect x="2" y="3" width="10" height="6" rx="0.5"/><path d="M4.5 9 V11 M9.5 9 V11 M3.5 11 H6 M8 11 H10.5"/>`,distributionNetwork:`<path d="M2 11 Q4 11 5 8 Q6 5 7 5 Q8 5 9 8 Q10 11 12 11"/><circle cx="2" cy="11" r="1"/><circle cx="12" cy="11" r="1"/><circle cx="7" cy="5" r="1"/>`,driver:`<circle cx="7" cy="7" r="5"/><path d="M7 2 V5 M7 9 V12 M2 7 H5 M9 7 H12"/>`,equipment:`<rect x="2" y="3" width="10" height="8"/><path d="M2 3 L7 6 L12 3 M7 6 V11"/>`,facility:`<path d="M2 12.5 V6 L7 2.5 L12 6 V12.5 Z"/><path d="M5.5 12.5 V8.5 H8.5 V12.5"/>`,gap:`<path d="M2 4 H6 M2 10 H6"/><path d="M8 4 H12 M8 10 H12"/><path d="M7 3 V11" stroke-dasharray="1.4 1.3"/>`,goal:`<circle cx="7" cy="7" r="5"/><circle cx="7" cy="7" r="2.2"/>`,grouping:`<rect x="2" y="2" width="10" height="10" rx="1" stroke-dasharray="2 1.4"/>`,implementationEvent:`<path d="M3 3 H8 L11 7 L8 11 H3 Z"/>`,location:`<path d="M7 12.5 C7 12.5 3 8 3 5.5 A4 4 0 0 1 11 5.5 C11 8 7 12.5 7 12.5 Z"/><circle cx="7" cy="5.5" r="1.3"/>`,material:`<rect x="2" y="8" width="4" height="4"/><rect x="6.5" y="6" width="4" height="6"/><rect x="4" y="2.5" width="4" height="4"/>`,meaning:`<path d="M2 3 H12 V9 H6 L4 11 V9 H2 Z"/><path d="M4.5 6 H9.5"/>`,node:`<path d="M2 5 L7 2.5 L12 5 L12 10 L7 12.5 L2 10 Z"/><path d="M2 5 L7 7.5 L12 5 M7 7.5 V12.5"/>`,orJunction:`<circle cx="7" cy="7" r="2.6"/>`,outcome:`<path d="M3 1.5 V12.5"/><path d="M3 2 H9 L7 4 L9 6 H3 Z"/>`,path:`<circle cx="3" cy="7" r="1.3"/><circle cx="11" cy="7" r="1.3"/><path d="M4.5 7 H9.5" stroke-dasharray="1.6 1.4"/>`,plateau:`<path d="M2 11 L4.5 4 H9.5 L12 11 Z"/><path d="M2 11 H12"/>`,principle:`<path d="M3 2.5 H11 V9 L7 11.5 L3 9 Z"/><path d="M5 6 L6.5 7.5 L9.5 4.5"/>`,product:`<rect x="2" y="5" width="10" height="7"/><path d="M2 5 L7 1.5 L12 5"/>`,representation:`<path d="M3 2 H11 V9 Q9.5 11 8 9.5 Q6.5 8 5 9.5 Q3.5 11 3 9 Z"/>`,requirement:`<path d="M3 2.5 H11 V9 L7 11.5 L3 9 Z"/><path d="M3 5 H11"/>`,resource:`<rect x="2" y="4.5" width="9" height="5" rx="1"/><rect x="11" y="6" width="1.5" height="2"/><path d="M4 6 V8 M6.5 6 V8 M9 6 V8"/>`,stakeholder:`<circle cx="7" cy="5" r="2.2"/><path d="M2.5 12.5 Q2.5 8 7 8 Q11.5 8 11.5 12.5"/>`,systemSoftware:`<rect x="2" y="2" width="10" height="10"/><rect x="4" y="4" width="4" height="3"/>`,technologyCollaboration:`<circle cx="5.5" cy="7" r="4"/><circle cx="8.5" cy="7" r="4"/>`,technologyEvent:`<path d="M3 3 H8 L11 7 L8 11 H3 Z"/>`,technologyFunction:`<circle cx="7" cy="7" r="4"/><path d="M7 2 V3.2 M7 10.8 V12 M2 7 H3.2 M10.8 7 H12 M3.5 3.5 L4.3 4.3 M9.7 9.7 L10.5 10.5 M3.5 10.5 L4.3 9.7 M9.7 4.3 L10.5 3.5"/>`,technologyInteraction:`<path d="M2 5 H9 M9 5 L7 3 M9 5 L7 7"/><path d="M12 9 H5 M5 9 L7 7 M5 9 L7 11"/>`,technologyInterface:`<line x1="1.5" y1="7" x2="6" y2="7"/><circle cx="9" cy="7" r="3"/>`,technologyProcess:`<path d="M2 7 H10 M10 7 L7.5 4.5 M10 7 L7.5 9.5"/>`,technologyService:`<rect x="1.5" y="4" width="11" height="6" rx="3"/>`,value:`<path d="M7 2 L11.5 7 L7 12 L2.5 7 Z"/>`,valueStream:`<path d="M2 5 H8 V3.5 L12 7 L8 10.5 V9 H2 Z"/>`,workPackage:`<rect x="2" y="5" width="10" height="7"/><path d="M5 5 V3.5 A1 1 0 0 1 6 2.5 H8 A1 1 0 0 1 9 3.5 V5"/>`},mne=ah.map(e=>({id:e.id,notation:e.name,layer:e.layer,aspect:e.aspect,...lne[e.aspect],...une[e.id],glyph:pne[e.id]??null,colors:oh[e.layer]})),hne=Object.fromEntries(mne.map(e=>[e.id,e]));function gne(e){let t=hne[e]?.glyph;return t==null?null:fne(dne(t))}var _ne={composition:{lineStyle:`solid`,sourceArrow:{shape:`diamond`,fill:`filled`},targetArrow:{shape:`none`}},aggregation:{lineStyle:`solid`,sourceArrow:{shape:`diamond`,fill:`hollow`},targetArrow:{shape:`none`}},assignment:{lineStyle:`solid`,sourceArrow:{shape:`circle`,fill:`filled`},targetArrow:{shape:`triangle`,fill:`filled`}},realization:{lineStyle:`dotted`,sourceArrow:{shape:`none`},targetArrow:{shape:`triangle`,fill:`hollow`}},specialization:{lineStyle:`solid`,sourceArrow:{shape:`none`},targetArrow:{shape:`triangle`,fill:`hollow`}},serving:{lineStyle:`solid`,sourceArrow:{shape:`none`},targetArrow:{shape:`vee`}},access:{lineStyle:`dotted`,sourceArrow:{shape:`none`},targetArrow:{shape:`vee`}},influence:{lineStyle:`dashed`,sourceArrow:{shape:`none`},targetArrow:{shape:`vee`}},triggering:{lineStyle:`solid`,sourceArrow:{shape:`none`},targetArrow:{shape:`triangle`,fill:`filled`}},flow:{lineStyle:`dashed`,sourceArrow:{shape:`none`},targetArrow:{shape:`triangle`,fill:`filled`}},association:{lineStyle:`solid`,sourceArrow:{shape:`none`},targetArrow:{shape:`none`}}},vne=sne.map(e=>({id:e,..._ne[e]}));Object.fromEntries(vne.map(e=>[e.id,e]));var yne={"compiler-module":`applicationComponent`,"repository-file":`artifact`};function sh(e){let t=yne[e];return gne(t===void 0?e:t)}var bne=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),k=o(((e,t)=>{t.exports=bne()}))(),xne=`application/x-yarramate-kind`,Sne=`unlayered`,Cne=new Map(ah.map(e=>[e.id,e.layer])),wne=e=>{let t=new Map;for(let n of e){let e=Cne.get(n.coreLabel)??Sne,r=t.get(e);r===void 0?t.set(e,[n]):r.push(n)}return[...one,Sne].flatMap(e=>{let n=t.get(e);return n===void 0?[]:[{layer:e,kinds:n}]})},Tne=({kinds:e,onPick:t})=>(0,k.jsx)(`div`,{className:`kind-palette`,children:wne(e).map(e=>(0,k.jsxs)(`div`,{className:`kind-palette-layer`,children:[(0,k.jsx)(`p`,{className:`kind-palette-layer-name`,children:e.layer}),(0,k.jsx)(`ul`,{className:`kind-palette-rows`,children:e.kinds.map(e=>{let n=sh(e.label)??sh(e.coreLabel);return(0,k.jsx)(`li`,{children:(0,k.jsxs)(`button`,{type:`button`,className:`kind-palette-row`,draggable:!0,"data-kind":e.label,onDragStart:t=>{t.dataTransfer.setData(xne,e.label),t.dataTransfer.effectAllowed=`copy`},onClick:()=>t(e.label),children:[n===null?null:(0,k.jsx)(`img`,{src:n,alt:``,width:14,height:14}),(0,k.jsx)(`span`,{children:e.label})]})},e.id)})})]},e.layer))}),ch=e=>e.trim().toLowerCase();function lh(e,t,n,r){return e===``||t.toLowerCase().includes(e)||typeof n==`string`&&n.toLowerCase().includes(e)?!0:typeof r==`string`&&r.toLowerCase().includes(e)}var Ene=(e,t)=>{let n=ch(t);return e.filter(e=>lh(n,e.id,e.name,e.kindLabel)).length},Dne=!1;Dne||=(eh.use(Ute.default),!0);var One=`#F0F0F0`,kne=`#999999`,Ane=170,jne=50,Mne=150,Nne=110,Pne=`​`;function uh(e){return e.replace(/([/._-])/g,`$1${Pne}`)}var dh=30,Fne=20,Ine=1.25,Lne=.02,Rne=10;function zne(e,t){let n=t===1?e*Ine:e/Ine;return Math.min(Rne,Math.max(Lne,n))}var fh={"elk.spacing.nodeNode":60,"elk.layered.spacing.nodeNodeBetweenLayers":100,"elk.spacing.edgeNode":30,"elk.layered.spacing.edgeNodeBetweenLayers":30,"elk.spacing.edgeEdge":20,"elk.layered.spacing.edgeEdgeBetweenLayers":20,"elk.spacing.componentComponent":80,"elk.padding":`[top=52,left=${dh},bottom=${dh},right=${dh}]`},Bne=2.5,Vne={"top-down":`DOWN`,"left-right":`RIGHT`};function Hne(e){return{name:`elk`,elk:{algorithm:`layered`,"elk.direction":Vne[e],"elk.layered.nodePlacement.strategy":`NETWORK_SIMPLEX`,aspectRatio:Bne,...fh},nodeLayoutOptions:e=>e.isParent()?fh:void 0}}var ph=12;function Une(e,t,n,r,i){let a=[],o=sh(String(e.data(`kindLabel`)));o!==null&&a.push({image:o,positionX:`0%`,positionY:`0%`,size:14});let s=e.data(`status`);t&&Wte(s)&&a.push({image:Zte[s],positionX:`100%`,positionY:`0%`,size:ph}),n&&e.data(`hasAttestations`)===!0&&a.push({image:Qte,positionX:`0%`,positionY:`100%`,size:ph});let c=e.data(`owner`),l=e.data(`ownerInitials`),u=r&&c!==null&&l!==null;u&&a.push({image:nne(c,l),positionX:`100%`,positionY:`100%`,size:ph});let d=e.data(`openQuestions`);return i&&typeof d==`number`&&d>0&&a.push({image:ine(d),positionX:u?`84%`:`96%`,positionY:u?`100%`:`88%`,size:ph}),a}var Wne=[`added`,`removed`,`changed`],mh=e=>`deco-${e}`,Gne=Wne.map(mh).join(` `),hh={added:`#416F65`,removed:`#677074`,changed:`#8C4D18`};function Kne(e,t){e.elements().removeClass(Gne);for(let[n,r]of Object.entries(t)){let t=e.getElementById(n);t.nonempty()&&t.addClass(mh(r))}}function gh(e,t,n,r){let i=new Map,a=a=>{let o=`${String(a.data(`status`))}\u0000${String(a.data(`hasAttestations`))}\u0000${String(a.data(`owner`))}\u0000${String(a.data(`ownerInitials`))}\u0000${String(a.data(`kindLabel`))}\u0000${String(a.data(`openQuestions`))}`,s=i.get(o);if(s!==void 0)return s;let c=Une(a,e,t,n,r),l={images:c.map(e=>e.image),positionsX:c.map(e=>e.positionX),positionsY:c.map(e=>e.positionY),sizes:c.map(e=>e.size),containments:c.map(()=>`over`),clips:c.map(()=>`none`)};return i.set(o,l),l},o=[{selector:`node`,style:{"background-color":One,"border-color":kne,"border-width":2,shape:`roundrectangle`,width:Ane,height:jne,padding:`8px`,label:`data(wrapLabel)`,"font-size":12,"text-wrap":`wrap`,"text-max-width":`${Mne}px`,"text-halign":`center`,"text-valign":`center`,color:`#333333`}},{selector:`node`,style:{"background-image":e=>a(e).images,"background-position-x":e=>a(e).positionsX,"background-position-y":e=>a(e).positionsY,"background-width":e=>a(e).sizes,"background-height":e=>a(e).sizes,"background-image-containment":e=>a(e).containments,"background-clip":e=>a(e).clips}},...Object.entries(oh).map(([e,t])=>({selector:`node[layer = "${e}"]`,style:{"background-color":t.fill,"border-color":t.border}})),{selector:`node:parent`,style:{shape:`roundrectangle`,"background-opacity":.25,"border-width":2,"border-style":`dashed`,padding:`${dh}px`,label:`data(wrapLabel)`,"font-size":13,"font-weight":`bold`,"text-halign":`center`,"text-valign":`top`,"text-margin-y":-8,color:`#333333`}},{selector:`node.selected`,style:{"border-color":`#FF6B6B`,"border-width":4}},{selector:`edge`,style:{"line-color":`#999999`,width:1.5,"curve-style":`round-taxi`,"taxi-radius":25,"target-arrow-shape":`triangle`,"target-arrow-color":`#999999`,label:`data(wrapLabel)`,"font-size":10,"text-wrap":`wrap`,"text-max-width":`${Nne}px`,"text-background-color":`#FFFFFF`,"text-background-padding":`3px`,"text-background-opacity":1}},{selector:`edge.parallel`,style:{"curve-style":`bezier`,"control-point-step-size":40}},{selector:`edge.selected`,style:{"line-color":`#FF6B6B`,"target-arrow-color":`#FF6B6B`,width:2.5}}],s=Object.entries(lne).map(([e,t])=>{let n={shape:t.shape};return t.accent===`top-band`&&(n[`background-fill`]=`linear-gradient`,n[`background-gradient-direction`]=`to-bottom`,n[`background-gradient-stop-colors`]=[kne,One],n[`background-gradient-stop-positions`]=[`0%`,`20%`]),t.borderStyle===`dashed`&&(n[`border-style`]=`dashed`),{selector:`node[aspect = "${e}"]:childless`,style:n}}),c=vne.map(e=>{let t={"line-style":e.lineStyle,"source-arrow-shape":e.sourceArrow.shape,"target-arrow-shape":e.targetArrow.shape};return e.sourceArrow.fill!==void 0&&(t[`source-arrow-fill`]=e.sourceArrow.fill),e.targetArrow.fill!==void 0&&(t[`target-arrow-fill`]=e.targetArrow.fill),{selector:`edge[coreKindLabel = "${e.id}"]`,style:t}}),l=[{selector:`node.deco-added, edge.deco-added`,style:{"border-color":hh.added,"border-width":3,"line-color":hh.added,"target-arrow-color":hh.added}},{selector:`node.deco-removed, edge.deco-removed`,style:{"border-color":hh.removed,"border-width":3,"border-style":`dashed`,"line-color":hh.removed,"target-arrow-color":hh.removed,"line-style":`dashed`}},{selector:`node.deco-changed, edge.deco-changed`,style:{"border-color":hh.changed,"border-width":3,"line-color":hh.changed,"target-arrow-color":hh.changed}},{selector:`node.faulted, edge.faulted`,style:{"border-color":`#A3403A`,"border-width":4,"line-color":`#A3403A`,"target-arrow-color":`#A3403A`}}];return[...o,...s,...c,...l]}var qne=`yarramate/core@0.1#composition`,Jne=`yarramate/core@0.1#assignment`,Yne={composition:qne,assignment:Jne},Xne=(e,t)=>!t(e.to).endsWith(`Service`);function Zne(e,t,n){let r=new Map(t.map((e,t)=>[Yne[e],t])),i=e.filter(e=>r.has(e.kind)&&(e.kind!==Jne||Xne(e,n))),a=new Map;for(let e of i){let t=a.get(e.to);t===void 0?a.set(e.to,[e]):t.push(e)}let o=new Map;for(let[e,t]of a){let n=Math.min(...t.map(e=>r.get(e.kind))),i=t.filter(e=>r.get(e.kind)===n),a=new Set(i.map(e=>e.from));a.size===1?o.set(e,i[0].from):console.warn(`Nesting conflict: "${e}" is claimed by ${a.size} different parents at the same precedence (${i.map(e=>`${e.kindLabel} from ${e.from}`).join(`, `)}) - rendering it unnested; every claim stays drawn as a regular edge.`)}let s=new Set;for(let e of o.keys()){let t=[],n=new Map,r=e;for(;r!==void 0;){let e=n.get(r);if(e!==void 0){for(let n of t.slice(e))s.add(n);break}n.set(r,t.length),t.push(r),r=o.get(r)}}if(s.size>0){console.warn(`Nesting cycle detected among: ${[...s].join(`, `)} - rendering them unnested.`);for(let e of s)o.delete(e)}let c=new Set;for(let e of i)o.get(e.to)===e.from&&c.add(e.id);return{parentOf:o,consumedEdgeIds:c}}function Qne(e,t,n){let r=new Map(e.nodes.map(e=>[e.id,e.kind])),{parentOf:i,consumedEdgeIds:a}=Zne(e.edges,t,e=>r.get(e)??``),o=e.nodes.map(e=>{let t=i.get(e.id);return{data:{id:e.id,label:e.name,wrapLabel:uh(e.name),kind:e.kind,kindLabel:e.kindLabel,aspect:e.aspect,layer:e.layer,status:e.status,hasAttestations:e.attestations.length>0,owner:e.owner,ownerInitials:ane(e.owner),openQuestions:n.get(e.id)??0,...t===void 0?{}:{parent:t,compositionParent:t}},group:`nodes`}}),s=e.edges.filter(e=>!a.has(e.id)),c=new Map,l=e=>e.from<e.to?`${e.from}\u0000${e.to}`:`${e.to}\u0000${e.from}`;for(let e of s){let t=l(e);c.set(t,(c.get(t)??0)+1)}let u=s.map(e=>({data:{id:e.id,source:e.from,target:e.to,label:e.name??e.kindLabel,wrapLabel:uh(e.name??e.kindLabel),coreKindLabel:e.coreKindLabel},group:`edges`,...c.get(l(e))>1?{classes:`parallel`}:{}}));return[...o,...u]}function _h(e,t,n){let r=n.trim().toLowerCase(),i=t===null?null:new Set(t);return e.filter(e=>(i===null||i.has(e.id))&&lh(r,e.id,e.name,e.kindLabel)).length}function $ne(e,t,n){let r=n.trim().toLowerCase(),i=t===null?e.nodes().map(e=>e.id()):t,a=new Set(r===``?i:i.filter(t=>{let n=e.getElementById(t);return lh(r,t,n.data(`label`),n.data(`kindLabel`))})),o=t=>{let n=e.getElementById(t).data(`compositionParent`);return typeof n==`string`?n:void 0};for(let e of[...a]){let t=new Set([e]),n=o(e);for(;n!==void 0&&!t.has(n);)t.add(n),a.add(n),n=o(n)}let s=[];for(let t of e.nodes()){let e=o(t.id());if(e===void 0)continue;let n=a.has(t.id())&&a.has(e)?e:null;(t.parent().nonempty()?t.parent().first().id():null)!==n&&s.push({node:t.id(),parent:n})}for(let{node:t,parent:n}of s)e.getElementById(t).move({parent:n});let c=new Set(a);for(let t of e.edges()){let e=t.data(`source`),n=t.data(`target`);a.has(e)&&a.has(n)&&c.add(t.id())}e.elements().style(`display`,`none`),e.elements().filter(e=>c.has(e.id())).style(`display`,`element`)}function vh(e,t){e.layout(Hne(t)).run()}function yh(e,t){vh(e.elements(`:visible`),t)}function bh(e){let t=e.elements(`:visible`);return!t.empty()&&(e.fit(t,Fne),!0)}function ere(e){let t={};return e.forEach(e=>{let{x:n,y:r}=e.position();t[e.id()]={x:n,y:r}}),t}function tre(e,t){t!==void 0&&e.nodes().forEach(e=>{if(!e.visible())return;let n=t[e.id()];n!==void 0&&e.position(n)})}function nre(e,t,n){return n.has(t)?void 0:e}function rre(e,t,n){return e!==void 0&&(n??t).some(t=>e[t]!==void 0)}function ire(e,t,n){return{x:(e.x-t.x)/n,y:(e.y-t.y)/n}}function are(e,t,n){let r=null,i=()=>{r!==null&&(clearTimeout(r),r=null)},a=()=>{i(),r=setTimeout(()=>{r=null;let i=t();i!==``&&n({projectionId:i,positions:ere(e.nodes())})},500)};return e.on(`dragfree`,`node`,a),{cancelPending:i,dispose:()=>{e.off(`dragfree`,`node`,a),i()}}}function ore({graph:e,selectedId:t,onSelect:n,onContextMenu:r,matchedIds:i,quickFilterText:a,nesting:o,faultedIds:s,decorations:c,activeViewId:l,direction:u,savedPositions:d,onSaveLayout:f,onKindDrop:p,onCanvasReady:m,showLifecycle:h,showEvidence:g,showOwnership:_,showNudges:y,openQuestionCounts:b}){let x=(0,v.useRef)(null),S=(0,v.useRef)(null),[C,w]=(0,v.useState)(()=>new Set),T=nre(d,l,C),E=(0,v.useRef)(n),D=(0,v.useRef)(m);D.current=m;let ee=(0,v.useRef)(p);ee.current=p;let te=(0,v.useRef)(r),ne=(0,v.useRef)(!0),re=(0,v.useRef)(!0),ie=(0,v.useRef)(l),ae=(0,v.useRef)(u),oe=(0,v.useRef)(!1),se=(0,v.useRef)(i),ce=(0,v.useRef)(a),le=(0,v.useRef)(f),ue=(0,v.useRef)(T),de=(0,v.useRef)(null),fe=(0,v.useRef)(null);(0,v.useEffect)(()=>{E.current=n},[n]),(0,v.useEffect)(()=>{te.current=r},[r]),(0,v.useEffect)(()=>{le.current=f},[f]),(0,v.useEffect)(()=>{ue.current=T},[T]),(0,v.useEffect)(()=>{de.current?.cancelPending()},[l]),(0,v.useEffect)(()=>{if(!x.current)return;let t=eh({container:x.current,elements:Qne(e,o,b),style:gh(h,g,_,y),wheelSensitivity:.1,layout:{name:`null`}});S.current=t,D.current?.(()=>t.png({full:!0,scale:2,bg:`#ffffff`})),t.on(`tap`,`node`,e=>{let t=e.target.id();E.current(t,`node`)}),t.on(`tap`,`edge`,e=>{let t=e.target.id();E.current(t,`edge`)});let n=e=>{let n=e.originalEvent;if(n!=null)return{x:n.clientX,y:n.clientY};let r=t.container()?.getBoundingClientRect(),i=e.renderedPosition;return{x:(r?.left??0)+(i?.x??0),y:(r?.top??0)+(i?.y??0)}};t.on(`cxttap`,`node`,e=>{te.current({type:`node`,id:e.target.id()},n(e))}),t.on(`cxttap`,`edge`,e=>{te.current({type:`edge`,id:e.target.id()},n(e))}),t.on(`cxttap`,e=>{e.target===t&&te.current({type:`canvas`,id:null},n(e))}),de.current=are(t,()=>ie.current,e=>{w(t=>{if(!t.has(e.projectionId))return t;let n=new Set(t);return n.delete(e.projectionId),n}),le.current(e)});let r=()=>{fe.current={zoom:t.zoom(),pan:{...t.pan()}}};t.on(`layoutstop`,()=>{tre(t,ue.current),r()});let i=x.current,a=0,s=new ResizeObserver(()=>{cancelAnimationFrame(a),a=requestAnimationFrame(()=>{t.resize();let e=fe.current;if(e===null)return;let n=t.pan();if(!(Math.abs(t.zoom()-e.zoom)<1e-6&&Math.abs(n.x-e.pan.x)<.5&&Math.abs(n.y-e.pan.y)<.5))return;let i=t.elements(`:visible`);i.empty()||(t.fit(i,Fne),r())})});return s.observe(i),()=>{cancelAnimationFrame(a),s.disconnect(),de.current?.dispose(),D.current?.(null),t.destroy(),S.current=null}},[]),(0,v.useEffect)(()=>{if(S.current){if(re.current){re.current=!1;return}S.current.style(gh(h,g,_,y))}},[h,g,_,y]),(0,v.useEffect)(()=>{if(S.current){if(ne.current)ne.current=!1;else{let t=Qne(e,o,b);S.current.elements().remove(),S.current.add(t)}vh(S.current,u)}},[e,b]),(0,v.useEffect)(()=>{if(S.current){S.current.elements().removeClass(`faulted`);for(let e of s){let t=S.current.getElementById(e);t.nonempty()&&t.addClass(`faulted`)}}},[s,e]),(0,v.useEffect)(()=>{S.current&&Kne(S.current,c)},[c,e]),(0,v.useEffect)(()=>{if(S.current&&(S.current.elements().removeClass(`selected`),t)){let e=S.current.getElementById(t);e.nonempty()&&e.addClass(`selected`)}},[t,e]),(0,v.useEffect)(()=>{(l!==ie.current||u!==ae.current)&&(ie.current=l,ae.current=u,oe.current=!0)},[l,u]),(0,v.useEffect)(()=>{if(!S.current)return;$ne(S.current,i,a);let e=i!==se.current;se.current=i;let t=a!==ce.current;ce.current=a,oe.current||e?(oe.current=!1,yh(S.current,u)):t&&bh(S.current)&&(fe.current={zoom:S.current.zoom(),pan:{...S.current.pan()}})},[i,a,e,u]);let pe=()=>{w(e=>new Set(e).add(l)),ue.current=void 0,de.current?.cancelPending(),S.current!==null&&yh(S.current,u)},me=e=>{let t=S.current;t!==null&&t.zoom({level:zne(t.zoom(),e),renderedPosition:{x:t.width()/2,y:t.height()/2}})},he=()=>{let e=S.current;e!==null&&bh(e)&&(fe.current={zoom:e.zoom(),pan:{...e.pan()}})},ge=rre(T,e.nodes.map(e=>e.id),i);return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(`div`,{ref:x,style:{position:`relative`,width:`100%`,height:`100%`},onContextMenu:e=>e.preventDefault(),onDragOver:e=>{ee.current!==void 0&&e.dataTransfer.types.includes(`application/x-yarramate-kind`)&&e.preventDefault()},onDrop:e=>{let t=e.dataTransfer.getData(xne);if(t===``||ee.current===void 0)return;e.preventDefault();let n=e.currentTarget.getBoundingClientRect(),r=S.current;ee.current(t,ire({x:e.clientX-n.left,y:e.clientY-n.top},r?.pan()??{x:0,y:0},r?.zoom()??1))}}),ge?(0,k.jsxs)(`div`,{className:`saved-layout-pill`,role:`status`,children:[(0,k.jsx)(`span`,{children:`Saved layout in force`}),(0,k.jsx)(`button`,{type:`button`,onClick:pe,children:`Discard`})]}):null,(0,k.jsxs)(`div`,{className:`zoom-controls`,role:`group`,"aria-label":`Zoom controls`,children:[(0,k.jsx)(`button`,{type:`button`,"aria-label":`Zoom in`,onClick:()=>me(1),children:`+`}),(0,k.jsx)(`button`,{type:`button`,"aria-label":`Zoom out`,onClick:()=>me(-1),children:`−`}),(0,k.jsx)(`button`,{type:`button`,"aria-label":`Fit diagram`,onClick:he,children:`Fit`})]})]})}var xh=Symbol.for(`yaml.alias`),Sh=Symbol.for(`yaml.document`),Ch=Symbol.for(`yaml.map`),wh=Symbol.for(`yaml.pair`),Th=Symbol.for(`yaml.scalar`),Eh=Symbol.for(`yaml.seq`),Dh=Symbol.for(`yaml.node.type`),Oh=e=>!!e&&typeof e==`object`&&e[Dh]===xh,kh=e=>!!e&&typeof e==`object`&&e[Dh]===Sh,Ah=e=>!!e&&typeof e==`object`&&e[Dh]===Ch,jh=e=>!!e&&typeof e==`object`&&e[Dh]===wh,Mh=e=>!!e&&typeof e==`object`&&e[Dh]===Th,Nh=e=>!!e&&typeof e==`object`&&e[Dh]===Eh;function Ph(e){if(e&&typeof e==`object`)switch(e[Dh]){case Ch:case Eh:return!0}return!1}function Fh(e){if(e&&typeof e==`object`)switch(e[Dh]){case xh:case Ch:case Th:case Eh:return!0}return!1}var Ih=e=>(Mh(e)||Ph(e))&&!!e.anchor,Lh=Symbol(`break visit`),sre=Symbol(`skip children`),Rh=Symbol(`remove node`);function zh(e,t){let n=Vh(t);kh(e)?Bh(null,e.contents,n,Object.freeze([e]))===Rh&&(e.contents=null):Bh(null,e,n,Object.freeze([]))}zh.BREAK=Lh,zh.SKIP=sre,zh.REMOVE=Rh;function Bh(e,t,n,r){let i=cre(e,t,n,r);if(Fh(i)||jh(i))return Hh(e,r,i),Bh(e,i,n,r);if(typeof i!=`symbol`){if(Ph(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){let i=Bh(e,t.items[e],n,r);if(typeof i==`number`)e=i-1;else if(i===Lh)return Lh;else i===Rh&&(t.items.splice(e,1),--e)}}else if(jh(t)){r=Object.freeze(r.concat(t));let e=Bh(`key`,t.key,n,r);if(e===Lh)return Lh;e===Rh&&(t.key=null);let i=Bh(`value`,t.value,n,r);if(i===Lh)return Lh;i===Rh&&(t.value=null)}}return i}function Vh(e){return typeof e==`object`&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function cre(e,t,n,r){if(typeof n==`function`)return n(e,t,r);if(Ah(t))return n.Map?.(e,t,r);if(Nh(t))return n.Seq?.(e,t,r);if(jh(t))return n.Pair?.(e,t,r);if(Mh(t))return n.Scalar?.(e,t,r);if(Oh(t))return n.Alias?.(e,t,r)}function Hh(e,t,n){let r=t[t.length-1];if(Ph(r))r.items[e]=n;else if(jh(r))e===`key`?r.key=n:r.value=n;else if(kh(r))r.contents=n;else{let e=Oh(r)?`alias`:`scalar`;throw Error(`Cannot replace node with ${e} parent`)}}var lre={"!":`%21`,",":`%2C`,"[":`%5B`,"]":`%5D`,"{":`%7B`,"}":`%7D`},ure=e=>e.replace(/[!,[\]{}]/g,e=>lre[e]),Uh=class e{constructor(t,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},e.defaultYaml,t),this.tags=Object.assign({},e.defaultTags,n)}clone(){let t=new e(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){let t=new e(this.yaml,this.tags);switch(this.yaml.version){case`1.1`:this.atNextDocument=!0;break;case`1.2`:this.atNextDocument=!1,this.yaml={explicit:e.defaultYaml.explicit,version:`1.2`},this.tags=Object.assign({},e.defaultTags)}return t}add(t,n){this.atNextDocument&&=(this.yaml={explicit:e.defaultYaml.explicit,version:`1.1`},this.tags=Object.assign({},e.defaultTags),!1);let r=t.trim().split(/[ \t]+/),i=r.shift();switch(i){case`%TAG`:{if(r.length!==2&&(n(0,`%TAG directive should contain exactly two parts`),r.length<2))return!1;let[e,t]=r;return this.tags[e]=t,!0}case`%YAML`:{if(this.yaml.explicit=!0,r.length!==1)return n(0,`%YAML directive should contain exactly one part`),!1;let[e]=r;if(e===`1.1`||e===`1.2`)return this.yaml.version=e,!0;{let t=/^\d+\.\d+$/.test(e);return n(6,`Unsupported YAML version ${e}`,t),!1}}default:return n(0,`Unknown directive ${i}`,!0),!1}}tagName(e,t){if(e===`!`)return`!`;if(e[0]!==`!`)return t(`Not a valid tag: ${e}`),null;if(e[1]===`<`){let n=e.slice(2,-1);return n===`!`||n===`!!`?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==`>`&&t(`Verbatim tags must end with a >`),n)}let[,n,r]=e.match(/^(.*!)([^!]*)$/s);r||t(`The ${e} tag has no suffix`);let i=this.tags[n];if(i)try{return i+decodeURIComponent(r)}catch(e){return t(String(e)),null}return n===`!`?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+ure(e.substring(n.length));return e[0]===`!`?e:`!<${e}>`}toString(e){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||`1.2`}`]:[],n=Object.entries(this.tags),r;if(e&&n.length>0&&Fh(e.contents)){let t={};zh(e.contents,(e,n)=>{Fh(n)&&n.tag&&(t[n.tag]=!0)}),r=Object.keys(t)}else r=[];for(let[i,a]of n)(i!==`!!`||a!==`tag:yaml.org,2002:`)&&(!e||r.some(e=>e.startsWith(a)))&&t.push(`%TAG ${i} ${a}`);return t.join(`
355
355
  `)}};Uh.defaultYaml={explicit:!1,version:`1.2`},Uh.defaultTags={"!!":`tag:yaml.org,2002:`};function dre(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){let t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw Error(t)}return!0}function fre(e){let t=new Set;return zh(e,{Value(e,n){n.anchor&&t.add(n.anchor)}}),t}function pre(e,t){for(let n=1;;++n){let r=`${e}${n}`;if(!t.has(r))return r}}function mre(e,t){let n=[],r=new Map,i=null;return{onAnchor:r=>{n.push(r),i??=fre(e);let a=pre(t,i);return i.add(a),a},setAnchors:()=>{for(let e of n){let t=r.get(e);if(typeof t==`object`&&t.anchor&&(Mh(t.node)||Ph(t.node)))t.node.anchor=t.anchor;else{let t=Error(`Failed to resolve repeated object (this should not happen)`);throw t.source=e,t}}},sourceObjects:r}}function Wh(e,t,n,r){if(r&&typeof r==`object`){if(Array.isArray(r))for(let t=0,n=r.length;t<n;++t){let n=r[t],i=Wh(e,r,String(t),n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}else if(r instanceof Map)for(let t of Array.from(r.keys())){let n=r.get(t),i=Wh(e,r,t,n);i===void 0?r.delete(t):i!==n&&r.set(t,i)}else if(r instanceof Set)for(let t of Array.from(r)){let n=Wh(e,r,t,t);n===void 0?r.delete(t):n!==t&&(r.delete(t),r.add(n))}else for(let[t,n]of Object.entries(r)){let i=Wh(e,r,t,n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}}return e.call(t,n,r)}function Gh(e,t,n){if(Array.isArray(e))return e.map((e,t)=>Gh(e,String(t),n));if(e&&typeof e.toJSON==`function`){if(!n||!Ih(e))return e.toJSON(t,n);let r={aliasCount:0,count:1,res:void 0};n.anchors.set(e,r),n.onCreate=e=>{r.res=e,delete n.onCreate};let i=e.toJSON(t,n);return n.onCreate&&n.onCreate(i),i}return typeof e==`bigint`&&!n?.keep?Number(e):e}var Kh=class{constructor(e){Object.defineProperty(this,Dh,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:n,onAnchor:r,reviver:i}={}){if(!kh(e))throw TypeError(`A document argument is required`);let a={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof n==`number`?n:100},o=Gh(this,``,a);if(typeof r==`function`)for(let{count:e,res:t}of a.anchors.values())r(t,e);return typeof i==`function`?Wh(i,{"":o},``,o):o}},hre=class extends Kh{constructor(e){super(xh),this.source=e,Object.defineProperty(this,"tag",{set(){throw Error(`Alias nodes cannot have tags`)}})}resolve(e,t){if(t?.maxAliasCount===0)throw ReferenceError(`Alias resolution is disabled`);let n;t?.aliasResolveCache?n=t.aliasResolveCache:(n=[],zh(e,{Node:(e,t)=>{(Oh(t)||Ih(t))&&n.push(t)}}),t&&(t.aliasResolveCache=n));let r;for(let e of n){if(e===this)break;e.anchor===this.source&&(r=e)}return r}toJSON(e,t){if(!t)return{source:this.source};let{anchors:n,doc:r,maxAliasCount:i}=t,a=this.resolve(r,t);if(!a){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw ReferenceError(e)}let o=n.get(a);if(o||=(Gh(a,null,t),n.get(a)),o?.res===void 0)throw ReferenceError(`This should not happen: Alias anchor was not resolved?`);if(i>=0&&(o.count+=1,o.aliasCount===0&&(o.aliasCount=qh(r,a,n)),o.count*o.aliasCount>i))throw ReferenceError(`Excessive alias count indicates a resource exhaustion attack`);return o.res}toString(e,t,n){let r=`*${this.source}`;if(e){if(dre(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw Error(e)}if(e.implicitKey)return`${r} `}return r}};function qh(e,t,n){if(Oh(t)){let r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}if(Ph(t)){let r=0;for(let i of t.items){let t=qh(e,i,n);t>r&&(r=t)}return r}if(jh(t)){let r=qh(e,t.key,n),i=qh(e,t.value,n);return Math.max(r,i)}return 1}var Jh=e=>!e||typeof e!=`function`&&typeof e!=`object`,Yh=class extends Kh{constructor(e){super(Th),this.value=e}toJSON(e,t){return t?.keep?this.value:Gh(this.value,e,t)}toString(){return String(this.value)}};Yh.BLOCK_FOLDED=`BLOCK_FOLDED`,Yh.BLOCK_LITERAL=`BLOCK_LITERAL`,Yh.PLAIN=`PLAIN`,Yh.QUOTE_DOUBLE=`QUOTE_DOUBLE`,Yh.QUOTE_SINGLE=`QUOTE_SINGLE`;var Xh=`tag:yaml.org,2002:`;function Zh(e,t,n){if(t){let e=n.filter(e=>e.tag===t),r=e.find(e=>!e.format)??e[0];if(!r)throw Error(`Tag ${t} not found`);return r}return n.find(t=>t.identify?.(e)&&!t.format)}function Qh(e,t,n){if(kh(e)&&(e=e.contents),Fh(e))return e;if(jh(e)){let t=n.schema[Ch].createNode?.(n.schema,null,n);return t.items.push(e),t}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<`u`&&e instanceof BigInt)&&(e=e.valueOf());let{aliasDuplicateObjects:r,onAnchor:i,onTagObj:a,schema:o,sourceObjects:s}=n,c;if(r&&e&&typeof e==`object`){if(c=s.get(e),c)return c.anchor??(c.anchor=i(e)),new hre(c.anchor);c={anchor:null,node:null},s.set(e,c)}t?.startsWith(`!!`)&&(t=Xh+t.slice(2));let l=Zh(e,t,o.tags);if(!l){if(e&&typeof e.toJSON==`function`&&(e=e.toJSON()),!e||typeof e!=`object`){let t=new Yh(e);return c&&(c.node=t),t}l=e instanceof Map?o[Ch]:Symbol.iterator in Object(e)?o[Eh]:o[Ch]}a&&(a(l),delete n.onTagObj);let u=l?.createNode?l.createNode(n.schema,e,n):typeof l?.nodeClass?.from==`function`?l.nodeClass.from(n.schema,e,n):new Yh(e);return t?u.tag=t:l.default||(u.tag=l.tag),c&&(c.node=u),u}function $h(e,t,n){let r=n;for(let e=t.length-1;e>=0;--e){let n=t[e];if(typeof n==`number`&&Number.isInteger(n)&&n>=0){let e=[];e[n]=r,r=e}else r=new Map([[n,r]])}return Qh(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error(`This should not happen, please report a bug.`)},schema:e,sourceObjects:new Map})}var eg=e=>e==null||typeof e==`object`&&!!e[Symbol.iterator]().next().done,tg=class extends Kh{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(t=>Fh(t)||jh(t)?t.clone(e):t),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(eg(e))this.add(t);else{let[n,...r]=e,i=this.get(n,!0);if(Ph(i))i.addIn(r,t);else if(i===void 0&&this.schema)this.set(n,$h(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}deleteIn(e){let[t,...n]=e;if(n.length===0)return this.delete(t);let r=this.get(t,!0);if(Ph(r))return r.deleteIn(n);throw Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){let[n,...r]=e,i=this.get(n,!0);return r.length===0?!t&&Mh(i)?i.value:i:Ph(i)?i.getIn(r,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!jh(t))return!1;let n=t.value;return n==null||e&&Mh(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){let[t,...n]=e;if(n.length===0)return this.has(t);let r=this.get(t,!0);return Ph(r)?r.hasIn(n):!1}setIn(e,t){let[n,...r]=e;if(r.length===0)this.set(n,t);else{let e=this.get(n,!0);if(Ph(e))e.setIn(r,t);else if(e===void 0&&this.schema)this.set(n,$h(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}},gre=e=>e.replace(/^(?!$)(?: $)?/gm,`#`);function ng(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}var rg=(e,t,n)=>e.endsWith(`
356
356
  `)?ng(n,t):n.includes(`
357
357
  `)?`
@@ -391,4 +391,4 @@ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,`$1$2`).replace(/\
391
391
  `:` `)}return hg({comment:e,type:t,value:s},r,i,a)}};function Yg(e,t){if(Nh(e))for(let n=0;n<e.items.length;++n){let r=e.items[n];if(!jh(r)){if(Ah(r)){r.items.length>1&&t(`Each pair must have its own sequence indicator`);let e=r.items[0]||new wg(new Yh(null));if(r.commentBefore&&(e.key.commentBefore=e.key.commentBefore?`${r.commentBefore}\n${e.key.commentBefore}`:r.commentBefore),r.comment){let t=e.value??e.key;t.comment=t.comment?`${r.comment}\n${t.comment}`:r.comment}r=e}e.items[n]=jh(r)?r:new wg(r)}}else t(`Expected a sequence for this tag`);return e}function Xg(e,t,n){let{replacer:r}=n,i=new jg(e);i.tag=`tag:yaml.org,2002:pairs`;let a=0;if(t&&Symbol.iterator in Object(t))for(let e of t){typeof r==`function`&&(e=r.call(t,String(a++),e));let o,s;if(Array.isArray(e)){if(e.length===2)o=e[0],s=e[1];else throw TypeError(`Expected [key, value] tuple: ${e}`)}else if(e&&e instanceof Object){let t=Object.keys(e);if(t.length===1)o=t[0],s=e[o];else throw TypeError(`Expected tuple with one key, not ${t.length} keys`)}else o=e;i.items.push(Cg(o,s,n))}return i}var Zg={collection:`seq`,default:!1,tag:`tag:yaml.org,2002:pairs`,resolve:Yg,createNode:Xg},Qg=class e extends jg{constructor(){super(),this.add=kg.prototype.add.bind(this),this.delete=kg.prototype.delete.bind(this),this.get=kg.prototype.get.bind(this),this.has=kg.prototype.has.bind(this),this.set=kg.prototype.set.bind(this),this.tag=e.tag}toJSON(e,t){if(!t)return super.toJSON(e);let n=new Map;t?.onCreate&&t.onCreate(n);for(let e of this.items){let r,i;if(jh(e)?(r=Gh(e.key,``,t),i=Gh(e.value,r,t)):r=Gh(e,``,t),n.has(r))throw Error(`Ordered maps must not include duplicate keys`);n.set(r,i)}return n}static from(e,t,n){let r=Xg(e,t,n),i=new this;return i.items=r.items,i}};Qg.tag=`tag:yaml.org,2002:omap`;var $g={collection:`seq`,identify:e=>e instanceof Map,nodeClass:Qg,default:!1,tag:`tag:yaml.org,2002:omap`,resolve(e,t){let n=Yg(e,t),r=[];for(let{key:e}of n.items)Mh(e)&&(r.includes(e.value)?t(`Ordered maps must not include duplicate keys: ${e.value}`):r.push(e.value));return Object.assign(new Qg,n)},createNode:(e,t,n)=>Qg.from(e,t,n)};function e_({value:e,source:t},n){return t&&(e?t_:n_).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}var t_={identify:e=>e===!0,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new Yh(!0),stringify:e_},n_={identify:e=>e===!1,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new Yh(!1),stringify:e_},jre={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()===`nan`?NaN:e[0]===`-`?-1/0:1/0,stringify:Lg},Mre={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,format:`EXP`,test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,``)),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():Lg(e)}},Nre={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){let t=new Yh(parseFloat(e.replace(/_/g,``))),n=e.indexOf(`.`);if(n!==-1){let r=e.substring(n+1).replace(/_/g,``);r[r.length-1]===`0`&&(t.minFractionDigits=r.length)}return t},stringify:Lg},r_=e=>typeof e==`bigint`||Number.isInteger(e);function i_(e,t,n,{intAsBigInt:r}){let i=e[0];if((i===`-`||i===`+`)&&(t+=1),e=e.substring(t).replace(/_/g,``),r){switch(n){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`}let t=BigInt(e);return i===`-`?BigInt(-1)*t:t}let a=parseInt(e,n);return i===`-`?-1*a:a}function a_(e,t,n){let{value:r}=e;if(r_(r)){let e=r.toString(t);return r<0?`-`+n+e.substr(1):n+e}return Lg(e)}var Pre={identify:r_,default:!0,tag:`tag:yaml.org,2002:int`,format:`BIN`,test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,n)=>i_(e,2,2,n),stringify:e=>a_(e,2,`0b`)},Fre={identify:r_,default:!0,tag:`tag:yaml.org,2002:int`,format:`OCT`,test:/^[-+]?0[0-7_]+$/,resolve:(e,t,n)=>i_(e,1,8,n),stringify:e=>a_(e,8,`0`)},Ire={identify:r_,default:!0,tag:`tag:yaml.org,2002:int`,test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,n)=>i_(e,0,10,n),stringify:Lg},Lre={identify:r_,default:!0,tag:`tag:yaml.org,2002:int`,format:`HEX`,test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,n)=>i_(e,2,16,n),stringify:e=>a_(e,16,`0x`)},o_=class e extends kg{constructor(t){super(t),this.tag=e.tag}add(e){let t;t=jh(e)?e:e&&typeof e==`object`&&`key`in e&&`value`in e&&e.value===null?new wg(e.key,null):new wg(e,null),Og(this.items,t.key)||this.items.push(t)}get(e,t){let n=Og(this.items,e);return!t&&jh(n)?Mh(n.key)?n.key.value:n.key:n}set(e,t){if(typeof t!=`boolean`)throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);let n=Og(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new wg(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,n);throw Error(`Set items must all have null values`)}static from(e,t,n){let{replacer:r}=n,i=new this(e);if(t&&Symbol.iterator in Object(t))for(let e of t)typeof r==`function`&&(e=r.call(t,e,e)),i.items.push(Cg(e,null,n));return i}};o_.tag=`tag:yaml.org,2002:set`;var s_={collection:`map`,identify:e=>e instanceof Set,nodeClass:o_,default:!1,tag:`tag:yaml.org,2002:set`,createNode:(e,t,n)=>o_.from(e,t,n),resolve(e,t){if(Ah(e)){if(e.hasAllNullValues(!0))return Object.assign(new o_,e);t(`Set items must all have null values`)}else t(`Expected a mapping for this tag`);return e}};function c_(e,t){let n=e[0],r=n===`-`||n===`+`?e.substring(1):e,i=e=>t?BigInt(e):Number(e),a=r.replace(/_/g,``).split(`:`).reduce((e,t)=>e*i(60)+i(t),i(0));return n===`-`?i(-1)*a:a}function Rre(e){let{value:t}=e,n=e=>e;if(typeof t==`bigint`)n=e=>BigInt(e);else if(isNaN(t)||!isFinite(t))return Lg(e);let r=``;t<0&&(r=`-`,t*=n(-1));let i=n(60),a=[t%i];return t<60?a.unshift(0):(t=(t-a[0])/i,a.unshift(t%i),t>=60&&(t=(t-a[0])/i,a.unshift(t))),r+a.map(e=>String(e).padStart(2,`0`)).join(`:`).replace(/000000\d*$/,``)}var zre={identify:e=>typeof e==`bigint`||Number.isInteger(e),default:!0,tag:`tag:yaml.org,2002:int`,format:`TIME`,test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:n})=>c_(e,n),stringify:Rre},Bre={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,format:`TIME`,test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>c_(e,!1),stringify:Rre},l_={identify:e=>e instanceof Date,default:!0,tag:`tag:yaml.org,2002:timestamp`,test:RegExp(`^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$`),resolve(e){let t=e.match(l_.test);if(!t)throw Error(`!!timestamp expects a date, starting with yyyy-mm-dd`);let[,n,r,i,a,o,s]=t.map(Number),c=t[7]?Number((t[7]+`00`).substr(1,3)):0,l=Date.UTC(n,r-1,i,a||0,o||0,s||0,c),u=t[8];if(u&&u!==`Z`){let e=c_(u,!1);Math.abs(e)<30&&(e*=60),l-=6e4*e}return new Date(l)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,``)??``},u_=[Ag,Ng,Pg,Fg,t_,n_,Pre,Fre,Ire,Lre,jre,Mre,Nre,Jg,bg,$g,Zg,s_,zre,Bre,l_],d_=new Map([[`core`,Ug],[`failsafe`,[Ag,Ng,Pg]],[`json`,qg],[`yaml11`,u_],[`yaml-1.1`,u_]]),Vre={binary:Jg,bool:Ig,float:Bg,floatExp:zg,floatNaN:Rg,floatTime:Bre,int:kre,intHex:Are,intOct:Ore,intTime:zre,map:Ag,merge:bg,null:Fg,omap:$g,pairs:Zg,seq:Ng,set:s_,timestamp:l_},Hre={"tag:yaml.org,2002:binary":Jg,"tag:yaml.org,2002:merge":bg,"tag:yaml.org,2002:omap":$g,"tag:yaml.org,2002:pairs":Zg,"tag:yaml.org,2002:set":s_,"tag:yaml.org,2002:timestamp":l_};function f_(e,t,n){let r=d_.get(t);if(r&&!e)return n&&!r.includes(bg)?r.concat(bg):r.slice();let i=r;if(!i){if(Array.isArray(e))i=[];else{let e=Array.from(d_.keys()).filter(e=>e!==`yaml11`).map(e=>JSON.stringify(e)).join(`, `);throw Error(`Unknown schema "${t}"; use one of ${e} or define customTags array`)}}if(Array.isArray(e))for(let t of e)i=i.concat(t);else typeof e==`function`&&(i=e(i.slice()));return n&&(i=i.concat(bg)),i.reduce((e,t)=>{let n=typeof t==`string`?Vre[t]:t;if(!n){let e=JSON.stringify(t),n=Object.keys(Vre).map(e=>JSON.stringify(e)).join(`, `);throw Error(`Unknown custom tag ${e}; use one of ${n}`)}return e.includes(n)||e.push(n),e},[])}var p_=(e,t)=>e.key<t.key?-1:+(e.key>t.key),m_=class e{constructor({compat:e,customTags:t,merge:n,resolveKnownTags:r,schema:i,sortMapEntries:a,toStringDefaults:o}){this.compat=Array.isArray(e)?f_(e,`compat`):e?f_(null,e):null,this.name=typeof i==`string`&&i||`core`,this.knownTags=r?Hre:{},this.tags=f_(t,this.name,n),this.toStringOptions=o??null,Object.defineProperty(this,Ch,{value:Ag}),Object.defineProperty(this,Th,{value:Pg}),Object.defineProperty(this,Eh,{value:Ng}),this.sortMapEntries=typeof a==`function`?a:a===!0?p_:null}clone(){let t=Object.create(e.prototype,Object.getOwnPropertyDescriptors(this));return t.tags=this.tags.slice(),t}};function Ure(e,t){let n=[],r=t.directives===!0;if(t.directives!==!1&&e.directives){let t=e.directives.toString(e);t?(n.push(t),r=!0):e.directives.docStart&&(r=!0)}r&&n.push(`---`);let i=yre(e,t),{commentString:a}=i.options;if(e.commentBefore){n.length!==1&&n.unshift(``);let t=a(e.commentBefore);n.unshift(ng(t,``))}let o=!1,s=null;if(e.contents){if(Fh(e.contents)){if(e.contents.spaceBefore&&r&&n.push(``),e.contents.commentBefore){let t=a(e.contents.commentBefore);n.push(ng(t,``))}i.forceBlockIndent=!!e.comment,s=e.contents.comment}let t=s?void 0:()=>o=!0,c=gg(e.contents,i,()=>s=null,t);s&&(c+=rg(c,``,a(s))),(c[0]===`|`||c[0]===`>`)&&n[n.length-1]===`---`?n[n.length-1]=`--- ${c}`:n.push(c)}else n.push(gg(e.contents,i));if(e.directives?.docEnd){if(e.comment){let t=a(e.comment);t.includes(`
392
392
  `)?(n.push(`...`),n.push(ng(t,``))):n.push(`... ${t}`)}else n.push(`...`)}else{let t=e.comment;t&&o&&(t=t.replace(/^\n+/,``)),t&&((!o||s)&&n[n.length-1]!==``&&n.push(``),n.push(ng(a(t),``)))}return n.join(`
393
393
  `)+`
394
- `}var Wre=class e{constructor(e,t,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,Dh,{value:Sh});let r=null;typeof t==`function`||Array.isArray(t)?r=t:n===void 0&&t&&(n=t,t=void 0);let i=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:`warn`,prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:`1.2`},n);this.options=i;let{version:a}=i;n?._directives?(this.directives=n._directives.atDocument(),this.directives.yaml.explicit&&(a=this.directives.yaml.version)):this.directives=new Uh({version:a}),this.setSchema(a,n),this.contents=e===void 0?null:this.createNode(e,r,n)}clone(){let t=Object.create(e.prototype,{[Dh]:{value:Sh}});return t.commentBefore=this.commentBefore,t.comment=this.comment,t.errors=this.errors.slice(),t.warnings=this.warnings.slice(),t.options=Object.assign({},this.options),this.directives&&(t.directives=this.directives.clone()),t.schema=this.schema.clone(),t.contents=Fh(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(e){h_(this.contents)&&this.contents.add(e)}addIn(e,t){h_(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){let n=fre(this);e.anchor=!t||n.has(t)?pre(t||`a`,n):t}return new hre(e.anchor)}createNode(e,t,n){let r;if(typeof t==`function`)e=t.call({"":e},``,e),r=t;else if(Array.isArray(t)){let e=t.filter(e=>typeof e==`number`||e instanceof String||e instanceof Number).map(String);e.length>0&&(t=t.concat(e)),r=t}else n===void 0&&t&&(n=t,t=void 0);let{aliasDuplicateObjects:i,anchorPrefix:a,flow:o,keepUndefined:s,onTagObj:c,tag:l}=n??{},{onAnchor:u,setAnchors:d,sourceObjects:f}=mre(this,a||`a`),p={aliasDuplicateObjects:i??!0,keepUndefined:s??!1,onAnchor:u,onTagObj:c,replacer:r,schema:this.schema,sourceObjects:f},m=Qh(e,l,p);return o&&Ph(m)&&(m.flow=!0),d(),m}createPair(e,t,n={}){return new wg(this.createNode(e,null,n),this.createNode(t,null,n))}delete(e){return h_(this.contents)?this.contents.delete(e):!1}deleteIn(e){return eg(e)?this.contents!=null&&(this.contents=null,!0):h_(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return Ph(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return eg(e)?!t&&Mh(this.contents)?this.contents.value:this.contents:Ph(this.contents)?this.contents.getIn(e,t):void 0}has(e){return Ph(this.contents)?this.contents.has(e):!1}hasIn(e){return eg(e)?this.contents!==void 0:Ph(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=$h(this.schema,[e],t):h_(this.contents)&&this.contents.set(e,t)}setIn(e,t){eg(e)?this.contents=t:this.contents==null?this.contents=$h(this.schema,Array.from(e),t):h_(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){typeof e==`number`&&(e=String(e));let n;switch(e){case`1.1`:this.directives?this.directives.yaml.version=`1.1`:this.directives=new Uh({version:`1.1`}),n={resolveKnownTags:!1,schema:`yaml-1.1`};break;case`1.2`:case`next`:this.directives?this.directives.yaml.version=e:this.directives=new Uh({version:e}),n={resolveKnownTags:!0,schema:`core`};break;case null:this.directives&&delete this.directives,n=null;break;default:{let t=JSON.stringify(e);throw Error(`Expected '1.1', '1.2' or null as first argument, but found: ${t}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(n)this.schema=new m_(Object.assign(n,t));else throw Error(`With a null YAML version, the { schema: Schema } option is required`)}toJS({json:e,jsonArg:t,mapAsMap:n,maxAliasCount:r,onAnchor:i,reviver:a}={}){let o={anchors:new Map,doc:this,keep:!e,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof r==`number`?r:100},s=Gh(this.contents,t??``,o);if(typeof i==`function`)for(let{count:e,res:t}of o.anchors.values())i(t,e);return typeof a==`function`?Wh(a,{"":s},``,s):s}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw Error(`Document with errors cannot be stringified`);if(`indent`in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){let t=JSON.stringify(e.indent);throw Error(`"indent" option must be a positive integer, not ${t}`)}return Ure(this,e)}};function h_(e){if(Ph(e))return!0;throw Error(`Expected a YAML collection as document contents`)}var g_=Symbol(`break visit`),Gre=Symbol(`skip children`),__=Symbol(`remove item`);function v_(e,t){`type`in e&&e.type===`document`&&(e={start:e.start,value:e.value}),y_(Object.freeze([]),e,t)}v_.BREAK=g_,v_.SKIP=Gre,v_.REMOVE=__,v_.itemAtPath=(e,t)=>{let n=e;for(let[e,r]of t){let t=n?.[e];if(t&&`items`in t)n=t.items[r];else return}return n},v_.parentCollection=(e,t)=>{let n=v_.itemAtPath(e,t.slice(0,-1)),r=t[t.length-1][0],i=n?.[r];if(i&&`items`in i)return i;throw Error(`Parent collection not found`)};function y_(e,t,n){let r=n(t,e);if(typeof r==`symbol`)return r;for(let i of[`key`,`value`]){let a=t[i];if(a&&`items`in a){for(let t=0;t<a.items.length;++t){let r=y_(Object.freeze(e.concat([[i,t]])),a.items[t],n);if(typeof r==`number`)t=r-1;else if(r===g_)return g_;else r===__&&(a.items.splice(t,1),--t)}typeof r==`function`&&i===`key`&&(r=r(t,e))}}return typeof r==`function`?r(t,e):r}function Kre(e,t,n){let r=null;if(typeof t==`function`||Array.isArray(t)?r=t:n===void 0&&t&&(n=t),typeof n==`string`&&(n=n.length),typeof n==`number`){let e=Math.round(n);n=e<1?void 0:e>8?{indent:8}:{indent:e}}if(e===void 0){let{keepUndefined:e}=n??t??{};if(!e)return}return kh(e)&&!r?e.toString(n):new Wre(e,r,n).toString(n)}var qre=`.yarramate/projections`,Jre=e=>{let t=e.toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``);return t.length===0?`view`:/^[a-z]/.test(t)?t:`view-${t}`},Yre=(e,t)=>{if(!t.has(e))return e;let n=2;for(;t.has(`${e}-${n}`);)n+=1;return`${e}-${n}`},Xre=(e,t)=>Yre(Jre(e),t),b_=e=>`${qre}/${e}.yaml`,Zre=e=>e.presentation?.folder??``,Qre=(e,t)=>({path:e.path,projection:S_({id:e.id,title:t,description:e.description,query:e.query,presentation:e.presentation})}),x_=(e,t)=>{let n=`${e.title} copy`,r=Xre(n,t);return{path:b_(r),projection:S_({id:r,title:n,description:e.description,query:e.query,presentation:e.presentation})}},S_=e=>({format:`yarramate/projection/v1`,id:e.id,version:`1.0`,query:e.query,presentation:{...e.presentation??{},title:e.title,description:e.description}}),C_=e=>e.subjects!==void 0,w_=(e,t,n)=>{if(!C_(e.query))return $re(e,t,n);let r=e.query.subjects,i=r.includes(t);return(n===`add`?i:!i)?null:{...e,query:{...e.query,subjects:n===`add`?[...r,t]:r.filter(e=>e!==t)}}},$re=(e,t,n)=>{let r=e.query.exclude??[],i=r.includes(t);if(n===`add`?!i:i)return null;let a=n===`add`?r.filter(e=>e!==t):[...r,t],{exclude:o,...s}=e.query;return{...e,query:a.length===0?s:{...s,exclude:a}}},T_=(e,t)=>{if(!C_(e)&&!C_(t)){let n=e.exclude??[],r=t.exclude??[];return[...n.filter(e=>!r.includes(e)).map(e=>`+${e}`),...r.filter(e=>!n.includes(e)).map(e=>`-${e}`)]}return!C_(e)||!C_(t)?[]:[...t.subjects.filter(t=>!e.subjects.includes(t)).map(e=>`+${e}`),...e.subjects.filter(e=>!t.subjects.includes(e)).map(e=>`-${e}`)]},eie=(e,t)=>E_(e)===E_(t),E_=e=>Array.isArray(e)?`[${e.map(E_).join(`,`)}]`:typeof e==`object`&&e?`{${Object.entries(e).filter(([,e])=>e!==void 0).sort(([e],[t])=>e<t?-1:1).map(([e,t])=>`${JSON.stringify(e)}:${E_(t)}`).join(`,`)}}`:JSON.stringify(e)??`null`,tie={subjects:[],documents:[],kinds:[],layers:[],statuses:[],excludeStatuses:[],states:[],owners:[],constraints:[],relationshipKinds:[],kindMatching:``,relationships:``,isolatedConcepts:``},nie=[`planned`,`current`,`retired`],rie=e=>e===null?tie:{subjects:e.subjects??[],documents:e.documents??[],kinds:e.kinds??[],layers:e.layers??[],statuses:e.statuses??[],excludeStatuses:e.excludeStatuses??[],states:e.states??[],owners:e.owners??[],constraints:e.constraints??[],relationshipKinds:e.relationshipKinds??[],kindMatching:e.kindMatching??``,relationships:e.relationships??``,isolatedConcepts:e.isolatedConcepts??``},iie=e=>({...e.subjects.length>0?{subjects:e.subjects}:{},...e.documents.length>0?{documents:e.documents}:{},...e.kinds.length>0?{kinds:e.kinds}:{},...e.layers.length>0?{layers:e.layers}:{},...e.statuses.length>0?{statuses:e.statuses}:{},...e.excludeStatuses.length>0?{excludeStatuses:e.excludeStatuses}:{},...e.states.length>0?{states:e.states}:{},...e.owners.length>0?{owners:e.owners}:{},...e.constraints.length>0?{constraints:e.constraints}:{},...e.relationshipKinds.length>0?{relationshipKinds:e.relationshipKinds}:{},...e.kindMatching===``?{}:{kindMatching:e.kindMatching},...e.relationships===``?{}:{relationships:e.relationships},...e.isolatedConcepts===``?{}:{isolatedConcepts:e.isolatedConcepts}}),D_=({id:e,label:t,values:n,onChange:r})=>{let[i,a]=(0,v.useState)(``),o=()=>{let e=i.trim();a(``),!(e===``||n.includes(e))&&r([...n,e])};return(0,k.jsxs)(`div`,{className:`filter-field`,children:[(0,k.jsx)(`label`,{htmlFor:e,children:t}),(0,k.jsxs)(`div`,{className:`tag-input`,children:[n.map(e=>(0,k.jsxs)(`span`,{className:`tag-chip`,children:[e,(0,k.jsx)(`button`,{type:`button`,"aria-label":`Remove ${e}`,onClick:()=>r(n.filter(t=>t!==e)),children:`×`})]},e)),(0,k.jsx)(`input`,{id:e,type:`text`,value:i,placeholder:`Add…`,onChange:e=>a(e.target.value),onKeyDown:e=>{e.key===`Enter`||e.key===`,`?(e.preventDefault(),o()):e.key===`Backspace`&&i===``&&n.length>0&&r(n.slice(0,-1))},onBlur:o})]})]})},O_=({legend:e,values:t,onChange:n})=>(0,k.jsxs)(`fieldset`,{className:`filter-field filter-checkbox-group`,children:[(0,k.jsx)(`legend`,{children:e}),nie.map(e=>(0,k.jsxs)(`label`,{className:`filter-checkbox-option`,children:[(0,k.jsx)(`input`,{type:`checkbox`,checked:t.includes(e),onChange:r=>n(r.target.checked?[...t,e]:t.filter(t=>t!==e))}),e]},e))]}),k_=({id:e,label:t,value:n,options:r,onChange:i})=>(0,k.jsxs)(`div`,{className:`filter-field`,children:[(0,k.jsx)(`label`,{htmlFor:e,children:t}),(0,k.jsxs)(`select`,{id:e,value:n,onChange:e=>i(e.target.value),children:[(0,k.jsx)(`option`,{value:``,children:`Any`}),r.map(e=>(0,k.jsx)(`option`,{value:e,children:e},e))]})]}),A_=(e,t)=>n=>e(t,n);function aie({fields:e,onChange:t}){return(0,k.jsxs)(`div`,{className:`filter-grid`,children:[(0,k.jsx)(D_,{id:`filter-subjects`,label:`Subjects`,values:e.subjects,onChange:e=>t(`subjects`,e)}),(0,k.jsx)(D_,{id:`filter-documents`,label:`Documents`,values:e.documents,onChange:e=>t(`documents`,e)}),(0,k.jsx)(D_,{id:`filter-kinds`,label:`Kinds`,values:e.kinds,onChange:e=>t(`kinds`,e)}),(0,k.jsx)(D_,{id:`filter-layers`,label:`Layers`,values:e.layers,onChange:e=>t(`layers`,e)}),(0,k.jsx)(D_,{id:`filter-states`,label:`States`,values:e.states,onChange:e=>t(`states`,e)}),(0,k.jsx)(D_,{id:`filter-owners`,label:`Owners`,values:e.owners,onChange:e=>t(`owners`,e)}),(0,k.jsx)(D_,{id:`filter-constraints`,label:`Constraints`,values:e.constraints,onChange:e=>t(`constraints`,e)}),(0,k.jsx)(D_,{id:`filter-relationship-kinds`,label:`Relationship kinds`,values:e.relationshipKinds,onChange:e=>t(`relationshipKinds`,e)}),(0,k.jsx)(O_,{legend:`Statuses`,values:e.statuses,onChange:e=>t(`statuses`,e)}),(0,k.jsx)(O_,{legend:`Exclude statuses`,values:e.excludeStatuses,onChange:e=>t(`excludeStatuses`,e)}),(0,k.jsx)(k_,{id:`filter-kind-matching`,label:`Kind matching`,value:e.kindMatching,options:[`exact`,`descendants`],onChange:e=>t(`kindMatching`,e)}),(0,k.jsx)(k_,{id:`filter-relationships`,label:`Relationships`,value:e.relationships,options:[`between`,`connected`,`none`],onChange:e=>t(`relationships`,e)}),(0,k.jsx)(k_,{id:`filter-isolated-concepts`,label:`Isolated concepts`,value:e.isolatedConcepts,options:[`include`,`exclude`],onChange:e=>t(`isolatedConcepts`,e)})]})}function j_({showLifecycle:e,showEvidence:t,showOwnership:n,showNudges:r,onTogglePresentation:i}){return(0,k.jsxs)(`fieldset`,{className:`filter-field filter-presentation-group`,children:[(0,k.jsx)(`legend`,{children:`Presentation`}),(0,k.jsxs)(`label`,{className:`filter-checkbox-option`,children:[(0,k.jsx)(`input`,{type:`checkbox`,checked:e,onChange:e=>A_(i,`showLifecycle`)(e.currentTarget.checked)}),`Lifecycle badges`]}),(0,k.jsxs)(`label`,{className:`filter-checkbox-option`,children:[(0,k.jsx)(`input`,{type:`checkbox`,checked:t,onChange:e=>A_(i,`showEvidence`)(e.currentTarget.checked)}),`Evidence badges`]}),(0,k.jsxs)(`label`,{className:`filter-checkbox-option`,children:[(0,k.jsx)(`input`,{type:`checkbox`,checked:n,onChange:e=>A_(i,`showOwnership`)(e.currentTarget.checked)}),`Ownership badges`]}),(0,k.jsxs)(`label`,{className:`filter-checkbox-option`,children:[(0,k.jsx)(`input`,{type:`checkbox`,checked:r,onChange:e=>A_(i,`showNudges`)(e.currentTarget.checked)}),`Open-question badges`]})]})}var M_=[{id:`view-query`,label:`View query`}],N_=e=>JSON.stringify(Object.entries(e??{}).sort(([e],[t])=>e<t?-1:1)),P_=(e,t)=>N_(e)===N_(t),F_={exclude:`Taken out of this view`,states:`States`,subjects:`Subjects`,documents:`Documents`,kinds:`Kinds`,layers:`Layers`,statuses:`Statuses`,excludeStatuses:`Excluded statuses`,owners:`Owners`,constraints:`Constraints`,isolatedConcepts:`Isolated concepts`,unreported:`Not reported`},oie=Object.keys(F_),sie=(e,t,n)=>{if(t===null)return[];let r=new Set(t),i=n===null?null:new Map(n.map(({id:e,facet:t})=>[e,t])),a=new Map;for(let t of e){if(r.has(t.id))continue;let e=i===null?`unreported`:i.get(t.id)??`isolatedConcepts`,n=a.get(e)??[];n.push({id:t.id,title:t.name}),a.set(e,n)}return oie.flatMap(e=>{let t=a.get(e);return t===void 0?[]:[{reason:e,label:F_[e],subjects:t}]})},cie=(e,t)=>{if(t===null)return e.length;let n=new Set(t);return e.filter(e=>n.has(e.id)).length},I_=(e,t)=>{if(e===null||t===null)return 0;let n=new Set(e);return t.filter(({id:e})=>n.has(e)).length},lie=(e,t,n)=>{let r=e.presentation??{},i=e=>r[e]!==void 0||t[e]!==n[e]?{[e]:t[e]}:{};return{...r,...i(`showLifecycle`),...i(`showEvidence`),...i(`showOwnership`)}},uie=({view:e,query:t,badges:n,opened:r})=>S_({id:e.id,title:e.title,description:e.description,query:t,presentation:lie(e,n,r)}),die=e=>({op:`write-view`,path:e.view.path,projection:uie(e)}),fie=e=>{let t=uie(e),n=S_({id:e.view.id,title:e.view.title,description:e.view.description,query:e.view.query,presentation:e.view.presentation});return N_(t.query)!==N_(n.query)||N_(t.presentation)!==N_(n.presentation)};function pie({nodes:e,activeFilter:t,view:n,open:r,tab:i,showLifecycle:a,showEvidence:o,showOwnership:s,showNudges:c,onTogglePresentation:l,onToggleOpen:u,onSelectTab:d,onApply:f,onStage:p,readOnly:m=!1}){let h=(0,v.useRef)(null),[g,_]=(0,v.useState)(()=>rie(n?.query??t?.query??null)),[y,b]=(0,v.useState)(!1),[x]=(0,v.useState)(()=>({showLifecycle:a,showEvidence:o,showOwnership:s})),S=e=>{h.current!==null&&window.clearTimeout(h.current),h.current=window.setTimeout(()=>{h.current=null,f(iie(e))},300)},C=(e,t)=>{b(!1),_(n=>{let r={...n,[e]:t};return S(r),r})},w=iie(g),T=t?.matchedIds??null,E=cie(e,T),D=sie(e,T,t?.excluded??null),ee=I_(T,t?.excluded??null),te=t===null?Object.keys(w).length===0:P_(w,t.query),ne=n===null?null:{view:n,query:w,badges:{showLifecycle:a,showEvidence:o,showOwnership:s},opened:x};return(0,k.jsxs)(`section`,{className:`bottom-panel`,"aria-label":`Canvas panels`,children:[(0,k.jsxs)(`div`,{className:`bottom-panel-tabs`,role:`tablist`,"aria-label":`Canvas panels`,children:[M_.map(e=>(0,k.jsx)(`button`,{type:`button`,role:`tab`,id:`bottom-tab-${e.id}`,className:`bottom-panel-tab`,"aria-selected":r&&i===e.id,"aria-controls":`bottom-panel-${e.id}`,onClick:()=>{if(r&&i===e.id){u();return}d(e.id)},children:e.label},e.id)),(0,k.jsxs)(`span`,{className:`bottom-panel-summary`,role:`status`,children:[E,` `,E===1?`subject`:`subjects`,D.length===0?``:` · ${D.reduce((e,t)=>e+t.subjects.length,0)} excluded`]}),(0,k.jsx)(`button`,{type:`button`,className:`bottom-panel-collapse`,"aria-expanded":r,"aria-controls":`bottom-panel-${i}`,"aria-label":r?`Collapse panel`:`Expand panel`,onClick:u,children:r?`▾`:`▴`})]}),r?(0,k.jsx)(`div`,{className:`bottom-panel-body`,id:`bottom-panel-${i}`,role:`tabpanel`,"aria-labelledby":`bottom-tab-${i}`,children:(0,k.jsxs)(`div`,{className:`query-tab`,children:[(0,k.jsxs)(`div`,{className:`query-tab-fields`,children:[(0,k.jsx)(aie,{fields:g,onChange:C}),(0,k.jsx)(j_,{showLifecycle:a,showEvidence:o,showOwnership:s,showNudges:c,onTogglePresentation:l})]}),(0,k.jsxs)(`div`,{className:`query-tab-outcome`,children:[(0,k.jsx)(`h3`,{children:`Matches`}),(0,k.jsxs)(`p`,{className:`query-match-count`,children:[(0,k.jsx)(`strong`,{children:E}),` `,E===1?`subject`:`subjects`,` of `,e.length]}),te?null:(0,k.jsx)(`p`,{className:`query-outcome-stale`,children:`Describing the query on the canvas, not the edit in progress.`}),E===0&&T!==null?(0,k.jsx)(`p`,{className:`query-outcome-empty`,children:`This query selects nothing.`}):null,ee===0?null:(0,k.jsxs)(`p`,{className:`query-outcome-note`,children:[ee,` a facet dropped `,ee===1?`is`:`are`,` drawn anyway: `,(0,k.jsx)(`code`,{children:`relationships: connected`}),` takes the other end of a relationship with it.`]}),(0,k.jsx)(`h3`,{children:`Excluded, and why`}),D.length===0?(0,k.jsx)(`p`,{className:`query-outcome-note`,children:`Nothing is left out of this view.`}):(0,k.jsx)(`ul`,{className:`query-exclusions`,children:D.map(e=>(0,k.jsxs)(`li`,{children:[(0,k.jsx)(`span`,{className:`query-exclusion-facet`,children:e.label}),` `,(0,k.jsx)(`span`,{className:`query-exclusion-count`,children:e.subjects.length}),(0,k.jsxs)(`ul`,{children:[e.subjects.slice(0,12).map(e=>(0,k.jsx)(`li`,{title:e.id,children:e.title},e.id)),e.subjects.length>12?(0,k.jsxs)(`li`,{className:`query-exclusion-more`,children:[`and `,e.subjects.length-12,` more`]}):null]})]},e.reason))})]}),(0,k.jsxs)(`div`,{className:`query-tab-document`,children:[(0,k.jsx)(`h3`,{children:`Document`}),ne===null?(0,k.jsx)(`p`,{className:`query-outcome-note`,children:m?`No view is active, so this query has no document. Pick one in the tree.`:`No view is active, so this query has no document yet. Pick one in the tree, or save this query as a new view.`}):(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(`pre`,{className:`query-document`,children:Kre(uie(ne))}),m?null:(0,k.jsxs)(`div`,{className:`query-tab-actions`,children:[(0,k.jsx)(`button`,{type:`button`,disabled:!fie(ne),onClick:()=>{p(die(ne)),b(!0)},children:`Stage view change`}),(0,k.jsx)(`span`,{role:`status`,className:`query-stage-status`,children:y?`Staged. It lands when the changeset is committed.`:``})]})]})]})]})}):null]})}function mie({value:e,onChange:t}){return(0,k.jsx)(`input`,{type:`search`,className:`quick-filter`,value:e,onChange:e=>t(e.currentTarget.value),placeholder:`Filter by name or id…`,"aria-label":`Quick filter`})}var hie=`views`,gie=`model`,_ie=e=>`view-folder:${e}`,L_=e=>`model-layer:${e}`,vie=e=>`model-folder:${e}`,yie=`unlayered`,R_=(e,t)=>t===``||e.toLowerCase().includes(t),bie=(e,t)=>R_(e,ch(t)),z_=e=>e.presentation?.folder??``,xie=({views:e,stagedOperations:t,activeViewId:n,activeSubjects:r,filterText:i})=>{let a=ch(i),o=a!==``,s=r===null?null:Ene(r,i),c=new Map,l=(e,t)=>{let n=c.get(e);n===void 0?c.set(e,[t]):n.push(t)},u=new Map;for(let e of t)u.set(e.path,e);for(let t of e){let e=u.get(t.path);u.delete(t.path);let r=e?.op===`write-view`?e.projection:null,i=e===void 0?null:r===null?`delete`:`overwrite`,c=r===null?t.title:r.presentation?.title??r.id,d=r===null?z_(t):r.presentation?.folder??``,f=t.id===n;!R_(c,a)&&!R_(d,a)||l(d,{id:t.id,title:c,path:t.path,subjectCount:f&&s!==null?s:o?null:t.subjectCount,active:f,staged:i})}for(let e of u.values()){if(e.op!==`write-view`)continue;let{projection:t}=e,n=t.presentation?.title??t.id,r=t.presentation?.folder??``;!R_(n,a)&&!R_(r,a)||l(r,{id:t.id,title:n,path:e.path,subjectCount:null,active:!1,staged:`new`})}let d=(e,t)=>e.title.localeCompare(t.title),f=[...c.get(``)??[]].sort(d),p=[...c.entries()].filter(([e])=>e!==``).sort(([e],[t])=>e.localeCompare(t)).map(([e,t])=>({key:_ie(e),name:e,views:[...t].sort(d)}));return{folders:p,loose:f,matched:f.length+p.reduce((e,t)=>e+t.views.length,0)}},B_=({nodes:e,inViewIds:t,filterText:n})=>{let r=ch(n),i=new Map,a=new Map;for(let n of e){let e=n.layer,o=n.folder,s=o??e??`unlayered`;if(!lh(r,n.id,n.name,n.kindLabel)&&!R_(s,r))continue;let c={id:n.id,name:n.name,kindLabel:n.kindLabel,layer:e,folder:o,inView:t===null||t.has(n.id)},l=o===null?a:i,u=l.get(s);u===void 0?l.set(s,[c]):u.push(c)}let o=(e,t)=>e.name.localeCompare(t.name),s=[...i.entries()].sort(([e],[t])=>e.localeCompare(t)).map(([e,t])=>({key:vie(e),label:e,grouping:`folder`,subjects:[...t].sort(o)})),c=[...one,yie];return[...s,...c.flatMap(e=>{let t=a.get(e);return t===void 0||t.length===0?[]:[{key:L_(e),label:e,grouping:`layer`,subjects:[...t].sort(o)}]})]},Sie=`All subjects`,V_=`M2 3.5 5 6.5 8 3.5`,Cie=`M3.5 2 6.5 5 3.5 8`;function wie({open:e}){return(0,k.jsx)(`svg`,{width:`10`,height:`10`,viewBox:`0 0 10 10`,fill:`none`,"aria-hidden":!0,children:(0,k.jsx)(`path`,{d:e?V_:Cie,stroke:`currentColor`,strokeWidth:`1.2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function H_(){return(0,k.jsxs)(`svg`,{width:`12`,height:`12`,viewBox:`0 0 12 12`,fill:`none`,"aria-hidden":!0,children:[(0,k.jsx)(`rect`,{x:`1.5`,y:`2.5`,width:`9`,height:`7`,stroke:`currentColor`,strokeWidth:`1.2`}),(0,k.jsx)(`path`,{d:`M1.5 5h9`,stroke:`currentColor`,strokeWidth:`1.2`})]})}function U_({layer:e}){let t=e===null?null:oh[e];return(0,k.jsx)(`span`,{className:`tree-swatch`,style:t==null?void 0:{background:t.fill,borderColor:t.border},"aria-hidden":!0})}var W_=(e,t)=>n=>{n.preventDefault(),t(e,{x:n.clientX,y:n.clientY})};function G_({row:e,depth:t,onSelect:n,onMenu:r}){let i=e.staged!==`new`;return(0,k.jsx)(`li`,{children:(0,k.jsxs)(`button`,{type:`button`,className:`tree-row tree-view tree-depth-${t}${e.active?` tree-row-active`:``}${e.staged===null?``:` tree-row-staged`}${e.staged===`delete`?` tree-row-staged-delete`:``}`,title:e.title,"aria-current":e.active?`true`:void 0,onClick:i?()=>n(e.id):void 0,onContextMenu:i?W_({kind:`view`,id:e.id},r):void 0,children:[(0,k.jsx)(H_,{}),(0,k.jsx)(`span`,{className:`tree-label`,children:e.title}),e.staged===null?null:(0,k.jsx)(`span`,{className:`tree-staged`,children:e.staged===`delete`?`staged delete`:`staged`}),e.subjectCount===null?null:(0,k.jsx)(`span`,{className:`tree-count`,children:e.subjectCount})]})})}function K_({label:e,open:t,count:n,depth:r,onToggle:i}){return(0,k.jsxs)(`button`,{type:`button`,className:`tree-row tree-branch tree-depth-${r}`,"aria-expanded":t,onClick:i,children:[(0,k.jsx)(wie,{open:t}),(0,k.jsx)(`span`,{className:`tree-label`,children:e}),n===void 0?null:(0,k.jsx)(`span`,{className:`tree-count`,children:n})]})}function Tie({views:e,stagedViewOperations:t,activeViewId:n,nodes:r,inViewIds:i,filterText:a,collapsed:o,onFilterChange:s,onToggle:c,onSelectView:l,onClearView:u,onNewView:d,onSelectSubject:f,onRowMenu:p,readOnly:m=!1}){let h=xie({views:e,stagedOperations:t,activeViewId:n,activeSubjects:i===null?null:r.filter(e=>i.has(e.id)),filterText:a}),g=B_({nodes:r,inViewIds:i,filterText:a}),_=!o.has(hie),v=!o.has(gie),y=a.trim()!==``,b=n===``&&i===null,x=bie(Sie,a);return(0,k.jsxs)(`aside`,{className:`view-tree`,"aria-label":`Views and model`,children:[(0,k.jsxs)(`div`,{className:`view-tree-head`,children:[(0,k.jsx)(`input`,{type:`search`,className:`view-tree-filter`,placeholder:`Filter tree`,"aria-label":`Filter views and subjects`,value:a,onChange:e=>s(e.currentTarget.value)}),m?null:(0,k.jsx)(`button`,{type:`button`,className:`view-tree-new`,title:`New view`,"aria-label":`New view`,onClick:d,children:(0,k.jsx)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 14 14`,fill:`none`,"aria-hidden":!0,children:(0,k.jsx)(`path`,{d:`M7 3v8M3 7h8`,stroke:`currentColor`,strokeWidth:`1.3`,strokeLinecap:`round`})})})]}),(0,k.jsxs)(`div`,{className:`view-tree-body`,children:[(0,k.jsx)(K_,{label:`Views`,open:_,depth:0,onToggle:()=>c(hie)}),_?(0,k.jsxs)(`ul`,{className:`tree-list`,children:[x?(0,k.jsx)(`li`,{children:(0,k.jsxs)(`button`,{type:`button`,className:`tree-row tree-view tree-depth-1${b?` tree-row-active`:``}`,"aria-current":b?`true`:void 0,onClick:u,onContextMenu:W_({kind:`view`,id:``},p),children:[(0,k.jsx)(H_,{}),(0,k.jsx)(`span`,{className:`tree-label`,children:Sie}),(0,k.jsx)(`span`,{className:`tree-count`,children:Ene(r,a)})]})}):null,h.loose.map(e=>(0,k.jsx)(G_,{row:e,depth:1,onSelect:l,onMenu:p},e.id)),h.folders.map(e=>{let t=y||!o.has(e.key);return(0,k.jsxs)(`li`,{children:[(0,k.jsx)(K_,{label:e.name,open:t,count:t?void 0:e.views.length,depth:1,onToggle:()=>c(e.key)}),t?(0,k.jsx)(`ul`,{className:`tree-list`,children:e.views.map(e=>(0,k.jsx)(G_,{row:e,depth:2,onSelect:l,onMenu:p},e.id))}):null]},e.key)}),!y||h.matched!==0||x?null:(0,k.jsx)(`li`,{className:`tree-empty`,children:`No view matches that.`})]}):null,(0,k.jsx)(K_,{label:`Model`,open:v,depth:0,onToggle:()=>c(gie)}),v?(0,k.jsxs)(`ul`,{className:`tree-list`,children:[g.map(e=>{let t=y||!o.has(e.key);return(0,k.jsxs)(`li`,{children:[(0,k.jsx)(K_,{label:e.label,open:t,count:t?void 0:e.subjects.length,depth:1,onToggle:()=>c(e.key)}),t?(0,k.jsx)(`ul`,{className:`tree-list`,children:e.subjects.map(e=>(0,k.jsx)(`li`,{children:(0,k.jsxs)(`button`,{type:`button`,className:`tree-row tree-subject tree-depth-2${e.inView?``:` tree-row-quiet`}`,title:`${e.name} — ${e.kindLabel}`,onClick:()=>f(e.id),onContextMenu:W_({kind:`subject`,id:e.id},p),children:[(0,k.jsx)(U_,{layer:e.layer}),(0,k.jsx)(`span`,{className:`tree-label`,children:e.name}),e.inView?null:(0,k.jsx)(`span`,{className:`tree-count`,children:`not in view`})]})},e.id))}):null]},e.key)}),g.length!==0||!y?null:(0,k.jsx)(`li`,{className:`tree-empty`,children:`No subject matches that.`})]}):null]})]})}var Eie=({id:e,taken:t,path:n,folder:r,title:i,description:a,query:o,layout:s,showLifecycle:c,showEvidence:l,showOwnership:u,carriedDirection:d})=>{let f=e??Xre(i,t);return{op:`write-view`,path:n??b_(f),projection:S_({id:f,title:i,description:a,query:o??{},presentation:{layout:s,...d===void 0?{}:{direction:d},...r===void 0||r===``?{}:{folder:r},showLifecycle:c,showEvidence:l,showOwnership:u}})}};function Die({activeView:e,presetFolder:t,onSubmit:n,onCancel:r}){let[i,a]=(0,v.useState)(e?.title??``),[o,s]=(0,v.useState)(e?.description??``),c=i.trim()===``||o.trim()===``,l=t!==void 0;return(0,k.jsx)(`div`,{className:`save-view-panel`,children:(0,k.jsx)(`div`,{id:`save-view-panel-body`,className:`save-view-panel-body`,children:(0,k.jsxs)(`form`,{className:`save-view-form`,onSubmit:t=>{t.preventDefault(),!c&&n(l?void 0:e?.id,i,o)},children:[(0,k.jsxs)(`div`,{children:[(0,k.jsx)(`label`,{htmlFor:`save-view-title`,children:`Title`}),(0,k.jsx)(`input`,{id:`save-view-title`,type:`text`,value:i,onChange:e=>a(e.currentTarget.value),required:!0})]}),(0,k.jsxs)(`div`,{children:[(0,k.jsx)(`label`,{htmlFor:`save-view-description`,children:`Description`}),(0,k.jsx)(`textarea`,{id:`save-view-description`,value:o,onChange:e=>s(e.currentTarget.value),required:!0})]}),(0,k.jsxs)(`div`,{className:`save-view-actions`,children:[(0,k.jsx)(`button`,{type:`submit`,disabled:e===null||c||l,title:l?`Save overwrites the active view and keeps its own folder — Save As New puts the first view in "${t}".`:void 0,children:`Save`}),(0,k.jsx)(`button`,{type:`button`,disabled:c,onClick:()=>{c||n(void 0,i,o)},children:`Save As New`}),(0,k.jsx)(`button`,{type:`button`,onClick:r,children:`Cancel`})]})]})})})}function Oie({views:e,activeViewId:t,query:n,layout:r,showLifecycle:i,showEvidence:a,showOwnership:o,open:s,folder:c,onClose:l,onStage:u}){let d=e.find(e=>e.id===t)??null,f=(t,s,l)=>{u(Eie({id:t,taken:new Set(e.map(e=>e.id)),path:t===void 0?void 0:d?.path,folder:t===void 0?c:d?.presentation?.folder,title:s,description:l,query:n,layout:r,showLifecycle:i,showEvidence:a,showOwnership:o,carriedDirection:t===void 0?void 0:d?.presentation?.direction}))};return s?(0,k.jsx)(`div`,{className:`save-view-control`,children:(0,k.jsx)(Die,{activeView:d,presetFolder:c,onSubmit:(e,t,n)=>{f(e,t,n),l()},onCancel:l},t)}):null}function q_(e){if((e.relationships===`connected`||e.relationships===`between`)&&e.subjects!==void 0&&e.subjects.length>0){let t=`${e.relationships===`connected`?`connected to`:`between`} ${e.subjects.join(`, `)}`;return e.exclude===void 0||e.exclude.length===0?t:`${t} · except: ${e.exclude.join(`, `)}`}let t=[],n=(e,n)=>{n!==void 0&&n.length>0&&t.push(`${e}: ${n.join(`, `)}`)};return n(`subjects`,e.subjects),n(`documents`,e.documents),n(`layers`,e.layers),n(e.kindMatching===`descendants`?`kinds (and descendants)`:`kinds`,e.kinds),n(`statuses`,e.statuses),n(`excluding statuses`,e.excludeStatuses),n(`states`,e.states),n(`owners`,e.owners),n(`constraints`,e.constraints),n(`relationship kinds`,e.relationshipKinds),n(`except`,e.exclude),e.isolatedConcepts===`exclude`&&t.push(`connected concepts only`),e.isolatedConcepts===`include`&&t.push(`including isolated concepts`),t.length>0?t.join(` · `):`all`}var kie=(e,t)=>{let n=new Set(t.nodes.map(e=>e.id));for(let e of t.edges)n.add(e.id);let r=0;for(let t of e)(t.subjects??[]).some(e=>n.has(e))&&(r+=1);return{total:e.length,onCanvas:r,elsewhere:e.length-r}},Aie=e=>{let t=new Set;for(let n of e)for(let e of n.subjects??[])t.add(e);return t},J_=(e,t,n)=>{let r=n=>n.document===e&&n.localId===t,i=n?.nodes.find(r);if(i!==void 0)return i.name;let a=n?.edges.find(r);return a?.name!==void 0&&a.name!==null?a.name:t},jie=(e,t,n)=>[...e.operations.map(e=>Nie(e,t)),...e.viewOperations.map(e=>Mie(e,n))],Mie=(e,t)=>{if(e.op===`delete-view`)return{verb:e.op,subjectName:e.path,fields:[],removedFields:[],scope:`view`};let n=t.find(t=>t.path===e.path),r=n===void 0?[]:T_(n.query,e.projection.query);return{verb:e.op,subjectName:e.projection.presentation?.title??e.projection.id,fields:r.length>0?r:[e.path],removedFields:[],scope:`view`}},Nie=(e,t)=>{let n=e.op===`update-concept`||e.op===`update-relationship`||e.op===`update-observation`?e.remove??[]:[];if(`observation`in e){let{subject:r,claim:i,key:a,...o}=e.observation,s=J_(e.document,r??i,t);return{verb:e.op,subjectName:a===void 0?s:`${s} (${a})`,fields:Object.keys(o),removedFields:n,scope:`model`}}let r=`concept`in e?e.concept:e.relationship;return{verb:e.op,subjectName:J_(e.document,r.id,t),fields:Object.keys(r).filter(e=>e!==`id`),removedFields:n,scope:`model`}},Y_=e=>{let t=[...e.fields,...e.removedFields.map(e=>`remove: ${e}`)];return t.length===0?`${e.verb} · ${e.subjectName}`:`${e.verb} · ${e.subjectName} · ${t.join(`, `)}`},j=/^\/operations\/(\d+)(\/|$)/,X_=e=>{let t=new Map,n=[];for(let r of e){let e=j.exec(r.pointer);if(e===null){n.push(r);continue}let i=Number(e[1]),a=t.get(i);a===void 0?t.set(i,[r]):a.push(r)}return{byRow:t,batch:n}},Pie=(e,t,n)=>{let r=t[e];if(r===void 0)return null;let i=n?.sourceDigests[e]??n?.projectionDigests[e];return i===void 0||i===r?null:e},Fie=({diagnostic:e})=>(0,k.jsxs)(`li`,{children:[(0,k.jsx)(`span`,{className:`code`,children:e.code}),` `,e.message,e.path===``?null:(0,k.jsxs)(`span`,{className:`where`,children:[e.path,`:`,e.line,`:`,e.column]})]}),Z_=({index:e,row:t,diagnostics:n,conflict:r,onDiscard:i})=>(0,k.jsxs)(`li`,{className:r===null?`changeset-row`:`changeset-row conflicted`,children:[(0,k.jsxs)(`div`,{className:`changeset-row-line`,children:[(0,k.jsx)(`span`,{className:`changeset-row-label`,children:Y_(t)}),(0,k.jsx)(`span`,{className:`changeset-row-scope changeset-scope-${t.scope}`,children:t.scope}),(0,k.jsx)(`button`,{type:`button`,className:`changeset-row-discard`,onClick:i,children:`Discard`})]}),r===null?null:(0,k.jsxs)(`p`,{className:`changeset-row-conflict`,role:`status`,children:[r,` changed after this edit was staged`]}),n.length===0?null:(0,k.jsx)(`ul`,{className:`changeset-row-diagnostics`,children:n.map(e=>(0,k.jsx)(Fie,{diagnostic:e},`${e.code}-${e.pointer}`))})]}),Iie=({state:e,onDiscardChange:t,onClearChangeset:n,onUndoChangeset:r,onRedoChangeset:i,onCommitChangeset:a})=>{let o=e.model?.graph??null,s=jie(e.pendingChangeset,o,e.views);if(s.length===0&&e.commitNotice===null&&e.commitDiagnostics===null&&e.undoStack.length===0&&e.redoStack.length===0)return null;let{byRow:c,batch:l}=X_(e.commitDiagnostics??[]),u=e.commitStatus===`committing`;return(0,k.jsxs)(`section`,{className:`changeset-tray`,"aria-labelledby":`changeset-heading`,children:[(0,k.jsxs)(`div`,{className:`changeset-heading-row`,children:[(0,k.jsx)(`h2`,{id:`changeset-heading`,children:`Pending changes`}),(0,k.jsxs)(`div`,{className:`changeset-history-controls`,children:[(0,k.jsx)(`button`,{type:`button`,className:`changeset-undo`,disabled:e.undoStack.length===0,onClick:r,children:`Undo`}),(0,k.jsx)(`button`,{type:`button`,className:`changeset-redo`,disabled:e.redoStack.length===0,onClick:i,children:`Redo`}),s.length===0?null:(0,k.jsx)(`button`,{type:`button`,className:`changeset-discard-all`,onClick:n,children:`Discard all`})]})]}),e.commitDiagnostics===null||e.commitDiagnostics.length===0||o===null?null:(0,k.jsx)(`p`,{className:`changeset-fault-summary`,role:`status`,children:(()=>{let t=kie(e.commitDiagnostics,o);return`${t.total} problem${t.total===1?``:`s`}: ${t.onCanvas} marked on the diagram, ${t.elsewhere} not on it.`})()}),l.length===0?null:(0,k.jsx)(`ul`,{className:`changeset-batch-diagnostics`,role:`alert`,children:l.map(e=>(0,k.jsx)(Fie,{diagnostic:e},`${e.code}-${e.pointer}`))}),s.length===0?null:(0,k.jsx)(`ol`,{className:`changeset-rows`,children:s.map((n,r)=>(0,k.jsx)(Z_,{index:r,row:n,diagnostics:c.get(r)??[],conflict:Pie(r<e.pendingChangeset.operations.length?e.pendingChangeset.operations[r].document:e.pendingChangeset.viewOperations[r-e.pendingChangeset.operations.length].path,e.pendingChangeset.sourceDigests,e.model),onDiscard:()=>t(r)},r))}),(0,k.jsx)(`div`,{className:`changeset-actions`,children:(0,k.jsx)(`button`,{type:`button`,className:`changeset-commit`,disabled:s.length===0||u,"aria-busy":u,onClick:a,children:u?`Committing…`:`Commit changes`})}),e.commitNotice===null?null:(0,k.jsxs)(`div`,{className:`changeset-notice`,role:`status`,children:[(0,k.jsxs)(`p`,{children:[`Committed · `,e.commitNotice.length,` `,e.commitNotice.length===1?`file`:`files`]}),(0,k.jsx)(`ul`,{children:e.commitNotice.map(e=>(0,k.jsx)(`li`,{children:e},e))})]})]})},Q_=e=>e.slice(e.lastIndexOf(`#`)+1),$_={a:`access`,c:`composition`,f:`flow`,g:`aggregation`,i:`assignment`,n:`influence`,o:`association`,r:`realization`,s:`specialization`,t:`triggering`,v:`serving`},ev=`applicationCollaboration.applicationComponent.applicationEvent.applicationFunction.applicationInteraction.applicationInterface.applicationProcess.applicationService.artifact.assessment.businessActor.businessCollaboration.businessEvent.businessFunction.businessInteraction.businessInterface.businessObject.businessProcess.businessRole.businessService.capability.communicationNetwork.constraint.contract.courseOfAction.dataObject.deliverable.device.distributionNetwork.driver.equipment.facility.gap.goal.grouping.implementationEvent.andJunction.orJunction.location.material.meaning.node.outcome.path.plateau.principle.product.representation.requirement.resource.stakeholder.systemSoftware.technologyCollaboration.technologyEvent.technologyFunction.technologyInteraction.technologyInterface.technologyProcess.technologyService.value.valueStream.workPackage`.split(`.`),tv={applicationCollaboration:`cfgostv fgortv fiortv fiortv fiortv cfgortv fiortv fiortv ao no fotv fotv fortv fortv fortv fortv ao fortv fotv fortv or fotv nor ao or ao o fotv fotv no fotv fotv o nor acfginorstv o acfginorstv acfginorstv fotv ao no fotv nor fotv o nor fotv ao nor or no fotv fotv fotv fotv fotv fotv fotv fotv no or o`,applicationComponent:`fotv cfgorstv fiortv fiortv fiortv cfgortv fiortv fiortv ao no fotv fotv fortv fortv fortv fortv ao fortv fotv fortv or fotv nor ao or ao o fotv fotv no fotv fotv o nor acfginorstv o acfginorstv acfginorstv fotv ao no fotv nor fotv o nor fotv ao nor or no fotv fotv fotv fotv fotv fotv fotv fotv no or o`,applicationEvent:`fotv fotv cfgostv fotv fotv fotv fotv fotv ao no fotv fotv fortv fotv fotv fotv ao fotv fotv fotv o fotv nor ao o ao o fotv fotv no fotv fotv o nor acfgnorstv o acfginorstv acfginorstv fotv ao no fotv nor fotv o nor fotv ao nor o no fotv fotv fotv fotv fotv fotv fotv fotv no o o`,applicationFunction:`fotv fotv fotv cfgostv cfgotv fotv cfgotv fortv ao no fotv fotv fotv fortv fortv fotv ao fortv fotv fortv or fotv nor ao or ao o fotv fotv no fotv fotv o nor acfgnorstv o acfginorstv acfginorstv fotv ao no fotv nor fotv o nor fotv ao nor o no fotv fotv fotv fotv fotv fotv fotv fotv no or o`,applicationInteraction:`fotv fotv fotv cfgotv cfgostv fotv cfgotv fortv ao no fotv fotv fotv fortv fortv fotv ao fortv fotv fortv or fotv nor ao or ao o fotv fotv no fotv fotv o nor acfgnorstv o acfginorstv acfginorstv fotv ao no fotv nor fotv o nor fotv ao nor o no fotv fotv fotv fotv fotv fotv fotv fotv no or o`,applicationInterface:`fotv fotv fotv fotv fotv cfgostv fotv fiotv ao no fotv fotv fotv fotv fotv fortv ao fotv fotv fortv or fotv nor ao or ao o fotv fotv no fotv fotv o nor acfginorstv o acfginorstv acfginorstv fotv ao no fotv nor fotv o nor fotv ao nor or no fotv fotv fotv fotv fotv fotv fotv fotv no or o`,applicationProcess:`fotv fotv fotv cfgotv cfgotv fotv cfgostv fortv ao no fotv fotv fotv fortv fortv fotv ao fortv fotv fortv or fotv nor ao or ao o fotv fotv no fotv fotv o nor acfgnorstv o acfginorstv acfginorstv fotv ao no fotv nor fotv o nor fotv ao nor o no fotv fotv fotv fotv fotv fotv fotv fotv no or o`,applicationService:`fotv fotv fotv fotv fotv fotv fotv cfgostv ao no fotv fotv fotv fotv fotv fotv ao fotv fotv fortv or fotv nor ao or ao o fotv fotv no fotv fotv o nor acfgnorstv o acfginorstv acfginorstv fotv ao no fotv nor fotv o nor fotv ao nor o no fotv fotv fotv fotv fotv fotv fotv fotv no or o`,artifact:`or or or or or or or or cgors no o o or or or or or or o or or o nor or or or o o o no o o o nor cgnors o acfginorstv acfginorstv o o no o nor o o nor o o nor or no or o or or or or or or no or o`,assessment:`o o o o o o o o o cgnos o o o o o o o o o o o o no o o o o o o no o o o no cgnos o acfginorstv acfginorstv o o no o no o o no o o no o no o o o o o o o o no o o`,businessActor:`fotv fotv fotv fotv fotv fotv fotv fotv ao no cfgostv fotv fiotv fiotv fiotv cfgiotv ao fiotv fiotv fiortv or fotv nor ao or ao o fotv fotv no fotv fotv o nor acfginorstv io acfginorstv acfginorstv fotv ao no fotv nor fotv o nor fotv ao nor or ino fotv fotv fotv fotv fotv fotv fotv fotv no or io`,businessCollaboration:`fotv fotv fotv fotv fotv fotv fotv fotv ao no fgotv cfgostv fiotv fiotv fiotv cfgiotv ao fiotv fgiotv fiortv or fotv nor ao or ao o fotv fotv no fotv fotv o nor acfginorstv io acfginorstv acfginorstv fotv ao no fotv nor fotv o nor fotv ao nor or ino fotv fotv fotv fotv fotv fotv fotv fotv no or io`,businessEvent:`fotv fotv fotv fotv fotv fotv fotv fotv ao no fotv fotv cfgostv fotv fotv fotv ao fotv fotv fotv o fotv nor ao o ao o fotv fotv no fotv fotv o nor acfgnorstv o acfginorstv acfginorstv fotv ao no fotv nor fotv o nor fotv ao nor o no fotv fotv fotv fotv fotv fotv fotv fotv no o o`,businessFunction:`fotv fotv fotv fotv fotv fotv fotv fotv ao no fotv fotv fotv cfgostv cfgotv fotv ao cfgotv fotv fortv or fotv nor ao or ao o fotv fotv no fotv fotv o nor acfgnorstv o acfginorstv acfginorstv fotv ao no fotv nor fotv o nor fotv ao nor o no fotv fotv fotv fotv fotv fotv fotv fotv no or o`,businessInteraction:`fotv fotv fotv fotv fotv fotv fotv fotv ao no fotv fotv fotv cfgotv cfgostv fotv ao cfgotv fotv fortv or fotv nor ao or ao o fotv fotv no fotv fotv o nor acfgnorstv o acfginorstv acfginorstv fotv ao no fotv nor fotv o nor fotv ao nor o no fotv fotv fotv fotv fotv fotv fotv fotv no or o`,businessInterface:`fotv fotv fotv fotv fotv fotv fotv fotv ao no fotv fotv fotv fotv fotv cfgostv ao fotv fotv fiotv or fotv nor ao or ao o fotv fotv no fotv fotv o nor acfginorstv o acfginorstv acfginorstv fotv ao no fotv nor fotv o nor fotv ao nor or no fotv fotv fotv fotv fotv fotv fotv fotv no or o`,businessObject:`o o o o o o o o o no o o o o o o cgos o o o or o nor cgos or o o o o no o o o nor cgnors o acfginorstv acfginorstv o o no o nor o o nor o o nor or no o o o o o o o o no or o`,businessProcess:`fotv fotv fotv fotv fotv fotv fotv fotv ao no fotv fotv fotv cfgotv cfgotv fotv ao cfgostv fotv fortv or fotv nor ao or ao o fotv fotv no fotv fotv o nor acfgnorstv o acfginorstv acfginorstv fotv ao no fotv nor fotv o nor fotv ao nor o no fotv fotv fotv fotv fotv fotv fotv fotv no or o`,businessRole:`fotv fotv fotv fotv fotv fotv fotv fotv ao no fotv fotv fiotv fiotv fiotv cfgotv ao fiotv cfgostv fiortv or fotv nor ao or ao o fotv fotv no fotv fotv o nor acfginorstv io acfginorstv acfginorstv fotv ao no fotv nor fotv o nor fotv ao nor or ino fotv fotv fotv fotv fotv fotv fotv fotv no or io`,businessService:`fotv fotv fotv fotv fotv fotv fotv fotv ao no fotv fotv fotv fotv fotv fotv ao fotv fotv cfgostv or fotv nor ao or ao o fotv fotv no fotv fotv o nor acfgnorstv o acfginorstv acfginorstv fotv ao no fotv nor fotv o nor fotv ao nor o no fotv fotv fotv fotv fotv fotv fotv fotv no or o`,capability:`o o o o o o o o o no o o o o o o o o o o cfgostv o nor o fortv o o o o no o o o nor cfgnorstv o acfginorstv acfginorstv o o no o nor o o nor o o nor fotv no o o o o o o o o no fotv o`,communicationNetwork:`fortv fortv fortv fortv fortv fortv fortv fortv aio no fortv fortv fortv fortv fortv fortv ao fortv fortv fortv or cfgostv nor ao or ao o fgortv fotv no fortv fortv o nor acfginorstv o acfginorstv acfginorstv fotv ao no fortv nor fortv o nor fotv ao nor or nor fgiortv fortv fiortv fiortv fiortv fgiortv fiortv fiortv no or o`,constraint:`o o o o o o o o o no o o o o o o o o o o o o cgnos o o o o o o no o o o nor cgnors o acfginorstv acfginorstv o o no o nor o o nor o o cgnos o no o o o o o o o o no o o`,contract:`o o o o o o o o o no o o o o o o cgos o o o or o nor cgos or o o o o no o o o nor cgnors o acfginorstv acfginorstv o o no o nor o o nor o o nor or no o o o o o o o o no or o`,courseOfAction:`o o o o o o o o o no o o o o o o o o o o fotv o nor o cfgostv o o o o no o o o nor cfgnorstv o acfginorstv acfginorstv o o no o nor o o nor o o nor fotv no o o o o o o o o no fotv o`,dataObject:`o o o o o o o o o no o o o o o o or o o o or o nor or or cgos o o o no o o o nor cgnors o acfginorstv acfginorstv o o no o nor o o nor o o nor or no o o o o o o o o no or o`,deliverable:`or or or or or or or or or no or or or or or or or or or or or or nor or or or cgos or or no or or o nor cgnors o acfginorstv acfginorstv or or no or nor or or nor or or nor or nor or or or or or or or or no or o`,device:`fortv fortv fortv fortv fortv fortv fortv fortv aio no fotv fotv fortv fortv fortv fortv ao fortv fotv fortv or fotv nor ao or ao o cfgostv fotv no fotv fotv o nor acfginorstv o acfginorstv acfginorstv fotv ao no fotv nor fotv o nor fotv ao nor or no cfgiortv fotv fiortv fiortv fiortv cfgiortv fiortv fiortv no or o`,distributionNetwork:`fortv fortv fortv fortv fortv fortv fortv fortv aio no fiortv fiortv fiortv fiortv fiortv fiortv ao fiortv fiortv fiortv or fotv nor ao or ao o fgiortv cfgostv no fgiortv fgiortv o nor acfginorstv io acfginorstv acfginorstv fotv aio no fgiortv nor fortv o nor fotv ao nor or inor fgiortv fortv fiortv fiortv fiortv fgiortv fiortv fiortv no or io`,driver:`o o o o o o o o o no o o o o o o o o o o o o no o o o o o o cgnos o o o no cgnos o acfginorstv acfginorstv o o no o no o o no o o no o no o o o o o o o o no o o`,equipment:`fortv fortv fortv fortv fortv fortv fortv fortv aio no fotv fotv fortv fortv fortv fortv ao fortv fotv fortv or fotv nor ao or ao o cfgortv fotv no cfgorstv fotv o nor acfginorstv o acfginorstv acfginorstv fotv aio no fotv nor fotv o nor fotv ao nor or no cfgiortv fotv fiortv fiortv fiortv cfgiortv fiortv fiortv no or o`,facility:`fortv fortv fortv fortv fortv fortv fortv fortv aio no fiotv fiotv fiortv fiortv fiortv fiortv ao fiortv fiotv fiortv or fotv nor ao or ao o cfgiortv fotv no cfgiortv cfgiostv o nor acfginorstv io acfginorstv acfginorstv fotv aio no cfgiotv nor fotv o nor fotv ao nor or ino cfgiortv fotv fiortv fiortv fiortv cfgiortv fiortv fiortv no or io`,gap:`o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o cgos o cgos o acfginorstv acfginorstv o o o o o o o o o o o o o o o o o o o o o o o o`,goal:`o o o o o o o o o no o o o o o o o o o o o o no o o o o o o no o o o cgnos cgnos o acfginorstv acfginorstv o o no o no o o no o o no o no o o o o o o o o no o o`,grouping:`cfgorstv cfgorstv cfgiorstv cfgiorstv cfgiorstv cfgorstv cfgiorstv cfgiorstv acgiors cgnos cfgiorstv cfgiorstv cfgiorstv cfgiorstv cfgiorstv cfgiorstv acgors cfgiorstv cfgiorstv cfgiorstv cfgiorstv cfgorstv cgnors acgors cfgorstv acgors acgors cfgiorstv cfgorstv cgnos cfgiorstv cfgiorstv cgos cgnors acfginorstv cfgiost acfginorstv acfginorstv cfgorstv acgiors cgnos cfgiorstv cgnors cfgorstv cfgorst cgnors cfgorstv acgors cgnors cfgorstv cginors cfgiorstv cfgorstv cfgiorstv cfgiorstv cfgiorstv cfgiorstv cfgiorstv cfgiorstv cgnos cfgiorstv cfgiost`,implementationEvent:`o o o o o o o o o no o o o o o o o o o o o o no o o o ao o o no o o o no acfgnost cfgost acfginorstv acfginorstv o o no o no o fot no o o no o no o o o o o o o o no o fot`,andJunction:`fortv fortv fiortv fiortv fiortv fortv fiortv fiortv aior no fiortv fiortv fiortv fiortv fiortv fiortv aor fiortv fiortv fiortv fiortv fortv nor aor fortv aor aor fiortv fortv no fiortv fiortv o nor afinortv fiot acfginorstv acfginorstv fortv aior no fiortv nor fortv fort nor fortv aor nor fortv inor fiortv fortv fiortv fiortv fiortv fiortv fiortv fiortv no fiortv fiot`,orJunction:`fortv fortv fiortv fiortv fiortv fortv fiortv fiortv aior no fiortv fiortv fiortv fiortv fiortv fiortv aor fiortv fiortv fiortv fiortv fortv nor aor fortv aor aor fiortv fortv no fiortv fiortv o nor afinortv fiot acfginorstv acfginorstv fortv aior no fiortv nor fortv fort nor fortv aor nor fortv inor fiortv fortv fiortv fiortv fiortv fiortv fiortv fiortv no fiortv fiot`,location:`cfgortv cfgortv cfgiortv cfgiortv cfgiortv cfgortv cfgiortv cfgiortv acgio cgno cfgiortv cfgiortv cfgiortv cfgiortv cfgiortv cfgiortv acgo cfgiortv cfgiortv cfgiortv cgor cfgotv cgnor acgo cgor acgo cgo cfgiortv cfgotv cgno cfgiortv cfgiortv cgo cgnor acfginorstv cgio acfginorstv acfginorstv cfgostv acgio cgno cfgiortv cgnor cfgortv cgo cgnor cfgotv acgo cgnor cgor cginor cfgiortv cfgortv cfgiortv cfgiortv cfgiortv cfgiortv cfgiortv cfgiortv cgno cgor cgio`,material:`or or or or or or or or or no o o or or or or or or o or or o nor or or or o or o no or o o nor cgnors o acfginorstv acfginorstv o cgors no o nor o o nor o o nor or no or o or or or or or or no or o`,meaning:`o o o o o o o o o no o o o o o o o o o o o o no o o o o o o no o o o no cgnos o acfginorstv acfginorstv o o cgnos o no o o no o o no o no o o o o o o o o no o o`,node:`fortv fortv fortv fortv fortv fortv fortv fortv aio no fiotv fiotv fiortv fiortv fiortv fiortv ao fiortv fiotv fiortv or fotv nor ao or ao o cfgiortv fotv no cfgiortv cfgiotv o nor acfginorstv io acfginorstv acfginorstv fotv aio no cfgiostv nor fotv o nor fotv ao nor or ino cfgiortv fotv fiortv fiortv fiortv cfgiortv fiortv fiortv no or io`,outcome:`o o o o o o o o o no o o o o o o o o o o o o no o o o o o o no o o o nor cgnors o acfginorstv acfginorstv o o no o cgnos o o no o o no o no o o o o o o o o no o o`,path:`fortv fortv fortv fortv fortv fortv fortv fortv aio no fiotv fiotv fiortv fiortv fiortv fiortv ao fiortv fiotv fiortv or fotv nor ao or ao o fgiortv fotv no fgiortv fgiotv o nor acfginorstv io acfginorstv acfginorstv fotv aio no fgiotv nor cfgostv o nor fotv ao nor or ino fgiortv fgotv fiortv fiortv fiortv fgiortv fiortv fiortv no or io`,plateau:`cgor cgor cgor cgor cgor cgor cgor cgor cgor no cgor cgor cgor cgor cgor cgor cgor cgor cgor cgor cgor cgor cgnor cgor cgor cgor ao cgor cgor no cgor cgor o cgnor acfginorst fot acfginorstv acfginorstv cgor cgor no cgor cgnor cgor cfgost nor cgor cgor cgnor cgor inor cgor cgor cgor cgor cgor cgor cgor cgor no cgor fot`,principle:`o o o o o o o o o no o o o o o o o o o o o o no o o o o o o no o o o nor cgnors o acfginorstv acfginorstv o o no o nor o o cgnos o o no o no o o o o o o o o no o o`,product:`fortv fortv fortv fortv fortv fortv fortv cfgortv acgo no fotv fotv fortv fortv fortv fortv acgo fortv fotv cfgortv or fotv nor acgo or acgo o fortv fotv no fortv fotv o nor acfgnorstv o acfginorstv acfginorstv fotv acgo no fotv nor fotv o nor cfgostv acgo nor or no fortv fotv fortv fortv fortv fortv fortv cfgortv no or o`,representation:`o o o o o o o o o no o o o o o o or o o o or o nor or or o o o o no o o o nor cgnors o acfginorstv acfginorstv o o no o nor o o nor o cgos nor or no o o o o o o o o no or o`,requirement:`o o o o o o o o o no o o o o o o o o o o o o cgnos o o o o o o no o o o nor cgnors o acfginorstv acfginorstv o o no o nor o o nor o o cgnos o no o o o o o o o o no o o`,resource:`o o o o o o o o o no o o o o o o o o o o fiotv o nor o fortv o o o o no o o o nor cfginorstv o acfginorstv acfginorstv o o no o nor o o nor o o nor cfgostv no o o o o o o o o no fiotv o`,stakeholder:`o o o o o o o o o no o o o o o o o o o o o o no o o o o o o no o o o no cgnos o acfginorstv acfginorstv o o no o no o o no o o no o cgnos o o o o o o o o no o o`,systemSoftware:`fortv fortv fortv fortv fortv fortv fortv fortv aio no fotv fotv fortv fortv fortv fortv ao fortv fotv fortv or fotv nor ao or ao o fotv fotv no fotv fotv o nor acfginorstv o acfginorstv acfginorstv fotv ao no fotv nor fotv o nor fotv ao nor or no cfgiorstv fotv fiortv fiortv fiortv cfgiortv fiortv fiortv no or o`,technologyCollaboration:`fortv fortv fortv fortv fortv fortv fortv fortv aio no fiotv fiotv fiortv fiortv fiortv fiortv ao fiortv fiotv fiortv or fotv nor ao or ao o fgiortv fotv no fgiortv fgiotv o nor acfginorstv io acfginorstv acfginorstv fotv aio no fgiotv nor fotv o nor fotv ao nor or ino fgiortv cfgostv fiortv fiortv fiortv cfgiortv fiortv fiortv no or io`,technologyEvent:`fotv fotv fortv fotv fotv fotv fotv fotv ao no fotv fotv fortv fotv fotv fotv ao fotv fotv fotv o fotv nor ao o ao o fotv fotv no fotv fotv o nor acfgnorstv o acfginorstv acfginorstv fotv ao no fotv nor fotv o nor fotv ao nor o no fotv fotv cfgostv fotv fotv fotv fotv fotv no o o`,technologyFunction:`fotv fotv fotv fortv fortv fotv fortv fortv ao no fotv fotv fotv fortv fortv fotv ao fortv fotv fortv or fotv nor ao or ao o fotv fotv no fotv fotv o nor acfgnorstv o acfginorstv acfginorstv fotv ao no fotv nor fotv o nor fotv ao nor o no fotv fotv fotv cfgostv cfgotv fotv cfgotv fortv no or o`,technologyInteraction:`fotv fotv fotv fortv fortv fotv fortv fortv ao no fotv fotv fotv fortv fortv fotv ao fortv fotv fortv or fotv nor ao or ao o fotv fotv no fotv fotv o nor acfgnorstv o acfginorstv acfginorstv fotv ao no fotv nor fotv o nor fotv ao nor o no fotv fotv fotv cfgotv cfgostv fotv cfgotv fortv no or o`,technologyInterface:`fotv fotv fotv fotv fotv fortv fotv fortv ao no fotv fotv fotv fotv fotv fortv ao fotv fotv fortv or fotv nor ao or ao o fotv fotv no fotv fotv o nor acfginorstv o acfginorstv acfginorstv fotv ao no fotv nor fotv o nor fotv ao nor or no fotv fotv fotv fotv fotv cfgostv fotv fiotv no or o`,technologyProcess:`fotv fotv fotv fortv fortv fotv fortv fortv ao no fotv fotv fotv fortv fortv fotv ao fortv fotv fortv or fotv nor ao or ao o fotv fotv no fotv fotv o nor acfgnorstv o acfginorstv acfginorstv fotv ao no fotv nor fotv o nor fotv ao nor o no fotv fotv fotv cfgotv cfgotv fotv cfgostv fortv no or o`,technologyService:`fotv fotv fotv fotv fotv fotv fotv fortv ao no fotv fotv fotv fotv fotv fotv ao fotv fotv fortv or fotv nor ao or ao o fotv fotv no fotv fotv o nor acfgnorstv o acfginorstv acfginorstv fotv ao no fotv nor fotv o nor fotv ao nor o no fotv fotv fotv fotv fotv fotv fotv cfgostv no or o`,value:`o o o o o o o o o no o o o o o o o o o o o o no o o o o o o no o o o no cgnos o acfginorstv acfginorstv o o no o no o o no o o no o no o o o o o o o o cgnos o o`,valueStream:`o o o o o o o o o no o o o o o o o o o o fotv o nor o fortv o o o o no o o o nor cfgnorstv o acfginorstv acfginorstv o o no o nor o o nor o o nor fotv no o o o o o o o o no cfgostv o`,workPackage:`or or or or or or or or or no or or or or or or or or or or or or nor or or or aor or or no or or o nor acfgnorst fot acfginorstv acfginorstv or or no or nor or fort nor or or nor or nor or or or or or or or or no or cfgost`},nv=new Map(ev.map((e,t)=>[e,t])),rv=new Map(Object.entries($_)),iv=new Map;for(let e of ev){let t=tv[e].split(` `);for(let[n,r]of ev.entries()){let i=t[n]??`-`,a=new Set;for(let e of i){let t=rv.get(e);t!==void 0&&a.add(t)}iv.set(`${e}>${r}`,a)}}var Lie=new Set,av=e=>nv.has(e),ov=(e,t)=>iv.get(`${e}>${t}`)??Lie;new Map(ah.map(e=>[e.id,e.aspect]));var sv=sne,cv=(e,t,n)=>{let r=e.nodes.find(e=>e.id===t),i=e.nodes.find(e=>e.id===n);if(r===void 0||i===void 0||!av(r.coreKindLabel)||!av(i.coreKindLabel))return[];let a=[...ov(r.coreKindLabel,i.coreKindLabel)].sort();if(r.portKinds.length===0||i.portKinds.length===0)return a;let o=new Set(i.portKinds),s=a.filter(e=>r.portKinds.includes(e)&&o.has(e));return s.length===0?a:s},lv=(e,t,n,r,i=[])=>{let a=new Set([...e.nodes.map(e=>e.id),...e.edges.map(e=>e.id),...i]),o=`${t}-${n}-${r}`;if(!a.has(o))return o;for(let e=2;;e+=1){let t=`${o}-${e}`;if(!a.has(t))return t}},uv=(e,t,n,r,i=[])=>{if(!cv(e,t,r).includes(n))return null;let a=e.nodes.find(e=>e.id===t);return a===void 0?null:{op:`add-relationship`,document:a.document,relationship:{id:lv(e,t,n,r,i),kind:n,from:t,to:r}}},dv=e=>e.flatMap(e=>{let t=e.op===`rename-concept`||e.op===`rename-relationship`?[e.to]:[];return`relationship`in e?[e.relationship.id,...t]:`concept`in e?[e.concept.id,...t]:t}),fv=(e,t,n,r)=>{let i=new Set(cv(e,t.from,t.to));if(i.size===0)return{options:n,narrowed:!1};let a=new Set(sv);return{options:n.filter(e=>i.has(e.coreLabel)||!a.has(e.coreLabel)||e.label===r),narrowed:!0}},pv=[`kind`,`name`,`description`,`status`,`owner`],mv=[`aka`,`constraints`,`references`,`presentIn`,`attestations`,`distinctFrom`,`supersedes`],hv=[`kind`,`from`,`to`,`name`,`description`,`status`,`mode`,`content`],gv=[`references`,`presentIn`],_v=(e,t)=>{if(e===t)return!0;if(e===null||t===null||typeof e!=`object`||typeof t!=`object`)return!1;if(Array.isArray(e)||Array.isArray(t))return!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length?!1:e.every((e,n)=>_v(e,t[n]));let n=e,r=t,i=Object.keys(n),a=Object.keys(r);return i.length===a.length&&i.every(e=>_v(n[e],r[e]))},Rie=(e,t)=>t===(e??``)?{kind:`none`}:t===``?{kind:`remove`}:{kind:`set`,value:t},vv=(e,t)=>_v(e,t)?{kind:`none`}:t.length>=e.length&&e.every((e,n)=>_v(e,t[n]))?{kind:`append`,added:t.slice(e.length)}:{kind:`replace`,next:t},zie=(e,t,n,r,i)=>r?{op:`update-concept`,document:e,concept:{id:t,[n]:i}}:{op:`update-concept`,document:e,concept:{id:t},remove:[n]},yv=(e,t,n,r)=>r===null?{op:`update-concept`,document:e,concept:{id:t},remove:[n]}:{op:`update-concept`,document:e,concept:{id:t,[n]:r}},bv=(e,t,n,r,i)=>r?{op:`update-relationship`,document:e,relationship:{id:t,[n]:i}}:{op:`update-relationship`,document:e,relationship:{id:t},remove:[n]},xv=(e,t,n,r)=>r===null?{op:`update-relationship`,document:e,relationship:{id:t},remove:[n]}:{op:`update-relationship`,document:e,relationship:{id:t,[n]:r}},Sv=(e,t,n,r,i)=>{let a=Rie(r,i);return a.kind===`none`?[]:a.kind===`remove`?[zie(e,t,n,!1,``)]:[zie(e,t,n,!0,a.value)]},Cv=(e,t,n,r,i)=>{let a=Rie(r,i);return a.kind===`none`?[]:a.kind===`remove`?[bv(e,t,n,!1,``)]:[bv(e,t,n,!0,a.value)]},wv=(e,t,n,r,i)=>{let a=vv(r,i);if(a.kind===`none`)return[];if(a.kind===`append`)return a.added.length===0?[]:[yv(e,t,n,a.added)];let o=[yv(e,t,n,null)];return a.next.length>0&&o.push(yv(e,t,n,a.next)),o},Bie=(e,t,n,r,i)=>{let a=vv(r,i);if(a.kind===`none`)return[];if(a.kind===`append`)return a.added.length===0?[]:[xv(e,t,n,a.added)];let o=[xv(e,t,n,null)];return a.next.length>0&&o.push(xv(e,t,n,a.next)),o},Vie=e=>e.expects===null?{id:e.id,ref:e.ref}:{id:e.id,ref:e.ref,expects:e.expects},Tv=(e,t,n,r)=>{let i=vv(n,r);if(i.kind===`none`)return[];if(i.kind===`append`)return i.added.length===0?[]:[yv(e,t,`constraints`,i.added.map(Vie))];let a=[yv(e,t,`constraints`,null)];return i.next.length>0&&a.push(yv(e,t,`constraints`,i.next.map(Vie))),a},Ev=e=>({topic:e.topic,by:e.by,recordedBy:e.recordedBy??``,on:e.on}),Dv=(e,t,n,r)=>{let i=vv(n,r);if(i.kind===`none`)return[];if(i.kind===`append`)return i.added.length===0?[]:[yv(e,t,`attestations`,i.added.map(Ev))];let a=[yv(e,t,`attestations`,null)];return i.next.length>0&&a.push(yv(e,t,`attestations`,i.next.map(Ev))),a},Ov=(e,t)=>{let n={...e},r=t.concept;for(let e of pv)r[e]!==void 0&&(n[e]=r[e]);for(let e of mv){let t=r[e];t!==void 0&&t.length>0&&(n[e]=[...n[e],...t])}for(let e of t.remove??[])n[e]=mv.includes(e)?[]:null;return n},kv=(e,t)=>{let n=e;for(let r of t)r.op===`update-concept`&&r.document===e.document&&r.concept.id===e.localId&&(n=Ov(n,r));return n},Hie=(e,t)=>{let n={...e},r=t.relationship;for(let e of hv)r[e]!==void 0&&(n[e]=r[e]);for(let e of gv){let t=r[e];t!==void 0&&t.length>0&&(n[e]=[...n[e],...t])}for(let e of t.remove??[])n[e]=gv.includes(e)?[]:null;return n},Uie=(e,t)=>{let n=e;for(let r of t)r.op===`update-relationship`&&r.document===e.document&&r.relationship.id===e.localId&&(n=Hie(n,r));return n},Av=({label:e,value:t,options:n,onCommit:r})=>(0,k.jsxs)(`label`,{className:`subject-form-field`,children:[(0,k.jsx)(`span`,{className:`subject-form-label`,children:e}),(0,k.jsx)(`select`,{value:t,onChange:e=>r(e.target.value),children:n.map(e=>(0,k.jsx)(`option`,{value:e.value,children:e.label},e.value))})]}),jv=({label:e,value:t,onCommit:n})=>{let[r,i]=(0,v.useState)(t);return(0,v.useEffect)(()=>i(t),[t]),(0,k.jsxs)(`label`,{className:`subject-form-field`,children:[(0,k.jsx)(`span`,{className:`subject-form-label`,children:e}),(0,k.jsx)(`input`,{type:`text`,value:r,onChange:e=>i(e.target.value),onBlur:()=>n(r)})]})},Mv=({label:e,values:t,emptyRow:n,isRowFilled:r,renderRow:i,onCommit:a})=>{let[o,s]=(0,v.useState)(t);(0,v.useEffect)(()=>s(t),[t]);let c=e=>{s(e),a(e.filter(r))};return(0,k.jsxs)(`div`,{className:`subject-form-field subject-form-list`,children:[(0,k.jsx)(`span`,{className:`subject-form-label`,children:e}),o.map((e,t)=>(0,k.jsxs)(`div`,{className:`subject-form-row`,children:[i(e,{set:e=>s(o.map((n,r)=>r===t?e:n)),commit:()=>c(o),replace:e=>c(o.map((n,r)=>r===t?e:n))}),(0,k.jsx)(`button`,{type:`button`,className:`subject-form-row-remove`,onClick:()=>c(o.filter((e,n)=>n!==t)),children:`Remove`})]},t)),(0,k.jsxs)(`button`,{type:`button`,className:`subject-form-row-add`,onClick:()=>s([...o,n]),children:[`Add `,e]})]})},Nv=({label:e,values:t,onCommit:n})=>(0,k.jsx)(Mv,{label:e,values:t,emptyRow:``,isRowFilled:e=>e.trim()!==``,onCommit:n,renderRow:(e,{set:t,commit:n})=>(0,k.jsx)(`input`,{type:`text`,value:e,onChange:e=>t(e.target.value),onBlur:n})}),Pv={id:``,ref:``},Fv=({label:e,values:t,onCommit:n})=>(0,k.jsx)(Mv,{label:e,values:t,emptyRow:Pv,isRowFilled:e=>e.id.trim()!==``&&e.ref.trim()!==``,onCommit:n,renderRow:(e,{set:t,commit:n})=>(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(`input`,{type:`text`,placeholder:`id`,value:e.id,onChange:n=>t({...e,id:n.target.value}),onBlur:n}),(0,k.jsx)(`input`,{type:`text`,placeholder:`ref`,value:e.ref,onChange:n=>t({...e,ref:n.target.value}),onBlur:n})]})}),M={id:``,ref:``,expects:null},Iv=({label:e,values:t,onCommit:n})=>(0,k.jsx)(Mv,{label:e,values:t,emptyRow:M,isRowFilled:e=>e.id.trim()!==``&&e.ref.trim()!==``,onCommit:n,renderRow:(e,{set:t,commit:n,replace:r})=>(0,k.jsxs)(`div`,{className:`subject-form-row-body`,children:[(0,k.jsx)(`input`,{type:`text`,placeholder:`id`,value:e.id,onChange:n=>t({...e,id:n.target.value}),onBlur:n}),(0,k.jsx)(`input`,{type:`text`,placeholder:`ref`,value:e.ref,onChange:n=>t({...e,ref:n.target.value}),onBlur:n}),(0,k.jsxs)(`label`,{className:`subject-form-toggle`,children:[(0,k.jsx)(`input`,{type:`checkbox`,checked:e.expects!==null,onChange:t=>r({...e,expects:t.target.checked?{provider:``,key:``,value:``}:null})}),`Expects`]}),e.expects===null?null:(0,k.jsxs)(`div`,{className:`subject-form-row-body`,children:[(0,k.jsx)(`input`,{type:`text`,placeholder:`provider`,value:e.expects.provider,onChange:n=>e.expects!==null&&t({...e,expects:{...e.expects,provider:n.target.value}}),onBlur:n}),(0,k.jsx)(`input`,{type:`text`,placeholder:`key`,value:e.expects.key,onChange:n=>e.expects!==null&&t({...e,expects:{...e.expects,key:n.target.value}}),onBlur:n}),(0,k.jsx)(`input`,{type:`text`,placeholder:`value`,value:e.expects.value,onChange:n=>e.expects!==null&&t({...e,expects:{...e.expects,value:n.target.value}}),onBlur:n})]})]})}),Wie={topic:``,by:``,on:``,recordedBy:null},Gie=({label:e,values:t,onCommit:n})=>(0,k.jsx)(Mv,{label:e,values:t,emptyRow:Wie,isRowFilled:e=>e.topic.trim()!==``&&e.by.trim()!==``&&e.on.trim()!==``,onCommit:n,renderRow:(e,{set:t,commit:n})=>(0,k.jsxs)(`div`,{className:`subject-form-row-body`,children:[(0,k.jsx)(`input`,{type:`text`,placeholder:`topic`,value:e.topic,onChange:n=>t({...e,topic:n.target.value}),onBlur:n}),(0,k.jsx)(`input`,{type:`text`,placeholder:`by`,value:e.by,onChange:n=>t({...e,by:n.target.value}),onBlur:n}),(0,k.jsx)(`input`,{type:`text`,placeholder:`on`,value:e.on,onChange:n=>t({...e,on:n.target.value}),onBlur:n}),(0,k.jsx)(`input`,{type:`text`,placeholder:`recorded by`,value:e.recordedBy??``,onChange:n=>t({...e,recordedBy:n.target.value}),onBlur:n})]})}),Kie={value:``,label:`— unset —`},qie=[Kie,{value:`planned`,label:`planned`},{value:`current`,label:`current`},{value:`retired`,label:`retired`}],Jie=[Kie,{value:`read`,label:`read`},{value:`write`,label:`write`},{value:`read-write`,label:`read-write`},{value:`unspecified`,label:`unspecified`}],Lv=(e,t)=>t.find(t=>t.id===e)?.label??Q_(e),Yie=({node:e,model:t,operations:n,onStageChange:r})=>{let i=kv(e,n),a=e.document,o=e.localId,s=e=>e.forEach(r),c=t.vocabulary.conceptKinds.map(e=>({value:e.label,label:e.label})),l=Lv(i.kind,t.vocabulary.conceptKinds);return(0,k.jsxs)(`div`,{className:`subject-form`,children:[(0,k.jsxs)(`div`,{className:`subject-form-field`,children:[(0,k.jsx)(`span`,{className:`subject-form-label`,children:`Identity`}),(0,k.jsx)(`code`,{children:e.id})]}),(0,k.jsx)(Av,{label:`Kind`,value:l,options:c,onCommit:e=>s(Sv(a,o,`kind`,l,e))}),(0,k.jsx)(jv,{label:`Name`,value:i.name,onCommit:e=>s(Sv(a,o,`name`,i.name,e))}),(0,k.jsx)(jv,{label:`Description`,value:i.description??``,onCommit:e=>s(Sv(a,o,`description`,i.description,e))}),(0,k.jsx)(Av,{label:`Status`,value:i.status??``,options:qie,onCommit:e=>s(Sv(a,o,`status`,i.status,e))}),(0,k.jsx)(jv,{label:`Owner`,value:i.owner??``,onCommit:e=>s(Sv(a,o,`owner`,i.owner,e))}),(0,k.jsx)(Nv,{label:`Aka`,values:i.aka,onCommit:e=>s(wv(a,o,`aka`,i.aka,e))}),(0,k.jsx)(Nv,{label:`Distinct from`,values:i.distinctFrom,onCommit:e=>s(wv(a,o,`distinctFrom`,i.distinctFrom,e))}),(0,k.jsx)(Nv,{label:`Supersedes`,values:i.supersedes,onCommit:e=>s(wv(a,o,`supersedes`,i.supersedes,e))}),(0,k.jsx)(Nv,{label:`Present in`,values:i.presentIn,onCommit:e=>s(wv(a,o,`presentIn`,i.presentIn,e))}),(0,k.jsx)(Fv,{label:`References`,values:i.references,onCommit:e=>s(wv(a,o,`references`,i.references,e))}),(0,k.jsx)(Iv,{label:`Constraints`,values:i.constraints,onCommit:e=>s(Tv(a,o,i.constraints,e))}),(0,k.jsx)(Gie,{label:`Attestations`,values:i.attestations,onCommit:e=>s(Dv(a,o,i.attestations,e))})]})},Rv=({label:e,value:t})=>t===``?null:(0,k.jsxs)(`div`,{className:`subject-form-field`,children:[(0,k.jsx)(`span`,{className:`subject-form-label`,children:e}),(0,k.jsx)(`span`,{className:`subject-fact-value`,children:t})]}),Xie=({node:e,model:t})=>(0,k.jsxs)(`div`,{className:`subject-form subject-facts`,children:[(0,k.jsxs)(`div`,{className:`subject-form-field`,children:[(0,k.jsx)(`span`,{className:`subject-form-label`,children:`Identity`}),(0,k.jsx)(`code`,{children:e.id})]}),(0,k.jsx)(Rv,{label:`Kind`,value:Lv(e.kind,t.vocabulary.conceptKinds)}),(0,k.jsx)(Rv,{label:`Name`,value:e.name}),(0,k.jsx)(Rv,{label:`Status`,value:e.status??``}),(0,k.jsx)(Rv,{label:`Owner`,value:e.owner??``}),(0,k.jsx)(Rv,{label:`Aka`,value:e.aka.join(`, `)}),(0,k.jsx)(Rv,{label:`Distinct from`,value:e.distinctFrom.join(`, `)}),(0,k.jsx)(Rv,{label:`Supersedes`,value:e.supersedes.join(`, `)}),(0,k.jsx)(Rv,{label:`Present in`,value:e.presentIn.join(`, `)}),(0,k.jsx)(Rv,{label:`References`,value:e.references.map(e=>`${e.id}: ${e.ref}`).join(`; `)}),(0,k.jsx)(Rv,{label:`Constraints`,value:e.constraints.map(e=>`${e.id}: ${e.ref}`).join(`; `)}),(0,k.jsx)(Rv,{label:`Attestations`,value:e.attestations.map(e=>`${e.topic} by ${e.by} on ${e.on}`).join(`; `)})]}),Zie=({edge:e,model:t})=>{let n=e=>t.graph.nodes.find(t=>t.id===e)?.name??e;return(0,k.jsxs)(`div`,{className:`subject-form subject-facts`,children:[(0,k.jsxs)(`div`,{className:`subject-form-field`,children:[(0,k.jsx)(`span`,{className:`subject-form-label`,children:`Identity`}),(0,k.jsx)(`code`,{children:e.id})]}),(0,k.jsx)(Rv,{label:`Kind`,value:Lv(e.kind,t.vocabulary.relationshipKinds)}),(0,k.jsx)(Rv,{label:`From`,value:n(e.from)}),(0,k.jsx)(Rv,{label:`To`,value:n(e.to)}),(0,k.jsx)(Rv,{label:`Name`,value:e.name??``}),(0,k.jsx)(Rv,{label:`Mode`,value:e.mode??``}),(0,k.jsx)(Rv,{label:`Content`,value:e.content??``}),(0,k.jsx)(Rv,{label:`Status`,value:e.status??``}),(0,k.jsx)(Rv,{label:`References`,value:e.references.map(e=>`${e.id}: ${e.ref}`).join(`; `)}),(0,k.jsx)(Rv,{label:`Present in`,value:e.presentIn.join(`, `)})]})},Qie=({edge:e,model:t,operations:n,onStageChange:r})=>{let i=Uie(e,n),a=e.document,o=e.localId,s=e=>e.forEach(r),c=Lv(i.kind,t.vocabulary.relationshipKinds),l=fv(t.graph,{from:i.from,to:i.to},t.vocabulary.relationshipKinds,c).options.map(e=>({value:e.label,label:e.label})),u=t.graph.nodes.map(e=>({value:e.id,label:e.name}));return(0,k.jsxs)(`div`,{className:`subject-form`,children:[(0,k.jsxs)(`div`,{className:`subject-form-field`,children:[(0,k.jsx)(`span`,{className:`subject-form-label`,children:`Identity`}),(0,k.jsx)(`code`,{children:e.id})]}),(0,k.jsx)(Av,{label:`Kind`,value:c,options:l,onCommit:e=>s(Cv(a,o,`kind`,c,e))}),(0,k.jsx)(Av,{label:`From`,value:i.from,options:u,onCommit:e=>s(Cv(a,o,`from`,i.from,e))}),(0,k.jsx)(Av,{label:`To`,value:i.to,options:u,onCommit:e=>s(Cv(a,o,`to`,i.to,e))}),(0,k.jsx)(jv,{label:`Name`,value:i.name??``,onCommit:e=>s(Cv(a,o,`name`,i.name,e))}),(0,k.jsx)(jv,{label:`Description`,value:i.description??``,onCommit:e=>s(Cv(a,o,`description`,i.description,e))}),(0,k.jsx)(Av,{label:`Mode`,value:i.mode??``,options:Jie,onCommit:e=>s(Cv(a,o,`mode`,i.mode,e))}),(0,k.jsx)(jv,{label:`Content`,value:i.content??``,onCommit:e=>s(Cv(a,o,`content`,i.content,e))}),(0,k.jsx)(Av,{label:`Status`,value:i.status??``,options:qie,onCommit:e=>s(Cv(a,o,`status`,i.status,e))}),(0,k.jsx)(Fv,{label:`References`,values:i.references,onCommit:e=>s(Bie(a,o,`references`,i.references,e))}),(0,k.jsx)(Nv,{label:`Present in`,values:i.presentIn,onCommit:e=>s(Bie(a,o,`presentIn`,i.presentIn,e))})]})};function $ie({overlay:e,selectedId:t}){let n=t===null?e.workspace:e.subjects[t]??[],r=t===null?`Whole-model questions. Select a subject to see what names it.`:null;return(0,k.jsxs)(`div`,{className:`open-questions`,children:[r===null?null:(0,k.jsx)(`p`,{className:`open-questions-scope`,children:r}),n.length===0?(0,k.jsx)(`p`,{className:`section-empty`,children:t===null?`Nothing open at the whole-model level.`:`No open questions name this subject.`}):(0,k.jsx)(`ul`,{className:`question-list`,children:n.map(e=>(0,k.jsx)(eae,{entry:e},e.questionId))}),(0,k.jsxs)(`p`,{className:`open-questions-catalogue`,children:[`Catalogue `,e.catalogue,` · answers land through the changeset, never here.`]})]})}var eae=({entry:e})=>(0,k.jsxs)(`li`,{className:`question-row`,children:[(0,k.jsx)(`span`,{className:`question-text`,children:e.question}),(0,k.jsxs)(`span`,{className:`question-meta`,children:[(0,k.jsx)(`span`,{className:`question-authority question-authority-${e.authority}`,children:e.authority}),e.since===void 0?null:(0,k.jsxs)(`span`,{className:`question-since`,children:[`since `,e.since]})]})]}),zv=[`composition`],tae=`top-down`,Bv=e=>{let t=e?.trim()??``;return t===``?null:t},Vv=e=>({type:`element`,id:e.id,title:e.name,kind:e.kindLabel,description:Bv(e.description)}),Hv=(e,t)=>{let n=e.from,r=e.to;return{type:`relationship`,id:e.id,sourceId:n,sourceTitle:t.get(n)??n,targetId:r,targetTitle:t.get(r)??r,label:Bv(e.name),description:Bv(e.description),kind:e.kindLabel}},Uv=e=>new Map(e.nodes.map(e=>[e.id,e.name])),nae=(e,t)=>{let n=e.nodes.find(e=>e.id===t);return n===void 0?null:Vv(n)},rae=(e,t)=>{let n=e.edges.find(e=>e.id===t);return n===void 0?null:Hv(n,Uv(e))},iae=(e,t,n,r)=>({select:n=>{let{graph:r}=e();if(r===null)return!1;let i=nae(r,n)??rae(r,n);return i!==null&&(t({type:`subject.selected`,subject:i}),!0)},openDraft:r=>{let{graph:i,readOnly:a}=e();return a||i===null?!1:(n(r?.kind),t({type:`subject.draft.opened`}),!0)},startConnection:n=>{let{graph:r,readOnly:i}=e();return i||r===null||!r.nodes.some(e=>e.id===n)?!1:(t({type:`connection.started`,from:n}),!0)},setDecorations:e=>(r(e),!0)}),aae=[`palette`,`properties`,`questions`,`changes`,`chat`],oae=e=>({min:96,max:Math.max(96,e-160)}),Wv=(e,t)=>{let{min:n,max:r}=oae(t);return Math.min(r,Math.max(n,e))},sae=.45,cae=(e,t)=>e.length===t.length&&e.every((e,n)=>e===t[n]),lae=e=>{let t=[];return e?.layout!==void 0&&t.push({type:`layout.set`,layout:e.layout}),t.push({type:`nesting.set`,nesting:e?.nesting??zv}),t.push({type:`direction.set`,direction:e?.direction??`top-down`}),e?.showLifecycle!==void 0&&t.push({type:`presentation.toggled`,flag:`showLifecycle`,value:e.showLifecycle}),e?.showEvidence!==void 0&&t.push({type:`presentation.toggled`,flag:`showEvidence`,value:e.showEvidence}),e?.showOwnership!==void 0&&t.push({type:`presentation.toggled`,flag:`showOwnership`,value:e.showOwnership}),t},Gv=(e,t,n,r)=>!r||e===``||e===n?null:t.find(t=>t.id===e)??null,Kv=e=>({min:320,max:Math.max(320,Math.min(640,e*sae))}),qv=(e,t)=>{let{min:n,max:r}=Kv(t);return Math.min(r,Math.max(n,e))},Jv=480,Yv=(e,t)=>{let{min:n,max:r}=Kv(t);return Math.min(Math.min(r,Jv),Math.max(n,e))},Xv=(e,t=0)=>({conversation:{width:Yv(e*.28,e),hidden:!1,unread:0,collapsed:[],changesHeight:200,chatHeight:300},viewportWidth:e,viewportHeight:t,selectedSubject:null,descriptionExpanded:!1,detailsOpen:!1,bottomPanel:{open:!1,tab:`view-query`},tree:{filterText:``,collapsed:[]},connection:null,draftingSubject:!1,pendingDeletion:null,pendingViewDeletion:null,pendingViewRename:null,contextMenu:null,nesting:zv,direction:tae,layout:`layered`,showLifecycle:!0,showEvidence:!0,showOwnership:!1,showNudges:!0}),Zv=(e,t)=>{switch(t.type){case`section.toggled`:{let n=e.conversation.collapsed.includes(t.section);return{...e,conversation:{...e.conversation,collapsed:n?e.conversation.collapsed.filter(e=>e!==t.section):[...e.conversation.collapsed,t.section],unread:t.section===`chat`&&n?0:e.conversation.unread}}}case`section.resized`:{let n=Wv(t.height,e.viewportHeight),r=t.section===`chat`?`chatHeight`:`changesHeight`;return e.conversation[r]===n?e:{...e,conversation:{...e.conversation,[r]:n}}}case`conversation.resized`:{if(e.conversation.hidden)return e;let n=qv(t.width,e.viewportWidth);return n===e.conversation.width?e:{...e,conversation:{...e.conversation,width:n}}}case`conversation.toggled`:{let t=!e.conversation.hidden;return{...e,conversation:{...e.conversation,hidden:t,unread:!t&&!e.conversation.collapsed.includes(`chat`)?0:e.conversation.unread}}}case`viewport.resized`:{let n=qv(e.conversation.width,t.viewportWidth),r=t.viewportHeight??e.viewportHeight,i=Wv(e.conversation.changesHeight,r),a=Wv(e.conversation.chatHeight,r);return n===e.conversation.width&&i===e.conversation.changesHeight&&a===e.conversation.chatHeight&&t.viewportWidth===e.viewportWidth&&r===e.viewportHeight?e:{...e,conversation:{...e.conversation,width:n,changesHeight:i,chatHeight:a},viewportWidth:t.viewportWidth,viewportHeight:r}}case`attention.received`:return e.conversation.hidden||e.conversation.collapsed.includes(`chat`)?{...e,conversation:{...e.conversation,unread:e.conversation.unread+1}}:e;case`menu.opened`:return{...e,contextMenu:{target:t.target,x:t.x,y:t.y}};case`menu.dismissed`:return e.contextMenu===null?e:{...e,contextMenu:null};case`connection.started`:return{...e,connection:{from:t.from,to:null},draftingSubject:!1,contextMenu:null};case`connection.targeted`:return e.connection===null?e:t.to===e.connection.from?{...e,connection:null}:{...e,connection:{...e.connection,to:t.to}};case`connection.cancelled`:return e.connection===null?e:{...e,connection:null};case`subject.draft.opened`:return{...e,draftingSubject:!0,connection:null,contextMenu:null};case`subject.draft.closed`:return e.draftingSubject?{...e,draftingSubject:!1}:e;case`deletion.asked`:return{...e,pendingDeletion:t.id,connection:null,draftingSubject:!1,contextMenu:null};case`deletion.dismissed`:return e.pendingDeletion===null?e:{...e,pendingDeletion:null};case`viewDeletion.asked`:return{...e,pendingViewDeletion:t.id,contextMenu:null};case`viewDeletion.dismissed`:return e.pendingViewDeletion===null?e:{...e,pendingViewDeletion:null};case`viewRename.asked`:return{...e,pendingViewRename:t.id,contextMenu:null};case`viewRename.dismissed`:return e.pendingViewRename===null?e:{...e,pendingViewRename:null};case`subject.selected`:return{...e,conversation:{...e.conversation,collapsed:e.conversation.collapsed.filter(e=>e!==`properties`)},selectedSubject:t.subject,descriptionExpanded:!1,contextMenu:null};case`subject.cleared`:return e.selectedSubject===null?e:{...e,selectedSubject:null,descriptionExpanded:!1};case`description.toggled`:return e.selectedSubject===null?e:{...e,descriptionExpanded:!e.descriptionExpanded};case`details.toggled`:return{...e,detailsOpen:!e.detailsOpen};case`bottomPanel.toggled`:return{...e,bottomPanel:{...e.bottomPanel,open:!e.bottomPanel.open}};case`bottomPanel.tabSelected`:return e.bottomPanel.open&&e.bottomPanel.tab===t.tab?e:{...e,bottomPanel:{open:!0,tab:t.tab}};case`tree.filtered`:return e.tree.filterText===t.filterText?e:{...e,tree:{...e.tree,filterText:t.filterText}};case`tree.toggled`:{let n=e.tree.collapsed.includes(t.key);return{...e,tree:{...e.tree,collapsed:n?e.tree.collapsed.filter(e=>e!==t.key):[...e.tree.collapsed,t.key]}}}case`nesting.set`:return cae(e.nesting,t.nesting)?e:{...e,nesting:t.nesting};case`direction.set`:return e.direction===t.direction?e:{...e,direction:t.direction};case`layout.set`:return{...e,layout:t.layout};case`presentation.toggled`:return{...e,[t.flag]:t.value};case`model.replaced`:{let n=e.contextMenu===null?e:{...e,contextMenu:null},r=n.selectedSubject;if(r===null)return n;let i=t.graph,a=i===null?null:r.type===`element`?nae(i,r.id):rae(i,r.id);return a===null?{...n,selectedSubject:null,descriptionExpanded:!1}:{...n,selectedSubject:a}}}},Qv=(e,t)=>{let n=e.trim();if(t===null)return n;if(t.type===`element`)return`About element “${t.title}” (${t.id}): ${n}`;let r=`${t.sourceTitle} → ${t.targetTitle}`;return`About relationship “${t.label===null?r:`${r} — ${t.label}`}”: ${n}`};function $v({id:e,label:t,meta:n,open:r,onToggle:i,children:a}){return(0,k.jsxs)(`section`,{className:`stack-section stack-section-${e}`,children:[(0,k.jsxs)(`h2`,{className:`section-head`,children:[(0,k.jsxs)(`button`,{type:`button`,className:`section-toggle`,"aria-expanded":r,"aria-controls":`section-${e}`,onClick:i,children:[(0,k.jsx)(`span`,{className:`section-chevron`,"aria-hidden":`true`,children:r?`▾`:`▸`}),(0,k.jsx)(`span`,{className:`section-label`,children:t})]}),n===void 0?null:(0,k.jsx)(`span`,{className:`section-meta`,children:n})]}),(0,k.jsx)(`div`,{className:`section-body`,id:`section-${e}`,hidden:!r,children:a})]})}function ey({label:e,height:t,viewportHeight:n,onResize:r}){let i=oae(n),a=(0,v.useRef)(null),o=e=>{let t=a.current;t?.pointerId===e.pointerId&&r(t.startHeight+t.startY-e.clientY)},s=e=>{a.current={pointerId:e.pointerId,startY:e.clientY,startHeight:t},e.currentTarget.setPointerCapture(e.pointerId)},c=e=>{a.current?.pointerId===e.pointerId&&(a.current=null,e.currentTarget.hasPointerCapture(e.pointerId)&&e.currentTarget.releasePointerCapture(e.pointerId))};return(0,k.jsx)(`div`,{className:`section-splitter`,role:`separator`,"aria-label":e,"aria-orientation":`horizontal`,"aria-valuenow":Math.round(t),"aria-valuemin":i.min,"aria-valuemax":Math.round(i.max),tabIndex:0,onPointerDown:s,onPointerMove:o,onPointerUp:c,onPointerCancel:c,onKeyDown:e=>{if(e.key!==`ArrowUp`&&e.key!==`ArrowDown`)return;e.preventDefault();let n=e.shiftKey?32:8;r(t+(e.key===`ArrowUp`?n:-n))}})}var ty=(e,t,n)=>aae.filter(t=>e.includes(t)).flatMap((e,r)=>{let i=r===0?void 0:n[e];return[...i===void 0?[]:[(0,k.jsx)(v.Fragment,{children:i},`splitter-${e}`)],(0,k.jsx)(v.Fragment,{children:t[e]},e)]}),ny={messageBytes:65536,modelBytes:5242880,transcriptBytes:5242880,pendingEvents:32,reconnectMs:3e5,staleSessionMs:864e5}.reconnectMs,ry=`Returning control to the main agent`,iy={operations:[],viewOperations:[],sourceDigests:{}},ay=e=>e.operations.length===0&&e.viewOperations.length===0,oy={lifecycle:`connecting`,authority:`canonical`,title:``,description:``,chatEnabled:!1,model:null,styleNonce:``,activeView:``,transcript:[],views:[],choices:null,agentStatus:null,diagnostics:[],handoff:null,composerEnabled:!1,awaitingAgent:!1,localRecords:0,lastSequence:0,frozen:!1,activeFilter:null,quickFilterText:``,closedReason:null,pendingChangeset:iy,undoStack:[],redoStack:[],commitStatus:`idle`,commitDiagnostics:null,commitNotice:null,layoutNotice:null},sy=e=>({authority:e.authority,title:e.title,description:e.description,chatEnabled:e.chatEnabled,model:e.model,transcript:e.transcript,agentTurnOpen:e.agentTurnOpen,choices:e.pendingChoice,styleNonce:e.styleNonce,lastSequence:e.lastSequence,frozen:e.frozen,views:e.views}),cy=(e,t)=>t-e<ny,ly=(e,t,n)=>({id:`local-${e.localRecords}`,speaker:t,text:n}),uy=(e,t)=>e.transcript.some(e=>e.id===t.id)?e.transcript:[...e.transcript,t],dy=e=>e.initialView,fy={awaitingAgent:!1,agentStatus:null},py=e=>{let t=(e,t)=>Object.keys(e).filter(e=>!t.includes(e)).sort().join(`:`);if(`concept`in e){let n=e.concept;return`${e.op}:${e.document}:concept:${n.id}:${t(n,[`id`])}`}if(`relationship`in e){let n=e.relationship;return`${e.op}:${e.document}:relationship:${n.id}:${t(n,[`id`])}`}let n=e.observation,r=`${n.subject??n.claim}:${n.key??``}`;return`${e.op}:${e.document}:observation:${r}:${t(n,[`subject`,`claim`,`key`])}`},my=(e,t,n,r)=>{let i={},a=(e,t)=>{if(i[e]!==void 0)return;let r=n[e]??t;r!==void 0&&(i[e]=r)};for(let t of e)a(t.document,r?.sourceDigests[t.document]);for(let e of t)a(e.path,r?.projectionDigests[e.path]);return i},hy=(e,t,n)=>{let r=n.operations??e.operations,i=n.viewOperations??e.viewOperations;return{operations:r,viewOperations:i,sourceDigests:my(r,i,e.sourceDigests,t)}},uae=(e,t)=>{switch(t.type){case`session.loaded`:return{...e,...t.snapshot,lifecycle:e.lifecycle===`ending`?`ending`:`active`,activeView:dy(t.snapshot.model),transcript:[...t.snapshot.transcript,...e.transcript.filter(e=>e.speaker===`session`)],awaitingAgent:t.snapshot.agentTurnOpen,agentStatus:t.snapshot.agentTurnOpen?e.agentStatus:null,lastSequence:Math.max(e.lastSequence,t.snapshot.lastSequence)};case`model.received`:return{...e,model:t.model,views:t.views,diagnostics:[]};case`diagnostic.received`:return{...e,diagnostics:t.diagnostics,...fy};case`chat.sent`:return{...e,transcript:uy(e,ly(e,`reviewer`,t.text)),localRecords:e.localRecords+1,choices:null,awaitingAgent:!0};case`chat.received`:return{...e,transcript:uy(e,{id:t.id,speaker:`agent`,text:t.text}),...fy};case`status.received`:return{...e,agentStatus:t.status};case`choice.presented`:return{...e,choices:t.choice,...fy};case`choice.sent`:{let n=e.choices?.options.find(e=>e.id===t.optionId);return n===void 0?e:{...e,transcript:uy(e,ly(e,`reviewer`,n.label)),localRecords:e.localRecords+1,choices:null,awaitingAgent:!0}}case`view.navigated`:return e.activeView===t.viewId?e:{...e,activeView:t.viewId};case`handoff.received`:return{...e,handoff:t.handoff,transcript:uy(e,{id:t.id,speaker:`agent`,text:t.handoff.summary}),...fy};case`event.acknowledged`:return{...e,lastSequence:Math.max(e.lastSequence,t.sequence)};case`input.refused`:{let n=e=>t.refused===void 0||t.refused===e;return{...e,diagnostics:t.diagnostics,frozen:e.frozen||t.frozen,...n(`changeset.commit`)?{commitStatus:`idle`,commitDiagnostics:t.diagnostics}:{},...n(`chat.message`)||n(`choice.selected`)?fy:{}}}case`end.requested`:return{...e,lifecycle:`ending`,choices:null,transcript:uy(e,ly(e,`session`,ry)),localRecords:e.localRecords+1};case`connection.lost`:return{...e,lifecycle:`disconnected`};case`session.closed`:return{...e,lifecycle:`closed`,closedReason:t.reason};case`filter.applied`:return{...e,activeFilter:{query:t.query,matchedIds:t.matchedIds,excluded:t.excluded,source:t.source},activeView:t.source===`view`||t.source===`editor`?e.activeView:``};case`filter.cleared`:return{...e,activeFilter:null,activeView:``};case`quickFilter.changed`:return e.quickFilterText===t.text?e:{...e,quickFilterText:t.text};case`changeset.staged`:{let n=py(t.operation),r=[...e.pendingChangeset.operations.filter(e=>py(e)!==n),t.operation];return{...e,pendingChangeset:hy(e.pendingChangeset,e.model,{operations:r}),undoStack:[...e.undoStack,e.pendingChangeset],redoStack:[],commitDiagnostics:null,commitNotice:null}}case`changeset.viewStaged`:{let n=e.pendingChangeset.viewOperations.filter(e=>e.path!==t.operation.path);return{...e,pendingChangeset:hy(e.pendingChangeset,e.model,{viewOperations:[...n,t.operation]}),undoStack:[...e.undoStack,e.pendingChangeset],redoStack:[],commitDiagnostics:null,commitNotice:null}}case`changeset.viewMembership`:{let n=e.views.find(({id:e})=>e===t.viewId);if(n===void 0)return e;let r=e.pendingChangeset.viewOperations.find(e=>e.path===n.path),i=S_({id:n.id,title:n.title,description:n.description,query:n.query,presentation:n.presentation}),a=w_(r?.op===`write-view`?r.projection:i,t.subjectId,t.membership);if(a===null)return e;let o=e.pendingChangeset.viewOperations.filter(e=>e.path!==n.path),s=eie(a,i);return{...e,pendingChangeset:hy(e.pendingChangeset,e.model,{viewOperations:s?o:[...o,{op:`write-view`,path:n.path,projection:a}]}),undoStack:[...e.undoStack,e.pendingChangeset],redoStack:[],commitDiagnostics:null,commitNotice:null}}case`changeset.discarded`:{let{index:n}=t,r=e.pendingChangeset.operations.length,i=r+e.pendingChangeset.viewOperations.length;if(n<0||n>=i)return e;let a=n<r?{operations:e.pendingChangeset.operations.filter((e,t)=>t!==n)}:{viewOperations:e.pendingChangeset.viewOperations.filter((e,t)=>t!==n-r)};return{...e,pendingChangeset:hy(e.pendingChangeset,e.model,a),undoStack:[...e.undoStack,e.pendingChangeset],redoStack:[],commitDiagnostics:null}}case`changeset.cleared`:{let t=ay(e.pendingChangeset);return{...e,pendingChangeset:iy,undoStack:t?e.undoStack:[...e.undoStack,e.pendingChangeset],redoStack:t?e.redoStack:[],commitDiagnostics:null}}case`changeset.undone`:{let t=e.undoStack.at(-1);return t===void 0?e:{...e,pendingChangeset:t,undoStack:e.undoStack.slice(0,-1),redoStack:[...e.redoStack,e.pendingChangeset],commitDiagnostics:null}}case`changeset.redone`:{let t=e.redoStack.at(-1);return t===void 0?e:{...e,pendingChangeset:t,redoStack:e.redoStack.slice(0,-1),undoStack:[...e.undoStack,e.pendingChangeset],commitDiagnostics:null}}case`changeset.commit.sent`:return{...e,commitStatus:`committing`,commitDiagnostics:null};case`changeset.committed`:return{...e,pendingChangeset:iy,undoStack:[],redoStack:[],commitStatus:`idle`,commitDiagnostics:null,commitNotice:t.documents};case`apply.failed`:return{...e,commitStatus:`idle`,commitDiagnostics:t.diagnostics};case`layout.saved`:{let n=t.result.ok?`Layout saved`:t.result.message;return{...e,layoutNotice:n}}}},dae=e=>e.lifecycle===`active`&&e.chatEnabled&&!e.frozen&&!e.awaitingAgent;function fae(e,t){if(e.lifecycle===`closed`)return e;let n=uae(e,t);return n===e?e:{...n,composerEnabled:dae(n)}}var gy=(e,t)=>{let n=t.lastSequence;switch(e.kind){case`chat`:return{type:`chat.message`,lastAcknowledgedSequence:n,payload:{text:e.text}};case`choice`:return{type:`choice.selected`,lastAcknowledgedSequence:n,payload:{choiceId:e.choiceId,optionId:e.optionId}};case`navigate`:return{type:`view.navigate`,lastAcknowledgedSequence:n,payload:{viewId:e.viewId,requiresAttention:!1}};case`end`:return{type:`session.end`,lastAcknowledgedSequence:n,payload:{reason:`user-ended`}};case`filter`:return{type:`filter.query`,lastAcknowledgedSequence:n,payload:{query:e.query}};case`commit-changeset`:return{type:`changeset.commit`,lastAcknowledgedSequence:n,payload:t.pendingChangeset};case`save-layout`:return{type:`layout.save`,lastAcknowledgedSequence:n,payload:e.payload}}},pae=e=>{let t=e.views.find(({id:t})=>t===e.activeView);if(t===void 0)return null;let n=e.pendingChangeset.viewOperations.find(e=>e.path===t.path),r=n?.op===`write-view`?n.projection.query:t.query;return C_(r)?{kind:`enumerated`,subjects:r.subjects}:{kind:`faceted`,excluded:r.exclude??[]}},mae=(e,t)=>{if(e.kind!==`model`||t.activeFilter===null)return null;let n=t.activeFilter.source===`view`||t.activeFilter.source===`editor`,r=e.views.find(({id:e})=>e===t.activeView);return{query:n&&r!==void 0?r.query:t.activeFilter.query,source:t.activeFilter.source}},hae=(e,t=`panel`)=>{switch(e.kind){case`ready`:return[{type:`session.loaded`,snapshot:sy(e.snapshot)}];case`accepted`:return[{type:`event.acknowledged`,sequence:e.sequence}];case`rejected`:return[{type:`input.refused`,...e.refused===void 0?{}:{refused:e.refused},diagnostics:e.diagnostics,frozen:e.frozen!==void 0}];case`model`:return[{type:`model.received`,model:e.model,views:e.views}];case`closing`:return[{type:`session.closed`,reason:e.reason}];case`filter-result`:return[{type:`filter.applied`,query:e.result.query,matchedIds:e.result.matchedIds,excluded:e.result.excluded,source:t}];case`response`:switch(e.response.type){case`chat.response`:{let t=[{type:`chat.received`,id:e.response.responseId,text:e.response.payload.text}],n=e.response.payload.appliedQuery;return n&&t.push({type:`filter.applied`,query:n.query,matchedIds:n.matchedIds??[],excluded:null,source:`chat`}),t}case`agent.status`:return[{type:`status.received`,status:e.response.payload}];case`choice.present`:return[{type:`choice.presented`,choice:e.response.payload}];case`handoff.complete`:return[{type:`handoff.received`,id:e.response.responseId,handoff:e.response.payload}];case`diagnostic`:return[{type:`diagnostic.received`,diagnostics:e.response.payload.diagnostics}]}case`apply-result`:{let t=[];return e.result.ok?t.push({type:`changeset.committed`,documents:e.result.result.documents}):t.push({type:`apply.failed`,diagnostics:e.result.diagnostics}),t}case`layout-save-result`:return[{type:`layout.saved`,result:e.result}]}},gae=e=>{let[t,n]=(0,v.useReducer)(fae,oy),[r,i]=(0,v.useState)(!1),a=(0,v.useRef)(t);a.current=t;let o=(0,v.useRef)(`panel`),s=(0,v.useRef)(e);s.current=e,(0,v.useEffect)(()=>s.current.open({frame:e=>{for(let t of hae(e,o.current))n(t);let t=mae(e,a.current);t!==null&&(o.current=t.source,s.current.send(gy({kind:`filter`,query:t.query},a.current)))},connected:i,lost:()=>n({type:`connection.lost`}),session:()=>({lastSequence:a.current.lastSequence,closed:a.current.lifecycle===`closed`})}),[]);let c=(0,v.useCallback)(e=>{s.current.send(gy(e,a.current))},[]),l=(0,v.useCallback)(e=>{n({type:`chat.sent`,text:e}),c({kind:`chat`,text:e})},[c]),u=(0,v.useCallback)(e=>{let t=a.current.choices?.choiceId;t!==void 0&&(n({type:`choice.sent`,optionId:e}),c({kind:`choice`,choiceId:t,optionId:e}))},[c]),d=(0,v.useCallback)(e=>{n({type:`view.navigated`,viewId:e}),c({kind:`navigate`,viewId:e})},[c]),f=(0,v.useCallback)((e,t=`panel`)=>{o.current=t,c({kind:`filter`,query:e})},[c]),p=(0,v.useCallback)(()=>{n({type:`filter.cleared`})},[]),m=(0,v.useCallback)(e=>{n({type:`quickFilter.changed`,text:e})},[]),h=(0,v.useCallback)(e=>{n({type:`changeset.staged`,operation:e})},[]);return{state:t,connected:r,ask:l,choose:u,navigate:d,filter:f,clearFilter:p,setQuickFilterText:m,stageViewChange:(0,v.useCallback)(e=>{n({type:`changeset.viewStaged`,operation:e})},[]),stageViewMembership:(0,v.useCallback)((e,t,r)=>{n({type:`changeset.viewMembership`,viewId:e,subjectId:t,membership:r})},[]),stageChange:h,discardChange:(0,v.useCallback)(e=>{n({type:`changeset.discarded`,index:e})},[]),clearChangeset:(0,v.useCallback)(()=>{n({type:`changeset.cleared`})},[]),undoChangeset:(0,v.useCallback)(()=>{n({type:`changeset.undone`})},[]),redoChangeset:(0,v.useCallback)(()=>{n({type:`changeset.redone`})},[]),commitChangeset:(0,v.useCallback)(()=>{ay(a.current.pendingChangeset)||(n({type:`changeset.commit.sent`}),c({kind:`commit-changeset`}))},[c]),saveLayout:(0,v.useCallback)(e=>{c({kind:`save-layout`,payload:e})},[c]),end:(0,v.useCallback)(()=>{n({type:`end.requested`}),c({kind:`end`})},[c])}},_ae=({draft:e,graph:t,reservedIds:n,onStage:r,onCancel:i})=>{let a=e=>t.nodes.find(t=>t.id===e)?.name??e;if(e.to===null)return(0,k.jsxs)(`section`,{className:`connection-panel`,"aria-label":`Connect subjects`,children:[(0,k.jsxs)(`p`,{className:`connection-prompt`,children:[`Connecting from `,(0,k.jsx)(`strong`,{children:a(e.from)}),`. Choose a target on the diagram.`]}),(0,k.jsx)(`button`,{type:`button`,onClick:i,children:`Cancel`})]});let o=e.to,s=cv(t,e.from,o);return(0,k.jsxs)(`section`,{className:`connection-panel`,"aria-label":`Connect subjects`,children:[(0,k.jsxs)(`p`,{className:`connection-prompt`,children:[(0,k.jsx)(`strong`,{children:a(e.from)}),` to`,` `,(0,k.jsx)(`strong`,{children:a(o)})]}),s.length===0?(0,k.jsx)(`p`,{className:`connection-empty`,children:`No relationship is defined between these kinds. One of them is outside the ArchiMate vocabulary the table covers.`}):(0,k.jsx)(`ul`,{className:`connection-kinds`,children:s.map(a=>(0,k.jsx)(`li`,{children:(0,k.jsx)(`button`,{type:`button`,onClick:()=>{let s=uv(t,e.from,a,o,n);s!==null&&r(s),i()},children:a})},a))}),(0,k.jsx)(`button`,{type:`button`,onClick:i,children:`Cancel`})]})},vae=/^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/,_y=(e,t,n=[])=>{let r=t.normalize(`NFKD`).replace(/[\u0300-\u036f]/g,``).replace(/[^a-zA-Z0-9]+/g,`-`).replace(/^-+|-+$/g,``).toLowerCase();if(r===``||!vae.test(r))return null;let i=new Set([...e.nodes.map(e=>e.id),...e.edges.map(e=>e.id),...n]);if(!i.has(r))return r;for(let e=2;;e+=1){let t=`${r}-${e}`;if(!i.has(t))return t}},yae=(e,t,n,r=[])=>{if(t.document===``||!n.includes(t.kind))return null;let i=t.name.trim();if(i===``)return null;let a=_y(e,i,r);return a===null?null:{op:`add-concept`,document:t.document,concept:{id:a,kind:t.kind,name:i}}},vy=({graph:e,kinds:t,documents:n,defaultDocument:r,initialKind:i,reservedIds:a,onStage:o,onCancel:s})=>{let[c,l]=(0,v.useState)(``),[u,d]=(0,v.useState)(i??``),[f,p]=(0,v.useState)(r),m=c.trim()===``?null:_y(e,c,a),h=m===null?null:yae(e,{name:c,kind:u,document:f},t.map(e=>e.label),a);return(0,k.jsxs)(`section`,{className:`subject-draft-panel`,"aria-label":`Add a subject`,children:[(0,k.jsxs)(`label`,{className:`subject-draft-field`,htmlFor:`subject-draft-name`,children:[(0,k.jsx)(`span`,{children:`Name`}),(0,k.jsx)(`input`,{id:`subject-draft-name`,type:`text`,value:c,onChange:e=>l(e.target.value)})]}),(0,k.jsxs)(`label`,{className:`subject-draft-field`,htmlFor:`subject-draft-kind`,children:[(0,k.jsx)(`span`,{children:`Kind`}),(0,k.jsxs)(`select`,{id:`subject-draft-kind`,value:u,onChange:e=>d(e.target.value),children:[(0,k.jsx)(`option`,{value:``,children:`Choose a kind`}),t.map(e=>(0,k.jsx)(`option`,{value:e.label,children:e.label},e.id))]})]}),(0,k.jsxs)(`label`,{className:`subject-draft-field`,htmlFor:`subject-draft-document`,children:[(0,k.jsx)(`span`,{children:`Document`}),(0,k.jsx)(`select`,{id:`subject-draft-document`,value:f,onChange:e=>p(e.target.value),children:n.map(e=>(0,k.jsx)(`option`,{value:e,children:e},e))})]}),(0,k.jsx)(`p`,{className:`subject-draft-id`,children:u===``?`Choose a kind.`:c.trim()===``?`Give it a name.`:m===null?`That name makes no id. An id starts with a letter and is made of letters, digits and hyphens.`:(0,k.jsxs)(k.Fragment,{children:[`Id: `,(0,k.jsx)(`code`,{children:m})]})}),(0,k.jsx)(`button`,{type:`button`,disabled:h===null,onClick:()=>{h!==null&&(o(h),s())},children:`Add`}),(0,k.jsx)(`button`,{type:`button`,onClick:s,children:`Cancel`})]})};function yy({title:e,message:t,confirmLabel:n,cancelLabel:r,onConfirm:i,onCancel:a}){return(0,k.jsx)(`div`,{className:`confirm-dialog-backdrop`,role:`presentation`,onClick:a,children:(0,k.jsxs)(`div`,{className:`confirm-dialog`,role:`alertdialog`,"aria-modal":`true`,"aria-labelledby":`confirm-dialog-title`,onClick:e=>e.stopPropagation(),children:[(0,k.jsx)(`h2`,{id:`confirm-dialog-title`,children:e}),(0,k.jsx)(`p`,{children:t}),(0,k.jsxs)(`div`,{className:`confirm-dialog-actions`,children:[(0,k.jsx)(`button`,{type:`button`,onClick:a,children:r}),(0,k.jsx)(`button`,{type:`button`,onClick:i,children:n})]})]})})}function by({title:e,label:t,initialValue:n,confirmLabel:r,cancelLabel:i,onConfirm:a,onCancel:o}){let[s,c]=(0,v.useState)(n),l=s.trim()===``;return(0,k.jsx)(`div`,{className:`confirm-dialog-backdrop`,role:`presentation`,onClick:o,children:(0,k.jsxs)(`div`,{className:`confirm-dialog`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`prompt-dialog-title`,onClick:e=>e.stopPropagation(),children:[(0,k.jsx)(`h2`,{id:`prompt-dialog-title`,children:e}),(0,k.jsxs)(`form`,{className:`prompt-dialog-form`,onSubmit:e=>{e.preventDefault(),!l&&a(s.trim())},children:[(0,k.jsx)(`label`,{htmlFor:`prompt-dialog-value`,children:t}),(0,k.jsx)(`input`,{id:`prompt-dialog-value`,type:`text`,value:s,autoFocus:!0,onChange:e=>c(e.currentTarget.value),onKeyDown:e=>{e.key===`Escape`&&o()}}),(0,k.jsxs)(`div`,{className:`confirm-dialog-actions`,children:[(0,k.jsx)(`button`,{type:`button`,onClick:o,children:i}),(0,k.jsx)(`button`,{type:`submit`,disabled:l,children:r})]})]})]})})}var xy=new Set([`subject.inspect`,`relationship.inspect`,`view.open`,`view.clear`,`view.copy-path`,`canvas.export-png`]),Sy=(e,t)=>t.membership===null?[]:[{key:`view`,scope:`view`,label:`View`,destructive:!1,items:[(t.membership.kind===`enumerated`?t.membership.subjects.includes(e):!t.membership.excluded.includes(e))?{key:`view.remove-subject`,label:`Remove from view`,intent:{type:`view.remove-subject`,id:e}}:{key:`view.add-subject`,label:`Add to this view`,intent:{type:`view.add-subject`,id:e}}]}],Cy={key:`view.new`,label:`New view…`,intent:{type:`view.new`}},wy={key:`view.new-folder`,label:`New folder…`,intent:{type:`view.new-folder`}},Ty={key:`view.clear`,label:`Show all subjects`,intent:{type:`view.clear`}},Ey=(e,t)=>({key:`delete`,scope:`model`,label:null,destructive:!0,items:[{key:`delete`,label:t,intent:e}]}),bae=(e,t)=>t.graph?.nodes.find(t=>t.id===e)===void 0?[]:[...Sy(e,t),{key:`model`,scope:`model`,label:`Model`,destructive:!1,items:[{key:`inspect`,label:`Properties`,intent:{type:`subject.inspect`,id:e}},{key:`connect`,label:`Connect from here…`,intent:{type:`subject.connect`,from:e}}]},Ey({type:`subject.delete`,id:e},`Delete from model…`)],xae=(e,t)=>{let n=t.graph,r=n?.edges.find(t=>t.id===e);if(n==null||r===void 0)return[];let i=fv(n,{from:r.from,to:r.to},t.relationshipKinds,r.kindLabel),a=[{key:`model`,scope:`model`,label:`Model`,destructive:!1,items:[{key:`inspect`,label:`Properties`,intent:{type:`relationship.inspect`,id:e}}]}];return i.options.length>1&&a.push({key:`kind`,scope:`model`,label:`Change kind`,destructive:!1,items:i.options.map(t=>({key:`kind:${t.label}`,label:t.label,intent:{type:`relationship.retype`,id:e,kind:t.label},...t.label===r.kindLabel?{current:!0}:{}}))}),a.push(Ey({type:`relationship.delete`,id:e},`Delete from model…`)),a},Dy=e=>e.graph===null?[]:[{key:`view`,scope:`view`,label:`View`,destructive:!1,items:[Cy,wy,...e.filtered?[Ty]:[],{key:`canvas.export-png`,label:`Export PNG`,intent:{type:`canvas.export-png`}}]},{key:`model`,scope:`model`,label:`Model`,destructive:!1,items:[{key:`add`,label:`Add subject…`,intent:{type:`canvas.draft-subject`}}]}],Oy=(e,t)=>{let n=[{key:`view`,scope:`view`,label:`View`,destructive:!1,items:e===``?[Ty,Cy,wy]:[{key:`view.open`,label:`Open view`,intent:{type:`view.open`,id:e},...e===t.activeViewId?{current:!0}:{}},{key:`view.rename`,label:`Rename…`,intent:{type:`view.rename`,id:e}},{key:`view.duplicate`,label:`Duplicate`,intent:{type:`view.duplicate`,id:e}},{key:`view.new-in-folder`,label:`New view in this folder…`,intent:{type:`view.new-in-folder`,id:e}},Cy,wy,{key:`view.copy-path`,label:`Copy projection path`,intent:{type:`view.copy-path`,id:e}}]}];return e!==``&&n.push({key:`delete`,scope:`view`,label:null,destructive:!0,items:[{key:`delete`,label:`Delete view…`,intent:{type:`view.delete`,id:e}}]}),n},ky=(e,t)=>t.graph?.nodes.find(t=>t.id===e)===void 0?[]:[...Sy(e,t),{key:`model`,scope:`model`,label:`Model`,destructive:!1,items:[{key:`inspect`,label:`Properties`,intent:{type:`subject.inspect`,id:e}}]},Ey({type:`subject.delete`,id:e},`Delete from model…`)],Ay=(e,t)=>{let n=(()=>{switch(e.kind){case`subject`:return bae(e.id,t);case`relationship`:return xae(e.id,t);case`canvas`:return Dy(t);case`view-row`:return Oy(e.id,t);case`model-row`:return ky(e.id,t)}})();return t.readOnly===!0?n.flatMap(e=>{let t=e.items.filter(e=>xy.has(e.intent.type));return t.length===0?[]:[{...e,items:t}]}):n},jy=(e,t,n)=>({left:Math.max(0,e.x+t.width<=n.width?e.x:Math.min(e.x-t.width,n.width-t.width)),top:Math.max(0,e.y+t.height<=n.height?e.y:Math.min(e.y-t.height,n.height-t.height))});function My({groups:e,x:t,y:n,onChoose:r,onDismiss:i}){let a=(0,v.useRef)(null),[o,s]=(0,v.useState)(null);return(0,v.useLayoutEffect)(()=>{let e=a.current;if(e===null)return;let r=e.getBoundingClientRect();s(jy({x:t,y:n},{width:r.width,height:r.height},{width:window.innerWidth,height:window.innerHeight})),e.focus()},[t,n,e]),(0,v.useEffect)(()=>{let e=e=>{e.key===`Escape`&&i()},t=e=>{let t=e.target;a.current!==null&&t instanceof Node&&a.current.contains(t)||i()};return window.addEventListener(`keydown`,e),window.addEventListener(`pointerdown`,t,!0),window.addEventListener(`contextmenu`,t,!0),window.addEventListener(`resize`,i),()=>{window.removeEventListener(`keydown`,e),window.removeEventListener(`pointerdown`,t,!0),window.removeEventListener(`contextmenu`,t,!0),window.removeEventListener(`resize`,i)}},[i]),e.length===0?null:(0,k.jsx)(`div`,{ref:a,className:`context-menu`,role:`dialog`,"aria-label":`Actions`,tabIndex:-1,style:o===null?{left:0,top:0,visibility:`hidden`}:{left:`${o.left}px`,top:`${o.top}px`},children:e.map(e=>(0,k.jsxs)(`div`,{className:`context-menu-group context-menu-${e.scope}${e.destructive?` context-menu-destructive`:``}`,children:[e.label===null?null:(0,k.jsx)(`p`,{className:`context-menu-heading`,children:e.label}),(0,k.jsx)(`ul`,{children:e.items.map(e=>(0,k.jsx)(`li`,{children:(0,k.jsxs)(`button`,{type:`button`,className:`context-menu-item`,"aria-current":e.current===!0?`true`:void 0,onClick:()=>r(e.intent),children:[(0,k.jsx)(`span`,{className:`context-menu-tick`,"aria-hidden":!0,children:e.current===!0?`•`:``}),(0,k.jsx)(`span`,{className:`context-menu-label`,children:e.label})]})},e.key))})]},e.key))})}var Ny=(e,t)=>{let n=[];for(let r of e.nodes)r.id!==t&&(r.owner===t&&n.push({by:r.id,field:`owner`}),r.distinctFrom.includes(t)&&n.push({by:r.id,field:`distinctFrom`}),r.supersedes.includes(t)&&n.push({by:r.id,field:`supersedes`}),r.constraints.some(e=>e.ref===t)&&n.push({by:r.id,field:`constraint`}),r.references.some(e=>e.ref===t)&&n.push({by:r.id,field:`reference`}));return n},Sae=(e,t)=>{let n=e.edges.find(e=>e.id===t);if(n!==void 0)return[{op:`delete-relationship`,document:n.document,relationship:{id:n.id}}];let r=e.nodes.find(e=>e.id===t);return r===void 0?[]:[...e.edges.filter(e=>e.from===t||e.to===t).map(e=>({op:`delete-relationship`,document:e.document,relationship:{id:e.id}})),{op:`delete-concept`,document:r.document,concept:{id:r.id}}]},Cae=(e,t)=>{let n=e.edges.find(e=>e.id===t);if(n!==void 0)return`Delete the ${n.kindLabel} relationship from "${e.nodes.find(e=>e.id===n.from)?.name??n.from}" to "${e.nodes.find(e=>e.id===n.to)?.name??n.to}"?`;let r=e.nodes.find(e=>e.id===t);if(r===void 0)return null;let i=e.edges.filter(e=>e.from===t||e.to===t).length,a=Ny(e,t),o=i===0?`Delete "${r.name}"?`:`Delete "${r.name}" and the ${i} ${i===1?`relationship that names`:`relationships that name`} it?`;if(a.length===0)return o;let s=[...new Set(a.map(t=>e.nodes.find(e=>e.id===t.by)?.name??t.by))],c=s.slice(0,3),l=s.length>c.length?` and others`:``;return`${o} It is still named by ${c.join(`, `)}${l}, so this may be refused.`},wae={reviewer:`You`,agent:`Agent`,session:`Session`},Py={thinking:`Agent is thinking`,compiling:`Agent is compiling the model`,waiting:`Agent is waiting`,idle:`Agent is idle`},Tae=(e,t)=>{switch(e.lifecycle){case`connecting`:return`Opening`;case`active`:return t?`Live`:`Reconnecting`;case`ending`:return`Ending`;case`disconnected`:return`Reconnecting`;case`closed`:return`Closed`}},Eae=e=>e.lifecycle===`closed`?`Visual conversation ended. Continue in the main agent.`:e.lifecycle===`ending`?e.handoff===null?`Ending conversation — preparing a handoff for the main agent.`:`Handoff ready — returning control to the main agent.`:``,Fy=({state:e,connection:t})=>(0,k.jsxs)(`header`,{className:`command-strip`,children:[(0,k.jsxs)(`div`,{className:`command-identity`,children:[(0,k.jsx)(`h1`,{children:e.title===``?`Opening the session`:e.title}),(0,k.jsx)(`span`,{className:`beta-badge`,children:`Beta`}),(0,k.jsx)(`span`,{className:`authority`,children:`Checked YarraMate model`}),(0,k.jsx)(`span`,{className:`connection-state`,role:`status`,children:t})]}),e.description===``?null:(0,k.jsx)(`p`,{className:`session-description`,title:e.description,children:e.description})]}),Dae=({choices:e,disabled:t,onChoice:n})=>(0,k.jsxs)(`div`,{className:`choices`,children:[(0,k.jsx)(`p`,{className:`question`,children:e.question}),(0,k.jsx)(`ul`,{children:e.options.map(e=>(0,k.jsx)(`li`,{children:(0,k.jsxs)(`button`,{type:`button`,onClick:()=>n(e.id),disabled:t,children:[(0,k.jsx)(`span`,{className:`label`,children:e.label}),e.description===void 0?null:(0,k.jsx)(`span`,{className:`detail`,children:e.description})]})},e.id))})]}),Oae=({diagnostics:e})=>e.length===0?null:(0,k.jsxs)(`div`,{className:`faults`,role:`alert`,children:[(0,k.jsx)(`p`,{className:`faults-title`,children:`The last change did not compile. The diagram still shows the model that did.`}),(0,k.jsx)(`ul`,{children:e.map(e=>(0,k.jsxs)(`li`,{children:[(0,k.jsx)(`span`,{className:`code`,children:e.code}),` `,e.message,(0,k.jsxs)(`span`,{className:`where`,children:[e.path,`:`,e.line]})]},`${e.code}-${e.pointer}`))})]}),kae=({state:e,selectedId:t,waiting:n,layout:r,nesting:i,direction:a,showLifecycle:o,showEvidence:s,showOwnership:c,showNudges:l,openQuestionCounts:u,decorations:d,connection:f,onConnectTarget:p,onConnectCancel:m,onConnectStage:h,onDraftStage:g,draftingSubject:_,draftInitialKind:y,onKindDrop:b,onDraftSubject:x,onDraftSubjectClose:S,pendingDeletion:C,onDeletionDismiss:w,onSelect:T,onCanvasMenu:E,onClearFilter:D,onSaveLayout:ee,onCanvasReady:te,onQuickFilterChange:ne,view:re,bottomPanel:ie,onTogglePresentation:ae,onToggleBottomPanel:oe,onSelectBottomTab:se,onApplyFilter:ce,onStageView:le,readOnly:ue})=>{let de=(0,v.useMemo)(()=>new Map((e.model?.graph.nodes??[]).map(e=>[e.id,e.name])),[e.model]),fe=e.model?.graph.nodes??[],pe=e.activeFilter?.matchedIds??null,me=fe.length>0&&(e.activeFilter!==null||e.quickFilterText.trim()!==``)&&_h(fe,pe,e.quickFilterText)===0,he=e.activeFilter!==null&&_h(fe,pe,``)===0;return(0,k.jsxs)(`section`,{className:`diagram-workspace`,"aria-label":`Architecture diagram`,children:[e.activeFilter!==null&&e.activeFilter.source!==`view`&&e.activeFilter.source!==`editor`?(0,k.jsxs)(`div`,{className:`filter-pill`,role:`status`,children:[(0,k.jsxs)(`span`,{children:[`Filtered by `,e.activeFilter.source,`:`,` `,(0,k.jsx)(`code`,{children:q_(e.activeFilter.query)})]}),(0,k.jsx)(`button`,{type:`button`,onClick:D,children:`Show all`})]}):null,(0,k.jsxs)(`div`,{className:`canvas`,children:[e.model===null?null:(0,k.jsxs)(`div`,{className:`canvas-controls`,children:[(0,k.jsx)(mie,{value:e.quickFilterText,onChange:ne}),ue?null:(0,k.jsx)(`button`,{type:`button`,className:`subject-draft-open`,onClick:x,children:`Add subject`})]}),!_||e.model===null?null:(0,k.jsx)(vy,{initialKind:y,graph:e.model.graph,kinds:e.model.vocabulary.conceptKinds,documents:e.model.documents,reservedIds:dv(e.pendingChangeset.operations),defaultDocument:(t===null?void 0:e.model.graph.nodes.find(e=>e.id===t)?.document)??e.model.documents[0]??``,onStage:g,onCancel:S},y??``),C===null||e.model===null?null:(0,k.jsx)(yy,{title:`Delete`,message:Cae(e.model.graph,C)??`That subject is no longer on the diagram.`,confirmLabel:`Delete`,cancelLabel:`Keep`,onConfirm:()=>{for(let t of Sae(e.model.graph,C))h(t);w()},onCancel:w}),f===null||e.model===null?null:(0,k.jsx)(_ae,{draft:f,graph:e.model.graph,reservedIds:dv(e.pendingChangeset.operations),onStage:h,onCancel:m}),e.model===null?null:(0,k.jsx)(ore,{graph:e.model.graph,selectedId:t,onSelect:(t,n)=>{let r=e.model.graph;if(n===`node`){if(f!==null){p(t);return}let e=r.nodes.find(e=>e.id===t);e!==void 0&&T(Vv(e))}else{let e=r.edges.find(e=>e.id===t);e!==void 0&&T(Hv(e,de))}},onContextMenu:E,matchedIds:e.activeFilter?.matchedIds??null,quickFilterText:e.quickFilterText,nesting:i,faultedIds:Aie(e.commitDiagnostics??[]),decorations:d,showLifecycle:o,showEvidence:s,showOwnership:c,showNudges:l,openQuestionCounts:u,activeViewId:e.activeView,direction:a,savedPositions:e.model.layouts[e.activeView],onSaveLayout:ue?()=>void 0:ee,onKindDrop:ue?void 0:b,onCanvasReady:te}),me?(0,k.jsx)(`div`,{className:`filter-empty-pill`,role:`status`,children:he&&e.activeFilter!==null?(0,k.jsxs)(k.Fragment,{children:[(0,k.jsxs)(`span`,{children:[`Nothing matches this filter:`,` `,(0,k.jsx)(`code`,{children:q_(e.activeFilter.query)})]}),(0,k.jsx)(`button`,{type:`button`,onClick:D,children:`Show all`})]}):(0,k.jsxs)(k.Fragment,{children:[(0,k.jsxs)(`span`,{children:[`Nothing matches “`,e.quickFilterText.trim(),`”`]}),(0,k.jsx)(`button`,{type:`button`,onClick:()=>ne(``),children:`Clear filter`})]})}):null,e.layoutNotice===null?null:(0,k.jsx)(`div`,{className:`layout-notice-pill`,role:`status`,children:(0,k.jsx)(`span`,{children:e.layoutNotice})}),n===null?null:(0,k.jsx)(`p`,{className:`waiting`,children:n})]}),(0,k.jsx)(pie,{nodes:e.model?.graph.nodes??[],activeFilter:e.activeFilter,view:re,open:ie.open,tab:ie.tab,showLifecycle:o,showEvidence:s,showOwnership:c,showNudges:l,onTogglePresentation:ae,onToggleOpen:oe,onSelectTab:se,onApply:ce,onStage:le,readOnly:ue},e.activeView)]})},Aae=({text:e,expanded:t,onToggle:n})=>{let r=e??`No description declared in this model`,i=(0,v.useRef)(null),[a,o]=(0,v.useState)(!1);return(0,v.useLayoutEffect)(()=>{let e=i.current;if(e===null||t)return;let n=()=>o(e.scrollHeight>e.clientHeight+1);n();let r=new ResizeObserver(n);return r.observe(e),()=>r.disconnect()},[r,t]),(0,k.jsxs)(`div`,{className:`subject-description`,children:[(0,k.jsx)(`p`,{ref:i,className:t?`description-expanded`:`description-clamped`,children:r}),a||t?(0,k.jsx)(`button`,{type:`button`,"aria-expanded":t,onClick:n,children:t?`Show less`:`Show more`}):null]})},jae=({subject:e,model:t,operations:n,expanded:r,onToggleDescription:i,onClear:a,onConnect:o,onDelete:s,onStageChange:c,readOnly:l})=>{let u=e.type===`element`?t.graph.nodes.find(t=>t.id===e.id):void 0,d=e.type===`relationship`?t.graph.edges.find(t=>t.id===e.id):void 0;return(0,k.jsxs)(`section`,{className:`subject-inspector`,"aria-labelledby":`subject-heading`,children:[(0,k.jsxs)(`div`,{className:`subject-heading-row`,children:[(0,k.jsxs)(`div`,{children:[(0,k.jsx)(`p`,{className:`subject-type`,children:e.type===`element`?`Selected element`:`Selected relationship`}),(0,k.jsx)(`h2`,{id:`subject-heading`,children:e.type===`element`?e.title:`${e.sourceTitle} → ${e.targetTitle}`})]}),e.type===`element`&&!l?(0,k.jsx)(`button`,{type:`button`,className:`subject-connect`,onClick:()=>o(e.id),children:`Connect`}):null,l?null:(0,k.jsx)(`button`,{type:`button`,className:`subject-delete`,onClick:()=>s(e.id),children:`Delete`}),(0,k.jsx)(`button`,{type:`button`,className:`subject-clear`,onClick:a,children:`Clear`})]}),u===void 0?null:l?(0,k.jsx)(Xie,{node:u,model:t}):(0,k.jsx)(Yie,{node:u,model:t,operations:n,onStageChange:c}),d===void 0?null:l?(0,k.jsx)(Zie,{edge:d,model:t}):(0,k.jsx)(Qie,{edge:d,model:t,operations:n,onStageChange:c}),(0,k.jsx)(Aae,{text:e.description,expanded:r,onToggle:i})]})},Iy=e=>e.lifecycle===`active`?e.awaitingAgent?Py[e.agentStatus?.state??`thinking`]??`working`:`agent idle`:`closed`,Ly=({state:e,disabled:t,selectedSubject:n,onSend:r,onChoice:i,onClearSubject:a,onEnd:o})=>{let[s,c]=(0,v.useState)(``),l=e.lifecycle===`active`&&e.awaitingAgent,u=e.lifecycle===`active`?e.agentStatus:null;return(0,k.jsxs)(`div`,{className:`talk`,children:[(0,k.jsxs)(`div`,{className:`conversation-scroll`,children:[(0,k.jsx)(`ol`,{className:`ledger`,role:`log`,"aria-live":`polite`,children:e.transcript.length===0?(0,k.jsx)(`li`,{className:`empty`,children:(0,k.jsx)(`p`,{children:`Nothing asked yet. Question anything on the diagram.`})}):e.transcript.map(e=>(0,k.jsxs)(`li`,{className:`said said-${e.speaker}`,children:[(0,k.jsx)(`p`,{className:`who`,children:wae[e.speaker]}),(0,k.jsx)(`p`,{className:`words`,children:e.text})]},e.id))}),(0,k.jsx)(Oae,{diagnostics:e.diagnostics}),e.choices===null?null:(0,k.jsx)(Dae,{choices:e.choices,disabled:t,onChoice:i})]}),(0,k.jsxs)(`form`,{className:`composer`,onSubmit:e=>{e.preventDefault();let n=s.trim();n===``||t||(r(n),c(``))},children:[n===null?null:(0,k.jsxs)(`div`,{className:`subject-chip`,children:[(0,k.jsx)(`span`,{children:n.type===`element`?n.title:`${n.sourceTitle} → ${n.targetTitle}`}),(0,k.jsx)(`button`,{type:`button`,"aria-label":`Remove selected diagram context`,onClick:a,children:`Remove`})]}),(0,k.jsx)(`label`,{className:`offscreen`,htmlFor:`composer-text`,children:`Ask about this design`}),(0,k.jsx)(`textarea`,{id:`composer-text`,name:`question`,rows:3,value:s,disabled:t,placeholder:e.chatEnabled?n?.type===`element`?`Ask about this element`:n?.type===`relationship`?`Ask about this relationship`:`Ask about this design`:`This session is read-only`,onChange:e=>c(e.target.value),onKeyDown:e=>{e.key!==`Enter`||e.shiftKey||(e.preventDefault(),e.currentTarget.form?.requestSubmit())}}),(0,k.jsxs)(`div`,{className:`composer-foot`,children:[(0,k.jsxs)(`p`,{className:`agent-status`,role:`status`,"aria-live":`polite`,"aria-busy":l,children:[l?(0,k.jsx)(`span`,{className:`agent-spinner`,"aria-hidden":`true`}):null,(0,k.jsx)(`span`,{children:u===null?l?`Awaiting agent response`:`\xA0`:Py[u.state]??`\xA0`})]}),(0,k.jsx)(`button`,{type:`submit`,disabled:t||s.trim()===``,children:`Send`})]}),(0,k.jsxs)(`div`,{className:`session-foot`,children:[(0,k.jsx)(`span`,{className:`end-transition-status`,role:`status`,"aria-live":`polite`,"aria-atomic":`true`,children:Eae(e)}),(0,k.jsx)(`button`,{type:`button`,className:`end-session`,onClick:o,disabled:e.lifecycle!==`active`,children:e.lifecycle===`ending`||e.lifecycle===`closed`?`Returning…`:`Return to agent`})]})]})]})},Ry=({width:e,viewportWidth:t,onResize:n})=>{let r=Kv(t),i=(0,v.useRef)(null),a=e=>{let t=i.current;t?.pointerId===e.pointerId&&n(t.startWidth+t.startX-e.clientX)},o=t=>{i.current={pointerId:t.pointerId,startX:t.clientX,startWidth:e},t.currentTarget.setPointerCapture(t.pointerId)},s=e=>{i.current?.pointerId===e.pointerId&&(i.current=null,e.currentTarget.hasPointerCapture(e.pointerId)&&e.currentTarget.releasePointerCapture(e.pointerId))};return(0,k.jsx)(`div`,{className:`conversation-separator`,role:`separator`,"aria-label":`Resize conversation`,"aria-orientation":`vertical`,"aria-valuemin":r.min,"aria-valuemax":r.max,"aria-valuenow":Math.round(e),tabIndex:0,onPointerDown:o,onPointerMove:a,onPointerUp:s,onPointerCancel:s,onKeyDown:t=>{if(t.key!==`ArrowLeft`&&t.key!==`ArrowRight`)return;t.preventDefault();let r=t.shiftKey?32:8;n(e+(t.key===`ArrowLeft`?r:-r))}})},zy=({host:e,sections:t=aae,readOnly:n=!1,decorations:r,onReady:i})=>{let{state:a,connected:o,ask:s,choose:c,navigate:l,filter:u,clearFilter:d,setQuickFilterText:f,stageViewChange:p,stageViewMembership:m,saveLayout:h,discardChange:g,stageChange:_,clearChangeset:y,undoChangeset:b,redoChangeset:x,commitChangeset:S,end:C}=gae(e),[w,T]=(0,v.useReducer)(Zv,{width:window.innerWidth,height:window.innerHeight},({width:e,height:t})=>Xv(e,t)),[E,D]=(0,v.useState)(null),[ee,te]=(0,v.useState)(!1),[ne,re]=(0,v.useState)(!1),[ie,ae]=(0,v.useState)(void 0),[oe,se]=(0,v.useState)(void 0),[ce,le]=(0,v.useState)(r??{}),ue=(0,v.useRef)(null),de=(0,v.useRef)({graph:null,readOnly:n});de.current={graph:a.model?.graph??null,readOnly:n},(0,v.useEffect)(()=>{i?.(iae(()=>de.current,T,se,le))},[i]),(0,v.useEffect)(()=>{let e=()=>T({type:`viewport.resized`,viewportWidth:window.innerWidth,viewportHeight:window.innerHeight});return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]);let fe=(0,v.useRef)(null);(0,v.useEffect)(()=>{if(a.activeView===``){fe.current=null;return}let e=Gv(a.activeView,a.views,fe.current,o);if(e!==null){fe.current=e.id,u(e.query,`view`);for(let t of lae(e.presentation))T(t)}},[a.activeView,a.views,o,u]);let pe=(0,v.useRef)({transcriptLength:a.transcript.length,choices:a.choices,diagnostics:a.diagnostics});(0,v.useEffect)(()=>{let e=pe.current,t=!1;for(let n=e.transcriptLength;n<a.transcript.length;n+=1)if(a.transcript[n]?.speaker===`agent`){t=!0;break}let n=t||a.choices!==null&&a.choices!==e.choices||a.diagnostics.length>0&&a.diagnostics!==e.diagnostics;pe.current={transcriptLength:a.transcript.length,choices:a.choices,diagnostics:a.diagnostics},n&&T({type:`attention.received`})},[a.transcript.length,a.choices,a.diagnostics]);let me=(0,v.useRef)(a.model);(0,v.useEffect)(()=>{a.model!==me.current&&(me.current=a.model,T({type:`model.replaced`,graph:a.model?.graph??null}))},[a.model]);let he=a.model===null?a.lifecycle===`connecting`?`Reading the session`:`No model to draw`:E,ge=a.pendingChangeset.operations.length+a.pendingChangeset.viewOperations.length,_e=e=>!w.conversation.collapsed.includes(e),ve=a.model?.interrogation,ye=(0,v.useMemo)(()=>new Map(Object.entries(ve?.subjects??{}).map(([e,t])=>[e,t.length])),[ve]),be=n?t.filter(e=>e!==`palette`&&e!==`changes`):t,xe=ve===void 0?be.filter(e=>e!==`questions`):be,Se=w.selectedSubject?.type===`element`?w.selectedSubject.id:null,Ce=ve===void 0?void 0:Se===null?ve.workspace.length:ye.get(Se)??0,we=a.model?.vocabulary.conceptKinds??[],Te=(0,v.useMemo)(()=>new Set(w.tree.collapsed),[w.tree.collapsed]),Ee=w.conversation.hidden,De={"--conversation-width":Ee?`0px`:`${w.conversation.width}px`,"--changes-height":_e(`changes`)?`${w.conversation.changesHeight}px`:`auto`,"--chat-height":_e(`chat`)?`${w.conversation.chatHeight}px`:`auto`},Oe=e=>{se(e),T({type:`subject.draft.opened`})},ke=(e,t)=>T({type:`menu.opened`,target:e,x:t.x,y:t.y}),Ae=w.contextMenu===null?[]:Ay(w.contextMenu.target,{graph:a.model?.graph??null,relationshipKinds:a.model?.vocabulary.relationshipKinds??[],activeViewId:a.activeView,filtered:a.activeFilter!==null,membership:pae(a),readOnly:n}),je=e=>{let t=a.model?.graph??null;switch(e.type){case`subject.inspect`:{let n=t?.nodes.find(t=>t.id===e.id);if(n===void 0)return;T({type:`subject.selected`,subject:Vv(n)});return}case`relationship.inspect`:{let n=t?.edges.find(t=>t.id===e.id);if(n===void 0||t===null)return;T({type:`subject.selected`,subject:Hv(n,new Map(t.nodes.map(e=>[e.id,e.name])))});return}case`subject.connect`:T({type:`connection.started`,from:e.from});return;case`subject.delete`:case`relationship.delete`:T({type:`deletion.asked`,id:e.id});return;case`relationship.retype`:{let n=t?.edges.find(t=>t.id===e.id);if(n===void 0)return;for(let t of Cv(n.document,n.localId,`kind`,n.kindLabel,e.kind))_(t);T({type:`menu.dismissed`});return}case`canvas.draft-subject`:se(void 0),T({type:`subject.draft.opened`});return;case`view.add-subject`:case`view.remove-subject`:m(a.activeView,e.id,e.type===`view.add-subject`?`add`:`remove`),T({type:`menu.dismissed`});return;case`view.open`:l(e.id),T({type:`menu.dismissed`});return;case`view.clear`:d(),T({type:`menu.dismissed`});return;case`view.new`:ae(void 0),te(!0),T({type:`menu.dismissed`});return;case`view.delete`:T({type:`viewDeletion.asked`,id:e.id});return;case`view.rename`:T({type:`viewRename.asked`,id:e.id});return;case`view.new-folder`:re(!0),T({type:`menu.dismissed`});return;case`view.duplicate`:{let t=a.views.find(t=>t.id===e.id);if(t===void 0)return;let n=x_(t,new Set(a.views.map(e=>e.id)));p({op:`write-view`,...n}),T({type:`menu.dismissed`});return}case`view.new-in-folder`:{let t=a.views.find(t=>t.id===e.id);if(t===void 0)return;ae(Zre(t)),te(!0),T({type:`menu.dismissed`});return}case`view.copy-path`:{let t=a.views.find(t=>t.id===e.id);if(t===void 0)return;navigator.clipboard?.writeText(t.path),T({type:`menu.dismissed`});return}case`canvas.export-png`:{let e=ue.current;if(e===null)return;let t=document.createElement(`a`);t.href=e(),t.download=`${a.activeView===``?`all-subjects`:a.activeView}.png`,t.click(),T({type:`menu.dismissed`});return}}},Me=w.pendingViewDeletion===null?null:a.views.find(e=>e.id===w.pendingViewDeletion)??null,Ne=w.pendingViewRename===null?null:a.views.find(e=>e.id===w.pendingViewRename)??null,Pe=[`Show the session panel`,...w.conversation.unread===0?[]:[`${w.conversation.unread} unread`],...a.choices===null?[]:[`the agent is waiting on a choice`]].join(`, `);return(0,k.jsxs)(`main`,{className:`visual-shell`,style:De,children:[(0,k.jsx)(Fy,{state:a,connection:Tae(a,o)}),(0,k.jsxs)(`div`,{className:`workspace`,children:[(0,k.jsx)(Tie,{views:a.views,stagedViewOperations:a.pendingChangeset.viewOperations,activeViewId:a.activeView,nodes:a.model?.graph.nodes??[],inViewIds:a.activeFilter===null?null:new Set(a.activeFilter.matchedIds),filterText:w.tree.filterText,collapsed:Te,onFilterChange:e=>T({type:`tree.filtered`,filterText:e}),onToggle:e=>T({type:`tree.toggled`,key:e}),onSelectView:e=>l(e),onClearView:d,onNewView:()=>{ae(void 0),te(!0)},onSelectSubject:e=>{let t=a.model?.graph.nodes.find(t=>t.id===e);t!==void 0&&T({type:`subject.selected`,subject:Vv(t)})},onRowMenu:(e,t)=>ke(e.kind===`view`?{kind:`view-row`,id:e.id}:{kind:`model-row`,id:e.id},t),readOnly:n}),(0,k.jsx)(kae,{state:a,selectedId:w.selectedSubject?.id??null,waiting:he,layout:w.layout,nesting:w.nesting,direction:w.direction,decorations:ce,connection:w.connection,onConnectTarget:e=>T({type:`connection.targeted`,to:e}),onConnectCancel:()=>T({type:`connection.cancelled`}),onConnectStage:_,onDraftStage:e=>{_(e),e.op===`add-concept`&&m(a.activeView,e.concept.id,`add`)},draftingSubject:w.draftingSubject,draftInitialKind:oe,onKindDrop:e=>Oe(e),onDraftSubject:()=>{se(void 0),T({type:`subject.draft.opened`})},onDraftSubjectClose:()=>T({type:`subject.draft.closed`}),pendingDeletion:w.pendingDeletion,onDeletionDismiss:()=>T({type:`deletion.dismissed`}),showLifecycle:w.showLifecycle,showEvidence:w.showEvidence,showOwnership:w.showOwnership,showNudges:w.showNudges,openQuestionCounts:ye,onSelect:e=>T({type:`subject.selected`,subject:e}),onCanvasMenu:(e,t)=>ke(e.type===`node`?{kind:`subject`,id:e.id??``}:e.type===`edge`?{kind:`relationship`,id:e.id??``}:{kind:`canvas`},t),onClearFilter:d,onSaveLayout:h,onCanvasReady:e=>{ue.current=e},onQuickFilterChange:f,view:a.views.find(e=>e.id===a.activeView)??null,bottomPanel:w.bottomPanel,onTogglePresentation:(e,t)=>T({type:`presentation.toggled`,flag:e,value:t}),onToggleBottomPanel:()=>T({type:`bottomPanel.toggled`}),onSelectBottomTab:e=>T({type:`bottomPanel.tabSelected`,tab:e}),onApplyFilter:e=>u(e,`editor`),onStageView:p,readOnly:n}),Ee?(0,k.jsxs)(`button`,{type:`button`,className:`conversation-reopen`,title:`Show the session panel`,"aria-label":Pe,onClick:()=>T({type:`conversation.toggled`}),children:[(0,k.jsx)(`span`,{className:`reopen-chevron`,"aria-hidden":`true`,children:`«`}),w.conversation.unread===0?null:(0,k.jsx)(`span`,{className:`attention-count`,children:w.conversation.unread}),a.choices===null?null:(0,k.jsx)(`span`,{className:`attention-choice`,title:`The agent is waiting on a choice`,children:`?`})]}):(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(Ry,{width:w.conversation.width,viewportWidth:w.viewportWidth,onResize:e=>T({type:`conversation.resized`,width:e})}),(0,k.jsxs)(`aside`,{className:`section-stack`,"aria-label":`Session`,children:[(0,k.jsx)(`div`,{className:`stack-rim`,children:(0,k.jsx)(`button`,{type:`button`,className:`conversation-hide`,title:`Hide the session panel`,"aria-label":`Hide the session panel`,onClick:()=>T({type:`conversation.toggled`}),children:`»`})}),ty(xe,{palette:(0,k.jsx)($v,{id:`palette`,label:`Kind palette`,meta:we.length===0?void 0:we.length===1?`1 kind`:`${we.length} kinds`,open:_e(`palette`),onToggle:()=>T({type:`section.toggled`,section:`palette`}),children:we.length===0?(0,k.jsx)(`p`,{className:`section-empty`,children:`No model yet. The kinds arrive with it.`}):(0,k.jsx)(Tne,{kinds:we,onPick:Oe})}),properties:(0,k.jsx)($v,{id:`properties`,label:`Element properties`,meta:w.selectedSubject?.id,open:_e(`properties`),onToggle:()=>T({type:`section.toggled`,section:`properties`}),children:w.selectedSubject===null||a.model===null?(0,k.jsx)(`p`,{className:`section-empty`,children:`Nothing selected. Pick a subject on the canvas or in the rail.`}):(0,k.jsx)(jae,{subject:w.selectedSubject,model:a.model,operations:a.pendingChangeset.operations,expanded:w.descriptionExpanded,onToggleDescription:()=>T({type:`description.toggled`}),onClear:()=>T({type:`subject.cleared`}),onConnect:e=>T({type:`connection.started`,from:e}),onDelete:e=>T({type:`deletion.asked`,id:e}),onStageChange:_,readOnly:n})}),questions:(0,k.jsx)($v,{id:`questions`,label:`Open questions`,meta:Ce===void 0?void 0:Ce===0?`nothing open`:`${Ce} open`,open:_e(`questions`),onToggle:()=>T({type:`section.toggled`,section:`questions`}),children:ve===void 0?null:(0,k.jsx)($ie,{overlay:ve,selectedId:Se})}),changes:(0,k.jsx)($v,{id:`changes`,label:`Changes`,meta:ge===0?`nothing staged`:`${ge} staged`,open:_e(`changes`),onToggle:()=>T({type:`section.toggled`,section:`changes`}),children:(0,k.jsx)(Iie,{state:a,onDiscardChange:g,onClearChangeset:y,onUndoChangeset:b,onRedoChangeset:x,onCommitChangeset:S})}),chat:(0,k.jsx)($v,{id:`chat`,label:`Chat`,meta:w.conversation.unread===0?Iy(a):(0,k.jsx)(`span`,{className:`attention-count`,children:w.conversation.unread}),open:_e(`chat`),onToggle:()=>T({type:`section.toggled`,section:`chat`}),children:(0,k.jsx)(Ly,{state:a,disabled:!a.composerEnabled,selectedSubject:w.selectedSubject,onSend:e=>s(Qv(e,w.selectedSubject)),onChoice:c,onClearSubject:()=>T({type:`subject.cleared`}),onEnd:C})})},{changes:(0,k.jsx)(ey,{label:`Resize the changes section`,height:w.conversation.changesHeight,viewportHeight:w.viewportHeight,onResize:e=>T({type:`section.resized`,section:`changes`,height:e})}),chat:(0,k.jsx)(ey,{label:`Resize the chat section`,height:w.conversation.chatHeight,viewportHeight:w.viewportHeight,onResize:e=>T({type:`section.resized`,section:`chat`,height:e})})})]})]})]}),w.contextMenu===null?null:(0,k.jsx)(My,{groups:Ae,x:w.contextMenu.x,y:w.contextMenu.y,onChoose:je,onDismiss:()=>T({type:`menu.dismissed`})}),(0,k.jsx)(Oie,{views:a.views,activeViewId:a.activeView,query:a.activeFilter?.query??null,layout:w.layout,showLifecycle:w.showLifecycle,showEvidence:w.showEvidence,showOwnership:w.showOwnership,open:ee,folder:ie,onClose:()=>te(!1),onStage:p}),ne?(0,k.jsx)(by,{title:`New folder`,label:`Folder`,initialValue:``,confirmLabel:`Continue`,cancelLabel:`Cancel`,onConfirm:e=>{re(!1);let t=e.trim();t!==``&&(ae(t),te(!0))},onCancel:()=>re(!1)}):null,Ne===null?null:(0,k.jsx)(by,{title:`Rename view`,label:`Title`,initialValue:Ne.title,confirmLabel:`Rename`,cancelLabel:`Cancel`,onConfirm:e=>{p({op:`write-view`,...Qre(Ne,e)}),T({type:`viewRename.dismissed`})},onCancel:()=>T({type:`viewRename.dismissed`})}),Me===null?null:(0,k.jsx)(yy,{title:`Delete view`,message:`Stage the removal of "${Me.title}"? The projection document goes when the changeset is committed; no subject is touched.`,confirmLabel:`Delete`,cancelLabel:`Keep`,onConfirm:()=>{p({op:`delete-view`,path:Me.path}),T({type:`viewDeletion.dismissed`})},onCancel:()=>T({type:`viewDeletion.dismissed`})})]})},By=`/api/session`,Mae=`/socket`,Nae=1e3,Vy=()=>{let e=null;return{open:t=>{let n=!1,r,i=null,a=()=>{let e=new URL(Mae,window.location.href);return e.protocol=e.protocol===`https:`?`wss:`:`ws:`,e.searchParams.set(`after`,String(t.session().lastSequence)),e},o=()=>{if(!n){if(i??=Date.now(),!cy(i,Date.now())){t.frame({kind:`closing`,reason:`browser-timeout`});return}r=setTimeout(s,Nae)}},s=()=>{if(n)return;let r=new WebSocket(a());e=r,r.addEventListener(`open`,()=>{i=null,t.connected(!0)}),r.addEventListener(`message`,e=>{if(typeof e.data==`string`)try{t.frame(JSON.parse(e.data))}catch{}}),r.addEventListener(`close`,()=>{t.connected(!1),e=null,!(n||t.session().closed)&&(t.lost(),o())}),r.addEventListener(`error`,()=>r.close())};return(async()=>{let e=await fetch(By,{credentials:`same-origin`,headers:{Accept:`application/json`}});if(!e.ok)throw Error(`Session request answered ${e.status}`);let r=await e.json();n||(t.frame({kind:`ready`,snapshot:r}),s())})().catch(()=>{n||(t.lost(),o())}),()=>{n=!0,r!==void 0&&clearTimeout(r),e?.close()}},send:t=>{e!==null&&e.readyState===WebSocket.OPEN&&e.send(JSON.stringify(t))}}},Pae=document.getElementById(`visual-session`);if(Pae===null)throw Error(`The visual session page has no mount point`);(0,y.createRoot)(Pae).render((0,k.jsx)(zy,{host:Vy()}));
394
+ `}var Wre=class e{constructor(e,t,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,Dh,{value:Sh});let r=null;typeof t==`function`||Array.isArray(t)?r=t:n===void 0&&t&&(n=t,t=void 0);let i=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:`warn`,prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:`1.2`},n);this.options=i;let{version:a}=i;n?._directives?(this.directives=n._directives.atDocument(),this.directives.yaml.explicit&&(a=this.directives.yaml.version)):this.directives=new Uh({version:a}),this.setSchema(a,n),this.contents=e===void 0?null:this.createNode(e,r,n)}clone(){let t=Object.create(e.prototype,{[Dh]:{value:Sh}});return t.commentBefore=this.commentBefore,t.comment=this.comment,t.errors=this.errors.slice(),t.warnings=this.warnings.slice(),t.options=Object.assign({},this.options),this.directives&&(t.directives=this.directives.clone()),t.schema=this.schema.clone(),t.contents=Fh(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(e){h_(this.contents)&&this.contents.add(e)}addIn(e,t){h_(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){let n=fre(this);e.anchor=!t||n.has(t)?pre(t||`a`,n):t}return new hre(e.anchor)}createNode(e,t,n){let r;if(typeof t==`function`)e=t.call({"":e},``,e),r=t;else if(Array.isArray(t)){let e=t.filter(e=>typeof e==`number`||e instanceof String||e instanceof Number).map(String);e.length>0&&(t=t.concat(e)),r=t}else n===void 0&&t&&(n=t,t=void 0);let{aliasDuplicateObjects:i,anchorPrefix:a,flow:o,keepUndefined:s,onTagObj:c,tag:l}=n??{},{onAnchor:u,setAnchors:d,sourceObjects:f}=mre(this,a||`a`),p={aliasDuplicateObjects:i??!0,keepUndefined:s??!1,onAnchor:u,onTagObj:c,replacer:r,schema:this.schema,sourceObjects:f},m=Qh(e,l,p);return o&&Ph(m)&&(m.flow=!0),d(),m}createPair(e,t,n={}){return new wg(this.createNode(e,null,n),this.createNode(t,null,n))}delete(e){return h_(this.contents)?this.contents.delete(e):!1}deleteIn(e){return eg(e)?this.contents!=null&&(this.contents=null,!0):h_(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return Ph(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return eg(e)?!t&&Mh(this.contents)?this.contents.value:this.contents:Ph(this.contents)?this.contents.getIn(e,t):void 0}has(e){return Ph(this.contents)?this.contents.has(e):!1}hasIn(e){return eg(e)?this.contents!==void 0:Ph(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=$h(this.schema,[e],t):h_(this.contents)&&this.contents.set(e,t)}setIn(e,t){eg(e)?this.contents=t:this.contents==null?this.contents=$h(this.schema,Array.from(e),t):h_(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){typeof e==`number`&&(e=String(e));let n;switch(e){case`1.1`:this.directives?this.directives.yaml.version=`1.1`:this.directives=new Uh({version:`1.1`}),n={resolveKnownTags:!1,schema:`yaml-1.1`};break;case`1.2`:case`next`:this.directives?this.directives.yaml.version=e:this.directives=new Uh({version:e}),n={resolveKnownTags:!0,schema:`core`};break;case null:this.directives&&delete this.directives,n=null;break;default:{let t=JSON.stringify(e);throw Error(`Expected '1.1', '1.2' or null as first argument, but found: ${t}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(n)this.schema=new m_(Object.assign(n,t));else throw Error(`With a null YAML version, the { schema: Schema } option is required`)}toJS({json:e,jsonArg:t,mapAsMap:n,maxAliasCount:r,onAnchor:i,reviver:a}={}){let o={anchors:new Map,doc:this,keep:!e,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof r==`number`?r:100},s=Gh(this.contents,t??``,o);if(typeof i==`function`)for(let{count:e,res:t}of o.anchors.values())i(t,e);return typeof a==`function`?Wh(a,{"":s},``,s):s}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw Error(`Document with errors cannot be stringified`);if(`indent`in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){let t=JSON.stringify(e.indent);throw Error(`"indent" option must be a positive integer, not ${t}`)}return Ure(this,e)}};function h_(e){if(Ph(e))return!0;throw Error(`Expected a YAML collection as document contents`)}var g_=Symbol(`break visit`),Gre=Symbol(`skip children`),__=Symbol(`remove item`);function v_(e,t){`type`in e&&e.type===`document`&&(e={start:e.start,value:e.value}),y_(Object.freeze([]),e,t)}v_.BREAK=g_,v_.SKIP=Gre,v_.REMOVE=__,v_.itemAtPath=(e,t)=>{let n=e;for(let[e,r]of t){let t=n?.[e];if(t&&`items`in t)n=t.items[r];else return}return n},v_.parentCollection=(e,t)=>{let n=v_.itemAtPath(e,t.slice(0,-1)),r=t[t.length-1][0],i=n?.[r];if(i&&`items`in i)return i;throw Error(`Parent collection not found`)};function y_(e,t,n){let r=n(t,e);if(typeof r==`symbol`)return r;for(let i of[`key`,`value`]){let a=t[i];if(a&&`items`in a){for(let t=0;t<a.items.length;++t){let r=y_(Object.freeze(e.concat([[i,t]])),a.items[t],n);if(typeof r==`number`)t=r-1;else if(r===g_)return g_;else r===__&&(a.items.splice(t,1),--t)}typeof r==`function`&&i===`key`&&(r=r(t,e))}}return typeof r==`function`?r(t,e):r}function Kre(e,t,n){let r=null;if(typeof t==`function`||Array.isArray(t)?r=t:n===void 0&&t&&(n=t),typeof n==`string`&&(n=n.length),typeof n==`number`){let e=Math.round(n);n=e<1?void 0:e>8?{indent:8}:{indent:e}}if(e===void 0){let{keepUndefined:e}=n??t??{};if(!e)return}return kh(e)&&!r?e.toString(n):new Wre(e,r,n).toString(n)}var qre=`.yarramate/projections`,Jre=e=>{let t=e.toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``);return t.length===0?`view`:/^[a-z]/.test(t)?t:`view-${t}`},Yre=(e,t)=>{if(!t.has(e))return e;let n=2;for(;t.has(`${e}-${n}`);)n+=1;return`${e}-${n}`},Xre=(e,t)=>Yre(Jre(e),t),b_=e=>`${qre}/${e}.yaml`,Zre=e=>e.presentation?.folder??``,Qre=(e,t)=>({path:e.path,projection:S_({id:e.id,title:t,description:e.description,query:e.query,presentation:e.presentation})}),x_=(e,t)=>{let n=`${e.title} copy`,r=Xre(n,t);return{path:b_(r),projection:S_({id:r,title:n,description:e.description,query:e.query,presentation:e.presentation})}},S_=e=>({format:`yarramate/projection/v1`,id:e.id,version:`1.0`,query:e.query,presentation:{...e.presentation??{},title:e.title,description:e.description}}),C_=e=>e.subjects!==void 0,w_=(e,t,n)=>{if(!C_(e.query))return $re(e,t,n);let r=e.query.subjects,i=r.includes(t);return(n===`add`?i:!i)?null:{...e,query:{...e.query,subjects:n===`add`?[...r,t]:r.filter(e=>e!==t)}}},$re=(e,t,n)=>{let r=e.query.exclude??[],i=r.includes(t);if(n===`add`?!i:i)return null;let a=n===`add`?r.filter(e=>e!==t):[...r,t],{exclude:o,...s}=e.query;return{...e,query:a.length===0?s:{...s,exclude:a}}},T_=(e,t)=>{if(!C_(e)&&!C_(t)){let n=e.exclude??[],r=t.exclude??[];return[...n.filter(e=>!r.includes(e)).map(e=>`+${e}`),...r.filter(e=>!n.includes(e)).map(e=>`-${e}`)]}return!C_(e)||!C_(t)?[]:[...t.subjects.filter(t=>!e.subjects.includes(t)).map(e=>`+${e}`),...e.subjects.filter(e=>!t.subjects.includes(e)).map(e=>`-${e}`)]},eie=(e,t)=>E_(e)===E_(t),E_=e=>Array.isArray(e)?`[${e.map(E_).join(`,`)}]`:typeof e==`object`&&e?`{${Object.entries(e).filter(([,e])=>e!==void 0).sort(([e],[t])=>e<t?-1:1).map(([e,t])=>`${JSON.stringify(e)}:${E_(t)}`).join(`,`)}}`:JSON.stringify(e)??`null`,tie={subjects:[],documents:[],kinds:[],layers:[],statuses:[],excludeStatuses:[],states:[],owners:[],constraints:[],relationshipKinds:[],kindMatching:``,relationships:``,isolatedConcepts:``},nie=[`planned`,`current`,`retired`],rie=e=>e===null?tie:{subjects:e.subjects??[],documents:e.documents??[],kinds:e.kinds??[],layers:e.layers??[],statuses:e.statuses??[],excludeStatuses:e.excludeStatuses??[],states:e.states??[],owners:e.owners??[],constraints:e.constraints??[],relationshipKinds:e.relationshipKinds??[],kindMatching:e.kindMatching??``,relationships:e.relationships??``,isolatedConcepts:e.isolatedConcepts??``},iie=e=>({...e.subjects.length>0?{subjects:e.subjects}:{},...e.documents.length>0?{documents:e.documents}:{},...e.kinds.length>0?{kinds:e.kinds}:{},...e.layers.length>0?{layers:e.layers}:{},...e.statuses.length>0?{statuses:e.statuses}:{},...e.excludeStatuses.length>0?{excludeStatuses:e.excludeStatuses}:{},...e.states.length>0?{states:e.states}:{},...e.owners.length>0?{owners:e.owners}:{},...e.constraints.length>0?{constraints:e.constraints}:{},...e.relationshipKinds.length>0?{relationshipKinds:e.relationshipKinds}:{},...e.kindMatching===``?{}:{kindMatching:e.kindMatching},...e.relationships===``?{}:{relationships:e.relationships},...e.isolatedConcepts===``?{}:{isolatedConcepts:e.isolatedConcepts}}),D_=({id:e,label:t,values:n,onChange:r})=>{let[i,a]=(0,v.useState)(``),o=()=>{let e=i.trim();a(``),!(e===``||n.includes(e))&&r([...n,e])};return(0,k.jsxs)(`div`,{className:`filter-field`,children:[(0,k.jsx)(`label`,{htmlFor:e,children:t}),(0,k.jsxs)(`div`,{className:`tag-input`,children:[n.map(e=>(0,k.jsxs)(`span`,{className:`tag-chip`,children:[e,(0,k.jsx)(`button`,{type:`button`,"aria-label":`Remove ${e}`,onClick:()=>r(n.filter(t=>t!==e)),children:`×`})]},e)),(0,k.jsx)(`input`,{id:e,type:`text`,value:i,placeholder:`Add…`,onChange:e=>a(e.target.value),onKeyDown:e=>{e.key===`Enter`||e.key===`,`?(e.preventDefault(),o()):e.key===`Backspace`&&i===``&&n.length>0&&r(n.slice(0,-1))},onBlur:o})]})]})},O_=({legend:e,values:t,onChange:n})=>(0,k.jsxs)(`fieldset`,{className:`filter-field filter-checkbox-group`,children:[(0,k.jsx)(`legend`,{children:e}),nie.map(e=>(0,k.jsxs)(`label`,{className:`filter-checkbox-option`,children:[(0,k.jsx)(`input`,{type:`checkbox`,checked:t.includes(e),onChange:r=>n(r.target.checked?[...t,e]:t.filter(t=>t!==e))}),e]},e))]}),k_=({id:e,label:t,value:n,options:r,onChange:i})=>(0,k.jsxs)(`div`,{className:`filter-field`,children:[(0,k.jsx)(`label`,{htmlFor:e,children:t}),(0,k.jsxs)(`select`,{id:e,value:n,onChange:e=>i(e.target.value),children:[(0,k.jsx)(`option`,{value:``,children:`Any`}),r.map(e=>(0,k.jsx)(`option`,{value:e,children:e},e))]})]}),A_=(e,t)=>n=>e(t,n);function aie({fields:e,onChange:t}){return(0,k.jsxs)(`div`,{className:`filter-grid`,children:[(0,k.jsx)(D_,{id:`filter-subjects`,label:`Subjects`,values:e.subjects,onChange:e=>t(`subjects`,e)}),(0,k.jsx)(D_,{id:`filter-documents`,label:`Documents`,values:e.documents,onChange:e=>t(`documents`,e)}),(0,k.jsx)(D_,{id:`filter-kinds`,label:`Kinds`,values:e.kinds,onChange:e=>t(`kinds`,e)}),(0,k.jsx)(D_,{id:`filter-layers`,label:`Layers`,values:e.layers,onChange:e=>t(`layers`,e)}),(0,k.jsx)(D_,{id:`filter-states`,label:`States`,values:e.states,onChange:e=>t(`states`,e)}),(0,k.jsx)(D_,{id:`filter-owners`,label:`Owners`,values:e.owners,onChange:e=>t(`owners`,e)}),(0,k.jsx)(D_,{id:`filter-constraints`,label:`Constraints`,values:e.constraints,onChange:e=>t(`constraints`,e)}),(0,k.jsx)(D_,{id:`filter-relationship-kinds`,label:`Relationship kinds`,values:e.relationshipKinds,onChange:e=>t(`relationshipKinds`,e)}),(0,k.jsx)(O_,{legend:`Statuses`,values:e.statuses,onChange:e=>t(`statuses`,e)}),(0,k.jsx)(O_,{legend:`Exclude statuses`,values:e.excludeStatuses,onChange:e=>t(`excludeStatuses`,e)}),(0,k.jsx)(k_,{id:`filter-kind-matching`,label:`Kind matching`,value:e.kindMatching,options:[`exact`,`descendants`],onChange:e=>t(`kindMatching`,e)}),(0,k.jsx)(k_,{id:`filter-relationships`,label:`Relationships`,value:e.relationships,options:[`between`,`connected`,`none`],onChange:e=>t(`relationships`,e)}),(0,k.jsx)(k_,{id:`filter-isolated-concepts`,label:`Isolated concepts`,value:e.isolatedConcepts,options:[`include`,`exclude`],onChange:e=>t(`isolatedConcepts`,e)})]})}function j_({showLifecycle:e,showEvidence:t,showOwnership:n,showNudges:r,onTogglePresentation:i}){return(0,k.jsxs)(`fieldset`,{className:`filter-field filter-presentation-group`,children:[(0,k.jsx)(`legend`,{children:`Presentation`}),(0,k.jsxs)(`label`,{className:`filter-checkbox-option`,children:[(0,k.jsx)(`input`,{type:`checkbox`,checked:e,onChange:e=>A_(i,`showLifecycle`)(e.currentTarget.checked)}),`Lifecycle badges`]}),(0,k.jsxs)(`label`,{className:`filter-checkbox-option`,children:[(0,k.jsx)(`input`,{type:`checkbox`,checked:t,onChange:e=>A_(i,`showEvidence`)(e.currentTarget.checked)}),`Evidence badges`]}),(0,k.jsxs)(`label`,{className:`filter-checkbox-option`,children:[(0,k.jsx)(`input`,{type:`checkbox`,checked:n,onChange:e=>A_(i,`showOwnership`)(e.currentTarget.checked)}),`Ownership badges`]}),(0,k.jsxs)(`label`,{className:`filter-checkbox-option`,children:[(0,k.jsx)(`input`,{type:`checkbox`,checked:r,onChange:e=>A_(i,`showNudges`)(e.currentTarget.checked)}),`Open-question badges`]})]})}var M_=[{id:`view-query`,label:`View query`}],N_=e=>JSON.stringify(Object.entries(e??{}).sort(([e],[t])=>e<t?-1:1)),P_=(e,t)=>N_(e)===N_(t),F_={exclude:`Taken out of this view`,states:`States`,subjects:`Subjects`,documents:`Documents`,kinds:`Kinds`,layers:`Layers`,statuses:`Statuses`,excludeStatuses:`Excluded statuses`,owners:`Owners`,constraints:`Constraints`,isolatedConcepts:`Isolated concepts`,unreported:`Not reported`},oie=Object.keys(F_),sie=(e,t,n)=>{if(t===null)return[];let r=new Set(t),i=n===null?null:new Map(n.map(({id:e,facet:t})=>[e,t])),a=new Map;for(let t of e){if(r.has(t.id))continue;let e=i===null?`unreported`:i.get(t.id)??`isolatedConcepts`,n=a.get(e)??[];n.push({id:t.id,title:t.name}),a.set(e,n)}return oie.flatMap(e=>{let t=a.get(e);return t===void 0?[]:[{reason:e,label:F_[e],subjects:t}]})},cie=(e,t)=>{if(t===null)return e.length;let n=new Set(t);return e.filter(e=>n.has(e.id)).length},I_=(e,t)=>{if(e===null||t===null)return 0;let n=new Set(e);return t.filter(({id:e})=>n.has(e)).length},lie=(e,t,n)=>{let r=e.presentation??{},i=e=>r[e]!==void 0||t[e]!==n[e]?{[e]:t[e]}:{};return{...r,...i(`showLifecycle`),...i(`showEvidence`),...i(`showOwnership`)}},uie=({view:e,query:t,badges:n,opened:r})=>S_({id:e.id,title:e.title,description:e.description,query:t,presentation:lie(e,n,r)}),die=e=>({op:`write-view`,path:e.view.path,projection:uie(e)}),fie=e=>{let t=uie(e),n=S_({id:e.view.id,title:e.view.title,description:e.view.description,query:e.view.query,presentation:e.view.presentation});return N_(t.query)!==N_(n.query)||N_(t.presentation)!==N_(n.presentation)};function pie({nodes:e,activeFilter:t,view:n,open:r,tab:i,showLifecycle:a,showEvidence:o,showOwnership:s,showNudges:c,onTogglePresentation:l,onToggleOpen:u,onSelectTab:d,onApply:f,onStage:p,readOnly:m=!1}){let h=(0,v.useRef)(null),[g,_]=(0,v.useState)(()=>rie(n?.query??t?.query??null)),[y,b]=(0,v.useState)(!1),[x]=(0,v.useState)(()=>({showLifecycle:a,showEvidence:o,showOwnership:s})),S=e=>{h.current!==null&&window.clearTimeout(h.current),h.current=window.setTimeout(()=>{h.current=null,f(iie(e))},300)},C=(e,t)=>{b(!1),_(n=>{let r={...n,[e]:t};return S(r),r})},w=iie(g),T=t?.matchedIds??null,E=cie(e,T),D=sie(e,T,t?.excluded??null),ee=I_(T,t?.excluded??null),te=t===null?Object.keys(w).length===0:P_(w,t.query),ne=n===null?null:{view:n,query:w,badges:{showLifecycle:a,showEvidence:o,showOwnership:s},opened:x};return(0,k.jsxs)(`section`,{className:`bottom-panel`,"aria-label":`Canvas panels`,children:[(0,k.jsxs)(`div`,{className:`bottom-panel-tabs`,role:`tablist`,"aria-label":`Canvas panels`,children:[M_.map(e=>(0,k.jsx)(`button`,{type:`button`,role:`tab`,id:`bottom-tab-${e.id}`,className:`bottom-panel-tab`,"aria-selected":r&&i===e.id,"aria-controls":`bottom-panel-${e.id}`,onClick:()=>{if(r&&i===e.id){u();return}d(e.id)},children:e.label},e.id)),(0,k.jsxs)(`span`,{className:`bottom-panel-summary`,role:`status`,children:[E,` `,E===1?`subject`:`subjects`,D.length===0?``:` · ${D.reduce((e,t)=>e+t.subjects.length,0)} excluded`]}),(0,k.jsx)(`button`,{type:`button`,className:`bottom-panel-collapse`,"aria-expanded":r,"aria-controls":`bottom-panel-${i}`,"aria-label":r?`Collapse panel`:`Expand panel`,onClick:u,children:r?`▾`:`▴`})]}),r?(0,k.jsx)(`div`,{className:`bottom-panel-body`,id:`bottom-panel-${i}`,role:`tabpanel`,"aria-labelledby":`bottom-tab-${i}`,children:(0,k.jsxs)(`div`,{className:`query-tab`,children:[(0,k.jsxs)(`div`,{className:`query-tab-fields`,children:[(0,k.jsx)(aie,{fields:g,onChange:C}),(0,k.jsx)(j_,{showLifecycle:a,showEvidence:o,showOwnership:s,showNudges:c,onTogglePresentation:l})]}),(0,k.jsxs)(`div`,{className:`query-tab-outcome`,children:[(0,k.jsx)(`h3`,{children:`Matches`}),(0,k.jsxs)(`p`,{className:`query-match-count`,children:[(0,k.jsx)(`strong`,{children:E}),` `,E===1?`subject`:`subjects`,` of `,e.length]}),te?null:(0,k.jsx)(`p`,{className:`query-outcome-stale`,children:`Describing the query on the canvas, not the edit in progress.`}),E===0&&T!==null?(0,k.jsx)(`p`,{className:`query-outcome-empty`,children:`This query selects nothing.`}):null,ee===0?null:(0,k.jsxs)(`p`,{className:`query-outcome-note`,children:[ee,` a facet dropped `,ee===1?`is`:`are`,` drawn anyway: `,(0,k.jsx)(`code`,{children:`relationships: connected`}),` takes the other end of a relationship with it.`]}),(0,k.jsx)(`h3`,{children:`Excluded, and why`}),D.length===0?(0,k.jsx)(`p`,{className:`query-outcome-note`,children:`Nothing is left out of this view.`}):(0,k.jsx)(`ul`,{className:`query-exclusions`,children:D.map(e=>(0,k.jsxs)(`li`,{children:[(0,k.jsx)(`span`,{className:`query-exclusion-facet`,children:e.label}),` `,(0,k.jsx)(`span`,{className:`query-exclusion-count`,children:e.subjects.length}),(0,k.jsxs)(`ul`,{children:[e.subjects.slice(0,12).map(e=>(0,k.jsx)(`li`,{title:e.id,children:e.title},e.id)),e.subjects.length>12?(0,k.jsxs)(`li`,{className:`query-exclusion-more`,children:[`and `,e.subjects.length-12,` more`]}):null]})]},e.reason))})]}),(0,k.jsxs)(`div`,{className:`query-tab-document`,children:[(0,k.jsx)(`h3`,{children:`Document`}),ne===null?(0,k.jsx)(`p`,{className:`query-outcome-note`,children:m?`No view is active, so this query has no document. Pick one in the tree.`:`No view is active, so this query has no document yet. Pick one in the tree, or save this query as a new view.`}):(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(`pre`,{className:`query-document`,children:Kre(uie(ne))}),m?null:(0,k.jsxs)(`div`,{className:`query-tab-actions`,children:[(0,k.jsx)(`button`,{type:`button`,disabled:!fie(ne),onClick:()=>{p(die(ne)),b(!0)},children:`Stage view change`}),(0,k.jsx)(`span`,{role:`status`,className:`query-stage-status`,children:y?`Staged. It lands when the changeset is committed.`:``})]})]})]})]})}):null]})}function mie({value:e,onChange:t}){return(0,k.jsx)(`input`,{type:`search`,className:`quick-filter`,value:e,onChange:e=>t(e.currentTarget.value),placeholder:`Filter by name or id…`,"aria-label":`Quick filter`})}var hie=`views`,gie=`model`,_ie=e=>`view-folder:${e}`,L_=e=>`model-layer:${e}`,vie=e=>`model-folder:${e}`,yie=`unlayered`,R_=(e,t)=>t===``||e.toLowerCase().includes(t),bie=(e,t)=>R_(e,ch(t)),z_=e=>e.presentation?.folder??``,xie=({views:e,stagedOperations:t,activeViewId:n,activeSubjects:r,filterText:i})=>{let a=ch(i),o=a!==``,s=r===null?null:Ene(r,i),c=new Map,l=(e,t)=>{let n=c.get(e);n===void 0?c.set(e,[t]):n.push(t)},u=new Map;for(let e of t)u.set(e.path,e);for(let t of e){let e=u.get(t.path);u.delete(t.path);let r=e?.op===`write-view`?e.projection:null,i=e===void 0?null:r===null?`delete`:`overwrite`,c=r===null?t.title:r.presentation?.title??r.id,d=r===null?z_(t):r.presentation?.folder??``,f=t.id===n;!R_(c,a)&&!R_(d,a)||l(d,{id:t.id,title:c,path:t.path,subjectCount:f&&s!==null?s:o?null:t.subjectCount,active:f,staged:i})}for(let e of u.values()){if(e.op!==`write-view`)continue;let{projection:t}=e,n=t.presentation?.title??t.id,r=t.presentation?.folder??``;!R_(n,a)&&!R_(r,a)||l(r,{id:t.id,title:n,path:e.path,subjectCount:null,active:!1,staged:`new`})}let d=(e,t)=>e.title.localeCompare(t.title),f=[...c.get(``)??[]].sort(d),p=[...c.entries()].filter(([e])=>e!==``).sort(([e],[t])=>e.localeCompare(t)).map(([e,t])=>({key:_ie(e),name:e,views:[...t].sort(d)}));return{folders:p,loose:f,matched:f.length+p.reduce((e,t)=>e+t.views.length,0)}},B_=({nodes:e,inViewIds:t,filterText:n})=>{let r=ch(n),i=new Map,a=new Map;for(let n of e){let e=n.layer,o=n.folder,s=o??e??`unlayered`;if(!lh(r,n.id,n.name,n.kindLabel)&&!R_(s,r))continue;let c={id:n.id,name:n.name,kindLabel:n.kindLabel,layer:e,folder:o,inView:t===null||t.has(n.id)},l=o===null?a:i,u=l.get(s);u===void 0?l.set(s,[c]):u.push(c)}let o=(e,t)=>e.name.localeCompare(t.name),s=[...i.entries()].sort(([e],[t])=>e.localeCompare(t)).map(([e,t])=>({key:vie(e),label:e,grouping:`folder`,subjects:[...t].sort(o)})),c=[...one,yie];return[...s,...c.flatMap(e=>{let t=a.get(e);return t===void 0||t.length===0?[]:[{key:L_(e),label:e,grouping:`layer`,subjects:[...t].sort(o)}]})]},Sie=`All subjects`,V_=`M2 3.5 5 6.5 8 3.5`,Cie=`M3.5 2 6.5 5 3.5 8`;function wie({open:e}){return(0,k.jsx)(`svg`,{width:`10`,height:`10`,viewBox:`0 0 10 10`,fill:`none`,"aria-hidden":!0,children:(0,k.jsx)(`path`,{d:e?V_:Cie,stroke:`currentColor`,strokeWidth:`1.2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function H_(){return(0,k.jsxs)(`svg`,{width:`12`,height:`12`,viewBox:`0 0 12 12`,fill:`none`,"aria-hidden":!0,children:[(0,k.jsx)(`rect`,{x:`1.5`,y:`2.5`,width:`9`,height:`7`,stroke:`currentColor`,strokeWidth:`1.2`}),(0,k.jsx)(`path`,{d:`M1.5 5h9`,stroke:`currentColor`,strokeWidth:`1.2`})]})}function U_({layer:e}){let t=e===null?null:oh[e];return(0,k.jsx)(`span`,{className:`tree-swatch`,style:t==null?void 0:{background:t.fill,borderColor:t.border},"aria-hidden":!0})}var W_=(e,t)=>n=>{n.preventDefault(),t(e,{x:n.clientX,y:n.clientY})};function G_({row:e,depth:t,onSelect:n,onMenu:r}){let i=e.staged!==`new`;return(0,k.jsx)(`li`,{children:(0,k.jsxs)(`button`,{type:`button`,className:`tree-row tree-view tree-depth-${t}${e.active?` tree-row-active`:``}${e.staged===null?``:` tree-row-staged`}${e.staged===`delete`?` tree-row-staged-delete`:``}`,title:e.title,"aria-current":e.active?`true`:void 0,onClick:i?()=>n(e.id):void 0,onContextMenu:i?W_({kind:`view`,id:e.id},r):void 0,children:[(0,k.jsx)(H_,{}),(0,k.jsx)(`span`,{className:`tree-label`,children:e.title}),e.staged===null?null:(0,k.jsx)(`span`,{className:`tree-staged`,children:e.staged===`delete`?`staged delete`:`staged`}),e.subjectCount===null?null:(0,k.jsx)(`span`,{className:`tree-count`,children:e.subjectCount})]})})}function K_({label:e,open:t,count:n,depth:r,onToggle:i}){return(0,k.jsxs)(`button`,{type:`button`,className:`tree-row tree-branch tree-depth-${r}`,"aria-expanded":t,onClick:i,children:[(0,k.jsx)(wie,{open:t}),(0,k.jsx)(`span`,{className:`tree-label`,children:e}),n===void 0?null:(0,k.jsx)(`span`,{className:`tree-count`,children:n})]})}function Tie({views:e,stagedViewOperations:t,activeViewId:n,nodes:r,inViewIds:i,filterText:a,collapsed:o,onFilterChange:s,onToggle:c,onSelectView:l,onClearView:u,onNewView:d,onSelectSubject:f,onRowMenu:p,readOnly:m=!1}){let h=xie({views:e,stagedOperations:t,activeViewId:n,activeSubjects:i===null?null:r.filter(e=>i.has(e.id)),filterText:a}),g=B_({nodes:r,inViewIds:i,filterText:a}),_=!o.has(hie),v=!o.has(gie),y=a.trim()!==``,b=n===``&&i===null,x=bie(Sie,a);return(0,k.jsxs)(`aside`,{className:`view-tree`,"aria-label":`Views and model`,children:[(0,k.jsxs)(`div`,{className:`view-tree-head`,children:[(0,k.jsx)(`input`,{type:`search`,className:`view-tree-filter`,placeholder:`Filter tree`,"aria-label":`Filter views and subjects`,value:a,onChange:e=>s(e.currentTarget.value)}),m?null:(0,k.jsx)(`button`,{type:`button`,className:`view-tree-new`,title:`New view`,"aria-label":`New view`,onClick:d,children:(0,k.jsx)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 14 14`,fill:`none`,"aria-hidden":!0,children:(0,k.jsx)(`path`,{d:`M7 3v8M3 7h8`,stroke:`currentColor`,strokeWidth:`1.3`,strokeLinecap:`round`})})})]}),(0,k.jsxs)(`div`,{className:`view-tree-body`,children:[(0,k.jsx)(K_,{label:`Views`,open:_,depth:0,onToggle:()=>c(hie)}),_?(0,k.jsxs)(`ul`,{className:`tree-list`,children:[x?(0,k.jsx)(`li`,{children:(0,k.jsxs)(`button`,{type:`button`,className:`tree-row tree-view tree-depth-1${b?` tree-row-active`:``}`,"aria-current":b?`true`:void 0,onClick:u,onContextMenu:W_({kind:`view`,id:``},p),children:[(0,k.jsx)(H_,{}),(0,k.jsx)(`span`,{className:`tree-label`,children:Sie}),(0,k.jsx)(`span`,{className:`tree-count`,children:Ene(r,a)})]})}):null,h.loose.map(e=>(0,k.jsx)(G_,{row:e,depth:1,onSelect:l,onMenu:p},e.id)),h.folders.map(e=>{let t=y||!o.has(e.key);return(0,k.jsxs)(`li`,{children:[(0,k.jsx)(K_,{label:e.name,open:t,count:t?void 0:e.views.length,depth:1,onToggle:()=>c(e.key)}),t?(0,k.jsx)(`ul`,{className:`tree-list`,children:e.views.map(e=>(0,k.jsx)(G_,{row:e,depth:2,onSelect:l,onMenu:p},e.id))}):null]},e.key)}),!y||h.matched!==0||x?null:(0,k.jsx)(`li`,{className:`tree-empty`,children:`No view matches that.`})]}):null,(0,k.jsx)(K_,{label:`Model`,open:v,depth:0,onToggle:()=>c(gie)}),v?(0,k.jsxs)(`ul`,{className:`tree-list`,children:[g.map(e=>{let t=y||!o.has(e.key);return(0,k.jsxs)(`li`,{children:[(0,k.jsx)(K_,{label:e.label,open:t,count:t?void 0:e.subjects.length,depth:1,onToggle:()=>c(e.key)}),t?(0,k.jsx)(`ul`,{className:`tree-list`,children:e.subjects.map(e=>(0,k.jsx)(`li`,{children:(0,k.jsxs)(`button`,{type:`button`,className:`tree-row tree-subject tree-depth-2${e.inView?``:` tree-row-quiet`}`,title:`${e.name} — ${e.kindLabel}`,onClick:()=>f(e.id),onContextMenu:W_({kind:`subject`,id:e.id},p),children:[(0,k.jsx)(U_,{layer:e.layer}),(0,k.jsx)(`span`,{className:`tree-label`,children:e.name}),e.inView?null:(0,k.jsx)(`span`,{className:`tree-count`,children:`not in view`})]})},e.id))}):null]},e.key)}),g.length!==0||!y?null:(0,k.jsx)(`li`,{className:`tree-empty`,children:`No subject matches that.`})]}):null]})]})}var Eie=({id:e,taken:t,path:n,folder:r,title:i,description:a,query:o,layout:s,showLifecycle:c,showEvidence:l,showOwnership:u,carriedDirection:d})=>{let f=e??Xre(i,t);return{op:`write-view`,path:n??b_(f),projection:S_({id:f,title:i,description:a,query:o??{},presentation:{layout:s,...d===void 0?{}:{direction:d},...r===void 0||r===``?{}:{folder:r},showLifecycle:c,showEvidence:l,showOwnership:u}})}};function Die({activeView:e,presetFolder:t,onSubmit:n,onCancel:r}){let[i,a]=(0,v.useState)(e?.title??``),[o,s]=(0,v.useState)(e?.description??``),c=i.trim()===``||o.trim()===``,l=t!==void 0;return(0,k.jsx)(`div`,{className:`save-view-panel`,children:(0,k.jsx)(`div`,{id:`save-view-panel-body`,className:`save-view-panel-body`,children:(0,k.jsxs)(`form`,{className:`save-view-form`,onSubmit:t=>{t.preventDefault(),!c&&n(l?void 0:e?.id,i,o)},children:[(0,k.jsxs)(`div`,{children:[(0,k.jsx)(`label`,{htmlFor:`save-view-title`,children:`Title`}),(0,k.jsx)(`input`,{id:`save-view-title`,type:`text`,value:i,onChange:e=>a(e.currentTarget.value),required:!0})]}),(0,k.jsxs)(`div`,{children:[(0,k.jsx)(`label`,{htmlFor:`save-view-description`,children:`Description`}),(0,k.jsx)(`textarea`,{id:`save-view-description`,value:o,onChange:e=>s(e.currentTarget.value),required:!0})]}),(0,k.jsxs)(`div`,{className:`save-view-actions`,children:[(0,k.jsx)(`button`,{type:`submit`,disabled:e===null||c||l,title:l?`Save overwrites the active view and keeps its own folder — Save As New puts the first view in "${t}".`:void 0,children:`Save`}),(0,k.jsx)(`button`,{type:`button`,disabled:c,onClick:()=>{c||n(void 0,i,o)},children:`Save As New`}),(0,k.jsx)(`button`,{type:`button`,onClick:r,children:`Cancel`})]})]})})})}function Oie({views:e,activeViewId:t,query:n,layout:r,showLifecycle:i,showEvidence:a,showOwnership:o,open:s,folder:c,onClose:l,onStage:u}){let d=e.find(e=>e.id===t)??null,f=(t,s,l)=>{u(Eie({id:t,taken:new Set(e.map(e=>e.id)),path:t===void 0?void 0:d?.path,folder:t===void 0?c:d?.presentation?.folder,title:s,description:l,query:n,layout:r,showLifecycle:i,showEvidence:a,showOwnership:o,carriedDirection:t===void 0?void 0:d?.presentation?.direction}))};return s?(0,k.jsx)(`div`,{className:`save-view-control`,children:(0,k.jsx)(Die,{activeView:d,presetFolder:c,onSubmit:(e,t,n)=>{f(e,t,n),l()},onCancel:l},t)}):null}function q_(e){if((e.relationships===`connected`||e.relationships===`between`)&&e.subjects!==void 0&&e.subjects.length>0){let t=`${e.relationships===`connected`?`connected to`:`between`} ${e.subjects.join(`, `)}`;return e.exclude===void 0||e.exclude.length===0?t:`${t} · except: ${e.exclude.join(`, `)}`}let t=[],n=(e,n)=>{n!==void 0&&n.length>0&&t.push(`${e}: ${n.join(`, `)}`)};return n(`subjects`,e.subjects),n(`documents`,e.documents),n(`layers`,e.layers),n(e.kindMatching===`descendants`?`kinds (and descendants)`:`kinds`,e.kinds),n(`statuses`,e.statuses),n(`excluding statuses`,e.excludeStatuses),n(`states`,e.states),n(`owners`,e.owners),n(`constraints`,e.constraints),n(`relationship kinds`,e.relationshipKinds),n(`except`,e.exclude),e.isolatedConcepts===`exclude`&&t.push(`connected concepts only`),e.isolatedConcepts===`include`&&t.push(`including isolated concepts`),t.length>0?t.join(` · `):`all`}var kie=(e,t)=>{let n=new Set(t.nodes.map(e=>e.id));for(let e of t.edges)n.add(e.id);let r=0;for(let t of e)(t.subjects??[]).some(e=>n.has(e))&&(r+=1);return{total:e.length,onCanvas:r,elsewhere:e.length-r}},Aie=e=>{let t=new Set;for(let n of e)for(let e of n.subjects??[])t.add(e);return t},J_=(e,t,n)=>{let r=n=>n.document===e&&n.localId===t,i=n?.nodes.find(r);if(i!==void 0)return i.name;let a=n?.edges.find(r);return a?.name!==void 0&&a.name!==null?a.name:t},jie=(e,t,n)=>[...e.operations.map(e=>Nie(e,t)),...e.viewOperations.map(e=>Mie(e,n))],Mie=(e,t)=>{if(e.op===`delete-view`)return{verb:e.op,subjectName:e.path,fields:[],removedFields:[],scope:`view`};let n=t.find(t=>t.path===e.path),r=n===void 0?[]:T_(n.query,e.projection.query);return{verb:e.op,subjectName:e.projection.presentation?.title??e.projection.id,fields:r.length>0?r:[e.path],removedFields:[],scope:`view`}},Nie=(e,t)=>{let n=e.op===`update-concept`||e.op===`update-relationship`||e.op===`update-observation`?e.remove??[]:[];if(`observation`in e){let{subject:r,claim:i,key:a,...o}=e.observation,s=J_(e.document,r??i,t);return{verb:e.op,subjectName:a===void 0?s:`${s} (${a})`,fields:Object.keys(o),removedFields:n,scope:`model`}}let r=`concept`in e?e.concept:e.relationship;return{verb:e.op,subjectName:J_(e.document,r.id,t),fields:Object.keys(r).filter(e=>e!==`id`),removedFields:n,scope:`model`}},Y_=e=>{let t=[...e.fields,...e.removedFields.map(e=>`remove: ${e}`)];return t.length===0?`${e.verb} · ${e.subjectName}`:`${e.verb} · ${e.subjectName} · ${t.join(`, `)}`},j=/^\/operations\/(\d+)(\/|$)/,X_=e=>{let t=new Map,n=[];for(let r of e){let e=j.exec(r.pointer);if(e===null){n.push(r);continue}let i=Number(e[1]),a=t.get(i);a===void 0?t.set(i,[r]):a.push(r)}return{byRow:t,batch:n}},Pie=(e,t,n)=>{let r=t[e];if(r===void 0)return null;let i=n?.sourceDigests[e]??n?.projectionDigests[e];return i===void 0||i===r?null:e},Fie=({diagnostic:e})=>(0,k.jsxs)(`li`,{children:[(0,k.jsx)(`span`,{className:`code`,children:e.code}),` `,e.message,e.path===``?null:(0,k.jsxs)(`span`,{className:`where`,children:[e.path,`:`,e.line,`:`,e.column]})]}),Z_=({index:e,row:t,diagnostics:n,conflict:r,onDiscard:i})=>(0,k.jsxs)(`li`,{className:r===null?`changeset-row`:`changeset-row conflicted`,children:[(0,k.jsxs)(`div`,{className:`changeset-row-line`,children:[(0,k.jsx)(`span`,{className:`changeset-row-label`,children:Y_(t)}),(0,k.jsx)(`span`,{className:`changeset-row-scope changeset-scope-${t.scope}`,children:t.scope}),(0,k.jsx)(`button`,{type:`button`,className:`changeset-row-discard`,onClick:i,children:`Discard`})]}),r===null?null:(0,k.jsxs)(`p`,{className:`changeset-row-conflict`,role:`status`,children:[r,` changed after this edit was staged`]}),n.length===0?null:(0,k.jsx)(`ul`,{className:`changeset-row-diagnostics`,children:n.map(e=>(0,k.jsx)(Fie,{diagnostic:e},`${e.code}-${e.pointer}`))})]}),Iie=({state:e,onDiscardChange:t,onClearChangeset:n,onUndoChangeset:r,onRedoChangeset:i,onCommitChangeset:a})=>{let o=e.model?.graph??null,s=jie(e.pendingChangeset,o,e.views);if(s.length===0&&e.commitNotice===null&&e.commitDiagnostics===null&&e.undoStack.length===0&&e.redoStack.length===0)return null;let{byRow:c,batch:l}=X_(e.commitDiagnostics??[]),u=e.commitStatus===`committing`;return(0,k.jsxs)(`section`,{className:`changeset-tray`,"aria-labelledby":`changeset-heading`,children:[(0,k.jsxs)(`div`,{className:`changeset-heading-row`,children:[(0,k.jsx)(`h2`,{id:`changeset-heading`,children:`Pending changes`}),(0,k.jsxs)(`div`,{className:`changeset-history-controls`,children:[(0,k.jsx)(`button`,{type:`button`,className:`changeset-undo`,disabled:e.undoStack.length===0,onClick:r,children:`Undo`}),(0,k.jsx)(`button`,{type:`button`,className:`changeset-redo`,disabled:e.redoStack.length===0,onClick:i,children:`Redo`}),s.length===0?null:(0,k.jsx)(`button`,{type:`button`,className:`changeset-discard-all`,onClick:n,children:`Discard all`})]})]}),e.commitDiagnostics===null||e.commitDiagnostics.length===0||o===null?null:(0,k.jsx)(`p`,{className:`changeset-fault-summary`,role:`status`,children:(()=>{let t=kie(e.commitDiagnostics,o);return`${t.total} problem${t.total===1?``:`s`}: ${t.onCanvas} marked on the diagram, ${t.elsewhere} not on it.`})()}),l.length===0?null:(0,k.jsx)(`ul`,{className:`changeset-batch-diagnostics`,role:`alert`,children:l.map(e=>(0,k.jsx)(Fie,{diagnostic:e},`${e.code}-${e.pointer}`))}),s.length===0?null:(0,k.jsx)(`ol`,{className:`changeset-rows`,children:s.map((n,r)=>(0,k.jsx)(Z_,{index:r,row:n,diagnostics:c.get(r)??[],conflict:Pie(r<e.pendingChangeset.operations.length?e.pendingChangeset.operations[r].document:e.pendingChangeset.viewOperations[r-e.pendingChangeset.operations.length].path,e.pendingChangeset.sourceDigests,e.model),onDiscard:()=>t(r)},r))}),(0,k.jsx)(`div`,{className:`changeset-actions`,children:(0,k.jsx)(`button`,{type:`button`,className:`changeset-commit`,disabled:s.length===0||u,"aria-busy":u,onClick:a,children:u?`Committing…`:`Commit changes`})}),e.commitNotice===null?null:(0,k.jsxs)(`div`,{className:`changeset-notice`,role:`status`,children:[(0,k.jsxs)(`p`,{children:[`Committed · `,e.commitNotice.length,` `,e.commitNotice.length===1?`file`:`files`]}),(0,k.jsx)(`ul`,{children:e.commitNotice.map(e=>(0,k.jsx)(`li`,{children:e},e))})]})]})},Q_=e=>e.slice(e.lastIndexOf(`#`)+1),$_={a:`access`,c:`composition`,f:`flow`,g:`aggregation`,i:`assignment`,n:`influence`,o:`association`,r:`realization`,s:`specialization`,t:`triggering`,v:`serving`},ev=`applicationCollaboration.applicationComponent.applicationEvent.applicationFunction.applicationInteraction.applicationInterface.applicationProcess.applicationService.artifact.assessment.businessActor.businessCollaboration.businessEvent.businessFunction.businessInteraction.businessInterface.businessObject.businessProcess.businessRole.businessService.capability.communicationNetwork.constraint.contract.courseOfAction.dataObject.deliverable.device.distributionNetwork.driver.equipment.facility.gap.goal.grouping.implementationEvent.andJunction.orJunction.location.material.meaning.node.outcome.path.plateau.principle.product.representation.requirement.resource.stakeholder.systemSoftware.technologyCollaboration.technologyEvent.technologyFunction.technologyInteraction.technologyInterface.technologyProcess.technologyService.value.valueStream.workPackage`.split(`.`),tv={applicationCollaboration:`cfgostv fgortv fiortv fiortv fiortv cfgortv fiortv fiortv ao no fotv fotv fortv fortv fortv fortv ao fortv fotv fortv or fotv nor ao or ao o fotv fotv no fotv fotv o nor acfginorstv o acfginorstv acfginorstv fotv ao no fotv nor fotv o nor fotv ao nor or no fotv fotv fotv fotv fotv fotv fotv fotv no or o`,applicationComponent:`fotv cfgorstv fiortv fiortv fiortv cfgortv fiortv fiortv ao no fotv fotv fortv fortv fortv fortv ao fortv fotv fortv or fotv nor ao or ao o fotv fotv no fotv fotv o nor acfginorstv o acfginorstv acfginorstv fotv ao no fotv nor fotv o nor fotv ao nor or no fotv fotv fotv fotv fotv fotv fotv fotv no or o`,applicationEvent:`fotv fotv cfgostv fotv fotv fotv fotv fotv ao no fotv fotv fortv fotv fotv fotv ao fotv fotv fotv o fotv nor ao o ao o fotv fotv no fotv fotv o nor acfgnorstv o acfginorstv acfginorstv fotv ao no fotv nor fotv o nor fotv ao nor o no fotv fotv fotv fotv fotv fotv fotv fotv no o o`,applicationFunction:`fotv fotv fotv cfgostv cfgotv fotv cfgotv fortv ao no fotv fotv fotv fortv fortv fotv ao fortv fotv fortv or fotv nor ao or ao o fotv fotv no fotv fotv o nor acfgnorstv o acfginorstv acfginorstv fotv ao no fotv nor fotv o nor fotv ao nor o no fotv fotv fotv fotv fotv fotv fotv fotv no or o`,applicationInteraction:`fotv fotv fotv cfgotv cfgostv fotv cfgotv fortv ao no fotv fotv fotv fortv fortv fotv ao fortv fotv fortv or fotv nor ao or ao o fotv fotv no fotv fotv o nor acfgnorstv o acfginorstv acfginorstv fotv ao no fotv nor fotv o nor fotv ao nor o no fotv fotv fotv fotv fotv fotv fotv fotv no or o`,applicationInterface:`fotv fotv fotv fotv fotv cfgostv fotv fiotv ao no fotv fotv fotv fotv fotv fortv ao fotv fotv fortv or fotv nor ao or ao o fotv fotv no fotv fotv o nor acfginorstv o acfginorstv acfginorstv fotv ao no fotv nor fotv o nor fotv ao nor or no fotv fotv fotv fotv fotv fotv fotv fotv no or o`,applicationProcess:`fotv fotv fotv cfgotv cfgotv fotv cfgostv fortv ao no fotv fotv fotv fortv fortv fotv ao fortv fotv fortv or fotv nor ao or ao o fotv fotv no fotv fotv o nor acfgnorstv o acfginorstv acfginorstv fotv ao no fotv nor fotv o nor fotv ao nor o no fotv fotv fotv fotv fotv fotv fotv fotv no or o`,applicationService:`fotv fotv fotv fotv fotv fotv fotv cfgostv ao no fotv fotv fotv fotv fotv fotv ao fotv fotv fortv or fotv nor ao or ao o fotv fotv no fotv fotv o nor acfgnorstv o acfginorstv acfginorstv fotv ao no fotv nor fotv o nor fotv ao nor o no fotv fotv fotv fotv fotv fotv fotv fotv no or o`,artifact:`or or or or or or or or cgors no o o or or or or or or o or or o nor or or or o o o no o o o nor cgnors o acfginorstv acfginorstv o o no o nor o o nor o o nor or no or o or or or or or or no or o`,assessment:`o o o o o o o o o cgnos o o o o o o o o o o o o no o o o o o o no o o o no cgnos o acfginorstv acfginorstv o o no o no o o no o o no o no o o o o o o o o no o o`,businessActor:`fotv fotv fotv fotv fotv fotv fotv fotv ao no cfgostv fotv fiotv fiotv fiotv cfgiotv ao fiotv fiotv fiortv or fotv nor ao or ao o fotv fotv no fotv fotv o nor acfginorstv io acfginorstv acfginorstv fotv ao no fotv nor fotv o nor fotv ao nor or ino fotv fotv fotv fotv fotv fotv fotv fotv no or io`,businessCollaboration:`fotv fotv fotv fotv fotv fotv fotv fotv ao no fgotv cfgostv fiotv fiotv fiotv cfgiotv ao fiotv fgiotv fiortv or fotv nor ao or ao o fotv fotv no fotv fotv o nor acfginorstv io acfginorstv acfginorstv fotv ao no fotv nor fotv o nor fotv ao nor or ino fotv fotv fotv fotv fotv fotv fotv fotv no or io`,businessEvent:`fotv fotv fotv fotv fotv fotv fotv fotv ao no fotv fotv cfgostv fotv fotv fotv ao fotv fotv fotv o fotv nor ao o ao o fotv fotv no fotv fotv o nor acfgnorstv o acfginorstv acfginorstv fotv ao no fotv nor fotv o nor fotv ao nor o no fotv fotv fotv fotv fotv fotv fotv fotv no o o`,businessFunction:`fotv fotv fotv fotv fotv fotv fotv fotv ao no fotv fotv fotv cfgostv cfgotv fotv ao cfgotv fotv fortv or fotv nor ao or ao o fotv fotv no fotv fotv o nor acfgnorstv o acfginorstv acfginorstv fotv ao no fotv nor fotv o nor fotv ao nor o no fotv fotv fotv fotv fotv fotv fotv fotv no or o`,businessInteraction:`fotv fotv fotv fotv fotv fotv fotv fotv ao no fotv fotv fotv cfgotv cfgostv fotv ao cfgotv fotv fortv or fotv nor ao or ao o fotv fotv no fotv fotv o nor acfgnorstv o acfginorstv acfginorstv fotv ao no fotv nor fotv o nor fotv ao nor o no fotv fotv fotv fotv fotv fotv fotv fotv no or o`,businessInterface:`fotv fotv fotv fotv fotv fotv fotv fotv ao no fotv fotv fotv fotv fotv cfgostv ao fotv fotv fiotv or fotv nor ao or ao o fotv fotv no fotv fotv o nor acfginorstv o acfginorstv acfginorstv fotv ao no fotv nor fotv o nor fotv ao nor or no fotv fotv fotv fotv fotv fotv fotv fotv no or o`,businessObject:`o o o o o o o o o no o o o o o o cgos o o o or o nor cgos or o o o o no o o o nor cgnors o acfginorstv acfginorstv o o no o nor o o nor o o nor or no o o o o o o o o no or o`,businessProcess:`fotv fotv fotv fotv fotv fotv fotv fotv ao no fotv fotv fotv cfgotv cfgotv fotv ao cfgostv fotv fortv or fotv nor ao or ao o fotv fotv no fotv fotv o nor acfgnorstv o acfginorstv acfginorstv fotv ao no fotv nor fotv o nor fotv ao nor o no fotv fotv fotv fotv fotv fotv fotv fotv no or o`,businessRole:`fotv fotv fotv fotv fotv fotv fotv fotv ao no fotv fotv fiotv fiotv fiotv cfgotv ao fiotv cfgostv fiortv or fotv nor ao or ao o fotv fotv no fotv fotv o nor acfginorstv io acfginorstv acfginorstv fotv ao no fotv nor fotv o nor fotv ao nor or ino fotv fotv fotv fotv fotv fotv fotv fotv no or io`,businessService:`fotv fotv fotv fotv fotv fotv fotv fotv ao no fotv fotv fotv fotv fotv fotv ao fotv fotv cfgostv or fotv nor ao or ao o fotv fotv no fotv fotv o nor acfgnorstv o acfginorstv acfginorstv fotv ao no fotv nor fotv o nor fotv ao nor o no fotv fotv fotv fotv fotv fotv fotv fotv no or o`,capability:`o o o o o o o o o no o o o o o o o o o o cfgostv o nor o fortv o o o o no o o o nor cfgnorstv o acfginorstv acfginorstv o o no o nor o o nor o o nor fotv no o o o o o o o o no fotv o`,communicationNetwork:`fortv fortv fortv fortv fortv fortv fortv fortv aio no fortv fortv fortv fortv fortv fortv ao fortv fortv fortv or cfgostv nor ao or ao o fgortv fotv no fortv fortv o nor acfginorstv o acfginorstv acfginorstv fotv ao no fortv nor fortv o nor fotv ao nor or nor fgiortv fortv fiortv fiortv fiortv fgiortv fiortv fiortv no or o`,constraint:`o o o o o o o o o no o o o o o o o o o o o o cgnos o o o o o o no o o o nor cgnors o acfginorstv acfginorstv o o no o nor o o nor o o cgnos o no o o o o o o o o no o o`,contract:`o o o o o o o o o no o o o o o o cgos o o o or o nor cgos or o o o o no o o o nor cgnors o acfginorstv acfginorstv o o no o nor o o nor o o nor or no o o o o o o o o no or o`,courseOfAction:`o o o o o o o o o no o o o o o o o o o o fotv o nor o cfgostv o o o o no o o o nor cfgnorstv o acfginorstv acfginorstv o o no o nor o o nor o o nor fotv no o o o o o o o o no fotv o`,dataObject:`o o o o o o o o o no o o o o o o or o o o or o nor or or cgos o o o no o o o nor cgnors o acfginorstv acfginorstv o o no o nor o o nor o o nor or no o o o o o o o o no or o`,deliverable:`or or or or or or or or or no or or or or or or or or or or or or nor or or or cgos or or no or or o nor cgnors o acfginorstv acfginorstv or or no or nor or or nor or or nor or nor or or or or or or or or no or o`,device:`fortv fortv fortv fortv fortv fortv fortv fortv aio no fotv fotv fortv fortv fortv fortv ao fortv fotv fortv or fotv nor ao or ao o cfgostv fotv no fotv fotv o nor acfginorstv o acfginorstv acfginorstv fotv ao no fotv nor fotv o nor fotv ao nor or no cfgiortv fotv fiortv fiortv fiortv cfgiortv fiortv fiortv no or o`,distributionNetwork:`fortv fortv fortv fortv fortv fortv fortv fortv aio no fiortv fiortv fiortv fiortv fiortv fiortv ao fiortv fiortv fiortv or fotv nor ao or ao o fgiortv cfgostv no fgiortv fgiortv o nor acfginorstv io acfginorstv acfginorstv fotv aio no fgiortv nor fortv o nor fotv ao nor or inor fgiortv fortv fiortv fiortv fiortv fgiortv fiortv fiortv no or io`,driver:`o o o o o o o o o no o o o o o o o o o o o o no o o o o o o cgnos o o o no cgnos o acfginorstv acfginorstv o o no o no o o no o o no o no o o o o o o o o no o o`,equipment:`fortv fortv fortv fortv fortv fortv fortv fortv aio no fotv fotv fortv fortv fortv fortv ao fortv fotv fortv or fotv nor ao or ao o cfgortv fotv no cfgorstv fotv o nor acfginorstv o acfginorstv acfginorstv fotv aio no fotv nor fotv o nor fotv ao nor or no cfgiortv fotv fiortv fiortv fiortv cfgiortv fiortv fiortv no or o`,facility:`fortv fortv fortv fortv fortv fortv fortv fortv aio no fiotv fiotv fiortv fiortv fiortv fiortv ao fiortv fiotv fiortv or fotv nor ao or ao o cfgiortv fotv no cfgiortv cfgiostv o nor acfginorstv io acfginorstv acfginorstv fotv aio no cfgiotv nor fotv o nor fotv ao nor or ino cfgiortv fotv fiortv fiortv fiortv cfgiortv fiortv fiortv no or io`,gap:`o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o cgos o cgos o acfginorstv acfginorstv o o o o o o o o o o o o o o o o o o o o o o o o`,goal:`o o o o o o o o o no o o o o o o o o o o o o no o o o o o o no o o o cgnos cgnos o acfginorstv acfginorstv o o no o no o o no o o no o no o o o o o o o o no o o`,grouping:`cfgorstv cfgorstv cfgiorstv cfgiorstv cfgiorstv cfgorstv cfgiorstv cfgiorstv acgiors cgnos cfgiorstv cfgiorstv cfgiorstv cfgiorstv cfgiorstv cfgiorstv acgors cfgiorstv cfgiorstv cfgiorstv cfgiorstv cfgorstv cgnors acgors cfgorstv acgors acgors cfgiorstv cfgorstv cgnos cfgiorstv cfgiorstv cgos cgnors acfginorstv cfgiost acfginorstv acfginorstv cfgorstv acgiors cgnos cfgiorstv cgnors cfgorstv cfgorst cgnors cfgorstv acgors cgnors cfgorstv cginors cfgiorstv cfgorstv cfgiorstv cfgiorstv cfgiorstv cfgiorstv cfgiorstv cfgiorstv cgnos cfgiorstv cfgiost`,implementationEvent:`o o o o o o o o o no o o o o o o o o o o o o no o o o ao o o no o o o no acfgnost cfgost acfginorstv acfginorstv o o no o no o fot no o o no o no o o o o o o o o no o fot`,andJunction:`fortv fortv fiortv fiortv fiortv fortv fiortv fiortv aior no fiortv fiortv fiortv fiortv fiortv fiortv aor fiortv fiortv fiortv fiortv fortv nor aor fortv aor aor fiortv fortv no fiortv fiortv o nor afinortv fiot acfginorstv acfginorstv fortv aior no fiortv nor fortv fort nor fortv aor nor fortv inor fiortv fortv fiortv fiortv fiortv fiortv fiortv fiortv no fiortv fiot`,orJunction:`fortv fortv fiortv fiortv fiortv fortv fiortv fiortv aior no fiortv fiortv fiortv fiortv fiortv fiortv aor fiortv fiortv fiortv fiortv fortv nor aor fortv aor aor fiortv fortv no fiortv fiortv o nor afinortv fiot acfginorstv acfginorstv fortv aior no fiortv nor fortv fort nor fortv aor nor fortv inor fiortv fortv fiortv fiortv fiortv fiortv fiortv fiortv no fiortv fiot`,location:`cfgortv cfgortv cfgiortv cfgiortv cfgiortv cfgortv cfgiortv cfgiortv acgio cgno cfgiortv cfgiortv cfgiortv cfgiortv cfgiortv cfgiortv acgo cfgiortv cfgiortv cfgiortv cgor cfgotv cgnor acgo cgor acgo cgo cfgiortv cfgotv cgno cfgiortv cfgiortv cgo cgnor acfginorstv cgio acfginorstv acfginorstv cfgostv acgio cgno cfgiortv cgnor cfgortv cgo cgnor cfgotv acgo cgnor cgor cginor cfgiortv cfgortv cfgiortv cfgiortv cfgiortv cfgiortv cfgiortv cfgiortv cgno cgor cgio`,material:`or or or or or or or or or no o o or or or or or or o or or o nor or or or o or o no or o o nor cgnors o acfginorstv acfginorstv o cgors no o nor o o nor o o nor or no or o or or or or or or no or o`,meaning:`o o o o o o o o o no o o o o o o o o o o o o no o o o o o o no o o o no cgnos o acfginorstv acfginorstv o o cgnos o no o o no o o no o no o o o o o o o o no o o`,node:`fortv fortv fortv fortv fortv fortv fortv fortv aio no fiotv fiotv fiortv fiortv fiortv fiortv ao fiortv fiotv fiortv or fotv nor ao or ao o cfgiortv fotv no cfgiortv cfgiotv o nor acfginorstv io acfginorstv acfginorstv fotv aio no cfgiostv nor fotv o nor fotv ao nor or ino cfgiortv fotv fiortv fiortv fiortv cfgiortv fiortv fiortv no or io`,outcome:`o o o o o o o o o no o o o o o o o o o o o o no o o o o o o no o o o nor cgnors o acfginorstv acfginorstv o o no o cgnos o o no o o no o no o o o o o o o o no o o`,path:`fortv fortv fortv fortv fortv fortv fortv fortv aio no fiotv fiotv fiortv fiortv fiortv fiortv ao fiortv fiotv fiortv or fotv nor ao or ao o fgiortv fotv no fgiortv fgiotv o nor acfginorstv io acfginorstv acfginorstv fotv aio no fgiotv nor cfgostv o nor fotv ao nor or ino fgiortv fgotv fiortv fiortv fiortv fgiortv fiortv fiortv no or io`,plateau:`cgor cgor cgor cgor cgor cgor cgor cgor cgor no cgor cgor cgor cgor cgor cgor cgor cgor cgor cgor cgor cgor cgnor cgor cgor cgor ao cgor cgor no cgor cgor o cgnor acfginorst fot acfginorstv acfginorstv cgor cgor no cgor cgnor cgor cfgost nor cgor cgor cgnor cgor inor cgor cgor cgor cgor cgor cgor cgor cgor no cgor fot`,principle:`o o o o o o o o o no o o o o o o o o o o o o no o o o o o o no o o o nor cgnors o acfginorstv acfginorstv o o no o nor o o cgnos o o no o no o o o o o o o o no o o`,product:`fortv fortv fortv fortv fortv fortv fortv cfgortv acgo no fotv fotv fortv fortv fortv fortv acgo fortv fotv cfgortv or fotv nor acgo or acgo o fortv fotv no fortv fotv o nor acfgnorstv o acfginorstv acfginorstv fotv acgo no fotv nor fotv o nor cfgostv acgo nor or no fortv fotv fortv fortv fortv fortv fortv cfgortv no or o`,representation:`o o o o o o o o o no o o o o o o or o o o or o nor or or o o o o no o o o nor cgnors o acfginorstv acfginorstv o o no o nor o o nor o cgos nor or no o o o o o o o o no or o`,requirement:`o o o o o o o o o no o o o o o o o o o o o o cgnos o o o o o o no o o o nor cgnors o acfginorstv acfginorstv o o no o nor o o nor o o cgnos o no o o o o o o o o no o o`,resource:`o o o o o o o o o no o o o o o o o o o o fiotv o nor o fortv o o o o no o o o nor cfginorstv o acfginorstv acfginorstv o o no o nor o o nor o o nor cfgostv no o o o o o o o o no fiotv o`,stakeholder:`o o o o o o o o o no o o o o o o o o o o o o no o o o o o o no o o o no cgnos o acfginorstv acfginorstv o o no o no o o no o o no o cgnos o o o o o o o o no o o`,systemSoftware:`fortv fortv fortv fortv fortv fortv fortv fortv aio no fotv fotv fortv fortv fortv fortv ao fortv fotv fortv or fotv nor ao or ao o fotv fotv no fotv fotv o nor acfginorstv o acfginorstv acfginorstv fotv ao no fotv nor fotv o nor fotv ao nor or no cfgiorstv fotv fiortv fiortv fiortv cfgiortv fiortv fiortv no or o`,technologyCollaboration:`fortv fortv fortv fortv fortv fortv fortv fortv aio no fiotv fiotv fiortv fiortv fiortv fiortv ao fiortv fiotv fiortv or fotv nor ao or ao o fgiortv fotv no fgiortv fgiotv o nor acfginorstv io acfginorstv acfginorstv fotv aio no fgiotv nor fotv o nor fotv ao nor or ino fgiortv cfgostv fiortv fiortv fiortv cfgiortv fiortv fiortv no or io`,technologyEvent:`fotv fotv fortv fotv fotv fotv fotv fotv ao no fotv fotv fortv fotv fotv fotv ao fotv fotv fotv o fotv nor ao o ao o fotv fotv no fotv fotv o nor acfgnorstv o acfginorstv acfginorstv fotv ao no fotv nor fotv o nor fotv ao nor o no fotv fotv cfgostv fotv fotv fotv fotv fotv no o o`,technologyFunction:`fotv fotv fotv fortv fortv fotv fortv fortv ao no fotv fotv fotv fortv fortv fotv ao fortv fotv fortv or fotv nor ao or ao o fotv fotv no fotv fotv o nor acfgnorstv o acfginorstv acfginorstv fotv ao no fotv nor fotv o nor fotv ao nor o no fotv fotv fotv cfgostv cfgotv fotv cfgotv fortv no or o`,technologyInteraction:`fotv fotv fotv fortv fortv fotv fortv fortv ao no fotv fotv fotv fortv fortv fotv ao fortv fotv fortv or fotv nor ao or ao o fotv fotv no fotv fotv o nor acfgnorstv o acfginorstv acfginorstv fotv ao no fotv nor fotv o nor fotv ao nor o no fotv fotv fotv cfgotv cfgostv fotv cfgotv fortv no or o`,technologyInterface:`fotv fotv fotv fotv fotv fortv fotv fortv ao no fotv fotv fotv fotv fotv fortv ao fotv fotv fortv or fotv nor ao or ao o fotv fotv no fotv fotv o nor acfginorstv o acfginorstv acfginorstv fotv ao no fotv nor fotv o nor fotv ao nor or no fotv fotv fotv fotv fotv cfgostv fotv fiotv no or o`,technologyProcess:`fotv fotv fotv fortv fortv fotv fortv fortv ao no fotv fotv fotv fortv fortv fotv ao fortv fotv fortv or fotv nor ao or ao o fotv fotv no fotv fotv o nor acfgnorstv o acfginorstv acfginorstv fotv ao no fotv nor fotv o nor fotv ao nor o no fotv fotv fotv cfgotv cfgotv fotv cfgostv fortv no or o`,technologyService:`fotv fotv fotv fotv fotv fotv fotv fortv ao no fotv fotv fotv fotv fotv fotv ao fotv fotv fortv or fotv nor ao or ao o fotv fotv no fotv fotv o nor acfgnorstv o acfginorstv acfginorstv fotv ao no fotv nor fotv o nor fotv ao nor o no fotv fotv fotv fotv fotv fotv fotv cfgostv no or o`,value:`o o o o o o o o o no o o o o o o o o o o o o no o o o o o o no o o o no cgnos o acfginorstv acfginorstv o o no o no o o no o o no o no o o o o o o o o cgnos o o`,valueStream:`o o o o o o o o o no o o o o o o o o o o fotv o nor o fortv o o o o no o o o nor cfgnorstv o acfginorstv acfginorstv o o no o nor o o nor o o nor fotv no o o o o o o o o no cfgostv o`,workPackage:`or or or or or or or or or no or or or or or or or or or or or or nor or or or aor or or no or or o nor acfgnorst fot acfginorstv acfginorstv or or no or nor or fort nor or or nor or nor or or or or or or or or no or cfgost`},nv=new Map(ev.map((e,t)=>[e,t])),rv=new Map(Object.entries($_)),iv=new Map;for(let e of ev){let t=tv[e].split(` `);for(let[n,r]of ev.entries()){let i=t[n]??`-`,a=new Set;for(let e of i){let t=rv.get(e);t!==void 0&&a.add(t)}iv.set(`${e}>${r}`,a)}}var Lie=new Set,av=e=>nv.has(e),ov=(e,t)=>iv.get(`${e}>${t}`)??Lie;new Map(ah.map(e=>[e.id,e.aspect]));var sv=sne,cv=(e,t,n)=>{let r=e.nodes.find(e=>e.id===t),i=e.nodes.find(e=>e.id===n);if(r===void 0||i===void 0||!av(r.coreKindLabel)||!av(i.coreKindLabel))return[];let a=[...ov(r.coreKindLabel,i.coreKindLabel)].sort();if(r.portKinds.length===0||i.portKinds.length===0)return a;let o=new Set(i.portKinds),s=a.filter(e=>r.portKinds.includes(e)&&o.has(e));return s.length===0?a:s},lv=(e,t,n,r,i=[])=>{let a=new Set([...e.nodes.map(e=>e.id),...e.edges.map(e=>e.id),...i]),o=`${t}-${n}-${r}`;if(!a.has(o))return o;for(let e=2;;e+=1){let t=`${o}-${e}`;if(!a.has(t))return t}},uv=(e,t,n,r,i=[])=>{if(!cv(e,t,r).includes(n))return null;let a=e.nodes.find(e=>e.id===t);return a===void 0?null:{op:`add-relationship`,document:a.document,relationship:{id:lv(e,t,n,r,i),kind:n,from:t,to:r}}},dv=e=>e.flatMap(e=>{let t=e.op===`rename-concept`||e.op===`rename-relationship`?[e.to]:[];return`relationship`in e?[e.relationship.id,...t]:`concept`in e?[e.concept.id,...t]:t}),fv=(e,t,n,r)=>{let i=new Set(cv(e,t.from,t.to));if(i.size===0)return{options:n,narrowed:!1};let a=new Set(sv);return{options:n.filter(e=>i.has(e.coreLabel)||!a.has(e.coreLabel)||e.label===r),narrowed:!0}},pv=[`kind`,`name`,`description`,`status`,`owner`],mv=[`aka`,`constraints`,`references`,`presentIn`,`attestations`,`distinctFrom`,`supersedes`],hv=[`kind`,`from`,`to`,`name`,`description`,`status`,`mode`,`content`],gv=[`references`,`presentIn`],_v=(e,t)=>{if(e===t)return!0;if(e===null||t===null||typeof e!=`object`||typeof t!=`object`)return!1;if(Array.isArray(e)||Array.isArray(t))return!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length?!1:e.every((e,n)=>_v(e,t[n]));let n=e,r=t,i=Object.keys(n),a=Object.keys(r);return i.length===a.length&&i.every(e=>_v(n[e],r[e]))},Rie=(e,t)=>t===(e??``)?{kind:`none`}:t===``?{kind:`remove`}:{kind:`set`,value:t},vv=(e,t)=>_v(e,t)?{kind:`none`}:t.length>=e.length&&e.every((e,n)=>_v(e,t[n]))?{kind:`append`,added:t.slice(e.length)}:{kind:`replace`,next:t},zie=(e,t,n,r,i)=>r?{op:`update-concept`,document:e,concept:{id:t,[n]:i}}:{op:`update-concept`,document:e,concept:{id:t},remove:[n]},yv=(e,t,n,r)=>r===null?{op:`update-concept`,document:e,concept:{id:t},remove:[n]}:{op:`update-concept`,document:e,concept:{id:t,[n]:r}},bv=(e,t,n,r,i)=>r?{op:`update-relationship`,document:e,relationship:{id:t,[n]:i}}:{op:`update-relationship`,document:e,relationship:{id:t},remove:[n]},xv=(e,t,n,r)=>r===null?{op:`update-relationship`,document:e,relationship:{id:t},remove:[n]}:{op:`update-relationship`,document:e,relationship:{id:t,[n]:r}},Sv=(e,t,n,r,i)=>{let a=Rie(r,i);return a.kind===`none`?[]:a.kind===`remove`?[zie(e,t,n,!1,``)]:[zie(e,t,n,!0,a.value)]},Cv=(e,t,n,r,i)=>{let a=Rie(r,i);return a.kind===`none`?[]:a.kind===`remove`?[bv(e,t,n,!1,``)]:[bv(e,t,n,!0,a.value)]},wv=(e,t,n,r,i)=>{let a=vv(r,i);if(a.kind===`none`)return[];if(a.kind===`append`)return a.added.length===0?[]:[yv(e,t,n,a.added)];let o=[yv(e,t,n,null)];return a.next.length>0&&o.push(yv(e,t,n,a.next)),o},Bie=(e,t,n,r,i)=>{let a=vv(r,i);if(a.kind===`none`)return[];if(a.kind===`append`)return a.added.length===0?[]:[xv(e,t,n,a.added)];let o=[xv(e,t,n,null)];return a.next.length>0&&o.push(xv(e,t,n,a.next)),o},Vie=e=>e.expects===null?{id:e.id,ref:e.ref}:{id:e.id,ref:e.ref,expects:e.expects},Tv=(e,t,n,r)=>{let i=vv(n,r);if(i.kind===`none`)return[];if(i.kind===`append`)return i.added.length===0?[]:[yv(e,t,`constraints`,i.added.map(Vie))];let a=[yv(e,t,`constraints`,null)];return i.next.length>0&&a.push(yv(e,t,`constraints`,i.next.map(Vie))),a},Ev=e=>({topic:e.topic,by:e.by,recordedBy:e.recordedBy??``,on:e.on}),Dv=(e,t,n,r)=>{let i=vv(n,r);if(i.kind===`none`)return[];if(i.kind===`append`)return i.added.length===0?[]:[yv(e,t,`attestations`,i.added.map(Ev))];let a=[yv(e,t,`attestations`,null)];return i.next.length>0&&a.push(yv(e,t,`attestations`,i.next.map(Ev))),a},Ov=(e,t)=>{let n={...e},r=t.concept;for(let e of pv)r[e]!==void 0&&(n[e]=r[e]);for(let e of mv){let t=r[e];t!==void 0&&t.length>0&&(n[e]=[...n[e],...t])}for(let e of t.remove??[])n[e]=mv.includes(e)?[]:null;return n},kv=(e,t)=>{let n=e;for(let r of t)r.op===`update-concept`&&r.document===e.document&&r.concept.id===e.localId&&(n=Ov(n,r));return n},Hie=(e,t)=>{let n={...e},r=t.relationship;for(let e of hv)r[e]!==void 0&&(n[e]=r[e]);for(let e of gv){let t=r[e];t!==void 0&&t.length>0&&(n[e]=[...n[e],...t])}for(let e of t.remove??[])n[e]=gv.includes(e)?[]:null;return n},Uie=(e,t)=>{let n=e;for(let r of t)r.op===`update-relationship`&&r.document===e.document&&r.relationship.id===e.localId&&(n=Hie(n,r));return n},Av=({label:e,value:t,options:n,onCommit:r})=>(0,k.jsxs)(`label`,{className:`subject-form-field`,children:[(0,k.jsx)(`span`,{className:`subject-form-label`,children:e}),(0,k.jsx)(`select`,{value:t,onChange:e=>r(e.target.value),children:n.map(e=>(0,k.jsx)(`option`,{value:e.value,children:e.label},e.value))})]}),jv=({label:e,value:t,onCommit:n})=>{let[r,i]=(0,v.useState)(t);return(0,v.useEffect)(()=>i(t),[t]),(0,k.jsxs)(`label`,{className:`subject-form-field`,children:[(0,k.jsx)(`span`,{className:`subject-form-label`,children:e}),(0,k.jsx)(`input`,{type:`text`,value:r,onChange:e=>i(e.target.value),onBlur:()=>n(r)})]})},Mv=({label:e,values:t,emptyRow:n,isRowFilled:r,renderRow:i,onCommit:a})=>{let[o,s]=(0,v.useState)(t);(0,v.useEffect)(()=>s(t),[t]);let c=e=>{s(e),a(e.filter(r))};return(0,k.jsxs)(`div`,{className:`subject-form-field subject-form-list`,children:[(0,k.jsx)(`span`,{className:`subject-form-label`,children:e}),o.map((e,t)=>(0,k.jsxs)(`div`,{className:`subject-form-row`,children:[i(e,{set:e=>s(o.map((n,r)=>r===t?e:n)),commit:()=>c(o),replace:e=>c(o.map((n,r)=>r===t?e:n))}),(0,k.jsx)(`button`,{type:`button`,className:`subject-form-row-remove`,onClick:()=>c(o.filter((e,n)=>n!==t)),children:`Remove`})]},t)),(0,k.jsxs)(`button`,{type:`button`,className:`subject-form-row-add`,onClick:()=>s([...o,n]),children:[`Add `,e]})]})},Nv=({label:e,values:t,onCommit:n})=>(0,k.jsx)(Mv,{label:e,values:t,emptyRow:``,isRowFilled:e=>e.trim()!==``,onCommit:n,renderRow:(e,{set:t,commit:n})=>(0,k.jsx)(`input`,{type:`text`,value:e,onChange:e=>t(e.target.value),onBlur:n})}),Pv={id:``,ref:``},Fv=({label:e,values:t,onCommit:n})=>(0,k.jsx)(Mv,{label:e,values:t,emptyRow:Pv,isRowFilled:e=>e.id.trim()!==``&&e.ref.trim()!==``,onCommit:n,renderRow:(e,{set:t,commit:n})=>(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(`input`,{type:`text`,placeholder:`id`,value:e.id,onChange:n=>t({...e,id:n.target.value}),onBlur:n}),(0,k.jsx)(`input`,{type:`text`,placeholder:`ref`,value:e.ref,onChange:n=>t({...e,ref:n.target.value}),onBlur:n})]})}),M={id:``,ref:``,expects:null},Iv=({label:e,values:t,onCommit:n})=>(0,k.jsx)(Mv,{label:e,values:t,emptyRow:M,isRowFilled:e=>e.id.trim()!==``&&e.ref.trim()!==``,onCommit:n,renderRow:(e,{set:t,commit:n,replace:r})=>(0,k.jsxs)(`div`,{className:`subject-form-row-body`,children:[(0,k.jsx)(`input`,{type:`text`,placeholder:`id`,value:e.id,onChange:n=>t({...e,id:n.target.value}),onBlur:n}),(0,k.jsx)(`input`,{type:`text`,placeholder:`ref`,value:e.ref,onChange:n=>t({...e,ref:n.target.value}),onBlur:n}),(0,k.jsxs)(`label`,{className:`subject-form-toggle`,children:[(0,k.jsx)(`input`,{type:`checkbox`,checked:e.expects!==null,onChange:t=>r({...e,expects:t.target.checked?{provider:``,key:``,value:``}:null})}),`Expects`]}),e.expects===null?null:(0,k.jsxs)(`div`,{className:`subject-form-row-body`,children:[(0,k.jsx)(`input`,{type:`text`,placeholder:`provider`,value:e.expects.provider,onChange:n=>e.expects!==null&&t({...e,expects:{...e.expects,provider:n.target.value}}),onBlur:n}),(0,k.jsx)(`input`,{type:`text`,placeholder:`key`,value:e.expects.key,onChange:n=>e.expects!==null&&t({...e,expects:{...e.expects,key:n.target.value}}),onBlur:n}),(0,k.jsx)(`input`,{type:`text`,placeholder:`value`,value:e.expects.value,onChange:n=>e.expects!==null&&t({...e,expects:{...e.expects,value:n.target.value}}),onBlur:n})]})]})}),Wie={topic:``,by:``,on:``,recordedBy:null},Gie=({label:e,values:t,onCommit:n})=>(0,k.jsx)(Mv,{label:e,values:t,emptyRow:Wie,isRowFilled:e=>e.topic.trim()!==``&&e.by.trim()!==``&&e.on.trim()!==``,onCommit:n,renderRow:(e,{set:t,commit:n})=>(0,k.jsxs)(`div`,{className:`subject-form-row-body`,children:[(0,k.jsx)(`input`,{type:`text`,placeholder:`topic`,value:e.topic,onChange:n=>t({...e,topic:n.target.value}),onBlur:n}),(0,k.jsx)(`input`,{type:`text`,placeholder:`by`,value:e.by,onChange:n=>t({...e,by:n.target.value}),onBlur:n}),(0,k.jsx)(`input`,{type:`text`,placeholder:`on`,value:e.on,onChange:n=>t({...e,on:n.target.value}),onBlur:n}),(0,k.jsx)(`input`,{type:`text`,placeholder:`recorded by`,value:e.recordedBy??``,onChange:n=>t({...e,recordedBy:n.target.value}),onBlur:n})]})}),Kie={value:``,label:`— unset —`},qie=[Kie,{value:`planned`,label:`planned`},{value:`current`,label:`current`},{value:`retired`,label:`retired`}],Jie=[Kie,{value:`read`,label:`read`},{value:`write`,label:`write`},{value:`read-write`,label:`read-write`},{value:`unspecified`,label:`unspecified`}],Lv=(e,t)=>t.find(t=>t.id===e)?.label??Q_(e),Yie=({node:e,model:t,operations:n,onStageChange:r})=>{let i=kv(e,n),a=e.document,o=e.localId,s=e=>e.forEach(r),c=t.vocabulary.conceptKinds.map(e=>({value:e.label,label:e.label})),l=Lv(i.kind,t.vocabulary.conceptKinds);return(0,k.jsxs)(`div`,{className:`subject-form`,children:[(0,k.jsxs)(`div`,{className:`subject-form-field`,children:[(0,k.jsx)(`span`,{className:`subject-form-label`,children:`Identity`}),(0,k.jsx)(`code`,{children:e.id})]}),(0,k.jsx)(Av,{label:`Kind`,value:l,options:c,onCommit:e=>s(Sv(a,o,`kind`,l,e))}),(0,k.jsx)(jv,{label:`Name`,value:i.name,onCommit:e=>s(Sv(a,o,`name`,i.name,e))}),(0,k.jsx)(jv,{label:`Description`,value:i.description??``,onCommit:e=>s(Sv(a,o,`description`,i.description,e))}),(0,k.jsx)(Av,{label:`Status`,value:i.status??``,options:qie,onCommit:e=>s(Sv(a,o,`status`,i.status,e))}),(0,k.jsx)(jv,{label:`Owner`,value:i.owner??``,onCommit:e=>s(Sv(a,o,`owner`,i.owner,e))}),(0,k.jsx)(Nv,{label:`Aka`,values:i.aka,onCommit:e=>s(wv(a,o,`aka`,i.aka,e))}),(0,k.jsx)(Nv,{label:`Distinct from`,values:i.distinctFrom,onCommit:e=>s(wv(a,o,`distinctFrom`,i.distinctFrom,e))}),(0,k.jsx)(Nv,{label:`Supersedes`,values:i.supersedes,onCommit:e=>s(wv(a,o,`supersedes`,i.supersedes,e))}),(0,k.jsx)(Nv,{label:`Present in`,values:i.presentIn,onCommit:e=>s(wv(a,o,`presentIn`,i.presentIn,e))}),(0,k.jsx)(Fv,{label:`References`,values:i.references,onCommit:e=>s(wv(a,o,`references`,i.references,e))}),(0,k.jsx)(Iv,{label:`Constraints`,values:i.constraints,onCommit:e=>s(Tv(a,o,i.constraints,e))}),(0,k.jsx)(Gie,{label:`Attestations`,values:i.attestations,onCommit:e=>s(Dv(a,o,i.attestations,e))})]})},Rv=({label:e,value:t})=>t===``?null:(0,k.jsxs)(`div`,{className:`subject-form-field`,children:[(0,k.jsx)(`span`,{className:`subject-form-label`,children:e}),(0,k.jsx)(`span`,{className:`subject-fact-value`,children:t})]}),Xie=({node:e,model:t})=>(0,k.jsxs)(`div`,{className:`subject-form subject-facts`,children:[(0,k.jsxs)(`div`,{className:`subject-form-field`,children:[(0,k.jsx)(`span`,{className:`subject-form-label`,children:`Identity`}),(0,k.jsx)(`code`,{children:e.id})]}),(0,k.jsx)(Rv,{label:`Kind`,value:Lv(e.kind,t.vocabulary.conceptKinds)}),(0,k.jsx)(Rv,{label:`Name`,value:e.name}),(0,k.jsx)(Rv,{label:`Status`,value:e.status??``}),(0,k.jsx)(Rv,{label:`Owner`,value:e.owner??``}),(0,k.jsx)(Rv,{label:`Aka`,value:e.aka.join(`, `)}),(0,k.jsx)(Rv,{label:`Distinct from`,value:e.distinctFrom.join(`, `)}),(0,k.jsx)(Rv,{label:`Supersedes`,value:e.supersedes.join(`, `)}),(0,k.jsx)(Rv,{label:`Present in`,value:e.presentIn.join(`, `)}),(0,k.jsx)(Rv,{label:`References`,value:e.references.map(e=>`${e.id}: ${e.ref}`).join(`; `)}),(0,k.jsx)(Rv,{label:`Constraints`,value:e.constraints.map(e=>`${e.id}: ${e.ref}`).join(`; `)}),(0,k.jsx)(Rv,{label:`Attestations`,value:e.attestations.map(e=>`${e.topic} by ${e.by} on ${e.on}`).join(`; `)})]}),Zie=({edge:e,model:t})=>{let n=e=>t.graph.nodes.find(t=>t.id===e)?.name??e;return(0,k.jsxs)(`div`,{className:`subject-form subject-facts`,children:[(0,k.jsxs)(`div`,{className:`subject-form-field`,children:[(0,k.jsx)(`span`,{className:`subject-form-label`,children:`Identity`}),(0,k.jsx)(`code`,{children:e.id})]}),(0,k.jsx)(Rv,{label:`Kind`,value:Lv(e.kind,t.vocabulary.relationshipKinds)}),(0,k.jsx)(Rv,{label:`From`,value:n(e.from)}),(0,k.jsx)(Rv,{label:`To`,value:n(e.to)}),(0,k.jsx)(Rv,{label:`Name`,value:e.name??``}),(0,k.jsx)(Rv,{label:`Mode`,value:e.mode??``}),(0,k.jsx)(Rv,{label:`Content`,value:e.content??``}),(0,k.jsx)(Rv,{label:`Status`,value:e.status??``}),(0,k.jsx)(Rv,{label:`References`,value:e.references.map(e=>`${e.id}: ${e.ref}`).join(`; `)}),(0,k.jsx)(Rv,{label:`Present in`,value:e.presentIn.join(`, `)})]})},Qie=({edge:e,model:t,operations:n,onStageChange:r})=>{let i=Uie(e,n),a=e.document,o=e.localId,s=e=>e.forEach(r),c=Lv(i.kind,t.vocabulary.relationshipKinds),l=fv(t.graph,{from:i.from,to:i.to},t.vocabulary.relationshipKinds,c).options.map(e=>({value:e.label,label:e.label})),u=t.graph.nodes.map(e=>({value:e.id,label:e.name}));return(0,k.jsxs)(`div`,{className:`subject-form`,children:[(0,k.jsxs)(`div`,{className:`subject-form-field`,children:[(0,k.jsx)(`span`,{className:`subject-form-label`,children:`Identity`}),(0,k.jsx)(`code`,{children:e.id})]}),(0,k.jsx)(Av,{label:`Kind`,value:c,options:l,onCommit:e=>s(Cv(a,o,`kind`,c,e))}),(0,k.jsx)(Av,{label:`From`,value:i.from,options:u,onCommit:e=>s(Cv(a,o,`from`,i.from,e))}),(0,k.jsx)(Av,{label:`To`,value:i.to,options:u,onCommit:e=>s(Cv(a,o,`to`,i.to,e))}),(0,k.jsx)(jv,{label:`Name`,value:i.name??``,onCommit:e=>s(Cv(a,o,`name`,i.name,e))}),(0,k.jsx)(jv,{label:`Description`,value:i.description??``,onCommit:e=>s(Cv(a,o,`description`,i.description,e))}),(0,k.jsx)(Av,{label:`Mode`,value:i.mode??``,options:Jie,onCommit:e=>s(Cv(a,o,`mode`,i.mode,e))}),(0,k.jsx)(jv,{label:`Content`,value:i.content??``,onCommit:e=>s(Cv(a,o,`content`,i.content,e))}),(0,k.jsx)(Av,{label:`Status`,value:i.status??``,options:qie,onCommit:e=>s(Cv(a,o,`status`,i.status,e))}),(0,k.jsx)(Fv,{label:`References`,values:i.references,onCommit:e=>s(Bie(a,o,`references`,i.references,e))}),(0,k.jsx)(Nv,{label:`Present in`,values:i.presentIn,onCommit:e=>s(Bie(a,o,`presentIn`,i.presentIn,e))})]})};function $ie({overlay:e,selectedId:t}){let n=t===null?e.workspace:e.subjects[t]??[],r=t===null?`Whole-model questions. Select a subject to see what names it.`:null;return(0,k.jsxs)(`div`,{className:`open-questions`,children:[r===null?null:(0,k.jsx)(`p`,{className:`open-questions-scope`,children:r}),n.length===0?(0,k.jsx)(`p`,{className:`section-empty`,children:t===null?`Nothing open at the whole-model level.`:`No open questions name this subject.`}):(0,k.jsx)(`ul`,{className:`question-list`,children:n.map(e=>(0,k.jsx)(eae,{entry:e},e.questionId))}),(0,k.jsxs)(`p`,{className:`open-questions-catalogue`,children:[`Catalogue `,e.catalogue,` · answers land through the changeset, never here.`]})]})}var eae=({entry:e})=>(0,k.jsxs)(`li`,{className:`question-row`,children:[(0,k.jsx)(`span`,{className:`question-text`,children:e.question}),(0,k.jsxs)(`span`,{className:`question-meta`,children:[(0,k.jsx)(`span`,{className:`question-authority question-authority-${e.authority}`,children:e.authority}),e.since===void 0?null:(0,k.jsxs)(`span`,{className:`question-since`,children:[`since `,e.since]})]})]}),zv=[`composition`],tae=`top-down`,Bv=e=>{let t=e?.trim()??``;return t===``?null:t},Vv=e=>({type:`element`,id:e.id,title:e.name,kind:e.kindLabel,description:Bv(e.description)}),Hv=(e,t)=>{let n=e.from,r=e.to;return{type:`relationship`,id:e.id,sourceId:n,sourceTitle:t.get(n)??n,targetId:r,targetTitle:t.get(r)??r,label:Bv(e.name),description:Bv(e.description),kind:e.kindLabel}},Uv=e=>new Map(e.nodes.map(e=>[e.id,e.name])),nae=(e,t)=>{let n=e.nodes.find(e=>e.id===t);return n===void 0?null:Vv(n)},rae=(e,t)=>{let n=e.edges.find(e=>e.id===t);return n===void 0?null:Hv(n,Uv(e))},iae=(e,t,n,r)=>({select:n=>{let{graph:r}=e();if(r===null)return!1;let i=nae(r,n)??rae(r,n);return i!==null&&(t({type:`subject.selected`,subject:i}),!0)},openDraft:r=>{let{graph:i,readOnly:a}=e();return a||i===null?!1:(n(r?.kind),t({type:`subject.draft.opened`}),!0)},startConnection:n=>{let{graph:r,readOnly:i}=e();return i||r===null||!r.nodes.some(e=>e.id===n)?!1:(t({type:`connection.started`,from:n}),!0)},setDecorations:e=>(r(e),!0)}),aae=[`palette`,`properties`,`questions`,`changes`,`chat`],oae=e=>({min:96,max:Math.max(96,e-160)}),Wv=(e,t)=>{let{min:n,max:r}=oae(t);return Math.min(r,Math.max(n,e))},sae=.45,cae=(e,t)=>e.length===t.length&&e.every((e,n)=>e===t[n]),lae=e=>{let t=[];return e?.layout!==void 0&&t.push({type:`layout.set`,layout:e.layout}),t.push({type:`nesting.set`,nesting:e?.nesting??zv}),t.push({type:`direction.set`,direction:e?.direction??`top-down`}),e?.showLifecycle!==void 0&&t.push({type:`presentation.toggled`,flag:`showLifecycle`,value:e.showLifecycle}),e?.showEvidence!==void 0&&t.push({type:`presentation.toggled`,flag:`showEvidence`,value:e.showEvidence}),e?.showOwnership!==void 0&&t.push({type:`presentation.toggled`,flag:`showOwnership`,value:e.showOwnership}),t},Gv=(e,t,n,r)=>!r||e===``||e===n?null:t.find(t=>t.id===e)??null,Kv=e=>({min:320,max:Math.max(320,Math.min(640,e*sae))}),qv=(e,t)=>{let{min:n,max:r}=Kv(t);return Math.min(r,Math.max(n,e))},Jv=480,Yv=(e,t)=>{let{min:n,max:r}=Kv(t);return Math.min(Math.min(r,Jv),Math.max(n,e))},Xv=(e,t=0)=>({conversation:{width:Yv(e*.28,e),hidden:!1,unread:0,collapsed:[],changesHeight:200,chatHeight:300},viewportWidth:e,viewportHeight:t,selectedSubject:null,descriptionExpanded:!1,detailsOpen:!1,bottomPanel:{open:!1,tab:`view-query`},tree:{filterText:``,collapsed:[]},connection:null,draftingSubject:!1,pendingDeletion:null,pendingViewDeletion:null,pendingViewRename:null,contextMenu:null,nesting:zv,direction:tae,layout:`layered`,showLifecycle:!0,showEvidence:!0,showOwnership:!1,showNudges:!0}),Zv=(e,t)=>{switch(t.type){case`section.toggled`:{let n=e.conversation.collapsed.includes(t.section);return{...e,conversation:{...e.conversation,collapsed:n?e.conversation.collapsed.filter(e=>e!==t.section):[...e.conversation.collapsed,t.section],unread:t.section===`chat`&&n?0:e.conversation.unread}}}case`section.resized`:{let n=Wv(t.height,e.viewportHeight),r=t.section===`chat`?`chatHeight`:`changesHeight`;return e.conversation[r]===n?e:{...e,conversation:{...e.conversation,[r]:n}}}case`conversation.resized`:{if(e.conversation.hidden)return e;let n=qv(t.width,e.viewportWidth);return n===e.conversation.width?e:{...e,conversation:{...e.conversation,width:n}}}case`conversation.toggled`:{let t=!e.conversation.hidden;return{...e,conversation:{...e.conversation,hidden:t,unread:!t&&!e.conversation.collapsed.includes(`chat`)?0:e.conversation.unread}}}case`viewport.resized`:{let n=qv(e.conversation.width,t.viewportWidth),r=t.viewportHeight??e.viewportHeight,i=Wv(e.conversation.changesHeight,r),a=Wv(e.conversation.chatHeight,r);return n===e.conversation.width&&i===e.conversation.changesHeight&&a===e.conversation.chatHeight&&t.viewportWidth===e.viewportWidth&&r===e.viewportHeight?e:{...e,conversation:{...e.conversation,width:n,changesHeight:i,chatHeight:a},viewportWidth:t.viewportWidth,viewportHeight:r}}case`attention.received`:return e.conversation.hidden||e.conversation.collapsed.includes(`chat`)?{...e,conversation:{...e.conversation,unread:e.conversation.unread+1}}:e;case`menu.opened`:return{...e,contextMenu:{target:t.target,x:t.x,y:t.y}};case`menu.dismissed`:return e.contextMenu===null?e:{...e,contextMenu:null};case`connection.started`:return{...e,connection:{from:t.from,to:null},draftingSubject:!1,contextMenu:null};case`connection.targeted`:return e.connection===null?e:t.to===e.connection.from?{...e,connection:null}:{...e,connection:{...e.connection,to:t.to}};case`connection.cancelled`:return e.connection===null?e:{...e,connection:null};case`subject.draft.opened`:return{...e,draftingSubject:!0,connection:null,contextMenu:null};case`subject.draft.closed`:return e.draftingSubject?{...e,draftingSubject:!1}:e;case`deletion.asked`:return{...e,pendingDeletion:t.id,connection:null,draftingSubject:!1,contextMenu:null};case`deletion.dismissed`:return e.pendingDeletion===null?e:{...e,pendingDeletion:null};case`viewDeletion.asked`:return{...e,pendingViewDeletion:t.id,contextMenu:null};case`viewDeletion.dismissed`:return e.pendingViewDeletion===null?e:{...e,pendingViewDeletion:null};case`viewRename.asked`:return{...e,pendingViewRename:t.id,contextMenu:null};case`viewRename.dismissed`:return e.pendingViewRename===null?e:{...e,pendingViewRename:null};case`subject.selected`:return{...e,conversation:{...e.conversation,collapsed:e.conversation.collapsed.filter(e=>e!==`properties`)},selectedSubject:t.subject,descriptionExpanded:!1,contextMenu:null};case`subject.cleared`:return e.selectedSubject===null?e:{...e,selectedSubject:null,descriptionExpanded:!1};case`description.toggled`:return e.selectedSubject===null?e:{...e,descriptionExpanded:!e.descriptionExpanded};case`details.toggled`:return{...e,detailsOpen:!e.detailsOpen};case`bottomPanel.toggled`:return{...e,bottomPanel:{...e.bottomPanel,open:!e.bottomPanel.open}};case`bottomPanel.tabSelected`:return e.bottomPanel.open&&e.bottomPanel.tab===t.tab?e:{...e,bottomPanel:{open:!0,tab:t.tab}};case`tree.filtered`:return e.tree.filterText===t.filterText?e:{...e,tree:{...e.tree,filterText:t.filterText}};case`tree.toggled`:{let n=e.tree.collapsed.includes(t.key);return{...e,tree:{...e.tree,collapsed:n?e.tree.collapsed.filter(e=>e!==t.key):[...e.tree.collapsed,t.key]}}}case`nesting.set`:return cae(e.nesting,t.nesting)?e:{...e,nesting:t.nesting};case`direction.set`:return e.direction===t.direction?e:{...e,direction:t.direction};case`layout.set`:return{...e,layout:t.layout};case`presentation.toggled`:return{...e,[t.flag]:t.value};case`model.replaced`:{let n=e.contextMenu===null?e:{...e,contextMenu:null},r=n.selectedSubject;if(r===null)return n;let i=t.graph,a=i===null?null:r.type===`element`?nae(i,r.id):rae(i,r.id);return a===null?{...n,selectedSubject:null,descriptionExpanded:!1}:{...n,selectedSubject:a}}}},Qv=(e,t)=>{let n=e.trim();if(t===null)return n;if(t.type===`element`)return`About element “${t.title}” (${t.id}): ${n}`;let r=`${t.sourceTitle} → ${t.targetTitle}`;return`About relationship “${t.label===null?r:`${r} — ${t.label}`}”: ${n}`};function $v({id:e,label:t,meta:n,open:r,onToggle:i,children:a}){return(0,k.jsxs)(`section`,{className:`stack-section stack-section-${e}`,children:[(0,k.jsxs)(`h2`,{className:`section-head`,children:[(0,k.jsxs)(`button`,{type:`button`,className:`section-toggle`,"aria-expanded":r,"aria-controls":`section-${e}`,onClick:i,children:[(0,k.jsx)(`span`,{className:`section-chevron`,"aria-hidden":`true`,children:r?`▾`:`▸`}),(0,k.jsx)(`span`,{className:`section-label`,children:t})]}),n===void 0?null:(0,k.jsx)(`span`,{className:`section-meta`,children:n})]}),(0,k.jsx)(`div`,{className:`section-body`,id:`section-${e}`,hidden:!r,children:a})]})}function ey({label:e,height:t,viewportHeight:n,onResize:r}){let i=oae(n),a=(0,v.useRef)(null),o=e=>{let t=a.current;t?.pointerId===e.pointerId&&r(t.startHeight+t.startY-e.clientY)},s=e=>{a.current={pointerId:e.pointerId,startY:e.clientY,startHeight:t},e.currentTarget.setPointerCapture(e.pointerId)},c=e=>{a.current?.pointerId===e.pointerId&&(a.current=null,e.currentTarget.hasPointerCapture(e.pointerId)&&e.currentTarget.releasePointerCapture(e.pointerId))};return(0,k.jsx)(`div`,{className:`section-splitter`,role:`separator`,"aria-label":e,"aria-orientation":`horizontal`,"aria-valuenow":Math.round(t),"aria-valuemin":i.min,"aria-valuemax":Math.round(i.max),tabIndex:0,onPointerDown:s,onPointerMove:o,onPointerUp:c,onPointerCancel:c,onKeyDown:e=>{if(e.key!==`ArrowUp`&&e.key!==`ArrowDown`)return;e.preventDefault();let n=e.shiftKey?32:8;r(t+(e.key===`ArrowUp`?n:-n))}})}var ty=(e,t,n)=>aae.filter(t=>e.includes(t)).flatMap((e,r)=>{let i=r===0?void 0:n[e];return[...i===void 0?[]:[(0,k.jsx)(v.Fragment,{children:i},`splitter-${e}`)],(0,k.jsx)(v.Fragment,{children:t[e]},e)]}),ny={messageBytes:65536,modelBytes:5242880,transcriptBytes:5242880,pendingEvents:32,reconnectMs:3e5,staleSessionMs:864e5}.reconnectMs,ry=`Returning control to the main agent`,iy={operations:[],viewOperations:[],sourceDigests:{}},ay=e=>e.operations.length===0&&e.viewOperations.length===0,oy={lifecycle:`connecting`,authority:`canonical`,title:``,description:``,chatEnabled:!1,model:null,styleNonce:``,activeView:``,transcript:[],views:[],choices:null,agentStatus:null,diagnostics:[],handoff:null,composerEnabled:!1,awaitingAgent:!1,localRecords:0,lastSequence:0,frozen:!1,activeFilter:null,quickFilterText:``,closedReason:null,pendingChangeset:iy,undoStack:[],redoStack:[],commitStatus:`idle`,commitDiagnostics:null,commitNotice:null,layoutNotice:null},sy=e=>({authority:e.authority,title:e.title,description:e.description,chatEnabled:e.chatEnabled,model:e.model,transcript:e.transcript,agentTurnOpen:e.agentTurnOpen,choices:e.pendingChoice,styleNonce:e.styleNonce,lastSequence:e.lastSequence,frozen:e.frozen,views:e.views}),cy=(e,t)=>t-e<ny,ly=(e,t,n)=>({id:`local-${e.localRecords}`,speaker:t,text:n}),uy=(e,t)=>e.transcript.some(e=>e.id===t.id)?e.transcript:[...e.transcript,t],dy=e=>e.initialView,fy={awaitingAgent:!1,agentStatus:null},py=e=>{let t=(e,t)=>Object.keys(e).filter(e=>!t.includes(e)).sort().join(`:`);if(`concept`in e){let n=e.concept;return`${e.op}:${e.document}:concept:${n.id}:${t(n,[`id`])}`}if(`relationship`in e){let n=e.relationship;return`${e.op}:${e.document}:relationship:${n.id}:${t(n,[`id`])}`}let n=e.observation,r=`${n.subject??n.claim}:${n.key??``}`;return`${e.op}:${e.document}:observation:${r}:${t(n,[`subject`,`claim`,`key`])}`},my=(e,t,n,r)=>{let i={},a=(e,t)=>{if(i[e]!==void 0)return;let r=n[e]??t;r!==void 0&&(i[e]=r)};for(let t of e)a(t.document,r?.sourceDigests[t.document]);for(let e of t)a(e.path,r?.projectionDigests[e.path]);return i},hy=(e,t,n)=>{let r=n.operations??e.operations,i=n.viewOperations??e.viewOperations;return{operations:r,viewOperations:i,sourceDigests:my(r,i,e.sourceDigests,t)}},uae=(e,t)=>{switch(t.type){case`session.loaded`:return{...e,...t.snapshot,lifecycle:e.lifecycle===`ending`?`ending`:`active`,activeView:dy(t.snapshot.model),transcript:[...t.snapshot.transcript,...e.transcript.filter(e=>e.speaker===`session`)],awaitingAgent:t.snapshot.agentTurnOpen,agentStatus:t.snapshot.agentTurnOpen?e.agentStatus:null,lastSequence:Math.max(e.lastSequence,t.snapshot.lastSequence)};case`model.received`:return{...e,model:t.model,views:t.views,diagnostics:[]};case`diagnostic.received`:return{...e,diagnostics:t.diagnostics,...fy};case`chat.sent`:return{...e,transcript:uy(e,ly(e,`reviewer`,t.text)),localRecords:e.localRecords+1,choices:null,awaitingAgent:!0};case`chat.received`:return{...e,transcript:uy(e,{id:t.id,speaker:`agent`,text:t.text}),...fy};case`status.received`:return{...e,agentStatus:t.status};case`choice.presented`:return{...e,choices:t.choice,...fy};case`choice.sent`:{let n=e.choices?.options.find(e=>e.id===t.optionId);return n===void 0?e:{...e,transcript:uy(e,ly(e,`reviewer`,n.label)),localRecords:e.localRecords+1,choices:null,awaitingAgent:!0}}case`view.navigated`:return e.activeView===t.viewId?e:{...e,activeView:t.viewId};case`handoff.received`:return{...e,handoff:t.handoff,transcript:uy(e,{id:t.id,speaker:`agent`,text:t.handoff.summary}),...fy};case`event.acknowledged`:return{...e,lastSequence:Math.max(e.lastSequence,t.sequence)};case`input.refused`:{let n=e=>t.refused===void 0||t.refused===e;return{...e,diagnostics:t.diagnostics,frozen:e.frozen||t.frozen,...n(`changeset.commit`)?{commitStatus:`idle`,commitDiagnostics:t.diagnostics}:{},...n(`chat.message`)||n(`choice.selected`)?fy:{}}}case`end.requested`:return{...e,lifecycle:`ending`,choices:null,transcript:uy(e,ly(e,`session`,ry)),localRecords:e.localRecords+1};case`connection.lost`:return{...e,lifecycle:`disconnected`};case`session.closed`:return{...e,lifecycle:`closed`,closedReason:t.reason};case`filter.applied`:return{...e,activeFilter:{query:t.query,matchedIds:t.matchedIds,excluded:t.excluded,source:t.source},activeView:t.source===`view`||t.source===`editor`?e.activeView:``};case`filter.cleared`:return{...e,activeFilter:null,activeView:``};case`quickFilter.changed`:return e.quickFilterText===t.text?e:{...e,quickFilterText:t.text};case`changeset.staged`:{let n=py(t.operation),r=[...e.pendingChangeset.operations.filter(e=>py(e)!==n),t.operation];return{...e,pendingChangeset:hy(e.pendingChangeset,e.model,{operations:r}),undoStack:[...e.undoStack,e.pendingChangeset],redoStack:[],commitDiagnostics:null,commitNotice:null}}case`changeset.viewStaged`:{let n=e.pendingChangeset.viewOperations.filter(e=>e.path!==t.operation.path);return{...e,pendingChangeset:hy(e.pendingChangeset,e.model,{viewOperations:[...n,t.operation]}),undoStack:[...e.undoStack,e.pendingChangeset],redoStack:[],commitDiagnostics:null,commitNotice:null}}case`changeset.viewMembership`:{let n=e.views.find(({id:e})=>e===t.viewId);if(n===void 0)return e;let r=e.pendingChangeset.viewOperations.find(e=>e.path===n.path),i=S_({id:n.id,title:n.title,description:n.description,query:n.query,presentation:n.presentation}),a=w_(r?.op===`write-view`?r.projection:i,t.subjectId,t.membership);if(a===null)return e;let o=e.pendingChangeset.viewOperations.filter(e=>e.path!==n.path),s=eie(a,i);return{...e,pendingChangeset:hy(e.pendingChangeset,e.model,{viewOperations:s?o:[...o,{op:`write-view`,path:n.path,projection:a}]}),undoStack:[...e.undoStack,e.pendingChangeset],redoStack:[],commitDiagnostics:null,commitNotice:null}}case`changeset.discarded`:{let{index:n}=t,r=e.pendingChangeset.operations.length,i=r+e.pendingChangeset.viewOperations.length;if(n<0||n>=i)return e;let a=n<r?{operations:e.pendingChangeset.operations.filter((e,t)=>t!==n)}:{viewOperations:e.pendingChangeset.viewOperations.filter((e,t)=>t!==n-r)};return{...e,pendingChangeset:hy(e.pendingChangeset,e.model,a),undoStack:[...e.undoStack,e.pendingChangeset],redoStack:[],commitDiagnostics:null}}case`changeset.cleared`:{let t=ay(e.pendingChangeset);return{...e,pendingChangeset:iy,undoStack:t?e.undoStack:[...e.undoStack,e.pendingChangeset],redoStack:t?e.redoStack:[],commitDiagnostics:null}}case`changeset.undone`:{let t=e.undoStack.at(-1);return t===void 0?e:{...e,pendingChangeset:t,undoStack:e.undoStack.slice(0,-1),redoStack:[...e.redoStack,e.pendingChangeset],commitDiagnostics:null}}case`changeset.redone`:{let t=e.redoStack.at(-1);return t===void 0?e:{...e,pendingChangeset:t,redoStack:e.redoStack.slice(0,-1),undoStack:[...e.undoStack,e.pendingChangeset],commitDiagnostics:null}}case`changeset.commit.sent`:return{...e,commitStatus:`committing`,commitDiagnostics:null};case`changeset.committed`:return{...e,pendingChangeset:iy,undoStack:[],redoStack:[],commitStatus:`idle`,commitDiagnostics:null,commitNotice:t.documents};case`apply.failed`:return{...e,commitStatus:`idle`,commitDiagnostics:t.diagnostics};case`layout.saved`:{let n=t.result.ok?`Layout saved`:t.result.message;return{...e,layoutNotice:n}}}},dae=e=>e.lifecycle===`active`&&e.chatEnabled&&!e.frozen&&!e.awaitingAgent;function fae(e,t){if(e.lifecycle===`closed`)return e;let n=uae(e,t);return n===e?e:{...n,composerEnabled:dae(n)}}var gy=(e,t)=>{let n=t.lastSequence;switch(e.kind){case`chat`:return{type:`chat.message`,lastAcknowledgedSequence:n,payload:{text:e.text}};case`choice`:return{type:`choice.selected`,lastAcknowledgedSequence:n,payload:{choiceId:e.choiceId,optionId:e.optionId}};case`navigate`:return{type:`view.navigate`,lastAcknowledgedSequence:n,payload:{viewId:e.viewId,requiresAttention:!1}};case`end`:return{type:`session.end`,lastAcknowledgedSequence:n,payload:{reason:`user-ended`}};case`filter`:return{type:`filter.query`,lastAcknowledgedSequence:n,payload:{query:e.query}};case`commit-changeset`:return{type:`changeset.commit`,lastAcknowledgedSequence:n,payload:t.pendingChangeset};case`save-layout`:return{type:`layout.save`,lastAcknowledgedSequence:n,payload:e.payload}}},pae=e=>{let t=e.views.find(({id:t})=>t===e.activeView);if(t===void 0)return null;let n=e.pendingChangeset.viewOperations.find(e=>e.path===t.path),r=n?.op===`write-view`?n.projection.query:t.query;return C_(r)?{kind:`enumerated`,subjects:r.subjects}:{kind:`faceted`,excluded:r.exclude??[]}},mae=(e,t)=>{if(e.kind!==`model`||t.activeFilter===null)return null;let n=t.activeFilter.source===`view`||t.activeFilter.source===`editor`,r=e.views.find(({id:e})=>e===t.activeView);return{query:n&&r!==void 0?r.query:t.activeFilter.query,source:t.activeFilter.source}},hae=(e,t=`panel`)=>{switch(e.kind){case`ready`:return[{type:`session.loaded`,snapshot:sy(e.snapshot)}];case`accepted`:return[{type:`event.acknowledged`,sequence:e.sequence}];case`rejected`:return[{type:`input.refused`,...e.refused===void 0?{}:{refused:e.refused},diagnostics:e.diagnostics,frozen:e.frozen!==void 0}];case`model`:return[{type:`model.received`,model:e.model,views:e.views}];case`closing`:return[{type:`session.closed`,reason:e.reason}];case`filter-result`:return[{type:`filter.applied`,query:e.result.query,matchedIds:e.result.matchedIds,excluded:e.result.excluded,source:t}];case`response`:switch(e.response.type){case`chat.response`:{let t=[{type:`chat.received`,id:e.response.responseId,text:e.response.payload.text}],n=e.response.payload.appliedQuery;return n&&t.push({type:`filter.applied`,query:n.query,matchedIds:n.matchedIds??[],excluded:null,source:`chat`}),t}case`agent.status`:return[{type:`status.received`,status:e.response.payload}];case`choice.present`:return[{type:`choice.presented`,choice:e.response.payload}];case`handoff.complete`:return[{type:`handoff.received`,id:e.response.responseId,handoff:e.response.payload}];case`diagnostic`:return[{type:`diagnostic.received`,diagnostics:e.response.payload.diagnostics}]}case`apply-result`:{let t=[];return e.result.ok?t.push({type:`changeset.committed`,documents:e.result.result.documents}):t.push({type:`apply.failed`,diagnostics:e.result.diagnostics}),t}case`layout-save-result`:return[{type:`layout.saved`,result:e.result}]}},gae=e=>{let[t,n]=(0,v.useReducer)(fae,oy),[r,i]=(0,v.useState)(!1),a=(0,v.useRef)(t);a.current=t;let o=(0,v.useRef)(`panel`),s=(0,v.useRef)(e);s.current=e,(0,v.useEffect)(()=>s.current.open({frame:e=>{for(let t of hae(e,o.current))n(t);let t=mae(e,a.current);t!==null&&(o.current=t.source,s.current.send(gy({kind:`filter`,query:t.query},a.current)))},connected:i,lost:()=>n({type:`connection.lost`}),session:()=>({lastSequence:a.current.lastSequence,closed:a.current.lifecycle===`closed`})}),[]);let c=(0,v.useCallback)(e=>{s.current.send(gy(e,a.current))},[]),l=(0,v.useCallback)(e=>{n({type:`chat.sent`,text:e}),c({kind:`chat`,text:e})},[c]),u=(0,v.useCallback)(e=>{let t=a.current.choices?.choiceId;t!==void 0&&(n({type:`choice.sent`,optionId:e}),c({kind:`choice`,choiceId:t,optionId:e}))},[c]),d=(0,v.useCallback)(e=>{n({type:`view.navigated`,viewId:e}),c({kind:`navigate`,viewId:e})},[c]),f=(0,v.useCallback)((e,t=`panel`)=>{o.current=t,c({kind:`filter`,query:e})},[c]),p=(0,v.useCallback)(()=>{n({type:`filter.cleared`})},[]),m=(0,v.useCallback)(e=>{n({type:`quickFilter.changed`,text:e})},[]),h=(0,v.useCallback)(e=>{n({type:`changeset.staged`,operation:e})},[]);return{state:t,connected:r,ask:l,choose:u,navigate:d,filter:f,clearFilter:p,setQuickFilterText:m,stageViewChange:(0,v.useCallback)(e=>{n({type:`changeset.viewStaged`,operation:e})},[]),stageViewMembership:(0,v.useCallback)((e,t,r)=>{n({type:`changeset.viewMembership`,viewId:e,subjectId:t,membership:r})},[]),stageChange:h,discardChange:(0,v.useCallback)(e=>{n({type:`changeset.discarded`,index:e})},[]),clearChangeset:(0,v.useCallback)(()=>{n({type:`changeset.cleared`})},[]),undoChangeset:(0,v.useCallback)(()=>{n({type:`changeset.undone`})},[]),redoChangeset:(0,v.useCallback)(()=>{n({type:`changeset.redone`})},[]),commitChangeset:(0,v.useCallback)(()=>{ay(a.current.pendingChangeset)||(n({type:`changeset.commit.sent`}),c({kind:`commit-changeset`}))},[c]),saveLayout:(0,v.useCallback)(e=>{c({kind:`save-layout`,payload:e})},[c]),end:(0,v.useCallback)(()=>{n({type:`end.requested`}),c({kind:`end`})},[c])}},_ae=({draft:e,graph:t,reservedIds:n,onStage:r,onCancel:i})=>{let a=e=>t.nodes.find(t=>t.id===e)?.name??e;if(e.to===null)return(0,k.jsxs)(`section`,{className:`connection-panel`,"aria-label":`Connect subjects`,children:[(0,k.jsxs)(`p`,{className:`connection-prompt`,children:[`Connecting from `,(0,k.jsx)(`strong`,{children:a(e.from)}),`. Choose a target on the diagram.`]}),(0,k.jsx)(`button`,{type:`button`,onClick:i,children:`Cancel`})]});let o=e.to,s=cv(t,e.from,o);return(0,k.jsxs)(`section`,{className:`connection-panel`,"aria-label":`Connect subjects`,children:[(0,k.jsxs)(`p`,{className:`connection-prompt`,children:[(0,k.jsx)(`strong`,{children:a(e.from)}),` to`,` `,(0,k.jsx)(`strong`,{children:a(o)})]}),s.length===0?(0,k.jsx)(`p`,{className:`connection-empty`,children:`No relationship is defined between these kinds. One of them is outside the ArchiMate vocabulary the table covers.`}):(0,k.jsx)(`ul`,{className:`connection-kinds`,children:s.map(a=>(0,k.jsx)(`li`,{children:(0,k.jsx)(`button`,{type:`button`,onClick:()=>{let s=uv(t,e.from,a,o,n);s!==null&&r(s),i()},children:a})},a))}),(0,k.jsx)(`button`,{type:`button`,onClick:i,children:`Cancel`})]})},vae=/^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/,_y=(e,t,n=[])=>{let r=t.normalize(`NFKD`).replace(/[\u0300-\u036f]/g,``).replace(/[^a-zA-Z0-9]+/g,`-`).replace(/^-+|-+$/g,``).toLowerCase();if(r===``||!vae.test(r))return null;let i=new Set([...e.nodes.map(e=>e.id),...e.edges.map(e=>e.id),...n]);if(!i.has(r))return r;for(let e=2;;e+=1){let t=`${r}-${e}`;if(!i.has(t))return t}},yae=(e,t,n,r=[])=>{if(t.document===``||!n.includes(t.kind))return null;let i=t.name.trim();if(i===``)return null;let a=_y(e,i,r);return a===null?null:{op:`add-concept`,document:t.document,concept:{id:a,kind:t.kind,name:i}}},vy=({graph:e,kinds:t,documents:n,defaultDocument:r,initialKind:i,reservedIds:a,onStage:o,onCancel:s})=>{let[c,l]=(0,v.useState)(``),[u,d]=(0,v.useState)(i??``),[f,p]=(0,v.useState)(r),m=c.trim()===``?null:_y(e,c,a),h=m===null?null:yae(e,{name:c,kind:u,document:f},t.map(e=>e.label),a);return(0,k.jsxs)(`section`,{className:`subject-draft-panel`,"aria-label":`Add a subject`,children:[(0,k.jsxs)(`label`,{className:`subject-draft-field`,htmlFor:`subject-draft-name`,children:[(0,k.jsx)(`span`,{children:`Name`}),(0,k.jsx)(`input`,{id:`subject-draft-name`,type:`text`,value:c,onChange:e=>l(e.target.value)})]}),(0,k.jsxs)(`label`,{className:`subject-draft-field`,htmlFor:`subject-draft-kind`,children:[(0,k.jsx)(`span`,{children:`Kind`}),(0,k.jsxs)(`select`,{id:`subject-draft-kind`,value:u,onChange:e=>d(e.target.value),children:[(0,k.jsx)(`option`,{value:``,children:`Choose a kind`}),t.map(e=>(0,k.jsx)(`option`,{value:e.label,children:e.label},e.id))]})]}),(0,k.jsxs)(`label`,{className:`subject-draft-field`,htmlFor:`subject-draft-document`,children:[(0,k.jsx)(`span`,{children:`Document`}),(0,k.jsx)(`select`,{id:`subject-draft-document`,value:f,onChange:e=>p(e.target.value),children:n.map(e=>(0,k.jsx)(`option`,{value:e,children:e},e))})]}),(0,k.jsx)(`p`,{className:`subject-draft-id`,children:u===``?`Choose a kind.`:c.trim()===``?`Give it a name.`:m===null?`That name makes no id. An id starts with a letter and is made of letters, digits and hyphens.`:(0,k.jsxs)(k.Fragment,{children:[`Id: `,(0,k.jsx)(`code`,{children:m})]})}),(0,k.jsx)(`button`,{type:`button`,disabled:h===null,onClick:()=>{h!==null&&(o(h),s())},children:`Add`}),(0,k.jsx)(`button`,{type:`button`,onClick:s,children:`Cancel`})]})};function yy({title:e,message:t,confirmLabel:n,cancelLabel:r,onConfirm:i,onCancel:a}){return(0,k.jsx)(`div`,{className:`confirm-dialog-backdrop`,role:`presentation`,onClick:a,children:(0,k.jsxs)(`div`,{className:`confirm-dialog`,role:`alertdialog`,"aria-modal":`true`,"aria-labelledby":`confirm-dialog-title`,onClick:e=>e.stopPropagation(),children:[(0,k.jsx)(`h2`,{id:`confirm-dialog-title`,children:e}),(0,k.jsx)(`p`,{children:t}),(0,k.jsxs)(`div`,{className:`confirm-dialog-actions`,children:[(0,k.jsx)(`button`,{type:`button`,onClick:a,children:r}),(0,k.jsx)(`button`,{type:`button`,onClick:i,children:n})]})]})})}function by({title:e,label:t,initialValue:n,confirmLabel:r,cancelLabel:i,onConfirm:a,onCancel:o}){let[s,c]=(0,v.useState)(n),l=s.trim()===``;return(0,k.jsx)(`div`,{className:`confirm-dialog-backdrop`,role:`presentation`,onClick:o,children:(0,k.jsxs)(`div`,{className:`confirm-dialog`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`prompt-dialog-title`,onClick:e=>e.stopPropagation(),children:[(0,k.jsx)(`h2`,{id:`prompt-dialog-title`,children:e}),(0,k.jsxs)(`form`,{className:`prompt-dialog-form`,onSubmit:e=>{e.preventDefault(),!l&&a(s.trim())},children:[(0,k.jsx)(`label`,{htmlFor:`prompt-dialog-value`,children:t}),(0,k.jsx)(`input`,{id:`prompt-dialog-value`,type:`text`,value:s,autoFocus:!0,onChange:e=>c(e.currentTarget.value),onKeyDown:e=>{e.key===`Escape`&&o()}}),(0,k.jsxs)(`div`,{className:`confirm-dialog-actions`,children:[(0,k.jsx)(`button`,{type:`button`,onClick:o,children:i}),(0,k.jsx)(`button`,{type:`submit`,disabled:l,children:r})]})]})]})})}var xy=new Set([`subject.inspect`,`relationship.inspect`,`view.open`,`view.clear`,`view.copy-path`,`canvas.export-png`]),Sy=(e,t)=>t.membership===null?[]:[{key:`view`,scope:`view`,label:`View`,destructive:!1,items:[(t.membership.kind===`enumerated`?t.membership.subjects.includes(e):!t.membership.excluded.includes(e))?{key:`view.remove-subject`,label:`Remove from view`,intent:{type:`view.remove-subject`,id:e}}:{key:`view.add-subject`,label:`Add to this view`,intent:{type:`view.add-subject`,id:e}}]}],Cy={key:`view.new`,label:`New view…`,intent:{type:`view.new`}},wy={key:`view.new-folder`,label:`New folder…`,intent:{type:`view.new-folder`}},Ty={key:`view.clear`,label:`Show all subjects`,intent:{type:`view.clear`}},Ey=(e,t)=>({key:`delete`,scope:`model`,label:null,destructive:!0,items:[{key:`delete`,label:t,intent:e}]}),bae=(e,t)=>t.graph?.nodes.find(t=>t.id===e)===void 0?[]:[...Sy(e,t),{key:`model`,scope:`model`,label:`Model`,destructive:!1,items:[{key:`inspect`,label:`Properties`,intent:{type:`subject.inspect`,id:e}},{key:`connect`,label:`Connect from here…`,intent:{type:`subject.connect`,from:e}}]},Ey({type:`subject.delete`,id:e},`Delete from model…`)],xae=(e,t)=>{let n=t.graph,r=n?.edges.find(t=>t.id===e);if(n==null||r===void 0)return[];let i=fv(n,{from:r.from,to:r.to},t.relationshipKinds,r.kindLabel),a=[{key:`model`,scope:`model`,label:`Model`,destructive:!1,items:[{key:`inspect`,label:`Properties`,intent:{type:`relationship.inspect`,id:e}}]}];return i.options.length>1&&a.push({key:`kind`,scope:`model`,label:`Change kind`,destructive:!1,items:i.options.map(t=>({key:`kind:${t.label}`,label:t.label,intent:{type:`relationship.retype`,id:e,kind:t.label},...t.label===r.kindLabel?{current:!0}:{}}))}),a.push(Ey({type:`relationship.delete`,id:e},`Delete from model…`)),a},Dy=e=>e.graph===null?[]:[{key:`view`,scope:`view`,label:`View`,destructive:!1,items:[Cy,wy,...e.filtered?[Ty]:[],{key:`canvas.export-png`,label:`Export PNG`,intent:{type:`canvas.export-png`}}]},{key:`model`,scope:`model`,label:`Model`,destructive:!1,items:[{key:`add`,label:`Add subject…`,intent:{type:`canvas.draft-subject`}}]}],Oy=(e,t)=>{let n=[{key:`view`,scope:`view`,label:`View`,destructive:!1,items:e===``?[Ty,Cy,wy]:[{key:`view.open`,label:`Open view`,intent:{type:`view.open`,id:e},...e===t.activeViewId?{current:!0}:{}},{key:`view.rename`,label:`Rename…`,intent:{type:`view.rename`,id:e}},{key:`view.duplicate`,label:`Duplicate`,intent:{type:`view.duplicate`,id:e}},{key:`view.new-in-folder`,label:`New view in this folder…`,intent:{type:`view.new-in-folder`,id:e}},Cy,wy,{key:`view.copy-path`,label:`Copy projection path`,intent:{type:`view.copy-path`,id:e}}]}];return e!==``&&n.push({key:`delete`,scope:`view`,label:null,destructive:!0,items:[{key:`delete`,label:`Delete view…`,intent:{type:`view.delete`,id:e}}]}),n},ky=(e,t)=>t.graph?.nodes.find(t=>t.id===e)===void 0?[]:[...Sy(e,t),{key:`model`,scope:`model`,label:`Model`,destructive:!1,items:[{key:`inspect`,label:`Properties`,intent:{type:`subject.inspect`,id:e}}]},Ey({type:`subject.delete`,id:e},`Delete from model…`)],Ay=(e,t)=>{let n=(()=>{switch(e.kind){case`subject`:return bae(e.id,t);case`relationship`:return xae(e.id,t);case`canvas`:return Dy(t);case`view-row`:return Oy(e.id,t);case`model-row`:return ky(e.id,t)}})();return t.readOnly===!0?n.flatMap(e=>{let t=e.items.filter(e=>xy.has(e.intent.type));return t.length===0?[]:[{...e,items:t}]}):n},jy=(e,t,n)=>({left:Math.max(0,e.x+t.width<=n.width?e.x:Math.min(e.x-t.width,n.width-t.width)),top:Math.max(0,e.y+t.height<=n.height?e.y:Math.min(e.y-t.height,n.height-t.height))});function My({groups:e,x:t,y:n,onChoose:r,onDismiss:i}){let a=(0,v.useRef)(null),[o,s]=(0,v.useState)(null);return(0,v.useLayoutEffect)(()=>{let e=a.current;if(e===null)return;let r=e.getBoundingClientRect();s(jy({x:t,y:n},{width:r.width,height:r.height},{width:window.innerWidth,height:window.innerHeight})),e.focus()},[t,n,e]),(0,v.useEffect)(()=>{let e=e=>{e.key===`Escape`&&i()},t=e=>{let t=e.target;a.current!==null&&t instanceof Node&&a.current.contains(t)||i()};return window.addEventListener(`keydown`,e),window.addEventListener(`pointerdown`,t,!0),window.addEventListener(`contextmenu`,t,!0),window.addEventListener(`resize`,i),()=>{window.removeEventListener(`keydown`,e),window.removeEventListener(`pointerdown`,t,!0),window.removeEventListener(`contextmenu`,t,!0),window.removeEventListener(`resize`,i)}},[i]),e.length===0?null:(0,k.jsx)(`div`,{ref:a,className:`context-menu`,role:`dialog`,"aria-label":`Actions`,tabIndex:-1,style:o===null?{left:0,top:0,visibility:`hidden`}:{left:`${o.left}px`,top:`${o.top}px`},children:e.map(e=>(0,k.jsxs)(`div`,{className:`context-menu-group context-menu-${e.scope}${e.destructive?` context-menu-destructive`:``}`,children:[e.label===null?null:(0,k.jsx)(`p`,{className:`context-menu-heading`,children:e.label}),(0,k.jsx)(`ul`,{children:e.items.map(e=>(0,k.jsx)(`li`,{children:(0,k.jsxs)(`button`,{type:`button`,className:`context-menu-item`,"aria-current":e.current===!0?`true`:void 0,onClick:()=>r(e.intent),children:[(0,k.jsx)(`span`,{className:`context-menu-tick`,"aria-hidden":!0,children:e.current===!0?`•`:``}),(0,k.jsx)(`span`,{className:`context-menu-label`,children:e.label})]})},e.key))})]},e.key))})}var Ny=(e,t)=>{let n=[];for(let r of e.nodes)r.id!==t&&(r.owner===t&&n.push({by:r.id,field:`owner`}),r.distinctFrom.includes(t)&&n.push({by:r.id,field:`distinctFrom`}),r.supersedes.includes(t)&&n.push({by:r.id,field:`supersedes`}),r.constraints.some(e=>e.ref===t)&&n.push({by:r.id,field:`constraint`}),r.references.some(e=>e.ref===t)&&n.push({by:r.id,field:`reference`}));return n},Sae=(e,t)=>{let n=e.edges.find(e=>e.id===t);if(n!==void 0)return[{op:`delete-relationship`,document:n.document,relationship:{id:n.id}}];let r=e.nodes.find(e=>e.id===t);return r===void 0?[]:[...e.edges.filter(e=>e.from===t||e.to===t).map(e=>({op:`delete-relationship`,document:e.document,relationship:{id:e.id}})),{op:`delete-concept`,document:r.document,concept:{id:r.id}}]},Cae=(e,t)=>{let n=e.edges.find(e=>e.id===t);if(n!==void 0)return`Delete the ${n.kindLabel} relationship from "${e.nodes.find(e=>e.id===n.from)?.name??n.from}" to "${e.nodes.find(e=>e.id===n.to)?.name??n.to}"?`;let r=e.nodes.find(e=>e.id===t);if(r===void 0)return null;let i=e.edges.filter(e=>e.from===t||e.to===t).length,a=Ny(e,t),o=i===0?`Delete "${r.name}"?`:`Delete "${r.name}" and the ${i} ${i===1?`relationship that names`:`relationships that name`} it?`;if(a.length===0)return o;let s=[...new Set(a.map(t=>e.nodes.find(e=>e.id===t.by)?.name??t.by))],c=s.slice(0,3),l=s.length>c.length?` and others`:``;return`${o} It is still named by ${c.join(`, `)}${l}, so this may be refused.`},wae={reviewer:`You`,agent:`Agent`,session:`Session`},Py={thinking:`Agent is thinking`,compiling:`Agent is compiling the model`,waiting:`Agent is waiting`,idle:`Agent is idle`},Tae=(e,t)=>{switch(e.lifecycle){case`connecting`:return`Opening`;case`active`:return t?`Live`:`Reconnecting`;case`ending`:return`Ending`;case`disconnected`:return`Reconnecting`;case`closed`:return`Closed`}},Eae=e=>e.lifecycle===`closed`?`Visual conversation ended. Continue in the main agent.`:e.lifecycle===`ending`?e.handoff===null?`Ending conversation — preparing a handoff for the main agent.`:`Handoff ready — returning control to the main agent.`:``,Fy=({state:e,connection:t})=>(0,k.jsxs)(`header`,{className:`command-strip`,children:[(0,k.jsxs)(`div`,{className:`command-identity`,children:[(0,k.jsx)(`h1`,{children:e.title===``?`Opening the session`:e.title}),(0,k.jsx)(`span`,{className:`beta-badge`,children:`Beta`}),(0,k.jsx)(`span`,{className:`authority`,children:`Checked YarraMate model`}),(0,k.jsx)(`span`,{className:`connection-state`,role:`status`,children:t})]}),e.description===``?null:(0,k.jsx)(`p`,{className:`session-description`,title:e.description,children:e.description})]}),Dae=({choices:e,disabled:t,onChoice:n})=>(0,k.jsxs)(`div`,{className:`choices`,children:[(0,k.jsx)(`p`,{className:`question`,children:e.question}),(0,k.jsx)(`ul`,{children:e.options.map(e=>(0,k.jsx)(`li`,{children:(0,k.jsxs)(`button`,{type:`button`,onClick:()=>n(e.id),disabled:t,children:[(0,k.jsx)(`span`,{className:`label`,children:e.label}),e.description===void 0?null:(0,k.jsx)(`span`,{className:`detail`,children:e.description})]})},e.id))})]}),Oae=({diagnostics:e})=>e.length===0?null:(0,k.jsxs)(`div`,{className:`faults`,role:`alert`,children:[(0,k.jsx)(`p`,{className:`faults-title`,children:`The workspace did not compile. The diagram still shows the model that did.`}),(0,k.jsx)(`ul`,{children:e.map(e=>(0,k.jsxs)(`li`,{children:[(0,k.jsx)(`span`,{className:`code`,children:e.code}),` `,e.message,(0,k.jsxs)(`span`,{className:`where`,children:[e.path,`:`,e.line]})]},`${e.code}-${e.pointer}`))})]}),kae=({state:e,selectedId:t,waiting:n,layout:r,nesting:i,direction:a,showLifecycle:o,showEvidence:s,showOwnership:c,showNudges:l,openQuestionCounts:u,decorations:d,connection:f,onConnectTarget:p,onConnectCancel:m,onConnectStage:h,onDraftStage:g,draftingSubject:_,draftInitialKind:y,onKindDrop:b,onDraftSubject:x,onDraftSubjectClose:S,pendingDeletion:C,onDeletionDismiss:w,onSelect:T,onCanvasMenu:E,onClearFilter:D,onSaveLayout:ee,onCanvasReady:te,onQuickFilterChange:ne,view:re,bottomPanel:ie,onTogglePresentation:ae,onToggleBottomPanel:oe,onSelectBottomTab:se,onApplyFilter:ce,onStageView:le,readOnly:ue})=>{let de=(0,v.useMemo)(()=>new Map((e.model?.graph.nodes??[]).map(e=>[e.id,e.name])),[e.model]),fe=e.model?.graph.nodes??[],pe=e.activeFilter?.matchedIds??null,me=fe.length>0&&(e.activeFilter!==null||e.quickFilterText.trim()!==``)&&_h(fe,pe,e.quickFilterText)===0,he=e.activeFilter!==null&&_h(fe,pe,``)===0;return(0,k.jsxs)(`section`,{className:`diagram-workspace`,"aria-label":`Architecture diagram`,children:[e.activeFilter!==null&&e.activeFilter.source!==`view`&&e.activeFilter.source!==`editor`?(0,k.jsxs)(`div`,{className:`filter-pill`,role:`status`,children:[(0,k.jsxs)(`span`,{children:[`Filtered by `,e.activeFilter.source,`:`,` `,(0,k.jsx)(`code`,{children:q_(e.activeFilter.query)})]}),(0,k.jsx)(`button`,{type:`button`,onClick:D,children:`Show all`})]}):null,(0,k.jsxs)(`div`,{className:`canvas`,children:[e.model===null?null:(0,k.jsxs)(`div`,{className:`canvas-controls`,children:[(0,k.jsx)(mie,{value:e.quickFilterText,onChange:ne}),ue?null:(0,k.jsx)(`button`,{type:`button`,className:`subject-draft-open`,onClick:x,children:`Add subject`})]}),!_||e.model===null?null:(0,k.jsx)(vy,{initialKind:y,graph:e.model.graph,kinds:e.model.vocabulary.conceptKinds,documents:e.model.documents,reservedIds:dv(e.pendingChangeset.operations),defaultDocument:(t===null?void 0:e.model.graph.nodes.find(e=>e.id===t)?.document)??e.model.documents[0]??``,onStage:g,onCancel:S},y??``),C===null||e.model===null?null:(0,k.jsx)(yy,{title:`Delete`,message:Cae(e.model.graph,C)??`That subject is no longer on the diagram.`,confirmLabel:`Delete`,cancelLabel:`Keep`,onConfirm:()=>{for(let t of Sae(e.model.graph,C))h(t);w()},onCancel:w}),f===null||e.model===null?null:(0,k.jsx)(_ae,{draft:f,graph:e.model.graph,reservedIds:dv(e.pendingChangeset.operations),onStage:h,onCancel:m}),e.model===null?null:(0,k.jsx)(ore,{graph:e.model.graph,selectedId:t,onSelect:(t,n)=>{let r=e.model.graph;if(n===`node`){if(f!==null){p(t);return}let e=r.nodes.find(e=>e.id===t);e!==void 0&&T(Vv(e))}else{let e=r.edges.find(e=>e.id===t);e!==void 0&&T(Hv(e,de))}},onContextMenu:E,matchedIds:e.activeFilter?.matchedIds??null,quickFilterText:e.quickFilterText,nesting:i,faultedIds:Aie(e.commitDiagnostics??[]),decorations:d,showLifecycle:o,showEvidence:s,showOwnership:c,showNudges:l,openQuestionCounts:u,activeViewId:e.activeView,direction:a,savedPositions:e.model.layouts[e.activeView],onSaveLayout:ue?()=>void 0:ee,onKindDrop:ue?void 0:b,onCanvasReady:te}),me?(0,k.jsx)(`div`,{className:`filter-empty-pill`,role:`status`,children:he&&e.activeFilter!==null?(0,k.jsxs)(k.Fragment,{children:[(0,k.jsxs)(`span`,{children:[`Nothing matches this filter:`,` `,(0,k.jsx)(`code`,{children:q_(e.activeFilter.query)})]}),(0,k.jsx)(`button`,{type:`button`,onClick:D,children:`Show all`})]}):(0,k.jsxs)(k.Fragment,{children:[(0,k.jsxs)(`span`,{children:[`Nothing matches “`,e.quickFilterText.trim(),`”`]}),(0,k.jsx)(`button`,{type:`button`,onClick:()=>ne(``),children:`Clear filter`})]})}):null,e.layoutNotice===null?null:(0,k.jsx)(`div`,{className:`layout-notice-pill`,role:`status`,children:(0,k.jsx)(`span`,{children:e.layoutNotice})}),n===null?null:(0,k.jsx)(`p`,{className:`waiting`,children:n})]}),(0,k.jsx)(pie,{nodes:e.model?.graph.nodes??[],activeFilter:e.activeFilter,view:re,open:ie.open,tab:ie.tab,showLifecycle:o,showEvidence:s,showOwnership:c,showNudges:l,onTogglePresentation:ae,onToggleOpen:oe,onSelectTab:se,onApply:ce,onStage:le,readOnly:ue},e.activeView),(0,k.jsx)(Oae,{diagnostics:e.diagnostics})]})},Aae=({text:e,expanded:t,onToggle:n})=>{let r=e??`No description declared in this model`,i=(0,v.useRef)(null),[a,o]=(0,v.useState)(!1);return(0,v.useLayoutEffect)(()=>{let e=i.current;if(e===null||t)return;let n=()=>o(e.scrollHeight>e.clientHeight+1);n();let r=new ResizeObserver(n);return r.observe(e),()=>r.disconnect()},[r,t]),(0,k.jsxs)(`div`,{className:`subject-description`,children:[(0,k.jsx)(`p`,{ref:i,className:t?`description-expanded`:`description-clamped`,children:r}),a||t?(0,k.jsx)(`button`,{type:`button`,"aria-expanded":t,onClick:n,children:t?`Show less`:`Show more`}):null]})},jae=({subject:e,model:t,operations:n,expanded:r,onToggleDescription:i,onClear:a,onConnect:o,onDelete:s,onStageChange:c,readOnly:l})=>{let u=e.type===`element`?t.graph.nodes.find(t=>t.id===e.id):void 0,d=e.type===`relationship`?t.graph.edges.find(t=>t.id===e.id):void 0;return(0,k.jsxs)(`section`,{className:`subject-inspector`,"aria-labelledby":`subject-heading`,children:[(0,k.jsxs)(`div`,{className:`subject-heading-row`,children:[(0,k.jsxs)(`div`,{children:[(0,k.jsx)(`p`,{className:`subject-type`,children:e.type===`element`?`Selected element`:`Selected relationship`}),(0,k.jsx)(`h2`,{id:`subject-heading`,children:e.type===`element`?e.title:`${e.sourceTitle} → ${e.targetTitle}`})]}),e.type===`element`&&!l?(0,k.jsx)(`button`,{type:`button`,className:`subject-connect`,onClick:()=>o(e.id),children:`Connect`}):null,l?null:(0,k.jsx)(`button`,{type:`button`,className:`subject-delete`,onClick:()=>s(e.id),children:`Delete`}),(0,k.jsx)(`button`,{type:`button`,className:`subject-clear`,onClick:a,children:`Clear`})]}),u===void 0?null:l?(0,k.jsx)(Xie,{node:u,model:t}):(0,k.jsx)(Yie,{node:u,model:t,operations:n,onStageChange:c}),d===void 0?null:l?(0,k.jsx)(Zie,{edge:d,model:t}):(0,k.jsx)(Qie,{edge:d,model:t,operations:n,onStageChange:c}),(0,k.jsx)(Aae,{text:e.description,expanded:r,onToggle:i})]})},Iy=e=>e.lifecycle===`active`?e.awaitingAgent?Py[e.agentStatus?.state??`thinking`]??`working`:`agent idle`:`closed`,Ly=({state:e,disabled:t,selectedSubject:n,onSend:r,onChoice:i,onClearSubject:a,onEnd:o})=>{let[s,c]=(0,v.useState)(``),l=e.lifecycle===`active`&&e.awaitingAgent,u=e.lifecycle===`active`?e.agentStatus:null;return(0,k.jsxs)(`div`,{className:`talk`,children:[(0,k.jsxs)(`div`,{className:`conversation-scroll`,children:[(0,k.jsx)(`ol`,{className:`ledger`,role:`log`,"aria-live":`polite`,children:e.transcript.length===0?(0,k.jsx)(`li`,{className:`empty`,children:(0,k.jsx)(`p`,{children:`Nothing asked yet. Question anything on the diagram.`})}):e.transcript.map(e=>(0,k.jsxs)(`li`,{className:`said said-${e.speaker}`,children:[(0,k.jsx)(`p`,{className:`who`,children:wae[e.speaker]}),(0,k.jsx)(`p`,{className:`words`,children:e.text})]},e.id))}),e.choices===null?null:(0,k.jsx)(Dae,{choices:e.choices,disabled:t,onChoice:i})]}),(0,k.jsxs)(`form`,{className:`composer`,onSubmit:e=>{e.preventDefault();let n=s.trim();n===``||t||(r(n),c(``))},children:[n===null?null:(0,k.jsxs)(`div`,{className:`subject-chip`,children:[(0,k.jsx)(`span`,{children:n.type===`element`?n.title:`${n.sourceTitle} → ${n.targetTitle}`}),(0,k.jsx)(`button`,{type:`button`,"aria-label":`Remove selected diagram context`,onClick:a,children:`Remove`})]}),(0,k.jsx)(`label`,{className:`offscreen`,htmlFor:`composer-text`,children:`Ask about this design`}),(0,k.jsx)(`textarea`,{id:`composer-text`,name:`question`,rows:3,value:s,disabled:t,placeholder:e.chatEnabled?n?.type===`element`?`Ask about this element`:n?.type===`relationship`?`Ask about this relationship`:`Ask about this design`:`This session is read-only`,onChange:e=>c(e.target.value),onKeyDown:e=>{e.key!==`Enter`||e.shiftKey||(e.preventDefault(),e.currentTarget.form?.requestSubmit())}}),(0,k.jsxs)(`div`,{className:`composer-foot`,children:[(0,k.jsxs)(`p`,{className:`agent-status`,role:`status`,"aria-live":`polite`,"aria-busy":l,children:[l?(0,k.jsx)(`span`,{className:`agent-spinner`,"aria-hidden":`true`}):null,(0,k.jsx)(`span`,{children:u===null?l?`Awaiting agent response`:`\xA0`:Py[u.state]??`\xA0`})]}),(0,k.jsx)(`button`,{type:`submit`,disabled:t||s.trim()===``,children:`Send`})]}),(0,k.jsxs)(`div`,{className:`session-foot`,children:[(0,k.jsx)(`span`,{className:`end-transition-status`,role:`status`,"aria-live":`polite`,"aria-atomic":`true`,children:Eae(e)}),(0,k.jsx)(`button`,{type:`button`,className:`end-session`,onClick:o,disabled:e.lifecycle!==`active`,children:e.lifecycle===`ending`||e.lifecycle===`closed`?`Returning…`:`Return to agent`})]})]})]})},Ry=({width:e,viewportWidth:t,onResize:n})=>{let r=Kv(t),i=(0,v.useRef)(null),a=e=>{let t=i.current;t?.pointerId===e.pointerId&&n(t.startWidth+t.startX-e.clientX)},o=t=>{i.current={pointerId:t.pointerId,startX:t.clientX,startWidth:e},t.currentTarget.setPointerCapture(t.pointerId)},s=e=>{i.current?.pointerId===e.pointerId&&(i.current=null,e.currentTarget.hasPointerCapture(e.pointerId)&&e.currentTarget.releasePointerCapture(e.pointerId))};return(0,k.jsx)(`div`,{className:`conversation-separator`,role:`separator`,"aria-label":`Resize conversation`,"aria-orientation":`vertical`,"aria-valuemin":r.min,"aria-valuemax":r.max,"aria-valuenow":Math.round(e),tabIndex:0,onPointerDown:o,onPointerMove:a,onPointerUp:s,onPointerCancel:s,onKeyDown:t=>{if(t.key!==`ArrowLeft`&&t.key!==`ArrowRight`)return;t.preventDefault();let r=t.shiftKey?32:8;n(e+(t.key===`ArrowLeft`?r:-r))}})},zy=({host:e,sections:t=aae,readOnly:n=!1,decorations:r,onReady:i})=>{let{state:a,connected:o,ask:s,choose:c,navigate:l,filter:u,clearFilter:d,setQuickFilterText:f,stageViewChange:p,stageViewMembership:m,saveLayout:h,discardChange:g,stageChange:_,clearChangeset:y,undoChangeset:b,redoChangeset:x,commitChangeset:S,end:C}=gae(e),[w,T]=(0,v.useReducer)(Zv,{width:window.innerWidth,height:window.innerHeight},({width:e,height:t})=>Xv(e,t)),[E,D]=(0,v.useState)(null),[ee,te]=(0,v.useState)(!1),[ne,re]=(0,v.useState)(!1),[ie,ae]=(0,v.useState)(void 0),[oe,se]=(0,v.useState)(void 0),[ce,le]=(0,v.useState)(r??{}),ue=(0,v.useRef)(null),de=(0,v.useRef)({graph:null,readOnly:n});de.current={graph:a.model?.graph??null,readOnly:n},(0,v.useEffect)(()=>{i?.(iae(()=>de.current,T,se,le))},[i]),(0,v.useEffect)(()=>{let e=()=>T({type:`viewport.resized`,viewportWidth:window.innerWidth,viewportHeight:window.innerHeight});return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]);let fe=(0,v.useRef)(null);(0,v.useEffect)(()=>{if(a.activeView===``){fe.current=null;return}let e=Gv(a.activeView,a.views,fe.current,o);if(e!==null){fe.current=e.id,u(e.query,`view`);for(let t of lae(e.presentation))T(t)}},[a.activeView,a.views,o,u]);let pe=(0,v.useRef)({transcriptLength:a.transcript.length,choices:a.choices,diagnostics:a.diagnostics});(0,v.useEffect)(()=>{let e=pe.current,t=!1;for(let n=e.transcriptLength;n<a.transcript.length;n+=1)if(a.transcript[n]?.speaker===`agent`){t=!0;break}let n=t||a.choices!==null&&a.choices!==e.choices||a.diagnostics.length>0&&a.diagnostics!==e.diagnostics;pe.current={transcriptLength:a.transcript.length,choices:a.choices,diagnostics:a.diagnostics},n&&T({type:`attention.received`})},[a.transcript.length,a.choices,a.diagnostics]);let me=(0,v.useRef)(a.model);(0,v.useEffect)(()=>{a.model!==me.current&&(me.current=a.model,T({type:`model.replaced`,graph:a.model?.graph??null}))},[a.model]);let he=a.model===null?a.lifecycle===`connecting`?`Reading the session`:`No model to draw`:E,ge=a.pendingChangeset.operations.length+a.pendingChangeset.viewOperations.length,_e=e=>!w.conversation.collapsed.includes(e),ve=a.model?.interrogation,ye=(0,v.useMemo)(()=>new Map(Object.entries(ve?.subjects??{}).map(([e,t])=>[e,t.length])),[ve]),be=n?t.filter(e=>e!==`palette`&&e!==`changes`):t,xe=ve===void 0?be.filter(e=>e!==`questions`):be,Se=w.selectedSubject?.type===`element`?w.selectedSubject.id:null,Ce=ve===void 0?void 0:Se===null?ve.workspace.length:ye.get(Se)??0,we=a.model?.vocabulary.conceptKinds??[],Te=(0,v.useMemo)(()=>new Set(w.tree.collapsed),[w.tree.collapsed]),Ee=w.conversation.hidden,De={"--conversation-width":Ee?`0px`:`${w.conversation.width}px`,"--changes-height":_e(`changes`)?`${w.conversation.changesHeight}px`:`auto`,"--chat-height":_e(`chat`)?`${w.conversation.chatHeight}px`:`auto`},Oe=e=>{se(e),T({type:`subject.draft.opened`})},ke=(e,t)=>T({type:`menu.opened`,target:e,x:t.x,y:t.y}),Ae=w.contextMenu===null?[]:Ay(w.contextMenu.target,{graph:a.model?.graph??null,relationshipKinds:a.model?.vocabulary.relationshipKinds??[],activeViewId:a.activeView,filtered:a.activeFilter!==null,membership:pae(a),readOnly:n}),je=e=>{let t=a.model?.graph??null;switch(e.type){case`subject.inspect`:{let n=t?.nodes.find(t=>t.id===e.id);if(n===void 0)return;T({type:`subject.selected`,subject:Vv(n)});return}case`relationship.inspect`:{let n=t?.edges.find(t=>t.id===e.id);if(n===void 0||t===null)return;T({type:`subject.selected`,subject:Hv(n,new Map(t.nodes.map(e=>[e.id,e.name])))});return}case`subject.connect`:T({type:`connection.started`,from:e.from});return;case`subject.delete`:case`relationship.delete`:T({type:`deletion.asked`,id:e.id});return;case`relationship.retype`:{let n=t?.edges.find(t=>t.id===e.id);if(n===void 0)return;for(let t of Cv(n.document,n.localId,`kind`,n.kindLabel,e.kind))_(t);T({type:`menu.dismissed`});return}case`canvas.draft-subject`:se(void 0),T({type:`subject.draft.opened`});return;case`view.add-subject`:case`view.remove-subject`:m(a.activeView,e.id,e.type===`view.add-subject`?`add`:`remove`),T({type:`menu.dismissed`});return;case`view.open`:l(e.id),T({type:`menu.dismissed`});return;case`view.clear`:d(),T({type:`menu.dismissed`});return;case`view.new`:ae(void 0),te(!0),T({type:`menu.dismissed`});return;case`view.delete`:T({type:`viewDeletion.asked`,id:e.id});return;case`view.rename`:T({type:`viewRename.asked`,id:e.id});return;case`view.new-folder`:re(!0),T({type:`menu.dismissed`});return;case`view.duplicate`:{let t=a.views.find(t=>t.id===e.id);if(t===void 0)return;let n=x_(t,new Set(a.views.map(e=>e.id)));p({op:`write-view`,...n}),T({type:`menu.dismissed`});return}case`view.new-in-folder`:{let t=a.views.find(t=>t.id===e.id);if(t===void 0)return;ae(Zre(t)),te(!0),T({type:`menu.dismissed`});return}case`view.copy-path`:{let t=a.views.find(t=>t.id===e.id);if(t===void 0)return;navigator.clipboard?.writeText(t.path),T({type:`menu.dismissed`});return}case`canvas.export-png`:{let e=ue.current;if(e===null)return;let t=document.createElement(`a`);t.href=e(),t.download=`${a.activeView===``?`all-subjects`:a.activeView}.png`,t.click(),T({type:`menu.dismissed`});return}}},Me=w.pendingViewDeletion===null?null:a.views.find(e=>e.id===w.pendingViewDeletion)??null,Ne=w.pendingViewRename===null?null:a.views.find(e=>e.id===w.pendingViewRename)??null,Pe=[`Show the session panel`,...w.conversation.unread===0?[]:[`${w.conversation.unread} unread`],...a.choices===null?[]:[`the agent is waiting on a choice`]].join(`, `);return(0,k.jsxs)(`main`,{className:`visual-shell`,style:De,children:[(0,k.jsx)(Fy,{state:a,connection:Tae(a,o)}),(0,k.jsxs)(`div`,{className:`workspace`,children:[(0,k.jsx)(Tie,{views:a.views,stagedViewOperations:a.pendingChangeset.viewOperations,activeViewId:a.activeView,nodes:a.model?.graph.nodes??[],inViewIds:a.activeFilter===null?null:new Set(a.activeFilter.matchedIds),filterText:w.tree.filterText,collapsed:Te,onFilterChange:e=>T({type:`tree.filtered`,filterText:e}),onToggle:e=>T({type:`tree.toggled`,key:e}),onSelectView:e=>l(e),onClearView:d,onNewView:()=>{ae(void 0),te(!0)},onSelectSubject:e=>{let t=a.model?.graph.nodes.find(t=>t.id===e);t!==void 0&&T({type:`subject.selected`,subject:Vv(t)})},onRowMenu:(e,t)=>ke(e.kind===`view`?{kind:`view-row`,id:e.id}:{kind:`model-row`,id:e.id},t),readOnly:n}),(0,k.jsx)(kae,{state:a,selectedId:w.selectedSubject?.id??null,waiting:he,layout:w.layout,nesting:w.nesting,direction:w.direction,decorations:ce,connection:w.connection,onConnectTarget:e=>T({type:`connection.targeted`,to:e}),onConnectCancel:()=>T({type:`connection.cancelled`}),onConnectStage:_,onDraftStage:e=>{_(e),e.op===`add-concept`&&m(a.activeView,e.concept.id,`add`)},draftingSubject:w.draftingSubject,draftInitialKind:oe,onKindDrop:e=>Oe(e),onDraftSubject:()=>{se(void 0),T({type:`subject.draft.opened`})},onDraftSubjectClose:()=>T({type:`subject.draft.closed`}),pendingDeletion:w.pendingDeletion,onDeletionDismiss:()=>T({type:`deletion.dismissed`}),showLifecycle:w.showLifecycle,showEvidence:w.showEvidence,showOwnership:w.showOwnership,showNudges:w.showNudges,openQuestionCounts:ye,onSelect:e=>T({type:`subject.selected`,subject:e}),onCanvasMenu:(e,t)=>ke(e.type===`node`?{kind:`subject`,id:e.id??``}:e.type===`edge`?{kind:`relationship`,id:e.id??``}:{kind:`canvas`},t),onClearFilter:d,onSaveLayout:h,onCanvasReady:e=>{ue.current=e},onQuickFilterChange:f,view:a.views.find(e=>e.id===a.activeView)??null,bottomPanel:w.bottomPanel,onTogglePresentation:(e,t)=>T({type:`presentation.toggled`,flag:e,value:t}),onToggleBottomPanel:()=>T({type:`bottomPanel.toggled`}),onSelectBottomTab:e=>T({type:`bottomPanel.tabSelected`,tab:e}),onApplyFilter:e=>u(e,`editor`),onStageView:p,readOnly:n}),Ee?(0,k.jsxs)(`button`,{type:`button`,className:`conversation-reopen`,title:`Show the session panel`,"aria-label":Pe,onClick:()=>T({type:`conversation.toggled`}),children:[(0,k.jsx)(`span`,{className:`reopen-chevron`,"aria-hidden":`true`,children:`«`}),w.conversation.unread===0?null:(0,k.jsx)(`span`,{className:`attention-count`,children:w.conversation.unread}),a.choices===null?null:(0,k.jsx)(`span`,{className:`attention-choice`,title:`The agent is waiting on a choice`,children:`?`})]}):(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(Ry,{width:w.conversation.width,viewportWidth:w.viewportWidth,onResize:e=>T({type:`conversation.resized`,width:e})}),(0,k.jsxs)(`aside`,{className:`section-stack`,"aria-label":`Session`,children:[(0,k.jsx)(`div`,{className:`stack-rim`,children:(0,k.jsx)(`button`,{type:`button`,className:`conversation-hide`,title:`Hide the session panel`,"aria-label":`Hide the session panel`,onClick:()=>T({type:`conversation.toggled`}),children:`»`})}),ty(xe,{palette:(0,k.jsx)($v,{id:`palette`,label:`Kind palette`,meta:we.length===0?void 0:we.length===1?`1 kind`:`${we.length} kinds`,open:_e(`palette`),onToggle:()=>T({type:`section.toggled`,section:`palette`}),children:we.length===0?(0,k.jsx)(`p`,{className:`section-empty`,children:`No model yet. The kinds arrive with it.`}):(0,k.jsx)(Tne,{kinds:we,onPick:Oe})}),properties:(0,k.jsx)($v,{id:`properties`,label:`Element properties`,meta:w.selectedSubject?.id,open:_e(`properties`),onToggle:()=>T({type:`section.toggled`,section:`properties`}),children:w.selectedSubject===null||a.model===null?(0,k.jsx)(`p`,{className:`section-empty`,children:`Nothing selected. Pick a subject on the canvas or in the rail.`}):(0,k.jsx)(jae,{subject:w.selectedSubject,model:a.model,operations:a.pendingChangeset.operations,expanded:w.descriptionExpanded,onToggleDescription:()=>T({type:`description.toggled`}),onClear:()=>T({type:`subject.cleared`}),onConnect:e=>T({type:`connection.started`,from:e}),onDelete:e=>T({type:`deletion.asked`,id:e}),onStageChange:_,readOnly:n})}),questions:(0,k.jsx)($v,{id:`questions`,label:`Open questions`,meta:Ce===void 0?void 0:Ce===0?`nothing open`:`${Ce} open`,open:_e(`questions`),onToggle:()=>T({type:`section.toggled`,section:`questions`}),children:ve===void 0?null:(0,k.jsx)($ie,{overlay:ve,selectedId:Se})}),changes:(0,k.jsx)($v,{id:`changes`,label:`Changes`,meta:ge===0?`nothing staged`:`${ge} staged`,open:_e(`changes`),onToggle:()=>T({type:`section.toggled`,section:`changes`}),children:(0,k.jsx)(Iie,{state:a,onDiscardChange:g,onClearChangeset:y,onUndoChangeset:b,onRedoChangeset:x,onCommitChangeset:S})}),chat:(0,k.jsx)($v,{id:`chat`,label:`Chat`,meta:w.conversation.unread===0?Iy(a):(0,k.jsx)(`span`,{className:`attention-count`,children:w.conversation.unread}),open:_e(`chat`),onToggle:()=>T({type:`section.toggled`,section:`chat`}),children:(0,k.jsx)(Ly,{state:a,disabled:!a.composerEnabled,selectedSubject:w.selectedSubject,onSend:e=>s(Qv(e,w.selectedSubject)),onChoice:c,onClearSubject:()=>T({type:`subject.cleared`}),onEnd:C})})},{changes:(0,k.jsx)(ey,{label:`Resize the changes section`,height:w.conversation.changesHeight,viewportHeight:w.viewportHeight,onResize:e=>T({type:`section.resized`,section:`changes`,height:e})}),chat:(0,k.jsx)(ey,{label:`Resize the chat section`,height:w.conversation.chatHeight,viewportHeight:w.viewportHeight,onResize:e=>T({type:`section.resized`,section:`chat`,height:e})})})]})]})]}),w.contextMenu===null?null:(0,k.jsx)(My,{groups:Ae,x:w.contextMenu.x,y:w.contextMenu.y,onChoose:je,onDismiss:()=>T({type:`menu.dismissed`})}),(0,k.jsx)(Oie,{views:a.views,activeViewId:a.activeView,query:a.activeFilter?.query??null,layout:w.layout,showLifecycle:w.showLifecycle,showEvidence:w.showEvidence,showOwnership:w.showOwnership,open:ee,folder:ie,onClose:()=>te(!1),onStage:p}),ne?(0,k.jsx)(by,{title:`New folder`,label:`Folder`,initialValue:``,confirmLabel:`Continue`,cancelLabel:`Cancel`,onConfirm:e=>{re(!1);let t=e.trim();t!==``&&(ae(t),te(!0))},onCancel:()=>re(!1)}):null,Ne===null?null:(0,k.jsx)(by,{title:`Rename view`,label:`Title`,initialValue:Ne.title,confirmLabel:`Rename`,cancelLabel:`Cancel`,onConfirm:e=>{p({op:`write-view`,...Qre(Ne,e)}),T({type:`viewRename.dismissed`})},onCancel:()=>T({type:`viewRename.dismissed`})}),Me===null?null:(0,k.jsx)(yy,{title:`Delete view`,message:`Stage the removal of "${Me.title}"? The projection document goes when the changeset is committed; no subject is touched.`,confirmLabel:`Delete`,cancelLabel:`Keep`,onConfirm:()=>{p({op:`delete-view`,path:Me.path}),T({type:`viewDeletion.dismissed`})},onCancel:()=>T({type:`viewDeletion.dismissed`})})]})},By=`/api/session`,Mae=`/socket`,Nae=1e3,Vy=()=>{let e=null;return{open:t=>{let n=!1,r,i=null,a=()=>{let e=new URL(Mae,window.location.href);return e.protocol=e.protocol===`https:`?`wss:`:`ws:`,e.searchParams.set(`after`,String(t.session().lastSequence)),e},o=()=>{if(!n){if(i??=Date.now(),!cy(i,Date.now())){t.frame({kind:`closing`,reason:`browser-timeout`});return}r=setTimeout(s,Nae)}},s=()=>{if(n)return;let r=new WebSocket(a());e=r,r.addEventListener(`open`,()=>{i=null,t.connected(!0)}),r.addEventListener(`message`,e=>{if(typeof e.data==`string`)try{t.frame(JSON.parse(e.data))}catch{}}),r.addEventListener(`close`,()=>{t.connected(!1),e=null,!(n||t.session().closed)&&(t.lost(),o())}),r.addEventListener(`error`,()=>r.close())};return(async()=>{let e=await fetch(By,{credentials:`same-origin`,headers:{Accept:`application/json`}});if(!e.ok)throw Error(`Session request answered ${e.status}`);let r=await e.json();n||(t.frame({kind:`ready`,snapshot:r}),s())})().catch(()=>{n||(t.lost(),o())}),()=>{n=!0,r!==void 0&&clearTimeout(r),e?.close()}},send:t=>{e!==null&&e.readyState===WebSocket.OPEN&&e.send(JSON.stringify(t))}}},Pae=document.getElementById(`visual-session`);if(Pae===null)throw Error(`The visual session page has no mount point`);(0,y.createRoot)(Pae).render((0,k.jsx)(zy,{host:Vy()}));