@wairon/cli 5.1.1-dev.109 → 5.1.1-dev.110
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/cli/index.js +1983 -897
- package/dist/cli/index.js.map +1 -1
- package/dist/index.d.ts +1704 -1517
- package/dist/index.js +2254 -796
- package/dist/index.js.map +1 -1
- package/dist/webapp.html +2 -2
- package/docs/cli.md +92 -12
- package/docs/design/pack-scoping.md +9 -9
- package/package.json +1 -1
- package/schemas/design-export-2.json +6 -0
package/dist/webapp.html
CHANGED
|
@@ -400,9 +400,9 @@ https://github.com/jquery/jquery/blob/master/src/event.js
|
|
|
400
400
|
`).concat(n.picking?`if(outColor.a == 0.0) discard;
|
|
401
401
|
else outColor = vIndex;`:"",`
|
|
402
402
|
}
|
|
403
|
-
`),o=VB(r,a,s);o.aPosition=r.getAttribLocation(o,"aPosition"),o.aIndex=r.getAttribLocation(o,"aIndex"),o.aVertType=r.getAttribLocation(o,"aVertType"),o.aTransform=r.getAttribLocation(o,"aTransform"),o.aAtlasId=r.getAttribLocation(o,"aAtlasId"),o.aTex=r.getAttribLocation(o,"aTex"),o.aPointAPointB=r.getAttribLocation(o,"aPointAPointB"),o.aPointCPointD=r.getAttribLocation(o,"aPointCPointD"),o.aLineWidth=r.getAttribLocation(o,"aLineWidth"),o.aColor=r.getAttribLocation(o,"aColor"),o.aCornerRadius=r.getAttribLocation(o,"aCornerRadius"),o.aBorderColor=r.getAttribLocation(o,"aBorderColor"),o.uPanZoomMatrix=r.getUniformLocation(o,"uPanZoomMatrix"),o.uAtlasSize=r.getUniformLocation(o,"uAtlasSize"),o.uBGColor=r.getUniformLocation(o,"uBGColor"),o.uZoom=r.getUniformLocation(o,"uZoom"),o.uTextures=[];for(var l=0;l<this.batchManager.getMaxAtlasesPerBatch();l++)o.uTextures.push(r.getUniformLocation(o,"uTexture".concat(l)));return o}},{key:"_createVAO",value:function(){var n=[0,0,1,0,1,1,0,0,1,1,0,1];this.vertexCount=n.length/2;var r=this.maxInstances,a=this.gl,i=this.program,s=a.createVertexArray();return a.bindVertexArray(s),QB(a,"vec2",i.aPosition,n),this.transformBuffer=ZB(a,r,i.aTransform),this.indexBuffer=La(a,r,"vec4",i.aIndex),this.vertTypeBuffer=La(a,r,"int",i.aVertType),this.atlasIdBuffer=La(a,r,"int",i.aAtlasId),this.texBuffer=La(a,r,"vec4",i.aTex),this.pointAPointBBuffer=La(a,r,"vec4",i.aPointAPointB),this.pointCPointDBuffer=La(a,r,"vec4",i.aPointCPointD),this.lineWidthBuffer=La(a,r,"vec2",i.aLineWidth),this.colorBuffer=La(a,r,"vec4",i.aColor),this.cornerRadiusBuffer=La(a,r,"vec4",i.aCornerRadius),this.borderColorBuffer=La(a,r,"vec4",i.aBorderColor),a.bindVertexArray(null),s}},{key:"buffers",get:function(){var n=this;return this._buffers||(this._buffers=Object.keys(this).filter(function(r){return Ti(r,"Buffer")}).map(function(r){return n[r]})),this._buffers}},{key:"startFrame",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Gl.SCREEN;this.panZoomMatrix=n,this.renderTarget=r,this.batchDebugInfo=[],this.wrappedCount=0,this.simpleCount=0,this.startBatch()}},{key:"startBatch",value:function(){this.instanceCount=0,this.batchManager.startBatch()}},{key:"endFrame",value:function(){this.endBatch()}},{key:"_isVisible",value:function(n,r){return n.visible()?r&&r.isVisible?r.isVisible(n):!0:!1}},{key:"drawTexture",value:function(n,r,a){var i=this.atlasManager,s=this.batchManager,o=i.getRenderTypeOpts(a);if(this._isVisible(n,o)&&!(n.isEdge()&&!this._isValidEdge(n))){if(this.renderTarget.picking&&o.getTexPickingMode){var l=o.getTexPickingMode(n);if(l===Zd.IGNORE)return;if(l==Zd.USE_BB){this.drawPickingRectangle(n,r,a);return}}var u=i.getAtlasInfo(n,a),d=_r(u),f;try{for(d.s();!(f=d.n()).done;){var h=f.value,v=h.atlas,p=h.tex1,y=h.tex2;s.canAddToCurrentBatch(v)||this.endBatch();for(var b=s.getAtlasIndexForBatch(v),m=0,g=[[p,!0],[y,!1]];m<g.length;m++){var w=Fn(g[m],2),x=w[0],E=w[1];if(x.w!=0){var S=this.instanceCount;this.vertTypeBuffer.getView(S)[0]=gp;var C=this.indexBuffer.getView(S);eo(r,C);var T=this.atlasIdBuffer.getView(S);T[0]=b;var N=this.texBuffer.getView(S);N[0]=x.x,N[1]=x.y,N[2]=x.w,N[3]=x.h;var P=this.transformBuffer.getMatrixView(S);this.setTransformMatrix(n,P,o,h,E),this.instanceCount++,E||this.wrappedCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}}catch(R){d.e(R)}finally{d.f()}}}},{key:"setTransformMatrix",value:function(n,r,a,i){var s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=0;if(a.shapeProps&&a.shapeProps.padding&&(o=n.pstyle(a.shapeProps.padding).pfValue),i){var l=i.bb,u=i.tex1,d=i.tex2,f=u.w/(u.w+d.w);s||(f=1-f);var h=this._getAdjustedBB(l,o,s,f);this._applyTransformMatrix(r,h,a,n)}else{var v=a.getBoundingBox(n),p=this._getAdjustedBB(v,o,!0,1);this._applyTransformMatrix(r,p,a,n)}}},{key:"_applyTransformMatrix",value:function(n,r,a,i){var s,o;Ww(n);var l=a.getRotation?a.getRotation(i):0;if(l!==0){var u=a.getRotationPoint(i),d=u.x,f=u.y;ud(n,n,[d,f]),Kw(n,n,l);var h=a.getRotationOffset(i);s=h.x+(r.xOffset||0),o=h.y+(r.yOffset||0)}else s=r.x1,o=r.y1;ud(n,n,[s,o]),Wg(n,n,[r.w,r.h])}},{key:"_getAdjustedBB",value:function(n,r,a,i){var s=n.x1,o=n.y1,l=n.w,u=n.h,d=n.yOffset;r&&(s-=r,o-=r,l+=2*r,u+=2*r);var f=0,h=l*i;return a&&i<1?l=h:!a&&i<1&&(f=l-h,s+=f,l=h),{x1:s,y1:o,w:l,h:u,xOffset:f,yOffset:d}}},{key:"drawPickingRectangle",value:function(n,r,a){var i=this.atlasManager.getRenderTypeOpts(a),s=this.instanceCount;this.vertTypeBuffer.getView(s)[0]=to;var o=this.indexBuffer.getView(s);eo(r,o);var l=this.colorBuffer.getView(s);hs([0,0,0],1,l);var u=this.transformBuffer.getMatrixView(s);this.setTransformMatrix(n,u,i),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}},{key:"drawNode",value:function(n,r,a){var i=this.simpleShapeOptions.get(a);if(this._isVisible(n,i)){var s=i.shapeProps,o=this._getVertTypeForShape(n,s.shape);if(o===void 0||i.isSimple&&!i.isSimple(n,this.renderTarget)){this.drawTexture(n,r,a);return}var l=this.instanceCount;if(this.vertTypeBuffer.getView(l)[0]=o,o===Fc||o===Tl){var u=i.getBoundingBox(n),d=this._getCornerRadius(n,s.radius,u),f=this.cornerRadiusBuffer.getView(l);f[0]=d,f[1]=d,f[2]=d,f[3]=d,o===Tl&&(f[0]=0,f[2]=0)}var h=this.indexBuffer.getView(l);eo(r,h);var v=this.renderTarget.picking?1:a==="node-body"?n.effectiveOpacity():1,p=this.renderTarget.picking?1:n.pstyle(s.opacity).value*v,y=n.pstyle(s.color).value,b=this.colorBuffer.getView(l);hs(y,p,b);var m=this.lineWidthBuffer.getView(l);if(m[0]=0,m[1]=0,s.border){var g=n.pstyle("border-width").value;if(g>0){var w=n.pstyle("border-color").value,x=v*n.pstyle("border-opacity").value,E=this.borderColorBuffer.getView(l);hs(w,x,E);var S=n.pstyle("border-position").value;if(S==="inside")m[0]=0,m[1]=-g;else if(S==="outside")m[0]=g,m[1]=0;else{var C=g/2;m[0]=C,m[1]=-C}}}var T=this.transformBuffer.getMatrixView(l);this.setTransformMatrix(n,T,i),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}},{key:"_getVertTypeForShape",value:function(n,r){var a=n.pstyle(r).value;switch(a){case"rectangle":return to;case"ellipse":return Nl;case"roundrectangle":case"round-rectangle":return Fc;case"bottom-round-rectangle":return Tl;default:return}}},{key:"_getCornerRadius",value:function(n,r,a){var i=a.w,s=a.h;if(n.pstyle(r).value==="auto")return Wi(i,s);var o=n.pstyle(r).pfValue,l=i/2,u=s/2;return Math.min(o,u,l)}},{key:"drawEdgeArrow",value:function(n,r,a){if(n.visible()){var i=n._private.rscratch,s,o,l;if(a==="source"?(s=i.arrowStartX,o=i.arrowStartY,l=i.srcArrowAngle):(s=i.arrowEndX,o=i.arrowEndY,l=i.tgtArrowAngle),!(isNaN(s)||s==null||isNaN(o)||o==null||isNaN(l)||l==null)){var u=n.pstyle(a+"-arrow-shape").value;if(u!=="none"){var d=n.pstyle(a+"-arrow-color").value,f=n.pstyle("opacity").value,h=n.pstyle("line-opacity").value,v=f*h,p=n.pstyle("width").pfValue,y=n.pstyle("arrow-scale").value,b=this.r.getArrowWidth(p,y),m=this.instanceCount,g=this.transformBuffer.getMatrixView(m);Ww(g),ud(g,g,[s,o]),Wg(g,g,[b,b]),Kw(g,g,l),this.vertTypeBuffer.getView(m)[0]=mp;var w=this.indexBuffer.getView(m);eo(r,w);var x=this.colorBuffer.getView(m);hs(d,v,x),this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}}},{key:"drawEdgeLine",value:function(n,r){if(n.visible()){var a=this._getEdgePoints(n);if(a){var i=n.pstyle("opacity").value,s=n.pstyle("line-opacity").value,o=n.pstyle("width").pfValue,l=n.pstyle("line-color").value,u=i*s;if(a.length/2+this.instanceCount>this.maxInstances&&this.endBatch(),a.length==4){var d=this.instanceCount;this.vertTypeBuffer.getView(d)[0]=Gw;var f=this.indexBuffer.getView(d);eo(r,f);var h=this.colorBuffer.getView(d);hs(l,u,h);var v=this.lineWidthBuffer.getView(d);v[0]=o;var p=this.pointAPointBBuffer.getView(d);p[0]=a[0],p[1]=a[1],p[2]=a[2],p[3]=a[3],this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}else for(var y=0;y<a.length-2;y+=2){var b=this.instanceCount;this.vertTypeBuffer.getView(b)[0]=Yw;var m=this.indexBuffer.getView(b);eo(r,m);var g=this.colorBuffer.getView(b);hs(l,u,g);var w=this.lineWidthBuffer.getView(b);w[0]=o;var x=a[y-2],E=a[y-1],S=a[y],C=a[y+1],T=a[y+2],N=a[y+3],P=a[y+4],R=a[y+5];y==0&&(x=2*S-T+.001,E=2*C-N+.001),y==a.length-4&&(P=2*T-S+.001,R=2*N-C+.001);var I=this.pointAPointBBuffer.getView(b);I[0]=x,I[1]=E,I[2]=S,I[3]=C;var D=this.pointCPointDBuffer.getView(b);D[0]=T,D[1]=N,D[2]=P,D[3]=R,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}}},{key:"_isValidEdge",value:function(n){var r=n._private.rscratch;return!(r.badLine||r.allpts==null||isNaN(r.allpts[0]))}},{key:"_getEdgePoints",value:function(n){var r=n._private.rscratch;if(this._isValidEdge(n)){var a=r.allpts;if(a.length==4)return a;var i=this._getNumSegments(n);return this._getCurveSegmentPoints(a,i)}}},{key:"_getNumSegments",value:function(n){var r=15;return Math.min(Math.max(r,5),this.maxInstances)}},{key:"_getCurveSegmentPoints",value:function(n,r){if(n.length==4)return n;for(var a=Array((r+1)*2),i=0;i<=r;i++)if(i==0)a[0]=n[0],a[1]=n[1];else if(i==r)a[i*2]=n[n.length-2],a[i*2+1]=n[n.length-1];else{var s=i/r;this._setCurvePoint(n,s,a,i*2)}return a}},{key:"_setCurvePoint",value:function(n,r,a,i){if(n.length<=2)a[i]=n[0],a[i+1]=n[1];else{for(var s=Array(n.length-2),o=0;o<s.length;o+=2){var l=(1-r)*n[o]+r*n[o+2],u=(1-r)*n[o+1]+r*n[o+3];s[o]=l,s[o+1]=u}return this._setCurvePoint(s,r,a,i)}}},{key:"endBatch",value:function(){var n=this.gl,r=this.vao,a=this.vertexCount,i=this.instanceCount;if(i!==0){var s=this.renderTarget.picking?this.pickingProgram:this.program;n.useProgram(s),n.bindVertexArray(r);var o=_r(this.buffers),l;try{for(o.s();!(l=o.n()).done;){var u=l.value;u.bufferSubData(i)}}catch(p){o.e(p)}finally{o.f()}for(var d=this.batchManager.getAtlases(),f=0;f<d.length;f++)d[f].bufferIfNeeded(n);for(var h=0;h<d.length;h++)n.activeTexture(n.TEXTURE0+h),n.bindTexture(n.TEXTURE_2D,d[h].texture),n.uniform1i(s.uTextures[h],h);n.uniform1f(s.uZoom,qB(this.r)),n.uniformMatrix3fv(s.uPanZoomMatrix,!1,this.panZoomMatrix),n.uniform1i(s.uAtlasSize,this.batchManager.getAtlasSize());var v=hs(this.bgColor,1);n.uniform4fv(s.uBGColor,v),n.drawArraysInstanced(n.TRIANGLES,0,a,i),n.bindVertexArray(null),n.bindTexture(n.TEXTURE_2D,null),this.debug&&this.batchDebugInfo.push({count:i,atlasCount:d.length}),this.startBatch()}}},{key:"getDebugInfo",value:function(){var n=this.atlasManager.getDebugInfo(),r=n.reduce(function(s,o){return s+o.atlasCount},0),a=this.batchDebugInfo,i=a.reduce(function(s,o){return s+o.count},0);return{atlasInfo:n,totalAtlases:r,wrappedCount:this.wrappedCount,simpleCount:this.simpleCount,batchCount:a.length,batchInfo:a,totalInstances:i}}}])}(),QS={};QS.initWebgl=function(t,e){var n=this,r=n.data.contexts[n.WEBGL];t.bgColor=fM(n),t.webglTexSize=Math.min(t.webglTexSize,r.getParameter(r.MAX_TEXTURE_SIZE)),t.webglTexRows=Math.min(t.webglTexRows,54),t.webglTexRowsNodes=Math.min(t.webglTexRowsNodes,54),t.webglBatchSize=Math.min(t.webglBatchSize,16384),t.webglTexPerBatch=Math.min(t.webglTexPerBatch,r.getParameter(r.MAX_TEXTURE_IMAGE_UNITS)),n.webglDebug=t.webglDebug,n.webglDebugShowAtlases=t.webglDebugShowAtlases,n.pickingFrameBuffer=JB(r),n.pickingFrameBuffer.needsDraw=!0,n.drawing=new dM(n,r,t);var a=function(f){return function(h){return n.getTextAngle(h,f)}},i=function(f){return function(h){var v=h.pstyle(f);return v&&v.value}},s=function(f){return function(h){return h.pstyle("".concat(f,"-opacity")).value>0}},o=function(f){var h=f.pstyle("text-events").strValue==="yes";return h?Zd.USE_BB:Zd.IGNORE},l=function(f){var h=f.position(),v=h.x,p=h.y,y=f.outerWidth(),b=f.outerHeight();return{w:y,h:b,x1:v-y/2,y1:p-b/2}};n.drawing.addAtlasCollection("node",{texRows:t.webglTexRowsNodes}),n.drawing.addAtlasCollection("label",{texRows:t.webglTexRows}),n.drawing.addTextureAtlasRenderType("node-body",{collection:"node",getKey:e.getStyleKey,getBoundingBox:e.getElementBox,drawElement:e.drawElement}),n.drawing.addSimpleShapeRenderType("node-body",{getBoundingBox:l,isSimple:WB,shapeProps:{shape:"shape",color:"background-color",opacity:"background-opacity",radius:"corner-radius",border:!0}}),n.drawing.addSimpleShapeRenderType("node-overlay",{getBoundingBox:l,isVisible:s("overlay"),shapeProps:{shape:"overlay-shape",color:"overlay-color",opacity:"overlay-opacity",padding:"overlay-padding",radius:"overlay-corner-radius"}}),n.drawing.addSimpleShapeRenderType("node-underlay",{getBoundingBox:l,isVisible:s("underlay"),shapeProps:{shape:"underlay-shape",color:"underlay-color",opacity:"underlay-opacity",padding:"underlay-padding",radius:"underlay-corner-radius"}}),n.drawing.addTextureAtlasRenderType("label",{collection:"label",getTexPickingMode:o,getKey:yp(e.getLabelKey,null),getBoundingBox:bp(e.getLabelBox,null),drawClipped:!0,drawElement:e.drawLabel,getRotation:a(null),getRotationPoint:e.getLabelRotationPoint,getRotationOffset:e.getLabelRotationOffset,isVisible:i("label")}),n.drawing.addTextureAtlasRenderType("edge-source-label",{collection:"label",getTexPickingMode:o,getKey:yp(e.getSourceLabelKey,"source"),getBoundingBox:bp(e.getSourceLabelBox,"source"),drawClipped:!0,drawElement:e.drawSourceLabel,getRotation:a("source"),getRotationPoint:e.getSourceLabelRotationPoint,getRotationOffset:e.getSourceLabelRotationOffset,isVisible:i("source-label")}),n.drawing.addTextureAtlasRenderType("edge-target-label",{collection:"label",getTexPickingMode:o,getKey:yp(e.getTargetLabelKey,"target"),getBoundingBox:bp(e.getTargetLabelBox,"target"),drawClipped:!0,drawElement:e.drawTargetLabel,getRotation:a("target"),getRotationPoint:e.getTargetLabelRotationPoint,getRotationOffset:e.getTargetLabelRotationOffset,isVisible:i("target-label")});var u=Uu(function(){console.log("garbage collect flag set"),n.data.gc=!0},1e4);n.onUpdateEleCalcs(function(d,f){var h=!1;f&&f.length>0&&(h|=n.drawing.invalidate(f)),h&&u()}),hM(n)};function fM(t){var e=t.cy.container(),n=e&&e.style&&e.style.backgroundColor||"white";return CC(n)}function ZS(t,e){var n=t._private.rscratch;return Cr(n,"labelWrapCachedLines",e)||[]}var yp=function(e,n){return function(r){var a=e(r),i=ZS(r,n);return i.length>1?i.map(function(s,o){return"".concat(a,"_").concat(o)}):a}},bp=function(e,n){return function(r,a){var i=e(r);if(typeof a=="string"){var s=a.indexOf("_");if(s>0){var o=Number(a.substring(s+1)),l=ZS(r,n),u=i.h/l.length,d=u*o,f=i.y1+d;return{x1:i.x1,w:i.w,y1:f,h:u,yOffset:d}}}return i}};function hM(t){{var e=t.render;t.render=function(i){i=i||{};var s=t.cy;t.webgl&&(s.zoom()>qS?(vM(t),e.call(t,i)):(pM(t),ej(t,i,Gl.SCREEN)))}}{var n=t.matchCanvasSize;t.matchCanvasSize=function(i){n.call(t,i),t.pickingFrameBuffer.setFramebufferAttachmentSizes(t.canvasWidth,t.canvasHeight),t.pickingFrameBuffer.needsDraw=!0}}t.findNearestElements=function(i,s,o,l){return wM(t,i,s)};{var r=t.invalidateCachedZSortedEles;t.invalidateCachedZSortedEles=function(){r.call(t),t.pickingFrameBuffer.needsDraw=!0}}{var a=t.notify;t.notify=function(i,s){a.call(t,i,s),i==="viewport"||i==="bounds"?t.pickingFrameBuffer.needsDraw=!0:i==="background"&&t.drawing.invalidate(s,{type:"node-body"})}}}function vM(t){var e=t.data.contexts[t.WEBGL];e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT)}function pM(t){var e=function(r){r.save(),r.setTransform(1,0,0,1,0,0),r.clearRect(0,0,t.canvasWidth,t.canvasHeight),r.restore()};e(t.data.contexts[t.NODE]),e(t.data.contexts[t.DRAG])}function gM(t){var e=t.canvasWidth,n=t.canvasHeight,r=Ey(t),a=r.pan,i=r.zoom,s=pp();ud(s,s,[a.x,a.y]),Wg(s,s,[i,i]);var o=pp();tM(o,e,n);var l=pp();return eM(l,o,s),l}function JS(t,e){var n=t.canvasWidth,r=t.canvasHeight,a=Ey(t),i=a.pan,s=a.zoom;e.setTransform(1,0,0,1,0,0),e.clearRect(0,0,n,r),e.translate(i.x,i.y),e.scale(s,s)}function mM(t,e){t.drawSelectionRectangle(e,function(n){return JS(t,n)})}function yM(t){var e=t.data.contexts[t.NODE];e.save(),JS(t,e),e.strokeStyle="rgba(0, 0, 0, 0.3)",e.beginPath(),e.moveTo(-1e3,0),e.lineTo(1e3,0),e.stroke(),e.beginPath(),e.moveTo(0,-1e3),e.lineTo(0,1e3),e.stroke(),e.restore()}function bM(t){var e=function(a,i,s){for(var o=a.atlasManager.getAtlasCollection(i),l=t.data.contexts[t.NODE],u=o.atlases,d=0;d<u.length;d++){var f=u[d],h=f.canvas;if(h){var v=h.width,p=h.height,y=v*d,b=h.height*s,m=.4;l.save(),l.scale(m,m),l.drawImage(h,y,b),l.strokeStyle="black",l.rect(y,b,v,p),l.stroke(),l.restore()}}},n=0;e(t.drawing,"node",n++),e(t.drawing,"label",n++)}function xM(t,e,n,r,a){var i,s,o,l,u=Ey(t),d=u.pan,f=u.zoom;{var h=HB(t,d,f,e,n),v=Fn(h,2),p=v[0],y=v[1],b=6;i=p-b/2,s=y-b/2,o=b,l=b}if(o===0||l===0)return[];var m=t.data.contexts[t.WEBGL];m.bindFramebuffer(m.FRAMEBUFFER,t.pickingFrameBuffer),t.pickingFrameBuffer.needsDraw&&(m.viewport(0,0,m.canvas.width,m.canvas.height),ej(t,null,Gl.PICKING),t.pickingFrameBuffer.needsDraw=!1);var g=o*l,w=new Uint8Array(g*4);m.readPixels(i,s,o,l,m.RGBA,m.UNSIGNED_BYTE,w),m.bindFramebuffer(m.FRAMEBUFFER,null);for(var x=new Set,E=0;E<g;E++){var S=w.slice(E*4,E*4+4),C=GB(S)-1;C>=0&&x.add(C)}return x}function wM(t,e,n){var r=xM(t,e,n),a=t.getCachedZSortedEles(),i,s,o=_r(r),l;try{for(o.s();!(l=o.n()).done;){var u=l.value,d=a[u];if(!i&&d.isNode()&&(i=d),!s&&d.isEdge()&&(s=d),i&&s)break}}catch(f){o.e(f)}finally{o.f()}return[i,s].filter(Boolean)}function xp(t,e,n){var r=t.drawing;e+=1,n.isNode()?(r.drawNode(n,e,"node-underlay"),r.drawNode(n,e,"node-body"),r.drawTexture(n,e,"label"),r.drawNode(n,e,"node-overlay")):(r.drawEdgeLine(n,e),r.drawEdgeArrow(n,e,"source"),r.drawEdgeArrow(n,e,"target"),r.drawTexture(n,e,"label"),r.drawTexture(n,e,"edge-source-label"),r.drawTexture(n,e,"edge-target-label"))}function ej(t,e,n){var r;t.webglDebug&&(r=performance.now());var a=t.drawing,i=0;if(n.screen&&t.data.canvasNeedsRedraw[t.SELECT_BOX]&&mM(t,e),t.data.canvasNeedsRedraw[t.NODE]||n.picking){var s=t.data.contexts[t.WEBGL];n.screen?(s.clearColor(0,0,0,0),s.enable(s.BLEND),s.blendFunc(s.ONE,s.ONE_MINUS_SRC_ALPHA)):s.disable(s.BLEND),s.clear(s.COLOR_BUFFER_BIT|s.DEPTH_BUFFER_BIT),s.viewport(0,0,s.canvas.width,s.canvas.height);var o=gM(t),l=t.getCachedZSortedEles();if(i=l.length,a.startFrame(o,n),n.screen){for(var u=0;u<l.nondrag.length;u++)xp(t,u,l.nondrag[u]);for(var d=0;d<l.drag.length;d++)xp(t,d,l.drag[d])}else if(n.picking)for(var f=0;f<l.length;f++)xp(t,f,l[f]);a.endFrame(),n.screen&&t.webglDebugShowAtlases&&(yM(t),bM(t)),t.data.canvasNeedsRedraw[t.NODE]=!1,t.data.canvasNeedsRedraw[t.DRAG]=!1}if(t.webglDebug){var h=performance.now(),v=!1,p=Math.ceil(h-r),y=a.getDebugInfo(),b=["".concat(i," elements"),"".concat(y.totalInstances," instances"),"".concat(y.batchCount," batches"),"".concat(y.totalAtlases," atlases"),"".concat(y.wrappedCount," wrapped textures"),"".concat(y.simpleCount," simple shapes")].join(", ");if(v)console.log("WebGL (".concat(n.name,") - time ").concat(p,"ms, ").concat(b));else{console.log("WebGL (".concat(n.name,") - frame time ").concat(p,"ms")),console.log("Totals:"),console.log(" ".concat(b)),console.log("Texture Atlases Used:");var m=y.atlasInfo,g=_r(m),w;try{for(g.s();!(w=g.n()).done;){var x=w.value;console.log(" ".concat(x.type,": ").concat(x.keyCount," keys, ").concat(x.atlasCount," atlases"))}}catch(E){g.e(E)}finally{g.f()}console.log("")}}t.data.gc&&(console.log("Garbage Collect!"),t.data.gc=!1,a.gc())}var as={};as.drawPolygonPath=function(t,e,n,r,a,i){var s=r/2,o=a/2;t.beginPath&&t.beginPath(),t.moveTo(e+s*i[0],n+o*i[1]);for(var l=1;l<i.length/2;l++)t.lineTo(e+s*i[l*2],n+o*i[l*2+1]);t.closePath()};as.drawRoundPolygonPath=function(t,e,n,r,a,i,s){s.forEach(function(o){return DS(t,o)}),t.closePath()};as.drawRoundRectanglePath=function(t,e,n,r,a,i){var s=r/2,o=a/2,l=i==="auto"?Wi(r,a):Math.min(i,o,s);t.beginPath&&t.beginPath(),t.moveTo(e,n-o),t.arcTo(e+s,n-o,e+s,n,l),t.arcTo(e+s,n+o,e,n+o,l),t.arcTo(e-s,n+o,e-s,n,l),t.arcTo(e-s,n-o,e,n-o,l),t.lineTo(e,n-o),t.closePath()};as.drawBottomRoundRectanglePath=function(t,e,n,r,a,i){var s=r/2,o=a/2,l=i==="auto"?Wi(r,a):i;t.beginPath&&t.beginPath(),t.moveTo(e,n-o),t.lineTo(e+s,n-o),t.lineTo(e+s,n),t.arcTo(e+s,n+o,e,n+o,l),t.arcTo(e-s,n+o,e-s,n,l),t.lineTo(e-s,n-o),t.lineTo(e,n-o),t.closePath()};as.drawCutRectanglePath=function(t,e,n,r,a,i,s){var o=r/2,l=a/2,u=s==="auto"?uy():s;t.beginPath&&t.beginPath(),t.moveTo(e-o+u,n-l),t.lineTo(e+o-u,n-l),t.lineTo(e+o,n-l+u),t.lineTo(e+o,n+l-u),t.lineTo(e+o-u,n+l),t.lineTo(e-o+u,n+l),t.lineTo(e-o,n+l-u),t.lineTo(e-o,n-l+u),t.closePath()};as.drawBarrelPath=function(t,e,n,r,a){var i=r/2,s=a/2,o=e-i,l=e+i,u=n-s,d=n+s,f=Lg(r,a),h=f.widthOffset,v=f.heightOffset,p=f.ctrlPtOffsetPct*h;t.beginPath&&t.beginPath(),t.moveTo(o,u+v),t.lineTo(o,d-v),t.quadraticCurveTo(o+p,d,o+h,d),t.lineTo(l-h,d),t.quadraticCurveTo(l-p,d,l,d-v),t.lineTo(l,u+v),t.quadraticCurveTo(l-p,u,l-h,u),t.lineTo(o+h,u),t.quadraticCurveTo(o+p,u,o,u+v),t.closePath()};var Xw=Math.sin(0),Qw=Math.cos(0),Kg={},Gg={},tj=Math.PI/40;for(var no=0*Math.PI;no<2*Math.PI;no+=tj)Kg[no]=Math.sin(no),Gg[no]=Math.cos(no);as.drawEllipsePath=function(t,e,n,r,a){if(t.beginPath&&t.beginPath(),t.ellipse)t.ellipse(e,n,r/2,a/2,0,0,2*Math.PI);else for(var i,s,o=r/2,l=a/2,u=0*Math.PI;u<2*Math.PI;u+=tj)i=e-o*Kg[u]*Xw+o*Gg[u]*Qw,s=n+l*Gg[u]*Xw+l*Kg[u]*Qw,u===0?t.moveTo(i,s):t.lineTo(i,s);t.closePath()};var Yu={};Yu.createBuffer=function(t,e){var n=document.createElement("canvas");return n.width=t,n.height=e,[n,n.getContext("2d")]};Yu.bufferCanvasImage=function(t){var e=this.cy,n=e.mutableElements(),r=n.boundingBox(),a=this.findContainerClientCoords(),i=t.full?Math.ceil(r.w):a[2],s=t.full?Math.ceil(r.h):a[3],o=_e(t.maxWidth)||_e(t.maxHeight),l=this.getPixelRatio(),u=1;if(t.scale!==void 0)i*=t.scale,s*=t.scale,u=t.scale;else if(o){var d=1/0,f=1/0;_e(t.maxWidth)&&(d=u*t.maxWidth/i),_e(t.maxHeight)&&(f=u*t.maxHeight/s),u=Math.min(d,f),i*=u,s*=u}o||(i*=l,s*=l,u*=l);var h=document.createElement("canvas");h.width=i,h.height=s,h.style.width=i+"px",h.style.height=s+"px";var v=h.getContext("2d");if(i>0&&s>0){v.clearRect(0,0,i,s),v.globalCompositeOperation="source-over";var p=this.getCachedZSortedEles();if(t.full)v.translate(-r.x1*u,-r.y1*u),v.scale(u,u),this.drawElements(v,p),v.scale(1/u,1/u),v.translate(r.x1*u,r.y1*u);else{var y=e.pan(),b={x:y.x*u,y:y.y*u};u*=e.zoom(),v.translate(b.x,b.y),v.scale(u,u),this.drawElements(v,p),v.scale(1/u,1/u),v.translate(-b.x,-b.y)}t.bg&&(v.globalCompositeOperation="destination-over",v.fillStyle=t.bg,v.rect(0,0,i,s),v.fill())}return h};function kM(t,e){for(var n=atob(t),r=new ArrayBuffer(n.length),a=new Uint8Array(r),i=0;i<n.length;i++)a[i]=n.charCodeAt(i);return new Blob([r],{type:e})}function Zw(t){var e=t.indexOf(",");return t.substr(e+1)}function nj(t,e,n){var r=function(){return e.toDataURL(n,t.quality)};switch(t.output){case"blob-promise":return new nl(function(a,i){try{e.toBlob(function(s){s!=null?a(s):i(new Error("`canvas.toBlob()` sent a null value in its callback"))},n,t.quality)}catch(s){i(s)}});case"blob":return kM(Zw(r()),n);case"base64":return Zw(r());case"base64uri":default:return r()}}Yu.png=function(t){return nj(t,this.bufferCanvasImage(t),"image/png")};Yu.jpg=function(t){return nj(t,this.bufferCanvasImage(t),"image/jpeg")};var rj={};rj.nodeShapeImpl=function(t,e,n,r,a,i,s,o){switch(t){case"ellipse":return this.drawEllipsePath(e,n,r,a,i);case"polygon":return this.drawPolygonPath(e,n,r,a,i,s);case"round-polygon":return this.drawRoundPolygonPath(e,n,r,a,i,s,o);case"roundrectangle":case"round-rectangle":return this.drawRoundRectanglePath(e,n,r,a,i,o);case"cutrectangle":case"cut-rectangle":return this.drawCutRectanglePath(e,n,r,a,i,s,o);case"bottomroundrectangle":case"bottom-round-rectangle":return this.drawBottomRoundRectanglePath(e,n,r,a,i,o);case"barrel":return this.drawBarrelPath(e,n,r,a,i)}};var EM=aj,At=aj.prototype;At.CANVAS_LAYERS=3;At.SELECT_BOX=0;At.DRAG=1;At.NODE=2;At.WEBGL=3;At.CANVAS_TYPES=["2d","2d","2d","webgl2"];At.BUFFER_COUNT=3;At.TEXTURE_BUFFER=0;At.MOTIONBLUR_BUFFER_NODE=1;At.MOTIONBLUR_BUFFER_DRAG=2;function aj(t){var e=this,n=e.cy.window(),r=n.document;t.webgl&&(At.CANVAS_LAYERS=e.CANVAS_LAYERS=4,console.log("webgl rendering enabled")),e.data={canvases:new Array(At.CANVAS_LAYERS),contexts:new Array(At.CANVAS_LAYERS),canvasNeedsRedraw:new Array(At.CANVAS_LAYERS),bufferCanvases:new Array(At.BUFFER_COUNT),bufferContexts:new Array(At.CANVAS_LAYERS)};var a="-webkit-tap-highlight-color",i="rgba(0,0,0,0)";e.data.canvasContainer=r.createElement("div");var s=e.data.canvasContainer.style;e.data.canvasContainer.style[a]=i,s.position="relative",s.zIndex="0",s.overflow="hidden";var o=t.cy.container();o.appendChild(e.data.canvasContainer),o.style[a]=i;var l={"-webkit-user-select":"none","-moz-user-select":"-moz-none","user-select":"none","-webkit-tap-highlight-color":"rgba(0,0,0,0)","outline-style":"none"};vR()&&(l["-ms-touch-action"]="none",l["touch-action"]="none");for(var u=0;u<At.CANVAS_LAYERS;u++){var d=e.data.canvases[u]=r.createElement("canvas"),f=At.CANVAS_TYPES[u];e.data.contexts[u]=d.getContext(f),e.data.contexts[u]||yn("Could not create canvas of type "+f),Object.keys(l).forEach(function(fe){d.style[fe]=l[fe]}),d.style.position="absolute",d.setAttribute("data-id","layer"+u),d.style.zIndex=String(At.CANVAS_LAYERS-u),e.data.canvasContainer.appendChild(d),e.data.canvasNeedsRedraw[u]=!1}e.data.topCanvas=e.data.canvases[0],e.data.canvases[At.NODE].setAttribute("data-id","layer"+At.NODE+"-node"),e.data.canvases[At.SELECT_BOX].setAttribute("data-id","layer"+At.SELECT_BOX+"-selectbox"),e.data.canvases[At.DRAG].setAttribute("data-id","layer"+At.DRAG+"-drag"),e.data.canvases[At.WEBGL]&&e.data.canvases[At.WEBGL].setAttribute("data-id","layer"+At.WEBGL+"-webgl");for(var u=0;u<At.BUFFER_COUNT;u++)e.data.bufferCanvases[u]=r.createElement("canvas"),e.data.bufferContexts[u]=e.data.bufferCanvases[u].getContext("2d"),e.data.bufferCanvases[u].style.position="absolute",e.data.bufferCanvases[u].setAttribute("data-id","buffer"+u),e.data.bufferCanvases[u].style.zIndex=String(-u-1),e.data.bufferCanvases[u].style.visibility="hidden";e.pathsEnabled=!0;var h=jr(),v=function(Z){return{x:(Z.x1+Z.x2)/2,y:(Z.y1+Z.y2)/2}},p=function(Z){return{x:-Z.w/2,y:-Z.h/2}},y=function(Z){var ee=Z[0]._private,ne=ee.oldBackgroundTimestamp===ee.backgroundTimestamp;return!ne},b=function(Z){return Z[0]._private.nodeKey},m=function(Z){return Z[0]._private.labelStyleKey},g=function(Z){return Z[0]._private.sourceLabelStyleKey},w=function(Z){return Z[0]._private.targetLabelStyleKey},x=function(Z,ee,ne,de,Re){return e.drawElement(Z,ee,ne,!1,!1,Re)},E=function(Z,ee,ne,de,Re){return e.drawElementText(Z,ee,ne,de,"main",Re)},S=function(Z,ee,ne,de,Re){return e.drawElementText(Z,ee,ne,de,"source",Re)},C=function(Z,ee,ne,de,Re){return e.drawElementText(Z,ee,ne,de,"target",Re)},T=function(Z){return Z.boundingBox(),Z[0]._private.bodyBounds},N=function(Z){return Z.boundingBox(),Z[0]._private.labelBounds.main||h},P=function(Z){return Z.boundingBox(),Z[0]._private.labelBounds.source||h},R=function(Z){return Z.boundingBox(),Z[0]._private.labelBounds.target||h},I=function(Z,ee){return ee},D=function(Z){return v(T(Z))},$=function(Z,ee,ne){var de=Z?Z+"-":"";return{x:ee.x+ne.pstyle(de+"text-margin-x").pfValue,y:ee.y+ne.pstyle(de+"text-margin-y").pfValue}},H=function(Z,ee,ne){var de=Z[0]._private.rscratch;return{x:de[ee],y:de[ne]}},V=function(Z){return $("",H(Z,"labelX","labelY"),Z)},U=function(Z){return $("source",H(Z,"sourceLabelX","sourceLabelY"),Z)},F=function(Z){return $("target",H(Z,"targetLabelX","targetLabelY"),Z)},G=function(Z){return p(T(Z))},z=function(Z){return p(P(Z))},_=function(Z){return p(R(Z))},K=function(Z){var ee=N(Z),ne=p(N(Z));if(Z.isNode()){switch(Ko(Z.pstyle("text-halign").value)){case"left":ne.x=-ee.w-(ee.leftPad||0);break;case"right":ne.x=-(ee.rightPad||0);break}switch(Go(Z.pstyle("text-valign").value)){case"top":ne.y=-ee.h-(ee.topPad||0);break;case"bottom":ne.y=-(ee.botPad||0);break}}return ne},ie=e.data.eleTxrCache=new Ml(e,{getKey:b,doesEleInvalidateKey:y,drawElement:x,getBoundingBox:T,getRotationPoint:D,getRotationOffset:G,allowEdgeTxrCaching:!1,allowParentTxrCaching:!1}),M=e.data.lblTxrCache=new Ml(e,{getKey:m,drawElement:E,getBoundingBox:N,getRotationPoint:V,getRotationOffset:K,isVisible:I}),oe=e.data.slbTxrCache=new Ml(e,{getKey:g,drawElement:S,getBoundingBox:P,getRotationPoint:U,getRotationOffset:z,isVisible:I}),ve=e.data.tlbTxrCache=new Ml(e,{getKey:w,drawElement:C,getBoundingBox:R,getRotationPoint:F,getRotationOffset:_,isVisible:I}),ye=e.data.lyrTxrCache=new HS(e);e.onUpdateEleCalcs(function(Z,ee){ie.invalidateElements(ee),M.invalidateElements(ee),oe.invalidateElements(ee),ve.invalidateElements(ee),ye.invalidateElements(ee);for(var ne=0;ne<ee.length;ne++){var de=ee[ne]._private;de.oldBackgroundTimestamp=de.backgroundTimestamp}});var Te=function(Z){for(var ee=0;ee<Z.length;ee++)ye.enqueueElementRefinement(Z[ee].ele)};ie.onDequeue(Te),M.onDequeue(Te),oe.onDequeue(Te),ve.onDequeue(Te),t.webgl&&e.initWebgl(t,{getStyleKey:b,getLabelKey:m,getSourceLabelKey:g,getTargetLabelKey:w,drawElement:x,drawLabel:E,drawSourceLabel:S,drawTargetLabel:C,getElementBox:T,getLabelBox:N,getSourceLabelBox:P,getTargetLabelBox:R,getElementRotationPoint:D,getElementRotationOffset:G,getLabelRotationPoint:V,getSourceLabelRotationPoint:U,getTargetLabelRotationPoint:F,getLabelRotationOffset:K,getSourceLabelRotationOffset:z,getTargetLabelRotationOffset:_})}At.redrawHint=function(t,e){var n=this;switch(t){case"eles":n.data.canvasNeedsRedraw[At.NODE]=e;break;case"drag":n.data.canvasNeedsRedraw[At.DRAG]=e;break;case"select":n.data.canvasNeedsRedraw[At.SELECT_BOX]=e;break;case"gc":n.data.gc=!0;break}};var CM=typeof Path2D<"u";At.path2dEnabled=function(t){if(t===void 0)return this.pathsEnabled;this.pathsEnabled=!!t};At.usePaths=function(){return CM&&this.pathsEnabled};At.setImgSmoothing=function(t,e){t.imageSmoothingEnabled!=null?t.imageSmoothingEnabled=e:(t.webkitImageSmoothingEnabled=e,t.mozImageSmoothingEnabled=e,t.msImageSmoothingEnabled=e)};At.getImgSmoothing=function(t){return t.imageSmoothingEnabled!=null?t.imageSmoothingEnabled:t.webkitImageSmoothingEnabled||t.mozImageSmoothingEnabled||t.msImageSmoothingEnabled};At.makeOffscreenCanvas=function(t,e){var n;if((typeof OffscreenCanvas>"u"?"undefined":Gn(OffscreenCanvas))!=="undefined")n=new OffscreenCanvas(t,e);else{var r=this.cy.window(),a=r.document;n=a.createElement("canvas"),n.width=t,n.height=e}return n};[WS,Va,ci,ky,Vs,rs,Rr,QS,as,Yu,rj].forEach(function(t){pt(At,t)});var SM=[{name:"null",impl:IS},{name:"base",impl:VS},{name:"canvas",impl:EM}],jM=[{type:"layout",extensions:YD},{type:"renderer",extensions:SM}],ij={},sj={};function oj(t,e,n){var r=n,a=function(T){Jt("Can not register `"+e+"` for `"+t+"` since `"+T+"` already exists in the prototype and can not be overridden")};if(t==="core"){if(Tu.prototype[e])return a(e);Tu.prototype[e]=n}else if(t==="collection"){if(or.prototype[e])return a(e);or.prototype[e]=n}else if(t==="layout"){for(var i=function(T){this.options=T,n.call(this,T),Wt(this._private)||(this._private={}),this._private.cy=T.cy,this._private.listeners=[],this.createEmitter()},s=i.prototype=Object.create(n.prototype),o=[],l=0;l<o.length;l++){var u=o[l];s[u]=s[u]||function(){return this}}s.start&&!s.run?s.run=function(){return this.start(),this}:!s.start&&s.run&&(s.start=function(){return this.run(),this});var d=n.prototype.stop;s.stop=function(){var C=this.options;if(C&&C.animate){var T=this.animations;if(T)for(var N=0;N<T.length;N++)T[N].stop()}return d?d.call(this):this.emit("layoutstop"),this},s.destroy||(s.destroy=function(){return this}),s.cy=function(){return this._private.cy};var f=function(T){return T._private.cy},h={addEventFields:function(T,N){N.layout=T,N.cy=f(T),N.target=T},bubble:function(){return!0},parent:function(T){return f(T)}};pt(s,{createEmitter:function(){return this._private.emitter=new _f(h,this),this},emitter:function(){return this._private.emitter},on:function(T,N){return this.emitter().on(T,N),this},one:function(T,N){return this.emitter().one(T,N),this},once:function(T,N){return this.emitter().one(T,N),this},removeListener:function(T,N){return this.emitter().removeListener(T,N),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},emit:function(T,N){return this.emitter().emit(T,N),this}}),Zt.eventAliasesOn(s),r=i}else if(t==="renderer"&&e!=="null"&&e!=="base"){var v=lj("renderer","base"),p=v.prototype,y=n,b=n.prototype,m=function(){v.apply(this,arguments),y.apply(this,arguments)},g=m.prototype;for(var w in p){var x=p[w],E=b[w]!=null;if(E)return a(w);g[w]=x}for(var S in b)g[S]=b[S];p.clientFunctions.forEach(function(C){g[C]=g[C]||function(){yn("Renderer does not implement `renderer."+C+"()` on its prototype")}}),r=m}else if(t==="__proto__"||t==="constructor"||t==="prototype")return yn(t+" is an illegal type to be registered, possibly lead to prototype pollutions");return SC({map:ij,keys:[t,e],value:r})}function lj(t,e){return jC({map:ij,keys:[t,e]})}function TM(t,e,n,r,a){return SC({map:sj,keys:[t,e,n,r],value:a})}function NM(t,e,n,r){return jC({map:sj,keys:[t,e,n,r]})}var Yg=function(){if(arguments.length===2)return lj.apply(null,arguments);if(arguments.length===3)return oj.apply(null,arguments);if(arguments.length===4)return NM.apply(null,arguments);if(arguments.length===5)return TM.apply(null,arguments);yn("Invalid extension access syntax")};Tu.prototype.extension=Yg;jM.forEach(function(t){t.extensions.forEach(function(e){oj(t.type,e.name,e.impl)})});var Jd=function(){if(!(this instanceof Jd))return new Jd;this.length=0},zs=Jd.prototype;zs.instanceString=function(){return"stylesheet"};zs.selector=function(t){var e=this.length++;return this[e]={selector:t,properties:[]},this};zs.css=function(t,e){var n=this.length-1;if(ft(t))this[n].properties.push({name:t,value:e});else if(Wt(t))for(var r=t,a=Object.keys(r),i=0;i<a.length;i++){var s=a[i],o=r[s];if(o!=null){var l=Jn.properties[s]||Jn.properties[Rf(s)];if(l!=null){var u=l.name,d=o;this[n].properties.push({name:u,value:d})}}}return this};zs.style=zs.css;zs.generateStyle=function(t){var e=new Jn(t);return this.appendToStyle(e)};zs.appendToStyle=function(t){for(var e=0;e<this.length;e++){var n=this[e],r=n.selector,a=n.properties;t.selector(r);for(var i=0;i<a.length;i++){var s=a[i];t.css(s.name,s.value)}}return t};var PM="3.34.0",Xi=function(e){if(e===void 0&&(e={}),Wt(e))return new Tu(e);if(ft(e))return Yg.apply(Yg,arguments)};Xi.use=function(t){var e=Array.prototype.slice.call(arguments,1);return e.unshift(Xi),t.apply(null,e),this};Xi.warnings=function(t){return AC(t)};Xi.version=PM;Xi.stylesheet=Xi.Stylesheet=Jd;function Jw(t,e){const n={Repository:1,FeatureComponent:1,RouterComponent:1},r={entry:{fill:"#eef4ff",stroke:"#4a7dcf"},logic:{fill:"#f4effd",stroke:"#8a5cf6"},data:{fill:"#fdf6e3",stroke:"#c9963f"},query:{fill:"#fbeee4",stroke:"#b0643a"},adapter:{fill:"#eef8f1",stroke:"#4f9e6b"},pattern:{fill:"#f6f8fa",stroke:"#6a737d"},retired:{fill:"#efedeb",stroke:"#8a817c"}};function a(d){return d==="Specialist"||d==="Gateway"?"retired":d==="Portal"||d==="Observer"?"entry":d==="Query"?"query":d==="Store"||d==="Index"||d==="Registry"?"data":d==="Adapter"?"adapter":n[d]?"pattern":"logic"}function i(d){return String(d).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}const s=[],o={};t.components.forEach(function(d){o[d.id]=d});function l(d,f,h,v,p,y){const b=y?p.x-y.x:p.x,m=y?p.y-y.y:p.y;s.push(' <mxCell id="'+i(d)+'" value="'+i(h)+'" style="'+i(v)+'" vertex="1" parent="'+i(f)+'"><mxGeometry x="'+b+'" y="'+m+'" width="'+p.w+'" height="'+p.h+'" as="geometry"/></mxCell>')}t.subsystems.forEach(function(d){const f=e.subs[d.id];f&&l("sub_"+d.id,"1",d.name,"rounded=1;arcSize=4;fillColor=#ffffff;strokeColor=#b6c0cc;verticalAlign=top;fontStyle=1;fontSize=13;container=1;collapsible=1;whiteSpace=wrap;",f)}),t.components.forEach(function(d){const f=e.boxes[d.id];if(!f)return;const h=!!n[d.componentType]&&d.owns.length>0,v=d.owner?o[d.owner]:void 0,p=!!(v&&e.boxes[v.id]),y=p?"comp_"+v.id:"sub_"+d.subsystem,b=p?e.boxes[v.id]:e.subs[d.subsystem],m=r[a(d.componentType)],g=d.name+`
|
|
403
|
+
`),o=VB(r,a,s);o.aPosition=r.getAttribLocation(o,"aPosition"),o.aIndex=r.getAttribLocation(o,"aIndex"),o.aVertType=r.getAttribLocation(o,"aVertType"),o.aTransform=r.getAttribLocation(o,"aTransform"),o.aAtlasId=r.getAttribLocation(o,"aAtlasId"),o.aTex=r.getAttribLocation(o,"aTex"),o.aPointAPointB=r.getAttribLocation(o,"aPointAPointB"),o.aPointCPointD=r.getAttribLocation(o,"aPointCPointD"),o.aLineWidth=r.getAttribLocation(o,"aLineWidth"),o.aColor=r.getAttribLocation(o,"aColor"),o.aCornerRadius=r.getAttribLocation(o,"aCornerRadius"),o.aBorderColor=r.getAttribLocation(o,"aBorderColor"),o.uPanZoomMatrix=r.getUniformLocation(o,"uPanZoomMatrix"),o.uAtlasSize=r.getUniformLocation(o,"uAtlasSize"),o.uBGColor=r.getUniformLocation(o,"uBGColor"),o.uZoom=r.getUniformLocation(o,"uZoom"),o.uTextures=[];for(var l=0;l<this.batchManager.getMaxAtlasesPerBatch();l++)o.uTextures.push(r.getUniformLocation(o,"uTexture".concat(l)));return o}},{key:"_createVAO",value:function(){var n=[0,0,1,0,1,1,0,0,1,1,0,1];this.vertexCount=n.length/2;var r=this.maxInstances,a=this.gl,i=this.program,s=a.createVertexArray();return a.bindVertexArray(s),QB(a,"vec2",i.aPosition,n),this.transformBuffer=ZB(a,r,i.aTransform),this.indexBuffer=La(a,r,"vec4",i.aIndex),this.vertTypeBuffer=La(a,r,"int",i.aVertType),this.atlasIdBuffer=La(a,r,"int",i.aAtlasId),this.texBuffer=La(a,r,"vec4",i.aTex),this.pointAPointBBuffer=La(a,r,"vec4",i.aPointAPointB),this.pointCPointDBuffer=La(a,r,"vec4",i.aPointCPointD),this.lineWidthBuffer=La(a,r,"vec2",i.aLineWidth),this.colorBuffer=La(a,r,"vec4",i.aColor),this.cornerRadiusBuffer=La(a,r,"vec4",i.aCornerRadius),this.borderColorBuffer=La(a,r,"vec4",i.aBorderColor),a.bindVertexArray(null),s}},{key:"buffers",get:function(){var n=this;return this._buffers||(this._buffers=Object.keys(this).filter(function(r){return Ti(r,"Buffer")}).map(function(r){return n[r]})),this._buffers}},{key:"startFrame",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Gl.SCREEN;this.panZoomMatrix=n,this.renderTarget=r,this.batchDebugInfo=[],this.wrappedCount=0,this.simpleCount=0,this.startBatch()}},{key:"startBatch",value:function(){this.instanceCount=0,this.batchManager.startBatch()}},{key:"endFrame",value:function(){this.endBatch()}},{key:"_isVisible",value:function(n,r){return n.visible()?r&&r.isVisible?r.isVisible(n):!0:!1}},{key:"drawTexture",value:function(n,r,a){var i=this.atlasManager,s=this.batchManager,o=i.getRenderTypeOpts(a);if(this._isVisible(n,o)&&!(n.isEdge()&&!this._isValidEdge(n))){if(this.renderTarget.picking&&o.getTexPickingMode){var l=o.getTexPickingMode(n);if(l===Zd.IGNORE)return;if(l==Zd.USE_BB){this.drawPickingRectangle(n,r,a);return}}var u=i.getAtlasInfo(n,a),d=_r(u),f;try{for(d.s();!(f=d.n()).done;){var h=f.value,v=h.atlas,p=h.tex1,y=h.tex2;s.canAddToCurrentBatch(v)||this.endBatch();for(var b=s.getAtlasIndexForBatch(v),m=0,g=[[p,!0],[y,!1]];m<g.length;m++){var w=Fn(g[m],2),x=w[0],E=w[1];if(x.w!=0){var S=this.instanceCount;this.vertTypeBuffer.getView(S)[0]=gp;var C=this.indexBuffer.getView(S);eo(r,C);var T=this.atlasIdBuffer.getView(S);T[0]=b;var N=this.texBuffer.getView(S);N[0]=x.x,N[1]=x.y,N[2]=x.w,N[3]=x.h;var P=this.transformBuffer.getMatrixView(S);this.setTransformMatrix(n,P,o,h,E),this.instanceCount++,E||this.wrappedCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}}catch(R){d.e(R)}finally{d.f()}}}},{key:"setTransformMatrix",value:function(n,r,a,i){var s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=0;if(a.shapeProps&&a.shapeProps.padding&&(o=n.pstyle(a.shapeProps.padding).pfValue),i){var l=i.bb,u=i.tex1,d=i.tex2,f=u.w/(u.w+d.w);s||(f=1-f);var h=this._getAdjustedBB(l,o,s,f);this._applyTransformMatrix(r,h,a,n)}else{var v=a.getBoundingBox(n),p=this._getAdjustedBB(v,o,!0,1);this._applyTransformMatrix(r,p,a,n)}}},{key:"_applyTransformMatrix",value:function(n,r,a,i){var s,o;Ww(n);var l=a.getRotation?a.getRotation(i):0;if(l!==0){var u=a.getRotationPoint(i),d=u.x,f=u.y;ud(n,n,[d,f]),Kw(n,n,l);var h=a.getRotationOffset(i);s=h.x+(r.xOffset||0),o=h.y+(r.yOffset||0)}else s=r.x1,o=r.y1;ud(n,n,[s,o]),Wg(n,n,[r.w,r.h])}},{key:"_getAdjustedBB",value:function(n,r,a,i){var s=n.x1,o=n.y1,l=n.w,u=n.h,d=n.yOffset;r&&(s-=r,o-=r,l+=2*r,u+=2*r);var f=0,h=l*i;return a&&i<1?l=h:!a&&i<1&&(f=l-h,s+=f,l=h),{x1:s,y1:o,w:l,h:u,xOffset:f,yOffset:d}}},{key:"drawPickingRectangle",value:function(n,r,a){var i=this.atlasManager.getRenderTypeOpts(a),s=this.instanceCount;this.vertTypeBuffer.getView(s)[0]=to;var o=this.indexBuffer.getView(s);eo(r,o);var l=this.colorBuffer.getView(s);hs([0,0,0],1,l);var u=this.transformBuffer.getMatrixView(s);this.setTransformMatrix(n,u,i),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}},{key:"drawNode",value:function(n,r,a){var i=this.simpleShapeOptions.get(a);if(this._isVisible(n,i)){var s=i.shapeProps,o=this._getVertTypeForShape(n,s.shape);if(o===void 0||i.isSimple&&!i.isSimple(n,this.renderTarget)){this.drawTexture(n,r,a);return}var l=this.instanceCount;if(this.vertTypeBuffer.getView(l)[0]=o,o===Fc||o===Tl){var u=i.getBoundingBox(n),d=this._getCornerRadius(n,s.radius,u),f=this.cornerRadiusBuffer.getView(l);f[0]=d,f[1]=d,f[2]=d,f[3]=d,o===Tl&&(f[0]=0,f[2]=0)}var h=this.indexBuffer.getView(l);eo(r,h);var v=this.renderTarget.picking?1:a==="node-body"?n.effectiveOpacity():1,p=this.renderTarget.picking?1:n.pstyle(s.opacity).value*v,y=n.pstyle(s.color).value,b=this.colorBuffer.getView(l);hs(y,p,b);var m=this.lineWidthBuffer.getView(l);if(m[0]=0,m[1]=0,s.border){var g=n.pstyle("border-width").value;if(g>0){var w=n.pstyle("border-color").value,x=v*n.pstyle("border-opacity").value,E=this.borderColorBuffer.getView(l);hs(w,x,E);var S=n.pstyle("border-position").value;if(S==="inside")m[0]=0,m[1]=-g;else if(S==="outside")m[0]=g,m[1]=0;else{var C=g/2;m[0]=C,m[1]=-C}}}var T=this.transformBuffer.getMatrixView(l);this.setTransformMatrix(n,T,i),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}},{key:"_getVertTypeForShape",value:function(n,r){var a=n.pstyle(r).value;switch(a){case"rectangle":return to;case"ellipse":return Nl;case"roundrectangle":case"round-rectangle":return Fc;case"bottom-round-rectangle":return Tl;default:return}}},{key:"_getCornerRadius",value:function(n,r,a){var i=a.w,s=a.h;if(n.pstyle(r).value==="auto")return Wi(i,s);var o=n.pstyle(r).pfValue,l=i/2,u=s/2;return Math.min(o,u,l)}},{key:"drawEdgeArrow",value:function(n,r,a){if(n.visible()){var i=n._private.rscratch,s,o,l;if(a==="source"?(s=i.arrowStartX,o=i.arrowStartY,l=i.srcArrowAngle):(s=i.arrowEndX,o=i.arrowEndY,l=i.tgtArrowAngle),!(isNaN(s)||s==null||isNaN(o)||o==null||isNaN(l)||l==null)){var u=n.pstyle(a+"-arrow-shape").value;if(u!=="none"){var d=n.pstyle(a+"-arrow-color").value,f=n.pstyle("opacity").value,h=n.pstyle("line-opacity").value,v=f*h,p=n.pstyle("width").pfValue,y=n.pstyle("arrow-scale").value,b=this.r.getArrowWidth(p,y),m=this.instanceCount,g=this.transformBuffer.getMatrixView(m);Ww(g),ud(g,g,[s,o]),Wg(g,g,[b,b]),Kw(g,g,l),this.vertTypeBuffer.getView(m)[0]=mp;var w=this.indexBuffer.getView(m);eo(r,w);var x=this.colorBuffer.getView(m);hs(d,v,x),this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}}},{key:"drawEdgeLine",value:function(n,r){if(n.visible()){var a=this._getEdgePoints(n);if(a){var i=n.pstyle("opacity").value,s=n.pstyle("line-opacity").value,o=n.pstyle("width").pfValue,l=n.pstyle("line-color").value,u=i*s;if(a.length/2+this.instanceCount>this.maxInstances&&this.endBatch(),a.length==4){var d=this.instanceCount;this.vertTypeBuffer.getView(d)[0]=Gw;var f=this.indexBuffer.getView(d);eo(r,f);var h=this.colorBuffer.getView(d);hs(l,u,h);var v=this.lineWidthBuffer.getView(d);v[0]=o;var p=this.pointAPointBBuffer.getView(d);p[0]=a[0],p[1]=a[1],p[2]=a[2],p[3]=a[3],this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}else for(var y=0;y<a.length-2;y+=2){var b=this.instanceCount;this.vertTypeBuffer.getView(b)[0]=Yw;var m=this.indexBuffer.getView(b);eo(r,m);var g=this.colorBuffer.getView(b);hs(l,u,g);var w=this.lineWidthBuffer.getView(b);w[0]=o;var x=a[y-2],E=a[y-1],S=a[y],C=a[y+1],T=a[y+2],N=a[y+3],P=a[y+4],R=a[y+5];y==0&&(x=2*S-T+.001,E=2*C-N+.001),y==a.length-4&&(P=2*T-S+.001,R=2*N-C+.001);var I=this.pointAPointBBuffer.getView(b);I[0]=x,I[1]=E,I[2]=S,I[3]=C;var D=this.pointCPointDBuffer.getView(b);D[0]=T,D[1]=N,D[2]=P,D[3]=R,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}}},{key:"_isValidEdge",value:function(n){var r=n._private.rscratch;return!(r.badLine||r.allpts==null||isNaN(r.allpts[0]))}},{key:"_getEdgePoints",value:function(n){var r=n._private.rscratch;if(this._isValidEdge(n)){var a=r.allpts;if(a.length==4)return a;var i=this._getNumSegments(n);return this._getCurveSegmentPoints(a,i)}}},{key:"_getNumSegments",value:function(n){var r=15;return Math.min(Math.max(r,5),this.maxInstances)}},{key:"_getCurveSegmentPoints",value:function(n,r){if(n.length==4)return n;for(var a=Array((r+1)*2),i=0;i<=r;i++)if(i==0)a[0]=n[0],a[1]=n[1];else if(i==r)a[i*2]=n[n.length-2],a[i*2+1]=n[n.length-1];else{var s=i/r;this._setCurvePoint(n,s,a,i*2)}return a}},{key:"_setCurvePoint",value:function(n,r,a,i){if(n.length<=2)a[i]=n[0],a[i+1]=n[1];else{for(var s=Array(n.length-2),o=0;o<s.length;o+=2){var l=(1-r)*n[o]+r*n[o+2],u=(1-r)*n[o+1]+r*n[o+3];s[o]=l,s[o+1]=u}return this._setCurvePoint(s,r,a,i)}}},{key:"endBatch",value:function(){var n=this.gl,r=this.vao,a=this.vertexCount,i=this.instanceCount;if(i!==0){var s=this.renderTarget.picking?this.pickingProgram:this.program;n.useProgram(s),n.bindVertexArray(r);var o=_r(this.buffers),l;try{for(o.s();!(l=o.n()).done;){var u=l.value;u.bufferSubData(i)}}catch(p){o.e(p)}finally{o.f()}for(var d=this.batchManager.getAtlases(),f=0;f<d.length;f++)d[f].bufferIfNeeded(n);for(var h=0;h<d.length;h++)n.activeTexture(n.TEXTURE0+h),n.bindTexture(n.TEXTURE_2D,d[h].texture),n.uniform1i(s.uTextures[h],h);n.uniform1f(s.uZoom,qB(this.r)),n.uniformMatrix3fv(s.uPanZoomMatrix,!1,this.panZoomMatrix),n.uniform1i(s.uAtlasSize,this.batchManager.getAtlasSize());var v=hs(this.bgColor,1);n.uniform4fv(s.uBGColor,v),n.drawArraysInstanced(n.TRIANGLES,0,a,i),n.bindVertexArray(null),n.bindTexture(n.TEXTURE_2D,null),this.debug&&this.batchDebugInfo.push({count:i,atlasCount:d.length}),this.startBatch()}}},{key:"getDebugInfo",value:function(){var n=this.atlasManager.getDebugInfo(),r=n.reduce(function(s,o){return s+o.atlasCount},0),a=this.batchDebugInfo,i=a.reduce(function(s,o){return s+o.count},0);return{atlasInfo:n,totalAtlases:r,wrappedCount:this.wrappedCount,simpleCount:this.simpleCount,batchCount:a.length,batchInfo:a,totalInstances:i}}}])}(),QS={};QS.initWebgl=function(t,e){var n=this,r=n.data.contexts[n.WEBGL];t.bgColor=fM(n),t.webglTexSize=Math.min(t.webglTexSize,r.getParameter(r.MAX_TEXTURE_SIZE)),t.webglTexRows=Math.min(t.webglTexRows,54),t.webglTexRowsNodes=Math.min(t.webglTexRowsNodes,54),t.webglBatchSize=Math.min(t.webglBatchSize,16384),t.webglTexPerBatch=Math.min(t.webglTexPerBatch,r.getParameter(r.MAX_TEXTURE_IMAGE_UNITS)),n.webglDebug=t.webglDebug,n.webglDebugShowAtlases=t.webglDebugShowAtlases,n.pickingFrameBuffer=JB(r),n.pickingFrameBuffer.needsDraw=!0,n.drawing=new dM(n,r,t);var a=function(f){return function(h){return n.getTextAngle(h,f)}},i=function(f){return function(h){var v=h.pstyle(f);return v&&v.value}},s=function(f){return function(h){return h.pstyle("".concat(f,"-opacity")).value>0}},o=function(f){var h=f.pstyle("text-events").strValue==="yes";return h?Zd.USE_BB:Zd.IGNORE},l=function(f){var h=f.position(),v=h.x,p=h.y,y=f.outerWidth(),b=f.outerHeight();return{w:y,h:b,x1:v-y/2,y1:p-b/2}};n.drawing.addAtlasCollection("node",{texRows:t.webglTexRowsNodes}),n.drawing.addAtlasCollection("label",{texRows:t.webglTexRows}),n.drawing.addTextureAtlasRenderType("node-body",{collection:"node",getKey:e.getStyleKey,getBoundingBox:e.getElementBox,drawElement:e.drawElement}),n.drawing.addSimpleShapeRenderType("node-body",{getBoundingBox:l,isSimple:WB,shapeProps:{shape:"shape",color:"background-color",opacity:"background-opacity",radius:"corner-radius",border:!0}}),n.drawing.addSimpleShapeRenderType("node-overlay",{getBoundingBox:l,isVisible:s("overlay"),shapeProps:{shape:"overlay-shape",color:"overlay-color",opacity:"overlay-opacity",padding:"overlay-padding",radius:"overlay-corner-radius"}}),n.drawing.addSimpleShapeRenderType("node-underlay",{getBoundingBox:l,isVisible:s("underlay"),shapeProps:{shape:"underlay-shape",color:"underlay-color",opacity:"underlay-opacity",padding:"underlay-padding",radius:"underlay-corner-radius"}}),n.drawing.addTextureAtlasRenderType("label",{collection:"label",getTexPickingMode:o,getKey:yp(e.getLabelKey,null),getBoundingBox:bp(e.getLabelBox,null),drawClipped:!0,drawElement:e.drawLabel,getRotation:a(null),getRotationPoint:e.getLabelRotationPoint,getRotationOffset:e.getLabelRotationOffset,isVisible:i("label")}),n.drawing.addTextureAtlasRenderType("edge-source-label",{collection:"label",getTexPickingMode:o,getKey:yp(e.getSourceLabelKey,"source"),getBoundingBox:bp(e.getSourceLabelBox,"source"),drawClipped:!0,drawElement:e.drawSourceLabel,getRotation:a("source"),getRotationPoint:e.getSourceLabelRotationPoint,getRotationOffset:e.getSourceLabelRotationOffset,isVisible:i("source-label")}),n.drawing.addTextureAtlasRenderType("edge-target-label",{collection:"label",getTexPickingMode:o,getKey:yp(e.getTargetLabelKey,"target"),getBoundingBox:bp(e.getTargetLabelBox,"target"),drawClipped:!0,drawElement:e.drawTargetLabel,getRotation:a("target"),getRotationPoint:e.getTargetLabelRotationPoint,getRotationOffset:e.getTargetLabelRotationOffset,isVisible:i("target-label")});var u=Uu(function(){console.log("garbage collect flag set"),n.data.gc=!0},1e4);n.onUpdateEleCalcs(function(d,f){var h=!1;f&&f.length>0&&(h|=n.drawing.invalidate(f)),h&&u()}),hM(n)};function fM(t){var e=t.cy.container(),n=e&&e.style&&e.style.backgroundColor||"white";return CC(n)}function ZS(t,e){var n=t._private.rscratch;return Cr(n,"labelWrapCachedLines",e)||[]}var yp=function(e,n){return function(r){var a=e(r),i=ZS(r,n);return i.length>1?i.map(function(s,o){return"".concat(a,"_").concat(o)}):a}},bp=function(e,n){return function(r,a){var i=e(r);if(typeof a=="string"){var s=a.indexOf("_");if(s>0){var o=Number(a.substring(s+1)),l=ZS(r,n),u=i.h/l.length,d=u*o,f=i.y1+d;return{x1:i.x1,w:i.w,y1:f,h:u,yOffset:d}}}return i}};function hM(t){{var e=t.render;t.render=function(i){i=i||{};var s=t.cy;t.webgl&&(s.zoom()>qS?(vM(t),e.call(t,i)):(pM(t),ej(t,i,Gl.SCREEN)))}}{var n=t.matchCanvasSize;t.matchCanvasSize=function(i){n.call(t,i),t.pickingFrameBuffer.setFramebufferAttachmentSizes(t.canvasWidth,t.canvasHeight),t.pickingFrameBuffer.needsDraw=!0}}t.findNearestElements=function(i,s,o,l){return wM(t,i,s)};{var r=t.invalidateCachedZSortedEles;t.invalidateCachedZSortedEles=function(){r.call(t),t.pickingFrameBuffer.needsDraw=!0}}{var a=t.notify;t.notify=function(i,s){a.call(t,i,s),i==="viewport"||i==="bounds"?t.pickingFrameBuffer.needsDraw=!0:i==="background"&&t.drawing.invalidate(s,{type:"node-body"})}}}function vM(t){var e=t.data.contexts[t.WEBGL];e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT)}function pM(t){var e=function(r){r.save(),r.setTransform(1,0,0,1,0,0),r.clearRect(0,0,t.canvasWidth,t.canvasHeight),r.restore()};e(t.data.contexts[t.NODE]),e(t.data.contexts[t.DRAG])}function gM(t){var e=t.canvasWidth,n=t.canvasHeight,r=Ey(t),a=r.pan,i=r.zoom,s=pp();ud(s,s,[a.x,a.y]),Wg(s,s,[i,i]);var o=pp();tM(o,e,n);var l=pp();return eM(l,o,s),l}function JS(t,e){var n=t.canvasWidth,r=t.canvasHeight,a=Ey(t),i=a.pan,s=a.zoom;e.setTransform(1,0,0,1,0,0),e.clearRect(0,0,n,r),e.translate(i.x,i.y),e.scale(s,s)}function mM(t,e){t.drawSelectionRectangle(e,function(n){return JS(t,n)})}function yM(t){var e=t.data.contexts[t.NODE];e.save(),JS(t,e),e.strokeStyle="rgba(0, 0, 0, 0.3)",e.beginPath(),e.moveTo(-1e3,0),e.lineTo(1e3,0),e.stroke(),e.beginPath(),e.moveTo(0,-1e3),e.lineTo(0,1e3),e.stroke(),e.restore()}function bM(t){var e=function(a,i,s){for(var o=a.atlasManager.getAtlasCollection(i),l=t.data.contexts[t.NODE],u=o.atlases,d=0;d<u.length;d++){var f=u[d],h=f.canvas;if(h){var v=h.width,p=h.height,y=v*d,b=h.height*s,m=.4;l.save(),l.scale(m,m),l.drawImage(h,y,b),l.strokeStyle="black",l.rect(y,b,v,p),l.stroke(),l.restore()}}},n=0;e(t.drawing,"node",n++),e(t.drawing,"label",n++)}function xM(t,e,n,r,a){var i,s,o,l,u=Ey(t),d=u.pan,f=u.zoom;{var h=HB(t,d,f,e,n),v=Fn(h,2),p=v[0],y=v[1],b=6;i=p-b/2,s=y-b/2,o=b,l=b}if(o===0||l===0)return[];var m=t.data.contexts[t.WEBGL];m.bindFramebuffer(m.FRAMEBUFFER,t.pickingFrameBuffer),t.pickingFrameBuffer.needsDraw&&(m.viewport(0,0,m.canvas.width,m.canvas.height),ej(t,null,Gl.PICKING),t.pickingFrameBuffer.needsDraw=!1);var g=o*l,w=new Uint8Array(g*4);m.readPixels(i,s,o,l,m.RGBA,m.UNSIGNED_BYTE,w),m.bindFramebuffer(m.FRAMEBUFFER,null);for(var x=new Set,E=0;E<g;E++){var S=w.slice(E*4,E*4+4),C=GB(S)-1;C>=0&&x.add(C)}return x}function wM(t,e,n){var r=xM(t,e,n),a=t.getCachedZSortedEles(),i,s,o=_r(r),l;try{for(o.s();!(l=o.n()).done;){var u=l.value,d=a[u];if(!i&&d.isNode()&&(i=d),!s&&d.isEdge()&&(s=d),i&&s)break}}catch(f){o.e(f)}finally{o.f()}return[i,s].filter(Boolean)}function xp(t,e,n){var r=t.drawing;e+=1,n.isNode()?(r.drawNode(n,e,"node-underlay"),r.drawNode(n,e,"node-body"),r.drawTexture(n,e,"label"),r.drawNode(n,e,"node-overlay")):(r.drawEdgeLine(n,e),r.drawEdgeArrow(n,e,"source"),r.drawEdgeArrow(n,e,"target"),r.drawTexture(n,e,"label"),r.drawTexture(n,e,"edge-source-label"),r.drawTexture(n,e,"edge-target-label"))}function ej(t,e,n){var r;t.webglDebug&&(r=performance.now());var a=t.drawing,i=0;if(n.screen&&t.data.canvasNeedsRedraw[t.SELECT_BOX]&&mM(t,e),t.data.canvasNeedsRedraw[t.NODE]||n.picking){var s=t.data.contexts[t.WEBGL];n.screen?(s.clearColor(0,0,0,0),s.enable(s.BLEND),s.blendFunc(s.ONE,s.ONE_MINUS_SRC_ALPHA)):s.disable(s.BLEND),s.clear(s.COLOR_BUFFER_BIT|s.DEPTH_BUFFER_BIT),s.viewport(0,0,s.canvas.width,s.canvas.height);var o=gM(t),l=t.getCachedZSortedEles();if(i=l.length,a.startFrame(o,n),n.screen){for(var u=0;u<l.nondrag.length;u++)xp(t,u,l.nondrag[u]);for(var d=0;d<l.drag.length;d++)xp(t,d,l.drag[d])}else if(n.picking)for(var f=0;f<l.length;f++)xp(t,f,l[f]);a.endFrame(),n.screen&&t.webglDebugShowAtlases&&(yM(t),bM(t)),t.data.canvasNeedsRedraw[t.NODE]=!1,t.data.canvasNeedsRedraw[t.DRAG]=!1}if(t.webglDebug){var h=performance.now(),v=!1,p=Math.ceil(h-r),y=a.getDebugInfo(),b=["".concat(i," elements"),"".concat(y.totalInstances," instances"),"".concat(y.batchCount," batches"),"".concat(y.totalAtlases," atlases"),"".concat(y.wrappedCount," wrapped textures"),"".concat(y.simpleCount," simple shapes")].join(", ");if(v)console.log("WebGL (".concat(n.name,") - time ").concat(p,"ms, ").concat(b));else{console.log("WebGL (".concat(n.name,") - frame time ").concat(p,"ms")),console.log("Totals:"),console.log(" ".concat(b)),console.log("Texture Atlases Used:");var m=y.atlasInfo,g=_r(m),w;try{for(g.s();!(w=g.n()).done;){var x=w.value;console.log(" ".concat(x.type,": ").concat(x.keyCount," keys, ").concat(x.atlasCount," atlases"))}}catch(E){g.e(E)}finally{g.f()}console.log("")}}t.data.gc&&(console.log("Garbage Collect!"),t.data.gc=!1,a.gc())}var as={};as.drawPolygonPath=function(t,e,n,r,a,i){var s=r/2,o=a/2;t.beginPath&&t.beginPath(),t.moveTo(e+s*i[0],n+o*i[1]);for(var l=1;l<i.length/2;l++)t.lineTo(e+s*i[l*2],n+o*i[l*2+1]);t.closePath()};as.drawRoundPolygonPath=function(t,e,n,r,a,i,s){s.forEach(function(o){return DS(t,o)}),t.closePath()};as.drawRoundRectanglePath=function(t,e,n,r,a,i){var s=r/2,o=a/2,l=i==="auto"?Wi(r,a):Math.min(i,o,s);t.beginPath&&t.beginPath(),t.moveTo(e,n-o),t.arcTo(e+s,n-o,e+s,n,l),t.arcTo(e+s,n+o,e,n+o,l),t.arcTo(e-s,n+o,e-s,n,l),t.arcTo(e-s,n-o,e,n-o,l),t.lineTo(e,n-o),t.closePath()};as.drawBottomRoundRectanglePath=function(t,e,n,r,a,i){var s=r/2,o=a/2,l=i==="auto"?Wi(r,a):i;t.beginPath&&t.beginPath(),t.moveTo(e,n-o),t.lineTo(e+s,n-o),t.lineTo(e+s,n),t.arcTo(e+s,n+o,e,n+o,l),t.arcTo(e-s,n+o,e-s,n,l),t.lineTo(e-s,n-o),t.lineTo(e,n-o),t.closePath()};as.drawCutRectanglePath=function(t,e,n,r,a,i,s){var o=r/2,l=a/2,u=s==="auto"?uy():s;t.beginPath&&t.beginPath(),t.moveTo(e-o+u,n-l),t.lineTo(e+o-u,n-l),t.lineTo(e+o,n-l+u),t.lineTo(e+o,n+l-u),t.lineTo(e+o-u,n+l),t.lineTo(e-o+u,n+l),t.lineTo(e-o,n+l-u),t.lineTo(e-o,n-l+u),t.closePath()};as.drawBarrelPath=function(t,e,n,r,a){var i=r/2,s=a/2,o=e-i,l=e+i,u=n-s,d=n+s,f=Lg(r,a),h=f.widthOffset,v=f.heightOffset,p=f.ctrlPtOffsetPct*h;t.beginPath&&t.beginPath(),t.moveTo(o,u+v),t.lineTo(o,d-v),t.quadraticCurveTo(o+p,d,o+h,d),t.lineTo(l-h,d),t.quadraticCurveTo(l-p,d,l,d-v),t.lineTo(l,u+v),t.quadraticCurveTo(l-p,u,l-h,u),t.lineTo(o+h,u),t.quadraticCurveTo(o+p,u,o,u+v),t.closePath()};var Xw=Math.sin(0),Qw=Math.cos(0),Kg={},Gg={},tj=Math.PI/40;for(var no=0*Math.PI;no<2*Math.PI;no+=tj)Kg[no]=Math.sin(no),Gg[no]=Math.cos(no);as.drawEllipsePath=function(t,e,n,r,a){if(t.beginPath&&t.beginPath(),t.ellipse)t.ellipse(e,n,r/2,a/2,0,0,2*Math.PI);else for(var i,s,o=r/2,l=a/2,u=0*Math.PI;u<2*Math.PI;u+=tj)i=e-o*Kg[u]*Xw+o*Gg[u]*Qw,s=n+l*Gg[u]*Xw+l*Kg[u]*Qw,u===0?t.moveTo(i,s):t.lineTo(i,s);t.closePath()};var Yu={};Yu.createBuffer=function(t,e){var n=document.createElement("canvas");return n.width=t,n.height=e,[n,n.getContext("2d")]};Yu.bufferCanvasImage=function(t){var e=this.cy,n=e.mutableElements(),r=n.boundingBox(),a=this.findContainerClientCoords(),i=t.full?Math.ceil(r.w):a[2],s=t.full?Math.ceil(r.h):a[3],o=_e(t.maxWidth)||_e(t.maxHeight),l=this.getPixelRatio(),u=1;if(t.scale!==void 0)i*=t.scale,s*=t.scale,u=t.scale;else if(o){var d=1/0,f=1/0;_e(t.maxWidth)&&(d=u*t.maxWidth/i),_e(t.maxHeight)&&(f=u*t.maxHeight/s),u=Math.min(d,f),i*=u,s*=u}o||(i*=l,s*=l,u*=l);var h=document.createElement("canvas");h.width=i,h.height=s,h.style.width=i+"px",h.style.height=s+"px";var v=h.getContext("2d");if(i>0&&s>0){v.clearRect(0,0,i,s),v.globalCompositeOperation="source-over";var p=this.getCachedZSortedEles();if(t.full)v.translate(-r.x1*u,-r.y1*u),v.scale(u,u),this.drawElements(v,p),v.scale(1/u,1/u),v.translate(r.x1*u,r.y1*u);else{var y=e.pan(),b={x:y.x*u,y:y.y*u};u*=e.zoom(),v.translate(b.x,b.y),v.scale(u,u),this.drawElements(v,p),v.scale(1/u,1/u),v.translate(-b.x,-b.y)}t.bg&&(v.globalCompositeOperation="destination-over",v.fillStyle=t.bg,v.rect(0,0,i,s),v.fill())}return h};function kM(t,e){for(var n=atob(t),r=new ArrayBuffer(n.length),a=new Uint8Array(r),i=0;i<n.length;i++)a[i]=n.charCodeAt(i);return new Blob([r],{type:e})}function Zw(t){var e=t.indexOf(",");return t.substr(e+1)}function nj(t,e,n){var r=function(){return e.toDataURL(n,t.quality)};switch(t.output){case"blob-promise":return new nl(function(a,i){try{e.toBlob(function(s){s!=null?a(s):i(new Error("`canvas.toBlob()` sent a null value in its callback"))},n,t.quality)}catch(s){i(s)}});case"blob":return kM(Zw(r()),n);case"base64":return Zw(r());case"base64uri":default:return r()}}Yu.png=function(t){return nj(t,this.bufferCanvasImage(t),"image/png")};Yu.jpg=function(t){return nj(t,this.bufferCanvasImage(t),"image/jpeg")};var rj={};rj.nodeShapeImpl=function(t,e,n,r,a,i,s,o){switch(t){case"ellipse":return this.drawEllipsePath(e,n,r,a,i);case"polygon":return this.drawPolygonPath(e,n,r,a,i,s);case"round-polygon":return this.drawRoundPolygonPath(e,n,r,a,i,s,o);case"roundrectangle":case"round-rectangle":return this.drawRoundRectanglePath(e,n,r,a,i,o);case"cutrectangle":case"cut-rectangle":return this.drawCutRectanglePath(e,n,r,a,i,s,o);case"bottomroundrectangle":case"bottom-round-rectangle":return this.drawBottomRoundRectanglePath(e,n,r,a,i,o);case"barrel":return this.drawBarrelPath(e,n,r,a,i)}};var EM=aj,At=aj.prototype;At.CANVAS_LAYERS=3;At.SELECT_BOX=0;At.DRAG=1;At.NODE=2;At.WEBGL=3;At.CANVAS_TYPES=["2d","2d","2d","webgl2"];At.BUFFER_COUNT=3;At.TEXTURE_BUFFER=0;At.MOTIONBLUR_BUFFER_NODE=1;At.MOTIONBLUR_BUFFER_DRAG=2;function aj(t){var e=this,n=e.cy.window(),r=n.document;t.webgl&&(At.CANVAS_LAYERS=e.CANVAS_LAYERS=4,console.log("webgl rendering enabled")),e.data={canvases:new Array(At.CANVAS_LAYERS),contexts:new Array(At.CANVAS_LAYERS),canvasNeedsRedraw:new Array(At.CANVAS_LAYERS),bufferCanvases:new Array(At.BUFFER_COUNT),bufferContexts:new Array(At.CANVAS_LAYERS)};var a="-webkit-tap-highlight-color",i="rgba(0,0,0,0)";e.data.canvasContainer=r.createElement("div");var s=e.data.canvasContainer.style;e.data.canvasContainer.style[a]=i,s.position="relative",s.zIndex="0",s.overflow="hidden";var o=t.cy.container();o.appendChild(e.data.canvasContainer),o.style[a]=i;var l={"-webkit-user-select":"none","-moz-user-select":"-moz-none","user-select":"none","-webkit-tap-highlight-color":"rgba(0,0,0,0)","outline-style":"none"};vR()&&(l["-ms-touch-action"]="none",l["touch-action"]="none");for(var u=0;u<At.CANVAS_LAYERS;u++){var d=e.data.canvases[u]=r.createElement("canvas"),f=At.CANVAS_TYPES[u];e.data.contexts[u]=d.getContext(f),e.data.contexts[u]||yn("Could not create canvas of type "+f),Object.keys(l).forEach(function(fe){d.style[fe]=l[fe]}),d.style.position="absolute",d.setAttribute("data-id","layer"+u),d.style.zIndex=String(At.CANVAS_LAYERS-u),e.data.canvasContainer.appendChild(d),e.data.canvasNeedsRedraw[u]=!1}e.data.topCanvas=e.data.canvases[0],e.data.canvases[At.NODE].setAttribute("data-id","layer"+At.NODE+"-node"),e.data.canvases[At.SELECT_BOX].setAttribute("data-id","layer"+At.SELECT_BOX+"-selectbox"),e.data.canvases[At.DRAG].setAttribute("data-id","layer"+At.DRAG+"-drag"),e.data.canvases[At.WEBGL]&&e.data.canvases[At.WEBGL].setAttribute("data-id","layer"+At.WEBGL+"-webgl");for(var u=0;u<At.BUFFER_COUNT;u++)e.data.bufferCanvases[u]=r.createElement("canvas"),e.data.bufferContexts[u]=e.data.bufferCanvases[u].getContext("2d"),e.data.bufferCanvases[u].style.position="absolute",e.data.bufferCanvases[u].setAttribute("data-id","buffer"+u),e.data.bufferCanvases[u].style.zIndex=String(-u-1),e.data.bufferCanvases[u].style.visibility="hidden";e.pathsEnabled=!0;var h=jr(),v=function(Z){return{x:(Z.x1+Z.x2)/2,y:(Z.y1+Z.y2)/2}},p=function(Z){return{x:-Z.w/2,y:-Z.h/2}},y=function(Z){var ee=Z[0]._private,ne=ee.oldBackgroundTimestamp===ee.backgroundTimestamp;return!ne},b=function(Z){return Z[0]._private.nodeKey},m=function(Z){return Z[0]._private.labelStyleKey},g=function(Z){return Z[0]._private.sourceLabelStyleKey},w=function(Z){return Z[0]._private.targetLabelStyleKey},x=function(Z,ee,ne,de,Re){return e.drawElement(Z,ee,ne,!1,!1,Re)},E=function(Z,ee,ne,de,Re){return e.drawElementText(Z,ee,ne,de,"main",Re)},S=function(Z,ee,ne,de,Re){return e.drawElementText(Z,ee,ne,de,"source",Re)},C=function(Z,ee,ne,de,Re){return e.drawElementText(Z,ee,ne,de,"target",Re)},T=function(Z){return Z.boundingBox(),Z[0]._private.bodyBounds},N=function(Z){return Z.boundingBox(),Z[0]._private.labelBounds.main||h},P=function(Z){return Z.boundingBox(),Z[0]._private.labelBounds.source||h},R=function(Z){return Z.boundingBox(),Z[0]._private.labelBounds.target||h},I=function(Z,ee){return ee},D=function(Z){return v(T(Z))},$=function(Z,ee,ne){var de=Z?Z+"-":"";return{x:ee.x+ne.pstyle(de+"text-margin-x").pfValue,y:ee.y+ne.pstyle(de+"text-margin-y").pfValue}},H=function(Z,ee,ne){var de=Z[0]._private.rscratch;return{x:de[ee],y:de[ne]}},V=function(Z){return $("",H(Z,"labelX","labelY"),Z)},U=function(Z){return $("source",H(Z,"sourceLabelX","sourceLabelY"),Z)},F=function(Z){return $("target",H(Z,"targetLabelX","targetLabelY"),Z)},G=function(Z){return p(T(Z))},z=function(Z){return p(P(Z))},_=function(Z){return p(R(Z))},K=function(Z){var ee=N(Z),ne=p(N(Z));if(Z.isNode()){switch(Ko(Z.pstyle("text-halign").value)){case"left":ne.x=-ee.w-(ee.leftPad||0);break;case"right":ne.x=-(ee.rightPad||0);break}switch(Go(Z.pstyle("text-valign").value)){case"top":ne.y=-ee.h-(ee.topPad||0);break;case"bottom":ne.y=-(ee.botPad||0);break}}return ne},ie=e.data.eleTxrCache=new Ml(e,{getKey:b,doesEleInvalidateKey:y,drawElement:x,getBoundingBox:T,getRotationPoint:D,getRotationOffset:G,allowEdgeTxrCaching:!1,allowParentTxrCaching:!1}),M=e.data.lblTxrCache=new Ml(e,{getKey:m,drawElement:E,getBoundingBox:N,getRotationPoint:V,getRotationOffset:K,isVisible:I}),oe=e.data.slbTxrCache=new Ml(e,{getKey:g,drawElement:S,getBoundingBox:P,getRotationPoint:U,getRotationOffset:z,isVisible:I}),ve=e.data.tlbTxrCache=new Ml(e,{getKey:w,drawElement:C,getBoundingBox:R,getRotationPoint:F,getRotationOffset:_,isVisible:I}),ye=e.data.lyrTxrCache=new HS(e);e.onUpdateEleCalcs(function(Z,ee){ie.invalidateElements(ee),M.invalidateElements(ee),oe.invalidateElements(ee),ve.invalidateElements(ee),ye.invalidateElements(ee);for(var ne=0;ne<ee.length;ne++){var de=ee[ne]._private;de.oldBackgroundTimestamp=de.backgroundTimestamp}});var Te=function(Z){for(var ee=0;ee<Z.length;ee++)ye.enqueueElementRefinement(Z[ee].ele)};ie.onDequeue(Te),M.onDequeue(Te),oe.onDequeue(Te),ve.onDequeue(Te),t.webgl&&e.initWebgl(t,{getStyleKey:b,getLabelKey:m,getSourceLabelKey:g,getTargetLabelKey:w,drawElement:x,drawLabel:E,drawSourceLabel:S,drawTargetLabel:C,getElementBox:T,getLabelBox:N,getSourceLabelBox:P,getTargetLabelBox:R,getElementRotationPoint:D,getElementRotationOffset:G,getLabelRotationPoint:V,getSourceLabelRotationPoint:U,getTargetLabelRotationPoint:F,getLabelRotationOffset:K,getSourceLabelRotationOffset:z,getTargetLabelRotationOffset:_})}At.redrawHint=function(t,e){var n=this;switch(t){case"eles":n.data.canvasNeedsRedraw[At.NODE]=e;break;case"drag":n.data.canvasNeedsRedraw[At.DRAG]=e;break;case"select":n.data.canvasNeedsRedraw[At.SELECT_BOX]=e;break;case"gc":n.data.gc=!0;break}};var CM=typeof Path2D<"u";At.path2dEnabled=function(t){if(t===void 0)return this.pathsEnabled;this.pathsEnabled=!!t};At.usePaths=function(){return CM&&this.pathsEnabled};At.setImgSmoothing=function(t,e){t.imageSmoothingEnabled!=null?t.imageSmoothingEnabled=e:(t.webkitImageSmoothingEnabled=e,t.mozImageSmoothingEnabled=e,t.msImageSmoothingEnabled=e)};At.getImgSmoothing=function(t){return t.imageSmoothingEnabled!=null?t.imageSmoothingEnabled:t.webkitImageSmoothingEnabled||t.mozImageSmoothingEnabled||t.msImageSmoothingEnabled};At.makeOffscreenCanvas=function(t,e){var n;if((typeof OffscreenCanvas>"u"?"undefined":Gn(OffscreenCanvas))!=="undefined")n=new OffscreenCanvas(t,e);else{var r=this.cy.window(),a=r.document;n=a.createElement("canvas"),n.width=t,n.height=e}return n};[WS,Va,ci,ky,Vs,rs,Rr,QS,as,Yu,rj].forEach(function(t){pt(At,t)});var SM=[{name:"null",impl:IS},{name:"base",impl:VS},{name:"canvas",impl:EM}],jM=[{type:"layout",extensions:YD},{type:"renderer",extensions:SM}],ij={},sj={};function oj(t,e,n){var r=n,a=function(T){Jt("Can not register `"+e+"` for `"+t+"` since `"+T+"` already exists in the prototype and can not be overridden")};if(t==="core"){if(Tu.prototype[e])return a(e);Tu.prototype[e]=n}else if(t==="collection"){if(or.prototype[e])return a(e);or.prototype[e]=n}else if(t==="layout"){for(var i=function(T){this.options=T,n.call(this,T),Wt(this._private)||(this._private={}),this._private.cy=T.cy,this._private.listeners=[],this.createEmitter()},s=i.prototype=Object.create(n.prototype),o=[],l=0;l<o.length;l++){var u=o[l];s[u]=s[u]||function(){return this}}s.start&&!s.run?s.run=function(){return this.start(),this}:!s.start&&s.run&&(s.start=function(){return this.run(),this});var d=n.prototype.stop;s.stop=function(){var C=this.options;if(C&&C.animate){var T=this.animations;if(T)for(var N=0;N<T.length;N++)T[N].stop()}return d?d.call(this):this.emit("layoutstop"),this},s.destroy||(s.destroy=function(){return this}),s.cy=function(){return this._private.cy};var f=function(T){return T._private.cy},h={addEventFields:function(T,N){N.layout=T,N.cy=f(T),N.target=T},bubble:function(){return!0},parent:function(T){return f(T)}};pt(s,{createEmitter:function(){return this._private.emitter=new _f(h,this),this},emitter:function(){return this._private.emitter},on:function(T,N){return this.emitter().on(T,N),this},one:function(T,N){return this.emitter().one(T,N),this},once:function(T,N){return this.emitter().one(T,N),this},removeListener:function(T,N){return this.emitter().removeListener(T,N),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},emit:function(T,N){return this.emitter().emit(T,N),this}}),Zt.eventAliasesOn(s),r=i}else if(t==="renderer"&&e!=="null"&&e!=="base"){var v=lj("renderer","base"),p=v.prototype,y=n,b=n.prototype,m=function(){v.apply(this,arguments),y.apply(this,arguments)},g=m.prototype;for(var w in p){var x=p[w],E=b[w]!=null;if(E)return a(w);g[w]=x}for(var S in b)g[S]=b[S];p.clientFunctions.forEach(function(C){g[C]=g[C]||function(){yn("Renderer does not implement `renderer."+C+"()` on its prototype")}}),r=m}else if(t==="__proto__"||t==="constructor"||t==="prototype")return yn(t+" is an illegal type to be registered, possibly lead to prototype pollutions");return SC({map:ij,keys:[t,e],value:r})}function lj(t,e){return jC({map:ij,keys:[t,e]})}function TM(t,e,n,r,a){return SC({map:sj,keys:[t,e,n,r],value:a})}function NM(t,e,n,r){return jC({map:sj,keys:[t,e,n,r]})}var Yg=function(){if(arguments.length===2)return lj.apply(null,arguments);if(arguments.length===3)return oj.apply(null,arguments);if(arguments.length===4)return NM.apply(null,arguments);if(arguments.length===5)return TM.apply(null,arguments);yn("Invalid extension access syntax")};Tu.prototype.extension=Yg;jM.forEach(function(t){t.extensions.forEach(function(e){oj(t.type,e.name,e.impl)})});var Jd=function(){if(!(this instanceof Jd))return new Jd;this.length=0},zs=Jd.prototype;zs.instanceString=function(){return"stylesheet"};zs.selector=function(t){var e=this.length++;return this[e]={selector:t,properties:[]},this};zs.css=function(t,e){var n=this.length-1;if(ft(t))this[n].properties.push({name:t,value:e});else if(Wt(t))for(var r=t,a=Object.keys(r),i=0;i<a.length;i++){var s=a[i],o=r[s];if(o!=null){var l=Jn.properties[s]||Jn.properties[Rf(s)];if(l!=null){var u=l.name,d=o;this[n].properties.push({name:u,value:d})}}}return this};zs.style=zs.css;zs.generateStyle=function(t){var e=new Jn(t);return this.appendToStyle(e)};zs.appendToStyle=function(t){for(var e=0;e<this.length;e++){var n=this[e],r=n.selector,a=n.properties;t.selector(r);for(var i=0;i<a.length;i++){var s=a[i];t.css(s.name,s.value)}}return t};var PM="3.34.0",Xi=function(e){if(e===void 0&&(e={}),Wt(e))return new Tu(e);if(ft(e))return Yg.apply(Yg,arguments)};Xi.use=function(t){var e=Array.prototype.slice.call(arguments,1);return e.unshift(Xi),t.apply(null,e),this};Xi.warnings=function(t){return AC(t)};Xi.version=PM;Xi.stylesheet=Xi.Stylesheet=Jd;function Jw(t,e){const n={Repository:1,FeatureComponent:1,RouterComponent:1},r={entry:{fill:"#eef4ff",stroke:"#4a7dcf"},logic:{fill:"#f4effd",stroke:"#8a5cf6"},data:{fill:"#fdf6e3",stroke:"#c9963f"},query:{fill:"#fbeee4",stroke:"#b0643a"},adapter:{fill:"#eef8f1",stroke:"#4f9e6b"},pattern:{fill:"#f6f8fa",stroke:"#6a737d"},retired:{fill:"#efedeb",stroke:"#8a817c"}};function a(d){return d==="Specialist"||d==="Gateway"?"retired":d==="Portal"||d==="Observer"?"entry":d==="Query"?"query":d==="Store"||d==="Index"||d==="Registry"?"data":d==="Adapter"?"adapter":n[d]?"pattern":"logic"}function i(d){return String(d).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}const s=[],o=Object.create(null);t.components.forEach(function(d){o[d.id]=d});function l(d,f,h,v,p,y){const b=y?p.x-y.x:p.x,m=y?p.y-y.y:p.y;s.push(' <mxCell id="'+i(d)+'" value="'+i(h)+'" style="'+i(v)+'" vertex="1" parent="'+i(f)+'"><mxGeometry x="'+b+'" y="'+m+'" width="'+p.w+'" height="'+p.h+'" as="geometry"/></mxCell>')}t.subsystems.forEach(function(d){const f=e.subs[d.id];f&&l("sub_"+d.id,"1",d.name,"rounded=1;arcSize=4;fillColor=#ffffff;strokeColor=#b6c0cc;verticalAlign=top;fontStyle=1;fontSize=13;container=1;collapsible=1;whiteSpace=wrap;",f)}),t.components.forEach(function(d){const f=e.boxes[d.id];if(!f)return;const h=!!n[d.componentType]&&d.owns.length>0,v=d.owner?o[d.owner]:void 0,p=!!(v&&e.boxes[v.id]),y=p?"comp_"+v.id:"sub_"+d.subsystem,b=p?e.boxes[v.id]:e.subs[d.subsystem],m=r[a(d.componentType)],g=d.name+`
|
|
404
404
|
«`+d.componentType+(d.transport?"/"+d.transport:"")+"»",w=h?"rounded=1;fillColor="+m.fill+";strokeColor="+m.stroke+";dashed=1;verticalAlign=top;fontStyle=1;container=1;collapsible=1;whiteSpace=wrap;":"rounded=1;fillColor="+m.fill+";strokeColor="+m.stroke+";whiteSpace=wrap;fontSize=11;"+(d.public?"strokeWidth=3;":"");l("comp_"+d.id,y,g,w,f,b)});let u=0;return t.edges.forEach(function(d){if(!e.boxes[d.from]||!e.boxes[d.to])return;const f=d.cross?"edgeStyle=orthogonalEdgeStyle;rounded=1;strokeColor=#c26767;strokeWidth=2;endArrow=block;endFill=1;":"edgeStyle=orthogonalEdgeStyle;rounded=1;strokeColor=#8d97a5;endArrow=block;endFill=1;";s.push(' <mxCell id="edge_'+u+++'" style="'+i(f)+'" edge="1" parent="1" source="'+i("comp_"+d.from)+'" target="'+i("comp_"+d.to)+'"><mxGeometry relative="1" as="geometry"/></mxCell>')}),['<mxfile host="wairon" agent="wairon" modified="'+i(t.generatedAt)+'">',' <diagram id="architecture" name="'+i(t.system.name)+' architecture">',' <mxGraphModel dx="1000" dy="700" grid="0" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="0" pageScale="1" math="0" shadow="0">'," <root>",' <mxCell id="0"/>',' <mxCell id="1" parent="0"/>'].concat(s,[" </root>"," </mxGraphModel>"," </diagram>","</mxfile>",""]).join(`
|
|
405
|
-
`)}function e1(t,e){const n={Repository:1,FeatureComponent:1,RouterComponent:1},r={entry:{fill:"#eef4ff",stroke:"#4a7dcf"},logic:{fill:"#f4effd",stroke:"#8a5cf6"},data:{fill:"#fdf6e3",stroke:"#c9963f"},query:{fill:"#fbeee4",stroke:"#b0643a"},adapter:{fill:"#eef8f1",stroke:"#4f9e6b"},pattern:{fill:"#f6f8fa",stroke:"#6a737d"},retired:{fill:"#efedeb",stroke:"#8a817c"}};function a(f){return f==="Specialist"||f==="Gateway"?"retired":f==="Portal"||f==="Observer"?"entry":f==="Query"?"query":f==="Store"||f==="Index"||f==="Registry"?"data":f==="Adapter"?"adapter":n[f]?"pattern":"logic"}function i(f){let h=2166136261;for(let v=0;v<f.length;v++)h^=f.charCodeAt(v),h=Math.imul(h,16777619);return Math.abs(h)||1}function s(f,h,v){return{id:f,type:h,x:v.x,y:v.y,width:v.w,height:v.h,angle:0,strokeColor:"#1f2328",backgroundColor:"transparent",fillStyle:"solid",strokeWidth:1,strokeStyle:"solid",roughness:0,opacity:100,groupIds:[],frameId:null,roundness:{type:3},seed:i(f),version:1,versionNonce:i(f+"#n"),isDeleted:!1,boundElements:[],updated:1,link:null,locked:!1}}function o(f,h,v,p){const y=f.id+"-label",b=s(y,"text",{x:f.x+8,y:f.y+6,w:f.width-16,h:20});return b.roundness=null,b.text=h,b.originalText=h,b.fontSize=v,b.fontFamily=1,b.textAlign="center",b.verticalAlign=p,b.containerId=f.id,b.autoResize=!0,b.lineHeight=1.25,f.boundElements.push({id:y,type:"text"}),b}const l=[],u=
|
|
405
|
+
`)}function e1(t,e){const n={Repository:1,FeatureComponent:1,RouterComponent:1},r={entry:{fill:"#eef4ff",stroke:"#4a7dcf"},logic:{fill:"#f4effd",stroke:"#8a5cf6"},data:{fill:"#fdf6e3",stroke:"#c9963f"},query:{fill:"#fbeee4",stroke:"#b0643a"},adapter:{fill:"#eef8f1",stroke:"#4f9e6b"},pattern:{fill:"#f6f8fa",stroke:"#6a737d"},retired:{fill:"#efedeb",stroke:"#8a817c"}};function a(f){return f==="Specialist"||f==="Gateway"?"retired":f==="Portal"||f==="Observer"?"entry":f==="Query"?"query":f==="Store"||f==="Index"||f==="Registry"?"data":f==="Adapter"?"adapter":n[f]?"pattern":"logic"}function i(f){let h=2166136261;for(let v=0;v<f.length;v++)h^=f.charCodeAt(v),h=Math.imul(h,16777619);return Math.abs(h)||1}function s(f,h,v){return{id:f,type:h,x:v.x,y:v.y,width:v.w,height:v.h,angle:0,strokeColor:"#1f2328",backgroundColor:"transparent",fillStyle:"solid",strokeWidth:1,strokeStyle:"solid",roughness:0,opacity:100,groupIds:[],frameId:null,roundness:{type:3},seed:i(f),version:1,versionNonce:i(f+"#n"),isDeleted:!1,boundElements:[],updated:1,link:null,locked:!1}}function o(f,h,v,p){const y=f.id+"-label",b=s(y,"text",{x:f.x+8,y:f.y+6,w:f.width-16,h:20});return b.roundness=null,b.text=h,b.originalText=h,b.fontSize=v,b.fontFamily=1,b.textAlign="center",b.verticalAlign=p,b.containerId=f.id,b.autoResize=!0,b.lineHeight=1.25,f.boundElements.push({id:y,type:"text"}),b}const l=[],u=Object.create(null);t.subsystems.forEach(function(f){const h=e.subs[f.id];if(!h)return;const v=s("sub-"+f.id,"rectangle",h);v.backgroundColor="#ffffff",v.strokeColor="#b6c0cc",l.push(v),l.push(o(v,f.name,14,"top"))}),t.components.forEach(function(f){const h=e.boxes[f.id];if(!h)return;const v=!!n[f.componentType]&&f.owns.length>0,p=r[a(f.componentType)],y=s("comp-"+f.id,"rectangle",h);y.backgroundColor=p.fill,y.strokeColor=p.stroke,y.strokeWidth=f.public?3:1,y.strokeStyle=v||a(f.componentType)==="pattern"?"dashed":"solid",l.push(y),u[f.id]=y;const b=f.name+`
|
|
406
406
|
«`+f.componentType+(f.transport?"/"+f.transport:"")+"»";l.push(o(y,b,11,v?"top":"middle"))});let d=0;return t.edges.forEach(function(f){const h=e.boxes[f.from],v=e.boxes[f.to],p=u[f.from],y=u[f.to];if(!h||!v||!p||!y)return;const b=v.x>=h.x+h.w,m=b?{x:h.x+h.w,y:h.y+h.h/2}:{x:h.x,y:h.y+h.h/2},g=b?{x:v.x,y:v.y+v.h/2}:{x:v.x+v.w,y:v.y+v.h/2},w="edge-"+d++,x=s(w,"arrow",{x:m.x,y:m.y,w:Math.abs(g.x-m.x),h:Math.abs(g.y-m.y)});x.roundness={type:2},x.strokeColor=f.cross?"#c26767":"#8d97a5",x.strokeWidth=f.cross?2:1,x.points=[[0,0],[g.x-m.x,g.y-m.y]],x.lastCommittedPoint=null,x.startBinding={elementId:p.id,focus:0,gap:4},x.endBinding={elementId:y.id,focus:0,gap:4},x.startArrowhead=null,x.endArrowhead="arrow",p.boundElements.push({id:w,type:"arrow"}),y.boundElements.push({id:w,type:"arrow"}),l.push(x)}),JSON.stringify({type:"excalidraw",version:2,source:"wairon",elements:l,appState:{viewBackgroundColor:"#fafbfc",gridSize:null},files:{}},null,2)}const RM=`/* GENERATED from src/core/canvas.ts by scripts/gen-canvas-engine.mjs — do not edit. */
|
|
407
407
|
:host { display:block; width:100%; height:100%; }
|
|
408
408
|
.cbody { display:flex; flex-direction:column; width:100%; height:100%; overflow:hidden; }
|
package/docs/cli.md
CHANGED
|
@@ -55,6 +55,25 @@ the same way, naming the file, the line and the key —
|
|
|
55
55
|
diagnoses it too; no command runs on defaults instead. To report a bug, set
|
|
56
56
|
`WAIRON_DEBUG=1` and the stack is printed after the line.
|
|
57
57
|
|
|
58
|
+
#### Ids and names
|
|
59
|
+
Every id and name the design holds follows one grammar, and every writer, the
|
|
60
|
+
loader and the CLI judge it the same way. Spec ids (subsystems, components,
|
|
61
|
+
interfaces, implementations, types), project ids, and member and external
|
|
62
|
+
aliases, as well as method, parameter and field names, are never empty, at most
|
|
63
|
+
64 characters, never start with `-` (no command line could name one), hold no
|
|
64
|
+
control, NUL or zero-width character, and are never `__proto__`. Spec ids and
|
|
65
|
+
aliases are `[a-z0-9-_]+`, project ids `[a-z0-9-_.]` starting and ending
|
|
66
|
+
alphanumeric; these become folder and file names, so a name Windows reserves for
|
|
67
|
+
a device (`con`, `aux`, `nul`, `com1`, …) is refused on every platform, and a
|
|
68
|
+
project id or an alias is never `super`, the `::` grammar's namespace hop.
|
|
69
|
+
Method, parameter and field names are ASCII identifiers that never start with a
|
|
70
|
+
digit, and never a word the tree's `targetLanguage` reserves for that kind of
|
|
71
|
+
identifier: TypeScript and JavaScript allow a keyword as a method or a field but
|
|
72
|
+
not as a parameter, and no method named `constructor`; Rust, Python, Go, Java, C#,
|
|
73
|
+
C and Kotlin refuse their keywords everywhere (`RESERVED_IDENTIFIER`, naming the
|
|
74
|
+
language and an alternative). A display `name` is never blank and holds no
|
|
75
|
+
invisible character.
|
|
76
|
+
|
|
58
77
|
### `wairon status [--subsystem <id>] [--no-recursive] [--all]`
|
|
59
78
|
Print the SDD spec tree as a hierarchy. Its percentages measure **authoring
|
|
60
79
|
progress** — 80% once a component's component, contract and implementation specs
|
|
@@ -83,6 +102,13 @@ warnings as errors (notices are printed and counted, never fatal).
|
|
|
83
102
|
- The first 100 findings per severity are printed; the rest are counted ("N
|
|
84
103
|
more not shown") and a per-code total follows. `--all` prints every finding.
|
|
85
104
|
- `--subsystem <id>` validates one subsystem.
|
|
105
|
+
- It ends with one **code-reading line**, the same sentence `sdd_validate_tree`
|
|
106
|
+
carries in its hint: the analysis grade the code was read at (the weakest any
|
|
107
|
+
file got — see `wairon lock` for the grades) and, at `exact`, the TypeScript
|
|
108
|
+
compiler that read it — `Code read at grade exact with TypeScript 5.9.3
|
|
109
|
+
(wairon's own copy)` on a project with TypeScript 7 or none, `(the project's
|
|
110
|
+
own)` on TypeScript 5 or 6 — or `Code: none read yet` before any file the design
|
|
111
|
+
names exists.
|
|
86
112
|
- At a project that declares members, `validate` is the **family run**: every
|
|
87
113
|
member's own gate, and this project's externals composed against their live
|
|
88
114
|
producers. `--no-recursive` runs this project's gate alone; `--family` runs
|
|
@@ -143,13 +169,25 @@ warnings as errors (notices are printed and counted, never fatal).
|
|
|
143
169
|
on the method the checker resolves it to, and a call through an interface or
|
|
144
170
|
type — a port declared in the Portal's own contracts file included — lands on
|
|
145
171
|
every class of the project that realizes it (the ones that say `implements`
|
|
146
|
-
when any does, else every class the checker finds assignable).
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
172
|
+
when any does, else every class the checker finds assignable). Taking a
|
|
173
|
+
method as a value counts as using it (`Reflect.apply`, a `Function`-typed
|
|
174
|
+
variable, `.bind`, a callback), and code no component maps — a helper in a
|
|
175
|
+
module no spec names, or a function that is none of its file's components'
|
|
176
|
+
modelled methods — is read as if it were inlined where it is called; the
|
|
177
|
+
finding names the path. A call the checker cannot resolve because its
|
|
178
|
+
receiver is typed `any` or `unknown`, cast to either or to an index
|
|
179
|
+
signature, picked by a computed key, or typed nothing, under the name of a
|
|
180
|
+
data component's write (or with a computed key on a receiver that was a data
|
|
181
|
+
component before the cast), is `PORTAL_CALL_UNRESOLVED` (a warning, so `--ci`
|
|
182
|
+
fails): give the receiver its type. An Orchestrator (or any component) whose
|
|
183
|
+
code calls a write- or lifecycle-effect method of another component that its
|
|
184
|
+
narrative never claims is `UNDECLARED_WRITE_CALL`, and so is a Portal calling
|
|
185
|
+
a workflow verb its narrative never names whose effect is not declared `read`
|
|
186
|
+
or `none`; the same unclaimed write through a receiver the checker cannot
|
|
187
|
+
follow is `CALL_ORIGIN_UNRESOLVED` (a warning). The narrative↔code and
|
|
188
|
+
declared-edge checks read the checker too, so a type-only `ports.ts` barrel,
|
|
189
|
+
`export *`, a port declared in a shared module and a dependency object typed
|
|
190
|
+
inline realize the calls and edges they carry. And a file importing a technology's package
|
|
153
191
|
outside the components that bind it is `TECH_LEAKAGE_IN_CODE`. A technology's
|
|
154
192
|
packages are its declared tokens (its name, or its `matches`) plus the common
|
|
155
193
|
packages wairon knows for it — see [Technologies and their
|
|
@@ -226,6 +264,12 @@ outputs (agent files only when `rules.materializeAgentFiles` is on).
|
|
|
226
264
|
approval lives in `.wai/lock.json`. Implementation gates on that approval —
|
|
227
265
|
`wairon lock-check` in CI, `sdd_get_status` for an AI tool — not on
|
|
228
266
|
`status: complete`. Commit `.wai/lock.json` with the change it approves.
|
|
267
|
+
When any spec is still `draft` or `design`, the lock says how many of how many,
|
|
268
|
+
per kind (subsystems, components, contracts, implementations, types), and that
|
|
269
|
+
it approves them as they stand. Re-running it when nothing it records moved
|
|
270
|
+
keeps the record on file — its `lockedAt` included — so `.wai/lock.json` stays
|
|
271
|
+
unmodified; a change of approver, verdict, member pin or wairon release writes
|
|
272
|
+
a new record.
|
|
229
273
|
|
|
230
274
|
**What it certifies is the design.** Only design findings can refuse a lock.
|
|
231
275
|
Code-conformance findings (the code↔spec checks) are recorded **beside** the
|
|
@@ -717,10 +761,45 @@ keeps its place, type and description; its old name joins the field's rename
|
|
|
717
761
|
trace (`previousNames`), which `wairon export` shows as `formerly`, so a
|
|
718
762
|
consumer holding the old name reads a rename, not a removal and an addition.
|
|
719
763
|
Traces and prose are never rewritten. It refuses, writing nothing, a type or
|
|
720
|
-
field that does not exist, a name that is not an identifier
|
|
721
|
-
|
|
764
|
+
field that does not exist, a name that is not an identifier or that the target
|
|
765
|
+
language reserves for a field (`fn` in Rust), and a name another field of the
|
|
766
|
+
type holds or retired. The MCP twin is `sdd_rename_field`. As with
|
|
722
767
|
any design edit, the next `wairon lock` approves it.
|
|
723
768
|
|
|
769
|
+
### `wairon method rename <component> <method> <new-name> [--dry-run] [--search <dirs...>] [--no-pin-symbol]`
|
|
770
|
+
Renames a contract method and retargets every reference to it in the bound
|
|
771
|
+
tree. The method moves on every interface of the component that declares it,
|
|
772
|
+
and on the implementations of those contracts with its narrative, source path
|
|
773
|
+
and symbol; call, register and dispatch steps, dispatch-table bindings,
|
|
774
|
+
lifecycle entrypoints, the lint allows keyed on it and the debt register
|
|
775
|
+
(`rules.conformance.carried`) follow. Its old name joins the method's rename
|
|
776
|
+
trace (`previousNames`), which `wairon export` shows as `formerly`, so a
|
|
777
|
+
consumer reads a rename, not a removal and an addition. Prose and a gRPC wire
|
|
778
|
+
method are never rewritten; they are listed as mentions.
|
|
779
|
+
|
|
780
|
+
- `--dry-run` prints what the rename would move, retarget and break — every
|
|
781
|
+
consumer that calls the method through an export, by project and spec — and
|
|
782
|
+
writes nothing. Run it first on a published verb.
|
|
783
|
+
- `--search <dirs...>` also scans these folders for consumer checkouts outside
|
|
784
|
+
the family (for example the folder holding sibling checkouts), so the dry run
|
|
785
|
+
names a sibling project the rename breaks.
|
|
786
|
+
- `--no-pin-symbol`: by default an implementation that declares no `symbol` is
|
|
787
|
+
pinned to the OLD name, so the function its code already holds keeps binding.
|
|
788
|
+
Pass it when the code is not written yet, or will be renamed with the
|
|
789
|
+
contract, so the implementation follows the new name.
|
|
790
|
+
|
|
791
|
+
It refuses, writing nothing: a component that does not exist, one in another
|
|
792
|
+
project (rename it from that project's root), a method the component does not
|
|
793
|
+
declare, a name a moving contract already declares or retired, and a new name
|
|
794
|
+
that is not an identifier in the tree's method casing (snake_case in a Rust or
|
|
795
|
+
Python tree, camelCase in a TypeScript one), that is longer than 64 characters
|
|
796
|
+
or starts with a digit, or that the target language reserves for a method
|
|
797
|
+
(`constructor` in TypeScript, `fn` or `type` in Rust — the refusal names the
|
|
798
|
+
language and offers an alternative). A contract that implements another
|
|
799
|
+
project's extension point takes its method names from that producer, so its
|
|
800
|
+
casing is not judged. The MCP twin is `sdd_rename_method` (with `dryRun`). The
|
|
801
|
+
next `wairon lock` approves the rename.
|
|
802
|
+
|
|
724
803
|
### `wairon method rename-param <component> <method> <param> <new-name>`
|
|
725
804
|
Renames a parameter of a contract method. The parameter moves on every
|
|
726
805
|
interface of the component that declares the method, keeping its place, type,
|
|
@@ -732,8 +811,9 @@ itself), and an HTTP endpoint path placeholder `{old}` on the method's own
|
|
|
732
811
|
binding is respelled — the URL a caller sends is unchanged. Prose is never
|
|
733
812
|
rewritten. It refuses, writing nothing, a component, method or parameter that
|
|
734
813
|
does not exist (or a parameter the method takes from a `signatureFrom`), a name
|
|
735
|
-
that is not an identifier
|
|
736
|
-
|
|
814
|
+
that is not an identifier or that the target language reserves for a parameter
|
|
815
|
+
(`class` in TypeScript, `type` in Rust), and a name another parameter of the
|
|
816
|
+
method holds or retired. The MCP twin is `sdd_rename_param`. The next `wairon lock` approves it.
|
|
737
817
|
|
|
738
818
|
### `wairon network flows|policy|diagram|check|why|declare|undeclare`
|
|
739
819
|
Networking derived from the design: the reach the validator already models
|
|
@@ -1114,7 +1194,7 @@ return the impact of every pack they applied in their results.
|
|
|
1114
1194
|
| `wairon externals pin [alias…] [--json]` | Pin declared externals into `.wai/externals/<alias>.yaml` and `.wai/externals.lock.yaml`. The snapshot is rewritten whenever anything it carries moved — not only the signatures the digest covers: a producer that added `abi: c`, changed a transport or a role, or recorded a rename is refreshed by a re-pin. Exits 1 when an alias could not be pinned (unresolved or unreachable — its previous pin stays) |
|
|
1115
1195
|
| `wairon externals status [--json]` | Each pin compared with its live producer per used member — `unchanged`, `changed`, `renamed` (with the new name), `removed`, `unlocked`, `unavailable` — and each external's health (`incompatible`, `not compared`, `drifted`, `ok`); a pinned snapshot that no longer carries what the producer says (a stale `abi`, transport or role) is `drifted`, never `ok`, and names the stale facts. A use the lock does not hold is still compared with the live producer: gone from it, it is `removed` or `renamed`. Git producers are fetched. The opt-in **live** gate: exits 1 when any external is incompatible, 2 when nothing is incompatible but something could not be compared (never a pass), 0 otherwise |
|
|
1116
1196
|
| `wairon externals list [--json]` | The declared externals, how each resolves and what is pinned; a malformed declaration, and an orphaned pin whose declaration is gone, are listed with their problem, never hidden |
|
|
1117
|
-
| `wairon surface export \| import \| list [--audience <level>] [--format native\|openapi] [--portal <id>] [--out <path>] [--source <path>]` | Exchange a public surface document: export this project's (native snapshot or one OpenAPI 3.1 document per portal — a `{name}
|
|
1197
|
+
| `wairon surface export \| import \| list [--audience <level>] [--format native\|openapi] [--portal <id>] [--out <path>] [--source <path>]` | Exchange a public surface document: export this project's (native snapshot or one OpenAPI 3.1 document per portal), import one, or list them. OpenAPI defaults to the `project` audience, so every HTTP Portal of the project's own is described — one its L0 export table never exports included (a wider `--audience` narrows to what the table shares there); the native snapshot defaults to `instance`. In the OpenAPI document a path placeholder — `{name}`, or the Express spelling `:name`, which is rewritten to `{name}` — is a parameter `in: path`, the other params the query of a GET/DELETE or the JSON body of a POST/PUT/PATCH. The Portal's `basePath` is joined into every path (the document carries no `servers` entry: where it is served is deployment, not design). The parameter that carries the credential the Portal's `auth` binds (a bearer `token`, say) is left out of the parameters and the body — `security` describes it — and named under `x-wairon-credential-param` so a wairon reader can restore it. An unknown `--portal` is refused naming the portals the surface renders |
|
|
1118
1198
|
| `wairon surface diff [--against <ref\|file>] [--json]` | The public-surface changelog: this project's export table now against the same table at its last **committed** approval (or at a git revision, or in a saved native snapshot from `surface export`) — every exported name and contract method `added`, `removed`, `renamed` (from its rename trace) or `changed` (signature or type shape), and how many a consumer may have to follow. What a producer writes release notes from before it re-locks; `wairon externals consumers --search <dir>` then says who uses what. Read-only. With no approval ever committed it says so (lock and commit first, or name `--against`). `sdd_surface_diff` is the same answer for an assistant |
|
|
1119
1199
|
| `wairon produce <notion\|miro> [--page <id>] [--token <token>]` | Project the local spec tree to Notion or Miro (the token comes from `--token`, the environment, else a prompt; nothing is stored) |
|
|
1120
1200
|
|
|
@@ -452,10 +452,11 @@ The dangerous direction is a gate going *quiet*. Every step below is loud.
|
|
|
452
452
|
3. **`useGlobalPacks` default flips to `false`.** The field is still honoured, so
|
|
453
453
|
a project that explicitly sets `true` is unaffected.
|
|
454
454
|
4. **`wairon doctor` reports the delta** — store packs that no project selected,
|
|
455
|
-
selections that do not resolve, and bundle/store drift.
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
455
|
+
selections that do not resolve, and bundle/store drift. It lists the store
|
|
456
|
+
packs a project does not select and names `wairon pack use <name>` for each;
|
|
457
|
+
`doctor --fix` never selects them for you, because what happens to be
|
|
458
|
+
installed on one machine is no decision of the project's (a member's approval
|
|
459
|
+
drifted the day a `--fix` recorded a pack nobody chose).
|
|
459
460
|
5. **A project with no `extensions` block and a non-empty store** gets an
|
|
460
461
|
informational notice on `validate`/`status` naming exactly what stopped
|
|
461
462
|
applying and how to re-select it.
|
|
@@ -537,11 +538,10 @@ with or before A4, so migration reporting lands before behaviour changes.
|
|
|
537
538
|
replaced. Resolution stays in the loader and the rule only surfaces what it
|
|
538
539
|
found, so the two can never disagree about whether a pack applies.
|
|
539
540
|
4. ~~**A7**~~ **DONE** — `wairon doctor` reports unresolvable selections,
|
|
540
|
-
installed-but-unapplied packs, and opted-in machine-wide packs
|
|
541
|
-
`
|
|
542
|
-
|
|
543
|
-
project
|
|
544
|
-
(absent field in the raw file) from "chose deliberately".
|
|
541
|
+
installed-but-unapplied packs, and opted-in machine-wide packs, naming
|
|
542
|
+
`wairon pack use <name>` for each pack to select. `doctor --fix` no longer
|
|
543
|
+
records installed packs as selections: the machine's store is never the
|
|
544
|
+
project's choice.
|
|
545
545
|
5. ~~**A4**~~ **DONE** — `useGlobalPacks` defaults to `false`, behind the single
|
|
546
546
|
`GLOBAL_PACKS_DEFAULT` constant that every reader and config writer shares.
|
|
547
547
|
6. ~~**A5**~~ **DONE** — a store pack declaring `applyByDefault: true` is seeded
|
package/package.json
CHANGED