"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1352],{4340:(t,e,i)=>{i.d(e,{A:()=>r});var s=i(85448),n=i(51874),r=(0,s.K2)((t,e)=>{let i;return"sandbox"===e&&(i=(0,n.Ltv)("#i"+t)),("sandbox"===e?(0,n.Ltv)(i.nodes()[0].contentDocument.body):(0,n.Ltv)("body")).select(`[id="${t}"]`)},"getDiagramElement")},4674:(t,e,i)=>{i.d(e,{A:()=>r});var s=i(75011),n=i(50409);let r=(t,e)=>s.A.lang.round(n.A.parse(t)[e])},6900:(t,e,i)=>{i.d(e,{P:()=>r});var s=i(93913),n=i(85448),r=(0,n.K2)((t,e,i,r)=>{t.attr("class",i);let{width:c,height:l,x:h,y:u}=a(t,e);(0,s.a$)(t,l,c,r);let d=o(h,u,c,l,e);t.attr("viewBox",d),n.Rm.debug(`viewBox configured: ${d} with padding: ${e}`)},"setupViewPortForSVG"),a=(0,n.K2)((t,e)=>{let i=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:i.width+2*e,height:i.height+2*e,x:i.x,y:i.y}},"calculateDimensionsWithPadding"),o=(0,n.K2)((t,e,i,s,n)=>`${t-n} ${e-n} ${i} ${s}`,"createViewBox")},91352:(t,e,i)=>{i.d(e,{diagram:()=>f});var s=i(4340),n=i(6900),r=i(65477);i(94242),i(58211),i(12347),i(93196),i(96712),i(56194);var a=i(50001),o=i(93913),c=i(85448),l=i(51874),h=i(4674),u=i(48861),d=function(){var t=(0,c.K2)(function(t,e,i,s){for(i=i||{},s=t.length;s--;i[t[s]]=e);return i},"o"),e=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52],i=[1,10],s=[1,11],n=[1,12],r=[1,13],a=[1,23],o=[1,24],l=[1,25],h=[1,26],u=[1,27],d=[1,19],y=[1,28],p=[1,29],_=[1,20],g=[1,18],b=[1,21],m=[1,22],f=[1,36],E=[1,37],k=[1,38],T=[1,39],O=[1,40],S=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52,65,66,67,68,69],A=[1,45],N=[1,46],R=[1,55],I=[40,48,50,51,52,70,71],$=[1,66],C=[1,64],x=[1,61],D=[1,65],v=[1,67],L=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,51,52,65,66,67,68,69],K=[65,66,67,68,69],w=[1,84],M=[1,83],B=[1,81],F=[1,82],Y=[6,10,42,47],P=[6,10,13,41,42,47,48,49],z=[1,92],G=[1,91],U=[1,90],Z=[19,58],j=[1,101],W=[1,100],X=[19,58,60,62],V={trace:(0,c.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,COLON:13,role:14,STYLE_SEPARATOR:15,idList:16,BLOCK_START:17,attributes:18,BLOCK_STOP:19,SQS:20,SQE:21,title:22,title_value:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,direction:29,classDefStatement:30,classStatement:31,styleStatement:32,direction_tb:33,direction_bt:34,direction_rl:35,direction_lr:36,CLASSDEF:37,stylesOpt:38,separator:39,UNICODE_TEXT:40,STYLE_TEXT:41,COMMA:42,CLASS:43,STYLE:44,style:45,styleComponent:46,SEMI:47,NUM:48,BRKT:49,ENTITY_NAME:50,DECIMAL_NUM:51,ENTITY_ONE:52,attribute:53,attributeType:54,attributeName:55,attributeKeyTypeList:56,attributeComment:57,ATTRIBUTE_WORD:58,attributeKeyType:59,",":60,ATTRIBUTE_KEY:61,COMMENT:62,cardinality:63,relType:64,ZERO_OR_ONE:65,ZERO_OR_MORE:66,ONE_OR_MORE:67,ONLY_ONE:68,MD_PARENT:69,NON_IDENTIFYING:70,IDENTIFYING:71,WORD:72,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",8:"SPACE",10:"NEWLINE",13:"COLON",15:"STYLE_SEPARATOR",17:"BLOCK_START",19:"BLOCK_STOP",20:"SQS",21:"SQE",22:"title",23:"title_value",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"direction_tb",34:"direction_bt",35:"direction_rl",36:"direction_lr",37:"CLASSDEF",40:"UNICODE_TEXT",41:"STYLE_TEXT",42:"COMMA",43:"CLASS",44:"STYLE",47:"SEMI",48:"NUM",49:"BRKT",50:"ENTITY_NAME",51:"DECIMAL_NUM",52:"ENTITY_ONE",58:"ATTRIBUTE_WORD",60:",",61:"ATTRIBUTE_KEY",62:"COMMENT",65:"ZERO_OR_ONE",66:"ZERO_OR_MORE",67:"ONE_OR_MORE",68:"ONLY_ONE",69:"MD_PARENT",70:"NON_IDENTIFYING",71:"IDENTIFYING",72:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,9],[9,7],[9,7],[9,4],[9,6],[9,3],[9,5],[9,1],[9,3],[9,7],[9,9],[9,6],[9,8],[9,4],[9,6],[9,2],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[9,1],[29,1],[29,1],[29,1],[29,1],[30,4],[16,1],[16,1],[16,3],[16,3],[31,3],[32,4],[38,1],[38,3],[45,1],[45,2],[39,1],[39,1],[39,1],[46,1],[46,1],[46,1],[46,1],[11,1],[11,1],[11,1],[11,1],[11,1],[18,1],[18,2],[53,2],[53,3],[53,3],[53,4],[54,1],[55,1],[56,1],[56,3],[59,1],[57,1],[12,3],[63,1],[63,1],[63,1],[63,1],[63,1],[64,1],[64,1],[14,1],[14,1],[14,1]],performAction:(0,c.K2)(function(t,e,i,s,n,r,a){var o=r.length-1;switch(n){case 1:break;case 2:case 6:case 7:this.$=[];break;case 3:r[o-1].push(r[o]),this.$=r[o-1];break;case 4:case 5:case 55:case 56:case 57:case 58:case 81:case 65:case 66:case 69:this.$=r[o];break;case 8:s.addEntity(r[o-4]),s.addEntity(r[o-2]),s.addRelationship(r[o-4],r[o],r[o-2],r[o-3]);break;case 9:s.addEntity(r[o-8]),s.addEntity(r[o-4]),s.addRelationship(r[o-8],r[o],r[o-4],r[o-5]),s.setClass([r[o-8]],r[o-6]),s.setClass([r[o-4]],r[o-2]);break;case 10:s.addEntity(r[o-6]),s.addEntity(r[o-2]),s.addRelationship(r[o-6],r[o],r[o-2],r[o-3]),s.setClass([r[o-6]],r[o-4]);break;case 11:s.addEntity(r[o-6]),s.addEntity(r[o-4]),s.addRelationship(r[o-6],r[o],r[o-4],r[o-5]),s.setClass([r[o-4]],r[o-2]);break;case 12:s.addEntity(r[o-3]),s.addAttributes(r[o-3],r[o-1]);break;case 13:s.addEntity(r[o-5]),s.addAttributes(r[o-5],r[o-1]),s.setClass([r[o-5]],r[o-3]);break;case 14:s.addEntity(r[o-2]);break;case 15:s.addEntity(r[o-4]),s.setClass([r[o-4]],r[o-2]);break;case 16:s.addEntity(r[o]);break;case 17:s.addEntity(r[o-2]),s.setClass([r[o-2]],r[o]);break;case 18:s.addEntity(r[o-6],r[o-4]),s.addAttributes(r[o-6],r[o-1]);break;case 19:s.addEntity(r[o-8],r[o-6]),s.addAttributes(r[o-8],r[o-1]),s.setClass([r[o-8]],r[o-3]);break;case 20:s.addEntity(r[o-5],r[o-3]);break;case 21:s.addEntity(r[o-7],r[o-5]),s.setClass([r[o-7]],r[o-2]);break;case 22:s.addEntity(r[o-3],r[o-1]);break;case 23:s.addEntity(r[o-5],r[o-3]),s.setClass([r[o-5]],r[o]);break;case 24:case 25:this.$=r[o].trim(),s.setAccTitle(this.$);break;case 26:case 27:this.$=r[o].trim(),s.setAccDescription(this.$);break;case 32:s.setDirection("TB");break;case 33:s.setDirection("BT");break;case 34:s.setDirection("RL");break;case 35:s.setDirection("LR");break;case 36:this.$=r[o-3],s.addClass(r[o-2],r[o-1]);break;case 37:case 38:case 59:case 67:case 43:this.$=[r[o]];break;case 39:case 40:this.$=r[o-2].concat([r[o]]);break;case 41:this.$=r[o-2],s.setClass(r[o-1],r[o]);break;case 42:this.$=r[o-3],s.addCssStyles(r[o-2],r[o-1]);break;case 44:case 68:r[o-2].push(r[o]),this.$=r[o-2];break;case 46:this.$=r[o-1]+r[o];break;case 54:case 79:case 80:case 70:this.$=r[o].replace(/"/g,"");break;case 60:r[o].push(r[o-1]),this.$=r[o];break;case 61:this.$={type:r[o-1],name:r[o]};break;case 62:this.$={type:r[o-2],name:r[o-1],keys:r[o]};break;case 63:this.$={type:r[o-2],name:r[o-1],comment:r[o]};break;case 64:this.$={type:r[o-3],name:r[o-2],keys:r[o-1],comment:r[o]};break;case 71:this.$={cardA:r[o],relType:r[o-1],cardB:r[o-2]};break;case 72:this.$=s.Cardinality.ZERO_OR_ONE;break;case 73:this.$=s.Cardinality.ZERO_OR_MORE;break;case 74:this.$=s.Cardinality.ONE_OR_MORE;break;case 75:this.$=s.Cardinality.ONLY_ONE;break;case 76:this.$=s.Cardinality.MD_PARENT;break;case 77:this.$=s.Identification.NON_IDENTIFYING;break;case 78:this.$=s.Identification.IDENTIFYING}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:i,24:s,26:n,28:r,29:14,30:15,31:16,32:17,33:a,34:o,35:l,36:h,37:u,40:d,43:y,44:p,48:_,50:g,51:b,52:m},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:30,11:9,22:i,24:s,26:n,28:r,29:14,30:15,31:16,32:17,33:a,34:o,35:l,36:h,37:u,40:d,43:y,44:p,48:_,50:g,51:b,52:m},t(e,[2,5]),t(e,[2,6]),t(e,[2,16],{12:31,63:35,15:[1,32],17:[1,33],20:[1,34],65:f,66:E,67:k,68:T,69:O}),{23:[1,41]},{25:[1,42]},{27:[1,43]},t(e,[2,27]),t(e,[2,28]),t(e,[2,29]),t(e,[2,30]),t(e,[2,31]),t(S,[2,54]),t(S,[2,55]),t(S,[2,56]),t(S,[2,57]),t(S,[2,58]),t(e,[2,32]),t(e,[2,33]),t(e,[2,34]),t(e,[2,35]),{16:44,40:A,41:N},{16:47,40:A,41:N},{16:48,40:A,41:N},t(e,[2,4]),{11:49,40:d,48:_,50:g,51:b,52:m},{16:50,40:A,41:N},{18:51,19:[1,52],53:53,54:54,58:R},{11:56,40:d,48:_,50:g,51:b,52:m},{64:57,70:[1,58],71:[1,59]},t(I,[2,72]),t(I,[2,73]),t(I,[2,74]),t(I,[2,75]),t(I,[2,76]),t(e,[2,24]),t(e,[2,25]),t(e,[2,26]),{13:$,38:60,41:C,42:x,45:62,46:63,48:D,49:v},t(L,[2,37]),t(L,[2,38]),{16:68,40:A,41:N,42:x},{13:$,38:69,41:C,42:x,45:62,46:63,48:D,49:v},{13:[1,70],15:[1,71]},t(e,[2,17],{63:35,12:72,17:[1,73],42:x,65:f,66:E,67:k,68:T,69:O}),{19:[1,74]},t(e,[2,14]),{18:75,19:[2,59],53:53,54:54,58:R},{55:76,58:[1,77]},{58:[2,65]},{21:[1,78]},{63:79,65:f,66:E,67:k,68:T,69:O},t(K,[2,77]),t(K,[2,78]),{6:w,10:M,39:80,42:B,47:F},{40:[1,85],41:[1,86]},t(Y,[2,43],{46:87,13:$,41:C,48:D,49:v}),t(P,[2,45]),t(P,[2,50]),t(P,[2,51]),t(P,[2,52]),t(P,[2,53]),t(e,[2,41],{42:x}),{6:w,10:M,39:88,42:B,47:F},{14:89,40:z,50:G,72:U},{16:93,40:A,41:N},{11:94,40:d,48:_,50:g,51:b,52:m},{18:95,19:[1,96],53:53,54:54,58:R},t(e,[2,12]),{19:[2,60]},t(Z,[2,61],{56:97,57:98,59:99,61:j,62:W}),t([19,58,61,62],[2,66]),t(e,[2,22],{15:[1,103],17:[1,102]}),t([40,48,50,51,52],[2,71]),t(e,[2,36]),{13:$,41:C,45:104,46:63,48:D,49:v},t(e,[2,47]),t(e,[2,48]),t(e,[2,49]),t(L,[2,39]),t(L,[2,40]),t(P,[2,46]),t(e,[2,42]),t(e,[2,8]),t(e,[2,79]),t(e,[2,80]),t(e,[2,81]),{13:[1,105],42:x},{13:[1,107],15:[1,106]},{19:[1,108]},t(e,[2,15]),t(Z,[2,62],{57:109,60:[1,110],62:W}),t(Z,[2,63]),t(X,[2,67]),t(Z,[2,70]),t(X,[2,69]),{18:111,19:[1,112],53:53,54:54,58:R},{16:113,40:A,41:N},t(Y,[2,44],{46:87,13:$,41:C,48:D,49:v}),{14:114,40:z,50:G,72:U},{16:115,40:A,41:N},{14:116,40:z,50:G,72:U},t(e,[2,13]),t(Z,[2,64]),{59:117,61:j},{19:[1,118]},t(e,[2,20]),t(e,[2,23],{17:[1,119],42:x}),t(e,[2,11]),{13:[1,120],42:x},t(e,[2,10]),t(X,[2,68]),t(e,[2,18]),{18:121,19:[1,122],53:53,54:54,58:R},{14:123,40:z,50:G,72:U},{19:[1,124]},t(e,[2,21]),t(e,[2,9]),t(e,[2,19])],defaultActions:{55:[2,65],75:[2,60]},parseError:(0,c.K2)(function(t,e){if(e.recoverable)this.trace(t);else{var i=Error(t);throw i.hash=e,i}},"parseError"),parse:(0,c.K2)(function(t){var e=this,i=[0],s=[],n=[null],r=[],a=this.table,o="",l=0,h=0,u=0,d=r.slice.call(arguments,1),y=Object.create(this.lexer),p={};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(p[_]=this.yy[_]);y.setInput(t,p),p.lexer=y,p.parser=this,void 0===y.yylloc&&(y.yylloc={});var g=y.yylloc;r.push(g);var b=y.options&&y.options.ranges;function m(){var t;return"number"!=typeof(t=s.pop()||y.lex()||1)&&(t instanceof Array&&(t=(s=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.parseError?this.parseError=p.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,c.K2)(function(t){i.length=i.length-2*t,n.length=n.length-t,r.length=r.length-t},"popStack"),(0,c.K2)(m,"lex");for(var f,E,k,T,O,S,A,N,R,I={};;){if(k=i[i.length-1],this.defaultActions[k]?T=this.defaultActions[k]:(null==f&&(f=m()),T=a[k]&&a[k][f]),void 0===T||!T.length||!T[0]){var $="";for(S in R=[],a[k])this.terminals_[S]&&S>2&&R.push("'"+this.terminals_[S]+"'");$=y.showPosition?"Parse error on line "+(l+1)+":\n"+y.showPosition()+"\nExpecting "+R.join(", ")+", got '"+(this.terminals_[f]||f)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==f?"end of input":"'"+(this.terminals_[f]||f)+"'"),this.parseError($,{text:y.match,token:this.terminals_[f]||f,line:y.yylineno,loc:g,expected:R})}if(T[0]instanceof Array&&T.length>1)throw Error("Parse Error: multiple actions possible at state: "+k+", token: "+f);switch(T[0]){case 1:i.push(f),n.push(y.yytext),r.push(y.yylloc),i.push(T[1]),f=null,E?(f=E,E=null):(h=y.yyleng,o=y.yytext,l=y.yylineno,g=y.yylloc,u>0&&u--);break;case 2:if(A=this.productions_[T[1]][1],I.$=n[n.length-A],I._$={first_line:r[r.length-(A||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(A||1)].first_column,last_column:r[r.length-1].last_column},b&&(I._$.range=[r[r.length-(A||1)].range[0],r[r.length-1].range[1]]),void 0!==(O=this.performAction.apply(I,[o,h,l,p,T[1],n,r].concat(d))))return O;A&&(i=i.slice(0,-1*A*2),n=n.slice(0,-1*A),r=r.slice(0,-1*A)),i.push(this.productions_[T[1]][0]),n.push(I.$),r.push(I._$),N=a[i[i.length-2]][i[i.length-1]],i.push(N);break;case 3:return!0}}return!0},"parse")};function Q(){this.yy={}}return V.lexer={EOF:1,parseError:(0,c.K2)(function(t,e){if(this.yy.parser)this.yy.parser.parseError(t,e);else throw Error(t)},"parseError"),setInput:(0,c.K2)(function(t,e){return this.yy=e||this.yy||{},this._input=t,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:(0,c.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,c.K2)(function(t){var e=t.length,i=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var s=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 n=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===s.length?this.yylloc.first_column:0)+s[s.length-i.length].length-i[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,c.K2)(function(){return this._more=!0,this},"more"),reject:(0,c.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,c.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,c.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,c.K2)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,c.K2)(function(){var t=this.pastInput(),e=Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,c.K2)(function(t,e){var i,s,n;if(this.options.backtrack_lexer&&(n={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&&(n.yylloc.range=this.yylloc.range.slice(0))),(s=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,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(t[0].length),this.matched+=t[0],i=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack)for(var r in n)this[r]=n[r];return!1},"test_match"),next:(0,c.K2)(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var t,e,i,s,n=this._currentRules(),r=0;re[0].length)){if(e=i,s=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(i,n[r])))return t;if(!this._backtrack)return!1;e=!1;continue}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[s]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,c.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,c.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,c.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,c.K2)(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:(0,c.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,c.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,c.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,c.K2)(function(t,e,i,s){switch(i){case 0:return this.begin("acc_title"),24;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),26;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return 33;case 8:return 34;case 9:return 35;case 10:return 36;case 11:return 10;case 12:case 23:case 28:case 35:break;case 13:return 8;case 14:return 50;case 15:return 72;case 16:return 4;case 17:return this.begin("block"),17;case 18:case 19:case 38:return 49;case 20:case 37:return 42;case 21:return 15;case 22:case 36:return 13;case 24:return 61;case 25:case 26:return 58;case 27:return 62;case 29:return this.popState(),19;case 30:case 77:return e.yytext[0];case 31:return 20;case 32:return 21;case 33:return this.begin("style"),44;case 34:return this.popState(),10;case 39:return this.begin("style"),37;case 40:return 43;case 41:case 45:case 46:case 64:return 65;case 42:case 43:case 44:case 52:case 54:case 66:return 67;case 47:case 48:case 49:case 50:case 51:case 53:case 65:return 66;case 55:case 56:case 58:case 59:case 60:case 63:return 68;case 57:return 51;case 61:return 52;case 62:return 48;case 67:return 69;case 68:case 71:case 72:case 73:return 70;case 69:case 70:return 71;case 74:return 41;case 75:return 47;case 76:return 40;case 78:return 6}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/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,/^(?:[\s]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:#)/i,/^(?:#)/i,/^(?:,)/i,/^(?::::)/i,/^(?::)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:([^\s]*)[~].*[~]([^\s]*))/i,/^(?:([\*A-Za-z_\u00C0-\uFFFF][A-Za-z0-9\-\_\[\]\(\)\u00C0-\uFFFF\*]*))/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:style\b)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?::)/i,/^(?:,)/i,/^(?:#)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:[0-9]+\.[0-9]+)/i,/^(?:1(?=\s+[A-Za-z_"']))/i,/^(?:1(?=\s+[0-9]))/i,/^(?:1(?=(--|\.\.|\.-|-\.)))/i,/^(?:1\b)/i,/^(?:[0-9]+)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:u(?=[\.\-\|]))/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:;)/i,/^(?:([^\x00-\x7F]|\w|-|\*|\.)+)/i,/^(?:.)/i,/^(?:$)/i],conditions:{style:{rules:[34,35,36,37,38,74,75],inclusive:!1},acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},block:{rules:[23,24,25,26,27,28,29,30],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,31,32,33,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,76,77,78],inclusive:!0}}},(0,c.K2)(Q,"Parser"),Q.prototype=V,V.Parser=Q,new Q}();d.parser=d;var y=class{constructor(){this.entities=new Map,this.relationships=[],this.classes=new Map,this.direction="TB",this.Cardinality={ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE",MD_PARENT:"MD_PARENT"},this.Identification={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},this.setAccTitle=o.SV,this.getAccTitle=o.iN,this.setAccDescription=o.EI,this.getAccDescription=o.m7,this.setDiagramTitle=o.ke,this.getDiagramTitle=o.ab,this.getConfig=(0,c.K2)(()=>(0,o.D7)().er,"getConfig"),this.clear(),this.addEntity=this.addEntity.bind(this),this.addAttributes=this.addAttributes.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setDirection=this.setDirection.bind(this),this.addCssStyles=this.addCssStyles.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}static{(0,c.K2)(this,"ErDB")}addEntity(t,e=""){return this.entities.has(t)?!this.entities.get(t)?.alias&&e&&(this.entities.get(t).alias=e,c.Rm.info(`Add alias '${e}' to entity '${t}'`)):(this.entities.set(t,{id:`entity-${t}-${this.entities.size}`,label:t,attributes:[],alias:e,shape:"erBox",look:(0,o.D7)().look??"default",cssClasses:"default",cssStyles:[],labelType:"markdown"}),c.Rm.info("Added new entity :",t)),this.entities.get(t)}getEntity(t){return this.entities.get(t)}getEntities(){return this.entities}getClasses(){return this.classes}addAttributes(t,e){let i,s=this.addEntity(t);for(i=e.length-1;i>=0;i--)e[i].keys||(e[i].keys=[]),e[i].comment||(e[i].comment=""),s.attributes.push(e[i]),c.Rm.debug("Added attribute ",e[i].name)}addRelationship(t,e,i,s){let n=this.entities.get(t),r=this.entities.get(i);if(!n||!r)return;let a={entityA:n.id,roleA:e,entityB:r.id,relSpec:s};this.relationships.push(a),c.Rm.debug("Added new relationship :",a)}getRelationships(){return this.relationships}getDirection(){return this.direction}setDirection(t){this.direction=t}getCompiledStyles(t){let e=[];for(let i of t){let t=this.classes.get(i);t?.styles&&(e=[...e,...t.styles??[]].map(t=>t.trim())),t?.textStyles&&(e=[...e,...t.textStyles??[]].map(t=>t.trim()))}return e}addCssStyles(t,e){for(let i of t){let t=this.entities.get(i);if(!e||!t)return;for(let i of e)t.cssStyles.push(i)}}addClass(t,e){t.forEach(t=>{let i=this.classes.get(t);void 0===i&&(i={id:t,styles:[],textStyles:[]},this.classes.set(t,i)),e&&e.forEach(function(t){if(/color/.exec(t)){let e=t.replace("fill","bgFill");i.textStyles.push(e)}i.styles.push(t)})})}setClass(t,e){for(let i of t){let t=this.entities.get(i);if(t)for(let i of e)t.cssClasses+=" "+i}}clear(){this.entities=new Map,this.classes=new Map,this.relationships=[],(0,o.IU)()}getData(){let t=[],e=[],i=(0,o.D7)(),s=0;for(let e of this.entities.keys()){let i=this.entities.get(e);i&&(i.cssCompiledStyles=this.getCompiledStyles(i.cssClasses.split(" ")),i.colorIndex=s++,t.push(i))}let n=0;for(let t of this.relationships){let s={id:(0,a.rY)(t.entityA,t.entityB,{prefix:"id",counter:n++}),type:"normal",curve:"basis",start:t.entityA,end:t.entityB,label:t.roleA,labelpos:"c",thickness:"normal",classes:"relationshipLine",arrowTypeStart:t.relSpec.cardB.toLowerCase(),arrowTypeEnd:t.relSpec.cardA.toLowerCase(),pattern:"IDENTIFYING"==t.relSpec.relType?"solid":"dashed",look:i.look,labelType:"markdown"};e.push(s)}return{nodes:t,edges:e,other:{},config:i,direction:"TB"}}},p={};(0,c.VA)(p,{draw:()=>_});var _=(0,c.K2)(async function(t,e,i,h){c.Rm.info("REF0:"),c.Rm.info("Drawing er diagram (unified)",e);let{securityLevel:u,er:d,layout:y}=(0,o.D7)(),p=h.db.getData(),_=(0,s.A)(e,u);p.type=h.type,p.layoutAlgorithm=(0,r.q7)(y),p.config.flowchart.nodeSpacing=d?.nodeSpacing||140,p.config.flowchart.rankSpacing=d?.rankSpacing||80,p.direction=h.db.getDirection();let{config:g}=p,{look:b}=g;"neo"===b?p.markers=["only_one_neo","zero_or_one_neo","one_or_more_neo","zero_or_more_neo"]:p.markers=["only_one","zero_or_one","one_or_more","zero_or_more"],p.diagramId=e,await (0,r.XX)(p,_),"elk"===p.layoutAlgorithm&&_.select(".edges").lower();let m=_.selectAll('[id*="-background"]');Array.from(m).length>0&&m.each(function(){let t=(0,l.Ltv)(this),e=t.attr("id").replace("-background",""),i=_.select(`#${CSS.escape(e)}`);if(!i.empty()){let e=i.attr("transform");t.attr("transform",e)}}),a._K.insertTitle(_,"erDiagramTitleText",d?.titleTopMargin??25,h.db.getDiagramTitle()),(0,n.P)(_,8,"erDiagram",d?.useMaxWidth??!0)},"draw"),g=(0,c.K2)((t,e)=>{let i=h.A,s=i(t,"r"),n=i(t,"g"),r=i(t,"b");return u.A(s,n,r,e)},"fade"),b=new Set(["redux-color","redux-dark-color"]),m=(0,c.K2)(t=>{let{theme:e,look:i,bkgColorArray:s,borderColorArray:n}=t;if(!b.has(e))return"";let r=s?.length>0,a="";for(let e=0;e{let{look:e,theme:i,erEdgeLabelBackground:s,strokeWidth:n}=t;return` ${m(t)} .entityBox { fill: ${t.mainBkg}; stroke: ${t.nodeBorder}; } .relationshipLabelBox { fill: ${t.tertiaryColor}; opacity: 0.7; background-color: ${t.tertiaryColor}; rect { opacity: 0.5; } } .labelBkg { background-color: ${b.has(i)&&s?s:g(t.tertiaryColor,.5)}; } .edgeLabel { background-color: ${b.has(i)&&s?s:t.edgeLabelBackground}; } .edgeLabel .label rect { fill: ${b.has(i)&&s?s:t.edgeLabelBackground}; } .edgeLabel .label text { fill: ${t.textColor}; } .edgeLabel .label { fill: ${t.nodeBorder}; font-size: 14px; } .label { font-family: ${t.fontFamily}; color: ${t.nodeTextColor||t.textColor}; } .edge-pattern-dashed { stroke-dasharray: 8,8; } .node rect, .node circle, .node ellipse, .node polygon { fill: ${t.mainBkg}; stroke: ${t.nodeBorder}; stroke-width: ${"neo"===e?n:"1px"}; } .relationshipLine { stroke: ${t.lineColor}; stroke-width: ${"neo"===e?n:"1px"}; fill: none; } .marker { fill: none !important; stroke: ${t.lineColor} !important; stroke-width: 1; } [data-look=neo].labelBkg { background-color: ${g(t.tertiaryColor,.5)}; } `},"getStyles")}}}]);