@codingame/monaco-vscode-markdown-language-features-default-extension 36.2.6 → 37.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +237 -23
- package/package.json +2 -2
- package/resources/abnfDiagram-VCTEODGH-MFZBS7QV.js +1 -0
- package/resources/architecture-7GRP2DOG-KMESPJ5A.js +1 -0
- package/resources/architectureDiagram-5GKGNRK7-MTTZPDNG.js +36 -0
- package/resources/blockDiagram-NRAW4CY4-UDRMVB5I.js +129 -0
- package/resources/c4Diagram-UCG6FXSJ-CNUYFC6N.js +38 -0
- package/resources/chunk-2KBWIZHB.js +14 -0
- package/resources/chunk-3CEAP2V5.js +1 -0
- package/resources/chunk-43RBMH4Y.js +1 -0
- package/resources/chunk-4AUIAGYT.js +1 -0
- package/resources/chunk-4PRM3W7S.js +88 -0
- package/resources/chunk-5DJUZA4F.js +1 -0
- package/resources/chunk-6LQNQPBM.js +1 -0
- package/resources/chunk-A3DHMJKP.js +1 -0
- package/resources/chunk-ATDVZUJ2.js +231 -0
- package/resources/chunk-CBQW2LLN.js +1 -0
- package/resources/chunk-CCQNES6G.js +1 -0
- package/resources/chunk-CD5RYVNW.js +1 -0
- package/resources/chunk-CQFFNO72.js +1 -0
- package/resources/chunk-EWILYK3H.js +1 -0
- package/resources/chunk-EWVD6AUZ.js +15 -0
- package/resources/chunk-EXFMYL6U.js +1 -0
- package/resources/chunk-FH3BATM5.js +1 -0
- package/resources/chunk-FK4OKHO7.js +178 -0
- package/resources/chunk-FZLE27CN.js +1 -0
- package/resources/chunk-HRJ5UBVC.js +1 -0
- package/resources/chunk-IEMKBRIG.js +339 -0
- package/resources/chunk-IRNO36C3.js +1 -0
- package/resources/chunk-J4SQIVOP.js +1 -0
- package/resources/chunk-JAORNH2M.js +2 -0
- package/resources/chunk-JBQZ5UCE.js +1 -0
- package/resources/chunk-JFI5BOLY.js +1 -0
- package/resources/chunk-JXCTOEX6.js +1 -0
- package/resources/chunk-K2JFJOPP.js +1 -0
- package/resources/chunk-LK6KML2S.js +10 -0
- package/resources/chunk-MNHOAW4R.js +3 -0
- package/resources/chunk-NLCJ5AKJ.js +132 -0
- package/resources/chunk-OOJM4CTU.js +1 -0
- package/resources/chunk-R7CM4BQN.js +2 -0
- package/resources/chunk-RBL2QVA3.js +1 -0
- package/resources/chunk-SNGMH3JW.js +2 -0
- package/resources/chunk-TGD3YKTU.js +32 -0
- package/resources/chunk-TGYBLZFN.js +1 -0
- package/resources/chunk-U3E5RSXE.js +62 -0
- package/resources/chunk-U7TCJVVP.js +1 -0
- package/resources/chunk-WSHCWW4Q.js +2 -0
- package/resources/chunk-WVYKIHVG.js +1 -0
- package/resources/chunk-XCMS6RVA.js +1 -0
- package/resources/chunk-XM54GAH3.js +206 -0
- package/resources/chunk-YICKNY6Y.js +1 -0
- package/resources/chunk-YNKYB66X.js +257 -0
- package/resources/chunk-ZMBQGVIF.js +1 -0
- package/resources/chunk-ZNREFWKG.js +1 -0
- package/resources/chunk-ZU7JKVUR.js +168 -0
- package/resources/chunk-ZYRITDEB.js +72 -0
- package/resources/classDiagram-DTDB5LWJ-TBJLBGTZ.js +1 -0
- package/resources/codicon-R6HEZFPR.ttf +0 -0
- package/resources/cose-bilkent-JH36ORCC-7TCRTQWC.js +1 -0
- package/resources/cynefin-OW5HDTMX-QMEUXFXO.js +1 -0
- package/resources/cynefinDiagram-5FMLGOSQ-J745EYTI.js +62 -0
- package/resources/dagre-3AP2YEHR-CUFPL4A5.js +4 -0
- package/resources/diagram-S7CK7UJ4-SC5AFKXH.js +30 -0
- package/resources/diagram-UQ7AKVKN-3O7WQJXE.js +41 -0
- package/resources/diagram-VSXAHHWV-SN3VCCS5.js +3 -0
- package/resources/diagram-VX7I27RA-7PQJWMN5.js +24 -0
- package/resources/diagram-Z3DM3KII-QZ45TJFK.js +24 -0
- package/resources/ebnfDiagram-PWID7BFC-CBJPGG56.js +1 -0
- package/resources/editor.css.txt +1 -1
- package/resources/editor.js +137 -3431
- package/resources/editor.ts +587 -46
- package/resources/erDiagram-SSCWMZ5O-TUKYG42P.js +99 -0
- package/resources/eventmodeling-NTZA5JFV-MGOPW7BD.js +1 -0
- package/resources/extension.js +179 -172
- package/resources/extension.js.map +4 -4
- package/resources/flowDiagram-A5DVABFB-M6K5X26V.js +1 -0
- package/resources/ganttDiagram-EL5Y4UJY-JCSKUU2V.js +292 -0
- package/resources/gitGraph-4MIJSDKK-ITDCTFJT.js +1 -0
- package/resources/gitGraphDiagram-WWUBYQGX-RXRB5JA2.js +106 -0
- package/resources/index.js +3 -3
- package/resources/index2.js +17 -17
- package/resources/info-A6RAGUB7-VXIEHQAI.js +1 -0
- package/resources/infoDiagram-RXCK75RN-2T6V4JS2.js +2 -0
- package/resources/ishikawaDiagram-5VMMS53U-6WC4IGXZ.js +70 -0
- package/resources/journeyDiagram-EYS64GPL-PZQYT6UF.js +139 -0
- package/resources/kanban-definition-3QL26DDD-VYBV345J.js +89 -0
- package/resources/katex-QJ7O5CJ5.js +1 -0
- package/resources/linkPresentationProvider.ts +179 -0
- package/resources/markdown.css.txt +39 -0
- package/resources/markdownEditor.css.txt +13 -0
- package/resources/mermaid.core-S5KCHHL2.js +18 -0
- package/resources/mindmap-definition-FBJOCRG2-H3I5F4WB.js +96 -0
- package/resources/package.json +1 -1
- package/resources/package.nls.json +1 -1
- package/resources/package.schema.json +1 -1
- package/resources/packet-AYTQ26CC-WLFKOXIZ.js +1 -0
- package/resources/pegDiagram-XKGWAZYB-HUV4U5RU.js +1 -0
- package/resources/pie-WAS4IAKB-GZIMD664.js +1 -0
- package/resources/pieDiagram-E7YTZNPT-XOJEVCEO.js +39 -0
- package/resources/pre.js +1 -1
- package/resources/preview-dark.svg +1 -1
- package/resources/preview-light.svg +1 -1
- package/resources/quadrantDiagram-AXDQQJYC-YPPZYAGP.js +7 -0
- package/resources/radar-RG4KPBEZ-URG5LVGS.js +1 -0
- package/resources/railroad-74A4TZTK-3ZMXCKLP.js +1 -0
- package/resources/railroad-abnf-HS5TGJTU-LBR5MV33.js +1 -0
- package/resources/railroad-ebnf-LZEXJU2U-YEVF3EJR.js +1 -0
- package/resources/railroad-peg-WCYAUIDC-CV774YSK.js +1 -0
- package/resources/railroadDiagram-O6MQD6OU-YZF7JNDT.js +1 -0
- package/resources/requirementDiagram-EFPCY7ZU-PZ7BYTDZ.js +84 -0
- package/resources/sankeyDiagram-P5KCCOFB-3P5DWREA.js +40 -0
- package/resources/sequenceDiagram-WJ2MYXX4-O52K5NPU.js +162 -0
- package/resources/sizeCapture-X5ZJPWSS-PRFE7SKK.js +1 -0
- package/resources/stateDiagram-HBIQ2CUA-KDPYCQOT.js +1 -0
- package/resources/stateDiagram-v2-4QOOHH4V-QBQE56JB.js +1 -0
- package/resources/swimlanes-XN3QIQJK-YCLJ3KIH.js +1 -0
- package/resources/swimlanesDiagram-VK2B7HYN-RS7VRH6T.js +8 -0
- package/resources/syntaxHighlighter.ts +2 -2
- package/resources/timeline-definition-24CTP7MA-GQ3MCHCF.js +120 -0
- package/resources/treeView-Q6P3EWNA-UEXUSAGC.js +1 -0
- package/resources/treemap-WGGIJYW6-NFXJPDAT.js +1 -0
- package/resources/tsconfig.json +1 -1
- package/resources/vennDiagram-4TSXK5OY-PNMXQJF6.js +34 -0
- package/resources/wardley-WFR3VGLG-MQ6DEZYA.js +1 -0
- package/resources/wardleyDiagram-VM6X3IG4-46KJTB57.js +78 -0
- package/resources/xychartDiagram-S5SC5T6Z-NSN5W7VL.js +7 -0
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
import{a as Wt}from"./chunk-FH3BATM5.js";import{b as Mt}from"./chunk-CQFFNO72.js";import{a as jt}from"./chunk-TGYBLZFN.js";import{h as Ut}from"./chunk-U7TCJVVP.js";import{g as Gt,p as Vt}from"./chunk-JAORNH2M.js";import{N as M,T as Nt,U as Rt,V as $t,W as Ft,X as Pt,Y as Bt,Z as Yt,_ as R,g as Ot}from"./chunk-NLCJ5AKJ.js";import{b as E,h as pt}from"./chunk-3CEAP2V5.js";import{a as f}from"./chunk-6LQNQPBM.js";var Ct=(function(){var t=f(function(V,a,u,i){for(u=u||{},i=V.length;i--;u[V[i]]=a);return u},"o"),e=[1,2],l=[1,3],s=[1,4],c=[2,4],h=[1,9],p=[1,11],y=[1,16],o=[1,17],T=[1,18],m=[1,19],O=[1,33],x=[1,20],_=[1,21],d=[1,22],L=[1,23],$=[1,24],C=[1,26],F=[1,27],A=[1,28],P=[1,29],I=[1,30],H=[1,31],rt=[1,32],it=[1,35],at=[1,36],nt=[1,37],ot=[1,38],z=[1,34],S=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],lt=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],Lt=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],Tt={trace:f(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:f(function(a,u,i,g,b,r,K){var n=r.length-1;switch(b){case 3:return g.setRootDoc(r[n]),r[n];break;case 4:this.$=[];break;case 5:r[n]!="nl"&&(r[n-1].push(r[n]),this.$=r[n-1]);break;case 6:case 7:this.$=r[n];break;case 8:this.$="nl";break;case 12:this.$=r[n];break;case 13:let ht=r[n-1];ht.description=g.trimColon(r[n]),this.$=ht;break;case 14:this.$={stmt:"relation",state1:r[n-2],state2:r[n]};break;case 15:let ut=g.trimColon(r[n]);this.$={stmt:"relation",state1:r[n-3],state2:r[n-1],description:ut};break;case 19:this.$={stmt:"state",id:r[n-3],type:"default",description:"",doc:r[n-1]};break;case 20:var B=r[n],Y=r[n-2].trim();if(r[n].match(":")){var Q=r[n].split(":");B=Q[0],Y=[Y,Q[1]]}this.$={stmt:"state",id:B,type:"default",description:Y};break;case 21:this.$={stmt:"state",id:r[n-3],type:"default",description:r[n-5],doc:r[n-1]};break;case 22:this.$={stmt:"state",id:r[n],type:"fork"};break;case 23:this.$={stmt:"state",id:r[n],type:"join"};break;case 24:this.$={stmt:"state",id:r[n],type:"choice"};break;case 25:this.$={stmt:"state",id:g.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:r[n-1].trim(),note:{position:r[n-2].trim(),text:r[n].trim()}};break;case 29:this.$=r[n].trim(),g.setAccTitle(this.$);break;case 30:case 31:this.$=r[n].trim(),g.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:r[n-3],url:r[n-2],tooltip:r[n-1]};break;case 33:this.$={stmt:"click",id:r[n-3],url:r[n-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:r[n-1].trim(),classes:r[n].trim()};break;case 36:this.$={stmt:"style",id:r[n-1].trim(),styleClass:r[n].trim()};break;case 37:this.$={stmt:"applyClass",id:r[n-1].trim(),styleClass:r[n].trim()};break;case 38:g.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:g.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:g.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:g.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:r[n].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:r[n-2].trim(),classes:[r[n].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:r[n-2].trim(),classes:[r[n].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:e,5:l,6:s},{1:[3]},{3:5,4:e,5:l,6:s},{3:6,4:e,5:l,6:s},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],c,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:h,5:p,8:8,9:10,10:12,11:13,12:14,13:15,16:y,17:o,19:T,22:m,24:O,25:x,26:_,27:d,28:L,29:$,32:25,33:C,35:F,37:A,38:P,41:I,45:H,48:rt,51:it,52:at,53:nt,54:ot,57:z},t(S,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:y,17:o,19:T,22:m,24:O,25:x,26:_,27:d,28:L,29:$,32:25,33:C,35:F,37:A,38:P,41:I,45:H,48:rt,51:it,52:at,53:nt,54:ot,57:z},t(S,[2,7]),t(S,[2,8]),t(S,[2,9]),t(S,[2,10]),t(S,[2,11]),t(S,[2,12],{14:[1,40],15:[1,41]}),t(S,[2,16]),{18:[1,42]},t(S,[2,18],{20:[1,43]}),{23:[1,44]},t(S,[2,22]),t(S,[2,23]),t(S,[2,24]),t(S,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(S,[2,28]),{34:[1,49]},{36:[1,50]},t(S,[2,31]),{13:51,24:O,57:z},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(lt,[2,44],{58:[1,56]}),t(lt,[2,45],{58:[1,57]}),t(S,[2,38]),t(S,[2,39]),t(S,[2,40]),t(S,[2,41]),t(S,[2,6]),t(S,[2,13]),{13:58,24:O,57:z},t(S,[2,17]),t(Lt,c,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(S,[2,29]),t(S,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},t(S,[2,14],{14:[1,71]}),{4:h,5:p,8:8,9:10,10:12,11:13,12:14,13:15,16:y,17:o,19:T,21:[1,72],22:m,24:O,25:x,26:_,27:d,28:L,29:$,32:25,33:C,35:F,37:A,38:P,41:I,45:H,48:rt,51:it,52:at,53:nt,54:ot,57:z},t(S,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(S,[2,34]),t(S,[2,35]),t(S,[2,36]),t(S,[2,37]),t(lt,[2,46]),t(lt,[2,47]),t(S,[2,15]),t(S,[2,19]),t(Lt,c,{7:78}),t(S,[2,26]),t(S,[2,27]),{5:[1,79]},{5:[1,80]},{4:h,5:p,8:8,9:10,10:12,11:13,12:14,13:15,16:y,17:o,19:T,21:[1,81],22:m,24:O,25:x,26:_,27:d,28:L,29:$,32:25,33:C,35:F,37:A,38:P,41:I,45:H,48:rt,51:it,52:at,53:nt,54:ot,57:z},t(S,[2,32]),t(S,[2,33]),t(S,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:f(function(a,u){if(u.recoverable)this.trace(a);else{var i=new Error(a);throw i.hash=u,i}},"parseError"),parse:f(function(a){var u=this,i=[0],g=[],b=[null],r=[],K=this.table,n="",B=0,Y=0,Q=0,ht=2,ut=1,fe=r.slice.call(arguments,1),k=Object.create(this.lexer),W={yy:{}};for(var bt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,bt)&&(W.yy[bt]=this.yy[bt]);k.setInput(a,W.yy),W.yy.lexer=k,W.yy.parser=this,typeof k.yylloc>"u"&&(k.yylloc={});var Et=k.yylloc;r.push(Et);var pe=k.options&&k.options.ranges;typeof W.yy.parseError=="function"?this.parseError=W.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Se(w){i.length=i.length-2*w,b.length=b.length-w,r.length=r.length-w}f(Se,"popStack");function It(){var w;return w=g.pop()||k.lex()||ut,typeof w!="number"&&(w instanceof Array&&(g=w,w=g.pop()),w=u.symbols_[w]||w),w}f(It,"lex");for(var D,mt,j,N,Ve,kt,X={},dt,G,wt,ft;;){if(j=i[i.length-1],this.defaultActions[j]?N=this.defaultActions[j]:((D===null||typeof D>"u")&&(D=It()),N=K[j]&&K[j][D]),typeof N>"u"||!N.length||!N[0]){var _t="";ft=[];for(dt in K[j])this.terminals_[dt]&&dt>ht&&ft.push("'"+this.terminals_[dt]+"'");k.showPosition?_t="Parse error on line "+(B+1)+`:
|
|
2
|
+
`+k.showPosition()+`
|
|
3
|
+
Expecting `+ft.join(", ")+", got '"+(this.terminals_[D]||D)+"'":_t="Parse error on line "+(B+1)+": Unexpected "+(D==ut?"end of input":"'"+(this.terminals_[D]||D)+"'"),this.parseError(_t,{text:k.match,token:this.terminals_[D]||D,line:k.yylineno,loc:Et,expected:ft})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+j+", token: "+D);switch(N[0]){case 1:i.push(D),b.push(k.yytext),r.push(k.yylloc),i.push(N[1]),D=null,mt?(D=mt,mt=null):(Y=k.yyleng,n=k.yytext,B=k.yylineno,Et=k.yylloc,Q>0&&Q--);break;case 2:if(G=this.productions_[N[1]][1],X.$=b[b.length-G],X._$={first_line:r[r.length-(G||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(G||1)].first_column,last_column:r[r.length-1].last_column},pe&&(X._$.range=[r[r.length-(G||1)].range[0],r[r.length-1].range[1]]),kt=this.performAction.apply(X,[n,Y,B,W.yy,N[1],b,r].concat(fe)),typeof kt<"u")return kt;G&&(i=i.slice(0,-1*G*2),b=b.slice(0,-1*G),r=r.slice(0,-1*G)),i.push(this.productions_[N[1]][0]),b.push(X.$),r.push(X._$),wt=K[i[i.length-2]][i[i.length-1]],i.push(wt);break;case 3:return!0}}return!0},"parse")},de=(function(){var V={EOF:1,parseError:f(function(u,i){if(this.yy.parser)this.yy.parser.parseError(u,i);else throw new Error(u)},"parseError"),setInput:f(function(a,u){return this.yy=u||this.yy||{},this._input=a,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:f(function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var u=a.match(/(?:\r\n?|\n).*/g);return u?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},"input"),unput:f(function(a){var u=a.length,i=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-u),this.offset-=u;var g=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var b=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===g.length?this.yylloc.first_column:0)+g[g.length-i.length].length-i[0].length:this.yylloc.first_column-u},this.options.ranges&&(this.yylloc.range=[b[0],b[0]+this.yyleng-u]),this.yyleng=this.yytext.length,this},"unput"),more:f(function(){return this._more=!0,this},"more"),reject:f(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:f(function(a){this.unput(this.match.slice(a))},"less"),pastInput:f(function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:f(function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:f(function(){var a=this.pastInput(),u=new Array(a.length+1).join("-");return a+this.upcomingInput()+`
|
|
5
|
+
`+u+"^"},"showPosition"),test_match:f(function(a,u){var i,g,b;if(this.options.backtrack_lexer&&(b={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(b.yylloc.range=this.yylloc.range.slice(0))),g=a[0].match(/(?:\r\n?|\n).*/g),g&&(this.yylineno+=g.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:g?g[g.length-1].length-g[g.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+a[0].length},this.yytext+=a[0],this.match+=a[0],this.matches=a,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(a[0].length),this.matched+=a[0],i=this.performAction.call(this,this.yy,this,u,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack){for(var r in b)this[r]=b[r];return!1}return!1},"test_match"),next:f(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var a,u,i,g;this._more||(this.yytext="",this.match="");for(var b=this._currentRules(),r=0;r<b.length;r++)if(i=this._input.match(this.rules[b[r]]),i&&(!u||i[0].length>u[0].length)){if(u=i,g=r,this.options.backtrack_lexer){if(a=this.test_match(i,b[r]),a!==!1)return a;if(this._backtrack){u=!1;continue}else return!1}else if(!this.options.flex)break}return u?(a=this.test_match(u,b[g]),a!==!1?a:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:f(function(){var u=this.next();return u||this.lex()},"lex"),begin:f(function(u){this.conditionStack.push(u)},"begin"),popState:f(function(){var u=this.conditionStack.length-1;return u>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:f(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:f(function(u){return u=this.conditionStack.length-1-Math.abs(u||0),u>=0?this.conditionStack[u]:"INITIAL"},"topState"),pushState:f(function(u){this.begin(u)},"pushState"),stateStackSize:f(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:f(function(u,i,g,b){function r(){let n=i.yytext.indexOf("%%");if(n===0)return!1;if(n>0){let B=i.yytext.slice(0,n),Y=i.yytext.slice(n);Y&&u.lexer.unput(Y),i.yytext=B}return!0}f(r,"processId");var K=b;switch(g){case 0:return 38;case 1:return 40;case 2:return 39;case 3:return 44;case 4:return 51;case 5:return 52;case 6:return 53;case 7:return 54;case 8:return 5;case 9:break;case 10:break;case 11:break;case 12:break;case 13:return this.pushState("SCALE"),17;break;case 14:return 18;case 15:this.popState();break;case 16:return this.begin("acc_title"),33;break;case 17:return this.popState(),"acc_title_value";break;case 18:return this.begin("acc_descr"),35;break;case 19:return this.popState(),"acc_descr_value";break;case 20:this.begin("acc_descr_multiline");break;case 21:this.popState();break;case 22:return"acc_descr_multiline_value";case 23:return this.pushState("CLASSDEF"),41;break;case 24:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";break;case 25:return this.popState(),this.pushState("CLASSDEFID"),42;break;case 26:return this.popState(),43;break;case 27:return this.pushState("CLASS"),48;break;case 28:return this.popState(),this.pushState("CLASS_STYLE"),49;break;case 29:return this.popState(),50;break;case 30:return this.pushState("STYLE"),45;break;case 31:return this.popState(),this.pushState("STYLEDEF_STYLES"),46;break;case 32:return this.popState(),47;break;case 33:return this.pushState("SCALE"),17;break;case 34:return 18;case 35:this.popState();break;case 36:this.pushState("STATE");break;case 37:return this.popState(),i.yytext=i.yytext.slice(0,-8).trim(),25;break;case 38:return this.popState(),i.yytext=i.yytext.slice(0,-8).trim(),26;break;case 39:return this.popState(),i.yytext=i.yytext.slice(0,-10).trim(),27;break;case 40:return this.popState(),i.yytext=i.yytext.slice(0,-8).trim(),25;break;case 41:return this.popState(),i.yytext=i.yytext.slice(0,-8).trim(),26;break;case 42:return this.popState(),i.yytext=i.yytext.slice(0,-10).trim(),27;break;case 43:return 51;case 44:return 52;case 45:return 53;case 46:return 54;case 47:this.pushState("STATE_STRING");break;case 48:return this.pushState("STATE_ID"),"AS";break;case 49:if(!r())return;return this.popState(),"ID";break;case 50:this.popState();break;case 51:return"STATE_DESCR";case 52:throw new Error('Error: State name must be a single word. Found: "'+i.yytext.trim()+'"');case 53:return 19;case 54:this.popState();break;case 55:return this.popState(),this.pushState("struct"),20;break;case 56:return this.popState(),21;break;case 57:break;case 58:return this.begin("NOTE"),29;break;case 59:return this.popState(),this.pushState("NOTE_ID"),59;break;case 60:return this.popState(),this.pushState("NOTE_ID"),60;break;case 61:this.popState(),this.pushState("FLOATING_NOTE");break;case 62:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";break;case 63:break;case 64:return"NOTE_TEXT";case 65:if(!r())return;return this.popState(),"ID";break;case 66:if(!r())return;return this.popState(),this.pushState("NOTE_TEXT"),24;break;case 67:return this.popState(),i.yytext=i.yytext.substr(2).trim(),31;break;case 68:return this.popState(),i.yytext=i.yytext.slice(0,-8).trim(),31;break;case 69:return 6;case 70:return 6;case 71:return 16;case 72:return 57;case 73:return r()?24:void 0;case 74:return i.yytext=i.yytext.trim(),14;break;case 75:return 15;case 76:return 28;case 77:return 58;case 78:return 5;case 79:return"INVALID"}},"anonymous"),rules:[/^(?:click\b)/i,/^(?:href\b)/i,/^(?:"[^"]*")/i,/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:style\s+)/i,/^(?:[\w,]+\s+)/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<<fork>>)/i,/^(?:.*<<join>>)/i,/^(?:.*<<choice>>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\w+\s+\w+.*?\{)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?\n\s*end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:(?:[^:\n;]|:[^:\n;])+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[10,11,12],inclusive:!1},struct:{rules:[10,11,12,23,27,30,36,43,44,45,46,56,57,58,72,73,74,75,76,77],inclusive:!1},FLOATING_NOTE_ID:{rules:[65],inclusive:!1},FLOATING_NOTE:{rules:[62,63,64],inclusive:!1},NOTE_TEXT:{rules:[67,68],inclusive:!1},NOTE_ID:{rules:[66],inclusive:!1},NOTE:{rules:[59,60,61],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[32],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[31],inclusive:!1},CLASS_STYLE:{rules:[29],inclusive:!1},CLASS:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[26],inclusive:!1},CLASSDEF:{rules:[24,25],inclusive:!1},acc_descr_multiline:{rules:[21,22],inclusive:!1},acc_descr:{rules:[19],inclusive:!1},acc_title:{rules:[17],inclusive:!1},SCALE:{rules:[14,15,34,35],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[49],inclusive:!1},STATE_STRING:{rules:[50,51],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[10,11,12,37,38,39,40,41,42,47,48,52,53,54,55],inclusive:!1},ID:{rules:[10,11,12],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,11,12,13,16,18,20,23,27,30,33,36,55,58,69,70,71,72,73,74,75,77,78,79],inclusive:!0}}};return V})();Tt.lexer=de;function ct(){this.yy={}}return f(ct,"Parser"),ct.prototype=Tt,Tt.Parser=ct,new ct})();Ct.parser=Ct;var Je=Ct,ye="TB",Zt="TB",Ht="dir",q="state",J="root",At="relation",ge="classDef",Te="style",be="applyClass",et="default",te="divider",ee="fill:none",se="fill: #333",re="c",ie="markdown",ae="normal",Dt="rect",vt="rectWithTitle",Ee="stateStart",me="stateEnd",zt="divider",Kt="roundedWithTitle",ke="note",_e="noteGroup",st="statediagram",De="state",ve=`${st}-${De}`,ne="transition",Ce="note",Ae="note-edge",xe=`${ne} ${Ae}`,Le=`${st}-${Ce}`,Ie="cluster",we=`${st}-${Ie}`,Oe="cluster-alt",Ne=`${st}-${Oe}`,oe="parent",le="note",Re="state",xt="----",$e=`${xt}${le}`,Xt=`${xt}${oe}`,ce=f((t,e=Zt)=>{if(!t.doc)return e;let l=e;for(let s of t.doc)s.stmt==="dir"&&(l=s.value);return l},"getDir"),Fe=f(function(t,e){return e.db.getClasses()},"getClasses"),Pe=f(async function(t,e,l,s){E.info("REF0:"),E.info("Drawing state diagram (v2)",e);let{securityLevel:c,state:h,layout:p}=R();s.db.extract(s.db.getRootDocV2());let y=s.db.getData(),o=Wt(e,c);y.type=s.type,y.layoutAlgorithm=p,y.nodeSpacing=h?.nodeSpacing||50,y.rankSpacing=h?.rankSpacing||50,R().look==="neo"?y.markers=["barbNeo"]:y.markers=["barb"],y.diagramId=e,await Mt(y,o);let m=8;try{(typeof s.db.getLinks=="function"?s.db.getLinks():new Map).forEach((x,_)=>{let d=typeof _=="string"?_:typeof _?.id=="string"?_.id:"",L=y.nodes.find(I=>I.id===d);if(!d){E.warn("\u26A0\uFE0F Invalid or missing stateId from key:",JSON.stringify(_));return}let $=o.node()?.querySelectorAll("g.node, g.rough-node"),C;if($?.forEach(I=>{let H=I.textContent?.trim();(I.id===L?.domId||H===d)&&(C=I)}),!C){E.warn("\u26A0\uFE0F Could not find node matching text:",d);return}let F=C.parentNode;if(!F){E.warn("\u26A0\uFE0F Node has no parent, cannot wrap:",d);return}let A=document.createElementNS("http://www.w3.org/2000/svg","a"),P=x.url.replace(/^"+|"+$/g,"");if(A.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",P),A.setAttribute("target","_blank"),x.tooltip){let I=x.tooltip.replace(/^"+|"+$/g,"");A.setAttribute("title",I),C.setAttribute("title",I)}F.replaceChild(A,C),A.appendChild(C),E.info("\u{1F517} Wrapped node in <a> tag for:",d,x.url)})}catch(O){E.error("\u274C Error injecting clickable links:",O)}Vt.insertTitle(o,"statediagramTitleText",h?.titleTopMargin??25,s.db.getDiagramTitle()),jt(o,m,st,h?.useMaxWidth??!0)},"draw"),qe={getClasses:Fe,draw:Pe,getDir:ce},yt=new Map,U=0;function gt(t="",e=0,l="",s=xt){let c=l!==null&&l.length>0?`${s}${l}`:"";return`${Re}-${t}${c}-${e}`}f(gt,"stateDomId");var Be=f((t,e,l,s,c,h,p,y)=>{E.trace("items",e),e.forEach(o=>{switch(o.stmt){case q:tt(t,o,l,s,c,h,p,y);break;case et:tt(t,o,l,s,c,h,p,y);break;case At:{tt(t,o.state1,l,s,c,h,p,y),tt(t,o.state2,l,s,c,h,p,y);let T=p==="neo",m={id:"edge"+U,start:o.state1.id,end:o.state2.id,arrowhead:"normal",arrowTypeEnd:T?"arrow_barb_neo":"arrow_barb",style:ee,labelStyle:"",label:M.sanitizeText(o.description??"",R()),arrowheadStyle:se,labelpos:re,labelType:ie,thickness:ae,classes:ne,look:p};c.push(m),U++}break}})},"setupDoc"),Jt=f((t,e=Zt)=>{let l=e;if(t.doc)for(let s of t.doc)s.stmt==="dir"&&(l=s.value);return l},"getDir");function Z(t,e,l){if(!e.id||e.id==="</join></fork>"||e.id==="</choice>")return;e.cssClasses&&(Array.isArray(e.cssCompiledStyles)||(e.cssCompiledStyles=[]),e.cssClasses.split(" ").forEach(c=>{let h=l.get(c);h&&(e.cssCompiledStyles=[...e.cssCompiledStyles??[],...h.styles])}));let s=t.find(c=>c.id===e.id);s?Object.assign(s,e):t.push(e)}f(Z,"insertOrUpdateNode");function he(t){return t?.classes?.join(" ")??""}f(he,"getClassesFromDbInfo");function ue(t){return t?.styles??[]}f(ue,"getStylesFromDbInfo");var tt=f((t,e,l,s,c,h,p,y)=>{let o=e.id,T=l.get(o),m=he(T),O=ue(T),x=R();if(E.info("dataFetcher parsedItem",e,T,O),o!=="root"){let _=Dt;e.start===!0?_=Ee:e.start===!1&&(_=me),e.type!==et&&(_=e.type),yt.get(o)||yt.set(o,{id:o,shape:_,description:M.sanitizeText(o,x),cssClasses:`${m} ${ve}`,cssStyles:O});let d=yt.get(o);e.description&&(Array.isArray(d.description)?(d.shape=vt,d.description.push(e.description)):d.description?.length&&d.description.length>0?(d.shape=vt,d.description===o?d.description=[e.description]:d.description=[d.description,e.description]):(d.shape=Dt,d.description=e.description),d.description=M.sanitizeTextOrArray(d.description,x)),d.description?.length===1&&d.shape===vt&&(d.type==="group"?d.shape=Kt:d.shape=Dt),!d.type&&e.doc&&(E.info("Setting cluster for XCX",o,Jt(e)),d.type="group",d.isGroup=!0,d.dir=Jt(e),d.shape=e.type===te?zt:Kt,d.cssClasses=`${d.cssClasses} ${we} ${h?Ne:""}`);let L={labelStyle:"",shape:d.shape,label:d.description,cssClasses:d.cssClasses,cssCompiledStyles:[],cssStyles:d.cssStyles,id:o,dir:d.dir,domId:gt(o,U),type:d.type,isGroup:d.type==="group",padding:8,rx:10,ry:10,look:p,labelType:"markdown"};if(L.shape===zt&&(L.label=""),t&&t.id!=="root"&&(E.trace("Setting node ",o," to be child of its parent ",t.id),L.parentId=t.id),L.centerLabel=!0,e.note){let $={labelStyle:"",shape:ke,label:e.note.text,labelType:"markdown",cssClasses:Le,cssStyles:[],cssCompiledStyles:[],id:o+$e+"-"+U,domId:gt(o,U,le),type:d.type,isGroup:d.type==="group",padding:x.flowchart?.padding,look:p,position:e.note.position},C=o+Xt,F={labelStyle:"",shape:_e,label:e.note.text,cssClasses:d.cssClasses,cssStyles:[],id:o+Xt,domId:gt(o,U,oe),type:"group",isGroup:!0,padding:16,look:p,position:e.note.position};U++,F.id=C,$.parentId=C,Z(s,F,y),Z(s,$,y),Z(s,L,y);let A=o,P=$.id;e.note.position==="left of"&&(A=$.id,P=o),c.push({id:A+"-"+P,start:A,end:P,arrowhead:"none",arrowTypeEnd:"",style:ee,labelStyle:"",classes:xe,arrowheadStyle:se,labelpos:re,labelType:ie,thickness:ae,look:p})}else Z(s,L,y)}e.doc&&(E.trace("Adding nodes children "),Be(e,e.doc,l,s,c,!h,p,y))},"dataFetcher"),Ye=f(()=>{yt.clear(),U=0},"reset"),v={START_NODE:"[*]",START_TYPE:"start",END_NODE:"[*]",END_TYPE:"end",COLOR_KEYWORD:"color",FILL_KEYWORD:"fill",BG_FILL:"bgFill",STYLECLASS_SEP:","},qt=f(()=>new Map,"newClassesList"),Qt=f(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),St=f(t=>JSON.parse(JSON.stringify(t)),"clone"),ts=class{constructor(t){this.version=t,this.nodes=[],this.edges=[],this.rootDoc=[],this.classes=qt(),this.documents={root:Qt()},this.currentDocument=this.documents.root,this.startEndCount=0,this.dividerCnt=0,this.links=new Map,this.funs=[],this.getAccTitle=$t,this.setAccTitle=Rt,this.getAccDescription=Pt,this.setAccDescription=Ft,this.setDiagramTitle=Bt,this.getDiagramTitle=Yt,this.clear(),this.setRootDoc=this.setRootDoc.bind(this),this.getDividerId=this.getDividerId.bind(this),this.setDirection=this.setDirection.bind(this),this.trimColon=this.trimColon.bind(this),this.bindFunctions=this.bindFunctions.bind(this)}static{f(this,"StateDB")}static{this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3}}extract(t){this.clear(!0);for(let s of Array.isArray(t)?t:t.doc)switch(s.stmt){case q:this.addState(s.id.trim(),s.type,s.doc,s.description,s.note);break;case At:this.addRelation(s.state1,s.state2,s.description);break;case ge:this.addStyleClass(s.id.trim(),s.classes);break;case Te:this.handleStyleDef(s);break;case be:this.setCssClass(s.id.trim(),s.styleClass);break;case"click":this.addLink(s.id,s.url,s.tooltip);break}let e=this.getStates(),l=R();Ye(),tt(void 0,this.getRootDocV2(),e,this.nodes,this.edges,!0,l.look,this.classes);for(let s of this.nodes)if(Array.isArray(s.label)){if(s.description=s.label.slice(1),s.isGroup&&s.description.length>0)throw new Error(`Group nodes can only have label. Remove the additional description for node [${s.id}]`);s.label=s.label[0]}}handleStyleDef(t){let e=t.id.trim().split(","),l=t.styleClass.split(",");for(let s of e){let c=this.getState(s);if(!c){let h=s.trim();this.addState(h),c=this.getState(h)}c&&(c.styles=l.map(h=>h.replace(/;/g,"")?.trim()))}}setRootDoc(t){E.info("Setting root doc",t),this.rootDoc=t,this.version===1?this.extract(t):this.extract(this.getRootDocV2())}docTranslator(t,e,l){if(e.stmt===At){this.docTranslator(t,e.state1,!0),this.docTranslator(t,e.state2,!1);return}if(e.stmt===q&&(e.id===v.START_NODE?(e.id=t.id+(l?"_start":"_end"),e.start=l):e.id=e.id.trim()),e.stmt!==J&&e.stmt!==q||!e.doc)return;let s=[],c=[];for(let h of e.doc)if(h.type===te){let p=St(h);p.doc=St(c),s.push(p),c=[]}else c.push(h);if(s.length>0&&c.length>0){let h={stmt:q,id:Gt(),type:"divider",doc:St(c)};s.push(St(h)),e.doc=s}e.doc.forEach(h=>this.docTranslator(e,h,!0))}getRootDocV2(){return this.docTranslator({id:J,stmt:J},{id:J,stmt:J,doc:this.rootDoc},!0),{id:J,doc:this.rootDoc}}addState(t,e=et,l=void 0,s=void 0,c=void 0,h=void 0,p=void 0,y=void 0){let o=t?.trim();if(!this.currentDocument.states.has(o))E.info("Adding state ",o,s),this.currentDocument.states.set(o,{stmt:q,id:o,descriptions:[],type:e,doc:l,note:c,classes:[],styles:[],textStyles:[]});else{let T=this.currentDocument.states.get(o);if(!T)throw new Error(`State not found: ${o}`);T.doc||(T.doc=l),T.type||(T.type=e)}if(s&&(E.info("Setting state description",o,s),(Array.isArray(s)?s:[s]).forEach(m=>this.addDescription(o,m.trim()))),c){let T=this.currentDocument.states.get(o);if(!T)throw new Error(`State not found: ${o}`);T.note=c,T.note.text=M.sanitizeText(T.note.text,R())}h&&(E.info("Setting state classes",o,h),(Array.isArray(h)?h:[h]).forEach(m=>this.setCssClass(o,m.trim()))),p&&(E.info("Setting state styles",o,p),(Array.isArray(p)?p:[p]).forEach(m=>this.setStyle(o,m.trim()))),y&&(E.info("Setting state styles",o,p),(Array.isArray(y)?y:[y]).forEach(m=>this.setTextStyle(o,m.trim())))}clear(t){this.nodes=[],this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.documents={root:Qt()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=qt(),t||(this.links=new Map,Nt())}getState(t){return this.currentDocument.states.get(t)}getStates(){return this.currentDocument.states}logDocuments(){E.info("Documents = ",this.documents)}getRelations(){return this.currentDocument.relations}addLink(t,e,l){this.links.set(t,{url:e,tooltip:l}),E.warn("Adding link",t,e,l)}getLinks(){return this.links}startIdIfNeeded(t=""){return t===v.START_NODE?(this.startEndCount++,`${v.START_TYPE}${this.startEndCount}`):t}startTypeIfNeeded(t="",e=et){return t===v.START_NODE?v.START_TYPE:e}endIdIfNeeded(t=""){return t===v.END_NODE?(this.startEndCount++,`${v.END_TYPE}${this.startEndCount}`):t}endTypeIfNeeded(t="",e=et){return t===v.END_NODE?v.END_TYPE:e}addRelationObjs(t,e,l=""){let s=this.startIdIfNeeded(t.id.trim()),c=this.startTypeIfNeeded(t.id.trim(),t.type),h=this.startIdIfNeeded(e.id.trim()),p=this.startTypeIfNeeded(e.id.trim(),e.type);this.addState(s,c,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),this.addState(h,p,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),this.currentDocument.relations.push({id1:s,id2:h,relationTitle:M.sanitizeText(l,R())})}addRelation(t,e,l){if(typeof t=="object"&&typeof e=="object")this.addRelationObjs(t,e,l);else if(typeof t=="string"&&typeof e=="string"){let s=this.startIdIfNeeded(t.trim()),c=this.startTypeIfNeeded(t),h=this.endIdIfNeeded(e.trim()),p=this.endTypeIfNeeded(e);this.addState(s,c),this.addState(h,p),this.currentDocument.relations.push({id1:s,id2:h,relationTitle:l?M.sanitizeText(l,R()):void 0})}}addDescription(t,e){let l=this.currentDocument.states.get(t),s=e.startsWith(":")?e.replace(":","").trim():e;l?.descriptions?.push(M.sanitizeText(s,R()))}cleanupLabel(t){return t.startsWith(":")?t.slice(2).trim():t.trim()}getDividerId(){return this.dividerCnt++,`divider-id-${this.dividerCnt}`}addStyleClass(t,e=""){this.classes.has(t)||this.classes.set(t,{id:t,styles:[],textStyles:[]});let l=this.classes.get(t);e&&l&&e.split(v.STYLECLASS_SEP).forEach(s=>{let c=s.replace(/([^;]*);/,"$1").trim();if(RegExp(v.COLOR_KEYWORD).exec(s)){let p=c.replace(v.FILL_KEYWORD,v.BG_FILL).replace(v.COLOR_KEYWORD,v.FILL_KEYWORD);l.textStyles.push(p)}l.styles.push(c)})}getClasses(){return this.classes}setupToolTips(t){let e=Ut();pt(t).select("svg").selectAll("g.node, g.rough-node").on("mouseover",c=>{let h=pt(c.currentTarget),p=h.attr("title");if(p===null)return;let y=c.currentTarget?.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.style("left",window.scrollX+y.left+(y.right-y.left)/2+"px").style("top",window.scrollY+y.bottom+"px"),e.html(Ot.sanitize(p)),h.classed("hover",!0)}).on("mouseout",c=>{e.transition().duration(500).style("opacity",0),pt(c.currentTarget).classed("hover",!1)})}setCssClass(t,e){t.split(",").forEach(l=>{let s=this.getState(l);if(!s){let c=l.trim();this.addState(c),s=this.getState(c)}s?.classes?.push(e)})}setStyle(t,e){this.getState(t)?.styles?.push(e)}setTextStyle(t,e){this.getState(t)?.textStyles?.push(e)}bindFunctions(t){this.funs.forEach(e=>{e(t)})}getDirectionStatement(){return this.rootDoc.find(t=>t.stmt===Ht)}getDirection(){return this.getDirectionStatement()?.value??ye}setDirection(t){let e=this.getDirectionStatement();e?e.value=t:this.rootDoc.unshift({stmt:Ht,value:t})}trimColon(t){return t.startsWith(":")?t.slice(1).trim():t.trim()}getData(){let t=R();return{nodes:this.nodes,edges:this.edges,other:{},config:t,direction:ce(this.getRootDocV2())}}getConfig(){return R().state}},Ge=f(t=>`
|
|
7
|
+
defs [id$="-barbEnd"] {
|
|
8
|
+
fill: ${t.transitionColor};
|
|
9
|
+
stroke: ${t.transitionColor};
|
|
10
|
+
}
|
|
11
|
+
g.stateGroup text {
|
|
12
|
+
fill: ${t.nodeBorder};
|
|
13
|
+
stroke: none;
|
|
14
|
+
font-size: 10px;
|
|
15
|
+
}
|
|
16
|
+
g.stateGroup text {
|
|
17
|
+
fill: ${t.textColor};
|
|
18
|
+
stroke: none;
|
|
19
|
+
font-size: 10px;
|
|
20
|
+
|
|
21
|
+
}
|
|
22
|
+
g.stateGroup .state-title {
|
|
23
|
+
font-weight: bolder;
|
|
24
|
+
fill: ${t.stateLabelColor};
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
g.stateGroup rect {
|
|
28
|
+
fill: ${t.mainBkg};
|
|
29
|
+
stroke: ${t.nodeBorder};
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
g.stateGroup line {
|
|
33
|
+
stroke: ${t.lineColor};
|
|
34
|
+
stroke-width: ${t.strokeWidth||1};
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.transition {
|
|
38
|
+
stroke: ${t.transitionColor};
|
|
39
|
+
stroke-width: ${t.strokeWidth||1};
|
|
40
|
+
fill: none;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.stateGroup .composit {
|
|
44
|
+
fill: ${t.background};
|
|
45
|
+
border-bottom: 1px
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.stateGroup .alt-composit {
|
|
49
|
+
fill: #e0e0e0;
|
|
50
|
+
border-bottom: 1px
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.state-note {
|
|
54
|
+
stroke: ${t.noteBorderColor};
|
|
55
|
+
fill: ${t.noteBkgColor};
|
|
56
|
+
|
|
57
|
+
text {
|
|
58
|
+
fill: ${t.noteTextColor};
|
|
59
|
+
stroke: none;
|
|
60
|
+
font-size: 10px;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.stateLabel .box {
|
|
65
|
+
stroke: none;
|
|
66
|
+
stroke-width: 0;
|
|
67
|
+
fill: ${t.mainBkg};
|
|
68
|
+
opacity: 0.5;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.edgeLabel .label rect {
|
|
72
|
+
fill: ${t.labelBackgroundColor};
|
|
73
|
+
opacity: 0.5;
|
|
74
|
+
}
|
|
75
|
+
.edgeLabel {
|
|
76
|
+
background-color: ${t.edgeLabelBackground};
|
|
77
|
+
p {
|
|
78
|
+
background-color: ${t.edgeLabelBackground};
|
|
79
|
+
}
|
|
80
|
+
rect {
|
|
81
|
+
opacity: 0.5;
|
|
82
|
+
background-color: ${t.edgeLabelBackground};
|
|
83
|
+
fill: ${t.edgeLabelBackground};
|
|
84
|
+
}
|
|
85
|
+
text-align: center;
|
|
86
|
+
}
|
|
87
|
+
.edgeLabel .label text {
|
|
88
|
+
fill: ${t.transitionLabelColor||t.tertiaryTextColor};
|
|
89
|
+
}
|
|
90
|
+
.label div .edgeLabel {
|
|
91
|
+
color: ${t.transitionLabelColor||t.tertiaryTextColor};
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.stateLabel text {
|
|
95
|
+
fill: ${t.stateLabelColor};
|
|
96
|
+
font-size: 10px;
|
|
97
|
+
font-weight: bold;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.node circle.state-start {
|
|
101
|
+
fill: ${t.specialStateColor};
|
|
102
|
+
stroke: ${t.specialStateColor};
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.node .fork-join {
|
|
106
|
+
fill: ${t.specialStateColor};
|
|
107
|
+
stroke: ${t.specialStateColor};
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.node circle.state-end {
|
|
111
|
+
fill: ${t.innerEndBackground};
|
|
112
|
+
stroke: ${t.background};
|
|
113
|
+
stroke-width: 1.5
|
|
114
|
+
}
|
|
115
|
+
.end-state-inner {
|
|
116
|
+
fill: ${t.compositeBackground||t.background};
|
|
117
|
+
// stroke: ${t.background};
|
|
118
|
+
stroke-width: 1.5
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.node rect {
|
|
122
|
+
fill: ${t.stateBkg||t.mainBkg};
|
|
123
|
+
stroke: ${t.stateBorder||t.nodeBorder};
|
|
124
|
+
stroke-width: ${t.strokeWidth||1}px;
|
|
125
|
+
}
|
|
126
|
+
.node polygon {
|
|
127
|
+
fill: ${t.mainBkg};
|
|
128
|
+
stroke: ${t.stateBorder||t.nodeBorder};;
|
|
129
|
+
stroke-width: ${t.strokeWidth||1}px;
|
|
130
|
+
}
|
|
131
|
+
[id$="-barbEnd"] {
|
|
132
|
+
fill: ${t.lineColor};
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.statediagram-cluster rect {
|
|
136
|
+
fill: ${t.compositeTitleBackground};
|
|
137
|
+
stroke: ${t.stateBorder||t.nodeBorder};
|
|
138
|
+
stroke-width: ${t.strokeWidth||1}px;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.cluster-label, .nodeLabel {
|
|
142
|
+
color: ${t.stateLabelColor};
|
|
143
|
+
// line-height: 1;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.statediagram-cluster rect.outer {
|
|
147
|
+
rx: 5px;
|
|
148
|
+
ry: 5px;
|
|
149
|
+
}
|
|
150
|
+
.statediagram-state .divider {
|
|
151
|
+
stroke: ${t.stateBorder||t.nodeBorder};
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.statediagram-state .title-state {
|
|
155
|
+
rx: 5px;
|
|
156
|
+
ry: 5px;
|
|
157
|
+
}
|
|
158
|
+
.statediagram-cluster.statediagram-cluster .inner {
|
|
159
|
+
fill: ${t.compositeBackground||t.background};
|
|
160
|
+
}
|
|
161
|
+
.statediagram-cluster.statediagram-cluster-alt .inner {
|
|
162
|
+
fill: ${t.altBackground?t.altBackground:"#efefef"};
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.statediagram-cluster .inner {
|
|
166
|
+
rx:0;
|
|
167
|
+
ry:0;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.statediagram-state rect.basic {
|
|
171
|
+
rx: 5px;
|
|
172
|
+
ry: 5px;
|
|
173
|
+
}
|
|
174
|
+
.statediagram-state rect.divider {
|
|
175
|
+
stroke-dasharray: 10,10;
|
|
176
|
+
fill: ${t.altBackground?t.altBackground:"#efefef"};
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.note-edge {
|
|
180
|
+
stroke-dasharray: 5;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.statediagram-note rect {
|
|
184
|
+
fill: ${t.noteBkgColor};
|
|
185
|
+
stroke: ${t.noteBorderColor};
|
|
186
|
+
stroke-width: 1px;
|
|
187
|
+
rx: 0;
|
|
188
|
+
ry: 0;
|
|
189
|
+
}
|
|
190
|
+
.statediagram-note rect {
|
|
191
|
+
fill: ${t.noteBkgColor};
|
|
192
|
+
stroke: ${t.noteBorderColor};
|
|
193
|
+
stroke-width: 1px;
|
|
194
|
+
rx: 0;
|
|
195
|
+
ry: 0;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.statediagram-note text {
|
|
199
|
+
fill: ${t.noteTextColor};
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.statediagram-note .nodeLabel {
|
|
203
|
+
color: ${t.noteTextColor};
|
|
204
|
+
}
|
|
205
|
+
.statediagram .edgeLabel {
|
|
206
|
+
color: red; // ${t.noteTextColor};
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
[id$="-dependencyStart"], [id$="-dependencyEnd"] {
|
|
210
|
+
fill: ${t.lineColor};
|
|
211
|
+
stroke: ${t.lineColor};
|
|
212
|
+
stroke-width: ${t.strokeWidth||1};
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.statediagramTitleText {
|
|
216
|
+
text-anchor: middle;
|
|
217
|
+
font-size: 18px;
|
|
218
|
+
fill: ${t.textColor};
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
[data-look="neo"].statediagram-cluster rect {
|
|
222
|
+
fill: ${t.mainBkg};
|
|
223
|
+
stroke: ${t.useGradient?"url("+t.svgId+"-gradient)":t.stateBorder||t.nodeBorder};
|
|
224
|
+
stroke-width: ${t.strokeWidth??1};
|
|
225
|
+
}
|
|
226
|
+
[data-look="neo"].statediagram-cluster rect.outer {
|
|
227
|
+
rx: ${t.radius}px;
|
|
228
|
+
ry: ${t.radius}px;
|
|
229
|
+
filter: ${t.dropShadow?t.dropShadow.replace("url(#drop-shadow)",`url(${t.svgId}-drop-shadow)`):"none"}
|
|
230
|
+
}
|
|
231
|
+
`,"getStyles"),es=Ge;export{Je as a,qe as b,ts as c,es as d};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{f as o}from"./chunk-U3E5RSXE.js";import{t as f}from"./chunk-JAORNH2M.js";import{b as h}from"./chunk-3CEAP2V5.js";import{a as s}from"./chunk-6LQNQPBM.js";var T=s(({flowchart:a})=>{let t=a?.subGraphTitleMargin?.top??0,i=a?.subGraphTitleMargin?.bottom??0,r=t+i;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:i,subGraphTitleTotalMargin:r}},"getSubGraphTitleMargins"),l=new Map;async function g(a,t,i){let r,e;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");let p=t.shape?o[t.shape]:void 0;if(!p)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let c;i.config.securityLevel==="sandbox"?c="_top":t.linkTarget&&(c=t.linkTarget||"_blank"),r=a.insert("svg:a").attr("xlink:href",t.link).attr("target",c??null),e=await p(r,t,i)}else e=await p(a,t,i),r=e;return r.attr("data-look",f(t.look)),t.tooltip&&e.attr("title",t.tooltip),l.set(t.id,r),t.haveCallback&&r.attr("class",r.attr("class")+" clickable"),r}s(g,"insertNode");var k=s((a,t)=>{l.set(t.id,a)},"setNodeElem"),v=s(()=>{l.clear()},"clear"),w=s(a=>{let t=l.get(a.id);h.trace("Transforming node",a.diff,a,"translate("+(a.x-a.width/2-5)+", "+a.width/2+")");let i=8,r=a.diff||0;return a.clusterNode?t.attr("transform","translate("+(a.x+r-a.width/2)+", "+(a.y-a.height/2-i)+")"):t.attr("transform","translate("+a.x+", "+a.y+")"),r},"positionNode");export{T as a,g as b,k as c,v as d,w as e};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,b as i,c as o,d as t,e as n,g as u,k as d,x as l,y as s}from"./chunk-FK4OKHO7.js";var c=class extends s{static{e(this,"GitGraphTokenBuilder")}constructor(){super(["gitGraph"])}},p={parser:{TokenBuilder:e(()=>new c,"TokenBuilder"),ValueConverter:e(()=>new l,"ValueConverter")}};function h(G=n){let r=t(o(G),u),a=t(i({shared:r}),d,p);return r.ServiceRegistry.register(a),{shared:r,GitGraph:a}}e(h,"createGitGraphServices");export{p as a,h as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,b as t,c as a,d as o,e as i,g as s,l as u,x as d,y as l}from"./chunk-FK4OKHO7.js";var f=class extends l{static{e(this,"InfoTokenBuilder")}constructor(){super(["info","showInfo"])}},m={parser:{TokenBuilder:e(()=>new f,"TokenBuilder"),ValueConverter:e(()=>new d,"ValueConverter")}};function v(c=i){let r=o(a(c),s),n=o(t({shared:r}),u,m);return r.ServiceRegistry.register(n),{shared:r,Info:n}}e(v,"createInfoServices");export{m as a,v as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as c}from"./chunk-RBL2QVA3.js";import{f as h,g as u,h as y,i as w}from"./chunk-LK6KML2S.js";import{b as f}from"./chunk-CBQW2LLN.js";import{a as g}from"./chunk-U3E5RSXE.js";import{e as m}from"./chunk-JAORNH2M.js";import{N as p,u as l}from"./chunk-NLCJ5AKJ.js";import{b as i}from"./chunk-3CEAP2V5.js";import{a as o}from"./chunk-6LQNQPBM.js";var I={common:p,getConfig:l,insertCluster:c,insertEdge:y,insertEdgeLabel:h,insertMarkers:w,insertNode:f,interpolateToCurve:m,labelHelper:g,log:i,positionEdgeLabel:u},a={},L=o(t=>{for(let r of t)a[r.name]=r},"registerLayoutLoaders"),E=o(()=>{L([{name:"dagre",loader:o(async()=>await import("./dagre-3AP2YEHR-CUFPL4A5.js"),"loader")},{name:"swimlane",loader:o(async()=>await import("./swimlanes-XN3QIQJK-YCLJ3KIH.js"),"loader")},{name:"cose-bilkent",loader:o(async()=>await import("./cose-bilkent-JH36ORCC-7TCRTQWC.js"),"loader")}])},"registerDefaultLayoutLoaders");E();var G=o(async(t,r)=>{if(!(t.layoutAlgorithm in a))throw new Error(`Unknown layout algorithm: ${t.layoutAlgorithm}`);if(t.diagramId)for(let e of t.nodes){let A=e.domId||e.id;e.domId=`${t.diagramId}-${A}`}let n=a[t.layoutAlgorithm],F=await n.loader(),{theme:d,themeVariables:$}=t.config,{useGradient:D,gradientStart:v,gradientStop:x}=$,s=r.attr("id");if(r.append("defs").append("filter").attr("id",`${s}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${d?.includes("dark")?"#FFFFFF":"#000000"}`),r.append("defs").append("filter").attr("id",`${s}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${d?.includes("dark")?"#FFFFFF":"#000000"}`),D){let e=r.append("linearGradient").attr("id",r.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");e.append("svg:stop").attr("offset","0%").attr("stop-color",v).attr("stop-opacity",1),e.append("svg:stop").attr("offset","100%").attr("stop-color",x).attr("stop-opacity",1)}return F.render(t,r,I,{algorithm:n.algorithm})},"render"),H=o((t="",{fallback:r="dagre"}={})=>{if(t in a)return t;if(r in a)return i.warn(`Layout algorithm ${t} is not registered. Using ${r} as fallback.`),r;throw new Error(`Both layout algorithms ${t} and ${r} are not registered.`)},"getRegisteredLayoutAlgorithm");export{L as a,G as b,H as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function Y(a,t,s){if(a&&a.length){let[e,n]=t,o=Math.PI/180*s,r=Math.cos(o),h=Math.sin(o);for(let i of a){let[l,c]=i;i[0]=(l-e)*r-(c-n)*h+e,i[1]=(l-e)*h+(c-n)*r+n}}}function zt(a,t){return a[0]===t[0]&&a[1]===t[1]}function Wt(a,t,s,e=1){let n=s,o=Math.max(t,.1),r=a[0]&&a[0][0]&&typeof a[0][0]=="number"?[a]:a,h=[0,0];if(n)for(let l of r)Y(l,h,n);let i=(function(l,c,d){let p=[];for(let M of l){let m=[...M];zt(m[0],m[m.length-1])||m.push([m[0][0],m[0][1]]),m.length>2&&p.push(m)}let u=[];c=Math.max(c,.1);let f=[];for(let M of p)for(let m=0;m<M.length-1;m++){let P=M[m],x=M[m+1];if(P[1]!==x[1]){let w=Math.min(P[1],x[1]);f.push({ymin:w,ymax:Math.max(P[1],x[1]),x:w===P[1]?P[0]:x[0],islope:(x[0]-P[0])/(x[1]-P[1])})}}if(f.sort(((M,m)=>M.ymin<m.ymin?-1:M.ymin>m.ymin?1:M.x<m.x?-1:M.x>m.x?1:M.ymax===m.ymax?0:(M.ymax-m.ymax)/Math.abs(M.ymax-m.ymax))),!f.length)return u;let g=[],k=f[0].ymin,b=0;for(;g.length||f.length;){if(f.length){let M=-1;for(let m=0;m<f.length&&!(f[m].ymin>k);m++)M=m;f.splice(0,M+1).forEach((m=>{g.push({s:k,edge:m})}))}if(g=g.filter((M=>!(M.edge.ymax<=k))),g.sort(((M,m)=>M.edge.x===m.edge.x?0:(M.edge.x-m.edge.x)/Math.abs(M.edge.x-m.edge.x))),(d!==1||b%c==0)&&g.length>1)for(let M=0;M<g.length;M+=2){let m=M+1;if(m>=g.length)break;let P=g[M].edge,x=g[m].edge;u.push([[Math.round(P.x),k],[Math.round(x.x),k]])}k+=d,g.forEach((M=>{M.edge.x=M.edge.x+d*M.edge.islope})),b++}return u})(r,o,e);if(n){for(let l of r)Y(l,h,-n);(function(l,c,d){let p=[];l.forEach((u=>p.push(...u))),Y(p,c,d)})(i,h,-n)}return i}function F(a,t){var s;let e=t.hachureAngle+90,n=t.hachureGap;n<0&&(n=4*t.strokeWidth),n=Math.round(Math.max(n,.1));let o=1;return t.roughness>=1&&(((s=t.randomizer)===null||s===void 0?void 0:s.next())||Math.random())>.7&&(o=n),Wt(a,n,e,o||1)}var q=class{constructor(t){this.helper=t}fillPolygons(t,s){return this._fillPolygons(t,s)}_fillPolygons(t,s){let e=F(t,s);return{type:"fillSketch",ops:this.renderLines(e,s)}}renderLines(t,s){let e=[];for(let n of t)e.push(...this.helper.doubleLineOps(n[0][0],n[0][1],n[1][0],n[1][1],s));return e}};function X(a){let t=a[0],s=a[1];return Math.sqrt(Math.pow(t[0]-s[0],2)+Math.pow(t[1]-s[1],2))}var at=class extends q{fillPolygons(t,s){let e=s.hachureGap;e<0&&(e=4*s.strokeWidth),e=Math.max(e,.1);let n=F(t,Object.assign({},s,{hachureGap:e})),o=Math.PI/180*s.hachureAngle,r=[],h=.5*e*Math.cos(o),i=.5*e*Math.sin(o);for(let[l,c]of n)X([l,c])&&r.push([[l[0]-h,l[1]+i],[...c]],[[l[0]+h,l[1]-i],[...c]]);return{type:"fillSketch",ops:this.renderLines(r,s)}}},ot=class extends q{fillPolygons(t,s){let e=this._fillPolygons(t,s),n=Object.assign({},s,{hachureAngle:s.hachureAngle+90}),o=this._fillPolygons(t,n);return e.ops=e.ops.concat(o.ops),e}},ht=class{constructor(t){this.helper=t}fillPolygons(t,s){let e=F(t,s=Object.assign({},s,{hachureAngle:0}));return this.dotsOnLines(e,s)}dotsOnLines(t,s){let e=[],n=s.hachureGap;n<0&&(n=4*s.strokeWidth),n=Math.max(n,.1);let o=s.fillWeight;o<0&&(o=s.strokeWidth/2);let r=n/4;for(let h of t){let i=X(h),l=i/n,c=Math.ceil(l)-1,d=i-c*n,p=(h[0][0]+h[1][0])/2-n/4,u=Math.min(h[0][1],h[1][1]);for(let f=0;f<c;f++){let g=u+d+f*n,k=p-r+2*Math.random()*r,b=g-r+2*Math.random()*r,M=this.helper.ellipse(k,b,o,o,s);e.push(...M.ops)}}return{type:"fillSketch",ops:e}}},rt=class{constructor(t){this.helper=t}fillPolygons(t,s){let e=F(t,s);return{type:"fillSketch",ops:this.dashedLine(e,s)}}dashedLine(t,s){let e=s.dashOffset<0?s.hachureGap<0?4*s.strokeWidth:s.hachureGap:s.dashOffset,n=s.dashGap<0?s.hachureGap<0?4*s.strokeWidth:s.hachureGap:s.dashGap,o=[];return t.forEach((r=>{let h=X(r),i=Math.floor(h/(e+n)),l=(h+n-i*(e+n))/2,c=r[0],d=r[1];c[0]>d[0]&&(c=r[1],d=r[0]);let p=Math.atan((d[1]-c[1])/(d[0]-c[0]));for(let u=0;u<i;u++){let f=u*(e+n),g=f+e,k=[c[0]+f*Math.cos(p)+l*Math.cos(p),c[1]+f*Math.sin(p)+l*Math.sin(p)],b=[c[0]+g*Math.cos(p)+l*Math.cos(p),c[1]+g*Math.sin(p)+l*Math.sin(p)];o.push(...this.helper.doubleLineOps(k[0],k[1],b[0],b[1],s))}})),o}},it=class{constructor(t){this.helper=t}fillPolygons(t,s){let e=s.hachureGap<0?4*s.strokeWidth:s.hachureGap,n=s.zigzagOffset<0?e:s.zigzagOffset,o=F(t,s=Object.assign({},s,{hachureGap:e+n}));return{type:"fillSketch",ops:this.zigzagLines(o,n,s)}}zigzagLines(t,s,e){let n=[];return t.forEach((o=>{let r=X(o),h=Math.round(r/(2*s)),i=o[0],l=o[1];i[0]>l[0]&&(i=o[1],l=o[0]);let c=Math.atan((l[1]-i[1])/(l[0]-i[0]));for(let d=0;d<h;d++){let p=2*d*s,u=2*(d+1)*s,f=Math.sqrt(2*Math.pow(s,2)),g=[i[0]+p*Math.cos(c),i[1]+p*Math.sin(c)],k=[i[0]+u*Math.cos(c),i[1]+u*Math.sin(c)],b=[g[0]+f*Math.cos(c+Math.PI/4),g[1]+f*Math.sin(c+Math.PI/4)];n.push(...this.helper.doubleLineOps(g[0],g[1],b[0],b[1],e),...this.helper.doubleLineOps(b[0],b[1],k[0],k[1],e))}})),n}},S={},ct=class{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}},Et=0,tt=1,bt=2,Z={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function et(a,t){return a.type===t}function gt(a){let t=[],s=(function(r){let h=new Array;for(;r!=="";)if(r.match(/^([ \t\r\n,]+)/))r=r.substr(RegExp.$1.length);else if(r.match(/^([aAcChHlLmMqQsStTvVzZ])/))h[h.length]={type:Et,text:RegExp.$1},r=r.substr(RegExp.$1.length);else{if(!r.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];h[h.length]={type:tt,text:`${parseFloat(RegExp.$1)}`},r=r.substr(RegExp.$1.length)}return h[h.length]={type:bt,text:""},h})(a),e="BOD",n=0,o=s[n];for(;!et(o,bt);){let r=0,h=[];if(e==="BOD"){if(o.text!=="M"&&o.text!=="m")return gt("M0,0"+a);n++,r=Z[o.text],e=o.text}else et(o,tt)?r=Z[e]:(n++,r=Z[o.text],e=o.text);if(!(n+r<s.length))throw new Error("Path data ended short");for(let i=n;i<n+r;i++){let l=s[i];if(!et(l,tt))throw new Error("Param not a number: "+e+","+l.text);h[h.length]=+l.text}if(typeof Z[e]!="number")throw new Error("Bad segment: "+e);{let i={key:e,data:h};t.push(i),n+=r,o=s[n],e==="M"&&(e="L"),e==="m"&&(e="l")}}return t}function Ot(a){let t=0,s=0,e=0,n=0,o=[];for(let{key:r,data:h}of a)switch(r){case"M":o.push({key:"M",data:[...h]}),[t,s]=h,[e,n]=h;break;case"m":t+=h[0],s+=h[1],o.push({key:"M",data:[t,s]}),e=t,n=s;break;case"L":o.push({key:"L",data:[...h]}),[t,s]=h;break;case"l":t+=h[0],s+=h[1],o.push({key:"L",data:[t,s]});break;case"C":o.push({key:"C",data:[...h]}),t=h[4],s=h[5];break;case"c":{let i=h.map(((l,c)=>c%2?l+s:l+t));o.push({key:"C",data:i}),t=i[4],s=i[5];break}case"Q":o.push({key:"Q",data:[...h]}),t=h[2],s=h[3];break;case"q":{let i=h.map(((l,c)=>c%2?l+s:l+t));o.push({key:"Q",data:i}),t=i[2],s=i[3];break}case"A":o.push({key:"A",data:[...h]}),t=h[5],s=h[6];break;case"a":t+=h[5],s+=h[6],o.push({key:"A",data:[h[0],h[1],h[2],h[3],h[4],t,s]});break;case"H":o.push({key:"H",data:[...h]}),t=h[0];break;case"h":t+=h[0],o.push({key:"H",data:[t]});break;case"V":o.push({key:"V",data:[...h]}),s=h[0];break;case"v":s+=h[0],o.push({key:"V",data:[s]});break;case"S":o.push({key:"S",data:[...h]}),t=h[2],s=h[3];break;case"s":{let i=h.map(((l,c)=>c%2?l+s:l+t));o.push({key:"S",data:i}),t=i[2],s=i[3];break}case"T":o.push({key:"T",data:[...h]}),t=h[0],s=h[1];break;case"t":t+=h[0],s+=h[1],o.push({key:"T",data:[t,s]});break;case"Z":case"z":o.push({key:"Z",data:[]}),t=e,s=n}return o}function Lt(a){let t=[],s="",e=0,n=0,o=0,r=0,h=0,i=0;for(let{key:l,data:c}of a){switch(l){case"M":t.push({key:"M",data:[...c]}),[e,n]=c,[o,r]=c;break;case"C":t.push({key:"C",data:[...c]}),e=c[4],n=c[5],h=c[2],i=c[3];break;case"L":t.push({key:"L",data:[...c]}),[e,n]=c;break;case"H":e=c[0],t.push({key:"L",data:[e,n]});break;case"V":n=c[0],t.push({key:"L",data:[e,n]});break;case"S":{let d=0,p=0;s==="C"||s==="S"?(d=e+(e-h),p=n+(n-i)):(d=e,p=n),t.push({key:"C",data:[d,p,...c]}),h=c[0],i=c[1],e=c[2],n=c[3];break}case"T":{let[d,p]=c,u=0,f=0;s==="Q"||s==="T"?(u=e+(e-h),f=n+(n-i)):(u=e,f=n);let g=e+2*(u-e)/3,k=n+2*(f-n)/3,b=d+2*(u-d)/3,M=p+2*(f-p)/3;t.push({key:"C",data:[g,k,b,M,d,p]}),h=u,i=f,e=d,n=p;break}case"Q":{let[d,p,u,f]=c,g=e+2*(d-e)/3,k=n+2*(p-n)/3,b=u+2*(d-u)/3,M=f+2*(p-f)/3;t.push({key:"C",data:[g,k,b,M,u,f]}),h=d,i=p,e=u,n=f;break}case"A":{let d=Math.abs(c[0]),p=Math.abs(c[1]),u=c[2],f=c[3],g=c[4],k=c[5],b=c[6];d===0||p===0?(t.push({key:"C",data:[e,n,k,b,k,b]}),e=k,n=b):(e!==k||n!==b)&&(Tt(e,n,k,b,d,p,u,f,g).forEach((function(M){t.push({key:"C",data:M})})),e=k,n=b);break}case"Z":t.push({key:"Z",data:[]}),e=o,n=r}s=l}return t}function R(a,t,s){return[a*Math.cos(s)-t*Math.sin(s),a*Math.sin(s)+t*Math.cos(s)]}function Tt(a,t,s,e,n,o,r,h,i,l){let c=(d=r,Math.PI*d/180);var d;let p=[],u=0,f=0,g=0,k=0;if(l)[u,f,g,k]=l;else{[a,t]=R(a,t,-c),[s,e]=R(s,e,-c);let T=(a-s)/2,v=(t-e)/2,_=T*T/(n*n)+v*v/(o*o);_>1&&(_=Math.sqrt(_),n*=_,o*=_);let W=n*n,E=o*o,It=W*E-W*v*v-E*T*T,Ct=W*v*v+E*T*T,kt=(h===i?-1:1)*Math.sqrt(Math.abs(It/Ct));g=kt*n*v/o+(a+s)/2,k=kt*-o*T/n+(t+e)/2,u=Math.asin(parseFloat(((t-k)/o).toFixed(9))),f=Math.asin(parseFloat(((e-k)/o).toFixed(9))),a<g&&(u=Math.PI-u),s<g&&(f=Math.PI-f),u<0&&(u=2*Math.PI+u),f<0&&(f=2*Math.PI+f),i&&u>f&&(u-=2*Math.PI),!i&&f>u&&(f-=2*Math.PI)}let b=f-u;if(Math.abs(b)>120*Math.PI/180){let T=f,v=s,_=e;f=i&&f>u?u+120*Math.PI/180*1:u+120*Math.PI/180*-1,p=Tt(s=g+n*Math.cos(f),e=k+o*Math.sin(f),v,_,n,o,r,0,i,[f,T,g,k])}b=f-u;let M=Math.cos(u),m=Math.sin(u),P=Math.cos(f),x=Math.sin(f),w=Math.tan(b/4),L=4/3*n*w,A=4/3*o*w,V=[a,t],D=[a+L*m,t-A*M],C=[s+L*x,e-A*P],Mt=[s,e];if(D[0]=2*V[0]-D[0],D[1]=2*V[1]-D[1],l)return[D,C,Mt].concat(p);{p=[D,C,Mt].concat(p);let T=[];for(let v=0;v<p.length;v+=3){let _=R(p[v][0],p[v][1],c),W=R(p[v+1][0],p[v+1][1],c),E=R(p[v+2][0],p[v+2][1],c);T.push([_[0],_[1],W[0],W[1],E[0],E[1]])}return T}}var Gt={randOffset:function(a,t){return y(a,t)},randOffsetWithRange:function(a,t,s){return J(a,t,s)},ellipse:function(a,t,s,e,n){let o=At(s,e,n);return lt(a,t,n,o).opset},doubleLineOps:function(a,t,s,e,n){return I(a,t,s,e,n,!0)}};function Dt(a,t,s,e,n){return{type:"path",ops:I(a,t,s,e,n)}}function N(a,t,s){let e=(a||[]).length;if(e>2){let n=[];for(let o=0;o<e-1;o++)n.push(...I(a[o][0],a[o][1],a[o+1][0],a[o+1][1],s));return t&&n.push(...I(a[e-1][0],a[e-1][1],a[0][0],a[0][1],s)),{type:"path",ops:n}}return e===2?Dt(a[0][0],a[0][1],a[1][0],a[1][1],s):{type:"path",ops:[]}}function $t(a,t,s,e,n){return(function(o,r){return N(o,!0,r)})([[a,t],[a+s,t],[a+s,t+e],[a,t+e]],n)}function yt(a,t){if(a.length){let s=typeof a[0][0]=="number"?[a]:a,e=Q(s[0],1*(1+.2*t.roughness),t),n=t.disableMultiStroke?[]:Q(s[0],1.5*(1+.22*t.roughness),xt(t));for(let o=1;o<s.length;o++){let r=s[o];if(r.length){let h=Q(r,1*(1+.2*t.roughness),t),i=t.disableMultiStroke?[]:Q(r,1.5*(1+.22*t.roughness),xt(t));for(let l of h)l.op!=="move"&&e.push(l);for(let l of i)l.op!=="move"&&n.push(l)}}return{type:"path",ops:e.concat(n)}}return{type:"path",ops:[]}}function At(a,t,s){let e=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(a/2,2)+Math.pow(t/2,2))/2)),n=Math.ceil(Math.max(s.curveStepCount,s.curveStepCount/Math.sqrt(200)*e)),o=2*Math.PI/n,r=Math.abs(a/2),h=Math.abs(t/2),i=1-s.curveFitting;return r+=y(r*i,s),h+=y(h*i,s),{increment:o,rx:r,ry:h}}function lt(a,t,s,e){let[n,o]=Pt(e.increment,a,t,e.rx,e.ry,1,e.increment*J(.1,J(.4,1,s),s),s),r=K(n,null,s);if(!s.disableMultiStroke&&s.roughness!==0){let[h]=Pt(e.increment,a,t,e.rx,e.ry,1.5,0,s),i=K(h,null,s);r=r.concat(i)}return{estimatedPoints:o,opset:{type:"path",ops:r}}}function mt(a,t,s,e,n,o,r,h,i){let l=a,c=t,d=Math.abs(s/2),p=Math.abs(e/2);d+=y(.01*d,i),p+=y(.01*p,i);let u=n,f=o;for(;u<0;)u+=2*Math.PI,f+=2*Math.PI;f-u>2*Math.PI&&(u=0,f=2*Math.PI);let g=2*Math.PI/i.curveStepCount,k=Math.min(g/2,(f-u)/2),b=vt(k,l,c,d,p,u,f,1,i);if(!i.disableMultiStroke){let M=vt(k,l,c,d,p,u,f,1.5,i);b.push(...M)}return r&&(h?b.push(...I(l,c,l+d*Math.cos(u),c+p*Math.sin(u),i),...I(l,c,l+d*Math.cos(f),c+p*Math.sin(f),i)):b.push({op:"lineTo",data:[l,c]},{op:"lineTo",data:[l+d*Math.cos(u),c+p*Math.sin(u)]})),{type:"path",ops:b}}function wt(a,t){let s=Lt(Ot(gt(a))),e=[],n=[0,0],o=[0,0];for(let{key:r,data:h}of s)switch(r){case"M":o=[h[0],h[1]],n=[h[0],h[1]];break;case"L":e.push(...I(o[0],o[1],h[0],h[1],t)),o=[h[0],h[1]];break;case"C":{let[i,l,c,d,p,u]=h;e.push(...Rt(i,l,c,d,p,u,o,t)),o=[p,u];break}case"Z":e.push(...I(o[0],o[1],n[0],n[1],t)),o=[n[0],n[1]]}return{type:"path",ops:e}}function st(a,t){let s=[];for(let e of a)if(e.length){let n=t.maxRandomnessOffset||0,o=e.length;if(o>2){s.push({op:"move",data:[e[0][0]+y(n,t),e[0][1]+y(n,t)]});for(let r=1;r<o;r++)s.push({op:"lineTo",data:[e[r][0]+y(n,t),e[r][1]+y(n,t)]})}}return{type:"fillPath",ops:s}}function G(a,t){return(function(s,e){let n=s.fillStyle||"hachure";if(!S[n])switch(n){case"zigzag":S[n]||(S[n]=new at(e));break;case"cross-hatch":S[n]||(S[n]=new ot(e));break;case"dots":S[n]||(S[n]=new ht(e));break;case"dashed":S[n]||(S[n]=new rt(e));break;case"zigzag-line":S[n]||(S[n]=new it(e));break;default:n="hachure",S[n]||(S[n]=new q(e))}return S[n]})(t,Gt).fillPolygons(a,t)}function xt(a){let t=Object.assign({},a);return t.randomizer=void 0,a.seed&&(t.seed=a.seed+1),t}function _t(a){return a.randomizer||(a.randomizer=new ct(a.seed||0)),a.randomizer.next()}function J(a,t,s,e=1){return s.roughness*e*(_t(s)*(t-a)+a)}function y(a,t,s=1){return J(-a,a,t,s)}function I(a,t,s,e,n,o=!1){let r=o?n.disableMultiStrokeFill:n.disableMultiStroke,h=ut(a,t,s,e,n,!0,!1);if(r)return h;let i=ut(a,t,s,e,n,!0,!0);return h.concat(i)}function ut(a,t,s,e,n,o,r){let h=Math.pow(a-s,2)+Math.pow(t-e,2),i=Math.sqrt(h),l=1;l=i<200?1:i>500?.4:-.0016668*i+1.233334;let c=n.maxRandomnessOffset||0;c*c*100>h&&(c=i/10);let d=c/2,p=.2+.2*_t(n),u=n.bowing*n.maxRandomnessOffset*(e-t)/200,f=n.bowing*n.maxRandomnessOffset*(a-s)/200;u=y(u,n,l),f=y(f,n,l);let g=[],k=()=>y(d,n,l),b=()=>y(c,n,l),M=n.preserveVertices;return o&&(r?g.push({op:"move",data:[a+(M?0:k()),t+(M?0:k())]}):g.push({op:"move",data:[a+(M?0:y(c,n,l)),t+(M?0:y(c,n,l))]})),r?g.push({op:"bcurveTo",data:[u+a+(s-a)*p+k(),f+t+(e-t)*p+k(),u+a+2*(s-a)*p+k(),f+t+2*(e-t)*p+k(),s+(M?0:k()),e+(M?0:k())]}):g.push({op:"bcurveTo",data:[u+a+(s-a)*p+b(),f+t+(e-t)*p+b(),u+a+2*(s-a)*p+b(),f+t+2*(e-t)*p+b(),s+(M?0:b()),e+(M?0:b())]}),g}function Q(a,t,s){if(!a.length)return[];let e=[];e.push([a[0][0]+y(t,s),a[0][1]+y(t,s)]),e.push([a[0][0]+y(t,s),a[0][1]+y(t,s)]);for(let n=1;n<a.length;n++)e.push([a[n][0]+y(t,s),a[n][1]+y(t,s)]),n===a.length-1&&e.push([a[n][0]+y(t,s),a[n][1]+y(t,s)]);return K(e,null,s)}function K(a,t,s){let e=a.length,n=[];if(e>3){let o=[],r=1-s.curveTightness;n.push({op:"move",data:[a[1][0],a[1][1]]});for(let h=1;h+2<e;h++){let i=a[h];o[0]=[i[0],i[1]],o[1]=[i[0]+(r*a[h+1][0]-r*a[h-1][0])/6,i[1]+(r*a[h+1][1]-r*a[h-1][1])/6],o[2]=[a[h+1][0]+(r*a[h][0]-r*a[h+2][0])/6,a[h+1][1]+(r*a[h][1]-r*a[h+2][1])/6],o[3]=[a[h+1][0],a[h+1][1]],n.push({op:"bcurveTo",data:[o[1][0],o[1][1],o[2][0],o[2][1],o[3][0],o[3][1]]})}if(t&&t.length===2){let h=s.maxRandomnessOffset;n.push({op:"lineTo",data:[t[0]+y(h,s),t[1]+y(h,s)]})}}else e===3?(n.push({op:"move",data:[a[1][0],a[1][1]]}),n.push({op:"bcurveTo",data:[a[1][0],a[1][1],a[2][0],a[2][1],a[2][0],a[2][1]]})):e===2&&n.push(...ut(a[0][0],a[0][1],a[1][0],a[1][1],s,!0,!0));return n}function Pt(a,t,s,e,n,o,r,h){let i=[],l=[];if(h.roughness===0){a/=4,l.push([t+e*Math.cos(-a),s+n*Math.sin(-a)]);for(let c=0;c<=2*Math.PI;c+=a){let d=[t+e*Math.cos(c),s+n*Math.sin(c)];i.push(d),l.push(d)}l.push([t+e*Math.cos(0),s+n*Math.sin(0)]),l.push([t+e*Math.cos(a),s+n*Math.sin(a)])}else{let c=y(.5,h)-Math.PI/2;l.push([y(o,h)+t+.9*e*Math.cos(c-a),y(o,h)+s+.9*n*Math.sin(c-a)]);let d=2*Math.PI+c-.01;for(let p=c;p<d;p+=a){let u=[y(o,h)+t+e*Math.cos(p),y(o,h)+s+n*Math.sin(p)];i.push(u),l.push(u)}l.push([y(o,h)+t+e*Math.cos(c+2*Math.PI+.5*r),y(o,h)+s+n*Math.sin(c+2*Math.PI+.5*r)]),l.push([y(o,h)+t+.98*e*Math.cos(c+r),y(o,h)+s+.98*n*Math.sin(c+r)]),l.push([y(o,h)+t+.9*e*Math.cos(c+.5*r),y(o,h)+s+.9*n*Math.sin(c+.5*r)])}return[l,i]}function vt(a,t,s,e,n,o,r,h,i){let l=o+y(.1,i),c=[];c.push([y(h,i)+t+.9*e*Math.cos(l-a),y(h,i)+s+.9*n*Math.sin(l-a)]);for(let d=l;d<=r;d+=a)c.push([y(h,i)+t+e*Math.cos(d),y(h,i)+s+n*Math.sin(d)]);return c.push([t+e*Math.cos(r),s+n*Math.sin(r)]),c.push([t+e*Math.cos(r),s+n*Math.sin(r)]),K(c,null,i)}function Rt(a,t,s,e,n,o,r,h){let i=[],l=[h.maxRandomnessOffset||1,(h.maxRandomnessOffset||1)+.3],c=[0,0],d=h.disableMultiStroke?1:2,p=h.preserveVertices;for(let u=0;u<d;u++)u===0?i.push({op:"move",data:[r[0],r[1]]}):i.push({op:"move",data:[r[0]+(p?0:y(l[0],h)),r[1]+(p?0:y(l[0],h))]}),c=p?[n,o]:[n+y(l[u],h),o+y(l[u],h)],i.push({op:"bcurveTo",data:[a+y(l[u],h),t+y(l[u],h),s+y(l[u],h),e+y(l[u],h),c[0],c[1]]});return i}function j(a){return[...a]}function St(a,t=0){let s=a.length;if(s<3)throw new Error("A curve must have at least three points.");let e=[];if(s===3)e.push(j(a[0]),j(a[1]),j(a[2]),j(a[2]));else{let n=[];n.push(a[0],a[0]);for(let h=1;h<a.length;h++)n.push(a[h]),h===a.length-1&&n.push(a[h]);let o=[],r=1-t;e.push(j(n[0]));for(let h=1;h+2<n.length;h++){let i=n[h];o[0]=[i[0],i[1]],o[1]=[i[0]+(r*n[h+1][0]-r*n[h-1][0])/6,i[1]+(r*n[h+1][1]-r*n[h-1][1])/6],o[2]=[n[h+1][0]+(r*n[h][0]-r*n[h+2][0])/6,n[h+1][1]+(r*n[h][1]-r*n[h+2][1])/6],o[3]=[n[h+1][0],n[h+1][1]],e.push(o[1],o[2],o[3])}}return e}function B(a,t){return Math.pow(a[0]-t[0],2)+Math.pow(a[1]-t[1],2)}function jt(a,t,s){let e=B(t,s);if(e===0)return B(a,t);let n=((a[0]-t[0])*(s[0]-t[0])+(a[1]-t[1])*(s[1]-t[1]))/e;return n=Math.max(0,Math.min(1,n)),B(a,z(t,s,n))}function z(a,t,s){return[a[0]+(t[0]-a[0])*s,a[1]+(t[1]-a[1])*s]}function pt(a,t,s,e){let n=e||[];if((function(h,i){let l=h[i+0],c=h[i+1],d=h[i+2],p=h[i+3],u=3*c[0]-2*l[0]-p[0];u*=u;let f=3*c[1]-2*l[1]-p[1];f*=f;let g=3*d[0]-2*p[0]-l[0];g*=g;let k=3*d[1]-2*p[1]-l[1];return k*=k,u<g&&(u=g),f<k&&(f=k),u+f})(a,t)<s){let h=a[t+0];n.length?(o=n[n.length-1],r=h,Math.sqrt(B(o,r))>1&&n.push(h)):n.push(h),n.push(a[t+3])}else{let i=a[t+0],l=a[t+1],c=a[t+2],d=a[t+3],p=z(i,l,.5),u=z(l,c,.5),f=z(c,d,.5),g=z(p,u,.5),k=z(u,f,.5),b=z(g,k,.5);pt([i,p,g,b],0,s,n),pt([b,k,f,d],0,s,n)}var o,r;return n}function qt(a,t){return U(a,0,a.length,t)}function U(a,t,s,e,n){let o=n||[],r=a[t],h=a[s-1],i=0,l=1;for(let c=t+1;c<s-1;++c){let d=jt(a[c],r,h);d>i&&(i=d,l=c)}return Math.sqrt(i)>e?(U(a,t,l+1,e,o),U(a,l,s,e,o)):(o.length||o.push(r),o.push(h)),o}function nt(a,t=.15,s){let e=[],n=(a.length-1)/3;for(let o=0;o<n;o++)pt(a,3*o,t,e);return s&&s>0?U(e,0,e.length,s):e}var O="none",$=class{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,s,e){return{shape:t,sets:s||[],options:e||this.defaultOptions}}line(t,s,e,n,o){let r=this._o(o);return this._d("line",[Dt(t,s,e,n,r)],r)}rectangle(t,s,e,n,o){let r=this._o(o),h=[],i=$t(t,s,e,n,r);if(r.fill){let l=[[t,s],[t+e,s],[t+e,s+n],[t,s+n]];r.fillStyle==="solid"?h.push(st([l],r)):h.push(G([l],r))}return r.stroke!==O&&h.push(i),this._d("rectangle",h,r)}ellipse(t,s,e,n,o){let r=this._o(o),h=[],i=At(e,n,r),l=lt(t,s,r,i);if(r.fill)if(r.fillStyle==="solid"){let c=lt(t,s,r,i).opset;c.type="fillPath",h.push(c)}else h.push(G([l.estimatedPoints],r));return r.stroke!==O&&h.push(l.opset),this._d("ellipse",h,r)}circle(t,s,e,n){let o=this.ellipse(t,s,e,e,n);return o.shape="circle",o}linearPath(t,s){let e=this._o(s);return this._d("linearPath",[N(t,!1,e)],e)}arc(t,s,e,n,o,r,h=!1,i){let l=this._o(i),c=[],d=mt(t,s,e,n,o,r,h,!0,l);if(h&&l.fill)if(l.fillStyle==="solid"){let p=Object.assign({},l);p.disableMultiStroke=!0;let u=mt(t,s,e,n,o,r,!0,!1,p);u.type="fillPath",c.push(u)}else c.push((function(p,u,f,g,k,b,M){let m=p,P=u,x=Math.abs(f/2),w=Math.abs(g/2);x+=y(.01*x,M),w+=y(.01*w,M);let L=k,A=b;for(;L<0;)L+=2*Math.PI,A+=2*Math.PI;A-L>2*Math.PI&&(L=0,A=2*Math.PI);let V=(A-L)/M.curveStepCount,D=[];for(let C=L;C<=A;C+=V)D.push([m+x*Math.cos(C),P+w*Math.sin(C)]);return D.push([m+x*Math.cos(A),P+w*Math.sin(A)]),D.push([m,P]),G([D],M)})(t,s,e,n,o,r,l));return l.stroke!==O&&c.push(d),this._d("arc",c,l)}curve(t,s){let e=this._o(s),n=[],o=yt(t,e);if(e.fill&&e.fill!==O)if(e.fillStyle==="solid"){let r=yt(t,Object.assign(Object.assign({},e),{disableMultiStroke:!0,roughness:e.roughness?e.roughness+e.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(r.ops)})}else{let r=[],h=t;if(h.length){let i=typeof h[0][0]=="number"?[h]:h;for(let l of i)l.length<3?r.push(...l):l.length===3?r.push(...nt(St([l[0],l[0],l[1],l[2]]),10,(1+e.roughness)/2)):r.push(...nt(St(l),10,(1+e.roughness)/2))}r.length&&n.push(G([r],e))}return e.stroke!==O&&n.push(o),this._d("curve",n,e)}polygon(t,s){let e=this._o(s),n=[],o=N(t,!0,e);return e.fill&&(e.fillStyle==="solid"?n.push(st([t],e)):n.push(G([t],e))),e.stroke!==O&&n.push(o),this._d("polygon",n,e)}path(t,s){let e=this._o(s),n=[];if(!t)return this._d("path",n,e);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");let o=e.fill&&e.fill!=="transparent"&&e.fill!==O,r=e.stroke!==O,h=!!(e.simplification&&e.simplification<1),i=(function(c,d,p){let u=Lt(Ot(gt(c))),f=[],g=[],k=[0,0],b=[],M=()=>{b.length>=4&&g.push(...nt(b,d)),b=[]},m=()=>{M(),g.length&&(f.push(g),g=[])};for(let{key:x,data:w}of u)switch(x){case"M":m(),k=[w[0],w[1]],g.push(k);break;case"L":M(),g.push([w[0],w[1]]);break;case"C":if(!b.length){let L=g.length?g[g.length-1]:k;b.push([L[0],L[1]])}b.push([w[0],w[1]]),b.push([w[2],w[3]]),b.push([w[4],w[5]]);break;case"Z":M(),g.push([k[0],k[1]])}if(m(),!p)return f;let P=[];for(let x of f){let w=qt(x,p);w.length&&P.push(w)}return P})(t,1,h?4-4*(e.simplification||1):(1+e.roughness)/2),l=wt(t,e);if(o)if(e.fillStyle==="solid")if(i.length===1){let c=wt(t,Object.assign(Object.assign({},e),{disableMultiStroke:!0,roughness:e.roughness?e.roughness+e.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(c.ops)})}else n.push(st(i,e));else n.push(G(i,e));return r&&(h?i.forEach((c=>{n.push(N(c,!1,e))})):n.push(l)),this._d("path",n,e)}opsToPath(t,s){let e="";for(let n of t.ops){let o=typeof s=="number"&&s>=0?n.data.map((r=>+r.toFixed(s))):n.data;switch(n.op){case"move":e+=`M${o[0]} ${o[1]} `;break;case"bcurveTo":e+=`C${o[0]} ${o[1]}, ${o[2]} ${o[3]}, ${o[4]} ${o[5]} `;break;case"lineTo":e+=`L${o[0]} ${o[1]} `}}return e.trim()}toPaths(t){let s=t.sets||[],e=t.options||this.defaultOptions,n=[];for(let o of s){let r=null;switch(o.type){case"path":r={d:this.opsToPath(o),stroke:e.stroke,strokeWidth:e.strokeWidth,fill:O};break;case"fillPath":r={d:this.opsToPath(o),stroke:O,strokeWidth:0,fill:e.fill||O};break;case"fillSketch":r=this.fillSketch(o,e)}r&&n.push(r)}return n}fillSketch(t,s){let e=s.fillWeight;return e<0&&(e=s.strokeWidth/2),{d:this.opsToPath(t),stroke:s.fill||O,strokeWidth:e,fill:O}}_mergedShape(t){return t.filter(((s,e)=>e===0||s.op!=="move"))}},ft=class{constructor(t,s){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new $(s)}draw(t){let s=t.sets||[],e=t.options||this.getDefaultOptions(),n=this.ctx,o=t.options.fixedDecimalPlaceDigits;for(let r of s)switch(r.type){case"path":n.save(),n.strokeStyle=e.stroke==="none"?"transparent":e.stroke,n.lineWidth=e.strokeWidth,e.strokeLineDash&&n.setLineDash(e.strokeLineDash),e.strokeLineDashOffset&&(n.lineDashOffset=e.strokeLineDashOffset),this._drawToContext(n,r,o),n.restore();break;case"fillPath":{n.save(),n.fillStyle=e.fill||"";let h=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(n,r,o,h),n.restore();break}case"fillSketch":this.fillSketch(n,r,e)}}fillSketch(t,s,e){let n=e.fillWeight;n<0&&(n=e.strokeWidth/2),t.save(),e.fillLineDash&&t.setLineDash(e.fillLineDash),e.fillLineDashOffset&&(t.lineDashOffset=e.fillLineDashOffset),t.strokeStyle=e.fill||"",t.lineWidth=n,this._drawToContext(t,s,e.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,s,e,n="nonzero"){t.beginPath();for(let o of s.ops){let r=typeof e=="number"&&e>=0?o.data.map((h=>+h.toFixed(e))):o.data;switch(o.op){case"move":t.moveTo(r[0],r[1]);break;case"bcurveTo":t.bezierCurveTo(r[0],r[1],r[2],r[3],r[4],r[5]);break;case"lineTo":t.lineTo(r[0],r[1])}}s.type==="fillPath"?t.fill(n):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,s,e,n,o){let r=this.gen.line(t,s,e,n,o);return this.draw(r),r}rectangle(t,s,e,n,o){let r=this.gen.rectangle(t,s,e,n,o);return this.draw(r),r}ellipse(t,s,e,n,o){let r=this.gen.ellipse(t,s,e,n,o);return this.draw(r),r}circle(t,s,e,n){let o=this.gen.circle(t,s,e,n);return this.draw(o),o}linearPath(t,s){let e=this.gen.linearPath(t,s);return this.draw(e),e}polygon(t,s){let e=this.gen.polygon(t,s);return this.draw(e),e}arc(t,s,e,n,o,r,h=!1,i){let l=this.gen.arc(t,s,e,n,o,r,h,i);return this.draw(l),l}curve(t,s){let e=this.gen.curve(t,s);return this.draw(e),e}path(t,s){let e=this.gen.path(t,s);return this.draw(e),e}},H="http://www.w3.org/2000/svg",dt=class{constructor(t,s){this.svg=t,this.gen=new $(s)}draw(t){let s=t.sets||[],e=t.options||this.getDefaultOptions(),n=this.svg.ownerDocument||window.document,o=n.createElementNS(H,"g"),r=t.options.fixedDecimalPlaceDigits;for(let h of s){let i=null;switch(h.type){case"path":i=n.createElementNS(H,"path"),i.setAttribute("d",this.opsToPath(h,r)),i.setAttribute("stroke",e.stroke),i.setAttribute("stroke-width",e.strokeWidth+""),i.setAttribute("fill","none"),e.strokeLineDash&&i.setAttribute("stroke-dasharray",e.strokeLineDash.join(" ").trim()),e.strokeLineDashOffset&&i.setAttribute("stroke-dashoffset",`${e.strokeLineDashOffset}`);break;case"fillPath":i=n.createElementNS(H,"path"),i.setAttribute("d",this.opsToPath(h,r)),i.setAttribute("stroke","none"),i.setAttribute("stroke-width","0"),i.setAttribute("fill",e.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||i.setAttribute("fill-rule","evenodd");break;case"fillSketch":i=this.fillSketch(n,h,e)}i&&o.appendChild(i)}return o}fillSketch(t,s,e){let n=e.fillWeight;n<0&&(n=e.strokeWidth/2);let o=t.createElementNS(H,"path");return o.setAttribute("d",this.opsToPath(s,e.fixedDecimalPlaceDigits)),o.setAttribute("stroke",e.fill||""),o.setAttribute("stroke-width",n+""),o.setAttribute("fill","none"),e.fillLineDash&&o.setAttribute("stroke-dasharray",e.fillLineDash.join(" ").trim()),e.fillLineDashOffset&&o.setAttribute("stroke-dashoffset",`${e.fillLineDashOffset}`),o}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,s){return this.gen.opsToPath(t,s)}line(t,s,e,n,o){let r=this.gen.line(t,s,e,n,o);return this.draw(r)}rectangle(t,s,e,n,o){let r=this.gen.rectangle(t,s,e,n,o);return this.draw(r)}ellipse(t,s,e,n,o){let r=this.gen.ellipse(t,s,e,n,o);return this.draw(r)}circle(t,s,e,n){let o=this.gen.circle(t,s,e,n);return this.draw(o)}linearPath(t,s){let e=this.gen.linearPath(t,s);return this.draw(e)}polygon(t,s){let e=this.gen.polygon(t,s);return this.draw(e)}arc(t,s,e,n,o,r,h=!1,i){let l=this.gen.arc(t,s,e,n,o,r,h,i);return this.draw(l)}curve(t,s){let e=this.gen.curve(t,s);return this.draw(e)}path(t,s){let e=this.gen.path(t,s);return this.draw(e)}},Ft={canvas:(a,t)=>new ft(a,t),svg:(a,t)=>new dt(a,t),generator:a=>new $(a),newSeed:()=>$.newSeed()};export{Ft as a};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import{a as e}from"./chunk-6LQNQPBM.js";var l=e(()=>`
|
|
2
|
+
/* Font Awesome icon styling - consolidated */
|
|
3
|
+
.label-icon {
|
|
4
|
+
display: inline-block;
|
|
5
|
+
height: 1em;
|
|
6
|
+
overflow: visible;
|
|
7
|
+
vertical-align: -0.125em;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.node .label-icon path {
|
|
11
|
+
fill: currentColor;
|
|
12
|
+
stroke: revert;
|
|
13
|
+
stroke-width: revert;
|
|
14
|
+
}
|
|
15
|
+
`,"getIconStyles");export{l as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as t,b as s,c as d,d as o,e as l,g as u,p as c,w as f,y as m}from"./chunk-FK4OKHO7.js";var v=class extends m{static{t(this,"RailroadAbnfTokenBuilder")}constructor(){super(["railroad-abnf-beta"])}},b=class extends f{static{t(this,"RailroadAbnfValueConverter")}runConverter(r,e,a){let i=super.runConverter(r,e,a);if(r.name==="TITLE"&&typeof i=="string"){let n=i.trim();if(n.startsWith('"')&&n.endsWith('"')||n.startsWith("'")&&n.endsWith("'"))return n.slice(1,-1)}return i}runCustomConverter(r,e,a){if(r.name==="ABNF_STRING")return e.slice(1,-1)}},A={parser:{TokenBuilder:t(()=>new v,"TokenBuilder"),ValueConverter:t(()=>new b,"ValueConverter")}};function C(r=l){let e=o(d(r),u),a=o(s({shared:e}),c,A);return e.ServiceRegistry.register(a),{shared:e,RailroadAbnf:a}}t(C,"createRailroadAbnfServices");export{A as a,C as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as o}from"./chunk-3CEAP2V5.js";import{a as m}from"./chunk-6LQNQPBM.js";var g=m((t,e)=>{let n;return e==="sandbox"&&(n=o("#i"+t)),(e==="sandbox"?o(n.nodes()[0].contentDocument.body):o("body")).select(`[id="${t}"]`)},"getDiagramElement");export{g as a};
|