github.com/square/finch@v0.0.0-20240412205204-6530c03e2b96/docs/themes/hugo-geekdoc/static/js/433-6462193c.chunk.min.js (about)

     1  "use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[433],{3349:function(e,t,n){n.d(t,{a:function(){return l}});var r=n(6225);function l(e,t){var n=e.append("foreignObject").attr("width","100000"),l=n.append("xhtml:div");l.attr("xmlns","http://www.w3.org/1999/xhtml");var o=t.label;switch(typeof o){case"function":l.insert(o);break;case"object":l.insert((function(){return o}));break;default:l.html(o)}r.bg(l,t.labelStyle),l.style("display","inline-block"),l.style("white-space","nowrap");var a=l.node().getBoundingClientRect();return n.attr("width",a.width).attr("height",a.height),n}},6225:function(e,t,n){n.d(t,{$p:function(){return d},O1:function(){return a},WR:function(){return p},bF:function(){return o},bg:function(){return c}});var r=n(7514),l=n(3234);function o(e,t){return!!e.children(t).length}function a(e){return s(e.v)+":"+s(e.w)+":"+s(e.name)}var i=/:/g;function s(e){return e?String(e).replace(i,"\\:"):""}function c(e,t){t&&e.attr("style",t)}function d(e,t,n){t&&e.attr("class",t).attr("class",n+" "+e.attr("class"))}function p(e,t){var n=t.graph();if(r.Z(n)){var o=n.transition;if(l.Z(o))return o(e)}return e}},3433:function(e,t,n){n.d(t,{diagram:function(){return i}});var r=n(9863),l=(n(5625),n(5740));n(3110),n(3402),n(3688),n(870),n(9451),n(6225),n(3349),n(6749),n(6446),n(3032),l.c_6,n(1188);var o=n(755);n(7856),n(7484),n(7967),n(9368),n(1898);const a={},i={parser:r.p,db:r.f,renderer:o.f,styles:o.a,init:e=>{e.flowchart||(e.flowchart={}),e.flowchart.arrowMarkerAbsolute=e.arrowMarkerAbsolute,function(e){const t=Object.keys(e);for(const n of t)a[n]=e[n]}(e.flowchart),r.f.clear(),r.f.setGen("gen-1")}}},755:function(e,t,n){n.d(t,{a:function(){return u},f:function(){return f}});var r=n(5625),l=n(5740),o=n(9863),a=n(3110),i=n(1188),s=n(2566),c=n(3349);const d={},p=function(e,t,n,r,l,o){const s=r.select(`[id="${n}"]`);Object.keys(e).forEach((function(n){const r=e[n];let d="default";r.classes.length>0&&(d=r.classes.join(" ")),d+=" flowchart-label";const p=(0,i.n)(r.styles);let b,f=void 0!==r.text?r.text:r.id;if(a.l.info("vertex",r,r.labelType),"markdown"===r.labelType)a.l.info("vertex",r,r.labelType);else if((0,a.k)((0,a.g)().flowchart.htmlLabels)){const e={label:f.replace(/fa[blrs]?:fa-[\w-]+/g,(e=>`<i class='${e.replace(":"," ")}'></i>`))};b=(0,c.a)(s,e).node(),b.parentNode.removeChild(b)}else{const e=l.createElementNS("http://www.w3.org/2000/svg","text");e.setAttribute("style",p.labelStyle.replace("color:","fill:"));const t=f.split(a.e.lineBreakRegex);for(const n of t){const t=l.createElementNS("http://www.w3.org/2000/svg","tspan");t.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),t.setAttribute("dy","1em"),t.setAttribute("x","1"),t.textContent=n,e.appendChild(t)}b=e}let u=0,w="";switch(r.type){case"round":u=5,w="rect";break;case"square":case"group":default:w="rect";break;case"diamond":w="question";break;case"hexagon":w="hexagon";break;case"odd":case"odd_right":w="rect_left_inv_arrow";break;case"lean_right":w="lean_right";break;case"lean_left":w="lean_left";break;case"trapezoid":w="trapezoid";break;case"inv_trapezoid":w="inv_trapezoid";break;case"circle":w="circle";break;case"ellipse":w="ellipse";break;case"stadium":w="stadium";break;case"subroutine":w="subroutine";break;case"cylinder":w="cylinder";break;case"doublecircle":w="doublecircle"}t.setNode(r.id,{labelStyle:p.labelStyle,shape:w,labelText:f,labelType:r.labelType,rx:u,ry:u,class:d,style:p.style,id:r.id,link:r.link,linkTarget:r.linkTarget,tooltip:o.db.getTooltip(r.id)||"",domId:o.db.lookUpDomId(r.id),haveCallback:r.haveCallback,width:"group"===r.type?500:void 0,dir:r.dir,type:r.type,props:r.props,padding:(0,a.g)().flowchart.padding}),a.l.info("setNode",{labelStyle:p.labelStyle,labelType:r.labelType,shape:w,labelText:f,rx:u,ry:u,class:d,style:p.style,id:r.id,domId:o.db.lookUpDomId(r.id),width:"group"===r.type?500:void 0,type:r.type,dir:r.dir,props:r.props,padding:(0,a.g)().flowchart.padding})}))},b=function(e,t,n){a.l.info("abc78 edges = ",e);let r,o,s=0,c={};if(void 0!==e.defaultStyle){const t=(0,i.n)(e.defaultStyle);r=t.style,o=t.labelStyle}e.forEach((function(n){s++;var p="L-"+n.start+"-"+n.end;void 0===c[p]?(c[p]=0,a.l.info("abc78 new entry",p,c[p])):(c[p]++,a.l.info("abc78 new entry",p,c[p]));let b=p+"-"+c[p];a.l.info("abc78 new link id to be used is",p,b,c[p]);var f="LS-"+n.start,u="LE-"+n.end;const w={style:"",labelStyle:""};switch(w.minlen=n.length||1,"arrow_open"===n.type?w.arrowhead="none":w.arrowhead="normal",w.arrowTypeStart="arrow_open",w.arrowTypeEnd="arrow_open",n.type){case"double_arrow_cross":w.arrowTypeStart="arrow_cross";case"arrow_cross":w.arrowTypeEnd="arrow_cross";break;case"double_arrow_point":w.arrowTypeStart="arrow_point";case"arrow_point":w.arrowTypeEnd="arrow_point";break;case"double_arrow_circle":w.arrowTypeStart="arrow_circle";case"arrow_circle":w.arrowTypeEnd="arrow_circle"}let h="",g="";switch(n.stroke){case"normal":h="fill:none;",void 0!==r&&(h=r),void 0!==o&&(g=o),w.thickness="normal",w.pattern="solid";break;case"dotted":w.thickness="normal",w.pattern="dotted",w.style="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":w.thickness="thick",w.pattern="solid",w.style="stroke-width: 3.5px;fill:none;";break;case"invisible":w.thickness="invisible",w.pattern="solid",w.style="stroke-width: 0;fill:none;"}if(void 0!==n.style){const e=(0,i.n)(n.style);h=e.style,g=e.labelStyle}w.style=w.style+=h,w.labelStyle=w.labelStyle+=g,void 0!==n.interpolate?w.curve=(0,i.o)(n.interpolate,l.c_6):void 0!==e.defaultInterpolate?w.curve=(0,i.o)(e.defaultInterpolate,l.c_6):w.curve=(0,i.o)(d.curve,l.c_6),void 0===n.text?void 0!==n.style&&(w.arrowheadStyle="fill: #333"):(w.arrowheadStyle="fill: #333",w.labelpos="c"),w.labelType=n.labelType,w.label=n.text.replace(a.e.lineBreakRegex,"\n"),void 0===n.style&&(w.style=w.style||"stroke: #333; stroke-width: 1.5px;fill:none;"),w.labelStyle=w.labelStyle.replace("color:","fill:"),w.id=b,w.classes="flowchart-link "+f+" "+u,t.setEdge(n.start,n.end,w,s)}))},f={setConf:function(e){const t=Object.keys(e);for(const n of t)d[n]=e[n]},addVertices:p,addEdges:b,getClasses:function(e,t){a.l.info("Extracting classes"),t.db.clear();try{return t.parse(e),t.db.getClasses()}catch(e){return}},draw:function(e,t,n,c){a.l.info("Drawing flowchart"),c.db.clear(),o.f.setGen("gen-2"),c.parser.parse(e);let d=c.db.getDirection();void 0===d&&(d="TD");const{securityLevel:f,flowchart:u}=(0,a.g)(),w=u.nodeSpacing||50,h=u.rankSpacing||50;let g;"sandbox"===f&&(g=(0,l.Ys)("#i"+t));const y="sandbox"===f?(0,l.Ys)(g.nodes()[0].contentDocument.body):(0,l.Ys)("body"),k="sandbox"===f?g.nodes()[0].contentDocument:document,x=new r.k({multigraph:!0,compound:!0}).setGraph({rankdir:d,nodesep:w,ranksep:h,marginx:0,marginy:0}).setDefaultEdgeLabel((function(){return{}}));let v;const m=c.db.getSubGraphs();a.l.info("Subgraphs - ",m);for(let e=m.length-1;e>=0;e--)v=m[e],a.l.info("Subgraph - ",v),c.db.addVertex(v.id,{text:v.title,type:v.labelType},"group",void 0,v.classes,v.dir);const S=c.db.getVertices(),T=c.db.getEdges();a.l.info("Edges",T);let _=0;for(_=m.length-1;_>=0;_--){v=m[_],(0,l.td_)("cluster").append("text");for(let e=0;e<v.nodes.length;e++)a.l.info("Setting up subgraphs",v.nodes[e],v.id),x.setParent(v.nodes[e],v.id)}p(S,x,t,y,k,c),b(T,x);const C=y.select(`[id="${t}"]`),$=y.select("#"+t+" g");if((0,s.r)($,x,["point","circle","cross"],"flowchart",t),i.u.insertTitle(C,"flowchartTitleText",u.titleTopMargin,c.db.getDiagramTitle()),(0,i.s)(x,C,u.diagramPadding,u.useMaxWidth),c.db.indexNodes("subGraph"+_),!u.htmlLabels){const e=k.querySelectorAll('[id="'+t+'"] .edgeLabel .label');for(const t of e){const e=t.getBBox(),n=k.createElementNS("http://www.w3.org/2000/svg","rect");n.setAttribute("rx",0),n.setAttribute("ry",0),n.setAttribute("width",e.width),n.setAttribute("height",e.height),t.insertBefore(n,t.firstChild)}}Object.keys(S).forEach((function(e){const n=S[e];if(n.link){const r=(0,l.Ys)("#"+t+' [id="'+e+'"]');if(r){const e=k.createElementNS("http://www.w3.org/2000/svg","a");e.setAttributeNS("http://www.w3.org/2000/svg","class",n.classes.join(" ")),e.setAttributeNS("http://www.w3.org/2000/svg","href",n.link),e.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),"sandbox"===f?e.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):n.linkTarget&&e.setAttributeNS("http://www.w3.org/2000/svg","target",n.linkTarget);const t=r.insert((function(){return e}),":first-child"),l=r.select(".label-container");l&&t.append((function(){return l.node()}));const o=r.select(".label");o&&t.append((function(){return o.node()}))}}}))}},u=e=>`.label {\n    font-family: ${e.fontFamily};\n    color: ${e.nodeTextColor||e.textColor};\n  }\n  .cluster-label text {\n    fill: ${e.titleColor};\n  }\n  .cluster-label span,p {\n    color: ${e.titleColor};\n  }\n\n  .label text,span,p {\n    fill: ${e.nodeTextColor||e.textColor};\n    color: ${e.nodeTextColor||e.textColor};\n  }\n\n  .node rect,\n  .node circle,\n  .node ellipse,\n  .node polygon,\n  .node path {\n    fill: ${e.mainBkg};\n    stroke: ${e.nodeBorder};\n    stroke-width: 1px;\n  }\n  .flowchart-label text {\n    text-anchor: middle;\n  }\n  // .flowchart-label .text-outer-tspan {\n  //   text-anchor: middle;\n  // }\n  // .flowchart-label .text-inner-tspan {\n  //   text-anchor: start;\n  // }\n\n  .node .label {\n    text-align: center;\n  }\n  .node.clickable {\n    cursor: pointer;\n  }\n\n  .arrowheadPath {\n    fill: ${e.arrowheadColor};\n  }\n\n  .edgePath .path {\n    stroke: ${e.lineColor};\n    stroke-width: 2.0px;\n  }\n\n  .flowchart-link {\n    stroke: ${e.lineColor};\n    fill: none;\n  }\n\n  .edgeLabel {\n    background-color: ${e.edgeLabelBackground};\n    rect {\n      opacity: 0.5;\n      background-color: ${e.edgeLabelBackground};\n      fill: ${e.edgeLabelBackground};\n    }\n    text-align: center;\n  }\n\n  .cluster rect {\n    fill: ${e.clusterBkg};\n    stroke: ${e.clusterBorder};\n    stroke-width: 1px;\n  }\n\n  .cluster text {\n    fill: ${e.titleColor};\n  }\n\n  .cluster span,p {\n    color: ${e.titleColor};\n  }\n  /* .cluster div {\n    color: ${e.titleColor};\n  } */\n\n  div.mermaidTooltip {\n    position: absolute;\n    text-align: center;\n    max-width: 200px;\n    padding: 2px;\n    font-family: ${e.fontFamily};\n    font-size: 12px;\n    background: ${e.tertiaryColor};\n    border: 1px solid ${e.border2};\n    border-radius: 2px;\n    pointer-events: none;\n    z-index: 100;\n  }\n\n  .flowchartTitleText {\n    text-anchor: middle;\n    font-size: 18px;\n    fill: ${e.textColor};\n  }\n`}}]);